@konstructio/ui 0.1.2-alpha.112 → 0.1.2-alpha.114

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 (297) hide show
  1. package/dist/{AdditionalOptions-D3SZ2WFJ.js → AdditionalOptions-ClcR_Kf7.js} +1 -1
  2. package/dist/{AlertDialogTrigger-Cdw3C2Tv.js → AlertDialogTrigger-C9xoCZrZ.js} +33 -33
  3. package/dist/Breadcrumb-CpXRb08J.js +93 -0
  4. package/dist/Checkbox-DRdyrKjk.js +252 -0
  5. package/dist/CollapsedSteps-CR7oCTRC.js +112 -0
  6. package/dist/{CommandInput-DiRv6fEA.js → CommandInput-Du2o616y.js} +1 -1
  7. package/dist/Counter-DMkXIsOO.js +229 -0
  8. package/dist/DropdownButton-JilCRLJY.js +92 -0
  9. package/dist/FlagSelectorList-iZ3gUVpf.js +954 -0
  10. package/dist/{HamburgerTrigger-DjHmNEJD.js → HamburgerTrigger-BgeS_nBA.js} +15 -15
  11. package/dist/Modal-CysTe3zL.js +83 -0
  12. package/dist/Spinner-CTonkSzG.js +47 -0
  13. package/dist/Switch-5cdUxbhX.js +215 -0
  14. package/dist/{Wrapper-MmlrJppS.js → Wrapper-BCi_pLOr.js} +38 -38
  15. package/dist/{Wrapper-BxfB3BDa.js → Wrapper-ThpRi_Gg.js} +9 -9
  16. package/dist/components/Alert/Alert.js +45 -41
  17. package/dist/components/AlertDialog/AlertDialog.js +42 -42
  18. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  19. package/dist/components/AlertDialog/components/index.js +1 -1
  20. package/dist/components/Avatar/Avatar.js +37 -0
  21. package/dist/components/Avatar/Avatar.variants.js +25 -0
  22. package/dist/components/Avatar/hooks/index.js +5 -0
  23. package/dist/components/Avatar/hooks/use-gravatar-url.js +25 -0
  24. package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
  25. package/dist/components/Badge/Badge.js +1 -1
  26. package/dist/components/BadgeGroup/BadgeGroup.js +62 -0
  27. package/dist/components/BadgeGroup/hooks/index.js +4 -0
  28. package/dist/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.js +50 -0
  29. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  30. package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +4 -0
  31. package/dist/components/Breadcrumb/components/index.js +6 -4
  32. package/dist/components/Button/Button.js +25 -19
  33. package/dist/components/Button/Button.variants.js +4 -1
  34. package/dist/components/ButtonGroup/ButtonGroup.js +16 -16
  35. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +8 -8
  36. package/dist/components/Checkbox/Checkbox.js +1 -1
  37. package/dist/components/CheckboxCard/CheckboxCard.js +52 -0
  38. package/dist/components/Collapse/Collapse.js +63 -0
  39. package/dist/components/Command/Command.js +5 -5
  40. package/dist/components/Command/components/Command.js +1 -1
  41. package/dist/components/Command/components/CommandEmpty.js +1 -1
  42. package/dist/components/Command/components/CommandGroup.js +1 -1
  43. package/dist/components/Command/components/CommandInput.js +1 -1
  44. package/dist/components/Command/components/CommandItem.js +1 -1
  45. package/dist/components/Command/components/CommandList.js +1 -1
  46. package/dist/components/Command/components/CommandSeparator.js +1 -1
  47. package/dist/components/Command/components/DialogContent.js +1 -1
  48. package/dist/components/Command/components/DialogOverlay.js +1 -1
  49. package/dist/components/Command/components/index.js +1 -1
  50. package/dist/components/ConfirmDialog/ConfirmDialog.js +110 -0
  51. package/dist/components/CopyButton/CopyButton.js +29 -29
  52. package/dist/components/Counter/Counter.js +1 -1
  53. package/dist/components/Counter/Counter.variants.js +73 -16
  54. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
  55. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +23 -31
  56. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +26 -0
  57. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +8 -8
  58. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +13 -13
  59. package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +15 -16
  60. package/dist/components/Datepicker/DatePicker.js +14 -49
  61. package/dist/components/Datepicker/components/DatePickerContent/DatePickerContent.js +51 -0
  62. package/dist/components/Drawer/Drawer.js +18 -18
  63. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  64. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  65. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +10 -11
  66. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.js +25 -22
  67. package/dist/components/Filter/components/DateFilterDropdown/hooks/useDateFilterDropdown/useDateFilterDropdown.js +16 -16
  68. package/dist/components/Filter/components/DateRangeFilterDropdown/hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.js +29 -29
  69. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +10 -10
  70. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
  71. package/dist/components/Filter/hooks/index.js +3 -1
  72. package/dist/components/Filter/hooks/useLocale.js +16 -0
  73. package/dist/components/Filter/utils/index.js +6 -2
  74. package/dist/components/LineChart/LineChart.js +18 -125
  75. package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +127 -0
  76. package/dist/components/Modal/Modal.js +1 -1
  77. package/dist/components/Modal/components/Body/Body.js +1 -1
  78. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  79. package/dist/components/Modal/components/Header/Header.js +1 -1
  80. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  81. package/dist/components/Modal/components/index.js +1 -1
  82. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  83. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +22 -3
  84. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  85. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  86. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  87. package/dist/components/OtpInput/OtpInput.js +103 -0
  88. package/dist/components/PasswordRules/PasswordRules.js +51 -0
  89. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +39 -10
  90. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  91. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +4 -4
  92. package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +15 -0
  93. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +15 -15
  94. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  95. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  96. package/dist/components/PhoneNumberInput/contexts/index.js +4 -4
  97. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  98. package/dist/components/PieChart/PieChart.js +10 -53
  99. package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +56 -0
  100. package/dist/components/ProgressBar/ProgressBar.js +10 -10
  101. package/dist/components/Radio/Radio.js +16 -16
  102. package/dist/components/Radio/Radio.variants.js +4 -1
  103. package/dist/components/RadioCard/RadioCard.js +36 -18
  104. package/dist/components/RadioCard/RadioCard.variants.js +9 -3
  105. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  106. package/dist/components/Range/Range.js +1 -1
  107. package/dist/components/Select/Select.js +2 -2
  108. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  109. package/dist/components/Select/components/List/List.js +10 -10
  110. package/dist/components/Select/components/Wrapper.js +1 -1
  111. package/dist/components/Select/components/index.js +2 -2
  112. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +15 -15
  113. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  114. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +66 -42
  115. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +10 -4
  116. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +91 -86
  117. package/dist/components/Sidebar/components/index.js +1 -1
  118. package/dist/components/Skeleton/Skeleton.js +18 -0
  119. package/dist/components/Skeleton/Skeleton.variants.js +25 -0
  120. package/dist/components/Slider/Slider.js +1 -1
  121. package/dist/components/Spinner/Spinner.js +1 -1
  122. package/dist/components/Stepper/Stepper.js +38 -29
  123. package/dist/components/Stepper/Stepper.variants.js +55 -19
  124. package/dist/components/Stepper/hooks/useStepItemLogic.js +1 -1
  125. package/dist/components/Switch/Switch.js +1 -1
  126. package/dist/components/Tabs/Tabs.js +52 -24
  127. package/dist/components/Tabs/Tabs.variants.js +15 -6
  128. package/dist/components/Tabs/components/Content.js +6 -6
  129. package/dist/components/Tabs/components/List.js +10 -10
  130. package/dist/components/Tabs/components/Trigger.js +11 -10
  131. package/dist/components/Tag/Tag.js +1 -1
  132. package/dist/components/TagsInput/TagsInput.js +159 -0
  133. package/dist/components/Toast/Toast.js +68 -2
  134. package/dist/components/Toast/components/ToastCard/ToastCard.js +32 -32
  135. package/dist/components/Tooltip/Tooltip.js +32 -16
  136. package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -101
  137. package/dist/components/VirtualizedTable/components/Actions/Actions.variants.js +18 -5
  138. package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +29 -19
  139. package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +66 -33
  140. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +31 -29
  141. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.js +23 -20
  142. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.js +51 -45
  143. package/dist/components/VirtualizedTable/components/Body/Body.js +6 -6
  144. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +22 -22
  145. package/dist/components/VirtualizedTable/components/EmptyResults/EmptyResults.js +30 -0
  146. package/dist/components/VirtualizedTable/components/EmptyState/EmptyState.js +32 -0
  147. package/dist/components/VirtualizedTable/components/ErrorState/ErrorState.js +35 -0
  148. package/dist/components/VirtualizedTable/components/Filter/Filter.js +5 -5
  149. package/dist/components/VirtualizedTable/components/Header/Header.js +4 -4
  150. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +46 -39
  151. package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +91 -0
  152. package/dist/components/VirtualizedTable/components/index.js +18 -12
  153. package/dist/components/VirtualizedTable/contexts/index.js +6 -6
  154. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  155. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  156. package/dist/components/VirtualizedTable/utils/index.js +4 -4
  157. package/dist/components/index.js +181 -155
  158. package/dist/components-B_SWqhCL.js +147 -0
  159. package/dist/{utils-DVYdP0CJ.js → country-locale-map-DbrJ3bEE.js} +373 -373
  160. package/dist/{debounce-BdyZeJQk.js → debounce-dMRJxNsT.js} +3 -3
  161. package/dist/{dist-DcFwF4XM.js → dist-1AtWkIZ4.js} +268 -260
  162. package/dist/{dist-CgzF5_J6.js → dist-4IVGO6ZT.js} +4 -4
  163. package/dist/dist-BCoDIdCt.js +429 -0
  164. package/dist/{dist-Bi8Y5nEx.js → dist-BXv-jY2v.js} +60 -55
  165. package/dist/{dist-C4j75TwZ.js → dist-BbJP2Efh.js} +2 -2
  166. package/dist/dist-Bh7M0KDN.js +367 -0
  167. package/dist/dist-BqDJX7m1.js +209 -0
  168. package/dist/dist-C0OhTLFV.js +31 -0
  169. package/dist/dist-C1a-68Kb.js +120 -0
  170. package/dist/dist-CK8FUUUn.js +125 -0
  171. package/dist/dist-CQSCPpFc.js +196 -0
  172. package/dist/{dist-CCdbu9GU.js → dist-CYuWoi9I.js} +1 -1
  173. package/dist/{dist-DX0sBG3Q.js → dist-C_jtUTU9.js} +5 -6
  174. package/dist/{dist-D-yS0HN8.js → dist-DbeY0Pzx.js} +6 -6
  175. package/dist/dist-fPYIsxyx.js +465 -0
  176. package/dist/dist-rsFD9q_X.js +484 -0
  177. package/dist/{dist-BUocnzkM.js → dist-uuWgjOcO.js} +1 -1
  178. package/dist/dist-vDSmnSS_.js +41 -0
  179. package/dist/dist-vUCyiTQy.js +365 -0
  180. package/dist/es2015-ChhQTsb4.js +74 -0
  181. package/dist/index.js +194 -168
  182. package/dist/{isObject-pLoSfdr0.js → isSymbol-BG9higgO.js} +14 -14
  183. package/dist/lib/components/Alert/Alert.types.d.ts +4 -0
  184. package/dist/lib/components/Avatar/Avatar.d.ts +14 -0
  185. package/dist/lib/components/Avatar/Avatar.types.d.ts +21 -0
  186. package/dist/lib/components/Avatar/Avatar.variants.d.ts +3 -0
  187. package/dist/lib/components/Avatar/hooks/index.d.ts +1 -0
  188. package/dist/lib/components/Avatar/hooks/use-gravatar-url.d.ts +2 -0
  189. package/dist/lib/components/AvatarGroup/AvatarGroup.d.ts +16 -0
  190. package/dist/lib/components/AvatarGroup/AvatarGroup.types.d.ts +19 -0
  191. package/dist/lib/components/BadgeGroup/BadgeGroup.d.ts +15 -0
  192. package/dist/lib/components/BadgeGroup/BadgeGroup.types.d.ts +25 -0
  193. package/dist/lib/components/BadgeGroup/hooks/index.d.ts +1 -0
  194. package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.d.ts +2 -0
  195. package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.types.d.ts +10 -0
  196. package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +4 -0
  197. package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.d.ts +3 -0
  198. package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.types.d.ts +5 -0
  199. package/dist/lib/components/Breadcrumb/components/index.d.ts +1 -0
  200. package/dist/lib/components/Button/Button.variants.d.ts +1 -1
  201. package/dist/lib/components/CheckboxCard/CheckboxCard.d.ts +20 -0
  202. package/dist/lib/components/CheckboxCard/CheckboxCard.types.d.ts +13 -0
  203. package/dist/lib/components/Collapse/Collapse.d.ts +19 -0
  204. package/dist/lib/components/Collapse/Collapse.types.d.ts +17 -0
  205. package/dist/lib/components/ConfirmDialog/ConfirmDialog.d.ts +23 -0
  206. package/dist/lib/components/ConfirmDialog/ConfirmDialog.types.d.ts +46 -0
  207. package/dist/lib/components/Counter/Counter.d.ts +7 -4
  208. package/dist/lib/components/Counter/Counter.types.d.ts +23 -0
  209. package/dist/lib/components/Counter/Counter.variants.d.ts +10 -1
  210. package/dist/lib/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.d.ts +3 -0
  211. package/dist/lib/components/Datepicker/components/DatePickerContent/DatePickerContent.d.ts +3 -0
  212. package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +11 -0
  213. package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
  214. package/dist/lib/components/Filter/hooks/useLocale.d.ts +1 -0
  215. package/dist/lib/components/Filter/utils/index.d.ts +1 -0
  216. package/dist/lib/components/LineChart/components/LineChartContent/LineChartContent.d.ts +3 -0
  217. package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
  218. package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +2 -0
  219. package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +10 -0
  220. package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +4 -1
  221. package/dist/lib/components/OtpInput/OtpInput.d.ts +19 -0
  222. package/dist/lib/components/OtpInput/OtpInput.types.d.ts +32 -0
  223. package/dist/lib/components/PasswordRules/PasswordRules.d.ts +20 -0
  224. package/dist/lib/components/PasswordRules/PasswordRules.types.d.ts +24 -0
  225. package/dist/lib/components/PhoneNumberInput/components/PhoneNumberInputContent.d.ts +18 -0
  226. package/dist/lib/components/PieChart/components/PieChartContent/PieChartContent.d.ts +3 -0
  227. package/dist/lib/components/RadioCard/RadioCard.d.ts +11 -0
  228. package/dist/lib/components/RadioCard/RadioCard.types.d.ts +10 -1
  229. package/dist/lib/components/RadioCard/RadioCard.variants.d.ts +3 -1
  230. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +4 -0
  231. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +2 -0
  232. package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +6 -0
  233. package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +1 -0
  234. package/dist/lib/components/Skeleton/Skeleton.d.ts +14 -0
  235. package/dist/lib/components/Skeleton/Skeleton.types.d.ts +16 -0
  236. package/dist/lib/components/Skeleton/Skeleton.variants.d.ts +3 -0
  237. package/dist/lib/components/Stepper/Stepper.types.d.ts +2 -0
  238. package/dist/lib/components/Stepper/Stepper.variants.d.ts +7 -4
  239. package/dist/lib/components/Switch/Switch.types.d.ts +7 -0
  240. package/dist/lib/components/Tabs/Tabs.d.ts +13 -13
  241. package/dist/lib/components/Tabs/Tabs.types.d.ts +14 -3
  242. package/dist/lib/components/Tabs/Tabs.variants.d.ts +1 -1
  243. package/dist/lib/components/TagsInput/TagsInput.d.ts +20 -0
  244. package/dist/lib/components/TagsInput/TagsInput.types.d.ts +37 -0
  245. package/dist/lib/components/Tooltip/Tooltip.d.ts +4 -0
  246. package/dist/lib/components/Tooltip/Tooltip.types.d.ts +10 -0
  247. package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +8 -2
  248. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.types.d.ts +6 -0
  249. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.variants.d.ts +3 -1
  250. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +1 -1
  251. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.types.d.ts +2 -0
  252. package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +1 -1
  253. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +1 -1
  254. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.d.ts +4 -1
  255. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.types.d.ts +3 -0
  256. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.d.ts +3 -1
  257. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.types.d.ts +1 -0
  258. package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.d.ts +3 -0
  259. package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.types.d.ts +9 -0
  260. package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.d.ts +3 -0
  261. package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.types.d.ts +8 -0
  262. package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.d.ts +3 -0
  263. package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.types.d.ts +9 -0
  264. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -1
  265. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +8 -3
  266. package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +3 -0
  267. package/dist/lib/components/VirtualizedTable/components/index.d.ts +3 -0
  268. package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +1 -0
  269. package/dist/lib/components/index.d.ts +10 -0
  270. package/dist/package.json +31 -30
  271. package/dist/{phone-number.provider-BASl9fGG.js → phone-number.provider-DnuL-yYF.js} +4 -4
  272. package/dist/styles.css +1 -1
  273. package/dist/{table.provider-MQ4T5Xb5.js → table.provider-CW1fpZcF.js} +80 -79
  274. package/package.json +31 -30
  275. package/dist/AnimatePresence-BsUYG9bm.js +0 -186
  276. package/dist/Breadcrumb-CHi5-wVa.js +0 -81
  277. package/dist/Checkbox-CrNxsm3G.js +0 -247
  278. package/dist/Counter-DN50BVq6.js +0 -194
  279. package/dist/DropdownButton-Blhkj-Oi.js +0 -490
  280. package/dist/FlagSelectorList-ClKGwDpS.js +0 -918
  281. package/dist/Modal-Bk1I_NCC.js +0 -81
  282. package/dist/Spinner-smR3esbL.js +0 -47
  283. package/dist/Switch-CPE8v6Zh.js +0 -199
  284. package/dist/Toast-CRPLONv9.js +0 -77
  285. package/dist/components-z-LYRWfq.js +0 -124
  286. package/dist/dist-CNui_Egg.js +0 -451
  287. package/dist/dist-CR3FMRzF.js +0 -118
  288. package/dist/dist-D5Q2IYuC.js +0 -358
  289. package/dist/dist-D70ZJkHf.js +0 -29
  290. package/dist/dist-DZ_SU77k.js +0 -437
  291. package/dist/dist-LRkZdylX.js +0 -174
  292. package/dist/dist-f8EwfITY.js +0 -194
  293. package/dist/dist-pWlMx4Fi.js +0 -36
  294. package/dist/dist-uerXivvM.js +0 -178
  295. package/dist/dist-xCbHbMLA.js +0 -116
  296. package/dist/es2015-Hhb87ipX.js +0 -231
  297. package/dist/react-C685EsYG.js +0 -4730
