agnosticui-core 2.0.0-alpha.21 → 2.0.0-alpha.23

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.
Files changed (57) hide show
  1. package/dist/components/Checkbox/core/_Checkbox.d.ts +6 -0
  2. package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
  3. package/dist/components/Checkbox/core/_Checkbox.js +44 -36
  4. package/dist/components/Combobox/core/_Combobox.d.ts +19 -0
  5. package/dist/components/Combobox/core/_Combobox.d.ts.map +1 -1
  6. package/dist/components/Combobox/core/_Combobox.js +154 -122
  7. package/dist/components/Combobox/vue/VueCombobox.vue.d.ts +1 -1
  8. package/dist/components/Dialog/core/_dialog.d.ts.map +1 -1
  9. package/dist/components/Dialog/core/_dialog.js +176 -166
  10. package/dist/components/Dialog/react/ReactDialog.d.ts +27 -8
  11. package/dist/components/Dialog/react/ReactDialog.d.ts.map +1 -1
  12. package/dist/components/Dialog/react/ReactDialog.js +32 -10
  13. package/dist/components/Drawer/react/ReactDrawer.d.ts +27 -8
  14. package/dist/components/Drawer/react/ReactDrawer.d.ts.map +1 -1
  15. package/dist/components/Drawer/react/ReactDrawer.js +31 -9
  16. package/dist/components/Input/core/_Input.d.ts +19 -0
  17. package/dist/components/Input/core/_Input.d.ts.map +1 -1
  18. package/dist/components/Input/core/_Input.js +34 -9
  19. package/dist/components/Radio/core/_Radio.d.ts +5 -0
  20. package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
  21. package/dist/components/Radio/core/_Radio.js +38 -31
  22. package/dist/components/Rating/core/_Rating.d.ts +18 -0
  23. package/dist/components/Rating/core/_Rating.d.ts.map +1 -1
  24. package/dist/components/Rating/core/_Rating.js +90 -68
  25. package/dist/components/Select/core/_Select.d.ts +19 -0
  26. package/dist/components/Select/core/_Select.d.ts.map +1 -1
  27. package/dist/components/Select/core/_Select.js +102 -65
  28. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts +18 -0
  29. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -1
  30. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +54 -32
  31. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts +18 -0
  32. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts.map +1 -1
  33. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.js +61 -39
  34. package/dist/components/Slider/core/_Slider.d.ts +20 -0
  35. package/dist/components/Slider/core/_Slider.d.ts.map +1 -1
  36. package/dist/components/Slider/core/_Slider.js +132 -104
  37. package/dist/components/Toggle/core/_Toggle.d.ts +6 -0
  38. package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
  39. package/dist/components/Toggle/core/_Toggle.js +94 -86
  40. package/dist/shared/face-mixin.d.ts +5 -0
  41. package/dist/shared/face-mixin.d.ts.map +1 -1
  42. package/dist/shared/face-mixin.js +39 -25
  43. package/package.json +1 -1
  44. package/src/components/Checkbox/core/_Checkbox.ts +16 -0
  45. package/src/components/Combobox/core/_Combobox.ts +53 -0
  46. package/src/components/Dialog/core/_dialog.ts +19 -2
  47. package/src/components/Dialog/react/ReactDialog.tsx +60 -3
  48. package/src/components/Drawer/react/ReactDrawer.tsx +60 -3
  49. package/src/components/Input/core/_Input.ts +47 -0
  50. package/src/components/Radio/core/_Radio.ts +14 -0
  51. package/src/components/Rating/core/_Rating.ts +42 -0
  52. package/src/components/Select/core/_Select.ts +57 -0
  53. package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +48 -0
  54. package/src/components/SelectionCardGroup/core/_SelectionCardGroup.ts +48 -0
  55. package/src/components/Slider/core/_Slider.ts +53 -0
  56. package/src/components/Toggle/core/_Toggle.ts +15 -0
  57. package/src/shared/face-mixin.ts +48 -6
@@ -7,13 +7,13 @@ import "../../shared/CloseButton/CloseButton.js";
7
7
  * tabbable 6.2.0
8
8
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
9
9
  */
