@adea-ai/ui 0.70.2 → 0.71.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,6 +40,26 @@ The package includes source for Solid compilation and Tailwind discovery, and
40
40
  compiled JavaScript plus declarations for other supported consumers. License and
41
41
  donor notices travel in `dist/LICENSE` and `dist/NOTICE`.
42
42
 
43
+ ## Native select
44
+
45
+ Use `NativeSelect` for a compact list of known choices that should keep native
46
+ keyboard, form submission, option, and label behavior:
47
+
48
+ ```tsx
49
+ import { NativeSelect } from '@adea-ai/ui/components/ui/native-select'
50
+
51
+ <label for="relationship-kind">Relationship kind</label>
52
+ <NativeSelect id="relationship-kind" name="relationshipKind" value={kind()} onChange={handleChange}>
53
+ <option value="all">All relationships</option>
54
+ <option value="derived">Derived</option>
55
+ </NativeSelect>
56
+ ```
57
+
58
+ `NativeSelect` renders a real `<select>` and passes native props and children
59
+ through. Use `value` with `onChange` for a controlled selection, or `defaultValue`
60
+ to initialize an uncontrolled one. Use `Select` for searchable, runtime, or
61
+ longer lists that need a custom popover.
62
+
43
63
  Tailwind ignores dependency directories by default. Register the component
44
64
  directories your application uses in its stylesheet, relative to that stylesheet:
45
65
 
package/dist/NOTICE CHANGED
@@ -30,16 +30,18 @@ vocabulary carried in OKLCH. No KiroCrew source file is reproduced verbatim.
30
30
 
31
31
  ## Consumed libraries
32
32
 
33
- Components are built on the following upstream projects. They are consumed as
34
- dependencies, not copied:
33
+ Components are built on these upstream dependencies, which are consumed rather
34
+ than copied:
35
35
 
36
36
  Kobalte (@kobalte/core) MIT License
