@tedi-design-system/react 18.0.0-rc.3 → 18.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/bundle-stats.html +1 -1
  2. package/external/@floating-ui/core/dist/floating-ui.core.cjs.js +1 -1
  3. package/external/@floating-ui/core/dist/floating-ui.core.es.js +275 -271
  4. package/external/@floating-ui/dom/dist/floating-ui.dom.cjs.js +1 -1
  5. package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +189 -188
  6. package/external/@floating-ui/react/dist/floating-ui.react.cjs.js +1 -1
  7. package/external/@floating-ui/react/dist/floating-ui.react.es.js +1419 -1538
  8. package/external/@floating-ui/react/dist/floating-ui.react.utils.cjs.js +1 -1
  9. package/external/@floating-ui/react/dist/floating-ui.react.utils.es.js +348 -81
  10. package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js +1 -1
  11. package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +113 -93
  12. package/external/@floating-ui/utils/dist/floating-ui.utils.cjs.js +1 -1
  13. package/external/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +1 -1
  14. package/external/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +97 -97
  15. package/external/@floating-ui/utils/dist/floating-ui.utils.es.js +66 -68
  16. package/external/lodash-es/_baseUnset.cjs.js +1 -1
  17. package/external/lodash-es/_baseUnset.es.js +12 -19
  18. package/external/tabbable/dist/index.esm.cjs.js +1 -1
  19. package/external/tabbable/dist/index.esm.es.js +72 -63
  20. package/index.css +1 -1
  21. package/package.json +4 -4
  22. package/src/community/components/modal/modal-closer.d.ts +6 -0
  23. package/src/community/components/modal/modal-provider.d.ts +6 -0
  24. package/src/community/components/modal/modal-trigger.d.ts +6 -0
  25. package/src/community/components/modal/modal.d.ts +6 -0
  26. package/src/tedi/components/buttons/button-group/button-group.cjs.js +1 -1
  27. package/src/tedi/components/buttons/button-group/button-group.es.js +4 -4
  28. package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
  29. package/src/tedi/components/buttons/collapse/collapse.d.ts +15 -0
  30. package/src/tedi/components/buttons/collapse/collapse.es.js +55 -54
  31. package/src/tedi/components/content/table/index.d.ts +6 -0
  32. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.cjs.js +1 -0
  33. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.d.ts +15 -0
  34. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.es.js +37 -0
  35. package/src/tedi/components/content/table/table-context.cjs.js +1 -0
  36. package/src/tedi/components/content/table/table-context.d.ts +3 -0
  37. package/src/tedi/components/content/table/table-context.es.js +11 -0
  38. package/src/tedi/components/content/table/table-header-button/table-header-button.cjs.js +1 -0
  39. package/src/tedi/components/content/table/table-header-button/table-header-button.d.ts +51 -0
  40. package/src/tedi/components/content/table/table-header-button/table-header-button.es.js +42 -0
  41. package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.cjs.js +1 -0
  42. package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.es.js +7 -0
  43. package/src/tedi/components/content/table/table-toolbar/table-toolbar.cjs.js +1 -0
  44. package/src/tedi/components/content/table/table-toolbar/table-toolbar.d.ts +21 -0
  45. package/src/tedi/components/content/table/table-toolbar/table-toolbar.es.js +9 -0
  46. package/src/tedi/components/content/table/table.cjs.js +1 -0
  47. package/src/tedi/components/content/table/table.d.ts +519 -0
  48. package/src/tedi/components/content/table/table.es.js +856 -0
  49. package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -0
  50. package/src/tedi/components/content/table/table.module.scss.es.js +54 -0
  51. package/src/tedi/components/content/table/use-table-persistence.cjs.js +1 -0
  52. package/src/tedi/components/content/table/use-table-persistence.d.ts +13 -0
  53. package/src/tedi/components/content/table/use-table-persistence.es.js +53 -0
  54. package/src/tedi/components/form/time-field/time-field.es.js +3 -3
  55. package/src/tedi/components/navigation/pagination/pagination.cjs.js +1 -1
  56. package/src/tedi/components/navigation/pagination/pagination.d.ts +7 -0
  57. package/src/tedi/components/navigation/pagination/pagination.es.js +132 -91
  58. package/src/tedi/components/navigation/pagination/pagination.module.scss.cjs.js +1 -1
  59. package/src/tedi/components/navigation/pagination/pagination.module.scss.es.js +7 -1
  60. package/src/tedi/components/navigation/pagination/pagination.types.d.ts +100 -0
  61. package/src/tedi/components/overlays/modal/index.d.ts +8 -0
  62. package/src/tedi/components/overlays/modal/modal-body/modal-body.cjs.js +1 -0
  63. package/src/tedi/components/overlays/modal/modal-body/modal-body.d.ts +22 -0
  64. package/src/tedi/components/overlays/modal/modal-body/modal-body.es.js +21 -0
  65. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.cjs.js +1 -0
  66. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.d.ts +15 -0
  67. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.es.js +16 -0
  68. package/src/tedi/components/overlays/modal/modal-content/modal-content.cjs.js +1 -0
  69. package/src/tedi/components/overlays/modal/modal-content/modal-content.d.ts +108 -0
  70. package/src/tedi/components/overlays/modal/modal-content/modal-content.es.js +81 -0
  71. package/src/tedi/components/overlays/modal/modal-context.cjs.js +1 -0
  72. package/src/tedi/components/overlays/modal/modal-context.d.ts +59 -0
  73. package/src/tedi/components/overlays/modal/modal-context.es.js +15 -0
  74. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.cjs.js +1 -0
  75. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.d.ts +22 -0
  76. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.es.js +25 -0
  77. package/src/tedi/components/overlays/modal/modal-header/modal-header.cjs.js +1 -0
  78. package/src/tedi/components/overlays/modal/modal-header/modal-header.d.ts +58 -0
  79. package/src/tedi/components/overlays/modal/modal-header/modal-header.es.js +25 -0
  80. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.cjs.js +1 -0
  81. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.d.ts +13 -0
  82. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.es.js +14 -0
  83. package/src/tedi/components/overlays/modal/modal.cjs.js +1 -0
  84. package/src/tedi/components/overlays/modal/modal.d.ts +68 -0
  85. package/src/tedi/components/overlays/modal/modal.es.js +76 -0
  86. package/src/tedi/components/overlays/modal/modal.module.scss.cjs.js +1 -0
  87. package/src/tedi/components/overlays/modal/modal.module.scss.es.js +36 -0
  88. package/src/tedi/components/overlays/tooltip/tooltip.cjs.js +1 -1
  89. package/src/tedi/components/overlays/tooltip/tooltip.es.js +14 -6
  90. package/src/tedi/helpers/hooks/use-sidenav-state.d.ts +1 -1
  91. package/src/tedi/index.d.ts +2 -0
  92. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  93. package/src/tedi/providers/label-provider/labels-map.d.ts +132 -6
  94. package/src/tedi/providers/label-provider/labels-map.es.js +146 -11
  95. package/tedi.cjs.js +1 -1
  96. package/tedi.es.js +203 -171
