@sps-woodland/modal 8.23.17 → 8.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +481 -483
- package/lib/index.umd.cjs +30 -30
- package/lib/style.css +1 -1
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Metadata as De, cl as ue, combineEventHandlers as Me, I18nContext as
|
|
1
|
+
import { Metadata as De, cl as ue, combineEventHandlers as Me, I18nContext as gt, useChildTestIdAttrBuilder as bt, selectChildren as ht, modChildren as vt, Icon as $t, contentOf as le } from "@sps-woodland/core";
|
|
2
2
|
import { Button as We } from "@sps-woodland/buttons";
|
|
3
3
|
import * as u from "react";
|
|
4
|
-
import $, { useRef as
|
|
5
|
-
import
|
|
4
|
+
import $, { useRef as _, useCallback as T, useState as U, useContext as I, useEffect as F, useMemo as H, createContext as wt } from "react";
|
|
5
|
+
import Et from "react-dom";
|
|
6
6
|
import { code as b } from "@spscommerce/utils";
|
|
7
7
|
const w = typeof document < "u" ? $.useLayoutEffect : () => {
|
|
8
8
|
};
|
|
9
|
-
function
|
|
10
|
-
const t =
|
|
9
|
+
function j(e) {
|
|
10
|
+
const t = _(null);
|
|
11
11
|
return w(() => {
|
|
12
12
|
t.current = e;
|
|
13
13
|
}, [
|
|
14
14
|
e
|
|
15
|
-
]),
|
|
15
|
+
]), T((...o) => {
|
|
16
16
|
const n = t.current;
|
|
17
17
|
return n == null ? void 0 : n(...o);
|
|
18
18
|
}, []);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
let [t, o] =
|
|
20
|
+
function _t(e) {
|
|
21
|
+
let [t, o] = U(e), n = _(null), r = j(() => {
|
|
22
22
|
if (!n.current) return;
|
|
23
23
|
let a = n.current.next();
|
|
24
24
|
if (a.done) {
|
|
@@ -30,7 +30,7 @@ function $t(e) {
|
|
|
30
30
|
w(() => {
|
|
31
31
|
n.current && r();
|
|
32
32
|
});
|
|
33
|
-
let l =
|
|
33
|
+
let l = j((a) => {
|
|
34
34
|
n.current = a(t), r();
|
|
35
35
|
});
|
|
36
36
|
return [
|
|
@@ -38,13 +38,13 @@ function $t(e) {
|
|
|
38
38
|
l
|
|
39
39
|
];
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const Q = {
|
|
42
42
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
43
43
|
current: 0
|
|
44
|
-
}, Ae = /* @__PURE__ */ $.createContext(
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
let t =
|
|
44
|
+
}, Ae = /* @__PURE__ */ $.createContext(Q), Mt = /* @__PURE__ */ $.createContext(!1);
|
|
45
|
+
let yt = !!(typeof window < "u" && window.document && window.document.createElement), ie = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
function Pt(e = !1) {
|
|
47
|
+
let t = I(Ae), o = _(null);
|
|
48
48
|
if (o.current === null && !e) {
|
|
49
49
|
var n, r;
|
|
50
50
|
let l = (r = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || r === void 0 || (n = r.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
|
@@ -59,62 +59,62 @@ function _t(e = !1) {
|
|
|
59
59
|
}
|
|
60
60
|
return o.current;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
let t =
|
|
64
|
-
t ===
|
|
65
|
-
let o =
|
|
62
|
+
function kt(e) {
|
|
63
|
+
let t = I(Ae);
|
|
64
|
+
t === Q && !yt && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
65
|
+
let o = Pt(!!e), n = t === Q && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
|
66
66
|
return e || `${n}-${o}`;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
let t = $.useId(), [o] =
|
|
68
|
+
function Tt(e) {
|
|
69
|
+
let t = $.useId(), [o] = U(Ie()), n = o || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Q.prefix}`;
|
|
70
70
|
return e || `${n}-${t}`;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
function
|
|
72
|
+
const xt = typeof $.useId == "function" ? Tt : kt;
|
|
73
|
+
function St() {
|
|
74
74
|
return !1;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Ft() {
|
|
77
77
|
return !0;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Lt(e) {
|
|
80
80
|
return () => {
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
function Ie() {
|
|
84
|
-
return typeof $.useSyncExternalStore == "function" ? $.useSyncExternalStore(
|
|
84
|
+
return typeof $.useSyncExternalStore == "function" ? $.useSyncExternalStore(Lt, St, Ft) : I(Mt);
|
|
85
85
|
}
|
|
86
|
-
let
|
|
86
|
+
let Ct = !!(typeof window < "u" && window.document && window.document.createElement), L = /* @__PURE__ */ new Map();
|
|
87
87
|
function ze(e) {
|
|
88
|
-
let [t, o] =
|
|
88
|
+
let [t, o] = U(e), n = _(null), r = xt(t), l = T((a) => {
|
|
89
89
|
n.current = a;
|
|
90
90
|
}, []);
|
|
91
|
-
return
|
|
92
|
-
...
|
|
91
|
+
return Ct && (L.has(r) && !L.get(r).includes(l) ? L.set(r, [
|
|
92
|
+
...L.get(r),
|
|
93
93
|
l
|
|
94
|
-
]) :
|
|
94
|
+
]) : L.set(r, [
|
|
95
95
|
l
|
|
96
96
|
])), w(() => {
|
|
97
97
|
let a = r;
|
|
98
98
|
return () => {
|
|
99
|
-
|
|
99
|
+
L.delete(a);
|
|
100
100
|
};
|
|
101
101
|
}, [
|
|
102
102
|
r
|
|
103
|
-
]),
|
|
103
|
+
]), F(() => {
|
|
104
104
|
let a = n.current;
|
|
105
105
|
a && (n.current = null, o(a));
|
|
106
106
|
}), r;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Bt(e, t) {
|
|
109
109
|
if (e === t) return e;
|
|
110
|
-
let o =
|
|
110
|
+
let o = L.get(e);
|
|
111
111
|
if (o)
|
|
112
112
|
return o.forEach((r) => r(t)), t;
|
|
113
|
-
let n =
|
|
113
|
+
let n = L.get(t);
|
|
114
114
|
return n ? (n.forEach((r) => r(e)), e) : t;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
let t = ze(), [o, n] =
|
|
116
|
+
function Nt(e = []) {
|
|
117
|
+
let t = ze(), [o, n] = _t(t), r = T(() => {
|
|
118
118
|
n(function* () {
|
|
119
119
|
yield t, yield document.getElementById(t) ? t : void 0;
|
|
120
120
|
});
|
|
@@ -128,7 +128,7 @@ function Ft(e = []) {
|
|
|
128
128
|
...e
|
|
129
129
|
]), o;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Z(...e) {
|
|
132
132
|
return (...t) => {
|
|
133
133
|
for (let o of e) typeof o == "function" && o(...t);
|
|
134
134
|
};
|
|
@@ -136,7 +136,7 @@ function Q(...e) {
|
|
|
136
136
|
const E = (e) => {
|
|
137
137
|
var t;
|
|
138
138
|
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
139
|
-
},
|
|
139
|
+
}, ee = (e) => e && "window" in e && e.window === e ? e : E(e).defaultView || window;
|
|
140
140
|
function Re(e) {
|
|
141
141
|
var t, o, n = "";
|
|
142
142
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
@@ -146,11 +146,11 @@ function Re(e) {
|
|
|
146
146
|
} else for (o in e) e[o] && (n && (n += " "), n += o);
|
|
147
147
|
return n;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Ot() {
|
|
150
150
|
for (var e, t, o = 0, n = "", r = arguments.length; o < r; o++) (e = arguments[o]) && (t = Re(e)) && (n && (n += " "), n += t);
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Dt(...e) {
|
|
154
154
|
let t = {
|
|
155
155
|
...e[0]
|
|
156
156
|
};
|
|
@@ -161,19 +161,19 @@ function Bt(...e) {
|
|
|
161
161
|
typeof l == "function" && typeof a == "function" && // This is a lot faster than a regex.
|
|
162
162
|
r[0] === "o" && r[1] === "n" && r.charCodeAt(2) >= /* 'A' */
|
|
163
163
|
65 && r.charCodeAt(2) <= /* 'Z' */
|
|
164
|
-
90 ? t[r] =
|
|
164
|
+
90 ? t[r] = Z(l, a) : (r === "className" || r === "UNSAFE_className") && typeof l == "string" && typeof a == "string" ? t[r] = Ot(l, a) : r === "id" && l && a ? t.id = Bt(l, a) : t[r] = a !== void 0 ? a : l;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
return t;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const Wt = /* @__PURE__ */ new Set([
|
|
170
170
|
"id"
|
|
171
|
-
]),
|
|
171
|
+
]), At = /* @__PURE__ */ new Set([
|
|
172
172
|
"aria-label",
|
|
173
173
|
"aria-labelledby",
|
|
174
174
|
"aria-describedby",
|
|
175
175
|
"aria-details"
|
|
176
|
-
]),
|
|
176
|
+
]), It = /* @__PURE__ */ new Set([
|
|
177
177
|
"href",
|
|
178
178
|
"hrefLang",
|
|
179
179
|
"target",
|
|
@@ -181,37 +181,37 @@ const Nt = /* @__PURE__ */ new Set([
|
|
|
181
181
|
"download",
|
|
182
182
|
"ping",
|
|
183
183
|
"referrerPolicy"
|
|
184
|
-
]),
|
|
185
|
-
function
|
|
184
|
+
]), zt = /^(data-.*)$/;
|
|
185
|
+
function Rt(e, t = {}) {
|
|
186
186
|
let { labelable: o, isLink: n, propNames: r } = t, l = {};
|
|
187
|
-
for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (
|
|
187
|
+
for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (Wt.has(a) || o && At.has(a) || n && It.has(a) || r != null && r.has(a) || zt.test(a)) && (l[a] = e[a]);
|
|
188
188
|
return l;
|
|
189
189
|
}
|
|
190
190
|
function ye(e) {
|
|
191
|
-
if (
|
|
191
|
+
if (qt()) e.focus({
|
|
192
192
|
preventScroll: !0
|
|
193
193
|
});
|
|
194
194
|
else {
|
|
195
|
-
let t =
|
|
196
|
-
e.focus(),
|
|
195
|
+
let t = Vt(e);
|
|
196
|
+
e.focus(), Ht(t);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
let
|
|
200
|
-
function
|
|
201
|
-
if (
|
|
202
|
-
|
|
199
|
+
let X = null;
|
|
200
|
+
function qt() {
|
|
201
|
+
if (X == null) {
|
|
202
|
+
X = !1;
|
|
203
203
|
try {
|
|
204
204
|
document.createElement("div").focus({
|
|
205
205
|
get preventScroll() {
|
|
206
|
-
return
|
|
206
|
+
return X = !0, !0;
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
} catch {
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
return
|
|
212
|
+
return X;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Vt(e) {
|
|
215
215
|
let t = e.parentNode, o = [], n = document.scrollingElement || document.documentElement;
|
|
216
216
|
for (; t instanceof HTMLElement && t !== n; )
|
|
217
217
|
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && o.push({
|
|
@@ -225,35 +225,37 @@ function zt(e) {
|
|
|
225
225
|
scrollLeft: n.scrollLeft
|
|
226
226
|
}), o;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Ht(e) {
|
|
229
229
|
for (let { element: t, scrollTop: o, scrollLeft: n } of e)
|
|
230
230
|
t.scrollTop = o, t.scrollLeft = n;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function qe(e) {
|
|
233
233
|
var t;
|
|
234
234
|
return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((o) => e.test(o.brand))) || e.test(window.navigator.userAgent);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function he(e) {
|
|
237
237
|
var t;
|
|
238
238
|
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function z(e) {
|
|
241
241
|
let t = null;
|
|
242
242
|
return () => (t == null && (t = e()), t);
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
-
}),
|
|
247
|
-
return
|
|
248
|
-
}),
|
|
249
|
-
return
|
|
250
|
-
|
|
251
|
-
}),
|
|
252
|
-
return
|
|
253
|
-
}),
|
|
254
|
-
return
|
|
244
|
+
const Ve = z(function() {
|
|
245
|
+
return he(/^Mac/i);
|
|
246
|
+
}), Kt = z(function() {
|
|
247
|
+
return he(/^iPhone/i);
|
|
248
|
+
}), jt = z(function() {
|
|
249
|
+
return he(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
250
|
+
Ve() && navigator.maxTouchPoints > 1;
|
|
251
|
+
}), Ut = z(function() {
|
|
252
|
+
return Kt() || jt();
|
|
253
|
+
}), Gt = z(function() {
|
|
254
|
+
return qe(/Chrome/i);
|
|
255
|
+
}), He = z(function() {
|
|
256
|
+
return qe(/Android/i);
|
|
255
257
|
});
|
|
256
|
-
let
|
|
258
|
+
let W = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Set();
|
|
257
259
|
function Pe() {
|
|
258
260
|
if (typeof window > "u") return;
|
|
259
261
|
function e(n) {
|
|
@@ -261,14 +263,14 @@ function Pe() {
|
|
|
261
263
|
}
|
|
262
264
|
let t = (n) => {
|
|
263
265
|
if (!e(n) || !n.target) return;
|
|
264
|
-
let r =
|
|
265
|
-
r || (r = /* @__PURE__ */ new Set(),
|
|
266
|
+
let r = W.get(n.target);
|
|
267
|
+
r || (r = /* @__PURE__ */ new Set(), W.set(n.target, r), n.target.addEventListener("transitioncancel", o, {
|
|
266
268
|
once: !0
|
|
267
269
|
})), r.add(n.propertyName);
|
|
268
270
|
}, o = (n) => {
|
|
269
271
|
if (!e(n) || !n.target) return;
|
|
270
|
-
let r =
|
|
271
|
-
if (r && (r.delete(n.propertyName), r.size === 0 && (n.target.removeEventListener("transitioncancel", o),
|
|
272
|
+
let r = W.get(n.target);
|
|
273
|
+
if (r && (r.delete(n.propertyName), r.size === 0 && (n.target.removeEventListener("transitioncancel", o), W.delete(n.target)), W.size === 0)) {
|
|
272
274
|
for (let l of ce) l();
|
|
273
275
|
ce.clear();
|
|
274
276
|
}
|
|
@@ -276,64 +278,65 @@ function Pe() {
|
|
|
276
278
|
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", o);
|
|
277
279
|
}
|
|
278
280
|
typeof document < "u" && (document.readyState !== "loading" ? Pe() : document.addEventListener("DOMContentLoaded", Pe));
|
|
279
|
-
function
|
|
281
|
+
function Xt(e) {
|
|
280
282
|
requestAnimationFrame(() => {
|
|
281
|
-
|
|
283
|
+
W.size === 0 ? e() : ce.add(e);
|
|
282
284
|
});
|
|
283
285
|
}
|
|
284
286
|
function ke(e, t) {
|
|
287
|
+
if (!e) return !1;
|
|
285
288
|
let o = window.getComputedStyle(e), n = /(auto|scroll)/.test(o.overflow + o.overflowX + o.overflowY);
|
|
286
289
|
return n && t && (n = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), n;
|
|
287
290
|
}
|
|
288
|
-
function
|
|
291
|
+
function Ke(e, t) {
|
|
289
292
|
let o = e;
|
|
290
293
|
for (ke(o, t) && (o = o.parentElement); o && !ke(o, t); ) o = o.parentElement;
|
|
291
294
|
return o || document.scrollingElement || document.documentElement;
|
|
292
295
|
}
|
|
293
|
-
function
|
|
294
|
-
return e.mozInputSource === 0 && e.isTrusted ? !0 :
|
|
296
|
+
function Jt(e) {
|
|
297
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : He() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
295
298
|
}
|
|
296
|
-
function
|
|
297
|
-
let [n, r] =
|
|
298
|
-
|
|
299
|
+
function Yt(e, t, o) {
|
|
300
|
+
let [n, r] = U(e || t), l = _(e !== void 0), a = e !== void 0;
|
|
301
|
+
F(() => {
|
|
299
302
|
let i = l.current;
|
|
300
303
|
i !== a && console.warn(`WARN: A component changed from ${i ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), l.current = a;
|
|
301
304
|
}, [
|
|
302
305
|
a
|
|
303
306
|
]);
|
|
304
|
-
let
|
|
305
|
-
let
|
|
306
|
-
o && (Object.is(
|
|
307
|
+
let s = a ? e : n, c = T((i, ...d) => {
|
|
308
|
+
let f = (m, ...g) => {
|
|
309
|
+
o && (Object.is(s, m) || o(m, ...g)), a || (s = m);
|
|
307
310
|
};
|
|
308
|
-
typeof i == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), r((g, ...
|
|
309
|
-
let
|
|
310
|
-
return
|
|
311
|
-
})) : (a || r(i),
|
|
311
|
+
typeof i == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), r((g, ...p) => {
|
|
312
|
+
let M = i(a ? s : g, ...p);
|
|
313
|
+
return f(M, ...d), a ? g : M;
|
|
314
|
+
})) : (a || r(i), f(i, ...d));
|
|
312
315
|
}, [
|
|
313
316
|
a,
|
|
314
|
-
|
|
317
|
+
s,
|
|
315
318
|
o
|
|
316
319
|
]);
|
|
317
320
|
return [
|
|
318
|
-
|
|
321
|
+
s,
|
|
319
322
|
c
|
|
320
323
|
];
|
|
321
324
|
}
|
|
322
|
-
const
|
|
325
|
+
const je = $.createContext({
|
|
323
326
|
register: () => {
|
|
324
327
|
}
|
|
325
328
|
});
|
|
326
|
-
|
|
327
|
-
function
|
|
328
|
-
let t =
|
|
329
|
+
je.displayName = "PressResponderContext";
|
|
330
|
+
function Qt({ children: e }) {
|
|
331
|
+
let t = H(() => ({
|
|
329
332
|
register: () => {
|
|
330
333
|
}
|
|
331
334
|
}), []);
|
|
332
|
-
return /* @__PURE__ */ $.createElement(
|
|
335
|
+
return /* @__PURE__ */ $.createElement(je.Provider, {
|
|
333
336
|
value: t
|
|
334
337
|
}, e);
|
|
335
338
|
}
|
|
336
|
-
class
|
|
339
|
+
class Zt {
|
|
337
340
|
isDefaultPrevented() {
|
|
338
341
|
return this.nativeEvent.defaultPrevented;
|
|
339
342
|
}
|
|
@@ -352,8 +355,8 @@ class Yt {
|
|
|
352
355
|
this.nativeEvent = o, this.target = o.target, this.currentTarget = o.currentTarget, this.relatedTarget = o.relatedTarget, this.bubbles = o.bubbles, this.cancelable = o.cancelable, this.defaultPrevented = o.defaultPrevented, this.eventPhase = o.eventPhase, this.isTrusted = o.isTrusted, this.timeStamp = o.timeStamp, this.type = t;
|
|
353
356
|
}
|
|
354
357
|
}
|
|
355
|
-
function
|
|
356
|
-
let t =
|
|
358
|
+
function eo(e) {
|
|
359
|
+
let t = _({
|
|
357
360
|
isFocused: !1,
|
|
358
361
|
observer: null
|
|
359
362
|
});
|
|
@@ -363,14 +366,14 @@ function Qt(e) {
|
|
|
363
366
|
n.observer && (n.observer.disconnect(), n.observer = null);
|
|
364
367
|
};
|
|
365
368
|
}, []);
|
|
366
|
-
let o =
|
|
369
|
+
let o = j((n) => {
|
|
367
370
|
e == null || e(n);
|
|
368
371
|
});
|
|
369
|
-
return
|
|
372
|
+
return T((n) => {
|
|
370
373
|
if (n.target instanceof HTMLButtonElement || n.target instanceof HTMLInputElement || n.target instanceof HTMLTextAreaElement || n.target instanceof HTMLSelectElement) {
|
|
371
374
|
t.current.isFocused = !0;
|
|
372
375
|
let r = n.target, l = (a) => {
|
|
373
|
-
t.current.isFocused = !1, r.disabled && o(new
|
|
376
|
+
t.current.isFocused = !1, r.disabled && o(new Zt("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
374
377
|
};
|
|
375
378
|
r.addEventListener("focusout", l, {
|
|
376
379
|
once: !0
|
|
@@ -378,12 +381,12 @@ function Qt(e) {
|
|
|
378
381
|
if (t.current.isFocused && r.disabled) {
|
|
379
382
|
var a;
|
|
380
383
|
(a = t.current.observer) === null || a === void 0 || a.disconnect();
|
|
381
|
-
let
|
|
384
|
+
let s = r === document.activeElement ? null : document.activeElement;
|
|
382
385
|
r.dispatchEvent(new FocusEvent("blur", {
|
|
383
|
-
relatedTarget:
|
|
386
|
+
relatedTarget: s
|
|
384
387
|
})), r.dispatchEvent(new FocusEvent("focusout", {
|
|
385
388
|
bubbles: !0,
|
|
386
|
-
relatedTarget:
|
|
389
|
+
relatedTarget: s
|
|
387
390
|
}));
|
|
388
391
|
}
|
|
389
392
|
}), t.current.observer.observe(r, {
|
|
@@ -397,72 +400,72 @@ function Qt(e) {
|
|
|
397
400
|
o
|
|
398
401
|
]);
|
|
399
402
|
}
|
|
400
|
-
let
|
|
401
|
-
function
|
|
402
|
-
for (let o of
|
|
403
|
+
let G = null, to = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Map(), D = !1, me = !1;
|
|
404
|
+
function ve(e, t) {
|
|
405
|
+
for (let o of to) o(e, t);
|
|
403
406
|
}
|
|
404
|
-
function
|
|
405
|
-
return !(e.metaKey || !
|
|
407
|
+
function oo(e) {
|
|
408
|
+
return !(e.metaKey || !Ve() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
406
409
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
410
|
+
function te(e) {
|
|
411
|
+
D = !0, oo(e) && (G = "keyboard", ve("keyboard", e));
|
|
409
412
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
413
|
+
function P(e) {
|
|
414
|
+
G = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (D = !0, ve("pointer", e));
|
|
412
415
|
}
|
|
413
|
-
function
|
|
414
|
-
|
|
416
|
+
function Ue(e) {
|
|
417
|
+
Jt(e) && (D = !0, G = "virtual");
|
|
415
418
|
}
|
|
416
|
-
function
|
|
417
|
-
e.target === window || e.target === document || (!
|
|
419
|
+
function Ge(e) {
|
|
420
|
+
e.target === window || e.target === document || (!D && !me && (G = "virtual", ve("virtual", e)), D = !1, me = !1);
|
|
418
421
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
422
|
+
function Xe() {
|
|
423
|
+
D = !1, me = !0;
|
|
421
424
|
}
|
|
422
|
-
function
|
|
423
|
-
if (typeof window > "u" ||
|
|
424
|
-
const t =
|
|
425
|
+
function Te(e) {
|
|
426
|
+
if (typeof window > "u" || K.get(ee(e))) return;
|
|
427
|
+
const t = ee(e), o = E(e);
|
|
425
428
|
let n = t.HTMLElement.prototype.focus;
|
|
426
429
|
t.HTMLElement.prototype.focus = function() {
|
|
427
|
-
|
|
428
|
-
}, o.addEventListener("keydown",
|
|
429
|
-
|
|
430
|
+
D = !0, n.apply(this, arguments);
|
|
431
|
+
}, o.addEventListener("keydown", te, !0), o.addEventListener("keyup", te, !0), o.addEventListener("click", Ue, !0), t.addEventListener("focus", Ge, !0), t.addEventListener("blur", Xe, !1), typeof PointerEvent < "u" ? (o.addEventListener("pointerdown", P, !0), o.addEventListener("pointermove", P, !0), o.addEventListener("pointerup", P, !0)) : (o.addEventListener("mousedown", P, !0), o.addEventListener("mousemove", P, !0), o.addEventListener("mouseup", P, !0)), t.addEventListener("beforeunload", () => {
|
|
432
|
+
Je(e);
|
|
430
433
|
}, {
|
|
431
434
|
once: !0
|
|
432
|
-
}),
|
|
435
|
+
}), K.set(t, {
|
|
433
436
|
focus: n
|
|
434
437
|
});
|
|
435
438
|
}
|
|
436
|
-
const
|
|
437
|
-
const o =
|
|
438
|
-
t && n.removeEventListener("DOMContentLoaded", t),
|
|
439
|
+
const Je = (e, t) => {
|
|
440
|
+
const o = ee(e), n = E(e);
|
|
441
|
+
t && n.removeEventListener("DOMContentLoaded", t), K.has(o) && (o.HTMLElement.prototype.focus = K.get(o).focus, n.removeEventListener("keydown", te, !0), n.removeEventListener("keyup", te, !0), n.removeEventListener("click", Ue, !0), o.removeEventListener("focus", Ge, !0), o.removeEventListener("blur", Xe, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", P, !0), n.removeEventListener("pointermove", P, !0), n.removeEventListener("pointerup", P, !0)) : (n.removeEventListener("mousedown", P, !0), n.removeEventListener("mousemove", P, !0), n.removeEventListener("mouseup", P, !0)), K.delete(o));
|
|
439
442
|
};
|
|
440
|
-
function
|
|
443
|
+
function no(e) {
|
|
441
444
|
const t = E(e);
|
|
442
445
|
let o;
|
|
443
|
-
return t.readyState !== "loading" ?
|
|
444
|
-
|
|
445
|
-
}, t.addEventListener("DOMContentLoaded", o)), () =>
|
|
446
|
+
return t.readyState !== "loading" ? Te(e) : (o = () => {
|
|
447
|
+
Te(e);
|
|
448
|
+
}, t.addEventListener("DOMContentLoaded", o)), () => Je(e, o);
|
|
446
449
|
}
|
|
447
|
-
typeof document < "u" &&
|
|
448
|
-
function
|
|
449
|
-
return
|
|
450
|
+
typeof document < "u" && no();
|
|
451
|
+
function Ye() {
|
|
452
|
+
return G;
|
|
450
453
|
}
|
|
451
|
-
function
|
|
452
|
-
let { isDisabled: t, onBlurWithin: o, onFocusWithin: n, onFocusWithinChange: r } = e, l =
|
|
454
|
+
function ro(e) {
|
|
455
|
+
let { isDisabled: t, onBlurWithin: o, onFocusWithin: n, onFocusWithinChange: r } = e, l = _({
|
|
453
456
|
isFocusWithin: !1
|
|
454
|
-
}), a =
|
|
457
|
+
}), a = T((i) => {
|
|
455
458
|
l.current.isFocusWithin && !i.currentTarget.contains(i.relatedTarget) && (l.current.isFocusWithin = !1, o && o(i), r && r(!1));
|
|
456
459
|
}, [
|
|
457
460
|
o,
|
|
458
461
|
r,
|
|
459
462
|
l
|
|
460
|
-
]),
|
|
461
|
-
!l.current.isFocusWithin && document.activeElement === i.target && (n && n(i), r && r(!0), l.current.isFocusWithin = !0,
|
|
463
|
+
]), s = eo(a), c = T((i) => {
|
|
464
|
+
!l.current.isFocusWithin && document.activeElement === i.target && (n && n(i), r && r(!0), l.current.isFocusWithin = !0, s(i));
|
|
462
465
|
}, [
|
|
463
466
|
n,
|
|
464
467
|
r,
|
|
465
|
-
|
|
468
|
+
s
|
|
466
469
|
]);
|
|
467
470
|
return t ? {
|
|
468
471
|
focusWithinProps: {
|
|
@@ -477,44 +480,44 @@ function no(e) {
|
|
|
477
480
|
}
|
|
478
481
|
};
|
|
479
482
|
}
|
|
480
|
-
function
|
|
481
|
-
let { ref: t, onInteractOutside: o, isDisabled: n, onInteractOutsideStart: r } = e, l =
|
|
483
|
+
function ao(e) {
|
|
484
|
+
let { ref: t, onInteractOutside: o, isDisabled: n, onInteractOutsideStart: r } = e, l = _({
|
|
482
485
|
isPointerDown: !1,
|
|
483
486
|
ignoreEmulatedMouseEvents: !1
|
|
484
|
-
}), a =
|
|
485
|
-
o &&
|
|
486
|
-
}),
|
|
487
|
+
}), a = j((c) => {
|
|
488
|
+
o && J(c, t) && (r && r(c), l.current.isPointerDown = !0);
|
|
489
|
+
}), s = j((c) => {
|
|
487
490
|
o && o(c);
|
|
488
491
|
});
|
|
489
|
-
|
|
492
|
+
F(() => {
|
|
490
493
|
let c = l.current;
|
|
491
494
|
if (n) return;
|
|
492
|
-
const i = t.current,
|
|
495
|
+
const i = t.current, d = E(i);
|
|
493
496
|
if (typeof PointerEvent < "u") {
|
|
494
|
-
let
|
|
495
|
-
c.isPointerDown &&
|
|
497
|
+
let f = (m) => {
|
|
498
|
+
c.isPointerDown && J(m, t) && s(m), c.isPointerDown = !1;
|
|
496
499
|
};
|
|
497
|
-
return
|
|
498
|
-
|
|
500
|
+
return d.addEventListener("pointerdown", a, !0), d.addEventListener("pointerup", f, !0), () => {
|
|
501
|
+
d.removeEventListener("pointerdown", a, !0), d.removeEventListener("pointerup", f, !0);
|
|
499
502
|
};
|
|
500
503
|
} else {
|
|
501
|
-
let
|
|
502
|
-
c.ignoreEmulatedMouseEvents ? c.ignoreEmulatedMouseEvents = !1 : c.isPointerDown &&
|
|
503
|
-
},
|
|
504
|
-
c.ignoreEmulatedMouseEvents = !0, c.isPointerDown &&
|
|
504
|
+
let f = (g) => {
|
|
505
|
+
c.ignoreEmulatedMouseEvents ? c.ignoreEmulatedMouseEvents = !1 : c.isPointerDown && J(g, t) && s(g), c.isPointerDown = !1;
|
|
506
|
+
}, m = (g) => {
|
|
507
|
+
c.ignoreEmulatedMouseEvents = !0, c.isPointerDown && J(g, t) && s(g), c.isPointerDown = !1;
|
|
505
508
|
};
|
|
506
|
-
return
|
|
507
|
-
|
|
509
|
+
return d.addEventListener("mousedown", a, !0), d.addEventListener("mouseup", f, !0), d.addEventListener("touchstart", a, !0), d.addEventListener("touchend", m, !0), () => {
|
|
510
|
+
d.removeEventListener("mousedown", a, !0), d.removeEventListener("mouseup", f, !0), d.removeEventListener("touchstart", a, !0), d.removeEventListener("touchend", m, !0);
|
|
508
511
|
};
|
|
509
512
|
}
|
|
510
513
|
}, [
|
|
511
514
|
t,
|
|
512
515
|
n,
|
|
513
516
|
a,
|
|
514
|
-
|
|
517
|
+
s
|
|
515
518
|
]);
|
|
516
519
|
}
|
|
517
|
-
function
|
|
520
|
+
function J(e, t) {
|
|
518
521
|
if (e.button > 0) return !1;
|
|
519
522
|
if (e.target) {
|
|
520
523
|
const o = e.target.ownerDocument;
|
|
@@ -522,91 +525,91 @@ function X(e, t) {
|
|
|
522
525
|
}
|
|
523
526
|
return t.current && !t.current.contains(e.target);
|
|
524
527
|
}
|
|
525
|
-
function
|
|
528
|
+
function fe(e) {
|
|
526
529
|
const t = E(e);
|
|
527
|
-
if (
|
|
530
|
+
if (Ye() === "virtual") {
|
|
528
531
|
let o = t.activeElement;
|
|
529
|
-
|
|
532
|
+
Xt(() => {
|
|
530
533
|
t.activeElement === o && e.isConnected && ye(e);
|
|
531
534
|
});
|
|
532
535
|
} else ye(e);
|
|
533
536
|
}
|
|
534
|
-
function
|
|
535
|
-
const t =
|
|
537
|
+
function lo(e) {
|
|
538
|
+
const t = ee(e);
|
|
536
539
|
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
|
|
537
540
|
let { display: o, visibility: n } = e.style, r = o !== "none" && n !== "hidden" && n !== "collapse";
|
|
538
541
|
if (r) {
|
|
539
542
|
const { getComputedStyle: l } = e.ownerDocument.defaultView;
|
|
540
|
-
let { display: a, visibility:
|
|
541
|
-
r = a !== "none" &&
|
|
543
|
+
let { display: a, visibility: s } = l(e);
|
|
544
|
+
r = a !== "none" && s !== "hidden" && s !== "collapse";
|
|
542
545
|
}
|
|
543
546
|
return r;
|
|
544
547
|
}
|
|
545
|
-
function
|
|
548
|
+
function io(e, t) {
|
|
546
549
|
return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
547
550
|
!e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
|
548
551
|
}
|
|
549
|
-
function
|
|
550
|
-
return e.nodeName !== "#comment" &&
|
|
552
|
+
function Qe(e, t) {
|
|
553
|
+
return e.nodeName !== "#comment" && lo(e) && io(e, t) && (!e.parentElement || Qe(e.parentElement, e));
|
|
551
554
|
}
|
|
552
|
-
const
|
|
553
|
-
let
|
|
554
|
-
function
|
|
555
|
-
let { children: t, contain: o, restoreFocus: n, autoFocus: r } = e, l =
|
|
556
|
-
scopeRef:
|
|
555
|
+
const xe = /* @__PURE__ */ $.createContext(null), pe = "react-aria-focus-scope-restore";
|
|
556
|
+
let h = null;
|
|
557
|
+
function so(e) {
|
|
558
|
+
let { children: t, contain: o, restoreFocus: n, autoFocus: r } = e, l = _(null), a = _(null), s = _([]), { parentNode: c } = I(xe) || {}, i = H(() => new be({
|
|
559
|
+
scopeRef: s
|
|
557
560
|
}), [
|
|
558
|
-
|
|
561
|
+
s
|
|
559
562
|
]);
|
|
560
563
|
w(() => {
|
|
561
|
-
let
|
|
562
|
-
if (
|
|
563
|
-
let g =
|
|
564
|
-
g && (
|
|
564
|
+
let m = c || v.root;
|
|
565
|
+
if (v.getTreeNode(m.scopeRef) && h && !oe(h, m.scopeRef)) {
|
|
566
|
+
let g = v.getTreeNode(h);
|
|
567
|
+
g && (m = g);
|
|
565
568
|
}
|
|
566
|
-
|
|
569
|
+
m.addChild(i), v.addNode(i);
|
|
567
570
|
}, [
|
|
568
571
|
i,
|
|
569
572
|
c
|
|
570
573
|
]), w(() => {
|
|
571
|
-
let
|
|
572
|
-
|
|
574
|
+
let m = v.getTreeNode(s);
|
|
575
|
+
m && (m.contain = !!o);
|
|
573
576
|
}, [
|
|
574
577
|
o
|
|
575
578
|
]), w(() => {
|
|
576
|
-
var
|
|
577
|
-
let g = (
|
|
579
|
+
var m;
|
|
580
|
+
let g = (m = l.current) === null || m === void 0 ? void 0 : m.nextSibling, p = [], M = (N) => N.stopPropagation();
|
|
578
581
|
for (; g && g !== a.current; )
|
|
579
|
-
|
|
580
|
-
return
|
|
581
|
-
for (let
|
|
582
|
+
p.push(g), g.addEventListener(pe, M), g = g.nextSibling;
|
|
583
|
+
return s.current = p, () => {
|
|
584
|
+
for (let N of p) N.removeEventListener(pe, M);
|
|
582
585
|
};
|
|
583
586
|
}, [
|
|
584
587
|
t
|
|
585
|
-
]),
|
|
586
|
-
const
|
|
588
|
+
]), bo(s, n, o), fo(s, o), ho(s, n, o), go(s, r), F(() => {
|
|
589
|
+
const m = E(s.current ? s.current[0] : void 0).activeElement;
|
|
587
590
|
let g = null;
|
|
588
|
-
if (
|
|
589
|
-
for (let
|
|
590
|
-
g ===
|
|
591
|
+
if (k(m, s.current)) {
|
|
592
|
+
for (let p of v.traverse()) p.scopeRef && k(m, p.scopeRef.current) && (g = p);
|
|
593
|
+
g === v.getTreeNode(s) && (h = g.scopeRef);
|
|
591
594
|
}
|
|
592
595
|
}, [
|
|
593
|
-
|
|
596
|
+
s
|
|
594
597
|
]), w(() => () => {
|
|
595
|
-
var
|
|
596
|
-
let
|
|
597
|
-
(
|
|
598
|
+
var m, g, p;
|
|
599
|
+
let M = (p = (g = v.getTreeNode(s)) === null || g === void 0 || (m = g.parent) === null || m === void 0 ? void 0 : m.scopeRef) !== null && p !== void 0 ? p : null;
|
|
600
|
+
(s === h || oe(s, h)) && (!M || v.getTreeNode(M)) && (h = M), v.removeTreeNode(s);
|
|
598
601
|
}, [
|
|
599
|
-
|
|
602
|
+
s
|
|
600
603
|
]);
|
|
601
|
-
let
|
|
602
|
-
focusManager:
|
|
604
|
+
let d = H(() => uo(s), []), f = H(() => ({
|
|
605
|
+
focusManager: d,
|
|
603
606
|
parentNode: i
|
|
604
607
|
}), [
|
|
605
608
|
i,
|
|
606
|
-
|
|
609
|
+
d
|
|
607
610
|
]);
|
|
608
|
-
return /* @__PURE__ */ $.createElement(
|
|
609
|
-
value:
|
|
611
|
+
return /* @__PURE__ */ $.createElement(xe.Provider, {
|
|
612
|
+
value: f
|
|
610
613
|
}, /* @__PURE__ */ $.createElement("span", {
|
|
611
614
|
"data-focus-scope-start": !0,
|
|
612
615
|
hidden: !0,
|
|
@@ -617,43 +620,43 @@ function io(e) {
|
|
|
617
620
|
ref: a
|
|
618
621
|
}));
|
|
619
622
|
}
|
|
620
|
-
function
|
|
623
|
+
function uo(e) {
|
|
621
624
|
return {
|
|
622
625
|
focusNext(t = {}) {
|
|
623
|
-
let o = e.current, { from: n, tabbable: r, wrap: l, accept: a } = t,
|
|
626
|
+
let o = e.current, { from: n, tabbable: r, wrap: l, accept: a } = t, s = n || E(o[0]).activeElement, c = o[0].previousElementSibling, i = O(o), d = B(i, {
|
|
624
627
|
tabbable: r,
|
|
625
628
|
accept: a
|
|
626
629
|
}, o);
|
|
627
|
-
|
|
628
|
-
let
|
|
629
|
-
return !
|
|
630
|
+
d.currentNode = k(s, o) ? s : c;
|
|
631
|
+
let f = d.nextNode();
|
|
632
|
+
return !f && l && (d.currentNode = c, f = d.nextNode()), f && S(f, !0), f;
|
|
630
633
|
},
|
|
631
634
|
focusPrevious(t = {}) {
|
|
632
|
-
let o = e.current, { from: n, tabbable: r, wrap: l, accept: a } = t,
|
|
635
|
+
let o = e.current, { from: n, tabbable: r, wrap: l, accept: a } = t, s = n || E(o[0]).activeElement, c = o[o.length - 1].nextElementSibling, i = O(o), d = B(i, {
|
|
633
636
|
tabbable: r,
|
|
634
637
|
accept: a
|
|
635
638
|
}, o);
|
|
636
|
-
|
|
637
|
-
let
|
|
638
|
-
return !
|
|
639
|
+
d.currentNode = k(s, o) ? s : c;
|
|
640
|
+
let f = d.previousNode();
|
|
641
|
+
return !f && l && (d.currentNode = c, f = d.previousNode()), f && S(f, !0), f;
|
|
639
642
|
},
|
|
640
643
|
focusFirst(t = {}) {
|
|
641
|
-
let o = e.current, { tabbable: n, accept: r } = t, l =
|
|
644
|
+
let o = e.current, { tabbable: n, accept: r } = t, l = O(o), a = B(l, {
|
|
642
645
|
tabbable: n,
|
|
643
646
|
accept: r
|
|
644
647
|
}, o);
|
|
645
648
|
a.currentNode = o[0].previousElementSibling;
|
|
646
|
-
let
|
|
647
|
-
return
|
|
649
|
+
let s = a.nextNode();
|
|
650
|
+
return s && S(s, !0), s;
|
|
648
651
|
},
|
|
649
652
|
focusLast(t = {}) {
|
|
650
|
-
let o = e.current, { tabbable: n, accept: r } = t, l =
|
|
653
|
+
let o = e.current, { tabbable: n, accept: r } = t, l = O(o), a = B(l, {
|
|
651
654
|
tabbable: n,
|
|
652
655
|
accept: r
|
|
653
656
|
}, o);
|
|
654
657
|
a.currentNode = o[o.length - 1].nextElementSibling;
|
|
655
|
-
let
|
|
656
|
-
return
|
|
658
|
+
let s = a.previousNode();
|
|
659
|
+
return s && S(s, !0), s;
|
|
657
660
|
}
|
|
658
661
|
};
|
|
659
662
|
}
|
|
@@ -670,23 +673,23 @@ const $e = [
|
|
|
670
673
|
"embed",
|
|
671
674
|
"audio[controls]",
|
|
672
675
|
"video[controls]",
|
|
673
|
-
|
|
674
|
-
],
|
|
676
|
+
'[contenteditable]:not([contenteditable^="false"])'
|
|
677
|
+
], co = $e.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
675
678
|
$e.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
676
|
-
const
|
|
677
|
-
function
|
|
679
|
+
const mo = $e.join(':not([hidden]):not([tabindex="-1"]),');
|
|
680
|
+
function O(e) {
|
|
678
681
|
return e[0].parentElement;
|
|
679
682
|
}
|
|
680
|
-
function
|
|
681
|
-
let t =
|
|
683
|
+
function V(e) {
|
|
684
|
+
let t = v.getTreeNode(h);
|
|
682
685
|
for (; t && t.scopeRef !== e; ) {
|
|
683
686
|
if (t.contain) return !1;
|
|
684
687
|
t = t.parent;
|
|
685
688
|
}
|
|
686
689
|
return !0;
|
|
687
690
|
}
|
|
688
|
-
function
|
|
689
|
-
let o =
|
|
691
|
+
function fo(e, t) {
|
|
692
|
+
let o = _(void 0), n = _(void 0);
|
|
690
693
|
w(() => {
|
|
691
694
|
let r = e.current;
|
|
692
695
|
if (!t) {
|
|
@@ -695,29 +698,30 @@ function mo(e, t) {
|
|
|
695
698
|
}
|
|
696
699
|
const l = E(r ? r[0] : void 0);
|
|
697
700
|
let a = (i) => {
|
|
698
|
-
if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !
|
|
699
|
-
let
|
|
700
|
-
if (!
|
|
701
|
-
let
|
|
701
|
+
if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !V(e) || i.isComposing) return;
|
|
702
|
+
let d = l.activeElement, f = e.current;
|
|
703
|
+
if (!f || !k(d, f)) return;
|
|
704
|
+
let m = O(f), g = B(m, {
|
|
702
705
|
tabbable: !0
|
|
703
|
-
},
|
|
704
|
-
if (!
|
|
705
|
-
g.currentNode =
|
|
706
|
-
let
|
|
707
|
-
|
|
708
|
-
},
|
|
709
|
-
(!
|
|
706
|
+
}, f);
|
|
707
|
+
if (!d) return;
|
|
708
|
+
g.currentNode = d;
|
|
709
|
+
let p = i.shiftKey ? g.previousNode() : g.nextNode();
|
|
710
|
+
p || (g.currentNode = i.shiftKey ? f[f.length - 1].nextElementSibling : f[0].previousElementSibling, p = i.shiftKey ? g.previousNode() : g.nextNode()), i.preventDefault(), p && S(p, !0);
|
|
711
|
+
}, s = (i) => {
|
|
712
|
+
(!h || oe(h, e)) && k(i.target, e.current) ? (h = e, o.current = i.target) : V(e) && !C(i.target, e) ? o.current ? o.current.focus() : h && h.current && ge(h.current) : V(e) && (o.current = i.target);
|
|
710
713
|
}, c = (i) => {
|
|
711
714
|
n.current && cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
715
|
+
let d = Ye();
|
|
716
|
+
if (!((d === "virtual" || d === null) && He() && Gt()) && l.activeElement && V(e) && !C(l.activeElement, e))
|
|
717
|
+
if (h = e, l.body.contains(i.target)) {
|
|
718
|
+
var m;
|
|
719
|
+
o.current = i.target, (m = o.current) === null || m === void 0 || m.focus();
|
|
720
|
+
} else h.current && ge(h.current);
|
|
717
721
|
});
|
|
718
722
|
};
|
|
719
|
-
return l.addEventListener("keydown", a, !1), l.addEventListener("focusin",
|
|
720
|
-
l.removeEventListener("keydown", a, !1), l.removeEventListener("focusin",
|
|
723
|
+
return l.addEventListener("keydown", a, !1), l.addEventListener("focusin", s, !1), r == null || r.forEach((i) => i.addEventListener("focusin", s, !1)), r == null || r.forEach((i) => i.addEventListener("focusout", c, !1)), () => {
|
|
724
|
+
l.removeEventListener("keydown", a, !1), l.removeEventListener("focusin", s, !1), r == null || r.forEach((i) => i.removeEventListener("focusin", s, !1)), r == null || r.forEach((i) => i.removeEventListener("focusout", c, !1));
|
|
721
725
|
};
|
|
722
726
|
}, [
|
|
723
727
|
e,
|
|
@@ -728,24 +732,24 @@ function mo(e, t) {
|
|
|
728
732
|
n
|
|
729
733
|
]);
|
|
730
734
|
}
|
|
731
|
-
function
|
|
732
|
-
return
|
|
735
|
+
function Ze(e) {
|
|
736
|
+
return C(e);
|
|
733
737
|
}
|
|
734
|
-
function
|
|
738
|
+
function k(e, t) {
|
|
735
739
|
return !e || !t ? !1 : t.some((o) => o.contains(e));
|
|
736
740
|
}
|
|
737
|
-
function
|
|
741
|
+
function C(e, t = null) {
|
|
738
742
|
if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
|
|
739
|
-
for (let { scopeRef: o } of
|
|
740
|
-
if (o &&
|
|
743
|
+
for (let { scopeRef: o } of v.traverse(v.getTreeNode(t)))
|
|
744
|
+
if (o && k(e, o.current)) return !0;
|
|
741
745
|
return !1;
|
|
742
746
|
}
|
|
743
747
|
function po(e) {
|
|
744
|
-
return
|
|
748
|
+
return C(e, h);
|
|
745
749
|
}
|
|
746
750
|
function oe(e, t) {
|
|
747
751
|
var o;
|
|
748
|
-
let n = (o =
|
|
752
|
+
let n = (o = v.getTreeNode(t)) === null || o === void 0 ? void 0 : o.parent;
|
|
749
753
|
for (; n; ) {
|
|
750
754
|
if (n.scopeRef === e) return !0;
|
|
751
755
|
n = n.parent;
|
|
@@ -754,7 +758,7 @@ function oe(e, t) {
|
|
|
754
758
|
}
|
|
755
759
|
function S(e, t = !1) {
|
|
756
760
|
if (e != null && !t) try {
|
|
757
|
-
|
|
761
|
+
fe(e);
|
|
758
762
|
} catch {
|
|
759
763
|
}
|
|
760
764
|
else if (e != null) try {
|
|
@@ -762,40 +766,40 @@ function S(e, t = !1) {
|
|
|
762
766
|
} catch {
|
|
763
767
|
}
|
|
764
768
|
}
|
|
765
|
-
function
|
|
766
|
-
let o = e[0].previousElementSibling, n =
|
|
769
|
+
function et(e, t = !0) {
|
|
770
|
+
let o = e[0].previousElementSibling, n = O(e), r = B(n, {
|
|
767
771
|
tabbable: t
|
|
768
772
|
}, e);
|
|
769
773
|
r.currentNode = o;
|
|
770
774
|
let l = r.nextNode();
|
|
771
|
-
return t && !l && (n =
|
|
775
|
+
return t && !l && (n = O(e), r = B(n, {
|
|
772
776
|
tabbable: !1
|
|
773
777
|
}, e), r.currentNode = o, l = r.nextNode()), l;
|
|
774
778
|
}
|
|
775
779
|
function ge(e, t = !0) {
|
|
776
|
-
S(
|
|
780
|
+
S(et(e, t));
|
|
777
781
|
}
|
|
778
|
-
function
|
|
782
|
+
function go(e, t) {
|
|
779
783
|
const o = $.useRef(t);
|
|
780
|
-
|
|
784
|
+
F(() => {
|
|
781
785
|
if (o.current) {
|
|
782
|
-
|
|
786
|
+
h = e;
|
|
783
787
|
const n = E(e.current ? e.current[0] : void 0);
|
|
784
|
-
!
|
|
788
|
+
!k(n.activeElement, h.current) && e.current && ge(e.current);
|
|
785
789
|
}
|
|
786
790
|
o.current = !1;
|
|
787
791
|
}, [
|
|
788
792
|
e
|
|
789
793
|
]);
|
|
790
794
|
}
|
|
791
|
-
function
|
|
795
|
+
function bo(e, t, o) {
|
|
792
796
|
w(() => {
|
|
793
797
|
if (t || o) return;
|
|
794
798
|
let n = e.current;
|
|
795
799
|
const r = E(n ? n[0] : void 0);
|
|
796
800
|
let l = (a) => {
|
|
797
|
-
let
|
|
798
|
-
|
|
801
|
+
let s = a.target;
|
|
802
|
+
k(s, e.current) ? h = e : Ze(s) || (h = null);
|
|
799
803
|
};
|
|
800
804
|
return r.addEventListener("focusin", l, !1), n == null || n.forEach((a) => a.addEventListener("focusin", l, !1)), () => {
|
|
801
805
|
r.removeEventListener("focusin", l, !1), n == null || n.forEach((a) => a.removeEventListener("focusin", l, !1));
|
|
@@ -806,25 +810,25 @@ function go(e, t, o) {
|
|
|
806
810
|
o
|
|
807
811
|
]);
|
|
808
812
|
}
|
|
809
|
-
function
|
|
810
|
-
let t =
|
|
813
|
+
function Se(e) {
|
|
814
|
+
let t = v.getTreeNode(h);
|
|
811
815
|
for (; t && t.scopeRef !== e; ) {
|
|
812
816
|
if (t.nodeToRestore) return !1;
|
|
813
817
|
t = t.parent;
|
|
814
818
|
}
|
|
815
819
|
return (t == null ? void 0 : t.scopeRef) === e;
|
|
816
820
|
}
|
|
817
|
-
function
|
|
818
|
-
const n =
|
|
821
|
+
function ho(e, t, o) {
|
|
822
|
+
const n = _(typeof document < "u" ? E(e.current ? e.current[0] : void 0).activeElement : null);
|
|
819
823
|
w(() => {
|
|
820
824
|
let r = e.current;
|
|
821
825
|
const l = E(r ? r[0] : void 0);
|
|
822
826
|
if (!t || o) return;
|
|
823
827
|
let a = () => {
|
|
824
|
-
(!
|
|
828
|
+
(!h || oe(h, e)) && k(l.activeElement, e.current) && (h = e);
|
|
825
829
|
};
|
|
826
|
-
return l.addEventListener("focusin", a, !1), r == null || r.forEach((
|
|
827
|
-
l.removeEventListener("focusin", a, !1), r == null || r.forEach((
|
|
830
|
+
return l.addEventListener("focusin", a, !1), r == null || r.forEach((s) => s.addEventListener("focusin", a, !1)), () => {
|
|
831
|
+
l.removeEventListener("focusin", a, !1), r == null || r.forEach((s) => s.removeEventListener("focusin", a, !1));
|
|
828
832
|
};
|
|
829
833
|
}, [
|
|
830
834
|
e,
|
|
@@ -833,22 +837,22 @@ function vo(e, t, o) {
|
|
|
833
837
|
const r = E(e.current ? e.current[0] : void 0);
|
|
834
838
|
if (!t) return;
|
|
835
839
|
let l = (a) => {
|
|
836
|
-
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !
|
|
837
|
-
let
|
|
838
|
-
if (!
|
|
839
|
-
let c =
|
|
840
|
+
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !V(e) || a.isComposing) return;
|
|
841
|
+
let s = r.activeElement;
|
|
842
|
+
if (!C(s, e) || !Se(e)) return;
|
|
843
|
+
let c = v.getTreeNode(e);
|
|
840
844
|
if (!c) return;
|
|
841
|
-
let i = c.nodeToRestore,
|
|
845
|
+
let i = c.nodeToRestore, d = B(r.body, {
|
|
842
846
|
tabbable: !0
|
|
843
847
|
});
|
|
844
|
-
|
|
845
|
-
let
|
|
846
|
-
if ((!i || !r.body.contains(i) || i === r.body) && (i = void 0, c.nodeToRestore = void 0), (!
|
|
847
|
-
|
|
848
|
+
d.currentNode = s;
|
|
849
|
+
let f = a.shiftKey ? d.previousNode() : d.nextNode();
|
|
850
|
+
if ((!i || !r.body.contains(i) || i === r.body) && (i = void 0, c.nodeToRestore = void 0), (!f || !C(f, e)) && i) {
|
|
851
|
+
d.currentNode = i;
|
|
848
852
|
do
|
|
849
|
-
|
|
850
|
-
while (
|
|
851
|
-
a.preventDefault(), a.stopPropagation(),
|
|
853
|
+
f = a.shiftKey ? d.previousNode() : d.nextNode();
|
|
854
|
+
while (C(f, e));
|
|
855
|
+
a.preventDefault(), a.stopPropagation(), f ? S(f, !0) : Ze(i) ? S(i, !0) : s.blur();
|
|
852
856
|
}
|
|
853
857
|
};
|
|
854
858
|
return o || r.addEventListener("keydown", l, !0), () => {
|
|
@@ -861,33 +865,32 @@ function vo(e, t, o) {
|
|
|
861
865
|
]), w(() => {
|
|
862
866
|
const r = E(e.current ? e.current[0] : void 0);
|
|
863
867
|
if (!t) return;
|
|
864
|
-
let l =
|
|
868
|
+
let l = v.getTreeNode(e);
|
|
865
869
|
if (l) {
|
|
866
870
|
var a;
|
|
867
871
|
return l.nodeToRestore = (a = n.current) !== null && a !== void 0 ? a : void 0, () => {
|
|
868
|
-
let
|
|
869
|
-
if (!
|
|
870
|
-
let c =
|
|
871
|
-
if (t && c &&
|
|
872
|
-
|
|
873
|
-
let i = h.clone();
|
|
872
|
+
let s = v.getTreeNode(e);
|
|
873
|
+
if (!s) return;
|
|
874
|
+
let c = s.nodeToRestore;
|
|
875
|
+
if (t && c && (r.activeElement && C(r.activeElement, e) || r.activeElement === r.body && Se(e))) {
|
|
876
|
+
let i = v.clone();
|
|
874
877
|
requestAnimationFrame(() => {
|
|
875
878
|
if (r.activeElement === r.body) {
|
|
876
|
-
let
|
|
877
|
-
for (;
|
|
878
|
-
if (
|
|
879
|
-
|
|
879
|
+
let d = i.getTreeNode(e);
|
|
880
|
+
for (; d; ) {
|
|
881
|
+
if (d.nodeToRestore && d.nodeToRestore.isConnected) {
|
|
882
|
+
Fe(d.nodeToRestore);
|
|
880
883
|
return;
|
|
881
884
|
}
|
|
882
|
-
|
|
885
|
+
d = d.parent;
|
|
883
886
|
}
|
|
884
|
-
for (
|
|
885
|
-
if (
|
|
886
|
-
let
|
|
887
|
-
|
|
887
|
+
for (d = i.getTreeNode(e); d; ) {
|
|
888
|
+
if (d.scopeRef && d.scopeRef.current && v.getTreeNode(d.scopeRef)) {
|
|
889
|
+
let f = et(d.scopeRef.current, !0);
|
|
890
|
+
Fe(f);
|
|
888
891
|
return;
|
|
889
892
|
}
|
|
890
|
-
|
|
893
|
+
d = d.parent;
|
|
891
894
|
}
|
|
892
895
|
}
|
|
893
896
|
});
|
|
@@ -899,17 +902,17 @@ function vo(e, t, o) {
|
|
|
899
902
|
t
|
|
900
903
|
]);
|
|
901
904
|
}
|
|
902
|
-
function
|
|
903
|
-
e.dispatchEvent(new CustomEvent(
|
|
905
|
+
function Fe(e) {
|
|
906
|
+
e.dispatchEvent(new CustomEvent(pe, {
|
|
904
907
|
bubbles: !0,
|
|
905
908
|
cancelable: !0
|
|
906
909
|
})) && S(e);
|
|
907
910
|
}
|
|
908
|
-
function
|
|
909
|
-
let n = t != null && t.tabbable ?
|
|
911
|
+
function B(e, t, o) {
|
|
912
|
+
let n = t != null && t.tabbable ? mo : co, r = E(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
910
913
|
acceptNode(l) {
|
|
911
914
|
var a;
|
|
912
|
-
return !(t == null || (a = t.from) === null || a === void 0) && a.contains(l) ? NodeFilter.FILTER_REJECT : l.matches(n) &&
|
|
915
|
+
return !(t == null || (a = t.from) === null || a === void 0) && a.contains(l) ? NodeFilter.FILTER_REJECT : l.matches(n) && Qe(l) && (!o || k(l, o)) && (!(t != null && t.accept) || t.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
913
916
|
}
|
|
914
917
|
});
|
|
915
918
|
return t != null && t.from && (r.currentNode = t.from), r;
|
|
@@ -937,7 +940,7 @@ class we {
|
|
|
937
940
|
let o = this.fastMap.get(t);
|
|
938
941
|
if (!o) return;
|
|
939
942
|
let n = o.parent;
|
|
940
|
-
for (let l of this.traverse()) l !== o && o.nodeToRestore && l.nodeToRestore && o.scopeRef && o.scopeRef.current &&
|
|
943
|
+
for (let l of this.traverse()) l !== o && o.nodeToRestore && l.nodeToRestore && o.scopeRef && o.scopeRef.current && k(l.nodeToRestore, o.scopeRef.current) && (l.nodeToRestore = o.nodeToRestore);
|
|
941
944
|
let r = o.children;
|
|
942
945
|
n && (n.removeChild(o), r.size > 0 && r.forEach((l) => n && n.addChild(l))), this.fastMap.delete(o.scopeRef);
|
|
943
946
|
}
|
|
@@ -969,43 +972,43 @@ class be {
|
|
|
969
972
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
|
|
970
973
|
}
|
|
971
974
|
}
|
|
972
|
-
let
|
|
973
|
-
const
|
|
975
|
+
let v = new we();
|
|
976
|
+
const vo = /* @__PURE__ */ new WeakMap(), x = [];
|
|
974
977
|
function $o(e, t) {
|
|
975
|
-
let { onClose: o, shouldCloseOnBlur: n, isOpen: r, isDismissable: l = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside:
|
|
976
|
-
|
|
977
|
-
let
|
|
978
|
-
|
|
978
|
+
let { onClose: o, shouldCloseOnBlur: n, isOpen: r, isDismissable: l = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: s } = e;
|
|
979
|
+
F(() => (r && x.push(t), () => {
|
|
980
|
+
let p = x.indexOf(t);
|
|
981
|
+
p >= 0 && x.splice(p, 1);
|
|
979
982
|
}), [
|
|
980
983
|
r,
|
|
981
984
|
t
|
|
982
985
|
]);
|
|
983
986
|
let c = () => {
|
|
984
|
-
|
|
985
|
-
}, i = (
|
|
986
|
-
(!
|
|
987
|
-
},
|
|
988
|
-
(!
|
|
989
|
-
},
|
|
990
|
-
|
|
987
|
+
x[x.length - 1] === t && o && o();
|
|
988
|
+
}, i = (p) => {
|
|
989
|
+
(!s || s(p.target)) && x[x.length - 1] === t && (p.stopPropagation(), p.preventDefault());
|
|
990
|
+
}, d = (p) => {
|
|
991
|
+
(!s || s(p.target)) && (x[x.length - 1] === t && (p.stopPropagation(), p.preventDefault()), c());
|
|
992
|
+
}, f = (p) => {
|
|
993
|
+
p.key === "Escape" && !a && !p.nativeEvent.isComposing && (p.stopPropagation(), p.preventDefault(), c());
|
|
991
994
|
};
|
|
992
|
-
|
|
995
|
+
ao({
|
|
993
996
|
ref: t,
|
|
994
|
-
onInteractOutside: l && r ?
|
|
997
|
+
onInteractOutside: l && r ? d : void 0,
|
|
995
998
|
onInteractOutsideStart: i
|
|
996
999
|
});
|
|
997
|
-
let { focusWithinProps:
|
|
1000
|
+
let { focusWithinProps: m } = ro({
|
|
998
1001
|
isDisabled: !n,
|
|
999
|
-
onBlurWithin: (
|
|
1000
|
-
!
|
|
1002
|
+
onBlurWithin: (p) => {
|
|
1003
|
+
!p.relatedTarget || po(p.relatedTarget) || (!s || s(p.relatedTarget)) && (o == null || o());
|
|
1001
1004
|
}
|
|
1002
|
-
}), g = (
|
|
1003
|
-
|
|
1005
|
+
}), g = (p) => {
|
|
1006
|
+
p.target === p.currentTarget && p.preventDefault();
|
|
1004
1007
|
};
|
|
1005
1008
|
return {
|
|
1006
1009
|
overlayProps: {
|
|
1007
|
-
onKeyDown:
|
|
1008
|
-
...
|
|
1010
|
+
onKeyDown: f,
|
|
1011
|
+
...m
|
|
1009
1012
|
},
|
|
1010
1013
|
underlayProps: {
|
|
1011
1014
|
onPointerDown: g
|
|
@@ -1013,22 +1016,20 @@ function $o(e, t) {
|
|
|
1013
1016
|
};
|
|
1014
1017
|
}
|
|
1015
1018
|
function wo(e, t, o) {
|
|
1016
|
-
let {
|
|
1017
|
-
|
|
1018
|
-
o && o.current &&
|
|
1019
|
+
let { isOpen: n } = t;
|
|
1020
|
+
F(() => {
|
|
1021
|
+
o && o.current && vo.set(o.current, t.close);
|
|
1019
1022
|
});
|
|
1020
|
-
let l;
|
|
1021
|
-
n === "menu" ? l = !0 : n === "listbox" && (l = "listbox");
|
|
1022
|
-
let a = ze();
|
|
1023
|
+
let r, l = ze();
|
|
1023
1024
|
return {
|
|
1024
1025
|
triggerProps: {
|
|
1025
|
-
"aria-haspopup":
|
|
1026
|
-
"aria-expanded":
|
|
1027
|
-
"aria-controls":
|
|
1026
|
+
"aria-haspopup": r,
|
|
1027
|
+
"aria-expanded": n,
|
|
1028
|
+
"aria-controls": n ? l : void 0,
|
|
1028
1029
|
onPress: t.toggle
|
|
1029
1030
|
},
|
|
1030
1031
|
overlayProps: {
|
|
1031
|
-
id:
|
|
1032
|
+
id: l
|
|
1032
1033
|
}
|
|
1033
1034
|
};
|
|
1034
1035
|
}
|
|
@@ -1043,130 +1044,127 @@ const se = typeof document < "u" && window.visualViewport, Eo = /* @__PURE__ */
|
|
|
1043
1044
|
"submit",
|
|
1044
1045
|
"reset"
|
|
1045
1046
|
]);
|
|
1046
|
-
let
|
|
1047
|
+
let Y = 0, de;
|
|
1047
1048
|
function _o(e = {}) {
|
|
1048
1049
|
let { isDisabled: t } = e;
|
|
1049
1050
|
w(() => {
|
|
1050
1051
|
if (!t)
|
|
1051
|
-
return
|
|
1052
|
-
|
|
1052
|
+
return Y++, Y === 1 && (Ut() ? de = yo() : de = Mo()), () => {
|
|
1053
|
+
Y--, Y === 0 && de();
|
|
1053
1054
|
};
|
|
1054
1055
|
}, [
|
|
1055
1056
|
t
|
|
1056
1057
|
]);
|
|
1057
1058
|
}
|
|
1058
1059
|
function Mo() {
|
|
1059
|
-
return
|
|
1060
|
+
return Z(A(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), A(document.documentElement, "overflow", "hidden"));
|
|
1060
1061
|
}
|
|
1061
1062
|
function yo() {
|
|
1062
1063
|
let e, t, o = (i) => {
|
|
1063
|
-
e =
|
|
1064
|
+
e = Ke(i.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = A(e, "overscrollBehavior", "contain"));
|
|
1064
1065
|
}, n = (i) => {
|
|
1065
1066
|
if (!e || e === document.documentElement || e === document.body) {
|
|
1066
1067
|
i.preventDefault();
|
|
1067
1068
|
return;
|
|
1068
1069
|
}
|
|
1069
1070
|
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && i.preventDefault();
|
|
1070
|
-
}, r = (
|
|
1071
|
-
|
|
1072
|
-
Fe(s) && s !== document.activeElement && (i.preventDefault(), d(), s.style.transform = "translateY(-2000px)", s.focus(), requestAnimationFrame(() => {
|
|
1073
|
-
s.style.transform = "";
|
|
1074
|
-
})), t && t();
|
|
1071
|
+
}, r = () => {
|
|
1072
|
+
t && t();
|
|
1075
1073
|
}, l = (i) => {
|
|
1076
|
-
let
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
Le(
|
|
1080
|
-
}) : se.addEventListener("resize", () => Le(
|
|
1074
|
+
let d = i.target;
|
|
1075
|
+
Po(d) && (s(), d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1076
|
+
d.style.transform = "", se && (se.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1077
|
+
Le(d);
|
|
1078
|
+
}) : se.addEventListener("resize", () => Le(d), {
|
|
1081
1079
|
once: !0
|
|
1082
1080
|
}));
|
|
1083
1081
|
}));
|
|
1084
|
-
}, a = null,
|
|
1082
|
+
}, a = null, s = () => {
|
|
1085
1083
|
if (a) return;
|
|
1086
1084
|
let i = () => {
|
|
1087
1085
|
window.scrollTo(0, 0);
|
|
1088
|
-
},
|
|
1089
|
-
a =
|
|
1090
|
-
window.scrollTo(
|
|
1086
|
+
}, d = window.pageXOffset, f = window.pageYOffset;
|
|
1087
|
+
a = Z(R(window, "scroll", i), A(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), A(document.documentElement, "overflow", "hidden"), A(document.body, "marginTop", `-${f}px`), () => {
|
|
1088
|
+
window.scrollTo(d, f);
|
|
1091
1089
|
}), window.scrollTo(0, 0);
|
|
1092
|
-
}, c =
|
|
1090
|
+
}, c = Z(R(document, "touchstart", o, {
|
|
1093
1091
|
passive: !1,
|
|
1094
1092
|
capture: !0
|
|
1095
|
-
}),
|
|
1093
|
+
}), R(document, "touchmove", n, {
|
|
1096
1094
|
passive: !1,
|
|
1097
1095
|
capture: !0
|
|
1098
|
-
}),
|
|
1096
|
+
}), R(document, "touchend", r, {
|
|
1099
1097
|
passive: !1,
|
|
1100
1098
|
capture: !0
|
|
1101
|
-
}),
|
|
1099
|
+
}), R(document, "focus", l, !0));
|
|
1102
1100
|
return () => {
|
|
1103
1101
|
t == null || t(), a == null || a(), c();
|
|
1104
1102
|
};
|
|
1105
1103
|
}
|
|
1106
|
-
function
|
|
1104
|
+
function A(e, t, o) {
|
|
1107
1105
|
let n = e.style[t];
|
|
1108
1106
|
return e.style[t] = o, () => {
|
|
1109
1107
|
e.style[t] = n;
|
|
1110
1108
|
};
|
|
1111
1109
|
}
|
|
1112
|
-
function
|
|
1110
|
+
function R(e, t, o, n) {
|
|
1113
1111
|
return e.addEventListener(t, o, n), () => {
|
|
1114
1112
|
e.removeEventListener(t, o, n);
|
|
1115
1113
|
};
|
|
1116
1114
|
}
|
|
1117
1115
|
function Le(e) {
|
|
1118
|
-
let t = document.scrollingElement || document.documentElement;
|
|
1119
|
-
for (;
|
|
1120
|
-
let
|
|
1121
|
-
if (
|
|
1122
|
-
let
|
|
1123
|
-
|
|
1116
|
+
let t = document.scrollingElement || document.documentElement, o = e;
|
|
1117
|
+
for (; o && o !== t; ) {
|
|
1118
|
+
let n = Ke(o);
|
|
1119
|
+
if (n !== document.documentElement && n !== document.body && n !== o) {
|
|
1120
|
+
let r = n.getBoundingClientRect().top, l = o.getBoundingClientRect().top;
|
|
1121
|
+
l > r + o.clientHeight && (n.scrollTop += l - r);
|
|
1124
1122
|
}
|
|
1125
|
-
|
|
1123
|
+
o = n.parentElement;
|
|
1126
1124
|
}
|
|
1127
1125
|
}
|
|
1128
|
-
function
|
|
1126
|
+
function Po(e) {
|
|
1129
1127
|
return e instanceof HTMLInputElement && !Eo.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1130
1128
|
}
|
|
1131
|
-
let
|
|
1132
|
-
function
|
|
1129
|
+
let q = /* @__PURE__ */ new WeakMap(), y = [];
|
|
1130
|
+
function ko(e, t = document.body) {
|
|
1133
1131
|
let o = new Set(e), n = /* @__PURE__ */ new Set(), r = (c) => {
|
|
1134
|
-
for (let
|
|
1135
|
-
let i = (
|
|
1136
|
-
if (o.has(
|
|
1132
|
+
for (let m of c.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) o.add(m);
|
|
1133
|
+
let i = (m) => {
|
|
1134
|
+
if (o.has(m) || m.parentElement && n.has(m.parentElement) && m.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
|
|
1137
1135
|
for (let g of o)
|
|
1138
|
-
if (
|
|
1136
|
+
if (m.contains(g)) return NodeFilter.FILTER_SKIP;
|
|
1139
1137
|
return NodeFilter.FILTER_ACCEPT;
|
|
1140
|
-
},
|
|
1138
|
+
}, d = document.createTreeWalker(c, NodeFilter.SHOW_ELEMENT, {
|
|
1141
1139
|
acceptNode: i
|
|
1142
|
-
}),
|
|
1143
|
-
if (
|
|
1144
|
-
let
|
|
1145
|
-
for (;
|
|
1146
|
-
l(
|
|
1140
|
+
}), f = i(c);
|
|
1141
|
+
if (f === NodeFilter.FILTER_ACCEPT && l(c), f !== NodeFilter.FILTER_REJECT) {
|
|
1142
|
+
let m = d.nextNode();
|
|
1143
|
+
for (; m != null; )
|
|
1144
|
+
l(m), m = d.nextNode();
|
|
1147
1145
|
}
|
|
1148
1146
|
}, l = (c) => {
|
|
1149
1147
|
var i;
|
|
1150
|
-
let
|
|
1151
|
-
c.getAttribute("aria-hidden") === "true" &&
|
|
1148
|
+
let d = (i = q.get(c)) !== null && i !== void 0 ? i : 0;
|
|
1149
|
+
c.getAttribute("aria-hidden") === "true" && d === 0 || (d === 0 && c.setAttribute("aria-hidden", "true"), n.add(c), q.set(c, d + 1));
|
|
1152
1150
|
};
|
|
1153
|
-
|
|
1151
|
+
y.length && y[y.length - 1].disconnect(), r(t);
|
|
1154
1152
|
let a = new MutationObserver((c) => {
|
|
1155
1153
|
for (let i of c)
|
|
1156
1154
|
if (!(i.type !== "childList" || i.addedNodes.length === 0) && ![
|
|
1157
1155
|
...o,
|
|
1158
1156
|
...n
|
|
1159
|
-
].some((
|
|
1160
|
-
for (let
|
|
1161
|
-
for (let
|
|
1162
|
-
(
|
|
1157
|
+
].some((d) => d.contains(i.target))) {
|
|
1158
|
+
for (let d of i.removedNodes) d instanceof Element && (o.delete(d), n.delete(d));
|
|
1159
|
+
for (let d of i.addedNodes)
|
|
1160
|
+
(d instanceof HTMLElement || d instanceof SVGElement) && (d.dataset.liveAnnouncer === "true" || d.dataset.reactAriaTopLayer === "true") ? o.add(d) : d instanceof Element && r(d);
|
|
1163
1161
|
}
|
|
1164
1162
|
});
|
|
1165
1163
|
a.observe(t, {
|
|
1166
1164
|
childList: !0,
|
|
1167
1165
|
subtree: !0
|
|
1168
1166
|
});
|
|
1169
|
-
let
|
|
1167
|
+
let s = {
|
|
1170
1168
|
observe() {
|
|
1171
1169
|
a.observe(t, {
|
|
1172
1170
|
childList: !0,
|
|
@@ -1177,47 +1175,47 @@ function Po(e, t = document.body) {
|
|
|
1177
1175
|
a.disconnect();
|
|
1178
1176
|
}
|
|
1179
1177
|
};
|
|
1180
|
-
return
|
|
1178
|
+
return y.push(s), () => {
|
|
1181
1179
|
a.disconnect();
|
|
1182
1180
|
for (let c of n) {
|
|
1183
|
-
let i =
|
|
1184
|
-
i === 1 ? (c.removeAttribute("aria-hidden"),
|
|
1181
|
+
let i = q.get(c);
|
|
1182
|
+
i != null && (i === 1 ? (c.removeAttribute("aria-hidden"), q.delete(c)) : q.set(c, i - 1));
|
|
1185
1183
|
}
|
|
1186
|
-
|
|
1184
|
+
s === y[y.length - 1] ? (y.pop(), y.length && y[y.length - 1].observe()) : y.splice(y.indexOf(s), 1);
|
|
1187
1185
|
};
|
|
1188
1186
|
}
|
|
1189
|
-
const
|
|
1187
|
+
const To = /* @__PURE__ */ wt({});
|
|
1190
1188
|
function xo() {
|
|
1191
1189
|
var e;
|
|
1192
|
-
return (e =
|
|
1190
|
+
return (e = I(To)) !== null && e !== void 0 ? e : {};
|
|
1193
1191
|
}
|
|
1194
|
-
const
|
|
1195
|
-
function
|
|
1196
|
-
let t = Ie(), { portalContainer: o = t ? null : document.body, isExiting: n } = e, [r, l] =
|
|
1192
|
+
const tt = /* @__PURE__ */ $.createContext(null);
|
|
1193
|
+
function So(e) {
|
|
1194
|
+
let t = Ie(), { portalContainer: o = t ? null : document.body, isExiting: n } = e, [r, l] = U(!1), a = H(() => ({
|
|
1197
1195
|
contain: r,
|
|
1198
1196
|
setContain: l
|
|
1199
1197
|
}), [
|
|
1200
1198
|
r,
|
|
1201
1199
|
l
|
|
1202
|
-
]), { getContainer:
|
|
1203
|
-
if (!e.portalContainer &&
|
|
1200
|
+
]), { getContainer: s } = xo();
|
|
1201
|
+
if (!e.portalContainer && s && (o = s()), !o) return null;
|
|
1204
1202
|
let c = e.children;
|
|
1205
|
-
return e.disableFocusManagement || (c = /* @__PURE__ */ $.createElement(
|
|
1203
|
+
return e.disableFocusManagement || (c = /* @__PURE__ */ $.createElement(so, {
|
|
1206
1204
|
restoreFocus: !0,
|
|
1207
1205
|
contain: r && !n
|
|
1208
|
-
}, c)), c = /* @__PURE__ */ $.createElement(
|
|
1206
|
+
}, c)), c = /* @__PURE__ */ $.createElement(tt.Provider, {
|
|
1209
1207
|
value: a
|
|
1210
|
-
}, /* @__PURE__ */ $.createElement(
|
|
1208
|
+
}, /* @__PURE__ */ $.createElement(Qt, null, c)), /* @__PURE__ */ Et.createPortal(c, o);
|
|
1211
1209
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let e =
|
|
1210
|
+
function ot() {
|
|
1211
|
+
let e = I(tt), t = e == null ? void 0 : e.setContain;
|
|
1214
1212
|
w(() => {
|
|
1215
1213
|
t == null || t(!0);
|
|
1216
1214
|
}, [
|
|
1217
1215
|
t
|
|
1218
1216
|
]);
|
|
1219
1217
|
}
|
|
1220
|
-
function
|
|
1218
|
+
function Fo(e, t, o) {
|
|
1221
1219
|
let { overlayProps: n, underlayProps: r } = $o({
|
|
1222
1220
|
...e,
|
|
1223
1221
|
isOpen: t.isOpen,
|
|
@@ -1225,27 +1223,27 @@ function So(e, t, o) {
|
|
|
1225
1223
|
}, o);
|
|
1226
1224
|
return _o({
|
|
1227
1225
|
isDisabled: !t.isOpen
|
|
1228
|
-
}),
|
|
1229
|
-
if (t.isOpen) return
|
|
1226
|
+
}), ot(), F(() => {
|
|
1227
|
+
if (t.isOpen && o.current) return ko([
|
|
1230
1228
|
o.current
|
|
1231
1229
|
]);
|
|
1232
1230
|
}, [
|
|
1233
1231
|
t.isOpen,
|
|
1234
1232
|
o
|
|
1235
1233
|
]), {
|
|
1236
|
-
modalProps:
|
|
1234
|
+
modalProps: Dt(n),
|
|
1237
1235
|
underlayProps: r
|
|
1238
1236
|
};
|
|
1239
1237
|
}
|
|
1240
1238
|
function Lo(e, t) {
|
|
1241
|
-
let { role: o = "dialog" } = e, n =
|
|
1239
|
+
let { role: o = "dialog" } = e, n = Nt();
|
|
1242
1240
|
n = e["aria-label"] ? void 0 : n;
|
|
1243
|
-
let r =
|
|
1244
|
-
return
|
|
1241
|
+
let r = _(!1);
|
|
1242
|
+
return F(() => {
|
|
1245
1243
|
if (t.current && !t.current.contains(document.activeElement)) {
|
|
1246
|
-
|
|
1244
|
+
fe(t.current);
|
|
1247
1245
|
let l = setTimeout(() => {
|
|
1248
|
-
document.activeElement === t.current && (r.current = !0, t.current && (t.current.blur(),
|
|
1246
|
+
document.activeElement === t.current && (r.current = !0, t.current && (t.current.blur(), fe(t.current)), r.current = !1);
|
|
1249
1247
|
}, 500);
|
|
1250
1248
|
return () => {
|
|
1251
1249
|
clearTimeout(l);
|
|
@@ -1253,9 +1251,9 @@ function Lo(e, t) {
|
|
|
1253
1251
|
}
|
|
1254
1252
|
}, [
|
|
1255
1253
|
t
|
|
1256
|
-
]),
|
|
1254
|
+
]), ot(), {
|
|
1257
1255
|
dialogProps: {
|
|
1258
|
-
...
|
|
1256
|
+
...Rt(e, {
|
|
1259
1257
|
labelable: !0
|
|
1260
1258
|
}),
|
|
1261
1259
|
role: o,
|
|
@@ -1273,7 +1271,7 @@ function Lo(e, t) {
|
|
|
1273
1271
|
}
|
|
1274
1272
|
};
|
|
1275
1273
|
}
|
|
1276
|
-
function
|
|
1274
|
+
function Co(e, t, o) {
|
|
1277
1275
|
return t in e ? Object.defineProperty(e, t, {
|
|
1278
1276
|
value: o,
|
|
1279
1277
|
enumerable: !0,
|
|
@@ -1295,46 +1293,46 @@ function Be(e) {
|
|
|
1295
1293
|
for (var t = 1; t < arguments.length; t++) {
|
|
1296
1294
|
var o = arguments[t] != null ? arguments[t] : {};
|
|
1297
1295
|
t % 2 ? Ce(Object(o), !0).forEach(function(n) {
|
|
1298
|
-
|
|
1296
|
+
Co(e, n, o[n]);
|
|
1299
1297
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : Ce(Object(o)).forEach(function(n) {
|
|
1300
1298
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(o, n));
|
|
1301
1299
|
});
|
|
1302
1300
|
}
|
|
1303
1301
|
return e;
|
|
1304
1302
|
}
|
|
1305
|
-
var
|
|
1303
|
+
var Bo = (e, t, o) => {
|
|
1306
1304
|
for (var n of Object.keys(e)) {
|
|
1307
1305
|
var r;
|
|
1308
1306
|
if (e[n] !== ((r = t[n]) !== null && r !== void 0 ? r : o[n]))
|
|
1309
1307
|
return !1;
|
|
1310
1308
|
}
|
|
1311
1309
|
return !0;
|
|
1312
|
-
},
|
|
1310
|
+
}, nt = (e) => (t) => {
|
|
1313
1311
|
var o = e.defaultClassName, n = Be(Be({}, e.defaultVariants), t);
|
|
1314
1312
|
for (var r in n) {
|
|
1315
1313
|
var l, a = (l = n[r]) !== null && l !== void 0 ? l : e.defaultVariants[r];
|
|
1316
1314
|
if (a != null) {
|
|
1317
|
-
var
|
|
1318
|
-
typeof
|
|
1315
|
+
var s = a;
|
|
1316
|
+
typeof s == "boolean" && (s = s === !0 ? "true" : "false");
|
|
1319
1317
|
var c = (
|
|
1320
1318
|
// @ts-expect-error
|
|
1321
|
-
e.variantClassNames[r][
|
|
1319
|
+
e.variantClassNames[r][s]
|
|
1322
1320
|
);
|
|
1323
1321
|
c && (o += " " + c);
|
|
1324
1322
|
}
|
|
1325
1323
|
}
|
|
1326
|
-
for (var [i,
|
|
1327
|
-
|
|
1324
|
+
for (var [i, d] of e.compoundVariants)
|
|
1325
|
+
Bo(i, n, e.defaultVariants) && (o += " " + d);
|
|
1328
1326
|
return o;
|
|
1329
|
-
},
|
|
1330
|
-
function
|
|
1327
|
+
}, No = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2o", Oo = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2q", Do = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2r", rt = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2p", Wo = nt({ defaultClassName: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto20", variantClassNames: { kind: { informational: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto21", delete: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto22", failure: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto23", success: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto24", warning: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto25", successWithFailures: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto26", form: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto27" }, size: { sm: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto28", md: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto29", lg: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2a", xl: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2b" }, fullHeight: { true: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2c", false: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2d" } }, defaultVariants: {}, compoundVariants: [] }), Ao = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2n", Io = nt({ defaultClassName: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2e", variantClassNames: { kind: { form: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2f", delete: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2g", failure: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2h", informational: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2i", success: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2j", warning: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2k", successWithFailures: "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2l" } }, defaultVariants: {}, compoundVariants: [] }), zo = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2m", Ro = "pkg_sps-woodland_modal__version_8_24_0__hash_3moto2s";
|
|
1328
|
+
function at({
|
|
1331
1329
|
children: e,
|
|
1332
1330
|
className: t = "",
|
|
1333
1331
|
...o
|
|
1334
1332
|
}) {
|
|
1335
|
-
return /* @__PURE__ */ u.createElement("div", { className: ue(
|
|
1333
|
+
return /* @__PURE__ */ u.createElement("div", { className: ue(rt, t), ...o }, e);
|
|
1336
1334
|
}
|
|
1337
|
-
De.set(
|
|
1335
|
+
De.set(at, { name: "ModalFooter" });
|
|
1338
1336
|
function Ne({
|
|
1339
1337
|
dismissableValue: e,
|
|
1340
1338
|
handleClose: t
|
|
@@ -1346,7 +1344,7 @@ function Ne({
|
|
|
1346
1344
|
onClick: t,
|
|
1347
1345
|
kind: "icon",
|
|
1348
1346
|
icon: "x",
|
|
1349
|
-
className:
|
|
1347
|
+
className: Oo
|
|
1350
1348
|
}
|
|
1351
1349
|
) : null;
|
|
1352
1350
|
}
|
|
@@ -1359,7 +1357,7 @@ const Oe = Object.freeze({
|
|
|
1359
1357
|
successWithFailures: "status-warning",
|
|
1360
1358
|
warning: "status-warning"
|
|
1361
1359
|
});
|
|
1362
|
-
function
|
|
1360
|
+
function qo({
|
|
1363
1361
|
children: e,
|
|
1364
1362
|
className: t,
|
|
1365
1363
|
"data-testid": o,
|
|
@@ -1367,55 +1365,55 @@ function Ro({
|
|
|
1367
1365
|
onBlur: r,
|
|
1368
1366
|
onFocus: l,
|
|
1369
1367
|
overlayProps: a,
|
|
1370
|
-
size:
|
|
1368
|
+
size: s = "sm",
|
|
1371
1369
|
state: c,
|
|
1372
1370
|
title: i,
|
|
1373
|
-
dismissible:
|
|
1374
|
-
dismissable:
|
|
1375
|
-
onClose:
|
|
1371
|
+
dismissible: d,
|
|
1372
|
+
dismissable: f = !0,
|
|
1373
|
+
onClose: m,
|
|
1376
1374
|
fullHeight: g = !1,
|
|
1377
|
-
...
|
|
1375
|
+
...p
|
|
1378
1376
|
}) {
|
|
1379
|
-
const
|
|
1377
|
+
const M = d ?? f, N = u.useRef(null), { modalProps: ne, underlayProps: it } = Fo(
|
|
1380
1378
|
{
|
|
1381
|
-
isKeyboardDismissDisabled: !
|
|
1382
|
-
...
|
|
1379
|
+
isKeyboardDismissDisabled: !M,
|
|
1380
|
+
...p
|
|
1383
1381
|
},
|
|
1384
1382
|
c,
|
|
1385
|
-
|
|
1386
|
-
), { dialogProps: re, titleProps:
|
|
1383
|
+
N
|
|
1384
|
+
), { dialogProps: re, titleProps: st } = Lo(p, N), dt = Me(ne.onFocus, re.onFocus, l), ut = Me(ne.onBlur, re.onBlur, r), { t: ct } = u.useContext(gt), mt = bt({ "data-testid": o }), [ae, ft] = ht(
|
|
1387
1385
|
e,
|
|
1388
|
-
[{ type:
|
|
1386
|
+
[{ type: at }]
|
|
1389
1387
|
), Ee = u.useCallback(() => {
|
|
1390
|
-
|
|
1391
|
-
}, [
|
|
1392
|
-
return /* @__PURE__ */ u.createElement(
|
|
1388
|
+
m && typeof m == "function" && m(), c.close();
|
|
1389
|
+
}, [m, c.close]), pt = vt(ft, (_e) => _e.type === Ne ? [{ className: ue(_e.props.classname, Do) }] : []);
|
|
1390
|
+
return /* @__PURE__ */ u.createElement(So, null, /* @__PURE__ */ u.createElement("div", { className: Ro, ...it, ...p }, /* @__PURE__ */ u.createElement(
|
|
1393
1391
|
"div",
|
|
1394
1392
|
{
|
|
1395
1393
|
...ne,
|
|
1396
1394
|
...re,
|
|
1397
1395
|
...a,
|
|
1398
|
-
onFocus:
|
|
1399
|
-
onBlur:
|
|
1400
|
-
...
|
|
1401
|
-
ref:
|
|
1402
|
-
className: ue(
|
|
1396
|
+
onFocus: dt,
|
|
1397
|
+
onBlur: ut,
|
|
1398
|
+
...mt("dialog"),
|
|
1399
|
+
ref: N,
|
|
1400
|
+
className: ue(Wo({ kind: n, size: s, fullHeight: g }), t)
|
|
1403
1401
|
},
|
|
1404
|
-
/* @__PURE__ */ u.createElement("div", { ...
|
|
1405
|
-
|
|
1402
|
+
/* @__PURE__ */ u.createElement("div", { ...st, className: Io({ kind: n }) }, n && /* @__PURE__ */ u.createElement(
|
|
1403
|
+
$t,
|
|
1406
1404
|
{
|
|
1407
1405
|
icon: Oe[n] || Oe.informational,
|
|
1408
|
-
className:
|
|
1406
|
+
className: Ao
|
|
1409
1407
|
}
|
|
1410
|
-
), /* @__PURE__ */ u.createElement("div", { className:
|
|
1411
|
-
/* @__PURE__ */ u.createElement("div", { className:
|
|
1412
|
-
ae && ae.length > 0 ? /* @__PURE__ */ u.createElement(u.Fragment, null, le(ae, c.close)) : /* @__PURE__ */ u.createElement("div", { className:
|
|
1408
|
+
), /* @__PURE__ */ u.createElement("div", { className: zo }, le(i, c.close)), /* @__PURE__ */ u.createElement(Ne, { dismissableValue: M, handleClose: Ee })),
|
|
1409
|
+
/* @__PURE__ */ u.createElement("div", { className: No }, le(pt, c.close)),
|
|
1410
|
+
ae && ae.length > 0 ? /* @__PURE__ */ u.createElement(u.Fragment, null, le(ae, c.close)) : /* @__PURE__ */ u.createElement("div", { className: rt }, /* @__PURE__ */ u.createElement(We, { kind: "key", onClick: Ee }, ct("design-system:modal.defaultButtonLabel")))
|
|
1413
1411
|
)));
|
|
1414
1412
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return e.state.isOpen ? /* @__PURE__ */ u.createElement(
|
|
1413
|
+
function lt(e) {
|
|
1414
|
+
return e.state.isOpen ? /* @__PURE__ */ u.createElement(qo, { ...e }, e.children) : /* @__PURE__ */ u.createElement(u.Fragment, null);
|
|
1417
1415
|
}
|
|
1418
|
-
De.set(
|
|
1416
|
+
De.set(lt, {
|
|
1419
1417
|
name: "Modal",
|
|
1420
1418
|
props: {
|
|
1421
1419
|
dismissable: { type: "boolean", default: "true" },
|
|
@@ -1428,17 +1426,17 @@ De.set(nt, {
|
|
|
1428
1426
|
title: { type: "string" }
|
|
1429
1427
|
}
|
|
1430
1428
|
});
|
|
1431
|
-
function
|
|
1432
|
-
let [t, o] =
|
|
1433
|
-
const n =
|
|
1429
|
+
function Vo(e) {
|
|
1430
|
+
let [t, o] = Yt(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
|
|
1431
|
+
const n = T(() => {
|
|
1434
1432
|
o(!0);
|
|
1435
1433
|
}, [
|
|
1436
1434
|
o
|
|
1437
|
-
]), r =
|
|
1435
|
+
]), r = T(() => {
|
|
1438
1436
|
o(!1);
|
|
1439
1437
|
}, [
|
|
1440
1438
|
o
|
|
1441
|
-
]), l =
|
|
1439
|
+
]), l = T(() => {
|
|
1442
1440
|
o(!t);
|
|
1443
1441
|
}, [
|
|
1444
1442
|
o,
|
|
@@ -1452,9 +1450,9 @@ function qo(e) {
|
|
|
1452
1450
|
toggle: l
|
|
1453
1451
|
};
|
|
1454
1452
|
}
|
|
1455
|
-
function
|
|
1456
|
-
const t =
|
|
1457
|
-
{
|
|
1453
|
+
function Jo(e = {}) {
|
|
1454
|
+
const t = Vo(e), o = _(null), { triggerProps: n, overlayProps: r } = wo(
|
|
1455
|
+
{},
|
|
1458
1456
|
t,
|
|
1459
1457
|
o
|
|
1460
1458
|
), {
|
|
@@ -1471,9 +1469,9 @@ function Xo(e = {}) {
|
|
|
1471
1469
|
modalProps: { overlayProps: r, state: t }
|
|
1472
1470
|
};
|
|
1473
1471
|
}
|
|
1474
|
-
const
|
|
1472
|
+
const Ho = {
|
|
1475
1473
|
description: () => /* @__PURE__ */ u.createElement("p", null, "Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),
|
|
1476
|
-
components: [
|
|
1474
|
+
components: [lt],
|
|
1477
1475
|
examples: {
|
|
1478
1476
|
general: {
|
|
1479
1477
|
label: "Usage",
|
|
@@ -2212,13 +2210,13 @@ const Vo = {
|
|
|
2212
2210
|
}
|
|
2213
2211
|
}
|
|
2214
2212
|
}
|
|
2215
|
-
},
|
|
2216
|
-
Modals:
|
|
2213
|
+
}, Yo = {
|
|
2214
|
+
Modals: Ho
|
|
2217
2215
|
};
|
|
2218
2216
|
export {
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2217
|
+
Yo as MANIFEST,
|
|
2218
|
+
lt as Modal,
|
|
2219
|
+
at as ModalFooter,
|
|
2222
2220
|
Oe as ModalIcons,
|
|
2223
|
-
|
|
2221
|
+
Jo as useModal
|
|
2224
2222
|
};
|