{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "description": "Select dropdown for options.",
  "dependencies": ["@radix-ui/react-select", "lucide-react"],
  "registryDependencies": ["@glasswave/glass"],
  "files": [
    {
      "path": "registry/glasswave/ui/select.tsx",
      "content": "\"use client\";\n\nimport * as RadixSelect from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { focusRing, glass } from \"@/lib/glass\";\n\nexport const Select = RadixSelect.Root;\n\nexport const SelectTrigger = forwardRef<\n  HTMLButtonElement,\n  React.ComponentPropsWithoutRef<typeof RadixSelect.Trigger>\n>(({ className, children, ...props }, ref) => (\n  <RadixSelect.Trigger\n    ref={ref}\n    className={cn(\n      glass,\n      focusRing,\n      \"group text-left w-full px-4 py-2 rounded-full inline-flex items-center justify-between gap-2\",\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    <RadixSelect.Icon asChild>\n      <ChevronDown\n        className=\"size-4 shrink-0 opacity-60 transition-transform duration-200 group-data-[state=open]:rotate-180\"\n        aria-hidden\n      />\n    </RadixSelect.Icon>\n  </RadixSelect.Trigger>\n));\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport const SelectValue = RadixSelect.Value;\n\nconst SelectScrollUpButton = forwardRef<\n  HTMLDivElement,\n  React.ComponentPropsWithoutRef<typeof RadixSelect.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n  <RadixSelect.ScrollUpButton\n    ref={ref}\n    className={cn(\n      \"flex h-7 w-full shrink-0 cursor-default items-center justify-center border-b border-black/[0.08] dark:border-white/10 bg-black/[0.03] dark:bg-white/[0.04] text-current/70\",\n      \"[&[data-state=hidden]]:hidden\",\n      className,\n    )}\n    {...props}\n  >\n    <ChevronUp className=\"size-4\" aria-hidden />\n  </RadixSelect.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = RadixSelect.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = forwardRef<\n  HTMLDivElement,\n  React.ComponentPropsWithoutRef<typeof RadixSelect.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n  <RadixSelect.ScrollDownButton\n    ref={ref}\n    className={cn(\n      \"flex h-7 w-full shrink-0 cursor-default items-center justify-center border-t border-black/[0.08] dark:border-white/10 bg-black/[0.03] dark:bg-white/[0.04] text-current/70\",\n      \"[&[data-state=hidden]]:hidden\",\n      className,\n    )}\n    {...props}\n  >\n    <ChevronDown className=\"size-4\" aria-hidden />\n  </RadixSelect.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = RadixSelect.ScrollDownButton.displayName;\n\nexport const SelectContent = forwardRef<\n  HTMLDivElement,\n  React.ComponentPropsWithoutRef<typeof RadixSelect.Content>\n>(\n  (\n    {\n      className,\n      children,\n      position = \"popper\",\n      sideOffset = 6,\n      collisionPadding = 12,\n      ...props\n    },\n    ref,\n  ) => (\n    <RadixSelect.Portal>\n      <RadixSelect.Content\n        ref={ref}\n        position={position}\n        sideOffset={sideOffset}\n        collisionPadding={collisionPadding}\n        className={cn(\n          glass,\n          \"z-50 max-h-[min(320px,var(--radix-select-content-available-height))] overflow-hidden shadow-lg rounded-3xl\",\n          // ^^^^ rounded-3xl вместо rounded-full — форма сохраняется, но items не обрезаются\n          position === \"popper\" &&\n            \"min-w-[var(--radix-select-trigger-width)] will-change-[transform,opacity]\",\n          className,\n        )}\n        {...props}\n      >\n        <SelectScrollUpButton />\n        <RadixSelect.Viewport\n          className={cn(\n            \"py-2 px-2\", // ← px-2 добавлен, отступы от краёв\n            position === \"popper\" && \"w-full\",\n          )}\n        >\n          {children}\n        </RadixSelect.Viewport>\n        <SelectScrollDownButton />\n      </RadixSelect.Content>\n    </RadixSelect.Portal>\n  ),\n);\nSelectContent.displayName = \"SelectContent\";\n\nexport const SelectItem = forwardRef<\n  HTMLDivElement,\n  React.ComponentPropsWithoutRef<typeof RadixSelect.Item>\n>(({ className, children, ...props }, ref) => (\n  <RadixSelect.Item\n    ref={ref}\n    className={cn(\n      \"relative flex w-full cursor-default select-none items-center rounded-xl py-2 pl-3 pr-9 text-left text-sm outline-none\",\n      // ^^^^ rounded-xl — items аккуратно вписываются внутрь rounded-3xl контейнера\n      \"data-[disabled]:pointer-events-none data-[disabled]:opacity-40\",\n      \"data-[highlighted]:bg-white/15 data-[state=checked]:bg-white/20\",\n      className,\n    )}\n    {...props}\n  >\n    <RadixSelect.ItemText className=\"flex-1 truncate\">\n      {children}\n    </RadixSelect.ItemText>\n    <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n      <RadixSelect.ItemIndicator>\n        <Check className=\"size-4 opacity-90\" strokeWidth={2.5} aria-hidden />\n      </RadixSelect.ItemIndicator>\n    </span>\n  </RadixSelect.Item>\n));\nSelectItem.displayName = \"SelectItem\";\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
