welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.11

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 (179) hide show
  1. package/README.md +1 -1
  2. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  3. package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
  4. package/dist/Accordion.js +20 -18
  5. package/dist/Alert.css +1 -1
  6. package/dist/Alert.js +93 -87
  7. package/dist/AspectRatio.js +2 -1
  8. package/dist/Avatar.js +14 -12
  9. package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
  10. package/dist/Badge.js +2 -1
  11. package/dist/Breadcrumb.css +1 -1
  12. package/dist/Breadcrumb.js +175 -154
  13. package/dist/Button.css +1 -1
  14. package/dist/Button.js +43 -41
  15. package/dist/ButtonGroup.js +7 -5
  16. package/dist/Card.css +1 -1
  17. package/dist/Card.js +68 -15
  18. package/dist/Checkbox.js +32 -30
  19. package/dist/CloseButton.css +1 -1
  20. package/dist/CloseButton.js +15 -13
  21. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  22. package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  23. package/dist/DatePicker.js +96 -91
  24. package/dist/DateTimePicker.js +21 -20
  25. package/dist/Drawer.js +141 -96
  26. package/dist/DropdownMenu.css +1 -1
  27. package/dist/DropdownMenu.js +902 -462
  28. package/dist/Field.css +1 -1
  29. package/dist/Field.js +50 -50
  30. package/dist/FieldGroup.js +9 -7
  31. package/dist/FileDrop.css +1 -1
  32. package/dist/FileDrop.js +433 -398
  33. package/dist/FileUpload.js +44 -41
  34. package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
  35. package/dist/Hint.js +10 -8
  36. package/dist/Icon.css +1 -1
  37. package/dist/Icon.js +36 -22
  38. package/dist/InputText.css +1 -1
  39. package/dist/InputText.js +59 -57
  40. package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  41. package/dist/Label.js +9 -7
  42. package/dist/Link.css +1 -1
  43. package/dist/Link.js +54 -49
  44. package/dist/Loader.js +13 -11
  45. package/dist/Logo.js +21 -13
  46. package/dist/Modal.js +153 -113
  47. package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
  48. package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
  49. package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  50. package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
  51. package/dist/Pagination.css +1 -1
  52. package/dist/Pagination.js +157 -76
  53. package/dist/PasswordInput.js +20 -17
  54. package/dist/Popover.js +89 -72
  55. package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
  56. package/dist/Radio.css +1 -1
  57. package/dist/Radio.js +39 -40
  58. package/dist/RadioGroup.js +29 -27
  59. package/dist/RadioTab.js +3 -2
  60. package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
  61. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  62. package/dist/Search.css +1 -1
  63. package/dist/Search.js +136 -129
  64. package/dist/Select.css +1 -1
  65. package/dist/Select.js +259 -257
  66. package/dist/Slider.js +67 -62
  67. package/dist/Stepper.js +34 -27
  68. package/dist/StickyNote.css +1 -0
  69. package/dist/StickyNote.js +49 -0
  70. package/dist/Swiper.js +53 -51
  71. package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
  72. package/dist/Table.js +34 -21
  73. package/dist/Tabs.js +165 -156
  74. package/dist/Tag.css +1 -1
  75. package/dist/Tag.js +67 -62
  76. package/dist/Text.js +5 -3
  77. package/dist/Textarea.css +1 -1
  78. package/dist/Textarea.js +26 -17
  79. package/dist/TimePicker.js +53 -51
  80. package/dist/Toast.css +1 -1
  81. package/dist/Toast.js +275 -165
  82. package/dist/Toggle.js +17 -15
  83. package/dist/Tooltip.css +1 -1
  84. package/dist/Tooltip.js +120 -129
  85. package/dist/VariantIcon.js +8 -6
  86. package/dist/VisuallyHidden.js +9 -7
  87. package/dist/WelcomeLoader.js +4 -3
  88. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  89. package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
  90. package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  91. package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
  92. package/dist/scss/breakpoints.scss +9 -0
  93. package/dist/scss/text-ellipsis.scss +5 -0
  94. package/dist/scss/texts.scss +108 -0
  95. package/dist/theme.css +1 -1
  96. package/dist/theme.js +1 -0
  97. package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
  98. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  99. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  100. package/dist/types/components/Alert/index.d.ts +7 -3
  101. package/dist/types/components/Alert/types.d.ts +3 -9
  102. package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
  103. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  104. package/dist/types/components/Breadcrumb/types.d.ts +6 -3
  105. package/dist/types/components/Card/Body.d.ts +2 -3
  106. package/dist/types/components/Card/Footer.d.ts +6 -0
  107. package/dist/types/components/Card/Header.d.ts +5 -0
  108. package/dist/types/components/Card/index.d.ts +7 -8
  109. package/dist/types/components/Card/types.d.ts +16 -3
  110. package/dist/types/components/Checkbox/index.d.ts +1 -2
  111. package/dist/types/components/Checkbox/types.d.ts +3 -1
  112. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  113. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  114. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  115. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  116. package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
  117. package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
  118. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  119. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  120. package/dist/types/components/Drawer/index.d.ts +13 -4
  121. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  122. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  123. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  124. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  125. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  126. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  127. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  128. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  129. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  130. package/dist/types/components/FileDrop/types.d.ts +2 -0
  131. package/dist/types/components/Icon/icons.d.ts +6 -6
  132. package/dist/types/components/Icon/types.d.ts +2 -0
  133. package/dist/types/components/Loader/index.d.ts +4 -1
  134. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  135. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  136. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  137. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  138. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  139. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  140. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  141. package/dist/types/components/Modal/components/Content.d.ts +1 -1
  142. package/dist/types/components/Modal/index.d.ts +17 -5
  143. package/dist/types/components/Modal/types.d.ts +1 -1
  144. package/dist/types/components/Pagination/types.d.ts +11 -0
  145. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  146. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  147. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  148. package/dist/types/components/Radio/types.d.ts +1 -1
  149. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  150. package/dist/types/components/Stepper/index.d.ts +8 -2
  151. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  152. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  153. package/dist/types/components/StickyNote/index.d.ts +11 -0
  154. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  155. package/dist/types/components/StickyNote/types.d.ts +15 -0
  156. package/dist/types/components/Swiper/index.d.ts +4 -1
  157. package/dist/types/components/Table/index.d.ts +20 -5
  158. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  159. package/dist/types/components/Tag/types.d.ts +4 -2
  160. package/dist/types/components/Textarea/types.d.ts +1 -0
  161. package/dist/types/components/Toast/components/Growl.d.ts +2 -0
  162. package/dist/types/components/Toast/index.d.ts +8 -2
  163. package/dist/types/components/Toast/types.d.ts +8 -9
  164. package/dist/types/components/Tooltip/types.d.ts +1 -1
  165. package/dist/types/theme/types.d.ts +255 -218
  166. package/dist/types/utils/index.d.ts +0 -1
  167. package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
  168. package/dist/utils.js +3 -2
  169. package/package.json +3 -2
  170. package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
  171. package/dist/4I4MLMKD-BLxAidnq.js +0 -43
  172. package/dist/GVVKDT6A-bET6V7Py.js +0 -724
  173. package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
  174. package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
  175. package/dist/index.css +0 -0
  176. package/dist/types/components/Icon/Icon.d.ts +0 -2
  177. package/dist/types/utils/theme/index.d.ts +0 -0
  178. /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
  179. /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
