{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "select", "title": "Select", "description": "A customizable select dropdown component for choosing options from a list", "dependencies": ["@ark-ui/react", "lucide-react", "clsx", "tailwind-merge"], "files": [ { "path": "src/registry/thornberry/components/select.tsx", "content": "import { Select as ArkSelect } from \"@ark-ui/react/select\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport type { SelectRootProps } from \"@ark-ui/react/select\";\nimport type { ComponentProps, HTMLAttributes } from \"react\";\n\nconst SelectRoot = ArkSelect.Root;\nconst SelectRootProvider = ArkSelect.RootProvider;\nconst SelectContext = ArkSelect.Context;\nconst SelectHiddenSelect = ArkSelect.HiddenSelect;\n\n// TODO: fix types upstream in thornberry\nconst Select = ({ className, ...rest }: SelectRootProps) => (\n \n);\n\nconst SelectLabel = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectControl = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\n// TODO: edit in thornberry to get rid of React.Children.only error when using `asChild` prop\nconst SelectTrigger = ({\n className,\n ...rest\n}: ComponentProps) => (\n svg]:rotate-180 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...rest}\n />\n);\n\nconst SelectValueText = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectIndicator = ({\n className,\n children,\n ...rest\n}: ComponentProps) => (\n \n {children}\n \n);\n\nconst SelectClearTrigger = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectPositioner = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectContent = ({\n className,\n children,\n ...rest\n}: ComponentProps) => (\n \n {children}\n \n);\n\nconst SelectItemGroup = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectItemGroupLabel = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectItem = ({\n className,\n children,\n ...rest\n}: ComponentProps) => (\n \n {children}\n \n);\n\nconst SelectItemText = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SelectItemIndicator = ({\n className,\n children,\n ...rest\n}: ComponentProps) => (\n \n \n \n);\n\nconst SelectSeparator = ({\n className,\n ...rest\n}: HTMLAttributes) => (\n \n);\n\nexport {\n Select,\n SelectRoot,\n SelectRootProvider,\n SelectContext,\n SelectLabel,\n SelectControl,\n SelectTrigger,\n SelectValueText,\n SelectIndicator,\n SelectClearTrigger,\n SelectPositioner,\n SelectContent,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectSeparator,\n SelectHiddenSelect,\n};\n\n// Re-export createListCollection for convenience\nexport { createListCollection } from \"@ark-ui/react\";\n", "type": "registry:ui" }, { "path": "src/lib/utils.ts", "content": "import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nimport type { ClassValue } from \"clsx\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n", "type": "registry:lib", "target": "" } ], "type": "registry:ui" }