{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "description": "Displays a list of options for the user to pick from.",
  "dependencies": [
    "@base-ui/react",
    "lucide-react",
    "clsx",
    "tailwind-merge"
  ],
  "registryDependencies": [
    "https://optics.agusmayol.com.ar/r/button.json",
    "https://optics.agusmayol.com.ar/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/optics/select.jsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\";\nimport { buttonVariants } from \"@/registry/optics/button\";\n\nconst Select = SelectPrimitive.Root;\n\nfunction SelectGroup({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.Group\n\t\t\tdata-slot=\"select-group\"\n\t\t\tclassName={cn(\"scroll-my-1 p-1\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectValue({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.Value\n\t\t\tdata-slot=\"select-value\"\n\t\t\tclassName={cn(\"flex flex-1 text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectTrigger({\n\tclassName = \"\",\n\tsize = \"default\",\n\tvariant = \"raised\",\n\tchildren = null,\n\t...props\n}) {\n\treturn (\n\t\t<SelectPrimitive.Trigger\n\t\t\tdata-slot=\"select-trigger\"\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t\tvariant &&\n\t\t\t\t\tbuttonVariants({\n\t\t\t\t\t\tvariant,\n\t\t\t\t\t\tanimation: \"colors\",\n\t\t\t\t\t}),\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SelectPrimitive.Icon\n\t\t\t\trender={\n\t\t\t\t\t<ChevronDownIcon className=\"text-muted-foreground size-3.5 pointer-events-none\" />\n\t\t\t\t}\n\t\t\t/>\n\t\t</SelectPrimitive.Trigger>\n\t);\n}\n\nfunction SelectContent({\n\tclassName = \"\",\n\tchildren = null,\n\tside = \"bottom\",\n\tsideOffset = 4,\n\talign = \"center\",\n\talignOffset = 0,\n\talignItemWithTrigger = false,\n\t...props\n}) {\n\treturn (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Positioner\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\talignItemWithTrigger={alignItemWithTrigger}\n\t\t\t\tcollisionPadding={8}\n\t\t\t\tclassName=\"isolate z-50\"\n\t\t\t>\n\t\t\t\t<SelectPrimitive.Popup\n\t\t\t\t\tdata-slot=\"select-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"bg-popover p-1 text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-32 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t\t<SelectPrimitive.List>{children}</SelectPrimitive.List>\n\t\t\t\t\t<SelectScrollDownButton />\n\t\t\t\t</SelectPrimitive.Popup>\n\t\t\t</SelectPrimitive.Positioner>\n\t\t</SelectPrimitive.Portal>\n\t);\n}\n\nfunction SelectLabel({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.GroupLabel\n\t\t\tdata-slot=\"select-label\"\n\t\t\tclassName={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectItem({ className = \"\", children = null, ...props }) {\n\treturn (\n\t\t<SelectPrimitive.Item\n\t\t\tdata-slot=\"select-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SelectPrimitive.ItemText className=\"flex flex-1 gap-2 shrink-0 whitespace-nowrap\">\n\t\t\t\t{children}\n\t\t\t</SelectPrimitive.ItemText>\n\t\t\t<SelectPrimitive.ItemIndicator\n\t\t\t\trender={\n\t\t\t\t\t<span className=\"pointer-events-none absolute right-2 flex items-center justify-center\" />\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<CheckIcon className=\"pointer-events-none\" />\n\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t</SelectPrimitive.Item>\n\t);\n}\n\nfunction SelectSeparator({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.Separator\n\t\t\tdata-slot=\"select-separator\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-border/50 -mx-1 my-1 h-px pointer-events-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectScrollUpButton({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.ScrollUpArrow\n\t\t\tdata-slot=\"select-scroll-up-button\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 top-0 w-full\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronUpIcon />\n\t\t</SelectPrimitive.ScrollUpArrow>\n\t);\n}\n\nfunction SelectScrollDownButton({ className = \"\", ...props }) {\n\treturn (\n\t\t<SelectPrimitive.ScrollDownArrow\n\t\t\tdata-slot=\"select-scroll-down-button\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 bottom-0 w-full\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronDownIcon />\n\t\t</SelectPrimitive.ScrollDownArrow>\n\t);\n}\n\nSelect.displayName = \"Select\";\nSelectContent.displayName = \"SelectContent\";\nSelectGroup.displayName = \"SelectGroup\";\nSelectItem.displayName = \"SelectItem\";\nSelectLabel.displayName = \"SelectLabel\";\nSelectScrollDownButton.displayName = \"SelectScrollDownButton\";\nSelectScrollUpButton.displayName = \"SelectScrollUpButton\";\nSelectSeparator.displayName = \"SelectSeparator\";\nSelectTrigger.displayName = \"SelectTrigger\";\nSelectValue.displayName = \"SelectValue\";\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n};\n",
      "type": "registry:component",
      "target": "components/optics/select.jsx"
    }
  ],
  "type": "registry:component"
}