@wrdagency/blockout 1.0.24 → 1.0.26

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 (220) hide show
  1. package/dist/{2NBKRL7C-Ds7w7Ay7.js → 2NBKRL7C-Cunv252F.js} +10 -10
  2. package/dist/{2RSXSRCN-BBEFwUiL.js → 2RSXSRCN-dNqvVCu5.js} +6 -6
  3. package/dist/{4CMBR7SL-_MPrTek0.js → 4CMBR7SL-Cf8t3EeF.js} +24 -24
  4. package/dist/{5JTVDSTH-Ci6OX9MK.js → 5JTVDSTH-zDMMKAyC.js} +4 -4
  5. package/dist/{5VQZOHHZ-DpLj3Rqp.js → 5VQZOHHZ-BbettT93.js} +1 -1
  6. package/dist/{6VRAQV3D-Cnyfi8tq.js → 6VRAQV3D-pLV6BqmA.js} +6 -6
  7. package/dist/{A3WPL2ZJ-1yF0wSQn.js → A3WPL2ZJ-DEsxy0M-.js} +2 -2
  8. package/dist/{BM6PGYQY-B6HfecNi.js → BM6PGYQY-g6WySwtg.js} +2 -2
  9. package/dist/{DG5U6ZEL-ETCdoLWP.js → DG5U6ZEL-9kCi_mGg.js} +3 -3
  10. package/dist/{EM5CXX6A-CW08TdIG.js → EM5CXX6A-BAj-o9Ka.js} +2 -2
  11. package/dist/{F5MUBM3I-CSfmQDAz.js → F5MUBM3I-AbDoeFd8.js} +17 -17
  12. package/dist/{G7GW6PWC-DtkamyQv.js → G7GW6PWC-DeYlSr7f.js} +56 -56
  13. package/dist/{IWEFDH56-UEiMfbRm.js → IWEFDH56-DLJvQd6v.js} +3 -3
  14. package/dist/{J2LQO3EC-TlCRyAh7.js → J2LQO3EC-Cevd6Bvq.js} +2 -2
  15. package/dist/{KFH4SEIX-D9qCWzyY.js → KFH4SEIX-JLk95eQA.js} +3 -3
  16. package/dist/{LMDWO4NN-BxsnVArz.js → LMDWO4NN-BfJb6my4.js} +29 -29
  17. package/dist/MAXQOH4L-DB7jDisS.js +564 -0
  18. package/dist/{MR26YJYP-BSJHEQsl.js → MR26YJYP-CDaPeerB.js} +33 -33
  19. package/dist/{MTZPJQMC-CNw1MVtu.js → MTZPJQMC-CraWj4on.js} +4 -4
  20. package/dist/{O2PQ2652-BxRvOru-.js → O2PQ2652-BCwdW7qA.js} +11 -11
  21. package/dist/{P7GR5CS5-CZKSJ9w8.js → P7GR5CS5-DbUZzAnv.js} +1 -1
  22. package/dist/{PFRGBC2K-6AvuBT5M.js → PFRGBC2K-DmHoUTiZ.js} +60 -60
  23. package/dist/{RS7LB2H4-DJkydTnE.js → RS7LB2H4-D1_VRecC.js} +6 -6
  24. package/dist/{RZ4GPYOB-DPUx6A2B.js → RZ4GPYOB-rG3RP8Xi.js} +5 -5
  25. package/dist/{S43UC3DV-D5IqpYPC.js → S43UC3DV-bOoyE-xW.js} +6 -6
  26. package/dist/{T7VMP3TM-DX7RU0Yc.js → T7VMP3TM-DZitNAMz.js} +17 -17
  27. package/dist/TIW3GMFC-DPiX149D.js +81 -0
  28. package/dist/{TP7N7UIH-CFp7Hh_A.js → TP7N7UIH-D_nR5wDv.js} +2 -2
  29. package/dist/{UQQRIHDV-D5fevAL1.js → UQQRIHDV-ULrGYPSq.js} +8 -8
  30. package/dist/{UYGDZTLQ-CEz9ajCa.js → UYGDZTLQ-CTQQ8oFQ.js} +2 -2
  31. package/dist/{VIIRIBF3-Co_vwgwZ.js → VIIRIBF3-C4pOScX8.js} +5 -5
  32. package/dist/{WMYDSCNQ-BIYNTVEx.js → WMYDSCNQ-qLZnyPON.js} +13 -13
  33. package/dist/{WYCIER3C-C_60hKUt.js → WYCIER3C-BJwD0YDE.js} +2 -2
  34. package/dist/YORGHBM4-6CReFG7i.js +54 -0
  35. package/dist/{YV4JVR4I-BLQoWp1E.js → YV4JVR4I-D8_aZ62q.js} +48 -48
  36. package/dist/assets/button.css +1 -1
  37. package/dist/assets/index10.css +1 -1
  38. package/dist/assets/index11.css +1 -1
  39. package/dist/assets/index12.css +1 -1
  40. package/dist/assets/index13.css +1 -1
  41. package/dist/assets/index14.css +1 -1
  42. package/dist/assets/index15.css +1 -1
  43. package/dist/assets/index16.css +1 -1
  44. package/dist/assets/index17.css +1 -1
  45. package/dist/assets/index18.css +1 -1
  46. package/dist/assets/index19.css +1 -1
  47. package/dist/assets/index20.css +1 -1
  48. package/dist/assets/index21.css +1 -0
  49. package/dist/assets/index22.css +1 -0
  50. package/dist/assets/index6.css +1 -1
  51. package/dist/assets/index7.css +1 -1
  52. package/dist/assets/index8.css +1 -1
  53. package/dist/assets/index9.css +1 -1
  54. package/dist/assets/style10.css +1 -1
  55. package/dist/assets/style20.css +1 -1
  56. package/dist/assets/style25.css +1 -1
  57. package/dist/assets/style4.css +1 -1
  58. package/dist/assets/style6.css +1 -1
  59. package/dist/assets/style8.css +1 -1
  60. package/dist/assets/style9.css +1 -1
  61. package/dist/combobox-group-BCdU5rML.js +27 -0
  62. package/dist/combobox-popover-D5bLZY4d.js +95 -0
  63. package/dist/components/breadcrumbs/index.js +5 -5
  64. package/dist/components/button/button.d.ts +5 -2
  65. package/dist/components/button/button.js +10 -10
  66. package/dist/components/button/icon.js +1 -1
  67. package/dist/components/button/row.js +4 -4
  68. package/dist/components/command-palette/index.d.ts +28 -0
  69. package/dist/components/command-palette/index.js +177 -0
  70. package/dist/components/command-palette/types.d.ts +10 -0
  71. package/dist/components/command-palette/types.js +1 -0
  72. package/dist/components/controls/base-popover-control/index.js +4 -4
  73. package/dist/components/controls/checkbox-control/index.js +1 -1
  74. package/dist/components/controls/choice-control/choice.js +1 -1
  75. package/dist/components/controls/choice-control/index.js +1 -1
  76. package/dist/components/controls/date-control/index.js +2 -2
  77. package/dist/components/controls/date-control/picker.js +5 -5
  78. package/dist/components/controls/list-control/item.js +1 -1
  79. package/dist/components/controls/recurrence-control/index.js +1 -1
  80. package/dist/components/controls/select-control/control.js +1 -1
  81. package/dist/components/controls/select-control/select.js +12 -11
  82. package/dist/components/controls/tag-control/ariakit-experimental.js +1081 -1162
  83. package/dist/components/controls/tag-control/index.js +9 -8
  84. package/dist/components/controls/tag-control/props.js +1 -1
  85. package/dist/components/controls/toggle-control/index.js +1 -1
  86. package/dist/components/controls/toggle-group-control/index.js +1 -1
  87. package/dist/components/data-form/status.js +1 -1
  88. package/dist/components/data-form/submit.js +1 -1
  89. package/dist/components/data-view/data/filter.js +2 -2
  90. package/dist/components/data-view/index.d.ts +1 -1
  91. package/dist/components/data-view/index.js +1 -1
  92. package/dist/components/data-view/layouts/grid/group.js +2 -2
  93. package/dist/components/data-view/layouts/grid/item.js +2 -2
  94. package/dist/components/data-view/layouts/kanban/group.js +2 -2
  95. package/dist/components/data-view/layouts/kanban/item.js +2 -2
  96. package/dist/components/data-view/layouts/kanban/root.js +1 -1
  97. package/dist/components/data-view/layouts/list/group.js +2 -2
  98. package/dist/components/data-view/layouts/list/item.js +2 -2
  99. package/dist/components/data-view/layouts/table/empty.js +2 -2
  100. package/dist/components/data-view/layouts/table/group.js +3 -3
  101. package/dist/components/data-view/layouts/table/item.js +3 -3
  102. package/dist/components/data-view/layouts/table/root.js +2 -2
  103. package/dist/components/data-view/layouts/tile/group.js +2 -2
  104. package/dist/components/data-view/layouts/tile/item.js +2 -2
  105. package/dist/components/data-view/parts/body/empty.js +1 -1
  106. package/dist/components/data-view/parts/body/index.js +4 -4
  107. package/dist/components/data-view/parts/controls/index.js +2 -2
  108. package/dist/components/data-view/parts/controls/search.js +2 -2
  109. package/dist/components/data-view/parts/filters/chip.js +1 -1
  110. package/dist/components/data-view/parts/filters/editor.js +1 -1
  111. package/dist/components/data-view/parts/filters/index.js +1 -1
  112. package/dist/components/data-view/parts/footer/actions.js +2 -2
  113. package/dist/components/data-view/parts/footer/index.js +2 -2
  114. package/dist/components/data-view/parts/footer/selection.js +2 -2
  115. package/dist/components/data-view/parts/view-control/index.js +2 -2
  116. package/dist/components/data-view/root.js +2 -2
  117. package/dist/components/data-view/slots/group/checkbox.js +3 -3
  118. package/dist/components/data-view/slots/group/context.js +1 -1
  119. package/dist/components/data-view/slots/group/header.js +1 -1
  120. package/dist/components/data-view/slots/group/icon.js +1 -1
  121. package/dist/components/data-view/slots/group/index.js +1 -1
  122. package/dist/components/data-view/slots/group/label.js +1 -1
  123. package/dist/components/data-view/slots/index.js +3 -3
  124. package/dist/components/data-view/slots/item/actions.js +1 -1
  125. package/dist/components/data-view/slots/item/checkbox.js +2 -2
  126. package/dist/components/data-view/slots/item/depth.js +3 -3
  127. package/dist/components/data-view/slots/item/description.js +1 -1
  128. package/dist/components/data-view/slots/item/index.js +1 -1
  129. package/dist/components/data-view/slots/item/properties.js +2 -2
  130. package/dist/components/data-view/slots/item/relations.js +3 -3
  131. package/dist/components/data-view/slots/item/tags.js +1 -1
  132. package/dist/components/data-view/slots/item/thumbnail.js +1 -1
  133. package/dist/components/data-view/slots/item/title.js +1 -1
  134. package/dist/components/data-view/slots/item/util.js +2 -2
  135. package/dist/components/data-view/slots/property/field/editable.js +2 -2
  136. package/dist/components/data-view/slots/property/field/index.js +1 -1
  137. package/dist/components/data-view/slots/property/field/static.js +1 -1
  138. package/dist/components/data-view/slots/property/index.js +1 -1
  139. package/dist/components/data-view/slots/property/label.js +1 -1
  140. package/dist/components/data-view/slots/root/checkbox.js +2 -2
  141. package/dist/components/data-view/slots/root/index.js +1 -1
  142. package/dist/components/dialog/index.d.ts +14 -0
  143. package/dist/components/dialog/index.js +72 -0
  144. package/dist/components/filesystem/file.js +1 -1
  145. package/dist/components/filesystem/folder.js +7 -6
  146. package/dist/components/filesystem/index.js +1 -1
  147. package/dist/components/filesystem/list.js +1 -1
  148. package/dist/components/filesystem/root.js +1 -1
  149. package/dist/components/index.d.ts +3 -1
  150. package/dist/components/index.js +67 -63
  151. package/dist/components/menu/index.js +2 -2
  152. package/dist/components/menu/item.js +1 -1
  153. package/dist/components/menu/items/action.js +1 -1
  154. package/dist/components/menu/items/spacer.js +1 -1
  155. package/dist/components/menu/items/submenu.js +3 -3
  156. package/dist/components/menu/items/toggle.js +1 -1
  157. package/dist/components/pagination/index.js +1 -1
  158. package/dist/components/progress/index.js +1 -1
  159. package/dist/components/shell/context.d.ts +9 -0
  160. package/dist/components/shell/context.js +25 -0
  161. package/dist/components/shell/index.js +9 -5
  162. package/dist/components/shell/navigation.js +49 -4
  163. package/dist/components/shell/pane.d.ts +0 -2
  164. package/dist/components/shell/pane.js +10 -22
  165. package/dist/components/shell/root.js +18 -17
  166. package/dist/components/shell/sidebar-item.d.ts +8 -0
  167. package/dist/components/shell/sidebar-item.js +46 -0
  168. package/dist/components/shell/sidebar-separator.d.ts +6 -0
  169. package/dist/components/shell/sidebar-separator.js +16 -0
  170. package/dist/components/shell/sidebar.js +3 -3
  171. package/dist/components/tabs/index.js +1 -1
  172. package/dist/components/tabs/list.js +1 -1
  173. package/dist/components/tabs/panel.js +1 -1
  174. package/dist/components/tabs/root.js +1 -1
  175. package/dist/components/tabs/tab.js +1 -1
  176. package/dist/components/tag/index.js +1 -1
  177. package/dist/components/tag/tag.js +1 -1
  178. package/dist/components/toolbar/divider.js +1 -1
  179. package/dist/components/toolbar/index.js +2 -2
  180. package/dist/components/toolbar/root.js +1 -1
  181. package/dist/components/window/index.js +2 -2
  182. package/dist/{composite-provider-K8zU8z0x.js → composite-provider-DFOFHro7.js} +2 -2
  183. package/dist/disclosure-provider-DIT2ijtk.js +10 -0
  184. package/dist/{filter-DHK0UoZG.js → filter-DzrtcAfG.js} +1 -1
  185. package/dist/{index-BnbjJBS4.js → index-B5z_GwnD.js} +3 -3
  186. package/dist/{index-BLCPauyN.js → index-Bp_FFk15.js} +2 -2
  187. package/dist/{index-CLl-PPjx.js → index-C8OctMj0.js} +1 -1
  188. package/dist/index.js +118 -112
  189. package/dist/{item-BZJ3JrHw.js → item-CGLYiEST.js} +2 -2
  190. package/dist/{menu-button-DBjUzoaw.js → menu-button-C-h3k7Gh.js} +26 -26
  191. package/dist/{menu-separator-H9l1SpSV.js → menu-separator-CuuhJPnR.js} +3 -3
  192. package/dist/{picker-aBRTIOUU.js → picker-BUCg1BqW.js} +4 -4
  193. package/dist/{popover-provider-xofWxUiu.js → popover-provider-BoZ9PI_r.js} +4 -4
  194. package/dist/primitives/index.d.ts +1 -1
  195. package/dist/primitives/index.js +14 -12
  196. package/dist/primitives/link/index.js +1 -1
  197. package/dist/primitives/popover/index.js +1 -1
  198. package/dist/primitives/popover/root.js +1 -1
  199. package/dist/primitives/popover/target.js +1 -1
  200. package/dist/primitives/popover/window.js +3 -3
  201. package/dist/primitives/scroll-area/index.js +1 -1
  202. package/dist/primitives/tooltip/index.d.ts +2 -0
  203. package/dist/primitives/tooltip/index.js +38 -21
  204. package/dist/primitives/typography/index.d.ts +1 -0
  205. package/dist/primitives/typography/index.js +9 -7
  206. package/dist/primitives/typography/keyboard.d.ts +8 -0
  207. package/dist/primitives/typography/keyboard.js +33 -0
  208. package/dist/{select-popover-BuB2Ioa9.js → select-popover-DmN0T8PP.js} +46 -46
  209. package/dist/{select-value-C1gT40_5.js → select-value-DnWKxDD-.js} +2 -2
  210. package/dist/{tab-BbgJF9GJ.js → tab-BXGTM7Se.js} +4 -4
  211. package/dist/{tab-list-BvZvev5m.js → tab-list-BPSxHllS.js} +3 -3
  212. package/dist/{tab-panel-QxtN3GO3.js → tab-panel-fbUcLE4f.js} +7 -7
  213. package/dist/{tab-provider-T_g-bJwY.js → tab-provider-x586a8l7.js} +17 -17
  214. package/dist/{tag-remove-DVXj7CeY.js → tag-remove-BdHvB_5c.js} +37 -37
  215. package/dist/{toolbar-Bl6JBFO2.js → toolbar-hQ58P-Nk.js} +5 -5
  216. package/dist/{toolbar-separator-CN-A8iMa.js → toolbar-separator-CN00-jyc.js} +3 -3
  217. package/dist/{tooltip-arrow-DSk_atex.js → tooltip-arrow-BRJ4m2ZL.js} +36 -36
  218. package/package.json +1 -1
  219. package/dist/combobox-popover-DFcT6u90.js +0 -650
  220. package/dist/disclosure-provider-CX3wr_3W.js +0 -61
