{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "native-select",
  "type": "registry:ui",
  "title": "Native Select",
  "description": "Lightweight native select with a chevron overlay — zero-JS dropdown for simple option lists.",
  "dependencies": [
    "@saasflare/ui"
  ],
  "files": [
    {
      "path": "components/ui/native-select.tsx",
      "type": "registry:ui",
      "content": "// @toreview\n/**\n * @fileoverview NativeSelect primitive — styled wrapper around the native HTML select\n * element with chevron icon overlay. Supports default and small sizes with consistent\n * focus and error styling. Part of the Saasflare base component layer.\n * @module packages/ui/components/ui/native-select\n * @layer core\n *\n * @component\n * @example\n * import { NativeSelect, NativeSelectOption } from '@saasflare/ui';\n * <NativeSelect>\n *   <NativeSelectOption value=\"a\">Option A</NativeSelectOption>\n *   <NativeSelectOption value=\"b\">Option B</NativeSelectOption>\n * </NativeSelect>\n */\nimport * as React from \"react\"\nimport { CaretDownIcon } from \"@saasflare/ui\"\n\nimport { cn } from \"@saasflare/ui\"\nimport { useSaasflareProps, type SaasflareComponentProps } from \"@saasflare/ui\"\n\n/**\n * Props for {@link NativeSelect}.\n *\n * Extends the native `<select>` props with {@link SaasflareComponentProps}.\n * The HTML `size` attribute is omitted — `size` is repurposed as the visual\n * height variant.\n */\ninterface NativeSelectProps\n  extends Omit<React.ComponentProps<\"select\">, \"size\" | keyof SaasflareComponentProps>,\n    SaasflareComponentProps {\n  /** Control height. `\"sm\"` renders a more compact trigger; `\"md\"` is the standard height. (`\"default\"` is a deprecated alias for `\"md\"`.) */\n  size?: \"sm\" | \"md\" | \"default\"\n}\n\n/**\n * Styled native `<select>` with a chevron icon overlay. Uses the platform\n * picker UI — prefer it over the custom Select when native behavior (mobile\n * pickers, plain form submission) matters more than custom-rendered options.\n *\n * @component\n * @layer core\n *\n * @example\n * <NativeSelect>\n *   <NativeSelectOption value=\"a\">Option A</NativeSelectOption>\n *   <NativeSelectOption value=\"b\">Option B</NativeSelectOption>\n * </NativeSelect>\n */\nfunction NativeSelect({\n  className,\n  size = \"md\",\n  surface,\n  radius,\n  animated,\n  iconWeight,\n  ...props\n}: NativeSelectProps) {\n  const sf = useSaasflareProps({ surface, radius, animated, iconWeight })\n  const resolvedSize = size === \"default\" ? \"md\" : size\n\n  return (\n    <div\n      className=\"group/native-select relative w-fit has-[select:disabled]:opacity-50\"\n      data-slot=\"native-select-wrapper\"\n    >\n      <select\n        {...props}\n        data-slot=\"native-select\"\n        data-size={resolvedSize}\n        data-surface={sf.surface}\n        data-radius={sf.radius}\n        data-animated={String(sf.animated)}\n        className={cn(\n          \"h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50\",\n          \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n          \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n          className\n        )}\n      />\n      <CaretDownIcon\n        weight={sf.iconWeight}\n        className=\"pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none\"\n        aria-hidden=\"true\"\n        data-slot=\"native-select-icon\"\n      />\n    </div>\n  )\n}\n\n/**\n * A single option within a {@link NativeSelect}. Thin wrapper around the native\n * `<option>` element that adds a `data-slot` for styling hooks.\n *\n * @example\n * <NativeSelectOption value=\"a\">Option A</NativeSelectOption>\n */\nfunction NativeSelectOption({ ...props }: React.ComponentProps<\"option\">) {\n  return <option data-slot=\"native-select-option\" {...props} />\n}\n\n/**\n * Groups related {@link NativeSelectOption}s under a label within a\n * {@link NativeSelect}. Thin wrapper around the native `<optgroup>` element.\n *\n * @example\n * <NativeSelectOptGroup label=\"Group\">\n *   <NativeSelectOption value=\"a\">Option A</NativeSelectOption>\n * </NativeSelectOptGroup>\n */\nfunction NativeSelectOptGroup({\n  className,\n  ...props\n}: React.ComponentProps<\"optgroup\">) {\n  return (\n    <optgroup\n      data-slot=\"native-select-optgroup\"\n      className={cn(className)}\n      {...props}\n    />\n  )\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption, type NativeSelectProps }\n",
      "target": "components/ui/native-select.tsx"
    }
  ],
  "$meta": {
    "source": "https://ui.saasflare.io/r/native-select.json"
  }
}
