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