{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "type": "registry:ui",
  "title": "Select",
  "dependencies": [
    "@ark-ui/react@^5.38.1"
  ],
  "registryDependencies": [
    "cx",
    "icons",
    "tokens"
  ],
  "files": [
    {
      "path": "components/ui/select/Select.tsx",
      "target": "components/ui/select/Select.tsx",
      "type": "registry:ui",
      "content": "import { Portal } from '@ark-ui/react/portal'\nimport { Select as ArkSelect } from '@ark-ui/react/select'\nimport type { ReactNode } from 'react'\nimport { CheckIcon, ChevronIcon } from '@/components/ui/icons/Icons'\nimport { cx } from '@/lib/cx'\n\nexport { createListCollection } from '@ark-ui/react/select'\n\nexport interface SelectOptionItem {\n  readonly label: string\n  readonly value: string\n}\n\nexport const Select = ArkSelect.Root\n\ninterface PartProps {\n  readonly children: ReactNode\n  readonly className?: string\n}\n\nexport const SelectTrigger = ({ children, className }: PartProps) => (\n  <ArkSelect.Control>\n    <ArkSelect.Trigger className={cx('ctl h-(--ctl-h) cursor-pointer', className)}>\n      {children}\n      <ChevronIcon className=\"size-3 text-weft-faint\" />\n    </ArkSelect.Trigger>\n  </ArkSelect.Control>\n)\n\n/* rank comes from the stylesheet; ark sets it inline on the positioner */\nexport const SelectContent = ({ children, className }: PartProps) => (\n  <Portal>\n    <ArkSelect.Positioner>\n      <ArkSelect.Content className={cx('layer min-w-42 py-1 focus:outline-none', className)}>\n        {children}\n      </ArkSelect.Content>\n    </ArkSelect.Positioner>\n  </Portal>\n)\n\ninterface SelectOptionProps {\n  readonly item: SelectOptionItem\n  readonly className?: string\n}\n\n/* the shed follows the keyboard, the selvedge marks the choice */\nexport const SelectOption = ({ item, className }: SelectOptionProps) => (\n  <ArkSelect.Item\n    item={item}\n    className={cx(\n      'selvedge flex cursor-pointer items-center justify-between gap-3 px-(--cell-x) py-1 text-weft-dim data-highlighted:bg-shed data-highlighted:text-weft data-[state=checked]:bg-indigo-wash data-[state=checked]:text-weft data-[state=checked]:selvedge-on',\n      className,\n    )}\n  >\n    <ArkSelect.ItemText>{item.label}</ArkSelect.ItemText>\n    <ArkSelect.ItemIndicator>\n      <CheckIcon className=\"size-3 text-indigo\" />\n    </ArkSelect.ItemIndicator>\n  </ArkSelect.Item>\n)\n"
    }
  ],
  "sley": {
    "version": "0.13.1",
    "url": "https://sley-ui.dev/r/0.13.1/select.json",
    "files": [
      {
        "path": "components/ui/select/Select.tsx",
        "hash": "sha256-lk5MRYwtnhdIrV+B4J2zCVZUWK3NPwxoFXMDnAaJjqM=",
        "client": true
      }
    ]
  }
}
