@ogcio/design-system-react 1.30.0 → 1.31.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/dist/atoms/DsButton.js +3 -2
- package/dist/atoms/InsetText.d.ts +14 -0
- package/dist/atoms/InsetText.js +17 -0
- package/dist/atoms/icons/Close.js +9 -8
- package/dist/atoms/icons/KeyboardArrowDown.js +6 -5
- package/dist/atoms/icons/KeyboardArrowUp.js +6 -5
- package/dist/atoms/icons/Visibility.js +15 -14
- package/dist/atoms/icons/VisibilityOff.js +9 -8
- package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoBlack.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
- package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
- package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
- package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoWhite.js +327 -0
- package/dist/atoms/icons/logos/index.d.ts +6 -0
- package/dist/atoms/icons/logos/index.js +14 -0
- package/dist/atoms/icons/types.d.ts +5 -5
- package/dist/atoms/index.d.ts +1 -0
- package/dist/atoms/index.js +12 -10
- package/dist/blockquote/blockquote.d.ts +4 -1
- package/dist/blockquote/blockquote.js +18 -4
- package/dist/breadcrumbs/breadcrumbs.js +54 -33
- package/dist/button-group/button-group.js +31 -28
- package/dist/character-count/character-count.js +5 -5
- package/dist/chip/chip.js +41 -19
- package/dist/combo-box/combo-box.js +6 -13
- package/dist/cookie-banner/cookie-banner.js +28 -20
- package/dist/details/details.js +43 -23
- package/dist/drawer/drawer.js +35 -32
- package/dist/footer/footer.js +54 -46
- package/dist/header/header-legacy.js +8 -8
- package/dist/hooks/use-aria-hider.d.ts +1 -1
- package/dist/hooks/use-aria-hider.js +14 -13
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.js +179 -179
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +144 -142
- package/dist/input-file/input-file.js +15 -12
- package/dist/logos/index.d.ts +1 -0
- package/dist/logos/index.js +14 -0
- package/dist/modal/modal.js +125 -128
- package/dist/popover/popover.js +67 -64
- package/dist/score-select/score-select.js +20 -20
- package/dist/select/select-next.js +45 -45
- package/dist/styles.css +1 -1
- package/dist/table/table-row.js +14 -7
- package/dist/tabs/tab-panel.js +6 -6
- package/dist/tabs/tabs.js +19 -19
- package/package.json +10 -10
- package/dist/assets/logos/LogoBlack.d.ts +0 -3
- package/dist/assets/logos/LogoBlack.js +0 -322
- package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
- package/dist/assets/logos/LogoGoldGreen.js +0 -322
- package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
- package/dist/assets/logos/LogoGoldWhite.js +0 -82
- package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.js +0 -60
- package/dist/assets/logos/LogoWhite.d.ts +0 -3
- package/dist/assets/logos/LogoWhite.js +0 -322
- package/dist/assets/logos/index.d.ts +0 -6
- package/dist/assets/logos/index.js +0 -14
|
@@ -3,45 +3,45 @@ import { useLayoutEffect as ge } from "react";
|
|
|
3
3
|
* tabbable 6.4.0
|
|
4
4
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
7
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, _ = !
|
|
6
|
+
var ce = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], M = /* @__PURE__ */ ce.join(","), se = typeof Element > "u", O = se ? function() {
|
|
7
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, _ = !se && Element.prototype.getRootNode ? function(n) {
|
|
8
8
|
var e;
|
|
9
|
-
return
|
|
10
|
-
} : function(
|
|
11
|
-
return
|
|
9
|
+
return n == null || (e = n.getRootNode) === null || e === void 0 ? void 0 : e.call(n);
|
|
10
|
+
} : function(n) {
|
|
11
|
+
return n == null ? void 0 : n.ownerDocument;
|
|
12
12
|
}, G = function(e, t) {
|
|
13
|
-
var
|
|
13
|
+
var r;
|
|
14
14
|
t === void 0 && (t = !0);
|
|
15
|
-
var u = e == null || (
|
|
15
|
+
var u = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "inert"), l = u === "" || u === "true", a = l || t && e && // closest does not exist on shadow roots, so we fall back to a manual
|
|
16
16
|
// lookup upward, in case it is not defined.
|
|
17
17
|
(typeof e.closest == "function" ? e.closest("[inert]") : G(e.parentNode));
|
|
18
18
|
return a;
|
|
19
19
|
}, we = function(e) {
|
|
20
|
-
var t,
|
|
21
|
-
return
|
|
22
|
-
}, fe = function(e, t,
|
|
20
|
+
var t, r = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
|
|
21
|
+
return r === "" || r === "true";
|
|
22
|
+
}, fe = function(e, t, r) {
|
|
23
23
|
if (G(e))
|
|
24
24
|
return [];
|
|
25
25
|
var u = Array.prototype.slice.apply(e.querySelectorAll(M));
|
|
26
|
-
return t && O.call(e, M) && u.unshift(e), u = u.filter(
|
|
27
|
-
}, V = function(e, t,
|
|
26
|
+
return t && O.call(e, M) && u.unshift(e), u = u.filter(r), u;
|
|
27
|
+
}, V = function(e, t, r) {
|
|
28
28
|
for (var u = [], l = Array.from(e); l.length; ) {
|
|
29
29
|
var a = l.shift();
|
|
30
30
|
if (!G(a, !1))
|
|
31
31
|
if (a.tagName === "SLOT") {
|
|
32
|
-
var v = a.assignedElements(), y = v.length ? v : a.children, g = V(y, !0,
|
|
33
|
-
|
|
32
|
+
var v = a.assignedElements(), y = v.length ? v : a.children, g = V(y, !0, r);
|
|
33
|
+
r.flatten ? u.push.apply(u, g) : u.push({
|
|
34
34
|
scopeParent: a,
|
|
35
35
|
candidates: g
|
|
36
36
|
});
|
|
37
37
|
} else {
|
|
38
38
|
var w = O.call(a, M);
|
|
39
|
-
w &&
|
|
39
|
+
w && r.filter(a) && (t || !e.includes(a)) && u.push(a);
|
|
40
40
|
var T = a.shadowRoot || // check for an undisclosed shadow
|
|
41
|
-
typeof
|
|
41
|
+
typeof r.getShadowRoot == "function" && r.getShadowRoot(a), I = !G(T, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a));
|
|
42
42
|
if (T && I) {
|
|
43
|
-
var P = V(T === !0 ? a.children : T.children, !0,
|
|
44
|
-
|
|
43
|
+
var P = V(T === !0 ? a.children : T.children, !0, r);
|
|
44
|
+
r.flatten ? u.push.apply(u, P) : u.push({
|
|
45
45
|
scopeParent: a,
|
|
46
46
|
candidates: P
|
|
47
47
|
});
|
|
@@ -57,8 +57,8 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
57
57
|
throw new Error("No node provided");
|
|
58
58
|
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || we(e)) && !de(e) ? 0 : e.tabIndex;
|
|
59
59
|
}, Te = function(e, t) {
|
|
60
|
-
var
|
|
61
|
-
return
|
|
60
|
+
var r = D(e);
|
|
61
|
+
return r < 0 && t && !de(e) ? 0 : r;
|
|
62
62
|
}, Se = function(e, t) {
|
|
63
63
|
return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
|
|
64
64
|
}, ve = function(e) {
|
|
@@ -66,25 +66,25 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
66
66
|
}, Ne = function(e) {
|
|
67
67
|
return ve(e) && e.type === "hidden";
|
|
68
68
|
}, Ee = function(e) {
|
|
69
|
-
var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(
|
|
70
|
-
return
|
|
69
|
+
var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(r) {
|
|
70
|
+
return r.tagName === "SUMMARY";
|
|
71
71
|
});
|
|
72
72
|
return t;
|
|
73
73
|
}, Fe = function(e, t) {
|
|
74
|
-
for (var
|
|
75
|
-
if (e[
|
|
76
|
-
return e[
|
|
74
|
+
for (var r = 0; r < e.length; r++)
|
|
75
|
+
if (e[r].checked && e[r].form === t)
|
|
76
|
+
return e[r];
|
|
77
77
|
}, ke = function(e) {
|
|
78
78
|
if (!e.name)
|
|
79
79
|
return !0;
|
|
80
|
-
var t = e.form || _(e),
|
|
80
|
+
var t = e.form || _(e), r = function(v) {
|
|
81
81
|
return t.querySelectorAll('input[type="radio"][name="' + v + '"]');
|
|
82
82
|
}, u;
|
|
83
83
|
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
84
|
-
u =
|
|
84
|
+
u = r(window.CSS.escape(e.name));
|
|
85
85
|
else
|
|
86
86
|
try {
|
|
87
|
-
u =
|
|
87
|
+
u = r(e.name);
|
|
88
88
|
} catch (a) {
|
|
89
89
|
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1;
|
|
90
90
|
}
|
|
@@ -95,21 +95,21 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
95
95
|
}, Ie = function(e) {
|
|
96
96
|
return Ae(e) && !ke(e);
|
|
97
97
|
}, Re = function(e) {
|
|
98
|
-
var t,
|
|
99
|
-
if (
|
|
98
|
+
var t, r = e && _(e), u = (t = r) === null || t === void 0 ? void 0 : t.host, l = !1;
|
|
99
|
+
if (r && r !== e) {
|
|
100
100
|
var a, v, y;
|
|
101
101
|
for (l = !!((a = u) !== null && a !== void 0 && (v = a.ownerDocument) !== null && v !== void 0 && v.contains(u) || e != null && (y = e.ownerDocument) !== null && y !== void 0 && y.contains(e)); !l && u; ) {
|
|
102
102
|
var g, w, T;
|
|
103
|
-
|
|
103
|
+
r = _(u), u = (g = r) === null || g === void 0 ? void 0 : g.host, l = !!((w = u) !== null && w !== void 0 && (T = w.ownerDocument) !== null && T !== void 0 && T.contains(u));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
return l;
|
|
107
107
|
}, ne = function(e) {
|
|
108
|
-
var t = e.getBoundingClientRect(),
|
|
109
|
-
return
|
|
108
|
+
var t = e.getBoundingClientRect(), r = t.width, u = t.height;
|
|
109
|
+
return r === 0 && u === 0;
|
|
110
110
|
}, De = function(e, t) {
|
|
111
|
-
var
|
|
112
|
-
if (
|
|
111
|
+
var r = t.displayCheck, u = t.getShadowRoot;
|
|
112
|
+
if (r === "full-native" && "checkVisibility" in e) {
|
|
113
113
|
var l = e.checkVisibility({
|
|
114
114
|
// Checking opacity might be desirable for some use cases, but natively,
|
|
115
115
|
// opacity zero elements _are_ focusable and tabbable.
|
|
@@ -130,9 +130,9 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
130
130
|
var a = O.call(e, "details>summary:first-of-type"), v = a ? e.parentElement : e;
|
|
131
131
|
if (O.call(v, "details:not([open]) *"))
|
|
132
132
|
return !0;
|
|
133
|
-
if (!
|
|
133
|
+
if (!r || r === "full" || // full-native can run this branch when it falls through in case
|
|
134
134
|
// Element#checkVisibility is unsupported
|
|
135
|
-
|
|
135
|
+
r === "full-native" || r === "legacy-full") {
|
|
136
136
|
if (typeof u == "function") {
|
|
137
137
|
for (var y = e; e; ) {
|
|
138
138
|
var g = e.parentElement, w = _(e);
|
|
@@ -144,17 +144,17 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
144
144
|
}
|
|
145
145
|
if (Re(e))
|
|
146
146
|
return !e.getClientRects().length;
|
|
147
|
-
if (
|
|
147
|
+
if (r !== "legacy-full")
|
|
148
148
|
return !0;
|
|
149
|
-
} else if (
|
|
149
|
+
} else if (r === "non-zero-area")
|
|
150
150
|
return ne(e);
|
|
151
151
|
return !1;
|
|
152
152
|
}, Oe = function(e) {
|
|
153
153
|
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
154
154
|
for (var t = e.parentElement; t; ) {
|
|
155
155
|
if (t.tagName === "FIELDSET" && t.disabled) {
|
|
156
|
-
for (var
|
|
157
|
-
var u = t.children.item(
|
|
156
|
+
for (var r = 0; r < t.children.length; r++) {
|
|
157
|
+
var u = t.children.item(r);
|
|
158
158
|
if (u.tagName === "LEGEND")
|
|
159
159
|
return O.call(t, "fieldset[disabled] *") ? !0 : !u.contains(e);
|
|
160
160
|
}
|
|
@@ -172,41 +172,41 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
172
172
|
var t = parseInt(e.getAttribute("tabindex"), 10);
|
|
173
173
|
return !!(isNaN(t) || t >= 0);
|
|
174
174
|
}, be = function(e) {
|
|
175
|
-
var t = [],
|
|
175
|
+
var t = [], r = [];
|
|
176
176
|
return e.forEach(function(u, l) {
|
|
177
177
|
var a = !!u.scopeParent, v = a ? u.scopeParent : u, y = Te(v, a), g = a ? be(u.candidates) : v;
|
|
178
|
-
y === 0 ? a ? t.push.apply(t, g) : t.push(v) :
|
|
178
|
+
y === 0 ? a ? t.push.apply(t, g) : t.push(v) : r.push({
|
|
179
179
|
documentOrder: l,
|
|
180
180
|
tabIndex: y,
|
|
181
181
|
item: u,
|
|
182
182
|
isScope: a,
|
|
183
183
|
content: g
|
|
184
184
|
});
|
|
185
|
-
}),
|
|
185
|
+
}), r.sort(Se).reduce(function(u, l) {
|
|
186
186
|
return l.isScope ? u.push.apply(u, l.content) : u.push(l.content), u;
|
|
187
187
|
}, []).concat(t);
|
|
188
188
|
}, Ce = function(e, t) {
|
|
189
189
|
t = t || {};
|
|
190
|
-
var
|
|
191
|
-
return t.getShadowRoot ?
|
|
190
|
+
var r;
|
|
191
|
+
return t.getShadowRoot ? r = V([e], t.includeContainer, {
|
|
192
192
|
filter: Z.bind(null, t),
|
|
193
193
|
flatten: !1,
|
|
194
194
|
getShadowRoot: t.getShadowRoot,
|
|
195
195
|
shadowRootFilter: Pe
|
|
196
|
-
}) :
|
|
196
|
+
}) : r = fe(e, t.includeContainer, Z.bind(null, t)), be(r);
|
|
197
197
|
}, je = function(e, t) {
|
|
198
198
|
t = t || {};
|
|
199
|
-
var
|
|
200
|
-
return t.getShadowRoot ?
|
|
199
|
+
var r;
|
|
200
|
+
return t.getShadowRoot ? r = V([e], t.includeContainer, {
|
|
201
201
|
filter: q.bind(null, t),
|
|
202
202
|
flatten: !0,
|
|
203
203
|
getShadowRoot: t.getShadowRoot
|
|
204
|
-
}) :
|
|
204
|
+
}) : r = fe(e, t.includeContainer, q.bind(null, t)), r;
|
|
205
205
|
}, C = function(e, t) {
|
|
206
206
|
if (t = t || {}, !e)
|
|
207
207
|
throw new Error("No node provided");
|
|
208
208
|
return O.call(e, M) === !1 ? !1 : Z(t, e);
|
|
209
|
-
}, Le = /* @__PURE__ */
|
|
209
|
+
}, Le = /* @__PURE__ */ ce.concat("iframe:not([inert]):not([inert] *)").join(","), H = function(e, t) {
|
|
210
210
|
if (t = t || {}, !e)
|
|
211
211
|
throw new Error("No node provided");
|
|
212
212
|
return O.call(e, Le) === !1 ? !1 : q(t, e);
|
|
@@ -215,29 +215,29 @@ var se = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
215
215
|
* focus-trap 7.8.0
|
|
216
216
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
217
217
|
*/
|
|
218
|
-
function z(
|
|
219
|
-
(e == null || e >
|
|
220
|
-
for (var t = 0,
|
|
221
|
-
return
|
|
218
|
+
function z(n, e) {
|
|
219
|
+
(e == null || e > n.length) && (e = n.length);
|
|
220
|
+
for (var t = 0, r = Array(e); t < e; t++) r[t] = n[t];
|
|
221
|
+
return r;
|
|
222
222
|
}
|
|
223
|
-
function xe(
|
|
224
|
-
if (Array.isArray(
|
|
223
|
+
function xe(n) {
|
|
224
|
+
if (Array.isArray(n)) return z(n);
|
|
225
225
|
}
|
|
226
|
-
function ie(
|
|
227
|
-
var t = typeof Symbol < "u" &&
|
|
226
|
+
function ie(n, e) {
|
|
227
|
+
var t = typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
228
228
|
if (!t) {
|
|
229
|
-
if (Array.isArray(
|
|
230
|
-
t && (
|
|
231
|
-
var
|
|
229
|
+
if (Array.isArray(n) || (t = he(n)) || e) {
|
|
230
|
+
t && (n = t);
|
|
231
|
+
var r = 0, u = function() {
|
|
232
232
|
};
|
|
233
233
|
return {
|
|
234
234
|
s: u,
|
|
235
235
|
n: function() {
|
|
236
|
-
return
|
|
236
|
+
return r >= n.length ? {
|
|
237
237
|
done: !0
|
|
238
238
|
} : {
|
|
239
239
|
done: !1,
|
|
240
|
-
value: r
|
|
240
|
+
value: n[r++]
|
|
241
241
|
};
|
|
242
242
|
},
|
|
243
243
|
e: function(y) {
|
|
@@ -252,7 +252,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
252
252
|
var l, a = !0, v = !1;
|
|
253
253
|
return {
|
|
254
254
|
s: function() {
|
|
255
|
-
t = t.call(
|
|
255
|
+
t = t.call(n);
|
|
256
256
|
},
|
|
257
257
|
n: function() {
|
|
258
258
|
var y = t.next();
|
|
@@ -270,64 +270,64 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
function Be(
|
|
274
|
-
return (e = Ve(e)) in
|
|
273
|
+
function Be(n, e, t) {
|
|
274
|
+
return (e = Ve(e)) in n ? Object.defineProperty(n, e, {
|
|
275
275
|
value: t,
|
|
276
276
|
enumerable: !0,
|
|
277
277
|
configurable: !0,
|
|
278
278
|
writable: !0
|
|
279
|
-
}) :
|
|
279
|
+
}) : n[e] = t, n;
|
|
280
280
|
}
|
|
281
|
-
function Ke(
|
|
282
|
-
if (typeof Symbol < "u" &&
|
|
281
|
+
function Ke(n) {
|
|
282
|
+
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
283
283
|
}
|
|
284
284
|
function Me() {
|
|
285
285
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
286
286
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
287
287
|
}
|
|
288
|
-
function oe(
|
|
289
|
-
var t = Object.keys(
|
|
288
|
+
function oe(n, e) {
|
|
289
|
+
var t = Object.keys(n);
|
|
290
290
|
if (Object.getOwnPropertySymbols) {
|
|
291
|
-
var
|
|
292
|
-
e && (
|
|
293
|
-
return Object.getOwnPropertyDescriptor(
|
|
294
|
-
})), t.push.apply(t,
|
|
291
|
+
var r = Object.getOwnPropertySymbols(n);
|
|
292
|
+
e && (r = r.filter(function(u) {
|
|
293
|
+
return Object.getOwnPropertyDescriptor(n, u).enumerable;
|
|
294
|
+
})), t.push.apply(t, r);
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
|
-
function ue(
|
|
298
|
+
function ue(n) {
|
|
299
299
|
for (var e = 1; e < arguments.length; e++) {
|
|
300
300
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
301
|
-
e % 2 ? oe(Object(t), !0).forEach(function(
|
|
302
|
-
Be(
|
|
303
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
304
|
-
Object.defineProperty(
|
|
301
|
+
e % 2 ? oe(Object(t), !0).forEach(function(r) {
|
|
302
|
+
Be(n, r, t[r]);
|
|
303
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : oe(Object(t)).forEach(function(r) {
|
|
304
|
+
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
|
-
return
|
|
307
|
+
return n;
|
|
308
308
|
}
|
|
309
|
-
function _e(
|
|
310
|
-
return xe(
|
|
309
|
+
function _e(n) {
|
|
310
|
+
return xe(n) || Ke(n) || he(n) || Me();
|
|
311
311
|
}
|
|
312
|
-
function Ge(
|
|
313
|
-
if (typeof
|
|
314
|
-
var t =
|
|
312
|
+
function Ge(n, e) {
|
|
313
|
+
if (typeof n != "object" || !n) return n;
|
|
314
|
+
var t = n[Symbol.toPrimitive];
|
|
315
315
|
if (t !== void 0) {
|
|
316
|
-
var
|
|
317
|
-
if (typeof
|
|
316
|
+
var r = t.call(n, e);
|
|
317
|
+
if (typeof r != "object") return r;
|
|
318
318
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
319
319
|
}
|
|
320
|
-
return (e === "string" ? String : Number)(
|
|
320
|
+
return (e === "string" ? String : Number)(n);
|
|
321
321
|
}
|
|
322
|
-
function Ve(
|
|
323
|
-
var e = Ge(
|
|
322
|
+
function Ve(n) {
|
|
323
|
+
var e = Ge(n, "string");
|
|
324
324
|
return typeof e == "symbol" ? e : e + "";
|
|
325
325
|
}
|
|
326
|
-
function he(
|
|
327
|
-
if (
|
|
328
|
-
if (typeof
|
|
329
|
-
var t = {}.toString.call(
|
|
330
|
-
return t === "Object" &&
|
|
326
|
+
function he(n, e) {
|
|
327
|
+
if (n) {
|
|
328
|
+
if (typeof n == "string") return z(n, e);
|
|
329
|
+
var t = {}.toString.call(n).slice(8, -1);
|
|
330
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? z(n, e) : void 0;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
var F = {
|
|
@@ -337,15 +337,15 @@ var F = {
|
|
|
337
337
|
},
|
|
338
338
|
// Pauses the currently active trap, then adds a new trap to the stack.
|
|
339
339
|
activateTrap: function(e, t) {
|
|
340
|
-
var
|
|
341
|
-
t !==
|
|
340
|
+
var r = F.getActiveTrap(e);
|
|
341
|
+
t !== r && F.pauseTrap(e);
|
|
342
342
|
var u = e.indexOf(t);
|
|
343
343
|
u === -1 || e.splice(u, 1), e.push(t);
|
|
344
344
|
},
|
|
345
345
|
// Removes the trap from the top of the stack, then unpauses the next trap down.
|
|
346
346
|
deactivateTrap: function(e, t) {
|
|
347
|
-
var
|
|
348
|
-
|
|
347
|
+
var r = e.indexOf(t);
|
|
348
|
+
r !== -1 && e.splice(r, 1), F.unpauseTrap(e);
|
|
349
349
|
},
|
|
350
350
|
// Pauses the trap at the top of the stack.
|
|
351
351
|
pauseTrap: function(e) {
|
|
@@ -370,13 +370,13 @@ var F = {
|
|
|
370
370
|
}, le = function(e) {
|
|
371
371
|
return setTimeout(e, 0);
|
|
372
372
|
}, L = function(e) {
|
|
373
|
-
for (var t = arguments.length,
|
|
374
|
-
|
|
375
|
-
return typeof e == "function" ? e.apply(void 0,
|
|
373
|
+
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), u = 1; u < t; u++)
|
|
374
|
+
r[u - 1] = arguments[u];
|
|
375
|
+
return typeof e == "function" ? e.apply(void 0, r) : e;
|
|
376
376
|
}, K = function(e) {
|
|
377
377
|
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
378
378
|
}, He = [], Ze = function(e, t) {
|
|
379
|
-
var
|
|
379
|
+
var r = (t == null ? void 0 : t.document) || document, u = (t == null ? void 0 : t.trapStack) || He, l = ue({
|
|
380
380
|
returnFocusOnDeactivate: !0,
|
|
381
381
|
escapeDeactivates: !0,
|
|
382
382
|
delayInitialFocus: !0,
|
|
@@ -427,31 +427,31 @@ var F = {
|
|
|
427
427
|
delayInitialFocusTimer: void 0,
|
|
428
428
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
429
429
|
recentNavEvent: void 0
|
|
430
|
-
}, v, y = function(i, o,
|
|
431
|
-
return i && i[o] !== void 0 ? i[o] : l[
|
|
430
|
+
}, v, y = function(i, o, c) {
|
|
431
|
+
return i && i[o] !== void 0 ? i[o] : l[c || o];
|
|
432
432
|
}, g = function(i, o) {
|
|
433
|
-
var
|
|
433
|
+
var c = typeof (o == null ? void 0 : o.composedPath) == "function" ? o.composedPath() : void 0;
|
|
434
434
|
return a.containerGroups.findIndex(function(d) {
|
|
435
435
|
var f = d.container, b = d.tabbableNodes;
|
|
436
436
|
return f.contains(i) || // fall back to explicit tabbable search which will take into consideration any
|
|
437
437
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
438
438
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
439
439
|
// look inside web components even if open)
|
|
440
|
-
(
|
|
441
|
-
return
|
|
440
|
+
(c == null ? void 0 : c.includes(f)) || b.find(function(s) {
|
|
441
|
+
return s === i;
|
|
442
442
|
});
|
|
443
443
|
});
|
|
444
444
|
}, w = function(i) {
|
|
445
|
-
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
446
|
-
if (typeof
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
445
|
+
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = o.hasFallback, d = c === void 0 ? !1 : c, f = o.params, b = f === void 0 ? [] : f, s = l[i];
|
|
446
|
+
if (typeof s == "function" && (s = s.apply(void 0, _e(b))), s === !0 && (s = void 0), !s) {
|
|
447
|
+
if (s === void 0 || s === !1)
|
|
448
|
+
return s;
|
|
449
449
|
throw new Error("`".concat(i, "` was specified but was not a node, or did not return a node"));
|
|
450
450
|
}
|
|
451
|
-
var h =
|
|
452
|
-
if (typeof
|
|
451
|
+
var h = s;
|
|
452
|
+
if (typeof s == "string") {
|
|
453
453
|
try {
|
|
454
|
-
h =
|
|
454
|
+
h = r.querySelector(s);
|
|
455
455
|
} catch (p) {
|
|
456
456
|
throw new Error("`".concat(i, '` appears to be an invalid selector; error="').concat(p.message, '"'));
|
|
457
457
|
}
|
|
@@ -466,11 +466,11 @@ var F = {
|
|
|
466
466
|
if (i === !1)
|
|
467
467
|
return !1;
|
|
468
468
|
if (i === void 0 || i && !H(i, l.tabbableOptions))
|
|
469
|
-
if (g(
|
|
470
|
-
i =
|
|
469
|
+
if (g(r.activeElement) >= 0)
|
|
470
|
+
i = r.activeElement;
|
|
471
471
|
else {
|
|
472
|
-
var o = a.tabbableGroups[0],
|
|
473
|
-
i =
|
|
472
|
+
var o = a.tabbableGroups[0], c = o && o.firstTabbableNode;
|
|
473
|
+
i = c || w("fallbackFocus");
|
|
474
474
|
}
|
|
475
475
|
else i === null && (i = w("fallbackFocus"));
|
|
476
476
|
if (!i)
|
|
@@ -478,9 +478,9 @@ var F = {
|
|
|
478
478
|
return i;
|
|
479
479
|
}, I = function() {
|
|
480
480
|
if (a.containerGroups = a.containers.map(function(i) {
|
|
481
|
-
var o = Ce(i, l.tabbableOptions),
|
|
481
|
+
var o = Ce(i, l.tabbableOptions), c = je(i, l.tabbableOptions), d = o.length > 0 ? o[0] : void 0, f = o.length > 0 ? o[o.length - 1] : void 0, b = c.find(function(p) {
|
|
482
482
|
return C(p);
|
|
483
|
-
}),
|
|
483
|
+
}), s = c.slice().reverse().find(function(p) {
|
|
484
484
|
return C(p);
|
|
485
485
|
}), h = !!o.find(function(p) {
|
|
486
486
|
return D(p) > 0;
|
|
@@ -488,7 +488,7 @@ var F = {
|
|
|
488
488
|
return {
|
|
489
489
|
container: i,
|
|
490
490
|
tabbableNodes: o,
|
|
491
|
-
focusableNodes:
|
|
491
|
+
focusableNodes: c,
|
|
492
492
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
493
493
|
posTabIndexesFound: h,
|
|
494
494
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
@@ -505,7 +505,7 @@ var F = {
|
|
|
505
505
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
506
506
|
firstDomTabbableNode: b,
|
|
507
507
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
508
|
-
lastDomTabbableNode:
|
|
508
|
+
lastDomTabbableNode: s,
|
|
509
509
|
/**
|
|
510
510
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
511
511
|
* in this container, if any.
|
|
@@ -516,9 +516,9 @@ var F = {
|
|
|
516
516
|
*/
|
|
517
517
|
nextTabbableNode: function(S) {
|
|
518
518
|
var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, N = o.indexOf(S);
|
|
519
|
-
return N < 0 ? E ?
|
|
519
|
+
return N < 0 ? E ? c.slice(c.indexOf(S) + 1).find(function(R) {
|
|
520
520
|
return C(R);
|
|
521
|
-
}) :
|
|
521
|
+
}) : c.slice(0, c.indexOf(S)).reverse().find(function(R) {
|
|
522
522
|
return C(R);
|
|
523
523
|
}) : o[N + (E ? 1 : -1)];
|
|
524
524
|
}
|
|
@@ -551,31 +551,31 @@ var F = {
|
|
|
551
551
|
});
|
|
552
552
|
return o || (o === !1 ? !1 : i);
|
|
553
553
|
}, $ = function(i) {
|
|
554
|
-
var o = i.target,
|
|
555
|
-
o = o || K(
|
|
554
|
+
var o = i.target, c = i.event, d = i.isBackward, f = d === void 0 ? !1 : d;
|
|
555
|
+
o = o || K(c), I();
|
|
556
556
|
var b = null;
|
|
557
557
|
if (a.tabbableGroups.length > 0) {
|
|
558
|
-
var
|
|
559
|
-
if (
|
|
558
|
+
var s = g(o, c), h = s >= 0 ? a.containerGroups[s] : void 0;
|
|
559
|
+
if (s < 0)
|
|
560
560
|
f ? b = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : b = a.tabbableGroups[0].firstTabbableNode;
|
|
561
561
|
else if (f) {
|
|
562
562
|
var p = a.tabbableGroups.findIndex(function(W) {
|
|
563
563
|
var Y = W.firstTabbableNode;
|
|
564
564
|
return o === Y;
|
|
565
565
|
});
|
|
566
|
-
if (p < 0 && (h.container === o || H(o, l.tabbableOptions) && !C(o, l.tabbableOptions) && !h.nextTabbableNode(o, !1)) && (p =
|
|
566
|
+
if (p < 0 && (h.container === o || H(o, l.tabbableOptions) && !C(o, l.tabbableOptions) && !h.nextTabbableNode(o, !1)) && (p = s), p >= 0) {
|
|
567
567
|
var S = p === 0 ? a.tabbableGroups.length - 1 : p - 1, E = a.tabbableGroups[S];
|
|
568
568
|
b = D(o) >= 0 ? E.lastTabbableNode : E.lastDomTabbableNode;
|
|
569
|
-
} else x(
|
|
569
|
+
} else x(c) || (b = h.nextTabbableNode(o, !1));
|
|
570
570
|
} else {
|
|
571
571
|
var N = a.tabbableGroups.findIndex(function(W) {
|
|
572
572
|
var Y = W.lastTabbableNode;
|
|
573
573
|
return o === Y;
|
|
574
574
|
});
|
|
575
|
-
if (N < 0 && (h.container === o || H(o, l.tabbableOptions) && !C(o, l.tabbableOptions) && !h.nextTabbableNode(o)) && (N =
|
|
575
|
+
if (N < 0 && (h.container === o || H(o, l.tabbableOptions) && !C(o, l.tabbableOptions) && !h.nextTabbableNode(o)) && (N = s), N >= 0) {
|
|
576
576
|
var R = N === a.tabbableGroups.length - 1 ? 0 : N + 1, A = a.tabbableGroups[R];
|
|
577
577
|
b = D(o) >= 0 ? A.firstTabbableNode : A.firstDomTabbableNode;
|
|
578
|
-
} else x(
|
|
578
|
+
} else x(c) || (b = h.nextTabbableNode(o));
|
|
579
579
|
}
|
|
580
580
|
} else
|
|
581
581
|
b = w("fallbackFocus");
|
|
@@ -598,20 +598,20 @@ var F = {
|
|
|
598
598
|
L(l.allowOutsideClick, i) || i.preventDefault();
|
|
599
599
|
}
|
|
600
600
|
}, J = function(i) {
|
|
601
|
-
var o = K(i),
|
|
602
|
-
if (
|
|
603
|
-
|
|
601
|
+
var o = K(i), c = g(o, i) >= 0;
|
|
602
|
+
if (c || o instanceof Document)
|
|
603
|
+
c && (a.mostRecentlyFocusedNode = o);
|
|
604
604
|
else {
|
|
605
605
|
i.stopImmediatePropagation();
|
|
606
606
|
var d, f = !0;
|
|
607
607
|
if (a.mostRecentlyFocusedNode)
|
|
608
608
|
if (D(a.mostRecentlyFocusedNode) > 0) {
|
|
609
|
-
var b = g(a.mostRecentlyFocusedNode),
|
|
610
|
-
if (
|
|
611
|
-
var h =
|
|
609
|
+
var b = g(a.mostRecentlyFocusedNode), s = a.containerGroups[b].tabbableNodes;
|
|
610
|
+
if (s.length > 0) {
|
|
611
|
+
var h = s.findIndex(function(p) {
|
|
612
612
|
return p === a.mostRecentlyFocusedNode;
|
|
613
613
|
});
|
|
614
|
-
h >= 0 && (l.isKeyForward(a.recentNavEvent) ? h + 1 <
|
|
614
|
+
h >= 0 && (l.isKeyForward(a.recentNavEvent) ? h + 1 < s.length && (d = s[h + 1], f = !1) : h - 1 >= 0 && (d = s[h - 1], f = !1));
|
|
615
615
|
}
|
|
616
616
|
} else
|
|
617
617
|
a.containerGroups.some(function(p) {
|
|
@@ -632,11 +632,11 @@ var F = {
|
|
|
632
632
|
}, ye = function(i) {
|
|
633
633
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
634
634
|
a.recentNavEvent = i;
|
|
635
|
-
var
|
|
635
|
+
var c = $({
|
|
636
636
|
event: i,
|
|
637
637
|
isBackward: o
|
|
638
638
|
});
|
|
639
|
-
|
|
639
|
+
c && (x(i) && i.preventDefault(), k(c));
|
|
640
640
|
}, Q = function(i) {
|
|
641
641
|
(l.isKeyForward(i) || l.isKeyBackward(i)) && ye(i, l.isKeyBackward(i));
|
|
642
642
|
}, ee = function(i) {
|
|
@@ -648,35 +648,35 @@ var F = {
|
|
|
648
648
|
if (a.active)
|
|
649
649
|
return F.activateTrap(u, v), a.delayInitialFocusTimer = l.delayInitialFocus ? le(function() {
|
|
650
650
|
k(T());
|
|
651
|
-
}) : k(T()),
|
|
651
|
+
}) : k(T()), r.addEventListener("focusin", J, !0), r.addEventListener("mousedown", B, {
|
|
652
652
|
capture: !0,
|
|
653
653
|
passive: !1
|
|
654
|
-
}),
|
|
654
|
+
}), r.addEventListener("touchstart", B, {
|
|
655
655
|
capture: !0,
|
|
656
656
|
passive: !1
|
|
657
|
-
}),
|
|
657
|
+
}), r.addEventListener("click", te, {
|
|
658
658
|
capture: !0,
|
|
659
659
|
passive: !1
|
|
660
|
-
}),
|
|
660
|
+
}), r.addEventListener("keydown", Q, {
|
|
661
661
|
capture: !0,
|
|
662
662
|
passive: !1
|
|
663
|
-
}),
|
|
663
|
+
}), r.addEventListener("keydown", ee), v;
|
|
664
664
|
}, pe = function(i) {
|
|
665
665
|
a.active && !a.paused && v._setSubtreeIsolation(!1), a.adjacentElements.clear(), a.alreadySilent.clear();
|
|
666
|
-
var o = /* @__PURE__ */ new Set(),
|
|
666
|
+
var o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), d = ie(i), f;
|
|
667
667
|
try {
|
|
668
668
|
for (d.s(); !(f = d.n()).done; ) {
|
|
669
669
|
var b = f.value;
|
|
670
670
|
o.add(b);
|
|
671
|
-
for (var
|
|
671
|
+
for (var s = typeof ShadowRoot < "u" && b.getRootNode() instanceof ShadowRoot, h = b; h; ) {
|
|
672
672
|
o.add(h);
|
|
673
673
|
var p = h.parentElement, S = [];
|
|
674
|
-
p ? S = p.children : !p &&
|
|
674
|
+
p ? S = p.children : !p && s && (S = h.getRootNode().children, p = h.getRootNode().host, s = typeof ShadowRoot < "u" && p.getRootNode() instanceof ShadowRoot);
|
|
675
675
|
var E = ie(S), N;
|
|
676
676
|
try {
|
|
677
677
|
for (E.s(); !(N = E.n()).done; ) {
|
|
678
678
|
var R = N.value;
|
|
679
|
-
|
|
679
|
+
c.add(R);
|
|
680
680
|
}
|
|
681
681
|
} catch (A) {
|
|
682
682
|
E.e(A);
|
|
@@ -692,14 +692,14 @@ var F = {
|
|
|
692
692
|
d.f();
|
|
693
693
|
}
|
|
694
694
|
o.forEach(function(A) {
|
|
695
|
-
|
|
696
|
-
}), a.adjacentElements =
|
|
695
|
+
c.delete(A);
|
|
696
|
+
}), a.adjacentElements = c;
|
|
697
697
|
}, re = function() {
|
|
698
698
|
if (a.active)
|
|
699
|
-
return
|
|
699
|
+
return r.removeEventListener("focusin", J, !0), r.removeEventListener("mousedown", B, !0), r.removeEventListener("touchstart", B, !0), r.removeEventListener("click", te, !0), r.removeEventListener("keydown", Q, !0), r.removeEventListener("keydown", ee), v;
|
|
700
700
|
}, me = function(i) {
|
|
701
|
-
var o = i.some(function(
|
|
702
|
-
var d = Array.from(
|
|
701
|
+
var o = i.some(function(c) {
|
|
702
|
+
var d = Array.from(c.removedNodes);
|
|
703
703
|
return d.some(function(f) {
|
|
704
704
|
return f === a.mostRecentlyFocusedNode;
|
|
705
705
|
});
|
|
@@ -723,15 +723,15 @@ var F = {
|
|
|
723
723
|
activate: function(i) {
|
|
724
724
|
if (a.active)
|
|
725
725
|
return this;
|
|
726
|
-
var o = y(i, "onActivate"),
|
|
726
|
+
var o = y(i, "onActivate"), c = y(i, "onPostActivate"), d = y(i, "checkCanFocusTrap"), f = F.getActiveTrap(u), b = !1;
|
|
727
727
|
if (f && !f.paused) {
|
|
728
|
-
var
|
|
729
|
-
(
|
|
728
|
+
var s;
|
|
729
|
+
(s = f._setSubtreeIsolation) === null || s === void 0 || s.call(f, !1), b = !0;
|
|
730
730
|
}
|
|
731
731
|
try {
|
|
732
|
-
d || I(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = P(
|
|
732
|
+
d || I(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = P(r), o == null || o();
|
|
733
733
|
var h = function() {
|
|
734
|
-
d && I(), ae(), j(), l.isolateSubtrees && v._setSubtreeIsolation(!0),
|
|
734
|
+
d && I(), ae(), j(), l.isolateSubtrees && v._setSubtreeIsolation(!0), c == null || c();
|
|
735
735
|
};
|
|
736
736
|
if (d)
|
|
737
737
|
return d(a.containers.concat()).then(h, h), this;
|
|
@@ -754,14 +754,14 @@ var F = {
|
|
|
754
754
|
checkCanReturnFocus: l.checkCanReturnFocus
|
|
755
755
|
}, i);
|
|
756
756
|
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, a.paused || v._setSubtreeIsolation(!1), a.alreadySilent.clear(), re(), a.active = !1, a.paused = !1, j(), F.deactivateTrap(u, v);
|
|
757
|
-
var
|
|
758
|
-
|
|
759
|
-
var
|
|
757
|
+
var c = y(o, "onDeactivate"), d = y(o, "onPostDeactivate"), f = y(o, "checkCanReturnFocus"), b = y(o, "returnFocus", "returnFocusOnDeactivate");
|
|
758
|
+
c == null || c();
|
|
759
|
+
var s = function() {
|
|
760
760
|
le(function() {
|
|
761
761
|
b && k(X(a.nodeFocusedBeforeActivation)), d == null || d();
|
|
762
762
|
});
|
|
763
763
|
};
|
|
764
|
-
return b && f ? (f(X(a.nodeFocusedBeforeActivation)).then(
|
|
764
|
+
return b && f ? (f(X(a.nodeFocusedBeforeActivation)).then(s, s), this) : (s(), this);
|
|
765
765
|
},
|
|
766
766
|
pause: function(i) {
|
|
767
767
|
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, i)) : this;
|
|
@@ -771,8 +771,8 @@ var F = {
|
|
|
771
771
|
},
|
|
772
772
|
updateContainerElements: function(i) {
|
|
773
773
|
var o = [].concat(i).filter(Boolean);
|
|
774
|
-
return a.containers = o.map(function(
|
|
775
|
-
return typeof
|
|
774
|
+
return a.containers = o.map(function(c) {
|
|
775
|
+
return typeof c == "string" ? r.querySelector(c) : c;
|
|
776
776
|
}), l.isolateSubtrees && pe(a.containers), a.active && (I(), l.isolateSubtrees && !a.paused && v._setSubtreeIsolation(!0)), j(), this;
|
|
777
777
|
}
|
|
778
778
|
}, Object.defineProperties(v, {
|
|
@@ -786,8 +786,8 @@ var F = {
|
|
|
786
786
|
if (a.paused === i)
|
|
787
787
|
return this;
|
|
788
788
|
if (a.paused = i, i) {
|
|
789
|
-
var
|
|
790
|
-
|
|
789
|
+
var c = y(o, "onPause"), d = y(o, "onPostPause");
|
|
790
|
+
c == null || c(), re(), j(), v._setSubtreeIsolation(!1), d == null || d();
|
|
791
791
|
} else {
|
|
792
792
|
var f = y(o, "onUnpause"), b = y(o, "onPostUnpause");
|
|
793
793
|
f == null || f(), v._setSubtreeIsolation(!0), I(), ae(), j(), b == null || b();
|
|
@@ -798,11 +798,11 @@ var F = {
|
|
|
798
798
|
_setSubtreeIsolation: {
|
|
799
799
|
value: function(i) {
|
|
800
800
|
l.isolateSubtrees && a.adjacentElements.forEach(function(o) {
|
|
801
|
-
var
|
|
801
|
+
var c;
|
|
802
802
|
if (i)
|
|
803
803
|
switch (l.isolateSubtrees) {
|
|
804
804
|
case "aria-hidden":
|
|
805
|
-
(o.ariaHidden === "true" || ((
|
|
805
|
+
(o.ariaHidden === "true" || ((c = o.getAttribute("aria-hidden")) === null || c === void 0 ? void 0 : c.toLowerCase()) === "true") && a.alreadySilent.add(o), o.setAttribute("aria-hidden", "true");
|
|
806
806
|
break;
|
|
807
807
|
default:
|
|
808
808
|
(o.inert || o.hasAttribute("inert")) && a.alreadySilent.add(o), o.setAttribute("inert", !0);
|
|
@@ -821,20 +821,20 @@ var F = {
|
|
|
821
821
|
}
|
|
822
822
|
}), v.updateContainerElements(e), v;
|
|
823
823
|
};
|
|
824
|
-
const Xe = (
|
|
824
|
+
const Xe = (n, e, t) => {
|
|
825
825
|
ge(() => {
|
|
826
|
-
if (!
|
|
826
|
+
if (!e || !n.current)
|
|
827
827
|
return;
|
|
828
|
-
const n = Ze(r, {
|
|
828
|
+
const r = n.current, u = Ze(r, {
|
|
829
829
|
...t,
|
|
830
830
|
initialFocus: (t == null ? void 0 : t.initialFocus) ?? r,
|
|
831
831
|
fallbackFocus: (t == null ? void 0 : t.fallbackFocus) ?? r,
|
|
832
832
|
returnFocusOnDeactivate: !1
|
|
833
833
|
});
|
|
834
|
-
return
|
|
835
|
-
|
|
834
|
+
return u.activate(), () => {
|
|
835
|
+
u.deactivate();
|
|
836
836
|
};
|
|
837
|
-
}, [
|
|
837
|
+
}, [n.current, e]);
|
|
838
838
|
};
|
|
839
839
|
export {
|
|
840
840
|
Xe as useFocusTrap
|