welcome-ui 10.0.0-alpha.3 → 10.0.0-alpha.5

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