@@ -1,21 +1,39 @@
1
1
  import { t as a } from "../../utils-DnIJruo0.js";
2
- import { Card as d } from "../Card/Card.js";
3
- import { Radio as l } from "../Radio/Radio.js";
4
- import { radioCardVariants as e } from "./RadioCard.variants.js";
5
- import { jsx as o } from "react/jsx-runtime";
6
- var f = ({ wrapperClassName: r, theme: i, labelWrapperClassName: t, checked: m, description: s, ...p }) => /* @__PURE__ */ o(d, {
7
- "data-theme": i,
8
- className: a(e({ className: r })),
9
- wrapperClassName: a("w-max", r),
10
- isActive: m,
11
- children: /* @__PURE__ */ o(l, {
12
- wrapperClassName: a("w-full h-full p-3 gap-3", t),
13
- checked: m,
14
- description: s,
15
- ...p
16
- })
17
- });
18
- f.displayName = "KonstructRadioCard";
2
+ import { Badge as v } from "../Badge/Badge.js";
3
+ import { Card as x } from "../Card/Card.js";
4
+ import { Radio as h } from "../Radio/Radio.js";
5
+ import { radioCardVariants as w } from "./RadioCard.variants.js";
6
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
7
+ var b = ({ wrapperClassName: l, theme: p, labelWrapperClassName: d, checked: r, className: n, content: s, contentClassName: f, description: c, hideIndicator: u = !1, label: i, tag: m, ...C }) => {
8
+ const e = typeof s == "function" ? s(!!r) : s, N = m ? /* @__PURE__ */ t("span", {
9
+ className: "flex items-center gap-2",
10
+ children: [i, /* @__PURE__ */ o(v, {
11
+ variant: "info",
12
+ label: m
13
+ })]
14
+ }) : i;
15
+ return /* @__PURE__ */ t(x, {
16
+ "data-theme": p,
17
+ className: a(w({
18
+ hasContent: !!e,
19
+ className: l
20
+ })),
21
+ wrapperClassName: a("w-max", l),
22
+ isActive: r,
23
+ children: [/* @__PURE__ */ o(h, {
24
+ wrapperClassName: a("w-full h-full p-3 gap-3", d),
25
+ className: a(u && "hidden", n),
26
+ checked: r,
27
+ description: c,
28
+ label: N,
29
+ ...C
30
+ }), e ? /* @__PURE__ */ o("div", {
31
+ className: a("relative w-full px-3 pb-3", f),
32
+ children: e
33
+ }) : null]
34
+ });
35
+ };
36
+ b.displayName = "KonstructRadioCard";
19
37
  export {
20
- f as RadioCard
38
+ b as RadioCard
21
39
  };
