@g4rcez/components 3.0.2 → 4.0.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/CaretDown.es-Cj7klWI3.js +33 -0
- package/dist/CaretDown.es-Cj7klWI3.js.map +1 -0
- package/dist/CaretRight.es-0-M8D9y8.js +33 -0
- package/dist/CaretRight.es-0-M8D9y8.js.map +1 -0
- package/dist/CheckCircle.es-C6QWLfk_.js +33 -0
- package/dist/CheckCircle.es-C6QWLfk_.js.map +1 -0
- package/dist/File.es-CA-vuPED.js +33 -0
- package/dist/File.es-CA-vuPED.js.map +1 -0
- package/dist/IconBase.es-DJ1oCtpo.js +50 -0
- package/dist/IconBase.es-DJ1oCtpo.js.map +1 -0
- package/dist/Info.es-CrZKs4q4.js +33 -0
- package/dist/Info.es-CrZKs4q4.js.map +1 -0
- package/dist/MotionConfigContext-C7MqlSdv.js.map +1 -1
- package/dist/Warning.es-D_eI6tLe.js +39 -0
- package/dist/Warning.es-D_eI6tLe.js.map +1 -0
- package/dist/X.es-BJ1O93El.js +39 -0
- package/dist/X.es-BJ1O93El.js.map +1 -0
- package/dist/ai/docs/Alert.md +1 -1
- package/dist/ai/docs/AnimatedList.md +3 -3
- package/dist/ai/docs/Button.md +1 -1
- package/dist/ai/docs/CommandPalette.md +7 -7
- package/dist/ai/docs/Dropdown.md +4 -4
- package/dist/ai/docs/Empty.md +9 -9
- package/dist/ai/docs/Expand.md +1 -1
- package/dist/ai/docs/FileUpload.md +2 -2
- package/dist/ai/docs/Input.md +2 -2
- package/dist/ai/docs/InputField.md +2 -2
- package/dist/ai/docs/List.md +3 -3
- package/dist/ai/docs/Menu.md +3 -3
- package/dist/ai/docs/MultiSelect.md +1 -1
- package/dist/ai/docs/PageCalendar.md +1 -1
- package/dist/ai/docs/Select.md +1 -1
- package/dist/ai/docs/Slot.md +1 -1
- package/dist/ai/docs/Stats.md +11 -11
- package/dist/ai/docs/Table.md +1 -1
- package/dist/ai/docs/Tag.md +2 -2
- package/dist/ai/docs/Timeline.md +5 -5
- package/dist/ai/docs/Toolbar.md +2 -2
- package/dist/ai/docs/Tooltip.md +3 -3
- package/dist/ai/docs/TransferList.md +2 -2
- package/dist/{autocomplete-Boida9R7.js → autocomplete-Cn9Z2hLq.js} +48 -48
- package/dist/autocomplete-Cn9Z2hLq.js.map +1 -0
- package/dist/{calendar-BswV66Nx.js → calendar-B5lSd0ID.js} +599 -571
- package/dist/calendar-B5lSd0ID.js.map +1 -0
- package/dist/components/display/alert.js +18 -18
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/calendar.js +4 -4
- package/dist/components/display/card.d.ts +2 -2
- package/dist/components/display/card.d.ts.map +1 -1
- package/dist/components/display/card.js +6 -6
- package/dist/components/display/card.js.map +1 -1
- package/dist/components/display/empty.d.ts +2 -2
- package/dist/components/display/empty.d.ts.map +1 -1
- package/dist/components/display/list.js +15 -15
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/notifications.js +5 -5
- package/dist/components/display/tabs.js +1 -1
- package/dist/components/floating/command-palette.d.ts +3 -3
- package/dist/components/floating/command-palette.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +1 -1
- package/dist/components/floating/expand.js +1 -1
- package/dist/components/floating/menu.d.ts +2 -2
- package/dist/components/floating/menu.d.ts.map +1 -1
- package/dist/components/floating/menu.js +31 -31
- package/dist/components/floating/menu.js.map +1 -1
- package/dist/components/floating/modal.js +35 -35
- package/dist/components/floating/modal.js.map +1 -1
- package/dist/components/floating/tooltip.js +1 -1
- package/dist/components/form/autocomplete.js +5 -5
- package/dist/components/form/date-picker.js +3 -3
- package/dist/components/form/file-upload.d.ts.map +1 -1
- package/dist/components/form/file-upload.js +3 -3
- package/dist/components/form/input-field.d.ts.map +1 -1
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/select.js +29 -29
- package/dist/components/form/select.js.map +1 -1
- package/dist/components/form/task-list.js.map +1 -1
- package/dist/components/form/transfer-list.js +15 -15
- package/dist/components/form/transfer-list.js.map +1 -1
- package/dist/components/page-calendar/calendar-header.d.ts.map +1 -1
- package/dist/components/table/table.js +3 -3
- package/dist/config/context.d.ts +2 -0
- package/dist/config/context.d.ts.map +1 -1
- package/dist/context-BFXNJVn2.js.map +1 -1
- package/dist/{date-picker-BxPTdZPy.js → date-picker-DwNo22lx.js} +316 -288
- package/dist/date-picker-DwNo22lx.js.map +1 -0
- package/dist/{file-upload-BB6BdGcE.js → file-upload-Brf2NkLr.js} +1103 -976
- package/dist/file-upload-Brf2NkLr.js.map +1 -0
- package/dist/{floating-ui.react-DycKASR0.js → floating-ui.react-QNHG9W4N.js} +205 -205
- package/dist/{floating-ui.react-DycKASR0.js.map → floating-ui.react-QNHG9W4N.js.map} +1 -1
- package/dist/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/index-0YMC-_Lt.js.map +1 -1
- package/dist/index-BelDtX5M.js +1821 -0
- package/dist/index-BelDtX5M.js.map +1 -0
- package/dist/{index-BtlhELJ3.js → index-C-PuFUZi.js} +136 -136
- package/dist/index-C-PuFUZi.js.map +1 -0
- package/dist/index-Z-fZHxfJ.js +335 -0
- package/dist/index-Z-fZHxfJ.js.map +1 -0
- package/dist/index-t1qLJTt5.js.map +1 -1
- package/dist/index.js +2404 -2328
- package/dist/index.js.map +1 -1
- package/dist/{input-CoJoHIhd.js → input-CrGrSnUt.js} +2 -2
- package/dist/{input-CoJoHIhd.js.map → input-CrGrSnUt.js.map} +1 -1
- package/dist/input-field-5vYcz5tT.js +166 -0
- package/dist/input-field-5vYcz5tT.js.map +1 -0
- package/dist/notifications-cUdVPs-B.js +2786 -0
- package/dist/notifications-cUdVPs-B.js.map +1 -0
- package/dist/proxy-BZcQiBrp.js.map +1 -1
- package/dist/{slot-CQW8ZzBb.js → slot-CRyweuj0.js} +5 -5
- package/dist/{slot-CQW8ZzBb.js.map → slot-CRyweuj0.js.map} +1 -1
- package/dist/{tabs-ccIA7vMo.js → tabs-S00a8qq8.js} +5 -5
- package/dist/{tabs-ccIA7vMo.js.map → tabs-S00a8qq8.js.map} +1 -1
- package/dist/use-motion-value-eGwNuWuw.js.map +1 -1
- package/package.json +2 -2
- package/dist/autocomplete-Boida9R7.js.map +0 -1
- package/dist/calendar-BswV66Nx.js.map +0 -1
- package/dist/chevron-down-BBFYYzZq.js +0 -6
- package/dist/chevron-down-BBFYYzZq.js.map +0 -1
- package/dist/chevron-right-DvXGOiS_.js +0 -6
- package/dist/chevron-right-DvXGOiS_.js.map +0 -1
- package/dist/circle-check-big-3M5lhTxx.js +0 -9
- package/dist/circle-check-big-3M5lhTxx.js.map +0 -1
- package/dist/createLucideIcon-CP-mMPfa.js +0 -76
- package/dist/createLucideIcon-CP-mMPfa.js.map +0 -1
- package/dist/date-picker-BxPTdZPy.js.map +0 -1
- package/dist/file-CBCP85VI.js +0 -15
- package/dist/file-CBCP85VI.js.map +0 -1
- package/dist/file-upload-BB6BdGcE.js.map +0 -1
- package/dist/index-BJ1ayTam.js +0 -126
- package/dist/index-BJ1ayTam.js.map +0 -1
- package/dist/index-BtlhELJ3.js.map +0 -1
- package/dist/index-ChfR6F8d.js +0 -1590
- package/dist/index-ChfR6F8d.js.map +0 -1
- package/dist/index-DE4shK8D.js +0 -215
- package/dist/index-DE4shK8D.js.map +0 -1
- package/dist/info-N5jWZg2A.js +0 -10
- package/dist/info-N5jWZg2A.js.map +0 -1
- package/dist/input-field-DTeIrwpK.js +0 -146
- package/dist/input-field-DTeIrwpK.js.map +0 -1
- package/dist/notifications-NPuFDsBp.js +0 -2550
- package/dist/notifications-NPuFDsBp.js.map +0 -1
- package/dist/triangle-alert-CHMhQ6yd.js +0 -16
- package/dist/triangle-alert-CHMhQ6yd.js.map +0 -1
- package/dist/x-B9bYxG31.js +0 -9
- package/dist/x-B9bYxG31.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { useLayoutEffect as Xn } from "react";
|
|
|
3
3
|
import { a as qn, b as ce, t as It, d as Ue, i as Z, e as Le, g as Se, f as fn, h as Ce, j as Xt, k as Xe, l as We, m as Or, n as Gn, o as Ir, p as rt, q as qt, r as Pt, s as Gt, c as Pr, u as Zn, v as Mr } from "./index.esm-BaIwleSE.js";
|
|
4
4
|
import { jsxs as Zt, jsx as be, Fragment as Ar } from "react/jsx-runtime";
|
|
5
5
|
import * as Jt from "react-dom";
|
|
6
|
-
const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Fe = Math.min,
|
|
6
|
+
const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Fe = Math.min, xe = Math.max, wt = Math.round, je = Math.floor, Pe = (e) => ({
|
|
7
7
|
x: e,
|
|
8
8
|
y: e
|
|
9
9
|
}), Lr = {
|
|
@@ -16,7 +16,7 @@ const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @_
|
|
|
16
16
|
end: "start"
|
|
17
17
|
};
|
|
18
18
|
function Ut(e, t, n) {
|
|
19
|
-
return
|
|
19
|
+
return xe(e, Fe(t, n));
|
|
20
20
|
}
|
|
21
21
|
function Ke(e, t) {
|
|
22
22
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -44,13 +44,13 @@ function Qn(e, t, n) {
|
|
|
44
44
|
n === void 0 && (n = !1);
|
|
45
45
|
const r = Ee(e), o = en(e), i = Qt(o);
|
|
46
46
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
47
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
47
|
+
return t.reference[i] > t.floating[i] && (s = Rt(s)), [s, Rt(s)];
|
|
48
48
|
}
|
|
49
49
|
function Fr(e) {
|
|
50
|
-
const t =
|
|
51
|
-
return [
|
|
50
|
+
const t = Rt(e);
|
|
51
|
+
return [xt(e), t, xt(t)];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function xt(e) {
|
|
54
54
|
return e.replace(/start|end/g, (t) => kr[t]);
|
|
55
55
|
}
|
|
56
56
|
const gn = ["left", "right"], pn = ["right", "left"], Nr = ["top", "bottom"], _r = ["bottom", "top"];
|
|
@@ -69,9 +69,9 @@ function Wr(e, t, n) {
|
|
|
69
69
|
function $r(e, t, n, r) {
|
|
70
70
|
const o = Ee(e);
|
|
71
71
|
let i = Wr(Me(e), n === "start", r);
|
|
72
|
-
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(
|
|
72
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(xt)))), i;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Rt(e) {
|
|
75
75
|
return e.replace(/left|right|bottom|top/g, (t) => Lr[t]);
|
|
76
76
|
}
|
|
77
77
|
function Br(e) {
|
|
@@ -505,7 +505,7 @@ async function so(e, t) {
|
|
|
505
505
|
elementContext: p = "floating",
|
|
506
506
|
altBoundary: d = !1,
|
|
507
507
|
padding: a = 0
|
|
508
|
-
} = Ke(t, e), v = er(a), w = c[d ? p === "floating" ? "reference" : "floating" : p],
|
|
508
|
+
} = Ke(t, e), v = er(a), w = c[d ? p === "floating" ? "reference" : "floating" : p], R = Et(await i.getClippingRect({
|
|
509
509
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
510
510
|
boundary: u,
|
|
511
511
|
rootBoundary: l,
|
|
@@ -515,7 +515,7 @@ async function so(e, t) {
|
|
|
515
515
|
y: o,
|
|
516
516
|
width: s.floating.width,
|
|
517
517
|
height: s.floating.height
|
|
518
|
-
} : s.reference,
|
|
518
|
+
} : s.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), E = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
|
|
519
519
|
x: 1,
|
|
520
520
|
y: 1
|
|
521
521
|
} : {
|
|
@@ -524,14 +524,14 @@ async function so(e, t) {
|
|
|
524
524
|
}, A = Et(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
525
525
|
elements: c,
|
|
526
526
|
rect: y,
|
|
527
|
-
offsetParent:
|
|
527
|
+
offsetParent: x,
|
|
528
528
|
strategy: f
|
|
529
529
|
}) : y);
|
|
530
530
|
return {
|
|
531
|
-
top: (
|
|
532
|
-
bottom: (A.bottom -
|
|
533
|
-
left: (
|
|
534
|
-
right: (A.right -
|
|
531
|
+
top: (R.top - A.top + v.top) / E.y,
|
|
532
|
+
bottom: (A.bottom - R.bottom + v.bottom) / E.y,
|
|
533
|
+
left: (R.left - A.left + v.left) / E.x,
|
|
534
|
+
right: (A.right - R.right + v.right) / E.x
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
const io = async (e, t, n) => {
|
|
@@ -552,10 +552,10 @@ const io = async (e, t, n) => {
|
|
|
552
552
|
for (let w = 0; w < c.length; w++) {
|
|
553
553
|
var m;
|
|
554
554
|
const {
|
|
555
|
-
name:
|
|
555
|
+
name: R,
|
|
556
556
|
fn: y
|
|
557
557
|
} = c[w], {
|
|
558
|
-
x
|
|
558
|
+
x,
|
|
559
559
|
y: E,
|
|
560
560
|
data: A,
|
|
561
561
|
reset: O
|
|
@@ -576,10 +576,10 @@ const io = async (e, t, n) => {
|
|
|
576
576
|
floating: t
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
|
-
l =
|
|
579
|
+
l = x ?? l, p = E ?? p, a = {
|
|
580
580
|
...a,
|
|
581
|
-
[
|
|
582
|
-
...a[
|
|
581
|
+
[R]: {
|
|
582
|
+
...a[R],
|
|
583
583
|
...A
|
|
584
584
|
}
|
|
585
585
|
}, O && v <= 50 && (v++, typeof O == "object" && (O.placement && (d = O.placement), O.rects && (u = O.rects === !0 ? await s.getElementRects({
|
|
@@ -619,10 +619,10 @@ const io = async (e, t, n) => {
|
|
|
619
619
|
const p = er(l), d = {
|
|
620
620
|
x: n,
|
|
621
621
|
y: r
|
|
622
|
-
}, a = en(o), v = Qt(a), m = await s.getDimensions(u), w = a === "y",
|
|
623
|
-
let M = O ? O[
|
|
624
|
-
(!M || !await (s.isElement == null ? void 0 : s.isElement(O))) && (M = c.floating[
|
|
625
|
-
const S = E / 2 - A / 2, $ = M / 2 - m[v] / 2 - 1, I = Fe(p[
|
|
622
|
+
}, a = en(o), v = Qt(a), m = await s.getDimensions(u), w = a === "y", R = w ? "top" : "left", y = w ? "bottom" : "right", x = w ? "clientHeight" : "clientWidth", E = i.reference[v] + i.reference[a] - d[a] - i.floating[v], A = d[a] - i.reference[a], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
623
|
+
let M = O ? O[x] : 0;
|
|
624
|
+
(!M || !await (s.isElement == null ? void 0 : s.isElement(O))) && (M = c.floating[x] || i.floating[v]);
|
|
625
|
+
const S = E / 2 - A / 2, $ = M / 2 - m[v] / 2 - 1, I = Fe(p[R], $), B = Fe(p[y], $), W = I, L = M - m[v] - B, h = M / 2 - m[v] / 2 + S, C = Ut(W, h, L), D = !f.arrow && Ee(o) != null && h !== C && i.reference[v] / 2 - (h < W ? I : B) - m[v] / 2 < 0, T = D ? h < W ? h - W : h - L : 0;
|
|
626
626
|
return {
|
|
627
627
|
[a]: d[a] + T,
|
|
628
628
|
data: {
|
|
@@ -637,7 +637,7 @@ const io = async (e, t, n) => {
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
function uo(e, t, n) {
|
|
640
|
-
return (e ? [...n.filter((o) => Ee(o) === e), ...n.filter((o) => Ee(o) !== e)] : n.filter((o) => Me(o) === o)).filter((o) => e ? Ee(o) === e || (t ?
|
|
640
|
+
return (e ? [...n.filter((o) => Ee(o) === e), ...n.filter((o) => Ee(o) !== e)] : n.filter((o) => Me(o) === o)).filter((o) => e ? Ee(o) === e || (t ? xt(o) !== o : !1) : !0);
|
|
641
641
|
}
|
|
642
642
|
const lo = function(e) {
|
|
643
643
|
return e === void 0 && (e = {}), {
|
|
@@ -657,24 +657,24 @@ const lo = function(e) {
|
|
|
657
657
|
allowedPlacements: d = mn,
|
|
658
658
|
autoAlignment: a = !0,
|
|
659
659
|
...v
|
|
660
|
-
} = Ke(e, t), m = p !== void 0 || d === mn ? uo(p || null, a, d) : d, w = await f.detectOverflow(t, v),
|
|
660
|
+
} = Ke(e, t), m = p !== void 0 || d === mn ? uo(p || null, a, d) : d, w = await f.detectOverflow(t, v), R = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, y = m[R];
|
|
661
661
|
if (y == null)
|
|
662
662
|
return {};
|
|
663
|
-
const
|
|
663
|
+
const x = Qn(y, i, await (f.isRTL == null ? void 0 : f.isRTL(u.floating)));
|
|
664
664
|
if (c !== y)
|
|
665
665
|
return {
|
|
666
666
|
reset: {
|
|
667
667
|
placement: m[0]
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
const E = [w[Me(y)], w[
|
|
670
|
+
const E = [w[Me(y)], w[x[0]], w[x[1]]], A = [...((r = s.autoPlacement) == null ? void 0 : r.overflows) || [], {
|
|
671
671
|
placement: y,
|
|
672
672
|
overflows: E
|
|
673
|
-
}], O = m[
|
|
673
|
+
}], O = m[R + 1];
|
|
674
674
|
if (O)
|
|
675
675
|
return {
|
|
676
676
|
data: {
|
|
677
|
-
index:
|
|
677
|
+
index: R + 1,
|
|
678
678
|
overflows: A
|
|
679
679
|
},
|
|
680
680
|
reset: {
|
|
@@ -698,7 +698,7 @@ const lo = function(e) {
|
|
|
698
698
|
).every((B) => B <= 0))[0]) == null ? void 0 : o[0]) || M[0][0];
|
|
699
699
|
return $ !== c ? {
|
|
700
700
|
data: {
|
|
701
|
-
index:
|
|
701
|
+
index: R + 1,
|
|
702
702
|
overflows: A
|
|
703
703
|
},
|
|
704
704
|
reset: {
|
|
@@ -731,11 +731,11 @@ const lo = function(e) {
|
|
|
731
731
|
} = Ke(e, t);
|
|
732
732
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
733
733
|
return {};
|
|
734
|
-
const
|
|
734
|
+
const R = Me(o), y = Ae(c), x = Me(c) === c, E = await (f.isRTL == null ? void 0 : f.isRTL(u.floating)), A = d || (x || !m ? [Rt(c)] : Fr(c)), O = v !== "none";
|
|
735
735
|
!d && O && A.push(...$r(c, m, v, E));
|
|
736
736
|
const M = [c, ...A], S = await f.detectOverflow(t, w), $ = [];
|
|
737
737
|
let I = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
738
|
-
if (l && $.push(S[
|
|
738
|
+
if (l && $.push(S[R]), p) {
|
|
739
739
|
const h = Qn(o, s, E);
|
|
740
740
|
$.push(S[h[0]], S[h[1]]);
|
|
741
741
|
}
|
|
@@ -852,14 +852,14 @@ const go = function(e) {
|
|
|
852
852
|
mainAxis: s = !0,
|
|
853
853
|
crossAxis: c = !1,
|
|
854
854
|
limiter: f = {
|
|
855
|
-
fn: (
|
|
855
|
+
fn: (R) => {
|
|
856
856
|
let {
|
|
857
857
|
x: y,
|
|
858
|
-
y:
|
|
859
|
-
} =
|
|
858
|
+
y: x
|
|
859
|
+
} = R;
|
|
860
860
|
return {
|
|
861
861
|
x: y,
|
|
862
|
-
y:
|
|
862
|
+
y: x
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
865
|
},
|
|
@@ -870,12 +870,12 @@ const go = function(e) {
|
|
|
870
870
|
}, p = await i.detectOverflow(t, u), d = Ae(Me(o)), a = Jn(d);
|
|
871
871
|
let v = l[a], m = l[d];
|
|
872
872
|
if (s) {
|
|
873
|
-
const
|
|
874
|
-
v = Ut(
|
|
873
|
+
const R = a === "y" ? "top" : "left", y = a === "y" ? "bottom" : "right", x = v + p[R], E = v - p[y];
|
|
874
|
+
v = Ut(x, v, E);
|
|
875
875
|
}
|
|
876
876
|
if (c) {
|
|
877
|
-
const
|
|
878
|
-
m = Ut(
|
|
877
|
+
const R = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", x = m + p[R], E = m - p[y];
|
|
878
|
+
m = Ut(x, m, E);
|
|
879
879
|
}
|
|
880
880
|
const w = f.fn({
|
|
881
881
|
...t,
|
|
@@ -914,13 +914,13 @@ const go = function(e) {
|
|
|
914
914
|
width: v,
|
|
915
915
|
height: m
|
|
916
916
|
} = i.floating;
|
|
917
|
-
let w,
|
|
918
|
-
p === "top" || p === "bottom" ? (w = p,
|
|
919
|
-
const y = m - l.top - l.bottom,
|
|
917
|
+
let w, R;
|
|
918
|
+
p === "top" || p === "bottom" ? (w = p, R = d === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (R = p, w = d === "end" ? "top" : "bottom");
|
|
919
|
+
const y = m - l.top - l.bottom, x = v - l.left - l.right, E = Fe(m - l[w], y), A = Fe(v - l[R], x), O = !t.middlewareData.shift;
|
|
920
920
|
let M = E, S = A;
|
|
921
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (S =
|
|
922
|
-
const I =
|
|
923
|
-
a ? S = v - 2 * (I !== 0 || B !== 0 ? I + B :
|
|
921
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (S = x), (r = t.middlewareData.shift) != null && r.enabled.y && (M = y), O && !d) {
|
|
922
|
+
const I = xe(l.left, 0), B = xe(l.right, 0), W = xe(l.top, 0), L = xe(l.bottom, 0);
|
|
923
|
+
a ? S = v - 2 * (I !== 0 || B !== 0 ? I + B : xe(l.left, l.right)) : M = m - 2 * (W !== 0 || L !== 0 ? W + L : xe(l.top, l.bottom));
|
|
924
924
|
}
|
|
925
925
|
await f({
|
|
926
926
|
...t,
|
|
@@ -986,8 +986,8 @@ function Be(e, t, n, r) {
|
|
|
986
986
|
const d = Se(i), a = r && Z(r) ? Se(r) : r;
|
|
987
987
|
let v = d, m = fn(v);
|
|
988
988
|
for (; m && r && a !== v; ) {
|
|
989
|
-
const w = Ye(m),
|
|
990
|
-
f *= w.x, u *= w.y, l *= w.x, p *= w.y, f +=
|
|
989
|
+
const w = Ye(m), R = m.getBoundingClientRect(), y = Ce(m), x = R.left + (m.clientLeft + parseFloat(y.paddingLeft)) * w.x, E = R.top + (m.clientTop + parseFloat(y.paddingTop)) * w.y;
|
|
990
|
+
f *= w.x, u *= w.y, l *= w.x, p *= w.y, f += x, u += E, v = Se(m), m = fn(v);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
return Et({
|
|
@@ -1038,19 +1038,19 @@ function yo(e) {
|
|
|
1038
1038
|
function wo(e) {
|
|
1039
1039
|
return Array.from(e.getClientRects());
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
const t = Le(e), n = Pt(e), r = e.ownerDocument.body, o =
|
|
1041
|
+
function xo(e) {
|
|
1042
|
+
const t = Le(e), n = Pt(e), r = e.ownerDocument.body, o = xe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = xe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1043
1043
|
let s = -n.scrollLeft + Mt(e);
|
|
1044
1044
|
const c = -n.scrollTop;
|
|
1045
|
-
return Ce(r).direction === "rtl" && (s +=
|
|
1045
|
+
return Ce(r).direction === "rtl" && (s += xe(t.clientWidth, r.clientWidth) - o), {
|
|
1046
1046
|
width: o,
|
|
1047
1047
|
height: i,
|
|
1048
1048
|
x: s,
|
|
1049
1049
|
y: c
|
|
1050
1050
|
};
|
|
1051
1051
|
}
|
|
1052
|
-
const
|
|
1053
|
-
function
|
|
1052
|
+
const xn = 25;
|
|
1053
|
+
function Ro(e, t) {
|
|
1054
1054
|
const n = Se(e), r = Le(e), o = n.visualViewport;
|
|
1055
1055
|
let i = r.clientWidth, s = r.clientHeight, c = 0, f = 0;
|
|
1056
1056
|
if (o) {
|
|
@@ -1061,8 +1061,8 @@ function xo(e, t) {
|
|
|
1061
1061
|
const u = Mt(r);
|
|
1062
1062
|
if (u <= 0) {
|
|
1063
1063
|
const l = r.ownerDocument, p = l.body, d = getComputedStyle(p), a = l.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, v = Math.abs(r.clientWidth - p.clientWidth - a);
|
|
1064
|
-
v <=
|
|
1065
|
-
} else u <=
|
|
1064
|
+
v <= xn && (i -= v);
|
|
1065
|
+
} else u <= xn && (i += u);
|
|
1066
1066
|
return {
|
|
1067
1067
|
width: i,
|
|
1068
1068
|
height: s,
|
|
@@ -1080,12 +1080,12 @@ function Co(e, t) {
|
|
|
1080
1080
|
y: u
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function Rn(e, t, n) {
|
|
1084
1084
|
let r;
|
|
1085
1085
|
if (t === "viewport")
|
|
1086
|
-
r =
|
|
1086
|
+
r = Ro(e, n);
|
|
1087
1087
|
else if (t === "document")
|
|
1088
|
-
r =
|
|
1088
|
+
r = xo(Le(e));
|
|
1089
1089
|
else if (Z(t))
|
|
1090
1090
|
r = Co(t, n);
|
|
1091
1091
|
else {
|
|
@@ -1124,9 +1124,9 @@ function Oo(e) {
|
|
|
1124
1124
|
strategy: o
|
|
1125
1125
|
} = e;
|
|
1126
1126
|
const s = [...n === "clippingAncestors" ? Xt(t) ? [] : To(t, this._c) : [].concat(n), r], c = s[0], f = s.reduce((u, l) => {
|
|
1127
|
-
const p =
|
|
1128
|
-
return u.top =
|
|
1129
|
-
},
|
|
1127
|
+
const p = Rn(t, l, o);
|
|
1128
|
+
return u.top = xe(p.top, u.top), u.right = Fe(p.right, u.right), u.bottom = Fe(p.bottom, u.bottom), u.left = xe(p.left, u.left), u;
|
|
1129
|
+
}, Rn(t, c, o));
|
|
1130
1130
|
return {
|
|
1131
1131
|
width: f.right - f.left,
|
|
1132
1132
|
height: f.bottom - f.top,
|
|
@@ -1244,9 +1244,9 @@ function Lo(e, t) {
|
|
|
1244
1244
|
} = u;
|
|
1245
1245
|
if (c || t(), !d || !a)
|
|
1246
1246
|
return;
|
|
1247
|
-
const v = je(p), m = je(o.clientWidth - (l + d)), w = je(o.clientHeight - (p + a)),
|
|
1248
|
-
rootMargin: -v + "px " + -m + "px " + -w + "px " + -
|
|
1249
|
-
threshold:
|
|
1247
|
+
const v = je(p), m = je(o.clientWidth - (l + d)), w = je(o.clientHeight - (p + a)), R = je(l), x = {
|
|
1248
|
+
rootMargin: -v + "px " + -m + "px " + -w + "px " + -R + "px",
|
|
1249
|
+
threshold: xe(0, Fe(1, f)) || 1
|
|
1250
1250
|
};
|
|
1251
1251
|
let E = !0;
|
|
1252
1252
|
function A(O) {
|
|
@@ -1262,18 +1262,18 @@ function Lo(e, t) {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
try {
|
|
1264
1264
|
n = new IntersectionObserver(A, {
|
|
1265
|
-
...
|
|
1265
|
+
...x,
|
|
1266
1266
|
// Handle <iframe>s
|
|
1267
1267
|
root: o.ownerDocument
|
|
1268
1268
|
});
|
|
1269
1269
|
} catch {
|
|
1270
|
-
n = new IntersectionObserver(A,
|
|
1270
|
+
n = new IntersectionObserver(A, x);
|
|
1271
1271
|
}
|
|
1272
1272
|
n.observe(e);
|
|
1273
1273
|
}
|
|
1274
1274
|
return s(!0), i;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function xs(e, t, n, r) {
|
|
1277
1277
|
r === void 0 && (r = {});
|
|
1278
1278
|
const {
|
|
1279
1279
|
ancestorScroll: o = !0,
|
|
@@ -1282,31 +1282,31 @@ function Rs(e, t, n, r) {
|
|
|
1282
1282
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1283
1283
|
animationFrame: f = !1
|
|
1284
1284
|
} = r, u = rn(e), l = o || i ? [...u ? Ue(u) : [], ...Ue(t)] : [];
|
|
1285
|
-
l.forEach((
|
|
1286
|
-
o &&
|
|
1285
|
+
l.forEach((R) => {
|
|
1286
|
+
o && R.addEventListener("scroll", n, {
|
|
1287
1287
|
passive: !0
|
|
1288
|
-
}), i &&
|
|
1288
|
+
}), i && R.addEventListener("resize", n);
|
|
1289
1289
|
});
|
|
1290
1290
|
const p = u && c ? Lo(u, n) : null;
|
|
1291
1291
|
let d = -1, a = null;
|
|
1292
|
-
s && (a = new ResizeObserver((
|
|
1293
|
-
let [y] =
|
|
1292
|
+
s && (a = new ResizeObserver((R) => {
|
|
1293
|
+
let [y] = R;
|
|
1294
1294
|
y && y.target === u && a && (a.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1295
|
-
var
|
|
1296
|
-
(
|
|
1295
|
+
var x;
|
|
1296
|
+
(x = a) == null || x.observe(t);
|
|
1297
1297
|
})), n();
|
|
1298
1298
|
}), u && !f && a.observe(u), a.observe(t));
|
|
1299
1299
|
let v, m = f ? Be(e) : null;
|
|
1300
1300
|
f && w();
|
|
1301
1301
|
function w() {
|
|
1302
|
-
const
|
|
1303
|
-
m && !gr(m,
|
|
1302
|
+
const R = Be(e);
|
|
1303
|
+
m && !gr(m, R) && n(), m = R, v = requestAnimationFrame(w);
|
|
1304
1304
|
}
|
|
1305
1305
|
return n(), () => {
|
|
1306
|
-
var
|
|
1306
|
+
var R;
|
|
1307
1307
|
l.forEach((y) => {
|
|
1308
1308
|
o && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
|
|
1309
|
-
}), p?.(), (
|
|
1309
|
+
}), p?.(), (R = a) == null || R.disconnect(), a = null, f && cancelAnimationFrame(v);
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
1312
|
const ko = go, Do = lo, Fo = po, No = ao, _o = ho, Cn = co, Wo = (e, t, n) => {
|
|
@@ -1390,10 +1390,10 @@ function Vo(e) {
|
|
|
1390
1390
|
isPositioned: !1
|
|
1391
1391
|
}), [d, a] = g.useState(r);
|
|
1392
1392
|
Tt(d, r) || a(r);
|
|
1393
|
-
const [v, m] = g.useState(null), [w,
|
|
1393
|
+
const [v, m] = g.useState(null), [w, R] = g.useState(null), y = g.useCallback((b) => {
|
|
1394
1394
|
b !== O.current && (O.current = b, m(b));
|
|
1395
|
-
}, []),
|
|
1396
|
-
b !== M.current && (M.current = b,
|
|
1395
|
+
}, []), x = g.useCallback((b) => {
|
|
1396
|
+
b !== M.current && (M.current = b, R(b));
|
|
1397
1397
|
}, []), E = i || v, A = s || w, O = g.useRef(null), M = g.useRef(null), S = g.useRef(l), $ = f != null, I = _t(f), B = _t(o), W = _t(u), L = g.useCallback(() => {
|
|
1398
1398
|
if (!O.current || !M.current)
|
|
1399
1399
|
return;
|
|
@@ -1436,8 +1436,8 @@ function Vo(e) {
|
|
|
1436
1436
|
reference: O,
|
|
1437
1437
|
floating: M,
|
|
1438
1438
|
setReference: y,
|
|
1439
|
-
setFloating:
|
|
1440
|
-
}), [y,
|
|
1439
|
+
setFloating: x
|
|
1440
|
+
}), [y, x]), D = g.useMemo(() => ({
|
|
1441
1441
|
reference: E,
|
|
1442
1442
|
floating: A
|
|
1443
1443
|
}), [E, A]), T = g.useMemo(() => {
|
|
@@ -1490,7 +1490,7 @@ const Ko = (e) => {
|
|
|
1490
1490
|
}).fn(n) : {};
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
|
-
},
|
|
1493
|
+
}, Rs = (e, t) => ({
|
|
1494
1494
|
...ko(e),
|
|
1495
1495
|
options: [e, t]
|
|
1496
1496
|
}), Es = (e, t) => ({
|
|
@@ -1647,10 +1647,10 @@ const As = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
1647
1647
|
...w
|
|
1648
1648
|
} = t;
|
|
1649
1649
|
process.env.NODE_ENV !== "production" && (n || yt("The `ref` prop is required for `FloatingArrow`."));
|
|
1650
|
-
const
|
|
1650
|
+
const R = ct(), [y, x] = g.useState(!1);
|
|
1651
1651
|
if (X(() => {
|
|
1652
1652
|
if (!o) return;
|
|
1653
|
-
Ce(o).direction === "rtl" &&
|
|
1653
|
+
Ce(o).direction === "rtl" && x(!0);
|
|
1654
1654
|
}, [o]), !o)
|
|
1655
1655
|
return null;
|
|
1656
1656
|
const [E, A] = r.split("-"), O = E === "top" || E === "bottom";
|
|
@@ -1682,7 +1682,7 @@ const As = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
1682
1682
|
...m
|
|
1683
1683
|
},
|
|
1684
1684
|
children: [S > 0 && /* @__PURE__ */ be("path", {
|
|
1685
|
-
clipPath: "url(#" +
|
|
1685
|
+
clipPath: "url(#" + R + ")",
|
|
1686
1686
|
fill: "none",
|
|
1687
1687
|
stroke: d,
|
|
1688
1688
|
strokeWidth: S + (a ? 0 : 1),
|
|
@@ -1691,7 +1691,7 @@ const As = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
1691
1691
|
stroke: S && !a ? w.fill : "none",
|
|
1692
1692
|
d: T
|
|
1693
1693
|
}), /* @__PURE__ */ be("clipPath", {
|
|
1694
|
-
id:
|
|
1694
|
+
id: R,
|
|
1695
1695
|
children: /* @__PURE__ */ be("rect", {
|
|
1696
1696
|
x: -$,
|
|
1697
1697
|
y: $ * (W ? -1 : 1),
|
|
@@ -1801,7 +1801,7 @@ function Ds(e, t) {
|
|
|
1801
1801
|
mouseOnly: l = !1,
|
|
1802
1802
|
restMs: p = 0,
|
|
1803
1803
|
move: d = !0
|
|
1804
|
-
} = t, a = Ze(), v = Ge(), m = le(u), w = le(f),
|
|
1804
|
+
} = t, a = Ze(), v = Ge(), m = le(u), w = le(f), R = le(n), y = le(p), x = g.useRef(), E = g.useRef(-1), A = g.useRef(), O = g.useRef(-1), M = g.useRef(!0), S = g.useRef(!1), $ = g.useRef(() => {
|
|
1805
1805
|
}), I = g.useRef(!1), B = re(() => {
|
|
1806
1806
|
var T;
|
|
1807
1807
|
const b = (T = o.current.openEvent) == null ? void 0 : T.type;
|
|
@@ -1830,7 +1830,7 @@ function Ds(e, t) {
|
|
|
1830
1830
|
}, [s.floating, n, r, c, m, B]);
|
|
1831
1831
|
const W = g.useCallback(function(T, b, P) {
|
|
1832
1832
|
b === void 0 && (b = !0), P === void 0 && (P = "hover");
|
|
1833
|
-
const k = Wt(w.current, "close",
|
|
1833
|
+
const k = Wt(w.current, "close", x.current);
|
|
1834
1834
|
k && !A.current ? (me(E), E.current = window.setTimeout(() => r(!1, T, P), k)) : b && (me(E), r(!1, T, P));
|
|
1835
1835
|
}, [w, r]), L = re(() => {
|
|
1836
1836
|
$.current(), A.current = void 0;
|
|
@@ -1843,11 +1843,11 @@ function Ds(e, t) {
|
|
|
1843
1843
|
g.useEffect(() => {
|
|
1844
1844
|
if (!c) return;
|
|
1845
1845
|
function T(K) {
|
|
1846
|
-
if (me(E), M.current = !1, l && !qe(
|
|
1846
|
+
if (me(E), M.current = !1, l && !qe(x.current) || $t(y.current) > 0 && !Wt(w.current, "open"))
|
|
1847
1847
|
return;
|
|
1848
|
-
const N = Wt(w.current, "open",
|
|
1848
|
+
const N = Wt(w.current, "open", x.current);
|
|
1849
1849
|
N ? E.current = window.setTimeout(() => {
|
|
1850
|
-
|
|
1850
|
+
R.current || r(!0, K, "hover");
|
|
1851
1851
|
}, N) : n || r(!0, K, "hover");
|
|
1852
1852
|
}
|
|
1853
1853
|
function b(K) {
|
|
@@ -1873,7 +1873,7 @@ function Ds(e, t) {
|
|
|
1873
1873
|
};
|
|
1874
1874
|
return;
|
|
1875
1875
|
}
|
|
1876
|
-
(
|
|
1876
|
+
(x.current !== "touch" || !ue(s.floating, K.relatedTarget)) && W(K);
|
|
1877
1877
|
}
|
|
1878
1878
|
function P(K) {
|
|
1879
1879
|
C() || o.current.floatingContext && (m.current == null || m.current({
|
|
@@ -1900,7 +1900,7 @@ function Ds(e, t) {
|
|
|
1900
1900
|
n && K.removeEventListener("mouseleave", P), d && K.removeEventListener("mousemove", T), K.removeEventListener("mouseenter", T), K.removeEventListener("mouseleave", b), N && (N.removeEventListener("mouseleave", P), N.removeEventListener("mouseenter", k), N.removeEventListener("mouseleave", G));
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
|
-
}, [s, c, e, l, d, W, L, h, r, n,
|
|
1903
|
+
}, [s, c, e, l, d, W, L, h, r, n, R, a, w, m, o, C, y]), X(() => {
|
|
1904
1904
|
var T;
|
|
1905
1905
|
if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && B()) {
|
|
1906
1906
|
S.current = !0;
|
|
@@ -1916,13 +1916,13 @@ function Ds(e, t) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
}, [c, n, v, s, a, m, B]), X(() => {
|
|
1919
|
-
n || (
|
|
1919
|
+
n || (x.current = void 0, I.current = !1, L(), h());
|
|
1920
1920
|
}, [n, L, h]), g.useEffect(() => () => {
|
|
1921
1921
|
L(), me(E), me(O), h();
|
|
1922
1922
|
}, [c, s.domReference, L, h]);
|
|
1923
1923
|
const D = g.useMemo(() => {
|
|
1924
1924
|
function T(b) {
|
|
1925
|
-
|
|
1925
|
+
x.current = b.pointerType;
|
|
1926
1926
|
}
|
|
1927
1927
|
return {
|
|
1928
1928
|
onPointerDown: T,
|
|
@@ -1932,12 +1932,12 @@ function Ds(e, t) {
|
|
|
1932
1932
|
nativeEvent: P
|
|
1933
1933
|
} = b;
|
|
1934
1934
|
function k() {
|
|
1935
|
-
!M.current && !
|
|
1935
|
+
!M.current && !R.current && r(!0, P, "hover");
|
|
1936
1936
|
}
|
|
1937
|
-
l && !qe(
|
|
1937
|
+
l && !qe(x.current) || n || $t(y.current) === 0 || I.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (me(O), x.current === "touch" ? k() : (I.current = !0, O.current = window.setTimeout(k, $t(y.current))));
|
|
1938
1938
|
}
|
|
1939
1939
|
};
|
|
1940
|
-
}, [l, r, n,
|
|
1940
|
+
}, [l, r, n, R, y]);
|
|
1941
1941
|
return g.useMemo(() => c ? {
|
|
1942
1942
|
reference: D
|
|
1943
1943
|
} : {}, [c, D]);
|
|
@@ -1987,10 +1987,10 @@ function Ln(e) {
|
|
|
1987
1987
|
return e === "inert" ? ze.inert : e === "aria-hidden" ? ze["aria-hidden"] : ze.none;
|
|
1988
1988
|
}
|
|
1989
1989
|
let mt = /* @__PURE__ */ new WeakSet(), gt = {}, Vt = 0;
|
|
1990
|
-
const Jo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype,
|
|
1990
|
+
const Jo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, xr = (e) => e && (e.host || xr(e.parentNode)), Qo = (e, t) => t.map((n) => {
|
|
1991
1991
|
if (e.contains(n))
|
|
1992
1992
|
return n;
|
|
1993
|
-
const r =
|
|
1993
|
+
const r = xr(n);
|
|
1994
1994
|
return e.contains(r) ? r : null;
|
|
1995
1995
|
}).filter((n) => n != null);
|
|
1996
1996
|
function es(e, t, n, r) {
|
|
@@ -2007,15 +2007,15 @@ function es(e, t, n, r) {
|
|
|
2007
2007
|
if (c.has(v))
|
|
2008
2008
|
d(v);
|
|
2009
2009
|
else {
|
|
2010
|
-
const m = i ? v.getAttribute(i) : null, w = m !== null && m !== "false",
|
|
2011
|
-
|
|
2010
|
+
const m = i ? v.getAttribute(i) : null, w = m !== null && m !== "false", R = Ln(i), y = (R.get(v) || 0) + 1, x = (l.get(v) || 0) + 1;
|
|
2011
|
+
R.set(v, y), l.set(v, x), u.push(v), y === 1 && w && mt.add(v), x === 1 && v.setAttribute(o, ""), !w && i && v.setAttribute(i, i === "inert" ? "" : "true");
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
2015
|
return Vt++, () => {
|
|
2016
2016
|
u.forEach((a) => {
|
|
2017
|
-
const v = Ln(i), w = (v.get(a) || 0) - 1,
|
|
2018
|
-
v.set(a, w), l.set(a,
|
|
2017
|
+
const v = Ln(i), w = (v.get(a) || 0) - 1, R = (l.get(a) || 0) - 1;
|
|
2018
|
+
v.set(a, w), l.set(a, R), w || (!mt.has(a) && i && a.removeAttribute(i), mt.delete(a)), R || a.removeAttribute(o);
|
|
2019
2019
|
}), Vt--, Vt || (ze.inert = /* @__PURE__ */ new WeakMap(), ze["aria-hidden"] = /* @__PURE__ */ new WeakMap(), ze.none = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet(), gt = {});
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
@@ -2059,7 +2059,7 @@ const on = {
|
|
|
2059
2059
|
position: "fixed",
|
|
2060
2060
|
top: 0,
|
|
2061
2061
|
left: 0
|
|
2062
|
-
},
|
|
2062
|
+
}, Rr = /* @__PURE__ */ g.createContext(null), Dn = /* @__PURE__ */ Ve("portal");
|
|
2063
2063
|
function ns(e) {
|
|
2064
2064
|
e === void 0 && (e = {});
|
|
2065
2065
|
const {
|
|
@@ -2113,7 +2113,7 @@ function Fs(e) {
|
|
|
2113
2113
|
};
|
|
2114
2114
|
}, [i, o, d]), g.useEffect(() => {
|
|
2115
2115
|
i && (a || yn(i));
|
|
2116
|
-
}, [a, i]), /* @__PURE__ */ Zt(
|
|
2116
|
+
}, [a, i]), /* @__PURE__ */ Zt(Rr.Provider, {
|
|
2117
2117
|
value: g.useMemo(() => ({
|
|
2118
2118
|
preserveTabOrder: o,
|
|
2119
2119
|
beforeOutsideRef: f,
|
|
@@ -2131,7 +2131,7 @@ function Fs(e) {
|
|
|
2131
2131
|
var w;
|
|
2132
2132
|
(w = l.current) == null || w.focus();
|
|
2133
2133
|
} else {
|
|
2134
|
-
const
|
|
2134
|
+
const R = s ? s.domReference : null, y = ur(R);
|
|
2135
2135
|
y?.focus();
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
@@ -2146,14 +2146,14 @@ function Fs(e) {
|
|
|
2146
2146
|
var w;
|
|
2147
2147
|
(w = p.current) == null || w.focus();
|
|
2148
2148
|
} else {
|
|
2149
|
-
const
|
|
2149
|
+
const R = s ? s.domReference : null, y = cr(R);
|
|
2150
2150
|
y?.focus(), s?.closeOnFocusOut && s?.onOpenChange(!1, m.nativeEvent, "focus-out");
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
})]
|
|
2154
2154
|
});
|
|
2155
2155
|
}
|
|
2156
|
-
const Er = () => g.useContext(
|
|
2156
|
+
const Er = () => g.useContext(Rr);
|
|
2157
2157
|
function Fn(e) {
|
|
2158
2158
|
return g.useMemo(() => (t) => {
|
|
2159
2159
|
e.forEach((n) => {
|
|
@@ -2219,15 +2219,15 @@ function Ns(e) {
|
|
|
2219
2219
|
open: v,
|
|
2220
2220
|
onOpenChange: m,
|
|
2221
2221
|
events: w,
|
|
2222
|
-
dataRef:
|
|
2222
|
+
dataRef: R,
|
|
2223
2223
|
elements: {
|
|
2224
2224
|
domReference: y,
|
|
2225
|
-
floating:
|
|
2225
|
+
floating: x
|
|
2226
2226
|
}
|
|
2227
2227
|
} = t, E = re(() => {
|
|
2228
2228
|
var V;
|
|
2229
|
-
return (V =
|
|
2230
|
-
}), A = re(a), O = typeof s == "number" && s < 0, M = zt(y) && O, S = Jo(), $ = S ? i : !0, I = !$ || S && d, B = le(o), W = le(s), L = le(c), h = Ze(), C = Er(), D = g.useRef(null), T = g.useRef(null), b = g.useRef(!1), P = g.useRef(!1), k = g.useRef(-1), G = g.useRef(-1), K = C != null, N = Ct(
|
|
2229
|
+
return (V = R.current.floatingContext) == null ? void 0 : V.nodeId;
|
|
2230
|
+
}), A = re(a), O = typeof s == "number" && s < 0, M = zt(y) && O, S = Jo(), $ = S ? i : !0, I = !$ || S && d, B = le(o), W = le(s), L = le(c), h = Ze(), C = Er(), D = g.useRef(null), T = g.useRef(null), b = g.useRef(!1), P = g.useRef(!1), k = g.useRef(-1), G = g.useRef(-1), K = C != null, N = Ct(x), J = re(function(V) {
|
|
2231
2231
|
return V === void 0 && (V = N), V ? It(V, ot()) : [];
|
|
2232
2232
|
}), U = re((V) => {
|
|
2233
2233
|
const Y = J(V);
|
|
@@ -2247,15 +2247,15 @@ function Ns(e) {
|
|
|
2247
2247
|
Y.removeEventListener("keydown", V);
|
|
2248
2248
|
};
|
|
2249
2249
|
}, [r, y, N, u, B, M, J, U]), g.useEffect(() => {
|
|
2250
|
-
if (r || !
|
|
2250
|
+
if (r || !x) return;
|
|
2251
2251
|
function V(Y) {
|
|
2252
2252
|
const H = Ie(Y), oe = J().indexOf(H);
|
|
2253
2253
|
oe !== -1 && (k.current = oe);
|
|
2254
2254
|
}
|
|
2255
|
-
return
|
|
2256
|
-
|
|
2255
|
+
return x.addEventListener("focusin", V), () => {
|
|
2256
|
+
x.removeEventListener("focusin", V);
|
|
2257
2257
|
};
|
|
2258
|
-
}, [r,
|
|
2258
|
+
}, [r, x, J]), g.useEffect(() => {
|
|
2259
2259
|
if (r || !p) return;
|
|
2260
2260
|
function V() {
|
|
2261
2261
|
P.current = !0, setTimeout(() => {
|
|
@@ -2265,7 +2265,7 @@ function Ns(e) {
|
|
|
2265
2265
|
function Y(oe) {
|
|
2266
2266
|
const z = oe.relatedTarget, ye = oe.currentTarget, de = Ie(oe);
|
|
2267
2267
|
queueMicrotask(() => {
|
|
2268
|
-
const he = E(), Te = !(ue(y, z) || ue(
|
|
2268
|
+
const he = E(), Te = !(ue(y, z) || ue(x, z) || ue(z, x) || ue(C?.portalNode, z) || z != null && z.hasAttribute(Ve("focus-guard")) || h && ($e(h.nodesRef.current, he).find((_) => {
|
|
2269
2269
|
var j, F;
|
|
2270
2270
|
return ue((j = _.context) == null ? void 0 : j.elements.floating, z) || ue((F = _.context) == null ? void 0 : F.elements.domReference, z);
|
|
2271
2271
|
}) || vn(h.nodesRef.current, he).find((_) => {
|
|
@@ -2277,8 +2277,8 @@ function Ns(e) {
|
|
|
2277
2277
|
const _ = k.current, j = J(), F = j[_] || j[j.length - 1] || N;
|
|
2278
2278
|
ce(F) && F.focus();
|
|
2279
2279
|
}
|
|
2280
|
-
if (
|
|
2281
|
-
|
|
2280
|
+
if (R.current.insideReactTree) {
|
|
2281
|
+
R.current.insideReactTree = !1;
|
|
2282
2282
|
return;
|
|
2283
2283
|
}
|
|
2284
2284
|
(M || !u) && z && Te && !P.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
@@ -2287,27 +2287,27 @@ function Ns(e) {
|
|
|
2287
2287
|
}
|
|
2288
2288
|
const H = !!(!h && C);
|
|
2289
2289
|
function Q() {
|
|
2290
|
-
me(G),
|
|
2291
|
-
|
|
2290
|
+
me(G), R.current.insideReactTree = !0, G.current = window.setTimeout(() => {
|
|
2291
|
+
R.current.insideReactTree = !1;
|
|
2292
2292
|
});
|
|
2293
2293
|
}
|
|
2294
|
-
if (
|
|
2295
|
-
return y.addEventListener("focusout", Y), y.addEventListener("pointerdown", V),
|
|
2296
|
-
y.removeEventListener("focusout", Y), y.removeEventListener("pointerdown", V),
|
|
2294
|
+
if (x && ce(y))
|
|
2295
|
+
return y.addEventListener("focusout", Y), y.addEventListener("pointerdown", V), x.addEventListener("focusout", Y), H && x.addEventListener("focusout", Q, !0), () => {
|
|
2296
|
+
y.removeEventListener("focusout", Y), y.removeEventListener("pointerdown", V), x.removeEventListener("focusout", Y), H && x.removeEventListener("focusout", Q, !0);
|
|
2297
2297
|
};
|
|
2298
|
-
}, [r, y,
|
|
2298
|
+
}, [r, y, x, N, u, h, C, m, p, f, J, M, E, B, R]);
|
|
2299
2299
|
const se = g.useRef(null), ae = g.useRef(null), te = Fn([se, C?.beforeInsideRef]), ne = Fn([ae, C?.afterInsideRef]);
|
|
2300
2300
|
g.useEffect(() => {
|
|
2301
2301
|
var V, Y;
|
|
2302
|
-
if (r || !
|
|
2302
|
+
if (r || !x) return;
|
|
2303
2303
|
const H = Array.from((C == null || (V = C.portalNode) == null ? void 0 : V.querySelectorAll("[" + Ve("portal") + "]")) || []), oe = (Y = (h ? vn(h.nodesRef.current, E()) : []).find((de) => {
|
|
2304
2304
|
var he;
|
|
2305
2305
|
return zt(((he = de.context) == null ? void 0 : he.elements.domReference) || null);
|
|
2306
|
-
})) == null || (Y = Y.context) == null ? void 0 : Y.elements.domReference, z = [
|
|
2306
|
+
})) == null || (Y = Y.context) == null ? void 0 : Y.elements.domReference, z = [x, oe, ...H, ...A(), D.current, T.current, se.current, ae.current, C?.beforeOutsideRef.current, C?.afterOutsideRef.current, B.current.includes("reference") || M ? y : null].filter((de) => de != null), ye = u || M ? kn(z, !I, I) : kn(z);
|
|
2307
2307
|
return () => {
|
|
2308
2308
|
ye();
|
|
2309
2309
|
};
|
|
2310
|
-
}, [r, y,
|
|
2310
|
+
}, [r, y, x, u, B, C, M, $, I, h, E, A]), X(() => {
|
|
2311
2311
|
if (r || !ce(N)) return;
|
|
2312
2312
|
const V = pe(N), Y = Oe(V);
|
|
2313
2313
|
queueMicrotask(() => {
|
|
@@ -2352,7 +2352,7 @@ function Ns(e) {
|
|
|
2352
2352
|
}
|
|
2353
2353
|
return () => {
|
|
2354
2354
|
w.off("openchange", H);
|
|
2355
|
-
const z = Oe(V), ye = ue(
|
|
2355
|
+
const z = Oe(V), ye = ue(x, z) || h && $e(h.nodesRef.current, E(), !1).some((he) => {
|
|
2356
2356
|
var Te;
|
|
2357
2357
|
return ue((Te = he.context) == null ? void 0 : Te.elements.floating, z);
|
|
2358
2358
|
}), de = oe();
|
|
@@ -2367,7 +2367,7 @@ function Ns(e) {
|
|
|
2367
2367
|
}), Q.remove();
|
|
2368
2368
|
});
|
|
2369
2369
|
};
|
|
2370
|
-
}, [r,
|
|
2370
|
+
}, [r, x, N, L, R, w, h, K, y, E]), g.useEffect(() => (queueMicrotask(() => {
|
|
2371
2371
|
b.current = !1;
|
|
2372
2372
|
}), () => {
|
|
2373
2373
|
queueMicrotask(sn);
|
|
@@ -2577,7 +2577,7 @@ function $s(e, t) {
|
|
|
2577
2577
|
axis: f = "both",
|
|
2578
2578
|
x: u = null,
|
|
2579
2579
|
y: l = null
|
|
2580
|
-
} = t, p = g.useRef(!1), d = g.useRef(null), [a, v] = g.useState(), [m, w] = g.useState([]),
|
|
2580
|
+
} = t, p = g.useRef(!1), d = g.useRef(null), [a, v] = g.useState(), [m, w] = g.useState([]), R = re((O, M) => {
|
|
2581
2581
|
p.current || r.current.openEvent && !Kn(r.current.openEvent) || s.setPositionReference(ls(i, {
|
|
2582
2582
|
x: O,
|
|
2583
2583
|
y: M,
|
|
@@ -2586,13 +2586,13 @@ function $s(e, t) {
|
|
|
2586
2586
|
pointerType: a
|
|
2587
2587
|
}));
|
|
2588
2588
|
}), y = re((O) => {
|
|
2589
|
-
u != null || l != null || (n ? d.current || w([]) :
|
|
2590
|
-
}),
|
|
2591
|
-
if (!
|
|
2589
|
+
u != null || l != null || (n ? d.current || w([]) : R(O.clientX, O.clientY));
|
|
2590
|
+
}), x = qe(a) ? o : n, E = g.useCallback(() => {
|
|
2591
|
+
if (!x || !c || u != null || l != null) return;
|
|
2592
2592
|
const O = Se(o);
|
|
2593
2593
|
function M(S) {
|
|
2594
2594
|
const $ = Ie(S);
|
|
2595
|
-
ue(o, $) ? (O.removeEventListener("mousemove", M), d.current = null) :
|
|
2595
|
+
ue(o, $) ? (O.removeEventListener("mousemove", M), d.current = null) : R(S.clientX, S.clientY);
|
|
2596
2596
|
}
|
|
2597
2597
|
if (!r.current.openEvent || Kn(r.current.openEvent)) {
|
|
2598
2598
|
O.addEventListener("mousemove", M);
|
|
@@ -2602,14 +2602,14 @@ function $s(e, t) {
|
|
|
2602
2602
|
return d.current = S, S;
|
|
2603
2603
|
}
|
|
2604
2604
|
s.setPositionReference(i);
|
|
2605
|
-
}, [
|
|
2605
|
+
}, [x, c, u, l, o, r, s, i, R]);
|
|
2606
2606
|
g.useEffect(() => E(), [E, m]), g.useEffect(() => {
|
|
2607
2607
|
c && !o && (p.current = !1);
|
|
2608
2608
|
}, [c, o]), g.useEffect(() => {
|
|
2609
2609
|
!c && n && (p.current = !0);
|
|
2610
2610
|
}, [c, n]), X(() => {
|
|
2611
|
-
c && (u != null || l != null) && (p.current = !1,
|
|
2612
|
-
}, [c, u, l,
|
|
2611
|
+
c && (u != null || l != null) && (p.current = !1, R(u, l));
|
|
2612
|
+
}, [c, u, l, R]);
|
|
2613
2613
|
const A = g.useMemo(() => {
|
|
2614
2614
|
function O(M) {
|
|
2615
2615
|
let {
|
|
@@ -2660,8 +2660,8 @@ function Bs(e, t) {
|
|
|
2660
2660
|
ancestorScroll: d = !1,
|
|
2661
2661
|
bubbles: a,
|
|
2662
2662
|
capture: v
|
|
2663
|
-
} = t, m = Ze(), w = re(typeof f == "function" ? f : () => !1),
|
|
2664
|
-
escapeKey:
|
|
2663
|
+
} = t, m = Ze(), w = re(typeof f == "function" ? f : () => !1), R = typeof f == "function" ? w : f, y = g.useRef(!1), {
|
|
2664
|
+
escapeKey: x,
|
|
2665
2665
|
outsidePress: E
|
|
2666
2666
|
} = Hn(a), {
|
|
2667
2667
|
escapeKey: A,
|
|
@@ -2671,7 +2671,7 @@ function Bs(e, t) {
|
|
|
2671
2671
|
if (!n || !s || !c || h.key !== "Escape" || M.current)
|
|
2672
2672
|
return;
|
|
2673
2673
|
const D = (C = i.current.floatingContext) == null ? void 0 : C.nodeId, T = m ? $e(m.nodesRef.current, D) : [];
|
|
2674
|
-
if (!
|
|
2674
|
+
if (!x && (h.stopPropagation(), T.length > 0)) {
|
|
2675
2675
|
let b = !0;
|
|
2676
2676
|
if (T.forEach((P) => {
|
|
2677
2677
|
var k;
|
|
@@ -2695,7 +2695,7 @@ function Bs(e, t) {
|
|
|
2695
2695
|
const D = i.current.insideReactTree;
|
|
2696
2696
|
i.current.insideReactTree = !1;
|
|
2697
2697
|
const T = y.current;
|
|
2698
|
-
if (y.current = !1, u === "click" && T || D || typeof
|
|
2698
|
+
if (y.current = !1, u === "click" && T || D || typeof R == "function" && !R(h))
|
|
2699
2699
|
return;
|
|
2700
2700
|
const b = Ie(h), P = "[" + Ve("inert") + "]", k = pe(o.floating).querySelectorAll(P);
|
|
2701
2701
|
let G = Z(b) ? b : null;
|
|
@@ -2745,7 +2745,7 @@ function Bs(e, t) {
|
|
|
2745
2745
|
g.useEffect(() => {
|
|
2746
2746
|
if (!n || !s)
|
|
2747
2747
|
return;
|
|
2748
|
-
i.current.__escapeKeyBubbles =
|
|
2748
|
+
i.current.__escapeKeyBubbles = x, i.current.__outsidePressBubbles = E;
|
|
2749
2749
|
let h = -1;
|
|
2750
2750
|
function C(k) {
|
|
2751
2751
|
r(!1, k, "ancestor-scroll");
|
|
@@ -2764,7 +2764,7 @@ function Bs(e, t) {
|
|
|
2764
2764
|
);
|
|
2765
2765
|
}
|
|
2766
2766
|
const b = pe(o.floating);
|
|
2767
|
-
c && (b.addEventListener("keydown", A ? $ : S, A), b.addEventListener("compositionstart", D), b.addEventListener("compositionend", T)),
|
|
2767
|
+
c && (b.addEventListener("keydown", A ? $ : S, A), b.addEventListener("compositionstart", D), b.addEventListener("compositionend", T)), R && b.addEventListener(u, O ? B : I, O);
|
|
2768
2768
|
let P = [];
|
|
2769
2769
|
return d && (Z(o.domReference) && (P = Ue(o.domReference)), Z(o.floating) && (P = P.concat(Ue(o.floating))), !Z(o.reference) && o.reference && o.reference.contextElement && (P = P.concat(Ue(o.reference.contextElement)))), P = P.filter((k) => {
|
|
2770
2770
|
var G;
|
|
@@ -2774,13 +2774,13 @@ function Bs(e, t) {
|
|
|
2774
2774
|
passive: !0
|
|
2775
2775
|
});
|
|
2776
2776
|
}), () => {
|
|
2777
|
-
c && (b.removeEventListener("keydown", A ? $ : S, A), b.removeEventListener("compositionstart", D), b.removeEventListener("compositionend", T)),
|
|
2777
|
+
c && (b.removeEventListener("keydown", A ? $ : S, A), b.removeEventListener("compositionstart", D), b.removeEventListener("compositionend", T)), R && b.removeEventListener(u, O ? B : I, O), P.forEach((k) => {
|
|
2778
2778
|
k.removeEventListener("scroll", C);
|
|
2779
2779
|
}), window.clearTimeout(h);
|
|
2780
2780
|
};
|
|
2781
|
-
}, [i, o, c,
|
|
2781
|
+
}, [i, o, c, R, u, n, r, d, s, x, E, S, A, $, I, O, B]), g.useEffect(() => {
|
|
2782
2782
|
i.current.insideReactTree = !1;
|
|
2783
|
-
}, [i,
|
|
2783
|
+
}, [i, R, u]);
|
|
2784
2784
|
const W = g.useMemo(() => ({
|
|
2785
2785
|
onKeyDown: S,
|
|
2786
2786
|
...l && {
|
|
@@ -2867,43 +2867,43 @@ function Vs(e) {
|
|
|
2867
2867
|
reference: c
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
|
-
}), v = g.useCallback((
|
|
2871
|
-
const E = Z(
|
|
2872
|
-
getBoundingClientRect: () =>
|
|
2873
|
-
getClientRects: () =>
|
|
2874
|
-
contextElement:
|
|
2875
|
-
} :
|
|
2870
|
+
}), v = g.useCallback((x) => {
|
|
2871
|
+
const E = Z(x) ? {
|
|
2872
|
+
getBoundingClientRect: () => x.getBoundingClientRect(),
|
|
2873
|
+
getClientRects: () => x.getClientRects(),
|
|
2874
|
+
contextElement: x
|
|
2875
|
+
} : x;
|
|
2876
2876
|
f(E), a.refs.setReference(E);
|
|
2877
|
-
}, [a.refs]), m = g.useCallback((
|
|
2878
|
-
(Z(
|
|
2877
|
+
}, [a.refs]), m = g.useCallback((x) => {
|
|
2878
|
+
(Z(x) || x === null) && (p.current = x, s(x)), (Z(a.refs.reference.current) || a.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
2879
2879
|
// `null` to support `positionReference` + an unstable `reference`
|
|
2880
2880
|
// callback ref.
|
|
2881
|
-
|
|
2881
|
+
x !== null && !Z(x)) && a.refs.setReference(x);
|
|
2882
2882
|
}, [a.refs]), w = g.useMemo(() => ({
|
|
2883
2883
|
...a.refs,
|
|
2884
2884
|
setReference: m,
|
|
2885
2885
|
setPositionReference: v,
|
|
2886
2886
|
domReference: p
|
|
2887
|
-
}), [a.refs, m, v]),
|
|
2887
|
+
}), [a.refs, m, v]), R = g.useMemo(() => ({
|
|
2888
2888
|
...a.elements,
|
|
2889
2889
|
domReference: l
|
|
2890
2890
|
}), [a.elements, l]), y = g.useMemo(() => ({
|
|
2891
2891
|
...a,
|
|
2892
2892
|
...r,
|
|
2893
2893
|
refs: w,
|
|
2894
|
-
elements:
|
|
2894
|
+
elements: R,
|
|
2895
2895
|
nodeId: t
|
|
2896
|
-
}), [a, w,
|
|
2896
|
+
}), [a, w, R, t, r]);
|
|
2897
2897
|
return X(() => {
|
|
2898
2898
|
r.dataRef.current.floatingContext = y;
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2899
|
+
const x = d?.nodesRef.current.find((E) => E.id === t);
|
|
2900
|
+
x && (x.context = y);
|
|
2901
2901
|
}), g.useMemo(() => ({
|
|
2902
2902
|
...a,
|
|
2903
2903
|
context: y,
|
|
2904
2904
|
refs: w,
|
|
2905
|
-
elements:
|
|
2906
|
-
}), [a, w,
|
|
2905
|
+
elements: R
|
|
2906
|
+
}), [a, w, R, y]);
|
|
2907
2907
|
}
|
|
2908
2908
|
function Kt() {
|
|
2909
2909
|
return Vr() && nr();
|
|
@@ -2969,9 +2969,9 @@ function Ks(e, t) {
|
|
|
2969
2969
|
u.current = !1;
|
|
2970
2970
|
const v = a.relatedTarget, m = a.nativeEvent, w = Z(v) && v.hasAttribute(Ve("focus-guard")) && v.getAttribute("data-type") === "outside";
|
|
2971
2971
|
l.current = window.setTimeout(() => {
|
|
2972
|
-
var
|
|
2972
|
+
var R;
|
|
2973
2973
|
const y = Oe(s.domReference ? s.domReference.ownerDocument : document);
|
|
2974
|
-
!v && y === s.domReference || ue((
|
|
2974
|
+
!v && y === s.domReference || ue((R = i.current.floatingContext) == null ? void 0 : R.refs.floating.current, y) || ue(s.domReference, y) || w || r(!1, m, "focus");
|
|
2975
2975
|
});
|
|
2976
2976
|
}
|
|
2977
2977
|
}), [i, s.domReference, r, f]);
|
|
@@ -3080,9 +3080,9 @@ function js(e, t) {
|
|
|
3080
3080
|
rtl: v = !1,
|
|
3081
3081
|
virtual: m = !1,
|
|
3082
3082
|
focusItemOnOpen: w = "auto",
|
|
3083
|
-
focusItemOnHover:
|
|
3083
|
+
focusItemOnHover: R = !0,
|
|
3084
3084
|
openOnArrowKeyDown: y = !0,
|
|
3085
|
-
disabledIndices:
|
|
3085
|
+
disabledIndices: x = void 0,
|
|
3086
3086
|
orientation: E = "vertical",
|
|
3087
3087
|
parentOrientation: A,
|
|
3088
3088
|
cols: O = 1,
|
|
@@ -3098,7 +3098,7 @@ function js(e, t) {
|
|
|
3098
3098
|
}, [e, E]);
|
|
3099
3099
|
const C = re(() => {
|
|
3100
3100
|
f(b.current === -1 ? null : b.current);
|
|
3101
|
-
}), D = zt(o.domReference), T = g.useRef(w), b = g.useRef(l ?? -1), P = g.useRef(null), k = g.useRef(!0), G = g.useRef(C), K = g.useRef(!!o.floating), N = g.useRef(n), J = g.useRef(!1), U = g.useRef(!1), se = le(
|
|
3101
|
+
}), D = zt(o.domReference), T = g.useRef(w), b = g.useRef(l ?? -1), P = g.useRef(null), k = g.useRef(!0), G = g.useRef(C), K = g.useRef(!!o.floating), N = g.useRef(n), J = g.useRef(!1), U = g.useRef(!1), se = le(x), ae = le(n), te = le(M), ne = le(l), [fe, we] = g.useState(), [V, Y] = g.useState(), H = re(() => {
|
|
3102
3102
|
function _(ee) {
|
|
3103
3103
|
if (m) {
|
|
3104
3104
|
var ie;
|
|
@@ -3183,13 +3183,13 @@ function js(e, t) {
|
|
|
3183
3183
|
let {
|
|
3184
3184
|
currentTarget: q
|
|
3185
3185
|
} = F;
|
|
3186
|
-
J.current = !0, U.current = !1,
|
|
3186
|
+
J.current = !0, U.current = !1, R && _(q);
|
|
3187
3187
|
},
|
|
3188
3188
|
onPointerLeave(F) {
|
|
3189
3189
|
let {
|
|
3190
3190
|
pointerType: q
|
|
3191
3191
|
} = F;
|
|
3192
|
-
if (!(!k.current || q === "touch") && (J.current = !0, !!
|
|
3192
|
+
if (!(!k.current || q === "touch") && (J.current = !0, !!R && (b.current = -1, C(), !m))) {
|
|
3193
3193
|
var ee;
|
|
3194
3194
|
(ee = W.current) == null || ee.focus({
|
|
3195
3195
|
preventScroll: !0
|
|
@@ -3197,7 +3197,7 @@ function js(e, t) {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
}
|
|
3199
3199
|
};
|
|
3200
|
-
}, [ae, W,
|
|
3200
|
+
}, [ae, W, R, s, C, m]), z = g.useCallback(() => {
|
|
3201
3201
|
var _;
|
|
3202
3202
|
return A ?? (h == null || (_ = h.nodesRef.current.find((j) => j.id === L)) == null || (_ = _.context) == null || (_ = _.dataRef) == null ? void 0 : _.current.orientation);
|
|
3203
3203
|
}, [L, h, A]), ye = re((_) => {
|
|
@@ -3207,15 +3207,15 @@ function js(e, t) {
|
|
|
3207
3207
|
ht(_.key, z()) || ge(_), r(!1, _.nativeEvent, "list-navigation"), ce(o.domReference) && (m ? h?.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
|
|
3208
3208
|
return;
|
|
3209
3209
|
}
|
|
3210
|
-
const j = b.current, F = Ft(s,
|
|
3210
|
+
const j = b.current, F = Ft(s, x), q = bn(s, x);
|
|
3211
3211
|
if (D || (_.key === "Home" && (ge(_), b.current = F, C()), _.key === "End" && (ge(_), b.current = q, C())), O > 1) {
|
|
3212
3212
|
const ee = $ || Array.from({
|
|
3213
3213
|
length: s.current.length
|
|
3214
3214
|
}, () => ({
|
|
3215
3215
|
width: 1,
|
|
3216
3216
|
height: 1
|
|
3217
|
-
})), ie = to(ee, O, I), Je = ie.findIndex((
|
|
3218
|
-
current: ie.map((
|
|
3217
|
+
})), ie = to(ee, O, I), Je = ie.findIndex((Re) => Re != null && !vt(s, Re, x)), ut = ie.reduce((Re, Ne, lt) => Ne != null && !vt(s, Ne, x) ? lt : Re, -1), Qe = ie[eo({
|
|
3218
|
+
current: ie.map((Re) => Re != null ? s.current[Re] : null)
|
|
3219
3219
|
}, {
|
|
3220
3220
|
event: _,
|
|
3221
3221
|
orientation: E,
|
|
@@ -3224,7 +3224,7 @@ function js(e, t) {
|
|
|
3224
3224
|
cols: O,
|
|
3225
3225
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
3226
3226
|
// don't end up in them
|
|
3227
|
-
disabledIndices: ro([...(typeof
|
|
3227
|
+
disabledIndices: ro([...(typeof x != "function" ? x : null) || s.current.map((Re, Ne) => vt(s, Ne, x) ? Ne : void 0), void 0], ie),
|
|
3228
3228
|
minIndex: Je,
|
|
3229
3229
|
maxIndex: ut,
|
|
3230
3230
|
prevIndex: no(
|
|
@@ -3249,18 +3249,18 @@ function js(e, t) {
|
|
|
3249
3249
|
}
|
|
3250
3250
|
jt(_.key, E, v) ? d ? b.current = j >= q ? p && j !== s.current.length ? -1 : F : ve(s, {
|
|
3251
3251
|
startingIndex: j,
|
|
3252
|
-
disabledIndices:
|
|
3252
|
+
disabledIndices: x
|
|
3253
3253
|
}) : b.current = Math.min(q, ve(s, {
|
|
3254
3254
|
startingIndex: j,
|
|
3255
|
-
disabledIndices:
|
|
3255
|
+
disabledIndices: x
|
|
3256
3256
|
})) : d ? b.current = j <= F ? p && j !== -1 ? s.current.length : q : ve(s, {
|
|
3257
3257
|
startingIndex: j,
|
|
3258
3258
|
decrement: !0,
|
|
3259
|
-
disabledIndices:
|
|
3259
|
+
disabledIndices: x
|
|
3260
3260
|
}) : b.current = Math.max(F, ve(s, {
|
|
3261
3261
|
startingIndex: j,
|
|
3262
3262
|
decrement: !0,
|
|
3263
|
-
disabledIndices:
|
|
3263
|
+
disabledIndices: x
|
|
3264
3264
|
})), et(s, b.current) && (b.current = -1), C();
|
|
3265
3265
|
}
|
|
3266
3266
|
}), de = g.useMemo(() => m && n && Q && {
|
|
@@ -3283,7 +3283,7 @@ function js(e, t) {
|
|
|
3283
3283
|
...de,
|
|
3284
3284
|
onKeyDown(F) {
|
|
3285
3285
|
k.current = !1;
|
|
3286
|
-
const q = F.key.startsWith("Arrow"), ee = ["Home", "End"].includes(F.key), ie = q || ee, Je = jn(F.key, E, v), ut = Un(F.key, E, v, O), Qe = jn(F.key, z(), v),
|
|
3286
|
+
const q = F.key.startsWith("Arrow"), ee = ["Home", "End"].includes(F.key), ie = q || ee, Je = jn(F.key, E, v), ut = Un(F.key, E, v, O), Qe = jn(F.key, z(), v), Re = ht(F.key, E), Ne = (a ? Qe : Re) || F.key === "Enter" || F.key.trim() === "";
|
|
3287
3287
|
if (m && n) {
|
|
3288
3288
|
const at = h?.nodesRef.current.find((ft) => ft.parentId == null), ke = h && at ? zr(h.nodesRef.current, at.id) : null;
|
|
3289
3289
|
if (ie && ke && S) {
|
|
@@ -3296,7 +3296,7 @@ function js(e, t) {
|
|
|
3296
3296
|
const Tr = ((lt = ke.context) == null ? void 0 : lt.elements.domReference) === F.currentTarget, ln = ut && !Tr ? (cn = ke.context) == null ? void 0 : cn.elements.domReference : Je ? s.current.find((an) => an?.id === fe) : null;
|
|
3297
3297
|
ln && (ge(F), ln.dispatchEvent(ft), Y(void 0));
|
|
3298
3298
|
}
|
|
3299
|
-
if ((
|
|
3299
|
+
if ((Re || ee) && ke.context && ke.context.open && ke.parentId && F.currentTarget !== ke.context.elements.domReference) {
|
|
3300
3300
|
var un;
|
|
3301
3301
|
ge(F), (un = ke.context.elements.domReference) == null || un.dispatchEvent(ft);
|
|
3302
3302
|
return;
|
|
@@ -3313,7 +3313,7 @@ function js(e, t) {
|
|
|
3313
3313
|
Qe && (ge(F), n ? (b.current = Ft(s, se.current), C()) : r(!0, F.nativeEvent, "list-navigation"));
|
|
3314
3314
|
return;
|
|
3315
3315
|
}
|
|
3316
|
-
|
|
3316
|
+
Re && (l != null && (b.current = l), ge(F), !n && y ? r(!0, F.nativeEvent, "list-navigation") : ye(F), n && C());
|
|
3317
3317
|
}
|
|
3318
3318
|
},
|
|
3319
3319
|
onFocus() {
|
|
@@ -3379,14 +3379,14 @@ function Us(e, t) {
|
|
|
3379
3379
|
"aria-labelledby": l
|
|
3380
3380
|
}
|
|
3381
3381
|
};
|
|
3382
|
-
}, [d, p, l, f]),
|
|
3382
|
+
}, [d, p, l, f]), R = g.useCallback((y) => {
|
|
3383
3383
|
let {
|
|
3384
|
-
active:
|
|
3384
|
+
active: x,
|
|
3385
3385
|
selected: E
|
|
3386
3386
|
} = y;
|
|
3387
3387
|
const A = {
|
|
3388
3388
|
role: "option",
|
|
3389
|
-
...
|
|
3389
|
+
...x && {
|
|
3390
3390
|
id: p + "-fui-option"
|
|
3391
3391
|
}
|
|
3392
3392
|
};
|
|
@@ -3403,8 +3403,8 @@ function Us(e, t) {
|
|
|
3403
3403
|
return g.useMemo(() => c ? {
|
|
3404
3404
|
reference: m,
|
|
3405
3405
|
floating: w,
|
|
3406
|
-
item:
|
|
3407
|
-
} : {}, [c, m, w,
|
|
3406
|
+
item: R
|
|
3407
|
+
} : {}, [c, m, w, R]);
|
|
3408
3408
|
}
|
|
3409
3409
|
const Yn = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase());
|
|
3410
3410
|
function He(e, t) {
|
|
@@ -3470,9 +3470,9 @@ function Ys(e, t) {
|
|
|
3470
3470
|
status: w
|
|
3471
3471
|
} = hs(e, {
|
|
3472
3472
|
duration: s
|
|
3473
|
-
}),
|
|
3473
|
+
}), R = le(n), y = le(r), x = le(o), E = le(i);
|
|
3474
3474
|
return X(() => {
|
|
3475
|
-
const A = He(
|
|
3475
|
+
const A = He(R.current, u), O = He(x.current, u), M = He(E.current, u), S = He(y.current, u) || Object.keys(A).reduce(($, I) => ($[I] = "", $), {});
|
|
3476
3476
|
if (w === "initial" && v(($) => ({
|
|
3477
3477
|
transitionProperty: $.transitionProperty,
|
|
3478
3478
|
...M,
|
|
@@ -3491,7 +3491,7 @@ function Ys(e, t) {
|
|
|
3491
3491
|
...$
|
|
3492
3492
|
});
|
|
3493
3493
|
}
|
|
3494
|
-
}, [d,
|
|
3494
|
+
}, [d, x, R, y, E, p, w, u]), {
|
|
3495
3495
|
isMounted: m,
|
|
3496
3496
|
styles: a
|
|
3497
3497
|
};
|
|
@@ -3511,9 +3511,9 @@ function zs(e, t) {
|
|
|
3511
3511
|
resetMs: p = 750,
|
|
3512
3512
|
ignoreKeys: d = [],
|
|
3513
3513
|
selectedIndex: a = null
|
|
3514
|
-
} = t, v = g.useRef(-1), m = g.useRef(""), w = g.useRef((n = a ?? s) != null ? n : -1),
|
|
3514
|
+
} = t, v = g.useRef(-1), m = g.useRef(""), w = g.useRef((n = a ?? s) != null ? n : -1), R = g.useRef(null), y = re(c), x = re(f), E = le(l), A = le(d);
|
|
3515
3515
|
X(() => {
|
|
3516
|
-
r && (me(v),
|
|
3516
|
+
r && (me(v), R.current = null, m.current = "");
|
|
3517
3517
|
}, [r]), X(() => {
|
|
3518
3518
|
if (r && m.current === "") {
|
|
3519
3519
|
var I;
|
|
@@ -3521,7 +3521,7 @@ function zs(e, t) {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
}, [r, a, s]);
|
|
3523
3523
|
const O = re((I) => {
|
|
3524
|
-
I ? o.current.typing || (o.current.typing = I,
|
|
3524
|
+
I ? o.current.typing || (o.current.typing = I, x(I)) : o.current.typing && (o.current.typing = I, x(I));
|
|
3525
3525
|
}), M = re((I) => {
|
|
3526
3526
|
function B(D, T, b) {
|
|
3527
3527
|
const P = E.current ? E.current(T, b) : T.find((k) => k?.toLocaleLowerCase().indexOf(b.toLocaleLowerCase()) === 0);
|
|
@@ -3535,11 +3535,11 @@ function zs(e, t) {
|
|
|
3535
3535
|
r && I.key !== " " && (ge(I), O(!0)), W.every((D) => {
|
|
3536
3536
|
var T, b;
|
|
3537
3537
|
return D ? ((T = D[0]) == null ? void 0 : T.toLocaleLowerCase()) !== ((b = D[1]) == null ? void 0 : b.toLocaleLowerCase()) : !0;
|
|
3538
|
-
}) && m.current === I.key && (m.current = "", w.current =
|
|
3539
|
-
m.current = "", w.current =
|
|
3538
|
+
}) && m.current === I.key && (m.current = "", w.current = R.current), m.current += I.key, me(v), v.current = window.setTimeout(() => {
|
|
3539
|
+
m.current = "", w.current = R.current, O(!1);
|
|
3540
3540
|
}, p);
|
|
3541
3541
|
const h = w.current, C = B(W, [...W.slice((h || 0) + 1), ...W.slice(0, (h || 0) + 1)], m.current);
|
|
3542
|
-
C !== -1 ? (y(C),
|
|
3542
|
+
C !== -1 ? (y(C), R.current = C) : I.key !== " " && (m.current = "", O(!1));
|
|
3543
3543
|
}), S = g.useMemo(() => ({
|
|
3544
3544
|
onKeyDown: M
|
|
3545
3545
|
}), [M]), $ = g.useMemo(() => ({
|
|
@@ -3596,7 +3596,7 @@ function Xs(e) {
|
|
|
3596
3596
|
placement: v,
|
|
3597
3597
|
elements: m,
|
|
3598
3598
|
onClose: w,
|
|
3599
|
-
nodeId:
|
|
3599
|
+
nodeId: R,
|
|
3600
3600
|
tree: y
|
|
3601
3601
|
} = p;
|
|
3602
3602
|
return function(E) {
|
|
@@ -3615,7 +3615,7 @@ function Xs(e) {
|
|
|
3615
3615
|
i = !0;
|
|
3616
3616
|
return;
|
|
3617
3617
|
}
|
|
3618
|
-
if (I && Z(E.relatedTarget) && Bt(m.floating, E.relatedTarget) || y && Cr(y.nodesRef.current,
|
|
3618
|
+
if (I && Z(E.relatedTarget) && Bt(m.floating, E.relatedTarget) || y && Cr(y.nodesRef.current, R).length)
|
|
3619
3619
|
return;
|
|
3620
3620
|
if (C === "top" && a >= L.bottom - 1 || C === "bottom" && a <= L.top + 1 || C === "left" && d >= L.right - 1 || C === "right" && d <= L.left + 1)
|
|
3621
3621
|
return A();
|
|
@@ -3677,7 +3677,7 @@ export {
|
|
|
3677
3677
|
$s as C,
|
|
3678
3678
|
Fs as F,
|
|
3679
3679
|
Is as a,
|
|
3680
|
-
|
|
3680
|
+
xs as b,
|
|
3681
3681
|
Hs as c,
|
|
3682
3682
|
Us as d,
|
|
3683
3683
|
As as e,
|
|
@@ -3690,7 +3690,7 @@ export {
|
|
|
3690
3690
|
Ns as l,
|
|
3691
3691
|
Os as m,
|
|
3692
3692
|
Ws as n,
|
|
3693
|
-
|
|
3693
|
+
Rs as o,
|
|
3694
3694
|
Ge as p,
|
|
3695
3695
|
Ze as q,
|
|
3696
3696
|
Ss as r,
|
|
@@ -3703,4 +3703,4 @@ export {
|
|
|
3703
3703
|
Ls as y,
|
|
3704
3704
|
Ps as z
|
|
3705
3705
|
};
|
|
3706
|
-
//# sourceMappingURL=floating-ui.react-
|
|
3706
|
+
//# sourceMappingURL=floating-ui.react-QNHG9W4N.js.map
|