@onewelcome/react-lib-components 13.3.0 → 13.4.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 (270) hide show
  1. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
  2. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
  3. package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
  4. package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
  5. package/dist/components/Button/Button.module.scss.cjs.js +2 -2
  6. package/dist/components/Button/Button.module.scss.es.js +17 -17
  7. package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
  8. package/dist/components/Button/IconButton.module.scss.es.js +18 -18
  9. package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
  10. package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +6 -6
  11. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
  12. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
  13. package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
  14. package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
  15. package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
  16. package/dist/components/DataGrid/DataGrid.module.scss.es.js +8 -8
  17. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
  18. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
  19. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
  20. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
  21. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
  22. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
  23. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
  24. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
  25. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
  26. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
  27. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
  28. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
  29. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
  30. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
  31. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
  32. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
  33. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js +1 -1
  34. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
  35. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
  36. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
  37. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
  38. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
  39. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js +17 -21
  40. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
  41. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
  42. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
  43. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js +15 -4
  44. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
  45. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
  46. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
  47. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js +54 -6
  48. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
  49. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
  50. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
  51. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
  52. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +10 -10
  53. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
  54. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
  55. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
  56. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +4 -4
  57. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
  58. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +11 -11
  59. package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
  60. package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
  61. package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
  62. package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
  63. package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
  64. package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +6 -6
  65. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
  66. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
  67. package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
  68. package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
  69. package/dist/components/Form/Form.module.scss.cjs.js +2 -2
  70. package/dist/components/Form/Form.module.scss.es.js +2 -2
  71. package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
  72. package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
  73. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
  74. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +6 -6
  75. package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
  76. package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
  77. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
  78. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
  79. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
  80. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
  81. package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
  82. package/dist/components/Form/Input/Input.module.scss.es.js +8 -8
  83. package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
  84. package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
  85. package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
  86. package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
  87. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  88. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  89. package/dist/components/Form/Select/MultiSelect/MultiOption.es.js +8 -6
  90. package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
  91. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
  92. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
  93. package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js +180 -32
  94. package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
  95. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
  96. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +20 -15
  97. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js.map +1 -1
  98. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
  99. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
  100. package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
  101. package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
  102. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
  103. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
  104. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
  105. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
  106. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js +57 -3
  107. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
  108. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
  109. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
  110. package/dist/components/Form/Select/MultiSelect/useSearch.es.js +69 -52
  111. package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
  112. package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
  113. package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
  114. package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
  115. package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
  116. package/dist/components/Form/Select/SingleSelect/Option.es.js +9 -8
  117. package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
  118. package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
  119. package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
  120. package/dist/components/Form/Select/SingleSelect/Select.es.js +154 -30
  121. package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
  122. package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
  123. package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +21 -17
  124. package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js.map +1 -1
  125. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
  126. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
  127. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js +62 -3
  128. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
  129. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
  130. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
  131. package/dist/components/Form/Select/SingleSelect/useSearch.es.js +46 -34
  132. package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
  133. package/dist/components/Form/Select/useAddNewBtn.cjs.js +1 -1
  134. package/dist/components/Form/Select/useAddNewBtn.cjs.js.map +1 -1
  135. package/dist/components/Form/Select/useAddNewBtn.es.js +6 -5
  136. package/dist/components/Form/Select/useAddNewBtn.es.js.map +1 -1
  137. package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
  138. package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
  139. package/dist/components/Form/Select/useBaseSearch.cjs.js +2 -0
  140. package/dist/components/Form/Select/useBaseSearch.cjs.js.map +1 -0
  141. package/dist/components/Form/Select/useBaseSearch.es.js +85 -0
  142. package/dist/components/Form/Select/useBaseSearch.es.js.map +1 -0
  143. package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
  144. package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
  145. package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
  146. package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
  147. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
  148. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +5 -5
  149. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
  150. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +5 -5
  151. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
  152. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
  153. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
  154. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +5 -5
  155. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
  156. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
  157. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
  158. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
  159. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
  160. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
  161. package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
  162. package/dist/components/Icon/Icon.module.scss.es.js +108 -108
  163. package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js +2 -2
  164. package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js +10 -10
  165. package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
  166. package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
  167. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
  168. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +19 -19
  169. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
  170. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
  171. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
  172. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
  173. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
  174. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
  175. package/dist/components/Link/Link.module.scss.cjs.js +2 -2
  176. package/dist/components/Link/Link.module.scss.es.js +17 -17
  177. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
  178. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
  179. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
  180. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
  181. package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
  182. package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
  183. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
  184. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
  185. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
  186. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
  187. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
  188. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
  189. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
  190. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
  191. package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
  192. package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
  193. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
  194. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
  195. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
  196. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
  197. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
  198. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
  199. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
  200. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
  201. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
  202. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
  203. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
  204. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
  205. package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
  206. package/dist/components/Pagination/Pagination.module.scss.es.js +15 -15
  207. package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
  208. package/dist/components/Popover/Popover.module.scss.es.js +3 -3
  209. package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
  210. package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
  211. package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
  212. package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
  213. package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
  214. package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
  215. package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
  216. package/dist/components/Stepper/Step.module.scss.es.js +22 -22
  217. package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
  218. package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
  219. package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
  220. package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
  221. package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
  222. package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
  223. package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
  224. package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
  225. package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
  226. package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
  227. package/dist/components/Tag/Tag.cjs.js +1 -1
  228. package/dist/components/Tag/Tag.cjs.js.map +1 -1
  229. package/dist/components/Tag/Tag.es.js +7 -1
  230. package/dist/components/Tag/Tag.es.js.map +1 -1
  231. package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
  232. package/dist/components/Tag/Tag.module.scss.es.js +6 -6
  233. package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
  234. package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
  235. package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
  236. package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
  237. package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
  238. package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
  239. package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
  240. package/dist/components/Tooltip/Tooltip.module.scss.es.js +28 -28
  241. package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
  242. package/dist/components/Typography/Typography.module.scss.es.js +13 -13
  243. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
  244. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
  245. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
  246. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
  247. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
  248. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
  249. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +2 -2
  250. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +7 -7
  251. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +2 -2
  252. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +13 -13
  253. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
  254. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
  255. package/dist/hooks/useClickOutside.cjs.js +1 -1
  256. package/dist/hooks/useClickOutside.cjs.js.map +1 -1
  257. package/dist/hooks/useClickOutside.es.js +1 -1
  258. package/dist/hooks/useClickOutside.es.js.map +1 -1
  259. package/dist/hooks/useDebouncedCallback.cjs.js +1 -1
  260. package/dist/hooks/useDebouncedCallback.cjs.js.map +1 -1
  261. package/dist/hooks/useDebouncedCallback.es.js +8 -1
  262. package/dist/hooks/useDebouncedCallback.es.js.map +1 -1
  263. package/dist/index.d.ts +64 -4
  264. package/dist/readyclasses.module.scss.cjs.js +2 -2
  265. package/dist/readyclasses.module.scss.es.js +5 -5
  266. package/dist/util/helper.cjs.js +1 -1
  267. package/dist/util/helper.cjs.js.map +1 -1
  268. package/dist/util/helper.es.js +19 -0
  269. package/dist/util/helper.es.js.map +1 -1
  270. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('.TopNavBar_sr-only_FHLkT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_FHLkT{display:none}.TopNavBar_slide-in_FHLkT{animation:TopNavBar_slide-in_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_FHLkT{animation-duration:.1ms}}.TopNavBar_slide-out_FHLkT{animation:TopNavBar_slide-out_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_FHLkT{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_FHLkT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_slide-out_FHLkT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.TopNavBar_topnavbar_FHLkT{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_FHLkT .TopNavBar_left-section_FHLkT{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-link_FHLkT{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT{display:flex;align-items:center}.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT .TopNavBar_logo-small_FHLkT{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT .TopNavBar_logo_FHLkT{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT .TopNavBar_logo-small_FHLkT{display:none;height:0}.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT .TopNavBar_logo_FHLkT{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_FHLkT .TopNavBar_logo-container_FHLkT .TopNavBar_logo_FHLkT{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_FHLkT .TopNavBar_sr-only_FHLkT{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_FHLkT .TopNavBar_separator_FHLkT{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_FHLkT .TopNavBar_middle-section_FHLkT{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_FHLkT .TopNavBar_middle-section_FHLkT{margin-left:0}}.TopNavBar_topnavbar_FHLkT .TopNavBar_separator_FHLkT+.TopNavBar_middle-section_FHLkT{margin-left:0}.TopNavBar_topnavbar_FHLkT .TopNavBar_right-section_FHLkT{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_FHLkT .TopNavBar_menu-button_FHLkT{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_FHLkT .TopNavBar_menu-button_FHLkT{display:initial}}.TopNavBar_topnavbar_FHLkT .TopNavBar_menu-button_FHLkT.TopNavBar_menu--collapsed_FHLkT{display:initial}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
- const topnavbar = "TopNavBar_topnavbar_FHLkT";
3
- const logo = "TopNavBar_logo_FHLkT";
4
- const separator = "TopNavBar_separator_FHLkT";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('.TopNavBar_sr-only_ZXWS5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_ZXWS5{display:none}.TopNavBar_slide-in_ZXWS5{animation:TopNavBar_slide-in_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_ZXWS5{animation-duration:.1ms}}.TopNavBar_slide-out_ZXWS5{animation:TopNavBar_slide-out_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_ZXWS5{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_ZXWS5{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_slide-out_ZXWS5{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.TopNavBar_topnavbar_ZXWS5{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_left-section_ZXWS5{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-link_ZXWS5{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5{display:flex;align-items:center}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5 .TopNavBar_logo-small_ZXWS5{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5 .TopNavBar_logo_ZXWS5{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5 .TopNavBar_logo-small_ZXWS5{display:none;height:0}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5 .TopNavBar_logo_ZXWS5{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_ZXWS5 .TopNavBar_logo-container_ZXWS5 .TopNavBar_logo_ZXWS5{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_sr-only_ZXWS5{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_separator_ZXWS5{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_middle-section_ZXWS5{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_ZXWS5 .TopNavBar_middle-section_ZXWS5{margin-left:0}}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_separator_ZXWS5+.TopNavBar_middle-section_ZXWS5{margin-left:0}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_right-section_ZXWS5{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_menu-button_ZXWS5{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_ZXWS5 .TopNavBar_menu-button_ZXWS5{display:initial}}.TopNavBar_topnavbar_ZXWS5 .TopNavBar_menu-button_ZXWS5.TopNavBar_menu--collapsed_ZXWS5{display:initial}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
+ const topnavbar = "TopNavBar_topnavbar_ZXWS5";
3
+ const logo = "TopNavBar_logo_ZXWS5";
4
+ const separator = "TopNavBar_separator_ZXWS5";
5
5
  const classes = {
6
- "sr-only": "TopNavBar_sr-only_FHLkT",
6
+ "sr-only": "TopNavBar_sr-only_ZXWS5",
7
7
  topnavbar,
8
- "left-section": "TopNavBar_left-section_FHLkT",
9
- "logo-link": "TopNavBar_logo-link_FHLkT",
10
- "logo-container": "TopNavBar_logo-container_FHLkT",
11
- "logo-small": "TopNavBar_logo-small_FHLkT",
8
+ "left-section": "TopNavBar_left-section_ZXWS5",
9
+ "logo-link": "TopNavBar_logo-link_ZXWS5",
10
+ "logo-container": "TopNavBar_logo-container_ZXWS5",
11
+ "logo-small": "TopNavBar_logo-small_ZXWS5",
12
12
  logo,
13
13
  separator,
14
- "middle-section": "TopNavBar_middle-section_FHLkT",
15
- "right-section": "TopNavBar_right-section_FHLkT",
16
- "menu-button": "TopNavBar_menu-button_FHLkT",
17
- "menu--collapsed": "TopNavBar_menu--collapsed_FHLkT"
14
+ "middle-section": "TopNavBar_middle-section_ZXWS5",
15
+ "right-section": "TopNavBar_right-section_ZXWS5",
16
+ "menu-button": "TopNavBar_menu-button_ZXWS5",
17
+ "menu--collapsed": "TopNavBar_menu--collapsed_ZXWS5"
18
18
  };
19
19
  export {
20
20
  classes as default,
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_FHLkT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_FHLkT{display:none}.IdentityProviderButton_slide-in_FHLkT{animation:IdentityProviderButton_slide-in_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_FHLkT{animation-duration:.1ms}}.IdentityProviderButton_slide-out_FHLkT{animation:IdentityProviderButton_slide-out_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_FHLkT{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_FHLkT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_FHLkT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.IdentityProviderButton_idp-button_FHLkT{width:100%}.IdentityProviderButton_idp-button--with-icon_FHLkT{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"idp-button":"IdentityProviderButton_idp-button_FHLkT","idp-button--with-icon":"IdentityProviderButton_idp-button--with-icon_FHLkT"};
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_ZXWS5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_ZXWS5{display:none}.IdentityProviderButton_slide-in_ZXWS5{animation:IdentityProviderButton_slide-in_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_ZXWS5{animation-duration:.1ms}}.IdentityProviderButton_slide-out_ZXWS5{animation:IdentityProviderButton_slide-out_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_ZXWS5{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_ZXWS5{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_ZXWS5{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.IdentityProviderButton_idp-button_ZXWS5{width:100%}.IdentityProviderButton_idp-button--with-icon_ZXWS5{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"idp-button":"IdentityProviderButton_idp-button_ZXWS5","idp-button--with-icon":"IdentityProviderButton_idp-button--with-icon_ZXWS5"};
3
3
  //# sourceMappingURL=IdentityProviderButton.module.scss.cjs.js.map
@@ -1,7 +1,7 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_FHLkT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_FHLkT{display:none}.IdentityProviderButton_slide-in_FHLkT{animation:IdentityProviderButton_slide-in_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_FHLkT{animation-duration:.1ms}}.IdentityProviderButton_slide-out_FHLkT{animation:IdentityProviderButton_slide-out_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_FHLkT{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_FHLkT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_FHLkT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.IdentityProviderButton_idp-button_FHLkT{width:100%}.IdentityProviderButton_idp-button--with-icon_FHLkT{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_ZXWS5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_ZXWS5{display:none}.IdentityProviderButton_slide-in_ZXWS5{animation:IdentityProviderButton_slide-in_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_ZXWS5{animation-duration:.1ms}}.IdentityProviderButton_slide-out_ZXWS5{animation:IdentityProviderButton_slide-out_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_ZXWS5{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_ZXWS5{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_ZXWS5{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.IdentityProviderButton_idp-button_ZXWS5{width:100%}.IdentityProviderButton_idp-button--with-icon_ZXWS5{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
2
  const classes = {
3
- "idp-button": "IdentityProviderButton_idp-button_FHLkT",
4
- "idp-button--with-icon": "IdentityProviderButton_idp-button--with-icon_FHLkT"
3
+ "idp-button": "IdentityProviderButton_idp-button_ZXWS5",
4
+ "idp-button--with-icon": "IdentityProviderButton_idp-button--with-icon_ZXWS5"
5
5
  };
6
6
  export {
7
7
  classes as default
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useClickOutside=(t,i,n)=>{function o(e){const n=null==t?void 0:t.current;n&&(n.contains(e.target)||i(e))}e.useEffect(()=>(setTimeout(()=>window.addEventListener("click",o)),()=>{setTimeout(()=>window.removeEventListener("click",o))}),n)};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useClickOutside=(t,i,o)=>{function c(e){const o=null==t?void 0:t.current;o&&(e.composedPath().includes(o)||i(e))}e.useEffect(()=>(setTimeout(()=>window.addEventListener("click",c)),()=>{setTimeout(()=>window.removeEventListener("click",c))}),o)};
2
2
  //# sourceMappingURL=useClickOutside.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useClickOutside.cjs.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":["myElementRef","onClickOutside","dependencies","eventListener","event","myElement","current","contains","target","useEffect","setTimeout","window","addEventListener","removeEventListener"],"mappings":"iIAkB+B,CAC7BA,EACAC,EACAC,KAEA,SAASC,EAAcC,GACrB,MAAMC,EAAY,MAAAL,OAAA,EAAAA,EAAcM,QAC3BD,IAG0BA,EAAUE,SAASH,EAAMI,SAGtDP,EAAeG,GAEnB,CACAK,EAAAA,UAAU,KACRC,WAAW,IAAMC,OAAOC,iBAAiB,QAAST,IAE3C,KACLO,WAAW,IAAMC,OAAOE,oBAAoB,QAASV,MAEtDD"}
1
+ {"version":3,"file":"useClickOutside.cjs.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = event.composedPath().includes(myElement);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":["myElementRef","onClickOutside","dependencies","eventListener","event","myElement","current","composedPath","includes","useEffect","setTimeout","window","addEventListener","removeEventListener"],"mappings":"iIAkB+B,CAC7BA,EACAC,EACAC,KAEA,SAASC,EAAcC,GACrB,MAAMC,EAAY,MAAAL,OAAA,EAAAA,EAAcM,QAC3BD,IAG0BD,EAAMG,eAAeC,SAASH,IAG3DJ,EAAeG,GAEnB,CACAK,EAAAA,UAAU,KACRC,WAAW,IAAMC,OAAOC,iBAAiB,QAAST,IAE3C,KACLO,WAAW,IAAMC,OAAOE,oBAAoB,QAASV,MAEtDD"}
@@ -5,7 +5,7 @@ const useClickOutside = (myElementRef, onClickOutside, dependencies) => {
5
5
  if (!myElement) {
6
6
  return;
7
7
  }
8
- const clickedInsideMyElement = myElement.contains(event.target);
8
+ const clickedInsideMyElement = event.composedPath().includes(myElement);
9
9
  if (!clickedInsideMyElement) {
10
10
  onClickOutside(event);
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useClickOutside.es.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = myElement.contains(event.target as Node);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,kBAAkB,CAC7B,cACA,gBACA,iBACG;AACH,WAAS,cAAc,OAAmB;AACxC,UAAM,YAAY,6CAAc;AAChC,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AACA,UAAM,yBAAyB,UAAU,SAAS,MAAM,MAAc;AAEtE,QAAI,CAAC,wBAAwB;AAC3B,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AACA,YAAU,MAAM;AACd,eAAW,MAAM,OAAO,iBAAiB,SAAS,aAAa,CAAC;AAEhE,WAAO,MAAM;AACX,iBAAW,MAAM,OAAO,oBAAoB,SAAS,aAAa,CAAC;AAAA,IACrE;AAAA,EACF,GAAG,YAAY;AACjB;"}
1
+ {"version":3,"file":"useClickOutside.es.js","sources":["../../src/hooks/useClickOutside.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DependencyList, useEffect } from \"react\";\n\nexport const useClickOutside = (\n myElementRef: React.RefObject<HTMLElement>,\n onClickOutside: (event: MouseEvent) => void,\n dependencies?: DependencyList\n) => {\n function eventListener(event: MouseEvent) {\n const myElement = myElementRef?.current;\n if (!myElement) {\n return;\n }\n const clickedInsideMyElement = event.composedPath().includes(myElement);\n\n if (!clickedInsideMyElement) {\n onClickOutside(event);\n }\n }\n useEffect(() => {\n setTimeout(() => window.addEventListener(\"click\", eventListener));\n\n return () => {\n setTimeout(() => window.removeEventListener(\"click\", eventListener));\n };\n }, dependencies);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,kBAAkB,CAC7B,cACA,gBACA,iBACG;AACH,WAAS,cAAc,OAAmB;AACxC,UAAM,YAAY,6CAAc;AAChC,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AACA,UAAM,yBAAyB,MAAM,aAAA,EAAe,SAAS,SAAS;AAEtE,QAAI,CAAC,wBAAwB;AAC3B,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AACA,YAAU,MAAM;AACd,eAAW,MAAM,OAAO,iBAAiB,SAAS,aAAa,CAAC;AAEhE,WAAO,MAAM;AACX,iBAAW,MAAM,OAAO,oBAAoB,SAAS,aAAa,CAAC;AAAA,IACrE;AAAA,EACF,GAAG,YAAY;AACjB;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useDebouncedCallback=(r,t,u)=>{const c=e.useRef(),o=u?[r,t,...u]:[r,t];return e.useCallback((...e)=>{null!=c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{r(...e)},t)},o)};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useDebouncedCallback=(r,t,u)=>{const c=e.useRef(),l=u?[r,t,...u]:[r,t],n=e.useCallback((...e)=>{null!=c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{r(...e)},t)},l),a=e.useCallback(()=>{null!=c.current&&(clearTimeout(c.current),c.current=void 0)},[]);return Object.assign(n,{cancel:a})};
2
2
  //# sourceMappingURL=useDebouncedCallback.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedCallback.cjs.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n return React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":["callback","delay","dependencies","timeout","React","useRef","comboDeps","useCallback","args","current","clearTimeout","setTimeout"],"mappings":"sIAkBoC,CAClCA,EACAC,EACAC,KAEA,MAAMC,EAAUC,EAAMC,SAChBC,EAAYJ,EAAe,CAACF,EAAUC,KAAUC,GAAgB,CAACF,EAAUC,GAEjF,OAAOG,EAAMG,YAAY,IAAIC,KACJ,MAAnBL,EAAQM,SACVC,aAAaP,EAAQM,SAGvBN,EAAQM,QAAUE,WAAW,KAC3BX,KAAYQ,IACXP,IACFK"}
1
+ {"version":3,"file":"useDebouncedCallback.cjs.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n const debounced = React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n\n const cancel = React.useCallback(() => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n timeout.current = undefined;\n }\n }, []);\n\n return Object.assign(debounced, { cancel });\n};\n"],"names":["callback","delay","dependencies","timeout","React","useRef","comboDeps","debounced","useCallback","args","current","clearTimeout","setTimeout","cancel","Object","assign"],"mappings":"sIAkBoC,CAClCA,EACAC,EACAC,KAEA,MAAMC,EAAUC,EAAMC,SAChBC,EAAYJ,EAAe,CAACF,EAAUC,KAAUC,GAAgB,CAACF,EAAUC,GAE3EM,EAAYH,EAAMI,YAAY,IAAIC,KACf,MAAnBN,EAAQO,SACVC,aAAaR,EAAQO,SAGvBP,EAAQO,QAAUE,WAAW,KAC3BZ,KAAYS,IACXR,IACFK,GAEGO,EAAST,EAAMI,YAAY,KACR,MAAnBL,EAAQO,UACVC,aAAaR,EAAQO,SACrBP,EAAQO,aAAU,IAEnB,IAEH,OAAOI,OAAOC,OAAOR,EAAW,CAAEM"}
@@ -2,7 +2,7 @@ import React from "react";
2
2
  const useDebouncedCallback = (callback, delay, dependencies) => {
3
3
  const timeout = React.useRef();
4
4
  const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];
5
- return React.useCallback((...args) => {
5
+ const debounced = React.useCallback((...args) => {
6
6
  if (timeout.current != null) {
7
7
  clearTimeout(timeout.current);
8
8
  }
@@ -10,6 +10,13 @@ const useDebouncedCallback = (callback, delay, dependencies) => {
10
10
  callback(...args);
11
11
  }, delay);
12
12
  }, comboDeps);
13
+ const cancel = React.useCallback(() => {
14
+ if (timeout.current != null) {
15
+ clearTimeout(timeout.current);
16
+ timeout.current = void 0;
17
+ }
18
+ }, []);
19
+ return Object.assign(debounced, { cancel });
13
20
  };
14
21
  export {
15
22
  useDebouncedCallback
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedCallback.es.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n return React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":[],"mappings":";AAkBO,MAAM,uBAAuB,CAClC,UACA,OACA,iBACG;AACH,QAAM,UAAU,MAAM,OAAA;AACtB,QAAM,YAAY,eAAe,CAAC,UAAU,OAAO,GAAG,YAAY,IAAI,CAAC,UAAU,KAAK;AAEtF,SAAO,MAAM,YAAY,IAAI,SAAY;AACvC,QAAI,QAAQ,WAAW,MAAM;AAC3B,mBAAa,QAAQ,OAAO;AAAA,IAC9B;AAEA,YAAQ,UAAU,WAAW,MAAM;AACjC,eAAS,GAAG,IAAI;AAAA,IAClB,GAAG,KAAK;AAAA,EACV,GAAG,SAAS;AACd;"}
1
+ {"version":3,"file":"useDebouncedCallback.es.js","sources":["../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const useDebouncedCallback = <T extends unknown[]>(\n callback: (...args: T) => void,\n delay: number,\n dependencies?: React.DependencyList\n) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n const debounced = React.useCallback((...args: T) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n\n const cancel = React.useCallback(() => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n timeout.current = undefined;\n }\n }, []);\n\n return Object.assign(debounced, { cancel });\n};\n"],"names":[],"mappings":";AAkBO,MAAM,uBAAuB,CAClC,UACA,OACA,iBACG;AACH,QAAM,UAAU,MAAM,OAAA;AACtB,QAAM,YAAY,eAAe,CAAC,UAAU,OAAO,GAAG,YAAY,IAAI,CAAC,UAAU,KAAK;AAEtF,QAAM,YAAY,MAAM,YAAY,IAAI,SAAY;AAClD,QAAI,QAAQ,WAAW,MAAM;AAC3B,mBAAa,QAAQ,OAAO;AAAA,IAC9B;AAEA,YAAQ,UAAU,WAAW,MAAM;AACjC,eAAS,GAAG,IAAI;AAAA,IAClB,GAAG,KAAK;AAAA,EACV,GAAG,SAAS;AAEZ,QAAM,SAAS,MAAM,YAAY,MAAM;AACrC,QAAI,QAAQ,WAAW,MAAM;AAC3B,mBAAa,QAAQ,OAAO;AAC5B,cAAQ,UAAU;AAAA,IACpB;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,SAAO,OAAO,OAAO,WAAW,EAAE,QAAQ;AAC5C;"}
package/dist/index.d.ts CHANGED
@@ -96,6 +96,27 @@ declare interface Arguments {
96
96
  componentToRepeat: default_2.ReactElement;
97
97
  }
98
98
 
99
+ declare interface AsyncSearchProps {
100
+ /** Enables backend search. When set, built-in client-side filtering is disabled. */
101
+ onSearch: (query: string) => void;
102
+ /** Debounce applied to onSearch, in ms. Default 300. */
103
+ debounceTime?: number;
104
+ /** Minimum chars before onSearch fires and options render. Default 0. */
105
+ minSearchLength?: number;
106
+ /** Consumer sets true while a request is in flight. Shows a loading row; never shows "no results" while true. */
107
+ loading?: boolean;
108
+ /** When set, shows an error row instead of results. */
109
+ errorLabel?: string;
110
+ /** Optional retry affordance rendered alongside errorLabel. */
111
+ onRetry?: () => void;
112
+ /** Shown while the query is shorter than minSearchLength. Default "Type to search". */
113
+ idleLabel?: string;
114
+ /** Called when the user scrolls near the end of the option list. */
115
+ onLoadMore?: () => void;
116
+ /** More pages available. Enables the sentinel + "loading more" row. */
117
+ hasMore?: boolean;
118
+ }
119
+
99
120
  export declare const Banner: default_2.ForwardRefExoticComponent<Omit<BannerProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
100
121
 
101
122
  export declare interface BannerProps extends ComponentPropsWithRef<"section"> {
@@ -496,6 +517,27 @@ export declare interface DataGridColumnMetadata {
496
517
  disableAddNew?: boolean;
497
518
  allowSingleFilterOnly?: boolean;
498
519
  valueSelectType?: ValueSelectType;
520
+ /**
521
+ * Enables backend value search for this column. When provided, `defaultValues` is treated as
522
+ * the initial page only, and the value select fetches further pages as the user types/scrolls.
523
+ */
524
+ onValueSearch?: (query: string) => void;
525
+ /** Called to fetch the next page of values once the user reaches the end of the loaded list. */
526
+ onValueLoadMore?: () => void;
527
+ /** Whether another page of values is available after the currently loaded ones. */
528
+ hasMoreValues?: boolean;
529
+ /** Whether a value search/page fetch is currently in flight. */
530
+ valuesLoading?: boolean;
531
+ /** Minimum query length required before `onValueSearch` is invoked. */
532
+ minValueSearchLength?: number;
533
+ /**
534
+ * Resolves display labels for saved values not present in the currently loaded page (e.g. from
535
+ * a previously saved filter), used in EDIT mode to show a label instead of the raw value.
536
+ */
537
+ resolveValueLabels?: (values: string[]) => {
538
+ value: string;
539
+ label: string;
540
+ }[];
499
541
  }
500
542
 
501
543
  export declare const DataGridDrawerItem: default_2.ForwardRefExoticComponent<Omit<DataGridDrawerItemProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
@@ -1413,6 +1455,8 @@ declare interface SearchProps {
1413
1455
  searchInputProps?: PartialInputProps_2 & {
1414
1456
  reset?: boolean;
1415
1457
  };
1458
+ /** Enables backend search: disables client-side filtering and emits the typed query via `onSearch`. */
1459
+ async?: AsyncSearchProps;
1416
1460
  }
1417
1461
 
1418
1462
  export declare const Select: default_2.ForwardRefExoticComponent<Omit<default_2.PropsWithChildren<Omit<SingleSelectProps, "ref"> & default_2.RefAttributes<HTMLSelectElement> & WithReadOnlyProps>, "ref"> & default_2.RefAttributes<unknown>>;
@@ -1433,6 +1477,16 @@ declare interface SelectProps_2<V extends string | readonly string[] | undefined
1433
1477
  addNew?: AddNewProps;
1434
1478
  isReadOnlyView?: boolean;
1435
1479
  domRoot?: HTMLElement;
1480
+ /** Fallback display for the current value when it is absent from `children` (async mode). */
1481
+ selectedOption?: {
1482
+ value: string;
1483
+ label: ReactNode;
1484
+ };
1485
+ /** Fallback display for picked values absent from `children` (async multi). */
1486
+ selectedOptions?: {
1487
+ value: string;
1488
+ label: ReactNode;
1489
+ }[];
1436
1490
  }
1437
1491
 
1438
1492
  export declare const SelectWrapper: default_2.ForwardRefExoticComponent<Omit<default_2.PropsWithChildren<Omit<SelectWrapperProps, "ref"> & default_2.RefAttributes<HTMLDivElement> & WithReadOnlyProps>, "ref"> & default_2.RefAttributes<unknown>>;
@@ -1583,12 +1637,14 @@ export declare const Tag: default_2.ForwardRefExoticComponent<TagProps & default
1583
1637
 
1584
1638
  declare type Tag_2 = "span" | "div" | "i";
1585
1639
 
1586
- export declare interface TagProps extends HTMLAttributes<HTMLDivElement> {
1640
+ export declare interface TagProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1587
1641
  variant?: "enabled" | "disabled";
1588
1642
  icon?: Icons;
1589
1643
  backgroundColor?: string;
1590
1644
  color?: string;
1591
- children?: string;
1645
+ /** Accepts non-string content. When `removeButton.label` isn't set, RemoveButton's accessible
1646
+ * label falls back to `children` only if it's a plain string, otherwise just `removeLabel`. */
1647
+ children?: ReactNode;
1592
1648
  shape?: "rounded" | "sharp";
1593
1649
  removeButton?: Props_7;
1594
1650
  }
@@ -1735,7 +1791,9 @@ export declare const useAlert: () => {
1735
1791
 
1736
1792
  export declare const useClickOutside: (myElementRef: React.RefObject<HTMLElement>, onClickOutside: (event: MouseEvent) => void, dependencies?: DependencyList) => void;
1737
1793
 
1738
- export declare const useDebouncedCallback: <T extends unknown[]>(callback: (...args: T) => void, delay: number, dependencies?: default_2.DependencyList) => (...args: T) => void;
1794
+ export declare const useDebouncedCallback: <T extends unknown[]>(callback: (...args: T) => void, delay: number, dependencies?: default_2.DependencyList) => ((...args: T) => void) & {
1795
+ cancel: () => void;
1796
+ };
1739
1797
 
1740
1798
  export declare const useFiltersReducer: (filterValues: Filter[] | undefined) => {
1741
1799
  state: FiltersState;
@@ -1775,7 +1833,9 @@ export declare const usePosition: (providedConfigObject?: ConfigObject) => {
1775
1833
  bottom: PositionType;
1776
1834
  left: PositionType;
1777
1835
  right: PositionType;
1778
- calculatePosition: () => void;
1836
+ calculatePosition: (() => void) & {
1837
+ cancel: () => void;
1838
+ };
1779
1839
  calculatePositionImmediate: () => void;
1780
1840
  initialCalculationDone: boolean;
1781
1841
  resetCalculationState: () => void;
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_FHLkT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.readyclasses_hidden_FHLkT{display:none}.readyclasses_slide-in_FHLkT{animation:readyclasses_slide-in_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-in_FHLkT{animation-duration:.1ms}}.readyclasses_slide-out_FHLkT{animation:readyclasses_slide-out_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-out_FHLkT{animation-duration:.1ms}}@keyframes readyclasses_slide-in_FHLkT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_FHLkT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}')),document.head.appendChild(e)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="readyclasses_hidden_FHLkT",s={"sr-only":"readyclasses_sr-only_FHLkT",hidden:e,"slide-in":"readyclasses_slide-in_FHLkT","slide-out":"readyclasses_slide-out_FHLkT"};exports.default=s,exports.hidden=e;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_ZXWS5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.readyclasses_hidden_ZXWS5{display:none}.readyclasses_slide-in_ZXWS5{animation:readyclasses_slide-in_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-in_ZXWS5{animation-duration:.1ms}}.readyclasses_slide-out_ZXWS5{animation:readyclasses_slide-out_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-out_ZXWS5{animation-duration:.1ms}}@keyframes readyclasses_slide-in_ZXWS5{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_ZXWS5{0%{transform:translateY(0)}to{transform:translateY(100vh)}}')),document.head.appendChild(e)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="readyclasses_hidden_ZXWS5",s={"sr-only":"readyclasses_sr-only_ZXWS5",hidden:e,"slide-in":"readyclasses_slide-in_ZXWS5","slide-out":"readyclasses_slide-out_ZXWS5"};exports.default=s,exports.hidden=e;
3
3
  //# sourceMappingURL=readyclasses.module.scss.cjs.js.map
@@ -1,10 +1,10 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_FHLkT{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.readyclasses_hidden_FHLkT{display:none}.readyclasses_slide-in_FHLkT{animation:readyclasses_slide-in_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-in_FHLkT{animation-duration:.1ms}}.readyclasses_slide-out_FHLkT{animation:readyclasses_slide-out_FHLkT .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-out_FHLkT{animation-duration:.1ms}}@keyframes readyclasses_slide-in_FHLkT{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_FHLkT{0%{transform:translateY(0)}to{transform:translateY(100vh)}}')),document.head.appendChild(e)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}}();
2
- const hidden = "readyclasses_hidden_FHLkT";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_ZXWS5{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.readyclasses_hidden_ZXWS5{display:none}.readyclasses_slide-in_ZXWS5{animation:readyclasses_slide-in_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-in_ZXWS5{animation-duration:.1ms}}.readyclasses_slide-out_ZXWS5{animation:readyclasses_slide-out_ZXWS5 .5s forwards}@media(prefers-reduced-motion:reduce){.readyclasses_slide-out_ZXWS5{animation-duration:.1ms}}@keyframes readyclasses_slide-in_ZXWS5{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_ZXWS5{0%{transform:translateY(0)}to{transform:translateY(100vh)}}')),document.head.appendChild(e)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}}();
2
+ const hidden = "readyclasses_hidden_ZXWS5";
3
3
  const readyclasses = {
4
- "sr-only": "readyclasses_sr-only_FHLkT",
4
+ "sr-only": "readyclasses_sr-only_ZXWS5",
5
5
  hidden,
6
- "slide-in": "readyclasses_slide-in_FHLkT",
7
- "slide-out": "readyclasses_slide-out_FHLkT"
6
+ "slide-in": "readyclasses_slide-in_ZXWS5",
7
+ "slide-out": "readyclasses_slide-out_ZXWS5"
8
8
  };
9
9
  export {
10
10
  readyclasses as default,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.debounce=(e,t)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{clearTimeout(r),e(...o)},t)}},exports.generateID=(e=15,t)=>{const r=["1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];let o="";for(let n=0;n<e&&o.length<e;n++)o=o+("string"!=typeof t||void 0===(null==t?void 0:t[n])||/\s/.test(t[n])?"":t[n])+r[Math.floor(Math.random()*r.length)];return o.slice(0,e)},exports.isJsonString=e=>{try{JSON.parse(e)}catch{return!1}return!0},exports.omitProps=(e,t)=>Object.keys(e).reduce((r,o)=>(t.test(o)||(r[o]=e[o]),r),{}),exports.pickProps=(e,t)=>Object.keys(e).reduce((r,o)=>(t.test(o)&&(r[o]=e[o]),r),{}),exports.remToPx=e=>e*Number.parseFloat(getComputedStyle(document.documentElement).fontSize),exports.throttle=(e,t)=>{let r=0;return function(){const o=Date.now();o-r>=t&&(e(),r=o)}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.classNames=(...e)=>{const t=[];for(const o of e)if(o)if("string"!=typeof o&&"number"!=typeof o)for(const e in o)o[e]&&t.push(e);else t.push(String(o));return t.join(" ")},exports.debounce=(e,t)=>{let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{clearTimeout(o),e(...r)},t)}},exports.generateID=(e=15,t)=>{const o=["1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];let r="";for(let s=0;s<e&&r.length<e;s++)r=r+("string"!=typeof t||void 0===(null==t?void 0:t[s])||/\s/.test(t[s])?"":t[s])+o[Math.floor(Math.random()*o.length)];return r.slice(0,e)},exports.isJsonString=e=>{try{JSON.parse(e)}catch{return!1}return!0},exports.omitProps=(e,t)=>Object.keys(e).reduce((o,r)=>(t.test(r)||(o[r]=e[r]),o),{}),exports.pickProps=(e,t)=>Object.keys(e).reduce((o,r)=>(t.test(r)&&(o[r]=e[r]),o),{}),exports.remToPx=e=>e*Number.parseFloat(getComputedStyle(document.documentElement).fontSize),exports.throttle=(e,t)=>{let o=0;return function(){const r=Date.now();r-o>=t&&(e(),o=r)}};
2
2
  //# sourceMappingURL=helper.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.cjs.js","sources":["../../src/util/helper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n const hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n const stringCharacter =\n typeof stringToWeaveIn === \"string\" &&\n stringToWeaveIn?.[i] !== undefined &&\n !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\n//Returns only the props whose key matches `regexPattern`\nexport const pickProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\n//Returns only the props whose key does not match `regexPattern`\nexport const omitProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (!regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\nexport const debounce = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n\n return function executedFunction(...args: unknown[]) {\n const later = () => {\n clearTimeout(timeout);\n fn(...args);\n };\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, delay);\n };\n};\n\nexport const throttle = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let lastTime = 0;\n\n return function () {\n const now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nconst isEqual = (x: any, y: any): boolean => {\n const typesCoincide = x && y && typeof x === \"object\" && typeof y === \"object\";\n return typesCoincide\n ? Object.keys(x).length === Object.keys(y).length &&\n Object.keys(x).every(key => isEqual(x[key], y[key]))\n : x === y;\n};\n\nexport const areArraysDifferent = (\n arr1: Record<string, any>[],\n arr2: Record<string, any>[],\n key: string\n) => {\n if (arr1.length !== arr2.length) {\n return true;\n } else {\n const firstFilteredArray = arr1.filter(arr1Item =>\n arr2.some((arr2Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n const secondFilteredArray = arr2.filter(arr2Item =>\n arr1.some((arr1Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n\n return !!firstFilteredArray.length || !!secondFilteredArray.length;\n }\n};\n\n/** Source: https://stackoverflow.com/a/42769683/5084110 */\nexport const remToPx = (rem: number): number => {\n return rem * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends object>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) {\n return obj1 as T;\n }\n\n const result: ObjectType = { ...obj1 };\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (\n typeof obj2[key] === \"object\" &&\n obj2[key] !== null &&\n Object.prototype.hasOwnProperty.call(obj1, key) &&\n !Array.isArray(obj2[key])\n ) {\n result[key] = deepMerge(obj1[key], obj2[key]);\n } else {\n result[key] = obj2[key];\n }\n }\n }\n\n return result as T;\n};\n\nexport const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n"],"names":["fn","delay","timeout","args","clearTimeout","setTimeout","length","stringToWeaveIn","hashCharacters","id","i","test","Math","floor","random","slice","str","JSON","parse","props","regexPattern","Object","keys","reduce","acc","key","rem","Number","parseFloat","getComputedStyle","document","documentElement","fontSize","lastTime","now","Date"],"mappings":"iGA2HwB,CAACA,EAAqCC,KAC5D,IAAIC,EAEJ,OAAO,YAA6BC,GAMlCC,aAAaF,GAEbA,EAAUG,WAPI,KACZD,aAAaF,GACbF,KAAMG,IAKoBF,EAC9B,sBAnHwB,CAACK,EAAS,GAAIC,KAEtC,MAAMC,EAAiB,CACrB,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGF,IAAIC,EAAK,GAGT,IAAA,IAASC,EAAI,EAAGA,EAAIJ,GAAUG,EAAGH,OAASA,EAAQI,IAOhDD,EAAKA,GALwB,iBAApBF,QACkB,KAAzB,MAAAA,OAAA,EAAAA,EAAkBG,KACjB,KAAKC,KAAKJ,EAAgBG,IAEvB,GADAH,EAAgBG,IAEMF,EAAeI,KAAKC,MAAMD,KAAKE,SAAWN,EAAeF,SAGvF,OAAOG,EAAGM,MAAM,EAAGT,yBAmFQU,IAC3B,IACEC,KAAKC,MAAMF,EACb,CAAA,MACE,OAAO,CACT,CACA,OAAO,qBA3EgB,CAACG,EAAYC,IACpCC,OAAOC,KAAKH,GAAOI,OAAO,CAACC,EAAmBC,KACvCL,EAAaT,KAAKc,KACrBD,EAAIC,GAAON,EAAMM,IAGZD,GACN,CAAA,qBAjBoB,CAACL,EAAYC,IACpCC,OAAOC,KAAKH,GAAOI,OAAO,CAACC,EAAmBC,KACxCL,EAAaT,KAAKc,KACpBD,EAAIC,GAAON,EAAMM,IAGZD,GACN,CAAA,mBAoEmBE,GACfA,EAAMC,OAAOC,WAAWC,iBAAiBC,SAASC,iBAAiBC,2BA1CpD,CAAChC,EAAqCC,KAC5D,IAAIgC,EAAW,EAEf,OAAO,WACL,MAAMC,EAAMC,KAAKD,MAEbA,EAAMD,GAAYhC,IACpBD,IACAiC,EAAWC,EAEf"}
1
+ {"version":3,"file":"helper.cjs.js","sources":["../../src/util/helper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n const hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n const stringCharacter =\n typeof stringToWeaveIn === \"string\" &&\n stringToWeaveIn?.[i] !== undefined &&\n !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\n//Returns only the props whose key matches `regexPattern`\nexport const pickProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\n//Returns only the props whose key does not match `regexPattern`\nexport const omitProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (!regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\nexport const debounce = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n\n return function executedFunction(...args: unknown[]) {\n const later = () => {\n clearTimeout(timeout);\n fn(...args);\n };\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, delay);\n };\n};\n\nexport const throttle = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let lastTime = 0;\n\n return function () {\n const now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nconst isEqual = (x: any, y: any): boolean => {\n const typesCoincide = x && y && typeof x === \"object\" && typeof y === \"object\";\n return typesCoincide\n ? Object.keys(x).length === Object.keys(y).length &&\n Object.keys(x).every(key => isEqual(x[key], y[key]))\n : x === y;\n};\n\nexport const areArraysDifferent = (\n arr1: Record<string, any>[],\n arr2: Record<string, any>[],\n key: string\n) => {\n if (arr1.length !== arr2.length) {\n return true;\n } else {\n const firstFilteredArray = arr1.filter(arr1Item =>\n arr2.some((arr2Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n const secondFilteredArray = arr2.filter(arr2Item =>\n arr1.some((arr1Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n\n return !!firstFilteredArray.length || !!secondFilteredArray.length;\n }\n};\n\n/** Source: https://stackoverflow.com/a/42769683/5084110 */\nexport const remToPx = (rem: number): number => {\n return rem * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends object>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) {\n return obj1 as T;\n }\n\n const result: ObjectType = { ...obj1 };\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (\n typeof obj2[key] === \"object\" &&\n obj2[key] !== null &&\n Object.prototype.hasOwnProperty.call(obj1, key) &&\n !Array.isArray(obj2[key])\n ) {\n result[key] = deepMerge(obj1[key], obj2[key]);\n } else {\n result[key] = obj2[key];\n }\n }\n }\n\n return result as T;\n};\n\nexport const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\ntype ClassDictionary = Record<string, boolean | undefined | null>;\ntype ClassValue = string | number | false | null | undefined | ClassDictionary;\n\n/**\n * Builds a space-separated className string from a mix of plain strings and\n * `{ className: condition }` maps, skipping any falsy value. Replaces the\n * repeated `const arr = []; cond && arr.push(...); arr.join(\" \")` boilerplate.\n */\nexport const classNames = (...args: ClassValue[]): string => {\n const result: string[] = [];\n\n for (const arg of args) {\n if (!arg) {\n continue;\n }\n\n if (typeof arg === \"string\" || typeof arg === \"number\") {\n result.push(String(arg));\n continue;\n }\n\n for (const key in arg) {\n if (arg[key]) {\n result.push(key);\n }\n }\n }\n\n return result.join(\" \");\n};\n"],"names":["args","result","arg","key","push","String","join","fn","delay","timeout","clearTimeout","setTimeout","length","stringToWeaveIn","hashCharacters","id","i","test","Math","floor","random","slice","str","JSON","parse","props","regexPattern","Object","keys","reduce","acc","rem","Number","parseFloat","getComputedStyle","document","documentElement","fontSize","lastTime","now","Date"],"mappings":"mGAqO0B,IAAIA,KAC5B,MAAMC,EAAmB,GAEzB,IAAA,MAAWC,KAAOF,EAChB,GAAKE,EAIL,GAAmB,iBAARA,GAAmC,iBAARA,EAKtC,IAAA,MAAWC,KAAOD,EACZA,EAAIC,IACNF,EAAOG,KAAKD,QANdF,EAAOG,KAAKC,OAAOH,IAWvB,OAAOD,EAAOK,KAAK,uBA9HG,CAACC,EAAqCC,KAC5D,IAAIC,EAEJ,OAAO,YAA6BT,GAMlCU,aAAaD,GAEbA,EAAUE,WAPI,KACZD,aAAaD,GACbF,KAAMP,IAKoBQ,EAC9B,sBAnHwB,CAACI,EAAS,GAAIC,KAEtC,MAAMC,EAAiB,CACrB,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGF,IAAIC,EAAK,GAGT,IAAA,IAASC,EAAI,EAAGA,EAAIJ,GAAUG,EAAGH,OAASA,EAAQI,IAOhDD,EAAKA,GALwB,iBAApBF,QACkB,KAAzB,MAAAA,OAAA,EAAAA,EAAkBG,KACjB,KAAKC,KAAKJ,EAAgBG,IAEvB,GADAH,EAAgBG,IAEMF,EAAeI,KAAKC,MAAMD,KAAKE,SAAWN,EAAeF,SAGvF,OAAOG,EAAGM,MAAM,EAAGT,yBAmFQU,IAC3B,IACEC,KAAKC,MAAMF,EACb,CAAA,MACE,OAAO,CACT,CACA,OAAO,qBA3EgB,CAACG,EAAYC,IACpCC,OAAOC,KAAKH,GAAOI,OAAO,CAACC,EAAmB3B,KACvCuB,EAAaT,KAAKd,KACrB2B,EAAI3B,GAAOsB,EAAMtB,IAGZ2B,GACN,CAAA,qBAjBoB,CAACL,EAAYC,IACpCC,OAAOC,KAAKH,GAAOI,OAAO,CAACC,EAAmB3B,KACxCuB,EAAaT,KAAKd,KACpB2B,EAAI3B,GAAOsB,EAAMtB,IAGZ2B,GACN,CAAA,mBAoEmBC,GACfA,EAAMC,OAAOC,WAAWC,iBAAiBC,SAASC,iBAAiBC,2BA1CpD,CAAC9B,EAAqCC,KAC5D,IAAI8B,EAAW,EAEf,OAAO,WACL,MAAMC,EAAMC,KAAKD,MAEbA,EAAMD,GAAY9B,IACpBD,IACA+B,EAAWC,EAEf"}
@@ -114,7 +114,26 @@ const isJsonString = (str) => {
114
114
  }
115
115
  return true;
116
116
  };
117
+ const classNames = (...args) => {
118
+ const result = [];
119
+ for (const arg of args) {
120
+ if (!arg) {
121
+ continue;
122
+ }
123
+ if (typeof arg === "string" || typeof arg === "number") {
124
+ result.push(String(arg));
125
+ continue;
126
+ }
127
+ for (const key in arg) {
128
+ if (arg[key]) {
129
+ result.push(key);
130
+ }
131
+ }
132
+ }
133
+ return result.join(" ");
134
+ };
117
135
  export {
136
+ classNames,
118
137
  debounce,
119
138
  generateID,
120
139
  isJsonString,
@@ -1 +1 @@
1
- {"version":3,"file":"helper.es.js","sources":["../../src/util/helper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n const hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n const stringCharacter =\n typeof stringToWeaveIn === \"string\" &&\n stringToWeaveIn?.[i] !== undefined &&\n !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\n//Returns only the props whose key matches `regexPattern`\nexport const pickProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\n//Returns only the props whose key does not match `regexPattern`\nexport const omitProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (!regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\nexport const debounce = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n\n return function executedFunction(...args: unknown[]) {\n const later = () => {\n clearTimeout(timeout);\n fn(...args);\n };\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, delay);\n };\n};\n\nexport const throttle = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let lastTime = 0;\n\n return function () {\n const now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nconst isEqual = (x: any, y: any): boolean => {\n const typesCoincide = x && y && typeof x === \"object\" && typeof y === \"object\";\n return typesCoincide\n ? Object.keys(x).length === Object.keys(y).length &&\n Object.keys(x).every(key => isEqual(x[key], y[key]))\n : x === y;\n};\n\nexport const areArraysDifferent = (\n arr1: Record<string, any>[],\n arr2: Record<string, any>[],\n key: string\n) => {\n if (arr1.length !== arr2.length) {\n return true;\n } else {\n const firstFilteredArray = arr1.filter(arr1Item =>\n arr2.some((arr2Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n const secondFilteredArray = arr2.filter(arr2Item =>\n arr1.some((arr1Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n\n return !!firstFilteredArray.length || !!secondFilteredArray.length;\n }\n};\n\n/** Source: https://stackoverflow.com/a/42769683/5084110 */\nexport const remToPx = (rem: number): number => {\n return rem * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends object>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) {\n return obj1 as T;\n }\n\n const result: ObjectType = { ...obj1 };\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (\n typeof obj2[key] === \"object\" &&\n obj2[key] !== null &&\n Object.prototype.hasOwnProperty.call(obj1, key) &&\n !Array.isArray(obj2[key])\n ) {\n result[key] = deepMerge(obj1[key], obj2[key]);\n } else {\n result[key] = obj2[key];\n }\n }\n }\n\n return result as T;\n};\n\nexport const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n"],"names":[],"mappings":"AAoBO,MAAM,aAAa,CAAC,SAAS,IAAI,oBAA6B;AAEnE,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAGF,MAAI,KAAK;AAGT,WAAS,IAAI,GAAG,IAAI,UAAU,GAAG,SAAS,QAAQ,KAAK;AACrD,UAAM,kBACJ,OAAO,oBAAoB,aAC3B,mDAAkB,QAAO,UACzB,CAAC,KAAK,KAAK,gBAAgB,CAAC,CAAC,IACzB,gBAAgB,CAAC,IACjB;AACN,SAAK,KAAK,kBAAkB,eAAe,KAAK,MAAM,KAAK,OAAA,IAAW,eAAe,MAAM,CAAC;AAAA,EAC9F;AAEA,SAAO,GAAG,MAAM,GAAG,MAAM;AAC3B;AAGO,MAAM,YAAY,CAAC,OAAY,iBACpC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,KAAmB,QAAQ;AACpD,MAAI,aAAa,KAAK,GAAG,GAAG;AAC1B,QAAI,GAAG,IAAI,MAAM,GAAG;AAAA,EACtB;AAEA,SAAO;AACT,GAAG,CAAA,CAAE;AAGA,MAAM,YAAY,CAAC,OAAY,iBACpC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,KAAmB,QAAQ;AACpD,MAAI,CAAC,aAAa,KAAK,GAAG,GAAG;AAC3B,QAAI,GAAG,IAAI,MAAM,GAAG;AAAA,EACtB;AAEA,SAAO;AACT,GAAG,CAAA,CAAE;AAEA,MAAM,WAAW,CAAC,IAAqC,UAAkB;AAC9E,MAAI;AAEJ,SAAO,SAAS,oBAAoB,MAAiB;AACnD,UAAM,QAAQ,MAAM;AAClB,mBAAa,OAAO;AACpB,SAAG,GAAG,IAAI;AAAA,IACZ;AAEA,iBAAa,OAAO;AAEpB,cAAU,WAAW,OAAO,KAAK;AAAA,EACnC;AACF;AAEO,MAAM,WAAW,CAAC,IAAqC,UAAkB;AAC9E,MAAI,WAAW;AAEf,SAAO,WAAY;AACjB,UAAM,MAAM,KAAK,IAAA;AAEjB,QAAI,MAAM,YAAY,OAAO;AAC3B,SAAA;AACA,iBAAW;AAAA,IACb;AAAA,EACF;AACF;AA8BO,MAAM,UAAU,CAAC,QAAwB;AAC9C,SAAO,MAAM,OAAO,WAAW,iBAAiB,SAAS,eAAe,EAAE,QAAQ;AACpF;AAEO,MAAM,eAAe,CAAC,QAAa;AACxC,MAAI;AACF,SAAK,MAAM,GAAG;AAAA,EAChB,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;"}
1
+ {"version":3,"file":"helper.es.js","sources":["../../src/util/helper.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n const hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n const stringCharacter =\n typeof stringToWeaveIn === \"string\" &&\n stringToWeaveIn?.[i] !== undefined &&\n !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\n//Returns only the props whose key matches `regexPattern`\nexport const pickProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\n//Returns only the props whose key does not match `regexPattern`\nexport const omitProps = (props: any, regexPattern: RegExp): KeyValuePair =>\n Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (!regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n\nexport const debounce = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n\n return function executedFunction(...args: unknown[]) {\n const later = () => {\n clearTimeout(timeout);\n fn(...args);\n };\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, delay);\n };\n};\n\nexport const throttle = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let lastTime = 0;\n\n return function () {\n const now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nconst isEqual = (x: any, y: any): boolean => {\n const typesCoincide = x && y && typeof x === \"object\" && typeof y === \"object\";\n return typesCoincide\n ? Object.keys(x).length === Object.keys(y).length &&\n Object.keys(x).every(key => isEqual(x[key], y[key]))\n : x === y;\n};\n\nexport const areArraysDifferent = (\n arr1: Record<string, any>[],\n arr2: Record<string, any>[],\n key: string\n) => {\n if (arr1.length !== arr2.length) {\n return true;\n } else {\n const firstFilteredArray = arr1.filter(arr1Item =>\n arr2.some((arr2Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n const secondFilteredArray = arr2.filter(arr2Item =>\n arr1.some((arr1Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n\n return !!firstFilteredArray.length || !!secondFilteredArray.length;\n }\n};\n\n/** Source: https://stackoverflow.com/a/42769683/5084110 */\nexport const remToPx = (rem: number): number => {\n return rem * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends object>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) {\n return obj1 as T;\n }\n\n const result: ObjectType = { ...obj1 };\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (\n typeof obj2[key] === \"object\" &&\n obj2[key] !== null &&\n Object.prototype.hasOwnProperty.call(obj1, key) &&\n !Array.isArray(obj2[key])\n ) {\n result[key] = deepMerge(obj1[key], obj2[key]);\n } else {\n result[key] = obj2[key];\n }\n }\n }\n\n return result as T;\n};\n\nexport const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\ntype ClassDictionary = Record<string, boolean | undefined | null>;\ntype ClassValue = string | number | false | null | undefined | ClassDictionary;\n\n/**\n * Builds a space-separated className string from a mix of plain strings and\n * `{ className: condition }` maps, skipping any falsy value. Replaces the\n * repeated `const arr = []; cond && arr.push(...); arr.join(\" \")` boilerplate.\n */\nexport const classNames = (...args: ClassValue[]): string => {\n const result: string[] = [];\n\n for (const arg of args) {\n if (!arg) {\n continue;\n }\n\n if (typeof arg === \"string\" || typeof arg === \"number\") {\n result.push(String(arg));\n continue;\n }\n\n for (const key in arg) {\n if (arg[key]) {\n result.push(key);\n }\n }\n }\n\n return result.join(\" \");\n};\n"],"names":[],"mappings":"AAoBO,MAAM,aAAa,CAAC,SAAS,IAAI,oBAA6B;AAEnE,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAGF,MAAI,KAAK;AAGT,WAAS,IAAI,GAAG,IAAI,UAAU,GAAG,SAAS,QAAQ,KAAK;AACrD,UAAM,kBACJ,OAAO,oBAAoB,aAC3B,mDAAkB,QAAO,UACzB,CAAC,KAAK,KAAK,gBAAgB,CAAC,CAAC,IACzB,gBAAgB,CAAC,IACjB;AACN,SAAK,KAAK,kBAAkB,eAAe,KAAK,MAAM,KAAK,OAAA,IAAW,eAAe,MAAM,CAAC;AAAA,EAC9F;AAEA,SAAO,GAAG,MAAM,GAAG,MAAM;AAC3B;AAGO,MAAM,YAAY,CAAC,OAAY,iBACpC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,KAAmB,QAAQ;AACpD,MAAI,aAAa,KAAK,GAAG,GAAG;AAC1B,QAAI,GAAG,IAAI,MAAM,GAAG;AAAA,EACtB;AAEA,SAAO;AACT,GAAG,CAAA,CAAE;AAGA,MAAM,YAAY,CAAC,OAAY,iBACpC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,KAAmB,QAAQ;AACpD,MAAI,CAAC,aAAa,KAAK,GAAG,GAAG;AAC3B,QAAI,GAAG,IAAI,MAAM,GAAG;AAAA,EACtB;AAEA,SAAO;AACT,GAAG,CAAA,CAAE;AAEA,MAAM,WAAW,CAAC,IAAqC,UAAkB;AAC9E,MAAI;AAEJ,SAAO,SAAS,oBAAoB,MAAiB;AACnD,UAAM,QAAQ,MAAM;AAClB,mBAAa,OAAO;AACpB,SAAG,GAAG,IAAI;AAAA,IACZ;AAEA,iBAAa,OAAO;AAEpB,cAAU,WAAW,OAAO,KAAK;AAAA,EACnC;AACF;AAEO,MAAM,WAAW,CAAC,IAAqC,UAAkB;AAC9E,MAAI,WAAW;AAEf,SAAO,WAAY;AACjB,UAAM,MAAM,KAAK,IAAA;AAEjB,QAAI,MAAM,YAAY,OAAO;AAC3B,SAAA;AACA,iBAAW;AAAA,IACb;AAAA,EACF;AACF;AA8BO,MAAM,UAAU,CAAC,QAAwB;AAC9C,SAAO,MAAM,OAAO,WAAW,iBAAiB,SAAS,eAAe,EAAE,QAAQ;AACpF;AAEO,MAAM,eAAe,CAAC,QAAa;AACxC,MAAI;AACF,SAAK,MAAM,GAAG;AAAA,EAChB,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAuCO,MAAM,aAAa,IAAI,SAA+B;AAC3D,QAAM,SAAmB,CAAA;AAEzB,aAAW,OAAO,MAAM;AACtB,QAAI,CAAC,KAAK;AACR;AAAA,IACF;AAEA,QAAI,OAAO,QAAQ,YAAY,OAAO,QAAQ,UAAU;AACtD,aAAO,KAAK,OAAO,GAAG,CAAC;AACvB;AAAA,IACF;AAEA,eAAW,OAAO,KAAK;AACrB,UAAI,IAAI,GAAG,GAAG;AACZ,eAAO,KAAK,GAAG;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAEA,SAAO,OAAO,KAAK,GAAG;AACxB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onewelcome/react-lib-components",
3
- "version": "13.3.0",
3
+ "version": "13.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "OneWelcome B.V.",
6
6
  "main": "dist/index.cjs.js",