@spear-ai/spectral 1.12.5 → 1.13.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 (119) hide show
  1. package/dist/.js +18 -16
  2. package/dist/{Accordion-Cyrb2byI.js → Accordion-dVZHqyv8.js} +5 -5
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Alert/AlertBase.js +2 -2
  5. package/dist/Alert.js +1 -1
  6. package/dist/{AnimatePresence-D9FLxIGV.js → AnimatePresence-Bz_JZ2ah.js} +1 -1
  7. package/dist/Avatar.js +1 -1
  8. package/dist/Badge.js +2 -2
  9. package/dist/Button.js +2 -2
  10. package/dist/ButtonGroup/ButtonGroupButton.js +2 -2
  11. package/dist/ButtonGroup.js +2 -2
  12. package/dist/ButtonIcon.js +1 -1
  13. package/dist/{Calendar-2UVWeLYp.js → Calendar-FXWVuKWS.js} +2 -2
  14. package/dist/Checkbox/CheckboxBase.js +1 -1
  15. package/dist/Checkbox.js +1 -1
  16. package/dist/{Combination-9q50p_Vu.js → Combination-MimnVFUU.js} +2 -2
  17. package/dist/{Combobox-CWYypzjZ.js → Combobox-DCCcIDgq.js} +18 -17
  18. package/dist/Combobox.js +1 -1
  19. package/dist/ControlGroup/ControlGroupSelect.js +4 -4
  20. package/dist/ControlGroup.js +2 -2
  21. package/dist/DataCard/Card.js +1 -1
  22. package/dist/DataCard.js +1 -1
  23. package/dist/DateTimePicker/Calendar.js +1 -1
  24. package/dist/DateTimePicker/DateTimeDisplayInput.js +2 -2
  25. package/dist/DateTimePicker/DateTimeInput.js +2 -2
  26. package/dist/DateTimePicker/DateTimeUtils.js +1 -1
  27. package/dist/DateTimePicker/TimePeriodSelect.js +2 -2
  28. package/dist/DateTimePicker/TimePicker.js +2 -2
  29. package/dist/DateTimePicker.js +3 -3
  30. package/dist/Dialog.js +3 -3
  31. package/dist/Drawer.js +1 -1
  32. package/dist/DropdownMenu-B8I8IRcu.js +868 -0
  33. package/dist/DropdownMenu.js +2 -868
  34. package/dist/{HoverCard-BGpW6LnA.js → HoverCard-BhxgELKP.js} +5 -5
  35. package/dist/HoverCard.js +1 -1
  36. package/dist/IconsAnimated/PanelLeftCloseIcon.js +3 -3
  37. package/dist/IconsAnimated/PanelLeftOpenIcon.js +3 -3
  38. package/dist/Input.js +1 -1
  39. package/dist/InputNumeric.js +1 -1
  40. package/dist/{InputOTP-BkSw_KIB.js → InputOTP-DyhesOLs.js} +1 -1
  41. package/dist/InputOTP.js +1 -1
  42. package/dist/Kbd.js +1 -1
  43. package/dist/Label.js +1 -1
  44. package/dist/MultiSelect/MultiSelectBase.js +2 -2
  45. package/dist/Popover.js +2 -2
  46. package/dist/RadioButton.js +1 -1
  47. package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +2 -2
  48. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
  49. package/dist/RadioButtonGroup.js +1 -1
  50. package/dist/{RadioGroup-CfjhpW5o.js → RadioGroup-BsBK247l.js} +9 -9
  51. package/dist/RadioGroup.js +1 -1
  52. package/dist/Select.js +3 -3
  53. package/dist/Separator.js +1 -1
  54. package/dist/Skeleton.js +1 -1
  55. package/dist/{Slider-mODhqkCs.js → Slider-CPYW_VYu.js} +6 -6
  56. package/dist/Slider.js +1 -1
  57. package/dist/{Switch-Wj_zov--.js → Switch-Vep4hsq4.js} +1 -1
  58. package/dist/Switch.js +1 -1
  59. package/dist/Tabs/TabsBase.js +4 -4
  60. package/dist/Tabs.js +1 -1
  61. package/dist/Textarea.js +1 -1
  62. package/dist/{Toast-CJvzLlMD.js → Toast-BuaZxqlt.js} +2 -2
  63. package/dist/Toast.js +1 -1
  64. package/dist/Toggle.d.ts +1 -1
  65. package/dist/Toggle.js +13 -13
  66. package/dist/ToggleGroup/ToggleGroup.context.d.ts +9 -0
  67. package/dist/ToggleGroup/ToggleGroup.context.js +11 -0
  68. package/dist/ToggleGroup/ToggleGroupBase.d.ts +1 -1
  69. package/dist/ToggleGroup/ToggleGroupBase.js +19 -19
  70. package/dist/ToggleGroup/ToggleGroupItem.d.ts +15 -0
  71. package/dist/ToggleGroup/ToggleGroupItem.js +35 -0
  72. package/dist/ToggleGroup/ToggleGroupSplitMenuItem.d.ts +19 -0
  73. package/dist/ToggleGroup/ToggleGroupSplitMenuItem.js +75 -0
  74. package/dist/ToggleGroup.d.ts +6 -14
  75. package/dist/ToggleGroup.js +25 -47
  76. package/dist/{Tooltip-DH_BzFye.js → Tooltip-CTjKOfvC.js} +8 -8
  77. package/dist/Tooltip.js +1 -1
  78. package/dist/Tray.js +6 -6
  79. package/dist/builtin_esm-external-require-react-ItzZuLxx.js +8 -0
  80. package/dist/{chunk-C4rFPcKS.js → chunk-DmRZw4Wy.js} +2 -5
  81. package/dist/{dist-nYKAWiy4.js → dist-B9w6c9RC.js} +6 -6
  82. package/dist/{dist-Dtvmk11N.js → dist-Br_xj9vz.js} +1 -1
  83. package/dist/{dist-ChNh3U3S.js → dist-C-2mar4Y.js} +1 -1
  84. package/dist/{dist-CGzgmYB9.js → dist-CcsVPym2.js} +1 -1
  85. package/dist/{dist-Tbzy5UFA.js → dist-CrYg_9Cu.js} +1 -1
  86. package/dist/{dist-Cv8I-d2q.js → dist-CwYxT5fv.js} +3 -3
  87. package/dist/{dist-Bft31cJh.js → dist-D9FsQh8P.js} +1 -1
  88. package/dist/{dist-BMu6Dgh_.js → dist-DBLajRTL.js} +4 -4
  89. package/dist/{dist-D6QANKSj.js → dist-DT46nqCO.js} +5 -5
  90. package/dist/{dist-K0_i37VL.js → dist-PfrTYHr_.js} +1 -1
  91. package/dist/{dist-jQ7HawWM.js → dist-iDaHUF3d.js} +2 -2
  92. package/dist/{dist-B4g6zpUF.js → dist-tMzzRwxG.js} +1 -1
  93. package/dist/hooks/useConvertToOklch.d.ts.map +1 -1
  94. package/dist/index.d.ts +1 -1
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/main.js +5969 -5965
  97. package/dist/primitives/button.js +2 -2
  98. package/dist/primitives/input-group.js +2 -2
  99. package/dist/primitives/input.js +1 -1
  100. package/dist/primitives/popover.js +2 -2
  101. package/dist/primitives/select.d.ts.map +1 -1
  102. package/dist/primitives/select.js +1 -1
  103. package/dist/primitives/textarea.js +1 -1
  104. package/dist/{proxy-CCB7C4Pu.js → proxy-BFVscmYQ.js} +1 -1
  105. package/dist/{select-D7pPhL6t.js → select-oAOoVl5g.js} +14 -14
  106. package/dist/styles/spectral.css +1 -1
  107. package/dist/{twUtils-D_qzdiwM.js → twUtils-BpqlKSeB.js} +1 -1
  108. package/dist/{use-animation-C-qL83hj.js → use-animation-BeSipRjB.js} +1 -1
  109. package/dist/utils/formFieldUtils.d.ts.map +1 -1
  110. package/dist/utils/formFieldUtils.js +1 -1
  111. package/dist/utils/twUtils.js +1 -1
  112. package/package.json +3 -2
  113. /package/dist/{DateTimeUtils-DrR2JWoU.js → DateTimeUtils-BJUAMuot.js} +0 -0
  114. /package/dist/{clsx-jM1GlMvB.js → clsx-Bfoz3aNJ.js} +0 -0
  115. /package/dist/{dist-DIt8FP2G.js → dist-C4MHwt9g.js} +0 -0
  116. /package/dist/{dist-DDjUcieO.js → dist-C6pGYii-.js} +0 -0
  117. /package/dist/{dist-Cujfuel1.js → dist-Cc8NfAO6.js} +0 -0
  118. /package/dist/{dist-7HRQ5IKN.js → dist-DEkDg4Sk.js} +0 -0
  119. /package/dist/{dist-DFT13f_s.js → dist-s1uWaZYZ.js} +0 -0