@@ -1,75 +1,73 @@
1
- const m = Math.min, p = Math.max, j = Math.round, C = Math.floor, L = (t) => ({
1
+ const m = Math.min, h = Math.max, S = Math.round, w = Math.floor, C = (t) => ({
2
2
  x: t,
3
3
  y: t
4
- }), h = {
4
+ }), p = {
5
5
  left: "right",
6
6
  right: "left",
7
7
  bottom: "top",
8
8
  top: "bottom"
9
- }, x = {
10
- start: "end",
11
- end: "start"
12
9
  };
13
- function E(t, e, n) {
14
- return p(t, m(e, n));
10
+ function j(t, n, e) {
11
+ return h(t, m(n, e));
15
12
  }
16
- function R(t, e) {
17
- return typeof t == "function" ? t(e) : t;
13
+ function L(t, n) {
14
+ return typeof t == "function" ? t(n) : t;
18
15
  }
19
- function a(t) {
16
+ function g(t) {
20
17
  return t.split("-")[0];
21
18
  }
22
- function g(t) {
19
+ function a(t) {
23
20
  return t.split("-")[1];
24
21
  }
25
- function b(t) {
22
+ function x(t) {
26
23
  return t === "x" ? "y" : "x";
27
24
  }
28
- function d(t) {
25
+ function b(t) {
29
26
  return t === "y" ? "height" : "width";
30
27
  }
31
- const A = /* @__PURE__ */ new Set(["top", "bottom"]);
32
- function P(t) {
33
- return A.has(a(t)) ? "y" : "x";
28
+ function d(t) {
29
+ const n = t[0];
30
+ return n === "t" || n === "b" ? "y" : "x";
34
31
  }
35
- function y(t) {
36
- return b(P(t));
32
+ function A(t) {
33
+ return x(d(t));
37
34
  }
38
- function T(t, e, n) {
39
- n === void 0 && (n = !1);
40
- const r = g(t), i = y(t), o = d(i);
41
- let c = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
42
- return e.reference[o] > e.floating[o] && (c = f(c)), [c, f(c)];
35
+ function E(t, n, e) {
36
+ e === void 0 && (e = !1);
37
+ const r = a(t), i = A(t), o = b(i);
38
+ let c = i === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
39
+ return n.reference[o] > n.floating[o] && (c = u(c)), [c, u(c)];
43
40
  }
44
- function k(t) {
45
- const e = f(t);
46
- return [s(t), e, s(e)];
41
+ function R(t) {
42
+ const n = u(t);
43
+ return [s(t), n, s(n)];
47
44
  }
48
45
  function s(t) {
49
- return t.replace(/start|end/g, (e) => x[e]);
46
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
50
47
  }
51
- const u = ["left", "right"], l = ["right", "left"], M = ["top", "bottom"], O = ["bottom", "top"];
52
- function S(t, e, n) {
48
+ const f = ["left", "right"], l = ["right", "left"], P = ["top", "bottom"], y = ["bottom", "top"];
49
+ function O(t, n, e) {
53
50
  switch (t) {
54
51
  case "top":
55
52
  case "bottom":
56
- return n ? e ? l : u : e ? u : l;
53
+ return e ? n ? l : f : n ? f : l;
57
54
  case "left":
58
55
  case "right":
59
- return e ? M : O;
56
+ return n ? P : y;
60
57
  default:
61
58
  return [];
62
59
  }
63
60
  }
64
- function q(t, e, n, r) {
65
- const i = g(t);
66
- let o = S(a(t), n === "start", r);
67
- return i && (o = o.map((c) => c + "-" + i), e && (o = o.concat(o.map(s)))), o;
61
+ function T(t, n, e, r) {
62
+ const i = a(t);
63
+ let o = O(g(t), e === "start", r);
64
+ return i && (o = o.map((c) => c + "-" + i), n && (o = o.concat(o.map(s)))), o;
68
65
  }
69
- function f(t) {
70
- return t.replace(/left|right|bottom|top/g, (e) => h[e]);
66
+ function u(t) {
67
+ const n = g(t);
68
+ return p[n] + t.slice(n.length);
71
69
  }
72
- function w(t) {
70
+ function M(t) {
73
71
  return {
74
72
  top: 0,
75
73
  right: 0,
@@ -78,52 +76,52 @@ function w(t) {
78
76
  ...t
79
77
  };
80
78
  }
81
- function z(t) {
82
- return typeof t != "number" ? w(t) : {
79
+ function k(t) {
80
+ return typeof t != "number" ? M(t) : {
83
81
  top: t,
84
82
  right: t,
85
83
  bottom: t,
86
84
  left: t
87
85
  };
88
86
  }
89
- function B(t) {
87
+ function q(t) {
90
88
  const {
91
- x: e,
92
- y: n,
89
+ x: n,
90
+ y: e,
93
91
  width: r,
94
92
  height: i
95
93
  } = t;
96
94
  return {
97
95
  width: r,
98
96
  height: i,
99
- top: n,
100
- left: e,
101
- right: e + r,
102
- bottom: n + i,
103
- x: e,
104
- y: n
97
+ top: e,
98
+ left: n,
99
+ right: n + r,
100
+ bottom: e + i,
101
+ x: n,
102
+ y: e
105
103
  };
106
104
  }
107
105
  export {
108
- E as clamp,
109
- L as createCoords,
110
- R as evaluate,
111
- w as expandPaddingObject,
112
- C as floor,
113
- g as getAlignment,
114
- y as getAlignmentAxis,
115
- T as getAlignmentSides,
116
- d as getAxisLength,
117
- k as getExpandedPlacements,
106
+ j as clamp,
107
+ C as createCoords,
108
+ L as evaluate,
109
+ M as expandPaddingObject,
110
+ w as floor,
111
+ a as getAlignment,
112
+ A as getAlignmentAxis,
113
+ E as getAlignmentSides,
114
+ b as getAxisLength,
115
+ R as getExpandedPlacements,
118
116
  s as getOppositeAlignmentPlacement,
119
- b as getOppositeAxis,
120
- q as getOppositeAxisPlacements,
121
- f as getOppositePlacement,
122
- z as getPaddingObject,
123
- a as getSide,
124
- P as getSideAxis,
125
- p as max,
117
+ x as getOppositeAxis,
118
+ T as getOppositeAxisPlacements,
119
+ u as getOppositePlacement,
120
+ k as getPaddingObject,
121
+ g as getSide,
122
+ d as getSideAxis,
123
+ h as max,
126
124
  m as min,
127
- B as rectToClientRect,
128
- j as round
125
+ q as rectToClientRect,
126
+ S as round
129
127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./_castPath.cjs.js"),s=require("./last.cjs.js"),f=require("./_parent.cjs.js"),a=require("./_toKey.cjs.js");var _=Object.prototype,c=_.hasOwnProperty;function d(t,e){e=l.default(e,t);var r=-1,o=e.length;if(!o)return!0;for(var i=t==null||typeof t!="object"&&typeof t!="function";++r<o;){var n=e[r];if(typeof n=="string"){if(n==="__proto__"&&!c.call(t,"__proto__"))return!1;if(n==="constructor"&&r+1<o&&typeof e[r+1]=="string"&&e[r+1]==="prototype"){if(i&&r===0)continue;return!1}}}var u=f.default(t,e);return u==null||delete u[a.default(s.default(e))]}exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./_castPath.cjs.js"),s=require("./last.cjs.js"),i=require("./_parent.cjs.js"),n=require("./_toKey.cjs.js");var f=Object.prototype,_=f.hasOwnProperty;function c(r,e){e=a.default(e,r);var t=-1,o=e.length;if(!o)return!0;for(;++t<o;){var u=n.default(e[t]);if(u==="__proto__"&&!_.call(r,"__proto__")||(u==="constructor"||u==="prototype")&&t<o-1)return!1}var l=i.default(r,e);return l==null||delete l[n.default(s.default(e))]}exports.default=c;
@@ -1,27 +1,20 @@
1
- import l from "./_castPath.es.js";
2
- import s from "./last.es.js";
3
- import u from "./_parent.es.js";
4
- import a from "./_toKey.es.js";
5
- var p = Object.prototype, m = p.hasOwnProperty;
1
+ import f from "./_castPath.es.js";
2
+ import i from "./last.es.js";
3
+ import s from "./_parent.es.js";
4
+ import l from "./_toKey.es.js";
5
+ var p = Object.prototype, u = p.hasOwnProperty;
6
6
  function P(t, r) {
7
- r = l(r, t);
7
+ r = f(r, t);
8
8
  var o = -1, e = r.length;
9
9
  if (!e)
10
10
  return !0;
11
- for (var f = t == null || typeof t != "object" && typeof t != "function"; ++o < e; ) {
12
- var n = r[o];
13
- if (typeof n == "string") {
14
- if (n === "__proto__" && !m.call(t, "__proto__"))
15
- return !1;
16
- if (n === "constructor" && o + 1 < e && typeof r[o + 1] == "string" && r[o + 1] === "prototype") {
17
- if (f && o === 0)
18
- continue;
19
- return !1;
20
- }
21
- }
11
+ for (; ++o < e; ) {
12
+ var n = l(r[o]);
13
+ if (n === "__proto__" && !u.call(t, "__proto__") || (n === "constructor" || n === "prototype") && o < e - 1)
14
+ return !1;
22
15
  }
23
- var i = u(t, r);
24
- return i == null || delete i[a(s(r))];
16
+ var a = s(t, r);
17
+ return a == null || delete a[l(i(r))];
25
18
  }
26
19
  export {
27
20
  P as default
@@ -1,4 +1,4 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!
2
2
  * tabbable 6.2.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
- */var N=["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])"],v=N.join(","),T=typeof Element>"u",d=T?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,b=!T&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},h=function i(t,e){var r;e===void 0&&(e=!0);var a=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=a===""||a==="true",n=l||e&&t&&i(t.parentNode);return n},E=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},A=function(t,e,r){if(h(t))return[];var a=Array.prototype.slice.apply(t.querySelectorAll(v));return e&&d.call(t,v)&&a.unshift(t),a=a.filter(r),a},R=function i(t,e,r){for(var a=[],l=Array.from(t);l.length;){var n=l.shift();if(!h(n,!1))if(n.tagName==="SLOT"){var u=n.assignedElements(),s=u.length?u:n.children,c=i(s,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:n,candidates:c})}else{var f=d.call(n,v);f&&r.filter(n)&&(e||!t.includes(n))&&a.push(n);var o=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),w=!h(o,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(o&&w){var S=i(o===!0?n.children:o.children,!0,r);r.flatten?a.push.apply(a,S):a.push({scopeParent:n,candidates:S})}else l.unshift.apply(l,n.children)}}return a},I=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},y=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||E(t))&&!I(t)?0:t.tabIndex},x=function(t,e){var r=y(t);return r<0&&e&&!I(t)?0:r},C=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},m=function(t){return t.tagName==="INPUT"},O=function(t){return m(t)&&t.type==="hidden"},D=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},F=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},M=function(t){if(!t.name)return!0;var e=t.form||b(t),r=function(u){return e.querySelectorAll('input[type="radio"][name="'+u+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(t.name));else try{a=r(t.name)}catch(n){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",n.message),!1}var l=F(a,t.form);return!l||l===t},k=function(t){return m(t)&&t.type==="radio"},L=function(t){return k(t)&&!M(t)},P=function(t){var e,r=t&&b(t),a=(e=r)===null||e===void 0?void 0:e.host,l=!1;if(r&&r!==t){var n,u,s;for(l=!!((n=a)!==null&&n!==void 0&&(u=n.ownerDocument)!==null&&u!==void 0&&u.contains(a)||t!=null&&(s=t.ownerDocument)!==null&&s!==void 0&&s.contains(t));!l&&a;){var c,f,o;r=b(a),a=(c=r)===null||c===void 0?void 0:c.host,l=!!((f=a)!==null&&f!==void 0&&(o=f.ownerDocument)!==null&&o!==void 0&&o.contains(a))}}return l},p=function(t){var e=t.getBoundingClientRect(),r=e.width,a=e.height;return r===0&&a===0},B=function(t,e){var r=e.displayCheck,a=e.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var l=d.call(t,"details>summary:first-of-type"),n=l?t.parentElement:t;if(d.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof a=="function"){for(var u=t;t;){var s=t.parentElement,c=b(t);if(s&&!s.shadowRoot&&a(s)===!0)return p(t);t.assignedSlot?t=t.assignedSlot:!s&&c!==t.ownerDocument?t=c.host:t=s}t=u}if(P(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return p(t);return!1},q=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var a=e.children.item(r);if(a.tagName==="LEGEND")return d.call(e,"fieldset[disabled] *")?!0:!a.contains(t)}return!0}e=e.parentElement}return!1},U=function(t,e){return!(e.disabled||h(e)||O(e)||B(e,t)||D(e)||q(e))},g=function(t,e){return!(L(e)||y(e)<0||!U(t,e))},V=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},j=function i(t){var e=[],r=[];return t.forEach(function(a,l){var n=!!a.scopeParent,u=n?a.scopeParent:a,s=x(u,n),c=n?i(a.candidates):u;s===0?n?e.push.apply(e,c):e.push(u):r.push({documentOrder:l,tabIndex:s,item:a,isScope:n,content:c})}),r.sort(C).reduce(function(a,l){return l.isScope?a.push.apply(a,l.content):a.push(l.content),a},[]).concat(e)},W=function(t,e){e=e||{};var r;return e.getShadowRoot?r=R([t],e.includeContainer,{filter:g.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:V}):r=A(t,e.includeContainer,g.bind(null,e)),j(r)},Z=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return d.call(t,v)===!1?!1:g(e,t)};exports.getTabIndex=y;exports.isTabbable=Z;exports.tabbable=W;
4
+ */var E=["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])"],v=E.join(","),w=typeof Element>"u",o=w?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,b=!w&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},h=function i(t,e){var r;e===void 0&&(e=!0);var a=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=a===""||a==="true",n=l||e&&t&&i(t.parentNode);return n},A=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},I=function(t,e,r){if(h(t))return[];var a=Array.prototype.slice.apply(t.querySelectorAll(v));return e&&o.call(t,v)&&a.unshift(t),a=a.filter(r),a},m=function i(t,e,r){for(var a=[],l=Array.from(t);l.length;){var n=l.shift();if(!h(n,!1))if(n.tagName==="SLOT"){var u=n.assignedElements(),c=u.length?u:n.children,s=i(c,!0,r);r.flatten?a.push.apply(a,s):a.push({scopeParent:n,candidates:s})}else{var f=o.call(n,v);f&&r.filter(n)&&(e||!t.includes(n))&&a.push(n);var d=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),C=!h(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(d&&C){var p=i(d===!0?n.children:d.children,!0,r);r.flatten?a.push.apply(a,p):a.push({scopeParent:n,candidates:p})}else l.unshift.apply(l,n.children)}}return a},R=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},y=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||A(t))&&!R(t)?0:t.tabIndex},x=function(t,e){var r=y(t);return r<0&&e&&!R(t)?0:r},O=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},N=function(t){return t.tagName==="INPUT"},D=function(t){return N(t)&&t.type==="hidden"},F=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},M=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},k=function(t){if(!t.name)return!0;var e=t.form||b(t),r=function(u){return e.querySelectorAll('input[type="radio"][name="'+u+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(t.name));else try{a=r(t.name)}catch(n){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",n.message),!1}var l=M(a,t.form);return!l||l===t},L=function(t){return N(t)&&t.type==="radio"},P=function(t){return L(t)&&!k(t)},B=function(t){var e,r=t&&b(t),a=(e=r)===null||e===void 0?void 0:e.host,l=!1;if(r&&r!==t){var n,u,c;for(l=!!((n=a)!==null&&n!==void 0&&(u=n.ownerDocument)!==null&&u!==void 0&&u.contains(a)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!l&&a;){var s,f,d;r=b(a),a=(s=r)===null||s===void 0?void 0:s.host,l=!!((f=a)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(a))}}return l},T=function(t){var e=t.getBoundingClientRect(),r=e.width,a=e.height;return r===0&&a===0},q=function(t,e){var r=e.displayCheck,a=e.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var l=o.call(t,"details>summary:first-of-type"),n=l?t.parentElement:t;if(o.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof a=="function"){for(var u=t;t;){var c=t.parentElement,s=b(t);if(c&&!c.shadowRoot&&a(c)===!0)return T(t);t.assignedSlot?t=t.assignedSlot:!c&&s!==t.ownerDocument?t=s.host:t=c}t=u}if(B(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return T(t);return!1},U=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var a=e.children.item(r);if(a.tagName==="LEGEND")return o.call(e,"fieldset[disabled] *")?!0:!a.contains(t)}return!0}e=e.parentElement}return!1},g=function(t,e){return!(e.disabled||h(e)||D(e)||q(e,t)||F(e)||U(e))},S=function(t,e){return!(P(e)||y(e)<0||!g(t,e))},V=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},j=function i(t){var e=[],r=[];return t.forEach(function(a,l){var n=!!a.scopeParent,u=n?a.scopeParent:a,c=x(u,n),s=n?i(a.candidates):u;c===0?n?e.push.apply(e,s):e.push(u):r.push({documentOrder:l,tabIndex:c,item:a,isScope:n,content:s})}),r.sort(O).reduce(function(a,l){return l.isScope?a.push.apply(a,l.content):a.push(l.content),a},[]).concat(e)},W=function(t,e){e=e||{};var r;return e.getShadowRoot?r=m([t],e.includeContainer,{filter:S.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:V}):r=I(t,e.includeContainer,S.bind(null,e)),j(r)},Z=function(t,e){e=e||{};var r;return e.getShadowRoot?r=m([t],e.includeContainer,{filter:g.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=I(t,e.includeContainer,g.bind(null,e)),r},z=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return o.call(t,v)===!1?!1:S(e,t)};exports.focusable=Z;exports.getTabIndex=y;exports.isTabbable=z;exports.tabbable=W;
@@ -2,8 +2,8 @@
2
2
  * tabbable 6.2.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
4
  */
5
- var N = ["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])"], v = /* @__PURE__ */ N.join(","), S = typeof Element > "u", d = S ? function() {
6
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, b = !S && Element.prototype.getRootNode ? function(i) {
5
+ var E = ["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])"], v = /* @__PURE__ */ E.join(","), w = typeof Element > "u", o = w ? function() {
6
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, b = !w && Element.prototype.getRootNode ? function(i) {
7
7
  var t;
8
8
  return i == null || (t = i.getRootNode) === null || t === void 0 ? void 0 : t.call(i);
9
9
  } : function(i) {
@@ -13,65 +13,65 @@ var N = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "
13
13
  e === void 0 && (e = !0);
14
14
  var a = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), l = a === "" || a === "true", n = l || e && t && i(t.parentNode);
15
15
  return n;
16
- }, E = function(t) {
16
+ }, A = function(t) {
17
17
  var e, r = t == null || (e = t.getAttribute) === null || e === void 0 ? void 0 : e.call(t, "contenteditable");
18
18
  return r === "" || r === "true";
19
- }, A = function(t, e, r) {
19
+ }, T = function(t, e, r) {
20
20
  if (h(t))
21
21
  return [];
22
22
  var a = Array.prototype.slice.apply(t.querySelectorAll(v));
23
- return e && d.call(t, v) && a.unshift(t), a = a.filter(r), a;
24
- }, R = function i(t, e, r) {
23
+ return e && o.call(t, v) && a.unshift(t), a = a.filter(r), a;
24
+ }, I = function i(t, e, r) {
25
25
  for (var a = [], l = Array.from(t); l.length; ) {
26
26
  var n = l.shift();
27
27
  if (!h(n, !1))
28
28
  if (n.tagName === "SLOT") {
29
- var u = n.assignedElements(), s = u.length ? u : n.children, c = i(s, !0, r);
30
- r.flatten ? a.push.apply(a, c) : a.push({
29
+ var u = n.assignedElements(), c = u.length ? u : n.children, d = i(c, !0, r);
30
+ r.flatten ? a.push.apply(a, d) : a.push({
31
31
  scopeParent: n,
32
- candidates: c
32
+ candidates: d
33
33
  });
34
34
  } else {
35
- var f = d.call(n, v);
35
+ var f = o.call(n, v);
36
36
  f && r.filter(n) && (e || !t.includes(n)) && a.push(n);
37
- var o = n.shadowRoot || // check for an undisclosed shadow
38
- typeof r.getShadowRoot == "function" && r.getShadowRoot(n), w = !h(o, !1) && (!r.shadowRootFilter || r.shadowRootFilter(n));
39
- if (o && w) {
40
- var p = i(o === !0 ? n.children : o.children, !0, r);
41
- r.flatten ? a.push.apply(a, p) : a.push({
37
+ var s = n.shadowRoot || // check for an undisclosed shadow
38
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(n), C = !h(s, !1) && (!r.shadowRootFilter || r.shadowRootFilter(n));
39
+ if (s && C) {
40
+ var y = i(s === !0 ? n.children : s.children, !0, r);
41
+ r.flatten ? a.push.apply(a, y) : a.push({
42
42
  scopeParent: n,
43
- candidates: p
43
+ candidates: y
44
44
  });
45
45
  } else
46
46
  l.unshift.apply(l, n.children);
47
47
  }
48
48
  }
49
49
  return a;
50
- }, T = function(t) {
50
+ }, m = function(t) {
51
51
  return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
52
- }, I = function(t) {
52
+ }, R = function(t) {
53
53
  if (!t)
54
54
  throw new Error("No node provided");
55
- return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || E(t)) && !T(t) ? 0 : t.tabIndex;
55
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || A(t)) && !m(t) ? 0 : t.tabIndex;
56
56
  }, x = function(t, e) {
57
- var r = I(t);
58
- return r < 0 && e && !T(t) ? 0 : r;
59
- }, C = function(t, e) {
57
+ var r = R(t);
58
+ return r < 0 && e && !m(t) ? 0 : r;
59
+ }, O = function(t, e) {
60
60
  return t.tabIndex === e.tabIndex ? t.documentOrder - e.documentOrder : t.tabIndex - e.tabIndex;
61
- }, m = function(t) {
61
+ }, N = function(t) {
62
62
  return t.tagName === "INPUT";
63
- }, O = function(t) {
64
- return m(t) && t.type === "hidden";
65
63
  }, D = function(t) {
64
+ return N(t) && t.type === "hidden";
65
+ }, F = function(t) {
66
66
  var e = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
67
67
  return r.tagName === "SUMMARY";
68
68
  });
69
69
  return e;
70
- }, F = function(t, e) {
70
+ }, k = function(t, e) {
71
71
  for (var r = 0; r < t.length; r++)
72
72
  if (t[r].checked && t[r].form === e)
73
73
  return t[r];
74
- }, k = function(t) {
74
+ }, M = function(t) {
75
75
  if (!t.name)
76
76
  return !0;
77
77
  var e = t.form || b(t), r = function(u) {
@@ -85,104 +85,113 @@ var N = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "
85
85
  } catch (n) {
86
86
  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", n.message), !1;
87
87
  }
88
- var l = F(a, t.form);
88
+ var l = k(a, t.form);
89
89
  return !l || l === t;
90
- }, M = function(t) {
91
- return m(t) && t.type === "radio";
92
90
  }, L = function(t) {
93
- return M(t) && !k(t);
91
+ return N(t) && t.type === "radio";
94
92
  }, P = function(t) {
93
+ return L(t) && !M(t);
94
+ }, B = function(t) {
95
95
  var e, r = t && b(t), a = (e = r) === null || e === void 0 ? void 0 : e.host, l = !1;
96
96
  if (r && r !== t) {
97
- var n, u, s;
98
- for (l = !!((n = a) !== null && n !== void 0 && (u = n.ownerDocument) !== null && u !== void 0 && u.contains(a) || t != null && (s = t.ownerDocument) !== null && s !== void 0 && s.contains(t)); !l && a; ) {
99
- var c, f, o;
100
- r = b(a), a = (c = r) === null || c === void 0 ? void 0 : c.host, l = !!((f = a) !== null && f !== void 0 && (o = f.ownerDocument) !== null && o !== void 0 && o.contains(a));
97
+ var n, u, c;
98
+ for (l = !!((n = a) !== null && n !== void 0 && (u = n.ownerDocument) !== null && u !== void 0 && u.contains(a) || t != null && (c = t.ownerDocument) !== null && c !== void 0 && c.contains(t)); !l && a; ) {
99
+ var d, f, s;
100
+ r = b(a), a = (d = r) === null || d === void 0 ? void 0 : d.host, l = !!((f = a) !== null && f !== void 0 && (s = f.ownerDocument) !== null && s !== void 0 && s.contains(a));
101
101
  }
102
102
  }
103
103
  return l;
104
- }, y = function(t) {
104
+ }, p = function(t) {
105
105
  var e = t.getBoundingClientRect(), r = e.width, a = e.height;
106
106
  return r === 0 && a === 0;
107
- }, B = function(t, e) {
107
+ }, q = function(t, e) {
108
108
  var r = e.displayCheck, a = e.getShadowRoot;
109
109
  if (getComputedStyle(t).visibility === "hidden")
110
110
  return !0;
111
- var l = d.call(t, "details>summary:first-of-type"), n = l ? t.parentElement : t;
112
- if (d.call(n, "details:not([open]) *"))
111
+ var l = o.call(t, "details>summary:first-of-type"), n = l ? t.parentElement : t;
112
+ if (o.call(n, "details:not([open]) *"))
113
113
  return !0;
114
114
  if (!r || r === "full" || r === "legacy-full") {
115
115
  if (typeof a == "function") {
116
116
  for (var u = t; t; ) {
117
- var s = t.parentElement, c = b(t);
118
- if (s && !s.shadowRoot && a(s) === !0)
119
- return y(t);
120
- t.assignedSlot ? t = t.assignedSlot : !s && c !== t.ownerDocument ? t = c.host : t = s;
117
+ var c = t.parentElement, d = b(t);
118
+ if (c && !c.shadowRoot && a(c) === !0)
119
+ return p(t);
120
+ t.assignedSlot ? t = t.assignedSlot : !c && d !== t.ownerDocument ? t = d.host : t = c;
121
121
  }
122
122
  t = u;
123
123
  }
124
- if (P(t))
124
+ if (B(t))
125
125
  return !t.getClientRects().length;
126
126
  if (r !== "legacy-full")
127
127
  return !0;
128
128
  } else if (r === "non-zero-area")
129
- return y(t);
129
+ return p(t);
130
130
  return !1;
131
- }, q = function(t) {
131
+ }, U = function(t) {
132
132
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
133
133
  for (var e = t.parentElement; e; ) {
134
134
  if (e.tagName === "FIELDSET" && e.disabled) {
135
135
  for (var r = 0; r < e.children.length; r++) {
136
136
  var a = e.children.item(r);
137
137
  if (a.tagName === "LEGEND")
138
- return d.call(e, "fieldset[disabled] *") ? !0 : !a.contains(t);
138
+ return o.call(e, "fieldset[disabled] *") ? !0 : !a.contains(t);
139
139
  }
140
140
  return !0;
141
141
  }
142
142
  e = e.parentElement;
143
143
  }
144
144
  return !1;
145
- }, U = function(t, e) {
145
+ }, g = function(t, e) {
146
146
  return !(e.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
147
147
  // because we're limited in the type of selectors we can use in JSDom (see related
148
148
  // note related to `candidateSelectors`)
149
- h(e) || O(e) || B(e, t) || // For a details element with a summary, the summary element gets the focus
150
- D(e) || q(e));
151
- }, g = function(t, e) {
152
- return !(L(e) || I(e) < 0 || !U(t, e));
149
+ h(e) || D(e) || q(e, t) || // For a details element with a summary, the summary element gets the focus
150
+ F(e) || U(e));
151
+ }, S = function(t, e) {
152
+ return !(P(e) || R(e) < 0 || !g(t, e));
153
153
  }, V = function(t) {
154
154
  var e = parseInt(t.getAttribute("tabindex"), 10);
155
155
  return !!(isNaN(e) || e >= 0);
156
156
  }, W = function i(t) {
157
157
  var e = [], r = [];
158
158
  return t.forEach(function(a, l) {
159
- var n = !!a.scopeParent, u = n ? a.scopeParent : a, s = x(u, n), c = n ? i(a.candidates) : u;
160
- s === 0 ? n ? e.push.apply(e, c) : e.push(u) : r.push({
159
+ var n = !!a.scopeParent, u = n ? a.scopeParent : a, c = x(u, n), d = n ? i(a.candidates) : u;
160
+ c === 0 ? n ? e.push.apply(e, d) : e.push(u) : r.push({
161
161
  documentOrder: l,
162
- tabIndex: s,
162
+ tabIndex: c,
163
163
  item: a,
164
164
  isScope: n,
165
- content: c
165
+ content: d
166
166
  });
167
- }), r.sort(C).reduce(function(a, l) {
167
+ }), r.sort(O).reduce(function(a, l) {
168
168
  return l.isScope ? a.push.apply(a, l.content) : a.push(l.content), a;
169
169
  }, []).concat(e);
170
170
  }, Z = function(t, e) {
171
171
  e = e || {};
172
172
  var r;
173
- return e.getShadowRoot ? r = R([t], e.includeContainer, {
174
- filter: g.bind(null, e),
173
+ return e.getShadowRoot ? r = I([t], e.includeContainer, {
174
+ filter: S.bind(null, e),
175
175
  flatten: !1,
176
176
  getShadowRoot: e.getShadowRoot,
177
177
  shadowRootFilter: V
178
- }) : r = A(t, e.includeContainer, g.bind(null, e)), W(r);
178
+ }) : r = T(t, e.includeContainer, S.bind(null, e)), W(r);
179
179
  }, j = function(t, e) {
180
+ e = e || {};
181
+ var r;
182
+ return e.getShadowRoot ? r = I([t], e.includeContainer, {
183
+ filter: g.bind(null, e),
184
+ flatten: !0,
185
+ getShadowRoot: e.getShadowRoot
186
+ }) : r = T(t, e.includeContainer, g.bind(null, e)), r;
187
+ }, z = function(t, e) {
180
188
  if (e = e || {}, !t)
181
189
  throw new Error("No node provided");
182
- return d.call(t, v) === !1 ? !1 : g(e, t);
190
+ return o.call(t, v) === !1 ? !1 : S(e, t);
183
191
  };
184
192
  export {
185
- I as getTabIndex,
186
- j as isTabbable,
193
+ j as focusable,
194
+ R as getTabIndex,
195
+ z as isTabbable,
187
196
  Z as tabbable
188
197
  };