10
- var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], M = /* @__PURE__ */ ve.join(","), be = typeof Element > "u", O = be ? function() {
11
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, $ = !be && Element.prototype.getRootNode ? function(i) {
10
+ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], z = /* @__PURE__ */ ve.join(","), be = typeof Element > "u", O = be ? function() {
11
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, M = !be && Element.prototype.getRootNode ? function(i) {
12
12
  var e;
13
13
  return i == null || (e = i.getRootNode) === null || e === void 0 ? void 0 : e.call(i);
14
14
  } : function(i) {
15
15
  return i?.ownerDocument;
16
- }, G = function i(e, t) {
16
+ }, $ = function i(e, t) {
17
17
  var a;
18
18
  t === void 0 && (t = !0);
19
19
  var s = e == null || (a = e.getAttribute) === null || a === void 0 ? void 0 : a.call(e, "inert"), l = s === "" || s === "true", r = l || t && e && i(e.parentNode);
@@ -22,14 +22,14 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
22
22
  var t, a = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
23
23
  return a === "" || a === "true";
24
24
  }, pe = function(e, t, a) {
25
- if (G(e))
25
+ if ($(e))
26
26
  return [];
27
- var s = Array.prototype.slice.apply(e.querySelectorAll(M));
28
- return t && O.call(e, M) && s.unshift(e), s = s.filter(a), s;
27
+ var s = Array.prototype.slice.apply(e.querySelectorAll(z));
28
+ return t && O.call(e, z) && s.unshift(e), s = s.filter(a), s;
29
29
  }, he = function i(e, t, a) {
30
30
  for (var s = [], l = Array.from(e); l.length; ) {
31
31
  var r = l.shift();
32
- if (!G(r, !1))
32
+ if (!$(r, !1))
33
33
  if (r.tagName === "SLOT") {
34
34
  var b = r.assignedElements(), v = b.length ? b : r.children, g = i(v, !0, a);
35
35
  a.flatten ? s.push.apply(s, g) : s.push({
@@ -37,11 +37,11 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
37
37
  candidates: g
38
38
  });
39
39
  } else {
40
- var k = O.call(r, M);
40
+ var k = O.call(r, z);
41
41
  k && a.filter(r) && (t || !e.includes(r)) && s.push(r);
42
42
  var w = r.shadowRoot || // check for an undisclosed shadow
43
- typeof a.getShadowRoot == "function" && a.getShadowRoot(r), S = !G(w, !1) && (!a.shadowRootFilter || a.shadowRootFilter(r));
44
- if (w && S) {
43
+ typeof a.getShadowRoot == "function" && a.getShadowRoot(r), F = !$(w, !1) && (!a.shadowRootFilter || a.shadowRootFilter(r));
44
+ if (w && F) {
45
45
  var R = i(w === !0 ? r.children : w.children, !0, a);
46
46
  a.flatten ? s.push.apply(s, R) : s.push({
47
47
  scopeParent: r,
@@ -54,20 +54,20 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
54
54
  return s;
55
55
  }, ge = function(e) {
56
56
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
57
- }, A = function(e) {
57
+ }, D = function(e) {
58
58
  if (!e)
59
59
  throw new Error("No node provided");
60
60
  return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Ce(e)) && !ge(e) ? 0 : e.tabIndex;
61
- }, Fe = function(e, t) {
62
- var a = A(e);
63
- return a < 0 && t && !ge(e) ? 0 : a;
64
61
  }, Se = function(e, t) {
62
+ var a = D(e);
63
+ return a < 0 && t && !ge(e) ? 0 : a;
64
+ }, Fe = function(e, t) {
65
65
  return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
66
66
  }, me = function(e) {
67
67
  return e.tagName === "INPUT";
68
- }, De = function(e) {
69
- return me(e) && e.type === "hidden";
70
68
  }, Ae = function(e) {
69
+ return me(e) && e.type === "hidden";
70
+ }, De = function(e) {
71
71
  var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(a) {
72
72
  return a.tagName === "SUMMARY";
73
73
  });
@@ -79,7 +79,7 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
79
79
  }, Re = function(e) {
80
80
  if (!e.name)
81
81
  return !0;
82
- var t = e.form || $(e), a = function(b) {
82
+ var t = e.form || M(e), a = function(b) {
83
83
  return t.querySelectorAll('input[type="radio"][name="' + b + '"]');
84
84
  }, s;
85
85
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
@@ -97,12 +97,12 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
97
97
  }, Ie = function(e) {
98
98
  return Pe(e) && !Re(e);
99
99
  }, xe = function(e) {
100
- var t, a = e && $(e), s = (t = a) === null || t === void 0 ? void 0 : t.host, l = !1;
100
+ var t, a = e && M(e), s = (t = a) === null || t === void 0 ? void 0 : t.host, l = !1;
101
101
  if (a && a !== e) {
102
102
  var r, b, v;
103
103
  for (l = !!((r = s) !== null && r !== void 0 && (b = r.ownerDocument) !== null && b !== void 0 && b.contains(s) || e != null && (v = e.ownerDocument) !== null && v !== void 0 && v.contains(e)); !l && s; ) {
104
104
  var g, k, w;
105
- a = $(s), s = (g = a) === null || g === void 0 ? void 0 : g.host, l = !!((k = s) !== null && k !== void 0 && (w = k.ownerDocument) !== null && w !== void 0 && w.contains(s));
105
+ a = M(s), s = (g = a) === null || g === void 0 ? void 0 : g.host, l = !!((k = s) !== null && k !== void 0 && (w = k.ownerDocument) !== null && w !== void 0 && w.contains(s));
106
106
  }
107
107
  }
108
108
  return l;
@@ -119,7 +119,7 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
119
119
  if (!a || a === "full" || a === "legacy-full") {
120
120
  if (typeof s == "function") {
121
121
  for (var b = e; e; ) {
122
- var v = e.parentElement, g = $(e);
122
+ var v = e.parentElement, g = M(e);
123
123
  if (v && !v.shadowRoot && s(v) === !0)
124
124
  return le(e);
125
125
  e.assignedSlot ? e = e.assignedSlot : !v && g !== e.ownerDocument ? e = g.host : e = v;
@@ -151,17 +151,17 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
151
151
  return !(t.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
152
152
  // because we're limited in the type of selectors we can use in JSDom (see related
153
153
  // note related to `candidateSelectors`)
154
- G(t) || De(t) || Be(t, e) || // For a details element with a summary, the summary element gets the focus
155
- Ae(t) || Le(t));
156
- }, H = function(e, t) {
157
- return !(Ie(t) || A(t) < 0 || !q(e, t));
154
+ $(t) || Ae(t) || Be(t, e) || // For a details element with a summary, the summary element gets the focus
155
+ De(t) || Le(t));
156
+ }, W = function(e, t) {
157
+ return !(Ie(t) || D(t) < 0 || !q(e, t));
158
158
  }, _e = function(e) {
159
159
  var t = parseInt(e.getAttribute("tabindex"), 10);
160
160
  return !!(isNaN(t) || t >= 0);
161
161
  }, Ke = function i(e) {
162
162
  var t = [], a = [];
163
163
  return e.forEach(function(s, l) {
164
- var r = !!s.scopeParent, b = r ? s.scopeParent : s, v = Fe(b, r), g = r ? i(s.candidates) : b;
164
+ var r = !!s.scopeParent, b = r ? s.scopeParent : s, v = Se(b, r), g = r ? i(s.candidates) : b;
165
165
  v === 0 ? r ? t.push.apply(t, g) : t.push(b) : a.push({
166
166
  documentOrder: l,
167
167
  tabIndex: v,
@@ -169,19 +169,19 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
169
169
  isScope: r,
170
170
  content: g
171
171
  });
172
- }), a.sort(Se).reduce(function(s, l) {
172
+ }), a.sort(Fe).reduce(function(s, l) {
173
173
  return l.isScope ? s.push.apply(s, l.content) : s.push(l.content), s;
174
174
  }, []).concat(t);
175
175
  }, je = function(e, t) {
176
176
  t = t || {};
177
177
  var a;
178
178
  return t.getShadowRoot ? a = he([e], t.includeContainer, {
179
- filter: H.bind(null, t),
179
+ filter: W.bind(null, t),
180
180
  flatten: !1,
181
181
  getShadowRoot: t.getShadowRoot,
182
182
  shadowRootFilter: _e
183
- }) : a = pe(e, t.includeContainer, H.bind(null, t)), Ke(a);
184
- }, ze = function(e, t) {
183
+ }) : a = pe(e, t.includeContainer, W.bind(null, t)), Ke(a);
184
+ }, Ge = function(e, t) {
185
185
  t = t || {};
186
186
  var a;
187
187
  return t.getShadowRoot ? a = he([e], t.includeContainer, {
@@ -192,11 +192,11 @@ var ve = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
192
192
  }, P = function(e, t) {
193
193
  if (t = t || {}, !e)
194
194
  throw new Error("No node provided");
195
- return O.call(e, M) === !1 ? !1 : H(t, e);
196
- }, Me = /* @__PURE__ */ ve.concat("iframe").join(","), W = function(e, t) {
195
+ return O.call(e, z) === !1 ? !1 : W(t, e);
196
+ }, ze = /* @__PURE__ */ ve.concat("iframe").join(","), H = function(e, t) {
197
197
  if (t = t || {}, !e)
198
198
  throw new Error("No node provided");
199
- return O.call(e, Me) === !1 ? !1 : q(t, e);
199
+ return O.call(e, ze) === !1 ? !1 : q(t, e);
200
200
  };
201
201
  /*!
202
202
  * focus-trap 7.6.5
@@ -207,10 +207,10 @@ function Z(i, e) {
207
207
  for (var t = 0, a = Array(e); t < e; t++) a[t] = i[t];
208
208
  return a;
209
209
  }
210
- function $e(i) {
210
+ function Me(i) {
211
211
  if (Array.isArray(i)) return Z(i);
212
212
  }
213
- function Ge(i, e, t) {
213
+ function $e(i, e, t) {
214
214
  return (e = Xe(e)) in i ? Object.defineProperty(i, e, {
215
215
  value: t,
216
216
  enumerable: !0,
@@ -239,7 +239,7 @@ function ue(i) {
239
239
  for (var e = 1; e < arguments.length; e++) {
240
240
  var t = arguments[e] != null ? arguments[e] : {};
241
241
  e % 2 ? ce(Object(t), !0).forEach(function(a) {
242
- Ge(i, a, t[a]);
242
+ $e(i, a, t[a]);
243
243
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : ce(Object(t)).forEach(function(a) {
244
244
  Object.defineProperty(i, a, Object.getOwnPropertyDescriptor(t, a));
245
245
  });
@@ -247,7 +247,7 @@ function ue(i) {
247
247
  return i;
248
248
  }
249
249
  function Ue(i) {
250
- return $e(i) || qe(i) || We(i) || Ye();
250
+ return Me(i) || qe(i) || He(i) || Ye();
251
251
  }
252
252
  function Ve(i, e) {
253
253
  if (typeof i != "object" || !i) return i;
@@ -263,7 +263,7 @@ function Xe(i) {
263
263
  var e = Ve(i, "string");
264
264
  return typeof e == "symbol" ? e : e + "";
265
265
  }
266
- function We(i, e) {
266
+ function He(i, e) {
267
267
  if (i) {
268
268
  if (typeof i == "string") return Z(i, e);
269
269
  var t = {}.toString.call(i).slice(8, -1);
@@ -283,7 +283,7 @@ var de = {
283
283
  var a = e.indexOf(t);
284
284
  a !== -1 && e.splice(a, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
285
285
  }
286
- }, He = function(e) {
286
+ }, We = function(e) {
287
287
  return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
288
288
  }, Ze = function(e) {
289
289
  return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
@@ -299,7 +299,7 @@ var de = {
299
299
  for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
300
300
  a[s - 1] = arguments[s];
301
301
  return typeof e == "function" ? e.apply(void 0, a) : e;
302
- }, z = function(e) {
302
+ }, G = function(e) {
303
303
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
304
304
  }, et = [], tt = function(e, t) {
305
305
  var a = t?.document || document, s = t?.trapStack || et, l = ue({
@@ -345,63 +345,63 @@ var de = {
345
345
  delayInitialFocusTimer: void 0,
346
346
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
347
347
  recentNavEvent: void 0
348
- }, b, v = function(n, o, c) {
349
- return n && n[o] !== void 0 ? n[o] : l[c || o];
350
- }, g = function(n, o) {
351
- var c = typeof o?.composedPath == "function" ? o.composedPath() : void 0;
348
+ }, b, v = function(o, n, c) {
349
+ return o && o[n] !== void 0 ? o[n] : l[c || n];
350
+ }, g = function(o, n) {
351
+ var c = typeof n?.composedPath == "function" ? n.composedPath() : void 0;
352
352
  return r.containerGroups.findIndex(function(d) {
353
353
  var f = d.container, h = d.tabbableNodes;
354
- return f.contains(n) || c?.includes(f) || h.find(function(u) {
355
- return u === n;
354
+ return f.contains(o) || c?.includes(f) || h.find(function(u) {
355
+ return u === o;
356
356
  });
357
357
  });
358
- }, k = function(n) {
359
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = o.hasFallback, d = c === void 0 ? !1 : c, f = o.params, h = f === void 0 ? [] : f, u = l[n];
358
+ }, k = function(o) {
359
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = n.hasFallback, d = c === void 0 ? !1 : c, f = n.params, h = f === void 0 ? [] : f, u = l[o];
360
360
  if (typeof u == "function" && (u = u.apply(void 0, Ue(h))), u === !0 && (u = void 0), !u) {
361
361
  if (u === void 0 || u === !1)
362
362
  return u;
363
- throw new Error("`".concat(n, "` was specified but was not a node, or did not return a node"));
363
+ throw new Error("`".concat(o, "` was specified but was not a node, or did not return a node"));
364
364
  }
365
365
  var m = u;
366
366
  if (typeof u == "string") {
367
367
  try {
368
368
  m = a.querySelector(u);
369
369
  } catch (y) {
370
- throw new Error("`".concat(n, '` appears to be an invalid selector; error="').concat(y.message, '"'));
370
+ throw new Error("`".concat(o, '` appears to be an invalid selector; error="').concat(y.message, '"'));
371
371
  }
372
372
  if (!m && !d)
373
- throw new Error("`".concat(n, "` as selector refers to no known node"));
373
+ throw new Error("`".concat(o, "` as selector refers to no known node"));
374
374
  }
375
375
  return m;
376
376
  }, w = function() {
377
- var n = k("initialFocus", {
377
+ var o = k("initialFocus", {
378
378
  hasFallback: !0
379
379
  });
380
- if (n === !1)
380
+ if (o === !1)
381
381
  return !1;
382
- if (n === void 0 || n && !W(n, l.tabbableOptions))
382
+ if (o === void 0 || o && !H(o, l.tabbableOptions))
383
383
  if (g(a.activeElement) >= 0)
384
- n = a.activeElement;
384
+ o = a.activeElement;
385
385
  else {
386
- var o = r.tabbableGroups[0], c = o && o.firstTabbableNode;
387
- n = c || k("fallbackFocus");
386
+ var n = r.tabbableGroups[0], c = n && n.firstTabbableNode;
387
+ o = c || k("fallbackFocus");
388
388
  }
389
- else n === null && (n = k("fallbackFocus"));
390
- if (!n)
389
+ else o === null && (o = k("fallbackFocus"));
390
+ if (!o)
391
391
  throw new Error("Your focus-trap needs to have at least one focusable element");
392
- return n;
393
- }, S = function() {
394
- if (r.containerGroups = r.containers.map(function(n) {
395
- var o = je(n, l.tabbableOptions), c = ze(n, l.tabbableOptions), d = o.length > 0 ? o[0] : void 0, f = o.length > 0 ? o[o.length - 1] : void 0, h = c.find(function(y) {
392
+ return o;
393
+ }, F = function() {
394
+ if (r.containerGroups = r.containers.map(function(o) {
395
+ var n = je(o, l.tabbableOptions), c = Ge(o, l.tabbableOptions), d = n.length > 0 ? n[0] : void 0, f = n.length > 0 ? n[n.length - 1] : void 0, h = c.find(function(y) {
396
396
  return P(y);
397
397
  }), u = c.slice().reverse().find(function(y) {
398
398
  return P(y);
399
- }), m = !!o.find(function(y) {
400
- return A(y) > 0;
399
+ }), m = !!n.find(function(y) {
400
+ return D(y) > 0;
401
401
  });
402
402
  return {
403
- container: n,
404
- tabbableNodes: o,
403
+ container: o,
404
+ tabbableNodes: n,
405
405
  focusableNodes: c,
406
406
  /** True if at least one node with positive `tabindex` was found in this container. */
407
407
  posTabIndexesFound: m,
@@ -428,76 +428,76 @@ var de = {
428
428
  * in reverse.
429
429
  * @returns {HTMLElement|undefined} The next tabbable node, if any.
430
430
  */
431
- nextTabbableNode: function(D) {
432
- var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, F = o.indexOf(D);
433
- return F < 0 ? x ? c.slice(c.indexOf(D) + 1).find(function(B) {
431
+ nextTabbableNode: function(A) {
432
+ var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, S = n.indexOf(A);
433
+ return S < 0 ? x ? c.slice(c.indexOf(A) + 1).find(function(B) {
434
434
  return P(B);
435
- }) : c.slice(0, c.indexOf(D)).reverse().find(function(B) {
435
+ }) : c.slice(0, c.indexOf(A)).reverse().find(function(B) {
436
436
  return P(B);
437
- }) : o[F + (x ? 1 : -1)];
437
+ }) : n[S + (x ? 1 : -1)];
438
438
  }
439
439
  };
440
- }), r.tabbableGroups = r.containerGroups.filter(function(n) {
441
- return n.tabbableNodes.length > 0;
440
+ }), r.tabbableGroups = r.containerGroups.filter(function(o) {
441
+ return o.tabbableNodes.length > 0;
442
442
  }), r.tabbableGroups.length <= 0 && !k("fallbackFocus"))
443
443
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
444
- if (r.containerGroups.find(function(n) {
445
- return n.posTabIndexesFound;
444
+ if (r.containerGroups.find(function(o) {
445
+ return o.posTabIndexesFound;
446
446
  }) && r.containerGroups.length > 1)
447
447
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
448
- }, R = function(n) {
449
- var o = n.activeElement;
450
- if (o)
451
- return o.shadowRoot && o.shadowRoot.activeElement !== null ? R(o.shadowRoot) : o;
452
- }, C = function(n) {
453
- if (n !== !1 && n !== R(document)) {
454
- if (!n || !n.focus) {
448
+ }, R = function(o) {
449
+ var n = o.activeElement;
450
+ if (n)
451
+ return n.shadowRoot && n.shadowRoot.activeElement !== null ? R(n.shadowRoot) : n;
452
+ }, C = function(o) {
453
+ if (o !== !1 && o !== R(document)) {
454
+ if (!o || !o.focus) {
455
455
  C(w());
456
456
  return;
457
457
  }
458
- n.focus({
458
+ o.focus({
459
459
  preventScroll: !!l.preventScroll
460
- }), r.mostRecentlyFocusedNode = n, He(n) && n.select();
460
+ }), r.mostRecentlyFocusedNode = o, We(o) && o.select();
461
461
  }
462
- }, Q = function(n) {
463
- var o = k("setReturnFocus", {
464
- params: [n]
462
+ }, Q = function(o) {
463
+ var n = k("setReturnFocus", {
464
+ params: [o]
465
465
  });
466
- return o || (o === !1 ? !1 : n);
467
- }, ee = function(n) {
468
- var o = n.target, c = n.event, d = n.isBackward, f = d === void 0 ? !1 : d;
469
- o = o || z(c), S();
466
+ return n || (n === !1 ? !1 : o);
467
+ }, ee = function(o) {
468
+ var n = o.target, c = o.event, d = o.isBackward, f = d === void 0 ? !1 : d;
469
+ n = n || G(c), F();
470
470
  var h = null;
471
471
  if (r.tabbableGroups.length > 0) {
472
- var u = g(o, c), m = u >= 0 ? r.containerGroups[u] : void 0;
472
+ var u = g(n, c), m = u >= 0 ? r.containerGroups[u] : void 0;
473
473
  if (u < 0)
474
474
  f ? h = r.tabbableGroups[r.tabbableGroups.length - 1].lastTabbableNode : h = r.tabbableGroups[0].firstTabbableNode;
475
475
  else if (f) {
476
476
  var y = r.tabbableGroups.findIndex(function(U) {
477
477
  var V = U.firstTabbableNode;
478
- return o === V;
478
+ return n === V;
479
479
  });
480
- if (y < 0 && (m.container === o || W(o, l.tabbableOptions) && !P(o, l.tabbableOptions) && !m.nextTabbableNode(o, !1)) && (y = u), y >= 0) {
481
- var D = y === 0 ? r.tabbableGroups.length - 1 : y - 1, x = r.tabbableGroups[D];
482
- h = A(o) >= 0 ? x.lastTabbableNode : x.lastDomTabbableNode;
483
- } else _(c) || (h = m.nextTabbableNode(o, !1));
480
+ if (y < 0 && (m.container === n || H(n, l.tabbableOptions) && !P(n, l.tabbableOptions) && !m.nextTabbableNode(n, !1)) && (y = u), y >= 0) {
481
+ var A = y === 0 ? r.tabbableGroups.length - 1 : y - 1, x = r.tabbableGroups[A];
482
+ h = D(n) >= 0 ? x.lastTabbableNode : x.lastDomTabbableNode;
483
+ } else _(c) || (h = m.nextTabbableNode(n, !1));
484
484
  } else {
485
- var F = r.tabbableGroups.findIndex(function(U) {
485
+ var S = r.tabbableGroups.findIndex(function(U) {
486
486
  var V = U.lastTabbableNode;
487
- return o === V;
487
+ return n === V;
488
488
  });
489
- if (F < 0 && (m.container === o || W(o, l.tabbableOptions) && !P(o, l.tabbableOptions) && !m.nextTabbableNode(o)) && (F = u), F >= 0) {
490
- var B = F === r.tabbableGroups.length - 1 ? 0 : F + 1, se = r.tabbableGroups[B];
491
- h = A(o) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
492
- } else _(c) || (h = m.nextTabbableNode(o));
489
+ if (S < 0 && (m.container === n || H(n, l.tabbableOptions) && !P(n, l.tabbableOptions) && !m.nextTabbableNode(n)) && (S = u), S >= 0) {
490
+ var B = S === r.tabbableGroups.length - 1 ? 0 : S + 1, se = r.tabbableGroups[B];
491
+ h = D(n) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
492
+ } else _(c) || (h = m.nextTabbableNode(n));
493
493
  }
494
494
  } else
495
495
  h = k("fallbackFocus");
496
496
  return h;
497
- }, K = function(n) {
498
- var o = z(n);
499
- if (!(g(o, n) >= 0)) {
500
- if (L(l.clickOutsideDeactivates, n)) {
497
+ }, K = function(o) {
498
+ var n = G(o);
499
+ if (!(g(n, o) >= 0)) {
500
+ if (L(l.clickOutsideDeactivates, o)) {
501
501
  b.deactivate({
502
502
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
503
503
  // which will result in the outside click setting focus to the node
@@ -509,17 +509,17 @@ var de = {
509
509
  });
510
510
  return;
511
511
  }
512
- L(l.allowOutsideClick, n) || n.preventDefault();
512
+ L(l.allowOutsideClick, o) || o.preventDefault();
513
513
  }
514
- }, te = function(n) {
515
- var o = z(n), c = g(o, n) >= 0;
516
- if (c || o instanceof Document)
517
- c && (r.mostRecentlyFocusedNode = o);
514
+ }, te = function(o) {
515
+ var n = G(o), c = g(n, o) >= 0;
516
+ if (c || n instanceof Document)
517
+ c && (r.mostRecentlyFocusedNode = n);
518
518
  else {
519
- n.stopImmediatePropagation();
519
+ o.stopImmediatePropagation();
520
520
  var d, f = !0;
521
521
  if (r.mostRecentlyFocusedNode)
522
- if (A(r.mostRecentlyFocusedNode) > 0) {
522
+ if (D(r.mostRecentlyFocusedNode) > 0) {
523
523
  var h = g(r.mostRecentlyFocusedNode), u = r.containerGroups[h].tabbableNodes;
524
524
  if (u.length > 0) {
525
525
  var m = u.findIndex(function(y) {
@@ -529,8 +529,8 @@ var de = {
529
529
  }
530
530
  } else
531
531
  r.containerGroups.some(function(y) {
532
- return y.tabbableNodes.some(function(D) {
533
- return A(D) > 0;
532
+ return y.tabbableNodes.some(function(A) {
533
+ return D(A) > 0;
534
534
  });
535
535
  }) || (f = !1);
536
536
  else
@@ -543,22 +543,22 @@ var de = {
543
543
  })), C(d || r.mostRecentlyFocusedNode || w());
544
544
  }
545
545
  r.recentNavEvent = void 0;
546
- }, ye = function(n) {
547
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
548
- r.recentNavEvent = n;
546
+ }, ye = function(o) {
547
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
548
+ r.recentNavEvent = o;
549
549
  var c = ee({
550
- event: n,
551
- isBackward: o
550
+ event: o,
551
+ isBackward: n
552
552
  });
553
- c && (_(n) && n.preventDefault(), C(c));
554
- }, ae = function(n) {
555
- (l.isKeyForward(n) || l.isKeyBackward(n)) && ye(n, l.isKeyBackward(n));
556
- }, re = function(n) {
557
- Ze(n) && L(l.escapeDeactivates, n) !== !1 && (n.preventDefault(), b.deactivate());
558
- }, ie = function(n) {
559
- var o = z(n);
560
- g(o, n) >= 0 || L(l.clickOutsideDeactivates, n) || L(l.allowOutsideClick, n) || (n.preventDefault(), n.stopImmediatePropagation());
561
- }, ne = function() {
553
+ c && (_(o) && o.preventDefault(), C(c));
554
+ }, ae = function(o) {
555
+ (l.isKeyForward(o) || l.isKeyBackward(o)) && ye(o, l.isKeyBackward(o));
556
+ }, re = function(o) {
557
+ Ze(o) && L(l.escapeDeactivates, o) !== !1 && (o.preventDefault(), b.deactivate());
558
+ }, ie = function(o) {
559
+ var n = G(o);
560
+ g(n, o) >= 0 || L(l.clickOutsideDeactivates, o) || L(l.allowOutsideClick, o) || (o.preventDefault(), o.stopImmediatePropagation());
561
+ }, oe = function() {
562
562
  if (r.active)
563
563
  return de.activateTrap(s, b), r.delayInitialFocusTimer = l.delayInitialFocus ? fe(function() {
564
564
  C(w());
@@ -575,20 +575,20 @@ var de = {
575
575
  capture: !0,
576
576
  passive: !1
577
577
  }), a.addEventListener("keydown", re), b;
578
- }, oe = function() {
578
+ }, ne = function() {
579
579
  if (r.active)
580
580
  return a.removeEventListener("focusin", te, !0), a.removeEventListener("mousedown", K, !0), a.removeEventListener("touchstart", K, !0), a.removeEventListener("click", ie, !0), a.removeEventListener("keydown", ae, !0), a.removeEventListener("keydown", re), b;
581
- }, we = function(n) {
582
- var o = n.some(function(c) {
581
+ }, we = function(o) {
582
+ var n = o.some(function(c) {
583
583
  var d = Array.from(c.removedNodes);
584
584
  return d.some(function(f) {
585
585
  return f === r.mostRecentlyFocusedNode;
586
586
  });
587
587
  });
588
- o && C(w());
588
+ n && C(w());
589
589
  }, Y = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(we) : void 0, I = function() {
590
- Y && (Y.disconnect(), r.active && !r.paused && r.containers.map(function(n) {
591
- Y.observe(n, {
590
+ Y && (Y.disconnect(), r.active && !r.paused && r.containers.map(function(o) {
591
+ Y.observe(o, {
592
592
  subtree: !0,
593
593
  childList: !0
594
594
  });
@@ -601,26 +601,26 @@ var de = {
601
601
  get paused() {
602
602
  return r.paused;
603
603
  },
604
- activate: function(n) {
604
+ activate: function(o) {
605
605
  if (r.active)
606
606
  return this;
607
- var o = v(n, "onActivate"), c = v(n, "onPostActivate"), d = v(n, "checkCanFocusTrap");
608
- d || S(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = R(a), o?.();
607
+ var n = v(o, "onActivate"), c = v(o, "onPostActivate"), d = v(o, "checkCanFocusTrap");
608
+ d || F(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = R(a), n?.();
609
609
  var f = function() {
610
- d && S(), ne(), I(), c?.();
610
+ d && F(), oe(), I(), c?.();
611
611
  };
612
612
  return d ? (d(r.containers.concat()).then(f, f), this) : (f(), this);
613
613
  },
614
- deactivate: function(n) {
614
+ deactivate: function(o) {
615
615
  if (!r.active)
616
616
  return this;
617
- var o = ue({
617
+ var n = ue({
618
618
  onDeactivate: l.onDeactivate,
619
619
  onPostDeactivate: l.onPostDeactivate,
620
620
  checkCanReturnFocus: l.checkCanReturnFocus
621
- }, n);
622
- clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0, oe(), r.active = !1, r.paused = !1, I(), de.deactivateTrap(s, b);
623
- var c = v(o, "onDeactivate"), d = v(o, "onPostDeactivate"), f = v(o, "checkCanReturnFocus"), h = v(o, "returnFocus", "returnFocusOnDeactivate");
621
+ }, o);
622
+ clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0, ne(), r.active = !1, r.paused = !1, I(), de.deactivateTrap(s, b);
623
+ var c = v(n, "onDeactivate"), d = v(n, "onPostDeactivate"), f = v(n, "checkCanReturnFocus"), h = v(n, "returnFocus", "returnFocusOnDeactivate");
624
624
  c?.();
625
625
  var u = function() {
626
626
  fe(function() {
@@ -629,17 +629,17 @@ var de = {
629
629
  };
630
630
  return h && f ? (f(Q(r.nodeFocusedBeforeActivation)).then(u, u), this) : (u(), this);
631
631
  },
632
- pause: function(n) {
633
- return r.active ? (r.manuallyPaused = !0, this._setPausedState(!0, n)) : this;
632
+ pause: function(o) {
633
+ return r.active ? (r.manuallyPaused = !0, this._setPausedState(!0, o)) : this;
634
634
  },
635
- unpause: function(n) {
636
- return r.active ? (r.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, n)) : this;
635
+ unpause: function(o) {
636
+ return r.active ? (r.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, o)) : this;
637
637
  },
638
- updateContainerElements: function(n) {
639
- var o = [].concat(n).filter(Boolean);
640
- return r.containers = o.map(function(c) {
638
+ updateContainerElements: function(o) {
639
+ var n = [].concat(o).filter(Boolean);
640
+ return r.containers = n.map(function(c) {
641
641
  return typeof c == "string" ? a.querySelector(c) : c;
642
- }), r.active && S(), I(), this;
642
+ }), r.active && F(), I(), this;
643
643
  }
644
644
  }, Object.defineProperties(b, {
645
645
  _isManuallyPaused: {
@@ -648,15 +648,15 @@ var de = {
648
648
  }
649
649
  },
650
650
  _setPausedState: {
651
- value: function(n, o) {
652
- if (r.paused === n)
651
+ value: function(o, n) {
652
+ if (r.paused === o)
653
653
  return this;
654
- if (r.paused = n, n) {
655
- var c = v(o, "onPause"), d = v(o, "onPostPause");
656
- c?.(), oe(), I(), d?.();
654
+ if (r.paused = o, o) {
655
+ var c = v(n, "onPause"), d = v(n, "onPostPause");
656
+ c?.(), ne(), I(), d?.();
657
657
  } else {
658
- var f = v(o, "onUnpause"), h = v(o, "onPostUnpause");
659
- f?.(), S(), ne(), I(), h?.();
658
+ var f = v(n, "onUnpause"), h = v(n, "onPostUnpause");
659
+ f?.(), F(), oe(), I(), h?.();
660
660
  }
661
661
  return this;
662
662
  }
@@ -717,16 +717,26 @@ const J = class J extends ke {
717
717
  }
718
718
  _preventBackgroundScroll() {
719
719
  const e = parseInt(document.body.getAttribute("data-dialog-count") || "0", 10);
720
- e === 0 && (document.body.setAttribute(
721
- "data-dialog-original-overflow",
722
- document.body.style.overflow || ""
723
- ), document.body.style.overflow = "hidden", document.body.setAttribute("data-dialog-scroll-locked", "")), document.body.setAttribute("data-dialog-count", (e + 1).toString());
720
+ if (e === 0) {
721
+ const t = document.documentElement;
722
+ document.body.setAttribute(
723
+ "data-dialog-original-overflow",
724
+ document.body.style.overflow || ""
725
+ ), document.body.setAttribute(
726
+ "data-dialog-original-scrollbar-gutter",
727
+ document.body.style.scrollbarGutter || ""
728
+ ), document.body.setAttribute(
729
+ "data-dialog-original-html-scrollbar-gutter",
730
+ t.style.scrollbarGutter || ""
731
+ ), document.body.style.overflow = "hidden", document.body.style.scrollbarGutter = "stable", t.style.scrollbarGutter = "stable", document.body.setAttribute("data-dialog-scroll-locked", "");
732
+ }
733
+ document.body.setAttribute("data-dialog-count", (e + 1).toString());
724
734
  }
725
735
  _restoreBackgroundScroll() {
726
736
  const e = parseInt(document.body.getAttribute("data-dialog-count") || "0", 10), t = Math.max(0, e - 1);
727
737
  if (document.body.setAttribute("data-dialog-count", t.toString()), t === 0) {
728
- const a = document.body.getAttribute("data-dialog-original-overflow");
729
- document.body.style.overflow = a || "", document.body.removeAttribute("data-dialog-original-overflow"), document.body.removeAttribute("data-dialog-scroll-locked"), document.body.removeAttribute("data-dialog-count");
738
+ const a = document.documentElement, s = document.body.getAttribute("data-dialog-original-overflow"), l = document.body.getAttribute("data-dialog-original-scrollbar-gutter"), r = document.body.getAttribute("data-dialog-original-html-scrollbar-gutter");
739
+ document.body.style.overflow = s || "", document.body.style.scrollbarGutter = l || "", a.style.scrollbarGutter = r || "", document.body.removeAttribute("data-dialog-original-overflow"), document.body.removeAttribute("data-dialog-original-scrollbar-gutter"), document.body.removeAttribute("data-dialog-original-html-scrollbar-gutter"), document.body.removeAttribute("data-dialog-scroll-locked"), document.body.removeAttribute("data-dialog-count");
730
740
  }
731
741
  }
732
742
  updated(e) {