@@ -0,0 +1,868 @@
1
+ import './styles/main.css'
2
+ import { CheckmarkIcon as e } from "./Icons/CheckmarkIcon.js";
3
+ import { a as t, c as n, d as r, l as i, n as a, o, r as s, t as c } from "./dist-DEkDg4Sk.js";
4
+ import { n as l, t as u } from "./dist-CcsVPym2.js";
5
+ import { t as d } from "./dist-D9FsQh8P.js";
6
+ import { t as f } from "./dist-Br_xj9vz.js";
7
+ import { t as p } from "./twUtils-BpqlKSeB.js";
8
+ import { EmptyState as m, LoadingState as h, getDropdownSurfaceClasses as g, getDropdownWidthStyles as _, getOptionClasses as v } from "./utils/formFieldUtils.js";
9
+ import { useUncontrolledState as y } from "./hooks/useUncontrolledState.js";
10
+ import { t as b } from "./dist-C4MHwt9g.js";
11
+ import { n as ee, t as x } from "./dist-iDaHUF3d.js";
12
+ import { i as te, n as S, r as ne, t as re } from "./Combination-MimnVFUU.js";
13
+ import { a as C, i as w, n as T, r as ie, t as E } from "./dist-CwYxT5fv.js";
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";
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 = [
20
+ "ArrowDown",
21
+ "PageUp",
22
+ "Home"
23
+ ], F = [
24
+ "ArrowUp",
25
+ "PageDown",
26
+ "End"
27
+ ], I = [...P, ...F], L = {
28
+ ltr: [...N, "ArrowRight"],
29
+ rtl: [...N, "ArrowLeft"]
30
+ }, R = {
31
+ ltr: ["ArrowLeft"],
32
+ rtl: ["ArrowRight"]
33
+ }, z = "Menu", [B, oe, se] = l(z), [V, H] = r(z, [
34
+ se,
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(() => {
40
+ let e = () => {
41
+ d.current = !0, document.addEventListener("pointerdown", t, {
42
+ capture: !0,
43
+ once: !0
44
+ }), document.addEventListener("pointermove", t, {
45
+ capture: !0,
46
+ once: !0
47
+ });
48
+ }, t = () => d.current = !1;
49
+ return document.addEventListener("keydown", e, { capture: !0 }), () => {
50
+ document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
51
+ };
52
+ }, []), /* @__PURE__ */ j(w, {
53
+ ...s,
54
+ children: /* @__PURE__ */ j(le, {
55
+ scope: t,
56
+ open: n,
57
+ onOpenChange: f,
58
+ content: c,
59
+ onContentChange: l,
60
+ children: /* @__PURE__ */ j(ue, {
61
+ scope: t,
62
+ onClose: A.useCallback(() => f(!1), [f]),
63
+ isUsingKeyboardRef: d,
64
+ dir: p,
65
+ modal: o,
66
+ children: r
67
+ })
68
+ })
69
+ });
70
+ };
71
+ de.displayName = z;
72
+ var fe = "MenuAnchor", pe = A.forwardRef((e, t) => {
73
+ let { __scopeMenu: n, ...r } = e;
74
+ return /* @__PURE__ */ j(E, {
75
+ ...U(n),
76
+ ...r,
77
+ ref: t
78
+ });
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, {
84
+ scope: t,
85
+ forceMount: n,
86
+ children: /* @__PURE__ */ j(d, {
87
+ present: n || a.open,
88
+ children: /* @__PURE__ */ j(x, {
89
+ asChild: !0,
90
+ container: i,
91
+ children: r
92
+ })
93
+ })
94
+ });
95
+ };
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, {
100
+ scope: e.__scopeMenu,
101
+ children: /* @__PURE__ */ j(d, {
102
+ present: r || a.open,
103
+ children: /* @__PURE__ */ j(B.Slot, {
104
+ scope: e.__scopeMenu,
105
+ children: o.modal ? /* @__PURE__ */ j(xe, {
106
+ ...i,
107
+ ref: t
108
+ }) : /* @__PURE__ */ j(Se, {
109
+ ...i,
110
+ ref: t
111
+ })
112
+ })
113
+ })
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(() => {
118
+ let e = a.current;
119
+ if (e) return S(e);
120
+ }, []), /* @__PURE__ */ j(we, {
121
+ ...e,
122
+ ref: o,
123
+ trapFocus: r.open,
124
+ disableOutsidePointerEvents: r.open,
125
+ disableOutsideScroll: !0,
126
+ onFocusOutside: t(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
127
+ onDismiss: () => r.onOpenChange(!1)
128
+ });
129
+ }), Se = A.forwardRef((e, t) => {
130
+ let n = W(K, e.__scopeMenu);
131
+ return /* @__PURE__ */ j(we, {
132
+ ...e,
133
+ ref: t,
134
+ trapFocus: !1,
135
+ disableOutsidePointerEvents: !1,
136
+ disableOutsideScroll: !1,
137
+ onDismiss: () => n.onOpenChange(!1)
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 ? {
141
+ as: Ce,
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;
145
+ (function e(t) {
146
+ O.current = t, window.clearTimeout(D.current), t !== "" && (D.current = window.setTimeout(() => e(""), 1e3));
147
+ })(t), o && setTimeout(() => o.focus());
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, {
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;
166
+ }, []),
167
+ children: /* @__PURE__ */ j(L, {
168
+ ...R,
169
+ children: /* @__PURE__ */ j(ne, {
170
+ asChild: !0,
171
+ trapped: o,
172
+ onMountAutoFocus: t(s, (e) => {
173
+ e.preventDefault(), T.current?.focus({ preventScroll: !0 });
174
+ }),
175
+ onUnmountAutoFocus: c,
176
+ children: /* @__PURE__ */ j(ee, {
177
+ asChild: !0,
178
+ disableOutsidePointerEvents: l,
179
+ onEscapeKeyDown: d,
180
+ onPointerDownOutside: f,
181
+ onFocusOutside: p,
182
+ onInteractOutside: m,
183
+ onDismiss: h,
184
+ children: /* @__PURE__ */ j(ae, {
185
+ asChild: !0,
186
+ ...x,
187
+ dir: y.dir,
188
+ orientation: "vertical",
189
+ loop: a,
190
+ currentTabStopId: C,
191
+ onCurrentTabStopIdChange: w,
192
+ onEntryFocus: t(u, (e) => {
193
+ y.isUsingKeyboardRef.current || e.preventDefault();
194
+ }),
195
+ preventScrollOnEntryFocus: !0,
196
+ children: /* @__PURE__ */ j(ie, {
197
+ role: "menu",
198
+ "aria-orientation": "vertical",
199
+ "data-state": et(v.open),
200
+ "data-radix-menu-content": "",
201
+ dir: y.dir,
202
+ ...b,
203
+ ..._,
204
+ ref: E,
205
+ style: {
206
+ outline: "none",
207
+ ..._.style
208
+ },
209
+ onKeyDown: t(_.onKeyDown, (e) => {
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));
212
+ let i = T.current;
213
+ if (e.target !== i || !I.includes(e.key)) return;
214
+ e.preventDefault();
215
+ let a = S().filter((e) => !e.disabled).map((e) => e.ref.current);
216
+ F.includes(e.key) && a.reverse(), nt(a);
217
+ }),
218
+ onBlur: t(e.onBlur, (e) => {
219
+ e.currentTarget.contains(e.target) || (window.clearTimeout(D.current), O.current = "");
220
+ }),
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);
224
+ }))
225
+ })
226
+ })
227
+ })
228
+ })
229
+ })
230
+ });
231
+ });
232
+ be.displayName = K;
233
+ var Te = "MenuGroup", Ee = A.forwardRef((e, t) => {
234
+ let { __scopeMenu: n, ...r } = e;
235
+ return /* @__PURE__ */ j(c.div, {
236
+ role: "group",
237
+ ...r,
238
+ ref: t
239
+ });
240
+ });
241
+ Ee.displayName = Te;
242
+ var De = "MenuLabel", Oe = A.forwardRef((e, t) => {
243
+ let { __scopeMenu: n, ...r } = e;
244
+ return /* @__PURE__ */ j(c.div, {
245
+ ...r,
246
+ ref: t
247
+ });
248
+ });
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 = () => {
252
+ let e = c.current;
253
+ if (!r && e) {
254
+ let t = new CustomEvent(ke, {
255
+ bubbles: !0,
256
+ cancelable: !0
257
+ });
258
+ e.addEventListener(ke, (e) => o?.(e), { once: !0 }), a(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
259
+ }
260
+ };
261
+ return /* @__PURE__ */ j(Ae, {
262
+ ...s,
263
+ ref: d,
264
+ disabled: r,
265
+ onClick: t(e.onClick, p),
266
+ onPointerDown: (t) => {
267
+ e.onPointerDown?.(t), f.current = !0;
268
+ },
269
+ onPointerUp: t(e.onPointerUp, (e) => {
270
+ f.current || e.currentTarget?.click();
271
+ }),
272
+ onKeyDown: t(e.onKeyDown, (e) => {
273
+ let t = u.searchRef.current !== "";
274
+ r || t && e.key === " " || N.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
275
+ })
276
+ });
277
+ });
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(() => {
282
+ let e = d.current;
283
+ e && g((e.textContent ?? "").trim());
284
+ }, [s.children]), /* @__PURE__ */ j(B.ItemSlot, {
285
+ scope: r,
286
+ disabled: a,
287
+ textValue: o ?? h,
288
+ children: /* @__PURE__ */ j(k, {
289
+ asChild: !0,
290
+ ...u,
291
+ focusable: !a,
292
+ children: /* @__PURE__ */ j(c.div, {
293
+ role: "menuitem",
294
+ "data-highlighted": p ? "" : void 0,
295
+ "aria-disabled": a || void 0,
296
+ "data-disabled": a ? "" : void 0,
297
+ ...s,
298
+ ref: f,
299
+ onPointerMove: t(e.onPointerMove, Z((e) => {
300
+ a ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
301
+ })),
302
+ onPointerLeave: t(e.onPointerLeave, Z((e) => l.onItemLeave(e))),
303
+ onFocus: t(e.onFocus, () => m(!0)),
304
+ onBlur: t(e.onBlur, () => m(!1))
305
+ })
306
+ })
307
+ });
308
+ }), je = "MenuCheckboxItem", Me = A.forwardRef((e, n) => {
309
+ let { checked: r = !1, onCheckedChange: i, ...a } = e;
310
+ return /* @__PURE__ */ j(Be, {
311
+ scope: e.__scopeMenu,
312
+ checked: r,
313
+ children: /* @__PURE__ */ j(J, {
314
+ role: "menuitemcheckbox",
315
+ "aria-checked": X(r) ? "mixed" : r,
316
+ ...a,
317
+ ref: n,
318
+ "data-state": tt(r),
319
+ onSelect: t(a.onSelect, () => i?.(X(r) ? !0 : !r), { checkForDefaultPrevented: !1 })
320
+ })
321
+ });
322
+ });
323
+ Me.displayName = je;
324
+ var Ne = "MenuRadioGroup", [Pe, Fe] = V(Ne, {
325
+ value: void 0,
326
+ onValueChange: () => {}
327
+ }), Ie = A.forwardRef((e, t) => {
328
+ let { value: n, onValueChange: r, ...i } = e, a = b(r);
329
+ return /* @__PURE__ */ j(Pe, {
330
+ scope: e.__scopeMenu,
331
+ value: n,
332
+ onValueChange: a,
333
+ children: /* @__PURE__ */ j(Ee, {
334
+ ...i,
335
+ ref: t
336
+ })
337
+ });
338
+ });
339
+ Ie.displayName = Ne;
340
+ var Le = "MenuRadioItem", Re = A.forwardRef((e, n) => {
341
+ let { value: r, ...i } = e, a = Fe(Le, e.__scopeMenu), o = r === a.value;
342
+ return /* @__PURE__ */ j(Be, {
343
+ scope: e.__scopeMenu,
344
+ checked: o,
345
+ children: /* @__PURE__ */ j(J, {
346
+ role: "menuitemradio",
347
+ "aria-checked": o,
348
+ ...i,
349
+ ref: n,
350
+ "data-state": tt(o),
351
+ onSelect: t(i.onSelect, () => a.onValueChange?.(r), { checkForDefaultPrevented: !1 })
352
+ })
353
+ });
354
+ });
355
+ Re.displayName = Le;
356
+ var ze = "MenuItemIndicator", [Be, Ve] = V(ze, { checked: !1 }), He = A.forwardRef((e, t) => {
357
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = Ve(ze, n);
358
+ return /* @__PURE__ */ j(d, {
359
+ present: r || X(a.checked) || a.checked === !0,
360
+ children: /* @__PURE__ */ j(c.span, {
361
+ ...i,
362
+ ref: t,
363
+ "data-state": tt(a.checked)
364
+ })
365
+ });
366
+ });
367
+ He.displayName = ze;
368
+ var Ue = "MenuSeparator", We = A.forwardRef((e, t) => {
369
+ let { __scopeMenu: n, ...r } = e;
370
+ return /* @__PURE__ */ j(c.div, {
371
+ role: "separator",
372
+ "aria-orientation": "horizontal",
373
+ ...r,
374
+ ref: t
375
+ });
376
+ });
377
+ We.displayName = Ue;
378
+ var Ge = "MenuArrow", Ke = A.forwardRef((e, t) => {
379
+ let { __scopeMenu: n, ...r } = e;
380
+ return /* @__PURE__ */ j(T, {
381
+ ...U(n),
382
+ ...r,
383
+ ref: t
384
+ });
385
+ });
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, {
390
+ ...o,
391
+ children: /* @__PURE__ */ j(le, {
392
+ scope: t,
393
+ open: r,
394
+ onOpenChange: d,
395
+ content: l,
396
+ onContentChange: u,
397
+ children: /* @__PURE__ */ j(Je, {
398
+ scope: t,
399
+ contentId: f(),
400
+ triggerId: f(),
401
+ trigger: s,
402
+ onTriggerChange: c,
403
+ children: n
404
+ })
405
+ })
406
+ });
407
+ };
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(() => {
411
+ c.current && window.clearTimeout(c.current), c.current = null;
412
+ }, []);
413
+ return A.useEffect(() => f, [f]), A.useEffect(() => {
414
+ let e = l.current;
415
+ return () => {
416
+ window.clearTimeout(e), u(null);
417
+ };
418
+ }, [l, u]), /* @__PURE__ */ j(pe, {
419
+ asChild: !0,
420
+ ...d,
421
+ children: /* @__PURE__ */ j(Ae, {
422
+ id: o.triggerId,
423
+ "aria-haspopup": "menu",
424
+ "aria-expanded": i.open,
425
+ "aria-controls": o.contentId,
426
+ "data-state": et(i.open),
427
+ ...e,
428
+ ref: n(r, o.onTriggerChange),
429
+ onClick: (t) => {
430
+ e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), i.open || i.onOpenChange(!0));
431
+ },
432
+ onPointerMove: t(e.onPointerMove, Z((t) => {
433
+ s.onItemEnter(t), !t.defaultPrevented && !e.disabled && !i.open && !c.current && (s.onPointerGraceIntentChange(null), c.current = window.setTimeout(() => {
434
+ i.onOpenChange(!0), f();
435
+ }, 100));
436
+ })),
437
+ onPointerLeave: t(e.onPointerLeave, Z((e) => {
438
+ f();
439
+ let t = i.content?.getBoundingClientRect();
440
+ if (t) {
441
+ let n = i.content?.dataset.side, r = n === "right", a = r ? -5 : 5, o = t[r ? "left" : "right"], c = t[r ? "right" : "left"];
442
+ s.onPointerGraceIntentChange({
443
+ area: [
444
+ {
445
+ x: e.clientX + a,
446
+ y: e.clientY
447
+ },
448
+ {
449
+ x: o,
450
+ y: t.top
451
+ },
452
+ {
453
+ x: c,
454
+ y: t.top
455
+ },
456
+ {
457
+ x: c,
458
+ y: t.bottom
459
+ },
460
+ {
461
+ x: o,
462
+ y: t.bottom
463
+ }
464
+ ],
465
+ side: n
466
+ }), window.clearTimeout(l.current), l.current = window.setTimeout(() => s.onPointerGraceIntentChange(null), 300);
467
+ } else {
468
+ if (s.onTriggerLeave(e), e.defaultPrevented) return;
469
+ s.onPointerGraceIntentChange(null);
470
+ }
471
+ })),
472
+ onKeyDown: t(e.onKeyDown, (t) => {
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());
475
+ })
476
+ })
477
+ });
478
+ });
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, {
483
+ scope: e.__scopeMenu,
484
+ children: /* @__PURE__ */ j(d, {
485
+ present: a || s.open,
486
+ children: /* @__PURE__ */ j(B.Slot, {
487
+ scope: e.__scopeMenu,
488
+ children: /* @__PURE__ */ j(we, {
489
+ id: l.contentId,
490
+ "aria-labelledby": l.triggerId,
491
+ ...o,
492
+ ref: f,
493
+ align: "start",
494
+ side: c.dir === "rtl" ? "left" : "right",
495
+ disableOutsidePointerEvents: !1,
496
+ disableOutsideScroll: !1,
497
+ trapFocus: !1,
498
+ onOpenAutoFocus: (e) => {
499
+ c.isUsingKeyboardRef.current && u.current?.focus(), e.preventDefault();
500
+ },
501
+ onCloseAutoFocus: (e) => e.preventDefault(),
502
+ onFocusOutside: t(e.onFocusOutside, (e) => {
503
+ e.target !== l.trigger && s.onOpenChange(!1);
504
+ }),
505
+ onEscapeKeyDown: t(e.onEscapeKeyDown, (e) => {
506
+ c.onClose(), e.preventDefault();
507
+ }),
508
+ onKeyDown: t(e.onKeyDown, (e) => {
509
+ let t = e.currentTarget.contains(e.target), n = R[c.dir].includes(e.key);
510
+ t && n && (s.onOpenChange(!1), l.trigger?.focus(), e.preventDefault());
511
+ })
512
+ })
513
+ })
514
+ })
515
+ });
516
+ });
517
+ $e.displayName = Qe;
518
+ function et(e) {
519
+ return e ? "open" : "closed";
520
+ }
521
+ function X(e) {
522
+ return e === "indeterminate";
523
+ }
524
+ function tt(e) {
525
+ return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
526
+ }
527
+ function nt(e) {
528
+ let t = document.activeElement;
529
+ for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
530
+ }
531
+ function rt(e, t) {
532
+ return e.map((n, r) => e[(t + r) % e.length]);
533
+ }
534
+ function it(e, t, n) {
535
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = rt(e, Math.max(i, 0));
536
+ r.length === 1 && (a = a.filter((e) => e !== n));
537
+ let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
538
+ return o === n ? void 0 : o;
539
+ }
540
+ function at(e, t) {
541
+ let { x: n, y: r } = e, i = !1;
542
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
543
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
544
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
545
+ }
546
+ return i;
547
+ }
548
+ function ot(e, t) {
549
+ return t ? at({
550
+ x: e.clientX,
551
+ y: e.clientY
552
+ }, t) : !1;
553
+ }
554
+ function Z(e) {
555
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
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({
559
+ prop: i,
560
+ defaultProp: a ?? !1,
561
+ onChange: o,
562
+ caller: Q
563
+ });
564
+ return /* @__PURE__ */ j(wt, {
565
+ scope: t,
566
+ triggerId: f(),
567
+ triggerRef: u,
568
+ contentId: f(),
569
+ open: d,
570
+ onOpenChange: p,
571
+ onOpenToggle: A.useCallback(() => p((e) => !e), [p]),
572
+ modal: c,
573
+ children: /* @__PURE__ */ j(st, {
574
+ ...l,
575
+ open: d,
576
+ onOpenChange: p,
577
+ dir: r,
578
+ modal: c,
579
+ children: n
580
+ })
581
+ });
582
+ };
583
+ Et.displayName = Q;
584
+ var Dt = "DropdownMenuTrigger", Ot = A.forwardRef((e, r) => {
585
+ let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Tt(Dt, i);
586
+ return /* @__PURE__ */ j(ct, {
587
+ asChild: !0,
588
+ ...$(i),
589
+ children: /* @__PURE__ */ j(c.button, {
590
+ type: "button",
591
+ id: s.triggerId,
592
+ "aria-haspopup": "menu",
593
+ "aria-expanded": s.open,
594
+ "aria-controls": s.open ? s.contentId : void 0,
595
+ "data-state": s.open ? "open" : "closed",
596
+ "data-disabled": a ? "" : void 0,
597
+ disabled: a,
598
+ ...o,
599
+ ref: n(r, s.triggerRef),
600
+ onPointerDown: t(e.onPointerDown, (e) => {
601
+ !a && e.button === 0 && e.ctrlKey === !1 && (s.onOpenToggle(), s.open || e.preventDefault());
602
+ }),
603
+ onKeyDown: t(e.onKeyDown, (e) => {
604
+ a || (["Enter", " "].includes(e.key) && s.onOpenToggle(), e.key === "ArrowDown" && s.onOpenChange(!0), [
605
+ "Enter",
606
+ " ",
607
+ "ArrowDown"
608
+ ].includes(e.key) && e.preventDefault());
609
+ })
610
+ })
611
+ });
612
+ });
613
+ Ot.displayName = Dt;
614
+ var kt = "DropdownMenuPortal", At = (e) => {
615
+ let { __scopeDropdownMenu: t, ...n } = e;
616
+ return /* @__PURE__ */ j(lt, {
617
+ ...$(t),
618
+ ...n
619
+ });
620
+ };
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, {
625
+ id: a.contentId,
626
+ "aria-labelledby": a.triggerId,
627
+ ...o,
628
+ ...i,
629
+ ref: n,
630
+ onCloseAutoFocus: t(e.onCloseAutoFocus, (e) => {
631
+ s.current || a.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
632
+ }),
633
+ onInteractOutside: t(e.onInteractOutside, (e) => {
634
+ let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
635
+ (!a.modal || r) && (s.current = !0);
636
+ }),
637
+ style: {
638
+ ...e.style,
639
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
640
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
641
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
642
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
643
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
644
+ }
645
+ });
646
+ });
647
+ Mt.displayName = jt;
648
+ var Nt = "DropdownMenuGroup", Pt = A.forwardRef((e, t) => {
649
+ let { __scopeDropdownMenu: n, ...r } = e;
650
+ return /* @__PURE__ */ j(dt, {
651
+ ...$(n),
652
+ ...r,
653
+ ref: t
654
+ });
655
+ });
656
+ Pt.displayName = Nt;
657
+ var Ft = "DropdownMenuLabel", It = A.forwardRef((e, t) => {
658
+ let { __scopeDropdownMenu: n, ...r } = e;
659
+ return /* @__PURE__ */ j(ft, {
660
+ ...$(n),
661
+ ...r,
662
+ ref: t
663
+ });
664
+ });
665
+ It.displayName = Ft;
666
+ var Lt = "DropdownMenuItem", Rt = A.forwardRef((e, t) => {
667
+ let { __scopeDropdownMenu: n, ...r } = e;
668
+ return /* @__PURE__ */ j(pt, {
669
+ ...$(n),
670
+ ...r,
671
+ ref: t
672
+ });
673
+ });
674
+ Rt.displayName = Lt;
675
+ var zt = "DropdownMenuCheckboxItem", Bt = A.forwardRef((e, t) => {
676
+ let { __scopeDropdownMenu: n, ...r } = e;
677
+ return /* @__PURE__ */ j(mt, {
678
+ ...$(n),
679
+ ...r,
680
+ ref: t
681
+ });
682
+ });
683
+ Bt.displayName = zt;
684
+ var Vt = "DropdownMenuRadioGroup", Ht = A.forwardRef((e, t) => {
685
+ let { __scopeDropdownMenu: n, ...r } = e;
686
+ return /* @__PURE__ */ j(ht, {
687
+ ...$(n),
688
+ ...r,
689
+ ref: t
690
+ });
691
+ });
692
+ Ht.displayName = Vt;
693
+ var Ut = "DropdownMenuRadioItem", Wt = A.forwardRef((e, t) => {
694
+ let { __scopeDropdownMenu: n, ...r } = e;
695
+ return /* @__PURE__ */ j(gt, {
696
+ ...$(n),
697
+ ...r,
698
+ ref: t
699
+ });
700
+ });
701
+ Wt.displayName = Ut;
702
+ var Gt = "DropdownMenuItemIndicator", Kt = A.forwardRef((e, t) => {
703
+ let { __scopeDropdownMenu: n, ...r } = e;
704
+ return /* @__PURE__ */ j(_t, {
705
+ ...$(n),
706
+ ...r,
707
+ ref: t
708
+ });
709
+ });
710
+ Kt.displayName = Gt;
711
+ var qt = "DropdownMenuSeparator", Jt = A.forwardRef((e, t) => {
712
+ let { __scopeDropdownMenu: n, ...r } = e;
713
+ return /* @__PURE__ */ j(vt, {
714
+ ...$(n),
715
+ ...r,
716
+ ref: t
717
+ });
718
+ });
719
+ Jt.displayName = qt;
720
+ var Yt = "DropdownMenuArrow", Xt = A.forwardRef((e, t) => {
721
+ let { __scopeDropdownMenu: n, ...r } = e;
722
+ return /* @__PURE__ */ j(yt, {
723
+ ...$(n),
724
+ ...r,
725
+ ref: t
726
+ });
727
+ });
728
+ Xt.displayName = Yt;
729
+ var Zt = "DropdownMenuSubTrigger", Qt = A.forwardRef((e, t) => {
730
+ let { __scopeDropdownMenu: n, ...r } = e;
731
+ return /* @__PURE__ */ j(bt, {
732
+ ...$(n),
733
+ ...r,
734
+ ref: t
735
+ });
736
+ });
737
+ Qt.displayName = Zt;
738
+ var $t = "DropdownMenuSubContent", en = A.forwardRef((e, t) => {
739
+ let { __scopeDropdownMenu: n, ...r } = e;
740
+ return /* @__PURE__ */ j(xt, {
741
+ ...$(n),
742
+ ...r,
743
+ ref: t,
744
+ style: {
745
+ ...e.style,
746
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
747
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
748
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
749
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
750
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
751
+ }
752
+ });
753
+ });
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,
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
+ onChange: ne
764
+ }), { dropdownWidthMode: R, dropdownWidthStyle: z } = _({
765
+ dropdownWidth: b,
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") {
769
+ let t = Array.isArray(I) ? I : [];
770
+ L(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
771
+ return;
772
+ }
773
+ L(e), A(!1);
774
+ }, H = (t, n) => {
775
+ if (t.type === "separator") return /* @__PURE__ */ j(un, {
776
+ className: "-mx-1 my-1 h-px bg-border-secondary",
777
+ "data-testid": "spectral-dropdown-menu-separator"
778
+ }, t.id ?? `separator-${n}`);
779
+ if (t.type === "label") return /* @__PURE__ */ j(on, {
780
+ className: "px-2 py-1.5 text-base font-semibold text-text-primary",
781
+ "data-testid": "spectral-dropdown-menu-label",
782
+ children: t.label
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, {
786
+ checked: r,
787
+ className: i,
788
+ "data-testid": "spectral-dropdown-menu-checkbox-item",
789
+ disabled: t.disabled,
790
+ onCheckedChange: () => V(t.value),
791
+ onSelect: (e) => e.preventDefault(),
792
+ children: [
793
+ /* @__PURE__ */ j("span", {
794
+ className: "min-w-0 flex-1 truncate whitespace-nowrap",
795
+ children: t.label
796
+ }),
797
+ t.shortcut && /* @__PURE__ */ j("span", {
798
+ className: "text-xs tracking-widest ml-auto text-input-text-placeholder",
799
+ children: t.shortcut
800
+ }),
801
+ /* @__PURE__ */ j("span", {
802
+ "aria-hidden": "true",
803
+ className: "ml-2 size-4 flex shrink-0 items-center justify-center",
804
+ children: /* @__PURE__ */ j(ln, {
805
+ asChild: !0,
806
+ children: /* @__PURE__ */ j("span", {
807
+ className: "size-4 flex items-center justify-center",
808
+ children: /* @__PURE__ */ j(e, { size: 16 })
809
+ })
810
+ })
811
+ })
812
+ ]
813
+ }, t.value) : /* @__PURE__ */ M(sn, {
814
+ className: i,
815
+ "data-testid": "spectral-dropdown-menu-item",
816
+ disabled: t.disabled,
817
+ onSelect: () => V(t.value),
818
+ children: [
819
+ /* @__PURE__ */ j("span", {
820
+ className: "min-w-0 flex-1 truncate whitespace-nowrap",
821
+ children: t.label
822
+ }),
823
+ t.shortcut && /* @__PURE__ */ j("span", {
824
+ className: "text-xs tracking-widest ml-auto text-input-text-placeholder",
825
+ children: t.shortcut
826
+ }),
827
+ /* @__PURE__ */ j("span", {
828
+ "aria-hidden": "true",
829
+ className: "ml-2 size-4 flex shrink-0 items-center justify-center",
830
+ children: r && /* @__PURE__ */ j(e, { size: 16 })
831
+ })
832
+ ]
833
+ }, t.value);
834
+ };
835
+ return /* @__PURE__ */ M(tn, {
836
+ modal: te,
837
+ onOpenChange: A,
838
+ open: k,
839
+ children: [/* @__PURE__ */ j(nn, {
840
+ asChild: n,
841
+ className: p(a, "transition-opacity duration-200 hover:cursor-pointer hover:opacity-80"),
842
+ "data-testid": l ?? "spectral-dropdown-menu-trigger",
843
+ disabled: B,
844
+ children: ae
845
+ }), /* @__PURE__ */ j(rn, { children: /* @__PURE__ */ j(an, {
846
+ align: t,
847
+ alignOffset: r,
848
+ avoidCollisions: i,
849
+ 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),
850
+ collisionBoundary: o,
851
+ collisionPadding: s,
852
+ "data-dropdown-width-mode": R,
853
+ "data-dropdown-width-value": R === "custom" ? b : void 0,
854
+ "data-testid": "spectral-dropdown-menu-content",
855
+ ref: P,
856
+ side: T,
857
+ sideOffset: ie,
858
+ style: {
859
+ ...z,
860
+ ...N
861
+ },
862
+ children: E === "loading" ? /* @__PURE__ */ j(h, { message: x }) : oe.length === 0 ? /* @__PURE__ */ j(m, { message: ee }) : C.map(H)
863
+ }) })]
864
+ });
865
+ };
866
+ pn.displayName = "DropdownMenu";
867
+ //#endregion
868
+ export { pn as t };