welcome-ui 8.0.0 → 8.0.3

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 (90) hide show
  1. package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
  2. package/dist/Accordion.mjs +17 -17
  3. package/dist/Alert.mjs +19 -19
  4. package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
  5. package/dist/Badge.mjs +1 -1
  6. package/dist/Breadcrumb.mjs +27 -26
  7. package/dist/Button.mjs +2 -2
  8. package/dist/Checkbox.mjs +1 -1
  9. package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
  10. package/dist/DatePicker.mjs +4 -4
  11. package/dist/DateTimePicker.mjs +9 -9
  12. package/dist/DateTimePickerCommon.mjs +1 -1
  13. package/dist/Drawer.mjs +7 -7
  14. package/dist/DropdownMenu.mjs +262 -262
  15. package/dist/Field.mjs +25 -25
  16. package/dist/FileDrop.mjs +273 -267
  17. package/dist/FileUpload.mjs +26 -26
  18. package/dist/Files.mjs +1 -1
  19. package/dist/Hint.mjs +1 -1
  20. package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
  21. package/dist/Icons.mjs +88 -88
  22. package/dist/IconsFont.mjs +159 -159
  23. package/dist/InputText.mjs +1 -1
  24. package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
  25. package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
  26. package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
  27. package/dist/Label.mjs +2 -2
  28. package/dist/Link.mjs +3 -3
  29. package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
  30. package/dist/Modal.mjs +13 -13
  31. package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
  32. package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
  33. package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
  34. package/dist/Pagination.mjs +22 -22
  35. package/dist/Picker.mjs +2 -2
  36. package/dist/Popover.mjs +2 -2
  37. package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
  38. package/dist/Radio.mjs +18 -18
  39. package/dist/RadioGroup.mjs +15 -15
  40. package/dist/RadioTab.mjs +9 -9
  41. package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
  42. package/dist/Search.mjs +2 -2
  43. package/dist/Select.mjs +719 -716
  44. package/dist/Shape.mjs +1 -1
  45. package/dist/Slider.mjs +1 -1
  46. package/dist/Swiper.mjs +284 -278
  47. package/dist/Tabs.mjs +128 -128
  48. package/dist/Tag.mjs +16 -16
  49. package/dist/Text.mjs +1 -1
  50. package/dist/Textarea.mjs +4 -4
  51. package/dist/TimePicker.mjs +6 -6
  52. package/dist/Toast.mjs +69 -69
  53. package/dist/Toggle.mjs +2 -2
  54. package/dist/Tooltip.mjs +60 -60
  55. package/dist/UniversalLink.mjs +8 -8
  56. package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
  57. package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
  58. package/dist/VariantIcon.mjs +4 -4
  59. package/dist/WelcomeLoader.mjs +4862 -9223
  60. package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
  61. package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
  62. package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
  63. package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  64. package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
  65. package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
  66. package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
  67. package/dist/index-BhcLigYU.mjs +77 -0
  68. package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
  69. package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
  70. package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
  71. package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
  72. package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
  73. package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
  74. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  75. package/dist/theme.mjs +670 -615
  76. package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
  77. package/dist/utils.mjs +29 -91
  78. package/package.json +13 -13
  79. package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
  80. package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
  81. package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
  82. package/dist/NLEBE274-C94QU78N.mjs +0 -84
  83. package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
  84. package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
  85. package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
  86. package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
  87. package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
  88. package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
  89. package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
  90. package/dist/radio-group-CGC6DTFJ.mjs +0 -51
@@ -1,46 +1,46 @@
1
1
  "use client";
