{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select15",
  "title": "Select",
  "description": "Select built with shadcn/ui.",
  "dependencies": [
    "lucide-react@0"
  ],
  "registryDependencies": [
    "button",
    "command",
    "label",
    "popover"
  ],
  "files": [
    {
      "path": "contents/components/select/15/index.tsx",
      "content": "\"use client\";\n\nimport { CheckIcon, ChevronDownIcon, PlusIcon } from \"lucide-react\";\nimport { useId, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator\n} from \"@/components/ui/command\";\nimport { Label } from \"@/components/ui/label\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\n\nconst organizations = [\n  {\n    label: \"Shadcn UI Kit\",\n    value: \"shadcnuikit\"\n  },\n  {\n    label: \"Bundui\",\n    value: \"bundui\"\n  },\n  {\n    label: \"Lens Themes\",\n    value: \"lensthemes\"\n  }\n];\n\nexport default function Component() {\n  const id = useId();\n  const [open, setOpen] = useState<boolean>(false);\n  const [value, setValue] = useState<string>(\"shadcnuikit\");\n\n  return (\n    <div className=\"w-full max-w-xs\">\n      <Popover onOpenChange={setOpen} open={open}>\n        <PopoverTrigger asChild>\n          <Button\n            aria-expanded={open}\n            className=\"border-input bg-background hover:bg-background w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]\"\n            id={id}\n            role=\"combobox\"\n            variant=\"outline\">\n            <span className={cn(\"truncate\", !value && \"text-muted-foreground\")}>\n              {value\n                ? organizations.find((organization) => organization.value === value)?.label\n                : \"Select organization\"}\n            </span>\n            <ChevronDownIcon\n              aria-hidden=\"true\"\n              className=\"text-muted-foreground/80 shrink-0\"\n              size={16}\n            />\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent\n          align=\"start\"\n          className=\"border-input w-full min-w-(--radix-popper-anchor-width) p-0\">\n          <Command>\n            <CommandInput placeholder=\"Find organization\" />\n            <CommandList>\n              <CommandEmpty>No organization found.</CommandEmpty>\n              <CommandGroup>\n                {organizations.map((organization) => (\n                  <CommandItem\n                    key={organization.value}\n                    onSelect={(currentValue) => {\n                      setValue(currentValue === value ? \"\" : currentValue);\n                      setOpen(false);\n                    }}\n                    value={organization.value}>\n                    {organization.label}\n                    {value === organization.value && <CheckIcon className=\"ml-auto\" size={16} />}\n                  </CommandItem>\n                ))}\n              </CommandGroup>\n              <CommandSeparator />\n              <CommandGroup>\n                <Button className=\"w-full justify-start font-normal\" variant=\"ghost\">\n                  <PlusIcon aria-hidden=\"true\" className=\"-ms-2 opacity-60\" size={16} />\n                  New organization\n                </Button>\n              </CommandGroup>\n            </CommandList>\n          </Command>\n        </PopoverContent>\n      </Popover>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/select15.tsx"
    }
  ],
  "type": "registry:component"
}