@sps-woodland/tabs 8.17.0 → 8.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +540 -540
- package/lib/style.css +1 -1
- package/package.json +5 -5
- package/vite.config.mjs +11 -2
package/lib/index.es.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import * as
|
2
|
-
import
|
3
|
-
import { compareNodeOrder as
|
4
|
-
import { flushSync as
|
5
|
-
import { Metadata as ce, modChildren as
|
6
|
-
import { code as
|
7
|
-
class
|
1
|
+
import * as N from "react";
|
2
|
+
import R, { useState as B, useRef as x, useEffect as O, useCallback as q, useMemo as V, useContext as oe, createContext as Bt } from "react";
|
3
|
+
import { compareNodeOrder as we, getFirstItem as Rt, getChildNodes as Ut, useCollection as Ht } from "@react-stately/collections";
|
4
|
+
import { flushSync as Wt } from "react-dom";
|
5
|
+
import { Metadata as ce, modChildren as jt, cl as dt, Content as Vt, useChildTestIdAttrBuilder as Gt } from "@sps-woodland/core";
|
6
|
+
import { code as je } from "@spscommerce/utils";
|
7
|
+
class Ve {
|
8
8
|
*[Symbol.iterator]() {
|
9
9
|
yield* this.iterable;
|
10
10
|
}
|
@@ -53,89 +53,89 @@ class Ge {
|
|
53
53
|
this.lastKey = n == null ? void 0 : n.key;
|
54
54
|
}
|
55
55
|
}
|
56
|
-
class
|
56
|
+
class z extends Set {
|
57
57
|
constructor(e, r, n) {
|
58
|
-
super(e), e instanceof
|
58
|
+
super(e), e instanceof z ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
|
59
59
|
}
|
60
60
|
}
|
61
|
-
function
|
62
|
-
let [n, i] =
|
63
|
-
|
64
|
-
let
|
65
|
-
|
61
|
+
function ut(t, e, r) {
|
62
|
+
let [n, i] = B(t || e), o = x(t !== void 0), s = t !== void 0;
|
63
|
+
O(() => {
|
64
|
+
let v = o.current;
|
65
|
+
v !== s && console.warn(`WARN: A component changed from ${v ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}.`), o.current = s;
|
66
66
|
}, [
|
67
67
|
s
|
68
68
|
]);
|
69
|
-
let
|
70
|
-
let
|
71
|
-
r && (Object.is(
|
69
|
+
let d = s ? t : n, p = q((v, ...g) => {
|
70
|
+
let w = (h, ...y) => {
|
71
|
+
r && (Object.is(d, h) || r(h, ...y)), s || (d = h);
|
72
72
|
};
|
73
|
-
typeof
|
74
|
-
let S =
|
75
|
-
return
|
76
|
-
})) : (s || i(
|
73
|
+
typeof v == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((y, ...k) => {
|
74
|
+
let S = v(s ? d : y, ...k);
|
75
|
+
return w(S, ...g), s ? y : S;
|
76
|
+
})) : (s || i(v), w(v, ...g));
|
77
77
|
}, [
|
78
78
|
s,
|
79
|
-
|
79
|
+
d,
|
80
80
|
r
|
81
81
|
]);
|
82
82
|
return [
|
83
|
-
|
83
|
+
d,
|
84
84
|
p
|
85
85
|
];
|
86
86
|
}
|
87
|
-
function
|
87
|
+
function Xt(t, e) {
|
88
88
|
if (t.size !== e.size) return !1;
|
89
89
|
for (let r of t)
|
90
90
|
if (!e.has(r)) return !1;
|
91
91
|
return !0;
|
92
92
|
}
|
93
|
-
function
|
94
|
-
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = t, s =
|
93
|
+
function qt(t) {
|
94
|
+
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = t, s = x(!1), [, d] = B(!1), p = x(null), v = x(null), [, g] = B(null), w = V(() => Ge(t.selectedKeys), [
|
95
95
|
t.selectedKeys
|
96
|
-
]), h =
|
96
|
+
]), h = V(() => Ge(t.defaultSelectedKeys, new z()), [
|
97
97
|
t.defaultSelectedKeys
|
98
|
-
]), [
|
98
|
+
]), [y, k] = ut(w, h, t.onSelectionChange), S = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
99
99
|
t.disabledKeys
|
100
|
-
]), [
|
101
|
-
i === "replace" &&
|
102
|
-
let
|
103
|
-
return
|
104
|
-
i !==
|
100
|
+
]), [T, L] = B(i);
|
101
|
+
i === "replace" && T === "toggle" && typeof y == "object" && y.size === 0 && L("replace");
|
102
|
+
let E = x(i);
|
103
|
+
return O(() => {
|
104
|
+
i !== E.current && (L(i), E.current = i);
|
105
105
|
}, [
|
106
106
|
i
|
107
107
|
]), {
|
108
108
|
selectionMode: e,
|
109
109
|
disallowEmptySelection: r,
|
110
|
-
selectionBehavior:
|
111
|
-
setSelectionBehavior:
|
110
|
+
selectionBehavior: T,
|
111
|
+
setSelectionBehavior: L,
|
112
112
|
get isFocused() {
|
113
113
|
return s.current;
|
114
114
|
},
|
115
|
-
setFocused(
|
116
|
-
s.current =
|
115
|
+
setFocused(_) {
|
116
|
+
s.current = _, d(_);
|
117
117
|
},
|
118
118
|
get focusedKey() {
|
119
119
|
return p.current;
|
120
120
|
},
|
121
121
|
get childFocusStrategy() {
|
122
|
-
return
|
122
|
+
return v.current;
|
123
123
|
},
|
124
|
-
setFocusedKey(
|
125
|
-
p.current =
|
124
|
+
setFocusedKey(_, M = "first") {
|
125
|
+
p.current = _, v.current = M, g(_);
|
126
126
|
},
|
127
|
-
selectedKeys:
|
128
|
-
setSelectedKeys(
|
129
|
-
(n || !
|
127
|
+
selectedKeys: y,
|
128
|
+
setSelectedKeys(_) {
|
129
|
+
(n || !Xt(_, y)) && k(_);
|
130
130
|
},
|
131
131
|
disabledKeys: S,
|
132
132
|
disabledBehavior: o
|
133
133
|
};
|
134
134
|
}
|
135
|
-
function
|
136
|
-
return t ? t === "all" ? "all" : new
|
135
|
+
function Ge(t, e) {
|
136
|
+
return t ? t === "all" ? "all" : new z(t) : e;
|
137
137
|
}
|
138
|
-
class
|
138
|
+
class Yt {
|
139
139
|
/**
|
140
140
|
* The type of selection that is allowed in the collection.
|
141
141
|
*/
|
@@ -227,7 +227,7 @@ class _t {
|
|
227
227
|
let e = null;
|
228
228
|
for (let r of this.state.selectedKeys) {
|
229
229
|
let n = this.collection.getItem(r);
|
230
|
-
(!e || n &&
|
230
|
+
(!e || n && we(this.collection, n, e) < 0) && (e = n);
|
231
231
|
}
|
232
232
|
return e == null ? void 0 : e.key;
|
233
233
|
}
|
@@ -235,7 +235,7 @@ class _t {
|
|
235
235
|
let e = null;
|
236
236
|
for (let r of this.state.selectedKeys) {
|
237
237
|
let n = this.collection.getItem(r);
|
238
|
-
(!e || n &&
|
238
|
+
(!e || n && we(this.collection, n, e) > 0) && (e = n);
|
239
239
|
}
|
240
240
|
return e == null ? void 0 : e.key;
|
241
241
|
}
|
@@ -256,12 +256,12 @@ class _t {
|
|
256
256
|
}
|
257
257
|
e = this.getKey(e);
|
258
258
|
let r;
|
259
|
-
if (this.state.selectedKeys === "all") r = new
|
259
|
+
if (this.state.selectedKeys === "all") r = new z([
|
260
260
|
e
|
261
261
|
], e, e);
|
262
262
|
else {
|
263
263
|
let n = this.state.selectedKeys, i = n.anchorKey || e;
|
264
|
-
r = new
|
264
|
+
r = new z(n, i, e);
|
265
265
|
for (let o of this.getKeyRange(i, n.currentKey || e)) r.delete(o);
|
266
266
|
for (let o of this.getKeyRange(e, i)) this.canSelectItem(o) && r.add(o);
|
267
267
|
}
|
@@ -269,7 +269,7 @@ class _t {
|
|
269
269
|
}
|
270
270
|
getKeyRange(e, r) {
|
271
271
|
let n = this.collection.getItem(e), i = this.collection.getItem(r);
|
272
|
-
return n && i ?
|
272
|
+
return n && i ? we(this.collection, n, i) <= 0 ? this.getKeyRangeInternal(e, r) : this.getKeyRangeInternal(r, e) : [];
|
273
273
|
}
|
274
274
|
getKeyRangeInternal(e, r) {
|
275
275
|
let n = [], i = e;
|
@@ -296,7 +296,7 @@ class _t {
|
|
296
296
|
return;
|
297
297
|
}
|
298
298
|
if (e = this.getKey(e), e == null) return;
|
299
|
-
let r = new
|
299
|
+
let r = new z(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
300
300
|
r.has(e) ? r.delete(e) : this.canSelectItem(e) && (r.add(e), r.anchorKey = e, r.currentKey = e), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
|
301
301
|
}
|
302
302
|
/**
|
@@ -304,9 +304,9 @@ class _t {
|
|
304
304
|
*/
|
305
305
|
replaceSelection(e) {
|
306
306
|
if (this.selectionMode === "none" || (e = this.getKey(e), e == null)) return;
|
307
|
-
let r = this.canSelectItem(e) ? new
|
307
|
+
let r = this.canSelectItem(e) ? new z([
|
308
308
|
e
|
309
|
-
], e, e) : new
|
309
|
+
], e, e) : new z();
|
310
310
|
this.state.setSelectedKeys(r);
|
311
311
|
}
|
312
312
|
/**
|
@@ -314,7 +314,7 @@ class _t {
|
|
314
314
|
*/
|
315
315
|
setSelectedKeys(e) {
|
316
316
|
if (this.selectionMode === "none") return;
|
317
|
-
let r = new
|
317
|
+
let r = new z();
|
318
318
|
for (let n of e)
|
319
319
|
if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
|
320
320
|
break;
|
@@ -325,7 +325,7 @@ class _t {
|
|
325
325
|
for (; n; ) {
|
326
326
|
if (this.canSelectItem(n)) {
|
327
327
|
let i = this.collection.getItem(n);
|
328
|
-
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Ut(
|
328
|
+
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Rt(Ut(i, this.collection)).key);
|
329
329
|
}
|
330
330
|
n = this.collection.getKeyAfter(n);
|
331
331
|
}
|
@@ -342,7 +342,7 @@ class _t {
|
|
342
342
|
* Removes all keys from the selection.
|
343
343
|
*/
|
344
344
|
clearSelection() {
|
345
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
345
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new z());
|
346
346
|
}
|
347
347
|
/**
|
348
348
|
* Toggles between select all and an empty selection.
|
@@ -391,76 +391,76 @@ class _t {
|
|
391
391
|
}
|
392
392
|
}
|
393
393
|
function Jt(t) {
|
394
|
-
let { filter: e } = t, r =
|
394
|
+
let { filter: e } = t, r = qt(t), n = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
395
395
|
t.disabledKeys
|
396
|
-
]), i =
|
396
|
+
]), i = q((v) => e ? new Ve(e(v)) : new Ve(v), [
|
397
397
|
e
|
398
|
-
]), o =
|
398
|
+
]), o = V(() => ({
|
399
399
|
suppressTextValueWarning: t.suppressTextValueWarning
|
400
400
|
}), [
|
401
401
|
t.suppressTextValueWarning
|
402
|
-
]), s =
|
402
|
+
]), s = Ht(t, i, o), d = V(() => new Yt(s, r), [
|
403
403
|
s,
|
404
404
|
r
|
405
405
|
]);
|
406
|
-
const p =
|
407
|
-
return
|
406
|
+
const p = x(null);
|
407
|
+
return O(() => {
|
408
408
|
if (r.focusedKey != null && !s.getItem(r.focusedKey)) {
|
409
|
-
const
|
409
|
+
const v = p.current.getItem(r.focusedKey), g = [
|
410
410
|
...p.current.getKeys()
|
411
411
|
].map((S) => {
|
412
|
-
const
|
413
|
-
return
|
414
|
-
}).filter((S) => S !== null),
|
412
|
+
const T = p.current.getItem(S);
|
413
|
+
return T.type === "item" ? T : null;
|
414
|
+
}).filter((S) => S !== null), w = [
|
415
415
|
...s.getKeys()
|
416
416
|
].map((S) => {
|
417
|
-
const
|
418
|
-
return
|
419
|
-
}).filter((S) => S !== null), h = g.length -
|
420
|
-
let
|
421
|
-
for (;
|
422
|
-
if (!
|
423
|
-
|
417
|
+
const T = s.getItem(S);
|
418
|
+
return T.type === "item" ? T : null;
|
419
|
+
}).filter((S) => S !== null), h = g.length - w.length;
|
420
|
+
let y = Math.min(h > 1 ? Math.max(v.index - h + 1, 0) : v.index, w.length - 1), k;
|
421
|
+
for (; y >= 0; ) {
|
422
|
+
if (!d.isDisabled(w[y].key)) {
|
423
|
+
k = w[y];
|
424
424
|
break;
|
425
425
|
}
|
426
|
-
|
426
|
+
y < w.length - 1 ? y++ : (y > v.index && (y = v.index), y--);
|
427
427
|
}
|
428
|
-
r.setFocusedKey(
|
428
|
+
r.setFocusedKey(k ? k.key : null);
|
429
429
|
}
|
430
430
|
p.current = s;
|
431
431
|
}, [
|
432
432
|
s,
|
433
|
-
|
433
|
+
d,
|
434
434
|
r,
|
435
435
|
r.focusedKey
|
436
436
|
]), {
|
437
437
|
collection: s,
|
438
438
|
disabledKeys: n,
|
439
|
-
selectionManager:
|
439
|
+
selectionManager: d
|
440
440
|
};
|
441
441
|
}
|
442
442
|
function Zt(t) {
|
443
443
|
var e;
|
444
|
-
let [r, n] =
|
444
|
+
let [r, n] = ut(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = V(() => r != null ? [
|
445
445
|
r
|
446
446
|
] : [], [
|
447
447
|
r
|
448
|
-
]), { collection: o, disabledKeys: s, selectionManager:
|
448
|
+
]), { collection: o, disabledKeys: s, selectionManager: d } = Jt({
|
449
449
|
...t,
|
450
450
|
selectionMode: "single",
|
451
451
|
disallowEmptySelection: !0,
|
452
452
|
allowDuplicateSelectionEvents: !0,
|
453
453
|
selectedKeys: i,
|
454
|
-
onSelectionChange: (
|
454
|
+
onSelectionChange: (v) => {
|
455
455
|
var g;
|
456
|
-
let
|
457
|
-
|
456
|
+
let w = (g = v.values().next().value) !== null && g !== void 0 ? g : null;
|
457
|
+
w === r && t.onSelectionChange && t.onSelectionChange(w), n(w);
|
458
458
|
}
|
459
459
|
}), p = r != null ? o.getItem(r) : null;
|
460
460
|
return {
|
461
461
|
collection: o,
|
462
462
|
disabledKeys: s,
|
463
|
-
selectionManager:
|
463
|
+
selectionManager: d,
|
464
464
|
selectedKey: r,
|
465
465
|
setSelectedKey: n,
|
466
466
|
selectedItem: p
|
@@ -471,19 +471,19 @@ function Qt(t) {
|
|
471
471
|
let r = Zt({
|
472
472
|
...t,
|
473
473
|
suppressTextValueWarning: !0,
|
474
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
475
|
-
}), { selectionManager: n, collection: i, selectedKey: o } = r, s =
|
476
|
-
return
|
477
|
-
let
|
478
|
-
(n.isEmpty || !i.getItem(
|
479
|
-
|
480
|
-
])), (
|
474
|
+
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : Xe(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())
|
475
|
+
}), { selectionManager: n, collection: i, selectedKey: o } = r, s = x(o);
|
476
|
+
return O(() => {
|
477
|
+
let d = o;
|
478
|
+
(n.isEmpty || !i.getItem(d)) && (d = Xe(i, r.disabledKeys), d != null && n.setSelectedKeys([
|
479
|
+
d
|
480
|
+
])), (d != null && n.focusedKey == null || !n.isFocused && d !== s.current) && n.setFocusedKey(d), s.current = d;
|
481
481
|
}), {
|
482
482
|
...r,
|
483
483
|
isDisabled: t.isDisabled || !1
|
484
484
|
};
|
485
485
|
}
|
486
|
-
function
|
486
|
+
function Xe(t, e) {
|
487
487
|
let r = null;
|
488
488
|
if (t) {
|
489
489
|
for (r = t.getFirstKey(); e.has(r) && r !== t.getLastKey(); ) r = t.getKeyAfter(r);
|
@@ -495,15 +495,15 @@ const ft = /* @__PURE__ */ new WeakMap();
|
|
495
495
|
function ge(t, e, r) {
|
496
496
|
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${ft.get(t)}-${r}-${e}`;
|
497
497
|
}
|
498
|
-
const
|
498
|
+
const de = typeof document < "u" ? R.useLayoutEffect : () => {
|
499
499
|
};
|
500
500
|
function re(t) {
|
501
|
-
const e =
|
502
|
-
return
|
501
|
+
const e = x(null);
|
502
|
+
return de(() => {
|
503
503
|
e.current = t;
|
504
504
|
}, [
|
505
505
|
t
|
506
|
-
]),
|
506
|
+
]), q((...r) => {
|
507
507
|
const n = e.current;
|
508
508
|
return n == null ? void 0 : n(...r);
|
509
509
|
}, []);
|
@@ -511,19 +511,19 @@ function re(t) {
|
|
511
511
|
const he = {
|
512
512
|
prefix: String(Math.round(Math.random() * 1e10)),
|
513
513
|
current: 0
|
514
|
-
}, pt = /* @__PURE__ */
|
515
|
-
let tr = !!(typeof window < "u" && window.document && window.document.createElement),
|
514
|
+
}, pt = /* @__PURE__ */ R.createContext(he), er = /* @__PURE__ */ R.createContext(!1);
|
515
|
+
let tr = !!(typeof window < "u" && window.document && window.document.createElement), Te = /* @__PURE__ */ new WeakMap();
|
516
516
|
function rr(t = !1) {
|
517
|
-
let e = oe(pt), r =
|
517
|
+
let e = oe(pt), r = x(null);
|
518
518
|
if (r.current === null && !t) {
|
519
519
|
var n, i;
|
520
|
-
let o = (i =
|
520
|
+
let o = (i = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || i === void 0 || (n = i.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
521
521
|
if (o) {
|
522
|
-
let s =
|
523
|
-
s == null ?
|
522
|
+
let s = Te.get(o);
|
523
|
+
s == null ? Te.set(o, {
|
524
524
|
id: e.current,
|
525
525
|
state: o.memoizedState
|
526
|
-
}) : o.memoizedState !== s.state && (e.current = s.id,
|
526
|
+
}) : o.memoizedState !== s.state && (e.current = s.id, Te.delete(o));
|
527
527
|
}
|
528
528
|
r.current = ++e.current;
|
529
529
|
}
|
@@ -536,10 +536,10 @@ function nr(t) {
|
|
536
536
|
return t || `${n}-${r}`;
|
537
537
|
}
|
538
538
|
function ir(t) {
|
539
|
-
let e =
|
539
|
+
let e = R.useId(), [r] = B(bt()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${he.prefix}`;
|
540
540
|
return t || `${n}-${e}`;
|
541
541
|
}
|
542
|
-
const lr = typeof
|
542
|
+
const lr = typeof R.useId == "function" ? ir : nr;
|
543
543
|
function or() {
|
544
544
|
return !1;
|
545
545
|
}
|
@@ -551,26 +551,26 @@ function ar(t) {
|
|
551
551
|
};
|
552
552
|
}
|
553
553
|
function bt() {
|
554
|
-
return typeof
|
554
|
+
return typeof R.useSyncExternalStore == "function" ? R.useSyncExternalStore(ar, or, sr) : oe(er);
|
555
555
|
}
|
556
556
|
let cr = !!(typeof window < "u" && window.document && window.document.createElement), $e = /* @__PURE__ */ new Map();
|
557
|
-
function
|
558
|
-
let [e, r] =
|
557
|
+
function vt(t) {
|
558
|
+
let [e, r] = B(t), n = x(null), i = lr(e), o = q((s) => {
|
559
559
|
n.current = s;
|
560
560
|
}, []);
|
561
|
-
return cr && $e.set(i, o),
|
561
|
+
return cr && $e.set(i, o), de(() => {
|
562
562
|
let s = i;
|
563
563
|
return () => {
|
564
564
|
$e.delete(s);
|
565
565
|
};
|
566
566
|
}, [
|
567
567
|
i
|
568
|
-
]),
|
568
|
+
]), O(() => {
|
569
569
|
let s = n.current;
|
570
570
|
s && (n.current = null, r(s));
|
571
571
|
}), i;
|
572
572
|
}
|
573
|
-
function
|
573
|
+
function dr(t, e) {
|
574
574
|
if (t === e) return t;
|
575
575
|
let r = $e.get(t);
|
576
576
|
if (r)
|
@@ -578,15 +578,15 @@ function ur(t, e) {
|
|
578
578
|
let n = $e.get(e);
|
579
579
|
return n ? (n(t), t) : e;
|
580
580
|
}
|
581
|
-
function
|
581
|
+
function yt(...t) {
|
582
582
|
return (...e) => {
|
583
583
|
for (let r of t) typeof r == "function" && r(...e);
|
584
584
|
};
|
585
585
|
}
|
586
|
-
const
|
586
|
+
const C = (t) => {
|
587
587
|
var e;
|
588
588
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
589
|
-
},
|
589
|
+
}, Y = (t) => t && "window" in t && t.window === t ? t : C(t).defaultView || window;
|
590
590
|
function gt(t) {
|
591
591
|
var e, r, n = "";
|
592
592
|
if (typeof t == "string" || typeof t == "number") n += t;
|
@@ -596,11 +596,11 @@ function gt(t) {
|
|
596
596
|
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
597
597
|
return n;
|
598
598
|
}
|
599
|
-
function
|
599
|
+
function ur() {
|
600
600
|
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = gt(t)) && (n && (n += " "), n += e);
|
601
601
|
return n;
|
602
602
|
}
|
603
|
-
function
|
603
|
+
function G(...t) {
|
604
604
|
let e = {
|
605
605
|
...t[0]
|
606
606
|
};
|
@@ -611,7 +611,7 @@ function X(...t) {
|
|
611
611
|
typeof o == "function" && typeof s == "function" && // This is a lot faster than a regex.
|
612
612
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
613
613
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
614
|
-
90 ? e[i] =
|
614
|
+
90 ? e[i] = yt(o, s) : (i === "className" || i === "UNSAFE_className") && typeof o == "string" && typeof s == "string" ? e[i] = ur(o, s) : i === "id" && o && s ? e.id = dr(o, s) : e[i] = s !== void 0 ? s : o;
|
615
615
|
}
|
616
616
|
}
|
617
617
|
return e;
|
@@ -631,13 +631,13 @@ const fr = /* @__PURE__ */ new Set([
|
|
631
631
|
"download",
|
632
632
|
"ping",
|
633
633
|
"referrerPolicy"
|
634
|
-
]),
|
635
|
-
function
|
634
|
+
]), vr = /^(data-.*)$/;
|
635
|
+
function yr(t, e = {}) {
|
636
636
|
let { labelable: r, isLink: n, propNames: i } = e, o = {};
|
637
|
-
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (fr.has(s) || r && pr.has(s) || n && br.has(s) || i != null && i.has(s) ||
|
637
|
+
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (fr.has(s) || r && pr.has(s) || n && br.has(s) || i != null && i.has(s) || vr.test(s)) && (o[s] = t[s]);
|
638
638
|
return o;
|
639
639
|
}
|
640
|
-
function
|
640
|
+
function j(t) {
|
641
641
|
if (gr()) t.focus({
|
642
642
|
preventScroll: !0
|
643
643
|
});
|
@@ -683,79 +683,79 @@ function Ke(t) {
|
|
683
683
|
var e;
|
684
684
|
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((r) => t.test(r.brand))) || t.test(window.navigator.userAgent);
|
685
685
|
}
|
686
|
-
function
|
686
|
+
function Fe(t) {
|
687
687
|
var e;
|
688
688
|
return typeof window < "u" && window.navigator != null ? t.test(((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.platform) || window.navigator.platform) : !1;
|
689
689
|
}
|
690
690
|
function J() {
|
691
|
-
return
|
691
|
+
return Fe(/^Mac/i);
|
692
692
|
}
|
693
693
|
function mr() {
|
694
|
-
return
|
694
|
+
return Fe(/^iPhone/i);
|
695
695
|
}
|
696
696
|
function ht() {
|
697
|
-
return
|
697
|
+
return Fe(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
698
698
|
J() && navigator.maxTouchPoints > 1;
|
699
699
|
}
|
700
|
-
function
|
700
|
+
function Oe() {
|
701
701
|
return mr() || ht();
|
702
702
|
}
|
703
703
|
function Kr() {
|
704
|
-
return J() ||
|
704
|
+
return J() || Oe();
|
705
705
|
}
|
706
706
|
function Sr() {
|
707
|
-
return Ke(/AppleWebKit/i) && !
|
707
|
+
return Ke(/AppleWebKit/i) && !wr();
|
708
708
|
}
|
709
|
-
function
|
709
|
+
function wr() {
|
710
710
|
return Ke(/Chrome/i);
|
711
711
|
}
|
712
712
|
function $t() {
|
713
713
|
return Ke(/Android/i);
|
714
714
|
}
|
715
|
-
function
|
715
|
+
function Tr() {
|
716
716
|
return Ke(/Firefox/i);
|
717
717
|
}
|
718
|
-
const Pr = /* @__PURE__ */
|
718
|
+
const Pr = /* @__PURE__ */ Bt({
|
719
719
|
isNative: !0,
|
720
|
-
open:
|
720
|
+
open: Er,
|
721
721
|
useHref: (t) => t
|
722
722
|
});
|
723
|
-
function
|
723
|
+
function ze() {
|
724
724
|
return oe(Pr);
|
725
725
|
}
|
726
726
|
function Z(t, e, r = !0) {
|
727
727
|
var n, i;
|
728
|
-
let { metaKey: o, ctrlKey: s, altKey:
|
729
|
-
|
730
|
-
let
|
728
|
+
let { metaKey: o, ctrlKey: s, altKey: d, shiftKey: p } = e;
|
729
|
+
Tr() && (!((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0) && n.startsWith("key")) && t.target === "_blank" && (J() ? o = !0 : s = !0);
|
730
|
+
let v = Sr() && J() && !ht() ? new KeyboardEvent("keydown", {
|
731
731
|
keyIdentifier: "Enter",
|
732
732
|
metaKey: o,
|
733
733
|
ctrlKey: s,
|
734
|
-
altKey:
|
734
|
+
altKey: d,
|
735
735
|
shiftKey: p
|
736
736
|
}) : new MouseEvent("click", {
|
737
737
|
metaKey: o,
|
738
738
|
ctrlKey: s,
|
739
|
-
altKey:
|
739
|
+
altKey: d,
|
740
740
|
shiftKey: p,
|
741
741
|
bubbles: !0,
|
742
742
|
cancelable: !0
|
743
743
|
});
|
744
|
-
Z.isOpening = r,
|
744
|
+
Z.isOpening = r, j(t), t.dispatchEvent(v), Z.isOpening = !1;
|
745
745
|
}
|
746
746
|
Z.isOpening = !1;
|
747
|
-
function
|
747
|
+
function _r(t, e) {
|
748
748
|
if (t instanceof HTMLAnchorElement) e(t);
|
749
749
|
else if (t.hasAttribute("data-href")) {
|
750
750
|
let r = document.createElement("a");
|
751
751
|
r.href = t.getAttribute("data-href"), t.hasAttribute("data-target") && (r.target = t.getAttribute("data-target")), t.hasAttribute("data-rel") && (r.rel = t.getAttribute("data-rel")), t.hasAttribute("data-download") && (r.download = t.getAttribute("data-download")), t.hasAttribute("data-ping") && (r.ping = t.getAttribute("data-ping")), t.hasAttribute("data-referrer-policy") && (r.referrerPolicy = t.getAttribute("data-referrer-policy")), t.appendChild(r), e(r), t.removeChild(r);
|
752
752
|
}
|
753
753
|
}
|
754
|
-
function
|
755
|
-
|
754
|
+
function Er(t, e) {
|
755
|
+
_r(t, (r) => Z(r, e));
|
756
756
|
}
|
757
|
-
function
|
758
|
-
let e =
|
757
|
+
function xr(t) {
|
758
|
+
let e = ze();
|
759
759
|
return {
|
760
760
|
href: t != null && t.href ? e.useHref(t == null ? void 0 : t.href) : void 0,
|
761
761
|
target: t == null ? void 0 : t.target,
|
@@ -765,8 +765,8 @@ function kr(t) {
|
|
765
765
|
referrerPolicy: t == null ? void 0 : t.referrerPolicy
|
766
766
|
};
|
767
767
|
}
|
768
|
-
let ne = /* @__PURE__ */ new Map(),
|
769
|
-
function
|
768
|
+
let ne = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Set();
|
769
|
+
function qe() {
|
770
770
|
if (typeof window > "u") return;
|
771
771
|
function t(n) {
|
772
772
|
return "propertyName" in n;
|
@@ -781,41 +781,41 @@ function Ye() {
|
|
781
781
|
if (!t(n) || !n.target) return;
|
782
782
|
let i = ne.get(n.target);
|
783
783
|
if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r), ne.delete(n.target)), ne.size === 0)) {
|
784
|
-
for (let o of
|
785
|
-
|
784
|
+
for (let o of xe) o();
|
785
|
+
xe.clear();
|
786
786
|
}
|
787
787
|
};
|
788
788
|
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", r);
|
789
789
|
}
|
790
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
790
|
+
typeof document < "u" && (document.readyState !== "loading" ? qe() : document.addEventListener("DOMContentLoaded", qe));
|
791
791
|
function mt(t) {
|
792
792
|
requestAnimationFrame(() => {
|
793
|
-
ne.size === 0 ? t() :
|
793
|
+
ne.size === 0 ? t() : xe.add(t);
|
794
794
|
});
|
795
795
|
}
|
796
796
|
function Kt() {
|
797
|
-
let t =
|
798
|
-
let p =
|
799
|
-
t.current.delete(s), s(...
|
797
|
+
let t = x(/* @__PURE__ */ new Map()), e = q((i, o, s, d) => {
|
798
|
+
let p = d != null && d.once ? (...v) => {
|
799
|
+
t.current.delete(s), s(...v);
|
800
800
|
} : s;
|
801
801
|
t.current.set(s, {
|
802
802
|
type: o,
|
803
803
|
eventTarget: i,
|
804
804
|
fn: p,
|
805
|
-
options:
|
806
|
-
}), i.addEventListener(o, s,
|
807
|
-
}, []), r =
|
805
|
+
options: d
|
806
|
+
}), i.addEventListener(o, s, d);
|
807
|
+
}, []), r = q((i, o, s, d) => {
|
808
808
|
var p;
|
809
|
-
let
|
810
|
-
i.removeEventListener(o,
|
811
|
-
}, []), n =
|
809
|
+
let v = ((p = t.current.get(s)) === null || p === void 0 ? void 0 : p.fn) || s;
|
810
|
+
i.removeEventListener(o, v, d), t.current.delete(s);
|
811
|
+
}, []), n = q(() => {
|
812
812
|
t.current.forEach((i, o) => {
|
813
813
|
r(i.eventTarget, i.type, o, i.options);
|
814
814
|
});
|
815
815
|
}, [
|
816
816
|
r
|
817
817
|
]);
|
818
|
-
return
|
818
|
+
return O(() => n, [
|
819
819
|
n
|
820
820
|
]), {
|
821
821
|
addGlobalListener: e,
|
@@ -825,7 +825,7 @@ function Kt() {
|
|
825
825
|
}
|
826
826
|
function St(t, e) {
|
827
827
|
let { id: r, "aria-label": n, "aria-labelledby": i } = t;
|
828
|
-
return r =
|
828
|
+
return r = vt(r), i && n ? i = [
|
829
829
|
.../* @__PURE__ */ new Set([
|
830
830
|
r,
|
831
831
|
...i.trim().split(/\s+/)
|
@@ -836,35 +836,35 @@ function St(t, e) {
|
|
836
836
|
"aria-labelledby": i
|
837
837
|
};
|
838
838
|
}
|
839
|
-
function
|
840
|
-
|
839
|
+
function kr(t, e) {
|
840
|
+
de(() => {
|
841
841
|
if (t && t.ref && e)
|
842
842
|
return t.ref.current = e.current, () => {
|
843
843
|
t.ref && (t.ref.current = null);
|
844
844
|
};
|
845
845
|
});
|
846
846
|
}
|
847
|
-
function
|
847
|
+
function Lr(t, e) {
|
848
848
|
let r = window.getComputedStyle(t), n = /(auto|scroll)/.test(r.overflow + r.overflowX + r.overflowY);
|
849
849
|
return n && e && (n = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), n;
|
850
850
|
}
|
851
|
-
function
|
851
|
+
function Mr(t, e) {
|
852
852
|
const r = [];
|
853
853
|
for (; t && t !== document.documentElement; )
|
854
|
-
|
854
|
+
Lr(t, e) && r.push(t), t = t.parentElement;
|
855
855
|
return r;
|
856
856
|
}
|
857
|
-
let
|
857
|
+
let Ir = 0;
|
858
858
|
const Pe = /* @__PURE__ */ new Map();
|
859
|
-
function
|
860
|
-
let [e, r] =
|
861
|
-
return
|
859
|
+
function Cr(t) {
|
860
|
+
let [e, r] = B();
|
861
|
+
return de(() => {
|
862
862
|
if (!t) return;
|
863
863
|
let n = Pe.get(t);
|
864
864
|
if (n)
|
865
865
|
r(n.element.id);
|
866
866
|
else {
|
867
|
-
let i = `react-aria-description-${
|
867
|
+
let i = `react-aria-description-${Ir++}`;
|
868
868
|
r(i);
|
869
869
|
let o = document.createElement("div");
|
870
870
|
o.id = i, o.style.display = "none", o.textContent = t, document.body.appendChild(o), n = {
|
@@ -881,9 +881,9 @@ function Dr(t) {
|
|
881
881
|
"aria-describedby": t ? e : void 0
|
882
882
|
};
|
883
883
|
}
|
884
|
-
function
|
884
|
+
function Dr(t, e, r, n) {
|
885
885
|
let i = re(r), o = r == null;
|
886
|
-
|
886
|
+
O(() => {
|
887
887
|
if (o || !t.current) return;
|
888
888
|
let s = t.current;
|
889
889
|
return s.addEventListener(e, i, n), () => {
|
@@ -897,11 +897,11 @@ function Ar(t, e, r, n) {
|
|
897
897
|
i
|
898
898
|
]);
|
899
899
|
}
|
900
|
-
function
|
901
|
-
let r =
|
902
|
-
r <= s ? s = r - parseInt(
|
900
|
+
function wt(t, e) {
|
901
|
+
let r = Ye(t, e, "left"), n = Ye(t, e, "top"), i = e.offsetWidth, o = e.offsetHeight, s = t.scrollLeft, d = t.scrollTop, { borderTopWidth: p, borderLeftWidth: v } = getComputedStyle(t), g = t.scrollLeft + parseInt(v, 10), w = t.scrollTop + parseInt(p, 10), h = g + t.clientWidth, y = w + t.clientHeight;
|
902
|
+
r <= s ? s = r - parseInt(v, 10) : r + i > h && (s += r + i - h), n <= w ? d = n - parseInt(p, 10) : n + o > y && (d += n + o - y), t.scrollLeft = s, t.scrollTop = d;
|
903
903
|
}
|
904
|
-
function
|
904
|
+
function Ye(t, e, r) {
|
905
905
|
const n = r === "left" ? "offsetLeft" : "offsetTop";
|
906
906
|
let i = 0;
|
907
907
|
for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
|
@@ -917,16 +917,16 @@ function Je(t, e) {
|
|
917
917
|
if (document.contains(t)) {
|
918
918
|
let s = document.scrollingElement || document.documentElement;
|
919
919
|
if (window.getComputedStyle(s).overflow === "hidden") {
|
920
|
-
let p =
|
921
|
-
for (let
|
920
|
+
let p = Mr(t);
|
921
|
+
for (let v of p) wt(v, t);
|
922
922
|
} else {
|
923
923
|
var r;
|
924
|
-
let { left: p, top:
|
924
|
+
let { left: p, top: v } = t.getBoundingClientRect();
|
925
925
|
t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
|
926
926
|
block: "nearest"
|
927
927
|
});
|
928
|
-
let { left: g, top:
|
929
|
-
if (Math.abs(p - g) > 1 || Math.abs(
|
928
|
+
let { left: g, top: w } = t.getBoundingClientRect();
|
929
|
+
if (Math.abs(p - g) > 1 || Math.abs(v - w) > 1) {
|
930
930
|
var n, i, o;
|
931
931
|
e == null || (i = e.containingElement) === null || i === void 0 || (n = i.scrollIntoView) === null || n === void 0 || n.call(i, {
|
932
932
|
block: "center",
|
@@ -938,31 +938,31 @@ function Je(t, e) {
|
|
938
938
|
}
|
939
939
|
}
|
940
940
|
}
|
941
|
-
function
|
941
|
+
function ke(t) {
|
942
942
|
return t.mozInputSource === 0 && t.isTrusted ? !0 : $t() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
943
943
|
}
|
944
|
-
function
|
944
|
+
function Ar(t) {
|
945
945
|
return !$t() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
946
946
|
}
|
947
|
-
function
|
947
|
+
function Le(t) {
|
948
948
|
return Kr() ? t.altKey : t.ctrlKey;
|
949
949
|
}
|
950
950
|
function ie(t) {
|
951
951
|
return J() ? t.metaKey : t.ctrlKey;
|
952
952
|
}
|
953
|
-
const
|
954
|
-
function
|
955
|
-
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i =
|
953
|
+
const Fr = 1e3;
|
954
|
+
function Or(t) {
|
955
|
+
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = x({
|
956
956
|
search: "",
|
957
957
|
timeout: null
|
958
958
|
}).current, o = (s) => {
|
959
|
-
let
|
960
|
-
if (!
|
961
|
-
|
959
|
+
let d = zr(s.key);
|
960
|
+
if (!d || s.ctrlKey || s.metaKey || !s.currentTarget.contains(s.target)) return;
|
961
|
+
d === " " && i.search.trim().length > 0 && (s.preventDefault(), "continuePropagation" in s || s.stopPropagation()), i.search += d;
|
962
962
|
let p = e.getKeyForSearch(i.search, r.focusedKey);
|
963
963
|
p == null && (p = e.getKeyForSearch(i.search)), p != null && (r.setFocusedKey(p), n && n(p)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
964
964
|
i.search = "";
|
965
|
-
},
|
965
|
+
}, Fr);
|
966
966
|
};
|
967
967
|
return {
|
968
968
|
typeSelectProps: {
|
@@ -972,59 +972,59 @@ function zr(t) {
|
|
972
972
|
}
|
973
973
|
};
|
974
974
|
}
|
975
|
-
function
|
975
|
+
function zr(t) {
|
976
976
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
977
977
|
}
|
978
|
-
let le = "default",
|
978
|
+
let le = "default", Me = "", ye = /* @__PURE__ */ new WeakMap();
|
979
979
|
function Ze(t) {
|
980
|
-
if (
|
980
|
+
if (Oe()) {
|
981
981
|
if (le === "default") {
|
982
|
-
const e =
|
983
|
-
|
982
|
+
const e = C(t);
|
983
|
+
Me = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
984
984
|
}
|
985
985
|
le = "disabled";
|
986
|
-
} else (t instanceof HTMLElement || t instanceof SVGElement) && (
|
986
|
+
} else (t instanceof HTMLElement || t instanceof SVGElement) && (ye.set(t, t.style.userSelect), t.style.userSelect = "none");
|
987
987
|
}
|
988
988
|
function pe(t) {
|
989
|
-
if (
|
989
|
+
if (Oe()) {
|
990
990
|
if (le !== "disabled") return;
|
991
991
|
le = "restoring", setTimeout(() => {
|
992
992
|
mt(() => {
|
993
993
|
if (le === "restoring") {
|
994
|
-
const e =
|
995
|
-
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect =
|
994
|
+
const e = C(t);
|
995
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = Me || ""), Me = "", le = "default";
|
996
996
|
}
|
997
997
|
});
|
998
998
|
}, 300);
|
999
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
1000
|
-
let e =
|
1001
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"),
|
999
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && ye.has(t)) {
|
1000
|
+
let e = ye.get(t);
|
1001
|
+
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), ye.delete(t);
|
1002
1002
|
}
|
1003
1003
|
}
|
1004
|
-
const
|
1004
|
+
const Tt = R.createContext({
|
1005
1005
|
register: () => {
|
1006
1006
|
}
|
1007
1007
|
});
|
1008
|
-
|
1009
|
-
function
|
1008
|
+
Tt.displayName = "PressResponderContext";
|
1009
|
+
function Nr(t, e) {
|
1010
1010
|
return e.get ? e.get.call(t) : e.value;
|
1011
1011
|
}
|
1012
1012
|
function Pt(t, e, r) {
|
1013
1013
|
if (!e.has(t)) throw new TypeError("attempted to " + r + " private field on non-instance");
|
1014
1014
|
return e.get(t);
|
1015
1015
|
}
|
1016
|
-
function
|
1016
|
+
function Br(t, e) {
|
1017
1017
|
var r = Pt(t, e, "get");
|
1018
|
-
return
|
1018
|
+
return Nr(t, r);
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function Rr(t, e) {
|
1021
1021
|
if (e.has(t))
|
1022
1022
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
1023
1023
|
}
|
1024
|
-
function
|
1025
|
-
|
1024
|
+
function Ur(t, e, r) {
|
1025
|
+
Rr(t, e), e.set(t, r);
|
1026
1026
|
}
|
1027
|
-
function
|
1027
|
+
function Hr(t, e, r) {
|
1028
1028
|
if (e.set) e.set.call(t, r);
|
1029
1029
|
else {
|
1030
1030
|
if (!e.writable)
|
@@ -1034,33 +1034,33 @@ function Wr(t, e, r) {
|
|
1034
1034
|
}
|
1035
1035
|
function Qe(t, e, r) {
|
1036
1036
|
var n = Pt(t, e, "set");
|
1037
|
-
return
|
1037
|
+
return Hr(t, n, r), r;
|
1038
1038
|
}
|
1039
|
-
function
|
1040
|
-
let e = oe(
|
1039
|
+
function Wr(t) {
|
1040
|
+
let e = oe(Tt);
|
1041
1041
|
if (e) {
|
1042
1042
|
let { register: r, ...n } = e;
|
1043
|
-
t =
|
1043
|
+
t = G(n, t), r();
|
1044
1044
|
}
|
1045
|
-
return
|
1045
|
+
return kr(e, t.ref), t;
|
1046
1046
|
}
|
1047
1047
|
var be = /* @__PURE__ */ new WeakMap();
|
1048
|
-
class
|
1048
|
+
class ve {
|
1049
1049
|
continuePropagation() {
|
1050
1050
|
Qe(this, be, !1);
|
1051
1051
|
}
|
1052
1052
|
get shouldStopPropagation() {
|
1053
|
-
return
|
1053
|
+
return Br(this, be);
|
1054
1054
|
}
|
1055
1055
|
constructor(e, r, n) {
|
1056
|
-
|
1056
|
+
Ur(this, be, {
|
1057
1057
|
writable: !0,
|
1058
1058
|
value: void 0
|
1059
1059
|
}), Qe(this, be, !0), this.type = e, this.pointerType = r, this.target = n.currentTarget, this.shiftKey = n.shiftKey, this.metaKey = n.metaKey, this.ctrlKey = n.ctrlKey, this.altKey = n.altKey;
|
1060
1060
|
}
|
1061
1061
|
}
|
1062
1062
|
const et = Symbol("linkClicked");
|
1063
|
-
function
|
1063
|
+
function _t(t) {
|
1064
1064
|
let {
|
1065
1065
|
onPress: e,
|
1066
1066
|
onPressChange: r,
|
@@ -1068,14 +1068,14 @@ function Et(t) {
|
|
1068
1068
|
onPressEnd: i,
|
1069
1069
|
onPressUp: o,
|
1070
1070
|
isDisabled: s,
|
1071
|
-
isPressed:
|
1071
|
+
isPressed: d,
|
1072
1072
|
preventFocusOnPress: p,
|
1073
|
-
shouldCancelOnPointerExit:
|
1073
|
+
shouldCancelOnPointerExit: v,
|
1074
1074
|
allowTextSelectionOnPress: g,
|
1075
1075
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
1076
|
-
ref:
|
1076
|
+
ref: w,
|
1077
1077
|
...h
|
1078
|
-
} =
|
1078
|
+
} = Wr(t), [y, k] = B(!1), S = x({
|
1079
1079
|
isPressed: !1,
|
1080
1080
|
ignoreEmulatedMouseEvents: !1,
|
1081
1081
|
ignoreClickAfterPress: !1,
|
@@ -1085,143 +1085,143 @@ function Et(t) {
|
|
1085
1085
|
target: null,
|
1086
1086
|
isOverTarget: !1,
|
1087
1087
|
pointerType: null
|
1088
|
-
}), { addGlobalListener:
|
1088
|
+
}), { addGlobalListener: T, removeAllGlobalListeners: L } = Kt(), E = re((l, $) => {
|
1089
1089
|
let f = S.current;
|
1090
1090
|
if (s || f.didFirePressStart) return !1;
|
1091
|
-
let
|
1091
|
+
let u = !0;
|
1092
1092
|
if (f.isTriggeringEvent = !0, n) {
|
1093
|
-
let K = new
|
1094
|
-
n(K),
|
1093
|
+
let K = new ve("pressstart", $, l);
|
1094
|
+
n(K), u = K.shouldStopPropagation;
|
1095
1095
|
}
|
1096
|
-
return r && r(!0), f.isTriggeringEvent = !1, f.didFirePressStart = !0,
|
1097
|
-
}),
|
1098
|
-
let
|
1099
|
-
if (!
|
1100
|
-
|
1096
|
+
return r && r(!0), f.isTriggeringEvent = !1, f.didFirePressStart = !0, k(!0), u;
|
1097
|
+
}), _ = re((l, $, f = !0) => {
|
1098
|
+
let u = S.current;
|
1099
|
+
if (!u.didFirePressStart) return !1;
|
1100
|
+
u.ignoreClickAfterPress = !0, u.didFirePressStart = !1, u.isTriggeringEvent = !0;
|
1101
1101
|
let K = !0;
|
1102
1102
|
if (i) {
|
1103
|
-
let a = new
|
1103
|
+
let a = new ve("pressend", $, l);
|
1104
1104
|
i(a), K = a.shouldStopPropagation;
|
1105
1105
|
}
|
1106
|
-
if (r && r(!1),
|
1107
|
-
let a = new
|
1106
|
+
if (r && r(!1), k(!1), e && f && !s) {
|
1107
|
+
let a = new ve("press", $, l);
|
1108
1108
|
e(a), K && (K = a.shouldStopPropagation);
|
1109
1109
|
}
|
1110
|
-
return
|
1111
|
-
}),
|
1110
|
+
return u.isTriggeringEvent = !1, K;
|
1111
|
+
}), M = re((l, $) => {
|
1112
1112
|
let f = S.current;
|
1113
1113
|
if (s) return !1;
|
1114
1114
|
if (o) {
|
1115
1115
|
f.isTriggeringEvent = !0;
|
1116
|
-
let
|
1117
|
-
return o(
|
1116
|
+
let u = new ve("pressup", $, l);
|
1117
|
+
return o(u), f.isTriggeringEvent = !1, u.shouldStopPropagation;
|
1118
1118
|
}
|
1119
1119
|
return !0;
|
1120
|
-
}),
|
1120
|
+
}), I = re((l) => {
|
1121
1121
|
let $ = S.current;
|
1122
|
-
$.isPressed && $.target && ($.isOverTarget && $.pointerType != null &&
|
1123
|
-
}),
|
1124
|
-
|
1125
|
-
}),
|
1122
|
+
$.isPressed && $.target && ($.isOverTarget && $.pointerType != null && _(W($.target, l), $.pointerType, !1), $.isPressed = !1, $.isOverTarget = !1, $.activePointerId = null, $.pointerType = null, L(), g || pe($.target));
|
1123
|
+
}), D = re((l) => {
|
1124
|
+
v && I(l);
|
1125
|
+
}), U = V(() => {
|
1126
1126
|
let l = S.current, $ = {
|
1127
|
-
onKeyDown(
|
1128
|
-
if (
|
1127
|
+
onKeyDown(u) {
|
1128
|
+
if (_e(u.nativeEvent, u.currentTarget) && u.currentTarget.contains(u.target)) {
|
1129
1129
|
var K;
|
1130
|
-
rt(
|
1130
|
+
rt(u.target, u.key) && u.preventDefault();
|
1131
1131
|
let a = !0;
|
1132
|
-
if (!l.isPressed && !
|
1133
|
-
l.target =
|
1134
|
-
let c =
|
1135
|
-
|
1132
|
+
if (!l.isPressed && !u.repeat) {
|
1133
|
+
l.target = u.currentTarget, l.isPressed = !0, a = E(u, "keyboard");
|
1134
|
+
let c = u.currentTarget, P = (A) => {
|
1135
|
+
_e(A, c) && !A.repeat && c.contains(A.target) && l.target && M(W(l.target, A), "keyboard");
|
1136
1136
|
};
|
1137
|
-
|
1137
|
+
T(C(u.currentTarget), "keyup", yt(P, f), !0);
|
1138
1138
|
}
|
1139
|
-
a &&
|
1140
|
-
} else
|
1139
|
+
a && u.stopPropagation(), u.metaKey && J() && ((K = l.metaKeyEvents) === null || K === void 0 || K.set(u.key, u.nativeEvent));
|
1140
|
+
} else u.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
|
1141
1141
|
},
|
1142
|
-
onClick(
|
1143
|
-
if (!(
|
1142
|
+
onClick(u) {
|
1143
|
+
if (!(u && !u.currentTarget.contains(u.target)) && u && u.button === 0 && !l.isTriggeringEvent && !Z.isOpening) {
|
1144
1144
|
let K = !0;
|
1145
|
-
if (s &&
|
1146
|
-
!s && !p &&
|
1147
|
-
let a =
|
1145
|
+
if (s && u.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || ke(u.nativeEvent))) {
|
1146
|
+
!s && !p && j(u.currentTarget);
|
1147
|
+
let a = E(u, "virtual"), c = M(u, "virtual"), P = _(u, "virtual");
|
1148
1148
|
K = a && c && P;
|
1149
1149
|
}
|
1150
|
-
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, K &&
|
1150
|
+
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, K && u.stopPropagation();
|
1151
1151
|
}
|
1152
1152
|
}
|
1153
|
-
}, f = (
|
1153
|
+
}, f = (u) => {
|
1154
1154
|
var K;
|
1155
|
-
if (l.isPressed && l.target &&
|
1155
|
+
if (l.isPressed && l.target && _e(u, l.target)) {
|
1156
1156
|
var a;
|
1157
|
-
rt(
|
1158
|
-
let P =
|
1159
|
-
|
1160
|
-
} else if (
|
1157
|
+
rt(u.target, u.key) && u.preventDefault();
|
1158
|
+
let P = u.target;
|
1159
|
+
_(W(l.target, u), "keyboard", l.target.contains(P)), L(), u.key !== "Enter" && Ne(l.target) && l.target.contains(P) && !u[et] && (u[et] = !0, Z(l.target, u, !1)), l.isPressed = !1, (a = l.metaKeyEvents) === null || a === void 0 || a.delete(u.key);
|
1160
|
+
} else if (u.key === "Meta" && (!((K = l.metaKeyEvents) === null || K === void 0) && K.size)) {
|
1161
1161
|
var c;
|
1162
1162
|
let P = l.metaKeyEvents;
|
1163
1163
|
l.metaKeyEvents = void 0;
|
1164
|
-
for (let
|
1164
|
+
for (let A of P.values()) (c = l.target) === null || c === void 0 || c.dispatchEvent(new KeyboardEvent("keyup", A));
|
1165
1165
|
}
|
1166
1166
|
};
|
1167
1167
|
if (typeof PointerEvent < "u") {
|
1168
1168
|
$.onPointerDown = (c) => {
|
1169
1169
|
if (c.button !== 0 || !c.currentTarget.contains(c.target)) return;
|
1170
|
-
if (
|
1170
|
+
if (Ar(c.nativeEvent)) {
|
1171
1171
|
l.pointerType = "virtual";
|
1172
1172
|
return;
|
1173
1173
|
}
|
1174
|
-
|
1174
|
+
Ee(c.currentTarget) && c.preventDefault(), l.pointerType = c.pointerType;
|
1175
1175
|
let P = !0;
|
1176
|
-
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = c.pointerId, l.target = c.currentTarget, !s && !p &&
|
1176
|
+
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = c.pointerId, l.target = c.currentTarget, !s && !p && j(c.currentTarget), g || Ze(l.target), P = E(c, l.pointerType), T(C(c.currentTarget), "pointermove", u, !1), T(C(c.currentTarget), "pointerup", K, !1), T(C(c.currentTarget), "pointercancel", a, !1)), P && c.stopPropagation();
|
1177
1177
|
}, $.onMouseDown = (c) => {
|
1178
|
-
c.currentTarget.contains(c.target) && c.button === 0 && (
|
1178
|
+
c.currentTarget.contains(c.target) && c.button === 0 && (Ee(c.currentTarget) && c.preventDefault(), c.stopPropagation());
|
1179
1179
|
}, $.onPointerUp = (c) => {
|
1180
|
-
!c.currentTarget.contains(c.target) || l.pointerType === "virtual" || c.button === 0 && te(c, c.currentTarget) &&
|
1180
|
+
!c.currentTarget.contains(c.target) || l.pointerType === "virtual" || c.button === 0 && te(c, c.currentTarget) && M(c, l.pointerType || c.pointerType);
|
1181
1181
|
};
|
1182
|
-
let
|
1183
|
-
c.pointerId === l.activePointerId && (l.target && te(c, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0,
|
1182
|
+
let u = (c) => {
|
1183
|
+
c.pointerId === l.activePointerId && (l.target && te(c, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, E(W(l.target, c), l.pointerType)) : l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, _(W(l.target, c), l.pointerType, !1), D(c)));
|
1184
1184
|
}, K = (c) => {
|
1185
|
-
c.pointerId === l.activePointerId && l.isPressed && c.button === 0 && l.target && (te(c, l.target) && l.pointerType != null ?
|
1185
|
+
c.pointerId === l.activePointerId && l.isPressed && c.button === 0 && l.target && (te(c, l.target) && l.pointerType != null ? _(W(l.target, c), l.pointerType) : l.isOverTarget && l.pointerType != null && _(W(l.target, c), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, L(), g || pe(l.target));
|
1186
1186
|
}, a = (c) => {
|
1187
|
-
|
1187
|
+
I(c);
|
1188
1188
|
};
|
1189
1189
|
$.onDragStart = (c) => {
|
1190
|
-
c.currentTarget.contains(c.target) &&
|
1190
|
+
c.currentTarget.contains(c.target) && I(c);
|
1191
1191
|
};
|
1192
1192
|
} else {
|
1193
1193
|
$.onMouseDown = (a) => {
|
1194
1194
|
if (a.button !== 0 || !a.currentTarget.contains(a.target)) return;
|
1195
|
-
if (
|
1195
|
+
if (Ee(a.currentTarget) && a.preventDefault(), l.ignoreEmulatedMouseEvents) {
|
1196
1196
|
a.stopPropagation();
|
1197
1197
|
return;
|
1198
1198
|
}
|
1199
|
-
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType =
|
1199
|
+
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType = ke(a.nativeEvent) ? "virtual" : "mouse", !s && !p && j(a.currentTarget), E(a, l.pointerType) && a.stopPropagation(), T(C(a.currentTarget), "mouseup", u, !1);
|
1200
1200
|
}, $.onMouseEnter = (a) => {
|
1201
1201
|
if (!a.currentTarget.contains(a.target)) return;
|
1202
1202
|
let c = !0;
|
1203
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, c =
|
1203
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, c = E(a, l.pointerType)), c && a.stopPropagation();
|
1204
1204
|
}, $.onMouseLeave = (a) => {
|
1205
1205
|
if (!a.currentTarget.contains(a.target)) return;
|
1206
1206
|
let c = !0;
|
1207
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, c =
|
1207
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, c = _(a, l.pointerType, !1), D(a)), c && a.stopPropagation();
|
1208
1208
|
}, $.onMouseUp = (a) => {
|
1209
|
-
a.currentTarget.contains(a.target) && !l.ignoreEmulatedMouseEvents && a.button === 0 &&
|
1209
|
+
a.currentTarget.contains(a.target) && !l.ignoreEmulatedMouseEvents && a.button === 0 && M(a, l.pointerType || "mouse");
|
1210
1210
|
};
|
1211
|
-
let
|
1211
|
+
let u = (a) => {
|
1212
1212
|
if (a.button === 0) {
|
1213
|
-
if (l.isPressed = !1,
|
1213
|
+
if (l.isPressed = !1, L(), l.ignoreEmulatedMouseEvents) {
|
1214
1214
|
l.ignoreEmulatedMouseEvents = !1;
|
1215
1215
|
return;
|
1216
1216
|
}
|
1217
|
-
l.target && te(a, l.target) && l.pointerType != null ?
|
1217
|
+
l.target && te(a, l.target) && l.pointerType != null ? _(W(l.target, a), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && _(W(l.target, a), l.pointerType, !1), l.isOverTarget = !1;
|
1218
1218
|
}
|
1219
1219
|
};
|
1220
1220
|
$.onTouchStart = (a) => {
|
1221
1221
|
if (!a.currentTarget.contains(a.target)) return;
|
1222
|
-
let c =
|
1222
|
+
let c = jr(a.nativeEvent);
|
1223
1223
|
if (!c) return;
|
1224
|
-
l.activePointerId = c.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = a.currentTarget, l.pointerType = "touch", !s && !p &&
|
1224
|
+
l.activePointerId = c.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = a.currentTarget, l.pointerType = "touch", !s && !p && j(a.currentTarget), g || Ze(l.target), E(a, l.pointerType) && a.stopPropagation(), T(Y(a.currentTarget), "scroll", K, !0);
|
1225
1225
|
}, $.onTouchMove = (a) => {
|
1226
1226
|
if (!a.currentTarget.contains(a.target)) return;
|
1227
1227
|
if (!l.isPressed) {
|
@@ -1229,7 +1229,7 @@ function Et(t) {
|
|
1229
1229
|
return;
|
1230
1230
|
}
|
1231
1231
|
let c = tt(a.nativeEvent, l.activePointerId), P = !0;
|
1232
|
-
c && te(c, a.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, P =
|
1232
|
+
c && te(c, a.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, P = E(a, l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, P = _(a, l.pointerType, !1), D(a)), P && a.stopPropagation();
|
1233
1233
|
}, $.onTouchEnd = (a) => {
|
1234
1234
|
if (!a.currentTarget.contains(a.target)) return;
|
1235
1235
|
if (!l.isPressed) {
|
@@ -1237,12 +1237,12 @@ function Et(t) {
|
|
1237
1237
|
return;
|
1238
1238
|
}
|
1239
1239
|
let c = tt(a.nativeEvent, l.activePointerId), P = !0;
|
1240
|
-
c && te(c, a.currentTarget) && l.pointerType != null ? (
|
1240
|
+
c && te(c, a.currentTarget) && l.pointerType != null ? (M(a, l.pointerType), P = _(a, l.pointerType)) : l.isOverTarget && l.pointerType != null && (P = _(a, l.pointerType, !1)), P && a.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !g && pe(l.target), L();
|
1241
1241
|
}, $.onTouchCancel = (a) => {
|
1242
|
-
a.currentTarget.contains(a.target) && (a.stopPropagation(), l.isPressed &&
|
1242
|
+
a.currentTarget.contains(a.target) && (a.stopPropagation(), l.isPressed && I(a));
|
1243
1243
|
};
|
1244
1244
|
let K = (a) => {
|
1245
|
-
l.isPressed && a.target.contains(l.target) &&
|
1245
|
+
l.isPressed && a.target.contains(l.target) && I({
|
1246
1246
|
currentTarget: l.target,
|
1247
1247
|
shiftKey: !1,
|
1248
1248
|
ctrlKey: !1,
|
@@ -1251,41 +1251,41 @@ function Et(t) {
|
|
1251
1251
|
});
|
1252
1252
|
};
|
1253
1253
|
$.onDragStart = (a) => {
|
1254
|
-
a.currentTarget.contains(a.target) &&
|
1254
|
+
a.currentTarget.contains(a.target) && I(a);
|
1255
1255
|
};
|
1256
1256
|
}
|
1257
1257
|
return $;
|
1258
1258
|
}, [
|
1259
|
-
|
1259
|
+
T,
|
1260
1260
|
s,
|
1261
1261
|
p,
|
1262
|
-
|
1262
|
+
L,
|
1263
1263
|
g,
|
1264
|
-
|
1265
|
-
|
1264
|
+
I,
|
1265
|
+
D,
|
1266
|
+
_,
|
1266
1267
|
E,
|
1267
|
-
|
1268
|
-
I
|
1268
|
+
M
|
1269
1269
|
]);
|
1270
|
-
return
|
1270
|
+
return O(() => () => {
|
1271
1271
|
var l;
|
1272
1272
|
g || pe((l = S.current.target) !== null && l !== void 0 ? l : void 0);
|
1273
1273
|
}, [
|
1274
1274
|
g
|
1275
1275
|
]), {
|
1276
|
-
isPressed:
|
1277
|
-
pressProps:
|
1276
|
+
isPressed: d || y,
|
1277
|
+
pressProps: G(h, U)
|
1278
1278
|
};
|
1279
1279
|
}
|
1280
|
-
function
|
1280
|
+
function Ne(t) {
|
1281
1281
|
return t.tagName === "A" && t.hasAttribute("href");
|
1282
1282
|
}
|
1283
|
-
function
|
1283
|
+
function _e(t, e) {
|
1284
1284
|
const { key: r, code: n } = t, i = e, o = i.getAttribute("role");
|
1285
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof
|
1286
|
-
!((o === "link" || !o &&
|
1285
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof Y(i).HTMLInputElement && !Et(i, r) || i instanceof Y(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
1286
|
+
!((o === "link" || !o && Ne(i)) && r !== "Enter");
|
1287
1287
|
}
|
1288
|
-
function
|
1288
|
+
function jr(t) {
|
1289
1289
|
const { targetTouches: e } = t;
|
1290
1290
|
return e.length > 0 ? e[0] : null;
|
1291
1291
|
}
|
@@ -1297,7 +1297,7 @@ function tt(t, e) {
|
|
1297
1297
|
}
|
1298
1298
|
return null;
|
1299
1299
|
}
|
1300
|
-
function
|
1300
|
+
function W(t, e) {
|
1301
1301
|
return {
|
1302
1302
|
currentTarget: t,
|
1303
1303
|
shiftKey: e.shiftKey,
|
@@ -1306,7 +1306,7 @@ function j(t, e) {
|
|
1306
1306
|
altKey: e.altKey
|
1307
1307
|
};
|
1308
1308
|
}
|
1309
|
-
function
|
1309
|
+
function Vr(t) {
|
1310
1310
|
let e = 0, r = 0;
|
1311
1311
|
return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ? r = t.height / 2 : t.radiusY !== void 0 && (r = t.radiusY), {
|
1312
1312
|
top: t.clientY - r,
|
@@ -1315,20 +1315,20 @@ function Gr(t) {
|
|
1315
1315
|
left: t.clientX - e
|
1316
1316
|
};
|
1317
1317
|
}
|
1318
|
-
function
|
1318
|
+
function Gr(t, e) {
|
1319
1319
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
1320
1320
|
}
|
1321
1321
|
function te(t, e) {
|
1322
|
-
let r = e.getBoundingClientRect(), n =
|
1323
|
-
return
|
1322
|
+
let r = e.getBoundingClientRect(), n = Vr(t);
|
1323
|
+
return Gr(r, n);
|
1324
1324
|
}
|
1325
|
-
function
|
1325
|
+
function Ee(t) {
|
1326
1326
|
return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
|
1327
1327
|
}
|
1328
1328
|
function rt(t, e) {
|
1329
|
-
return t instanceof HTMLInputElement ? !
|
1329
|
+
return t instanceof HTMLInputElement ? !Et(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !Ne(t);
|
1330
1330
|
}
|
1331
|
-
const
|
1331
|
+
const Xr = /* @__PURE__ */ new Set([
|
1332
1332
|
"checkbox",
|
1333
1333
|
"radio",
|
1334
1334
|
"range",
|
@@ -1339,86 +1339,86 @@ const qr = /* @__PURE__ */ new Set([
|
|
1339
1339
|
"submit",
|
1340
1340
|
"reset"
|
1341
1341
|
]);
|
1342
|
-
function
|
1343
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
1342
|
+
function Et(t, e) {
|
1343
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : Xr.has(t.type);
|
1344
1344
|
}
|
1345
|
-
let
|
1346
|
-
function
|
1347
|
-
for (let r of
|
1345
|
+
let ue = null, qr = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map(), Q = !1, Ie = !1;
|
1346
|
+
function Be(t, e) {
|
1347
|
+
for (let r of qr) r(t, e);
|
1348
1348
|
}
|
1349
|
-
function
|
1349
|
+
function Yr(t) {
|
1350
1350
|
return !(t.metaKey || !J() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
1351
1351
|
}
|
1352
1352
|
function me(t) {
|
1353
|
-
Q = !0,
|
1353
|
+
Q = !0, Yr(t) && (ue = "keyboard", Be("keyboard", t));
|
1354
1354
|
}
|
1355
|
-
function
|
1356
|
-
|
1355
|
+
function F(t) {
|
1356
|
+
ue = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (Q = !0, Be("pointer", t));
|
1357
1357
|
}
|
1358
|
-
function
|
1359
|
-
|
1358
|
+
function xt(t) {
|
1359
|
+
ke(t) && (Q = !0, ue = "virtual");
|
1360
1360
|
}
|
1361
|
-
function
|
1362
|
-
t.target === window || t.target === document || (!Q && !
|
1361
|
+
function kt(t) {
|
1362
|
+
t.target === window || t.target === document || (!Q && !Ie && (ue = "virtual", Be("virtual", t)), Q = !1, Ie = !1);
|
1363
1363
|
}
|
1364
|
-
function
|
1365
|
-
Q = !1,
|
1364
|
+
function Lt() {
|
1365
|
+
Q = !1, Ie = !0;
|
1366
1366
|
}
|
1367
1367
|
function nt(t) {
|
1368
|
-
if (typeof window > "u" || ae.get(
|
1369
|
-
const e =
|
1368
|
+
if (typeof window > "u" || ae.get(Y(t))) return;
|
1369
|
+
const e = Y(t), r = C(t);
|
1370
1370
|
let n = e.HTMLElement.prototype.focus;
|
1371
1371
|
e.HTMLElement.prototype.focus = function() {
|
1372
1372
|
Q = !0, n.apply(this, arguments);
|
1373
|
-
}, r.addEventListener("keydown", me, !0), r.addEventListener("keyup", me, !0), r.addEventListener("click",
|
1374
|
-
|
1373
|
+
}, r.addEventListener("keydown", me, !0), r.addEventListener("keyup", me, !0), r.addEventListener("click", xt, !0), e.addEventListener("focus", kt, !0), e.addEventListener("blur", Lt, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", F, !0), r.addEventListener("pointermove", F, !0), r.addEventListener("pointerup", F, !0)) : (r.addEventListener("mousedown", F, !0), r.addEventListener("mousemove", F, !0), r.addEventListener("mouseup", F, !0)), e.addEventListener("beforeunload", () => {
|
1374
|
+
Mt(t);
|
1375
1375
|
}, {
|
1376
1376
|
once: !0
|
1377
1377
|
}), ae.set(e, {
|
1378
1378
|
focus: n
|
1379
1379
|
});
|
1380
1380
|
}
|
1381
|
-
const
|
1382
|
-
const r =
|
1383
|
-
e && n.removeEventListener("DOMContentLoaded", e), ae.has(r) && (r.HTMLElement.prototype.focus = ae.get(r).focus, n.removeEventListener("keydown", me, !0), n.removeEventListener("keyup", me, !0), n.removeEventListener("click",
|
1381
|
+
const Mt = (t, e) => {
|
1382
|
+
const r = Y(t), n = C(t);
|
1383
|
+
e && n.removeEventListener("DOMContentLoaded", e), ae.has(r) && (r.HTMLElement.prototype.focus = ae.get(r).focus, n.removeEventListener("keydown", me, !0), n.removeEventListener("keyup", me, !0), n.removeEventListener("click", xt, !0), r.removeEventListener("focus", kt, !0), r.removeEventListener("blur", Lt, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", F, !0), n.removeEventListener("pointermove", F, !0), n.removeEventListener("pointerup", F, !0)) : (n.removeEventListener("mousedown", F, !0), n.removeEventListener("mousemove", F, !0), n.removeEventListener("mouseup", F, !0)), ae.delete(r));
|
1384
1384
|
};
|
1385
1385
|
function Jr(t) {
|
1386
|
-
const e =
|
1386
|
+
const e = C(t);
|
1387
1387
|
let r;
|
1388
1388
|
return e.readyState !== "loading" ? nt(t) : (r = () => {
|
1389
1389
|
nt(t);
|
1390
|
-
}, e.addEventListener("DOMContentLoaded", r)), () =>
|
1390
|
+
}, e.addEventListener("DOMContentLoaded", r)), () => Mt(t, r);
|
1391
1391
|
}
|
1392
1392
|
typeof document < "u" && Jr();
|
1393
|
-
function
|
1394
|
-
return
|
1393
|
+
function Ce() {
|
1394
|
+
return ue;
|
1395
1395
|
}
|
1396
1396
|
const Zr = 500;
|
1397
1397
|
function Qr(t) {
|
1398
1398
|
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: o = Zr, accessibilityDescription: s } = t;
|
1399
|
-
const
|
1400
|
-
let { addGlobalListener: p, removeGlobalListener:
|
1399
|
+
const d = x();
|
1400
|
+
let { addGlobalListener: p, removeGlobalListener: v } = Kt(), { pressProps: g } = _t({
|
1401
1401
|
isDisabled: e,
|
1402
1402
|
onPressStart(h) {
|
1403
1403
|
if (h.continuePropagation(), (h.pointerType === "mouse" || h.pointerType === "touch") && (r && r({
|
1404
1404
|
...h,
|
1405
1405
|
type: "longpressstart"
|
1406
|
-
}),
|
1406
|
+
}), d.current = setTimeout(() => {
|
1407
1407
|
h.target.dispatchEvent(new PointerEvent("pointercancel", {
|
1408
1408
|
bubbles: !0
|
1409
1409
|
})), i && i({
|
1410
1410
|
...h,
|
1411
1411
|
type: "longpress"
|
1412
|
-
}),
|
1412
|
+
}), d.current = void 0;
|
1413
1413
|
}, o), h.pointerType === "touch")) {
|
1414
|
-
let
|
1415
|
-
|
1414
|
+
let y = (k) => {
|
1415
|
+
k.preventDefault();
|
1416
1416
|
};
|
1417
|
-
p(h.target, "contextmenu",
|
1417
|
+
p(h.target, "contextmenu", y, {
|
1418
1418
|
once: !0
|
1419
1419
|
}), p(window, "pointerup", () => {
|
1420
1420
|
setTimeout(() => {
|
1421
|
-
|
1421
|
+
v(h.target, "contextmenu", y);
|
1422
1422
|
}, 30);
|
1423
1423
|
}, {
|
1424
1424
|
once: !0
|
@@ -1426,33 +1426,33 @@ function Qr(t) {
|
|
1426
1426
|
}
|
1427
1427
|
},
|
1428
1428
|
onPressEnd(h) {
|
1429
|
-
|
1429
|
+
d.current && clearTimeout(d.current), n && (h.pointerType === "mouse" || h.pointerType === "touch") && n({
|
1430
1430
|
...h,
|
1431
1431
|
type: "longpressend"
|
1432
1432
|
});
|
1433
1433
|
}
|
1434
|
-
}),
|
1434
|
+
}), w = Cr(i && !e ? s : void 0);
|
1435
1435
|
return {
|
1436
|
-
longPressProps:
|
1436
|
+
longPressProps: G(g, w)
|
1437
1437
|
};
|
1438
1438
|
}
|
1439
|
-
function
|
1440
|
-
const e =
|
1441
|
-
if (
|
1439
|
+
function De(t) {
|
1440
|
+
const e = C(t);
|
1441
|
+
if (Ce() === "virtual") {
|
1442
1442
|
let r = e.activeElement;
|
1443
1443
|
mt(() => {
|
1444
|
-
e.activeElement === r && t.isConnected &&
|
1444
|
+
e.activeElement === r && t.isConnected && j(t);
|
1445
1445
|
});
|
1446
|
-
} else
|
1446
|
+
} else j(t);
|
1447
1447
|
}
|
1448
1448
|
function en(t) {
|
1449
|
-
const e =
|
1449
|
+
const e = Y(t);
|
1450
1450
|
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
|
1451
1451
|
let { display: r, visibility: n } = t.style, i = r !== "none" && n !== "hidden" && n !== "collapse";
|
1452
1452
|
if (i) {
|
1453
1453
|
const { getComputedStyle: o } = t.ownerDocument.defaultView;
|
1454
|
-
let { display: s, visibility:
|
1455
|
-
i = s !== "none" &&
|
1454
|
+
let { display: s, visibility: d } = o(t);
|
1455
|
+
i = s !== "none" && d !== "hidden" && d !== "collapse";
|
1456
1456
|
}
|
1457
1457
|
return i;
|
1458
1458
|
}
|
@@ -1460,10 +1460,10 @@ function tn(t, e) {
|
|
1460
1460
|
return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
1461
1461
|
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
1462
1462
|
}
|
1463
|
-
function
|
1464
|
-
return t.nodeName !== "#comment" && en(t) && tn(t, e) && (!t.parentElement ||
|
1463
|
+
function It(t, e) {
|
1464
|
+
return t.nodeName !== "#comment" && en(t) && tn(t, e) && (!t.parentElement || It(t.parentElement, t));
|
1465
1465
|
}
|
1466
|
-
const
|
1466
|
+
const Re = [
|
1467
1467
|
"input:not([disabled]):not([type=hidden])",
|
1468
1468
|
"select:not([disabled])",
|
1469
1469
|
"textarea:not([disabled])",
|
@@ -1477,22 +1477,22 @@ const Ue = [
|
|
1477
1477
|
"audio[controls]",
|
1478
1478
|
"video[controls]",
|
1479
1479
|
"[contenteditable]"
|
1480
|
-
], rn =
|
1481
|
-
|
1482
|
-
const nn =
|
1483
|
-
function
|
1480
|
+
], rn = Re.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
1481
|
+
Re.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
1482
|
+
const nn = Re.join(':not([hidden]):not([tabindex="-1"]),');
|
1483
|
+
function Ct(t, e) {
|
1484
1484
|
return !t || !e ? !1 : e.some((r) => r.contains(t));
|
1485
1485
|
}
|
1486
|
-
function
|
1487
|
-
let n = e != null && e.tabbable ? nn : rn, i =
|
1486
|
+
function Dt(t, e, r) {
|
1487
|
+
let n = e != null && e.tabbable ? nn : rn, i = C(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
1488
1488
|
acceptNode(o) {
|
1489
1489
|
var s;
|
1490
|
-
return !(e == null || (s = e.from) === null || s === void 0) && s.contains(o) ? NodeFilter.FILTER_REJECT : o.matches(n) &&
|
1490
|
+
return !(e == null || (s = e.from) === null || s === void 0) && s.contains(o) ? NodeFilter.FILTER_REJECT : o.matches(n) && It(o) && (!r || Ct(o, r)) && (!(e != null && e.accept) || e.accept(o)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
1491
1491
|
}
|
1492
1492
|
});
|
1493
1493
|
return e != null && e.from && (i.currentNode = e.from), i;
|
1494
1494
|
}
|
1495
|
-
class
|
1495
|
+
class Ue {
|
1496
1496
|
get size() {
|
1497
1497
|
return this.fastMap.size;
|
1498
1498
|
}
|
@@ -1515,7 +1515,7 @@ class He {
|
|
1515
1515
|
let r = this.fastMap.get(e);
|
1516
1516
|
if (!r) return;
|
1517
1517
|
let n = r.parent;
|
1518
|
-
for (let o of this.traverse()) o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef && r.scopeRef.current &&
|
1518
|
+
for (let o of this.traverse()) o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef && r.scopeRef.current && Ct(o.nodeToRestore, r.scopeRef.current) && (o.nodeToRestore = r.nodeToRestore);
|
1519
1519
|
let i = r.children;
|
1520
1520
|
n && (n.removeChild(r), i.size > 0 && i.forEach((o) => n && n.addChild(o))), this.fastMap.delete(r.scopeRef);
|
1521
1521
|
}
|
@@ -1525,7 +1525,7 @@ class He {
|
|
1525
1525
|
}
|
1526
1526
|
clone() {
|
1527
1527
|
var e;
|
1528
|
-
let r = new
|
1528
|
+
let r = new Ue();
|
1529
1529
|
var n;
|
1530
1530
|
for (let i of this.traverse()) r.addTreeNode(i.scopeRef, (n = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && n !== void 0 ? n : null, i.nodeToRestore);
|
1531
1531
|
return r;
|
@@ -1547,17 +1547,17 @@ class it {
|
|
1547
1547
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
1548
1548
|
}
|
1549
1549
|
}
|
1550
|
-
new
|
1550
|
+
new Ue();
|
1551
1551
|
function ln(t, e) {
|
1552
|
-
let r = e == null ? void 0 : e.isDisabled, [n, i] =
|
1553
|
-
return
|
1552
|
+
let r = e == null ? void 0 : e.isDisabled, [n, i] = B(!1);
|
1553
|
+
return de(() => {
|
1554
1554
|
if (t != null && t.current && !r) {
|
1555
1555
|
let o = () => {
|
1556
1556
|
if (t.current) {
|
1557
|
-
let
|
1557
|
+
let d = Dt(t.current, {
|
1558
1558
|
tabbable: !0
|
1559
1559
|
});
|
1560
|
-
i(!!
|
1560
|
+
i(!!d.nextNode());
|
1561
1561
|
}
|
1562
1562
|
};
|
1563
1563
|
o();
|
@@ -1618,7 +1618,7 @@ function an(t) {
|
|
1618
1618
|
return sn.has(e);
|
1619
1619
|
}
|
1620
1620
|
const cn = Symbol.for("react-aria.i18n.locale");
|
1621
|
-
function
|
1621
|
+
function At() {
|
1622
1622
|
let t = typeof window < "u" && window[cn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
1623
1623
|
try {
|
1624
1624
|
Intl.DateTimeFormat.supportedLocalesOf([
|
@@ -1632,40 +1632,40 @@ function Ft() {
|
|
1632
1632
|
direction: an(t) ? "rtl" : "ltr"
|
1633
1633
|
};
|
1634
1634
|
}
|
1635
|
-
let
|
1635
|
+
let Ae = At(), se = /* @__PURE__ */ new Set();
|
1636
1636
|
function lt() {
|
1637
|
-
|
1638
|
-
for (let t of se) t(
|
1637
|
+
Ae = At();
|
1638
|
+
for (let t of se) t(Ae);
|
1639
1639
|
}
|
1640
|
-
function
|
1641
|
-
let t = bt(), [e, r] =
|
1642
|
-
return
|
1640
|
+
function dn() {
|
1641
|
+
let t = bt(), [e, r] = B(Ae);
|
1642
|
+
return O(() => (se.size === 0 && window.addEventListener("languagechange", lt), se.add(r), () => {
|
1643
1643
|
se.delete(r), se.size === 0 && window.removeEventListener("languagechange", lt);
|
1644
1644
|
}), []), t ? {
|
1645
1645
|
locale: "en-US",
|
1646
1646
|
direction: "ltr"
|
1647
1647
|
} : e;
|
1648
1648
|
}
|
1649
|
-
const
|
1650
|
-
function
|
1651
|
-
let t =
|
1652
|
-
return oe(
|
1649
|
+
const un = /* @__PURE__ */ R.createContext(null);
|
1650
|
+
function Ft() {
|
1651
|
+
let t = dn();
|
1652
|
+
return oe(un) || t;
|
1653
1653
|
}
|
1654
1654
|
function fn(t) {
|
1655
|
-
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: s = !1, disallowSelectAll:
|
1655
|
+
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: s = !1, disallowSelectAll: d = !1, selectOnFocus: p = e.selectionBehavior === "replace", disallowTypeAhead: v = !1, shouldUseVirtualFocus: g, allowsTabNavigation: w = !1, isVirtualized: h, scrollRef: y = n, linkBehavior: k = "action" } = t, { direction: S } = Ft(), T = ze(), L = (f) => {
|
1656
1656
|
if (f.altKey && f.key === "Tab" && f.preventDefault(), !n.current.contains(f.target)) return;
|
1657
|
-
const
|
1657
|
+
const u = (m, X) => {
|
1658
1658
|
if (m != null) {
|
1659
|
-
if (e.isLink(m) &&
|
1660
|
-
|
1661
|
-
e.setFocusedKey(m,
|
1659
|
+
if (e.isLink(m) && k === "selection" && p && !Le(f)) {
|
1660
|
+
Wt(() => {
|
1661
|
+
e.setFocusedKey(m, X);
|
1662
1662
|
});
|
1663
|
-
let ee =
|
1664
|
-
|
1663
|
+
let ee = y.current.querySelector(`[data-key="${CSS.escape(m.toString())}"]`), We = e.getItemProps(m);
|
1664
|
+
T.open(ee, f, We.href, We.routerOptions);
|
1665
1665
|
return;
|
1666
1666
|
}
|
1667
|
-
if (e.setFocusedKey(m,
|
1668
|
-
f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : p && !
|
1667
|
+
if (e.setFocusedKey(m, X), e.isLink(m) && k === "override") return;
|
1668
|
+
f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : p && !Le(f) && e.replaceSelection(m);
|
1669
1669
|
}
|
1670
1670
|
};
|
1671
1671
|
switch (f.key) {
|
@@ -1674,7 +1674,7 @@ function fn(t) {
|
|
1674
1674
|
var K, a;
|
1675
1675
|
f.preventDefault();
|
1676
1676
|
let m = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (K = r.getFirstKey) === null || K === void 0 ? void 0 : K.call(r);
|
1677
|
-
m == null && o && (m = (a = r.getFirstKey) === null || a === void 0 ? void 0 : a.call(r, e.focusedKey)),
|
1677
|
+
m == null && o && (m = (a = r.getFirstKey) === null || a === void 0 ? void 0 : a.call(r, e.focusedKey)), u(m);
|
1678
1678
|
}
|
1679
1679
|
break;
|
1680
1680
|
case "ArrowUp":
|
@@ -1682,23 +1682,23 @@ function fn(t) {
|
|
1682
1682
|
var c, P;
|
1683
1683
|
f.preventDefault();
|
1684
1684
|
let m = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (c = r.getLastKey) === null || c === void 0 ? void 0 : c.call(r);
|
1685
|
-
m == null && o && (m = (P = r.getLastKey) === null || P === void 0 ? void 0 : P.call(r, e.focusedKey)),
|
1685
|
+
m == null && o && (m = (P = r.getLastKey) === null || P === void 0 ? void 0 : P.call(r, e.focusedKey)), u(m);
|
1686
1686
|
}
|
1687
1687
|
break;
|
1688
1688
|
case "ArrowLeft":
|
1689
1689
|
if (r.getKeyLeftOf) {
|
1690
|
-
var
|
1690
|
+
var A, b;
|
1691
1691
|
f.preventDefault();
|
1692
1692
|
let m = r.getKeyLeftOf(e.focusedKey);
|
1693
|
-
m == null && o && (m = S === "rtl" ? (
|
1693
|
+
m == null && o && (m = S === "rtl" ? (A = r.getFirstKey) === null || A === void 0 ? void 0 : A.call(r, e.focusedKey) : (b = r.getLastKey) === null || b === void 0 ? void 0 : b.call(r, e.focusedKey)), u(m, S === "rtl" ? "first" : "last");
|
1694
1694
|
}
|
1695
1695
|
break;
|
1696
1696
|
case "ArrowRight":
|
1697
1697
|
if (r.getKeyRightOf) {
|
1698
|
-
var
|
1698
|
+
var H, Se;
|
1699
1699
|
f.preventDefault();
|
1700
1700
|
let m = r.getKeyRightOf(e.focusedKey);
|
1701
|
-
m == null && o && (m = S === "rtl" ? (
|
1701
|
+
m == null && o && (m = S === "rtl" ? (H = r.getLastKey) === null || H === void 0 ? void 0 : H.call(r, e.focusedKey) : (Se = r.getFirstKey) === null || Se === void 0 ? void 0 : Se.call(r, e.focusedKey)), u(m, S === "rtl" ? "last" : "first");
|
1702
1702
|
}
|
1703
1703
|
break;
|
1704
1704
|
case "Home":
|
@@ -1719,48 +1719,48 @@ function fn(t) {
|
|
1719
1719
|
if (r.getKeyPageBelow) {
|
1720
1720
|
f.preventDefault();
|
1721
1721
|
let m = r.getKeyPageBelow(e.focusedKey);
|
1722
|
-
|
1722
|
+
u(m);
|
1723
1723
|
}
|
1724
1724
|
break;
|
1725
1725
|
case "PageUp":
|
1726
1726
|
if (r.getKeyPageAbove) {
|
1727
1727
|
f.preventDefault();
|
1728
1728
|
let m = r.getKeyPageAbove(e.focusedKey);
|
1729
|
-
|
1729
|
+
u(m);
|
1730
1730
|
}
|
1731
1731
|
break;
|
1732
1732
|
case "a":
|
1733
|
-
ie(f) && e.selectionMode === "multiple" &&
|
1733
|
+
ie(f) && e.selectionMode === "multiple" && d !== !0 && (f.preventDefault(), e.selectAll());
|
1734
1734
|
break;
|
1735
1735
|
case "Escape":
|
1736
1736
|
!s && e.selectedKeys.size !== 0 && (f.stopPropagation(), f.preventDefault(), e.clearSelection());
|
1737
1737
|
break;
|
1738
1738
|
case "Tab":
|
1739
|
-
if (!
|
1739
|
+
if (!w) {
|
1740
1740
|
if (f.shiftKey) n.current.focus();
|
1741
1741
|
else {
|
1742
|
-
let m =
|
1742
|
+
let m = Dt(n.current, {
|
1743
1743
|
tabbable: !0
|
1744
|
-
}),
|
1744
|
+
}), X, ee;
|
1745
1745
|
do
|
1746
|
-
ee = m.lastChild(), ee && (
|
1746
|
+
ee = m.lastChild(), ee && (X = ee);
|
1747
1747
|
while (ee);
|
1748
|
-
|
1748
|
+
X && !X.contains(document.activeElement) && j(X);
|
1749
1749
|
}
|
1750
1750
|
break;
|
1751
1751
|
}
|
1752
1752
|
}
|
1753
|
-
},
|
1753
|
+
}, E = x({
|
1754
1754
|
top: 0,
|
1755
1755
|
left: 0
|
1756
1756
|
});
|
1757
|
-
|
1758
|
-
|
1759
|
-
top:
|
1760
|
-
left:
|
1757
|
+
Dr(y, "scroll", h ? null : () => {
|
1758
|
+
E.current = {
|
1759
|
+
top: y.current.scrollTop,
|
1760
|
+
left: y.current.scrollLeft
|
1761
1761
|
};
|
1762
1762
|
});
|
1763
|
-
let
|
1763
|
+
let _ = (f) => {
|
1764
1764
|
if (e.isFocused) {
|
1765
1765
|
f.currentTarget.contains(f.target) || e.setFocused(!1);
|
1766
1766
|
return;
|
@@ -1770,88 +1770,88 @@ function fn(t) {
|
|
1770
1770
|
let a = (P) => {
|
1771
1771
|
P != null && (e.setFocusedKey(P), p && e.replaceSelection(P));
|
1772
1772
|
}, c = f.relatedTarget;
|
1773
|
-
var
|
1774
|
-
c && f.currentTarget.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? a((
|
1775
|
-
} else h || (
|
1773
|
+
var u, K;
|
1774
|
+
c && f.currentTarget.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? a((u = e.lastSelectedKey) !== null && u !== void 0 ? u : r.getLastKey()) : a((K = e.firstSelectedKey) !== null && K !== void 0 ? K : r.getFirstKey());
|
1775
|
+
} else h || (y.current.scrollTop = E.current.top, y.current.scrollLeft = E.current.left);
|
1776
1776
|
if (!h && e.focusedKey != null) {
|
1777
|
-
let a =
|
1778
|
-
a && (a.contains(document.activeElement) ||
|
1777
|
+
let a = y.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1778
|
+
a && (a.contains(document.activeElement) || j(a), Ce() === "keyboard" && Je(a, {
|
1779
1779
|
containingElement: n.current
|
1780
1780
|
}));
|
1781
1781
|
}
|
1782
1782
|
}
|
1783
|
-
},
|
1783
|
+
}, M = (f) => {
|
1784
1784
|
f.currentTarget.contains(f.relatedTarget) || e.setFocused(!1);
|
1785
1785
|
};
|
1786
|
-
const
|
1787
|
-
|
1788
|
-
if (
|
1786
|
+
const I = x(i);
|
1787
|
+
O(() => {
|
1788
|
+
if (I.current) {
|
1789
1789
|
let f = null;
|
1790
1790
|
i === "first" && (f = r.getFirstKey()), i === "last" && (f = r.getLastKey());
|
1791
|
-
let
|
1792
|
-
if (
|
1793
|
-
for (let K of
|
1791
|
+
let u = e.selectedKeys;
|
1792
|
+
if (u.size) {
|
1793
|
+
for (let K of u) if (e.canSelectItem(K)) {
|
1794
1794
|
f = K;
|
1795
1795
|
break;
|
1796
1796
|
}
|
1797
1797
|
}
|
1798
|
-
e.setFocused(!0), e.setFocusedKey(f), f == null && !g &&
|
1798
|
+
e.setFocused(!0), e.setFocusedKey(f), f == null && !g && De(n.current);
|
1799
1799
|
}
|
1800
1800
|
}, []);
|
1801
|
-
let
|
1802
|
-
|
1803
|
-
let f =
|
1804
|
-
if (e.isFocused && e.focusedKey != null && (
|
1805
|
-
let
|
1806
|
-
|
1801
|
+
let D = x(e.focusedKey);
|
1802
|
+
O(() => {
|
1803
|
+
let f = Ce();
|
1804
|
+
if (e.isFocused && e.focusedKey != null && (y != null && y.current)) {
|
1805
|
+
let u = y.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1806
|
+
u && (f === "keyboard" || I.current) && (h || wt(y.current, u), f !== "virtual" && Je(u, {
|
1807
1807
|
containingElement: n.current
|
1808
1808
|
}));
|
1809
1809
|
}
|
1810
|
-
e.isFocused && e.focusedKey == null &&
|
1810
|
+
e.isFocused && e.focusedKey == null && D.current != null && De(n.current), D.current = e.focusedKey, I.current = !1;
|
1811
1811
|
}, [
|
1812
1812
|
h,
|
1813
|
-
|
1813
|
+
y,
|
1814
1814
|
e.focusedKey,
|
1815
1815
|
e.isFocused,
|
1816
1816
|
n
|
1817
1817
|
]);
|
1818
|
-
let
|
1819
|
-
onKeyDown:
|
1820
|
-
onFocus:
|
1821
|
-
onBlur:
|
1818
|
+
let U = {
|
1819
|
+
onKeyDown: L,
|
1820
|
+
onFocus: _,
|
1821
|
+
onBlur: M,
|
1822
1822
|
onMouseDown(f) {
|
1823
|
-
|
1823
|
+
y.current === f.target && f.preventDefault();
|
1824
1824
|
}
|
1825
|
-
}, { typeSelectProps: l } =
|
1825
|
+
}, { typeSelectProps: l } = Or({
|
1826
1826
|
keyboardDelegate: r,
|
1827
1827
|
selectionManager: e
|
1828
1828
|
});
|
1829
|
-
|
1829
|
+
v || (U = G(l, U));
|
1830
1830
|
let $;
|
1831
1831
|
return g || ($ = e.focusedKey == null ? 0 : -1), {
|
1832
1832
|
collectionProps: {
|
1833
|
-
...
|
1833
|
+
...U,
|
1834
1834
|
tabIndex: $
|
1835
1835
|
}
|
1836
1836
|
};
|
1837
1837
|
}
|
1838
1838
|
function pn(t) {
|
1839
|
-
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: o, focus: s, isDisabled:
|
1840
|
-
if (b.pointerType === "keyboard" &&
|
1839
|
+
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: o, focus: s, isDisabled: d, onAction: p, allowsDifferentPressOrigin: v, linkBehavior: g = "action" } = t, w = ze(), h = (b) => {
|
1840
|
+
if (b.pointerType === "keyboard" && Le(b)) e.toggleSelection(r);
|
1841
1841
|
else {
|
1842
1842
|
if (e.selectionMode === "none") return;
|
1843
1843
|
if (e.isLink(r)) {
|
1844
1844
|
if (g === "selection") {
|
1845
|
-
let
|
1846
|
-
|
1845
|
+
let H = e.getItemProps(r);
|
1846
|
+
w.open(n.current, b, H.href, H.routerOptions), e.setSelectedKeys(e.selectedKeys);
|
1847
1847
|
return;
|
1848
1848
|
} else if (g === "override" || g === "none") return;
|
1849
1849
|
}
|
1850
1850
|
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (ie(b) || b.pointerType === "touch" || b.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
|
1851
1851
|
}
|
1852
1852
|
};
|
1853
|
-
|
1854
|
-
r === e.focusedKey && e.isFocused && !o && (s ? s() : document.activeElement !== n.current &&
|
1853
|
+
O(() => {
|
1854
|
+
r === e.focusedKey && e.isFocused && !o && (s ? s() : document.activeElement !== n.current && De(n.current));
|
1855
1855
|
}, [
|
1856
1856
|
n,
|
1857
1857
|
r,
|
@@ -1859,60 +1859,60 @@ function pn(t) {
|
|
1859
1859
|
e.childFocusStrategy,
|
1860
1860
|
e.isFocused,
|
1861
1861
|
o
|
1862
|
-
]),
|
1863
|
-
let
|
1864
|
-
!o && !
|
1862
|
+
]), d = d || e.isDisabled(r);
|
1863
|
+
let y = {};
|
1864
|
+
!o && !d ? y = {
|
1865
1865
|
tabIndex: r === e.focusedKey ? 0 : -1,
|
1866
1866
|
onFocus(b) {
|
1867
1867
|
b.target === n.current && e.setFocusedKey(r);
|
1868
1868
|
}
|
1869
|
-
} :
|
1869
|
+
} : d && (y.onMouseDown = (b) => {
|
1870
1870
|
b.preventDefault();
|
1871
1871
|
});
|
1872
|
-
let
|
1872
|
+
let k = e.isLink(r) && g === "override", S = e.isLink(r) && g !== "selection" && g !== "none", T = !d && e.canSelectItem(r) && !k, L = (p || S) && !d, E = L && (e.selectionBehavior === "replace" ? !T : !T || e.isEmpty), _ = L && T && e.selectionBehavior === "replace", M = E || _, I = x(null), D = M && T, U = x(!1), l = x(!1), $ = (b) => {
|
1873
1873
|
if (p && p(), S) {
|
1874
|
-
let
|
1875
|
-
|
1874
|
+
let H = e.getItemProps(r);
|
1875
|
+
w.open(n.current, b, H.href, H.routerOptions);
|
1876
1876
|
}
|
1877
1877
|
}, f = {};
|
1878
1878
|
i ? (f.onPressStart = (b) => {
|
1879
|
-
|
1880
|
-
},
|
1881
|
-
b.pointerType !== "keyboard" &&
|
1882
|
-
}, f.onPress =
|
1883
|
-
if (
|
1879
|
+
I.current = b.pointerType, U.current = D, b.pointerType === "keyboard" && (!M || st()) && h(b);
|
1880
|
+
}, v ? (f.onPressUp = E ? null : (b) => {
|
1881
|
+
b.pointerType !== "keyboard" && T && h(b);
|
1882
|
+
}, f.onPress = E ? $ : null) : f.onPress = (b) => {
|
1883
|
+
if (E || _ && b.pointerType !== "mouse") {
|
1884
1884
|
if (b.pointerType === "keyboard" && !ot()) return;
|
1885
1885
|
$(b);
|
1886
|
-
} else b.pointerType !== "keyboard" &&
|
1886
|
+
} else b.pointerType !== "keyboard" && T && h(b);
|
1887
1887
|
}) : (f.onPressStart = (b) => {
|
1888
|
-
|
1888
|
+
I.current = b.pointerType, U.current = D, l.current = E, T && (b.pointerType === "mouse" && !E || b.pointerType === "keyboard" && (!L || st())) && h(b);
|
1889
1889
|
}, f.onPress = (b) => {
|
1890
|
-
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" &&
|
1891
|
-
}),
|
1892
|
-
let { pressProps:
|
1893
|
-
|
1890
|
+
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" && M && ot() || b.pointerType === "mouse" && l.current) && (M ? $(b) : T && h(b));
|
1891
|
+
}), y["data-key"] = r, f.preventFocusOnPress = o;
|
1892
|
+
let { pressProps: u, isPressed: K } = _t(f), a = _ ? (b) => {
|
1893
|
+
I.current === "mouse" && (b.stopPropagation(), b.preventDefault(), $(b));
|
1894
1894
|
} : void 0, { longPressProps: c } = Qr({
|
1895
|
-
isDisabled: !
|
1895
|
+
isDisabled: !D,
|
1896
1896
|
onLongPress(b) {
|
1897
1897
|
b.pointerType === "touch" && (h(b), e.setSelectionBehavior("toggle"));
|
1898
1898
|
}
|
1899
1899
|
}), P = (b) => {
|
1900
|
-
|
1901
|
-
},
|
1900
|
+
I.current === "touch" && U.current && b.preventDefault();
|
1901
|
+
}, A = e.isLink(r) ? (b) => {
|
1902
1902
|
Z.isOpening || b.preventDefault();
|
1903
1903
|
} : void 0;
|
1904
1904
|
return {
|
1905
|
-
itemProps:
|
1905
|
+
itemProps: G(y, T || E ? u : {}, D ? c : {}, {
|
1906
1906
|
onDoubleClick: a,
|
1907
1907
|
onDragStartCapture: P,
|
1908
|
-
onClick:
|
1908
|
+
onClick: A
|
1909
1909
|
}),
|
1910
1910
|
isPressed: K,
|
1911
1911
|
isSelected: e.isSelected(r),
|
1912
1912
|
isFocused: e.isFocused && e.focusedKey === r,
|
1913
|
-
isDisabled:
|
1914
|
-
allowsSelection:
|
1915
|
-
hasAction:
|
1913
|
+
isDisabled: d,
|
1914
|
+
allowsSelection: T,
|
1915
|
+
hasAction: M
|
1916
1916
|
};
|
1917
1917
|
}
|
1918
1918
|
function ot() {
|
@@ -1924,33 +1924,33 @@ function st() {
|
|
1924
1924
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
1925
1925
|
}
|
1926
1926
|
function bn(t, e, r) {
|
1927
|
-
let { key: n, isDisabled: i, shouldSelectOnPressUp: o } = t, { selectionManager: s, selectedKey:
|
1927
|
+
let { key: n, isDisabled: i, shouldSelectOnPressUp: o } = t, { selectionManager: s, selectedKey: d } = e, p = n === d, v = i || e.isDisabled || e.selectionManager.isDisabled(n), { itemProps: g, isPressed: w } = pn({
|
1928
1928
|
selectionManager: s,
|
1929
1929
|
key: n,
|
1930
1930
|
ref: r,
|
1931
|
-
isDisabled:
|
1931
|
+
isDisabled: v,
|
1932
1932
|
shouldSelectOnPressUp: o,
|
1933
1933
|
linkBehavior: "selection"
|
1934
|
-
}), h = ge(e, n, "tab"),
|
1934
|
+
}), h = ge(e, n, "tab"), y = ge(e, n, "tabpanel"), { tabIndex: k } = g, S = e.collection.getItem(n), T = yr(S == null ? void 0 : S.props, {
|
1935
1935
|
labelable: !0
|
1936
1936
|
});
|
1937
|
-
delete
|
1938
|
-
let
|
1937
|
+
delete T.id;
|
1938
|
+
let L = xr(S == null ? void 0 : S.props);
|
1939
1939
|
return {
|
1940
|
-
tabProps:
|
1940
|
+
tabProps: G(T, L, g, {
|
1941
1941
|
id: h,
|
1942
1942
|
"aria-selected": p,
|
1943
|
-
"aria-disabled":
|
1944
|
-
"aria-controls": p ?
|
1945
|
-
tabIndex:
|
1943
|
+
"aria-disabled": v || void 0,
|
1944
|
+
"aria-controls": p ? y : void 0,
|
1945
|
+
tabIndex: v ? void 0 : k,
|
1946
1946
|
role: "tab"
|
1947
1947
|
}),
|
1948
1948
|
isSelected: p,
|
1949
|
-
isDisabled:
|
1950
|
-
isPressed:
|
1949
|
+
isDisabled: v,
|
1950
|
+
isPressed: w
|
1951
1951
|
};
|
1952
1952
|
}
|
1953
|
-
function
|
1953
|
+
function vn(t, e, r) {
|
1954
1954
|
let n = ln(r) ? void 0 : 0;
|
1955
1955
|
var i;
|
1956
1956
|
const o = ge(e, (i = t.id) !== null && i !== void 0 ? i : e == null ? void 0 : e.selectedKey, "tabpanel"), s = St({
|
@@ -1959,7 +1959,7 @@ function yn(t, e, r) {
|
|
1959
1959
|
"aria-labelledby": ge(e, e == null ? void 0 : e.selectedKey, "tab")
|
1960
1960
|
});
|
1961
1961
|
return {
|
1962
|
-
tabPanelProps:
|
1962
|
+
tabPanelProps: G(s, {
|
1963
1963
|
tabIndex: n,
|
1964
1964
|
role: "tabpanel",
|
1965
1965
|
"aria-describedby": t["aria-describedby"],
|
@@ -1967,7 +1967,7 @@ function yn(t, e, r) {
|
|
1967
1967
|
})
|
1968
1968
|
};
|
1969
1969
|
}
|
1970
|
-
class
|
1970
|
+
class yn {
|
1971
1971
|
getKeyLeftOf(e) {
|
1972
1972
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
1973
1973
|
}
|
@@ -2009,28 +2009,28 @@ class vn {
|
|
2009
2009
|
}
|
2010
2010
|
}
|
2011
2011
|
function gn(t, e, r) {
|
2012
|
-
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: o, selectionManager: s, disabledKeys:
|
2012
|
+
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: o, selectionManager: s, disabledKeys: d } = e, { direction: p } = Ft(), v = V(() => new yn(o, p, n, d), [
|
2013
2013
|
o,
|
2014
|
-
|
2014
|
+
d,
|
2015
2015
|
n,
|
2016
2016
|
p
|
2017
2017
|
]), { collectionProps: g } = fn({
|
2018
2018
|
ref: r,
|
2019
2019
|
selectionManager: s,
|
2020
|
-
keyboardDelegate:
|
2020
|
+
keyboardDelegate: v,
|
2021
2021
|
selectOnFocus: i === "automatic",
|
2022
2022
|
disallowEmptySelection: !0,
|
2023
2023
|
scrollRef: r,
|
2024
2024
|
linkBehavior: "selection"
|
2025
|
-
}),
|
2026
|
-
ft.set(e,
|
2025
|
+
}), w = vt();
|
2026
|
+
ft.set(e, w);
|
2027
2027
|
let h = St({
|
2028
2028
|
...t,
|
2029
|
-
id:
|
2029
|
+
id: w
|
2030
2030
|
});
|
2031
2031
|
return {
|
2032
2032
|
tabListProps: {
|
2033
|
-
...
|
2033
|
+
...G(g, h),
|
2034
2034
|
role: "tablist",
|
2035
2035
|
"aria-orientation": n,
|
2036
2036
|
tabIndex: void 0
|
@@ -2073,53 +2073,53 @@ var $n = (t, e, r) => {
|
|
2073
2073
|
return !1;
|
2074
2074
|
}
|
2075
2075
|
return !0;
|
2076
|
-
},
|
2076
|
+
}, He = (t) => (e) => {
|
2077
2077
|
var r = t.defaultClassName, n = ct(ct({}, t.defaultVariants), e);
|
2078
2078
|
for (var i in n) {
|
2079
2079
|
var o, s = (o = n[i]) !== null && o !== void 0 ? o : t.defaultVariants[i];
|
2080
2080
|
if (s != null) {
|
2081
|
-
var
|
2082
|
-
typeof
|
2081
|
+
var d = s;
|
2082
|
+
typeof d == "boolean" && (d = d === !0 ? "true" : "false");
|
2083
2083
|
var p = (
|
2084
2084
|
// @ts-expect-error
|
2085
|
-
t.variantClassNames[i][
|
2085
|
+
t.variantClassNames[i][d]
|
2086
2086
|
);
|
2087
2087
|
p && (r += " " + p);
|
2088
2088
|
}
|
2089
2089
|
}
|
2090
|
-
for (var [
|
2091
|
-
$n(
|
2090
|
+
for (var [v, g] of t.compoundVariants)
|
2091
|
+
$n(v, n, t.defaultVariants) && (r += " " + g);
|
2092
2092
|
return r;
|
2093
|
-
}, mn =
|
2094
|
-
function
|
2093
|
+
}, mn = He({ defaultClassName: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzd"]] }), Kn = He({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_17_2__hash_kz6kzzk"]] });
|
2094
|
+
function Ot({
|
2095
2095
|
context: t,
|
2096
2096
|
item: e,
|
2097
2097
|
state: r,
|
2098
2098
|
...n
|
2099
2099
|
}) {
|
2100
|
-
const { key: i } = e, o =
|
2101
|
-
className:
|
2100
|
+
const { key: i } = e, o = N.useRef(null), { tabProps: s } = bn({ key: i }, r, o), d = r.selectedKey === i, p = r.disabledKeys.has(i), v = jt(e.rendered, (g) => g.type.displayName === "SpsTag" || ce.isWoodlandComponent(g.type) && ce.get(g.type).name === "Tag" ? [{
|
2101
|
+
className: dt(g.props.className, Kn({ active: d, disabled: p, context: t }))
|
2102
2102
|
}] : [{}]);
|
2103
|
-
return /* @__PURE__ */
|
2103
|
+
return /* @__PURE__ */ N.createElement(
|
2104
2104
|
"div",
|
2105
2105
|
{
|
2106
2106
|
...s,
|
2107
2107
|
ref: o,
|
2108
|
-
className: mn({ active:
|
2108
|
+
className: mn({ active: d, disabled: p, context: t }),
|
2109
2109
|
...n
|
2110
2110
|
},
|
2111
|
-
|
2111
|
+
v
|
2112
2112
|
);
|
2113
2113
|
}
|
2114
|
-
ce.set(
|
2115
|
-
function
|
2114
|
+
ce.set(Ot, { name: "Tab" });
|
2115
|
+
function zt({
|
2116
2116
|
context: t,
|
2117
2117
|
"data-testid": e,
|
2118
2118
|
state: r,
|
2119
2119
|
...n
|
2120
2120
|
}) {
|
2121
|
-
const i =
|
2122
|
-
return /* @__PURE__ */
|
2121
|
+
const i = N.useRef(null), { tabPanelProps: o } = vn(n, r, i), s = t === "container" ? Vt : "div";
|
2122
|
+
return /* @__PURE__ */ N.createElement(
|
2123
2123
|
s,
|
2124
2124
|
{
|
2125
2125
|
...o,
|
@@ -2129,55 +2129,55 @@ function Nt({
|
|
2129
2129
|
r.selectedItem ? r.selectedItem.props.children : null
|
2130
2130
|
);
|
2131
2131
|
}
|
2132
|
-
ce.set(
|
2133
|
-
var Sn =
|
2134
|
-
function
|
2132
|
+
ce.set(zt, { name: "TabPanel" });
|
2133
|
+
var Sn = He({ defaultClassName: "pkg_sps-woodland_tabs__version_8_17_2__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_17_2__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_17_2__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
2134
|
+
function Nt({
|
2135
2135
|
className: t,
|
2136
2136
|
context: e = "navigation",
|
2137
2137
|
"data-testid": r,
|
2138
2138
|
...n
|
2139
2139
|
}) {
|
2140
|
-
const i = Qt(n), o =
|
2141
|
-
return /* @__PURE__ */
|
2140
|
+
const i = Qt(n), o = N.useRef(null), { tabListProps: s } = gn(n, i, o), d = Gt({ "data-testid": r });
|
2141
|
+
return /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement(
|
2142
2142
|
"div",
|
2143
2143
|
{
|
2144
2144
|
...s,
|
2145
2145
|
ref: o,
|
2146
|
-
className:
|
2146
|
+
className: dt(Sn({ context: e }), t),
|
2147
2147
|
"data-testid": r
|
2148
2148
|
},
|
2149
|
-
[...i.collection].map((p) => /* @__PURE__ */
|
2150
|
-
|
2149
|
+
[...i.collection].map((p) => /* @__PURE__ */ N.createElement(
|
2150
|
+
Ot,
|
2151
2151
|
{
|
2152
2152
|
key: p.key,
|
2153
2153
|
item: p,
|
2154
2154
|
state: i,
|
2155
2155
|
context: e,
|
2156
|
-
...
|
2156
|
+
...d(`tab-${String(p.key)}`)
|
2157
2157
|
}
|
2158
2158
|
))
|
2159
|
-
), /* @__PURE__ */
|
2160
|
-
|
2159
|
+
), /* @__PURE__ */ N.createElement(
|
2160
|
+
zt,
|
2161
2161
|
{
|
2162
2162
|
key: i.selectedItem ? i.selectedItem.key : null,
|
2163
2163
|
state: i,
|
2164
2164
|
context: e,
|
2165
|
-
...
|
2165
|
+
...d("tab-panel")
|
2166
2166
|
}
|
2167
2167
|
));
|
2168
2168
|
}
|
2169
|
-
ce.set(
|
2170
|
-
const
|
2171
|
-
components: [
|
2169
|
+
ce.set(Nt, { name: "Tabs" });
|
2170
|
+
const wn = {
|
2171
|
+
components: [Nt],
|
2172
2172
|
examples: {
|
2173
2173
|
basic: {
|
2174
2174
|
label: "Basic Navigation Tabs",
|
2175
|
-
description:
|
2175
|
+
description: je`
|
2176
2176
|
<p>Navigation tabs</p>
|
2177
2177
|
`,
|
2178
2178
|
examples: {
|
2179
2179
|
basic: {
|
2180
|
-
react:
|
2180
|
+
react: je`
|
2181
2181
|
import { Item } from "@react-stately/collections";
|
2182
2182
|
import { Box, Icon } from "@sps-woodland/core";
|
2183
2183
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -2243,10 +2243,10 @@ const Tn = {
|
|
2243
2243
|
}
|
2244
2244
|
}
|
2245
2245
|
}
|
2246
|
-
},
|
2247
|
-
"Tabbed Navigation":
|
2246
|
+
}, kn = {
|
2247
|
+
"Tabbed Navigation": wn
|
2248
2248
|
};
|
2249
2249
|
export {
|
2250
|
-
|
2251
|
-
|
2250
|
+
kn as MANIFEST,
|
2251
|
+
Nt as Tabs
|
2252
2252
|
};
|