37
37
  corvu (@corvu/*) MIT License
38
- shadcn/ui MIT License
39
38
  SolidJS (solid-js) MIT License
40
39
  lucide (lucide-solid) ISC License
41
40
  Tailwind CSS MIT License
42
41
 
42
+ The shadcn/ui design vocabulary is used throughout the system. Its NativeSelect
43
+ source is translated in one component and separately attributed below.
44
+
43
45
  The component architecture — the folder-per-component layout, the registry
44
46
  build, and the convention of composing higher-level blocks on top of an
45
47
  unmodified primitive layer — follows patterns established by the
@@ -49,6 +51,38 @@ Origin UI / coss (AGPL-3.0-or-later) was consulted for visual ideas only. No
49
51
  code, class string, or asset from that project is reproduced here, because its
50
52
  licence is incompatible with this distribution.
51
53
 
54
+ ## NativeSelect translated from shadcn/ui
55
+
56
+ `packages/ui/src/components/ui/native-select/native-select.tsx` translates
57
+ shadcn/ui's native select wrapper from
58
+ `apps/v4/registry/new-york-v4/ui/native-select.tsx`, pinned at
59
+ `98a1fe67b439324ddc857f47fbdce056600a4329`. The Solid component preserves the
60
+ native `<select>` and its browser-owned form, option, value, and accessibility
61
+ behavior while adapting the wrapper, icon package, and classes to this design
62
+ system. The upstream component is distributed under MIT:
63
+
64
+ MIT License
65
+
66
+ Copyright (c) 2023 shadcn
67
+
68
+ Permission is hereby granted, free of charge, to any person obtaining a copy
69
+ of this software and associated documentation files (the "Software"), to deal
70
+ in the Software without restriction, including without limitation the rights
71
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72
+ copies of the Software, and to permit persons to whom the Software is
73
+ furnished to do so, subject to the following conditions:
74
+
75
+ The above copyright notice and this permission notice shall be included in all
76
+ copies or substantial portions of the Software.
77
+
78
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
84
+ SOFTWARE.
85
+
52
86
 
53
87
  ## Composer IME input ownership translated from KiroCrew
54
88
 
@@ -0,0 +1,3 @@
1
+ /** A themed wrapper around the browser's native `<select>` element. */
2
+ export { NativeSelect, type NativeSelectProps } from './native-select';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/native-select/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { NativeSelect } from "./native-select.js";
2
+ export { NativeSelect };
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps } from 'solid-js';
2
+ export type NativeSelectProps = ComponentProps<'select'> & {
3
+ /** Initialize an uncontrolled selection after its native options mount. */
4
+ defaultValue?: ComponentProps<'select'>['value'];
5
+ };
6
+ /**
7
+ * NativeSelect.
8
+ *
9
+ * A styled native `<select>` for compact, finite choices. Use `Select` when the
10
+ * list needs a custom popover, typed options, or runtime filtering; this keeps
11
+ * the browser's built-in keyboard, form, option, and label behavior.
12
+ *
13
+ * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and
14
+ * the Adea token system; see the root NOTICE for source and attribution.
15
+ */
16
+ export declare function NativeSelect(props: NativeSelectProps): import("solid-js").JSX.Element;
17
+ //# sourceMappingURL=native-select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/native-select/native-select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IACzD,2EAA2E;IAC3E,YAAY,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAA;CACjD,CAAA;AAkCD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,kCA0CpD"}
@@ -0,0 +1,66 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
3
+ import { ChevronDownIcon } from "lucide-solid";
4
+ import { createEffect, onMount, splitProps } from "solid-js";
5
+ //#region src/components/ui/native-select/native-select.tsx
6
+ var _tmpl$ = /*#__PURE__*/ template(`<span data-slot=native-select-wrapper class="relative inline-flex min-w-0"><select data-slot=native-select>`);
7
+ function setSelectedValue(select, value, multiple) {
8
+ if (value === void 0) return;
9
+ if (multiple && Array.isArray(value)) {
10
+ const selected = new Set(value.map(String));
11
+ for (const option of select.options) option.selected = selected.has(option.value);
12
+ return;
13
+ }
14
+ select.value = String(Array.isArray(value) ? value[0] ?? "" : value);
15
+ }
16
+ function initializeDefaultSelection(select, value, multiple) {
17
+ if (value === void 0) return;
18
+ const defaultValues = multiple && Array.isArray(value) ? new Set(value.map(String)) : /* @__PURE__ */ new Set([String(Array.isArray(value) ? value[0] ?? "" : value)]);
19
+ for (const option of select.options) option.defaultSelected = defaultValues.has(option.value);
20
+ setSelectedValue(select, value, multiple);
21
+ }
22
+ /**
23
+ * NativeSelect.
24
+ *
25
+ * A styled native `<select>` for compact, finite choices. Use `Select` when the
26
+ * list needs a custom popover, typed options, or runtime filtering; this keeps
27
+ * the browser's built-in keyboard, form, option, and label behavior.
28
+ *
29
+ * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and
30
+ * the Adea token system; see the root NOTICE for source and attribution.
31
+ */
32
+ function NativeSelect(props) {
33
+ const [local, rest] = splitProps(props, [
34
+ "class",
35
+ "children",
36
+ "defaultValue"
37
+ ]);
38
+ let select;
39
+ createEffect(() => {
40
+ if (!select) return;
41
+ setSelectedValue(select, rest.value, Boolean(rest.multiple));
42
+ });
43
+ onMount(() => {
44
+ if (select && rest.value === void 0) initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple));
45
+ });
46
+ return (() => {
47
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
48
+ use((element) => {
49
+ select = element;
50
+ }, _el$2);
51
+ spread(_el$2, mergeProps({ get ["class"]() {
52
+ return cn("h-control-md min-w-0 appearance-none rounded-md border border-input bg-transparent px-control-md pr-9 text-sm", "transition-[color,box-shadow,border-color] ease-out outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30", local.class);
53
+ } }, rest), false, true);
54
+ insert(_el$2, () => local.children);
55
+ insert(_el$, createComponent(ChevronDownIcon, {
56
+ "data-slot": "native-select-icon",
57
+ "aria-hidden": "true",
58
+ "class": "pointer-events-none absolute end-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
59
+ }), null);
60
+ return _el$;
61
+ })();
62
+ }
63
+ //#endregion
64
+ export { NativeSelect };
65
+
66
+ //# sourceMappingURL=native-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-select.js","names":["ChevronDownIcon","ComponentProps","createEffect","onMount","splitProps","cn","NativeSelectProps","defaultValue","setSelectedValue","select","HTMLSelectElement","value","multiple","undefined","Array","isArray","selected","Set","map","String","option","options","has","initializeDefaultSelection","defaultValues","defaultSelected","NativeSelect","props","local","rest","Boolean","_el$","_tmpl$","_el$2","firstChild","_$use","element","_$spread","_$mergeProps","class","_$insert","children","_$createComponent","_$mergeProps","_$createComponent"],"sources":["../../../../src/components/ui/native-select/native-select.tsx"],"sourcesContent":["import { ChevronDownIcon } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, onMount, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type NativeSelectProps = ComponentProps<'select'> & {\n /** Initialize an uncontrolled selection after its native options mount. */\n defaultValue?: ComponentProps<'select'>['value']\n}\n\nfunction setSelectedValue(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n if (multiple && Array.isArray(value)) {\n const selected = new Set(value.map(String))\n for (const option of select.options) option.selected = selected.has(option.value)\n return\n }\n\n select.value = String(Array.isArray(value) ? (value[0] ?? '') : value)\n}\n\nfunction initializeDefaultSelection(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n const defaultValues =\n multiple && Array.isArray(value)\n ? new Set(value.map(String))\n : new Set([String(Array.isArray(value) ? (value[0] ?? '') : value)])\n\n for (const option of select.options) option.defaultSelected = defaultValues.has(option.value)\n setSelectedValue(select, value, multiple)\n}\n\n/**\n * NativeSelect.\n *\n * A styled native `<select>` for compact, finite choices. Use `Select` when the\n * list needs a custom popover, typed options, or runtime filtering; this keeps\n * the browser's built-in keyboard, form, option, and label behavior.\n *\n * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and\n * the Adea token system; see the root NOTICE for source and attribution.\n */\nexport function NativeSelect(props: NativeSelectProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'defaultValue'])\n let select: HTMLSelectElement | undefined\n\n // Set selection after native options exist; setting select.value before its\n // children are mounted makes browsers fall back to the first option.\n createEffect(() => {\n if (!select) return\n setSelectedValue(select, rest.value, Boolean(rest.multiple))\n })\n onMount(() => {\n if (select && rest.value === undefined) {\n initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple))\n }\n })\n\n return (\n <span data-slot=\"native-select-wrapper\" class=\"relative inline-flex min-w-0\">\n <select\n ref={(element) => {\n select = element\n }}\n data-slot=\"native-select\"\n class={cn(\n 'h-control-md min-w-0 appearance-none rounded-md border border-input bg-transparent px-control-md pr-9 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </select>\n <ChevronDownIcon\n data-slot=\"native-select-icon\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute end-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\"\n />\n </span>\n )\n}\n"],"mappings":";;;;;;AAUA,SAASQ,iBACPC,QACAE,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,IAAID,YAAYE,MAAMC,QAAQJ,KAAK,GAAG;EACpC,MAAMK,WAAW,IAAIC,IAAIN,MAAMO,IAAIC,MAAM,CAAC;EAC1C,KAAK,MAAMC,UAAUX,OAAOY,SAASD,OAAOJ,WAAWA,SAASM,IAAIF,OAAOT,KAAK;EAChF;CACF;CAEAF,OAAOE,QAAQQ,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK;AACvE;AAEA,SAASY,2BACPd,QACAE,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,MAAMW,gBACJZ,YAAYE,MAAMC,QAAQJ,KAAK,IAC3B,IAAIM,IAAIN,MAAMO,IAAIC,MAAM,CAAC,oBACzB,IAAIF,IAAI,CAACE,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK,CAAC,CAAC;CAEvE,KAAK,MAAMS,UAAUX,OAAOY,SAASD,OAAOK,kBAAkBD,cAAcF,IAAIF,OAAOT,KAAK;CAC5FH,iBAAiBC,QAAQE,OAAOC,QAAQ;AAC1C;;;;;;;;;;;AAYA,SAAgBc,aAAaC,OAA0B;CACrD,MAAM,CAACC,OAAOC,QAAQzB,WAAWuB,OAAO;EAAC;EAAS;EAAY;CAAc,CAAC;CAC7E,IAAIlB;CAIJP,mBAAmB;EACjB,IAAI,CAACO,QAAQ;EACbD,iBAAiBC,QAAQoB,KAAKlB,OAAOmB,QAAQD,KAAKjB,QAAQ,CAAC;CAC7D,CAAC;CACDT,cAAc;EACZ,IAAIM,UAAUoB,KAAKlB,UAAUE,KAAAA,GAC3BU,2BAA2Bd,QAAQmB,MAAMrB,cAAcuB,QAAQD,KAAKjB,QAAQ,CAAC;CAEjF,CAAC;CAED,cAAA;EAAA,IAAAmB,OAAAC,OAAA,GAAAC,QAAAF,KAAAG;EAAAC,KAGYC,YAAY;GAChB3B,SAAS2B;EACX,GAACH,KAAA;EAAAI,OAAAJ,OAAAK,WAAA,EAAA,KAAA,WAAA;GAAA,OAEMjC,GACL,iHACA,oEACA,oFACA,4FACA,iGACAuB,MAAMW,KACR;EAAC,EAAA,GACGV,IAAI,GAAA,OAAA,IAAA;EAAAW,OAAAP,aAEPL,MAAMa,QAAQ;EAAAD,OAAAT,MAAAW,gBAEhB1C,iBAAe;GAAA,aAAA;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAA+B;CAAA,EAAA,CAAA;AAOtB"}
package/dist/index.d.ts CHANGED
@@ -56,6 +56,7 @@ export * from './components/ui/radio-group';
56
56
  export * from './components/ui/resizable';
