@uselets/ui 0.1.1 → 0.3.0

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.
Files changed (59) hide show
  1. package/README.md +136 -0
  2. package/dist/components/alert.js +1 -1
  3. package/dist/components/alert.js.map +1 -1
  4. package/dist/components/avatar.d.ts +4 -4
  5. package/dist/components/avatar.js +1 -1
  6. package/dist/components/avatar.js.map +1 -1
  7. package/dist/components/button.d.ts +5 -2
  8. package/dist/components/button.js +1 -1
  9. package/dist/components/button.js.map +1 -1
  10. package/dist/components/card.js +1 -1
  11. package/dist/components/card.js.map +1 -1
  12. package/dist/components/checkbox.d.ts +20 -0
  13. package/dist/components/checkbox.js +2 -0
  14. package/dist/components/checkbox.js.map +1 -0
  15. package/dist/components/dialog.d.ts +17 -9
  16. package/dist/components/dialog.js +1 -1
  17. package/dist/components/dialog.js.map +1 -1
  18. package/dist/components/drawer.js +1 -1
  19. package/dist/components/drawer.js.map +1 -1
  20. package/dist/components/dropdown-menu.d.ts +101 -0
  21. package/dist/components/dropdown-menu.js +2 -0
  22. package/dist/components/dropdown-menu.js.map +1 -0
  23. package/dist/components/field.js +1 -1
  24. package/dist/components/field.js.map +1 -1
  25. package/dist/components/input-otp.js +1 -1
  26. package/dist/components/input-otp.js.map +1 -1
  27. package/dist/components/input.js +1 -1
  28. package/dist/components/input.js.map +1 -1
  29. package/dist/components/kbd.d.ts +6 -3
  30. package/dist/components/kbd.js.map +1 -1
  31. package/dist/components/label.d.ts +2 -1
  32. package/dist/components/label.js +1 -1
  33. package/dist/components/label.js.map +1 -1
  34. package/dist/components/native-select.js +1 -1
  35. package/dist/components/native-select.js.map +1 -1
  36. package/dist/components/popover.d.ts +43 -0
  37. package/dist/components/popover.js +2 -0
  38. package/dist/components/popover.js.map +1 -0
  39. package/dist/components/select.d.ts +15 -17
  40. package/dist/components/select.js +1 -1
  41. package/dist/components/select.js.map +1 -1
  42. package/dist/components/separator.d.ts +4 -2
  43. package/dist/components/separator.js +1 -1
  44. package/dist/components/separator.js.map +1 -1
  45. package/dist/components/sonner.js.map +1 -1
  46. package/dist/components/spinner.d.ts +10 -2
  47. package/dist/components/spinner.js +1 -1
  48. package/dist/components/spinner.js.map +1 -1
  49. package/dist/components/theme.d.ts +28 -0
  50. package/dist/components/theme.js +2 -0
  51. package/dist/components/theme.js.map +1 -0
  52. package/dist/components/tooltip.d.ts +29 -0
  53. package/dist/components/tooltip.js +2 -0
  54. package/dist/components/tooltip.js.map +1 -0
  55. package/dist/index.d.ts +24 -0
  56. package/dist/index.js +1 -0
  57. package/dist/styles.css +1 -1
  58. package/dist/styles.css.map +1 -1
  59. package/package.json +18 -8
