haze-ui 1.31.0 → 1.32.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 (254) hide show
  1. package/README.md +32 -0
  2. package/dist/components/Button/Button.js +33 -15
  3. package/dist/components/Button/ButtonLink.js +12 -21
  4. package/dist/components/Button/styles.js +2 -2
  5. package/dist/components/Cascader/Cascader.js +11 -11
  6. package/dist/components/ColorPicker/ColorPicker.js +4 -4
  7. package/dist/components/Combobox/Combobox.js +128 -119
  8. package/dist/components/Command/Command.js +9 -9
  9. package/dist/components/ConfigProvider/ConfigContext.js +16 -0
  10. package/dist/components/ConfirmDialog/confirm.js +41 -0
  11. package/dist/components/ConfirmDialog/index.js +2 -1
  12. package/dist/components/DataTable/DataTable.js +24 -24
  13. package/dist/components/DateTimePicker/DateTimePicker.js +25 -0
  14. package/dist/components/DateTimePicker/index.js +3 -0
  15. package/dist/components/Datepicker/Datepicker.js +8 -7
  16. package/dist/components/Datepicker/DatepickerCore.js +60 -59
  17. package/dist/components/Drawer/Drawer.js +45 -40
  18. package/dist/components/Fieldset/Fieldset.js +25 -0
  19. package/dist/components/Fieldset/index.js +2 -0
  20. package/dist/components/Highlight/Highlight.js +19 -0
  21. package/dist/components/Highlight/index.js +2 -0
  22. package/dist/components/Indicator/Indicator.js +37 -0
  23. package/dist/components/Indicator/index.js +2 -0
  24. package/dist/components/InlineCompletion/InlineCompletion.js +4 -4
  25. package/dist/components/Input/Input.js +9 -7
  26. package/dist/components/Input/InputCore.js +32 -13
  27. package/dist/components/LoadingOverlay/LoadingOverlay.js +30 -0
  28. package/dist/components/LoadingOverlay/index.js +3 -0
  29. package/dist/components/LocaleProvider/ar-sa.js +4 -0
  30. package/dist/components/LocaleProvider/de-de.js +4 -0
  31. package/dist/components/LocaleProvider/es-es.js +4 -0
  32. package/dist/components/LocaleProvider/fr-fr.js +4 -0
  33. package/dist/components/LocaleProvider/it-it.js +4 -0
  34. package/dist/components/LocaleProvider/ja-jp.js +4 -0
  35. package/dist/components/LocaleProvider/ko-kr.js +4 -0
  36. package/dist/components/LocaleProvider/locale.js +4 -0
  37. package/dist/components/LocaleProvider/pt-br.js +4 -0
  38. package/dist/components/LocaleProvider/ru-ru.js +4 -0
  39. package/dist/components/LocaleProvider/zh-cn.js +4 -0
  40. package/dist/components/Mark/Mark.js +20 -0
  41. package/dist/components/Mark/index.js +2 -0
  42. package/dist/components/Mentions/MentionsCore.js +3 -3
  43. package/dist/components/Menu/MenuItem.js +6 -4
  44. package/dist/components/NumberFormatter/NumberFormatter.js +16 -0
  45. package/dist/components/NumberFormatter/index.js +2 -0
  46. package/dist/components/OTPInput/OTPInputCore.js +6 -6
  47. package/dist/components/PasswordInput/PasswordInputCore.js +27 -26
  48. package/dist/components/Rating/RatingCore.js +18 -18
  49. package/dist/components/Select/Select.js +28 -23
  50. package/dist/components/Select/SelectCore.js +26 -23
  51. package/dist/components/Select/SelectFloating.js +157 -153
  52. package/dist/components/Spoiler/Spoiler.js +36 -0
  53. package/dist/components/Spoiler/index.js +3 -0
  54. package/dist/components/TagGroup/SortableTagGroup.js +32 -20
  55. package/dist/components/TagGroup/TagGroup.js +23 -9
  56. package/dist/components/TagGroup/TagGroupItem.js +21 -15
  57. package/dist/components/TagInput/TagInputCore.js +10 -10
  58. package/dist/components/TimePicker/TimePickerPanel.js +3 -3
  59. package/dist/components/Toast/ToastContainer.js +4 -4
  60. package/dist/components/TreeSelect/TreeSelect.js +6 -6
  61. package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
  62. package/dist/components/VisuallyHidden/index.js +2 -0
  63. package/dist/css/accordion.css +2 -0
  64. package/dist/css/activity-rail.css +2 -0
  65. package/dist/css/affix.css +2 -0
  66. package/dist/css/alert.css +2 -0
  67. package/dist/css/anchor.css +2 -0
  68. package/dist/css/app-shell.css +2 -0
  69. package/dist/css/approval-card.css +2 -0
  70. package/dist/css/aspect-ratio.css +2 -0
  71. package/dist/css/async-section.css +2 -0
  72. package/dist/css/avatar-group.css +2 -0
  73. package/dist/css/avatar.css +2 -0
  74. package/dist/css/back-to-top.css +2 -0
  75. package/dist/css/badge.css +2 -0
  76. package/dist/css/banner.css +2 -0
  77. package/dist/css/bottom-sheet.css +2 -0
  78. package/dist/css/breadcrumb.css +2 -0
  79. package/dist/css/button.css +3 -2
  80. package/dist/css/calendar.css +2 -0
  81. package/dist/css/card.css +2 -0
  82. package/dist/css/carousel.css +2 -0
  83. package/dist/css/cascader.css +2 -0
  84. package/dist/css/chart.css +2 -0
  85. package/dist/css/chat-container.css +2 -0
  86. package/dist/css/chat-input.css +2 -0
  87. package/dist/css/chat-message.css +2 -0
  88. package/dist/css/checkbox.css +2 -0
  89. package/dist/css/chip.css +2 -0
  90. package/dist/css/code-block.css +2 -0
  91. package/dist/css/collapsible.css +2 -0
  92. package/dist/css/color-picker.css +2 -0
  93. package/dist/css/combobox.css +2 -0
  94. package/dist/css/command.css +2 -0
  95. package/dist/css/confirm-dialog.css +2 -0
  96. package/dist/css/container.css +2 -0
  97. package/dist/css/context-menu.css +2 -0
  98. package/dist/css/conversation-list.css +2 -0
  99. package/dist/css/count-up.css +2 -0
  100. package/dist/css/data-table.css +2 -0
  101. package/dist/css/date-range-picker.css +2 -0
  102. package/dist/css/datepicker.css +2 -0
  103. package/dist/css/descriptions.css +2 -0
  104. package/dist/css/dialog.css +2 -0
  105. package/dist/css/diff-viewer.css +2 -0
  106. package/dist/css/disclosure.css +2 -0
  107. package/dist/css/divider.css +2 -0
  108. package/dist/css/drawer.css +2 -0
  109. package/dist/css/dropdown-menu.css +2 -0
  110. package/dist/css/ellipsis.css +2 -0
  111. package/dist/css/empty.css +2 -0
  112. package/dist/css/fieldset.css +4 -0
  113. package/dist/css/file-input.css +2 -0
  114. package/dist/css/file-preview.css +2 -0
  115. package/dist/css/flex.css +2 -0
  116. package/dist/css/float-button.css +2 -0
  117. package/dist/css/form.css +2 -0
  118. package/dist/css/grid.css +2 -0
  119. package/dist/css/hover-card.css +2 -0
  120. package/dist/css/icon.css +2 -0
  121. package/dist/css/image.css +2 -0
  122. package/dist/css/indicator.css +4 -0
  123. package/dist/css/inline-completion.css +2 -0
  124. package/dist/css/inline-edit.css +2 -0
  125. package/dist/css/input.css +3 -1
  126. package/dist/css/json-view.css +2 -0
  127. package/dist/css/kbd.css +2 -0
  128. package/dist/css/list.css +2 -0
  129. package/dist/css/loading-overlay.css +4 -0
  130. package/dist/css/log-viewer.css +2 -0
  131. package/dist/css/mark.css +4 -0
  132. package/dist/css/markdown-renderer.css +2 -0
  133. package/dist/css/masonry.css +2 -0
  134. package/dist/css/mentions.css +2 -0
  135. package/dist/css/menu.css +3 -1
  136. package/dist/css/model-picker.css +2 -0
  137. package/dist/css/navigation-bar.css +2 -0
  138. package/dist/css/number-input.css +2 -0
  139. package/dist/css/otp-input.css +2 -0
  140. package/dist/css/pagination.css +2 -0
  141. package/dist/css/password-input.css +3 -1
  142. package/dist/css/popover.css +2 -0
  143. package/dist/css/progress.css +2 -0
  144. package/dist/css/prompt-input.css +2 -0
  145. package/dist/css/qr-code.css +2 -0
  146. package/dist/css/radio.css +2 -0
  147. package/dist/css/rating.css +2 -0
  148. package/dist/css/resizable.css +2 -0
  149. package/dist/css/result.css +2 -0
  150. package/dist/css/scroll-area.css +2 -0
  151. package/dist/css/segmented.css +2 -0
  152. package/dist/css/select.css +2 -0
  153. package/dist/css/sidebar.css +2 -0
  154. package/dist/css/signature.css +2 -0
  155. package/dist/css/skeleton.css +2 -0
  156. package/dist/css/slider.css +2 -0
  157. package/dist/css/sources.css +2 -0
  158. package/dist/css/sparkline.css +2 -0
  159. package/dist/css/spinner.css +2 -0
  160. package/dist/css/spoiler.css +4 -0
  161. package/dist/css/stat.css +2 -0
  162. package/dist/css/status-bar.css +2 -0
  163. package/dist/css/step-timeline.css +2 -0
  164. package/dist/css/stepper.css +2 -0
  165. package/dist/css/streaming-text.css +2 -0
  166. package/dist/css/swipe-action.css +2 -0
  167. package/dist/css/switch.css +2 -0
  168. package/dist/css/tab-bar.css +2 -0
  169. package/dist/css/table.css +2 -0
  170. package/dist/css/tabs.css +2 -0
  171. package/dist/css/tag-group.css +2 -0
  172. package/dist/css/tag-input.css +2 -0
  173. package/dist/css/tag.css +2 -0
  174. package/dist/css/textarea.css +2 -0
  175. package/dist/css/thinking-indicator.css +2 -0
  176. package/dist/css/time-picker.css +2 -0
  177. package/dist/css/timeline.css +2 -0
  178. package/dist/css/toast.css +2 -0
  179. package/dist/css/toggle.css +2 -0
  180. package/dist/css/token-counter.css +2 -0
  181. package/dist/css/tokens.css +2 -0
  182. package/dist/css/tool-call-card.css +2 -0
  183. package/dist/css/toolbar.css +2 -0
  184. package/dist/css/tooltip.css +2 -0
  185. package/dist/css/tour.css +2 -0
  186. package/dist/css/transfer.css +2 -0
  187. package/dist/css/tree-select.css +2 -0
  188. package/dist/css/tree.css +2 -0
  189. package/dist/css/typography.css +2 -0
  190. package/dist/css/upload.css +2 -0
  191. package/dist/css/virtual-list.css +2 -0
  192. package/dist/css/visually-hidden.css +4 -0
  193. package/dist/css/watermark.css +2 -0
  194. package/dist/css/workbench.css +2 -0
  195. package/dist/css-manifest.json +186 -1
  196. package/dist/haze-ui.css +405 -5
  197. package/dist/headless/index.js +18 -17
  198. package/dist/hooks/useBusyPressable.js +10 -0
  199. package/dist/index.js +112 -102
  200. package/dist/mcp-docs.json +498 -3
  201. package/dist/registry.json +142 -10
  202. package/dist/types/components/Button/Button.d.ts +50 -5
  203. package/dist/types/components/Button/ButtonLink.d.ts +27 -15
  204. package/dist/types/components/Button/styles.d.ts +34 -0
  205. package/dist/types/components/Combobox/Combobox.d.ts +20 -2
  206. package/dist/types/components/Combobox/index.d.ts +1 -1
  207. package/dist/types/components/ConfigProvider/ConfigContext.d.ts +20 -0
  208. package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  209. package/dist/types/components/ConfirmDialog/confirm.d.ts +33 -0
  210. package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
  211. package/dist/types/components/DateTimePicker/DateTimePicker.d.ts +36 -0
  212. package/dist/types/components/DateTimePicker/index.d.ts +2 -0
  213. package/dist/types/components/Datepicker/Datepicker.d.ts +3 -3
  214. package/dist/types/components/Datepicker/DatepickerCore.d.ts +3 -3
  215. package/dist/types/components/Drawer/Drawer.d.ts +15 -2
  216. package/dist/types/components/Drawer/index.d.ts +1 -1
  217. package/dist/types/components/Fieldset/Fieldset.d.ts +16 -0
  218. package/dist/types/components/Fieldset/index.d.ts +2 -0
  219. package/dist/types/components/Highlight/Highlight.d.ts +27 -0
  220. package/dist/types/components/Highlight/index.d.ts +2 -0
  221. package/dist/types/components/Indicator/Indicator.d.ts +24 -0
  222. package/dist/types/components/Indicator/index.d.ts +2 -0
  223. package/dist/types/components/Input/Input.d.ts +8 -2
  224. package/dist/types/components/Input/InputCore.d.ts +11 -2
  225. package/dist/types/components/LoadingOverlay/LoadingOverlay.d.ts +25 -0
  226. package/dist/types/components/LoadingOverlay/index.d.ts +2 -0
  227. package/dist/types/components/LocaleProvider/locale.d.ts +4 -0
  228. package/dist/types/components/Mark/Mark.d.ts +12 -0
  229. package/dist/types/components/Mark/index.d.ts +2 -0
  230. package/dist/types/components/Menu/MenuItem.d.ts +15 -4
  231. package/dist/types/components/NumberFormatter/NumberFormatter.d.ts +23 -0
  232. package/dist/types/components/NumberFormatter/index.d.ts +2 -0
  233. package/dist/types/components/Select/Select.d.ts +23 -2
  234. package/dist/types/components/Select/SelectCore.d.ts +4 -1
  235. package/dist/types/components/Select/SelectFloating.d.ts +6 -1
  236. package/dist/types/components/Select/index.d.ts +1 -1
  237. package/dist/types/components/Spoiler/Spoiler.d.ts +20 -0
  238. package/dist/types/components/Spoiler/index.d.ts +2 -0
  239. package/dist/types/components/TagGroup/SortableTagGroup.d.ts +5 -1
  240. package/dist/types/components/TagGroup/TagGroup.d.ts +24 -2
  241. package/dist/types/components/TagGroup/index.d.ts +1 -1
  242. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +4 -0
  243. package/dist/types/components/VisuallyHidden/index.d.ts +2 -0
  244. package/dist/types/headless/index.d.ts +9 -0
  245. package/dist/types/hooks/index.d.ts +13 -0
  246. package/dist/types/hooks/useBusyPressable.d.ts +33 -0
  247. package/dist/types/hooks/useElementSize.d.ts +38 -0
  248. package/dist/types/hooks/useIdle.d.ts +45 -0
  249. package/dist/types/hooks/useMutationObserver.d.ts +35 -0
  250. package/dist/types/hooks/useNetwork.d.ts +31 -0
  251. package/dist/types/hooks/useOrientation.d.ts +23 -0
  252. package/dist/types/hooks/useResizeObserver.d.ts +48 -0
  253. package/dist/types/index.d.ts +24 -6
  254. package/package.json +5 -5
