@wrdagency/blockout 1.0.26 → 1.0.29

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 (200) hide show
  1. package/dist/{2NBKRL7C-Cunv252F.js → 2NBKRL7C-DBbnghCe.js} +16 -16
  2. package/dist/{2RSXSRCN-dNqvVCu5.js → 2RSXSRCN-BxQ_v-Je.js} +15 -15
  3. package/dist/{4CMBR7SL-Cf8t3EeF.js → 4CMBR7SL-DezfZPUS.js} +25 -25
  4. package/dist/{5JTVDSTH-zDMMKAyC.js → 5JTVDSTH-CZ7mfyUK.js} +4 -4
  5. package/dist/{5VQZOHHZ-BbettT93.js → 5VQZOHHZ-DLX-ulBK.js} +1 -1
  6. package/dist/{6VRAQV3D-pLV6BqmA.js → 6VRAQV3D-BYmT0QTl.js} +6 -6
  7. package/dist/{A3WPL2ZJ-DEsxy0M-.js → A3WPL2ZJ-24tGIJIQ.js} +2 -2
  8. package/dist/{BM6PGYQY-g6WySwtg.js → BM6PGYQY-DCbkDr5N.js} +4 -4
  9. package/dist/{DG5U6ZEL-9kCi_mGg.js → DG5U6ZEL-DB0iwihy.js} +3 -3
  10. package/dist/{EM5CXX6A-BAj-o9Ka.js → EM5CXX6A-B4ZS4Hs_.js} +2 -2
  11. package/dist/{F5MUBM3I-AbDoeFd8.js → F5MUBM3I-75qY3y0N.js} +17 -17
  12. package/dist/{G7GW6PWC-DeYlSr7f.js → G7GW6PWC-Dk4hVbAk.js} +32 -32
  13. package/dist/{IWEFDH56-DLJvQd6v.js → IWEFDH56-BACkQ6dc.js} +3 -3
  14. package/dist/{J2LQO3EC-Cevd6Bvq.js → J2LQO3EC-BXJIaM2U.js} +2 -2
  15. package/dist/JMHAJKUZ-D5KCN1Aj.js +114 -0
  16. package/dist/{KFH4SEIX-JLk95eQA.js → KFH4SEIX-DaQeP5D_.js} +13 -13
  17. package/dist/{LMDWO4NN-BfJb6my4.js → LMDWO4NN-CpSMaD5G.js} +26 -26
  18. package/dist/MAXQOH4L-BYWBWXpb.js +459 -0
  19. package/dist/{MR26YJYP-CDaPeerB.js → MR26YJYP-CTh6rCwA.js} +66 -66
  20. package/dist/{MTZPJQMC-CraWj4on.js → MTZPJQMC-D2i4-LA_.js} +4 -4
  21. package/dist/{O2PQ2652-BCwdW7qA.js → O2PQ2652-DIoegIkE.js} +3 -3
  22. package/dist/{P7GR5CS5-DbUZzAnv.js → P7GR5CS5-3RsPGPTy.js} +1 -1
  23. package/dist/{PFRGBC2K-DmHoUTiZ.js → PFRGBC2K-BdRJd-gU.js} +36 -36
  24. package/dist/{RS7LB2H4-D1_VRecC.js → RS7LB2H4-COOfOq9w.js} +1 -1
  25. package/dist/{RZ4GPYOB-rG3RP8Xi.js → RZ4GPYOB-CovncfhJ.js} +5 -5
  26. package/dist/{S43UC3DV-bOoyE-xW.js → S43UC3DV-HCi6u_G4.js} +8 -8
  27. package/dist/{T7VMP3TM-DZitNAMz.js → T7VMP3TM-C8D6mVva.js} +19 -19
  28. package/dist/{TIW3GMFC-DPiX149D.js → TIW3GMFC-BF0w2_9R.js} +16 -16
  29. package/dist/{TP7N7UIH-D_nR5wDv.js → TP7N7UIH-C4jXJDlO.js} +2 -2
  30. package/dist/{UQQRIHDV-ULrGYPSq.js → UQQRIHDV-DEGlgATx.js} +10 -10
  31. package/dist/{UYGDZTLQ-CTQQ8oFQ.js → UYGDZTLQ-HiDKLOW5.js} +2 -2
  32. package/dist/{VIIRIBF3-C4pOScX8.js → VIIRIBF3-B-djNAU9.js} +3 -3
  33. package/dist/{WMYDSCNQ-qLZnyPON.js → WMYDSCNQ-pGjWB-Pk.js} +12 -12
  34. package/dist/{WYCIER3C-BJwD0YDE.js → WYCIER3C-CxfgpZG_.js} +2 -2
  35. package/dist/{YORGHBM4-6CReFG7i.js → YORGHBM4-D_fOXG5Y.js} +1 -1
  36. package/dist/{YV4JVR4I-D8_aZ62q.js → YV4JVR4I-CQnJhUSg.js} +26 -26
  37. package/dist/assets/button.css +1 -1
  38. package/dist/assets/index19.css +1 -1
  39. package/dist/assets/index20.css +1 -1
  40. package/dist/assets/index21.css +1 -1
  41. package/dist/assets/index9.css +1 -1
  42. package/dist/assets/static.css +1 -0
  43. package/dist/assets/style.css +1 -1
  44. package/dist/assets/style10.css +1 -1
  45. package/dist/assets/style6.css +1 -1
  46. package/dist/assets/style8.css +1 -1
  47. package/dist/assets/style9.css +1 -1
  48. package/dist/{combobox-group-BCdU5rML.js → combobox-group-hNvv1WJm.js} +3 -3
  49. package/dist/{combobox-popover-D5bLZY4d.js → combobox-popover-BZ_1wNrj.js} +5 -5
  50. package/dist/components/avatar/index.d.ts +2 -2
  51. package/dist/components/avatar/index.js +20 -18
  52. package/dist/components/breadcrumbs/index.js +5 -5
  53. package/dist/components/button/icon.js +1 -1
  54. package/dist/components/button/row.js +4 -4
  55. package/dist/components/command-palette/dialog.d.ts +9 -0
  56. package/dist/components/command-palette/dialog.js +34 -0
  57. package/dist/components/command-palette/index.js +8 -175
  58. package/dist/components/command-palette/presets.d.ts +4 -0
  59. package/dist/components/command-palette/presets.js +10 -0
  60. package/dist/components/command-palette/static.d.ts +19 -0
  61. package/dist/components/command-palette/static.js +76 -0
  62. package/dist/components/controls/base-popover-control/index.js +4 -4
  63. package/dist/components/controls/checkbox-control/index.js +1 -1
  64. package/dist/components/controls/choice-control/choice.js +1 -1
  65. package/dist/components/controls/choice-control/index.js +1 -1
  66. package/dist/components/controls/date-control/index.js +2 -2
  67. package/dist/components/controls/date-control/picker.js +5 -5
  68. package/dist/components/controls/list-control/item.js +1 -1
  69. package/dist/components/controls/recurrence-control/index.js +1 -1
  70. package/dist/components/controls/select-control/control.js +1 -1
  71. package/dist/components/controls/select-control/select.js +33 -32
  72. package/dist/components/controls/tag-control/ariakit-experimental.js +253 -252
  73. package/dist/components/controls/tag-control/index.js +9 -8
  74. package/dist/components/controls/tag-control/props.js +1 -1
  75. package/dist/components/controls/toggle-control/index.js +1 -1
  76. package/dist/components/controls/toggle-group-control/index.js +1 -1
  77. package/dist/components/data-form/status.js +1 -1
  78. package/dist/components/data-form/submit.js +1 -1
  79. package/dist/components/data-view/data/filter.js +2 -2
  80. package/dist/components/data-view/index.js +1 -1
  81. package/dist/components/data-view/layouts/grid/group.js +2 -2
  82. package/dist/components/data-view/layouts/grid/item.js +2 -2
  83. package/dist/components/data-view/layouts/kanban/group.js +2 -2
  84. package/dist/components/data-view/layouts/kanban/item.js +2 -2
  85. package/dist/components/data-view/layouts/kanban/root.js +1 -1
  86. package/dist/components/data-view/layouts/list/group.js +2 -2
  87. package/dist/components/data-view/layouts/list/item.js +2 -2
  88. package/dist/components/data-view/layouts/table/empty.js +2 -2
  89. package/dist/components/data-view/layouts/table/group.js +3 -3
  90. package/dist/components/data-view/layouts/table/item.js +3 -3
  91. package/dist/components/data-view/layouts/table/root.js +2 -2
  92. package/dist/components/data-view/layouts/tile/group.js +2 -2
  93. package/dist/components/data-view/layouts/tile/item.js +2 -2
  94. package/dist/components/data-view/parts/body/empty.js +1 -1
  95. package/dist/components/data-view/parts/body/index.js +4 -4
  96. package/dist/components/data-view/parts/controls/index.js +2 -2
  97. package/dist/components/data-view/parts/controls/search.js +2 -2
  98. package/dist/components/data-view/parts/filters/chip.js +1 -1
  99. package/dist/components/data-view/parts/filters/editor.js +1 -1
  100. package/dist/components/data-view/parts/footer/actions.js +2 -2
  101. package/dist/components/data-view/parts/footer/index.js +2 -2
  102. package/dist/components/data-view/parts/footer/selection.js +2 -2
  103. package/dist/components/data-view/parts/view-control/index.js +2 -2
  104. package/dist/components/data-view/root.js +2 -2
  105. package/dist/components/data-view/slots/group/checkbox.js +3 -3
  106. package/dist/components/data-view/slots/group/context.js +1 -1
  107. package/dist/components/data-view/slots/group/header.js +1 -1
  108. package/dist/components/data-view/slots/group/icon.js +1 -1
  109. package/dist/components/data-view/slots/group/index.js +1 -1
  110. package/dist/components/data-view/slots/group/label.js +1 -1
  111. package/dist/components/data-view/slots/index.js +3 -3
  112. package/dist/components/data-view/slots/item/actions.js +1 -1
  113. package/dist/components/data-view/slots/item/checkbox.js +2 -2
  114. package/dist/components/data-view/slots/item/depth.js +3 -3
  115. package/dist/components/data-view/slots/item/description.js +1 -1
  116. package/dist/components/data-view/slots/item/index.js +1 -1
  117. package/dist/components/data-view/slots/item/properties.js +2 -2
  118. package/dist/components/data-view/slots/item/relations.js +3 -3
  119. package/dist/components/data-view/slots/item/tags.js +1 -1
  120. package/dist/components/data-view/slots/item/thumbnail.js +1 -1
  121. package/dist/components/data-view/slots/item/title.js +1 -1
  122. package/dist/components/data-view/slots/item/util.js +2 -2
  123. package/dist/components/data-view/slots/property/field/editable.js +2 -2
  124. package/dist/components/data-view/slots/property/field/index.js +1 -1
  125. package/dist/components/data-view/slots/property/field/static.js +1 -1
  126. package/dist/components/data-view/slots/property/index.js +1 -1
  127. package/dist/components/data-view/slots/property/label.js +1 -1
  128. package/dist/components/data-view/slots/root/checkbox.js +2 -2
  129. package/dist/components/data-view/slots/root/index.js +1 -1
  130. package/dist/components/dialog/index.js +3 -3
  131. package/dist/components/filesystem/file.js +1 -1
  132. package/dist/components/filesystem/folder.js +5 -5
  133. package/dist/components/filesystem/list.js +1 -1
  134. package/dist/components/filesystem/root.js +1 -1
  135. package/dist/components/index.d.ts +1 -1
  136. package/dist/components/index.js +1 -1
  137. package/dist/components/menu/index.js +2 -2
  138. package/dist/components/menu/item.js +1 -1
  139. package/dist/components/menu/items/action.js +1 -1
  140. package/dist/components/menu/items/spacer.js +1 -1
  141. package/dist/components/menu/items/submenu.js +3 -3
  142. package/dist/components/menu/items/toggle.js +1 -1
  143. package/dist/components/progress/index.js +1 -1
  144. package/dist/components/shell/index.js +14 -12
  145. package/dist/components/shell/navigation-separator.d.ts +6 -0
  146. package/dist/components/shell/navigation-separator.js +14 -0
  147. package/dist/components/shell/pane.js +1 -1
  148. package/dist/components/shell/sidebar-item.d.ts +5 -4
  149. package/dist/components/shell/sidebar-item.js +26 -20
  150. package/dist/components/tabs/list.js +1 -1
  151. package/dist/components/tabs/panel.js +1 -1
  152. package/dist/components/tabs/root.js +1 -1
  153. package/dist/components/tabs/tab.js +1 -1
  154. package/dist/components/tag/tag.js +1 -1
  155. package/dist/components/toolbar/divider.js +1 -1
  156. package/dist/components/toolbar/index.js +1 -1
  157. package/dist/components/toolbar/root.js +1 -1
  158. package/dist/components/window/index.js +2 -2
  159. package/dist/{composite-provider-DFOFHro7.js → composite-provider-BPIeS4Cg.js} +2 -2
  160. package/dist/{disclosure-provider-DIT2ijtk.js → disclosure-provider-cEVysvZT.js} +2 -2
  161. package/dist/{filter-DzrtcAfG.js → filter-DHK0UoZG.js} +1 -1
  162. package/dist/{index-Bp_FFk15.js → index-BLCPauyN.js} +2 -2
  163. package/dist/{index-B5z_GwnD.js → index-BnbjJBS4.js} +3 -3
  164. package/dist/{index-C8OctMj0.js → index-CLl-PPjx.js} +1 -1
  165. package/dist/index.d.ts +1 -0
  166. package/dist/index.js +77 -56
  167. package/dist/{item-CGLYiEST.js → item-CmTk8eHD.js} +2 -2
  168. package/dist/{menu-button-C-h3k7Gh.js → menu-button-GQO5dB3U.js} +33 -33
  169. package/dist/{menu-separator-CuuhJPnR.js → menu-separator-Z6pSHpX5.js} +3 -3
  170. package/dist/{picker-BUCg1BqW.js → picker-DyJogHYh.js} +4 -4
  171. package/dist/{popover-provider-BoZ9PI_r.js → popover-provider-BJEfhgr1.js} +4 -4
  172. package/dist/presets-BDIhXP0C.js +148 -0
  173. package/dist/primitives/icon-label/index.d.ts +2 -0
  174. package/dist/primitives/icon-label/index.js +18 -14
  175. package/dist/primitives/link/index.d.ts +3 -1
  176. package/dist/primitives/link/index.js +26 -25
  177. package/dist/primitives/nav-link/index.d.ts +4 -3
  178. package/dist/primitives/nav-link/index.js +21 -17
  179. package/dist/primitives/popover/root.js +1 -1
  180. package/dist/primitives/popover/target.js +1 -1
  181. package/dist/primitives/popover/window.js +3 -3
  182. package/dist/primitives/scroll-area/index.js +1 -1
  183. package/dist/primitives/tooltip/index.d.ts +2 -0
  184. package/dist/primitives/tooltip/index.js +36 -24
  185. package/dist/{select-popover-DmN0T8PP.js → select-popover-Dheunyb0.js} +53 -53
  186. package/dist/{select-value-DnWKxDD-.js → select-value-B3DYk9eV.js} +2 -2
  187. package/dist/{tab-BXGTM7Se.js → tab-DejwS4C8.js} +4 -4
  188. package/dist/{tab-list-BPSxHllS.js → tab-list-CndMWcVv.js} +3 -3
  189. package/dist/{tab-panel-fbUcLE4f.js → tab-panel-DedzuWUA.js} +7 -7
  190. package/dist/{tab-provider-x586a8l7.js → tab-provider-B0BoLfST.js} +21 -21
  191. package/dist/{tag-remove-BdHvB_5c.js → tag-remove-Dz-sGbyZ.js} +35 -35
  192. package/dist/{toolbar-hQ58P-Nk.js → toolbar-PSaF1mdF.js} +11 -11
  193. package/dist/{toolbar-separator-CN00-jyc.js → toolbar-separator-DJHiHbGj.js} +3 -3
  194. package/dist/{tooltip-arrow-BRJ4m2ZL.js → tooltip-arrow-BVwULA6B.js} +9 -9
  195. package/dist/utils/index.d.ts +8 -0
  196. package/dist/utils/index.js +23 -0
  197. package/package.json +1 -1
  198. package/dist/MAXQOH4L-DB7jDisS.js +0 -564
  199. package/dist/assets/index22.css +0 -1
  200. package/dist/components/command-palette/index.d.ts +0 -28
