welcome-ui 10.0.0-alpha.4 → 10.0.0-alpha.5

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 (127) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +19 -17
  4. package/dist/Alert.js +40 -31
  5. package/dist/AspectRatio.js +1 -0
  6. package/dist/Avatar.js +13 -11
  7. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  8. package/dist/Badge.js +1 -0
  9. package/dist/Breadcrumb.js +76 -71
  10. package/dist/Button.js +8 -6
  11. package/dist/ButtonGroup.js +6 -4
  12. package/dist/Card.css +1 -1
  13. package/dist/Card.js +68 -15
  14. package/dist/Checkbox.js +30 -29
  15. package/dist/CloseButton.js +7 -5
  16. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  17. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  18. package/dist/DatePicker.js +82 -78
  19. package/dist/DateTimePicker.js +22 -21
  20. package/dist/Drawer.js +101 -80
  21. package/dist/DropdownMenu.css +1 -1
  22. package/dist/DropdownMenu.js +889 -462
  23. package/dist/Field.js +1 -0
  24. package/dist/FieldGroup.js +9 -7
  25. package/dist/FileDrop.js +184 -176
  26. package/dist/FileUpload.js +43 -40
  27. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  28. package/dist/Hint.js +9 -7
  29. package/dist/Icon.js +6 -4
  30. package/dist/InputText.js +30 -28
  31. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  32. package/dist/Label.js +9 -7
  33. package/dist/Link.js +25 -21
  34. package/dist/Loader.js +12 -10
  35. package/dist/Logo.js +21 -13
  36. package/dist/Modal.js +145 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +39 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +89 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +20 -19
  46. package/dist/RadioGroup.js +29 -27
  47. package/dist/RadioTab.js +2 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +62 -60
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +204 -202
  54. package/dist/Slider.js +66 -61
  55. package/dist/Stepper.js +34 -27
  56. package/dist/StickyNote.js +30 -23
  57. package/dist/Swiper.js +52 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +34 -21
  60. package/dist/Tabs.js +161 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +70 -65
  63. package/dist/Text.js +4 -2
  64. package/dist/Textarea.js +10 -8
  65. package/dist/TimePicker.js +22 -21
  66. package/dist/Toast.js +186 -177
  67. package/dist/Toggle.js +16 -14
  68. package/dist/Tooltip.js +29 -27
  69. package/dist/VariantIcon.js +7 -5
  70. package/dist/VisuallyHidden.js +8 -6
  71. package/dist/WelcomeLoader.js +3 -2
  72. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  73. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  74. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  75. package/dist/theme.js +1 -0
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Loader/index.d.ts +4 -1
  102. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  108. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  109. package/dist/types/components/Modal/index.d.ts +16 -4
  110. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  111. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  112. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  113. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  114. package/dist/types/components/Stepper/index.d.ts +8 -2
  115. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  116. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  117. package/dist/types/components/StickyNote/index.d.ts +8 -2
  118. package/dist/types/components/Swiper/index.d.ts +4 -1
  119. package/dist/types/components/Table/index.d.ts +20 -5
  120. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  121. package/dist/types/components/Tag/types.d.ts +4 -2
  122. package/dist/types/components/Toast/index.d.ts +4 -1
  123. package/dist/utils.js +1 -0
  124. package/package.json +2 -2
  125. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  126. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  127. package/dist/XCKGTAUF-CahZE721.js +0 -25
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { createContext as xe, useRef as H, useContext as De, useState as X, useEffect as D, useCallback as de, useMemo as mt, isValidElement as Et } from "react";
3
- import { c as Q, d as F, a as P, f as W, b as K, _ as Fe, p as Qe, L as N, a1 as je, g as S, x as G, a2 as te, a3 as ge, a4 as We, a5 as yt, a6 as Pt, a7 as St, a8 as Oe, T as j, q as R, a9 as wt, u as Ze, aa as xt, a0 as Dt, M as et, ab as Ft, ac as Ot, U as he, ad as Tt, ae as At, w as Ct, af as tt, P as Rt, l as be, ag as _t, ah as re, X as Lt, $ as Ht, ai as Nt, aj as Mt } from "./OE2EFRVA-DkdhQLJL.js";
3
+ import { c as J, d as F, a as S, f as j, b as K, _ as Fe, v as Je, m as N, a3 as We, g as P, k as U, a4 as te, a5 as ge, a6 as je, a7 as yt, a8 as St, a9 as Pt, aa as Oe, V as W, w as C, ab as wt, u as Qe, ac as xt, a2 as Dt, O as et, ad as Ft, ae as Ot, W as he, af as Tt, ag as At, l as Rt, ah as tt, R as Ct, p as be, ai as _t, aj as re, Z as Lt, a1 as Ht, ak as Nt, al as Mt } from "./OE2EFRVA-Dg1R6gaC.js";
4
4
  import { createPortal as Ye, flushSync as Vt } from "react-dom";
5
5
  import { jsx as E, jsxs as le, Fragment as fe } from "react/jsx-runtime";
