@wrdagency/blockout 1.0.5 → 1.0.7

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 (196) hide show
  1. package/dist/2NBKRL7C-CzwWfv1x.js +76 -0
  2. package/dist/2RSXSRCN-rMUAytae.js +61 -0
  3. package/dist/{4CMBR7SL-xNGezbCB.js → 4CMBR7SL-ChJnawVl.js} +132 -126
  4. package/dist/{5JTVDSTH-CIreO5bC.js → 5JTVDSTH-DcfjjEya.js} +4 -4
  5. package/dist/{5VQZOHHZ-CNzYHc1X.js → 5VQZOHHZ-BN-teS5E.js} +1 -1
  6. package/dist/{6VRAQV3D-BoLhl3hf.js → 6VRAQV3D-DK_p41oq.js} +6 -6
  7. package/dist/A3WPL2ZJ-CpUtG5Sk.js +12 -0
  8. package/dist/{BM6PGYQY-Bhr7peim.js → BM6PGYQY-CkMwDqt0.js} +2 -2
  9. package/dist/Check.es-CMkTf2It.js +38 -0
  10. package/dist/{DG5U6ZEL-C7eLVyh-.js → DG5U6ZEL-GfwW2sqh.js} +3 -3
  11. package/dist/EM5CXX6A-C74NAQPE.js +13 -0
  12. package/dist/{F5MUBM3I-_HauDyEF.js → F5MUBM3I-BbDMTUwx.js} +24 -24
  13. package/dist/{G7GW6PWC-Crp1Jn-8.js → G7GW6PWC-A0eDeXMt.js} +100 -96
  14. package/dist/IWEFDH56-CvOsIcbb.js +19 -0
  15. package/dist/{J2LQO3EC-CcHJqN0I.js → J2LQO3EC-DYtZQQv6.js} +4 -3
  16. package/dist/{KFH4SEIX-D-fCkpQv.js → KFH4SEIX-BFT9WmYk.js} +3 -3
  17. package/dist/{LMDWO4NN-DdLnHzru.js → LMDWO4NN-CIZvvtic.js} +233 -203
  18. package/dist/MAXQOH4L-DBaf8WKp.js +564 -0
  19. package/dist/MR26YJYP-DacZIkgJ.js +287 -0
  20. package/dist/MTZPJQMC-DPwZ6caC.js +13 -0
  21. package/dist/{O2PQ2652-THp22K4G.js → O2PQ2652-D2GSkoLq.js} +6 -6
  22. package/dist/P7GR5CS5-5PtDURPc.js +24 -0
  23. package/dist/{PFRGBC2K-DUhGSIey.js → PFRGBC2K-B9ko--FF.js} +34 -33
  24. package/dist/Plus.es-DJ5SuqNv.js +38 -0
  25. package/dist/RS7LB2H4-BvDKQaCt.js +18 -0
  26. package/dist/RZ4GPYOB-COPqjbOz.js +37 -0
  27. package/dist/{S43UC3DV-erT1ucAd.js → S43UC3DV-CiBKpqp8.js} +3 -3
  28. package/dist/{T7VMP3TM-C-Aesx9K.js → T7VMP3TM-C0xl-w4G.js} +21 -21
  29. package/dist/TP7N7UIH-Dc0CLLi8.js +33 -0
  30. package/dist/{UQQRIHDV-DIXH69U3.js → UQQRIHDV-BBkcyl82.js} +17 -17
  31. package/dist/UYGDZTLQ-9uAEICxv.js +13 -0
  32. package/dist/VIIRIBF3-uvnIyICw.js +31 -0
  33. package/dist/WMYDSCNQ-D4CU76mX.js +61 -0
  34. package/dist/{WYCIER3C-S-jsj0wy.js → WYCIER3C-CaoIoaX7.js} +4 -4
  35. package/dist/{YV4JVR4I-BXEaRiAN.js → YV4JVR4I-w1-dnslS.js} +47 -47
  36. package/dist/assets/index10.css +1 -1
  37. package/dist/assets/index11.css +1 -1
  38. package/dist/assets/index12.css +1 -1
  39. package/dist/assets/index13.css +1 -1
  40. package/dist/assets/index14.css +1 -1
  41. package/dist/assets/index15.css +1 -1
  42. package/dist/assets/index16.css +1 -1
  43. package/dist/assets/index17.css +1 -1
  44. package/dist/assets/index4.css +1 -1
  45. package/dist/assets/style16.css +1 -1
  46. package/dist/assets/style17.css +1 -1
  47. package/dist/assets/style18.css +1 -1
  48. package/dist/assets/style19.css +1 -1
  49. package/dist/assets/style20.css +1 -1
  50. package/dist/assets/style21.css +1 -1
  51. package/dist/assets/style22.css +1 -1
  52. package/dist/assets/style23.css +1 -1
  53. package/dist/assets/style24.css +1 -1
  54. package/dist/assets/style25.css +1 -1
  55. package/dist/assets/style26.css +1 -1
  56. package/dist/assets/style27.css +1 -0
  57. package/dist/components/breadcrumbs/index.js +5 -5
  58. package/dist/components/button/row.js +4 -4
  59. package/dist/components/controls/base-popover-control/index.js +4 -4
  60. package/dist/components/controls/card-number-control/index.js +1 -1
  61. package/dist/components/controls/date-control/index.js +1 -1
  62. package/dist/components/controls/date-control/picker.js +5 -5
  63. package/dist/components/controls/index.d.ts +1 -0
  64. package/dist/components/controls/index.js +12 -10
  65. package/dist/components/controls/list-control/item.js +34 -67
  66. package/dist/components/controls/list-control/list.js +1 -1
  67. package/dist/components/controls/recurrence-control/index.js +19 -18
  68. package/dist/components/controls/select-control/control.js +26 -37
  69. package/dist/components/controls/select-control/select.js +62 -1129
  70. package/dist/components/controls/tag-control/ariakit-experimental.d.ts +7 -0
  71. package/dist/components/controls/tag-control/ariakit-experimental.js +2308 -0
  72. package/dist/components/controls/tag-control/index.d.ts +10 -0
  73. package/dist/components/controls/tag-control/index.js +137 -0
  74. package/dist/components/controls/tag-control/props.d.ts +20 -0
  75. package/dist/components/controls/tag-control/props.js +57 -0
  76. package/dist/components/controls/text-control/index.js +1 -1
  77. package/dist/components/data-view/data/apply.js +15 -15
  78. package/dist/components/data-view/data/filter.js +14 -12
  79. package/dist/components/data-view/index.js +1 -1
  80. package/dist/components/data-view/layouts/grid/empty.js +1 -1
  81. package/dist/components/data-view/layouts/grid/group.js +9 -7
  82. package/dist/components/data-view/layouts/grid/item.js +9 -7
  83. package/dist/components/data-view/layouts/grid/root.js +1 -1
  84. package/dist/components/data-view/layouts/kanban/empty.js +1 -1
  85. package/dist/components/data-view/layouts/kanban/group.js +9 -7
  86. package/dist/components/data-view/layouts/kanban/item.js +9 -7
  87. package/dist/components/data-view/layouts/kanban/root.js +1 -1
  88. package/dist/components/data-view/layouts/list/empty.js +1 -1
  89. package/dist/components/data-view/layouts/list/group.js +9 -7
  90. package/dist/components/data-view/layouts/list/item.js +9 -7
  91. package/dist/components/data-view/layouts/list/root.js +1 -1
  92. package/dist/components/data-view/layouts/table/empty.js +9 -7
  93. package/dist/components/data-view/layouts/table/group.js +10 -8
  94. package/dist/components/data-view/layouts/table/item.js +10 -8
  95. package/dist/components/data-view/layouts/table/root.js +9 -7
  96. package/dist/components/data-view/parts/body/index.js +11 -9
  97. package/dist/components/data-view/parts/controls/index.js +9 -7
  98. package/dist/components/data-view/parts/controls/search.js +9 -7
  99. package/dist/components/data-view/parts/filters/editor.js +8 -6
  100. package/dist/components/data-view/parts/filters/index.js +1 -1
  101. package/dist/components/data-view/parts/filters/list.js +39 -73
  102. package/dist/components/data-view/parts/footer/actions.js +9 -7
  103. package/dist/components/data-view/parts/footer/index.js +9 -7
  104. package/dist/components/data-view/parts/footer/selection.js +9 -7
  105. package/dist/components/data-view/parts/view-control/index.js +23 -21
  106. package/dist/components/data-view/root.js +9 -7
  107. package/dist/components/data-view/slots/group/checkbox.js +9 -7
  108. package/dist/components/data-view/slots/group/context.js +1 -1
  109. package/dist/components/data-view/slots/group/icon.js +1 -1
  110. package/dist/components/data-view/slots/group/index.js +1 -1
  111. package/dist/components/data-view/slots/group/label.js +1 -1
  112. package/dist/components/data-view/slots/index.js +3 -3
  113. package/dist/components/data-view/slots/item/actions.js +1 -1
  114. package/dist/components/data-view/slots/item/checkbox.js +9 -7
  115. package/dist/components/data-view/slots/item/depth.js +3 -3
  116. package/dist/components/data-view/slots/item/description.js +1 -1
  117. package/dist/components/data-view/slots/item/index.js +2 -2
  118. package/dist/components/data-view/slots/item/properties.js +2 -2
  119. package/dist/components/data-view/slots/item/relations.js +3 -3
  120. package/dist/components/data-view/slots/item/tags.js +1 -1
  121. package/dist/components/data-view/slots/item/thumbnail.js +1 -1
  122. package/dist/components/data-view/slots/item/title.js +1 -1
  123. package/dist/components/data-view/slots/item/util.js +2 -2
  124. package/dist/components/data-view/slots/property/field/editable.js +8 -6
  125. package/dist/components/data-view/slots/property/field/index.js +2 -2
  126. package/dist/components/data-view/slots/property/field/static.js +1 -1
  127. package/dist/components/data-view/slots/property/index.js +1 -1
  128. package/dist/components/data-view/slots/property/label.js +1 -1
  129. package/dist/components/data-view/slots/root/checkbox.js +8 -6
  130. package/dist/components/data-view/slots/root/index.js +1 -1
  131. package/dist/components/filesystem/file.js +1 -1
  132. package/dist/components/filesystem/folder.js +29 -80
  133. package/dist/components/filesystem/list.js +1 -1
  134. package/dist/components/filesystem/root.js +1 -1
  135. package/dist/components/index.js +41 -39
  136. package/dist/components/menu/index.js +14 -13
  137. package/dist/components/menu/item.js +1 -1
  138. package/dist/components/menu/items/action.js +1 -1
  139. package/dist/components/menu/items/spacer.js +4 -16
  140. package/dist/components/menu/items/submenu.js +4 -3
  141. package/dist/components/menu/items/toggle.js +1 -1
  142. package/dist/components/pagination/index.js +1 -1
  143. package/dist/components/tabs/list.js +8 -36
  144. package/dist/components/tabs/panel.js +13 -126
  145. package/dist/components/tabs/root.js +14 -166
  146. package/dist/components/tabs/tab.js +5 -79
  147. package/dist/components/toolbar/divider.js +7 -19
  148. package/dist/components/toolbar/index.js +10 -24
  149. package/dist/components/toolbar/root.js +5 -67
  150. package/dist/components/window/index.js +2 -2
  151. package/dist/{composite-provider-R5SnRc_G.js → composite-provider-B-M1AaRb.js} +2 -2
  152. package/dist/disclosure-provider-DW9RmAuE.js +61 -0
  153. package/dist/{filter-C-ZkRgt_.js → filter-GoxwLwkT.js} +14 -12
  154. package/dist/{index-DI0cEpya.js → index-C_xrLeQq.js} +20 -18
  155. package/dist/{index-BW-2OhmK.js → index-DJ2XZnew.js} +7 -5
  156. package/dist/{index-Bj4Ga50P.js → index-DpV0obFX.js} +6 -4
  157. package/dist/index.js +87 -85
  158. package/dist/item-CYpF0or4.js +58 -0
  159. package/dist/{style-tA0yiKCL.js → match-sorter.esm-MNVE8H_6.js} +1 -1
  160. package/dist/menu-button-D0chRxS0.js +416 -0
  161. package/dist/menu-separator-Cy38O3cZ.js +16 -0
  162. package/dist/{picker-BkmBjgWA.js → picker-BAQPD-c9.js} +4 -4
  163. package/dist/popover-provider-DZV1nb7Q.js +10 -0
  164. package/dist/primitives/popover/index.js +2 -2
  165. package/dist/primitives/popover/root.js +12 -3
  166. package/dist/primitives/popover/target.js +1 -1
  167. package/dist/primitives/popover/window.js +3 -3
  168. package/dist/primitives/tooltip/index.js +10 -173
  169. package/dist/select-popover-DYAZyLp4.js +542 -0
  170. package/dist/select-value-CeoMyvpZ.js +15 -0
  171. package/dist/{sortable.esm-De3H-_AA.js → sortable.esm-BuV7eW2H.js} +4 -4
  172. package/dist/{style-C7eFpUVU.js → style-CWAa57kN.js} +1 -1
  173. package/dist/tab-DjNG1rEI.js +79 -0
  174. package/dist/tab-list-DtMnUjoy.js +33 -0
  175. package/dist/tab-panel-DdkeLgKE.js +118 -0
  176. package/dist/tab-provider-BMkHrtIK.js +158 -0
  177. package/dist/tag-remove-BVa8oSsq.js +533 -0
  178. package/dist/toolbar-B7_t1rYu.js +68 -0
  179. package/dist/toolbar-separator-DBoO5XdF.js +16 -0
  180. package/dist/tooltip-anchor-CxZWazuo.js +173 -0
  181. package/package.json +1 -1
  182. package/dist/2NBKRL7C-Cug3TzgR.js +0 -85
  183. package/dist/2RSXSRCN-Bc3g-z-i.js +0 -61
  184. package/dist/A3WPL2ZJ-D0Eh1dEB.js +0 -11
  185. package/dist/EM5CXX6A-DKxCXPnz.js +0 -14
  186. package/dist/MR26YJYP-yD1_RvCA.js +0 -283
  187. package/dist/MTZPJQMC-RLG1q394.js +0 -12
  188. package/dist/P7GR5CS5-Dub2zqTX.js +0 -22
  189. package/dist/RS7LB2H4-C0kmTjy8.js +0 -15
  190. package/dist/RZ4GPYOB-c8s_KHUk.js +0 -37
  191. package/dist/TP7N7UIH-mdk33dnV.js +0 -34
  192. package/dist/UYGDZTLQ-fOwUiOjI.js +0 -12
  193. package/dist/VIIRIBF3-DylpToFV.js +0 -18
  194. package/dist/WMYDSCNQ-D43V-JUe.js +0 -62
  195. package/dist/item-C5GtZF5t.js +0 -470
  196. package/dist/root-C7IYlG1s.js +0 -20