2
- import { t as de, c as X, s as $, i as fe, g as Z, b as B, d as me } from "./YV4JVR4I-BGfUf3Nu.mjs";
3
- import { C as F, B as j, Q as Ie, D as T, I as ve, R as ge, H as Se, c as pe, _ as ie, i as Ee, S as ye, T as we, F as ee, U as O, V as be, W as he, b as H, m as z, u as xe, n as ue, E as _e, t as Fe, d as Pe, e as Ce, g as te, r as Ae, f as ke, h as Be, X as Re } from "./LVA2YJMS-qFC9J-lt.mjs";
4
- import { b as De, g as L, s as Ke, i as Q, a as Le, f as Te, c as Me } from "./P2CTZE2T-YPes1GXe.mjs";
5
- import { useRef as ne, useEffect as oe, useState as Oe, useCallback as ze } from "react";
2
+ import { t as de, c as X, s as $, i as fe, g as Z, b as B, d as me } from "./YV4JVR4I-Bh7B7TET.mjs";
3
+ import { C as F, B as j, Q as ve, D as T, R as Ie, I as ge, H as Se, c as pe, _ as se, i as Ee, S as ye, T as we, F as ee, U as O, V as be, W as he, b as H, o as z, u as xe, p as ie, E as _e, t as Fe, d as Pe, e as Ce, g as te, m as Ae, X as ke, f as Be, h as Re } from "./LVA2YJMS-DDEmK0pp.mjs";
4
+ import { b as De, g as L, s as Ke, i as Q, a as Le, f as Te, c as Me } from "./P2CTZE2T-Cl2w7OLV.mjs";
5
+ import { useRef as ne, useEffect as ue, useState as Oe, useCallback as ze } from "react";
6
6
  function We(e) {
7
- var i;
7
+ var s;
8
8
  const n = e.find((c) => !!c.element), t = [...e].reverse().find((c) => !!c.element);
9
- let u = (i = n == null ? void 0 : n.element) == null ? void 0 : i.parentElement;
10
- for (; u && (t != null && t.element); ) {
11
- if (t && u.contains(t.element))
12
- return u;
13
- u = u.parentElement;
9
+ let i = (s = n == null ? void 0 : n.element) == null ? void 0 : s.parentElement;
10
+ for (; i && (t != null && t.element); ) {
11
+ if (t && i.contains(t.element))
12
+ return i;
13
+ i = i.parentElement;
14
14
  }
15
- return ve(u).body;
15
+ return ge(i).body;
16
16
  }
17
17
  function Ve(e) {
18
18
  return e == null ? void 0 : e.__unstablePrivateStore;
19
19
  }
20
20
  function He(e = {}) {
21
- var i;
21
+ var s;
22
22
  de(e, e.store);
23
- const n = (i = e.store) == null ? void 0 : i.getState(), t = F(
23
+ const n = (s = e.store) == null ? void 0 : s.getState(), t = F(
24
24
  e.items,
25
25
  n == null ? void 0 : n.items,
26
26
  e.defaultItems,
27
27
  []
28
- ), u = new Map(t.map((o) => [o.id, o])), c = {
28
+ ), i = new Map(t.map((u) => [u.id, u])), c = {
29
29
  items: t,
30
30
  renderedItems: F(n == null ? void 0 : n.renderedItems, [])
31
31
  }, l = Ve(e.store), a = X(
32
32
  { items: t, renderedItems: c.renderedItems },
33
33
  l
34
- ), r = X(c, e.store), x = (o) => {
35
- const f = ge(o, (m) => m.element);
34
+ ), r = X(c, e.store), x = (u) => {
35
+ const f = Ie(u, (m) => m.element);
36
36
  a.setState("renderedItems", f), r.setState("renderedItems", f);
37
37
  };
38
- $(r, () => fe(a)), $(a, () => Z(a, ["items"], (o) => {
39
- r.setState("items", o.items);
40
- })), $(a, () => Z(a, ["renderedItems"], (o) => {
38
+ $(r, () => fe(a)), $(a, () => Z(a, ["items"], (u) => {
39
+ r.setState("items", u.items);
40
+ })), $(a, () => Z(a, ["renderedItems"], (u) => {
41
41
  let f = !0, m = requestAnimationFrame(() => {
42
42
  const { renderedItems: S } = r.getState();
43
- o.renderedItems !== S && x(o.renderedItems);
43
+ u.renderedItems !== S && x(u.renderedItems);
44
44
  });
45
45
  if (typeof IntersectionObserver != "function")
46
46
  return () => cancelAnimationFrame(m);
@@ -49,55 +49,55 @@ function He(e = {}) {
49
49
  f = !1;
50
50
  return;
51
51
  }
52
- cancelAnimationFrame(m), m = requestAnimationFrame(() => x(o.renderedItems));
53
- }, D = We(o.renderedItems), g = new IntersectionObserver(w, { root: D });
54
- for (const S of o.renderedItems)
52
+ cancelAnimationFrame(m), m = requestAnimationFrame(() => x(u.renderedItems));
53
+ }, D = We(u.renderedItems), g = new IntersectionObserver(w, { root: D });
54
+ for (const S of u.renderedItems)
55
55
  S.element && g.observe(S.element);
56
56
  return () => {
57
57
  cancelAnimationFrame(m), g.disconnect();
58
58
  };
59
59
  }));
60
- const v = (o, f, m = !1) => {
60
+ const v = (u, f, m = !1) => {
61
61
  let w;
62
62
  return f((g) => {
63
- const S = g.findIndex(({ id: b }) => b === o.id), P = g.slice();
63
+ const S = g.findIndex(({ id: b }) => b === u.id), P = g.slice();
64
64
  if (S !== -1) {
65
65
  w = g[S];
66
- const b = T(T({}, w), o);
67
- P[S] = b, u.set(o.id, b);
66
+ const b = T(T({}, w), u);
67
+ P[S] = b, i.set(u.id, b);
68
68
  } else
69
- P.push(o), u.set(o.id, o);
69
+ P.push(u), i.set(u.id, u);
70
70
  return P;
71
71
  }), () => {
72
72
  f((g) => {
73
73
  if (!w)
74
- return m && u.delete(o.id), g.filter(({ id: b }) => b !== o.id);
75
- const S = g.findIndex(({ id: b }) => b === o.id);
74
+ return m && i.delete(u.id), g.filter(({ id: b }) => b !== u.id);
75
+ const S = g.findIndex(({ id: b }) => b === u.id);
76
76
  if (S === -1) return g;
77
77
  const P = g.slice();
78
- return P[S] = w, u.set(o.id, w), P;
78
+ return P[S] = w, i.set(u.id, w), P;
79
79
  });
80
80
  };
81
- }, K = (o) => v(
82
- o,
81
+ }, K = (u) => v(
82
+ u,
83
83
  (f) => a.setState("items", f),
84
84
  !0
85
85
  );
86
86
  return j(T({}, r), {
87
87
  registerItem: K,
88
- renderItem: (o) => Ie(
89
- K(o),
88
+ renderItem: (u) => ve(
89
+ K(u),
90
90
  v(
91
- o,
91
+ u,
92
92
  (f) => a.setState("renderedItems", f)
93
93
  )
94
94
  ),
95
- item: (o) => {
96
- if (!o) return null;
97
- let f = u.get(o);
95
+ item: (u) => {
96
+ if (!u) return null;
97
+ let f = i.get(u);
98
98
  if (!f) {
99
99
  const { items: m } = a.getState();
100
- f = m.find((w) => w.id === o), f && u.set(o, f);
100
+ f = m.find((w) => w.id === u), f && i.set(u, f);
101
101
  }
102
102
  return f || null;
103
103
  },
@@ -105,30 +105,30 @@ function He(e = {}) {
105
105
  __unstablePrivateStore: a
106
106
  });
107
107
  }
108
- function Ne(e, i, n) {
109
- return Se(i, [n.store]), B(e, n, "items", "setItems"), e;
108
+ function Ne(e, s, n) {
109
+ return Se(s, [n.store]), B(e, n, "items", "setItems"), e;
110
110
  }
111
111
  function ae(e) {
112
- const i = [];
112
+ const s = [];
113
113
  for (const n of e)
114
- i.push(...n);
115
- return i;
114
+ s.push(...n);
115
+ return s;
116
116
  }
117
117
  function Y(e) {
118
118
  return e.slice().reverse();
119
119
  }
120
120
  var Ue = { id: null };
121
- function R(e, i) {
122
- return e.find((n) => i ? !n.disabled && n.id !== i : !n.disabled);
121
+ function R(e, s) {
122
+ return e.find((n) => s ? !n.disabled && n.id !== s : !n.disabled);
123
123
  }
124
- function $e(e, i) {
125
- return e.filter((n) => i ? !n.disabled && n.id !== i : !n.disabled);
124
+ function $e(e, s) {
125
+ return e.filter((n) => s ? !n.disabled && n.id !== s : !n.disabled);
126
126
  }
127
- function re(e, i) {
128
- return e.filter((n) => n.rowId === i);
127
+ function re(e, s) {
128
+ return e.filter((n) => n.rowId === s);
129
129
  }
130
- function je(e, i, n = !1) {
131
- const t = e.findIndex((u) => u.id === i);
130
+ function je(e, s, n = !1) {
131
+ const t = e.findIndex((i) => i.id === s);
132
132
  return [
133
133
  ...e.slice(t + 1),
134
134
  ...n ? [Ue] : [],
@@ -136,21 +136,21 @@ function je(e, i, n = !1) {
136
136
  ];
137
137
  }
138
138
  function ce(e) {
139
- const i = [];
139
+ const s = [];
140
140
  for (const n of e) {
141
- const t = i.find((u) => {
141
+ const t = s.find((i) => {
142
142
  var c;
143
- return ((c = u[0]) == null ? void 0 : c.rowId) === n.rowId;
143
+ return ((c = i[0]) == null ? void 0 : c.rowId) === n.rowId;
144
144
  });
145
- t ? t.push(n) : i.push([n]);
145
+ t ? t.push(n) : s.push([n]);
146
146
  }
147
- return i;
147
+ return s;
148
148
  }
149
149
  function le(e) {
150
- let i = 0;
150
+ let s = 0;
151
151
  for (const { length: n } of e)
152
- n > i && (i = n);
153
- return i;
152
+ n > s && (s = n);
153
+ return s;
154
154
  }
155
155
  function qe(e) {
156
156
  return {
@@ -159,37 +159,37 @@ function qe(e) {
159
159
  rowId: e
160
160
  };
161
161
  }
162
- function Ge(e, i, n) {
162
+ function Ge(e, s, n) {
163
163
  const t = le(e);
164
- for (const u of e)
164
+ for (const i of e)
165
165
  for (let c = 0; c < t; c += 1) {
166
- const l = u[c];
166
+ const l = i[c];
167
167
  if (!l || n && l.disabled) {
168
- const r = c === 0 && n ? R(u) : u[c - 1];
169
- u[c] = r && i !== r.id && n ? r : qe(r == null ? void 0 : r.rowId);
168
+ const r = c === 0 && n ? R(i) : i[c - 1];
169
+ i[c] = r && s !== r.id && n ? r : qe(r == null ? void 0 : r.rowId);
170
170
  }
171
171
  }
172
172
  return e;
173
173
  }
174
174
  function Qe(e) {
175
- const i = ce(e), n = le(i), t = [];
176
- for (let u = 0; u < n; u += 1)
177
- for (const c of i) {
178
- const l = c[u];
175
+ const s = ce(e), n = le(s), t = [];
176
+ for (let i = 0; i < n; i += 1)
177
+ for (const c of s) {
178
+ const l = c[i];
179
179
  l && t.push(j(T({}, l), {
180
180
  // If there's no rowId, it means that it's not a grid composite, but
181
181
  // a single row instead. So, instead of verticalizing it, that is,
182
182
  // assigning a different rowId based on the column index, we keep it
183
183
  // undefined so they will be part of the same row. This is useful
184
184
  // when using up/down on one-dimensional composites.
185
- rowId: l.rowId ? `${u}` : void 0
185
+ rowId: l.rowId ? `${i}` : void 0
186
186
  }));
187
187
  }
188
188
  return t;
189
189
  }
190
190
  function lt(e = {}) {
191
- var i;
192
- const n = (i = e.store) == null ? void 0 : i.getState(), t = He(e), u = F(
191
+ var s;
192
+ const n = (s = e.store) == null ? void 0 : s.getState(), t = He(e), i = F(
193
193
  e.activeId,
194
194
  n == null ? void 0 : n.activeId,
195
195
  e.defaultActiveId
@@ -199,12 +199,12 @@ function lt(e = {}) {
199
199
  n == null ? void 0 : n.id,
200
200
  `id-${Math.random().toString(36).slice(2, 8)}`
201
201
  ),
202
- activeId: u,
202
+ activeId: i,
203
203
  baseElement: F(n == null ? void 0 : n.baseElement, null),
204
204
  includesBaseElement: F(
205
205
  e.includesBaseElement,
206
206
  n == null ? void 0 : n.includesBaseElement,
207
- u === null
207
+ i === null
208
208
  ),
209
209
  moves: F(n == null ? void 0 : n.moves, 0),
210
210
  orientation: F(
@@ -233,15 +233,15 @@ function lt(e = {}) {
233
233
  );
234
234
  const a = (r = "next", x = {}) => {
235
235
  var v, K;
236
- const o = l.getState(), {
236
+ const u = l.getState(), {
237
237
  skip: f = 0,
238
- activeId: m = o.activeId,
239
- focusShift: w = o.focusShift,
240
- focusLoop: D = o.focusLoop,
241
- focusWrap: g = o.focusWrap,
242
- includesBaseElement: S = o.includesBaseElement,
243
- renderedItems: P = o.renderedItems,
244
- rtl: b = o.rtl
238
+ activeId: m = u.activeId,
239
+ focusShift: w = u.focusShift,
240
+ focusLoop: D = u.focusLoop,
241
+ focusWrap: g = u.focusWrap,
242
+ includesBaseElement: S = u.includesBaseElement,
243
+ renderedItems: P = u.renderedItems,
244
+ rtl: b = u.rtl
245
245
  } = x, C = r === "up" || r === "down", W = r === "next" || r === "down", q = W ? b && !C : !b || C, N = w && !f;
246
246
  let p = C ? ae(
247
247
  Ge(ce(P), m, N)
@@ -251,7 +251,7 @@ function lt(e = {}) {
251
251
  const M = p.find((I) => I.id === m);
252
252
  if (!M)
253
253
  return (K = R(p)) == null ? void 0 : K.id;
254
- const U = p.some((I) => I.rowId), G = p.indexOf(M), s = p.slice(G + 1), d = re(s, M.rowId);
254
+ const U = p.some((I) => I.rowId), G = p.indexOf(M), o = p.slice(G + 1), d = re(o, M.rowId);
255
255
  if (f) {
256
256
  const I = $e(d, m), h = I.slice(f)[0] || // If we can't find an item, just return the last one.
257
257
  I[I.length - 1];
@@ -270,7 +270,7 @@ function lt(e = {}) {
270
270
  // the row. So moving next from the last item will focus on the
271
271
  // composite container. On grid composites, horizontal navigation never
272
272
  // focuses on the composite container, only vertical.
273
- _ ? d : s,
273
+ _ ? d : o,
274
274
  m
275
275
  );
276
276
  return _ ? (I == null ? void 0 : I.id) || null : I == null ? void 0 : I.id;
@@ -298,28 +298,28 @@ function lt(e = {}) {
298
298
  up: (r) => (r !== void 0 && typeof r == "number" && (r = { skip: r }), a("up", r))
299
299
  });
300
300
  }
301
- function dt(e, i, n) {
302
- return e = Ne(e, i, n), B(e, n, "activeId", "setActiveId"), B(e, n, "includesBaseElement"), B(e, n, "virtualFocus"), B(e, n, "orientation"), B(e, n, "rtl"), B(e, n, "focusLoop"), B(e, n, "focusWrap"), B(e, n, "focusShift"), e;
301
+ function dt(e, s, n) {
302
+ return e = Ne(e, s, n), B(e, n, "activeId", "setActiveId"), B(e, n, "includesBaseElement"), B(e, n, "virtualFocus"), B(e, n, "orientation"), B(e, n, "rtl"), B(e, n, "focusLoop"), B(e, n, "focusWrap"), B(e, n, "focusShift"), e;
303
303
  }
304
304
  var Xe = "div";
305
305
  function Ye(e) {
306
- return e.some((i) => !!i.rowId);
306
+ return e.some((s) => !!s.rowId);
307
307
  }
308
308
  function Je(e) {
309
- const i = e.target;
310
- return i && !ue(i) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
309
+ const s = e.target;
310
+ return s && !ie(s) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
311
311
  }
312
312
  function Ze(e) {
313
313
  return e.key === "Shift" || e.key === "Control" || e.key === "Alt" || e.key === "Meta";
314
314
  }
315
- function se(e, i, n) {
315
+ function oe(e, s, n) {
316
316
  return H((t) => {
317
- var u;
318
- if (i == null || i(t), t.defaultPrevented || t.isPropagationStopped() || !z(t) || Ze(t) || Je(t)) return;
319
- const c = e.getState(), l = (u = L(e, c.activeId)) == null ? void 0 : u.element;
317
+ var i;
318
+ if (s == null || s(t), t.defaultPrevented || t.isPropagationStopped() || !z(t) || Ze(t) || Je(t)) return;
319
+ const c = e.getState(), l = (i = L(e, c.activeId)) == null ? void 0 : i.element;
320
320
  if (!l) return;
321
- const a = t, r = ie(a, ["view"]), x = n == null ? void 0 : n.current;
322
- l !== x && l.focus(), Re(l, t.type, r) || t.preventDefault(), t.currentTarget.contains(l) && t.stopPropagation();
321
+ const a = t, { view: r } = a, x = se(a, ["view"]), v = n == null ? void 0 : n.current;
322
+ l !== v && l.focus(), ke(l, t.type, x) || t.preventDefault(), t.currentTarget.contains(l) && t.stopPropagation();
323
323
  });
324
324
  }
325
325
  function et(e) {
@@ -328,22 +328,22 @@ function et(e) {
328
328
  );
329
329
  }
330
330
  function tt(e) {
331
- const [i, n] = Oe(!1), t = ze(() => n(!0), []), u = e.useState(
331
+ const [s, n] = Oe(!1), t = ze(() => n(!0), []), i = e.useState(
332
332
  (c) => L(e, c.activeId)
333
333
  );
334
- return oe(() => {
335
- const c = u == null ? void 0 : u.element;
336
- i && c && (n(!1), c.focus({ preventScroll: !0 }));
337
- }, [u, i]), t;
334
+ return ue(() => {
335
+ const c = i == null ? void 0 : i.element;
336
+ s && c && (n(!1), c.focus({ preventScroll: !0 }));
337
+ }, [i, s]), t;
338
338
  }
339
339
  var nt = pe(
340
- function(i) {
341
- var n = i, {
340
+ function(s) {
341
+ var n = s, {
342
342
  store: t,
343
- composite: u = !0,
344
- focusOnMove: c = u,
343
+ composite: i = !0,
344
+ focusOnMove: c = i,
345
345
  moveOnKeyPress: l = !0
346
- } = n, a = ie(n, [
346
+ } = n, a = se(n, [
347
347
  "store",
348
348
  "composite",
349
349
  "focusOnMove",
@@ -354,62 +354,62 @@ var nt = pe(
354
354
  t,
355
355
  process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
356
356
  );
357
- const x = ne(null), v = ne(null), K = tt(t), o = t.useState("moves"), [, f] = ye(
358
- u ? t.setBaseElement : null
357
+ const x = ne(null), v = ne(null), K = tt(t), u = t.useState("moves"), [, f] = ye(
358
+ i ? t.setBaseElement : null
359
359
  );
360
- oe(() => {
361
- var s;
362
- if (!t || !o || !u || !c) return;
363
- const { activeId: d } = t.getState(), E = (s = L(t, d)) == null ? void 0 : s.element;
360
+ ue(() => {
361
+ var o;
362
+ if (!t || !u || !i || !c) return;
363
+ const { activeId: d } = t.getState(), E = (o = L(t, d)) == null ? void 0 : o.element;
364
364
  E && we(E);
365
- }, [t, o, u, c]), ee(() => {
366
- if (!t || !o || !u) return;
367
- const { baseElement: s, activeId: d } = t.getState();
368
- if (!(d === null) || !s) return;
365
+ }, [t, u, i, c]), ee(() => {
366
+ if (!t || !u || !i) return;
367
+ const { baseElement: o, activeId: d } = t.getState();
368
+ if (!(d === null) || !o) return;
369
369
  const y = v.current;
370
- v.current = null, y && O(y, { relatedTarget: s }), be(s) || s.focus();
371
- }, [t, o, u]);
370
+ v.current = null, y && O(y, { relatedTarget: o }), be(o) || o.focus();
371
+ }, [t, u, i]);
372
372
  const m = t.useState("activeId"), w = t.useState("virtualFocus");
373
373
  ee(() => {
374
- var s;
375
- if (!t || !u || !w) return;
374
+ var o;
375
+ if (!t || !i || !w) return;
376
376
  const d = v.current;
377
377
  if (v.current = null, !d) return;
378
- const y = ((s = L(t, m)) == null ? void 0 : s.element) || he(d);
378
+ const y = ((o = L(t, m)) == null ? void 0 : o.element) || he(d);
379
379
  y !== d && O(d, { relatedTarget: y });
380
- }, [t, m, w, u]);
381
- const D = se(
380
+ }, [t, m, w, i]);
381
+ const D = oe(
382
382
  t,
383
383
  a.onKeyDownCapture,
384
384
  v
385
- ), g = se(
385
+ ), g = oe(
386
386
  t,
387
387
  a.onKeyUpCapture,
388
388
  v
389
- ), S = a.onFocusCapture, P = H((s) => {
390
- if (S == null || S(s), s.defaultPrevented || !t) return;
389
+ ), S = a.onFocusCapture, P = H((o) => {
390
+ if (S == null || S(o), o.defaultPrevented || !t) return;
391
391
  const { virtualFocus: d } = t.getState();
392
392
  if (!d) return;
393
- const E = s.relatedTarget, y = Ke(s.currentTarget);
394
- z(s) && y && (s.stopPropagation(), v.current = E);
395
- }), b = a.onFocus, C = H((s) => {
396
- if (b == null || b(s), s.defaultPrevented || !u || !t) return;
397
- const { relatedTarget: d } = s, { virtualFocus: E } = t.getState();
398
- E ? z(s) && !Q(t, d) && queueMicrotask(K) : z(s) && t.setActiveId(null);
399
- }), W = a.onBlurCapture, q = H((s) => {
393
+ const E = o.relatedTarget, y = Ke(o.currentTarget);
394
+ z(o) && y && (o.stopPropagation(), v.current = E);
395
+ }), b = a.onFocus, C = H((o) => {
396
+ if (b == null || b(o), o.defaultPrevented || !i || !t) return;
397
+ const { relatedTarget: d } = o, { virtualFocus: E } = t.getState();
398
+ E ? z(o) && !Q(t, d) && queueMicrotask(K) : z(o) && t.setActiveId(null);
399
+ }), W = a.onBlurCapture, q = H((o) => {
400
400
  var d;
401
- if (W == null || W(s), s.defaultPrevented || !t) return;
401
+ if (W == null || W(o), o.defaultPrevented || !t) return;
402
402
  const { virtualFocus: E, activeId: y } = t.getState();
403
403
  if (!E) return;
404
- const _ = (d = L(t, y)) == null ? void 0 : d.element, A = s.relatedTarget, I = Q(t, A), h = v.current;
405
- v.current = null, z(s) && I ? (A === _ ? h && h !== A && O(h, s) : _ ? O(_, s) : h && O(h, s), s.stopPropagation()) : !Q(t, s.target) && _ && O(_, s);
406
- }), N = a.onKeyDown, p = xe(l), M = H((s) => {
404
+ const _ = (d = L(t, y)) == null ? void 0 : d.element, A = o.relatedTarget, I = Q(t, A), h = v.current;
405
+ v.current = null, z(o) && I ? (A === _ ? h && h !== A && O(h, o) : _ ? O(_, o) : h && O(h, o), o.stopPropagation()) : !Q(t, o.target) && _ && O(_, o);
406
+ }), N = a.onKeyDown, p = xe(l), M = H((o) => {
407
407
  var d;
408
- if (N == null || N(s), s.defaultPrevented || !t || !z(s)) return;
408
+ if (N == null || N(o), o.defaultPrevented || !t || !z(o)) return;
409
409
  const { orientation: E, renderedItems: y, activeId: _ } = t.getState(), A = L(t, _);
410
410
  if ((d = A == null ? void 0 : A.element) != null && d.isConnected) return;
411
411
  const I = E !== "horizontal", h = E !== "vertical", k = Ye(y);
412
- if ((s.key === "ArrowLeft" || s.key === "ArrowRight" || s.key === "Home" || s.key === "End") && ue(s.currentTarget)) return;
412
+ if ((o.key === "ArrowLeft" || o.key === "ArrowRight" || o.key === "Home" || o.key === "End") && ie(o.currentTarget)) return;
413
413
  const J = {
414
414
  ArrowUp: (k || I) && (() => {
415
415
  if (k) {
@@ -425,24 +425,24 @@ var nt = pe(
425
425
  End: t.last,
426
426
  PageUp: t.first,
427
427
  PageDown: t.last
428
- }[s.key];
428
+ }[o.key];
429
429
  if (J) {
430
430
  const V = J();
431
431
  if (V !== void 0) {
432
- if (!p(s)) return;
433
- s.preventDefault(), t.move(V);
432
+ if (!p(o)) return;
433
+ o.preventDefault(), t.move(V);
434
434
  }
435
435
  }
436
436
  });
437
437
  a = _e(
438
438
  a,
439
- (s) => /* @__PURE__ */ Fe.jsx(Le, { value: t, children: s }),
439
+ (o) => /* @__PURE__ */ Fe.jsx(Le, { value: t, children: o }),
440
440
  [t]
441
441
  );
442
- const U = t.useState((s) => {
442
+ const U = t.useState((o) => {
443
443
  var d;
444
- if (t && u && s.virtualFocus)
445
- return (d = L(t, s.activeId)) == null ? void 0 : d.id;
444
+ if (t && i && o.virtualFocus)
445
+ return (d = L(t, o.activeId)) == null ? void 0 : d.id;
446
446
  });
447
447
  a = Pe(te({
448
448
  "aria-activedescendant": U
@@ -456,14 +456,14 @@ var nt = pe(
456
456
  onKeyDown: M
457
457
  });
458
458
  const G = t.useState(
459
- (s) => u && (s.virtualFocus || s.activeId === null)
459
+ (o) => i && (o.virtualFocus || o.activeId === null)
460
460
  );
461
461
  return a = Ae(te({ focusable: G }, a)), a;
462
462
  }
463
463
  );
464
- ke(function(i) {
465
- const n = nt(i);
466
- return Be(Xe, n);
464
+ Be(function(s) {
465
+ const n = nt(s);
466
+ return Re(Xe, n);
467
467
  });
468
468
  export {
469
469
  nt as a,