@wrdagency/blockout 1.0.29 → 1.0.30

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.
@@ -1,33 +1,34 @@
1
1
  import { u as Se, a as se, S as be, b as xe, c as Oe, d as Ce, e as de } from "./DG5U6ZEL-DB0iwihy.js";
2
2
  import { u as Ie } from "./MTZPJQMC-D2i4-LA_.js";
3
- import { c as R, _ as T, i as Y, m as I, o as p, r as Ae, f as F, a as H, Y as De, V as W, U as O, W as V, X as _e, j as k, e as le, J as Ve, l as X, n as he, S as ke, s as Ke, q as ge, t as Le, E as Me, F as Ne, R as Re, h as Te, u as Fe, aa as He } from "./LMDWO4NN-CpSMaD5G.js";
4
- import { useMemo as ae, useState as J, useRef as je, useEffect as ne, useCallback as Be, useContext as me, createContext as $e } from "react";
3
+ import { c as D, _ as G, i as Y, m as I, o as p, r as Ae, f as _, a as V, Y as De, V as q, U as O, W as K, X as _e, j as N, e as le, J as Ve, l as X, n as he, S as ke, s as Le, q as ge, t as Ke, E as Ne, F as Me, R as Re, h as Te, u as Fe, aa as Ge } from "./LMDWO4NN-CpSMaD5G.js";
4
+ import { useMemo as ae, useState as J, useRef as He, useEffect as ne, useCallback as $e, useContext as me, createContext as je } from "react";
5
5
  import { jsx as P, jsxs as oe, Fragment as ve } from "react/jsx-runtime";
6
6
  import { u as we } from "./T7VMP3TM-C8D6mVva.js";
7
- import { a as Ue } from "./WMYDSCNQ-pGjWB-Pk.js";
7
+ import { a as Be } from "./WMYDSCNQ-pGjWB-Pk.js";
8
8
  import { t as ye } from "./7PRQYBBV-91wrWGjk.js";
9
- import { c as qe, a as We } from "./O2PQ2652-DIoegIkE.js";
10
- import { c as ze, d as Ge, b as Je } from "./4CMBR7SL-DezfZPUS.js";
9
+ import { c as Ue, a as qe } from "./O2PQ2652-DIoegIkE.js";
10
+ import { c as We, d as ze, b as Je } from "./4CMBR7SL-DezfZPUS.js";
11
11
  import { u as Xe } from "./S43UC3DV-HCi6u_G4.js";
