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