@@ -0,0 +1,101 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { DropdownMenu as DropdownMenu$1 } from "radix-ui";
4
+ import * as React from "react";
5
+
6
+ //#region src/components/dropdown-menu.d.ts
7
+ type DropdownMenuProps = React.ComponentProps<typeof DropdownMenu$1.Root>;
8
+ type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenu$1.Portal>;
9
+ type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenu$1.Trigger>;
10
+ type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenu$1.Content>;
11
+ type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenu$1.Group>;
12
+ type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenu$1.Label> & {
13
+ inset?: boolean;
14
+ };
15
+ type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenu$1.Item> & {
16
+ inset?: boolean;
17
+ variant?: 'default' | 'destructive';
18
+ };
19
+ type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenu$1.Sub>;
20
+ type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
21
+ inset?: boolean;
22
+ };
23
+ type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenu$1.SubContent>;
24
+ type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenu$1.CheckboxItem> & {
25
+ inset?: boolean;
26
+ };
27
+ type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenu$1.RadioGroup>;
28
+ type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenu$1.RadioItem> & {
29
+ inset?: boolean;
30
+ };
31
+ type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenu$1.Separator>;
32
+ type DropdownMenuShortcutProps = React.ComponentProps<'span'>;
33
+ declare function DropdownMenu({
34
+ ...props
35
+ }: DropdownMenuProps): react_jsx_runtime0.JSX.Element;
36
+ declare function DropdownMenuPortal({
37
+ ...props
38
+ }: DropdownMenuPortalProps): react_jsx_runtime0.JSX.Element;
39
+ declare function DropdownMenuTrigger({
40
+ ...props
41
+ }: DropdownMenuTriggerProps): react_jsx_runtime0.JSX.Element;
42
+ declare function DropdownMenuContent({
43
+ className,
44
+ align,
45
+ sideOffset,
46
+ ...props
47
+ }: DropdownMenuContentProps): react_jsx_runtime0.JSX.Element;
48
+ declare function DropdownMenuGroup({
49
+ ...props
50
+ }: DropdownMenuGroupProps): react_jsx_runtime0.JSX.Element;
51
+ declare function DropdownMenuItem({
52
+ className,
53
+ inset,
54
+ variant,
55
+ ...props
56
+ }: DropdownMenuItemProps): react_jsx_runtime0.JSX.Element;
57
+ declare function DropdownMenuCheckboxItem({
58
+ className,
59
+ children,
60
+ checked,
61
+ inset,
62
+ ...props
63
+ }: DropdownMenuCheckboxItemProps): react_jsx_runtime0.JSX.Element;
64
+ declare function DropdownMenuRadioGroup({
65
+ ...props
66
+ }: DropdownMenuRadioGroupProps): react_jsx_runtime0.JSX.Element;
67
+ declare function DropdownMenuRadioItem({
68
+ className,
69
+ children,
70
+ inset,
71
+ ...props
72
+ }: DropdownMenuRadioItemProps): react_jsx_runtime0.JSX.Element;
73
+ declare function DropdownMenuLabel({
74
+ className,
75
+ inset,
76
+ ...props
77
+ }: DropdownMenuLabelProps): react_jsx_runtime0.JSX.Element;
78
+ declare function DropdownMenuSeparator({
79
+ className,
80
+ ...props
81
+ }: DropdownMenuSeparatorProps): react_jsx_runtime0.JSX.Element;
82
+ declare function DropdownMenuShortcut({
83
+ className,
84
+ ...props
85
+ }: DropdownMenuShortcutProps): react_jsx_runtime0.JSX.Element;
86
+ declare function DropdownMenuSub({
87
+ ...props
88
+ }: DropdownMenuSubProps): react_jsx_runtime0.JSX.Element;
89
+ declare function DropdownMenuSubTrigger({
90
+ className,
91
+ inset,
92
+ children,
93
+ ...props
94
+ }: DropdownMenuSubTriggerProps): react_jsx_runtime0.JSX.Element;
95
+ declare function DropdownMenuSubContent({
96
+ className,
97
+ ...props
98
+ }: DropdownMenuSubContentProps): react_jsx_runtime0.JSX.Element;
99
+ //#endregion
100
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuPortalProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps };
101
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{DropdownMenu as i}from"radix-ui";import{IconCheck as a,IconChevronRight as o}from"@tabler/icons-react";function DropdownMenu({...e}){return n(i.Root,{"data-slot":`dropdown-menu`,...e})}function DropdownMenuPortal({...e}){return n(i.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function DropdownMenuTrigger({...e}){return n(i.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function DropdownMenuContent({className:e,align:r=`start`,sideOffset:a=4,...o}){return n(i.Portal,{children:n(i.Content,{"data-slot":`dropdown-menu-content`,sideOffset:a,align:r,className:t(`bg-popover text-popover-foreground ring-foreground/10 z-50 min-w-32 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) rounded-lg p-1 shadow-md ring-1 duration-100 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`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-[state=closed]:overflow-hidden`,e),...o})})}function DropdownMenuGroup({...e}){return n(i.Group,{"data-slot":`dropdown-menu-group`,...e})}function DropdownMenuItem({className:e,inset:r,variant:a=`default`,...o}){return n(i.Item,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":a,className:t(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 outline-hidden select-none`,`data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,e),...o})}function DropdownMenuCheckboxItem({className:e,children:o,checked:s,inset:c,...l}){return r(i.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":c,className:t(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 outline-hidden select-none`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:s,...l,children:[n(`span`,{className:`absolute right-2 flex items-center justify-center pointer-events-none`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:n(i.ItemIndicator,{children:n(a,{})})}),o]})}function DropdownMenuRadioGroup({...e}){return n(i.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function DropdownMenuRadioItem({className:e,children:o,inset:s,...c}){return r(i.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":s,className:t(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground`,`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 outline-hidden select-none`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,e),...c,children:[n(`span`,{className:`absolute right-2 flex items-center justify-center pointer-events-none`,"data-slot":`dropdown-menu-radio-item-indicator`,children:n(i.ItemIndicator,{children:n(a,{})})}),o]})}function DropdownMenuLabel({className:e,inset:r,...a}){return n(i.Label,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:t(`text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7`,e),...a})}function DropdownMenuSeparator({className:e,...r}){return n(i.Separator,{"data-slot":`dropdown-menu-separator`,className:t(`bg-border -mx-1 my-1 h-px`,e),...r})}function DropdownMenuShortcut({className:e,...r}){return n(`span`,{"data-slot":`dropdown-menu-shortcut`,className:t(`text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest`,e),...r})}function DropdownMenuSub({...e}){return n(i.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function DropdownMenuSubTrigger({className:e,inset:a,children:s,...c}){return r(i.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:t(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground`,`not-data-[variant=destructive]:focus:**:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 outline-hidden select-none`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...c,children:[s,n(o,{className:`ml-auto`})]})}function DropdownMenuSubContent({className:e,...r}){return n(i.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:t(`bg-popover text-popover-foreground ring-foreground/10 z-50 min-w-24 rounded-lg p-1 shadow-lg ring-1 duration-100 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`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`,e),...r})}export{DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger};
2
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.js","names":["DropdownMenuPrimitive"],"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronRight } from '@tabler/icons-react'\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenuPrimitive.Portal>\n\nexport type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.Content>\n\nexport type DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.Group>\n\nexport type DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}\n\nexport type DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenuPrimitive.Sub>\n\nexport type DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>\n\nexport type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {\n inset?: boolean\n}\n\nexport type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenuPrimitive.Separator>\n\nexport type DropdownMenuShortcutProps = React.ComponentProps<'span'>\n\nfunction DropdownMenu({ ...props }: DropdownMenuProps) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: DropdownMenuPortalProps) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({ className, align = 'start', sideOffset = 4, ...props }: DropdownMenuContentProps) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n align={align}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 z-50 min-w-32 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) rounded-lg p-1 shadow-md ring-1 duration-100 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n 'data-[state=closed]:overflow-hidden',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: DropdownMenuGroupProps) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuItem({ className, inset, variant = 'default', ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 outline-hidden select-none',\n 'data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 outline-hidden select-none',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"absolute right-2 flex items-center justify-center pointer-events-none\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\nfunction DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground',\n 'relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 outline-hidden select-none',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span\n className=\"absolute right-2 flex items-center justify-center pointer-events-none\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({ ...props }: DropdownMenuSubProps) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground',\n 'not-data-[variant=destructive]:focus:**:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 outline-hidden select-none',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 z-50 min-w-24 rounded-lg p-1 shadow-lg ring-1 duration-100 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger\n}\n"],"mappings":"8OAgDA,SAAS,aAAa,CAAE,GAAG,GAA4B,CACrD,OAAO,EAACA,EAAsB,KAAA,CAAK,YAAU,gBAAgB,GAAI,GAAS,CAG5E,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAsB,OAAA,CAAO,YAAU,uBAAuB,GAAI,GAAS,CAGrF,SAAS,oBAAoB,CAAE,GAAG,GAAmC,CACnE,OAAO,EAACA,EAAsB,QAAA,CAAQ,YAAU,wBAAwB,GAAI,GAAS,CAGvF,SAAS,oBAAoB,CAAE,YAAW,QAAQ,QAAS,aAAa,EAAG,GAAG,GAAmC,CAC/G,OACE,EAACA,EAAsB,OAAA,CAAA,SACrB,EAACA,EAAsB,QAAA,CACrB,YAAU,wBACE,aACL,QACP,UAAW,EACT,4SACA,uIACA,8JACA,sCACA,EACD,CACD,GAAI,GACJ,CAAA,CAC2B,CAInC,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OAAO,EAACA,EAAsB,MAAA,CAAM,YAAU,sBAAsB,GAAI,GAAS,CAGnF,SAAS,iBAAiB,CAAE,YAAW,QAAO,UAAU,UAAW,GAAG,GAAgC,CACpG,OACE,EAACA,EAAsB,KAAA,CACrB,YAAU,qBACV,aAAY,EACZ,eAAc,EACd,UAAW,EACT,8GACA,uJACA,+PACA,oFACA,6DACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,yBAAyB,CAAE,YAAW,WAAU,UAAS,QAAO,GAAG,GAAwC,CAClH,OACE,EAACA,EAAsB,aAAA,CACrB,YAAU,8BACV,aAAY,EACZ,UAAW,EACT,+EACA,mIACA,oFACA,6DACA,EACD,CACQ,UACT,GAAI,YAEJ,EAAC,OAAA,CACC,UAAU,wEACV,YAAU,iDAEV,EAACA,EAAsB,cAAA,CAAA,SACrB,EAAC,EAAA,EAAA,CAAY,CAAA,CACuB,EACjC,CACN,EAAA,EACkC,CAIzC,SAAS,uBAAuB,CAAE,GAAG,GAAsC,CACzE,OAAO,EAACA,EAAsB,WAAA,CAAW,YAAU,4BAA4B,GAAI,GAAS,CAG9F,SAAS,sBAAsB,CAAE,YAAW,WAAU,QAAO,GAAG,GAAqC,CACnG,OACE,EAACA,EAAsB,UAAA,CACrB,YAAU,2BACV,aAAY,EACZ,UAAW,EACT,+EACA,mIACA,oFACA,6DACA,EACD,CACD,GAAI,YAEJ,EAAC,OAAA,CACC,UAAU,wEACV,YAAU,8CAEV,EAACA,EAAsB,cAAA,CAAA,SACrB,EAAC,EAAA,EAAA,CAAY,CAAA,CACuB,EACjC,CACN,EAAA,EAC+B,CAItC,SAAS,kBAAkB,CAAE,YAAW,QAAO,GAAG,GAAiC,CACjF,OACE,EAACA,EAAsB,MAAA,CACrB,YAAU,sBACV,aAAY,EACZ,UAAW,EAAG,wEAAyE,EAAU,CACjG,GAAI,GACJ,CAIN,SAAS,sBAAsB,CAAE,YAAW,GAAG,GAAqC,CAClF,OACE,EAACA,EAAsB,UAAA,CACrB,YAAU,0BACV,UAAW,EAAG,4BAA6B,EAAU,CACrD,GAAI,GACJ,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAAC,OAAA,CACC,YAAU,yBACV,UAAW,EACT,8GACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,gBAAgB,CAAE,GAAG,GAA+B,CAC3D,OAAO,EAACA,EAAsB,IAAA,CAAI,YAAU,oBAAoB,GAAI,GAAS,CAG/E,SAAS,uBAAuB,CAAE,YAAW,QAAO,WAAU,GAAG,GAAsC,CACrG,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,aAAY,EACZ,UAAW,EACT,oGACA,oLACA,oFACA,EACD,CACD,GAAI,YAEH,EACD,EAAC,EAAA,CAAiB,UAAU,UAAA,CAAY,CAAA,EACP,CAIvC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAsB,WAAA,CACrB,YAAU,4BACV,UAAW,EACT,2LACA,uIACA,8JACA,EACD,CACD,GAAI,GACJ"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{Label as n}from"./label.js";import{Separator as r}from"./separator.js";import{cva as i}from"class-variance-authority";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useMemo as s}from"react";function FieldSet({className:e,...n}){return a(`fieldset`,{"data-slot":`field-set`,className:t(`gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col`,e),...n})}function FieldLegend({className:e,variant:n=`legend`,...r}){return a(`legend`,{"data-slot":`field-legend`,"data-variant":n,className:t(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...r})}function FieldGroup({className:e,...n}){return a(`div`,{"data-slot":`field-group`,className:t(`gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col`,e),...n})}const c=i(`data-[invalid=true]:text-destructive gap-2 group/field flex w-full`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function Field({className:e,orientation:n=`vertical`,...r}){return a(`div`,{role:`group`,"data-slot":`field`,"data-orientation":n,className:t(c({orientation:n}),e),...r})}function FieldContent({className:e,...n}){return a(`div`,{"data-slot":`field-content`,className:t(`gap-0.5 group/field-content flex flex-1 flex-col leading-snug`,e),...n})}function FieldLabel({className:e,...r}){return a(n,{"data-slot":`field-label`,className:t(`has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...r})}function FieldTitle({className:e,...n}){return a(`div`,{"data-slot":`field-label`,className:t(`gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug`,e),...n})}function FieldDescription({className:e,...n}){return a(`p`,{"data-slot":`field-description`,className:t(`text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance`,`last:mt-0 nth-last-2:-mt-1`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...n})}function FieldSeparator({children:e,className:n,...i}){return o(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:t(`-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative`,n),...i,children:[a(r,{className:`absolute inset-0 top-1/2`}),e&&a(`span`,{className:`text-muted-foreground px-2 bg-background relative mx-auto block w-fit`,"data-slot":`field-separator-content`,children:e})]})}function FieldError({className:e,children:n,errors:r,...i}){let o=s(()=>{if(n)return n;if(!r?.length)return null;let e=[...new Map(r.map(e=>[e?.message,e])).values()];return e?.length===1?e[0]?.message:a(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&a(`li`,{children:e.message},String(t)))})},[n,r]);return o?a(`div`,{role:`alert`,"data-slot":`field-error`,className:t(`text-destructive text-sm font-normal`,e),...i,children:o}):null}export{Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,FieldLegend,FieldSeparator,FieldSet,FieldTitle};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{Label as n}from"./label.js";import{Separator as r}from"./separator.js";import{cva as i}from"class-variance-authority";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useMemo as s}from"react";function FieldSet({className:e,...n}){return a(`fieldset`,{"data-slot":`field-set`,className:t(`flex flex-col gap-4`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...n})}function FieldLegend({className:e,variant:n=`legend`,...r}){return a(`legend`,{"data-slot":`field-legend`,"data-variant":n,className:t(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...r})}function FieldGroup({className:e,...n}){return a(`div`,{"data-slot":`field-group`,className:t(`group/field-group @container/field-group flex w-full flex-col gap-5`,`data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...n})}const c=i(`data-[invalid=true]:text-destructive gap-2 group/field flex w-full`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function Field({className:e,orientation:n=`vertical`,...r}){return a(`div`,{"data-slot":`field`,"data-orientation":n,className:t(c({orientation:n}),e),...r})}function FieldContent({className:e,...n}){return a(`div`,{"data-slot":`field-content`,className:t(`gap-0.5 group/field-content flex flex-1 flex-col leading-snug`,e),...n})}function FieldLabel({className:e,...r}){return a(n,{"data-slot":`field-label`,className:t(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5`,`group-data-[disabled=true]/field:opacity-50`,e),...r})}function FieldTitle({className:e,...n}){return a(`div`,{"data-slot":`field-label`,className:t(`gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug`,e),...n})}function FieldDescription({className:e,...n}){return a(`p`,{"data-slot":`field-description`,className:t(`text-muted-foreground text-left text-sm leading-normal font-normal`,`[[data-variant=legend]+&]:-mt-1.5 group-has-data-horizontal/field:text-balance last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...n})}function FieldSeparator({children:e,className:n,...i}){return o(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:t(`-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative`,n),...i,children:[a(r,{className:`absolute inset-0 top-1/2`}),e&&a(`span`,{className:`text-muted-foreground px-2 bg-background relative mx-auto block w-fit`,"data-slot":`field-separator-content`,children:e})]})}function FieldError({className:e,children:n,errors:r,...i}){let o=s(()=>{if(n)return n;if(!r?.length)return null;let e=[...new Map(r.map(e=>[e?.message,e])).values()];return e?.length===1?e[0]?.message:a(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map(e=>e?.message&&a(`li`,{children:e.message},e.message))})},[n,r]);return o?a(`div`,{role:`alert`,"data-slot":`field-error`,className:t(`text-destructive text-sm font-normal`,e),...i,children:o}):null}export{Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,FieldLegend,FieldSeparator,FieldSet,FieldTitle};
2
2
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","names":[],"sources":["../../src/components/field.tsx"],"sourcesContent":["/** biome-ignore-all lint/a11y/useSemanticElements: ignore */\n\nimport { useMemo } from 'react'\n\nimport { Label } from '@uselets/ui/label'\nimport { Separator } from '@uselets/ui/separator'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nexport type FieldSetProps = React.ComponentProps<'fieldset'>\n\nexport type FieldLegendProps = React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }\n\nexport type FieldGroupProps = React.ComponentProps<'div'>\n\nexport type FieldContentProps = React.ComponentProps<'div'>\n\nexport type FieldLabelProps = React.ComponentProps<typeof Label>\n\nexport type FieldTitleProps = React.ComponentProps<'div'>\n\nexport type FieldDescriptionProps = React.ComponentProps<'p'>\n\nexport type FieldSeparatorProps = React.ComponentProps<'div'> & {\n children?: React.ReactNode\n}\n\nexport type FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>\n}\n\nfunction FieldSet({ className, ...props }: FieldSetProps) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({ className, variant = 'legend', ...props }: FieldLegendProps) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: FieldGroupProps) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',\n className\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva('data-[invalid=true]:text-destructive gap-2 group/field flex w-full', {\n variants: {\n orientation: {\n vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n responsive:\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'\n }\n },\n defaultVariants: {\n orientation: 'vertical'\n }\n})\n\nexport type FieldProps = React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>\n\nfunction Field({ className, orientation = 'vertical', ...props }: FieldProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction FieldContent({ className, ...props }: FieldContentProps) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn('gap-0.5 group/field-content flex flex-1 flex-col leading-snug', className)}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({ className, ...props }: FieldLabelProps) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: FieldTitleProps) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: FieldDescriptionProps) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({ children, className, ...props }: FieldSeparatorProps) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"text-muted-foreground px-2 bg-background relative mx-auto block w-fit\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({ className, children, errors, ...props }: FieldErrorProps) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()]\n\n if (uniqueErrors?.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map((error, index) => error?.message && <li key={String(index)}>{error.message}</li>)}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldTitle\n}\n"],"mappings":"6RAgCA,SAAS,SAAS,CAAE,YAAW,GAAG,GAAwB,CACxD,OACE,EAAC,WAAA,CACC,YAAU,YACV,UAAW,EACT,mGACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,YAAY,CAAE,YAAW,UAAU,SAAU,GAAG,GAA2B,CAClF,OACE,EAAC,SAAA,CACC,YAAU,eACV,eAAc,EACd,UAAW,EAAG,kFAAmF,EAAU,CAC3G,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,uIACA,EACD,CACD,GAAI,GACJ,CAIN,MAAM,EAAgB,EAAI,qEAAsE,CAC9F,SAAU,CACR,YAAa,CACX,SAAU,wCACV,WACE,iLACF,WACE,gUACH,CACF,CACD,gBAAiB,CACf,YAAa,WACd,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,cAAc,WAAY,GAAG,GAAqB,CAC5E,OACE,EAAC,MAAA,CACC,KAAK,QACL,YAAU,QACV,mBAAkB,EAClB,UAAW,EAAG,EAAc,CAAE,cAAa,CAAC,CAAE,EAAU,CACxD,GAAI,GACJ,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAAC,MAAA,CACC,YAAU,gBACV,UAAW,EAAG,gEAAiE,EAAU,CACzF,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,EAAA,CACC,YAAU,cACV,UAAW,EACT,0VACA,oEACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,6GACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,IAAA,CACC,YAAU,oBACV,UAAW,EACT,oJACA,6BACA,oEACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,eAAe,CAAE,WAAU,YAAW,GAAG,GAA8B,CAC9E,OACE,EAAC,MAAA,CACC,YAAU,kBACV,eAAc,CAAC,CAAC,EAChB,UAAW,EAAG,4EAA6E,EAAU,CACrG,GAAI,YAEJ,EAAC,EAAA,CAAU,UAAU,2BAAA,CAA6B,CACjD,GACC,EAAC,OAAA,CACC,UAAU,wEACV,YAAU,0BAET,YACI,CAAA,EAEL,CAIV,SAAS,WAAW,CAAE,YAAW,WAAU,SAAQ,GAAG,GAA0B,CAC9E,IAAM,EAAU,MAAc,CAC5B,GAAI,EACF,OAAO,EAGT,GAAI,CAAC,GAAQ,OACX,OAAO,KAGT,IAAM,EAAe,CAAC,GAAG,IAAI,IAAI,EAAO,IAAK,GAAU,CAAC,GAAO,QAAS,EAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAM1F,OAJI,GAAc,SAAW,EACpB,EAAa,IAAI,QAIxB,EAAC,KAAA,CAAG,UAAU,8CACX,EAAa,KAAK,EAAO,IAAU,GAAO,SAAW,EAAC,KAAA,CAAA,SAAwB,EAAM,QAAA,CAAtB,OAAO,EAAM,CAAsB,CAAC,EAChG,EAEN,CAAC,EAAU,EAAO,CAAC,CAMtB,OAJK,EAKH,EAAC,MAAA,CACC,KAAK,QACL,YAAU,cACV,UAAW,EAAG,uCAAwC,EAAU,CAChE,GAAI,WAEH,GACG,CAXC"}
1
+ {"version":3,"file":"field.js","names":[],"sources":["../../src/components/field.tsx"],"sourcesContent":["import { useMemo } from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\nimport { Label } from './label'\nimport { Separator } from './separator'\n\nexport type FieldSetProps = React.ComponentProps<'fieldset'>\n\nexport type FieldLegendProps = React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }\n\nexport type FieldGroupProps = React.ComponentProps<'div'>\n\nexport type FieldContentProps = React.ComponentProps<'div'>\n\nexport type FieldLabelProps = React.ComponentProps<typeof Label>\n\nexport type FieldTitleProps = React.ComponentProps<'div'>\n\nexport type FieldDescriptionProps = React.ComponentProps<'p'>\n\nexport type FieldSeparatorProps = React.ComponentProps<'div'> & {\n children?: React.ReactNode\n}\n\nexport type FieldErrorProps = React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>\n}\n\nfunction FieldSet({ className, ...props }: FieldSetProps) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-4',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({ className, variant = 'legend', ...props }: FieldLegendProps) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: FieldGroupProps) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-5',\n 'data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva('data-[invalid=true]:text-destructive gap-2 group/field flex w-full', {\n variants: {\n orientation: {\n vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n responsive:\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'\n }\n },\n defaultVariants: {\n orientation: 'vertical'\n }\n})\n\nexport type FieldProps = React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>\n\nfunction Field({ className, orientation = 'vertical', ...props }: FieldProps) {\n return (\n <div\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction FieldContent({ className, ...props }: FieldContentProps) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn('gap-0.5 group/field-content flex flex-1 flex-col leading-snug', className)}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({ className, ...props }: FieldLabelProps) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug',\n 'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5',\n 'group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: FieldTitleProps) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: FieldDescriptionProps) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-left text-sm leading-normal font-normal',\n '[[data-variant=legend]+&]:-mt-1.5 group-has-data-horizontal/field:text-balance last:mt-0 nth-last-2:-mt-1',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({ children, className, ...props }: FieldSeparatorProps) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"text-muted-foreground px-2 bg-background relative mx-auto block w-fit\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({ className, children, errors, ...props }: FieldErrorProps) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()]\n\n if (uniqueErrors?.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldTitle\n}\n"],"mappings":"6RA8BA,SAAS,SAAS,CAAE,YAAW,GAAG,GAAwB,CACxD,OACE,EAAC,WAAA,CACC,YAAU,YACV,UAAW,EACT,sBACA,+EACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,YAAY,CAAE,YAAW,UAAU,SAAU,GAAG,GAA2B,CAClF,OACE,EAAC,SAAA,CACC,YAAU,eACV,eAAc,EACd,UAAW,EAAG,kFAAmF,EAAU,CAC3G,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,sEACA,mEACA,EACD,CACD,GAAI,GACJ,CAIN,MAAM,EAAgB,EAAI,qEAAsE,CAC9F,SAAU,CACR,YAAa,CACX,SAAU,wCACV,WACE,iLACF,WACE,gUACH,CACF,CACD,gBAAiB,CACf,YAAa,WACd,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,cAAc,WAAY,GAAG,GAAqB,CAC5E,OACE,EAAC,MAAA,CACC,YAAU,QACV,mBAAkB,EAClB,UAAW,EAAG,EAAc,CAAE,cAAa,CAAC,CAAE,EAAU,CACxD,GAAI,GACJ,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAAC,MAAA,CACC,YAAU,gBACV,UAAW,EAAG,gEAAiE,EAAU,CACzF,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,EAAA,CACC,YAAU,cACV,UAAW,EACT,mEACA,+IACA,kKACA,8CACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,6GACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,IAAA,CACC,YAAU,oBACV,UAAW,EACT,qEACA,4GACA,oEACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,eAAe,CAAE,WAAU,YAAW,GAAG,GAA8B,CAC9E,OACE,EAAC,MAAA,CACC,YAAU,kBACV,eAAc,CAAC,CAAC,EAChB,UAAW,EAAG,4EAA6E,EAAU,CACrG,GAAI,YAEJ,EAAC,EAAA,CAAU,UAAU,2BAAA,CAA6B,CACjD,GACC,EAAC,OAAA,CACC,UAAU,wEACV,YAAU,0BAET,YACI,CAAA,EAEL,CAIV,SAAS,WAAW,CAAE,YAAW,WAAU,SAAQ,GAAG,GAA0B,CAC9E,IAAM,EAAU,MAAc,CAC5B,GAAI,EACF,OAAO,EAGT,GAAI,CAAC,GAAQ,OACX,OAAO,KAGT,IAAM,EAAe,CAAC,GAAG,IAAI,IAAI,EAAO,IAAK,GAAU,CAAC,GAAO,QAAS,EAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAM1F,OAJI,GAAc,SAAW,EACpB,EAAa,IAAI,QAIxB,EAAC,KAAA,CAAG,UAAU,8CACX,EAAa,IAAK,GAAU,GAAO,SAAW,EAAC,KAAA,CAAA,SAAwB,EAAM,QAAA,CAAtB,EAAM,QAA6B,CAAC,EACzF,EAEN,CAAC,EAAU,EAAO,CAAC,CAMtB,OAJK,EAKH,EAAC,MAAA,CACC,KAAK,QACL,YAAU,cACV,UAAW,EAAG,uCAAwC,EAAU,CAChE,GAAI,WAEH,GACG,CAXC"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{IconMinus as a}from"@tabler/icons-react";import{OTPInput as o,OTPInputContext as s,REGEXP_ONLY_CHARS as c,REGEXP_ONLY_DIGITS as l,REGEXP_ONLY_DIGITS_AND_CHARS as u}from"input-otp";function InputOTP({className:e,containerClassName:r,...i}){return n(o,{"data-slot":`input-otp`,containerClassName:t(`cn-input-otp flex items-center has-disabled:opacity-50`,r),spellCheck:!1,className:t(`disabled:cursor-not-allowed`,e),...i})}function InputOTPGroup({className:e,...r}){return n(`div`,{"data-slot":`input-otp-group`,className:t(`has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-lg has-aria-invalid:ring-3 flex items-center`,e),...r})}function InputOTPSlot({index:e,className:a,...o}){let{char:c,hasFakeCaret:l,isActive:u}=i.useContext(s)?.slots[e]??{};return r(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:t(`dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-8 border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:ring-3 relative flex items-center justify-center data-[active=true]:z-10`,a),...o,children:[c,l&&n(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:n(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function InputOTPSeparator({...e}){return n(`div`,{"data-slot":`input-otp-separator`,className:`[&_svg:not([class*='size-'])]:size-4 flex items-center`,role:`separator`,...e,children:n(a,{})})}export{InputOTP,InputOTPGroup,InputOTPSeparator,InputOTPSlot,c as REGEXP_ONLY_CHARS,l as REGEXP_ONLY_DIGITS,u as REGEXP_ONLY_DIGITS_AND_CHARS};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{IconMinus as i}from"@tabler/icons-react";import*as a from"react";import{OTPInput as o,OTPInputContext as s,REGEXP_ONLY_CHARS as c,REGEXP_ONLY_DIGITS as l,REGEXP_ONLY_DIGITS_AND_CHARS as u}from"input-otp";function InputOTP({className:e,containerClassName:r,...i}){return n(o,{"data-slot":`input-otp`,containerClassName:t(`cn-input-otp flex items-center has-disabled:opacity-50`,r),spellCheck:!1,className:t(`disabled:cursor-not-allowed`,e),...i})}function InputOTPGroup({className:e,...r}){return n(`div`,{"data-slot":`input-otp-group`,className:t(`flex items-center rounded-lg`,`has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-aria-invalid:ring-3 dark:has-aria-invalid:ring-destructive/40`,e),...r})}function InputOTPSlot({index:e,className:i,...o}){let{char:c,hasFakeCaret:l,isActive:u}=a.useContext(s)?.slots[e]??{};return r(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:t(`dark:bg-input/30 border-input relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none`,`first:rounded-l-lg first:border-l last:rounded-r-lg`,`aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive`,`data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:ring-3 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40`,i),...o,children:[c,l&&n(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:n(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function InputOTPSeparator({...e}){return n(`div`,{"data-slot":`input-otp-separator`,className:`[&_svg:not([class*='size-'])]:size-4 flex items-center`,...e,children:n(i,{})})}export{InputOTP,InputOTPGroup,InputOTPSeparator,InputOTPSlot,c as REGEXP_ONLY_CHARS,l as REGEXP_ONLY_DIGITS,u as REGEXP_ONLY_DIGITS_AND_CHARS};
2
2
  //# sourceMappingURL=input-otp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.js","names":[],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["/** biome-ignore-all lint/a11y: ignore */\n\nimport * as React from 'react'\n\nimport { IconMinus } from '@tabler/icons-react'\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n} from 'input-otp'\n\nimport { cn } from '../lib/utils'\n\nexport type InputOTPProps = React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}\n\nexport type InputOTPGroupProps = React.ComponentProps<'div'>\n\nexport type InputOTPSlotProps = React.ComponentProps<'div'> & {\n index: number\n}\n\nexport type InputOTPSeparatorProps = React.ComponentProps<'div'>\n\nfunction InputOTP({ className, containerClassName, ...props }: InputOTPProps) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn('cn-input-otp flex items-center has-disabled:opacity-50', containerClassName)}\n spellCheck={false}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: InputOTPGroupProps) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\n 'has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-lg has-aria-invalid:ring-3 flex items-center',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({ index, className, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n 'dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-8 border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:ring-3 relative flex items-center justify-center data-[active=true]:z-10',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: InputOTPSeparatorProps) {\n return (\n <div\n data-slot=\"input-otp-separator\"\n className=\"[&_svg:not([class*='size-'])]:size-4 flex items-center\"\n role=\"separator\"\n {...props}\n >\n <IconMinus />\n </div>\n )\n}\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n}\n"],"mappings":"mVA2BA,SAAS,SAAS,CAAE,YAAW,qBAAoB,GAAG,GAAwB,CAC5E,OACE,EAAC,EAAA,CACC,YAAU,YACV,mBAAoB,EAAG,yDAA0D,EAAmB,CACpG,WAAY,GACZ,UAAW,EAAG,8BAA+B,EAAU,CACvD,GAAI,GACJ,CAIN,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAAC,MAAA,CACC,YAAU,kBACV,UAAW,EACT,0KACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,aAAa,CAAE,QAAO,YAAW,GAAG,GAA4B,CAEvE,GAAM,CAAE,OAAM,eAAc,YADJ,EAAM,WAAW,EAAgB,EACC,MAAM,IAAU,EAAE,CAE5E,OACE,EAAC,MAAA,CACC,YAAU,iBACV,cAAa,EACb,UAAW,EACT,4eACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAAC,MAAA,CAAI,UAAU,iFACb,EAAC,MAAA,CAAI,UAAU,2DAAA,CAA6D,EACxE,CAAA,EAEJ,CAIV,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OACE,EAAC,MAAA,CACC,YAAU,sBACV,UAAU,yDACV,KAAK,YACL,GAAI,WAEJ,EAAC,EAAA,EAAA,CAAY,EACT"}
1
+ {"version":3,"file":"input-otp.js","names":[],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconMinus } from '@tabler/icons-react'\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n} from 'input-otp'\n\nimport { cn } from '../lib/utils'\n\nexport type InputOTPProps = React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}\n\nexport type InputOTPGroupProps = React.ComponentProps<'div'>\n\nexport type InputOTPSlotProps = React.ComponentProps<'div'> & {\n index: number\n}\n\nexport type InputOTPSeparatorProps = React.ComponentProps<'div'>\n\nfunction InputOTP({ className, containerClassName, ...props }: InputOTPProps) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn('cn-input-otp flex items-center has-disabled:opacity-50', containerClassName)}\n spellCheck={false}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: InputOTPGroupProps) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\n 'flex items-center rounded-lg',\n 'has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-aria-invalid:ring-3 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({ index, className, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n 'dark:bg-input/30 border-input relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none',\n 'first:rounded-l-lg first:border-l last:rounded-r-lg',\n 'aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive',\n 'data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:ring-3 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: InputOTPSeparatorProps) {\n return (\n <div data-slot=\"input-otp-separator\" className=\"[&_svg:not([class*='size-'])]:size-4 flex items-center\" {...props}>\n <IconMinus />\n </div>\n )\n}\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n}\n"],"mappings":"mVAyBA,SAAS,SAAS,CAAE,YAAW,qBAAoB,GAAG,GAAwB,CAC5E,OACE,EAAC,EAAA,CACC,YAAU,YACV,mBAAoB,EAAG,yDAA0D,EAAmB,CACpG,WAAY,GACZ,UAAW,EAAG,8BAA+B,EAAU,CACvD,GAAI,GACJ,CAIN,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAAC,MAAA,CACC,YAAU,kBACV,UAAW,EACT,+BACA,6IACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,aAAa,CAAE,QAAO,YAAW,GAAG,GAA4B,CAEvE,GAAM,CAAE,OAAM,eAAc,YADJ,EAAM,WAAW,EAAgB,EACC,MAAM,IAAU,EAAE,CAE5E,OACE,EAAC,MAAA,CACC,YAAU,iBACV,cAAa,EACb,UAAW,EACT,uIACA,sDACA,qFACA,gOACA,EACD,CACD,GAAI,YAEH,EACA,GACC,EAAC,MAAA,CAAI,UAAU,iFACb,EAAC,MAAA,CAAI,UAAU,2DAAA,CAA6D,EACxE,CAAA,EAEJ,CAIV,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OACE,EAAC,MAAA,CAAI,YAAU,sBAAsB,UAAU,yDAAyD,GAAI,WAC1G,EAAC,EAAA,EAAA,CAAY,EACT"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";import{Input as r}from"@base-ui/react/input";function Input({className:e,type:i,...a}){return n(r,{type:i,"data-slot":`input`,className:t(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,e),...a})}export{Input};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";function Input({className:e,type:r,...i}){return n(`input`,{type:r,"data-slot":`input`,className:t(`border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground`,`file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80`,e),...i})}export{Input};
2
2
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":["InputPrimitive"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Input as InputPrimitive } from '@base-ui/react/input'\n\nimport { cn } from '../lib/utils'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n 'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"mKAQA,SAAS,MAAM,CAAE,YAAW,OAAM,GAAG,GAAqB,CACxD,OACE,EAACA,EAAAA,CACO,OACN,YAAU,QACV,UAAW,EACT,8oBACA,EACD,CACD,GAAI,GACJ"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground',\n 'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"sHAMA,SAAS,MAAM,CAAE,YAAW,OAAM,GAAG,GAAqB,CACxD,OACE,EAAC,QAAA,CACO,OACN,YAAU,QACV,UAAW,EACT,uIACA,4EACA,qKACA,oCACA,iHACA,2IACA,EACD,CACD,GAAI,GACJ"}
@@ -1,15 +1,18 @@
1
1
  import { t as __name } from "../chunk-IpJEthwI.js";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as React from "react";
3
4
 
4
5
  //#region src/components/kbd.d.ts
6
+ type KbdProps = React.ComponentProps<'kbd'>;
7
+ type KbdGroupProps = React.ComponentProps<'div'>;
5
8
  declare function Kbd({
6
9
  className,
7
10
  ...props
8
- }: React.ComponentProps<'kbd'>): react_jsx_runtime0.JSX.Element;
11
+ }: KbdProps): react_jsx_runtime0.JSX.Element;
9
12
  declare function KbdGroup({
10
13
  className,
11
14
  ...props
12
- }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
15
+ }: KbdGroupProps): react_jsx_runtime0.JSX.Element;
13
16
  //#endregion
