@protonradio/proton-ui 0.11.0 → 0.11.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +647 -637
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import D, { useRef as
|
|
1
|
+
import D, { useRef as K, useCallback as te, useState as W, useContext as q, useEffect as j, createContext as ne, useMemo as H, forwardRef as Ke, useLayoutEffect as md, createElement as Li, isValidElement as gd, cloneElement as yd } from "react";
|
|
2
2
|
import { u as $d, a as Oi, b as Ur } from "./useBreakpoint-CjRyGKN-.mjs";
|
|
3
3
|
import { transparentize as at, mix as Rl, parseToRgba as xd } from "color2k";
|
|
4
4
|
import { isUrlExternal as Gr, csx as G, handleInternalNavigation as ji, transparentize as Fl } from "./utils.es.js";
|
|
@@ -61,20 +61,20 @@ function wd() {
|
|
|
61
61
|
{
|
|
62
62
|
var Y = x.ReactDebugCurrentFrame, ie = Y.getStackAddendum();
|
|
63
63
|
ie !== "" && (M += "%s", L = L.concat([ie]));
|
|
64
|
-
var
|
|
64
|
+
var ae = L.map(function(ee) {
|
|
65
65
|
return String(ee);
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
ae.unshift("Warning: " + M), Function.prototype.apply.call(console[y], console, ae);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
var T = !1, S = !1, P = !1,
|
|
71
|
-
|
|
72
|
-
function
|
|
73
|
-
return !!(typeof y == "string" || typeof y == "function" || y === r || y === i || R || y === l || y === s || y === d ||
|
|
70
|
+
var T = !1, S = !1, P = !1, N = !1, R = !1, I;
|
|
71
|
+
I = Symbol.for("react.module.reference");
|
|
72
|
+
function B(y) {
|
|
73
|
+
return !!(typeof y == "string" || typeof y == "function" || y === r || y === i || R || y === l || y === s || y === d || N || y === p || T || S || P || typeof y == "object" && y !== null && (y.$$typeof === f || y.$$typeof === c || y.$$typeof === o || y.$$typeof === u || y.$$typeof === a || // This needs to include all possible module reference object
|
|
74
74
|
// types supported by any Flight configuration anywhere since
|
|
75
75
|
// we don't know which Flight build this will end up being used
|
|
76
76
|
// with.
|
|
77
|
-
y.$$typeof ===
|
|
77
|
+
y.$$typeof === I || y.getModuleId !== void 0));
|
|
78
78
|
}
|
|
79
79
|
function g(y, M, L) {
|
|
80
80
|
var Y = y.displayName;
|
|
@@ -121,9 +121,9 @@ function wd() {
|
|
|
121
121
|
var Y = y.displayName || null;
|
|
122
122
|
return Y !== null ? Y : _(y.type) || "Memo";
|
|
123
123
|
case f: {
|
|
124
|
-
var ie = y,
|
|
124
|
+
var ie = y, ae = ie._payload, ee = ie._init;
|
|
125
125
|
try {
|
|
126
|
-
return _(ee(
|
|
126
|
+
return _(ee(ae));
|
|
127
127
|
} catch {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
@@ -131,18 +131,18 @@ function wd() {
|
|
|
131
131
|
}
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
|
-
var k = Object.assign, O = 0, h, A, w,
|
|
135
|
-
function
|
|
134
|
+
var k = Object.assign, O = 0, h, A, w, z, X, Z, ue;
|
|
135
|
+
function fe() {
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
fe.__reactDisabledLog = !0;
|
|
138
138
|
function Le() {
|
|
139
139
|
{
|
|
140
140
|
if (O === 0) {
|
|
141
|
-
h = console.log, A = console.info, w = console.warn,
|
|
141
|
+
h = console.log, A = console.info, w = console.warn, z = console.error, X = console.group, Z = console.groupCollapsed, ue = console.groupEnd;
|
|
142
142
|
var y = {
|
|
143
143
|
configurable: !0,
|
|
144
144
|
enumerable: !0,
|
|
145
|
-
value:
|
|
145
|
+
value: fe,
|
|
146
146
|
writable: !0
|
|
147
147
|
};
|
|
148
148
|
Object.defineProperties(console, {
|
|
@@ -177,16 +177,16 @@ function wd() {
|
|
|
177
177
|
value: w
|
|
178
178
|
}),
|
|
179
179
|
error: k({}, y, {
|
|
180
|
-
value:
|
|
180
|
+
value: z
|
|
181
181
|
}),
|
|
182
182
|
group: k({}, y, {
|
|
183
|
-
value:
|
|
183
|
+
value: X
|
|
184
184
|
}),
|
|
185
185
|
groupCollapsed: k({}, y, {
|
|
186
|
-
value:
|
|
186
|
+
value: Z
|
|
187
187
|
}),
|
|
188
188
|
groupEnd: k({}, y, {
|
|
189
|
-
value:
|
|
189
|
+
value: ue
|
|
190
190
|
})
|
|
191
191
|
});
|
|
192
192
|
}
|
|
@@ -224,8 +224,8 @@ function wd() {
|
|
|
224
224
|
qe = !0;
|
|
225
225
|
var ie = Error.prepareStackTrace;
|
|
226
226
|
Error.prepareStackTrace = void 0;
|
|
227
|
-
var
|
|
228
|
-
|
|
227
|
+
var ae;
|
|
228
|
+
ae = we.current, we.current = null, Le();
|
|
229
229
|
try {
|
|
230
230
|
if (M) {
|
|
231
231
|
var ee = function() {
|
|
@@ -260,25 +260,25 @@ function wd() {
|
|
|
260
260
|
}
|
|
261
261
|
} catch (Te) {
|
|
262
262
|
if (Te && Y && typeof Te.stack == "string") {
|
|
263
|
-
for (var
|
|
263
|
+
for (var J = Te.stack.split(`
|
|
264
264
|
`), Pe = Y.stack.split(`
|
|
265
|
-
`),
|
|
266
|
-
|
|
267
|
-
for (;
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
265
|
+
`), pe = J.length - 1, he = Pe.length - 1; pe >= 1 && he >= 0 && J[pe] !== Pe[he]; )
|
|
266
|
+
he--;
|
|
267
|
+
for (; pe >= 1 && he >= 0; pe--, he--)
|
|
268
|
+
if (J[pe] !== Pe[he]) {
|
|
269
|
+
if (pe !== 1 || he !== 1)
|
|
270
270
|
do
|
|
271
|
-
if (
|
|
271
|
+
if (pe--, he--, he < 0 || J[pe] !== Pe[he]) {
|
|
272
272
|
var Re = `
|
|
273
|
-
` +
|
|
273
|
+
` + J[pe].replace(" at new ", " at ");
|
|
274
274
|
return y.displayName && Re.includes("<anonymous>") && (Re = Re.replace("<anonymous>", y.displayName)), typeof y == "function" && He.set(y, Re), Re;
|
|
275
275
|
}
|
|
276
|
-
while (
|
|
276
|
+
while (pe >= 1 && he >= 0);
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
} finally {
|
|
281
|
-
qe = !1, we.current =
|
|
281
|
+
qe = !1, we.current = ae, Ye(), Error.prepareStackTrace = ie;
|
|
282
282
|
}
|
|
283
283
|
var Tt = y ? y.displayName || y.name : "", mt = Tt ? Ve(Tt) : "";
|
|
284
284
|
return typeof y == "function" && He.set(y, mt), mt;
|
|
@@ -310,9 +310,9 @@ function wd() {
|
|
|
310
310
|
case c:
|
|
311
311
|
return re(y.type, M, L);
|
|
312
312
|
case f: {
|
|
313
|
-
var Y = y, ie = Y._payload,
|
|
313
|
+
var Y = y, ie = Y._payload, ae = Y._init;
|
|
314
314
|
try {
|
|
315
|
-
return re(
|
|
315
|
+
return re(ae(ie), M, L);
|
|
316
316
|
} catch {
|
|
317
317
|
}
|
|
318
318
|
}
|
|
@@ -329,20 +329,20 @@ function wd() {
|
|
|
329
329
|
}
|
|
330
330
|
function qc(y, M, L, Y, ie) {
|
|
331
331
|
{
|
|
332
|
-
var
|
|
332
|
+
var ae = Function.call.bind(Xe);
|
|
333
333
|
for (var ee in y)
|
|
334
|
-
if (
|
|
335
|
-
var
|
|
334
|
+
if (ae(y, ee)) {
|
|
335
|
+
var J = void 0;
|
|
336
336
|
try {
|
|
337
337
|
if (typeof y[ee] != "function") {
|
|
338
338
|
var Pe = Error((Y || "React class") + ": " + L + " type `" + ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof y[ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
339
339
|
throw Pe.name = "Invariant Violation", Pe;
|
|
340
340
|
}
|
|
341
|
-
|
|
342
|
-
} catch (
|
|
343
|
-
|
|
341
|
+
J = y[ee](M, ee, Y, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
342
|
+
} catch (pe) {
|
|
343
|
+
J = pe;
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
J && !(J instanceof Error) && (vn(ie), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Y || "React class", L, ee, typeof J), vn(null)), J instanceof Error && !(J.message in pn) && (pn[J.message] = !0, vn(ie), E("Failed %s type: %s", L, J.message), vn(null));
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
}
|
|
@@ -421,8 +421,8 @@ function wd() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var id = function(y, M, L, Y, ie,
|
|
425
|
-
var
|
|
424
|
+
var id = function(y, M, L, Y, ie, ae, ee) {
|
|
425
|
+
var J = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
427
|
$$typeof: e,
|
|
428
428
|
// Built-in properties that belong on the element
|
|
@@ -431,41 +431,41 @@ function wd() {
|
|
|
431
431
|
ref: L,
|
|
432
432
|
props: ee,
|
|
433
433
|
// Record the component responsible for creating this element.
|
|
434
|
-
_owner:
|
|
434
|
+
_owner: ae
|
|
435
435
|
};
|
|
436
|
-
return
|
|
436
|
+
return J._store = {}, Object.defineProperty(J._store, "validated", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !0,
|
|
440
440
|
value: !1
|
|
441
|
-
}), Object.defineProperty(
|
|
441
|
+
}), Object.defineProperty(J, "_self", {
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
445
|
value: Y
|
|
446
|
-
}), Object.defineProperty(
|
|
446
|
+
}), Object.defineProperty(J, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
449
449
|
writable: !1,
|
|
450
450
|
value: ie
|
|
451
|
-
}), Object.freeze && (Object.freeze(
|
|
451
|
+
}), Object.freeze && (Object.freeze(J.props), Object.freeze(J)), J;
|
|
452
452
|
};
|
|
453
453
|
function od(y, M, L, Y, ie) {
|
|
454
454
|
{
|
|
455
|
-
var
|
|
456
|
-
L !== void 0 && (Pl(L),
|
|
457
|
-
for (
|
|
458
|
-
Xe.call(M,
|
|
455
|
+
var ae, ee = {}, J = null, Pe = null;
|
|
456
|
+
L !== void 0 && (Pl(L), J = "" + L), td(M) && (Pl(M.key), J = "" + M.key), ed(M) && (Pe = M.ref, nd(M, ie));
|
|
457
|
+
for (ae in M)
|
|
458
|
+
Xe.call(M, ae) && !Qc.hasOwnProperty(ae) && (ee[ae] = M[ae]);
|
|
459
459
|
if (y && y.defaultProps) {
|
|
460
|
-
var
|
|
461
|
-
for (
|
|
462
|
-
ee[
|
|
460
|
+
var pe = y.defaultProps;
|
|
461
|
+
for (ae in pe)
|
|
462
|
+
ee[ae] === void 0 && (ee[ae] = pe[ae]);
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
465
|
-
var
|
|
466
|
-
|
|
464
|
+
if (J || Pe) {
|
|
465
|
+
var he = typeof y == "function" ? y.displayName || y.name || "Unknown" : y;
|
|
466
|
+
J && rd(ee, he), Pe && ld(ee, he);
|
|
467
467
|
}
|
|
468
|
-
return id(y,
|
|
468
|
+
return id(y, J, Pe, ie, Y, Vt.current, ee);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
var rr = x.ReactCurrentOwner, Tl = x.ReactDebugCurrentFrame;
|
|
@@ -536,7 +536,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
536
536
|
else if (y) {
|
|
537
537
|
var ie = $(y);
|
|
538
538
|
if (typeof ie == "function" && ie !== y.entries)
|
|
539
|
-
for (var
|
|
539
|
+
for (var ae = ie.call(y), ee; !(ee = ae.next()).done; )
|
|
540
540
|
ir(ee.value) && Kl(ee.value, M);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -579,20 +579,20 @@ Check the top-level render call using <` + L + ">.");
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
var Nl = {};
|
|
582
|
-
function Il(y, M, L, Y, ie,
|
|
582
|
+
function Il(y, M, L, Y, ie, ae) {
|
|
583
583
|
{
|
|
584
|
-
var ee =
|
|
584
|
+
var ee = B(y);
|
|
585
585
|
if (!ee) {
|
|
586
|
-
var
|
|
587
|
-
(y === void 0 || typeof y == "object" && y !== null && Object.keys(y).length === 0) && (
|
|
586
|
+
var J = "";
|
|
587
|
+
(y === void 0 || typeof y == "object" && y !== null && Object.keys(y).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
588
588
|
var Pe = ud();
|
|
589
|
-
Pe ?
|
|
590
|
-
var
|
|
591
|
-
y === null ?
|
|
589
|
+
Pe ? J += Pe : J += Al();
|
|
590
|
+
var pe;
|
|
591
|
+
y === null ? pe = "null" : tr(y) ? pe = "array" : y !== void 0 && y.$$typeof === e ? (pe = "<" + (_(y.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : pe = typeof y, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", pe, J);
|
|
592
592
|
}
|
|
593
|
-
var
|
|
594
|
-
if (
|
|
595
|
-
return
|
|
593
|
+
var he = od(y, M, L, ie, ae);
|
|
594
|
+
if (he == null)
|
|
595
|
+
return he;
|
|
596
596
|
if (ee) {
|
|
597
597
|
var Re = M.children;
|
|
598
598
|
if (Re !== void 0)
|
|
@@ -620,7 +620,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
620
620
|
<%s key={someKey} {...props} />`, or, mt, hd, mt), Nl[mt + or] = !0;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
return y === r ? cd(
|
|
623
|
+
return y === r ? cd(he) : sd(he), he;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
function dd(y, M, L) {
|
|
@@ -637,8 +637,8 @@ process.env.NODE_ENV === "production" ? Er.exports = Cd() : Er.exports = wd();
|
|
|
637
637
|
var m = Er.exports;
|
|
638
638
|
const Q = typeof document < "u" ? D.useLayoutEffect : () => {
|
|
639
639
|
};
|
|
640
|
-
function
|
|
641
|
-
const e =
|
|
640
|
+
function de(t) {
|
|
641
|
+
const e = K(null);
|
|
642
642
|
return Q(() => {
|
|
643
643
|
e.current = t;
|
|
644
644
|
}, [
|
|
@@ -649,7 +649,7 @@ function ce(t) {
|
|
|
649
649
|
}, []);
|
|
650
650
|
}
|
|
651
651
|
function Pd(t) {
|
|
652
|
-
let [e, n] = W(t), r =
|
|
652
|
+
let [e, n] = W(t), r = K(null), l = de(() => {
|
|
653
653
|
if (!r.current) return;
|
|
654
654
|
let o = r.current.next();
|
|
655
655
|
if (o.done) {
|
|
@@ -661,7 +661,7 @@ function Pd(t) {
|
|
|
661
661
|
Q(() => {
|
|
662
662
|
r.current && l();
|
|
663
663
|
});
|
|
664
|
-
let i =
|
|
664
|
+
let i = de((o) => {
|
|
665
665
|
r.current = o(e), l();
|
|
666
666
|
});
|
|
667
667
|
return [
|
|
@@ -675,7 +675,7 @@ const Pn = {
|
|
|
675
675
|
}, Vi = /* @__PURE__ */ D.createContext(Pn), Dd = /* @__PURE__ */ D.createContext(!1);
|
|
676
676
|
let kd = !!(typeof window < "u" && window.document && window.document.createElement), ur = /* @__PURE__ */ new WeakMap();
|
|
677
677
|
function Td(t = !1) {
|
|
678
|
-
let e = q(Vi), n =
|
|
678
|
+
let e = q(Vi), n = K(null);
|
|
679
679
|
if (n.current === null && !t) {
|
|
680
680
|
var r, l;
|
|
681
681
|
let i = (l = D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || l === void 0 || (r = l.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
@@ -718,8 +718,8 @@ let Rd = !!(typeof window < "u" && window.document && window.document.createElem
|
|
|
718
718
|
typeof FinalizationRegistry < "u" && (Xt = new FinalizationRegistry((t) => {
|
|
719
719
|
Rt.delete(t);
|
|
720
720
|
}));
|
|
721
|
-
function
|
|
722
|
-
let [e, n] = W(t), r =
|
|
721
|
+
function me(t) {
|
|
722
|
+
let [e, n] = W(t), r = K(null), l = Kd(e), i = K(null);
|
|
723
723
|
if (Xt && Xt.register(i, l), Rd) {
|
|
724
724
|
const o = Rt.get(l);
|
|
725
725
|
o && !o.includes(r) ? o.push(r) : Rt.set(l, [
|
|
@@ -733,7 +733,7 @@ function be(t) {
|
|
|
733
733
|
};
|
|
734
734
|
}, [
|
|
735
735
|
l
|
|
736
|
-
]),
|
|
736
|
+
]), j(() => {
|
|
737
737
|
let o = r.current;
|
|
738
738
|
return o && n(o), () => {
|
|
739
739
|
o && (r.current = null);
|
|
@@ -749,7 +749,7 @@ function Fd(t, e) {
|
|
|
749
749
|
return r ? (r.forEach((l) => l.current = t), t) : e;
|
|
750
750
|
}
|
|
751
751
|
function dt(t = []) {
|
|
752
|
-
let e =
|
|
752
|
+
let e = me(), [n, r] = Pd(e), l = te(() => {
|
|
753
753
|
r(function* () {
|
|
754
754
|
yield e, yield document.getElementById(e) ? e : void 0;
|
|
755
755
|
});
|
|
@@ -785,7 +785,7 @@ function Dn() {
|
|
|
785
785
|
function On() {
|
|
786
786
|
return jd;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function ce(t, e) {
|
|
789
789
|
if (!On()) return e && t ? t.contains(e) : !1;
|
|
790
790
|
if (!t || !e) return !1;
|
|
791
791
|
let n = e;
|
|
@@ -810,7 +810,7 @@ class zd {
|
|
|
810
810
|
return this._currentNode;
|
|
811
811
|
}
|
|
812
812
|
set currentNode(e) {
|
|
813
|
-
if (!
|
|
813
|
+
if (!ce(this.root, e)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
814
814
|
const n = [];
|
|
815
815
|
let r = e, l = e;
|
|
816
816
|
for (this._currentNode = e; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
@@ -829,7 +829,7 @@ class zd {
|
|
|
829
829
|
}
|
|
830
830
|
firstChild() {
|
|
831
831
|
let e = this.currentNode, n = this.nextNode();
|
|
832
|
-
return
|
|
832
|
+
return ce(e, n) ? (n && (this.currentNode = n), n) : (this.currentNode = e, null);
|
|
833
833
|
}
|
|
834
834
|
lastChild() {
|
|
835
835
|
let n = this._walkerStack[0].lastChild();
|
|
@@ -980,7 +980,7 @@ const Wd = /* @__PURE__ */ new Set([
|
|
|
980
980
|
"ping",
|
|
981
981
|
"referrerPolicy"
|
|
982
982
|
]), Yd = /^(data-.*)$/;
|
|
983
|
-
function
|
|
983
|
+
function $e(t, e = {}) {
|
|
984
984
|
let { labelable: n, isLink: r, propNames: l } = e, i = {};
|
|
985
985
|
for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (Wd.has(o) || n && Ud.has(o) || r && Gd.has(o) || l != null && l.has(o) || Yd.test(o)) && (i[o] = t[o]);
|
|
986
986
|
return i;
|
|
@@ -1153,7 +1153,7 @@ function Yi(t) {
|
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
1155
|
function Vn() {
|
|
1156
|
-
let t =
|
|
1156
|
+
let t = K(/* @__PURE__ */ new Map()), e = te((l, i, o, u) => {
|
|
1157
1157
|
let a = u != null && u.once ? (...s) => {
|
|
1158
1158
|
t.current.delete(o), o(...s);
|
|
1159
1159
|
} : o;
|
|
@@ -1174,7 +1174,7 @@ function Vn() {
|
|
|
1174
1174
|
}, [
|
|
1175
1175
|
n
|
|
1176
1176
|
]);
|
|
1177
|
-
return
|
|
1177
|
+
return j(() => r, [
|
|
1178
1178
|
r
|
|
1179
1179
|
]), {
|
|
1180
1180
|
addGlobalListener: e,
|
|
@@ -1184,7 +1184,7 @@ function Vn() {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
function qi(t, e) {
|
|
1186
1186
|
let { id: n, "aria-label": r, "aria-labelledby": l } = t;
|
|
1187
|
-
return n =
|
|
1187
|
+
return n = me(n), l && r ? l = [
|
|
1188
1188
|
.../* @__PURE__ */ new Set([
|
|
1189
1189
|
n,
|
|
1190
1190
|
...l.trim().split(/\s+/)
|
|
@@ -1196,7 +1196,7 @@ function qi(t, e) {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
}
|
|
1198
1198
|
function Lt(t) {
|
|
1199
|
-
const e =
|
|
1199
|
+
const e = K(null);
|
|
1200
1200
|
return H(() => ({
|
|
1201
1201
|
get current() {
|
|
1202
1202
|
return e.current;
|
|
@@ -1209,16 +1209,16 @@ function Lt(t) {
|
|
|
1209
1209
|
]);
|
|
1210
1210
|
}
|
|
1211
1211
|
function Xi(t, e) {
|
|
1212
|
-
const n =
|
|
1213
|
-
|
|
1212
|
+
const n = K(!0), r = K(null);
|
|
1213
|
+
j(() => (n.current = !0, () => {
|
|
1214
1214
|
n.current = !1;
|
|
1215
|
-
}), []),
|
|
1215
|
+
}), []), j(() => {
|
|
1216
1216
|
let l = r.current;
|
|
1217
1217
|
n.current ? n.current = !1 : (!l || e.some((i, o) => !Object.is(i, l[o]))) && t(), r.current = e;
|
|
1218
1218
|
}, e);
|
|
1219
1219
|
}
|
|
1220
1220
|
function zl(t, e) {
|
|
1221
|
-
const n =
|
|
1221
|
+
const n = K(!0), r = K(null);
|
|
1222
1222
|
Q(() => (n.current = !0, () => {
|
|
1223
1223
|
n.current = !1;
|
|
1224
1224
|
}), []), Q(() => {
|
|
@@ -1230,7 +1230,7 @@ function of() {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
function Cr(t) {
|
|
1232
1232
|
const { ref: e, box: n, onResize: r } = t;
|
|
1233
|
-
|
|
1233
|
+
j(() => {
|
|
1234
1234
|
let l = e == null ? void 0 : e.current;
|
|
1235
1235
|
if (l)
|
|
1236
1236
|
if (of()) {
|
|
@@ -1304,8 +1304,8 @@ function Hn(t) {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
function bn(t, e, n, r) {
|
|
1307
|
-
let l =
|
|
1308
|
-
|
|
1307
|
+
let l = de(n), i = n == null;
|
|
1308
|
+
j(() => {
|
|
1309
1309
|
if (i || !t.current) return;
|
|
1310
1310
|
let o = t.current;
|
|
1311
1311
|
return o.addEventListener(e, l, r), () => {
|
|
@@ -1367,10 +1367,10 @@ function sf(t) {
|
|
|
1367
1367
|
return !tn() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
|
1368
1368
|
}
|
|
1369
1369
|
function Wn(t, e, n) {
|
|
1370
|
-
let r =
|
|
1370
|
+
let r = K(e), l = de(() => {
|
|
1371
1371
|
n && n(r.current);
|
|
1372
1372
|
});
|
|
1373
|
-
|
|
1373
|
+
j(() => {
|
|
1374
1374
|
var i;
|
|
1375
1375
|
let o = t == null || (i = t.current) === null || i === void 0 ? void 0 : i.form;
|
|
1376
1376
|
return o == null || o.addEventListener("reset", l), () => {
|
|
@@ -1463,8 +1463,8 @@ function vf(t) {
|
|
|
1463
1463
|
return t.matches(pf);
|
|
1464
1464
|
}
|
|
1465
1465
|
function vt(t, e, n) {
|
|
1466
|
-
let [r, l] = W(t || e), i =
|
|
1467
|
-
|
|
1466
|
+
let [r, l] = W(t || e), i = K(t !== void 0), o = t !== void 0;
|
|
1467
|
+
j(() => {
|
|
1468
1468
|
let s = i.current;
|
|
1469
1469
|
s !== o && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${s ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}.`), i.current = o;
|
|
1470
1470
|
}, [
|
|
@@ -1504,7 +1504,7 @@ function no(t, e) {
|
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
1506
1506
|
function ro(t) {
|
|
1507
|
-
let e =
|
|
1507
|
+
let e = K({
|
|
1508
1508
|
isFocused: !1,
|
|
1509
1509
|
observer: null
|
|
1510
1510
|
});
|
|
@@ -1514,7 +1514,7 @@ function ro(t) {
|
|
|
1514
1514
|
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
1515
1515
|
};
|
|
1516
1516
|
}, []);
|
|
1517
|
-
let n =
|
|
1517
|
+
let n = de((r) => {
|
|
1518
1518
|
t == null || t(r);
|
|
1519
1519
|
});
|
|
1520
1520
|
return te((r) => {
|
|
@@ -1667,7 +1667,7 @@ class gn {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
const Gl = Symbol("linkClicked");
|
|
1669
1669
|
function nt(t) {
|
|
1670
|
-
let { onPress: e, onPressChange: n, onPressStart: r, onPressEnd: l, onPressUp: i, onClick: o, isDisabled: u, isPressed: a, preventFocusOnPress: s, shouldCancelOnPointerExit: d, allowTextSelectionOnPress: c, ref: f, ...p } = $f(t), [v, b] = W(!1), $ =
|
|
1670
|
+
let { onPress: e, onPressChange: n, onPressStart: r, onPressEnd: l, onPressUp: i, onClick: o, isDisabled: u, isPressed: a, preventFocusOnPress: s, shouldCancelOnPointerExit: d, allowTextSelectionOnPress: c, ref: f, ...p } = $f(t), [v, b] = W(!1), $ = K({
|
|
1671
1671
|
isPressed: !1,
|
|
1672
1672
|
ignoreEmulatedMouseEvents: !1,
|
|
1673
1673
|
didFirePressStart: !1,
|
|
@@ -1677,7 +1677,7 @@ function nt(t) {
|
|
|
1677
1677
|
isOverTarget: !1,
|
|
1678
1678
|
pointerType: null,
|
|
1679
1679
|
disposables: []
|
|
1680
|
-
}), { addGlobalListener: x, removeAllGlobalListeners: E } = Vn(), C =
|
|
1680
|
+
}), { addGlobalListener: x, removeAllGlobalListeners: E } = Vn(), C = de((g, F) => {
|
|
1681
1681
|
let _ = $.current;
|
|
1682
1682
|
if (u || _.didFirePressStart) return !1;
|
|
1683
1683
|
let k = !0;
|
|
@@ -1686,7 +1686,7 @@ function nt(t) {
|
|
|
1686
1686
|
r(O), k = O.shouldStopPropagation;
|
|
1687
1687
|
}
|
|
1688
1688
|
return n && n(!0), _.isTriggeringEvent = !1, _.didFirePressStart = !0, b(!0), k;
|
|
1689
|
-
}), T =
|
|
1689
|
+
}), T = de((g, F, _ = !0) => {
|
|
1690
1690
|
let k = $.current;
|
|
1691
1691
|
if (!k.didFirePressStart) return !1;
|
|
1692
1692
|
k.didFirePressStart = !1, k.isTriggeringEvent = !0;
|
|
@@ -1700,7 +1700,7 @@ function nt(t) {
|
|
|
1700
1700
|
e(h), O && (O = h.shouldStopPropagation);
|
|
1701
1701
|
}
|
|
1702
1702
|
return k.isTriggeringEvent = !1, O;
|
|
1703
|
-
}), S =
|
|
1703
|
+
}), S = de((g, F) => {
|
|
1704
1704
|
let _ = $.current;
|
|
1705
1705
|
if (u) return !1;
|
|
1706
1706
|
if (i) {
|
|
@@ -1709,33 +1709,33 @@ function nt(t) {
|
|
|
1709
1709
|
return i(k), _.isTriggeringEvent = !1, k.shouldStopPropagation;
|
|
1710
1710
|
}
|
|
1711
1711
|
return !0;
|
|
1712
|
-
}), P =
|
|
1712
|
+
}), P = de((g) => {
|
|
1713
1713
|
let F = $.current;
|
|
1714
1714
|
if (F.isPressed && F.target) {
|
|
1715
1715
|
F.didFirePressStart && F.pointerType != null && T(At(F.target, g), F.pointerType, !1), F.isPressed = !1, F.isOverTarget = !1, F.activePointerId = null, F.pointerType = null, E(), c || sr(F.target);
|
|
1716
1716
|
for (let _ of F.disposables) _();
|
|
1717
1717
|
F.disposables = [];
|
|
1718
1718
|
}
|
|
1719
|
-
}),
|
|
1719
|
+
}), N = de((g) => {
|
|
1720
1720
|
d && P(g);
|
|
1721
|
-
}), R =
|
|
1721
|
+
}), R = de((g) => {
|
|
1722
1722
|
o == null || o(g);
|
|
1723
|
-
}),
|
|
1723
|
+
}), I = de((g, F) => {
|
|
1724
1724
|
if (o) {
|
|
1725
1725
|
let _ = new MouseEvent("click", g);
|
|
1726
1726
|
no(_, F), o(tl(_));
|
|
1727
1727
|
}
|
|
1728
|
-
}),
|
|
1728
|
+
}), B = H(() => {
|
|
1729
1729
|
let g = $.current, F = {
|
|
1730
1730
|
onKeyDown(k) {
|
|
1731
|
-
if (cr(k.nativeEvent, k.currentTarget) &&
|
|
1731
|
+
if (cr(k.nativeEvent, k.currentTarget) && ce(k.currentTarget, le(k.nativeEvent))) {
|
|
1732
1732
|
var O;
|
|
1733
1733
|
Xl(le(k.nativeEvent), k.key) && k.preventDefault();
|
|
1734
1734
|
let h = !0;
|
|
1735
1735
|
if (!g.isPressed && !k.repeat) {
|
|
1736
1736
|
g.target = k.currentTarget, g.isPressed = !0, g.pointerType = "keyboard", h = C(k, "keyboard");
|
|
1737
|
-
let A = k.currentTarget, w = (
|
|
1738
|
-
cr(
|
|
1737
|
+
let A = k.currentTarget, w = (z) => {
|
|
1738
|
+
cr(z, A) && !z.repeat && ce(A, le(z)) && g.target && S(At(g.target, z), "keyboard");
|
|
1739
1739
|
};
|
|
1740
1740
|
x(oe(k.currentTarget), "keyup", tt(w, _), !0);
|
|
1741
1741
|
}
|
|
@@ -1743,7 +1743,7 @@ function nt(t) {
|
|
|
1743
1743
|
} else k.key === "Meta" && (g.metaKeyEvents = /* @__PURE__ */ new Map());
|
|
1744
1744
|
},
|
|
1745
1745
|
onClick(k) {
|
|
1746
|
-
if (!(k && !
|
|
1746
|
+
if (!(k && !ce(k.currentTarget, le(k.nativeEvent))) && k && k.button === 0 && !g.isTriggeringEvent && !xt.isOpening) {
|
|
1747
1747
|
let O = !0;
|
|
1748
1748
|
if (u && k.preventDefault(), !g.ignoreEmulatedMouseEvents && !g.isPressed && (g.pointerType === "virtual" || wr(k.nativeEvent))) {
|
|
1749
1749
|
let h = C(k, "virtual"), A = S(k, "virtual"), w = T(k, "virtual");
|
|
@@ -1760,18 +1760,18 @@ function nt(t) {
|
|
|
1760
1760
|
if (g.isPressed && g.target && cr(k, g.target)) {
|
|
1761
1761
|
var h;
|
|
1762
1762
|
Xl(le(k), k.key) && k.preventDefault();
|
|
1763
|
-
let w = le(k),
|
|
1764
|
-
T(At(g.target, k), "keyboard",
|
|
1763
|
+
let w = le(k), z = ce(g.target, le(k));
|
|
1764
|
+
T(At(g.target, k), "keyboard", z), z && I(k, g.target), E(), k.key !== "Enter" && rl(g.target) && ce(g.target, w) && !k[Gl] && (k[Gl] = !0, xt(g.target, k, !1)), g.isPressed = !1, (h = g.metaKeyEvents) === null || h === void 0 || h.delete(k.key);
|
|
1765
1765
|
} else if (k.key === "Meta" && (!((O = g.metaKeyEvents) === null || O === void 0) && O.size)) {
|
|
1766
1766
|
var A;
|
|
1767
1767
|
let w = g.metaKeyEvents;
|
|
1768
1768
|
g.metaKeyEvents = void 0;
|
|
1769
|
-
for (let
|
|
1769
|
+
for (let z of w.values()) (A = g.target) === null || A === void 0 || A.dispatchEvent(new KeyboardEvent("keyup", z));
|
|
1770
1770
|
}
|
|
1771
1771
|
};
|
|
1772
1772
|
if (typeof PointerEvent < "u") {
|
|
1773
1773
|
F.onPointerDown = (h) => {
|
|
1774
|
-
if (h.button !== 0 || !
|
|
1774
|
+
if (h.button !== 0 || !ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1775
1775
|
if (sf(h.nativeEvent)) {
|
|
1776
1776
|
g.pointerType = "virtual";
|
|
1777
1777
|
return;
|
|
@@ -1785,7 +1785,7 @@ function nt(t) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
A && h.stopPropagation();
|
|
1787
1787
|
}, F.onMouseDown = (h) => {
|
|
1788
|
-
if (
|
|
1788
|
+
if (ce(h.currentTarget, le(h.nativeEvent)) && h.button === 0) {
|
|
1789
1789
|
if (s) {
|
|
1790
1790
|
let A = Hl(h.target);
|
|
1791
1791
|
A && g.disposables.push(A);
|
|
@@ -1793,15 +1793,15 @@ function nt(t) {
|
|
|
1793
1793
|
h.stopPropagation();
|
|
1794
1794
|
}
|
|
1795
1795
|
}, F.onPointerUp = (h) => {
|
|
1796
|
-
!
|
|
1796
|
+
!ce(h.currentTarget, le(h.nativeEvent)) || g.pointerType === "virtual" || h.button === 0 && S(h, g.pointerType || h.pointerType);
|
|
1797
1797
|
}, F.onPointerEnter = (h) => {
|
|
1798
1798
|
h.pointerId === g.activePointerId && g.target && !g.isOverTarget && g.pointerType != null && (g.isOverTarget = !0, C(At(g.target, h), g.pointerType));
|
|
1799
1799
|
}, F.onPointerLeave = (h) => {
|
|
1800
|
-
h.pointerId === g.activePointerId && g.target && g.isOverTarget && g.pointerType != null && (g.isOverTarget = !1, T(At(g.target, h), g.pointerType, !1),
|
|
1800
|
+
h.pointerId === g.activePointerId && g.target && g.isOverTarget && g.pointerType != null && (g.isOverTarget = !1, T(At(g.target, h), g.pointerType, !1), N(h));
|
|
1801
1801
|
};
|
|
1802
1802
|
let k = (h) => {
|
|
1803
1803
|
if (h.pointerId === g.activePointerId && g.isPressed && h.button === 0 && g.target) {
|
|
1804
|
-
if (
|
|
1804
|
+
if (ce(g.target, le(h)) && g.pointerType != null) {
|
|
1805
1805
|
let A = !1, w = setTimeout(() => {
|
|
1806
1806
|
g.isPressed && g.target instanceof HTMLElement && (A ? P(h) : (Se(g.target), g.target.click()));
|
|
1807
1807
|
}, 80);
|
|
@@ -1813,11 +1813,11 @@ function nt(t) {
|
|
|
1813
1813
|
P(h);
|
|
1814
1814
|
};
|
|
1815
1815
|
F.onDragStart = (h) => {
|
|
1816
|
-
|
|
1816
|
+
ce(h.currentTarget, le(h.nativeEvent)) && P(h);
|
|
1817
1817
|
};
|
|
1818
1818
|
} else if (process.env.NODE_ENV === "test") {
|
|
1819
1819
|
F.onMouseDown = (h) => {
|
|
1820
|
-
if (h.button !== 0 || !
|
|
1820
|
+
if (h.button !== 0 || !ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1821
1821
|
if (g.ignoreEmulatedMouseEvents) {
|
|
1822
1822
|
h.stopPropagation();
|
|
1823
1823
|
return;
|
|
@@ -1828,15 +1828,15 @@ function nt(t) {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
x(oe(h.currentTarget), "mouseup", k, !1);
|
|
1830
1830
|
}, F.onMouseEnter = (h) => {
|
|
1831
|
-
if (!
|
|
1831
|
+
if (!ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1832
1832
|
let A = !0;
|
|
1833
1833
|
g.isPressed && !g.ignoreEmulatedMouseEvents && g.pointerType != null && (g.isOverTarget = !0, A = C(h, g.pointerType)), A && h.stopPropagation();
|
|
1834
1834
|
}, F.onMouseLeave = (h) => {
|
|
1835
|
-
if (!
|
|
1835
|
+
if (!ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1836
1836
|
let A = !0;
|
|
1837
|
-
g.isPressed && !g.ignoreEmulatedMouseEvents && g.pointerType != null && (g.isOverTarget = !1, A = T(h, g.pointerType, !1),
|
|
1837
|
+
g.isPressed && !g.ignoreEmulatedMouseEvents && g.pointerType != null && (g.isOverTarget = !1, A = T(h, g.pointerType, !1), N(h)), A && h.stopPropagation();
|
|
1838
1838
|
}, F.onMouseUp = (h) => {
|
|
1839
|
-
|
|
1839
|
+
ce(h.currentTarget, le(h.nativeEvent)) && !g.ignoreEmulatedMouseEvents && h.button === 0 && S(h, g.pointerType || "mouse");
|
|
1840
1840
|
};
|
|
1841
1841
|
let k = (h) => {
|
|
1842
1842
|
if (h.button === 0) {
|
|
@@ -1848,31 +1848,31 @@ function nt(t) {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
};
|
|
1850
1850
|
F.onTouchStart = (h) => {
|
|
1851
|
-
if (!
|
|
1851
|
+
if (!ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1852
1852
|
let A = xf(h.nativeEvent);
|
|
1853
1853
|
if (!A) return;
|
|
1854
1854
|
g.activePointerId = A.identifier, g.ignoreEmulatedMouseEvents = !0, g.isOverTarget = !0, g.isPressed = !0, g.target = h.currentTarget, g.pointerType = "touch", c || Wl(g.target), C(it(g.target, h), g.pointerType) && h.stopPropagation(), x(Ce(h.currentTarget), "scroll", O, !0);
|
|
1855
1855
|
}, F.onTouchMove = (h) => {
|
|
1856
|
-
if (!
|
|
1856
|
+
if (!ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1857
1857
|
if (!g.isPressed) {
|
|
1858
1858
|
h.stopPropagation();
|
|
1859
1859
|
return;
|
|
1860
1860
|
}
|
|
1861
1861
|
let A = Yl(h.nativeEvent, g.activePointerId), w = !0;
|
|
1862
|
-
A && ql(A, h.currentTarget) ? !g.isOverTarget && g.pointerType != null && (g.isOverTarget = !0, w = C(it(g.target, h), g.pointerType)) : g.isOverTarget && g.pointerType != null && (g.isOverTarget = !1, w = T(it(g.target, h), g.pointerType, !1),
|
|
1862
|
+
A && ql(A, h.currentTarget) ? !g.isOverTarget && g.pointerType != null && (g.isOverTarget = !0, w = C(it(g.target, h), g.pointerType)) : g.isOverTarget && g.pointerType != null && (g.isOverTarget = !1, w = T(it(g.target, h), g.pointerType, !1), N(it(g.target, h))), w && h.stopPropagation();
|
|
1863
1863
|
}, F.onTouchEnd = (h) => {
|
|
1864
|
-
if (!
|
|
1864
|
+
if (!ce(h.currentTarget, le(h.nativeEvent))) return;
|
|
1865
1865
|
if (!g.isPressed) {
|
|
1866
1866
|
h.stopPropagation();
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
1869
|
let A = Yl(h.nativeEvent, g.activePointerId), w = !0;
|
|
1870
|
-
A && ql(A, h.currentTarget) && g.pointerType != null ? (S(it(g.target, h), g.pointerType), w = T(it(g.target, h), g.pointerType),
|
|
1870
|
+
A && ql(A, h.currentTarget) && g.pointerType != null ? (S(it(g.target, h), g.pointerType), w = T(it(g.target, h), g.pointerType), I(h.nativeEvent, g.target)) : g.isOverTarget && g.pointerType != null && (w = T(it(g.target, h), g.pointerType, !1)), w && h.stopPropagation(), g.isPressed = !1, g.activePointerId = null, g.isOverTarget = !1, g.ignoreEmulatedMouseEvents = !0, g.target && !c && sr(g.target), E();
|
|
1871
1871
|
}, F.onTouchCancel = (h) => {
|
|
1872
|
-
|
|
1872
|
+
ce(h.currentTarget, le(h.nativeEvent)) && (h.stopPropagation(), g.isPressed && P(it(g.target, h)));
|
|
1873
1873
|
};
|
|
1874
1874
|
let O = (h) => {
|
|
1875
|
-
g.isPressed &&
|
|
1875
|
+
g.isPressed && ce(le(h), g.target) && P({
|
|
1876
1876
|
currentTarget: g.target,
|
|
1877
1877
|
shiftKey: !1,
|
|
1878
1878
|
ctrlKey: !1,
|
|
@@ -1881,7 +1881,7 @@ function nt(t) {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
};
|
|
1883
1883
|
F.onDragStart = (h) => {
|
|
1884
|
-
|
|
1884
|
+
ce(h.currentTarget, le(h.nativeEvent)) && P(h);
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
1887
|
return F;
|
|
@@ -1892,19 +1892,19 @@ function nt(t) {
|
|
|
1892
1892
|
E,
|
|
1893
1893
|
c,
|
|
1894
1894
|
P,
|
|
1895
|
-
|
|
1895
|
+
N,
|
|
1896
1896
|
T,
|
|
1897
1897
|
C,
|
|
1898
1898
|
S,
|
|
1899
1899
|
R,
|
|
1900
|
-
|
|
1900
|
+
I
|
|
1901
1901
|
]);
|
|
1902
|
-
return
|
|
1902
|
+
return j(() => {
|
|
1903
1903
|
let g = f == null ? void 0 : f.current;
|
|
1904
1904
|
g && g instanceof Ce(g).Element && Ce(g).getComputedStyle(g).touchAction === "auto" && (g.style.touchAction = "pan-x pan-y pinch-zoom");
|
|
1905
1905
|
}, [
|
|
1906
1906
|
f
|
|
1907
|
-
]),
|
|
1907
|
+
]), j(() => {
|
|
1908
1908
|
let g = $.current;
|
|
1909
1909
|
return () => {
|
|
1910
1910
|
var F;
|
|
@@ -1916,7 +1916,7 @@ function nt(t) {
|
|
|
1916
1916
|
c
|
|
1917
1917
|
]), {
|
|
1918
1918
|
isPressed: a || v,
|
|
1919
|
-
pressProps: U(p,
|
|
1919
|
+
pressProps: U(p, B)
|
|
1920
1920
|
};
|
|
1921
1921
|
}
|
|
1922
1922
|
function rl(t) {
|
|
@@ -2063,7 +2063,7 @@ function co(t) {
|
|
|
2063
2063
|
function fo() {
|
|
2064
2064
|
An();
|
|
2065
2065
|
let [t, e] = W(rt);
|
|
2066
|
-
return
|
|
2066
|
+
return j(() => {
|
|
2067
2067
|
let n = () => {
|
|
2068
2068
|
e(rt);
|
|
2069
2069
|
};
|
|
@@ -2089,7 +2089,7 @@ function Af(t, e, n) {
|
|
|
2089
2089
|
return t = t || r.activeElement instanceof l && !Tf.has(r.activeElement.type) || r.activeElement instanceof i || r.activeElement instanceof o && r.activeElement.isContentEditable, !(t && e === "keyboard" && n instanceof u && !Pf[n.key]);
|
|
2090
2090
|
}
|
|
2091
2091
|
function Bf(t, e, n) {
|
|
2092
|
-
An(),
|
|
2092
|
+
An(), j(() => {
|
|
2093
2093
|
let r = (l, i) => {
|
|
2094
2094
|
Af(!!(n != null && n.isTextInput), l, i) && t(pt());
|
|
2095
2095
|
};
|
|
@@ -2180,8 +2180,8 @@ const Mf = /* @__PURE__ */ D.forwardRef(function(e, n) {
|
|
|
2180
2180
|
}, r);
|
|
2181
2181
|
});
|
|
2182
2182
|
function Ct(t, e) {
|
|
2183
|
-
let { focusProps: n } = ll(t), { keyboardProps: r } = po(t), l = U(n, r), i = Kf(e), o = t.isDisabled ? {} : i, u =
|
|
2184
|
-
|
|
2183
|
+
let { focusProps: n } = ll(t), { keyboardProps: r } = po(t), l = U(n, r), i = Kf(e), o = t.isDisabled ? {} : i, u = K(t.autoFocus);
|
|
2184
|
+
j(() => {
|
|
2185
2185
|
u.current && e.current && Ee(e.current), u.current = !1;
|
|
2186
2186
|
}, [
|
|
2187
2187
|
e
|
|
@@ -2197,7 +2197,7 @@ function Ct(t, e) {
|
|
|
2197
2197
|
const Nf = /* @__PURE__ */ Ke(({ children: t, ...e }, n) => {
|
|
2198
2198
|
n = Lt(n);
|
|
2199
2199
|
let { focusableProps: r } = Ct(e, n), l = D.Children.only(t);
|
|
2200
|
-
|
|
2200
|
+
j(() => {
|
|
2201
2201
|
if (process.env.NODE_ENV === "production") return;
|
|
2202
2202
|
let o = n.current;
|
|
2203
2203
|
if (!o || !(o instanceof Ce(o).Element)) {
|
|
@@ -2237,7 +2237,7 @@ function If({ children: t }) {
|
|
|
2237
2237
|
}, t);
|
|
2238
2238
|
}
|
|
2239
2239
|
function an(t) {
|
|
2240
|
-
let { isDisabled: e, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: l } = t, i =
|
|
2240
|
+
let { isDisabled: e, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: l } = t, i = K({
|
|
2241
2241
|
isFocusWithin: !1
|
|
2242
2242
|
}), { addGlobalListener: o, removeAllGlobalListeners: u } = Vn(), a = te((c) => {
|
|
2243
2243
|
c.currentTarget.contains(c.target) && i.current.isFocusWithin && !c.currentTarget.contains(c.relatedTarget) && (i.current.isFocusWithin = !1, u(), n && n(c), l && l(!1));
|
|
@@ -2253,7 +2253,7 @@ function an(t) {
|
|
|
2253
2253
|
r && r(c), l && l(!0), i.current.isFocusWithin = !0, s(c);
|
|
2254
2254
|
let v = c.currentTarget;
|
|
2255
2255
|
o(f, "focus", (b) => {
|
|
2256
|
-
if (i.current.isFocusWithin && !
|
|
2256
|
+
if (i.current.isFocusWithin && !ce(v, b.target)) {
|
|
2257
2257
|
let $ = new f.defaultView.FocusEvent("blur", {
|
|
2258
2258
|
relatedTarget: b.target
|
|
2259
2259
|
});
|
|
@@ -2301,20 +2301,20 @@ function Rf() {
|
|
|
2301
2301
|
};
|
|
2302
2302
|
}
|
|
2303
2303
|
function Ot(t) {
|
|
2304
|
-
let { onHoverStart: e, onHoverChange: n, onHoverEnd: r, isDisabled: l } = t, [i, o] = W(!1), u =
|
|
2304
|
+
let { onHoverStart: e, onHoverChange: n, onHoverEnd: r, isDisabled: l } = t, [i, o] = W(!1), u = K({
|
|
2305
2305
|
isHovered: !1,
|
|
2306
2306
|
ignoreEmulatedMouseEvents: !1,
|
|
2307
2307
|
pointerType: "",
|
|
2308
2308
|
target: null
|
|
2309
2309
|
}).current;
|
|
2310
|
-
|
|
2310
|
+
j(Rf, []);
|
|
2311
2311
|
let { addGlobalListener: a, removeAllGlobalListeners: s } = Vn(), { hoverProps: d, triggerHoverEnd: c } = H(() => {
|
|
2312
2312
|
let f = (b, $) => {
|
|
2313
2313
|
if (u.pointerType = $, l || $ === "touch" || u.isHovered || !b.currentTarget.contains(b.target)) return;
|
|
2314
2314
|
u.isHovered = !0;
|
|
2315
2315
|
let x = b.currentTarget;
|
|
2316
2316
|
u.target = x, a(oe(b.target), "pointerover", (E) => {
|
|
2317
|
-
u.isHovered && u.target && !
|
|
2317
|
+
u.isHovered && u.target && !ce(u.target, E.target) && p(E, E.pointerType);
|
|
2318
2318
|
}, {
|
|
2319
2319
|
capture: !0
|
|
2320
2320
|
}), e && e({
|
|
@@ -2353,7 +2353,7 @@ function Ot(t) {
|
|
|
2353
2353
|
a,
|
|
2354
2354
|
s
|
|
2355
2355
|
]);
|
|
2356
|
-
return
|
|
2356
|
+
return j(() => {
|
|
2357
2357
|
l && c({
|
|
2358
2358
|
currentTarget: u.target
|
|
2359
2359
|
}, u.pointerType);
|
|
@@ -2365,15 +2365,15 @@ function Ot(t) {
|
|
|
2365
2365
|
};
|
|
2366
2366
|
}
|
|
2367
2367
|
function Ff(t) {
|
|
2368
|
-
let { ref: e, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: l } = t, i =
|
|
2368
|
+
let { ref: e, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: l } = t, i = K({
|
|
2369
2369
|
isPointerDown: !1,
|
|
2370
2370
|
ignoreEmulatedMouseEvents: !1
|
|
2371
|
-
}), o =
|
|
2371
|
+
}), o = de((a) => {
|
|
2372
2372
|
n && yn(a, e) && (l && l(a), i.current.isPointerDown = !0);
|
|
2373
|
-
}), u =
|
|
2373
|
+
}), u = de((a) => {
|
|
2374
2374
|
n && n(a);
|
|
2375
2375
|
});
|
|
2376
|
-
|
|
2376
|
+
j(() => {
|
|
2377
2377
|
let a = i.current;
|
|
2378
2378
|
if (r) return;
|
|
2379
2379
|
const s = e.current, d = oe(s);
|
|
@@ -2412,7 +2412,7 @@ function yn(t, e) {
|
|
|
2412
2412
|
const _f = 500;
|
|
2413
2413
|
function vo(t) {
|
|
2414
2414
|
let { isDisabled: e, onLongPressStart: n, onLongPressEnd: r, onLongPress: l, threshold: i = _f, accessibilityDescription: o } = t;
|
|
2415
|
-
const u =
|
|
2415
|
+
const u = K(void 0);
|
|
2416
2416
|
let { addGlobalListener: a, removeGlobalListener: s } = Vn(), { pressProps: d } = nt({
|
|
2417
2417
|
isDisabled: e,
|
|
2418
2418
|
onPressStart(f) {
|
|
@@ -2515,7 +2515,7 @@ function Ql() {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
function Vf() {
|
|
2517
2517
|
let t = St(), [e, n] = W(Ar);
|
|
2518
|
-
return
|
|
2518
|
+
return j(() => (Zt.size === 0 && window.addEventListener("languagechange", Ql), Zt.add(n), () => {
|
|
2519
2519
|
Zt.delete(n), Zt.size === 0 && window.removeEventListener("languagechange", Ql);
|
|
2520
2520
|
}), []), t ? {
|
|
2521
2521
|
locale: "en-US",
|
|
@@ -2648,7 +2648,7 @@ function sn(t, e) {
|
|
|
2648
2648
|
ref: e
|
|
2649
2649
|
}), { focusableProps: C } = Ct(t, e);
|
|
2650
2650
|
d && (C.tabIndex = r ? -1 : C.tabIndex);
|
|
2651
|
-
let T = U(C, x,
|
|
2651
|
+
let T = U(C, x, $e(t, {
|
|
2652
2652
|
labelable: !0
|
|
2653
2653
|
}));
|
|
2654
2654
|
return {
|
|
@@ -2681,25 +2681,25 @@ function bo(t, e) {
|
|
|
2681
2681
|
return t.nodeName !== "#comment" && Jf(t) && Qf(t, e) && (!t.parentElement || bo(t.parentElement, t));
|
|
2682
2682
|
}
|
|
2683
2683
|
const ri = /* @__PURE__ */ D.createContext(null), Br = "react-aria-focus-scope-restore";
|
|
2684
|
-
let
|
|
2684
|
+
let se = null;
|
|
2685
2685
|
function cn(t) {
|
|
2686
|
-
let { children: e, contain: n, restoreFocus: r, autoFocus: l } = t, i =
|
|
2686
|
+
let { children: e, contain: n, restoreFocus: r, autoFocus: l } = t, i = K(null), o = K(null), u = K([]), { parentNode: a } = q(ri) || {}, s = H(() => new Mr({
|
|
2687
2687
|
scopeRef: u
|
|
2688
2688
|
}), [
|
|
2689
2689
|
u
|
|
2690
2690
|
]);
|
|
2691
2691
|
Q(() => {
|
|
2692
|
-
let f = a ||
|
|
2693
|
-
if (
|
|
2694
|
-
let p =
|
|
2692
|
+
let f = a || be.root;
|
|
2693
|
+
if (be.getTreeNode(f.scopeRef) && se && !Mn(se, f.scopeRef)) {
|
|
2694
|
+
let p = be.getTreeNode(se);
|
|
2695
2695
|
p && (f = p);
|
|
2696
2696
|
}
|
|
2697
|
-
f.addChild(s),
|
|
2697
|
+
f.addChild(s), be.addNode(s);
|
|
2698
2698
|
}, [
|
|
2699
2699
|
s,
|
|
2700
2700
|
a
|
|
2701
2701
|
]), Q(() => {
|
|
2702
|
-
let f =
|
|
2702
|
+
let f = be.getTreeNode(u);
|
|
2703
2703
|
f && (f.contain = !!n);
|
|
2704
2704
|
}, [
|
|
2705
2705
|
n
|
|
@@ -2713,19 +2713,19 @@ function cn(t) {
|
|
|
2713
2713
|
};
|
|
2714
2714
|
}, [
|
|
2715
2715
|
e
|
|
2716
|
-
]), lp(u, r, n), tp(u, n), ip(u, r, n), rp(u, l),
|
|
2716
|
+
]), lp(u, r, n), tp(u, n), ip(u, r, n), rp(u, l), j(() => {
|
|
2717
2717
|
const f = ke(oe(u.current ? u.current[0] : void 0));
|
|
2718
2718
|
let p = null;
|
|
2719
2719
|
if (_e(f, u.current)) {
|
|
2720
|
-
for (let v of
|
|
2721
|
-
p ===
|
|
2720
|
+
for (let v of be.traverse()) v.scopeRef && _e(f, v.scopeRef.current) && (p = v);
|
|
2721
|
+
p === be.getTreeNode(u) && (se = p.scopeRef);
|
|
2722
2722
|
}
|
|
2723
2723
|
}, [
|
|
2724
2724
|
u
|
|
2725
2725
|
]), Q(() => () => {
|
|
2726
2726
|
var f, p, v;
|
|
2727
|
-
let b = (v = (p =
|
|
2728
|
-
(u ===
|
|
2727
|
+
let b = (v = (p = be.getTreeNode(u)) === null || p === void 0 || (f = p.parent) === null || f === void 0 ? void 0 : f.scopeRef) !== null && v !== void 0 ? v : null;
|
|
2728
|
+
(u === se || Mn(u, se)) && (!b || be.getTreeNode(b)) && (se = b), be.removeTreeNode(u);
|
|
2729
2729
|
}, [
|
|
2730
2730
|
u
|
|
2731
2731
|
]);
|
|
@@ -2796,7 +2796,7 @@ function $t(t) {
|
|
|
2796
2796
|
return t[0].parentElement;
|
|
2797
2797
|
}
|
|
2798
2798
|
function Jt(t) {
|
|
2799
|
-
let e =
|
|
2799
|
+
let e = be.getTreeNode(se);
|
|
2800
2800
|
for (; e && e.scopeRef !== t; ) {
|
|
2801
2801
|
if (e.contain) return !1;
|
|
2802
2802
|
e = e.parent;
|
|
@@ -2804,7 +2804,7 @@ function Jt(t) {
|
|
|
2804
2804
|
return !0;
|
|
2805
2805
|
}
|
|
2806
2806
|
function tp(t, e) {
|
|
2807
|
-
let n =
|
|
2807
|
+
let n = K(void 0), r = K(void 0);
|
|
2808
2808
|
Q(() => {
|
|
2809
2809
|
let l = t.current;
|
|
2810
2810
|
if (!e) {
|
|
@@ -2824,17 +2824,17 @@ function tp(t, e) {
|
|
|
2824
2824
|
let v = s.shiftKey ? p.previousNode() : p.nextNode();
|
|
2825
2825
|
v || (p.currentNode = s.shiftKey ? c[c.length - 1].nextElementSibling : c[0].previousElementSibling, v = s.shiftKey ? p.previousNode() : p.nextNode()), s.preventDefault(), v && Qe(v, !0);
|
|
2826
2826
|
}, u = (s) => {
|
|
2827
|
-
(!
|
|
2827
|
+
(!se || Mn(se, t)) && _e(le(s), t.current) ? (se = t, n.current = le(s)) : Jt(t) && !st(le(s), t) ? n.current ? n.current.focus() : se && se.current && Kr(se.current) : Jt(t) && (n.current = le(s));
|
|
2828
2828
|
}, a = (s) => {
|
|
2829
2829
|
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2830
2830
|
let d = ln(), c = (d === "virtual" || d === null) && tn() && Ui(), f = ke(i);
|
|
2831
2831
|
if (!c && f && Jt(t) && !st(f, t)) {
|
|
2832
|
-
|
|
2832
|
+
se = t;
|
|
2833
2833
|
let v = le(s);
|
|
2834
2834
|
if (v && v.isConnected) {
|
|
2835
2835
|
var p;
|
|
2836
2836
|
n.current = v, (p = n.current) === null || p === void 0 || p.focus();
|
|
2837
|
-
} else
|
|
2837
|
+
} else se.current && Kr(se.current);
|
|
2838
2838
|
}
|
|
2839
2839
|
});
|
|
2840
2840
|
};
|
|
@@ -2858,16 +2858,16 @@ function _e(t, e) {
|
|
|
2858
2858
|
}
|
|
2859
2859
|
function st(t, e = null) {
|
|
2860
2860
|
if (t instanceof Element && t.closest("[data-react-aria-top-layer]")) return !0;
|
|
2861
|
-
for (let { scopeRef: n } of
|
|
2861
|
+
for (let { scopeRef: n } of be.traverse(be.getTreeNode(e)))
|
|
2862
2862
|
if (n && _e(t, n.current)) return !0;
|
|
2863
2863
|
return !1;
|
|
2864
2864
|
}
|
|
2865
2865
|
function np(t) {
|
|
2866
|
-
return st(t,
|
|
2866
|
+
return st(t, se);
|
|
2867
2867
|
}
|
|
2868
2868
|
function Mn(t, e) {
|
|
2869
2869
|
var n;
|
|
2870
|
-
let r = (n =
|
|
2870
|
+
let r = (n = be.getTreeNode(e)) === null || n === void 0 ? void 0 : n.parent;
|
|
2871
2871
|
for (; r; ) {
|
|
2872
2872
|
if (r.scopeRef === t) return !0;
|
|
2873
2873
|
r = r.parent;
|
|
@@ -2899,11 +2899,11 @@ function Kr(t, e = !0) {
|
|
|
2899
2899
|
}
|
|
2900
2900
|
function rp(t, e) {
|
|
2901
2901
|
const n = D.useRef(e);
|
|
2902
|
-
|
|
2902
|
+
j(() => {
|
|
2903
2903
|
if (n.current) {
|
|
2904
|
-
|
|
2904
|
+
se = t;
|
|
2905
2905
|
const r = oe(t.current ? t.current[0] : void 0);
|
|
2906
|
-
!_e(ke(r),
|
|
2906
|
+
!_e(ke(r), se.current) && t.current && Kr(t.current);
|
|
2907
2907
|
}
|
|
2908
2908
|
n.current = !1;
|
|
2909
2909
|
}, [
|
|
@@ -2917,7 +2917,7 @@ function lp(t, e, n) {
|
|
|
2917
2917
|
const l = oe(r ? r[0] : void 0);
|
|
2918
2918
|
let i = (o) => {
|
|
2919
2919
|
let u = le(o);
|
|
2920
|
-
_e(u, t.current) ?
|
|
2920
|
+
_e(u, t.current) ? se = t : mo(u) || (se = null);
|
|
2921
2921
|
};
|
|
2922
2922
|
return l.addEventListener("focusin", i, !1), r == null || r.forEach((o) => o.addEventListener("focusin", i, !1)), () => {
|
|
2923
2923
|
l.removeEventListener("focusin", i, !1), r == null || r.forEach((o) => o.removeEventListener("focusin", i, !1));
|
|
@@ -2929,7 +2929,7 @@ function lp(t, e, n) {
|
|
|
2929
2929
|
]);
|
|
2930
2930
|
}
|
|
2931
2931
|
function li(t) {
|
|
2932
|
-
let e =
|
|
2932
|
+
let e = be.getTreeNode(se);
|
|
2933
2933
|
for (; e && e.scopeRef !== t; ) {
|
|
2934
2934
|
if (e.nodeToRestore) return !1;
|
|
2935
2935
|
e = e.parent;
|
|
@@ -2937,13 +2937,13 @@ function li(t) {
|
|
|
2937
2937
|
return (e == null ? void 0 : e.scopeRef) === t;
|
|
2938
2938
|
}
|
|
2939
2939
|
function ip(t, e, n) {
|
|
2940
|
-
const r =
|
|
2940
|
+
const r = K(typeof document < "u" ? ke(oe(t.current ? t.current[0] : void 0)) : null);
|
|
2941
2941
|
Q(() => {
|
|
2942
2942
|
let l = t.current;
|
|
2943
2943
|
const i = oe(l ? l[0] : void 0);
|
|
2944
2944
|
if (!e || n) return;
|
|
2945
2945
|
let o = () => {
|
|
2946
|
-
(!
|
|
2946
|
+
(!se || Mn(se, t)) && _e(ke(i), t.current) && (se = t);
|
|
2947
2947
|
};
|
|
2948
2948
|
return i.addEventListener("focusin", o, !1), l == null || l.forEach((u) => u.addEventListener("focusin", o, !1)), () => {
|
|
2949
2949
|
i.removeEventListener("focusin", o, !1), l == null || l.forEach((u) => u.removeEventListener("focusin", o, !1));
|
|
@@ -2958,7 +2958,7 @@ function ip(t, e, n) {
|
|
|
2958
2958
|
if (o.key !== "Tab" || o.altKey || o.ctrlKey || o.metaKey || !Jt(t) || o.isComposing) return;
|
|
2959
2959
|
let u = l.activeElement;
|
|
2960
2960
|
if (!st(u, t) || !li(t)) return;
|
|
2961
|
-
let a =
|
|
2961
|
+
let a = be.getTreeNode(t);
|
|
2962
2962
|
if (!a) return;
|
|
2963
2963
|
let s = a.nodeToRestore, d = Be(l.body, {
|
|
2964
2964
|
tabbable: !0
|
|
@@ -2983,15 +2983,15 @@ function ip(t, e, n) {
|
|
|
2983
2983
|
]), Q(() => {
|
|
2984
2984
|
const l = oe(t.current ? t.current[0] : void 0);
|
|
2985
2985
|
if (!e) return;
|
|
2986
|
-
let i =
|
|
2986
|
+
let i = be.getTreeNode(t);
|
|
2987
2987
|
if (i) {
|
|
2988
2988
|
var o;
|
|
2989
2989
|
return i.nodeToRestore = (o = r.current) !== null && o !== void 0 ? o : void 0, () => {
|
|
2990
|
-
let u =
|
|
2990
|
+
let u = be.getTreeNode(t);
|
|
2991
2991
|
if (!u) return;
|
|
2992
2992
|
let a = u.nodeToRestore, s = ke(l);
|
|
2993
2993
|
if (e && a && (s && st(s, t) || s === l.body && li(t))) {
|
|
2994
|
-
let d =
|
|
2994
|
+
let d = be.clone();
|
|
2995
2995
|
requestAnimationFrame(() => {
|
|
2996
2996
|
if (l.activeElement === l.body) {
|
|
2997
2997
|
let c = d.getTreeNode(t);
|
|
@@ -3003,7 +3003,7 @@ function ip(t, e, n) {
|
|
|
3003
3003
|
c = c.parent;
|
|
3004
3004
|
}
|
|
3005
3005
|
for (c = d.getTreeNode(t); c; ) {
|
|
3006
|
-
if (c.scopeRef && c.scopeRef.current &&
|
|
3006
|
+
if (c.scopeRef && c.scopeRef.current && be.getTreeNode(c.scopeRef)) {
|
|
3007
3007
|
let f = go(c.scopeRef.current, !0);
|
|
3008
3008
|
ii(f);
|
|
3009
3009
|
return;
|
|
@@ -3090,9 +3090,9 @@ class Mr {
|
|
|
3090
3090
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
|
-
let
|
|
3093
|
+
let be = new il();
|
|
3094
3094
|
function qn(t = {}) {
|
|
3095
|
-
let { autoFocus: e = !1, isTextInput: n, within: r } = t, l =
|
|
3095
|
+
let { autoFocus: e = !1, isTextInput: n, within: r } = t, l = K({
|
|
3096
3096
|
isFocused: !1,
|
|
3097
3097
|
isFocusVisible: e || pt()
|
|
3098
3098
|
}), [i, o] = W(!1), [u, a] = W(() => l.current.isFocused && l.current.isFocusVisible), s = te(() => a(l.current.isFocused && l.current.isFocusVisible), []), d = te((p) => {
|
|
@@ -3258,14 +3258,14 @@ function fp(t) {
|
|
|
3258
3258
|
validationDetails: Eo
|
|
3259
3259
|
} : null, s = H(() => {
|
|
3260
3260
|
if (!o || l == null) return null;
|
|
3261
|
-
let
|
|
3262
|
-
return ui(
|
|
3261
|
+
let B = pp(o, l);
|
|
3262
|
+
return ui(B);
|
|
3263
3263
|
}, [
|
|
3264
3264
|
o,
|
|
3265
3265
|
l
|
|
3266
3266
|
]);
|
|
3267
3267
|
i != null && i.validationDetails.valid && (i = void 0);
|
|
3268
|
-
let d = q(dp), c = H(() => r ? Array.isArray(r) ? r.flatMap((
|
|
3268
|
+
let d = q(dp), c = H(() => r ? Array.isArray(r) ? r.flatMap((B) => Nr(d[B])) : Nr(d[r]) : [], [
|
|
3269
3269
|
d,
|
|
3270
3270
|
r
|
|
3271
3271
|
]), [f, p] = W(d), [v, b] = W(!1);
|
|
@@ -3273,24 +3273,24 @@ function fp(t) {
|
|
|
3273
3273
|
let $ = H(() => ui(v ? [] : c), [
|
|
3274
3274
|
v,
|
|
3275
3275
|
c
|
|
3276
|
-
]), x =
|
|
3276
|
+
]), x = K(Ut), [E, C] = W(Ut), T = K(Ut), S = () => {
|
|
3277
3277
|
if (!P) return;
|
|
3278
|
-
|
|
3279
|
-
let
|
|
3280
|
-
pr(
|
|
3281
|
-
}, [P,
|
|
3282
|
-
return
|
|
3278
|
+
N(!1);
|
|
3279
|
+
let B = s || i || x.current;
|
|
3280
|
+
pr(B, T.current) || (T.current = B, C(B));
|
|
3281
|
+
}, [P, N] = W(!1);
|
|
3282
|
+
return j(S), {
|
|
3283
3283
|
realtimeValidation: a || $ || s || i || Ut,
|
|
3284
3284
|
displayValidation: u === "native" ? a || $ || E : a || $ || s || i || E,
|
|
3285
|
-
updateValidation(
|
|
3286
|
-
u === "aria" && !pr(E,
|
|
3285
|
+
updateValidation(B) {
|
|
3286
|
+
u === "aria" && !pr(E, B) ? C(B) : x.current = B;
|
|
3287
3287
|
},
|
|
3288
3288
|
resetValidation() {
|
|
3289
|
-
let
|
|
3290
|
-
pr(
|
|
3289
|
+
let B = Ut;
|
|
3290
|
+
pr(B, T.current) || (T.current = B, C(B)), u === "native" && N(!1), b(!0);
|
|
3291
3291
|
},
|
|
3292
3292
|
commitValidation() {
|
|
3293
|
-
u === "native" &&
|
|
3293
|
+
u === "native" && N(!0), b(!0);
|
|
3294
3294
|
}
|
|
3295
3295
|
};
|
|
3296
3296
|
}
|
|
@@ -3324,9 +3324,9 @@ function ul(t, e, n) {
|
|
|
3324
3324
|
n.current.setCustomValidity(a), n.current.hasAttribute("title") || (n.current.title = ""), e.realtimeValidation.isInvalid || e.updateValidation(hp(n.current));
|
|
3325
3325
|
}
|
|
3326
3326
|
});
|
|
3327
|
-
let i =
|
|
3327
|
+
let i = de(() => {
|
|
3328
3328
|
e.resetValidation();
|
|
3329
|
-
}), o =
|
|
3329
|
+
}), o = de((a) => {
|
|
3330
3330
|
var s;
|
|
3331
3331
|
e.displayValidation.isInvalid || e.commitValidation();
|
|
3332
3332
|
let d = n == null || (s = n.current) === null || s === void 0 ? void 0 : s.form;
|
|
@@ -3335,10 +3335,10 @@ function ul(t, e, n) {
|
|
|
3335
3335
|
l ? l() : (c = n.current) === null || c === void 0 || c.focus(), co("keyboard");
|
|
3336
3336
|
}
|
|
3337
3337
|
a.preventDefault();
|
|
3338
|
-
}), u =
|
|
3338
|
+
}), u = de(() => {
|
|
3339
3339
|
e.commitValidation();
|
|
3340
3340
|
});
|
|
3341
|
-
|
|
3341
|
+
j(() => {
|
|
3342
3342
|
let a = n == null ? void 0 : n.current;
|
|
3343
3343
|
if (!a) return;
|
|
3344
3344
|
let s = a.form;
|
|
@@ -3398,7 +3398,7 @@ function mp(t, e, n) {
|
|
|
3398
3398
|
e.toggle(), (P = n.current) === null || P === void 0 || P.focus();
|
|
3399
3399
|
},
|
|
3400
3400
|
isDisabled: r || l
|
|
3401
|
-
}), { focusableProps: C } = Ct(t, n), T = U(b, C), S =
|
|
3401
|
+
}), { focusableProps: C } = Ct(t, n), T = U(b, C), S = $e(t, {
|
|
3402
3402
|
labelable: !0
|
|
3403
3403
|
});
|
|
3404
3404
|
return Wn(n, e.isSelected, e.setSelected), {
|
|
@@ -3428,8 +3428,8 @@ function mp(t, e, n) {
|
|
|
3428
3428
|
}
|
|
3429
3429
|
function So(t) {
|
|
3430
3430
|
let { id: e, label: n, "aria-labelledby": r, "aria-label": l, labelElementType: i = "label" } = t;
|
|
3431
|
-
e =
|
|
3432
|
-
let o =
|
|
3431
|
+
e = me(e);
|
|
3432
|
+
let o = me(), u = {};
|
|
3433
3433
|
n ? (r = r ? `${o} ${r}` : o, u = {
|
|
3434
3434
|
id: o,
|
|
3435
3435
|
htmlFor: i === "label" ? e : void 0
|
|
@@ -3529,14 +3529,14 @@ function wo(t, e) {
|
|
|
3529
3529
|
...t,
|
|
3530
3530
|
isInvalid: f,
|
|
3531
3531
|
errorMessage: t.errorMessage || p
|
|
3532
|
-
}), C =
|
|
3532
|
+
}), C = $e(t, {
|
|
3533
3533
|
labelable: !0
|
|
3534
3534
|
});
|
|
3535
3535
|
const T = {
|
|
3536
3536
|
type: o,
|
|
3537
3537
|
pattern: t.pattern
|
|
3538
3538
|
};
|
|
3539
|
-
return Wn(e, a, s), ul(t, c, e),
|
|
3539
|
+
return Wn(e, a, s), ul(t, c, e), j(() => {
|
|
3540
3540
|
if (e.current instanceof Ce(e.current).HTMLTextAreaElement) {
|
|
3541
3541
|
let S = e.current;
|
|
3542
3542
|
Object.defineProperty(S, "defaultValue", {
|
|
@@ -3616,26 +3616,26 @@ const Ge = {
|
|
|
3616
3616
|
width: "totalWidth",
|
|
3617
3617
|
height: "totalHeight"
|
|
3618
3618
|
}, $n = {};
|
|
3619
|
-
let
|
|
3619
|
+
let ge = typeof document < "u" ? window.visualViewport : null;
|
|
3620
3620
|
function si(t) {
|
|
3621
3621
|
let e = 0, n = 0, r = 0, l = 0, i = 0, o = 0, u = {};
|
|
3622
3622
|
var a;
|
|
3623
|
-
let s = ((a =
|
|
3623
|
+
let s = ((a = ge == null ? void 0 : ge.scale) !== null && a !== void 0 ? a : 1) > 1;
|
|
3624
3624
|
if (t.tagName === "BODY") {
|
|
3625
3625
|
let v = document.documentElement;
|
|
3626
3626
|
r = v.clientWidth, l = v.clientHeight;
|
|
3627
3627
|
var d;
|
|
3628
|
-
e = (d =
|
|
3628
|
+
e = (d = ge == null ? void 0 : ge.width) !== null && d !== void 0 ? d : r;
|
|
3629
3629
|
var c;
|
|
3630
|
-
n = (c =
|
|
3630
|
+
n = (c = ge == null ? void 0 : ge.height) !== null && c !== void 0 ? c : l, u.top = v.scrollTop || t.scrollTop, u.left = v.scrollLeft || t.scrollLeft, ge && (i = ge.offsetTop, o = ge.offsetLeft);
|
|
3631
3631
|
} else
|
|
3632
3632
|
({ width: e, height: n, top: i, left: o } = Ft(t)), u.top = t.scrollTop, u.left = t.scrollLeft, r = e, l = n;
|
|
3633
3633
|
if (Jr() && (t.tagName === "BODY" || t.tagName === "HTML") && s) {
|
|
3634
3634
|
u.top = 0, u.left = 0;
|
|
3635
3635
|
var f;
|
|
3636
|
-
i = (f =
|
|
3636
|
+
i = (f = ge == null ? void 0 : ge.pageTop) !== null && f !== void 0 ? f : 0;
|
|
3637
3637
|
var p;
|
|
3638
|
-
o = (p =
|
|
3638
|
+
o = (p = ge == null ? void 0 : ge.pageLeft) !== null && p !== void 0 ? p : 0;
|
|
3639
3639
|
}
|
|
3640
3640
|
return {
|
|
3641
3641
|
width: e,
|
|
@@ -3689,8 +3689,8 @@ function vr(t, e, n, r, l, i, o, u, a, s) {
|
|
|
3689
3689
|
$[p] = (x = t[p]) !== null && x !== void 0 ? x : 0;
|
|
3690
3690
|
var E, C, T, S;
|
|
3691
3691
|
c === "center" ? $[p] += (((E = t[b]) !== null && E !== void 0 ? E : 0) - ((C = n[b]) !== null && C !== void 0 ? C : 0)) / 2 : c !== p && ($[p] += ((T = t[b]) !== null && T !== void 0 ? T : 0) - ((S = n[b]) !== null && S !== void 0 ? S : 0)), $[p] += i;
|
|
3692
|
-
const P = t[p] - n[b] + a + s,
|
|
3693
|
-
if ($[p] = Pr($[p], P,
|
|
3692
|
+
const P = t[p] - n[b] + a + s, N = t[p] + t[b] - a - s;
|
|
3693
|
+
if ($[p] = Pr($[p], P, N), d === f) {
|
|
3694
3694
|
const R = u ? o[v] : e[Po[v]];
|
|
3695
3695
|
$[In[f]] = Math.floor(R - t[f] + l);
|
|
3696
3696
|
} else $[f] = Math.floor(t[f] + t[v] + l);
|
|
@@ -3715,22 +3715,22 @@ function fi(t, e, n, r, l, i) {
|
|
|
3715
3715
|
return Math.max(0, t[a] + t[u] + t.scroll[u] - e[u] - n[u] - n[a] - ((c = r[u]) !== null && c !== void 0 ? c : 0) - r[In[u]] - l);
|
|
3716
3716
|
}
|
|
3717
3717
|
function Sp(t, e, n, r, l, i, o, u, a, s, d, c, f, p, v, b) {
|
|
3718
|
-
let $ = di(t), { size: x, crossAxis: E, crossSize: C, placement: T, crossPlacement: S } = $, P = vr(e, u, n, $, d, c, s, f, v, b),
|
|
3718
|
+
let $ = di(t), { size: x, crossAxis: E, crossSize: C, placement: T, crossPlacement: S } = $, P = vr(e, u, n, $, d, c, s, f, v, b), N = d, R = fi(u, s, e, l, i + d, $);
|
|
3719
3719
|
if (o && r[x] > R) {
|
|
3720
3720
|
let Le = di(`${In[T]} ${S}`), Ye = vr(e, u, n, Le, d, c, s, f, v, b);
|
|
3721
|
-
fi(u, s, e, l, i + d, Le) > R && ($ = Le, P = Ye,
|
|
3722
|
-
}
|
|
3723
|
-
let
|
|
3724
|
-
$.axis === "top" ? $.placement === "top" ?
|
|
3725
|
-
let
|
|
3726
|
-
P[E] +=
|
|
3727
|
-
let g = Ep(P, u, s, f, l, i, n.height,
|
|
3728
|
-
p && p < g && (g = p), n.height = Math.min(n.height, g), P = vr(e, u, n, $,
|
|
3721
|
+
fi(u, s, e, l, i + d, Le) > R && ($ = Le, P = Ye, N = d);
|
|
3722
|
+
}
|
|
3723
|
+
let I = "bottom";
|
|
3724
|
+
$.axis === "top" ? $.placement === "top" ? I = "top" : $.placement === "bottom" && (I = "bottom") : $.crossAxis === "top" && ($.crossPlacement === "top" ? I = "bottom" : $.crossPlacement === "bottom" && (I = "top"));
|
|
3725
|
+
let B = ci(E, P[E], n[C], u, a, i, s);
|
|
3726
|
+
P[E] += B;
|
|
3727
|
+
let g = Ep(P, u, s, f, l, i, n.height, I);
|
|
3728
|
+
p && p < g && (g = p), n.height = Math.min(n.height, g), P = vr(e, u, n, $, N, c, s, f, v, b), B = ci(E, P[E], n[C], u, a, i, s), P[E] += B;
|
|
3729
3729
|
let F = {}, _ = e[E] + 0.5 * e[C] - P[E] - l[Ge[E]];
|
|
3730
3730
|
const k = v / 2 + b;
|
|
3731
3731
|
var O, h, A, w;
|
|
3732
|
-
const
|
|
3733
|
-
return F[E] = Pr(
|
|
3732
|
+
const z = Ge[E] === "left" ? ((O = l.left) !== null && O !== void 0 ? O : 0) + ((h = l.right) !== null && h !== void 0 ? h : 0) : ((A = l.top) !== null && A !== void 0 ? A : 0) + ((w = l.bottom) !== null && w !== void 0 ? w : 0), X = n[C] - z - v / 2 - b, Z = e[E] + v / 2 - (P[E] + l[Ge[E]]), ue = e[E] + e[C] - v / 2 - (P[E] + l[Ge[E]]), fe = Pr(_, Z, ue);
|
|
3733
|
+
return F[E] = Pr(fe, k, X), {
|
|
3734
3734
|
position: P,
|
|
3735
3735
|
maxHeight: g,
|
|
3736
3736
|
arrowOffsetLeft: F.left,
|
|
@@ -3749,10 +3749,10 @@ function Cp(t) {
|
|
|
3749
3749
|
let E = Ft(r), C = xp(r);
|
|
3750
3750
|
var T, S;
|
|
3751
3751
|
E.width += ((T = C.left) !== null && T !== void 0 ? T : 0) + ((S = C.right) !== null && S !== void 0 ? S : 0);
|
|
3752
|
-
var P,
|
|
3753
|
-
E.height += ((P = C.top) !== null && P !== void 0 ? P : 0) + ((
|
|
3754
|
-
let R = $p(l),
|
|
3755
|
-
return p.tagName === "HTML" && u.tagName === "BODY" && (
|
|
3752
|
+
var P, N;
|
|
3753
|
+
E.height += ((P = C.top) !== null && P !== void 0 ? P : 0) + ((N = C.bottom) !== null && N !== void 0 ? N : 0);
|
|
3754
|
+
let R = $p(l), I = si(u), B = si(p), g = u.tagName === "BODY" ? Ft(p) : pi(p, u);
|
|
3755
|
+
return p.tagName === "HTML" && u.tagName === "BODY" && (B.scroll.top = 0, B.scroll.left = 0), Sp(e, x, E, R, C, i, o, I, B, g, a, s, $, d, c, f);
|
|
3756
3756
|
}
|
|
3757
3757
|
function Ft(t) {
|
|
3758
3758
|
let { top: e, left: n, width: r, height: l } = t.getBoundingClientRect(), { scrollTop: i, scrollLeft: o, clientTop: u, clientLeft: a } = document.documentElement;
|
|
@@ -3793,7 +3793,7 @@ function vi(t) {
|
|
|
3793
3793
|
const Do = /* @__PURE__ */ new WeakMap();
|
|
3794
3794
|
function Pp(t) {
|
|
3795
3795
|
let { triggerRef: e, isOpen: n, onClose: r } = t;
|
|
3796
|
-
|
|
3796
|
+
j(() => {
|
|
3797
3797
|
if (!n || r === null) return;
|
|
3798
3798
|
let l = (i) => {
|
|
3799
3799
|
let o = i.target;
|
|
@@ -3810,7 +3810,7 @@ function Pp(t) {
|
|
|
3810
3810
|
e
|
|
3811
3811
|
]);
|
|
3812
3812
|
}
|
|
3813
|
-
let
|
|
3813
|
+
let ve = typeof document < "u" ? window.visualViewport : null;
|
|
3814
3814
|
function ko(t) {
|
|
3815
3815
|
let { direction: e } = je(), { arrowSize: n = 0, targetRef: r, overlayRef: l, scrollRef: i = l, placement: o = "bottom", containerPadding: u = 12, shouldFlip: a = !0, boundaryElement: s = typeof document < "u" ? document.body : null, offset: d = 0, crossOffset: c = 0, shouldUpdatePosition: f = !0, isOpen: p = !0, onClose: v, maxHeight: b, arrowBoundaryOffset: $ = 0 } = t, [x, E] = W(null), C = [
|
|
3816
3816
|
f,
|
|
@@ -3828,26 +3828,26 @@ function ko(t) {
|
|
|
3828
3828
|
b,
|
|
3829
3829
|
$,
|
|
3830
3830
|
n
|
|
3831
|
-
], T =
|
|
3832
|
-
|
|
3833
|
-
p && (T.current =
|
|
3831
|
+
], T = K(ve == null ? void 0 : ve.scale);
|
|
3832
|
+
j(() => {
|
|
3833
|
+
p && (T.current = ve == null ? void 0 : ve.scale);
|
|
3834
3834
|
}, [
|
|
3835
3835
|
p
|
|
3836
3836
|
]);
|
|
3837
3837
|
let S = te(() => {
|
|
3838
|
-
if (f === !1 || !p || !l.current || !r.current || !s || (
|
|
3839
|
-
let
|
|
3838
|
+
if (f === !1 || !p || !l.current || !r.current || !s || (ve == null ? void 0 : ve.scale) !== T.current) return;
|
|
3839
|
+
let B = null;
|
|
3840
3840
|
if (i.current && i.current.contains(document.activeElement)) {
|
|
3841
3841
|
var g;
|
|
3842
|
-
let w = (g = document.activeElement) === null || g === void 0 ? void 0 : g.getBoundingClientRect(),
|
|
3842
|
+
let w = (g = document.activeElement) === null || g === void 0 ? void 0 : g.getBoundingClientRect(), z = i.current.getBoundingClientRect();
|
|
3843
3843
|
var F;
|
|
3844
|
-
if (
|
|
3844
|
+
if (B = {
|
|
3845
3845
|
type: "top",
|
|
3846
|
-
offset: ((F = w == null ? void 0 : w.top) !== null && F !== void 0 ? F : 0) -
|
|
3847
|
-
},
|
|
3848
|
-
|
|
3846
|
+
offset: ((F = w == null ? void 0 : w.top) !== null && F !== void 0 ? F : 0) - z.top
|
|
3847
|
+
}, B.offset > z.height / 2) {
|
|
3848
|
+
B.type = "bottom";
|
|
3849
3849
|
var _;
|
|
3850
|
-
|
|
3850
|
+
B.offset = ((_ = w == null ? void 0 : w.bottom) !== null && _ !== void 0 ? _ : 0) - z.bottom;
|
|
3851
3851
|
}
|
|
3852
3852
|
}
|
|
3853
3853
|
let k = l.current;
|
|
@@ -3872,9 +3872,9 @@ function ko(t) {
|
|
|
3872
3872
|
arrowBoundaryOffset: $
|
|
3873
3873
|
});
|
|
3874
3874
|
if (A.position) {
|
|
3875
|
-
if (k.style.top = "", k.style.bottom = "", k.style.left = "", k.style.right = "", Object.keys(A.position).forEach((w) => k.style[w] = A.position[w] + "px"), k.style.maxHeight = A.maxHeight != null ? A.maxHeight + "px" : "",
|
|
3876
|
-
let w = document.activeElement.getBoundingClientRect(),
|
|
3877
|
-
i.current.scrollTop +=
|
|
3875
|
+
if (k.style.top = "", k.style.bottom = "", k.style.left = "", k.style.right = "", Object.keys(A.position).forEach((w) => k.style[w] = A.position[w] + "px"), k.style.maxHeight = A.maxHeight != null ? A.maxHeight + "px" : "", B && document.activeElement && i.current) {
|
|
3876
|
+
let w = document.activeElement.getBoundingClientRect(), z = i.current.getBoundingClientRect(), X = w[B.type] - z[B.type];
|
|
3877
|
+
i.current.scrollTop += X - B.offset;
|
|
3878
3878
|
}
|
|
3879
3879
|
E(A);
|
|
3880
3880
|
}
|
|
@@ -3886,22 +3886,22 @@ function ko(t) {
|
|
|
3886
3886
|
ref: r,
|
|
3887
3887
|
onResize: S
|
|
3888
3888
|
});
|
|
3889
|
-
let P =
|
|
3889
|
+
let P = K(!1);
|
|
3890
3890
|
Q(() => {
|
|
3891
|
-
let
|
|
3892
|
-
P.current = !0, clearTimeout(
|
|
3891
|
+
let B, g = () => {
|
|
3892
|
+
P.current = !0, clearTimeout(B), B = setTimeout(() => {
|
|
3893
3893
|
P.current = !1;
|
|
3894
3894
|
}, 500), S();
|
|
3895
3895
|
}, F = () => {
|
|
3896
3896
|
P.current && g();
|
|
3897
3897
|
};
|
|
3898
|
-
return
|
|
3899
|
-
|
|
3898
|
+
return ve == null || ve.addEventListener("resize", g), ve == null || ve.addEventListener("scroll", F), () => {
|
|
3899
|
+
ve == null || ve.removeEventListener("resize", g), ve == null || ve.removeEventListener("scroll", F);
|
|
3900
3900
|
};
|
|
3901
3901
|
}, [
|
|
3902
3902
|
S
|
|
3903
3903
|
]);
|
|
3904
|
-
let
|
|
3904
|
+
let N = te(() => {
|
|
3905
3905
|
P.current || v == null || v();
|
|
3906
3906
|
}, [
|
|
3907
3907
|
v,
|
|
@@ -3910,9 +3910,9 @@ function ko(t) {
|
|
|
3910
3910
|
Pp({
|
|
3911
3911
|
triggerRef: r,
|
|
3912
3912
|
isOpen: p,
|
|
3913
|
-
onClose: v &&
|
|
3913
|
+
onClose: v && N
|
|
3914
3914
|
});
|
|
3915
|
-
var R,
|
|
3915
|
+
var R, I;
|
|
3916
3916
|
return {
|
|
3917
3917
|
overlayProps: {
|
|
3918
3918
|
style: {
|
|
@@ -3922,7 +3922,7 @@ function ko(t) {
|
|
|
3922
3922
|
maxHeight: (R = x == null ? void 0 : x.maxHeight) !== null && R !== void 0 ? R : "100vh"
|
|
3923
3923
|
}
|
|
3924
3924
|
},
|
|
3925
|
-
placement: (
|
|
3925
|
+
placement: (I = x == null ? void 0 : x.placement) !== null && I !== void 0 ? I : null,
|
|
3926
3926
|
arrowProps: {
|
|
3927
3927
|
"aria-hidden": "true",
|
|
3928
3928
|
role: "presentation",
|
|
@@ -3947,7 +3947,7 @@ function kp(t, e) {
|
|
|
3947
3947
|
const Ue = [];
|
|
3948
3948
|
function To(t, e) {
|
|
3949
3949
|
let { onClose: n, shouldCloseOnBlur: r, isOpen: l, isDismissable: i = !1, isKeyboardDismissDisabled: o = !1, shouldCloseOnInteractOutside: u } = t;
|
|
3950
|
-
|
|
3950
|
+
j(() => {
|
|
3951
3951
|
if (l && !Ue.includes(e))
|
|
3952
3952
|
return Ue.push(e), () => {
|
|
3953
3953
|
let v = Ue.indexOf(e);
|
|
@@ -3991,12 +3991,12 @@ function To(t, e) {
|
|
|
3991
3991
|
}
|
|
3992
3992
|
function Ao(t, e, n) {
|
|
3993
3993
|
let { type: r } = t, { isOpen: l } = e;
|
|
3994
|
-
|
|
3994
|
+
j(() => {
|
|
3995
3995
|
n && n.current && Do.set(n.current, e.close);
|
|
3996
3996
|
});
|
|
3997
3997
|
let i;
|
|
3998
3998
|
r === "menu" ? i = !0 : r === "listbox" && (i = "listbox");
|
|
3999
|
-
let o =
|
|
3999
|
+
let o = me();
|
|
4000
4000
|
return {
|
|
4001
4001
|
triggerProps: {
|
|
4002
4002
|
"aria-haspopup": i,
|
|
@@ -4482,7 +4482,7 @@ function jp(t, e, n) {
|
|
|
4482
4482
|
}, n);
|
|
4483
4483
|
return cl({
|
|
4484
4484
|
isDisabled: !e.isOpen
|
|
4485
|
-
}), bu(),
|
|
4485
|
+
}), bu(), j(() => {
|
|
4486
4486
|
if (e.isOpen && n.current) return pu([
|
|
4487
4487
|
n.current
|
|
4488
4488
|
]);
|
|
@@ -4513,7 +4513,7 @@ function wn(t, e) {
|
|
|
4513
4513
|
}
|
|
4514
4514
|
const mu = /* @__PURE__ */ new WeakMap();
|
|
4515
4515
|
function Hp(t) {
|
|
4516
|
-
let e =
|
|
4516
|
+
let e = me();
|
|
4517
4517
|
return mu.set(t, e), e;
|
|
4518
4518
|
}
|
|
4519
4519
|
function Wp(t) {
|
|
@@ -4521,7 +4521,7 @@ function Wp(t) {
|
|
|
4521
4521
|
}
|
|
4522
4522
|
const Up = 1e3;
|
|
4523
4523
|
function gu(t) {
|
|
4524
|
-
let { keyboardDelegate: e, selectionManager: n, onTypeSelect: r } = t, l =
|
|
4524
|
+
let { keyboardDelegate: e, selectionManager: n, onTypeSelect: r } = t, l = K({
|
|
4525
4525
|
search: "",
|
|
4526
4526
|
timeout: void 0
|
|
4527
4527
|
}).current, i = (o) => {
|
|
@@ -4568,15 +4568,15 @@ function yu(t) {
|
|
|
4568
4568
|
switch (h.key) {
|
|
4569
4569
|
case "ArrowDown":
|
|
4570
4570
|
if (n.getKeyBelow) {
|
|
4571
|
-
var
|
|
4572
|
-
let V = e.focusedKey != null ? (
|
|
4573
|
-
V == null && i && (V = (
|
|
4571
|
+
var z, X, Z;
|
|
4572
|
+
let V = e.focusedKey != null ? (z = n.getKeyBelow) === null || z === void 0 ? void 0 : z.call(n, e.focusedKey) : (X = n.getFirstKey) === null || X === void 0 ? void 0 : X.call(n);
|
|
4573
|
+
V == null && i && (V = (Z = n.getFirstKey) === null || Z === void 0 ? void 0 : Z.call(n, e.focusedKey)), V != null && (h.preventDefault(), w(V));
|
|
4574
4574
|
}
|
|
4575
4575
|
break;
|
|
4576
4576
|
case "ArrowUp":
|
|
4577
4577
|
if (n.getKeyAbove) {
|
|
4578
|
-
var
|
|
4579
|
-
let V = e.focusedKey != null ? (
|
|
4578
|
+
var ue, fe, Le;
|
|
4579
|
+
let V = e.focusedKey != null ? (ue = n.getKeyAbove) === null || ue === void 0 ? void 0 : ue.call(n, e.focusedKey) : (fe = n.getLastKey) === null || fe === void 0 ? void 0 : fe.call(n);
|
|
4580
4580
|
V == null && i && (V = (Le = n.getLastKey) === null || Le === void 0 ? void 0 : Le.call(n, e.focusedKey)), V != null && (h.preventDefault(), w(V));
|
|
4581
4581
|
}
|
|
4582
4582
|
break;
|
|
@@ -4643,15 +4643,15 @@ function yu(t) {
|
|
|
4643
4643
|
break;
|
|
4644
4644
|
}
|
|
4645
4645
|
}
|
|
4646
|
-
}, C =
|
|
4646
|
+
}, C = K({
|
|
4647
4647
|
top: 0,
|
|
4648
4648
|
left: 0
|
|
4649
4649
|
});
|
|
4650
4650
|
bn(v, "scroll", p ? void 0 : () => {
|
|
4651
|
-
var h, A, w,
|
|
4651
|
+
var h, A, w, z;
|
|
4652
4652
|
C.current = {
|
|
4653
4653
|
top: (w = (h = v.current) === null || h === void 0 ? void 0 : h.scrollTop) !== null && w !== void 0 ? w : 0,
|
|
4654
|
-
left: (
|
|
4654
|
+
left: (z = (A = v.current) === null || A === void 0 ? void 0 : A.scrollLeft) !== null && z !== void 0 ? z : 0
|
|
4655
4655
|
};
|
|
4656
4656
|
});
|
|
4657
4657
|
let T = (h) => {
|
|
@@ -4662,38 +4662,38 @@ function yu(t) {
|
|
|
4662
4662
|
if (h.currentTarget.contains(h.target)) {
|
|
4663
4663
|
if (e.setFocused(!0), e.focusedKey == null) {
|
|
4664
4664
|
var A, w;
|
|
4665
|
-
let
|
|
4666
|
-
|
|
4667
|
-
},
|
|
4668
|
-
var
|
|
4669
|
-
|
|
4665
|
+
let Z = (fe) => {
|
|
4666
|
+
fe != null && (e.setFocusedKey(fe), s && !e.isSelected(fe) && e.replaceSelection(fe));
|
|
4667
|
+
}, ue = h.relatedTarget;
|
|
4668
|
+
var z, X;
|
|
4669
|
+
ue && h.currentTarget.compareDocumentPosition(ue) & Node.DOCUMENT_POSITION_FOLLOWING ? Z((z = e.lastSelectedKey) !== null && z !== void 0 ? z : (A = n.getLastKey) === null || A === void 0 ? void 0 : A.call(n)) : Z((X = e.firstSelectedKey) !== null && X !== void 0 ? X : (w = n.getFirstKey) === null || w === void 0 ? void 0 : w.call(n));
|
|
4670
4670
|
} else !p && v.current && (v.current.scrollTop = C.current.top, v.current.scrollLeft = C.current.left);
|
|
4671
4671
|
if (e.focusedKey != null && v.current) {
|
|
4672
|
-
let
|
|
4673
|
-
|
|
4672
|
+
let Z = wn(r, e.focusedKey);
|
|
4673
|
+
Z instanceof HTMLElement && (!Z.contains(document.activeElement) && !c && Se(Z), ln() === "keyboard" && ut(Z, {
|
|
4674
4674
|
containingElement: r.current
|
|
4675
4675
|
}));
|
|
4676
4676
|
}
|
|
4677
4677
|
}
|
|
4678
4678
|
}, S = (h) => {
|
|
4679
4679
|
h.currentTarget.contains(h.relatedTarget) || e.setFocused(!1);
|
|
4680
|
-
}, P =
|
|
4680
|
+
}, P = K(!1);
|
|
4681
4681
|
bn(r, df, c ? (h) => {
|
|
4682
4682
|
let { detail: A } = h;
|
|
4683
4683
|
h.stopPropagation(), e.setFocused(!0), (A == null ? void 0 : A.focusStrategy) === "first" && (P.current = !0);
|
|
4684
4684
|
} : void 0);
|
|
4685
|
-
let
|
|
4685
|
+
let N = de(() => {
|
|
4686
4686
|
var h, A;
|
|
4687
4687
|
let w = (A = (h = n.getFirstKey) === null || h === void 0 ? void 0 : h.call(n)) !== null && A !== void 0 ? A : null;
|
|
4688
4688
|
w == null ? (yo(r.current), e.collection.size > 0 && (P.current = !1)) : (e.setFocusedKey(w), P.current = !1);
|
|
4689
4689
|
});
|
|
4690
4690
|
zl(() => {
|
|
4691
|
-
P.current &&
|
|
4691
|
+
P.current && N();
|
|
4692
4692
|
}, [
|
|
4693
4693
|
e.collection,
|
|
4694
|
-
|
|
4694
|
+
N
|
|
4695
4695
|
]);
|
|
4696
|
-
let R =
|
|
4696
|
+
let R = de(() => {
|
|
4697
4697
|
e.collection.size > 0 && (P.current = !1);
|
|
4698
4698
|
});
|
|
4699
4699
|
zl(() => {
|
|
@@ -4705,36 +4705,36 @@ function yu(t) {
|
|
|
4705
4705
|
var A;
|
|
4706
4706
|
h.stopPropagation(), e.setFocused(!1), !((A = h.detail) === null || A === void 0) && A.clearFocusKey && e.setFocusedKey(null);
|
|
4707
4707
|
} : void 0);
|
|
4708
|
-
const
|
|
4709
|
-
|
|
4710
|
-
if (
|
|
4708
|
+
const I = K(l), B = K(!1);
|
|
4709
|
+
j(() => {
|
|
4710
|
+
if (I.current) {
|
|
4711
4711
|
var h, A;
|
|
4712
|
-
let
|
|
4712
|
+
let X = null;
|
|
4713
4713
|
var w;
|
|
4714
|
-
l === "first" && (
|
|
4715
|
-
var
|
|
4716
|
-
l === "last" && (
|
|
4717
|
-
let
|
|
4718
|
-
if (
|
|
4719
|
-
for (let
|
|
4720
|
-
|
|
4714
|
+
l === "first" && (X = (w = (h = n.getFirstKey) === null || h === void 0 ? void 0 : h.call(n)) !== null && w !== void 0 ? w : null);
|
|
4715
|
+
var z;
|
|
4716
|
+
l === "last" && (X = (z = (A = n.getLastKey) === null || A === void 0 ? void 0 : A.call(n)) !== null && z !== void 0 ? z : null);
|
|
4717
|
+
let Z = e.selectedKeys;
|
|
4718
|
+
if (Z.size) {
|
|
4719
|
+
for (let ue of Z) if (e.canSelectItem(ue)) {
|
|
4720
|
+
X = ue;
|
|
4721
4721
|
break;
|
|
4722
4722
|
}
|
|
4723
4723
|
}
|
|
4724
|
-
e.setFocused(!0), e.setFocusedKey(
|
|
4724
|
+
e.setFocused(!0), e.setFocusedKey(X), X == null && !c && r.current && Ee(r.current), e.collection.size > 0 && (I.current = !1, B.current = !0);
|
|
4725
4725
|
}
|
|
4726
4726
|
});
|
|
4727
|
-
let g =
|
|
4728
|
-
|
|
4729
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== g.current ||
|
|
4727
|
+
let g = K(e.focusedKey);
|
|
4728
|
+
j(() => {
|
|
4729
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== g.current || B.current) && v.current && r.current) {
|
|
4730
4730
|
let h = ln(), A = wn(r, e.focusedKey);
|
|
4731
4731
|
if (!(A instanceof HTMLElement))
|
|
4732
4732
|
return;
|
|
4733
|
-
(h === "keyboard" ||
|
|
4733
|
+
(h === "keyboard" || B.current) && (Ji(v.current, A), h !== "virtual" && ut(A, {
|
|
4734
4734
|
containingElement: r.current
|
|
4735
4735
|
}));
|
|
4736
4736
|
}
|
|
4737
|
-
!c && e.isFocused && e.focusedKey == null && g.current != null && r.current && Ee(r.current), g.current = e.focusedKey,
|
|
4737
|
+
!c && e.isFocused && e.focusedKey == null && g.current != null && r.current && Ee(r.current), g.current = e.focusedKey, B.current = !1;
|
|
4738
4738
|
}), bn(r, "react-aria-focus-scope-restore", (h) => {
|
|
4739
4739
|
h.preventDefault(), e.setFocused(!0);
|
|
4740
4740
|
});
|
|
@@ -4762,22 +4762,22 @@ function yu(t) {
|
|
|
4762
4762
|
}
|
|
4763
4763
|
function Xn(t) {
|
|
4764
4764
|
let { id: e, selectionManager: n, key: r, ref: l, shouldSelectOnPressUp: i, shouldUseVirtualFocus: o, focus: u, isDisabled: a, onAction: s, allowsDifferentPressOrigin: d, linkBehavior: c = "action" } = t, f = un();
|
|
4765
|
-
e =
|
|
4765
|
+
e = me(e);
|
|
4766
4766
|
let p = (w) => {
|
|
4767
4767
|
if (w.pointerType === "keyboard" && _r(w)) n.toggleSelection(r);
|
|
4768
4768
|
else {
|
|
4769
4769
|
if (n.selectionMode === "none") return;
|
|
4770
4770
|
if (n.isLink(r)) {
|
|
4771
4771
|
if (c === "selection" && l.current) {
|
|
4772
|
-
let
|
|
4773
|
-
f.open(l.current, w,
|
|
4772
|
+
let z = n.getItemProps(r);
|
|
4773
|
+
f.open(l.current, w, z.href, z.routerOptions), n.setSelectedKeys(n.selectedKeys);
|
|
4774
4774
|
return;
|
|
4775
4775
|
} else if (c === "override" || c === "none") return;
|
|
4776
4776
|
}
|
|
4777
4777
|
n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : w && w.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || w && (Mt(w) || w.pointerType === "touch" || w.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
|
|
4778
4778
|
}
|
|
4779
4779
|
};
|
|
4780
|
-
|
|
4780
|
+
j(() => {
|
|
4781
4781
|
r === n.focusedKey && n.isFocused && (o ? yo(l.current) : u ? u() : document.activeElement !== l.current && l.current && Ee(l.current));
|
|
4782
4782
|
}, [
|
|
4783
4783
|
l,
|
|
@@ -4796,29 +4796,29 @@ function Xn(t) {
|
|
|
4796
4796
|
} : a && (v.onMouseDown = (w) => {
|
|
4797
4797
|
w.preventDefault();
|
|
4798
4798
|
});
|
|
4799
|
-
let b = n.isLink(r) && c === "override", $ = n.isLink(r) && c !== "selection" && c !== "none", x = !a && n.canSelectItem(r) && !b, E = (s || $) && !a, C = E && (n.selectionBehavior === "replace" ? !x : !x || n.isEmpty), T = E && x && n.selectionBehavior === "replace", S = C || T, P =
|
|
4799
|
+
let b = n.isLink(r) && c === "override", $ = n.isLink(r) && c !== "selection" && c !== "none", x = !a && n.canSelectItem(r) && !b, E = (s || $) && !a, C = E && (n.selectionBehavior === "replace" ? !x : !x || n.isEmpty), T = E && x && n.selectionBehavior === "replace", S = C || T, P = K(null), N = S && x, R = K(!1), I = K(!1), B = (w) => {
|
|
4800
4800
|
if (s && s(), $ && l.current) {
|
|
4801
|
-
let
|
|
4802
|
-
f.open(l.current, w,
|
|
4801
|
+
let z = n.getItemProps(r);
|
|
4802
|
+
f.open(l.current, w, z.href, z.routerOptions);
|
|
4803
4803
|
}
|
|
4804
4804
|
}, g = {
|
|
4805
4805
|
ref: l
|
|
4806
4806
|
};
|
|
4807
4807
|
i ? (g.onPressStart = (w) => {
|
|
4808
|
-
P.current = w.pointerType, R.current =
|
|
4808
|
+
P.current = w.pointerType, R.current = N, w.pointerType === "keyboard" && (!S || mi()) && p(w);
|
|
4809
4809
|
}, d ? (g.onPressUp = C ? void 0 : (w) => {
|
|
4810
4810
|
w.pointerType === "mouse" && x && p(w);
|
|
4811
|
-
}, g.onPress = C ?
|
|
4811
|
+
}, g.onPress = C ? B : (w) => {
|
|
4812
4812
|
w.pointerType !== "keyboard" && w.pointerType !== "mouse" && x && p(w);
|
|
4813
4813
|
}) : g.onPress = (w) => {
|
|
4814
4814
|
if (C || T && w.pointerType !== "mouse") {
|
|
4815
4815
|
if (w.pointerType === "keyboard" && !bi()) return;
|
|
4816
|
-
|
|
4816
|
+
B(w);
|
|
4817
4817
|
} else w.pointerType !== "keyboard" && x && p(w);
|
|
4818
4818
|
}) : (g.onPressStart = (w) => {
|
|
4819
|
-
P.current = w.pointerType, R.current =
|
|
4819
|
+
P.current = w.pointerType, R.current = N, I.current = C, x && (w.pointerType === "mouse" && !C || w.pointerType === "keyboard" && (!E || mi())) && p(w);
|
|
4820
4820
|
}, g.onPress = (w) => {
|
|
4821
|
-
(w.pointerType === "touch" || w.pointerType === "pen" || w.pointerType === "virtual" || w.pointerType === "keyboard" && S && bi() || w.pointerType === "mouse" &&
|
|
4821
|
+
(w.pointerType === "touch" || w.pointerType === "pen" || w.pointerType === "virtual" || w.pointerType === "keyboard" && S && bi() || w.pointerType === "mouse" && I.current) && (S ? B(w) : x && p(w));
|
|
4822
4822
|
}), v["data-collection"] = Wp(n.collection), v["data-key"] = r, g.preventFocusOnPress = o, o && (g = U(g, {
|
|
4823
4823
|
onPressStart(w) {
|
|
4824
4824
|
w.pointerType !== "touch" && (n.setFocused(!0), n.setFocusedKey(r));
|
|
@@ -4828,9 +4828,9 @@ function Xn(t) {
|
|
|
4828
4828
|
}
|
|
4829
4829
|
}));
|
|
4830
4830
|
let { pressProps: F, isPressed: _ } = nt(g), k = T ? (w) => {
|
|
4831
|
-
P.current === "mouse" && (w.stopPropagation(), w.preventDefault(),
|
|
4831
|
+
P.current === "mouse" && (w.stopPropagation(), w.preventDefault(), B(w));
|
|
4832
4832
|
} : void 0, { longPressProps: O } = vo({
|
|
4833
|
-
isDisabled: !
|
|
4833
|
+
isDisabled: !N,
|
|
4834
4834
|
onLongPress(w) {
|
|
4835
4835
|
w.pointerType === "touch" && (p(w), n.setSelectionBehavior("toggle"));
|
|
4836
4836
|
}
|
|
@@ -4843,7 +4843,7 @@ function Xn(t) {
|
|
|
4843
4843
|
itemProps: U(
|
|
4844
4844
|
v,
|
|
4845
4845
|
x || C || o ? F : {},
|
|
4846
|
-
|
|
4846
|
+
N ? O : {},
|
|
4847
4847
|
{
|
|
4848
4848
|
onDoubleClick: k,
|
|
4849
4849
|
onDragStartCapture: h,
|
|
@@ -5053,7 +5053,7 @@ function xu(t) {
|
|
|
5053
5053
|
};
|
|
5054
5054
|
}
|
|
5055
5055
|
function Yp(t, e, n) {
|
|
5056
|
-
let r =
|
|
5056
|
+
let r = $e(t, {
|
|
5057
5057
|
labelable: !0
|
|
5058
5058
|
}), l = t.selectionBehavior || "toggle", i = t.linkBehavior || (l === "replace" ? "action" : "override");
|
|
5059
5059
|
l === "toggle" && i === "action" && (i = "override");
|
|
@@ -5068,7 +5068,7 @@ function Yp(t, e, n) {
|
|
|
5068
5068
|
onFocusWithin: t.onFocus,
|
|
5069
5069
|
onBlurWithin: t.onBlur,
|
|
5070
5070
|
onFocusWithinChange: t.onFocusChange
|
|
5071
|
-
}), a =
|
|
5071
|
+
}), a = me(t.id);
|
|
5072
5072
|
dl.set(e, {
|
|
5073
5073
|
id: a,
|
|
5074
5074
|
shouldUseVirtualFocus: t.shouldUseVirtualFocus,
|
|
@@ -5251,7 +5251,7 @@ class Xp {
|
|
|
5251
5251
|
var a;
|
|
5252
5252
|
let S = (a = T.key) !== null && a !== void 0 ? a : null;
|
|
5253
5253
|
S == null && (S = T.element ? null : this.getKey(o, e, n, r));
|
|
5254
|
-
let
|
|
5254
|
+
let N = [
|
|
5255
5255
|
...this.getFullNode({
|
|
5256
5256
|
...T,
|
|
5257
5257
|
key: S,
|
|
@@ -5259,14 +5259,14 @@ class Xp {
|
|
|
5259
5259
|
wrapper: Zp(e.wrapper, T.wrapper)
|
|
5260
5260
|
}, this.getChildState(n, T), r ? `${r}${o.key}` : o.key, l)
|
|
5261
5261
|
];
|
|
5262
|
-
for (let R of
|
|
5262
|
+
for (let R of N) {
|
|
5263
5263
|
var s, d;
|
|
5264
5264
|
R.value = (d = (s = T.value) !== null && s !== void 0 ? s : e.value) !== null && d !== void 0 ? d : null, R.value && this.cache.set(R.value, R);
|
|
5265
5265
|
var c;
|
|
5266
5266
|
if (e.type && R.type !== e.type) throw new Error(`Unsupported type <${mr(R.type)}> in <${mr((c = l == null ? void 0 : l.type) !== null && c !== void 0 ? c : "unknown parent type")}>. Only <${mr(e.type)}> is supported.`);
|
|
5267
5267
|
E++, yield R;
|
|
5268
5268
|
}
|
|
5269
|
-
C = x.next(
|
|
5269
|
+
C = x.next(N);
|
|
5270
5270
|
}
|
|
5271
5271
|
return;
|
|
5272
5272
|
}
|
|
@@ -5344,7 +5344,7 @@ function fl(t, e, n) {
|
|
|
5344
5344
|
e
|
|
5345
5345
|
]);
|
|
5346
5346
|
}
|
|
5347
|
-
function
|
|
5347
|
+
function ye(t, e) {
|
|
5348
5348
|
return typeof e.getChildren == "function" ? e.getChildren(t.key) : t.childNodes;
|
|
5349
5349
|
}
|
|
5350
5350
|
function Je(t) {
|
|
@@ -5385,7 +5385,7 @@ function wu(t) {
|
|
|
5385
5385
|
let e = $i.get(t);
|
|
5386
5386
|
if (e != null) return e;
|
|
5387
5387
|
let n = 0, r = (l) => {
|
|
5388
|
-
for (let i of l) i.type === "section" ? r(
|
|
5388
|
+
for (let i of l) i.type === "section" ? r(ye(i, t)) : n++;
|
|
5389
5389
|
};
|
|
5390
5390
|
return r(t), $i.set(t, n), n;
|
|
5391
5391
|
}
|
|
@@ -5414,10 +5414,10 @@ function Jp(t, e, n) {
|
|
|
5414
5414
|
let A = Number(P == null ? void 0 : P.index);
|
|
5415
5415
|
S["aria-posinset"] = Number.isNaN(A) ? void 0 : A + 1, S["aria-setsize"] = wu(e.collection);
|
|
5416
5416
|
}
|
|
5417
|
-
let
|
|
5417
|
+
let N = o != null && o.onAction ? () => {
|
|
5418
5418
|
var A;
|
|
5419
5419
|
return o == null || (A = o.onAction) === null || A === void 0 ? void 0 : A.call(o, i);
|
|
5420
|
-
} : void 0, R = Vp(e, i), { itemProps:
|
|
5420
|
+
} : void 0, R = Vp(e, i), { itemProps: I, isPressed: B, isFocused: g, hasAction: F, allowsSelection: _ } = Xn({
|
|
5421
5421
|
selectionManager: e.selectionManager,
|
|
5422
5422
|
key: i,
|
|
5423
5423
|
ref: n,
|
|
@@ -5426,7 +5426,7 @@ function Jp(t, e, n) {
|
|
|
5426
5426
|
isVirtualized: E,
|
|
5427
5427
|
shouldUseVirtualFocus: $,
|
|
5428
5428
|
isDisabled: a,
|
|
5429
|
-
onAction:
|
|
5429
|
+
onAction: N || !(P == null || (r = P.props) === null || r === void 0) && r.onAction ? tt(P == null || (l = P.props) === null || l === void 0 ? void 0 : l.onAction, N) : void 0,
|
|
5430
5430
|
linkBehavior: o == null ? void 0 : o.linkBehavior,
|
|
5431
5431
|
id: R
|
|
5432
5432
|
}), { hoverProps: k } = Ot({
|
|
@@ -5434,13 +5434,13 @@ function Jp(t, e, n) {
|
|
|
5434
5434
|
onHoverStart() {
|
|
5435
5435
|
pt() || (e.selectionManager.setFocused(!0), e.selectionManager.setFocusedKey(i));
|
|
5436
5436
|
}
|
|
5437
|
-
}), O =
|
|
5437
|
+
}), O = $e(P == null ? void 0 : P.props);
|
|
5438
5438
|
delete O.id;
|
|
5439
5439
|
let h = Gi(P == null ? void 0 : P.props);
|
|
5440
5440
|
return {
|
|
5441
5441
|
optionProps: {
|
|
5442
5442
|
...S,
|
|
5443
|
-
...U(O,
|
|
5443
|
+
...U(O, I, k, h),
|
|
5444
5444
|
id: R
|
|
5445
5445
|
},
|
|
5446
5446
|
labelProps: {
|
|
@@ -5453,7 +5453,7 @@ function Jp(t, e, n) {
|
|
|
5453
5453
|
isFocusVisible: g && e.selectionManager.isFocused && pt(),
|
|
5454
5454
|
isSelected: d,
|
|
5455
5455
|
isDisabled: a,
|
|
5456
|
-
isPressed:
|
|
5456
|
+
isPressed: B,
|
|
5457
5457
|
allowsSelection: _,
|
|
5458
5458
|
hasAction: F
|
|
5459
5459
|
};
|
|
@@ -5635,7 +5635,7 @@ function Qp(t) {
|
|
|
5635
5635
|
return t && t.__esModule ? t.default : t;
|
|
5636
5636
|
}
|
|
5637
5637
|
function ua(t, e, n) {
|
|
5638
|
-
let { type: r = "menu", isDisabled: l, trigger: i = "press" } = t, o =
|
|
5638
|
+
let { type: r = "menu", isDisabled: l, trigger: i = "press" } = t, o = me(), { triggerProps: u, overlayProps: a } = Ao({
|
|
5639
5639
|
type: r
|
|
5640
5640
|
}, e, n), s = (p) => {
|
|
5641
5641
|
if (!l && !(i === "longPress" && !p.altKey) && n && n.current)
|
|
@@ -5690,7 +5690,7 @@ const aa = /* @__PURE__ */ new WeakMap();
|
|
|
5690
5690
|
function sa(t, e, n) {
|
|
5691
5691
|
let { shouldFocusWrap: r = !0, onKeyDown: l, onKeyUp: i, ...o } = t;
|
|
5692
5692
|
!t["aria-label"] && !t["aria-labelledby"] && process.env.NODE_ENV !== "production" && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
5693
|
-
let u =
|
|
5693
|
+
let u = $e(t, {
|
|
5694
5694
|
labelable: !0
|
|
5695
5695
|
}), { listProps: a } = xu({
|
|
5696
5696
|
...o,
|
|
@@ -5720,11 +5720,11 @@ function sa(t, e, n) {
|
|
|
5720
5720
|
};
|
|
5721
5721
|
}
|
|
5722
5722
|
function ca(t, e, n) {
|
|
5723
|
-
let { id: r, key: l, closeOnSelect: i, isVirtualized: o, "aria-haspopup": u, onPressStart: a, onPressUp: s, onPress: d, onPressChange: c, onPressEnd: f, onHoverStart: p, onHoverChange: v, onHoverEnd: b, onKeyDown: $, onKeyUp: x, onFocus: E, onFocusChange: C, onBlur: T, selectionManager: S = e.selectionManager } = t, P = !!u,
|
|
5723
|
+
let { id: r, key: l, closeOnSelect: i, isVirtualized: o, "aria-haspopup": u, onPressStart: a, onPressUp: s, onPress: d, onPressChange: c, onPressEnd: f, onHoverStart: p, onHoverChange: v, onHoverEnd: b, onKeyDown: $, onKeyUp: x, onFocus: E, onFocusChange: C, onBlur: T, selectionManager: S = e.selectionManager } = t, P = !!u, N = P && t["aria-expanded"] === "true";
|
|
5724
5724
|
var R;
|
|
5725
|
-
let
|
|
5726
|
-
var
|
|
5727
|
-
let g = (
|
|
5725
|
+
let I = (R = t.isDisabled) !== null && R !== void 0 ? R : S.isDisabled(l);
|
|
5726
|
+
var B;
|
|
5727
|
+
let g = (B = t.isSelected) !== null && B !== void 0 ? B : S.isSelected(l), F = aa.get(e), _ = e.collection.getItem(l), k = t.onClose || F.onClose, O = un(), h = (re) => {
|
|
5728
5728
|
var Xe;
|
|
5729
5729
|
if (!P) {
|
|
5730
5730
|
if (!(_ == null || (Xe = _.props) === null || Xe === void 0) && Xe.onAction ? _.props.onAction() : t.onAction && t.onAction(l), F.onAction) {
|
|
@@ -5735,29 +5735,29 @@ function ca(t, e, n) {
|
|
|
5735
5735
|
}
|
|
5736
5736
|
}, A = "menuitem";
|
|
5737
5737
|
P || (S.selectionMode === "single" ? A = "menuitemradio" : S.selectionMode === "multiple" && (A = "menuitemcheckbox"));
|
|
5738
|
-
let w = dt(),
|
|
5738
|
+
let w = dt(), z = dt(), X = dt(), Z = {
|
|
5739
5739
|
id: r,
|
|
5740
|
-
"aria-disabled":
|
|
5740
|
+
"aria-disabled": I || void 0,
|
|
5741
5741
|
role: A,
|
|
5742
5742
|
"aria-label": t["aria-label"],
|
|
5743
5743
|
"aria-labelledby": w,
|
|
5744
5744
|
"aria-describedby": [
|
|
5745
|
-
|
|
5746
|
-
|
|
5745
|
+
z,
|
|
5746
|
+
X
|
|
5747
5747
|
].filter(Boolean).join(" ") || void 0,
|
|
5748
5748
|
"aria-controls": t["aria-controls"],
|
|
5749
5749
|
"aria-haspopup": u,
|
|
5750
5750
|
"aria-expanded": t["aria-expanded"]
|
|
5751
5751
|
};
|
|
5752
|
-
S.selectionMode !== "none" && !P && (
|
|
5753
|
-
let
|
|
5752
|
+
S.selectionMode !== "none" && !P && (Z["aria-checked"] = g), o && (Z["aria-posinset"] = _ == null ? void 0 : _.index, Z["aria-setsize"] = wu(e.collection));
|
|
5753
|
+
let ue = (re) => {
|
|
5754
5754
|
re.pointerType === "keyboard" && h(re), a == null || a(re);
|
|
5755
|
-
},
|
|
5755
|
+
}, fe = () => {
|
|
5756
5756
|
!P && k && (i ?? (S.selectionMode !== "multiple" || S.isLink(l))) && k();
|
|
5757
5757
|
}, Le = (re) => {
|
|
5758
|
-
re.pointerType === "mouse" && (h(re),
|
|
5758
|
+
re.pointerType === "mouse" && (h(re), fe()), s == null || s(re);
|
|
5759
5759
|
}, Ye = (re) => {
|
|
5760
|
-
re.pointerType !== "keyboard" && re.pointerType !== "mouse" && (h(re),
|
|
5760
|
+
re.pointerType !== "keyboard" && re.pointerType !== "mouse" && (h(re), fe()), d == null || d(re);
|
|
5761
5761
|
}, { itemProps: we, isFocused: ze } = Xn({
|
|
5762
5762
|
id: r,
|
|
5763
5763
|
selectionManager: S,
|
|
@@ -5772,16 +5772,16 @@ function ca(t, e, n) {
|
|
|
5772
5772
|
linkBehavior: "none",
|
|
5773
5773
|
shouldUseVirtualFocus: F.shouldUseVirtualFocus
|
|
5774
5774
|
}), { pressProps: Ve, isPressed: qe } = nt({
|
|
5775
|
-
onPressStart:
|
|
5775
|
+
onPressStart: ue,
|
|
5776
5776
|
onPress: Ye,
|
|
5777
5777
|
onPressUp: Le,
|
|
5778
5778
|
onPressChange: c,
|
|
5779
5779
|
onPressEnd: f,
|
|
5780
|
-
isDisabled:
|
|
5780
|
+
isDisabled: I
|
|
5781
5781
|
}), { hoverProps: He } = Ot({
|
|
5782
|
-
isDisabled:
|
|
5782
|
+
isDisabled: I,
|
|
5783
5783
|
onHoverStart(re) {
|
|
5784
|
-
!pt() && !(
|
|
5784
|
+
!pt() && !(N && u) && (S.setFocused(!0), S.setFocusedKey(l)), p == null || p(re);
|
|
5785
5785
|
},
|
|
5786
5786
|
onHoverChange: v,
|
|
5787
5787
|
onHoverEnd: b
|
|
@@ -5793,10 +5793,10 @@ function ca(t, e, n) {
|
|
|
5793
5793
|
}
|
|
5794
5794
|
switch (re.key) {
|
|
5795
5795
|
case " ":
|
|
5796
|
-
!
|
|
5796
|
+
!I && S.selectionMode === "none" && !P && i !== !1 && k && k();
|
|
5797
5797
|
break;
|
|
5798
5798
|
case "Enter":
|
|
5799
|
-
!
|
|
5799
|
+
!I && i !== !1 && !P && k && k();
|
|
5800
5800
|
break;
|
|
5801
5801
|
default:
|
|
5802
5802
|
P || re.continuePropagation(), $ == null || $(re);
|
|
@@ -5808,12 +5808,12 @@ function ca(t, e, n) {
|
|
|
5808
5808
|
onBlur: T,
|
|
5809
5809
|
onFocus: E,
|
|
5810
5810
|
onFocusChange: C
|
|
5811
|
-
}), Ie =
|
|
5811
|
+
}), Ie = $e(_ == null ? void 0 : _.props);
|
|
5812
5812
|
delete Ie.id;
|
|
5813
5813
|
let Dt = Gi(_ == null ? void 0 : _.props);
|
|
5814
5814
|
return {
|
|
5815
5815
|
menuItemProps: {
|
|
5816
|
-
...
|
|
5816
|
+
...Z,
|
|
5817
5817
|
...U(
|
|
5818
5818
|
Ie,
|
|
5819
5819
|
Dt,
|
|
@@ -5832,26 +5832,26 @@ function ca(t, e, n) {
|
|
|
5832
5832
|
} : void 0
|
|
5833
5833
|
),
|
|
5834
5834
|
// If a submenu is expanded, set the tabIndex to -1 so that shift tabbing goes out of the menu instead of the parent menu item.
|
|
5835
|
-
tabIndex: we.tabIndex != null &&
|
|
5835
|
+
tabIndex: we.tabIndex != null && N && !F.shouldUseVirtualFocus ? -1 : we.tabIndex
|
|
5836
5836
|
},
|
|
5837
5837
|
labelProps: {
|
|
5838
5838
|
id: w
|
|
5839
5839
|
},
|
|
5840
5840
|
descriptionProps: {
|
|
5841
|
-
id:
|
|
5841
|
+
id: z
|
|
5842
5842
|
},
|
|
5843
5843
|
keyboardShortcutProps: {
|
|
5844
|
-
id:
|
|
5844
|
+
id: X
|
|
5845
5845
|
},
|
|
5846
5846
|
isFocused: ze,
|
|
5847
|
-
isFocusVisible: ze && S.isFocused && pt() && !
|
|
5847
|
+
isFocusVisible: ze && S.isFocused && pt() && !N,
|
|
5848
5848
|
isSelected: g,
|
|
5849
5849
|
isPressed: qe,
|
|
5850
|
-
isDisabled:
|
|
5850
|
+
isDisabled: I
|
|
5851
5851
|
};
|
|
5852
5852
|
}
|
|
5853
5853
|
function ev(t) {
|
|
5854
|
-
let { heading: e, "aria-label": n } = t, r =
|
|
5854
|
+
let { heading: e, "aria-label": n } = t, r = me();
|
|
5855
5855
|
return {
|
|
5856
5856
|
itemProps: {
|
|
5857
5857
|
role: "presentation"
|
|
@@ -5872,7 +5872,7 @@ function ev(t) {
|
|
|
5872
5872
|
}
|
|
5873
5873
|
const En = 2, tv = 50, nv = 1e3, xi = Math.PI / 12;
|
|
5874
5874
|
function rv(t) {
|
|
5875
|
-
let { menuRef: e, submenuRef: n, isOpen: r, isDisabled: l } = t, i =
|
|
5875
|
+
let { menuRef: e, submenuRef: n, isOpen: r, isDisabled: l } = t, i = K(void 0), o = K(void 0), u = K(0), a = K(void 0), s = K(void 0), d = K(void 0), c = K(2), [f, p] = W(!1);
|
|
5876
5876
|
Cr({
|
|
5877
5877
|
ref: n,
|
|
5878
5878
|
onResize: () => {
|
|
@@ -5881,15 +5881,15 @@ function rv(t) {
|
|
|
5881
5881
|
});
|
|
5882
5882
|
let b = () => {
|
|
5883
5883
|
p(!1), c.current = En, i.current = void 0;
|
|
5884
|
-
}, $ = fo(), x =
|
|
5884
|
+
}, $ = fo(), x = de((E) => {
|
|
5885
5885
|
f && E.preventDefault();
|
|
5886
5886
|
});
|
|
5887
|
-
|
|
5887
|
+
j(() => {
|
|
5888
5888
|
f && e.current ? e.current.style.pointerEvents = "none" : e.current.style.pointerEvents = "";
|
|
5889
5889
|
}, [
|
|
5890
5890
|
e,
|
|
5891
5891
|
f
|
|
5892
|
-
]),
|
|
5892
|
+
]), j(() => {
|
|
5893
5893
|
let E = n.current, C = e.current;
|
|
5894
5894
|
if (l || !E || !r || $ !== "pointer" || !C) {
|
|
5895
5895
|
b();
|
|
@@ -5901,26 +5901,26 @@ function rv(t) {
|
|
|
5901
5901
|
let P = Date.now();
|
|
5902
5902
|
if (P - u.current < tv) return;
|
|
5903
5903
|
clearTimeout(a.current), clearTimeout(s.current);
|
|
5904
|
-
let { clientX:
|
|
5904
|
+
let { clientX: N, clientY: R } = S;
|
|
5905
5905
|
if (!i.current) {
|
|
5906
5906
|
i.current = {
|
|
5907
|
-
x:
|
|
5907
|
+
x: N,
|
|
5908
5908
|
y: R
|
|
5909
5909
|
};
|
|
5910
5910
|
return;
|
|
5911
5911
|
}
|
|
5912
5912
|
if (!o.current) return;
|
|
5913
|
-
if (d.current || (d.current =
|
|
5913
|
+
if (d.current || (d.current = N > o.current.right ? "left" : "right"), N < C.getBoundingClientRect().left || N > C.getBoundingClientRect().right || R < C.getBoundingClientRect().top || R > C.getBoundingClientRect().bottom) {
|
|
5914
5914
|
b();
|
|
5915
5915
|
return;
|
|
5916
5916
|
}
|
|
5917
|
-
let
|
|
5917
|
+
let I = i.current.x, B = i.current.y, g = d.current === "right" ? o.current.left - I : I - o.current.right, F = Math.atan2(B - o.current.top, g) + xi, _ = Math.atan2(B - o.current.bottom, g) - xi, k = Math.atan2(B - R, d.current === "left" ? -(N - I) : N - I), O = k < F && k > _;
|
|
5918
5918
|
c.current = O ? Math.min(c.current + 1, En) : Math.max(c.current - 1, 0), c.current >= En ? p(!0) : p(!1), u.current = P, i.current = {
|
|
5919
|
-
x:
|
|
5919
|
+
x: N,
|
|
5920
5920
|
y: R
|
|
5921
5921
|
}, O && (a.current = setTimeout(() => {
|
|
5922
5922
|
b(), s.current = setTimeout(() => {
|
|
5923
|
-
let h = document.elementFromPoint(
|
|
5923
|
+
let h = document.elementFromPoint(N, R);
|
|
5924
5924
|
h && C.contains(h) && h.dispatchEvent(new PointerEvent("pointerover", {
|
|
5925
5925
|
bubbles: !0,
|
|
5926
5926
|
cancelable: !0
|
|
@@ -5942,13 +5942,13 @@ function rv(t) {
|
|
|
5942
5942
|
]);
|
|
5943
5943
|
}
|
|
5944
5944
|
function lv(t, e, n) {
|
|
5945
|
-
let { parentMenuRef: r, submenuRef: l, type: i = "menu", isDisabled: o, delay: u = 200, shouldUseVirtualFocus: a } = t, s =
|
|
5945
|
+
let { parentMenuRef: r, submenuRef: l, type: i = "menu", isDisabled: o, delay: u = 200, shouldUseVirtualFocus: a } = t, s = me(), d = me(), { direction: c } = je(), f = K(void 0), p = te(() => {
|
|
5946
5946
|
f.current && (clearTimeout(f.current), f.current = void 0);
|
|
5947
5947
|
}, [
|
|
5948
5948
|
f
|
|
5949
|
-
]), v =
|
|
5950
|
-
p(), e.open(
|
|
5951
|
-
}), b =
|
|
5949
|
+
]), v = de((I) => {
|
|
5950
|
+
p(), e.open(I);
|
|
5951
|
+
}), b = de(() => {
|
|
5952
5952
|
p(), e.close();
|
|
5953
5953
|
});
|
|
5954
5954
|
Q(() => () => {
|
|
@@ -5956,18 +5956,18 @@ function lv(t, e, n) {
|
|
|
5956
5956
|
}, [
|
|
5957
5957
|
p
|
|
5958
5958
|
]);
|
|
5959
|
-
let $ = (
|
|
5960
|
-
if (
|
|
5961
|
-
switch (
|
|
5959
|
+
let $ = (I) => {
|
|
5960
|
+
if (I.currentTarget.contains(document.activeElement))
|
|
5961
|
+
switch (I.key) {
|
|
5962
5962
|
case "ArrowLeft":
|
|
5963
|
-
c === "ltr" &&
|
|
5963
|
+
c === "ltr" && I.currentTarget.contains(I.target) && (I.preventDefault(), I.stopPropagation(), b(), !a && n.current && Se(n.current));
|
|
5964
5964
|
break;
|
|
5965
5965
|
case "ArrowRight":
|
|
5966
|
-
c === "rtl" &&
|
|
5966
|
+
c === "rtl" && I.currentTarget.contains(I.target) && (I.preventDefault(), I.stopPropagation(), b(), !a && n.current && Se(n.current));
|
|
5967
5967
|
break;
|
|
5968
5968
|
case "Escape":
|
|
5969
|
-
var
|
|
5970
|
-
!((
|
|
5969
|
+
var B;
|
|
5970
|
+
!((B = l.current) === null || B === void 0) && B.contains(I.target) && (I.stopPropagation(), b(), !a && n.current && Se(n.current));
|
|
5971
5971
|
break;
|
|
5972
5972
|
}
|
|
5973
5973
|
};
|
|
@@ -5981,30 +5981,30 @@ function lv(t, e, n) {
|
|
|
5981
5981
|
autoFocus: (x = e.focusStrategy) !== null && x !== void 0 ? x : void 0,
|
|
5982
5982
|
onKeyDown: $
|
|
5983
5983
|
}
|
|
5984
|
-
}, C = (
|
|
5985
|
-
switch (
|
|
5984
|
+
}, C = (I) => {
|
|
5985
|
+
switch (I.key) {
|
|
5986
5986
|
case "ArrowRight":
|
|
5987
|
-
o || (c === "ltr" ? (
|
|
5987
|
+
o || (c === "ltr" ? (I.preventDefault(), e.isOpen || v("first"), i === "menu" && (l != null && l.current) && document.activeElement === (n == null ? void 0 : n.current) && Se(l.current)) : e.isOpen ? b() : I.continuePropagation());
|
|
5988
5988
|
break;
|
|
5989
5989
|
case "ArrowLeft":
|
|
5990
|
-
o || (c === "rtl" ? (
|
|
5990
|
+
o || (c === "rtl" ? (I.preventDefault(), e.isOpen || v("first"), i === "menu" && (l != null && l.current) && document.activeElement === (n == null ? void 0 : n.current) && Se(l.current)) : e.isOpen ? b() : I.continuePropagation());
|
|
5991
5991
|
break;
|
|
5992
5992
|
default:
|
|
5993
|
-
|
|
5993
|
+
I.continuePropagation();
|
|
5994
5994
|
break;
|
|
5995
5995
|
}
|
|
5996
|
-
}, T = (
|
|
5997
|
-
!o && (
|
|
5998
|
-
}, S = (
|
|
5999
|
-
!o && (
|
|
6000
|
-
}, P = (
|
|
6001
|
-
o || (
|
|
5996
|
+
}, T = (I) => {
|
|
5997
|
+
!o && (I.pointerType === "virtual" || I.pointerType === "keyboard") && v("first");
|
|
5998
|
+
}, S = (I) => {
|
|
5999
|
+
!o && (I.pointerType === "touch" || I.pointerType === "mouse") && v();
|
|
6000
|
+
}, P = (I) => {
|
|
6001
|
+
o || (I && !e.isOpen ? f.current || (f.current = setTimeout(() => {
|
|
6002
6002
|
v();
|
|
6003
|
-
}, u)) :
|
|
6004
|
-
},
|
|
6005
|
-
var
|
|
6006
|
-
e.isOpen && (!((
|
|
6007
|
-
}, R = (
|
|
6003
|
+
}, u)) : I || p());
|
|
6004
|
+
}, N = (I) => {
|
|
6005
|
+
var B;
|
|
6006
|
+
e.isOpen && (!((B = r.current) === null || B === void 0) && B.contains(I.relatedTarget)) && b();
|
|
6007
|
+
}, R = (I) => I !== n.current;
|
|
6008
6008
|
return rv({
|
|
6009
6009
|
menuRef: r,
|
|
6010
6010
|
submenuRef: l,
|
|
@@ -6020,7 +6020,7 @@ function lv(t, e, n) {
|
|
|
6020
6020
|
onPress: S,
|
|
6021
6021
|
onHoverChange: P,
|
|
6022
6022
|
onKeyDown: C,
|
|
6023
|
-
onBlur:
|
|
6023
|
+
onBlur: N,
|
|
6024
6024
|
isOpen: e.isOpen
|
|
6025
6025
|
},
|
|
6026
6026
|
submenuProps: E,
|
|
@@ -6033,8 +6033,8 @@ function lv(t, e, n) {
|
|
|
6033
6033
|
function da(t, e) {
|
|
6034
6034
|
let { role: n = "dialog" } = t, r = dt();
|
|
6035
6035
|
r = t["aria-label"] ? void 0 : r;
|
|
6036
|
-
let l =
|
|
6037
|
-
return
|
|
6036
|
+
let l = K(!1);
|
|
6037
|
+
return j(() => {
|
|
6038
6038
|
if (e.current && !e.current.contains(document.activeElement)) {
|
|
6039
6039
|
Ee(e.current);
|
|
6040
6040
|
let i = setTimeout(() => {
|
|
@@ -6048,7 +6048,7 @@ function da(t, e) {
|
|
|
6048
6048
|
e
|
|
6049
6049
|
]), bu(), {
|
|
6050
6050
|
dialogProps: {
|
|
6051
|
-
|
|
6051
|
+
...$e(t, {
|
|
6052
6052
|
labelable: !0
|
|
6053
6053
|
}),
|
|
6054
6054
|
role: n,
|
|
@@ -6102,7 +6102,7 @@ class fa {
|
|
|
6102
6102
|
let r = this.collection.getItem(e);
|
|
6103
6103
|
if (!r) return null;
|
|
6104
6104
|
let l = 0;
|
|
6105
|
-
for (let u of
|
|
6105
|
+
for (let u of ye(r, this.collection)) {
|
|
6106
6106
|
var i;
|
|
6107
6107
|
if (u.colSpan && u.colSpan + l > n) return (i = u.key) !== null && i !== void 0 ? i : null;
|
|
6108
6108
|
u.colSpan && (l = l + u.colSpan - 1);
|
|
@@ -6145,14 +6145,14 @@ class fa {
|
|
|
6145
6145
|
if (!n) return null;
|
|
6146
6146
|
if (this.isRow(n)) {
|
|
6147
6147
|
var r, l;
|
|
6148
|
-
let d =
|
|
6148
|
+
let d = ye(n, this.collection);
|
|
6149
6149
|
var i;
|
|
6150
6150
|
return (i = this.direction === "rtl" ? (r = ct(d)) === null || r === void 0 ? void 0 : r.key : (l = Je(d)) === null || l === void 0 ? void 0 : l.key) !== null && i !== void 0 ? i : null;
|
|
6151
6151
|
}
|
|
6152
6152
|
if (this.isCell(n) && n.parentKey != null) {
|
|
6153
6153
|
let d = this.collection.getItem(n.parentKey);
|
|
6154
6154
|
if (!d) return null;
|
|
6155
|
-
let c =
|
|
6155
|
+
let c = ye(d, this.collection);
|
|
6156
6156
|
var o;
|
|
6157
6157
|
let f = (o = this.direction === "rtl" ? Qt(c, n.index - 1) : Qt(c, n.index + 1)) !== null && o !== void 0 ? o : null;
|
|
6158
6158
|
var u;
|
|
@@ -6169,14 +6169,14 @@ class fa {
|
|
|
6169
6169
|
if (!n) return null;
|
|
6170
6170
|
if (this.isRow(n)) {
|
|
6171
6171
|
var r, l;
|
|
6172
|
-
let d =
|
|
6172
|
+
let d = ye(n, this.collection);
|
|
6173
6173
|
var i;
|
|
6174
6174
|
return (i = this.direction === "rtl" ? (r = Je(d)) === null || r === void 0 ? void 0 : r.key : (l = ct(d)) === null || l === void 0 ? void 0 : l.key) !== null && i !== void 0 ? i : null;
|
|
6175
6175
|
}
|
|
6176
6176
|
if (this.isCell(n) && n.parentKey != null) {
|
|
6177
6177
|
let d = this.collection.getItem(n.parentKey);
|
|
6178
6178
|
if (!d) return null;
|
|
6179
|
-
let c =
|
|
6179
|
+
let c = ye(d, this.collection);
|
|
6180
6180
|
var o;
|
|
6181
6181
|
let f = (o = this.direction === "rtl" ? Qt(c, n.index + 1) : Qt(c, n.index - 1)) !== null && o !== void 0 ? o : null;
|
|
6182
6182
|
var u;
|
|
@@ -6197,7 +6197,7 @@ class fa {
|
|
|
6197
6197
|
let s = this.collection.getItem(l.parentKey);
|
|
6198
6198
|
if (!s) return null;
|
|
6199
6199
|
var o;
|
|
6200
|
-
return (o = (i = Je(
|
|
6200
|
+
return (o = (i = Je(ye(s, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && o !== void 0 ? o : null;
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
6203
|
if (r = this.findNextKey(void 0, (s) => s.type === "item"), r != null && (l && this.isCell(l) && n || this.focusMode === "cell")) {
|
|
@@ -6205,7 +6205,7 @@ class fa {
|
|
|
6205
6205
|
let s = this.collection.getItem(r);
|
|
6206
6206
|
if (!s) return null;
|
|
6207
6207
|
var a;
|
|
6208
|
-
r = (a = (u = Je(
|
|
6208
|
+
r = (a = (u = Je(ye(s, this.collection))) === null || u === void 0 ? void 0 : u.key) !== null && a !== void 0 ? a : null;
|
|
6209
6209
|
}
|
|
6210
6210
|
return r;
|
|
6211
6211
|
}
|
|
@@ -6217,7 +6217,7 @@ class fa {
|
|
|
6217
6217
|
var i;
|
|
6218
6218
|
let s = this.collection.getItem(l.parentKey);
|
|
6219
6219
|
if (!s) return null;
|
|
6220
|
-
let d =
|
|
6220
|
+
let d = ye(s, this.collection);
|
|
6221
6221
|
var o;
|
|
6222
6222
|
return (o = (i = ct(d)) === null || i === void 0 ? void 0 : i.key) !== null && o !== void 0 ? o : null;
|
|
6223
6223
|
}
|
|
@@ -6226,7 +6226,7 @@ class fa {
|
|
|
6226
6226
|
var u;
|
|
6227
6227
|
let s = this.collection.getItem(r);
|
|
6228
6228
|
if (!s) return null;
|
|
6229
|
-
let d =
|
|
6229
|
+
let d = ye(s, this.collection);
|
|
6230
6230
|
var a;
|
|
6231
6231
|
r = (a = (u = ct(d)) === null || u === void 0 ? void 0 : u.key) !== null && a !== void 0 ? a : null;
|
|
6232
6232
|
}
|
|
@@ -6271,7 +6271,7 @@ class fa {
|
|
|
6271
6271
|
let c = d.textValue.slice(0, e.length);
|
|
6272
6272
|
if (this.collator.compare(c, e) === 0) {
|
|
6273
6273
|
var a, s;
|
|
6274
|
-
return this.isRow(d) && this.focusMode === "cell" ? (s = (a = Je(
|
|
6274
|
+
return this.isRow(d) && this.focusMode === "cell" ? (s = (a = Je(ye(d, this.collection))) === null || a === void 0 ? void 0 : a.key) !== null && s !== void 0 ? s : null : d.key;
|
|
6275
6275
|
}
|
|
6276
6276
|
}
|
|
6277
6277
|
r = this.findNextKey(r, (c) => c.type === "item"), r == null && !u && (r = this.getFirstKey(), u = !0);
|
|
@@ -6785,7 +6785,7 @@ function uv(t, e) {
|
|
|
6785
6785
|
let { getRowText: n = (u) => {
|
|
6786
6786
|
var a, s, d, c;
|
|
6787
6787
|
return (c = (a = (s = e.collection).getTextValue) === null || a === void 0 ? void 0 : a.call(s, u)) !== null && c !== void 0 ? c : (d = e.collection.getItem(u)) === null || d === void 0 ? void 0 : d.textValue;
|
|
6788
|
-
} } = t, r = wt(ov(vl), "@react-aria/grid"), l = e.selectionManager.rawSelection, i =
|
|
6788
|
+
} } = t, r = wt(ov(vl), "@react-aria/grid"), l = e.selectionManager.rawSelection, i = K(l), o = de(() => {
|
|
6789
6789
|
var u;
|
|
6790
6790
|
if (!e.selectionManager.isFocused || l === i.current) {
|
|
6791
6791
|
i.current = l;
|
|
@@ -6878,7 +6878,7 @@ function cv(t, e, n) {
|
|
|
6878
6878
|
scrollRef: u,
|
|
6879
6879
|
disallowTypeAhead: l,
|
|
6880
6880
|
escapeKeyBehavior: c
|
|
6881
|
-
}), E =
|
|
6881
|
+
}), E = me(t.id);
|
|
6882
6882
|
pl.set(e, {
|
|
6883
6883
|
keyboardDelegate: $,
|
|
6884
6884
|
actions: {
|
|
@@ -6889,14 +6889,14 @@ function cv(t, e, n) {
|
|
|
6889
6889
|
let C = sv({
|
|
6890
6890
|
selectionManager: f,
|
|
6891
6891
|
hasItemActions: !!(s || d)
|
|
6892
|
-
}), T =
|
|
6892
|
+
}), T = $e(t, {
|
|
6893
6893
|
labelable: !0
|
|
6894
|
-
}), S = te((
|
|
6894
|
+
}), S = te((I) => {
|
|
6895
6895
|
if (f.isFocused) {
|
|
6896
|
-
|
|
6896
|
+
I.currentTarget.contains(I.target) || f.setFocused(!1);
|
|
6897
6897
|
return;
|
|
6898
6898
|
}
|
|
6899
|
-
|
|
6899
|
+
I.currentTarget.contains(I.target) && f.setFocused(!0);
|
|
6900
6900
|
}, [
|
|
6901
6901
|
f
|
|
6902
6902
|
]), P = H(() => ({
|
|
@@ -6905,7 +6905,7 @@ function cv(t, e, n) {
|
|
|
6905
6905
|
}), [
|
|
6906
6906
|
S,
|
|
6907
6907
|
x.onBlur
|
|
6908
|
-
]),
|
|
6908
|
+
]), N = op(n, {
|
|
6909
6909
|
isDisabled: e.collection.size !== 0
|
|
6910
6910
|
}), R = U(
|
|
6911
6911
|
T,
|
|
@@ -6917,7 +6917,7 @@ function cv(t, e, n) {
|
|
|
6917
6917
|
e.isKeyboardNavigationDisabled ? P : x,
|
|
6918
6918
|
// If collection is empty, make sure the grid is tabbable unless there is a child tabbable element.
|
|
6919
6919
|
e.collection.size === 0 && {
|
|
6920
|
-
tabIndex:
|
|
6920
|
+
tabIndex: N ? -1 : 0
|
|
6921
6921
|
} || void 0,
|
|
6922
6922
|
C
|
|
6923
6923
|
);
|
|
@@ -6959,7 +6959,7 @@ function fv(t, e, n) {
|
|
|
6959
6959
|
};
|
|
6960
6960
|
}
|
|
6961
6961
|
function Ga(t, e, n) {
|
|
6962
|
-
let { node: r, isVirtualized: l, focusMode: i = "child", shouldSelectOnPressUp: o, onAction: u } = t, { direction: a } = je(), { keyboardDelegate: s, actions: { onCellAction: d } } = pl.get(e), c =
|
|
6962
|
+
let { node: r, isVirtualized: l, focusMode: i = "child", shouldSelectOnPressUp: o, onAction: u } = t, { direction: a } = je(), { keyboardDelegate: s, actions: { onCellAction: d } } = pl.get(e), c = K(null), f = () => {
|
|
6963
6963
|
if (n.current) {
|
|
6964
6964
|
let C = Be(n.current);
|
|
6965
6965
|
if (i === "child") {
|
|
@@ -6986,9 +6986,9 @@ function Ga(t, e, n) {
|
|
|
6986
6986
|
let T = Be(n.current);
|
|
6987
6987
|
switch (T.currentNode = document.activeElement, C.key) {
|
|
6988
6988
|
case "ArrowLeft": {
|
|
6989
|
-
let
|
|
6990
|
-
if (i === "child" &&
|
|
6991
|
-
Ee(
|
|
6989
|
+
let B = a === "rtl" ? T.nextNode() : T.previousNode();
|
|
6990
|
+
if (i === "child" && B === n.current && (B = null), C.preventDefault(), C.stopPropagation(), B)
|
|
6991
|
+
Ee(B), ut(B, {
|
|
6992
6992
|
containingElement: ot(n.current)
|
|
6993
6993
|
});
|
|
6994
6994
|
else {
|
|
@@ -7000,28 +7000,28 @@ function Ga(t, e, n) {
|
|
|
7000
7000
|
}
|
|
7001
7001
|
i === "cell" && a === "rtl" ? (Ee(n.current), ut(n.current, {
|
|
7002
7002
|
containingElement: ot(n.current)
|
|
7003
|
-
})) : (T.currentNode = n.current,
|
|
7003
|
+
})) : (T.currentNode = n.current, B = a === "rtl" ? T.firstChild() : yr(T), B && (Ee(B), ut(B, {
|
|
7004
7004
|
containingElement: ot(n.current)
|
|
7005
7005
|
})));
|
|
7006
7006
|
}
|
|
7007
7007
|
break;
|
|
7008
7008
|
}
|
|
7009
7009
|
case "ArrowRight": {
|
|
7010
|
-
let
|
|
7011
|
-
if (i === "child" &&
|
|
7012
|
-
Ee(
|
|
7010
|
+
let B = a === "rtl" ? T.previousNode() : T.nextNode();
|
|
7011
|
+
if (i === "child" && B === n.current && (B = null), C.preventDefault(), C.stopPropagation(), B)
|
|
7012
|
+
Ee(B), ut(B, {
|
|
7013
7013
|
containingElement: ot(n.current)
|
|
7014
7014
|
});
|
|
7015
7015
|
else {
|
|
7016
|
-
var
|
|
7017
|
-
if (((
|
|
7016
|
+
var N;
|
|
7017
|
+
if (((N = s.getKeyRightOf) === null || N === void 0 ? void 0 : N.call(s, r.key)) !== r.key) {
|
|
7018
7018
|
var R;
|
|
7019
7019
|
(R = n.current.parentElement) === null || R === void 0 || R.dispatchEvent(new KeyboardEvent(C.nativeEvent.type, C.nativeEvent));
|
|
7020
7020
|
break;
|
|
7021
7021
|
}
|
|
7022
7022
|
i === "cell" && a === "ltr" ? (Ee(n.current), ut(n.current, {
|
|
7023
7023
|
containingElement: ot(n.current)
|
|
7024
|
-
})) : (T.currentNode = n.current,
|
|
7024
|
+
})) : (T.currentNode = n.current, B = a === "rtl" ? yr(T) : T.firstChild(), B && (Ee(B), ut(B, {
|
|
7025
7025
|
containingElement: ot(n.current)
|
|
7026
7026
|
})));
|
|
7027
7027
|
}
|
|
@@ -7030,8 +7030,8 @@ function Ga(t, e, n) {
|
|
|
7030
7030
|
case "ArrowUp":
|
|
7031
7031
|
case "ArrowDown":
|
|
7032
7032
|
if (!C.altKey && n.current.contains(C.target)) {
|
|
7033
|
-
var
|
|
7034
|
-
C.stopPropagation(), C.preventDefault(), (
|
|
7033
|
+
var I;
|
|
7034
|
+
C.stopPropagation(), C.preventDefault(), (I = n.current.parentElement) === null || I === void 0 || I.dispatchEvent(new KeyboardEvent(C.nativeEvent.type, C.nativeEvent));
|
|
7035
7035
|
}
|
|
7036
7036
|
break;
|
|
7037
7037
|
}
|
|
@@ -7203,13 +7203,13 @@ function bv(t, e, n) {
|
|
|
7203
7203
|
}
|
|
7204
7204
|
}), { focusableProps: $ } = Ct(U(t, {
|
|
7205
7205
|
onFocus: () => e.setLastFocusedValue(r)
|
|
7206
|
-
}), n), x = U(f, $), E =
|
|
7206
|
+
}), n), x = U(f, $), E = $e(t, {
|
|
7207
7207
|
labelable: !0
|
|
7208
7208
|
}), C = -1;
|
|
7209
7209
|
e.selectedValue != null ? e.selectedValue === r && (C = 0) : (e.lastFocusedValue === r || e.lastFocusedValue == null) && (C = 0), u && (C = void 0);
|
|
7210
|
-
let { name: T, descriptionId: S, errorMessageId: P, validationBehavior:
|
|
7210
|
+
let { name: T, descriptionId: S, errorMessageId: P, validationBehavior: N } = Ya.get(e);
|
|
7211
7211
|
return Wn(n, e.selectedValue, e.setSelectedValue), ul({
|
|
7212
|
-
validationBehavior:
|
|
7212
|
+
validationBehavior: N
|
|
7213
7213
|
}, e, n), {
|
|
7214
7214
|
labelProps: U(v, {
|
|
7215
7215
|
onClick: (R) => R.preventDefault()
|
|
@@ -7220,7 +7220,7 @@ function bv(t, e, n) {
|
|
|
7220
7220
|
name: T,
|
|
7221
7221
|
tabIndex: C,
|
|
7222
7222
|
disabled: u,
|
|
7223
|
-
required: e.isRequired &&
|
|
7223
|
+
required: e.isRequired && N === "native",
|
|
7224
7224
|
checked: d,
|
|
7225
7225
|
value: r,
|
|
7226
7226
|
onChange: c,
|
|
@@ -7243,7 +7243,7 @@ function mv(t, e) {
|
|
|
7243
7243
|
labelElementType: "span",
|
|
7244
7244
|
isInvalid: e.isInvalid,
|
|
7245
7245
|
errorMessage: t.errorMessage || d
|
|
7246
|
-
}), $ =
|
|
7246
|
+
}), $ = $e(t, {
|
|
7247
7247
|
labelable: !0
|
|
7248
7248
|
}), { focusWithinProps: x } = an({
|
|
7249
7249
|
onBlurWithin(T) {
|
|
@@ -7273,9 +7273,9 @@ function mv(t, e) {
|
|
|
7273
7273
|
T.preventDefault();
|
|
7274
7274
|
let P = Be(T.currentTarget, {
|
|
7275
7275
|
from: T.target
|
|
7276
|
-
}),
|
|
7277
|
-
S === "next" ? (
|
|
7278
|
-
}, C =
|
|
7276
|
+
}), N;
|
|
7277
|
+
S === "next" ? (N = P.nextNode(), N || (P.currentNode = T.currentTarget, N = P.firstChild())) : (N = P.previousNode(), N || (P.currentNode = T.currentTarget, N = P.lastChild())), N && (N.focus(), e.setSelectedValue(N.value));
|
|
7278
|
+
}, C = me(n);
|
|
7279
7279
|
return Ya.set(e, {
|
|
7280
7280
|
name: C,
|
|
7281
7281
|
descriptionId: v.id,
|
|
@@ -7532,9 +7532,9 @@ function $v(t, e, n) {
|
|
|
7532
7532
|
}, e, n), f = (R) => {
|
|
7533
7533
|
switch (R.key) {
|
|
7534
7534
|
case "ArrowLeft": {
|
|
7535
|
-
var
|
|
7535
|
+
var I, B;
|
|
7536
7536
|
R.preventDefault();
|
|
7537
|
-
let _ = e.selectedKey != null ? (
|
|
7537
|
+
let _ = e.selectedKey != null ? (I = s.getKeyAbove) === null || I === void 0 ? void 0 : I.call(s, e.selectedKey) : (B = s.getFirstKey) === null || B === void 0 ? void 0 : B.call(s);
|
|
7538
7538
|
_ && e.setSelectedKey(_);
|
|
7539
7539
|
break;
|
|
7540
7540
|
}
|
|
@@ -7559,9 +7559,9 @@ function $v(t, e, n) {
|
|
|
7559
7559
|
errorMessage: t.errorMessage || b
|
|
7560
7560
|
});
|
|
7561
7561
|
p.onKeyDown = p.onKeyDownCapture, delete p.onKeyDownCapture;
|
|
7562
|
-
let S =
|
|
7562
|
+
let S = $e(t, {
|
|
7563
7563
|
labelable: !0
|
|
7564
|
-
}), P = U(p, d, E),
|
|
7564
|
+
}), P = U(p, d, E), N = me();
|
|
7565
7565
|
return As.set(e, {
|
|
7566
7566
|
isDisabled: l,
|
|
7567
7567
|
isRequired: i,
|
|
@@ -7583,7 +7583,7 @@ function $v(t, e, n) {
|
|
|
7583
7583
|
onKeyDown: tt(P.onKeyDown, f, t.onKeyDown),
|
|
7584
7584
|
onKeyUp: t.onKeyUp,
|
|
7585
7585
|
"aria-labelledby": [
|
|
7586
|
-
|
|
7586
|
+
N,
|
|
7587
7587
|
P["aria-labelledby"],
|
|
7588
7588
|
P["aria-label"] && !P["aria-labelledby"] ? P.id : null
|
|
7589
7589
|
].filter(Boolean).join(" "),
|
|
@@ -7595,7 +7595,7 @@ function $v(t, e, n) {
|
|
|
7595
7595
|
}
|
|
7596
7596
|
}),
|
|
7597
7597
|
valueProps: {
|
|
7598
|
-
id:
|
|
7598
|
+
id: N
|
|
7599
7599
|
},
|
|
7600
7600
|
menuProps: {
|
|
7601
7601
|
...c,
|
|
@@ -7655,7 +7655,7 @@ function xv(t, e, n) {
|
|
|
7655
7655
|
};
|
|
7656
7656
|
}
|
|
7657
7657
|
function Ev(t) {
|
|
7658
|
-
let { state: e, triggerRef: n, label: r, name: l, isDisabled: i } = t, o =
|
|
7658
|
+
let { state: e, triggerRef: n, label: r, name: l, isDisabled: i } = t, o = K(null), { containerProps: u, selectProps: a } = xv({
|
|
7659
7659
|
...t,
|
|
7660
7660
|
selectRef: o
|
|
7661
7661
|
}, e, n);
|
|
@@ -8169,7 +8169,7 @@ class Pv extends fa {
|
|
|
8169
8169
|
let n = this.collection.getItem(e);
|
|
8170
8170
|
if (!n) return null;
|
|
8171
8171
|
if (n.type === "column") {
|
|
8172
|
-
let r = Je(
|
|
8172
|
+
let r = Je(ye(n, this.collection));
|
|
8173
8173
|
if (r) return r.key;
|
|
8174
8174
|
let l = this.getFirstKey();
|
|
8175
8175
|
return l == null || !this.collection.getItem(l) ? null : super.getKeyForItemInRowByIndex(l, n.index);
|
|
@@ -8190,7 +8190,7 @@ class Pv extends fa {
|
|
|
8190
8190
|
let n = this.findNextKey(e.key, (l) => l.type === "column");
|
|
8191
8191
|
if (n != null) return n;
|
|
8192
8192
|
let r = this.collection.headerRows[e.level];
|
|
8193
|
-
for (let l of
|
|
8193
|
+
for (let l of ye(r, this.collection))
|
|
8194
8194
|
if (l.type === "column") return l.key;
|
|
8195
8195
|
return null;
|
|
8196
8196
|
}
|
|
@@ -8198,7 +8198,7 @@ class Pv extends fa {
|
|
|
8198
8198
|
let n = this.findPreviousKey(e.key, (i) => i.type === "column");
|
|
8199
8199
|
if (n != null) return n;
|
|
8200
8200
|
let r = this.collection.headerRows[e.level], l = [
|
|
8201
|
-
...
|
|
8201
|
+
...ye(r, this.collection)
|
|
8202
8202
|
];
|
|
8203
8203
|
for (let i = l.length - 1; i >= 0; i--) {
|
|
8204
8204
|
let o = l[i];
|
|
@@ -8229,7 +8229,7 @@ class Pv extends fa {
|
|
|
8229
8229
|
let s = a.textValue.slice(0, e.length);
|
|
8230
8230
|
if (this.collator.compare(s, e) === 0) return a.key;
|
|
8231
8231
|
}
|
|
8232
|
-
for (let s of
|
|
8232
|
+
for (let s of ye(a, this.collection)) {
|
|
8233
8233
|
let d = r.columns[s.index];
|
|
8234
8234
|
if (r.rowHeaderColumnKeys.has(d.key) && s.textValue) {
|
|
8235
8235
|
let c = s.textValue.slice(0, e.length);
|
|
@@ -8270,7 +8270,7 @@ function kv(t, e, n) {
|
|
|
8270
8270
|
u,
|
|
8271
8271
|
i,
|
|
8272
8272
|
o
|
|
8273
|
-
]), c =
|
|
8273
|
+
]), c = me(t.id);
|
|
8274
8274
|
hl.set(e, c);
|
|
8275
8275
|
let { gridProps: f } = cv({
|
|
8276
8276
|
...t,
|
|
@@ -8322,7 +8322,7 @@ function Av(t, e, n) {
|
|
|
8322
8322
|
let v = wt(Tv(bl), "@react-aria/table"), b;
|
|
8323
8323
|
o && (b = `${v.format("sortable")}`, f && p && tn() && (b = `${b}, ${v.format(p)}`));
|
|
8324
8324
|
let $ = Hn(b), x = e.collection.size === 0;
|
|
8325
|
-
return
|
|
8325
|
+
return j(() => {
|
|
8326
8326
|
x && e.selectionManager.focusedKey === i.key && e.selectionManager.setFocusedKey(null);
|
|
8327
8327
|
}, [
|
|
8328
8328
|
x,
|
|
@@ -8368,8 +8368,8 @@ function Bv(t, e, n) {
|
|
|
8368
8368
|
let P = ((s = S.props) === null || s === void 0 ? void 0 : s.UNSTABLE_childItems) || ((c = S.props) === null || c === void 0 || (d = c.children) === null || d === void 0 ? void 0 : d.length) > e.userColumnCount;
|
|
8369
8369
|
var b, $, x, E;
|
|
8370
8370
|
a = {
|
|
8371
|
-
onKeyDown: (
|
|
8372
|
-
(
|
|
8371
|
+
onKeyDown: (N) => {
|
|
8372
|
+
(N.key === wi.expand[u] && e.selectionManager.focusedKey === S.key && P && e.expandedKeys !== "all" && !e.expandedKeys.has(S.key) || N.key === wi.collapse[u] && e.selectionManager.focusedKey === S.key && P && (e.expandedKeys === "all" || e.expandedKeys.has(S.key))) && (e.toggleKey(S.key), N.stopPropagation());
|
|
8373
8373
|
},
|
|
8374
8374
|
"aria-expanded": P ? e.expandedKeys === "all" || e.expandedKeys.has(r.key) : void 0,
|
|
8375
8375
|
"aria-level": S.level,
|
|
@@ -8407,7 +8407,7 @@ function Nv() {
|
|
|
8407
8407
|
return dv();
|
|
8408
8408
|
}
|
|
8409
8409
|
function Iv(t, e) {
|
|
8410
|
-
let n =
|
|
8410
|
+
let n = $e(t, {
|
|
8411
8411
|
labelable: !0
|
|
8412
8412
|
}), { hoverProps: r } = Ot({
|
|
8413
8413
|
onHoverStart: () => e == null ? void 0 : e.open(!0),
|
|
@@ -8420,12 +8420,12 @@ function Iv(t, e) {
|
|
|
8420
8420
|
};
|
|
8421
8421
|
}
|
|
8422
8422
|
function Rv(t, e, n) {
|
|
8423
|
-
let { isDisabled: r, trigger: l } = t, i =
|
|
8423
|
+
let { isDisabled: r, trigger: l } = t, i = me(), o = K(!1), u = K(!1), a = () => {
|
|
8424
8424
|
(o.current || u.current) && e.open(u.current);
|
|
8425
8425
|
}, s = (x) => {
|
|
8426
8426
|
!o.current && !u.current && e.close(x);
|
|
8427
8427
|
};
|
|
8428
|
-
|
|
8428
|
+
j(() => {
|
|
8429
8429
|
let x = (E) => {
|
|
8430
8430
|
n && n.current && E.key === "Escape" && (E.stopPropagation(), e.close(!0));
|
|
8431
8431
|
};
|
|
@@ -8535,7 +8535,7 @@ function Fv(t, e) {
|
|
|
8535
8535
|
return !0;
|
|
8536
8536
|
}
|
|
8537
8537
|
function Zn(t) {
|
|
8538
|
-
let { selectionMode: e = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: l = "toggle", disabledBehavior: i = "all" } = t, o =
|
|
8538
|
+
let { selectionMode: e = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: l = "toggle", disabledBehavior: i = "all" } = t, o = K(!1), [, u] = W(!1), a = K(null), s = K(null), [, d] = W(null), c = H(() => Di(t.selectedKeys), [
|
|
8539
8539
|
t.selectedKeys
|
|
8540
8540
|
]), f = H(() => Di(t.defaultSelectedKeys, new Oe()), [
|
|
8541
8541
|
t.defaultSelectedKeys
|
|
@@ -8543,8 +8543,8 @@ function Zn(t) {
|
|
|
8543
8543
|
t.disabledKeys
|
|
8544
8544
|
]), [$, x] = W(l);
|
|
8545
8545
|
l === "replace" && $ === "toggle" && typeof p == "object" && p.size === 0 && x("replace");
|
|
8546
|
-
let E =
|
|
8547
|
-
return
|
|
8546
|
+
let E = K(l);
|
|
8547
|
+
return j(() => {
|
|
8548
8548
|
l !== E.current && (x(l), E.current = l);
|
|
8549
8549
|
}, [
|
|
8550
8550
|
l
|
|
@@ -8787,7 +8787,7 @@ class jt {
|
|
|
8787
8787
|
let o = this.collection.getItem(r);
|
|
8788
8788
|
(o == null ? void 0 : o.type) === "item" && e.push(r);
|
|
8789
8789
|
var i;
|
|
8790
|
-
o != null && o.hasChildNodes && (this.allowsCellSelection || o.type !== "item") && n((i = (l = Je(
|
|
8790
|
+
o != null && o.hasChildNodes && (this.allowsCellSelection || o.type !== "item") && n((i = (l = Je(ye(o, this.collection))) === null || l === void 0 ? void 0 : l.key) !== null && i !== void 0 ? i : null);
|
|
8791
8791
|
}
|
|
8792
8792
|
r = this.collection.getKeyAfter(r);
|
|
8793
8793
|
}
|
|
@@ -8881,8 +8881,8 @@ function _v(t) {
|
|
|
8881
8881
|
};
|
|
8882
8882
|
}
|
|
8883
8883
|
function Lv(t, e) {
|
|
8884
|
-
const n =
|
|
8885
|
-
|
|
8884
|
+
const n = K(null);
|
|
8885
|
+
j(() => {
|
|
8886
8886
|
if (e.focusedKey != null && !t.getItem(e.focusedKey) && n.current) {
|
|
8887
8887
|
const d = n.current.getItem(e.focusedKey), c = [
|
|
8888
8888
|
...n.current.getKeys()
|
|
@@ -9116,7 +9116,7 @@ function Gv(t) {
|
|
|
9116
9116
|
let v = e.getItem(a);
|
|
9117
9117
|
if ((v == null ? void 0 : v.type) === "item") {
|
|
9118
9118
|
var d, c;
|
|
9119
|
-
let b =
|
|
9119
|
+
let b = ye(v, e);
|
|
9120
9120
|
var f, p;
|
|
9121
9121
|
s === "last" ? a = (f = (d = ct(b)) === null || d === void 0 ? void 0 : d.key) !== null && f !== void 0 ? f : null : a = (p = (c = Je(b)) === null || c === void 0 ? void 0 : c.key) !== null && p !== void 0 ? p : null;
|
|
9122
9122
|
}
|
|
@@ -9127,8 +9127,8 @@ function Gv(t) {
|
|
|
9127
9127
|
e,
|
|
9128
9128
|
r
|
|
9129
9129
|
]);
|
|
9130
|
-
const u =
|
|
9131
|
-
return
|
|
9130
|
+
const u = K(null);
|
|
9131
|
+
return j(() => {
|
|
9132
9132
|
if (r.focusedKey != null && u.current && !e.getItem(r.focusedKey)) {
|
|
9133
9133
|
const a = u.current.getItem(r.focusedKey), s = (a == null ? void 0 : a.parentKey) != null && (a.type === "cell" || a.type === "rowheader" || a.type === "column") ? u.current.getItem(a.parentKey) : a;
|
|
9134
9134
|
if (!s) {
|
|
@@ -9146,7 +9146,7 @@ function Gv(t) {
|
|
|
9146
9146
|
}
|
|
9147
9147
|
if (v) {
|
|
9148
9148
|
const b = v.hasChildNodes ? [
|
|
9149
|
-
...
|
|
9149
|
+
...ye(v, e)
|
|
9150
9150
|
] : [], $ = v.hasChildNodes && s !== a && a && a.index < b.length ? b[a.index].key : v.key;
|
|
9151
9151
|
r.setFocusedKey($);
|
|
9152
9152
|
} else r.setFocusedKey(null);
|
|
@@ -9693,7 +9693,7 @@ let n0 = mc;
|
|
|
9693
9693
|
const r0 = 1500, Ti = 500;
|
|
9694
9694
|
let gt = {}, l0 = 0, qt = !1, Ze = null, yt = null;
|
|
9695
9695
|
function gc(t = {}) {
|
|
9696
|
-
let { delay: e = r0, closeDelay: n = Ti } = t, { isOpen: r, open: l, close: i } = zt(t), o = H(() => `${++l0}`, []), u =
|
|
9696
|
+
let { delay: e = r0, closeDelay: n = Ti } = t, { isOpen: r, open: l, close: i } = zt(t), o = H(() => `${++l0}`, []), u = K(null), a = K(i), s = () => {
|
|
9697
9697
|
gt[o] = f;
|
|
9698
9698
|
}, d = () => {
|
|
9699
9699
|
for (let v in gt) v !== o && (gt[v](!0), delete gt[v]);
|
|
@@ -9710,11 +9710,11 @@ function gc(t = {}) {
|
|
|
9710
9710
|
Ze = null, qt = !0, c();
|
|
9711
9711
|
}, e) : r || c();
|
|
9712
9712
|
};
|
|
9713
|
-
return
|
|
9713
|
+
return j(() => {
|
|
9714
9714
|
a.current = i;
|
|
9715
9715
|
}, [
|
|
9716
9716
|
i
|
|
9717
|
-
]),
|
|
9717
|
+
]), j(() => () => {
|
|
9718
9718
|
u.current && clearTimeout(u.current), gt[o] && delete gt[o];
|
|
9719
9719
|
}, [
|
|
9720
9720
|
o
|
|
@@ -9783,7 +9783,7 @@ function yc(t) {
|
|
|
9783
9783
|
}), [
|
|
9784
9784
|
n
|
|
9785
9785
|
]), null);
|
|
9786
|
-
return
|
|
9786
|
+
return j(() => {
|
|
9787
9787
|
l.focusedKey != null && !o.getItem(l.focusedKey) && l.setFocusedKey(null);
|
|
9788
9788
|
}, [
|
|
9789
9789
|
o,
|
|
@@ -9817,11 +9817,11 @@ const $c = ne(void 0), Me = () => {
|
|
|
9817
9817
|
children: e,
|
|
9818
9818
|
palette: n = Ed
|
|
9819
9819
|
}) => {
|
|
9820
|
-
const r =
|
|
9820
|
+
const r = K(null), l = u0[t], i = H(
|
|
9821
9821
|
() => c0(n, t),
|
|
9822
9822
|
[n, t]
|
|
9823
9823
|
);
|
|
9824
|
-
return
|
|
9824
|
+
return j(() => {
|
|
9825
9825
|
r.current && (r.current.className = l, Object.entries(i).forEach(([o, u]) => {
|
|
9826
9826
|
r.current.style.setProperty(o, u);
|
|
9827
9827
|
}));
|
|
@@ -9948,7 +9948,7 @@ const dn = Ke(
|
|
|
9948
9948
|
target: i || (p ? "_blank" : void 0),
|
|
9949
9949
|
href: l,
|
|
9950
9950
|
rel: p || i === "_blank" ? "noopener noreferrer" : void 0
|
|
9951
|
-
}, { className: b } = Me(), $ =
|
|
9951
|
+
}, { className: b } = Me(), $ = K(null), x = K(null), { buttonProps: E } = sn(
|
|
9952
9952
|
{
|
|
9953
9953
|
onPress: o,
|
|
9954
9954
|
elementType: f,
|
|
@@ -9994,7 +9994,7 @@ const dn = Ke(
|
|
|
9994
9994
|
), ml = Ke(
|
|
9995
9995
|
({ fadeIn: t = !1, onClose: e, children: n }, r) => {
|
|
9996
9996
|
const { theme: l, palette: i } = Me();
|
|
9997
|
-
return
|
|
9997
|
+
return j(() => {
|
|
9998
9998
|
if (!e) return;
|
|
9999
9999
|
const o = (u) => {
|
|
10000
10000
|
u.key === "Escape" && e();
|
|
@@ -10077,43 +10077,44 @@ const xc = ({
|
|
|
10077
10077
|
title: s,
|
|
10078
10078
|
onSelectionChange: d,
|
|
10079
10079
|
onClose: c,
|
|
10080
|
-
"data-testid": f
|
|
10080
|
+
"data-testid": f,
|
|
10081
|
+
menuId: p
|
|
10081
10082
|
}) => {
|
|
10082
10083
|
$d(t);
|
|
10083
|
-
const { className:
|
|
10084
|
+
const { className: v, theme: b } = Me(), [$, x] = W(0), [E, C] = W([]), [T, S] = W({
|
|
10084
10085
|
title: s,
|
|
10085
10086
|
actions: a,
|
|
10086
10087
|
key: null,
|
|
10087
10088
|
previousKey: null
|
|
10088
|
-
}),
|
|
10089
|
+
}), P = T.actions || [], N = K(null), R = K(null), I = K(null), B = K(!1), { isClosing: g, handleClose: F } = Oi({
|
|
10089
10090
|
onClose: c,
|
|
10090
|
-
overlayRef:
|
|
10091
|
-
}),
|
|
10092
|
-
|
|
10093
|
-
},
|
|
10094
|
-
items:
|
|
10095
|
-
children:
|
|
10091
|
+
overlayRef: I
|
|
10092
|
+
}), _ = P && P.length > 0, k = () => {
|
|
10093
|
+
x(0), F();
|
|
10094
|
+
}, O = yc({
|
|
10095
|
+
items: P,
|
|
10096
|
+
children: P.map((X) => /* @__PURE__ */ Li(Su, { ...X, key: X.key, textValue: X.key }, X.label)),
|
|
10096
10097
|
defaultSelectedKeys: r ? new Set(r) : void 0,
|
|
10097
10098
|
selectedKeys: n ? new Set(n) : void 0,
|
|
10098
10099
|
onSelectionChange: d,
|
|
10099
10100
|
selectionMode: e,
|
|
10100
10101
|
disabledKeys: l
|
|
10101
|
-
}), { menuProps:
|
|
10102
|
+
}), { menuProps: h } = sa(
|
|
10102
10103
|
{
|
|
10103
10104
|
autoFocus: !0,
|
|
10104
10105
|
shouldFocusWrap: !0,
|
|
10105
|
-
onAction: (
|
|
10106
|
-
var
|
|
10107
|
-
const Z =
|
|
10106
|
+
onAction: (X) => {
|
|
10107
|
+
var ue;
|
|
10108
|
+
const Z = P.find((fe) => fe.key === X);
|
|
10108
10109
|
if (!Z) {
|
|
10109
|
-
console.error(`Action with key ${
|
|
10110
|
+
console.error(`Action with key ${X} not found`);
|
|
10110
10111
|
return;
|
|
10111
10112
|
}
|
|
10112
|
-
(
|
|
10113
|
+
(ue = Z == null ? void 0 : Z.children) != null && ue.length && A(X);
|
|
10113
10114
|
},
|
|
10114
10115
|
onClose: () => {
|
|
10115
|
-
if (
|
|
10116
|
-
|
|
10116
|
+
if (B.current) {
|
|
10117
|
+
B.current = !1;
|
|
10117
10118
|
return;
|
|
10118
10119
|
}
|
|
10119
10120
|
c == null || c();
|
|
@@ -10125,78 +10126,79 @@ const xc = ({
|
|
|
10125
10126
|
defaultSelectedKeys: r,
|
|
10126
10127
|
"aria-label": "Action Menu"
|
|
10127
10128
|
},
|
|
10128
|
-
|
|
10129
|
-
|
|
10129
|
+
O,
|
|
10130
|
+
R
|
|
10130
10131
|
);
|
|
10131
|
-
function
|
|
10132
|
-
const Z =
|
|
10132
|
+
function A(X) {
|
|
10133
|
+
const Z = P.find((ue) => ue.key === X);
|
|
10133
10134
|
if (!Z) {
|
|
10134
|
-
console.error(`Action with key ${
|
|
10135
|
+
console.error(`Action with key ${X} not found`);
|
|
10135
10136
|
return;
|
|
10136
10137
|
}
|
|
10137
|
-
|
|
10138
|
-
...
|
|
10139
|
-
|
|
10140
|
-
]),
|
|
10138
|
+
C((ue) => [
|
|
10139
|
+
...ue,
|
|
10140
|
+
T
|
|
10141
|
+
]), S((ue) => ({
|
|
10141
10142
|
title: Z.label,
|
|
10142
10143
|
actions: Z.children,
|
|
10143
10144
|
key: Z.key,
|
|
10144
|
-
previousKey:
|
|
10145
|
-
})),
|
|
10145
|
+
previousKey: ue.key
|
|
10146
|
+
})), B.current = !0;
|
|
10146
10147
|
}
|
|
10147
|
-
function
|
|
10148
|
-
if (
|
|
10149
|
-
const
|
|
10150
|
-
|
|
10148
|
+
function w() {
|
|
10149
|
+
if (E.length > 0) {
|
|
10150
|
+
const X = E[E.length - 1];
|
|
10151
|
+
S(X), C(E.slice(0, -1));
|
|
10151
10152
|
}
|
|
10152
10153
|
}
|
|
10153
|
-
|
|
10154
|
-
t &&
|
|
10155
|
-
}, [t,
|
|
10156
|
-
const
|
|
10157
|
-
return t ? /* @__PURE__ */ m.jsx(ml, { fadeIn: !0, ref:
|
|
10154
|
+
j(() => {
|
|
10155
|
+
t && N.current && x(N.current.scrollHeight);
|
|
10156
|
+
}, [t, N, E]);
|
|
10157
|
+
const z = i || _ || o;
|
|
10158
|
+
return t ? /* @__PURE__ */ m.jsx(ml, { fadeIn: !0, ref: I, onClose: k, children: /* @__PURE__ */ m.jsx(
|
|
10158
10159
|
"div",
|
|
10159
10160
|
{
|
|
10160
10161
|
className: "proton-ActionMenu__background-wrapper",
|
|
10161
10162
|
style: {
|
|
10162
|
-
opacity:
|
|
10163
|
+
opacity: g ? 0 : 1
|
|
10163
10164
|
},
|
|
10164
10165
|
children: /* @__PURE__ */ m.jsx(
|
|
10165
10166
|
"div",
|
|
10166
10167
|
{
|
|
10167
|
-
"data-testid": f || "ActionMenu
|
|
10168
|
-
className: "proton-
|
|
10168
|
+
"data-testid": f || "ActionMenu",
|
|
10169
|
+
className: "proton-ActionMenu",
|
|
10170
|
+
id: p,
|
|
10169
10171
|
children: /* @__PURE__ */ m.jsx(
|
|
10170
10172
|
"div",
|
|
10171
10173
|
{
|
|
10172
|
-
className: G("proton-ActionMenu__card",
|
|
10174
|
+
className: G("proton-ActionMenu__card", v),
|
|
10173
10175
|
"data-testid": "ActionMenu-content",
|
|
10174
|
-
style: { height: `${
|
|
10175
|
-
children: /* @__PURE__ */ m.jsx("div", { ref:
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10176
|
+
style: { height: `${$}px` },
|
|
10177
|
+
children: /* @__PURE__ */ m.jsx("div", { ref: R, children: /* @__PURE__ */ m.jsxs("div", { ...h, ref: N, children: [
|
|
10178
|
+
T.title && /* @__PURE__ */ m.jsxs("div", { className: "proton-ActionMenu__title", children: [
|
|
10179
|
+
E.length > 0 && /* @__PURE__ */ m.jsx("div", { style: { position: "absolute", left: 0 }, children: /* @__PURE__ */ m.jsx("button", { onClick: w, children: /* @__PURE__ */ m.jsx(Jn, { id: "chevron-left", size: 16 }) }) }),
|
|
10180
|
+
T.title
|
|
10179
10181
|
] }),
|
|
10180
|
-
|
|
10181
|
-
i && /* @__PURE__ */ m.jsx("div", { className: "proton-ActionMenu__content", children: typeof i == "function" ? i({ close:
|
|
10182
|
-
|
|
10182
|
+
z ? /* @__PURE__ */ m.jsxs(cn, { autoFocus: !0, contain: !0, children: [
|
|
10183
|
+
i && /* @__PURE__ */ m.jsx("div", { className: "proton-ActionMenu__content", children: typeof i == "function" ? i({ close: k }) : i }),
|
|
10184
|
+
_ && /* @__PURE__ */ m.jsx(
|
|
10183
10185
|
"div",
|
|
10184
10186
|
{
|
|
10185
10187
|
className: G(
|
|
10186
10188
|
"proton-ActionMenu__list",
|
|
10187
10189
|
e === "none" && "proton-ActionMenu__list--disabled"
|
|
10188
10190
|
),
|
|
10189
|
-
children: Array.from(
|
|
10190
|
-
var
|
|
10191
|
-
const
|
|
10191
|
+
children: Array.from(O.collection).map((X, Z) => {
|
|
10192
|
+
var fe;
|
|
10193
|
+
const ue = T.actions[Z];
|
|
10192
10194
|
return /* @__PURE__ */ m.jsx(
|
|
10193
10195
|
f0,
|
|
10194
10196
|
{
|
|
10195
|
-
item:
|
|
10196
|
-
state:
|
|
10197
|
-
isSubmenu: !!((
|
|
10197
|
+
item: X,
|
|
10198
|
+
state: O,
|
|
10199
|
+
isSubmenu: !!((fe = ue.children) != null && fe.length)
|
|
10198
10200
|
},
|
|
10199
|
-
|
|
10201
|
+
X.key
|
|
10200
10202
|
);
|
|
10201
10203
|
})
|
|
10202
10204
|
}
|
|
@@ -10209,8 +10211,8 @@ const xc = ({
|
|
|
10209
10211
|
children: /* @__PURE__ */ m.jsx(
|
|
10210
10212
|
dn,
|
|
10211
10213
|
{
|
|
10212
|
-
variant:
|
|
10213
|
-
onPress:
|
|
10214
|
+
variant: b === "dark" || b === "custom-dark" ? "translucent" : "secondary",
|
|
10215
|
+
onPress: k,
|
|
10214
10216
|
"data-testid": "ActionMenuItem-cancel",
|
|
10215
10217
|
children: u
|
|
10216
10218
|
}
|
|
@@ -10226,7 +10228,7 @@ const xc = ({
|
|
|
10226
10228
|
}
|
|
10227
10229
|
) }) : null;
|
|
10228
10230
|
}, f0 = ({ state: t, item: e, isSubmenu: n }) => {
|
|
10229
|
-
const r =
|
|
10231
|
+
const r = K(null), { props: l } = e, { menuItemProps: i } = ca({ key: e.key }, t, r), o = l.to ? "a" : "div", u = l.to && Gr(l.to), a = l.to ? {
|
|
10230
10232
|
href: l.to,
|
|
10231
10233
|
target: u ? "_blank" : void 0,
|
|
10232
10234
|
rel: u ? "noopener noreferrer" : void 0,
|
|
@@ -10403,7 +10405,7 @@ $0.Option = function(e) {
|
|
|
10403
10405
|
let n = {
|
|
10404
10406
|
...e,
|
|
10405
10407
|
"data-testid": void 0
|
|
10406
|
-
}, r = q(Sc), l =
|
|
10408
|
+
}, r = q(Sc), l = K(null), { inputProps: i, isSelected: o } = bv(n, r, l);
|
|
10407
10409
|
return /* @__PURE__ */ m.jsxs(
|
|
10408
10410
|
"label",
|
|
10409
10411
|
{
|
|
@@ -10500,7 +10502,7 @@ function bt(t, e, n) {
|
|
|
10500
10502
|
];
|
|
10501
10503
|
}
|
|
10502
10504
|
function x0(t = !0) {
|
|
10503
|
-
let [e, n] = W(t), r =
|
|
10505
|
+
let [e, n] = W(t), r = K(!1), l = te((i) => {
|
|
10504
10506
|
r.current = !0, n(!!i);
|
|
10505
10507
|
}, []);
|
|
10506
10508
|
return Q(() => {
|
|
@@ -10928,7 +10930,7 @@ function D0({ collection: t, render: e }) {
|
|
|
10928
10930
|
return e(t);
|
|
10929
10931
|
}
|
|
10930
10932
|
function k0(t, e, n) {
|
|
10931
|
-
let r = St(), l =
|
|
10933
|
+
let r = St(), l = K(r);
|
|
10932
10934
|
l.current = r;
|
|
10933
10935
|
let i = te(() => l.current ? n() : e(), [
|
|
10934
10936
|
e,
|
|
@@ -11065,10 +11067,10 @@ const M0 = /* @__PURE__ */ ne(null), N0 = /* @__PURE__ */ new Set([
|
|
|
11065
11067
|
...e,
|
|
11066
11068
|
values: f,
|
|
11067
11069
|
defaultClassName: "react-aria-Button"
|
|
11068
|
-
}), v =
|
|
11070
|
+
}), v = me(i.id), b = me(), $ = i["aria-labelledby"];
|
|
11069
11071
|
l && ($ ? $ = `${$} ${b}` : i["aria-label"] && ($ = `${v} ${b}`));
|
|
11070
|
-
let x =
|
|
11071
|
-
return
|
|
11072
|
+
let x = K(l);
|
|
11073
|
+
return j(() => {
|
|
11072
11074
|
let E = {
|
|
11073
11075
|
"aria-labelledby": $ || v
|
|
11074
11076
|
};
|
|
@@ -11079,7 +11081,7 @@ const M0 = /* @__PURE__ */ ne(null), N0 = /* @__PURE__ */ new Set([
|
|
|
11079
11081
|
$,
|
|
11080
11082
|
v
|
|
11081
11083
|
]), /* @__PURE__ */ D.createElement("button", {
|
|
11082
|
-
|
|
11084
|
+
...$e(e, {
|
|
11083
11085
|
propNames: N0
|
|
11084
11086
|
}),
|
|
11085
11087
|
...U(i, u, d),
|
|
@@ -11175,7 +11177,7 @@ const Nc = /* @__PURE__ */ ne({}), j0 = /* @__PURE__ */ Ac("header", function(e,
|
|
|
11175
11177
|
}
|
|
11176
11178
|
});
|
|
11177
11179
|
i.style && Object.keys(i.style).forEach((u) => i.style[u] === void 0 && delete i.style[u]);
|
|
11178
|
-
let o =
|
|
11180
|
+
let o = $e(e);
|
|
11179
11181
|
return /* @__PURE__ */ D.createElement("div", {
|
|
11180
11182
|
...o,
|
|
11181
11183
|
...i,
|
|
@@ -11209,7 +11211,7 @@ const Nc = /* @__PURE__ */ ne({}), j0 = /* @__PURE__ */ Ac("header", function(e,
|
|
|
11209
11211
|
});
|
|
11210
11212
|
});
|
|
11211
11213
|
function H0({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
11212
|
-
let l =
|
|
11214
|
+
let l = K(null), [i, o] = W(0), u = K(null), a = q(Ii), s = a && r.trigger === "SubmenuTrigger";
|
|
11213
11215
|
Q(() => {
|
|
11214
11216
|
l.current && t.isOpen && o(l.current.getBoundingClientRect().width);
|
|
11215
11217
|
}, [
|
|
@@ -11239,7 +11241,7 @@ function H0({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
11239
11241
|
}, [
|
|
11240
11242
|
b,
|
|
11241
11243
|
E
|
|
11242
|
-
]),
|
|
11244
|
+
]), j(() => {
|
|
11243
11245
|
C && b.current && !b.current.contains(document.activeElement) && Ee(b.current);
|
|
11244
11246
|
}, [
|
|
11245
11247
|
C,
|
|
@@ -11249,7 +11251,7 @@ function H0({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
11249
11251
|
...c.style,
|
|
11250
11252
|
...x.style
|
|
11251
11253
|
}, P = /* @__PURE__ */ D.createElement("div", {
|
|
11252
|
-
...U(
|
|
11254
|
+
...U($e(r), c),
|
|
11253
11255
|
...x,
|
|
11254
11256
|
role: C ? "dialog" : void 0,
|
|
11255
11257
|
tabIndex: C ? -1 : void 0,
|
|
@@ -11294,18 +11296,18 @@ function H0({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
11294
11296
|
}, /* @__PURE__ */ D.createElement(Ii.Provider, {
|
|
11295
11297
|
value: u
|
|
11296
11298
|
}, P)));
|
|
11297
|
-
var
|
|
11299
|
+
var N;
|
|
11298
11300
|
return /* @__PURE__ */ D.createElement(Rn, {
|
|
11299
11301
|
...r,
|
|
11300
11302
|
shouldContainFocus: C,
|
|
11301
11303
|
isExiting: e,
|
|
11302
|
-
portalContainer: (
|
|
11304
|
+
portalContainer: (N = n ?? (a == null ? void 0 : a.current)) !== null && N !== void 0 ? N : void 0
|
|
11303
11305
|
}, P);
|
|
11304
11306
|
}
|
|
11305
11307
|
const W0 = /* @__PURE__ */ ne({}), Fc = /* @__PURE__ */ ne(null), er = /* @__PURE__ */ ne(null), Wr = /* @__PURE__ */ ne(null), _n = /* @__PURE__ */ ne(null), _c = /* @__PURE__ */ ne(null), U0 = /* @__PURE__ */ Bc("submenutrigger", (t, e, n) => {
|
|
11306
11308
|
let { CollectionBranch: r } = q($l), l = q(er), i = q(Wr), o = jv({
|
|
11307
11309
|
triggerKey: n.key
|
|
11308
|
-
}, i), u =
|
|
11310
|
+
}, i), u = K(null), a = Lt(e), { parentMenuRef: s, shouldUseVirtualFocus: d } = q(_c), { submenuTriggerProps: c, submenuProps: f, popoverProps: p } = lv({
|
|
11309
11311
|
parentMenuRef: s,
|
|
11310
11312
|
submenuRef: u,
|
|
11311
11313
|
delay: t.delay,
|
|
@@ -11386,7 +11388,7 @@ function G0({ props: t, collection: e, menuRef: n }) {
|
|
|
11386
11388
|
display: "contents"
|
|
11387
11389
|
}
|
|
11388
11390
|
}, t.renderEmptyState())), /* @__PURE__ */ D.createElement(cn, null, /* @__PURE__ */ D.createElement("div", {
|
|
11389
|
-
|
|
11391
|
+
...$e(t),
|
|
11390
11392
|
...c,
|
|
11391
11393
|
...f,
|
|
11392
11394
|
ref: n,
|
|
@@ -11479,7 +11481,7 @@ function Oc(t, e, n, r = "react-aria-MenuSection") {
|
|
|
11479
11481
|
values: {}
|
|
11480
11482
|
}), v = q(_n), b = Zn(t), $ = t.selectionMode != null ? new Y0(v, b) : v;
|
|
11481
11483
|
return /* @__PURE__ */ D.createElement("section", {
|
|
11482
|
-
|
|
11484
|
+
...$e(t),
|
|
11483
11485
|
...f,
|
|
11484
11486
|
...p,
|
|
11485
11487
|
ref: e
|
|
@@ -11560,7 +11562,7 @@ const q0 = /* @__PURE__ */ Bc("section", Oc), Ln = /* @__PURE__ */ ne(null), X0
|
|
|
11560
11562
|
}, $.children));
|
|
11561
11563
|
}), jc = /* @__PURE__ */ ne(null), El = /* @__PURE__ */ ne(null), zc = /* @__PURE__ */ ne(null);
|
|
11562
11564
|
function Z0(t) {
|
|
11563
|
-
let e = gc(t), n =
|
|
11565
|
+
let e = gc(t), n = K(null), { triggerProps: r, tooltipProps: l } = Rv(t, e, n);
|
|
11564
11566
|
return /* @__PURE__ */ D.createElement(fn, {
|
|
11565
11567
|
values: [
|
|
11566
11568
|
[
|
|
@@ -11592,7 +11594,7 @@ const J0 = /* @__PURE__ */ Ke(function({ UNSTABLE_portalContainer: e, ...n }, r)
|
|
|
11592
11594
|
}));
|
|
11593
11595
|
});
|
|
11594
11596
|
function Q0(t) {
|
|
11595
|
-
let e = q(El), n =
|
|
11597
|
+
let e = q(El), n = K(null), [r, l] = W(0);
|
|
11596
11598
|
Q(() => {
|
|
11597
11599
|
n.current && e.isOpen && l(n.current.getBoundingClientRect().width);
|
|
11598
11600
|
}, [
|
|
@@ -11649,14 +11651,16 @@ function eh({
|
|
|
11649
11651
|
selectedKey: l,
|
|
11650
11652
|
disabledKeys: i,
|
|
11651
11653
|
title: o,
|
|
11652
|
-
triggerRef: u
|
|
11654
|
+
triggerRef: u,
|
|
11655
|
+
"data-testid": a,
|
|
11656
|
+
menuId: s
|
|
11653
11657
|
}) {
|
|
11654
|
-
const { className:
|
|
11658
|
+
const { className: d, style: c } = Me();
|
|
11655
11659
|
return /* @__PURE__ */ m.jsx(
|
|
11656
11660
|
Rc,
|
|
11657
11661
|
{
|
|
11658
|
-
className: G("proton-Popover",
|
|
11659
|
-
style:
|
|
11662
|
+
className: G("proton-Popover", d),
|
|
11663
|
+
style: c,
|
|
11660
11664
|
triggerRef: u,
|
|
11661
11665
|
isOpen: e,
|
|
11662
11666
|
onOpenChange: n,
|
|
@@ -11671,12 +11675,14 @@ function eh({
|
|
|
11671
11675
|
disabledKeys: i,
|
|
11672
11676
|
onClose: () => n(!1),
|
|
11673
11677
|
autoFocus: !0,
|
|
11678
|
+
"data-testid": a,
|
|
11679
|
+
id: s,
|
|
11674
11680
|
children: /* @__PURE__ */ m.jsxs(q0, { children: [
|
|
11675
11681
|
o && /* @__PURE__ */ m.jsx(j0, { className: "proton-MenuTrigger__menu-header", children: o }),
|
|
11676
|
-
t.map((
|
|
11677
|
-
item:
|
|
11678
|
-
className:
|
|
11679
|
-
style:
|
|
11682
|
+
t.map((f) => Vc({
|
|
11683
|
+
item: f,
|
|
11684
|
+
className: d,
|
|
11685
|
+
style: c,
|
|
11680
11686
|
disabledKeys: i,
|
|
11681
11687
|
onClose: () => n(!1)
|
|
11682
11688
|
}))
|
|
@@ -11757,66 +11763,70 @@ function th({
|
|
|
11757
11763
|
menuTestId: u,
|
|
11758
11764
|
onSelectionChange: a,
|
|
11759
11765
|
selectedKey: s,
|
|
11760
|
-
disabledKeys: d
|
|
11766
|
+
disabledKeys: d,
|
|
11767
|
+
menuId: c
|
|
11761
11768
|
}) {
|
|
11762
|
-
const
|
|
11763
|
-
() => r.map((
|
|
11769
|
+
const f = H(
|
|
11770
|
+
() => r.map((N) => ({ ...N, id: N.key })),
|
|
11764
11771
|
[r]
|
|
11765
|
-
),
|
|
11772
|
+
), p = Ur(Yr.SMALL), v = fc({}), { isOpen: b, setOpen: $ } = v, x = K(null), { menuTriggerProps: E, menuProps: C } = ua(
|
|
11766
11773
|
{},
|
|
11767
|
-
|
|
11768
|
-
|
|
11774
|
+
v,
|
|
11775
|
+
x
|
|
11769
11776
|
);
|
|
11770
|
-
function
|
|
11771
|
-
const
|
|
11772
|
-
|
|
11777
|
+
function T(N) {
|
|
11778
|
+
const R = Array.from(N)[0];
|
|
11779
|
+
R && (a == null || a(R));
|
|
11773
11780
|
}
|
|
11774
|
-
const
|
|
11781
|
+
const S = /* @__PURE__ */ m.jsx(
|
|
11775
11782
|
R0,
|
|
11776
11783
|
{
|
|
11777
|
-
...
|
|
11784
|
+
...E,
|
|
11778
11785
|
"data-testid": o,
|
|
11779
11786
|
isDisabled: l,
|
|
11780
11787
|
className: G("proton-MenuTrigger__button"),
|
|
11781
|
-
ref:
|
|
11788
|
+
ref: x,
|
|
11782
11789
|
children: /* @__PURE__ */ m.jsx(nh, { size: e })
|
|
11783
11790
|
}
|
|
11784
|
-
),
|
|
11785
|
-
isOpen:
|
|
11786
|
-
setIsOpen:
|
|
11791
|
+
), P = t ? t({
|
|
11792
|
+
isOpen: b,
|
|
11793
|
+
setIsOpen: $,
|
|
11787
11794
|
disabled: l,
|
|
11788
|
-
triggerRef:
|
|
11789
|
-
}) :
|
|
11790
|
-
return
|
|
11791
|
-
|
|
11792
|
-
}, [
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
+
triggerRef: x
|
|
11796
|
+
}) : S;
|
|
11797
|
+
return j(() => () => {
|
|
11798
|
+
b && (i == null || i());
|
|
11799
|
+
}, [b, i]), /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
11800
|
+
P,
|
|
11801
|
+
b && p && /* @__PURE__ */ m.jsx(
|
|
11795
11802
|
xc,
|
|
11796
11803
|
{
|
|
11797
|
-
actions:
|
|
11804
|
+
actions: f,
|
|
11798
11805
|
title: n,
|
|
11799
|
-
isOpen:
|
|
11800
|
-
onClose: () =>
|
|
11806
|
+
isOpen: b,
|
|
11807
|
+
onClose: () => $(!1),
|
|
11801
11808
|
showCancel: !0,
|
|
11802
11809
|
"data-testid": u,
|
|
11810
|
+
menuId: c,
|
|
11803
11811
|
selectionMode: "single",
|
|
11804
|
-
onSelectionChange:
|
|
11812
|
+
onSelectionChange: T,
|
|
11805
11813
|
selectedKeys: s ? [s] : void 0,
|
|
11806
11814
|
disabledKeys: d
|
|
11807
11815
|
}
|
|
11808
11816
|
),
|
|
11809
|
-
|
|
11817
|
+
b && !p && /* @__PURE__ */ m.jsx(
|
|
11810
11818
|
eh,
|
|
11811
11819
|
{
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11820
|
+
"data-testid": u,
|
|
11821
|
+
menuId: c,
|
|
11822
|
+
isOpen: b,
|
|
11823
|
+
setIsOpen: $,
|
|
11824
|
+
items: f,
|
|
11815
11825
|
selectedKey: s,
|
|
11816
11826
|
disabledKeys: d,
|
|
11817
11827
|
title: n,
|
|
11818
|
-
onSelectionChange:
|
|
11819
|
-
triggerRef:
|
|
11828
|
+
onSelectionChange: T,
|
|
11829
|
+
triggerRef: x
|
|
11820
11830
|
}
|
|
11821
11831
|
)
|
|
11822
11832
|
] });
|
|
@@ -11897,7 +11907,7 @@ const rh = D.forwardRef((t, e) => /* @__PURE__ */ m.jsx(
|
|
|
11897
11907
|
}
|
|
11898
11908
|
));
|
|
11899
11909
|
function Lh({ title: t, children: e, ...n }) {
|
|
11900
|
-
let r =
|
|
11910
|
+
let r = K(null), { dialogProps: l, titleProps: i } = da(n, r);
|
|
11901
11911
|
return /* @__PURE__ */ m.jsxs("div", { ...l, ref: r, className: "proton-Dialog", children: [
|
|
11902
11912
|
t && /* @__PURE__ */ m.jsx("h3", { ...i, className: "proton-Dialog__header", children: t }),
|
|
11903
11913
|
e
|
|
@@ -11933,7 +11943,7 @@ const Oh = ({
|
|
|
11933
11943
|
};
|
|
11934
11944
|
function jh(t) {
|
|
11935
11945
|
const [e, n] = W("");
|
|
11936
|
-
return
|
|
11946
|
+
return j(() => {
|
|
11937
11947
|
}, []), e ? /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
11938
11948
|
/* @__PURE__ */ m.jsx(
|
|
11939
11949
|
"div",
|
|
@@ -12036,7 +12046,7 @@ const Wc = async (t, e) => {
|
|
|
12036
12046
|
autoComplete: p,
|
|
12037
12047
|
"data-testid": v
|
|
12038
12048
|
}, b) => {
|
|
12039
|
-
const $ =
|
|
12049
|
+
const $ = K(null), x = K(null), E = K(null), C = K(null), { className: T } = Me(), S = b || $, { labelProps: P, inputProps: N, descriptionProps: R, errorMessageProps: I } = wo(
|
|
12040
12050
|
{
|
|
12041
12051
|
label: u,
|
|
12042
12052
|
name: a,
|
|
@@ -12052,15 +12062,15 @@ const Wc = async (t, e) => {
|
|
|
12052
12062
|
value: c,
|
|
12053
12063
|
onChange: o,
|
|
12054
12064
|
onCopy: async () => {
|
|
12055
|
-
var
|
|
12056
|
-
await Wc((
|
|
12065
|
+
var B;
|
|
12066
|
+
await Wc((B = $.current) == null ? void 0 : B.value);
|
|
12057
12067
|
}
|
|
12058
12068
|
},
|
|
12059
12069
|
S
|
|
12060
12070
|
);
|
|
12061
|
-
return
|
|
12071
|
+
return j(() => {
|
|
12062
12072
|
if (!C.current) return;
|
|
12063
|
-
const
|
|
12073
|
+
const B = () => {
|
|
12064
12074
|
var F, _;
|
|
12065
12075
|
if (C.current) {
|
|
12066
12076
|
const k = C.current.offsetWidth || 200;
|
|
@@ -12084,8 +12094,8 @@ const Wc = async (t, e) => {
|
|
|
12084
12094
|
);
|
|
12085
12095
|
}
|
|
12086
12096
|
};
|
|
12087
|
-
|
|
12088
|
-
const g = new ResizeObserver(
|
|
12097
|
+
B();
|
|
12098
|
+
const g = new ResizeObserver(B);
|
|
12089
12099
|
return C.current && g.observe(C.current), x.current && g.observe(x.current), E.current && g.observe(E.current), () => {
|
|
12090
12100
|
g.disconnect();
|
|
12091
12101
|
};
|
|
@@ -12106,7 +12116,7 @@ const Wc = async (t, e) => {
|
|
|
12106
12116
|
/* @__PURE__ */ m.jsx(
|
|
12107
12117
|
"input",
|
|
12108
12118
|
{
|
|
12109
|
-
...
|
|
12119
|
+
...N,
|
|
12110
12120
|
"data-testid": v,
|
|
12111
12121
|
id: `${a}-input`,
|
|
12112
12122
|
"aria-invalid": !!i,
|
|
@@ -12145,7 +12155,7 @@ const Wc = async (t, e) => {
|
|
|
12145
12155
|
i ? /* @__PURE__ */ m.jsx(
|
|
12146
12156
|
"div",
|
|
12147
12157
|
{
|
|
12148
|
-
...
|
|
12158
|
+
...I,
|
|
12149
12159
|
role: "alert",
|
|
12150
12160
|
className: G("proton-Input__error", "proton-Input__text"),
|
|
12151
12161
|
id: `${a}-error`,
|
|
@@ -12247,7 +12257,7 @@ const oh = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ m.jsx("div", { class
|
|
|
12247
12257
|
onChange: (E) => s == null ? void 0 : s(E),
|
|
12248
12258
|
onClear: () => d == null ? void 0 : d(),
|
|
12249
12259
|
label: e
|
|
12250
|
-
}), f =
|
|
12260
|
+
}), f = K(null), { inputProps: p, clearButtonProps: v } = yv(
|
|
12251
12261
|
{ ...c, placeholder: e, "aria-label": e },
|
|
12252
12262
|
c,
|
|
12253
12263
|
f
|
|
@@ -12353,7 +12363,7 @@ const oh = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ m.jsx("div", { class
|
|
|
12353
12363
|
isClosing: i,
|
|
12354
12364
|
"data-testid": o
|
|
12355
12365
|
}) => {
|
|
12356
|
-
const u =
|
|
12366
|
+
const u = K(null), a = zt({ isOpen: !0, onOpenChange: r }), { modalProps: s } = jp(
|
|
12357
12367
|
{
|
|
12358
12368
|
isDismissable: !1
|
|
12359
12369
|
//handle dismiss behavior in useIsClosing
|
|
@@ -12362,7 +12372,7 @@ const oh = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ m.jsx("div", { class
|
|
|
12362
12372
|
u
|
|
12363
12373
|
), { dialogProps: d } = da({ role: "dialog" }, u);
|
|
12364
12374
|
cl();
|
|
12365
|
-
const c =
|
|
12375
|
+
const c = K(null), { buttonProps: f } = sn(
|
|
12366
12376
|
{
|
|
12367
12377
|
onPress: r,
|
|
12368
12378
|
"aria-label": "Close"
|
|
@@ -12404,7 +12414,7 @@ const oh = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ m.jsx("div", { class
|
|
|
12404
12414
|
isOverlay: o = !0,
|
|
12405
12415
|
"data-testid": u
|
|
12406
12416
|
}) => {
|
|
12407
|
-
const a =
|
|
12417
|
+
const a = K(null), { isClosing: s, handleClose: d } = Oi({
|
|
12408
12418
|
onClose: e,
|
|
12409
12419
|
overlayRef: a
|
|
12410
12420
|
}), c = Ur(Yr.MEDIUM);
|
|
@@ -12431,7 +12441,7 @@ const oh = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ m.jsx("div", { class
|
|
|
12431
12441
|
Actions: ah
|
|
12432
12442
|
});
|
|
12433
12443
|
function Uh(t) {
|
|
12434
|
-
const e =
|
|
12444
|
+
const e = K(null), n = zt(t || {}), { triggerProps: r, overlayProps: l } = Ao(
|
|
12435
12445
|
{ type: "dialog" },
|
|
12436
12446
|
n,
|
|
12437
12447
|
e
|
|
@@ -12445,7 +12455,7 @@ function dh({
|
|
|
12445
12455
|
offset: r,
|
|
12446
12456
|
...l
|
|
12447
12457
|
}) {
|
|
12448
|
-
const i =
|
|
12458
|
+
const i = K(null), { popoverRef: o = i } = l, { className: u, style: a } = Me();
|
|
12449
12459
|
let { popoverProps: s, underlayProps: d, arrowProps: c, placement: f } = vu(
|
|
12450
12460
|
{
|
|
12451
12461
|
...l,
|
|
@@ -12488,7 +12498,7 @@ function dh({
|
|
|
12488
12498
|
] });
|
|
12489
12499
|
}
|
|
12490
12500
|
const fh = (t) => {
|
|
12491
|
-
let e =
|
|
12501
|
+
let e = K(null), { state: n } = t, { listBoxProps: r } = Yp(t, n, e);
|
|
12492
12502
|
return /* @__PURE__ */ m.jsx(
|
|
12493
12503
|
"ul",
|
|
12494
12504
|
{
|
|
@@ -12501,7 +12511,7 @@ const fh = (t) => {
|
|
|
12501
12511
|
);
|
|
12502
12512
|
};
|
|
12503
12513
|
function ph({ item: t, state: e }) {
|
|
12504
|
-
let n =
|
|
12514
|
+
let n = K(null), { optionProps: r, isSelected: l, isFocused: i, isDisabled: o } = Jp(
|
|
12505
12515
|
{ key: t.key },
|
|
12506
12516
|
e,
|
|
12507
12517
|
n
|
|
@@ -12558,12 +12568,12 @@ function Gh({
|
|
|
12558
12568
|
},
|
|
12559
12569
|
"data-testid": d,
|
|
12560
12570
|
children: s.map((S) => /* @__PURE__ */ m.jsx(Su, { textValue: S.label, children: S.label }, S.key))
|
|
12561
|
-
}, f = Uv(c), p = Ur(Yr.MEDIUM), v =
|
|
12571
|
+
}, f = Uv(c), p = Ur(Yr.MEDIUM), v = K(null), b = K(null), { labelProps: $, triggerProps: x, valueProps: E, menuProps: C } = $v(
|
|
12562
12572
|
{ ...c, label: t || e },
|
|
12563
12573
|
f,
|
|
12564
12574
|
v
|
|
12565
12575
|
);
|
|
12566
|
-
|
|
12576
|
+
j(() => {
|
|
12567
12577
|
f.isOpen && b.current && v.current && !b.current.style.minWidth && (b.current.style.minWidth = `${v.current.offsetWidth}px`);
|
|
12568
12578
|
}, [f.isOpen]);
|
|
12569
12579
|
const T = s.map((S) => ({
|
|
@@ -12666,7 +12676,7 @@ function Yh(t) {
|
|
|
12666
12676
|
...t,
|
|
12667
12677
|
isSelected: t.isOn,
|
|
12668
12678
|
"data-testid": void 0
|
|
12669
|
-
}, n =
|
|
12679
|
+
}, n = K(null), r = gp(e), { inputProps: l } = Sv(e, r, n);
|
|
12670
12680
|
return /* @__PURE__ */ m.jsxs(
|
|
12671
12681
|
"label",
|
|
12672
12682
|
{
|
|
@@ -12691,12 +12701,12 @@ function Yh(t) {
|
|
|
12691
12701
|
);
|
|
12692
12702
|
}
|
|
12693
12703
|
function hh({ item: t, state: e, children: n }) {
|
|
12694
|
-
let r =
|
|
12704
|
+
let r = K(), { rowProps: l } = Kv({ node: t }, e);
|
|
12695
12705
|
return /* @__PURE__ */ m.jsx("tr", { className: G("proton-Table__headerRow"), ...l, ref: r, children: n });
|
|
12696
12706
|
}
|
|
12697
12707
|
function bh({ column: t, state: e }) {
|
|
12698
12708
|
var a, s;
|
|
12699
|
-
let n =
|
|
12709
|
+
let n = K(), { columnHeaderProps: r } = Av(
|
|
12700
12710
|
{ node: t },
|
|
12701
12711
|
e,
|
|
12702
12712
|
n
|
|
@@ -12758,7 +12768,7 @@ function mh({
|
|
|
12758
12768
|
onClick: l,
|
|
12759
12769
|
showLines: i = !0
|
|
12760
12770
|
}) {
|
|
12761
|
-
let o =
|
|
12771
|
+
let o = K(), u = n.selectionManager.isSelected(t.key), { rowProps: a, isPressed: s } = Bv(
|
|
12762
12772
|
{
|
|
12763
12773
|
node: t
|
|
12764
12774
|
},
|
|
@@ -12785,7 +12795,7 @@ function mh({
|
|
|
12785
12795
|
);
|
|
12786
12796
|
}
|
|
12787
12797
|
function gh({ cell: t, state: e, width: n, onClick: r }) {
|
|
12788
|
-
let l =
|
|
12798
|
+
let l = K(), { gridCellProps: i } = Mv({ node: t }, e, l), { isFocusVisible: o, focusProps: u } = qn();
|
|
12789
12799
|
const { align: a = "left" } = t.props;
|
|
12790
12800
|
return /* @__PURE__ */ m.jsx(
|
|
12791
12801
|
"td",
|
|
@@ -12809,7 +12819,7 @@ function Qh(t) {
|
|
|
12809
12819
|
var i;
|
|
12810
12820
|
let e = Jv({
|
|
12811
12821
|
...t
|
|
12812
|
-
}), n =
|
|
12822
|
+
}), n = K(), { collection: r } = e, { gridProps: l } = kv(
|
|
12813
12823
|
{ ...t, "aria-label": t["aria-label"] || "Table" },
|
|
12814
12824
|
e,
|
|
12815
12825
|
n
|
|
@@ -12897,7 +12907,7 @@ function $h({
|
|
|
12897
12907
|
content: u,
|
|
12898
12908
|
...a
|
|
12899
12909
|
}) {
|
|
12900
|
-
const [s, d] = W(!1), c =
|
|
12910
|
+
const [s, d] = W(!1), c = K(!1), f = K(!1);
|
|
12901
12911
|
return u === "" ? null : /* @__PURE__ */ m.jsxs(
|
|
12902
12912
|
Z0,
|
|
12903
12913
|
{
|
|
@@ -13089,34 +13099,34 @@ function r4({
|
|
|
13089
13099
|
"data-testid": d
|
|
13090
13100
|
}) {
|
|
13091
13101
|
var _;
|
|
13092
|
-
const { className: c } = Me(), f =
|
|
13093
|
-
|
|
13102
|
+
const { className: c } = Me(), f = K(null), [p, v] = W([]), [b, $] = W(null), [x, E] = W(!1), [C, T] = W(!1), S = t || Eh, P = e;
|
|
13103
|
+
j(() => {
|
|
13094
13104
|
if (!f.current) return;
|
|
13095
13105
|
const k = (A) => {
|
|
13096
|
-
const w = Math.floor(A / (e + P)),
|
|
13097
|
-
v(
|
|
13106
|
+
const w = Math.floor(A / (e + P)), z = Ch(S, w);
|
|
13107
|
+
v(z);
|
|
13098
13108
|
}, O = f.current.clientWidth;
|
|
13099
13109
|
k(O);
|
|
13100
13110
|
const h = new ResizeObserver((A) => {
|
|
13101
13111
|
A && A[0] && k(A[0].contentRect.width);
|
|
13102
13112
|
});
|
|
13103
13113
|
return h.observe(f.current), () => h.disconnect();
|
|
13104
|
-
}, [S, e, P]),
|
|
13114
|
+
}, [S, e, P]), j(() => {
|
|
13105
13115
|
const k = setTimeout(() => E(!0), 50), O = setTimeout(() => T(!0), 500);
|
|
13106
13116
|
return () => {
|
|
13107
13117
|
clearTimeout(k), clearTimeout(O);
|
|
13108
13118
|
};
|
|
13109
13119
|
}, []);
|
|
13110
|
-
const
|
|
13120
|
+
const N = (k) => {
|
|
13111
13121
|
if (!f.current) return;
|
|
13112
13122
|
const O = f.current.getBoundingClientRect(), A = (k.clientX - O.left) / O.width * o;
|
|
13113
13123
|
$(A);
|
|
13114
13124
|
}, R = () => {
|
|
13115
13125
|
$(null);
|
|
13116
|
-
},
|
|
13126
|
+
}, I = e + P, B = (k, O) => {
|
|
13117
13127
|
var w;
|
|
13118
13128
|
const h = k / o * 100;
|
|
13119
|
-
return (O === "start" ? Math.floor(h / 100 * p.length) : Math.ceil(h / 100 * p.length)) *
|
|
13129
|
+
return (O === "start" ? Math.floor(h / 100 * p.length) : Math.ceil(h / 100 * p.length)) * I / ((w = f.current) == null ? void 0 : w.clientWidth) * 100;
|
|
13120
13130
|
}, g = (_ = f.current) == null ? void 0 : _.clientWidth, F = H(() => u && a ? a : t ? null : "Waveform Unavailable", [u, a, t]);
|
|
13121
13131
|
return /* @__PURE__ */ m.jsxs("div", { className: G("proton-Waveform", c), "data-testid": d, children: [
|
|
13122
13132
|
i && /* @__PURE__ */ m.jsx(_i, { direction: "left", seconds: l }),
|
|
@@ -13125,7 +13135,7 @@ function r4({
|
|
|
13125
13135
|
{
|
|
13126
13136
|
ref: f,
|
|
13127
13137
|
className: "proton-Waveform__container",
|
|
13128
|
-
onMouseMove:
|
|
13138
|
+
onMouseMove: N,
|
|
13129
13139
|
onMouseLeave: R,
|
|
13130
13140
|
onClick: (k) => {
|
|
13131
13141
|
if (!f.current || u) return;
|
|
@@ -13140,8 +13150,8 @@ function r4({
|
|
|
13140
13150
|
{
|
|
13141
13151
|
className: "proton-Waveform__active-region",
|
|
13142
13152
|
style: {
|
|
13143
|
-
left: f.current ? `calc(${
|
|
13144
|
-
right: f.current ? `calc(${100 -
|
|
13153
|
+
left: f.current ? `calc(${B(n, "start")}%` : "0%",
|
|
13154
|
+
right: f.current ? `calc(${100 - B(r, "end")}% - 2px)` : "0%"
|
|
13145
13155
|
}
|
|
13146
13156
|
}
|
|
13147
13157
|
),
|
|
@@ -13155,14 +13165,14 @@ function r4({
|
|
|
13155
13165
|
}
|
|
13156
13166
|
),
|
|
13157
13167
|
p.map((k, O) => {
|
|
13158
|
-
const h = O / p.length * o, A = n !== void 0 && r !== void 0 && (h < n || h > r), w = l === 0 ? !1 : h <= l,
|
|
13168
|
+
const h = O / p.length * o, A = n !== void 0 && r !== void 0 && (h < n || h > r), w = l === 0 ? !1 : h <= l, z = b !== null && h <= b;
|
|
13159
13169
|
return /* @__PURE__ */ m.jsx(
|
|
13160
13170
|
xh,
|
|
13161
13171
|
{
|
|
13162
13172
|
amplitude: k,
|
|
13163
13173
|
isDisabled: u || A,
|
|
13164
13174
|
isPlayed: w,
|
|
13165
|
-
isHovered:
|
|
13175
|
+
isHovered: z,
|
|
13166
13176
|
isVisible: x,
|
|
13167
13177
|
hasAnimated: C,
|
|
13168
13178
|
resolution: e,
|