highsoft-ui 1.0.160 → 1.0.162

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 (78) hide show
  1. package/CLAUDE.md +111 -4
  2. package/dist/{BrowserFrame-BUneieY7.js → BrowserFrame-D-DoBOXv.js} +2 -2
  3. package/dist/{Button-CjxX21gW.js → Button-BCbWIPg1.js} +1 -1
  4. package/dist/{ButtonGroup-DanFXfXA.js → ButtonGroup-DGEDf4ic.js} +1 -1
  5. package/dist/{Checkbox-BkxibNey.js → Checkbox-CO0SRaAZ.js} +1 -1
  6. package/dist/{CodeBlock-BkSyiiCb.js → CodeBlock-Ugik4xMM.js} +4 -4
  7. package/dist/{CookiePolicyModal-9p_OGcpB.js → CookiePolicyModal-TdrVbP_E.js} +2 -2
  8. package/dist/{CopyCode-90z6BfV0.js → CopyCode-_sKjpGqB.js} +2 -2
  9. package/dist/{Dropdown-8bjCO1Lx.js → Dropdown-LiG-JAoo.js} +267 -234
  10. package/dist/{Footer-DVZIe2ax.js → Footer-DzIGLnEz.js} +8 -8
  11. package/dist/{FooterBottom-BV9xJbRt.js → FooterBottom-CRe2Mvjd.js} +1 -1
  12. package/dist/{FooterHelp-Dlnj0dUF.js → FooterHelp-CTSvficW.js} +1 -1
  13. package/dist/{FooterLinks-BAdqoexV.js → FooterLinks-BoDdQUWb.js} +2 -2
  14. package/dist/{Header-Dsji2l2m.js → Header-CTO6Y6oH.js} +26 -26
  15. package/dist/{InputGrouped-BUJKBG0D.js → InputGrouped-y0JyshpR.js} +13 -13
  16. package/dist/{Label-DgPVoDMR.js → Label-k6e4Rqb-.js} +1 -1
  17. package/dist/{LogoCarousel-DEvwvCfr.js → LogoCarousel-pRYdmphl.js} +2 -2
  18. package/dist/{NewsletterSignup-BP3AxNHH.js → NewsletterSignup-BrmQ7pXZ.js} +4 -4
  19. package/dist/{Notification-D0ow_x0-.js → Notification-BFLAktZo.js} +34 -32
  20. package/dist/{PrefPanel-B4MyeLGu.js → PrefPanel-CHkc6r6b.js} +9 -9
  21. package/dist/{RoadmapDetails-CATh63TE.js → RoadmapDetails-BWt0J4Pn.js} +2 -2
  22. package/dist/{Search-T4R860vH.js → Search-D29JM1a_.js} +7 -7
  23. package/dist/{SearchDropdown-fcfDUjOp.js → SearchDropdown-BSUAlaMY.js} +1 -1
  24. package/dist/{VideoCover-BXIkxFuT.js → VideoCover-C18NhQcY.js} +1 -1
  25. package/dist/{VideoPlayer-BB8jVMa5.js → VideoPlayer-UM4M4C5b.js} +4 -4
  26. package/dist/{VideoPlayerModal-fnAUwVMI.js → VideoPlayerModal-IRwjMLoy.js} +2 -2
  27. package/dist/{YoutubeModal-C3rfaDki.js → YoutubeModal-BOnH866s.js} +2 -2
  28. package/dist/components/BrowserFrame/index.js +1 -1
  29. package/dist/components/Button/index.js +1 -1
  30. package/dist/components/ButtonGroup/index.js +1 -1
  31. package/dist/components/Checkbox/index.js +1 -1
  32. package/dist/components/CodeBlock/index.js +1 -1
  33. package/dist/components/CopyCode/index.js +1 -1
  34. package/dist/components/Dropdown/index.js +1 -1
  35. package/dist/components/Footer/CookiePolicyModal.js +1 -1
  36. package/dist/components/Footer/FooterBottom.js +1 -1
  37. package/dist/components/Footer/FooterHelp.js +1 -1
  38. package/dist/components/Footer/FooterLinks.js +1 -1
  39. package/dist/components/Footer/YoutubeModal.js +1 -1
  40. package/dist/components/Footer/index.js +1 -1
  41. package/dist/components/Header/index.js +1 -1
  42. package/dist/components/InputGrouped/index.js +1 -1
  43. package/dist/components/Label/index.js +1 -1
  44. package/dist/components/LogoCarousel/index.js +1 -1
  45. package/dist/components/Modal/ModalContactFooter.js +2 -2
  46. package/dist/components/Modal/index.js +2 -2
  47. package/dist/components/NewsletterSignup/index.js +1 -1
  48. package/dist/components/Notification/index.js +1 -1
  49. package/dist/components/PrefPanel/index.js +1 -1
  50. package/dist/components/RoadmapDetails/index.js +1 -1
  51. package/dist/components/Search/index.js +1 -1
  52. package/dist/components/SearchDropdown/index.js +1 -1
  53. package/dist/components/Sidebar/NavDisclosure.js +2 -2
  54. package/dist/components/Sidebar/NavGroup.js +21 -37
  55. package/dist/components/Sidebar/NavItem.js +26 -19
  56. package/dist/components/Sidebar/Sidebar.js +97 -69
  57. package/dist/components/Sidebar/SidebarLayout.js +2 -2
  58. package/dist/components/Sidebar/SidebarResizer.js +1 -1
  59. package/dist/components/Sidebar/SidebarSwitcher.js +48 -0
  60. package/dist/components/Sidebar/index.js +5 -4
  61. package/dist/components/Sidebar/useSlideClip.js +27 -0
  62. package/dist/components/VideoCover/index.js +1 -1
  63. package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
  64. package/dist/components/VideoPlayer/index.js +1 -1
  65. package/dist/{create-element-Bftz4UxU.js → create-element-DxkdwAGs.js} +1 -1
  66. package/dist/{esm-LCYnNVvi.js → esm-CUgR2iUX.js} +63 -49
  67. package/dist/highsoft-ui.css +1 -1
  68. package/dist/lib/components/Dropdown/index.d.ts +32 -3
  69. package/dist/lib/components/Sidebar/NavItem.d.ts +5 -0
  70. package/dist/lib/components/Sidebar/Sidebar.d.ts +12 -1
  71. package/dist/lib/components/Sidebar/SidebarSwitcher.d.ts +31 -0
  72. package/dist/lib/components/Sidebar/index.d.ts +2 -0
  73. package/dist/lib/components/Sidebar/useSlideClip.d.ts +30 -0
  74. package/dist/lib/main.d.ts +2 -2
  75. package/dist/main.js +26 -25
  76. package/dist/{prism-light-CqF2CLQS.js → prism-light-Czk1yGD_.js} +1 -1
  77. package/dist/{styles.module-DGKft2EO.js → styles.module-B9V15An9.js} +16 -0
  78. package/package.json +1 -1
@@ -1,34 +1,34 @@
1
1
  import { t as e } from "./clsx-BWCAbrjV.js";
2
- import { $ as t } from "./esm-LCYnNVvi.js";
2
+ import { et as t } from "./esm-CUgR2iUX.js";
3
3
  import { t as n } from "./Icon-DJTgdvsG.js";
