@rio-cloud/rio-uikit 2.0.1 → 2.2.0

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 (567) hide show
  1. package/CircularProgress.d.ts +2 -0
  2. package/CircularProgress.js +5 -0
  3. package/CircularProgress.js.map +1 -0
  4. package/RadioCardGroup.d.ts +2 -0
  5. package/RadioCardGroup.js +7 -0
  6. package/RadioCardGroup.js.map +1 -0
  7. package/SearchHighlightText.d.ts +2 -0
  8. package/SearchHighlightText.js +5 -0
  9. package/SearchHighlightText.js.map +1 -0
  10. package/TextTruncateMiddle.d.ts +2 -0
  11. package/TextTruncateMiddle.js +5 -0
  12. package/TextTruncateMiddle.js.map +1 -0
  13. package/Tracker.d.ts +2 -0
  14. package/Tracker.js +5 -0
  15. package/Tracker.js.map +1 -0
  16. package/classNames.d.ts +2 -0
  17. package/classNames.js +5 -0
  18. package/classNames.js.map +1 -0
  19. package/components/accentBar/AccentBar.js +1 -1
  20. package/components/accentBar/AccentBar.js.map +1 -1
  21. package/components/actionBarItem/ActionBarItem.d.ts +2 -2
  22. package/components/actionBarItem/ActionBarItem.js +7 -7
  23. package/components/actionBarItem/ActionBarItem.js.map +1 -1
  24. package/components/actionBarItem/ActionBarItemIcon.js +1 -1
  25. package/components/actionBarItem/ActionBarItemIcon.js.map +1 -1
  26. package/components/actionBarItem/ActionBarItemList.js +1 -1
  27. package/components/actionBarItem/ActionBarItemList.js.map +1 -1
  28. package/components/actionBarItem/ActionBarItemListItem.js +1 -1
  29. package/components/actionBarItem/ActionBarItemListItem.js.map +1 -1
  30. package/components/actionBarItem/ActionBarItemListSeparator.js +1 -1
  31. package/components/actionBarItem/ActionBarItemListSeparator.js.map +1 -1
  32. package/components/actionBarItem/ActionBarItemPopoverContent.js +3 -3
  33. package/components/actionBarItem/ActionBarItemPopoverContent.js.map +1 -1
  34. package/components/actionBarItem/ActionBarOverlay.js +1 -1
  35. package/components/actionBarItem/ActionBarOverlay.js.map +1 -1
  36. package/components/activity/Activity.js +1 -1
  37. package/components/activity/Activity.js.map +1 -1
  38. package/components/animatedTextReveal/AnimatedTextReveal.js +1 -1
  39. package/components/animatedTextReveal/AnimatedTextReveal.js.map +1 -1
  40. package/components/applicationHeader/AppMenu.js +2 -2
  41. package/components/applicationHeader/AppMenu.js.map +1 -1
  42. package/components/applicationHeader/AppMenuDropdown.js +13 -11
  43. package/components/applicationHeader/AppMenuDropdown.js.map +1 -1
  44. package/components/applicationHeader/ApplicationHeader.d.ts +6 -7
  45. package/components/applicationHeader/ApplicationHeader.js +1 -1
  46. package/components/applicationHeader/ApplicationHeader.js.map +1 -1
  47. package/components/applicationHeader/MobileHeaderModal.js +8 -8
  48. package/components/applicationHeader/MobileHeaderModal.js.map +1 -1
  49. package/components/applicationHeader/MobileSubmoduleNavigation.js +1 -1
  50. package/components/applicationHeader/MobileSubmoduleNavigation.js.map +1 -1
  51. package/components/applicationHeader/NavItems.js +4 -4
  52. package/components/applicationHeader/NavItems.js.map +1 -1
  53. package/components/applicationLayout/ApplicationLayout.js +10 -10
  54. package/components/applicationLayout/ApplicationLayout.js.map +1 -1
  55. package/components/applicationLayout/ApplicationLayoutBody.js +2 -2
  56. package/components/applicationLayout/ApplicationLayoutBody.js.map +1 -1
  57. package/components/applicationLayout/ApplicationLayoutBodyBanner.js +1 -1
  58. package/components/applicationLayout/ApplicationLayoutBodyBanner.js.map +1 -1
  59. package/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +1 -1
  60. package/components/applicationLayout/ApplicationLayoutBodyBottomBar.js.map +1 -1
  61. package/components/applicationLayout/ApplicationLayoutBodyNavigation.js +1 -1
  62. package/components/applicationLayout/ApplicationLayoutBodyNavigation.js.map +1 -1
  63. package/components/applicationLayout/ApplicationLayoutHeader.js +1 -1
  64. package/components/applicationLayout/ApplicationLayoutHeader.js.map +1 -1
  65. package/components/applicationLayout/ApplicationLayoutSidebar.js +1 -1
  66. package/components/applicationLayout/ApplicationLayoutSidebar.js.map +1 -1
  67. package/components/applicationLayout/SubNavigation.d.ts +7 -0
  68. package/components/applicationLayout/SubNavigation.js +1 -1
  69. package/components/applicationLayout/SubNavigation.js.map +1 -1
  70. package/components/assetTree/AssetTree.d.ts +7 -0
  71. package/components/assetTree/AssetTree.js +1 -1
  72. package/components/assetTree/AssetTree.js.map +1 -1
  73. package/components/assetTree/Tree.d.ts +15 -0
  74. package/components/assetTree/Tree.js +1 -1
  75. package/components/assetTree/Tree.js.map +1 -1
  76. package/components/assetTree/TreeIcon.d.ts +30 -0
  77. package/components/assetTree/TreeIcon.js +16 -0
  78. package/components/assetTree/TreeIcon.js.map +1 -0
  79. package/components/assetTree/TreeLeaf.js +23 -23
  80. package/components/assetTree/TreeLeaf.js.map +1 -1
  81. package/components/assetTree/TreeNode.js +25 -25
  82. package/components/assetTree/TreeNode.js.map +1 -1
  83. package/components/assetTree/TreeNodeContainer.js +1 -1
  84. package/components/assetTree/TreeNodeContainer.js.map +1 -1
  85. package/components/assetTree/TreeOption.js +3 -3
  86. package/components/assetTree/TreeOption.js.map +1 -1
  87. package/components/assetTree/TreeOptions.js +4 -4
  88. package/components/assetTree/TreeOptions.js.map +1 -1
  89. package/components/assetTree/TreeRoot.js +3 -3
  90. package/components/assetTree/TreeRoot.js.map +1 -1
  91. package/components/assetTree/TreeSearch.d.ts +2 -0
  92. package/components/assetTree/TreeSearch.js +3 -3
  93. package/components/assetTree/TreeSearch.js.map +1 -1
  94. package/components/assetTree/TreeSidebar.js +1 -1
  95. package/components/assetTree/TreeSidebar.js.map +1 -1
  96. package/components/assetTree/TreeSidebarCategories.js +4 -4
  97. package/components/assetTree/TreeSidebarCategories.js.map +1 -1
  98. package/components/assetTree/TreeSummary.js +1 -1
  99. package/components/assetTree/TreeSummary.js.map +1 -1
  100. package/components/assetTree/TypeCounter.js +1 -1
  101. package/components/assetTree/TypeCounter.js.map +1 -1
  102. package/components/autosuggest/AutoSuggest.js +1 -1
  103. package/components/autosuggest/AutoSuggest.js.map +1 -1
  104. package/components/avatar/Avatar.js +1 -1
  105. package/components/avatar/Avatar.js.map +1 -1
  106. package/components/banner/Banner.js +1 -1
  107. package/components/banner/Banner.js.map +1 -1
  108. package/components/banner/BannerContent.js +1 -1
  109. package/components/banner/BannerContent.js.map +1 -1
  110. package/components/barList/BarList.d.ts +26 -0
  111. package/components/barList/BarList.js +1 -1
  112. package/components/barList/BarList.js.map +1 -1
  113. package/components/bottomSheet/BottomSheet.d.ts +17 -3
  114. package/components/bottomSheet/BottomSheet.js +1 -1
  115. package/components/bottomSheet/BottomSheet.js.map +1 -1
  116. package/components/bottomSheet/TimedBottomSheet.d.ts +10 -0
  117. package/components/bottomSheet/TimedBottomSheet.js.map +1 -1
  118. package/components/button/Button.d.ts +53 -7
  119. package/components/button/Button.js +87 -64
  120. package/components/button/Button.js.map +1 -1
  121. package/components/button/ButtonToolbar.js +1 -1
  122. package/components/button/ButtonToolbar.js.map +1 -1
  123. package/components/button/ToggleButton.d.ts +4 -1
  124. package/components/button/ToggleButton.js.map +1 -1
  125. package/components/calendarStripe/CalendarStripe.d.ts +1 -1
  126. package/components/calendarStripe/CalendarStripe.js +48 -50
  127. package/components/calendarStripe/CalendarStripe.js.map +1 -1
  128. package/components/card/Card.js +1 -1
  129. package/components/card/Card.js.map +1 -1
  130. package/components/charts/Area.d.ts +2 -2
  131. package/components/charts/Area.js.map +1 -1
  132. package/components/charts/Line.d.ts +2 -2
  133. package/components/charts/Line.js.map +1 -1
  134. package/components/charts/RadialBarChart.js +106 -103
  135. package/components/charts/RadialBarChart.js.map +1 -1
  136. package/components/checkbox/Checkbox.d.ts +0 -3
  137. package/components/checkbox/Checkbox.js +6 -6
  138. package/components/checkbox/Checkbox.js.map +1 -1
  139. package/components/circularProgress/CircularProgress.d.ts +139 -0
  140. package/components/circularProgress/CircularProgress.js +197 -0
  141. package/components/circularProgress/CircularProgress.js.map +1 -0
  142. package/components/clearableInput/ClearableInput.d.ts +21 -20
  143. package/components/clearableInput/ClearableInput.js +9 -9
  144. package/components/clearableInput/ClearableInput.js.map +1 -1
  145. package/components/collapse/Collapse.d.ts +3 -0
  146. package/components/collapse/Collapse.js +12 -12
  147. package/components/collapse/Collapse.js.map +1 -1
  148. package/components/contentLoader/ContentLoader.d.ts +10 -2
  149. package/components/contentLoader/ContentLoader.js.map +1 -1
  150. package/components/dataTabs/DataTabHeader.js +1 -1
  151. package/components/dataTabs/DataTabHeader.js.map +1 -1
  152. package/components/dataTabs/DataTabs.d.ts +6 -0
  153. package/components/dataTabs/DataTabs.js +4 -4
  154. package/components/dataTabs/DataTabs.js.map +1 -1
  155. package/components/datepicker/DatePicker.js +6 -6
  156. package/components/datepicker/DatePicker.js.map +1 -1
  157. package/components/datepicker/DateRangePicker.js +1 -1
  158. package/components/datepicker/DateRangePicker.js.map +1 -1
  159. package/components/datepicker/DayPicker.js +1 -1
  160. package/components/datepicker/DayPicker.js.map +1 -1
  161. package/components/dialog/ConfirmationDialog.d.ts +22 -0
  162. package/components/dialog/ConfirmationDialog.js.map +1 -1
  163. package/components/dialog/Dialog.d.ts +13 -1
  164. package/components/dialog/Dialog.js +55 -55
  165. package/components/dialog/Dialog.js.map +1 -1
  166. package/components/dialog/DialogBody.js +1 -1
  167. package/components/dialog/DialogBody.js.map +1 -1
  168. package/components/dialog/DialogFooter.js +1 -1
  169. package/components/dialog/DialogFooter.js.map +1 -1
  170. package/components/dialog/DialogHeader.js +1 -1
  171. package/components/dialog/DialogHeader.js.map +1 -1
  172. package/components/dialog/MediaDialog.js +1 -1
  173. package/components/dialog/MediaDialog.js.map +1 -1
  174. package/components/dialog/ReleaseNotesDialog.d.ts +3 -3
  175. package/components/dialog/ReleaseNotesDialog.js.map +1 -1
  176. package/components/dialog/SplitDialog.js +1 -1
  177. package/components/dialog/SplitDialog.js.map +1 -1
  178. package/components/divider/Divider.js +1 -1
  179. package/components/divider/Divider.js.map +1 -1
  180. package/components/dropdown/ButtonDropdown.d.ts +4 -0
  181. package/components/dropdown/ButtonDropdown.js +52 -52
  182. package/components/dropdown/ButtonDropdown.js.map +1 -1
  183. package/components/dropdown/DropdownSubmenu.d.ts +4 -0
  184. package/components/dropdown/DropdownSubmenu.js +3 -3
  185. package/components/dropdown/DropdownSubmenu.js.map +1 -1
  186. package/components/dropdown/DropdownToggleButton.d.ts +1 -1
  187. package/components/dropdown/DropdownToggleButton.js +4 -3
  188. package/components/dropdown/DropdownToggleButton.js.map +1 -1
  189. package/components/dropdown/SplitCaretButton.js +6 -6
  190. package/components/dropdown/SplitCaretButton.js.map +1 -1
  191. package/components/editableContent/EditableContent.d.ts +6 -0
  192. package/components/editableContent/EditableContent.js +1 -1
  193. package/components/editableContent/EditableContent.js.map +1 -1
  194. package/components/ellipsis/TextTruncateMiddle.d.ts +23 -0
  195. package/components/ellipsis/TextTruncateMiddle.js +21 -0
  196. package/components/ellipsis/TextTruncateMiddle.js.map +1 -0
  197. package/components/expander/ExpanderList.d.ts +3 -0
  198. package/components/expander/ExpanderList.js +5 -5
  199. package/components/expander/ExpanderList.js.map +1 -1
  200. package/components/expander/ExpanderPanel.d.ts +14 -4
  201. package/components/expander/ExpanderPanel.js +1 -1
  202. package/components/expander/ExpanderPanel.js.map +1 -1
  203. package/components/fade/Fade.d.ts +1 -1
  204. package/components/fade/Fade.js.map +1 -1
  205. package/components/feedback/FeedbackRating.js +1 -1
  206. package/components/feedback/FeedbackRating.js.map +1 -1
  207. package/components/feedback/FeedbackReactions.js +1 -1
  208. package/components/feedback/FeedbackReactions.js.map +1 -1
  209. package/components/filepicker/FilePicker.d.ts +0 -2
  210. package/components/filepicker/FilePicker.js.map +1 -1
  211. package/components/formLabel/FormLabel.js +6 -9
  212. package/components/formLabel/FormLabel.js.map +1 -1
  213. package/components/formLabel/LabeledElement.js +1 -1
  214. package/components/formLabel/LabeledElement.js.map +1 -1
  215. package/components/groupedItemList/GroupedItemList.d.ts +10 -7
  216. package/components/groupedItemList/GroupedItemList.js.map +1 -1
  217. package/components/listMenu/ListMenu.js +2 -5
  218. package/components/listMenu/ListMenu.js.map +1 -1
  219. package/components/listMenu/ListMenuGroup.d.ts +2 -1
  220. package/components/listMenu/ListMenuGroup.js +2 -2
  221. package/components/listMenu/ListMenuGroup.js.map +1 -1
  222. package/components/loadMore/LoadMoreButton.js +1 -1
  223. package/components/loadMore/LoadMoreButton.js.map +1 -1
  224. package/components/loadMore/LoadMoreProgress.js +1 -1
  225. package/components/loadMore/LoadMoreProgress.js.map +1 -1
  226. package/components/map/components/Map.js.map +1 -1
  227. package/components/map/components/constants.js.map +1 -1
  228. package/components/map/components/features/ContextMenuItem.d.ts +1 -1
  229. package/components/map/components/features/ContextMenuItem.js +2 -17
  230. package/components/map/components/features/ContextMenuItem.js.map +1 -1
  231. package/components/map/components/features/MapSettings.js +4 -4
  232. package/components/map/components/features/MapSettings.js.map +1 -1
  233. package/components/map/components/features/basics/Polyline.d.ts +4 -1
  234. package/components/map/components/features/basics/Polyline.js +1 -1
  235. package/components/map/components/features/basics/Polyline.js.map +1 -1
  236. package/components/map/components/features/layers/MarkerLayer.d.ts +3 -1
  237. package/components/map/components/features/layers/MarkerLayer.js.map +1 -1
  238. package/components/map/components/features/layers/clustering/ClusterLayer.js +1 -1
  239. package/components/map/components/features/layers/clustering/ClusterLayer.js.map +1 -1
  240. package/components/map/components/features/layers/clustering/SimpleClusterLayer.d.ts +3 -2
  241. package/components/map/components/features/layers/clustering/SimpleClusterLayer.js.map +1 -1
  242. package/components/map/components/features/layers/overlayLayers/RoadRestrictionLayer.js +7 -7
  243. package/components/map/components/features/layers/overlayLayers/RoadRestrictionLayer.js.map +1 -1
  244. package/components/map/components/features/layers/overlayLayers/TrafficLayer.js +4 -4
  245. package/components/map/components/features/layers/overlayLayers/TrafficLayer.js.map +1 -1
  246. package/components/map/components/features/settings/MapSettingsItem.js +1 -1
  247. package/components/map/components/features/settings/MapSettingsItem.js.map +1 -1
  248. package/components/map/components/features/settings/MapSettingsPanel.js +6 -20
  249. package/components/map/components/features/settings/MapSettingsPanel.js.map +1 -1
  250. package/components/map/components/features/settings/MapSettingsTile.js +87 -61
  251. package/components/map/components/features/settings/MapSettingsTile.js.map +1 -1
  252. package/components/map/components/features/settings/ZoomButtons.js +1 -1
  253. package/components/map/components/features/settings/ZoomButtons.js.map +1 -1
  254. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.d.ts +38 -1
  255. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +128 -92
  256. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js.map +1 -1
  257. package/components/map/utils/clustering.d.ts +6 -1
  258. package/components/map/utils/clustering.js +25 -19
  259. package/components/map/utils/clustering.js.map +1 -1
  260. package/components/map/utils/eventHandling.js +9 -9
  261. package/components/map/utils/eventHandling.js.map +1 -1
  262. package/components/map/utils/mapUtils.d.ts +6 -6
  263. package/components/map/utils/mapUtils.js +14 -19
  264. package/components/map/utils/mapUtils.js.map +1 -1
  265. package/components/map/utils/rendering.d.ts +1 -1
  266. package/components/map/utils/rendering.js +23 -23
  267. package/components/map/utils/rendering.js.map +1 -1
  268. package/components/mapMarker/ClusterMapMarker.js +1 -1
  269. package/components/mapMarker/ClusterMapMarker.js.map +1 -1
  270. package/components/mapMarker/SingleMapMarker.js +1 -1
  271. package/components/mapMarker/SingleMapMarker.js.map +1 -1
  272. package/components/menuItems/MenuItem.d.ts +23 -0
  273. package/components/menuItems/MenuItem.js +1 -1
  274. package/components/menuItems/MenuItem.js.map +1 -1
  275. package/components/menuItems/MenuItemList.js +1 -1
  276. package/components/menuItems/MenuItemList.js.map +1 -1
  277. package/components/navigation/AppNavigationBar.js +4 -4
  278. package/components/navigation/AppNavigationBar.js.map +1 -1
  279. package/components/noData/NoData.js +1 -1
  280. package/components/noData/NoData.js.map +1 -1
  281. package/components/notification/Notification.js +4 -4
  282. package/components/notification/Notification.js.map +1 -1
  283. package/components/numberControl/NumberControl.js +4 -4
  284. package/components/numberControl/NumberControl.js.map +1 -1
  285. package/components/numberInput/NumberInput.js +1 -1
  286. package/components/numberInput/NumberInput.js.map +1 -1
  287. package/components/onboarding/OnboardingTip.d.ts +18 -12
  288. package/components/onboarding/OnboardingTip.js +4 -4
  289. package/components/onboarding/OnboardingTip.js.map +1 -1
  290. package/components/overlay/OverlayTrigger.d.ts +43 -1
  291. package/components/overlay/OverlayTrigger.js.map +1 -1
  292. package/components/page/Page.js +1 -1
  293. package/components/page/Page.js.map +1 -1
  294. package/components/pager/Pager.d.ts +3 -0
  295. package/components/pager/Pager.js +1 -1
  296. package/components/pager/Pager.js.map +1 -1
  297. package/components/popover/Popover.d.ts +1 -0
  298. package/components/popover/Popover.js.map +1 -1
  299. package/components/preloader/ImagePreloader.d.ts +1 -1
  300. package/components/preloader/ImagePreloader.js.map +1 -1
  301. package/components/radiobutton/RadioButton.d.ts +10 -6
  302. package/components/radiobutton/RadioButton.js +5 -5
  303. package/components/radiobutton/RadioButton.js.map +1 -1
  304. package/components/radiobutton/RadioCardGroup.d.ts +86 -0
  305. package/components/radiobutton/RadioCardGroup.js +110 -0
  306. package/components/radiobutton/RadioCardGroup.js.map +1 -0
  307. package/components/releaseNotes/ReleaseNotes.d.ts +0 -3
  308. package/components/releaseNotes/ReleaseNotes.js.map +1 -1
  309. package/components/resizer/Resizer.d.ts +17 -3
  310. package/components/resizer/Resizer.js +1 -1
  311. package/components/resizer/Resizer.js.map +1 -1
  312. package/components/responsiveColumnStripe/ResponsiveColumnStripe.js +1 -1
  313. package/components/responsiveColumnStripe/ResponsiveColumnStripe.js.map +1 -1
  314. package/components/rioglyph/Rioglyph.d.ts +20 -8
  315. package/components/rioglyph/Rioglyph.js +1 -1
  316. package/components/rioglyph/Rioglyph.js.map +1 -1
  317. package/components/rioglyph/RioglyphIconType.d.ts +1 -1
  318. package/components/rules/RuleConnector.js +1 -1
  319. package/components/rules/RuleConnector.js.map +1 -1
  320. package/components/rules/RuleContainer.js +27 -27
  321. package/components/rules/RuleContainer.js.map +1 -1
  322. package/components/rules/RulesWrapper.js +1 -1
  323. package/components/rules/RulesWrapper.js.map +1 -1
  324. package/components/saveableInput/SaveableDateInput.d.ts +20 -2
  325. package/components/saveableInput/SaveableDateInput.js +1 -1
  326. package/components/saveableInput/SaveableDateInput.js.map +1 -1
  327. package/components/saveableInput/SaveableInput.d.ts +10 -2
  328. package/components/saveableInput/SaveableInput.js +49 -49
  329. package/components/saveableInput/SaveableInput.js.map +1 -1
  330. package/components/searchHighlight/SearchHighlightText.d.ts +28 -0
  331. package/components/searchHighlight/SearchHighlightText.js +15 -0
  332. package/components/searchHighlight/SearchHighlightText.js.map +1 -0
  333. package/components/selects/BaseSelectDropdown.js +90 -79
  334. package/components/selects/BaseSelectDropdown.js.map +1 -1
  335. package/components/selects/ClearButton.js +4 -4
  336. package/components/selects/ClearButton.js.map +1 -1
  337. package/components/selects/Multiselect.js +6 -6
  338. package/components/selects/Multiselect.js.map +1 -1
  339. package/components/selects/MultiselectToggleFilter.js +4 -4
  340. package/components/selects/MultiselectToggleFilter.js.map +1 -1
  341. package/components/selects/MultiselectToggleSelection.js +1 -1
  342. package/components/selects/MultiselectToggleSelection.js.map +1 -1
  343. package/components/selects/Select.d.ts +5 -0
  344. package/components/selects/Select.js +93 -93
  345. package/components/selects/Select.js.map +1 -1
  346. package/components/selects/SelectFilter.js +1 -1
  347. package/components/selects/SelectFilter.js.map +1 -1
  348. package/components/selects/WithFeedbackAndAddon.js +1 -1
  349. package/components/selects/WithFeedbackAndAddon.js.map +1 -1
  350. package/components/sidebars/Sidebar.d.ts +19 -3
  351. package/components/sidebars/Sidebar.js +54 -54
  352. package/components/sidebars/Sidebar.js.map +1 -1
  353. package/components/sidebars/SidebarBackdrop.js +4 -4
  354. package/components/sidebars/SidebarBackdrop.js.map +1 -1
  355. package/components/sidebars/SidebarFooter.js +1 -1
  356. package/components/sidebars/SidebarFooter.js.map +1 -1
  357. package/components/sidebars/SidebarFullscreenToggle.js +4 -4
  358. package/components/sidebars/SidebarFullscreenToggle.js.map +1 -1
  359. package/components/slider/RangeSlider.d.ts +15 -0
  360. package/components/slider/RangeSlider.js +1 -1
  361. package/components/slider/RangeSlider.js.map +1 -1
  362. package/components/slider/Slider.d.ts +9 -0
  363. package/components/slider/Slider.js +1 -1
  364. package/components/slider/Slider.js.map +1 -1
  365. package/components/smoothScrollbars/SmoothScrollbars.d.ts +44 -0
  366. package/components/smoothScrollbars/SmoothScrollbars.js +1 -1
  367. package/components/smoothScrollbars/SmoothScrollbars.js.map +1 -1
  368. package/components/spinner/Spinner.d.ts +3 -3
  369. package/components/spinner/Spinner.js +5 -4
  370. package/components/spinner/Spinner.js.map +1 -1
  371. package/components/states/CustomState.d.ts +69 -1
  372. package/components/states/CustomState.js +1 -1
  373. package/components/states/CustomState.js.map +1 -1
  374. package/components/states/EmptyState.d.ts +1 -1
  375. package/components/states/EmptyState.js.map +1 -1
  376. package/components/states/ErrorState.d.ts +1 -1
  377. package/components/states/ErrorState.js.map +1 -1
  378. package/components/states/ForbiddenState.d.ts +1 -1
  379. package/components/states/ForbiddenState.js.map +1 -1
  380. package/components/states/MaintenanceState.d.ts +1 -1
  381. package/components/states/MaintenanceState.js.map +1 -1
  382. package/components/states/NotBookedState.d.ts +1 -1
  383. package/components/states/NotBookedState.js.map +1 -1
  384. package/components/states/NotFoundState.d.ts +1 -1
  385. package/components/states/NotFoundState.js.map +1 -1
  386. package/components/states/StateButton.js +1 -1
  387. package/components/states/StateButton.js.map +1 -1
  388. package/components/states/StateIcon.d.ts +14 -1
  389. package/components/states/StateIcon.js.map +1 -1
  390. package/components/statsWidget/StatsWidget.d.ts +2 -0
  391. package/components/statsWidget/StatsWidget.js +1 -1
  392. package/components/statsWidget/StatsWidget.js.map +1 -1
  393. package/components/statsWidget/StatsWidgetBody.d.ts +1 -0
  394. package/components/statsWidget/StatsWidgetBody.js +1 -1
  395. package/components/statsWidget/StatsWidgetBody.js.map +1 -1
  396. package/components/statsWidget/StatsWidgetFooter.js +1 -1
  397. package/components/statsWidget/StatsWidgetFooter.js.map +1 -1
  398. package/components/statsWidget/StatsWidgetHeader.js +1 -1
  399. package/components/statsWidget/StatsWidgetHeader.js.map +1 -1
  400. package/components/statsWidget/StatsWidgetNumber.d.ts +2 -0
  401. package/components/statsWidget/StatsWidgetNumber.js +2 -2
  402. package/components/statsWidget/StatsWidgetNumber.js.map +1 -1
  403. package/components/statsWidget/StatsWidgetSpacer.js +1 -1
  404. package/components/statsWidget/StatsWidgetSpacer.js.map +1 -1
  405. package/components/statsWidget/StatsWidgets.js +1 -1
  406. package/components/statsWidget/StatsWidgets.js.map +1 -1
  407. package/components/statusBar/StatusBar.d.ts +98 -3
  408. package/components/statusBar/StatusBar.js +24 -17
  409. package/components/statusBar/StatusBar.js.map +1 -1
  410. package/components/statusBar/StatusBarIcon.d.ts +2 -2
  411. package/components/statusBar/StatusBarIcon.js +4 -4
  412. package/components/statusBar/StatusBarIcon.js.map +1 -1
  413. package/components/statusBar/StatusBarLabel.d.ts +2 -2
  414. package/components/statusBar/StatusBarLabel.js +5 -7
  415. package/components/statusBar/StatusBarLabel.js.map +1 -1
  416. package/components/statusBar/StatusBarProgressBar.d.ts +1 -1
  417. package/components/statusBar/StatusBarProgressBar.js +1 -1
  418. package/components/statusBar/StatusBarProgressBar.js.map +1 -1
  419. package/components/steppedProgressBar/SteppedProgressBar.d.ts +1 -1
  420. package/components/steppedProgressBar/SteppedProgressBar.js +1 -1
  421. package/components/steppedProgressBar/SteppedProgressBar.js.map +1 -1
  422. package/components/switch/Switch.d.ts +28 -1
  423. package/components/switch/Switch.js +77 -35
  424. package/components/switch/Switch.js.map +1 -1
  425. package/components/table/SortArrowDown.d.ts +1 -1
  426. package/components/table/SortArrowDown.js.map +1 -1
  427. package/components/table/SortArrowUp.d.ts +1 -1
  428. package/components/table/SortArrowUp.js.map +1 -1
  429. package/components/table/TableCardsSorting.js +4 -4
  430. package/components/table/TableCardsSorting.js.map +1 -1
  431. package/components/table/TableHead.js +1 -1
  432. package/components/table/TableHead.js.map +1 -1
  433. package/components/table/TableSearch.js +1 -1
  434. package/components/table/TableSearch.js.map +1 -1
  435. package/components/table/TableSettingsColumnButtons.d.ts +1 -1
  436. package/components/table/TableSettingsColumnButtons.js +1 -1
  437. package/components/table/TableSettingsColumnButtons.js.map +1 -1
  438. package/components/table/TableSettingsColumnDetails.d.ts +1 -1
  439. package/components/table/TableSettingsColumnDetails.js +1 -1
  440. package/components/table/TableSettingsColumnDetails.js.map +1 -1
  441. package/components/table/TableSettingsDialog.d.ts +56 -1
  442. package/components/table/TableSettingsDialog.js +170 -144
  443. package/components/table/TableSettingsDialog.js.map +1 -1
  444. package/components/table/TableSettingsDialogFooter.js +9 -9
  445. package/components/table/TableSettingsDialogFooter.js.map +1 -1
  446. package/components/table/TableSettingsListContainer.d.ts +1 -1
  447. package/components/table/TableSettingsListContainer.js.map +1 -1
  448. package/components/table/TableSettingsListItem.d.ts +1 -1
  449. package/components/table/TableSettingsListItem.js +8 -8
  450. package/components/table/TableSettingsListItem.js.map +1 -1
  451. package/components/table/TableToolbar.js +1 -1
  452. package/components/table/TableToolbar.js.map +1 -1
  453. package/components/table/TableViewToggles.d.ts +21 -1
  454. package/components/table/TableViewToggles.js +1 -1
  455. package/components/table/TableViewToggles.js.map +1 -1
  456. package/components/tag/Tag.d.ts +7 -2
  457. package/components/tag/Tag.js +1 -1
  458. package/components/tag/Tag.js.map +1 -1
  459. package/components/tag/TagList.js +1 -1
  460. package/components/tag/TagList.js.map +1 -1
  461. package/components/tagManager/CustomSuggestionItem.js +1 -1
  462. package/components/tagManager/CustomSuggestionItem.js.map +1 -1
  463. package/components/tagManager/TagManager.d.ts +29 -2
  464. package/components/tagManager/TagManager.js +6 -6
  465. package/components/tagManager/TagManager.js.map +1 -1
  466. package/components/tagManager/TagManagerItemList.d.ts +1 -1
  467. package/components/tagManager/TagManagerItemList.js +1 -1
  468. package/components/tagManager/TagManagerItemList.js.map +1 -1
  469. package/components/teaser/Teaser.d.ts +57 -55
  470. package/components/teaser/Teaser.js +1 -1
  471. package/components/teaser/Teaser.js.map +1 -1
  472. package/components/teaser/TeaserContainer.d.ts +1 -1
  473. package/components/teaser/TeaserContainer.js +1 -1
  474. package/components/teaser/TeaserContainer.js.map +1 -1
  475. package/components/timepicker/TimePicker.d.ts +20 -0
  476. package/components/timepicker/TimePicker.js +153 -99
  477. package/components/timepicker/TimePicker.js.map +1 -1
  478. package/components/tooltip/SimpleTooltip.d.ts +22 -4
  479. package/components/tooltip/SimpleTooltip.js.map +1 -1
  480. package/components/tooltip/Tooltip.d.ts +22 -2
  481. package/components/tooltip/Tooltip.js +1 -1
  482. package/components/tooltip/Tooltip.js.map +1 -1
  483. package/components/tracker/Tracker.d.ts +85 -0
  484. package/components/tracker/Tracker.js +54 -0
  485. package/components/tracker/Tracker.js.map +1 -0
  486. package/components/tracker/TrackerBlock.d.ts +11 -0
  487. package/components/tracker/TrackerBlock.js +34 -0
  488. package/components/tracker/TrackerBlock.js.map +1 -0
  489. package/components/video/ResponsiveVideo.d.ts +8 -3
  490. package/components/video/ResponsiveVideo.js +1 -1
  491. package/components/video/ResponsiveVideo.js.map +1 -1
  492. package/hooks/useCookies.d.ts +79 -0
  493. package/hooks/useCookies.js +33 -0
  494. package/hooks/useCookies.js.map +1 -0
  495. package/hooks/useInterval.js +5 -5
  496. package/hooks/useInterval.js.map +1 -1
  497. package/hooks/useIsFocusWithin.js +3 -3
  498. package/hooks/useIsFocusWithin.js.map +1 -1
  499. package/hooks/useKey.d.ts +1 -1
  500. package/hooks/useKey.js.map +1 -1
  501. package/hooks/useLatest.d.ts +16 -0
  502. package/hooks/useLatest.js +11 -0
  503. package/hooks/useLatest.js.map +1 -0
  504. package/hooks/useOnboarding.d.ts +86 -80
  505. package/hooks/useOnboarding.js.map +1 -1
  506. package/hooks/usePostMessage.d.ts +2 -1
  507. package/hooks/usePostMessage.js.map +1 -1
  508. package/hooks/useRioCookieConsent.d.ts +49 -0
  509. package/hooks/useRioCookieConsent.js +44 -0
  510. package/hooks/useRioCookieConsent.js.map +1 -0
  511. package/hooks/useSearch.d.ts +1 -1
  512. package/hooks/useSearch.js +28 -17
  513. package/hooks/useSearch.js.map +1 -1
  514. package/hooks/useSearchHighlight.d.ts +60 -0
  515. package/hooks/useSearchHighlight.js +54 -0
  516. package/hooks/useSearchHighlight.js.map +1 -0
  517. package/hooks/useTableExport.js.map +1 -1
  518. package/hooks/useTimeout.js +11 -11
  519. package/hooks/useTimeout.js.map +1 -1
  520. package/hooks/useUncontrollable.d.ts +1 -1
  521. package/hooks/useUncontrollable.js.map +1 -1
  522. package/hooks/useUrlState.d.ts +62 -0
  523. package/hooks/useUrlState.js +137 -0
  524. package/hooks/useUrlState.js.map +1 -0
  525. package/mergeClassNameOverrides.d.ts +1 -0
  526. package/mergeClassNameOverrides.js +5 -0
  527. package/mergeClassNameOverrides.js.map +1 -0
  528. package/package.json +18 -21
  529. package/routeUtils.js +11 -5
  530. package/routeUtils.js.map +1 -1
  531. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +1 -1
  532. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js.map +1 -1
  533. package/useCookies.d.ts +2 -0
  534. package/useCookies.js +5 -0
  535. package/useCookies.js.map +1 -0
  536. package/useRioCookieConsent.d.ts +2 -0
  537. package/useRioCookieConsent.js +5 -0
  538. package/useRioCookieConsent.js.map +1 -0
  539. package/useSearchHighlight.d.ts +2 -0
  540. package/useSearchHighlight.js +6 -0
  541. package/useSearchHighlight.js.map +1 -0
  542. package/useUrlState.d.ts +2 -0
  543. package/useUrlState.js +5 -0
  544. package/useUrlState.js.map +1 -0
  545. package/utils/classNames.d.ts +3 -0
  546. package/utils/classNames.js +5 -0
  547. package/utils/classNames.js.map +1 -0
  548. package/utils/colorScheme.js +14 -13
  549. package/utils/colorScheme.js.map +1 -1
  550. package/utils/cssuseragent.js.map +1 -1
  551. package/utils/mergeClassNameOverrides.d.ts +1 -0
  552. package/utils/mergeClassNameOverrides.js +55 -0
  553. package/utils/mergeClassNameOverrides.js.map +1 -0
  554. package/utils/routeUtils.d.ts +122 -13
  555. package/utils/routeUtils.js +89 -31
  556. package/utils/routeUtils.js.map +1 -1
  557. package/utils/scrollItemIntoView.js +12 -11
  558. package/utils/scrollItemIntoView.js.map +1 -1
  559. package/utils/urlFeatureToggles.js +19 -20
  560. package/utils/urlFeatureToggles.js.map +1 -1
  561. package/version.d.ts +1 -1
  562. package/version.js +1 -1
  563. package/version.js.map +1 -1
  564. package/components/states/BaseStateProps.d.ts +0 -66
  565. package/components/statusBar/StatusBar.types.d.ts +0 -85
  566. package/components/table/TableSettingsDialog.types.d.ts +0 -39
  567. package/components/tagManager/TagManagerTag.d.ts +0 -5
