@uselets/ui 0.4.0 → 0.6.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 (205) hide show
  1. package/README.md +81 -7
  2. package/dist/chunk-CHh1Zzun.js +1 -0
  3. package/dist/cli/uselets.mjs +7 -0
  4. package/dist/cli/uselets.mjs.map +1 -0
  5. package/dist/components/accordion.d.ts +6 -6
  6. package/dist/components/accordion.js +1 -1
  7. package/dist/components/accordion.js.map +1 -1
  8. package/dist/components/alert-dialog.d.ts +14 -14
  9. package/dist/components/alert-dialog.js +1 -1
  10. package/dist/components/alert-dialog.js.map +1 -1
  11. package/dist/components/alert.d.ts +8 -8
  12. package/dist/components/alert.js +1 -1
  13. package/dist/components/anchor.d.ts +24 -0
  14. package/dist/components/anchor.js +2 -0
  15. package/dist/components/anchor.js.map +1 -0
  16. package/dist/components/avatar.d.ts +8 -8
  17. package/dist/components/avatar.js +1 -1
  18. package/dist/components/badge.d.ts +5 -5
  19. package/dist/components/badge.js +1 -1
  20. package/dist/components/breadcrumb.d.ts +9 -9
  21. package/dist/components/breadcrumb.js +1 -1
  22. package/dist/components/breadcrumb.js.map +1 -1
  23. package/dist/components/button-group.d.ts +7 -7
  24. package/dist/components/button-group.js +1 -1
  25. package/dist/components/button.d.ts +9 -7
  26. package/dist/components/button.js +1 -1
  27. package/dist/components/button.js.map +1 -1
  28. package/dist/components/calendar.d.ts +7 -6
  29. package/dist/components/calendar.js +1 -1
  30. package/dist/components/calendar.js.map +1 -1
  31. package/dist/components/card.d.ts +9 -9
  32. package/dist/components/card.js +1 -1
  33. package/dist/components/carousel.d.ts +9 -7
  34. package/dist/components/carousel.js +1 -1
  35. package/dist/components/carousel.js.map +1 -1
  36. package/dist/components/center.d.ts +6 -6
  37. package/dist/components/center.js +1 -1
  38. package/dist/components/chart.d.ts +90 -90
  39. package/dist/components/chart.js +1 -1
  40. package/dist/components/chart.js.map +1 -1
  41. package/dist/components/checkbox.d.ts +6 -6
  42. package/dist/components/checkbox.js +1 -1
  43. package/dist/components/code.d.ts +13 -0
  44. package/dist/components/code.js +2 -0
  45. package/dist/components/code.js.map +1 -0
  46. package/dist/components/collapsible.d.ts +5 -5
  47. package/dist/components/collapsible.js +1 -1
  48. package/dist/components/collapsible.js.map +1 -1
  49. package/dist/components/combobox.d.ts +17 -17
  50. package/dist/components/combobox.js +1 -1
  51. package/dist/components/combobox.js.map +1 -1
  52. package/dist/components/command.d.ts +11 -11
  53. package/dist/components/command.js +1 -1
  54. package/dist/components/command.js.map +1 -1
  55. package/dist/components/container.d.ts +6 -6
  56. package/dist/components/container.js +1 -1
  57. package/dist/components/dialog.d.ts +15 -15
  58. package/dist/components/dialog.js +1 -1
  59. package/dist/components/drawer.d.ts +15 -15
  60. package/dist/components/drawer.js +1 -1
  61. package/dist/components/dropdown-menu.d.ts +17 -17
  62. package/dist/components/dropdown-menu.js +1 -1
  63. package/dist/components/dropzone.d.ts +107 -0
  64. package/dist/components/dropzone.js +2 -0
  65. package/dist/components/dropzone.js.map +1 -0
  66. package/dist/components/empty.d.ts +10 -10
  67. package/dist/components/empty.js +1 -1
  68. package/dist/components/field.d.ts +14 -14
  69. package/dist/components/field.js +1 -1
  70. package/dist/components/group.d.ts +6 -6
  71. package/dist/components/group.js +1 -1
  72. package/dist/components/heading.d.ts +22 -0
  73. package/dist/components/heading.js +2 -0
  74. package/dist/components/heading.js.map +1 -0
  75. package/dist/components/hover-card.d.ts +5 -5
  76. package/dist/components/hover-card.js +1 -1
  77. package/dist/components/hover-card.js.map +1 -1
  78. package/dist/components/input-group.d.ts +12 -11
  79. package/dist/components/input-group.js +1 -1
  80. package/dist/components/input-group.js.map +1 -1
  81. package/dist/components/input-otp.d.ts +6 -6
  82. package/dist/components/input-otp.js +1 -1
  83. package/dist/components/input-otp.js.map +1 -1
  84. package/dist/components/input.d.ts +3 -3
  85. package/dist/components/input.js +1 -1
  86. package/dist/components/kbd.d.ts +4 -4
  87. package/dist/components/kbd.js +1 -1
  88. package/dist/components/label.d.ts +3 -3
  89. package/dist/components/label.js +1 -1
  90. package/dist/components/list.d.ts +44 -0
  91. package/dist/components/list.js +2 -0
  92. package/dist/components/list.js.map +1 -0
  93. package/dist/components/native-select.d.ts +5 -5
  94. package/dist/components/native-select.js +1 -1
  95. package/dist/components/navigation-menu.d.ts +12 -12
  96. package/dist/components/navigation-menu.js +1 -1
  97. package/dist/components/navigation-menu.js.map +1 -1
  98. package/dist/components/pagination.d.ts +11 -10
  99. package/dist/components/pagination.js +1 -1
  100. package/dist/components/pagination.js.map +1 -1
  101. package/dist/components/popover.d.ts +9 -9
  102. package/dist/components/popover.js +1 -1
  103. package/dist/components/progress.d.ts +3 -3
  104. package/dist/components/progress.js +1 -1
  105. package/dist/components/radio-group.d.ts +4 -4
  106. package/dist/components/radio-group.js +1 -1
  107. package/dist/components/resizable.d.ts +5 -5
  108. package/dist/components/resizable.js +1 -1
  109. package/dist/components/scroll-area.d.ts +4 -4
  110. package/dist/components/scroll-area.js +1 -1
  111. package/dist/components/select.d.ts +12 -12
  112. package/dist/components/select.js +1 -1
  113. package/dist/components/separator.d.ts +3 -3
  114. package/dist/components/separator.js +1 -1
  115. package/dist/components/sheet.d.ts +12 -12
  116. package/dist/components/sheet.js +1 -1
  117. package/dist/components/sheet.js.map +1 -1
  118. package/dist/components/sidebar.d.ts +28 -28
  119. package/dist/components/sidebar.js +1 -1
  120. package/dist/components/sidebar.js.map +1 -1
  121. package/dist/components/skeleton.d.ts +3 -3
  122. package/dist/components/skeleton.js +1 -1
  123. package/dist/components/slider.d.ts +3 -3
  124. package/dist/components/slider.js +1 -1
  125. package/dist/components/sonner.d.ts +3 -3
  126. package/dist/components/sonner.js +1 -1
  127. package/dist/components/sonner.js.map +1 -1
  128. package/dist/components/spinner.d.ts +6 -6
  129. package/dist/components/spinner.js +1 -1
  130. package/dist/components/stack.d.ts +6 -6
  131. package/dist/components/stack.js +1 -1
  132. package/dist/components/switch.d.ts +3 -3
  133. package/dist/components/switch.js +1 -1
  134. package/dist/components/table.d.ts +10 -10
  135. package/dist/components/table.js +1 -1
  136. package/dist/components/table.js.map +1 -1
  137. package/dist/components/tabs.d.ts +8 -8
  138. package/dist/components/tabs.js +1 -1
  139. package/dist/components/tabs.js.map +1 -1
  140. package/dist/components/text.d.ts +22 -0
  141. package/dist/components/text.js +2 -0
  142. package/dist/components/text.js.map +1 -0
  143. package/dist/components/textarea.d.ts +3 -3
  144. package/dist/components/textarea.js +1 -1
  145. package/dist/components/theme.d.ts +4 -4
  146. package/dist/components/theme.js +1 -1
  147. package/dist/components/timeline.d.ts +63 -0
  148. package/dist/components/timeline.js +2 -0
  149. package/dist/components/timeline.js.map +1 -0
  150. package/dist/components/toggle-group.d.ts +4 -4
  151. package/dist/components/toggle-group.js +1 -1
  152. package/dist/components/toggle.d.ts +6 -6
  153. package/dist/components/toggle.js +1 -1
  154. package/dist/components/tooltip.d.ts +6 -6
  155. package/dist/components/tooltip.js +1 -1
  156. package/dist/hooks/use-disclosure.d.ts +23 -0
  157. package/dist/hooks/use-disclosure.js +2 -0
  158. package/dist/hooks/use-disclosure.js.map +1 -0
  159. package/dist/hooks/use-disclosure.spec.d.ts +1 -0
  160. package/dist/hooks/use-disclosure.spec.js +2 -0
  161. package/dist/hooks/use-disclosure.spec.js.map +1 -0
  162. package/dist/hooks/use-document-visibility.d.ts +7 -0
  163. package/dist/hooks/use-document-visibility.js +2 -0
  164. package/dist/hooks/use-document-visibility.js.map +1 -0
  165. package/dist/hooks/use-document-visibility.spec.d.ts +1 -0
  166. package/dist/hooks/use-document-visibility.spec.js +2 -0
  167. package/dist/hooks/use-document-visibility.spec.js.map +1 -0
  168. package/dist/hooks/use-idle.d.ts +14 -0
  169. package/dist/hooks/use-idle.js +2 -0
  170. package/dist/hooks/use-idle.js.map +1 -0
  171. package/dist/hooks/use-idle.spec.d.ts +1 -0
  172. package/dist/hooks/use-idle.spec.js +2 -0
  173. package/dist/hooks/use-idle.spec.js.map +1 -0
  174. package/dist/hooks/use-interval.d.ts +22 -0
  175. package/dist/hooks/use-interval.js +2 -0
  176. package/dist/hooks/use-interval.js.map +1 -0
  177. package/dist/hooks/use-interval.spec.d.ts +1 -0
  178. package/dist/hooks/use-interval.spec.js +2 -0
  179. package/dist/hooks/use-interval.spec.js.map +1 -0
  180. package/dist/hooks/use-local-storage.d.ts +17 -0
  181. package/dist/hooks/use-local-storage.js +2 -0
  182. package/dist/hooks/use-local-storage.js.map +1 -0
  183. package/dist/hooks/use-local-storage.spec.d.ts +1 -0
  184. package/dist/hooks/use-local-storage.spec.js +2 -0
  185. package/dist/hooks/use-local-storage.spec.js.map +1 -0
  186. package/dist/hooks/use-mobile.d.ts +1 -1
  187. package/dist/hooks/use-mobile.js +1 -1
  188. package/dist/hooks/use-mobile.spec.d.ts +1 -0
  189. package/dist/hooks/use-mobile.spec.js +2 -0
  190. package/dist/hooks/use-mobile.spec.js.map +1 -0
  191. package/dist/index.d.ts +16 -3
  192. package/dist/index.js +1 -1
  193. package/dist/lib/button.d.ts +16 -0
  194. package/dist/lib/button.js +2 -0
  195. package/dist/lib/button.js.map +1 -0
  196. package/dist/lib/utils.d.ts +3 -2
  197. package/dist/lib/utils.js +1 -1
  198. package/dist/lib/utils.js.map +1 -1
  199. package/dist/react.esm-BuxkFT_p.js +59 -0
  200. package/dist/react.esm-BuxkFT_p.js.map +1 -0
  201. package/dist/styles.css +2 -1437
  202. package/dist/themes/gomax.css +2 -0
  203. package/dist/themes/max.css +2 -0
  204. package/package.json +43 -27
  205. package/dist/chunk-IpJEthwI.js +0 -1