@@ -1,10 +1,16 @@
1
- import { t as r } from "../../dist-B9GE4SXf.js";
2
- var e = r([
1
+ import { t } from "../../dist-B9GE4SXf.js";
2
+ var e = t([
3
3
  "flex",
4
4
  "items-center",
5
5
  "p-0",
6
6
  "border"
7
- ]);
7
+ ], {
8
+ variants: { hasContent: {
9
+ true: ["flex-col", "items-stretch"],
10
+ false: []
11
+ } },
12
+ defaultVariants: { hasContent: !1 }
13
+ });
8
14
  export {
9
15
  e as radioCardVariants
10
16
  };
@@ -1,4 +1,4 @@
1
- import { t as R } from "../../dist-xCbHbMLA.js";
1
+ import { t as R } from "../../dist-CK8FUUUn.js";
2
2
  import { t as r } from "../../utils-DnIJruo0.js";
3
3
  import { Radio as g } from "../Radio/Radio.js";
4
4
  import { radioGroupVariants as j } from "./RadioGroup.variants.js";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "../../utils-DnIJruo0.js";
2
- import { i as v, n as V, r as i, t as S } from "../../dist-CNui_Egg.js";
2
+ import { i as v, n as V, r as i, t as S } from "../../dist-fPYIsxyx.js";
3
3
  import { rangeOutsideVariants as R, rangeVariants as j, thumbVariants as c, trackVariants as w } from "./Range.variants.js";
