{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "description": "shadcn select as a Win95 combo box that drops a menu with no animation.",
  "dependencies": [
    "cn",
    "radix-ui"
  ],
  "registryDependencies": [
    "@ui95/theme",
    "@ui95/pixel-glyphs"
  ],
  "files": [
    {
      "path": "components/ui/select.tsx",
      "content": "\"use client\"\n\nimport { cn } from \"cn\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { ArrowGlyph, CheckGlyph } from \"@/components/ui/pixel-glyphs\"\n\nfunction Select({\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n  return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n  return (\n    <SelectPrimitive.Group\n      data-slot=\"select-group\"\n      className={cn(\"scroll-my-1\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction SelectValue({\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n  return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n  className,\n  size = \"default\",\n  children,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n  size?: \"sm\" | \"default\"\n}) {\n  return (\n    <SelectPrimitive.Trigger\n      data-slot=\"select-trigger\"\n      data-size={size}\n      className={cn(\n        \"group/select-trigger flex w-fit min-w-40 items-stretch justify-between gap-2 pixel-border border-border well bg-input text-foreground pl-2 text-xl leading-none whitespace-nowrap select-none disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground aria-invalid:border-dashed aria-invalid:border-destructive data-placeholder:text-well-muted data-[size=default]:h-10 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:self-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n      <SelectPrimitive.Icon asChild>\n        <span className=\"flex aspect-square items-center justify-center border-l-(length:--pixel) border-border bg-secondary text-secondary-foreground bevel-raised offset-shadow-none group-disabled/select-trigger:text-muted-foreground group-data-[state=open]/select-trigger:bevel-sunken\">\n          <ArrowGlyph />\n        </span>\n      </SelectPrimitive.Icon>\n    </SelectPrimitive.Trigger>\n  )\n}\n\nfunction SelectContent({\n  className,\n  children,\n  position = \"popper\",\n  align = \"start\",\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n  return (\n    <SelectPrimitive.Portal>\n      <SelectPrimitive.Content\n        data-slot=\"select-content\"\n        data-align-trigger={position === \"item-aligned\"}\n        className={cn(\n          \"relative z-50 max-h-(--radix-select-content-available-height) min-w-36 overflow-x-hidden overflow-y-auto pixel-border border-border bg-popover p-(--pixel) text-popover-foreground offset-shadow-2\",\n          className\n        )}\n        position={position}\n        align={align}\n        {...props}\n      >\n        <SelectScrollUpButton />\n        <SelectPrimitive.Viewport\n          data-position={position}\n          className=\"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\"\n        >\n          {children}\n        </SelectPrimitive.Viewport>\n        <SelectScrollDownButton />\n      </SelectPrimitive.Content>\n    </SelectPrimitive.Portal>\n  )\n}\n\nfunction SelectLabel({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n  return (\n    <SelectPrimitive.Label\n      data-slot=\"select-label\"\n      className={cn(\n        \"px-2 pt-2 pb-1 font-pixel text-sm leading-none text-muted-foreground uppercase\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction SelectItem({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n  return (\n    <SelectPrimitive.Item\n      data-slot=\"select-item\"\n      className={cn(\n        \"relative flex h-8 w-full items-center gap-2 pr-2 pl-7 text-xl leading-none outline-hidden select-none focus:bg-foreground focus:text-popover data-disabled:pointer-events-none data-disabled:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n        className\n      )}\n      {...props}\n    >\n      <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n        <SelectPrimitive.ItemIndicator>\n          <CheckGlyph />\n        </SelectPrimitive.ItemIndicator>\n      </span>\n      <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n    </SelectPrimitive.Item>\n  )\n}\n\nfunction SelectSeparator({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n  return (\n    <SelectPrimitive.Separator\n      data-slot=\"select-separator\"\n      className={cn(\n        \"pointer-events-none mx-1 my-1 border-t-(length:--pixel) border-b-(length:--pixel) border-t-bevel-lo border-b-bevel-hi\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction SelectScrollUpButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n  return (\n    <SelectPrimitive.ScrollUpButton\n      data-slot=\"select-scroll-up-button\"\n      className={cn(\n        \"z-10 flex h-6 items-center justify-center bg-popover\",\n        className\n      )}\n      {...props}\n    >\n      <ArrowGlyph direction=\"up\" />\n    </SelectPrimitive.ScrollUpButton>\n  )\n}\n\nfunction SelectScrollDownButton({\n  className,\n  ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n  return (\n    <SelectPrimitive.ScrollDownButton\n      data-slot=\"select-scroll-down-button\"\n      className={cn(\n        \"z-10 flex h-6 items-center justify-center bg-popover\",\n        className\n      )}\n      {...props}\n    >\n      <ArrowGlyph />\n    </SelectPrimitive.ScrollDownButton>\n  )\n}\n\nexport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectLabel,\n  SelectScrollDownButton,\n  SelectScrollUpButton,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n}\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "sounds": {
      "button.press": {
        "note": "Tactile switch: bandpassed noise bump plus a square click",
        "layers": [
          {
            "wave": "noise",
            "frequency": 0,
            "attack": 0.0003,
            "decay": 0.006,
            "gain": 0.6,
            "filter": {
              "type": "bandpass",
              "frequency": 3500,
              "q": 2
            }
          },
          {
            "wave": "square",
            "frequency": 2200,
            "attack": 0.0005,
            "decay": 0.005,
            "gain": 0.15
          }
        ],
        "jitter": {
          "cents": 100,
          "gainDb": 6,
          "decay": 0.12
        }
      },
      "button.release": {
        "note": "Lighter, higher tactile click",
        "layers": [
          {
            "wave": "noise",
            "frequency": 0,
            "attack": 0.0003,
            "decay": 0.004,
            "gain": 0.35,
            "filter": {
              "type": "bandpass",
              "frequency": 4200,
              "q": 2
            }
          },
          {
            "wave": "square",
            "frequency": 2600,
            "attack": 0.0005,
            "decay": 0.004,
            "gain": 0.08
          }
        ],
        "jitter": {
          "cents": 91,
          "gainDb": 1.5,
          "decay": 0.12
        }
      },
      "menu.select": {
        "note": "Light tactile on release, like letting go of a menu",
        "layers": [
          {
            "wave": "noise",
            "frequency": 0,
            "attack": 0.0003,
            "decay": 0.0035,
            "gain": 0.35,
            "filter": {
              "type": "bandpass",
              "frequency": 4500,
              "q": 2
            },
            "delay": 0
          },
          {
            "wave": "square",
            "frequency": 2210,
            "attack": 0.0003,
            "decay": 0.003,
            "gain": 0.1
          }
        ],
        "gain": 1.29,
        "crush": {}
      }
    }
  },
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