4
4
  import { _ as r, a as i, c as a, d as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, t as g, u as _, v, y } from "./es2015-DWa0ZZ7A.js";
5
- import { a as ee, i as b, n as te, r as x, t as S } from "./dist-CE9LFbij.js";
6
- import { a as C, i as w, n as T, r as ne, t as re } from "./dist-B04QoImH.js";
7
- import * as E from "react";
8
- import { createContext as D, useContext as O } from "react";
5
+ import { a as b, i as x, n as S, r as C, t as w } from "./dist-CE9LFbij.js";
6
+ import { a as T, i as E, n as ee, r as te, t as ne } from "./dist-B04QoImH.js";
7
+ import * as D from "react";
8
+ import { createContext as re, useContext as O, useRef as ie } from "react";
9
9
  import { jsx as k, jsxs as A } from "react/jsx-runtime";
10
10
  //#region node_modules/@radix-ui/react-menu/dist/index.mjs
11
- var j = ["Enter", " "], M = [
11
+ var j = ["Enter", " "], ae = [
12
12
  "ArrowDown",
13
13
  "PageUp",
14
14
  "Home"
15
- ], ie = [
15
+ ], oe = [
16
16
  "ArrowUp",
17
17
  "PageDown",
18
18
  "End"
19
- ], ae = [...M, ...ie], oe = {
19
+ ], se = [...ae, ...oe], M = {
20
20
  ltr: [...j, "ArrowRight"],
21
21
  rtl: [...j, "ArrowLeft"]
22
- }, N = {
22
+ }, ce = {
23
23
  ltr: ["ArrowLeft"],
24
24
  rtl: ["ArrowRight"]
25
- }, P = "Menu", [F, se, ce] = ee(P), [I, le] = d(P, [
26
- ce,
27
- C,
28
- x
29
- ]), L = C(), ue = x(), [R, z] = I(P), [de, B] = I(P), fe = (e) => {
30
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: o, modal: s = !0 } = e, c = L(t), [l, u] = E.useState(null), d = E.useRef(!1), f = a(o), p = b(i);
31
- return E.useEffect(() => {
25
+ }, N = "Menu", [P, le, ue] = b(N), [F, I] = d(N, [
26
+ ue,
27
+ T,
28
+ C
29
+ ]), L = T(), de = C(), [fe, R] = F(N), [pe, z] = F(N), me = (e) => {
30
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: o, modal: s = !0 } = e, c = L(t), [l, u] = D.useState(null), d = D.useRef(!1), f = a(o), p = x(i);
31
+ return D.useEffect(() => {
32
32
  let e = () => {
33
33
  d.current = !0, document.addEventListener("pointerdown", t, {
34
34
  capture: !0,
@@ -41,21 +41,21 @@ var j = ["Enter", " "], M = [
41
41
  return document.addEventListener("keydown", e, { capture: !0 }), () => {
42
42
  document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
43
43
  };
44
- }, []), E.useEffect(() => {
44
+ }, []), D.useEffect(() => {
45
45
  if (!n) return;
46
46
  let e = () => f(!1);
47
47
  return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
48
- }, [n, f]), /* @__PURE__ */ k(w, {
48
+ }, [n, f]), /* @__PURE__ */ k(E, {
49
49
  ...c,
50
- children: /* @__PURE__ */ k(R, {
50
+ children: /* @__PURE__ */ k(fe, {
51
51
  scope: t,
52
52
  open: n,
53
53
  onOpenChange: f,
54
54
  content: l,
55
55
  onContentChange: u,
56
- children: /* @__PURE__ */ k(de, {
56
+ children: /* @__PURE__ */ k(pe, {
57
57
  scope: t,
58
- onClose: E.useCallback(() => f(!1), [f]),
58
+ onClose: D.useCallback(() => f(!1), [f]),
59
59
  isUsingKeyboardRef: d,
60
60
  dir: p,
61
61
  modal: s,
@@ -64,19 +64,19 @@ var j = ["Enter", " "], M = [
64
64
  })
65
65
  });
66
66
  };
67
- fe.displayName = P;
68
- var pe = "MenuAnchor", V = E.forwardRef((e, t) => {
67
+ me.displayName = N;
68
+ var he = "MenuAnchor", B = D.forwardRef((e, t) => {
69
69
  let { __scopeMenu: n, ...r } = e;
70
- return /* @__PURE__ */ k(re, {
70
+ return /* @__PURE__ */ k(ne, {
71
71
  ...L(n),
72
72
  ...r,
73
73
  ref: t
74
74
  });
75
75
  });
76
- V.displayName = pe;
77
- var H = "MenuPortal", [me, he] = I(H, { forceMount: void 0 }), ge = (e) => {
78
- let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = z(H, t);
79
- return /* @__PURE__ */ k(me, {
76
+ B.displayName = he;
77
+ var V = "MenuPortal", [ge, _e] = F(V, { forceMount: void 0 }), ve = (e) => {
78
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = R(V, t);
79
+ return /* @__PURE__ */ k(ge, {
80
80
  scope: t,
81
81
  forceMount: n,
82
82
  children: /* @__PURE__ */ k(_, {
@@ -89,31 +89,31 @@ var H = "MenuPortal", [me, he] = I(H, { forceMount: void 0 }), ge = (e) => {
89
89
  })
90
90
  });
91
91
  };
92
- ge.displayName = H;
93
- var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
94
- let n = he(U, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = z(U, e.__scopeMenu), o = B(U, e.__scopeMenu);
95
- return /* @__PURE__ */ k(F.Provider, {
92
+ ve.displayName = V;
93
+ var H = "MenuContent", [ye, U] = F(H), be = D.forwardRef((e, t) => {
94
+ let n = _e(H, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = R(H, e.__scopeMenu), o = z(H, e.__scopeMenu);
95
+ return /* @__PURE__ */ k(P.Provider, {
96
96
  scope: e.__scopeMenu,
97
97
  children: /* @__PURE__ */ k(_, {
98
98
  present: r || a.open,
99
- children: /* @__PURE__ */ k(F.Slot, {
99
+ children: /* @__PURE__ */ k(P.Slot, {
100
100
  scope: e.__scopeMenu,
101
- children: o.modal ? /* @__PURE__ */ k(ye, {
101
+ children: o.modal ? /* @__PURE__ */ k(xe, {
102
102
  ...i,
103
103
  ref: t
104
- }) : /* @__PURE__ */ k(be, {
104
+ }) : /* @__PURE__ */ k(Se, {
105
105
  ...i,
106
106
  ref: t
107
107
  })
108
108
  })
109
109
  })
110
110
  });
111
- }), ye = E.forwardRef((e, t) => {
112
- let n = z(U, e.__scopeMenu), r = E.useRef(null), i = y(t, r);
113
- return E.useEffect(() => {
111
+ }), xe = D.forwardRef((e, t) => {
112
+ let n = R(H, e.__scopeMenu), r = D.useRef(null), i = y(t, r);
113
+ return D.useEffect(() => {
114
114
  let e = r.current;
115
115
  if (e) return g(e);
116
- }, []), /* @__PURE__ */ k(Se, {
116
+ }, []), /* @__PURE__ */ k(W, {
117
117
  ...e,
118
118
  ref: i,
119
119
  trapFocus: n.open,
@@ -122,9 +122,9 @@ var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
122
122
  onFocusOutside: m(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
123
123
  onDismiss: () => n.onOpenChange(!1)
124
124
  });
125
- }), be = E.forwardRef((e, t) => {
126
- let n = z(U, e.__scopeMenu);
127
- return /* @__PURE__ */ k(Se, {
125
+ }), Se = D.forwardRef((e, t) => {
126
+ let n = R(H, e.__scopeMenu);
127
+ return /* @__PURE__ */ k(W, {
128
128
  ...e,
129
129
  ref: t,
130
130
  trapFocus: !1,
@@ -132,36 +132,36 @@ var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
132
132
  disableOutsideScroll: !1,
133
133
  onDismiss: () => n.onOpenChange(!1)
134
134
  });
135
- }), xe = r("MenuContent.ScrollLock"), Se = E.forwardRef((e, t) => {
136
- let { __scopeMenu: n, loop: r = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: g, onInteractOutside: _, onDismiss: v, disableOutsideScroll: ee, ...b } = e, x = z(U, n), S = B(U, n), C = L(n), w = ue(n), T = se(n), [re, D] = E.useState(null), O = E.useRef(null), A = y(t, O, x.onContentChange), j = E.useRef(0), M = E.useRef(""), oe = E.useRef(0), N = E.useRef(null), P = E.useRef("right"), F = E.useRef(0), ce = ee ? f : E.Fragment, I = ee ? {
137
- as: xe,
135
+ }), Ce = r("MenuContent.ScrollLock"), W = D.forwardRef((e, t) => {
136
+ let { __scopeMenu: n, loop: r = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: g, onInteractOutside: _, onDismiss: v, disableOutsideScroll: b, ...x } = e, C = R(H, n), w = z(H, n), T = L(n), E = de(n), ee = le(n), [ne, re] = D.useState(null), O = D.useRef(null), ie = y(t, O, C.onContentChange), A = D.useRef(0), j = D.useRef(""), ae = D.useRef(0), M = D.useRef(null), ce = D.useRef("right"), N = D.useRef(0), P = b ? f : D.Fragment, ue = b ? {
137
+ as: Ce,
138
138
  allowPinchZoom: !0
139
- } : void 0, le = (e) => {
140
- let t = M.current + e, n = T().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;
139
+ } : void 0, F = (e) => {
140
+ let t = j.current + e, n = ee().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = nt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
141
141
  (function e(t) {
142
- M.current = t, window.clearTimeout(j.current), t !== "" && (j.current = window.setTimeout(() => e(""), 1e3));
142
+ j.current = t, window.clearTimeout(A.current), t !== "" && (A.current = window.setTimeout(() => e(""), 1e3));
143
143
  })(t), o && setTimeout(() => o.focus());
144
144
  };
145
- E.useEffect(() => () => window.clearTimeout(j.current), []), h();
146
- let R = E.useCallback((e) => P.current === N.current?.side && rt(e, N.current?.area), []);
147
- return /* @__PURE__ */ k(_e, {
145
+ D.useEffect(() => () => window.clearTimeout(A.current), []), h();
146
+ let I = D.useCallback((e) => ce.current === M.current?.side && it(e, M.current?.area), []);
147
+ return /* @__PURE__ */ k(ye, {
148
148
  scope: n,
149
- searchRef: M,
150
- onItemEnter: E.useCallback((e) => {
151
- R(e) && e.preventDefault();
152
- }, [R]),
153
- onItemLeave: E.useCallback((e) => {
154
- R(e) || (O.current?.focus(), D(null));
155
- }, [R]),
156
- onTriggerLeave: E.useCallback((e) => {
157
- R(e) && e.preventDefault();
158
- }, [R]),
159
- pointerGraceTimerRef: oe,
160
- onPointerGraceIntentChange: E.useCallback((e) => {
161
- N.current = e;
149
+ searchRef: j,
150
+ onItemEnter: D.useCallback((e) => {
151
+ I(e) && e.preventDefault();
152
+ }, [I]),
153
+ onItemLeave: D.useCallback((e) => {
154
+ I(e) || (O.current?.focus(), re(null));
155
+ }, [I]),
156
+ onTriggerLeave: D.useCallback((e) => {
157
+ I(e) && e.preventDefault();
158
+ }, [I]),
159
+ pointerGraceTimerRef: ae,
160
+ onPointerGraceIntentChange: D.useCallback((e) => {
161
+ M.current = e;
162
162
  }, []),
163
- children: /* @__PURE__ */ k(ce, {
164
- ...I,
163
+ children: /* @__PURE__ */ k(P, {
164
+ ...ue,
165
165
  children: /* @__PURE__ */ k(i, {
166
166
  asChild: !0,
167
167
  trapped: a,
@@ -177,46 +177,46 @@ var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
177
177
  onFocusOutside: g,
178
178
  onInteractOutside: _,
179
179
  onDismiss: v,
180
- children: /* @__PURE__ */ k(te, {
180
+ children: /* @__PURE__ */ k(S, {
181
181
  asChild: !0,
182
- ...w,
183
- dir: S.dir,
182
+ ...E,
183
+ dir: w.dir,
184
184
  orientation: "vertical",
185
185
  loop: r,
186
- currentTabStopId: re,
187
- onCurrentTabStopIdChange: D,
186
+ currentTabStopId: ne,
187
+ onCurrentTabStopIdChange: re,
188
188
  onEntryFocus: m(l, (e) => {
189
- S.isUsingKeyboardRef.current || e.preventDefault();
189
+ w.isUsingKeyboardRef.current || e.preventDefault();
190
190
  }),
191
191
  preventScrollOnEntryFocus: !0,
192
- children: /* @__PURE__ */ k(ne, {
192
+ children: /* @__PURE__ */ k(te, {
193
193
  role: "menu",
194
194
  "aria-orientation": "vertical",
195
- "data-state": Ze(x.open),
195
+ "data-state": Qe(C.open),
196
196
  "data-radix-menu-content": "",
197
- dir: S.dir,
198
- ...C,
199
- ...b,
200
- ref: A,
197
+ dir: w.dir,
198
+ ...T,
199
+ ...x,
200
+ ref: ie,
201
201
  style: {
202
202
  outline: "none",
203
- ...b.style
203
+ ...x.style
204
204
  },
205
- onKeyDown: m(b.onKeyDown, (e) => {
205
+ onKeyDown: m(x.onKeyDown, (e) => {
206
206
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
207
- t && (e.key === "Tab" && e.preventDefault(), !n && r && le(e.key));
207
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && F(e.key));
208
208
  let i = O.current;
209
- if (e.target !== i || !ae.includes(e.key)) return;
209
+ if (e.target !== i || !se.includes(e.key)) return;
210
210
  e.preventDefault();
211
- let a = T().filter((e) => !e.disabled).map((e) => e.ref.current);
212
- ie.includes(e.key) && a.reverse(), $e(a);
211
+ let a = ee().filter((e) => !e.disabled).map((e) => e.ref.current);
212
+ oe.includes(e.key) && a.reverse(), et(a);
213
213
  }),
214
214
  onBlur: m(e.onBlur, (e) => {
215
- e.currentTarget.contains(e.target) || (window.clearTimeout(j.current), M.current = "");
215
+ e.currentTarget.contains(e.target) || (window.clearTimeout(A.current), j.current = "");
216
216
  }),
217
217
  onPointerMove: m(e.onPointerMove, X((e) => {
218
- let t = e.target, n = F.current !== e.clientX;
219
- e.currentTarget.contains(t) && n && (P.current = e.clientX > F.current ? "right" : "left", F.current = e.clientX);
218
+ let t = e.target, n = N.current !== e.clientX;
219
+ e.currentTarget.contains(t) && n && (ce.current = e.clientX > N.current ? "right" : "left", N.current = e.clientX);
220
220
  }))
221
221
  })
222
222
  })
@@ -225,8 +225,8 @@ var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
225
225
  })
226
226
  });
227
227
  });
228
- ve.displayName = U;
229
- var Ce = "MenuGroup", we = E.forwardRef((e, t) => {
228
+ be.displayName = H;
229
+ var we = "MenuGroup", G = D.forwardRef((e, t) => {
230
230
  let { __scopeMenu: n, ...r } = e;
231
231
  return /* @__PURE__ */ k(c.div, {
232
232
  role: "group",
@@ -234,8 +234,8 @@ var Ce = "MenuGroup", we = E.forwardRef((e, t) => {
234
234
  ref: t
235
235
  });
236
236
  });
237
- we.displayName = Ce;
238
- var Te = "MenuLabel", Ee = E.forwardRef((e, t) => {
237
+ G.displayName = we;
238
+ var Te = "MenuLabel", Ee = D.forwardRef((e, t) => {
239
239
  let { __scopeMenu: n, ...r } = e;
240
240
  return /* @__PURE__ */ k(c.div, {
241
241
  ...r,
@@ -243,8 +243,8 @@ var Te = "MenuLabel", Ee = E.forwardRef((e, t) => {
243
243
  });
244
244
  });
245
245
  Ee.displayName = Te;
246
- var G = "MenuItem", De = "menu.itemSelect", K = E.forwardRef((e, t) => {
247
- let { disabled: n = !1, onSelect: r, ...i } = e, a = E.useRef(null), o = B(G, e.__scopeMenu), c = W(G, e.__scopeMenu), l = y(t, a), u = E.useRef(!1), d = () => {
246
+ var K = "MenuItem", De = "menu.itemSelect", q = D.forwardRef((e, t) => {
247
+ let { disabled: n = !1, onSelect: r, ...i } = e, a = D.useRef(null), o = z(K, e.__scopeMenu), c = U(K, e.__scopeMenu), l = y(t, a), u = D.useRef(!1), d = () => {
248
248
  let e = a.current;
249
249
  if (!n && e) {
250
250
  let t = new CustomEvent(De, {
@@ -271,17 +271,17 @@ var G = "MenuItem", De = "menu.itemSelect", K = E.forwardRef((e, t) => {
271
271
  })
272
272
  });
273
273
  });
274
- K.displayName = G;
275
- var Oe = E.forwardRef((e, t) => {
276
- let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = W(G, n), s = ue(n), l = E.useRef(null), u = y(t, l), [d, f] = E.useState(!1), [p, h] = E.useState("");
277
- return E.useEffect(() => {
274
+ q.displayName = K;
275
+ var Oe = D.forwardRef((e, t) => {
276
+ let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = U(K, n), s = de(n), l = D.useRef(null), u = y(t, l), [d, f] = D.useState(!1), [p, h] = D.useState("");
277
+ return D.useEffect(() => {
278
278
  let e = l.current;
279
279
  e && h((e.textContent ?? "").trim());
280
- }, [a.children]), /* @__PURE__ */ k(F.ItemSlot, {
280
+ }, [a.children]), /* @__PURE__ */ k(P.ItemSlot, {
281
281
  scope: n,
282
282
  disabled: r,
283
283
  textValue: i ?? p,
284
- children: /* @__PURE__ */ k(S, {
284
+ children: /* @__PURE__ */ k(w, {
285
285
  asChild: !0,
286
286
  ...s,
287
287
  focusable: !r,
@@ -301,67 +301,67 @@ var Oe = E.forwardRef((e, t) => {
301
301
  })
302
302
  })
303
303
  });
304
- }), ke = "MenuCheckboxItem", Ae = E.forwardRef((e, t) => {
304
+ }), ke = "MenuCheckboxItem", Ae = D.forwardRef((e, t) => {
305
305
  let { checked: n = !1, onCheckedChange: r, ...i } = e;
306
- return /* @__PURE__ */ k(Le, {
306
+ return /* @__PURE__ */ k(Re, {
307
307
  scope: e.__scopeMenu,
308
308
  checked: n,
309
- children: /* @__PURE__ */ k(K, {
309
+ children: /* @__PURE__ */ k(q, {
310
310
  role: "menuitemcheckbox",
311
311
  "aria-checked": Y(n) ? "mixed" : n,
312
312
  ...i,
313
313
  ref: t,
314
- "data-state": Qe(n),
314
+ "data-state": $e(n),
315
315
  onSelect: m(i.onSelect, () => r?.(Y(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
316
316
  })
317
317
  });
318
318
  });
319
319
  Ae.displayName = ke;
320
- var je = "MenuRadioGroup", [Me, Ne] = I(je, {
320
+ var je = "MenuRadioGroup", [Me, Ne] = F(je, {
321
321
  value: void 0,
322
322
  onValueChange: () => {}
323
- }), Pe = E.forwardRef((e, t) => {
323
+ }), Pe = D.forwardRef((e, t) => {
324
324
  let { value: n, onValueChange: r, ...i } = e, o = a(r);
325
325
  return /* @__PURE__ */ k(Me, {
326
326
  scope: e.__scopeMenu,
327
327
  value: n,
328
328
  onValueChange: o,
329
- children: /* @__PURE__ */ k(we, {
329
+ children: /* @__PURE__ */ k(G, {
330
330
  ...i,
331
331
  ref: t
332
332
  })
333
333
  });
334
334
  });
335
335
  Pe.displayName = je;
336
- var Fe = "MenuRadioItem", Ie = E.forwardRef((e, t) => {
336
+ var Fe = "MenuRadioItem", Ie = D.forwardRef((e, t) => {
337
337
  let { value: n, ...r } = e, i = Ne(Fe, e.__scopeMenu), a = n === i.value;
338
- return /* @__PURE__ */ k(Le, {
338
+ return /* @__PURE__ */ k(Re, {
339
339
  scope: e.__scopeMenu,
340
340
  checked: a,
341
- children: /* @__PURE__ */ k(K, {
341
+ children: /* @__PURE__ */ k(q, {
342
342
  role: "menuitemradio",
343
343
  "aria-checked": a,
344
344
  ...r,
345
345
  ref: t,
346
- "data-state": Qe(a),
346
+ "data-state": $e(a),
347
347
  onSelect: m(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
348
348
  })
349
349
  });
350
350
  });
351
351
  Ie.displayName = Fe;
352
- var q = "MenuItemIndicator", [Le, Re] = I(q, { checked: !1 }), ze = E.forwardRef((e, t) => {
353
- let { __scopeMenu: n, forceMount: r, ...i } = e, a = Re(q, n);
352
+ var Le = "MenuItemIndicator", [Re, ze] = F(Le, { checked: !1 }), Be = D.forwardRef((e, t) => {
353
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = ze(Le, n);
354
354
  return /* @__PURE__ */ k(_, {
355
355
  present: r || Y(a.checked) || a.checked === !0,
356
356
  children: /* @__PURE__ */ k(c.span, {
357
357
  ...i,
358
358
  ref: t,
359
- "data-state": Qe(a.checked)
359
+ "data-state": $e(a.checked)
360
360
  })
361
361
  });
362
362
  });
363
- ze.displayName = q;
364
- var Be = "MenuSeparator", Ve = E.forwardRef((e, t) => {
363
+ Be.displayName = Le;
364
+ var Ve = "MenuSeparator", He = D.forwardRef((e, t) => {
365
365
  let { __scopeMenu: n, ...r } = e;
366
366
  return /* @__PURE__ */ k(c.div, {
367
367
  role: "separator",
@@ -370,27 +370,27 @@ var Be = "MenuSeparator", Ve = E.forwardRef((e, t) => {
370
370
  ref: t
371
371
  });
372
372
  });
373
- Ve.displayName = Be;
374
- var He = "MenuArrow", Ue = E.forwardRef((e, t) => {
373
+ He.displayName = Ve;
374
+ var Ue = "MenuArrow", We = D.forwardRef((e, t) => {
375
375
  let { __scopeMenu: n, ...r } = e;
376
- return /* @__PURE__ */ k(T, {
376
+ return /* @__PURE__ */ k(ee, {
377
377
  ...L(n),
378
378
  ...r,
379
379
  ref: t
380
380
  });
381
381
  });
382
- Ue.displayName = He;
383
- var We = "MenuSub", [Ge, Ke] = I(We), qe = (e) => {
384
- let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, o = z(We, t), s = L(t), [c, l] = E.useState(null), [d, f] = E.useState(null), p = a(i);
385
- return E.useEffect(() => (o.open === !1 && p(!1), () => p(!1)), [o.open, p]), /* @__PURE__ */ k(w, {
382
+ We.displayName = Ue;
383
+ var Ge = "MenuSub", [Ke, qe] = F(Ge), Je = (e) => {
384
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, o = R(Ge, t), s = L(t), [c, l] = D.useState(null), [d, f] = D.useState(null), p = a(i);
385
+ return D.useEffect(() => (o.open === !1 && p(!1), () => p(!1)), [o.open, p]), /* @__PURE__ */ k(E, {
386
386
  ...s,
387
- children: /* @__PURE__ */ k(R, {
387
+ children: /* @__PURE__ */ k(fe, {
388
388
  scope: t,
389
389
  open: r,
390
390
  onOpenChange: p,
391
391
  content: d,
392
392
  onContentChange: f,
393
- children: /* @__PURE__ */ k(Ge, {
393
+ children: /* @__PURE__ */ k(Ke, {
394
394
  scope: t,
395
395
  contentId: u(),
396
396
  triggerId: u(),
@@ -401,17 +401,17 @@ var We = "MenuSub", [Ge, Ke] = I(We), qe = (e) => {
401
401
  })
402
402
  });
403
403
  };
404
- qe.displayName = We;
405
- var J = "MenuSubTrigger", Je = E.forwardRef((e, t) => {
406
- let n = z(J, e.__scopeMenu), r = B(J, e.__scopeMenu), i = Ke(J, e.__scopeMenu), a = W(J, e.__scopeMenu), o = E.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: c } = a, l = { __scopeMenu: e.__scopeMenu }, u = E.useCallback(() => {
404
+ Je.displayName = Ge;
405
+ var J = "MenuSubTrigger", Ye = D.forwardRef((e, t) => {
406
+ let n = R(J, e.__scopeMenu), r = z(J, e.__scopeMenu), i = qe(J, e.__scopeMenu), a = U(J, e.__scopeMenu), o = D.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: c } = a, l = { __scopeMenu: e.__scopeMenu }, u = D.useCallback(() => {
407
407
  o.current && window.clearTimeout(o.current), o.current = null;
408
408
  }, []);
409
- return E.useEffect(() => u, [u]), E.useEffect(() => {
409
+ return D.useEffect(() => u, [u]), D.useEffect(() => {
410
410
  let e = s.current;
411
411
  return () => {
412
412
  window.clearTimeout(e), c(null);
413
413
  };
414
- }, [s, c]), /* @__PURE__ */ k(V, {
414
+ }, [s, c]), /* @__PURE__ */ k(B, {
415
415
  asChild: !0,
416
416
  ...l,
417
417
  children: /* @__PURE__ */ k(Oe, {
@@ -419,7 +419,7 @@ var J = "MenuSubTrigger", Je = E.forwardRef((e, t) => {
419
419
  "aria-haspopup": "menu",
420
420
  "aria-expanded": n.open,
421
421
  "aria-controls": n.open ? i.contentId : void 0,
422
- "data-state": Ze(n.open),
422
+ "data-state": Qe(n.open),
423
423
  ...e,
424
424
  ref: v(t, i.onTriggerChange),
425
425
  onClick: (t) => {
@@ -467,21 +467,21 @@ var J = "MenuSubTrigger", Je = E.forwardRef((e, t) => {
467
467
  })),
468
468
  onKeyDown: m(e.onKeyDown, (t) => {
469
469
  let i = a.searchRef.current !== "";
470
- e.disabled || i && t.key === " " || oe[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
470
+ e.disabled || i && t.key === " " || M[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
471
471
  })
472
472
  })
473
473
  });
474
474
  });
475
- Je.displayName = J;
476
- var Ye = "MenuSubContent", Xe = E.forwardRef((e, t) => {
477
- let n = he(U, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = z(U, e.__scopeMenu), s = B(U, e.__scopeMenu), c = Ke(Ye, e.__scopeMenu), l = E.useRef(null), u = y(t, l);
478
- return /* @__PURE__ */ k(F.Provider, {
475
+ Ye.displayName = J;
476
+ var Xe = "MenuSubContent", Ze = D.forwardRef((e, t) => {
477
+ let n = _e(H, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = R(H, e.__scopeMenu), s = z(H, e.__scopeMenu), c = qe(Xe, e.__scopeMenu), l = D.useRef(null), u = y(t, l);
478
+ return /* @__PURE__ */ k(P.Provider, {
479
479
  scope: e.__scopeMenu,
480
480
  children: /* @__PURE__ */ k(_, {
481
481
  present: r || o.open,
482
- children: /* @__PURE__ */ k(F.Slot, {
482
+ children: /* @__PURE__ */ k(P.Slot, {
483
483
  scope: e.__scopeMenu,
484
- children: /* @__PURE__ */ k(Se, {
484
+ children: /* @__PURE__ */ k(W, {
485
485
  id: c.contentId,
486
486
  "aria-labelledby": c.triggerId,
487
487
  ...a,
@@ -502,7 +502,7 @@ var Ye = "MenuSubContent", Xe = E.forwardRef((e, t) => {
502
502
  s.onClose(), e.preventDefault();
503
503
  }),
504
504
  onKeyDown: m(e.onKeyDown, (e) => {
505
- let t = e.currentTarget.contains(e.target), n = N[s.dir].includes(e.key);
505
+ let t = e.currentTarget.contains(e.target), n = ce[s.dir].includes(e.key);
506
506
  t && n && (o.onOpenChange(!1), c.trigger?.focus(), e.preventDefault());
507
507
  })
508
508
  })
@@ -510,30 +510,30 @@ var Ye = "MenuSubContent", Xe = E.forwardRef((e, t) => {
510
510
  })
511
511
  });
512
512
  });
513
- Xe.displayName = Ye;
514
- function Ze(e) {
513
+ Ze.displayName = Xe;
514
+ function Qe(e) {
515
515
  return e ? "open" : "closed";
516
516
  }
517
517
  function Y(e) {
518
518
  return e === "indeterminate";
519
519
  }
520
- function Qe(e) {
520
+ function $e(e) {
521
521
  return Y(e) ? "indeterminate" : e ? "checked" : "unchecked";
522
522
  }
523
- function $e(e) {
523
+ function et(e) {
524
524
  let t = document.activeElement;
525
525
  for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
526
526
  }
527
- function et(e, t) {
527
+ function tt(e, t) {
528
528
  return e.map((n, r) => e[(t + r) % e.length]);
529
529
  }
530
- function tt(e, t, n) {
531
- 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));
530
+ function nt(e, t, n) {
531
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = tt(e, Math.max(i, 0));
532
532
  r.length === 1 && (a = a.filter((e) => e !== n));
533
533
  let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
534
534
  return o === n ? void 0 : o;
535
535
  }
536
- function nt(e, t) {
536
+ function rt(e, t) {
537
537
  let { x: n, y: r } = e, i = !1;
538
538
  for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
539
539
  let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
@@ -541,8 +541,8 @@ function nt(e, t) {
541
541
  }
542
542
  return i;
543
543
  }
544
- function rt(e, t) {
545
- return t ? nt({
544
+ function it(e, t) {
545
+ return t ? rt({
546
546
  x: e.clientX,
547
547
  y: e.clientY
548
548
  }, t) : !1;
@@ -550,23 +550,23 @@ function rt(e, t) {
550
550
  function X(e) {
551
551
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
552
552
  }
553
- var it = fe, at = V, ot = ge, st = ve, ct = we, 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, [le]), Q = le(), [xt, St] = yt(Z), Ct = (e) => {
554
- let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: s, modal: c = !0 } = e, l = Q(t), d = E.useRef(null), [f, p] = o({
553
+ var at = me, ot = B, st = ve, ct = be, lt = G, ut = Ee, dt = q, ft = Ae, pt = Pe, mt = Ie, ht = Be, gt = He, _t = We, vt = Ye, yt = Ze, Z = "DropdownMenu", [bt, xt] = d(Z, [I]), Q = I(), [St, Ct] = bt(Z), wt = (e) => {
554
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: s, modal: c = !0 } = e, l = Q(t), d = D.useRef(null), [f, p] = o({
555
555
  prop: i,
556
556
  defaultProp: a ?? !1,
557
557
  onChange: s,
558
558
  caller: Z
559
559
  });
560
- return /* @__PURE__ */ k(xt, {
560
+ return /* @__PURE__ */ k(St, {
561
561
  scope: t,
562
562
  triggerId: u(),
563
563
  triggerRef: d,
564
564
  contentId: u(),
565
565
  open: f,
566
566
  onOpenChange: p,
567
- onOpenToggle: E.useCallback(() => p((e) => !e), [p]),
567
+ onOpenToggle: D.useCallback(() => p((e) => !e), [p]),
568
568
  modal: c,
569
- children: /* @__PURE__ */ k(it, {
569
+ children: /* @__PURE__ */ k(at, {
570
570
  ...l,
571
571
  open: f,
572
572
  onOpenChange: p,
@@ -576,10 +576,10 @@ var it = fe, at = V, ot = ge, st = ve, ct = we, lt = Ee, ut = K, dt = Ae, ft = P
576
576
  })
577
577
  });
578
578
  };
579
- Ct.displayName = Z;
580
- var wt = "DropdownMenuTrigger", Tt = E.forwardRef((e, t) => {
581
- let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = St(wt, n);
582
- return /* @__PURE__ */ k(at, {
579
+ wt.displayName = Z;
580
+ var Tt = "DropdownMenuTrigger", Et = D.forwardRef((e, t) => {
581
+ let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = Ct(Tt, n);
582
+ return /* @__PURE__ */ k(ot, {
583
583
  asChild: !0,
584
584
  ...Q(n),
585
585
  children: /* @__PURE__ */ k(c.button, {
@@ -606,18 +606,18 @@ var wt = "DropdownMenuTrigger", Tt = E.forwardRef((e, t) => {
606
606
  })
607
607
  });
608
608
  });
609
- Tt.displayName = wt;
610
- var Et = "DropdownMenuPortal", Dt = (e) => {
609
+ Et.displayName = Tt;
610
+ var Dt = "DropdownMenuPortal", Ot = (e) => {
611
611
  let { __scopeDropdownMenu: t, ...n } = e;
612
- return /* @__PURE__ */ k(ot, {
612
+ return /* @__PURE__ */ k(st, {
613
613
  ...Q(t),
614
614
  ...n
615
615
  });
616
616
  };
617
- Dt.displayName = Et;
618
- var Ot = "DropdownMenuContent", kt = E.forwardRef((e, t) => {
619
- let { __scopeDropdownMenu: n, ...r } = e, i = St(Ot, n), a = Q(n), o = E.useRef(!1);
620
- return /* @__PURE__ */ k(st, {
617
+ Ot.displayName = Dt;
618
+ var kt = "DropdownMenuContent", At = D.forwardRef((e, t) => {
619
+ let { __scopeDropdownMenu: n, ...r } = e, i = Ct(kt, n), a = Q(n), o = D.useRef(!1);
620
+ return /* @__PURE__ */ k(ct, {
621
621
  id: i.contentId,
622
622
  "aria-labelledby": i.triggerId,
623
623
  ...a,
@@ -640,17 +640,8 @@ var Ot = "DropdownMenuContent", kt = E.forwardRef((e, t) => {
640
640
  }
641
641
  });
642
642
  });
643
- kt.displayName = Ot;
644
- var At = "DropdownMenuGroup", jt = E.forwardRef((e, t) => {
645
- let { __scopeDropdownMenu: n, ...r } = e;
646
- return /* @__PURE__ */ k(ct, {
647
- ...Q(n),
648
- ...r,
649
- ref: t
650
- });
651
- });
652
- jt.displayName = At;
653
- var Mt = "DropdownMenuLabel", Nt = E.forwardRef((e, t) => {
643
+ At.displayName = kt;
644
+ var jt = "DropdownMenuGroup", Mt = D.forwardRef((e, t) => {
654
645
  let { __scopeDropdownMenu: n, ...r } = e;
655
646
  return /* @__PURE__ */ k(lt, {
656
647
  ...Q(n),
@@ -658,8 +649,8 @@ var Mt = "DropdownMenuLabel", Nt = E.forwardRef((e, t) => {
658
649
  ref: t
659
650
  });
660
651
  });
661
- Nt.displayName = Mt;
662
- var Pt = "DropdownMenuItem", Ft = E.forwardRef((e, t) => {
652
+ Mt.displayName = jt;
653
+ var Nt = "DropdownMenuLabel", Pt = D.forwardRef((e, t) => {
663
654
  let { __scopeDropdownMenu: n, ...r } = e;
664
655
  return /* @__PURE__ */ k(ut, {
665
656
  ...Q(n),
@@ -667,8 +658,8 @@ var Pt = "DropdownMenuItem", Ft = E.forwardRef((e, t) => {
667
658
  ref: t
668
659
  });
669
660
  });
670
- Ft.displayName = Pt;
671
- var It = "DropdownMenuCheckboxItem", Lt = E.forwardRef((e, t) => {
661
+ Pt.displayName = Nt;
662
+ var Ft = "DropdownMenuItem", It = D.forwardRef((e, t) => {
672
663
  let { __scopeDropdownMenu: n, ...r } = e;
673
664
  return /* @__PURE__ */ k(dt, {
674
665
  ...Q(n),
@@ -676,8 +667,8 @@ var It = "DropdownMenuCheckboxItem", Lt = E.forwardRef((e, t) => {
676
667
  ref: t
677
668
  });
678
669
  });
679
- Lt.displayName = It;
680
- var Rt = "DropdownMenuRadioGroup", zt = E.forwardRef((e, t) => {
670
+ It.displayName = Ft;
671
+ var Lt = "DropdownMenuCheckboxItem", Rt = D.forwardRef((e, t) => {
681
672
  let { __scopeDropdownMenu: n, ...r } = e;
682
673
  return /* @__PURE__ */ k(ft, {
683
674
  ...Q(n),
@@ -685,8 +676,8 @@ var Rt = "DropdownMenuRadioGroup", zt = E.forwardRef((e, t) => {
685
676
  ref: t
686
677
  });
687
678
  });
688
- zt.displayName = Rt;
689
- var Bt = "DropdownMenuRadioItem", Vt = E.forwardRef((e, t) => {
679
+ Rt.displayName = Lt;
680
+ var zt = "DropdownMenuRadioGroup", Bt = D.forwardRef((e, t) => {
690
681
  let { __scopeDropdownMenu: n, ...r } = e;
691
682
  return /* @__PURE__ */ k(pt, {
692
683
  ...Q(n),
@@ -694,8 +685,8 @@ var Bt = "DropdownMenuRadioItem", Vt = E.forwardRef((e, t) => {
694
685
  ref: t
695
686
  });
696
687
  });
697
- Vt.displayName = Bt;
698
- var Ht = "DropdownMenuItemIndicator", Ut = E.forwardRef((e, t) => {
688
+ Bt.displayName = zt;
689
+ var Vt = "DropdownMenuRadioItem", Ht = D.forwardRef((e, t) => {
699
690
  let { __scopeDropdownMenu: n, ...r } = e;
700
691
  return /* @__PURE__ */ k(mt, {
701
692
  ...Q(n),
@@ -703,8 +694,8 @@ var Ht = "DropdownMenuItemIndicator", Ut = E.forwardRef((e, t) => {
703
694
  ref: t
704
695
  });
705
696
  });
706
- Ut.displayName = Ht;
707
- var Wt = "DropdownMenuSeparator", Gt = E.forwardRef((e, t) => {
697
+ Ht.displayName = Vt;
698
+ var Ut = "DropdownMenuItemIndicator", Wt = D.forwardRef((e, t) => {
708
699
  let { __scopeDropdownMenu: n, ...r } = e;
709
700
  return /* @__PURE__ */ k(ht, {
710
701
  ...Q(n),
@@ -712,8 +703,8 @@ var Wt = "DropdownMenuSeparator", Gt = E.forwardRef((e, t) => {
712
703
  ref: t
713
704
  });
714
705
  });
715
- Gt.displayName = Wt;
716
- var Kt = "DropdownMenuArrow", qt = E.forwardRef((e, t) => {
706
+ Wt.displayName = Ut;
707
+ var Gt = "DropdownMenuSeparator", Kt = D.forwardRef((e, t) => {
717
708
  let { __scopeDropdownMenu: n, ...r } = e;
718
709
  return /* @__PURE__ */ k(gt, {
719
710
  ...Q(n),
@@ -721,8 +712,8 @@ var Kt = "DropdownMenuArrow", qt = E.forwardRef((e, t) => {
721
712
  ref: t
722
713
  });
723
714
  });
724
- qt.displayName = Kt;
725
- var Jt = "DropdownMenuSubTrigger", Yt = E.forwardRef((e, t) => {
715
+ Kt.displayName = Gt;
716
+ var qt = "DropdownMenuArrow", Jt = D.forwardRef((e, t) => {
726
717
  let { __scopeDropdownMenu: n, ...r } = e;
727
718
  return /* @__PURE__ */ k(_t, {
728
719
  ...Q(n),
@@ -730,10 +721,19 @@ var Jt = "DropdownMenuSubTrigger", Yt = E.forwardRef((e, t) => {
730
721
  ref: t
731
722
  });
732
723
  });
733
- Yt.displayName = Jt;
734
- var Xt = "DropdownMenuSubContent", Zt = E.forwardRef((e, t) => {
724
+ Jt.displayName = qt;
725
+ var Yt = "DropdownMenuSubTrigger", Xt = D.forwardRef((e, t) => {
735
726
  let { __scopeDropdownMenu: n, ...r } = e;
736
727
  return /* @__PURE__ */ k(vt, {
728
+ ...Q(n),
729
+ ...r,
730
+ ref: t
731
+ });
732
+ });
733
+ Xt.displayName = Yt;
734
+ var Zt = "DropdownMenuSubContent", Qt = D.forwardRef((e, t) => {
735
+ let { __scopeDropdownMenu: n, ...r } = e;
736
+ return /* @__PURE__ */ k(yt, {
737
737
  ...Q(n),
738
738
  ...r,
739
739
  ref: t,
@@ -747,81 +747,114 @@ var Xt = "DropdownMenuSubContent", Zt = E.forwardRef((e, t) => {
747
747
  }
748
748
  });
749
749
  });
750
- Zt.displayName = Xt;
751
- var Qt = Ct, $t = Tt, en = Dt, tn = kt, nn = Ft, rn = zt, an = Vt, on = Gt, $ = {
750
+ Qt.displayName = Zt;
751
+ var $t = wt, en = Et, tn = Ot, nn = At, rn = It, an = Bt, on = Ht, sn = Kt, $ = {
752
752
  checkIcon: "_0tr6ea_checkIcon",
753
+ compact: "_0tr6ea_compact",
753
754
  content: "_0tr6ea_content",
755
+ divided: "_0tr6ea_divided",
756
+ fill: "_0tr6ea_fill",
754
757
  "hsui-dropdown-in": "_0tr6ea_hsui-dropdown-in",
755
758
  "hsui-dropdown-out": "_0tr6ea_hsui-dropdown-out",
756
759
  icon: "_0tr6ea_icon",
757
760
  item: "_0tr6ea_item",
758
761
  label: "_0tr6ea_label",
759
- noCheck: "_0tr6ea_noCheck",
760
762
  separator: "_0tr6ea_separator"
761
- }, sn = D({ closeOnSelect: !1 });
762
- 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: g }) {
763
- let _ = n !== void 0 || r !== void 0, v = h === void 0 ? void 0 : h === "trigger" ? { width: "var(--radix-dropdown-menu-trigger-width)" } : { width: h }, y = o ? o.map((e) => /* @__PURE__ */ k(ln, {
763
+ }, cn = re({
764
+ closeOnSelect: !1,
765
+ size: 200,
766
+ indicator: "fill"
767
+ });
768
+ function ln(e) {
769
+ e.focus({ preventScroll: !0 }), e.setAttribute("data-hs-pointer-focus", "");
770
+ let t = () => {
771
+ e.removeAttribute("data-hs-pointer-focus"), e.removeEventListener("keydown", t), e.removeEventListener("blur", t);
772
+ };
773
+ e.addEventListener("keydown", t), e.addEventListener("blur", t);
774
+ }
775
+ function un({ trigger: t, value: n, onValueChange: r, indicator: i, showCheck: a, closeOnSelect: o = !1, options: s, children: c, side: l = "bottom", align: u = "start", sideOffset: d = 8, alignOffset: f, open: p, onOpenChange: m, defaultOpen: h, width: g, size: _ = 200, variant: v = "plain", className: y }) {
776
+ let b = n !== void 0 || r !== void 0, x = ie(null), S = ie(!1), C = i ?? (a === void 0 ? v === "divided" ? "check" : "fill" : a ? "check" : "fill"), w = g === void 0 ? void 0 : g === "trigger" ? { width: "var(--radix-dropdown-menu-trigger-width)" } : { width: g }, T = s ? s.map((e) => /* @__PURE__ */ k(dn, {
764
777
  value: e.value,
765
778
  disabled: e.disabled,
766
779
  icon: e.icon,
767
780
  children: e.label
768
- }, e.value)) : s;
769
- return /* @__PURE__ */ k(sn.Provider, {
770
- value: { closeOnSelect: a },
771
- children: /* @__PURE__ */ A(Qt, {
772
- open: f,
773
- onOpenChange: p,
774
- defaultOpen: m,
775
- children: [/* @__PURE__ */ k($t, {
781
+ }, e.value)) : c;
782
+ return /* @__PURE__ */ k(cn.Provider, {
783
+ value: {
784
+ closeOnSelect: o,
785
+ size: _,
786
+ indicator: C
787
+ },
788
+ children: /* @__PURE__ */ A($t, {
789
+ open: p,
790
+ onOpenChange: m,
791
+ defaultOpen: h,
792
+ children: [/* @__PURE__ */ k(en, {
776
793
  asChild: !0,
794
+ ref: x,
777
795
  children: t
778
- }), /* @__PURE__ */ k(en, { children: /* @__PURE__ */ k(tn, {
779
- sideOffset: u,
780
- alignOffset: d,
781
- side: c,
782
- align: l,
783
- className: e("hsui-dropdown", $.content, !i && $.noCheck, g),
784
- style: v,
785
- children: _ ? /* @__PURE__ */ k(rn, {
796
+ }), /* @__PURE__ */ k(tn, { children: /* @__PURE__ */ k(nn, {
797
+ onPointerUpCapture: () => {
798
+ S.current = !0;
799
+ },
800
+ onKeyDownCapture: () => {
801
+ S.current = !1;
802
+ },
803
+ onInteractOutside: (e) => {
804
+ S.current = e.detail.originalEvent.type.startsWith("pointer");
805
+ },
806
+ onCloseAutoFocus: (e) => {
807
+ let t = S.current;
808
+ S.current = !1;
809
+ let n = x.current;
810
+ t && n && (e.preventDefault(), ln(n));
811
+ },
812
+ sideOffset: d,
813
+ alignOffset: f,
814
+ side: l,
815
+ align: u,
816
+ className: e("hsui-dropdown", $.content, _ === 100 && $.compact, v === "divided" && $.divided, C === "fill" && $.fill, y),
817
+ style: w,
818
+ children: b ? /* @__PURE__ */ k(an, {
786
819
  value: n ?? "",
787
820
  onValueChange: r,
788
- children: y
789
- }) : y
821
+ children: T
822
+ }) : T
790
823
  }) })]
791
824
  })
792
825
  });
793
826
  }
794
- function ln({ value: r, disabled: i, children: a, icon: o, onSelect: s, className: c }) {
795
- let { closeOnSelect: l } = O(sn), u = (e) => {
827
+ function dn({ value: r, disabled: i, children: a, icon: o, onSelect: s, className: c }) {
828
+ let { closeOnSelect: l, size: u, indicator: d } = O(cn), f = (e) => {
796
829
  l || e.preventDefault(), s?.();
797
- }, d = e($.item, c), f = /* @__PURE__ */ k(n, {
830
+ }, p = e($.item, c), m = d === "check" ? /* @__PURE__ */ k(n, {
798
831
  name: t,
799
- size: 16,
832
+ size: u === 100 ? 12 : 16,
800
833
  className: $.checkIcon
801
- }), p = o ? /* @__PURE__ */ k("span", {
834
+ }) : null, h = o ? /* @__PURE__ */ k("span", {
802
835
  className: $.icon,
803
836
  children: o
804
837
  }) : null;
805
- return r === void 0 ? /* @__PURE__ */ A(nn, {
838
+ return r === void 0 ? /* @__PURE__ */ A(rn, {
806
839
  disabled: i,
807
- onSelect: u,
808
- className: d,
840
+ onSelect: f,
841
+ className: p,
809
842
  children: [
810
- f,
811
- p,
843
+ m,
844
+ h,
812
845
  /* @__PURE__ */ k("span", {
813
846
  className: $.label,
814
847
  children: a
815
848
  })
816
849
  ]
817
- }) : /* @__PURE__ */ A(an, {
850
+ }) : /* @__PURE__ */ A(on, {
818
851
  value: r,
819
852
  disabled: i,
820
- onSelect: u,
821
- className: d,
853
+ onSelect: f,
854
+ className: p,
822
855
  children: [
823
- f,
824
- p,
856
+ m,
857
+ h,
825
858
  /* @__PURE__ */ k("span", {
826
859
  className: $.label,
827
860
  children: a
@@ -829,6 +862,6 @@ function ln({ value: r, disabled: i, children: a, icon: o, onSelect: s, classNam
829
862
  ]
830
863
  });
831
864
  }
832
- var un = ({ className: t }) => /* @__PURE__ */ k(on, { className: e($.separator, t) });
865
+ var fn = ({ className: t }) => /* @__PURE__ */ k(sn, { className: e($.separator, t) });
833
866
  //#endregion
834
- export { ln as n, un as r, cn as t };
867
+ export { dn as n, fn as r, un as t };