@@ -1,5 +1,5 @@
1
- import { t as __name } from "../chunk-IpJEthwI.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Combobox as Combobox$1 } from "@base-ui/react";
5
5
 
@@ -28,16 +28,16 @@ type ComboboxChipsInputProps = Combobox$1.Input.Props;
28
28
  declare const Combobox: typeof Combobox$1.Root;
29
29
  declare function ComboboxValue({
30
30
  ...props
31
- }: ComboboxValueProps): react_jsx_runtime0.JSX.Element;
31
+ }: ComboboxValueProps): _$react_jsx_runtime0.JSX.Element;
32
32
  declare function ComboboxTrigger({
33
33
  className,
34
34
  children,
35
35
  ...props
36
- }: ComboboxTriggerProps): react_jsx_runtime0.JSX.Element;
36
+ }: ComboboxTriggerProps): _$react_jsx_runtime0.JSX.Element;
37
37
  declare function ComboboxClear({
38
38
  className,
39
39
  ...props
40
- }: ComboboxClearProps): react_jsx_runtime0.JSX.Element;
40
+ }: ComboboxClearProps): _$react_jsx_runtime0.JSX.Element;
41
41
  declare function ComboboxInput({
42
42
  className,
43
43
  children,
@@ -45,7 +45,7 @@ declare function ComboboxInput({
45
45
  showTrigger,
46
46
  showClear,
47
47
  ...props
48
- }: ComboboxInputProps): react_jsx_runtime0.JSX.Element;
48
+ }: ComboboxInputProps): _$react_jsx_runtime0.JSX.Element;
49
49
  declare function ComboboxContent({
50
50
  className,
51
51
  side,
@@ -54,49 +54,49 @@ declare function ComboboxContent({
54
54
  alignOffset,
55
55
  anchor,
56
56
  ...props
57
- }: ComboboxContentProps): react_jsx_runtime0.JSX.Element;
57
+ }: ComboboxContentProps): _$react_jsx_runtime0.JSX.Element;
58
58
  declare function ComboboxList({
59
59
  className,
60
60
  ...props
61
- }: ComboboxListProps): react_jsx_runtime0.JSX.Element;
61
+ }: ComboboxListProps): _$react_jsx_runtime0.JSX.Element;
62
62
  declare function ComboboxItem({
63
63
  className,
64
64
  children,
65
65
  ...props
66
- }: ComboboxItemProps): react_jsx_runtime0.JSX.Element;
66
+ }: ComboboxItemProps): _$react_jsx_runtime0.JSX.Element;
67
67
  declare function ComboboxGroup({
68
68
  className,
69
69
  ...props
70
- }: ComboboxGroupProps): react_jsx_runtime0.JSX.Element;
70
+ }: ComboboxGroupProps): _$react_jsx_runtime0.JSX.Element;
71
71
  declare function ComboboxLabel({
72
72
  className,
73
73
  ...props
74
- }: ComboboxLabelProps): react_jsx_runtime0.JSX.Element;
74
+ }: ComboboxLabelProps): _$react_jsx_runtime0.JSX.Element;
75
75
  declare function ComboboxCollection({
76
76
  ...props
77
- }: ComboboxCollectionProps): react_jsx_runtime0.JSX.Element;
77
+ }: ComboboxCollectionProps): _$react_jsx_runtime0.JSX.Element;
78
78
  declare function ComboboxEmpty({
79
79
  className,
80
80
  ...props
81
- }: ComboboxEmptyProps): react_jsx_runtime0.JSX.Element;
81
+ }: ComboboxEmptyProps): _$react_jsx_runtime0.JSX.Element;
82
82
  declare function ComboboxSeparator({
83
83
  className,
84
84
  ...props
85
- }: ComboboxSeparatorProps): react_jsx_runtime0.JSX.Element;
85
+ }: ComboboxSeparatorProps): _$react_jsx_runtime0.JSX.Element;
86
86
  declare function ComboboxChips({
87
87
  className,
88
88
  ...props
89
- }: ComboboxChipsProps): react_jsx_runtime0.JSX.Element;
89
+ }: ComboboxChipsProps): _$react_jsx_runtime0.JSX.Element;
90
90
  declare function ComboboxChip({
91
91
  className,
92
92
  children,
93
93
  showRemove,
94
94
  ...props
95
- }: ComboboxChipProps): react_jsx_runtime0.JSX.Element;
95
+ }: ComboboxChipProps): _$react_jsx_runtime0.JSX.Element;
96
96
  declare function ComboboxChipsInput({
97
97
  className,
98
98
  ...props
99
- }: ComboboxChipsInputProps): react_jsx_runtime0.JSX.Element;
99
+ }: ComboboxChipsInputProps): _$react_jsx_runtime0.JSX.Element;
100
100
  declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
