welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.10
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.
- package/README.md +1 -1
- package/dist/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
- package/dist/Accordion.js +20 -18
- package/dist/Alert.css +1 -1
- package/dist/Alert.js +93 -87
- package/dist/AspectRatio.js +2 -1
- package/dist/Avatar.js +14 -12
- package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Badge.js +2 -1
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +175 -154
- package/dist/Button.css +1 -1
- package/dist/Button.js +43 -41
- package/dist/ButtonGroup.js +7 -5
- package/dist/Card.css +1 -1
- package/dist/Card.js +68 -15
- package/dist/Checkbox.js +30 -29
- package/dist/CloseButton.css +1 -1
- package/dist/CloseButton.js +15 -13
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +82 -78
- package/dist/DateTimePicker.js +23 -22
- package/dist/Drawer.js +141 -96
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +902 -462
- package/dist/Field.js +2 -1
- package/dist/FieldGroup.js +9 -7
- package/dist/FileDrop.css +1 -1
- package/dist/FileDrop.js +427 -398
- package/dist/FileUpload.js +44 -41
- package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
- package/dist/Hint.js +10 -8
- package/dist/Icon.css +1 -1
- package/dist/Icon.js +36 -22
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +59 -57
- package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +9 -7
- package/dist/Link.css +1 -1
- package/dist/Link.js +54 -49
- package/dist/Loader.js +13 -11
- package/dist/Logo.js +21 -13
- package/dist/Modal.js +145 -114
- package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
- package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
- package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.js +157 -76
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +89 -72
- package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +39 -40
- package/dist/RadioGroup.js +29 -27
- package/dist/RadioTab.js +3 -2
- package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +136 -129
- package/dist/Select.css +1 -1
- package/dist/Select.js +259 -257
- package/dist/Slider.js +67 -62
- package/dist/Stepper.js +34 -27
- package/dist/StickyNote.css +1 -0
- package/dist/StickyNote.js +49 -0
- package/dist/Swiper.js +53 -51
- package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +34 -21
- package/dist/Tabs.js +165 -156
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +67 -62
- package/dist/Text.js +5 -3
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +26 -18
- package/dist/TimePicker.js +24 -23
- package/dist/Toast.css +1 -1
- package/dist/Toast.js +275 -165
- package/dist/Toggle.js +16 -14
- package/dist/Tooltip.css +1 -1
- package/dist/Tooltip.js +120 -129
- package/dist/VariantIcon.js +8 -6
- package/dist/VisuallyHidden.js +9 -7
- package/dist/WelcomeLoader.js +4 -3
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
- package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
- package/dist/scss/breakpoints.scss +9 -0
- package/dist/scss/text-ellipsis.scss +5 -0
- package/dist/scss/texts.scss +108 -0
- package/dist/theme.css +1 -1
- package/dist/theme.js +1 -0
- package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
- package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
- package/dist/types/components/Alert/components/Title.d.ts +5 -0
- package/dist/types/components/Alert/index.d.ts +7 -3
- package/dist/types/components/Alert/types.d.ts +3 -9
- package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/types.d.ts +6 -3
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
- package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +13 -4
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/FileDrop/types.d.ts +2 -0
- package/dist/types/components/Icon/icons.d.ts +6 -6
- package/dist/types/components/Icon/types.d.ts +2 -0
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/Pagination/types.d.ts +11 -0
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/Radio/types.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
- package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
- package/dist/types/components/StickyNote/index.d.ts +11 -0
- package/dist/types/components/StickyNote/index.test.d.ts +1 -0
- package/dist/types/components/StickyNote/types.d.ts +15 -0
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Textarea/types.d.ts +1 -0
- package/dist/types/components/Toast/components/Growl.d.ts +2 -0
- package/dist/types/components/Toast/index.d.ts +8 -2
- package/dist/types/components/Toast/types.d.ts +8 -9
- package/dist/types/components/Tooltip/types.d.ts +1 -1
- package/dist/types/theme/types.d.ts +255 -218
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
- package/dist/utils.js +3 -2
- package/package.json +3 -2
- package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
- package/dist/4I4MLMKD-BLxAidnq.js +0 -43
- package/dist/GVVKDT6A-bET6V7Py.js +0 -724
- package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
- package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
- package/dist/index.css +0 -0
- package/dist/types/components/Icon/Icon.d.ts +0 -2
- package/dist/types/utils/theme/index.d.ts +0 -0
- /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
- /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
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 J, d as F, a as S, f as j, b as K, _ as Fe,
|
|
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 {
|
|
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-
|
|
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
8
|
var Xe = xe(null), zt = "span", nt = J(
|
|
9
9
|
function(t) {
|
|
10
10
|
return t = F(S({}, t), {
|
|
@@ -73,7 +73,7 @@ var ot = J(function(t) {
|
|
|
73
73
|
"portalRef",
|
|
74
74
|
"portal"
|
|
75
75
|
]);
|
|
76
|
-
const h = H(null), m = Je(h, c.ref), O = De(Xe), [f, V] = X(null), [
|
|
76
|
+
const h = H(null), m = Je(h, c.ref), O = De(Xe), [f, V] = X(null), [I, $] = X(
|
|
77
77
|
null
|
|
78
78
|
), k = H(null), M = H(null), G = H(null), T = H(null);
|
|
79
79
|
return N(() => {
|
|
@@ -95,8 +95,8 @@ var ot = J(function(t) {
|
|
|
95
95
|
}, [u, s, O, i]), N(() => {
|
|
96
96
|
if (!u || !n || !o) return;
|
|
97
97
|
const b = P(o).createElement("span");
|
|
98
|
-
return b.style.position = "fixed", o.insertAdjacentElement("afterend", b),
|
|
99
|
-
b.remove(),
|
|
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;
|
|
@@ -194,15 +194,15 @@ var ot = J(function(t) {
|
|
|
194
194
|
}
|
|
195
195
|
)
|
|
196
196
|
] });
|
|
197
|
-
return
|
|
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,
|
|
205
|
+
[f, O, u, c.id, n, I]
|
|
206
206
|
), c = F(S({}, c), {
|
|
207
207
|
ref: m
|
|
208
208
|
}), c;
|
|
@@ -325,10 +325,10 @@ 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 &&
|
|
328
|
+
(n) => n && C(t, n)
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Re(e, t, r, n) {
|
|
332
332
|
for (let o of t) {
|
|
333
333
|
if (!(o != null && o.isConnected)) continue;
|
|
334
334
|
const s = t.some((c) => !c || c === o ? !1 : c.contains(o)), i = P(o), u = o;
|
|
@@ -342,7 +342,7 @@ function Ce(e, t, r, n) {
|
|
|
342
342
|
}
|
|
343
343
|
function ar(e, t) {
|
|
344
344
|
const { body: r } = P(t[0]), n = [];
|
|
345
|
-
return
|
|
345
|
+
return Re(e, t, (s) => {
|
|
346
346
|
n.push(z(s, Pe(e), !0));
|
|
347
347
|
}), W(z(r, Pe(e), !0), () => {
|
|
348
348
|
for (const s of n)
|
|
@@ -369,7 +369,7 @@ function it(e, t = "") {
|
|
|
369
369
|
z(e, Z(t, !0), !0)
|
|
370
370
|
);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Ce(e, t) {
|
|
373
373
|
const r = Z(t, !0);
|
|
374
374
|
if (e[r]) return !0;
|
|
375
375
|
const n = Z(t);
|
|
@@ -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
|
|
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 :
|
|
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 (
|
|
403
|
+
if (C(e, t)) return !0;
|
|
404
404
|
const r = t.getAttribute("aria-activedescendant");
|
|
405
405
|
if (r) {
|
|
406
406
|
const n = P(e).getElementById(r);
|
|
407
407
|
if (n)
|
|
408
|
-
return
|
|
408
|
+
return C(e, n);
|
|
409
409
|
}
|
|
410
410
|
return !1;
|
|
411
411
|
}
|
|
@@ -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) ||
|
|
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) {
|
|
@@ -444,7 +444,7 @@ function pr(e, t, r) {
|
|
|
444
444
|
type: "click",
|
|
445
445
|
listener: (i) => {
|
|
446
446
|
const { contentElement: u } = e.getState(), c = o.current;
|
|
447
|
-
c && wt(c) &&
|
|
447
|
+
c && wt(c) && Ce(c, u == null ? void 0 : u.id) && ye(t, i) && e.hide();
|
|
448
448
|
}
|
|
449
449
|
})), Ee(F(S({}, s), {
|
|
450
450
|
type: "focusin",
|
|
@@ -470,7 +470,7 @@ function vr(e) {
|
|
|
470
470
|
},
|
|
471
471
|
[t]
|
|
472
472
|
);
|
|
473
|
-
N(() =>
|
|
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);
|
|
@@ -522,8 +522,8 @@ function br(e, t, r) {
|
|
|
522
522
|
overflow: "hidden",
|
|
523
523
|
[O]: `${h}px`
|
|
524
524
|
}), V = () => {
|
|
525
|
-
var
|
|
526
|
-
const { scrollX: M, scrollY: G, visualViewport: T } = s, l = (
|
|
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
529
|
top: `${-(G - Math.floor(b))}px`,
|
|
@@ -534,10 +534,10 @@ function br(e, t, r) {
|
|
|
534
534
|
return () => {
|
|
535
535
|
g(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: M, top: G, behavior: "instant" });
|
|
536
536
|
};
|
|
537
|
-
},
|
|
537
|
+
}, I = Ft() && !Ot();
|
|
538
538
|
return W(
|
|
539
539
|
m(),
|
|
540
|
-
|
|
540
|
+
I ? V() : f()
|
|
541
541
|
);
|
|
542
542
|
}, [n, e]);
|
|
543
543
|
}
|
|
@@ -557,7 +557,7 @@ 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 &&
|
|
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
|
}));
|
|
@@ -575,14 +575,14 @@ 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
|
|
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 &&
|
|
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)
|
|
@@ -680,13 +680,13 @@ function Dr(e, t, r) {
|
|
|
680
680
|
return qt(e, t, r);
|
|
681
681
|
}
|
|
682
682
|
function Fr(e = {}) {
|
|
683
|
-
const [t, r] =
|
|
683
|
+
const [t, r] = $t(xr, e);
|
|
684
684
|
return Dr(t, r, e);
|
|
685
685
|
}
|
|
686
686
|
var Or = "div", Ue = Mt();
|
|
687
687
|
function Tr(e) {
|
|
688
688
|
const t = tt();
|
|
689
|
-
return !t || e &&
|
|
689
|
+
return !t || e && C(e, t) ? !1 : !!re(t);
|
|
690
690
|
}
|
|
691
691
|
function Ze(e, t = !1) {
|
|
692
692
|
if (!e) return null;
|
|
@@ -706,8 +706,8 @@ var Ar = J(function(t) {
|
|
|
706
706
|
hideOnInteractOutside: O = !0,
|
|
707
707
|
getPersistentElements: f,
|
|
708
708
|
preventBodyScroll: V = !!u,
|
|
709
|
-
autoFocusOnShow:
|
|
710
|
-
autoFocusOnHide:
|
|
709
|
+
autoFocusOnShow: I = !0,
|
|
710
|
+
autoFocusOnHide: $ = !0,
|
|
711
711
|
initialFocus: k,
|
|
712
712
|
finalFocus: M,
|
|
713
713
|
unmountOnHide: G,
|
|
@@ -744,17 +744,17 @@ var Ar = J(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
|
-
), _ =
|
|
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
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 &&
|
|
753
|
+
v && v.tagName !== "BODY" && (a && C(a, v) || d.setDisclosureElement(v));
|
|
754
754
|
}, [d, A]), Ue && D(() => {
|
|
755
|
-
if (!
|
|
755
|
+
if (!R) return;
|
|
756
756
|
const { disclosureElement: a } = d.getState();
|
|
757
|
-
if (!a || !
|
|
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 = J(function(t) {
|
|
|
767
767
|
return a.addEventListener("mousedown", v), () => {
|
|
768
768
|
a.removeEventListener("mousedown", v);
|
|
769
769
|
};
|
|
770
|
-
}, [d,
|
|
771
|
-
if (!
|
|
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,17 +779,17 @@ var Ar = J(function(t) {
|
|
|
779
779
|
return p(), y.addEventListener("resize", p), () => {
|
|
780
780
|
y.removeEventListener("resize", p);
|
|
781
781
|
};
|
|
782
|
-
}, [
|
|
783
|
-
if (!u || !
|
|
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,
|
|
788
|
-
if (!at() || A || !
|
|
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,
|
|
792
|
+
}, [A, R, w]);
|
|
793
793
|
const se = A && w;
|
|
794
794
|
N(() => {
|
|
795
795
|
if (!_ || !se) return;
|
|
@@ -817,7 +817,7 @@ var Ar = J(function(t) {
|
|
|
817
817
|
u,
|
|
818
818
|
T
|
|
819
819
|
]);
|
|
820
|
-
const Ne =
|
|
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
823
|
const a = Ze(k, !0) || // If no initial focus is specified, we try to focus the first element
|
|
@@ -845,10 +845,10 @@ var Ar = J(function(t) {
|
|
|
845
845
|
pe,
|
|
846
846
|
Me
|
|
847
847
|
]);
|
|
848
|
-
const ue =
|
|
848
|
+
const ue = !!$, Ve = be($), [ie, Ie] = X(!1);
|
|
849
849
|
D(() => {
|
|
850
850
|
if (A)
|
|
851
|
-
return
|
|
851
|
+
return Ie(!0), () => Ie(!1);
|
|
852
852
|
}, [A]);
|
|
853
853
|
const Q = de(
|
|
854
854
|
(a, v = !0) => {
|
|
@@ -890,16 +890,16 @@ var Ar = J(function(t) {
|
|
|
890
890
|
Q(a);
|
|
891
891
|
};
|
|
892
892
|
}, [ie, ue, Q]);
|
|
893
|
-
const
|
|
894
|
-
D(() => !w || !
|
|
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 ||
|
|
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" ||
|
|
902
|
-
}, !0), [d, w,
|
|
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]
|
|
@@ -939,7 +939,7 @@ var Ar = J(function(t) {
|
|
|
939
939
|
autoFocusOnShow: dt
|
|
940
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
|
|
942
|
+
function Rr(e, t = Te) {
|
|
943
943
|
return j(function(n) {
|
|
944
944
|
const o = t(), s = n.store || o;
|
|
945
945
|
return q(
|
|
@@ -948,7 +948,7 @@ function Cr(e, t = Te) {
|
|
|
948
948
|
) ? /* @__PURE__ */ E(e, S({}, n)) : null;
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
|
-
var Vr =
|
|
951
|
+
var Vr = Rr(
|
|
952
952
|
j(function(t) {
|
|
953
953
|
const r = Ar(t);
|
|
954
954
|
return K(Or, r);
|
|
@@ -960,7 +960,7 @@ export {
|
|
|
960
960
|
we as R,
|
|
961
961
|
Ar as a,
|
|
962
962
|
xr as b,
|
|
963
|
-
|
|
963
|
+
Rr as c,
|
|
964
964
|
Dr as d,
|
|
965
965
|
Fr as u
|
|
966
966
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as _ } from "./XCKGTAUF-
|
|
4
|
-
import { f as b, c as k, _ as x, i as S,
|
|
2
|
+
import { c as C } from "./T22PY7TE-gLuJpoOm.js";
|
|
3
|
+
import { u as _ } from "./XCKGTAUF-CJwwVibW.js";
|
|
4
|
+
import { f as b, c as k, _ as x, i as S, p as O, P as R, u as N, d as w, v as y, a as i, b as B } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
5
5
|
import { useRef as M, useState as T, useEffect as V } from "react";
|
|
6
6
|
var h = "button", j = Symbol("disclosure"), H = k(
|
|
7
7
|
function(n) {
|
|
8
8
|
var o = n, { store: e, toggleOnClick: p = !0 } = o, s = x(o, ["store", "toggleOnClick"]);
|
|
9
|
-
const f =
|
|
9
|
+
const f = C();
|
|
10
10
|
e = e || f, S(
|
|
11
11
|
e,
|
|
12
12
|
process.env.NODE_ENV !== "production" && "Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
@@ -16,7 +16,7 @@ var h = "button", j = Symbol("disclosure"), H = k(
|
|
|
16
16
|
let t = r === u.current;
|
|
17
17
|
r != null && r.isConnected || (e == null || e.setDisclosureElement(u.current), t = !0), v(a && t);
|
|
18
18
|
}, [r, e, a]);
|
|
19
|
-
const l = s.onClick, D = O(p), [E, g] = R(s, j, !0),
|
|
19
|
+
const l = s.onClick, D = O(p), [E, g] = R(s, j, !0), P = N((t) => {
|
|
20
20
|
l == null || l(t), !t.defaultPrevented && (E || D(t) && (e == null || e.setDisclosureElement(t.currentTarget), e == null || e.toggle()));
|
|
21
21
|
}), c = e.useState("contentElement");
|
|
22
22
|
return s = w(i(i({
|
|
@@ -24,14 +24,14 @@ var h = "button", j = Symbol("disclosure"), H = k(
|
|
|
24
24
|
"aria-controls": c == null ? void 0 : c.id
|
|
25
25
|
}, g), s), {
|
|
26
26
|
ref: y(u, s.ref),
|
|
27
|
-
onClick:
|
|
27
|
+
onClick: P
|
|
28
28
|
}), s = _(s), s;
|
|
29
29
|
}
|
|
30
|
-
),
|
|
30
|
+
), G = b(function(n) {
|
|
31
31
|
const o = H(n);
|
|
32
32
|
return B(h, o);
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
G as D,
|
|
36
36
|
H as u
|
|
37
37
|
};
|