@spear-ai/spectral 1.13.0 → 1.13.1

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