@wrdagency/blockout 1.0.27 → 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 (120) hide show
  1. package/dist/{2NBKRL7C-M2oB5mLz.js → 2NBKRL7C-DBbnghCe.js} +16 -16
  2. package/dist/{2RSXSRCN-BtBMZ8Lx.js → 2RSXSRCN-BxQ_v-Je.js} +15 -15
  3. package/dist/{4CMBR7SL-C-0Aig1V.js → 4CMBR7SL-DezfZPUS.js} +18 -18
  4. package/dist/{5JTVDSTH-BOGL3M3F.js → 5JTVDSTH-CZ7mfyUK.js} +4 -4
  5. package/dist/{5VQZOHHZ-DADExXg7.js → 5VQZOHHZ-DLX-ulBK.js} +1 -1
  6. package/dist/{6VRAQV3D-pTuMqsWW.js → 6VRAQV3D-BYmT0QTl.js} +6 -6
  7. package/dist/{A3WPL2ZJ-BiXYGxnE.js → A3WPL2ZJ-24tGIJIQ.js} +2 -2
  8. package/dist/{BM6PGYQY-DL-j4NGc.js → BM6PGYQY-DCbkDr5N.js} +2 -2
  9. package/dist/{DG5U6ZEL-Bn6QlO7C.js → DG5U6ZEL-DB0iwihy.js} +3 -3
  10. package/dist/{EM5CXX6A-B4C-NFJy.js → EM5CXX6A-B4ZS4Hs_.js} +2 -2
  11. package/dist/{F5MUBM3I-D6cacg-c.js → F5MUBM3I-75qY3y0N.js} +9 -9
  12. package/dist/{G7GW6PWC-C6qSYISF.js → G7GW6PWC-Dk4hVbAk.js} +74 -74
  13. package/dist/{IWEFDH56-Da7lGcXC.js → IWEFDH56-BACkQ6dc.js} +3 -3
  14. package/dist/{J2LQO3EC-XUQS0UAH.js → J2LQO3EC-BXJIaM2U.js} +2 -2
  15. package/dist/JMHAJKUZ-D5KCN1Aj.js +114 -0
  16. package/dist/{KFH4SEIX-C-0wHvda.js → KFH4SEIX-DaQeP5D_.js} +3 -3
  17. package/dist/{LMDWO4NN-ZnclRjpA.js → LMDWO4NN-CpSMaD5G.js} +21 -21
  18. package/dist/MAXQOH4L-BYWBWXpb.js +459 -0
  19. package/dist/{MR26YJYP-CWddku_H.js → MR26YJYP-CTh6rCwA.js} +39 -39
  20. package/dist/{MTZPJQMC-CNgogsHX.js → MTZPJQMC-D2i4-LA_.js} +2 -2
  21. package/dist/{O2PQ2652-DkPiHeUQ.js → O2PQ2652-DIoegIkE.js} +3 -3
  22. package/dist/{P7GR5CS5-bOyAbBNR.js → P7GR5CS5-3RsPGPTy.js} +1 -1
  23. package/dist/{PFRGBC2K-BS9YO5-Q.js → PFRGBC2K-BdRJd-gU.js} +16 -16
  24. package/dist/{RS7LB2H4-BpSl1D2T.js → RS7LB2H4-COOfOq9w.js} +1 -1
  25. package/dist/{RZ4GPYOB-D4dwmRZg.js → RZ4GPYOB-CovncfhJ.js} +5 -5
  26. package/dist/{S43UC3DV-BVbmEy3J.js → S43UC3DV-HCi6u_G4.js} +8 -8
  27. package/dist/{T7VMP3TM-BnzhAoaO.js → T7VMP3TM-C8D6mVva.js} +21 -21
  28. package/dist/{TIW3GMFC-C4Bh_hzw.js → TIW3GMFC-BF0w2_9R.js} +4 -4
  29. package/dist/{TP7N7UIH-Bs0NX7lb.js → TP7N7UIH-C4jXJDlO.js} +2 -2
  30. package/dist/{UQQRIHDV-C_0T8mGy.js → UQQRIHDV-DEGlgATx.js} +8 -8
  31. package/dist/{UYGDZTLQ-BDhCZlZ2.js → UYGDZTLQ-HiDKLOW5.js} +2 -2
  32. package/dist/{VIIRIBF3-CQdc2eWO.js → VIIRIBF3-B-djNAU9.js} +3 -3
  33. package/dist/{WMYDSCNQ-J1-TanSP.js → WMYDSCNQ-pGjWB-Pk.js} +6 -6
  34. package/dist/{WYCIER3C-CABEZy1i.js → WYCIER3C-CxfgpZG_.js} +2 -2
  35. package/dist/{YORGHBM4-B1RRY_xR.js → YORGHBM4-D_fOXG5Y.js} +1 -1
  36. package/dist/{YV4JVR4I-BuKFdNa0.js → YV4JVR4I-CQnJhUSg.js} +38 -38
  37. package/dist/assets/button.css +1 -1
  38. package/dist/assets/index9.css +1 -1
  39. package/dist/assets/static.css +1 -1
  40. package/dist/assets/style.css +1 -1
  41. package/dist/assets/style6.css +1 -1
  42. package/dist/{combobox-group-Q7OatWHm.js → combobox-group-hNvv1WJm.js} +3 -3
  43. package/dist/{combobox-popover-CDfaOt6J.js → combobox-popover-BZ_1wNrj.js} +5 -5
  44. package/dist/components/avatar/index.d.ts +2 -2
  45. package/dist/components/avatar/index.js +20 -18
  46. package/dist/components/breadcrumbs/index.js +5 -5
  47. package/dist/components/button/row.js +4 -4
  48. package/dist/components/command-palette/dialog.js +2 -2
  49. package/dist/components/command-palette/index.js +5 -3
  50. package/dist/components/command-palette/presets.d.ts +4 -0
  51. package/dist/components/command-palette/presets.js +10 -0
  52. package/dist/components/command-palette/static.d.ts +4 -11
  53. package/dist/components/command-palette/static.js +43 -124
  54. package/dist/components/controls/base-popover-control/index.js +3 -3
  55. package/dist/components/controls/date-control/index.js +1 -1
  56. package/dist/components/controls/date-control/picker.js +5 -5
  57. package/dist/components/controls/select-control/control.js +1 -1
  58. package/dist/components/controls/select-control/select.js +32 -31
  59. package/dist/components/controls/tag-control/ariakit-experimental.js +253 -252
  60. package/dist/components/controls/tag-control/index.js +8 -7
  61. package/dist/components/dialog/index.js +2 -2
  62. package/dist/components/filesystem/file.js +1 -1
  63. package/dist/components/filesystem/folder.js +5 -5
  64. package/dist/components/filesystem/list.js +1 -1
  65. package/dist/components/filesystem/root.js +1 -1
  66. package/dist/components/index.d.ts +1 -1
  67. package/dist/components/menu/index.js +2 -2
  68. package/dist/components/menu/item.js +1 -1
  69. package/dist/components/menu/items/action.js +1 -1
  70. package/dist/components/menu/items/spacer.js +1 -1
  71. package/dist/components/menu/items/submenu.js +3 -3
  72. package/dist/components/menu/items/toggle.js +1 -1
  73. package/dist/components/shell/index.js +14 -12
  74. package/dist/components/shell/navigation-separator.d.ts +6 -0
  75. package/dist/components/shell/navigation-separator.js +14 -0
  76. package/dist/components/shell/sidebar-item.d.ts +5 -4
  77. package/dist/components/shell/sidebar-item.js +25 -19
  78. package/dist/components/tabs/list.js +1 -1
  79. package/dist/components/tabs/panel.js +1 -1
  80. package/dist/components/tabs/root.js +1 -1
  81. package/dist/components/tabs/tab.js +1 -1
  82. package/dist/components/toolbar/divider.js +1 -1
  83. package/dist/components/toolbar/index.js +1 -1
  84. package/dist/components/toolbar/root.js +1 -1
  85. package/dist/components/window/index.js +1 -1
  86. package/dist/{composite-provider-VHhinf1k.js → composite-provider-BPIeS4Cg.js} +2 -2
  87. package/dist/{disclosure-provider-BUQRx-hY.js → disclosure-provider-cEVysvZT.js} +2 -2
  88. package/dist/index.d.ts +1 -0
  89. package/dist/index.js +76 -55
  90. package/dist/{item-PTynqLvp.js → item-CmTk8eHD.js} +2 -2
  91. package/dist/{menu-button-RmWWFvwE.js → menu-button-GQO5dB3U.js} +12 -12
  92. package/dist/{menu-separator-DgYHkDAA.js → menu-separator-Z6pSHpX5.js} +3 -3
  93. package/dist/{picker-DioIiYC0.js → picker-DyJogHYh.js} +4 -4
  94. package/dist/{popover-provider-HlPXIcud.js → popover-provider-BJEfhgr1.js} +2 -2
  95. package/dist/presets-BDIhXP0C.js +148 -0
  96. package/dist/primitives/icon-label/index.d.ts +2 -0
  97. package/dist/primitives/icon-label/index.js +18 -14
  98. package/dist/primitives/link/index.d.ts +3 -1
  99. package/dist/primitives/link/index.js +25 -24
  100. package/dist/primitives/nav-link/index.d.ts +4 -3
  101. package/dist/primitives/nav-link/index.js +21 -17
  102. package/dist/primitives/popover/root.js +1 -1
  103. package/dist/primitives/popover/target.js +1 -1
  104. package/dist/primitives/popover/window.js +3 -3
  105. package/dist/primitives/tooltip/index.d.ts +2 -0
  106. package/dist/primitives/tooltip/index.js +36 -24
  107. package/dist/{select-popover-P8y2n3bQ.js → select-popover-Dheunyb0.js} +40 -40
  108. package/dist/{select-value-3BLrBdZV.js → select-value-B3DYk9eV.js} +2 -2
  109. package/dist/{tab-CKUPUgQ2.js → tab-DejwS4C8.js} +4 -4
  110. package/dist/{tab-list-CzsRzSiN.js → tab-list-CndMWcVv.js} +3 -3
  111. package/dist/{tab-panel-YGzJnU1g.js → tab-panel-DedzuWUA.js} +7 -7
  112. package/dist/{tab-provider-CV8qTybg.js → tab-provider-B0BoLfST.js} +6 -6
  113. package/dist/{tag-remove-DmlHu_9b.js → tag-remove-Dz-sGbyZ.js} +24 -24
  114. package/dist/{toolbar-BlVhTG5v.js → toolbar-PSaF1mdF.js} +5 -5
  115. package/dist/{toolbar-separator-liolx0p8.js → toolbar-separator-DJHiHbGj.js} +3 -3
  116. package/dist/{tooltip-arrow-CjZ1x0xv.js → tooltip-arrow-BVwULA6B.js} +17 -17
  117. package/dist/utils/index.d.ts +8 -0
  118. package/dist/utils/index.js +23 -0
  119. package/package.json +1 -1
  120. package/dist/MAXQOH4L-lpuvS1NR.js +0 -564