101
101
  //#endregion
102
102
  export { Combobox, ComboboxChip, ComboboxChipProps, ComboboxChips, ComboboxChipsInput, ComboboxChipsInputProps, ComboboxChipsProps, ComboboxClear, ComboboxClearProps, ComboboxCollection, ComboboxCollectionProps, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupProps, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxLabel, ComboboxLabelProps, ComboboxList, ComboboxListProps, ComboboxProps, ComboboxSeparator, ComboboxSeparatorProps, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxValueProps, useComboboxAnchor };
@@ -1,2 +1,2 @@
1
- import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{InputGroup as n,InputGroupAddon as r,InputGroupButton as i,InputGroupInput as a}from"./input-group.js";import{IconCheck as o,IconChevronDown as s,IconX as c}from"@tabler/icons-react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"react";import{Combobox as f}from"@base-ui/react";const p=f.Root;function ComboboxValue({...e}){return l(f.Value,{"data-slot":`combobox-value`,...e})}function ComboboxTrigger({className:t,children:n,...r}){return u(f.Trigger,{"data-slot":`combobox-trigger`,className:e(`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,l(s,{className:`pointer-events-none size-4 text-muted-foreground`})]})}function ComboboxClear({className:t,...n}){return l(f.Clear,{"data-slot":`combobox-clear`,render:l(i,{variant:`ghost`,size:`icon-xs`}),className:e(t),...n,children:l(c,{className:`pointer-events-none`})})}function ComboboxInput({className:t,children:o,disabled:s=!1,showTrigger:c=!0,showClear:d=!1,...p}){return u(n,{className:e(`w-auto`,t),children:[l(f.Input,{render:l(a,{disabled:s}),...p}),u(r,{align:`inline-end`,children:[c&&l(i,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:s,children:l(ComboboxTrigger,{})}),d&&l(ComboboxClear,{disabled:s})]}),o]})}function ComboboxContent({className:t,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:a=0,anchor:o,...s}){return l(f.Portal,{children:l(f.Positioner,{side:n,sideOffset:r,align:i,alignOffset:a,anchor:o,className:`isolate z-50`,children:l(f.Popup,{"data-slot":`combobox-content`,"data-chips":!!o,className:e(`group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!`,t),...s})})})}function ComboboxList({className:t,...n}){return l(f.List,{"data-slot":`combobox-list`,className:e(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,t),...n})}function ComboboxItem({className:t,children:n,...r}){return u(f.Item,{"data-slot":`combobox-item`,className:e(`relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,l(f.ItemIndicator,{render:l(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:l(o,{className:`pointer-events-none`})})]})}function ComboboxGroup({className:t,...n}){return l(f.Group,{"data-slot":`combobox-group`,className:e(t),...n})}function ComboboxLabel({className:t,...n}){return l(f.GroupLabel,{"data-slot":`combobox-label`,className:e(`px-2 py-1.5 text-xs text-muted-foreground`,t),...n})}function ComboboxCollection({...e}){return l(f.Collection,{"data-slot":`combobox-collection`,...e})}function ComboboxEmpty({className:t,...n}){return l(f.Empty,{"data-slot":`combobox-empty`,className:e(`hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex`,t),...n})}function ComboboxSeparator({className:t,...n}){return l(f.Separator,{"data-slot":`combobox-separator`,className:e(`-mx-1 my-1 h-px bg-border`,t),...n})}function ComboboxChips({className:t,...n}){return l(f.Chips,{"data-slot":`combobox-chips`,className:e(`flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40`,t),...n})}function ComboboxChip({className:n,children:r,showRemove:i=!0,...a}){return u(f.Chip,{"data-slot":`combobox-chip`,className:e(`flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0`,n),...a,children:[r,i&&l(f.ChipRemove,{render:l(t,{variant:`ghost`,size:`icon-xs`}),className:`-ml-1 opacity-50 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:l(c,{className:`pointer-events-none`})})]})}function ComboboxChipsInput({className:t,...n}){return l(f.Input,{"data-slot":`combobox-chip-input`,className:e(`min-w-16 flex-1 outline-none`,t),...n})}function useComboboxAnchor(){return d.useRef(null)}export{p as Combobox,ComboboxChip,ComboboxChips,ComboboxChipsInput,ComboboxClear,ComboboxCollection,ComboboxContent,ComboboxEmpty,ComboboxGroup,ComboboxInput,ComboboxItem,ComboboxLabel,ComboboxList,ComboboxSeparator,ComboboxTrigger,ComboboxValue,useComboboxAnchor};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{InputGroup as n,InputGroupAddon as r,InputGroupButton as i,InputGroupInput as a}from"./input-group.js";import{IconCheck as o,IconChevronDown as s,IconX as c}from"@tabler/icons-react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"react";import{Combobox as f}from"@base-ui/react";const p=f.Root;function ComboboxValue({...e}){return l(f.Value,{"data-slot":`combobox-value`,...e})}function ComboboxTrigger({className:t,children:n,...r}){return u(f.Trigger,{"data-slot":`combobox-trigger`,className:e(`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,l(s,{className:`pointer-events-none size-4 text-muted-foreground`})]})}function ComboboxClear({className:t,...n}){return l(f.Clear,{"data-slot":`combobox-clear`,render:l(i,{variant:`ghost`,size:`icon-xs`}),className:e(t),...n,children:l(c,{className:`pointer-events-none`})})}function ComboboxInput({className:t,children:o,disabled:s=!1,showTrigger:c=!0,showClear:d=!1,...p}){return u(n,{className:e(`w-auto`,t),children:[l(f.Input,{render:l(a,{disabled:s}),...p}),u(r,{align:`inline-end`,children:[c&&l(i,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:s,children:l(ComboboxTrigger,{})}),d&&l(ComboboxClear,{disabled:s})]}),o]})}function ComboboxContent({className:t,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:a=0,anchor:o,...s}){return l(f.Portal,{children:l(f.Positioner,{side:n,sideOffset:r,align:i,alignOffset:a,anchor:o,className:`isolate z-50`,children:l(f.Popup,{"data-slot":`combobox-content`,"data-chips":!!o,className:e(`group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!`,t),...s})})})}function ComboboxList({className:t,...n}){return l(f.List,{"data-slot":`combobox-list`,className:e(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,t),...n})}function ComboboxItem({className:t,children:n,...r}){return u(f.Item,{"data-slot":`combobox-item`,className:e(`relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,l(f.ItemIndicator,{render:l(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:l(o,{className:`pointer-events-none`})})]})}function ComboboxGroup({className:t,...n}){return l(f.Group,{"data-slot":`combobox-group`,className:e(t),...n})}function ComboboxLabel({className:t,...n}){return l(f.GroupLabel,{"data-slot":`combobox-label`,className:e(`px-2 py-1.5 text-xs text-muted-foreground`,t),...n})}function ComboboxCollection({...e}){return l(f.Collection,{"data-slot":`combobox-collection`,...e})}function ComboboxEmpty({className:t,...n}){return l(f.Empty,{"data-slot":`combobox-empty`,className:e(`hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex`,t),...n})}function ComboboxSeparator({className:t,...n}){return l(f.Separator,{"data-slot":`combobox-separator`,className:e(`-mx-1 my-1 h-px bg-border`,t),...n})}function ComboboxChips({className:t,...n}){return l(f.Chips,{"data-slot":`combobox-chips`,className:e(`flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40`,t),...n})}function ComboboxChip({className:n,children:r,showRemove:i=!0,...a}){return u(f.Chip,{"data-slot":`combobox-chip`,className:e(`flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0`,n),...a,children:[r,i&&l(f.ChipRemove,{render:l(t,{variant:`ghost`,color:`zinc`,size:`icon-xs`}),className:`-ml-1 opacity-50 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:l(c,{className:`pointer-events-none`})})]})}function ComboboxChipsInput({className:t,...n}){return l(f.Input,{"data-slot":`combobox-chip-input`,className:e(`min-w-16 flex-1 outline-none`,t),...n})}function useComboboxAnchor(){return d.useRef(null)}export{p as Combobox,ComboboxChip,ComboboxChips,ComboboxChipsInput,ComboboxClear,ComboboxCollection,ComboboxContent,ComboboxEmpty,ComboboxGroup,ComboboxInput,ComboboxItem,ComboboxLabel,ComboboxList,ComboboxSeparator,ComboboxTrigger,ComboboxValue,useComboboxAnchor};
2
2
  //# sourceMappingURL=combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","names":["ComboboxPrimitive"],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react'\nimport { IconCheck, IconChevronDown, IconX } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from './input-group'\n\nexport type ComboboxProps = React.ComponentProps<typeof ComboboxPrimitive.Root>\n\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nexport type ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'>\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props\n\nexport type ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\n\nexport type ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props\n\nexport type ComboboxChipsProps = React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props\n\nexport type ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}\n\nexport type ComboboxChipsInputProps = ComboboxPrimitive.Input.Props\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxValueProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <IconChevronDown className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxInputProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.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 </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({ className, children, showRemove = true, ...props }: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0',\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxClear,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"combobox.js","names":["ComboboxPrimitive"],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react'\nimport { IconCheck, IconChevronDown, IconX } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from './input-group'\n\nexport type ComboboxProps = React.ComponentProps<typeof ComboboxPrimitive.Root>\n\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nexport type ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'>\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props\n\nexport type ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\n\nexport type ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props\n\nexport type ComboboxChipsProps = React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props\n\nexport type ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}\n\nexport type ComboboxChipsInputProps = ComboboxPrimitive.Input.Props\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxValueProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <IconChevronDown className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxInputProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.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 </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({ className, children, showRemove = true, ...props }: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0',\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" color=\"zinc\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxClear,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor\n}\n"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
- import { t as __name } from "../chunk-IpJEthwI.js";
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
2
  import { Dialog } from "./dialog.js";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import * as React from "react";
5
5
  import { Command as Command$1 } from "cmdk";
6
6
 
@@ -22,7 +22,7 @@ type CommandShortcutProps = React.ComponentProps<'span'>;
22
22
  declare function Command({
23
23
  className,
24
24
  ...props
25
- }: CommandProps): react_jsx_runtime0.JSX.Element;
25
+ }: CommandProps): _$react_jsx_runtime0.JSX.Element;
26
26
  declare function CommandDialog({
27
27
  title,
28
28
  description,
@@ -30,36 +30,36 @@ declare function CommandDialog({
30
30
  className,
31
31
  showCloseButton,
32
32
  ...props
33
- }: CommandDialogProps): react_jsx_runtime0.JSX.Element;
33
+ }: CommandDialogProps): _$react_jsx_runtime0.JSX.Element;
34
34
  declare function CommandInput({
35
35
  className,
36
36
  ...props
37
- }: CommandInputProps): react_jsx_runtime0.JSX.Element;
37
+ }: CommandInputProps): _$react_jsx_runtime0.JSX.Element;
38
38
  declare function CommandList({
39
39
  className,
40
40
  ...props
41
- }: CommandListProps): react_jsx_runtime0.JSX.Element;
41
+ }: CommandListProps): _$react_jsx_runtime0.JSX.Element;
42
42
  declare function CommandEmpty({
43
43
  className,
44
44
  ...props
45
- }: CommandEmptyProps): react_jsx_runtime0.JSX.Element;
45
+ }: CommandEmptyProps): _$react_jsx_runtime0.JSX.Element;
46
46
  declare function CommandGroup({
47
47
  className,
48
48
  ...props
49
- }: CommandGroupProps): react_jsx_runtime0.JSX.Element;
49
+ }: CommandGroupProps): _$react_jsx_runtime0.JSX.Element;
50
50
  declare function CommandSeparator({
51
51
  className,
52
52
  ...props
53
- }: CommandSeparatorProps): react_jsx_runtime0.JSX.Element;
53
+ }: CommandSeparatorProps): _$react_jsx_runtime0.JSX.Element;
54
54
  declare function CommandItem({
55
55
  className,
56
56
  children,
57
57
  ...props
58
- }: CommandItemProps): react_jsx_runtime0.JSX.Element;
58
+ }: CommandItemProps): _$react_jsx_runtime0.JSX.Element;
59
59
  declare function CommandShortcut({
60
60
  className,
61
61
  ...props
62
- }: CommandShortcutProps): react_jsx_runtime0.JSX.Element;
62
+ }: CommandShortcutProps): _$react_jsx_runtime0.JSX.Element;
63
63
  //#endregion
64
64
  export { Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps };
65
65
  //# sourceMappingURL=command.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{InputGroup as t,InputGroupAddon as n}from"./input-group.js";import{Dialog as r,DialogContent as i,DialogDescription as a,DialogHeader as o,DialogTitle as s}from"./dialog.js";import{IconCheck as c,IconSearch as l}from"@tabler/icons-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{Command as f}from"cmdk";function Command({className:t,...n}){return u(f,{"data-slot":`command`,className:e(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,t),...n})}function CommandDialog({title:t=`Command Palette`,description:n=`Search for a command to run...`,children:c,className:l,showCloseButton:f=!1,...p}){return d(r,{...p,children:[d(o,{className:`sr-only`,children:[u(s,{children:t}),u(a,{children:n})]}),u(i,{className:e(`top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0`,l),showCloseButton:f,children:c})]})}function CommandInput({className:r,...i}){return u(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:d(t,{className:e(`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!`,`*:data-[slot=input-group-addon]:pl-2!`),children:[u(f.Input,{"data-slot":`command-input`,className:e(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,r),...i}),u(n,{children:u(l,{className:`size-4 shrink-0 opacity-50`})})]})})}function CommandList({className:t,...n}){return u(f.List,{"data-slot":`command-list`,className:e(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,t),...n})}function CommandEmpty({className:t,...n}){return u(f.Empty,{"data-slot":`command-empty`,className:e(`py-6 text-center text-sm`,t),...n})}function CommandGroup({className:t,...n}){return u(f.Group,{"data-slot":`command-group`,className:e(`overflow-hidden p-1 text-foreground`,`**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5`,`**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,`**:[[cmdk-group-heading]]:text-muted-foreground`,t),...n})}function CommandSeparator({className:t,...n}){return u(f.Separator,{"data-slot":`command-separator`,className:e(`-mx-1 h-px bg-border`,t),...n})}function CommandItem({className:t,children:n,...r}){return d(f.Item,{"data-slot":`command-item`,className:e(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none`,`in-data-[slot=dialog-content]:rounded-lg!`,`data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,u(c,{className:e(`ml-auto opacity-0`,`group-has-data-[slot=command-shortcut]/command-item:hidden`,`group-data-[checked=true]/command-item:opacity-100`)})]})}function CommandShortcut({className:t,...n}){return u(`span`,{"data-slot":`command-shortcut`,className:e(`ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground`,t),...n})}export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{InputGroup as t,InputGroupAddon as n}from"./input-group.js";import{Dialog as r,DialogContent as i,DialogDescription as a,DialogHeader as o,DialogTitle as s}from"./dialog.js";import{IconCheck as c,IconSearch as l}from"@tabler/icons-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{Command as f}from"cmdk";function Command({className:t,...n}){return u(f,{"data-slot":`command`,className:e(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,t),...n})}function CommandDialog({title:t=`Command Palette`,description:n=`Search for a command to run...`,children:c,className:l,showCloseButton:f=!1,...p}){return d(r,{...p,children:[d(o,{className:`sr-only`,children:[u(s,{children:t}),u(a,{children:n})]}),u(i,{className:e(`top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0`,l),showCloseButton:f,children:c})]})}function CommandInput({className:r,...i}){return u(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:d(t,{className:e(`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!`,`*:data-[slot=input-group-addon]:pl-2!`),children:[u(f.Input,{"data-slot":`command-input`,className:e(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,r),...i}),u(n,{children:u(l,{className:`size-4 shrink-0 opacity-50`})})]})})}function CommandList({className:t,...n}){return u(f.List,{"data-slot":`command-list`,className:e(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,t),...n})}function CommandEmpty({className:t,...n}){return u(f.Empty,{"data-slot":`command-empty`,className:e(`py-6 text-center text-sm`,t),...n})}function CommandGroup({className:t,...n}){return u(f.Group,{"data-slot":`command-group`,className:e(`overflow-hidden p-1 text-foreground`,`**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5`,`**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,`**:[[cmdk-group-heading]]:text-muted-foreground`,t),...n})}function CommandSeparator({className:t,...n}){return u(f.Separator,{"data-slot":`command-separator`,className:e(`-mx-1 h-px bg-border`,t),...n})}function CommandItem({className:t,children:n,...r}){return d(f.Item,{"data-slot":`command-item`,className:e(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none`,`in-data-[slot=dialog-content]:rounded-lg!`,`data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,u(c,{className:e(`ml-auto opacity-0`,`group-has-data-[slot=command-shortcut]/command-item:hidden`,`group-data-[checked=true]/command-item:opacity-100`)})]})}function CommandShortcut({className:t,...n}){return u(`span`,{"data-slot":`command-shortcut`,className:e(`ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground`,t),...n})}export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut};
2
2
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../src/components/command.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconSearch } from '@tabler/icons-react'\nimport { Command as CommandPrimitive } from 'cmdk'\n\nimport { cn } from '../lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog'\nimport { InputGroup, InputGroupAddon } from './input-group'\n\nexport type CommandProps = React.ComponentProps<typeof CommandPrimitive>\n\nexport type CommandDialogProps = React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}\n\nexport type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input>\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>\n\nexport type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>\n\nexport type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>\n\nexport type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>\n\nexport type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>\n\nexport type CommandShortcutProps = React.ComponentProps<'span'>\n\nfunction Command({ className, ...props }: CommandProps) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({ className, ...props }: CommandInputProps) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup\n className={cn(\n 'h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!',\n '*:data-[slot=input-group-addon]:pl-2!'\n )}\n >\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({ className, ...props }: CommandListProps) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({ className, ...props }: CommandGroupProps) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'overflow-hidden p-1 text-foreground',\n '**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5',\n '**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n '**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({ className, ...props }: CommandSeparatorProps) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({ className, children, ...props }: CommandItemProps) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'in-data-[slot=dialog-content]:rounded-lg!',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n 'data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconCheck\n className={cn(\n 'ml-auto opacity-0',\n 'group-has-data-[slot=command-shortcut]/command-item:hidden',\n 'group-data-[checked=true]/command-item:opacity-100'\n )}\n />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator\n}\n"],"mappings":"wYAgCA,SAAS,QAAQ,CAAE,YAAW,GAAG,GAAuB,CACtD,OACE,EAACA,EAAD,CACE,YAAU,UACV,UAAW,EACT,6FACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,cAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GACkB,CACrB,OACE,EAAC,EAAD,CAAQ,GAAI,WAAZ,CACE,EAAC,EAAD,CAAc,UAAU,mBAAxB,CACE,EAAC,EAAD,CAAA,SAAc,EAAoB,CAAA,CAClC,EAAC,EAAD,CAAA,SAAoB,EAAgC,CAAA,CACvC,GACf,EAAC,EAAD,CACE,UAAW,EAAG,wDAAyD,EAAU,CAChE,kBAEhB,WACa,CAAA,CACT,GAIb,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAAC,MAAD,CAAK,YAAU,wBAAwB,UAAU,oBAC/C,EAAC,EAAD,CACE,UAAW,EACT,4DACA,wCACD,UAJH,CAME,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EAAG,gFAAiF,EAAU,CACzG,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CAAA,SACE,EAAC,EAAD,CAAY,UAAU,6BAA+B,CAAA,CACrC,CAAA,CACP,GACT,CAAA,CAIV,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EAAG,mFAAoF,EAAU,CAC5G,GAAI,EACJ,CAAA,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EAAG,2BAA4B,EAAU,CACpD,GAAI,EACJ,CAAA,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EACT,sCACA,kEACA,0EACA,kDACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAACA,EAAiB,UAAlB,CACE,YAAU,oBACV,UAAW,EAAG,uBAAwB,EAAU,CAChD,GAAI,EACJ,CAAA,CAIN,SAAS,YAAY,CAAE,YAAW,WAAU,GAAG,GAA2B,CACxE,OACE,EAACA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EACT,+HACA,4CACA,2EACA,6FACA,oFACA,EACD,CACD,GAAI,WAVN,CAYG,EACD,EAAC,EAAD,CACE,UAAW,EACT,oBACA,6DACA,qDACD,CACD,CAAA,CACoB,GAI5B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAAC,OAAD,CACE,YAAU,mBACV,UAAW,EACT,yGACA,EACD,CACD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../src/components/command.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconSearch } from '@tabler/icons-react'\nimport { Command as CommandPrimitive } from 'cmdk'\n\nimport { cn } from '../lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog'\nimport { InputGroup, InputGroupAddon } from './input-group'\n\nexport type CommandProps = React.ComponentProps<typeof CommandPrimitive>\n\nexport type CommandDialogProps = React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}\n\nexport type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input>\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>\n\nexport type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>\n\nexport type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>\n\nexport type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>\n\nexport type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>\n\nexport type CommandShortcutProps = React.ComponentProps<'span'>\n\nfunction Command({ className, ...props }: CommandProps) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({ className, ...props }: CommandInputProps) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup\n className={cn(\n 'h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!',\n '*:data-[slot=input-group-addon]:pl-2!'\n )}\n >\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({ className, ...props }: CommandListProps) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({ className, ...props }: CommandGroupProps) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'overflow-hidden p-1 text-foreground',\n '**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5',\n '**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n '**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({ className, ...props }: CommandSeparatorProps) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({ className, children, ...props }: CommandItemProps) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'in-data-[slot=dialog-content]:rounded-lg!',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n 'data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconCheck\n className={cn(\n 'ml-auto opacity-0',\n 'group-has-data-[slot=command-shortcut]/command-item:hidden',\n 'group-data-[checked=true]/command-item:opacity-100'\n )}\n />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut\n}\n"],"mappings":"wYAgCA,SAAS,QAAQ,CAAE,YAAW,GAAG,GAAuB,CACtD,OACE,EAACA,EAAD,CACE,YAAU,UACV,UAAW,EACT,6FACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,cAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GACkB,CACrB,OACE,EAAC,EAAD,CAAQ,GAAI,WAAZ,CACE,EAAC,EAAD,CAAc,UAAU,mBAAxB,CACE,EAAC,EAAD,CAAA,SAAc,EAAoB,CAAA,CAClC,EAAC,EAAD,CAAA,SAAoB,EAAgC,CAAA,CACvC,GACf,EAAC,EAAD,CACE,UAAW,EAAG,wDAAyD,EAAU,CAChE,kBAEhB,WACa,CAAA,CACT,GAIb,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAAC,MAAD,CAAK,YAAU,wBAAwB,UAAU,oBAC/C,EAAC,EAAD,CACE,UAAW,EACT,4DACA,wCACD,UAJH,CAME,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EAAG,gFAAiF,EAAU,CACzG,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CAAA,SACE,EAAC,EAAD,CAAY,UAAU,6BAA+B,CAAA,CACrC,CAAA,CACP,GACT,CAAA,CAIV,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EAAG,mFAAoF,EAAU,CAC5G,GAAI,EACJ,CAAA,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EAAG,2BAA4B,EAAU,CACpD,GAAI,EACJ,CAAA,CAIN,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAACA,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAW,EACT,sCACA,kEACA,0EACA,kDACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAACA,EAAiB,UAAlB,CACE,YAAU,oBACV,UAAW,EAAG,uBAAwB,EAAU,CAChD,GAAI,EACJ,CAAA,CAIN,SAAS,YAAY,CAAE,YAAW,WAAU,GAAG,GAA2B,CACxE,OACE,EAACA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EACT,+HACA,4CACA,2EACA,6FACA,oFACA,EACD,CACD,GAAI,WAVN,CAYG,EACD,EAAC,EAAD,CACE,UAAW,EACT,oBACA,6DACA,qDACD,CACD,CAAA,CACoB,GAI5B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAAC,OAAD,CACE,YAAU,mBACV,UAAW,EACT,yGACA,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -1,19 +1,19 @@
1
- import { t as __name } from "../chunk-IpJEthwI.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import * as React from "react";
5
- import * as class_variance_authority_types0 from "class-variance-authority/types";
5
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
6
 
