welcome-ui 8.0.0-alpha.0 → 8.0.2
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/dist/AXB53BZF-BOEe01VW.mjs +25 -0
- package/dist/Accordion.mjs +17 -17
- package/dist/Alert.mjs +19 -19
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
- package/dist/Badge.mjs +1 -1
- package/dist/Breadcrumb.mjs +27 -26
- package/dist/Button.mjs +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
- package/dist/DatePicker.mjs +4 -4
- package/dist/DateTimePicker.mjs +9 -9
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +7 -7
- package/dist/DropdownMenu.mjs +262 -262
- package/dist/Field.mjs +25 -25
- package/dist/FileDrop.mjs +273 -267
- package/dist/FileUpload.mjs +26 -26
- package/dist/Files.mjs +1 -1
- package/dist/Hint.mjs +1 -1
- package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
- package/dist/Icons.mjs +88 -88
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +1 -1
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
- package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
- package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
- package/dist/Label.mjs +2 -2
- package/dist/Link.mjs +3 -3
- package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
- package/dist/Modal.mjs +13 -13
- package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
- package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
- package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
- package/dist/Pagination.mjs +22 -22
- package/dist/Picker.mjs +2 -2
- package/dist/Popover.mjs +2 -2
- package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
- package/dist/Radio.mjs +18 -18
- package/dist/RadioGroup.mjs +15 -15
- package/dist/RadioTab.mjs +9 -9
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
- package/dist/Search.mjs +2 -2
- package/dist/Select.mjs +719 -716
- package/dist/Shape.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Swiper.mjs +284 -278
- package/dist/Tabs.mjs +128 -128
- package/dist/Tag.mjs +16 -16
- package/dist/Text.mjs +1 -1
- package/dist/Textarea.mjs +4 -4
- package/dist/TimePicker.mjs +6 -6
- package/dist/Toast.mjs +69 -69
- package/dist/Toggle.mjs +2 -2
- package/dist/Tooltip.mjs +60 -60
- package/dist/UniversalLink.mjs +8 -8
- package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
- package/dist/VariantIcon.mjs +4 -4
- package/dist/WelcomeLoader.mjs +4862 -9223
- package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
- package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
- package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
- package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
- package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
- package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +670 -615
- package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
- package/dist/utils.mjs +29 -91
- package/package.json +12 -15
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { I as P, Q as q, Z as C,
|
|
3
|
-
import { g as jt, h as Lt, e as Ht, f as et, a as Fe, i as Nt, D as Mt, j as Vt, k as It } from "./VGCJ63VH-
|
|
4
|
-
import { a as $t, u as B, d as kt } from "./YV4JVR4I-
|
|
5
|
-
import { useRef as H, useEffect as F, isValidElement as Bt, useCallback as le,
|
|
6
|
-
import { r as Ee } from "./index-
|
|
2
|
+
import { I as P, Q as q, Z as C, f as W, h as K, c as Z, F as L, t as m, d as D, g as y, a4 as pe, aa as ht, y as mt, G as Qe, ag as bt, ah as Et, a8 as Se, ai as xt, b as Ue, aj as yt, _ as we, E as Q, ak as Pt, e as Ze, al as Be, am as te, an as ve, ao as qe, ap as St, aq as wt, a6 as Ft, x as Dt, W as Je, k as Ot, u as ge, ar as Tt, as as re, m as At, r as Rt, at as Ct, M as _t } from "./LVA2YJMS-DDEmK0pp.mjs";
|
|
3
|
+
import { g as jt, h as Lt, e as Ht, f as et, a as Fe, i as Nt, D as Mt, j as Vt, k as It } from "./VGCJ63VH-BMzoZtCu.mjs";
|
|
4
|
+
import { a as $t, u as B, d as kt } from "./YV4JVR4I-Bh7B7TET.mjs";
|
|
5
|
+
import { useRef as H, useEffect as F, isValidElement as Bt, useCallback as le, useContext as De, createContext as Oe, useState as X, useMemo as qt } from "react";
|
|
6
|
+
import { r as Ee } from "./index-CBBbX29m.mjs";
|
|
7
7
|
function Wt(e = {}) {
|
|
8
8
|
return jt(e);
|
|
9
9
|
}
|
|
@@ -324,7 +324,7 @@ function ir(e, t, r) {
|
|
|
324
324
|
[O]: `${h}px`
|
|
325
325
|
}), M = () => {
|
|
326
326
|
var I, $;
|
|
327
|
-
const { scrollX: N, scrollY: G, visualViewport: T } = s, l = (I = T == null ? void 0 : T.offsetLeft) != null ? I : 0, b = ($ = T == null ? void 0 : T.offsetTop) != null ? $ : 0,
|
|
327
|
+
const { scrollX: N, scrollY: G, visualViewport: T } = s, l = (I = T == null ? void 0 : T.offsetLeft) != null ? I : 0, b = ($ = T == null ? void 0 : T.offsetTop) != null ? $ : 0, v = xe(u, {
|
|
328
328
|
position: "fixed",
|
|
329
329
|
overflow: "hidden",
|
|
330
330
|
top: `${-(G - Math.floor(b))}px`,
|
|
@@ -333,7 +333,7 @@ function ir(e, t, r) {
|
|
|
333
333
|
[O]: `${h}px`
|
|
334
334
|
});
|
|
335
335
|
return () => {
|
|
336
|
-
|
|
336
|
+
v(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: N, top: G, behavior: "instant" });
|
|
337
337
|
};
|
|
338
338
|
}, V = bt() && !Et();
|
|
339
339
|
return q(
|
|
@@ -342,9 +342,9 @@ function ir(e, t, r) {
|
|
|
342
342
|
);
|
|
343
343
|
}, [n, e]);
|
|
344
344
|
}
|
|
345
|
-
var Ye =
|
|
345
|
+
var Ye = Oe({});
|
|
346
346
|
function ar(e) {
|
|
347
|
-
const t =
|
|
347
|
+
const t = De(Ye), [r, n] = X([]), o = le(
|
|
348
348
|
(u) => {
|
|
349
349
|
var c;
|
|
350
350
|
return n((h) => [...h, u]), q((c = t.add) == null ? void 0 : c.call(t, u), () => {
|
|
@@ -440,7 +440,7 @@ function pr(e, t, r) {
|
|
|
440
440
|
}
|
|
441
441
|
}));
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function vr(e, t) {
|
|
444
444
|
const n = P(e).createElement("button");
|
|
445
445
|
return n.type = "button", n.tabIndex = -1, n.textContent = "Dismiss popup", Object.assign(n.style, {
|
|
446
446
|
border: "0px",
|
|
@@ -456,7 +456,7 @@ function gr(e, t) {
|
|
|
456
456
|
n.removeEventListener("click", t), n.remove();
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
var
|
|
459
|
+
var gr = "div", st = Z(function(t) {
|
|
460
460
|
var r = t, { autoFocusOnShow: n = !0 } = r, o = we(r, ["autoFocusOnShow"]);
|
|
461
461
|
return o = Q(
|
|
462
462
|
o,
|
|
@@ -466,11 +466,11 @@ var vr = "div", st = Z(function(t) {
|
|
|
466
466
|
});
|
|
467
467
|
W(function(t) {
|
|
468
468
|
const r = st(t);
|
|
469
|
-
return K(
|
|
469
|
+
return K(gr, r);
|
|
470
470
|
});
|
|
471
|
-
var Xe =
|
|
471
|
+
var Xe = Oe(0);
|
|
472
472
|
function hr({ level: e, children: t }) {
|
|
473
|
-
const r =
|
|
473
|
+
const r = De(Xe), n = Math.max(
|
|
474
474
|
Math.min(e || r + 1, 6),
|
|
475
475
|
1
|
|
476
476
|
);
|
|
@@ -515,7 +515,7 @@ var br = "span", Er = Z(
|
|
|
515
515
|
), ce = W(function(t) {
|
|
516
516
|
const r = Er(t);
|
|
517
517
|
return K(br, r);
|
|
518
|
-
}), ze =
|
|
518
|
+
}), ze = Oe(null), xr = "div";
|
|
519
519
|
function yr(e) {
|
|
520
520
|
return P(e).body;
|
|
521
521
|
}
|
|
@@ -544,7 +544,7 @@ var it = Z(function(t) {
|
|
|
544
544
|
"portalRef",
|
|
545
545
|
"portal"
|
|
546
546
|
]);
|
|
547
|
-
const h = H(null), E = Ze(h, c.ref), O =
|
|
547
|
+
const h = H(null), E = Ze(h, c.ref), O = De(ze), [f, M] = X(null), [V, I] = X(
|
|
548
548
|
null
|
|
549
549
|
), $ = H(null), N = H(null), G = H(null), T = H(null);
|
|
550
550
|
return L(() => {
|
|
@@ -558,8 +558,8 @@ var it = Z(function(t) {
|
|
|
558
558
|
M(null);
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
|
-
const
|
|
562
|
-
if (
|
|
561
|
+
const v = b.isConnected;
|
|
562
|
+
if (v || (O || yr(l)).appendChild(b), b.id || (b.id = l.id ? `portal/${l.id}` : Sr()), M(b), Be(i, b), !v)
|
|
563
563
|
return () => {
|
|
564
564
|
b.remove(), Be(i, null);
|
|
565
565
|
};
|
|
@@ -572,9 +572,9 @@ var it = Z(function(t) {
|
|
|
572
572
|
}, [u, n, o]), F(() => {
|
|
573
573
|
if (!f || !n) return;
|
|
574
574
|
let l = 0;
|
|
575
|
-
const b = (
|
|
576
|
-
if (!te(
|
|
577
|
-
const d =
|
|
575
|
+
const b = (v) => {
|
|
576
|
+
if (!te(v)) return;
|
|
577
|
+
const d = v.type === "focusin";
|
|
578
578
|
if (cancelAnimationFrame(l), d)
|
|
579
579
|
return St(f);
|
|
580
580
|
l = requestAnimationFrame(() => {
|
|
@@ -608,8 +608,8 @@ var it = Z(function(t) {
|
|
|
608
608
|
ref: N,
|
|
609
609
|
"data-focus-trap": c.id,
|
|
610
610
|
className: "__focus-trap-inner-before",
|
|
611
|
-
onFocus: (
|
|
612
|
-
te(
|
|
611
|
+
onFocus: (v) => {
|
|
612
|
+
te(v, f) ? k(ve()) : k($.current);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
),
|
|
@@ -620,8 +620,8 @@ var it = Z(function(t) {
|
|
|
620
620
|
ref: G,
|
|
621
621
|
"data-focus-trap": c.id,
|
|
622
622
|
className: "__focus-trap-inner-after",
|
|
623
|
-
onFocus: (
|
|
624
|
-
te(
|
|
623
|
+
onFocus: (v) => {
|
|
624
|
+
te(v, f) ? k(qe()) : k(T.current);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
)
|
|
@@ -633,8 +633,8 @@ var it = Z(function(t) {
|
|
|
633
633
|
ref: $,
|
|
634
634
|
"data-focus-trap": c.id,
|
|
635
635
|
className: "__focus-trap-outer-before",
|
|
636
|
-
onFocus: (
|
|
637
|
-
!(
|
|
636
|
+
onFocus: (v) => {
|
|
637
|
+
!(v.relatedTarget === T.current) && te(v, f) ? k(N.current) : k(qe());
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
),
|
|
@@ -647,15 +647,15 @@ var it = Z(function(t) {
|
|
|
647
647
|
ref: T,
|
|
648
648
|
"data-focus-trap": c.id,
|
|
649
649
|
className: "__focus-trap-outer-after",
|
|
650
|
-
onFocus: (
|
|
651
|
-
if (te(
|
|
650
|
+
onFocus: (v) => {
|
|
651
|
+
if (te(v, f))
|
|
652
652
|
k(G.current);
|
|
653
653
|
else {
|
|
654
|
-
const d =
|
|
654
|
+
const d = ve();
|
|
655
655
|
if (d === N.current) {
|
|
656
656
|
requestAnimationFrame(() => {
|
|
657
657
|
var oe;
|
|
658
|
-
return (oe =
|
|
658
|
+
return (oe = ve()) == null ? void 0 : oe.focus();
|
|
659
659
|
});
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
@@ -682,7 +682,7 @@ W(function(t) {
|
|
|
682
682
|
const r = it(t);
|
|
683
683
|
return K(xr, r);
|
|
684
684
|
});
|
|
685
|
-
var wr = "div", Ke =
|
|
685
|
+
var wr = "div", Ke = _t();
|
|
686
686
|
function Fr(e) {
|
|
687
687
|
const t = Je();
|
|
688
688
|
return !t || e && C(e, t) ? !1 : !!re(t);
|
|
@@ -730,15 +730,15 @@ var Dr = Z(function(t) {
|
|
|
730
730
|
"unmountOnHide",
|
|
731
731
|
"unstable_treeSnapshotKey"
|
|
732
732
|
]);
|
|
733
|
-
const b = Fe(),
|
|
733
|
+
const b = Fe(), v = H(null), d = Xt({
|
|
734
734
|
store: n || b,
|
|
735
735
|
open: o,
|
|
736
736
|
setOpen(a) {
|
|
737
737
|
if (a) return;
|
|
738
|
-
const
|
|
739
|
-
if (!
|
|
738
|
+
const g = v.current;
|
|
739
|
+
if (!g) return;
|
|
740
740
|
const x = new Event("close", { bubbles: !1, cancelable: !0 });
|
|
741
|
-
s &&
|
|
741
|
+
s && g.addEventListener("close", s, { once: !0 }), g.dispatchEvent(x), x.defaultPrevented && d.setOpen(!0);
|
|
742
742
|
}
|
|
743
743
|
}), { portalRef: oe, domReady: S } = Ft(c, l.portalRef), at = l.preserveTabOrder, fe = B(
|
|
744
744
|
d,
|
|
@@ -748,31 +748,31 @@ var Dr = Z(function(t) {
|
|
|
748
748
|
const { wrapElement: Ce, nestedDialogs: _e } = ar(d);
|
|
749
749
|
l = Q(l, Ce, [Ce]), L(() => {
|
|
750
750
|
if (!A) return;
|
|
751
|
-
const a =
|
|
752
|
-
|
|
751
|
+
const a = v.current, g = Je(a, !0);
|
|
752
|
+
g && g.tagName !== "BODY" && (a && C(a, g) || d.setDisclosureElement(g));
|
|
753
753
|
}, [d, A]), Ke && F(() => {
|
|
754
754
|
if (!R) return;
|
|
755
755
|
const { disclosureElement: a } = d.getState();
|
|
756
756
|
if (!a || !Ot(a)) return;
|
|
757
|
-
const
|
|
757
|
+
const g = () => {
|
|
758
758
|
let x = !1;
|
|
759
759
|
const p = () => {
|
|
760
760
|
x = !0;
|
|
761
761
|
}, w = { capture: !0, once: !0 };
|
|
762
|
-
a.addEventListener("focusin", p, w),
|
|
763
|
-
a.removeEventListener("focusin", p, !0), !x &&
|
|
762
|
+
a.addEventListener("focusin", p, w), Rt(a, "mouseup", () => {
|
|
763
|
+
a.removeEventListener("focusin", p, !0), !x && Ct(a);
|
|
764
764
|
});
|
|
765
765
|
};
|
|
766
|
-
return a.addEventListener("mousedown",
|
|
767
|
-
a.removeEventListener("mousedown",
|
|
766
|
+
return a.addEventListener("mousedown", g), () => {
|
|
767
|
+
a.removeEventListener("mousedown", g);
|
|
768
768
|
};
|
|
769
769
|
}, [d, R]), F(() => {
|
|
770
770
|
if (!R || !S) return;
|
|
771
|
-
const a =
|
|
771
|
+
const a = v.current;
|
|
772
772
|
if (!a) return;
|
|
773
|
-
const
|
|
773
|
+
const g = Qe(a), x = g.visualViewport || g, p = () => {
|
|
774
774
|
var w, j;
|
|
775
|
-
const ee = (j = (w =
|
|
775
|
+
const ee = (j = (w = g.visualViewport) == null ? void 0 : w.height) != null ? j : g.innerHeight;
|
|
776
776
|
a.style.setProperty("--dialog-viewport-height", `${ee}px`);
|
|
777
777
|
};
|
|
778
778
|
return p(), x.addEventListener("resize", p), () => {
|
|
@@ -780,26 +780,26 @@ var Dr = Z(function(t) {
|
|
|
780
780
|
};
|
|
781
781
|
}, [R, S]), F(() => {
|
|
782
782
|
if (!u || !R || !S) return;
|
|
783
|
-
const a =
|
|
783
|
+
const a = v.current;
|
|
784
784
|
if (!(!a || a.querySelector("[data-dialog-dismiss]")))
|
|
785
|
-
return
|
|
785
|
+
return vr(a, d.hide);
|
|
786
786
|
}, [d, u, R, S]), L(() => {
|
|
787
787
|
if (!nt() || A || !R || !S) return;
|
|
788
|
-
const a =
|
|
788
|
+
const a = v.current;
|
|
789
789
|
if (a)
|
|
790
790
|
return ot(a);
|
|
791
791
|
}, [A, R, S]);
|
|
792
792
|
const se = A && S;
|
|
793
793
|
L(() => {
|
|
794
794
|
if (!_ || !se) return;
|
|
795
|
-
const a =
|
|
795
|
+
const a = v.current;
|
|
796
796
|
return Ut(_, [a]);
|
|
797
797
|
}, [_, se, T]);
|
|
798
798
|
const je = Ue(f);
|
|
799
799
|
L(() => {
|
|
800
800
|
if (!_ || !se) return;
|
|
801
|
-
const { disclosureElement: a } = d.getState(),
|
|
802
|
-
|
|
801
|
+
const { disclosureElement: a } = d.getState(), g = v.current, x = je() || [], p = [
|
|
802
|
+
g,
|
|
803
803
|
...x,
|
|
804
804
|
..._e.map((w) => w.getState().contentElement)
|
|
805
805
|
];
|
|
@@ -816,7 +816,7 @@ var Dr = Z(function(t) {
|
|
|
816
816
|
u,
|
|
817
817
|
T
|
|
818
818
|
]);
|
|
819
|
-
const Le = !!V, He =
|
|
819
|
+
const Le = !!V, He = ge(V), [lt, ft] = X(!1);
|
|
820
820
|
F(() => {
|
|
821
821
|
if (!A || !Le || !S || !(Y != null && Y.isConnected)) return;
|
|
822
822
|
const a = Ge($, !0) || // If no initial focus is specified, we try to focus the first element
|
|
@@ -830,8 +830,8 @@ var Dr = Z(function(t) {
|
|
|
830
830
|
// properly because the elements aren't tabbable until the dialog receives
|
|
831
831
|
// focus.
|
|
832
832
|
Tt(Y, !0, c && fe) || // Finally, we fallback to the dialog element itself.
|
|
833
|
-
Y,
|
|
834
|
-
He(
|
|
833
|
+
Y, g = re(a);
|
|
834
|
+
He(g ? a : null) && (ft(!0), queueMicrotask(() => {
|
|
835
835
|
a.focus(), Ke && a.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
836
836
|
}));
|
|
837
837
|
}, [
|
|
@@ -844,13 +844,13 @@ var Dr = Z(function(t) {
|
|
|
844
844
|
fe,
|
|
845
845
|
He
|
|
846
846
|
]);
|
|
847
|
-
const ue = !!I, Ne =
|
|
847
|
+
const ue = !!I, Ne = ge(I), [ie, Me] = X(!1);
|
|
848
848
|
F(() => {
|
|
849
849
|
if (A)
|
|
850
850
|
return Me(!0), () => Me(!1);
|
|
851
851
|
}, [A]);
|
|
852
852
|
const J = le(
|
|
853
|
-
(a,
|
|
853
|
+
(a, g = !0) => {
|
|
854
854
|
const { disclosureElement: x } = d.getState();
|
|
855
855
|
if (Fr(a)) return;
|
|
856
856
|
let p = Ge(N) || x;
|
|
@@ -866,7 +866,7 @@ var Dr = Z(function(t) {
|
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
const w = p && re(p);
|
|
869
|
-
if (!w &&
|
|
869
|
+
if (!w && g) {
|
|
870
870
|
requestAnimationFrame(() => J(a, !1));
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
@@ -876,11 +876,11 @@ var Dr = Z(function(t) {
|
|
|
876
876
|
), de = H(!1);
|
|
877
877
|
L(() => {
|
|
878
878
|
if (A || !ie || !ue) return;
|
|
879
|
-
const a =
|
|
879
|
+
const a = v.current;
|
|
880
880
|
de.current = !0, J(a);
|
|
881
881
|
}, [A, ie, S, ue, J]), F(() => {
|
|
882
882
|
if (!ie || !ue) return;
|
|
883
|
-
const a =
|
|
883
|
+
const a = v.current;
|
|
884
884
|
return () => {
|
|
885
885
|
if (de.current) {
|
|
886
886
|
de.current = !1;
|
|
@@ -889,15 +889,15 @@ var Dr = Z(function(t) {
|
|
|
889
889
|
J(a);
|
|
890
890
|
};
|
|
891
891
|
}, [ie, ue, J]);
|
|
892
|
-
const Ve =
|
|
893
|
-
F(() => !S || !R ? void 0 : Se("keydown", (
|
|
894
|
-
if (
|
|
895
|
-
const x =
|
|
892
|
+
const Ve = ge(E);
|
|
893
|
+
F(() => !S || !R ? void 0 : Se("keydown", (g) => {
|
|
894
|
+
if (g.key !== "Escape" || g.defaultPrevented) return;
|
|
895
|
+
const x = v.current;
|
|
896
896
|
if (!x || Re(x)) return;
|
|
897
|
-
const p =
|
|
897
|
+
const p = g.target;
|
|
898
898
|
if (!p) return;
|
|
899
899
|
const { disclosureElement: w } = d.getState();
|
|
900
|
-
!!(p.tagName === "BODY" || C(x, p) || !w || C(w, p)) && Ve(
|
|
900
|
+
!!(p.tagName === "BODY" || C(x, p) || !w || C(w, p)) && Ve(g) && d.hide();
|
|
901
901
|
}, !0), [d, S, R, Ve]), l = Q(
|
|
902
902
|
l,
|
|
903
903
|
(a) => /* @__PURE__ */ m.jsx(hr, { level: u ? 1 : void 0, children: a }),
|
|
@@ -920,10 +920,10 @@ var Dr = Z(function(t) {
|
|
|
920
920
|
] }) : a,
|
|
921
921
|
[d, h, Ie, $e]
|
|
922
922
|
);
|
|
923
|
-
const [dt, pt] = X(), [
|
|
923
|
+
const [dt, pt] = X(), [vt, gt] = X();
|
|
924
924
|
return l = Q(
|
|
925
925
|
l,
|
|
926
|
-
(a) => /* @__PURE__ */ m.jsx(Mt, { value: d, children: /* @__PURE__ */ m.jsx(Vt.Provider, { value: pt, children: /* @__PURE__ */ m.jsx(It.Provider, { value:
|
|
926
|
+
(a) => /* @__PURE__ */ m.jsx(Mt, { value: d, children: /* @__PURE__ */ m.jsx(Vt.Provider, { value: pt, children: /* @__PURE__ */ m.jsx(It.Provider, { value: gt, children: a }) }) }),
|
|
927
927
|
[d]
|
|
928
928
|
), l = D(y({
|
|
929
929
|
id: _,
|
|
@@ -931,9 +931,9 @@ var Dr = Z(function(t) {
|
|
|
931
931
|
role: "dialog",
|
|
932
932
|
tabIndex: i ? -1 : void 0,
|
|
933
933
|
"aria-labelledby": dt,
|
|
934
|
-
"aria-describedby":
|
|
934
|
+
"aria-describedby": vt
|
|
935
935
|
}, l), {
|
|
936
|
-
ref: Ze(
|
|
936
|
+
ref: Ze(v, l.ref)
|
|
937
937
|
}), l = st(D(y({}, l), {
|
|
938
938
|
autoFocusOnShow: lt
|
|
939
939
|
})), l = et(y({ store: d }, l)), l = At(D(y({}, l), { focusable: i })), l = it(D(y({ portal: c }, l), { portalRef: oe, preserveTabOrder: fe })), l;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as F, _ as p, k as m, l as I, a as O, b as _, d as x, e as Y, g as T, m as j, n as w, o as H, p as L, q as V, r as z, f as G, h as J } from "./LVA2YJMS-DDEmK0pp.mjs";
|
|
3
|
+
import { useRef as C, useState as D, useEffect as Q } from "react";
|
|
4
|
+
var W = "button";
|
|
5
|
+
function M(s) {
|
|
6
|
+
if (!s.isTrusted) return !1;
|
|
7
|
+
const t = s.currentTarget;
|
|
8
|
+
return s.key === "Enter" ? m(t) || t.tagName === "SUMMARY" || t.tagName === "A" : s.key === " " ? m(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
|
|
9
|
+
}
|
|
10
|
+
var X = Symbol("command"), Z = F(
|
|
11
|
+
function(t) {
|
|
12
|
+
var o = t, { clickOnEnter: d = !0, clickOnSpace: u = !0 } = o, r = p(o, ["clickOnEnter", "clickOnSpace"]);
|
|
13
|
+
const c = C(null), [K, R] = D(!1);
|
|
14
|
+
Q(() => {
|
|
15
|
+
c.current && R(m(c.current));
|
|
16
|
+
}, []);
|
|
17
|
+
const [U, k] = D(!1), f = C(!1), y = I(r), [E, h] = O(r, X, !0), g = r.onKeyDown, q = _((e) => {
|
|
18
|
+
g == null || g(e);
|
|
19
|
+
const a = e.currentTarget;
|
|
20
|
+
if (e.defaultPrevented || E || y || !H(e) || L(a) || a.isContentEditable) return;
|
|
21
|
+
const i = d && e.key === "Enter", n = u && e.key === " ", b = e.key === "Enter" && !d, l = e.key === " " && !u;
|
|
22
|
+
if (b || l) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (i || n) {
|
|
27
|
+
const v = M(e);
|
|
28
|
+
if (i) {
|
|
29
|
+
if (!v) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const S = e, { view: $ } = S, B = p(S, ["view"]), N = () => w(a, B);
|
|
32
|
+
V() ? z(a, "keyup", N) : queueMicrotask(N);
|
|
33
|
+
}
|
|
34
|
+
} else n && (f.current = !0, v || (e.preventDefault(), k(!0)));
|
|
35
|
+
}
|
|
36
|
+
}), P = r.onKeyUp, A = _((e) => {
|
|
37
|
+
if (P == null || P(e), e.defaultPrevented || E || y || e.metaKey) return;
|
|
38
|
+
const a = u && e.key === " ";
|
|
39
|
+
if (f.current && a && (f.current = !1, !M(e))) {
|
|
40
|
+
e.preventDefault(), k(!1);
|
|
41
|
+
const i = e.currentTarget, n = e, { view: b } = n, l = p(n, ["view"]);
|
|
42
|
+
queueMicrotask(() => w(i, l));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return r = x(T(T({
|
|
46
|
+
"data-active": U || void 0,
|
|
47
|
+
type: K ? "button" : void 0
|
|
48
|
+
}, h), r), {
|
|
49
|
+
ref: Y(c, r.ref),
|
|
50
|
+
onKeyDown: q,
|
|
51
|
+
onKeyUp: A
|
|
52
|
+
}), r = j(r), r;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
G(function(t) {
|
|
56
|
+
const o = Z(t);
|
|
57
|
+
return J(W, o);
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
Z as u
|
|
61
|
+
};
|