4
4
  import { forwardRef as y, useEffect as b, useImperativeHandle as k, useRef as C, useState as T } from "react";
5
5
  import { jsx as a, jsxs as s } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import { n as y, t as d } from "../../utils-DnIJruo0.js";
2
- import { t as M } from "../../Wrapper-MmlrJppS.js";
2
+ import { t as M } from "../../Wrapper-BCi_pLOr.js";
3
3
  import { SelectProvider as S } from "./contexts/select.provider.js";
4
- import { n as b } from "../../AdditionalOptions-D3SZ2WFJ.js";
4
+ import { n as b } from "../../AdditionalOptions-ClcR_Kf7.js";
5
5
  import { forwardRef as E, useId as G, useMemo as H } from "react";
6
6
  import { jsx as s, jsxs as P } from "react/jsx-runtime";
7
7
  var B = E(({ error: e, errorClassName: m, helperText: l, helperTextClassName: x, highlightSearch: h, id: u, mainWrapperClassName: I, name: r, value: g, options: t, onChange: v, onBlur: n, onValueChange: $, ...N }, O) => {
@@ -1,4 +1,4 @@
1
- import { t } from "../../../../AdditionalOptions-D3SZ2WFJ.js";
1
+ import { t } from "../../../../AdditionalOptions-ClcR_Kf7.js";
2
2
  export {
3
3
  t as AdditionalOptions
4
4
  };
@@ -1,20 +1,20 @@
1
1
  import { o as $ } from "../../../../rolldown-runtime-Dw9YIBcH.js";
2
2
  import { t as n } from "../../../../utils-DnIJruo0.js";
3
3
  import { t as R } from "../../../../Loading-u8hXrFJR.js";
4
- import { t as ee } from "../../../../debounce-BdyZeJQk.js";
5
- import { useSelectContext as te } from "../../contexts/select.hook.js";
6
- import { n as re, t as oe } from "../../../../AdditionalOptions-D3SZ2WFJ.js";
7
- import { listGroupLabelVariants as ae, listVariants as ne } from "./List.variants.js";
4
+ import { useSelectContext as ee } from "../../contexts/select.hook.js";
5
+ import { n as te, t as re } from "../../../../AdditionalOptions-ClcR_Kf7.js";
6
+ import { listGroupLabelVariants as oe, listVariants as ae } from "./List.variants.js";
7
+ import { t as ne } from "../../../../debounce-dMRJxNsT.js";
8
8
  import "../../constants/pagination.js";
9
9
  import "../../constants/list.js";
10
10
  import { useNavigationUlList as se } from "../../hooks/useNavigationList.js";
11
11
  import { ListItem as g } from "../ListItem/ListItem.js";
12
12
  import { forwardRef as ie, useEffect as le, useImperativeHandle as ce, useMemo as I, useRef as N, useState as ue } from "react";
13
13
  import { jsx as o, jsxs as O } from "react/jsx-runtime";
14
- var fe = /* @__PURE__ */ $(ee(), 1), ke = ie(({ additionalOptions: P, className: T, groupedOptions: l, id: j, inputRef: c, isLoading: M, itemClassName: u, labelledBy: S, loadingText: C, name: q, searchable: f = !1, listItemSecondRowClassName: p, wrapperInputRef: A, isInfiniteScrollEnabled: h, noOptionsText: E, onFetchMoreOptions: b, visibleItems: F }, U) => {
15
- const m = N(null), L = N(null), [v, k] = ue(!1), { canContinueFetching: d, canFilter: y, isOpen: V, isTyping: G, options: H, page: w, searchTerm: a, setCanContinueFetching: z, setOptions: D, setPage: X } = te(), Z = F !== void 0 ? { maxHeight: F * 40 } : void 0;
14
+ var fe = /* @__PURE__ */ $(ne(), 1), ke = ie(({ additionalOptions: P, className: T, groupedOptions: l, id: j, inputRef: c, isLoading: M, itemClassName: u, labelledBy: S, loadingText: C, name: q, searchable: f = !1, listItemSecondRowClassName: p, wrapperInputRef: A, isInfiniteScrollEnabled: h, noOptionsText: E, onFetchMoreOptions: b, visibleItems: F }, U) => {
15
+ const m = N(null), L = N(null), [v, k] = ue(!1), { canContinueFetching: d, canFilter: y, isOpen: V, isTyping: G, options: H, page: w, searchTerm: a, setCanContinueFetching: z, setOptions: D, setPage: X } = ee(), Z = F !== void 0 ? { maxHeight: F * 40 } : void 0;
16
16
  ce(U, () => m.current, [m]);
17
- const s = l.length > 0 && re(l[0]), _ = f && y ? H.filter((e) => {
17
+ const s = l.length > 0 && te(l[0]), _ = f && y ? H.filter((e) => {
18
18
  const t = a.toLowerCase();
19
19
  return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(t);
20
20
  }) : H, x = I(() => {
@@ -77,7 +77,7 @@ var fe = /* @__PURE__ */ $(ee(), 1), ke = ie(({ additionalOptions: P, className:
77
77
  title: q,
78
78
  role: "listbox",
79
79
  "aria-labelledby": S,
80
- className: n(ne({ className: T })),
80
+ className: n(ae({ className: T })),
81
81
  style: Z,
82
82
  "data-state": V ? "open" : "closed",
83
83
  children: [
@@ -106,7 +106,7 @@ var fe = /* @__PURE__ */ $(ee(), 1), ke = ie(({ additionalOptions: P, className:
106
106
  role: "presentation",
107
107
  "aria-hidden": "true",
108
108
  "data-action": "true",
109
- className: n(ae()),
109
+ className: n(oe()),
110
110
  children: e.groupLabel
111
111
  }), e.options.map((t) => /* @__PURE__ */ o(g, {
112
112
  className: n("select-none", u),
@@ -132,7 +132,7 @@ var fe = /* @__PURE__ */ $(ee(), 1), ke = ie(({ additionalOptions: P, className:
132
132
  onClick: (e) => e.stopPropagation(),
133
133
  children: /* @__PURE__ */ o(R, { className: "w-4 h-4 text-aurora-500 select-none" })
134
134
  }),
135
- /* @__PURE__ */ o(oe, { additionalOptions: P })
135
+ /* @__PURE__ */ o(re, { additionalOptions: P })
136
136
  ]
137
137
  });
138
138
  });
@@ -1,4 +1,4 @@
1
- import { t as p } from "../../../Wrapper-MmlrJppS.js";
1
+ import { t as p } from "../../../Wrapper-BCi_pLOr.js";
2
2
  export {
3
3
  p as Wrapper
4
4
  };
@@ -1,5 +1,5 @@
1
- import { t as o } from "../../../Wrapper-MmlrJppS.js";
2
- import { t as i } from "../../../AdditionalOptions-D3SZ2WFJ.js";
1
+ import { t as o } from "../../../Wrapper-BCi_pLOr.js";
2
+ import { t as i } from "../../../AdditionalOptions-ClcR_Kf7.js";
3
3
  import { EmptyList as p } from "./EmptyList.js";
4
4
  import { List as a } from "./List/List.js";
5
5
  export {
@@ -1,30 +1,30 @@
1
- import { t as n } from "../../../../utils-DnIJruo0.js";
2
- import { ArrowLeftIcon as l } from "../../../../assets/icons/components/ArrowLeft.js";
3
- import { ArrowRightIcon as s } from "../../../../assets/icons/components/ArrowRight.js";
4
- import { useSidebarContext as p } from "../../contexts/SidebarContext.js";
1
+ import { t as l } from "../../../../utils-DnIJruo0.js";
2
+ import { ArrowLeftIcon as s } from "../../../../assets/icons/components/ArrowLeft.js";
3
+ import { ArrowRightIcon as p } from "../../../../assets/icons/components/ArrowRight.js";
4
+ import { useSidebarContext as d } from "../../contexts/SidebarContext.js";
5
5
  import { collapseTriggerVariants as g } from "./CollapseTrigger.variants.js";
6
- import { jsx as o } from "react/jsx-runtime";
7
- var d = ({ className: a }) => {
8
- const { isCollapsed: r, canToggle: e, toggleMode: t } = p();
9
- return e ? /* @__PURE__ */ o("button", {
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ var m = ({ className: o, onToggle: e }) => {
8
+ const { isCollapsed: r, canToggle: t, toggleMode: i } = d();
9
+ return t ? /* @__PURE__ */ a("button", {
10
10
  type: "button",
11
11
  "data-konstruct-sidebar-collapse-trigger": "",
12
12
  "aria-label": r ? "Expand navigation" : "Collapse navigation",
13
13
  "aria-expanded": !r,
14
- className: n(g({ className: a })),
15
- onClick: (i) => {
16
- i.stopPropagation(), t();
14
+ className: l(g({ className: o })),
15
+ onClick: (n) => {
16
+ n.stopPropagation(), i(), e?.(r ? "expanded" : "collapsed");
17
17
  },
18
- children: r ? /* @__PURE__ */ o(s, {
18
+ children: r ? /* @__PURE__ */ a(p, {
19
19
  size: 24,
20
20
  "aria-hidden": "true"
21
- }) : /* @__PURE__ */ o(l, {
21
+ }) : /* @__PURE__ */ a(s, {
22
22
  size: 24,
23
23
  "aria-hidden": "true"
24
24
  })
25
25
  }) : null;
26
26
  };
27
- d.displayName = "KonstructSidebarCollapseTrigger";
27
+ m.displayName = "KonstructSidebarCollapseTrigger";
28
28
  export {
29
- d as CollapseTrigger
29
+ m as CollapseTrigger
30
30
  };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../../HamburgerTrigger-DjHmNEJD.js";
1
+ import { t as e } from "../../../../HamburgerTrigger-BgeS_nBA.js";
2
2
  export {
3
3
  e as HamburgerTrigger
4
4
  };
@@ -1,58 +1,82 @@
1
- import { t as u } from "../../../../utils-DnIJruo0.js";
2
- import { a as j, i as P, n as V, o as A, r as D, t as E } from "../../../../dist-D5Q2IYuC.js";
3
- import { useSidebarContext as H } from "../../contexts/SidebarContext.js";
4
- import { NavigationOptionContext as R } from "./NavigationOption.context.js";
5
- import { navigationOptionVariants as z } from "./NavigationOption.variants.js";
6
- import { Children as B, isValidElement as K, useCallback as M, useMemo as q, useState as F } from "react";
7
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
8
- var G = (e) => {
9
- const o = B.toArray(e);
10
- return o.length === 1 && K(o[0]) ? o[0] : /* @__PURE__ */ t("span", {
1
+ import { t as T } from "../../../../utils-DnIJruo0.js";
2
+ import { a as B, i as M, n as z, o as K, r as U, t as Y } from "../../../../dist-vUCyiTQy.js";
3
+ import { useSidebarContext as $ } from "../../contexts/SidebarContext.js";
4
+ import { NavigationOptionContext as q } from "./NavigationOption.context.js";
5
+ import { navigationOptionVariants as G } from "./NavigationOption.variants.js";
6
+ import { Children as I, isValidElement as J, useCallback as a, useEffect as Q, useMemo as W, useRef as X, useState as Z } from "react";
7
+ import { Fragment as tt, jsx as t, jsxs as s } from "react/jsx-runtime";
8
+ var et = (o) => {
9
+ const n = I.toArray(o);
10
+ return n.length === 1 && J(n[0]) ? n[0] : /* @__PURE__ */ t("span", {
11
11
  className: "flex w-full items-center justify-center gap-2",
12
- children: e
12
+ children: o
13
13
  });
14
- }, I = ({ children: e, className: o, closeDrawerOnClick: m = !0, isVisible: f = !0, isActive: r, role: a, tooltip: C, tooltipBgClassName: g = "bg-kubefirst-dark-blue-900", tooltipArrowClassName: h = "fill-kubefirst-dark-blue-900", tooltipTextClassName: b = "text-white", tooltipClassName: v, ...i }) => {
15
- const { isCollapsed: x, expandOnHover: k, closeDrawer: w } = H(), n = x && k, [N, y] = F(null), s = M((T) => {
16
- y(T);
17
- }, []), O = q(() => ({
18
- hasOwnTooltip: n,
19
- registerTooltipContent: s
20
- }), [n, s]);
21
- if (!f) return null;
22
- const S = "onClick" in i ? i.onClick : void 0, l = () => {
23
- m && w(), S?.();
24
- }, c = C ?? N, d = n && c ? /* @__PURE__ */ t(P, {
14
+ }, ot = 80, nt = ({ badge: o, children: n, className: x, closeDrawerOnClick: b = !0, intentDelay: d = ot, isVisible: k = !0, isActive: p, role: m, tooltip: N, onIntent: r, tooltipBgClassName: w = "bg-kubefirst-dark-blue-900", tooltipArrowClassName: O = "fill-kubefirst-dark-blue-900", tooltipTextClassName: y = "text-white", tooltipClassName: E, ...l }) => {
15
+ const { isCollapsed: P, expandOnHover: S, closeDrawer: A } = $(), c = P && S, [D, F] = Z(null), u = X(void 0), e = a(() => {
16
+ clearTimeout(u.current), u.current = void 0;
17
+ }, []), i = a(() => {
18
+ e(), r?.();
19
+ }, [e, r]), j = a(() => {
20
+ r && (e(), u.current = setTimeout(i, d));
21
+ }, [
22
+ e,
23
+ i,
24
+ d,
25
+ r
26
+ ]);
27
+ Q(() => e, [e]);
28
+ const f = a((_) => {
29
+ F(_);
30
+ }, []), H = W(() => ({
31
+ hasOwnTooltip: c,
32
+ registerTooltipContent: f
33
+ }), [c, f]);
34
+ if (!k) return null;
35
+ const L = "onClick" in l ? l.onClick : void 0, h = () => {
36
+ b && A(), L?.();
37
+ }, g = N ?? D, R = c && !!g, V = r ? {
38
+ onPointerEnter: j,
39
+ onPointerLeave: e,
40
+ onPointerDown: i,
41
+ onTouchStart: i,
42
+ onFocus: i
43
+ } : {}, C = o ? /* @__PURE__ */ t("span", {
44
+ className: "ml-auto flex shrink-0 items-center group-data-[mode=collapsed]/sidebar:hidden",
45
+ children: o
46
+ }) : null, v = R ? /* @__PURE__ */ t(B, {
25
47
  delayDuration: 0,
26
- children: /* @__PURE__ */ p(j, { children: [/* @__PURE__ */ t(A, {
48
+ children: /* @__PURE__ */ s(Y, { children: [/* @__PURE__ */ t(K, {
27
49
  asChild: !0,
28
- children: G(e)
29
- }), /* @__PURE__ */ t(D, { children: /* @__PURE__ */ p(V, {
50
+ children: et(n)
51
+ }), /* @__PURE__ */ t(M, { children: /* @__PURE__ */ s(U, {
30
52
  side: "right",
31
53
  sideOffset: 12,
32
- className: u("z-60 flex w-fit items-center gap-2 rounded px-3 py-2 text-sm shadow-lg whitespace-nowrap", "animate-in fade-in-0", g, b, v),
33
- children: [c, /* @__PURE__ */ t(E, { className: h })]
54
+ className: T("z-60 flex w-fit items-center gap-2 rounded px-3 py-2 text-sm shadow-lg whitespace-nowrap", "animate-in fade-in-0", w, y, E),
55
+ children: [g, /* @__PURE__ */ t(z, { className: O })]
34
56
  }) })] })
35
- }) : e;
36
- return /* @__PURE__ */ t(R.Provider, {
37
- value: O,
57
+ }) : n;
58
+ return /* @__PURE__ */ t(q.Provider, {
59
+ value: H,
38
60
  children: /* @__PURE__ */ t("li", {
39
- ...i,
40
- "data-active": r ? "true" : void 0,
41
- onClick: a === "button" ? void 0 : l,
42
- className: u(z({
43
- className: o,
44
- isActive: r
61
+ ...l,
62
+ ...V,
63
+ "data-active": p ? "true" : void 0,
64
+ onClick: m === "button" ? void 0 : h,
65
+ className: T(G({
66
+ className: x,
67
+ isActive: p,
68
+ hasBadge: !!o
45
69
  })),
46
- children: a === "button" ? /* @__PURE__ */ t("button", {
70
+ children: m === "button" ? /* @__PURE__ */ s("button", {
47
71
  type: "button",
48
- onClick: l,
72
+ onClick: h,
49
73
  className: "flex w-full cursor-pointer items-center gap-2",
50
- children: d
51
- }) : d
74
+ children: [v, C]
75
+ }) : /* @__PURE__ */ s(tt, { children: [v, C] })
52
76
  })
53
77
  });
54
78
  };
55
- I.displayName = "KonstructSidebarNavigationOption";
79
+ nt.displayName = "KonstructSidebarNavigationOption";
56
80
  export {
57
- I as NavigationOption
81
+ nt as NavigationOption
58
82
  };
@@ -24,10 +24,16 @@ var t = e([
24
24
  "selection:bg-powder-500",
25
25
  "selection:text-white"
26
26
  ], {
27
- variants: { isActive: {
28
- true: "",
29
- false: ""
30
- } },
27
+ variants: {
28
+ isActive: {
29
+ true: "",
30
+ false: ""
31
+ },
32
+ hasBadge: {
33
+ true: ["[&>a]:flex-1", "[&>a]:min-w-0"],
34
+ false: ""
35
+ }
36
+ },
31
37
  compoundVariants: [{
32
38
  isActive: !0,
33
39
  class: ["data-[active=true]:text-white", "data-[active=true]:bg-kubefirst-dark-blue-800"]
@@ -1,122 +1,127 @@
1
- import { t as Y } from "../../../../HamburgerTrigger-DjHmNEJD.js";
2
- import { t as l } from "../../../../utils-DnIJruo0.js";
3
- import { Drawer as Z } from "../../../Drawer/Drawer.js";
4
- import { SidebarContext as k } from "../../contexts/SidebarContext.js";
5
- import { useSidebarMode as ee } from "../../hooks/useSidebarMode.js";
6
- import { dragVariants as re, wrapperSiderbarVariants as A } from "../../Sidebar.variants.js";
7
- import { useCallback as p, useEffect as f, useRef as m, useState as M } from "react";
8
- import { Fragment as te, jsx as o, jsxs as F } from "react/jsx-runtime";
9
- var ne = 280, oe = ({ animateOnHover: I = !0, canResize: N = !0, children: y, dividerClassName: P, drawerBreakpoint: _, drawerClassNames: i, drawerMaxWidth: b = ne, expandedBreakpoint: $, expandOnHover: j = !0, initialMode: C, initialWidth: x = 256, maxWith: s = 300, minWith: a = 240, mode: U = "auto", separatorClassName: D, style: L, theme: E, triggerClassName: X, openNavigationLabel: W, wrapperClassName: O }) => {
10
- const t = ee(U, $, _, C), [R, v] = M(!1), [S, q] = M(null), [z, T] = M(null), u = t === "drawer" ? "drawer" : z ?? t, n = m(null), r = m(null), w = m(!1), H = m(!1);
11
- f(() => {
12
- if (t !== "drawer") return;
13
- const e = () => {
14
- q(window.innerWidth);
1
+ import { t as re } from "../../../../HamburgerTrigger-BgeS_nBA.js";
2
+ import { t as u } from "../../../../utils-DnIJruo0.js";
3
+ import { Drawer as te } from "../../../Drawer/Drawer.js";
4
+ import { SidebarContext as I } from "../../contexts/SidebarContext.js";
5
+ import { useSidebarMode as ne } from "../../hooks/useSidebarMode.js";
6
+ import { dragVariants as oe, wrapperSiderbarVariants as N } from "../../Sidebar.variants.js";
7
+ import { useCallback as v, useEffect as o, useRef as s, useState as b } from "react";
8
+ import { Fragment as se, jsx as d, jsxs as P } from "react/jsx-runtime";
9
+ var de = 280, ae = ({ animateOnHover: _ = !0, canResize: $ = !0, children: D, dividerClassName: j, drawerBreakpoint: U, drawerClassNames: p, drawerMaxWidth: R = de, expandedBreakpoint: X, expandOnHover: C = !0, initialMode: W, initialWidth: L = 256, maxWith: a = 300, minWith: c = 240, mode: q = "auto", separatorClassName: E, style: O, theme: S, triggerClassName: B, openNavigationLabel: G, wrapperClassName: z, onModeChange: w }) => {
10
+ const e = ne(q, X, U, W), [T, g] = b(!1), [H, J] = b(null), [f, V] = b(null), m = e === "drawer" ? "drawer" : f ?? e, n = s(null), t = s(null), h = s(!1), k = s(!1), M = s(w), A = s(e);
11
+ o(() => {
12
+ M.current = w;
13
+ }, [w]), o(() => {
14
+ A.current !== e && (A.current = e, M.current?.(e, "viewport"));
15
+ }, [e]), o(() => {
16
+ if (e !== "drawer") return;
17
+ const r = () => {
18
+ J(window.innerWidth);
15
19
  };
16
- return e(), window.addEventListener("resize", e), () => {
17
- window.removeEventListener("resize", e);
20
+ return r(), window.addEventListener("resize", r), () => {
21
+ window.removeEventListener("resize", r);
18
22
  };
19
- }, [t]);
20
- const g = p((e) => {
21
- if (!w.current) {
23
+ }, [e]);
24
+ const x = v((r) => {
25
+ if (!h.current) {
22
26
  n.current && (n.current.style.opacity = "0");
23
27
  return;
24
28
  }
25
- let c = e.clientX;
26
- c < a && (c = a), c > s && (c = s), r.current && n.current && (r.current.style.width = `${c}px`, n.current.classList.add("opacity-100"));
27
- }, [s, a]), V = p(() => {
28
- w.current = !1, n.current && n.current.classList.remove("opacity-100"), r.current && r.current.classList.remove("transition-none"), document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", V);
29
- }, [g]), B = (e) => {
30
- e.preventDefault(), e.stopPropagation(), w.current = !0, r.current && r.current.classList.add("transition-none"), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize", document.addEventListener("mousemove", g), document.addEventListener("mouseup", V);
29
+ let i = r.clientX;
30
+ i < c && (i = c), i > a && (i = a), t.current && n.current && (t.current.style.width = `${i}px`, n.current.classList.add("opacity-100"));
31
+ }, [a, c]), F = v(() => {
32
+ h.current = !1, n.current && n.current.classList.remove("opacity-100"), t.current && t.current.classList.remove("transition-none"), document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", F);
33
+ }, [x]), K = (r) => {
34
+ r.preventDefault(), r.stopPropagation(), h.current = !0, t.current && t.current.classList.add("transition-none"), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize", document.addEventListener("mousemove", x), document.addEventListener("mouseup", F);
31
35
  };
32
- f(() => {
33
- u !== "expanded" && r.current && (r.current.style.width = "");
34
- }, [u]), f(() => {
35
- t !== "drawer" && v(!1), T(null);
36
- }, [t]), f(() => {
37
- if (H.current || u !== "expanded" || !r.current) return;
38
- const e = Math.min(Math.max(x, a), s);
39
- r.current.style.width = `${e}px`, H.current = !0;
36
+ o(() => {
37
+ m !== "expanded" && t.current && (t.current.style.width = "");
38
+ }, [m]), o(() => {
39
+ e !== "drawer" && g(!1), V(null);
40
+ }, [e]), o(() => {
41
+ if (k.current || m !== "expanded" || !t.current) return;
42
+ const r = Math.min(Math.max(L, c), a);
43
+ t.current.style.width = `${r}px`, k.current = !0;
40
44
  }, [
41
- x,
42
- s,
45
+ L,
43
46
  a,
44
- u
47
+ c,
48
+ m
45
49
  ]);
46
- const G = () => {
47
- v(!0);
48
- }, h = p(() => {
49
- v(!1);
50
- }, []), J = p(() => {
51
- T((e) => (e ?? t) === "collapsed" ? "expanded" : "collapsed");
52
- }, [t]);
53
- if (t === "drawer") return /* @__PURE__ */ F(te, { children: [/* @__PURE__ */ o(Y, {
54
- isOpen: R,
55
- onClick: G,
56
- className: X,
57
- openNavigationLabel: W
58
- }), /* @__PURE__ */ o(Z, {
59
- isOpen: R,
60
- onClose: h,
50
+ const Q = () => {
51
+ g(!0);
52
+ }, y = v(() => {
53
+ g(!1);
54
+ }, []), Y = v(() => {
55
+ const r = (f ?? e) === "collapsed" ? "expanded" : "collapsed";
56
+ V(r), M.current?.(r, "user");
57
+ }, [f, e]);
58
+ if (e === "drawer") return /* @__PURE__ */ P(se, { children: [/* @__PURE__ */ d(re, {
59
+ isOpen: T,
60
+ onClick: Q,
61
+ className: B,
62
+ openNavigationLabel: G
63
+ }), /* @__PURE__ */ d(te, {
64
+ isOpen: T,
65
+ onClose: y,
61
66
  position: "left",
62
- defaultWidth: S !== null ? Math.min(S, b) : b,
63
- theme: E,
67
+ defaultWidth: H !== null ? Math.min(H, R) : R,
68
+ theme: S,
64
69
  classNames: {
65
- ...i,
66
- root: l("z-60", i?.root),
67
- panel: l(A({ mode: "expanded" }), "h-full border-r-0", O, i?.panel),
68
- content: l("gap-0", i?.content)
70
+ ...p,
71
+ root: u("z-60", p?.root),
72
+ panel: u(N({ mode: "expanded" }), "h-full border-r-0", z, p?.panel),
73
+ content: u("gap-0", p?.content)
69
74
  },
70
- children: /* @__PURE__ */ o(k.Provider, {
75
+ children: /* @__PURE__ */ d(I.Provider, {
71
76
  value: {
72
77
  mode: "expanded",
73
78
  isCollapsed: !1,
74
79
  expandOnHover: !1,
75
80
  animateOnHover: !1,
76
- separatorClassName: D,
77
- closeDrawer: h,
81
+ separatorClassName: E,
82
+ closeDrawer: y,
78
83
  canToggle: !1,
79
84
  toggleMode: () => {
80
85
  }
81
86
  },
82
- children: /* @__PURE__ */ o("div", {
87
+ children: /* @__PURE__ */ d("div", {
83
88
  className: "konstruct-sidebar group/sidebar flex flex-col flex-1 min-h-0",
84
89
  "data-mode": "expanded",
85
- style: L,
86
- children: y
90
+ style: O,
91
+ children: D
87
92
  })
88
93
  })
89
94
  })] });
90
- const d = z ?? t, K = N && d === "expanded", Q = {
91
- mode: d,
92
- isCollapsed: d === "collapsed",
93
- expandOnHover: j,
94
- animateOnHover: I,
95
- separatorClassName: D,
96
- closeDrawer: h,
95
+ const l = f ?? e, Z = $ && l === "expanded", ee = {
96
+ mode: l,
97
+ isCollapsed: l === "collapsed",
98
+ expandOnHover: C,
99
+ animateOnHover: _,
100
+ separatorClassName: E,
101
+ closeDrawer: y,
97
102
  canToggle: !0,
98
- toggleMode: J
103
+ toggleMode: Y
99
104
  };
100
- return /* @__PURE__ */ o(k.Provider, {
101
- value: Q,
102
- children: /* @__PURE__ */ F("aside", {
103
- ref: r,
104
- className: l("konstruct-sidebar", A({
105
- mode: d,
106
- className: O
105
+ return /* @__PURE__ */ d(I.Provider, {
106
+ value: ee,
107
+ children: /* @__PURE__ */ P("aside", {
108
+ ref: t,
109
+ className: u("konstruct-sidebar", N({
110
+ mode: l,
111
+ className: z
107
112
  })),
108
- "data-theme": E,
109
- "data-mode": d,
110
- style: L,
111
- children: [y, K && /* @__PURE__ */ o("div", {
113
+ "data-theme": S,
114
+ "data-mode": l,
115
+ style: O,
116
+ children: [D, Z && /* @__PURE__ */ d("div", {
112
117
  ref: n,
113
- className: l(re({ className: P })),
114
- onMouseDown: B
118
+ className: u(oe({ className: j })),
119
+ onMouseDown: K
115
120
  })]
116
121
  })
117
122
  });
118
123
  };
119
- oe.displayName = "Sidebar.Wrapper";
124
+ ae.displayName = "Sidebar.Wrapper";
120
125
  export {
121
- oe as Wrapper
126
+ ae as Wrapper
122
127
  };
@@ -1,4 +1,4 @@
1
- import { t as r } from "../../../HamburgerTrigger-DjHmNEJD.js";
1
+ import { t as r } from "../../../HamburgerTrigger-BgeS_nBA.js";
2
2
  import { CollapseTrigger as m } from "./CollapseTrigger/CollapseTrigger.js";
3
3
  import { Footer as p } from "./Footer/Footer.js";
4
4
  import { Label as f } from "./Label/Label.js";