highsoft-ui 1.0.126 → 1.0.128

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 (61) hide show
  1. package/dist/{Button-CJp__tle.js → Button-FtTHXgq3.js} +1 -1
  2. package/dist/{ButtonGroup-CfNp_xXf.js → ButtonGroup-eZng2GQy.js} +1 -1
  3. package/dist/Checkbox-CMWwWnbI.js +153 -0
  4. package/dist/{CookiePolicyModal-BN_AXefZ.js → CookiePolicyModal-_zwtaOvm.js} +3 -3
  5. package/dist/{CopyCode-BLXf0o74.js → CopyCode-C7iHMVIg.js} +2 -2
  6. package/dist/Dropdown-B6J7ph3w.js +817 -0
  7. package/dist/{Footer-BsddrH6J.js → Footer-Q3Z-Synu.js} +8 -8
  8. package/dist/{FooterBottom-ybvI6wyw.js → FooterBottom-Dbr8oMdf.js} +1 -1
  9. package/dist/{FooterHelp-D88w95D4.js → FooterHelp-BsApOrYf.js} +1 -1
  10. package/dist/{FooterLinks-B8QP6uKP.js → FooterLinks-Dx7GBu-X.js} +2 -2
  11. package/dist/{Header-B8todalU.js → Header-DxauB1pI.js} +41 -41
  12. package/dist/{InputGrouped-jbMns5qa.js → InputGrouped-B9jyncxb.js} +13 -13
  13. package/dist/{Label-bbLlUYRM.js → Label-BHGkcLu9.js} +1 -1
  14. package/dist/{NewsletterSignup-DEgL93rH.js → NewsletterSignup-jPKQLKvl.js} +4 -4
  15. package/dist/{Notification-CuVjbJzV.js → Notification-CO-mX_7b.js} +3 -3
  16. package/dist/PrefPanel-D-xcKbcr.js +253 -0
  17. package/dist/{Search-BcX6xtAY.js → Search-DokUD0o9.js} +972 -1171
  18. package/dist/{YoutubeModal-C58qsc27.js → YoutubeModal-T25hkIhQ.js} +3 -3
  19. package/dist/components/Button/index.js +1 -1
  20. package/dist/components/ButtonGroup/index.js +1 -1
  21. package/dist/components/Checkbox/index.js +2 -0
  22. package/dist/components/CopyCode/index.js +1 -1
  23. package/dist/components/Dropdown/index.js +2 -0
  24. package/dist/components/Footer/CookiePolicyModal.js +1 -1
  25. package/dist/components/Footer/FooterBottom.js +1 -1
  26. package/dist/components/Footer/FooterHelp.js +1 -1
  27. package/dist/components/Footer/FooterLinks.js +1 -1
  28. package/dist/components/Footer/YoutubeModal.js +1 -1
  29. package/dist/components/Footer/index.js +1 -1
  30. package/dist/components/GPTInput/index.js +1 -1
  31. package/dist/components/Header/index.js +1 -1
  32. package/dist/components/InputGrouped/index.js +1 -1
  33. package/dist/components/Label/index.js +1 -1
  34. package/dist/components/Modal/ModalContactFooter.js +37 -0
  35. package/dist/components/Modal/index.js +94 -0
  36. package/dist/components/NewsletterSignup/index.js +1 -1
  37. package/dist/components/Notification/index.js +1 -1
  38. package/dist/components/PrefPanel/index.js +1 -1
  39. package/dist/components/RadioBox/index.js +1 -1
  40. package/dist/components/Search/index.js +1 -1
  41. package/dist/components/Tabs/index.js +1 -1
  42. package/dist/{dist-O77K9Ele.js → dist-9h8Pur86.js} +62 -62
  43. package/dist/dist-BMBUb7XY.js +208 -0
  44. package/dist/dist-MBZ50zVE.js +1303 -0
  45. package/dist/{dist-D4rcQ6qo.js → dist-SfVqm611.js} +1 -1
  46. package/dist/{es2015-BE1Gei7w.js → es2015-CJyFgdNb.js} +1 -1
  47. package/dist/{esm-T3Xn_ZHF.js → esm-vjQoQCu2.js} +46 -18
  48. package/dist/highsoft-ui.css +1 -1
  49. package/dist/lib/components/Checkbox/index.d.ts +54 -0
  50. package/dist/lib/components/Dropdown/index.d.ts +67 -0
  51. package/dist/lib/components/Modal/ModalContactFooter.d.ts +21 -0
  52. package/dist/lib/components/Modal/index.d.ts +41 -0
  53. package/dist/lib/main.d.ts +8 -0
  54. package/dist/main.js +19 -15
  55. package/dist/scss/variables.scss +84 -0
  56. package/dist/styles.module-BZplfYRW.js +17 -0
  57. package/package.json +1 -1
  58. package/dist/PrefPanel-CPWoS-hm.js +0 -1548
  59. /package/dist/{GPTInput-CZF0-SfI.js → GPTInput-Cgu6_F53.js} +0 -0
  60. /package/dist/{RadioBox-C_KZn7fw.js → RadioBox-B9rLrNTK.js} +0 -0
  61. /package/dist/{Tabs-CNkFaolf.js → Tabs-DanjfIHP.js} +0 -0
