welcome-ui 0.0.0-dev.1759222868187 → 0.0.0-dev.1759252708223

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 (49) hide show
  1. package/dist/4CMBR7SL-DXQR7a9T.js +308 -0
  2. package/dist/{ASMQKSDT-CyLroRiC.js → ASMQKSDT-GE79MhKX.js} +12 -12
  3. package/dist/{AXB53BZF-DBGkYxAF.js → AXB53BZF-ClCOTGI-.js} +3 -3
  4. package/dist/Accordion.js +3 -3
  5. package/dist/{BYC7LY2E-sahp7oqU.js → BYC7LY2E-DeD1QoQl.js} +108 -108
  6. package/dist/Button.js +1 -1
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/Drawer.js +4 -4
  9. package/dist/DropdownMenu.js +140 -139
  10. package/dist/FieldGroup.css +1 -0
  11. package/dist/FieldGroup.js +17 -0
  12. package/dist/ITI7HKP4-MlgGFEDr.js +187 -0
  13. package/dist/InputText.css +1 -1
  14. package/dist/InputText.js +34 -34
  15. package/dist/{JC64G2H7-oyI4lllS.js → JC64G2H7-jNBZrGfv.js} +126 -126
  16. package/dist/{KUU7WJ55-iyg84yrl.js → KUU7WJ55-CRa_letc.js} +1 -1
  17. package/dist/{LVA2YJMS-BmLXjKP9.js → LVA2YJMS-C6Bdr5Em.js} +35 -35
  18. package/dist/Label.js +13 -13
  19. package/dist/{MTZPJQMC-CEQxLFTu.js → MTZPJQMC-DgscjgO6.js} +2 -2
  20. package/dist/Modal.js +3 -3
  21. package/dist/{NLEBE274-BPGIVzin.js → NLEBE274-BlP1TDp5.js} +16 -16
  22. package/dist/{P2CTZE2T-CHi91Yb8.js → P2CTZE2T-DqsBJuIy.js} +32 -32
  23. package/dist/{P4IRICAX-CIAVAXlF.js → P4IRICAX-CvgWqpy0.js} +3 -3
  24. package/dist/Popover.js +3 -3
  25. package/dist/{QYJ6MIDR-DRpzeJNT.js → QYJ6MIDR-BWg_HLyh.js} +3 -3
  26. package/dist/Radio.css +1 -1
  27. package/dist/Radio.js +39 -38
  28. package/dist/RadioGroup.css +1 -0
  29. package/dist/RadioGroup.js +72 -0
  30. package/dist/RadioTab.js +1 -1
  31. package/dist/{SYRFVSLH-vrz7_KNH.js → SYRFVSLH-D5X1Ofws.js} +3 -3
  32. package/dist/Slider.css +1 -0
  33. package/dist/Slider.js +423 -0
  34. package/dist/Tabs.js +79 -78
  35. package/dist/Toggle.js +1 -1
  36. package/dist/Tooltip.js +31 -31
  37. package/dist/{VGCJ63VH-CV_AMRHp.js → VGCJ63VH-Bdd6jzVW.js} +31 -31
  38. package/dist/{X5NMLKT6-DqDJBMYO.js → X5NMLKT6-C7-nsL44.js} +2 -2
  39. package/dist/{YV4JVR4I-CvfP1OCB.js → YV4JVR4I-BN6SUVuh.js} +54 -54
  40. package/dist/types/components/FieldGroup/index.d.ts +1 -0
  41. package/dist/types/components/FieldGroup/types.d.ts +8 -0
  42. package/dist/types/components/Label/index.d.ts +1 -1
  43. package/dist/types/components/RadioGroup/index.d.ts +2 -0
  44. package/dist/types/components/RadioGroup/types.d.ts +17 -0
  45. package/dist/types/components/Slider/Range.d.ts +6 -0
  46. package/dist/types/components/Slider/index.d.ts +10 -0
  47. package/dist/types/components/Slider/types.d.ts +28 -0
  48. package/package.json +1 -1
  49. package/dist/ITI7HKP4-BwM8j6XI.js +0 -488
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { F as S, N as j, W as R, f as W, a as K, c as Q, E as N, b as F, d as P, a1 as ge, a9 as bt, y as Et, a5 as Qe, af as yt, ag as Pt, a7 as xe, ah as St, u as Ze, ai as wt, _ as De, v as J, aj as xt, j as et, ak as je, al as te, am as he, an as We, ao as Dt, ap as Ft, a4 as Ot, x as Tt, T as tt, l as At, e as me, aq as Ct, ar as re, n as Rt, s as _t, as as Lt, J as Nt } from "./LVA2YJMS-BmLXjKP9.js";
3
- import { g as Ht, h as Mt, e as Vt, f as rt, a as Fe, i as It, D as $t, j as kt, k as Bt } from "./VGCJ63VH-CV_AMRHp.js";
4
- import { d as qt, u as q, a as jt } from "./YV4JVR4I-CvfP1OCB.js";
5
- import { useRef as H, useEffect as D, isValidElement as Wt, useCallback as de, useContext as Oe, createContext as Te, useState as X, useMemo as Yt } from "react";
2
+ import { O as P, M as j, X as R, f as W, a as K, c as Q, y as H, b as x, d as S, a2 as ge, a9 as bt, F as Et, a5 as Qe, af as yt, ag as St, a7 as De, ah as Pt, u as Ze, ai as wt, _ as Fe, v as U, aj as Dt, j as et, ak as je, al as te, am as he, an as We, ao as Ft, ap as xt, a4 as Ot, E as Tt, B as tt, l as At, e as me, aq as Ct, ar as re, n as Rt, s as _t, as as Lt, S as Ht } from "./LVA2YJMS-C6Bdr5Em.js";
3
+ import { g as Nt, h as Mt, e as Vt, f as rt, a as xe, i as It, D as $t, j as kt, k as Bt } from "./VGCJ63VH-Bdd6jzVW.js";
4
+ import { a as qt, u as q, d as jt } from "./YV4JVR4I-BN6SUVuh.js";
5
+ import { useRef as N, useEffect as F, isValidElement as Wt, useCallback as de, useContext as Oe, createContext as Te, useState as X, useMemo as Yt } from "react";
6
6
  import { jsx as E, jsxs as le, Fragment as fe } from "react/jsx-runtime";