7
7
  //#region src/components/container.d.ts
8
8
  declare const containerVariants: (props?: ({
9
- size?: "sm" | "lg" | "md" | "full" | null | undefined;
10
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ size?: "sm" | "md" | "lg" | "full" | null | undefined;
10
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  type ContainerProps = React.ComponentProps<'div'> & VariantProps<typeof containerVariants>;
12
12
  declare function Container({
13
13
  className,
14
14
  size,
15
15
  ...props
16
- }: ContainerProps): react_jsx_runtime0.JSX.Element;
16
+ }: ContainerProps): _$react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { Container, ContainerProps, containerVariants };
19
19
  //# sourceMappingURL=container.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`mx-auto w-full`,{variants:{size:{sm:`max-w-3xl px-4 sm:px-6`,md:`max-w-5xl px-4 sm:px-6 lg:px-8`,lg:`max-w-7xl px-4 sm:px-6 lg:px-8`,full:`max-w-none px-4 sm:px-6 lg:px-8`}},defaultVariants:{size:`lg`}});function Container({className:n,size:i=`lg`,...a}){return t(`div`,{"data-slot":`container`,"data-size":i,className:e(r({size:i}),n),...a})}export{Container,r as containerVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`mx-auto w-full`,{variants:{size:{sm:`max-w-3xl px-4 sm:px-6`,md:`max-w-5xl px-4 sm:px-6 lg:px-8`,lg:`max-w-7xl px-4 sm:px-6 lg:px-8`,full:`max-w-none px-4 sm:px-6 lg:px-8`}},defaultVariants:{size:`lg`}});function Container({className:n,size:i=`lg`,...a}){return t(`div`,{"data-slot":`container`,"data-size":i,className:e(r({size:i}),n),...a})}export{Container,r as containerVariants};
2
2
  //# sourceMappingURL=container.js.map
@@ -1,14 +1,14 @@
1
- import { t as __name } from "../chunk-IpJEthwI.js";
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
2
  import { Dialog as Dialog$1 } from "radix-ui";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import * as React from "react";
6
- import * as class_variance_authority_types0 from "class-variance-authority/types";
6
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
7
7
 
8
8
  //#region src/components/dialog.d.ts
9
9
  declare const dialogContentVariants: (props?: ({
10
- size?: "sm" | "lg" | "md" | "xl" | "2xl" | null | undefined;
11
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
11
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type DialogSize = NonNullable<VariantProps<typeof dialogContentVariants>['size']>;
13
13
  type DialogProps = React.ComponentProps<typeof Dialog$1.Root> & {
14
14
  size?: DialogSize;
@@ -33,48 +33,48 @@ type DialogDescriptionProps = React.ComponentProps<typeof Dialog$1.Description>;
33
33
  declare function Dialog({
34
34
  size,
35
35
  ...props
36
- }: DialogProps): react_jsx_runtime0.JSX.Element;
36
+ }: DialogProps): _$react_jsx_runtime0.JSX.Element;
37
37
  declare function DialogTrigger({
38
38
  render,
39
39
  children,
40
40
  ...props
41
- }: DialogTriggerProps): react_jsx_runtime0.JSX.Element;
41
+ }: DialogTriggerProps): _$react_jsx_runtime0.JSX.Element;
42
42
  declare function DialogPortal({
43
43
  ...props
44
- }: DialogPortalProps): react_jsx_runtime0.JSX.Element;
44
+ }: DialogPortalProps): _$react_jsx_runtime0.JSX.Element;
45
45
  declare function DialogClose({
46
46
  render,
47
47
  children,
48
48
  ...props
49
- }: DialogCloseProps): react_jsx_runtime0.JSX.Element;
49
+ }: DialogCloseProps): _$react_jsx_runtime0.JSX.Element;
50
50
  declare function DialogOverlay({
51
51
  className,
52
52
  ...props
53
- }: DialogOverlayProps): react_jsx_runtime0.JSX.Element;
53
+ }: DialogOverlayProps): _$react_jsx_runtime0.JSX.Element;
54
54
  declare function DialogContent({
55
55
  className,
56
56
  children,
57
57
  showCloseButton,
58
58
  ...props
59
- }: DialogContentProps): react_jsx_runtime0.JSX.Element;
59
+ }: DialogContentProps): _$react_jsx_runtime0.JSX.Element;
60
60
  declare function DialogHeader({
61
61
  className,
62
62
  ...props
63
- }: DialogHeaderProps): react_jsx_runtime0.JSX.Element;
63
+ }: DialogHeaderProps): _$react_jsx_runtime0.JSX.Element;
64
64
  declare function DialogFooter({
65
65
  className,
66
66
  showCloseButton,
67
67
  children,
68
68
  ...props
69
- }: DialogFooterProps): react_jsx_runtime0.JSX.Element;
69
+ }: DialogFooterProps): _$react_jsx_runtime0.JSX.Element;
70
70
  declare function DialogTitle({
71
71
  className,
72
72
  ...props
73
- }: DialogTitleProps): react_jsx_runtime0.JSX.Element;
73
+ }: DialogTitleProps): _$react_jsx_runtime0.JSX.Element;
74
74
  declare function DialogDescription({
75
75
  className,
76
76
  ...props
77
- }: DialogDescriptionProps): react_jsx_runtime0.JSX.Element;
77
+ }: DialogDescriptionProps): _$react_jsx_runtime0.JSX.Element;
78
78
  //#endregion