6
- import { u as q, a as $t, b as It } from "./RTNCFSKZ-LcIdBwa8.js";
7
- import { u as kt, d as rt, e as Bt, f as qt, b as Te, i as jt, g as Wt, h as Yt, j as Xt } from "./T22PY7TE-CzEDuEn1.js";
8
- var Xe = xe(null), zt = "span", nt = Q(
6
+ import { b as q, d as It, u as $t } from "./RTNCFSKZ-BywELldk.js";
7
+ import { u as kt, d as rt, e as Bt, f as qt, b as Te, i as Wt, g as jt, h as Yt, j as Xt } from "./T22PY7TE-gLuJpoOm.js";
8
+ var Xe = xe(null), zt = "span", nt = J(
9
9
  function(t) {
10
- return t = F(P({}, t), {
11
- style: P({
10
+ return t = F(S({}, t), {
11
+ style: S({
12
12
  border: 0,
13
13
  clip: "rect(0 0 0 0)",
14
14
  height: "1px",
@@ -22,18 +22,18 @@ var Xe = xe(null), zt = "span", nt = Q(
22
22
  }), t;
23
23
  }
24
24
  );
25
- W(function(t) {
25
+ j(function(t) {
26
26
  const r = nt(t);
27
27
  return K(zt, r);
28
28
  });
29
- var Kt = "span", Ut = Q(
29
+ var Kt = "span", Gt = J(
30
30
  function(t) {
31
- return t = F(P({
31
+ return t = F(S({
32
32
  "data-focus-trap": "",
33
33
  tabIndex: 0,
34
34
  "aria-hidden": !0
35
35
  }, t), {
36
- style: P({
36
+ style: S({
37
37
  // Prevents unintended scroll jumps.
38
38
  position: "fixed",
39
39
  top: 0,
@@ -41,17 +41,17 @@ var Kt = "span", Ut = Q(
41
41
  }, t.style)
42
42
  }), t = nt(t), t;
43
43
  }
44
- ), ce = W(function(t) {
45
- const r = Ut(t);
44
+ ), ce = j(function(t) {
45
+ const r = Gt(t);
46
46
  return K(Kt, r);
47
- }), Gt = "div";
48
- function Jt(e) {
49
- return S(e).body;
47
+ }), Ut = "div";
48
+ function Zt(e) {
49
+ return P(e).body;
50
50
  }
51
- function Qt(e, t) {
52
- return t ? typeof t == "function" ? t(e) : t : S(e).createElement("div");
51
+ function Jt(e, t) {
52
+ return t ? typeof t == "function" ? t(e) : t : P(e).createElement("div");
53
53
  }
54
- function Zt(e = "id") {
54
+ function Qt(e = "id") {
55
55
  return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
56
56
  }
57
57
  function B(e) {
@@ -59,7 +59,7 @@ function B(e) {
59
59
  e == null || e.focus();
60
60
  });
61
61
  }
62
- var ot = Q(function(t) {
62
+ var ot = J(function(t) {
63
63
  var r = t, {
64
64
  preserveTabOrder: n,
65
65
  preserveTabOrderAnchor: o,
@@ -73,30 +73,30 @@ var ot = Q(function(t) {
73
73
  "portalRef",
74
74
  "portal"
75
75
  ]);
76
- const h = H(null), m = Qe(h, c.ref), O = De(Xe), [f, V] = X(null), [$, I] = X(
76
+ const h = H(null), m = Je(h, c.ref), O = De(Xe), [f, V] = X(null), [I, $] = X(
77
77
  null
78
- ), k = H(null), M = H(null), U = H(null), T = H(null);
78
+ ), k = H(null), M = H(null), G = H(null), T = H(null);
79
79
  return N(() => {
80
80
  const l = h.current;
81
81
  if (!l || !u) {
82
82
  V(null);
83
83
  return;
84
84
  }
85
- const b = Qt(l, s);
85
+ const b = Jt(l, s);
86
86
  if (!b) {
87
87
  V(null);
88
88
  return;
89
89
  }
90
90
  const g = b.isConnected;
91
- if (g || (O || Jt(l)).appendChild(b), b.id || (b.id = l.id ? `portal/${l.id}` : Zt()), V(b), je(i, b), !g)
91
+ if (g || (O || Zt(l)).appendChild(b), b.id || (b.id = l.id ? `portal/${l.id}` : Qt()), V(b), We(i, b), !g)
92
92
  return () => {
93
- b.remove(), je(i, null);
93
+ b.remove(), We(i, null);
94
94
  };
95
95
  }, [u, s, O, i]), N(() => {
96
96
  if (!u || !n || !o) return;
97
- const b = S(o).createElement("span");
98
- return b.style.position = "fixed", o.insertAdjacentElement("afterend", b), I(b), () => {
99
- b.remove(), I(null);
97
+ const b = P(o).createElement("span");
98
+ return b.style.position = "fixed", o.insertAdjacentElement("afterend", b), $(b), () => {
99
+ b.remove(), $(null);
100
100
  };
101
101
  }, [u, n, o]), D(() => {
102
102
  if (!f || !n) return;
@@ -107,13 +107,13 @@ var ot = Q(function(t) {
107
107
  if (cancelAnimationFrame(l), d)
108
108
  return yt(f);
109
109
  l = requestAnimationFrame(() => {
110
- Pt(f, !0);
110
+ St(f, !0);
111
111
  });
112
112
  };
113
113
  return f.addEventListener("focusin", b, !0), f.addEventListener("focusout", b, !0), () => {
114
114
  cancelAnimationFrame(l), f.removeEventListener("focusin", b, !0), f.removeEventListener("focusout", b, !0);
115
115
  };
116
- }, [f, n]), c = G(
116
+ }, [f, n]), c = U(
117
117
  c,
118
118
  (l) => {
119
119
  if (l = // While the portal node is not in the DOM, we need to pass the
@@ -146,11 +146,11 @@ var ot = Q(function(t) {
146
146
  n && f && /* @__PURE__ */ E(
147
147
  ce,
148
148
  {
149
- ref: U,
149
+ ref: G,
150
150
  "data-focus-trap": c.id,
151
151
  className: "__focus-trap-inner-after",
152
152
  onFocus: (g) => {
153
- te(g, f) ? B(We()) : B(T.current);
153
+ te(g, f) ? B(je()) : B(T.current);
154
154
  }
155
155
  }
156
156
  )
@@ -163,7 +163,7 @@ var ot = Q(function(t) {
163
163
  "data-focus-trap": c.id,
164
164
  className: "__focus-trap-outer-before",
165
165
  onFocus: (g) => {
166
- !(g.relatedTarget === T.current) && te(g, f) ? B(M.current) : B(We());
166
+ !(g.relatedTarget === T.current) && te(g, f) ? B(M.current) : B(je());
167
167
  }
168
168
  }
169
169
  ),
@@ -178,7 +178,7 @@ var ot = Q(function(t) {
178
178
  className: "__focus-trap-outer-after",
179
179
  onFocus: (g) => {
180
180
  if (te(g, f))
181
- B(U.current);
181
+ B(G.current);
182
182
  else {
183
183
  const d = ge();
184
184
  if (d === M.current) {
@@ -194,22 +194,22 @@ var ot = Q(function(t) {
194
194
  }
195
195
  )
196
196
  ] });
197
- return $ && n && (b = Ye(
197
+ return I && n && (b = Ye(
198
198
  b,
199
- $
199
+ I
200
200
  )), /* @__PURE__ */ le(fe, { children: [
201
201
  b,
202
202
  l
203
203
  ] });
204
204
  },
205
- [f, O, u, c.id, n, $]
206
- ), c = F(P({}, c), {
205
+ [f, O, u, c.id, n, I]
206
+ ), c = F(S({}, c), {
207
207
  ref: m
208
208
  }), c;
209
209
  });
210
- W(function(t) {
210
+ j(function(t) {
211
211
  const r = ot(t);
212
- return K(Gt, r);
212
+ return K(Ut, r);
213
213
  });
214
214
  var ze = xe(0);
215
215
  function er({ level: e, children: t }) {
@@ -219,20 +219,20 @@ function er({ level: e, children: t }) {
219
219
  );
220
220
  return /* @__PURE__ */ E(ze.Provider, { value: n, children: t });
221
221
  }
222
- var tr = "div", st = Q(function(t) {
222
+ var tr = "div", st = J(function(t) {
223
223
  var r = t, { autoFocusOnShow: n = !0 } = r, o = Fe(r, ["autoFocusOnShow"]);
224
- return o = G(
224
+ return o = U(
225
225
  o,
226
- (s) => /* @__PURE__ */ E(St.Provider, { value: n, children: s }),
226
+ (s) => /* @__PURE__ */ E(Pt.Provider, { value: n, children: s }),
227
227
  [n]
228
228
  ), o;
229
229
  });
230
- W(function(t) {
230
+ j(function(t) {
231
231
  const r = st(t);
232
232
  return K(tr, r);
233
233
  });
234
234
  function rr(e, t) {
235
- const n = S(e).createElement("button");
235
+ const n = P(e).createElement("button");
236
236
  return n.type = "button", n.tabIndex = -1, n.textContent = "Dismiss popup", Object.assign(n.style, {
237
237
  border: "0px",
238
238
  clip: "rect(0 0 0 0)",
@@ -291,7 +291,7 @@ function z(e, t, r) {
291
291
  };
292
292
  });
293
293
  }
294
- function Pe(e, t) {
294
+ function Se(e, t) {
295
295
  return e ? ne(e, "style", () => {
296
296
  const n = e.style.cssText;
297
297
  return Object.assign(e.style, t), () => {
@@ -310,11 +310,11 @@ function or(e, t, r) {
310
310
  };
311
311
  }
312
312
  var sr = ["SCRIPT", "STYLE"];
313
- function Se(e) {
313
+ function Pe(e) {
314
314
  return `__ariakit-dialog-snapshot-${e}`;
315
315
  }
316
316
  function ur(e, t) {
317
- const r = S(t), n = Se(e);
317
+ const r = P(t), n = Pe(e);
318
318
  if (!r.body[n]) return !0;
319
319
  do {
320
320
  if (t === r.body) return !1;
@@ -325,13 +325,13 @@ function ur(e, t) {
325
325
  }
326
326
  function ir(e, t, r) {
327
327
  return sr.includes(t.tagName) || !ur(e, t) ? !1 : !r.some(
328
- (n) => n && R(t, n)
328
+ (n) => n && C(t, n)
329
329
  );
330
330
  }
331
- function Ce(e, t, r, n) {
331
+ function Re(e, t, r, n) {
332
332
  for (let o of t) {
333
333
  if (!(o != null && o.isConnected)) continue;
334
- const s = t.some((c) => !c || c === o ? !1 : c.contains(o)), i = S(o), u = o;
334
+ const s = t.some((c) => !c || c === o ? !1 : c.contains(o)), i = P(o), u = o;
335
335
  for (; o.parentElement && o !== i.body; ) {
336
336
  if (n == null || n(o.parentElement, u), !s)
337
337
  for (const c of o.parentElement.children)
@@ -341,10 +341,10 @@ function Ce(e, t, r, n) {
341
341
  }
342
342
  }
343
343
  function ar(e, t) {
344
- const { body: r } = S(t[0]), n = [];
345
- return Ce(e, t, (s) => {
346
- n.push(z(s, Se(e), !0));
347
- }), j(z(r, Se(e), !0), () => {
344
+ const { body: r } = P(t[0]), n = [];
345
+ return Re(e, t, (s) => {
346
+ n.push(z(s, Pe(e), !0));
347
+ }), W(z(r, Pe(e), !0), () => {
348
348
  for (const s of n)
349
349
  s();
350
350
  });
@@ -354,25 +354,25 @@ function ut(e, ...t) {
354
354
  const r = e.getAttribute("data-backdrop");
355
355
  return r == null ? !1 : r === "" || r === "true" || !t.length ? !0 : t.some((n) => r === n);
356
356
  }
357
- function J(e = "", t = !1) {
357
+ function Z(e = "", t = !1) {
358
358
  return `__ariakit-dialog-${t ? "ancestor" : "outside"}${e ? `-${e}` : ""}`;
359
359
  }
360
360
  function cr(e, t = "") {
361
- return j(
362
- z(e, J(), !0),
363
- z(e, J(t), !0)
361
+ return W(
362
+ z(e, Z(), !0),
363
+ z(e, Z(t), !0)
364
364
  );
365
365
  }
366
366
  function it(e, t = "") {
367
- return j(
368
- z(e, J("", !0), !0),
369
- z(e, J(t, !0), !0)
367
+ return W(
368
+ z(e, Z("", !0), !0),
369
+ z(e, Z(t, !0), !0)
370
370
  );
371
371
  }
372
- function Re(e, t) {
373
- const r = J(t, !0);
372
+ function Ce(e, t) {
373
+ const r = Z(t, !0);
374
374
  if (e[r]) return !0;
375
- const n = J(t);
375
+ const n = Z(t);
376
376
  do {
377
377
  if (e[n]) return !0;
378
378
  if (!e.parentElement) return !1;
@@ -381,7 +381,7 @@ function Re(e, t) {
381
381
  }
382
382
  function Ke(e, t) {
383
383
  const r = [], n = t.map((s) => s == null ? void 0 : s.id);
384
- return Ce(
384
+ return Re(
385
385
  e,
386
386
  t,
387
387
  (s) => {
@@ -396,16 +396,16 @@ function Ke(e, t) {
396
396
  };
397
397
  }
398
398
  function lr(e) {
399
- return e.tagName === "HTML" ? !0 : R(S(e).body, e);
399
+ return e.tagName === "HTML" ? !0 : C(P(e).body, e);
400
400
  }
401
401
  function fr(e, t) {
402
402
  if (!e) return !1;
403
- if (R(e, t)) return !0;
403
+ if (C(e, t)) return !0;
404
404
  const r = t.getAttribute("aria-activedescendant");
405
405
  if (r) {
406
- const n = S(e).getElementById(r);
406
+ const n = P(e).getElementById(r);
407
407
  if (n)
408
- return R(e, n);
408
+ return C(e, n);
409
409
  }
410
410
  return !1;
411
411
  }
@@ -421,7 +421,7 @@ function Ee({
421
421
  capture: n,
422
422
  domReady: o
423
423
  }) {
424
- const s = Ze(r), i = q(e, "open"), u = H(!1);
424
+ const s = Qe(r), i = q(e, "open"), u = H(!1);
425
425
  N(() => {
426
426
  if (!i || !o) return;
427
427
  const { contentElement: c } = e.getState();
@@ -432,7 +432,7 @@ function Ee({
432
432
  return c.addEventListener("focusin", h, !0), () => c.removeEventListener("focusin", h, !0);
433
433
  }, [e, i, o]), D(() => i ? Oe(t, (h) => {
434
434
  const { contentElement: m, disclosureElement: O } = e.getState(), f = h.target;
435
- !m || !f || !lr(f) || R(m, f) || fr(O, f) || f.hasAttribute("data-focus-trap") || dr(h, m) || u.current && !Re(f, m.id) || xt(f) || s(h);
435
+ !m || !f || !lr(f) || C(m, f) || fr(O, f) || f.hasAttribute("data-focus-trap") || dr(h, m) || u.current && !Ce(f, m.id) || xt(f) || s(h);
436
436
  }, n) : void 0, [i, n]);
437
437
  }
438
438
  function ye(e, t) {
@@ -440,44 +440,44 @@ function ye(e, t) {
440
440
  }
441
441
  function pr(e, t, r) {
442
442
  const n = q(e, "open"), o = nr(n), s = { store: e, domReady: r, capture: !0 };
443
- Ee(F(P({}, s), {
443
+ Ee(F(S({}, s), {
444
444
  type: "click",
445
445
  listener: (i) => {
446
446
  const { contentElement: u } = e.getState(), c = o.current;
447
- c && wt(c) && Re(c, u == null ? void 0 : u.id) && ye(t, i) && e.hide();
447
+ c && wt(c) && Ce(c, u == null ? void 0 : u.id) && ye(t, i) && e.hide();
448
448
  }
449
- })), Ee(F(P({}, s), {
449
+ })), Ee(F(S({}, s), {
450
450
  type: "focusin",
451
451
  listener: (i) => {
452
452
  const { contentElement: u } = e.getState();
453
- u && i.target !== S(u) && ye(t, i) && e.hide();
453
+ u && i.target !== P(u) && ye(t, i) && e.hide();
454
454
  }
455
- })), Ee(F(P({}, s), {
455
+ })), Ee(F(S({}, s), {
456
456
  type: "contextmenu",
457
457
  listener: (i) => {
458
458
  ye(t, i) && e.hide();
459
459
  }
460
460
  }));
461
461
  }
462
- var Ue = xe({});
462
+ var Ge = xe({});
463
463
  function vr(e) {
464
- const t = De(Ue), [r, n] = X([]), o = de(
464
+ const t = De(Ge), [r, n] = X([]), o = de(
465
465
  (u) => {
466
466
  var c;
467
- return n((h) => [...h, u]), j((c = t.add) == null ? void 0 : c.call(t, u), () => {
467
+ return n((h) => [...h, u]), W((c = t.add) == null ? void 0 : c.call(t, u), () => {
468
468
  n((h) => h.filter((m) => m !== u));
469
469
  });
470
470
  },
471
471
  [t]
472
472
  );
473
- N(() => $t(e, ["open", "contentElement"], (u) => {
473
+ N(() => It(e, ["open", "contentElement"], (u) => {
474
474
  var c;
475
475
  if (u.open && u.contentElement)
476
476
  return (c = t.add) == null ? void 0 : c.call(t, e);
477
477
  }), [e, t]);
478
478
  const s = mt(() => ({ store: e, add: o }), [e, o]);
479
479
  return { wrapElement: de(
480
- (u) => /* @__PURE__ */ E(Ue.Provider, { value: s, children: u }),
480
+ (u) => /* @__PURE__ */ E(Ge.Provider, { value: s, children: u }),
481
481
  [s]
482
482
  ), nestedDialogs: r };
483
483
  }
@@ -489,12 +489,12 @@ function gr({
489
489
  }) {
490
490
  const [o, s] = Dt(), i = de(() => {
491
491
  if (!n || !r) return !1;
492
- const { body: u } = S(r), c = u.getAttribute(e);
492
+ const { body: u } = P(r), c = u.getAttribute(e);
493
493
  return !c || c === t;
494
494
  }, [o, n, r, e, t]);
495
495
  return D(() => {
496
496
  if (!n || !t || !r) return;
497
- const { body: u } = S(r);
497
+ const { body: u } = P(r);
498
498
  if (i())
499
499
  return u.setAttribute(e, t), () => u.removeAttribute(e);
500
500
  const c = new MutationObserver(() => Vt(s));
@@ -514,30 +514,30 @@ function br(e, t, r) {
514
514
  });
515
515
  D(() => {
516
516
  if (!n() || !e) return;
517
- const o = S(e), s = et(e), { documentElement: i, body: u } = o, c = i.style.getPropertyValue("--scrollbar-width"), h = c ? Number.parseInt(c, 10) : s.innerWidth - i.clientWidth, m = () => or(
517
+ const o = P(e), s = et(e), { documentElement: i, body: u } = o, c = i.style.getPropertyValue("--scrollbar-width"), h = c ? Number.parseInt(c, 10) : s.innerWidth - i.clientWidth, m = () => or(
518
518
  i,
519
519
  "--scrollbar-width",
520
520
  `${h}px`
521
- ), O = hr(i), f = () => Pe(u, {
521
+ ), O = hr(i), f = () => Se(u, {
522
522
  overflow: "hidden",
523
523
  [O]: `${h}px`
524
524
  }), V = () => {
525
- var I, k;
526
- const { scrollX: M, scrollY: U, visualViewport: T } = s, l = (I = T == null ? void 0 : T.offsetLeft) != null ? I : 0, b = (k = T == null ? void 0 : T.offsetTop) != null ? k : 0, g = Pe(u, {
525
+ var $, k;
526
+ const { scrollX: M, scrollY: G, visualViewport: T } = s, l = ($ = T == null ? void 0 : T.offsetLeft) != null ? $ : 0, b = (k = T == null ? void 0 : T.offsetTop) != null ? k : 0, g = Se(u, {
527
527
  position: "fixed",
528
528
  overflow: "hidden",
529
- top: `${-(U - Math.floor(b))}px`,
529
+ top: `${-(G - Math.floor(b))}px`,
530
530
  left: `${-(M - Math.floor(l))}px`,
531
531
  right: "0",
532
532
  [O]: `${h}px`
533
533
  });
534
534
  return () => {
535
- g(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: M, top: U, behavior: "instant" });
535
+ g(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: M, top: G, behavior: "instant" });
536
536
  };
537
- }, $ = Ft() && !Ot();
538
- return j(
537
+ }, I = Ft() && !Ot();
538
+ return W(
539
539
  m(),
540
- $ ? V() : f()
540
+ I ? V() : f()
541
541
  );
542
542
  }, [n, e]);
543
543
  }
@@ -557,16 +557,16 @@ function ct(e, t) {
557
557
  if (at())
558
558
  return z(e, "inert", !0);
559
559
  const n = Tt(e, !0).map((o) => {
560
- if (t != null && t.some((i) => i && R(i, o))) return he;
560
+ if (t != null && t.some((i) => i && C(i, o))) return he;
561
561
  const s = ne(o, "focus", () => (o.focus = he, () => {
562
562
  delete o.focus;
563
563
  }));
564
- return j(Ae(o, "tabindex", "-1"), s);
564
+ return W(Ae(o, "tabindex", "-1"), s);
565
565
  });
566
- return j(
566
+ return W(
567
567
  ...n,
568
568
  Er(e),
569
- Pe(e, {
569
+ Se(e, {
570
570
  pointerEvents: "none",
571
571
  userSelect: "none",
572
572
  cursor: "default"
@@ -575,21 +575,21 @@ function ct(e, t) {
575
575
  }
576
576
  function yr(e, t) {
577
577
  const r = [], n = t.map((s) => s == null ? void 0 : s.id);
578
- return Ce(
578
+ return Re(
579
579
  e,
580
580
  t,
581
581
  (s) => {
582
582
  ut(s, ...n) || mr(s, ...n) || r.unshift(ct(s, t));
583
583
  },
584
584
  (s) => {
585
- s.hasAttribute("role") && (t.some((i) => i && R(i, s)) || r.unshift(Ae(s, "role", "none")));
585
+ s.hasAttribute("role") && (t.some((i) => i && C(i, s)) || r.unshift(Ae(s, "role", "none")));
586
586
  }
587
587
  ), () => {
588
588
  for (const s of r)
589
589
  s();
590
590
  };
591
591
  }
592
- var Pr = "div", Sr = [
592
+ var Sr = "div", Pr = [
593
593
  "a",
594
594
  "button",
595
595
  "details",
@@ -618,20 +618,20 @@ var Pr = "div", Sr = [
618
618
  "ul",
619
619
  "svg"
620
620
  ];
621
- Q(
621
+ J(
622
622
  function(t) {
623
623
  return t;
624
624
  }
625
625
  );
626
- var we = W(
626
+ var we = j(
627
627
  // @ts-expect-error
628
628
  function(t) {
629
- return K(Pr, t);
629
+ return K(Sr, t);
630
630
  }
631
631
  );
632
632
  Object.assign(
633
633
  we,
634
- Sr.reduce((e, t) => (e[t] = W(function(n) {
634
+ Pr.reduce((e, t) => (e[t] = j(function(n) {
635
635
  return K(t, n);
636
636
  }), e), {})
637
637
  );
@@ -669,9 +669,9 @@ function wr({
669
669
  });
670
670
  if (!t) return null;
671
671
  if (Et(t))
672
- return /* @__PURE__ */ E(we, F(P({}, u), { render: t }));
672
+ return /* @__PURE__ */ E(we, F(S({}, u), { render: t }));
673
673
  const c = typeof t != "boolean" ? t : "div";
674
- return /* @__PURE__ */ E(we, F(P({}, u), { render: /* @__PURE__ */ E(c, {}) }));
674
+ return /* @__PURE__ */ E(we, F(S({}, u), { render: /* @__PURE__ */ E(c, {}) }));
675
675
  }
676
676
  function xr(e = {}) {
677
677
  return Bt(e);
@@ -680,20 +680,20 @@ function Dr(e, t, r) {
680
680
  return qt(e, t, r);
681
681
  }
682
682
  function Fr(e = {}) {
683
- const [t, r] = It(xr, e);
683
+ const [t, r] = $t(xr, e);
684
684
  return Dr(t, r, e);
685
685
  }
686
- var Or = "div", Ge = Mt();
686
+ var Or = "div", Ue = Mt();
687
687
  function Tr(e) {
688
688
  const t = tt();
689
- return !t || e && R(e, t) ? !1 : !!re(t);
689
+ return !t || e && C(e, t) ? !1 : !!re(t);
690
690
  }
691
- function Je(e, t = !1) {
691
+ function Ze(e, t = !1) {
692
692
  if (!e) return null;
693
693
  const r = "current" in e ? e.current : e;
694
694
  return r ? t ? re(r) ? r : null : r : null;
695
695
  }
696
- var Ar = Q(function(t) {
696
+ var Ar = J(function(t) {
697
697
  var r = t, {
698
698
  store: n,
699
699
  open: o,
@@ -706,11 +706,11 @@ var Ar = Q(function(t) {
706
706
  hideOnInteractOutside: O = !0,
707
707
  getPersistentElements: f,
708
708
  preventBodyScroll: V = !!u,
709
- autoFocusOnShow: $ = !0,
710
- autoFocusOnHide: I = !0,
709
+ autoFocusOnShow: I = !0,
710
+ autoFocusOnHide: $ = !0,
711
711
  initialFocus: k,
712
712
  finalFocus: M,
713
- unmountOnHide: U,
713
+ unmountOnHide: G,
714
714
  unstable_treeSnapshotKey: T
715
715
  } = r, l = Fe(r, [
716
716
  "store",
@@ -744,17 +744,17 @@ var Ar = Q(function(t) {
744
744
  }), { portalRef: oe, domReady: w } = At(c, l.portalRef), lt = l.preserveTabOrder, pe = q(
745
745
  d,
746
746
  (a) => lt && !u && a.mounted
747
- ), _ = Ct(l.id), A = q(d, "open"), C = q(d, "mounted"), Y = q(d, "contentElement"), ft = jt(C, l.hidden, l.alwaysVisible);
747
+ ), _ = Rt(l.id), A = q(d, "open"), R = q(d, "mounted"), Y = q(d, "contentElement"), ft = Wt(R, l.hidden, l.alwaysVisible);
748
748
  br(Y, _, V && !ft), pr(d, O, w);
749
749
  const { wrapElement: _e, nestedDialogs: Le } = vr(d);
750
- l = G(l, _e, [_e]), N(() => {
750
+ l = U(l, _e, [_e]), N(() => {
751
751
  if (!A) return;
752
752
  const a = g.current, v = tt(a, !0);
753
- v && v.tagName !== "BODY" && (a && R(a, v) || d.setDisclosureElement(v));
754
- }, [d, A]), Ge && D(() => {
755
- if (!C) return;
753
+ v && v.tagName !== "BODY" && (a && C(a, v) || d.setDisclosureElement(v));
754
+ }, [d, A]), Ue && D(() => {
755
+ if (!R) return;
756
756
  const { disclosureElement: a } = d.getState();
757
- if (!a || !Rt(a)) return;
757
+ if (!a || !Ct(a)) return;
758
758
  const v = () => {
759
759
  let y = !1;
760
760
  const p = () => {
@@ -767,8 +767,8 @@ var Ar = Q(function(t) {
767
767
  return a.addEventListener("mousedown", v), () => {
768
768
  a.removeEventListener("mousedown", v);
769
769
  };
770
- }, [d, C]), D(() => {
771
- if (!C || !w) return;
770
+ }, [d, R]), D(() => {
771
+ if (!R || !w) return;
772
772
  const a = g.current;
773
773
  if (!a) return;
774
774
  const v = et(a), y = v.visualViewport || v, p = () => {
@@ -779,24 +779,24 @@ var Ar = Q(function(t) {
779
779
  return p(), y.addEventListener("resize", p), () => {
780
780
  y.removeEventListener("resize", p);
781
781
  };
782
- }, [C, w]), D(() => {
783
- if (!u || !C || !w) return;
782
+ }, [R, w]), D(() => {
783
+ if (!u || !R || !w) return;
784
784
  const a = g.current;
785
785
  if (!(!a || a.querySelector("[data-dialog-dismiss]")))
786
786
  return rr(a, d.hide);
787
- }, [d, u, C, w]), N(() => {
788
- if (!at() || A || !C || !w) return;
787
+ }, [d, u, R, w]), N(() => {
788
+ if (!at() || A || !R || !w) return;
789
789
  const a = g.current;
790
790
  if (a)
791
791
  return ct(a);
792
- }, [A, C, w]);
792
+ }, [A, R, w]);
793
793
  const se = A && w;
794
794
  N(() => {
795
795
  if (!_ || !se) return;
796
796
  const a = g.current;
797
797
  return ar(_, [a]);
798
798
  }, [_, se, T]);
799
- const He = Ze(f);
799
+ const He = Qe(f);
800
800
  N(() => {
801
801
  if (!_ || !se) return;
802
802
  const { disclosureElement: a } = d.getState(), v = g.current, y = He() || [], p = [
@@ -804,7 +804,7 @@ var Ar = Q(function(t) {
804
804
  ...y,
805
805
  ...Le.map((x) => x.getState().contentElement)
806
806
  ];
807
- return u ? j(
807
+ return u ? W(
808
808
  Ke(_, p),
809
809
  yr(_, p)
810
810
  ) : Ke(_, [a, ...p]);
@@ -817,10 +817,10 @@ var Ar = Q(function(t) {
817
817
  u,
818
818
  T
819
819
  ]);
820
- const Ne = !!$, Me = be($), [dt, pt] = X(!1);
820
+ const Ne = !!I, Me = be(I), [dt, pt] = X(!1);
821
821
  D(() => {
822
822
  if (!A || !Ne || !w || !(Y != null && Y.isConnected)) return;
823
- const a = Je(k, !0) || // If no initial focus is specified, we try to focus the first element
823
+ const a = Ze(k, !0) || // If no initial focus is specified, we try to focus the first element
824
824
  // with the autofocus attribute. If it's an Ariakit component, the
825
825
  // Focusable component will consume the autoFocus prop and add the
826
826
  // data-autofocus attribute to the element instead.
@@ -833,7 +833,7 @@ var Ar = Q(function(t) {
833
833
  _t(Y, !0, c && pe) || // Finally, we fallback to the dialog element itself.
834
834
  Y, v = re(a);
835
835
  Me(v ? a : null) && (pt(!0), queueMicrotask(() => {
836
- a.focus(), Ge && v && a.scrollIntoView({ block: "nearest", inline: "nearest" });
836
+ a.focus(), Ue && v && a.scrollIntoView({ block: "nearest", inline: "nearest" });
837
837
  }));
838
838
  }, [
839
839
  A,
@@ -845,30 +845,30 @@ var Ar = Q(function(t) {
845
845
  pe,
846
846
  Me
847
847
  ]);
848
- const ue = !!I, Ve = be(I), [ie, $e] = X(!1);
848
+ const ue = !!$, Ve = be($), [ie, Ie] = X(!1);
849
849
  D(() => {
850
850
  if (A)
851
- return $e(!0), () => $e(!1);
851
+ return Ie(!0), () => Ie(!1);
852
852
  }, [A]);
853
- const Z = de(
853
+ const Q = de(
854
854
  (a, v = !0) => {
855
855
  const { disclosureElement: y } = d.getState();
856
856
  if (Tr(a)) return;
857
- let p = Je(M) || y;
857
+ let p = Ze(M) || y;
858
858
  if (p != null && p.id) {
859
- const L = S(p), ee = `[aria-activedescendant="${p.id}"]`, ae = L.querySelector(ee);
859
+ const L = P(p), ee = `[aria-activedescendant="${p.id}"]`, ae = L.querySelector(ee);
860
860
  ae && (p = ae);
861
861
  }
862
862
  if (p && !re(p)) {
863
863
  const L = p.closest("[data-dialog]");
864
864
  if (L != null && L.id) {
865
- const ee = S(L), ae = `[aria-controls~="${L.id}"]`, qe = ee.querySelector(ae);
865
+ const ee = P(L), ae = `[aria-controls~="${L.id}"]`, qe = ee.querySelector(ae);
866
866
  qe && (p = qe);
867
867
  }
868
868
  }
869
869
  const x = p && re(p);
870
870
  if (!x && v) {
871
- requestAnimationFrame(() => Z(a, !1));
871
+ requestAnimationFrame(() => Q(a, !1));
872
872
  return;
873
873
  }
874
874
  Ve(x ? p : null) && x && (p == null || p.focus({ preventScroll: !0 }));
@@ -878,8 +878,8 @@ var Ar = Q(function(t) {
878
878
  N(() => {
879
879
  if (A || !ie || !ue) return;
880
880
  const a = g.current;
881
- ve.current = !0, Z(a);
882
- }, [A, ie, w, ue, Z]), D(() => {
881
+ ve.current = !0, Q(a);
882
+ }, [A, ie, w, ue, Q]), D(() => {
883
883
  if (!ie || !ue) return;
884
884
  const a = g.current;
885
885
  return () => {
@@ -887,25 +887,25 @@ var Ar = Q(function(t) {
887
887
  ve.current = !1;
888
888
  return;
889
889
  }
890
- Z(a);
890
+ Q(a);
891
891
  };
892
- }, [ie, ue, Z]);
893
- const Ie = be(m);
894
- D(() => !w || !C ? void 0 : Oe("keydown", (v) => {
892
+ }, [ie, ue, Q]);
893
+ const $e = be(m);
894
+ D(() => !w || !R ? void 0 : Oe("keydown", (v) => {
895
895
  if (v.key !== "Escape" || v.defaultPrevented) return;
896
896
  const y = g.current;
897
- if (!y || Re(y)) return;
897
+ if (!y || Ce(y)) return;
898
898
  const p = v.target;
899
899
  if (!p) return;
900
900
  const { disclosureElement: x } = d.getState();
901
- !!(p.tagName === "BODY" || R(y, p) || !x || R(x, p)) && Ie(v) && d.hide();
902
- }, !0), [d, w, C, Ie]), l = G(
901
+ !!(p.tagName === "BODY" || C(y, p) || !x || C(x, p)) && $e(v) && d.hide();
902
+ }, !0), [d, w, R, $e]), l = U(
903
903
  l,
904
904
  (a) => /* @__PURE__ */ E(er, { level: u ? 1 : void 0, children: a }),
905
905
  [u]
906
906
  );
907
907
  const ke = l.hidden, Be = l.alwaysVisible;
908
- l = G(
908
+ l = U(
909
909
  l,
910
910
  (a) => h ? /* @__PURE__ */ le(fe, { children: [
911
911
  /* @__PURE__ */ E(
@@ -922,11 +922,11 @@ var Ar = Q(function(t) {
922
922
  [d, h, ke, Be]
923
923
  );
924
924
  const [vt, gt] = X(), [ht, bt] = X();
925
- return l = G(
925
+ return l = U(
926
926
  l,
927
- (a) => /* @__PURE__ */ E(Wt, { value: d, children: /* @__PURE__ */ E(Yt.Provider, { value: gt, children: /* @__PURE__ */ E(Xt.Provider, { value: bt, children: a }) }) }),
927
+ (a) => /* @__PURE__ */ E(jt, { value: d, children: /* @__PURE__ */ E(Yt.Provider, { value: gt, children: /* @__PURE__ */ E(Xt.Provider, { value: bt, children: a }) }) }),
928
928
  [d]
929
- ), l = F(P({
929
+ ), l = F(S({
930
930
  id: _,
931
931
  "data-dialog": "",
932
932
  role: "dialog",
@@ -934,22 +934,22 @@ var Ar = Q(function(t) {
934
934
  "aria-labelledby": vt,
935
935
  "aria-describedby": ht
936
936
  }, l), {
937
- ref: Qe(g, l.ref)
938
- }), l = st(F(P({}, l), {
937
+ ref: Je(g, l.ref)
938
+ }), l = st(F(S({}, l), {
939
939
  autoFocusOnShow: dt
940
- })), l = rt(P({ store: d }, l)), l = Lt(F(P({}, l), { focusable: i })), l = ot(F(P({ portal: c }, l), { portalRef: oe, preserveTabOrder: pe })), l;
940
+ })), l = rt(S({ store: d }, l)), l = Lt(F(S({}, l), { focusable: i })), l = ot(F(S({ portal: c }, l), { portalRef: oe, preserveTabOrder: pe })), l;
941
941
  });
942
- function Cr(e, t = Te) {
943
- return W(function(n) {
942
+ function Rr(e, t = Te) {
943
+ return j(function(n) {
944
944
  const o = t(), s = n.store || o;
945
945
  return q(
946
946
  s,
947
947
  (u) => !n.unmountOnHide || (u == null ? void 0 : u.mounted) || !!n.open
948
- ) ? /* @__PURE__ */ E(e, P({}, n)) : null;
948
+ ) ? /* @__PURE__ */ E(e, S({}, n)) : null;
949
949
  });
950
950
  }
951
- var Vr = Cr(
952
- W(function(t) {
951
+ var Vr = Rr(
952
+ j(function(t) {
953
953
  const r = Ar(t);
954
954
  return K(Or, r);
955
955
  }),
@@ -960,7 +960,7 @@ export {
960
960
  we as R,
961
961
  Ar as a,
962
962
  xr as b,
963
- Cr as c,
963
+ Rr as c,
964
964
  Dr as d,
965
965
  Fr as u
966
966
  };