57
57
  export * from './components/ui/scroll-area';
58
58
  export * from './components/ui/select';
59
+ export * from './components/ui/native-select';
59
60
  export * from './components/ui/separator';
60
61
  export * from './components/ui/sheet';
61
62
  export * from './components/ui/skeleton';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAA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EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -44,6 +44,7 @@ import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group/radio-gr
44
44
  import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./components/ui/resizable/resizable.js";
45
45
  import { ScrollArea } from "./components/ui/scroll-area/scroll-area.js";
46
46
  import { Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue } from "./components/ui/select/select.js";
47
+ import { NativeSelect } from "./components/ui/native-select/native-select.js";
47
48
  import { Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, sheetVariants } from "./components/ui/sheet/sheet.js";
48
49
  import { Skeleton } from "./components/ui/skeleton/skeleton.js";
49
50
  import { Slider } from "./components/ui/slider/slider.js";
@@ -95,4 +96,4 @@ import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/ver
95
96
  import { UpdateDialog } from "./components/composites/update-dialog/update-dialog.js";
96
97
  import { WorkspaceMark } from "./components/composites/workspace-mark/workspace-mark.js";
97
98
  import { keyedRows } from "./lib/keyed-rows.js";
98
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityIcon, Field, FieldDescription, FieldError, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, Skeleton, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeSplit, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, zIndexTokens };
99
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ComposerAttachmentButton, ComposerHint, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationAvatar, ConversationSurface, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityIcon, Field, FieldDescription, FieldError, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdGroup, Label, ListGroup, ListRow, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavSection, SidebarNavTitle, Skeleton, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, UpdateDialog, WorkspaceMark, accentPresets, alertVariants, allTokens, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createLayoutState, cva, defaultDarkThemeId, defaultLightThemeId, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, formatBytes, formatReleaseDate, formatToken, initialsFrom, inlineScriptLiteral, isPasteBlock, itemVariants, keyedRows, layoutDepth, listLeaves, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeLayout, parseDiff, plainTextFromMarkdown, pruneBlocks, radiusTokens, recollapsePastes, remapCarriedBlocks, resizeSplit, resolvedDensity, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, statusDotVariants, stripTrailingBlankLines, surfaceInteractive, swapPanes, themeById, themeCssVariables, themeFamilies, themeScript, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useSideRail, useTheme, validateTheme, validateThemeRegistry, zIndexTokens };
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "native-select",
3
+ "type": "registry:ui",
4
+ "title": "Native Select",
5
+ "description": "A themed wrapper around the browser's native `<select>` element.",
6
+ "dependencies": [
7
+ "lucide-solid@^1.48.0"
8
+ ],
9
+ "registryDependencies": [
10
+ "lib"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "src/components/ui/native-select/index.ts",
15
+ "type": "registry:ui",
16
+ "target": "components/ui/native-select/index.ts"
17
+ },
18
+ {
19
+ "path": "src/components/ui/native-select/native-select.tsx",
20
+ "type": "registry:ui",
21
+ "target": "components/ui/native-select/native-select.tsx"
22
+ }
23
+ ]
24
+ }
@@ -881,6 +881,30 @@
881
881
  }