79
79
  export { Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlay, DialogOverlayProps, DialogPortal, DialogPortalProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps };
80
80
  //# sourceMappingURL=dialog.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconX as n}from"@tabler/icons-react";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";import*as s from"react";const c=o(`bg-background 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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,{variants:{size:{sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`}},defaultVariants:{size:`sm`}}),l=s.createContext({size:`sm`});function Dialog({size:e=`sm`,...t}){let n=s.useMemo(()=>({size:e}),[e]);return i(l.Provider,{value:n,children:i(r.Root,{"data-slot":`dialog`,...t})})}function DialogTrigger({render:e,children:t,...n}){return e?i(r.Trigger,{"data-slot":`dialog-trigger`,asChild:!0,...n,children:e}):i(r.Trigger,{"data-slot":`dialog-trigger`,...n,children:t})}function DialogPortal({...e}){return i(r.Portal,{"data-slot":`dialog-portal`,...e})}function DialogClose({render:e,children:t,...n}){return e?i(r.Close,{"data-slot":`dialog-close`,asChild:!0,...n,children:e}):i(r.Close,{"data-slot":`dialog-close`,...n,children:t})}function DialogOverlay({className:t,...n}){return i(r.Overlay,{"data-slot":`dialog-overlay`,className:e(`bg-black/10 fixed inset-0 isolate z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`duration-100 supports-backdrop-filter:backdrop-blur-xs`,t),...n})}function DialogContent({className:o,children:u,showCloseButton:d=!0,...f}){let{size:p}=s.useContext(l);return a(DialogPortal,{children:[i(DialogOverlay,{}),a(r.Content,{"data-slot":`dialog-content`,className:e(c({size:p}),o),...f,children:[u,d&&i(r.Close,{"data-slot":`dialog-close`,asChild:!0,children:a(t,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DialogHeader({className:t,...n}){return i(`div`,{"data-slot":`dialog-header`,className:e(`gap-2 flex flex-col`,t),...n})}function DialogFooter({className:n,showCloseButton:o=!1,children:s,...c}){return a(`div`,{"data-slot":`dialog-footer`,className:e(`bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4`,`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,n),...c,children:[s,o&&i(r.Close,{asChild:!0,children:i(t,{variant:`outline`,children:`Close`})})]})}function DialogTitle({className:t,...n}){return i(r.Title,{"data-slot":`dialog-title`,className:e(`text-base leading-none font-medium`,t),...n})}function DialogDescription({className:t,...n}){return i(r.Description,{"data-slot":`dialog-description`,className:e(`text-muted-foreground text-sm`,`*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,t),...n})}export{Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconX as n}from"@tabler/icons-react";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";import*as s from"react";const c=o(`bg-background 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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,{variants:{size:{sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`}},defaultVariants:{size:`sm`}}),l=s.createContext({size:`sm`});function Dialog({size:e=`sm`,...t}){let n=s.useMemo(()=>({size:e}),[e]);return i(l.Provider,{value:n,children:i(r.Root,{"data-slot":`dialog`,...t})})}function DialogTrigger({render:e,children:t,...n}){return e?i(r.Trigger,{"data-slot":`dialog-trigger`,asChild:!0,...n,children:e}):i(r.Trigger,{"data-slot":`dialog-trigger`,...n,children:t})}function DialogPortal({...e}){return i(r.Portal,{"data-slot":`dialog-portal`,...e})}function DialogClose({render:e,children:t,...n}){return e?i(r.Close,{"data-slot":`dialog-close`,asChild:!0,...n,children:e}):i(r.Close,{"data-slot":`dialog-close`,...n,children:t})}function DialogOverlay({className:t,...n}){return i(r.Overlay,{"data-slot":`dialog-overlay`,className:e(`bg-black/10 fixed inset-0 isolate z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`duration-100 supports-backdrop-filter:backdrop-blur-xs`,t),...n})}function DialogContent({className:o,children:u,showCloseButton:d=!0,...f}){let{size:p}=s.useContext(l);return a(DialogPortal,{children:[i(DialogOverlay,{}),a(r.Content,{"data-slot":`dialog-content`,className:e(c({size:p}),o),...f,children:[u,d&&i(r.Close,{"data-slot":`dialog-close`,asChild:!0,children:a(t,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function DialogHeader({className:t,...n}){return i(`div`,{"data-slot":`dialog-header`,className:e(`gap-2 flex flex-col`,t),...n})}function DialogFooter({className:n,showCloseButton:o=!1,children:s,...c}){return a(`div`,{"data-slot":`dialog-footer`,className:e(`bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4`,`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,n),...c,children:[s,o&&i(r.Close,{asChild:!0,children:i(t,{variant:`outline`,children:`Close`})})]})}function DialogTitle({className:t,...n}){return i(r.Title,{"data-slot":`dialog-title`,className:e(`text-base leading-none font-medium`,t),...n})}function DialogDescription({className:t,...n}){return i(r.Description,{"data-slot":`dialog-description`,className:e(`text-muted-foreground text-sm`,`*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,t),...n})}export{Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,14 +1,14 @@