@@ -1,290 +1,406 @@
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-qpPg689E.js";
4
- import { H as je, a as Ue, u as qe, b as Ge, c as Ze, d as Je, e as Qe } from "./GVVKDT6A-bET6V7Py.js";
5
- import { u as ue, C as ge, a as we, f as Xe, b as Ye } from "./SBSPVDDI-DJKkC1eb.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 et, r as xe, h as tt, j as rt, n as nt, k as ot, l as se, m as U, o as st, p as ee, q as at, t as ut, v as Ce, w as _e, x as ye, y as it, z as lt, A as ct, B as Ee, C as dt, D as ft, E as pt, F as mt, G, H as j, I as R, J as vt, K as bt } from "./OE2EFRVA-C3721cM3.js";
7
- import { createContext as Pe, useRef as ie, useCallback as ht, useState as Oe, useEffect as Ae, createRef as gt, useMemo as wt, forwardRef as le } from "react";
8
- import { i as Mt } from "./T22PY7TE-C1N0q8Kn.js";
9
- import { u as St, a as xt } from "./OLVWQA7U-DysaSaZj.js";
10
- import { c as Ct, R as _t } from "./NI3IVY7K-Ztb3-XAv.js";
11
- import { c as te } from "./index-CdiHdiVB.js";
12
- import { f as Te } from "./forwardRefWithAs-8eP3ZN15.js";
13
- import { u as yt } from "./4I4MLMKD-BLxAidnq.js";
14
- import { c as Et, u as Pt } from "./B7UTNDHN-BlIblHCu.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 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 gr } from "./Radio.js";
20
+ import { Toggle as wr } from "./Toggle.js";
21
+ import { Icon as Qe } from "./Icon.js";
22
+ import { InputText as Cr } from "./InputText.js";
23
+ var kr = "hr", Xe = _(
16
24
  function(t) {
17
25
  var r = t, { orientation: e = "horizontal" } = r, o = P(r, ["orientation"]);
18
- return o = b({
26
+ return o = f({
19
27
  role: "separator",
20
28
  "aria-orientation": e
21
29
  }, o), o;
22
30
  }
23
31
  );
24
- k(function(t) {
25
- const r = He(t);
26
- return F(Ot, r);
32
+ x(function(t) {
33
+ const r = Xe(t);
34
+ return y(kr, r);
27
35
  });
28
- var At = "hr", Ie = N(function(t) {
36
+ var Mr = "hr", Ye = _(function(t) {
29
37
  var r = t, { store: e } = r, o = P(r, ["store"]);
30
- const u = ue();
31
- e = e || u, B(
38
+ const a = ke();
39
+ e = e || a, G(
32
40
  e,
33
41
  process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component."
34
42
  );
35
- const a = e.useState(
36
- (s) => s.orientation === "horizontal" ? "vertical" : "horizontal"
43
+ const s = e.useState(
44
+ (u) => u.orientation === "horizontal" ? "vertical" : "horizontal"
37
45
  );
38
- return o = He(y(b({}, o), { orientation: a })), o;
46
+ return o = Xe(I(f({}, o), { orientation: s })), o;
39
47
  });
40
- k(function(t) {
41
- const r = Ie(t);
42
- return F(At, r);
48
+ x(function(t) {
49
+ const r = Ye(t);
50
+ return y(Mr, r);
43
51
  });
44
- var De = Me(
45
- [we],
46
- [ge]
47
- ), Tt = De.useContext, Ht = De.useScopedContext;
48
- Pe(
52
+ var et = We(
53
+ [je],
54
+ [Ke]
55
+ ), _r = et.useContext, xr = et.useScopedContext;
56
+ _e(
49
57
  void 0
50
58
  );
51
- var It = "div", L = "";
52
- function oe() {
53
- L = "";
59
+ var yr = "div", R = "";
60
+ function pe() {
61
+ R = "";
54
62
  }
55
- function Dt(n) {
63
+ function Sr(n) {
56
64
  const t = n.target;
57
- return t && tt(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);
58
66
  }
59
- function Nt(n, t) {
60
- if (rt(n)) return !0;
67
+ function Pr(n, t) {
68
+ if (Rt(n)) return !0;
61
69
  const r = n.target;
62
70
  return r ? t.some((o) => o.element === r) : !1;
63
71
  }
64
- function kt(n) {
72
+ function Ir(n) {
65
73
  return n.filter((t) => !t.disabled);
66
74
  }
67
- function Y(n, t) {
75
+ function ue(n, t) {
68
76
  var r;
69
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
70
78
  // other components like Select do. Since CompositeTypeahead is a generic
71
79
  // component that can be used with those as well, we also consider the value
72
80
  // property as a fallback for the typeahead text content.
73
81
  "value" in n && n.value;
74
- return e ? nt(e).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
82
+ return e ? Gt(e).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
75
83
  }
76
- function Ft(n, t, r) {
84
+ function Er(n, t, r) {
77
85
  if (!r) return n;
78
86
  const e = n.find((o) => o.id === r);
79
- return !e || !Y(e, t) || L !== t && Y(e, L) ? n : (L = t, Xe(
80
- 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)),
81
89
  r
82
90
  ).filter((o) => o.id !== r));
83
91
  }
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(
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(
88
96
  e,
89
97
  process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component"
90
98
  );
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
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: h, items: p, activeId: i, id: C } = e.getState();
104
+ let v = Ir(
105
+ p.length > h.length ? p : h
98
106
  );
99
- const f = Se(i.currentTarget), M = `[data-offscreen-id="${x}"]`, v = f.querySelectorAll(M);
100
- for (const S of v) {
107
+ const b = Ue(l.currentTarget), M = `[data-offscreen-id="${C}"]`, g = b.querySelectorAll(M);
108
+ for (const S of g) {
101
109
  const H = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
102
- p.push({ id: S.id, element: S, disabled: H });
110
+ v.push({ id: S.id, element: S, disabled: H });
103
111
  }
104
- if (v.length && (p = et(p, (S) => S.element)), !Nt(i, p)) return oe();
105
- i.preventDefault(), window.clearTimeout(l.current), l.current = window.setTimeout(() => {
106
- L = "";
112
+ if (g.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 = "";
107
115
  }, 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();
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();
112
120
  });
113
- return u = y(b({}, u), {
114
- onKeyDownCapture: d
115
- }), xe(u);
121
+ return a = I(f({}, a), {
122
+ onKeyDownCapture: c
123
+ }), re(a);
116
124
  });
117
- k(function(t) {
118
- const r = ce(t);
119
- return F(It, r);
125
+ x(function(t) {
126
+ const r = Pe(t);
127
+ return y(yr, r);
120
128
  });
121
- var Lt = "div";
122
- 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) {
123
179
  const t = n.relatedTarget;
124
180
  return (t == null ? void 0 : t.nodeType) === Node.ELEMENT_NODE ? t : null;
125
181
  }
126
- function Vt(n) {
127
- const t = Ne(n);
128
- return t ? at(n.currentTarget, t) : !1;
182
+ function Lr(n) {
183
+ const t = st(n);
184
+ return t ? Kt(n.currentTarget, t) : !1;
129
185
  }
130
- var ae = Symbol("composite-hover");
131
- function Rt(n) {
132
- let t = Ne(n);
186
+ var ge = Symbol("composite-hover");
187
+ function Hr(n) {
188
+ let t = st(n);
133
189
  if (!t) return !1;
134
190
  do {
135
- if (ut(t, ae) && t[ae]) return !0;
191
+ if (jt(t, ge) && t[ge]) return !0;
136
192
  t = t.parentElement;
137
193
  } while (t);
138
194
  return !1;
139
195
  }
140
- var ke = N(
196
+ var ut = _(
141
197
  function(t) {
142
198
  var r = t, {
143
199
  store: e,
144
200
  focusOnHover: o = !0,
145
- blurOnHoverEnd: u = !!o
146
- } = r, a = P(r, [
201
+ blurOnHoverEnd: a = !!o
202
+ } = r, s = P(r, [
147
203
  "store",
148
204
  "focusOnHover",
149
205
  "blurOnHoverEnd"
150
206
  ]);
151
- const s = ue();
152
- e = e || s, B(
207
+ const u = ke();
208
+ e = e || u, G(
153
209
  e,
154
210
  process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
155
211
  );
156
- const l = ot(), d = a.onMouseMove, i = se(o), g = $((f) => {
157
- if (d == null || d(f), !f.defaultPrevented && l() && i(f)) {
158
- if (!U(f.currentTarget)) {
212
+ const m = zt(), c = s.onMouseMove, l = be(o), h = z((b) => {
213
+ if (c == null || c(b), !b.defaultPrevented && m() && l(b)) {
214
+ if (!X(b.currentTarget)) {
159
215
  const M = e == null ? void 0 : e.getState().baseElement;
160
- M && !st(M) && M.focus();
216
+ M && !Bt(M) && M.focus();
161
217
  }
162
- e == null || e.setActiveId(f.currentTarget.id);
218
+ e == null || e.setActiveId(b.currentTarget.id);
163
219
  }
164
- }), m = a.onMouseLeave, c = se(u), x = $((f) => {
220
+ }), p = s.onMouseLeave, i = be(a), C = z((b) => {
165
221
  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 = ht((f) => {
168
- f && (f[ae] = !0);
222
+ p == null || p(b), !b.defaultPrevented && m() && (Lr(b) || Hr(b) || l(b) && i(b) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().baseElement) == null || M.focus()));
223
+ }), v = tr((b) => {
224
+ b && (b[ge] = !0);
169
225
  }, []);
170
- return a = y(b({}, a), {
171
- ref: ee(p, a.ref),
172
- onMouseMove: g,
173
- onMouseLeave: x
174
- }), xe(a);
226
+ return s = I(f({}, s), {
227
+ ref: le(v, s.ref),
228
+ onMouseMove: h,
229
+ onMouseLeave: C
230
+ }), re(s);
175
231
  }
176
232
  );
177
- Ce(
178
- k(function(t) {
179
- const r = ke(t);
180
- return F(Lt, r);
233
+ de(
234
+ x(function(t) {
235
+ const r = ut(t);
236
+ return y(Tr, r);
181
237
  })
182
238
  );
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
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
+ }
189
274
  );
190
- var zt = "div";
191
- 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) {
192
308
  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;
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;
201
317
  }
202
- var Fe = N(
318
+ var dt = _(
203
319
  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(
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(
207
323
  e,
208
324
  process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
209
325
  );
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();
326
+ const m = e.parent, c = e.menubar, l = !!m, h = 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", b = 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();
228
344
  }
229
- if (d) {
230
- const A = {
345
+ if (c) {
346
+ const D = {
231
347
  ArrowRight: () => {
232
- if (f)
233
- return d.next();
348
+ if (b)
349
+ return c.next();
234
350
  },
235
351
  ArrowLeft: () => {
236
- if (f)
237
- return d.previous();
352
+ if (b)
353
+ return c.previous();
238
354
  },
239
355
  ArrowDown: () => {
240
- if (!f)
241
- return d.next();
356
+ if (!b)
357
+ return c.next();
242
358
  },
243
359
  ArrowUp: () => {
244
- if (!f)
245
- return d.previous();
360
+ if (!b)
361
+ return c.previous();
246
362
  }
247
- }[w.key], V = A == null ? void 0 : A();
248
- 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));
249
365
  }
250
366
  }
251
367
  });
252
- a = ye(
253
- a,
254
- (w) => /* @__PURE__ */ C(Bt, { value: e, children: w }),
368
+ s = ce(
369
+ s,
370
+ (k) => /* @__PURE__ */ d(Br, { value: e, children: k }),
255
371
  [e]
256
372
  );
257
- const v = Wt(b({ store: e }, a)), O = e.useState("mounted"), E = Mt(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),
373
+ const g = 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: h,
376
+ "aria-labelledby": g,
377
+ hidden: O
378
+ }, s), {
379
+ ref: le(h ? e.setContentElement : null, s.ref),
264
380
  style: S,
265
381
  onKeyDown: M
266
382
  });
267
383
  const H = !!e.combobox;
268
- return u = u ?? !H, u && (a = b({
384
+ return a = a ?? !H, a && (s = f({
269
385
  role: "menu",
270
- "aria-orientation": x
271
- }, a)), a = St(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;
272
388
  }
273
389
  );
274
- k(function(t) {
275
- const r = Fe(t);
276
- return F(zt, r);
390
+ x(function(t) {
391
+ const r = dt(t);
392
+ return y(Kr, r);
277
393
  });
278
- var jt = "div", Ut = N(function(t) {
394
+ var Wr = "div", Ur = _(function(t) {
279
395
  var r = t, {
280
396
  store: e,
281
397
  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, [
398
+ portal: a = !!o,
399
+ hideOnEscape: s = !0,
400
+ autoFocusOnShow: u = !0,
401
+ hideOnHoverOutside: m,
402
+ alwaysVisible: c
403
+ } = r, l = P(r, [
288
404
  "store",
289
405
  "modal",
290
406
  "portal",
@@ -293,96 +409,96 @@ var jt = "div", Ut = N(function(t) {
293
409
  "hideOnHoverOutside",
294
410
  "alwaysVisible"
295
411
  ]);
296
- const g = re();
297
- e = e || g, B(
412
+ const h = fe();
413
+ e = e || h, G(
298
414
  e,
299
415
  process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
300
416
  );
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)
417
+ const p = xe(null), i = e.parent, C = e.menubar, v = !!i, b = !!C && !v;
418
+ l = I(f({}, l), {
419
+ ref: le(p, l.ref)
304
420
  });
305
- const M = Fe(b({
421
+ const M = dt(f({
306
422
  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 = gt();
318
- switch (w) {
423
+ alwaysVisible: c
424
+ }, l)), { "aria-labelledby": g } = 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) {
319
435
  // TODO: Refactor
320
436
  case "first":
321
- 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;
322
438
  break;
323
439
  case "last":
324
- 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;
325
441
  break;
326
442
  default:
327
- X.current = z;
443
+ se.current = Z;
328
444
  }
329
- return X;
445
+ return se;
330
446
  }), () => {
331
- I = !0;
447
+ F = !0;
332
448
  };
333
- }, [e, H, w, A, z]);
334
- 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, w = !!u, T = !!O || !!l.initialFocus || !!V, J = L(
335
451
  e.combobox || e,
336
452
  "contentElement"
337
- ), K = D(
338
- (c == null ? void 0 : c.combobox) || c,
453
+ ), B = L(
454
+ (i == null ? void 0 : i.combobox) || i,
339
455
  "contentElement"
340
- ), J = wt(() => {
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({
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({
349
465
  store: e,
350
- alwaysVisible: d,
351
- initialFocus: E,
352
- autoFocusOnShow: h ? T && s : H || !!V
353
- }, i), {
354
- hideOnEscape(I) {
355
- return lt(a, I) ? !1 : (e == null || e.hideAll(), !0);
466
+ alwaysVisible: c,
467
+ initialFocus: O,
468
+ autoFocusOnShow: w ? T && u : H || !!V
469
+ }, l), {
470
+ hideOnEscape(F) {
471
+ return Ut(s, F) ? !1 : (e == null || e.hideAll(), !0);
356
472
  },
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 || !_ || (it(_, "mouseout", I), !U(_)) ? !0 : (requestAnimationFrame(() => {
360
- 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 : b ? E ? !X(E) : !0 : !1)) ? F.defaultPrevented || !v || !E || (Wt(E, "mouseout", F), !X(E)) ? !0 : (requestAnimationFrame(() => {
476
+ X(E) || e == null || e.hide();
361
477
  }), !1) : !1;
362
478
  },
363
479
  modal: V,
364
- portal: u,
365
- backdrop: p ? !1 : i.backdrop
366
- })), i = b({
367
- "aria-labelledby": v
368
- }, i), i;
369
- }), qt = Ct(
370
- k(function(t) {
371
- const r = Ut(t);
372
- return F(jt, r);
480
+ portal: a,
481
+ backdrop: v ? !1 : l.backdrop
482
+ })), l = f({
483
+ "aria-labelledby": g
484
+ }, l), l;
485
+ }), qr = ir(
486
+ x(function(t) {
487
+ const r = Ur(t);
488
+ return y(Wr, r);
373
489
  }),
374
- re
375
- ), Gt = "div", Zt = N(
490
+ fe
491
+ ), Zr = "div", Jr = _(
376
492
  function(t) {
377
493
  var r = t, { store: e } = r, o = P(r, ["store"]);
378
- const u = de();
379
- return e = e || u, Ge(b({ store: e }, o));
494
+ const a = me();
495
+ return e = e || a, lr(f({ store: e }, o));
380
496
  }
381
- ), Jt = k(function(t) {
382
- const r = Zt(t);
383
- return F(Gt, r);
384
- }), Qt = "button";
385
- 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) {
386
502
  return {
387
503
  ArrowDown: t === "bottom" || t === "top" ? "first" : !1,
388
504
  ArrowUp: t === "bottom" || t === "top" ? "last" : !1,
@@ -390,176 +506,316 @@ function Xt(n, t) {
390
506
  ArrowLeft: t === "left" ? "first" : !1
391
507
  }[n.key];
392
508
  }
393
- function be(n, t) {
509
+ function $e(n, t) {
394
510
  return !!(n != null && n.some((r) => !r.element || r.element === t ? !1 : r.element.getAttribute("aria-expanded") === "true"));
395
511
  }
396
- var Yt = N(
512
+ var en = _(
397
513
  function(t) {
398
514
  var r = t, {
399
515
  store: e,
400
516
  focusable: o,
401
- accessibleWhenDisabled: u,
402
- showOnHover: a
403
- } = r, s = P(r, [
517
+ accessibleWhenDisabled: a,
518
+ showOnHover: s
519
+ } = r, u = P(r, [
404
520
  "store",
405
521
  "focusable",
406
522
  "accessibleWhenDisabled",
407
523
  "showOnHover"
408
524
  ]);
409
- const l = re();
410
- e = e || l, B(
525
+ const m = fe();
526
+ e = e || m, G(
411
527
  e,
412
528
  process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
413
529
  );
414
- const d = ie(null), i = e.parent, g = e.menubar, m = !!i, c = !!g && !m, x = ct(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(
530
+ const c = xe(null), l = e.parent, h = e.menubar, p = !!l, i = !!h && !p, C = qt(u), v = () => {
531
+ const w = c.current;
532
+ w && (e == null || e.setDisclosureElement(w), e == null || e.setAnchorElement(w), e == null || e.show());
533
+ }, b = u.onFocus, M = z((w) => {
534
+ if (b == null || b(w), C || w.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !h) || !i) return;
535
+ const { items: T } = h.getState();
536
+ $e(T, w.currentTarget) && v();
537
+ }), g = L(
422
538
  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();
539
+ (w) => w.placement.split("-")[0]
540
+ ), A = u.onKeyDown, O = z((w) => {
541
+ if (A == null || A(w), C || w.defaultPrevented) return;
542
+ const T = Yr(w, g);
543
+ T && (w.preventDefault(), v(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
544
+ }), S = u.onClick, H = z((w) => {
545
+ if (S == null || S(w), w.defaultPrevented || !e) return;
546
+ const T = !w.detail, { open: J } = e.getState();
547
+ (!J || T) && ((!p || T) && e.setAutoFocusOnShow(!0), e.setInitialFocus(T ? "first" : "container")), p && v();
432
548
  });
433
- s = ye(
434
- s,
435
- (h) => /* @__PURE__ */ C(Kt, { value: e, children: h }),
549
+ u = ce(
550
+ u,
551
+ (w) => /* @__PURE__ */ d(ct, { value: e, children: w }),
436
552
  [e]
437
- ), m && (s = y(b({}, s), {
438
- render: /* @__PURE__ */ C(_t.div, { render: s.render })
553
+ ), p && (u = I(f({}, u), {
554
+ render: /* @__PURE__ */ d(cr.div, { render: u.render })
439
555
  }));
440
- const w = _e(s.id), z = D(
441
- (i == null ? void 0 : i.combobox) || i,
556
+ const k = Me(u.id), Z = L(
557
+ (l == null ? void 0 : l.combobox) || l,
442
558
  "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": dt(V, "menu")
448
- }, s), {
449
- 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),
450
566
  onFocus: M,
451
- onKeyDown: E,
567
+ onKeyDown: O,
452
568
  onClick: H
453
- }), s = Ze(y(b({
569
+ }), u = At(I(f({
454
570
  store: e,
455
571
  focusable: o,
456
- accessibleWhenDisabled: u
457
- }, s), {
458
- showOnHover: (h) => {
572
+ accessibleWhenDisabled: a
573
+ }, u), {
574
+ showOnHover: (w) => {
459
575
  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);
576
+ if (typeof s == "function") return s(w);
577
+ if (s != null) return s;
578
+ if (p) return !0;
579
+ if (!h) return !1;
580
+ const { items: oe } = h.getState();
581
+ return i && $e(oe);
466
582
  })()) return !1;
467
- const K = c ? g : i;
468
- return K && K.setActiveId(h.currentTarget.id), !0;
583
+ const B = i ? h : l;
584
+ return B && B.setActiveId(w.currentTarget.id), !0;
469
585
  }
470
- })), s = yt(b({
586
+ })), u = dr(f({
471
587
  store: e,
472
- toggleOnClick: !m,
588
+ toggleOnClick: !p,
473
589
  focusable: o,
474
- accessibleWhenDisabled: u
475
- }, s)), s = ce(b({
590
+ accessibleWhenDisabled: a
591
+ }, u)), u = Pe(f({
476
592
  store: e,
477
- typeahead: c
478
- }, 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;
479
602
  }
480
- ), er = k(function(t) {
481
- const r = Yt(t);
482
- return F(Qt, r);
483
- }), tr = "div";
484
- function rr(n, t, r) {
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;
609
+ }
610
+ ), sn = x(function(t) {
611
+ const r = an(t);
612
+ return y(on, r);
613
+ }), un = "div";
614
+ function cn(n, t, r) {
485
615
  var e;
486
616
  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;
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;
495
625
  }
496
- var nr = N(
626
+ var Ee = _(
497
627
  function(t) {
498
628
  var r = t, {
499
629
  store: e,
500
630
  hideOnClick: o = !0,
501
- preventScrollOnKeyDown: u = !0,
502
- focusOnHover: a,
503
- blurOnHoverEnd: s
504
- } = r, l = P(r, [
631
+ preventScrollOnKeyDown: a = !0,
632
+ focusOnHover: s,
633
+ blurOnHoverEnd: u
634
+ } = r, m = P(r, [
505
635
  "store",
506
636
  "hideOnClick",
507
637
  "preventScrollOnKeyDown",
508
638
  "focusOnHover",
509
639
  "blurOnHoverEnd"
510
640
  ]);
511
- const d = $t(!0), i = Ht();
512
- e = e || d || i, B(
641
+ const c = Ie(!0), l = xr();
642
+ e = e || c || l, G(
513
643
  e,
514
644
  process.env.NODE_ENV !== "production" && "MenuItem must be wrapped in a MenuList, Menu or Menubar component"
515
645
  );
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 || ft(v) || pt(v) || !c || v.currentTarget.getAttribute("aria-haspopup") === "menu") && m(v) && c();
518
- }), f = D(
646
+ const h = m.onClick, p = be(o), i = "hideAll" in e ? e.hideAll : void 0, C = !!i, v = z((g) => {
647
+ h == null || h(g), !(g.defaultPrevented || Jt(g) || Qt(g) || !i || g.currentTarget.getAttribute("aria-haspopup") === "menu") && p(g) && i();
648
+ }), b = L(
519
649
  e,
520
- (v) => "contentElement" in v ? v.contentElement : null
521
- ), M = Ee(f, "menuitem");
522
- return l = y(b({
650
+ (g) => "contentElement" in g ? g.contentElement : null
651
+ ), M = Ze(b, "menuitem");
652
+ return m = I(f({
523
653
  role: M
524
- }, l), {
525
- onClick: p
526
- }), l = Ye(b({
654
+ }, m), {
655
+ onClick: v
656
+ }), m = Ht(f({
527
657
  store: e,
528
- preventScrollOnKeyDown: u
529
- }, l)), l = ke(y(b({
658
+ preventScrollOnKeyDown: a
659
+ }, m)), m = ut(I(f({
530
660
  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;
661
+ }, m), {
662
+ focusOnHover(g) {
663
+ const A = () => typeof s == "function" ? s(g) : s ?? !0;
664
+ if (!e || !A()) return !1;
665
+ const { baseElement: O, items: S } = e.getState();
666
+ return C ? (g.currentTarget.hasAttribute("aria-expanded") && g.currentTarget.focus(), !0) : cn(O, S, g.currentTarget) ? (g.currentTarget.focus(), !0) : !1;
537
667
  },
538
- blurOnHoverEnd(v) {
539
- return typeof s == "function" ? s(v) : s ?? x;
668
+ blurOnHoverEnd(g) {
669
+ return typeof u == "function" ? u(g) : u ?? C;
670
+ }
671
+ })), m;
672
+ }
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 h = Je(u);
720
+ Y(() => {
721
+ e == null || e.setValue(o, (i = []) => h ? ve(i, a, !0) : i);
722
+ }, [e, o, a, h]), 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 gn = _(
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 h = Je(c.defaultChecked);
776
+ Y(() => {
777
+ e == null || e.setValue(o, (i = !1) => he(i, a, h));
778
+ }, [e, o, a, h]), 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));
540
796
  }
541
- })), l;
797
+ }, c)), c = Ee(f({ store: e, hideOnClick: m }, c)), c;
542
798
  }
543
- ), or = Ce(
544
- k(function(t) {
545
- const r = nr(t);
546
- return F(tr, r);
799
+ ), wn = de(
800
+ x(function(t) {
801
+ const r = gn(t);
802
+ return y(bn, r);
547
803
  })
548
804
  );
549
- function sr(n = {}) {
805
+ function Cn(n = {}) {
550
806
  var t = n, {
551
807
  combobox: r,
552
808
  parent: e,
553
809
  menubar: o
554
- } = t, u = mt(t, [
810
+ } = t, a = Yt(t, [
555
811
  "combobox",
556
812
  "parent",
557
813
  "menubar"
558
814
  ]);
559
- const a = !!o && !e, s = Ve(
560
- u.store,
561
- $e(e, ["values"]),
562
- Re(r, [
815
+ const s = !!o && !e, u = St(
816
+ a.store,
817
+ It(e, ["values"]),
818
+ Pt(r, [
563
819
  "arrowElement",
564
820
  "anchorElement",
565
821
  "contentElement",
@@ -567,72 +823,72 @@ function sr(n = {}) {
567
823
  "disclosureElement"
568
824
  ])
569
825
  );
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,
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,
576
832
  "vertical"
577
833
  )
578
- })), i = Je(G(R({}, u), {
579
- store: s,
580
- placement: j(
581
- u.placement,
582
- l.placement,
834
+ })), l = Dt(Q($({}, a), {
835
+ store: u,
836
+ placement: K(
837
+ a.placement,
838
+ m.placement,
583
839
  "bottom-start"
584
840
  ),
585
- timeout: j(
586
- u.timeout,
587
- l.timeout,
588
- a ? 0 : 150
841
+ timeout: K(
842
+ a.timeout,
843
+ m.timeout,
844
+ s ? 0 : 150
589
845
  ),
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,
846
+ hideTimeout: K(a.hideTimeout, m.hideTimeout, 0)
847
+ })), h = Q($($({}, c.getState()), l.getState()), {
848
+ initialFocus: K(m.initialFocus, "container"),
849
+ values: K(
850
+ a.values,
851
+ m.values,
852
+ a.defaultValues,
597
853
  {}
598
854
  )
599
- }), m = Be(g, d, i, s);
600
- return me(
601
- m,
602
- () => ve(m, ["mounted"], (c) => {
603
- c.mounted || m.setState("activeId", null);
855
+ }), p = Ve(h, c, l, u);
856
+ return He(
857
+ p,
858
+ () => Fe(p, ["mounted"], (i) => {
859
+ i.mounted || p.setState("activeId", null);
604
860
  })
605
- ), me(
606
- m,
607
- () => ve(e, ["orientation"], (c) => {
608
- m.setState(
861
+ ), He(
862
+ p,
863
+ () => Fe(e, ["orientation"], (i) => {
864
+ p.setState(
609
865
  "placement",
610
- c.orientation === "vertical" ? "right-start" : "bottom-start"
866
+ i.orientation === "vertical" ? "right-start" : "bottom-start"
611
867
  );
612
868
  })
613
- ), G(R(R(R({}, d), i), m), {
869
+ ), Q($($($({}, c), l), p), {
614
870
  combobox: r,
615
871
  parent: e,
616
872
  menubar: o,
617
873
  hideAll: () => {
618
- i.hide(), e == null || e.hideAll();
874
+ l.hide(), e == null || e.hideAll();
619
875
  },
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 = vt(x, f);
625
- return M === f ? p : G(R({}, p), {
626
- [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 b = v[i], M = er(C, b);
881
+ return M === b ? v : Q($({}, v), {
882
+ [i]: M !== void 0 && M
627
883
  });
628
884
  }));
629
885
  }
630
886
  });
631
887
  }
632
- function ar(n, t, r) {
633
- return bt(t, [r.combobox, r.parent, r.menubar]), We(n, r, "values", "setValues"), Object.assign(
634
- Qe(
635
- 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),
636
892
  t,
637
893
  r
638
894
  ),
@@ -643,98 +899,282 @@ function ar(n, t, r) {
643
899
  }
644
900
  );
645
901
  }
646
- function Lr(n = {}) {
647
- const t = de(), r = Tt(), e = xt();
648
- n = y(b({}, n), {
902
+ function Ne(n = {}) {
903
+ const t = me(), r = _r(), e = ur();
904
+ n = I(f({}, n), {
649
905
  parent: n.parent !== void 0 ? n.parent : t,
650
906
  menubar: n.menubar !== void 0 ? n.menubar : r,
651
907
  combobox: n.combobox !== void 0 ? n.combobox : e
652
908
  });
653
- const [o, u] = ze(sr, n);
654
- return ar(o, u, n);
909
+ const [o, a] = ze(Cn, n);
910
+ return kn(o, a, n);
655
911
  }
656
- 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 = _(
657
917
  function(t) {
658
918
  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;
919
+ const a = me();
920
+ return e = e || a, o = Ye(f({ store: e }, o)), o;
661
921
  }
662
- ), lr = k(function(t) {
663
- const r = ir(t);
664
- return F(ur, r);
922
+ ), yn = x(function(t) {
923
+ const r = xn(t);
924
+ return y(_n, r);
665
925
  });
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",
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,
681
992
  {
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
- ]
993
+ ...r,
994
+ ref: e,
995
+ render: /* @__PURE__ */ d(n, { className: Tn("item", "group-label", t) })
689
996
  }
690
- ) });
691
- }), br = te(ne), hr = Te(
692
- ({ as: n = "button", className: t, ...r }, e) => /* @__PURE__ */ C(
693
- 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, onClick: o, value: a, variant: s, ...u }, m) => /* @__PURE__ */ d(
1002
+ Oe,
694
1003
  {
695
- render: /* @__PURE__ */ C(n, { className: br("item", t), ref: e }),
696
- type: "button",
697
- ...r
1004
+ hideOnClick: !s || s === "radio" || s === "radio-mark",
1005
+ ...u,
1006
+ onClick: (h) => {
1007
+ h.preventDefault(), h.stopPropagation(), o == null || o(h);
1008
+ },
1009
+ ref: m,
1010
+ render: /* @__PURE__ */ d(n, { className: q("item", r), children: (() => {
1011
+ switch (s) {
1012
+ case "checkbox":
1013
+ return /* @__PURE__ */ j(ie, { name: e, value: a, children: [
1014
+ /* @__PURE__ */ d(wt, { name: e, value: a }),
1015
+ t
1016
+ ] });
1017
+ case "checkbox-mark":
1018
+ return /* @__PURE__ */ j(ie, { name: e, value: a, children: [
1019
+ t,
1020
+ /* @__PURE__ */ d(Ce, {})
1021
+ ] });
1022
+ case "radio":
1023
+ return /* @__PURE__ */ j(we, { name: e, value: a, children: [
1024
+ /* @__PURE__ */ d(Ct, { name: e, value: a }),
1025
+ t
1026
+ ] });
1027
+ case "radio-mark":
1028
+ return /* @__PURE__ */ j(we, { name: e, value: a, children: [
1029
+ t,
1030
+ /* @__PURE__ */ d(Ce, {})
1031
+ ] });
1032
+ case "toggle":
1033
+ return /* @__PURE__ */ j(ie, { name: e, value: a, children: [
1034
+ /* @__PURE__ */ d(kt, { name: e, value: a }),
1035
+ t
1036
+ ] });
1037
+ default:
1038
+ return t;
1039
+ }
1040
+ })() })
698
1041
  }
699
1042
  )
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,
1043
+ );
1044
+ Ae.displayName = "DropdownMenu.Item";
1045
+ const bt = N(
1046
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-content", n), ref: r })
1047
+ );
1048
+ bt.displayName = "DropdownMenu.ItemContent";
1049
+ const gt = N(
1050
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d("div", { ...t, className: q("item-description", n), ref: r })
1051
+ );
1052
+ gt.displayName = "DropdownMenu.ItemDescription";
1053
+ const ie = N(
1054
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(hn, { ...t, className: q("item-checkbox", n), ref: r })
1055
+ );
1056
+ ie.displayName = "DropdownMenu.ItemCheckbox";
1057
+ const we = N(({ className: n, ...t }, r) => /* @__PURE__ */ d(wn, { ...t, className: q("item-radio", n), ref: r }));
1058
+ we.displayName = "DropdownMenu.ItemRadio";
1059
+ const Ce = N(
1060
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(mn, { ...t, className: q("item-default-check", n), ref: r, children: /* @__PURE__ */ d(Qe, { name: "check", size: "md" }) })
1061
+ );
1062
+ Ce.displayName = "DropdownMenu.ItemDefaultCheck";
1063
+ const wt = N(
1064
+ ({ name: n, value: t = !0, ...r }, e) => {
1065
+ const o = De(n, t);
1066
+ return /* @__PURE__ */ or(
1067
+ br,
1068
+ {
1069
+ "aria-hidden": "true",
1070
+ ...r,
1071
+ checked: o,
1072
+ key: o.toString(),
1073
+ ref: e
1074
+ }
1075
+ );
1076
+ }
1077
+ );
1078
+ wt.displayName = "DropdownMenu.ItemCheckboxCheck";
1079
+ const Ct = N(
1080
+ ({ name: n, value: t, ...r }, e) => {
1081
+ const o = De(n, t);
1082
+ return /* @__PURE__ */ d(gr, { "aria-hidden": "true", ...r, checked: o, ref: e });
1083
+ }
1084
+ );
1085
+ Ct.displayName = "DropdownMenu.ItemRadioCheck";
1086
+ const kt = N(
1087
+ ({ className: n, name: t, value: r = !0, ...e }, o) => {
1088
+ const a = De(t, r);
1089
+ return /* @__PURE__ */ d(
1090
+ wr,
1091
+ {
1092
+ "aria-hidden": "true",
1093
+ ...e,
1094
+ checked: a,
1095
+ className: q("item-toggle-check", n),
1096
+ ref: o,
1097
+ size: "sm"
1098
+ }
1099
+ );
1100
+ }
1101
+ );
1102
+ kt.displayName = "DropdownMenu.ItemToggleCheck";
1103
+ const De = (n, t) => {
1104
+ const r = Ne(), o = L(r).values[n];
1105
+ return Array.isArray(o) ? o.includes(t) : o === t;
1106
+ }, Ln = W(U), Mt = ee(
1107
+ ({ as: n = Cr, className: t, ...r }, e) => /* @__PURE__ */ d(
1108
+ Oe,
705
1109
  {
1110
+ ...r,
1111
+ hideOnClick: !1,
706
1112
  ref: e,
707
- render: n ? (o) => /* @__PURE__ */ C(n, { ...o }) : void 0,
708
- store: t,
709
- ...r
1113
+ render: /* @__PURE__ */ d(n, { className: Ln("item", "search", t), icon: /* @__PURE__ */ d(Qe, { name: "search" }) })
1114
+ }
1115
+ )
1116
+ );
1117
+ Mt.displayName = "DropdownMenu.Search";
1118
+ const Hn = W(U), _t = N(
1119
+ ({ className: n, ...t }, r) => /* @__PURE__ */ d(yn, { ...t, ref: r, render: /* @__PURE__ */ d("hr", { className: Hn("separator", n) }) })
1120
+ );
1121
+ _t.displayName = "DropdownMenu.Separator";
1122
+ const xt = ee(
1123
+ ({ as: n, onClick: t, store: r, ...e }, o) => /* @__PURE__ */ d(
1124
+ mt,
1125
+ {
1126
+ onClick: (s) => {
1127
+ s.preventDefault(), s.stopPropagation(), t == null || t(s), r.toggle();
1128
+ },
1129
+ ref: o,
1130
+ render: n ? (s) => /* @__PURE__ */ d(n, { ...s }) : void 0,
1131
+ store: r,
1132
+ ...e
710
1133
  }
711
1134
  )
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,
1135
+ );
1136
+ xt.displayName = "DropdownMenu.Trigger";
1137
+ const yt = N(
1138
+ ({ children: n, item: t, size: r = "lg", ...e }, o) => {
1139
+ const a = Ne();
1140
+ return /* @__PURE__ */ j(Mn, { store: a, children: [
1141
+ /* @__PURE__ */ d(mt, { ...e, ref: o, render: /* @__PURE__ */ d(Ae, { children: t }) }),
1142
+ /* @__PURE__ */ d(Gn, { size: r, withGutter: !0, children: n })
1143
+ ] });
1144
+ }
1145
+ );
1146
+ yt.displayName = "DropdownMenu.Submenu";
1147
+ const Fn = W(U), $n = 8, Rn = N(
1148
+ ({ className: n, size: t = "lg", store: r, withGutter: e = !0, ...o }, a) => {
1149
+ const s = L(r, "arrowElement");
1150
+ return /* @__PURE__ */ d(
1151
+ qr,
717
1152
  {
1153
+ ...o,
718
1154
  "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
1155
+ className: n,
1156
+ gutter: e && !s ? $n : 0,
1157
+ ref: a,
1158
+ render: /* @__PURE__ */ d("div", { className: Fn("root", `size-${t}`, n) }),
1159
+ store: r,
1160
+ tabIndex: 0
728
1161
  }
729
1162
  );
730
1163
  }
731
- ), Vr = Object.assign(Cr, {
732
- Arrow: vr,
733
- Item: hr,
734
- Separator: wr,
735
- Trigger: Mr
1164
+ ), Gn = Object.assign(Rn, {
1165
+ Action: ft,
1166
+ Arrow: pt,
1167
+ Content: bt,
1168
+ Description: gt,
1169
+ Group: vt,
1170
+ GroupLabel: ht,
1171
+ Item: Ae,
1172
+ Search: Mt,
1173
+ Separator: _t,
1174
+ Submenu: yt,
1175
+ Trigger: xt
736
1176
  });
737
1177
  export {
738
- Vr as DropdownMenu,
739
- Lr as useDropdownMenu
1178
+ Gn as DropdownMenu,
1179
+ Ne as useDropdownMenu
740
1180
  };