14
- export { Kbd, KbdGroup };
17
+ export { Kbd, KbdGroup, KbdGroupProps, KbdProps };
15
18
  //# sourceMappingURL=kbd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import { cn } from '@uselets/ui/lib/utils'\n\nfunction Kbd({ className, ...props }: React.ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <kbd data-slot=\"kbd-group\" className={cn('gap-1 inline-flex items-center', className)} {...props} />\n}\n\nexport { Kbd, KbdGroup }\n"],"mappings":"sHAEA,SAAS,IAAI,CAAE,YAAW,GAAG,GAAsC,CACjE,OACE,EAAC,MAAA,CACC,YAAU,MACV,UAAW,EACT,wWACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,SAAS,CAAE,YAAW,GAAG,GAAsC,CACtE,OAAO,EAAC,MAAA,CAAI,YAAU,YAAY,UAAW,EAAG,iCAAkC,EAAU,CAAE,GAAI,GAAS"}
1
+ {"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type KbdProps = React.ComponentProps<'kbd'>\n\nexport type KbdGroupProps = React.ComponentProps<'div'>\n\nfunction Kbd({ className, ...props }: KbdProps) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n return <kbd data-slot=\"kbd-group\" className={cn('gap-1 inline-flex items-center', className)} {...props} />\n}\n\nexport { Kbd, KbdGroup }\n"],"mappings":"sHAQA,SAAS,IAAI,CAAE,YAAW,GAAG,GAAmB,CAC9C,OACE,EAAC,MAAA,CACC,YAAU,MACV,UAAW,EACT,wWACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,SAAS,CAAE,YAAW,GAAG,GAAwB,CACxD,OAAO,EAAC,MAAA,CAAI,YAAU,YAAY,UAAW,EAAG,iCAAkC,EAAU,CAAE,GAAI,GAAS"}
@@ -1,9 +1,10 @@
1
1
  import { t as __name } from "../chunk-IpJEthwI.js";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Label as Label$1 } from "radix-ui";
