@konstructio/ui 0.0.12-alpha.1 → 0.0.12

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