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