@moduix/react 2.5.0 → 2.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 (200) hide show
  1. package/README.md +65 -86
  2. package/THIRD_PARTY_NOTICES.md +49 -0
  3. package/dist/components/accordion/Accordion.js +7 -8
  4. package/dist/components/alert/Alert.js +6 -7
  5. package/dist/components/alert/Alert_module.css +3 -16
  6. package/dist/components/angle-slider/AngleSlider.d.ts +5 -11
  7. package/dist/components/angle-slider/AngleSlider.js +17 -59
  8. package/dist/components/aspect-ratio/AspectRatio.js +1 -2
  9. package/dist/components/aspect-ratio/AspectRatio_module.css +0 -13
  10. package/dist/components/avatar/Avatar.d.ts +3 -6
  11. package/dist/components/avatar/Avatar.js +7 -50
  12. package/dist/components/avatar/Avatar.module.js +1 -2
  13. package/dist/components/avatar/Avatar_module.css +0 -6
  14. package/dist/components/badge/Badge.d.ts +2 -2
  15. package/dist/components/badge/Badge.js +5 -10
  16. package/dist/components/badge/Badge_module.css +7 -14
  17. package/dist/components/bleed/Bleed.js +1 -2
  18. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
  19. package/dist/components/breadcrumbs/Breadcrumbs.js +16 -32
  20. package/dist/components/breadcrumbs/Breadcrumbs_module.css +12 -14
  21. package/dist/components/button/Button.d.ts +4 -4
  22. package/dist/components/button/Button.js +1 -2
  23. package/dist/components/button/Button_module.css +2 -7
  24. package/dist/components/card/Card.d.ts +15 -15
  25. package/dist/components/card/Card.js +10 -11
  26. package/dist/components/card/Card_module.css +1 -17
  27. package/dist/components/carousel/Carousel.js +12 -13
  28. package/dist/components/carousel/Carousel_module.css +10 -3
  29. package/dist/components/chart/Chart.d.ts +9 -8
  30. package/dist/components/chart/Chart.js +7 -8
  31. package/dist/components/chart/Chart_module.css +0 -2
  32. package/dist/components/checkbox/Checkbox.d.ts +3 -2
  33. package/dist/components/checkbox/Checkbox.js +12 -35
  34. package/dist/components/clipboard/Clipboard.js +8 -9
  35. package/dist/components/close-button/CloseButton.js +1 -2
  36. package/dist/components/close-button/CloseButton_module.css +1 -10
  37. package/dist/components/collapsible/Collapsible.js +6 -9
  38. package/dist/components/collapsible/Collapsible_module.css +2 -4
  39. package/dist/components/color-picker/ColorPicker.d.ts +4 -3
  40. package/dist/components/color-picker/ColorPicker.js +32 -45
  41. package/dist/components/color-picker/ColorPicker_module.css +0 -1
  42. package/dist/components/combobox/Combobox.d.ts +5 -5
  43. package/dist/components/combobox/Combobox.js +20 -29
  44. package/dist/components/combobox/Combobox_module.css +0 -1
  45. package/dist/components/command-palette/CommandPalette.d.ts +7 -18
  46. package/dist/components/command-palette/CommandPalette.js +51 -78
  47. package/dist/components/command-palette/CommandPalette_module.css +11 -18
  48. package/dist/components/container/Container.js +1 -2
  49. package/dist/components/date-input/DateInput.d.ts +7 -9
  50. package/dist/components/date-input/DateInput.js +14 -44
  51. package/dist/components/date-input/DateInput_module.css +0 -1
  52. package/dist/components/date-picker/DatePicker.d.ts +1 -1
  53. package/dist/components/date-picker/DatePicker.js +34 -43
  54. package/dist/components/date-picker/DatePicker.module.js +1 -1
  55. package/dist/components/date-picker/DatePicker_module.css +14 -4
  56. package/dist/components/dialog/Dialog.d.ts +1 -1
  57. package/dist/components/dialog/Dialog.js +11 -12
  58. package/dist/components/drawer/Drawer.d.ts +6 -3
  59. package/dist/components/drawer/Drawer.js +33 -24
  60. package/dist/components/editable/Editable.d.ts +1 -1
  61. package/dist/components/editable/Editable.js +10 -11
  62. package/dist/components/empty/Empty.js +6 -7
  63. package/dist/components/field/Field.js +10 -11
  64. package/dist/components/fieldset/Fieldset.js +5 -6
  65. package/dist/components/file-upload/FileUpload.d.ts +3 -2
  66. package/dist/components/file-upload/FileUpload.js +28 -55
  67. package/dist/components/file-upload/FileUpload_module.css +4 -13
  68. package/dist/components/floating-panel/FloatingPanel.d.ts +2 -2
  69. package/dist/components/floating-panel/FloatingPanel.js +14 -15
  70. package/dist/components/floating-panel/FloatingPanel_module.css +4 -17
  71. package/dist/components/heading/Heading.js +1 -2
  72. package/dist/components/highlight/Highlight.js +1 -2
  73. package/dist/components/hover-card/HoverCard.d.ts +2 -1
  74. package/dist/components/hover-card/HoverCard.js +15 -6
  75. package/dist/components/hover-card/HoverCard.module.js +1 -0
  76. package/dist/components/hover-card/HoverCard_module.css +18 -3
  77. package/dist/components/image/Image.js +1 -2
  78. package/dist/components/image-cropper/ImageCropper.d.ts +1 -1
  79. package/dist/components/image-cropper/ImageCropper.js +7 -8
  80. package/dist/components/input/Input.d.ts +4 -4
  81. package/dist/components/input/Input.js +1 -2
  82. package/dist/components/input-group/InputGroup.d.ts +5 -5
  83. package/dist/components/input-group/InputGroup.js +5 -6
  84. package/dist/components/json-tree-view/JsonTreeView.js +3 -4
  85. package/dist/components/json-tree-view/JsonTreeView_module.css +26 -10
  86. package/dist/components/kbd/Kbd.js +2 -3
  87. package/dist/components/lightbox/Lightbox.d.ts +1 -1
  88. package/dist/components/lightbox/Lightbox.js +13 -14
  89. package/dist/components/lightbox/Lightbox_module.css +0 -3
  90. package/dist/components/list/List.js +2 -3
  91. package/dist/components/listbox/Listbox.d.ts +5 -5
  92. package/dist/components/listbox/Listbox.js +19 -25
  93. package/dist/components/listbox/Listbox.module.js +2 -2
  94. package/dist/components/listbox/Listbox_module.css +3 -13
  95. package/dist/components/marquee/Marquee.js +6 -7
  96. package/dist/components/menu/Menu.d.ts +2 -1
  97. package/dist/components/menu/Menu.js +34 -41
  98. package/dist/components/menu/Menu.module.js +1 -1
  99. package/dist/components/menu/Menu_module.css +8 -8
  100. package/dist/components/native-select/NativeSelect.js +2 -3
  101. package/dist/components/native-select/NativeSelect_module.css +0 -1
  102. package/dist/components/navigation-menu/NavigationMenu.js +17 -36
  103. package/dist/components/navigation-menu/NavigationMenu.module.js +2 -3
  104. package/dist/components/navigation-menu/NavigationMenu_module.css +15 -32
  105. package/dist/components/number-input/NumberInput.js +9 -10
  106. package/dist/components/pagination/Pagination.js +17 -20
  107. package/dist/components/pagination/Pagination_module.css +1 -5
  108. package/dist/components/password-input/PasswordInput.js +7 -8
  109. package/dist/components/pin-input/PinInput.d.ts +3 -2
  110. package/dist/components/pin-input/PinInput.js +13 -54
  111. package/dist/components/popover/Popover.d.ts +5 -3
  112. package/dist/components/popover/Popover.js +16 -17
  113. package/dist/components/progress-circular/ProgressCircular.js +8 -9
  114. package/dist/components/progress-circular/ProgressCircular.module.js +1 -3
  115. package/dist/components/progress-circular/ProgressCircular_module.css +0 -10
  116. package/dist/components/progress-linear/ProgressLinear.js +7 -8
  117. package/dist/components/progress-linear/ProgressLinear.module.js +1 -5
  118. package/dist/components/progress-linear/ProgressLinear_module.css +0 -20
  119. package/dist/components/qr-code/QrCode.js +6 -7
  120. package/dist/components/radio-group/RadioGroup.d.ts +1 -0
  121. package/dist/components/radio-group/RadioGroup.js +13 -27
  122. package/dist/components/radio-group/RadioGroup_module.css +0 -1
  123. package/dist/components/rating-group/RatingGroup.d.ts +1 -0
  124. package/dist/components/rating-group/RatingGroup.js +12 -29
  125. package/dist/components/rating-group/RatingGroup_module.css +1 -1
  126. package/dist/components/scroll-area/ScrollArea.js +7 -8
  127. package/dist/components/segment-group/SegmentGroup.d.ts +1 -0
  128. package/dist/components/segment-group/SegmentGroup.js +16 -30
  129. package/dist/components/segment-group/SegmentGroup_module.css +4 -0
  130. package/dist/components/select/Select.d.ts +4 -7
  131. package/dist/components/select/Select.js +36 -86
  132. package/dist/components/select/Select.module.js +1 -1
  133. package/dist/components/select/Select_module.css +4 -31
  134. package/dist/components/separator/Separator.d.ts +6 -6
  135. package/dist/components/separator/Separator.js +1 -2
  136. package/dist/components/sidebar/Sidebar.d.ts +24 -22
  137. package/dist/components/sidebar/Sidebar.js +88 -75
  138. package/dist/components/sidebar/Sidebar.module.js +2 -3
  139. package/dist/components/sidebar/Sidebar_module.css +112 -178
  140. package/dist/components/signature-pad/SignaturePad.d.ts +5 -8
  141. package/dist/components/signature-pad/SignaturePad.js +17 -46
  142. package/dist/components/signature-pad/SignaturePad_module.css +0 -1
  143. package/dist/components/simple-grid/SimpleGrid.js +13 -8
  144. package/dist/components/skeleton/Skeleton.d.ts +2 -2
  145. package/dist/components/skeleton/Skeleton.js +1 -2
  146. package/dist/components/slider/Slider.d.ts +2 -2
  147. package/dist/components/slider/Slider.js +18 -32
  148. package/dist/components/spinner/Spinner.d.ts +2 -2
  149. package/dist/components/spinner/Spinner.js +1 -2
  150. package/dist/components/split-button/SplitButton.d.ts +4 -4
  151. package/dist/components/split-button/SplitButton.js +11 -8
  152. package/dist/components/splitter/Splitter.js +5 -6
  153. package/dist/components/splitter/Splitter_module.css +2 -10
  154. package/dist/components/stack/Stack.d.ts +6 -6
  155. package/dist/components/stack/Stack.js +4 -5
  156. package/dist/components/stack/Stack_module.css +1 -1
  157. package/dist/components/steps/Steps.js +12 -13
  158. package/dist/components/steps/Steps_module.css +2 -3
  159. package/dist/components/swap/Swap.js +3 -4
  160. package/dist/components/switch/Switch.d.ts +3 -2
  161. package/dist/components/switch/Switch.js +12 -35
  162. package/dist/components/switch/Switch_module.css +0 -1
  163. package/dist/components/table/Table.d.ts +5 -5
  164. package/dist/components/table/Table.js +12 -13
  165. package/dist/components/tabs/Tabs.js +6 -7
  166. package/dist/components/tabs/Tabs_module.css +5 -10
  167. package/dist/components/tag/Tag.js +5 -6
  168. package/dist/components/tag/Tag_module.css +2 -4
  169. package/dist/components/tags-input/TagsInput.d.ts +3 -3
  170. package/dist/components/tags-input/TagsInput.js +21 -75
  171. package/dist/components/tags-input/TagsInput_module.css +0 -1
  172. package/dist/components/text/Text.js +1 -2
  173. package/dist/components/textarea/Textarea.js +1 -2
  174. package/dist/components/timer/Timer.js +7 -8
  175. package/dist/components/toast/Toast.d.ts +1 -1
  176. package/dist/components/toast/Toast.js +7 -8
  177. package/dist/components/toast/Toast_module.css +1 -2
  178. package/dist/components/toc/Toc.js +10 -11
  179. package/dist/components/toc/Toc_module.css +2 -2
  180. package/dist/components/toggle/Toggle.js +2 -3
  181. package/dist/components/toggle-group/ToggleGroup.d.ts +1 -1
  182. package/dist/components/toggle-group/ToggleGroup.js +3 -4
  183. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  184. package/dist/components/tooltip/Tooltip.js +6 -7
  185. package/dist/components/tooltip/Tooltip_module.css +1 -1
  186. package/dist/components/tour/Tour.d.ts +1 -1
  187. package/dist/components/tour/Tour.js +14 -15
  188. package/dist/components/tree-view/TreeView.d.ts +4 -4
  189. package/dist/components/tree-view/TreeView.js +17 -18
  190. package/dist/components/tree-view/TreeView_module.css +39 -12
  191. package/dist/components/typeset/Typeset.js +2 -3
  192. package/dist/components/typeset/Typeset_module.css +300 -159
  193. package/dist/internal/icons/ui/Icons.d.ts +9 -30
  194. package/dist/internal/icons/ui/Icons.js +67 -807
  195. package/dist/internal/icons/ui/index.d.ts +1 -1
  196. package/dist/styles/animations.css +310 -0
  197. package/dist/styles/style.css +168 -2
  198. package/package.json +25 -25
  199. package/dist/internal/normalizeClassName.d.ts +0 -1
  200. package/dist/internal/normalizeClassName.js +0 -2
