{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "description": "Tetsu select on @ui-sdk/react, styled with the @tetsustudio/tokens variables.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5",
    "cn@^0.4.0",
    "lucide-react@^1.16.0"
  ],
  "files": [
    {
      "path": "registry/ui/select.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { cn } from 'cn'\nimport {\n  Select as SelectPrimitive,\n  SelectContent as SelectContentPrimitive,\n  SelectGroup as SelectGroupPrimitive,\n  SelectGroupLabel,\n  SelectItem as SelectItemPrimitive,\n  SelectItemIndicator,\n  SelectItemText,\n  SelectSeparator as SelectSeparatorPrimitive,\n  SelectTrigger as SelectTriggerPrimitive,\n  SelectValue as SelectValuePrimitive,\n  type SelectProps as SelectPrimitiveProps,\n} from '@ui-sdk/react/select'\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react'\n\ntype WithClassName<T extends React.ElementType> = Omit<React.ComponentProps<T>, 'className'> & {\n  className?: string\n}\ntype Composed<T extends React.ElementType> = Omit<WithClassName<T>, 'children'> & {\n  children?: React.ReactNode\n}\n\ntype SelectProps = Omit<\n  SelectPrimitiveProps<string, false>,\n  'value' | 'defaultValue' | 'onValueChange' | 'multiple'\n> & {\n  value?: string\n  defaultValue?: string\n  onValueChange?: (value: string) => void\n}\n\n/** Single string value, like the Radix select it replaced: clearing reports ''. */\nfunction Select({ value, defaultValue, onValueChange, ...props }: SelectProps) {\n  return (\n    <SelectPrimitive\n      value={value === undefined ? undefined : value || null}\n      defaultValue={defaultValue === undefined ? undefined : defaultValue || null}\n      onValueChange={(next) => onValueChange?.(next ?? '')}\n      {...props}\n    />\n  )\n}\n\nfunction SelectGroup({ className, ...props }: WithClassName<typeof SelectGroupPrimitive>) {\n  return <SelectGroupPrimitive className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue(props: React.ComponentProps<typeof SelectValuePrimitive>) {\n  return <SelectValuePrimitive {...props} />\n}\n\nfunction SelectTrigger({\n  className,\n  size = 'default',\n  children,\n  ...props\n}: Composed<typeof SelectTriggerPrimitive> & {\n  size?: 'sm' | 'default'\n}) {\n  return (\n    <SelectTriggerPrimitive\n      data-size={size}\n      className={cn(\n        \"flex h-10 w-full items-center justify-between gap-1.5 rounded-full border border-input bg-transparent px-4 py-2 text-base transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=sm]:h-8 data-[size=sm]:w-auto data-[size=sm]:px-3 data-[size=sm]:text-xs md:text-sm *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate *:data-[slot=select-value]:text-left [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n      <ChevronDownIcon\n        aria-hidden=\"true\"\n        className=\"pointer-events-none size-4 text-muted-foreground\"\n      />\n    </SelectTriggerPrimitive>\n  )\n}\n\nfunction SelectContent({\n  className,\n  align = 'start',\n  sideOffset = 4,\n  ...props\n}: WithClassName<typeof SelectContentPrimitive>) {\n  return (\n    <SelectContentPrimitive\n      align={align}\n      sideOffset={sideOffset}\n      className={cn(\n        'relative z-50 m-0 max-h-(--available-height) min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction SelectLabel({ className, ...props }: WithClassName<typeof SelectGroupLabel>) {\n  return (\n    <SelectGroupLabel\n      className={cn('px-1.5 py-1 text-xs text-muted-foreground', className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectItem({ className, children, ...props }: Composed<typeof SelectItemPrimitive>) {\n  return (\n    <SelectItemPrimitive\n      className={cn(\n        \"relative flex w-full cursor-default items-center gap-1.5 rounded-lg py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    >\n      <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n        <SelectItemIndicator>\n          <CheckIcon className=\"pointer-events-none\" />\n        </SelectItemIndicator>\n      </span>\n      <SelectItemText>{children}</SelectItemText>\n    </SelectItemPrimitive>\n  )\n}\n\nfunction SelectSeparator({ className, ...props }: WithClassName<typeof SelectSeparatorPrimitive>) {\n  return (\n    <SelectSeparatorPrimitive\n      className={cn('pointer-events-none -mx-1 my-1 h-px bg-border', className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectLabel,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}