12
- import { m as Ye, o as Qe, t as Ze, c as et, s as z, d as re, g as tt, b as ot, f as pe, u as rt } from "./YV4JVR4I-CQnJhUSg.js";
13
- import { u as nt } from "./UQQRIHDV-DEGlgATx.js";
14
- import { u as st } from "./6VRAQV3D-BYmT0QTl.js";
15
- import { i as lt } from "./KFH4SEIX-DaQeP5D_.js";
16
- import { u as at } from "./5JTVDSTH-CZ7mfyUK.js";
17
- import { c as it, u as ut } from "./G7GW6PWC-Dk4hVbAk.js";
18
- var ct = "span", dt = {
12
+ import { m as Ye, o as Qe, t as Ze, c as et, s as W, d as re, g as tt, b as ot, f as pe, u as rt } from "./YV4JVR4I-CQnJhUSg.js";
13
+ import { u as nt, a as st } from "./YORGHBM4-D_fOXG5Y.js";
14
+ import { u as lt } from "./UQQRIHDV-DEGlgATx.js";
15
+ import { u as at } from "./6VRAQV3D-BYmT0QTl.js";
16
+ import { i as it } from "./KFH4SEIX-DaQeP5D_.js";
17
+ import { u as ut } from "./5JTVDSTH-CZ7mfyUK.js";
18
+ import { c as ct, u as dt } from "./G7GW6PWC-Dk4hVbAk.js";
19
+ var mt = "span", vt = {
19
20
  top: "4,10 8,6 12,10",
20
21
  right: "6,4 10,8 6,12",
21
22
  bottom: "4,6 8,10 12,6",
22
23
  left: "10,4 6,8 10,12"
23
- }, Pe = R(function(o) {
24
- var r = o, { store: e, placement: t } = r, a = T(r, ["store", "placement"]);
24
+ }, Pe = D(function(t) {
25
+ var o = t, { store: e, placement: r } = o, a = G(o, ["store", "placement"]);
25
26
  const m = Ie();
26
27
  e = e || m, Y(
27
28
  e,
28
29
  process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
29
30
  );
30
- const E = e.useState((n) => t || n.placement).split("-")[0], u = dt[E], l = ae(
31
+ const E = e.useState((s) => r || s.placement).split("-")[0], u = vt[E], l = ae(
31
32
  () => /* @__PURE__ */ P(
32
33
  "svg",
33
34
  {
@@ -55,21 +56,21 @@ var ct = "span", dt = {
55
56
  pointerEvents: "none"
56
57
  }, a.style)
57
58
  }), Ae(a);
58
- }), Jt = F(
59
- function(o) {
60
- const r = Pe(o);
61
- return H(ct, r);
59
+ }), oo = _(
60
+ function(t) {
61
+ const o = Pe(t);
62
+ return V(mt, o);
62
63
  }
63
64
  );
64
- function mt(s = {}) {
65
- var o = s, {
66
- combobox: r
67
- } = o, e = De(o, [
65
+ function pt(n = {}) {
66
+ var t = n, {
67
+ combobox: o
68
+ } = t, e = De(t, [
68
69
  "combobox"
69
70
  ]);
70
- const t = Ye(
71
+ const r = Ye(
71
72
  e.store,
72
- Qe(r, [
73
+ Qe(o, [
73
74
  "value",
74
75
  "items",
75
76
  "renderedItems",
@@ -81,9 +82,9 @@ function mt(s = {}) {
81
82
  "disclosureElement"
82
83
  ])
83
84
  );
84
- Ze(e, t);
85
- const a = t.getState(), m = ze(W(V({}, e), {
86
- store: t,
85
+ Ze(e, r);
86
+ const a = r.getState(), m = We(q(K({}, e), {
87
+ store: r,
87
88
  virtualFocus: O(
88
89
  e.virtualFocus,
89
90
  a.virtualFocus,
@@ -105,14 +106,14 @@ function mt(s = {}) {
105
106
  a.orientation,
106
107
  "vertical"
107
108
  )
108
- })), S = qe(W(V({}, e), {
109
- store: t,
109
+ })), S = Ue(q(K({}, e), {
110
+ store: r,
110
111
  placement: O(
111
112
  e.placement,
112
113
  a.placement,
113
114
  "bottom-start"
114
115
  )
115
- })), E = new String(""), u = W(V(V({}, m.getState()), S.getState()), {
116
+ })), E = new String(""), u = q(K(K({}, m.getState()), S.getState()), {
116
117
  value: O(
117
118
  e.value,
118
119
  a.value,
@@ -127,107 +128,107 @@ function mt(s = {}) {
127
128
  labelElement: O(a.labelElement, null),
128
129
  selectElement: O(a.selectElement, null),
129
130
  listElement: O(a.listElement, null)
130
- }), l = et(u, m, S, t);
131
- return z(
131
+ }), l = et(u, m, S, r);
132
+ return W(
132
133
  l,
133
- () => re(l, ["value", "items"], (n) => {
134
- if (n.value !== E || !n.items.length) return;
135
- const f = n.items.find(
134
+ () => re(l, ["value", "items"], (s) => {
135
+ if (s.value !== E || !s.items.length) return;
136
+ const f = s.items.find(
136
137
  (b) => !b.disabled && b.value != null
137
138
  );
138
139
  (f == null ? void 0 : f.value) != null && l.setState("value", f.value);
139
140
  })
140
- ), z(
141
+ ), W(
141
142
  l,
142
- () => re(l, ["mounted"], (n) => {
143
- n.mounted || l.setState("activeId", u.activeId);
143
+ () => re(l, ["mounted"], (s) => {
144
+ s.mounted || l.setState("activeId", u.activeId);
144
145
  })
145
- ), z(
146
+ ), W(
146
147
  l,
147
- () => re(l, ["mounted", "items", "value"], (n) => {
148
- if (r || n.mounted) return;
149
- const f = ye(n.value), b = f[f.length - 1];
148
+ () => re(l, ["mounted", "items", "value"], (s) => {
149
+ if (o || s.mounted) return;
150
+ const f = ye(s.value), b = f[f.length - 1];
150
151
  if (b == null) return;
151
- const w = n.items.find(
152
+ const w = s.items.find(
152
153
  (g) => !g.disabled && g.value === b
153
154
  );
154
155
  w && l.setState("activeId", w.id);
155
156
  })
156
- ), z(
157
+ ), W(
157
158
  l,
158
- () => tt(l, ["setValueOnMove", "moves"], (n) => {
159
+ () => tt(l, ["setValueOnMove", "moves"], (s) => {
159
160
  const { mounted: f, value: b, activeId: w } = l.getState();
160
- if (!n.setValueOnMove && f || Array.isArray(b) || !n.moves || !w) return;
161
+ if (!s.setValueOnMove && f || Array.isArray(b) || !s.moves || !w) return;
161
162
  const g = m.item(w);
162
163
  !g || g.disabled || g.value == null || l.setState("value", g.value);
163
164
  })
164
- ), W(V(V(V({}, m), S), l), {
165
- combobox: r,
166
- setValue: (n) => l.setState("value", n),
167
- setLabelElement: (n) => l.setState("labelElement", n),
168
- setSelectElement: (n) => l.setState("selectElement", n),
169
- setListElement: (n) => l.setState("listElement", n)
165
+ ), q(K(K(K({}, m), S), l), {
166
+ combobox: o,
167
+ setValue: (s) => l.setState("value", s),
168
+ setLabelElement: (s) => l.setState("labelElement", s),
169
+ setSelectElement: (s) => l.setState("selectElement", s),
170
+ setListElement: (s) => l.setState("listElement", s)
170
171
  });
171
172
  }
172
- function vt(s) {
173
- const o = Xe();
174
- return s = I(p({}, s), {
175
- combobox: s.combobox !== void 0 ? s.combobox : o
176
- }), Ge(s);
173
+ function ft(n) {
174
+ const t = Xe();
175
+ return n = I(p({}, n), {
176
+ combobox: n.combobox !== void 0 ? n.combobox : t
177
+ }), ze(n);
177
178
  }
178
- function pt(s, o, r) {
179
- return _e(o, [r.combobox]), pe(s, r, "value", "setValue"), pe(s, r, "setValueOnMove"), Object.assign(
180
- We(
181
- Je(s, o, r),
182
- o,
183
- r
179
+ function St(n, t, o) {
180
+ return _e(t, [o.combobox]), pe(n, o, "value", "setValue"), pe(n, o, "setValueOnMove"), Object.assign(
181
+ qe(
182
+ Je(n, t, o),
183
+ t,
184
+ o
184
185
  ),
185
- { combobox: r.combobox }
186
+ { combobox: o.combobox }
186
187
  );
187
188
  }
188
- function ft(s = {}) {
189
- s = vt(s);
190
- const [o, r] = ot(mt, s);
191
- return pt(o, r, s);
189
+ function bt(n = {}) {
190
+ n = ft(n);
191
+ const [t, o] = ot(pt, n);
192
+ return St(t, o, n);
192
193
  }
193
- var St = "span", bt = R(
194
- function(o) {
195
- var r = o, { store: e } = r, t = T(r, ["store"]);
194
+ var ht = "span", gt = D(
195
+ function(t) {
196
+ var o = t, { store: e } = o, r = G(o, ["store"]);
196
197
  const a = Se();
197
- return e = e || a, t = Pe(p({ store: e }, t)), t;
198
+ return e = e || a, r = Pe(p({ store: e }, r)), r;
198
199
  }
199
- ), ht = F(function(o) {
200
- const r = bt(o);
201
- return H(St, r);
202
- }), gt = "button";
203
- function wt(s) {
204
- return Array.from(s.selectedOptions).map((o) => o.value);
200
+ ), wt = _(function(t) {
201
+ const o = gt(t);
202
+ return V(ht, o);
203
+ }), yt = "button";
204
+ function Pt(n) {
205
+ return Array.from(n.selectedOptions).map((t) => t.value);
205
206
  }
206
- function G(s, o) {
207
+ function z(n, t) {
207
208
  return () => {
208
- const r = o();
209
- if (!r) return;
210
- let e = 0, t = s.item(r);
211
- const a = t;
212
- for (; t && t.value == null; ) {
213
- const m = o(++e);
209
+ const o = t();
210
+ if (!o) return;
211
+ let e = 0, r = n.item(o);
212
+ const a = r;
213
+ for (; r && r.value == null; ) {
214
+ const m = t(++e);
214
215
  if (!m) return;
215
- if (t = s.item(m), t === a) break;
216
+ if (r = n.item(m), r === a) break;
216
217
  }
217
- return t == null ? void 0 : t.id;
218
+ return r == null ? void 0 : r.id;
218
219
  };
219
220
  }
220
- var yt = R(function(o) {
221
- var r = o, {
221
+ var Et = D(function(t) {
222
+ var o = t, {
222
223
  store: e,
223
- name: t,
224
+ name: r,
224
225
  form: a,
225
226
  required: m,
226
227
  showOnKeyDown: S = !0,
227
228
  moveOnKeyDown: E = !0,
228
229
  toggleOnPress: u = !0,
229
230
  toggleOnClick: l = u
230
- } = r, n = T(r, [
231
+ } = o, s = G(o, [
231
232
  "store",
232
233
  "name",
233
234
  "form",
@@ -242,14 +243,14 @@ var yt = R(function(o) {
242
243
  e,
243
244
  process.env.NODE_ENV !== "production" && "Select must receive a `store` prop or be wrapped in a SelectProvider component."
244
245
  );
245
- const b = n.onKeyDown, w = k(S), g = k(E), y = e.useState("placement").split("-")[0], x = e.useState("value"), D = Array.isArray(x), L = le((c) => {
246
+ const b = s.onKeyDown, w = N(S), g = N(E), y = e.useState("placement").split("-")[0], x = e.useState("value"), k = Array.isArray(x), R = le((c) => {
246
247
  var d;
247
248
  if (b == null || b(c), c.defaultPrevented || !e) return;
248
- const { orientation: Z, items: ee, activeId: $ } = e.getState(), U = Z !== "horizontal", q = Z !== "vertical", v = !!((d = ee.find((ce) => !ce.disabled && ce.value != null)) != null && d.rowId), ie = {
249
- ArrowUp: (v || U) && G(e, e.up),
250
- ArrowRight: (v || q) && G(e, e.next),
251
- ArrowDown: (v || U) && G(e, e.down),
252
- ArrowLeft: (v || q) && G(e, e.previous)
249
+ const { orientation: Z, items: ee, activeId: j } = e.getState(), B = Z !== "horizontal", U = Z !== "vertical", v = !!((d = ee.find((ce) => !ce.disabled && ce.value != null)) != null && d.rowId), ie = {
250
+ ArrowUp: (v || B) && z(e, e.up),
251
+ ArrowRight: (v || U) && z(e, e.next),
252
+ ArrowDown: (v || B) && z(e, e.down),
253
+ ArrowLeft: (v || U) && z(e, e.previous)
253
254
  }[c.key];
254
255
  ie && g(c) && (c.preventDefault(), e.move(ie()));
255
256
  const ue = y === "top" || y === "bottom";
@@ -258,28 +259,28 @@ var yt = R(function(o) {
258
259
  ArrowUp: ue,
259
260
  ArrowLeft: y === "left",
260
261
  ArrowRight: y === "right"
261
- })[c.key] && w(c) && (c.preventDefault(), e.move($), Ve(c.currentTarget, "keyup", e.show));
262
+ })[c.key] && w(c) && (c.preventDefault(), e.move(j), Ve(c.currentTarget, "keyup", e.show));
262
263
  });
263
- n = X(
264
- n,
264
+ s = X(
265
+ s,
265
266
  (c) => /* @__PURE__ */ P(be, { value: e, children: c }),
266
267
  [e]
267
268
  );
268
- const [j, M] = J(!1), C = je(!1);
269
+ const [H, T] = J(!1), C = He(!1);
269
270
  ne(() => {
270
271
  const c = C.current;
271
- C.current = !1, !c && M(!1);
272
+ C.current = !1, !c && T(!1);
272
273
  }, [x]);
273
- const N = e.useState((c) => {
274
+ const F = e.useState((c) => {
274
275
  var d;
275
276
  return (d = c.labelElement) == null ? void 0 : d.id;
276
- }), i = n["aria-label"], h = n["aria-labelledby"] || N, _ = e.useState((c) => {
277
- if (t)
277
+ }), i = s["aria-label"], h = s["aria-labelledby"] || F, L = e.useState((c) => {
278
+ if (r)
278
279
  return c.items;
279
- }), A = ae(() => [...new Set(_ == null ? void 0 : _.map((c) => c.value).filter((c) => c != null))], [_]);
280
- n = X(
281
- n,
282
- (c) => t ? /* @__PURE__ */ oe(ve, { children: [
280
+ }), A = ae(() => [...new Set(L == null ? void 0 : L.map((c) => c.value).filter((c) => c != null))], [L]);
281
+ s = X(
282
+ s,
283
+ (c) => r ? /* @__PURE__ */ oe(ve, { children: [
283
284
  /* @__PURE__ */ oe(
284
285
  "select",
285
286
  {
@@ -298,19 +299,19 @@ var yt = R(function(o) {
298
299
  "aria-hidden": !0,
299
300
  "aria-label": i,
300
301
  "aria-labelledby": h,
301
- name: t,
302
+ name: r,
302
303
  form: a,
303
304
  required: m,
304
- disabled: n.disabled,
305
+ disabled: s.disabled,
305
306
  value: x,
306
- multiple: D,
307
+ multiple: k,
307
308
  onFocus: () => {
308
309
  var d;
309
310
  return (d = e == null ? void 0 : e.getState().selectElement) == null ? void 0 : d.focus();
310
311
  },
311
312
  onChange: (d) => {
312
- C.current = !0, M(!0), e == null || e.setValue(
313
- D ? wt(d.target) : d.target.value
313
+ C.current = !0, T(!0), e == null || e.setValue(
314
+ k ? Pt(d.target) : d.target.value
314
315
  );
315
316
  },
316
317
  children: [
@@ -325,55 +326,69 @@ var yt = R(function(o) {
325
326
  e,
326
327
  i,
327
328
  h,
328
- t,
329
+ r,
329
330
  a,
330
331
  m,
331
332
  x,
332
- D,
333
+ k,
333
334
  A,
334
- n.disabled
335
+ s.disabled
335
336
  ]
336
337
  );
337
- const B = /* @__PURE__ */ oe(ve, { children: [
338
+ const $ = /* @__PURE__ */ oe(ve, { children: [
338
339
  x,
339
- /* @__PURE__ */ P(ht, {})
340
+ /* @__PURE__ */ P(wt, {})
340
341
  ] }), Q = e.useState("contentElement");
341
- return n = I(p({
342
+ return s = I(p({
342
343
  role: "combobox",
343
344
  "aria-autocomplete": "none",
344
- "aria-labelledby": N,
345
+ "aria-labelledby": F,
345
346
  "aria-haspopup": ke(Q, "listbox"),
346
- "data-autofill": j || void 0,
347
- "data-name": t,
348
- children: B
349
- }, n), {
350
- ref: he(e.setSelectElement, n.ref),
351
- onKeyDown: L
352
- }), n = Ue(p({ store: e, toggleOnClick: l }, n)), n = we(p({ store: e }, n)), n;
353
- }), Xt = F(function(o) {
354
- const r = yt(o);
355
- return H(gt, r);
347
+ "data-autofill": H || void 0,
348
+ "data-name": r,
349
+ children: $
350
+ }, s), {
351
+ ref: he(e.setSelectElement, s.ref),
352
+ onKeyDown: R
353
+ }), s = Be(p({ store: e, toggleOnClick: l }, s)), s = we(p({ store: e }, s)), s;
354
+ }), ro = _(function(t) {
355
+ const o = Et(t);
356
+ return V(yt, o);
356
357
  });
357
- function Yt(s = {}) {
358
- const o = ft(s);
359
- return /* @__PURE__ */ P(xe, { value: o, children: s.children });
358
+ function no(n = {}) {
359
+ const t = bt(n);
360
+ return /* @__PURE__ */ P(xe, { value: t, children: n.children });
360
361
  }
361
- var Pt = "div";
362
- function Et(s, o) {
363
- if (o != null)
364
- return s == null ? !1 : Array.isArray(s) ? s.includes(o) : s === o;
362
+ var xt = "div", Ot = D(
363
+ function(t) {
364
+ return t = nt(t), t;
365
+ }
366
+ ), so = _(function(t) {
367
+ const o = Ot(t);
368
+ return V(xt, o);
369
+ }), Ct = "div", It = D(
370
+ function(t) {
371
+ return t = st(t), t;
372
+ }
373
+ ), lo = _(function(t) {
374
+ const o = It(t);
375
+ return V(Ct, o);
376
+ }), At = "div";
377
+ function Dt(n, t) {
378
+ if (t != null)
379
+ return n == null ? !1 : Array.isArray(n) ? n.includes(t) : n === t;
365
380
  }
366
- var xt = R(
367
- function(o) {
368
- var r = o, {
381
+ var _t = D(
382
+ function(t) {
383
+ var o = t, {
369
384
  store: e,
370
- value: t,
385
+ value: r,
371
386
  getItem: a,
372
387
  hideOnClick: m,
373
- setValueOnClick: S = t != null,
388
+ setValueOnClick: S = r != null,
374
389
  preventScrollOnKeyDown: E = !0,
375
390
  focusOnHover: u = !0
376
- } = r, l = T(r, [
391
+ } = o, l = G(o, [
377
392
  "store",
378
393
  "value",
379
394
  "getItem",
@@ -381,36 +396,36 @@ var xt = R(
381
396
  "setValueOnClick",
382
397
  "preventScrollOnKeyDown",
383
398
  "focusOnHover"
384
- ]), n;
399
+ ]), s;
385
400
  const f = Oe();
386
401
  e = e || f, Y(
387
402
  e,
388
403
  process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
389
404
  );
390
- const b = ge(l.id), w = Le(l), { listElement: g, multiSelectable: K, selected: y, autoFocus: x } = rt(e, {
405
+ const b = ge(l.id), w = Ke(l), { listElement: g, multiSelectable: M, selected: y, autoFocus: x } = rt(e, {
391
406
  listElement: "listElement",
392
407
  multiSelectable(i) {
393
408
  return Array.isArray(i.value);
394
409
  },
395
410
  selected(i) {
396
- return Et(i.value, t);
411
+ return Dt(i.value, r);
397
412
  },
398
413
  autoFocus(i) {
399
- return t == null || i.value == null || i.activeId !== b && (e != null && e.item(i.activeId)) ? !1 : Array.isArray(i.value) ? i.value[i.value.length - 1] === t : i.value === t;
414
+ return r == null || i.value == null || i.activeId !== b && (e != null && e.item(i.activeId)) ? !1 : Array.isArray(i.value) ? i.value[i.value.length - 1] === r : i.value === r;
400
415
  }
401
- }), D = Be(
416
+ }), k = $e(
402
417
  (i) => {
403
418
  const h = I(p({}, i), {
404
- value: w ? void 0 : t,
405
- children: t
419
+ value: w ? void 0 : r,
420
+ children: r
406
421
  });
407
422
  return a ? a(h) : h;
408
423
  },
409
- [w, t, a]
424
+ [w, r, a]
410
425
  );
411
- m = m ?? (t != null && !K);
412
- const L = l.onClick, j = k(S), M = k(m), C = le((i) => {
413
- L == null || L(i), !i.defaultPrevented && (Me(i) || Ne(i) || (j(i) && t != null && (e == null || e.setValue((h) => Array.isArray(h) ? h.includes(t) ? h.filter((_) => _ !== t) : [...h, t] : t)), M(i) && (e == null || e.hide())));
426
+ m = m ?? (r != null && !M);
427
+ const R = l.onClick, H = N(S), T = N(m), C = le((i) => {
428
+ R == null || R(i), !i.defaultPrevented && (Ne(i) || Me(i) || (H(i) && r != null && (e == null || e.setValue((h) => Array.isArray(h) ? h.includes(r) ? h.filter((L) => L !== r) : [...h, r] : r)), T(i) && (e == null || e.hide())));
414
429
  });
415
430
  l = X(
416
431
  l,
@@ -420,44 +435,44 @@ var xt = R(
420
435
  id: b,
421
436
  role: Re(g),
422
437
  "aria-selected": y,
423
- children: t
438
+ children: r
424
439
  }, l), {
425
- autoFocus: (n = l.autoFocus) != null ? n : x,
440
+ autoFocus: (s = l.autoFocus) != null ? s : x,
426
441
  onClick: C
427
- }), l = st(p({
442
+ }), l = at(p({
428
443
  store: e,
429
- getItem: D,
444
+ getItem: k,
430
445
  preventScrollOnKeyDown: E
431
446
  }, l));
432
- const N = k(u);
433
- return l = nt(I(p({
447
+ const F = N(u);
448
+ return l = lt(I(p({
434
449
  store: e
435
450
  }, l), {
436
451
  // We have to disable focusOnHover when the popup is closed, otherwise
437
452
  // the active item will change to null (the container) when the popup is
438
453
  // closed by clicking on an item.
439
454
  focusOnHover(i) {
440
- if (!N(i)) return !1;
455
+ if (!F(i)) return !1;
441
456
  const h = e == null ? void 0 : e.getState();
442
457
  return !!(h != null && h.open);
443
458
  }
444
459
  })), l;
445
460
  }
446
- ), Qt = Ke(
447
- F(function(o) {
448
- const r = xt(o);
449
- return H(Pt, r);
461
+ ), ao = Le(
462
+ _(function(t) {
463
+ const o = _t(t);
464
+ return V(At, o);
450
465
  })
451
- ), Ot = "div", fe = $e(null), Ee = R(
452
- function(o) {
453
- var r = o, {
466
+ ), Vt = "div", fe = je(null), Ee = D(
467
+ function(t) {
468
+ var o = t, {
454
469
  store: e,
455
- resetOnEscape: t = !0,
470
+ resetOnEscape: r = !0,
456
471
  hideOnEnter: a = !0,
457
472
  focusOnMove: m = !0,
458
473
  composite: S,
459
474
  alwaysVisible: E
460
- } = r, u = T(r, [
475
+ } = o, u = G(o, [
461
476
  "store",
462
477
  "resetOnEscape",
463
478
  "hideOnEnter",
@@ -470,73 +485,75 @@ var xt = R(
470
485
  e,
471
486
  process.env.NODE_ENV !== "production" && "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
472
487
  );
473
- const n = ge(u.id), f = e.useState("value"), b = Array.isArray(f), [w, g] = J(f), K = e.useState("mounted");
488
+ const s = ge(u.id), f = e.useState("value"), b = Array.isArray(f), [w, g] = J(f), M = e.useState("mounted");
474
489
  ne(() => {
475
- K || g(f);
476
- }, [K, f]), t = t && !b;
477
- const y = u.onKeyDown, x = k(t), D = k(a), L = le((v) => {
478
- y == null || y(v), !v.defaultPrevented && (v.key === "Escape" && x(v) && (e == null || e.setValue(w)), (v.key === " " || v.key === "Enter") && Te(v) && D(v) && (v.preventDefault(), e == null || e.hide()));
479
- }), j = me(de), M = J(), [C, N] = j || M, i = ae(
480
- () => [C, N],
490
+ M || g(f);
491
+ }, [M, f]), r = r && !b;
492
+ const y = u.onKeyDown, x = N(r), k = N(a), R = le((v) => {
493
+ y == null || y(v), !v.defaultPrevented && (v.key === "Escape" && x(v) && (e == null || e.setValue(w)), (v.key === " " || v.key === "Enter") && Te(v) && k(v) && (v.preventDefault(), e == null || e.hide()));
494
+ }), H = me(de), T = J(), [C, F] = H || T, i = ae(
495
+ () => [C, F],
481
496
  [C]
482
- ), [h, _] = J(null), A = me(fe);
497
+ ), [h, L] = J(null), A = me(fe);
483
498
  ne(() => {
484
499
  if (A)
485
500
  return A(e), () => A(null);
486
501
  }, [A, e]), u = X(
487
502
  u,
488
- (v) => /* @__PURE__ */ P(be, { value: e, children: /* @__PURE__ */ P(fe.Provider, { value: _, children: /* @__PURE__ */ P(de.Provider, { value: i, children: v }) }) }),
503
+ (v) => /* @__PURE__ */ P(be, { value: e, children: /* @__PURE__ */ P(fe.Provider, { value: L, children: /* @__PURE__ */ P(de.Provider, { value: i, children: v }) }) }),
489
504
  [e, i]
490
505
  );
491
- const B = !!e.combobox;
492
- S = S ?? (!B && h !== e);
506
+ const $ = !!e.combobox;
507
+ S = S ?? (!$ && h !== e);
493
508
  const [Q, c] = Fe(
494
509
  S ? e.setListElement : null
495
- ), d = He(Q, "role", u.role), ee = (S || (d === "listbox" || d === "menu" || d === "tree" || d === "grid")) && b || void 0, $ = lt(K, u.hidden, E), U = $ ? I(p({}, u.style), { display: "none" }) : u.style;
510
+ ), d = Ge(Q, "role", u.role), ee = (S || (d === "listbox" || d === "menu" || d === "tree" || d === "grid")) && b || void 0, j = it(M, u.hidden, E), B = j ? I(p({}, u.style), { display: "none" }) : u.style;
496
511
  S && (u = p({
497
512
  role: "listbox",
498
513
  "aria-multiselectable": ee
499
514
  }, u));
500
- const q = e.useState(
515
+ const U = e.useState(
501
516
  (v) => {
502
517
  var te;
503
518
  return C || ((te = v.labelElement) == null ? void 0 : te.id);
504
519
  }
505
520
  );
506
521
  return u = I(p({
507
- id: n,
508
- "aria-labelledby": q,
509
- hidden: $
522
+ id: s,
523
+ "aria-labelledby": U,
524
+ hidden: j
510
525
  }, u), {
511
526
  ref: he(c, u.ref),
512
- style: U,
513
- onKeyDown: L
514
- }), u = at(I(p({ store: e }, u), { composite: S })), u = we(p({ store: e, typeahead: !B }, u)), u;
527
+ style: B,
528
+ onKeyDown: R
529
+ }), u = ut(I(p({ store: e }, u), { composite: S })), u = we(p({ store: e, typeahead: !$ }, u)), u;
515
530
  }
516
- ), Zt = F(function(o) {
517
- const r = Ee(o);
518
- return H(Ot, r);
519
- }), Ct = "div", It = R(
520
- function(o) {
521
- var r = o, { store: e, alwaysVisible: t } = r, a = T(r, ["store", "alwaysVisible"]);
531
+ ), io = _(function(t) {
532
+ const o = Ee(t);
533
+ return V(Vt, o);
534
+ }), kt = "div", Lt = D(
535
+ function(t) {
536
+ var o = t, { store: e, alwaysVisible: r } = o, a = G(o, ["store", "alwaysVisible"]);
522
537
  const m = se();
523
- return e = e || m, a = Ee(p({ store: e, alwaysVisible: t }, a)), a = ut(p({ store: e, alwaysVisible: t }, a)), a;
538
+ return e = e || m, a = Ee(p({ store: e, alwaysVisible: r }, a)), a = dt(p({ store: e, alwaysVisible: r }, a)), a;
524
539
  }
525
- ), eo = it(
526
- F(function(o) {
527
- const r = It(o);
528
- return H(Ct, r);
540
+ ), uo = ct(
541
+ _(function(t) {
542
+ const o = Lt(t);
543
+ return V(kt, o);
529
544
  }),
530
545
  se
531
546
  );
532
547
  export {
533
- Jt as P,
534
- Yt as S,
535
- Xt as a,
536
- eo as b,
537
- Zt as c,
538
- Qt as d,
539
- ht as e,
540
- ft as f,
548
+ oo as P,
549
+ no as S,
550
+ ro as a,
551
+ uo as b,
552
+ io as c,
553
+ lo as d,
554
+ so as e,
555
+ ao as f,
556
+ wt as g,
557
+ bt as h,
541
558
  Pe as u
542
559
  };