882
882
  ]
883
883
  },
884
+ {
885
+ "name": "native-select",
886
+ "type": "registry:ui",
887
+ "title": "Native Select",
888
+ "description": "A themed wrapper around the browser's native `<select>` element.",
889
+ "dependencies": [
890
+ "lucide-solid@^1.48.0"
891
+ ],
892
+ "registryDependencies": [
893
+ "lib"
894
+ ],
895
+ "files": [
896
+ {
897
+ "path": "src/components/ui/native-select/index.ts",
898
+ "type": "registry:ui",
899
+ "target": "components/ui/native-select/index.ts"
900
+ },
901
+ {
902
+ "path": "src/components/ui/native-select/native-select.tsx",
903
+ "type": "registry:ui",
904
+ "target": "components/ui/native-select/native-select.tsx"
905
+ }
906
+ ]
907
+ },
884
908
  {
885
909
  "name": "navigation-menu",
886
910
  "type": "registry:ui",
@@ -0,0 +1,2 @@
1
+ /** A themed wrapper around the browser's native `<select>` element. */
2
+ export { NativeSelect, type NativeSelectProps } from './native-select'
@@ -0,0 +1,95 @@
1
+ import { ChevronDownIcon } from 'lucide-solid'
2
+ import type { ComponentProps } from 'solid-js'
3
+ import { createEffect, onMount, splitProps } from 'solid-js'
4
+ import { cn } from '../../../lib/utils'
5
+
6
+ export type NativeSelectProps = ComponentProps<'select'> & {
7
+ /** Initialize an uncontrolled selection after its native options mount. */
8
+ defaultValue?: ComponentProps<'select'>['value']
9
+ }
10
+
11
+ function setSelectedValue(
12
+ select: HTMLSelectElement,
13
+ value: ComponentProps<'select'>['value'],
14
+ multiple: boolean
15
+ ) {
16
+ if (value === undefined) return
17
+
18
+ if (multiple && Array.isArray(value)) {
19
+ const selected = new Set(value.map(String))
20
+ for (const option of select.options) option.selected = selected.has(option.value)
21
+ return
22
+ }
23
+
24
+ select.value = String(Array.isArray(value) ? (value[0] ?? '') : value)
25
+ }
26
+
27
+ function initializeDefaultSelection(
28
+ select: HTMLSelectElement,
29
+ value: ComponentProps<'select'>['value'],
30
+ multiple: boolean
31
+ ) {
32
+ if (value === undefined) return
33
+
34
+ const defaultValues =
35
+ multiple && Array.isArray(value)
36
+ ? new Set(value.map(String))
37
+ : new Set([String(Array.isArray(value) ? (value[0] ?? '') : value)])
38
+
39
+ for (const option of select.options) option.defaultSelected = defaultValues.has(option.value)
40
+ setSelectedValue(select, value, multiple)
41
+ }
42
+
43
+ /**
44
+ * NativeSelect.
45
+ *
46
+ * A styled native `<select>` for compact, finite choices. Use `Select` when the
47
+ * list needs a custom popover, typed options, or runtime filtering; this keeps
48
+ * the browser's built-in keyboard, form, option, and label behavior.
49
+ *
50
+ * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and
51
+ * the Adea token system; see the root NOTICE for source and attribution.
52
+ */
53
+ export function NativeSelect(props: NativeSelectProps) {
54
+ const [local, rest] = splitProps(props, ['class', 'children', 'defaultValue'])
55
+ let select: HTMLSelectElement | undefined
56
+
57
+ // Set selection after native options exist; setting select.value before its
58
+ // children are mounted makes browsers fall back to the first option.
59
+ createEffect(() => {
60
+ if (!select) return
61
+ setSelectedValue(select, rest.value, Boolean(rest.multiple))
62
+ })
63
+ onMount(() => {
64
+ if (select && rest.value === undefined) {
65
+ initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple))
66
+ }
67
+ })
68
+
69
+ return (
70
+ <span data-slot="native-select-wrapper" class="relative inline-flex min-w-0">
71
+ <select
72
+ ref={(element) => {
73
+ select = element
74
+ }}
75
+ data-slot="native-select"
76
+ class={cn(
77
+ 'h-control-md min-w-0 appearance-none rounded-md border border-input bg-transparent px-control-md pr-9 text-sm',
78
+ 'transition-[color,box-shadow,border-color] ease-out outline-none',
79
+ 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',
80
+ 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
81
+ 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',
82
+ local.class
83
+ )}
84
+ {...rest}
85
+ >
86
+ {local.children}
87
+ </select>
88
+ <ChevronDownIcon
89
+ data-slot="native-select-icon"
90
+ aria-hidden="true"
91
+ class="pointer-events-none absolute end-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
92
+ />
93
+ </span>
94
+ )
95
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.70.2",
3
+ "version": "0.71.1",
4
4
  "description": "The Adea design system: Kobalte-backed Solid components, semantic OKLCH tokens, and the app-shell layout primitives shared by Adea and Cortana.",