@@ -5,7 +5,6 @@ import { ark } from "@ark-ui/react/factory";
5
5
  import { clsx } from "clsx";
6
6
  import { forwardRef } from "react";
7
7
  import { CheckIcon, ChevronUpDownIcon } from "../../internal/icons/ui/index.js";
8
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
9
8
  import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
10
9
  import { CloseButton } from "../close-button/index.js";
11
10
  import Combobox_module from "./Combobox.module.js";
@@ -16,7 +15,7 @@ const Combobox_ComboboxRoot = /*#__PURE__*/ forwardRef(function({ className, laz
16
15
  children: /*#__PURE__*/ jsx(Combobox.Root, {
17
16
  ref: ref,
18
17
  "data-slot": "combobox-root",
19
- className: clsx(Combobox_module.root, normalizeClassName(className)),
18
+ className: clsx(Combobox_module.root, className),
20
19
  lazyMount: lazyMount,
21
20
  unmountOnExit: unmountOnExit,
22
21
  ...props
@@ -30,7 +29,7 @@ const Combobox_ComboboxRootProvider = /*#__PURE__*/ forwardRef(function({ classN
30
29
  children: /*#__PURE__*/ jsx(Combobox.RootProvider, {
31
30
  ref: ref,
32
31
  "data-slot": "combobox-root-provider",
33
- className: clsx(Combobox_module.root, normalizeClassName(className)),
32
+ className: clsx(Combobox_module.root, className),
34
33
  lazyMount: lazyMount,
35
34
  unmountOnExit: unmountOnExit,
36
35
  ...props
@@ -41,7 +40,7 @@ const Combobox_ComboboxLabel = /*#__PURE__*/ forwardRef(function({ className, ..
41
40
  return /*#__PURE__*/ jsx(Combobox.Label, {
42
41
  ref: ref,
43
42
  "data-slot": "combobox-label",
44
- className: clsx(Combobox_module.label, normalizeClassName(className)),
43
+ className: clsx(Combobox_module.label, className),
45
44
  ...props
46
45
  });
47
46
  });
@@ -49,7 +48,7 @@ const Combobox_ComboboxControl = /*#__PURE__*/ forwardRef(function({ className,
49
48
  return /*#__PURE__*/ jsx(Combobox.Control, {
50
49
  ref: ref,
51
50
  "data-slot": "combobox-control",
52
- className: clsx(Combobox_module.control, normalizeClassName(className)),
51
+ className: clsx(Combobox_module.control, className),
53
52
  ...props
54
53
  });
55
54
  });
@@ -58,29 +57,21 @@ const Combobox_ComboboxInput = /*#__PURE__*/ forwardRef(function({ asChild, clas
58
57
  ref: ref,
59
58
  "data-slot": "combobox-input",
60
59
  asChild: asChild,
61
- className: clsx(!asChild && Combobox_module.input, normalizeClassName(className)),
60
+ className: clsx(!asChild && Combobox_module.input, className),
62
61
  ...props
63
62
  });
64
63
  });
65
64
  const Combobox_ComboboxClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
66
- const triggerClassName = clsx(Combobox_module.clearTrigger, normalizeClassName(className));
67
- if (asChild) return /*#__PURE__*/ jsx(Combobox.ClearTrigger, {
68
- ref: ref,
69
- asChild: true,
70
- "data-slot": "combobox-clear-trigger",
71
- className: triggerClassName,
72
- "aria-label": ariaLabel,
73
- "aria-labelledby": ariaLabelledBy,
74
- ...props,
75
- children: children
76
- });
65
+ const triggerClassName = clsx(Combobox_module.clearTrigger, className);
77
66
  return /*#__PURE__*/ jsx(Combobox.ClearTrigger, {
78
67
  ref: ref,
79
68
  asChild: true,
80
69
  "data-slot": "combobox-clear-trigger",
81
70
  className: triggerClassName,
71
+ "aria-label": asChild ? ariaLabel : void 0,
72
+ "aria-labelledby": asChild ? ariaLabelledBy : void 0,
82
73
  ...props,
83
- children: /*#__PURE__*/ jsx(CloseButton.Root, {
74
+ children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
84
75
  "aria-label": ariaLabel ?? (null == ariaLabelledBy ? 'Clear selection' : void 0),
85
76
  "aria-labelledby": ariaLabelledBy,
86
77
  children: children
@@ -91,7 +82,7 @@ const Combobox_ComboboxTrigger = /*#__PURE__*/ forwardRef(function({ className,
91
82
  return /*#__PURE__*/ jsx(Combobox.Trigger, {
92
83
  ref: ref,
93
84
  "data-slot": "combobox-trigger",
94
- className: clsx(Combobox_module.trigger, normalizeClassName(className)),
85
+ className: clsx(Combobox_module.trigger, className),
95
86
  ...props,
96
87
  children: children ?? /*#__PURE__*/ jsx(ChevronUpDownIcon, {})
97
88
  });
@@ -101,7 +92,7 @@ const Combobox_ComboboxPositioner = /*#__PURE__*/ forwardRef(function({ classNam
101
92
  children: /*#__PURE__*/ jsx(Combobox.Positioner, {
102
93
  ref: ref,
103
94
  "data-slot": "combobox-positioner",
104
- className: clsx(Combobox_module.positioner, normalizeClassName(className)),
95
+ className: clsx(Combobox_module.positioner, className),
105
96
  ...props
106
97
  })
107
98
  });
@@ -110,7 +101,7 @@ const Combobox_ComboboxContent = /*#__PURE__*/ forwardRef(function({ className,
110
101
  return /*#__PURE__*/ jsx(Combobox.Content, {
111
102
  ref: ref,
112
103
  "data-slot": "combobox-content",
113
- className: clsx(Combobox_module.content, normalizeClassName(className)),
104
+ className: clsx(Combobox_module.content, className),
114
105
  ...props
115
106
  });
116
107
  });
@@ -118,7 +109,7 @@ const Combobox_ComboboxEmpty = /*#__PURE__*/ forwardRef(function({ className, ..
118
109
  return /*#__PURE__*/ jsx(Combobox.Empty, {
119
110
  ref: ref,
120
111
  "data-slot": "combobox-empty",
121
- className: clsx(Combobox_module.empty, normalizeClassName(className)),
112
+ className: clsx(Combobox_module.empty, className),
122
113
  ...props
123
114
  });
124
115
  });
@@ -126,7 +117,7 @@ const Combobox_ComboboxStatus = /*#__PURE__*/ forwardRef(function({ className, .
126
117
  return /*#__PURE__*/ jsx(ark.div, {
127
118
  ref: ref,
128
119
  "data-slot": "combobox-status",
129
- className: clsx(Combobox_module.status, normalizeClassName(className)),
120
+ className: clsx(Combobox_module.status, className),
130
121
  ...props
131
122
  });
132
123
  });
@@ -134,7 +125,7 @@ const Combobox_ComboboxList = /*#__PURE__*/ forwardRef(function({ className, ...
134
125
  return /*#__PURE__*/ jsx(Combobox.List, {
135
126
  ref: ref,
136
127
  "data-slot": "combobox-list",
137
- className: clsx(Combobox_module.list, normalizeClassName(className)),
128
+ className: clsx(Combobox_module.list, className),
138
129
  ...props
139
130
  });
140
131
  });
@@ -142,7 +133,7 @@ const Combobox_ComboboxItemGroup = /*#__PURE__*/ forwardRef(function({ className
142
133
  return /*#__PURE__*/ jsx(Combobox.ItemGroup, {
143
134
  ref: ref,
144
135
  "data-slot": "combobox-item-group",
145
- className: clsx(Combobox_module.itemGroup, normalizeClassName(className)),
136
+ className: clsx(Combobox_module.itemGroup, className),
146
137
  ...props
147
138
  });
148
139
  });
@@ -150,7 +141,7 @@ const Combobox_ComboboxItemGroupLabel = /*#__PURE__*/ forwardRef(function({ clas
150
141
  return /*#__PURE__*/ jsx(Combobox.ItemGroupLabel, {
151
142
  ref: ref,
152
143
  "data-slot": "combobox-item-group-label",
153
- className: clsx(Combobox_module.itemGroupLabel, normalizeClassName(className)),
144
+ className: clsx(Combobox_module.itemGroupLabel, className),
154
145
  ...props
155
146
  });
156
147
  });
@@ -158,7 +149,7 @@ const Combobox_ComboboxItem = /*#__PURE__*/ forwardRef(function({ className, ...
158
149
  return /*#__PURE__*/ jsx(Combobox.Item, {
159
150
  ref: ref,
160
151
  "data-slot": "combobox-item",
161
- className: clsx(Combobox_module.item, normalizeClassName(className)),
152
+ className: clsx(Combobox_module.item, className),
162
153
  ...props
163
154
  });
164
155
  });
@@ -166,7 +157,7 @@ const Combobox_ComboboxItemText = /*#__PURE__*/ forwardRef(function({ className,
166
157
  return /*#__PURE__*/ jsx(Combobox.ItemText, {
167
158
  ref: ref,
168
159
  "data-slot": "combobox-item-text",
169
- className: clsx(Combobox_module.itemText, normalizeClassName(className)),
160
+ className: clsx(Combobox_module.itemText, className),
170
161
  ...props
171
162
  });
172
163
  });
@@ -174,7 +165,7 @@ const Combobox_ComboboxItemIndicator = /*#__PURE__*/ forwardRef(function({ class
174
165
  return /*#__PURE__*/ jsx(Combobox.ItemIndicator, {
175
166
  ref: ref,
176
167
  "data-slot": "combobox-item-indicator",
177
- className: clsx(Combobox_module.itemIndicator, normalizeClassName(className)),
168
+ className: clsx(Combobox_module.itemIndicator, className),
178
169
  ...props,
179
170
  children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
180
171
  });
@@ -177,7 +177,6 @@
177
177
  --moduix-close-button-focus-ring-width: var(--moduix-combobox-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)));
178
178
  --moduix-close-button-focus-ring-color: var(--moduix-combobox-focus-ring-color, var(--moduix-color-ring));
179
179
  --moduix-close-button-focus-ring-offset: var(--moduix-combobox-focus-ring-offset, var(--moduix-border-width-sm));
180
- --moduix-close-button-transition: var(--moduix-combobox-transition, var(--moduix-transition-default));
181
180
  top: 50%;
182
181
  position: absolute;
183
182
  inset-inline-end: calc(var(--moduix-combobox-action-offset-right, var(--moduix-spacing-2)) +
@@ -1,19 +1,13 @@
1
- import { Combobox as ComboboxPrimitive } from '@ark-ui/react/combobox';
1
+ import { Combobox as ComboboxPrimitive, type ComboboxRootComponent } from '@ark-ui/react/combobox';
2
2
  import { Dialog as DialogPrimitive } from '@ark-ui/react/dialog';
3
3
  import type { ComponentProps } from 'react';
4
- import { type OverlayPortalProps } from '../../internal/overlayPortal';
5
- import { CloseButton } from '../close-button';
6
- import { Kbd } from '../kbd';
4
+ import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
5
+ import { Kbd } from '../kbd/index.js';
7
6
  type CommandPaletteRootProps = ComponentProps<typeof DialogPrimitive.Root> & {
8
7
  shortcut?: false | string;
9
- shortcutTarget?: Document | HTMLElement | null;
10
8
  } & OverlayPortalProps;
11
9
  type CommandPaletteRootProviderProps = ComponentProps<typeof DialogPrimitive.RootProvider> & OverlayPortalProps;
12
- type CommandPaletteSearchProps = ComponentProps<typeof ComboboxPrimitive.Input> & {
13
- controlProps?: ComponentProps<typeof ComboboxPrimitive.Control>;
14
- clearTriggerProps?: ComponentProps<typeof CloseButton.Root>;
15
- };
16
- declare function CommandPaletteRoot({ shortcut, shortcutTarget, lazyMount, unmountOnExit, immediate, onExitComplete, portalled, present, portalRef, skipAnimationOnMount, children, ...props }: CommandPaletteRootProps): import("react").JSX.Element;
10
+ declare function CommandPaletteRoot({ shortcut, lazyMount, unmountOnExit, immediate, onExitComplete, portalled, present, portalRef, skipAnimationOnMount, children, ...props }: CommandPaletteRootProps): import("react").JSX.Element;
17
11
  declare function CommandPaletteRootProvider({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: CommandPaletteRootProviderProps): import("react").JSX.Element;
18
12
  declare function CommandPaletteKbd({ className, ...props }: ComponentProps<typeof Kbd.Root>): import("react").JSX.Element;
19
13
  declare const CommandPalette: typeof CommandPaletteRoot & {
@@ -28,16 +22,11 @@ declare const CommandPalette: typeof CommandPaletteRoot & {
28
22
  Description: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DescriptionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
29
23
  Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
30
24
  Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
31
- Combobox: ComboboxPrimitive.RootComponent;
25
+ Combobox: ComboboxRootComponent;
32
26
  Control: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
33
27
  Input: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
34
- Search: import("react").ForwardRefExoticComponent<Omit<CommandPaletteSearchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
35
- ClearTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
36
- 'data-disabled'?: string;
37
- 'data-part'?: string;
38
- 'data-scope'?: string;
39
- 'data-slot'?: string;
40
- } & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
28
+ Search: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
29
+ ClearTrigger: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
41
30
  List: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.ContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
42
31
  Empty: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.EmptyProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
43
32
  ItemGroup: import("react").ForwardRefExoticComponent<Omit<ComboboxPrimitive.ItemGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -3,51 +3,34 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Combobox } from "@ark-ui/react/combobox";
4
4
  import { Dialog, useDialog, useDialogContext } from "@ark-ui/react/dialog";
5
5
  import { ark } from "@ark-ui/react/factory";
6
+ import { isHotKey } from "@zag-js/hotkeys";
6
7
  import { clsx } from "clsx";
7
8
  import { forwardRef, useEffect } from "react";
8
- import { CheckIcon } from "../../internal/icons/ui/index.js";
9
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
9
+ import { CheckIcon, CloseIcon } from "../../internal/icons/ui/index.js";
10
10
  import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
11
- import { CloseButton } from "../close-button/index.js";
11
+ import CloseButton_module from "../close-button/CloseButton.module.js";
12
12
  import { Kbd } from "../kbd/index.js";
13
13
  import { ScrollArea } from "../scroll-area/index.js";
14
14
  import CommandPalette_module from "./CommandPalette.module.js";
15
15
  const DEFAULT_CLEAR_TRIGGER_LABEL = 'Clear search';
16
16
  const DEFAULT_SEARCH_INPUT_LABEL = 'Search commands';
17
- function isShortcutMatch(event, shortcut) {
18
- const parts = shortcut.toLowerCase().split('+').map((part)=>part.trim()).filter(Boolean);
19
- const [modifier, key] = parts;
20
- if (!modifier || !key || 2 !== parts.length || event.shiftKey) return false;
21
- const eventKey = event.key.toLowerCase();
22
- const eventCode = event.code.startsWith('Key') || event.code.startsWith('Digit') ? event.code.slice(event.code.startsWith('Key') ? 3 : 5).toLowerCase() : event.code.toLowerCase();
23
- if (eventKey !== key && eventCode !== key) return false;
24
- if ('mod' === modifier) return (event.metaKey || event.ctrlKey) && !event.altKey;
25
- if ('ctrl' === modifier || 'control' === modifier) return event.ctrlKey && !event.metaKey && !event.altKey;
26
- if ('meta' === modifier || 'cmd' === modifier || 'command' === modifier) return event.metaKey && !event.ctrlKey && !event.altKey;
27
- if ('alt' === modifier || 'option' === modifier) return event.altKey && !event.metaKey && !event.ctrlKey;
28
- return false;
29
- }
30
- function isEditableTarget(target) {
31
- if (!(target instanceof Element)) return false;
32
- return null !== target.closest('input, textarea, select, [contenteditable], [contenteditable="true"]');
33
- }
34
- function CommandPaletteRoot({ shortcut = false, shortcutTarget, lazyMount = true, unmountOnExit = true, immediate, onExitComplete, portalled, present, portalRef, skipAnimationOnMount, children, ...props }) {
17
+ function CommandPaletteRoot({ shortcut = false, lazyMount = true, unmountOnExit = true, immediate, onExitComplete, portalled, present, portalRef, skipAnimationOnMount, children, ...props }) {
35
18
  const dialog = useDialog(props);
36
19
  useEffect(()=>{
37
- if (!shortcut || null === shortcutTarget) return;
38
- const target = shortcutTarget ?? document;
20
+ if (!shortcut) return;
39
21
  const handleKeyDown = (event)=>{
40
- if (event.defaultPrevented || event.repeat || event.isComposing || !isShortcutMatch(event, shortcut) || !dialog.open && isEditableTarget(event.target)) return;
22
+ if (event.defaultPrevented || event.repeat || event.isComposing || !isHotKey(shortcut, event, {
23
+ enableOnContentEditable: dialog.open,
24
+ enableOnFormTags: dialog.open
25
+ })) return;
41
26
  event.preventDefault();
42
27
  dialog.setOpen(!dialog.open);
43
28
  };
44
- const eventListener = handleKeyDown;
45
- target.addEventListener('keydown', eventListener);
46
- return ()=>target.removeEventListener('keydown', eventListener);
29
+ document.addEventListener('keydown', handleKeyDown);
30
+ return ()=>document.removeEventListener('keydown', handleKeyDown);
47
31
  }, [
48
32
  dialog,
49
- shortcut,
50
- shortcutTarget
33
+ shortcut
51
34
  ]);
52
35
  return /*#__PURE__*/ jsx(OverlayPortalProvider, {
53
36
  portalled: portalled,
@@ -80,7 +63,7 @@ const CommandPalette_CommandPaletteTrigger = /*#__PURE__*/ forwardRef(function({
80
63
  ref: ref,
81
64
  asChild: asChild,
82
65
  "data-slot": "command-palette-trigger",
83
- className: clsx(!asChild && CommandPalette_module.trigger, normalizeClassName(className)),
66
+ className: clsx(!asChild && CommandPalette_module.trigger, className),
84
67
  ...props
85
68
  });
86
69
  });
@@ -89,7 +72,7 @@ const CommandPalette_CommandPaletteBackdrop = /*#__PURE__*/ forwardRef(function(
89
72
  children: /*#__PURE__*/ jsx(Dialog.Backdrop, {
90
73
  ref: ref,
91
74
  "data-slot": "command-palette-backdrop",
92
- className: clsx(CommandPalette_module.backdrop, normalizeClassName(className)),
75
+ className: clsx(CommandPalette_module.backdrop, className),
93
76
  ...props
94
77
  })
95
78
  });
@@ -99,7 +82,7 @@ const CommandPalette_CommandPalettePositioner = /*#__PURE__*/ forwardRef(functio
99
82
  children: /*#__PURE__*/ jsx(Dialog.Positioner, {
100
83
  ref: ref,
101
84
  "data-slot": "command-palette-positioner",
102
- className: clsx(CommandPalette_module.positioner, normalizeClassName(className)),
85
+ className: clsx(CommandPalette_module.positioner, className),
103
86
  ...props
104
87
  })
105
88
  });
@@ -108,7 +91,7 @@ const CommandPalette_CommandPaletteContent = /*#__PURE__*/ forwardRef(function({
108
91
  return /*#__PURE__*/ jsx(Dialog.Content, {
109
92
  ref: ref,
110
93
  "data-slot": "command-palette-content",
111
- className: clsx(CommandPalette_module.content, normalizeClassName(className)),
94
+ className: clsx(CommandPalette_module.content, className),
112
95
  ...props
113
96
  });
114
97
  });
@@ -132,7 +115,7 @@ const CommandPalette_CommandPaletteTitle = /*#__PURE__*/ forwardRef(function({ c
132
115
  return /*#__PURE__*/ jsx(Dialog.Title, {
133
116
  ref: ref,
134
117
  "data-slot": "command-palette-title",
135
- className: clsx(CommandPalette_module.title, normalizeClassName(className)),
118
+ className: clsx(CommandPalette_module.title, className),
136
119
  ...props
137
120
  });
138
121
  });
@@ -140,7 +123,7 @@ const CommandPalette_CommandPaletteDescription = /*#__PURE__*/ forwardRef(functi
140
123
  return /*#__PURE__*/ jsx(Dialog.Description, {
141
124
  ref: ref,
142
125
  "data-slot": "command-palette-description",
143
- className: clsx(CommandPalette_module.description, normalizeClassName(className)),
126
+ className: clsx(CommandPalette_module.description, className),
144
127
  ...props
145
128
  });
146
129
  });
@@ -148,7 +131,7 @@ const CommandPalette_CommandPaletteHeader = /*#__PURE__*/ forwardRef(function({
148
131
  return /*#__PURE__*/ jsx(ark.div, {
149
132
  ref: ref,
150
133
  "data-slot": "command-palette-header",
151
- className: clsx(CommandPalette_module.header, normalizeClassName(className)),
134
+ className: clsx(CommandPalette_module.header, className),
152
135
  ...props
153
136
  });
154
137
  });
@@ -156,7 +139,7 @@ const CommandPalette_CommandPaletteBody = /*#__PURE__*/ forwardRef(function({ cl
156
139
  return /*#__PURE__*/ jsx(ark.div, {
157
140
  ref: ref,
158
141
  "data-slot": "command-palette-body",
159
- className: clsx(CommandPalette_module.body, normalizeClassName(className)),
142
+ className: clsx(CommandPalette_module.body, className),
160
143
  ...props
161
144
  });
162
145
  });
@@ -169,7 +152,7 @@ const CommandPalette_CommandPaletteCombobox = /*#__PURE__*/ forwardRef(function(
169
152
  return /*#__PURE__*/ jsx(Combobox.Root, {
170
153
  ref: ref,
171
154
  "data-slot": "command-palette-combobox",
172
- className: clsx(CommandPalette_module.combobox, normalizeClassName(className)),
155
+ className: clsx(CommandPalette_module.combobox, className),
173
156
  open: open,
174
157
  inputBehavior: inputBehavior,
175
158
  selectionBehavior: selectionBehavior,
@@ -183,7 +166,7 @@ const CommandPalette_CommandPaletteControl = /*#__PURE__*/ forwardRef(function({
183
166
  return /*#__PURE__*/ jsx(Combobox.Control, {
184
167
  ref: ref,
185
168
  "data-slot": "command-palette-control",
186
- className: clsx(CommandPalette_module.control, normalizeClassName(className)),
169
+ className: clsx(CommandPalette_module.control, className),
187
170
  ...props
188
171
  });
189
172
  });
@@ -191,13 +174,12 @@ const CommandPalette_CommandPaletteInput = /*#__PURE__*/ forwardRef(function({ c
191
174
  return /*#__PURE__*/ jsx(Combobox.Input, {
192
175
  ref: ref,
193
176
  "data-slot": "command-palette-input",
194
- className: clsx(CommandPalette_module.input, normalizeClassName(className)),
177
+ className: clsx(CommandPalette_module.input, className),
195
178
  ...props
196
179
  });
197
180
  });
198
- const CommandPalette_CommandPaletteSearch = /*#__PURE__*/ forwardRef(function({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, clearTriggerProps, controlProps, ...props }, ref) {
181
+ const CommandPalette_CommandPaletteSearch = /*#__PURE__*/ forwardRef(function({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
199
182
  return /*#__PURE__*/ jsxs(CommandPalette_CommandPaletteControl, {
200
- ...controlProps,
201
183
  children: [
202
184
  /*#__PURE__*/ jsx(CommandPalette_CommandPaletteInput, {
203
185
  ref: ref,
@@ -205,50 +187,41 @@ const CommandPalette_CommandPaletteSearch = /*#__PURE__*/ forwardRef(function({
205
187
  "aria-labelledby": ariaLabelledBy,
206
188
  ...props
207
189
  }),
208
- /*#__PURE__*/ jsx(CommandPalette_CommandPaletteClearTrigger, {
209
- ...clearTriggerProps
210
- })
190
+ /*#__PURE__*/ jsx(CommandPalette_CommandPaletteClearTrigger, {})
211
191
  ]
212
192
  });
213
193
  });
214
- const CommandPalette_CommandPaletteClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, disabled, onClick, onPointerDown, tabIndex, 'aria-controls': ariaControls, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
194
+ const CommandPalette_CommandPaletteClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, onClick, onPointerDown, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
215
195
  return /*#__PURE__*/ jsx(Combobox.Context, {
216
- children: (combobox)=>{
217
- const inputProps = combobox.getInputProps();
218
- const isInvalid = true === inputProps['aria-invalid'] || 'true' === inputProps['aria-invalid'];
219
- return /*#__PURE__*/ jsx(CloseButton.Root, {
196
+ children: (combobox)=>/*#__PURE__*/ jsx(Combobox.ClearTrigger, {
220
197
  ref: ref,
221
198
  asChild: asChild,
222
199
  ...props,
223
- disabled: disabled ?? combobox.disabled,
224
- "data-scope": "combobox",
225
- "data-part": "clear-trigger",
226
200
  "data-slot": "command-palette-clear-trigger",
227
- "data-invalid": isInvalid ? '' : void 0,
228
201
  hidden: 0 === combobox.inputValue.length,
229
- tabIndex: tabIndex ?? -1,
230
- "aria-controls": ariaControls ?? inputProps.id,
231
202
  "aria-label": ariaLabel ?? (asChild || null != children || null != ariaLabelledBy ? void 0 : DEFAULT_CLEAR_TRIGGER_LABEL),
232
203
  "aria-labelledby": ariaLabelledBy,
233
- className: clsx(CommandPalette_module.clearTrigger, normalizeClassName(className)),
204
+ className: clsx(CloseButton_module.root, CommandPalette_module.clearTrigger, className),
205
+ onClick: (event)=>{
206
+ onClick?.(event);
207
+ if (!event.defaultPrevented) {
208
+ event.preventDefault();
209
+ combobox.setInputValue('');
210
+ }
211
+ },
234
212
  onPointerDown: (event)=>{
235
213
  onPointerDown?.(event);
236
214
  if (0 === event.button) event.preventDefault();
237
215
  },
238
- onClick: (event)=>{
239
- onClick?.(event);
240
- if (!event.defaultPrevented) combobox.setInputValue('');
241
- },
242
- children: children
243
- });
244
- }
216
+ children: children ?? /*#__PURE__*/ jsx(CloseIcon, {})
217
+ })
245
218
  });
246
219
  });
247
220
  const CommandPalette_CommandPaletteList = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
248
221
  return /*#__PURE__*/ jsx(Combobox.Content, {
249
222
  ref: ref,
250
223
  "data-slot": "command-palette-list",
251
- className: clsx(CommandPalette_module.list, normalizeClassName(className)),
224
+ className: clsx(CommandPalette_module.list, className),
252
225
  ...props,
253
226
  children: /*#__PURE__*/ jsx(ScrollArea, {
254
227
  "data-slot": "command-palette-scroll-area",
@@ -269,7 +242,7 @@ const CommandPalette_CommandPaletteEmpty = /*#__PURE__*/ forwardRef(function({ c
269
242
  return /*#__PURE__*/ jsx(Combobox.Empty, {
270
243
  ref: ref,
271
244
  "data-slot": "command-palette-empty",
272
- className: clsx(CommandPalette_module.empty, normalizeClassName(className)),
245
+ className: clsx(CommandPalette_module.empty, className),
273
246
  ...props
274
247
  });
275
248
  });
@@ -277,7 +250,7 @@ const CommandPalette_CommandPaletteItemGroup = /*#__PURE__*/ forwardRef(function
277
250
  return /*#__PURE__*/ jsx(Combobox.ItemGroup, {
278
251
  ref: ref,
279
252
  "data-slot": "command-palette-item-group",
280
- className: clsx(CommandPalette_module.itemGroup, normalizeClassName(className)),
253
+ className: clsx(CommandPalette_module.itemGroup, className),
281
254
  ...props
282
255
  });
283
256
  });
@@ -285,7 +258,7 @@ const CommandPalette_CommandPaletteItemGroupLabel = /*#__PURE__*/ forwardRef(fun
285
258
  return /*#__PURE__*/ jsx(Combobox.ItemGroupLabel, {
286
259
  ref: ref,
287
260
  "data-slot": "command-palette-item-group-label",
288
- className: clsx(CommandPalette_module.itemGroupLabel, normalizeClassName(className)),
261
+ className: clsx(CommandPalette_module.itemGroupLabel, className),
289
262
  ...props
290
263
  });
291
264
  });
@@ -293,7 +266,7 @@ const CommandPalette_CommandPaletteItem = /*#__PURE__*/ forwardRef(function({ cl
293
266
  return /*#__PURE__*/ jsx(Combobox.Item, {
294
267
  ref: ref,
295
268
  "data-slot": "command-palette-item",
296
- className: clsx(CommandPalette_module.item, normalizeClassName(className)),
269
+ className: clsx(CommandPalette_module.item, className),
297
270
  ...props
298
271
  });
299
272
  });
@@ -301,7 +274,7 @@ const CommandPalette_CommandPaletteItemText = /*#__PURE__*/ forwardRef(function(
301
274
  return /*#__PURE__*/ jsx(Combobox.ItemText, {
302
275
  ref: ref,
303
276
  "data-slot": "command-palette-item-text",
304
- className: clsx(CommandPalette_module.itemText, normalizeClassName(className)),
277
+ className: clsx(CommandPalette_module.itemText, className),
305
278
  ...props
306
279
  });
307
280
  });
@@ -309,7 +282,7 @@ const CommandPalette_CommandPaletteItemIndicator = /*#__PURE__*/ forwardRef(func
309
282
  return /*#__PURE__*/ jsx(Combobox.ItemIndicator, {
310
283
  ref: ref,
311
284
  "data-slot": "command-palette-item-indicator",
312
- className: clsx(CommandPalette_module.itemIndicator, normalizeClassName(className)),
285
+ className: clsx(CommandPalette_module.itemIndicator, className),
313
286
  ...props,
314
287
  children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
315
288
  });
@@ -318,7 +291,7 @@ const CommandPalette_CommandPaletteItemIcon = /*#__PURE__*/ forwardRef(function(
318
291
  return /*#__PURE__*/ jsx(ark.span, {
319
292
  ref: ref,
320
293
  "data-slot": "command-palette-item-icon",
321
- className: clsx(CommandPalette_module.itemIcon, normalizeClassName(className)),
294
+ className: clsx(CommandPalette_module.itemIcon, className),
322
295
  ...props
323
296
  });
324
297
  });
@@ -326,7 +299,7 @@ const CommandPalette_CommandPaletteItemLabel = /*#__PURE__*/ forwardRef(function
326
299
  return /*#__PURE__*/ jsx(ark.span, {
327
300
  ref: ref,
328
301
  "data-slot": "command-palette-item-label",
329
- className: clsx(CommandPalette_module.itemLabel, normalizeClassName(className)),
302
+ className: clsx(CommandPalette_module.itemLabel, className),
330
303
  ...props
331
304
  });
332
305
  });
@@ -334,7 +307,7 @@ const CommandPalette_CommandPaletteItemDescription = /*#__PURE__*/ forwardRef(fu
334
307
  return /*#__PURE__*/ jsx(ark.span, {
335
308
  ref: ref,
336
309
  "data-slot": "command-palette-item-description",
337
- className: clsx(CommandPalette_module.itemDescription, normalizeClassName(className)),
310
+ className: clsx(CommandPalette_module.itemDescription, className),
338
311
  ...props
339
312
  });
340
313
  });
@@ -342,7 +315,7 @@ const CommandPalette_CommandPaletteItemMeta = /*#__PURE__*/ forwardRef(function(
342
315
  return /*#__PURE__*/ jsx(ark.span, {
343
316
  ref: ref,
344
317
  "data-slot": "command-palette-item-meta",
345
- className: clsx(CommandPalette_module.itemMeta, normalizeClassName(className)),
318
+ className: clsx(CommandPalette_module.itemMeta, className),
346
319
  ...props
347
320
  });
348
321
  });
@@ -351,7 +324,7 @@ const CommandPalette_CommandPaletteSeparator = /*#__PURE__*/ forwardRef(function
351
324
  ref: ref,
352
325
  role: "separator",
353
326
  "data-slot": "command-palette-separator",
354
- className: clsx(CommandPalette_module.separator, normalizeClassName(className)),
327
+ className: clsx(CommandPalette_module.separator, className),
355
328
  ...props
356
329
  });
357
330
  });
@@ -359,14 +332,14 @@ const CommandPalette_CommandPaletteFooter = /*#__PURE__*/ forwardRef(function({
359
332
  return /*#__PURE__*/ jsx(ark.div, {
360
333
  ref: ref,
361
334
  "data-slot": "command-palette-footer",
362
- className: clsx(CommandPalette_module.footer, normalizeClassName(className)),
335
+ className: clsx(CommandPalette_module.footer, className),
363
336
  ...props
364
337
  });
365
338
  });
366
339
  function CommandPaletteKbd({ className, ...props }) {
367
340
  return /*#__PURE__*/ jsx(Kbd.Root, {
368
341
  "data-slot": "command-palette-kbd",
369
- className: clsx(CommandPalette_module.kbd, normalizeClassName(className)),
342
+ className: clsx(CommandPalette_module.kbd, className),
370
343
  ...props
371
344
  });
372
345
  }
@@ -41,7 +41,6 @@
41
41
  .backdrop-Y8_IJU {
42
42
  z-index: calc(var(--moduix-z-backdrop) + var(--layer-index, 0));
43
43
  background-color: var(--moduix-command-palette-backdrop-bg, var(--moduix-backdrop-bg, var(--moduix-color-overlay)));
44
- min-height: 100dvh;
45
44
  -webkit-backdrop-filter: var(--moduix-backdrop-filter, blur(var(--moduix-command-palette-backdrop-blur, 4px)));
46
45
  backdrop-filter: var(--moduix-backdrop-filter, blur(var(--moduix-command-palette-backdrop-blur, 4px)));
47
46
  position: fixed;
@@ -127,9 +126,9 @@
127
126
  }
128
127
 
129
128
  .clearTrigger-n6fuk6 {
130
- --moduix-close-button-size: var(--moduix-command-palette-clear-size, var(--moduix-size-sm));
129
+ --moduix-close-button-size: var(--moduix-command-palette-clear-size, var(--moduix-spacing-6));
131
130
  --moduix-close-button-radius: var(--moduix-command-palette-clear-radius, var(--moduix-radius-md));
132
- --moduix-close-button-icon-size: var(--moduix-command-palette-icon-size, var(--moduix-spacing-4));
131
+ --moduix-close-button-icon-size: var(--moduix-command-palette-icon-size, var(--moduix-spacing-3));
133
132
  --moduix-close-button-bg: transparent;
134
133
  --moduix-close-button-bg-hover: var(--moduix-command-palette-clear-bg-hover, var(--moduix-color-accent));
135
134
  --moduix-close-button-color: var(--moduix-command-palette-muted-color, var(--moduix-color-muted-foreground));
@@ -192,6 +191,7 @@
192
191
  background: none;
193
192
  border: 0;
194
193
  outline: 0;
194
+ flex: auto;
195
195
  margin: 0;
196
196
  padding: 0;
197
197
  }
@@ -296,16 +296,8 @@
296
296
  }
297
297
 
298
298
  .item-UA3NPh[data-highlighted] {
299
- color: var(--moduix-command-palette-highlight-color, var(--moduix-color-foreground));
300
- }
301
-
302
- .item-UA3NPh[data-highlighted]:before {
303
- content: "";
304
- z-index: -1;
305
- border-radius: inherit;
306
299
  background-color: var(--moduix-command-palette-highlight-bg, var(--moduix-color-accent));
307
- position: absolute;
308
- inset: 0;
300
+ color: var(--moduix-command-palette-highlight-color, var(--moduix-color-foreground));
309
301
  }
310
302
 
311
303
  .item-UA3NPh[data-state="checked"] {
@@ -330,18 +322,13 @@
330
322
  display: inline-flex;
331
323
  }
332
324
 
333
- :is(.itemIcon-EO6ViN, .itemIndicator-nhPwW2) > svg {
334
- width: var(--moduix-command-palette-item-icon-size, var(--moduix-spacing-4));
335
- height: var(--moduix-command-palette-item-icon-size, var(--moduix-spacing-4));
336
- }
337
-
338
325
  .itemIndicator-nhPwW2 {
339
326
  background-color: #0000;
340
327
  border-color: #0000;
341
328
  justify-self: end;
342
329
  }
343
330
 
344
- .itemIndicator-nhPwW2 > svg {
331
+ .itemIcon-EO6ViN > svg, .itemIndicator-nhPwW2 > svg {
345
332
  width: var(--moduix-command-palette-item-icon-size, var(--moduix-spacing-4));
346
333
  height: var(--moduix-command-palette-item-icon-size, var(--moduix-spacing-4));
347
334
  }
@@ -446,5 +433,11 @@
446
433
  scale: var(--moduix-command-palette-content-ending-scale, var(--moduix-popup-motion-ending-scale, var(--moduix-scale-popup)));
447
434
  }
448
435
  }
436
+
437
+ @media (prefers-reduced-motion: reduce) {
438
+ .backdrop-Y8_IJU, .content-EVNfnh {
439
+ animation: none;
440
+ }
441
+ }
449
442
  }
450
443