welcome-ui 10.0.8 → 10.1.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/{2S4Q4M35-CzDcLRQb.js → 2S4Q4M35-BtTn_beR.js} +73 -73
- package/dist/{33YRLYNQ-DFqMVRhj.js → 33YRLYNQ-D8tZ5okI.js} +2 -2
- package/dist/{7LQR24VD-CdN4ElmK.js → 7LQR24VD-BKovnxCC.js} +3 -3
- package/dist/{7P7IWEBR-DjpitcS1.js → 7P7IWEBR-DGEktSAM.js} +3 -3
- package/dist/Accordion.css +1 -1
- package/dist/Accordion.js +156 -34
- package/dist/Button.js +1 -1
- package/dist/{C2LT7CSX-B3kzKaLP.js → C2LT7CSX-Bvyi0GRw.js} +3 -3
- package/dist/Checkbox.js +1 -1
- package/dist/{D7BWB6V7-DxIuJTrh.js → D7BWB6V7-a3HjPOg_.js} +3 -3
- package/dist/Drawer.js +4 -4
- package/dist/DropdownMenu.js +14 -13
- package/dist/{E7PWFDGB-Cq0dD9y0.js → E7PWFDGB-2yv3Gy1s.js} +11 -11
- package/dist/{FIT2LC3L-CPJXByLq.js → FIT2LC3L-D7_i9cSG.js} +3 -3
- package/dist/{GYHYTZZN-DHSdjG7J.js → GYHYTZZN-Xp0fZyyw.js} +3 -3
- package/dist/{IAC2O6VC-C6SD2BcH.js → IAC2O6VC-Bk3bztmV.js} +30 -30
- package/dist/Icon.js +6 -5
- package/dist/{J4DPQC5Y-DoYyOPpe.js → J4DPQC5Y-96_qPACp.js} +5 -5
- package/dist/{MWF5B7KS-DoHIdPSn.js → MWF5B7KS-BwHRQwDi.js} +2 -2
- package/dist/Modal.js +4 -4
- package/dist/{NG75I6FS-75TMhlpH.js → NG75I6FS-DP8LcadD.js} +4 -4
- package/dist/{NJZUP4KO-C2NOv_C-.js → NJZUP4KO-CuYgeQRh.js} +7 -7
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.js +31 -31
- package/dist/Popover.js +3 -3
- package/dist/{Q3KUZPD7-rHtne1MQ.js → Q3KUZPD7-CfUCRwV-.js} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +3 -3
- package/dist/RadioTab.js +1 -1
- package/dist/Tabs.js +36 -35
- package/dist/Toggle.js +1 -1
- package/dist/Tooltip.js +4 -4
- package/dist/{US3TW2XI-C1E9L32T.js → US3TW2XI-DX1q1W_L.js} +5 -5
- package/dist/{VEHC2EHR-Cwt53vgQ.js → VEHC2EHR-BMk2-8Yl.js} +2 -2
- package/dist/{WJ7PHYH7-DfBy-oR4.js → WJ7PHYH7-BWnh2QSF.js} +5 -5
- package/dist/Window.js +1 -1
- package/dist/scss/breakpoints.scss +5 -5
- package/dist/{tab-panel-Bs1vehNH.js → tab-panel-j7xVgkpE.js} +7 -7
- package/dist/types/components/Accordion/index.d.ts +42 -1
- package/dist/types/components/Accordion/types.d.ts +3 -7
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/Icon/icons.d.ts +2 -2
- package/dist/types/components/Modal/Assets/index.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext as yt, useRef as R, useContext as Pt, useState as q, useEffect as w, useCallback as at, useMemo as ge, isValidElement as ve } from "react";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as J, f as O, a as j, q as zt, k as N, Z as It, g as P, h as z, _ as U, $ as ft, a0 as Ot, a1 as he, a2 as me, a3 as be, a4 as xt, Q as I, t as A, u as Gt, a5 as Ee, a6 as pe, Y as ye, J as Jt, a7 as Pe, a8 as xe, R as dt, a9 as De, aa as we, j as Se, ab as Kt, M as Fe, m as gt, ac as Ae, ad as Z, X as Te, V as Ce, ae as Le, af as Re } from "./US3TW2XI-DX1q1W_L.js";
|
|
4
4
|
import { createPortal as kt, flushSync as Ne } from "react-dom";
|
|
5
5
|
import { jsx as E, jsxs as it, Fragment as st } from "react/jsx-runtime";
|
|
6
|
-
import { b as _, d as Me, u as
|
|
7
|
-
import { u as
|
|
8
|
-
var Bt = yt(null), qe = "span",
|
|
6
|
+
import { b as _, d as Me, u as Ve } from "./Q3KUZPD7-CfUCRwV-.js";
|
|
7
|
+
import { u as He, d as Qt, e as $e, f as _e, b as Dt, i as Ie, g as Oe, h as ke, j as Be } from "./33YRLYNQ-D8tZ5okI.js";
|
|
8
|
+
var Bt = yt(null), qe = "span", Ut = J(
|
|
9
9
|
function(e) {
|
|
10
10
|
return e = {
|
|
11
11
|
...e,
|
|
@@ -25,10 +25,10 @@ var Bt = yt(null), qe = "span", Qt = G(
|
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
O(function(e) {
|
|
28
|
-
const n =
|
|
28
|
+
const n = Ut(e);
|
|
29
29
|
return j(qe, n);
|
|
30
30
|
});
|
|
31
|
-
var We = "span", je =
|
|
31
|
+
var We = "span", je = J(
|
|
32
32
|
function(e) {
|
|
33
33
|
return e = {
|
|
34
34
|
"data-focus-trap": "",
|
|
@@ -42,7 +42,7 @@ var We = "span", je = G(
|
|
|
42
42
|
left: 0,
|
|
43
43
|
...e.style
|
|
44
44
|
}
|
|
45
|
-
}, e =
|
|
45
|
+
}, e = Ut(e), e;
|
|
46
46
|
}
|
|
47
47
|
), ut = O(function(e) {
|
|
48
48
|
const n = je(e);
|
|
@@ -54,7 +54,7 @@ function Xe(t) {
|
|
|
54
54
|
function ze(t, e) {
|
|
55
55
|
return e ? typeof e == "function" ? e(t) : e : P(t).createElement("div");
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ge(t = "id") {
|
|
58
58
|
return `${t ? `${t}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
|
|
59
59
|
}
|
|
60
60
|
function $(t) {
|
|
@@ -62,7 +62,7 @@ function $(t) {
|
|
|
62
62
|
t == null || t.focus();
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
var Zt =
|
|
65
|
+
var Zt = J(function({
|
|
66
66
|
preserveTabOrder: e,
|
|
67
67
|
preserveTabOrderAnchor: n,
|
|
68
68
|
portalElement: r,
|
|
@@ -70,9 +70,9 @@ var Zt = G(function({
|
|
|
70
70
|
portal: o = !0,
|
|
71
71
|
...u
|
|
72
72
|
}) {
|
|
73
|
-
const c = R(null), f = zt(c, u.ref), b = Pt(Bt), [l, T] = q(null), [p,
|
|
73
|
+
const c = R(null), f = zt(c, u.ref), b = Pt(Bt), [l, T] = q(null), [p, H] = q(
|
|
74
74
|
null
|
|
75
|
-
), k = R(null), M = R(null), Y = R(null),
|
|
75
|
+
), k = R(null), M = R(null), Y = R(null), V = R(null);
|
|
76
76
|
return N(() => {
|
|
77
77
|
const a = c.current;
|
|
78
78
|
if (!a || !o) {
|
|
@@ -85,21 +85,21 @@ var Zt = G(function({
|
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
const m = v.isConnected;
|
|
88
|
-
if (m || (b || Xe(a)).appendChild(v), v.id || (v.id = a.id ? `portal/${a.id}` :
|
|
88
|
+
if (m || (b || Xe(a)).appendChild(v), v.id || (v.id = a.id ? `portal/${a.id}` : Ge()), T(v), It(i, v), !m)
|
|
89
89
|
return () => {
|
|
90
90
|
v.remove(), It(i, null);
|
|
91
91
|
};
|
|
92
92
|
}, [o, r, b, i]), N(() => {
|
|
93
93
|
if (!o || !e || !n) return;
|
|
94
94
|
const v = P(n).createElement("span");
|
|
95
|
-
return v.style.position = "fixed", n.insertAdjacentElement("afterend", v),
|
|
96
|
-
v.remove(),
|
|
95
|
+
return v.style.position = "fixed", n.insertAdjacentElement("afterend", v), H(v), () => {
|
|
96
|
+
v.remove(), H(null);
|
|
97
97
|
};
|
|
98
98
|
}, [o, e, n]), w(() => {
|
|
99
99
|
if (!l || !e) return;
|
|
100
100
|
let a = 0;
|
|
101
101
|
const v = (m) => {
|
|
102
|
-
if (!
|
|
102
|
+
if (!U(m)) return;
|
|
103
103
|
const d = m.type === "focusin";
|
|
104
104
|
if (cancelAnimationFrame(a), d)
|
|
105
105
|
return he(l);
|
|
@@ -135,7 +135,7 @@ var Zt = G(function({
|
|
|
135
135
|
"data-focus-trap": u.id,
|
|
136
136
|
className: "__focus-trap-inner-before",
|
|
137
137
|
onFocus: (m) => {
|
|
138
|
-
|
|
138
|
+
U(m, l) ? $(ft()) : $(k.current);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
),
|
|
@@ -147,7 +147,7 @@ var Zt = G(function({
|
|
|
147
147
|
"data-focus-trap": u.id,
|
|
148
148
|
className: "__focus-trap-inner-after",
|
|
149
149
|
onFocus: (m) => {
|
|
150
|
-
|
|
150
|
+
U(m, l) ? $(Ot()) : $(V.current);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
)
|
|
@@ -160,7 +160,7 @@ var Zt = G(function({
|
|
|
160
160
|
"data-focus-trap": u.id,
|
|
161
161
|
className: "__focus-trap-outer-before",
|
|
162
162
|
onFocus: (m) => {
|
|
163
|
-
!(m.relatedTarget ===
|
|
163
|
+
!(m.relatedTarget === V.current) && U(m, l) ? $(M.current) : $(Ot());
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
),
|
|
@@ -170,11 +170,11 @@ var Zt = G(function({
|
|
|
170
170
|
e && l && /* @__PURE__ */ E(
|
|
171
171
|
ut,
|
|
172
172
|
{
|
|
173
|
-
ref:
|
|
173
|
+
ref: V,
|
|
174
174
|
"data-focus-trap": u.id,
|
|
175
175
|
className: "__focus-trap-outer-after",
|
|
176
176
|
onFocus: (m) => {
|
|
177
|
-
if (
|
|
177
|
+
if (U(m, l))
|
|
178
178
|
$(Y.current);
|
|
179
179
|
else {
|
|
180
180
|
const d = ft();
|
|
@@ -210,14 +210,14 @@ O(function(e) {
|
|
|
210
210
|
return j(Ye, n);
|
|
211
211
|
});
|
|
212
212
|
var qt = yt(0);
|
|
213
|
-
function
|
|
213
|
+
function Je({ level: t, children: e }) {
|
|
214
214
|
const n = Pt(qt), r = Math.max(
|
|
215
215
|
Math.min(t || n + 1, 6),
|
|
216
216
|
1
|
|
217
217
|
);
|
|
218
218
|
return /* @__PURE__ */ E(qt.Provider, { value: r, children: e });
|
|
219
219
|
}
|
|
220
|
-
var
|
|
220
|
+
var Ke = "div", te = J(function({ autoFocusOnShow: e = !0, ...n }) {
|
|
221
221
|
return n = z(
|
|
222
222
|
n,
|
|
223
223
|
(r) => /* @__PURE__ */ E(be.Provider, { value: e, children: r }),
|
|
@@ -226,9 +226,9 @@ var Je = "div", te = G(function({ autoFocusOnShow: e = !0, ...n }) {
|
|
|
226
226
|
});
|
|
227
227
|
O(function(e) {
|
|
228
228
|
const n = te(e);
|
|
229
|
-
return j(
|
|
229
|
+
return j(Ke, n);
|
|
230
230
|
});
|
|
231
|
-
function
|
|
231
|
+
function Qe(t, e) {
|
|
232
232
|
const r = P(t).createElement("button");
|
|
233
233
|
return r.type = "button", r.tabIndex = -1, r.textContent = "Dismiss popup", Object.assign(r.style, {
|
|
234
234
|
border: "0px",
|
|
@@ -244,7 +244,7 @@ function Ke(t, e) {
|
|
|
244
244
|
r.removeEventListener("click", e), r.remove();
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Ue(t) {
|
|
248
248
|
const e = R();
|
|
249
249
|
return w(() => {
|
|
250
250
|
if (!t) {
|
|
@@ -351,25 +351,25 @@ function ee(t, ...e) {
|
|
|
351
351
|
const n = t.getAttribute("data-backdrop");
|
|
352
352
|
return n == null ? !1 : n === "" || n === "true" || !e.length ? !0 : e.some((r) => n === r);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function G(t = "", e = !1) {
|
|
355
355
|
return `__ariakit-dialog-${e ? "ancestor" : "outside"}${t ? `-${t}` : ""}`;
|
|
356
356
|
}
|
|
357
357
|
function on(t, e = "") {
|
|
358
358
|
return I(
|
|
359
|
-
W(t,
|
|
360
|
-
W(t,
|
|
359
|
+
W(t, G(), !0),
|
|
360
|
+
W(t, G(e), !0)
|
|
361
361
|
);
|
|
362
362
|
}
|
|
363
363
|
function ne(t, e = "") {
|
|
364
364
|
return I(
|
|
365
|
-
W(t,
|
|
366
|
-
W(t,
|
|
365
|
+
W(t, G("", !0), !0),
|
|
366
|
+
W(t, G(e, !0), !0)
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
369
|
function Ft(t, e) {
|
|
370
|
-
const n =
|
|
370
|
+
const n = G(e, !0);
|
|
371
371
|
if (t[n]) return !0;
|
|
372
|
-
const r =
|
|
372
|
+
const r = G(e);
|
|
373
373
|
do {
|
|
374
374
|
if (t[r]) return !0;
|
|
375
375
|
if (!t.parentElement) return !1;
|
|
@@ -418,7 +418,7 @@ function ht({
|
|
|
418
418
|
capture: r,
|
|
419
419
|
domReady: i
|
|
420
420
|
}) {
|
|
421
|
-
const o =
|
|
421
|
+
const o = Gt(n), u = _(t, "open"), c = R(!1);
|
|
422
422
|
N(() => {
|
|
423
423
|
if (!u || !i) return;
|
|
424
424
|
const { contentElement: f } = t.getState();
|
|
@@ -436,7 +436,7 @@ function mt(t, e) {
|
|
|
436
436
|
return typeof t == "function" ? t(e) : !!t;
|
|
437
437
|
}
|
|
438
438
|
function cn(t, e, n) {
|
|
439
|
-
const r = _(t, "open"), i =
|
|
439
|
+
const r = _(t, "open"), i = Ue(r), o = { store: t, domReady: n, capture: !0 };
|
|
440
440
|
ht({
|
|
441
441
|
...o,
|
|
442
442
|
type: "click",
|
|
@@ -514,30 +514,30 @@ function gn(t, e, n) {
|
|
|
514
514
|
});
|
|
515
515
|
w(() => {
|
|
516
516
|
if (!r() || !t) return;
|
|
517
|
-
const i = P(t), o =
|
|
517
|
+
const i = P(t), o = Jt(t), { documentElement: u, body: c } = i, f = u.style.getPropertyValue("--scrollbar-width"), b = f ? Number.parseInt(f, 10) : o.innerWidth - u.clientWidth, l = () => Ze(
|
|
518
518
|
u,
|
|
519
519
|
"--scrollbar-width",
|
|
520
520
|
`${b}px`
|
|
521
521
|
), T = dn(u), p = () => bt(c, {
|
|
522
522
|
overflow: "hidden",
|
|
523
523
|
[T]: `${b}px`
|
|
524
|
-
}),
|
|
524
|
+
}), H = () => {
|
|
525
525
|
var M, Y;
|
|
526
|
-
const { scrollX:
|
|
526
|
+
const { scrollX: V, scrollY: a, visualViewport: v } = o, m = (M = v == null ? void 0 : v.offsetLeft) != null ? M : 0, d = (Y = v == null ? void 0 : v.offsetTop) != null ? Y : 0, X = bt(c, {
|
|
527
527
|
position: "fixed",
|
|
528
528
|
overflow: "hidden",
|
|
529
529
|
top: `${-(a - Math.floor(d))}px`,
|
|
530
|
-
left: `${-(
|
|
530
|
+
left: `${-(V - Math.floor(m))}px`,
|
|
531
531
|
right: "0",
|
|
532
532
|
[T]: `${b}px`
|
|
533
533
|
});
|
|
534
534
|
return () => {
|
|
535
|
-
X(), process.env.NODE_ENV !== "test" && o.scrollTo({ left:
|
|
535
|
+
X(), process.env.NODE_ENV !== "test" && o.scrollTo({ left: V, top: a, behavior: "instant" });
|
|
536
536
|
};
|
|
537
537
|
}, k = Pe() && !xe();
|
|
538
538
|
return I(
|
|
539
539
|
l(),
|
|
540
|
-
k ?
|
|
540
|
+
k ? H() : p()
|
|
541
541
|
);
|
|
542
542
|
}, [r, t]);
|
|
543
543
|
}
|
|
@@ -618,7 +618,7 @@ var bn = "div", En = [
|
|
|
618
618
|
"ul",
|
|
619
619
|
"svg"
|
|
620
620
|
];
|
|
621
|
-
|
|
621
|
+
J(
|
|
622
622
|
function(e) {
|
|
623
623
|
return e;
|
|
624
624
|
}
|
|
@@ -641,7 +641,7 @@ function pn({
|
|
|
641
641
|
alwaysVisible: n,
|
|
642
642
|
hidden: r
|
|
643
643
|
}) {
|
|
644
|
-
const i = R(null), o =
|
|
644
|
+
const i = R(null), o = He({ disclosure: t }), u = _(t, "contentElement");
|
|
645
645
|
w(() => {
|
|
646
646
|
const b = i.current, l = u;
|
|
647
647
|
b && l && (b.style.zIndex = getComputedStyle(l).zIndex);
|
|
@@ -652,7 +652,7 @@ function pn({
|
|
|
652
652
|
if (l)
|
|
653
653
|
return ne(l, b);
|
|
654
654
|
}, [u]);
|
|
655
|
-
const c =
|
|
655
|
+
const c = Qt({
|
|
656
656
|
ref: i,
|
|
657
657
|
store: o,
|
|
658
658
|
role: "presentation",
|
|
@@ -676,12 +676,12 @@ function Pn(t, e, n) {
|
|
|
676
676
|
return _e(t, e, n);
|
|
677
677
|
}
|
|
678
678
|
function xn(t = {}) {
|
|
679
|
-
const [e, n] =
|
|
679
|
+
const [e, n] = Ve(yn, t);
|
|
680
680
|
return Pn(e, n, t);
|
|
681
681
|
}
|
|
682
682
|
var Dn = "div", Yt = Re();
|
|
683
683
|
function wn(t) {
|
|
684
|
-
const e =
|
|
684
|
+
const e = Kt();
|
|
685
685
|
return !e || t && A(t, e) ? !1 : !!Z(e);
|
|
686
686
|
}
|
|
687
687
|
function Xt(t, e = !1) {
|
|
@@ -689,7 +689,7 @@ function Xt(t, e = !1) {
|
|
|
689
689
|
const n = "current" in t ? t.current : t;
|
|
690
690
|
return n ? e ? Z(n) ? n : null : n : null;
|
|
691
691
|
}
|
|
692
|
-
var Sn =
|
|
692
|
+
var Sn = J(function({
|
|
693
693
|
store: e,
|
|
694
694
|
open: n,
|
|
695
695
|
onClose: r,
|
|
@@ -702,11 +702,11 @@ var Sn = G(function({
|
|
|
702
702
|
getPersistentElements: l,
|
|
703
703
|
preventBodyScroll: T = !!o,
|
|
704
704
|
autoFocusOnShow: p = !0,
|
|
705
|
-
autoFocusOnHide:
|
|
705
|
+
autoFocusOnHide: H = !0,
|
|
706
706
|
initialFocus: k,
|
|
707
707
|
finalFocus: M,
|
|
708
708
|
unmountOnHide: Y,
|
|
709
|
-
unstable_treeSnapshotKey:
|
|
709
|
+
unstable_treeSnapshotKey: V,
|
|
710
710
|
...a
|
|
711
711
|
}) {
|
|
712
712
|
const v = Dt(), m = R(null), d = xn({
|
|
@@ -727,7 +727,7 @@ var Sn = G(function({
|
|
|
727
727
|
const { wrapElement: At, nestedDialogs: Tt } = ln(d);
|
|
728
728
|
a = z(a, At, [At]), N(() => {
|
|
729
729
|
if (!S) return;
|
|
730
|
-
const s = m.current, h =
|
|
730
|
+
const s = m.current, h = Kt(s, !0);
|
|
731
731
|
h && h.tagName !== "BODY" && (s && A(s, h) || d.setDisclosureElement(h));
|
|
732
732
|
}, [d, S]), Yt && w(() => {
|
|
733
733
|
if (!F) return;
|
|
@@ -749,10 +749,10 @@ var Sn = G(function({
|
|
|
749
749
|
if (!F || !x) return;
|
|
750
750
|
const s = m.current;
|
|
751
751
|
if (!s) return;
|
|
752
|
-
const h =
|
|
752
|
+
const h = Jt(s), y = h.visualViewport || h, g = () => {
|
|
753
753
|
var D, L;
|
|
754
|
-
const
|
|
755
|
-
s.style.setProperty("--dialog-viewport-height", `${
|
|
754
|
+
const Q = (L = (D = h.visualViewport) == null ? void 0 : D.height) != null ? L : h.innerHeight;
|
|
755
|
+
s.style.setProperty("--dialog-viewport-height", `${Q}px`);
|
|
756
756
|
};
|
|
757
757
|
return g(), y.addEventListener("resize", g), () => {
|
|
758
758
|
y.removeEventListener("resize", g);
|
|
@@ -761,7 +761,7 @@ var Sn = G(function({
|
|
|
761
761
|
if (!o || !F || !x) return;
|
|
762
762
|
const s = m.current;
|
|
763
763
|
if (!(!s || s.querySelector("[data-dialog-dismiss]")))
|
|
764
|
-
return
|
|
764
|
+
return Qe(s, d.hide);
|
|
765
765
|
}, [d, o, F, x]), N(() => {
|
|
766
766
|
if (!re() || S || !F || !x) return;
|
|
767
767
|
const s = m.current;
|
|
@@ -773,8 +773,8 @@ var Sn = G(function({
|
|
|
773
773
|
if (!C || !et) return;
|
|
774
774
|
const s = m.current;
|
|
775
775
|
return rn(C, [s]);
|
|
776
|
-
}, [C, et,
|
|
777
|
-
const Ct =
|
|
776
|
+
}, [C, et, V]);
|
|
777
|
+
const Ct = Gt(l);
|
|
778
778
|
N(() => {
|
|
779
779
|
if (!C || !et) return;
|
|
780
780
|
const { disclosureElement: s } = d.getState(), h = m.current, y = Ct() || [], g = [
|
|
@@ -793,7 +793,7 @@ var Sn = G(function({
|
|
|
793
793
|
Ct,
|
|
794
794
|
Tt,
|
|
795
795
|
o,
|
|
796
|
-
|
|
796
|
+
V
|
|
797
797
|
]);
|
|
798
798
|
const Lt = !!p, Rt = gt(p), [se, ae] = q(!1);
|
|
799
799
|
w(() => {
|
|
@@ -823,30 +823,30 @@ var Sn = G(function({
|
|
|
823
823
|
ct,
|
|
824
824
|
Rt
|
|
825
825
|
]);
|
|
826
|
-
const nt = !!
|
|
826
|
+
const nt = !!H, Nt = gt(H), [rt, Mt] = q(!1);
|
|
827
827
|
w(() => {
|
|
828
828
|
if (S)
|
|
829
829
|
return Mt(!0), () => Mt(!1);
|
|
830
830
|
}, [S]);
|
|
831
|
-
const
|
|
831
|
+
const K = at(
|
|
832
832
|
(s, h = !0) => {
|
|
833
833
|
const { disclosureElement: y } = d.getState();
|
|
834
834
|
if (wn(s)) return;
|
|
835
835
|
let g = Xt(M) || y;
|
|
836
836
|
if (g != null && g.id) {
|
|
837
|
-
const L = P(g),
|
|
837
|
+
const L = P(g), Q = `[aria-activedescendant="${g.id}"]`, ot = L.querySelector(Q);
|
|
838
838
|
ot && (g = ot);
|
|
839
839
|
}
|
|
840
840
|
if (g && !Z(g)) {
|
|
841
841
|
const L = g.closest("[data-dialog]");
|
|
842
842
|
if (L != null && L.id) {
|
|
843
|
-
const
|
|
843
|
+
const Q = P(L), ot = `[aria-controls~="${L.id}"]`, _t = Q.querySelector(ot);
|
|
844
844
|
_t && (g = _t);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
const D = g && Z(g);
|
|
848
848
|
if (!D && h) {
|
|
849
|
-
requestAnimationFrame(() =>
|
|
849
|
+
requestAnimationFrame(() => K(s, !1));
|
|
850
850
|
return;
|
|
851
851
|
}
|
|
852
852
|
Nt(D ? g : null) && D && (g == null || g.focus({ preventScroll: !0 }));
|
|
@@ -856,8 +856,8 @@ var Sn = G(function({
|
|
|
856
856
|
N(() => {
|
|
857
857
|
if (S || !rt || !nt) return;
|
|
858
858
|
const s = m.current;
|
|
859
|
-
lt.current = !0,
|
|
860
|
-
}, [S, rt, x, nt,
|
|
859
|
+
lt.current = !0, K(s);
|
|
860
|
+
}, [S, rt, x, nt, K]), w(() => {
|
|
861
861
|
if (!rt || !nt) return;
|
|
862
862
|
const s = m.current;
|
|
863
863
|
return () => {
|
|
@@ -865,10 +865,10 @@ var Sn = G(function({
|
|
|
865
865
|
lt.current = !1;
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
868
|
-
|
|
868
|
+
K(s);
|
|
869
869
|
};
|
|
870
|
-
}, [rt, nt,
|
|
871
|
-
const
|
|
870
|
+
}, [rt, nt, K]);
|
|
871
|
+
const Vt = gt(f);
|
|
872
872
|
w(() => !x || !F ? void 0 : xt("keydown", (h) => {
|
|
873
873
|
if (h.key !== "Escape" || h.defaultPrevented) return;
|
|
874
874
|
const y = m.current;
|
|
@@ -876,13 +876,13 @@ var Sn = G(function({
|
|
|
876
876
|
const g = h.target;
|
|
877
877
|
if (!g) return;
|
|
878
878
|
const { disclosureElement: D } = d.getState();
|
|
879
|
-
!!(g.tagName === "BODY" || A(y, g) || !D || A(D, g)) &&
|
|
880
|
-
}, !0), [d, x, F,
|
|
879
|
+
!!(g.tagName === "BODY" || A(y, g) || !D || A(D, g)) && Vt(h) && d.hide();
|
|
880
|
+
}, !0), [d, x, F, Vt]), a = z(
|
|
881
881
|
a,
|
|
882
|
-
(s) => /* @__PURE__ */ E(
|
|
882
|
+
(s) => /* @__PURE__ */ E(Je, { level: o ? 1 : void 0, children: s }),
|
|
883
883
|
[o]
|
|
884
884
|
);
|
|
885
|
-
const
|
|
885
|
+
const Ht = a.hidden, $t = a.alwaysVisible;
|
|
886
886
|
a = z(
|
|
887
887
|
a,
|
|
888
888
|
(s) => c ? /* @__PURE__ */ it(st, { children: [
|
|
@@ -891,13 +891,13 @@ var Sn = G(function({
|
|
|
891
891
|
{
|
|
892
892
|
store: d,
|
|
893
893
|
backdrop: c,
|
|
894
|
-
hidden:
|
|
894
|
+
hidden: Ht,
|
|
895
895
|
alwaysVisible: $t
|
|
896
896
|
}
|
|
897
897
|
),
|
|
898
898
|
s
|
|
899
899
|
] }) : s,
|
|
900
|
-
[d, c,
|
|
900
|
+
[d, c, Ht, $t]
|
|
901
901
|
);
|
|
902
902
|
const [ce, le] = q(), [fe, de] = q();
|
|
903
903
|
return a = z(
|
|
@@ -916,7 +916,7 @@ var Sn = G(function({
|
|
|
916
916
|
}, a = te({
|
|
917
917
|
...a,
|
|
918
918
|
autoFocusOnShow: se
|
|
919
|
-
}), a =
|
|
919
|
+
}), a = Qt({ store: d, ...a }), a = Te({ ...a, focusable: i }), a = Zt({ portal: u, ...a, portalRef: X, preserveTabOrder: ct }), a;
|
|
920
920
|
});
|
|
921
921
|
function Fn(t, e = Dt) {
|
|
922
922
|
return O(function(r) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { b as T, f as j, c as G, a as J, i as K, j as Q, k as f, h as X, q as Y, r as Z, x as v, y as ee } from "./US3TW2XI-
|
|
2
|
+
import { b as T, f as j, c as G, a as J, i as K, j as Q, k as f, h as X, q as Y, r as Z, x as v, y as ee } from "./US3TW2XI-DX1q1W_L.js";
|
|
3
3
|
import { createContext as w, useRef as te, useState as ne, useMemo as ae } from "react";
|
|
4
|
-
import { b as F, m as oe, o as ie, t as re, c as se, s as E, d as b, e as ue, u as le, a as y } from "./Q3KUZPD7-
|
|
4
|
+
import { b as F, m as oe, o as ie, t as re, c as se, s as E, d as b, e as ue, u as le, a as y } from "./Q3KUZPD7-CfUCRwV-.js";
|
|
5
5
|
import { flushSync as ce } from "react-dom";
|
|
6
6
|
import { jsx as I } from "react/jsx-runtime";
|
|
7
7
|
var P = T(), M = P.useProviderContext, de = P.ContextProvider, me = P.ScopedContextProvider, S = T(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as q } from "./WJ7PHYH7-
|
|
2
|
+
import { u as q } from "./WJ7PHYH7-BWnh2QSF.js";
|
|
3
3
|
import { createContext as w, useState as B, useRef as D, useEffect as H } from "react";
|
|
4
|
-
import { b as L, f as O, c as P, a as W, L as Y, B as _, Y as $, u as b, h as z, q as G, r as I } from "./US3TW2XI-
|
|
5
|
-
import { b as J } from "./Q3KUZPD7-
|
|
4
|
+
import { b as L, f as O, c as P, a as W, L as Y, B as _, Y as $, u as b, h as z, q as G, r as I } from "./US3TW2XI-DX1q1W_L.js";
|
|
5
|
+
import { b as J } from "./Q3KUZPD7-CfUCRwV-.js";
|
|
6
6
|
import { jsx as K } from "react/jsx-runtime";
|
|
7
7
|
var Q = w(!1), V = L(), X = V.useContext, A = "input";
|
|
8
8
|
function g(n, r) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { P as t, b as r } from "./MWF5B7KS-
|
|
3
|
-
import { C as a, a as i } from "./FIT2LC3L-
|
|
4
|
-
import { b as s } from "./US3TW2XI-
|
|
2
|
+
import { P as t, b as r } from "./MWF5B7KS-BwHRQwDi.js";
|
|
3
|
+
import { C as a, a as i } from "./FIT2LC3L-D7_i9cSG.js";
|
|
4
|
+
import { b as s } from "./US3TW2XI-DX1q1W_L.js";
|
|
5
5
|
import { createContext as o } from "react";
|
|
6
6
|
o(
|
|
7
7
|
void 0
|
package/dist/Accordion.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_4govd_2{width:100%;background-color:var(--color-background-neutral-inverse)}._accordion-disclosure_4govd_6{display:flex;gap:var(--spacing-md);align-items:flex-start;justify-content:space-between}._accordion-disclosure_4govd_6,._accordion-disclosure_4govd_6>*{cursor:pointer}._accordion-disclosure_4govd_6[aria-expanded=true] ._accordion-disclosure-arrow-icon_4govd_15{transform:rotate3d(0,0,1,180deg)}._accordion-header-wrapper_4govd_18{display:flex;gap:var(--accordion-padding-gap-content);flex-wrap:wrap;align-items:center;flex:1}._accordion-header_4govd_18{display:flex;flex-direction:column;gap:var(--accordion-padding-gap-subtitle)}._accordion-header-title-wrapper_4govd_30{display:flex;gap:var(--accordion-padding-gap-content);align-items:center}._accordion-header-with-tags-wrapper_4govd_35{display:flex;gap:var(--accordion-padding-gap-content);flex-wrap:wrap;align-items:flex-start;flex:1}._accordion-header-with-tags_4govd_35{display:flex;gap:var(--accordion-padding-gap-content);align-items:center;margin-right:auto}._accordion-tags_4govd_48{display:flex;gap:var(--accordion-padding-gap-tags);flex-wrap:wrap;align-self:flex-start}._accordion-disclosure-actions_4govd_54{flex-shrink:0}._accordion-disclosure-arrow-icon_4govd_15{transform:rotate3d(0,0,1,0);transition:var(--duration-medium);place-self:center}._accordion-title_4govd_62{color:var(--accordion-title-color-text-default)}._accordion-subtitle_4govd_65{color:var(--accordion-subtitle-color-text-default)}._accordion-content_4govd_68{display:grid;grid-template-rows:0fr;transition-property:grid-template-rows;transition-timing-function:linear;transition-duration:.2s;animation-duration:.2s}._accordion-content_4govd_68>._accordion-content-wrapper_4govd_76{overflow:hidden;padding:0}._accordion-content_4govd_68[data-enter]{grid-template-rows:1fr}}
|