@@ -0,0 +1,817 @@
1
+ import { t as e } from "./clsx-D7D_XZ_-.js";
2
+ import { F as t } from "./esm-vjQoQCu2.js";
3
+ import { t as n } from "./Icon-Dwo9ZDNX.js";
4
+ import { _ as r, a as i, c as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, r as m, s as h, t as ee, u as g, v as _, y as v } from "./es2015-CJyFgdNb.js";
5
+ import { a as y, i as b, n as te, r as x, t as S } from "./dist-BMBUb7XY.js";
6
+ import { a as ne, i as re, n as ie, r as ae, t as oe } from "./dist-MBZ50zVE.js";
7
+ import * as C from "react";
8
+ import { createContext as w, useContext as T } from "react";
9
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
10
+ //#region node_modules/@radix-ui/react-menu/dist/index.mjs
11
+ var O = ["Enter", " "], k = [
12
+ "ArrowDown",
13
+ "PageUp",
14
+ "Home"
15
+ ], se = [
16
+ "ArrowUp",
17
+ "PageDown",
18
+ "End"
19
+ ], ce = [...k, ...se], le = {
20
+ ltr: [...O, "ArrowRight"],
21
+ rtl: [...O, "ArrowLeft"]
22
+ }, A = {
23
+ ltr: ["ArrowLeft"],
24
+ rtl: ["ArrowRight"]
25
+ }, j = "Menu", [M, ue, de] = y(j), [N, P] = d(j, [
26
+ de,
27
+ ne,
28
+ x
29
+ ]), F = ne(), fe = x(), [I, L] = N(j), [pe, R] = N(j), me = (e) => {
30
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = F(t), [c, l] = C.useState(null), u = C.useRef(!1), d = h(a), f = b(i);
31
+ return C.useEffect(() => {
32
+ let e = () => {
33
+ u.current = !0, document.addEventListener("pointerdown", t, {
34
+ capture: !0,
35
+ once: !0
36
+ }), document.addEventListener("pointermove", t, {
37
+ capture: !0,
38
+ once: !0
39
+ });
40
+ }, t = () => u.current = !1;
41
+ return document.addEventListener("keydown", e, { capture: !0 }), () => {
42
+ document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
43
+ };
44
+ }, []), /* @__PURE__ */ E(re, {
45
+ ...s,
46
+ children: /* @__PURE__ */ E(I, {
47
+ scope: t,
48
+ open: n,
49
+ onOpenChange: d,
50
+ content: c,
51
+ onContentChange: l,
52
+ children: /* @__PURE__ */ E(pe, {
53
+ scope: t,
54
+ onClose: C.useCallback(() => d(!1), [d]),
55
+ isUsingKeyboardRef: u,
56
+ dir: f,
57
+ modal: o,
58
+ children: r
59
+ })
60
+ })
61
+ });
62
+ };
63
+ me.displayName = j;
64
+ var he = "MenuAnchor", z = C.forwardRef((e, t) => {
65
+ let { __scopeMenu: n, ...r } = e;
66
+ return /* @__PURE__ */ E(oe, {
67
+ ...F(n),
68
+ ...r,
69
+ ref: t
70
+ });
71
+ });
72
+ z.displayName = he;
73
+ var B = "MenuPortal", [ge, _e] = N(B, { forceMount: void 0 }), ve = (e) => {
74
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = L(B, t);
75
+ return /* @__PURE__ */ E(ge, {
76
+ scope: t,
77
+ forceMount: n,
78
+ children: /* @__PURE__ */ E(u, {
79
+ present: n || a.open,
80
+ children: /* @__PURE__ */ E(l, {
81
+ asChild: !0,
82
+ container: i,
83
+ children: r
84
+ })
85
+ })
86
+ });
87
+ };
88
+ ve.displayName = B;
89
+ var V = "MenuContent", [ye, H] = N(V), be = C.forwardRef((e, t) => {
90
+ let n = _e(V, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = L(V, e.__scopeMenu), o = R(V, e.__scopeMenu);
91
+ return /* @__PURE__ */ E(M.Provider, {
92
+ scope: e.__scopeMenu,
93
+ children: /* @__PURE__ */ E(u, {
94
+ present: r || a.open,
95
+ children: /* @__PURE__ */ E(M.Slot, {
96
+ scope: e.__scopeMenu,
97
+ children: o.modal ? /* @__PURE__ */ E(xe, {
98
+ ...i,
99
+ ref: t
100
+ }) : /* @__PURE__ */ E(Se, {
101
+ ...i,
102
+ ref: t
103
+ })
104
+ })
105
+ })
106
+ });
107
+ }), xe = C.forwardRef((e, t) => {
108
+ let n = L(V, e.__scopeMenu), r = C.useRef(null), i = v(t, r);
109
+ return C.useEffect(() => {
110
+ let e = r.current;
111
+ if (e) return ee(e);
112
+ }, []), /* @__PURE__ */ E(U, {
113
+ ...e,
114
+ ref: i,
115
+ trapFocus: n.open,
116
+ disableOutsidePointerEvents: n.open,
117
+ disableOutsideScroll: !0,
118
+ onFocusOutside: o(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
119
+ onDismiss: () => n.onOpenChange(!1)
120
+ });
121
+ }), Se = C.forwardRef((e, t) => {
122
+ let n = L(V, e.__scopeMenu);
123
+ return /* @__PURE__ */ E(U, {
124
+ ...e,
125
+ ref: t,
126
+ trapFocus: !1,
127
+ disableOutsidePointerEvents: !1,
128
+ disableOutsideScroll: !1,
129
+ onDismiss: () => n.onOpenChange(!1)
130
+ });
131
+ }), Ce = r("MenuContent.ScrollLock"), U = C.forwardRef((e, t) => {
132
+ let { __scopeMenu: n, loop: r = !1, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: h, onFocusOutside: ee, onInteractOutside: g, onDismiss: _, disableOutsideScroll: y, ...b } = e, x = L(V, n), S = R(V, n), ne = F(n), re = fe(n), ie = ue(n), [oe, w] = C.useState(null), T = C.useRef(null), D = v(t, T, x.onContentChange), O = C.useRef(0), k = C.useRef(""), le = C.useRef(0), A = C.useRef(null), j = C.useRef("right"), M = C.useRef(0), de = y ? f : C.Fragment, N = y ? {
133
+ as: Ce,
134
+ allowPinchZoom: !0
135
+ } : void 0, P = (e) => {
136
+ let t = k.current + e, n = ie().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = tt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
137
+ (function e(t) {
138
+ k.current = t, window.clearTimeout(O.current), t !== "" && (O.current = window.setTimeout(() => e(""), 1e3));
139
+ })(t), o && setTimeout(() => o.focus());
140
+ };
141
+ C.useEffect(() => () => window.clearTimeout(O.current), []), m();
142
+ let I = C.useCallback((e) => j.current === A.current?.side && rt(e, A.current?.area), []);
143
+ return /* @__PURE__ */ E(ye, {
144
+ scope: n,
145
+ searchRef: k,
146
+ onItemEnter: C.useCallback((e) => {
147
+ I(e) && e.preventDefault();
148
+ }, [I]),
149
+ onItemLeave: C.useCallback((e) => {
150
+ I(e) || (T.current?.focus(), w(null));
151
+ }, [I]),
152
+ onTriggerLeave: C.useCallback((e) => {
153
+ I(e) && e.preventDefault();
154
+ }, [I]),
155
+ pointerGraceTimerRef: le,
156
+ onPointerGraceIntentChange: C.useCallback((e) => {
157
+ A.current = e;
158
+ }, []),
159
+ children: /* @__PURE__ */ E(de, {
160
+ ...N,
161
+ children: /* @__PURE__ */ E(i, {
162
+ asChild: !0,
163
+ trapped: a,
164
+ onMountAutoFocus: o(s, (e) => {
165
+ e.preventDefault(), T.current?.focus({ preventScroll: !0 });
166
+ }),
167
+ onUnmountAutoFocus: c,
168
+ children: /* @__PURE__ */ E(p, {
169
+ asChild: !0,
170
+ disableOutsidePointerEvents: l,
171
+ onEscapeKeyDown: d,
172
+ onPointerDownOutside: h,
173
+ onFocusOutside: ee,
174
+ onInteractOutside: g,
175
+ onDismiss: _,
176
+ children: /* @__PURE__ */ E(te, {
177
+ asChild: !0,
178
+ ...re,
179
+ dir: S.dir,
180
+ orientation: "vertical",
181
+ loop: r,
182
+ currentTabStopId: oe,
183
+ onCurrentTabStopIdChange: w,
184
+ onEntryFocus: o(u, (e) => {
185
+ S.isUsingKeyboardRef.current || e.preventDefault();
186
+ }),
187
+ preventScrollOnEntryFocus: !0,
188
+ children: /* @__PURE__ */ E(ae, {
189
+ role: "menu",
190
+ "aria-orientation": "vertical",
191
+ "data-state": Ze(x.open),
192
+ "data-radix-menu-content": "",
193
+ dir: S.dir,
194
+ ...ne,
195
+ ...b,
196
+ ref: D,
197
+ style: {
198
+ outline: "none",
199
+ ...b.style
200
+ },
201
+ onKeyDown: o(b.onKeyDown, (e) => {
202
+ let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
203
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && P(e.key));
204
+ let i = T.current;
205
+ if (e.target !== i || !ce.includes(e.key)) return;
206
+ e.preventDefault();
207
+ let a = ie().filter((e) => !e.disabled).map((e) => e.ref.current);
208
+ se.includes(e.key) && a.reverse(), $e(a);
209
+ }),
210
+ onBlur: o(e.onBlur, (e) => {
211
+ e.currentTarget.contains(e.target) || (window.clearTimeout(O.current), k.current = "");
212
+ }),
213
+ onPointerMove: o(e.onPointerMove, X((e) => {
214
+ let t = e.target, n = M.current !== e.clientX;
215
+ e.currentTarget.contains(t) && n && (j.current = e.clientX > M.current ? "right" : "left", M.current = e.clientX);
216
+ }))
217
+ })
218
+ })
219
+ })
220
+ })
221
+ })
222
+ });
223
+ });
224
+ be.displayName = V;
225
+ var we = "MenuGroup", W = C.forwardRef((e, t) => {
226
+ let { __scopeMenu: n, ...r } = e;
227
+ return /* @__PURE__ */ E(c.div, {
228
+ role: "group",
229
+ ...r,
230
+ ref: t
231
+ });
232
+ });
233
+ W.displayName = we;
234
+ var Te = "MenuLabel", Ee = C.forwardRef((e, t) => {
235
+ let { __scopeMenu: n, ...r } = e;
236
+ return /* @__PURE__ */ E(c.div, {
237
+ ...r,
238
+ ref: t
239
+ });
240
+ });
241
+ Ee.displayName = Te;
242
+ var G = "MenuItem", De = "menu.itemSelect", K = C.forwardRef((e, t) => {
243
+ let { disabled: n = !1, onSelect: r, ...i } = e, a = C.useRef(null), c = R(G, e.__scopeMenu), l = H(G, e.__scopeMenu), u = v(t, a), d = C.useRef(!1), f = () => {
244
+ let e = a.current;
245
+ if (!n && e) {
246
+ let t = new CustomEvent(De, {
247
+ bubbles: !0,
248
+ cancelable: !0
249
+ });
250
+ e.addEventListener(De, (e) => r?.(e), { once: !0 }), s(e, t), t.defaultPrevented ? d.current = !1 : c.onClose();
251
+ }
252
+ };
253
+ return /* @__PURE__ */ E(Oe, {
254
+ ...i,
255
+ ref: u,
256
+ disabled: n,
257
+ onClick: o(e.onClick, f),
258
+ onPointerDown: (t) => {
259
+ e.onPointerDown?.(t), d.current = !0;
260
+ },
261
+ onPointerUp: o(e.onPointerUp, (e) => {
262
+ d.current || e.currentTarget?.click();
263
+ }),
264
+ onKeyDown: o(e.onKeyDown, (e) => {
265
+ let t = l.searchRef.current !== "";
266
+ n || t && e.key === " " || O.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
267
+ })
268
+ });
269
+ });
270
+ K.displayName = G;
271
+ var Oe = C.forwardRef((e, t) => {
272
+ let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, s = H(G, n), l = fe(n), u = C.useRef(null), d = v(t, u), [f, p] = C.useState(!1), [m, h] = C.useState("");
273
+ return C.useEffect(() => {
274
+ let e = u.current;
275
+ e && h((e.textContent ?? "").trim());
276
+ }, [a.children]), /* @__PURE__ */ E(M.ItemSlot, {
277
+ scope: n,
278
+ disabled: r,
279
+ textValue: i ?? m,
280
+ children: /* @__PURE__ */ E(S, {
281
+ asChild: !0,
282
+ ...l,
283
+ focusable: !r,
284
+ children: /* @__PURE__ */ E(c.div, {
285
+ role: "menuitem",
286
+ "data-highlighted": f ? "" : void 0,
287
+ "aria-disabled": r || void 0,
288
+ "data-disabled": r ? "" : void 0,
289
+ ...a,
290
+ ref: d,
291
+ onPointerMove: o(e.onPointerMove, X((e) => {
292
+ r ? s.onItemLeave(e) : (s.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
293
+ })),
294
+ onPointerLeave: o(e.onPointerLeave, X((e) => s.onItemLeave(e))),
295
+ onFocus: o(e.onFocus, () => p(!0)),
296
+ onBlur: o(e.onBlur, () => p(!1))
297
+ })
298
+ })
299
+ });
300
+ }), ke = "MenuCheckboxItem", Ae = C.forwardRef((e, t) => {
301
+ let { checked: n = !1, onCheckedChange: r, ...i } = e;
302
+ return /* @__PURE__ */ E(Le, {
303
+ scope: e.__scopeMenu,
304
+ checked: n,
305
+ children: /* @__PURE__ */ E(K, {
306
+ role: "menuitemcheckbox",
307
+ "aria-checked": Y(n) ? "mixed" : n,
308
+ ...i,
309
+ ref: t,
310
+ "data-state": Qe(n),
311
+ onSelect: o(i.onSelect, () => r?.(Y(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
312
+ })
313
+ });
314
+ });
315
+ Ae.displayName = ke;
316
+ var je = "MenuRadioGroup", [Me, Ne] = N(je, {
317
+ value: void 0,
318
+ onValueChange: () => {}
319
+ }), Pe = C.forwardRef((e, t) => {
320
+ let { value: n, onValueChange: r, ...i } = e, a = h(r);
321
+ return /* @__PURE__ */ E(Me, {
322
+ scope: e.__scopeMenu,
323
+ value: n,
324
+ onValueChange: a,
325
+ children: /* @__PURE__ */ E(W, {
326
+ ...i,
327
+ ref: t
328
+ })
329
+ });
330
+ });
331
+ Pe.displayName = je;
332
+ var Fe = "MenuRadioItem", Ie = C.forwardRef((e, t) => {
333
+ let { value: n, ...r } = e, i = Ne(Fe, e.__scopeMenu), a = n === i.value;
334
+ return /* @__PURE__ */ E(Le, {
335
+ scope: e.__scopeMenu,
336
+ checked: a,
337
+ children: /* @__PURE__ */ E(K, {
338
+ role: "menuitemradio",
339
+ "aria-checked": a,
340
+ ...r,
341
+ ref: t,
342
+ "data-state": Qe(a),
343
+ onSelect: o(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
344
+ })
345
+ });
346
+ });
347
+ Ie.displayName = Fe;
348
+ var q = "MenuItemIndicator", [Le, Re] = N(q, { checked: !1 }), ze = C.forwardRef((e, t) => {
349
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = Re(q, n);
350
+ return /* @__PURE__ */ E(u, {
351
+ present: r || Y(a.checked) || a.checked === !0,
352
+ children: /* @__PURE__ */ E(c.span, {
353
+ ...i,
354
+ ref: t,
355
+ "data-state": Qe(a.checked)
356
+ })
357
+ });
358
+ });
359
+ ze.displayName = q;
360
+ var Be = "MenuSeparator", Ve = C.forwardRef((e, t) => {
361
+ let { __scopeMenu: n, ...r } = e;
362
+ return /* @__PURE__ */ E(c.div, {
363
+ role: "separator",
364
+ "aria-orientation": "horizontal",
365
+ ...r,
366
+ ref: t
367
+ });
368
+ });
369
+ Ve.displayName = Be;
370
+ var He = "MenuArrow", Ue = C.forwardRef((e, t) => {
371
+ let { __scopeMenu: n, ...r } = e;
372
+ return /* @__PURE__ */ E(ie, {
373
+ ...F(n),
374
+ ...r,
375
+ ref: t
376
+ });
377
+ });
378
+ Ue.displayName = He;
379
+ var We = "MenuSub", [Ge, Ke] = N(We), qe = (e) => {
380
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, o = L(We, t), s = F(t), [c, l] = C.useState(null), [u, d] = C.useState(null), f = h(i);
381
+ return C.useEffect(() => (o.open === !1 && f(!1), () => f(!1)), [o.open, f]), /* @__PURE__ */ E(re, {
382
+ ...s,
383
+ children: /* @__PURE__ */ E(I, {
384
+ scope: t,
385
+ open: r,
386
+ onOpenChange: f,
387
+ content: u,
388
+ onContentChange: d,
389
+ children: /* @__PURE__ */ E(Ge, {
390
+ scope: t,
391
+ contentId: a(),
392
+ triggerId: a(),
393
+ trigger: c,
394
+ onTriggerChange: l,
395
+ children: n
396
+ })
397
+ })
398
+ });
399
+ };
400
+ qe.displayName = We;
401
+ var J = "MenuSubTrigger", Je = C.forwardRef((e, t) => {
402
+ let n = L(J, e.__scopeMenu), r = R(J, e.__scopeMenu), i = Ke(J, e.__scopeMenu), a = H(J, e.__scopeMenu), s = C.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: l } = a, u = { __scopeMenu: e.__scopeMenu }, d = C.useCallback(() => {
403
+ s.current && window.clearTimeout(s.current), s.current = null;
404
+ }, []);
405
+ return C.useEffect(() => d, [d]), C.useEffect(() => {
406
+ let e = c.current;
407
+ return () => {
408
+ window.clearTimeout(e), l(null);
409
+ };
410
+ }, [c, l]), /* @__PURE__ */ E(z, {
411
+ asChild: !0,
412
+ ...u,
413
+ children: /* @__PURE__ */ E(Oe, {
414
+ id: i.triggerId,
415
+ "aria-haspopup": "menu",
416
+ "aria-expanded": n.open,
417
+ "aria-controls": i.contentId,
418
+ "data-state": Ze(n.open),
419
+ ...e,
420
+ ref: _(t, i.onTriggerChange),
421
+ onClick: (t) => {
422
+ e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), n.open || n.onOpenChange(!0));
423
+ },
424
+ onPointerMove: o(e.onPointerMove, X((t) => {
425
+ a.onItemEnter(t), !t.defaultPrevented && !e.disabled && !n.open && !s.current && (a.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
426
+ n.onOpenChange(!0), d();
427
+ }, 100));
428
+ })),
429
+ onPointerLeave: o(e.onPointerLeave, X((e) => {
430
+ d();
431
+ let t = n.content?.getBoundingClientRect();
432
+ if (t) {
433
+ let r = n.content?.dataset.side, i = r === "right", o = i ? -5 : 5, s = t[i ? "left" : "right"], l = t[i ? "right" : "left"];
434
+ a.onPointerGraceIntentChange({
435
+ area: [
436
+ {
437
+ x: e.clientX + o,
438
+ y: e.clientY
439
+ },
440
+ {
441
+ x: s,
442
+ y: t.top
443
+ },
444
+ {
445
+ x: l,
446
+ y: t.top
447
+ },
448
+ {
449
+ x: l,
450
+ y: t.bottom
451
+ },
452
+ {
453
+ x: s,
454
+ y: t.bottom
455
+ }
456
+ ],
457
+ side: r
458
+ }), window.clearTimeout(c.current), c.current = window.setTimeout(() => a.onPointerGraceIntentChange(null), 300);
459
+ } else {
460
+ if (a.onTriggerLeave(e), e.defaultPrevented) return;
461
+ a.onPointerGraceIntentChange(null);
462
+ }
463
+ })),
464
+ onKeyDown: o(e.onKeyDown, (t) => {
465
+ let i = a.searchRef.current !== "";
466
+ e.disabled || i && t.key === " " || le[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
467
+ })
468
+ })
469
+ });
470
+ });
471
+ Je.displayName = J;
472
+ var Ye = "MenuSubContent", Xe = C.forwardRef((e, t) => {
473
+ let n = _e(V, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = L(V, e.__scopeMenu), s = R(V, e.__scopeMenu), c = Ke(Ye, e.__scopeMenu), l = C.useRef(null), d = v(t, l);
474
+ return /* @__PURE__ */ E(M.Provider, {
475
+ scope: e.__scopeMenu,
476
+ children: /* @__PURE__ */ E(u, {
477
+ present: r || a.open,
478
+ children: /* @__PURE__ */ E(M.Slot, {
479
+ scope: e.__scopeMenu,
480
+ children: /* @__PURE__ */ E(U, {
481
+ id: c.contentId,
482
+ "aria-labelledby": c.triggerId,
483
+ ...i,
484
+ ref: d,
485
+ align: "start",
486
+ side: s.dir === "rtl" ? "left" : "right",
487
+ disableOutsidePointerEvents: !1,
488
+ disableOutsideScroll: !1,
489
+ trapFocus: !1,
490
+ onOpenAutoFocus: (e) => {
491
+ s.isUsingKeyboardRef.current && l.current?.focus(), e.preventDefault();
492
+ },
493
+ onCloseAutoFocus: (e) => e.preventDefault(),
494
+ onFocusOutside: o(e.onFocusOutside, (e) => {
495
+ e.target !== c.trigger && a.onOpenChange(!1);
496
+ }),
497
+ onEscapeKeyDown: o(e.onEscapeKeyDown, (e) => {
498
+ s.onClose(), e.preventDefault();
499
+ }),
500
+ onKeyDown: o(e.onKeyDown, (e) => {
501
+ let t = e.currentTarget.contains(e.target), n = A[s.dir].includes(e.key);
502
+ t && n && (a.onOpenChange(!1), c.trigger?.focus(), e.preventDefault());
503
+ })
504
+ })
505
+ })
506
+ })
507
+ });
508
+ });
509
+ Xe.displayName = Ye;
510
+ function Ze(e) {
511
+ return e ? "open" : "closed";
512
+ }
513
+ function Y(e) {
514
+ return e === "indeterminate";
515
+ }
516
+ function Qe(e) {
517
+ return Y(e) ? "indeterminate" : e ? "checked" : "unchecked";
518
+ }
519
+ function $e(e) {
520
+ let t = document.activeElement;
521
+ for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
522
+ }
523
+ function et(e, t) {
524
+ return e.map((n, r) => e[(t + r) % e.length]);
525
+ }
526
+ function tt(e, t, n) {
527
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = et(e, Math.max(i, 0));
528
+ r.length === 1 && (a = a.filter((e) => e !== n));
529
+ let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
530
+ return o === n ? void 0 : o;
531
+ }
532
+ function nt(e, t) {
533
+ let { x: n, y: r } = e, i = !1;
534
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
535
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
536
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
537
+ }
538
+ return i;
539
+ }
540
+ function rt(e, t) {
541
+ return t ? nt({
542
+ x: e.clientX,
543
+ y: e.clientY
544
+ }, t) : !1;
545
+ }
546
+ function X(e) {
547
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
548
+ }
549
+ var it = me, at = z, ot = ve, st = be, ct = W, lt = Ee, ut = K, dt = Ae, ft = Pe, pt = Ie, mt = ze, ht = Ve, gt = Ue, _t = Je, vt = Xe, Z = "DropdownMenu", [yt, bt] = d(Z, [P]), Q = P(), [xt, St] = yt(Z), Ct = (e) => {
550
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: o, onOpenChange: s, modal: c = !0 } = e, l = Q(t), u = C.useRef(null), [d, f] = g({
551
+ prop: i,
552
+ defaultProp: o ?? !1,
553
+ onChange: s,
554
+ caller: Z
555
+ });
556
+ return /* @__PURE__ */ E(xt, {
557
+ scope: t,
558
+ triggerId: a(),
559
+ triggerRef: u,
560
+ contentId: a(),
561
+ open: d,
562
+ onOpenChange: f,
563
+ onOpenToggle: C.useCallback(() => f((e) => !e), [f]),
564
+ modal: c,
565
+ children: /* @__PURE__ */ E(it, {
566
+ ...l,
567
+ open: d,
568
+ onOpenChange: f,
569
+ dir: r,
570
+ modal: c,
571
+ children: n
572
+ })
573
+ });
574
+ };
575
+ Ct.displayName = Z;
576
+ var wt = "DropdownMenuTrigger", Tt = C.forwardRef((e, t) => {
577
+ let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = St(wt, n);
578
+ return /* @__PURE__ */ E(at, {
579
+ asChild: !0,
580
+ ...Q(n),
581
+ children: /* @__PURE__ */ E(c.button, {
582
+ type: "button",
583
+ id: a.triggerId,
584
+ "aria-haspopup": "menu",
585
+ "aria-expanded": a.open,
586
+ "aria-controls": a.open ? a.contentId : void 0,
587
+ "data-state": a.open ? "open" : "closed",
588
+ "data-disabled": r ? "" : void 0,
589
+ disabled: r,
590
+ ...i,
591
+ ref: _(t, a.triggerRef),
592
+ onPointerDown: o(e.onPointerDown, (e) => {
593
+ !r && e.button === 0 && e.ctrlKey === !1 && (a.onOpenToggle(), a.open || e.preventDefault());
594
+ }),
595
+ onKeyDown: o(e.onKeyDown, (e) => {
596
+ r || (["Enter", " "].includes(e.key) && a.onOpenToggle(), e.key === "ArrowDown" && a.onOpenChange(!0), [
597
+ "Enter",
598
+ " ",
599
+ "ArrowDown"
600
+ ].includes(e.key) && e.preventDefault());
601
+ })
602
+ })
603
+ });
604
+ });
605
+ Tt.displayName = wt;
606
+ var Et = "DropdownMenuPortal", Dt = (e) => {
607
+ let { __scopeDropdownMenu: t, ...n } = e;
608
+ return /* @__PURE__ */ E(ot, {
609
+ ...Q(t),
610
+ ...n
611
+ });
612
+ };
613
+ Dt.displayName = Et;
614
+ var Ot = "DropdownMenuContent", kt = C.forwardRef((e, t) => {
615
+ let { __scopeDropdownMenu: n, ...r } = e, i = St(Ot, n), a = Q(n), s = C.useRef(!1);
616
+ return /* @__PURE__ */ E(st, {
617
+ id: i.contentId,
618
+ "aria-labelledby": i.triggerId,
619
+ ...a,
620
+ ...r,
621
+ ref: t,
622
+ onCloseAutoFocus: o(e.onCloseAutoFocus, (e) => {
623
+ s.current || i.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
624
+ }),
625
+ onInteractOutside: o(e.onInteractOutside, (e) => {
626
+ let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
627
+ (!i.modal || r) && (s.current = !0);
628
+ }),
629
+ style: {
630
+ ...e.style,
631
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
632
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
633
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
634
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
635
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
636
+ }
637
+ });
638
+ });
639
+ kt.displayName = Ot;
640
+ var At = "DropdownMenuGroup", jt = C.forwardRef((e, t) => {
641
+ let { __scopeDropdownMenu: n, ...r } = e;
642
+ return /* @__PURE__ */ E(ct, {
643
+ ...Q(n),
644
+ ...r,
645
+ ref: t
646
+ });
647
+ });
648
+ jt.displayName = At;
649
+ var Mt = "DropdownMenuLabel", Nt = C.forwardRef((e, t) => {
650
+ let { __scopeDropdownMenu: n, ...r } = e;
651
+ return /* @__PURE__ */ E(lt, {
652
+ ...Q(n),
653
+ ...r,
654
+ ref: t
655
+ });
656
+ });
657
+ Nt.displayName = Mt;
658
+ var Pt = "DropdownMenuItem", Ft = C.forwardRef((e, t) => {
659
+ let { __scopeDropdownMenu: n, ...r } = e;
660
+ return /* @__PURE__ */ E(ut, {
661
+ ...Q(n),
662
+ ...r,
663
+ ref: t
664
+ });
665
+ });
666
+ Ft.displayName = Pt;
667
+ var It = "DropdownMenuCheckboxItem", Lt = C.forwardRef((e, t) => {
668
+ let { __scopeDropdownMenu: n, ...r } = e;
669
+ return /* @__PURE__ */ E(dt, {
670
+ ...Q(n),
671
+ ...r,
672
+ ref: t
673
+ });
674
+ });
675
+ Lt.displayName = It;
676
+ var Rt = "DropdownMenuRadioGroup", zt = C.forwardRef((e, t) => {
677
+ let { __scopeDropdownMenu: n, ...r } = e;
678
+ return /* @__PURE__ */ E(ft, {
679
+ ...Q(n),
680
+ ...r,
681
+ ref: t
682
+ });
683
+ });
684
+ zt.displayName = Rt;
685
+ var Bt = "DropdownMenuRadioItem", Vt = C.forwardRef((e, t) => {
686
+ let { __scopeDropdownMenu: n, ...r } = e;
687
+ return /* @__PURE__ */ E(pt, {
688
+ ...Q(n),
689
+ ...r,
690
+ ref: t
691
+ });
692
+ });
693
+ Vt.displayName = Bt;
694
+ var Ht = "DropdownMenuItemIndicator", Ut = C.forwardRef((e, t) => {
695
+ let { __scopeDropdownMenu: n, ...r } = e;
696
+ return /* @__PURE__ */ E(mt, {
697
+ ...Q(n),
698
+ ...r,
699
+ ref: t
700
+ });
701
+ });
702
+ Ut.displayName = Ht;
703
+ var Wt = "DropdownMenuSeparator", Gt = C.forwardRef((e, t) => {
704
+ let { __scopeDropdownMenu: n, ...r } = e;
705
+ return /* @__PURE__ */ E(ht, {
706
+ ...Q(n),
707
+ ...r,
708
+ ref: t
709
+ });
710
+ });
711
+ Gt.displayName = Wt;
712
+ var Kt = "DropdownMenuArrow", qt = C.forwardRef((e, t) => {
713
+ let { __scopeDropdownMenu: n, ...r } = e;
714
+ return /* @__PURE__ */ E(gt, {
715
+ ...Q(n),
716
+ ...r,
717
+ ref: t
718
+ });
719
+ });
720
+ qt.displayName = Kt;
721
+ var Jt = "DropdownMenuSubTrigger", Yt = C.forwardRef((e, t) => {
722
+ let { __scopeDropdownMenu: n, ...r } = e;
723
+ return /* @__PURE__ */ E(_t, {
724
+ ...Q(n),
725
+ ...r,
726
+ ref: t
727
+ });
728
+ });
729
+ Yt.displayName = Jt;
730
+ var Xt = "DropdownMenuSubContent", Zt = C.forwardRef((e, t) => {
731
+ let { __scopeDropdownMenu: n, ...r } = e;
732
+ return /* @__PURE__ */ E(vt, {
733
+ ...Q(n),
734
+ ...r,
735
+ ref: t,
736
+ style: {
737
+ ...e.style,
738
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
739
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
740
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
741
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
742
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
743
+ }
744
+ });
745
+ });
746
+ Zt.displayName = Xt;
747
+ var Qt = Ct, $t = Tt, en = Dt, tn = kt, nn = Ft, rn = zt, an = Vt, on = Gt, $ = {
748
+ checkIcon: "_0tr6ea_checkIcon",
749
+ content: "_0tr6ea_content",
750
+ "hsui-dropdown-in": "_0tr6ea_hsui-dropdown-in",
751
+ "hsui-dropdown-out": "_0tr6ea_hsui-dropdown-out",
752
+ item: "_0tr6ea_item",
753
+ label: "_0tr6ea_label",
754
+ noCheck: "_0tr6ea_noCheck",
755
+ separator: "_0tr6ea_separator"
756
+ }, sn = w({ closeOnSelect: !1 });
757
+ function cn({ trigger: t, value: n, onValueChange: r, showCheck: i = !0, closeOnSelect: a = !1, options: o, children: s, side: c = "bottom", align: l = "start", sideOffset: u = 8, alignOffset: d, open: f, onOpenChange: p, defaultOpen: m, width: h, className: ee }) {
758
+ let g = n !== void 0 || r !== void 0, _ = h === void 0 ? void 0 : h === "trigger" ? { width: "var(--radix-dropdown-menu-trigger-width)" } : { width: h }, v = o ? o.map((e) => /* @__PURE__ */ E(ln, {
759
+ value: e.value,
760
+ disabled: e.disabled,
761
+ children: e.label
762
+ }, e.value)) : s;
763
+ return /* @__PURE__ */ E(sn.Provider, {
764
+ value: { closeOnSelect: a },
765
+ children: /* @__PURE__ */ D(Qt, {
766
+ open: f,
767
+ onOpenChange: p,
768
+ defaultOpen: m,
769
+ children: [/* @__PURE__ */ E($t, {
770
+ asChild: !0,
771
+ children: t
772
+ }), /* @__PURE__ */ E(en, { children: /* @__PURE__ */ E(tn, {
773
+ sideOffset: u,
774
+ alignOffset: d,
775
+ side: c,
776
+ align: l,
777
+ className: e("hsui-dropdown", $.content, !i && $.noCheck, ee),
778
+ style: _,
779
+ children: g ? /* @__PURE__ */ E(rn, {
780
+ value: n ?? "",
781
+ onValueChange: r,
782
+ children: v
783
+ }) : v
784
+ }) })]
785
+ })
786
+ });
787
+ }
788
+ function ln({ value: r, disabled: i, children: a, onSelect: o, className: s }) {
789
+ let { closeOnSelect: c } = T(sn), l = (e) => {
790
+ c || e.preventDefault(), o?.();
791
+ }, u = e($.item, s), d = /* @__PURE__ */ E(n, {
792
+ name: t,
793
+ size: 16,
794
+ className: $.checkIcon
795
+ });
796
+ return r === void 0 ? /* @__PURE__ */ D(nn, {
797
+ disabled: i,
798
+ onSelect: l,
799
+ className: u,
800
+ children: [d, /* @__PURE__ */ E("span", {
801
+ className: $.label,
802
+ children: a
803
+ })]
804
+ }) : /* @__PURE__ */ D(an, {
805
+ value: r,
806
+ disabled: i,
807
+ onSelect: l,
808
+ className: u,
809
+ children: [d, /* @__PURE__ */ E("span", {
810
+ className: $.label,
811
+ children: a
812
+ })]
813
+ });
814
+ }
815
+ var un = ({ className: t }) => /* @__PURE__ */ E(on, { className: e($.separator, t) });
816
+ //#endregion
817
+ export { ln as n, un as r, cn as t };