@spear-ai/spectral 1.12.0 → 1.12.2

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 (45) hide show
  1. package/dist/.js +8 -8
  2. package/dist/{es2015-YHaMV-St.js → Combination-9q50p_Vu.js} +251 -254
  3. package/dist/Combobox/ComboboxBase.js +492 -3
  4. package/dist/Combobox-Ch5Rxk5v.js +6360 -0
  5. package/dist/Combobox.js +3 -137
  6. package/dist/DateTimePicker/Calendar.js +1 -1
  7. package/dist/DateTimePicker/DateTimeDisplayInput.js +1 -1
  8. package/dist/DateTimePicker/DateTimeInput.js +1 -1
  9. package/dist/DateTimePicker/DateTimeUtils.js +1 -1
  10. package/dist/DateTimePicker/TimePicker.js +1 -1
  11. package/dist/DateTimePicker.js +2 -2
  12. package/dist/Dialog.js +2 -2
  13. package/dist/Drawer.js +1 -1
  14. package/dist/DropdownMenu.js +241 -241
  15. package/dist/{HoverCard-DERasp0v.js → HoverCard-BGpW6LnA.js} +2 -2
  16. package/dist/HoverCard.js +1 -1
  17. package/dist/MultiSelect/MultiSelectBase.js +1 -1
  18. package/dist/Popover.js +1 -1
  19. package/dist/{RadioGroup-DqKggFnI.js → RadioGroup-CfjhpW5o.js} +3 -3
  20. package/dist/RadioGroup.js +1 -1
  21. package/dist/Select.js +55 -55
  22. package/dist/{Slider-CfUFkWU4.js → Slider-mODhqkCs.js} +3 -3
  23. package/dist/Slider.js +1 -1
  24. package/dist/{Tooltip-BR0tdif4.js → Tooltip-DH_BzFye.js} +3 -3
  25. package/dist/Tooltip.js +1 -1
  26. package/dist/Tray.js +1 -1
  27. package/dist/{dist-DcUGLq_y.js → dist-BMu6Dgh_.js} +1 -1
  28. package/dist/{dist-fW81qjVl.js → dist-C9fJjxxB.js} +41 -41
  29. package/dist/{dist-C0Hifjgh.js → dist-Cv8I-d2q.js} +2 -2
  30. package/dist/{dist-B9tup-4O.js → dist-D6QANKSj.js} +5 -5
  31. package/dist/{dist-3Af8168y.js → dist-Tbzy5UFA.js} +1 -1
  32. package/dist/{dist-B2k1iWFp.js → dist-jQ7HawWM.js} +1 -1
  33. package/dist/{dist-BtdmHAzK.js → dist-nYKAWiy4.js} +6 -6
  34. package/dist/primitives/popover.js +1 -1
  35. package/dist/primitives/select.js +32 -32
  36. package/dist/styles/spectral.css +1 -1
  37. package/package.json +4 -2
  38. package/dist/ComboboxBase-BzDGK36x.js +0 -491
  39. /package/dist/{Calendar-Cnh_PTbQ.js → Calendar-2UVWeLYp.js} +0 -0
  40. /package/dist/{DateTimeUtils-BJUAMuot.js → DateTimeUtils-DrR2JWoU.js} +0 -0
  41. /package/dist/{dist-Bfjk-jx9.js → dist-ChNh3U3S.js} +0 -0
  42. /package/dist/{dist-D8Wb_MX9.js → dist-DDjUcieO.js} +0 -0
  43. /package/dist/{dist-s1uWaZYZ.js → dist-DFT13f_s.js} +0 -0
  44. /package/dist/{dist-ClmepHp4.js → dist-DIt8FP2G.js} +0 -0
  45. /package/dist/{dist-BK1K0g9W.js → dist-K0_i37VL.js} +0 -0
@@ -6,38 +6,38 @@ import { n as l, t as u } from "./dist-CGzgmYB9.js";
6
6
  import { t as d } from "./dist-Bft31cJh.js";
7
7
  import { t as f } from "./dist-Dtvmk11N.js";
8
8
  import { t as p } from "./twUtils-D_qzdiwM.js";
9
- import { EmptyState as m, LoadingState as ee, getDropdownSurfaceClasses as h, getDropdownWidthStyles as g, getOptionClasses as _ } from "./utils/formFieldUtils.js";
10
- import { useUncontrolledState as v } from "./hooks/useUncontrolledState.js";
11
- import { useAutoDropdownHorizontalShift as te } from "./utils/dropdownPositioning.js";
12
- import { t as y } from "./dist-ClmepHp4.js";
13
- import { n as ne, t as b } from "./dist-B2k1iWFp.js";
14
- import { i as re, n as ie, r as ae, t as x } from "./es2015-YHaMV-St.js";
15
- import { a as S, i as C, n as oe, r as se, t as w } from "./dist-C0Hifjgh.js";
16
- import { n as ce, r as T, t as E } from "./dist-DcUGLq_y.js";
17
- import * as D from "react";
18
- import { jsx as O, jsxs as k } from "react/jsx-runtime";
9
+ import { EmptyState as m, LoadingState as h, getDropdownSurfaceClasses as g, getDropdownWidthStyles as _, getOptionClasses as v } from "./utils/formFieldUtils.js";
10
+ import { useUncontrolledState as y } from "./hooks/useUncontrolledState.js";
11
+ import { t as b } from "./dist-DIt8FP2G.js";
12
+ import { n as ee, t as x } from "./dist-jQ7HawWM.js";
13
+ import { i as te, n as S, r as ne, t as re } from "./Combination-9q50p_Vu.js";
14
+ import { a as C, i as w, n as T, r as ie, t as E } from "./dist-Cv8I-d2q.js";
15
+ import { useAutoDropdownHorizontalShift as D } from "./utils/dropdownPositioning.js";
16
+ import { n as ae, r as O, t as k } from "./dist-BMu6Dgh_.js";
17
+ import * as A from "react";
18
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
19
19
  //#region node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_af24564827454c35f463162a4c5cfd35/node_modules/@radix-ui/react-menu/dist/index.mjs