1
- import { t as __name } from "../chunk-IpJEthwI.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import * as React from "react";
5
5
  import { Drawer as Drawer$1 } from "vaul";
6
- import * as class_variance_authority_types0 from "class-variance-authority/types";
6
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
7
7
 
8
8
  //#region src/components/drawer.d.ts
9
9
  declare const drawerContentVariants: (props?: ({
10
- size?: "sm" | "lg" | "md" | null | undefined;
11
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ size?: "sm" | "md" | "lg" | null | undefined;
11
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type DrawerSize = NonNullable<VariantProps<typeof drawerContentVariants>['size']>;
13
13
  type DrawerProps = React.ComponentProps<typeof Drawer$1.Root> & {
14
14
  size?: DrawerSize;
@@ -25,41 +25,41 @@ type DrawerDescriptionProps = React.ComponentProps<typeof Drawer$1.Description>;
25
25
  declare function Drawer({
26
26
  size,
27
27
  ...props
28
- }: DrawerProps): react_jsx_runtime0.JSX.Element;
28
+ }: DrawerProps): _$react_jsx_runtime0.JSX.Element;
29
29
  declare function DrawerTrigger({
30
30
  ...props
31
- }: DrawerTriggerProps): react_jsx_runtime0.JSX.Element;
31
+ }: DrawerTriggerProps): _$react_jsx_runtime0.JSX.Element;
32
32
  declare function DrawerPortal({
33
33
  ...props
34
- }: DrawerPortalProps): react_jsx_runtime0.JSX.Element;
34
+ }: DrawerPortalProps): _$react_jsx_runtime0.JSX.Element;
35
35
  declare function DrawerClose({
36
36
  ...props
37
- }: DrawerCloseProps): react_jsx_runtime0.JSX.Element;
37
+ }: DrawerCloseProps): _$react_jsx_runtime0.JSX.Element;
38
38
  declare function DrawerOverlay({
39
39
  className,
40
40
  ...props
41
- }: DrawerOverlayProps): react_jsx_runtime0.JSX.Element;
41
+ }: DrawerOverlayProps): _$react_jsx_runtime0.JSX.Element;
42
42
  declare function DrawerContent({
43
43
  className,
44
44
  children,
45
45
  ...props
46
- }: DrawerContentProps): react_jsx_runtime0.JSX.Element;
46
+ }: DrawerContentProps): _$react_jsx_runtime0.JSX.Element;
47
47
  declare function DrawerHeader({
48
48
  className,
49
49
  ...props
50
- }: DrawerHeaderProps): react_jsx_runtime0.JSX.Element;
50
+ }: DrawerHeaderProps): _$react_jsx_runtime0.JSX.Element;
51
51
  declare function DrawerFooter({
52
52
  className,
53
53
  ...props
54
- }: DrawerFooterProps): react_jsx_runtime0.JSX.Element;
54
+ }: DrawerFooterProps): _$react_jsx_runtime0.JSX.Element;
55
55
  declare function DrawerTitle({
56
56
  className,
57
57
  ...props
58
- }: DrawerTitleProps): react_jsx_runtime0.JSX.Element;
58
+ }: DrawerTitleProps): _$react_jsx_runtime0.JSX.Element;
59
59
  declare function DrawerDescription({
60
60
  className,
61
61
  ...props
62
- }: DrawerDescriptionProps): react_jsx_runtime0.JSX.Element;
62
+ }: DrawerDescriptionProps): _$react_jsx_runtime0.JSX.Element;
63
63
  //#endregion