7
7
  import { flushSync as Xt, createPortal as Ye } from "react-dom";
8
8
  function zt(e = {}) {
9
- return Ht(e);
9
+ return Nt(e);
10
10
  }
11
11
  function Kt(e, t, r) {
12
12
  return Mt(e, t, r);
@@ -52,7 +52,7 @@ function z(e, t, r) {
52
52
  };
53
53
  });
54
54
  }
55
- function Pe(e, t) {
55
+ function Se(e, t) {
56
56
  return e ? ne(e, "style", () => {
57
57
  const n = e.style.cssText;
58
58
  return Object.assign(e.style, t), () => {
@@ -61,7 +61,7 @@ function Pe(e, t) {
61
61
  }) : () => {
62
62
  };
63
63
  }
64
- function Jt(e, t, r) {
64
+ function Ut(e, t, r) {
65
65
  return e ? ne(e, t, () => {
66
66
  const o = e.style.getPropertyValue(t);
67
67
  return e.style.setProperty(t, r), () => {
@@ -70,12 +70,12 @@ function Jt(e, t, r) {
70
70
  }) : () => {
71
71
  };
72
72
  }
73
- var Ut = ["SCRIPT", "STYLE"];
74
- function Se(e) {
73
+ var Jt = ["SCRIPT", "STYLE"];
74
+ function Pe(e) {
75
75
  return `__ariakit-dialog-snapshot-${e}`;
76
76
  }
77
77
  function Qt(e, t) {
78
- const r = S(t), n = Se(e);
78
+ const r = P(t), n = Pe(e);
79
79
  if (!r.body[n]) return !0;
80
80
  do {
81
81
  if (t === r.body) return !1;
@@ -85,14 +85,14 @@ function Qt(e, t) {
85
85
  } while (!0);
86
86
  }
87
87
  function Zt(e, t, r) {
88
- return Ut.includes(t.tagName) || !Qt(e, t) ? !1 : !r.some(
88
+ return Jt.includes(t.tagName) || !Qt(e, t) ? !1 : !r.some(
89
89
  (n) => n && R(t, n)
90
90
  );
91
91
  }
92
92
  function Ce(e, t, r, n) {
93
93
  for (let o of t) {
94
94
  if (!(o != null && o.isConnected)) continue;
95
- const s = t.some((c) => !c || c === o ? !1 : c.contains(o)), i = S(o), u = o;
95
+ const s = t.some((c) => !c || c === o ? !1 : c.contains(o)), i = P(o), u = o;
96
96
  for (; o.parentElement && o !== i.body; ) {
97
97
  if (n == null || n(o.parentElement, u), !s)
98
98
  for (const c of o.parentElement.children)
@@ -102,33 +102,33 @@ function Ce(e, t, r, n) {
102
102
  }
103
103
  }
104
104
  function er(e, t) {
105
- const { body: r } = S(t[0]), n = [];
105
+ const { body: r } = P(t[0]), n = [];
106
106
  return Ce(e, t, (s) => {
107
- n.push(z(s, Se(e), !0));
108
- }), j(z(r, Se(e), !0), () => {
107
+ n.push(z(s, Pe(e), !0));
108
+ }), j(z(r, Pe(e), !0), () => {
109
109
  for (const s of n)
110
110
  s();
111
111
  });
112
112
  }
113
- function U(e = "", t = !1) {
113
+ function J(e = "", t = !1) {
114
114
  return `__ariakit-dialog-${t ? "ancestor" : "outside"}${e ? `-${e}` : ""}`;
115
115
  }
116
116
  function tr(e, t = "") {
117
117
  return j(
118
- z(e, U(), !0),
119
- z(e, U(t), !0)
118
+ z(e, J(), !0),
119
+ z(e, J(t), !0)
120
120
  );
121
121
  }
122
122
  function ot(e, t = "") {
123
123
  return j(
124
- z(e, U("", !0), !0),
125
- z(e, U(t, !0), !0)
124
+ z(e, J("", !0), !0),
125
+ z(e, J(t, !0), !0)
126
126
  );
127
127
  }
128
128
  function Re(e, t) {
129
- const r = U(t, !0);
129
+ const r = J(t, !0);
130
130
  if (e[r]) return !0;
131
- const n = U(t);
131
+ const n = J(t);
132
132
  do {
133
133
  if (e[n]) return !0;
134
134
  if (!e.parentElement) return !1;
@@ -203,11 +203,11 @@ function or({
203
203
  alwaysVisible: r,
204
204
  hidden: n
205
205
  }) {
206
- const o = H(null), s = Vt({ disclosure: e }), i = q(e, "contentElement");
207
- D(() => {
206
+ const o = N(null), s = Vt({ disclosure: e }), i = q(e, "contentElement");
207
+ F(() => {
208
208
  const h = o.current, b = i;
209
209
  h && b && (h.style.zIndex = getComputedStyle(b).zIndex);
210
- }, [i]), N(() => {
210
+ }, [i]), H(() => {
211
211
  const h = i == null ? void 0 : i.id;
212
212
  if (!h) return;
213
213
  const b = o.current;
@@ -231,9 +231,9 @@ function or({
231
231
  });
232
232
  if (!t) return null;
233
233
  if (Wt(t))
234
- return /* @__PURE__ */ E(we, F(P({}, u), { render: t }));
234
+ return /* @__PURE__ */ E(we, x(S({}, u), { render: t }));
235
235
  const c = typeof t != "boolean" ? t : "div";
236
- return /* @__PURE__ */ E(we, F(P({}, u), { render: /* @__PURE__ */ E(c, {}) }));
236
+ return /* @__PURE__ */ E(we, x(S({}, u), { render: /* @__PURE__ */ E(c, {}) }));
237
237
  }
238
238
  function sr(e, ...t) {
239
239
  if (!e) return !1;
@@ -260,7 +260,7 @@ function ut(e, t) {
260
260
  return j(
261
261
  ...n,
262
262
  ur(e),
263
- Pe(e, {
263
+ Se(e, {
264
264
  pointerEvents: "none",
265
265
  userSelect: "none",
266
266
  cursor: "default"
@@ -291,12 +291,12 @@ function ar({
291
291
  }) {
292
292
  const [o, s] = Et(), i = de(() => {
293
293
  if (!n || !r) return !1;
294
- const { body: u } = S(r), c = u.getAttribute(e);
294
+ const { body: u } = P(r), c = u.getAttribute(e);
295
295
  return !c || c === t;
296
296
  }, [o, n, r, e, t]);
297
- return D(() => {
297
+ return F(() => {
298
298
  if (!n || !t || !r) return;
299
- const { body: u } = S(r);
299
+ const { body: u } = P(r);
300
300
  if (i())
301
301
  return u.setAttribute(e, t), () => u.removeAttribute(e);
302
302
  const c = new MutationObserver(() => Xt(s));
@@ -314,18 +314,18 @@ function lr(e, t, r) {
314
314
  contentId: t,
315
315
  enabled: r
316
316
  });
317
- D(() => {
317
+ F(() => {
318
318
  if (!n() || !e) return;
319
- const o = S(e), s = Qe(e), { documentElement: i, body: u } = o, c = i.style.getPropertyValue("--scrollbar-width"), h = c ? Number.parseInt(c) : s.innerWidth - i.clientWidth, b = () => Jt(
319
+ const o = P(e), s = Qe(e), { documentElement: i, body: u } = o, c = i.style.getPropertyValue("--scrollbar-width"), h = c ? Number.parseInt(c) : s.innerWidth - i.clientWidth, b = () => Ut(
320
320
  i,
321
321
  "--scrollbar-width",
322
322
  `${h}px`
323
- ), O = cr(i), f = () => Pe(u, {
323
+ ), O = cr(i), f = () => Se(u, {
324
324
  overflow: "hidden",
325
325
  [O]: `${h}px`
326
326
  }), V = () => {
327
327
  var $, k;
328
- const { scrollX: M, scrollY: G, visualViewport: T } = s, l = ($ = T == null ? void 0 : T.offsetLeft) != null ? $ : 0, m = (k = T == null ? void 0 : T.offsetTop) != null ? k : 0, v = Pe(u, {
328
+ const { scrollX: M, scrollY: G, visualViewport: T } = s, l = ($ = T == null ? void 0 : T.offsetLeft) != null ? $ : 0, m = (k = T == null ? void 0 : T.offsetTop) != null ? k : 0, v = Se(u, {
329
329
  position: "fixed",
330
330
  overflow: "hidden",
331
331
  top: `${-(G - Math.floor(m))}px`,
@@ -336,7 +336,7 @@ function lr(e, t, r) {
336
336
  return () => {
337
337
  v(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: M, top: G, behavior: "instant" });
338
338
  };
339
- }, I = yt() && !Pt();
339
+ }, I = yt() && !St();
340
340
  return j(
341
341
  b(),
342
342
  I ? V() : f()
@@ -354,7 +354,7 @@ function fr(e) {
354
354
  },
355
355
  [t]
356
356
  );
357
- N(() => jt(e, ["open", "contentElement"], (u) => {
357
+ H(() => jt(e, ["open", "contentElement"], (u) => {
358
358
  var c;
359
359
  if (u.open && u.contentElement)
360
360
  return (c = t.add) == null ? void 0 : c.call(t, e);
@@ -366,26 +366,26 @@ function fr(e) {
366
366
  ), nestedDialogs: r };
367
367
  }
368
368
  function dr(e) {
369
- const t = H();
370
- return D(() => {
369
+ const t = N();
370
+ return F(() => {
371
371
  if (!e) {
372
372
  t.current = null;
373
373
  return;
374
374
  }
375
- return xe("mousedown", (n) => {
375
+ return De("mousedown", (n) => {
376
376
  t.current = n.target;
377
377
  }, !0);
378
378
  }, [e]), t;
379
379
  }
380
380
  function pr(e) {
381
- return e.tagName === "HTML" ? !0 : R(S(e).body, e);
381
+ return e.tagName === "HTML" ? !0 : R(P(e).body, e);
382
382
  }
383
383
  function vr(e, t) {
384
384
  if (!e) return !1;
385
385
  if (R(e, t)) return !0;
386
386
  const r = t.getAttribute("aria-activedescendant");
387
387
  if (r) {
388
- const n = S(e).getElementById(r);
388
+ const n = P(e).getElementById(r);
389
389
  if (n)
390
390
  return R(e, n);
391
391
  }
@@ -403,8 +403,8 @@ function Ee({
403
403
  capture: n,
404
404
  domReady: o
405
405
  }) {
406
- const s = Ze(r), i = q(e, "open"), u = H(!1);
407
- N(() => {
406
+ const s = Ze(r), i = q(e, "open"), u = N(!1);
407
+ H(() => {
408
408
  if (!i || !o) return;
409
409
  const { contentElement: c } = e.getState();
410
410
  if (!c) return;
@@ -412,7 +412,7 @@ function Ee({
412
412
  u.current = !0;
413
413
  };
414
414
  return c.addEventListener("focusin", h, !0), () => c.removeEventListener("focusin", h, !0);
415
- }, [e, i, o]), D(() => i ? xe(t, (h) => {
415
+ }, [e, i, o]), F(() => i ? De(t, (h) => {
416
416
  const { contentElement: b, disclosureElement: O } = e.getState(), f = h.target;
417
417
  !b || !f || !pr(f) || R(b, f) || vr(O, f) || f.hasAttribute("data-focus-trap") || gr(h, b) || u.current && !Re(f, b.id) || wt(f) || s(h);
418
418
  }, n) : void 0, [i, n]);
@@ -422,19 +422,19 @@ function ye(e, t) {
422
422
  }
423
423
  function hr(e, t, r) {
424
424
  const n = q(e, "open"), o = dr(n), s = { store: e, domReady: r, capture: !0 };
425
- Ee(F(P({}, s), {
425
+ Ee(x(S({}, s), {
426
426
  type: "click",
427
427
  listener: (i) => {
428
428
  const { contentElement: u } = e.getState(), c = o.current;
429
- c && St(c) && Re(c, u == null ? void 0 : u.id) && ye(t, i) && e.hide();
429
+ c && Pt(c) && Re(c, u == null ? void 0 : u.id) && ye(t, i) && e.hide();
430
430
  }
431
- })), Ee(F(P({}, s), {
431
+ })), Ee(x(S({}, s), {
432
432
  type: "focusin",
433
433
  listener: (i) => {
434
434
  const { contentElement: u } = e.getState();
435
- u && i.target !== S(u) && ye(t, i) && e.hide();
435
+ u && i.target !== P(u) && ye(t, i) && e.hide();
436
436
  }
437
- })), Ee(F(P({}, s), {
437
+ })), Ee(x(S({}, s), {
438
438
  type: "contextmenu",
439
439
  listener: (i) => {
440
440
  ye(t, i) && e.hide();
@@ -442,7 +442,7 @@ function hr(e, t, r) {
442
442
  }));
443
443
  }
444
444
  function mr(e, t) {
445
- const n = S(e).createElement("button");
445
+ const n = P(e).createElement("button");
446
446
  return n.type = "button", n.tabIndex = -1, n.textContent = "Dismiss popup", Object.assign(n.style, {
447
447
  border: "0px",
448
448
  clip: "rect(0 0 0 0)",
@@ -458,10 +458,10 @@ function mr(e, t) {
458
458
  };
459
459
  }
460
460
  var br = "div", it = Q(function(t) {
461
- var r = t, { autoFocusOnShow: n = !0 } = r, o = De(r, ["autoFocusOnShow"]);
462
- return o = J(
461
+ var r = t, { autoFocusOnShow: n = !0 } = r, o = Fe(r, ["autoFocusOnShow"]);
462
+ return o = U(
463
463
  o,
464
- (s) => /* @__PURE__ */ E(xt.Provider, { value: n, children: s }),
464
+ (s) => /* @__PURE__ */ E(Dt.Provider, { value: n, children: s }),
465
465
  [n]
466
466
  ), o;
467
467
  });
@@ -479,8 +479,8 @@ function Er({ level: e, children: t }) {
479
479
  }
480
480
  var yr = "span", at = Q(
481
481
  function(t) {
482
- return t = F(P({}, t), {
483
- style: P({
482
+ return t = x(S({}, t), {
483
+ style: S({
484
484
  border: 0,
485
485
  clip: "rect(0 0 0 0)",
486
486
  height: "1px",
@@ -498,14 +498,14 @@ W(function(t) {
498
498
  const r = at(t);
499
499
  return K(yr, r);
500
500
  });
501
- var Pr = "span", Sr = Q(
501
+ var Sr = "span", Pr = Q(
502
502
  function(t) {
503
- return t = F(P({
503
+ return t = x(S({
504
504
  "data-focus-trap": "",
505
505
  tabIndex: 0,
506
506
  "aria-hidden": !0
507
507
  }, t), {
508
- style: P({
508
+ style: S({
509
509
  // Prevents unintended scroll jumps.
510
510
  position: "fixed",
511
511
  top: 0,
@@ -514,16 +514,16 @@ var Pr = "span", Sr = Q(
514
514
  }), t = at(t), t;
515
515
  }
516
516
  ), ce = W(function(t) {
517
- const r = Sr(t);
518
- return K(Pr, r);
517
+ const r = Pr(t);
518
+ return K(Sr, r);
519
519
  }), Ge = Te(null), wr = "div";
520
- function xr(e) {
521
- return S(e).body;
520
+ function Dr(e) {
521
+ return P(e).body;
522
522
  }
523
- function Dr(e, t) {
524
- return t ? typeof t == "function" ? t(e) : t : S(e).createElement("div");
523
+ function Fr(e, t) {
524
+ return t ? typeof t == "function" ? t(e) : t : P(e).createElement("div");
525
525
  }
526
- function Fr(e = "id") {
526
+ function xr(e = "id") {
527
527
  return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
528
528
  }
529
529
  function B(e) {
@@ -538,54 +538,54 @@ var ct = Q(function(t) {
538
538
  portalElement: s,
539
539
  portalRef: i,
540
540
  portal: u = !0
541
- } = r, c = De(r, [
541
+ } = r, c = Fe(r, [
542
542
  "preserveTabOrder",
543
543
  "preserveTabOrderAnchor",
544
544
  "portalElement",
545
545
  "portalRef",
546
546
  "portal"
547
547
  ]);
548
- const h = H(null), b = et(h, c.ref), O = Oe(Ge), [f, V] = X(null), [I, $] = X(
548
+ const h = N(null), b = et(h, c.ref), O = Oe(Ge), [f, V] = X(null), [I, $] = X(
549
549
  null
550
- ), k = H(null), M = H(null), G = H(null), T = H(null);
551
- return N(() => {
550
+ ), k = N(null), M = N(null), G = N(null), T = N(null);
551
+ return H(() => {
552
552
  const l = h.current;
553
553
  if (!l || !u) {
554
554
  V(null);
555
555
  return;
556
556
  }
557
- const m = Dr(l, s);
557
+ const m = Fr(l, s);
558
558
  if (!m) {
559
559
  V(null);
560
560
  return;
561
561
  }
562
562
  const v = m.isConnected;
563
- if (v || (O || xr(l)).appendChild(m), m.id || (m.id = l.id ? `portal/${l.id}` : Fr()), V(m), je(i, m), !v)
563
+ if (v || (O || Dr(l)).appendChild(m), m.id || (m.id = l.id ? `portal/${l.id}` : xr()), V(m), je(i, m), !v)
564
564
  return () => {
565
565
  m.remove(), je(i, null);
566
566
  };
567
- }, [u, s, O, i]), N(() => {
567
+ }, [u, s, O, i]), H(() => {
568
568
  if (!u || !n || !o) return;
569
- const m = S(o).createElement("span");
569
+ const m = P(o).createElement("span");
570
570
  return m.style.position = "fixed", o.insertAdjacentElement("afterend", m), $(m), () => {
571
571
  m.remove(), $(null);
572
572
  };
573
- }, [u, n, o]), D(() => {
573
+ }, [u, n, o]), F(() => {
574
574
  if (!f || !n) return;
575
575
  let l = 0;
576
576
  const m = (v) => {
577
577
  if (!te(v)) return;
578
578
  const d = v.type === "focusin";
579
579
  if (cancelAnimationFrame(l), d)
580
- return Dt(f);
580
+ return Ft(f);
581
581
  l = requestAnimationFrame(() => {
582
- Ft(f, !0);
582
+ xt(f, !0);
583
583
  });
584
584
  };
585
585
  return f.addEventListener("focusin", m, !0), f.addEventListener("focusout", m, !0), () => {
586
586
  cancelAnimationFrame(l), f.removeEventListener("focusin", m, !0), f.removeEventListener("focusout", m, !0);
587
587
  };
588
- }, [f, n]), c = J(
588
+ }, [f, n]), c = U(
589
589
  c,
590
590
  (l) => {
591
591
  if (l = // While the portal node is not in the DOM, we need to pass the
@@ -675,7 +675,7 @@ var ct = Q(function(t) {
675
675
  ] });
676
676
  },
677
677
  [f, O, u, c.id, n, I]
678
- ), c = F(P({}, c), {
678
+ ), c = x(S({}, c), {
679
679
  ref: b
680
680
  }), c;
681
681
  });
@@ -683,12 +683,12 @@ W(function(t) {
683
683
  const r = ct(t);
684
684
  return K(wr, r);
685
685
  });
686
- var Or = "div", Je = Nt();
686
+ var Or = "div", Ue = Ht();
687
687
  function Tr(e) {
688
688
  const t = tt();
689
689
  return !t || e && R(e, t) ? !1 : !!re(t);
690
690
  }
691
- function Ue(e, t = !1) {
691
+ function Je(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;
@@ -712,7 +712,7 @@ var Ar = Q(function(t) {
712
712
  finalFocus: M,
713
713
  unmountOnHide: G,
714
714
  unstable_treeSnapshotKey: T
715
- } = r, l = De(r, [
715
+ } = r, l = Fe(r, [
716
716
  "store",
717
717
  "open",
718
718
  "onClose",
@@ -731,7 +731,7 @@ var Ar = Q(function(t) {
731
731
  "unmountOnHide",
732
732
  "unstable_treeSnapshotKey"
733
733
  ]);
734
- const m = Fe(), v = H(null), d = Gt({
734
+ const m = xe(), v = N(null), d = Gt({
735
735
  store: n || m,
736
736
  open: o,
737
737
  setOpen(a) {
@@ -747,11 +747,11 @@ var Ar = Q(function(t) {
747
747
  ), _ = Tt(l.id), A = q(d, "open"), C = q(d, "mounted"), Y = q(d, "contentElement"), ft = It(C, l.hidden, l.alwaysVisible);
748
748
  lr(Y, _, V && !ft), hr(d, O, w);
749
749
  const { wrapElement: _e, nestedDialogs: Le } = fr(d);
750
- l = J(l, _e, [_e]), N(() => {
750
+ l = U(l, _e, [_e]), H(() => {
751
751
  if (!A) return;
752
752
  const a = v.current, g = tt(a, !0);
753
753
  g && g.tagName !== "BODY" && (a && R(a, g) || d.setDisclosureElement(g));
754
- }, [d, A]), Je && D(() => {
754
+ }, [d, A]), Ue && F(() => {
755
755
  if (!C) return;
756
756
  const { disclosureElement: a } = d.getState();
757
757
  if (!a || !At(a)) return;
@@ -759,50 +759,50 @@ var Ar = Q(function(t) {
759
759
  let y = !1;
760
760
  const p = () => {
761
761
  y = !0;
762
- }, x = { capture: !0, once: !0 };
763
- a.addEventListener("focusin", p, x), _t(a, "mouseup", () => {
762
+ }, D = { capture: !0, once: !0 };
763
+ a.addEventListener("focusin", p, D), _t(a, "mouseup", () => {
764
764
  a.removeEventListener("focusin", p, !0), !y && Lt(a);
765
765
  });
766
766
  };
767
767
  return a.addEventListener("mousedown", g), () => {
768
768
  a.removeEventListener("mousedown", g);
769
769
  };
770
- }, [d, C]), D(() => {
770
+ }, [d, C]), F(() => {
771
771
  if (!C || !w) return;
772
772
  const a = v.current;
773
773
  if (!a) return;
774
774
  const g = Qe(a), y = g.visualViewport || g, p = () => {
775
- var x, L;
776
- const ee = (L = (x = g.visualViewport) == null ? void 0 : x.height) != null ? L : g.innerHeight;
775
+ var D, L;
776
+ const ee = (L = (D = g.visualViewport) == null ? void 0 : D.height) != null ? L : g.innerHeight;
777
777
  a.style.setProperty("--dialog-viewport-height", `${ee}px`);
778
778
  };
779
779
  return p(), y.addEventListener("resize", p), () => {
780
780
  y.removeEventListener("resize", p);
781
781
  };
782
- }, [C, w]), D(() => {
782
+ }, [C, w]), F(() => {
783
783
  if (!u || !C || !w) return;
784
784
  const a = v.current;
785
785
  if (!(!a || a.querySelector("[data-dialog-dismiss]")))
786
786
  return mr(a, d.hide);
787
- }, [d, u, C, w]), N(() => {
787
+ }, [d, u, C, w]), H(() => {
788
788
  if (!st() || A || !C || !w) return;
789
789
  const a = v.current;
790
790
  if (a)
791
791
  return ut(a);
792
792
  }, [A, C, w]);
793
793
  const se = A && w;
794
- N(() => {
794
+ H(() => {
795
795
  if (!_ || !se) return;
796
796
  const a = v.current;
797
797
  return er(_, [a]);
798
798
  }, [_, se, T]);
799
- const Ne = Ze(f);
800
- N(() => {
799
+ const He = Ze(f);
800
+ H(() => {
801
801
  if (!_ || !se) return;
802
- const { disclosureElement: a } = d.getState(), g = v.current, y = Ne() || [], p = [
802
+ const { disclosureElement: a } = d.getState(), g = v.current, y = He() || [], p = [
803
803
  g,
804
804
  ...y,
805
- ...Le.map((x) => x.getState().contentElement)
805
+ ...Le.map((D) => D.getState().contentElement)
806
806
  ];
807
807
  return u ? j(
808
808
  Xe(_, p),
@@ -812,15 +812,15 @@ var Ar = Q(function(t) {
812
812
  _,
813
813
  d,
814
814
  se,
815
- Ne,
815
+ He,
816
816
  Le,
817
817
  u,
818
818
  T
819
819
  ]);
820
- const He = !!I, Me = me(I), [dt, pt] = X(!1);
821
- D(() => {
822
- if (!A || !He || !w || !(Y != null && Y.isConnected)) return;
823
- const a = Ue(k, !0) || // If no initial focus is specified, we try to focus the first element
820
+ const Ne = !!I, Me = me(I), [dt, pt] = X(!1);
821
+ F(() => {
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
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,11 +833,11 @@ var Ar = Q(function(t) {
833
833
  Ct(Y, !0, c && pe) || // Finally, we fallback to the dialog element itself.
834
834
  Y, g = re(a);
835
835
  Me(g ? a : null) && (pt(!0), queueMicrotask(() => {
836
- a.focus(), Je && a.scrollIntoView({ block: "nearest", inline: "nearest" });
836
+ a.focus(), Ue && a.scrollIntoView({ block: "nearest", inline: "nearest" });
837
837
  }));
838
838
  }, [
839
839
  A,
840
- He,
840
+ Ne,
841
841
  w,
842
842
  Y,
843
843
  k,
@@ -846,7 +846,7 @@ var Ar = Q(function(t) {
846
846
  Me
847
847
  ]);
848
848
  const ue = !!$, Ve = me($), [ie, Ie] = X(!1);
849
- D(() => {
849
+ F(() => {
850
850
  if (A)
851
851
  return Ie(!0), () => Ie(!1);
852
852
  }, [A]);
@@ -854,32 +854,32 @@ var Ar = Q(function(t) {
854
854
  (a, g = !0) => {
855
855
  const { disclosureElement: y } = d.getState();
856
856
  if (Tr(a)) return;
857
- let p = Ue(M) || y;
857
+ let p = Je(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
- const x = p && re(p);
870
- if (!x && g) {
869
+ const D = p && re(p);
870
+ if (!D && g) {
871
871
  requestAnimationFrame(() => Z(a, !1));
872
872
  return;
873
873
  }
874
- Ve(x ? p : null) && x && (p == null || p.focus());
874
+ Ve(D ? p : null) && D && (p == null || p.focus());
875
875
  },
876
876
  [d, M, Ve]
877
- ), ve = H(!1);
878
- N(() => {
877
+ ), ve = N(!1);
878
+ H(() => {
879
879
  if (A || !ie || !ue) return;
880
880
  const a = v.current;
881
881
  ve.current = !0, Z(a);
882
- }, [A, ie, w, ue, Z]), D(() => {
882
+ }, [A, ie, w, ue, Z]), F(() => {
883
883
  if (!ie || !ue) return;
884
884
  const a = v.current;
885
885
  return () => {
@@ -891,21 +891,21 @@ var Ar = Q(function(t) {
891
891
  };
892
892
  }, [ie, ue, Z]);
893
893
  const $e = me(b);
894
- D(() => !w || !C ? void 0 : xe("keydown", (g) => {
894
+ F(() => !w || !C ? void 0 : De("keydown", (g) => {
895
895
  if (g.key !== "Escape" || g.defaultPrevented) return;
896
896
  const y = v.current;
897
897
  if (!y || Re(y)) return;
898
898
  const p = g.target;
899
899
  if (!p) return;
900
- const { disclosureElement: x } = d.getState();
901
- !!(p.tagName === "BODY" || R(y, p) || !x || R(x, p)) && $e(g) && d.hide();
902
- }, !0), [d, w, C, $e]), l = J(
900
+ const { disclosureElement: D } = d.getState();
901
+ !!(p.tagName === "BODY" || R(y, p) || !D || R(D, p)) && $e(g) && d.hide();
902
+ }, !0), [d, w, C, $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 = J(
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, mt] = X();
925
- return l = J(
925
+ return l = U(
926
926
  l,
927
927
  (a) => /* @__PURE__ */ E($t, { value: d, children: /* @__PURE__ */ E(kt.Provider, { value: gt, children: /* @__PURE__ */ E(Bt.Provider, { value: mt, children: a }) }) }),
928
928
  [d]
929
- ), l = F(P({
929
+ ), l = x(S({
930
930
  id: _,
931
931
  "data-dialog": "",
932
932
  role: "dialog",
@@ -935,17 +935,17 @@ var Ar = Q(function(t) {
935
935
  "aria-describedby": ht
936
936
  }, l), {
937
937
  ref: et(v, l.ref)
938
- }), l = it(F(P({}, l), {
938
+ }), l = it(x(S({}, l), {
939
939
  autoFocusOnShow: dt
940
- })), l = rt(P({ store: d }, l)), l = Rt(F(P({}, l), { focusable: i })), l = ct(F(P({ portal: c }, l), { portalRef: oe, preserveTabOrder: pe })), l;
940
+ })), l = rt(S({ store: d }, l)), l = Rt(x(S({}, l), { focusable: i })), l = ct(x(S({ portal: c }, l), { portalRef: oe, preserveTabOrder: pe })), l;
941
941
  });
942
- function Cr(e, t = Fe) {
942
+ function Cr(e, t = xe) {
943
943
  return W(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
951
  var Vr = Cr(
@@ -953,7 +953,7 @@ var Vr = Cr(
953
953
  const r = Ar(t);
954
954
  return K(Or, r);
955
955
  }),
956
- Fe
956
+ xe
957
957
  );
958
958
  export {
959
959
  Vr as D,