20
- var A = ["Enter", " "], j = [
20
+ var N = ["Enter", " "], P = [
21
21
  "ArrowDown",
22
22
  "PageUp",
23
23
  "Home"
24
- ], le = [
24
+ ], F = [
25
25
  "ArrowUp",
26
26
  "PageDown",
27
27
  "End"
28
- ], M = [...j, ...le], N = {
29
- ltr: [...A, "ArrowRight"],
30
- rtl: [...A, "ArrowLeft"]
31
- }, P = {
28
+ ], I = [...P, ...F], L = {
29
+ ltr: [...N, "ArrowRight"],
30
+ rtl: [...N, "ArrowLeft"]
31
+ }, R = {
32
32
  ltr: ["ArrowLeft"],
33
33
  rtl: ["ArrowRight"]
34
- }, F = "Menu", [I, ue, de] = l(F), [L, R] = r(F, [
35
- de,
36
- S,
37
- T
38
- ]), z = S(), fe = T(), [pe, B] = L(F), [me, V] = L(F), he = (e) => {
39
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = z(t), [c, l] = D.useState(null), d = D.useRef(!1), f = y(a), p = u(i);
40
- return D.useEffect(() => {
34
+ }, z = "Menu", [B, oe, se] = l(z), [V, H] = r(z, [
35
+ se,
36
+ C,
37
+ O
38
+ ]), U = C(), ce = O(), [le, W] = V(z), [ue, G] = V(z), de = (e) => {
39
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = U(t), [c, l] = A.useState(null), d = A.useRef(!1), f = b(a), p = u(i);
40
+ return A.useEffect(() => {
41
41
  let e = () => {
42
42
  d.current = !0, document.addEventListener("pointerdown", t, {
43
43
  capture: !0,
@@ -50,17 +50,17 @@ var A = ["Enter", " "], j = [
50
50
  return document.addEventListener("keydown", e, { capture: !0 }), () => {
51
51
  document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
52
52
  };
53
- }, []), /* @__PURE__ */ O(C, {
53
+ }, []), /* @__PURE__ */ j(w, {
54
54
  ...s,
55
- children: /* @__PURE__ */ O(pe, {
55
+ children: /* @__PURE__ */ j(le, {
56
56
  scope: t,
57
57
  open: n,
58
58
  onOpenChange: f,
59
59
  content: c,
60
60
  onContentChange: l,
61
- children: /* @__PURE__ */ O(me, {
61
+ children: /* @__PURE__ */ j(ue, {
62
62
  scope: t,
63
- onClose: D.useCallback(() => f(!1), [f]),
63
+ onClose: A.useCallback(() => f(!1), [f]),
64
64
  isUsingKeyboardRef: d,
65
65
  dir: p,
66
66
  modal: o,
@@ -69,24 +69,24 @@ var A = ["Enter", " "], j = [
69
69
  })
70
70
  });
71
71
  };
72
- he.displayName = F;
73
- var ge = "MenuAnchor", H = D.forwardRef((e, t) => {
72
+ de.displayName = z;
73
+ var fe = "MenuAnchor", pe = A.forwardRef((e, t) => {
74
74
  let { __scopeMenu: n, ...r } = e;
75
- return /* @__PURE__ */ O(w, {
76
- ...z(n),
75
+ return /* @__PURE__ */ j(E, {
76
+ ...U(n),
77
77
  ...r,
78
78
  ref: t
79
79
  });
80
80
  });
81
- H.displayName = ge;
82
- var U = "MenuPortal", [_e, ve] = L(U, { forceMount: void 0 }), ye = (e) => {
83
- let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = B(U, t);
84
- return /* @__PURE__ */ O(_e, {
81
+ pe.displayName = fe;
82
+ var me = "MenuPortal", [he, ge] = V(me, { forceMount: void 0 }), _e = (e) => {
83
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = W(me, t);
84
+ return /* @__PURE__ */ j(he, {
85
85
  scope: t,
86
86
  forceMount: n,
87
- children: /* @__PURE__ */ O(d, {
87
+ children: /* @__PURE__ */ j(d, {
88
88
  present: n || a.open,
89
- children: /* @__PURE__ */ O(b, {
89
+ children: /* @__PURE__ */ j(x, {
90
90
  asChild: !0,
91
91
  container: i,
92
92
  children: r
@@ -94,31 +94,31 @@ var U = "MenuPortal", [_e, ve] = L(U, { forceMount: void 0 }), ye = (e) => {
94
94
  })
95
95
  });
96
96
  };
97
- ye.displayName = U;
98
- var W = "MenuContent", [be, G] = L(W), xe = D.forwardRef((e, t) => {
99
- let n = ve(W, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = B(W, e.__scopeMenu), o = V(W, e.__scopeMenu);
100
- return /* @__PURE__ */ O(I.Provider, {
97
+ _e.displayName = me;
98
+ var K = "MenuContent", [ve, ye] = V(K), be = A.forwardRef((e, t) => {
99
+ let n = ge(K, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = W(K, e.__scopeMenu), o = G(K, e.__scopeMenu);
100
+ return /* @__PURE__ */ j(B.Provider, {
101
101
  scope: e.__scopeMenu,
102
- children: /* @__PURE__ */ O(d, {
102
+ children: /* @__PURE__ */ j(d, {
103
103
  present: r || a.open,
104
- children: /* @__PURE__ */ O(I.Slot, {
104
+ children: /* @__PURE__ */ j(B.Slot, {
105
105
  scope: e.__scopeMenu,
106
- children: o.modal ? /* @__PURE__ */ O(Se, {
106
+ children: o.modal ? /* @__PURE__ */ j(xe, {
107
107
  ...i,
108
108
  ref: t
109
- }) : /* @__PURE__ */ O(Ce, {
109
+ }) : /* @__PURE__ */ j(Se, {
110
110
  ...i,
111
111
  ref: t
112
112
  })
113
113
  })
114
114
  })
115
115
  });
116
- }), Se = D.forwardRef((e, n) => {
117
- let r = B(W, e.__scopeMenu), a = D.useRef(null), o = i(n, a);
118
- return D.useEffect(() => {
116
+ }), xe = A.forwardRef((e, n) => {
117
+ let r = W(K, e.__scopeMenu), a = A.useRef(null), o = i(n, a);
118
+ return A.useEffect(() => {
119
119
  let e = a.current;
120
- if (e) return x(e);
121
- }, []), /* @__PURE__ */ O(K, {
120
+ if (e) return S(e);
121
+ }, []), /* @__PURE__ */ j(we, {
122
122
  ...e,
123
123
  ref: o,
124
124
  trapFocus: r.open,
@@ -127,9 +127,9 @@ var W = "MenuContent", [be, G] = L(W), xe = D.forwardRef((e, t) => {
127
127
  onFocusOutside: t(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
128
128
  onDismiss: () => r.onOpenChange(!1)
129
129
  });
130
- }), Ce = D.forwardRef((e, t) => {
131
- let n = B(W, e.__scopeMenu);
132
- return /* @__PURE__ */ O(K, {
130
+ }), Se = A.forwardRef((e, t) => {
131
+ let n = W(K, e.__scopeMenu);
132
+ return /* @__PURE__ */ j(we, {
133
133
  ...e,
134
134
  ref: t,
135
135
  trapFocus: !1,
@@ -137,91 +137,91 @@ var W = "MenuContent", [be, G] = L(W), xe = D.forwardRef((e, t) => {
137
137
  disableOutsideScroll: !1,
138
138
  onDismiss: () => n.onOpenChange(!1)
139
139
  });
140
- }), we = o("MenuContent.ScrollLock"), K = D.forwardRef((e, n) => {
141
- let { __scopeMenu: r, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: ee, disableOutsideScroll: h, ...g } = e, _ = B(W, r), v = V(W, r), te = z(r), y = fe(r), b = ue(r), [x, S] = D.useState(null), C = D.useRef(null), oe = i(n, C, _.onContentChange), w = D.useRef(0), T = D.useRef(""), E = D.useRef(0), k = D.useRef(null), A = D.useRef("right"), j = D.useRef(0), N = h ? ie : D.Fragment, P = h ? {
142
- as: we,
140
+ }), Ce = o("MenuContent.ScrollLock"), we = A.forwardRef((e, n) => {
141
+ let { __scopeMenu: r, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: h, disableOutsideScroll: g, ..._ } = e, v = W(K, r), y = G(K, r), b = U(r), x = ce(r), S = oe(r), [C, w] = A.useState(null), T = A.useRef(null), E = i(n, T, v.onContentChange), D = A.useRef(0), O = A.useRef(""), k = A.useRef(0), M = A.useRef(null), N = A.useRef("right"), P = A.useRef(0), L = g ? re : A.Fragment, R = g ? {
142
+ as: Ce,
143
143
  allowPinchZoom: !0
144
- } : void 0, F = (e) => {
145
- let t = T.current + e, n = b().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = it(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
144
+ } : void 0, z = (e) => {
145
+ let t = O.current + e, n = S().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = it(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
146
146
  (function e(t) {
147
- T.current = t, window.clearTimeout(w.current), t !== "" && (w.current = window.setTimeout(() => e(""), 1e3));
147
+ O.current = t, window.clearTimeout(D.current), t !== "" && (D.current = window.setTimeout(() => e(""), 1e3));
148
148
  })(t), o && setTimeout(() => o.focus());
149
149
  };
150
- D.useEffect(() => () => window.clearTimeout(w.current), []), ae();
151
- let I = D.useCallback((e) => A.current === k.current?.side && ot(e, k.current?.area), []);
152
- return /* @__PURE__ */ O(be, {
150
+ A.useEffect(() => () => window.clearTimeout(D.current), []), te();
151
+ let B = A.useCallback((e) => N.current === M.current?.side && ot(e, M.current?.area), []);
152
+ return /* @__PURE__ */ j(ve, {
153
153
  scope: r,
154
- searchRef: T,
155
- onItemEnter: D.useCallback((e) => {
156
- I(e) && e.preventDefault();
157
- }, [I]),
158
- onItemLeave: D.useCallback((e) => {
159
- I(e) || (C.current?.focus(), S(null));
160
- }, [I]),
161
- onTriggerLeave: D.useCallback((e) => {
162
- I(e) && e.preventDefault();
163
- }, [I]),
164
- pointerGraceTimerRef: E,
165
- onPointerGraceIntentChange: D.useCallback((e) => {
166
- k.current = e;
154
+ searchRef: O,
155
+ onItemEnter: A.useCallback((e) => {
156
+ B(e) && e.preventDefault();
157
+ }, [B]),
158
+ onItemLeave: A.useCallback((e) => {
159
+ B(e) || (T.current?.focus(), w(null));
160
+ }, [B]),
161
+ onTriggerLeave: A.useCallback((e) => {
162
+ B(e) && e.preventDefault();
163
+ }, [B]),
164
+ pointerGraceTimerRef: k,
165
+ onPointerGraceIntentChange: A.useCallback((e) => {
166
+ M.current = e;
167
167
  }, []),
168
- children: /* @__PURE__ */ O(N, {
169
- ...P,
170
- children: /* @__PURE__ */ O(re, {
168
+ children: /* @__PURE__ */ j(L, {
169
+ ...R,
170
+ children: /* @__PURE__ */ j(ne, {
171
171
  asChild: !0,
172
172
  trapped: o,
173
173
  onMountAutoFocus: t(s, (e) => {
174
- e.preventDefault(), C.current?.focus({ preventScroll: !0 });
174
+ e.preventDefault(), T.current?.focus({ preventScroll: !0 });
175
175
  }),
176
176
  onUnmountAutoFocus: c,
177
- children: /* @__PURE__ */ O(ne, {
177
+ children: /* @__PURE__ */ j(ee, {
178
178
  asChild: !0,
179
179
  disableOutsidePointerEvents: l,
180
180
  onEscapeKeyDown: d,
181
181
  onPointerDownOutside: f,
182
182
  onFocusOutside: p,
183
183
  onInteractOutside: m,
184
- onDismiss: ee,
185
- children: /* @__PURE__ */ O(ce, {
184
+ onDismiss: h,
185
+ children: /* @__PURE__ */ j(ae, {
186
186
  asChild: !0,
187
- ...y,
188
- dir: v.dir,
187
+ ...x,
188
+ dir: y.dir,
189
189
  orientation: "vertical",
190
190
  loop: a,
191
- currentTabStopId: x,
192
- onCurrentTabStopIdChange: S,
191
+ currentTabStopId: C,
192
+ onCurrentTabStopIdChange: w,
193
193
  onEntryFocus: t(u, (e) => {
194
- v.isUsingKeyboardRef.current || e.preventDefault();
194
+ y.isUsingKeyboardRef.current || e.preventDefault();
195
195
  }),
196
196
  preventScrollOnEntryFocus: !0,
197
- children: /* @__PURE__ */ O(se, {
197
+ children: /* @__PURE__ */ j(ie, {
198
198
  role: "menu",
199
199
  "aria-orientation": "vertical",
200
- "data-state": et(_.open),
200
+ "data-state": et(v.open),
201
201
  "data-radix-menu-content": "",
202
- dir: v.dir,
203
- ...te,
204
- ...g,
205
- ref: oe,
202
+ dir: y.dir,
203
+ ...b,
204
+ ..._,
205
+ ref: E,
206
206
  style: {
207
207
  outline: "none",
208
- ...g.style
208
+ ..._.style
209
209
  },
210
- onKeyDown: t(g.onKeyDown, (e) => {
210
+ onKeyDown: t(_.onKeyDown, (e) => {
211
211
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
212
- t && (e.key === "Tab" && e.preventDefault(), !n && r && F(e.key));
213
- let i = C.current;
214
- if (e.target !== i || !M.includes(e.key)) return;
212
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && z(e.key));
213
+ let i = T.current;
214
+ if (e.target !== i || !I.includes(e.key)) return;
215
215
  e.preventDefault();
216
- let a = b().filter((e) => !e.disabled).map((e) => e.ref.current);
217
- le.includes(e.key) && a.reverse(), nt(a);
216
+ let a = S().filter((e) => !e.disabled).map((e) => e.ref.current);
217
+ F.includes(e.key) && a.reverse(), nt(a);
218
218
  }),
219
219
  onBlur: t(e.onBlur, (e) => {
220
- e.currentTarget.contains(e.target) || (window.clearTimeout(w.current), T.current = "");
220
+ e.currentTarget.contains(e.target) || (window.clearTimeout(D.current), O.current = "");
221
221
  }),
222
222
  onPointerMove: t(e.onPointerMove, Z((e) => {
223
- let t = e.target, n = j.current !== e.clientX;
224
- e.currentTarget.contains(t) && n && (A.current = e.clientX > j.current ? "right" : "left", j.current = e.clientX);
223
+ let t = e.target, n = P.current !== e.clientX;
224
+ e.currentTarget.contains(t) && n && (N.current = e.clientX > P.current ? "right" : "left", P.current = e.clientX);
225
225
  }))
226
226
  })
227
227
  })
@@ -230,26 +230,26 @@ var W = "MenuContent", [be, G] = L(W), xe = D.forwardRef((e, t) => {
230
230
  })
231
231
  });
232
232
  });
233
- xe.displayName = W;
234
- var Te = "MenuGroup", Ee = D.forwardRef((e, t) => {
233
+ be.displayName = K;
234
+ var Te = "MenuGroup", Ee = A.forwardRef((e, t) => {
235
235
  let { __scopeMenu: n, ...r } = e;
236
- return /* @__PURE__ */ O(c.div, {
236
+ return /* @__PURE__ */ j(c.div, {
237
237
  role: "group",
238
238
  ...r,
239
239
  ref: t
240
240
  });
241
241
  });
242
242
  Ee.displayName = Te;
243
- var De = "MenuLabel", Oe = D.forwardRef((e, t) => {
243
+ var De = "MenuLabel", Oe = A.forwardRef((e, t) => {
244
244
  let { __scopeMenu: n, ...r } = e;
245
- return /* @__PURE__ */ O(c.div, {
245
+ return /* @__PURE__ */ j(c.div, {
246
246
  ...r,
247
247
  ref: t
248
248
  });
249
249
  });
250
250
  Oe.displayName = De;
251
- var q = "MenuItem", ke = "menu.itemSelect", J = D.forwardRef((e, n) => {
252
- let { disabled: r = !1, onSelect: o, ...s } = e, c = D.useRef(null), l = V(q, e.__scopeMenu), u = G(q, e.__scopeMenu), d = i(n, c), f = D.useRef(!1), p = () => {
251
+ var q = "MenuItem", ke = "menu.itemSelect", J = A.forwardRef((e, n) => {
252
+ let { disabled: r = !1, onSelect: o, ...s } = e, c = A.useRef(null), l = G(q, e.__scopeMenu), u = ye(q, e.__scopeMenu), d = i(n, c), f = A.useRef(!1), p = () => {
253
253
  let e = c.current;
254
254
  if (!r && e) {
255
255
  let t = new CustomEvent(ke, {
@@ -259,7 +259,7 @@ var q = "MenuItem", ke = "menu.itemSelect", J = D.forwardRef((e, n) => {
259
259
  e.addEventListener(ke, (e) => o?.(e), { once: !0 }), a(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
260
260
  }
261
261
  };
262
- return /* @__PURE__ */ O(Ae, {
262
+ return /* @__PURE__ */ j(Ae, {
263
263
  ...s,
264
264
  ref: d,
265
265
  disabled: r,
@@ -272,25 +272,25 @@ var q = "MenuItem", ke = "menu.itemSelect", J = D.forwardRef((e, n) => {
272
272
  }),
273
273
  onKeyDown: t(e.onKeyDown, (e) => {
274
274
  let t = u.searchRef.current !== "";
275
- r || t && e.key === " " || A.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
275
+ r || t && e.key === " " || N.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
276
276
  })
277
277
  });
278
278
  });
279
279
  J.displayName = q;
280
- var Ae = D.forwardRef((e, n) => {
281
- let { __scopeMenu: r, disabled: a = !1, textValue: o, ...s } = e, l = G(q, r), u = fe(r), d = D.useRef(null), f = i(n, d), [p, m] = D.useState(!1), [ee, h] = D.useState("");
282
- return D.useEffect(() => {
280
+ var Ae = A.forwardRef((e, n) => {
281
+ let { __scopeMenu: r, disabled: a = !1, textValue: o, ...s } = e, l = ye(q, r), u = ce(r), d = A.useRef(null), f = i(n, d), [p, m] = A.useState(!1), [h, g] = A.useState("");
282
+ return A.useEffect(() => {
283
283
  let e = d.current;
284
- e && h((e.textContent ?? "").trim());
285
- }, [s.children]), /* @__PURE__ */ O(I.ItemSlot, {
284
+ e && g((e.textContent ?? "").trim());
285
+ }, [s.children]), /* @__PURE__ */ j(B.ItemSlot, {
286
286
  scope: r,
287
287
  disabled: a,
288
- textValue: o ?? ee,
289
- children: /* @__PURE__ */ O(E, {
288
+ textValue: o ?? h,
289
+ children: /* @__PURE__ */ j(k, {
290
290
  asChild: !0,
291
291
  ...u,
292
292
  focusable: !a,
293
- children: /* @__PURE__ */ O(c.div, {
293
+ children: /* @__PURE__ */ j(c.div, {
294
294
  role: "menuitem",
295
295
  "data-highlighted": p ? "" : void 0,
296
296
  "aria-disabled": a || void 0,
@@ -306,12 +306,12 @@ var Ae = D.forwardRef((e, n) => {
306
306
  })
307
307
  })
308
308
  });
309
- }), je = "MenuCheckboxItem", Me = D.forwardRef((e, n) => {
309
+ }), je = "MenuCheckboxItem", Me = A.forwardRef((e, n) => {
310
310
  let { checked: r = !1, onCheckedChange: i, ...a } = e;
311
- return /* @__PURE__ */ O(Be, {
311
+ return /* @__PURE__ */ j(Be, {
312
312
  scope: e.__scopeMenu,
313
313
  checked: r,
314
- children: /* @__PURE__ */ O(J, {
314
+ children: /* @__PURE__ */ j(J, {
315
315
  role: "menuitemcheckbox",
316
316
  "aria-checked": X(r) ? "mixed" : r,
317
317
  ...a,
@@ -322,28 +322,28 @@ var Ae = D.forwardRef((e, n) => {
322
322
  });
323
323
  });
324
324
  Me.displayName = je;
325
- var Ne = "MenuRadioGroup", [Pe, Fe] = L(Ne, {
325
+ var Ne = "MenuRadioGroup", [Pe, Fe] = V(Ne, {
326
326
  value: void 0,
327
327
  onValueChange: () => {}
328
- }), Ie = D.forwardRef((e, t) => {
329
- let { value: n, onValueChange: r, ...i } = e, a = y(r);
330
- return /* @__PURE__ */ O(Pe, {
328
+ }), Ie = A.forwardRef((e, t) => {
329
+ let { value: n, onValueChange: r, ...i } = e, a = b(r);
330
+ return /* @__PURE__ */ j(Pe, {
331
331
  scope: e.__scopeMenu,
332
332
  value: n,
333
333
  onValueChange: a,
334
- children: /* @__PURE__ */ O(Ee, {
334
+ children: /* @__PURE__ */ j(Ee, {
335
335
  ...i,
336
336
  ref: t
337
337
  })
338
338
  });
339
339
  });
340
340
  Ie.displayName = Ne;
341
- var Le = "MenuRadioItem", Re = D.forwardRef((e, n) => {
341
+ var Le = "MenuRadioItem", Re = A.forwardRef((e, n) => {
342
342
  let { value: r, ...i } = e, a = Fe(Le, e.__scopeMenu), o = r === a.value;
343
- return /* @__PURE__ */ O(Be, {
343
+ return /* @__PURE__ */ j(Be, {
344
344
  scope: e.__scopeMenu,
345
345
  checked: o,
346
- children: /* @__PURE__ */ O(J, {
346
+ children: /* @__PURE__ */ j(J, {
347
347
  role: "menuitemradio",
348
348
  "aria-checked": o,
349
349
  ...i,
@@ -354,11 +354,11 @@ var Le = "MenuRadioItem", Re = D.forwardRef((e, n) => {
354
354
  });
355
355
  });
356
356
  Re.displayName = Le;
357
- var ze = "MenuItemIndicator", [Be, Ve] = L(ze, { checked: !1 }), He = D.forwardRef((e, t) => {
357
+ var ze = "MenuItemIndicator", [Be, Ve] = V(ze, { checked: !1 }), He = A.forwardRef((e, t) => {
358
358
  let { __scopeMenu: n, forceMount: r, ...i } = e, a = Ve(ze, n);
359
- return /* @__PURE__ */ O(d, {
359
+ return /* @__PURE__ */ j(d, {
360
360
  present: r || X(a.checked) || a.checked === !0,
361
- children: /* @__PURE__ */ O(c.span, {
361
+ children: /* @__PURE__ */ j(c.span, {
362
362
  ...i,
363
363
  ref: t,
364
364
  "data-state": tt(a.checked)
@@ -366,9 +366,9 @@ var ze = "MenuItemIndicator", [Be, Ve] = L(ze, { checked: !1 }), He = D.forwardR
366
366
  });
367
367
  });
368
368
  He.displayName = ze;
369
- var Ue = "MenuSeparator", We = D.forwardRef((e, t) => {
369
+ var Ue = "MenuSeparator", We = A.forwardRef((e, t) => {
370
370
  let { __scopeMenu: n, ...r } = e;
371
- return /* @__PURE__ */ O(c.div, {
371
+ return /* @__PURE__ */ j(c.div, {
372
372
  role: "separator",
373
373
  "aria-orientation": "horizontal",
374
374
  ...r,
@@ -376,26 +376,26 @@ var Ue = "MenuSeparator", We = D.forwardRef((e, t) => {
376
376
  });
377
377
  });
378
378
  We.displayName = Ue;
379
- var Ge = "MenuArrow", Ke = D.forwardRef((e, t) => {
379
+ var Ge = "MenuArrow", Ke = A.forwardRef((e, t) => {
380
380
  let { __scopeMenu: n, ...r } = e;
381
- return /* @__PURE__ */ O(oe, {
382
- ...z(n),
381
+ return /* @__PURE__ */ j(T, {
382
+ ...U(n),
383
383
  ...r,
384
384
  ref: t
385
385
  });
386
386
  });
387
387
  Ke.displayName = Ge;
388
- var qe = "MenuSub", [Je, Ye] = L(qe), Xe = (e) => {
389
- let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = B(qe, t), o = z(t), [s, c] = D.useState(null), [l, u] = D.useState(null), d = y(i);
390
- return D.useEffect(() => (a.open === !1 && d(!1), () => d(!1)), [a.open, d]), /* @__PURE__ */ O(C, {
388
+ var qe = "MenuSub", [Je, Ye] = V(qe), Xe = (e) => {
389
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = W(qe, t), o = U(t), [s, c] = A.useState(null), [l, u] = A.useState(null), d = b(i);
390
+ return A.useEffect(() => (a.open === !1 && d(!1), () => d(!1)), [a.open, d]), /* @__PURE__ */ j(w, {
391
391
  ...o,
392
- children: /* @__PURE__ */ O(pe, {
392
+ children: /* @__PURE__ */ j(le, {
393
393
  scope: t,
394
394
  open: r,
395
395
  onOpenChange: d,
396
396
  content: l,
397
397
  onContentChange: u,
398
- children: /* @__PURE__ */ O(Je, {
398
+ children: /* @__PURE__ */ j(Je, {
399
399
  scope: t,
400
400
  contentId: f(),
401
401
  triggerId: f(),
@@ -407,19 +407,19 @@ var qe = "MenuSub", [Je, Ye] = L(qe), Xe = (e) => {
407
407
  });
408
408
  };
409
409
  Xe.displayName = qe;
410
- var Y = "MenuSubTrigger", Ze = D.forwardRef((e, r) => {
411
- let i = B(Y, e.__scopeMenu), a = V(Y, e.__scopeMenu), o = Ye(Y, e.__scopeMenu), s = G(Y, e.__scopeMenu), c = D.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, d = { __scopeMenu: e.__scopeMenu }, f = D.useCallback(() => {
410
+ var Y = "MenuSubTrigger", Ze = A.forwardRef((e, r) => {
411
+ let i = W(Y, e.__scopeMenu), a = G(Y, e.__scopeMenu), o = Ye(Y, e.__scopeMenu), s = ye(Y, e.__scopeMenu), c = A.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, d = { __scopeMenu: e.__scopeMenu }, f = A.useCallback(() => {
412
412
  c.current && window.clearTimeout(c.current), c.current = null;
413
413
  }, []);
414
- return D.useEffect(() => f, [f]), D.useEffect(() => {
414
+ return A.useEffect(() => f, [f]), A.useEffect(() => {
415
415
  let e = l.current;
416
416
  return () => {
417
417
  window.clearTimeout(e), u(null);
418
418
  };
419
- }, [l, u]), /* @__PURE__ */ O(H, {
419
+ }, [l, u]), /* @__PURE__ */ j(pe, {
420
420
  asChild: !0,
421
421
  ...d,
422
- children: /* @__PURE__ */ O(Ae, {
422
+ children: /* @__PURE__ */ j(Ae, {
423
423
  id: o.triggerId,
424
424
  "aria-haspopup": "menu",
425
425
  "aria-expanded": i.open,
@@ -472,21 +472,21 @@ var Y = "MenuSubTrigger", Ze = D.forwardRef((e, r) => {
472
472
  })),
473
473
  onKeyDown: t(e.onKeyDown, (t) => {
474
474
  let n = s.searchRef.current !== "";
475
- e.disabled || n && t.key === " " || N[a.dir].includes(t.key) && (i.onOpenChange(!0), i.content?.focus(), t.preventDefault());
475
+ e.disabled || n && t.key === " " || L[a.dir].includes(t.key) && (i.onOpenChange(!0), i.content?.focus(), t.preventDefault());
476
476
  })
477
477
  })
478
478
  });
479
479
  });
480
480
  Ze.displayName = Y;
481
- var Qe = "MenuSubContent", $e = D.forwardRef((e, n) => {
482
- let r = ve(W, e.__scopeMenu), { forceMount: a = r.forceMount, ...o } = e, s = B(W, e.__scopeMenu), c = V(W, e.__scopeMenu), l = Ye(Qe, e.__scopeMenu), u = D.useRef(null), f = i(n, u);
483
- return /* @__PURE__ */ O(I.Provider, {
481
+ var Qe = "MenuSubContent", $e = A.forwardRef((e, n) => {
482
+ let r = ge(K, e.__scopeMenu), { forceMount: a = r.forceMount, ...o } = e, s = W(K, e.__scopeMenu), c = G(K, e.__scopeMenu), l = Ye(Qe, e.__scopeMenu), u = A.useRef(null), f = i(n, u);
483
+ return /* @__PURE__ */ j(B.Provider, {
484
484
  scope: e.__scopeMenu,
485
- children: /* @__PURE__ */ O(d, {
485
+ children: /* @__PURE__ */ j(d, {
486
486
  present: a || s.open,
487
- children: /* @__PURE__ */ O(I.Slot, {
487
+ children: /* @__PURE__ */ j(B.Slot, {
488
488
  scope: e.__scopeMenu,
489
- children: /* @__PURE__ */ O(K, {
489
+ children: /* @__PURE__ */ j(we, {
490
490
  id: l.contentId,
491
491
  "aria-labelledby": l.triggerId,
492
492
  ...o,
@@ -507,7 +507,7 @@ var Qe = "MenuSubContent", $e = D.forwardRef((e, n) => {
507
507
  c.onClose(), e.preventDefault();
508
508
  }),
509
509
  onKeyDown: t(e.onKeyDown, (e) => {
510
- let t = e.currentTarget.contains(e.target), n = P[c.dir].includes(e.key);
510
+ let t = e.currentTarget.contains(e.target), n = R[c.dir].includes(e.key);
511
511
  t && n && (s.onOpenChange(!1), l.trigger?.focus(), e.preventDefault());
512
512
  })
513
513
  })
@@ -555,23 +555,23 @@ function ot(e, t) {
555
555
  function Z(e) {
556
556
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
557
557
  }
558
- var st = he, ct = H, lt = ye, ut = xe, dt = Ee, ft = Oe, pt = J, mt = Me, ht = Ie, gt = Re, _t = He, vt = We, yt = Ke, bt = Ze, xt = $e, Q = "DropdownMenu", [St, Ct] = r(Q, [R]), $ = R(), [wt, Tt] = St(Q), Et = (e) => {
559
- let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: c = !0 } = e, l = $(t), u = D.useRef(null), [d, p] = s({
558
+ var st = de, ct = pe, lt = _e, ut = be, dt = Ee, ft = Oe, pt = J, mt = Me, ht = Ie, gt = Re, _t = He, vt = We, yt = Ke, bt = Ze, xt = $e, Q = "DropdownMenu", [St, Ct] = r(Q, [H]), $ = H(), [wt, Tt] = St(Q), Et = (e) => {
559
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: c = !0 } = e, l = $(t), u = A.useRef(null), [d, p] = s({
560
560
  prop: i,
561
561
  defaultProp: a ?? !1,
562
562
  onChange: o,
563
563
  caller: Q
564
564
  });
565
- return /* @__PURE__ */ O(wt, {
565
+ return /* @__PURE__ */ j(wt, {
566
566
  scope: t,
567
567
  triggerId: f(),
568
568
  triggerRef: u,
569
569
  contentId: f(),
570
570
  open: d,
571
571
  onOpenChange: p,
572
- onOpenToggle: D.useCallback(() => p((e) => !e), [p]),
572
+ onOpenToggle: A.useCallback(() => p((e) => !e), [p]),
573
573
  modal: c,
574
- children: /* @__PURE__ */ O(st, {
574
+ children: /* @__PURE__ */ j(st, {
575
575
  ...l,
576
576
  open: d,
577
577
  onOpenChange: p,
@@ -582,12 +582,12 @@ var st = he, ct = H, lt = ye, ut = xe, dt = Ee, ft = Oe, pt = J, mt = Me, ht = I
582
582
  });
583
583
  };
584
584
  Et.displayName = Q;
585
- var Dt = "DropdownMenuTrigger", Ot = D.forwardRef((e, r) => {
585
+ var Dt = "DropdownMenuTrigger", Ot = A.forwardRef((e, r) => {
586
586
  let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Tt(Dt, i);
587
- return /* @__PURE__ */ O(ct, {
587
+ return /* @__PURE__ */ j(ct, {
588
588
  asChild: !0,
589
589
  ...$(i),
590
- children: /* @__PURE__ */ O(c.button, {
590
+ children: /* @__PURE__ */ j(c.button, {
591
591
  type: "button",
592
592
  id: s.triggerId,
593
593
  "aria-haspopup": "menu",
@@ -614,15 +614,15 @@ var Dt = "DropdownMenuTrigger", Ot = D.forwardRef((e, r) => {
614
614
  Ot.displayName = Dt;
615
615
  var kt = "DropdownMenuPortal", At = (e) => {
616
616
  let { __scopeDropdownMenu: t, ...n } = e;
617
- return /* @__PURE__ */ O(lt, {
617
+ return /* @__PURE__ */ j(lt, {
618
618
  ...$(t),
619
619
  ...n
620
620
  });
621
621
  };
622
622
  At.displayName = kt;
623
- var jt = "DropdownMenuContent", Mt = D.forwardRef((e, n) => {
624
- let { __scopeDropdownMenu: r, ...i } = e, a = Tt(jt, r), o = $(r), s = D.useRef(!1);
625
- return /* @__PURE__ */ O(ut, {
623
+ var jt = "DropdownMenuContent", Mt = A.forwardRef((e, n) => {
624
+ let { __scopeDropdownMenu: r, ...i } = e, a = Tt(jt, r), o = $(r), s = A.useRef(!1);
625
+ return /* @__PURE__ */ j(ut, {
626
626
  id: a.contentId,
627
627
  "aria-labelledby": a.triggerId,
628
628
  ...o,
@@ -646,99 +646,99 @@ var jt = "DropdownMenuContent", Mt = D.forwardRef((e, n) => {
646
646
  });
647
647
  });
648
648
  Mt.displayName = jt;
649
- var Nt = "DropdownMenuGroup", Pt = D.forwardRef((e, t) => {
649
+ var Nt = "DropdownMenuGroup", Pt = A.forwardRef((e, t) => {
650
650
  let { __scopeDropdownMenu: n, ...r } = e;
651
- return /* @__PURE__ */ O(dt, {
651
+ return /* @__PURE__ */ j(dt, {
652
652
  ...$(n),
653
653
  ...r,
654
654
  ref: t
655
655
  });
656
656
  });
657
657
  Pt.displayName = Nt;
658
- var Ft = "DropdownMenuLabel", It = D.forwardRef((e, t) => {
658
+ var Ft = "DropdownMenuLabel", It = A.forwardRef((e, t) => {
659
659
  let { __scopeDropdownMenu: n, ...r } = e;
660
- return /* @__PURE__ */ O(ft, {
660
+ return /* @__PURE__ */ j(ft, {
661
661
  ...$(n),
662
662
  ...r,
663
663
  ref: t
664
664
  });
665
665
  });
666
666
  It.displayName = Ft;
667
- var Lt = "DropdownMenuItem", Rt = D.forwardRef((e, t) => {
667
+ var Lt = "DropdownMenuItem", Rt = A.forwardRef((e, t) => {
668
668
  let { __scopeDropdownMenu: n, ...r } = e;
669
- return /* @__PURE__ */ O(pt, {
669
+ return /* @__PURE__ */ j(pt, {
670
670
  ...$(n),
671
671
  ...r,
672
672
  ref: t
673
673
  });
674
674
  });
675
675
  Rt.displayName = Lt;
676
- var zt = "DropdownMenuCheckboxItem", Bt = D.forwardRef((e, t) => {
676
+ var zt = "DropdownMenuCheckboxItem", Bt = A.forwardRef((e, t) => {
677
677
  let { __scopeDropdownMenu: n, ...r } = e;
678
- return /* @__PURE__ */ O(mt, {
678
+ return /* @__PURE__ */ j(mt, {
679
679
  ...$(n),
680
680
  ...r,
681
681
  ref: t
682
682
  });
683
683
  });
684
684
  Bt.displayName = zt;
685
- var Vt = "DropdownMenuRadioGroup", Ht = D.forwardRef((e, t) => {
685
+ var Vt = "DropdownMenuRadioGroup", Ht = A.forwardRef((e, t) => {
686
686
  let { __scopeDropdownMenu: n, ...r } = e;
687
- return /* @__PURE__ */ O(ht, {
687
+ return /* @__PURE__ */ j(ht, {
688
688
  ...$(n),
689
689
  ...r,
690
690
  ref: t
691
691
  });
692
692
  });
693
693
  Ht.displayName = Vt;
694
- var Ut = "DropdownMenuRadioItem", Wt = D.forwardRef((e, t) => {
694
+ var Ut = "DropdownMenuRadioItem", Wt = A.forwardRef((e, t) => {
695
695
  let { __scopeDropdownMenu: n, ...r } = e;
696
- return /* @__PURE__ */ O(gt, {
696
+ return /* @__PURE__ */ j(gt, {
697
697
  ...$(n),
698
698
  ...r,
699
699
  ref: t
700
700
  });
701
701
  });
702
702
  Wt.displayName = Ut;
703
- var Gt = "DropdownMenuItemIndicator", Kt = D.forwardRef((e, t) => {
703
+ var Gt = "DropdownMenuItemIndicator", Kt = A.forwardRef((e, t) => {
704
704
  let { __scopeDropdownMenu: n, ...r } = e;
705
- return /* @__PURE__ */ O(_t, {
705
+ return /* @__PURE__ */ j(_t, {
706
706
  ...$(n),
707
707
  ...r,
708
708
  ref: t
709
709
  });
710
710
  });
711
711
  Kt.displayName = Gt;
712
- var qt = "DropdownMenuSeparator", Jt = D.forwardRef((e, t) => {
712
+ var qt = "DropdownMenuSeparator", Jt = A.forwardRef((e, t) => {
713
713
  let { __scopeDropdownMenu: n, ...r } = e;
714
- return /* @__PURE__ */ O(vt, {
714
+ return /* @__PURE__ */ j(vt, {
715
715
  ...$(n),
716
716
  ...r,
717
717
  ref: t
718
718
  });
719
719
  });
720
720
  Jt.displayName = qt;
721
- var Yt = "DropdownMenuArrow", Xt = D.forwardRef((e, t) => {
721
+ var Yt = "DropdownMenuArrow", Xt = A.forwardRef((e, t) => {
722
722
  let { __scopeDropdownMenu: n, ...r } = e;
723
- return /* @__PURE__ */ O(yt, {
723
+ return /* @__PURE__ */ j(yt, {
724
724
  ...$(n),
725
725
  ...r,
726
726
  ref: t
727
727
  });
728
728
  });
729
729
  Xt.displayName = Yt;
730
- var Zt = "DropdownMenuSubTrigger", Qt = D.forwardRef((e, t) => {
730
+ var Zt = "DropdownMenuSubTrigger", Qt = A.forwardRef((e, t) => {
731
731
  let { __scopeDropdownMenu: n, ...r } = e;
732
- return /* @__PURE__ */ O(bt, {
732
+ return /* @__PURE__ */ j(bt, {
733
733
  ...$(n),
734
734
  ...r,
735
735
  ref: t
736
736
  });
737
737
  });
738
738
  Qt.displayName = Zt;
739
- var $t = "DropdownMenuSubContent", en = D.forwardRef((e, t) => {
739
+ var $t = "DropdownMenuSubContent", en = A.forwardRef((e, t) => {
740
740
  let { __scopeDropdownMenu: n, ...r } = e;
741
- return /* @__PURE__ */ O(xt, {
741
+ return /* @__PURE__ */ j(xt, {
742
742
  ...$(n),
743
743
  ...r,
744
744
  ref: t,
@@ -753,114 +753,114 @@ var $t = "DropdownMenuSubContent", en = D.forwardRef((e, t) => {
753
753
  });
754
754
  });
755
755
  en.displayName = $t;
756
- var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un = Jt, dn = (e, t) => t === "multiple" ? Array.isArray(e) ? e : e ? [e] : [] : Array.isArray(e) ? e[0] ?? "" : e ?? "", fn = (e) => e.type !== "separator" && e.type !== "label", pn = ({ align: t = "start", asChild: n = !0, alignOffset: r = 0, avoidCollisions: i = !0, className: a, collisionBoundary: o, collisionPadding: s = 10, contentClassName: c, dataTestId: l, defaultOpen: u, defaultValue: d, disabled: f = !1, dropdownWidth: y = "content", emptyMessage: ne = "No options found", loadingMessage: b = "Loading…", modal: re = !0, onOpenChange: ie, onValueChange: ae, open: x, options: S, selectionMode: C = "single", side: oe = "bottom", sideOffset: se = 4, state: w = "default", trigger: ce, value: T }) => {
757
- let [E, D] = v({
758
- value: x,
756
+ var tn = Et, nn = Ot, rn = At, an = Mt, on = It, sn = Rt, cn = Bt, ln = Kt, un = Jt, dn = (e, t) => t === "multiple" ? Array.isArray(e) ? e : e ? [e] : [] : Array.isArray(e) ? e[0] ?? "" : e ?? "", fn = (e) => e.type !== "separator" && e.type !== "label", pn = ({ align: t = "start", asChild: n = !0, alignOffset: r = 0, avoidCollisions: i = !0, className: a, collisionBoundary: o, collisionPadding: s = 10, contentClassName: c, dataTestId: l, defaultOpen: u, defaultValue: d, disabled: f = !1, dropdownWidth: b = "content", emptyMessage: ee = "No options found", loadingMessage: x = "Loading…", modal: te = !0, onOpenChange: S, onValueChange: ne, open: re, options: C, selectionMode: w = "single", side: T = "bottom", sideOffset: ie = 4, state: E = "default", trigger: ae, value: O }) => {
757
+ let [k, A] = y({
758
+ value: re,
759
759
  defaultValue: u ?? !1,
760
- onChange: ie
761
- }), { dropdownShiftStyle: A, setDropdownElement: j } = te(E), le = dn(d, C), [M, N] = v({
762
- value: T === void 0 ? void 0 : dn(T, C),
763
- defaultValue: le,
764
- onChange: ae
765
- }), { dropdownWidthMode: P, dropdownWidthStyle: F } = g({
766
- dropdownWidth: y,
760
+ onChange: S
761
+ }), { dropdownShiftStyle: N, setDropdownElement: P } = D(k), F = dn(d, w), [I, L] = y({
762
+ value: O === void 0 ? void 0 : dn(O, w),
763
+ defaultValue: F,
764
+ onChange: ne
765
+ }), { dropdownWidthMode: R, dropdownWidthStyle: z } = _({
766
+ dropdownWidth: b,
767
767
  triggerWidth: "var(--radix-dropdown-menu-trigger-width)"
768
- }), I = f || w === "loading", ue = S.filter(fn), de = (e) => C === "multiple" ? (Array.isArray(M) ? M : []).includes(e) : M === e, L = (e) => {
769
- if (C === "multiple") {
770
- let t = Array.isArray(M) ? M : [];
771
- N(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
768
+ }), B = f || E === "loading", oe = C.filter(fn), se = (e) => w === "multiple" ? (Array.isArray(I) ? I : []).includes(e) : I === e, V = (e) => {
769
+ if (w === "multiple") {
770
+ let t = Array.isArray(I) ? I : [];
771
+ L(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
772
772
  return;
773
773
  }
774
- N(e), D(!1);
775
- }, R = (t, n) => {
776
- if (t.type === "separator") return /* @__PURE__ */ O(un, {
774
+ L(e), A(!1);
775
+ }, H = (t, n) => {
776
+ if (t.type === "separator") return /* @__PURE__ */ j(un, {
777
777
  className: "-mx-1 my-1 h-px bg-border-secondary",
778
778
  "data-testid": "spectral-dropdown-menu-separator"
779
779
  }, t.id ?? `separator-${n}`);
780
- if (t.type === "label") return /* @__PURE__ */ O(on, {
780
+ if (t.type === "label") return /* @__PURE__ */ j(on, {
781
781
  className: "px-2 py-1.5 text-base font-semibold text-text-primary",
782
782
  "data-testid": "spectral-dropdown-menu-label",
783
783
  children: t.label
784
784
  }, t.id ?? `label-${n}`);
785
- let r = de(t.value), i = p(_(!!t.disabled, !1, r), "group/spectral-dropdown-menu-item pr-2 gap-4 relative flex w-full justify-between");
786
- return C === "multiple" || t.type === "checkbox" ? /* @__PURE__ */ k(cn, {
785
+ let r = se(t.value), i = p(v(!!t.disabled, !1, r), "group/spectral-dropdown-menu-item pr-2 gap-4 relative flex w-full justify-between");
786
+ return w === "multiple" || t.type === "checkbox" ? /* @__PURE__ */ M(cn, {
787
787
  checked: r,
788
788
  className: i,
789
789
  "data-testid": "spectral-dropdown-menu-checkbox-item",
790
790
  disabled: t.disabled,
791
- onCheckedChange: () => L(t.value),
791
+ onCheckedChange: () => V(t.value),
792
792
  onSelect: (e) => e.preventDefault(),
793
793
  children: [
794
- /* @__PURE__ */ O("span", {
794
+ /* @__PURE__ */ j("span", {
795
795
  className: "min-w-0 flex-1 truncate whitespace-nowrap",
796
796
  children: t.label
797
797
  }),
798
- t.shortcut && /* @__PURE__ */ O("span", {
798
+ t.shortcut && /* @__PURE__ */ j("span", {
799
799
  className: "text-xs tracking-widest ml-auto text-input-text-placeholder",
800
800
  children: t.shortcut
801
801
  }),
802
- /* @__PURE__ */ O("span", {
802
+ /* @__PURE__ */ j("span", {
803
803
  "aria-hidden": "true",
804
804
  className: "ml-2 size-4 flex shrink-0 items-center justify-center",
805
- children: /* @__PURE__ */ O(ln, {
805
+ children: /* @__PURE__ */ j(ln, {
806
806
  asChild: !0,
807
- children: /* @__PURE__ */ O("span", {
807
+ children: /* @__PURE__ */ j("span", {
808
808
  className: "size-4 flex items-center justify-center",
809
- children: /* @__PURE__ */ O(e, { size: 16 })
809
+ children: /* @__PURE__ */ j(e, { size: 16 })
810
810
  })
811
811
  })
812
812
  })
813
813
  ]
814
- }, t.value) : /* @__PURE__ */ k(sn, {
814
+ }, t.value) : /* @__PURE__ */ M(sn, {
815
815
  className: i,
816
816
  "data-testid": "spectral-dropdown-menu-item",
817
817
  disabled: t.disabled,
818
- onSelect: () => L(t.value),
818
+ onSelect: () => V(t.value),
819
819
  children: [
820
- /* @__PURE__ */ O("span", {
820
+ /* @__PURE__ */ j("span", {
821
821
  className: "min-w-0 flex-1 truncate whitespace-nowrap",
822
822
  children: t.label
823
823
  }),
824
- t.shortcut && /* @__PURE__ */ O("span", {
824
+ t.shortcut && /* @__PURE__ */ j("span", {
825
825
  className: "text-xs tracking-widest ml-auto text-input-text-placeholder",
826
826
  children: t.shortcut
827
827
  }),
828
- /* @__PURE__ */ O("span", {
828
+ /* @__PURE__ */ j("span", {
829
829
  "aria-hidden": "true",
830
830
  className: "ml-2 size-4 flex shrink-0 items-center justify-center",
831
- children: r && /* @__PURE__ */ O(e, { size: 16 })
831
+ children: r && /* @__PURE__ */ j(e, { size: 16 })
832
832
  })
833
833
  ]
834
834
  }, t.value);
835
835
  };
836
- return /* @__PURE__ */ k(tn, {
837
- modal: re,
838
- onOpenChange: D,
839
- open: E,
840
- children: [/* @__PURE__ */ O(nn, {
836
+ return /* @__PURE__ */ M(tn, {
837
+ modal: te,
838
+ onOpenChange: A,
839
+ open: k,
840
+ children: [/* @__PURE__ */ j(nn, {
841
841
  asChild: n,
842
842
  className: p(a, "transition-opacity duration-200 hover:cursor-pointer hover:opacity-80"),
843
843
  "data-testid": l ?? "spectral-dropdown-menu-trigger",
844
- disabled: I,
845
- children: ce
846
- }), /* @__PURE__ */ O(rn, { children: /* @__PURE__ */ O(an, {
844
+ disabled: B,
845
+ children: ae
846
+ }), /* @__PURE__ */ j(rn, { children: /* @__PURE__ */ j(an, {
847
847
  align: t,
848
848
  alignOffset: r,
849
849
  avoidCollisions: i,
850
- className: p("p-1 relative z-50 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=open]:animate-in", h(), "motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", "max-h-[min(var(--radix-dropdown-menu-content-available-height),300px)] motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=top]:slide-in-from-bottom-2", "min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto", c),
850
+ className: p("p-1 relative z-50 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=open]:animate-in", g(), "motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", "max-h-[min(var(--radix-dropdown-menu-content-available-height),300px)] motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=top]:slide-in-from-bottom-2", "min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto", c),
851
851
  collisionBoundary: o,
852
852
  collisionPadding: s,
853
- "data-dropdown-width-mode": P,
854
- "data-dropdown-width-value": P === "custom" ? y : void 0,
853
+ "data-dropdown-width-mode": R,
854
+ "data-dropdown-width-value": R === "custom" ? b : void 0,
855
855
  "data-testid": "spectral-dropdown-menu-content",
856
- ref: j,
857
- side: oe,
858
- sideOffset: se,
856
+ ref: P,
857
+ side: T,
858
+ sideOffset: ie,
859
859
  style: {
860
- ...F,
861
- ...A
860
+ ...z,
861
+ ...N
862
862
  },
863
- children: w === "loading" ? /* @__PURE__ */ O(ee, { message: b }) : ue.length === 0 ? /* @__PURE__ */ O(m, { message: ne }) : S.map(R)
863
+ children: E === "loading" ? /* @__PURE__ */ j(h, { message: x }) : oe.length === 0 ? /* @__PURE__ */ j(m, { message: ee }) : C.map(H)
864
864
  }) })]
865
865
  });
866
866
  };