@memori.ai/ui 1.2.0 → 1.3.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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/memori-ai-ui.cjs.js +10 -10
- package/dist/memori-ai-ui.cjs.js.map +1 -1
- package/dist/memori-ai-ui.css +1 -1
- package/dist/memori-ai-ui.es.js +423 -412
- package/dist/memori-ai-ui.es.js.map +1 -1
- package/package.json +2 -2
package/dist/memori-ai-ui.es.js
CHANGED
|
@@ -472,29 +472,29 @@ function Fa(e, {
|
|
|
472
472
|
let g = !1;
|
|
473
473
|
{
|
|
474
474
|
let y = null, v = -1;
|
|
475
|
-
e.current.forEach((R,
|
|
475
|
+
e.current.forEach((R, E) => {
|
|
476
476
|
if (R == null)
|
|
477
477
|
return;
|
|
478
478
|
const b = R.closest('[role="row"]');
|
|
479
|
-
b && (g = !0), (b !== y || v === -1) && (y = b, v += 1, p[v] = []), p[v].push(
|
|
479
|
+
b && (g = !0), (b !== y || v === -1) && (y = b, v += 1, p[v] = []), p[v].push(E), m[E] = v;
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
const h = g && p.length > 0 && p.some((y) => y.length !== s);
|
|
483
|
-
function
|
|
483
|
+
function w(y) {
|
|
484
484
|
if (!h || a === -1)
|
|
485
485
|
return;
|
|
486
486
|
const v = m[a];
|
|
487
487
|
if (v == null)
|
|
488
488
|
return;
|
|
489
489
|
const R = p[v].indexOf(a);
|
|
490
|
-
let
|
|
491
|
-
r && (
|
|
490
|
+
let E = y === "up" ? v - 1 : v + 1;
|
|
491
|
+
r && (E < 0 ? E = p.length - 1 : E >= p.length && (E = 0));
|
|
492
492
|
const b = /* @__PURE__ */ new Set();
|
|
493
|
-
for (;
|
|
494
|
-
b.add(
|
|
495
|
-
const x = p[
|
|
493
|
+
for (; E >= 0 && E < p.length && !b.has(E); ) {
|
|
494
|
+
b.add(E);
|
|
495
|
+
const x = p[E];
|
|
496
496
|
if (x.length === 0) {
|
|
497
|
-
|
|
497
|
+
E = y === "up" ? E - 1 : E + 1;
|
|
498
498
|
continue;
|
|
499
499
|
}
|
|
500
500
|
const C = Math.min(R, x.length - 1);
|
|
@@ -503,11 +503,11 @@ function Fa(e, {
|
|
|
503
503
|
if (!on(e, _, c))
|
|
504
504
|
return _;
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
E = y === "up" ? E - 1 : E + 1, r && (E < 0 ? E = p.length - 1 : E >= p.length && (E = 0));
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
if (t.key === Kr) {
|
|
510
|
-
const y =
|
|
510
|
+
const y = w("up");
|
|
511
511
|
if (y !== void 0)
|
|
512
512
|
d && He(t), u = y;
|
|
513
513
|
else {
|
|
@@ -519,14 +519,14 @@ function Fa(e, {
|
|
|
519
519
|
decrement: !0,
|
|
520
520
|
disabledIndices: c
|
|
521
521
|
}), r && (a - s < i || u < 0)) {
|
|
522
|
-
const v = a % s, R = f % s,
|
|
523
|
-
R === v ? u = f : u = R > v ?
|
|
522
|
+
const v = a % s, R = f % s, E = f - (R - v);
|
|
523
|
+
R === v ? u = f : u = R > v ? E : E - s;
|
|
524
524
|
}
|
|
525
525
|
rn(e, u) && (u = a);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
if (t.key === pn) {
|
|
529
|
-
const y =
|
|
529
|
+
const y = w("down");
|
|
530
530
|
y !== void 0 ? (d && He(t), u = y) : (d && He(t), a === -1 ? u = i : (u = $e(e, {
|
|
531
531
|
startingIndex: a,
|
|
532
532
|
amount: s,
|
|
@@ -910,10 +910,10 @@ const Xs = function(t) {
|
|
|
910
910
|
toastManager: s
|
|
911
911
|
} = t, [c, i] = l.useState([]), [f, a] = l.useState(!1), [d, u] = l.useState(!1), [p, m] = l.useState(null);
|
|
912
912
|
c.length === 0 && (f && a(!1), d && u(!1));
|
|
913
|
-
const g = f || d, h = l.useRef(/* @__PURE__ */ new Map()),
|
|
913
|
+
const g = f || d, h = l.useRef(/* @__PURE__ */ new Map()), w = l.useRef(null), y = l.useRef(!0), v = l.useRef(!1);
|
|
914
914
|
function R(S) {
|
|
915
|
-
const P = Ge(je(
|
|
916
|
-
if (!
|
|
915
|
+
const P = Ge(je(w.current));
|
|
916
|
+
if (!w.current || !me(w.current, P) || !kn(P))
|
|
917
917
|
return;
|
|
918
918
|
const N = c.findIndex((O) => O.id === S);
|
|
919
919
|
let I = null, k = N + 1;
|
|
@@ -936,7 +936,7 @@ const Xs = function(t) {
|
|
|
936
936
|
preventScroll: !0
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
|
-
const
|
|
939
|
+
const E = X(() => {
|
|
940
940
|
v.current || (v.current = !0, h.current.forEach((S) => {
|
|
941
941
|
if (S.timeout) {
|
|
942
942
|
S.timeout.clear();
|
|
@@ -1006,7 +1006,7 @@ const Xs = function(t) {
|
|
|
1006
1006
|
}));
|
|
1007
1007
|
});
|
|
1008
1008
|
const I = N.timeout ?? r;
|
|
1009
|
-
return N.type !== "loading" && I > 0 && T(P, I, () => x(P)), (f || d || !y.current) &&
|
|
1009
|
+
return N.type !== "loading" && I > 0 && T(P, I, () => x(P)), (f || d || !y.current) && E(), P;
|
|
1010
1010
|
}), L = X((S, P) => {
|
|
1011
1011
|
i((N) => N.map((I) => I.id === S ? {
|
|
1012
1012
|
...I,
|
|
@@ -1023,7 +1023,7 @@ const Xs = function(t) {
|
|
|
1023
1023
|
type: "success"
|
|
1024
1024
|
});
|
|
1025
1025
|
const V = F.timeout ?? r;
|
|
1026
|
-
return V > 0 && T(I, V, () => x(I)), (f || d || !y.current) &&
|
|
1026
|
+
return V > 0 && T(I, V, () => x(I)), (f || d || !y.current) && E(), O;
|
|
1027
1027
|
}).catch((O) => {
|
|
1028
1028
|
const F = cr(P.error, O);
|
|
1029
1029
|
L(I, {
|
|
@@ -1031,7 +1031,7 @@ const Xs = function(t) {
|
|
|
1031
1031
|
type: "error"
|
|
1032
1032
|
});
|
|
1033
1033
|
const V = F.timeout ?? r;
|
|
1034
|
-
return V > 0 && T(I, V, () => x(I)), (f || d || !y.current) &&
|
|
1034
|
+
return V > 0 && T(I, V, () => x(I)), (f || d || !y.current) && E(), Promise.reject(O);
|
|
1035
1035
|
});
|
|
1036
1036
|
return {}.hasOwnProperty.call(P, "setPromise") && P.setPromise(k), k;
|
|
1037
1037
|
});
|
|
@@ -1057,14 +1057,14 @@ const Xs = function(t) {
|
|
|
1057
1057
|
remove: C,
|
|
1058
1058
|
update: L,
|
|
1059
1059
|
promise: B,
|
|
1060
|
-
pauseTimers:
|
|
1060
|
+
pauseTimers: E,
|
|
1061
1061
|
resumeTimers: b,
|
|
1062
1062
|
prevFocusElement: p,
|
|
1063
1063
|
setPrevFocusElement: m,
|
|
1064
|
-
viewportRef:
|
|
1064
|
+
viewportRef: w,
|
|
1065
1065
|
scheduleTimer: T,
|
|
1066
1066
|
windowFocusedRef: y
|
|
1067
|
-
}), [_, x, d, f, g,
|
|
1067
|
+
}), [_, x, d, f, g, E, p, B, C, b, T, c, L]);
|
|
1068
1068
|
return /* @__PURE__ */ D(Jn.Provider, {
|
|
1069
1069
|
value: M,
|
|
1070
1070
|
children: n
|
|
@@ -1361,14 +1361,14 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1361
1361
|
windowFocusedRef: m,
|
|
1362
1362
|
prevFocusElement: g,
|
|
1363
1363
|
setPrevFocusElement: h,
|
|
1364
|
-
expanded:
|
|
1364
|
+
expanded: w,
|
|
1365
1365
|
focused: y
|
|
1366
|
-
} = Xr(), v = l.useRef(!1), R = l.useRef(!1),
|
|
1366
|
+
} = Xr(), v = l.useRef(!1), R = l.useRef(!1), E = i.length, b = i[0]?.height ?? 0, x = l.useMemo(() => i.some((O) => O.transitionStatus === "ending"), [i]);
|
|
1367
1367
|
l.useEffect(() => {
|
|
1368
1368
|
if (!p.current)
|
|
1369
1369
|
return;
|
|
1370
1370
|
function O(V) {
|
|
1371
|
-
|
|
1371
|
+
E !== 0 && V.key === "F6" && V.target !== p.current && (V.preventDefault(), h(Ge(je(p.current))), p.current?.focus({
|
|
1372
1372
|
preventScroll: !0
|
|
1373
1373
|
}), f(), u(!0));
|
|
1374
1374
|
}
|
|
@@ -1376,8 +1376,8 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1376
1376
|
return F.addEventListener("keydown", O), () => {
|
|
1377
1377
|
F.removeEventListener("keydown", O);
|
|
1378
1378
|
};
|
|
1379
|
-
}, [f, u, h,
|
|
1380
|
-
if (!p.current || !
|
|
1379
|
+
}, [f, u, h, E, p]), l.useEffect(() => {
|
|
1380
|
+
if (!p.current || !E)
|
|
1381
1381
|
return;
|
|
1382
1382
|
const O = Ae(p.current);
|
|
1383
1383
|
function F(W) {
|
|
@@ -1404,10 +1404,10 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1404
1404
|
// since the portal node hasn't yet been created.
|
|
1405
1405
|
// By adding this dependency, we ensure the window listeners
|
|
1406
1406
|
// are added when toasts have been created, once the ref is available.
|
|
1407
|
-
|
|
1407
|
+
E
|
|
1408
1408
|
]), l.useEffect(() => {
|
|
1409
1409
|
const O = p.current;
|
|
1410
|
-
if (!O ||
|
|
1410
|
+
if (!O || E === 0)
|
|
1411
1411
|
return;
|
|
1412
1412
|
const F = je(O);
|
|
1413
1413
|
function V(W) {
|
|
@@ -1419,7 +1419,7 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1419
1419
|
return F.addEventListener("pointerdown", V, !0), () => {
|
|
1420
1420
|
F.removeEventListener("pointerdown", V, !0);
|
|
1421
1421
|
};
|
|
1422
|
-
}, [
|
|
1422
|
+
}, [E, a, u, d, p]);
|
|
1423
1423
|
function C(O) {
|
|
1424
1424
|
p.current && (v.current = !0, O.relatedTarget === p.current ? i[0]?.ref?.current?.focus() : g?.focus({
|
|
1425
1425
|
preventScroll: !0
|
|
@@ -1464,8 +1464,8 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1464
1464
|
onKeyDown: T,
|
|
1465
1465
|
onClick: B
|
|
1466
1466
|
}, P = l.useMemo(() => ({
|
|
1467
|
-
expanded:
|
|
1468
|
-
}), [
|
|
1467
|
+
expanded: w
|
|
1468
|
+
}), [w]), N = Te("div", t, {
|
|
1469
1469
|
ref: [n, p],
|
|
1470
1470
|
state: P,
|
|
1471
1471
|
props: [S, {
|
|
@@ -1474,9 +1474,9 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
}, c, {
|
|
1476
1476
|
children: /* @__PURE__ */ be(l.Fragment, {
|
|
1477
|
-
children: [
|
|
1477
|
+
children: [E > 0 && g && /* @__PURE__ */ D(ut, {
|
|
1478
1478
|
onFocus: C
|
|
1479
|
-
}), s,
|
|
1479
|
+
}), s, E > 0 && g && /* @__PURE__ */ D(ut, {
|
|
1480
1480
|
onFocus: C
|
|
1481
1481
|
})]
|
|
1482
1482
|
})
|
|
@@ -1486,7 +1486,7 @@ const ni = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1486
1486
|
}), [p]), k = l.useMemo(() => i.filter((O) => O.priority === "high"), [i]);
|
|
1487
1487
|
return /* @__PURE__ */ be(Js.Provider, {
|
|
1488
1488
|
value: I,
|
|
1489
|
-
children: [
|
|
1489
|
+
children: [E > 0 && g && /* @__PURE__ */ D(ut, {
|
|
1490
1490
|
onFocus: C
|
|
1491
1491
|
}), N, !y && k.length > 0 && /* @__PURE__ */ D("div", {
|
|
1492
1492
|
style: Jr,
|
|
@@ -1700,10 +1700,10 @@ const oi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1700
1700
|
close: m,
|
|
1701
1701
|
remove: g,
|
|
1702
1702
|
setToasts: h,
|
|
1703
|
-
pauseTimers:
|
|
1703
|
+
pauseTimers: w,
|
|
1704
1704
|
expanded: y,
|
|
1705
1705
|
setHovering: v
|
|
1706
|
-
} = Xr(), [R,
|
|
1706
|
+
} = Xr(), [R, E] = l.useState(void 0), [b, x] = l.useState(!1), [C, T] = l.useState(!1), [_, L] = l.useState(!1), [B, M] = l.useState({
|
|
1707
1707
|
x: 0,
|
|
1708
1708
|
y: 0
|
|
1709
1709
|
}), [S, P] = l.useState({
|
|
@@ -1757,7 +1757,7 @@ const oi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1757
1757
|
function xe(H) {
|
|
1758
1758
|
if (H.button !== 0)
|
|
1759
1759
|
return;
|
|
1760
|
-
H.pointerType === "touch" &&
|
|
1760
|
+
H.pointerType === "touch" && w();
|
|
1761
1761
|
const $ = Le(H.nativeEvent);
|
|
1762
1762
|
if (!($ && $.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))) {
|
|
1763
1763
|
if (te.current = !1, ue.current = void 0, ge.current = 0, ee.current = {
|
|
@@ -1803,10 +1803,10 @@ const oi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1803
1803
|
}
|
|
1804
1804
|
let Me;
|
|
1805
1805
|
if (!ue.current)
|
|
1806
|
-
F === "vertical" ? Se > 0 ? Me = "down" : Se < 0 && (Me = "up") : F === "horizontal" ? we > 0 ? Me = "right" : we < 0 && (Me = "left") : Math.abs(we) >= Math.abs(Se) ? Me = we > 0 ? "right" : "left" : Me = Se > 0 ? "down" : "up", Me && a.includes(Me) && (ue.current = Me, ge.current = Wo(Me, we, Se),
|
|
1806
|
+
F === "vertical" ? Se > 0 ? Me = "down" : Se < 0 && (Me = "up") : F === "horizontal" ? we > 0 ? Me = "right" : we < 0 && (Me = "left") : Math.abs(we) >= Math.abs(Se) ? Me = we > 0 ? "right" : "left" : Me = Se > 0 ? "down" : "up", Me && a.includes(Me) && (ue.current = Me, ge.current = Wo(Me, we, Se), E(Me));
|
|
1807
1807
|
else {
|
|
1808
1808
|
const Oe = ue.current, Ne = Wo(Oe, We, ze);
|
|
1809
|
-
Ne > tn ? (te.current = !1,
|
|
1809
|
+
Ne > tn ? (te.current = !1, E(Oe)) : !(a.includes("left") && a.includes("right")) && !(a.includes("up") && a.includes("down")) && ge.current - Ne >= kl && (te.current = !0);
|
|
1810
1810
|
}
|
|
1811
1811
|
const pe = Z(we, Se);
|
|
1812
1812
|
let Ee = U.current.x, De = U.current.y;
|
|
@@ -1822,7 +1822,7 @@ const oi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1822
1822
|
M({
|
|
1823
1823
|
x: S.x,
|
|
1824
1824
|
y: S.y
|
|
1825
|
-
}),
|
|
1825
|
+
}), E(void 0);
|
|
1826
1826
|
return;
|
|
1827
1827
|
}
|
|
1828
1828
|
let $ = !1;
|
|
@@ -1846,10 +1846,10 @@ const oi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
1846
1846
|
if ($)
|
|
1847
1847
|
break;
|
|
1848
1848
|
}
|
|
1849
|
-
$ ? (
|
|
1849
|
+
$ ? (E(fe), L(!0), m(r.id)) : (M({
|
|
1850
1850
|
x: S.x,
|
|
1851
1851
|
y: S.y
|
|
1852
|
-
}),
|
|
1852
|
+
}), E(void 0));
|
|
1853
1853
|
}
|
|
1854
1854
|
function K(H) {
|
|
1855
1855
|
if (H.key === "Escape") {
|
|
@@ -2091,37 +2091,37 @@ function Jt(e = {}) {
|
|
|
2091
2091
|
onClick: m,
|
|
2092
2092
|
onMouseDown: g,
|
|
2093
2093
|
onKeyUp: h,
|
|
2094
|
-
onKeyDown:
|
|
2094
|
+
onKeyDown: w,
|
|
2095
2095
|
onPointerDown: y,
|
|
2096
2096
|
...v
|
|
2097
2097
|
} = p;
|
|
2098
2098
|
return ln({
|
|
2099
2099
|
type: o ? "button" : void 0,
|
|
2100
|
-
onClick(
|
|
2100
|
+
onClick(E) {
|
|
2101
2101
|
if (t) {
|
|
2102
|
-
|
|
2102
|
+
E.preventDefault();
|
|
2103
2103
|
return;
|
|
2104
2104
|
}
|
|
2105
|
-
m?.(
|
|
2105
|
+
m?.(E);
|
|
2106
2106
|
},
|
|
2107
|
-
onMouseDown(
|
|
2108
|
-
t || g?.(
|
|
2107
|
+
onMouseDown(E) {
|
|
2108
|
+
t || g?.(E);
|
|
2109
2109
|
},
|
|
2110
|
-
onKeyDown(
|
|
2111
|
-
if (t || (Pr(
|
|
2110
|
+
onKeyDown(E) {
|
|
2111
|
+
if (t || (Pr(E), w?.(E)), E.baseUIHandlerPrevented)
|
|
2112
2112
|
return;
|
|
2113
|
-
const b =
|
|
2114
|
-
b && ((C || x) &&
|
|
2113
|
+
const b = E.target === E.currentTarget && !o && !i() && !t, x = E.key === "Enter", C = E.key === " ";
|
|
2114
|
+
b && ((C || x) && E.preventDefault(), x && m?.(E));
|
|
2115
2115
|
},
|
|
2116
|
-
onKeyUp(
|
|
2117
|
-
t || (Pr(
|
|
2116
|
+
onKeyUp(E) {
|
|
2117
|
+
t || (Pr(E), h?.(E)), !E.baseUIHandlerPrevented && E.target === E.currentTarget && !o && !t && E.key === " " && m?.(E);
|
|
2118
2118
|
},
|
|
2119
|
-
onPointerDown(
|
|
2119
|
+
onPointerDown(E) {
|
|
2120
2120
|
if (t) {
|
|
2121
|
-
|
|
2121
|
+
E.preventDefault();
|
|
2122
2122
|
return;
|
|
2123
2123
|
}
|
|
2124
|
-
y?.(
|
|
2124
|
+
y?.(E);
|
|
2125
2125
|
}
|
|
2126
2126
|
}, o ? void 0 : {
|
|
2127
2127
|
role: "button"
|
|
@@ -2329,15 +2329,15 @@ function Gl(e, t, n, r) {
|
|
|
2329
2329
|
if (i.has(g))
|
|
2330
2330
|
p(g);
|
|
2331
2331
|
else {
|
|
2332
|
-
const h = s ? g.getAttribute(s) : null,
|
|
2333
|
-
y.set(g, v), d.set(g, R), a.push(g), v === 1 &&
|
|
2332
|
+
const h = s ? g.getAttribute(s) : null, w = h !== null && h !== "false", y = Yo(s), v = (y.get(g) || 0) + 1, R = (d.get(g) || 0) + 1;
|
|
2333
|
+
y.set(g, v), d.set(g, R), a.push(g), v === 1 && w && wn.add(g), R === 1 && g.setAttribute(o, ""), !w && s && g.setAttribute(s, s === "inert" ? "" : "true");
|
|
2334
2334
|
}
|
|
2335
2335
|
});
|
|
2336
2336
|
}
|
|
2337
2337
|
return lr += 1, () => {
|
|
2338
2338
|
a.forEach((m) => {
|
|
2339
|
-
const g = Yo(s),
|
|
2340
|
-
g.set(m,
|
|
2339
|
+
const g = Yo(s), w = (g.get(m) || 0) - 1, y = (d.get(m) || 0) - 1;
|
|
2340
|
+
g.set(m, w), d.set(m, y), w || (!wn.has(m) && s && m.removeAttribute(s), wn.delete(m)), y || m.removeAttribute(o);
|
|
2341
2341
|
}), lr -= 1, lr || (Ht.inert = /* @__PURE__ */ new WeakMap(), Ht["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Ht.none = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakSet(), Rn = {});
|
|
2342
2342
|
};
|
|
2343
2343
|
}
|
|
@@ -2363,12 +2363,12 @@ function ql(e = {}) {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
if (c == null)
|
|
2365
2365
|
return;
|
|
2366
|
-
const
|
|
2367
|
-
if (
|
|
2366
|
+
const w = (n && (Hr(n) ? n : n.current)) ?? f ?? document.body;
|
|
2367
|
+
if (w == null) {
|
|
2368
2368
|
m.current && (m.current = null, p(null), d(null));
|
|
2369
2369
|
return;
|
|
2370
2370
|
}
|
|
2371
|
-
m.current !==
|
|
2371
|
+
m.current !== w && (m.current = w, p(null), d(w));
|
|
2372
2372
|
}, [n, f, c]);
|
|
2373
2373
|
const g = Te("div", r, {
|
|
2374
2374
|
ref: [t, p],
|
|
@@ -2399,7 +2399,7 @@ const lo = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
2399
2399
|
ref: n,
|
|
2400
2400
|
componentProps: t,
|
|
2401
2401
|
elementProps: f
|
|
2402
|
-
}), u = l.useRef(null), p = l.useRef(null), m = l.useRef(null), g = l.useRef(null), [h,
|
|
2402
|
+
}), u = l.useRef(null), p = l.useRef(null), m = l.useRef(null), g = l.useRef(null), [h, w] = l.useState(null), y = h?.modal, v = h?.open, R = typeof i == "boolean" ? i : !!h && !h.modal && h.open && !!a;
|
|
2403
2403
|
l.useEffect(() => {
|
|
2404
2404
|
if (!a || y)
|
|
2405
2405
|
return;
|
|
@@ -2412,17 +2412,17 @@ const lo = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
2412
2412
|
}, [a, y]), l.useEffect(() => {
|
|
2413
2413
|
!a || v || $o(a);
|
|
2414
2414
|
}, [v, a]);
|
|
2415
|
-
const
|
|
2415
|
+
const E = l.useMemo(() => ({
|
|
2416
2416
|
beforeOutsideRef: u,
|
|
2417
2417
|
afterOutsideRef: p,
|
|
2418
2418
|
beforeInsideRef: m,
|
|
2419
2419
|
afterInsideRef: g,
|
|
2420
2420
|
portalNode: a,
|
|
2421
|
-
setFocusManagerState:
|
|
2421
|
+
setFocusManagerState: w
|
|
2422
2422
|
}), [a]);
|
|
2423
2423
|
return /* @__PURE__ */ be(l.Fragment, {
|
|
2424
2424
|
children: [d, /* @__PURE__ */ be(ao.Provider, {
|
|
2425
|
-
value:
|
|
2425
|
+
value: E,
|
|
2426
2426
|
children: [R && a && /* @__PURE__ */ D(ut, {
|
|
2427
2427
|
"data-type": "outside",
|
|
2428
2428
|
ref: u,
|
|
@@ -2503,10 +2503,10 @@ function gi(e) {
|
|
|
2503
2503
|
previousFocusableElement: m,
|
|
2504
2504
|
beforeContentFocusGuardRef: g,
|
|
2505
2505
|
externalTree: h
|
|
2506
|
-
} = e,
|
|
2507
|
-
events:
|
|
2506
|
+
} = e, w = "rootStore" in t ? t.rootStore : t, y = w.useState("open"), v = w.useState("domReferenceElement"), R = w.useState("floatingElement"), {
|
|
2507
|
+
events: E,
|
|
2508
2508
|
dataRef: b
|
|
2509
|
-
} =
|
|
2509
|
+
} = w.context, x = X(() => b.current.floatingContext?.nodeId), C = X(u), T = s === !1, _ = Sr(v) && T, L = Ve(o), B = Ve(s), M = Ve(c), S = Ve(d), P = Ct(h), N = mi(), I = l.useRef(null), k = l.useRef(null), O = l.useRef(!1), F = l.useRef(!1), V = l.useRef(!1), W = l.useRef(-1), ee = l.useRef(""), U = l.useRef(""), ue = et(), ge = et(), te = gn(), j = N != null, q = An(R), de = X((G = q) => G ? mn(G, Xt()) : []), ne = X((G) => {
|
|
2510
2510
|
const K = de(G);
|
|
2511
2511
|
return L.current.map(() => K).filter(Boolean).flat();
|
|
2512
2512
|
});
|
|
@@ -2558,7 +2558,7 @@ function gi(e) {
|
|
|
2558
2558
|
function K(z) {
|
|
2559
2559
|
const ae = z.relatedTarget, Y = z.currentTarget, H = Le(z);
|
|
2560
2560
|
queueMicrotask(() => {
|
|
2561
|
-
const $ = x(), oe =
|
|
2561
|
+
const $ = x(), oe = w.context.triggerElements, le = !(me(v, ae) || me(R, ae) || me(ae, R) || me(N?.portalNode, ae) || ae != null && oe.hasElement(ae) || oe.hasMatchingElement((fe) => me(fe, ae)) || ae?.hasAttribute(Yt("focus-guard")) || P && (It(P.nodesRef.current, $).find((fe) => me(fe.context?.elements.floating, ae) || me(fe.context?.elements.domReference, ae)) || Ao(P.nodesRef.current, $).find((fe) => [fe.context?.elements.floating, An(fe.context?.elements.floating)].includes(ae) || fe.context?.elements.domReference === ae)));
|
|
2562
2562
|
if (Y === v && q && Xo(q, L), i && Y !== v && !Ql(H) && Ge(_e(q)) === _e(q).body) {
|
|
2563
2563
|
if (Pe(q) && (q.focus(), i === "popup")) {
|
|
2564
2564
|
te.request(() => {
|
|
@@ -2580,7 +2580,7 @@ function gi(e) {
|
|
|
2580
2580
|
// focused again. Otherwise, the popup remains open on the second Tab sequence:
|
|
2581
2581
|
// click input -> Tab (closes) -> click input -> Tab.
|
|
2582
2582
|
// Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.
|
|
2583
|
-
(_ || ae !== ur()) && (O.current = !0,
|
|
2583
|
+
(_ || ae !== ur()) && (O.current = !0, w.setOpen(!1, ve(jt, z)));
|
|
2584
2584
|
});
|
|
2585
2585
|
}
|
|
2586
2586
|
function ie() {
|
|
@@ -2601,7 +2601,7 @@ function gi(e) {
|
|
|
2601
2601
|
z();
|
|
2602
2602
|
});
|
|
2603
2603
|
};
|
|
2604
|
-
}, [r, v, R, q, f, P, N,
|
|
2604
|
+
}, [r, v, R, q, f, P, N, w, a, i, de, _, x, L, b, ue, ge, te]);
|
|
2605
2605
|
const A = l.useRef(null), Q = l.useRef(null), Z = Pt(A, g, N?.beforeInsideRef), xe = Pt(Q, N?.afterInsideRef);
|
|
2606
2606
|
l.useEffect(() => {
|
|
2607
2607
|
if (r || !R || !y)
|
|
@@ -2643,7 +2643,7 @@ function gi(e) {
|
|
|
2643
2643
|
}), ae ? O.current = !1 : O.current = !0;
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
|
-
|
|
2646
|
+
E.on("openchange", ie);
|
|
2647
2647
|
const re = G.createElement("span");
|
|
2648
2648
|
re.setAttribute("tabindex", "-1"), re.setAttribute("aria-hidden", "true"), Object.assign(re.style, Jr), j && v && v.insertAdjacentElement("afterend", re);
|
|
2649
2649
|
function he() {
|
|
@@ -2659,7 +2659,7 @@ function gi(e) {
|
|
|
2659
2659
|
return Mt(ae) || Y;
|
|
2660
2660
|
}
|
|
2661
2661
|
return () => {
|
|
2662
|
-
|
|
2662
|
+
E.off("openchange", ie);
|
|
2663
2663
|
const z = Ge(G), ae = me(R, z) || P && It(P.nodesRef.current, x(), !1).some((H) => me(H.context?.elements.floating, z)), Y = he();
|
|
2664
2664
|
queueMicrotask(() => {
|
|
2665
2665
|
const H = Zl(Y), $ = typeof M.current != "boolean";
|
|
@@ -2672,7 +2672,7 @@ function gi(e) {
|
|
|
2672
2672
|
}), re.remove();
|
|
2673
2673
|
});
|
|
2674
2674
|
};
|
|
2675
|
-
}, [r, R, q, M, b,
|
|
2675
|
+
}, [r, R, q, M, b, E, P, j, v, x]), l.useEffect(() => {
|
|
2676
2676
|
queueMicrotask(() => {
|
|
2677
2677
|
O.current = !1;
|
|
2678
2678
|
});
|
|
@@ -2692,12 +2692,12 @@ function gi(e) {
|
|
|
2692
2692
|
modal: f,
|
|
2693
2693
|
closeOnFocusOut: a,
|
|
2694
2694
|
open: y,
|
|
2695
|
-
onOpenChange:
|
|
2695
|
+
onOpenChange: w.setOpen,
|
|
2696
2696
|
domReference: v
|
|
2697
2697
|
}), () => {
|
|
2698
2698
|
N.setFocusManagerState(null);
|
|
2699
2699
|
};
|
|
2700
|
-
}, [r, N, f, y,
|
|
2700
|
+
}, [r, N, f, y, w, a, v]), J(() => {
|
|
2701
2701
|
if (!(r || !q))
|
|
2702
2702
|
return Xo(q, L), () => {
|
|
2703
2703
|
queueMicrotask(uo);
|
|
@@ -2736,12 +2736,12 @@ function eu(e, t = {}) {
|
|
|
2736
2736
|
d.current = g.pointerType;
|
|
2737
2737
|
},
|
|
2738
2738
|
onMouseDown(g) {
|
|
2739
|
-
const h = d.current,
|
|
2739
|
+
const h = d.current, w = g.nativeEvent, y = n.select("open");
|
|
2740
2740
|
if (g.button !== 0 || s === "click" || Wt(h, !0) && i)
|
|
2741
2741
|
return;
|
|
2742
|
-
const v = r.current.openEvent, R = v?.type,
|
|
2743
|
-
if (zr(
|
|
2744
|
-
const C = ve(Rt,
|
|
2742
|
+
const v = r.current.openEvent, R = v?.type, E = n.select("domReferenceElement") !== g.currentTarget, b = y && E || !(y && c && (!(v && f) || R === "click" || R === "mousedown"));
|
|
2743
|
+
if (zr(w.target)) {
|
|
2744
|
+
const C = ve(Rt, w, w.target);
|
|
2745
2745
|
b && h === "touch" && a > 0 ? p.start(a, () => {
|
|
2746
2746
|
n.setOpen(!0, C);
|
|
2747
2747
|
}) : n.setOpen(b, C);
|
|
@@ -2749,7 +2749,7 @@ function eu(e, t = {}) {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
const x = g.currentTarget;
|
|
2751
2751
|
u.request(() => {
|
|
2752
|
-
const C = ve(Rt,
|
|
2752
|
+
const C = ve(Rt, w, x);
|
|
2753
2753
|
b && h === "touch" && a > 0 ? p.start(a, () => {
|
|
2754
2754
|
n.setOpen(!0, C);
|
|
2755
2755
|
}) : n.setOpen(b, C);
|
|
@@ -2765,10 +2765,10 @@ function eu(e, t = {}) {
|
|
|
2765
2765
|
}
|
|
2766
2766
|
if (Wt(h, !0) && i)
|
|
2767
2767
|
return;
|
|
2768
|
-
const
|
|
2768
|
+
const w = n.select("open"), y = r.current.openEvent, v = n.select("domReferenceElement") !== g.currentTarget, R = w && v || !(w && c && (!(y && f) || Vs(y))), E = ve(Rt, g.nativeEvent, g.currentTarget);
|
|
2769
2769
|
R && h === "touch" && a > 0 ? p.start(a, () => {
|
|
2770
|
-
n.setOpen(!0,
|
|
2771
|
-
}) : n.setOpen(R,
|
|
2770
|
+
n.setOpen(!0, E);
|
|
2771
|
+
}) : n.setOpen(R, E);
|
|
2772
2772
|
},
|
|
2773
2773
|
onKeyDown() {
|
|
2774
2774
|
d.current = void 0;
|
|
@@ -2843,12 +2843,12 @@ const tu = async (e, t, n) => {
|
|
|
2843
2843
|
} = Jo(a, r, f), p = r, m = {}, g = 0;
|
|
2844
2844
|
for (let h = 0; h < i.length; h++) {
|
|
2845
2845
|
const {
|
|
2846
|
-
name:
|
|
2846
|
+
name: w,
|
|
2847
2847
|
fn: y
|
|
2848
2848
|
} = i[h], {
|
|
2849
2849
|
x: v,
|
|
2850
2850
|
y: R,
|
|
2851
|
-
data:
|
|
2851
|
+
data: E,
|
|
2852
2852
|
reset: b
|
|
2853
2853
|
} = await y({
|
|
2854
2854
|
x: d,
|
|
@@ -2866,9 +2866,9 @@ const tu = async (e, t, n) => {
|
|
|
2866
2866
|
});
|
|
2867
2867
|
d = v ?? d, u = R ?? u, m = {
|
|
2868
2868
|
...m,
|
|
2869
|
-
[
|
|
2870
|
-
...m[
|
|
2871
|
-
...
|
|
2869
|
+
[w]: {
|
|
2870
|
+
...m[w],
|
|
2871
|
+
...E
|
|
2872
2872
|
}
|
|
2873
2873
|
}, b && g <= 50 && (g++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (a = b.rects === !0 ? await c.getElementRects({
|
|
2874
2874
|
reference: e,
|
|
@@ -2903,8 +2903,8 @@ async function fn(e, t) {
|
|
|
2903
2903
|
elementContext: u = "floating",
|
|
2904
2904
|
altBoundary: p = !1,
|
|
2905
2905
|
padding: m = 0
|
|
2906
|
-
} = mt(t, e), g = Bs(m),
|
|
2907
|
-
element: (n = await (s.isElement == null ? void 0 : s.isElement(
|
|
2906
|
+
} = mt(t, e), g = Bs(m), w = i[p ? u === "floating" ? "reference" : "floating" : u], y = Vn(await s.getClippingRect({
|
|
2907
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(i.floating)),
|
|
2908
2908
|
boundary: a,
|
|
2909
2909
|
rootBoundary: d,
|
|
2910
2910
|
strategy: f
|
|
@@ -2913,7 +2913,7 @@ async function fn(e, t) {
|
|
|
2913
2913
|
y: o,
|
|
2914
2914
|
width: c.floating.width,
|
|
2915
2915
|
height: c.floating.height
|
|
2916
|
-
} : c.reference, R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(i.floating)),
|
|
2916
|
+
} : c.reference, R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(i.floating)), E = await (s.isElement == null ? void 0 : s.isElement(R)) ? await (s.getScale == null ? void 0 : s.getScale(R)) || {
|
|
2917
2917
|
x: 1,
|
|
2918
2918
|
y: 1
|
|
2919
2919
|
} : {
|
|
@@ -2926,10 +2926,10 @@ async function fn(e, t) {
|
|
|
2926
2926
|
strategy: f
|
|
2927
2927
|
}) : v);
|
|
2928
2928
|
return {
|
|
2929
|
-
top: (y.top - b.top + g.top) /
|
|
2930
|
-
bottom: (b.bottom - y.bottom + g.bottom) /
|
|
2931
|
-
left: (y.left - b.left + g.left) /
|
|
2932
|
-
right: (b.right - y.right + g.right) /
|
|
2929
|
+
top: (y.top - b.top + g.top) / E.y,
|
|
2930
|
+
bottom: (b.bottom - y.bottom + g.bottom) / E.y,
|
|
2931
|
+
left: (y.left - b.left + g.left) / E.x,
|
|
2932
|
+
right: (b.right - y.right + g.right) / E.x
|
|
2933
2933
|
};
|
|
2934
2934
|
}
|
|
2935
2935
|
const nu = function(e) {
|
|
@@ -2952,16 +2952,16 @@ const nu = function(e) {
|
|
|
2952
2952
|
fallbackStrategy: m = "bestFit",
|
|
2953
2953
|
fallbackAxisSideDirection: g = "none",
|
|
2954
2954
|
flipAlignment: h = !0,
|
|
2955
|
-
...
|
|
2955
|
+
...w
|
|
2956
2956
|
} = mt(e, t);
|
|
2957
2957
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
2958
2958
|
return {};
|
|
2959
|
-
const y = Je(o), v = nt(i), R = Je(i) === i,
|
|
2960
|
-
!p && x && b.push(...Aa(i, h, g,
|
|
2961
|
-
const C = [i, ...b], T = await fn(t,
|
|
2959
|
+
const y = Je(o), v = nt(i), R = Je(i) === i, E = await (f.isRTL == null ? void 0 : f.isRTL(a.floating)), b = p || (R || !h ? [Fn(i)] : Pa(i)), x = g !== "none";
|
|
2960
|
+
!p && x && b.push(...Aa(i, h, g, E));
|
|
2961
|
+
const C = [i, ...b], T = await fn(t, w), _ = [];
|
|
2962
2962
|
let L = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
2963
2963
|
if (d && _.push(T[y]), u) {
|
|
2964
|
-
const P = Ia(o, c,
|
|
2964
|
+
const P = Ia(o, c, E);
|
|
2965
2965
|
_.push(T[P[0]], T[P[1]]);
|
|
2966
2966
|
}
|
|
2967
2967
|
if (L = [...L, {
|
|
@@ -3129,11 +3129,11 @@ const su = function(e) {
|
|
|
3129
3129
|
mainAxis: s = !0,
|
|
3130
3130
|
crossAxis: c = !1,
|
|
3131
3131
|
limiter: i = {
|
|
3132
|
-
fn: (
|
|
3132
|
+
fn: (w) => {
|
|
3133
3133
|
let {
|
|
3134
3134
|
x: y,
|
|
3135
3135
|
y: v
|
|
3136
|
-
} =
|
|
3136
|
+
} = w;
|
|
3137
3137
|
return {
|
|
3138
3138
|
x: y,
|
|
3139
3139
|
y: v
|
|
@@ -3147,11 +3147,11 @@ const su = function(e) {
|
|
|
3147
3147
|
}, d = await fn(t, f), u = nt(Je(o)), p = Gr(u);
|
|
3148
3148
|
let m = a[p], g = a[u];
|
|
3149
3149
|
if (s) {
|
|
3150
|
-
const
|
|
3150
|
+
const w = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", v = m + d[w], R = m - d[y];
|
|
3151
3151
|
m = Cr(v, m, R);
|
|
3152
3152
|
}
|
|
3153
3153
|
if (c) {
|
|
3154
|
-
const
|
|
3154
|
+
const w = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", v = g + d[w], R = g - d[y];
|
|
3155
3155
|
g = Cr(v, g, R);
|
|
3156
3156
|
}
|
|
3157
3157
|
const h = i.fn({
|
|
@@ -3191,7 +3191,7 @@ const su = function(e) {
|
|
|
3191
3191
|
y: r
|
|
3192
3192
|
}, u = nt(o), p = Gr(u);
|
|
3193
3193
|
let m = d[p], g = d[u];
|
|
3194
|
-
const h = mt(i, t),
|
|
3194
|
+
const h = mt(i, t), w = typeof h == "number" ? {
|
|
3195
3195
|
mainAxis: h,
|
|
3196
3196
|
crossAxis: 0
|
|
3197
3197
|
} : {
|
|
@@ -3200,12 +3200,12 @@ const su = function(e) {
|
|
|
3200
3200
|
...h
|
|
3201
3201
|
};
|
|
3202
3202
|
if (f) {
|
|
3203
|
-
const R = p === "y" ? "height" : "width",
|
|
3204
|
-
m <
|
|
3203
|
+
const R = p === "y" ? "height" : "width", E = s.reference[p] - s.floating[R] + w.mainAxis, b = s.reference[p] + s.reference[R] - w.mainAxis;
|
|
3204
|
+
m < E ? m = E : m > b && (m = b);
|
|
3205
3205
|
}
|
|
3206
3206
|
if (a) {
|
|
3207
3207
|
var y, v;
|
|
3208
|
-
const R = p === "y" ? "width" : "height",
|
|
3208
|
+
const R = p === "y" ? "width" : "height", E = hi.has(Je(o)), b = s.reference[u] - s.floating[R] + (E && ((y = c.offset) == null ? void 0 : y[u]) || 0) + (E ? 0 : w.crossAxis), x = s.reference[u] + s.reference[R] + (E ? 0 : ((v = c.offset) == null ? void 0 : v[u]) || 0) - (E ? w.crossAxis : 0);
|
|
3209
3209
|
g < b ? g = b : g > x && (g = x);
|
|
3210
3210
|
}
|
|
3211
3211
|
return {
|
|
@@ -3233,10 +3233,10 @@ const su = function(e) {
|
|
|
3233
3233
|
width: g,
|
|
3234
3234
|
height: h
|
|
3235
3235
|
} = s.floating;
|
|
3236
|
-
let
|
|
3237
|
-
u === "top" || u === "bottom" ? (
|
|
3238
|
-
const v = h - d.top - d.bottom, R = g - d.left - d.right,
|
|
3239
|
-
let C =
|
|
3236
|
+
let w, y;
|
|
3237
|
+
u === "top" || u === "bottom" ? (w = u, y = p === (await (c.isRTL == null ? void 0 : c.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = u, w = p === "end" ? "top" : "bottom");
|
|
3238
|
+
const v = h - d.top - d.bottom, R = g - d.left - d.right, E = Kt(h - d[w], v), b = Kt(g - d[y], R), x = !t.middlewareData.shift;
|
|
3239
|
+
let C = E, T = b;
|
|
3240
3240
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = R), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), x && !p) {
|
|
3241
3241
|
const L = Ye(d.left, 0), B = Ye(d.right, 0), M = Ye(d.top, 0), S = Ye(d.bottom, 0);
|
|
3242
3242
|
m ? T = g - 2 * (L !== 0 || B !== 0 ? L + B : Ye(d.left, d.right)) : C = h - 2 * (M !== 0 || S !== 0 ? M + S : Ye(d.top, d.bottom));
|
|
@@ -3305,8 +3305,8 @@ function Dt(e, t, n, r) {
|
|
|
3305
3305
|
const p = Ae(s), m = r && Re(r) ? Ae(r) : r;
|
|
3306
3306
|
let g = p, h = wr(g);
|
|
3307
3307
|
for (; h && r && m !== g; ) {
|
|
3308
|
-
const
|
|
3309
|
-
f *=
|
|
3308
|
+
const w = Ut(h), y = h.getBoundingClientRect(), v = Ze(h), R = y.left + (h.clientLeft + parseFloat(v.paddingLeft)) * w.x, E = y.top + (h.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
3309
|
+
f *= w.x, a *= w.y, d *= w.x, u *= w.y, f += R, a += E, g = Ae(h), h = wr(g);
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
3312
|
return Vn({
|
|
@@ -3563,21 +3563,21 @@ function Su(e, t) {
|
|
|
3563
3563
|
} = a;
|
|
3564
3564
|
if (i || t(), !p || !m)
|
|
3565
3565
|
return;
|
|
3566
|
-
const g = Vt(u), h = Vt(o.clientWidth - (d + p)),
|
|
3567
|
-
rootMargin: -g + "px " + -h + "px " + -
|
|
3566
|
+
const g = Vt(u), h = Vt(o.clientWidth - (d + p)), w = Vt(o.clientHeight - (u + m)), y = Vt(d), R = {
|
|
3567
|
+
rootMargin: -g + "px " + -h + "px " + -w + "px " + -y + "px",
|
|
3568
3568
|
threshold: Ye(0, Kt(1, f)) || 1
|
|
3569
3569
|
};
|
|
3570
|
-
let
|
|
3570
|
+
let E = !0;
|
|
3571
3571
|
function b(x) {
|
|
3572
3572
|
const C = x[0].intersectionRatio;
|
|
3573
3573
|
if (C !== f) {
|
|
3574
|
-
if (!
|
|
3574
|
+
if (!E)
|
|
3575
3575
|
return c();
|
|
3576
3576
|
C ? c(!1, C) : r = setTimeout(() => {
|
|
3577
3577
|
c(!1, 1e-7);
|
|
3578
3578
|
}, 1e3);
|
|
3579
3579
|
}
|
|
3580
|
-
C === 1 && !Ri(a, e.getBoundingClientRect()) && c(),
|
|
3580
|
+
C === 1 && !Ri(a, e.getBoundingClientRect()) && c(), E = !1;
|
|
3581
3581
|
}
|
|
3582
3582
|
try {
|
|
3583
3583
|
n = new IntersectionObserver(b, {
|
|
@@ -3616,10 +3616,10 @@ function rs(e, t, n, r) {
|
|
|
3616
3616
|
})), n();
|
|
3617
3617
|
}), a && !f && m.observe(a), m.observe(t));
|
|
3618
3618
|
let g, h = f ? Dt(e) : null;
|
|
3619
|
-
f &&
|
|
3620
|
-
function
|
|
3619
|
+
f && w();
|
|
3620
|
+
function w() {
|
|
3621
3621
|
const y = Dt(e);
|
|
3622
|
-
h && !Ri(h, y) && n(), h = y, g = requestAnimationFrame(
|
|
3622
|
+
h && !Ri(h, y) && n(), h = y, g = requestAnimationFrame(w);
|
|
3623
3623
|
}
|
|
3624
3624
|
return n(), () => {
|
|
3625
3625
|
var y;
|
|
@@ -3709,11 +3709,11 @@ function ku(e) {
|
|
|
3709
3709
|
isPositioned: !1
|
|
3710
3710
|
}), [p, m] = l.useState(r);
|
|
3711
3711
|
zn(p, r) || m(r);
|
|
3712
|
-
const [g, h] = l.useState(null), [
|
|
3712
|
+
const [g, h] = l.useState(null), [w, y] = l.useState(null), v = l.useCallback((O) => {
|
|
3713
3713
|
O !== x.current && (x.current = O, h(O));
|
|
3714
3714
|
}, []), R = l.useCallback((O) => {
|
|
3715
3715
|
O !== C.current && (C.current = O, y(O));
|
|
3716
|
-
}, []),
|
|
3716
|
+
}, []), E = s || g, b = c || w, x = l.useRef(null), C = l.useRef(null), T = l.useRef(d), _ = f != null, L = dr(f), B = dr(o), M = dr(a), S = l.useCallback(() => {
|
|
3717
3717
|
if (!x.current || !C.current)
|
|
3718
3718
|
return;
|
|
3719
3719
|
const O = {
|
|
@@ -3745,21 +3745,21 @@ function ku(e) {
|
|
|
3745
3745
|
Dn(() => (P.current = !0, () => {
|
|
3746
3746
|
P.current = !1;
|
|
3747
3747
|
}), []), Dn(() => {
|
|
3748
|
-
if (
|
|
3748
|
+
if (E && (x.current = E), b && (C.current = b), E && b) {
|
|
3749
3749
|
if (L.current)
|
|
3750
|
-
return L.current(
|
|
3750
|
+
return L.current(E, b, S);
|
|
3751
3751
|
S();
|
|
3752
3752
|
}
|
|
3753
|
-
}, [
|
|
3753
|
+
}, [E, b, S, L, _]);
|
|
3754
3754
|
const N = l.useMemo(() => ({
|
|
3755
3755
|
reference: x,
|
|
3756
3756
|
floating: C,
|
|
3757
3757
|
setReference: v,
|
|
3758
3758
|
setFloating: R
|
|
3759
3759
|
}), [v, R]), I = l.useMemo(() => ({
|
|
3760
|
-
reference:
|
|
3760
|
+
reference: E,
|
|
3761
3761
|
floating: b
|
|
3762
|
-
}), [
|
|
3762
|
+
}), [E, b]), k = l.useMemo(() => {
|
|
3763
3763
|
const O = {
|
|
3764
3764
|
position: n,
|
|
3765
3765
|
left: 0,
|
|
@@ -3828,12 +3828,12 @@ function Si(e, t = {}) {
|
|
|
3828
3828
|
referencePress: m = !1,
|
|
3829
3829
|
referencePressEvent: g = "sloppy",
|
|
3830
3830
|
ancestorScroll: h = !1,
|
|
3831
|
-
bubbles:
|
|
3831
|
+
bubbles: w,
|
|
3832
3832
|
externalTree: y
|
|
3833
|
-
} = t, v = Ct(y), R = X(typeof u == "function" ? u : () => !1),
|
|
3833
|
+
} = t, v = Ct(y), R = X(typeof u == "function" ? u : () => !1), E = typeof u == "function" ? R : u, b = l.useRef(!1), {
|
|
3834
3834
|
escapeKey: x,
|
|
3835
3835
|
outsidePress: C
|
|
3836
|
-
} = Uu(
|
|
3836
|
+
} = Uu(w), T = l.useRef(null), _ = et(), L = et(), B = X(() => {
|
|
3837
3837
|
L.clear(), f.current.insideReactTree = !1;
|
|
3838
3838
|
}), M = l.useRef(!1), S = l.useRef(""), P = X((A) => {
|
|
3839
3839
|
S.current = A.pointerType;
|
|
@@ -3867,7 +3867,7 @@ function Si(e, t = {}) {
|
|
|
3867
3867
|
B();
|
|
3868
3868
|
return;
|
|
3869
3869
|
}
|
|
3870
|
-
if (N() === "intentional" && Q || typeof
|
|
3870
|
+
if (N() === "intentional" && Q || typeof E == "function" && !E(A))
|
|
3871
3871
|
return;
|
|
3872
3872
|
const Z = Le(A), xe = `[${Yt("inert")}]`, se = _e(n.select("floatingElement")).querySelectorAll(xe), G = n.context.triggerElements;
|
|
3873
3873
|
if (Z && (G.hasElement(Z) || G.hasMatchingElement((z) => me(z, Z))))
|
|
@@ -3976,18 +3976,18 @@ function Si(e, t = {}) {
|
|
|
3976
3976
|
);
|
|
3977
3977
|
}
|
|
3978
3978
|
const se = _e(o);
|
|
3979
|
-
se.addEventListener("pointerdown", P, !0), d && (se.addEventListener("keydown", I), se.addEventListener("compositionstart", Z), se.addEventListener("compositionend", xe)),
|
|
3979
|
+
se.addEventListener("pointerdown", P, !0), d && (se.addEventListener("keydown", I), se.addEventListener("compositionstart", Z), se.addEventListener("compositionend", xe)), E && (se.addEventListener("click", U, !0), se.addEventListener("pointerdown", U, !0), se.addEventListener("touchstart", ee, !0), se.addEventListener("touchmove", ge, !0), se.addEventListener("touchend", j, !0), se.addEventListener("mousedown", U, !0));
|
|
3980
3980
|
let G = [];
|
|
3981
3981
|
return h && (Re(c) && (G = vt(c)), Re(o) && (G = G.concat(vt(o))), !Re(s) && s && s.contextElement && (G = G.concat(vt(s.contextElement)))), G = G.filter((K) => K !== se.defaultView?.visualViewport), G.forEach((K) => {
|
|
3982
3982
|
K.addEventListener("scroll", Q, {
|
|
3983
3983
|
passive: !0
|
|
3984
3984
|
});
|
|
3985
3985
|
}), () => {
|
|
3986
|
-
se.removeEventListener("pointerdown", P, !0), d && (se.removeEventListener("keydown", I), se.removeEventListener("compositionstart", Z), se.removeEventListener("compositionend", xe)),
|
|
3986
|
+
se.removeEventListener("pointerdown", P, !0), d && (se.removeEventListener("keydown", I), se.removeEventListener("compositionstart", Z), se.removeEventListener("compositionend", xe)), E && (se.removeEventListener("click", U, !0), se.removeEventListener("pointerdown", U, !0), se.removeEventListener("touchstart", ee, !0), se.removeEventListener("touchmove", ge, !0), se.removeEventListener("touchend", j, !0), se.removeEventListener("mousedown", U, !0)), G.forEach((K) => {
|
|
3987
3987
|
K.removeEventListener("scroll", Q);
|
|
3988
3988
|
}), A.clear();
|
|
3989
3989
|
};
|
|
3990
|
-
}, [f, o, s, c, d,
|
|
3990
|
+
}, [f, o, s, c, d, E, r, i, h, a, x, C, I, F, U, V, ee, ge, j, P, n]), l.useEffect(B, [E, B]);
|
|
3991
3991
|
const q = l.useMemo(() => ({
|
|
3992
3992
|
onKeyDown: I,
|
|
3993
3993
|
...m && {
|
|
@@ -4269,13 +4269,13 @@ function Oi(e, ...t) {
|
|
|
4269
4269
|
argsMemoize: m = Ci,
|
|
4270
4270
|
argsMemoizeOptions: g = [],
|
|
4271
4271
|
devModeChecks: h = {}
|
|
4272
|
-
} = d,
|
|
4272
|
+
} = d, w = ss(p), y = ss(g), v = qu(o), R = u(function() {
|
|
4273
4273
|
return s++, a.apply(
|
|
4274
4274
|
null,
|
|
4275
4275
|
arguments
|
|
4276
4276
|
);
|
|
4277
|
-
}, ...
|
|
4278
|
-
let
|
|
4277
|
+
}, ...w);
|
|
4278
|
+
let E = !0;
|
|
4279
4279
|
const b = m(function() {
|
|
4280
4280
|
c++;
|
|
4281
4281
|
const C = is(
|
|
@@ -4283,7 +4283,7 @@ function Oi(e, ...t) {
|
|
|
4283
4283
|
arguments
|
|
4284
4284
|
);
|
|
4285
4285
|
if (i = R.apply(null, C), process.env.NODE_ENV !== "production") {
|
|
4286
|
-
const { identityFunctionCheck: T, inputStabilityCheck: _ } = Xu(
|
|
4286
|
+
const { identityFunctionCheck: T, inputStabilityCheck: _ } = Xu(E, h);
|
|
4287
4287
|
if (T.shouldRun && T.run(
|
|
4288
4288
|
a,
|
|
4289
4289
|
C,
|
|
@@ -4295,11 +4295,11 @@ function Oi(e, ...t) {
|
|
|
4295
4295
|
);
|
|
4296
4296
|
_.run(
|
|
4297
4297
|
{ inputSelectorResults: C, inputSelectorResultsCopy: L },
|
|
4298
|
-
{ memoize: u, memoizeOptions:
|
|
4298
|
+
{ memoize: u, memoizeOptions: w },
|
|
4299
4299
|
arguments
|
|
4300
4300
|
);
|
|
4301
4301
|
}
|
|
4302
|
-
|
|
4302
|
+
E && (E = !1);
|
|
4303
4303
|
}
|
|
4304
4304
|
return i;
|
|
4305
4305
|
}, ...y);
|
|
@@ -4377,16 +4377,16 @@ function af() {
|
|
|
4377
4377
|
}
|
|
4378
4378
|
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, s = e.useLayoutEffect, c = e.useDebugValue;
|
|
4379
4379
|
function i(u, p) {
|
|
4380
|
-
var m = p(), g = r({ inst: { value: m, getSnapshot: p } }), h = g[0].inst,
|
|
4380
|
+
var m = p(), g = r({ inst: { value: m, getSnapshot: p } }), h = g[0].inst, w = g[1];
|
|
4381
4381
|
return s(
|
|
4382
4382
|
function() {
|
|
4383
|
-
h.value = m, h.getSnapshot = p, f(h) &&
|
|
4383
|
+
h.value = m, h.getSnapshot = p, f(h) && w({ inst: h });
|
|
4384
4384
|
},
|
|
4385
4385
|
[u, m, p]
|
|
4386
4386
|
), o(
|
|
4387
4387
|
function() {
|
|
4388
|
-
return f(h) &&
|
|
4389
|
-
f(h) &&
|
|
4388
|
+
return f(h) && w({ inst: h }), u(function() {
|
|
4389
|
+
f(h) && w({ inst: h });
|
|
4390
4390
|
});
|
|
4391
4391
|
},
|
|
4392
4392
|
[u]
|
|
@@ -4430,15 +4430,15 @@ function lf() {
|
|
|
4430
4430
|
));
|
|
4431
4431
|
var h = g();
|
|
4432
4432
|
if (!u) {
|
|
4433
|
-
var
|
|
4434
|
-
s(h,
|
|
4433
|
+
var w = g();
|
|
4434
|
+
s(h, w) || (console.error(
|
|
4435
4435
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
4436
4436
|
), u = !0);
|
|
4437
4437
|
}
|
|
4438
|
-
|
|
4438
|
+
w = c({
|
|
4439
4439
|
inst: { value: h, getSnapshot: g }
|
|
4440
4440
|
});
|
|
4441
|
-
var y =
|
|
4441
|
+
var y = w[0].inst, v = w[1];
|
|
4442
4442
|
return f(
|
|
4443
4443
|
function() {
|
|
4444
4444
|
y.value = h, y.getSnapshot = g, n(y) && v({ inst: y });
|
|
@@ -4507,15 +4507,15 @@ function ff() {
|
|
|
4507
4507
|
if (v = !0, R = x, x = p(x), m !== void 0 && h.hasValue) {
|
|
4508
4508
|
var C = h.value;
|
|
4509
4509
|
if (m(C, x))
|
|
4510
|
-
return
|
|
4510
|
+
return E = C;
|
|
4511
4511
|
}
|
|
4512
|
-
return
|
|
4512
|
+
return E = x;
|
|
4513
4513
|
}
|
|
4514
|
-
if (C =
|
|
4514
|
+
if (C = E, r(R, x)) return C;
|
|
4515
4515
|
var T = p(x);
|
|
4516
|
-
return m !== void 0 && m(C, T) ? (R = x, C) : (R = x,
|
|
4516
|
+
return m !== void 0 && m(C, T) ? (R = x, C) : (R = x, E = T);
|
|
4517
4517
|
}
|
|
4518
|
-
var v = !1, R,
|
|
4518
|
+
var v = !1, R, E, b = u === void 0 ? null : u;
|
|
4519
4519
|
return [
|
|
4520
4520
|
function() {
|
|
4521
4521
|
return y(d());
|
|
@@ -4527,13 +4527,13 @@ function ff() {
|
|
|
4527
4527
|
},
|
|
4528
4528
|
[d, u, p, m]
|
|
4529
4529
|
);
|
|
4530
|
-
var
|
|
4530
|
+
var w = o(a, g[0], g[1]);
|
|
4531
4531
|
return c(
|
|
4532
4532
|
function() {
|
|
4533
|
-
h.hasValue = !0, h.value =
|
|
4533
|
+
h.hasValue = !0, h.value = w;
|
|
4534
4534
|
},
|
|
4535
|
-
[
|
|
4536
|
-
), f(
|
|
4535
|
+
[w]
|
|
4536
|
+
), f(w), w;
|
|
4537
4537
|
}, gr;
|
|
4538
4538
|
}
|
|
4539
4539
|
var hr = {};
|
|
@@ -4567,16 +4567,16 @@ function df() {
|
|
|
4567
4567
|
if (v = !0, R = x, x = p(x), m !== void 0 && h.hasValue) {
|
|
4568
4568
|
var C = h.value;
|
|
4569
4569
|
if (m(C, x))
|
|
4570
|
-
return
|
|
4570
|
+
return E = C;
|
|
4571
4571
|
}
|
|
4572
|
-
return
|
|
4572
|
+
return E = x;
|
|
4573
4573
|
}
|
|
4574
|
-
if (C =
|
|
4574
|
+
if (C = E, r(R, x))
|
|
4575
4575
|
return C;
|
|
4576
4576
|
var T = p(x);
|
|
4577
|
-
return m !== void 0 && m(C, T) ? (R = x, C) : (R = x,
|
|
4577
|
+
return m !== void 0 && m(C, T) ? (R = x, C) : (R = x, E = T);
|
|
4578
4578
|
}
|
|
4579
|
-
var v = !1, R,
|
|
4579
|
+
var v = !1, R, E, b = u === void 0 ? null : u;
|
|
4580
4580
|
return [
|
|
4581
4581
|
function() {
|
|
4582
4582
|
return y(d());
|
|
@@ -4588,13 +4588,13 @@ function df() {
|
|
|
4588
4588
|
},
|
|
4589
4589
|
[d, u, p, m]
|
|
4590
4590
|
);
|
|
4591
|
-
var
|
|
4591
|
+
var w = o(a, g[0], g[1]);
|
|
4592
4592
|
return c(
|
|
4593
4593
|
function() {
|
|
4594
|
-
h.hasValue = !0, h.value =
|
|
4594
|
+
h.hasValue = !0, h.value = w;
|
|
4595
4595
|
},
|
|
4596
|
-
[
|
|
4597
|
-
), f(
|
|
4596
|
+
[w]
|
|
4597
|
+
), f(w), w;
|
|
4598
4598
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4599
4599
|
})()), hr;
|
|
4600
4600
|
}
|
|
@@ -5202,7 +5202,7 @@ function Cf(e = {}) {
|
|
|
5202
5202
|
i(T), d.refs.setReference(T);
|
|
5203
5203
|
}, [d.refs]), [p, m] = l.useState(null), [g, h] = l.useState(null);
|
|
5204
5204
|
o.useSyncedValue("referenceElement", p), o.useSyncedValue("domReferenceElement", Re(p) ? p : null), o.useSyncedValue("floatingElement", g);
|
|
5205
|
-
const
|
|
5205
|
+
const w = l.useCallback((C) => {
|
|
5206
5206
|
(Re(C) || C === null) && (f.current = C, m(C)), (Re(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
5207
5207
|
// `null` to support `positionReference` + an unstable `reference`
|
|
5208
5208
|
// callback ref.
|
|
@@ -5211,17 +5211,17 @@ function Cf(e = {}) {
|
|
|
5211
5211
|
h(C), d.refs.setFloating(C);
|
|
5212
5212
|
}, [d.refs]), v = l.useMemo(() => ({
|
|
5213
5213
|
...d.refs,
|
|
5214
|
-
setReference:
|
|
5214
|
+
setReference: w,
|
|
5215
5215
|
setFloating: y,
|
|
5216
5216
|
setPositionReference: u,
|
|
5217
5217
|
domReference: f
|
|
5218
|
-
}), [d.refs,
|
|
5218
|
+
}), [d.refs, w, y, u]), R = l.useMemo(() => ({
|
|
5219
5219
|
...d.elements,
|
|
5220
5220
|
domReference: s.domReference
|
|
5221
|
-
}), [d.elements, s.domReference]),
|
|
5221
|
+
}), [d.elements, s.domReference]), E = o.useState("open"), b = o.useState("floatingId"), x = l.useMemo(() => ({
|
|
5222
5222
|
...d,
|
|
5223
5223
|
dataRef: o.context.dataRef,
|
|
5224
|
-
open:
|
|
5224
|
+
open: E,
|
|
5225
5225
|
onOpenChange: o.setOpen,
|
|
5226
5226
|
events: o.context.events,
|
|
5227
5227
|
floatingId: b,
|
|
@@ -5229,7 +5229,7 @@ function Cf(e = {}) {
|
|
|
5229
5229
|
elements: R,
|
|
5230
5230
|
nodeId: t,
|
|
5231
5231
|
rootStore: o
|
|
5232
|
-
}), [d, v, R, t, o,
|
|
5232
|
+
}), [d, v, R, t, o, E, b]);
|
|
5233
5233
|
return J(() => {
|
|
5234
5234
|
o.context.dataRef.current.floatingContext = x;
|
|
5235
5235
|
const C = a?.nodesRef.current.find((T) => T.id === t);
|
|
@@ -5325,8 +5325,8 @@ function Of(e, t = {}) {
|
|
|
5325
5325
|
i.current = !1;
|
|
5326
5326
|
const p = u.relatedTarget, m = u.nativeEvent, g = Re(p) && p.hasAttribute(Yt("focus-guard")) && p.getAttribute("data-type") === "outside";
|
|
5327
5327
|
f.start(0, () => {
|
|
5328
|
-
const h = n.select("domReferenceElement"),
|
|
5329
|
-
!p &&
|
|
5328
|
+
const h = n.select("domReferenceElement"), w = Ge(h ? h.ownerDocument : document);
|
|
5329
|
+
!p && w === h || me(o.current.floatingContext?.refs.floating.current, w) || me(h, w) || g || n.context.triggerElements.hasElement(u.relatedTarget) || n.setOpen(!1, ve(Kn, m));
|
|
5330
5330
|
});
|
|
5331
5331
|
}
|
|
5332
5332
|
}), [o, n, c, f]);
|
|
@@ -5373,15 +5373,15 @@ function If(e, t = {}) {
|
|
|
5373
5373
|
performedPointerEventsMutationRef: m,
|
|
5374
5374
|
unbindMouseMoveRef: g,
|
|
5375
5375
|
restTimeoutPendingRef: h,
|
|
5376
|
-
openChangeTimeout:
|
|
5376
|
+
openChangeTimeout: w,
|
|
5377
5377
|
handleCloseOptionsRef: y
|
|
5378
|
-
} = _i(n), v = Ct(a), R = ht(),
|
|
5378
|
+
} = _i(n), v = Ct(a), R = ht(), E = X(() => u.current ? !0 : c.current.openEvent ? Mf.has(c.current.openEvent.type) : !1), b = X(() => {
|
|
5379
5379
|
const L = c.current.openEvent?.type;
|
|
5380
5380
|
return L?.includes("mouse") && L !== "mousedown";
|
|
5381
5381
|
}), x = l.useCallback((L, B = !0) => {
|
|
5382
5382
|
const M = Pf(f, d.current);
|
|
5383
|
-
M && !p.current ?
|
|
5384
|
-
}, [f, p, n, d,
|
|
5383
|
+
M && !p.current ? w.start(M, () => n.setOpen(!1, ve(Xe, L))) : B && (w.clear(), n.setOpen(!1, ve(Xe, L)));
|
|
5384
|
+
}, [f, p, n, d, w]), C = X(() => {
|
|
5385
5385
|
g.current(), p.current = void 0;
|
|
5386
5386
|
}), T = X(() => {
|
|
5387
5387
|
if (m.current) {
|
|
@@ -5414,16 +5414,16 @@ function If(e, t = {}) {
|
|
|
5414
5414
|
if (!i)
|
|
5415
5415
|
return;
|
|
5416
5416
|
function L(P) {
|
|
5417
|
-
if (
|
|
5417
|
+
if (E() || !c.current.floatingContext || !n.select("open"))
|
|
5418
5418
|
return;
|
|
5419
5419
|
const N = n.context.triggerElements;
|
|
5420
|
-
P.relatedTarget && N.hasElement(P.relatedTarget) || (T(), C(),
|
|
5420
|
+
P.relatedTarget && N.hasElement(P.relatedTarget) || (T(), C(), E() || x(P));
|
|
5421
5421
|
}
|
|
5422
5422
|
function B(P) {
|
|
5423
|
-
|
|
5423
|
+
w.clear(), T(), p.current?.(P), C();
|
|
5424
5424
|
}
|
|
5425
5425
|
function M(P) {
|
|
5426
|
-
|
|
5426
|
+
E() || x(P, !1);
|
|
5427
5427
|
}
|
|
5428
5428
|
const S = o;
|
|
5429
5429
|
return S && (S.addEventListener("mouseleave", L), S.addEventListener("mouseenter", B), S.addEventListener("mouseleave", M), S.addEventListener("pointerdown", _, !0)), () => {
|
|
@@ -5456,22 +5456,22 @@ function _f(e, t = {}) {
|
|
|
5456
5456
|
isActiveTrigger: m = !0
|
|
5457
5457
|
} = t, g = Ct(p), {
|
|
5458
5458
|
pointerTypeRef: h,
|
|
5459
|
-
interactedInsideRef:
|
|
5459
|
+
interactedInsideRef: w,
|
|
5460
5460
|
handlerRef: y,
|
|
5461
5461
|
blockMouseMoveRef: v,
|
|
5462
5462
|
performedPointerEventsMutationRef: R,
|
|
5463
|
-
unbindMouseMoveRef:
|
|
5463
|
+
unbindMouseMoveRef: E,
|
|
5464
5464
|
restTimeoutPendingRef: b,
|
|
5465
5465
|
openChangeTimeout: x,
|
|
5466
5466
|
restTimeout: C,
|
|
5467
5467
|
handleCloseOptionsRef: T
|
|
5468
5468
|
} = _i(n), _ = Ve(i), L = Ve(c), B = Ve(a);
|
|
5469
5469
|
m && (T.current = _.current?.__options);
|
|
5470
|
-
const M = X(() =>
|
|
5470
|
+
const M = X(() => w.current ? !0 : r.current.openEvent ? ["click", "mousedown"].includes(r.current.openEvent.type) : !1), S = l.useCallback((k, O = !0) => {
|
|
5471
5471
|
const F = ar(L.current, "close", h.current);
|
|
5472
5472
|
F && !y.current ? x.start(F, () => n.setOpen(!1, ve(Xe, k))) : O && (x.clear(), n.setOpen(!1, ve(Xe, k)));
|
|
5473
5473
|
}, [L, y, n, h, x]), P = X(() => {
|
|
5474
|
-
|
|
5474
|
+
E.current(), y.current = void 0;
|
|
5475
5475
|
}), N = X(() => {
|
|
5476
5476
|
if (R.current) {
|
|
5477
5477
|
const k = _e(n.select("domReferenceElement")).body;
|
|
@@ -5524,7 +5524,7 @@ function _f(e, t = {}) {
|
|
|
5524
5524
|
N();
|
|
5525
5525
|
return;
|
|
5526
5526
|
}
|
|
5527
|
-
|
|
5527
|
+
E.current();
|
|
5528
5528
|
const ee = n.select("domReferenceElement"), U = _e(ee);
|
|
5529
5529
|
C.clear(), b.current = !1;
|
|
5530
5530
|
const ue = n.context.triggerElements;
|
|
@@ -5543,7 +5543,7 @@ function _f(e, t = {}) {
|
|
|
5543
5543
|
}
|
|
5544
5544
|
});
|
|
5545
5545
|
const j = y.current;
|
|
5546
|
-
j(W), U.addEventListener("mousemove", j),
|
|
5546
|
+
j(W), U.addEventListener("mousemove", j), E.current = () => {
|
|
5547
5547
|
U.removeEventListener("mousemove", j);
|
|
5548
5548
|
};
|
|
5549
5549
|
return;
|
|
@@ -5558,7 +5558,7 @@ function _f(e, t = {}) {
|
|
|
5558
5558
|
}), k.addEventListener("mouseenter", O), k.addEventListener("mouseleave", F), () => {
|
|
5559
5559
|
k.removeEventListener("mouseleave", V), d && k.removeEventListener("mousemove", O), k.removeEventListener("mouseenter", O), k.removeEventListener("mouseleave", F);
|
|
5560
5560
|
};
|
|
5561
|
-
}, [P, N, v, r, L, S, n, s, _, I, m, M, f, d, h, B, C, b, x, u, g,
|
|
5561
|
+
}, [P, N, v, r, L, S, n, s, _, I, m, M, f, d, h, B, C, b, x, u, g, E, y]), l.useMemo(() => {
|
|
5562
5562
|
function k(O) {
|
|
5563
5563
|
h.current = O.pointerType;
|
|
5564
5564
|
}
|
|
@@ -5661,11 +5661,11 @@ function Ff(e, t) {
|
|
|
5661
5661
|
loopFocus: m = !1,
|
|
5662
5662
|
nested: g = !1,
|
|
5663
5663
|
rtl: h = !1,
|
|
5664
|
-
virtual:
|
|
5664
|
+
virtual: w = !1,
|
|
5665
5665
|
focusItemOnOpen: y = "auto",
|
|
5666
5666
|
focusItemOnHover: v = !0,
|
|
5667
5667
|
openOnArrowKeyDown: R = !0,
|
|
5668
|
-
disabledIndices:
|
|
5668
|
+
disabledIndices: E = void 0,
|
|
5669
5669
|
orientation: b = "vertical",
|
|
5670
5670
|
parentOrientation: x,
|
|
5671
5671
|
cols: C = 1,
|
|
@@ -5676,16 +5676,16 @@ function Ff(e, t) {
|
|
|
5676
5676
|
resetOnPointerLeave: M = !0,
|
|
5677
5677
|
externalTree: S
|
|
5678
5678
|
} = t;
|
|
5679
|
-
process.env.NODE_ENV !== "production" && (p && (m || console.warn("`useListNavigation` looping must be enabled to allow escaping."),
|
|
5679
|
+
process.env.NODE_ENV !== "production" && (p && (m || console.warn("`useListNavigation` looping must be enabled to allow escaping."), w || console.warn("`useListNavigation` must be virtual to allow escaping.")), b === "vertical" && C > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
|
|
5680
5680
|
const P = An(o), N = Ve(P), I = ht(), k = Ct(S);
|
|
5681
5681
|
J(() => {
|
|
5682
5682
|
c.current.orientation = b;
|
|
5683
5683
|
}, [c, b]);
|
|
5684
5684
|
const O = Sr(s), F = l.useRef(y), V = l.useRef(u ?? -1), W = l.useRef(null), ee = l.useRef(!0), U = X((Y) => {
|
|
5685
5685
|
a(V.current === -1 ? null : V.current, Y);
|
|
5686
|
-
}), ue = l.useRef(U), ge = l.useRef(!!o), te = l.useRef(r), j = l.useRef(!1), q = l.useRef(!1), de = Ve(
|
|
5686
|
+
}), ue = l.useRef(U), ge = l.useRef(!!o), te = l.useRef(r), j = l.useRef(!1), q = l.useRef(!1), de = Ve(E), ne = Ve(r), A = Ve(T), Q = Ve(u), Z = Ve(M), xe = X(() => {
|
|
5687
5687
|
function Y(le) {
|
|
5688
|
-
|
|
5688
|
+
w ? k?.events.emit("virtualfocus", le) : Pn(le, {
|
|
5689
5689
|
sync: j.current,
|
|
5690
5690
|
preventScroll: !0
|
|
5691
5691
|
});
|
|
@@ -5726,13 +5726,13 @@ function Ff(e, t) {
|
|
|
5726
5726
|
} else rn(i, f) || (V.current = f, xe(), q.current = !1);
|
|
5727
5727
|
}
|
|
5728
5728
|
}, [d, r, o, f, Q, g, i, b, h, U, xe, de]), J(() => {
|
|
5729
|
-
if (!d || o || !k ||
|
|
5729
|
+
if (!d || o || !k || w || !ge.current)
|
|
5730
5730
|
return;
|
|
5731
5731
|
const Y = k.nodesRef.current, H = Y.find((le) => le.id === I)?.context?.elements.floating, $ = Ge(_e(o)), oe = Y.some((le) => le.context && me(le.context.elements.floating, $));
|
|
5732
5732
|
H && !oe && ee.current && H.focus({
|
|
5733
5733
|
preventScroll: !0
|
|
5734
5734
|
});
|
|
5735
|
-
}, [d, o, k, I,
|
|
5735
|
+
}, [d, o, k, I, w]), J(() => {
|
|
5736
5736
|
ue.current = U, te.current = r, ge.current = !!o;
|
|
5737
5737
|
}), J(() => {
|
|
5738
5738
|
r || (W.current = null, F.current = y);
|
|
@@ -5762,26 +5762,26 @@ function Ff(e, t) {
|
|
|
5762
5762
|
return;
|
|
5763
5763
|
j.current = !0;
|
|
5764
5764
|
const oe = $.relatedTarget;
|
|
5765
|
-
!v || i.current.includes(oe) || Z.current && (V.current = -1, U($),
|
|
5765
|
+
!v || i.current.includes(oe) || Z.current && (V.current = -1, U($), w || N.current?.focus({
|
|
5766
5766
|
preventScroll: !0
|
|
5767
5767
|
}));
|
|
5768
5768
|
}
|
|
5769
5769
|
};
|
|
5770
|
-
}, [ne, N, v, i, U, Z,
|
|
5770
|
+
}, [ne, N, v, i, U, Z, w]), K = l.useCallback(() => x ?? k?.nodesRef.current.find((Y) => Y.id === I)?.context?.dataRef?.current.orientation, [I, k, x]), ie = X((Y) => {
|
|
5771
5771
|
if (ee.current = !1, j.current = !0, Y.which === 229 || !ne.current && Y.currentTarget === N.current)
|
|
5772
5772
|
return;
|
|
5773
5773
|
if (g && Lf(Y.key, b, h, C)) {
|
|
5774
|
-
Tn(Y.key, K()) || He(Y), n.setOpen(!1, ve(In, Y.nativeEvent)), Pe(s) && (
|
|
5774
|
+
Tn(Y.key, K()) || He(Y), n.setOpen(!1, ve(In, Y.nativeEvent)), Pe(s) && (w ? k?.events.emit("virtualfocus", s) : s.focus());
|
|
5775
5775
|
return;
|
|
5776
5776
|
}
|
|
5777
|
-
const H = V.current, $ = ir(i,
|
|
5777
|
+
const H = V.current, $ = ir(i, E), oe = Vo(i, E);
|
|
5778
5778
|
if (O || (Y.key === "Home" && (He(Y), V.current = $, U(Y)), Y.key === "End" && (He(Y), V.current = oe, U(Y))), C > 1) {
|
|
5779
5779
|
const le = _ || Array.from({
|
|
5780
5780
|
length: i.current.length
|
|
5781
5781
|
}, () => ({
|
|
5782
5782
|
width: 1,
|
|
5783
5783
|
height: 1
|
|
5784
|
-
})), fe = Va(le, C, L), we = fe.findIndex((We) => We != null && !on(i, We,
|
|
5784
|
+
})), fe = Va(le, C, L), we = fe.findIndex((We) => We != null && !on(i, We, E)), Se = fe.reduce((We, Me, pe) => Me != null && !on(i, Me, E) ? pe : We, -1), ze = fe[Fa({
|
|
5785
5785
|
current: fe.map((We) => We != null ? i.current[We] : null)
|
|
5786
5786
|
}, {
|
|
5787
5787
|
event: Y,
|
|
@@ -5791,7 +5791,7 @@ function Ff(e, t) {
|
|
|
5791
5791
|
cols: C,
|
|
5792
5792
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
5793
5793
|
// don't end up in them
|
|
5794
|
-
disabledIndices: $a([...(typeof
|
|
5794
|
+
disabledIndices: $a([...(typeof E != "function" ? E : null) || i.current.map((We, Me) => on(i, Me, E) ? Me : void 0), void 0], fe),
|
|
5795
5795
|
minIndex: we,
|
|
5796
5796
|
maxIndex: Se,
|
|
5797
5797
|
prevIndex: Ba(
|
|
@@ -5811,33 +5811,33 @@ function Ff(e, t) {
|
|
|
5811
5811
|
return;
|
|
5812
5812
|
}
|
|
5813
5813
|
if (Tn(Y.key, b)) {
|
|
5814
|
-
if (He(Y), r && !
|
|
5814
|
+
if (He(Y), r && !w && Ge(Y.currentTarget.ownerDocument) === Y.currentTarget) {
|
|
5815
5815
|
V.current = vr(Y.key, b, h) ? $ : oe, U(Y);
|
|
5816
5816
|
return;
|
|
5817
5817
|
}
|
|
5818
5818
|
vr(Y.key, b, h) ? m ? H >= oe ? p && H !== i.current.length ? V.current = -1 : (j.current = !1, V.current = $) : V.current = $e(i, {
|
|
5819
5819
|
startingIndex: H,
|
|
5820
|
-
disabledIndices:
|
|
5820
|
+
disabledIndices: E
|
|
5821
5821
|
}) : V.current = Math.min(oe, $e(i, {
|
|
5822
5822
|
startingIndex: H,
|
|
5823
|
-
disabledIndices:
|
|
5823
|
+
disabledIndices: E
|
|
5824
5824
|
})) : m ? H <= $ ? p && H !== -1 ? V.current = i.current.length : (j.current = !1, V.current = oe) : V.current = $e(i, {
|
|
5825
5825
|
startingIndex: H,
|
|
5826
5826
|
decrement: !0,
|
|
5827
|
-
disabledIndices:
|
|
5827
|
+
disabledIndices: E
|
|
5828
5828
|
}) : V.current = Math.max($, $e(i, {
|
|
5829
5829
|
startingIndex: H,
|
|
5830
5830
|
decrement: !0,
|
|
5831
|
-
disabledIndices:
|
|
5831
|
+
disabledIndices: E
|
|
5832
5832
|
})), rn(i, V.current) && (V.current = -1), U(Y);
|
|
5833
5833
|
}
|
|
5834
|
-
}), re = l.useMemo(() =>
|
|
5834
|
+
}), re = l.useMemo(() => w && r && se && {
|
|
5835
5835
|
"aria-activedescendant": `${B}-${f}`
|
|
5836
|
-
}, [
|
|
5836
|
+
}, [w, r, se, B, f]), he = l.useMemo(() => ({
|
|
5837
5837
|
"aria-orientation": b === "both" ? void 0 : b,
|
|
5838
5838
|
...O ? {} : re,
|
|
5839
5839
|
onKeyDown(Y) {
|
|
5840
|
-
if (Y.key === "Tab" && Y.shiftKey && r && !
|
|
5840
|
+
if (Y.key === "Tab" && Y.shiftKey && r && !w) {
|
|
5841
5841
|
const H = Le(Y.nativeEvent);
|
|
5842
5842
|
if (H && !me(N.current, H))
|
|
5843
5843
|
return;
|
|
@@ -5849,9 +5849,9 @@ function Ff(e, t) {
|
|
|
5849
5849
|
onPointerMove() {
|
|
5850
5850
|
ee.current = !0;
|
|
5851
5851
|
}
|
|
5852
|
-
}), [re, ie, N, b, O, n, r,
|
|
5852
|
+
}), [re, ie, N, b, O, n, r, w, s]), z = l.useMemo(() => {
|
|
5853
5853
|
function Y($) {
|
|
5854
|
-
y === "auto" && Ls($.nativeEvent) && (F.current = !
|
|
5854
|
+
y === "auto" && Ls($.nativeEvent) && (F.current = !w);
|
|
5855
5855
|
}
|
|
5856
5856
|
function H($) {
|
|
5857
5857
|
F.current = y, y === "auto" && Fs($.nativeEvent) && (F.current = !0);
|
|
@@ -5861,7 +5861,7 @@ function Ff(e, t) {
|
|
|
5861
5861
|
const oe = n.select("open");
|
|
5862
5862
|
ee.current = !1;
|
|
5863
5863
|
const le = $.key.startsWith("Arrow"), fe = Af($.key, K(), h), we = Tn($.key, b), Se = (g ? fe : we) || $.key === "Enter" || $.key.trim() === "";
|
|
5864
|
-
if (
|
|
5864
|
+
if (w && oe)
|
|
5865
5865
|
return ie($);
|
|
5866
5866
|
if (!(!oe && !R && le)) {
|
|
5867
5867
|
if (Se) {
|
|
@@ -5876,14 +5876,14 @@ function Ff(e, t) {
|
|
|
5876
5876
|
}
|
|
5877
5877
|
},
|
|
5878
5878
|
onFocus($) {
|
|
5879
|
-
n.select("open") && !
|
|
5879
|
+
n.select("open") && !w && (V.current = -1, U($));
|
|
5880
5880
|
},
|
|
5881
5881
|
onPointerDown: H,
|
|
5882
5882
|
onPointerEnter: H,
|
|
5883
5883
|
onMouseDown: Y,
|
|
5884
5884
|
onClick: Y
|
|
5885
5885
|
};
|
|
5886
|
-
}, [ie, de, y, i, g, U, n, R, b, K, h, Q,
|
|
5886
|
+
}, [ie, de, y, i, g, U, n, R, b, K, h, Q, w]), ae = l.useMemo(() => ({
|
|
5887
5887
|
...re,
|
|
5888
5888
|
...z
|
|
5889
5889
|
}), [re, z]);
|
|
@@ -5914,7 +5914,7 @@ function ki(e, t = {}) {
|
|
|
5914
5914
|
...f === "combobox" && {
|
|
5915
5915
|
"aria-autocomplete": "list"
|
|
5916
5916
|
}
|
|
5917
|
-
}, [p, g, f]),
|
|
5917
|
+
}, [p, g, f]), w = l.useMemo(() => p === "tooltip" || f === "label" ? {
|
|
5918
5918
|
[`aria-${f === "label" ? "labelledby" : "describedby"}`]: r ? u : void 0
|
|
5919
5919
|
} : {
|
|
5920
5920
|
...h,
|
|
@@ -5938,7 +5938,7 @@ function ki(e, t = {}) {
|
|
|
5938
5938
|
};
|
|
5939
5939
|
}, [p, u, d, f]), v = l.useCallback(({
|
|
5940
5940
|
active: R,
|
|
5941
|
-
selected:
|
|
5941
|
+
selected: E
|
|
5942
5942
|
}) => {
|
|
5943
5943
|
const b = {
|
|
5944
5944
|
role: "option",
|
|
@@ -5951,17 +5951,17 @@ function ki(e, t = {}) {
|
|
|
5951
5951
|
case "combobox":
|
|
5952
5952
|
return {
|
|
5953
5953
|
...b,
|
|
5954
|
-
"aria-selected":
|
|
5954
|
+
"aria-selected": E
|
|
5955
5955
|
};
|
|
5956
5956
|
}
|
|
5957
5957
|
return {};
|
|
5958
5958
|
}, [u, f]);
|
|
5959
5959
|
return l.useMemo(() => i ? {
|
|
5960
|
-
reference:
|
|
5960
|
+
reference: w,
|
|
5961
5961
|
floating: y,
|
|
5962
5962
|
item: v,
|
|
5963
5963
|
trigger: h
|
|
5964
|
-
} : {}, [i,
|
|
5964
|
+
} : {}, [i, w, y, h, v]);
|
|
5965
5965
|
}
|
|
5966
5966
|
function Bf(e, t) {
|
|
5967
5967
|
const n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), o = n.context.dataRef, {
|
|
@@ -5974,11 +5974,11 @@ function Bf(e, t) {
|
|
|
5974
5974
|
resetMs: u = 750,
|
|
5975
5975
|
ignoreKeys: p = Wn,
|
|
5976
5976
|
selectedIndex: m = null
|
|
5977
|
-
} = t, g = et(), h = l.useRef(""),
|
|
5977
|
+
} = t, g = et(), h = l.useRef(""), w = l.useRef(m ?? c ?? -1), y = l.useRef(null);
|
|
5978
5978
|
J(() => {
|
|
5979
5979
|
r && (g.clear(), y.current = null, h.current = "");
|
|
5980
5980
|
}, [r, g]), J(() => {
|
|
5981
|
-
r && h.current === "" && (
|
|
5981
|
+
r && h.current === "" && (w.current = m ?? c ?? -1);
|
|
5982
5982
|
}, [r, m, c]);
|
|
5983
5983
|
const v = X((x) => {
|
|
5984
5984
|
x ? o.current.typing || (o.current.typing = x, f?.(x)) : o.current.typing && (o.current.typing = x, f?.(x));
|
|
@@ -5992,12 +5992,12 @@ function Bf(e, t) {
|
|
|
5992
5992
|
x.key.length !== 1 || // Modifier key.
|
|
5993
5993
|
x.ctrlKey || x.metaKey || x.altKey)
|
|
5994
5994
|
return;
|
|
5995
|
-
r && x.key !== " " && (He(x), v(!0)), T.every((M) => M ? M[0]?.toLocaleLowerCase() !== M[1]?.toLocaleLowerCase() : !0) && h.current === x.key && (h.current = "",
|
|
5996
|
-
h.current = "",
|
|
5995
|
+
r && x.key !== " " && (He(x), v(!0)), T.every((M) => M ? M[0]?.toLocaleLowerCase() !== M[1]?.toLocaleLowerCase() : !0) && h.current === x.key && (h.current = "", w.current = y.current), h.current += x.key, g.start(u, () => {
|
|
5996
|
+
h.current = "", w.current = y.current, v(!1);
|
|
5997
5997
|
});
|
|
5998
|
-
const L =
|
|
5998
|
+
const L = w.current, B = C(T, [...T.slice((L || 0) + 1), ...T.slice(0, (L || 0) + 1)], h.current);
|
|
5999
5999
|
B !== -1 ? (i?.(B), y.current = B) : x.key !== " " && (h.current = "", v(!1));
|
|
6000
|
-
}),
|
|
6000
|
+
}), E = l.useMemo(() => ({
|
|
6001
6001
|
onKeyDown: R
|
|
6002
6002
|
}), [R]), b = l.useMemo(() => ({
|
|
6003
6003
|
onKeyDown: R,
|
|
@@ -6006,9 +6006,9 @@ function Bf(e, t) {
|
|
|
6006
6006
|
}
|
|
6007
6007
|
}), [R, v]);
|
|
6008
6008
|
return l.useMemo(() => a ? {
|
|
6009
|
-
reference:
|
|
6009
|
+
reference: E,
|
|
6010
6010
|
floating: b
|
|
6011
|
-
} : {}, [a,
|
|
6011
|
+
} : {}, [a, E, b]);
|
|
6012
6012
|
}
|
|
6013
6013
|
function gs(e, t) {
|
|
6014
6014
|
const [n, r] = e;
|
|
@@ -6034,7 +6034,7 @@ function Hf(e = {}) {
|
|
|
6034
6034
|
const m = performance.now(), g = m - f;
|
|
6035
6035
|
if (c === null || i === null || g === 0)
|
|
6036
6036
|
return c = u, i = p, f = m, null;
|
|
6037
|
-
const h = u - c,
|
|
6037
|
+
const h = u - c, w = p - i, v = Math.sqrt(h * h + w * w) / g;
|
|
6038
6038
|
return c = u, i = p, f = m, v;
|
|
6039
6039
|
}
|
|
6040
6040
|
const d = ({
|
|
@@ -6043,10 +6043,10 @@ function Hf(e = {}) {
|
|
|
6043
6043
|
placement: m,
|
|
6044
6044
|
elements: g,
|
|
6045
6045
|
onClose: h,
|
|
6046
|
-
nodeId:
|
|
6046
|
+
nodeId: w,
|
|
6047
6047
|
tree: y
|
|
6048
6048
|
}) => function(R) {
|
|
6049
|
-
function
|
|
6049
|
+
function E() {
|
|
6050
6050
|
o.clear(), h();
|
|
6051
6051
|
}
|
|
6052
6052
|
if (o.clear(), !g.domReference || !g.floating || m == null || u == null || p == null)
|
|
@@ -6061,12 +6061,12 @@ function Hf(e = {}) {
|
|
|
6061
6061
|
s = !0;
|
|
6062
6062
|
return;
|
|
6063
6063
|
}
|
|
6064
|
-
if (_ && Re(R.relatedTarget) && me(g.floating, R.relatedTarget) || y && It(y.nodesRef.current,
|
|
6064
|
+
if (_ && Re(R.relatedTarget) && me(g.floating, R.relatedTarget) || y && It(y.nodesRef.current, w).some(({
|
|
6065
6065
|
context: te
|
|
6066
6066
|
}) => te?.open))
|
|
6067
6067
|
return;
|
|
6068
6068
|
if (P === "top" && p >= M.bottom - 1 || P === "bottom" && p <= M.top + 1 || P === "left" && u >= M.right - 1 || P === "right" && u <= M.left + 1)
|
|
6069
|
-
return
|
|
6069
|
+
return E();
|
|
6070
6070
|
let ue = [];
|
|
6071
6071
|
switch (P) {
|
|
6072
6072
|
case "top":
|
|
@@ -6106,13 +6106,13 @@ function Hf(e = {}) {
|
|
|
6106
6106
|
}
|
|
6107
6107
|
if (!gs([b, x], ue)) {
|
|
6108
6108
|
if (s && !k)
|
|
6109
|
-
return
|
|
6109
|
+
return E();
|
|
6110
6110
|
if (!_ && r) {
|
|
6111
6111
|
const te = a(R.clientX, R.clientY);
|
|
6112
6112
|
if (te !== null && te < 0.1)
|
|
6113
|
-
return
|
|
6113
|
+
return E();
|
|
6114
6114
|
}
|
|
6115
|
-
gs([b, x], ge([u, p])) ? !s && r && o.start(40,
|
|
6115
|
+
gs([b, x], ge([u, p])) ? !s && r && o.start(40, E) : E();
|
|
6116
6116
|
}
|
|
6117
6117
|
};
|
|
6118
6118
|
return d.__options = {
|
|
@@ -6146,10 +6146,10 @@ const Uf = (e) => ({
|
|
|
6146
6146
|
const p = Bs(d), m = {
|
|
6147
6147
|
x: n,
|
|
6148
6148
|
y: r
|
|
6149
|
-
}, g = Yr(o), h = jr(g),
|
|
6150
|
-
let T = i.floating[
|
|
6151
|
-
(!T || !await c.isElement?.(C)) && (T = i.floating[
|
|
6152
|
-
const _ = b / 2 - x / 2, L = T / 2 -
|
|
6149
|
+
}, g = Yr(o), h = jr(g), w = await c.getDimensions(a), y = g === "y", v = y ? "top" : "left", R = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", b = s.reference[h] + s.reference[g] - m[g] - s.floating[h], x = m[g] - s.reference[g], C = u === "real" ? await c.getOffsetParent?.(a) : i.floating;
|
|
6150
|
+
let T = i.floating[E] || s.floating[h];
|
|
6151
|
+
(!T || !await c.isElement?.(C)) && (T = i.floating[E] || s.floating[h]);
|
|
6152
|
+
const _ = b / 2 - x / 2, L = T / 2 - w[h] / 2 - 1, B = Math.min(p[v], L), M = Math.min(p[R], L), S = B, P = T - w[h] - M, N = T / 2 - w[h] / 2 + _, I = Cr(S, N, P), k = !f.arrow && St(o) != null && N !== I && s.reference[h] / 2 - (N < S ? B : M) - w[h] / 2 < 0, O = k ? N < S ? N - S : N - P : 0;
|
|
6153
6153
|
return {
|
|
6154
6154
|
[g]: m[g] + O,
|
|
6155
6155
|
data: {
|
|
@@ -6230,11 +6230,11 @@ function Gf(e) {
|
|
|
6230
6230
|
floatingRootContext: m,
|
|
6231
6231
|
mounted: g,
|
|
6232
6232
|
collisionAvoidance: h,
|
|
6233
|
-
shiftCrossAxis:
|
|
6233
|
+
shiftCrossAxis: w = !1,
|
|
6234
6234
|
nodeId: y,
|
|
6235
6235
|
adaptiveOrigin: v,
|
|
6236
6236
|
lazyFlip: R = !1,
|
|
6237
|
-
externalTree:
|
|
6237
|
+
externalTree: E
|
|
6238
6238
|
} = e, [b, x] = l.useState(null);
|
|
6239
6239
|
!g && b !== null && x(null);
|
|
6240
6240
|
const C = h.side || "flip", T = h.align || "flip", _ = h.fallbackAxisSide || "end", L = typeof t == "function" ? t : void 0, B = X(L), M = L ? B : t, S = Ve(t), N = Li() === "rtl", I = b || {
|
|
@@ -6268,7 +6268,7 @@ function Gf(e) {
|
|
|
6268
6268
|
crossAxis: Be,
|
|
6269
6269
|
alignmentAxis: Be
|
|
6270
6270
|
};
|
|
6271
|
-
}, [typeof o != "function" ? o : 0, typeof c != "function" ? c : 0, N, r])], A = T === "none" && C !== "shift", Q = !A && (a ||
|
|
6271
|
+
}, [typeof o != "function" ? o : 0, typeof c != "function" ? c : 0, N, r])], A = T === "none" && C !== "shift", Q = !A && (a || w || C === "shift"), Z = C === "none" ? null : Vu({
|
|
6272
6272
|
...ue,
|
|
6273
6273
|
// Ensure the popup flips if it's been limited by its --available-height and it resizes.
|
|
6274
6274
|
// Since the size() padding is smaller than the flip() padding, flip() will take precedence.
|
|
@@ -6278,7 +6278,7 @@ function Gf(e) {
|
|
|
6278
6278
|
bottom: O.bottom + F,
|
|
6279
6279
|
left: O.left + F
|
|
6280
6280
|
},
|
|
6281
|
-
mainAxis: !
|
|
6281
|
+
mainAxis: !w && C === "flip",
|
|
6282
6282
|
crossAxis: T === "flip" ? "alignment" : !1,
|
|
6283
6283
|
fallbackAxisSideDirection: _
|
|
6284
6284
|
}), xe = A ? null : Lu((Oe) => {
|
|
@@ -6287,7 +6287,7 @@ function Gf(e) {
|
|
|
6287
6287
|
...ue,
|
|
6288
6288
|
// Use the Layout Viewport to avoid shifting around when pinch-zooming
|
|
6289
6289
|
// for context menus.
|
|
6290
|
-
rootBoundary:
|
|
6290
|
+
rootBoundary: w ? {
|
|
6291
6291
|
x: 0,
|
|
6292
6292
|
y: 0,
|
|
6293
6293
|
width: Ne.clientWidth,
|
|
@@ -6295,7 +6295,7 @@ function Gf(e) {
|
|
|
6295
6295
|
} : void 0,
|
|
6296
6296
|
mainAxis: T !== "none",
|
|
6297
6297
|
crossAxis: Q,
|
|
6298
|
-
limiter: a ||
|
|
6298
|
+
limiter: a || w ? void 0 : Fu((Ke) => {
|
|
6299
6299
|
if (!ge.current)
|
|
6300
6300
|
return {};
|
|
6301
6301
|
const {
|
|
@@ -6307,7 +6307,7 @@ function Gf(e) {
|
|
|
6307
6307
|
};
|
|
6308
6308
|
})
|
|
6309
6309
|
};
|
|
6310
|
-
}, [ue, a,
|
|
6310
|
+
}, [ue, a, w, O, T]);
|
|
6311
6311
|
C === "shift" || T === "shift" || s === "center" ? ne.push(xe, Z) : ne.push(Z, xe), ne.push(Bu({
|
|
6312
6312
|
...ue,
|
|
6313
6313
|
apply({
|
|
@@ -6380,7 +6380,7 @@ function Gf(e) {
|
|
|
6380
6380
|
strategy: n,
|
|
6381
6381
|
whileElementsMounted: p ? void 0 : (...Oe) => rs(...Oe, se),
|
|
6382
6382
|
nodeId: y,
|
|
6383
|
-
externalTree:
|
|
6383
|
+
externalTree: E
|
|
6384
6384
|
}), {
|
|
6385
6385
|
sideX: oe,
|
|
6386
6386
|
sideY: le
|
|
@@ -6644,7 +6644,7 @@ const dn = Ue.forwardRef(
|
|
|
6644
6644
|
default: void 0,
|
|
6645
6645
|
round: "memori-button--round",
|
|
6646
6646
|
circle: "memori-button--circle"
|
|
6647
|
-
}[c],
|
|
6647
|
+
}[c], E = u || r, b = r ? /* @__PURE__ */ D(
|
|
6648
6648
|
Br,
|
|
6649
6649
|
{
|
|
6650
6650
|
className: "memori-button__spinner",
|
|
@@ -6655,7 +6655,7 @@ const dn = Ue.forwardRef(
|
|
|
6655
6655
|
Vi,
|
|
6656
6656
|
{
|
|
6657
6657
|
ref: h,
|
|
6658
|
-
disabled:
|
|
6658
|
+
disabled: E,
|
|
6659
6659
|
focusableWhenDisabled: r,
|
|
6660
6660
|
className: ye(
|
|
6661
6661
|
"memori-button",
|
|
@@ -6663,7 +6663,7 @@ const dn = Ue.forwardRef(
|
|
|
6663
6663
|
v,
|
|
6664
6664
|
R,
|
|
6665
6665
|
n && "memori-button--full-width",
|
|
6666
|
-
|
|
6666
|
+
E && "memori-button--disabled",
|
|
6667
6667
|
r && "memori-button--loading",
|
|
6668
6668
|
i && "memori-button--active",
|
|
6669
6669
|
!x && b && "memori-button--icon-only",
|
|
@@ -6733,12 +6733,12 @@ function Qf(e) {
|
|
|
6733
6733
|
}, h] = l.useState({
|
|
6734
6734
|
height: void 0,
|
|
6735
6735
|
width: void 0
|
|
6736
|
-
}),
|
|
6736
|
+
}), w = Lt(), [y, v] = l.useState(), R = y ?? w, [E, b] = l.useState(!1), [x, C] = l.useState(!1), T = l.useRef(null), _ = l.useRef(null), L = l.useRef(null), B = l.useRef(null), M = ri(B, !1), S = X((P) => {
|
|
6737
6737
|
const N = !c, I = ve(Rt, P.nativeEvent);
|
|
6738
6738
|
if (r(N, I), I.isCanceled)
|
|
6739
6739
|
return;
|
|
6740
6740
|
const k = B.current;
|
|
6741
|
-
_.current === "css-animation" && k != null && k.style.removeProperty("animation-name"), !
|
|
6741
|
+
_.current === "css-animation" && k != null && k.style.removeProperty("animation-name"), !E && !x && (_.current != null && _.current !== "css-animation" && !f && N && a(!0), _.current === "css-animation" && (!u && N && p(!0), !f && N && a(!0))), i(N), _.current === "none" && f && !N && a(!1);
|
|
6742
6742
|
});
|
|
6743
6743
|
return J(() => {
|
|
6744
6744
|
s && _.current === "none" && !x && !c && a(!1);
|
|
@@ -6854,7 +6854,7 @@ const sd = {
|
|
|
6854
6854
|
disabled: a,
|
|
6855
6855
|
focusableWhenDisabled: !0,
|
|
6856
6856
|
native: p
|
|
6857
|
-
}),
|
|
6857
|
+
}), w = l.useMemo(() => ({
|
|
6858
6858
|
"aria-controls": o ? r : void 0,
|
|
6859
6859
|
"aria-expanded": o,
|
|
6860
6860
|
disabled: a,
|
|
@@ -6863,7 +6863,7 @@ const sd = {
|
|
|
6863
6863
|
return Te("button", t, {
|
|
6864
6864
|
state: c,
|
|
6865
6865
|
ref: [n, h],
|
|
6866
|
-
props: [
|
|
6866
|
+
props: [w, m, g],
|
|
6867
6867
|
stateAttributesMapping: sd
|
|
6868
6868
|
});
|
|
6869
6869
|
});
|
|
@@ -6896,11 +6896,11 @@ function cd(e) {
|
|
|
6896
6896
|
setDimensions: m,
|
|
6897
6897
|
setMounted: g,
|
|
6898
6898
|
setOpen: h,
|
|
6899
|
-
setVisible:
|
|
6899
|
+
setVisible: w,
|
|
6900
6900
|
transitionDimensionRef: y,
|
|
6901
6901
|
visible: v,
|
|
6902
6902
|
width: R
|
|
6903
|
-
} = e,
|
|
6903
|
+
} = e, E = l.useRef(!1), b = l.useRef(null), x = l.useRef(d), C = l.useRef(d), T = gn(), _ = l.useMemo(() => n.current === "css-animation" ? !v : !d && !f, [d, f, v, n]), L = X((M) => {
|
|
6904
6904
|
if (!M)
|
|
6905
6905
|
return;
|
|
6906
6906
|
if (n.current == null || y.current == null) {
|
|
@@ -6984,10 +6984,10 @@ function cd(e) {
|
|
|
6984
6984
|
M && (b.current = M.style.animationName || b.current, M.style.setProperty("animation-name", "none"), m({
|
|
6985
6985
|
height: M.scrollHeight,
|
|
6986
6986
|
width: M.scrollWidth
|
|
6987
|
-
}), !x.current && !
|
|
6988
|
-
g(!1),
|
|
6987
|
+
}), !x.current && !E.current && M.style.removeProperty("animation-name"), d ? (t.current != null && (t.current.abort(), t.current = null), g(!0), w(!0)) : (t.current = new AbortController(), p(() => {
|
|
6988
|
+
g(!1), w(!1), t.current = null;
|
|
6989
6989
|
}, t.current.signal)));
|
|
6990
|
-
}, [t, n, d, u, p, m, g,
|
|
6990
|
+
}, [t, n, d, u, p, m, g, w, v]), Wr(() => {
|
|
6991
6991
|
const M = Ie.request(() => {
|
|
6992
6992
|
x.current = !1;
|
|
6993
6993
|
});
|
|
@@ -6999,11 +6999,11 @@ function cd(e) {
|
|
|
6999
6999
|
if (!M)
|
|
7000
7000
|
return;
|
|
7001
7001
|
let S = -1, P = -1;
|
|
7002
|
-
return d &&
|
|
7002
|
+
return d && E.current && (M.style.transitionDuration = "0s", m({
|
|
7003
7003
|
height: M.scrollHeight,
|
|
7004
7004
|
width: M.scrollWidth
|
|
7005
7005
|
}), S = Ie.request(() => {
|
|
7006
|
-
|
|
7006
|
+
E.current = !1, P = Ie.request(() => {
|
|
7007
7007
|
setTimeout(() => {
|
|
7008
7008
|
M.style.removeProperty("transition-duration");
|
|
7009
7009
|
});
|
|
@@ -7019,7 +7019,7 @@ function cd(e) {
|
|
|
7019
7019
|
if (!S)
|
|
7020
7020
|
return;
|
|
7021
7021
|
function P(N) {
|
|
7022
|
-
|
|
7022
|
+
E.current = !0, h(!0), a(!0, ve(so, N));
|
|
7023
7023
|
}
|
|
7024
7024
|
return S.addEventListener("beforematch", P), () => {
|
|
7025
7025
|
S.removeEventListener("beforematch", P);
|
|
@@ -7055,11 +7055,11 @@ const zi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
7055
7055
|
onOpenChange: m,
|
|
7056
7056
|
open: g,
|
|
7057
7057
|
panelId: h,
|
|
7058
|
-
panelRef:
|
|
7058
|
+
panelRef: w,
|
|
7059
7059
|
runOnceAnimationsFinish: y,
|
|
7060
7060
|
setDimensions: v,
|
|
7061
7061
|
setHiddenUntilFound: R,
|
|
7062
|
-
setKeepMounted:
|
|
7062
|
+
setKeepMounted: E,
|
|
7063
7063
|
setMounted: b,
|
|
7064
7064
|
setPanelIdState: x,
|
|
7065
7065
|
setOpen: C,
|
|
@@ -7078,8 +7078,8 @@ const zi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
7078
7078
|
}, [i, x]), J(() => {
|
|
7079
7079
|
R(P);
|
|
7080
7080
|
}, [R, P]), J(() => {
|
|
7081
|
-
|
|
7082
|
-
}, [
|
|
7081
|
+
E(N);
|
|
7082
|
+
}, [E, N]);
|
|
7083
7083
|
const {
|
|
7084
7084
|
props: I
|
|
7085
7085
|
} = cd({
|
|
@@ -7093,7 +7093,7 @@ const zi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
7093
7093
|
mounted: p,
|
|
7094
7094
|
onOpenChange: m,
|
|
7095
7095
|
open: g,
|
|
7096
|
-
panelRef:
|
|
7096
|
+
panelRef: w,
|
|
7097
7097
|
runOnceAnimationsFinish: y,
|
|
7098
7098
|
setDimensions: v,
|
|
7099
7099
|
setMounted: b,
|
|
@@ -7105,7 +7105,7 @@ const zi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
7105
7105
|
});
|
|
7106
7106
|
hn({
|
|
7107
7107
|
open: g && S === "idle",
|
|
7108
|
-
ref:
|
|
7108
|
+
ref: w,
|
|
7109
7109
|
onComplete() {
|
|
7110
7110
|
g && v({
|
|
7111
7111
|
height: void 0,
|
|
@@ -7118,7 +7118,7 @@ const zi = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
7118
7118
|
transitionStatus: S
|
|
7119
7119
|
}), [_, S]), O = Te("div", t, {
|
|
7120
7120
|
state: k,
|
|
7121
|
-
ref: [n,
|
|
7121
|
+
ref: [n, w],
|
|
7122
7122
|
props: [I, {
|
|
7123
7123
|
style: {
|
|
7124
7124
|
[Es.collapsiblePanelHeight]: u === void 0 ? "auto" : `${u}px`,
|
|
@@ -7148,26 +7148,26 @@ const ad = Ue.forwardRef(
|
|
|
7148
7148
|
id: m,
|
|
7149
7149
|
"aria-label": g,
|
|
7150
7150
|
"aria-labelledby": h,
|
|
7151
|
-
...
|
|
7151
|
+
...w
|
|
7152
7152
|
}, y) => {
|
|
7153
|
-
const [v, R] = Ue.useState(n),
|
|
7153
|
+
const [v, R] = Ue.useState(n), E = r !== void 0, b = E ? r : v, x = Ue.useCallback(
|
|
7154
7154
|
(L) => {
|
|
7155
|
-
|
|
7155
|
+
E || R(L), o?.(L);
|
|
7156
7156
|
},
|
|
7157
|
-
[
|
|
7157
|
+
[E, o]
|
|
7158
7158
|
), C = Ue.useId(), T = m || `collapsible-trigger-${C}`, _ = `collapsible-panel-${C}`;
|
|
7159
7159
|
return /* @__PURE__ */ be(
|
|
7160
7160
|
Ui,
|
|
7161
7161
|
{
|
|
7162
7162
|
ref: y,
|
|
7163
7163
|
defaultOpen: n,
|
|
7164
|
-
open:
|
|
7164
|
+
open: E ? r : void 0,
|
|
7165
7165
|
onOpenChange: x,
|
|
7166
7166
|
disabled: s,
|
|
7167
7167
|
className: ye("memori-collapsible", c),
|
|
7168
7168
|
style: a,
|
|
7169
7169
|
id: m,
|
|
7170
|
-
...
|
|
7170
|
+
...w,
|
|
7171
7171
|
children: [
|
|
7172
7172
|
/* @__PURE__ */ be(
|
|
7173
7173
|
Wi,
|
|
@@ -7290,7 +7290,7 @@ const ld = Ue.forwardRef(
|
|
|
7290
7290
|
hoverable: p = !1,
|
|
7291
7291
|
...m
|
|
7292
7292
|
}, g) => {
|
|
7293
|
-
const h = !!i || c === !0 || p === !0,
|
|
7293
|
+
const h = !!i || c === !0 || p === !0, w = h || c ? 0 : void 0, y = ye(
|
|
7294
7294
|
"memori-card",
|
|
7295
7295
|
r === "elevated" ? "memori-card--elevated" : "memori-card--outlined",
|
|
7296
7296
|
h && "memori-card--interactive",
|
|
@@ -7305,7 +7305,7 @@ const ld = Ue.forwardRef(
|
|
|
7305
7305
|
ref: g,
|
|
7306
7306
|
className: y,
|
|
7307
7307
|
style: n,
|
|
7308
|
-
tabIndex:
|
|
7308
|
+
tabIndex: w,
|
|
7309
7309
|
onClick: i,
|
|
7310
7310
|
...m,
|
|
7311
7311
|
children: [
|
|
@@ -7341,7 +7341,7 @@ const ud = l.forwardRef(
|
|
|
7341
7341
|
"aria-describedby": m,
|
|
7342
7342
|
"aria-labelledby": g
|
|
7343
7343
|
}, h) => {
|
|
7344
|
-
const
|
|
7344
|
+
const w = (v) => {
|
|
7345
7345
|
f?.(v, {
|
|
7346
7346
|
target: { checked: v },
|
|
7347
7347
|
currentTarget: { checked: v }
|
|
@@ -7356,7 +7356,7 @@ const ud = l.forwardRef(
|
|
|
7356
7356
|
required: o,
|
|
7357
7357
|
name: s,
|
|
7358
7358
|
value: c,
|
|
7359
|
-
onCheckedChange:
|
|
7359
|
+
onCheckedChange: w,
|
|
7360
7360
|
className: ye(
|
|
7361
7361
|
"memori-checkbox",
|
|
7362
7362
|
r && "memori-checkbox--disabled",
|
|
@@ -7520,7 +7520,7 @@ const nc = /* @__PURE__ */ new Set([Xi, Ji, Zi, Qi, ec, tc]), bd = {
|
|
|
7520
7520
|
...i
|
|
7521
7521
|
} = t, {
|
|
7522
7522
|
store: f
|
|
7523
|
-
} = Ot(), a = f.useState("descriptionElementId"), d = f.useState("disablePointerDismissal"), u = f.useState("floatingRootContext"), p = f.useState("popupProps"), m = f.useState("modal"), g = f.useState("mounted"), h = f.useState("nested"),
|
|
7523
|
+
} = Ot(), a = f.useState("descriptionElementId"), d = f.useState("disablePointerDismissal"), u = f.useState("floatingRootContext"), p = f.useState("popupProps"), m = f.useState("modal"), g = f.useState("mounted"), h = f.useState("nested"), w = f.useState("nestedOpenDialogCount"), y = f.useState("open"), v = f.useState("openMethod"), R = f.useState("titleElementId"), E = f.useState("transitionStatus"), b = f.useState("role");
|
|
7524
7524
|
qi(), hn({
|
|
7525
7525
|
open: y,
|
|
7526
7526
|
ref: f.context.popupRef,
|
|
@@ -7531,12 +7531,12 @@ const nc = /* @__PURE__ */ new Set([Xi, Ji, Zi, Qi, ec, tc]), bd = {
|
|
|
7531
7531
|
function x(B) {
|
|
7532
7532
|
return B === "touch" ? f.context.popupRef.current : !0;
|
|
7533
7533
|
}
|
|
7534
|
-
const C = s === void 0 ? x : s, T =
|
|
7534
|
+
const C = s === void 0 ? x : s, T = w > 0, _ = l.useMemo(() => ({
|
|
7535
7535
|
open: y,
|
|
7536
7536
|
nested: h,
|
|
7537
|
-
transitionStatus:
|
|
7537
|
+
transitionStatus: E,
|
|
7538
7538
|
nestedDialogOpen: T
|
|
7539
|
-
}), [y, h,
|
|
7539
|
+
}), [y, h, E, T]), L = Te("div", t, {
|
|
7540
7540
|
state: _,
|
|
7541
7541
|
props: [p, {
|
|
7542
7542
|
"aria-labelledby": R ?? void 0,
|
|
@@ -7548,7 +7548,7 @@ const nc = /* @__PURE__ */ new Set([Xi, Ji, Zi, Qi, ec, tc]), bd = {
|
|
|
7548
7548
|
nc.has(B.key) && B.stopPropagation();
|
|
7549
7549
|
},
|
|
7550
7550
|
style: {
|
|
7551
|
-
[dd.nestedDialogs]:
|
|
7551
|
+
[dd.nestedDialogs]: w
|
|
7552
7552
|
}
|
|
7553
7553
|
}, i],
|
|
7554
7554
|
ref: [n, f.context.popupRef, f.useStateSetter("popupElement")],
|
|
@@ -7644,7 +7644,7 @@ function Ed(e) {
|
|
|
7644
7644
|
return () => {
|
|
7645
7645
|
};
|
|
7646
7646
|
function a() {
|
|
7647
|
-
const p = o.getComputedStyle(n), m = o.getComputedStyle(r),
|
|
7647
|
+
const p = o.getComputedStyle(n), m = o.getComputedStyle(r), w = (p.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
|
|
7648
7648
|
s = n.scrollTop, c = n.scrollLeft, ws = {
|
|
7649
7649
|
scrollbarGutter: n.style.scrollbarGutter,
|
|
7650
7650
|
overflowY: n.style.overflowY,
|
|
@@ -7658,16 +7658,16 @@ function Ed(e) {
|
|
|
7658
7658
|
overflowX: r.style.overflowX,
|
|
7659
7659
|
scrollBehavior: r.style.scrollBehavior
|
|
7660
7660
|
};
|
|
7661
|
-
const y = n.scrollHeight > n.clientHeight, v = n.scrollWidth > n.clientWidth, R = p.overflowY === "scroll" || m.overflowY === "scroll",
|
|
7661
|
+
const y = n.scrollHeight > n.clientHeight, v = n.scrollWidth > n.clientWidth, R = p.overflowY === "scroll" || m.overflowY === "scroll", E = p.overflowX === "scroll" || m.overflowX === "scroll", b = Math.max(0, o.innerWidth - n.clientWidth), x = Math.max(0, o.innerHeight - n.clientHeight), C = parseFloat(m.marginTop) + parseFloat(m.marginBottom), T = parseFloat(m.marginLeft) + parseFloat(m.marginRight), _ = kt(n) ? n : r;
|
|
7662
7662
|
if (f) {
|
|
7663
|
-
n.style.scrollbarGutter =
|
|
7663
|
+
n.style.scrollbarGutter = w, _.style.overflowY = "hidden", _.style.overflowX = "hidden";
|
|
7664
7664
|
return;
|
|
7665
7665
|
}
|
|
7666
7666
|
Object.assign(n.style, {
|
|
7667
|
-
scrollbarGutter:
|
|
7667
|
+
scrollbarGutter: w,
|
|
7668
7668
|
overflowY: "hidden",
|
|
7669
7669
|
overflowX: "hidden"
|
|
7670
|
-
}), (y || R) && (n.style.overflowY = "scroll"), (v ||
|
|
7670
|
+
}), (y || R) && (n.style.overflowY = "scroll"), (v || E) && (n.style.overflowX = "scroll"), Object.assign(r.style, {
|
|
7671
7671
|
position: "relative",
|
|
7672
7672
|
height: C || x ? `calc(100dvh - ${C + x}px)` : "100dvh",
|
|
7673
7673
|
width: T || b ? `calc(100vw - ${T + b}px)` : "100vw",
|
|
@@ -7786,7 +7786,7 @@ function Sd(e) {
|
|
|
7786
7786
|
onOpenChange: t.setOpen,
|
|
7787
7787
|
treatPopupAsFloatingElement: !0,
|
|
7788
7788
|
noEmit: !0
|
|
7789
|
-
}), [h,
|
|
7789
|
+
}), [h, w] = l.useState(0), y = h === 0, v = ki(g), R = Si(g, {
|
|
7790
7790
|
outsidePressEvent() {
|
|
7791
7791
|
return t.context.internalBackdropRef.current || t.context.backdropRef.current ? "intentional" : {
|
|
7792
7792
|
mouse: c === "trap-focus" ? "sloppy" : "intentional",
|
|
@@ -7807,18 +7807,18 @@ function Sd(e) {
|
|
|
7807
7807
|
});
|
|
7808
7808
|
sc(o && c === !0, i);
|
|
7809
7809
|
const {
|
|
7810
|
-
getReferenceProps:
|
|
7810
|
+
getReferenceProps: E,
|
|
7811
7811
|
getFloatingProps: b,
|
|
7812
7812
|
getTriggerProps: x
|
|
7813
7813
|
} = ho([v, R]);
|
|
7814
7814
|
t.useContextCallback("onNestedDialogOpen", (L) => {
|
|
7815
|
-
|
|
7815
|
+
w(L + 1);
|
|
7816
7816
|
}), t.useContextCallback("onNestedDialogClose", () => {
|
|
7817
|
-
|
|
7817
|
+
w(0);
|
|
7818
7818
|
}), l.useEffect(() => (n?.onNestedDialogOpen && o && n.onNestedDialogOpen(h), n?.onNestedDialogClose && !o && n.onNestedDialogClose(), () => {
|
|
7819
7819
|
n?.onNestedDialogClose && o && n.onNestedDialogClose();
|
|
7820
7820
|
}), [o, n, h]);
|
|
7821
|
-
const C = l.useMemo(() =>
|
|
7821
|
+
const C = l.useMemo(() => E(a), [E, a]), T = l.useMemo(() => x(a), [x, a]), _ = l.useMemo(() => b(), [b]);
|
|
7822
7822
|
t.useSyncedValues({
|
|
7823
7823
|
openMethod: f,
|
|
7824
7824
|
activeTriggerProps: C,
|
|
@@ -7916,11 +7916,11 @@ function Nd(e) {
|
|
|
7916
7916
|
actionsRef: f,
|
|
7917
7917
|
parentContext: p?.store.context
|
|
7918
7918
|
});
|
|
7919
|
-
const
|
|
7919
|
+
const w = l.useMemo(() => ({
|
|
7920
7920
|
store: g
|
|
7921
7921
|
}), [g]);
|
|
7922
7922
|
return /* @__PURE__ */ D(Eo.Provider, {
|
|
7923
|
-
value:
|
|
7923
|
+
value: w,
|
|
7924
7924
|
children: typeof t == "function" ? t({
|
|
7925
7925
|
payload: h
|
|
7926
7926
|
}) : t
|
|
@@ -8004,11 +8004,11 @@ const lc = Ue.forwardRef(
|
|
|
8004
8004
|
widthMd: m,
|
|
8005
8005
|
widthLg: g,
|
|
8006
8006
|
centered: h = !0,
|
|
8007
|
-
modal:
|
|
8007
|
+
modal: w = !0,
|
|
8008
8008
|
disablePointerDismissal: y,
|
|
8009
8009
|
initialFocus: v,
|
|
8010
8010
|
finalFocus: R,
|
|
8011
|
-
onAfterOpen:
|
|
8011
|
+
onAfterOpen: E,
|
|
8012
8012
|
onAfterClose: b,
|
|
8013
8013
|
className: x,
|
|
8014
8014
|
backdropClassName: C,
|
|
@@ -8035,9 +8035,9 @@ const lc = Ue.forwardRef(
|
|
|
8035
8035
|
[t, n, d]
|
|
8036
8036
|
), ge = Ue.useCallback(
|
|
8037
8037
|
(ne) => {
|
|
8038
|
-
ne ?
|
|
8038
|
+
ne ? E?.() : b?.();
|
|
8039
8039
|
},
|
|
8040
|
-
[
|
|
8040
|
+
[E, b]
|
|
8041
8041
|
), te = y !== void 0 ? y : !a, j = {
|
|
8042
8042
|
...p && {
|
|
8043
8043
|
maxWidth: typeof p == "number" ? `${p}px` : p
|
|
@@ -8060,7 +8060,7 @@ const lc = Ue.forwardRef(
|
|
|
8060
8060
|
open: e,
|
|
8061
8061
|
onOpenChange: ue,
|
|
8062
8062
|
onOpenChangeComplete: ge,
|
|
8063
|
-
modal:
|
|
8063
|
+
modal: w,
|
|
8064
8064
|
disablePointerDismissal: te,
|
|
8065
8065
|
...ee,
|
|
8066
8066
|
children: /* @__PURE__ */ be(oc, { children: [
|
|
@@ -8192,21 +8192,21 @@ const Ep = ({
|
|
|
8192
8192
|
children: f,
|
|
8193
8193
|
mode: a = "rows"
|
|
8194
8194
|
}) => {
|
|
8195
|
-
const { i18n: d } = ra(), u = d.language, p = i(u), m = c(u), [g, h] = Bt(s), [
|
|
8195
|
+
const { i18n: d } = ra(), u = d.language, p = i(u), m = c(u), [g, h] = Bt(s), [w, y] = Bt(!1), [v, R] = Bt(16), E = Os(null);
|
|
8196
8196
|
_n(() => {
|
|
8197
|
-
if (
|
|
8197
|
+
if (E.current) {
|
|
8198
8198
|
if (a === "rows") {
|
|
8199
|
-
let x =
|
|
8199
|
+
let x = E.current.getBoundingClientRect().height, C = getComputedStyle(E.current), T = C.lineHeight, _ = T === "normal" || !T?.length ? o * parseInt(C.fontSize, 10) : parseInt(T, 10);
|
|
8200
8200
|
R(_), x && e && x > e * _ && y(!0);
|
|
8201
8201
|
} else if (a === "characters") {
|
|
8202
|
-
const x =
|
|
8202
|
+
const x = E.current.textContent || "";
|
|
8203
8203
|
(x.length > Ar || x.split(" ").length > Lr) && y(!0);
|
|
8204
8204
|
}
|
|
8205
8205
|
}
|
|
8206
|
-
}, [e, a,
|
|
8206
|
+
}, [e, a, E.current]);
|
|
8207
8207
|
const b = () => {
|
|
8208
|
-
if (a === "characters" && !g &&
|
|
8209
|
-
const x =
|
|
8208
|
+
if (a === "characters" && !g && w) {
|
|
8209
|
+
const x = E.current?.textContent || "";
|
|
8210
8210
|
return Id(x);
|
|
8211
8211
|
}
|
|
8212
8212
|
return f;
|
|
@@ -8215,15 +8215,15 @@ const Ep = ({
|
|
|
8215
8215
|
/* @__PURE__ */ D(
|
|
8216
8216
|
"div",
|
|
8217
8217
|
{
|
|
8218
|
-
ref:
|
|
8218
|
+
ref: E,
|
|
8219
8219
|
className: ye("memori-expandable__inner", n),
|
|
8220
8220
|
style: {
|
|
8221
|
-
maxHeight: g || !
|
|
8221
|
+
maxHeight: g || !w || a === "characters" ? "9999px" : `${v * (e || 1)}px`
|
|
8222
8222
|
},
|
|
8223
8223
|
children: b()
|
|
8224
8224
|
}
|
|
8225
8225
|
),
|
|
8226
|
-
|
|
8226
|
+
w && !g && /* @__PURE__ */ D(
|
|
8227
8227
|
dn,
|
|
8228
8228
|
{
|
|
8229
8229
|
variant: "ghost",
|
|
@@ -8232,7 +8232,7 @@ const Ep = ({
|
|
|
8232
8232
|
children: m
|
|
8233
8233
|
}
|
|
8234
8234
|
),
|
|
8235
|
-
|
|
8235
|
+
w && g && /* @__PURE__ */ D(
|
|
8236
8236
|
dn,
|
|
8237
8237
|
{
|
|
8238
8238
|
variant: "ghost",
|
|
@@ -8318,11 +8318,11 @@ function Dd(e) {
|
|
|
8318
8318
|
}
|
|
8319
8319
|
a.current && s.context.allowMouseUpTriggerRef.current && (!u || v.button === 2) && i.type === "regular-item" && a.current.click();
|
|
8320
8320
|
}
|
|
8321
|
-
}, y, m), [o, r, m, t, p, s, u, d, i, f]),
|
|
8321
|
+
}, y, m), [o, r, m, t, p, s, u, d, i, f]), w = Pt(a, g);
|
|
8322
8322
|
return l.useMemo(() => ({
|
|
8323
8323
|
getItemProps: h,
|
|
8324
|
-
itemRef:
|
|
8325
|
-
}), [h,
|
|
8324
|
+
itemRef: w
|
|
8325
|
+
}), [h, w]);
|
|
8326
8326
|
}
|
|
8327
8327
|
const Co = /* @__PURE__ */ l.createContext({
|
|
8328
8328
|
register: () => {
|
|
@@ -8365,7 +8365,7 @@ function dc(e = {}) {
|
|
|
8365
8365
|
u.current += 1, p.current = y;
|
|
8366
8366
|
}
|
|
8367
8367
|
return p.current;
|
|
8368
|
-
} : -1)), h = l.useRef(null),
|
|
8368
|
+
} : -1)), h = l.useRef(null), w = l.useCallback((y) => {
|
|
8369
8369
|
if (h.current = y, m !== -1 && y !== null && (a.current[m] = y, d)) {
|
|
8370
8370
|
const v = t !== void 0;
|
|
8371
8371
|
d.current[m] = v ? t : r?.current?.textContent ?? y.textContent;
|
|
@@ -8386,9 +8386,9 @@ function dc(e = {}) {
|
|
|
8386
8386
|
v != null && g(v);
|
|
8387
8387
|
});
|
|
8388
8388
|
}, [s, f, g]), l.useMemo(() => ({
|
|
8389
|
-
ref:
|
|
8389
|
+
ref: w,
|
|
8390
8390
|
index: m
|
|
8391
|
-
}), [m,
|
|
8391
|
+
}), [m, w]);
|
|
8392
8392
|
}
|
|
8393
8393
|
const Oo = /* @__PURE__ */ l.createContext(void 0);
|
|
8394
8394
|
process.env.NODE_ENV !== "production" && (Oo.displayName = "MenuGroupContext");
|
|
@@ -8454,7 +8454,7 @@ const gc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
8454
8454
|
label: c
|
|
8455
8455
|
}), p = uc(!0), m = Lt(s), {
|
|
8456
8456
|
store: g
|
|
8457
|
-
} = Ft(), h = g.useState("isActive", u.index),
|
|
8457
|
+
} = Ft(), h = g.useState("isActive", u.index), w = g.useState("itemProps"), {
|
|
8458
8458
|
getItemProps: y,
|
|
8459
8459
|
itemRef: v
|
|
8460
8460
|
} = Dd({
|
|
@@ -8472,7 +8472,7 @@ const gc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
8472
8472
|
}), [f, h]);
|
|
8473
8473
|
return Te("div", t, {
|
|
8474
8474
|
state: R,
|
|
8475
|
-
props: [
|
|
8475
|
+
props: [w, d, y],
|
|
8476
8476
|
ref: [v, n, u.ref]
|
|
8477
8477
|
});
|
|
8478
8478
|
});
|
|
@@ -8499,7 +8499,7 @@ const Vd = {
|
|
|
8499
8499
|
} = Ft(), {
|
|
8500
8500
|
side: f,
|
|
8501
8501
|
align: a
|
|
8502
|
-
} = uc(), d = Ld() != null, u = i.useState("open"), p = i.useState("transitionStatus"), m = i.useState("popupProps"), g = i.useState("mounted"), h = i.useState("instantType"),
|
|
8502
|
+
} = uc(), d = Ld() != null, u = i.useState("open"), p = i.useState("transitionStatus"), m = i.useState("popupProps"), g = i.useState("mounted"), h = i.useState("instantType"), w = i.useState("activeTriggerElement"), y = i.useState("parent"), v = i.useState("lastOpenChangeReason"), R = i.useState("rootId"), E = i.useState("floatingRootContext"), b = i.useState("floatingTreeRoot"), x = i.useState("closeDelay"), C = i.useState("activeTriggerElement");
|
|
8503
8503
|
hn({
|
|
8504
8504
|
open: u,
|
|
8505
8505
|
ref: i.context.popupRef,
|
|
@@ -8515,7 +8515,7 @@ const Vd = {
|
|
|
8515
8515
|
};
|
|
8516
8516
|
}, [b.events, i]);
|
|
8517
8517
|
const T = i.useState("hoverEnabled"), _ = i.useState("disabled");
|
|
8518
|
-
If(
|
|
8518
|
+
If(E, {
|
|
8519
8519
|
enabled: T && !_ && y.type !== "context-menu" && y.type !== "menubar",
|
|
8520
8520
|
closeDelay: x
|
|
8521
8521
|
});
|
|
@@ -8539,8 +8539,8 @@ const Vd = {
|
|
|
8539
8539
|
}]
|
|
8540
8540
|
});
|
|
8541
8541
|
let M = y.type === void 0 || y.type === "context-menu";
|
|
8542
|
-
return (
|
|
8543
|
-
context:
|
|
8542
|
+
return (w || y.type === "menubar" && v !== io) && (M = !0), /* @__PURE__ */ D(gi, {
|
|
8543
|
+
context: E,
|
|
8544
8544
|
modal: !1,
|
|
8545
8545
|
disabled: !g,
|
|
8546
8546
|
returnFocus: s === void 0 ? M : s,
|
|
@@ -8590,11 +8590,11 @@ function $d(e) {
|
|
|
8590
8590
|
f.delete(y), u.current += 1, d(u.current);
|
|
8591
8591
|
}), g = l.useMemo(() => {
|
|
8592
8592
|
const y = /* @__PURE__ */ new Map();
|
|
8593
|
-
return Array.from(f.keys()).filter((R) => R.isConnected).sort(Wd).forEach((R,
|
|
8593
|
+
return Array.from(f.keys()).filter((R) => R.isConnected).sort(Wd).forEach((R, E) => {
|
|
8594
8594
|
const b = f.get(R) ?? {};
|
|
8595
8595
|
y.set(R, {
|
|
8596
8596
|
...b,
|
|
8597
|
-
index:
|
|
8597
|
+
index: E
|
|
8598
8598
|
});
|
|
8599
8599
|
}), y;
|
|
8600
8600
|
}, [f, a]);
|
|
@@ -8602,9 +8602,9 @@ function $d(e) {
|
|
|
8602
8602
|
if (typeof MutationObserver != "function" || g.size === 0)
|
|
8603
8603
|
return;
|
|
8604
8604
|
const y = new MutationObserver((v) => {
|
|
8605
|
-
const R = /* @__PURE__ */ new Set(),
|
|
8605
|
+
const R = /* @__PURE__ */ new Set(), E = (b) => R.has(b) ? R.delete(b) : R.add(b);
|
|
8606
8606
|
v.forEach((b) => {
|
|
8607
|
-
b.removedNodes.forEach(
|
|
8607
|
+
b.removedNodes.forEach(E), b.addedNodes.forEach(E);
|
|
8608
8608
|
}), R.size === 0 && (u.current += 1, d(u.current));
|
|
8609
8609
|
});
|
|
8610
8610
|
return g.forEach((v, R) => {
|
|
@@ -8627,7 +8627,7 @@ function $d(e) {
|
|
|
8627
8627
|
J(() => {
|
|
8628
8628
|
i.forEach((y) => y(g));
|
|
8629
8629
|
}, [i, g]);
|
|
8630
|
-
const
|
|
8630
|
+
const w = l.useMemo(() => ({
|
|
8631
8631
|
register: p,
|
|
8632
8632
|
unregister: m,
|
|
8633
8633
|
subscribeMapChange: h,
|
|
@@ -8636,7 +8636,7 @@ function $d(e) {
|
|
|
8636
8636
|
nextIndexRef: c
|
|
8637
8637
|
}), [p, m, h, n, r, c]);
|
|
8638
8638
|
return /* @__PURE__ */ D(Co.Provider, {
|
|
8639
|
-
value:
|
|
8639
|
+
value: w,
|
|
8640
8640
|
children: t
|
|
8641
8641
|
});
|
|
8642
8642
|
}
|
|
@@ -8665,19 +8665,19 @@ const vc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
8665
8665
|
arrowPadding: m = 5,
|
|
8666
8666
|
sticky: g = !1,
|
|
8667
8667
|
disableAnchorTracking: h = !1,
|
|
8668
|
-
collisionAvoidance:
|
|
8668
|
+
collisionAvoidance: w = Rl,
|
|
8669
8669
|
...y
|
|
8670
8670
|
} = t, {
|
|
8671
8671
|
store: v
|
|
8672
|
-
} = Ft(), R = Bd(),
|
|
8673
|
-
let N = r, I = a, k = d, O = f, F =
|
|
8672
|
+
} = Ft(), R = Bd(), E = tr(!0), b = v.useState("parent"), x = v.useState("floatingRootContext"), C = v.useState("floatingTreeRoot"), T = v.useState("mounted"), _ = v.useState("open"), L = v.useState("modal"), B = v.useState("activeTriggerElement"), M = v.useState("lastOpenChangeReason"), S = v.useState("floatingNodeId"), P = v.useState("floatingParentNodeId");
|
|
8673
|
+
let N = r, I = a, k = d, O = f, F = w;
|
|
8674
8674
|
b.type === "context-menu" && (N = r ?? b.context?.anchor, O = O ?? "start", !i && O !== "center" && (k = t.alignOffset ?? 2, I = t.sideOffset ?? -5));
|
|
8675
8675
|
let V = i, W = O;
|
|
8676
8676
|
b.type === "menu" ? (V = V ?? "inline-end", W = W ?? "start", F = t.collisionAvoidance ?? xl) : b.type === "menubar" && (V = V ?? "bottom", W = W ?? "start");
|
|
8677
8677
|
const ee = b.type === "context-menu", U = Gf({
|
|
8678
8678
|
anchor: N,
|
|
8679
8679
|
floatingRootContext: x,
|
|
8680
|
-
positionMethod:
|
|
8680
|
+
positionMethod: E ? "fixed" : o,
|
|
8681
8681
|
mounted: T,
|
|
8682
8682
|
side: V,
|
|
8683
8683
|
sideOffset: I,
|
|
@@ -8899,25 +8899,25 @@ function jd(e) {
|
|
|
8899
8899
|
triggerId: m,
|
|
8900
8900
|
defaultTriggerId: g = null,
|
|
8901
8901
|
highlightItemOnHover: h = !0
|
|
8902
|
-
} = e,
|
|
8902
|
+
} = e, w = tr(!0), y = Ft(!0), v = wc(), R = Gd(), E = l.useMemo(() => R && y ? {
|
|
8903
8903
|
type: "menu",
|
|
8904
8904
|
store: y.store
|
|
8905
8905
|
} : v ? {
|
|
8906
8906
|
type: "menubar",
|
|
8907
8907
|
context: v
|
|
8908
|
-
} :
|
|
8908
|
+
} : w && !y ? {
|
|
8909
8909
|
type: "context-menu",
|
|
8910
|
-
context:
|
|
8910
|
+
context: w
|
|
8911
8911
|
} : {
|
|
8912
8912
|
type: void 0
|
|
8913
|
-
}, [
|
|
8914
|
-
parent:
|
|
8913
|
+
}, [w, y, v, R]), b = No.useStore(p?.store, {
|
|
8914
|
+
parent: E
|
|
8915
8915
|
}), x = b.useState("floatingTreeRoot"), C = ui(x), T = ht();
|
|
8916
8916
|
J(() => {
|
|
8917
|
-
|
|
8917
|
+
w && !y ? b.update({
|
|
8918
8918
|
parent: {
|
|
8919
8919
|
type: "context-menu",
|
|
8920
|
-
context:
|
|
8920
|
+
context: w
|
|
8921
8921
|
},
|
|
8922
8922
|
floatingNodeId: C,
|
|
8923
8923
|
floatingParentNodeId: T
|
|
@@ -8925,7 +8925,7 @@ function jd(e) {
|
|
|
8925
8925
|
floatingNodeId: C,
|
|
8926
8926
|
floatingParentNodeId: T
|
|
8927
8927
|
});
|
|
8928
|
-
}, [
|
|
8928
|
+
}, [w, y, C, T, b]), b.useControlledProp("open", n, s), b.useControlledProp("activeTriggerId", m, g), b.useContextCallback("onOpenChangeComplete", o);
|
|
8929
8929
|
const _ = b.useState("open"), L = b.useState("activeTriggerElement"), B = b.useState("positionerElement"), M = b.useState("hoverEnabled"), S = b.useState("modal"), P = b.useState("disabled"), N = b.useState("lastOpenChangeReason"), I = b.useState("parent"), k = b.useState("activeIndex"), O = b.useState("payload"), F = b.useState("floatingParentNodeId"), V = l.useRef(null), W = F != null;
|
|
8930
8930
|
let ee;
|
|
8931
8931
|
process.env.NODE_ENV !== "production" && I.type !== void 0 && i !== void 0 && console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."), b.useSyncedValues({
|
|
@@ -9105,8 +9105,8 @@ function jd(e) {
|
|
|
9105
9105
|
});
|
|
9106
9106
|
const We = l.useMemo(() => ({
|
|
9107
9107
|
store: b,
|
|
9108
|
-
parent:
|
|
9109
|
-
}), [b,
|
|
9108
|
+
parent: E
|
|
9109
|
+
}), [b, E]), Me = /* @__PURE__ */ D(So.Provider, {
|
|
9110
9110
|
value: We,
|
|
9111
9111
|
children: typeof t == "function" ? t({
|
|
9112
9112
|
payload: O
|
|
@@ -9224,10 +9224,10 @@ const Nn = 2, Sc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9224
9224
|
} = t, g = Ft(!0), h = u?.store ?? g?.store;
|
|
9225
9225
|
if (!h)
|
|
9226
9226
|
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle." : Fe(85));
|
|
9227
|
-
const
|
|
9227
|
+
const w = Lt(i), y = h.useState("isTriggerActive", w), v = h.useState("floatingRootContext"), R = h.useState("isOpenedByTrigger", w), E = l.useRef(null), b = Qd(), x = to(!0), C = Ct(), T = l.useMemo(() => C ?? new no(), [C]), _ = ui(T), L = ht(), {
|
|
9228
9228
|
registerTrigger: B,
|
|
9229
9229
|
isMountedByThisTrigger: M
|
|
9230
|
-
} = Rf(
|
|
9230
|
+
} = Rf(w, E, h, {
|
|
9231
9231
|
payload: p,
|
|
9232
9232
|
closeDelay: d,
|
|
9233
9233
|
parent: b,
|
|
@@ -9274,7 +9274,7 @@ const Nn = 2, Sc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9274
9274
|
delay: {
|
|
9275
9275
|
close: d
|
|
9276
9276
|
},
|
|
9277
|
-
triggerElementRef:
|
|
9277
|
+
triggerElementRef: E,
|
|
9278
9278
|
externalTree: T,
|
|
9279
9279
|
isActiveTrigger: y
|
|
9280
9280
|
}), U = Zd(R, h.select("lastOpenChangeReason")), ue = eu(v, {
|
|
@@ -9292,9 +9292,9 @@ const Nn = 2, Sc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9292
9292
|
}), j = ho([ue, ge]), q = b.type === "menubar", de = l.useMemo(() => ({
|
|
9293
9293
|
disabled: P,
|
|
9294
9294
|
open: R
|
|
9295
|
-
}), [P, R]), ne = h.useState("triggerProps", M), A = [k, n, I, B,
|
|
9295
|
+
}), [P, R]), ne = h.useState("triggerProps", M), A = [k, n, I, B, E], Q = [j.getReferenceProps(), ee ?? ke, ne, {
|
|
9296
9296
|
"aria-haspopup": "menu",
|
|
9297
|
-
id:
|
|
9297
|
+
id: w,
|
|
9298
9298
|
onMouseDown: (K) => {
|
|
9299
9299
|
if (h.select("open"))
|
|
9300
9300
|
return;
|
|
@@ -9318,7 +9318,7 @@ const Nn = 2, Sc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9318
9318
|
it.flushSync(() => {
|
|
9319
9319
|
h.setOpen(!1, ve(jt, K.nativeEvent, K.currentTarget));
|
|
9320
9320
|
});
|
|
9321
|
-
let re = nl(
|
|
9321
|
+
let re = nl(E.current);
|
|
9322
9322
|
for (; re !== null && me(ie, re) || re?.hasAttribute("aria-hidden"); ) {
|
|
9323
9323
|
const he = re;
|
|
9324
9324
|
if (re = qr(re), re === he)
|
|
@@ -9345,15 +9345,15 @@ const Nn = 2, Sc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9345
9345
|
children: [/* @__PURE__ */ D(ut, {
|
|
9346
9346
|
ref: Z,
|
|
9347
9347
|
onFocus: xe
|
|
9348
|
-
}, `${
|
|
9348
|
+
}, `${w}-pre-focus-guard`), /* @__PURE__ */ D(l.Fragment, {
|
|
9349
9349
|
children: G
|
|
9350
|
-
},
|
|
9350
|
+
}, w), /* @__PURE__ */ D(ut, {
|
|
9351
9351
|
ref: h.context.triggerFocusTargetRef,
|
|
9352
9352
|
onFocus: se
|
|
9353
|
-
}, `${
|
|
9353
|
+
}, `${w}-post-focus-guard`)]
|
|
9354
9354
|
}) : /* @__PURE__ */ D(l.Fragment, {
|
|
9355
9355
|
children: G
|
|
9356
|
-
},
|
|
9356
|
+
}, w);
|
|
9357
9357
|
});
|
|
9358
9358
|
process.env.NODE_ENV !== "production" && (Sc.displayName = "MenuTrigger");
|
|
9359
9359
|
function Zd(e, t) {
|
|
@@ -9568,45 +9568,47 @@ const Rp = Object.assign(Oc, {
|
|
|
9568
9568
|
onOpenChange: t,
|
|
9569
9569
|
onClose: n,
|
|
9570
9570
|
anchor: r = "right",
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9571
|
+
size: o = "sm",
|
|
9572
|
+
children: s,
|
|
9573
|
+
title: c,
|
|
9574
|
+
description: i,
|
|
9575
|
+
footer: f,
|
|
9576
|
+
loading: a,
|
|
9577
|
+
className: d,
|
|
9578
|
+
style: u,
|
|
9579
|
+
showCloseButton: p = !0,
|
|
9580
|
+
closable: m = !0,
|
|
9581
|
+
...g
|
|
9582
|
+
}, h) => {
|
|
9583
|
+
const w = (v, R) => {
|
|
9584
|
+
t?.(v, R), v || n?.(R);
|
|
9585
|
+
}, y = m !== void 0 ? m : p;
|
|
9585
9586
|
return /* @__PURE__ */ D(
|
|
9586
9587
|
Qt.Root,
|
|
9587
9588
|
{
|
|
9588
9589
|
open: e,
|
|
9589
|
-
onOpenChange:
|
|
9590
|
+
onOpenChange: w,
|
|
9590
9591
|
children: /* @__PURE__ */ be(Qt.Portal, { children: [
|
|
9591
9592
|
/* @__PURE__ */ D(Qt.Backdrop, { className: "memori-drawer__backdrop" }),
|
|
9592
9593
|
/* @__PURE__ */ be(
|
|
9593
9594
|
Qt.Popup,
|
|
9594
9595
|
{
|
|
9595
|
-
ref:
|
|
9596
|
+
ref: h,
|
|
9596
9597
|
className: ye(
|
|
9597
9598
|
"memori-drawer",
|
|
9598
9599
|
`memori-drawer--${r}`,
|
|
9599
|
-
|
|
9600
|
+
`memori-drawer--size-${o}`,
|
|
9601
|
+
d
|
|
9600
9602
|
),
|
|
9601
|
-
style:
|
|
9602
|
-
...
|
|
9603
|
+
style: u,
|
|
9604
|
+
...g,
|
|
9603
9605
|
children: [
|
|
9604
|
-
(
|
|
9606
|
+
(c || i || y) && /* @__PURE__ */ be("div", { className: "memori-drawer__header", children: [
|
|
9605
9607
|
/* @__PURE__ */ be("div", { children: [
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
+
c && /* @__PURE__ */ D("div", { className: "memori-drawer__title", children: c }),
|
|
9609
|
+
i && /* @__PURE__ */ D("div", { className: "memori-drawer__description", children: i })
|
|
9608
9610
|
] }),
|
|
9609
|
-
|
|
9611
|
+
y && /* @__PURE__ */ D(
|
|
9610
9612
|
Qt.Close,
|
|
9611
9613
|
{
|
|
9612
9614
|
className: "memori-drawer__close",
|
|
@@ -9615,14 +9617,14 @@ const Rp = Object.assign(Oc, {
|
|
|
9615
9617
|
}
|
|
9616
9618
|
)
|
|
9617
9619
|
] }),
|
|
9618
|
-
/* @__PURE__ */ D("div", { className: "memori-drawer__body", children:
|
|
9620
|
+
/* @__PURE__ */ D("div", { className: "memori-drawer__body", children: a ? /* @__PURE__ */ D("div", { className: "memori-drawer__loading", children: /* @__PURE__ */ D(
|
|
9619
9621
|
Br,
|
|
9620
9622
|
{
|
|
9621
9623
|
className: "memori-drawer__spinner",
|
|
9622
9624
|
"aria-label": "Loading"
|
|
9623
9625
|
}
|
|
9624
|
-
) }) :
|
|
9625
|
-
|
|
9626
|
+
) }) : s }),
|
|
9627
|
+
f && /* @__PURE__ */ D("div", { className: "memori-drawer__footer", children: f })
|
|
9626
9628
|
]
|
|
9627
9629
|
}
|
|
9628
9630
|
)
|
|
@@ -9824,13 +9826,13 @@ const Fc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9824
9826
|
state: p,
|
|
9825
9827
|
name: m,
|
|
9826
9828
|
disabled: g
|
|
9827
|
-
} = Fr(), h = g || f,
|
|
9829
|
+
} = Fr(), h = g || f, w = m ?? c, y = l.useMemo(() => ({
|
|
9828
9830
|
...p,
|
|
9829
9831
|
disabled: h
|
|
9830
9832
|
}), [p, h]), {
|
|
9831
9833
|
setTouched: v,
|
|
9832
9834
|
setDirty: R,
|
|
9833
|
-
validityData:
|
|
9835
|
+
validityData: E,
|
|
9834
9836
|
setFocused: b,
|
|
9835
9837
|
setFilled: x,
|
|
9836
9838
|
validationMode: C,
|
|
@@ -9854,7 +9856,7 @@ const Fc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9854
9856
|
});
|
|
9855
9857
|
return ip({
|
|
9856
9858
|
id: L,
|
|
9857
|
-
name:
|
|
9859
|
+
name: w,
|
|
9858
9860
|
commit: T.commit,
|
|
9859
9861
|
value: B,
|
|
9860
9862
|
getValue: () => T.inputRef.current?.value,
|
|
@@ -9865,7 +9867,7 @@ const Fc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9865
9867
|
props: [{
|
|
9866
9868
|
id: L,
|
|
9867
9869
|
disabled: h,
|
|
9868
|
-
name:
|
|
9870
|
+
name: w,
|
|
9869
9871
|
ref: T.inputRef,
|
|
9870
9872
|
"aria-labelledby": _,
|
|
9871
9873
|
...S ? {
|
|
@@ -9875,7 +9877,7 @@ const Fc = /* @__PURE__ */ l.forwardRef(function(t, n) {
|
|
|
9875
9877
|
},
|
|
9876
9878
|
onChange(I) {
|
|
9877
9879
|
const k = I.currentTarget.value;
|
|
9878
|
-
P(k, ve(so, I.nativeEvent)), R(k !==
|
|
9880
|
+
P(k, ve(so, I.nativeEvent)), R(k !== E.initialValue), x(k !== "");
|
|
9879
9881
|
},
|
|
9880
9882
|
onFocus() {
|
|
9881
9883
|
b(!0);
|
|
@@ -9977,19 +9979,28 @@ const ap = _t(
|
|
|
9977
9979
|
]
|
|
9978
9980
|
}
|
|
9979
9981
|
),
|
|
9980
|
-
/* @__PURE__ */ D(ct.Portal, {
|
|
9981
|
-
ct.
|
|
9982
|
+
/* @__PURE__ */ D(ct.Portal, { className: "memori-select__portal", children: /* @__PURE__ */ D(
|
|
9983
|
+
ct.Positioner,
|
|
9982
9984
|
{
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9985
|
+
className: "memori-select__positioner",
|
|
9986
|
+
sideOffset: 8,
|
|
9987
|
+
side: "bottom",
|
|
9988
|
+
align: "start",
|
|
9989
|
+
children: /* @__PURE__ */ D(ct.Popup, { className: "memori-select__popup", children: e.map((m) => /* @__PURE__ */ be(
|
|
9990
|
+
ct.Item,
|
|
9991
|
+
{
|
|
9992
|
+
value: m.value,
|
|
9993
|
+
disabled: m.disabled,
|
|
9994
|
+
className: "memori-select__item",
|
|
9995
|
+
children: [
|
|
9996
|
+
/* @__PURE__ */ D(ct.ItemText, { children: m.label }),
|
|
9997
|
+
/* @__PURE__ */ D(ct.ItemIndicator, { children: /* @__PURE__ */ D(Ts, { className: "memori-select__check-icon" }) })
|
|
9998
|
+
]
|
|
9999
|
+
},
|
|
10000
|
+
m.value
|
|
10001
|
+
)) })
|
|
10002
|
+
}
|
|
10003
|
+
) })
|
|
9993
10004
|
]
|
|
9994
10005
|
}
|
|
9995
10006
|
)
|
|
@@ -10009,7 +10020,7 @@ const xp = ({
|
|
|
10009
10020
|
}) => {
|
|
10010
10021
|
const [f, a] = Bt(o), d = r !== void 0, u = d ? r : f, p = (x) => {
|
|
10011
10022
|
d || a(x), c?.(x);
|
|
10012
|
-
}, [m, g] = Bt(!1), h = Os(null),
|
|
10023
|
+
}, [m, g] = Bt(!1), h = Os(null), w = (u - e) / (t - e) * 100, y = [];
|
|
10013
10024
|
for (let x = e; x <= t; x += (t - e) / 4)
|
|
10014
10025
|
y.push(Math.round(x));
|
|
10015
10026
|
const v = (x) => {
|
|
@@ -10024,7 +10035,7 @@ const xp = ({
|
|
|
10024
10035
|
g(!0);
|
|
10025
10036
|
const C = v(x);
|
|
10026
10037
|
p(C);
|
|
10027
|
-
},
|
|
10038
|
+
}, E = (x) => {
|
|
10028
10039
|
if (!m || i) return;
|
|
10029
10040
|
const C = v(x);
|
|
10030
10041
|
p(C);
|
|
@@ -10033,9 +10044,9 @@ const xp = ({
|
|
|
10033
10044
|
};
|
|
10034
10045
|
return _n(() => {
|
|
10035
10046
|
const x = (_) => {
|
|
10036
|
-
m && (_.preventDefault(),
|
|
10047
|
+
m && (_.preventDefault(), E(_.touches[0]?.clientX ?? 0));
|
|
10037
10048
|
}, C = (_) => {
|
|
10038
|
-
|
|
10049
|
+
E(_.clientX);
|
|
10039
10050
|
}, T = () => {
|
|
10040
10051
|
b();
|
|
10041
10052
|
};
|
|
@@ -10050,7 +10061,7 @@ const xp = ({
|
|
|
10050
10061
|
className: ye("memori-slider", {
|
|
10051
10062
|
"memori-slider--disabled": i
|
|
10052
10063
|
}),
|
|
10053
|
-
style: { "--percentage": `${
|
|
10064
|
+
style: { "--percentage": `${w}%` },
|
|
10054
10065
|
children: [
|
|
10055
10066
|
/* @__PURE__ */ be("div", { className: "memori-slider__header", children: [
|
|
10056
10067
|
s && /* @__PURE__ */ D("div", { className: "memori-slider__label", children: s }),
|