5
5
  "keywords": [
6
6
  "adea",
@@ -102,6 +102,7 @@
102
102
  "check:packed-transcript": "bun scripts/check-packed-transcript.ts",
103
103
  "check:packed-layout-renderer": "bun scripts/check-packed-layout-renderer.ts",
104
104
  "check:packed-appearance": "bun scripts/check-packed-appearance.ts",
105
+ "check:packed-native-select": "bun scripts/check-packed-native-select.ts",
105
106
  "check:packed-paste-model": "node scripts/check-packed-paste-model.mjs"
106
107
  },
107
108
  "dependencies": {
package/registry.json CHANGED
@@ -881,6 +881,30 @@
881
881
  }
882
882
  ]
883
883
  },
884
+ {
885
+ "name": "native-select",
886
+ "type": "registry:ui",
887
+ "title": "Native Select",
888
+ "description": "A themed wrapper around the browser's native `<select>` element.",
889
+ "dependencies": [
890
+ "lucide-solid@^1.48.0"
891
+ ],
892
+ "registryDependencies": [
893
+ "lib"
894
+ ],
895
+ "files": [
896
+ {
897
+ "path": "src/components/ui/native-select/index.ts",
898
+ "type": "registry:ui",
899
+ "target": "components/ui/native-select/index.ts"
900
+ },
901
+ {
902
+ "path": "src/components/ui/native-select/native-select.tsx",
903
+ "type": "registry:ui",
904
+ "target": "components/ui/native-select/native-select.tsx"
905
+ }
906
+ ]
907
+ },
884
908
  {
885
909
  "name": "navigation-menu",
886
910
  "type": "registry:ui",
@@ -0,0 +1,2 @@
1
+ /** A themed wrapper around the browser's native `<select>` element. */
2
+ export { NativeSelect, type NativeSelectProps } from './native-select'
@@ -0,0 +1,95 @@
1
+ import { ChevronDownIcon } from 'lucide-solid'
2
+ import type { ComponentProps } from 'solid-js'
3
+ import { createEffect, onMount, splitProps } from 'solid-js'
4
+ import { cn } from '#lib/utils'
5
+
6
+ export type NativeSelectProps = ComponentProps<'select'> & {
7
+ /** Initialize an uncontrolled selection after its native options mount. */
8
+ defaultValue?: ComponentProps<'select'>['value']
9
+ }
10
+
11
+ function setSelectedValue(
12
+ select: HTMLSelectElement,
13
+ value: ComponentProps<'select'>['value'],
14
+ multiple: boolean
15
+ ) {
16
+ if (value === undefined) return
17
+
18
+ if (multiple && Array.isArray(value)) {
19
+ const selected = new Set(value.map(String))
20
+ for (const option of select.options) option.selected = selected.has(option.value)
21
+ return
22
+ }
23
+
24
+ select.value = String(Array.isArray(value) ? (value[0] ?? '') : value)
25
+ }
26
+
27
+ function initializeDefaultSelection(
28
+ select: HTMLSelectElement,
29
+ value: ComponentProps<'select'>['value'],
30
+ multiple: boolean
31
+ ) {
32
+ if (value === undefined) return
33
+
34
+ const defaultValues =
35
+ multiple && Array.isArray(value)
36
+ ? new Set(value.map(String))
37
+ : new Set([String(Array.isArray(value) ? (value[0] ?? '') : value)])
38
+
39
+ for (const option of select.options) option.defaultSelected = defaultValues.has(option.value)
40
+ setSelectedValue(select, value, multiple)
41
+ }
42
+
43
+ /**
44
+ * NativeSelect.
45
+ *
46
+ * A styled native `<select>` for compact, finite choices. Use `Select` when the
47
+ * list needs a custom popover, typed options, or runtime filtering; this keeps
48
+ * the browser's built-in keyboard, form, option, and label behavior.
49
+ *
50
+ * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and
51
+ * the Adea token system; see the root NOTICE for source and attribution.
52
+ */
53
+ export function NativeSelect(props: NativeSelectProps) {
54
+ const [local, rest] = splitProps(props, ['class', 'children', 'defaultValue'])
55
+ let select: HTMLSelectElement | undefined
56
+
57
+ // Set selection after native options exist; setting select.value before its
58
+ // children are mounted makes browsers fall back to the first option.
59
+ createEffect(() => {
60
+ if (!select) return
61
+ setSelectedValue(select, rest.value, Boolean(rest.multiple))
62
+ })
63
+ onMount(() => {
64
+ if (select && rest.value === undefined) {
65
+ initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple))
66
+ }
67
+ })
68
+
69
+ return (
70
+ <span data-slot="native-select-wrapper" class="relative inline-flex min-w-0">
71
+ <select
72
+ ref={(element) => {
73
+ select = element
74
+ }}
75
+ data-slot="native-select"
76
+ class={cn(
77
+ 'h-control-md min-w-0 appearance-none rounded-md border border-input bg-transparent px-control-md pr-9 text-sm',
78
+ 'transition-[color,box-shadow,border-color] ease-out outline-none',
79
+ 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',
80
+ 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
81
+ 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',
82
+ local.class
83
+ )}
84
+ {...rest}
85
+ >
86
+ {local.children}
87
+ </select>
88
+ <ChevronDownIcon
89
+ data-slot="native-select-icon"
90
+ aria-hidden="true"
91
+ class="pointer-events-none absolute end-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
92
+ />
93
+ </span>
94
+ )
95
+ }
package/src/index.ts CHANGED
@@ -58,6 +58,7 @@ export * from './components/ui/radio-group'
58
58
  export * from './components/ui/resizable'
59
59
  export * from './components/ui/scroll-area'
60
60
  export * from './components/ui/select'
61
+ export * from './components/ui/native-select'
61
62
  export * from './components/ui/separator'
62
63
  export * from './components/ui/sheet'
63
64
  export * from './components/ui/skeleton'