@@ -0,0 +1,110 @@
1
+ import { jsx as d, jsxs as b } from "react/jsx-runtime";
2
+ import { createContext as P, useState as x, Children as j, isValidElement as v, cloneElement as B, useContext as L } from "react";
3
+ import c from "../../utils/classNames.js";
4
+ import S from "./RadioButton.js";
5
+ const V = P(void 0), A = (o, t, l, s) => {
6
+ if (s === "stacked") {
7
+ const n = t === 0, a = t === l - 1;
8
+ return c(
9
+ "padding-15 border",
10
+ n && "rounded-top-left rounded-top-right",
11
+ !n && "margin-top--1",
12
+ a && "rounded-bottom-left rounded-bottom-right",
13
+ o && "border-color-highlight bg-highlight-decent z-index-1"
14
+ );
15
+ }
16
+ if (s === "stacked-horizontal") {
17
+ const n = t === 0, a = t === l - 1;
18
+ return c(
19
+ "padding-15 border",
20
+ n && "rounded-top-left rounded-bottom-left",
21
+ !n && "margin-left--1",
22
+ a && "rounded-top-right rounded-bottom-right",
23
+ o && "border-color-highlight bg-highlight-decent z-index-1"
24
+ );
25
+ }
26
+ return c("padding-15 border rounded", o && "border-color-highlight");
27
+ }, N = (o) => {
28
+ const { value: t, disabled: l = !1, className: s, children: n, _itemIndex: a = 0, _itemsCount: u = 1, ...h } = o, r = L(V);
29
+ if (!r)
30
+ throw new Error("RadioCardItem must be used inside RadioCardGroup.");
31
+ const m = r.selectedValue === t;
32
+ return /* @__PURE__ */ d(
33
+ S,
34
+ {
35
+ ...h,
36
+ name: r.name,
37
+ value: t,
38
+ custom: !0,
39
+ checked: m,
40
+ onChange: (g) => r.onSelect(t, g),
41
+ disabled: l,
42
+ className: c(
43
+ A(m, a, u, r.variant),
44
+ r.focusedValue === t && !m && "border-color-gray",
45
+ r.cardClassName,
46
+ s
47
+ ),
48
+ onFocus: () => r.setFocusedValue(t),
49
+ onBlur: () => r.setFocusedValue(void 0),
50
+ children: /* @__PURE__ */ d("div", { className: "radio-text-wrapper display-flex", children: n })
51
+ }
52
+ );
53
+ }, O = ({ className: o, ...t }) => /* @__PURE__ */ d("span", { className: c("radio-text", o), ...t }), K = (o) => {
54
+ const {
55
+ name: t,
56
+ options: l = [],
57
+ value: s,
58
+ defaultValue: n,
59
+ variant: a = "inline",
60
+ gap: u = "gap-15",
61
+ onChange: h,
62
+ className: r,
63
+ cardClassName: m,
64
+ children: g,
65
+ ...y
66
+ } = o, p = s != null, [I, R] = x(n), [k, F] = x(), _ = p ? s : I, z = (e) => (i) => {
67
+ p || R(e), h?.(e, i);
68
+ }, w = c(
69
+ a === "stacked" && "display-flex flex-column",
70
+ a === "stacked-horizontal" && "display-flex",
71
+ a === "inline" && "display-flex",
72
+ a === "inline" && u,
73
+ r
74
+ ), E = {
75
+ name: t,
76
+ selectedValue: _,
77
+ variant: a,
78
+ cardClassName: m,
79
+ focusedValue: k,
80
+ setFocusedValue: F,
81
+ onSelect: (e, i) => z(e)(i)
82
+ }, f = j.toArray(g).filter((e) => v(e)), C = f.map((e, i) => !v(e) || e.type !== N ? e : B(e, {
83
+ _itemIndex: i,
84
+ _itemsCount: f.length
85
+ })), G = l.map((e, i) => /* @__PURE__ */ b(
86
+ N,
87
+ {
88
+ value: e.value,
89
+ disabled: e.disabled,
90
+ className: e.className,
91
+ _itemIndex: i,
92
+ _itemsCount: l.length,
93
+ children: [
94
+ /* @__PURE__ */ d(O, {}),
95
+ /* @__PURE__ */ b("div", { className: "margin-left-5 margin-right-5", children: [
96
+ /* @__PURE__ */ d("div", { className: "text-medium", children: e.label }),
97
+ e.description && /* @__PURE__ */ d("div", { className: "text-color-dark", children: e.description })
98
+ ] })
99
+ ]
100
+ },
101
+ e.value
102
+ ));
103
+ return /* @__PURE__ */ d(V.Provider, { value: E, children: /* @__PURE__ */ d("div", { className: w, ...y, children: C.length > 0 ? C : G }) });
104
+ };
105
+ export {
106
+ O as RadioCardIndicator,
107
+ N as RadioCardItem,
108
+ K as default
109
+ };
110
+ //# sourceMappingURL=RadioCardGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioCardGroup.js","sources":["../../../src/components/radiobutton/RadioCardGroup.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n createContext,\n type ChangeEvent,\n type HTMLProps,\n isValidElement,\n type ReactNode,\n useContext,\n useState,\n} from 'react';\n\nimport classNames from '../../utils/classNames';\nimport RadioButton from './RadioButton';\n\nexport type RadioCardOption = {\n /**\n * Value passed to the underlying input element.\n */\n value: string;\n\n /**\n * Card headline content.\n */\n label: string | ReactNode;\n\n /**\n * Optional description shown below the card headline.\n */\n description?: string | ReactNode;\n\n /**\n * Disables the option.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Additional classes to apply to a single card.\n */\n className?: string;\n};\n\nexport type RadioCardGroupProps = Omit<HTMLProps<HTMLDivElement>, 'onChange' | 'defaultValue'> & {\n /**\n * Name used for all radios in this group.\n */\n name: string;\n\n /**\n * List of selectable options.\n */\n options?: RadioCardOption[];\n\n /**\n * Selected value (controlled usage).\n */\n value?: string;\n\n /**\n * Initially selected value (uncontrolled usage).\n */\n defaultValue?: string;\n\n /**\n * Card layout variant.\n *\n * Possible values are: `'inline'`, `'stacked'` or `'stacked-horizontal'`.\n *\n * @default 'inline'\n */\n variant?: 'inline' | 'stacked' | 'stacked-horizontal';\n\n /**\n * Gap utility class used for the inline layout.\n *\n * @default 'gap-15'\n */\n gap?: string;\n\n /**\n * Callback invoked when selection changes.\n */\n onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;\n\n /**\n * Additional classes applied to each card.\n */\n cardClassName?: string;\n};\n\ntype RadioCardGroupContextValue = {\n name: string;\n selectedValue?: string;\n variant: 'inline' | 'stacked' | 'stacked-horizontal';\n cardClassName?: string;\n focusedValue?: string;\n setFocusedValue: (value?: string) => void;\n onSelect: (value: string, event: ChangeEvent<HTMLInputElement>) => void;\n};\n\nconst RadioCardGroupContext = createContext<RadioCardGroupContextValue | undefined>(undefined);\n\nconst getCardClassName = (\n isSelected: boolean,\n index: number,\n optionsCount: number,\n variant: 'inline' | 'stacked' | 'stacked-horizontal'\n) => {\n if (variant === 'stacked') {\n const isFirst = index === 0;\n const isLast = index === optionsCount - 1;\n\n return classNames(\n 'padding-15 border',\n isFirst && 'rounded-top-left rounded-top-right',\n !isFirst && 'margin-top--1',\n isLast && 'rounded-bottom-left rounded-bottom-right',\n isSelected && 'border-color-highlight bg-highlight-decent z-index-1'\n );\n }\n\n if (variant === 'stacked-horizontal') {\n const isFirst = index === 0;\n const isLast = index === optionsCount - 1;\n\n return classNames(\n 'padding-15 border',\n isFirst && 'rounded-top-left rounded-bottom-left',\n !isFirst && 'margin-left--1',\n isLast && 'rounded-top-right rounded-bottom-right',\n isSelected && 'border-color-highlight bg-highlight-decent z-index-1'\n );\n }\n\n return classNames('padding-15 border rounded', isSelected && 'border-color-highlight');\n};\n\ntype RadioCardItemProps = Omit<HTMLProps<HTMLLabelElement>, 'onClick' | 'onChange' | 'onBlur' | 'onFocus'> & {\n /**\n * Value passed to the underlying radio input.\n */\n value: string;\n\n /**\n * Disables this radio card.\n *\n * @default false\n */\n disabled?: boolean;\n};\n\ntype InternalRadioCardItemProps = {\n _itemIndex?: number;\n _itemsCount?: number;\n};\n\nexport const RadioCardItem = (props: RadioCardItemProps & InternalRadioCardItemProps) => {\n const { value, disabled = false, className, children, _itemIndex = 0, _itemsCount = 1, ...remainingProps } = props;\n\n const context = useContext(RadioCardGroupContext);\n\n if (!context) {\n throw new Error('RadioCardItem must be used inside RadioCardGroup.');\n }\n\n const isSelected = context.selectedValue === value;\n\n return (\n <RadioButton\n {...remainingProps}\n name={context.name}\n value={value}\n custom\n checked={isSelected}\n onChange={event => context.onSelect(value, event as ChangeEvent<HTMLInputElement>)}\n disabled={disabled}\n className={classNames(\n getCardClassName(isSelected, _itemIndex, _itemsCount, context.variant),\n context.focusedValue === value && !isSelected && 'border-color-gray',\n context.cardClassName,\n className\n )}\n onFocus={() => context.setFocusedValue(value)}\n onBlur={() => context.setFocusedValue(undefined)}\n >\n <div className='radio-text-wrapper display-flex'>{children}</div>\n </RadioButton>\n );\n};\n\ntype RadioCardIndicatorProps = Omit<HTMLProps<HTMLSpanElement>, 'children'>;\n\nexport const RadioCardIndicator = ({ className, ...remainingProps }: RadioCardIndicatorProps) => (\n <span className={classNames('radio-text', className)} {...remainingProps} />\n);\n\nconst RadioCardGroup = (props: RadioCardGroupProps) => {\n const {\n name,\n options = [],\n value,\n defaultValue,\n variant = 'inline',\n gap = 'gap-15',\n onChange,\n className,\n cardClassName,\n children,\n ...remainingProps\n } = props;\n\n const isControlled = value !== null && value !== undefined;\n const [internalValue, setInternalValue] = useState(defaultValue);\n const [focusedValue, setFocusedValue] = useState<string>();\n\n const selectedValue = isControlled ? value : internalValue;\n\n const handleChange = (nextValue: string) => (event: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalValue(nextValue);\n }\n\n onChange?.(nextValue, event);\n };\n\n const groupClassName = classNames(\n variant === 'stacked' && 'display-flex flex-column',\n variant === 'stacked-horizontal' && 'display-flex',\n variant === 'inline' && 'display-flex',\n variant === 'inline' && gap,\n className\n );\n\n const contextValue: RadioCardGroupContextValue = {\n name,\n selectedValue,\n variant,\n cardClassName,\n focusedValue,\n setFocusedValue,\n onSelect: (nextValue, event) => handleChange(nextValue)(event),\n };\n\n const itemChildren = Children.toArray(children).filter(child => isValidElement(child));\n const mappedChildren = itemChildren.map((child, index) => {\n if (!isValidElement(child) || child.type !== RadioCardItem) {\n return child;\n }\n\n return cloneElement(child, {\n _itemIndex: index,\n _itemsCount: itemChildren.length,\n });\n });\n\n const mappedOptions = options.map((option, index) => (\n <RadioCardItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className={option.className}\n _itemIndex={index}\n _itemsCount={options.length}\n >\n <RadioCardIndicator />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>{option.label}</div>\n {option.description && <div className='text-color-dark'>{option.description}</div>}\n </div>\n </RadioCardItem>\n ));\n\n return (\n <RadioCardGroupContext.Provider value={contextValue}>\n <div className={groupClassName} {...remainingProps}>\n {mappedChildren.length > 0 ? mappedChildren : mappedOptions}\n </div>\n </RadioCardGroupContext.Provider>\n );\n};\n\nexport default RadioCardGroup;\n"],"names":["RadioCardGroupContext","createContext","getCardClassName","isSelected","index","optionsCount","variant","isFirst","isLast","classNames","RadioCardItem","props","value","disabled","className","children","_itemIndex","_itemsCount","remainingProps","context","useContext","jsx","RadioButton","event","RadioCardIndicator","RadioCardGroup","name","options","defaultValue","gap","onChange","cardClassName","isControlled","internalValue","setInternalValue","useState","focusedValue","setFocusedValue","selectedValue","handleChange","nextValue","groupClassName","contextValue","itemChildren","Children","child","isValidElement","mappedChildren","cloneElement","mappedOptions","option","jsxs"],"mappings":";;;;AAsGA,MAAMA,IAAwBC,EAAsD,MAAS,GAEvFC,IAAmB,CACrBC,GACAC,GACAC,GACAC,MACC;AACD,MAAIA,MAAY,WAAW;AACvB,UAAMC,IAAUH,MAAU,GACpBI,IAASJ,MAAUC,IAAe;AAExC,WAAOI;AAAA,MACH;AAAA,MACAF,KAAW;AAAA,MACX,CAACA,KAAW;AAAA,MACZC,KAAU;AAAA,MACVL,KAAc;AAAA,IAAA;AAAA,EAEtB;AAEA,MAAIG,MAAY,sBAAsB;AAClC,UAAMC,IAAUH,MAAU,GACpBI,IAASJ,MAAUC,IAAe;AAExC,WAAOI;AAAA,MACH;AAAA,MACAF,KAAW;AAAA,MACX,CAACA,KAAW;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AAAA,MACjB,WAAWA,EAAO;AAAA,MAClB,YAAY9C;AAAA,MACZ,aAAauB,EAAQ;AAAA,MAErB,UAAA;AAAA,QAAA,gBAAAN,EAACG,GAAA,EAAmB;AAAA,QACpB,gBAAA2B,EAAC,OAAA,EAAI,WAAU,gCACX,UAAA;AAAA,UAAA,gBAAA9B,EAAC,OAAA,EAAI,WAAU,eAAe,UAAA6B,EAAO,OAAM;AAAA,UAC1CA,EAAO,eAAe,gBAAA7B,EAAC,SAAI,WAAU,mBAAmB,YAAO,YAAA,CAAY;AAAA,QAAA,EAAA,CAChF;AAAA,MAAA;AAAA,IAAA;AAAA,IAXK6B,EAAO;AAAA,EAAA,CAanB;AAED,2BACKlD,EAAsB,UAAtB,EAA+B,OAAO0C,GACnC,UAAA,gBAAArB,EAAC,OAAA,EAAI,WAAWoB,GAAiB,GAAGvB,GAC/B,UAAA6B,EAAe,SAAS,IAAIA,IAAiBE,GAClD,GACJ;AAER;"}
@@ -18,8 +18,6 @@ export type ReleaseNotesProps = {
18
18
  * Translated release notes of the following shape:
19
19
  *
20
20
  * @example
21
- *
22
- * ```tsx
23
21
  * {
24
22
  * "0.1.2": {
25
23
  * date: '23.07.2018',
@@ -32,7 +30,6 @@ export type ReleaseNotesProps = {
32
30
  * ),
33
31
  * }
34
32
  * }
35
- * ```
36
33
  */
37
34
  releaseNotes: ReleaseNotesData;
38
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ReleaseNotes.js","sources":["../../../src/components/releaseNotes/ReleaseNotes.tsx"],"sourcesContent":["import type React from 'react';\nimport { isArray, map, toPairs } from 'es-toolkit/compat';\n\nexport type NoteContent = (React.ReactNode | JSX.Element) | (React.ReactNode | JSX.Element)[];\n\nexport type NoteProps = {\n version: string;\n note: {\n date: string;\n content: NoteContent;\n };\n};\n\nconst Note = (props: NoteProps) => {\n const { note, version } = props;\n const { date, content } = note;\n return (\n <div className='panel panel-default' key={`${version}-note`}>\n <div className='panel-heading'>\n <div className='display-flex justify-content-between'>\n <span className='text-size-16 text-medium'>{`${version}`}</span>\n <span className='text-thin'>{date}</span>\n </div>\n </div>\n <div className='panel-body white-space-pre-line'>\n {isArray(content) ? (\n <ul className='margin-bottom-0 margin-left-5 padding-left-25'>\n {map(content, (item: React.ReactNode) => (\n <li key={`${version}-note-${Math.random()}`}>{item}</li>\n ))}\n </ul>\n ) : (\n <div>{content}</div>\n )}\n </div>\n </div>\n );\n};\n\nexport type ReleaseNotesData = {\n [key: string]: {\n date: string;\n content: NoteContent;\n };\n};\n\nexport type ReleaseNotesProps = {\n /**\n * Translated release notes of the following shape:\n *\n * @example\n *\n * ```tsx\n * {\n * \"0.1.2\": {\n * date: '23.07.2018',\n * content: (\n * <div className='padding-left-15'>\n * Map view within the tour history table\n * • Modern map design as used in the Beta of the fleet monitor\n * • Works with all event types\n * </div>\n * ),\n * }\n * }\n * ```\n */\n releaseNotes: ReleaseNotesData;\n};\n\nconst ReleaseNotes = (props: ReleaseNotesProps) => {\n const { releaseNotes, ...remainingProps } = props;\n return (\n <div {...remainingProps}>\n {map(toPairs(releaseNotes), ([key, note]) => (\n <Note key={key} note={note} version={key} />\n ))}\n </div>\n );\n};\n\nexport default ReleaseNotes;\n"],"names":["Note","props","note","version","date","content","jsxs","jsx","isArray","map","item","ReleaseNotes","releaseNotes","remainingProps","toPairs","key"],"mappings":";;AAaA,MAAMA,IAAO,CAACC,MAAqB;AAC/B,QAAM,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYF,GACpB,EAAE,MAAAG,GAAM,SAAAC,EAAA,IAAYH;AAC1B,SACI,gBAAAI,EAAC,OAAA,EAAI,WAAU,uBACX,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAI,WAAU,iBACX,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,wCACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,4BAA4B,UAAA,GAAGJ,CAAO,IAAG;AAAA,MACzD,gBAAAI,EAAC,QAAA,EAAK,WAAU,aAAa,UAAAH,EAAA,CAAK;AAAA,IAAA,EAAA,CACtC,EAAA,CACJ;AAAA,IACA,gBAAAG,EAAC,OAAA,EAAI,WAAU,mCACV,UAAAC,EAAQH,CAAO,IACZ,gBAAAE,EAAC,MAAA,EAAG,WAAU,iDACT,UAAAE,EAAIJ,GAAS,CAACK,MACX,gBAAAH,EAAC,MAAA,EAA6C,UAAAG,EAAA,GAArC,GAAGP,CAAO,SAAS,KAAK,OAAA,CAAQ,EAAU,CACtD,EAAA,CACL,IAEA,gBAAAI,EAAC,OAAA,EAAK,aAAQ,EAAA,CAEtB;AAAA,EAAA,EAAA,GAjBsC,GAAGJ,CAAO,OAkBpD;AAER,GAiCMQ,IAAe,CAACV,MAA6B;AAC/C,QAAM,EAAE,cAAAW,GAAc,GAAGC,EAAA,IAAmBZ;AAC5C,SACI,gBAAAM,EAAC,SAAK,GAAGM,GACJ,YAAIC,EAAQF,CAAY,GAAG,CAAC,CAACG,GAAKb,CAAI,wBAClCF,GAAA,EAAe,MAAAE,GAAY,SAASa,EAAA,GAA1BA,CAA+B,CAC7C,GACL;AAER;"}
1
+ {"version":3,"file":"ReleaseNotes.js","sources":["../../../src/components/releaseNotes/ReleaseNotes.tsx"],"sourcesContent":["import type React from 'react';\nimport { isArray, map, toPairs } from 'es-toolkit/compat';\n\nexport type NoteContent = (React.ReactNode | JSX.Element) | (React.ReactNode | JSX.Element)[];\n\nexport type NoteProps = {\n version: string;\n note: {\n date: string;\n content: NoteContent;\n };\n};\n\nconst Note = (props: NoteProps) => {\n const { note, version } = props;\n const { date, content } = note;\n return (\n <div className='panel panel-default' key={`${version}-note`}>\n <div className='panel-heading'>\n <div className='display-flex justify-content-between'>\n <span className='text-size-16 text-medium'>{`${version}`}</span>\n <span className='text-thin'>{date}</span>\n </div>\n </div>\n <div className='panel-body white-space-pre-line'>\n {isArray(content) ? (\n <ul className='margin-bottom-0 margin-left-5 padding-left-25'>\n {map(content, (item: React.ReactNode) => (\n <li key={`${version}-note-${Math.random()}`}>{item}</li>\n ))}\n </ul>\n ) : (\n <div>{content}</div>\n )}\n </div>\n </div>\n );\n};\n\nexport type ReleaseNotesData = {\n [key: string]: {\n date: string;\n content: NoteContent;\n };\n};\n\nexport type ReleaseNotesProps = {\n /**\n * Translated release notes of the following shape:\n *\n * @example\n * {\n * \"0.1.2\": {\n * date: '23.07.2018',\n * content: (\n * <div className='padding-left-15'>\n * Map view within the tour history table\n * • Modern map design as used in the Beta of the fleet monitor\n * • Works with all event types\n * </div>\n * ),\n * }\n * }\n */\n releaseNotes: ReleaseNotesData;\n};\n\nconst ReleaseNotes = (props: ReleaseNotesProps) => {\n const { releaseNotes, ...remainingProps } = props;\n return (\n <div {...remainingProps}>\n {map(toPairs(releaseNotes), ([key, note]) => (\n <Note key={key} note={note} version={key} />\n ))}\n </div>\n );\n};\n\nexport default ReleaseNotes;\n"],"names":["Note","props","note","version","date","content","jsxs","jsx","isArray","map","item","ReleaseNotes","releaseNotes","remainingProps","toPairs","key"],"mappings":";;AAaA,MAAMA,IAAO,CAACC,MAAqB;AAC/B,QAAM,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYF,GACpB,EAAE,MAAAG,GAAM,SAAAC,EAAA,IAAYH;AAC1B,SACI,gBAAAI,EAAC,OAAA,EAAI,WAAU,uBACX,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAI,WAAU,iBACX,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,wCACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,4BAA4B,UAAA,GAAGJ,CAAO,IAAG;AAAA,MACzD,gBAAAI,EAAC,QAAA,EAAK,WAAU,aAAa,UAAAH,EAAA,CAAK;AAAA,IAAA,EAAA,CACtC,EAAA,CACJ;AAAA,IACA,gBAAAG,EAAC,OAAA,EAAI,WAAU,mCACV,UAAAC,EAAQH,CAAO,IACZ,gBAAAE,EAAC,MAAA,EAAG,WAAU,iDACT,UAAAE,EAAIJ,GAAS,CAACK,MACX,gBAAAH,EAAC,MAAA,EAA6C,UAAAG,EAAA,GAArC,GAAGP,CAAO,SAAS,KAAK,OAAA,CAAQ,EAAU,CACtD,EAAA,CACL,IAEA,gBAAAI,EAAC,OAAA,EAAK,aAAQ,EAAA,CAEtB;AAAA,EAAA,EAAA,GAjBsC,GAAGJ,CAAO,OAkBpD;AAER,GA8BMQ,IAAe,CAACV,MAA6B;AAC/C,QAAM,EAAE,cAAAW,GAAc,GAAGC,EAAA,IAAmBZ;AAC5C,SACI,gBAAAM,EAAC,SAAK,GAAGM,GACJ,YAAIC,EAAQF,CAAY,GAAG,CAAC,CAACG,GAAKb,CAAI,wBAClCF,GAAA,EAAe,MAAAE,GAAY,SAASa,EAAA,GAA1BA,CAA+B,CAC7C,GACL;AAER;"}
@@ -10,19 +10,31 @@ export type ResizerProps = {
10
10
  * Defines where the resize handle is positioned relative to the element to resize.
11
11
  *
12
12
  * Possible values are:
13
- * `Resizer.LEFT`, `Resizer.RIGHT`, `Resizer.TOP`, `Resizer.BOTTOM` or
14
- * `left`, `right`, `top`, `bottom`.
13
+ *
14
+ * - `Resizer.LEFT`,
15
+ * - `Resizer.RIGHT`,
16
+ * - `Resizer.TOP`,
17
+ * - `Resizer.BOTTOM`
18
+ * - `'left`',
19
+ * - `'right`',
20
+ * - `'top`',
21
+ * - `'bottom'`
15
22
  */
16
23
  position?: typeof LEFT | typeof RIGHT | typeof TOP | typeof BOTTOM;
17
24
  /**
18
25
  * Defines on which axis to resize.
19
26
  *
20
27
  * Possible values are:
21
- * `Resizer.HORIZONTAL`, `Resizer.VERTICAL` or `x`, `y`.
28
+ *
29
+ * - `Resizer.HORIZONTAL`
30
+ * - `Resizer.VERTICAL`
31
+ * - `'x'`
32
+ * - `'y'`
22
33
  */
23
34
  direction?: typeof HORIZONTAL | typeof VERTICAL;
24
35
  /**
25
36
  * Callback when the resize starts, means when the handle is pressed. It returns the respective event.
37
+ *
26
38
  * @param event
27
39
  * @returns
28
40
  */
@@ -31,12 +43,14 @@ export type ResizerProps = {
31
43
  * Callback when the resize handle is moved. The function returns the distant between the last
32
44
  * position and the mouse movement. Means you can either subtract or add this diff to the elements
33
45
  * width you want to change.
46
+ *
34
47
  * @param diff
35
48
  * @returns
36
49
  */
37
50
  onResize?: (diff: number) => void;
38
51
  /**
39
52
  * Callback when the resize ends, means when the handle is released. It returns the respective event.
53
+ *
40
54
  * @param event
41
55
  * @returns
42
56
  */
@@ -1,7 +1,7 @@
1
1
  import { jsx as N } from "react/jsx-runtime";
2
2
  import { useRef as m, useEffect as X } from "react";
3
- import Y from "classnames";
4
3
  import { noop as h } from "es-toolkit/function";
4
+ import Y from "../../utils/classNames.js";
5
5
  const z = "x", D = "y", M = "left", O = "right", P = "top", S = "bottom", w = (i, s, n) => {
6
6
  if (!i)
7
7
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"Resizer.js","sources":["../../../src/components/resizer/Resizer.tsx"],"sourcesContent":["import React, { useEffect, useRef, type MouseEvent, type TouchEvent, type PropsWithChildren } from 'react';\nimport classNames from 'classnames';\nimport { noop } from 'es-toolkit/function';\n\nconst HORIZONTAL = 'x';\nconst VERTICAL = 'y';\n\nconst LEFT = 'left';\nconst RIGHT = 'right';\nconst TOP = 'top';\nconst BOTTOM = 'bottom';\n\nexport type ResizerProps = {\n /**\n * Defines where the resize handle is positioned relative to the element to resize.\n *\n * Possible values are:\n * `Resizer.LEFT`, `Resizer.RIGHT`, `Resizer.TOP`, `Resizer.BOTTOM` or\n * `left`, `right`, `top`, `bottom`.\n */\n position?: typeof LEFT | typeof RIGHT | typeof TOP | typeof BOTTOM;\n\n /**\n * Defines on which axis to resize.\n *\n * Possible values are:\n * `Resizer.HORIZONTAL`, `Resizer.VERTICAL` or `x`, `y`.\n */\n direction?: typeof HORIZONTAL | typeof VERTICAL;\n\n /**\n * Callback when the resize starts, means when the handle is pressed. It returns the respective event.\n * @param event\n * @returns\n */\n onResizeStart?: (event: MouseEvent | TouchEvent) => void;\n\n /**\n * Callback when the resize handle is moved. The function returns the distant between the last\n * position and the mouse movement. Means you can either subtract or add this diff to the elements\n * width you want to change.\n * @param diff\n * @returns\n */\n onResize?: (diff: number) => void;\n\n /**\n * Callback when the resize ends, means when the handle is released. It returns the respective event.\n * @param event\n * @returns\n */\n onResizeEnd?: (event: Event) => void;\n\n /**\n * Additional classes to be set on the wrapper element.\n */\n className?: string;\n};\n\ntype Position = {\n x: number;\n y: number;\n};\n\nconst createListeners = (\n targetNode: HTMLDivElement | null,\n onEnd: (event: Event) => void,\n onMove: (event: Event) => void\n) => {\n if (!targetNode) {\n return;\n }\n\n // The read-only ownerDocument property of the Node interface returns\n // the top-level document object of the node.\n const ownerDocument = targetNode.ownerDocument;\n\n ownerDocument.addEventListener('mouseup', onEnd);\n ownerDocument.addEventListener('mousemove', onMove);\n ownerDocument.addEventListener('touchend', onEnd);\n ownerDocument.addEventListener('touchmove', onMove);\n return {\n remove: () => {\n ownerDocument.removeEventListener('mouseup', onEnd);\n ownerDocument.removeEventListener('mousemove', onMove);\n ownerDocument.removeEventListener('touchend', onEnd);\n ownerDocument.removeEventListener('touchmove', onMove);\n },\n };\n};\n\nconst Resizer = (props: PropsWithChildren<ResizerProps>) => {\n const {\n className = '',\n direction = HORIZONTAL,\n position = RIGHT,\n onResizeStart = noop,\n onResize = noop,\n onResizeEnd = noop,\n children,\n ...remainingProps\n } = props;\n\n const eventsRef = useRef<{ remove: () => void } | undefined | null>(null);\n\n // Use refs here instead of local state as the move event listener fired before the state is set\n // and then it would work with outdated state at that time.\n const elementRef = useRef<HTMLDivElement>(null);\n const isDragRef = useRef<boolean>(false);\n const startPositionRef = useRef<Position>({ x: 0, y: 0 });\n\n useEffect(() => {\n return () => {\n removeListeners();\n };\n }, []);\n\n const getClientX = (event: Event) => {\n // Note: some browsers don't provide the global \"TouchEvent\" constructor!\n if (!!window.TouchEvent && event instanceof window.TouchEvent) {\n return event.touches[0].clientX;\n }\n\n if (event instanceof MouseEvent) {\n return event.clientX;\n }\n\n throw new Error('Unsupported event type');\n };\n\n const getClientY = (event: Event) => {\n // Note: some browsers don't provide the global \"TouchEvent\" constructor!\n if (!!window.TouchEvent && event instanceof window.TouchEvent) {\n return event.touches[0].clientY;\n }\n\n if (event instanceof MouseEvent) {\n return event.clientY;\n }\n\n throw new Error('Unsupported event type');\n };\n\n const handleMouseStart = (event: React.MouseEvent) => {\n isDragRef.current = true;\n\n // Use the native event to check for the event type. Otherwise the type check\n // fails and the start position would be { x: 0, y: 0 }.\n const mouseEvent = event.nativeEvent;\n const { clientX, clientY } = mouseEvent;\n startPositionRef.current = {\n x: clientX,\n y: clientY,\n };\n\n onResizeStart(event);\n\n eventsRef.current = createListeners(elementRef.current, handleEnd, handleMove);\n };\n\n const handleTouchStart = (event: React.TouchEvent) => {\n isDragRef.current = true;\n\n // Use the native event to check for the event type. Otherwise the type check\n // fails and the start position would be { x: 0, y: 0 }.\n const touchEvent = event.nativeEvent;\n const firstTouch = touchEvent.touches[0];\n startPositionRef.current = {\n x: firstTouch.clientX,\n y: firstTouch.clientY,\n };\n\n onResizeStart(event);\n\n eventsRef.current = createListeners(elementRef.current, handleEnd, handleMove);\n };\n\n const handleMove = (event: Event) => {\n if (!isDragRef.current) {\n return;\n }\n\n if (direction === Resizer.HORIZONTAL) {\n const diff = startPositionRef.current.x - getClientX(event);\n\n if (diff !== 0) {\n onResize(diff);\n }\n }\n\n if (direction === Resizer.VERTICAL) {\n const diff = startPositionRef.current.y - getClientY(event);\n if (diff !== 0) {\n onResize(diff);\n }\n }\n\n startPositionRef.current = {\n x: getClientX(event),\n y: getClientY(event),\n };\n };\n\n const handleEnd = (event: Event) => {\n isDragRef.current = false;\n onResizeEnd(event);\n removeListeners();\n };\n\n const removeListeners = () => {\n if (eventsRef.current) {\n eventsRef.current.remove();\n }\n };\n\n const wrapperClasses = classNames(\n 'Resizer',\n direction === 'x' && 'resize-horizontal',\n direction === 'y' && 'resize-vertical',\n position === 'left' && 'resize-left',\n position === 'right' && 'resize-right',\n position === 'top' && 'resize-top',\n position === 'bottom' && 'resize-bottom',\n className && className\n );\n\n return (\n <div\n ref={elementRef}\n className={wrapperClasses}\n onMouseDown={handleMouseStart}\n onTouchStart={handleTouchStart}\n {...remainingProps}\n >\n {children}\n </div>\n );\n};\n\nResizer.HORIZONTAL = HORIZONTAL as typeof HORIZONTAL;\nResizer.VERTICAL = VERTICAL as typeof VERTICAL;\n\nResizer.LEFT = LEFT as typeof LEFT;\nResizer.RIGHT = RIGHT as typeof RIGHT;\nResizer.TOP = TOP as typeof TOP;\nResizer.BOTTOM = BOTTOM as typeof BOTTOM;\n\nexport default Resizer;\n"],"names":["HORIZONTAL","VERTICAL","LEFT","RIGHT","TOP","BOTTOM","createListeners","targetNode","onEnd","onMove","ownerDocument","Resizer","props","className","direction","position","onResizeStart","noop","onResize","onResizeEnd","children","remainingProps","eventsRef","useRef","elementRef","isDragRef","startPositionRef","useEffect","removeListeners","getClientX","event","getClientY","handleMouseStart","mouseEvent","clientX","clientY","handleEnd","handleMove","handleTouchStart","firstTouch","diff","wrapperClasses","classNames","jsx"],"mappings":";;;;AAIA,MAAMA,IAAa,KACbC,IAAW,KAEXC,IAAO,QACPC,IAAQ,SACRC,IAAM,OACNC,IAAS,UAsDTC,IAAkB,CACpBC,GACAC,GACAC,MACC;AACD,MAAI,CAACF;AACD;AAKJ,QAAMG,IAAgBH,EAAW;AAEjC,SAAAG,EAAc,iBAAiB,WAAWF,CAAK,GAC/CE,EAAc,iBAAiB,aAAaD,CAAM,GAClDC,EAAc,iBAAiB,YAAYF,CAAK,GAChDE,EAAc,iBAAiB,aAAaD,CAAM,GAC3C;AAAA,IACH,QAAQ,MAAM;AACV,MAAAC,EAAc,oBAAoB,WAAWF,CAAK,GAClDE,EAAc,oBAAoB,aAAaD,CAAM,GACrDC,EAAc,oBAAoB,YAAYF,CAAK,GACnDE,EAAc,oBAAoB,aAAaD,CAAM;AAAA,IACzD;AAAA,EAAA;AAER,GAEME,IAAU,CAACC,MAA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aAAaX;AACrBW,EAAQ,WAAWV;AAEnBU,EAAQ,OAAOT;AACfS,EAAQ,QAAQR;AAChBQ,EAAQ,MAAMP;AACdO,EAAQ,SAASN;"}
1
+ {"version":3,"file":"Resizer.js","sources":["../../../src/components/resizer/Resizer.tsx"],"sourcesContent":["import React, { useEffect, useRef, type MouseEvent, type TouchEvent, type PropsWithChildren } from 'react';\nimport { noop } from 'es-toolkit/function';\n\nimport classNames from '../../utils/classNames';\n\nconst HORIZONTAL = 'x';\nconst VERTICAL = 'y';\n\nconst LEFT = 'left';\nconst RIGHT = 'right';\nconst TOP = 'top';\nconst BOTTOM = 'bottom';\n\nexport type ResizerProps = {\n /**\n * Defines where the resize handle is positioned relative to the element to resize.\n *\n * Possible values are:\n *\n * - `Resizer.LEFT`,\n * - `Resizer.RIGHT`,\n * - `Resizer.TOP`,\n * - `Resizer.BOTTOM`\n * - `'left`',\n * - `'right`',\n * - `'top`',\n * - `'bottom'`\n */\n position?: typeof LEFT | typeof RIGHT | typeof TOP | typeof BOTTOM;\n\n /**\n * Defines on which axis to resize.\n *\n * Possible values are:\n *\n * - `Resizer.HORIZONTAL`\n * - `Resizer.VERTICAL`\n * - `'x'`\n * - `'y'`\n */\n direction?: typeof HORIZONTAL | typeof VERTICAL;\n\n /**\n * Callback when the resize starts, means when the handle is pressed. It returns the respective event.\n *\n * @param event\n * @returns\n */\n onResizeStart?: (event: MouseEvent | TouchEvent) => void;\n\n /**\n * Callback when the resize handle is moved. The function returns the distant between the last\n * position and the mouse movement. Means you can either subtract or add this diff to the elements\n * width you want to change.\n *\n * @param diff\n * @returns\n */\n onResize?: (diff: number) => void;\n\n /**\n * Callback when the resize ends, means when the handle is released. It returns the respective event.\n *\n * @param event\n * @returns\n */\n onResizeEnd?: (event: Event) => void;\n\n /**\n * Additional classes to be set on the wrapper element.\n */\n className?: string;\n};\n\ntype Position = {\n x: number;\n y: number;\n};\n\nconst createListeners = (\n targetNode: HTMLDivElement | null,\n onEnd: (event: Event) => void,\n onMove: (event: Event) => void\n) => {\n if (!targetNode) {\n return;\n }\n\n // The read-only ownerDocument property of the Node interface returns\n // the top-level document object of the node.\n const ownerDocument = targetNode.ownerDocument;\n\n ownerDocument.addEventListener('mouseup', onEnd);\n ownerDocument.addEventListener('mousemove', onMove);\n ownerDocument.addEventListener('touchend', onEnd);\n ownerDocument.addEventListener('touchmove', onMove);\n return {\n remove: () => {\n ownerDocument.removeEventListener('mouseup', onEnd);\n ownerDocument.removeEventListener('mousemove', onMove);\n ownerDocument.removeEventListener('touchend', onEnd);\n ownerDocument.removeEventListener('touchmove', onMove);\n },\n };\n};\n\nconst Resizer = (props: PropsWithChildren<ResizerProps>) => {\n const {\n className = '',\n direction = HORIZONTAL,\n position = RIGHT,\n onResizeStart = noop,\n onResize = noop,\n onResizeEnd = noop,\n children,\n ...remainingProps\n } = props;\n\n const eventsRef = useRef<{ remove: () => void } | undefined | null>(null);\n\n // Use refs here instead of local state as the move event listener fired before the state is set\n // and then it would work with outdated state at that time.\n const elementRef = useRef<HTMLDivElement>(null);\n const isDragRef = useRef<boolean>(false);\n const startPositionRef = useRef<Position>({ x: 0, y: 0 });\n\n useEffect(() => {\n return () => {\n removeListeners();\n };\n }, []);\n\n const getClientX = (event: Event) => {\n // Note: some browsers don't provide the global \"TouchEvent\" constructor!\n if (!!window.TouchEvent && event instanceof window.TouchEvent) {\n return event.touches[0].clientX;\n }\n\n if (event instanceof MouseEvent) {\n return event.clientX;\n }\n\n throw new Error('Unsupported event type');\n };\n\n const getClientY = (event: Event) => {\n // Note: some browsers don't provide the global \"TouchEvent\" constructor!\n if (!!window.TouchEvent && event instanceof window.TouchEvent) {\n return event.touches[0].clientY;\n }\n\n if (event instanceof MouseEvent) {\n return event.clientY;\n }\n\n throw new Error('Unsupported event type');\n };\n\n const handleMouseStart = (event: React.MouseEvent) => {\n isDragRef.current = true;\n\n // Use the native event to check for the event type. Otherwise the type check\n // fails and the start position would be { x: 0, y: 0 }.\n const mouseEvent = event.nativeEvent;\n const { clientX, clientY } = mouseEvent;\n startPositionRef.current = {\n x: clientX,\n y: clientY,\n };\n\n onResizeStart(event);\n\n eventsRef.current = createListeners(elementRef.current, handleEnd, handleMove);\n };\n\n const handleTouchStart = (event: React.TouchEvent) => {\n isDragRef.current = true;\n\n // Use the native event to check for the event type. Otherwise the type check\n // fails and the start position would be { x: 0, y: 0 }.\n const touchEvent = event.nativeEvent;\n const firstTouch = touchEvent.touches[0];\n startPositionRef.current = {\n x: firstTouch.clientX,\n y: firstTouch.clientY,\n };\n\n onResizeStart(event);\n\n eventsRef.current = createListeners(elementRef.current, handleEnd, handleMove);\n };\n\n const handleMove = (event: Event) => {\n if (!isDragRef.current) {\n return;\n }\n\n if (direction === Resizer.HORIZONTAL) {\n const diff = startPositionRef.current.x - getClientX(event);\n\n if (diff !== 0) {\n onResize(diff);\n }\n }\n\n if (direction === Resizer.VERTICAL) {\n const diff = startPositionRef.current.y - getClientY(event);\n if (diff !== 0) {\n onResize(diff);\n }\n }\n\n startPositionRef.current = {\n x: getClientX(event),\n y: getClientY(event),\n };\n };\n\n const handleEnd = (event: Event) => {\n isDragRef.current = false;\n onResizeEnd(event);\n removeListeners();\n };\n\n const removeListeners = () => {\n if (eventsRef.current) {\n eventsRef.current.remove();\n }\n };\n\n const wrapperClasses = classNames(\n 'Resizer',\n direction === 'x' && 'resize-horizontal',\n direction === 'y' && 'resize-vertical',\n position === 'left' && 'resize-left',\n position === 'right' && 'resize-right',\n position === 'top' && 'resize-top',\n position === 'bottom' && 'resize-bottom',\n className && className\n );\n\n return (\n <div\n ref={elementRef}\n className={wrapperClasses}\n onMouseDown={handleMouseStart}\n onTouchStart={handleTouchStart}\n {...remainingProps}\n >\n {children}\n </div>\n );\n};\n\nResizer.HORIZONTAL = HORIZONTAL as typeof HORIZONTAL;\nResizer.VERTICAL = VERTICAL as typeof VERTICAL;\n\nResizer.LEFT = LEFT as typeof LEFT;\nResizer.RIGHT = RIGHT as typeof RIGHT;\nResizer.TOP = TOP as typeof TOP;\nResizer.BOTTOM = BOTTOM as typeof BOTTOM;\n\nexport default Resizer;\n"],"names":["HORIZONTAL","VERTICAL","LEFT","RIGHT","TOP","BOTTOM","createListeners","targetNode","onEnd","onMove","ownerDocument","Resizer","props","className","direction","position","onResizeStart","noop","onResize","onResizeEnd","children","remainingProps","eventsRef","useRef","elementRef","isDragRef","startPositionRef","useEffect","removeListeners","getClientX","event","getClientY","handleMouseStart","mouseEvent","clientX","clientY","handleEnd","handleMove","handleTouchStart","firstTouch","diff","wrapperClasses","classNames","jsx"],"mappings":";;;;AAKA,MAAMA,IAAa,KACbC,IAAW,KAEXC,IAAO,QACPC,IAAQ,SACRC,IAAM,OACNC,IAAS,UAoETC,IAAkB,CACpBC,GACAC,GACAC,MACC;AACD,MAAI,CAACF;AACD;AAKJ,QAAMG,IAAgBH,EAAW;AAEjC,SAAAG,EAAc,iBAAiB,WAAWF,CAAK,GAC/CE,EAAc,iBAAiB,aAAaD,CAAM,GAClDC,EAAc,iBAAiB,YAAYF,CAAK,GAChDE,EAAc,iBAAiB,aAAaD,CAAM,GAC3C;AAAA,IACH,QAAQ,MAAM;AACV,MAAAC,EAAc,oBAAoB,WAAWF,CAAK,GAClDE,EAAc,oBAAoB,aAAaD,CAAM,GACrDC,EAAc,oBAAoB,YAAYF,CAAK,GACnDE,EAAc,oBAAoB,aAAaD,CAAM;AAAA,IACzD;AAAA,EAAA;AAER,GAEME,IAAU,CAACC,MAA2C;AACxD,QAAM;AAAA,IACF,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAYd;AAAA,IACZ,UAAAe,IAAWZ;AAAA,IACX,eAAAa,IAAgBC;AAAA,IAChB,UAAAC,IAAWD;AAAA,IACX,aAAAE,IAAcF;AAAA,IACd,UAAAG;AAAA,IACA,GAAGC;AAAA,EAAA,IACHT,GAEEU,IAAYC,EAAkD,IAAI,GAIlEC,IAAaD,EAAuB,IAAI,GACxCE,IAAYF,EAAgB,EAAK,GACjCG,IAAmBH,EAAi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U,MAAS,KACTtB,EAASsB,CAAI;AAAA,MAErB;AAEA,UAAI1B,MAAcH,EAAQ,UAAU;AAChC,cAAM6B,IAAOd,EAAiB,QAAQ,IAAIK,EAAWD,CAAK;AAC1D,QAAIU,MAAS,KACTtB,EAASsB,CAAI;AAAA,MAErB;AAEA,MAAAd,EAAiB,UAAU;AAAA,QACvB,GAAGG,EAAWC,CAAK;AAAA,QACnB,GAAGC,EAAWD,CAAK;AAAA,MAAA;AAAA;AAAA,EAE3B,GAEMM,IAAY,CAACN,MAAiB;AAChC,IAAAL,EAAU,UAAU,IACpBN,EAAYW,CAAK,GACjBF,EAAA;AAAA,EACJ,GAEMA,IAAkB,MAAM;AAC1B,IAAIN,EAAU,WACVA,EAAU,QAAQ,OAAA;AAAA,EAE1B,GAEMmB,IAAiBC;AAAA,IACnB;AAAA,IACA5B,MAAc,OAAO;AAAA,IACrBA,MAAc,OAAO;AAAA,IACrBC,MAAa,UAAU;AAAA,IACvBA,MAAa,WAAW;AAAA,IACxBA,MAAa,SAAS;AAAA,IACtBA,MAAa,YAAY;AAAA,IACzBF,KAAaA;AAAA,EAAA;AAGjB,SACI,gBAAA8B;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAKnB;AAAA,MACL,WAAWiB;AAAA,MACX,aAAaT;AAAA,MACb,cAAcM;AAAA,MACb,GAAGjB;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGb;AAEAT,EAAQ,aAAaX;AACrBW,EAAQ,WAAWV;AAEnBU,EAAQ,OAAOT;AACfS,EAAQ,QAAQR;AAChBQ,EAAQ,MAAMP;AACdO,EAAQ,SAASN;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as o, jsxs as S } from "react/jsx-runtime";
2
2
  import { forwardRef as re, useState as c, useRef as ie, useEffect as le, Children as ce, cloneElement as me } from "react";
3
- import m from "classnames";
4
3
  import { noop as M, chunk as W, findIndex as ue } from "es-toolkit/compat";
5
4
  import { AnimatePresence as pe, motion as de } from "motion/react";
5
+ import m from "../../utils/classNames.js";
6
6
  import ge from "../../hooks/useAfterMount.js";
7
7
  import fe from "../../hooks/useElementSize.js";
8
8
  import Ce from "../../hooks/usePrevious.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveColumnStripe.js","sources":["../../../src/components/responsiveColumnStripe/ResponsiveColumnStripe.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n type PropsWithChildren,\n type ReactElement,\n type ReactHTML,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport classNames from 'classnames';\nimport { chunk, findIndex, noop } from 'es-toolkit/compat';\nimport { AnimatePresence, motion, type Variants } from 'motion/react';\n\nimport useAfterMount from '../../hooks/useAfterMount';\nimport useElementSize from '../../hooks/useElementSize';\nimport usePrevious from '../../hooks/usePrevious';\n\nconst MIN_WITH_THRESHOLD = 10;\n\nconst DEFAULT_TRANSITION = { duration: 0.2 };\n\nconst ANIMATION_NEXT = 'page';\nconst ANIMATION_BACK = 'pageBack';\n\nconst COLUMN_ITEM_CLASSNAME = 'ColumnItem';\n\nconst variants: Variants = {\n pageEnter: pageDirection => ({\n x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',\n opacity: 0,\n }),\n pageCenter: () => ({ x: 0, opacity: 1 }),\n};\n\nconst getFirstColumnItem = (node: Element): HTMLElement => {\n if ([...node.classList].includes(COLUMN_ITEM_CLASSNAME)) {\n return node as HTMLElement;\n }\n return getFirstColumnItem(node.children[0] as HTMLElement);\n};\n\nexport type ResponsiveColumnStripeProps = {\n /**\n * The minimum width in pixel of a single column.\n *\n * This value determines how many columns are shown per page depending on the parent width.\n *\n * @default 300\n */\n minColumnWith?: number;\n\n /**\n * The minimum amount of columns that should be shown per page.\n *\n * @default 1\n */\n minColumns?: number;\n\n /**\n * The maximum amount of columns that should be shown per page.\n *\n * @default 5\n */\n maxColumns?: number;\n\n /**\n * Defines whether the items on the last page are stretched out to fill the space.\n *\n * @default false\n */\n stretchLastItems?: boolean;\n\n /**\n * The page that shall be shown.\n *\n * This can be used to control the pages from outside.\n *\n * @default 0\n */\n activePage?: number;\n\n /**\n * The DOM element type of the wrapping column element.\n *\n * If you need a list, this might be set to \"ul\".\n *\n * @default 'div'\n */\n asType?: keyof ReactHTML;\n\n /**\n * Set to true to skip animating pages.\n *\n * @default false\n */\n disableAnimation?: boolean;\n\n /**\n * Callback function for when the previous page is clicked.\n *\n * @param pageNumber\n * @param columnsPerPage\n */\n onPreviousClick?: (pageNumber: number, columnsPerPage: number) => void;\n\n /**\n * Callback function for when the next page is clicked.\n *\n * @param pageNumber\n * @param columnsPerPage\n */\n onNextClick?: (pageNumber: number, columnsPerPage: number) => void;\n\n /**\n * Additional classes set to the navigation buttons.\n */\n buttonClassName?: string;\n\n /**\n * Additional classes set to the component wrapper element.\n */\n columnsWrapperClassName?: string;\n\n /**\n * Additional classes set to the column wrapper element.\n */\n className?: string;\n};\n\nconst ResponsiveColumnStripe = forwardRef<HTMLDivElement, PropsWithChildren<ResponsiveColumnStripeProps>>(\n (props, ref) => {\n const {\n minColumnWith = 300,\n minColumns = 1,\n maxColumns = 5,\n stretchLastItems = true,\n activePage = 0,\n asType: ComponentType = 'div',\n onPreviousClick = noop,\n onNextClick = noop,\n buttonClassName = '',\n columnsWrapperClassName = '',\n className = '',\n disableAnimation = false,\n children,\n ...remainingProps\n } = props;\n\n const [currentPage, setCurrentPage] = useState(activePage);\n const [columnsPerPage, setColumnsPerPage] = useState(maxColumns);\n const [enableInitialAnimation, setEnableInitialAnimation] = useState(false);\n\n const [isResizePage, setIsResizePage] = useState(false);\n\n // The base for reacting on changing width of the wrapping element.\n // It uses a ResizeObserver under the hood.\n const columnWrapperRef = useRef<HTMLDivElement>(null);\n const [columnWrapperWidth] = useElementSize(columnWrapperRef);\n\n const previousPage = usePrevious(currentPage);\n const animationDirection = currentPage > previousPage ? ANIMATION_NEXT : ANIMATION_BACK;\n\n useAfterMount(() => {\n setEnableInitialAnimation(true);\n });\n\n // Update active page from outside to be used as controlled component\n const [previousActivePage, setPreviousActivePage] = useState(activePage);\n if (Number.isFinite(activePage) && activePage !== previousActivePage) {\n setCurrentPage(activePage);\n setPreviousActivePage(activePage);\n }\n\n const updatePageOnColumnsSizeChange = (firstItem: HTMLElement, perPage: number) => {\n // Split children in page chunks\n const pages = chunk(children as ReactElement[], perPage);\n\n // find the currently rendered first item inside the chunks.\n // The found chunk index is the new page to render.\n // example of chunks => [['a', 'b', 'c'], ['d']]\n const targetPage = findIndex(pages, (page: ReactElement[]) =>\n page.some(pageItem => pageItem.key === firstItem.dataset['key'])\n );\n\n if (targetPage !== currentPage) {\n setCurrentPage(targetPage);\n }\n };\n\n // When the container size changes, adapt the amount of columns to be rendered according\n // to the given min width of a single item. The new amount of columns also has to respect\n // the lower and upper limit. When updating the amount, the current page hse to be updated as well.\n useEffect(() => {\n if (!columnWrapperRef.current) {\n return;\n }\n\n const firstItem = getFirstColumnItem(columnWrapperRef.current.children[0]);\n if (!firstItem) {\n return;\n }\n\n // Get the width of the first column to calculate how many columns fit in one page\n // according to the given minWidth per column\n const columnWidth = firstItem.getBoundingClientRect().width;\n\n // Limit columns per page for given min and max values\n const allowForLessColumns = columnsPerPage - 1 >= minColumns;\n const allowForMoreColumns = columnsPerPage + 1 <= maxColumns;\n\n // The threshold is required to avoid jumping between bigger and smaller after the columns per page\n // has changed, and it continues to resize\n const goSmaller = allowForLessColumns && columnWidth + MIN_WITH_THRESHOLD <= minColumnWith;\n const goBigger = allowForMoreColumns && (columnsPerPage + 1) * minColumnWith <= columnWrapperWidth!;\n\n // During resizing, we don't want any animation\n setIsResizePage(true);\n\n if (goBigger) {\n const newValue = columnsPerPage + 1;\n setColumnsPerPage(newValue);\n updatePageOnColumnsSizeChange(firstItem, newValue);\n return;\n }\n\n if (goSmaller) {\n const newValue = columnsPerPage - 1;\n setColumnsPerPage(newValue);\n updatePageOnColumnsSizeChange(firstItem, newValue);\n return;\n }\n }, [columnWrapperWidth, columnWrapperRef.current, children, columnsPerPage]);\n\n const handlePrevClick = () => {\n setIsResizePage(false);\n\n const pageNumber = currentPage - 1;\n setCurrentPage(pageNumber);\n onPreviousClick(pageNumber, columnsPerPage);\n };\n\n const handleNextClick = () => {\n setIsResizePage(false);\n\n const pageNumber = currentPage + 1;\n setCurrentPage(pageNumber);\n onNextClick(pageNumber, columnsPerPage);\n };\n\n if (!children) {\n return null;\n }\n\n // Split the children/columns in chunks according to the current columns per page size\n // and get the current page chunk for rendering\n const columnsToDisplay = chunk(children as ReactElement[], columnsPerPage)[currentPage];\n\n const showPageButtons = minColumns < (children as ReactElement[]).length;\n\n const disablePreviousPage = currentPage === 0;\n const disableNextPage = currentPage === Math.ceil((children as ReactElement[]).length / columnsPerPage) - 1;\n\n const wrapperClassName = classNames(\n 'ResponsiveColumnStripe',\n 'display-flex align-items-center',\n 'overflow-hidden',\n className\n );\n\n const baseButtonClassName = classNames(\n 'align-items-center',\n 'align-self-stretch',\n 'display-flex',\n 'hover-scale-105',\n 'hover-text-color-darkest',\n 'padding-10',\n 'cursor-pointer',\n 'text-color-darker',\n 'text-size-12'\n );\n\n const disabledButtonClassName = 'pointer-events-none opacity-30';\n\n const previousButtonClassName = classNames(\n 'PreviousButton',\n baseButtonClassName,\n disablePreviousPage && disabledButtonClassName\n );\n\n const nextButtonClassName = classNames(\n 'NextButton',\n baseButtonClassName,\n disableNextPage && disabledButtonClassName\n );\n\n const mergedColumnsWrapperClassName = classNames(\n 'ColumnWrapper',\n 'flex-1-1',\n 'display-flex',\n columnsWrapperClassName\n );\n\n const columnClassName = disableNextPage && !stretchLastItems ? 'flex-0-1' : 'flex-1-1';\n\n // Use the given custom component type \"div\" or any other. Clone the children to inject certain\n // properties that are required to stretch the items and deal with their size.\n const columns = (\n <ComponentType className={mergedColumnsWrapperClassName}>\n {Children.map(columnsToDisplay, column =>\n cloneElement(column, {\n className: `${COLUMN_ITEM_CLASSNAME} ${columnClassName} ${column.props?.className || ''}`,\n // style: { ...column.props?.style, minWidth: `${minColumnWith}px` },\n 'data-key': column.key,\n })\n )}\n </ComponentType>\n );\n\n return (\n <div {...remainingProps} ref={ref} className={wrapperClassName}>\n {showPageButtons && (\n <div className={previousButtonClassName} onClick={handlePrevClick}>\n <span className='rioglyph rioglyph-chevron-left' />\n </div>\n )}\n <div className='ColumnsArea flex-1-1 overflow-hidden' ref={columnWrapperRef}>\n {disableAnimation || isResizePage ? columns : null}\n {!disableAnimation && !isResizePage && (\n <AnimatePresence mode='wait' custom={animationDirection}>\n <motion.div\n key={currentPage}\n variants={variants}\n initial={enableInitialAnimation ? 'pageEnter' : false}\n animate='pageCenter'\n custom={animationDirection}\n transition={DEFAULT_TRANSITION}\n >\n {columns}\n </motion.div>\n </AnimatePresence>\n )}\n </div>\n {showPageButtons && (\n <div className={nextButtonClassName} onClick={handleNextClick}>\n <span className='rioglyph rioglyph-chevron-right' />\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default ResponsiveColumnStripe;\n"],"names":["MIN_WITH_THRESHOLD","DEFAULT_TRANSITION","ANIMATION_NEXT","ANIMATION_BACK","COLUMN_ITEM_CLASSNAME","variants","pageDirection","getFirstColumnItem","node","ResponsiveColumnStripe","forwardRef","props","ref","minColumnWith","minColumns","maxColumns","stretchLastItems","activePage","ComponentType","onPreviousClick","noop","onNextClick","buttonClassName","columnsWrapperClassName","className","disableAnimation","children","remainingProps","currentPage","setCurrentPage","useState","columnsPerPage","setColumnsPerPage","enableInitialAnimation","setEnableInitialAnimation","isResizePage","setIsResizePage","columnWrapperRef","useRef","columnWrapperWidth","useElementSize","previousPage","usePrevious","animationDirection","useAfterMount","previousActivePage","setPreviousActivePage","updatePageOnColumnsSizeChange","firstItem","perPage","pages","chunk","targetPage","findIndex","page","pageItem","useEffect","columnWidth","allowForLessColumns","allowForMoreColumns","goSmaller","goBigger","newValue","handlePrevClick","pageNumber","handleNextClick","columnsToDisplay","showPageButtons","disablePreviousPage","disableNextPage","wrapperClassName","classNames","baseButtonClassName","disabledButtonClassName","previousButtonClassName","nextButtonClassName","mergedColumnsWrapperClassName","columnClassName","columns","jsx","Children","column","cloneElement","jsxs","AnimatePresence","motion"],"mappings":";;;;;;;;AAmBA,MAAMA,KAAqB,IAErBC,KAAqB,EAAE,UAAU,IAAA,GAEjCC,IAAiB,QACjBC,KAAiB,YAEjBC,IAAwB,cAExBC,KAAqB;AAAA,EACvB,WAAW,CAAAC,OAAkB;AAAA,IACzB,GAAGA,MAAkBJ,IAAiB,QAAQ;AAAA,IAC9C,SAAS;AAAA,EAAA;AAAA,EAEb,YAAY,OAAO,EAAE,GAAG,GAAG,SAAS,EAAA;AACxC,GAEMK,IAAqB,CAACC,MACpB,CAAC,GAAGA,EAAK,SAAS,EAAE,SAASJ,CAAqB,IAC3CI,IAEJD,EAAmBC,EAAK,SAAS,CAAC,CAAgB,GA2FvDC,KAAyBC;AAAA,EAC3B,CAACC,GAAOC,MAAQ;AACZ,UAAM;AAAA,MACF,eAAAC,IAAgB;AAAA,MAChB,YAAAC,IAAa;AAAA,MACb,YAAAC,IAAa;AAAA,MACb,kBAAAC,IAAmB;AAAA,MACnB,YAAAC,IAAa;AAAA,MACb,QAAQC,IAAgB;AAAA,MACxB,iBAAAC,IAAkBC;AAAA,MAClB,aAAAC,IAAcD;AAAA,MACd,iBAAAE,KAAkB;AAAA,MAClB,yBAAAC,IAA0B;AAAA,MAC1B,WAAAC,IAAY;AAAA,MACZ,kBAAAC,IAAmB;AAAA,MACnB,UAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACHhB,GAEE,CAACiB,GAAaC,CAAc,IAAIC,EAASb,CAAU,GACnD,CAACc,GAAgBC,CAAiB,IAAIF,EAASf,CAAU,GACzD,CAACkB,GAAwBC,CAAyB,IAAIJ,EAAS,EAAK,GAEpE,CAACK,GAAcC,CAAe,IAAIN,EAAS,EAAK,GAIhDO,IAAmBC,GAAuB,IAAI,GAC9C,CAACC,CAAkB,IAAIC,GAAeH,CAAgB,GAEtDI,IAAeC,GAAYd,CAAW,GACtCe,IAA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CACtB;AAAA,IAAA,GAET;AAGJ,6BACK,OAAA,EAAK,GAAGtD,GAAgB,KAAAf,GAAU,WAAW0D,IACzC,UAAA;AAAA,MAAAH,KACG,gBAAAY,EAAC,OAAA,EAAI,WAAWL,IAAyB,SAASX,GAC9C,UAAA,gBAAAgB,EAAC,QAAA,EAAK,WAAU,iCAAA,CAAiC,EAAA,CACrD;AAAA,MAEJ,gBAAAI,EAAC,OAAA,EAAI,WAAU,wCAAuC,KAAK9C,GACtD,UAAA;AAAA,QAAAZ,KAAoBU,IAAe2C,IAAU;AAAA,QAC7C,CAACrD,KAAoB,CAACU,uBAClBiD,IAAA,EAAgB,MAAK,QAAO,QAAQzC,GACjC,UAAA,gBAAAoC;AAAA,UAACM,GAAO;AAAA,UAAP;AAAA,YAEG,UAAAhF;AAAA,YACA,SAAS4B,IAAyB,cAAc;AAAA,YAChD,SAAQ;AAAA,YACR,QAAQU;AAAA,YACR,YAAY1C;AAAA,YAEX,UAAA6E;AAAA,UAAA;AAAA,UAPIlD;AAAA,QAAA,EAQT,CACJ;AAAA,MAAA,GAER;AAAA,MACCuC,KACG,gBAAAY,EAAC,OAAA,EAAI,WAAWJ,IAAqB,SAASV,GAC1C,UAAA,gBAAAc,EAAC,QAAA,EAAK,WAAU,kCAAA,CAAkC,EAAA,CACtD;AAAA,IAAA,GAER;AAAA,EAER;AACJ;"}
1
+ {"version":3,"file":"ResponsiveColumnStripe.js","sources":["../../../src/components/responsiveColumnStripe/ResponsiveColumnStripe.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n type PropsWithChildren,\n type ReactElement,\n type ReactHTML,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { chunk, findIndex, noop } from 'es-toolkit/compat';\nimport { AnimatePresence, motion, type Variants } from 'motion/react';\n\nimport classNames from '../../utils/classNames';\nimport useAfterMount from '../../hooks/useAfterMount';\nimport useElementSize from '../../hooks/useElementSize';\nimport usePrevious from '../../hooks/usePrevious';\n\nconst MIN_WITH_THRESHOLD = 10;\n\nconst DEFAULT_TRANSITION = { duration: 0.2 };\n\nconst ANIMATION_NEXT = 'page';\nconst ANIMATION_BACK = 'pageBack';\n\nconst COLUMN_ITEM_CLASSNAME = 'ColumnItem';\n\nconst variants: Variants = {\n pageEnter: pageDirection => ({\n x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',\n opacity: 0,\n }),\n pageCenter: () => ({ x: 0, opacity: 1 }),\n};\n\nconst getFirstColumnItem = (node: Element): HTMLElement => {\n if ([...node.classList].includes(COLUMN_ITEM_CLASSNAME)) {\n return node as HTMLElement;\n }\n return getFirstColumnItem(node.children[0] as HTMLElement);\n};\n\nexport type ResponsiveColumnStripeProps = {\n /**\n * The minimum width in pixel of a single column.\n *\n * This value determines how many columns are shown per page depending on the parent width.\n *\n * @default 300\n */\n minColumnWith?: number;\n\n /**\n * The minimum amount of columns that should be shown per page.\n *\n * @default 1\n */\n minColumns?: number;\n\n /**\n * The maximum amount of columns that should be shown per page.\n *\n * @default 5\n */\n maxColumns?: number;\n\n /**\n * Defines whether the items on the last page are stretched out to fill the space.\n *\n * @default false\n */\n stretchLastItems?: boolean;\n\n /**\n * The page that shall be shown.\n *\n * This can be used to control the pages from outside.\n *\n * @default 0\n */\n activePage?: number;\n\n /**\n * The DOM element type of the wrapping column element.\n *\n * If you need a list, this might be set to \"ul\".\n *\n * @default 'div'\n */\n asType?: keyof ReactHTML;\n\n /**\n * Set to true to skip animating pages.\n *\n * @default false\n */\n disableAnimation?: boolean;\n\n /**\n * Callback function for when the previous page is clicked.\n *\n * @param pageNumber\n * @param columnsPerPage\n */\n onPreviousClick?: (pageNumber: number, columnsPerPage: number) => void;\n\n /**\n * Callback function for when the next page is clicked.\n *\n * @param pageNumber\n * @param columnsPerPage\n */\n onNextClick?: (pageNumber: number, columnsPerPage: number) => void;\n\n /**\n * Additional classes set to the navigation buttons.\n */\n buttonClassName?: string;\n\n /**\n * Additional classes set to the component wrapper element.\n */\n columnsWrapperClassName?: string;\n\n /**\n * Additional classes set to the column wrapper element.\n */\n className?: string;\n};\n\nconst ResponsiveColumnStripe = forwardRef<HTMLDivElement, PropsWithChildren<ResponsiveColumnStripeProps>>(\n (props, ref) => {\n const {\n minColumnWith = 300,\n minColumns = 1,\n maxColumns = 5,\n stretchLastItems = true,\n activePage = 0,\n asType: ComponentType = 'div',\n onPreviousClick = noop,\n onNextClick = noop,\n buttonClassName = '',\n columnsWrapperClassName = '',\n className = '',\n disableAnimation = false,\n children,\n ...remainingProps\n } = props;\n\n const [currentPage, setCurrentPage] = useState(activePage);\n const [columnsPerPage, setColumnsPerPage] = useState(maxColumns);\n const [enableInitialAnimation, setEnableInitialAnimation] = useState(false);\n\n const [isResizePage, setIsResizePage] = useState(false);\n\n // The base for reacting on changing width of the wrapping element.\n // It uses a ResizeObserver under the hood.\n const columnWrapperRef = useRef<HTMLDivElement>(null);\n const [columnWrapperWidth] = useElementSize(columnWrapperRef);\n\n const previousPage = usePrevious(currentPage);\n const animationDirection = currentPage > previousPage ? ANIMATION_NEXT : ANIMATION_BACK;\n\n useAfterMount(() => {\n setEnableInitialAnimation(true);\n });\n\n // Update active page from outside to be used as controlled component\n const [previousActivePage, setPreviousActivePage] = useState(activePage);\n if (Number.isFinite(activePage) && activePage !== previousActivePage) {\n setCurrentPage(activePage);\n setPreviousActivePage(activePage);\n }\n\n const updatePageOnColumnsSizeChange = (firstItem: HTMLElement, perPage: number) => {\n // Split children in page chunks\n const pages = chunk(children as ReactElement[], perPage);\n\n // find the currently rendered first item inside the chunks.\n // The found chunk index is the new page to render.\n // example of chunks => [['a', 'b', 'c'], ['d']]\n const targetPage = findIndex(pages, (page: ReactElement[]) =>\n page.some(pageItem => pageItem.key === firstItem.dataset.key)\n );\n\n if (targetPage !== currentPage) {\n setCurrentPage(targetPage);\n }\n };\n\n // When the container size changes, adapt the amount of columns to be rendered according\n // to the given min width of a single item. The new amount of columns also has to respect\n // the lower and upper limit. When updating the amount, the current page hse to be updated as well.\n useEffect(() => {\n if (!columnWrapperRef.current) {\n return;\n }\n\n const firstItem = getFirstColumnItem(columnWrapperRef.current.children[0]);\n if (!firstItem) {\n return;\n }\n\n // Get the width of the first column to calculate how many columns fit in one page\n // according to the given minWidth per column\n const columnWidth = firstItem.getBoundingClientRect().width;\n\n // Limit columns per page for given min and max values\n const allowForLessColumns = columnsPerPage - 1 >= minColumns;\n const allowForMoreColumns = columnsPerPage + 1 <= maxColumns;\n\n // The threshold is required to avoid jumping between bigger and smaller after the columns per page\n // has changed, and it continues to resize\n const goSmaller = allowForLessColumns && columnWidth + MIN_WITH_THRESHOLD <= minColumnWith;\n const goBigger = allowForMoreColumns && (columnsPerPage + 1) * minColumnWith <= columnWrapperWidth!;\n\n // During resizing, we don't want any animation\n setIsResizePage(true);\n\n if (goBigger) {\n const newValue = columnsPerPage + 1;\n setColumnsPerPage(newValue);\n updatePageOnColumnsSizeChange(firstItem, newValue);\n return;\n }\n\n if (goSmaller) {\n const newValue = columnsPerPage - 1;\n setColumnsPerPage(newValue);\n updatePageOnColumnsSizeChange(firstItem, newValue);\n return;\n }\n }, [columnWrapperWidth, columnWrapperRef.current, children, columnsPerPage]);\n\n const handlePrevClick = () => {\n setIsResizePage(false);\n\n const pageNumber = currentPage - 1;\n setCurrentPage(pageNumber);\n onPreviousClick(pageNumber, columnsPerPage);\n };\n\n const handleNextClick = () => {\n setIsResizePage(false);\n\n const pageNumber = currentPage + 1;\n setCurrentPage(pageNumber);\n onNextClick(pageNumber, columnsPerPage);\n };\n\n if (!children) {\n return null;\n }\n\n // Split the children/columns in chunks according to the current columns per page size\n // and get the current page chunk for rendering\n const columnsToDisplay = chunk(children as ReactElement[], columnsPerPage)[currentPage];\n\n const showPageButtons = minColumns < (children as ReactElement[]).length;\n\n const disablePreviousPage = currentPage === 0;\n const disableNextPage = currentPage === Math.ceil((children as ReactElement[]).length / columnsPerPage) - 1;\n\n const wrapperClassName = classNames(\n 'ResponsiveColumnStripe',\n 'display-flex align-items-center',\n 'overflow-hidden',\n className\n );\n\n const baseButtonClassName = classNames(\n 'align-items-center',\n 'align-self-stretch',\n 'display-flex',\n 'hover-scale-105',\n 'hover-text-color-darkest',\n 'padding-10',\n 'cursor-pointer',\n 'text-color-darker',\n 'text-size-12'\n );\n\n const disabledButtonClassName = 'pointer-events-none opacity-30';\n\n const previousButtonClassName = classNames(\n 'PreviousButton',\n baseButtonClassName,\n disablePreviousPage && disabledButtonClassName\n );\n\n const nextButtonClassName = classNames(\n 'NextButton',\n baseButtonClassName,\n disableNextPage && disabledButtonClassName\n );\n\n const mergedColumnsWrapperClassName = classNames(\n 'ColumnWrapper',\n 'flex-1-1',\n 'display-flex',\n columnsWrapperClassName\n );\n\n const columnClassName = disableNextPage && !stretchLastItems ? 'flex-0-1' : 'flex-1-1';\n\n // Use the given custom component type \"div\" or any other. Clone the children to inject certain\n // properties that are required to stretch the items and deal with their size.\n const columns = (\n <ComponentType className={mergedColumnsWrapperClassName}>\n {Children.map(columnsToDisplay, column =>\n cloneElement(column, {\n className: `${COLUMN_ITEM_CLASSNAME} ${columnClassName} ${column.props?.className || ''}`,\n // style: { ...column.props?.style, minWidth: `${minColumnWith}px` },\n 'data-key': column.key,\n })\n )}\n </ComponentType>\n );\n\n return (\n <div {...remainingProps} ref={ref} className={wrapperClassName}>\n {showPageButtons && (\n <div className={previousButtonClassName} onClick={handlePrevClick}>\n <span className='rioglyph rioglyph-chevron-left' />\n </div>\n )}\n <div className='ColumnsArea flex-1-1 overflow-hidden' ref={columnWrapperRef}>\n {disableAnimation || isResizePage ? columns : null}\n {!disableAnimation && !isResizePage && (\n <AnimatePresence mode='wait' custom={animationDirection}>\n <motion.div\n key={currentPage}\n variants={variants}\n initial={enableInitialAnimation ? 'pageEnter' : false}\n animate='pageCenter'\n custom={animationDirection}\n transition={DEFAULT_TRANSITION}\n >\n {columns}\n </motion.div>\n </AnimatePresence>\n )}\n </div>\n {showPageButtons && (\n <div className={nextButtonClassName} onClick={handleNextClick}>\n <span className='rioglyph rioglyph-chevron-right' />\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default ResponsiveColumnStripe;\n"],"names":["MIN_WITH_THRESHOLD","DEFAULT_TRANSITION","ANIMATION_NEXT","ANIMATION_BACK","COLUMN_ITEM_CLASSNAME","variants","pageDirection","getFirstColumnItem","node","ResponsiveColumnStripe","forwardRef","props","ref","minColumnWith","minColumns","maxColumns","stretchLastItems","activePage","ComponentType","onPreviousClick","noop","onNextClick","buttonClassName","columnsWrapperClassName","className","disableAnimation","children","remainingProps","currentPage","setCurrentPage","useState","columnsPerPage","setColumnsPerPage","enableInitialAnimation","setEnableInitialAnimation","isResizePage","setIsResizePage","columnWrapperRef","useRef","columnWrapperWidth","useElementSize","previousPage","usePrevious","animationDirection","useAfterMount","previousActivePage","setPreviousActivePage","updatePageOnColumnsSizeChange","firstItem","perPage","pages","chunk","targetPage","findIndex","page","pageItem","useEffect","columnWidth","allowForLessColumns","allowForMoreColumns","goSmaller","goBigger","newValue","handlePrevClick","pageNumber","handleNextClick","columnsToDisplay","showPageButtons","disablePreviousPage","disableNextPage","wrapperClassName","classNames","baseButtonClassName","disabledButtonClassName","previousButtonClassName","nextButtonClassName","mergedColumnsWrapperClassName","columnClassName","columns","jsx","Children","column","cloneElement","jsxs","AnimatePresence","motion"],"mappings":";;;;;;;;AAmBA,MAAMA,KAAqB,IAErBC,KAAqB,EAAE,UAAU,IAAA,GAEjCC,IAAiB,QACjBC,KAAiB,YAEjBC,IAAwB,cAExBC,KAAqB;AAAA,EACvB,WAAW,CAAAC,OAAkB;AAAA,IACzB,GAAGA,MAAkBJ,IAAiB,QAAQ;AAAA,IAC9C,SAAS;AAAA,EAAA;AAAA,EAEb,YAAY,OAAO,EAAE,GAAG,GAAG,SAAS,EAAA;AACxC,GAEMK,IAAqB,CAACC,MACpB,CAAC,GAAGA,EAAK,SAAS,EAAE,SAASJ,CAAqB,IAC3CI,IAEJD,EAAmBC,EAAK,SAAS,CAAC,CAAgB,GA2FvDC,KAAyBC;AA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AAc;AAAA,YAChD,SAAQ;AAAA,YACR,QAAQU;AAAA,YACR,YAAY1C;AAAA,YAEX,UAAA6E;AAAA,UAAA;AAAA,UAPIlD;AAAA,QAAA,EAQT,CACJ;AAAA,MAAA,GAER;AAAA,MACCuC,KACG,gBAAAY,EAAC,OAAA,EAAI,WAAWJ,IAAqB,SAASV,GAC1C,UAAA,gBAAAc,EAAC,QAAA,EAAK,WAAU,kCAAA,CAAkC,EAAA,CACtD;AAAA,IAAA,GAER;AAAA,EAER;AACJ;"}
@@ -2,7 +2,7 @@ import { RioglyphIconType } from './RioglyphIconType';
2
2
  export type IconType = RioglyphIconType;
3
3
  export type RioglyphProps = {
4
4
  /**
5
- * The icon class to display.
5
+ * The rioglyph icon string OR an external .svg link
6
6
  */
7
7
  icon: IconType | string;
8
8
  /**
@@ -14,31 +14,43 @@ export type RioglyphProps = {
14
14
  */
15
15
  size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | '10' | '11' | '12' | '14' | '16' | '18' | '20';
16
16
  /**
17
- * Spinning animation
17
+ * Spinning animation.
18
+ *
19
+ * @default false
18
20
  */
19
21
  spinning?: boolean;
20
22
  /**
21
- * Pulsing animation
23
+ * Pulsing animation.
24
+ *
25
+ * @default false
22
26
  */
23
27
  pulsing?: boolean;
24
28
  /**
25
- * Filled style
29
+ * Filled style.
30
+ *
31
+ * @default false
26
32
  */
27
33
  filled?: boolean;
28
34
  /**
29
- * Pulsing animation
35
+ * Add a disabled line
36
+ *
37
+ * @default false
30
38
  */
31
39
  disabled?: boolean;
32
40
  /**
33
- * Pulsing animation
41
+ * Recolor the disabled line to the danger color.
42
+ *
43
+ * @default false
34
44
  */
35
45
  disabledDanger?: boolean;
36
46
  /**
37
- * Pulsing animation
47
+ * Flip the disabled line.
48
+ *
49
+ * @default false
38
50
  */
39
51
  disabledInverse?: boolean;
40
52
  /**
41
- * The icon class to display as a pair (optional).
53
+ * The rioglyph icon string OR an external .svg link.
42
54
  */
43
55
  pairIcon?: IconType | string;
44
56
  /**
@@ -1,5 +1,5 @@
1
1
  import { jsxs as j, jsx as n } from "react/jsx-runtime";
2
- import i from "classnames";
2
+ import i from "../../utils/classNames.js";
3
3
  const w = (p) => {
4
4
  const {
5
5
  icon: s,
@@ -1 +1 @@
1
- {"version":3,"file":"Rioglyph.js","sources":["../../../src/components/rioglyph/Rioglyph.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { RioglyphIconType } from './RioglyphIconType';\n\nexport type IconType = RioglyphIconType;\n\nexport type RioglyphProps = {\n /**\n * The icon class to display.\n */\n icon: IconType | string;\n\n /**\n * Additional classes set to the icon span.\n */\n iconClassName?: string;\n\n /**\n * The size (text-size) of the icon\n */\n size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | '10' | '11' | '12' | '14' | '16' | '18' | '20';\n\n /**\n * Spinning animation\n */\n spinning?: boolean;\n\n /**\n * Pulsing animation\n */\n pulsing?: boolean;\n\n /**\n * Filled style\n */\n filled?: boolean;\n\n /**\n * Pulsing animation\n */\n disabled?: boolean;\n\n /**\n * Pulsing animation\n */\n disabledDanger?: boolean;\n\n /**\n * Pulsing animation\n */\n disabledInverse?: boolean;\n\n /**\n * The icon class to display as a pair (optional).\n */\n pairIcon?: IconType | string;\n\n /**\n * Additional classes set to the pairIcon span.\n */\n pairIconClassName?: string;\n};\n\nconst Rioglyph = (props: RioglyphProps) => {\n const {\n icon,\n iconClassName = '',\n pairIcon,\n pairIconClassName = '',\n size,\n spinning = false,\n pulsing = false,\n filled = false,\n disabled = false,\n disabledDanger = false,\n disabledInverse = false,\n } = props;\n\n const spinningClass = spinning ? 'spinning' : '';\n const pulsingClass = pulsing ? 'pulsing' : '';\n const filledClass = filled ? 'rioglyph-filled' : '';\n const disabledClass = disabled ? 'rioglyph-disabled' : '';\n const disabledDangerClass = disabledDanger ? 'rioglyph-disabled rioglyph-disabled-danger' : '';\n const disabledInverseClass = disabledInverse ? 'rioglyph-disabled rioglyph-disabled-inverse' : '';\n\n let iconStyle: React.CSSProperties | undefined;\n if (icon.includes('.svg')) {\n iconStyle = { '--i': `url(${icon})` } as React.CSSProperties;\n }\n\n if (pairIcon) {\n const wrapperClasses = classNames('rioglyph-icon-pair', size && `text-size-${size}`);\n const iconClasses = classNames('rioglyph', !icon.includes('.svg') && icon, iconClassName);\n const pairIconClasses = classNames(\n 'rioglyph',\n !pairIcon.includes('.svg') && pairIcon,\n pairIconClassName,\n spinningClass,\n pulsingClass\n );\n\n let pairIconStyle: React.CSSProperties | undefined;\n if (pairIcon?.includes('.svg')) {\n pairIconStyle = { '--i': `url(${pairIcon})` } as React.CSSProperties;\n }\n\n return (\n <span className={wrapperClasses}>\n <span className={iconClasses} style={iconStyle} />\n <span className={pairIconClasses} style={pairIconStyle} />\n </span>\n );\n }\n\n const iconClasses = classNames(\n 'rioglyph',\n !icon.includes('.svg') && icon,\n size && `text-size-${size}`,\n disabledClass,\n disabledDangerClass,\n disabledInverseClass,\n iconClassName,\n spinningClass,\n pulsingClass,\n filledClass\n );\n\n return <span className={iconClasses} style={iconStyle} />;\n};\n\nexport default Rioglyph;\n"],"names":["Rioglyph","props","icon","iconClassName","pairIcon","pairIconClassName","size","spinning","pulsing","filled","disabled","disabledDanger","disabledInverse","spinningClass","pulsingClass","filledClass","disabledClass","disabledDangerClass","disabledInverseClass","iconStyle","wrapperClasses","classNames","iconClasses","pairIconClasses","pairIconStyle","jsxs","jsx"],"mappings":";;AA+DA,MAAMA,IAAW,CAACC,MAAyB;AACvC,QAAM;AAAA,IACF,MAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,UAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,MAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,gBAAAC,IAAiB;AAAA,IACjB,iBAAAC,IAAkB;AAAA,EAAA,IAClBX,GAEEY,IAAgBN,IAAW,aAAa,IACxCO,IAAeN,IAAU,YAAY,IACrCO,IAAcN,IAAS,oBAAoB,IAC3CO,IAAgBN,IAAW,sBAAsB,IACjDO,IAAsBN,IAAiB,+CAA+C,IACtFO,IAAuBN,IAAkB,gDAAgD;AAE/F,MAAIO;AAKJ,MAJIjB,EAAK,SAAS,MAAM,MACpBiB,IAAY,EAAE,OAAO,OAAOjB,CAAI,IAAA,IAGhCE,GAAU;AACV,UAAMgB,IAAiBC,EAAW,sBAAsBf,KAAQ,aAAaA,CAAI,EAAE,GAC7EgB,IAAcD,EAAW,YAAY,CAACnB,EAAK,SAAS,MAAM,KAAKA,GAAMC,CAAa,GAClFoB,IAAkBF;AAAA,MACpB;AAAA,MACA,CAACjB,EAAS,SAAS,MAAM,KAAKA;AAAA,MAC9BC;AAAA,MACAQ;AAAA,MACAC;AAAA,IAAA;AAGJ,QAAIU;AACJ,WAAIpB,GAAU,SAAS,MAAM,MACzBoB,IAAgB,EAAE,OAAO,OAAOpB,CAAQ,IAAA,IAIxC,gBAAAqB,EAAC,QAAA,EAAK,WAAWL,GACb,UAAA;AAAA,MAAA,gBAAAM,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAAA,MAChD,gBAAAO,EAAC,QAAA,EAAK,WAAWH,GAAiB,OAAOC,EAAA,CAAe;AAAA,IAAA,GAC5D;AAAA,EAER;AAEA,QAAMF,IAAcD;AAAA,IAChB;AAAA,IACA,CAACnB,EAAK,SAAS,MAAM,KAAKA;AAAA,IAC1BI,KAAQ,aAAaA,CAAI;AAAA,IACzBU;AAAA,IACAC;AAAA,IACAC;AAAA,IACAf;AAAA,IACAU;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAGJ,SAAO,gBAAAW,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAC3D;"}
1
+ {"version":3,"file":"Rioglyph.js","sources":["../../../src/components/rioglyph/Rioglyph.tsx"],"sourcesContent":["import classNames from '../../utils/classNames';\nimport type { RioglyphIconType } from './RioglyphIconType';\n\nexport type IconType = RioglyphIconType;\n\nexport type RioglyphProps = {\n /**\n * The rioglyph icon string OR an external .svg link\n */\n icon: IconType | string;\n\n /**\n * Additional classes set to the icon span.\n */\n iconClassName?: string;\n\n /**\n * The size (text-size) of the icon\n */\n size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | '10' | '11' | '12' | '14' | '16' | '18' | '20';\n\n /**\n * Spinning animation.\n * \n * @default false\n */\n spinning?: boolean;\n\n /**\n * Pulsing animation.\n * \n * @default false\n */\n pulsing?: boolean;\n\n /**\n * Filled style.\n * \n * @default false\n */\n filled?: boolean;\n\n /**\n * Add a disabled line\n * \n * @default false\n */\n disabled?: boolean;\n\n /**\n * Recolor the disabled line to the danger color.\n * \n * @default false\n */\n disabledDanger?: boolean;\n\n /**\n * Flip the disabled line.\n * \n * @default false\n */\n disabledInverse?: boolean;\n\n /**\n * The rioglyph icon string OR an external .svg link.\n */\n pairIcon?: IconType | string;\n\n /**\n * Additional classes set to the pairIcon span.\n */\n pairIconClassName?: string;\n};\n\nconst Rioglyph = (props: RioglyphProps) => {\n const {\n icon,\n iconClassName = '',\n pairIcon,\n pairIconClassName = '',\n size,\n spinning = false,\n pulsing = false,\n filled = false,\n disabled = false,\n disabledDanger = false,\n disabledInverse = false,\n } = props;\n\n const spinningClass = spinning ? 'spinning' : '';\n const pulsingClass = pulsing ? 'pulsing' : '';\n const filledClass = filled ? 'rioglyph-filled' : '';\n const disabledClass = disabled ? 'rioglyph-disabled' : '';\n const disabledDangerClass = disabledDanger ? 'rioglyph-disabled rioglyph-disabled-danger' : '';\n const disabledInverseClass = disabledInverse ? 'rioglyph-disabled rioglyph-disabled-inverse' : '';\n\n let iconStyle: React.CSSProperties | undefined;\n if (icon.includes('.svg')) {\n iconStyle = { '--i': `url(${icon})` } as React.CSSProperties;\n }\n\n if (pairIcon) {\n const wrapperClasses = classNames('rioglyph-icon-pair', size && `text-size-${size}`);\n const iconClasses = classNames('rioglyph', !icon.includes('.svg') && icon, iconClassName);\n const pairIconClasses = classNames(\n 'rioglyph',\n !pairIcon.includes('.svg') && pairIcon,\n pairIconClassName,\n spinningClass,\n pulsingClass\n );\n\n let pairIconStyle: React.CSSProperties | undefined;\n if (pairIcon?.includes('.svg')) {\n pairIconStyle = { '--i': `url(${pairIcon})` } as React.CSSProperties;\n }\n\n return (\n <span className={wrapperClasses}>\n <span className={iconClasses} style={iconStyle} />\n <span className={pairIconClasses} style={pairIconStyle} />\n </span>\n );\n }\n\n const iconClasses = classNames(\n 'rioglyph',\n !icon.includes('.svg') && icon,\n size && `text-size-${size}`,\n disabledClass,\n disabledDangerClass,\n disabledInverseClass,\n iconClassName,\n spinningClass,\n pulsingClass,\n filledClass\n );\n\n return <span className={iconClasses} style={iconStyle} />;\n};\n\nexport default Rioglyph;\n"],"names":["Rioglyph","props","icon","iconClassName","pairIcon","pairIconClassName","size","spinning","pulsing","filled","disabled","disabledDanger","disabledInverse","spinningClass","pulsingClass","filledClass","disabledClass","disabledDangerClass","disabledInverseClass","iconStyle","wrapperClasses","classNames","iconClasses","pairIconClasses","pairIconStyle","jsxs","jsx"],"mappings":";;AA0EA,MAAMA,IAAW,CAACC,MAAyB;AACvC,QAAM;AAAA,IACF,MAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,UAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,MAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,gBAAAC,IAAiB;AAAA,IACjB,iBAAAC,IAAkB;AAAA,EAAA,IAClBX,GAEEY,IAAgBN,IAAW,aAAa,IACxCO,IAAeN,IAAU,YAAY,IACrCO,IAAcN,IAAS,oBAAoB,IAC3CO,IAAgBN,IAAW,sBAAsB,IACjDO,IAAsBN,IAAiB,+CAA+C,IACtFO,IAAuBN,IAAkB,gDAAgD;AAE/F,MAAIO;AAKJ,MAJIjB,EAAK,SAAS,MAAM,MACpBiB,IAAY,EAAE,OAAO,OAAOjB,CAAI,IAAA,IAGhCE,GAAU;AACV,UAAMgB,IAAiBC,EAAW,sBAAsBf,KAAQ,aAAaA,CAAI,EAAE,GAC7EgB,IAAcD,EAAW,YAAY,CAACnB,EAAK,SAAS,MAAM,KAAKA,GAAMC,CAAa,GAClFoB,IAAkBF;AAAA,MACpB;AAAA,MACA,CAACjB,EAAS,SAAS,MAAM,KAAKA;AAAA,MAC9BC;AAAA,MACAQ;AAAA,MACAC;AAAA,IAAA;AAGJ,QAAIU;AACJ,WAAIpB,GAAU,SAAS,MAAM,MACzBoB,IAAgB,EAAE,OAAO,OAAOpB,CAAQ,IAAA,IAIxC,gBAAAqB,EAAC,QAAA,EAAK,WAAWL,GACb,UAAA;AAAA,MAAA,gBAAAM,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAAA,MAChD,gBAAAO,EAAC,QAAA,EAAK,WAAWH,GAAiB,OAAOC,EAAA,CAAe;AAAA,IAAA,GAC5D;AAAA,EAER;AAEA,QAAMF,IAAcD;AAAA,IAChB;AAAA,IACA,CAACnB,EAAK,SAAS,MAAM,KAAKA;AAAA,IAC1BI,KAAQ,aAAaA,CAAI;AAAA,IACzBU;AAAA,IACAC;AAAA,IACAC;AAAA,IACAf;AAAA,IACAU;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAGJ,SAAO,gBAAAW,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAC3D;"}
@@ -1 +1 @@
1
- export type RioglyphIconType = 'rioglyph-academic-cap' | 'rioglyph-addressbook' | 'rioglyph-ai' | 'rioglyph-air-pay' | 'rioglyph-am' | 'rioglyph-angle-double-down' | 'rioglyph-angle-double-left' | 'rioglyph-angle-double-right' | 'rioglyph-angle-double-up' | 'rioglyph-antenna' | 'rioglyph-api' | 'rioglyph-archive' | 'rioglyph-area-chart' | 'rioglyph-area-in' | 'rioglyph-area-out' | 'rioglyph-arrow-down' | 'rioglyph-arrow-left' | 'rioglyph-arrow-right' | 'rioglyph-arrow-up' | 'rioglyph-arrows-collapse' | 'rioglyph-arrows-combine' | 'rioglyph-arrows-expand' | 'rioglyph-arrows-horizontal' | 'rioglyph-arrows-split' | 'rioglyph-assigned' | 'rioglyph-axis-x' | 'rioglyph-axis-y' | 'rioglyph-axis-z' | 'rioglyph-axle' | 'rioglyph-ban-circle' | 'rioglyph-bar-chart-box' | 'rioglyph-battery-charging' | 'rioglyph-battery-level-empty' | 'rioglyph-battery-level-full' | 'rioglyph-battery-level-low' | 'rioglyph-beacon' | 'rioglyph-book' | 'rioglyph-bookable-poi' | 'rioglyph-bookmark-square' | 'rioglyph-bookmark' | 'rioglyph-border-crossing' | 'rioglyph-brain' | 'rioglyph-brake' | 'rioglyph-branch-horizontal' | 'rioglyph-branch-remove' | 'rioglyph-branch-vertical' | 'rioglyph-broadcast' | 'rioglyph-building' | 'rioglyph-bulb' | 'rioglyph-bus-baseline' | 'rioglyph-bus-breakdown' | 'rioglyph-bus' | 'rioglyph-businessman' | 'rioglyph-calendar-parking' | 'rioglyph-calendar-plus' | 'rioglyph-calendar-today' | 'rioglyph-calendar' | 'rioglyph-camera' | 'rioglyph-car-baseline' | 'rioglyph-car-wash' | 'rioglyph-car' | 'rioglyph-card-hotel' | 'rioglyph-card-reader' | 'rioglyph-cards-add' | 'rioglyph-cards-grid' | 'rioglyph-cards-list' | 'rioglyph-cards-table' | 'rioglyph-cargo' | 'rioglyph-carrier' | 'rioglyph-chat' | 'rioglyph-check-badge' | 'rioglyph-check-shield' | 'rioglyph-checkbox-checked' | 'rioglyph-checkbox' | 'rioglyph-checkboxes' | 'rioglyph-chevron-down' | 'rioglyph-chevron-left' | 'rioglyph-chevron-right' | 'rioglyph-chevron-up' | 'rioglyph-chip' | 'rioglyph-circle-dashed' | 'rioglyph-circle-stack' | 'rioglyph-click' | 'rioglyph-climate-control' | 'rioglyph-clipboard' | 'rioglyph-cloud-download' | 'rioglyph-cloud-not-saved' | 'rioglyph-cloud-progress' | 'rioglyph-cloud-upload' | 'rioglyph-cloud' | 'rioglyph-coasting' | 'rioglyph-code-braces' | 'rioglyph-code-brackets' | 'rioglyph-coffee' | 'rioglyph-cog' | 'rioglyph-color-swatch' | 'rioglyph-comment' | 'rioglyph-compare' | 'rioglyph-compass' | 'rioglyph-component-custom-recurrent' | 'rioglyph-component-custom' | 'rioglyph-component' | 'rioglyph-construction' | 'rioglyph-convert' | 'rioglyph-conveyor-belt' | 'rioglyph-cookie' | 'rioglyph-cooling' | 'rioglyph-cost-efficency' | 'rioglyph-cost-efficiency' | 'rioglyph-crown' | 'rioglyph-cruise-control' | 'rioglyph-csv' | 'rioglyph-cube-dashed' | 'rioglyph-cube' | 'rioglyph-currency-euro' | 'rioglyph-damages' | 'rioglyph-dangerousgoods' | 'rioglyph-dashboard-view' | 'rioglyph-dashboard' | 'rioglyph-delivery-completed' | 'rioglyph-delivery-error' | 'rioglyph-delivery-late' | 'rioglyph-delivery-on-track' | 'rioglyph-delivery-warning' | 'rioglyph-delivery' | 'rioglyph-design' | 'rioglyph-desktop' | 'rioglyph-detail-view-info' | 'rioglyph-detail-view' | 'rioglyph-direction' | 'rioglyph-discount-badge' | 'rioglyph-document-out' | 'rioglyph-document' | 'rioglyph-download' | 'rioglyph-drag-n-drop' | 'rioglyph-drive-history' | 'rioglyph-driver-card' | 'rioglyph-driver-off' | 'rioglyph-driver' | 'rioglyph-drivercard-in' | 'rioglyph-drivercard-out' | 'rioglyph-duplicate' | 'rioglyph-earphone' | 'rioglyph-emergency-stop' | 'rioglyph-empty' | 'rioglyph-engine' | 'rioglyph-envelope-indicator' | 'rioglyph-envelope-open' | 'rioglyph-envelope' | 'rioglyph-erase' | 'rioglyph-error-sign' | 'rioglyph-euro-note' | 'rioglyph-exclamation-sign' | 'rioglyph-exclamation' | 'rioglyph-eye-close' | 'rioglyph-eye-closed' | 'rioglyph-eye-open' | 'rioglyph-eye-option' | 'rioglyph-face-frown' | 'rioglyph-face-neutral' | 'rioglyph-face-smile' | 'rioglyph-facetime-video' | 'rioglyph-factory' | 'rioglyph-file-signature' | 'rioglyph-files' | 'rioglyph-fill' | 'rioglyph-filling-e-station' | 'rioglyph-filling-station' | 'rioglyph-filter-active' | 'rioglyph-filter-reset' | 'rioglyph-filter' | 'rioglyph-fingerprint' | 'rioglyph-finish' | 'rioglyph-fire' | 'rioglyph-flag' | 'rioglyph-flash' | 'rioglyph-folder-closed' | 'rioglyph-folder-open' | 'rioglyph-fuel-diesel' | 'rioglyph-fuel-electric' | 'rioglyph-fuel-gas' | 'rioglyph-fuel-hydrogen' | 'rioglyph-fuel-liquid' | 'rioglyph-fuel-mix' | 'rioglyph-fullscreen' | 'rioglyph-geofence' | 'rioglyph-get' | 'rioglyph-give' | 'rioglyph-globe-alt' | 'rioglyph-globe' | 'rioglyph-group-blocks' | 'rioglyph-group' | 'rioglyph-hand-down' | 'rioglyph-hand-left' | 'rioglyph-hand-right' | 'rioglyph-hand-up' | 'rioglyph-handshake' | 'rioglyph-hash' | 'rioglyph-heart' | 'rioglyph-heating' | 'rioglyph-hierarchy' | 'rioglyph-history' | 'rioglyph-home-sign' | 'rioglyph-home' | 'rioglyph-hour-glass' | 'rioglyph-id' | 'rioglyph-inbox-in' | 'rioglyph-inbox-out' | 'rioglyph-inbox-stack' | 'rioglyph-inbox' | 'rioglyph-info-sign' | 'rioglyph-info' | 'rioglyph-insert' | 'rioglyph-issue-tracking' | 'rioglyph-key' | 'rioglyph-kickdown' | 'rioglyph-language' | 'rioglyph-layer-pois' | 'rioglyph-layer' | 'rioglyph-leafs' | 'rioglyph-light-bulb' | 'rioglyph-line-chart' | 'rioglyph-link' | 'rioglyph-load-unload' | 'rioglyph-load' | 'rioglyph-location-arrow' | 'rioglyph-lock-open' | 'rioglyph-lock' | 'rioglyph-log-in' | 'rioglyph-logout' | 'rioglyph-looking-glass-man' | 'rioglyph-looking-glass' | 'rioglyph-magic-wand' | 'rioglyph-maintenance-components' | 'rioglyph-map-location' | 'rioglyph-map-marker' | 'rioglyph-map' | 'rioglyph-megaphone' | 'rioglyph-menu-hamburger' | 'rioglyph-merge' | 'rioglyph-migrate' | 'rioglyph-milage' | 'rioglyph-minus-light' | 'rioglyph-minus-sign' | 'rioglyph-minus' | 'rioglyph-missing' | 'rioglyph-mode-dark-light' | 'rioglyph-more' | 'rioglyph-new-window' | 'rioglyph-newspaper' | 'rioglyph-note' | 'rioglyph-notification' | 'rioglyph-number-1' | 'rioglyph-number-2' | 'rioglyph-number-3' | 'rioglyph-off' | 'rioglyph-oil-can' | 'rioglyph-ok-circle' | 'rioglyph-ok-dashed' | 'rioglyph-ok-sign' | 'rioglyph-ok' | 'rioglyph-onboarding' | 'rioglyph-ongoing' | 'rioglyph-option-horizontal' | 'rioglyph-option-vertical' | 'rioglyph-order' | 'rioglyph-palette-broken' | 'rioglyph-palette' | 'rioglyph-paper-clip' | 'rioglyph-parcel-broken' | 'rioglyph-parcel' | 'rioglyph-parking' | 'rioglyph-pause-circle' | 'rioglyph-pause' | 'rioglyph-pdf-file' | 'rioglyph-pencil-square' | 'rioglyph-pencil' | 'rioglyph-phone' | 'rioglyph-pictures' | 'rioglyph-pin-range' | 'rioglyph-pin' | 'rioglyph-play-circle' | 'rioglyph-play' | 'rioglyph-plugged-off' | 'rioglyph-plugged-on' | 'rioglyph-plus-light' | 'rioglyph-plus-sign' | 'rioglyph-plus' | 'rioglyph-pm' | 'rioglyph-poi' | 'rioglyph-polygon' | 'rioglyph-position' | 'rioglyph-print' | 'rioglyph-progress-ongoing' | 'rioglyph-progress-remaining' | 'rioglyph-progression' | 'rioglyph-prompt' | 'rioglyph-pto-off' | 'rioglyph-pto-on' | 'rioglyph-pushpin' | 'rioglyph-puzzle' | 'rioglyph-pylon' | 'rioglyph-qr-code' | 'rioglyph-question-sign' | 'rioglyph-question' | 'rioglyph-record' | 'rioglyph-recycle' | 'rioglyph-refresh' | 'rioglyph-remove-circle' | 'rioglyph-remove-sign' | 'rioglyph-remove' | 'rioglyph-repeat-square' | 'rioglyph-repeat' | 'rioglyph-resize-full' | 'rioglyph-resize-horizontal' | 'rioglyph-resize-small' | 'rioglyph-resize-vertical' | 'rioglyph-retrofit' | 'rioglyph-retweet' | 'rioglyph-revert' | 'rioglyph-rio-marker' | 'rioglyph-rio' | 'rioglyph-road-restrictions' | 'rioglyph-road' | 'rioglyph-robot' | 'rioglyph-rocket' | 'rioglyph-role-management' | 'rioglyph-route-option' | 'rioglyph-route-view' | 'rioglyph-route' | 'rioglyph-ruler' | 'rioglyph-satellite-radar' | 'rioglyph-save' | 'rioglyph-scale' | 'rioglyph-scan' | 'rioglyph-scissors' | 'rioglyph-search-list' | 'rioglyph-search-truck' | 'rioglyph-search' | 'rioglyph-send' | 'rioglyph-series' | 'rioglyph-server-stack' | 'rioglyph-settings' | 'rioglyph-share-alt' | 'rioglyph-share-nodes' | 'rioglyph-share' | 'rioglyph-shelve' | 'rioglyph-ship' | 'rioglyph-shopping-bag' | 'rioglyph-shopping-cart' | 'rioglyph-signature' | 'rioglyph-slope-down-max' | 'rioglyph-slope-down-min' | 'rioglyph-slope-up-max' | 'rioglyph-slope-up-min' | 'rioglyph-sort-by-attributes-alt' | 'rioglyph-sort-by-attributes' | 'rioglyph-sort' | 'rioglyph-sparkles' | 'rioglyph-speed' | 'rioglyph-sphere' | 'rioglyph-spinner' | 'rioglyph-split-view' | 'rioglyph-square-dashed' | 'rioglyph-stack-add' | 'rioglyph-stack-iso' | 'rioglyph-stack' | 'rioglyph-star-empty' | 'rioglyph-star' | 'rioglyph-stars' | 'rioglyph-start' | 'rioglyph-stats-high' | 'rioglyph-stats-line-dots' | 'rioglyph-stats-low' | 'rioglyph-stats-medium' | 'rioglyph-stats' | 'rioglyph-status-available' | 'rioglyph-status-change-horizontal' | 'rioglyph-status-change' | 'rioglyph-status-driving' | 'rioglyph-status-resting' | 'rioglyph-status-working' | 'rioglyph-steering-wheel' | 'rioglyph-stopover' | 'rioglyph-support' | 'rioglyph-table-view' | 'rioglyph-tachograph-download' | 'rioglyph-tachograph' | 'rioglyph-tag' | 'rioglyph-tasks' | 'rioglyph-temperature' | 'rioglyph-th-list' | 'rioglyph-thumbs-down' | 'rioglyph-thumbs-up' | 'rioglyph-tickets' | 'rioglyph-time-alt' | 'rioglyph-time-cancle' | 'rioglyph-time-incomplete' | 'rioglyph-time' | 'rioglyph-tire' | 'rioglyph-tms' | 'rioglyph-to-bottom' | 'rioglyph-to-left' | 'rioglyph-to-right' | 'rioglyph-to-top' | 'rioglyph-tracking-package' | 'rioglyph-traffic-lights' | 'rioglyph-trailer-baseline' | 'rioglyph-trailer' | 'rioglyph-trailerposition' | 'rioglyph-train' | 'rioglyph-transfer' | 'rioglyph-transition-push-right' | 'rioglyph-transition-right' | 'rioglyph-trash' | 'rioglyph-triangle-bottom' | 'rioglyph-triangle-left' | 'rioglyph-triangle-right' | 'rioglyph-triangle-top' | 'rioglyph-trophy' | 'rioglyph-truck-baseline' | 'rioglyph-truck-breakdown' | 'rioglyph-truck-unit' | 'rioglyph-truck' | 'rioglyph-unassigned' | 'rioglyph-unavailable' | 'rioglyph-unlink' | 'rioglyph-upload' | 'rioglyph-user-add' | 'rioglyph-user-group' | 'rioglyph-user-ok' | 'rioglyph-user-remove' | 'rioglyph-user-sign-off' | 'rioglyph-user-sign' | 'rioglyph-user' | 'rioglyph-van-baseline' | 'rioglyph-van' | 'rioglyph-variable' | 'rioglyph-video-off' | 'rioglyph-video' | 'rioglyph-volume' | 'rioglyph-wallet' | 'rioglyph-warehouse' | 'rioglyph-warning-sign' | 'rioglyph-weather-cloudy' | 'rioglyph-weather-icy' | 'rioglyph-weather-overcast' | 'rioglyph-weather-raining' | 'rioglyph-weather-snowing' | 'rioglyph-weather-stormy' | 'rioglyph-weather-sunny' | 'rioglyph-weather-thundering' | 'rioglyph-weather-windy' | 'rioglyph-weight' | 'rioglyph-width' | 'rioglyph-wifi-off' | 'rioglyph-wifi' | 'rioglyph-window' | 'rioglyph-workflow-step' | 'rioglyph-workflow' | 'rioglyph-workshop' | 'rioglyph-wrench' | 'rioglyph-xmas-raindeer' | 'rioglyph-xmas-santa';
1
+ export type RioglyphIconType = 'rioglyph-academic-cap' | 'rioglyph-addressbook' | 'rioglyph-ai' | 'rioglyph-air-pay' | 'rioglyph-am' | 'rioglyph-angle-double-down' | 'rioglyph-angle-double-left' | 'rioglyph-angle-double-right' | 'rioglyph-angle-double-up' | 'rioglyph-antenna' | 'rioglyph-api' | 'rioglyph-archive' | 'rioglyph-area-chart' | 'rioglyph-area-in' | 'rioglyph-area-out' | 'rioglyph-arrow-down' | 'rioglyph-arrow-left' | 'rioglyph-arrow-right' | 'rioglyph-arrow-up' | 'rioglyph-arrows-collapse' | 'rioglyph-arrows-combine' | 'rioglyph-arrows-expand' | 'rioglyph-arrows-horizontal' | 'rioglyph-arrows-split' | 'rioglyph-assigned' | 'rioglyph-axis-x' | 'rioglyph-axis-y' | 'rioglyph-axis-z' | 'rioglyph-axle' | 'rioglyph-ban-circle' | 'rioglyph-bar-chart-box' | 'rioglyph-battery-charging' | 'rioglyph-battery-level-empty' | 'rioglyph-battery-level-full' | 'rioglyph-battery-level-low' | 'rioglyph-beacon' | 'rioglyph-book' | 'rioglyph-bookable-poi' | 'rioglyph-bookmark-square' | 'rioglyph-bookmark' | 'rioglyph-border-crossing' | 'rioglyph-box-open' | 'rioglyph-box' | 'rioglyph-brain' | 'rioglyph-brake' | 'rioglyph-branch-horizontal' | 'rioglyph-branch-remove' | 'rioglyph-branch-vertical' | 'rioglyph-broadcast' | 'rioglyph-building' | 'rioglyph-bulb' | 'rioglyph-bus-baseline' | 'rioglyph-bus-breakdown' | 'rioglyph-bus' | 'rioglyph-businessman' | 'rioglyph-calendar-parking' | 'rioglyph-calendar-plus' | 'rioglyph-calendar-today' | 'rioglyph-calendar' | 'rioglyph-camera' | 'rioglyph-car-baseline' | 'rioglyph-car-wash' | 'rioglyph-car' | 'rioglyph-card-hotel' | 'rioglyph-card-reader' | 'rioglyph-cards-add' | 'rioglyph-cards-grid' | 'rioglyph-cards-list' | 'rioglyph-cards-table' | 'rioglyph-cargo' | 'rioglyph-carrier' | 'rioglyph-chat' | 'rioglyph-check-badge' | 'rioglyph-check-shield' | 'rioglyph-checkbox-checked' | 'rioglyph-checkbox' | 'rioglyph-checkboxes' | 'rioglyph-chevron-down' | 'rioglyph-chevron-left' | 'rioglyph-chevron-right' | 'rioglyph-chevron-up' | 'rioglyph-chip' | 'rioglyph-circle-dashed' | 'rioglyph-circle-stack' | 'rioglyph-click' | 'rioglyph-climate-control' | 'rioglyph-clipboard' | 'rioglyph-cloud-download' | 'rioglyph-cloud-not-saved' | 'rioglyph-cloud-progress' | 'rioglyph-cloud-upload' | 'rioglyph-cloud' | 'rioglyph-coasting' | 'rioglyph-code-braces' | 'rioglyph-code-brackets' | 'rioglyph-coffee' | 'rioglyph-cog' | 'rioglyph-color-swatch' | 'rioglyph-comment' | 'rioglyph-compare' | 'rioglyph-compass' | 'rioglyph-component-custom-recurrent' | 'rioglyph-component-custom' | 'rioglyph-component' | 'rioglyph-construction' | 'rioglyph-convert' | 'rioglyph-conveyor-belt' | 'rioglyph-cookie' | 'rioglyph-cooling' | 'rioglyph-cost-efficency' | 'rioglyph-cost-efficiency' | 'rioglyph-crown' | 'rioglyph-cruise-control' | 'rioglyph-csv' | 'rioglyph-cube-dashed' | 'rioglyph-cube' | 'rioglyph-currency-euro' | 'rioglyph-damages' | 'rioglyph-dangerousgoods' | 'rioglyph-dashboard-view' | 'rioglyph-dashboard' | 'rioglyph-delivery-completed' | 'rioglyph-delivery-error' | 'rioglyph-delivery-late' | 'rioglyph-delivery-on-track' | 'rioglyph-delivery-warning' | 'rioglyph-delivery' | 'rioglyph-design' | 'rioglyph-desktop' | 'rioglyph-detail-view-info' | 'rioglyph-detail-view' | 'rioglyph-direction' | 'rioglyph-discount-badge' | 'rioglyph-document-out' | 'rioglyph-document' | 'rioglyph-download' | 'rioglyph-drag-n-drop' | 'rioglyph-drive-history' | 'rioglyph-driver-card' | 'rioglyph-driver-off' | 'rioglyph-driver' | 'rioglyph-drivercard-in' | 'rioglyph-drivercard-out' | 'rioglyph-duplicate' | 'rioglyph-earphone' | 'rioglyph-emergency-stop' | 'rioglyph-empty' | 'rioglyph-engine' | 'rioglyph-envelope-indicator' | 'rioglyph-envelope-open' | 'rioglyph-envelope' | 'rioglyph-erase' | 'rioglyph-error-sign' | 'rioglyph-euro-note' | 'rioglyph-exclamation-sign' | 'rioglyph-exclamation' | 'rioglyph-eye-close' | 'rioglyph-eye-closed' | 'rioglyph-eye-open' | 'rioglyph-eye-option' | 'rioglyph-face-frown' | 'rioglyph-face-neutral' | 'rioglyph-face-smile' | 'rioglyph-facetime-video' | 'rioglyph-factory' | 'rioglyph-file-signature' | 'rioglyph-files' | 'rioglyph-fill' | 'rioglyph-filling-e-station' | 'rioglyph-filling-station' | 'rioglyph-filter-active' | 'rioglyph-filter-reset' | 'rioglyph-filter' | 'rioglyph-fingerprint' | 'rioglyph-finish' | 'rioglyph-fire' | 'rioglyph-flag' | 'rioglyph-flash' | 'rioglyph-folder-closed' | 'rioglyph-folder-open' | 'rioglyph-fuel-diesel' | 'rioglyph-fuel-electric' | 'rioglyph-fuel-gas' | 'rioglyph-fuel-hydrogen' | 'rioglyph-fuel-liquid' | 'rioglyph-fuel-mix' | 'rioglyph-fullscreen' | 'rioglyph-geofence' | 'rioglyph-get' | 'rioglyph-give' | 'rioglyph-globe-alt' | 'rioglyph-globe' | 'rioglyph-group-blocks' | 'rioglyph-group' | 'rioglyph-hand-down' | 'rioglyph-hand-left' | 'rioglyph-hand-right' | 'rioglyph-hand-up' | 'rioglyph-handshake' | 'rioglyph-hash' | 'rioglyph-heart' | 'rioglyph-heating' | 'rioglyph-hierarchy' | 'rioglyph-history' | 'rioglyph-home-sign' | 'rioglyph-home' | 'rioglyph-hour-glass' | 'rioglyph-id' | 'rioglyph-inbox-in' | 'rioglyph-inbox-out' | 'rioglyph-inbox-stack' | 'rioglyph-inbox' | 'rioglyph-info-sign' | 'rioglyph-info' | 'rioglyph-insert' | 'rioglyph-issue-tracking' | 'rioglyph-key' | 'rioglyph-kickdown' | 'rioglyph-language' | 'rioglyph-layer-pois' | 'rioglyph-layer' | 'rioglyph-leafs' | 'rioglyph-light-bulb' | 'rioglyph-line-chart' | 'rioglyph-link' | 'rioglyph-load-unload' | 'rioglyph-load' | 'rioglyph-location-arrow' | 'rioglyph-lock-open' | 'rioglyph-lock' | 'rioglyph-log-in' | 'rioglyph-logout' | 'rioglyph-looking-glass-man' | 'rioglyph-looking-glass' | 'rioglyph-magic-wand' | 'rioglyph-maintenance-components' | 'rioglyph-map-location' | 'rioglyph-map-marker' | 'rioglyph-map' | 'rioglyph-megaphone' | 'rioglyph-menu-hamburger' | 'rioglyph-merge' | 'rioglyph-mesh-box' | 'rioglyph-migrate' | 'rioglyph-milage' | 'rioglyph-minus-light' | 'rioglyph-minus-sign' | 'rioglyph-minus' | 'rioglyph-missing' | 'rioglyph-mode-dark-light' | 'rioglyph-more' | 'rioglyph-new-window' | 'rioglyph-newspaper' | 'rioglyph-note' | 'rioglyph-notification' | 'rioglyph-number-1' | 'rioglyph-number-2' | 'rioglyph-number-3' | 'rioglyph-off' | 'rioglyph-oil-can' | 'rioglyph-ok-circle' | 'rioglyph-ok-dashed' | 'rioglyph-ok-sign' | 'rioglyph-ok' | 'rioglyph-onboarding' | 'rioglyph-ongoing' | 'rioglyph-option-horizontal' | 'rioglyph-option-vertical' | 'rioglyph-order' | 'rioglyph-palette-broken' | 'rioglyph-palette-empty' | 'rioglyph-palette' | 'rioglyph-paper-clip' | 'rioglyph-parcel-broken' | 'rioglyph-parcel' | 'rioglyph-parking' | 'rioglyph-pause-circle' | 'rioglyph-pause' | 'rioglyph-pdf-file' | 'rioglyph-pencil-square' | 'rioglyph-pencil' | 'rioglyph-phone' | 'rioglyph-pictures' | 'rioglyph-pin-range' | 'rioglyph-pin' | 'rioglyph-play-circle' | 'rioglyph-play' | 'rioglyph-plugged-off' | 'rioglyph-plugged-on' | 'rioglyph-plus-light' | 'rioglyph-plus-sign' | 'rioglyph-plus' | 'rioglyph-pm' | 'rioglyph-poi' | 'rioglyph-polygon' | 'rioglyph-position' | 'rioglyph-print' | 'rioglyph-progress-ongoing' | 'rioglyph-progress-remaining' | 'rioglyph-progression' | 'rioglyph-prompt' | 'rioglyph-pto-off' | 'rioglyph-pto-on' | 'rioglyph-pushpin' | 'rioglyph-puzzle' | 'rioglyph-pylon' | 'rioglyph-qr-code' | 'rioglyph-question-sign' | 'rioglyph-question' | 'rioglyph-record' | 'rioglyph-recycle' | 'rioglyph-refresh' | 'rioglyph-remove-circle' | 'rioglyph-remove-sign' | 'rioglyph-remove' | 'rioglyph-repeat-square' | 'rioglyph-repeat' | 'rioglyph-resize-full' | 'rioglyph-resize-horizontal' | 'rioglyph-resize-small' | 'rioglyph-resize-vertical' | 'rioglyph-retrofit' | 'rioglyph-retweet' | 'rioglyph-revert' | 'rioglyph-rio-marker' | 'rioglyph-rio' | 'rioglyph-road-restrictions' | 'rioglyph-road' | 'rioglyph-robot' | 'rioglyph-rocket' | 'rioglyph-role-management' | 'rioglyph-route-option' | 'rioglyph-route-view' | 'rioglyph-route' | 'rioglyph-ruler' | 'rioglyph-satellite-radar' | 'rioglyph-save' | 'rioglyph-scale' | 'rioglyph-scan' | 'rioglyph-scissors' | 'rioglyph-search-list' | 'rioglyph-search-truck' | 'rioglyph-search' | 'rioglyph-send' | 'rioglyph-series' | 'rioglyph-server-stack' | 'rioglyph-settings' | 'rioglyph-share-alt' | 'rioglyph-share-nodes' | 'rioglyph-share' | 'rioglyph-shelve' | 'rioglyph-ship' | 'rioglyph-shopping-bag' | 'rioglyph-shopping-cart' | 'rioglyph-signature' | 'rioglyph-slope-down-max' | 'rioglyph-slope-down-min' | 'rioglyph-slope-up-max' | 'rioglyph-slope-up-min' | 'rioglyph-sort-by-attributes-alt' | 'rioglyph-sort-by-attributes' | 'rioglyph-sort' | 'rioglyph-sparkles' | 'rioglyph-speed' | 'rioglyph-sphere' | 'rioglyph-spinner' | 'rioglyph-split-view' | 'rioglyph-square-dashed' | 'rioglyph-stack-add' | 'rioglyph-stack-iso' | 'rioglyph-stack' | 'rioglyph-star-empty' | 'rioglyph-star' | 'rioglyph-stars' | 'rioglyph-start' | 'rioglyph-stats-high' | 'rioglyph-stats-line-dots' | 'rioglyph-stats-low' | 'rioglyph-stats-medium' | 'rioglyph-stats' | 'rioglyph-status-available' | 'rioglyph-status-change-horizontal' | 'rioglyph-status-change' | 'rioglyph-status-driving' | 'rioglyph-status-resting' | 'rioglyph-status-working' | 'rioglyph-steering-wheel' | 'rioglyph-stopover' | 'rioglyph-support' | 'rioglyph-table-view' | 'rioglyph-tachograph-download' | 'rioglyph-tachograph' | 'rioglyph-tag' | 'rioglyph-tasks' | 'rioglyph-temperature' | 'rioglyph-th-list' | 'rioglyph-thumbs-down' | 'rioglyph-thumbs-up' | 'rioglyph-tickets' | 'rioglyph-time-alt' | 'rioglyph-time-cancle' | 'rioglyph-time-incomplete' | 'rioglyph-time' | 'rioglyph-tire' | 'rioglyph-tms' | 'rioglyph-to-bottom' | 'rioglyph-to-left' | 'rioglyph-to-right' | 'rioglyph-to-top' | 'rioglyph-tracking-package' | 'rioglyph-traffic-lights' | 'rioglyph-trailer-baseline' | 'rioglyph-trailer-liquid' | 'rioglyph-trailer-standard' | 'rioglyph-trailer-tipping' | 'rioglyph-trailer' | 'rioglyph-trailerposition' | 'rioglyph-train' | 'rioglyph-transfer' | 'rioglyph-transition-push-right' | 'rioglyph-transition-right' | 'rioglyph-trash' | 'rioglyph-triangle-bottom' | 'rioglyph-triangle-left' | 'rioglyph-triangle-right' | 'rioglyph-triangle-top' | 'rioglyph-trophy' | 'rioglyph-truck-baseline' | 'rioglyph-truck-breakdown' | 'rioglyph-truck-unit' | 'rioglyph-truck' | 'rioglyph-unassigned' | 'rioglyph-unavailable' | 'rioglyph-unlink' | 'rioglyph-upload' | 'rioglyph-user-add' | 'rioglyph-user-group' | 'rioglyph-user-ok' | 'rioglyph-user-remove' | 'rioglyph-user-sign-off' | 'rioglyph-user-sign' | 'rioglyph-user' | 'rioglyph-van-baseline' | 'rioglyph-van' | 'rioglyph-variable' | 'rioglyph-video-off' | 'rioglyph-video' | 'rioglyph-volume' | 'rioglyph-wallet' | 'rioglyph-warehouse' | 'rioglyph-warning-sign' | 'rioglyph-weather-cloudy' | 'rioglyph-weather-icy' | 'rioglyph-weather-overcast' | 'rioglyph-weather-raining' | 'rioglyph-weather-snowing' | 'rioglyph-weather-stormy' | 'rioglyph-weather-sunny' | 'rioglyph-weather-thundering' | 'rioglyph-weather-windy' | 'rioglyph-weight' | 'rioglyph-width' | 'rioglyph-wifi-off' | 'rioglyph-wifi' | 'rioglyph-window' | 'rioglyph-workflow-step' | 'rioglyph-workflow' | 'rioglyph-workshop' | 'rioglyph-wrench' | 'rioglyph-xmas-raindeer' | 'rioglyph-xmas-santa';
@@ -1,5 +1,5 @@
1
1
  import { jsxs as v, jsx as o } from "react/jsx-runtime";
2
- import e from "classnames";
2
+ import e from "../../utils/classNames.js";
3
3
  const y = (n) => n.replace("bg", "border-color"), l = e(
4
4
  "width-20",
5
5
  "height-20",