welcome-ui 0.0.0-dev.1763389246174 → 0.0.0-dev.1763736449682

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 (128) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +11 -10
  4. package/dist/Alert.js +39 -31
  5. package/dist/Avatar.js +12 -11
  6. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  7. package/dist/Breadcrumb.js +75 -71
  8. package/dist/Button.css +1 -1
  9. package/dist/Button.js +42 -41
  10. package/dist/ButtonGroup.js +5 -4
  11. package/dist/Card.css +1 -1
  12. package/dist/Card.js +67 -15
  13. package/dist/Checkbox.js +29 -29
  14. package/dist/CloseButton.js +6 -5
  15. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  16. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  17. package/dist/DatePicker.js +81 -78
  18. package/dist/DateTimePicker.js +22 -21
  19. package/dist/Drawer.js +100 -80
  20. package/dist/DropdownMenu.css +1 -1
  21. package/dist/DropdownMenu.js +898 -462
  22. package/dist/FieldGroup.js +8 -7
  23. package/dist/FileDrop.js +183 -176
  24. package/dist/FileUpload.js +42 -40
  25. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  26. package/dist/Hint.js +8 -7
  27. package/dist/Icon.js +20 -15
  28. package/dist/InputText.css +1 -1
  29. package/dist/InputText.js +63 -62
  30. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  31. package/dist/Label.js +8 -7
  32. package/dist/Link.css +1 -1
  33. package/dist/Link.js +51 -48
  34. package/dist/Loader.js +11 -10
  35. package/dist/Logo.js +20 -13
  36. package/dist/Modal.js +144 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +38 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +88 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +19 -19
  46. package/dist/RadioGroup.js +28 -27
  47. package/dist/RadioTab.js +1 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +107 -101
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +203 -202
  54. package/dist/Slider.js +65 -61
  55. package/dist/Stepper.js +33 -27
  56. package/dist/StickyNote.js +29 -23
  57. package/dist/Swiper.js +51 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +33 -21
  60. package/dist/Tabs.js +160 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +69 -65
  63. package/dist/Text.js +3 -2
  64. package/dist/Textarea.css +1 -1
  65. package/dist/Textarea.js +25 -18
  66. package/dist/TimePicker.js +22 -21
  67. package/dist/Toast.js +226 -201
  68. package/dist/Toggle.js +15 -14
  69. package/dist/Tooltip.js +28 -27
  70. package/dist/VariantIcon.js +6 -5
  71. package/dist/VisuallyHidden.js +7 -6
  72. package/dist/WelcomeLoader.js +3 -2
  73. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  74. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  75. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Icon/icons.d.ts +4 -3
  102. package/dist/types/components/Loader/index.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  109. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  110. package/dist/types/components/Modal/index.d.ts +16 -4
  111. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  112. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  113. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  114. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  115. package/dist/types/components/Stepper/index.d.ts +8 -2
  116. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  117. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  118. package/dist/types/components/StickyNote/index.d.ts +8 -2
  119. package/dist/types/components/Swiper/index.d.ts +4 -1
  120. package/dist/types/components/Table/index.d.ts +20 -5
  121. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  122. package/dist/types/components/Tag/types.d.ts +4 -2
  123. package/dist/types/components/Textarea/types.d.ts +1 -0
  124. package/dist/types/components/Toast/index.d.ts +4 -1
  125. package/package.json +1 -1
  126. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  127. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  128. package/dist/XCKGTAUF-CahZE721.js +0 -25
@@ -1,291 +1,406 @@
1
1
  "use client";
2
2
  import './DropdownMenu.css';