@@ -1,37 +0,0 @@
1
- import { d } from "./P7GR5CS5-Dub2zqTX.js";
2
- import { c as p, D as I, _, q as g, m as v, n as R, o as C, r as h, f as x, a as b } from "./LMDWO4NN-DdLnHzru.js";
3
- import { useRef as E, useEffect as P } from "react";
4
- var V = "div", j = p(
5
- function(s) {
6
- var r = s, {
7
- store: e,
8
- shouldRegisterItem: n = !0,
9
- getItem: a = I,
10
- element: l
11
- } = r, t = _(r, [
12
- "store",
13
- "shouldRegisterItem",
14
- "getItem",
15
- // @ts-expect-error This prop may come from a collection renderer.
16
- "element"
17
- ]);
18
- const f = d();
19
- e = e || f;
20
- const o = g(t.id), m = E(l);
21
- return P(() => {
22
- const u = m.current;
23
- if (!o || !u || !n) return;
24
- const c = a({ id: o, element: u });
25
- return e == null ? void 0 : e.renderItem(c);
26
- }, [o, n, a, e]), t = v(C({}, t), {
27
- ref: R(m, t.ref)
28
- }), h(t);
29
- }
30
- );
31
- x(function(s) {
32
- const r = j(s);
33
- return b(V, r);
34
- });
35
- export {
36
- j as u
37
- };
@@ -1,34 +0,0 @@
1
- import { c as s, _ as n, o as i, f as p, a as m, i as f, m as l } from "./LMDWO4NN-DdLnHzru.js";
2
- import { a as C } from "./P7GR5CS5-Dub2zqTX.js";
3
- var S = "hr", u = s(
4
- function(r) {
5
- var o = r, { orientation: t = "horizontal" } = o, a = n(o, ["orientation"]);
6
- return a = i({
7
- role: "separator",
8
- "aria-orientation": t
9
- }, a), a;
10
- }
11
- );
12
- p(function(r) {
13
- const o = u(r);
14
- return m(S, o);
15
- });
16
- var h = "hr", d = s(function(r) {
17
- var o = r, { store: t } = o, a = n(o, ["store"]);
18
- const c = C();
19
- t = t || c, f(
20
- t,
21
- process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component."
22
- );
23
- const v = t.useState(
24
- (_) => _.orientation === "horizontal" ? "vertical" : "horizontal"
25
- );
26
- return a = u(l(i({}, a), { orientation: v })), a;
27
- }), x = p(function(r) {
28
- const o = d(r);
29
- return m(h, o);
30
- });
31
- export {
32
- x as C,
33
- d as u
34
- };
@@ -1,12 +0,0 @@
1
- import { e as o, C as t } from "./P7GR5CS5-Dub2zqTX.js";
2
- import { I as r } from "./LMDWO4NN-DdLnHzru.js";
3
- var e = r(
4
- [t],
5
- [o]
6
- ), d = e.useScopedContext, s = e.useProviderContext, v = e.ContextProvider, x = e.ScopedContextProvider;
7
- export {
8
- x as T,
9
- d as a,
10
- v as b,
11
- s as u
12
- };
@@ -1,18 +0,0 @@
1
- import { H as o, a as r } from "./EM5CXX6A-DKxCXPnz.js";
2
- import { e as t, C as a } from "./P7GR5CS5-Dub2zqTX.js";
3
- import { I as n } from "./LMDWO4NN-DdLnHzru.js";
4
- import { createContext as d } from "react";
5
- var e = n(
6
- [a, r],
7
- [t, o]
8
- ), x = e.useContext, p = e.useScopedContext, u = e.useProviderContext, c = e.ContextProvider, m = e.ScopedContextProvider;
9
- d(
10
- void 0
11
- );
12
- export {
13
- m as M,
14
- p as a,
15
- u as b,
16
- c,
17
- x as u
18
- };
@@ -1,62 +0,0 @@
1
- import { b as m, P as _ } from "./MTZPJQMC-RLG1q394.js";
2
- import { c as p, _ as u, m as P, n as E, o as t, f as l, a as v, i as d, a0 as b, e as h, l as x } from "./LMDWO4NN-DdLnHzru.js";
3
- import { u as N } from "./F5MUBM3I-_HauDyEF.js";
4
- import { b as C } from "./RS7LB2H4-C0kmTjy8.js";
5
- import { jsx as A } from "react/jsx-runtime";
6
- var k = "div", D = p(
7
- function(s) {
8
- var r = s, { store: e } = r, o = u(r, ["store"]);
9
- const a = m();
10
- return e = e || a, o = P(t({}, o), {
11
- ref: E(e == null ? void 0 : e.setAnchorElement, o.ref)
12
- }), o;
13
- }
14
- );
15
- l(function(s) {
16
- const r = D(s);
17
- return v(k, r);
18
- });
19
- var R = "button", f = p(
20
- function(s) {
21
- var r = s, { store: e } = r, o = u(r, ["store"]);
22
- const a = C();
23
- e = e || a, d(
24
- e,
25
- process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
26
- );
27
- const c = e.useState("contentElement");
28
- return o = t({
29
- "aria-haspopup": b(c, "dialog")
30
- }, o), o = N(t({ store: e }, o)), o;
31
- }
32
- );
33
- l(function(s) {
34
- const r = f(s);
35
- return v(R, r);
36
- });
37
- var T = "button", w = p(function(s) {
38
- var r = s, { store: e } = r, o = u(r, ["store"]);
39
- const a = m();
40
- e = e || a, d(
41
- e,
42
- process.env.NODE_ENV !== "production" && "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
43
- );
44
- const c = o.onClick, g = h((i) => {
45
- e == null || e.setAnchorElement(i.currentTarget), c == null || c(i);
46
- });
47
- return o = x(
48
- o,
49
- (i) => /* @__PURE__ */ A(_, { value: e, children: i }),
50
- [e]
51
- ), o = P(t({}, o), {
52
- onClick: g
53
- }), o = D(t({ store: e }, o)), o = f(t({ store: e }, o)), o;
54
- }), H = l(function(s) {
55
- const r = w(s);
56
- return v(T, r);
57
- });
58
- export {
59
- H as P,
60
- D as a,
61
- w as u
62
- };
@@ -1,470 +0,0 @@
1
- import { jsx as h, jsxs as U } from "react/jsx-runtime";
2
- import { ActionMenuItem as pe } from "./components/menu/items/action.js";
3
- import { SeparatorMenuItem as be } from "./components/menu/items/spacer.js";
4
- import { e as ve } from "./CaretRight.es-vnr78BGI.js";
5
- import { EmptyIcon as he } from "./components/menu/icon.js";
6
- import { ToggleMenuItem as _e } from "./components/menu/items/toggle.js";
7
- import { u as Me, b as z, M as Se, c as se } from "./VIIRIBF3-DylpToFV.js";
8
- import { u as we, M as ge } from "./2NBKRL7C-Cug3TzgR.js";
9
- import { c as ye, u as Pe, a as Ee, b as Oe } from "./MR26YJYP-yD1_RvCA.js";
10
- import { c as Ae, b as xe } from "./4CMBR7SL-xNGezbCB.js";
11
- import { a as Fe } from "./S43UC3DV-erT1ucAd.js";
12
- import { m as Ce, o as Ie, p as He, t as De, c as ke, s as ne, e as oe, b as Ne, d as Ve, a as H } from "./YV4JVR4I-BXEaRiAN.js";
13
- import { P as Re, Q as B, S as V, R as x, a5 as Le, m as F, o as b, T as Te, c as G, _ as K, i as J, q as ae, e as q, l as ue, n as X, f as Y, a as Z, a6 as Be, a4 as Ke, t as $e, W as je, a0 as We } from "./LMDWO4NN-DdLnHzru.js";
14
- import { u as ie } from "./T7VMP3TM-C-Aesx9K.js";
15
- import { u as Ue } from "./WMYDSCNQ-D43V-JUe.js";
16
- import { c as qe, R as ze } from "./G7GW6PWC-Crp1Jn-8.js";
17
- import { useState as ce, useEffect as le, useRef as me, createRef as Qe, useMemo as Ge } from "react";
18
- import { i as Je } from "./KFH4SEIX-D-fCkpQv.js";
19
- import { u as Xe } from "./5JTVDSTH-CIreO5bC.js";
20
- import { a as Q } from "./PFRGBC2K-DUhGSIey.js";
21
- function Ye(t = {}) {
22
- var o = t, {
23
- combobox: n,
24
- parent: e,
25
- menubar: v
26
- } = o, i = Re(o, [
27
- "combobox",
28
- "parent",
29
- "menubar"
30
- ]);
31
- const s = !!v && !e, r = Ce(
32
- i.store,
33
- He(e, ["values"]),
34
- Ie(n, [
35
- "arrowElement",
36
- "anchorElement",
37
- "contentElement",
38
- "popoverElement",
39
- "disclosureElement"
40
- ])
41
- );
42
- De(i, r);
43
- const p = r.getState(), m = Ae(B(x({}, i), {
44
- store: r,
45
- orientation: V(
46
- i.orientation,
47
- p.orientation,
48
- "vertical"
49
- )
50
- })), a = ye(B(x({}, i), {
51
- store: r,
52
- placement: V(
53
- i.placement,
54
- p.placement,
55
- "bottom-start"
56
- ),
57
- timeout: V(
58
- i.timeout,
59
- p.timeout,
60
- s ? 0 : 150
61
- ),
62
- hideTimeout: V(i.hideTimeout, p.hideTimeout, 0)
63
- })), _ = B(x(x({}, m.getState()), a.getState()), {
64
- initialFocus: V(p.initialFocus, "container"),
65
- values: V(
66
- i.values,
67
- p.values,
68
- i.defaultValues,
69
- {}
70
- )
71
- }), d = ke(_, m, a, r);
72
- return ne(
73
- d,
74
- () => oe(d, ["mounted"], (u) => {
75
- u.mounted || d.setState("activeId", null);
76
- })
77
- ), ne(
78
- d,
79
- () => oe(e, ["orientation"], (u) => {
80
- d.setState(
81
- "placement",
82
- u.orientation === "vertical" ? "right-start" : "bottom-start"
83
- );
84
- })
85
- ), B(x(x(x({}, m), a), d), {
86
- combobox: n,
87
- parent: e,
88
- menubar: v,
89
- hideAll: () => {
90
- a.hide(), e == null || e.hideAll();
91
- },
92
- setInitialFocus: (u) => d.setState("initialFocus", u),
93
- setValues: (u) => d.setState("values", u),
94
- setValue: (u, E) => {
95
- u !== "__proto__" && u !== "constructor" && (Array.isArray(u) || d.setState("values", (f) => {
96
- const S = f[u], y = Le(E, S);
97
- return y === S ? f : B(x({}, f), {
98
- [u]: y !== void 0 && y
99
- });
100
- }));
101
- }
102
- });
103
- }
104
- function Ze(t, o, n) {
105
- return Te(o, [n.combobox, n.parent, n.menubar]), Ve(t, n, "values", "setValues"), Object.assign(
106
- Pe(
107
- xe(t, o, n),
108
- o,
109
- n
110
- ),
111
- {
112
- combobox: n.combobox,
113
- parent: n.parent,
114
- menubar: n.menubar
115
- }
116
- );
117
- }
118
- function de(t = {}) {
119
- const o = Me(), n = we(), e = Fe();
120
- t = F(b({}, t), {
121
- parent: t.parent !== void 0 ? t.parent : o,
122
- menubar: t.menubar !== void 0 ? t.menubar : n,
123
- combobox: t.combobox !== void 0 ? t.combobox : e
124
- });
125
- const [v, i] = Ne(Ye, t);
126
- return Ze(v, i, t);
127
- }
128
- var et = "div";
129
- function tt(t) {
130
- var o = t, { store: n } = o, e = K(o, ["store"]);
131
- const [v, i] = ce(void 0), s = e["aria-label"], r = H(n, "disclosureElement"), p = H(n, "contentElement");
132
- return le(() => {
133
- const m = r;
134
- if (!m) return;
135
- const a = p;
136
- if (!a) return;
137
- s || a.hasAttribute("aria-label") ? i(void 0) : m.id && i(m.id);
138
- }, [s, r, p]), v;
139
- }
140
- var fe = G(
141
- function(o) {
142
- var n = o, { store: e, alwaysVisible: v, composite: i } = n, s = K(n, ["store", "alwaysVisible", "composite"]);
143
- const r = z();
144
- e = e || r, J(
145
- e,
146
- process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
147
- );
148
- const p = e.parent, m = e.menubar, a = !!p, _ = ae(s.id), d = s.onKeyDown, u = e.useState(
149
- (l) => l.placement.split("-")[0]
150
- ), E = e.useState(
151
- (l) => l.orientation === "both" ? void 0 : l.orientation
152
- ), f = E !== "vertical", S = H(
153
- m,
154
- (l) => !!l && l.orientation !== "vertical"
155
- ), y = q((l) => {
156
- if (d == null || d(l), !l.defaultPrevented) {
157
- if (a || m && !f) {
158
- const w = {
159
- ArrowRight: () => u === "left" && !f,
160
- ArrowLeft: () => u === "right" && !f,
161
- ArrowUp: () => u === "bottom" && f,
162
- ArrowDown: () => u === "top" && f
163
- }[l.key];
164
- if (w != null && w())
165
- return l.stopPropagation(), l.preventDefault(), e == null ? void 0 : e.hide();
166
- }
167
- if (m) {
168
- const w = {
169
- ArrowRight: () => {
170
- if (S)
171
- return m.next();
172
- },
173
- ArrowLeft: () => {
174
- if (S)
175
- return m.previous();
176
- },
177
- ArrowDown: () => {
178
- if (!S)
179
- return m.next();
180
- },
181
- ArrowUp: () => {
182
- if (!S)
183
- return m.previous();
184
- }
185
- }[l.key], A = w == null ? void 0 : w();
186
- A !== void 0 && (l.stopPropagation(), l.preventDefault(), m.move(A));
187
- }
188
- }
189
- });
190
- s = ue(
191
- s,
192
- (l) => /* @__PURE__ */ h(Se, { value: e, children: l }),
193
- [e]
194
- );
195
- const R = tt(b({ store: e }, s)), L = e.useState("mounted"), C = Je(L, s.hidden, v), D = C ? F(b({}, s.style), { display: "none" }) : s.style;
196
- s = F(b({
197
- id: _,
198
- "aria-labelledby": R,
199
- hidden: C
200
- }, s), {
201
- ref: X(_ ? e.setContentElement : null, s.ref),
202
- style: D,
203
- onKeyDown: y
204
- });
205
- const O = !!e.combobox;
206
- return i = i ?? !O, i && (s = b({
207
- role: "menu",
208
- "aria-orientation": E
209
- }, s)), s = Xe(b({ store: e, composite: i }, s)), s = ie(b({ store: e, typeahead: !O }, s)), s;
210
- }
211
- );
212
- Y(function(o) {
213
- const n = fe(o);
214
- return Z(et, n);
215
- });
216
- var nt = "div", ot = G(function(o) {
217
- var n = o, {
218
- store: e,
219
- modal: v = !1,
220
- portal: i = !!v,
221
- hideOnEscape: s = !0,
222
- autoFocusOnShow: r = !0,
223
- hideOnHoverOutside: p,
224
- alwaysVisible: m
225
- } = n, a = K(n, [
226
- "store",
227
- "modal",
228
- "portal",
229
- "hideOnEscape",
230
- "autoFocusOnShow",
231
- "hideOnHoverOutside",
232
- "alwaysVisible"
233
- ]);
234
- const _ = z();
235
- e = e || _, J(
236
- e,
237
- process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
238
- );
239
- const d = me(null), u = e.parent, E = e.menubar, f = !!u, S = !!E && !f;
240
- a = F(b({}, a), {
241
- ref: X(d, a.ref)
242
- });
243
- const y = fe(b({
244
- store: e,
245
- alwaysVisible: m
246
- }, a)), { "aria-labelledby": R } = y;
247
- a = K(y, ["aria-labelledby"]);
248
- const [C, D] = ce(), O = e.useState("autoFocusOnShow"), l = e.useState("initialFocus"), k = e.useState("baseElement"), w = e.useState("renderedItems");
249
- le(() => {
250
- let P = !1;
251
- return D((M) => {
252
- var j, ee, te;
253
- if (P || !O) return;
254
- if ((j = M == null ? void 0 : M.current) != null && j.isConnected) return M;
255
- const W = Qe();
256
- switch (l) {
257
- // TODO: Refactor
258
- case "first":
259
- W.current = ((ee = w.find((T) => !T.disabled && T.element)) == null ? void 0 : ee.element) || null;
260
- break;
261
- case "last":
262
- W.current = ((te = [...w].reverse().find((T) => !T.disabled && T.element)) == null ? void 0 : te.element) || null;
263
- break;
264
- default:
265
- W.current = k;
266
- }
267
- return W;
268
- }), () => {
269
- P = !0;
270
- };
271
- }, [e, O, l, w, k]);
272
- const A = f ? !1 : v, c = !!r, g = !!C || !!a.initialFocus || !!A, N = H(
273
- e.combobox || e,
274
- "contentElement"
275
- ), I = H(
276
- (u == null ? void 0 : u.combobox) || u,
277
- "contentElement"
278
- ), $ = Ge(() => {
279
- if (!I || !N) return;
280
- const P = N.getAttribute("role"), M = I.getAttribute("role");
281
- if (!((M === "menu" || M === "menubar") && P === "menu"))
282
- return I;
283
- }, [N, I]);
284
- return $ !== void 0 && (a = b({
285
- preserveTabOrderAnchor: $
286
- }, a)), a = Ee(F(b({
287
- store: e,
288
- alwaysVisible: m,
289
- initialFocus: C,
290
- autoFocusOnShow: c ? g && r : O || !!A
291
- }, a), {
292
- hideOnEscape(P) {
293
- return Ke(s, P) ? !1 : (e == null || e.hideAll(), !0);
294
- },
295
- hideOnHoverOutside(P) {
296
- const M = e == null ? void 0 : e.getState().disclosureElement;
297
- return (typeof p == "function" ? p(P) : p ?? (f ? !0 : S ? M ? !Q(M) : !0 : !1)) ? P.defaultPrevented || !f || !M || (Be(M, "mouseout", P), !Q(M)) ? !0 : (requestAnimationFrame(() => {
298
- Q(M) || e == null || e.hide();
299
- }), !1) : !1;
300
- },
301
- modal: A,
302
- portal: i,
303
- backdrop: f ? !1 : a.backdrop
304
- })), a = b({
305
- "aria-labelledby": R
306
- }, a), a;
307
- }), rt = qe(
308
- Y(function(o) {
309
- const n = ot(o);
310
- return Z(nt, n);
311
- }),
312
- z
313
- );
314
- function st(t = {}) {
315
- const o = de(t);
316
- return /* @__PURE__ */ h(se, { value: o, children: t.children });
317
- }
318
- var at = "button";
319
- function ut(t, o) {
320
- return {
321
- ArrowDown: o === "bottom" || o === "top" ? "first" : !1,
322
- ArrowUp: o === "bottom" || o === "top" ? "last" : !1,
323
- ArrowRight: o === "right" ? "first" : !1,
324
- ArrowLeft: o === "left" ? "first" : !1
325
- }[t.key];
326
- }
327
- function re(t, o) {
328
- return !!(t != null && t.some((n) => !n.element || n.element === o ? !1 : n.element.getAttribute("aria-expanded") === "true"));
329
- }
330
- var it = G(
331
- function(o) {
332
- var n = o, {
333
- store: e,
334
- focusable: v,
335
- accessibleWhenDisabled: i,
336
- showOnHover: s
337
- } = n, r = K(n, [
338
- "store",
339
- "focusable",
340
- "accessibleWhenDisabled",
341
- "showOnHover"
342
- ]);
343
- const p = z();
344
- e = e || p, J(
345
- e,
346
- process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
347
- );
348
- const m = me(null), a = e.parent, _ = e.menubar, d = !!a, u = !!_ && !d, E = $e(r), f = () => {
349
- const c = m.current;
350
- c && (e == null || e.setDisclosureElement(c), e == null || e.setAnchorElement(c), e == null || e.show());
351
- }, S = r.onFocus, y = q((c) => {
352
- if (S == null || S(c), E || c.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !_) || !u) return;
353
- const { items: g } = _.getState();
354
- re(g, c.currentTarget) && f();
355
- }), R = H(
356
- e,
357
- (c) => c.placement.split("-")[0]
358
- ), L = r.onKeyDown, C = q((c) => {
359
- if (L == null || L(c), E || c.defaultPrevented) return;
360
- const g = ut(c, R);
361
- g && (c.preventDefault(), f(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(g));
362
- }), D = r.onClick, O = q((c) => {
363
- if (D == null || D(c), c.defaultPrevented || !e) return;
364
- const g = !c.detail, { open: N } = e.getState();
365
- (!N || g) && ((!d || g) && e.setAutoFocusOnShow(!0), e.setInitialFocus(g ? "first" : "container")), d && f();
366
- });
367
- r = ue(
368
- r,
369
- (c) => /* @__PURE__ */ h(se, { value: e, children: c }),
370
- [e]
371
- ), d && (r = F(b({}, r), {
372
- render: /* @__PURE__ */ h(ze.div, { render: r.render })
373
- }));
374
- const l = ae(r.id), k = H(
375
- (a == null ? void 0 : a.combobox) || a,
376
- "contentElement"
377
- ), w = d || u ? je(k, "menuitem") : void 0, A = e.useState("contentElement");
378
- return r = F(b({
379
- id: l,
380
- role: w,
381
- "aria-haspopup": We(A, "menu")
382
- }, r), {
383
- ref: X(m, r.ref),
384
- onFocus: y,
385
- onKeyDown: C,
386
- onClick: O
387
- }), r = Oe(F(b({
388
- store: e,
389
- focusable: v,
390
- accessibleWhenDisabled: i
391
- }, r), {
392
- showOnHover: (c) => {
393
- if (!(() => {
394
- if (typeof s == "function") return s(c);
395
- if (s != null) return s;
396
- if (d) return !0;
397
- if (!_) return !1;
398
- const { items: $ } = _.getState();
399
- return u && re($);
400
- })()) return !1;
401
- const I = u ? _ : a;
402
- return I && I.setActiveId(c.currentTarget.id), !0;
403
- }
404
- })), r = Ue(b({
405
- store: e,
406
- toggleOnClick: !d,
407
- focusable: v,
408
- accessibleWhenDisabled: i
409
- }, r)), r = ie(b({
410
- store: e,
411
- typeahead: u
412
- }, r)), r;
413
- }
414
- ), ct = Y(function(o) {
415
- const n = it(o);
416
- return Z(at, n);
417
- });
418
- const lt = ({ item: t }) => {
419
- const o = t.icon || he, n = de();
420
- return /* @__PURE__ */ U(st, { store: n, children: [
421
- /* @__PURE__ */ U(
422
- ct,
423
- {
424
- className: "component-menu__item component-menu__item--submenu",
425
- render: /* @__PURE__ */ h(ge, {}),
426
- disabled: t.disabled,
427
- children: [
428
- /* @__PURE__ */ h(o, { className: "component-menu__item__icon component-menu__item__icon--pictoral" }),
429
- /* @__PURE__ */ U("div", { className: "component-menu__item__text", children: [
430
- /* @__PURE__ */ U("div", { className: "component-menu__item__text__header", children: [
431
- /* @__PURE__ */ h("div", { className: "component-menu__item__label", children: t.label }),
432
- /* @__PURE__ */ h(ve, { className: "component-menu__item__icon component-menu__item__icon--submenu-indicator" })
433
- ] }),
434
- /* @__PURE__ */ h("p", { className: "component-menu__item__description", children: t.description })
435
- ] })
436
- ]
437
- }
438
- ),
439
- /* @__PURE__ */ h(
440
- rt,
441
- {
442
- gutter: 12,
443
- shift: 0,
444
- wrapperProps: {
445
- className: "component-menu__menu-wrapper"
446
- },
447
- className: "component-menu",
448
- children: t.children.map((e, v) => /* @__PURE__ */ h(mt, { item: e }, v))
449
- }
450
- )
451
- ] });
452
- }, mt = ({ item: t }) => {
453
- switch (t.type) {
454
- case "action":
455
- return /* @__PURE__ */ h(pe, { item: t });
456
- case "toggle":
457
- return /* @__PURE__ */ h(_e, { item: t });
458
- case "submenu":
459
- return /* @__PURE__ */ h(lt, { item: t });
460
- case "separator":
461
- return /* @__PURE__ */ h(be, {});
462
- }
463
- };
464
- export {
465
- st as M,
466
- lt as S,
467
- ct as a,
468
- rt as b,
469
- mt as c
470
- };
@@ -1,20 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { u as i } from "./O2PQ2652-THp22K4G.js";
3
- import { a as s } from "./MTZPJQMC-RLG1q394.js";
4
- function a(o = {}) {
5
- const r = i(o);
6
- return /* @__PURE__ */ e(s, { value: r, children: o.children });
7
- }
8
- const P = ({ open: o, setOpen: r, placement: t, children: n }) => /* @__PURE__ */ e(
9
- a,
10
- {
11
- open: o,
12
- setOpen: r,
13
- placement: t,
14
- children: n
15
- }
16
- );
17
- export {
18
- a as P,
19
- P as R
20
- };