@konstructio/ui 0.0.12-alpha.0 → 0.0.12-alpha.10

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