@@ -0,0 +1,459 @@
1
+ import { u as We } from "./5JTVDSTH-CZ7mfyUK.js";
2
+ import { u as $e } from "./WMYDSCNQ-pGjWB-Pk.js";
3
+ import { u as ze, e as Je, a as Xe, d as Ye, f as Ge, c as Qe } from "./S43UC3DV-HCi6u_G4.js";
4
+ import { L as Ze, Y as et, U as h, V as Q, W as F, a2 as tt, x as ot, a5 as nt, m as J, o as L, X as ge, f as xe, c as Ve, a as he, _ as Pe, i as Ee, a6 as rt, a7 as st, y as pe, a8 as ne, a9 as ut, e as j, B as at, b as re, j as q, J as lt, q as we, n as Oe, S as it, C as ct, a1 as dt, N as ft, aa as mt, l as vt, r as pt } from "./LMDWO4NN-CpSMaD5G.js";
5
+ import { h as be } from "./PFRGBC2K-BdRJd-gU.js";
6
+ import { m as bt, p as St, t as Ct, c as gt, s as W, d as B, g as xt, b as Vt, f as Z } from "./YV4JVR4I-CQnJhUSg.js";
7
+ import { createContext as Ie, useRef as H, useState as ye, useEffect as z, useMemo as ht } from "react";
8
+ import { e as Pt, C as Et } from "./P7GR5CS5-3RsPGPTy.js";
9
+ import { c as wt, a as Ot } from "./O2PQ2652-DIoegIkE.js";
10
+ import { c as It, d as yt, b as At } from "./4CMBR7SL-DezfZPUS.js";
11
+ import { jsx as se } from "react/jsx-runtime";
12
+ import { i as Lt } from "./KFH4SEIX-DaQeP5D_.js";
13
+ var oo = Ie(null), no = Ie(
14
+ null
15
+ ), ee = Ze(
16
+ [Et],
17
+ [Pt]
18
+ ), _t = ee.useContext, ro = ee.useProviderContext, so = ee.ContextProvider, uo = ee.ScopedContextProvider, Tt = ot() && nt();
19
+ function kt(o = {}) {
20
+ var s = o, {
21
+ tag: n
22
+ } = s, e = et(s, [
23
+ "tag"
24
+ ]);
25
+ const g = bt(e.store, St(n, ["value", "rtl"]));
26
+ Ct(e, g);
27
+ const f = n == null ? void 0 : n.getState(), u = g == null ? void 0 : g.getState(), _ = h(
28
+ e.activeId,
29
+ u == null ? void 0 : u.activeId,
30
+ e.defaultActiveId,
31
+ null
32
+ ), O = It(Q(F({}, e), {
33
+ activeId: _,
34
+ includesBaseElement: h(
35
+ e.includesBaseElement,
36
+ u == null ? void 0 : u.includesBaseElement,
37
+ !0
38
+ ),
39
+ orientation: h(
40
+ e.orientation,
41
+ u == null ? void 0 : u.orientation,
42
+ "vertical"
43
+ ),
44
+ focusLoop: h(e.focusLoop, u == null ? void 0 : u.focusLoop, !0),
45
+ focusWrap: h(e.focusWrap, u == null ? void 0 : u.focusWrap, !0),
46
+ virtualFocus: h(
47
+ e.virtualFocus,
48
+ u == null ? void 0 : u.virtualFocus,
49
+ !0
50
+ )
51
+ })), P = wt(Q(F({}, e), {
52
+ placement: h(
53
+ e.placement,
54
+ u == null ? void 0 : u.placement,
55
+ "bottom-start"
56
+ )
57
+ })), T = h(
58
+ e.value,
59
+ u == null ? void 0 : u.value,
60
+ e.defaultValue,
61
+ ""
62
+ ), E = h(
63
+ e.selectedValue,
64
+ u == null ? void 0 : u.selectedValue,
65
+ f == null ? void 0 : f.values,
66
+ e.defaultSelectedValue,
67
+ ""
68
+ ), k = Array.isArray(E), D = Q(F(F({}, O.getState()), P.getState()), {
69
+ value: T,
70
+ selectedValue: E,
71
+ resetValueOnSelect: h(
72
+ e.resetValueOnSelect,
73
+ u == null ? void 0 : u.resetValueOnSelect,
74
+ k
75
+ ),
76
+ resetValueOnHide: h(
77
+ e.resetValueOnHide,
78
+ u == null ? void 0 : u.resetValueOnHide,
79
+ k && !n
80
+ ),
81
+ activeValue: u == null ? void 0 : u.activeValue
82
+ }), a = gt(D, O, P, g);
83
+ return Tt && W(
84
+ a,
85
+ () => B(a, ["virtualFocus"], () => {
86
+ a.setState("virtualFocus", !1);
87
+ })
88
+ ), W(a, () => {
89
+ if (n)
90
+ return tt(
91
+ B(a, ["selectedValue"], (l) => {
92
+ Array.isArray(l.selectedValue) && n.setValues(l.selectedValue);
93
+ }),
94
+ B(n, ["values"], (l) => {
95
+ a.setState("selectedValue", l.values);
96
+ })
97
+ );
98
+ }), W(
99
+ a,
100
+ () => B(a, ["resetValueOnHide", "mounted"], (l) => {
101
+ l.resetValueOnHide && (l.mounted || a.setState("value", T));
102
+ })
103
+ ), W(
104
+ a,
105
+ () => B(a, ["open"], (l) => {
106
+ l.open || (a.setState("activeId", _), a.setState("moves", 0));
107
+ })
108
+ ), W(
109
+ a,
110
+ () => B(a, ["moves", "activeId"], (l, U) => {
111
+ l.moves === U.moves && a.setState("activeValue", void 0);
112
+ })
113
+ ), W(
114
+ a,
115
+ () => xt(a, ["moves", "renderedItems"], (l, U) => {
116
+ if (l.moves === U.moves) return;
117
+ const { activeId: I } = a.getState(), i = O.item(I);
118
+ a.setState("activeValue", i == null ? void 0 : i.value);
119
+ })
120
+ ), Q(F(F(F({}, P), O), a), {
121
+ tag: n,
122
+ setValue: (l) => a.setState("value", l),
123
+ resetValue: () => a.setState("value", D.value),
124
+ setSelectedValue: (l) => a.setState("selectedValue", l)
125
+ });
126
+ }
127
+ function Dt(o) {
128
+ const s = _t();
129
+ return o = J(L({}, o), {
130
+ tag: o.tag !== void 0 ? o.tag : s
131
+ }), yt(o);
132
+ }
133
+ function Kt(o, s, n) {
134
+ return ge(s, [n.tag]), Z(o, n, "value", "setValue"), Z(o, n, "selectedValue", "setSelectedValue"), Z(o, n, "resetValueOnHide"), Z(o, n, "resetValueOnSelect"), Object.assign(
135
+ At(
136
+ Ot(o, s, n),
137
+ s,
138
+ n
139
+ ),
140
+ { tag: n.tag }
141
+ );
142
+ }
143
+ function Rt(o = {}) {
144
+ o = Dt(o);
145
+ const [s, n] = Vt(kt, o);
146
+ return Kt(s, n, o);
147
+ }
148
+ var Mt = "input";
149
+ function Se(o, s, n) {
150
+ if (!n) return !1;
151
+ const e = o.find((g) => !g.disabled && g.value);
152
+ return (e == null ? void 0 : e.value) === s;
153
+ }
154
+ function Ce(o, s) {
155
+ return !s || o == null ? !1 : (o = ft(o), s.length > o.length && s.toLowerCase().indexOf(o.toLowerCase()) === 0);
156
+ }
157
+ function Ft(o) {
158
+ return o.type === "input";
159
+ }
160
+ function Bt(o) {
161
+ return o === "inline" || o === "list" || o === "both" || o === "none";
162
+ }
163
+ function Ht(o) {
164
+ const s = o.find((n) => {
165
+ var e;
166
+ return n.disabled ? !1 : ((e = n.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
167
+ });
168
+ return s == null ? void 0 : s.id;
169
+ }
170
+ var Ut = Ve(
171
+ function(s) {
172
+ var n = s, {
173
+ store: e,
174
+ focusable: g = !0,
175
+ autoSelect: f = !1,
176
+ getAutoSelectId: u,
177
+ setValueOnChange: _,
178
+ showMinLength: O = 0,
179
+ showOnChange: P,
180
+ showOnMouseDown: T,
181
+ showOnClick: E = T,
182
+ showOnKeyDown: k,
183
+ showOnKeyPress: D = k,
184
+ blurActiveItemOnClick: a,
185
+ setValueOnClick: l = !0,
186
+ moveOnKeyPress: U = !0,
187
+ autoComplete: I = "list"
188
+ } = n, i = Pe(n, [
189
+ "store",
190
+ "focusable",
191
+ "autoSelect",
192
+ "getAutoSelectId",
193
+ "setValueOnChange",
194
+ "showMinLength",
195
+ "showOnChange",
196
+ "showOnMouseDown",
197
+ "showOnClick",
198
+ "showOnKeyDown",
199
+ "showOnKeyPress",
200
+ "blurActiveItemOnClick",
201
+ "setValueOnClick",
202
+ "moveOnKeyPress",
203
+ "autoComplete"
204
+ ]);
205
+ const te = ze();
206
+ e = e || te, Ee(
207
+ e,
208
+ process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
209
+ );
210
+ const K = H(null), [X, S] = rt(), v = H(!1), N = H(!1), x = e.useState(
211
+ (t) => t.virtualFocus && f
212
+ ), b = I === "inline" || I === "both", [$, Y] = ye(b);
213
+ st(() => {
214
+ b && Y(!0);
215
+ }, [b]);
216
+ const p = e.useState("value"), ue = H();
217
+ z(() => B(e, ["selectedValue", "activeId"], (t, r) => {
218
+ ue.current = r.selectedValue;
219
+ }), []);
220
+ const V = e.useState((t) => {
221
+ var r;
222
+ if (b && $ && !(t.activeValue && Array.isArray(t.selectedValue) && (t.selectedValue.includes(t.activeValue) || (r = ue.current) != null && r.includes(t.activeValue))))
223
+ return t.activeValue;
224
+ }), R = e.useState("renderedItems"), y = e.useState("open"), A = e.useState("contentElement"), G = ht(() => {
225
+ if (!b || !$) return p;
226
+ if (Se(
227
+ R,
228
+ V,
229
+ x
230
+ )) {
231
+ if (Ce(p, V)) {
232
+ const r = (V == null ? void 0 : V.slice(p.length)) || "";
233
+ return p + r;
234
+ }
235
+ return p;
236
+ }
237
+ return V || p;
238
+ }, [b, $, R, V, x, p]);
239
+ z(() => {
240
+ const t = K.current;
241
+ if (!t) return;
242
+ const r = () => Y(!0);
243
+ return t.addEventListener("combobox-item-move", r), () => {
244
+ t.removeEventListener("combobox-item-move", r);
245
+ };
246
+ }, []), z(() => {
247
+ if (!b || !$ || !V || !Se(
248
+ R,
249
+ V,
250
+ x
251
+ ) || !Ce(p, V)) return;
252
+ let r = ut;
253
+ return queueMicrotask(() => {
254
+ const c = K.current;
255
+ if (!c) return;
256
+ const { start: d, end: C } = pe(c), w = p.length, m = V.length;
257
+ ne(c, w, m), r = () => {
258
+ if (!be(c)) return;
259
+ const { start: M, end: qe } = pe(c);
260
+ M === w && qe === m && ne(c, d, C);
261
+ };
262
+ }), () => r();
263
+ }, [
264
+ X,
265
+ b,
266
+ $,
267
+ V,
268
+ R,
269
+ x,
270
+ p
271
+ ]);
272
+ const Ae = H(null), ae = j(u), le = H(null);
273
+ z(() => {
274
+ if (!y || !A) return;
275
+ const t = at(A);
276
+ if (!t) return;
277
+ Ae.current = t;
278
+ const r = () => {
279
+ v.current = !1;
280
+ }, c = () => {
281
+ if (!e || !v.current) return;
282
+ const { activeId: C } = e.getState();
283
+ C !== null && C !== le.current && (v.current = !1);
284
+ }, d = { passive: !0, capture: !0 };
285
+ return t.addEventListener("wheel", r, d), t.addEventListener("touchmove", r, d), t.addEventListener("scroll", c, d), () => {
286
+ t.removeEventListener("wheel", r, !0), t.removeEventListener("touchmove", r, !0), t.removeEventListener("scroll", c, !0);
287
+ };
288
+ }, [y, A, e]), re(() => {
289
+ p && (N.current || (v.current = !0));
290
+ }, [p]), re(() => {
291
+ x !== "always" && y || (v.current = y);
292
+ }, [x, y]);
293
+ const ie = e.useState("resetValueOnSelect");
294
+ ge(() => {
295
+ var t, r;
296
+ const c = v.current;
297
+ if (!e || !y || !c && !ie) return;
298
+ const { baseElement: d, contentElement: C, activeId: w } = e.getState();
299
+ if (!(d && !be(d))) {
300
+ if (C != null && C.hasAttribute("data-placing")) {
301
+ const m = new MutationObserver(S);
302
+ return m.observe(C, { attributeFilter: ["data-placing"] }), () => m.disconnect();
303
+ }
304
+ if (x && c) {
305
+ const m = ae(R), M = m !== void 0 ? m : (t = Ht(R)) != null ? t : e.first();
306
+ le.current = M, e.move(M ?? null);
307
+ } else {
308
+ const m = (r = e.item(w || e.first())) == null ? void 0 : r.element;
309
+ m && "scrollIntoView" in m && m.scrollIntoView({ block: "nearest", inline: "nearest" });
310
+ }
311
+ }
312
+ }, [
313
+ e,
314
+ y,
315
+ X,
316
+ p,
317
+ x,
318
+ ie,
319
+ ae,
320
+ R
321
+ ]), z(() => {
322
+ if (!b) return;
323
+ const t = K.current;
324
+ if (!t) return;
325
+ const r = [t, A].filter(
326
+ (d) => !!d
327
+ ), c = (d) => {
328
+ r.every((C) => dt(d, C)) && (e == null || e.setValue(G));
329
+ };
330
+ for (const d of r)
331
+ d.addEventListener("focusout", c);
332
+ return () => {
333
+ for (const d of r)
334
+ d.removeEventListener("focusout", c);
335
+ };
336
+ }, [b, A, e, G]);
337
+ const oe = (t) => t.currentTarget.value.length >= O, ce = i.onChange, Le = q(P ?? oe), _e = q(
338
+ // If the combobox is combined with tags, the value will be set by the tag
339
+ // input component.
340
+ _ ?? !e.tag
341
+ ), Te = j((t) => {
342
+ if (ce == null || ce(t), t.defaultPrevented || !e) return;
343
+ const r = t.currentTarget, { value: c, selectionStart: d, selectionEnd: C } = r, w = t.nativeEvent;
344
+ if (v.current = !0, Ft(w) && (w.isComposing && (v.current = !1, N.current = !0), b)) {
345
+ const m = w.inputType === "insertText" || w.inputType === "insertCompositionText", M = d === c.length;
346
+ Y(m && M);
347
+ }
348
+ if (_e(t)) {
349
+ const m = c === e.getState().value;
350
+ e.setValue(c), queueMicrotask(() => {
351
+ ne(r, d, C);
352
+ }), b && x && m && S();
353
+ }
354
+ Le(t) && e.show(), (!x || !v.current) && e.setActiveId(null);
355
+ }), de = i.onCompositionEnd, ke = j((t) => {
356
+ v.current = !0, N.current = !1, de == null || de(t), !t.defaultPrevented && x && S();
357
+ }), fe = i.onMouseDown, De = q(
358
+ a ?? (() => !!(e != null && e.getState().includesBaseElement))
359
+ ), Ke = q(l), Re = q(E ?? oe), Me = j((t) => {
360
+ fe == null || fe(t), !t.defaultPrevented && (t.button || t.ctrlKey || e && (De(t) && e.setActiveId(null), Ke(t) && e.setValue(G), Re(t) && lt(t.currentTarget, "mouseup", e.show)));
361
+ }), me = i.onKeyDown, Fe = q(D ?? oe), Be = j((t) => {
362
+ if (me == null || me(t), t.repeat || (v.current = !1), t.defaultPrevented || t.ctrlKey || t.altKey || t.shiftKey || t.metaKey || !e) return;
363
+ const { open: r } = e.getState();
364
+ r || (t.key === "ArrowUp" || t.key === "ArrowDown") && Fe(t) && (t.preventDefault(), e.show());
365
+ }), ve = i.onBlur, He = j((t) => {
366
+ v.current = !1, ve == null || ve(t), t.defaultPrevented;
367
+ }), Ue = we(i.id), Ne = Bt(I) ? I : void 0, je = e.useState((t) => t.activeId === null);
368
+ return i = J(L({
369
+ id: Ue,
370
+ role: "combobox",
371
+ "aria-autocomplete": Ne,
372
+ "aria-haspopup": it(A, "listbox"),
373
+ "aria-expanded": y,
374
+ "aria-controls": A == null ? void 0 : A.id,
375
+ "data-active-item": je || void 0,
376
+ value: G
377
+ }, i), {
378
+ ref: Oe(K, i.ref),
379
+ onChange: Te,
380
+ onCompositionEnd: ke,
381
+ onMouseDown: Me,
382
+ onKeyDown: Be,
383
+ onBlur: He
384
+ }), i = We(J(L({
385
+ store: e,
386
+ focusable: g
387
+ }, i), {
388
+ // Enable inline autocomplete when the user moves from the combobox input
389
+ // to an item.
390
+ moveOnKeyPress: (t) => ct(U, t) ? !1 : (b && Y(!0), !0)
391
+ })), i = $e(L({ store: e }, i)), L({ autoComplete: "off" }, i);
392
+ }
393
+ ), ao = xe(function(s) {
394
+ const n = Ut(s);
395
+ return he(Mt, n);
396
+ });
397
+ function lo(o = {}) {
398
+ const s = Rt(o);
399
+ return /* @__PURE__ */ se(Je, { value: s, children: o.children });
400
+ }
401
+ var Nt = "div", jt = Ve(
402
+ function(s) {
403
+ var n = s, { store: e, alwaysVisible: g } = n, f = Pe(n, ["store", "alwaysVisible"]);
404
+ const u = Xe(!0), _ = Ye();
405
+ e = e || _;
406
+ const O = !!e && e === u;
407
+ Ee(
408
+ e,
409
+ process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
410
+ );
411
+ const P = H(null), T = we(f.id), E = e.useState("mounted"), k = Lt(E, f.hidden, g), D = k ? J(L({}, f.style), { display: "none" }) : f.style, a = e.useState(
412
+ (S) => Array.isArray(S.selectedValue)
413
+ ), l = mt(P, "role", f.role), I = (l === "listbox" || l === "tree" || l === "grid") && a || void 0, [i, te] = ye(!1), K = e.useState("contentElement");
414
+ re(() => {
415
+ if (!E) return;
416
+ const S = P.current;
417
+ if (!S || K !== S) return;
418
+ const v = () => {
419
+ te(!!S.querySelector("[role='listbox']"));
420
+ }, N = new MutationObserver(v);
421
+ return N.observe(S, {
422
+ subtree: !0,
423
+ childList: !0,
424
+ attributeFilter: ["role"]
425
+ }), v(), () => N.disconnect();
426
+ }, [E, K]), i || (f = L({
427
+ role: "listbox",
428
+ "aria-multiselectable": I
429
+ }, f)), f = vt(
430
+ f,
431
+ (S) => /* @__PURE__ */ se(Ge, { value: e, children: /* @__PURE__ */ se(Qe.Provider, { value: l, children: S }) }),
432
+ [e, l]
433
+ );
434
+ const X = T && (!u || !O) ? e.setContentElement : null;
435
+ return f = J(L({
436
+ id: T,
437
+ hidden: k
438
+ }, f), {
439
+ ref: Oe(X, P, f.ref),
440
+ style: D
441
+ }), pt(f);
442
+ }
443
+ ), io = xe(function(s) {
444
+ const n = jt(s);
445
+ return he(Nt, n);
446
+ });
447
+ export {
448
+ lo as C,
449
+ oo as T,
450
+ ao as a,
451
+ io as b,
452
+ _t as c,
453
+ no as d,
454
+ ro as e,
455
+ uo as f,
456
+ so as g,
457
+ Rt as h,
458
+ jt as u
459
+ };