@@ -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
+ };
@@ -1,10 +1,10 @@
1
- import { c as pe, a as he } from "./O2PQ2652-DkPiHeUQ.js";
2
- import { c as Pe, f as q, b as He, d as we } from "./YV4JVR4I-BuKFdNa0.js";
3
- import { V as B, U as _, W as D, c as oe, _ as X, i as re, a3 as Ee, M as ne, j as $, a2 as K, a0 as F, a4 as Se, b as ge, l as Oe, m as k, n as se, o as y, C as be, N as I, e as U, f as ue, a as ie, t as Me } from "./LMDWO4NN-ZnclRjpA.js";
4
- import { u as Y, H as Fe } from "./EM5CXX6A-B4C-NFJy.js";
5
- import { u as Te, c as Ae } from "./G7GW6PWC-C6qSYISF.js";
6
- import { a as _e, u as ye } from "./PFRGBC2K-BS9YO5-Q.js";
7
- import { useRef as R, useState as ce, useEffect as S, useContext as Re, createContext as xe, useCallback as ae } from "react";
1
+ import { c as pe, a as he } from "./O2PQ2652-DIoegIkE.js";
2
+ import { c as Pe, f as q, b as He, d as we } from "./YV4JVR4I-CQnJhUSg.js";
3
+ import { V as B, U as _, W as D, c as oe, _ as X, i as re, a3 as Ee, O as ne, j as $, a2 as K, a0 as M, a4 as Oe, b as Se, l as ge, m as k, n as se, o as y, C as be, P as I, e as U, f as ue, a as ie, t as Fe } from "./LMDWO4NN-CpSMaD5G.js";
4
+ import { u as Y, H as Me } from "./EM5CXX6A-B4ZS4Hs_.js";
5
+ import { u as Te, c as Ae } from "./G7GW6PWC-Dk4hVbAk.js";
6
+ import { a as _e, u as ye } from "./PFRGBC2K-BdRJd-gU.js";
7
+ import { useRef as R, useState as ce, useEffect as O, useContext as Re, createContext as xe, useCallback as ae } from "react";
8
8
  import { jsx as Q } from "react/jsx-runtime";
