@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
@@ -0,0 +1,173 @@
1
+ import { c as $, u as j, a as U, b as W } from "./MR26YJYP-DacZIkgJ.js";
2
+ import { c as q } from "./G7GW6PWC-A0eDeXMt.js";
3
+ import { T as x, V as m, U as h, I as z, f as k, c as w, a as N, _ as A, i as R, l as G, o as S, m as I, a4 as _, M as J, a1 as K, e as E } from "./LMDWO4NN-CIZvvtic.js";
4
+ import { jsx as B } from "react/jsx-runtime";
5
+ import { c as D, b as L, d as y, e as H } from "./YV4JVR4I-w1-dnslS.js";
6
+ import { H as Q, a as X } from "./EM5CXX6A-C74NAQPE.js";
7
+ import { useRef as Y, useEffect as C } from "react";
8
+ function Z(t = {}) {
9
+ var r;
10
+ process.env.NODE_ENV !== "production" && t.type === "label" && console.warn(
11
+ "The `type` option on the tooltip store is deprecated.",
12
+ "Render a visually hidden label or use the `aria-label` or `aria-labelledby` attributes on the anchor element instead.",
13
+ "See https://ariakit.org/components/tooltip#tooltip-anchors-must-have-accessible-names"
14
+ );
15
+ const o = (r = t.store) == null ? void 0 : r.getState(), e = $(x(h({}, t), {
16
+ placement: m(
17
+ t.placement,
18
+ o == null ? void 0 : o.placement,
19
+ "top"
20
+ ),
21
+ hideTimeout: m(t.hideTimeout, o == null ? void 0 : o.hideTimeout, 0)
22
+ })), p = x(h({}, e.getState()), {
23
+ type: m(t.type, o == null ? void 0 : o.type, "description"),
24
+ skipTimeout: m(t.skipTimeout, o == null ? void 0 : o.skipTimeout, 300)
25
+ }), a = D(p, e, t.store);
26
+ return h(h({}, e), a);
27
+ }
28
+ function ee(t, r, o) {
29
+ return y(t, o, "type"), y(t, o, "skipTimeout"), j(t, r, o);
30
+ }
31
+ function te(t = {}) {
32
+ const [r, o] = L(Z, t);
33
+ return ee(r, o, t);
34
+ }
35
+ var T = z(
36
+ [X],
37
+ [Q]
38
+ ), me = T.useContext, g = T.useProviderContext, oe = T.ContextProvider, re = T.ScopedContextProvider, ne = "div", ae = w(
39
+ function(r) {
40
+ var o = r, {
41
+ store: e,
42
+ portal: p = !0,
43
+ gutter: a = 8,
44
+ preserveTabOrder: b = !1,
45
+ hideOnHoverOutside: d = !0,
46
+ hideOnInteractOutside: v = !0
47
+ } = o, s = A(o, [
48
+ "store",
49
+ "portal",
50
+ "gutter",
51
+ "preserveTabOrder",
52
+ "hideOnHoverOutside",
53
+ "hideOnInteractOutside"
54
+ ]);
55
+ const f = g();
56
+ e = e || f, R(
57
+ e,
58
+ process.env.NODE_ENV !== "production" && "Tooltip must receive a `store` prop or be wrapped in a TooltipProvider component."
59
+ ), s = G(
60
+ s,
61
+ (i) => /* @__PURE__ */ B(re, { value: e, children: i }),
62
+ [e]
63
+ );
64
+ const P = e.useState(
65
+ (i) => i.type === "description" ? "tooltip" : "none"
66
+ );
67
+ return s = S({ role: P }, s), s = U(I(S({}, s), {
68
+ store: e,
69
+ portal: p,
70
+ gutter: a,
71
+ preserveTabOrder: b,
72
+ hideOnHoverOutside(i) {
73
+ if (_(d, i)) return !1;
74
+ const l = e == null ? void 0 : e.getState().anchorElement;
75
+ return l ? !("focusVisible" in l.dataset) : !0;
76
+ },
77
+ hideOnInteractOutside: (i) => {
78
+ if (_(v, i)) return !1;
79
+ const l = e == null ? void 0 : e.getState().anchorElement;
80
+ return l ? !J(l, i.target) : !0;
81
+ }
82
+ })), s;
83
+ }
84
+ ), he = q(
85
+ k(function(r) {
86
+ const o = ae(r);
87
+ return N(ne, o);
88
+ }),
89
+ g
90
+ );
91
+ function Se(t = {}) {
92
+ const r = te(t);
93
+ return /* @__PURE__ */ B(oe, { value: r, children: t.children });
94
+ }
95
+ var ie = "div", c = D({
96
+ activeStore: null
97
+ });
98
+ function V(t) {
99
+ return () => {
100
+ const { activeStore: r } = c.getState();
101
+ r === t && c.setState("activeStore", null);
102
+ };
103
+ }
104
+ var se = w(
105
+ function(r) {
106
+ var o = r, { store: e, showOnHover: p = !0 } = o, a = A(o, ["store", "showOnHover"]);
107
+ const b = g();
108
+ e = e || b, R(
109
+ e,
110
+ process.env.NODE_ENV !== "production" && "TooltipAnchor must receive a `store` prop or be wrapped in a TooltipProvider component."
111
+ );
112
+ const d = Y(!1);
113
+ C(() => H(e, ["mounted"], (n) => {
114
+ n.mounted || (d.current = !1);
115
+ }), [e]), C(() => {
116
+ if (e)
117
+ return K(
118
+ // Immediately remove the current store from the global store when
119
+ // the component unmounts. This is useful, for example, to avoid
120
+ // showing tooltips immediately on serial tests.
121
+ V(e),
122
+ H(e, ["mounted", "skipTimeout"], (n) => {
123
+ if (!e) return;
124
+ if (n.mounted) {
125
+ const { activeStore: O } = c.getState();
126
+ return O !== e && (O == null || O.hide()), c.setState("activeStore", e);
127
+ }
128
+ const u = setTimeout(
129
+ V(e),
130
+ n.skipTimeout
131
+ );
132
+ return () => clearTimeout(u);
133
+ })
134
+ );
135
+ }, [e]);
136
+ const v = a.onMouseEnter, s = E((n) => {
137
+ v == null || v(n), d.current = !0;
138
+ }), f = a.onFocusVisible, P = E((n) => {
139
+ f == null || f(n), !n.defaultPrevented && (e == null || e.setAnchorElement(n.currentTarget), e == null || e.show());
140
+ }), i = a.onBlur, l = E((n) => {
141
+ if (i == null || i(n), n.defaultPrevented) return;
142
+ const { activeStore: u } = c.getState();
143
+ d.current = !1, u === e && c.setState("activeStore", null);
144
+ }), F = e.useState("type"), M = e.useState((n) => {
145
+ var u;
146
+ return (u = n.contentElement) == null ? void 0 : u.id;
147
+ });
148
+ return a = I(S({
149
+ "aria-labelledby": F === "label" ? M : void 0
150
+ }, a), {
151
+ onMouseEnter: s,
152
+ onFocusVisible: P,
153
+ onBlur: l
154
+ }), a = W(S({
155
+ store: e,
156
+ showOnHover(n) {
157
+ if (!d.current || _(p, n)) return !1;
158
+ const { activeStore: u } = c.getState();
159
+ return u ? (e == null || e.show(), !1) : !0;
160
+ }
161
+ }, a)), a;
162
+ }
163
+ ), Te = k(function(r) {
164
+ const o = se(r);
165
+ return N(ie, o);
166
+ });
167
+ export {
168
+ Se as T,
169
+ Te as a,
170
+ he as b,
171
+ te as c,
172
+ me as u
173
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrdagency/blockout",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A React component library created by WRD.agency",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,85 +0,0 @@
1
- import { a as _ } from "./VIIRIBF3-DylpToFV.js";
2
- import { e as H, C as T } from "./P7GR5CS5-Dub2zqTX.js";
3
- import { I as y, s as P, f as k, c as w, a as A, _ as D, i as N, j as F, e as R, U as V, V as W, W as j, m as C, o as f, C as B } from "./LMDWO4NN-DdLnHzru.js";
4
- import { createContext as K } from "react";
5
- import { u as q } from "./UQQRIHDV-DIXH69U3.js";
6
- import { u as L } from "./6VRAQV3D-BoLhl3hf.js";
7
- import { a as U } from "./YV4JVR4I-BXEaRiAN.js";
8
- import { a as x } from "./PFRGBC2K-DUhGSIey.js";
9
- var g = y(
10
- [T],
11
- [H]
12
- ), oe = g.useContext, z = g.useScopedContext;
13
- K(
14
- void 0
15
- );
16
- var G = "div";
17
- function J(a, o, u) {
18
- var t;
19
- if (!a) return !1;
20
- if (x(a)) return !0;
21
- const i = o == null ? void 0 : o.find((r) => {
22
- var l;
23
- return r.element === u ? !1 : ((l = r.element) == null ? void 0 : l.getAttribute("aria-expanded")) === "true";
24
- }), c = (t = i == null ? void 0 : i.element) == null ? void 0 : t.getAttribute("aria-controls");
25
- if (!c) return !1;
26
- const n = B(a).getElementById(c);
27
- return n ? x(n) ? !0 : !!n.querySelector("[role=menuitem][aria-expanded=true]") : !1;
28
- }
29
- var Q = w(
30
- function(o) {
31
- var u = o, {
32
- store: t,
33
- hideOnClick: i = !0,
34
- preventScrollOnKeyDown: c = !0,
35
- focusOnHover: s,
36
- blurOnHoverEnd: n
37
- } = u, r = D(u, [
38
- "store",
39
- "hideOnClick",
40
- "preventScrollOnKeyDown",
41
- "focusOnHover",
42
- "blurOnHoverEnd"
43
- ]);
44
- const l = _(!0), M = z();
45
- t = t || l || M, N(
46
- t,
47
- process.env.NODE_ENV !== "production" && "MenuItem must be wrapped in a MenuList, Menu or Menubar component"
48
- );
49
- const m = r.onClick, b = F(i), p = "hideAll" in t ? t.hideAll : void 0, d = !!p, O = R((e) => {
50
- m == null || m(e), !(e.defaultPrevented || V(e) || W(e) || !p || e.currentTarget.getAttribute("aria-haspopup") === "menu") && b(e) && p();
51
- }), h = U(
52
- t,
53
- (e) => "contentElement" in e ? e.contentElement : null
54
- ), I = j(h, "menuitem");
55
- return r = C(f({
56
- role: I
57
- }, r), {
58
- onClick: O
59
- }), r = L(f({
60
- store: t,
61
- preventScrollOnKeyDown: c
62
- }, r)), r = q(C(f({
63
- store: t
64
- }, r), {
65
- focusOnHover(e) {
66
- const v = () => typeof s == "function" ? s(e) : s ?? !0;
67
- if (!t || !v()) return !1;
68
- const { baseElement: E, items: S } = t.getState();
69
- return d ? (e.currentTarget.hasAttribute("aria-expanded") && e.currentTarget.focus(), !0) : J(E, S, e.currentTarget) ? (e.currentTarget.focus(), !0) : !1;
70
- },
71
- blurOnHoverEnd(e) {
72
- return typeof n == "function" ? n(e) : n ?? d;
73
- }
74
- })), r;
75
- }
76
- ), ue = P(
77
- k(function(o) {
78
- const u = Q(o);
79
- return A(G, u);
80
- })
81
- );
82
- export {
83
- ue as M,
84
- oe as u
85
- };
@@ -1,61 +0,0 @@
1
- import { u as I } from "./PFRGBC2K-DUhGSIey.js";
2
- import { c as O, _ as m, A as p, t as q, E as x, e as _, h as H, k as Y, F as j, G, H as T, m as L, n as V, o as w, f as z, a as J } from "./LMDWO4NN-DdLnHzru.js";
3
- import { useRef as C, useState as D, useEffect as Q } from "react";
4
- var W = "button";
5
- function M(s) {
6
- if (!s.isTrusted) return !1;
7
- const t = s.currentTarget;
8
- return s.key === "Enter" ? p(t) || t.tagName === "SUMMARY" || t.tagName === "A" : s.key === " " ? p(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
9
- }
10
- var X = Symbol("command"), Z = O(
11
- function(t) {
12
- var o = t, { clickOnEnter: d = !0, clickOnSpace: u = !0 } = o, r = m(o, ["clickOnEnter", "clickOnSpace"]);
13
- const c = C(null), [K, R] = D(!1);
14
- Q(() => {
15
- c.current && R(p(c.current));
16
- }, []);
17
- const [U, k] = D(!1), f = C(!1), y = q(r), [E, A] = x(r, X, !0), P = r.onKeyDown, F = _((e) => {
18
- P == null || P(e);
19
- const a = e.currentTarget;
20
- if (e.defaultPrevented || E || y || !H(e) || Y(a) || a.isContentEditable) return;
21
- const i = d && e.key === "Enter", n = u && e.key === " ", v = e.key === "Enter" && !d, l = e.key === " " && !u;
22
- if (v || l) {
23
- e.preventDefault();
24
- return;
25
- }
26
- if (i || n) {
27
- const S = M(e);
28
- if (i) {
29
- if (!S) {
30
- e.preventDefault();
31
- const b = e, { view: $ } = b, B = m(b, ["view"]), N = () => T(a, B);
32
- j() ? G(a, "keyup", N) : queueMicrotask(N);
33
- }
34
- } else n && (f.current = !0, S || (e.preventDefault(), k(!0)));
35
- }
36
- }), g = r.onKeyUp, h = _((e) => {
37
- if (g == null || g(e), e.defaultPrevented || E || y || e.metaKey) return;
38
- const a = u && e.key === " ";
39
- if (f.current && a && (f.current = !1, !M(e))) {
40
- e.preventDefault(), k(!1);
41
- const i = e.currentTarget, n = e, { view: v } = n, l = m(n, ["view"]);
42
- queueMicrotask(() => T(i, l));
43
- }
44
- });
45
- return r = L(w(w({
46
- "data-active": U || void 0,
47
- type: K ? "button" : void 0
48
- }, A), r), {
49
- ref: V(c, r.ref),
50
- onKeyDown: F,
51
- onKeyUp: h
52
- }), r = I(r), r;
53
- }
54
- );
55
- z(function(t) {
56
- const o = Z(t);
57
- return J(W, o);
58
- });
59
- export {
60
- Z as u
61
- };
@@ -1,11 +0,0 @@
1
- import { e, C as r } from "./P7GR5CS5-Dub2zqTX.js";
2
- import { I as t } from "./LMDWO4NN-DdLnHzru.js";
3
- var o = t(
4
- [r],
5
- [e]
6
- ), C = o.useContext, x = o.useProviderContext, i = o.ScopedContextProvider;
7
- export {
8
- i as T,
9
- x as a,
10
- C as u
11
- };
@@ -1,14 +0,0 @@
1
- import { P as o, a as r } from "./MTZPJQMC-RLG1q394.js";
2
- import { I as t } from "./LMDWO4NN-DdLnHzru.js";
3
- var e = t(
4
- [r],
5
- [o]
6
- );
7
- e.useContext;
8
- e.useScopedContext;
9
- var d = e.useProviderContext, x = e.ContextProvider, n = e.ScopedContextProvider;
10
- export {
11
- n as H,
12
- x as a,
13
- d as u
14
- };
@@ -1,283 +0,0 @@
1
- import { c as pe, a as he } from "./O2PQ2652-THp22K4G.js";
2
- import { c as Pe, d as q, e as we } from "./YV4JVR4I-BXEaRiAN.js";
3
- import { Q as B, S as A, R as D, c as oe, _ as Y, i as re, a2 as He, L as ne, j as I, a1 as z, Z as F, a3 as Ee, b as ge, l as Oe, m as k, n as se, o as R, a4 as Se, M as W, e as X, f as ue, a as ie, t as be } from "./LMDWO4NN-DdLnHzru.js";
4
- import { u as G, H as Me } from "./EM5CXX6A-DKxCXPnz.js";
5
- import { u as Fe, c as Te } from "./G7GW6PWC-Crp1Jn-8.js";
6
- import { a as _e, u as Ae } from "./PFRGBC2K-DUhGSIey.js";
7
- import { useRef as y, useState as ce, useEffect as g, useContext as Re, createContext as ye, useCallback as ae } from "react";
8
- import { jsx as J } from "react/jsx-runtime";
9
- function Ye(n = {}) {
10
- var u;
11
- const t = (u = n.store) == null ? void 0 : u.getState(), e = pe(B(D({}, n), {
12
- placement: A(
13
- n.placement,
14
- t == null ? void 0 : t.placement,
15
- "bottom"
16
- )
17
- })), r = A(n.timeout, t == null ? void 0 : t.timeout, 500), s = B(D({}, e.getState()), {
18
- timeout: r,
19
- showTimeout: A(n.showTimeout, t == null ? void 0 : t.showTimeout),
20
- hideTimeout: A(n.hideTimeout, t == null ? void 0 : t.hideTimeout),
21
- autoFocusOnShow: A(t == null ? void 0 : t.autoFocusOnShow, !1)
22
- }), i = Pe(s, e, n.store);
23
- return B(D(D({}, e), i), {
24
- setAutoFocusOnShow: (a) => i.setState("autoFocusOnShow", a)
25
- });
26
- }
27
- function Ge(n, u, t) {
28
- return q(n, t, "timeout"), q(n, t, "showTimeout"), q(n, t, "hideTimeout"), he(n, u, t);
29
- }
30
- function $(n) {
31
- return [n.clientX, n.clientY];
32
- }
33
- function K(n, u) {
34
- const [t, e] = n;
35
- let r = !1;
36
- const s = u.length;
37
- for (let i = s, a = 0, c = i - 1; a < i; c = a++) {
38
- const [o, d] = u[a], [h, p] = u[c], [, w] = u[c === 0 ? i - 1 : c - 1] || [0, 0], v = (d - p) * (t - o) - (o - h) * (e - d);
39
- if (p < d) {
40
- if (e >= p && e < d) {
41
- if (v === 0) return !0;
42
- v > 0 && (e === p ? e > w && (r = !r) : r = !r);
43
- }
44
- } else if (d < p) {
45
- if (e > d && e <= p) {
46
- if (v === 0) return !0;
47
- v < 0 && (e === p ? e < w && (r = !r) : r = !r);
48
- }
49
- } else if (e === d && (t >= h && t <= o || t >= o && t <= h))
50
- return !0;
51
- }
52
- return r;
53
- }
54
- function xe(n, u) {
55
- const { top: t, right: e, bottom: r, left: s } = u, [i, a] = n, c = i < s ? "left" : i > e ? "right" : null, o = a < t ? "top" : a > r ? "bottom" : null;
56
- return [c, o];
57
- }
58
- function ee(n, u) {
59
- const t = n.getBoundingClientRect(), { top: e, right: r, bottom: s, left: i } = t, [a, c] = xe(u, t), o = [u];
60
- return a ? (c !== "top" && o.push([a === "left" ? i : r, e]), o.push([a === "left" ? r : i, e]), o.push([a === "left" ? r : i, s]), c !== "bottom" && o.push([a === "left" ? i : r, s])) : c === "top" ? (o.push([i, e]), o.push([i, s]), o.push([r, s]), o.push([r, e])) : (o.push([i, s]), o.push([i, e]), o.push([r, e]), o.push([r, s])), o;
61
- }
62
- var Ce = "div";
63
- function le(n, u, t, e) {
64
- return _e(u) ? !0 : n ? !!(W(u, n) || t && W(t, n) || e != null && e.some((r) => le(n, r, t))) : !1;
65
- }
66
- function Ne(n) {
67
- var u = n, {
68
- store: t
69
- } = u, e = Y(u, [
70
- "store"
71
- ]);
72
- const [r, s] = ce(!1), i = t.useState("mounted");
73
- g(() => {
74
- i || s(!1);
75
- }, [i]);
76
- const a = e.onFocus, c = X((d) => {
77
- a == null || a(d), !d.defaultPrevented && s(!0);
78
- }), o = y(null);
79
- return g(() => we(t, ["anchorElement"], (d) => {
80
- o.current = d.anchorElement;
81
- }), []), e = k(R({
82
- autoFocusOnHide: r,
83
- finalFocus: o
84
- }, e), {
85
- onFocus: c
86
- }), e;
87
- }
88
- var te = ye(null), De = oe(
89
- function(u) {
90
- var t = u, {
91
- store: e,
92
- modal: r = !1,
93
- portal: s = !!r,
94
- hideOnEscape: i = !0,
95
- hideOnHoverOutside: a = !0,
96
- disablePointerEventsOnApproach: c = !!a
97
- } = t, o = Y(t, [
98
- "store",
99
- "modal",
100
- "portal",
101
- "hideOnEscape",
102
- "hideOnHoverOutside",
103
- "disablePointerEventsOnApproach"
104
- ]);
105
- const d = G();
106
- e = e || d, re(
107
- e,
108
- process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
109
- );
110
- const h = y(null), [p, w] = ce([]), v = y(0), S = y(null), { portalRef: P, domReady: f } = He(s, o.portalRef), H = ne(), x = !!a, T = I(a), O = !!c, C = I(
111
- c
112
- ), j = e.useState("open"), b = e.useState("mounted");
113
- g(() => {
114
- if (!f || !b || !x && !O) return;
115
- const l = h.current;
116
- return l ? z(
117
- F("mousemove", (m) => {
118
- if (!e || !H()) return;
119
- const { anchorElement: M, hideTimeout: N, timeout: me } = e.getState(), U = S.current, [L] = m.composedPath(), V = M;
120
- if (le(L, l, V, p)) {
121
- S.current = L && V && W(V, L) ? $(m) : null, window.clearTimeout(v.current), v.current = 0;
122
- return;
123
- }
124
- if (!v.current) {
125
- if (U) {
126
- const Z = $(m), ve = ee(l, U);
127
- if (K(Z, ve)) {
128
- if (S.current = Z, !C(m)) return;
129
- m.preventDefault(), m.stopPropagation();
130
- return;
131
- }
132
- }
133
- T(m) && (v.current = window.setTimeout(() => {
134
- v.current = 0, e == null || e.hide();
135
- }, N ?? me));
136
- }
137
- }, !0),
138
- () => clearTimeout(v.current)
139
- ) : void 0;
140
- }, [
141
- e,
142
- H,
143
- f,
144
- b,
145
- x,
146
- O,
147
- p,
148
- C,
149
- T
150
- ]), g(() => {
151
- if (!f || !b || !O) return;
152
- const l = (E) => {
153
- const m = h.current;
154
- if (!m) return;
155
- const M = S.current;
156
- if (!M) return;
157
- const N = ee(m, M);
158
- if (K($(E), N)) {
159
- if (!C(E)) return;
160
- E.preventDefault(), E.stopPropagation();
161
- }
162
- };
163
- return z(
164
- // Note: we may need to add pointer events here in the future.
165
- F("mouseenter", l, !0),
166
- F("mouseover", l, !0),
167
- F("mouseout", l, !0),
168
- F("mouseleave", l, !0)
169
- );
170
- }, [f, b, O, C]), g(() => {
171
- f && (j || e == null || e.setAutoFocusOnShow(!1));
172
- }, [e, f, j]);
173
- const fe = Ee(j);
174
- g(() => {
175
- if (f)
176
- return () => {
177
- fe.current || e == null || e.setAutoFocusOnShow(!1);
178
- };
179
- }, [e, f]);
180
- const _ = Re(te);
181
- ge(() => {
182
- if (r || !s || !b || !f) return;
183
- const l = h.current;
184
- if (l)
185
- return _ == null ? void 0 : _(l);
186
- }, [r, s, b, f]);
187
- const Q = ae(
188
- (l) => {
189
- w((m) => [...m, l]);
190
- const E = _ == null ? void 0 : _(l);
191
- return () => {
192
- w(
193
- (m) => m.filter((M) => M !== l)
194
- ), E == null || E();
195
- };
196
- },
197
- [_]
198
- );
199
- o = Oe(
200
- o,
201
- (l) => /* @__PURE__ */ J(Me, { value: e, children: /* @__PURE__ */ J(te.Provider, { value: Q, children: l }) }),
202
- [e, Q]
203
- ), o = k(R({}, o), {
204
- ref: se(h, o.ref)
205
- }), o = Ne(R({ store: e }, o));
206
- const de = e.useState(
207
- (l) => r || l.autoFocusOnShow
208
- );
209
- return o = Fe(k(R({
210
- store: e,
211
- modal: r,
212
- portal: s,
213
- autoFocusOnShow: de
214
- }, o), {
215
- portalRef: P,
216
- hideOnEscape(l) {
217
- return Se(i, l) ? !1 : (requestAnimationFrame(() => {
218
- requestAnimationFrame(() => {
219
- e == null || e.hide();
220
- });
221
- }), !0);
222
- }
223
- })), o;
224
- }
225
- );
226
- Te(
227
- ue(function(u) {
228
- const t = De(u);
229
- return ie(Ce, t);
230
- }),
231
- G
232
- );
233
- var ke = "a", je = oe(
234
- function(u) {
235
- var t = u, { store: e, showOnHover: r = !0 } = t, s = Y(t, ["store", "showOnHover"]);
236
- const i = G();
237
- e = e || i, re(
238
- e,
239
- process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
240
- );
241
- const a = be(s), c = y(0);
242
- g(() => () => window.clearTimeout(c.current), []), g(() => F("mouseleave", (f) => {
243
- if (!e) return;
244
- const { anchorElement: H } = e.getState();
245
- H && f.target === H && (window.clearTimeout(c.current), c.current = 0);
246
- }, !0), [e]);
247
- const o = s.onMouseMove, d = I(r), h = ne(), p = X((P) => {
248
- if (o == null || o(P), a || !e || P.defaultPrevented || c.current || !h() || !d(P)) return;
249
- const f = P.currentTarget;
250
- e.setAnchorElement(f), e.setDisclosureElement(f);
251
- const { showTimeout: H, timeout: x } = e.getState(), T = () => {
252
- c.current = 0, h() && (e == null || e.setAnchorElement(f), e == null || e.show(), queueMicrotask(() => {
253
- e == null || e.setDisclosureElement(f);
254
- }));
255
- }, O = H ?? x;
256
- O === 0 ? T() : c.current = window.setTimeout(T, O);
257
- }), w = s.onClick, v = X((P) => {
258
- w == null || w(P), e && (window.clearTimeout(c.current), c.current = 0);
259
- }), S = ae(
260
- (P) => {
261
- if (!e) return;
262
- const { anchorElement: f } = e.getState();
263
- f != null && f.isConnected || e.setAnchorElement(P);
264
- },
265
- [e]
266
- );
267
- return s = k(R({}, s), {
268
- ref: se(S, s.ref),
269
- onMouseMove: p,
270
- onClick: v
271
- }), s = Ae(s), s;
272
- }
273
- );
274
- ue(function(u) {
275
- const t = je(u);
276
- return ie(ke, t);
277
- });
278
- export {
279
- De as a,
280
- je as b,
281
- Ye as c,
282
- Ge as u
283
- };
@@ -1,12 +0,0 @@
1
- import { D as e, a as r } from "./RS7LB2H4-C0kmTjy8.js";
2
- import { I as t } from "./LMDWO4NN-DdLnHzru.js";
3
- var o = t(
4
- [r],
5
- [e]
6
- ), x = o.useContext, P = o.useProviderContext, i = o.ContextProvider, d = o.ScopedContextProvider;
7
- export {
8
- d as P,
9
- i as a,
10
- P as b,
11
- x as u
12
- };
@@ -1,22 +0,0 @@
1
- import { I as t } from "./LMDWO4NN-DdLnHzru.js";
2
- import { createContext as r } from "react";
3
- var o = t(), x = o.useContext;
4
- o.useScopedContext;
5
- o.useProviderContext;
6
- var C = o.ContextProvider, i = o.ScopedContextProvider, e = t(
7
- [C],
8
- [i]
9
- ), a = e.useContext, s = e.useProviderContext, d = e.ContextProvider, p = e.ScopedContextProvider, c = r(
10
- void 0
11
- ), m = r(
12
- void 0
13
- );
14
- export {
15
- d as C,
16
- a,
17
- m as b,
18
- c,
19
- x as d,
20
- p as e,
21
- s as u
22
- };
@@ -1,15 +0,0 @@
1
- import { I as r } from "./LMDWO4NN-DdLnHzru.js";
2
- import { createContext as t } from "react";
3
- var o = r(), s = o.useProviderContext, a = o.ContextProvider, i = o.ScopedContextProvider, e = r(
4
- [a],
5
- [i]
6
- ), x = e.useProviderContext, n = e.ContextProvider, C = e.ScopedContextProvider, c = t(void 0), P = t(void 0);
7
- export {
8
- C as D,
9
- n as a,
10
- x as b,
11
- a as c,
12
- c as d,
13
- P as e,
14
- s as u
15
- };