package/README.md CHANGED
@@ -257,6 +257,38 @@ re-deriving file names — the mapping changes in lockstep with the build.
257
257
  The official [`haze-ui-vite`](https://www.npmjs.com/package/haze-ui-vite)
258
258
  plugin (above) is the reference consumer of this data.
259
259
 
260
+ #### Styling & overriding (the `@layer haze` contract)
261
+
262
+ All shipped CSS lives inside **`@layer haze`**, so your own *unlayered*
263
+ styles beat every library rule regardless of source order or
264
+ specificity — no `!important`, no selector wrestling:
265
+
266
+ ```css
267
+ /* your stylesheet, plain CSS — always wins over the library */
268
+ [data-slot='button'] {
269
+ letter-spacing: 0.02em;
270
+ }
271
+ ```
272
+
273
+ Every element a component renders carries a stable **`data-slot`**
274
+ attribute (`data-slot='button'`, `'label'`, `'panel'`, `'menu-item'`,
275
+ …). It is the official override surface: the attribute set is enforced
276
+ by a coverage test, so it cannot silently drift between releases. The
277
+ cascade is intentional — prefer, in order:
278
+
279
+ 1. **tokens** — `var(--haze-color-primary)` and friends re-derive whole
280
+ interaction-state families at runtime; per-component
281
+ `--haze-button-*` variables retheme one family;
282
+ 2. **`ConfigProvider` defaults** — app-wide per-component prop defaults
283
+ (and `classNames` where the component exposes slots);
284
+ 3. **`data-slot` CSS targeting** — structural overrides (the escape
285
+ hatch above);
286
+ 4. **`className` / `classNames`** — per-instance overrides, reserved
287
+ for one-offs.
288
+
289
+ If your own framework ships layered styles too, declare order explicitly
290
+ (e.g. `@layer haze, app;`) to keep the last word.
291
+
260
292
  ### Server Components (Next.js App Router)
261
293
 
262
294
  Interactive modules in `dist/` carry the `'use client'` directive,
@@ -1,22 +1,40 @@
1
1
  "use client";
2
2
  import { classnames as e } from "../../utils/classnames.js";
3
- import { useConfigDefaults as t } from "../ConfigProvider/useConfigDefaults.js";
4
- import { base as n, sizes as r, squareSizes as i, variants as a } from "./styles.js";
5
- import { jsx as o } from "react/jsx-runtime";
3
+ import { useBusyPressable as t } from "../../hooks/useBusyPressable.js";
4
+ import n from "../Spinner/Spinner.js";
5
+ import { useConfigDefaults as r } from "../ConfigProvider/useConfigDefaults.js";
6
+ import { base as i, label as a, sizes as o, squareSizes as s, variants as c } from "./styles.js";
7
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
6
8
  //#region src/lib/components/Button/Button.tsx
7
- function s({ variant: s = "solid", size: c, square: l = !1, className: u, ...d }) {
8
- let f = t("Button"), p = c ?? f.size ?? "md", m = l ? i[p] : r[p];
9
- return /* @__PURE__ */ o("button", {
10
- type: "button",
11
- "data-slot": "button",
12
- ...d,
9
+ function f({ variant: f = "solid", size: p, square: m = !1, loading: h = !1, as: g, className: _, children: v, disabled: y, ...b }) {
10
+ let x = r("Button"), S = p ?? x.size ?? "md", C = m ? s[S] : o[S], w = !!h, T = t(w, y), E = typeof h == "object" ? h.icon : void 0, D = typeof h == "object" ? h.text : void 0, O = g ?? "button", k = g === void 0 || g === "button";
11
+ return /* @__PURE__ */ u(O, {
12
+ ...k ? {
13
+ type: "button",
14
+ disabled: T.disabled
15
+ } : { "aria-disabled": T.disabled || void 0 },
16
+ "data-slot": k ? "button" : "button-link",
17
+ "data-loading": w || void 0,
18
+ "aria-busy": T["aria-busy"],
19
+ ...b,
13
20
  className: e([
14
- n,
15
- a[s],
16
- m,
17
- u
18
- ])
21
+ i,
22
+ c[f],
23
+ C,
24
+ !k && "haze-styles__link",
25
+ w && "haze-styles__loading",
26
+ _
27
+ ]),
28
+ children: w ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", {
29
+ "data-slot": "label",
30
+ className: e([a]),
31
+ children: D === void 0 ? v : D
32
+ }), /* @__PURE__ */ u("span", {
33
+ "data-slot": "indicator",
34
+ "aria-hidden": !0,
35
+ children: E ?? /* @__PURE__ */ u(n, { size: "sm" })
36
+ })] }) : v
19
37
  });
