@sps-woodland/focused-task 8.7.4 → 8.7.5
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 +397 -377
- package/lib/style.css +1 -1
- package/package.json +7 -8
- /package/{vite.config.js → vite.config.mjs} +0 -0
package/lib/index.es.js
CHANGED
@@ -1,42 +1,51 @@
|
|
1
|
-
import { Metadata as
|
1
|
+
import { Metadata as Pe, cl as R, combineEventHandlers as me, useChildTestIdAttrBuilder as Ye, selectChildren as Qe, modChildren as Ze, contentOf as $e } from "@sps-woodland/core";
|
2
2
|
import { Button as et } from "@sps-woodland/buttons";
|
3
3
|
import * as d from "react";
|
4
|
-
import h, {
|
5
|
-
import
|
4
|
+
import h, { useRef as y, useCallback as N, useState as j, useContext as A, useEffect as P, useMemo as H, createContext as tt } from "react";
|
5
|
+
import nt from "react-dom";
|
6
6
|
import { code as he } from "@spscommerce/utils";
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
a
|
14
|
-
]);
|
15
|
-
let l = a ? e : r, u = N((c, ...s) => {
|
16
|
-
let f = (p, ...v) => {
|
17
|
-
n && (Object.is(l, p) || n(p, ...v)), a || (l = p);
|
18
|
-
};
|
19
|
-
typeof c == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), o((v, ...m) => {
|
20
|
-
let P = c(a ? l : v, ...m);
|
21
|
-
return f(P, ...s), a ? v : P;
|
22
|
-
})) : (a || o(c), f(c, ...s));
|
7
|
+
const E = typeof document < "u" ? h.useLayoutEffect : () => {
|
8
|
+
};
|
9
|
+
function K(e) {
|
10
|
+
const t = y(null);
|
11
|
+
return E(() => {
|
12
|
+
t.current = e;
|
23
13
|
}, [
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
e
|
15
|
+
]), N((...n) => {
|
16
|
+
const r = t.current;
|
17
|
+
return r == null ? void 0 : r(...n);
|
18
|
+
}, []);
|
19
|
+
}
|
20
|
+
function rt(e) {
|
21
|
+
let [t, n] = j(e), r = y(null), o = K(() => {
|
22
|
+
if (!r.current)
|
23
|
+
return;
|
24
|
+
let a = r.current.next();
|
25
|
+
if (a.done) {
|
26
|
+
r.current = null;
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
t === a.value ? o() : n(a.value);
|
30
|
+
});
|
31
|
+
E(() => {
|
32
|
+
r.current && o();
|
33
|
+
});
|
34
|
+
let i = K((a) => {
|
35
|
+
r.current = a(t), o();
|
36
|
+
});
|
28
37
|
return [
|
29
|
-
|
30
|
-
|
38
|
+
t,
|
39
|
+
i
|
31
40
|
];
|
32
41
|
}
|
33
42
|
const U = {
|
34
43
|
prefix: String(Math.round(Math.random() * 1e10)),
|
35
44
|
current: 0
|
36
|
-
},
|
37
|
-
let
|
38
|
-
function
|
39
|
-
let t =
|
45
|
+
}, ke = /* @__PURE__ */ h.createContext(U), ot = /* @__PURE__ */ h.createContext(!1);
|
46
|
+
let at = !!(typeof window < "u" && window.document && window.document.createElement), re = /* @__PURE__ */ new WeakMap();
|
47
|
+
function it(e = !1) {
|
48
|
+
let t = A(ke), n = y(null);
|
40
49
|
if (n.current === null && !e) {
|
41
50
|
var r, o;
|
42
51
|
let i = (o = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
@@ -51,102 +60,48 @@ function at(e = !1) {
|
|
51
60
|
}
|
52
61
|
return n.current;
|
53
62
|
}
|
54
|
-
function
|
55
|
-
let t =
|
56
|
-
t === U && !
|
57
|
-
let n =
|
63
|
+
function lt(e) {
|
64
|
+
let t = A(ke);
|
65
|
+
t === U && !at && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
66
|
+
let n = it(!!e), r = t === U && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
58
67
|
return e || `${r}-${n}`;
|
59
68
|
}
|
60
|
-
function
|
61
|
-
let t = h.useId(), [n] =
|
69
|
+
function st(e) {
|
70
|
+
let t = h.useId(), [n] = j(Le()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${U.prefix}`;
|
62
71
|
return e || `${r}-${t}`;
|
63
72
|
}
|
64
|
-
const
|
65
|
-
function
|
73
|
+
const ct = typeof h.useId == "function" ? st : lt;
|
74
|
+
function ut() {
|
66
75
|
return !1;
|
67
76
|
}
|
68
|
-
function
|
77
|
+
function dt() {
|
69
78
|
return !0;
|
70
79
|
}
|
71
|
-
function
|
80
|
+
function ft(e) {
|
72
81
|
return () => {
|
73
82
|
};
|
74
83
|
}
|
75
84
|
function Le() {
|
76
|
-
return typeof h.useSyncExternalStore == "function" ? h.useSyncExternalStore(
|
85
|
+
return typeof h.useSyncExternalStore == "function" ? h.useSyncExternalStore(ft, ut, dt) : A(ot);
|
77
86
|
}
|
87
|
+
let pt = !!(typeof window < "u" && window.document && window.document.createElement), J = /* @__PURE__ */ new Map();
|
78
88
|
function Ce(e) {
|
79
|
-
|
80
|
-
if (typeof e == "string" || typeof e == "number")
|
81
|
-
r += e;
|
82
|
-
else if (typeof e == "object")
|
83
|
-
if (Array.isArray(e)) {
|
84
|
-
var o = e.length;
|
85
|
-
for (t = 0; t < o; t++)
|
86
|
-
e[t] && (n = Ce(e[t])) && (r && (r += " "), r += n);
|
87
|
-
} else
|
88
|
-
for (n in e)
|
89
|
-
e[n] && (r && (r += " "), r += n);
|
90
|
-
return r;
|
91
|
-
}
|
92
|
-
function ft() {
|
93
|
-
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++)
|
94
|
-
(e = arguments[n]) && (t = Ce(e)) && (r && (r += " "), r += t);
|
95
|
-
return r;
|
96
|
-
}
|
97
|
-
const E = typeof document < "u" ? h.useLayoutEffect : () => {
|
98
|
-
};
|
99
|
-
function V(e) {
|
100
|
-
const t = y(null);
|
101
|
-
return E(() => {
|
102
|
-
t.current = e;
|
103
|
-
}, [
|
104
|
-
e
|
105
|
-
]), N((...n) => {
|
106
|
-
const r = t.current;
|
107
|
-
return r == null ? void 0 : r(...n);
|
108
|
-
}, []);
|
109
|
-
}
|
110
|
-
function pt(e) {
|
111
|
-
let [t, n] = K(e), r = y(null), o = V(() => {
|
112
|
-
if (!r.current)
|
113
|
-
return;
|
114
|
-
let a = r.current.next();
|
115
|
-
if (a.done) {
|
116
|
-
r.current = null;
|
117
|
-
return;
|
118
|
-
}
|
119
|
-
t === a.value ? o() : n(a.value);
|
120
|
-
});
|
121
|
-
E(() => {
|
122
|
-
r.current && o();
|
123
|
-
});
|
124
|
-
let i = V((a) => {
|
125
|
-
r.current = a(t), o();
|
126
|
-
});
|
127
|
-
return [
|
128
|
-
t,
|
129
|
-
i
|
130
|
-
];
|
131
|
-
}
|
132
|
-
let vt = Boolean(typeof window < "u" && window.document && window.document.createElement), J = /* @__PURE__ */ new Map();
|
133
|
-
function Oe(e) {
|
134
|
-
let [t, n] = K(e), r = y(null), o = st(t), i = N((a) => {
|
89
|
+
let [t, n] = j(e), r = y(null), o = ct(t), i = N((a) => {
|
135
90
|
r.current = a;
|
136
91
|
}, []);
|
137
|
-
return
|
92
|
+
return pt && J.set(o, i), E(() => {
|
138
93
|
let a = o;
|
139
94
|
return () => {
|
140
95
|
J.delete(a);
|
141
96
|
};
|
142
97
|
}, [
|
143
98
|
o
|
144
|
-
]),
|
99
|
+
]), P(() => {
|
145
100
|
let a = r.current;
|
146
101
|
a && (r.current = null, n(a));
|
147
102
|
}), o;
|
148
103
|
}
|
149
|
-
function
|
104
|
+
function vt(e, t) {
|
150
105
|
if (e === t)
|
151
106
|
return e;
|
152
107
|
let n = J.get(e);
|
@@ -156,7 +111,7 @@ function mt(e, t) {
|
|
156
111
|
return r ? (r(e), e) : t;
|
157
112
|
}
|
158
113
|
function bt(e = []) {
|
159
|
-
let t =
|
114
|
+
let t = Ce(), [n, r] = rt(t), o = N(() => {
|
160
115
|
r(function* () {
|
161
116
|
yield t, yield document.getElementById(t) ? t : void 0;
|
162
117
|
});
|
@@ -180,6 +135,25 @@ const g = (e) => {
|
|
180
135
|
var t;
|
181
136
|
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
182
137
|
}, Y = (e) => e && "window" in e && e.window === e ? e : g(e).defaultView || window;
|
138
|
+
function Oe(e) {
|
139
|
+
var t, n, r = "";
|
140
|
+
if (typeof e == "string" || typeof e == "number")
|
141
|
+
r += e;
|
142
|
+
else if (typeof e == "object")
|
143
|
+
if (Array.isArray(e)) {
|
144
|
+
var o = e.length;
|
145
|
+
for (t = 0; t < o; t++)
|
146
|
+
e[t] && (n = Oe(e[t])) && (r && (r += " "), r += n);
|
147
|
+
} else
|
148
|
+
for (n in e)
|
149
|
+
e[n] && (r && (r += " "), r += n);
|
150
|
+
return r;
|
151
|
+
}
|
152
|
+
function mt() {
|
153
|
+
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++)
|
154
|
+
(e = arguments[n]) && (t = Oe(e)) && (r && (r += " "), r += t);
|
155
|
+
return r;
|
156
|
+
}
|
183
157
|
function $t(...e) {
|
184
158
|
let t = {
|
185
159
|
...e[0]
|
@@ -188,7 +162,10 @@ function $t(...e) {
|
|
188
162
|
let r = e[n];
|
189
163
|
for (let o in r) {
|
190
164
|
let i = t[o], a = r[o];
|
191
|
-
typeof i == "function" && typeof a == "function" &&
|
165
|
+
typeof i == "function" && typeof a == "function" && // This is a lot faster than a regex.
|
166
|
+
o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
|
167
|
+
65 && o.charCodeAt(2) <= /* 'Z' */
|
168
|
+
90 ? t[o] = X(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = mt(i, a) : o === "id" && i && a ? t.id = vt(i, a) : t[o] = a !== void 0 ? a : i;
|
192
169
|
}
|
193
170
|
}
|
194
171
|
return t;
|
@@ -202,6 +179,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
202
179
|
"aria-details"
|
203
180
|
]), gt = /* @__PURE__ */ new Set([
|
204
181
|
"href",
|
182
|
+
"hrefLang",
|
205
183
|
"target",
|
206
184
|
"rel",
|
207
185
|
"download",
|
@@ -211,7 +189,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
211
189
|
function yt(e, t = {}) {
|
212
190
|
let { labelable: n, isLink: r, propNames: o } = t, i = {};
|
213
191
|
for (const a in e)
|
214
|
-
Object.prototype.hasOwnProperty.call(e, a) && (ht.has(a) || n && Et.has(a) || r && gt.has(a) ||
|
192
|
+
Object.prototype.hasOwnProperty.call(e, a) && (ht.has(a) || n && Et.has(a) || r && gt.has(a) || o != null && o.has(a) || wt.test(a)) && (i[a] = e[a]);
|
215
193
|
return i;
|
216
194
|
}
|
217
195
|
function Ee(e) {
|
@@ -268,14 +246,15 @@ function ue(e) {
|
|
268
246
|
function Me() {
|
269
247
|
return ue(/^Mac/i);
|
270
248
|
}
|
271
|
-
function kt() {
|
272
|
-
return ue(/^iPhone/i);
|
273
|
-
}
|
274
249
|
function Ft() {
|
275
|
-
return ue(/^
|
250
|
+
return ue(/^iPhone/i);
|
276
251
|
}
|
277
252
|
function Pt() {
|
278
|
-
return
|
253
|
+
return ue(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
254
|
+
Me() && navigator.maxTouchPoints > 1;
|
255
|
+
}
|
256
|
+
function kt() {
|
257
|
+
return Ft() || Pt();
|
279
258
|
}
|
280
259
|
function Lt() {
|
281
260
|
return St(/Android/i);
|
@@ -298,7 +277,7 @@ function ge() {
|
|
298
277
|
if (!e(r) || !r.target)
|
299
278
|
return;
|
300
279
|
let o = M.get(r.target);
|
301
|
-
if (
|
280
|
+
if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), M.delete(r.target)), M.size === 0)) {
|
302
281
|
for (let i of ie)
|
303
282
|
i();
|
304
283
|
ie.clear();
|
@@ -312,26 +291,52 @@ function Ct(e) {
|
|
312
291
|
M.size === 0 ? e() : ie.add(e);
|
313
292
|
});
|
314
293
|
}
|
294
|
+
function we(e, t) {
|
295
|
+
let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
|
296
|
+
return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
|
297
|
+
}
|
315
298
|
function De(e, t) {
|
316
299
|
let n = e;
|
317
300
|
for (we(n, t) && (n = n.parentElement); n && !we(n, t); )
|
318
301
|
n = n.parentElement;
|
319
302
|
return n || document.scrollingElement || document.documentElement;
|
320
303
|
}
|
321
|
-
function we(e, t) {
|
322
|
-
let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
|
323
|
-
return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
|
324
|
-
}
|
325
304
|
function Ot(e) {
|
326
305
|
return e.mozInputSource === 0 && e.isTrusted ? !0 : Lt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
327
306
|
}
|
307
|
+
function Mt(e, t, n) {
|
308
|
+
let [r, o] = j(e || t), i = y(e !== void 0), a = e !== void 0;
|
309
|
+
P(() => {
|
310
|
+
let l = i.current;
|
311
|
+
l !== a && console.warn(`WARN: A component changed from ${l ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), i.current = a;
|
312
|
+
}, [
|
313
|
+
a
|
314
|
+
]);
|
315
|
+
let c = a ? e : r, u = N((l, ...s) => {
|
316
|
+
let f = (p, ...b) => {
|
317
|
+
n && (Object.is(c, p) || n(p, ...b)), a || (c = p);
|
318
|
+
};
|
319
|
+
typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), o((b, ...v) => {
|
320
|
+
let k = l(a ? c : b, ...v);
|
321
|
+
return f(k, ...s), a ? b : k;
|
322
|
+
})) : (a || o(l), f(l, ...s));
|
323
|
+
}, [
|
324
|
+
a,
|
325
|
+
c,
|
326
|
+
n
|
327
|
+
]);
|
328
|
+
return [
|
329
|
+
c,
|
330
|
+
u
|
331
|
+
];
|
332
|
+
}
|
328
333
|
const Ae = h.createContext({
|
329
334
|
register: () => {
|
330
335
|
}
|
331
336
|
});
|
332
337
|
Ae.displayName = "PressResponderContext";
|
333
|
-
function
|
334
|
-
let t =
|
338
|
+
function Dt({ children: e }) {
|
339
|
+
let t = H(() => ({
|
335
340
|
register: () => {
|
336
341
|
}
|
337
342
|
}), []);
|
@@ -339,7 +344,7 @@ function Mt({ children: e }) {
|
|
339
344
|
value: t
|
340
345
|
}, e);
|
341
346
|
}
|
342
|
-
class
|
347
|
+
class At {
|
343
348
|
isDefaultPrevented() {
|
344
349
|
return this.nativeEvent.defaultPrevented;
|
345
350
|
}
|
@@ -358,7 +363,7 @@ class Dt {
|
|
358
363
|
this.nativeEvent = n, this.target = n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget, this.bubbles = n.bubbles, this.cancelable = n.cancelable, this.defaultPrevented = n.defaultPrevented, this.eventPhase = n.eventPhase, this.isTrusted = n.isTrusted, this.timeStamp = n.timeStamp, this.type = t;
|
359
364
|
}
|
360
365
|
}
|
361
|
-
function
|
366
|
+
function Wt(e) {
|
362
367
|
let t = y({
|
363
368
|
isFocused: !1,
|
364
369
|
observer: null
|
@@ -369,14 +374,14 @@ function At(e) {
|
|
369
374
|
r.observer && (r.observer.disconnect(), r.observer = null);
|
370
375
|
};
|
371
376
|
}, []);
|
372
|
-
let n =
|
377
|
+
let n = K((r) => {
|
373
378
|
e == null || e(r);
|
374
379
|
});
|
375
380
|
return N((r) => {
|
376
381
|
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
377
382
|
t.current.isFocused = !0;
|
378
383
|
let o = r.target, i = (a) => {
|
379
|
-
t.current.isFocused = !1, o.disabled && n(new
|
384
|
+
t.current.isFocused = !1, o.disabled && n(new At("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
380
385
|
};
|
381
386
|
o.addEventListener("focusout", i, {
|
382
387
|
once: !0
|
@@ -384,12 +389,12 @@ function At(e) {
|
|
384
389
|
if (t.current.isFocused && o.disabled) {
|
385
390
|
var a;
|
386
391
|
(a = t.current.observer) === null || a === void 0 || a.disconnect();
|
387
|
-
let
|
392
|
+
let c = o === document.activeElement ? null : document.activeElement;
|
388
393
|
o.dispatchEvent(new FocusEvent("blur", {
|
389
|
-
relatedTarget:
|
394
|
+
relatedTarget: c
|
390
395
|
})), o.dispatchEvent(new FocusEvent("focusout", {
|
391
396
|
bubbles: !0,
|
392
|
-
relatedTarget:
|
397
|
+
relatedTarget: c
|
393
398
|
}));
|
394
399
|
}
|
395
400
|
}), t.current.observer.observe(o, {
|
@@ -403,16 +408,16 @@ function At(e) {
|
|
403
408
|
n
|
404
409
|
]);
|
405
410
|
}
|
406
|
-
let q = null,
|
411
|
+
let q = null, Bt = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Map(), O = !1, le = !1;
|
407
412
|
function de(e, t) {
|
408
|
-
for (let n of
|
413
|
+
for (let n of Bt)
|
409
414
|
n(e, t);
|
410
415
|
}
|
411
|
-
function
|
416
|
+
function It(e) {
|
412
417
|
return !(e.metaKey || !Me() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
413
418
|
}
|
414
419
|
function Q(e) {
|
415
|
-
O = !0,
|
420
|
+
O = !0, It(e) && (q = "keyboard", de("keyboard", e));
|
416
421
|
}
|
417
422
|
function x(e) {
|
418
423
|
q = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (O = !0, de("pointer", e));
|
@@ -427,7 +432,7 @@ function Ie() {
|
|
427
432
|
O = !1, le = !0;
|
428
433
|
}
|
429
434
|
function ye(e) {
|
430
|
-
if (typeof window > "u" ||
|
435
|
+
if (typeof window > "u" || V.get(Y(e)))
|
431
436
|
return;
|
432
437
|
const t = Y(e), n = g(e);
|
433
438
|
let r = t.HTMLElement.prototype.focus;
|
@@ -437,43 +442,44 @@ function ye(e) {
|
|
437
442
|
Re(e);
|
438
443
|
}, {
|
439
444
|
once: !0
|
440
|
-
}),
|
445
|
+
}), V.set(t, {
|
441
446
|
focus: r
|
442
447
|
});
|
443
448
|
}
|
444
449
|
const Re = (e, t) => {
|
445
450
|
const n = Y(e), r = g(e);
|
446
|
-
t && r.removeEventListener("DOMContentLoaded", t),
|
451
|
+
t && r.removeEventListener("DOMContentLoaded", t), V.has(n) && (n.HTMLElement.prototype.focus = V.get(n).focus, r.removeEventListener("keydown", Q, !0), r.removeEventListener("keyup", Q, !0), r.removeEventListener("click", We, !0), n.removeEventListener("focus", Be, !0), n.removeEventListener("blur", Ie, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", x, !0), r.removeEventListener("pointermove", x, !0), r.removeEventListener("pointerup", x, !0)) : (r.removeEventListener("mousedown", x, !0), r.removeEventListener("mousemove", x, !0), r.removeEventListener("mouseup", x, !0)), V.delete(n));
|
447
452
|
};
|
448
|
-
function
|
453
|
+
function Rt(e) {
|
449
454
|
const t = g(e);
|
450
455
|
let n;
|
451
456
|
return t.readyState !== "loading" ? ye(e) : (n = () => {
|
452
457
|
ye(e);
|
453
458
|
}, t.addEventListener("DOMContentLoaded", n)), () => Re(e, n);
|
454
459
|
}
|
455
|
-
typeof document < "u" &&
|
456
|
-
function
|
460
|
+
typeof document < "u" && Rt();
|
461
|
+
function Ht() {
|
457
462
|
return q;
|
458
463
|
}
|
459
|
-
function
|
464
|
+
function Vt(e) {
|
460
465
|
let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = y({
|
461
466
|
isFocusWithin: !1
|
462
|
-
}), a = N((
|
463
|
-
i.current.isFocusWithin && !
|
467
|
+
}), a = N((l) => {
|
468
|
+
i.current.isFocusWithin && !l.currentTarget.contains(l.relatedTarget) && (i.current.isFocusWithin = !1, n && n(l), o && o(!1));
|
464
469
|
}, [
|
465
470
|
n,
|
466
471
|
o,
|
467
472
|
i
|
468
|
-
]),
|
469
|
-
!i.current.isFocusWithin && document.activeElement ===
|
473
|
+
]), c = Wt(a), u = N((l) => {
|
474
|
+
!i.current.isFocusWithin && document.activeElement === l.target && (r && r(l), o && o(!0), i.current.isFocusWithin = !0, c(l));
|
470
475
|
}, [
|
471
476
|
r,
|
472
477
|
o,
|
473
|
-
|
478
|
+
c
|
474
479
|
]);
|
475
480
|
return t ? {
|
476
481
|
focusWithinProps: {
|
482
|
+
// These should not have been null, that would conflict in mergeProps
|
477
483
|
onFocus: void 0,
|
478
484
|
onBlur: void 0
|
479
485
|
}
|
@@ -484,32 +490,32 @@ function Ht(e) {
|
|
484
490
|
}
|
485
491
|
};
|
486
492
|
}
|
487
|
-
function
|
493
|
+
function Kt(e) {
|
488
494
|
let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = y({
|
489
495
|
isPointerDown: !1,
|
490
496
|
ignoreEmulatedMouseEvents: !1
|
491
|
-
}), a =
|
497
|
+
}), a = K((u) => {
|
492
498
|
n && _(u, t) && (o && o(u), i.current.isPointerDown = !0);
|
493
|
-
}),
|
499
|
+
}), c = K((u) => {
|
494
500
|
n && n(u);
|
495
501
|
});
|
496
|
-
|
502
|
+
P(() => {
|
497
503
|
let u = i.current;
|
498
504
|
if (r)
|
499
505
|
return;
|
500
|
-
const
|
506
|
+
const l = t.current, s = g(l);
|
501
507
|
if (typeof PointerEvent < "u") {
|
502
508
|
let f = (p) => {
|
503
|
-
u.isPointerDown && _(p, t) &&
|
509
|
+
u.isPointerDown && _(p, t) && c(p), u.isPointerDown = !1;
|
504
510
|
};
|
505
511
|
return s.addEventListener("pointerdown", a, !0), s.addEventListener("pointerup", f, !0), () => {
|
506
512
|
s.removeEventListener("pointerdown", a, !0), s.removeEventListener("pointerup", f, !0);
|
507
513
|
};
|
508
514
|
} else {
|
509
|
-
let f = (
|
510
|
-
u.ignoreEmulatedMouseEvents ? u.ignoreEmulatedMouseEvents = !1 : u.isPointerDown && _(
|
511
|
-
}, p = (
|
512
|
-
u.ignoreEmulatedMouseEvents = !0, u.isPointerDown && _(
|
515
|
+
let f = (b) => {
|
516
|
+
u.ignoreEmulatedMouseEvents ? u.ignoreEmulatedMouseEvents = !1 : u.isPointerDown && _(b, t) && c(b), u.isPointerDown = !1;
|
517
|
+
}, p = (b) => {
|
518
|
+
u.ignoreEmulatedMouseEvents = !0, u.isPointerDown && _(b, t) && c(b), u.isPointerDown = !1;
|
513
519
|
};
|
514
520
|
return s.addEventListener("mousedown", a, !0), s.addEventListener("mouseup", f, !0), s.addEventListener("touchstart", a, !0), s.addEventListener("touchend", p, !0), () => {
|
515
521
|
s.removeEventListener("mousedown", a, !0), s.removeEventListener("mouseup", f, !0), s.removeEventListener("touchstart", a, !0), s.removeEventListener("touchend", p, !0);
|
@@ -519,7 +525,7 @@ function Vt(e) {
|
|
519
525
|
t,
|
520
526
|
r,
|
521
527
|
a,
|
522
|
-
|
528
|
+
c
|
523
529
|
]);
|
524
530
|
}
|
525
531
|
function _(e, t) {
|
@@ -534,7 +540,7 @@ function _(e, t) {
|
|
534
540
|
}
|
535
541
|
function se(e) {
|
536
542
|
const t = g(e);
|
537
|
-
if (
|
543
|
+
if (Ht() === "virtual") {
|
538
544
|
let n = t.activeElement;
|
539
545
|
Ct(() => {
|
540
546
|
t.activeElement === n && e.isConnected && Ee(e);
|
@@ -542,77 +548,78 @@ function se(e) {
|
|
542
548
|
} else
|
543
549
|
Ee(e);
|
544
550
|
}
|
545
|
-
function
|
551
|
+
function jt(e) {
|
546
552
|
const t = Y(e);
|
547
553
|
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement))
|
548
554
|
return !1;
|
549
555
|
let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
|
550
556
|
if (o) {
|
551
557
|
const { getComputedStyle: i } = e.ownerDocument.defaultView;
|
552
|
-
let { display: a, visibility:
|
553
|
-
o = a !== "none" &&
|
558
|
+
let { display: a, visibility: c } = i(e);
|
559
|
+
o = a !== "none" && c !== "hidden" && c !== "collapse";
|
554
560
|
}
|
555
561
|
return o;
|
556
562
|
}
|
557
|
-
function
|
558
|
-
return !e.hasAttribute("hidden") &&
|
563
|
+
function qt(e, t) {
|
564
|
+
return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
565
|
+
!e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
559
566
|
}
|
560
567
|
function He(e, t) {
|
561
|
-
return e.nodeName !== "#comment" &&
|
568
|
+
return e.nodeName !== "#comment" && jt(e) && qt(e, t) && (!e.parentElement || He(e.parentElement, e));
|
562
569
|
}
|
563
570
|
const Te = /* @__PURE__ */ h.createContext(null);
|
564
|
-
let
|
565
|
-
function
|
566
|
-
let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = y(null), a = y(null),
|
567
|
-
scopeRef:
|
571
|
+
let m = null;
|
572
|
+
function zt(e) {
|
573
|
+
let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = y(null), a = y(null), c = y([]), { parentNode: u } = A(Te) || {}, l = H(() => new ce({
|
574
|
+
scopeRef: c
|
568
575
|
}), [
|
569
|
-
|
576
|
+
c
|
570
577
|
]);
|
571
578
|
E(() => {
|
572
579
|
let p = u || $.root;
|
573
|
-
if ($.getTreeNode(p.scopeRef) &&
|
574
|
-
let
|
575
|
-
|
580
|
+
if ($.getTreeNode(p.scopeRef) && m && !ee(m, p.scopeRef)) {
|
581
|
+
let b = $.getTreeNode(m);
|
582
|
+
b && (p = b);
|
576
583
|
}
|
577
|
-
p.addChild(
|
584
|
+
p.addChild(l), $.addNode(l);
|
578
585
|
}, [
|
579
|
-
|
586
|
+
l,
|
580
587
|
u
|
581
588
|
]), E(() => {
|
582
|
-
let p = $.getTreeNode(
|
589
|
+
let p = $.getTreeNode(c);
|
583
590
|
p && (p.contain = !!n);
|
584
591
|
}, [
|
585
592
|
n
|
586
593
|
]), E(() => {
|
587
594
|
var p;
|
588
|
-
let
|
589
|
-
for (;
|
590
|
-
|
591
|
-
|
595
|
+
let b = (p = i.current) === null || p === void 0 ? void 0 : p.nextSibling, v = [];
|
596
|
+
for (; b && b !== a.current; )
|
597
|
+
v.push(b), b = b.nextSibling;
|
598
|
+
c.current = v;
|
592
599
|
}, [
|
593
600
|
t
|
594
|
-
]),
|
595
|
-
const p = g(
|
596
|
-
let
|
597
|
-
if (w(p,
|
598
|
-
for (let
|
599
|
-
|
600
|
-
|
601
|
+
]), Qt(c, r, n), Jt(c, n), en(c, r, n), Yt(c, o), P(() => {
|
602
|
+
const p = g(c.current ? c.current[0] : void 0).activeElement;
|
603
|
+
let b = null;
|
604
|
+
if (w(p, c.current)) {
|
605
|
+
for (let v of $.traverse())
|
606
|
+
v.scopeRef && w(p, v.scopeRef.current) && (b = v);
|
607
|
+
b === $.getTreeNode(c) && (m = b.scopeRef);
|
601
608
|
}
|
602
609
|
}, [
|
603
|
-
|
610
|
+
c
|
604
611
|
]), E(() => () => {
|
605
|
-
var p,
|
606
|
-
let
|
607
|
-
(
|
612
|
+
var p, b, v;
|
613
|
+
let k = (v = (b = $.getTreeNode(c)) === null || b === void 0 || (p = b.parent) === null || p === void 0 ? void 0 : p.scopeRef) !== null && v !== void 0 ? v : null;
|
614
|
+
(c === m || ee(c, m)) && (!k || $.getTreeNode(k)) && (m = k), $.removeTreeNode(c);
|
608
615
|
}, [
|
609
|
-
|
616
|
+
c
|
610
617
|
]);
|
611
|
-
let s =
|
618
|
+
let s = H(() => _t(c), []), f = H(() => ({
|
612
619
|
focusManager: s,
|
613
|
-
parentNode:
|
620
|
+
parentNode: l
|
614
621
|
}), [
|
615
|
-
|
622
|
+
l,
|
616
623
|
s
|
617
624
|
]);
|
618
625
|
return /* @__PURE__ */ h.createElement(Te.Provider, {
|
@@ -627,25 +634,25 @@ function qt(e) {
|
|
627
634
|
ref: a
|
628
635
|
}));
|
629
636
|
}
|
630
|
-
function
|
637
|
+
function _t(e) {
|
631
638
|
return {
|
632
639
|
focusNext(t = {}) {
|
633
|
-
let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t,
|
640
|
+
let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[0].previousElementSibling, l = C(n), s = L(l, {
|
634
641
|
tabbable: o,
|
635
642
|
accept: a
|
636
643
|
}, n);
|
637
|
-
s.currentNode = w(
|
644
|
+
s.currentNode = w(c, n) ? c : u;
|
638
645
|
let f = s.nextNode();
|
639
|
-
return !f && i && (s.currentNode = u, f = s.nextNode()), f &&
|
646
|
+
return !f && i && (s.currentNode = u, f = s.nextNode()), f && F(f, !0), f;
|
640
647
|
},
|
641
648
|
focusPrevious(t = {}) {
|
642
|
-
let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t,
|
649
|
+
let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[n.length - 1].nextElementSibling, l = C(n), s = L(l, {
|
643
650
|
tabbable: o,
|
644
651
|
accept: a
|
645
652
|
}, n);
|
646
|
-
s.currentNode = w(
|
653
|
+
s.currentNode = w(c, n) ? c : u;
|
647
654
|
let f = s.previousNode();
|
648
|
-
return !f && i && (s.currentNode = u, f = s.previousNode()), f &&
|
655
|
+
return !f && i && (s.currentNode = u, f = s.previousNode()), f && F(f, !0), f;
|
649
656
|
},
|
650
657
|
focusFirst(t = {}) {
|
651
658
|
let n = e.current, { tabbable: r, accept: o } = t, i = C(n), a = L(i, {
|
@@ -653,8 +660,8 @@ function zt(e) {
|
|
653
660
|
accept: o
|
654
661
|
}, n);
|
655
662
|
a.currentNode = n[0].previousElementSibling;
|
656
|
-
let
|
657
|
-
return
|
663
|
+
let c = a.nextNode();
|
664
|
+
return c && F(c, !0), c;
|
658
665
|
},
|
659
666
|
focusLast(t = {}) {
|
660
667
|
let n = e.current, { tabbable: r, accept: o } = t, i = C(n), a = L(i, {
|
@@ -662,8 +669,8 @@ function zt(e) {
|
|
662
669
|
accept: o
|
663
670
|
}, n);
|
664
671
|
a.currentNode = n[n.length - 1].nextElementSibling;
|
665
|
-
let
|
666
|
-
return
|
672
|
+
let c = a.previousNode();
|
673
|
+
return c && F(c, !0), c;
|
667
674
|
}
|
668
675
|
};
|
669
676
|
}
|
@@ -681,14 +688,14 @@ const fe = [
|
|
681
688
|
"audio[controls]",
|
682
689
|
"video[controls]",
|
683
690
|
"[contenteditable]"
|
684
|
-
],
|
691
|
+
], Gt = fe.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
685
692
|
fe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
686
|
-
const
|
693
|
+
const Ut = fe.join(':not([hidden]):not([tabindex="-1"]),');
|
687
694
|
function C(e) {
|
688
695
|
return e[0].parentElement;
|
689
696
|
}
|
690
|
-
function
|
691
|
-
let t = $.getTreeNode(
|
697
|
+
function I(e) {
|
698
|
+
let t = $.getTreeNode(m);
|
692
699
|
for (; t && t.scopeRef !== e; ) {
|
693
700
|
if (t.contain)
|
694
701
|
return !1;
|
@@ -696,7 +703,7 @@ function B(e) {
|
|
696
703
|
}
|
697
704
|
return !0;
|
698
705
|
}
|
699
|
-
function
|
706
|
+
function Jt(e, t) {
|
700
707
|
let n = y(), r = y();
|
701
708
|
E(() => {
|
702
709
|
let o = e.current;
|
@@ -705,34 +712,34 @@ function Ut(e, t) {
|
|
705
712
|
return;
|
706
713
|
}
|
707
714
|
const i = g(o ? o[0] : void 0);
|
708
|
-
let a = (
|
709
|
-
if (
|
715
|
+
let a = (l) => {
|
716
|
+
if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !I(e) || l.isComposing)
|
710
717
|
return;
|
711
718
|
let s = i.activeElement, f = e.current;
|
712
719
|
if (!f || !w(s, f))
|
713
720
|
return;
|
714
|
-
let p = C(f),
|
721
|
+
let p = C(f), b = L(p, {
|
715
722
|
tabbable: !0
|
716
723
|
}, f);
|
717
724
|
if (!s)
|
718
725
|
return;
|
719
|
-
|
720
|
-
let
|
721
|
-
|
722
|
-
},
|
723
|
-
(!
|
724
|
-
}, u = (
|
726
|
+
b.currentNode = s;
|
727
|
+
let v = l.shiftKey ? b.previousNode() : b.nextNode();
|
728
|
+
v || (b.currentNode = l.shiftKey ? f[f.length - 1].nextElementSibling : f[0].previousElementSibling, v = l.shiftKey ? b.previousNode() : b.nextNode()), l.preventDefault(), v && F(v, !0);
|
729
|
+
}, c = (l) => {
|
730
|
+
(!m || ee(m, e)) && w(l.target, e.current) ? (m = e, n.current = l.target) : I(e) && !Z(l.target, e) ? n.current ? n.current.focus() : m && m.current && te(m.current) : I(e) && (n.current = l.target);
|
731
|
+
}, u = (l) => {
|
725
732
|
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
726
|
-
if (i.activeElement &&
|
727
|
-
if (
|
733
|
+
if (i.activeElement && I(e) && !Z(i.activeElement, e))
|
734
|
+
if (m = e, i.body.contains(l.target)) {
|
728
735
|
var s;
|
729
|
-
n.current =
|
736
|
+
n.current = l.target, (s = n.current) === null || s === void 0 || s.focus();
|
730
737
|
} else
|
731
|
-
|
738
|
+
m.current && te(m.current);
|
732
739
|
});
|
733
740
|
};
|
734
|
-
return i.addEventListener("keydown", a, !1), i.addEventListener("focusin",
|
735
|
-
i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin",
|
741
|
+
return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", c, !1), o == null || o.forEach((l) => l.addEventListener("focusin", c, !1)), o == null || o.forEach((l) => l.addEventListener("focusout", u, !1)), () => {
|
742
|
+
i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", c, !1), o == null || o.forEach((l) => l.removeEventListener("focusin", c, !1)), o == null || o.forEach((l) => l.removeEventListener("focusout", u, !1));
|
736
743
|
};
|
737
744
|
}, [
|
738
745
|
e,
|
@@ -757,8 +764,8 @@ function Z(e, t = null) {
|
|
757
764
|
return !0;
|
758
765
|
return !1;
|
759
766
|
}
|
760
|
-
function
|
761
|
-
return Z(e,
|
767
|
+
function Xt(e) {
|
768
|
+
return Z(e, m);
|
762
769
|
}
|
763
770
|
function ee(e, t) {
|
764
771
|
var n;
|
@@ -770,7 +777,7 @@ function ee(e, t) {
|
|
770
777
|
}
|
771
778
|
return !1;
|
772
779
|
}
|
773
|
-
function
|
780
|
+
function F(e, t = !1) {
|
774
781
|
if (e != null && !t)
|
775
782
|
try {
|
776
783
|
se(e);
|
@@ -790,30 +797,30 @@ function te(e, t = !0) {
|
|
790
797
|
let i = o.nextNode();
|
791
798
|
t && !i && (r = C(e), o = L(r, {
|
792
799
|
tabbable: !1
|
793
|
-
}, e), o.currentNode = n, i = o.nextNode()),
|
800
|
+
}, e), o.currentNode = n, i = o.nextNode()), F(i);
|
794
801
|
}
|
795
|
-
function
|
802
|
+
function Yt(e, t) {
|
796
803
|
const n = h.useRef(t);
|
797
|
-
|
804
|
+
P(() => {
|
798
805
|
if (n.current) {
|
799
|
-
|
806
|
+
m = e;
|
800
807
|
const r = g(e.current ? e.current[0] : void 0);
|
801
|
-
!w(r.activeElement,
|
808
|
+
!w(r.activeElement, m.current) && e.current && te(e.current);
|
802
809
|
}
|
803
810
|
n.current = !1;
|
804
811
|
}, [
|
805
812
|
e
|
806
813
|
]);
|
807
814
|
}
|
808
|
-
function
|
815
|
+
function Qt(e, t, n) {
|
809
816
|
E(() => {
|
810
817
|
if (t || n)
|
811
818
|
return;
|
812
819
|
let r = e.current;
|
813
820
|
const o = g(r ? r[0] : void 0);
|
814
821
|
let i = (a) => {
|
815
|
-
let
|
816
|
-
w(
|
822
|
+
let c = a.target;
|
823
|
+
w(c, e.current) ? m = e : Ve(c) || (m = null);
|
817
824
|
};
|
818
825
|
return o.addEventListener("focusin", i, !1), r == null || r.forEach((a) => a.addEventListener("focusin", i, !1)), () => {
|
819
826
|
o.removeEventListener("focusin", i, !1), r == null || r.forEach((a) => a.removeEventListener("focusin", i, !1));
|
@@ -824,8 +831,8 @@ function Yt(e, t, n) {
|
|
824
831
|
n
|
825
832
|
]);
|
826
833
|
}
|
827
|
-
function
|
828
|
-
let t = $.getTreeNode(
|
834
|
+
function Zt(e) {
|
835
|
+
let t = $.getTreeNode(m);
|
829
836
|
for (; t && t.scopeRef !== e; ) {
|
830
837
|
if (t.nodeToRestore)
|
831
838
|
return !1;
|
@@ -833,7 +840,7 @@ function Qt(e) {
|
|
833
840
|
}
|
834
841
|
return (t == null ? void 0 : t.scopeRef) === e;
|
835
842
|
}
|
836
|
-
function
|
843
|
+
function en(e, t, n) {
|
837
844
|
const r = y(typeof document < "u" ? g(e.current ? e.current[0] : void 0).activeElement : null);
|
838
845
|
E(() => {
|
839
846
|
let o = e.current;
|
@@ -841,10 +848,10 @@ function Zt(e, t, n) {
|
|
841
848
|
if (!t || n)
|
842
849
|
return;
|
843
850
|
let a = () => {
|
844
|
-
(!
|
851
|
+
(!m || ee(m, e)) && w(i.activeElement, e.current) && (m = e);
|
845
852
|
};
|
846
|
-
return i.addEventListener("focusin", a, !1), o == null || o.forEach((
|
847
|
-
i.removeEventListener("focusin", a, !1), o == null || o.forEach((
|
853
|
+
return i.addEventListener("focusin", a, !1), o == null || o.forEach((c) => c.addEventListener("focusin", a, !1)), () => {
|
854
|
+
i.removeEventListener("focusin", a, !1), o == null || o.forEach((c) => c.removeEventListener("focusin", a, !1));
|
848
855
|
};
|
849
856
|
}, [
|
850
857
|
e,
|
@@ -854,25 +861,25 @@ function Zt(e, t, n) {
|
|
854
861
|
if (!t)
|
855
862
|
return;
|
856
863
|
let i = (a) => {
|
857
|
-
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !
|
864
|
+
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !I(e) || a.isComposing)
|
858
865
|
return;
|
859
|
-
let
|
860
|
-
if (!w(
|
866
|
+
let c = o.activeElement;
|
867
|
+
if (!w(c, e.current))
|
861
868
|
return;
|
862
869
|
let u = $.getTreeNode(e);
|
863
870
|
if (!u)
|
864
871
|
return;
|
865
|
-
let
|
872
|
+
let l = u.nodeToRestore, s = L(o.body, {
|
866
873
|
tabbable: !0
|
867
874
|
});
|
868
|
-
s.currentNode =
|
875
|
+
s.currentNode = c;
|
869
876
|
let f = a.shiftKey ? s.previousNode() : s.nextNode();
|
870
|
-
if ((!
|
871
|
-
s.currentNode =
|
877
|
+
if ((!l || !o.body.contains(l) || l === o.body) && (l = void 0, u.nodeToRestore = void 0), (!f || !w(f, e.current)) && l) {
|
878
|
+
s.currentNode = l;
|
872
879
|
do
|
873
880
|
f = a.shiftKey ? s.previousNode() : s.nextNode();
|
874
881
|
while (w(f, e.current));
|
875
|
-
a.preventDefault(), a.stopPropagation(), f ?
|
882
|
+
a.preventDefault(), a.stopPropagation(), f ? F(f, !0) : Ve(l) ? F(l, !0) : c.blur();
|
876
883
|
}
|
877
884
|
};
|
878
885
|
return n || o.addEventListener("keydown", i, !0), () => {
|
@@ -887,26 +894,27 @@ function Zt(e, t, n) {
|
|
887
894
|
if (!t)
|
888
895
|
return;
|
889
896
|
let i = $.getTreeNode(e);
|
890
|
-
if (
|
897
|
+
if (i) {
|
891
898
|
var a;
|
892
899
|
return i.nodeToRestore = (a = r.current) !== null && a !== void 0 ? a : void 0, () => {
|
893
|
-
let
|
894
|
-
if (!
|
900
|
+
let c = $.getTreeNode(e);
|
901
|
+
if (!c)
|
895
902
|
return;
|
896
|
-
let u =
|
897
|
-
if (t && u &&
|
898
|
-
|
903
|
+
let u = c.nodeToRestore;
|
904
|
+
if (t && u && // eslint-disable-next-line react-hooks/exhaustive-deps
|
905
|
+
(w(o.activeElement, e.current) || o.activeElement === o.body && Zt(e))) {
|
906
|
+
let l = $.clone();
|
899
907
|
requestAnimationFrame(() => {
|
900
908
|
if (o.activeElement === o.body) {
|
901
|
-
let s =
|
909
|
+
let s = l.getTreeNode(e);
|
902
910
|
for (; s; ) {
|
903
911
|
if (s.nodeToRestore && s.nodeToRestore.isConnected) {
|
904
|
-
|
912
|
+
F(s.nodeToRestore);
|
905
913
|
return;
|
906
914
|
}
|
907
915
|
s = s.parent;
|
908
916
|
}
|
909
|
-
for (s =
|
917
|
+
for (s = l.getTreeNode(e); s; ) {
|
910
918
|
if (s.scopeRef && s.scopeRef.current && $.getTreeNode(s.scopeRef)) {
|
911
919
|
te(s.scopeRef.current, !0);
|
912
920
|
return;
|
@@ -924,7 +932,7 @@ function Zt(e, t, n) {
|
|
924
932
|
]);
|
925
933
|
}
|
926
934
|
function L(e, t, n) {
|
927
|
-
let r = t != null && t.tabbable ?
|
935
|
+
let r = t != null && t.tabbable ? Ut : Gt, o = g(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
928
936
|
acceptNode(i) {
|
929
937
|
var a;
|
930
938
|
return !(t == null || (a = t.from) === null || a === void 0) && a.contains(i) ? NodeFilter.FILTER_REJECT : i.matches(r) && He(i) && (!n || w(i, n)) && (!(t != null && t.accept) || t.accept(i)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
@@ -940,7 +948,7 @@ class pe {
|
|
940
948
|
return this.fastMap.get(t);
|
941
949
|
}
|
942
950
|
addTreeNode(t, n, r) {
|
943
|
-
let o = this.fastMap.get(n
|
951
|
+
let o = this.fastMap.get(n ?? null);
|
944
952
|
if (!o)
|
945
953
|
return;
|
946
954
|
let i = new ce({
|
@@ -963,6 +971,7 @@ class pe {
|
|
963
971
|
let o = n.children;
|
964
972
|
r && (r.removeChild(n), o.size > 0 && o.forEach((i) => r && r.addChild(i))), this.fastMap.delete(n.scopeRef);
|
965
973
|
}
|
974
|
+
// Pre Order Depth First
|
966
975
|
*traverse(t = this.root) {
|
967
976
|
if (t.scopeRef != null && (yield t), t.children.size > 0)
|
968
977
|
for (let n of t.children)
|
@@ -994,37 +1003,37 @@ class ce {
|
|
994
1003
|
}
|
995
1004
|
}
|
996
1005
|
let $ = new pe();
|
997
|
-
const
|
998
|
-
function
|
999
|
-
let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside:
|
1000
|
-
|
1001
|
-
let
|
1002
|
-
|
1006
|
+
const tn = /* @__PURE__ */ new WeakMap(), S = [];
|
1007
|
+
function nn(e, t) {
|
1008
|
+
let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: c } = e;
|
1009
|
+
P(() => (o && S.push(t), () => {
|
1010
|
+
let v = S.indexOf(t);
|
1011
|
+
v >= 0 && S.splice(v, 1);
|
1003
1012
|
}), [
|
1004
1013
|
o,
|
1005
1014
|
t
|
1006
1015
|
]);
|
1007
1016
|
let u = () => {
|
1008
1017
|
S[S.length - 1] === t && n && n();
|
1009
|
-
},
|
1010
|
-
(!
|
1011
|
-
}, s = (
|
1012
|
-
(!
|
1013
|
-
}, f = (
|
1014
|
-
|
1018
|
+
}, l = (v) => {
|
1019
|
+
(!c || c(v.target)) && S[S.length - 1] === t && (v.stopPropagation(), v.preventDefault());
|
1020
|
+
}, s = (v) => {
|
1021
|
+
(!c || c(v.target)) && (S[S.length - 1] === t && (v.stopPropagation(), v.preventDefault()), u());
|
1022
|
+
}, f = (v) => {
|
1023
|
+
v.key === "Escape" && !a && !v.nativeEvent.isComposing && (v.stopPropagation(), v.preventDefault(), u());
|
1015
1024
|
};
|
1016
|
-
|
1025
|
+
Kt({
|
1017
1026
|
ref: t,
|
1018
1027
|
onInteractOutside: i && o ? s : null,
|
1019
|
-
onInteractOutsideStart:
|
1028
|
+
onInteractOutsideStart: l
|
1020
1029
|
});
|
1021
|
-
let { focusWithinProps: p } =
|
1030
|
+
let { focusWithinProps: p } = Vt({
|
1022
1031
|
isDisabled: !r,
|
1023
|
-
onBlurWithin: (
|
1024
|
-
!
|
1032
|
+
onBlurWithin: (v) => {
|
1033
|
+
!v.relatedTarget || Xt(v.relatedTarget) || (!c || c(v.relatedTarget)) && n();
|
1025
1034
|
}
|
1026
|
-
}),
|
1027
|
-
|
1035
|
+
}), b = (v) => {
|
1036
|
+
v.target === v.currentTarget && v.preventDefault();
|
1028
1037
|
};
|
1029
1038
|
return {
|
1030
1039
|
overlayProps: {
|
@@ -1032,18 +1041,18 @@ function tn(e, t) {
|
|
1032
1041
|
...p
|
1033
1042
|
},
|
1034
1043
|
underlayProps: {
|
1035
|
-
onPointerDown:
|
1044
|
+
onPointerDown: b
|
1036
1045
|
}
|
1037
1046
|
};
|
1038
1047
|
}
|
1039
|
-
function
|
1048
|
+
function rn(e, t, n) {
|
1040
1049
|
let { type: r } = e, { isOpen: o } = t;
|
1041
|
-
|
1042
|
-
n && n.current &&
|
1050
|
+
P(() => {
|
1051
|
+
n && n.current && tn.set(n.current, t.close);
|
1043
1052
|
});
|
1044
1053
|
let i;
|
1045
1054
|
r === "menu" ? i = !0 : r === "listbox" && (i = "listbox");
|
1046
|
-
let a =
|
1055
|
+
let a = Ce();
|
1047
1056
|
return {
|
1048
1057
|
triggerProps: {
|
1049
1058
|
"aria-haspopup": i,
|
@@ -1056,7 +1065,7 @@ function nn(e, t, n) {
|
|
1056
1065
|
}
|
1057
1066
|
};
|
1058
1067
|
}
|
1059
|
-
const oe = typeof document < "u" && window.visualViewport,
|
1068
|
+
const oe = typeof document < "u" && window.visualViewport, on = /* @__PURE__ */ new Set([
|
1060
1069
|
"checkbox",
|
1061
1070
|
"radio",
|
1062
1071
|
"range",
|
@@ -1068,62 +1077,62 @@ const oe = typeof document < "u" && window.visualViewport, rn = /* @__PURE__ */
|
|
1068
1077
|
"reset"
|
1069
1078
|
]);
|
1070
1079
|
let G = 0, ae;
|
1071
|
-
function
|
1080
|
+
function an(e = {}) {
|
1072
1081
|
let { isDisabled: t } = e;
|
1073
1082
|
E(() => {
|
1074
1083
|
if (!t)
|
1075
|
-
return G++, G === 1 && (
|
1084
|
+
return G++, G === 1 && (kt() ? ae = sn() : ae = ln()), () => {
|
1076
1085
|
G--, G === 0 && ae();
|
1077
1086
|
};
|
1078
1087
|
}, [
|
1079
1088
|
t
|
1080
1089
|
]);
|
1081
1090
|
}
|
1082
|
-
function
|
1091
|
+
function ln() {
|
1083
1092
|
return X(D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"));
|
1084
1093
|
}
|
1085
|
-
function
|
1086
|
-
let e, t, n = (
|
1087
|
-
e = De(
|
1088
|
-
}, r = (
|
1094
|
+
function sn() {
|
1095
|
+
let e, t, n = (l) => {
|
1096
|
+
e = De(l.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = D(e, "overscrollBehavior", "contain"));
|
1097
|
+
}, r = (l) => {
|
1089
1098
|
if (!e || e === document.documentElement || e === document.body) {
|
1090
|
-
|
1099
|
+
l.preventDefault();
|
1091
1100
|
return;
|
1092
1101
|
}
|
1093
|
-
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth &&
|
1094
|
-
}, o = (
|
1095
|
-
let s =
|
1096
|
-
Ne(s) && s !== document.activeElement && (
|
1102
|
+
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && l.preventDefault();
|
1103
|
+
}, o = (l) => {
|
1104
|
+
let s = l.target;
|
1105
|
+
Ne(s) && s !== document.activeElement && (l.preventDefault(), c(), s.style.transform = "translateY(-2000px)", s.focus(), requestAnimationFrame(() => {
|
1097
1106
|
s.style.transform = "";
|
1098
1107
|
})), t && t();
|
1099
|
-
}, i = (
|
1100
|
-
let s =
|
1101
|
-
Ne(s) && (
|
1108
|
+
}, i = (l) => {
|
1109
|
+
let s = l.target;
|
1110
|
+
Ne(s) && (c(), s.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
1102
1111
|
s.style.transform = "", oe && (oe.height < window.innerHeight ? requestAnimationFrame(() => {
|
1103
1112
|
xe(s);
|
1104
1113
|
}) : oe.addEventListener("resize", () => xe(s), {
|
1105
1114
|
once: !0
|
1106
1115
|
}));
|
1107
1116
|
}));
|
1108
|
-
}, a = null,
|
1117
|
+
}, a = null, c = () => {
|
1109
1118
|
if (a)
|
1110
1119
|
return;
|
1111
|
-
let
|
1120
|
+
let l = () => {
|
1112
1121
|
window.scrollTo(0, 0);
|
1113
1122
|
}, s = window.pageXOffset, f = window.pageYOffset;
|
1114
|
-
a = X(
|
1123
|
+
a = X(W(window, "scroll", l), D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"), D(document.body, "marginTop", `-${f}px`), () => {
|
1115
1124
|
window.scrollTo(s, f);
|
1116
1125
|
}), window.scrollTo(0, 0);
|
1117
|
-
}, u = X(
|
1126
|
+
}, u = X(W(document, "touchstart", n, {
|
1118
1127
|
passive: !1,
|
1119
1128
|
capture: !0
|
1120
|
-
}),
|
1129
|
+
}), W(document, "touchmove", r, {
|
1121
1130
|
passive: !1,
|
1122
1131
|
capture: !0
|
1123
|
-
}),
|
1132
|
+
}), W(document, "touchend", o, {
|
1124
1133
|
passive: !1,
|
1125
1134
|
capture: !0
|
1126
|
-
}),
|
1135
|
+
}), W(document, "focus", i, !0));
|
1127
1136
|
return () => {
|
1128
1137
|
t == null || t(), a == null || a(), u();
|
1129
1138
|
};
|
@@ -1134,7 +1143,7 @@ function D(e, t, n) {
|
|
1134
1143
|
e.style[t] = r;
|
1135
1144
|
};
|
1136
1145
|
}
|
1137
|
-
function
|
1146
|
+
function W(e, t, n, r) {
|
1138
1147
|
return e.addEventListener(t, n, r), () => {
|
1139
1148
|
e.removeEventListener(t, n, r);
|
1140
1149
|
};
|
@@ -1151,43 +1160,43 @@ function xe(e) {
|
|
1151
1160
|
}
|
1152
1161
|
}
|
1153
1162
|
function Ne(e) {
|
1154
|
-
return e instanceof HTMLInputElement && !
|
1163
|
+
return e instanceof HTMLInputElement && !on.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
1155
1164
|
}
|
1156
|
-
let
|
1157
|
-
function
|
1165
|
+
let B = /* @__PURE__ */ new WeakMap(), T = [];
|
1166
|
+
function cn(e, t = document.body) {
|
1158
1167
|
let n = new Set(e), r = /* @__PURE__ */ new Set(), o = (u) => {
|
1159
1168
|
for (let p of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))
|
1160
1169
|
n.add(p);
|
1161
|
-
let
|
1170
|
+
let l = (p) => {
|
1162
1171
|
if (n.has(p) || r.has(p.parentElement) && p.parentElement.getAttribute("role") !== "row")
|
1163
1172
|
return NodeFilter.FILTER_REJECT;
|
1164
|
-
for (let
|
1165
|
-
if (p.contains(
|
1173
|
+
for (let b of n)
|
1174
|
+
if (p.contains(b))
|
1166
1175
|
return NodeFilter.FILTER_SKIP;
|
1167
1176
|
return NodeFilter.FILTER_ACCEPT;
|
1168
1177
|
}, s = document.createTreeWalker(u, NodeFilter.SHOW_ELEMENT, {
|
1169
|
-
acceptNode:
|
1170
|
-
}), f =
|
1178
|
+
acceptNode: l
|
1179
|
+
}), f = l(u);
|
1171
1180
|
if (f === NodeFilter.FILTER_ACCEPT && i(u), f !== NodeFilter.FILTER_REJECT) {
|
1172
1181
|
let p = s.nextNode();
|
1173
1182
|
for (; p != null; )
|
1174
1183
|
i(p), p = s.nextNode();
|
1175
1184
|
}
|
1176
1185
|
}, i = (u) => {
|
1177
|
-
var
|
1178
|
-
let s = (
|
1179
|
-
u.getAttribute("aria-hidden") === "true" && s === 0 || (s === 0 && u.setAttribute("aria-hidden", "true"), r.add(u),
|
1186
|
+
var l;
|
1187
|
+
let s = (l = B.get(u)) !== null && l !== void 0 ? l : 0;
|
1188
|
+
u.getAttribute("aria-hidden") === "true" && s === 0 || (s === 0 && u.setAttribute("aria-hidden", "true"), r.add(u), B.set(u, s + 1));
|
1180
1189
|
};
|
1181
1190
|
T.length && T[T.length - 1].disconnect(), o(t);
|
1182
1191
|
let a = new MutationObserver((u) => {
|
1183
|
-
for (let
|
1184
|
-
if (!(
|
1192
|
+
for (let l of u)
|
1193
|
+
if (!(l.type !== "childList" || l.addedNodes.length === 0) && ![
|
1185
1194
|
...n,
|
1186
1195
|
...r
|
1187
|
-
].some((s) => s.contains(
|
1188
|
-
for (let s of
|
1196
|
+
].some((s) => s.contains(l.target))) {
|
1197
|
+
for (let s of l.removedNodes)
|
1189
1198
|
s instanceof Element && (n.delete(s), r.delete(s));
|
1190
|
-
for (let s of
|
1199
|
+
for (let s of l.addedNodes)
|
1191
1200
|
(s instanceof HTMLElement || s instanceof SVGElement) && (s.dataset.liveAnnouncer === "true" || s.dataset.reactAriaTopLayer === "true") ? n.add(s) : s instanceof Element && o(s);
|
1192
1201
|
}
|
1193
1202
|
});
|
@@ -1195,7 +1204,7 @@ function sn(e, t = document.body) {
|
|
1195
1204
|
childList: !0,
|
1196
1205
|
subtree: !0
|
1197
1206
|
});
|
1198
|
-
let
|
1207
|
+
let c = {
|
1199
1208
|
observe() {
|
1200
1209
|
a.observe(t, {
|
1201
1210
|
childList: !0,
|
@@ -1206,53 +1215,58 @@ function sn(e, t = document.body) {
|
|
1206
1215
|
a.disconnect();
|
1207
1216
|
}
|
1208
1217
|
};
|
1209
|
-
return T.push(
|
1218
|
+
return T.push(c), () => {
|
1210
1219
|
a.disconnect();
|
1211
1220
|
for (let u of r) {
|
1212
|
-
let
|
1213
|
-
|
1221
|
+
let l = B.get(u);
|
1222
|
+
l === 1 ? (u.removeAttribute("aria-hidden"), B.delete(u)) : B.set(u, l - 1);
|
1214
1223
|
}
|
1215
|
-
|
1224
|
+
c === T[T.length - 1] ? (T.pop(), T.length && T[T.length - 1].observe()) : T.splice(T.indexOf(c), 1);
|
1216
1225
|
};
|
1217
1226
|
}
|
1227
|
+
const un = /* @__PURE__ */ tt({});
|
1228
|
+
function dn() {
|
1229
|
+
var e;
|
1230
|
+
return (e = A(un)) !== null && e !== void 0 ? e : {};
|
1231
|
+
}
|
1218
1232
|
const Ke = /* @__PURE__ */ h.createContext(null);
|
1219
|
-
function
|
1220
|
-
let t = Le(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] =
|
1233
|
+
function fn(e) {
|
1234
|
+
let t = Le(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = j(!1), a = H(() => ({
|
1221
1235
|
contain: o,
|
1222
1236
|
setContain: i
|
1223
1237
|
}), [
|
1224
1238
|
o,
|
1225
1239
|
i
|
1226
|
-
]);
|
1227
|
-
if (!n)
|
1240
|
+
]), { getContainer: c } = dn();
|
1241
|
+
if (!e.portalContainer && c && (n = c()), !n)
|
1228
1242
|
return null;
|
1229
|
-
let
|
1230
|
-
return e.disableFocusManagement || (
|
1243
|
+
let u = e.children;
|
1244
|
+
return e.disableFocusManagement || (u = /* @__PURE__ */ h.createElement(zt, {
|
1231
1245
|
restoreFocus: !0,
|
1232
1246
|
contain: o && !r
|
1233
|
-
},
|
1247
|
+
}, u)), u = /* @__PURE__ */ h.createElement(Ke.Provider, {
|
1234
1248
|
value: a
|
1235
|
-
}, /* @__PURE__ */ h.createElement(
|
1249
|
+
}, /* @__PURE__ */ h.createElement(Dt, null, u)), /* @__PURE__ */ nt.createPortal(u, n);
|
1236
1250
|
}
|
1237
1251
|
function je() {
|
1238
|
-
let e =
|
1252
|
+
let e = A(Ke), t = e == null ? void 0 : e.setContain;
|
1239
1253
|
E(() => {
|
1240
1254
|
t == null || t(!0);
|
1241
1255
|
}, [
|
1242
1256
|
t
|
1243
1257
|
]);
|
1244
1258
|
}
|
1245
|
-
function
|
1246
|
-
let { overlayProps: r, underlayProps: o } =
|
1259
|
+
function pn(e, t, n) {
|
1260
|
+
let { overlayProps: r, underlayProps: o } = nn({
|
1247
1261
|
...e,
|
1248
1262
|
isOpen: t.isOpen,
|
1249
1263
|
onClose: t.close
|
1250
1264
|
}, n);
|
1251
|
-
return
|
1265
|
+
return an({
|
1252
1266
|
isDisabled: !t.isOpen
|
1253
|
-
}), je(),
|
1267
|
+
}), je(), P(() => {
|
1254
1268
|
if (t.isOpen)
|
1255
|
-
return
|
1269
|
+
return cn([
|
1256
1270
|
n.current
|
1257
1271
|
]);
|
1258
1272
|
}, [
|
@@ -1263,11 +1277,11 @@ function un(e, t, n) {
|
|
1263
1277
|
underlayProps: o
|
1264
1278
|
};
|
1265
1279
|
}
|
1266
|
-
function
|
1280
|
+
function vn(e, t) {
|
1267
1281
|
let { role: n = "dialog" } = e, r = bt();
|
1268
1282
|
r = e["aria-label"] ? void 0 : r;
|
1269
1283
|
let o = y(!1);
|
1270
|
-
return
|
1284
|
+
return P(() => {
|
1271
1285
|
if (t.current && !t.current.contains(document.activeElement)) {
|
1272
1286
|
se(t.current);
|
1273
1287
|
let i = setTimeout(() => {
|
@@ -1287,6 +1301,9 @@ function dn(e, t) {
|
|
1287
1301
|
role: n,
|
1288
1302
|
tabIndex: -1,
|
1289
1303
|
"aria-labelledby": e["aria-labelledby"] || r,
|
1304
|
+
// Prevent blur events from reaching useOverlay, which may cause
|
1305
|
+
// popovers to close. Since focus is contained within the dialog,
|
1306
|
+
// we don't want this to occur due to the above useEffect.
|
1290
1307
|
onBlur: (i) => {
|
1291
1308
|
o.current && i.stopPropagation();
|
1292
1309
|
}
|
@@ -1296,7 +1313,7 @@ function dn(e, t) {
|
|
1296
1313
|
}
|
1297
1314
|
};
|
1298
1315
|
}
|
1299
|
-
function
|
1316
|
+
function bn(e, t, n) {
|
1300
1317
|
return t in e ? Object.defineProperty(e, t, {
|
1301
1318
|
value: n,
|
1302
1319
|
enumerable: !0,
|
@@ -1314,48 +1331,51 @@ function Se(e, t) {
|
|
1314
1331
|
}
|
1315
1332
|
return n;
|
1316
1333
|
}
|
1317
|
-
function
|
1334
|
+
function Fe(e) {
|
1318
1335
|
for (var t = 1; t < arguments.length; t++) {
|
1319
1336
|
var n = arguments[t] != null ? arguments[t] : {};
|
1320
1337
|
t % 2 ? Se(Object(n), !0).forEach(function(r) {
|
1321
|
-
|
1338
|
+
bn(e, r, n[r]);
|
1322
1339
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Se(Object(n)).forEach(function(r) {
|
1323
1340
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
1324
1341
|
});
|
1325
1342
|
}
|
1326
1343
|
return e;
|
1327
1344
|
}
|
1328
|
-
var
|
1345
|
+
var mn = (e, t, n) => {
|
1329
1346
|
for (var r of Object.keys(e)) {
|
1330
1347
|
var o;
|
1331
1348
|
if (e[r] !== ((o = t[r]) !== null && o !== void 0 ? o : n[r]))
|
1332
1349
|
return !1;
|
1333
1350
|
}
|
1334
1351
|
return !0;
|
1335
|
-
},
|
1336
|
-
var n = e.defaultClassName, r =
|
1352
|
+
}, $n = (e) => (t) => {
|
1353
|
+
var n = e.defaultClassName, r = Fe(Fe({}, e.defaultVariants), t);
|
1337
1354
|
for (var o in r) {
|
1338
1355
|
var i, a = (i = r[o]) !== null && i !== void 0 ? i : e.defaultVariants[o];
|
1339
1356
|
if (a != null) {
|
1340
|
-
var
|
1341
|
-
typeof
|
1342
|
-
var u =
|
1357
|
+
var c = a;
|
1358
|
+
typeof c == "boolean" && (c = c === !0 ? "true" : "false");
|
1359
|
+
var u = (
|
1360
|
+
// @ts-expect-error
|
1361
|
+
e.variantClassNames[o][c]
|
1362
|
+
);
|
1343
1363
|
u && (n += " " + u);
|
1344
1364
|
}
|
1345
1365
|
}
|
1346
|
-
for (var [
|
1347
|
-
|
1366
|
+
for (var [l, s] of e.compoundVariants)
|
1367
|
+
mn(l, r, e.defaultVariants) && (n += " " + s);
|
1348
1368
|
return n;
|
1349
|
-
},
|
1369
|
+
}, hn = $n({ defaultClassName: "_1io4psq1", variantClassNames: { fullWidth: { true: "_1io4psq2", false: "_1io4psq3" } }, defaultVariants: {}, compoundVariants: [] }), En = "_1io4psq5", gn = "_1io4psq6", wn = "_1io4psq0", yn = "_1io4psq9", Tn = "_1io4psqa", xn = "_1io4psq8", Nn = "_1io4psq4", Sn = "_1io4psq7";
|
1350
1370
|
function qe({
|
1351
1371
|
children: e,
|
1352
1372
|
className: t = "",
|
1353
1373
|
...n
|
1354
1374
|
}) {
|
1355
|
-
return /* @__PURE__ */ d.createElement("div", { className:
|
1375
|
+
return /* @__PURE__ */ d.createElement("div", { className: R(xn, t), ...n }, /* @__PURE__ */ d.createElement("div", { className: R(yn) }, /* @__PURE__ */ d.createElement("div", { className: R(Tn) }, e)));
|
1356
1376
|
}
|
1357
|
-
|
1358
|
-
function
|
1377
|
+
Pe.set(qe, { name: "FocusedTaskActions" });
|
1378
|
+
function Fn({
|
1359
1379
|
children: e,
|
1360
1380
|
className: t,
|
1361
1381
|
"data-testid": n,
|
@@ -1363,17 +1383,17 @@ function xn({
|
|
1363
1383
|
onFocus: o,
|
1364
1384
|
overlayProps: i,
|
1365
1385
|
state: a,
|
1366
|
-
onClose:
|
1386
|
+
onClose: c,
|
1367
1387
|
fullWidth: u = !1,
|
1368
|
-
...
|
1388
|
+
...l
|
1369
1389
|
}) {
|
1370
|
-
const s = d.useRef(null), { modalProps: f, underlayProps: p } =
|
1371
|
-
{ ...
|
1390
|
+
const s = d.useRef(null), { modalProps: f, underlayProps: p } = pn(
|
1391
|
+
{ ...l },
|
1372
1392
|
a,
|
1373
1393
|
s
|
1374
|
-
), { dialogProps:
|
1394
|
+
), { dialogProps: b, titleProps: v } = vn(l, s), k = me(f.onFocus, b.onFocus, o), _e = me(f.onBlur, b.onBlur, r), Ge = Ye({ "data-testid": n }), [ne, Ue] = Qe(e, [{ type: qe }]);
|
1375
1395
|
function Je() {
|
1376
|
-
|
1396
|
+
c && typeof c == "function" && c(), a.close();
|
1377
1397
|
}
|
1378
1398
|
const ve = function() {
|
1379
1399
|
return /* @__PURE__ */ d.createElement(
|
@@ -1383,31 +1403,31 @@ function xn({
|
|
1383
1403
|
onClick: Je,
|
1384
1404
|
kind: "icon",
|
1385
1405
|
icon: "x",
|
1386
|
-
className:
|
1406
|
+
className: En
|
1387
1407
|
}
|
1388
1408
|
);
|
1389
|
-
}, Xe = Ze(Ue, (
|
1390
|
-
return /* @__PURE__ */ d.createElement(
|
1409
|
+
}, Xe = Ze(Ue, (be) => be.type === ve ? [{ className: R(be.props.classname, gn) }] : []);
|
1410
|
+
return /* @__PURE__ */ d.createElement(fn, null, /* @__PURE__ */ d.createElement("div", { className: Sn, ...p, ...l }, /* @__PURE__ */ d.createElement(
|
1391
1411
|
"div",
|
1392
1412
|
{
|
1393
1413
|
...f,
|
1394
|
-
...
|
1414
|
+
...b,
|
1395
1415
|
...i,
|
1396
|
-
onFocus:
|
1416
|
+
onFocus: k,
|
1397
1417
|
onBlur: _e,
|
1398
1418
|
...Ge("dialog"),
|
1399
1419
|
ref: s,
|
1400
|
-
className:
|
1420
|
+
className: R(wn, t)
|
1401
1421
|
},
|
1402
|
-
/* @__PURE__ */ d.createElement("div", { ...
|
1403
|
-
/* @__PURE__ */ d.createElement("div", { className:
|
1422
|
+
/* @__PURE__ */ d.createElement("div", { ...v, className: Nn }, /* @__PURE__ */ d.createElement(ve, null)),
|
1423
|
+
/* @__PURE__ */ d.createElement("div", { className: hn({ fullWidth: u }) }, $e(Xe, a.close)),
|
1404
1424
|
ne && ne.length > 0 && /* @__PURE__ */ d.createElement(d.Fragment, null, $e(ne, a.close))
|
1405
1425
|
)));
|
1406
1426
|
}
|
1407
1427
|
function ze(e) {
|
1408
|
-
return e.state.isOpen ? /* @__PURE__ */ d.createElement(
|
1428
|
+
return e.state.isOpen ? /* @__PURE__ */ d.createElement(Fn, { ...e }, e.children) : /* @__PURE__ */ d.createElement(d.Fragment, null);
|
1409
1429
|
}
|
1410
|
-
|
1430
|
+
Pe.set(ze, {
|
1411
1431
|
name: "FocusedTask",
|
1412
1432
|
props: {
|
1413
1433
|
fullWidth: { type: "boolean", default: "false" },
|
@@ -1416,8 +1436,8 @@ Fe.set(ze, {
|
|
1416
1436
|
onFocus: { type: "() => void" }
|
1417
1437
|
}
|
1418
1438
|
});
|
1419
|
-
function
|
1420
|
-
let [t, n] =
|
1439
|
+
function Pn(e) {
|
1440
|
+
let [t, n] = Mt(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
|
1421
1441
|
const r = N(() => {
|
1422
1442
|
n(!0);
|
1423
1443
|
}, [
|
@@ -1440,8 +1460,8 @@ function Nn(e) {
|
|
1440
1460
|
toggle: i
|
1441
1461
|
};
|
1442
1462
|
}
|
1443
|
-
function
|
1444
|
-
const t =
|
1463
|
+
function An(e = {}) {
|
1464
|
+
const t = Pn(e), n = y(null), { triggerProps: r, overlayProps: o } = rn({ type: "dialog" }, t, n), { onPress: i, ...a } = r;
|
1445
1465
|
return {
|
1446
1466
|
triggerProps: {
|
1447
1467
|
...a,
|
@@ -1452,7 +1472,7 @@ function On(e = {}) {
|
|
1452
1472
|
focusedTaskProps: { overlayProps: o, state: t }
|
1453
1473
|
};
|
1454
1474
|
}
|
1455
|
-
const
|
1475
|
+
const kn = {
|
1456
1476
|
components: [ze],
|
1457
1477
|
examples: {
|
1458
1478
|
hooks: {
|
@@ -1553,12 +1573,12 @@ const Sn = {
|
|
1553
1573
|
}
|
1554
1574
|
}
|
1555
1575
|
}
|
1556
|
-
},
|
1557
|
-
"Focused Task":
|
1576
|
+
}, Wn = {
|
1577
|
+
"Focused Task": kn
|
1558
1578
|
};
|
1559
1579
|
export {
|
1560
1580
|
ze as FocusedTask,
|
1561
1581
|
qe as FocusedTaskActions,
|
1562
|
-
|
1563
|
-
|
1582
|
+
Wn as MANIFEST,
|
1583
|
+
An as useFocusedTask
|
1564
1584
|
};
|