3
4
  import * as React from "react";
4
5
 
5
6
  //#region src/components/label.d.ts
6
- type LabelProps = React.ComponentProps<'label'>;
7
+ type LabelProps = React.ComponentProps<typeof Label$1.Root>;
7
8
  declare function Label({
8
9
  className,
9
10
  ...props
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";function Label({className:e,...r}){return n(`label`,{"data-slot":`label`,className:t(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,e),...r})}export{Label};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";import{Label as r}from"radix-ui";function Label({className:e,...i}){return n(r.Root,{"data-slot":`label`,className:t(`flex items-center gap-2 select-none text-sm leading-none font-medium`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...i})}export{Label};
2
2
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","names":[],"sources":["../../src/components/label.tsx"],"sourcesContent":["/** biome-ignore-all lint/a11y/noLabelWithoutControl: ignore */\n\nimport type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<'label'>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <label\n data-slot=\"label\"\n className={cn(\n 'gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"sHAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAAC,QAAA,CACC,YAAU,QACV,UAAW,EACT,sNACA,EACD,CACD,GAAI,GACJ"}
1
+ {"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 select-none text-sm leading-none font-medium',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"uJAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAACA,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EACT,uEACA,uFACA,4DACA,EACD,CACD,GAAI,GACJ"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{IconSelector as i}from"@tabler/icons-react";function NativeSelect({className:e,size:a=`default`,...o}){return r(`div`,{className:t(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:`border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 outline-none disabled:pointer-events-none disabled:cursor-not-allowed`,...o}),n(i,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:e,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:t(e),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{IconSelector as i}from"@tabler/icons-react";function NativeSelect({className:e,size:a=`default`,...o}){return r(`div`,{className:t(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:t(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...o}),n(i,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:e,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:t(e),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
2
2
  //# sourceMappingURL=native-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className=\"border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 outline-none disabled:pointer-events-none disabled:cursor-not-allowed\"\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"mLAcA,SAAS,aAAa,CAAE,YAAW,OAAO,UAAW,GAAG,GAA4B,CAClF,OACE,EAAC,MAAA,CACC,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,YAEX,EAAC,SAAA,CACC,YAAU,gBACV,YAAW,EACX,UAAU,2pBACV,GAAI,GACJ,CACF,EAAC,EAAA,CACC,UAAU,2GACV,cAAY,OACZ,YAAU,sBACV,CAAA,EACE,CAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAA,CAAO,YAAU,uBAAuB,GAAI,GAAS,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAA,CAAS,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,GAAS"}
1
+ {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"mLAcA,SAAS,aAAa,CAAE,YAAW,OAAO,UAAW,GAAG,GAA4B,CAClF,OACE,EAAC,MAAA,CACC,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,YAEX,EAAC,SAAA,CACC,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,2DACD,CACD,GAAI,GACJ,CACF,EAAC,EAAA,CACC,UAAU,2GACV,cAAY,OACZ,YAAU,sBACV,CAAA,EACE,CAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAA,CAAO,YAAU,uBAAuB,GAAI,GAAS,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAA,CAAS,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,GAAS"}
@@ -0,0 +1,43 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Popover as Popover$1 } from "radix-ui";
4
+ import * as React from "react";
5
+
6
+ //#region src/components/popover.d.ts
7
+ type PopoverProps = React.ComponentProps<typeof Popover$1.Root>;
8
+ type PopoverTriggerProps = React.ComponentProps<typeof Popover$1.Trigger>;
9
+ type PopoverContentProps = React.ComponentProps<typeof Popover$1.Content>;
10
+ type PopoverAnchorProps = React.ComponentProps<typeof Popover$1.Anchor>;
11
+ type PopoverHeaderProps = React.ComponentProps<'div'>;
12
+ type PopoverTitleProps = React.ComponentProps<'h2'>;
13
+ type PopoverDescriptionProps = React.ComponentProps<'p'>;
14
+ declare function Popover({
15
+ ...props
16
+ }: PopoverProps): react_jsx_runtime0.JSX.Element;
17
+ declare function PopoverTrigger({
18
+ ...props
19
+ }: PopoverTriggerProps): react_jsx_runtime0.JSX.Element;
20
+ declare function PopoverContent({
21
+ className,
22
+ align,
23
+ sideOffset,
24
+ ...props
25
+ }: PopoverContentProps): react_jsx_runtime0.JSX.Element;
26
+ declare function PopoverAnchor({
27
+ ...props
28
+ }: PopoverAnchorProps): react_jsx_runtime0.JSX.Element;
29
+ declare function PopoverHeader({
30
+ className,
31
+ ...props
32
+ }: PopoverHeaderProps): react_jsx_runtime0.JSX.Element;
33
+ declare function PopoverTitle({
34
+ className,
35
+ ...props
36
+ }: PopoverTitleProps): react_jsx_runtime0.JSX.Element;
37
+ declare function PopoverDescription({
38
+ className,
39
+ ...props
40
+ }: PopoverDescriptionProps): react_jsx_runtime0.JSX.Element;
41
+ //#endregion
42
+ export { Popover, PopoverAnchor, PopoverAnchorProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps };
43
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";import{Popover as r}from"radix-ui";function Popover({...e}){return n(r.Root,{"data-slot":`popover`,...e})}function PopoverTrigger({...e}){return n(r.Trigger,{"data-slot":`popover-trigger`,...e})}function PopoverContent({className:e,align:i=`center`,sideOffset:a=4,...o}){return n(r.Portal,{children:n(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:t(`bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`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`,e),...o})})}function PopoverAnchor({...e}){return n(r.Anchor,{"data-slot":`popover-anchor`,...e})}function PopoverHeader({className:e,...r}){return n(`div`,{"data-slot":`popover-header`,className:t(`flex flex-col gap-0.5 text-sm`,e),...r})}function PopoverTitle({className:e,...r}){return n(`h2`,{"data-slot":`popover-title`,className:t(`font-medium`,e),...r})}function PopoverDescription({className:e,...r}){return n(`p`,{"data-slot":`popover-description`,className:t(`text-muted-foreground`,e),...r})}export{Popover,PopoverAnchor,PopoverContent,PopoverDescription,PopoverHeader,PopoverTitle,PopoverTrigger};
2
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","names":["PopoverPrimitive"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Popover as PopoverPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type PopoverProps = React.ComponentProps<typeof PopoverPrimitive.Root>\n\nexport type PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger>\n\nexport type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content>\n\nexport type PopoverAnchorProps = React.ComponentProps<typeof PopoverPrimitive.Anchor>\n\nexport type PopoverHeaderProps = React.ComponentProps<'div'>\n\nexport type PopoverTitleProps = React.ComponentProps<'h2'>\n\nexport type PopoverDescriptionProps = React.ComponentProps<'p'>\n\nfunction Popover({ ...props }: PopoverProps) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({ className, align = 'center', sideOffset = 4, ...props }: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 z-50 w-72 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 origin-(--radix-popover-content-transform-origin) flex flex-col gap-2.5 outline-hidden',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({ ...props }: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: PopoverHeaderProps) {\n return <div data-slot=\"popover-header\" className={cn('flex flex-col gap-0.5 text-sm', className)} {...props} />\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverTitleProps) {\n return <h2 data-slot=\"popover-title\" className={cn('font-medium', className)} {...props} />\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverDescriptionProps) {\n return <p data-slot=\"popover-description\" className={cn('text-muted-foreground', className)} {...props} />\n}\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }\n"],"mappings":"yJAoBA,SAAS,QAAQ,CAAE,GAAG,GAAuB,CAC3C,OAAO,EAACA,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAGjE,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAACA,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,eAAe,CAAE,YAAW,QAAQ,SAAU,aAAa,EAAG,GAAG,GAA8B,CACtG,OACE,EAACA,EAAiB,OAAA,CAAA,SAChB,EAACA,EAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,UAAW,EACT,gNACA,uIACA,8JACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAI9B,SAAS,cAAc,CAAE,GAAG,GAA6B,CACvD,OAAO,EAACA,EAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAG1E,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OAAO,EAAC,MAAA,CAAI,YAAU,iBAAiB,UAAW,EAAG,gCAAiC,EAAU,CAAE,GAAI,GAAS,CAGjH,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OAAO,EAAC,KAAA,CAAG,YAAU,gBAAgB,UAAW,EAAG,cAAe,EAAU,CAAE,GAAI,GAAS,CAG7F,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OAAO,EAAC,IAAA,CAAE,YAAU,sBAAsB,UAAW,EAAG,wBAAyB,EAAU,CAAE,GAAI,GAAS"}
@@ -1,28 +1,29 @@
1
1
  import { t as __name } from "../chunk-IpJEthwI.js";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Select as Select$1 } from "radix-ui";