9
9
  function Ce(r = {}) {
10
10
  var s;
@@ -74,13 +74,13 @@ function je(r) {
74
74
  "store"
75
75
  ]);
76
76
  const [n, u] = ce(!1), i = t.useState("mounted");
77
- S(() => {
77
+ O(() => {
78
78
  i || u(!1);
79
79
  }, [i]);
80
80
  const a = e.onFocus, c = U((d) => {
81
81
  a == null || a(d), !d.defaultPrevented && u(!0);
82
82
  }), o = R(null);
83
- return S(() => we(t, ["anchorElement"], (d) => {
83
+ return O(() => we(t, ["anchorElement"], (d) => {
84
84
  o.current = d.anchorElement;
85
85
  }), []), e = k(y({
86
86
  autoFocusOnHide: n,
@@ -111,25 +111,25 @@ var te = xe(null), Ve = oe(
111
111
  e,
112
112
  process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
113
113
  );
114
- const h = R(null), [p, H] = ce([]), v = R(0), O = R(null), { portalRef: P, domReady: f } = Ee(u, o.portalRef), w = ne(), x = !!a, T = $(a), g = !!c, C = $(
114
+ const h = R(null), [p, H] = ce([]), v = R(0), g = R(null), { portalRef: P, domReady: f } = Ee(u, o.portalRef), w = ne(), x = !!a, T = $(a), S = !!c, C = $(
115
115
  c
116
116
  ), j = e.useState("open"), b = e.useState("mounted");
117
- S(() => {
118
- if (!f || !b || !x && !g) return;
117
+ O(() => {
118
+ if (!f || !b || !x && !S) return;
119
119
  const l = h.current;
120
120
  return l ? K(
121
- F("mousemove", (m) => {
121
+ M("mousemove", (m) => {
122
122
  if (!e || !w()) return;
123
- const { anchorElement: M, hideTimeout: N, timeout: me } = e.getState(), z = O.current, [V] = m.composedPath(), L = M;
123
+ const { anchorElement: F, hideTimeout: N, timeout: me } = e.getState(), z = g.current, [V] = m.composedPath(), L = F;
124
124
  if (le(V, l, L, p)) {
125
- O.current = V && L && I(L, V) ? W(m) : null, window.clearTimeout(v.current), v.current = 0;
125
+ g.current = V && L && I(L, V) ? W(m) : null, window.clearTimeout(v.current), v.current = 0;
126
126
  return;
127
127
  }
128
128
  if (!v.current) {
129
129
  if (z) {
130
130
  const J = W(m), ve = ee(l, z);
131
131
  if (Z(J, ve)) {
132
- if (O.current = J, !C(m)) return;
132
+ if (g.current = J, !C(m)) return;
133
133
  m.preventDefault(), m.stopPropagation();
134
134
  return;
135
135
  }
@@ -147,18 +147,18 @@ var te = xe(null), Ve = oe(
147
147
  f,
148
148
  b,
149
149
  x,
150
- g,
150
+ S,
151
151
  p,
152
152
  C,
153
153
  T
154
- ]), S(() => {
155
- if (!f || !b || !g) return;
154
+ ]), O(() => {
155
+ if (!f || !b || !S) return;
156
156
  const l = (E) => {
157
157
  const m = h.current;
158
158
  if (!m) return;
159
- const M = O.current;
160
- if (!M) return;
161
- const N = ee(m, M);
159
+ const F = g.current;
160
+ if (!F) return;
161
+ const N = ee(m, F);
162
162
  if (Z(W(E), N)) {
163
163
  if (!C(E)) return;
164
164
  E.preventDefault(), E.stopPropagation();
@@ -166,23 +166,23 @@ var te = xe(null), Ve = oe(
166
166
  };
167
167
  return K(
168
168
  // Note: we may need to add pointer events here in the future.
169
- F("mouseenter", l, !0),
170
- F("mouseover", l, !0),
171
- F("mouseout", l, !0),
172
- F("mouseleave", l, !0)
169
+ M("mouseenter", l, !0),
170
+ M("mouseover", l, !0),
171
+ M("mouseout", l, !0),
172
+ M("mouseleave", l, !0)
173
173
  );
174
- }, [f, b, g, C]), S(() => {
174
+ }, [f, b, S, C]), O(() => {
175
175
  f && (j || e == null || e.setAutoFocusOnShow(!1));
176
176
  }, [e, f, j]);
177
- const fe = Se(j);
178
- S(() => {
177
+ const fe = Oe(j);
178
+ O(() => {
179
179
  if (f)
180
180
  return () => {
181
181
  fe.current || e == null || e.setAutoFocusOnShow(!1);
182
182
  };
183
183
  }, [e, f]);
184
184
  const A = Re(te);
185
- ge(() => {
185
+ Se(() => {
186
186
  if (n || !u || !b || !f) return;
187
187
  const l = h.current;
188
188
  if (l)
@@ -194,15 +194,15 @@ var te = xe(null), Ve = oe(
194
194
  const E = A == null ? void 0 : A(l);
195
195
  return () => {
196
196
  H(
197
- (m) => m.filter((M) => M !== l)
197
+ (m) => m.filter((F) => F !== l)
198
198
  ), E == null || E();
199
199
  };
200
200
  },
201
201
  [A]
202
202
  );
203
- o = Oe(
203
+ o = ge(
204
204
  o,
205
- (l) => /* @__PURE__ */ Q(Fe, { value: e, children: /* @__PURE__ */ Q(te.Provider, { value: G, children: l }) }),
205
+ (l) => /* @__PURE__ */ Q(Me, { value: e, children: /* @__PURE__ */ Q(te.Provider, { value: G, children: l }) }),
206
206
  [e, G]
207
207
  ), o = k(y({}, o), {
208
208
  ref: se(h, o.ref)
@@ -240,8 +240,8 @@ var te = xe(null), Ve = oe(
240
240
  e,
241
241
  process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
242
242
  );
243
- const a = Me(u), c = R(0);
244
- S(() => () => window.clearTimeout(c.current), []), S(() => F("mouseleave", (f) => {
243
+ const a = Fe(u), c = R(0);
244
+ O(() => () => window.clearTimeout(c.current), []), O(() => M("mouseleave", (f) => {
245
245
  if (!e) return;
246
246
  const { anchorElement: w } = e.getState();
247
247
  w && f.target === w && (window.clearTimeout(c.current), c.current = 0);
@@ -254,11 +254,11 @@ var te = xe(null), Ve = oe(
254
254
  c.current = 0, h() && (e == null || e.setAnchorElement(f), e == null || e.show(), queueMicrotask(() => {
255
255
  e == null || e.setDisclosureElement(f);
256
256
  }));
257
- }, g = w ?? x;
258
- g === 0 ? T() : c.current = window.setTimeout(T, g);
257
+ }, S = w ?? x;
258
+ S === 0 ? T() : c.current = window.setTimeout(T, S);
259
259
  }), H = u.onClick, v = U((P) => {
260
260
  H == null || H(P), e && (window.clearTimeout(c.current), c.current = 0);
261
- }), O = ae(
261
+ }), g = ae(
262
262
  (P) => {
263
263
  if (!e) return;
264
264
  const { anchorElement: f } = e.getState();
@@ -267,7 +267,7 @@ var te = xe(null), Ve = oe(
267
267
  [e]
268
268
  );
269
269
  return u = k(y({}, u), {
270
- ref: se(O, u.ref),
270
+ ref: se(g, u.ref),
271
271
  onMouseMove: p,
272
272
  onClick: v
273
273
  }), u = ye(u), u;
@@ -1,5 +1,5 @@
1
- import { D as e, b as r } from "./RS7LB2H4-BpSl1D2T.js";
2
- import { J as t } from "./LMDWO4NN-ZnclRjpA.js";
1
+ import { D as e, b as r } from "./RS7LB2H4-COOfOq9w.js";
2
+ import { L as t } from "./LMDWO4NN-CpSMaD5G.js";
3
3
  var o = t(
4
4
  [r],
5
5
  [e]
@@ -1,6 +1,6 @@
1
- import { c as v, a as S } from "./BM6PGYQY-DL-j4NGc.js";
2
- import { m as E, o as f, t as P, c as g, b as h, f as _ } from "./YV4JVR4I-BuKFdNa0.js";
3
- import { Y as b, V as u, W as m, U as p, X as w } from "./LMDWO4NN-ZnclRjpA.js";
1
+ import { c as v, a as S } from "./BM6PGYQY-DCbkDr5N.js";
2
+ import { m as E, o as f, t as P, c as g, b as h, f as _ } from "./YV4JVR4I-CQnJhUSg.js";
3
+ import { Y as b, V as u, W as m, U as p, X as w } from "./LMDWO4NN-CpSMaD5G.js";
4
4
  function y(t = {}) {
5
5
  var o = t, {
6
6
  popover: r
@@ -1,4 +1,4 @@
1
- import { J as t } from "./LMDWO4NN-ZnclRjpA.js";
1
+ import { L as t } from "./LMDWO4NN-CpSMaD5G.js";
2
2
  import { createContext as r } from "react";
3
3
  var o = t(), v = o.useContext;
4
4
  o.useScopedContext;