@purpurds/date-picker 8.20.1 → 8.21.0
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/LICENSE.txt +4 -4
- package/dist/date-picker.cjs.js +4 -4
- package/dist/date-picker.cjs.js.map +1 -1
- package/dist/date-picker.es.js +650 -639
- package/dist/date-picker.es.js.map +1 -1
- package/package.json +10 -10
package/dist/date-picker.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as Q, jsx as v, Fragment as Tt } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import
|
|
3
|
+
import E, { useLayoutEffect as Cn, createContext as is, forwardRef as De, useState as Be, useEffect as Dn, useMemo as Mr, useCallback as Ne, useRef as st, useContext as as, useId as ss } from "react";
|
|
4
4
|
import * as $o from "react-dom";
|
|
5
5
|
import Kc from "react-dom";
|
|
6
6
|
function dr() {
|
|
@@ -655,12 +655,12 @@ async function Xl(e, t) {
|
|
|
655
655
|
elementContext: d = "floating",
|
|
656
656
|
altBoundary: p = !1,
|
|
657
657
|
padding: m = 0
|
|
658
|
-
} = ko(t, e), y = yl(m), g = s[p ? d === "floating" ? "reference" : "floating" : d],
|
|
658
|
+
} = ko(t, e), y = yl(m), g = s[p ? d === "floating" ? "reference" : "floating" : d], b = Jn(await o.getClippingRect({
|
|
659
659
|
element: (n = await (o.isElement == null ? void 0 : o.isElement(g))) == null || n ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
|
|
660
660
|
boundary: u,
|
|
661
661
|
rootBoundary: l,
|
|
662
662
|
strategy: c
|
|
663
|
-
})),
|
|
663
|
+
})), w = d === "floating" ? {
|
|
664
664
|
x: r,
|
|
665
665
|
y: i,
|
|
666
666
|
width: a.floating.width,
|
|
@@ -673,15 +673,15 @@ async function Xl(e, t) {
|
|
|
673
673
|
y: 1
|
|
674
674
|
}, x = Jn(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
675
675
|
elements: s,
|
|
676
|
-
rect:
|
|
676
|
+
rect: w,
|
|
677
677
|
offsetParent: _,
|
|
678
678
|
strategy: c
|
|
679
|
-
}) :
|
|
679
|
+
}) : w);
|
|
680
680
|
return {
|
|
681
|
-
top: (
|
|
682
|
-
bottom: (x.bottom -
|
|
683
|
-
left: (
|
|
684
|
-
right: (x.right -
|
|
681
|
+
top: (b.top - x.top + y.top) / $.y,
|
|
682
|
+
bottom: (x.bottom - b.bottom + y.bottom) / $.y,
|
|
683
|
+
left: (b.left - x.left + y.left) / $.x,
|
|
684
|
+
right: (x.right - b.right + y.right) / $.x
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
687
|
const Zl = async (e, t, n) => {
|
|
@@ -702,14 +702,14 @@ const Zl = async (e, t, n) => {
|
|
|
702
702
|
for (let g = 0; g < s.length; g++) {
|
|
703
703
|
var h;
|
|
704
704
|
const {
|
|
705
|
-
name:
|
|
706
|
-
fn:
|
|
705
|
+
name: b,
|
|
706
|
+
fn: w
|
|
707
707
|
} = s[g], {
|
|
708
708
|
x: _,
|
|
709
709
|
y: $,
|
|
710
710
|
data: x,
|
|
711
|
-
reset:
|
|
712
|
-
} = await
|
|
711
|
+
reset: S
|
|
712
|
+
} = await w({
|
|
713
713
|
x: l,
|
|
714
714
|
y: d,
|
|
715
715
|
initialPlacement: r,
|
|
@@ -728,15 +728,15 @@ const Zl = async (e, t, n) => {
|
|
|
728
728
|
});
|
|
729
729
|
l = _ ?? l, d = $ ?? d, m = {
|
|
730
730
|
...m,
|
|
731
|
-
[
|
|
732
|
-
...m[
|
|
731
|
+
[b]: {
|
|
732
|
+
...m[b],
|
|
733
733
|
...x
|
|
734
734
|
}
|
|
735
|
-
},
|
|
735
|
+
}, S && y <= 50 && (y++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await a.getElementRects({
|
|
736
736
|
reference: e,
|
|
737
737
|
floating: t,
|
|
738
738
|
strategy: i
|
|
739
|
-
}) :
|
|
739
|
+
}) : S.rects), {
|
|
740
740
|
x: l,
|
|
741
741
|
y: d
|
|
742
742
|
} = ti(u, p, c)), g = -1);
|
|
@@ -772,57 +772,57 @@ const Zl = async (e, t, n) => {
|
|
|
772
772
|
} = ko(e, t);
|
|
773
773
|
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
774
774
|
return {};
|
|
775
|
-
const
|
|
776
|
-
!p &&
|
|
777
|
-
const
|
|
775
|
+
const b = en(i), w = Dt(s), _ = en(s) === s, $ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = p || (_ || !h ? [Qn(s)] : fl(s)), S = y !== "none";
|
|
776
|
+
!p && S && x.push(...gl(s, h, y, $));
|
|
777
|
+
const M = [s, ...x], D = await c.detectOverflow(t, g), O = [];
|
|
778
778
|
let R = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
779
|
-
if (l &&
|
|
780
|
-
const
|
|
781
|
-
|
|
779
|
+
if (l && O.push(D[b]), d) {
|
|
780
|
+
const T = dl(i, a, $);
|
|
781
|
+
O.push(D[T[0]], D[T[1]]);
|
|
782
782
|
}
|
|
783
783
|
if (R = [...R, {
|
|
784
784
|
placement: i,
|
|
785
|
-
overflows:
|
|
786
|
-
}], !
|
|
787
|
-
var
|
|
788
|
-
const
|
|
789
|
-
if (N && (!(d === "alignment" ?
|
|
785
|
+
overflows: O
|
|
786
|
+
}], !O.every((T) => T <= 0)) {
|
|
787
|
+
var C, J;
|
|
788
|
+
const T = (((C = o.flip) == null ? void 0 : C.index) || 0) + 1, N = M[T];
|
|
789
|
+
if (N && (!(d === "alignment" ? w !== Dt(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
790
790
|
// overflows the main axis.
|
|
791
|
-
R.every((k) => Dt(k.placement) ===
|
|
791
|
+
R.every((k) => Dt(k.placement) === w ? k.overflows[0] > 0 : !0)))
|
|
792
792
|
return {
|
|
793
793
|
data: {
|
|
794
|
-
index:
|
|
794
|
+
index: T,
|
|
795
795
|
overflows: R
|
|
796
796
|
},
|
|
797
797
|
reset: {
|
|
798
798
|
placement: N
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
|
-
let
|
|
802
|
-
if (!
|
|
801
|
+
let L = (J = R.filter((q) => q.overflows[0] <= 0).sort((q, k) => q.overflows[1] - k.overflows[1])[0]) == null ? void 0 : J.placement;
|
|
802
|
+
if (!L)
|
|
803
803
|
switch (m) {
|
|
804
804
|
case "bestFit": {
|
|
805
|
-
var
|
|
806
|
-
const
|
|
807
|
-
if (
|
|
808
|
-
const
|
|
809
|
-
return
|
|
805
|
+
var B;
|
|
806
|
+
const q = (B = R.filter((k) => {
|
|
807
|
+
if (S) {
|
|
808
|
+
const A = Dt(k.placement);
|
|
809
|
+
return A === w || // Create a bias to the `y` side axis due to horizontal
|
|
810
810
|
// reading directions favoring greater width.
|
|
811
|
-
|
|
811
|
+
A === "y";
|
|
812
812
|
}
|
|
813
813
|
return !0;
|
|
814
|
-
}).map((k) => [k.placement, k.overflows.filter((
|
|
815
|
-
|
|
814
|
+
}).map((k) => [k.placement, k.overflows.filter((A) => A > 0).reduce((A, j) => A + j, 0)]).sort((k, A) => k[1] - A[1])[0]) == null ? void 0 : B[0];
|
|
815
|
+
q && (L = q);
|
|
816
816
|
break;
|
|
817
817
|
}
|
|
818
818
|
case "initialPlacement":
|
|
819
|
-
|
|
819
|
+
L = s;
|
|
820
820
|
break;
|
|
821
821
|
}
|
|
822
|
-
if (i !==
|
|
822
|
+
if (i !== L)
|
|
823
823
|
return {
|
|
824
824
|
reset: {
|
|
825
|
-
placement:
|
|
825
|
+
placement: L
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
828
|
}
|
|
@@ -930,7 +930,7 @@ function Nt(e, t, n, r) {
|
|
|
930
930
|
const p = Ce(o), m = r && ie(r) ? Ce(r) : r;
|
|
931
931
|
let y = p, h = ro(y);
|
|
932
932
|
for (; h && r && m !== y; ) {
|
|
933
|
-
const g = Gt(h),
|
|
933
|
+
const g = Gt(h), b = h.getBoundingClientRect(), w = Le(h), _ = b.left + (h.clientLeft + parseFloat(w.paddingLeft)) * g.x, $ = b.top + (h.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
934
934
|
c *= g.x, u *= g.y, l *= g.x, d *= g.y, c += _, u += $, y = Ce(h), h = ro(y);
|
|
935
935
|
}
|
|
936
936
|
}
|
|
@@ -1188,21 +1188,21 @@ function md(e, t) {
|
|
|
1188
1188
|
} = u;
|
|
1189
1189
|
if (s || t(), !p || !m)
|
|
1190
1190
|
return;
|
|
1191
|
-
const y = Wn(d), h = Wn(i.clientWidth - (l + p)), g = Wn(i.clientHeight - (d + m)),
|
|
1192
|
-
rootMargin: -y + "px " + -h + "px " + -g + "px " + -
|
|
1191
|
+
const y = Wn(d), h = Wn(i.clientWidth - (l + p)), g = Wn(i.clientHeight - (d + m)), b = Wn(l), _ = {
|
|
1192
|
+
rootMargin: -y + "px " + -h + "px " + -g + "px " + -b + "px",
|
|
1193
1193
|
threshold: Xt(0, oo(1, c)) || 1
|
|
1194
1194
|
};
|
|
1195
1195
|
let $ = !0;
|
|
1196
|
-
function x(
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1196
|
+
function x(S) {
|
|
1197
|
+
const M = S[0].intersectionRatio;
|
|
1198
|
+
if (M !== c) {
|
|
1199
1199
|
if (!$)
|
|
1200
1200
|
return a();
|
|
1201
|
-
|
|
1201
|
+
M ? a(!1, M) : r = setTimeout(() => {
|
|
1202
1202
|
a(!1, 1e-7);
|
|
1203
1203
|
}, 1e3);
|
|
1204
1204
|
}
|
|
1205
|
-
|
|
1205
|
+
M === 1 && !Cs(u, e.getBoundingClientRect()) && a(), $ = !1;
|
|
1206
1206
|
}
|
|
1207
1207
|
try {
|
|
1208
1208
|
n = new IntersectionObserver(x, {
|
|
@@ -1226,16 +1226,16 @@ function gd(e, t, n, r) {
|
|
|
1226
1226
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1227
1227
|
animationFrame: c = !1
|
|
1228
1228
|
} = r, u = Eo(e), l = i || o ? [...u ? xt(u) : [], ...xt(t)] : [];
|
|
1229
|
-
l.forEach((
|
|
1230
|
-
i &&
|
|
1229
|
+
l.forEach((b) => {
|
|
1230
|
+
i && b.addEventListener("scroll", n, {
|
|
1231
1231
|
passive: !0
|
|
1232
|
-
}), o &&
|
|
1232
|
+
}), o && b.addEventListener("resize", n);
|
|
1233
1233
|
});
|
|
1234
1234
|
const d = u && s ? md(u, n) : null;
|
|
1235
1235
|
let p = -1, m = null;
|
|
1236
|
-
a && (m = new ResizeObserver((
|
|
1237
|
-
let [
|
|
1238
|
-
|
|
1236
|
+
a && (m = new ResizeObserver((b) => {
|
|
1237
|
+
let [w] = b;
|
|
1238
|
+
w && w.target === u && m && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1239
1239
|
var _;
|
|
1240
1240
|
(_ = m) == null || _.observe(t);
|
|
1241
1241
|
})), n();
|
|
@@ -1243,14 +1243,14 @@ function gd(e, t, n, r) {
|
|
|
1243
1243
|
let y, h = c ? Nt(e) : null;
|
|
1244
1244
|
c && g();
|
|
1245
1245
|
function g() {
|
|
1246
|
-
const
|
|
1247
|
-
h && !Cs(h,
|
|
1246
|
+
const b = Nt(e);
|
|
1247
|
+
h && !Cs(h, b) && n(), h = b, y = requestAnimationFrame(g);
|
|
1248
1248
|
}
|
|
1249
1249
|
return n(), () => {
|
|
1250
|
-
var
|
|
1251
|
-
l.forEach((
|
|
1252
|
-
i &&
|
|
1253
|
-
}), d?.(), (
|
|
1250
|
+
var b;
|
|
1251
|
+
l.forEach((w) => {
|
|
1252
|
+
i && w.removeEventListener("scroll", n), o && w.removeEventListener("resize", n);
|
|
1253
|
+
}), d?.(), (b = m) == null || b.disconnect(), m = null, c && cancelAnimationFrame(y);
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
1256
|
const vd = Jl, yd = Gl, bd = (e, t, n) => {
|
|
@@ -1334,84 +1334,84 @@ function xd(e) {
|
|
|
1334
1334
|
isPositioned: !1
|
|
1335
1335
|
}), [p, m] = f.useState(r);
|
|
1336
1336
|
or(p, r) || m(r);
|
|
1337
|
-
const [y, h] = f.useState(null), [g,
|
|
1338
|
-
k !==
|
|
1337
|
+
const [y, h] = f.useState(null), [g, b] = f.useState(null), w = f.useCallback((k) => {
|
|
1338
|
+
k !== S.current && (S.current = k, h(k));
|
|
1339
1339
|
}, []), _ = f.useCallback((k) => {
|
|
1340
|
-
k !==
|
|
1341
|
-
}, []), $ = o || y, x = a || g,
|
|
1342
|
-
if (!
|
|
1340
|
+
k !== M.current && (M.current = k, b(k));
|
|
1341
|
+
}, []), $ = o || y, x = a || g, S = f.useRef(null), M = f.useRef(null), D = f.useRef(l), O = c != null, R = Or(c), C = Or(i), J = Or(u), B = f.useCallback(() => {
|
|
1342
|
+
if (!S.current || !M.current)
|
|
1343
1343
|
return;
|
|
1344
1344
|
const k = {
|
|
1345
1345
|
placement: t,
|
|
1346
1346
|
strategy: n,
|
|
1347
1347
|
middleware: p
|
|
1348
1348
|
};
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
...
|
|
1349
|
+
C.current && (k.platform = C.current), bd(S.current, M.current, k).then((A) => {
|
|
1350
|
+
const j = {
|
|
1351
|
+
...A,
|
|
1352
1352
|
// The floating element's position may be recomputed while it's closed
|
|
1353
1353
|
// but still mounted (such as when transitioning out). To ensure
|
|
1354
1354
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1355
1355
|
// setting it to `true` when `open === false` (must be specified).
|
|
1356
1356
|
isPositioned: J.current !== !1
|
|
1357
1357
|
};
|
|
1358
|
-
|
|
1359
|
-
d(
|
|
1358
|
+
T.current && !or(D.current, j) && (D.current = j, $o.flushSync(() => {
|
|
1359
|
+
d(j);
|
|
1360
1360
|
}));
|
|
1361
1361
|
});
|
|
1362
|
-
}, [p, t, n,
|
|
1362
|
+
}, [p, t, n, C, J]);
|
|
1363
1363
|
Xn(() => {
|
|
1364
|
-
u === !1 &&
|
|
1364
|
+
u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, d((k) => ({
|
|
1365
1365
|
...k,
|
|
1366
1366
|
isPositioned: !1
|
|
1367
1367
|
})));
|
|
1368
1368
|
}, [u]);
|
|
1369
|
-
const
|
|
1370
|
-
Xn(() => (
|
|
1371
|
-
|
|
1369
|
+
const T = f.useRef(!1);
|
|
1370
|
+
Xn(() => (T.current = !0, () => {
|
|
1371
|
+
T.current = !1;
|
|
1372
1372
|
}), []), Xn(() => {
|
|
1373
|
-
if ($ && (
|
|
1373
|
+
if ($ && (S.current = $), x && (M.current = x), $ && x) {
|
|
1374
1374
|
if (R.current)
|
|
1375
|
-
return R.current($, x,
|
|
1376
|
-
|
|
1375
|
+
return R.current($, x, B);
|
|
1376
|
+
B();
|
|
1377
1377
|
}
|
|
1378
|
-
}, [$, x,
|
|
1378
|
+
}, [$, x, B, R, O]);
|
|
1379
1379
|
const N = f.useMemo(() => ({
|
|
1380
|
-
reference:
|
|
1381
|
-
floating:
|
|
1382
|
-
setReference:
|
|
1380
|
+
reference: S,
|
|
1381
|
+
floating: M,
|
|
1382
|
+
setReference: w,
|
|
1383
1383
|
setFloating: _
|
|
1384
|
-
}), [
|
|
1384
|
+
}), [w, _]), L = f.useMemo(() => ({
|
|
1385
1385
|
reference: $,
|
|
1386
1386
|
floating: x
|
|
1387
|
-
}), [$, x]),
|
|
1387
|
+
}), [$, x]), q = f.useMemo(() => {
|
|
1388
1388
|
const k = {
|
|
1389
1389
|
position: n,
|
|
1390
1390
|
left: 0,
|
|
1391
1391
|
top: 0
|
|
1392
1392
|
};
|
|
1393
|
-
if (!
|
|
1393
|
+
if (!L.floating)
|
|
1394
1394
|
return k;
|
|
1395
|
-
const
|
|
1395
|
+
const A = ii(L.floating, l.x), j = ii(L.floating, l.y);
|
|
1396
1396
|
return s ? {
|
|
1397
1397
|
...k,
|
|
1398
|
-
transform: "translate(" +
|
|
1399
|
-
...Ds(
|
|
1398
|
+
transform: "translate(" + A + "px, " + j + "px)",
|
|
1399
|
+
...Ds(L.floating) >= 1.5 && {
|
|
1400
1400
|
willChange: "transform"
|
|
1401
1401
|
}
|
|
1402
1402
|
} : {
|
|
1403
1403
|
position: n,
|
|
1404
|
-
left:
|
|
1405
|
-
top:
|
|
1404
|
+
left: A,
|
|
1405
|
+
top: j
|
|
1406
1406
|
};
|
|
1407
|
-
}, [n, s,
|
|
1407
|
+
}, [n, s, L.floating, l.x, l.y]);
|
|
1408
1408
|
return f.useMemo(() => ({
|
|
1409
1409
|
...l,
|
|
1410
|
-
update:
|
|
1410
|
+
update: B,
|
|
1411
1411
|
refs: N,
|
|
1412
|
-
elements:
|
|
1413
|
-
floatingStyles:
|
|
1414
|
-
}), [l,
|
|
1412
|
+
elements: L,
|
|
1413
|
+
floatingStyles: q
|
|
1414
|
+
}), [l, B, N, L, q]);
|
|
1415
1415
|
}
|
|
1416
1416
|
const $d = (e, t) => ({
|
|
1417
1417
|
...vd(e),
|
|
@@ -1520,15 +1520,15 @@ function Fd(e, t, n, r) {
|
|
|
1520
1520
|
if (s.has(y))
|
|
1521
1521
|
p(y);
|
|
1522
1522
|
else {
|
|
1523
|
-
const h = o ? y.getAttribute(o) : null, g = h !== null && h !== "false",
|
|
1524
|
-
|
|
1523
|
+
const h = o ? y.getAttribute(o) : null, g = h !== null && h !== "false", b = di(o), w = (b.get(y) || 0) + 1, _ = (l.get(y) || 0) + 1;
|
|
1524
|
+
b.set(y, w), l.set(y, _), u.push(y), w === 1 && g && In.add(y), _ === 1 && y.setAttribute(i, ""), !g && o && y.setAttribute(o, o === "inert" ? "" : "true");
|
|
1525
1525
|
}
|
|
1526
1526
|
});
|
|
1527
1527
|
}
|
|
1528
1528
|
return Tr++, () => {
|
|
1529
1529
|
u.forEach((m) => {
|
|
1530
|
-
const y = di(o), g = (y.get(m) || 0) - 1,
|
|
1531
|
-
y.set(m, g), l.set(m,
|
|
1530
|
+
const y = di(o), g = (y.get(m) || 0) - 1, b = (l.get(m) || 0) - 1;
|
|
1531
|
+
y.set(m, g), l.set(m, b), g || (!In.has(m) && o && m.removeAttribute(o), In.delete(m)), b || m.removeAttribute(i);
|
|
1532
1532
|
}), Tr--, Tr || (Kt.inert = /* @__PURE__ */ new WeakMap(), Kt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Kt.none = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakSet(), Fn = {});
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
@@ -1644,8 +1644,8 @@ function Bd(e) {
|
|
|
1644
1644
|
var g;
|
|
1645
1645
|
(g = l.current) == null || g.focus();
|
|
1646
1646
|
} else {
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1647
|
+
const b = a ? a.domReference : null, w = xs(b);
|
|
1648
|
+
w?.focus();
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
}), y && o && /* @__PURE__ */ v("span", {
|
|
@@ -1659,8 +1659,8 @@ function Bd(e) {
|
|
|
1659
1659
|
var g;
|
|
1660
1660
|
(g = d.current) == null || g.focus();
|
|
1661
1661
|
} else {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1662
|
+
const b = a ? a.domReference : null, w = _s(b);
|
|
1663
|
+
w?.focus(), a?.closeOnFocusOut && a?.onOpenChange(!1, h.nativeEvent, "focus-out");
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
})]
|
|
@@ -1727,108 +1727,108 @@ function Vd(e) {
|
|
|
1727
1727
|
open: y,
|
|
1728
1728
|
onOpenChange: h,
|
|
1729
1729
|
events: g,
|
|
1730
|
-
dataRef:
|
|
1730
|
+
dataRef: b,
|
|
1731
1731
|
elements: {
|
|
1732
|
-
domReference:
|
|
1732
|
+
domReference: w,
|
|
1733
1733
|
floating: _
|
|
1734
1734
|
}
|
|
1735
1735
|
} = t, $ = Ze(() => {
|
|
1736
|
-
var
|
|
1737
|
-
return (
|
|
1738
|
-
}), x = Ze(m),
|
|
1739
|
-
return
|
|
1740
|
-
}), ee = Ze((
|
|
1741
|
-
const
|
|
1742
|
-
return
|
|
1736
|
+
var W;
|
|
1737
|
+
return (W = b.current.floatingContext) == null ? void 0 : W.nodeId;
|
|
1738
|
+
}), x = Ze(m), S = typeof a == "number" && a < 0, M = Go(w) && S, D = Wd(), O = D ? o : !0, R = !O || D && p, C = Cr(i), J = Cr(a), B = Cr(s), T = Co(), N = Rs(), L = f.useRef(null), q = f.useRef(null), k = f.useRef(!1), A = f.useRef(!1), j = f.useRef(-1), ve = f.useRef(-1), ze = N != null, Y = Ko(_), ye = Ze(function(W) {
|
|
1739
|
+
return W === void 0 && (W = Y), W ? gr(W, Tn()) : [];
|
|
1740
|
+
}), ee = Ze((W) => {
|
|
1741
|
+
const H = ye(W);
|
|
1742
|
+
return C.current.map((I) => w && I === "reference" ? w : Y && I === "floating" ? Y : H).filter(Boolean).flat();
|
|
1743
1743
|
});
|
|
1744
1744
|
f.useEffect(() => {
|
|
1745
1745
|
if (r || !u) return;
|
|
1746
|
-
function
|
|
1747
|
-
if (
|
|
1748
|
-
ke(
|
|
1749
|
-
const te = ee(), le = wt(
|
|
1750
|
-
|
|
1746
|
+
function W(I) {
|
|
1747
|
+
if (I.key === "Tab") {
|
|
1748
|
+
ke(Y, Ut(Ye(Y))) && ye().length === 0 && !M && Er(I);
|
|
1749
|
+
const te = ee(), le = wt(I);
|
|
1750
|
+
C.current[0] === "reference" && le === w && (Er(I), I.shiftKey ? Wt(te[te.length - 1]) : Wt(te[1])), C.current[1] === "floating" && le === Y && I.shiftKey && (Er(I), Wt(te[0]));
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
const
|
|
1754
|
-
return
|
|
1755
|
-
|
|
1753
|
+
const H = Ye(Y);
|
|
1754
|
+
return H.addEventListener("keydown", W), () => {
|
|
1755
|
+
H.removeEventListener("keydown", W);
|
|
1756
1756
|
};
|
|
1757
|
-
}, [r,
|
|
1757
|
+
}, [r, w, Y, u, C, M, ye, ee]), f.useEffect(() => {
|
|
1758
1758
|
if (r || !_) return;
|
|
1759
|
-
function
|
|
1760
|
-
const
|
|
1761
|
-
le !== -1 && (
|
|
1759
|
+
function W(H) {
|
|
1760
|
+
const I = wt(H), le = ye().indexOf(I);
|
|
1761
|
+
le !== -1 && (j.current = le);
|
|
1762
1762
|
}
|
|
1763
|
-
return _.addEventListener("focusin",
|
|
1764
|
-
_.removeEventListener("focusin",
|
|
1763
|
+
return _.addEventListener("focusin", W), () => {
|
|
1764
|
+
_.removeEventListener("focusin", W);
|
|
1765
1765
|
};
|
|
1766
1766
|
}, [r, _, ye]), f.useEffect(() => {
|
|
1767
1767
|
if (r || !d) return;
|
|
1768
|
-
function
|
|
1769
|
-
|
|
1770
|
-
|
|
1768
|
+
function W() {
|
|
1769
|
+
A.current = !0, setTimeout(() => {
|
|
1770
|
+
A.current = !1;
|
|
1771
1771
|
});
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function H(le) {
|
|
1774
1774
|
const U = le.relatedTarget, We = le.currentTarget, xe = wt(le);
|
|
1775
1775
|
queueMicrotask(() => {
|
|
1776
|
-
const we = $(), rt = !(ke(
|
|
1776
|
+
const we = $(), rt = !(ke(w, U) || ke(_, U) || ke(U, _) || ke(N?.portalNode, U) || U != null && U.hasAttribute(Mn("focus-guard")) || T && (Zt(T.nodesRef.current, we).find((Ie) => {
|
|
1777
1777
|
var Se, Te;
|
|
1778
1778
|
return ke((Se = Ie.context) == null ? void 0 : Se.elements.floating, U) || ke((Te = Ie.context) == null ? void 0 : Te.elements.domReference, U);
|
|
1779
|
-
}) || Qo(
|
|
1779
|
+
}) || Qo(T.nodesRef.current, we).find((Ie) => {
|
|
1780
1780
|
var Se, Te, Ln;
|
|
1781
1781
|
return [(Se = Ie.context) == null ? void 0 : Se.elements.floating, Ko((Te = Ie.context) == null ? void 0 : Te.elements.floating)].includes(U) || ((Ln = Ie.context) == null ? void 0 : Ln.elements.domReference) === U;
|
|
1782
1782
|
})));
|
|
1783
|
-
if (We ===
|
|
1784
|
-
de(
|
|
1785
|
-
const Ie =
|
|
1783
|
+
if (We === w && Y && gi(Y, C), c && We !== w && !(xe != null && xe.isConnected) && Ut(Ye(Y)) === Ye(Y).body) {
|
|
1784
|
+
de(Y) && Y.focus();
|
|
1785
|
+
const Ie = j.current, Se = ye(), Te = Se[Ie] || Se[Se.length - 1] || Y;
|
|
1786
1786
|
de(Te) && Te.focus();
|
|
1787
1787
|
}
|
|
1788
|
-
if (
|
|
1789
|
-
|
|
1788
|
+
if (b.current.insideReactTree) {
|
|
1789
|
+
b.current.insideReactTree = !1;
|
|
1790
1790
|
return;
|
|
1791
1791
|
}
|
|
1792
|
-
(
|
|
1792
|
+
(M || !u) && U && rt && !A.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
1793
1793
|
U !== mi() && (k.current = !0, h(!1, le, "focus-out"));
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
|
-
const
|
|
1796
|
+
const I = !!(!T && N);
|
|
1797
1797
|
function te() {
|
|
1798
|
-
Ld(ve),
|
|
1799
|
-
|
|
1798
|
+
Ld(ve), b.current.insideReactTree = !0, ve.current = window.setTimeout(() => {
|
|
1799
|
+
b.current.insideReactTree = !1;
|
|
1800
1800
|
});
|
|
1801
1801
|
}
|
|
1802
|
-
if (_ && de(
|
|
1803
|
-
return
|
|
1804
|
-
|
|
1802
|
+
if (_ && de(w))
|
|
1803
|
+
return w.addEventListener("focusout", H), w.addEventListener("pointerdown", W), _.addEventListener("focusout", H), I && _.addEventListener("focusout", te, !0), () => {
|
|
1804
|
+
w.removeEventListener("focusout", H), w.removeEventListener("pointerdown", W), _.removeEventListener("focusout", H), I && _.removeEventListener("focusout", te, !0);
|
|
1805
1805
|
};
|
|
1806
|
-
}, [r,
|
|
1806
|
+
}, [r, w, _, Y, u, T, N, h, d, c, ye, M, $, C, b]);
|
|
1807
1807
|
const be = f.useRef(null), Ue = f.useRef(null), Pt = hi([be, N?.beforeInsideRef]), dt = hi([Ue, N?.afterInsideRef]);
|
|
1808
1808
|
f.useEffect(() => {
|
|
1809
|
-
var
|
|
1809
|
+
var W, H;
|
|
1810
1810
|
if (r || !_) return;
|
|
1811
|
-
const
|
|
1811
|
+
const I = Array.from((N == null || (W = N.portalNode) == null ? void 0 : W.querySelectorAll("[" + Mn("portal") + "]")) || []), le = (H = (T ? Qo(T.nodesRef.current, $()) : []).find((xe) => {
|
|
1812
1812
|
var we;
|
|
1813
1813
|
return Go(((we = xe.context) == null ? void 0 : we.elements.domReference) || null);
|
|
1814
|
-
})) == null || (
|
|
1814
|
+
})) == null || (H = H.context) == null ? void 0 : H.elements.domReference, U = [_, le, ...I, ...x(), L.current, q.current, be.current, Ue.current, N?.beforeOutsideRef.current, N?.afterOutsideRef.current, C.current.includes("reference") || M ? w : null].filter((xe) => xe != null), We = u || M ? fi(U, !R, R) : fi(U);
|
|
1815
1815
|
return () => {
|
|
1816
1816
|
We();
|
|
1817
1817
|
};
|
|
1818
|
-
}, [r,
|
|
1819
|
-
if (r || !de(
|
|
1820
|
-
const
|
|
1818
|
+
}, [r, w, _, u, C, N, M, O, R, T, $, x]), Pe(() => {
|
|
1819
|
+
if (r || !de(Y)) return;
|
|
1820
|
+
const W = Ye(Y), H = Ut(W);
|
|
1821
1821
|
queueMicrotask(() => {
|
|
1822
|
-
const
|
|
1823
|
-
!
|
|
1824
|
-
preventScroll: le ===
|
|
1822
|
+
const I = ee(Y), te = J.current, le = (typeof te == "number" ? I[te] : te.current) || Y, U = ke(Y, H);
|
|
1823
|
+
!S && !U && y && Wt(le, {
|
|
1824
|
+
preventScroll: le === Y
|
|
1825
1825
|
});
|
|
1826
1826
|
});
|
|
1827
|
-
}, [r, y,
|
|
1828
|
-
if (r || !
|
|
1829
|
-
const
|
|
1830
|
-
Hd(
|
|
1831
|
-
function
|
|
1827
|
+
}, [r, y, Y, S, ee, J]), Pe(() => {
|
|
1828
|
+
if (r || !Y) return;
|
|
1829
|
+
const W = Ye(Y), H = Ut(W);
|
|
1830
|
+
Hd(H);
|
|
1831
|
+
function I(U) {
|
|
1832
1832
|
let {
|
|
1833
1833
|
reason: We,
|
|
1834
1834
|
event: xe,
|
|
@@ -1848,34 +1848,34 @@ function Vd(e) {
|
|
|
1848
1848
|
}), rt ? k.current = !1 : k.current = !0;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
g.on("openchange",
|
|
1852
|
-
const te =
|
|
1853
|
-
te.setAttribute("tabindex", "-1"), te.setAttribute("aria-hidden", "true"), Object.assign(te.style, Do), ze &&
|
|
1851
|
+
g.on("openchange", I);
|
|
1852
|
+
const te = W.createElement("span");
|
|
1853
|
+
te.setAttribute("tabindex", "-1"), te.setAttribute("aria-hidden", "true"), Object.assign(te.style, Do), ze && w && w.insertAdjacentElement("afterend", te);
|
|
1854
1854
|
function le() {
|
|
1855
|
-
if (typeof
|
|
1856
|
-
const U =
|
|
1855
|
+
if (typeof B.current == "boolean") {
|
|
1856
|
+
const U = w || mi();
|
|
1857
1857
|
return U && U.isConnected ? U : te;
|
|
1858
1858
|
}
|
|
1859
|
-
return
|
|
1859
|
+
return B.current.current || te;
|
|
1860
1860
|
}
|
|
1861
1861
|
return () => {
|
|
1862
|
-
g.off("openchange",
|
|
1863
|
-
const U = Ut(
|
|
1862
|
+
g.off("openchange", I);
|
|
1863
|
+
const U = Ut(W), We = ke(_, U) || T && Zt(T.nodesRef.current, $(), !1).some((we) => {
|
|
1864
1864
|
var rt;
|
|
1865
1865
|
return ke((rt = we.context) == null ? void 0 : rt.elements.floating, U);
|
|
1866
1866
|
}), xe = le();
|
|
1867
1867
|
queueMicrotask(() => {
|
|
1868
1868
|
const we = zd(xe);
|
|
1869
1869
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1870
|
-
|
|
1870
|
+
B.current && !k.current && de(we) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
1871
1871
|
// since it likely entered a different element which should be
|
|
1872
1872
|
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
1873
|
-
(!(we !== U && U !==
|
|
1873
|
+
(!(we !== U && U !== W.body) || We) && we.focus({
|
|
1874
1874
|
preventScroll: !0
|
|
1875
1875
|
}), te.remove();
|
|
1876
1876
|
});
|
|
1877
1877
|
};
|
|
1878
|
-
}, [r, _,
|
|
1878
|
+
}, [r, _, Y, B, b, g, T, ze, w, $]), f.useEffect(() => (queueMicrotask(() => {
|
|
1879
1879
|
k.current = !1;
|
|
1880
1880
|
}), () => {
|
|
1881
1881
|
queueMicrotask(Oo);
|
|
@@ -1886,51 +1886,51 @@ function Vd(e) {
|
|
|
1886
1886
|
closeOnFocusOut: d,
|
|
1887
1887
|
open: y,
|
|
1888
1888
|
onOpenChange: h,
|
|
1889
|
-
domReference:
|
|
1889
|
+
domReference: w
|
|
1890
1890
|
}), () => {
|
|
1891
1891
|
N.setFocusManagerState(null);
|
|
1892
1892
|
};
|
|
1893
|
-
}, [r, N, u, y, h, d,
|
|
1894
|
-
r ||
|
|
1895
|
-
}, [r,
|
|
1896
|
-
function Lt(
|
|
1893
|
+
}, [r, N, u, y, h, d, w]), Pe(() => {
|
|
1894
|
+
r || Y && gi(Y, C);
|
|
1895
|
+
}, [r, Y, C]);
|
|
1896
|
+
function Lt(W) {
|
|
1897
1897
|
return r || !l || !u ? null : /* @__PURE__ */ v(Ud, {
|
|
1898
|
-
ref:
|
|
1899
|
-
onClick: (
|
|
1898
|
+
ref: W === "start" ? L : q,
|
|
1899
|
+
onClick: (H) => h(!1, H.nativeEvent),
|
|
1900
1900
|
children: typeof l == "string" ? l : "Dismiss"
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
|
-
const At = !r &&
|
|
1903
|
+
const At = !r && O && (u ? !M : !0) && (ze || u);
|
|
1904
1904
|
return /* @__PURE__ */ Q(Tt, {
|
|
1905
1905
|
children: [At && /* @__PURE__ */ v(ir, {
|
|
1906
1906
|
"data-type": "inside",
|
|
1907
1907
|
ref: Pt,
|
|
1908
|
-
onFocus: (
|
|
1908
|
+
onFocus: (W) => {
|
|
1909
1909
|
if (u) {
|
|
1910
|
-
const
|
|
1911
|
-
Wt(i[0] === "reference" ?
|
|
1910
|
+
const I = ee();
|
|
1911
|
+
Wt(i[0] === "reference" ? I[0] : I[I.length - 1]);
|
|
1912
1912
|
} else if (N != null && N.preserveTabOrder && N.portalNode)
|
|
1913
|
-
if (k.current = !1, Sn(
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1913
|
+
if (k.current = !1, Sn(W, N.portalNode)) {
|
|
1914
|
+
const I = _s(w);
|
|
1915
|
+
I?.focus();
|
|
1916
1916
|
} else {
|
|
1917
|
-
var
|
|
1918
|
-
(
|
|
1917
|
+
var H;
|
|
1918
|
+
(H = N.beforeOutsideRef.current) == null || H.focus();
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
|
-
}), !
|
|
1921
|
+
}), !M && Lt("start"), n, Lt("end"), At && /* @__PURE__ */ v(ir, {
|
|
1922
1922
|
"data-type": "inside",
|
|
1923
1923
|
ref: dt,
|
|
1924
|
-
onFocus: (
|
|
1924
|
+
onFocus: (W) => {
|
|
1925
1925
|
if (u)
|
|
1926
1926
|
Wt(ee()[0]);
|
|
1927
1927
|
else if (N != null && N.preserveTabOrder && N.portalNode)
|
|
1928
|
-
if (d && (k.current = !0), Sn(
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1928
|
+
if (d && (k.current = !0), Sn(W, N.portalNode)) {
|
|
1929
|
+
const I = xs(w);
|
|
1930
|
+
I?.focus();
|
|
1931
1931
|
} else {
|
|
1932
|
-
var
|
|
1933
|
-
(
|
|
1932
|
+
var H;
|
|
1933
|
+
(H = N.afterOutsideRef.current) == null || H.focus();
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
1936
|
})]
|
|
@@ -2020,44 +2020,44 @@ function Qd(e, t) {
|
|
|
2020
2020
|
ancestorScroll: p = !1,
|
|
2021
2021
|
bubbles: m,
|
|
2022
2022
|
capture: y
|
|
2023
|
-
} = t, h = Co(), g = Ze(typeof c == "function" ? c : () => !1),
|
|
2023
|
+
} = t, h = Co(), g = Ze(typeof c == "function" ? c : () => !1), b = typeof c == "function" ? g : c, w = f.useRef(!1), {
|
|
2024
2024
|
escapeKey: _,
|
|
2025
2025
|
outsidePress: $
|
|
2026
2026
|
} = bi(m), {
|
|
2027
2027
|
escapeKey: x,
|
|
2028
|
-
outsidePress:
|
|
2029
|
-
} = bi(y),
|
|
2028
|
+
outsidePress: S
|
|
2029
|
+
} = bi(y), M = f.useRef(!1), D = Ze((T) => {
|
|
2030
2030
|
var N;
|
|
2031
|
-
if (!n || !a || !s ||
|
|
2031
|
+
if (!n || !a || !s || T.key !== "Escape" || M.current)
|
|
2032
2032
|
return;
|
|
2033
|
-
const
|
|
2034
|
-
if (!_ && (
|
|
2033
|
+
const L = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, q = h ? Zt(h.nodesRef.current, L) : [];
|
|
2034
|
+
if (!_ && (T.stopPropagation(), q.length > 0)) {
|
|
2035
2035
|
let k = !0;
|
|
2036
|
-
if (
|
|
2037
|
-
var
|
|
2038
|
-
if ((
|
|
2036
|
+
if (q.forEach((A) => {
|
|
2037
|
+
var j;
|
|
2038
|
+
if ((j = A.context) != null && j.open && !A.context.dataRef.current.__escapeKeyBubbles) {
|
|
2039
2039
|
k = !1;
|
|
2040
2040
|
return;
|
|
2041
2041
|
}
|
|
2042
2042
|
}), !k)
|
|
2043
2043
|
return;
|
|
2044
2044
|
}
|
|
2045
|
-
r(!1, Fl(
|
|
2046
|
-
}),
|
|
2045
|
+
r(!1, Fl(T) ? T.nativeEvent : T, "escape-key");
|
|
2046
|
+
}), O = Ze((T) => {
|
|
2047
2047
|
var N;
|
|
2048
|
-
const
|
|
2049
|
-
var
|
|
2050
|
-
|
|
2048
|
+
const L = () => {
|
|
2049
|
+
var q;
|
|
2050
|
+
D(T), (q = wt(T)) == null || q.removeEventListener("keydown", L);
|
|
2051
2051
|
};
|
|
2052
|
-
(N = wt(
|
|
2053
|
-
}), R = Ze((
|
|
2052
|
+
(N = wt(T)) == null || N.addEventListener("keydown", L);
|
|
2053
|
+
}), R = Ze((T) => {
|
|
2054
2054
|
var N;
|
|
2055
|
-
const
|
|
2055
|
+
const L = o.current.insideReactTree;
|
|
2056
2056
|
o.current.insideReactTree = !1;
|
|
2057
|
-
const
|
|
2058
|
-
if (
|
|
2057
|
+
const q = w.current;
|
|
2058
|
+
if (w.current = !1, u === "click" && q || L || typeof b == "function" && !b(T))
|
|
2059
2059
|
return;
|
|
2060
|
-
const k = wt(
|
|
2060
|
+
const k = wt(T), A = "[" + Mn("inert") + "]", j = Ye(i.floating).querySelectorAll(A);
|
|
2061
2061
|
let ve = ie(k) ? k : null;
|
|
2062
2062
|
for (; ve && !ut(ve); ) {
|
|
2063
2063
|
const ee = ct(ve);
|
|
@@ -2065,21 +2065,21 @@ function Qd(e, t) {
|
|
|
2065
2065
|
break;
|
|
2066
2066
|
ve = ee;
|
|
2067
2067
|
}
|
|
2068
|
-
if (
|
|
2068
|
+
if (j.length && ie(k) && !Il(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2069
2069
|
!ke(k, i.floating) && // If the target root element contains none of the markers, then the
|
|
2070
2070
|
// element was injected after the floating element rendered.
|
|
2071
|
-
Array.from(
|
|
2071
|
+
Array.from(j).every((ee) => !ke(ve, ee)))
|
|
2072
2072
|
return;
|
|
2073
|
-
if (de(k) &&
|
|
2074
|
-
const ee = ut(k), be = Le(k), Ue = /auto|scroll/, Pt = ee || Ue.test(be.overflowX), dt = ee || Ue.test(be.overflowY), Lt = Pt && k.clientWidth > 0 && k.scrollWidth > k.clientWidth, At = dt && k.clientHeight > 0 && k.scrollHeight > k.clientHeight,
|
|
2075
|
-
if (
|
|
2073
|
+
if (de(k) && B) {
|
|
2074
|
+
const ee = ut(k), be = Le(k), Ue = /auto|scroll/, Pt = ee || Ue.test(be.overflowX), dt = ee || Ue.test(be.overflowY), Lt = Pt && k.clientWidth > 0 && k.scrollWidth > k.clientWidth, At = dt && k.clientHeight > 0 && k.scrollHeight > k.clientHeight, W = be.direction === "rtl", H = At && (W ? T.offsetX <= k.offsetWidth - k.clientWidth : T.offsetX > k.clientWidth), I = Lt && T.offsetY > k.clientHeight;
|
|
2075
|
+
if (H || I)
|
|
2076
2076
|
return;
|
|
2077
2077
|
}
|
|
2078
|
-
const ze = (N = o.current.floatingContext) == null ? void 0 : N.nodeId,
|
|
2078
|
+
const ze = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, Y = h && Zt(h.nodesRef.current, ze).some((ee) => {
|
|
2079
2079
|
var be;
|
|
2080
|
-
return kr(
|
|
2080
|
+
return kr(T, (be = ee.context) == null ? void 0 : be.elements.floating);
|
|
2081
2081
|
});
|
|
2082
|
-
if (kr(
|
|
2082
|
+
if (kr(T, i.floating) || kr(T, i.domReference) || Y)
|
|
2083
2083
|
return;
|
|
2084
2084
|
const ye = h ? Zt(h.nodesRef.current, ze) : [];
|
|
2085
2085
|
if (ye.length > 0) {
|
|
@@ -2093,30 +2093,30 @@ function Qd(e, t) {
|
|
|
2093
2093
|
}), !ee)
|
|
2094
2094
|
return;
|
|
2095
2095
|
}
|
|
2096
|
-
r(!1,
|
|
2097
|
-
}),
|
|
2096
|
+
r(!1, T, "outside-press");
|
|
2097
|
+
}), C = Ze((T) => {
|
|
2098
2098
|
var N;
|
|
2099
|
-
const
|
|
2100
|
-
var
|
|
2101
|
-
R(
|
|
2099
|
+
const L = () => {
|
|
2100
|
+
var q;
|
|
2101
|
+
R(T), (q = wt(T)) == null || q.removeEventListener(u, L);
|
|
2102
2102
|
};
|
|
2103
|
-
(N = wt(
|
|
2103
|
+
(N = wt(T)) == null || N.addEventListener(u, L);
|
|
2104
2104
|
});
|
|
2105
2105
|
f.useEffect(() => {
|
|
2106
2106
|
if (!n || !a)
|
|
2107
2107
|
return;
|
|
2108
2108
|
o.current.__escapeKeyBubbles = _, o.current.__outsidePressBubbles = $;
|
|
2109
|
-
let
|
|
2110
|
-
function N(
|
|
2111
|
-
r(!1,
|
|
2109
|
+
let T = -1;
|
|
2110
|
+
function N(j) {
|
|
2111
|
+
r(!1, j, "ancestor-scroll");
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2114
|
-
window.clearTimeout(
|
|
2113
|
+
function L() {
|
|
2114
|
+
window.clearTimeout(T), M.current = !0;
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2117
|
-
|
|
2116
|
+
function q() {
|
|
2117
|
+
T = window.setTimeout(
|
|
2118
2118
|
() => {
|
|
2119
|
-
|
|
2119
|
+
M.current = !1;
|
|
2120
2120
|
},
|
|
2121
2121
|
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
2122
2122
|
// Only apply to WebKit for the test to remain 0ms.
|
|
@@ -2124,51 +2124,51 @@ function Qd(e, t) {
|
|
|
2124
2124
|
);
|
|
2125
2125
|
}
|
|
2126
2126
|
const k = Ye(i.floating);
|
|
2127
|
-
s && (k.addEventListener("keydown", x ?
|
|
2128
|
-
let
|
|
2129
|
-
return p && (ie(i.domReference) && (
|
|
2127
|
+
s && (k.addEventListener("keydown", x ? O : D, x), k.addEventListener("compositionstart", L), k.addEventListener("compositionend", q)), b && k.addEventListener(u, S ? C : R, S);
|
|
2128
|
+
let A = [];
|
|
2129
|
+
return p && (ie(i.domReference) && (A = xt(i.domReference)), ie(i.floating) && (A = A.concat(xt(i.floating))), !ie(i.reference) && i.reference && i.reference.contextElement && (A = A.concat(xt(i.reference.contextElement)))), A = A.filter((j) => {
|
|
2130
2130
|
var ve;
|
|
2131
|
-
return
|
|
2132
|
-
}),
|
|
2133
|
-
|
|
2131
|
+
return j !== ((ve = k.defaultView) == null ? void 0 : ve.visualViewport);
|
|
2132
|
+
}), A.forEach((j) => {
|
|
2133
|
+
j.addEventListener("scroll", N, {
|
|
2134
2134
|
passive: !0
|
|
2135
2135
|
});
|
|
2136
2136
|
}), () => {
|
|
2137
|
-
s && (k.removeEventListener("keydown", x ?
|
|
2138
|
-
|
|
2139
|
-
}), window.clearTimeout(
|
|
2137
|
+
s && (k.removeEventListener("keydown", x ? O : D, x), k.removeEventListener("compositionstart", L), k.removeEventListener("compositionend", q)), b && k.removeEventListener(u, S ? C : R, S), A.forEach((j) => {
|
|
2138
|
+
j.removeEventListener("scroll", N);
|
|
2139
|
+
}), window.clearTimeout(T);
|
|
2140
2140
|
};
|
|
2141
|
-
}, [o, i, s,
|
|
2141
|
+
}, [o, i, s, b, u, n, r, p, a, _, $, D, x, O, R, S, C]), f.useEffect(() => {
|
|
2142
2142
|
o.current.insideReactTree = !1;
|
|
2143
|
-
}, [o,
|
|
2143
|
+
}, [o, b, u]);
|
|
2144
2144
|
const J = f.useMemo(() => ({
|
|
2145
|
-
onKeyDown:
|
|
2145
|
+
onKeyDown: D,
|
|
2146
2146
|
...l && {
|
|
2147
|
-
[Gd[d]]: (
|
|
2148
|
-
r(!1,
|
|
2147
|
+
[Gd[d]]: (T) => {
|
|
2148
|
+
r(!1, T.nativeEvent, "reference-press");
|
|
2149
2149
|
},
|
|
2150
2150
|
...d !== "click" && {
|
|
2151
|
-
onClick(
|
|
2152
|
-
r(!1,
|
|
2151
|
+
onClick(T) {
|
|
2152
|
+
r(!1, T.nativeEvent, "reference-press");
|
|
2153
2153
|
}
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
|
-
}), [
|
|
2157
|
-
onKeyDown:
|
|
2156
|
+
}), [D, r, l, d]), B = f.useMemo(() => ({
|
|
2157
|
+
onKeyDown: D,
|
|
2158
2158
|
onMouseDown() {
|
|
2159
|
-
|
|
2159
|
+
w.current = !0;
|
|
2160
2160
|
},
|
|
2161
2161
|
onMouseUp() {
|
|
2162
|
-
|
|
2162
|
+
w.current = !0;
|
|
2163
2163
|
},
|
|
2164
2164
|
[Kd[u]]: () => {
|
|
2165
2165
|
o.current.insideReactTree = !0;
|
|
2166
2166
|
}
|
|
2167
|
-
}), [
|
|
2167
|
+
}), [D, u, o]);
|
|
2168
2168
|
return f.useMemo(() => a ? {
|
|
2169
2169
|
reference: J,
|
|
2170
|
-
floating:
|
|
2171
|
-
} : {}, [a, J,
|
|
2170
|
+
floating: B
|
|
2171
|
+
} : {}, [a, J, B]);
|
|
2172
2172
|
}
|
|
2173
2173
|
function Jd(e) {
|
|
2174
2174
|
const {
|
|
@@ -2244,26 +2244,26 @@ function ef(e) {
|
|
|
2244
2244
|
setReference: h,
|
|
2245
2245
|
setPositionReference: y,
|
|
2246
2246
|
domReference: d
|
|
2247
|
-
}), [m.refs, h, y]),
|
|
2247
|
+
}), [m.refs, h, y]), b = f.useMemo(() => ({
|
|
2248
2248
|
...m.elements,
|
|
2249
2249
|
domReference: l
|
|
2250
|
-
}), [m.elements, l]),
|
|
2250
|
+
}), [m.elements, l]), w = f.useMemo(() => ({
|
|
2251
2251
|
...m,
|
|
2252
2252
|
...r,
|
|
2253
2253
|
refs: g,
|
|
2254
|
-
elements:
|
|
2254
|
+
elements: b,
|
|
2255
2255
|
nodeId: t
|
|
2256
|
-
}), [m, g,
|
|
2256
|
+
}), [m, g, b, t, r]);
|
|
2257
2257
|
return Pe(() => {
|
|
2258
|
-
r.dataRef.current.floatingContext =
|
|
2258
|
+
r.dataRef.current.floatingContext = w;
|
|
2259
2259
|
const _ = p?.nodesRef.current.find(($) => $.id === t);
|
|
2260
|
-
_ && (_.context =
|
|
2260
|
+
_ && (_.context = w);
|
|
2261
2261
|
}), f.useMemo(() => ({
|
|
2262
2262
|
...m,
|
|
2263
|
-
context:
|
|
2263
|
+
context: w,
|
|
2264
2264
|
refs: g,
|
|
2265
|
-
elements:
|
|
2266
|
-
}), [m, g,
|
|
2265
|
+
elements: b
|
|
2266
|
+
}), [m, g, b, w]);
|
|
2267
2267
|
}
|
|
2268
2268
|
function Nr(e, t, n) {
|
|
2269
2269
|
const r = /* @__PURE__ */ new Map(), i = n === "item";
|
|
@@ -2411,7 +2411,7 @@ function Ps(e) {
|
|
|
2411
2411
|
const p = Ot(e.timeZone, e), m = p > 0 ? Math.floor(p) : Math.ceil(p), y = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - m, h = m !== n, g = y - c;
|
|
2412
2412
|
if (h && g) {
|
|
2413
2413
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + g);
|
|
2414
|
-
const
|
|
2414
|
+
const b = Ot(e.timeZone, e), w = b > 0 ? Math.floor(b) : Math.ceil(b), _ = m - w;
|
|
2415
2415
|
_ && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + _), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + _));
|
|
2416
2416
|
}
|
|
2417
2417
|
}
|
|
@@ -3977,7 +3977,7 @@ function at(e, t, n = tt) {
|
|
|
3977
3977
|
});
|
|
3978
3978
|
}
|
|
3979
3979
|
function Rp(e, t, n, r, i) {
|
|
3980
|
-
const { disabled: o, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l } = t, { isSameDay: d, isSameMonth: p, startOfMonth: m, isBefore: y, endOfMonth: h, isAfter: g } = i,
|
|
3980
|
+
const { disabled: o, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l } = t, { isSameDay: d, isSameMonth: p, startOfMonth: m, isBefore: y, endOfMonth: h, isAfter: g } = i, b = n && m(n), w = r && h(r), _ = {
|
|
3981
3981
|
[re.focused]: [],
|
|
3982
3982
|
[re.outside]: [],
|
|
3983
3983
|
[re.disabled]: [],
|
|
@@ -3985,31 +3985,31 @@ function Rp(e, t, n, r, i) {
|
|
|
3985
3985
|
[re.today]: []
|
|
3986
3986
|
}, $ = {};
|
|
3987
3987
|
for (const x of e) {
|
|
3988
|
-
const { date:
|
|
3989
|
-
!u && !c &&
|
|
3990
|
-
|
|
3991
|
-
const N = s?.[
|
|
3992
|
-
N && at(
|
|
3988
|
+
const { date: S, displayMonth: M } = x, D = !!(M && !p(S, M)), O = !!(b && y(S, b)), R = !!(w && g(S, w)), C = !!(o && at(S, o, i)), J = !!(a && at(S, a, i)) || O || R || // Broadcast calendar will show outside days as default
|
|
3989
|
+
!u && !c && D || u && c === !1 && D, B = d(S, l ?? i.today());
|
|
3990
|
+
D && _.outside.push(x), C && _.disabled.push(x), J && _.hidden.push(x), B && _.today.push(x), s && Object.keys(s).forEach((T) => {
|
|
3991
|
+
const N = s?.[T];
|
|
3992
|
+
N && at(S, N, i) && ($[T] ? $[T].push(x) : $[T] = [x]);
|
|
3993
3993
|
});
|
|
3994
3994
|
}
|
|
3995
3995
|
return (x) => {
|
|
3996
|
-
const
|
|
3996
|
+
const S = {
|
|
3997
3997
|
[re.focused]: !1,
|
|
3998
3998
|
[re.disabled]: !1,
|
|
3999
3999
|
[re.hidden]: !1,
|
|
4000
4000
|
[re.outside]: !1,
|
|
4001
4001
|
[re.today]: !1
|
|
4002
|
-
},
|
|
4003
|
-
for (const
|
|
4004
|
-
const
|
|
4005
|
-
|
|
4002
|
+
}, M = {};
|
|
4003
|
+
for (const D in _) {
|
|
4004
|
+
const O = _[D];
|
|
4005
|
+
S[D] = O.some((R) => R === x);
|
|
4006
4006
|
}
|
|
4007
|
-
for (const
|
|
4008
|
-
|
|
4007
|
+
for (const D in $)
|
|
4008
|
+
M[D] = $[D].some((O) => O === x);
|
|
4009
4009
|
return {
|
|
4010
|
-
...
|
|
4010
|
+
...S,
|
|
4011
4011
|
// custom modifiers should override all the previous ones
|
|
4012
|
-
...
|
|
4012
|
+
...M
|
|
4013
4013
|
};
|
|
4014
4014
|
};
|
|
4015
4015
|
}
|
|
@@ -4017,65 +4017,65 @@ function Pp(e, t, n = {}) {
|
|
|
4017
4017
|
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [i]) => (n[i] ? r.push(n[i]) : t[re[i]] ? r.push(t[re[i]]) : t[qe[i]] && r.push(t[qe[i]]), r), [t[P.Day]]);
|
|
4018
4018
|
}
|
|
4019
4019
|
function Lp(e) {
|
|
4020
|
-
return
|
|
4020
|
+
return E.createElement("button", { ...e });
|
|
4021
4021
|
}
|
|
4022
4022
|
function Ap(e) {
|
|
4023
|
-
return
|
|
4023
|
+
return E.createElement("span", { ...e });
|
|
4024
4024
|
}
|
|
4025
4025
|
function Wp(e) {
|
|
4026
4026
|
const { size: t = 24, orientation: n = "left", className: r } = e;
|
|
4027
|
-
return
|
|
4027
|
+
return E.createElement(
|
|
4028
4028
|
"svg",
|
|
4029
4029
|
{ className: r, width: t, height: t, viewBox: "0 0 24 24" },
|
|
4030
|
-
n === "up" &&
|
|
4031
|
-
n === "down" &&
|
|
4032
|
-
n === "left" &&
|
|
4033
|
-
n === "right" &&
|
|
4030
|
+
n === "up" && E.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
4031
|
+
n === "down" && E.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
4032
|
+
n === "left" && E.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
4033
|
+
n === "right" && E.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
4034
4034
|
);
|
|
4035
4035
|
}
|
|
4036
4036
|
function Ip(e) {
|
|
4037
4037
|
const { day: t, modifiers: n, ...r } = e;
|
|
4038
|
-
return
|
|
4038
|
+
return E.createElement("td", { ...r });
|
|
4039
4039
|
}
|
|
4040
4040
|
function Fp(e) {
|
|
4041
|
-
const { day: t, modifiers: n, ...r } = e, i =
|
|
4042
|
-
return
|
|
4041
|
+
const { day: t, modifiers: n, ...r } = e, i = E.useRef(null);
|
|
4042
|
+
return E.useEffect(() => {
|
|
4043
4043
|
n.focused && i.current?.focus();
|
|
4044
|
-
}, [n.focused]),
|
|
4044
|
+
}, [n.focused]), E.createElement("button", { ref: i, ...r });
|
|
4045
4045
|
}
|
|
4046
4046
|
function jp(e) {
|
|
4047
4047
|
const { options: t, className: n, components: r, classNames: i, ...o } = e, a = [i[P.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === o.value);
|
|
4048
|
-
return
|
|
4048
|
+
return E.createElement(
|
|
4049
4049
|
"span",
|
|
4050
4050
|
{ "data-disabled": o.disabled, className: i[P.DropdownRoot] },
|
|
4051
|
-
|
|
4052
|
-
|
|
4051
|
+
E.createElement(r.Select, { className: a, ...o }, t?.map(({ value: c, label: u, disabled: l }) => E.createElement(r.Option, { key: c, value: c, disabled: l }, u))),
|
|
4052
|
+
E.createElement(
|
|
4053
4053
|
"span",
|
|
4054
4054
|
{ className: i[P.CaptionLabel], "aria-hidden": !0 },
|
|
4055
4055
|
s?.label,
|
|
4056
|
-
|
|
4056
|
+
E.createElement(r.Chevron, { orientation: "down", size: 18, className: i[P.Chevron] })
|
|
4057
4057
|
)
|
|
4058
4058
|
);
|
|
4059
4059
|
}
|
|
4060
4060
|
function Yp(e) {
|
|
4061
|
-
return
|
|
4061
|
+
return E.createElement("div", { ...e });
|
|
4062
4062
|
}
|
|
4063
4063
|
function Bp(e) {
|
|
4064
|
-
return
|
|
4064
|
+
return E.createElement("div", { ...e });
|
|
4065
4065
|
}
|
|
4066
4066
|
function qp(e) {
|
|
4067
4067
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
4068
|
-
return
|
|
4068
|
+
return E.createElement("div", { ...r }, e.children);
|
|
4069
4069
|
}
|
|
4070
4070
|
function Hp(e) {
|
|
4071
4071
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
4072
|
-
return
|
|
4072
|
+
return E.createElement("div", { ...r });
|
|
4073
4073
|
}
|
|
4074
4074
|
function zp(e) {
|
|
4075
|
-
return
|
|
4075
|
+
return E.createElement("table", { ...e });
|
|
4076
4076
|
}
|
|
4077
4077
|
function Up(e) {
|
|
4078
|
-
return
|
|
4078
|
+
return E.createElement("div", { ...e });
|
|
4079
4079
|
}
|
|
4080
4080
|
const eu = is(void 0);
|
|
4081
4081
|
function Rn() {
|
|
@@ -4086,7 +4086,7 @@ function Rn() {
|
|
|
4086
4086
|
}
|
|
4087
4087
|
function Vp(e) {
|
|
4088
4088
|
const { components: t } = Rn();
|
|
4089
|
-
return
|
|
4089
|
+
return E.createElement(t.Dropdown, { ...e });
|
|
4090
4090
|
}
|
|
4091
4091
|
function Xp(e) {
|
|
4092
4092
|
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: i, ...o } = e, { components: a, classNames: s, labels: { labelPrevious: c, labelNext: u } } = Rn(), l = Ne((p) => {
|
|
@@ -4094,66 +4094,66 @@ function Xp(e) {
|
|
|
4094
4094
|
}, [i, n]), d = Ne((p) => {
|
|
4095
4095
|
r && t?.(p);
|
|
4096
4096
|
}, [r, t]);
|
|
4097
|
-
return
|
|
4097
|
+
return E.createElement(
|
|
4098
4098
|
"nav",
|
|
4099
4099
|
{ ...o },
|
|
4100
|
-
|
|
4100
|
+
E.createElement(
|
|
4101
4101
|
a.PreviousMonthButton,
|
|
4102
4102
|
{ type: "button", className: s[P.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: d },
|
|
4103
|
-
|
|
4103
|
+
E.createElement(a.Chevron, { disabled: r ? void 0 : !0, className: s[P.Chevron], orientation: "left" })
|
|
4104
4104
|
),
|
|
4105
|
-
|
|
4105
|
+
E.createElement(
|
|
4106
4106
|
a.NextMonthButton,
|
|
4107
4107
|
{ type: "button", className: s[P.NextMonthButton], tabIndex: i ? void 0 : -1, "aria-disabled": i ? void 0 : !0, "aria-label": u(i), onClick: l },
|
|
4108
|
-
|
|
4108
|
+
E.createElement(a.Chevron, { disabled: i ? void 0 : !0, orientation: "right", className: s[P.Chevron] })
|
|
4109
4109
|
)
|
|
4110
4110
|
);
|
|
4111
4111
|
}
|
|
4112
4112
|
function Zp(e) {
|
|
4113
4113
|
const { components: t } = Rn();
|
|
4114
|
-
return
|
|
4114
|
+
return E.createElement(t.Button, { ...e });
|
|
4115
4115
|
}
|
|
4116
4116
|
function Gp(e) {
|
|
4117
|
-
return
|
|
4117
|
+
return E.createElement("option", { ...e });
|
|
4118
4118
|
}
|
|
4119
4119
|
function Kp(e) {
|
|
4120
4120
|
const { components: t } = Rn();
|
|
4121
|
-
return
|
|
4121
|
+
return E.createElement(t.Button, { ...e });
|
|
4122
4122
|
}
|
|
4123
4123
|
function Qp(e) {
|
|
4124
4124
|
const { rootRef: t, ...n } = e;
|
|
4125
|
-
return
|
|
4125
|
+
return E.createElement("div", { ...n, ref: t });
|
|
4126
4126
|
}
|
|
4127
4127
|
function Jp(e) {
|
|
4128
|
-
return
|
|
4128
|
+
return E.createElement("select", { ...e });
|
|
4129
4129
|
}
|
|
4130
4130
|
function eh(e) {
|
|
4131
4131
|
const { week: t, ...n } = e;
|
|
4132
|
-
return
|
|
4132
|
+
return E.createElement("tr", { ...n });
|
|
4133
4133
|
}
|
|
4134
4134
|
function th(e) {
|
|
4135
|
-
return
|
|
4135
|
+
return E.createElement("th", { ...e });
|
|
4136
4136
|
}
|
|
4137
4137
|
function nh(e) {
|
|
4138
|
-
return
|
|
4138
|
+
return E.createElement(
|
|
4139
4139
|
"thead",
|
|
4140
4140
|
{ "aria-hidden": !0 },
|
|
4141
|
-
|
|
4141
|
+
E.createElement("tr", { ...e })
|
|
4142
4142
|
);
|
|
4143
4143
|
}
|
|
4144
4144
|
function rh(e) {
|
|
4145
4145
|
const { week: t, ...n } = e;
|
|
4146
|
-
return
|
|
4146
|
+
return E.createElement("th", { ...n });
|
|
4147
4147
|
}
|
|
4148
4148
|
function oh(e) {
|
|
4149
|
-
return
|
|
4149
|
+
return E.createElement("th", { ...e });
|
|
4150
4150
|
}
|
|
4151
4151
|
function ih(e) {
|
|
4152
|
-
return
|
|
4152
|
+
return E.createElement("tbody", { ...e });
|
|
4153
4153
|
}
|
|
4154
4154
|
function ah(e) {
|
|
4155
4155
|
const { components: t } = Rn();
|
|
4156
|
-
return
|
|
4156
|
+
return E.createElement(t.Dropdown, { ...e });
|
|
4157
4157
|
}
|
|
4158
4158
|
const sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4159
4159
|
__proto__: null,
|
|
@@ -4362,62 +4362,62 @@ function Ih(e, t, { classNames: n, months: r, focused: i, dateLib: o }) {
|
|
|
4362
4362
|
r.length === 0 || u.length === 0 || r.length !== u.length)
|
|
4363
4363
|
return;
|
|
4364
4364
|
const l = o.isSameMonth(r[0].date, u[0].date), d = o.isAfter(r[0].date, u[0].date), p = d ? n[Ee.caption_after_enter] : n[Ee.caption_before_enter], m = d ? n[Ee.weeks_after_enter] : n[Ee.weeks_before_enter], y = a.current, h = e.current.cloneNode(!0);
|
|
4365
|
-
if (h instanceof HTMLElement ? (Pr(h).forEach((
|
|
4366
|
-
if (!(
|
|
4365
|
+
if (h instanceof HTMLElement ? (Pr(h).forEach((w) => {
|
|
4366
|
+
if (!(w instanceof HTMLElement))
|
|
4367
4367
|
return;
|
|
4368
|
-
const _ = Lh(
|
|
4369
|
-
_ &&
|
|
4370
|
-
const $ = Lr(
|
|
4368
|
+
const _ = Lh(w);
|
|
4369
|
+
_ && w.contains(_) && w.removeChild(_);
|
|
4370
|
+
const $ = Lr(w);
|
|
4371
4371
|
$ && $.classList.remove(p);
|
|
4372
|
-
const x = Ar(
|
|
4372
|
+
const x = Ar(w);
|
|
4373
4373
|
x && x.classList.remove(m);
|
|
4374
4374
|
}), a.current = h) : a.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
4375
4375
|
i)
|
|
4376
4376
|
return;
|
|
4377
|
-
const g = y instanceof HTMLElement ? Pr(y) : [],
|
|
4378
|
-
if (
|
|
4377
|
+
const g = y instanceof HTMLElement ? Pr(y) : [], b = Pr(e.current);
|
|
4378
|
+
if (b && b.every((w) => w instanceof HTMLElement) && g && g.every((w) => w instanceof HTMLElement)) {
|
|
4379
4379
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
4380
|
-
const
|
|
4381
|
-
|
|
4380
|
+
const w = Ah(e.current);
|
|
4381
|
+
w && (w.style.zIndex = "1"), b.forEach((_, $) => {
|
|
4382
4382
|
const x = g[$];
|
|
4383
4383
|
if (!x)
|
|
4384
4384
|
return;
|
|
4385
4385
|
_.style.position = "relative", _.style.overflow = "hidden";
|
|
4386
|
-
const
|
|
4387
|
-
|
|
4388
|
-
const
|
|
4389
|
-
|
|
4390
|
-
const
|
|
4391
|
-
c.current = !1, e.current && (e.current.style.isolation = ""),
|
|
4386
|
+
const S = Lr(_);
|
|
4387
|
+
S && S.classList.add(p);
|
|
4388
|
+
const M = Ar(_);
|
|
4389
|
+
M && M.classList.add(m);
|
|
4390
|
+
const D = () => {
|
|
4391
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), w && (w.style.zIndex = ""), S && S.classList.remove(p), M && M.classList.remove(m), _.style.position = "", _.style.overflow = "", _.contains(x) && _.removeChild(x);
|
|
4392
4392
|
};
|
|
4393
4393
|
x.style.pointerEvents = "none", x.style.position = "absolute", x.style.overflow = "hidden", x.setAttribute("aria-hidden", "true");
|
|
4394
|
-
const
|
|
4395
|
-
|
|
4394
|
+
const O = Wh(x);
|
|
4395
|
+
O && (O.style.opacity = "0");
|
|
4396
4396
|
const R = Lr(x);
|
|
4397
|
-
R && (R.classList.add(d ? n[Ee.caption_before_exit] : n[Ee.caption_after_exit]), R.addEventListener("animationend",
|
|
4398
|
-
const
|
|
4399
|
-
|
|
4397
|
+
R && (R.classList.add(d ? n[Ee.caption_before_exit] : n[Ee.caption_after_exit]), R.addEventListener("animationend", D));
|
|
4398
|
+
const C = Ar(x);
|
|
4399
|
+
C && C.classList.add(d ? n[Ee.weeks_before_exit] : n[Ee.weeks_after_exit]), _.insertBefore(x, _.firstChild);
|
|
4400
4400
|
});
|
|
4401
4401
|
}
|
|
4402
4402
|
});
|
|
4403
4403
|
}
|
|
4404
4404
|
function Fh(e, t, n, r) {
|
|
4405
|
-
const i = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: p, endOfISOWeek: m, endOfMonth: y, endOfWeek: h, isAfter: g, startOfBroadcastWeek:
|
|
4406
|
-
for (let R = 0; R <=
|
|
4407
|
-
const
|
|
4408
|
-
if (t && g(
|
|
4405
|
+
const i = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: p, endOfISOWeek: m, endOfMonth: y, endOfWeek: h, isAfter: g, startOfBroadcastWeek: b, startOfISOWeek: w, startOfWeek: _ } = r, $ = c ? b(i, r) : a ? w(i) : _(i), x = c ? p(o) : a ? m(y(o)) : h(y(o)), S = l(x, $), M = d(o, i) + 1, D = [];
|
|
4406
|
+
for (let R = 0; R <= S; R++) {
|
|
4407
|
+
const C = u($, R);
|
|
4408
|
+
if (t && g(C, t))
|
|
4409
4409
|
break;
|
|
4410
|
-
|
|
4410
|
+
D.push(C);
|
|
4411
4411
|
}
|
|
4412
|
-
const
|
|
4413
|
-
if (s &&
|
|
4414
|
-
const R =
|
|
4415
|
-
for (let
|
|
4416
|
-
const J = u(
|
|
4417
|
-
|
|
4412
|
+
const O = (c ? 35 : 42) * M;
|
|
4413
|
+
if (s && D.length < O) {
|
|
4414
|
+
const R = O - D.length;
|
|
4415
|
+
for (let C = 0; C < R; C++) {
|
|
4416
|
+
const J = u(D[D.length - 1], 1);
|
|
4417
|
+
D.push(J);
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
4420
|
-
return
|
|
4420
|
+
return D;
|
|
4421
4421
|
}
|
|
4422
4422
|
function jh(e) {
|
|
4423
4423
|
const t = [];
|
|
@@ -4448,19 +4448,19 @@ function Di(e, t, n, r) {
|
|
|
4448
4448
|
}
|
|
4449
4449
|
function Bh(e, t, n, r) {
|
|
4450
4450
|
const { addDays: i, endOfBroadcastWeek: o, endOfISOWeek: a, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: d, startOfISOWeek: p, startOfWeek: m } = r, y = e.reduce((h, g) => {
|
|
4451
|
-
const
|
|
4451
|
+
const b = n.broadcastCalendar ? d(g, r) : n.ISOWeek ? p(g) : m(g), w = n.broadcastCalendar ? o(g) : n.ISOWeek ? a(s(g)) : c(s(g)), _ = t.filter((M) => M >= b && M <= w), $ = n.broadcastCalendar ? 35 : 42;
|
|
4452
4452
|
if (n.fixedWeeks && _.length < $) {
|
|
4453
|
-
const
|
|
4454
|
-
const
|
|
4455
|
-
return
|
|
4453
|
+
const M = t.filter((D) => {
|
|
4454
|
+
const O = $ - _.length;
|
|
4455
|
+
return D > w && D <= i(w, O);
|
|
4456
4456
|
});
|
|
4457
|
-
_.push(...
|
|
4457
|
+
_.push(...M);
|
|
4458
4458
|
}
|
|
4459
|
-
const x = _.reduce((
|
|
4460
|
-
const
|
|
4461
|
-
return R ? R.days.push(
|
|
4462
|
-
}, []),
|
|
4463
|
-
return h.push(
|
|
4459
|
+
const x = _.reduce((M, D) => {
|
|
4460
|
+
const O = n.ISOWeek ? u(D) : l(D), R = M.find((J) => J.weekNumber === O), C = new Xs(D, g, r);
|
|
4461
|
+
return R ? R.days.push(C) : M.push(new Np(O, [C])), M;
|
|
4462
|
+
}, []), S = new Tp(g, x);
|
|
4463
|
+
return h.push(S), h;
|
|
4464
4464
|
}, []);
|
|
4465
4465
|
return n.reverseMonths ? y.reverse() : y;
|
|
4466
4466
|
}
|
|
@@ -4506,11 +4506,11 @@ function Vh(e, t) {
|
|
|
4506
4506
|
const $ = Di(e, n, r, t);
|
|
4507
4507
|
c($);
|
|
4508
4508
|
}, [e.timeZone]);
|
|
4509
|
-
const u = Yh(s, r, e, t), l = Fh(u, e.endMonth ? o(e.endMonth) : void 0, e, t), d = Bh(u, l, e, t), p = Uh(d), m = jh(d), y = zh(s, n, e, t), h = Hh(s, r, e, t), { disableNavigation: g, onMonthChange:
|
|
4509
|
+
const u = Yh(s, r, e, t), l = Fh(u, e.endMonth ? o(e.endMonth) : void 0, e, t), d = Bh(u, l, e, t), p = Uh(d), m = jh(d), y = zh(s, n, e, t), h = Hh(s, r, e, t), { disableNavigation: g, onMonthChange: b } = e, w = ($) => p.some((x) => x.days.some((S) => S.isEqualTo($))), _ = ($) => {
|
|
4510
4510
|
if (g)
|
|
4511
4511
|
return;
|
|
4512
4512
|
let x = i($);
|
|
4513
|
-
n && x < i(n) && (x = i(n)), r && x > i(r) && (x = i(r)), c(x),
|
|
4513
|
+
n && x < i(n) && (x = i(n)), r && x > i(r) && (x = i(r)), c(x), b?.(x);
|
|
4514
4514
|
};
|
|
4515
4515
|
return {
|
|
4516
4516
|
months: d,
|
|
@@ -4522,7 +4522,7 @@ function Vh(e, t) {
|
|
|
4522
4522
|
nextMonth: h,
|
|
4523
4523
|
goToMonth: _,
|
|
4524
4524
|
goToDay: ($) => {
|
|
4525
|
-
|
|
4525
|
+
w($) || _($.date);
|
|
4526
4526
|
}
|
|
4527
4527
|
};
|
|
4528
4528
|
}
|
|
@@ -4542,16 +4542,16 @@ function Xh(e, t, n, r) {
|
|
|
4542
4542
|
return i || (i = e.find((a) => Oi(t(a)))), i;
|
|
4543
4543
|
}
|
|
4544
4544
|
function Zh(e, t, n, r, i, o, a) {
|
|
4545
|
-
const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: u, addMonths: l, addWeeks: d, addYears: p, endOfBroadcastWeek: m, endOfISOWeek: y, endOfWeek: h, max: g, min:
|
|
4545
|
+
const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: u, addMonths: l, addWeeks: d, addYears: p, endOfBroadcastWeek: m, endOfISOWeek: y, endOfWeek: h, max: g, min: b, startOfBroadcastWeek: w, startOfISOWeek: _, startOfWeek: $ } = a;
|
|
4546
4546
|
let x = {
|
|
4547
4547
|
day: u,
|
|
4548
4548
|
week: d,
|
|
4549
4549
|
month: l,
|
|
4550
4550
|
year: p,
|
|
4551
|
-
startOfWeek: (
|
|
4552
|
-
endOfWeek: (
|
|
4551
|
+
startOfWeek: (S) => c ? w(S, a) : s ? _(S) : $(S),
|
|
4552
|
+
endOfWeek: (S) => c ? m(S) : s ? y(S) : h(S)
|
|
4553
4553
|
}[e](n, t === "after" ? 1 : -1);
|
|
4554
|
-
return t === "before" && r ? x = g([r, x]) : t === "after" && i && (x =
|
|
4554
|
+
return t === "before" && r ? x = g([r, x]) : t === "after" && i && (x = b([i, x])), x;
|
|
4555
4555
|
}
|
|
4556
4556
|
function au(e, t, n, r, i, o, a, s = 0) {
|
|
4557
4557
|
if (s > 365)
|
|
@@ -4693,15 +4693,15 @@ function om(e) {
|
|
|
4693
4693
|
let t = e;
|
|
4694
4694
|
t.timeZone && (t = {
|
|
4695
4695
|
...e
|
|
4696
|
-
}, t.today && (t.today = new je(t.today, t.timeZone)), t.month && (t.month = new je(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new je(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new je(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new je(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new je(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((
|
|
4696
|
+
}, t.today && (t.today = new je(t.today, t.timeZone)), t.month && (t.month = new je(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new je(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new je(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new je(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new je(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((F) => new je(F, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
|
|
4697
4697
|
from: t.selected.from ? new je(t.selected.from, t.timeZone) : void 0,
|
|
4698
4698
|
to: t.selected.to ? new je(t.selected.to, t.timeZone) : void 0
|
|
4699
4699
|
}));
|
|
4700
4700
|
const { components: n, formatters: r, labels: i, dateLib: o, locale: a, classNames: s } = Mr(() => {
|
|
4701
|
-
const
|
|
4701
|
+
const F = { ...To, ...t.locale };
|
|
4702
4702
|
return {
|
|
4703
4703
|
dateLib: new lt({
|
|
4704
|
-
locale:
|
|
4704
|
+
locale: F,
|
|
4705
4705
|
weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
|
|
4706
4706
|
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
4707
4707
|
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
@@ -4712,7 +4712,7 @@ function om(e) {
|
|
|
4712
4712
|
components: uh(t.components),
|
|
4713
4713
|
formatters: yh(t.formatters),
|
|
4714
4714
|
labels: { ...Ph, ...t.labels },
|
|
4715
|
-
locale:
|
|
4715
|
+
locale: F,
|
|
4716
4716
|
classNames: { ...tu(), ...t.classNames }
|
|
4717
4717
|
};
|
|
4718
4718
|
}, [
|
|
@@ -4729,17 +4729,17 @@ function om(e) {
|
|
|
4729
4729
|
t.formatters,
|
|
4730
4730
|
t.labels,
|
|
4731
4731
|
t.classNames
|
|
4732
|
-
]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: p, onDayClick: m, onDayFocus: y, onDayKeyDown: h, onDayMouseEnter: g, onDayMouseLeave:
|
|
4733
|
-
k && (
|
|
4734
|
-
}, [k,
|
|
4735
|
-
|
|
4736
|
-
}, [
|
|
4737
|
-
V.preventDefault(), V.stopPropagation(), dt(
|
|
4738
|
-
}, [
|
|
4739
|
-
dt(
|
|
4740
|
-
}, [y, dt]), Ic = Ne((
|
|
4741
|
-
ee(), p?.(
|
|
4742
|
-
}, [ee, p]), Fc = Ne((
|
|
4732
|
+
]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: p, onDayClick: m, onDayFocus: y, onDayKeyDown: h, onDayMouseEnter: g, onDayMouseLeave: b, onNextClick: w, onPrevClick: _, showWeekNumber: $, styles: x } = t, { formatCaption: S, formatDay: M, formatMonthDropdown: D, formatWeekNumber: O, formatWeekNumberHeader: R, formatWeekdayName: C, formatYearDropdown: J } = r, B = Vh(t, o), { days: T, months: N, navStart: L, navEnd: q, previousMonth: k, nextMonth: A, goToMonth: j } = B, ve = Rp(T, t, L, q, o), { isSelected: ze, select: Y, selected: ye } = rm(t, o) ?? {}, { blur: ee, focused: be, isFocusTarget: Ue, moveFocus: Pt, setFocused: dt } = Gh(t, B, ve, ze ?? (() => !1), o), { labelDayButton: Lt, labelGridcell: At, labelGrid: W, labelMonthDropdown: H, labelNav: I, labelPrevious: te, labelNext: le, labelWeekday: U, labelWeekNumber: We, labelWeekNumberHeader: xe, labelYearDropdown: we } = i, rt = Mr(() => _h(o, t.ISOWeek), [o, t.ISOWeek]), Ie = u !== void 0 || m !== void 0, Se = Ne(() => {
|
|
4733
|
+
k && (j(k), _?.(k));
|
|
4734
|
+
}, [k, j, _]), Te = Ne(() => {
|
|
4735
|
+
A && (j(A), w?.(A));
|
|
4736
|
+
}, [j, A, w]), Ln = Ne((F, ne) => (V) => {
|
|
4737
|
+
V.preventDefault(), V.stopPropagation(), dt(F), Y?.(F.date, ne, V), m?.(F.date, ne, V);
|
|
4738
|
+
}, [Y, m, dt]), Wc = Ne((F, ne) => (V) => {
|
|
4739
|
+
dt(F), y?.(F.date, ne, V);
|
|
4740
|
+
}, [y, dt]), Ic = Ne((F, ne) => (V) => {
|
|
4741
|
+
ee(), p?.(F.date, ne, V);
|
|
4742
|
+
}, [ee, p]), Fc = Ne((F, ne) => (V) => {
|
|
4743
4743
|
const ft = {
|
|
4744
4744
|
ArrowLeft: [
|
|
4745
4745
|
V.shiftKey ? "month" : "day",
|
|
@@ -4761,18 +4761,18 @@ function om(e) {
|
|
|
4761
4761
|
const [Fe, An] = ft[V.key];
|
|
4762
4762
|
Pt(Fe, An);
|
|
4763
4763
|
}
|
|
4764
|
-
h?.(
|
|
4765
|
-
}, [Pt, h, t.dir]), jc = Ne((
|
|
4766
|
-
g?.(
|
|
4767
|
-
}, [g]), Yc = Ne((
|
|
4768
|
-
|
|
4769
|
-
}, [
|
|
4770
|
-
const V = Number(ne.target.value), ft = o.setMonth(o.startOfMonth(
|
|
4771
|
-
|
|
4772
|
-
}, [o,
|
|
4773
|
-
const V = Number(ne.target.value), ft = o.setYear(o.startOfMonth(
|
|
4774
|
-
|
|
4775
|
-
}, [o,
|
|
4764
|
+
h?.(F.date, ne, V);
|
|
4765
|
+
}, [Pt, h, t.dir]), jc = Ne((F, ne) => (V) => {
|
|
4766
|
+
g?.(F.date, ne, V);
|
|
4767
|
+
}, [g]), Yc = Ne((F, ne) => (V) => {
|
|
4768
|
+
b?.(F.date, ne, V);
|
|
4769
|
+
}, [b]), Bc = Ne((F) => (ne) => {
|
|
4770
|
+
const V = Number(ne.target.value), ft = o.setMonth(o.startOfMonth(F), V);
|
|
4771
|
+
j(ft);
|
|
4772
|
+
}, [o, j]), qc = Ne((F) => (ne) => {
|
|
4773
|
+
const V = Number(ne.target.value), ft = o.setYear(o.startOfMonth(F), V);
|
|
4774
|
+
j(ft);
|
|
4775
|
+
}, [o, j]), { className: Hc, style: zc } = Mr(() => ({
|
|
4776
4776
|
className: [s[P.Root], t.className].filter(Boolean).join(" "),
|
|
4777
4777
|
style: { ...x?.[P.Root], ...t.style }
|
|
4778
4778
|
}), [s, t.className, t.style, x]), Uc = ch(t), zo = st(null);
|
|
@@ -4785,12 +4785,12 @@ function om(e) {
|
|
|
4785
4785
|
const Vc = {
|
|
4786
4786
|
dayPickerProps: t,
|
|
4787
4787
|
selected: ye,
|
|
4788
|
-
select:
|
|
4788
|
+
select: Y,
|
|
4789
4789
|
isSelected: ze,
|
|
4790
4790
|
months: N,
|
|
4791
|
-
nextMonth:
|
|
4791
|
+
nextMonth: A,
|
|
4792
4792
|
previousMonth: k,
|
|
4793
|
-
goToMonth:
|
|
4793
|
+
goToMonth: j,
|
|
4794
4794
|
getModifiers: ve,
|
|
4795
4795
|
components: n,
|
|
4796
4796
|
classNames: s,
|
|
@@ -4798,32 +4798,32 @@ function om(e) {
|
|
|
4798
4798
|
labels: i,
|
|
4799
4799
|
formatters: r
|
|
4800
4800
|
};
|
|
4801
|
-
return
|
|
4801
|
+
return E.createElement(
|
|
4802
4802
|
eu.Provider,
|
|
4803
4803
|
{ value: Vc },
|
|
4804
|
-
|
|
4804
|
+
E.createElement(
|
|
4805
4805
|
n.Root,
|
|
4806
4806
|
{ rootRef: t.animate ? zo : void 0, className: Hc, style: zc, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], ...Uc },
|
|
4807
|
-
|
|
4807
|
+
E.createElement(
|
|
4808
4808
|
n.Months,
|
|
4809
4809
|
{ className: s[P.Months], style: x?.[P.Months] },
|
|
4810
|
-
!t.hideNavigation && !l &&
|
|
4811
|
-
N.map((
|
|
4812
|
-
const V = bh(
|
|
4813
|
-
return
|
|
4810
|
+
!t.hideNavigation && !l && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": I(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: A }),
|
|
4811
|
+
N.map((F, ne) => {
|
|
4812
|
+
const V = bh(F.date, L, q, r, o), ft = xh(L, q, r, o);
|
|
4813
|
+
return E.createElement(
|
|
4814
4814
|
n.Month,
|
|
4815
|
-
{ "data-animated-month": t.animate ? "true" : void 0, className: s[P.Month], style: x?.[P.Month], key: ne, displayIndex: ne, calendarMonth:
|
|
4816
|
-
l === "around" && !t.hideNavigation && ne === 0 &&
|
|
4815
|
+
{ "data-animated-month": t.animate ? "true" : void 0, className: s[P.Month], style: x?.[P.Month], key: ne, displayIndex: ne, calendarMonth: F },
|
|
4816
|
+
l === "around" && !t.hideNavigation && ne === 0 && E.createElement(
|
|
4817
4817
|
n.PreviousMonthButton,
|
|
4818
4818
|
{ type: "button", className: s[P.PreviousMonthButton], tabIndex: k ? void 0 : -1, "aria-disabled": k ? void 0 : !0, "aria-label": te(k), onClick: Se, "data-animated-button": t.animate ? "true" : void 0 },
|
|
4819
|
-
|
|
4819
|
+
E.createElement(n.Chevron, { disabled: k ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
4820
4820
|
),
|
|
4821
|
-
|
|
4821
|
+
E.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[P.MonthCaption], style: x?.[P.MonthCaption], calendarMonth: F, displayIndex: ne }, c?.startsWith("dropdown") ? E.createElement(
|
|
4822
4822
|
n.DropdownNav,
|
|
4823
4823
|
{ className: s[P.Dropdowns], style: x?.[P.Dropdowns] },
|
|
4824
|
-
c === "dropdown" || c === "dropdown-months" ?
|
|
4825
|
-
c === "dropdown" || c === "dropdown-years" ?
|
|
4826
|
-
|
|
4824
|
+
c === "dropdown" || c === "dropdown-months" ? E.createElement(n.MonthsDropdown, { className: s[P.MonthsDropdown], "aria-label": H(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Bc(F.date), options: V, style: x?.[P.Dropdown], value: o.getMonth(F.date) }) : E.createElement("span", null, D(F.date, o)),
|
|
4825
|
+
c === "dropdown" || c === "dropdown-years" ? E.createElement(n.YearsDropdown, { className: s[P.YearsDropdown], "aria-label": we(o.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: qc(F.date), options: ft, style: x?.[P.Dropdown], value: o.getYear(F.date) }) : E.createElement("span", null, J(F.date, o)),
|
|
4826
|
+
E.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4827
4827
|
border: 0,
|
|
4828
4828
|
clip: "rect(0 0 0 0)",
|
|
4829
4829
|
height: "1px",
|
|
@@ -4834,29 +4834,29 @@ function om(e) {
|
|
|
4834
4834
|
width: "1px",
|
|
4835
4835
|
whiteSpace: "nowrap",
|
|
4836
4836
|
wordWrap: "normal"
|
|
4837
|
-
} },
|
|
4838
|
-
) :
|
|
4839
|
-
l === "around" && !t.hideNavigation && ne === d - 1 &&
|
|
4837
|
+
} }, S(F.date, o.options, o))
|
|
4838
|
+
) : E.createElement(n.CaptionLabel, { className: s[P.CaptionLabel], role: "status", "aria-live": "polite" }, S(F.date, o.options, o))),
|
|
4839
|
+
l === "around" && !t.hideNavigation && ne === d - 1 && E.createElement(
|
|
4840
4840
|
n.NextMonthButton,
|
|
4841
|
-
{ type: "button", className: s[P.NextMonthButton], tabIndex:
|
|
4842
|
-
|
|
4841
|
+
{ type: "button", className: s[P.NextMonthButton], tabIndex: A ? void 0 : -1, "aria-disabled": A ? void 0 : !0, "aria-label": le(A), onClick: Te, "data-animated-button": t.animate ? "true" : void 0 },
|
|
4842
|
+
E.createElement(n.Chevron, { disabled: A ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
4843
4843
|
),
|
|
4844
|
-
ne === d - 1 && l === "after" && !t.hideNavigation &&
|
|
4845
|
-
|
|
4844
|
+
ne === d - 1 && l === "after" && !t.hideNavigation && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": I(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: A }),
|
|
4845
|
+
E.createElement(
|
|
4846
4846
|
n.MonthGrid,
|
|
4847
|
-
{ role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label":
|
|
4848
|
-
!t.hideWeekdays &&
|
|
4847
|
+
{ role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label": W(F.date, o.options, o) || void 0, className: s[P.MonthGrid], style: x?.[P.MonthGrid] },
|
|
4848
|
+
!t.hideWeekdays && E.createElement(
|
|
4849
4849
|
n.Weekdays,
|
|
4850
4850
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: s[P.Weekdays], style: x?.[P.Weekdays] },
|
|
4851
|
-
$ &&
|
|
4852
|
-
rt.map((Fe, An) =>
|
|
4851
|
+
$ && E.createElement(n.WeekNumberHeader, { "aria-label": xe(o.options), className: s[P.WeekNumberHeader], style: x?.[P.WeekNumberHeader], scope: "col" }, R()),
|
|
4852
|
+
rt.map((Fe, An) => E.createElement(n.Weekday, { "aria-label": U(Fe, o.options, o), className: s[P.Weekday], key: An, style: x?.[P.Weekday], scope: "col" }, C(Fe, o.options, o)))
|
|
4853
4853
|
),
|
|
4854
|
-
|
|
4854
|
+
E.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[P.Weeks], style: x?.[P.Weeks] }, F.weeks.map((Fe, An) => E.createElement(
|
|
4855
4855
|
n.Week,
|
|
4856
4856
|
{ className: s[P.Week], key: Fe.weekNumber, style: x?.[P.Week], week: Fe },
|
|
4857
|
-
$ &&
|
|
4857
|
+
$ && E.createElement(n.WeekNumber, { week: Fe, style: x?.[P.WeekNumber], "aria-label": We(Fe.weekNumber, {
|
|
4858
4858
|
locale: a
|
|
4859
|
-
}), className: s[P.WeekNumber], scope: "row", role: "rowheader" },
|
|
4859
|
+
}), className: s[P.WeekNumber], scope: "row", role: "rowheader" }, O(Fe.weekNumber, o)),
|
|
4860
4860
|
Fe.days.map((me) => {
|
|
4861
4861
|
const { date: Ve } = me, X = ve(me);
|
|
4862
4862
|
if (X[re.focused] = !X.hidden && !!be?.isEqualTo(me), X[qe.selected] = ze?.(Ve) || X.selected, No(ye)) {
|
|
@@ -4864,14 +4864,14 @@ function om(e) {
|
|
|
4864
4864
|
X[qe.range_start] = !!($r && Sr && o.isSameDay(Ve, $r)), X[qe.range_end] = !!($r && Sr && o.isSameDay(Ve, Sr)), X[qe.range_middle] = it(ye, Ve, !0, o);
|
|
4865
4865
|
}
|
|
4866
4866
|
const Xc = wh(X, x, t.modifiersStyles), Zc = Pp(X, s, t.modifiersClassNames), Gc = !Ie && !X.hidden ? At(Ve, X, o.options, o) : void 0;
|
|
4867
|
-
return
|
|
4867
|
+
return E.createElement(n.Day, { key: `${o.format(Ve, "yyyy-MM-dd")}_${o.format(me.displayMonth, "yyyy-MM")}`, day: me, modifiers: X, className: Zc.join(" "), style: Xc, role: "gridcell", "aria-selected": X.selected || void 0, "aria-label": Gc, "data-day": o.format(Ve, "yyyy-MM-dd"), "data-month": me.outside ? o.format(Ve, "yyyy-MM") : void 0, "data-selected": X.selected || void 0, "data-disabled": X.disabled || void 0, "data-hidden": X.hidden || void 0, "data-outside": me.outside || void 0, "data-focused": X.focused || void 0, "data-today": X.today || void 0 }, !X.hidden && Ie ? E.createElement(n.DayButton, { className: s[P.DayButton], style: x?.[P.DayButton], type: "button", day: me, modifiers: X, disabled: X.disabled || void 0, tabIndex: Ue(me) ? 0 : -1, "aria-label": Lt(Ve, X, o.options, o), onClick: Ln(me, X), onBlur: Ic(me, X), onFocus: Wc(me, X), onKeyDown: Fc(me, X), onMouseEnter: jc(me, X), onMouseLeave: Yc(me, X) }, M(Ve, o.options, o)) : !X.hidden && M(me.date, o.options, o));
|
|
4868
4868
|
})
|
|
4869
4869
|
)))
|
|
4870
4870
|
)
|
|
4871
4871
|
);
|
|
4872
4872
|
})
|
|
4873
4873
|
),
|
|
4874
|
-
t.footer &&
|
|
4874
|
+
t.footer && E.createElement(n.Footer, { className: s[P.Footer], style: x?.[P.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
4875
4875
|
)
|
|
4876
4876
|
);
|
|
4877
4877
|
}
|
|
@@ -6022,11 +6022,11 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6022
6022
|
negative: y = !1,
|
|
6023
6023
|
...h
|
|
6024
6024
|
}, g) => {
|
|
6025
|
-
const
|
|
6026
|
-
|
|
6025
|
+
const b = ss(), w = h.id ?? b, _ = (B) => e ? `${e}-${B}` : void 0, $ = m && !a, x = s ? `${w}-helper-text` : void 0, S = [p].filter((B) => !!B), M = (typeof h.value == "number" ? h.value !== void 0 : h.value?.length) && !h.disabled && !h.readOnly && !l && d && n, D = _v(null), O = (B) => {
|
|
6026
|
+
D.current = B, typeof g == "function" ? g(B) : g && (g.current = B);
|
|
6027
6027
|
}, R = () => {
|
|
6028
|
-
d?.(),
|
|
6029
|
-
},
|
|
6028
|
+
d?.(), D.current?.focus();
|
|
6029
|
+
}, C = [
|
|
6030
6030
|
l && /* @__PURE__ */ v(
|
|
6031
6031
|
vu,
|
|
6032
6032
|
{
|
|
@@ -6037,7 +6037,7 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6037
6037
|
},
|
|
6038
6038
|
"spinner"
|
|
6039
6039
|
),
|
|
6040
|
-
|
|
6040
|
+
M && /* @__PURE__ */ v(
|
|
6041
6041
|
du,
|
|
6042
6042
|
{
|
|
6043
6043
|
negative: y,
|
|
@@ -6061,11 +6061,11 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6061
6061
|
},
|
|
6062
6062
|
"valid-icon"
|
|
6063
6063
|
)
|
|
6064
|
-
].filter((
|
|
6065
|
-
[`${ce}__input-container--start-adornment`]:
|
|
6066
|
-
[`${ce}__input-container--end-adornment`]:
|
|
6064
|
+
].filter((B) => !!B), J = ot(`${ce}__input-container`, {
|
|
6065
|
+
[`${ce}__input-container--start-adornment`]: S.length,
|
|
6066
|
+
[`${ce}__input-container--end-adornment`]: C.length || o,
|
|
6067
6067
|
[`${ce}__input-container--disabled`]: h.disabled,
|
|
6068
|
-
[`${ce}__input-container--has-clear-button`]:
|
|
6068
|
+
[`${ce}__input-container--has-clear-button`]: M,
|
|
6069
6069
|
[`${ce}__input-container--readonly`]: h.readOnly && !h.disabled,
|
|
6070
6070
|
[`${ce}__input-container--negative`]: y
|
|
6071
6071
|
});
|
|
@@ -6073,7 +6073,7 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6073
6073
|
u && /* @__PURE__ */ Q(
|
|
6074
6074
|
sv,
|
|
6075
6075
|
{
|
|
6076
|
-
htmlFor:
|
|
6076
|
+
htmlFor: w,
|
|
6077
6077
|
className: ot(`${ce}__label`),
|
|
6078
6078
|
"data-testid": _("label"),
|
|
6079
6079
|
disabled: h.disabled,
|
|
@@ -6087,20 +6087,20 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6087
6087
|
/* @__PURE__ */ Q("div", { className: ot(`${ce}__field-row`), children: [
|
|
6088
6088
|
!!r && r,
|
|
6089
6089
|
/* @__PURE__ */ Q("div", { className: J, children: [
|
|
6090
|
-
!!
|
|
6090
|
+
!!S.length && /* @__PURE__ */ v(
|
|
6091
6091
|
"div",
|
|
6092
6092
|
{
|
|
6093
6093
|
"data-testid": _("start-adornments"),
|
|
6094
6094
|
className: ot(`${ce}__adornment-container`),
|
|
6095
|
-
children:
|
|
6095
|
+
children: S
|
|
6096
6096
|
}
|
|
6097
6097
|
),
|
|
6098
6098
|
/* @__PURE__ */ v(
|
|
6099
6099
|
"input",
|
|
6100
6100
|
{
|
|
6101
6101
|
...h,
|
|
6102
|
-
id:
|
|
6103
|
-
ref:
|
|
6102
|
+
id: w,
|
|
6103
|
+
ref: O,
|
|
6104
6104
|
"data-testid": _("input"),
|
|
6105
6105
|
"aria-describedby": h["aria-describedby"] || x,
|
|
6106
6106
|
"aria-invalid": h["aria-invalid"] || !!a,
|
|
@@ -6122,13 +6122,13 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
|
|
|
6122
6122
|
})
|
|
6123
6123
|
}
|
|
6124
6124
|
),
|
|
6125
|
-
(!!
|
|
6125
|
+
(!!C.length || o) && /* @__PURE__ */ Q(
|
|
6126
6126
|
"div",
|
|
6127
6127
|
{
|
|
6128
6128
|
"data-testid": _("end-adornments"),
|
|
6129
6129
|
className: ot(`${ce}__adornment-container`),
|
|
6130
6130
|
children: [
|
|
6131
|
-
|
|
6131
|
+
C,
|
|
6132
6132
|
o
|
|
6133
6133
|
]
|
|
6134
6134
|
}
|
|
@@ -8733,8 +8733,7 @@ let nb = class extends z {
|
|
|
8733
8733
|
);
|
|
8734
8734
|
}
|
|
8735
8735
|
incompatibleTokens = ["t", "T", "X"];
|
|
8736
|
-
}
|
|
8737
|
-
class mb extends z {
|
|
8736
|
+
}, mb = class extends z {
|
|
8738
8737
|
priority = 40;
|
|
8739
8738
|
parse(t) {
|
|
8740
8739
|
return Ou(t);
|
|
@@ -8743,8 +8742,7 @@ class mb extends z {
|
|
|
8743
8742
|
return [he(t, r * 1e3), { timestampIsSet: !0 }];
|
|
8744
8743
|
}
|
|
8745
8744
|
incompatibleTokens = "*";
|
|
8746
|
-
}
|
|
8747
|
-
let gb = class extends z {
|
|
8745
|
+
}, gb = class extends z {
|
|
8748
8746
|
priority = 20;
|
|
8749
8747
|
parse(t) {
|
|
8750
8748
|
return Ou(t);
|
|
@@ -8793,32 +8791,32 @@ function Sb(e, t, n, r) {
|
|
|
8793
8791
|
weekStartsOn: c,
|
|
8794
8792
|
locale: a
|
|
8795
8793
|
}, l = [new Py(r?.in, n)], d = t.match(bb).map((g) => {
|
|
8796
|
-
const
|
|
8797
|
-
if (
|
|
8798
|
-
const
|
|
8799
|
-
return
|
|
8794
|
+
const b = g[0];
|
|
8795
|
+
if (b in ho) {
|
|
8796
|
+
const w = ho[b];
|
|
8797
|
+
return w(g, a.formatLong);
|
|
8800
8798
|
}
|
|
8801
8799
|
return g;
|
|
8802
8800
|
}).join("").match(yb), p = [];
|
|
8803
8801
|
for (let g of d) {
|
|
8804
8802
|
Cu(g) && mo(g, t, e), Eu(g) && mo(g, t, e);
|
|
8805
|
-
const
|
|
8806
|
-
if (
|
|
8807
|
-
const { incompatibleTokens: _ } =
|
|
8803
|
+
const b = g[0], w = vb[b];
|
|
8804
|
+
if (w) {
|
|
8805
|
+
const { incompatibleTokens: _ } = w;
|
|
8808
8806
|
if (Array.isArray(_)) {
|
|
8809
8807
|
const x = p.find(
|
|
8810
|
-
(
|
|
8808
|
+
(S) => _.includes(S.token) || S.token === b
|
|
8811
8809
|
);
|
|
8812
8810
|
if (x)
|
|
8813
8811
|
throw new RangeError(
|
|
8814
8812
|
`The format string mustn't contain \`${x.fullToken}\` and \`${g}\` at the same time`
|
|
8815
8813
|
);
|
|
8816
|
-
} else if (
|
|
8814
|
+
} else if (w.incompatibleTokens === "*" && p.length > 0)
|
|
8817
8815
|
throw new RangeError(
|
|
8818
8816
|
`The format string mustn't contain \`${g}\` and any other token at the same time`
|
|
8819
8817
|
);
|
|
8820
|
-
p.push({ token:
|
|
8821
|
-
const $ =
|
|
8818
|
+
p.push({ token: b, fullToken: g });
|
|
8819
|
+
const $ = w.run(
|
|
8822
8820
|
e,
|
|
8823
8821
|
g,
|
|
8824
8822
|
a.match,
|
|
@@ -8828,11 +8826,11 @@ function Sb(e, t, n, r) {
|
|
|
8828
8826
|
return i();
|
|
8829
8827
|
l.push($.setter), e = $.rest;
|
|
8830
8828
|
} else {
|
|
8831
|
-
if (
|
|
8829
|
+
if (b.match($b))
|
|
8832
8830
|
throw new RangeError(
|
|
8833
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
8831
|
+
"Format string contains an unescaped latin alphabet character `" + b + "`"
|
|
8834
8832
|
);
|
|
8835
|
-
if (g === "''" ? g = "'" :
|
|
8833
|
+
if (g === "''" ? g = "'" : b === "'" && (g = Mb(g)), e.indexOf(g) === 0)
|
|
8836
8834
|
e = e.slice(g.length);
|
|
8837
8835
|
else
|
|
8838
8836
|
return i();
|
|
@@ -8840,8 +8838,8 @@ function Sb(e, t, n, r) {
|
|
|
8840
8838
|
}
|
|
8841
8839
|
if (e.length > 0 && xb.test(e))
|
|
8842
8840
|
return i();
|
|
8843
|
-
const m = l.map((g) => g.priority).sort((g,
|
|
8844
|
-
(g) => l.filter((
|
|
8841
|
+
const m = l.map((g) => g.priority).sort((g, b) => b - g).filter((g, b, w) => w.indexOf(g) === b).map(
|
|
8842
|
+
(g) => l.filter((b) => b.priority === g).sort((b, w) => w.subPriority - b.subPriority)
|
|
8845
8843
|
).map((g) => g[0]);
|
|
8846
8844
|
let y = pe(n, r?.in);
|
|
8847
8845
|
if (isNaN(+y)) return i();
|
|
@@ -8849,8 +8847,8 @@ function Sb(e, t, n, r) {
|
|
|
8849
8847
|
for (const g of m) {
|
|
8850
8848
|
if (!g.validate(y, u))
|
|
8851
8849
|
return i();
|
|
8852
|
-
const
|
|
8853
|
-
Array.isArray(
|
|
8850
|
+
const b = g.set(y, h, u);
|
|
8851
|
+
Array.isArray(b) ? (y = b[0], Object.assign(h, b[1])) : y = b;
|
|
8854
8852
|
}
|
|
8855
8853
|
return y;
|
|
8856
8854
|
}
|
|
@@ -8878,12 +8876,12 @@ const kb = {
|
|
|
8878
8876
|
if (u.current) {
|
|
8879
8877
|
const g = window.document.querySelector(
|
|
8880
8878
|
`label[for="${u.current.id}"]`
|
|
8881
|
-
),
|
|
8879
|
+
), b = g ? g.offsetHeight + 4 : 0, w = window.getComputedStyle(u.current);
|
|
8882
8880
|
p({
|
|
8883
8881
|
position: "absolute",
|
|
8884
|
-
top: u.current.offsetTop +
|
|
8882
|
+
top: u.current.offsetTop + b,
|
|
8885
8883
|
left: u.current.offsetLeft,
|
|
8886
|
-
padding:
|
|
8884
|
+
padding: w.padding,
|
|
8887
8885
|
width: u.current.offsetWidth,
|
|
8888
8886
|
height: u.current.offsetHeight
|
|
8889
8887
|
});
|
|
@@ -8892,23 +8890,23 @@ const kb = {
|
|
|
8892
8890
|
const m = (g) => {
|
|
8893
8891
|
if (g.length === 0 && r?.(void 0), g.length !== Hr.length)
|
|
8894
8892
|
return;
|
|
8895
|
-
const
|
|
8896
|
-
xu(
|
|
8893
|
+
const b = Eb(g);
|
|
8894
|
+
xu(b) && r?.(b);
|
|
8897
8895
|
}, y = (g) => {
|
|
8898
|
-
const
|
|
8899
|
-
let
|
|
8900
|
-
|
|
8901
|
-
}, h = () => Hr.split("").map((g,
|
|
8902
|
-
const
|
|
8896
|
+
const b = g.target.value.replace(/\D/g, "");
|
|
8897
|
+
let w = "";
|
|
8898
|
+
b.length > 0 && (w += b.slice(0, 4)), b.length > 4 && (w += "-" + b.slice(4, 6)), b.length > 6 && (w += "-" + b.slice(6, 8)), c(w), m(g.target.value);
|
|
8899
|
+
}, h = () => Hr.split("").map((g, b) => {
|
|
8900
|
+
const w = s[b];
|
|
8903
8901
|
return /* @__PURE__ */ v(
|
|
8904
8902
|
"span",
|
|
8905
8903
|
{
|
|
8906
8904
|
style: {
|
|
8907
|
-
color:
|
|
8905
|
+
color: w ? "transparent" : "var(--purpur-color-text-weak)"
|
|
8908
8906
|
},
|
|
8909
|
-
children:
|
|
8907
|
+
children: w || g
|
|
8910
8908
|
},
|
|
8911
|
-
|
|
8909
|
+
b
|
|
8912
8910
|
);
|
|
8913
8911
|
});
|
|
8914
8912
|
return /* @__PURE__ */ Q("div", { className: Br(`${qr}__container`), children: [
|
|
@@ -9179,15 +9177,15 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
|
|
|
9179
9177
|
onInteractOutside: a,
|
|
9180
9178
|
onDismiss: s,
|
|
9181
9179
|
...c
|
|
9182
|
-
} = e, u = f.useContext(Wu), [l, d] = f.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), y = Oe(t, (
|
|
9183
|
-
const
|
|
9184
|
-
!$ ||
|
|
9185
|
-
}, p),
|
|
9186
|
-
const
|
|
9187
|
-
[...u.branches].some((
|
|
9180
|
+
} = e, u = f.useContext(Wu), [l, d] = f.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), y = Oe(t, (M) => d(M)), h = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = h.indexOf(g), w = l ? h.indexOf(l) : -1, _ = u.layersWithOutsidePointerEventsDisabled.size > 0, $ = w >= b, x = Gb((M) => {
|
|
9181
|
+
const D = M.target, O = [...u.branches].some((R) => R.contains(D));
|
|
9182
|
+
!$ || O || (i?.(M), a?.(M), M.defaultPrevented || s?.());
|
|
9183
|
+
}, p), S = Kb((M) => {
|
|
9184
|
+
const D = M.target;
|
|
9185
|
+
[...u.branches].some((O) => O.contains(D)) || (o?.(M), a?.(M), M.defaultPrevented || s?.());
|
|
9188
9186
|
}, p);
|
|
9189
|
-
return Hb((
|
|
9190
|
-
|
|
9187
|
+
return Hb((M) => {
|
|
9188
|
+
w === u.layers.size - 1 && (r?.(M), !M.defaultPrevented && s && (M.preventDefault(), s()));
|
|
9191
9189
|
}, p), f.useEffect(() => {
|
|
9192
9190
|
if (l)
|
|
9193
9191
|
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Ma = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(l)), u.layers.add(l), ka(), () => {
|
|
@@ -9196,8 +9194,8 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
|
|
|
9196
9194
|
}, [l, p, n, u]), f.useEffect(() => () => {
|
|
9197
9195
|
l && (u.layers.delete(l), u.layersWithOutsidePointerEventsDisabled.delete(l), ka());
|
|
9198
9196
|
}, [l, u]), f.useEffect(() => {
|
|
9199
|
-
const
|
|
9200
|
-
return document.addEventListener(vo,
|
|
9197
|
+
const M = () => m({});
|
|
9198
|
+
return document.addEventListener(vo, M), () => document.removeEventListener(vo, M);
|
|
9201
9199
|
}, []), /* @__PURE__ */ v(
|
|
9202
9200
|
$e.div,
|
|
9203
9201
|
{
|
|
@@ -9207,8 +9205,8 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
|
|
|
9207
9205
|
pointerEvents: _ ? $ ? "auto" : "none" : void 0,
|
|
9208
9206
|
...e.style
|
|
9209
9207
|
},
|
|
9210
|
-
onFocusCapture: _e(e.onFocusCapture,
|
|
9211
|
-
onBlurCapture: _e(e.onBlurCapture,
|
|
9208
|
+
onFocusCapture: _e(e.onFocusCapture, S.onFocusCapture),
|
|
9209
|
+
onBlurCapture: _e(e.onBlurCapture, S.onBlurCapture),
|
|
9212
9210
|
onPointerDownCapture: _e(
|
|
9213
9211
|
e.onPointerDownCapture,
|
|
9214
9212
|
x.onPointerDownCapture
|
|
@@ -9307,15 +9305,15 @@ var Ur = "focusScope.autoFocusOnMount", Vr = "focusScope.autoFocusOnUnmount", Ea
|
|
|
9307
9305
|
if (m.paused || !s) return;
|
|
9308
9306
|
const $ = _.relatedTarget;
|
|
9309
9307
|
$ !== null && (s.contains($) || bt(d.current, { select: !0 }));
|
|
9310
|
-
},
|
|
9308
|
+
}, b = function(_) {
|
|
9311
9309
|
if (document.activeElement === document.body)
|
|
9312
9310
|
for (const $ of _)
|
|
9313
9311
|
$.removedNodes.length > 0 && bt(s);
|
|
9314
9312
|
};
|
|
9315
9313
|
document.addEventListener("focusin", h), document.addEventListener("focusout", g);
|
|
9316
|
-
const
|
|
9317
|
-
return s &&
|
|
9318
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout", g),
|
|
9314
|
+
const w = new MutationObserver(b);
|
|
9315
|
+
return s && w.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
9316
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), w.disconnect();
|
|
9319
9317
|
};
|
|
9320
9318
|
}
|
|
9321
9319
|
}, [r, s, m.paused]), f.useEffect(() => {
|
|
@@ -9337,10 +9335,10 @@ var Ur = "focusScope.autoFocusOnMount", Vr = "focusScope.autoFocusOnUnmount", Ea
|
|
|
9337
9335
|
const y = f.useCallback(
|
|
9338
9336
|
(h) => {
|
|
9339
9337
|
if (!n && !r || m.paused) return;
|
|
9340
|
-
const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey,
|
|
9341
|
-
if (g &&
|
|
9342
|
-
const
|
|
9343
|
-
_ && $ ? !h.shiftKey &&
|
|
9338
|
+
const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, b = document.activeElement;
|
|
9339
|
+
if (g && b) {
|
|
9340
|
+
const w = h.currentTarget, [_, $] = ew(w);
|
|
9341
|
+
_ && $ ? !h.shiftKey && b === $ ? (h.preventDefault(), n && bt(_, { select: !0 })) : h.shiftKey && b === _ && (h.preventDefault(), n && bt($, { select: !0 })) : b === w && h.preventDefault();
|
|
9344
9342
|
}
|
|
9345
9343
|
},
|
|
9346
9344
|
[n, r, m.paused]
|
|
@@ -9642,12 +9640,12 @@ var zu = yw(), Gr = function() {
|
|
|
9642
9640
|
onScrollCapture: Gr,
|
|
9643
9641
|
onWheelCapture: Gr,
|
|
9644
9642
|
onTouchMoveCapture: Gr
|
|
9645
|
-
}), i = r[0], o = r[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, y = e.noIsolation, h = e.inert, g = e.allowPinchZoom,
|
|
9643
|
+
}), i = r[0], o = r[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, y = e.noIsolation, h = e.inert, g = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, _ = e.gapMode, $ = qu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, S = mw([n, t]), M = Qe(Qe({}, $), i);
|
|
9646
9644
|
return f.createElement(
|
|
9647
9645
|
f.Fragment,
|
|
9648
9646
|
null,
|
|
9649
9647
|
l && f.createElement(x, { sideCar: zu, removeScrollBar: u, shards: d, noRelative: m, noIsolation: y, inert: h, setCallbacks: o, allowPinchZoom: !!g, lockRef: n, gapMode: _ }),
|
|
9650
|
-
a ? f.cloneElement(f.Children.only(s), Qe(Qe({},
|
|
9648
|
+
a ? f.cloneElement(f.Children.only(s), Qe(Qe({}, M), { ref: S })) : f.createElement(w, Qe({}, M, { className: c, ref: S }), s)
|
|
9651
9649
|
);
|
|
9652
9650
|
});
|
|
9653
9651
|
br.defaultProps = {
|
|
@@ -9849,10 +9847,10 @@ var jt = yo ? { passive: !1 } : !1, Rw = function(e) {
|
|
|
9849
9847
|
do {
|
|
9850
9848
|
if (!s)
|
|
9851
9849
|
break;
|
|
9852
|
-
var m = Zu(e, s), y = m[0], h = m[1], g = m[2],
|
|
9853
|
-
(y ||
|
|
9854
|
-
var
|
|
9855
|
-
s =
|
|
9850
|
+
var m = Zu(e, s), y = m[0], h = m[1], g = m[2], b = h - g - o * y;
|
|
9851
|
+
(y || b) && Xu(e, s) && (d += b, p += y);
|
|
9852
|
+
var w = s.parentNode;
|
|
9853
|
+
s = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
9856
9854
|
} while (
|
|
9857
9855
|
// portaled content
|
|
9858
9856
|
!c && s !== document.body || // self content
|
|
@@ -9893,16 +9891,16 @@ function qw(e) {
|
|
|
9893
9891
|
var s = f.useCallback(function(h, g) {
|
|
9894
9892
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
9895
9893
|
return !a.current.allowPinchZoom;
|
|
9896
|
-
var
|
|
9897
|
-
if ("touches" in h &&
|
|
9894
|
+
var b = Bn(h), w = n.current, _ = "deltaX" in h ? h.deltaX : w[0] - b[0], $ = "deltaY" in h ? h.deltaY : w[1] - b[1], x, S = h.target, M = Math.abs(_) > Math.abs($) ? "h" : "v";
|
|
9895
|
+
if ("touches" in h && M === "h" && S.type === "range")
|
|
9898
9896
|
return !1;
|
|
9899
|
-
var
|
|
9897
|
+
var D = window.getSelection(), O = D && D.anchorNode, R = O ? O === S || O.contains(S) : !1;
|
|
9900
9898
|
if (R)
|
|
9901
9899
|
return !1;
|
|
9902
|
-
var
|
|
9903
|
-
if (!
|
|
9900
|
+
var C = Pa(M, S);
|
|
9901
|
+
if (!C)
|
|
9904
9902
|
return !0;
|
|
9905
|
-
if (
|
|
9903
|
+
if (C ? x = M : (x = M === "v" ? "h" : "v", C = Pa(M, S)), !C)
|
|
9906
9904
|
return !1;
|
|
9907
9905
|
if (!r.current && "changedTouches" in h && (_ || $) && (r.current = x), !x)
|
|
9908
9906
|
return !0;
|
|
@@ -9911,22 +9909,22 @@ function qw(e) {
|
|
|
9911
9909
|
}, []), c = f.useCallback(function(h) {
|
|
9912
9910
|
var g = h;
|
|
9913
9911
|
if (!(!Yt.length || Yt[Yt.length - 1] !== o)) {
|
|
9914
|
-
var
|
|
9915
|
-
return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && jw(x.delta,
|
|
9912
|
+
var b = "deltaY" in g ? La(g) : Bn(g), w = t.current.filter(function(x) {
|
|
9913
|
+
return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && jw(x.delta, b);
|
|
9916
9914
|
})[0];
|
|
9917
|
-
if (
|
|
9915
|
+
if (w && w.should) {
|
|
9918
9916
|
g.cancelable && g.preventDefault();
|
|
9919
9917
|
return;
|
|
9920
9918
|
}
|
|
9921
|
-
if (!
|
|
9919
|
+
if (!w) {
|
|
9922
9920
|
var _ = (a.current.shards || []).map(Aa).filter(Boolean).filter(function(x) {
|
|
9923
9921
|
return x.contains(g.target);
|
|
9924
9922
|
}), $ = _.length > 0 ? s(g, _[0]) : !a.current.noIsolation;
|
|
9925
9923
|
$ && g.cancelable && g.preventDefault();
|
|
9926
9924
|
}
|
|
9927
9925
|
}
|
|
9928
|
-
}, []), u = f.useCallback(function(h, g,
|
|
9929
|
-
var _ = { name: h, delta: g, target:
|
|
9926
|
+
}, []), u = f.useCallback(function(h, g, b, w) {
|
|
9927
|
+
var _ = { name: h, delta: g, target: b, should: w, shadowParent: Hw(b) };
|
|
9930
9928
|
t.current.push(_), setTimeout(function() {
|
|
9931
9929
|
t.current = t.current.filter(function($) {
|
|
9932
9930
|
return $ !== _;
|
|
@@ -9999,8 +9997,8 @@ var Uw = function(e) {
|
|
|
9999
9997
|
try {
|
|
10000
9998
|
var m = p.getAttribute(r), y = m !== null && m !== "false", h = (Bt.get(p) || 0) + 1, g = (o.get(p) || 0) + 1;
|
|
10001
9999
|
Bt.set(p, h), o.set(p, g), a.push(p), h === 1 && y && qn.set(p, !0), g === 1 && p.setAttribute(n, "true"), y || p.setAttribute(r, "true");
|
|
10002
|
-
} catch (
|
|
10003
|
-
console.error("aria-hidden: cannot operate on ", p,
|
|
10000
|
+
} catch (b) {
|
|
10001
|
+
console.error("aria-hidden: cannot operate on ", p, b);
|
|
10004
10002
|
}
|
|
10005
10003
|
});
|
|
10006
10004
|
};
|
|
@@ -10218,7 +10216,7 @@ dc.displayName = lc;
|
|
|
10218
10216
|
function jo(e) {
|
|
10219
10217
|
return e ? "open" : "closed";
|
|
10220
10218
|
}
|
|
10221
|
-
var fc = "DialogTitleWarning", [
|
|
10219
|
+
var fc = "DialogTitleWarning", [V_, pc] = Db(fc, {
|
|
10222
10220
|
contentName: Rt,
|
|
10223
10221
|
titleName: Fo,
|
|
10224
10222
|
docsSlug: "dialog"
|
|
@@ -10362,7 +10360,7 @@ const k1 = {
|
|
|
10362
10360
|
onSwipeEnd: o,
|
|
10363
10361
|
...a
|
|
10364
10362
|
}, s) => {
|
|
10365
|
-
const c = D1([O1, t]), u =
|
|
10363
|
+
const c = D1([O1, t]), u = E.useRef(null), l = E.useRef(null), { onPointerDown: d, onPointerMove: p, onPointerUp: m } = C1(
|
|
10366
10364
|
l,
|
|
10367
10365
|
u,
|
|
10368
10366
|
n,
|
|
@@ -10867,23 +10865,24 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
|
|
|
10867
10865
|
closeButtonAriaLabel: o,
|
|
10868
10866
|
headerContent: a,
|
|
10869
10867
|
onBackButtonClick: s,
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10868
|
+
onCloseClick: c,
|
|
10869
|
+
title: u,
|
|
10870
|
+
...l
|
|
10871
|
+
}, d) => {
|
|
10872
|
+
const p = qt([yt, i]), m = !!(t && n && s), y = c ? E.Fragment : d1;
|
|
10873
|
+
return /* @__PURE__ */ Q("div", { className: p, "data-testid": e, ref: d, ...l, children: [
|
|
10875
10874
|
/* @__PURE__ */ Q(
|
|
10876
10875
|
"div",
|
|
10877
10876
|
{
|
|
10878
10877
|
className: qt([
|
|
10879
10878
|
`${yt}__row`,
|
|
10880
10879
|
{
|
|
10881
|
-
[`${yt}__row--with-back-button`]:
|
|
10880
|
+
[`${yt}__row--with-back-button`]: m
|
|
10882
10881
|
}
|
|
10883
10882
|
]),
|
|
10884
10883
|
"data-testid": `${e}-row`,
|
|
10885
10884
|
children: [
|
|
10886
|
-
/* @__PURE__ */ v("div", { className: qt(`${yt}__left`), children:
|
|
10885
|
+
/* @__PURE__ */ v("div", { className: qt(`${yt}__left`), children: m ? /* @__PURE__ */ Q(
|
|
10887
10886
|
bo,
|
|
10888
10887
|
{
|
|
10889
10888
|
"aria-label": r ? n : "",
|
|
@@ -10905,7 +10904,7 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
|
|
|
10905
10904
|
}
|
|
10906
10905
|
) : a ? /* @__PURE__ */ Q(Tt, { children: [
|
|
10907
10906
|
a,
|
|
10908
|
-
/* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children:
|
|
10907
|
+
/* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: u }) })
|
|
10909
10908
|
] }) : /* @__PURE__ */ v(zn, { asChild: !0, children: /* @__PURE__ */ v(
|
|
10910
10909
|
wo,
|
|
10911
10910
|
{
|
|
@@ -10913,15 +10912,16 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
|
|
|
10913
10912
|
tag: "h2",
|
|
10914
10913
|
variant: Xa.DISPLAY10,
|
|
10915
10914
|
tabIndex: -1,
|
|
10916
|
-
children:
|
|
10915
|
+
children: u
|
|
10917
10916
|
}
|
|
10918
10917
|
) }) }),
|
|
10919
|
-
/* @__PURE__ */ v("div", { className: qt(`${yt}__right`), children: /* @__PURE__ */ v(
|
|
10918
|
+
/* @__PURE__ */ v("div", { className: qt(`${yt}__right`), children: /* @__PURE__ */ v(y, { asChild: !c, children: /* @__PURE__ */ v(
|
|
10920
10919
|
bo,
|
|
10921
10920
|
{
|
|
10922
10921
|
"aria-label": o,
|
|
10923
10922
|
className: qt(`${yt}__close-button`),
|
|
10924
10923
|
iconOnly: !0,
|
|
10924
|
+
onClick: c,
|
|
10925
10925
|
size: "sm",
|
|
10926
10926
|
variant: eo.TERTIARY_PURPLE,
|
|
10927
10927
|
children: /* @__PURE__ */ v(yc, { size: "sm" })
|
|
@@ -10930,9 +10930,9 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
|
|
|
10930
10930
|
]
|
|
10931
10931
|
}
|
|
10932
10932
|
),
|
|
10933
|
-
|
|
10933
|
+
m && (a ? /* @__PURE__ */ Q(Tt, { children: [
|
|
10934
10934
|
a,
|
|
10935
|
-
/* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children:
|
|
10935
|
+
/* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: u }) })
|
|
10936
10936
|
] }) : /* @__PURE__ */ v(zn, { asChild: !0, children: /* @__PURE__ */ v(
|
|
10937
10937
|
wo,
|
|
10938
10938
|
{
|
|
@@ -10940,7 +10940,7 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
|
|
|
10940
10940
|
tag: "h2",
|
|
10941
10941
|
tabIndex: -1,
|
|
10942
10942
|
variant: Xa.DISPLAY10,
|
|
10943
|
-
children:
|
|
10943
|
+
children: u
|
|
10944
10944
|
}
|
|
10945
10945
|
) }))
|
|
10946
10946
|
] });
|
|
@@ -10966,7 +10966,7 @@ var Bo = "ScrollArea", [_c] = Lu(Bo), [S0, Ae] = _c(Bo), xc = f.forwardRef(
|
|
|
10966
10966
|
dir: i,
|
|
10967
10967
|
scrollHideDelay: o = 600,
|
|
10968
10968
|
...a
|
|
10969
|
-
} = e, [s, c] = f.useState(null), [u, l] = f.useState(null), [d, p] = f.useState(null), [m, y] = f.useState(null), [h, g] = f.useState(null), [
|
|
10969
|
+
} = e, [s, c] = f.useState(null), [u, l] = f.useState(null), [d, p] = f.useState(null), [m, y] = f.useState(null), [h, g] = f.useState(null), [b, w] = f.useState(0), [_, $] = f.useState(0), [x, S] = f.useState(!1), [M, D] = f.useState(!1), O = Oe(t, (C) => c(C)), R = _0(i);
|
|
10970
10970
|
return /* @__PURE__ */ v(
|
|
10971
10971
|
S0,
|
|
10972
10972
|
{
|
|
@@ -10982,23 +10982,23 @@ var Bo = "ScrollArea", [_c] = Lu(Bo), [S0, Ae] = _c(Bo), xc = f.forwardRef(
|
|
|
10982
10982
|
scrollbarX: m,
|
|
10983
10983
|
onScrollbarXChange: y,
|
|
10984
10984
|
scrollbarXEnabled: x,
|
|
10985
|
-
onScrollbarXEnabledChange:
|
|
10985
|
+
onScrollbarXEnabledChange: S,
|
|
10986
10986
|
scrollbarY: h,
|
|
10987
10987
|
onScrollbarYChange: g,
|
|
10988
|
-
scrollbarYEnabled:
|
|
10989
|
-
onScrollbarYEnabledChange:
|
|
10990
|
-
onCornerWidthChange:
|
|
10988
|
+
scrollbarYEnabled: M,
|
|
10989
|
+
onScrollbarYEnabledChange: D,
|
|
10990
|
+
onCornerWidthChange: w,
|
|
10991
10991
|
onCornerHeightChange: $,
|
|
10992
10992
|
children: /* @__PURE__ */ v(
|
|
10993
10993
|
$e.div,
|
|
10994
10994
|
{
|
|
10995
10995
|
dir: R,
|
|
10996
10996
|
...a,
|
|
10997
|
-
ref:
|
|
10997
|
+
ref: O,
|
|
10998
10998
|
style: {
|
|
10999
10999
|
position: "relative",
|
|
11000
11000
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
11001
|
-
"--radix-scroll-area-corner-width":
|
|
11001
|
+
"--radix-scroll-area-corner-width": b + "px",
|
|
11002
11002
|
"--radix-scroll-area-corner-height": _ + "px",
|
|
11003
11003
|
...e.style
|
|
11004
11004
|
}
|
|
@@ -11288,20 +11288,20 @@ var M0 = f.forwardRef((e, t) => {
|
|
|
11288
11288
|
onWheelScroll: l,
|
|
11289
11289
|
onResize: d,
|
|
11290
11290
|
...p
|
|
11291
|
-
} = e, m = Ae(nt, n), [y, h] = f.useState(null), g = Oe(t, (
|
|
11292
|
-
function O
|
|
11293
|
-
if (
|
|
11294
|
-
const R =
|
|
11295
|
-
u({ x: R, y:
|
|
11291
|
+
} = e, m = Ae(nt, n), [y, h] = f.useState(null), g = Oe(t, (O) => h(O)), b = f.useRef(null), w = f.useRef(""), _ = m.viewport, $ = r.content - r.viewport, x = Re(l), S = Re(c), M = xr(d, 10);
|
|
11292
|
+
function D(O) {
|
|
11293
|
+
if (b.current) {
|
|
11294
|
+
const R = O.clientX - b.current.left, C = O.clientY - b.current.top;
|
|
11295
|
+
u({ x: R, y: C });
|
|
11296
11296
|
}
|
|
11297
11297
|
}
|
|
11298
11298
|
return f.useEffect(() => {
|
|
11299
|
-
const
|
|
11300
|
-
const
|
|
11301
|
-
y?.contains(
|
|
11299
|
+
const O = (R) => {
|
|
11300
|
+
const C = R.target;
|
|
11301
|
+
y?.contains(C) && x(R, $);
|
|
11302
11302
|
};
|
|
11303
|
-
return document.addEventListener("wheel",
|
|
11304
|
-
}, [_, y, $, x]), f.useEffect(
|
|
11303
|
+
return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
|
|
11304
|
+
}, [_, y, $, x]), f.useEffect(S, [r, S]), an(y, M), an(m.content, M), /* @__PURE__ */ v(
|
|
11305
11305
|
D0,
|
|
11306
11306
|
{
|
|
11307
11307
|
scope: n,
|
|
@@ -11309,7 +11309,7 @@ var M0 = f.forwardRef((e, t) => {
|
|
|
11309
11309
|
hasThumb: i,
|
|
11310
11310
|
onThumbChange: Re(o),
|
|
11311
11311
|
onThumbPointerUp: Re(a),
|
|
11312
|
-
onThumbPositionChange:
|
|
11312
|
+
onThumbPositionChange: S,
|
|
11313
11313
|
onThumbPointerDown: Re(s),
|
|
11314
11314
|
children: /* @__PURE__ */ v(
|
|
11315
11315
|
$e.div,
|
|
@@ -11317,13 +11317,13 @@ var M0 = f.forwardRef((e, t) => {
|
|
|
11317
11317
|
...p,
|
|
11318
11318
|
ref: g,
|
|
11319
11319
|
style: { position: "absolute", ...p.style },
|
|
11320
|
-
onPointerDown: _e(e.onPointerDown, (
|
|
11321
|
-
|
|
11320
|
+
onPointerDown: _e(e.onPointerDown, (O) => {
|
|
11321
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), b.current = y.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), D(O));
|
|
11322
11322
|
}),
|
|
11323
|
-
onPointerMove: _e(e.onPointerMove,
|
|
11324
|
-
onPointerUp: _e(e.onPointerUp, (
|
|
11325
|
-
const R =
|
|
11326
|
-
R.hasPointerCapture(
|
|
11323
|
+
onPointerMove: _e(e.onPointerMove, D),
|
|
11324
|
+
onPointerUp: _e(e.onPointerUp, (O) => {
|
|
11325
|
+
const R = O.target;
|
|
11326
|
+
R.hasPointerCapture(O.pointerId) && R.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = w.current, m.viewport && (m.viewport.style.scrollBehavior = ""), b.current = null;
|
|
11327
11327
|
})
|
|
11328
11328
|
}
|
|
11329
11329
|
)
|
|
@@ -11514,35 +11514,36 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
|
|
|
11514
11514
|
footerContent: c,
|
|
11515
11515
|
headerContent: u,
|
|
11516
11516
|
onBackButtonClick: l,
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11517
|
+
onCloseClick: d,
|
|
11518
|
+
onSwipeStart: p,
|
|
11519
|
+
onSwipeMove: m,
|
|
11520
|
+
onSwipeCancel: y,
|
|
11521
|
+
onSwipeEnd: h,
|
|
11522
|
+
title: g,
|
|
11523
|
+
stickyFooter: b,
|
|
11523
11524
|
position: w = "right",
|
|
11524
|
-
...
|
|
11525
|
-
},
|
|
11526
|
-
const
|
|
11525
|
+
..._
|
|
11526
|
+
}, $) => {
|
|
11527
|
+
const x = !!(t && n && l), S = zt([
|
|
11527
11528
|
Me,
|
|
11528
11529
|
{
|
|
11529
11530
|
[`${Me}--fit-to-content`]: s,
|
|
11530
|
-
[`${Me}--sticky-footer`]:
|
|
11531
|
+
[`${Me}--sticky-footer`]: b,
|
|
11531
11532
|
[`${Me}--left`]: w === "left",
|
|
11532
11533
|
[`${Me}--right`]: w === "right",
|
|
11533
|
-
[`${Me}--without-back-button`]:
|
|
11534
|
-
[`${Me}--with-back-button`]:
|
|
11534
|
+
[`${Me}--without-back-button`]: !x,
|
|
11535
|
+
[`${Me}--with-back-button`]: x
|
|
11535
11536
|
},
|
|
11536
11537
|
o
|
|
11537
11538
|
]);
|
|
11538
|
-
return /* @__PURE__ */ Q("div", { className:
|
|
11539
|
+
return /* @__PURE__ */ Q("div", { className: S, "data-testid": e, ref: $, ..._, children: [
|
|
11539
11540
|
/* @__PURE__ */ v(
|
|
11540
11541
|
mc,
|
|
11541
11542
|
{
|
|
11542
|
-
onSwipeStart:
|
|
11543
|
-
onSwipeMove:
|
|
11544
|
-
onSwipeCancel:
|
|
11545
|
-
onSwipeEnd:
|
|
11543
|
+
onSwipeStart: p,
|
|
11544
|
+
onSwipeMove: m,
|
|
11545
|
+
onSwipeCancel: y,
|
|
11546
|
+
onSwipeEnd: h
|
|
11546
11547
|
}
|
|
11547
11548
|
),
|
|
11548
11549
|
/* @__PURE__ */ v(
|
|
@@ -11550,22 +11551,23 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
|
|
|
11550
11551
|
{
|
|
11551
11552
|
className: zt(`${Me}__header`),
|
|
11552
11553
|
variant: "header",
|
|
11553
|
-
stickyFooter:
|
|
11554
|
+
stickyFooter: b,
|
|
11554
11555
|
children: /* @__PURE__ */ v(
|
|
11555
11556
|
wc,
|
|
11556
11557
|
{
|
|
11557
|
-
title:
|
|
11558
|
+
title: g,
|
|
11558
11559
|
headerContent: u,
|
|
11559
11560
|
backButtonOnlyIcon: r,
|
|
11560
11561
|
backButton: t,
|
|
11561
11562
|
backButtonText: n,
|
|
11562
11563
|
closeButtonAriaLabel: a,
|
|
11563
|
-
onBackButtonClick: l
|
|
11564
|
+
onBackButtonClick: l,
|
|
11565
|
+
onCloseClick: d
|
|
11564
11566
|
}
|
|
11565
11567
|
)
|
|
11566
11568
|
}
|
|
11567
11569
|
),
|
|
11568
|
-
|
|
11570
|
+
b ? /* @__PURE__ */ Q(Tt, { children: [
|
|
11569
11571
|
/* @__PURE__ */ v(
|
|
11570
11572
|
_o,
|
|
11571
11573
|
{
|
|
@@ -11581,7 +11583,7 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
|
|
|
11581
11583
|
className: zt(`${Me}__footer`),
|
|
11582
11584
|
"data-testid": `${e}-sticky-footer`,
|
|
11583
11585
|
variant: "footer",
|
|
11584
|
-
stickyFooter:
|
|
11586
|
+
stickyFooter: b,
|
|
11585
11587
|
children: c
|
|
11586
11588
|
}
|
|
11587
11589
|
)
|
|
@@ -11599,12 +11601,12 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
|
|
|
11599
11601
|
{ [`${Me}__content-container--no-footer`]: !c }
|
|
11600
11602
|
]),
|
|
11601
11603
|
children: [
|
|
11602
|
-
/* @__PURE__ */ v(Vt, { stickyFooter:
|
|
11604
|
+
/* @__PURE__ */ v(Vt, { stickyFooter: b, children: i }),
|
|
11603
11605
|
c && /* @__PURE__ */ v(
|
|
11604
11606
|
Vt,
|
|
11605
11607
|
{
|
|
11606
11608
|
"data-testid": `${e}-footer`,
|
|
11607
|
-
stickyFooter:
|
|
11609
|
+
stickyFooter: b,
|
|
11608
11610
|
variant: "footer",
|
|
11609
11611
|
children: c
|
|
11610
11612
|
}
|
|
@@ -11652,33 +11654,40 @@ const j0 = (e, t) => ({
|
|
|
11652
11654
|
footerContent: l,
|
|
11653
11655
|
headerContent: d,
|
|
11654
11656
|
onBackButtonClick: p,
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11657
|
+
onCloseClick: m,
|
|
11658
|
+
stickyFooter: y = !1,
|
|
11659
|
+
title: h,
|
|
11660
|
+
zIndex: g,
|
|
11661
|
+
position: b = "right",
|
|
11659
11662
|
...w
|
|
11660
|
-
},
|
|
11661
|
-
const
|
|
11663
|
+
}, _) => {
|
|
11664
|
+
const $ = bn([
|
|
11662
11665
|
kt,
|
|
11663
11666
|
{
|
|
11664
11667
|
[`${kt}--fit-to-content`]: u,
|
|
11665
|
-
[`${kt}--left`]:
|
|
11666
|
-
[`${kt}--right`]:
|
|
11668
|
+
[`${kt}--left`]: b === "left",
|
|
11669
|
+
[`${kt}--right`]: b === "right"
|
|
11667
11670
|
},
|
|
11668
11671
|
a
|
|
11669
|
-
]),
|
|
11670
|
-
|
|
11671
|
-
},
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
),
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11672
|
+
]), x = st(null), S = st(null), M = (L) => {
|
|
11673
|
+
S.current = L, typeof _ == "function" ? _(L) : _ && (_.current = L);
|
|
11674
|
+
}, D = as(hc), { onSwipeStart: O, onSwipeMove: R, onSwipeCancel: C, onSwipeEnd: J } = j0(
|
|
11675
|
+
S,
|
|
11676
|
+
D
|
|
11677
|
+
), B = (L) => {
|
|
11678
|
+
if (c) {
|
|
11679
|
+
L.preventDefault();
|
|
11680
|
+
return;
|
|
11681
|
+
}
|
|
11682
|
+
m && (L.preventDefault(), m());
|
|
11683
|
+
}, T = (L) => {
|
|
11684
|
+
m && (L.preventDefault(), m());
|
|
11685
|
+
}, N = () => {
|
|
11686
|
+
const L = x.current;
|
|
11687
|
+
if (L) {
|
|
11688
|
+
const q = L.querySelector("h2");
|
|
11689
|
+
q && setTimeout(() => {
|
|
11690
|
+
q.focus();
|
|
11682
11691
|
});
|
|
11683
11692
|
}
|
|
11684
11693
|
};
|
|
@@ -11686,14 +11695,15 @@ const j0 = (e, t) => ({
|
|
|
11686
11695
|
u1,
|
|
11687
11696
|
{
|
|
11688
11697
|
className: bn("purpur-drawer-overlay"),
|
|
11689
|
-
style:
|
|
11698
|
+
style: g ? { zIndex: g } : void 0,
|
|
11690
11699
|
"data-testid": `${e}-overlay`,
|
|
11691
11700
|
children: /* @__PURE__ */ v(
|
|
11692
11701
|
c1,
|
|
11693
11702
|
{
|
|
11694
|
-
onPointerDownOutside:
|
|
11695
|
-
|
|
11696
|
-
|
|
11703
|
+
onPointerDownOutside: B,
|
|
11704
|
+
onEscapeKeyDown: T,
|
|
11705
|
+
onOpenAutoFocus: N,
|
|
11706
|
+
className: $,
|
|
11697
11707
|
"data-testid": e,
|
|
11698
11708
|
ref: M,
|
|
11699
11709
|
...!i && { "aria-describedby": void 0 },
|
|
@@ -11709,15 +11719,16 @@ const j0 = (e, t) => ({
|
|
|
11709
11719
|
fitToContent: u,
|
|
11710
11720
|
footerContent: l,
|
|
11711
11721
|
headerContent: d,
|
|
11712
|
-
ref:
|
|
11722
|
+
ref: x,
|
|
11713
11723
|
onBackButtonClick: p,
|
|
11724
|
+
onCloseClick: m,
|
|
11714
11725
|
onSwipeStart: O,
|
|
11715
|
-
onSwipeMove:
|
|
11716
|
-
onSwipeCancel:
|
|
11717
|
-
onSwipeEnd:
|
|
11718
|
-
stickyFooter:
|
|
11719
|
-
title:
|
|
11720
|
-
position:
|
|
11726
|
+
onSwipeMove: R,
|
|
11727
|
+
onSwipeCancel: C,
|
|
11728
|
+
onSwipeEnd: J,
|
|
11729
|
+
stickyFooter: y,
|
|
11730
|
+
title: h,
|
|
11731
|
+
position: b,
|
|
11721
11732
|
children: i ? /* @__PURE__ */ Q("div", { className: bn(`${kt}__content-container`), children: [
|
|
11722
11733
|
/* @__PURE__ */ v(
|
|
11723
11734
|
l1,
|
|
@@ -11750,7 +11761,7 @@ const Jt = ({
|
|
|
11750
11761
|
open: i = !1,
|
|
11751
11762
|
...o
|
|
11752
11763
|
}) => {
|
|
11753
|
-
const [a, s] =
|
|
11764
|
+
const [a, s] = E.useState(i), c = (u) => {
|
|
11754
11765
|
s(u), r?.(u);
|
|
11755
11766
|
};
|
|
11756
11767
|
return Dn(() => {
|
|
@@ -11879,8 +11890,8 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11879
11890
|
}, a) => {
|
|
11880
11891
|
const [s, c] = Be(!1), [u, l] = Be(!1), [d, p] = Be(!1), m = st(null), { context: y, refs: h, floatingStyles: g } = ef({
|
|
11881
11892
|
open: s,
|
|
11882
|
-
onOpenChange: (
|
|
11883
|
-
o.readOnly || c(
|
|
11893
|
+
onOpenChange: (C) => {
|
|
11894
|
+
o.readOnly || c(C);
|
|
11884
11895
|
},
|
|
11885
11896
|
placement: "bottom-start",
|
|
11886
11897
|
middleware: [
|
|
@@ -11892,19 +11903,19 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11892
11903
|
Sd()
|
|
11893
11904
|
],
|
|
11894
11905
|
whileElementsMounted: gd
|
|
11895
|
-
}),
|
|
11906
|
+
}), b = Zd(y), w = Qd(y), { getFloatingProps: _, getReferenceProps: $ } = tf([b, w]), [x, S] = Be(n);
|
|
11896
11907
|
Dn(() => {
|
|
11897
|
-
|
|
11908
|
+
S(n);
|
|
11898
11909
|
}, [n]);
|
|
11899
|
-
const
|
|
11900
|
-
|
|
11901
|
-
},
|
|
11910
|
+
const M = (C) => {
|
|
11911
|
+
C ? (S(C), r?.(C), (s || u) && (c(!1), l(!1))) : (S(void 0), r?.(void 0));
|
|
11912
|
+
}, D = ss();
|
|
11902
11913
|
return Cn(() => {
|
|
11903
|
-
const
|
|
11914
|
+
const C = () => {
|
|
11904
11915
|
p(window.innerWidth < 600);
|
|
11905
11916
|
};
|
|
11906
|
-
return
|
|
11907
|
-
window.removeEventListener("resize",
|
|
11917
|
+
return C(), window.addEventListener("resize", C), () => {
|
|
11918
|
+
window.removeEventListener("resize", C);
|
|
11908
11919
|
};
|
|
11909
11920
|
}, []), d ? /* @__PURE__ */ Q(Jt, { open: u, onOpenChange: l, children: [
|
|
11910
11921
|
/* @__PURE__ */ v(Jt.Trigger, { children: /* @__PURE__ */ v(
|
|
@@ -11912,9 +11923,9 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11912
11923
|
{
|
|
11913
11924
|
...o,
|
|
11914
11925
|
startAdornment: /* @__PURE__ */ v(xo, { size: "sm" }),
|
|
11915
|
-
id:
|
|
11926
|
+
id: D,
|
|
11916
11927
|
value: x,
|
|
11917
|
-
onChange: (
|
|
11928
|
+
onChange: (C) => M(C),
|
|
11918
11929
|
"data-testid": o["data-testid"]
|
|
11919
11930
|
}
|
|
11920
11931
|
) }),
|
|
@@ -11932,7 +11943,7 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11932
11943
|
...e,
|
|
11933
11944
|
mode: "single",
|
|
11934
11945
|
selected: x,
|
|
11935
|
-
onSelect: (
|
|
11946
|
+
onSelect: (C) => M(C)
|
|
11936
11947
|
}
|
|
11937
11948
|
)
|
|
11938
11949
|
}
|
|
@@ -11944,9 +11955,9 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11944
11955
|
...$(o),
|
|
11945
11956
|
ref: h.setReference,
|
|
11946
11957
|
startAdornment: /* @__PURE__ */ v(xo, { size: "sm" }),
|
|
11947
|
-
id:
|
|
11958
|
+
id: D,
|
|
11948
11959
|
value: x,
|
|
11949
|
-
onChange: (
|
|
11960
|
+
onChange: (C) => M(C),
|
|
11950
11961
|
"data-testid": o["data-testid"]
|
|
11951
11962
|
}
|
|
11952
11963
|
),
|
|
@@ -11965,7 +11976,7 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
|
|
|
11965
11976
|
...e,
|
|
11966
11977
|
mode: "single",
|
|
11967
11978
|
selected: x,
|
|
11968
|
-
onSelect: (
|
|
11979
|
+
onSelect: (C) => M(C),
|
|
11969
11980
|
firstElementRef: m
|
|
11970
11981
|
}
|
|
11971
11982
|
)
|