3
4
  import * as React from "react";
4
- import { Select as Select$1 } from "@base-ui/react/select";
5
5
 
6
6
  //#region src/components/select.d.ts
7
- declare const Select: typeof Select$1.Root;
8
- type SelectProps = Select$1.Root.Props<unknown>;
9
- type SelectGroupProps = Select$1.Group.Props;
10
- type SelectValueProps = Select$1.Value.Props;
11
- type SelectTriggerProps = Select$1.Trigger.Props & {
7
+ type SelectProps = React.ComponentProps<typeof Select$1.Root>;
8
+ type SelectGroupProps = React.ComponentProps<typeof Select$1.Group>;
9
+ type SelectValueProps = React.ComponentProps<typeof Select$1.Value>;
10
+ type SelectTriggerProps = React.ComponentProps<typeof Select$1.Trigger> & {
12
11
  size?: 'sm' | 'default';
13
12
  };
14
- type SelectContentProps = Select$1.Popup.Props & Pick<Select$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'>;
15
- type SelectLabelProps = Select$1.GroupLabel.Props;
16
- type SelectItemProps = Select$1.Item.Props;
17
- type SelectSeparatorProps = Select$1.Separator.Props;
18
- type SelectScrollUpButtonProps = React.ComponentProps<typeof Select$1.ScrollUpArrow>;
19
- type SelectScrollDownButtonProps = React.ComponentProps<typeof Select$1.ScrollDownArrow>;
13
+ type SelectContentProps = React.ComponentProps<typeof Select$1.Content>;
14
+ type SelectLabelProps = React.ComponentProps<typeof Select$1.Label>;
15
+ type SelectItemProps = React.ComponentProps<typeof Select$1.Item>;
16
+ type SelectSeparatorProps = React.ComponentProps<typeof Select$1.Separator>;
17
+ type SelectScrollUpButtonProps = React.ComponentProps<typeof Select$1.ScrollUpButton>;
18
+ type SelectScrollDownButtonProps = React.ComponentProps<typeof Select$1.ScrollDownButton>;
19
+ declare function Select({
20
+ ...props
21
+ }: SelectProps): react_jsx_runtime0.JSX.Element;
20
22
  declare function SelectGroup({
21
23
  className,
22
24
  ...props
23
25
  }: SelectGroupProps): react_jsx_runtime0.JSX.Element;
24
26
  declare function SelectValue({
25
- className,
26
27
  ...props
27
28
  }: SelectValueProps): react_jsx_runtime0.JSX.Element;
28
29
  declare function SelectTrigger({
@@ -34,11 +35,8 @@ declare function SelectTrigger({
34
35
  declare function SelectContent({
35
36
  className,
36
37
  children,
37
- side,
38
- sideOffset,
38
+ position,
39
39
  align,
40
- alignOffset,
41
- alignItemWithTrigger,
42
40
  ...props
43
41
  }: SelectContentProps): react_jsx_runtime0.JSX.Element;
44
42
  declare function SelectLabel({
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{IconCheck as i,IconChevronDown as a,IconChevronUp as o,IconSelector as s}from"@tabler/icons-react";import{Select as c}from"@base-ui/react/select";const l=c.Root;function SelectGroup({className:e,...r}){return n(c.Group,{"data-slot":`select-group`,className:t(`scroll-my-1 p-1`,e),...r})}function SelectValue({className:e,...r}){return n(c.Value,{"data-slot":`select-value`,className:t(`flex flex-1 text-left`,e),...r})}function SelectTrigger({className:e,size:i=`default`,children:a,...o}){return r(c.Trigger,{"data-slot":`select-trigger`,"data-size":i,className:t(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...o,children:[a,n(c.Icon,{render:n(s,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:e,children:i,side:a=`bottom`,sideOffset:o=4,align:s=`center`,alignOffset:l=0,alignItemWithTrigger:u=!0,...d}){return n(c.Portal,{children:n(c.Positioner,{side:a,sideOffset:o,align:s,alignOffset:l,alignItemWithTrigger:u,className:`isolate z-50`,children:r(c.Popup,{"data-slot":`select-content`,"data-align-trigger":u,className:t(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none`,e),...d,children:[n(SelectScrollUpButton,{}),n(c.List,{children:i}),n(SelectScrollDownButton,{})]})})})}function SelectLabel({className:e,...r}){return n(c.GroupLabel,{"data-slot":`select-label`,className:t(`text-muted-foreground px-1.5 py-1 text-xs`,e),...r})}function SelectItem({className:e,children:a,...o}){return r(c.Item,{"data-slot":`select-item`,className:t(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...o,children:[n(c.ItemText,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:a}),n(c.ItemIndicator,{render:n(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:n(i,{className:`pointer-events-none`})})]})}function SelectSeparator({className:e,...r}){return n(c.Separator,{"data-slot":`select-separator`,className:t(`bg-border -mx-1 my-1 h-px pointer-events-none`,e),...r})}function SelectScrollUpButton({className:e,...r}){return n(c.ScrollUpArrow,{"data-slot":`select-scroll-up-button`,className:t(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,e),...r,children:n(o,{})})}function SelectScrollDownButton({className:e,...r}){return n(c.ScrollDownArrow,{"data-slot":`select-scroll-down-button`,className:t(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,e),...r,children:n(a,{})})}export{l as Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
1
+ import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Select as i}from"radix-ui";import{IconCheck as a,IconChevronDown as o,IconChevronUp as s,IconSelector as c}from"@tabler/icons-react";function Select({...e}){return n(i.Root,{"data-slot":`select`,...e})}function SelectGroup({className:e,...r}){return n(i.Group,{"data-slot":`select-group`,className:t(`scroll-my-1 p-1`,e),...r})}function SelectValue({...e}){return n(i.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:e,size:a=`default`,children:o,...s}){return r(i.Trigger,{"data-slot":`select-trigger`,"data-size":a,className:t(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...s,children:[o,n(i.Icon,{asChild:!0,children:n(c,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:e,children:a,position:o=`item-aligned`,align:s=`center`,...c}){return n(i.Portal,{children:r(i.Content,{"data-slot":`select-content`,"data-align-trigger":o===`item-aligned`,className:t(`bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`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-[align-trigger=true]:animate-none`,o===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:o,align:s,...c,children:[n(SelectScrollUpButton,{}),n(i.Viewport,{"data-position":o,className:t(`data-[position=popper]:h-(--radix-select-trigger-height)`,`data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`),children:a}),n(SelectScrollDownButton,{})]})})}function SelectLabel({className:e,...r}){return n(i.Label,{"data-slot":`select-label`,className:t(`text-muted-foreground px-1.5 py-1 text-xs`,e),...r})}function SelectItem({className:e,children:o,...s}){return r(i.Item,{"data-slot":`select-item`,className:t(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none`,`*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,e),...s,children:[n(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:n(i.ItemIndicator,{children:n(a,{className:`pointer-events-none`})})}),n(i.ItemText,{children:o})]})}function SelectSeparator({className:e,...r}){return n(i.Separator,{"data-slot":`select-separator`,className:t(`bg-border -mx-1 my-1 h-px pointer-events-none`,e),...r})}function SelectScrollUpButton({className:e,...r}){return n(i.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:t(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:n(s,{})})}function SelectScrollDownButton({className:e,...r}){return n(i.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:t(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:n(o,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
2
2
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nconst Select = SelectPrimitive.Root\n\nexport type SelectProps = SelectPrimitive.Root.Props<unknown>\n\nexport type SelectGroupProps = SelectPrimitive.Group.Props\n\nexport type SelectValueProps = SelectPrimitive.Value.Props\n\nexport type SelectTriggerProps = SelectPrimitive.Trigger.Props & {\n size?: 'sm' | 'default'\n}\n\nexport type SelectContentProps = SelectPrimitive.Popup.Props &\n Pick<SelectPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'>\n\nexport type SelectLabelProps = SelectPrimitive.GroupLabel.Props\n\nexport type SelectItemProps = SelectPrimitive.Item.Props\n\nexport type SelectSeparatorProps = SelectPrimitive.Separator.Props\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ className, ...props }: SelectValueProps) {\n return (\n <SelectPrimitive.Value data-slot=\"select-value\" className={cn('flex flex-1 text-left', className)} {...props} />\n )\n}\n\nfunction SelectTrigger({ className, size = 'default', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon render={<IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />} />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\n 'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none',\n className\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex flex-1 gap-2 shrink-0 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />}\n >\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownArrow>\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"],"mappings":"yRAOA,MAAM,EAASA,EAAgB,KAyB/B,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,kBAAmB,EAAU,CAAE,GAAI,GAAS,CAGnH,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,wBAAyB,EAAU,CAAE,GAAI,GAAS,CAIpH,SAAS,cAAc,CAAE,YAAW,OAAO,UAAW,WAAU,GAAG,GAA6B,CAC9F,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,UAAW,EACT,s2BACA,EACD,CACD,GAAI,YAEH,EACD,EAACA,EAAgB,KAAA,CAAK,OAAQ,EAAC,EAAA,CAAa,UAAU,mDAAA,CAAqD,CAAA,CAAI,CAAA,EACvF,CAI9B,SAAS,cAAc,CACrB,YACA,WACA,OAAO,SACP,aAAa,EACb,QAAQ,SACR,cAAc,EACd,uBAAuB,GACvB,GAAG,GACkB,CACrB,OACE,EAACA,EAAgB,OAAA,CAAA,SACf,EAACA,EAAgB,WAAA,CACT,OACM,aACL,QACM,cACS,uBACtB,UAAU,wBAEV,EAACA,EAAgB,MAAA,CACf,YAAU,iBACV,qBAAoB,EACpB,UAAW,EACT,+oBACA,EACD,CACD,GAAI,YAEJ,EAAC,qBAAA,EAAA,CAAuB,CACxB,EAACA,EAAgB,KAAA,CAAM,WAAA,CAAgC,CACvD,EAAC,uBAAA,EAAA,CAAyB,GACJ,EACG,CAAA,CACN,CAI7B,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,WAAA,CACf,YAAU,eACV,UAAW,EAAG,4CAA6C,EAAU,CACrE,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAA,CACf,YAAU,cACV,UAAW,EACT,qbACA,EACD,CACD,GAAI,YAEJ,EAACA,EAAgB,SAAA,CAAS,UAAU,+CACjC,YACwB,CAC3B,EAACA,EAAgB,cAAA,CACf,OAAQ,EAAC,OAAA,CAAK,UAAU,+EAAA,CAAiF,UAEzG,EAAC,EAAA,CAAU,UAAU,sBAAA,CAAwB,EACf,CAAA,EACX,CAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAA,CACf,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,GACJ,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,cAAA,CACf,YAAU,0BACV,UAAW,EACT,yHACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAA,EAAA,CAAgB,EACa,CAIpC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,gBAAA,CACf,YAAU,4BACV,UAAW,EACT,4HACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAA,EAAA,CAAkB,EACa"}
1
+ {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>\n\nexport type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}\n\nexport type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content>\n\nexport type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>\n\nexport type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>\n\nexport type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>\n\nfunction Select({ ...props }: SelectProps) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({ className, size = 'default', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === 'item-aligned'}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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',\n 'data-[align-trigger=true]:animate-none',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n 'data-[position=popper]:h-(--radix-select-trigger-height)',\n 'data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\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"],"mappings":"4QA6BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAG/D,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,kBAAmB,EAAU,CAAE,GAAI,GAAS,CAGnH,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAGtE,SAAS,cAAc,CAAE,YAAW,OAAO,UAAW,WAAU,GAAG,GAA6B,CAC9F,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,UAAW,EACT,qQACA,4EACA,qKACA,iGACA,qJACA,oFACA,kDACA,EACD,CACD,GAAI,YAEH,EACD,EAACA,EAAgB,KAAA,CAAK,QAAA,YACpB,EAAC,EAAA,CAAa,UAAU,mDAAA,CAAqD,EACxD,CAAA,EACC,CAI9B,SAAS,cAAc,CACrB,YACA,WACA,WAAW,eACX,QAAQ,SACR,GAAG,GACkB,CACrB,OACE,EAACA,EAAgB,OAAA,CAAA,SACf,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,qBAAoB,IAAa,eACjC,UAAW,EACT,2PACA,uIACA,8JACA,yCACA,IAAa,UACX,kIACF,EACD,CACS,WACH,QACP,GAAI,YAEJ,EAAC,qBAAA,EAAA,CAAuB,CACxB,EAACA,EAAgB,SAAA,CACf,gBAAe,EACf,UAAW,EACT,2DACA,4FACD,CAEA,YACwB,CAC3B,EAAC,uBAAA,EAAA,CAAyB,GACF,CAAA,CACH,CAI7B,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAA,CACf,YAAU,eACV,UAAW,EAAG,4CAA6C,EAAU,CACrE,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAA,CACf,YAAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,EACD,CACD,GAAI,YAEJ,EAAC,OAAA,CAAK,UAAU,wFACd,EAACA,EAAgB,cAAA,CAAA,SACf,EAAC,EAAA,CAAU,UAAU,sBAAA,CAAwB,CAAA,CACf,EAC3B,CACP,EAACA,EAAgB,SAAA,CAAU,WAAA,CAAoC,CAAA,EAC1C,CAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAA,CACf,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,GACJ,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAA,CACf,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAA,EAAA,CAAgB,EACc,CAIrC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAA,CACf,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAA,EAAA,CAAkB,EACc"}