20
38
  }
21
39
  //#endregion
22
- export { s as default };
40
+ export { f as default };
@@ -1,26 +1,17 @@
1
-
2
1
  "use client";
3
- import { classnames as e } from "../../utils/classnames.js";
4
- import { useConfigDefaults as t } from "../ConfigProvider/useConfigDefaults.js";
5
- import { base as n, sizes as r, squareSizes as i, variants as a } from "./styles.js";
6
- /* empty css */
7
- import { forwardRef as o } from "react";
8
- import { jsx as s } from "react/jsx-runtime";
2
+ import { useConfigDefaults as e } from "../ConfigProvider/useConfigDefaults.js";
3
+ import t from "./Button.js";
4
+ import { forwardRef as n } from "react";
5
+ import { jsx as r } from "react/jsx-runtime";
9
6
  //#region src/lib/components/Button/ButtonLink.tsx
10
- var c = "haze-ButtonLink__link", l = o(function({ variant: o = "solid", size: l, square: u = !1, className: d, ...f }, p) {
11
- let m = t("ButtonLink"), h = l ?? m.size ?? "md", g = u ? i[h] : r[h];
12
- return /* @__PURE__ */ s("a", {
13
- ref: p,
14
- "data-slot": "button-link",
15
- ...f,
16
- className: e([
17
- n,
18
- a[o],
19
- g,
20
- c,
21
- d
22
- ])
7
+ var i = n(function({ size: n, ...i }, a) {
8
+ let o = e("ButtonLink"), s = n ?? o.size;
9
+ return /* @__PURE__ */ r(t, {
10
+ as: "a",
11
+ ref: a,
12
+ size: s,
13
+ ...i
23
14
  });
24
15
  });
25
16
  //#endregion
26
- export { l as default };
17
+ export { i as default };
@@ -14,6 +14,6 @@ var e = "haze-styles__base", t = {
14
14
  sm: a,
15
15
  md: o,
16
16
  lg: s
17
- };
17
+ }, u = "haze-styles__label", d = "haze-styles__link", f = "haze-styles__loading";
18
18
  //#endregion
19
- export { e as base, i as sizeLg, r as sizeMd, n as sizeSm, c as sizes, s as squareLg, o as squareMd, l as squareSizes, a as squareSm, t as variants };
19
+ export { e as base, u as label, d as link, f as loading, i as sizeLg, r as sizeMd, n as sizeSm, c as sizes, s as squareLg, o as squareMd, l as squareSizes, a as squareSm, t as variants };
@@ -1,11 +1,11 @@
1
1
 
2
2
  "use client";
3
3
  import { classnames as e } from "../../utils/classnames.js";
4
- import { mergeRefs as t } from "../../utils/refs.js";
5
- import { getDirection as n } from "../../utils/direction.js";
6
- import { useStrings as r } from "../LocaleProvider/useStrings.js";
7
- import { FloatingPanel as i, useFloating as a } from "../../utils/floating.js";
8
- import o from "../Spinner/Spinner.js";
4
+ import { getDirection as t } from "../../utils/direction.js";
5
+ import { useStrings as n } from "../LocaleProvider/useStrings.js";
6
+ import r from "../Spinner/Spinner.js";
7
+ import { mergeRefs as i } from "../../utils/refs.js";
8
+ import { FloatingPanel as a, useFloating as o } from "../../utils/floating.js";
9
9
  import ee from "../VirtualList/VirtualList.js";
10
10
  import { useFocusScope as te } from "../../utils/focus-scope.js";
11
11
  /* empty css */
@@ -41,7 +41,7 @@ function g(e) {
41
41
  return e ? Array.from(e.querySelectorAll(m)) : [];
42
42
  }
43
43
  function _({ options: _, value: v, onChange: je, placeholder: Me, changeOnSelect: Ne = !1, expandTrigger: Pe = "click", onSearch: y, loading: b = !1, virtualized: x, className: Fe, ref: S, ...Ie }) {
44
- let Le = r("cascader"), C = r("select"), [w, T] = p(!1, !1), E = ae(v), [D, O] = p(oe(E ? v : void 0, se((e) => je?.(e))), E ? [] : v ?? []), [k, A] = u([]), [j, M] = u(null), N = y !== void 0, [P, Re] = u(""), F = x !== void 0 && x !== !1, I = typeof x == "object" ? x : void 0, L = I?.itemHeight ?? Ce, ze = I?.overscan, R = re(), z = l(null), Be = s((e) => t(z, S)(e), [z, S]), B = l(null), V = l(null), H = l(/* @__PURE__ */ new Map()), U = l(!1), W = a({
44
+ let Le = n("cascader"), C = n("select"), [w, T] = p(!1, !1), E = ae(v), [D, O] = p(oe(E ? v : void 0, se((e) => je?.(e))), E ? [] : v ?? []), [k, A] = u([]), [j, M] = u(null), N = y !== void 0, [P, Re] = u(""), F = x !== void 0 && x !== !1, I = typeof x == "object" ? x : void 0, L = I?.itemHeight ?? Ce, ze = I?.overscan, R = re(), z = l(null), Be = s((e) => i(z, S)(e), [z, S]), B = l(null), V = l(null), H = l(/* @__PURE__ */ new Map()), U = l(!1), W = o({
45
45
  open: w,
46
46
  setOpen: T,
47
47
  triggerRef: z,
@@ -148,9 +148,9 @@ function _({ options: _, value: v, onChange: je, placeholder: Me, changeOnSelect
148
148
  }, Ge = (e) => {
149
149
  !w && (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), T(!0));
150
150
  }, Ke = (e) => {
151
- let t = B.current;
152
- if (!t) return;
153
- let r = (document.activeElement instanceof HTMLElement ? document.activeElement : null)?.closest(m) ?? void 0, i = r ? Number(r.dataset.level) : 0, a = n(t) === "rtl" ? "ArrowLeft" : "ArrowRight", o = a === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
151
+ let n = B.current;
152
+ if (!n) return;
153
+ let r = (document.activeElement instanceof HTMLElement ? document.activeElement : null)?.closest(m) ?? void 0, i = r ? Number(r.dataset.level) : 0, a = t(n) === "rtl" ? "ArrowLeft" : "ArrowRight", o = a === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
154
154
  switch (e.key) {
155
155
  case "ArrowDown":
156
156
  case "ArrowUp": {
@@ -252,7 +252,7 @@ function _({ options: _, value: v, onChange: je, placeholder: Me, changeOnSelect
252
252
  }, n)), $ = b ? /* @__PURE__ */ f("div", {
253
253
  "data-slot": "loading",
254
254
  className: e(ve),
255
- children: [/* @__PURE__ */ d(o, { size: "sm" }), /* @__PURE__ */ d("span", { children: C.loading })]
255
+ children: [/* @__PURE__ */ d(r, { size: "sm" }), /* @__PURE__ */ d("span", { children: C.loading })]
256
256
  }) : N && _.length === 0 ? /* @__PURE__ */ d("div", {
257
257
  "data-slot": "empty",
258
258
  className: e(ye),
@@ -291,7 +291,7 @@ function _({ options: _, value: v, onChange: je, placeholder: Me, changeOnSelect
291
291
  className: e(fe),
292
292
  children: /* @__PURE__ */ d(Ae, {})
293
293
  })]
294
- }), /* @__PURE__ */ d(i, {
294
+ }), /* @__PURE__ */ d(a, {
295
295
  ref: Ve,
296
296
  behavior: W,
297
297
  placement: "bottom",
@@ -1,8 +1,8 @@
1
1
 
2
2
  "use client";
3
3
  import { classnames as e } from "../../utils/classnames.js";
4
- import { mergeRefs as t } from "../../utils/refs.js";
5
- import { useStrings as n } from "../LocaleProvider/useStrings.js";
4
+ import { useStrings as t } from "../LocaleProvider/useStrings.js";
5
+ import { mergeRefs as n } from "../../utils/refs.js";
6
6
  import { FloatingPanel as r, useFloating as i } from "../../utils/floating.js";
7
7
  import { cssColor as a, parseColor as o, rgbHexKey as s } from "./color-math.js";
8
8
  import { checkerboard as c, panelVisuals as l, swatchFill as u, trigger as d } from "./color-picker-styles.js";
@@ -14,7 +14,7 @@ import { useControl as b } from "react-use-control";
14
14
  //#region src/lib/components/ColorPicker/ColorPicker.tsx
15
15
  var x = 10, S = "haze-ColorPicker__container";
16
16
  function C({ value: C, onChange: w, open: T, inline: E = !1, format: D = "hex", allowAlpha: O = !1, presets: k, recent: A = !1, className: j, "aria-label": M, ref: N }) {
17
- let P = n("colorPicker"), [F, I] = b(C, "#000000"), [L, R] = b(T, !1), z = M ?? P.pickColor, B = o(F)?.rgb ?? {
17
+ let P = t("colorPicker"), [F, I] = b(C, "#000000"), [L, R] = b(T, !1), z = M ?? P.pickColor, B = o(F)?.rgb ?? {
18
18
  r: 0,
19
19
  g: 0,
20
20
  b: 0
@@ -39,7 +39,7 @@ function C({ value: C, onChange: w, open: T, inline: E = !1, format: D = "hex",
39
39
  allowAlpha: O,
40
40
  presets: k,
41
41
  recentColors: A ? H : void 0
42
- }), K = g(null), q = g(null), J = p((e) => t(K, N)(e), [N]), Y = h(), X = i({
42
+ }), K = g(null), q = g(null), J = p((e) => n(K, N)(e), [N]), Y = h(), X = i({
43
43
  open: L,
44
44
  setOpen: R,
45
45
  triggerRef: K,
@@ -1,22 +1,23 @@
1
1
 
2
2
  "use client";
3
3
  import { classnames as e } from "../../utils/classnames.js";
4
- import { mergeRefs as t } from "../../utils/refs.js";
5
- import { formatString as n } from "../LocaleProvider/locale.js";
6
- import { useStrings as r } from "../LocaleProvider/useStrings.js";
7
- import { FloatingPanel as ee, useFloating as te } from "../../utils/floating.js";
8
- import ne from "../Chip/Chip.js";
9
- import re from "../Spinner/Spinner.js";
10
- import ie from "../VirtualList/VirtualList.js";
11
- import ae from "./ComboboxGroup.js";
12
- import oe from "./ComboboxOption.js";
4
+ import { formatString as t } from "../LocaleProvider/locale.js";
5
+ import { useStrings as n } from "../LocaleProvider/useStrings.js";
6
+ import r from "../Spinner/Spinner.js";
7
+ import { useConfigDefaults as ee } from "../ConfigProvider/useConfigDefaults.js";
8
+ import { mergeRefs as te } from "../../utils/refs.js";
9
+ import { FloatingPanel as ne, useFloating as re } from "../../utils/floating.js";
10
+ import ie from "../Chip/Chip.js";
11
+ import ae from "../VirtualList/VirtualList.js";
12
+ import oe from "./ComboboxGroup.js";
13
+ import se from "./ComboboxOption.js";
13
14
  /* empty css */
14
- import { useCallback as se, useEffect as i, useId as ce, useMemo as le, useRef as a, useState as o } from "react";
15
+ import { useCallback as ce, useEffect as i, useId as le, useMemo as ue, useRef as a, useState as o } from "react";
15
16
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
16
17
  import { useControl as u } from "react-use-control";
17
18
  //#region src/lib/components/Combobox/Combobox.tsx
18
- var ue = "haze-Combobox__wrapper", de = "haze-Combobox__input", fe = "haze-Combobox__multiBox", pe = "haze-Combobox__multiInput", d = "haze-Combobox__matchMark", f = "haze-Combobox__stateRow", me = "haze-Combobox__groupHeadingText", he = "haze-Combobox__listbox", ge = "haze-Combobox__listboxVirtual", _e = 200, ve = 37, ye = "haze-Combobox__virtualRow";
19
- function be(t, n) {
19
+ var de = "haze-Combobox__wrapper", fe = "haze-Combobox__input", pe = "haze-Combobox__multiBox", me = "haze-Combobox__multiInput", d = "haze-Combobox__matchMark", f = "haze-Combobox__stateRow", he = "haze-Combobox__groupHeadingText", ge = "haze-Combobox__listbox", _e = "haze-Combobox__listboxVirtual", ve = 200, ye = 37, be = "haze-Combobox__virtualRow";
20
+ function xe(t, n) {
20
21
  if (n === "") return t;
21
22
  let r = t.toLowerCase().indexOf(n.toLowerCase());
22
23
  return r < 0 ? t : /* @__PURE__ */ l(s, { children: [
@@ -29,28 +30,31 @@ function be(t, n) {
29
30
  t.slice(r + n.length)
30
31
  ] });
31
32
  }
32
- function p({ value: s, open: d, options: p, multiple: m = !1, onValuesChange: h, creatable: xe = !1, onCreate: Se, onSearch: g, loading: _ = !1, empty: Ce, highlightMatches: we = !1, maxHeight: v, placeholder: Te, virtualThreshold: y = 100, virtualized: b, className: Ee, ref: x }) {
33
- let S = r("combobox"), [C, w] = u(s, m ? [] : ""), [T, De] = o([]), [E, D] = o(""), [O, k] = u(d, !1), [A, j] = o(-1), [Oe, ke] = o(E), M = ce(), N = a(null), Ae = se((e) => t(N, x)(e), [N, x]), P = a(null), F = a(null), I = a(null), L = a(null), R = te({
34
- open: O,
35
- setOpen: k,
36
- triggerRef: m ? P : N,
37
- panelRef: F,
33
+ function p({ value: s, open: d, options: p, multiple: m = !1, onValuesChange: h, creatable: Se = !1, onCreate: Ce, onSearch: g, loading: _ = !1, empty: we, highlightMatches: Te = !1, maxHeight: v, placeholder: Ee, virtualThreshold: y = 100, virtualized: b, className: De, classNames: x, ref: S }) {
34
+ let C = ee("Combobox"), w = C.classNames ? {
35
+ ...C.classNames,
36
+ ...x
37
+ } : x, T = n("combobox"), [E, D] = u(s, m ? [] : ""), [O, Oe] = o([]), [k, A] = o(""), [j, M] = u(d, !1), [N, P] = o(-1), [ke, Ae] = o(k), F = le(), I = a(null), je = ce((e) => te(I, S)(e), [I, S]), L = a(null), R = a(null), Me = a(null), z = a(null), B = re({
38
+ open: j,
39
+ setOpen: M,
40
+ triggerRef: m ? L : I,
41
+ panelRef: R,
38
42
  animated: !0
39
- }), z = Array.isArray(C) ? C : [], B = le(() => {
40
- if (T.length === 0) return p;
41
- let e = new Set(p.map((e) => e.value)), t = T.filter((t) => !e.has(t)).map((e) => ({
43
+ }), V = Array.isArray(E) ? E : [], H = ue(() => {
44
+ if (O.length === 0) return p;
45
+ let e = new Set(p.map((e) => e.value)), t = O.filter((t) => !e.has(t)).map((e) => ({
42
46
  value: e,
43
47
  label: e
44
48
  }));
45
49
  return t.length > 0 ? [...p, ...t] : p;
46
- }, [p, T]), V = g ? B : B.filter((e) => e.label.toLowerCase().includes(E.toLowerCase())), H = xe && !_ && E.trim() !== "" && V.length === 0, U = E.trim(), je = n(S.create, { query: U }), W = H ? [{
47
- value: U,
48
- label: U
49
- }, ...V] : V, G = typeof b == "object" ? b : void 0, K = (b === void 0 ? void 0 : !!b) ?? (y > 0 && W.length > y), q = G?.itemHeight ?? ve, Me = G?.overscan, J = (e) => `${M}-option-${e}`, Ne = O && W[A] ? J(A) : void 0, Y = [];
50
- for (let e = 0; e < W.length; e++) {
51
- let t = W[e];
50
+ }, [p, O]), U = g ? H : H.filter((e) => e.label.toLowerCase().includes(k.toLowerCase())), W = Se && !_ && k.trim() !== "" && U.length === 0, G = k.trim(), Ne = t(T.create, { query: G }), K = W ? [{
51
+ value: G,
52
+ label: G
53
+ }, ...U] : U, q = typeof b == "object" ? b : void 0, J = (b === void 0 ? void 0 : !!b) ?? (y > 0 && K.length > y), Y = q?.itemHeight ?? ye, Pe = q?.overscan, X = (e) => `${F}-option-${e}`, Fe = j && K[N] ? X(N) : void 0, Z = [];
54
+ for (let e = 0; e < K.length; e++) {
55
+ let t = K[e];
52
56
  if (t === void 0) continue;
53
- let n = Y[Y.length - 1];
57
+ let n = Z[Z.length - 1];
54
58
  if (t.group !== void 0 && n?.label === t.group) {
55
59
  n.rows.push({
56
60
  option: t,
@@ -58,7 +62,7 @@ function p({ value: s, open: d, options: p, multiple: m = !1, onValuesChange: h,
58
62
  });
59
63
  continue;
60
64
  }
61
- Y.push(t.group === void 0 ? {
65
+ Z.push(t.group === void 0 ? {
62
66
  key: `row-${t.value}`,
63
67
  label: void 0,
64
68
  rows: [{
@@ -74,150 +78,155 @@ function p({ value: s, open: d, options: p, multiple: m = !1, onValuesChange: h,
74
78
  }]
75
79
  });
76
80
  }
77
- let Pe = Y.some((e) => e.label !== void 0);
81
+ let Ie = Z.some((e) => e.label !== void 0);
78
82
  i(() => {
79
- if (!R.shown || A < 0) return;
80
- if (K) {
81
- I.current?.scrollToIndex(A, "auto");
83
+ if (!B.shown || N < 0) return;
84
+ if (J) {
85
+ Me.current?.scrollToIndex(N, "auto");
82
86
  return;
83
87
  }
84
- let e = L.current;
88
+ let e = z.current;
85
89
  e && typeof e.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
86
90
  }, [
87
- K,
88
- R.shown,
89
- A
91
+ J,
92
+ B.shown,
93
+ N
90
94
  ]);
91
- let X = a(g);
95
+ let Q = a(g);
92
96
  i(() => {
93
- X.current = g;
97
+ Q.current = g;
94
98
  }, [g]);
95
- let Z = a(E);
99
+ let Le = a(k);
96
100
  i(() => {
97
- Z.current !== E && (Z.current = E, X.current?.(E));
98
- }, [E]), E !== Oe && (ke(E), j(-1));
99
- let Fe = (e) => m ? z.includes(e) : C === e, Ie = (e) => B.find((t) => t.value === e)?.label ?? e, Le = (e, t) => {
100
- let n = t ?? B.find((t) => t.value === e)?.label ?? e;
101
+ Le.current !== k && (Le.current = k, Q.current?.(k));
102
+ }, [k]), k !== ke && (Ae(k), P(-1));
103
+ let Re = (e) => m ? V.includes(e) : E === e, ze = (e) => H.find((t) => t.value === e)?.label ?? e, Be = (e, t) => {
104
+ let n = t ?? H.find((t) => t.value === e)?.label ?? e;
101
105
  if (m) {
102
- let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
103
- w(t), h?.(t), D("");
104
- } else w(e), h?.(e), D(n), k(!1);
105
- N.current?.focus();
106
- }, Re = () => {
107
- Se?.(U), De((e) => e.includes(U) ? e : [...e, U]), Le(U, U);
108
- }, ze = (e) => {
109
- if (H && e === U) {
110
- Re();
106
+ let t = V.includes(e) ? V.filter((t) => t !== e) : [...V, e];
107
+ D(t), h?.(t), A("");
108
+ } else D(e), h?.(e), A(n), M(!1);
109
+ I.current?.focus();
110
+ }, Ve = () => {
111
+ Ce?.(G), Oe((e) => e.includes(G) ? e : [...e, G]), Be(G, G);
112
+ }, He = (e) => {
113
+ if (W && e === G) {
114
+ Ve();
111
115
  return;
112
116
  }
113
- Le(e);
114
- }, Be = (e) => {
115
- if (e.key === "ArrowDown") e.preventDefault(), k(!0), j((e) => Math.min(e + 1, W.length - 1));
116
- else if (e.key === "ArrowUp") e.preventDefault(), k(!0), j((e) => Math.max(e - 1, 0));
117
- else if (e.key === "Enter" && A >= 0 && W[A]) e.preventDefault(), ze(W[A].value);
118
- else if (e.key === "Escape") k(!1);
119
- else if (e.key === "Backspace" && m && E === "" && z.length > 0) {
117
+ Be(e);
118
+ }, Ue = (e) => {
119
+ if (e.key === "ArrowDown") e.preventDefault(), M(!0), P((e) => Math.min(e + 1, K.length - 1));
120
+ else if (e.key === "ArrowUp") e.preventDefault(), M(!0), P((e) => Math.max(e - 1, 0));
121
+ else if (e.key === "Enter" && N >= 0 && K[N]) e.preventDefault(), He(K[N].value);
122
+ else if (e.key === "Escape") M(!1);
123
+ else if (e.key === "Backspace" && m && k === "" && V.length > 0) {
120
124
  e.preventDefault();
121
- let t = z.slice(0, -1);
122
- w(t), h?.(t);
125
+ let t = V.slice(0, -1);
126
+ D(t), h?.(t);
123
127
  }
124
- }, Q = (e, t, n) => /* @__PURE__ */ c(oe, {
125
- ref: !n && t === A ? L : void 0,
126
- value: e.value,
127
- id: J(t),
128
- setSize: W.length,
129
- posInSet: t + 1,
130
- highlighted: t === A,
131
- selected: Fe(e.value),
132
- onSelect: ze,
133
- className: n ? ye : void 0,
134
- children: H && t === 0 ? je : we ? be(e.label, E) : e.label
135
- }, e.value), $ = /* @__PURE__ */ c("input", {
136
- ref: Ae,
128
+ }, $ = (t, n, r) => /* @__PURE__ */ c(se, {
129
+ ref: !r && n === N ? z : void 0,
130
+ value: t.value,
131
+ id: X(n),
132
+ setSize: K.length,
133
+ posInSet: n + 1,
134
+ highlighted: n === N,
135
+ selected: Re(t.value),
136
+ onSelect: He,
137
+ className: e([r && be, w?.item]),
138
+ children: W && n === 0 ? Ne : Te ? xe(t.label, k) : t.label
139
+ }, t.value), We = /* @__PURE__ */ c("input", {
140
+ ref: je,
137
141
  "data-slot": "input",
138
142
  role: "combobox",
139
- style: m ? void 0 : R.triggerStyle,
140
- "aria-expanded": O,
141
- "aria-controls": M,
143
+ style: m ? void 0 : B.triggerStyle,
144
+ "aria-expanded": j,
145
+ "aria-controls": F,
142
146
  "aria-autocomplete": "list",
143
- "aria-activedescendant": Ne,
147
+ "aria-activedescendant": Fe,
144
148
  "aria-busy": _ || void 0,
145
- className: m ? pe : de,
146
- value: E,
147
- placeholder: Te,
149
+ value: k,
150
+ placeholder: Ee,
148
151
  onChange: (e) => {
149
- D(e.target.value), k(!0);
152
+ A(e.target.value), M(!0);
150
153
  },
151
- onPointerDown: m ? void 0 : R.onTriggerPointerDown,
152
- onClick: m ? void 0 : R.onTriggerClick,
153
- onKeyDown: Be
154
+ onPointerDown: m ? void 0 : B.onTriggerPointerDown,
155
+ onClick: m ? void 0 : B.onTriggerClick,
156
+ onKeyDown: Ue,
157
+ className: e([m ? me : fe, w?.input])
154
158
  });
155
159
  return /* @__PURE__ */ l("div", {
156
- className: e([ue, Ee]),
160
+ "data-slot": "combobox",
161
+ className: e([
162
+ de,
163
+ De,
164
+ w?.root
165
+ ]),
157
166
  children: [m ? /* @__PURE__ */ l("div", {
158
- ref: P,
167
+ ref: L,
159
168
  "data-slot": "trigger",
160
- style: R.triggerStyle,
161
- onPointerDown: R.onTriggerPointerDown,
169
+ style: B.triggerStyle,
170
+ onPointerDown: B.onTriggerPointerDown,
162
171
  onClick: () => {
163
- R.onTriggerClick(), N.current?.focus();
172
+ B.onTriggerClick(), I.current?.focus();
164
173
  },
165
- className: e(fe),
166
- children: [z.map((e) => /* @__PURE__ */ c("span", {
174
+ className: e(pe),
175
+ children: [V.map((e) => /* @__PURE__ */ c("span", {
167
176
  "data-slot": "item",
168
177
  onClick: (e) => e.stopPropagation(),
169
- children: /* @__PURE__ */ c(ne, {
178
+ children: /* @__PURE__ */ c(ie, {
170
179
  color: "primary",
171
180
  onClose: () => {
172
- let t = z.filter((t) => t !== e);
173
- w(t), h?.(t);
181
+ let t = V.filter((t) => t !== e);
182
+ D(t), h?.(t);
174
183
  },
175
- children: Ie(e)
184
+ children: ze(e)
176
185
  })
177
- }, e)), $]
178
- }) : $, /* @__PURE__ */ c(ee, {
179
- ref: F,
180
- behavior: R,
186
+ }, e)), We]
187
+ }) : We, /* @__PURE__ */ c(ne, {
188
+ ref: R,
189
+ behavior: B,
181
190
  placement: "bottom-span",
182
- id: M,
191
+ id: F,
183
192
  role: "listbox",
184
193
  "aria-multiselectable": m ? "true" : void 0,
185
- visualClass: K ? ge : he,
186
- style: v !== void 0 && !K ? { maxHeight: `${v}px` } : void 0,
194
+ visualClass: J ? _e : ge,
195
+ style: v !== void 0 && !J ? { maxHeight: `${v}px` } : void 0,
187
196
  children: _ ? /* @__PURE__ */ c("div", {
188
197
  role: "option",
189
198
  "data-slot": "loading",
190
199
  "aria-selected": !1,
191
200
  "aria-disabled": "true",
192
201
  className: e([f]),
193
- children: /* @__PURE__ */ c(re, { size: "sm" })
194
- }) : W.length === 0 ? /* @__PURE__ */ c("div", {
202
+ children: /* @__PURE__ */ c(r, { size: "sm" })
203
+ }) : K.length === 0 ? /* @__PURE__ */ c("div", {
195
204
  role: "option",
196
205
  "data-slot": "empty",
197
206
  "aria-selected": !1,
198
207
  "aria-disabled": "true",
199
- className: e([f]),
200
- children: Ce ?? S.noResults
201
- }) : K ? /* @__PURE__ */ c(ie, {
202
- ref: I,
208
+ className: e([f, w?.empty]),
209
+ children: we ?? T.noResults
210
+ }) : J ? /* @__PURE__ */ c(ae, {
211
+ ref: Me,
203
212
  "data-virtualized": !0,
204
- items: W,
205
- height: Math.min(v ?? _e, W.length * q),
206
- itemHeight: q,
207
- overscan: Me,
208
- groups: Pe ? Y.filter((e) => e.label !== void 0).map((t) => ({
213
+ items: K,
214
+ height: Math.min(v ?? ve, K.length * Y),
215
+ itemHeight: Y,
216
+ overscan: Pe,
217
+ groups: Ie ? Z.filter((e) => e.label !== void 0).map((t) => ({
209
218
  startIndex: t.rows[0]?.index ?? 0,
210
219
  key: t.key,
211
220
  render: () => /* @__PURE__ */ c("div", {
212
221
  "data-slot": "group-label",
213
- className: e([me]),
222
+ className: e([he]),
214
223
  children: t.label
215
224
  })
216
225
  })) : void 0,
217
- renderItem: (e, t) => Q(e, t, !0)
218
- }) : Y.flatMap((e) => e.label === void 0 ? e.rows.map(({ option: e, index: t }) => Q(e, t, !1)) : [/* @__PURE__ */ c(ae, {
226
+ renderItem: (e, t) => $(e, t, !0)
227
+ }) : Z.flatMap((e) => e.label === void 0 ? e.rows.map(({ option: e, index: t }) => $(e, t, !1)) : [/* @__PURE__ */ c(oe, {
219
228
  label: e.label,
220
- children: e.rows.map(({ option: e, index: t }) => Q(e, t, !1))
229
+ children: e.rows.map(({ option: e, index: t }) => $(e, t, !1))
221
230
  }, e.key)])
222
231
  })]
223
232
  });
@@ -1,8 +1,8 @@
1
1
 
2
2
  "use client";
3
3
  import { classnames as e } from "../../utils/classnames.js";
4
- import { mergeRefs as t } from "../../utils/refs.js";
5
- import { useStrings as n } from "../LocaleProvider/useStrings.js";
4
+ import { useStrings as t } from "../LocaleProvider/useStrings.js";
5
+ import { mergeRefs as n } from "../../utils/refs.js";
6
6
  import { getEnabledMenuItems as r, useMenuKeyboard as i, useRovingTabindex as a } from "../../utils/menuKeyboard.js";
7
7
  import o from "../Kbd/Kbd.js";
8
8
  import { collectCommandItems as s, commandItemMatches as c } from "./command-filter.js";
@@ -47,13 +47,13 @@ function S({ query: t, shouldFilter: n = !0, onItemSelect: r, children: i, class
47
47
  });
48
48
  }
49
49
  var C = "haze-Command__inputStyle";
50
- function w({ placeholder: n, className: i, ref: a }) {
50
+ function w({ placeholder: t, className: i, ref: a }) {
51
51
  let { query: o, setQuery: s, inputRef: c, listRef: l } = b();
52
52
  return /* @__PURE__ */ h("input", {
53
- ref: t(c, a),
53
+ ref: n(c, a),
54
54
  "data-slot": "input",
55
55
  type: "text",
56
- placeholder: n,
56
+ placeholder: t,
57
57
  value: o,
58
58
  onChange: (e) => s(e.target.value),
59
59
  onKeyDown: (e) => {
@@ -66,8 +66,8 @@ function w({ placeholder: n, className: i, ref: a }) {
66
66
  });
67
67
  }
68
68
  var T = "haze-Command__listStyle", E = "haze-Command__emptyStyle";
69
- function D({ children: t, empty: r, className: o }) {
70
- let { inputRef: l, listRef: u, listId: d, shouldFilter: f, query: p } = b(), m = n("command");
69
+ function D({ children: n, empty: r, className: o }) {
70
+ let { inputRef: l, listRef: u, listId: d, shouldFilter: f, query: p } = b(), m = t("command");
71
71
  a({
72
72
  menuRef: u,
73
73
  active: !0,
@@ -77,7 +77,7 @@ function D({ children: t, empty: r, className: o }) {
77
77
  menuRef: u,
78
78
  selector: v,
79
79
  onClose: () => l.current?.focus()
80
- }), y = s(t, M), x = f && y.length > 0 && !y.some((e) => c(e.props, p));
80
+ }), y = s(n, M), x = f && y.length > 0 && !y.some((e) => c(e.props, p));
81
81
  return /* @__PURE__ */ g("div", {
82
82
  ref: u,
83
83
  "data-slot": "list",
@@ -85,7 +85,7 @@ function D({ children: t, empty: r, className: o }) {
85
85
  id: d,
86
86
  onKeyDown: _,
87
87
  className: e([T, o]),
88
- children: [t, x && /* @__PURE__ */ h("div", {
88
+ children: [n, x && /* @__PURE__ */ h("div", {
89
89
  "data-slot": "empty",
90
90
  role: "option",
91
91
  "aria-selected": !1,