64
64
  export { Drawer, DrawerClose, DrawerCloseProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerOverlay, DrawerOverlayProps, DrawerPortal, DrawerPortalProps, DrawerProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps };
65
65
  //# sourceMappingURL=drawer.d.ts.map
@@ -1,2 +1,2 @@
1
- import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import*as i from"react";import{Drawer as a}from"vaul";const o=r(`bg-background flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b group/drawer-content fixed z-50`,{variants:{size:{sm:`data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:sm:max-w-sm`,md:`data-[vaul-drawer-direction=bottom]:mt-20 data-[vaul-drawer-direction=bottom]:max-h-[85vh] data-[vaul-drawer-direction=top]:mb-20 data-[vaul-drawer-direction=top]:max-h-[85vh] data-[vaul-drawer-direction=left]:w-4/5 data-[vaul-drawer-direction=left]:sm:max-w-md data-[vaul-drawer-direction=right]:w-4/5 data-[vaul-drawer-direction=right]:sm:max-w-md`,lg:`data-[vaul-drawer-direction=bottom]:mt-12 data-[vaul-drawer-direction=bottom]:max-h-[90vh] data-[vaul-drawer-direction=top]:mb-12 data-[vaul-drawer-direction=top]:max-h-[90vh] data-[vaul-drawer-direction=left]:w-[90%] data-[vaul-drawer-direction=left]:sm:max-w-lg data-[vaul-drawer-direction=right]:w-[90%] data-[vaul-drawer-direction=right]:sm:max-w-lg`}},defaultVariants:{size:`sm`}}),s=i.createContext({size:`sm`});function Drawer({size:e=`sm`,...n}){let r=i.useMemo(()=>({size:e}),[e]);return t(s.Provider,{value:r,children:t(a.Root,{"data-slot":`drawer`,...n})})}function DrawerTrigger({...e}){return t(a.Trigger,{"data-slot":`drawer-trigger`,...e})}function DrawerPortal({...e}){return t(a.Portal,{"data-slot":`drawer-portal`,...e})}function DrawerClose({...e}){return t(a.Close,{"data-slot":`drawer-close`,...e})}function DrawerOverlay({className:n,...r}){return t(a.Overlay,{"data-slot":`drawer-overlay`,className:e(`bg-black/10 fixed inset-0 z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`supports-backdrop-filter:backdrop-blur-xs`,n),...r})}function DrawerContent({className:r,children:c,...l}){let{size:u}=i.useContext(s);return n(DrawerPortal,{"data-slot":`drawer-portal`,children:[t(DrawerOverlay,{}),n(a.Content,{"data-slot":`drawer-content`,className:e(o({size:u}),r),...l,children:[t(`div`,{className:`bg-muted mt-4 h-1 w-25 rounded-full mx-auto hidden shrink-0 group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),c]})]})}function DrawerHeader({className:n,...r}){return t(`div`,{"data-slot":`drawer-header`,className:e(`p-4 flex flex-col gap-0.5 md:gap-0.5`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left`,n),...r})}function DrawerFooter({className:n,...r}){return t(`div`,{"data-slot":`drawer-footer`,className:e(`gap-2 p-4 mt-auto flex flex-col`,n),...r})}function DrawerTitle({className:n,...r}){return t(a.Title,{"data-slot":`drawer-title`,className:e(`text-foreground text-base font-medium`,n),...r})}function DrawerDescription({className:n,...r}){return t(a.Description,{"data-slot":`drawer-description`,className:e(`text-muted-foreground text-sm`,n),...r})}export{Drawer,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerOverlay,DrawerPortal,DrawerTitle,DrawerTrigger};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import*as i from"react";import{Drawer as a}from"vaul";const o=r(`bg-background flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b group/drawer-content fixed z-50`,{variants:{size:{sm:`data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:sm:max-w-sm`,md:`data-[vaul-drawer-direction=bottom]:mt-20 data-[vaul-drawer-direction=bottom]:max-h-[85vh] data-[vaul-drawer-direction=top]:mb-20 data-[vaul-drawer-direction=top]:max-h-[85vh] data-[vaul-drawer-direction=left]:w-4/5 data-[vaul-drawer-direction=left]:sm:max-w-md data-[vaul-drawer-direction=right]:w-4/5 data-[vaul-drawer-direction=right]:sm:max-w-md`,lg:`data-[vaul-drawer-direction=bottom]:mt-12 data-[vaul-drawer-direction=bottom]:max-h-[90vh] data-[vaul-drawer-direction=top]:mb-12 data-[vaul-drawer-direction=top]:max-h-[90vh] data-[vaul-drawer-direction=left]:w-[90%] data-[vaul-drawer-direction=left]:sm:max-w-lg data-[vaul-drawer-direction=right]:w-[90%] data-[vaul-drawer-direction=right]:sm:max-w-lg`}},defaultVariants:{size:`sm`}}),s=i.createContext({size:`sm`});function Drawer({size:e=`sm`,...n}){let r=i.useMemo(()=>({size:e}),[e]);return t(s.Provider,{value:r,children:t(a.Root,{"data-slot":`drawer`,...n})})}function DrawerTrigger({...e}){return t(a.Trigger,{"data-slot":`drawer-trigger`,...e})}function DrawerPortal({...e}){return t(a.Portal,{"data-slot":`drawer-portal`,...e})}function DrawerClose({...e}){return t(a.Close,{"data-slot":`drawer-close`,...e})}function DrawerOverlay({className:n,...r}){return t(a.Overlay,{"data-slot":`drawer-overlay`,className:e(`bg-black/10 fixed inset-0 z-50`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0`,`supports-backdrop-filter:backdrop-blur-xs`,n),...r})}function DrawerContent({className:r,children:c,...l}){let{size:u}=i.useContext(s);return n(DrawerPortal,{"data-slot":`drawer-portal`,children:[t(DrawerOverlay,{}),n(a.Content,{"data-slot":`drawer-content`,className:e(o({size:u}),r),...l,children:[t(`div`,{className:`bg-muted mt-4 h-1 w-25 rounded-full mx-auto hidden shrink-0 group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),c]})]})}function DrawerHeader({className:n,...r}){return t(`div`,{"data-slot":`drawer-header`,className:e(`p-4 flex flex-col gap-0.5 md:gap-0.5`,`group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center`,`group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left`,n),...r})}function DrawerFooter({className:n,...r}){return t(`div`,{"data-slot":`drawer-footer`,className:e(`gap-2 p-4 mt-auto flex flex-col`,n),...r})}function DrawerTitle({className:n,...r}){return t(a.Title,{"data-slot":`drawer-title`,className:e(`text-foreground text-base font-medium`,n),...r})}function DrawerDescription({className:n,...r}){return t(a.Description,{"data-slot":`drawer-description`,className:e(`text-muted-foreground text-sm`,n),...r})}export{Drawer,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerOverlay,DrawerPortal,DrawerTitle,DrawerTrigger};
2
2
  //# sourceMappingURL=drawer.js.map