@@ -1,650 +0,0 @@
1
- import { u as Xe } from "./5JTVDSTH-Ci6OX9MK.js";
2
- import { a as Ye } from "./WMYDSCNQ-BIYNTVEx.js";
3
- import { a as me, C as Ze, b as ye, c as et, d as tt, e as Ee, u as ot, f as nt } from "./S43UC3DV-D5IqpYPC.js";
4
- import { I as rt, S as st, V as D, T as te, U as G, a1 as lt, x as ut, a7 as at, m as B, o as E, W as Ie, f as ne, c as re, a as se, _ as le, i as ue, a8 as it, a9 as ct, y as Oe, aa as ce, ab as dt, e as U, B as ft, b as de, j as R, G as mt, q as we, n as Ae, a0 as vt, a4 as ke, $ as pt, K as bt, s as Ct, O as St, P as gt, k as xt, l as _e, ac as ht, r as Ot, C as Pt } from "./LMDWO4NN-BxsnVArz.js";
5
- import { h as fe } from "./PFRGBC2K-6AvuBT5M.js";
6
- import { m as Vt, p as yt, t as Et, c as It, s as X, e as J, g as wt, b as At, d as oe, u as kt, a as _t } from "./YV4JVR4I-BLQoWp1E.js";
7
- import { createContext as Le, useRef as j, useState as Te, useEffect as Y, useMemo as Lt, useCallback as Tt, useContext as Kt } from "react";
8
- import { e as Dt, C as Rt } from "./P7GR5CS5-CZKSJ9w8.js";
9
- import { c as Ft, a as Bt } from "./O2PQ2652-BxRvOru-.js";
10
- import { c as Mt, d as Ht, b as Nt } from "./4CMBR7SL-_MPrTek0.js";
11
- import { jsx as Z } from "react/jsx-runtime";
12
- import { u as $t } from "./UQQRIHDV-D5fevAL1.js";
13
- import { u as Ut } from "./6VRAQV3D-Cnyfi8tq.js";
14
- import { c as jt, u as qt } from "./G7GW6PWC-DtkamyQv.js";
15
- import { i as Wt } from "./KFH4SEIX-D9qCWzyY.js";
16
- var wo = Le(null), Ao = Le(
17
- null
18
- ), ae = rt(
19
- [Rt],
20
- [Dt]
21
- ), zt = ae.useContext, ko = ae.useProviderContext, _o = ae.ContextProvider, Lo = ae.ScopedContextProvider, Gt = ut() && at();
22
- function Jt(o = {}) {
23
- var r = o, {
24
- tag: n
25
- } = r, e = st(r, [
26
- "tag"
27
- ]);
28
- const c = Vt(e.store, yt(n, ["value", "rtl"]));
29
- Et(e, c);
30
- const v = n == null ? void 0 : n.getState(), u = c == null ? void 0 : c.getState(), T = D(
31
- e.activeId,
32
- u == null ? void 0 : u.activeId,
33
- e.defaultActiveId,
34
- null
35
- ), P = Mt(te(G({}, e), {
36
- activeId: T,
37
- includesBaseElement: D(
38
- e.includesBaseElement,
39
- u == null ? void 0 : u.includesBaseElement,
40
- !0
41
- ),
42
- orientation: D(
43
- e.orientation,
44
- u == null ? void 0 : u.orientation,
45
- "vertical"
46
- ),
47
- focusLoop: D(e.focusLoop, u == null ? void 0 : u.focusLoop, !0),
48
- focusWrap: D(e.focusWrap, u == null ? void 0 : u.focusWrap, !0),
49
- virtualFocus: D(
50
- e.virtualFocus,
51
- u == null ? void 0 : u.virtualFocus,
52
- !0
53
- )
54
- })), p = Ft(te(G({}, e), {
55
- placement: D(
56
- e.placement,
57
- u == null ? void 0 : u.placement,
58
- "bottom-start"
59
- )
60
- })), K = D(
61
- e.value,
62
- u == null ? void 0 : u.value,
63
- e.defaultValue,
64
- ""
65
- ), V = D(
66
- e.selectedValue,
67
- u == null ? void 0 : u.selectedValue,
68
- v == null ? void 0 : v.values,
69
- e.defaultSelectedValue,
70
- ""
71
- ), f = Array.isArray(V), _ = te(G(G({}, P.getState()), p.getState()), {
72
- value: K,
73
- selectedValue: V,
74
- resetValueOnSelect: D(
75
- e.resetValueOnSelect,
76
- u == null ? void 0 : u.resetValueOnSelect,
77
- f
78
- ),
79
- resetValueOnHide: D(
80
- e.resetValueOnHide,
81
- u == null ? void 0 : u.resetValueOnHide,
82
- f && !n
83
- ),
84
- activeValue: u == null ? void 0 : u.activeValue
85
- }), s = It(_, P, p, c);
86
- return Gt && X(
87
- s,
88
- () => J(s, ["virtualFocus"], () => {
89
- s.setState("virtualFocus", !1);
90
- })
91
- ), X(s, () => {
92
- if (n)
93
- return lt(
94
- J(s, ["selectedValue"], (a) => {
95
- Array.isArray(a.selectedValue) && n.setValues(a.selectedValue);
96
- }),
97
- J(n, ["values"], (a) => {
98
- s.setState("selectedValue", a.values);
99
- })
100
- );
101
- }), X(
102
- s,
103
- () => J(s, ["resetValueOnHide", "mounted"], (a) => {
104
- a.resetValueOnHide && (a.mounted || s.setState("value", K));
105
- })
106
- ), X(
107
- s,
108
- () => J(s, ["open"], (a) => {
109
- a.open || (s.setState("activeId", T), s.setState("moves", 0));
110
- })
111
- ), X(
112
- s,
113
- () => J(s, ["moves", "activeId"], (a, S) => {
114
- a.moves === S.moves && s.setState("activeValue", void 0);
115
- })
116
- ), X(
117
- s,
118
- () => wt(s, ["moves", "renderedItems"], (a, S) => {
119
- if (a.moves === S.moves) return;
120
- const { activeId: d } = s.getState(), m = P.item(d);
121
- s.setState("activeValue", m == null ? void 0 : m.value);
122
- })
123
- ), te(G(G(G({}, p), P), s), {
124
- tag: n,
125
- setValue: (a) => s.setState("value", a),
126
- resetValue: () => s.setState("value", _.value),
127
- setSelectedValue: (a) => s.setState("selectedValue", a)
128
- });
129
- }
130
- function Qt(o) {
131
- const r = zt();
132
- return o = B(E({}, o), {
133
- tag: o.tag !== void 0 ? o.tag : r
134
- }), Ht(o);
135
- }
136
- function Xt(o, r, n) {
137
- return Ie(r, [n.tag]), oe(o, n, "value", "setValue"), oe(o, n, "selectedValue", "setSelectedValue"), oe(o, n, "resetValueOnHide"), oe(o, n, "resetValueOnSelect"), Object.assign(
138
- Nt(
139
- Bt(o, r, n),
140
- r,
141
- n
142
- ),
143
- { tag: n.tag }
144
- );
145
- }
146
- function Yt(o = {}) {
147
- o = Qt(o);
148
- const [r, n] = At(Jt, o);
149
- return Xt(r, n, o);
150
- }
151
- var Zt = "input";
152
- function Pe(o, r, n) {
153
- if (!n) return !1;
154
- const e = o.find((c) => !c.disabled && c.value);
155
- return (e == null ? void 0 : e.value) === r;
156
- }
157
- function Ve(o, r) {
158
- return !r || o == null ? !1 : (o = bt(o), r.length > o.length && r.toLowerCase().indexOf(o.toLowerCase()) === 0);
159
- }
160
- function eo(o) {
161
- return o.type === "input";
162
- }
163
- function to(o) {
164
- return o === "inline" || o === "list" || o === "both" || o === "none";
165
- }
166
- function oo(o) {
167
- const r = o.find((n) => {
168
- var e;
169
- return n.disabled ? !1 : ((e = n.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
170
- });
171
- return r == null ? void 0 : r.id;
172
- }
173
- var no = re(
174
- function(r) {
175
- var n = r, {
176
- store: e,
177
- focusable: c = !0,
178
- autoSelect: v = !1,
179
- getAutoSelectId: u,
180
- setValueOnChange: T,
181
- showMinLength: P = 0,
182
- showOnChange: p,
183
- showOnMouseDown: K,
184
- showOnClick: V = K,
185
- showOnKeyDown: f,
186
- showOnKeyPress: _ = f,
187
- blurActiveItemOnClick: s,
188
- setValueOnClick: a = !0,
189
- moveOnKeyPress: S = !0,
190
- autoComplete: d = "list"
191
- } = n, m = le(n, [
192
- "store",
193
- "focusable",
194
- "autoSelect",
195
- "getAutoSelectId",
196
- "setValueOnChange",
197
- "showMinLength",
198
- "showOnChange",
199
- "showOnMouseDown",
200
- "showOnClick",
201
- "showOnKeyDown",
202
- "showOnKeyPress",
203
- "blurActiveItemOnClick",
204
- "setValueOnClick",
205
- "moveOnKeyPress",
206
- "autoComplete"
207
- ]);
208
- const k = me();
209
- e = e || k, ue(
210
- e,
211
- process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
212
- );
213
- const I = j(null), [M, w] = it(), x = j(!1), H = j(!1), A = e.useState(
214
- (t) => t.virtualFocus && v
215
- ), y = d === "inline" || d === "both", [q, Q] = Te(y);
216
- ct(() => {
217
- y && Q(!0);
218
- }, [y]);
219
- const l = e.useState("value"), g = j();
220
- Y(() => J(e, ["selectedValue", "activeId"], (t, i) => {
221
- g.current = i.selectedValue;
222
- }), []);
223
- const h = e.useState((t) => {
224
- var i;
225
- if (y && q && !(t.activeValue && Array.isArray(t.selectedValue) && (t.selectedValue.includes(t.activeValue) || (i = g.current) != null && i.includes(t.activeValue))))
226
- return t.activeValue;
227
- }), W = e.useState("renderedItems"), N = e.useState("open"), $ = e.useState("contentElement"), ee = Lt(() => {
228
- if (!y || !q) return l;
229
- if (Pe(
230
- W,
231
- h,
232
- A
233
- )) {
234
- if (Ve(l, h)) {
235
- const i = (h == null ? void 0 : h.slice(l.length)) || "";
236
- return l + i;
237
- }
238
- return l;
239
- }
240
- return h || l;
241
- }, [y, q, W, h, A, l]);
242
- Y(() => {
243
- const t = I.current;
244
- if (!t) return;
245
- const i = () => Q(!0);
246
- return t.addEventListener("combobox-item-move", i), () => {
247
- t.removeEventListener("combobox-item-move", i);
248
- };
249
- }, []), Y(() => {
250
- if (!y || !q || !h || !Pe(
251
- W,
252
- h,
253
- A
254
- ) || !Ve(l, h)) return;
255
- let i = dt;
256
- return queueMicrotask(() => {
257
- const b = I.current;
258
- if (!b) return;
259
- const { start: C, end: L } = Oe(b), F = l.length, O = h.length;
260
- ce(b, F, O), i = () => {
261
- if (!fe(b)) return;
262
- const { start: z, end: Qe } = Oe(b);
263
- z === F && Qe === O && ce(b, C, L);
264
- };
265
- }), () => i();
266
- }, [
267
- M,
268
- y,
269
- q,
270
- h,
271
- W,
272
- A,
273
- l
274
- ]);
275
- const De = j(null), ve = U(u), pe = j(null);
276
- Y(() => {
277
- if (!N || !$) return;
278
- const t = ft($);
279
- if (!t) return;
280
- De.current = t;
281
- const i = () => {
282
- x.current = !1;
283
- }, b = () => {
284
- if (!e || !x.current) return;
285
- const { activeId: L } = e.getState();
286
- L !== null && L !== pe.current && (x.current = !1);
287
- }, C = { passive: !0, capture: !0 };
288
- return t.addEventListener("wheel", i, C), t.addEventListener("touchmove", i, C), t.addEventListener("scroll", b, C), () => {
289
- t.removeEventListener("wheel", i, !0), t.removeEventListener("touchmove", i, !0), t.removeEventListener("scroll", b, !0);
290
- };
291
- }, [N, $, e]), de(() => {
292
- l && (H.current || (x.current = !0));
293
- }, [l]), de(() => {
294
- A !== "always" && N || (x.current = N);
295
- }, [A, N]);
296
- const be = e.useState("resetValueOnSelect");
297
- Ie(() => {
298
- var t, i;
299
- const b = x.current;
300
- if (!e || !N || !b && !be) return;
301
- const { baseElement: C, contentElement: L, activeId: F } = e.getState();
302
- if (!(C && !fe(C))) {
303
- if (L != null && L.hasAttribute("data-placing")) {
304
- const O = new MutationObserver(w);
305
- return O.observe(L, { attributeFilter: ["data-placing"] }), () => O.disconnect();
306
- }
307
- if (A && b) {
308
- const O = ve(W), z = O !== void 0 ? O : (t = oo(W)) != null ? t : e.first();
309
- pe.current = z, e.move(z ?? null);
310
- } else {
311
- const O = (i = e.item(F || e.first())) == null ? void 0 : i.element;
312
- O && "scrollIntoView" in O && O.scrollIntoView({ block: "nearest", inline: "nearest" });
313
- }
314
- }
315
- }, [
316
- e,
317
- N,
318
- M,
319
- l,
320
- A,
321
- be,
322
- ve,
323
- W
324
- ]), Y(() => {
325
- if (!y) return;
326
- const t = I.current;
327
- if (!t) return;
328
- const i = [t, $].filter(
329
- (C) => !!C
330
- ), b = (C) => {
331
- i.every((L) => pt(C, L)) && (e == null || e.setValue(ee));
332
- };
333
- for (const C of i)
334
- C.addEventListener("focusout", b);
335
- return () => {
336
- for (const C of i)
337
- C.removeEventListener("focusout", b);
338
- };
339
- }, [y, $, e, ee]);
340
- const ie = (t) => t.currentTarget.value.length >= P, Ce = m.onChange, Re = R(p ?? ie), Fe = R(
341
- // If the combobox is combined with tags, the value will be set by the tag
342
- // input component.
343
- T ?? !e.tag
344
- ), Be = U((t) => {
345
- if (Ce == null || Ce(t), t.defaultPrevented || !e) return;
346
- const i = t.currentTarget, { value: b, selectionStart: C, selectionEnd: L } = i, F = t.nativeEvent;
347
- if (x.current = !0, eo(F) && (F.isComposing && (x.current = !1, H.current = !0), y)) {
348
- const O = F.inputType === "insertText" || F.inputType === "insertCompositionText", z = C === b.length;
349
- Q(O && z);
350
- }
351
- if (Fe(t)) {
352
- const O = b === e.getState().value;
353
- e.setValue(b), queueMicrotask(() => {
354
- ce(i, C, L);
355
- }), y && A && O && w();
356
- }
357
- Re(t) && e.show(), (!A || !x.current) && e.setActiveId(null);
358
- }), Se = m.onCompositionEnd, Me = U((t) => {
359
- x.current = !0, H.current = !1, Se == null || Se(t), !t.defaultPrevented && A && w();
360
- }), ge = m.onMouseDown, He = R(
361
- s ?? (() => !!(e != null && e.getState().includesBaseElement))
362
- ), Ne = R(a), $e = R(V ?? ie), Ue = U((t) => {
363
- ge == null || ge(t), !t.defaultPrevented && (t.button || t.ctrlKey || e && (He(t) && e.setActiveId(null), Ne(t) && e.setValue(ee), $e(t) && mt(t.currentTarget, "mouseup", e.show)));
364
- }), xe = m.onKeyDown, je = R(_ ?? ie), qe = U((t) => {
365
- if (xe == null || xe(t), t.repeat || (x.current = !1), t.defaultPrevented || t.ctrlKey || t.altKey || t.shiftKey || t.metaKey || !e) return;
366
- const { open: i } = e.getState();
367
- i || (t.key === "ArrowUp" || t.key === "ArrowDown") && je(t) && (t.preventDefault(), e.show());
368
- }), he = m.onBlur, We = U((t) => {
369
- x.current = !1, he == null || he(t), t.defaultPrevented;
370
- }), ze = we(m.id), Ge = to(d) ? d : void 0, Je = e.useState((t) => t.activeId === null);
371
- return m = B(E({
372
- id: ze,
373
- role: "combobox",
374
- "aria-autocomplete": Ge,
375
- "aria-haspopup": vt($, "listbox"),
376
- "aria-expanded": N,
377
- "aria-controls": $ == null ? void 0 : $.id,
378
- "data-active-item": Je || void 0,
379
- value: ee
380
- }, m), {
381
- ref: Ae(I, m.ref),
382
- onChange: Be,
383
- onCompositionEnd: Me,
384
- onMouseDown: Ue,
385
- onKeyDown: qe,
386
- onBlur: We
387
- }), m = Xe(B(E({
388
- store: e,
389
- focusable: c
390
- }, m), {
391
- // Enable inline autocomplete when the user moves from the combobox input
392
- // to an item.
393
- moveOnKeyPress: (t) => ke(S, t) ? !1 : (y && Q(!0), !0)
394
- })), m = Ye(E({ store: e }, m)), E({ autoComplete: "off" }, m);
395
- }
396
- ), To = ne(function(r) {
397
- const n = no(r);
398
- return se(Zt, n);
399
- });
400
- function Ko(o = {}) {
401
- const r = Yt(o);
402
- return /* @__PURE__ */ Z(Ze, { value: r, children: o.children });
403
- }
404
- var ro = "div";
405
- function so(o, r) {
406
- if (r != null)
407
- return o == null ? !1 : Array.isArray(o) ? o.includes(r) : o === r;
408
- }
409
- function lo(o) {
410
- var r;
411
- return (r = {
412
- menu: "menuitem",
413
- listbox: "option",
414
- tree: "treeitem"
415
- }[o]) != null ? r : "option";
416
- }
417
- var uo = re(
418
- function(r) {
419
- var n = r, {
420
- store: e,
421
- value: c,
422
- hideOnClick: v,
423
- setValueOnClick: u,
424
- selectValueOnClick: T = !0,
425
- resetValueOnSelect: P,
426
- focusOnHover: p = !1,
427
- moveOnKeyPress: K = !0,
428
- getItem: V
429
- } = n, f = le(n, [
430
- "store",
431
- "value",
432
- "hideOnClick",
433
- "setValueOnClick",
434
- "selectValueOnClick",
435
- "resetValueOnSelect",
436
- "focusOnHover",
437
- "moveOnKeyPress",
438
- "getItem"
439
- ]), _;
440
- const s = ye();
441
- e = e || s, ue(
442
- e,
443
- process.env.NODE_ENV !== "production" && "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
444
- );
445
- const { resetValueOnSelectState: a, multiSelectable: S, selected: d } = kt(e, {
446
- resetValueOnSelectState: "resetValueOnSelect",
447
- multiSelectable(l) {
448
- return Array.isArray(l.selectedValue);
449
- },
450
- selected(l) {
451
- return so(l.selectedValue, c);
452
- }
453
- }), m = Tt(
454
- (l) => {
455
- const g = B(E({}, l), { value: c });
456
- return V ? V(g) : g;
457
- },
458
- [c, V]
459
- );
460
- u = u ?? !S, v = v ?? (c != null && !S);
461
- const k = f.onClick, I = R(u), M = R(T), w = R(
462
- (_ = P ?? a) != null ? _ : S
463
- ), x = R(v), H = U((l) => {
464
- k == null || k(l), !l.defaultPrevented && (St(l) || gt(l) || (c != null && (M(l) && (w(l) && (e == null || e.resetValue()), e == null || e.setSelectedValue((g) => Array.isArray(g) ? g.includes(c) ? g.filter((h) => h !== c) : [...g, c] : c)), I(l) && (e == null || e.setValue(c))), x(l) && (e == null || e.hide())));
465
- }), A = f.onKeyDown, y = U((l) => {
466
- if (A == null || A(l), l.defaultPrevented) return;
467
- const g = e == null ? void 0 : e.getState().baseElement;
468
- if (!g || fe(g)) return;
469
- (l.key.length === 1 || l.key === "Backspace" || l.key === "Delete") && (queueMicrotask(() => g.focus()), xt(g) && (e == null || e.setValue(g.value)));
470
- });
471
- S && d != null && (f = E({
472
- "aria-selected": d
473
- }, f)), f = _e(
474
- f,
475
- (l) => /* @__PURE__ */ Z(et.Provider, { value: c, children: /* @__PURE__ */ Z(tt.Provider, { value: d ?? !1, children: l }) }),
476
- [c, d]
477
- );
478
- const q = Kt(Ee);
479
- f = B(E({
480
- role: lo(q),
481
- children: c
482
- }, f), {
483
- onClick: H,
484
- onKeyDown: y
485
- });
486
- const Q = R(K);
487
- return f = Ut(B(E({
488
- store: e
489
- }, f), {
490
- getItem: m,
491
- // Dispatch a custom event on the combobox input when moving to an item
492
- // with the keyboard so the Combobox component can enable inline
493
- // autocompletion.
494
- moveOnKeyPress: (l) => {
495
- if (!Q(l)) return !1;
496
- const g = new Event("combobox-item-move"), h = e == null ? void 0 : e.getState().baseElement;
497
- return h == null || h.dispatchEvent(g), !0;
498
- }
499
- })), f = $t(E({ store: e, focusOnHover: p }, f)), f;
500
- }
501
- ), Do = Ct(
502
- ne(function(r) {
503
- const n = uo(r);
504
- return se(ro, n);
505
- })
506
- ), ao = "div", Ke = re(
507
- function(r) {
508
- var n = r, { store: e, alwaysVisible: c } = n, v = le(n, ["store", "alwaysVisible"]);
509
- const u = ye(!0), T = ot();
510
- e = e || T;
511
- const P = !!e && e === u;
512
- ue(
513
- e,
514
- process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
515
- );
516
- const p = j(null), K = we(v.id), V = e.useState("mounted"), f = Wt(V, v.hidden, c), _ = f ? B(E({}, v.style), { display: "none" }) : v.style, s = e.useState(
517
- (w) => Array.isArray(w.selectedValue)
518
- ), a = ht(p, "role", v.role), d = (a === "listbox" || a === "tree" || a === "grid") && s || void 0, [m, k] = Te(!1), I = e.useState("contentElement");
519
- de(() => {
520
- if (!V) return;
521
- const w = p.current;
522
- if (!w || I !== w) return;
523
- const x = () => {
524
- k(!!w.querySelector("[role='listbox']"));
525
- }, H = new MutationObserver(x);
526
- return H.observe(w, {
527
- subtree: !0,
528
- childList: !0,
529
- attributeFilter: ["role"]
530
- }), x(), () => H.disconnect();
531
- }, [V, I]), m || (v = E({
532
- role: "listbox",
533
- "aria-multiselectable": d
534
- }, v)), v = _e(
535
- v,
536
- (w) => /* @__PURE__ */ Z(nt, { value: e, children: /* @__PURE__ */ Z(Ee.Provider, { value: a, children: w }) }),
537
- [e, a]
538
- );
539
- const M = K && (!u || !P) ? e.setContentElement : null;
540
- return v = B(E({
541
- id: K,
542
- hidden: f
543
- }, v), {
544
- ref: Ae(M, p, v.ref),
545
- style: _
546
- }), Ot(v);
547
- }
548
- ), Ro = ne(function(r) {
549
- const n = Ke(r);
550
- return se(ao, n);
551
- }), io = "div";
552
- function co(o, ...r) {
553
- if (!o) return !1;
554
- if ("id" in o) {
555
- const n = r.filter(Boolean).map((e) => `[aria-controls~="${e}"]`).join(", ");
556
- return n ? o.matches(n) : !1;
557
- }
558
- return !1;
559
- }
560
- var fo = re(
561
- function(r) {
562
- var n = r, {
563
- store: e,
564
- modal: c,
565
- tabIndex: v,
566
- alwaysVisible: u,
567
- autoFocusOnHide: T = !0,
568
- hideOnInteractOutside: P = !0
569
- } = n, p = le(n, [
570
- "store",
571
- "modal",
572
- "tabIndex",
573
- "alwaysVisible",
574
- "autoFocusOnHide",
575
- "hideOnInteractOutside"
576
- ]);
577
- const K = me();
578
- e = e || K, ue(
579
- e,
580
- process.env.NODE_ENV !== "production" && "ComboboxPopover must receive a `store` prop or be wrapped in a ComboboxProvider component."
581
- );
582
- const V = e.useState("baseElement"), f = j(!1), _ = _t(
583
- e.tag,
584
- (s) => s == null ? void 0 : s.renderedItems.length
585
- );
586
- return p = Ke(E({ store: e, alwaysVisible: u }, p)), p = qt(B(E({
587
- store: e,
588
- modal: c,
589
- alwaysVisible: u,
590
- backdrop: !1,
591
- autoFocusOnShow: !1,
592
- finalFocus: V,
593
- preserveTabOrderAnchor: null,
594
- unstable_treeSnapshotKey: _
595
- }, p), {
596
- // When the combobox popover is modal, we make sure to include the
597
- // combobox input and all the combobox controls (cancel, disclosure) in
598
- // the list of persistent elements so they make part of the modal context,
599
- // allowing users to tab through them.
600
- getPersistentElements() {
601
- var s;
602
- const a = ((s = p.getPersistentElements) == null ? void 0 : s.call(p)) || [];
603
- if (!c || !e) return a;
604
- const { contentElement: S, baseElement: d } = e.getState();
605
- if (!d) return a;
606
- const m = Pt(d), k = [];
607
- if (S != null && S.id && k.push(`[aria-controls~="${S.id}"]`), d != null && d.id && k.push(`[aria-controls~="${d.id}"]`), !k.length) return [...a, d];
608
- const I = k.join(","), M = m.querySelectorAll(I);
609
- return [...a, ...M];
610
- },
611
- // The combobox popover should focus on the combobox input when it hides,
612
- // unless the event was triggered by a click outside the popover, in which
613
- // case the input shouldn't be re-focused.
614
- autoFocusOnHide(s) {
615
- return ke(T, s) ? !1 : f.current ? (f.current = !1, !1) : !0;
616
- },
617
- // Make sure we don't hide the popover when the user interacts with the
618
- // combobox cancel or the combobox disclosure buttons. They will have the
619
- // aria-controls attribute pointing to either the combobox input or the
620
- // combobox popover elements.
621
- hideOnInteractOutside(s) {
622
- var a, S;
623
- const d = e == null ? void 0 : e.getState(), m = (a = d == null ? void 0 : d.contentElement) == null ? void 0 : a.id, k = (S = d == null ? void 0 : d.baseElement) == null ? void 0 : S.id;
624
- if (co(s.target, m, k)) return !1;
625
- const I = typeof P == "function" ? P(s) : P;
626
- return I && (f.current = s.type === "click"), I;
627
- }
628
- })), p;
629
- }
630
- ), Fo = jt(
631
- ne(function(r) {
632
- const n = fo(r);
633
- return se(io, n);
634
- }),
635
- me
636
- );
637
- export {
638
- Ko as C,
639
- wo as T,
640
- To as a,
641
- Fo as b,
642
- Ro as c,
643
- Do as d,
644
- Ao as e,
645
- ko as f,
646
- Lo as g,
647
- _o as h,
648
- Yt as i,
649
- zt as u
650
- };
@@ -1,61 +0,0 @@
1
- import { c as s, q as f, b, o as i, r as l, f as u, a as n, _ as c, l as G } from "./LMDWO4NN-BxsnVArz.js";
2
- import { createContext as C, useContext as L, useState as h } from "react";
3
- import { jsx as m } from "react/jsx-runtime";
4
- import { u as P } from "./WYCIER3C-C_60hKUt.js";
5
- import { c as _ } from "./RS7LB2H4-DJkydTnE.js";
6
- var v = C(void 0), x = "div", d = s(
7
- function(e) {
8
- const r = L(v), t = f(e.id);
9
- return b(() => (r == null || r(t), () => r == null ? void 0 : r(void 0)), [r, t]), e = i({
10
- id: t,
11
- "aria-hidden": !0
12
- }, e), l(e);
13
- }
14
- ), R = u(function(e) {
15
- const r = d(e);
16
- return n(x, r);
17
- }), g = "div", D = s(function(e) {
18
- var r = e, { store: t } = r, a = c(r, ["store"]);
19
- return a = d(a), a;
20
- }), V = u(function(e) {
21
- const r = D(e);
22
- return n(g, r);
23
- }), I = "div", p = s(
24
- function(e) {
25
- const [r, t] = h();
26
- return e = G(
27
- e,
28
- (a) => /* @__PURE__ */ m(v.Provider, { value: t, children: a }),
29
- []
30
- ), e = i({
31
- role: "group",
32
- "aria-labelledby": r
33
- }, e), l(e);
34
- }
35
- ), k = u(function(e) {
36
- const r = p(e);
37
- return n(I, r);
38
- }), N = "div", T = s(
39
- function(e) {
40
- var r = e, { store: t } = r, a = c(r, ["store"]);
41
- return a = p(a), a;
42
- }
43
- ), q = u(function(e) {
44
- const r = T(e);
45
- return n(N, r);
46
- });
47
- function w(o = {}) {
48
- const e = P(o);
49
- return /* @__PURE__ */ m(_, { value: e, children: o.children });
50
- }
51
- export {
52
- q as C,
53
- w as D,
54
- k as G,
55
- V as a,
56
- T as b,
57
- d as c,
58
- p as d,
59
- R as e,
60
- D as u
61
- };