@sps-woodland/tabs 8.20.8 → 8.20.10
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 +937 -908
- package/lib/style.css +1 -1
- package/package.json +5 -5
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
|
6
|
-
import { code as
|
7
|
-
class
|
1
|
+
import * as R from "react";
|
2
|
+
import U, { useState as B, useRef as L, useEffect as O, useCallback as Z, useMemo as V, useContext as ce, createContext as Xt } from "react";
|
3
|
+
import { compareNodeOrder as _e, getFirstItem as Yt, getChildNodes as qt, useCollection as Jt } from "@react-stately/collections";
|
4
|
+
import { flushSync as Zt } from "react-dom";
|
5
|
+
import { Metadata as fe, modChildren as Qt, cl as yt, Content as er, useChildTestIdAttrBuilder as tr } from "@sps-woodland/core";
|
6
|
+
import { code as Je } from "@spscommerce/utils";
|
7
|
+
class Ze {
|
8
8
|
*[Symbol.iterator]() {
|
9
9
|
yield* this.iterable;
|
10
10
|
}
|
@@ -16,11 +16,13 @@ class Xe {
|
|
16
16
|
}
|
17
17
|
getKeyBefore(e) {
|
18
18
|
let r = this.keyMap.get(e);
|
19
|
-
|
19
|
+
var n;
|
20
|
+
return r && (n = r.prevKey) !== null && n !== void 0 ? n : null;
|
20
21
|
}
|
21
22
|
getKeyAfter(e) {
|
22
23
|
let r = this.keyMap.get(e);
|
23
|
-
|
24
|
+
var n;
|
25
|
+
return r && (n = r.nextKey) !== null && n !== void 0 ? n : null;
|
24
26
|
}
|
25
27
|
getFirstKey() {
|
26
28
|
return this.firstKey;
|
@@ -29,7 +31,8 @@ class Xe {
|
|
29
31
|
return this.lastKey;
|
30
32
|
}
|
31
33
|
getItem(e) {
|
32
|
-
|
34
|
+
var r;
|
35
|
+
return (r = this.keyMap.get(e)) !== null && r !== void 0 ? r : null;
|
33
36
|
}
|
34
37
|
at(e) {
|
35
38
|
const r = [
|
@@ -42,64 +45,65 @@ class Xe {
|
|
42
45
|
return (r == null ? void 0 : r.childNodes) || [];
|
43
46
|
}
|
44
47
|
constructor(e) {
|
45
|
-
this.keyMap = /* @__PURE__ */ new Map(), this.iterable = e;
|
48
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
|
46
49
|
let r = (o) => {
|
47
|
-
if (this.keyMap.set(o.key, o), o.childNodes && o.type === "section") for (let
|
50
|
+
if (this.keyMap.set(o.key, o), o.childNodes && o.type === "section") for (let a of o.childNodes) r(a);
|
48
51
|
};
|
49
52
|
for (let o of e) r(o);
|
50
|
-
let n, i = 0;
|
51
|
-
for (let [o,
|
52
|
-
n ? (n.nextKey = o,
|
53
|
-
|
53
|
+
let n = null, i = 0;
|
54
|
+
for (let [o, a] of this.keyMap)
|
55
|
+
n ? (n.nextKey = o, a.prevKey = n.key) : (this.firstKey = o, a.prevKey = void 0), a.type === "item" && (a.index = i++), n = a, n.nextKey = void 0;
|
56
|
+
var s;
|
57
|
+
this.lastKey = (s = n == null ? void 0 : n.key) !== null && s !== void 0 ? s : null;
|
54
58
|
}
|
55
59
|
}
|
56
|
-
class
|
60
|
+
class N extends Set {
|
57
61
|
constructor(e, r, n) {
|
58
|
-
super(e), e instanceof
|
62
|
+
super(e), e instanceof N ? (this.anchorKey = r ?? e.anchorKey, this.currentKey = n ?? e.currentKey) : (this.anchorKey = r, this.currentKey = n);
|
59
63
|
}
|
60
64
|
}
|
61
|
-
function
|
62
|
-
let [n, i] = B(t || e),
|
65
|
+
function gt(t, e, r) {
|
66
|
+
let [n, i] = B(t || e), s = L(t !== void 0), o = t !== void 0;
|
63
67
|
O(() => {
|
64
|
-
let
|
65
|
-
|
68
|
+
let h = s.current;
|
69
|
+
h !== o && console.warn(`WARN: A component changed from ${h ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}.`), s.current = o;
|
66
70
|
}, [
|
67
|
-
|
71
|
+
o
|
68
72
|
]);
|
69
|
-
let
|
70
|
-
let
|
71
|
-
r && (Object.is(
|
73
|
+
let a = o ? t : n, p = Z((h, ...v) => {
|
74
|
+
let w = ($, ...m) => {
|
75
|
+
r && (Object.is(a, $) || r($, ...m)), o || (a = $);
|
72
76
|
};
|
73
|
-
typeof
|
74
|
-
let
|
75
|
-
return
|
76
|
-
})) : (
|
77
|
+
typeof h == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((m, ...M) => {
|
78
|
+
let k = h(o ? a : m, ...M);
|
79
|
+
return w(k, ...v), o ? m : k;
|
80
|
+
})) : (o || i(h), w(h, ...v));
|
77
81
|
}, [
|
78
|
-
|
79
|
-
|
82
|
+
o,
|
83
|
+
a,
|
80
84
|
r
|
81
85
|
]);
|
82
86
|
return [
|
83
|
-
|
84
|
-
|
87
|
+
a,
|
88
|
+
p
|
85
89
|
];
|
86
90
|
}
|
87
|
-
function
|
91
|
+
function rr(t, e) {
|
88
92
|
if (t.size !== e.size) return !1;
|
89
93
|
for (let r of t)
|
90
94
|
if (!e.has(r)) return !1;
|
91
95
|
return !0;
|
92
96
|
}
|
93
|
-
function
|
94
|
-
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior:
|
97
|
+
function nr(t) {
|
98
|
+
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: s = "all" } = t, o = L(!1), [, a] = B(!1), p = L(null), h = L(null), [, v] = B(null), w = V(() => Qe(t.selectedKeys), [
|
95
99
|
t.selectedKeys
|
96
|
-
]),
|
100
|
+
]), $ = V(() => Qe(t.defaultSelectedKeys, new N()), [
|
97
101
|
t.defaultSelectedKeys
|
98
|
-
]), [
|
102
|
+
]), [m, M] = gt(w, $, t.onSelectionChange), k = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
99
103
|
t.disabledKeys
|
100
|
-
]), [
|
101
|
-
i === "replace" &&
|
102
|
-
let x =
|
104
|
+
]), [P, E] = B(i);
|
105
|
+
i === "replace" && P === "toggle" && typeof m == "object" && m.size === 0 && E("replace");
|
106
|
+
let x = L(i);
|
103
107
|
return O(() => {
|
104
108
|
i !== x.current && (E(i), x.current = i);
|
105
109
|
}, [
|
@@ -107,35 +111,35 @@ function Zt(t) {
|
|
107
111
|
]), {
|
108
112
|
selectionMode: e,
|
109
113
|
disallowEmptySelection: r,
|
110
|
-
selectionBehavior:
|
114
|
+
selectionBehavior: P,
|
111
115
|
setSelectionBehavior: E,
|
112
116
|
get isFocused() {
|
113
|
-
return
|
117
|
+
return o.current;
|
114
118
|
},
|
115
|
-
setFocused(
|
116
|
-
|
119
|
+
setFocused(K) {
|
120
|
+
o.current = K, a(K);
|
117
121
|
},
|
118
122
|
get focusedKey() {
|
119
|
-
return
|
123
|
+
return p.current;
|
120
124
|
},
|
121
125
|
get childFocusStrategy() {
|
122
|
-
return
|
126
|
+
return h.current;
|
123
127
|
},
|
124
|
-
setFocusedKey(
|
125
|
-
|
128
|
+
setFocusedKey(K, D = "first") {
|
129
|
+
p.current = K, h.current = D, v(K);
|
126
130
|
},
|
127
|
-
selectedKeys:
|
128
|
-
setSelectedKeys(
|
129
|
-
(n || !
|
131
|
+
selectedKeys: m,
|
132
|
+
setSelectedKeys(K) {
|
133
|
+
(n || !rr(K, m)) && M(K);
|
130
134
|
},
|
131
|
-
disabledKeys:
|
132
|
-
disabledBehavior:
|
135
|
+
disabledKeys: k,
|
136
|
+
disabledBehavior: s
|
133
137
|
};
|
134
138
|
}
|
135
|
-
function
|
136
|
-
return t ? t === "all" ? "all" : new
|
139
|
+
function Qe(t, e) {
|
140
|
+
return t ? t === "all" ? "all" : new N(t) : e;
|
137
141
|
}
|
138
|
-
class
|
142
|
+
class ir {
|
139
143
|
/**
|
140
144
|
* The type of selection that is allowed in the collection.
|
141
145
|
*/
|
@@ -227,7 +231,7 @@ class Qt {
|
|
227
231
|
let e = null;
|
228
232
|
for (let r of this.state.selectedKeys) {
|
229
233
|
let n = this.collection.getItem(r);
|
230
|
-
(!e || n &&
|
234
|
+
(!e || n && _e(this.collection, n, e) < 0) && (e = n);
|
231
235
|
}
|
232
236
|
return e == null ? void 0 : e.key;
|
233
237
|
}
|
@@ -235,7 +239,7 @@ class Qt {
|
|
235
239
|
let e = null;
|
236
240
|
for (let r of this.state.selectedKeys) {
|
237
241
|
let n = this.collection.getItem(r);
|
238
|
-
(!e || n &&
|
242
|
+
(!e || n && _e(this.collection, n, e) > 0) && (e = n);
|
239
243
|
}
|
240
244
|
return e == null ? void 0 : e.key;
|
241
245
|
}
|
@@ -256,27 +260,32 @@ class Qt {
|
|
256
260
|
}
|
257
261
|
e = this.getKey(e);
|
258
262
|
let r;
|
259
|
-
if (this.state.selectedKeys === "all") r = new
|
263
|
+
if (this.state.selectedKeys === "all") r = new N([
|
260
264
|
e
|
261
265
|
], e, e);
|
262
266
|
else {
|
263
|
-
let
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
+
let s = this.state.selectedKeys;
|
268
|
+
var n;
|
269
|
+
let o = (n = s.anchorKey) !== null && n !== void 0 ? n : e;
|
270
|
+
r = new N(s, o, e);
|
271
|
+
var i;
|
272
|
+
for (let a of this.getKeyRange(o, (i = s.currentKey) !== null && i !== void 0 ? i : e)) r.delete(a);
|
273
|
+
for (let a of this.getKeyRange(e, o)) this.canSelectItem(a) && r.add(a);
|
267
274
|
}
|
268
275
|
this.state.setSelectedKeys(r);
|
269
276
|
}
|
270
277
|
getKeyRange(e, r) {
|
271
278
|
let n = this.collection.getItem(e), i = this.collection.getItem(r);
|
272
|
-
return n && i ?
|
279
|
+
return n && i ? _e(this.collection, n, i) <= 0 ? this.getKeyRangeInternal(e, r) : this.getKeyRangeInternal(r, e) : [];
|
273
280
|
}
|
274
281
|
getKeyRangeInternal(e, r) {
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
282
|
+
var n;
|
283
|
+
if (!((n = this.layoutDelegate) === null || n === void 0) && n.getKeyRange) return this.layoutDelegate.getKeyRange(e, r);
|
284
|
+
let i = [], s = e;
|
285
|
+
for (; s != null; ) {
|
286
|
+
let o = this.collection.getItem(s);
|
287
|
+
if ((o && o.type === "item" || o.type === "cell" && this.allowsCellSelection) && i.push(s), s === r) return i;
|
288
|
+
s = this.collection.getKeyAfter(s);
|
280
289
|
}
|
281
290
|
return [];
|
282
291
|
}
|
@@ -296,7 +305,7 @@ class Qt {
|
|
296
305
|
return;
|
297
306
|
}
|
298
307
|
if (e = this.getKey(e), e == null) return;
|
299
|
-
let r = new
|
308
|
+
let r = new N(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
300
309
|
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
310
|
}
|
302
311
|
/**
|
@@ -304,9 +313,9 @@ class Qt {
|
|
304
313
|
*/
|
305
314
|
replaceSelection(e) {
|
306
315
|
if (this.selectionMode === "none" || (e = this.getKey(e), e == null)) return;
|
307
|
-
let r = this.canSelectItem(e) ? new
|
316
|
+
let r = this.canSelectItem(e) ? new N([
|
308
317
|
e
|
309
|
-
], e, e) : new
|
318
|
+
], e, e) : new N();
|
310
319
|
this.state.setSelectedKeys(r);
|
311
320
|
}
|
312
321
|
/**
|
@@ -314,7 +323,7 @@ class Qt {
|
|
314
323
|
*/
|
315
324
|
setSelectedKeys(e) {
|
316
325
|
if (this.selectionMode === "none") return;
|
317
|
-
let r = new
|
326
|
+
let r = new N();
|
318
327
|
for (let n of e)
|
319
328
|
if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
|
320
329
|
break;
|
@@ -325,7 +334,7 @@ class Qt {
|
|
325
334
|
for (; n != null; ) {
|
326
335
|
if (this.canSelectItem(n)) {
|
327
336
|
let i = this.collection.getItem(n);
|
328
|
-
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(
|
337
|
+
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Yt(qt(i, this.collection)).key);
|
329
338
|
}
|
330
339
|
n = this.collection.getKeyAfter(n);
|
331
340
|
}
|
@@ -342,7 +351,7 @@ class Qt {
|
|
342
351
|
* Removes all keys from the selection.
|
343
352
|
*/
|
344
353
|
clearSelection() {
|
345
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
354
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new N());
|
346
355
|
}
|
347
356
|
/**
|
348
357
|
* Toggles between select all and an empty selection.
|
@@ -387,244 +396,261 @@ class Qt {
|
|
387
396
|
constructor(e, r, n) {
|
388
397
|
this.collection = e, this.state = r;
|
389
398
|
var i;
|
390
|
-
this.allowsCellSelection = (i = n == null ? void 0 : n.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null;
|
399
|
+
this.allowsCellSelection = (i = n == null ? void 0 : n.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = (n == null ? void 0 : n.layoutDelegate) || null;
|
391
400
|
}
|
392
401
|
}
|
393
|
-
function
|
394
|
-
let { filter: e } = t,
|
402
|
+
function lr(t) {
|
403
|
+
let { filter: e, layoutDelegate: r } = t, n = nr(t), i = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
395
404
|
t.disabledKeys
|
396
|
-
]),
|
405
|
+
]), s = Z((v) => e ? new Ze(e(v)) : new Ze(v), [
|
397
406
|
e
|
398
407
|
]), o = V(() => ({
|
399
408
|
suppressTextValueWarning: t.suppressTextValueWarning
|
400
409
|
}), [
|
401
410
|
t.suppressTextValueWarning
|
402
|
-
]),
|
403
|
-
|
411
|
+
]), a = Jt(t, s, o), p = V(() => new ir(a, n, {
|
412
|
+
layoutDelegate: r
|
413
|
+
}), [
|
414
|
+
a,
|
415
|
+
n,
|
404
416
|
r
|
405
417
|
]);
|
406
|
-
const
|
418
|
+
const h = L(null);
|
407
419
|
return O(() => {
|
408
|
-
if (
|
409
|
-
const
|
410
|
-
...
|
411
|
-
].map((
|
412
|
-
const
|
413
|
-
return
|
414
|
-
}).filter((
|
415
|
-
...
|
416
|
-
].map((
|
417
|
-
const
|
418
|
-
return
|
419
|
-
}).filter((
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
420
|
+
if (n.focusedKey != null && !a.getItem(n.focusedKey) && h.current) {
|
421
|
+
const E = h.current.getItem(n.focusedKey), x = [
|
422
|
+
...h.current.getKeys()
|
423
|
+
].map((l) => {
|
424
|
+
const y = h.current.getItem(l);
|
425
|
+
return (y == null ? void 0 : y.type) === "item" ? y : null;
|
426
|
+
}).filter((l) => l !== null), K = [
|
427
|
+
...a.getKeys()
|
428
|
+
].map((l) => {
|
429
|
+
const y = a.getItem(l);
|
430
|
+
return (y == null ? void 0 : y.type) === "item" ? y : null;
|
431
|
+
}).filter((l) => l !== null);
|
432
|
+
var v, w;
|
433
|
+
const D = ((v = x == null ? void 0 : x.length) !== null && v !== void 0 ? v : 0) - ((w = K == null ? void 0 : K.length) !== null && w !== void 0 ? w : 0);
|
434
|
+
var $, m, M;
|
435
|
+
let _ = Math.min(D > 1 ? Math.max((($ = E == null ? void 0 : E.index) !== null && $ !== void 0 ? $ : 0) - D + 1, 0) : (m = E == null ? void 0 : E.index) !== null && m !== void 0 ? m : 0, ((M = K == null ? void 0 : K.length) !== null && M !== void 0 ? M : 0) - 1), C = null, F = !1;
|
436
|
+
for (; _ >= 0; ) {
|
437
|
+
if (!p.isDisabled(K[_].key)) {
|
438
|
+
C = K[_];
|
424
439
|
break;
|
425
440
|
}
|
426
|
-
|
441
|
+
if (_ < K.length - 1 && !F) _++;
|
442
|
+
else {
|
443
|
+
F = !0;
|
444
|
+
var k, P;
|
445
|
+
_ > ((k = E == null ? void 0 : E.index) !== null && k !== void 0 ? k : 0) && (_ = (P = E == null ? void 0 : E.index) !== null && P !== void 0 ? P : 0), _--;
|
446
|
+
}
|
427
447
|
}
|
428
|
-
|
448
|
+
n.setFocusedKey(C ? C.key : null);
|
429
449
|
}
|
430
|
-
|
450
|
+
h.current = a;
|
431
451
|
}, [
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
452
|
+
a,
|
453
|
+
p,
|
454
|
+
n,
|
455
|
+
n.focusedKey
|
436
456
|
]), {
|
437
|
-
collection:
|
438
|
-
disabledKeys:
|
439
|
-
selectionManager:
|
457
|
+
collection: a,
|
458
|
+
disabledKeys: i,
|
459
|
+
selectionManager: p
|
440
460
|
};
|
441
461
|
}
|
442
|
-
function
|
462
|
+
function or(t) {
|
443
463
|
var e;
|
444
|
-
let [r, n] =
|
464
|
+
let [r, n] = gt(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = V(() => r != null ? [
|
445
465
|
r
|
446
466
|
] : [], [
|
447
467
|
r
|
448
|
-
]), { collection:
|
468
|
+
]), { collection: s, disabledKeys: o, selectionManager: a } = lr({
|
449
469
|
...t,
|
450
470
|
selectionMode: "single",
|
451
471
|
disallowEmptySelection: !0,
|
452
472
|
allowDuplicateSelectionEvents: !0,
|
453
473
|
selectedKeys: i,
|
454
|
-
onSelectionChange: (
|
455
|
-
|
456
|
-
|
457
|
-
|
474
|
+
onSelectionChange: (h) => {
|
475
|
+
if (h === "all") return;
|
476
|
+
var v;
|
477
|
+
let w = (v = h.values().next().value) !== null && v !== void 0 ? v : null;
|
478
|
+
w === r && t.onSelectionChange && t.onSelectionChange(w), n(w);
|
458
479
|
}
|
459
|
-
}),
|
480
|
+
}), p = r != null ? s.getItem(r) : null;
|
460
481
|
return {
|
461
|
-
collection:
|
462
|
-
disabledKeys:
|
463
|
-
selectionManager:
|
482
|
+
collection: s,
|
483
|
+
disabledKeys: o,
|
484
|
+
selectionManager: a,
|
464
485
|
selectedKey: r,
|
465
486
|
setSelectedKey: n,
|
466
|
-
selectedItem:
|
487
|
+
selectedItem: p
|
467
488
|
};
|
468
489
|
}
|
469
|
-
function
|
490
|
+
function sr(t) {
|
470
491
|
var e;
|
471
|
-
let r =
|
492
|
+
let r = or({
|
472
493
|
...t,
|
473
494
|
suppressTextValueWarning: !0,
|
474
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
475
|
-
}), { selectionManager: n, collection: i, selectedKey:
|
495
|
+
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : et(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())
|
496
|
+
}), { selectionManager: n, collection: i, selectedKey: s } = r, o = L(s);
|
476
497
|
return O(() => {
|
477
|
-
let
|
478
|
-
(n.isEmpty || !i.getItem(
|
479
|
-
|
480
|
-
])), (
|
498
|
+
let a = s;
|
499
|
+
(n.isEmpty || !i.getItem(a)) && (a = et(i, r.disabledKeys), a != null && n.setSelectedKeys([
|
500
|
+
a
|
501
|
+
])), (a != null && n.focusedKey == null || !n.isFocused && a !== o.current) && n.setFocusedKey(a), o.current = a;
|
481
502
|
}), {
|
482
503
|
...r,
|
483
504
|
isDisabled: t.isDisabled || !1
|
484
505
|
};
|
485
506
|
}
|
486
|
-
function
|
507
|
+
function et(t, e) {
|
487
508
|
let r = null;
|
488
509
|
if (t) {
|
489
|
-
var n, i,
|
510
|
+
var n, i, s, o;
|
490
511
|
for (r = t.getFirstKey(); (e.has(r) || !((i = t.getItem(r)) === null || i === void 0 || (n = i.props) === null || n === void 0) && n.isDisabled) && r !== t.getLastKey(); ) r = t.getKeyAfter(r);
|
491
|
-
(e.has(r) || !((
|
512
|
+
(e.has(r) || !((o = t.getItem(r)) === null || o === void 0 || (s = o.props) === null || s === void 0) && s.isDisabled) && r === t.getLastKey() && (r = t.getFirstKey());
|
492
513
|
}
|
493
514
|
return r;
|
494
515
|
}
|
495
|
-
const
|
496
|
-
function
|
497
|
-
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${
|
516
|
+
const $t = /* @__PURE__ */ new WeakMap();
|
517
|
+
function me(t, e, r) {
|
518
|
+
return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${$t.get(t)}-${r}-${e}`) : "";
|
498
519
|
}
|
499
|
-
const
|
520
|
+
const pe = typeof document < "u" ? U.useLayoutEffect : () => {
|
500
521
|
};
|
501
|
-
function
|
502
|
-
const e =
|
503
|
-
return
|
522
|
+
function le(t) {
|
523
|
+
const e = L(null);
|
524
|
+
return pe(() => {
|
504
525
|
e.current = t;
|
505
526
|
}, [
|
506
527
|
t
|
507
|
-
]),
|
528
|
+
]), Z((...r) => {
|
508
529
|
const n = e.current;
|
509
530
|
return n == null ? void 0 : n(...r);
|
510
531
|
}, []);
|
511
532
|
}
|
512
|
-
const
|
533
|
+
const Ke = {
|
513
534
|
prefix: String(Math.round(Math.random() * 1e10)),
|
514
535
|
current: 0
|
515
|
-
},
|
516
|
-
let
|
517
|
-
function
|
518
|
-
let e =
|
536
|
+
}, mt = /* @__PURE__ */ U.createContext(Ke), ar = /* @__PURE__ */ U.createContext(!1);
|
537
|
+
let cr = !!(typeof window < "u" && window.document && window.document.createElement), Le = /* @__PURE__ */ new WeakMap();
|
538
|
+
function ur(t = !1) {
|
539
|
+
let e = ce(mt), r = L(null);
|
519
540
|
if (r.current === null && !t) {
|
520
541
|
var n, i;
|
521
|
-
let
|
522
|
-
if (
|
523
|
-
let
|
524
|
-
|
542
|
+
let s = (i = U.__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;
|
543
|
+
if (s) {
|
544
|
+
let o = Le.get(s);
|
545
|
+
o == null ? Le.set(s, {
|
525
546
|
id: e.current,
|
526
|
-
state:
|
527
|
-
}) :
|
547
|
+
state: s.memoizedState
|
548
|
+
}) : s.memoizedState !== o.state && (e.current = o.id, Le.delete(s));
|
528
549
|
}
|
529
550
|
r.current = ++e.current;
|
530
551
|
}
|
531
552
|
return r.current;
|
532
553
|
}
|
533
|
-
function
|
534
|
-
let e =
|
535
|
-
e ===
|
536
|
-
let r =
|
554
|
+
function dr(t) {
|
555
|
+
let e = ce(mt);
|
556
|
+
e === Ke && !cr && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
557
|
+
let r = ur(!!t), n = e === Ke && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
537
558
|
return t || `${n}-${r}`;
|
538
559
|
}
|
539
|
-
function
|
540
|
-
let e =
|
560
|
+
function fr(t) {
|
561
|
+
let e = U.useId(), [r] = B(Kt()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Ke.prefix}`;
|
541
562
|
return t || `${n}-${e}`;
|
542
563
|
}
|
543
|
-
const
|
544
|
-
function
|
564
|
+
const pr = typeof U.useId == "function" ? fr : dr;
|
565
|
+
function vr() {
|
545
566
|
return !1;
|
546
567
|
}
|
547
|
-
function
|
568
|
+
function br() {
|
548
569
|
return !0;
|
549
570
|
}
|
550
|
-
function
|
571
|
+
function hr(t) {
|
551
572
|
return () => {
|
552
573
|
};
|
553
574
|
}
|
554
|
-
function
|
555
|
-
return typeof
|
575
|
+
function Kt() {
|
576
|
+
return typeof U.useSyncExternalStore == "function" ? U.useSyncExternalStore(hr, vr, br) : ce(ar);
|
556
577
|
}
|
557
|
-
let
|
558
|
-
function
|
559
|
-
let [e, r] = B(t), n =
|
560
|
-
n.current =
|
578
|
+
let yr = !!(typeof window < "u" && window.document && window.document.createElement), Y = /* @__PURE__ */ new Map();
|
579
|
+
function St(t) {
|
580
|
+
let [e, r] = B(t), n = L(null), i = pr(e), s = Z((o) => {
|
581
|
+
n.current = o;
|
561
582
|
}, []);
|
562
|
-
return
|
563
|
-
|
583
|
+
return yr && (Y.has(i) && !Y.get(i).includes(s) ? Y.set(i, [
|
584
|
+
...Y.get(i),
|
585
|
+
s
|
586
|
+
]) : Y.set(i, [
|
587
|
+
s
|
588
|
+
])), pe(() => {
|
589
|
+
let o = i;
|
564
590
|
return () => {
|
565
|
-
|
591
|
+
Y.delete(o);
|
566
592
|
};
|
567
593
|
}, [
|
568
594
|
i
|
569
595
|
]), O(() => {
|
570
|
-
let
|
571
|
-
|
596
|
+
let o = n.current;
|
597
|
+
o && (n.current = null, r(o));
|
572
598
|
}), i;
|
573
599
|
}
|
574
|
-
function
|
600
|
+
function gr(t, e) {
|
575
601
|
if (t === e) return t;
|
576
|
-
let r =
|
602
|
+
let r = Y.get(t);
|
577
603
|
if (r)
|
578
|
-
return r(e), e;
|
579
|
-
let n =
|
580
|
-
return n ? (n(t), t) : e;
|
604
|
+
return r.forEach((i) => i(e)), e;
|
605
|
+
let n = Y.get(e);
|
606
|
+
return n ? (n.forEach((i) => i(t)), t) : e;
|
581
607
|
}
|
582
|
-
function
|
608
|
+
function Tt(...t) {
|
583
609
|
return (...e) => {
|
584
610
|
for (let r of t) typeof r == "function" && r(...e);
|
585
611
|
};
|
586
612
|
}
|
587
|
-
const
|
613
|
+
const A = (t) => {
|
588
614
|
var e;
|
589
615
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
590
|
-
},
|
591
|
-
function
|
616
|
+
}, Q = (t) => t && "window" in t && t.window === t ? t : A(t).defaultView || window;
|
617
|
+
function wt(t) {
|
592
618
|
var e, r, n = "";
|
593
619
|
if (typeof t == "string" || typeof t == "number") n += t;
|
594
620
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
595
621
|
var i = t.length;
|
596
|
-
for (e = 0; e < i; e++) t[e] && (r =
|
622
|
+
for (e = 0; e < i; e++) t[e] && (r = wt(t[e])) && (n && (n += " "), n += r);
|
597
623
|
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
598
624
|
return n;
|
599
625
|
}
|
600
|
-
function
|
601
|
-
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e =
|
626
|
+
function $r() {
|
627
|
+
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = wt(t)) && (n && (n += " "), n += e);
|
602
628
|
return n;
|
603
629
|
}
|
604
|
-
function
|
630
|
+
function q(...t) {
|
605
631
|
let e = {
|
606
632
|
...t[0]
|
607
633
|
};
|
608
634
|
for (let r = 1; r < t.length; r++) {
|
609
635
|
let n = t[r];
|
610
636
|
for (let i in n) {
|
611
|
-
let
|
612
|
-
typeof
|
637
|
+
let s = e[i], o = n[i];
|
638
|
+
typeof s == "function" && typeof o == "function" && // This is a lot faster than a regex.
|
613
639
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
614
640
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
615
|
-
90 ? e[i] =
|
641
|
+
90 ? e[i] = Tt(s, o) : (i === "className" || i === "UNSAFE_className") && typeof s == "string" && typeof o == "string" ? e[i] = $r(s, o) : i === "id" && s && o ? e.id = gr(s, o) : e[i] = o !== void 0 ? o : s;
|
616
642
|
}
|
617
643
|
}
|
618
644
|
return e;
|
619
645
|
}
|
620
|
-
const
|
646
|
+
const mr = /* @__PURE__ */ new Set([
|
621
647
|
"id"
|
622
|
-
]),
|
648
|
+
]), Kr = /* @__PURE__ */ new Set([
|
623
649
|
"aria-label",
|
624
650
|
"aria-labelledby",
|
625
651
|
"aria-describedby",
|
626
652
|
"aria-details"
|
627
|
-
]),
|
653
|
+
]), Sr = /* @__PURE__ */ new Set([
|
628
654
|
"href",
|
629
655
|
"hrefLang",
|
630
656
|
"target",
|
@@ -632,23 +658,23 @@ const vr = /* @__PURE__ */ new Set([
|
|
632
658
|
"download",
|
633
659
|
"ping",
|
634
660
|
"referrerPolicy"
|
635
|
-
]),
|
636
|
-
function
|
637
|
-
let { labelable: r, isLink: n, propNames: i } = e,
|
638
|
-
for (const
|
639
|
-
return
|
661
|
+
]), Tr = /^(data-.*)$/;
|
662
|
+
function wr(t, e = {}) {
|
663
|
+
let { labelable: r, isLink: n, propNames: i } = e, s = {};
|
664
|
+
for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (mr.has(o) || r && Kr.has(o) || n && Sr.has(o) || i != null && i.has(o) || Tr.test(o)) && (s[o] = t[o]);
|
665
|
+
return s;
|
640
666
|
}
|
641
667
|
function j(t) {
|
642
|
-
if (
|
668
|
+
if (Pr()) t.focus({
|
643
669
|
preventScroll: !0
|
644
670
|
});
|
645
671
|
else {
|
646
|
-
let e =
|
647
|
-
t.focus(),
|
672
|
+
let e = Er(t);
|
673
|
+
t.focus(), kr(e);
|
648
674
|
}
|
649
675
|
}
|
650
676
|
let be = null;
|
651
|
-
function
|
677
|
+
function Pr() {
|
652
678
|
if (be == null) {
|
653
679
|
be = !1;
|
654
680
|
try {
|
@@ -662,7 +688,7 @@ function mr() {
|
|
662
688
|
}
|
663
689
|
return be;
|
664
690
|
}
|
665
|
-
function
|
691
|
+
function Er(t) {
|
666
692
|
let e = t.parentNode, r = [], n = document.scrollingElement || document.documentElement;
|
667
693
|
for (; e instanceof HTMLElement && e !== n; )
|
668
694
|
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && r.push({
|
@@ -676,15 +702,15 @@ function Kr(t) {
|
|
676
702
|
scrollLeft: n.scrollLeft
|
677
703
|
}), r;
|
678
704
|
}
|
679
|
-
function
|
705
|
+
function kr(t) {
|
680
706
|
for (let { element: e, scrollTop: r, scrollLeft: n } of t)
|
681
707
|
e.scrollTop = r, e.scrollLeft = n;
|
682
708
|
}
|
683
|
-
function
|
709
|
+
function Te(t) {
|
684
710
|
var e;
|
685
711
|
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);
|
686
712
|
}
|
687
|
-
function
|
713
|
+
function Ue(t) {
|
688
714
|
var e;
|
689
715
|
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;
|
690
716
|
}
|
@@ -692,68 +718,70 @@ function G(t) {
|
|
692
718
|
let e = null;
|
693
719
|
return () => (e == null && (e = t()), e);
|
694
720
|
}
|
695
|
-
const
|
696
|
-
return
|
697
|
-
}),
|
698
|
-
return
|
699
|
-
}),
|
700
|
-
return
|
701
|
-
|
702
|
-
}),
|
703
|
-
return
|
704
|
-
}), Tr = G(function() {
|
705
|
-
return Q() || Ne();
|
706
|
-
}), Pr = G(function() {
|
707
|
-
return we(/AppleWebKit/i) && !_r();
|
721
|
+
const ee = G(function() {
|
722
|
+
return Ue(/^Mac/i);
|
723
|
+
}), xr = G(function() {
|
724
|
+
return Ue(/^iPhone/i);
|
725
|
+
}), Pt = G(function() {
|
726
|
+
return Ue(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
727
|
+
ee() && navigator.maxTouchPoints > 1;
|
728
|
+
}), He = G(function() {
|
729
|
+
return xr() || Pt();
|
708
730
|
}), _r = G(function() {
|
709
|
-
return
|
710
|
-
}),
|
711
|
-
return
|
712
|
-
}),
|
713
|
-
return
|
714
|
-
}),
|
731
|
+
return ee() || He();
|
732
|
+
}), Lr = G(function() {
|
733
|
+
return Te(/AppleWebKit/i) && !Mr();
|
734
|
+
}), Mr = G(function() {
|
735
|
+
return Te(/Chrome/i);
|
736
|
+
}), Et = G(function() {
|
737
|
+
return Te(/Android/i);
|
738
|
+
}), Dr = G(function() {
|
739
|
+
return Te(/Firefox/i);
|
740
|
+
}), Cr = /* @__PURE__ */ Xt({
|
715
741
|
isNative: !0,
|
716
|
-
open:
|
742
|
+
open: Ar,
|
717
743
|
useHref: (t) => t
|
718
744
|
});
|
719
|
-
function
|
720
|
-
return
|
745
|
+
function We() {
|
746
|
+
return ce(Cr);
|
721
747
|
}
|
722
|
-
function
|
748
|
+
function te(t, e, r = !0) {
|
723
749
|
var n, i;
|
724
|
-
let { metaKey:
|
725
|
-
|
726
|
-
let
|
750
|
+
let { metaKey: s, ctrlKey: o, altKey: a, shiftKey: p } = e;
|
751
|
+
Dr() && (!((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0) && n.startsWith("key")) && t.target === "_blank" && (ee() ? s = !0 : o = !0);
|
752
|
+
let h = Lr() && ee() && !Pt() ? new KeyboardEvent("keydown", {
|
727
753
|
keyIdentifier: "Enter",
|
728
|
-
metaKey:
|
729
|
-
ctrlKey:
|
730
|
-
altKey:
|
731
|
-
shiftKey:
|
754
|
+
metaKey: s,
|
755
|
+
ctrlKey: o,
|
756
|
+
altKey: a,
|
757
|
+
shiftKey: p
|
732
758
|
}) : new MouseEvent("click", {
|
733
|
-
metaKey:
|
734
|
-
ctrlKey:
|
735
|
-
altKey:
|
736
|
-
shiftKey:
|
759
|
+
metaKey: s,
|
760
|
+
ctrlKey: o,
|
761
|
+
altKey: a,
|
762
|
+
shiftKey: p,
|
737
763
|
bubbles: !0,
|
738
764
|
cancelable: !0
|
739
765
|
});
|
740
|
-
|
766
|
+
te.isOpening = r, j(t), t.dispatchEvent(h), te.isOpening = !1;
|
741
767
|
}
|
742
|
-
|
743
|
-
function
|
768
|
+
te.isOpening = !1;
|
769
|
+
function Ir(t, e) {
|
744
770
|
if (t instanceof HTMLAnchorElement) e(t);
|
745
771
|
else if (t.hasAttribute("data-href")) {
|
746
772
|
let r = document.createElement("a");
|
747
773
|
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);
|
748
774
|
}
|
749
775
|
}
|
750
|
-
function
|
751
|
-
|
776
|
+
function Ar(t, e) {
|
777
|
+
Ir(t, (r) => te(r, e));
|
752
778
|
}
|
753
|
-
function
|
754
|
-
let e =
|
779
|
+
function Fr(t) {
|
780
|
+
let e = We();
|
781
|
+
var r;
|
782
|
+
const n = e.useHref((r = t == null ? void 0 : t.href) !== null && r !== void 0 ? r : "");
|
755
783
|
return {
|
756
|
-
href: t != null && t.href ?
|
784
|
+
href: t != null && t.href ? n : void 0,
|
757
785
|
target: t == null ? void 0 : t.target,
|
758
786
|
rel: t == null ? void 0 : t.rel,
|
759
787
|
download: t == null ? void 0 : t.download,
|
@@ -761,52 +789,52 @@ function Mr(t) {
|
|
761
789
|
referrerPolicy: t == null ? void 0 : t.referrerPolicy
|
762
790
|
};
|
763
791
|
}
|
764
|
-
let
|
765
|
-
function
|
792
|
+
let oe = /* @__PURE__ */ new Map(), Ie = /* @__PURE__ */ new Set();
|
793
|
+
function tt() {
|
766
794
|
if (typeof window > "u") return;
|
767
795
|
function t(n) {
|
768
796
|
return "propertyName" in n;
|
769
797
|
}
|
770
798
|
let e = (n) => {
|
771
799
|
if (!t(n) || !n.target) return;
|
772
|
-
let i =
|
773
|
-
i || (i = /* @__PURE__ */ new Set(),
|
800
|
+
let i = oe.get(n.target);
|
801
|
+
i || (i = /* @__PURE__ */ new Set(), oe.set(n.target, i), n.target.addEventListener("transitioncancel", r, {
|
774
802
|
once: !0
|
775
803
|
})), i.add(n.propertyName);
|
776
804
|
}, r = (n) => {
|
777
805
|
if (!t(n) || !n.target) return;
|
778
|
-
let i =
|
779
|
-
if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r),
|
780
|
-
for (let
|
781
|
-
|
806
|
+
let i = oe.get(n.target);
|
807
|
+
if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r), oe.delete(n.target)), oe.size === 0)) {
|
808
|
+
for (let s of Ie) s();
|
809
|
+
Ie.clear();
|
782
810
|
}
|
783
811
|
};
|
784
812
|
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", r);
|
785
813
|
}
|
786
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
787
|
-
function
|
814
|
+
typeof document < "u" && (document.readyState !== "loading" ? tt() : document.addEventListener("DOMContentLoaded", tt));
|
815
|
+
function kt(t) {
|
788
816
|
requestAnimationFrame(() => {
|
789
|
-
|
817
|
+
oe.size === 0 ? t() : Ie.add(t);
|
790
818
|
});
|
791
819
|
}
|
792
|
-
function
|
793
|
-
let t =
|
794
|
-
let
|
795
|
-
t.current.delete(
|
796
|
-
} :
|
797
|
-
t.current.set(
|
798
|
-
type:
|
820
|
+
function xt() {
|
821
|
+
let t = L(/* @__PURE__ */ new Map()), e = Z((i, s, o, a) => {
|
822
|
+
let p = a != null && a.once ? (...h) => {
|
823
|
+
t.current.delete(o), o(...h);
|
824
|
+
} : o;
|
825
|
+
t.current.set(o, {
|
826
|
+
type: s,
|
799
827
|
eventTarget: i,
|
800
|
-
fn:
|
801
|
-
options:
|
802
|
-
}), i.addEventListener(
|
803
|
-
}, []), r =
|
804
|
-
var
|
805
|
-
let
|
806
|
-
i.removeEventListener(
|
807
|
-
}, []), n =
|
808
|
-
t.current.forEach((i,
|
809
|
-
r(i.eventTarget, i.type,
|
828
|
+
fn: p,
|
829
|
+
options: a
|
830
|
+
}), i.addEventListener(s, o, a);
|
831
|
+
}, []), r = Z((i, s, o, a) => {
|
832
|
+
var p;
|
833
|
+
let h = ((p = t.current.get(o)) === null || p === void 0 ? void 0 : p.fn) || o;
|
834
|
+
i.removeEventListener(s, h, a), t.current.delete(o);
|
835
|
+
}, []), n = Z(() => {
|
836
|
+
t.current.forEach((i, s) => {
|
837
|
+
r(i.eventTarget, i.type, s, i.options);
|
810
838
|
});
|
811
839
|
}, [
|
812
840
|
r
|
@@ -819,9 +847,9 @@ function Tt() {
|
|
819
847
|
removeAllGlobalListeners: n
|
820
848
|
};
|
821
849
|
}
|
822
|
-
function
|
850
|
+
function _t(t, e) {
|
823
851
|
let { id: r, "aria-label": n, "aria-labelledby": i } = t;
|
824
|
-
return r =
|
852
|
+
return r = St(r), i && n ? i = [
|
825
853
|
.../* @__PURE__ */ new Set([
|
826
854
|
r,
|
827
855
|
...i.trim().split(/\s+/)
|
@@ -832,44 +860,44 @@ function Pt(t, e) {
|
|
832
860
|
"aria-labelledby": i
|
833
861
|
};
|
834
862
|
}
|
835
|
-
function
|
836
|
-
|
863
|
+
function zr(t, e) {
|
864
|
+
pe(() => {
|
837
865
|
if (t && t.ref && e)
|
838
866
|
return t.ref.current = e.current, () => {
|
839
867
|
t.ref && (t.ref.current = null);
|
840
868
|
};
|
841
869
|
});
|
842
870
|
}
|
843
|
-
function
|
871
|
+
function Or(t, e) {
|
844
872
|
let r = window.getComputedStyle(t), n = /(auto|scroll)/.test(r.overflow + r.overflowX + r.overflowY);
|
845
873
|
return n && e && (n = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), n;
|
846
874
|
}
|
847
|
-
function
|
875
|
+
function Nr(t, e) {
|
848
876
|
const r = [];
|
849
877
|
for (; t && t !== document.documentElement; )
|
850
|
-
|
878
|
+
Or(t, e) && r.push(t), t = t.parentElement;
|
851
879
|
return r;
|
852
880
|
}
|
853
|
-
let
|
854
|
-
const
|
855
|
-
function
|
881
|
+
let Rr = 0;
|
882
|
+
const Me = /* @__PURE__ */ new Map();
|
883
|
+
function Br(t) {
|
856
884
|
let [e, r] = B();
|
857
|
-
return
|
885
|
+
return pe(() => {
|
858
886
|
if (!t) return;
|
859
|
-
let n =
|
887
|
+
let n = Me.get(t);
|
860
888
|
if (n)
|
861
889
|
r(n.element.id);
|
862
890
|
else {
|
863
|
-
let i = `react-aria-description-${
|
891
|
+
let i = `react-aria-description-${Rr++}`;
|
864
892
|
r(i);
|
865
|
-
let
|
866
|
-
|
893
|
+
let s = document.createElement("div");
|
894
|
+
s.id = i, s.style.display = "none", s.textContent = t, document.body.appendChild(s), n = {
|
867
895
|
refCount: 0,
|
868
|
-
element:
|
869
|
-
},
|
896
|
+
element: s
|
897
|
+
}, Me.set(t, n);
|
870
898
|
}
|
871
899
|
return n.refCount++, () => {
|
872
|
-
n && --n.refCount === 0 && (n.element.remove(),
|
900
|
+
n && --n.refCount === 0 && (n.element.remove(), Me.delete(t));
|
873
901
|
};
|
874
902
|
}, [
|
875
903
|
t
|
@@ -877,27 +905,27 @@ function Fr(t) {
|
|
877
905
|
"aria-describedby": t ? e : void 0
|
878
906
|
};
|
879
907
|
}
|
880
|
-
function
|
881
|
-
let i =
|
908
|
+
function rt(t, e, r, n) {
|
909
|
+
let i = le(r), s = r == null;
|
882
910
|
O(() => {
|
883
|
-
if (
|
884
|
-
let
|
885
|
-
return
|
886
|
-
|
911
|
+
if (s || !t.current) return;
|
912
|
+
let o = t.current;
|
913
|
+
return o.addEventListener(e, i, n), () => {
|
914
|
+
o.removeEventListener(e, i, n);
|
887
915
|
};
|
888
916
|
}, [
|
889
917
|
t,
|
890
918
|
e,
|
891
919
|
n,
|
892
|
-
|
920
|
+
s,
|
893
921
|
i
|
894
922
|
]);
|
895
923
|
}
|
896
|
-
function
|
897
|
-
let r =
|
898
|
-
r <=
|
924
|
+
function Lt(t, e) {
|
925
|
+
let r = nt(t, e, "left"), n = nt(t, e, "top"), i = e.offsetWidth, s = e.offsetHeight, o = t.scrollLeft, a = t.scrollTop, { borderTopWidth: p, borderLeftWidth: h } = getComputedStyle(t), v = t.scrollLeft + parseInt(h, 10), w = t.scrollTop + parseInt(p, 10), $ = v + t.clientWidth, m = w + t.clientHeight;
|
926
|
+
r <= o ? o = r - parseInt(h, 10) : r + i > $ && (o += r + i - $), n <= w ? a = n - parseInt(p, 10) : n + s > m && (a += n + s - m), t.scrollLeft = o, t.scrollTop = a;
|
899
927
|
}
|
900
|
-
function
|
928
|
+
function nt(t, e, r) {
|
901
929
|
const n = r === "left" ? "offsetLeft" : "offsetTop";
|
902
930
|
let i = 0;
|
903
931
|
for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
|
@@ -909,118 +937,118 @@ function Qe(t, e, r) {
|
|
909
937
|
}
|
910
938
|
return i;
|
911
939
|
}
|
912
|
-
function
|
940
|
+
function it(t, e) {
|
913
941
|
if (document.contains(t)) {
|
914
|
-
let
|
915
|
-
if (window.getComputedStyle(
|
916
|
-
let
|
917
|
-
for (let
|
942
|
+
let o = document.scrollingElement || document.documentElement;
|
943
|
+
if (window.getComputedStyle(o).overflow === "hidden") {
|
944
|
+
let p = Nr(t);
|
945
|
+
for (let h of p) Lt(h, t);
|
918
946
|
} else {
|
919
947
|
var r;
|
920
|
-
let { left:
|
948
|
+
let { left: p, top: h } = t.getBoundingClientRect();
|
921
949
|
t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
|
922
950
|
block: "nearest"
|
923
951
|
});
|
924
|
-
let { left:
|
925
|
-
if (Math.abs(
|
926
|
-
var n, i,
|
952
|
+
let { left: v, top: w } = t.getBoundingClientRect();
|
953
|
+
if (Math.abs(p - v) > 1 || Math.abs(h - w) > 1) {
|
954
|
+
var n, i, s;
|
927
955
|
e == null || (i = e.containingElement) === null || i === void 0 || (n = i.scrollIntoView) === null || n === void 0 || n.call(i, {
|
928
956
|
block: "center",
|
929
957
|
inline: "center"
|
930
|
-
}), (
|
958
|
+
}), (s = t.scrollIntoView) === null || s === void 0 || s.call(t, {
|
931
959
|
block: "nearest"
|
932
960
|
});
|
933
961
|
}
|
934
962
|
}
|
935
963
|
}
|
936
964
|
}
|
937
|
-
function
|
938
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 :
|
965
|
+
function Ae(t) {
|
966
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : Et() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
939
967
|
}
|
940
|
-
function
|
941
|
-
return !
|
968
|
+
function Ur(t) {
|
969
|
+
return !Et() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
942
970
|
}
|
943
|
-
function
|
944
|
-
return
|
971
|
+
function Fe(t) {
|
972
|
+
return _r() ? t.altKey : t.ctrlKey;
|
945
973
|
}
|
946
|
-
function
|
947
|
-
return
|
974
|
+
function se(t) {
|
975
|
+
return ee() ? t.metaKey : t.ctrlKey;
|
948
976
|
}
|
949
|
-
const
|
950
|
-
function
|
951
|
-
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i =
|
977
|
+
const Hr = 1e3;
|
978
|
+
function Wr(t) {
|
979
|
+
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = L({
|
952
980
|
search: "",
|
953
981
|
timeout: null
|
954
|
-
}).current,
|
955
|
-
let
|
956
|
-
if (!
|
957
|
-
|
958
|
-
let
|
959
|
-
|
982
|
+
}).current, s = (o) => {
|
983
|
+
let a = jr(o.key);
|
984
|
+
if (!a || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target)) return;
|
985
|
+
a === " " && i.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), i.search += a;
|
986
|
+
let p = e.getKeyForSearch(i.search, r.focusedKey);
|
987
|
+
p == null && (p = e.getKeyForSearch(i.search)), p != null && (r.setFocusedKey(p), n && n(p)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
960
988
|
i.search = "";
|
961
|
-
},
|
989
|
+
}, Hr);
|
962
990
|
};
|
963
991
|
return {
|
964
992
|
typeSelectProps: {
|
965
993
|
// Using a capturing listener to catch the keydown event before
|
966
994
|
// other hooks in order to handle the Spacebar event.
|
967
|
-
onKeyDownCapture: e.getKeyForSearch ?
|
995
|
+
onKeyDownCapture: e.getKeyForSearch ? s : null
|
968
996
|
}
|
969
997
|
};
|
970
998
|
}
|
971
|
-
function
|
999
|
+
function jr(t) {
|
972
1000
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
973
1001
|
}
|
974
|
-
let
|
975
|
-
function
|
976
|
-
if (
|
977
|
-
if (
|
978
|
-
const e =
|
979
|
-
|
1002
|
+
let ae = "default", ze = "", $e = /* @__PURE__ */ new WeakMap();
|
1003
|
+
function lt(t) {
|
1004
|
+
if (He()) {
|
1005
|
+
if (ae === "default") {
|
1006
|
+
const e = A(t);
|
1007
|
+
ze = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
980
1008
|
}
|
981
|
-
|
982
|
-
} else (t instanceof HTMLElement || t instanceof SVGElement) && (
|
983
|
-
}
|
984
|
-
function
|
985
|
-
if (
|
986
|
-
if (
|
987
|
-
|
988
|
-
|
989
|
-
if (
|
990
|
-
const e =
|
991
|
-
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect =
|
1009
|
+
ae = "disabled";
|
1010
|
+
} else (t instanceof HTMLElement || t instanceof SVGElement) && ($e.set(t, t.style.userSelect), t.style.userSelect = "none");
|
1011
|
+
}
|
1012
|
+
function he(t) {
|
1013
|
+
if (He()) {
|
1014
|
+
if (ae !== "disabled") return;
|
1015
|
+
ae = "restoring", setTimeout(() => {
|
1016
|
+
kt(() => {
|
1017
|
+
if (ae === "restoring") {
|
1018
|
+
const e = A(t);
|
1019
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = ze || ""), ze = "", ae = "default";
|
992
1020
|
}
|
993
1021
|
});
|
994
1022
|
}, 300);
|
995
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
996
|
-
let e =
|
997
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"),
|
1023
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && $e.has(t)) {
|
1024
|
+
let e = $e.get(t);
|
1025
|
+
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), $e.delete(t);
|
998
1026
|
}
|
999
1027
|
}
|
1000
|
-
const
|
1028
|
+
const Mt = U.createContext({
|
1001
1029
|
register: () => {
|
1002
1030
|
}
|
1003
1031
|
});
|
1004
|
-
|
1005
|
-
function
|
1032
|
+
Mt.displayName = "PressResponderContext";
|
1033
|
+
function Vr(t, e) {
|
1006
1034
|
return e.get ? e.get.call(t) : e.value;
|
1007
1035
|
}
|
1008
|
-
function
|
1036
|
+
function Dt(t, e, r) {
|
1009
1037
|
if (!e.has(t)) throw new TypeError("attempted to " + r + " private field on non-instance");
|
1010
1038
|
return e.get(t);
|
1011
1039
|
}
|
1012
|
-
function
|
1013
|
-
var r =
|
1014
|
-
return
|
1040
|
+
function Gr(t, e) {
|
1041
|
+
var r = Dt(t, e, "get");
|
1042
|
+
return Vr(t, r);
|
1015
1043
|
}
|
1016
|
-
function
|
1044
|
+
function Xr(t, e) {
|
1017
1045
|
if (e.has(t))
|
1018
1046
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
1019
1047
|
}
|
1020
|
-
function
|
1021
|
-
|
1048
|
+
function Yr(t, e, r) {
|
1049
|
+
Xr(t, e), e.set(t, r);
|
1022
1050
|
}
|
1023
|
-
function
|
1051
|
+
function qr(t, e, r) {
|
1024
1052
|
if (e.set) e.set.call(t, r);
|
1025
1053
|
else {
|
1026
1054
|
if (!e.writable)
|
@@ -1028,55 +1056,55 @@ function jr(t, e, r) {
|
|
1028
1056
|
e.value = r;
|
1029
1057
|
}
|
1030
1058
|
}
|
1031
|
-
function
|
1032
|
-
var n =
|
1033
|
-
return
|
1059
|
+
function ot(t, e, r) {
|
1060
|
+
var n = Dt(t, e, "set");
|
1061
|
+
return qr(t, n, r), r;
|
1034
1062
|
}
|
1035
|
-
function
|
1036
|
-
let e =
|
1063
|
+
function Jr(t) {
|
1064
|
+
let e = ce(Mt);
|
1037
1065
|
if (e) {
|
1038
1066
|
let { register: r, ...n } = e;
|
1039
|
-
t =
|
1067
|
+
t = q(n, t), r();
|
1040
1068
|
}
|
1041
|
-
return
|
1069
|
+
return zr(e, t.ref), t;
|
1042
1070
|
}
|
1043
1071
|
var ye = /* @__PURE__ */ new WeakMap();
|
1044
1072
|
class ge {
|
1045
1073
|
continuePropagation() {
|
1046
|
-
|
1074
|
+
ot(this, ye, !1);
|
1047
1075
|
}
|
1048
1076
|
get shouldStopPropagation() {
|
1049
|
-
return
|
1077
|
+
return Gr(this, ye);
|
1050
1078
|
}
|
1051
1079
|
constructor(e, r, n, i) {
|
1052
|
-
|
1080
|
+
Yr(this, ye, {
|
1053
1081
|
writable: !0,
|
1054
1082
|
value: void 0
|
1055
|
-
}),
|
1056
|
-
var
|
1057
|
-
let
|
1058
|
-
const
|
1059
|
-
let
|
1060
|
-
n.clientX != null && n.clientY != null && (
|
1083
|
+
}), ot(this, ye, !0);
|
1084
|
+
var s;
|
1085
|
+
let o = (s = i == null ? void 0 : i.target) !== null && s !== void 0 ? s : n.currentTarget;
|
1086
|
+
const a = o == null ? void 0 : o.getBoundingClientRect();
|
1087
|
+
let p, h = 0, v, w = null;
|
1088
|
+
n.clientX != null && n.clientY != null && (v = n.clientX, w = n.clientY), a && (v != null && w != null ? (p = v - a.left, h = w - a.top) : (p = a.width / 2, h = a.height / 2)), 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, this.x = p, this.y = h;
|
1061
1089
|
}
|
1062
1090
|
}
|
1063
|
-
const
|
1064
|
-
function
|
1091
|
+
const st = Symbol("linkClicked");
|
1092
|
+
function Ct(t) {
|
1065
1093
|
let {
|
1066
1094
|
onPress: e,
|
1067
1095
|
onPressChange: r,
|
1068
1096
|
onPressStart: n,
|
1069
1097
|
onPressEnd: i,
|
1070
|
-
onPressUp:
|
1071
|
-
isDisabled:
|
1072
|
-
isPressed:
|
1073
|
-
preventFocusOnPress:
|
1074
|
-
shouldCancelOnPointerExit:
|
1075
|
-
allowTextSelectionOnPress:
|
1098
|
+
onPressUp: s,
|
1099
|
+
isDisabled: o,
|
1100
|
+
isPressed: a,
|
1101
|
+
preventFocusOnPress: p,
|
1102
|
+
shouldCancelOnPointerExit: h,
|
1103
|
+
allowTextSelectionOnPress: v,
|
1076
1104
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
1077
|
-
ref:
|
1078
|
-
|
1079
|
-
} =
|
1105
|
+
ref: w,
|
1106
|
+
...$
|
1107
|
+
} = Jr(t), [m, M] = B(!1), k = L({
|
1080
1108
|
isPressed: !1,
|
1081
1109
|
ignoreEmulatedMouseEvents: !1,
|
1082
1110
|
ignoreClickAfterPress: !1,
|
@@ -1086,164 +1114,168 @@ function kt(t) {
|
|
1086
1114
|
target: null,
|
1087
1115
|
isOverTarget: !1,
|
1088
1116
|
pointerType: null
|
1089
|
-
}), { addGlobalListener:
|
1090
|
-
let
|
1091
|
-
if (
|
1092
|
-
let
|
1093
|
-
if (
|
1094
|
-
let
|
1095
|
-
n(
|
1117
|
+
}), { addGlobalListener: P, removeAllGlobalListeners: E } = xt(), x = le((l, y) => {
|
1118
|
+
let f = k.current;
|
1119
|
+
if (o || f.didFirePressStart) return !1;
|
1120
|
+
let d = !0;
|
1121
|
+
if (f.isTriggeringEvent = !0, n) {
|
1122
|
+
let T = new ge("pressstart", y, l);
|
1123
|
+
n(T), d = T.shouldStopPropagation;
|
1096
1124
|
}
|
1097
|
-
return r && r(!0),
|
1098
|
-
}),
|
1099
|
-
let
|
1100
|
-
if (!
|
1101
|
-
|
1102
|
-
let
|
1125
|
+
return r && r(!0), f.isTriggeringEvent = !1, f.didFirePressStart = !0, M(!0), d;
|
1126
|
+
}), K = le((l, y, f = !0) => {
|
1127
|
+
let d = k.current;
|
1128
|
+
if (!d.didFirePressStart) return !1;
|
1129
|
+
d.ignoreClickAfterPress = !0, d.didFirePressStart = !1, d.isTriggeringEvent = !0;
|
1130
|
+
let T = !0;
|
1103
1131
|
if (i) {
|
1104
|
-
let
|
1105
|
-
i(
|
1132
|
+
let c = new ge("pressend", y, l);
|
1133
|
+
i(c), T = c.shouldStopPropagation;
|
1106
1134
|
}
|
1107
|
-
if (r && r(!1),
|
1108
|
-
let
|
1109
|
-
e(
|
1135
|
+
if (r && r(!1), M(!1), e && f && !o) {
|
1136
|
+
let c = new ge("press", y, l);
|
1137
|
+
e(c), T && (T = c.shouldStopPropagation);
|
1110
1138
|
}
|
1111
|
-
return
|
1112
|
-
}),
|
1113
|
-
let
|
1114
|
-
if (
|
1115
|
-
if (
|
1116
|
-
|
1117
|
-
let
|
1118
|
-
return
|
1139
|
+
return d.isTriggeringEvent = !1, T;
|
1140
|
+
}), D = le((l, y) => {
|
1141
|
+
let f = k.current;
|
1142
|
+
if (o) return !1;
|
1143
|
+
if (s) {
|
1144
|
+
f.isTriggeringEvent = !0;
|
1145
|
+
let d = new ge("pressup", y, l);
|
1146
|
+
return s(d), f.isTriggeringEvent = !1, d.shouldStopPropagation;
|
1119
1147
|
}
|
1120
1148
|
return !0;
|
1121
|
-
}),
|
1122
|
-
let
|
1123
|
-
|
1124
|
-
}),
|
1125
|
-
|
1126
|
-
}),
|
1127
|
-
let l =
|
1128
|
-
onKeyDown(
|
1129
|
-
if (
|
1130
|
-
var
|
1131
|
-
|
1132
|
-
let
|
1133
|
-
if (!l.isPressed && !
|
1134
|
-
l.target =
|
1135
|
-
let
|
1136
|
-
|
1149
|
+
}), _ = le((l) => {
|
1150
|
+
let y = k.current;
|
1151
|
+
y.isPressed && y.target && (y.isOverTarget && y.pointerType != null && K(W(y.target, l), y.pointerType, !1), y.isPressed = !1, y.isOverTarget = !1, y.activePointerId = null, y.pointerType = null, E(), v || he(y.target));
|
1152
|
+
}), C = le((l) => {
|
1153
|
+
h && _(l);
|
1154
|
+
}), F = V(() => {
|
1155
|
+
let l = k.current, y = {
|
1156
|
+
onKeyDown(d) {
|
1157
|
+
if (De(d.nativeEvent, d.currentTarget) && d.currentTarget.contains(d.target)) {
|
1158
|
+
var T;
|
1159
|
+
ct(d.target, d.key) && d.preventDefault();
|
1160
|
+
let c = !0;
|
1161
|
+
if (!l.isPressed && !d.repeat) {
|
1162
|
+
l.target = d.currentTarget, l.isPressed = !0, c = x(d, "keyboard");
|
1163
|
+
let S = d.currentTarget, u = (I) => {
|
1164
|
+
De(I, S) && !I.repeat && S.contains(I.target) && l.target && D(W(l.target, I), "keyboard");
|
1137
1165
|
};
|
1138
|
-
|
1166
|
+
P(A(d.currentTarget), "keyup", Tt(u, f), !0);
|
1139
1167
|
}
|
1140
|
-
|
1141
|
-
} else
|
1168
|
+
c && d.stopPropagation(), d.metaKey && ee() && ((T = l.metaKeyEvents) === null || T === void 0 || T.set(d.key, d.nativeEvent));
|
1169
|
+
} else d.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
|
1142
1170
|
},
|
1143
|
-
onClick(
|
1144
|
-
if (!(
|
1145
|
-
let
|
1146
|
-
if (
|
1147
|
-
!
|
1148
|
-
let
|
1149
|
-
|
1171
|
+
onClick(d) {
|
1172
|
+
if (!(d && !d.currentTarget.contains(d.target)) && d && d.button === 0 && !l.isTriggeringEvent && !te.isOpening) {
|
1173
|
+
let T = !0;
|
1174
|
+
if (o && d.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || Ae(d.nativeEvent))) {
|
1175
|
+
!o && !p && j(d.currentTarget);
|
1176
|
+
let c = x(d, "virtual"), S = D(d, "virtual"), u = K(d, "virtual");
|
1177
|
+
T = c && S && u;
|
1150
1178
|
}
|
1151
|
-
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1,
|
1179
|
+
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, T && d.stopPropagation();
|
1152
1180
|
}
|
1153
1181
|
}
|
1154
|
-
},
|
1155
|
-
var
|
1156
|
-
if (l.isPressed && l.target &&
|
1157
|
-
var
|
1158
|
-
|
1159
|
-
let
|
1160
|
-
|
1161
|
-
} else if (
|
1162
|
-
var
|
1163
|
-
let
|
1182
|
+
}, f = (d) => {
|
1183
|
+
var T;
|
1184
|
+
if (l.isPressed && l.target && De(d, l.target)) {
|
1185
|
+
var c;
|
1186
|
+
ct(d.target, d.key) && d.preventDefault();
|
1187
|
+
let u = d.target;
|
1188
|
+
K(W(l.target, d), "keyboard", l.target.contains(u)), E(), d.key !== "Enter" && je(l.target) && l.target.contains(u) && !d[st] && (d[st] = !0, te(l.target, d, !1)), l.isPressed = !1, (c = l.metaKeyEvents) === null || c === void 0 || c.delete(d.key);
|
1189
|
+
} else if (d.key === "Meta" && (!((T = l.metaKeyEvents) === null || T === void 0) && T.size)) {
|
1190
|
+
var S;
|
1191
|
+
let u = l.metaKeyEvents;
|
1164
1192
|
l.metaKeyEvents = void 0;
|
1165
|
-
for (let
|
1193
|
+
for (let I of u.values()) (S = l.target) === null || S === void 0 || S.dispatchEvent(new KeyboardEvent("keyup", I));
|
1166
1194
|
}
|
1167
1195
|
};
|
1168
1196
|
if (typeof PointerEvent < "u") {
|
1169
|
-
|
1170
|
-
if (
|
1171
|
-
if (
|
1197
|
+
y.onPointerDown = (u) => {
|
1198
|
+
if (u.button !== 0 || !u.currentTarget.contains(u.target)) return;
|
1199
|
+
if (Ur(u.nativeEvent)) {
|
1172
1200
|
l.pointerType = "virtual";
|
1173
1201
|
return;
|
1174
1202
|
}
|
1175
|
-
|
1176
|
-
let
|
1177
|
-
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId =
|
1178
|
-
},
|
1179
|
-
|
1180
|
-
},
|
1181
|
-
!
|
1203
|
+
Ce(u.currentTarget) && u.preventDefault(), l.pointerType = u.pointerType;
|
1204
|
+
let I = !0;
|
1205
|
+
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = u.pointerId, l.target = u.currentTarget, !o && !p && j(u.currentTarget), v || lt(l.target), I = x(u, l.pointerType), P(A(u.currentTarget), "pointermove", d, !1), P(A(u.currentTarget), "pointerup", T, !1), P(A(u.currentTarget), "pointercancel", S, !1)), I && u.stopPropagation();
|
1206
|
+
}, y.onMouseDown = (u) => {
|
1207
|
+
u.currentTarget.contains(u.target) && u.button === 0 && (Ce(u.currentTarget) && u.preventDefault(), u.stopPropagation());
|
1208
|
+
}, y.onPointerUp = (u) => {
|
1209
|
+
!u.currentTarget.contains(u.target) || l.pointerType === "virtual" || u.button === 0 && ie(u, u.currentTarget) && D(u, l.pointerType || u.pointerType);
|
1182
1210
|
};
|
1183
|
-
let
|
1184
|
-
|
1185
|
-
},
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1211
|
+
let d = (u) => {
|
1212
|
+
u.pointerId === l.activePointerId && (l.target && ie(u, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, x(W(l.target, u), l.pointerType)) : l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, K(W(l.target, u), l.pointerType, !1), C(u)));
|
1213
|
+
}, T = (u) => {
|
1214
|
+
u.pointerId === l.activePointerId && l.isPressed && u.button === 0 && l.target && (ie(u, l.target) && l.pointerType != null ? K(W(l.target, u), l.pointerType) : l.isOverTarget && l.pointerType != null && K(W(l.target, u), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, E(), v || he(l.target), "ontouchend" in l.target && u.pointerType !== "mouse" && P(l.target, "touchend", c, {
|
1215
|
+
once: !0
|
1216
|
+
}));
|
1217
|
+
}, c = (u) => {
|
1218
|
+
It(u.target) && u.preventDefault();
|
1219
|
+
}, S = (u) => {
|
1220
|
+
_(u);
|
1189
1221
|
};
|
1190
|
-
|
1191
|
-
|
1222
|
+
y.onDragStart = (u) => {
|
1223
|
+
u.currentTarget.contains(u.target) && _(u);
|
1192
1224
|
};
|
1193
1225
|
} else {
|
1194
|
-
|
1195
|
-
if (
|
1196
|
-
if (
|
1197
|
-
|
1226
|
+
y.onMouseDown = (c) => {
|
1227
|
+
if (c.button !== 0 || !c.currentTarget.contains(c.target)) return;
|
1228
|
+
if (Ce(c.currentTarget) && c.preventDefault(), l.ignoreEmulatedMouseEvents) {
|
1229
|
+
c.stopPropagation();
|
1198
1230
|
return;
|
1199
1231
|
}
|
1200
|
-
l.isPressed = !0, l.isOverTarget = !0, l.target =
|
1201
|
-
},
|
1202
|
-
if (!
|
1203
|
-
let
|
1204
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0,
|
1205
|
-
},
|
1206
|
-
if (!
|
1207
|
-
let
|
1208
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1,
|
1209
|
-
},
|
1210
|
-
|
1232
|
+
l.isPressed = !0, l.isOverTarget = !0, l.target = c.currentTarget, l.pointerType = Ae(c.nativeEvent) ? "virtual" : "mouse", !o && !p && j(c.currentTarget), x(c, l.pointerType) && c.stopPropagation(), P(A(c.currentTarget), "mouseup", d, !1);
|
1233
|
+
}, y.onMouseEnter = (c) => {
|
1234
|
+
if (!c.currentTarget.contains(c.target)) return;
|
1235
|
+
let S = !0;
|
1236
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, S = x(c, l.pointerType)), S && c.stopPropagation();
|
1237
|
+
}, y.onMouseLeave = (c) => {
|
1238
|
+
if (!c.currentTarget.contains(c.target)) return;
|
1239
|
+
let S = !0;
|
1240
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, S = K(c, l.pointerType, !1), C(c)), S && c.stopPropagation();
|
1241
|
+
}, y.onMouseUp = (c) => {
|
1242
|
+
c.currentTarget.contains(c.target) && !l.ignoreEmulatedMouseEvents && c.button === 0 && D(c, l.pointerType || "mouse");
|
1211
1243
|
};
|
1212
|
-
let
|
1213
|
-
if (
|
1244
|
+
let d = (c) => {
|
1245
|
+
if (c.button === 0) {
|
1214
1246
|
if (l.isPressed = !1, E(), l.ignoreEmulatedMouseEvents) {
|
1215
1247
|
l.ignoreEmulatedMouseEvents = !1;
|
1216
1248
|
return;
|
1217
1249
|
}
|
1218
|
-
l.target &&
|
1250
|
+
l.target && ie(c, l.target) && l.pointerType != null ? K(W(l.target, c), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && K(W(l.target, c), l.pointerType, !1), l.isOverTarget = !1;
|
1219
1251
|
}
|
1220
1252
|
};
|
1221
|
-
|
1222
|
-
if (!
|
1223
|
-
let
|
1224
|
-
if (!
|
1225
|
-
l.activePointerId =
|
1226
|
-
},
|
1227
|
-
if (!
|
1253
|
+
y.onTouchStart = (c) => {
|
1254
|
+
if (!c.currentTarget.contains(c.target)) return;
|
1255
|
+
let S = Zr(c.nativeEvent);
|
1256
|
+
if (!S) return;
|
1257
|
+
l.activePointerId = S.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = c.currentTarget, l.pointerType = "touch", !o && !p && j(c.currentTarget), v || lt(l.target), x(X(l.target, c), l.pointerType) && c.stopPropagation(), P(Q(c.currentTarget), "scroll", T, !0);
|
1258
|
+
}, y.onTouchMove = (c) => {
|
1259
|
+
if (!c.currentTarget.contains(c.target)) return;
|
1228
1260
|
if (!l.isPressed) {
|
1229
|
-
|
1261
|
+
c.stopPropagation();
|
1230
1262
|
return;
|
1231
1263
|
}
|
1232
|
-
let
|
1233
|
-
|
1234
|
-
},
|
1235
|
-
if (!
|
1264
|
+
let S = at(c.nativeEvent, l.activePointerId), u = !0;
|
1265
|
+
S && ie(S, c.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, u = x(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, u = K(X(l.target, c), l.pointerType, !1), C(X(l.target, c))), u && c.stopPropagation();
|
1266
|
+
}, y.onTouchEnd = (c) => {
|
1267
|
+
if (!c.currentTarget.contains(c.target)) return;
|
1236
1268
|
if (!l.isPressed) {
|
1237
|
-
|
1269
|
+
c.stopPropagation();
|
1238
1270
|
return;
|
1239
1271
|
}
|
1240
|
-
let
|
1241
|
-
|
1242
|
-
},
|
1243
|
-
|
1272
|
+
let S = at(c.nativeEvent, l.activePointerId), u = !0;
|
1273
|
+
S && ie(S, c.currentTarget) && l.pointerType != null ? (D(X(l.target, c), l.pointerType), u = K(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (u = K(X(l.target, c), l.pointerType, !1)), u && c.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !v && he(l.target), E();
|
1274
|
+
}, y.onTouchCancel = (c) => {
|
1275
|
+
c.currentTarget.contains(c.target) && (c.stopPropagation(), l.isPressed && _(X(l.target, c)));
|
1244
1276
|
};
|
1245
|
-
let
|
1246
|
-
l.isPressed &&
|
1277
|
+
let T = (c) => {
|
1278
|
+
l.isPressed && c.target.contains(l.target) && _({
|
1247
1279
|
currentTarget: l.target,
|
1248
1280
|
shiftKey: !1,
|
1249
1281
|
ctrlKey: !1,
|
@@ -1251,46 +1283,46 @@ function kt(t) {
|
|
1251
1283
|
altKey: !1
|
1252
1284
|
});
|
1253
1285
|
};
|
1254
|
-
|
1255
|
-
|
1286
|
+
y.onDragStart = (c) => {
|
1287
|
+
c.currentTarget.contains(c.target) && _(c);
|
1256
1288
|
};
|
1257
1289
|
}
|
1258
|
-
return
|
1290
|
+
return y;
|
1259
1291
|
}, [
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1292
|
+
P,
|
1293
|
+
o,
|
1294
|
+
p,
|
1263
1295
|
E,
|
1264
|
-
|
1265
|
-
M,
|
1266
|
-
D,
|
1296
|
+
v,
|
1267
1297
|
_,
|
1298
|
+
C,
|
1299
|
+
K,
|
1268
1300
|
x,
|
1269
|
-
|
1301
|
+
D
|
1270
1302
|
]);
|
1271
1303
|
return O(() => () => {
|
1272
1304
|
var l;
|
1273
|
-
|
1305
|
+
v || he((l = k.current.target) !== null && l !== void 0 ? l : void 0);
|
1274
1306
|
}, [
|
1275
|
-
|
1307
|
+
v
|
1276
1308
|
]), {
|
1277
|
-
isPressed:
|
1278
|
-
pressProps:
|
1309
|
+
isPressed: a || m,
|
1310
|
+
pressProps: q($, F)
|
1279
1311
|
};
|
1280
1312
|
}
|
1281
|
-
function
|
1313
|
+
function je(t) {
|
1282
1314
|
return t.tagName === "A" && t.hasAttribute("href");
|
1283
1315
|
}
|
1284
|
-
function
|
1285
|
-
const { key: r, code: n } = t, i = e,
|
1286
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof
|
1287
|
-
!((
|
1316
|
+
function De(t, e) {
|
1317
|
+
const { key: r, code: n } = t, i = e, s = i.getAttribute("role");
|
1318
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof Q(i).HTMLInputElement && !At(i, r) || i instanceof Q(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
1319
|
+
!((s === "link" || !s && je(i)) && r !== "Enter");
|
1288
1320
|
}
|
1289
|
-
function
|
1321
|
+
function Zr(t) {
|
1290
1322
|
const { targetTouches: e } = t;
|
1291
1323
|
return e.length > 0 ? e[0] : null;
|
1292
1324
|
}
|
1293
|
-
function
|
1325
|
+
function at(t, e) {
|
1294
1326
|
const r = t.changedTouches;
|
1295
1327
|
for (let n = 0; n < r.length; n++) {
|
1296
1328
|
const i = r[n];
|
@@ -1322,7 +1354,7 @@ function W(t, e) {
|
|
1322
1354
|
clientY: n
|
1323
1355
|
};
|
1324
1356
|
}
|
1325
|
-
function
|
1357
|
+
function Qr(t) {
|
1326
1358
|
let e = 0, r = 0;
|
1327
1359
|
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), {
|
1328
1360
|
top: t.clientY - r,
|
@@ -1331,20 +1363,23 @@ function Xr(t) {
|
|
1331
1363
|
left: t.clientX - e
|
1332
1364
|
};
|
1333
1365
|
}
|
1334
|
-
function
|
1366
|
+
function en(t, e) {
|
1335
1367
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
1336
1368
|
}
|
1337
|
-
function
|
1338
|
-
let r = e.getBoundingClientRect(), n =
|
1339
|
-
return
|
1369
|
+
function ie(t, e) {
|
1370
|
+
let r = e.getBoundingClientRect(), n = Qr(t);
|
1371
|
+
return en(r, n);
|
1340
1372
|
}
|
1341
|
-
function
|
1373
|
+
function Ce(t) {
|
1342
1374
|
return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
|
1343
1375
|
}
|
1344
|
-
function
|
1345
|
-
return t instanceof HTMLInputElement ? !
|
1376
|
+
function It(t) {
|
1377
|
+
return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !je(t);
|
1378
|
+
}
|
1379
|
+
function ct(t, e) {
|
1380
|
+
return t instanceof HTMLInputElement ? !At(t, e) : It(t);
|
1346
1381
|
}
|
1347
|
-
const
|
1382
|
+
const tn = /* @__PURE__ */ new Set([
|
1348
1383
|
"checkbox",
|
1349
1384
|
"radio",
|
1350
1385
|
"range",
|
@@ -1355,131 +1390,131 @@ const qr = /* @__PURE__ */ new Set([
|
|
1355
1390
|
"submit",
|
1356
1391
|
"reset"
|
1357
1392
|
]);
|
1358
|
-
function
|
1359
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
1393
|
+
function At(t, e) {
|
1394
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : tn.has(t.type);
|
1360
1395
|
}
|
1361
|
-
let
|
1362
|
-
function
|
1363
|
-
for (let r of
|
1396
|
+
let ve = null, rn = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Map(), re = !1, Oe = !1;
|
1397
|
+
function Ve(t, e) {
|
1398
|
+
for (let r of rn) r(t, e);
|
1364
1399
|
}
|
1365
|
-
function
|
1366
|
-
return !(t.metaKey || !
|
1400
|
+
function nn(t) {
|
1401
|
+
return !(t.metaKey || !ee() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
1367
1402
|
}
|
1368
1403
|
function Se(t) {
|
1369
|
-
|
1404
|
+
re = !0, nn(t) && (ve = "keyboard", Ve("keyboard", t));
|
1370
1405
|
}
|
1371
|
-
function
|
1372
|
-
|
1406
|
+
function z(t) {
|
1407
|
+
ve = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (re = !0, Ve("pointer", t));
|
1373
1408
|
}
|
1374
|
-
function
|
1375
|
-
|
1409
|
+
function Ft(t) {
|
1410
|
+
Ae(t) && (re = !0, ve = "virtual");
|
1376
1411
|
}
|
1377
|
-
function
|
1378
|
-
t.target === window || t.target === document || (!
|
1412
|
+
function zt(t) {
|
1413
|
+
t.target === window || t.target === document || (!re && !Oe && (ve = "virtual", Ve("virtual", t)), re = !1, Oe = !1);
|
1379
1414
|
}
|
1380
|
-
function
|
1381
|
-
|
1415
|
+
function Ot() {
|
1416
|
+
re = !1, Oe = !0;
|
1382
1417
|
}
|
1383
|
-
function
|
1384
|
-
if (typeof window > "u" || de.get(
|
1385
|
-
const e =
|
1418
|
+
function ut(t) {
|
1419
|
+
if (typeof window > "u" || de.get(Q(t))) return;
|
1420
|
+
const e = Q(t), r = A(t);
|
1386
1421
|
let n = e.HTMLElement.prototype.focus;
|
1387
1422
|
e.HTMLElement.prototype.focus = function() {
|
1388
|
-
|
1389
|
-
}, r.addEventListener("keydown", Se, !0), r.addEventListener("keyup", Se, !0), r.addEventListener("click",
|
1390
|
-
|
1423
|
+
re = !0, n.apply(this, arguments);
|
1424
|
+
}, r.addEventListener("keydown", Se, !0), r.addEventListener("keyup", Se, !0), r.addEventListener("click", Ft, !0), e.addEventListener("focus", zt, !0), e.addEventListener("blur", Ot, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", z, !0), r.addEventListener("pointermove", z, !0), r.addEventListener("pointerup", z, !0)) : (r.addEventListener("mousedown", z, !0), r.addEventListener("mousemove", z, !0), r.addEventListener("mouseup", z, !0)), e.addEventListener("beforeunload", () => {
|
1425
|
+
Nt(t);
|
1391
1426
|
}, {
|
1392
1427
|
once: !0
|
1393
1428
|
}), de.set(e, {
|
1394
1429
|
focus: n
|
1395
1430
|
});
|
1396
1431
|
}
|
1397
|
-
const
|
1398
|
-
const r =
|
1399
|
-
e && n.removeEventListener("DOMContentLoaded", e), de.has(r) && (r.HTMLElement.prototype.focus = de.get(r).focus, n.removeEventListener("keydown", Se, !0), n.removeEventListener("keyup", Se, !0), n.removeEventListener("click",
|
1432
|
+
const Nt = (t, e) => {
|
1433
|
+
const r = Q(t), n = A(t);
|
1434
|
+
e && n.removeEventListener("DOMContentLoaded", e), de.has(r) && (r.HTMLElement.prototype.focus = de.get(r).focus, n.removeEventListener("keydown", Se, !0), n.removeEventListener("keyup", Se, !0), n.removeEventListener("click", Ft, !0), r.removeEventListener("focus", zt, !0), r.removeEventListener("blur", Ot, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", z, !0), n.removeEventListener("pointermove", z, !0), n.removeEventListener("pointerup", z, !0)) : (n.removeEventListener("mousedown", z, !0), n.removeEventListener("mousemove", z, !0), n.removeEventListener("mouseup", z, !0)), de.delete(r));
|
1400
1435
|
};
|
1401
|
-
function
|
1402
|
-
const e =
|
1436
|
+
function ln(t) {
|
1437
|
+
const e = A(t);
|
1403
1438
|
let r;
|
1404
|
-
return e.readyState !== "loading" ?
|
1405
|
-
|
1406
|
-
}, e.addEventListener("DOMContentLoaded", r)), () =>
|
1407
|
-
}
|
1408
|
-
typeof document < "u" &&
|
1409
|
-
function
|
1410
|
-
return
|
1411
|
-
}
|
1412
|
-
const
|
1413
|
-
function
|
1414
|
-
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold:
|
1415
|
-
const
|
1416
|
-
let { addGlobalListener:
|
1439
|
+
return e.readyState !== "loading" ? ut(t) : (r = () => {
|
1440
|
+
ut(t);
|
1441
|
+
}, e.addEventListener("DOMContentLoaded", r)), () => Nt(t, r);
|
1442
|
+
}
|
1443
|
+
typeof document < "u" && ln();
|
1444
|
+
function Ne() {
|
1445
|
+
return ve;
|
1446
|
+
}
|
1447
|
+
const on = 500;
|
1448
|
+
function sn(t) {
|
1449
|
+
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: s = on, accessibilityDescription: o } = t;
|
1450
|
+
const a = L(void 0);
|
1451
|
+
let { addGlobalListener: p, removeGlobalListener: h } = xt(), { pressProps: v } = Ct({
|
1417
1452
|
isDisabled: e,
|
1418
|
-
onPressStart(
|
1419
|
-
if (
|
1420
|
-
|
1453
|
+
onPressStart($) {
|
1454
|
+
if ($.continuePropagation(), ($.pointerType === "mouse" || $.pointerType === "touch") && (r && r({
|
1455
|
+
...$,
|
1421
1456
|
type: "longpressstart"
|
1422
|
-
}),
|
1423
|
-
|
1457
|
+
}), a.current = setTimeout(() => {
|
1458
|
+
$.target.dispatchEvent(new PointerEvent("pointercancel", {
|
1424
1459
|
bubbles: !0
|
1425
1460
|
})), i && i({
|
1426
|
-
|
1461
|
+
...$,
|
1427
1462
|
type: "longpress"
|
1428
|
-
}),
|
1429
|
-
},
|
1430
|
-
let
|
1431
|
-
|
1463
|
+
}), a.current = void 0;
|
1464
|
+
}, s), $.pointerType === "touch")) {
|
1465
|
+
let m = (M) => {
|
1466
|
+
M.preventDefault();
|
1432
1467
|
};
|
1433
|
-
|
1468
|
+
p($.target, "contextmenu", m, {
|
1434
1469
|
once: !0
|
1435
|
-
}),
|
1470
|
+
}), p(window, "pointerup", () => {
|
1436
1471
|
setTimeout(() => {
|
1437
|
-
|
1472
|
+
h($.target, "contextmenu", m);
|
1438
1473
|
}, 30);
|
1439
1474
|
}, {
|
1440
1475
|
once: !0
|
1441
1476
|
});
|
1442
1477
|
}
|
1443
1478
|
},
|
1444
|
-
onPressEnd(
|
1445
|
-
|
1446
|
-
|
1479
|
+
onPressEnd($) {
|
1480
|
+
a.current && clearTimeout(a.current), n && ($.pointerType === "mouse" || $.pointerType === "touch") && n({
|
1481
|
+
...$,
|
1447
1482
|
type: "longpressend"
|
1448
1483
|
});
|
1449
1484
|
}
|
1450
|
-
}),
|
1485
|
+
}), w = Br(i && !e ? o : void 0);
|
1451
1486
|
return {
|
1452
|
-
longPressProps:
|
1487
|
+
longPressProps: q(v, w)
|
1453
1488
|
};
|
1454
1489
|
}
|
1455
|
-
function
|
1456
|
-
const e =
|
1457
|
-
if (
|
1490
|
+
function Re(t) {
|
1491
|
+
const e = A(t);
|
1492
|
+
if (Ne() === "virtual") {
|
1458
1493
|
let r = e.activeElement;
|
1459
|
-
|
1494
|
+
kt(() => {
|
1460
1495
|
e.activeElement === r && t.isConnected && j(t);
|
1461
1496
|
});
|
1462
1497
|
} else j(t);
|
1463
1498
|
}
|
1464
|
-
function
|
1465
|
-
const e =
|
1499
|
+
function an(t) {
|
1500
|
+
const e = Q(t);
|
1466
1501
|
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
|
1467
1502
|
let { display: r, visibility: n } = t.style, i = r !== "none" && n !== "hidden" && n !== "collapse";
|
1468
1503
|
if (i) {
|
1469
|
-
const { getComputedStyle:
|
1470
|
-
let { display:
|
1471
|
-
i =
|
1504
|
+
const { getComputedStyle: s } = t.ownerDocument.defaultView;
|
1505
|
+
let { display: o, visibility: a } = s(t);
|
1506
|
+
i = o !== "none" && a !== "hidden" && a !== "collapse";
|
1472
1507
|
}
|
1473
1508
|
return i;
|
1474
1509
|
}
|
1475
|
-
function
|
1510
|
+
function cn(t, e) {
|
1476
1511
|
return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
1477
1512
|
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
1478
1513
|
}
|
1479
|
-
function
|
1480
|
-
return t.nodeName !== "#comment" &&
|
1514
|
+
function Rt(t, e) {
|
1515
|
+
return t.nodeName !== "#comment" && an(t) && cn(t, e) && (!t.parentElement || Rt(t.parentElement, t));
|
1481
1516
|
}
|
1482
|
-
const
|
1517
|
+
const Ge = [
|
1483
1518
|
"input:not([disabled]):not([type=hidden])",
|
1484
1519
|
"select:not([disabled])",
|
1485
1520
|
"textarea:not([disabled])",
|
@@ -1493,22 +1528,22 @@ const He = [
|
|
1493
1528
|
"audio[controls]",
|
1494
1529
|
"video[controls]",
|
1495
1530
|
"[contenteditable]"
|
1496
|
-
],
|
1497
|
-
|
1498
|
-
const
|
1499
|
-
function
|
1531
|
+
], un = Ge.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
1532
|
+
Ge.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
1533
|
+
const dn = Ge.join(':not([hidden]):not([tabindex="-1"]),');
|
1534
|
+
function Bt(t, e) {
|
1500
1535
|
return !t || !e ? !1 : e.some((r) => r.contains(t));
|
1501
1536
|
}
|
1502
|
-
function
|
1503
|
-
let n = e != null && e.tabbable ?
|
1504
|
-
acceptNode(
|
1505
|
-
var
|
1506
|
-
return !(e == null || (
|
1537
|
+
function Ut(t, e, r) {
|
1538
|
+
let n = e != null && e.tabbable ? dn : un, i = A(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
1539
|
+
acceptNode(s) {
|
1540
|
+
var o;
|
1541
|
+
return !(e == null || (o = e.from) === null || o === void 0) && o.contains(s) ? NodeFilter.FILTER_REJECT : s.matches(n) && Rt(s) && (!r || Bt(s, r)) && (!(e != null && e.accept) || e.accept(s)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
1507
1542
|
}
|
1508
1543
|
});
|
1509
1544
|
return e != null && e.from && (i.currentNode = e.from), i;
|
1510
1545
|
}
|
1511
|
-
class
|
1546
|
+
class Xe {
|
1512
1547
|
get size() {
|
1513
1548
|
return this.fastMap.size;
|
1514
1549
|
}
|
@@ -1518,10 +1553,10 @@ class We {
|
|
1518
1553
|
addTreeNode(e, r, n) {
|
1519
1554
|
let i = this.fastMap.get(r ?? null);
|
1520
1555
|
if (!i) return;
|
1521
|
-
let
|
1556
|
+
let s = new dt({
|
1522
1557
|
scopeRef: e
|
1523
1558
|
});
|
1524
|
-
i.addChild(
|
1559
|
+
i.addChild(s), s.parent = i, this.fastMap.set(e, s), n && (s.nodeToRestore = n);
|
1525
1560
|
}
|
1526
1561
|
addNode(e) {
|
1527
1562
|
this.fastMap.set(e.scopeRef, e);
|
@@ -1531,9 +1566,9 @@ class We {
|
|
1531
1566
|
let r = this.fastMap.get(e);
|
1532
1567
|
if (!r) return;
|
1533
1568
|
let n = r.parent;
|
1534
|
-
for (let
|
1569
|
+
for (let s of this.traverse()) s !== r && r.nodeToRestore && s.nodeToRestore && r.scopeRef && r.scopeRef.current && Bt(s.nodeToRestore, r.scopeRef.current) && (s.nodeToRestore = r.nodeToRestore);
|
1535
1570
|
let i = r.children;
|
1536
|
-
n && (n.removeChild(r), i.size > 0 && i.forEach((
|
1571
|
+
n && (n.removeChild(r), i.size > 0 && i.forEach((s) => n && n.addChild(s))), this.fastMap.delete(r.scopeRef);
|
1537
1572
|
}
|
1538
1573
|
// Pre Order Depth First
|
1539
1574
|
*traverse(e = this.root) {
|
@@ -1541,18 +1576,18 @@ class We {
|
|
1541
1576
|
}
|
1542
1577
|
clone() {
|
1543
1578
|
var e;
|
1544
|
-
let r = new
|
1579
|
+
let r = new Xe();
|
1545
1580
|
var n;
|
1546
1581
|
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);
|
1547
1582
|
return r;
|
1548
1583
|
}
|
1549
1584
|
constructor() {
|
1550
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new
|
1585
|
+
this.fastMap = /* @__PURE__ */ new Map(), this.root = new dt({
|
1551
1586
|
scopeRef: null
|
1552
1587
|
}), this.fastMap.set(null, this.root);
|
1553
1588
|
}
|
1554
1589
|
}
|
1555
|
-
class
|
1590
|
+
class dt {
|
1556
1591
|
addChild(e) {
|
1557
1592
|
this.children.add(e), e.parent = this;
|
1558
1593
|
}
|
@@ -1563,22 +1598,22 @@ class st {
|
|
1563
1598
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
1564
1599
|
}
|
1565
1600
|
}
|
1566
|
-
new
|
1567
|
-
function
|
1601
|
+
new Xe();
|
1602
|
+
function fn(t, e) {
|
1568
1603
|
let r = e == null ? void 0 : e.isDisabled, [n, i] = B(!1);
|
1569
|
-
return
|
1604
|
+
return pe(() => {
|
1570
1605
|
if (t != null && t.current && !r) {
|
1571
|
-
let
|
1606
|
+
let s = () => {
|
1572
1607
|
if (t.current) {
|
1573
|
-
let
|
1608
|
+
let a = Ut(t.current, {
|
1574
1609
|
tabbable: !0
|
1575
1610
|
});
|
1576
|
-
i(!!
|
1611
|
+
i(!!a.nextNode());
|
1577
1612
|
}
|
1578
1613
|
};
|
1579
|
-
|
1580
|
-
let
|
1581
|
-
return
|
1614
|
+
s();
|
1615
|
+
let o = new MutationObserver(s);
|
1616
|
+
return o.observe(t.current, {
|
1582
1617
|
subtree: !0,
|
1583
1618
|
childList: !0,
|
1584
1619
|
attributes: !0,
|
@@ -1587,12 +1622,12 @@ function sn(t, e) {
|
|
1587
1622
|
"disabled"
|
1588
1623
|
]
|
1589
1624
|
}), () => {
|
1590
|
-
|
1625
|
+
o.disconnect();
|
1591
1626
|
};
|
1592
1627
|
}
|
1593
1628
|
}), r ? !1 : n;
|
1594
1629
|
}
|
1595
|
-
const
|
1630
|
+
const pn = /* @__PURE__ */ new Set([
|
1596
1631
|
"Arab",
|
1597
1632
|
"Syrc",
|
1598
1633
|
"Samr",
|
@@ -1603,7 +1638,7 @@ const an = /* @__PURE__ */ new Set([
|
|
1603
1638
|
"Adlm",
|
1604
1639
|
"Rohg",
|
1605
1640
|
"Hebr"
|
1606
|
-
]),
|
1641
|
+
]), vn = /* @__PURE__ */ new Set([
|
1607
1642
|
"ae",
|
1608
1643
|
"ar",
|
1609
1644
|
"arc",
|
@@ -1624,18 +1659,18 @@ const an = /* @__PURE__ */ new Set([
|
|
1624
1659
|
"ur",
|
1625
1660
|
"yi"
|
1626
1661
|
]);
|
1627
|
-
function
|
1662
|
+
function bn(t) {
|
1628
1663
|
if (Intl.Locale) {
|
1629
1664
|
let r = new Intl.Locale(t).maximize(), n = typeof r.getTextInfo == "function" ? r.getTextInfo() : r.textInfo;
|
1630
1665
|
if (n) return n.direction === "rtl";
|
1631
|
-
if (r.script) return
|
1666
|
+
if (r.script) return pn.has(r.script);
|
1632
1667
|
}
|
1633
1668
|
let e = t.split("-")[0];
|
1634
|
-
return
|
1669
|
+
return vn.has(e);
|
1635
1670
|
}
|
1636
|
-
const
|
1637
|
-
function
|
1638
|
-
let t = typeof window < "u" && window[
|
1671
|
+
const hn = Symbol.for("react-aria.i18n.locale");
|
1672
|
+
function Ht() {
|
1673
|
+
let t = typeof window < "u" && window[hn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
1639
1674
|
try {
|
1640
1675
|
Intl.DateTimeFormat.supportedLocalesOf([
|
1641
1676
|
t
|
@@ -1645,334 +1680,328 @@ function zt() {
|
|
1645
1680
|
}
|
1646
1681
|
return {
|
1647
1682
|
locale: t,
|
1648
|
-
direction:
|
1683
|
+
direction: bn(t) ? "rtl" : "ltr"
|
1649
1684
|
};
|
1650
1685
|
}
|
1651
|
-
let
|
1652
|
-
function
|
1653
|
-
|
1654
|
-
for (let t of
|
1686
|
+
let Be = Ht(), ue = /* @__PURE__ */ new Set();
|
1687
|
+
function ft() {
|
1688
|
+
Be = Ht();
|
1689
|
+
for (let t of ue) t(Be);
|
1655
1690
|
}
|
1656
|
-
function
|
1657
|
-
let t =
|
1658
|
-
return O(() => (
|
1659
|
-
|
1691
|
+
function yn() {
|
1692
|
+
let t = Kt(), [e, r] = B(Be);
|
1693
|
+
return O(() => (ue.size === 0 && window.addEventListener("languagechange", ft), ue.add(r), () => {
|
1694
|
+
ue.delete(r), ue.size === 0 && window.removeEventListener("languagechange", ft);
|
1660
1695
|
}), []), t ? {
|
1661
1696
|
locale: "en-US",
|
1662
1697
|
direction: "ltr"
|
1663
1698
|
} : e;
|
1664
1699
|
}
|
1665
|
-
const
|
1666
|
-
function
|
1667
|
-
let t =
|
1668
|
-
return
|
1669
|
-
}
|
1670
|
-
function
|
1671
|
-
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap:
|
1672
|
-
if (
|
1673
|
-
const
|
1674
|
-
if (
|
1675
|
-
if (e.isLink(
|
1676
|
-
|
1677
|
-
e.setFocusedKey(
|
1700
|
+
const gn = /* @__PURE__ */ U.createContext(null);
|
1701
|
+
function Wt() {
|
1702
|
+
let t = yn();
|
1703
|
+
return ce(gn) || t;
|
1704
|
+
}
|
1705
|
+
function $n(t) {
|
1706
|
+
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: s = !1, disallowEmptySelection: o = !1, disallowSelectAll: a = !1, selectOnFocus: p = e.selectionBehavior === "replace", disallowTypeAhead: h = !1, shouldUseVirtualFocus: v, allowsTabNavigation: w = !1, isVirtualized: $, scrollRef: m = n, linkBehavior: M = "action" } = t, { direction: k } = Wt(), P = We(), E = (f) => {
|
1707
|
+
if (f.altKey && f.key === "Tab" && f.preventDefault(), !n.current.contains(f.target)) return;
|
1708
|
+
const d = (g, J) => {
|
1709
|
+
if (g != null) {
|
1710
|
+
if (e.isLink(g) && M === "selection" && p && !Fe(f)) {
|
1711
|
+
Zt(() => {
|
1712
|
+
e.setFocusedKey(g, J);
|
1678
1713
|
});
|
1679
|
-
let
|
1680
|
-
|
1714
|
+
let ne = m.current.querySelector(`[data-key="${CSS.escape(g.toString())}"]`), qe = e.getItemProps(g);
|
1715
|
+
P.open(ne, f, qe.href, qe.routerOptions);
|
1681
1716
|
return;
|
1682
1717
|
}
|
1683
|
-
if (e.setFocusedKey(
|
1684
|
-
|
1718
|
+
if (e.setFocusedKey(g, J), e.isLink(g) && M === "override") return;
|
1719
|
+
f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && !Fe(f) && e.replaceSelection(g);
|
1685
1720
|
}
|
1686
1721
|
};
|
1687
|
-
switch (
|
1722
|
+
switch (f.key) {
|
1688
1723
|
case "ArrowDown":
|
1689
1724
|
if (r.getKeyBelow) {
|
1690
|
-
var
|
1691
|
-
|
1692
|
-
|
1693
|
-
m == null && o && (m = (a = r.getFirstKey) === null || a === void 0 ? void 0 : a.call(r, e.focusedKey)), u(m);
|
1725
|
+
var T, c, S;
|
1726
|
+
let g = e.focusedKey != null ? (T = r.getKeyBelow) === null || T === void 0 ? void 0 : T.call(r, e.focusedKey) : (c = r.getFirstKey) === null || c === void 0 ? void 0 : c.call(r);
|
1727
|
+
g == null && s && (g = (S = r.getFirstKey) === null || S === void 0 ? void 0 : S.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g));
|
1694
1728
|
}
|
1695
1729
|
break;
|
1696
1730
|
case "ArrowUp":
|
1697
1731
|
if (r.getKeyAbove) {
|
1698
|
-
var
|
1699
|
-
|
1700
|
-
|
1701
|
-
m == null && o && (m = (T = r.getLastKey) === null || T === void 0 ? void 0 : T.call(r, e.focusedKey)), u(m);
|
1732
|
+
var u, I, b;
|
1733
|
+
let g = e.focusedKey != null ? (u = r.getKeyAbove) === null || u === void 0 ? void 0 : u.call(r, e.focusedKey) : (I = r.getLastKey) === null || I === void 0 ? void 0 : I.call(r);
|
1734
|
+
g == null && s && (g = (b = r.getLastKey) === null || b === void 0 ? void 0 : b.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g));
|
1702
1735
|
}
|
1703
1736
|
break;
|
1704
1737
|
case "ArrowLeft":
|
1705
1738
|
if (r.getKeyLeftOf) {
|
1706
|
-
var
|
1707
|
-
|
1708
|
-
|
1709
|
-
m == null && o && (m = P === "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, P === "rtl" ? "first" : "last");
|
1739
|
+
var H, we, Pe;
|
1740
|
+
let g = (H = r.getKeyLeftOf) === null || H === void 0 ? void 0 : H.call(r, e.focusedKey);
|
1741
|
+
g == null && s && (g = k === "rtl" ? (we = r.getFirstKey) === null || we === void 0 ? void 0 : we.call(r, e.focusedKey) : (Pe = r.getLastKey) === null || Pe === void 0 ? void 0 : Pe.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g, k === "rtl" ? "first" : "last"));
|
1710
1742
|
}
|
1711
1743
|
break;
|
1712
1744
|
case "ArrowRight":
|
1713
1745
|
if (r.getKeyRightOf) {
|
1714
|
-
var
|
1715
|
-
|
1716
|
-
|
1717
|
-
m == null && o && (m = P === "rtl" ? (H = r.getLastKey) === null || H === void 0 ? void 0 : H.call(r, e.focusedKey) : (Te = r.getFirstKey) === null || Te === void 0 ? void 0 : Te.call(r, e.focusedKey)), u(m, P === "rtl" ? "last" : "first");
|
1746
|
+
var Ee, ke, xe;
|
1747
|
+
let g = (Ee = r.getKeyRightOf) === null || Ee === void 0 ? void 0 : Ee.call(r, e.focusedKey);
|
1748
|
+
g == null && s && (g = k === "rtl" ? (ke = r.getLastKey) === null || ke === void 0 ? void 0 : ke.call(r, e.focusedKey) : (xe = r.getFirstKey) === null || xe === void 0 ? void 0 : xe.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g, k === "rtl" ? "last" : "first"));
|
1718
1749
|
}
|
1719
1750
|
break;
|
1720
1751
|
case "Home":
|
1721
1752
|
if (r.getFirstKey) {
|
1722
|
-
|
1723
|
-
let
|
1724
|
-
e.setFocusedKey(
|
1753
|
+
f.preventDefault();
|
1754
|
+
let g = r.getFirstKey(e.focusedKey, se(f));
|
1755
|
+
e.setFocusedKey(g), se(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && e.replaceSelection(g);
|
1725
1756
|
}
|
1726
1757
|
break;
|
1727
1758
|
case "End":
|
1728
1759
|
if (r.getLastKey) {
|
1729
|
-
|
1730
|
-
let
|
1731
|
-
e.setFocusedKey(
|
1760
|
+
f.preventDefault();
|
1761
|
+
let g = r.getLastKey(e.focusedKey, se(f));
|
1762
|
+
e.setFocusedKey(g), se(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && e.replaceSelection(g);
|
1732
1763
|
}
|
1733
1764
|
break;
|
1734
1765
|
case "PageDown":
|
1735
1766
|
if (r.getKeyPageBelow) {
|
1736
|
-
|
1737
|
-
|
1738
|
-
u(m);
|
1767
|
+
let g = r.getKeyPageBelow(e.focusedKey);
|
1768
|
+
g != null && (f.preventDefault(), d(g));
|
1739
1769
|
}
|
1740
1770
|
break;
|
1741
1771
|
case "PageUp":
|
1742
1772
|
if (r.getKeyPageAbove) {
|
1743
|
-
|
1744
|
-
|
1745
|
-
u(m);
|
1773
|
+
let g = r.getKeyPageAbove(e.focusedKey);
|
1774
|
+
g != null && (f.preventDefault(), d(g));
|
1746
1775
|
}
|
1747
1776
|
break;
|
1748
1777
|
case "a":
|
1749
|
-
|
1778
|
+
se(f) && e.selectionMode === "multiple" && a !== !0 && (f.preventDefault(), e.selectAll());
|
1750
1779
|
break;
|
1751
1780
|
case "Escape":
|
1752
|
-
!
|
1781
|
+
!o && e.selectedKeys.size !== 0 && (f.stopPropagation(), f.preventDefault(), e.clearSelection());
|
1753
1782
|
break;
|
1754
1783
|
case "Tab":
|
1755
|
-
if (!
|
1756
|
-
if (
|
1784
|
+
if (!w) {
|
1785
|
+
if (f.shiftKey) n.current.focus();
|
1757
1786
|
else {
|
1758
|
-
let
|
1787
|
+
let g = Ut(n.current, {
|
1759
1788
|
tabbable: !0
|
1760
|
-
}),
|
1789
|
+
}), J, ne;
|
1761
1790
|
do
|
1762
|
-
|
1763
|
-
while (
|
1764
|
-
|
1791
|
+
ne = g.lastChild(), ne && (J = ne);
|
1792
|
+
while (ne);
|
1793
|
+
J && !J.contains(document.activeElement) && j(J);
|
1765
1794
|
}
|
1766
1795
|
break;
|
1767
1796
|
}
|
1768
1797
|
}
|
1769
|
-
}, x =
|
1798
|
+
}, x = L({
|
1770
1799
|
top: 0,
|
1771
1800
|
left: 0
|
1772
1801
|
});
|
1773
|
-
|
1802
|
+
rt(m, "scroll", $ ? null : () => {
|
1774
1803
|
x.current = {
|
1775
|
-
top:
|
1776
|
-
left:
|
1804
|
+
top: m.current.scrollTop,
|
1805
|
+
left: m.current.scrollLeft
|
1777
1806
|
};
|
1778
1807
|
});
|
1779
|
-
let
|
1808
|
+
let K = (f) => {
|
1780
1809
|
if (e.isFocused) {
|
1781
|
-
|
1810
|
+
f.currentTarget.contains(f.target) || e.setFocused(!1);
|
1782
1811
|
return;
|
1783
1812
|
}
|
1784
|
-
if (
|
1813
|
+
if (f.currentTarget.contains(f.target)) {
|
1785
1814
|
if (e.setFocused(!0), e.focusedKey == null) {
|
1786
|
-
let
|
1787
|
-
|
1788
|
-
},
|
1789
|
-
var
|
1790
|
-
|
1791
|
-
} else
|
1815
|
+
let c = (u) => {
|
1816
|
+
u != null && (e.setFocusedKey(u), p && e.replaceSelection(u));
|
1817
|
+
}, S = f.relatedTarget;
|
1818
|
+
var d, T;
|
1819
|
+
S && f.currentTarget.compareDocumentPosition(S) & Node.DOCUMENT_POSITION_FOLLOWING ? c((d = e.lastSelectedKey) !== null && d !== void 0 ? d : r.getLastKey()) : c((T = e.firstSelectedKey) !== null && T !== void 0 ? T : r.getFirstKey());
|
1820
|
+
} else $ || (m.current.scrollTop = x.current.top, m.current.scrollLeft = x.current.left);
|
1792
1821
|
if (e.focusedKey != null) {
|
1793
|
-
let
|
1794
|
-
|
1822
|
+
let c = m.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1823
|
+
c && (c.contains(document.activeElement) || j(c), Ne() === "keyboard" && it(c, {
|
1795
1824
|
containingElement: n.current
|
1796
1825
|
}));
|
1797
1826
|
}
|
1798
1827
|
}
|
1799
|
-
},
|
1800
|
-
|
1828
|
+
}, D = (f) => {
|
1829
|
+
f.currentTarget.contains(f.relatedTarget) || e.setFocused(!1);
|
1801
1830
|
};
|
1802
|
-
const
|
1831
|
+
const _ = L(i);
|
1803
1832
|
O(() => {
|
1804
|
-
if (
|
1805
|
-
let
|
1806
|
-
i === "first" && (
|
1807
|
-
let
|
1808
|
-
if (
|
1809
|
-
for (let
|
1810
|
-
|
1833
|
+
if (_.current) {
|
1834
|
+
let f = null;
|
1835
|
+
i === "first" && (f = r.getFirstKey()), i === "last" && (f = r.getLastKey());
|
1836
|
+
let d = e.selectedKeys;
|
1837
|
+
if (d.size) {
|
1838
|
+
for (let T of d) if (e.canSelectItem(T)) {
|
1839
|
+
f = T;
|
1811
1840
|
break;
|
1812
1841
|
}
|
1813
1842
|
}
|
1814
|
-
e.setFocused(!0), e.setFocusedKey(
|
1843
|
+
e.setFocused(!0), e.setFocusedKey(f), f == null && !v && Re(n.current);
|
1815
1844
|
}
|
1816
1845
|
}, []);
|
1817
|
-
let
|
1846
|
+
let C = L(e.focusedKey);
|
1818
1847
|
O(() => {
|
1819
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !==
|
1820
|
-
let
|
1821
|
-
if (!
|
1848
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== C.current || _.current) && (m != null && m.current)) {
|
1849
|
+
let f = Ne(), d = n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1850
|
+
if (!d)
|
1822
1851
|
return;
|
1823
|
-
(
|
1852
|
+
(f === "keyboard" || _.current) && (Lt(m.current, d), f !== "virtual" && it(d, {
|
1824
1853
|
containingElement: n.current
|
1825
1854
|
}));
|
1826
1855
|
}
|
1827
|
-
e.isFocused && e.focusedKey == null &&
|
1828
|
-
}),
|
1829
|
-
|
1856
|
+
!v && e.isFocused && e.focusedKey == null && C.current != null && Re(n.current), C.current = e.focusedKey, _.current = !1;
|
1857
|
+
}), rt(n, "react-aria-focus-scope-restore", (f) => {
|
1858
|
+
f.preventDefault(), e.setFocused(!0);
|
1830
1859
|
});
|
1831
|
-
let
|
1860
|
+
let F = {
|
1832
1861
|
onKeyDown: E,
|
1833
|
-
onFocus:
|
1834
|
-
onBlur:
|
1835
|
-
onMouseDown(
|
1836
|
-
|
1862
|
+
onFocus: K,
|
1863
|
+
onBlur: D,
|
1864
|
+
onMouseDown(f) {
|
1865
|
+
m.current === f.target && f.preventDefault();
|
1837
1866
|
}
|
1838
|
-
}, { typeSelectProps: l } =
|
1867
|
+
}, { typeSelectProps: l } = Wr({
|
1839
1868
|
keyboardDelegate: r,
|
1840
1869
|
selectionManager: e
|
1841
1870
|
});
|
1842
|
-
|
1843
|
-
let
|
1844
|
-
return
|
1871
|
+
h || (F = q(l, F));
|
1872
|
+
let y;
|
1873
|
+
return v || (y = e.focusedKey == null ? 0 : -1), {
|
1845
1874
|
collectionProps: {
|
1846
|
-
...
|
1847
|
-
tabIndex:
|
1875
|
+
...F,
|
1876
|
+
tabIndex: y
|
1848
1877
|
}
|
1849
1878
|
};
|
1850
1879
|
}
|
1851
|
-
function
|
1852
|
-
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus:
|
1853
|
-
if (b.pointerType === "keyboard" &&
|
1880
|
+
function mn(t) {
|
1881
|
+
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: s, focus: o, isDisabled: a, onAction: p, allowsDifferentPressOrigin: h, linkBehavior: v = "action" } = t, w = We(), $ = (b) => {
|
1882
|
+
if (b.pointerType === "keyboard" && Fe(b)) e.toggleSelection(r);
|
1854
1883
|
else {
|
1855
1884
|
if (e.selectionMode === "none") return;
|
1856
1885
|
if (e.isLink(r)) {
|
1857
|
-
if (
|
1886
|
+
if (v === "selection") {
|
1858
1887
|
let H = e.getItemProps(r);
|
1859
|
-
|
1888
|
+
w.open(n.current, b, H.href, H.routerOptions), e.setSelectedKeys(e.selectedKeys);
|
1860
1889
|
return;
|
1861
|
-
} else if (
|
1890
|
+
} else if (v === "override" || v === "none") return;
|
1862
1891
|
}
|
1863
|
-
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (
|
1892
|
+
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (se(b) || b.pointerType === "touch" || b.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
|
1864
1893
|
}
|
1865
1894
|
};
|
1866
1895
|
O(() => {
|
1867
|
-
r === e.focusedKey && e.isFocused && !
|
1896
|
+
r === e.focusedKey && e.isFocused && !s && (o ? o() : document.activeElement !== n.current && Re(n.current));
|
1868
1897
|
}, [
|
1869
1898
|
n,
|
1870
1899
|
r,
|
1871
1900
|
e.focusedKey,
|
1872
1901
|
e.childFocusStrategy,
|
1873
1902
|
e.isFocused,
|
1874
|
-
|
1875
|
-
]),
|
1876
|
-
let
|
1877
|
-
!
|
1903
|
+
s
|
1904
|
+
]), a = a || e.isDisabled(r);
|
1905
|
+
let m = {};
|
1906
|
+
!s && !a ? m = {
|
1878
1907
|
tabIndex: r === e.focusedKey ? 0 : -1,
|
1879
1908
|
onFocus(b) {
|
1880
1909
|
b.target === n.current && e.setFocusedKey(r);
|
1881
1910
|
}
|
1882
|
-
} :
|
1911
|
+
} : a && (m.onMouseDown = (b) => {
|
1883
1912
|
b.preventDefault();
|
1884
1913
|
});
|
1885
|
-
let
|
1886
|
-
if (
|
1914
|
+
let M = e.isLink(r) && v === "override", k = e.isLink(r) && v !== "selection" && v !== "none", P = !a && e.canSelectItem(r) && !M, E = (p || k) && !a, x = E && (e.selectionBehavior === "replace" ? !P : !P || e.isEmpty), K = E && P && e.selectionBehavior === "replace", D = x || K, _ = L(null), C = D && P, F = L(!1), l = L(!1), y = (b) => {
|
1915
|
+
if (p && p(), k) {
|
1887
1916
|
let H = e.getItemProps(r);
|
1888
|
-
|
1917
|
+
w.open(n.current, b, H.href, H.routerOptions);
|
1889
1918
|
}
|
1890
|
-
},
|
1891
|
-
i ? (
|
1892
|
-
|
1893
|
-
},
|
1894
|
-
b.pointerType !== "keyboard" &&
|
1895
|
-
},
|
1896
|
-
if (x ||
|
1897
|
-
if (b.pointerType === "keyboard" && !
|
1898
|
-
|
1899
|
-
} else b.pointerType !== "keyboard" &&
|
1900
|
-
}) : (
|
1901
|
-
|
1902
|
-
},
|
1903
|
-
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" &&
|
1904
|
-
}),
|
1905
|
-
let { pressProps:
|
1906
|
-
|
1907
|
-
} : void 0, { longPressProps:
|
1908
|
-
isDisabled: !
|
1919
|
+
}, f = {};
|
1920
|
+
i ? (f.onPressStart = (b) => {
|
1921
|
+
_.current = b.pointerType, F.current = C, b.pointerType === "keyboard" && (!D || vt()) && $(b);
|
1922
|
+
}, h ? (f.onPressUp = x ? null : (b) => {
|
1923
|
+
b.pointerType !== "keyboard" && P && $(b);
|
1924
|
+
}, f.onPress = x ? y : null) : f.onPress = (b) => {
|
1925
|
+
if (x || K && b.pointerType !== "mouse") {
|
1926
|
+
if (b.pointerType === "keyboard" && !pt()) return;
|
1927
|
+
y(b);
|
1928
|
+
} else b.pointerType !== "keyboard" && P && $(b);
|
1929
|
+
}) : (f.onPressStart = (b) => {
|
1930
|
+
_.current = b.pointerType, F.current = C, l.current = x, P && (b.pointerType === "mouse" && !x || b.pointerType === "keyboard" && (!E || vt())) && $(b);
|
1931
|
+
}, f.onPress = (b) => {
|
1932
|
+
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" && D && pt() || b.pointerType === "mouse" && l.current) && (D ? y(b) : P && $(b));
|
1933
|
+
}), m["data-key"] = r, f.preventFocusOnPress = s;
|
1934
|
+
let { pressProps: d, isPressed: T } = Ct(f), c = K ? (b) => {
|
1935
|
+
_.current === "mouse" && (b.stopPropagation(), b.preventDefault(), y(b));
|
1936
|
+
} : void 0, { longPressProps: S } = sn({
|
1937
|
+
isDisabled: !C,
|
1909
1938
|
onLongPress(b) {
|
1910
|
-
b.pointerType === "touch" && (
|
1939
|
+
b.pointerType === "touch" && ($(b), e.setSelectionBehavior("toggle"));
|
1911
1940
|
}
|
1912
|
-
}),
|
1913
|
-
|
1914
|
-
},
|
1915
|
-
|
1941
|
+
}), u = (b) => {
|
1942
|
+
_.current === "touch" && F.current && b.preventDefault();
|
1943
|
+
}, I = e.isLink(r) ? (b) => {
|
1944
|
+
te.isOpening || b.preventDefault();
|
1916
1945
|
} : void 0;
|
1917
1946
|
return {
|
1918
|
-
itemProps:
|
1919
|
-
onDoubleClick:
|
1920
|
-
onDragStartCapture:
|
1921
|
-
onClick:
|
1947
|
+
itemProps: q(m, P || x ? d : {}, C ? S : {}, {
|
1948
|
+
onDoubleClick: c,
|
1949
|
+
onDragStartCapture: u,
|
1950
|
+
onClick: I
|
1922
1951
|
}),
|
1923
|
-
isPressed:
|
1952
|
+
isPressed: T,
|
1924
1953
|
isSelected: e.isSelected(r),
|
1925
1954
|
isFocused: e.isFocused && e.focusedKey === r,
|
1926
|
-
isDisabled:
|
1927
|
-
allowsSelection:
|
1928
|
-
hasAction:
|
1955
|
+
isDisabled: a,
|
1956
|
+
allowsSelection: P,
|
1957
|
+
hasAction: D
|
1929
1958
|
};
|
1930
1959
|
}
|
1931
|
-
function
|
1960
|
+
function pt() {
|
1932
1961
|
let t = window.event;
|
1933
1962
|
return (t == null ? void 0 : t.key) === "Enter";
|
1934
1963
|
}
|
1935
|
-
function
|
1964
|
+
function vt() {
|
1936
1965
|
let t = window.event;
|
1937
1966
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
1938
1967
|
}
|
1939
|
-
function
|
1940
|
-
let { key: n, isDisabled: i, shouldSelectOnPressUp:
|
1941
|
-
selectionManager:
|
1968
|
+
function Kn(t, e, r) {
|
1969
|
+
let { key: n, isDisabled: i, shouldSelectOnPressUp: s } = t, { selectionManager: o, selectedKey: a } = e, p = n === a, h = i || e.isDisabled || e.selectionManager.isDisabled(n), { itemProps: v, isPressed: w } = mn({
|
1970
|
+
selectionManager: o,
|
1942
1971
|
key: n,
|
1943
1972
|
ref: r,
|
1944
|
-
isDisabled:
|
1945
|
-
shouldSelectOnPressUp:
|
1973
|
+
isDisabled: h,
|
1974
|
+
shouldSelectOnPressUp: s,
|
1946
1975
|
linkBehavior: "selection"
|
1947
|
-
}),
|
1976
|
+
}), $ = me(e, n, "tab"), m = me(e, n, "tabpanel"), { tabIndex: M } = v, k = e.collection.getItem(n), P = wr(k == null ? void 0 : k.props, {
|
1948
1977
|
labelable: !0
|
1949
1978
|
});
|
1950
|
-
delete
|
1951
|
-
let E =
|
1979
|
+
delete P.id;
|
1980
|
+
let E = Fr(k == null ? void 0 : k.props);
|
1952
1981
|
return {
|
1953
|
-
tabProps:
|
1954
|
-
id:
|
1955
|
-
"aria-selected":
|
1956
|
-
"aria-disabled":
|
1957
|
-
"aria-controls":
|
1958
|
-
tabIndex:
|
1982
|
+
tabProps: q(P, E, v, {
|
1983
|
+
id: $,
|
1984
|
+
"aria-selected": p,
|
1985
|
+
"aria-disabled": h || void 0,
|
1986
|
+
"aria-controls": p ? m : void 0,
|
1987
|
+
tabIndex: h ? void 0 : M,
|
1959
1988
|
role: "tab"
|
1960
1989
|
}),
|
1961
|
-
isSelected:
|
1962
|
-
isDisabled:
|
1963
|
-
isPressed:
|
1990
|
+
isSelected: p,
|
1991
|
+
isDisabled: h,
|
1992
|
+
isPressed: w
|
1964
1993
|
};
|
1965
1994
|
}
|
1966
|
-
function
|
1967
|
-
let n =
|
1995
|
+
function Sn(t, e, r) {
|
1996
|
+
let n = fn(r) ? void 0 : 0;
|
1968
1997
|
var i;
|
1969
|
-
const
|
1998
|
+
const s = me(e, (i = t.id) !== null && i !== void 0 ? i : e == null ? void 0 : e.selectedKey, "tabpanel"), o = _t({
|
1970
1999
|
...t,
|
1971
|
-
id:
|
1972
|
-
"aria-labelledby":
|
2000
|
+
id: s,
|
2001
|
+
"aria-labelledby": me(e, e == null ? void 0 : e.selectedKey, "tab")
|
1973
2002
|
});
|
1974
2003
|
return {
|
1975
|
-
tabPanelProps:
|
2004
|
+
tabPanelProps: q(o, {
|
1976
2005
|
tabIndex: n,
|
1977
2006
|
role: "tabpanel",
|
1978
2007
|
"aria-describedby": t["aria-describedby"],
|
@@ -1980,19 +2009,13 @@ function gn(t, e, r) {
|
|
1980
2009
|
})
|
1981
2010
|
};
|
1982
2011
|
}
|
1983
|
-
class
|
2012
|
+
class Tn {
|
1984
2013
|
getKeyLeftOf(e) {
|
1985
2014
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
1986
2015
|
}
|
1987
2016
|
getKeyRightOf(e) {
|
1988
2017
|
return this.flipDirection ? this.getPreviousKey(e) : this.getNextKey(e);
|
1989
2018
|
}
|
1990
|
-
getKeyAbove(e) {
|
1991
|
-
return this.getPreviousKey(e);
|
1992
|
-
}
|
1993
|
-
getKeyBelow(e) {
|
1994
|
-
return this.getNextKey(e);
|
1995
|
-
}
|
1996
2019
|
isDisabled(e) {
|
1997
2020
|
var r, n;
|
1998
2021
|
return this.disabledKeys.has(e) || !!(!((n = this.collection.getItem(e)) === null || n === void 0 || (r = n.props) === null || r === void 0) && r.isDisabled);
|
@@ -2005,6 +2028,12 @@ class hn {
|
|
2005
2028
|
let e = this.collection.getLastKey();
|
2006
2029
|
return e != null && this.isDisabled(e) && (e = this.getPreviousKey(e)), e;
|
2007
2030
|
}
|
2031
|
+
getKeyAbove(e) {
|
2032
|
+
return this.tabDirection ? null : this.getPreviousKey(e);
|
2033
|
+
}
|
2034
|
+
getKeyBelow(e) {
|
2035
|
+
return this.tabDirection ? null : this.getNextKey(e);
|
2036
|
+
}
|
2008
2037
|
getNextKey(e) {
|
2009
2038
|
do
|
2010
2039
|
e = this.collection.getKeyAfter(e), e == null && (e = this.collection.getFirstKey());
|
@@ -2018,39 +2047,39 @@ class hn {
|
|
2018
2047
|
return e;
|
2019
2048
|
}
|
2020
2049
|
constructor(e, r, n, i = /* @__PURE__ */ new Set()) {
|
2021
|
-
this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.disabledKeys = i;
|
2050
|
+
this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.disabledKeys = i, this.tabDirection = n === "horizontal";
|
2022
2051
|
}
|
2023
2052
|
}
|
2024
|
-
function
|
2025
|
-
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection:
|
2026
|
-
|
2027
|
-
|
2053
|
+
function wn(t, e, r) {
|
2054
|
+
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: s, selectionManager: o, disabledKeys: a } = e, { direction: p } = Wt(), h = V(() => new Tn(s, p, n, a), [
|
2055
|
+
s,
|
2056
|
+
a,
|
2028
2057
|
n,
|
2029
|
-
|
2030
|
-
]), { collectionProps:
|
2058
|
+
p
|
2059
|
+
]), { collectionProps: v } = $n({
|
2031
2060
|
ref: r,
|
2032
|
-
selectionManager:
|
2033
|
-
keyboardDelegate:
|
2061
|
+
selectionManager: o,
|
2062
|
+
keyboardDelegate: h,
|
2034
2063
|
selectOnFocus: i === "automatic",
|
2035
2064
|
disallowEmptySelection: !0,
|
2036
2065
|
scrollRef: r,
|
2037
2066
|
linkBehavior: "selection"
|
2038
|
-
}),
|
2039
|
-
|
2040
|
-
let
|
2067
|
+
}), w = St();
|
2068
|
+
$t.set(e, w);
|
2069
|
+
let $ = _t({
|
2041
2070
|
...t,
|
2042
|
-
id:
|
2071
|
+
id: w
|
2043
2072
|
});
|
2044
2073
|
return {
|
2045
2074
|
tabListProps: {
|
2046
|
-
...
|
2075
|
+
...q(v, $),
|
2047
2076
|
role: "tablist",
|
2048
2077
|
"aria-orientation": n,
|
2049
2078
|
tabIndex: void 0
|
2050
2079
|
}
|
2051
2080
|
};
|
2052
2081
|
}
|
2053
|
-
function
|
2082
|
+
function Pn(t, e, r) {
|
2054
2083
|
return e in t ? Object.defineProperty(t, e, {
|
2055
2084
|
value: r,
|
2056
2085
|
enumerable: !0,
|
@@ -2058,7 +2087,7 @@ function mn(t, e, r) {
|
|
2058
2087
|
writable: !0
|
2059
2088
|
}) : t[e] = r, t;
|
2060
2089
|
}
|
2061
|
-
function
|
2090
|
+
function bt(t, e) {
|
2062
2091
|
var r = Object.keys(t);
|
2063
2092
|
if (Object.getOwnPropertySymbols) {
|
2064
2093
|
var n = Object.getOwnPropertySymbols(t);
|
@@ -2068,129 +2097,129 @@ function ut(t, e) {
|
|
2068
2097
|
}
|
2069
2098
|
return r;
|
2070
2099
|
}
|
2071
|
-
function
|
2100
|
+
function ht(t) {
|
2072
2101
|
for (var e = 1; e < arguments.length; e++) {
|
2073
2102
|
var r = arguments[e] != null ? arguments[e] : {};
|
2074
|
-
e % 2 ?
|
2075
|
-
|
2076
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
2103
|
+
e % 2 ? bt(Object(r), !0).forEach(function(n) {
|
2104
|
+
Pn(t, n, r[n]);
|
2105
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : bt(Object(r)).forEach(function(n) {
|
2077
2106
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
2078
2107
|
});
|
2079
2108
|
}
|
2080
2109
|
return t;
|
2081
2110
|
}
|
2082
|
-
var
|
2111
|
+
var En = (t, e, r) => {
|
2083
2112
|
for (var n of Object.keys(t)) {
|
2084
2113
|
var i;
|
2085
2114
|
if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
|
2086
2115
|
return !1;
|
2087
2116
|
}
|
2088
2117
|
return !0;
|
2089
|
-
},
|
2090
|
-
var r = t.defaultClassName, n =
|
2118
|
+
}, Ye = (t) => (e) => {
|
2119
|
+
var r = t.defaultClassName, n = ht(ht({}, t.defaultVariants), e);
|
2091
2120
|
for (var i in n) {
|
2092
|
-
var
|
2093
|
-
if (
|
2094
|
-
var
|
2095
|
-
typeof
|
2096
|
-
var
|
2121
|
+
var s, o = (s = n[i]) !== null && s !== void 0 ? s : t.defaultVariants[i];
|
2122
|
+
if (o != null) {
|
2123
|
+
var a = o;
|
2124
|
+
typeof a == "boolean" && (a = a === !0 ? "true" : "false");
|
2125
|
+
var p = (
|
2097
2126
|
// @ts-expect-error
|
2098
|
-
t.variantClassNames[i][
|
2127
|
+
t.variantClassNames[i][a]
|
2099
2128
|
);
|
2100
|
-
|
2129
|
+
p && (r += " " + p);
|
2101
2130
|
}
|
2102
2131
|
}
|
2103
|
-
for (var [
|
2104
|
-
|
2132
|
+
for (var [h, v] of t.compoundVariants)
|
2133
|
+
En(h, n, t.defaultVariants) && (r += " " + v);
|
2105
2134
|
return r;
|
2106
|
-
},
|
2107
|
-
function
|
2135
|
+
}, kn = Ye({ defaultClassName: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzd"]] }), xn = Ye({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_20_10__hash_kz6kzzk"]] });
|
2136
|
+
function jt({
|
2108
2137
|
context: t,
|
2109
2138
|
item: e,
|
2110
2139
|
state: r,
|
2111
2140
|
...n
|
2112
2141
|
}) {
|
2113
|
-
const { key: i } = e,
|
2114
|
-
className:
|
2142
|
+
const { key: i } = e, s = R.useRef(null), { tabProps: o } = Kn({ key: i }, r, s), a = r.selectedKey === i, p = r.disabledKeys.has(i), h = Qt(e.rendered, (v) => v.type.displayName === "SpsTag" || fe.isWoodlandComponent(v.type) && fe.get(v.type).name === "Tag" ? [{
|
2143
|
+
className: yt(v.props.className, xn({ active: a, disabled: p, context: t }))
|
2115
2144
|
}] : [{}]);
|
2116
|
-
return /* @__PURE__ */
|
2145
|
+
return /* @__PURE__ */ R.createElement(
|
2117
2146
|
"div",
|
2118
2147
|
{
|
2119
|
-
...
|
2120
|
-
ref:
|
2121
|
-
className:
|
2148
|
+
...o,
|
2149
|
+
ref: s,
|
2150
|
+
className: kn({ active: a, disabled: p, context: t }),
|
2122
2151
|
...n
|
2123
2152
|
},
|
2124
|
-
|
2153
|
+
h
|
2125
2154
|
);
|
2126
2155
|
}
|
2127
|
-
|
2128
|
-
function
|
2156
|
+
fe.set(jt, { name: "Tab" });
|
2157
|
+
function Vt({
|
2129
2158
|
context: t,
|
2130
2159
|
"data-testid": e,
|
2131
2160
|
state: r,
|
2132
2161
|
...n
|
2133
2162
|
}) {
|
2134
|
-
const i =
|
2135
|
-
return /* @__PURE__ */
|
2136
|
-
|
2163
|
+
const i = R.useRef(null), { tabPanelProps: s } = Sn(n, r, i), o = t === "container" ? er : "div";
|
2164
|
+
return /* @__PURE__ */ R.createElement(
|
2165
|
+
o,
|
2137
2166
|
{
|
2138
|
-
...
|
2167
|
+
...s,
|
2139
2168
|
ref: i,
|
2140
2169
|
"data-testid": e
|
2141
2170
|
},
|
2142
2171
|
r.selectedItem ? r.selectedItem.props.children : null
|
2143
2172
|
);
|
2144
2173
|
}
|
2145
|
-
|
2146
|
-
var
|
2147
|
-
function
|
2174
|
+
fe.set(Vt, { name: "TabPanel" });
|
2175
|
+
var _n = Ye({ defaultClassName: "pkg_sps-woodland_tabs__version_8_20_10__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_20_10__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_20_10__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
2176
|
+
function Gt({
|
2148
2177
|
className: t,
|
2149
2178
|
context: e = "navigation",
|
2150
2179
|
"data-testid": r,
|
2151
2180
|
...n
|
2152
2181
|
}) {
|
2153
|
-
const i =
|
2154
|
-
return /* @__PURE__ */
|
2182
|
+
const i = sr(n), s = R.useRef(null), { tabListProps: o } = wn(n, i, s), a = tr({ "data-testid": r });
|
2183
|
+
return /* @__PURE__ */ R.createElement(R.Fragment, null, /* @__PURE__ */ R.createElement(
|
2155
2184
|
"div",
|
2156
2185
|
{
|
2157
|
-
...
|
2158
|
-
ref:
|
2159
|
-
className:
|
2186
|
+
...o,
|
2187
|
+
ref: s,
|
2188
|
+
className: yt(_n({ context: e }), t),
|
2160
2189
|
"data-testid": r
|
2161
2190
|
},
|
2162
|
-
[...i.collection].map((
|
2163
|
-
|
2191
|
+
[...i.collection].map((p) => /* @__PURE__ */ R.createElement(
|
2192
|
+
jt,
|
2164
2193
|
{
|
2165
|
-
key:
|
2166
|
-
item:
|
2194
|
+
key: p.key,
|
2195
|
+
item: p,
|
2167
2196
|
state: i,
|
2168
2197
|
context: e,
|
2169
|
-
...
|
2198
|
+
...a(`tab-${String(p.key)}`)
|
2170
2199
|
}
|
2171
2200
|
))
|
2172
|
-
), /* @__PURE__ */
|
2173
|
-
|
2201
|
+
), /* @__PURE__ */ R.createElement(
|
2202
|
+
Vt,
|
2174
2203
|
{
|
2175
2204
|
key: i.selectedItem ? i.selectedItem.key : null,
|
2176
2205
|
state: i,
|
2177
2206
|
context: e,
|
2178
|
-
...
|
2207
|
+
...a("tab-panel")
|
2179
2208
|
}
|
2180
2209
|
));
|
2181
2210
|
}
|
2182
|
-
|
2183
|
-
const
|
2184
|
-
components: [
|
2211
|
+
fe.set(Gt, { name: "Tabs" });
|
2212
|
+
const Ln = {
|
2213
|
+
components: [Gt],
|
2185
2214
|
examples: {
|
2186
2215
|
basic: {
|
2187
2216
|
label: "Basic Navigation Tabs",
|
2188
|
-
description:
|
2217
|
+
description: Je`
|
2189
2218
|
<p>Navigation tabs</p>
|
2190
2219
|
`,
|
2191
2220
|
examples: {
|
2192
2221
|
basic: {
|
2193
|
-
react:
|
2222
|
+
react: Je`
|
2194
2223
|
import { Item } from "@react-stately/collections";
|
2195
2224
|
import { Box, Icon } from "@sps-woodland/core";
|
2196
2225
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -2256,10 +2285,10 @@ const Pn = {
|
|
2256
2285
|
}
|
2257
2286
|
}
|
2258
2287
|
}
|
2259
|
-
},
|
2260
|
-
"Tabbed Navigation":
|
2288
|
+
}, Fn = {
|
2289
|
+
"Tabbed Navigation": Ln
|
2261
2290
|
};
|
2262
2291
|
export {
|
2263
|
-
|
2264
|
-
|
2292
|
+
Fn as MANIFEST,
|
2293
|
+
Gt as Tabs
|
2265
2294
|
};
|