@konstructio/ui 0.0.12-alpha.9 → 0.0.13-alpha.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.
Files changed (144) hide show
  1. package/dist/{Modal-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
  2. package/dist/components/Alert/Alert.js +24 -29
  3. package/dist/components/Alert/Alert.variants.js +9 -15
  4. package/dist/components/AlertDialog/AlertDialog.js +59 -46
  5. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
  6. package/dist/components/AlertDialog/components/index.js +1 -1
  7. package/dist/components/Autocomplete/Autocomplete.js +76 -72
  8. package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
  9. package/dist/components/Autocomplete/components/List/List.js +28 -30
  10. package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
  11. package/dist/components/Breadcrumb/Breadcrumb.js +47 -56
  12. package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
  13. package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
  14. package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
  15. package/dist/components/Button/Button.js +33 -37
  16. package/dist/components/Button/Button.variants.js +138 -195
  17. package/dist/components/Card/Card.js +32 -37
  18. package/dist/components/Card/Card.variants.js +18 -53
  19. package/dist/components/Checkbox/Checkbox.js +65 -68
  20. package/dist/components/Checkbox/Checkbox.variants.js +11 -35
  21. package/dist/components/Command/Command.js +33 -25
  22. package/dist/components/Command/Command.variants.js +47 -94
  23. package/dist/components/Command/components/Command.js +1 -1
  24. package/dist/components/Command/components/CommandEmpty.js +1 -1
  25. package/dist/components/Command/components/CommandGroup.js +1 -1
  26. package/dist/components/Command/components/CommandInput.js +1 -1
  27. package/dist/components/Command/components/CommandItem.js +1 -1
  28. package/dist/components/Command/components/CommandList.js +1 -1
  29. package/dist/components/Command/components/CommandSeparator.js +1 -1
  30. package/dist/components/Command/components/DialogContent.js +1 -1
  31. package/dist/components/Command/components/DialogOverlay.js +8 -8
  32. package/dist/components/Divider/Divider.js +3 -2
  33. package/dist/components/Divider/Divider.variants.js +12 -9
  34. package/dist/components/Dropdown/Dropdown.js +6 -6
  35. package/dist/components/Dropdown/Dropdown.variants.js +31 -38
  36. package/dist/components/Dropdown/components/List/List.js +17 -15
  37. package/dist/components/Dropdown/components/List/List.variants.js +22 -32
  38. package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
  39. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
  40. package/dist/components/Dropdown/components/Wrapper.js +127 -90
  41. package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
  42. package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
  43. package/dist/components/Input/Input.js +37 -37
  44. package/dist/components/Input/Input.variants.js +8 -13
  45. package/dist/components/Loading/Loading.js +60 -58
  46. package/dist/components/Loading/Loading.variants.js +9 -15
  47. package/dist/components/Modal/Modal.js +2 -2
  48. package/dist/components/Modal/components/Body/Body.js +1 -1
  49. package/dist/components/Modal/components/Footer/Footer.js +2 -2
  50. package/dist/components/Modal/components/Header/Header.js +3 -3
  51. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
  52. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
  53. package/dist/components/Modal/components/index.js +1 -1
  54. package/dist/components/NumberInput/NumberInput.js +93 -111
  55. package/dist/components/NumberInput/NumberInput.variants.js +30 -51
  56. package/dist/components/ProgressBar/ProgressBar.js +25 -29
  57. package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
  58. package/dist/components/Radio/Radio.js +45 -46
  59. package/dist/components/Radio/Radio.variants.js +4 -13
  60. package/dist/components/RadioCard/RadioCard.js +31 -37
  61. package/dist/components/RadioCard/RadioCard.variants.js +8 -17
  62. package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
  63. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
  64. package/dist/components/RadioGroup/RadioGroup.js +30 -31
  65. package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
  66. package/dist/components/Range/Range.js +28 -34
  67. package/dist/components/Range/Range.variants.js +21 -53
  68. package/dist/components/Sidebar/Sidebar.js +12 -13
  69. package/dist/components/Sidebar/Sidebar.variants.js +30 -56
  70. package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
  71. package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
  72. package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
  73. package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
  74. package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
  75. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
  76. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
  77. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
  78. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
  79. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
  80. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
  81. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
  82. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
  83. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
  84. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
  85. package/dist/components/Slider/Slider.js +26 -27
  86. package/dist/components/Slider/Slider.variants.js +22 -34
  87. package/dist/components/Switch/Switch.js +103 -106
  88. package/dist/components/Switch/Switch.variants.js +28 -53
  89. package/dist/components/Table/Table.js +27 -0
  90. package/dist/components/Table/Table.variants.js +40 -0
  91. package/dist/components/Table/components/Body.js +18 -0
  92. package/dist/components/Table/components/Filter.js +9 -0
  93. package/dist/components/Table/components/Head.js +18 -0
  94. package/dist/components/Table/components/Row.js +28 -0
  95. package/dist/components/Table/components/index.js +10 -0
  96. package/dist/components/Tag/Tag.js +1 -1
  97. package/dist/components/TagSelect/TagSelect.variants.js +23 -55
  98. package/dist/components/TagSelect/components/Item/Item.js +12 -14
  99. package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
  100. package/dist/components/TagSelect/components/List/List.js +9 -10
  101. package/dist/components/TagSelect/components/List/List.variants.js +21 -35
  102. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
  103. package/dist/components/TextArea/TextArea.js +20 -23
  104. package/dist/components/TextArea/TextArea.variants.js +19 -31
  105. package/dist/components/Toast/Toast.js +110 -116
  106. package/dist/components/Toast/Toast.variants.js +42 -70
  107. package/dist/components/Tooltip/Tooltip.js +21 -27
  108. package/dist/components/Tooltip/Tooltip.variants.js +61 -62
  109. package/dist/components/Typography/Typography.js +23 -19
  110. package/dist/components/Typography/Typography.variants.js +1 -7
  111. package/dist/components/index.js +22 -20
  112. package/dist/contexts/theme.provider.js +37 -39
  113. package/dist/domain/theme.js +0 -0
  114. package/dist/index-AM3avohj.js +133 -0
  115. package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
  116. package/dist/index-Bk324h27.js +82 -0
  117. package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
  118. package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
  119. package/dist/index-D9BbbgUq.js +47 -0
  120. package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
  121. package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
  122. package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
  123. package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
  124. package/dist/index-dRxIWVBr.js +313 -0
  125. package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
  126. package/dist/index.d.ts +115 -98
  127. package/dist/index.js +30 -30
  128. package/dist/package.json +37 -36
  129. package/dist/styles.css +1 -1
  130. package/dist/ui/kubefirst-theme.css +296 -0
  131. package/dist/ui/theme.css +6 -0
  132. package/dist/ui/utilities.css +165 -0
  133. package/dist/utils/index.js +675 -424
  134. package/package.json +37 -36
  135. package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
  136. package/dist/index-B_6_jmOO.js +0 -68
  137. package/dist/index-BbsJ0VIJ.js +0 -47
  138. package/dist/index-CzSBQN5S.js +0 -432
  139. package/dist/index-DUA6Y_AE.js +0 -126
  140. package/dist/plugins/index.js +0 -4
  141. package/dist/plugins/konstruct.js +0 -118
  142. package/dist/plugins/utils/animation.styles.js +0 -162
  143. package/dist/plugins/utils/colors.js +0 -331
  144. package/dist/plugins/utils/index.js +0 -7
@@ -3,15 +3,14 @@ import { Footer as _r } from "./components/Modal/components/Footer/Footer.js";
3
3
  import { Header as kr } from "./components/Modal/components/Header/Header.js";
4
4
  import { jsx as k, jsxs as ee } from "react/jsx-runtime";
5
5
  import S, { createContext as Lr, forwardRef as Ue, useState as re, useRef as ne, useCallback as W, useEffect as Ge, useMemo as Rr, Fragment as Cr, PureComponent as Wr, Children as K, isValidElement as X } from "react";
6
- import { r as Br } from "./index-D7QNmo_D.js";
7
- import { R as Ur } from "./index-CbTU3cnP.js";
8
- import { p as v } from "./index-C5psggHV.js";
6
+ import { r as Br } from "./index-g-TFwd6Y.js";
7
+ import { R as Ur } from "./index-CWKdynYu.js";
8
+ import { p as l } from "./index-C5psggHV.js";
9
9
  import { c as le, a as Gr, u as Hr, R as jr } from "./Combination-b348x__d.js";
10
10
  import { cn as Me } from "./utils/index.js";
11
11
  import { buttonCloseVariants as Vr, modalVariants as qr } from "./components/Modal/components/Wrapper/Wrapper.variants.js";
12
12
  import { X as $r } from "./x-DU-Zw-L_.js";
13
- import { useTheme as Kr } from "./contexts/theme.hook.js";
14
- function Xr(e, r) {
13
+ function Kr(e, r) {
15
14
  if (e == null) return {};
16
15
  var n = {};
17
16
  for (var t in e) if ({}.hasOwnProperty.call(e, t)) {
@@ -29,7 +28,7 @@ function U() {
29
28
  return e;
30
29
  }, U.apply(null, arguments);
31
30
  }
32
- var ie = "data-focus-lock", He = "data-focus-lock-disabled", Yr = "data-no-focus-lock", zr = "data-autofocus-inside", Jr = "data-no-autofocus", te = {
31
+ var ie = "data-focus-lock", He = "data-focus-lock-disabled", Xr = "data-no-focus-lock", Yr = "data-autofocus-inside", zr = "data-no-autofocus", te = {
33
32
  width: "1px",
34
33
  height: "0px",
35
34
  padding: 0,
@@ -43,65 +42,65 @@ var ie = "data-focus-lock", He = "data-focus-lock-disabled", Yr = "data-no-focus
43
42
  target: r,
44
43
  currentTarget: n
45
44
  };
46
- }), Ve = le(), Qr = le(), Zr = Gr({
45
+ }), Ve = le(), Jr = le(), Qr = Gr({
47
46
  async: !0,
48
47
  ssr: typeof document < "u"
49
- }), en = /* @__PURE__ */ Lr(void 0), rn = [], ve = /* @__PURE__ */ Ue(function(r, n) {
50
- var t, o = re(), u = o[0], a = o[1], i = ne(), m = ne(!1), c = ne(null), d = re({}), s = d[1], f = r.children, p = r.disabled, l = p === void 0 ? !1 : p, b = r.noFocusGuards, g = b === void 0 ? !1 : b, x = r.persistentFocus, y = x === void 0 ? !1 : x, h = r.crossFrame, E = h === void 0 ? !0 : h, w = r.autoFocus, D = w === void 0 ? !0 : w, q = r.allowTextSelection, z = r.group, mr = r.className, br = r.whiteList, pr = r.hasPositiveIndices, Ie = r.shards, J = Ie === void 0 ? rn : Ie, Se = r.as, Ne = Se === void 0 ? "div" : Se, Te = r.lockProps, yr = Te === void 0 ? {} : Te, hr = r.sideCar, Pe = r.returnFocus, $ = Pe === void 0 ? !1 : Pe, gr = r.focusOptions, Q = r.onActivation, Z = r.onDeactivation, Fr = re({}), xr = Fr[0], Er = W(function(I) {
48
+ }), Zr = /* @__PURE__ */ Lr(void 0), en = [], ve = /* @__PURE__ */ Ue(function(r, n) {
49
+ var t, o = re(), u = o[0], a = o[1], c = ne(), v = ne(!1), i = ne(null), h = re({}), s = h[1], f = r.children, b = r.disabled, d = b === void 0 ? !1 : b, m = r.noFocusGuards, g = m === void 0 ? !1 : m, x = r.persistentFocus, p = x === void 0 ? !1 : x, y = r.crossFrame, E = y === void 0 ? !0 : y, w = r.autoFocus, D = w === void 0 ? !0 : w, q = r.allowTextSelection, z = r.group, mr = r.className, br = r.whiteList, pr = r.hasPositiveIndices, Ie = r.shards, J = Ie === void 0 ? en : Ie, Se = r.as, Ne = Se === void 0 ? "div" : Se, Pe = r.lockProps, yr = Pe === void 0 ? {} : Pe, hr = r.sideCar, Te = r.returnFocus, $ = Te === void 0 ? !1 : Te, gr = r.focusOptions, Q = r.onActivation, Z = r.onDeactivation, Fr = re({}), xr = Fr[0], Er = W(function(I) {
51
50
  var M = I.captureFocusRestore;
52
- if (!c.current) {
53
- var _, T = (_ = document) == null ? void 0 : _.activeElement;
54
- c.current = T, T !== document.body && (c.current = M(T));
51
+ if (!i.current) {
52
+ var _, P = (_ = document) == null ? void 0 : _.activeElement;
53
+ i.current = P, P !== document.body && (i.current = M(P));
55
54
  }
56
- i.current && Q && Q(i.current), m.current = !0, s();
55
+ c.current && Q && Q(c.current), v.current = !0, s();
57
56
  }, [Q]), Or = W(function() {
58
- m.current = !1, Z && Z(i.current), s();
57
+ v.current = !1, Z && Z(c.current), s();
59
58
  }, [Z]), wr = W(function(I) {
60
- var M = c.current;
59
+ var M = i.current;
61
60
  if (M) {
62
- var _ = (typeof M == "function" ? M() : M) || document.body, T = typeof $ == "function" ? $(_) : $;
63
- if (T) {
64
- var De = typeof T == "object" ? T : void 0;
65
- c.current = null, I ? Promise.resolve().then(function() {
61
+ var _ = (typeof M == "function" ? M() : M) || document.body, P = typeof $ == "function" ? $(_) : $;
62
+ if (P) {
63
+ var De = typeof P == "object" ? P : void 0;
64
+ i.current = null, I ? Promise.resolve().then(function() {
66
65
  return _.focus(De);
67
66
  }) : _.focus(De);
68
67
  }
69
68
  }
70
69
  }, [$]), Ir = W(function(I) {
71
- m.current && je.useMedium(I);
70
+ v.current && je.useMedium(I);
72
71
  }, []), Sr = Ve.useMedium, Nr = W(function(I) {
73
- i.current !== I && (i.current = I, a(I));
72
+ c.current !== I && (c.current = I, a(I));
74
73
  }, []);
75
74
  process.env.NODE_ENV !== "production" && (typeof q < "u" && console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"), Ge(function() {
76
- !i.current && typeof Ne != "string" && console.error("FocusLock: could not obtain ref to internal node");
75
+ !c.current && typeof Ne != "string" && console.error("FocusLock: could not obtain ref to internal node");
77
76
  }, []));
78
- var Tr = U((t = {}, t[He] = l && "disabled", t[ie] = z, t), yr), Ae = g !== !0, Pr = Ae && g !== "tail", Ar = Hr([n, Nr]), Dr = Rr(function() {
77
+ var Pr = U((t = {}, t[He] = d && "disabled", t[ie] = z, t), yr), Ae = g !== !0, Tr = Ae && g !== "tail", Ar = Hr([n, Nr]), Dr = Rr(function() {
79
78
  return {
80
- observed: i,
79
+ observed: c,
81
80
  shards: J,
82
- enabled: !l,
83
- active: m.current
81
+ enabled: !d,
82
+ active: v.current
84
83
  };
85
- }, [l, m.current, J, u]);
84
+ }, [d, v.current, J, u]);
86
85
  return /* @__PURE__ */ S.createElement(Cr, null, Ae && [
87
86
  /* @__PURE__ */ S.createElement("div", {
88
87
  key: "guard-first",
89
88
  "data-focus-guard": !0,
90
- tabIndex: l ? -1 : 0,
89
+ tabIndex: d ? -1 : 0,
91
90
  style: te
92
91
  }),
93
92
  pr ? /* @__PURE__ */ S.createElement("div", {
94
93
  key: "guard-nearest",
95
94
  "data-focus-guard": !0,
96
- tabIndex: l ? -1 : 1,
95
+ tabIndex: d ? -1 : 1,
97
96
  style: te
98
97
  }) : null
99
- ], !l && /* @__PURE__ */ S.createElement(hr, {
98
+ ], !d && /* @__PURE__ */ S.createElement(hr, {
100
99
  id: xr,
101
- sideCar: Zr,
100
+ sideCar: Qr,
102
101
  observed: u,
103
- disabled: l,
104
- persistentFocus: y,
102
+ disabled: d,
103
+ persistentFocus: p,
105
104
  crossFrame: E,
106
105
  autoFocus: D,
107
106
  whiteList: br,
@@ -113,45 +112,45 @@ var ie = "data-focus-lock", He = "data-focus-lock-disabled", Yr = "data-no-focus
113
112
  noFocusGuards: g
114
113
  }), /* @__PURE__ */ S.createElement(Ne, U({
115
114
  ref: Ar
116
- }, Tr, {
115
+ }, Pr, {
117
116
  className: mr,
118
117
  onBlur: Sr,
119
118
  onFocus: Ir
120
- }), /* @__PURE__ */ S.createElement(en.Provider, {
119
+ }), /* @__PURE__ */ S.createElement(Zr.Provider, {
121
120
  value: Dr
122
- }, f)), Pr && /* @__PURE__ */ S.createElement("div", {
121
+ }, f)), Tr && /* @__PURE__ */ S.createElement("div", {
123
122
  "data-focus-guard": !0,
124
- tabIndex: l ? -1 : 0,
123
+ tabIndex: d ? -1 : 0,
125
124
  style: te
126
125
  }));
127
126
  });
128
127
  ve.propTypes = process.env.NODE_ENV !== "production" ? {
129
- children: v.node,
130
- disabled: v.bool,
131
- returnFocus: v.oneOfType([v.bool, v.object, v.func]),
132
- focusOptions: v.object,
133
- noFocusGuards: v.bool,
134
- hasPositiveIndices: v.bool,
135
- allowTextSelection: v.bool,
136
- autoFocus: v.bool,
137
- persistentFocus: v.bool,
138
- crossFrame: v.bool,
139
- group: v.string,
140
- className: v.string,
141
- whiteList: v.func,
142
- shards: v.arrayOf(v.any),
143
- as: v.oneOfType([v.string, v.func, v.object]),
144
- lockProps: v.object,
145
- onActivation: v.func,
146
- onDeactivation: v.func,
147
- sideCar: v.any.isRequired
128
+ children: l.node,
129
+ disabled: l.bool,
130
+ returnFocus: l.oneOfType([l.bool, l.object, l.func]),
131
+ focusOptions: l.object,
132
+ noFocusGuards: l.bool,
133
+ hasPositiveIndices: l.bool,
134
+ allowTextSelection: l.bool,
135
+ autoFocus: l.bool,
136
+ persistentFocus: l.bool,
137
+ crossFrame: l.bool,
138
+ group: l.string,
139
+ className: l.string,
140
+ whiteList: l.func,
141
+ shards: l.arrayOf(l.any),
142
+ as: l.oneOfType([l.string, l.func, l.object]),
143
+ lockProps: l.object,
144
+ onActivation: l.func,
145
+ onDeactivation: l.func,
146
+ sideCar: l.any.isRequired
148
147
  } : {};
149
148
  function ce(e, r) {
150
149
  return ce = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, t) {
151
150
  return n.__proto__ = t, n;
152
151
  }, ce(e, r);
153
152
  }
154
- function nn(e, r) {
153
+ function rn(e, r) {
155
154
  e.prototype = Object.create(r.prototype), e.prototype.constructor = e, ce(e, r);
156
155
  }
157
156
  function G(e) {
@@ -162,7 +161,7 @@ function G(e) {
162
161
  return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
163
162
  }, G(e);
164
163
  }
165
- function tn(e, r) {
164
+ function nn(e, r) {
166
165
  if (G(e) != "object" || !e) return e;
167
166
  var n = e[Symbol.toPrimitive];
168
167
  if (n !== void 0) {
@@ -172,19 +171,19 @@ function tn(e, r) {
172
171
  }
173
172
  return (r === "string" ? String : Number)(e);
174
173
  }
175
- function on(e) {
176
- var r = tn(e, "string");
174
+ function tn(e) {
175
+ var r = nn(e, "string");
177
176
  return G(r) == "symbol" ? r : r + "";
178
177
  }
179
- function un(e, r, n) {
180
- return (r = on(r)) in e ? Object.defineProperty(e, r, {
178
+ function on(e, r, n) {
179
+ return (r = tn(r)) in e ? Object.defineProperty(e, r, {
181
180
  value: n,
182
181
  enumerable: !0,
183
182
  configurable: !0,
184
183
  writable: !0
185
184
  }) : e[r] = n, e;
186
185
  }
187
- function an(e, r) {
186
+ function un(e, r) {
188
187
  if (process.env.NODE_ENV !== "production") {
189
188
  if (typeof e != "function")
190
189
  throw new Error("Expected reducePropsToState to be a function.");
@@ -198,32 +197,32 @@ function an(e, r) {
198
197
  if (process.env.NODE_ENV !== "production" && typeof o != "function")
199
198
  throw new Error("Expected WrappedComponent to be a React component.");
200
199
  var u = [], a;
201
- function i() {
202
- a = e(u.map(function(c) {
203
- return c.props;
200
+ function c() {
201
+ a = e(u.map(function(i) {
202
+ return i.props;
204
203
  })), r(a);
205
204
  }
206
- var m = /* @__PURE__ */ function(c) {
207
- nn(d, c);
208
- function d() {
209
- return c.apply(this, arguments) || this;
205
+ var v = /* @__PURE__ */ function(i) {
206
+ rn(h, i);
207
+ function h() {
208
+ return i.apply(this, arguments) || this;
210
209
  }
211
- d.peek = function() {
210
+ h.peek = function() {
212
211
  return a;
213
212
  };
214
- var s = d.prototype;
213
+ var s = h.prototype;
215
214
  return s.componentDidMount = function() {
216
- u.push(this), i();
215
+ u.push(this), c();
217
216
  }, s.componentDidUpdate = function() {
218
- i();
217
+ c();
219
218
  }, s.componentWillUnmount = function() {
220
- var p = u.indexOf(this);
221
- u.splice(p, 1), i();
219
+ var b = u.indexOf(this);
220
+ u.splice(b, 1), c();
222
221
  }, s.render = function() {
223
222
  return /* @__PURE__ */ S.createElement(o, this.props);
224
- }, d;
223
+ }, h;
225
224
  }(Wr);
226
- return un(m, "displayName", "SideEffect(" + n(o) + ")"), m;
225
+ return on(v, "displayName", "SideEffect(" + n(o) + ")"), v;
227
226
  };
228
227
  }
229
228
  var O = function(e) {
@@ -234,7 +233,7 @@ var O = function(e) {
234
233
  return Array.isArray(e) ? e : [e];
235
234
  }, qe = function(e) {
236
235
  return Array.isArray(e) ? e[0] : e;
237
- }, cn = function(e) {
236
+ }, an = function(e) {
238
237
  if (e.nodeType !== Node.ELEMENT_NODE)
239
238
  return !1;
240
239
  var r = window.getComputedStyle(e, null);
@@ -246,45 +245,45 @@ var O = function(e) {
246
245
  ) : e.parentNode;
247
246
  }, Ke = function(e) {
248
247
  return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
249
- }, fn = function(e) {
248
+ }, cn = function(e) {
250
249
  return e.hasAttribute("inert");
251
- }, sn = function(e, r) {
252
- return !e || Ke(e) || !cn(e) && !fn(e) && r($e(e));
250
+ }, fn = function(e, r) {
251
+ return !e || Ke(e) || !an(e) && !cn(e) && r($e(e));
253
252
  }, Xe = function(e, r) {
254
253
  var n = e.get(r);
255
254
  if (n !== void 0)
256
255
  return n;
257
- var t = sn(r, Xe.bind(void 0, e));
256
+ var t = fn(r, Xe.bind(void 0, e));
258
257
  return e.set(r, t), t;
259
- }, dn = function(e, r) {
260
- return e && !Ke(e) ? mn(e) ? r($e(e)) : !1 : !0;
258
+ }, sn = function(e, r) {
259
+ return e && !Ke(e) ? vn(e) ? r($e(e)) : !1 : !0;
261
260
  }, Ye = function(e, r) {
262
261
  var n = e.get(r);
263
262
  if (n !== void 0)
264
263
  return n;
265
- var t = dn(r, Ye.bind(void 0, e));
264
+ var t = sn(r, Ye.bind(void 0, e));
266
265
  return e.set(r, t), t;
267
266
  }, ze = function(e) {
268
267
  return e.dataset;
269
- }, ln = function(e) {
268
+ }, dn = function(e) {
270
269
  return e.tagName === "BUTTON";
271
270
  }, Je = function(e) {
272
271
  return e.tagName === "INPUT";
273
272
  }, Qe = function(e) {
274
273
  return Je(e) && e.type === "radio";
274
+ }, ln = function(e) {
275
+ return !((Je(e) || dn(e)) && (e.type === "hidden" || e.disabled));
275
276
  }, vn = function(e) {
276
- return !((Je(e) || ln(e)) && (e.type === "hidden" || e.disabled));
277
- }, mn = function(e) {
278
- var r = e.getAttribute(Jr);
277
+ var r = e.getAttribute(zr);
279
278
  return ![!0, "true", ""].includes(r);
280
279
  }, me = function(e) {
281
280
  var r;
282
281
  return !!(e && (!((r = ze(e)) === null || r === void 0) && r.focusGuard));
283
282
  }, fe = function(e) {
284
283
  return !me(e);
285
- }, bn = function(e) {
284
+ }, mn = function(e) {
286
285
  return !!e;
287
- }, pn = function(e, r) {
286
+ }, bn = function(e, r) {
288
287
  var n = Math.max(0, e.tabIndex), t = Math.max(0, r.tabIndex), o = n - t, u = e.index - r.index;
289
288
  if (o) {
290
289
  if (!n)
@@ -293,11 +292,11 @@ var O = function(e) {
293
292
  return -1;
294
293
  }
295
294
  return o || u;
296
- }, yn = function(e) {
295
+ }, pn = function(e) {
297
296
  return e.tabIndex < 0 && !e.hasAttribute("tabindex") ? 0 : e.tabIndex;
298
297
  }, be = function(e, r, n) {
299
298
  return O(e).map(function(t, o) {
300
- var u = yn(t);
299
+ var u = pn(t);
301
300
  return {
302
301
  node: t,
303
302
  index: o,
@@ -305,8 +304,8 @@ var O = function(e) {
305
304
  };
306
305
  }).filter(function(t) {
307
306
  return !r || t.tabIndex >= 0;
308
- }).sort(pn);
309
- }, hn = [
307
+ }).sort(bn);
308
+ }, yn = [
310
309
  "button:enabled",
311
310
  "select:enabled",
312
311
  "textarea:enabled",
@@ -324,29 +323,29 @@ var O = function(e) {
324
323
  "[tabindex]",
325
324
  "[contenteditable]",
326
325
  "[autofocus]"
327
- ], pe = hn.join(","), gn = "".concat(pe, ", [data-focus-guard]"), Ze = function(e, r) {
326
+ ], pe = yn.join(","), hn = "".concat(pe, ", [data-focus-guard]"), Ze = function(e, r) {
328
327
  return O((e.shadowRoot || e).children).reduce(function(n, t) {
329
- return n.concat(t.matches(r ? gn : pe) ? [t] : [], Ze(t));
328
+ return n.concat(t.matches(r ? hn : pe) ? [t] : [], Ze(t));
330
329
  }, []);
331
- }, Fn = function(e, r) {
330
+ }, gn = function(e, r) {
332
331
  var n;
333
332
  return e instanceof HTMLIFrameElement && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? C([e.contentDocument.body], r) : [e];
334
333
  }, C = function(e, r) {
335
334
  return e.reduce(function(n, t) {
336
- var o, u = Ze(t, r), a = (o = []).concat.apply(o, u.map(function(i) {
337
- return Fn(i, r);
335
+ var o, u = Ze(t, r), a = (o = []).concat.apply(o, u.map(function(c) {
336
+ return gn(c, r);
338
337
  }));
339
338
  return n.concat(
340
339
  // add all tabbables inside and within shadow DOMs in DOM order
341
340
  a,
342
341
  // add if node is tabbable itself
343
- t.parentNode ? O(t.parentNode.querySelectorAll(pe)).filter(function(i) {
344
- return i === t;
342
+ t.parentNode ? O(t.parentNode.querySelectorAll(pe)).filter(function(c) {
343
+ return c === t;
345
344
  }) : []
346
345
  );
347
346
  }, []);
348
- }, xn = function(e) {
349
- var r = e.querySelectorAll("[".concat(zr, "]"));
347
+ }, Fn = function(e) {
348
+ var r = e.querySelectorAll("[".concat(Yr, "]"));
350
349
  return O(r).map(function(n) {
351
350
  return C([n]);
352
351
  }).reduce(function(n, t) {
@@ -356,7 +355,7 @@ var O = function(e) {
356
355
  return O(e).filter(function(n) {
357
356
  return Xe(r, n);
358
357
  }).filter(function(n) {
359
- return vn(n);
358
+ return ln(n);
360
359
  });
361
360
  }, _e = function(e, r) {
362
361
  return r === void 0 && (r = /* @__PURE__ */ new Map()), O(e).filter(function(n) {
@@ -366,25 +365,25 @@ var O = function(e) {
366
365
  return be(ye(C(e, n), r), !0, n);
367
366
  }, H = function(e, r) {
368
367
  return be(ye(C(e), r), !1);
369
- }, En = function(e, r) {
370
- return ye(xn(e), r);
371
- }, P = function(e, r) {
372
- return e.shadowRoot ? P(e.shadowRoot, r) : Object.getPrototypeOf(e).contains !== void 0 && Object.getPrototypeOf(e).contains.call(e, r) ? !0 : O(e.children).some(function(n) {
368
+ }, xn = function(e, r) {
369
+ return ye(Fn(e), r);
370
+ }, T = function(e, r) {
371
+ return e.shadowRoot ? T(e.shadowRoot, r) : Object.getPrototypeOf(e).contains !== void 0 && Object.getPrototypeOf(e).contains.call(e, r) ? !0 : O(e.children).some(function(n) {
373
372
  var t;
374
373
  if (n instanceof HTMLIFrameElement) {
375
374
  var o = (t = n.contentDocument) === null || t === void 0 ? void 0 : t.body;
376
- return o ? P(o, r) : !1;
375
+ return o ? T(o, r) : !1;
377
376
  }
378
- return P(n, r);
377
+ return T(n, r);
379
378
  });
380
- }, On = function(e) {
379
+ }, En = function(e) {
381
380
  for (var r = /* @__PURE__ */ new Set(), n = e.length, t = 0; t < n; t += 1)
382
381
  for (var o = t + 1; o < n; o += 1) {
383
382
  var u = e[t].compareDocumentPosition(e[o]);
384
383
  (u & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && r.add(o), (u & Node.DOCUMENT_POSITION_CONTAINS) > 0 && r.add(t);
385
384
  }
386
- return e.filter(function(a, i) {
387
- return !r.has(i);
385
+ return e.filter(function(a, c) {
386
+ return !r.has(c);
388
387
  });
389
388
  }, er = function(e) {
390
389
  return e.parentNode ? er(e.parentNode) : e;
@@ -392,9 +391,9 @@ var O = function(e) {
392
391
  var r = A(e);
393
392
  return r.filter(Boolean).reduce(function(n, t) {
394
393
  var o = t.getAttribute(ie);
395
- return n.push.apply(n, o ? On(O(er(t).querySelectorAll("[".concat(ie, '="').concat(o, '"]:not([').concat(He, '="disabled"])')))) : [t]), n;
394
+ return n.push.apply(n, o ? En(O(er(t).querySelectorAll("[".concat(ie, '="').concat(o, '"]:not([').concat(He, '="disabled"])')))) : [t]), n;
396
395
  }, []);
397
- }, wn = function(e) {
396
+ }, On = function(e) {
398
397
  try {
399
398
  return e();
400
399
  } catch {
@@ -403,34 +402,34 @@ var O = function(e) {
403
402
  }, j = function(e) {
404
403
  if (e === void 0 && (e = document), !(!e || !e.activeElement)) {
405
404
  var r = e.activeElement;
406
- return r.shadowRoot ? j(r.shadowRoot) : r instanceof HTMLIFrameElement && wn(function() {
405
+ return r.shadowRoot ? j(r.shadowRoot) : r instanceof HTMLIFrameElement && On(function() {
407
406
  return r.contentWindow.document;
408
407
  }) ? j(r.contentWindow.document) : r;
409
408
  }
410
- }, In = function(e, r) {
409
+ }, wn = function(e, r) {
411
410
  return e === r;
412
- }, Sn = function(e, r) {
411
+ }, In = function(e, r) {
413
412
  return !!O(e.querySelectorAll("iframe")).some(function(n) {
414
- return In(n, r);
413
+ return wn(n, r);
415
414
  });
416
415
  }, rr = function(e, r) {
417
416
  return r === void 0 && (r = j(qe(e).ownerDocument)), !r || r.dataset && r.dataset.focusGuard ? !1 : ge(e).some(function(n) {
418
- return P(n, r) || Sn(n, r);
417
+ return T(n, r) || In(n, r);
419
418
  });
420
- }, Nn = function(e) {
419
+ }, Sn = function(e) {
421
420
  e === void 0 && (e = document);
422
421
  var r = j(e);
423
- return r ? O(e.querySelectorAll("[".concat(Yr, "]"))).some(function(n) {
424
- return P(n, r);
422
+ return r ? O(e.querySelectorAll("[".concat(Xr, "]"))).some(function(n) {
423
+ return T(n, r);
425
424
  }) : !1;
426
- }, Tn = function(e, r) {
425
+ }, Nn = function(e, r) {
427
426
  return r.filter(Qe).filter(function(n) {
428
427
  return n.name === e.name;
429
428
  }).filter(function(n) {
430
429
  return n.checked;
431
430
  })[0] || e;
432
431
  }, Fe = function(e, r) {
433
- return Qe(e) && e.name ? Tn(e, r) : e;
432
+ return Qe(e) && e.name ? Nn(e, r) : e;
434
433
  }, Pn = function(e) {
435
434
  var r = /* @__PURE__ */ new Set();
436
435
  return e.forEach(function(n) {
@@ -442,19 +441,19 @@ var O = function(e) {
442
441
  return e[0] && e.length > 1 ? Fe(e[0], e) : e[0];
443
442
  }, Le = function(e, r) {
444
443
  return e.indexOf(Fe(r, e));
445
- }, se = "NEW_FOCUS", An = function(e, r, n, t, o) {
446
- var u = e.length, a = e[0], i = e[u - 1], m = me(t);
444
+ }, se = "NEW_FOCUS", Tn = function(e, r, n, t, o) {
445
+ var u = e.length, a = e[0], c = e[u - 1], v = me(t);
447
446
  if (!(t && e.indexOf(t) >= 0)) {
448
- var c = t !== void 0 ? n.indexOf(t) : -1, d = o ? n.indexOf(o) : c, s = o ? e.indexOf(o) : -1;
449
- if (c === -1)
447
+ var i = t !== void 0 ? n.indexOf(t) : -1, h = o ? n.indexOf(o) : i, s = o ? e.indexOf(o) : -1;
448
+ if (i === -1)
450
449
  return s !== -1 ? s : se;
451
450
  if (s === -1)
452
451
  return se;
453
- var f = c - d, p = n.indexOf(a), l = n.indexOf(i), b = Pn(n), g = t !== void 0 ? b.indexOf(t) : -1, x = o ? b.indexOf(o) : g, y = b.filter(function(z) {
452
+ var f = i - h, b = n.indexOf(a), d = n.indexOf(c), m = Pn(n), g = t !== void 0 ? m.indexOf(t) : -1, x = o ? m.indexOf(o) : g, p = m.filter(function(z) {
454
453
  return z.tabIndex >= 0;
455
- }), h = t !== void 0 ? y.indexOf(t) : -1, E = o ? y.indexOf(o) : h, w = h >= 0 && E >= 0 ? (
454
+ }), y = t !== void 0 ? p.indexOf(t) : -1, E = o ? p.indexOf(o) : y, w = y >= 0 && E >= 0 ? (
456
455
  // old/new are tabbables, measure distance in tabbable space
457
- E - h
456
+ E - y
458
457
  ) : (
459
458
  // or else measure in focusable space
460
459
  x - g
@@ -462,20 +461,20 @@ var O = function(e) {
462
461
  if (!f && s >= 0 || r.length === 0)
463
462
  return s;
464
463
  var D = Le(e, r[0]), q = Le(e, r[r.length - 1]);
465
- if (c <= p && m && Math.abs(f) > 1)
464
+ if (i <= b && v && Math.abs(f) > 1)
466
465
  return q;
467
- if (c >= l && m && Math.abs(f) > 1)
466
+ if (i >= d && v && Math.abs(f) > 1)
468
467
  return D;
469
468
  if (f && Math.abs(w) > 1)
470
469
  return s;
471
- if (c <= p)
470
+ if (i <= b)
472
471
  return q;
473
- if (c > l)
472
+ if (i > d)
474
473
  return D;
475
474
  if (f)
476
475
  return Math.abs(f) > 1 ? s : (u + s + f) % u;
477
476
  }
478
- }, Dn = function(e) {
477
+ }, An = function(e) {
479
478
  return function(r) {
480
479
  var n, t = (n = ze(r)) === null || n === void 0 ? void 0 : n.autofocus;
481
480
  return (
@@ -489,7 +488,7 @@ var O = function(e) {
489
488
  var t = e.map(function(u) {
490
489
  var a = u.node;
491
490
  return a;
492
- }), o = _e(t.filter(Dn(n)));
491
+ }), o = _e(t.filter(An(n)));
493
492
  return o && o.length ? ke(o) : ke(_e(r));
494
493
  }, de = function(e, r) {
495
494
  return r === void 0 && (r = []), r.push(e), e.parentNode && de(e.parentNode.host || e.parentNode, r), r;
@@ -502,61 +501,61 @@ var O = function(e) {
502
501
  return !1;
503
502
  }, nr = function(e, r, n) {
504
503
  var t = A(e), o = A(r), u = t[0], a = !1;
505
- return o.filter(Boolean).forEach(function(i) {
506
- a = oe(a || i, i) || a, n.filter(Boolean).forEach(function(m) {
507
- var c = oe(u, m);
508
- c && (!a || P(c, a) ? a = c : a = oe(c, a));
504
+ return o.filter(Boolean).forEach(function(c) {
505
+ a = oe(a || c, c) || a, n.filter(Boolean).forEach(function(v) {
506
+ var i = oe(u, v);
507
+ i && (!a || T(i, a) ? a = i : a = oe(i, a));
509
508
  });
510
509
  }), a;
511
510
  }, Ce = function(e, r) {
512
511
  return e.reduce(function(n, t) {
513
- return n.concat(En(t, r));
512
+ return n.concat(xn(t, r));
514
513
  }, []);
515
- }, Mn = function(e, r) {
514
+ }, Dn = function(e, r) {
516
515
  var n = /* @__PURE__ */ new Map();
517
516
  return r.forEach(function(t) {
518
517
  return n.set(t.node, t);
519
518
  }), e.map(function(t) {
520
519
  return n.get(t);
521
- }).filter(bn);
522
- }, _n = function(e, r) {
523
- var n = j(A(e).length > 0 ? document : qe(e).ownerDocument), t = ge(e).filter(fe), o = nr(n || e, e, t), u = /* @__PURE__ */ new Map(), a = H(t, u), i = a.filter(function(l) {
524
- var b = l.node;
525
- return fe(b);
520
+ }).filter(mn);
521
+ }, Mn = function(e, r) {
522
+ var n = j(A(e).length > 0 ? document : qe(e).ownerDocument), t = ge(e).filter(fe), o = nr(n || e, e, t), u = /* @__PURE__ */ new Map(), a = H(t, u), c = a.filter(function(d) {
523
+ var m = d.node;
524
+ return fe(m);
526
525
  });
527
- if (i[0]) {
528
- var m = H([o], u).map(function(l) {
529
- var b = l.node;
530
- return b;
531
- }), c = Mn(m, i), d = c.map(function(l) {
532
- var b = l.node;
533
- return b;
534
- }), s = c.filter(function(l) {
535
- var b = l.tabIndex;
536
- return b >= 0;
537
- }).map(function(l) {
538
- var b = l.node;
539
- return b;
540
- }), f = An(d, s, m, n, r);
526
+ if (c[0]) {
527
+ var v = H([o], u).map(function(d) {
528
+ var m = d.node;
529
+ return m;
530
+ }), i = Dn(v, c), h = i.map(function(d) {
531
+ var m = d.node;
532
+ return m;
533
+ }), s = i.filter(function(d) {
534
+ var m = d.tabIndex;
535
+ return m >= 0;
536
+ }).map(function(d) {
537
+ var m = d.node;
538
+ return m;
539
+ }), f = Tn(h, s, v, n, r);
541
540
  if (f === se) {
542
- var p = (
541
+ var b = (
543
542
  // first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
544
- Re(a, s, Ce(t, u)) || Re(a, d, Ce(t, u))
543
+ Re(a, s, Ce(t, u)) || Re(a, h, Ce(t, u))
545
544
  );
546
- if (p)
547
- return { node: p };
545
+ if (b)
546
+ return { node: b };
548
547
  console.warn("focus-lock: cannot find any node to move focus into");
549
548
  return;
550
549
  }
551
- return f === void 0 ? f : c[f];
550
+ return f === void 0 ? f : i[f];
552
551
  }
553
- }, kn = function(e) {
552
+ }, _n = function(e) {
554
553
  var r = ge(e).filter(fe), n = nr(e, e, r), t = be(C([n], !0), !0, !0), o = C(r, !1);
555
554
  return t.map(function(u) {
556
- var a = u.node, i = u.index;
555
+ var a = u.node, c = u.index;
557
556
  return {
558
557
  node: a,
559
- index: i,
558
+ index: c,
560
559
  lockItem: o.indexOf(a) >= 0,
561
560
  guard: me(a)
562
561
  };
@@ -565,7 +564,7 @@ var O = function(e) {
565
564
  e && ("focus" in e && e.focus(r), "contentWindow" in e && e.contentWindow && e.contentWindow.focus());
566
565
  }, ue = 0, ae = !1, tr = function(e, r, n) {
567
566
  n === void 0 && (n = {});
568
- var t = _n(e, r);
567
+ var t = Mn(e, r);
569
568
  if (!ae && t) {
570
569
  if (ue > 2) {
571
570
  console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), ae = !0, setTimeout(function() {
@@ -588,7 +587,7 @@ function B(e) {
588
587
  return (r == null ? void 0 : r.deref()) || null;
589
588
  };
590
589
  }
591
- var Ln = function(e) {
590
+ var kn = function(e) {
592
591
  if (!e)
593
592
  return null;
594
593
  for (var r = [], n = e; n && n !== document.body; )
@@ -603,50 +602,50 @@ var Ln = function(e) {
603
602
  stack: r,
604
603
  ownerDocument: e.ownerDocument
605
604
  };
606
- }, Rn = function(e) {
605
+ }, Ln = function(e) {
607
606
  var r, n, t, o, u;
608
607
  if (e)
609
- for (var a = e.stack, i = e.ownerDocument, m = /* @__PURE__ */ new Map(), c = 0, d = a; c < d.length; c++) {
610
- var s = d[c], f = (r = s.parent) === null || r === void 0 ? void 0 : r.call(s);
611
- if (f && i.contains(f)) {
612
- for (var p = (n = s.left) === null || n === void 0 ? void 0 : n.call(s), l = s.current(), b = f.contains(l) ? l : void 0, g = (t = s.right) === null || t === void 0 ? void 0 : t.call(s), x = he([f], m), y = (
608
+ for (var a = e.stack, c = e.ownerDocument, v = /* @__PURE__ */ new Map(), i = 0, h = a; i < h.length; i++) {
609
+ var s = h[i], f = (r = s.parent) === null || r === void 0 ? void 0 : r.call(s);
610
+ if (f && c.contains(f)) {
611
+ for (var b = (n = s.left) === null || n === void 0 ? void 0 : n.call(s), d = s.current(), m = f.contains(d) ? d : void 0, g = (t = s.right) === null || t === void 0 ? void 0 : t.call(s), x = he([f], v), p = (
613
612
  // that is element itself
614
- (u = (o = b ?? // or something in it's place
615
- (p == null ? void 0 : p.nextElementSibling)) !== null && o !== void 0 ? o : (
613
+ (u = (o = m ?? // or something in it's place
614
+ (b == null ? void 0 : b.nextElementSibling)) !== null && o !== void 0 ? o : (
616
615
  // or somebody to the right, still close enough
617
616
  g
618
617
  )) !== null && u !== void 0 ? u : (
619
618
  // or somebody to the left, something?
620
- p
619
+ b
621
620
  )
622
- ); y; ) {
623
- for (var h = 0, E = x; h < E.length; h++) {
624
- var w = E[h];
625
- if (y != null && y.contains(w.node))
621
+ ); p; ) {
622
+ for (var y = 0, E = x; y < E.length; y++) {
623
+ var w = E[y];
624
+ if (p != null && p.contains(w.node))
626
625
  return w.node;
627
626
  }
628
- y = y.nextElementSibling;
627
+ p = p.nextElementSibling;
629
628
  }
630
629
  if (x.length)
631
630
  return x[0].node;
632
631
  }
633
632
  }
634
633
  }, or = function(e) {
635
- var r = Ln(e);
634
+ var r = kn(e);
636
635
  return function() {
637
- return Rn(r);
636
+ return Ln(r);
638
637
  };
639
- }, Cn = function(e, r, n) {
638
+ }, Rn = function(e, r, n) {
640
639
  if (!e || !r)
641
640
  return console.error("no element or scope given"), {};
642
641
  var t = A(r);
643
642
  if (t.every(function(a) {
644
- return !P(a, e);
643
+ return !T(a, e);
645
644
  }))
646
645
  return console.error("Active element is not contained in the scope"), {};
647
646
  var o = n ? he(t, /* @__PURE__ */ new Map()) : H(t, /* @__PURE__ */ new Map()), u = o.findIndex(function(a) {
648
- var i = a.node;
649
- return i === e;
647
+ var c = a.node;
648
+ return c === e;
650
649
  });
651
650
  if (u !== -1)
652
651
  return {
@@ -655,13 +654,13 @@ var Ln = function(e) {
655
654
  first: o[0],
656
655
  last: o[o.length - 1]
657
656
  };
658
- }, Wn = function(e, r) {
657
+ }, Cn = function(e, r) {
659
658
  var n = r ? he(A(e), /* @__PURE__ */ new Map()) : H(A(e), /* @__PURE__ */ new Map());
660
659
  return {
661
660
  first: n[0],
662
661
  last: n[n.length - 1]
663
662
  };
664
- }, Bn = function(e) {
663
+ }, Wn = function(e) {
665
664
  return Object.assign({
666
665
  scope: document.body,
667
666
  cycle: !0,
@@ -669,50 +668,50 @@ var Ln = function(e) {
669
668
  }, e);
670
669
  }, ur = function(e, r, n) {
671
670
  r === void 0 && (r = {});
672
- var t = Bn(r), o = Cn(e, t.scope, t.onlyTabbable);
671
+ var t = Wn(r), o = Rn(e, t.scope, t.onlyTabbable);
673
672
  if (o) {
674
673
  var u = n(o, t.cycle);
675
674
  u && xe(u.node, t.focusOptions);
676
675
  }
677
- }, Un = function(e, r) {
676
+ }, Bn = function(e, r) {
678
677
  r === void 0 && (r = {}), ur(e, r, function(n, t) {
679
678
  var o = n.next, u = n.first;
680
679
  return o || t && u;
681
680
  });
682
- }, Gn = function(e, r) {
681
+ }, Un = function(e, r) {
683
682
  r === void 0 && (r = {}), ur(e, r, function(n, t) {
684
683
  var o = n.prev, u = n.last;
685
684
  return o || t && u;
686
685
  });
687
686
  }, ar = function(e, r, n) {
688
- var t, o = Wn(e, (t = r.onlyTabbable) !== null && t !== void 0 ? t : !0), u = o[n];
687
+ var t, o = Cn(e, (t = r.onlyTabbable) !== null && t !== void 0 ? t : !0), u = o[n];
689
688
  u && xe(u.node, r.focusOptions);
690
- }, Hn = function(e, r) {
689
+ }, Gn = function(e, r) {
691
690
  r === void 0 && (r = {}), ar(e, r, "first");
692
- }, jn = function(e, r) {
691
+ }, Hn = function(e, r) {
693
692
  r === void 0 && (r = {}), ar(e, r, "last");
694
693
  };
695
694
  function Ee(e) {
696
695
  setTimeout(e, 1);
697
696
  }
698
- var Vn = function(r) {
697
+ var jn = function(r) {
699
698
  return r && "current" in r ? r.current : r;
700
699
  }, ir = function() {
701
700
  return document && document.activeElement === document.body;
702
- }, qn = function() {
703
- return ir() || Nn();
701
+ }, Vn = function() {
702
+ return ir() || Sn();
704
703
  }, L = null, F = null, We = function() {
705
704
  return null;
706
- }, R = null, V = !1, Oe = !1, $n = function() {
705
+ }, R = null, V = !1, Oe = !1, qn = function() {
707
706
  return !0;
708
- }, Kn = function(r) {
709
- return (L.whiteList || $n)(r);
710
- }, Xn = function(r, n) {
707
+ }, $n = function(r) {
708
+ return (L.whiteList || qn)(r);
709
+ }, Kn = function(r, n) {
711
710
  R = {
712
711
  observerNode: r,
713
712
  portaledElement: n
714
713
  };
715
- }, Yn = function(r) {
714
+ }, Xn = function(r) {
716
715
  return R && R.portaledElement === r;
717
716
  };
718
717
  function Be(e, r, n, t) {
@@ -730,52 +729,52 @@ function Be(e, r, n, t) {
730
729
  } while ((u += n) !== r);
731
730
  o && (o.node.tabIndex = 0);
732
731
  }
733
- var zn = function(r) {
732
+ var Yn = function(r) {
734
733
  return r ? !!V : V === "meanwhile";
735
- }, Jn = function e(r, n, t) {
734
+ }, zn = function e(r, n, t) {
736
735
  return n && (n.host === r && (!n.activeElement || t.contains(n.activeElement)) || n.parentNode && e(r, n.parentNode, t));
737
- }, Qn = function(r, n) {
736
+ }, Jn = function(r, n) {
738
737
  return n.some(function(t) {
739
- return Jn(r, t, t);
738
+ return zn(r, t, t);
740
739
  });
741
740
  }, cr = function(r) {
742
741
  return H(r, /* @__PURE__ */ new Map());
743
- }, Zn = function(r) {
742
+ }, Qn = function(r) {
744
743
  return !cr([r.parentNode]).some(function(n) {
745
744
  return n.node === r;
746
745
  });
747
746
  }, Y = function() {
748
747
  var r = !1;
749
748
  if (L) {
750
- var n = L, t = n.observed, o = n.persistentFocus, u = n.autoFocus, a = n.shards, i = n.crossFrame, m = n.focusOptions, c = n.noFocusGuards, d = t || R && R.portaledElement;
751
- if (ir() && F && F !== document.body && (!document.body.contains(F) || Zn(F))) {
749
+ var n = L, t = n.observed, o = n.persistentFocus, u = n.autoFocus, a = n.shards, c = n.crossFrame, v = n.focusOptions, i = n.noFocusGuards, h = t || R && R.portaledElement;
750
+ if (ir() && F && F !== document.body && (!document.body.contains(F) || Qn(F))) {
752
751
  var s = We();
753
752
  s && s.focus();
754
753
  }
755
754
  var f = document && document.activeElement;
756
- if (d) {
757
- var p = [d].concat(a.map(Vn).filter(Boolean)), l = function() {
758
- if (!zn(i) || !c || !F || Oe)
755
+ if (h) {
756
+ var b = [h].concat(a.map(jn).filter(Boolean)), d = function() {
757
+ if (!Yn(c) || !i || !F || Oe)
759
758
  return !1;
760
- var h = cr(p), E = h.findIndex(function(w) {
759
+ var y = cr(b), E = y.findIndex(function(w) {
761
760
  var D = w.node;
762
761
  return D === F;
763
762
  });
764
- return E === 0 || E === h.length - 1;
763
+ return E === 0 || E === y.length - 1;
765
764
  };
766
- if ((!f || Kn(f)) && (o || l() || !qn() || !F && u) && (d && !(rr(p) || f && Qn(f, p) || Yn(f)) && (document && !F && f && !u ? (f.blur && f.blur(), document.body.focus()) : (r = tr(p, F, {
767
- focusOptions: m
765
+ if ((!f || $n(f)) && (o || d() || !Vn() || !F && u) && (h && !(rr(b) || f && Jn(f, b) || Xn(f)) && (document && !F && f && !u ? (f.blur && f.blur(), document.body.focus()) : (r = tr(b, F, {
766
+ focusOptions: v
768
767
  }), R = {})), F = document && document.activeElement, F !== document.body && (We = or(F)), V = !1), document && f !== document.activeElement && document.querySelector("[data-focus-auto-guard]")) {
769
- var b = document && document.activeElement, g = kn(p), x = g.map(function(y) {
770
- var h = y.node;
771
- return h;
772
- }).indexOf(b);
773
- x > -1 && (g.filter(function(y) {
774
- var h = y.guard, E = y.node;
775
- return h && E.dataset.focusAutoGuard;
776
- }).forEach(function(y) {
777
- var h = y.node;
778
- return h.removeAttribute("tabIndex");
768
+ var m = document && document.activeElement, g = _n(b), x = g.map(function(p) {
769
+ var y = p.node;
770
+ return y;
771
+ }).indexOf(m);
772
+ x > -1 && (g.filter(function(p) {
773
+ var y = p.guard, E = p.node;
774
+ return y && E.dataset.focusAutoGuard;
775
+ }).forEach(function(p) {
776
+ var y = p.node;
777
+ return y.removeAttribute("tabIndex");
779
778
  }), Be(x, g.length, 1, g), Be(x, -1, -1, g));
780
779
  }
781
780
  }
@@ -785,10 +784,10 @@ var zn = function(r) {
785
784
  Y() && r && (r.stopPropagation(), r.preventDefault());
786
785
  }, we = function() {
787
786
  return Ee(Y);
788
- }, et = function(r) {
787
+ }, Zn = function(r) {
789
788
  var n = r.target, t = r.currentTarget;
790
- t.contains(n) || Xn(t, n);
791
- }, rt = function() {
789
+ t.contains(n) || Kn(t, n);
790
+ }, et = function() {
792
791
  return null;
793
792
  }, sr = function() {
794
793
  Oe = !0;
@@ -796,12 +795,12 @@ var zn = function(r) {
796
795
  Oe = !1, V = "just", Ee(function() {
797
796
  V = "meanwhile";
798
797
  });
799
- }, nt = function() {
798
+ }, rt = function() {
800
799
  document.addEventListener("focusin", fr), document.addEventListener("focusout", we), window.addEventListener("focus", sr), window.addEventListener("blur", dr);
801
- }, tt = function() {
800
+ }, nt = function() {
802
801
  document.removeEventListener("focusin", fr), document.removeEventListener("focusout", we), window.removeEventListener("focus", sr), window.removeEventListener("blur", dr);
803
802
  };
804
- function ot(e) {
803
+ function tt(e) {
805
804
  return e.filter(function(r) {
806
805
  var n = r.disabled;
807
806
  return !n;
@@ -810,96 +809,101 @@ function ot(e) {
810
809
  var lr = {
811
810
  moveFocusInside: tr,
812
811
  focusInside: rr,
813
- focusNextElement: Un,
814
- focusPrevElement: Gn,
815
- focusFirstElement: Hn,
816
- focusLastElement: jn,
812
+ focusNextElement: Bn,
813
+ focusPrevElement: Un,
814
+ focusFirstElement: Gn,
815
+ focusLastElement: Hn,
817
816
  captureFocusRestore: or
818
817
  };
819
- function ut(e) {
818
+ function ot(e) {
820
819
  var r = e.slice(-1)[0];
821
- r && !L && nt();
820
+ r && !L && rt();
822
821
  var n = L, t = n && r && r.id === n.id;
823
822
  L = r, n && !t && (n.onDeactivation(), e.filter(function(o) {
824
823
  var u = o.id;
825
824
  return u === n.id;
826
- }).length || n.returnFocus(!r)), r ? (F = null, (!t || n.observed !== r.observed) && r.onActivation(lr), Y(), Ee(Y)) : (tt(), F = null);
825
+ }).length || n.returnFocus(!r)), r ? (F = null, (!t || n.observed !== r.observed) && r.onActivation(lr), Y(), Ee(Y)) : (nt(), F = null);
827
826
  }
828
- je.assignSyncMedium(et);
827
+ je.assignSyncMedium(Zn);
829
828
  Ve.assignMedium(we);
830
- Qr.assignMedium(function(e) {
829
+ Jr.assignMedium(function(e) {
831
830
  return e(lr);
832
831
  });
833
- const at = an(ot, ut)(rt);
832
+ const ut = un(tt, ot)(et);
834
833
  var vr = /* @__PURE__ */ Ue(function(r, n) {
835
834
  return /* @__PURE__ */ S.createElement(ve, U({
836
- sideCar: at,
835
+ sideCar: ut,
837
836
  ref: n
838
837
  }, r));
839
- }), it = ve.propTypes || {}, ct = Xr(it, ["sideCar"]);
840
- vr.propTypes = process.env.NODE_ENV !== "production" ? ct : {};
841
- const ft = ({
838
+ }), at = ve.propTypes || {}, it = Kr(at, ["sideCar"]);
839
+ vr.propTypes = process.env.NODE_ENV !== "production" ? it : {};
840
+ const ct = ({
842
841
  children: e,
843
842
  theme: r,
844
843
  className: n,
845
844
  buttonCloseClassName: t,
846
845
  onClose: o
847
846
  }) => {
848
- const { theme: u } = Kr(), a = K.toArray(e).find(
849
- (d) => X(d) && d.type === N.Header
850
- ), i = K.toArray(e).find(
851
- (d) => X(d) && d.type === N.Body
852
- ), m = K.toArray(e).find(
853
- (d) => X(d) && d.type === N.Footer
854
- ), c = K.toArray(e).filter(
855
- (d) => !X(d) || ![N.Header, N.Body, N.Footer].includes(
856
- d.type
847
+ const u = K.toArray(e).find(
848
+ (i) => X(i) && i.type === N.Header
849
+ ), a = K.toArray(e).find(
850
+ (i) => X(i) && i.type === N.Body
851
+ ), c = K.toArray(e).find(
852
+ (i) => X(i) && i.type === N.Footer
853
+ ), v = K.toArray(e).filter(
854
+ (i) => !X(i) || ![N.Header, N.Body, N.Footer].includes(
855
+ i.type
857
856
  )
858
857
  );
859
- return /* @__PURE__ */ k(vr, { returnFocus: !0, children: /* @__PURE__ */ k(jr, { children: /* @__PURE__ */ ee("div", { className: "fixed inset-0 grid place-content-center", children: [
860
- /* @__PURE__ */ k(
861
- "div",
862
- {
863
- className: "absolute inset-0 bg-black opacity-75",
864
- onClick: o,
865
- role: "presentation"
866
- }
867
- ),
868
- /* @__PURE__ */ ee(
869
- "div",
870
- {
871
- className: Me(
872
- qr({
873
- className: n,
874
- theme: r ?? u
875
- })
858
+ return /* @__PURE__ */ k(vr, { returnFocus: !0, children: /* @__PURE__ */ k(jr, { children: /* @__PURE__ */ ee(
859
+ "div",
860
+ {
861
+ className: "fixed inset-0 grid place-content-center",
862
+ "data-theme": r,
863
+ children: [
864
+ /* @__PURE__ */ k(
865
+ "div",
866
+ {
867
+ className: "absolute inset-0 bg-black opacity-75 animate-in fade-in-0",
868
+ onClick: o,
869
+ role: "presentation"
870
+ }
876
871
  ),
877
- role: "dialog",
878
- "aria-modal": "true",
879
- children: [
880
- a,
881
- /* @__PURE__ */ ee(
882
- "button",
883
- {
884
- className: Me(
885
- Vr({
886
- className: t,
887
- theme: r ?? u
888
- })
872
+ /* @__PURE__ */ ee(
873
+ "div",
874
+ {
875
+ className: Me(
876
+ qr({
877
+ className: n
878
+ })
879
+ ),
880
+ role: "dialog",
881
+ "aria-modal": "true",
882
+ children: [
883
+ u,
884
+ /* @__PURE__ */ ee(
885
+ "button",
886
+ {
887
+ className: Me(
888
+ Vr({
889
+ className: t
890
+ })
891
+ ),
892
+ onClick: o,
893
+ children: [
894
+ /* @__PURE__ */ k($r, {}),
895
+ /* @__PURE__ */ k(Ur, { children: "Dismiss modal" })
896
+ ]
897
+ }
889
898
  ),
890
- onClick: o,
891
- children: [
892
- /* @__PURE__ */ k($r, {}),
893
- /* @__PURE__ */ k(Ur, { children: "Dismiss modal" })
894
- ]
895
- }
896
- ),
897
- i ?? c,
898
- m
899
- ]
900
- }
901
- )
902
- ] }) }) });
899
+ a ?? v,
900
+ c
901
+ ]
902
+ }
903
+ )
904
+ ]
905
+ }
906
+ ) }) });
903
907
  }, N = ({ isOpen: e, onClose: r, ...n }) => (Ge(() => {
904
908
  const t = new AbortController(), o = (u) => {
905
909
  u.code === "Escape" && (r == null || r());
@@ -910,7 +914,7 @@ const ft = ({
910
914
  t.abort();
911
915
  };
912
916
  }, [r]), e ? Br.createPortal(
913
- /* @__PURE__ */ k(ft, { ...n, onClose: r }),
917
+ /* @__PURE__ */ k(ct, { ...n, onClose: r }),
914
918
  document.body
915
919
  ) : null);
916
920
  N.Header = kr;
@@ -918,5 +922,5 @@ N.Body = Mr;
918
922
  N.Footer = _r;
919
923
  export {
920
924
  N as M,
921
- ft as W
925
+ ct as W
922
926
  };