3
- import { jsx as C, jsxs as Le } from "react/jsx-runtime";
4
- import { u as D, m as Ve, o as Re, p as $e, t as Ke, c as Be, s as me, a as ve, b as ze, d as We } from "./RTNCFSKZ-LcIdBwa8.js";
5
- import { H as je, a as Ue, u as qe, b as Ge, c as Ze, d as Je } from "./GVVKDT6A-C66-lr0B.js";
6
- import { u as ue, C as ge, a as we, f as Qe, b as Xe } from "./SBSPVDDI-BoxPz2JY.js";
7
- import { c as N, _ as P, a as b, f as k, b as F, i as B, d as y, e as Me, u as $, g as Se, s as Ye, r as xe, h as et, j as tt, n as rt, k as nt, l as se, m as U, o as ot, p as ee, q as st, t as at, v as Ce, w as _e, x as ye, y as ut, z as it, A as lt, B as Ee, C as ct, D as dt, E as ft, F as pt, G, H as j, I as R, J as mt, K as vt } from "./OE2EFRVA-DkdhQLJL.js";
8
- import { createContext as Pe, useRef as ie, useCallback as bt, useState as Oe, useEffect as Ae, createRef as ht, useMemo as gt, forwardRef as le } from "react";
9
- import { i as wt } from "./T22PY7TE-CzEDuEn1.js";
10
- import { u as Mt, a as St } from "./OLVWQA7U-wHytlFYu.js";
11
- import { c as xt, R as Ct } from "./NI3IVY7K-DpF3td-7.js";
12
- import { c as te } from "./index-PAaZGbyz.js";
13
- import { u as _t, a as yt } from "./4I4MLMKD-z3Xm3qCo.js";
14
- import { f as Te } from "./forwardRefWithAs-8eP3ZN15.js";
15
- import { c as Et, u as Pt } from "./B7UTNDHN-BDa2-8JK.js";
16
- var Ot = "hr", He = N(
3
+ import { jsx as d, jsxs as j } from "react/jsx-runtime";
4
+ import { t as Ge, c as Ve, u as ze, a as Be, b as L, m as St, o as Pt, p as It, s as He, d as Fe } from "./RTNCFSKZ-BywELldk.js";
5
+ import { H as Et, a as Ot, u as Nt, b as At, c as Dt, d as Tt } from "./GVVKDT6A-CF9ejW_c.js";
6
+ import { u as ke, C as Ke, a as je, f as Lt, b as Ht } from "./SBSPVDDI-CmtnvvUX.js";
7
+ import { c as _, _ as P, a as f, f as x, b as y, i as G, d as I, e as We, u as z, g as Ue, s as Ft, r as re, h as $t, j as Rt, n as Gt, k as ce, l as Me, m as Vt, o as zt, p as be, q as X, t as Bt, v as le, w as Kt, x as jt, y as de, z as K, A as Q, B as $, C as qe, D as Wt, E as Ut, F as qt, G as Ze, H as Zt, I as Jt, J as Qt, K as Je, L as Xt, M as Yt, N as er } from "./OE2EFRVA-Dg1R6gaC.js";
8
+ import { createContext as _e, useRef as xe, useState as ye, useContext as Se, useCallback as tr, useEffect as Y, createRef as rr, useMemo as nr, forwardRef as N, createElement as or } from "react";
9
+ import { i as ar } from "./T22PY7TE-gLuJpoOm.js";
10
+ import { u as sr, a as ur } from "./OLVWQA7U-Dia3UUnG.js";
11
+ import { c as ir, R as cr } from "./NI3IVY7K-Dy240mkD.js";
12
+ import { c as W } from "./index-PAaZGbyz.js";
13
+ import { f as ee } from "./forwardRefWithAs-8eP3ZN15.js";
14
+ import { u as lr, a as dr } from "./4I4MLMKD-BO6Lcy7s.js";
15
+ import { C as mr, u as fr } from "./KPUWHTQJ-Dv3cAqjP.js";
16
+ import { u as pr } from "./SQZLCNLX-Dg4KKdNJ.js";
17
+ import { c as vr, u as hr } from "./B7UTNDHN-BghjolIs.js";
18
+ import { Checkbox as br } from "./Checkbox.js";
19
+ import { Radio as wr } from "./Radio.js";
20
+ import { Toggle as gr } from "./Toggle.js";
21
+ import { Icon as Qe } from "./Icon.js";
22
+ import { InputText as Cr } from "./InputText.js";
23
+ var kr = "hr", Xe = _(
17
24
  function(t) {
18
25
  var r = t, { orientation: e = "horizontal" } = r, o = P(r, ["orientation"]);
19
- return o = b({
26
+ return o = f({
20
27
  role: "separator",
21
28
  "aria-orientation": e
22
29
  }, o), o;
23
30
  }
24
31
  );
25
- k(function(t) {
26
- const r = He(t);
27
- return F(Ot, r);
32
+ x(function(t) {
33
+ const r = Xe(t);
34
+ return y(kr, r);
28
35
  });
29
- var At = "hr", Ie = N(function(t) {
36
+ var Mr = "hr", Ye = _(function(t) {
30
37
  var r = t, { store: e } = r, o = P(r, ["store"]);
31
- const u = ue();
32
- e = e || u, B(
38
+ const a = ke();
39
+ e = e || a, G(
33
40
  e,
34
41
  process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component."
35
42
  );
36
- const a = e.useState(
37
- (s) => s.orientation === "horizontal" ? "vertical" : "horizontal"
43
+ const s = e.useState(
44
+ (u) => u.orientation === "horizontal" ? "vertical" : "horizontal"
38
45
  );
39
- return o = He(y(b({}, o), { orientation: a })), o;
46
+ return o = Xe(I(f({}, o), { orientation: s })), o;
40
47
  });
41
- k(function(t) {
42
- const r = Ie(t);
43
- return F(At, r);
48
+ x(function(t) {
49
+ const r = Ye(t);
50
+ return y(Mr, r);
44
51
  });
45
- var De = Me(
46
- [we],
47
- [ge]
48
- ), Tt = De.useContext, Ht = De.useScopedContext;
49
- Pe(
52
+ var et = We(
53
+ [je],
54
+ [Ke]
55
+ ), _r = et.useContext, xr = et.useScopedContext;
56
+ _e(
50
57
  void 0
51
58
  );
52
- var It = "div", L = "";
53
- function oe() {
54
- L = "";
59
+ var yr = "div", R = "";
60
+ function pe() {
61
+ R = "";
55
62
  }
56
- function Dt(n) {
63
+ function Sr(n) {
57
64
  const t = n.target;
58
- return t && et(t) ? !1 : n.key === " " && L.length ? !0 : n.key.length === 1 && !n.ctrlKey && !n.altKey && !n.metaKey && /^[\p{Letter}\p{Number}]$/u.test(n.key);
65
+ return t && $t(t) ? !1 : n.key === " " && R.length ? !0 : n.key.length === 1 && !n.ctrlKey && !n.altKey && !n.metaKey && /^[\p{Letter}\p{Number}]$/u.test(n.key);
59
66
  }
60
- function Nt(n, t) {
61
- if (tt(n)) return !0;
67
+ function Pr(n, t) {
68
+ if (Rt(n)) return !0;
62
69
  const r = n.target;
63
70
  return r ? t.some((o) => o.element === r) : !1;
64
71
  }
65
- function kt(n) {
72
+ function Ir(n) {
66
73
  return n.filter((t) => !t.disabled);
67
74
  }
68
- function Y(n, t) {
75
+ function ue(n, t) {
69
76
  var r;
70
77
  const e = ((r = n.element) == null ? void 0 : r.textContent) || n.children || // The composite item object itself doesn't include a value property, but
71
78
  // other components like Select do. Since CompositeTypeahead is a generic
72
79
  // component that can be used with those as well, we also consider the value
73
80
  // property as a fallback for the typeahead text content.
74
81
  "value" in n && n.value;
75
- return e ? rt(e).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
82
+ return e ? Gt(e).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
76
83
  }
77
- function Ft(n, t, r) {
84
+ function Er(n, t, r) {
78
85
  if (!r) return n;
79
86
  const e = n.find((o) => o.id === r);
80
- return !e || !Y(e, t) || L !== t && Y(e, L) ? n : (L = t, Qe(
81
- n.filter((o) => Y(o, L)),
87
+ return !e || !ue(e, t) || R !== t && ue(e, R) ? n : (R = t, Lt(
88
+ n.filter((o) => ue(o, R)),
82
89
  r
83
90
  ).filter((o) => o.id !== r));
84
91
  }
85
- var ce = N(function(t) {
86
- var r = t, { store: e, typeahead: o = !0 } = r, u = P(r, ["store", "typeahead"]);
87
- const a = ue();
88
- e = e || a, B(
92
+ var Pe = _(function(t) {
93
+ var r = t, { store: e, typeahead: o = !0 } = r, a = P(r, ["store", "typeahead"]);
94
+ const s = ke();
95
+ e = e || s, G(
89
96
  e,
90
97
  process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component"
91
98
  );
92
- const s = u.onKeyDownCapture, l = ie(0), d = $((i) => {
93
- if (s == null || s(i), i.defaultPrevented || !o || !e) return;
94
- if (!Dt(i))
95
- return oe();
96
- const { renderedItems: g, items: m, activeId: c, id: x } = e.getState();
97
- let p = kt(
98
- m.length > g.length ? m : g
99
+ const u = a.onKeyDownCapture, m = xe(0), c = z((l) => {
100
+ if (u == null || u(l), l.defaultPrevented || !o || !e) return;
101
+ if (!Sr(l))
102
+ return pe();
103
+ const { renderedItems: b, items: p, activeId: i, id: C } = e.getState();
104
+ let v = Ir(
105
+ p.length > b.length ? p : b
99
106
  );
100
- const f = Se(i.currentTarget), M = `[data-offscreen-id="${x}"]`, v = f.querySelectorAll(M);
101
- for (const S of v) {
107
+ const h = Ue(l.currentTarget), M = `[data-offscreen-id="${C}"]`, w = h.querySelectorAll(M);
108
+ for (const S of w) {
102
109
  const H = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
103
- p.push({ id: S.id, element: S, disabled: H });
110
+ v.push({ id: S.id, element: S, disabled: H });
104
111
  }
105
- if (v.length && (p = Ye(p, (S) => S.element)), !Nt(i, p)) return oe();
106
- i.preventDefault(), window.clearTimeout(l.current), l.current = window.setTimeout(() => {
107
- L = "";
112
+ if (w.length && (v = Ft(v, (S) => S.element)), !Pr(l, v)) return pe();
113
+ l.preventDefault(), window.clearTimeout(m.current), m.current = window.setTimeout(() => {
114
+ R = "";
108
115
  }, 500);
109
- const O = i.key.toLowerCase();
110
- L += O, p = Ft(p, O, c);
111
- const E = p.find((S) => Y(S, L));
112
- E ? e.move(E.id) : oe();
116
+ const A = l.key.toLowerCase();
117
+ R += A, v = Er(v, A, i);
118
+ const O = v.find((S) => ue(S, R));
119
+ O ? e.move(O.id) : pe();
113
120
  });
114
- return u = y(b({}, u), {
115
- onKeyDownCapture: d
116
- }), xe(u);
121
+ return a = I(f({}, a), {
122
+ onKeyDownCapture: c
123
+ }), re(a);
117
124
  });
118
- k(function(t) {
119
- const r = ce(t);
120
- return F(It, r);
125
+ x(function(t) {
126
+ const r = Pe(t);
127
+ return y(yr, r);
121
128
  });
122
- var Lt = "div";
123
- function Ne(n) {
129
+ var tt = _e(void 0), Or = "div", rt = _(
130
+ function(t) {
131
+ const [r, e] = ye();
132
+ return t = ce(
133
+ t,
134
+ (o) => /* @__PURE__ */ d(tt.Provider, { value: e, children: o }),
135
+ []
136
+ ), t = f({
137
+ role: "group",
138
+ "aria-labelledby": r
139
+ }, t), re(t);
140
+ }
141
+ );
142
+ x(function(t) {
143
+ const r = rt(t);
144
+ return y(Or, r);
145
+ });
146
+ var Nr = "div", nt = _(
147
+ function(t) {
148
+ var r = t, { store: e } = r, o = P(r, ["store"]);
149
+ return o = rt(o), o;
150
+ }
151
+ );
152
+ x(function(t) {
153
+ const r = nt(t);
154
+ return y(Nr, r);
155
+ });
156
+ var Ar = "div", ot = _(
157
+ function(t) {
158
+ const r = Se(tt), e = Me(t.id);
159
+ return Vt(() => (r == null || r(e), () => r == null ? void 0 : r(void 0)), [r, e]), t = f({
160
+ id: e,
161
+ "aria-hidden": !0
162
+ }, t), re(t);
163
+ }
164
+ );
165
+ x(function(t) {
166
+ const r = ot(t);
167
+ return y(Ar, r);
168
+ });
169
+ var Dr = "div", at = _(function(t) {
170
+ var r = t, { store: e } = r, o = P(r, ["store"]);
171
+ return o = ot(o), o;
172
+ });
173
+ x(function(t) {
174
+ const r = at(t);
175
+ return y(Dr, r);
176
+ });
177
+ var Tr = "div";
178
+ function st(n) {
124
179
  const t = n.relatedTarget;
125
180
  return (t == null ? void 0 : t.nodeType) === Node.ELEMENT_NODE ? t : null;
126
181
  }
127
- function Vt(n) {
128
- const t = Ne(n);
129
- return t ? st(n.currentTarget, t) : !1;
182
+ function Lr(n) {
183
+ const t = st(n);
184
+ return t ? Kt(n.currentTarget, t) : !1;
130
185
  }
131
- var ae = Symbol("composite-hover");
132
- function Rt(n) {
133
- let t = Ne(n);
186
+ var we = Symbol("composite-hover");
187
+ function Hr(n) {
188
+ let t = st(n);
134
189
  if (!t) return !1;
135
190
  do {
136
- if (at(t, ae) && t[ae]) return !0;
191
+ if (jt(t, we) && t[we]) return !0;
137
192
  t = t.parentElement;
138
193
  } while (t);
139
194
  return !1;
140
195
  }
141
- var ke = N(
196
+ var ut = _(
142
197
  function(t) {
143
198
  var r = t, {
144
199
  store: e,
145
200
  focusOnHover: o = !0,
146
- blurOnHoverEnd: u = !!o
147
- } = r, a = P(r, [
201
+ blurOnHoverEnd: a = !!o
202
+ } = r, s = P(r, [
148
203
  "store",
149
204
  "focusOnHover",
150
205
  "blurOnHoverEnd"
151
206
  ]);
152
- const s = ue();
153
- e = e || s, B(
207
+ const u = ke();
208
+ e = e || u, G(
154
209
  e,
155
210
  process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
156
211
  );
157
- const l = nt(), d = a.onMouseMove, i = se(o), g = $((f) => {
158
- if (d == null || d(f), !f.defaultPrevented && l() && i(f)) {
159
- if (!U(f.currentTarget)) {
212
+ const m = zt(), c = s.onMouseMove, l = be(o), b = z((h) => {
213
+ if (c == null || c(h), !h.defaultPrevented && m() && l(h)) {
214
+ if (!X(h.currentTarget)) {
160
215
  const M = e == null ? void 0 : e.getState().baseElement;
161
- M && !ot(M) && M.focus();
216
+ M && !Bt(M) && M.focus();
162
217
  }
163
- e == null || e.setActiveId(f.currentTarget.id);
218
+ e == null || e.setActiveId(h.currentTarget.id);
164
219
  }
165
- }), m = a.onMouseLeave, c = se(u), x = $((f) => {
220
+ }), p = s.onMouseLeave, i = be(a), C = z((h) => {
166
221
  var M;
167
- m == null || m(f), !f.defaultPrevented && l() && (Vt(f) || Rt(f) || i(f) && c(f) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().baseElement) == null || M.focus()));
168
- }), p = bt((f) => {
169
- f && (f[ae] = !0);
222
+ p == null || p(h), !h.defaultPrevented && m() && (Lr(h) || Hr(h) || l(h) && i(h) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().baseElement) == null || M.focus()));
223
+ }), v = tr((h) => {
224
+ h && (h[we] = !0);
170
225
  }, []);
171
- return a = y(b({}, a), {
172
- ref: ee(p, a.ref),
173
- onMouseMove: g,
174
- onMouseLeave: x
175
- }), xe(a);
226
+ return s = I(f({}, s), {
227
+ ref: le(v, s.ref),
228
+ onMouseMove: b,
229
+ onMouseLeave: C
230
+ }), re(s);
176
231
  }
177
232
  );
178
- Ce(
179
- k(function(t) {
180
- const r = ke(t);
181
- return F(Lt, r);
233
+ de(
234
+ x(function(t) {
235
+ const r = ut(t);
236
+ return y(Tr, r);
182
237
  })
183
238
  );
184
- var Z = Me(
185
- [we, Ue],
186
- [ge, je]
187
- ), de = Z.useContext, $t = Z.useScopedContext, re = Z.useProviderContext, Kt = Z.ContextProvider, Bt = Z.ScopedContextProvider;
188
- Pe(
189
- void 0
239
+ var Fr = "span", $r = /* @__PURE__ */ d(
240
+ "svg",
241
+ {
242
+ display: "block",
243
+ fill: "none",
244
+ stroke: "currentColor",
245
+ strokeLinecap: "round",
246
+ strokeLinejoin: "round",
247
+ strokeWidth: 1.5,
248
+ viewBox: "0 0 16 16",
249
+ height: "1em",
250
+ width: "1em",
251
+ children: /* @__PURE__ */ d("polyline", { points: "4,8 7,12 12,4" })
252
+ }
253
+ );
254
+ function Rr(n) {
255
+ return n.checked ? n.children || $r : typeof n.children == "function" ? n.children : null;
256
+ }
257
+ var it = _(
258
+ function(t) {
259
+ var r = t, { store: e, checked: o } = r, a = P(r, ["store", "checked"]);
260
+ const s = Se(mr);
261
+ o = o ?? s;
262
+ const u = Rr({ checked: o, children: a.children });
263
+ return a = I(f({
264
+ "aria-hidden": !0
265
+ }, a), {
266
+ children: u,
267
+ style: f({
268
+ width: "1em",
269
+ height: "1em",
270
+ pointerEvents: "none"
271
+ }, a.style)
272
+ }), re(a);
273
+ }
190
274
  );
191
- var zt = "div";
192
- function Wt(n) {
275
+ x(function(t) {
276
+ const r = it(t);
277
+ return y(Fr, r);
278
+ });
279
+ function Gr(n = {}) {
280
+ var t;
281
+ Ge(n, n.store);
282
+ const r = (t = n.store) == null ? void 0 : t.getState(), e = {
283
+ value: K(
284
+ n.value,
285
+ r == null ? void 0 : r.value,
286
+ n.defaultValue,
287
+ !1
288
+ )
289
+ }, o = Ve(e, n.store);
290
+ return Q($({}, o), {
291
+ setValue: (a) => o.setState("value", a)
292
+ });
293
+ }
294
+ function Vr(n, t, r) {
295
+ return qe(t, [r.store]), Be(n, r, "value", "setValue"), n;
296
+ }
297
+ function zr(n = {}) {
298
+ const [t, r] = ze(Gr, n);
299
+ return Vr(t, r, n);
300
+ }
301
+ var ne = We(
302
+ [je, Ot],
303
+ [Ke, Et]
304
+ ), me = ne.useContext, Ie = ne.useScopedContext, fe = ne.useProviderContext, ct = ne.ContextProvider, Br = ne.ScopedContextProvider, lt = _e(
305
+ void 0
306
+ ), Kr = "div";
307
+ function jr(n) {
193
308
  var t = n, { store: r } = t, e = P(t, ["store"]);
194
- const [o, u] = Oe(void 0), a = e["aria-label"], s = D(r, "disclosureElement"), l = D(r, "contentElement");
195
- return Ae(() => {
196
- const d = s;
197
- if (!d) return;
198
- const i = l;
199
- if (!i) return;
200
- a || i.hasAttribute("aria-label") ? u(void 0) : d.id && u(d.id);
201
- }, [a, s, l]), o;
309
+ const [o, a] = ye(void 0), s = e["aria-label"], u = L(r, "disclosureElement"), m = L(r, "contentElement");
310
+ return Y(() => {
311
+ const c = u;
312
+ if (!c) return;
313
+ const l = m;
314
+ if (!l) return;
315
+ s || l.hasAttribute("aria-label") ? a(void 0) : c.id && a(c.id);
316
+ }, [s, u, m]), o;
202
317
  }
203
- var Fe = N(
318
+ var dt = _(
204
319
  function(t) {
205
- var r = t, { store: e, alwaysVisible: o, composite: u } = r, a = P(r, ["store", "alwaysVisible", "composite"]);
206
- const s = re();
207
- e = e || s, B(
320
+ var r = t, { store: e, alwaysVisible: o, composite: a } = r, s = P(r, ["store", "alwaysVisible", "composite"]);
321
+ const u = fe();
322
+ e = e || u, G(
208
323
  e,
209
324
  process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
210
325
  );
211
- const l = e.parent, d = e.menubar, i = !!l, g = _e(a.id), m = a.onKeyDown, c = e.useState(
212
- (w) => w.placement.split("-")[0]
213
- ), x = e.useState(
214
- (w) => w.orientation === "both" ? void 0 : w.orientation
215
- ), p = x !== "vertical", f = D(
216
- d,
217
- (w) => !!w && w.orientation !== "vertical"
218
- ), M = $((w) => {
219
- if (m == null || m(w), !w.defaultPrevented) {
220
- if (i || d && !p) {
221
- const A = {
222
- ArrowRight: () => c === "left" && !p,
223
- ArrowLeft: () => c === "right" && !p,
224
- ArrowUp: () => c === "bottom" && p,
225
- ArrowDown: () => c === "top" && p
226
- }[w.key];
227
- if (A != null && A())
228
- return w.stopPropagation(), w.preventDefault(), e == null ? void 0 : e.hide();
326
+ const m = e.parent, c = e.menubar, l = !!m, b = Me(s.id), p = s.onKeyDown, i = e.useState(
327
+ (k) => k.placement.split("-")[0]
328
+ ), C = e.useState(
329
+ (k) => k.orientation === "both" ? void 0 : k.orientation
330
+ ), v = C !== "vertical", h = L(
331
+ c,
332
+ (k) => !!k && k.orientation !== "vertical"
333
+ ), M = z((k) => {
334
+ if (p == null || p(k), !k.defaultPrevented) {
335
+ if (l || c && !v) {
336
+ const D = {
337
+ ArrowRight: () => i === "left" && !v,
338
+ ArrowLeft: () => i === "right" && !v,
339
+ ArrowUp: () => i === "bottom" && v,
340
+ ArrowDown: () => i === "top" && v
341
+ }[k.key];
342
+ if (D != null && D())
343
+ return k.stopPropagation(), k.preventDefault(), e == null ? void 0 : e.hide();
229
344
  }
230
- if (d) {
231
- const A = {
345
+ if (c) {
346
+ const D = {
232
347
  ArrowRight: () => {
233
- if (f)
234
- return d.next();
348
+ if (h)
349
+ return c.next();
235
350
  },
236
351
  ArrowLeft: () => {
237
- if (f)
238
- return d.previous();
352
+ if (h)
353
+ return c.previous();
239
354
  },
240
355
  ArrowDown: () => {
241
- if (!f)
242
- return d.next();
356
+ if (!h)
357
+ return c.next();
243
358
  },
244
359
  ArrowUp: () => {
245
- if (!f)
246
- return d.previous();
360
+ if (!h)
361
+ return c.previous();
247
362
  }
248
- }[w.key], V = A == null ? void 0 : A();
249
- V !== void 0 && (w.stopPropagation(), w.preventDefault(), d.move(V));
363
+ }[k.key], V = D == null ? void 0 : D();
364
+ V !== void 0 && (k.stopPropagation(), k.preventDefault(), c.move(V));
250
365
  }
251
366
  }
252
367
  });
253
- a = ye(
254
- a,
255
- (w) => /* @__PURE__ */ C(Bt, { value: e, children: w }),
368
+ s = ce(
369
+ s,
370
+ (k) => /* @__PURE__ */ d(Br, { value: e, children: k }),
256
371
  [e]
257
372
  );
258
- const v = Wt(b({ store: e }, a)), O = e.useState("mounted"), E = wt(O, a.hidden, o), S = E ? y(b({}, a.style), { display: "none" }) : a.style;
259
- a = y(b({
260
- id: g,
261
- "aria-labelledby": v,
262
- hidden: E
263
- }, a), {
264
- ref: ee(g ? e.setContentElement : null, a.ref),
373
+ const w = jr(f({ store: e }, s)), A = e.useState("mounted"), O = ar(A, s.hidden, o), S = O ? I(f({}, s.style), { display: "none" }) : s.style;
374
+ s = I(f({
375
+ id: b,
376
+ "aria-labelledby": w,
377
+ hidden: O
378
+ }, s), {
379
+ ref: le(b ? e.setContentElement : null, s.ref),
265
380
  style: S,
266
381
  onKeyDown: M
267
382
  });
268
383
  const H = !!e.combobox;
269
- return u = u ?? !H, u && (a = b({
384
+ return a = a ?? !H, a && (s = f({
270
385
  role: "menu",
271
- "aria-orientation": x
272
- }, a)), a = Mt(b({ store: e, composite: u }, a)), a = ce(b({ store: e, typeahead: !H }, a)), a;
386
+ "aria-orientation": C
387
+ }, s)), s = sr(f({ store: e, composite: a }, s)), s = Pe(f({ store: e, typeahead: !H }, s)), s;
273
388
  }
274
389
  );
275
- k(function(t) {
276
- const r = Fe(t);
277
- return F(zt, r);
390
+ x(function(t) {
391
+ const r = dt(t);
392
+ return y(Kr, r);
278
393
  });
279
- var jt = "div", Ut = N(function(t) {
394
+ var Wr = "div", Ur = _(function(t) {
280
395
  var r = t, {
281
396
  store: e,
282
397
  modal: o = !1,
283
- portal: u = !!o,
284
- hideOnEscape: a = !0,
285
- autoFocusOnShow: s = !0,
286
- hideOnHoverOutside: l,
287
- alwaysVisible: d
288
- } = r, i = P(r, [
398
+ portal: a = !!o,
399
+ hideOnEscape: s = !0,
400
+ autoFocusOnShow: u = !0,
401
+ hideOnHoverOutside: m,
402
+ alwaysVisible: c
403
+ } = r, l = P(r, [
289
404
  "store",
290
405
  "modal",
291
406
  "portal",
@@ -294,96 +409,96 @@ var jt = "div", Ut = N(function(t) {
294
409
  "hideOnHoverOutside",
295
410
  "alwaysVisible"
296
411
  ]);
297
- const g = re();
298
- e = e || g, B(
412
+ const b = fe();
413
+ e = e || b, G(
299
414
  e,
300
415
  process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
301
416
  );
302
- const m = ie(null), c = e.parent, x = e.menubar, p = !!c, f = !!x && !p;
303
- i = y(b({}, i), {
304
- ref: ee(m, i.ref)
417
+ const p = xe(null), i = e.parent, C = e.menubar, v = !!i, h = !!C && !v;
418
+ l = I(f({}, l), {
419
+ ref: le(p, l.ref)
305
420
  });
306
- const M = Fe(b({
421
+ const M = dt(f({
307
422
  store: e,
308
- alwaysVisible: d
309
- }, i)), { "aria-labelledby": v } = M;
310
- i = P(M, ["aria-labelledby"]);
311
- const [E, S] = Oe(), H = e.useState("autoFocusOnShow"), w = e.useState("initialFocus"), z = e.useState("baseElement"), A = e.useState("renderedItems");
312
- Ae(() => {
313
- let I = !1;
314
- return S((_) => {
315
- var Q, fe, pe;
316
- if (I || !H) return;
317
- if ((Q = _ == null ? void 0 : _.current) != null && Q.isConnected) return _;
318
- const X = ht();
319
- switch (w) {
423
+ alwaysVisible: c
424
+ }, l)), { "aria-labelledby": w } = M;
425
+ l = P(M, ["aria-labelledby"]);
426
+ const [O, S] = ye(), H = e.useState("autoFocusOnShow"), k = e.useState("initialFocus"), Z = e.useState("baseElement"), D = e.useState("renderedItems");
427
+ Y(() => {
428
+ let F = !1;
429
+ return S((E) => {
430
+ var ae, Te, Le;
431
+ if (F || !H) return;
432
+ if ((ae = E == null ? void 0 : E.current) != null && ae.isConnected) return E;
433
+ const se = rr();
434
+ switch (k) {
320
435
  // TODO: Refactor
321
436
  case "first":
322
- X.current = ((fe = A.find((q) => !q.disabled && q.element)) == null ? void 0 : fe.element) || null;
437
+ se.current = ((Te = D.find((te) => !te.disabled && te.element)) == null ? void 0 : Te.element) || null;
323
438
  break;
324
439
  case "last":
325
- X.current = ((pe = [...A].reverse().find((q) => !q.disabled && q.element)) == null ? void 0 : pe.element) || null;
440
+ se.current = ((Le = [...D].reverse().find((te) => !te.disabled && te.element)) == null ? void 0 : Le.element) || null;
326
441
  break;
327
442
  default:
328
- X.current = z;
443
+ se.current = Z;
329
444
  }
330
- return X;
445
+ return se;
331
446
  }), () => {
332
- I = !0;
447
+ F = !0;
333
448
  };
334
- }, [e, H, w, A, z]);
335
- const V = p ? !1 : o, h = !!s, T = !!E || !!i.initialFocus || !!V, W = D(
449
+ }, [e, H, k, D, Z]);
450
+ const V = v ? !1 : o, g = !!u, T = !!O || !!l.initialFocus || !!V, J = L(
336
451
  e.combobox || e,
337
452
  "contentElement"
338
- ), K = D(
339
- (c == null ? void 0 : c.combobox) || c,
453
+ ), B = L(
454
+ (i == null ? void 0 : i.combobox) || i,
340
455
  "contentElement"
341
- ), J = gt(() => {
342
- if (!K || !W) return;
343
- const I = W.getAttribute("role"), _ = K.getAttribute("role");
344
- if (!((_ === "menu" || _ === "menubar") && I === "menu"))
345
- return K;
346
- }, [W, K]);
347
- return J !== void 0 && (i = b({
348
- preserveTabOrderAnchor: J
349
- }, i)), i = qe(y(b({
456
+ ), oe = nr(() => {
457
+ if (!B || !J) return;
458
+ const F = J.getAttribute("role"), E = B.getAttribute("role");
459
+ if (!((E === "menu" || E === "menubar") && F === "menu"))
460
+ return B;
461
+ }, [J, B]);
462
+ return oe !== void 0 && (l = f({
463
+ preserveTabOrderAnchor: oe
464
+ }, l)), l = Nt(I(f({
350
465
  store: e,
351
- alwaysVisible: d,
352
- initialFocus: E,
353
- autoFocusOnShow: h ? T && s : H || !!V
354
- }, i), {
355
- hideOnEscape(I) {
356
- return it(a, I) ? !1 : (e == null || e.hideAll(), !0);
466
+ alwaysVisible: c,
467
+ initialFocus: O,
468
+ autoFocusOnShow: g ? T && u : H || !!V
469
+ }, l), {
470
+ hideOnEscape(F) {
471
+ return Ut(s, F) ? !1 : (e == null || e.hideAll(), !0);
357
472
  },
358
- hideOnHoverOutside(I) {
359
- const _ = e == null ? void 0 : e.getState().disclosureElement;
360
- return (typeof l == "function" ? l(I) : l ?? (p ? !0 : f ? _ ? !U(_) : !0 : !1)) ? I.defaultPrevented || !p || !_ || (ut(_, "mouseout", I), !U(_)) ? !0 : (requestAnimationFrame(() => {
361
- U(_) || e == null || e.hide();
473
+ hideOnHoverOutside(F) {
474
+ const E = e == null ? void 0 : e.getState().disclosureElement;
475
+ return (typeof m == "function" ? m(F) : m ?? (v ? !0 : h ? E ? !X(E) : !0 : !1)) ? F.defaultPrevented || !v || !E || (Wt(E, "mouseout", F), !X(E)) ? !0 : (requestAnimationFrame(() => {
476
+ X(E) || e == null || e.hide();
362
477
  }), !1) : !1;
363
478
  },
364
479
  modal: V,
365
- portal: u,
366
- backdrop: p ? !1 : i.backdrop
367
- })), i = b({
368
- "aria-labelledby": v
369
- }, i), i;
370
- }), qt = xt(
371
- k(function(t) {
372
- const r = Ut(t);
373
- return F(jt, r);
480
+ portal: a,
481
+ backdrop: v ? !1 : l.backdrop
482
+ })), l = f({
483
+ "aria-labelledby": w
484
+ }, l), l;
485
+ }), qr = ir(
486
+ x(function(t) {
487
+ const r = Ur(t);
488
+ return y(Wr, r);
374
489
  }),
375
- re
376
- ), Gt = "div", Zt = N(
490
+ fe
491
+ ), Zr = "div", Jr = _(
377
492
  function(t) {
378
493
  var r = t, { store: e } = r, o = P(r, ["store"]);
379
- const u = de();
380
- return e = e || u, _t(b({ store: e }, o));
494
+ const a = me();
495
+ return e = e || a, lr(f({ store: e }, o));
381
496
  }
382
- ), Jt = k(function(t) {
383
- const r = Zt(t);
384
- return F(Gt, r);
385
- }), Qt = "button";
386
- function Xt(n, t) {
497
+ ), Qr = x(function(t) {
498
+ const r = Jr(t);
499
+ return y(Zr, r);
500
+ }), Xr = "button";
501
+ function Yr(n, t) {
387
502
  return {
388
503
  ArrowDown: t === "bottom" || t === "top" ? "first" : !1,
389
504
  ArrowUp: t === "bottom" || t === "top" ? "last" : !1,
@@ -391,176 +506,316 @@ function Xt(n, t) {
391
506
  ArrowLeft: t === "left" ? "first" : !1
392
507
  }[n.key];
393
508
  }
394
- function be(n, t) {
509
+ function $e(n, t) {
395
510
  return !!(n != null && n.some((r) => !r.element || r.element === t ? !1 : r.element.getAttribute("aria-expanded") === "true"));
396
511
  }
397
- var Yt = N(
512
+ var en = _(
398
513
  function(t) {
399
514
  var r = t, {
400
515
  store: e,
401
516
  focusable: o,
402
- accessibleWhenDisabled: u,
403
- showOnHover: a
404
- } = r, s = P(r, [
517
+ accessibleWhenDisabled: a,
518
+ showOnHover: s
519
+ } = r, u = P(r, [
405
520
  "store",
406
521
  "focusable",
407
522
  "accessibleWhenDisabled",
408
523
  "showOnHover"
409
524
  ]);
410
- const l = re();
411
- e = e || l, B(
525
+ const m = fe();
526
+ e = e || m, G(
412
527
  e,
413
528
  process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
414
529
  );
415
- const d = ie(null), i = e.parent, g = e.menubar, m = !!i, c = !!g && !m, x = lt(s), p = () => {
416
- const h = d.current;
417
- h && (e == null || e.setDisclosureElement(h), e == null || e.setAnchorElement(h), e == null || e.show());
418
- }, f = s.onFocus, M = $((h) => {
419
- if (f == null || f(h), x || h.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !g) || !c) return;
420
- const { items: T } = g.getState();
421
- be(T, h.currentTarget) && p();
422
- }), v = D(
530
+ const c = xe(null), l = e.parent, b = e.menubar, p = !!l, i = !!b && !p, C = qt(u), v = () => {
531
+ const g = c.current;
532
+ g && (e == null || e.setDisclosureElement(g), e == null || e.setAnchorElement(g), e == null || e.show());
533
+ }, h = u.onFocus, M = z((g) => {
534
+ if (h == null || h(g), C || g.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !b) || !i) return;
535
+ const { items: T } = b.getState();
536
+ $e(T, g.currentTarget) && v();
537
+ }), w = L(
423
538
  e,
424
- (h) => h.placement.split("-")[0]
425
- ), O = s.onKeyDown, E = $((h) => {
426
- if (O == null || O(h), x || h.defaultPrevented) return;
427
- const T = Xt(h, v);
428
- T && (h.preventDefault(), p(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
429
- }), S = s.onClick, H = $((h) => {
430
- if (S == null || S(h), h.defaultPrevented || !e) return;
431
- const T = !h.detail, { open: W } = e.getState();
432
- (!W || T) && ((!m || T) && e.setAutoFocusOnShow(!0), e.setInitialFocus(T ? "first" : "container")), m && p();
539
+ (g) => g.placement.split("-")[0]
540
+ ), A = u.onKeyDown, O = z((g) => {
541
+ if (A == null || A(g), C || g.defaultPrevented) return;
542
+ const T = Yr(g, w);
543
+ T && (g.preventDefault(), v(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
544
+ }), S = u.onClick, H = z((g) => {
545
+ if (S == null || S(g), g.defaultPrevented || !e) return;
546
+ const T = !g.detail, { open: J } = e.getState();
547
+ (!J || T) && ((!p || T) && e.setAutoFocusOnShow(!0), e.setInitialFocus(T ? "first" : "container")), p && v();
433
548
  });
434
- s = ye(
435
- s,
436
- (h) => /* @__PURE__ */ C(Kt, { value: e, children: h }),
549
+ u = ce(
550
+ u,
551
+ (g) => /* @__PURE__ */ d(ct, { value: e, children: g }),
437
552
  [e]
438
- ), m && (s = y(b({}, s), {
439
- render: /* @__PURE__ */ C(Ct.div, { render: s.render })
553
+ ), p && (u = I(f({}, u), {
554
+ render: /* @__PURE__ */ d(cr.div, { render: u.render })
440
555
  }));
441
- const w = _e(s.id), z = D(
442
- (i == null ? void 0 : i.combobox) || i,
556
+ const k = Me(u.id), Z = L(
557
+ (l == null ? void 0 : l.combobox) || l,
443
558
  "contentElement"
444
- ), A = m || c ? Ee(z, "menuitem") : void 0, V = e.useState("contentElement");
445
- return s = y(b({
446
- id: w,
447
- role: A,
448
- "aria-haspopup": ct(V, "menu")
449
- }, s), {
450
- ref: ee(d, s.ref),
559
+ ), D = p || i ? Ze(Z, "menuitem") : void 0, V = e.useState("contentElement");
560
+ return u = I(f({
561
+ id: k,
562
+ role: D,
563
+ "aria-haspopup": Zt(V, "menu")
564
+ }, u), {
565
+ ref: le(c, u.ref),
451
566
  onFocus: M,
452
- onKeyDown: E,
567
+ onKeyDown: O,
453
568
  onClick: H
454
- }), s = Ge(y(b({
569
+ }), u = At(I(f({
455
570
  store: e,
456
571
  focusable: o,
457
- accessibleWhenDisabled: u
458
- }, s), {
459
- showOnHover: (h) => {
572
+ accessibleWhenDisabled: a
573
+ }, u), {
574
+ showOnHover: (g) => {
460
575
  if (!(() => {
461
- if (typeof a == "function") return a(h);
462
- if (a != null) return a;
463
- if (m) return !0;
464
- if (!g) return !1;
465
- const { items: J } = g.getState();
466
- return c && be(J);
576
+ if (typeof s == "function") return s(g);
577
+ if (s != null) return s;
578
+ if (p) return !0;
579
+ if (!b) return !1;
580
+ const { items: oe } = b.getState();
581
+ return i && $e(oe);
467
582
  })()) return !1;
468
- const K = c ? g : i;
469
- return K && K.setActiveId(h.currentTarget.id), !0;
583
+ const B = i ? b : l;
584
+ return B && B.setActiveId(g.currentTarget.id), !0;
470
585
  }
471
- })), s = yt(b({
586
+ })), u = dr(f({
472
587
  store: e,
473
- toggleOnClick: !m,
588
+ toggleOnClick: !p,
474
589
  focusable: o,
475
- accessibleWhenDisabled: u
476
- }, s)), s = ce(b({
590
+ accessibleWhenDisabled: a
591
+ }, u)), u = Pe(f({
477
592
  store: e,
478
- typeahead: c
479
- }, s)), s;
593
+ typeahead: i
594
+ }, u)), u;
595
+ }
596
+ ), mt = x(function(t) {
597
+ const r = en(t);
598
+ return y(Xr, r);
599
+ }), tn = "div", rn = _(
600
+ function(t) {
601
+ return t = nt(t), t;
602
+ }
603
+ ), nn = x(function(t) {
604
+ const r = rn(t);
605
+ return y(tn, r);
606
+ }), on = "div", an = _(
607
+ function(t) {
608
+ return t = at(t), t;
480
609
  }
481
- ), er = k(function(t) {
482
- const r = Yt(t);
483
- return F(Qt, r);
484
- }), tr = "div";
485
- function rr(n, t, r) {
610
+ ), sn = x(function(t) {
611
+ const r = an(t);
612
+ return y(on, r);
613
+ }), un = "div";
614
+ function cn(n, t, r) {
486
615
  var e;
487
616
  if (!n) return !1;
488
- if (U(n)) return !0;
489
- const o = t == null ? void 0 : t.find((l) => {
490
- var d;
491
- return l.element === r ? !1 : ((d = l.element) == null ? void 0 : d.getAttribute("aria-expanded")) === "true";
492
- }), u = (e = o == null ? void 0 : o.element) == null ? void 0 : e.getAttribute("aria-controls");
493
- if (!u) return !1;
494
- const s = Se(n).getElementById(u);
495
- return s ? U(s) ? !0 : !!s.querySelector("[role=menuitem][aria-expanded=true]") : !1;
617
+ if (X(n)) return !0;
618
+ const o = t == null ? void 0 : t.find((m) => {
619
+ var c;
620
+ return m.element === r ? !1 : ((c = m.element) == null ? void 0 : c.getAttribute("aria-expanded")) === "true";
621
+ }), a = (e = o == null ? void 0 : o.element) == null ? void 0 : e.getAttribute("aria-controls");
622
+ if (!a) return !1;
623
+ const u = Ue(n).getElementById(a);
624
+ return u ? X(u) ? !0 : !!u.querySelector("[role=menuitem][aria-expanded=true]") : !1;
496
625
  }
497
- var nr = N(
626
+ var Ee = _(
498
627
  function(t) {
499
628
  var r = t, {
500
629
  store: e,
501
630
  hideOnClick: o = !0,
502
- preventScrollOnKeyDown: u = !0,
503
- focusOnHover: a,
504
- blurOnHoverEnd: s
505
- } = r, l = P(r, [
631
+ preventScrollOnKeyDown: a = !0,
632
+ focusOnHover: s,
633
+ blurOnHoverEnd: u
634
+ } = r, m = P(r, [
506
635
  "store",
507
636
  "hideOnClick",
508
637
  "preventScrollOnKeyDown",
509
638
  "focusOnHover",
510
639
  "blurOnHoverEnd"
511
640
  ]);
512
- const d = $t(!0), i = Ht();
513
- e = e || d || i, B(
641
+ const c = Ie(!0), l = xr();
642
+ e = e || c || l, G(
514
643
  e,
515
644
  process.env.NODE_ENV !== "production" && "MenuItem must be wrapped in a MenuList, Menu or Menubar component"
516
645
  );
517
- const g = l.onClick, m = se(o), c = "hideAll" in e ? e.hideAll : void 0, x = !!c, p = $((v) => {
518
- g == null || g(v), !(v.defaultPrevented || dt(v) || ft(v) || !c || v.currentTarget.getAttribute("aria-haspopup") === "menu") && m(v) && c();
519
- }), f = D(
646
+ const b = m.onClick, p = be(o), i = "hideAll" in e ? e.hideAll : void 0, C = !!i, v = z((w) => {
647
+ b == null || b(w), !(w.defaultPrevented || Jt(w) || Qt(w) || !i || w.currentTarget.getAttribute("aria-haspopup") === "menu") && p(w) && i();
648
+ }), h = L(
520
649
  e,
521
- (v) => "contentElement" in v ? v.contentElement : null
522
- ), M = Ee(f, "menuitem");
523
- return l = y(b({
650
+ (w) => "contentElement" in w ? w.contentElement : null
651
+ ), M = Ze(h, "menuitem");
652
+ return m = I(f({
524
653
  role: M
525
- }, l), {
526
- onClick: p
527
- }), l = Xe(b({
654
+ }, m), {
655
+ onClick: v
656
+ }), m = Ht(f({
528
657
  store: e,
529
- preventScrollOnKeyDown: u
530
- }, l)), l = ke(y(b({
658
+ preventScrollOnKeyDown: a
659
+ }, m)), m = ut(I(f({
531
660
  store: e
532
- }, l), {
533
- focusOnHover(v) {
534
- const O = () => typeof a == "function" ? a(v) : a ?? !0;
535
- if (!e || !O()) return !1;
536
- const { baseElement: E, items: S } = e.getState();
537
- return x ? (v.currentTarget.hasAttribute("aria-expanded") && v.currentTarget.focus(), !0) : rr(E, S, v.currentTarget) ? (v.currentTarget.focus(), !0) : !1;
661
+ }, m), {
662
+ focusOnHover(w) {
663
+ const A = () => typeof s == "function" ? s(w) : s ?? !0;
664
+ if (!e || !A()) return !1;
665
+ const { baseElement: O, items: S } = e.getState();
666
+ return C ? (w.currentTarget.hasAttribute("aria-expanded") && w.currentTarget.focus(), !0) : cn(O, S, w.currentTarget) ? (w.currentTarget.focus(), !0) : !1;
538
667
  },
539
- blurOnHoverEnd(v) {
540
- return typeof s == "function" ? s(v) : s ?? x;
668
+ blurOnHoverEnd(w) {
669
+ return typeof u == "function" ? u(w) : u ?? C;
541
670
  }
542
- })), l;
671
+ })), m;
543
672
  }
544
- ), or = Ce(
545
- k(function(t) {
546
- const r = nr(t);
547
- return F(tr, r);
673
+ ), Oe = de(
674
+ x(function(t) {
675
+ const r = Ee(t);
676
+ return y(un, r);
677
+ })
678
+ ), ln = "span", dn = _(
679
+ function(t) {
680
+ var r = t, { store: e, checked: o } = r, a = P(r, ["store", "checked"]);
681
+ const s = Se(lt);
682
+ return o = o ?? s, a = it(I(f({}, a), { checked: o })), a;
683
+ }
684
+ ), mn = x(function(t) {
685
+ const r = dn(t);
686
+ return y(ln, r);
687
+ }), fn = "div";
688
+ function pn(n) {
689
+ return Array.isArray(n) ? n.toString() : n;
690
+ }
691
+ function ve(n, t, r) {
692
+ if (t === void 0)
693
+ return Array.isArray(n) ? n : !!r;
694
+ const e = pn(t);
695
+ return Array.isArray(n) ? r ? n.includes(e) ? n : [...n, e] : n.filter((o) => o !== e) : r ? e : n === e ? !1 : n;
696
+ }
697
+ var vn = _(
698
+ function(t) {
699
+ var r = t, {
700
+ store: e,
701
+ name: o,
702
+ value: a,
703
+ checked: s,
704
+ defaultChecked: u,
705
+ hideOnClick: m = !1
706
+ } = r, c = P(r, [
707
+ "store",
708
+ "name",
709
+ "value",
710
+ "checked",
711
+ "defaultChecked",
712
+ "hideOnClick"
713
+ ]);
714
+ const l = Ie();
715
+ e = e || l, G(
716
+ e,
717
+ process.env.NODE_ENV !== "production" && "MenuItemCheckbox must be wrapped in a MenuList or Menu component"
718
+ );
719
+ const b = Je(u);
720
+ Y(() => {
721
+ e == null || e.setValue(o, (i = []) => b ? ve(i, a, !0) : i);
722
+ }, [e, o, a, b]), Y(() => {
723
+ s !== void 0 && (e == null || e.setValue(o, (i) => ve(i, a, s)));
724
+ }, [e, o, a, s]);
725
+ const p = zr({
726
+ value: e.useState((i) => i.values[o]),
727
+ setValue(i) {
728
+ e == null || e.setValue(o, () => {
729
+ if (s === void 0) return i;
730
+ const C = ve(i, a, s);
731
+ return !Array.isArray(C) || !Array.isArray(i) ? C : Xt(i, C) ? i : C;
732
+ });
733
+ }
734
+ });
735
+ return c = f({
736
+ role: "menuitemcheckbox"
737
+ }, c), c = fr(f({
738
+ store: p,
739
+ name: o,
740
+ value: a,
741
+ checked: s
742
+ }, c)), c = Ee(f({ store: e, hideOnClick: m }, c)), c;
743
+ }
744
+ ), hn = de(
745
+ x(function(t) {
746
+ const r = vn(t);
747
+ return y(fn, r);
748
+ })
749
+ ), bn = "div";
750
+ function he(n, t, r) {
751
+ return r === void 0 ? n : r ? t : n;
752
+ }
753
+ var wn = _(
754
+ function(t) {
755
+ var r = t, {
756
+ store: e,
757
+ name: o,
758
+ value: a,
759
+ checked: s,
760
+ onChange: u,
761
+ hideOnClick: m = !1
762
+ } = r, c = P(r, [
763
+ "store",
764
+ "name",
765
+ "value",
766
+ "checked",
767
+ "onChange",
768
+ "hideOnClick"
769
+ ]);
770
+ const l = Ie();
771
+ e = e || l, G(
772
+ e,
773
+ process.env.NODE_ENV !== "production" && "MenuItemRadio must be wrapped in a MenuList or Menu component"
774
+ );
775
+ const b = Je(c.defaultChecked);
776
+ Y(() => {
777
+ e == null || e.setValue(o, (i = !1) => he(i, a, b));
778
+ }, [e, o, a, b]), Y(() => {
779
+ s !== void 0 && (e == null || e.setValue(o, (i) => he(i, a, s)));
780
+ }, [e, o, a, s]);
781
+ const p = e.useState((i) => i.values[o] === a);
782
+ return c = ce(
783
+ c,
784
+ (i) => /* @__PURE__ */ d(lt.Provider, { value: !!p, children: i }),
785
+ [p]
786
+ ), c = f({
787
+ role: "menuitemradio"
788
+ }, c), c = pr(f({
789
+ name: o,
790
+ value: a,
791
+ checked: p,
792
+ onChange(i) {
793
+ if (u == null || u(i), i.defaultPrevented) return;
794
+ const C = i.currentTarget;
795
+ e == null || e.setValue(o, (v) => he(v, a, s ?? C.checked));
796
+ }
797
+ }, c)), c = Ee(f({ store: e, hideOnClick: m }, c)), c;
798
+ }
799
+ ), gn = de(
800
+ x(function(t) {
801
+ const r = wn(t);
802
+ return y(bn, r);
548
803
  })
549
804
  );
550
- function sr(n = {}) {
805
+ function Cn(n = {}) {
551
806
  var t = n, {
552
807
  combobox: r,
553
808
  parent: e,
554
809
  menubar: o
555
- } = t, u = pt(t, [
810
+ } = t, a = Yt(t, [
556
811
  "combobox",
557
812
  "parent",
558
813
  "menubar"
559
814
  ]);
560
- const a = !!o && !e, s = Ve(
561
- u.store,
562
- $e(e, ["values"]),
563
- Re(r, [
815
+ const s = !!o && !e, u = St(
816
+ a.store,
817
+ It(e, ["values"]),
818
+ Pt(r, [
564
819
  "arrowElement",
565
820
  "anchorElement",
566
821
  "contentElement",
@@ -568,72 +823,72 @@ function sr(n = {}) {
568
823
  "disclosureElement"
569
824
  ])
570
825
  );
571
- Ke(u, s);
572
- const l = s.getState(), d = Et(G(R({}, u), {
573
- store: s,
574
- orientation: j(
575
- u.orientation,
576
- l.orientation,
826
+ Ge(a, u);
827
+ const m = u.getState(), c = vr(Q($({}, a), {
828
+ store: u,
829
+ orientation: K(
830
+ a.orientation,
831
+ m.orientation,
577
832
  "vertical"
578
833
  )
579
- })), i = Ze(G(R({}, u), {
580
- store: s,
581
- placement: j(
582
- u.placement,
583
- l.placement,
834
+ })), l = Dt(Q($({}, a), {
835
+ store: u,
836
+ placement: K(
837
+ a.placement,
838
+ m.placement,
584
839
  "bottom-start"
585
840
  ),
586
- timeout: j(
587
- u.timeout,
588
- l.timeout,
589
- a ? 0 : 150
841
+ timeout: K(
842
+ a.timeout,
843
+ m.timeout,
844
+ s ? 0 : 150
590
845
  ),
591
- hideTimeout: j(u.hideTimeout, l.hideTimeout, 0)
592
- })), g = G(R(R({}, d.getState()), i.getState()), {
593
- initialFocus: j(l.initialFocus, "container"),
594
- values: j(
595
- u.values,
596
- l.values,
597
- u.defaultValues,
846
+ hideTimeout: K(a.hideTimeout, m.hideTimeout, 0)
847
+ })), b = Q($($({}, c.getState()), l.getState()), {
848
+ initialFocus: K(m.initialFocus, "container"),
849
+ values: K(
850
+ a.values,
851
+ m.values,
852
+ a.defaultValues,
598
853
  {}
599
854
  )
600
- }), m = Be(g, d, i, s);
601
- return me(
602
- m,
603
- () => ve(m, ["mounted"], (c) => {
604
- c.mounted || m.setState("activeId", null);
855
+ }), p = Ve(b, c, l, u);
856
+ return He(
857
+ p,
858
+ () => Fe(p, ["mounted"], (i) => {
859
+ i.mounted || p.setState("activeId", null);
605
860
  })
606
- ), me(
607
- m,
608
- () => ve(e, ["orientation"], (c) => {
609
- m.setState(
861
+ ), He(
862
+ p,
863
+ () => Fe(e, ["orientation"], (i) => {
864
+ p.setState(
610
865
  "placement",
611
- c.orientation === "vertical" ? "right-start" : "bottom-start"
866
+ i.orientation === "vertical" ? "right-start" : "bottom-start"
612
867
  );
613
868
  })
614
- ), G(R(R(R({}, d), i), m), {
869
+ ), Q($($($({}, c), l), p), {
615
870
  combobox: r,
616
871
  parent: e,
617
872
  menubar: o,
618
873
  hideAll: () => {
619
- i.hide(), e == null || e.hideAll();
874
+ l.hide(), e == null || e.hideAll();
620
875
  },
621
- setInitialFocus: (c) => m.setState("initialFocus", c),
622
- setValues: (c) => m.setState("values", c),
623
- setValue: (c, x) => {
624
- c !== "__proto__" && c !== "constructor" && (Array.isArray(c) || m.setState("values", (p) => {
625
- const f = p[c], M = mt(x, f);
626
- return M === f ? p : G(R({}, p), {
627
- [c]: M !== void 0 && M
876
+ setInitialFocus: (i) => p.setState("initialFocus", i),
877
+ setValues: (i) => p.setState("values", i),
878
+ setValue: (i, C) => {
879
+ i !== "__proto__" && i !== "constructor" && (Array.isArray(i) || p.setState("values", (v) => {
880
+ const h = v[i], M = er(C, h);
881
+ return M === h ? v : Q($({}, v), {
882
+ [i]: M !== void 0 && M
628
883
  });
629
884
  }));
630
885
  }
631
886
  });
632
887
  }
633
- function ar(n, t, r) {
634
- return vt(t, [r.combobox, r.parent, r.menubar]), We(n, r, "values", "setValues"), Object.assign(
635
- Je(
636
- Pt(n, t, r),
888
+ function kn(n, t, r) {
889
+ return qe(t, [r.combobox, r.parent, r.menubar]), Be(n, r, "values", "setValues"), Object.assign(
890
+ Tt(
891
+ hr(n, t, r),
637
892
  t,
638
893
  r
639
894
  ),
@@ -644,98 +899,279 @@ function ar(n, t, r) {
644
899
  }
645
900
  );
646
901
  }
647
- function Lr(n = {}) {
648
- const t = de(), r = Tt(), e = St();
649
- n = y(b({}, n), {
902
+ function Ne(n = {}) {
903
+ const t = me(), r = _r(), e = ur();
904
+ n = I(f({}, n), {
650
905
  parent: n.parent !== void 0 ? n.parent : t,
651
906
  menubar: n.menubar !== void 0 ? n.menubar : r,
652
907
  combobox: n.combobox !== void 0 ? n.combobox : e
653
908
  });
654
- const [o, u] = ze(sr, n);
655
- return ar(o, u, n);
909
+ const [o, a] = ze(Cn, n);
910
+ return kn(o, a, n);
656
911
  }
657
- var ur = "hr", ir = N(
912
+ function Mn(n = {}) {
913
+ const t = Ne(n);
914
+ return /* @__PURE__ */ d(ct, { value: t, children: n.children });
915
+ }
916
+ var _n = "hr", xn = _(
658
917
  function(t) {
659
918
  var r = t, { store: e } = r, o = P(r, ["store"]);
660
- const u = de();
661
- return e = e || u, o = Ie(b({ store: e }, o)), o;
919
+ const a = me();
920
+ return e = e || a, o = Ye(f({ store: e }, o)), o;
662
921
  }
663
- ), lr = k(function(t) {
664
- const r = ir(t);
665
- return F(ur, r);
922
+ ), yn = x(function(t) {
923
+ const r = xn(t);
924
+ return y(_n, r);
666
925
  });
667
- const cr = "_inner_glxpl_2", dr = "_arrow_glxpl_17", fr = "_stroke_glxpl_1", pr = "_item_glxpl_43", mr = "_separator_glxpl_70", ne = {
668
- inner: cr,
669
- arrow: dr,
670
- stroke: fr,
671
- "arrow-item": "_arrow-item_glxpl_26",
672
- "arrow-placement-bottom": "_arrow-placement-bottom_glxpl_31",
673
- "arrow-placement-left": "_arrow-placement-left_glxpl_34",
674
- "arrow-placement-right": "_arrow-placement-right_glxpl_37",
675
- "arrow-placement-top": "_arrow-placement-top_glxpl_40",
676
- item: pr,
677
- separator: mr
678
- }, he = te(ne), vr = le(({ className: n, store: t }, r) => {
679
- const e = D(t, "currentPlacement"), [o] = e.split("-");
680
- return /* @__PURE__ */ C(Jt, { ref: r, render: /* @__PURE__ */ C("div", { className: he("arrow", n) }), children: /* @__PURE__ */ Le(
681
- "svg",
926
+ const Sn = "_root_17w9k_2", Pn = "_arrow_17w9k_29", In = "_stroke_17w9k_1", En = "_item_17w9k_55", On = "_action_17w9k_94", Nn = "_search_17w9k_103", An = "_separator_17w9k_146", U = {
927
+ root: Sn,
928
+ arrow: Pn,
929
+ stroke: In,
930
+ "arrow-item": "_arrow-item_17w9k_38",
931
+ "arrow-placement-bottom": "_arrow-placement-bottom_17w9k_43",
932
+ "arrow-placement-left": "_arrow-placement-left_17w9k_46",
933
+ "arrow-placement-right": "_arrow-placement-right_17w9k_49",
934
+ "arrow-placement-top": "_arrow-placement-top_17w9k_52",
935
+ item: En,
936
+ action: On,
937
+ "group-label": "_group-label_17w9k_98",
938
+ search: Nn,
939
+ "item-content": "_item-content_17w9k_106",
940
+ "item-description": "_item-description_17w9k_111",
941
+ "item-default-check": "_item-default-check_17w9k_122",
942
+ "item-toggle-check": "_item-toggle-check_17w9k_127",
943
+ "item-checkbox": "_item-checkbox_17w9k_130",
944
+ "item-radio": "_item-radio_17w9k_131",
945
+ separator: An,
946
+ "size-md": "_size-md_17w9k_155",
947
+ "size-lg": "_size-lg_17w9k_162"
948
+ }, Dn = W(U), ft = ee(
949
+ ({ as: n = "button", className: t, ...r }, e) => /* @__PURE__ */ d(
950
+ Oe,
951
+ {
952
+ ...r,
953
+ render: /* @__PURE__ */ d(n, { className: Dn("item", "action", t), ref: e })
954
+ }
955
+ )
956
+ );
957
+ ft.displayName = "DropdownMenu.Action";
958
+ const Re = W(U), pt = N(
959
+ ({ className: n, store: t, ...r }, e) => {
960
+ const o = me(), a = t ?? o, s = L(a, "currentPlacement"), [u] = s.split("-");
961
+ return /* @__PURE__ */ d(
962
+ Qr,
963
+ {
964
+ ...r,
965
+ ref: e,
966
+ render: /* @__PURE__ */ d("div", { className: Re("arrow", n), children: /* @__PURE__ */ j(
967
+ "svg",
968
+ {
969
+ className: Re("arrow-item", u && `arrow-placement-${u}`),
970
+ viewBox: "0 0 30 30",
971
+ xmlns: "http://www.w3.org/2000/svg",
972
+ children: [
973
+ /* @__PURE__ */ d("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }),
974
+ /* @__PURE__ */ d("path", { d: "M8 30L15 23L22 30H8Z", fill: "currentColor", fillRule: "nonzero" })
975
+ ]
976
+ }
977
+ ) }),
978
+ size: 32,
979
+ store: a
980
+ }
981
+ );
982
+ }
983
+ );
984
+ pt.displayName = "DropdownMenu.Arrow";
985
+ const Tn = W(U), vt = ee(
986
+ ({ as: n = "div", ...t }, r) => /* @__PURE__ */ d(nn, { ref: r, render: /* @__PURE__ */ d(n, {}), ...t })
987
+ );
988
+ vt.displayName = "DropdownMenu.Group";
989
+ const ht = ee(
990
+ ({ as: n = "div", className: t, ...r }, e) => /* @__PURE__ */ d(
991
+ sn,
682
992
  {
683
- className: he("arrow-item", o && `arrow-placement-${o}`),
684
- viewBox: "0 0 30 30",
685
- xmlns: "http://www.w3.org/2000/svg",
686
- children: [
687
- /* @__PURE__ */ C("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }),
688
- /* @__PURE__ */ C("path", { d: "M8 30L15 23L22 30H8Z", fill: "currentColor", fillRule: "nonzero" })
689
- ]
993
+ ...r,
994
+ ref: e,
995
+ render: /* @__PURE__ */ d(n, { className: Tn("item", "group-label", t) })
690
996
  }
691
- ) });
692
- }), br = te(ne), hr = Te(
693
- ({ as: n = "button", className: t, ...r }, e) => /* @__PURE__ */ C(
694
- or,
997
+ )
998
+ );
999
+ ht.displayName = "DropdownMenu.GroupLabel";
1000
+ const q = W(U), Ae = ee(
1001
+ ({ as: n = "button", children: t, className: r, name: e, value: o, variant: a, ...s }, u) => /* @__PURE__ */ d(
1002
+ Oe,
695
1003
  {
696
- render: /* @__PURE__ */ C(n, { className: br("item", t), ref: e }),
697
- type: "button",
698
- ...r
1004
+ hideOnClick: !a || a === "radio" || a === "radio-mark",
1005
+ ...s,
1006
+ ref: u,
1007
+ render: /* @__PURE__ */ d(n, { className: q("item", r), children: (() => {
1008
+ switch (a) {
1009
+ case "checkbox":
1010
+ return /* @__PURE__ */ j(ie, { name: e, value: o, children: [
1011
+ /* @__PURE__ */ d(gt, { name: e, value: o }),
1012
+ t
1013
+ ] });
1014
+ case "checkbox-mark":
1015
+ return /* @__PURE__ */ j(ie, { name: e, value: o, children: [
1016
+ t,
1017
+ /* @__PURE__ */ d(Ce, {})
1018
+ ] });
1019
+ case "radio":
1020
+ return /* @__PURE__ */ j(ge, { name: e, value: o, children: [
1021
+ /* @__PURE__ */ d(Ct, { name: e, value: o }),
1022
+ t
1023
+ ] });
1024
+ case "radio-mark":
1025
+ return /* @__PURE__ */ j(ge, { name: e, value: o, children: [
1026
+ t,
1027
+ /* @__PURE__ */ d(Ce, {})
1028
+ ] });
1029
+ case "toggle":
1030
+ return /* @__PURE__ */ j(ie, { name: e, value: o, children: [
1031
+ /* @__PURE__ */ d(kt, { name: e, value: o }),
1032
+ t
1033
+ ] });
1034
+ default:
1035
+ return t;
1036
+ }
1037
+ })() })
699
1038
  }
700
1039
  )
701
- ), gr = te(ne), wr = le(
702
- ({ className: n, ...t }, r) => /* @__PURE__ */ C(lr, { ref: r, render: /* @__PURE__ */ C("hr", { className: gr("separator", n) }), ...t })
703
- ), Mr = Te(
704
- ({ as: n, store: t, ...r }, e) => /* @__PURE__ */ C(
705
- er,
1040
+ );
1041
+ Ae.displayName = "DropdownMenu.Item";
1042
+ const bt = N(
1043
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-content", n), ref: r })
1044
+ );
1045
+ bt.displayName = "DropdownMenu.ItemContent";
1046
+ const wt = N(
1047
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-description", n), ref: r })
1048
+ );
1049
+ wt.displayName = "DropdownMenu.ItemDescription";
1050
+ const ie = N(
1051
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(hn, { ...t, className: q("item-checkbox", n), ref: r })
1052
+ );
1053
+ ie.displayName = "DropdownMenu.ItemCheckbox";
1054
+ const ge = N(({ className: n, ...t }, r) => /* @__PURE__ */ d(gn, { ...t, className: q("item-radio", n), ref: r }));
1055
+ ge.displayName = "DropdownMenu.ItemRadio";
1056
+ const Ce = N(
1057
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(mn, { ...t, className: q("item-default-check", n), ref: r, children: /* @__PURE__ */ d(Qe, { name: "check", size: "md" }) })
1058
+ );
1059
+ Ce.displayName = "DropdownMenu.ItemDefaultCheck";
1060
+ const gt = N(
1061
+ ({ name: n, value: t = !0, ...r }, e) => {
1062
+ const o = De(n, t);
1063
+ return /* @__PURE__ */ or(
1064
+ br,
1065
+ {
1066
+ "aria-hidden": "true",
1067
+ ...r,
1068
+ checked: o,
1069
+ key: o.toString(),
1070
+ ref: e
1071
+ }
1072
+ );
1073
+ }
1074
+ );
1075
+ gt.displayName = "DropdownMenu.ItemCheckboxCheck";
1076
+ const Ct = N(
1077
+ ({ name: n, value: t, ...r }, e) => {
1078
+ const o = De(n, t);
1079
+ return /* @__PURE__ */ d(wr, { "aria-hidden": "true", ...r, checked: o, ref: e });
1080
+ }
1081
+ );
1082
+ Ct.displayName = "DropdownMenu.ItemRadioCheck";
1083
+ const kt = N(
1084
+ ({ className: n, name: t, value: r = !0, ...e }, o) => {
1085
+ const a = De(t, r);
1086
+ return /* @__PURE__ */ d(
1087
+ gr,
1088
+ {
1089
+ "aria-hidden": "true",
1090
+ ...e,
1091
+ checked: a,
1092
+ className: q("item-toggle-check", n),
1093
+ ref: o,
1094
+ size: "sm"
1095
+ }
1096
+ );
1097
+ }
1098
+ );
1099
+ kt.displayName = "DropdownMenu.ItemToggleCheck";
1100
+ const De = (n, t) => {
1101
+ const r = Ne(), o = L(r).values[n];
1102
+ return Array.isArray(o) ? o.includes(t) : o === t;
1103
+ }, Ln = W(U), Mt = ee(
1104
+ ({ as: n = Cr, className: t, ...r }, e) => /* @__PURE__ */ d(
1105
+ Oe,
706
1106
  {
1107
+ ...r,
1108
+ hideOnClick: !1,
707
1109
  ref: e,
708
- render: n ? (o) => /* @__PURE__ */ C(n, { ...o }) : void 0,
709
- store: t,
710
- ...r
1110
+ render: /* @__PURE__ */ d(n, { className: Ln("item", "search", t), icon: /* @__PURE__ */ d(Qe, { name: "search" }) })
1111
+ }
1112
+ )
1113
+ );
1114
+ Mt.displayName = "DropdownMenu.Search";
1115
+ const Hn = W(U), _t = N(
1116
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(yn, { ...t, ref: r, render: /* @__PURE__ */ d("hr", { className: Hn("separator", n) }) })
1117
+ );
1118
+ _t.displayName = "DropdownMenu.Separator";
1119
+ const xt = ee(
1120
+ ({ as: n, onClick: t, store: r, ...e }, o) => /* @__PURE__ */ d(
1121
+ mt,
1122
+ {
1123
+ onClick: (s) => {
1124
+ s.preventDefault(), t == null || t(s), r.toggle();
1125
+ },
1126
+ ref: o,
1127
+ render: n ? (s) => /* @__PURE__ */ d(n, { ...s }) : void 0,
1128
+ store: r,
1129
+ ...e
711
1130
  }
712
1131
  )
713
- ), Sr = te(ne), xr = 4, Cr = le(
714
- ({ children: n, className: t, dataTestId: r, innerProps: e = {}, store: o, withGutter: u = !0, ...a }, s) => {
715
- const l = D(o, "arrowElement"), d = u && !l ? xr : 0, { className: i, ...g } = e;
716
- return /* @__PURE__ */ C(
717
- qt,
1132
+ );
1133
+ xt.displayName = "DropdownMenu.Trigger";
1134
+ const yt = N(
1135
+ ({ children: n, item: t, size: r = "lg", ...e }, o) => {
1136
+ const a = Ne();
1137
+ return /* @__PURE__ */ j(Mn, { store: a, children: [
1138
+ /* @__PURE__ */ d(mt, { ...e, ref: o, render: /* @__PURE__ */ d(Ae, { children: t }) }),
1139
+ /* @__PURE__ */ d(Gn, { size: r, withGutter: !0, children: n })
1140
+ ] });
1141
+ }
1142
+ );
1143
+ yt.displayName = "DropdownMenu.Submenu";
1144
+ const Fn = W(U), $n = 8, Rn = N(
1145
+ ({ className: n, size: t = "lg", store: r, withGutter: e = !0, ...o }, a) => {
1146
+ const s = L(r, "arrowElement");
1147
+ return /* @__PURE__ */ d(
1148
+ qr,
718
1149
  {
1150
+ ...o,
719
1151
  "aria-label": "dropdown-menu",
720
- className: t,
721
- "data-testid": r,
722
- gutter: d,
723
- ref: s,
724
- render: /* @__PURE__ */ C("div", { className: Sr("inner", i), ...g }),
725
- store: o,
726
- tabIndex: 0,
727
- ...a,
728
- children: n
1152
+ className: n,
1153
+ gutter: e && !s ? $n : 0,
1154
+ ref: a,
1155
+ render: /* @__PURE__ */ d("div", { className: Fn("root", `size-${t}`, n) }),
1156
+ store: r,
1157
+ tabIndex: 0
729
1158
  }
730
1159
  );
731
1160
  }
732
- ), Vr = Object.assign(Cr, {
733
- Arrow: vr,
734
- Item: hr,
735
- Separator: wr,
736
- Trigger: Mr
1161
+ ), Gn = Object.assign(Rn, {
1162
+ Action: ft,
1163
+ Arrow: pt,
1164
+ Content: bt,
1165
+ Description: wt,
1166
+ Group: vt,
1167
+ GroupLabel: ht,
1168
+ Item: Ae,
1169
+ Search: Mt,
1170
+ Separator: _t,
1171
+ Submenu: yt,
1172
+ Trigger: xt
737
1173
  });
738
1174
  export {
739
- Vr as DropdownMenu,
740
- Lr as useDropdownMenu
1175
+ Gn as DropdownMenu,
1176
+ Ne as useDropdownMenu
741
1177
  };