@onewelcome/react-lib-components 8.9.0 → 8.10.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 (400) hide show
  1. package/dist/cjs/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
  2. package/dist/cjs/Breadcrumbs/Breadcrumbs.cjs.js.map +1 -1
  3. package/dist/cjs/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +1 -1
  4. package/dist/cjs/Button/BaseButton.cjs.js.map +1 -1
  5. package/dist/cjs/Button/BaseButton.module.scss.cjs.js +1 -1
  6. package/dist/cjs/Button/Button.module.scss.cjs.js +1 -1
  7. package/dist/cjs/Button/IconButton.module.scss.cjs.js +1 -1
  8. package/dist/cjs/ContextMenu/ContextMenu.module.scss.cjs.js +1 -1
  9. package/dist/cjs/ContextMenu/ContextMenuItem.cjs.js +1 -1
  10. package/dist/cjs/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
  11. package/dist/cjs/ContextMenu/ContextMenuItem.module.scss.cjs.js +1 -1
  12. package/dist/cjs/DataGrid/DataGrid.cjs.js.map +1 -1
  13. package/dist/cjs/DataGrid/DataGrid.module.scss.cjs.js +1 -1
  14. package/dist/cjs/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +1 -1
  15. package/dist/cjs/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +1 -1
  16. package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
  17. package/dist/cjs/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +1 -1
  18. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
  19. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -1
  20. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +1 -1
  21. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +1 -1
  22. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +1 -1
  23. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
  24. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +1 -1
  25. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +1 -1
  26. package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +1 -1
  27. package/dist/cjs/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +1 -1
  28. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
  29. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
  30. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +1 -1
  31. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +1 -1
  32. package/dist/cjs/DatePicker/DatePicker.cjs.js.map +1 -1
  33. package/dist/cjs/DatePicker/DatePicker.module.scss.cjs.js +1 -1
  34. package/dist/cjs/Form/Checkbox/Checkbox.module.scss.cjs.js +1 -1
  35. package/dist/cjs/Form/Fieldset/Fieldset.cjs.js.map +1 -1
  36. package/dist/cjs/Form/Fieldset/Fieldset.module.scss.cjs.js +1 -1
  37. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  38. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
  39. package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +1 -1
  40. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
  41. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
  42. package/dist/cjs/Form/FileUpload/FileUpload.module.scss.cjs.js +1 -1
  43. package/dist/cjs/Form/Form.module.scss.cjs.js +1 -1
  44. package/dist/cjs/Form/FormControl/FormControl.module.scss.cjs.js +1 -1
  45. package/dist/cjs/Form/FormGroup/FormGroup.module.scss.cjs.js +1 -1
  46. package/dist/cjs/Form/FormHelperText/FormHelperText.module.scss.cjs.js +1 -1
  47. package/dist/cjs/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +1 -1
  48. package/dist/cjs/Form/Input/Input.module.scss.cjs.js +1 -1
  49. package/dist/cjs/Form/Label/Label.module.scss.cjs.js +1 -1
  50. package/dist/cjs/Form/Radio/Radio.cjs.js.map +1 -1
  51. package/dist/cjs/Form/Radio/Radio.module.scss.cjs.js +1 -1
  52. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  53. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  54. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +1 -1
  55. package/dist/cjs/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +1 -1
  56. package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +1 -1
  57. package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
  58. package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js +1 -1
  59. package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
  60. package/dist/cjs/Form/Select/SingleSelect/Select.module.scss.cjs.js +1 -1
  61. package/dist/cjs/Form/Select/useAddNewBtn.module.scss.cjs.js +1 -1
  62. package/dist/cjs/Form/Textarea/Textarea.module.scss.cjs.js +1 -1
  63. package/dist/cjs/Form/Toggle/Toggle.module.scss.cjs.js +1 -1
  64. package/dist/cjs/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +1 -1
  65. package/dist/cjs/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +1 -1
  66. package/dist/cjs/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +1 -1
  67. package/dist/cjs/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +1 -1
  68. package/dist/cjs/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +1 -1
  69. package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +1 -1
  70. package/dist/cjs/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +1 -1
  71. package/dist/cjs/Icon/Icon.module.scss.cjs.js +1 -1
  72. package/dist/cjs/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +1 -1
  73. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +1 -1
  74. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +1 -1
  75. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +1 -1
  76. package/dist/cjs/Link/Link.cjs.js.map +1 -1
  77. package/dist/cjs/Link/Link.module.scss.cjs.js +1 -1
  78. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +1 -1
  79. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +1 -1
  80. package/dist/cjs/Notifications/Banner/Banner.module.scss.cjs.js +1 -1
  81. package/dist/cjs/Notifications/BaseModal/BaseModal.module.scss.cjs.js +1 -1
  82. package/dist/cjs/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +1 -1
  83. package/dist/cjs/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +1 -1
  84. package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +1 -1
  85. package/dist/cjs/Notifications/Dialog/Dialog.module.scss.cjs.js +1 -1
  86. package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.cjs.js.map +1 -1
  87. package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +1 -1
  88. package/dist/cjs/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +1 -1
  89. package/dist/cjs/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js.map +1 -1
  90. package/dist/cjs/Notifications/SideSheet/SideSheet.module.scss.cjs.js +1 -1
  91. package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +1 -1
  92. package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +1 -1
  93. package/dist/cjs/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +1 -1
  94. package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
  95. package/dist/cjs/Pagination/Pagination.module.scss.cjs.js +1 -1
  96. package/dist/cjs/Popover/Popover.module.scss.cjs.js +1 -1
  97. package/dist/cjs/ProgressBar/ProgressBar.module.scss.cjs.js +1 -1
  98. package/dist/cjs/Skeleton/Skeleton.module.scss.cjs.js +1 -1
  99. package/dist/cjs/Spinner/Spinner.module.scss.cjs.js +1 -1
  100. package/dist/cjs/Stepper/Step.module.scss.cjs.js +1 -1
  101. package/dist/cjs/Stepper/Stepper.module.scss.cjs.js +1 -1
  102. package/dist/cjs/Tabs/Tab.cjs.js.map +1 -1
  103. package/dist/cjs/Tabs/Tab.module.scss.cjs.js +1 -1
  104. package/dist/cjs/Tabs/TabButton.cjs.js +1 -1
  105. package/dist/cjs/Tabs/TabButton.cjs.js.map +1 -1
  106. package/dist/cjs/Tabs/TabButton.module.scss.cjs.js +1 -1
  107. package/dist/cjs/Tabs/Tabs.cjs.js.map +1 -1
  108. package/dist/cjs/Tabs/Tabs.module.scss.cjs.js +1 -1
  109. package/dist/cjs/Tag/RemoveButton.module.scss.cjs.js +1 -1
  110. package/dist/cjs/Tag/Tag.cjs.js.map +1 -1
  111. package/dist/cjs/Tag/Tag.module.scss.cjs.js +1 -1
  112. package/dist/cjs/TextEllipsis/TextEllipsis.module.scss.cjs.js +1 -1
  113. package/dist/cjs/Tiles/Tile.module.scss.cjs.js +1 -1
  114. package/dist/cjs/Tiles/Tiles.module.scss.cjs.js +1 -1
  115. package/dist/cjs/Tooltip/Tooltip.cjs.js.map +1 -1
  116. package/dist/cjs/Tooltip/Tooltip.module.scss.cjs.js +1 -1
  117. package/dist/cjs/Typography/Typography.cjs.js +1 -1
  118. package/dist/cjs/Typography/Typography.cjs.js.map +1 -1
  119. package/dist/cjs/Typography/Typography.module.scss.cjs.js +1 -1
  120. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
  121. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  122. package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +1 -1
  123. package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js +2 -0
  124. package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js.map +1 -0
  125. package/dist/cjs/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -0
  126. package/dist/cjs/miscellaneous/IdentityProviderButton.module.scss.cjs.js.map +1 -0
  127. package/dist/cjs/src/components/DataGrid/DataGrid.d.ts +1 -1
  128. package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +1 -1
  129. package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +1 -1
  130. package/dist/cjs/src/components/Form/Checkbox/Checkbox.d.ts +1 -1
  131. package/dist/cjs/src/components/Form/Fieldset/Fieldset.d.ts +1 -1
  132. package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +1 -1
  133. package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +1 -1
  134. package/dist/cjs/src/components/Form/Input/Input.d.ts +1 -1
  135. package/dist/cjs/src/components/Form/Radio/Radio.d.ts +1 -1
  136. package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.d.ts +1 -1
  137. package/dist/cjs/src/components/Form/Select/SingleSelect/Select.d.ts +1 -1
  138. package/dist/cjs/src/components/Form/Textarea/Textarea.d.ts +1 -1
  139. package/dist/cjs/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +1 -1
  140. package/dist/cjs/src/components/Form/Wrapper/InputWrapper/InputWrapper.d.ts +1 -1
  141. package/dist/cjs/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.d.ts +1 -1
  142. package/dist/cjs/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +1 -1
  143. package/dist/cjs/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
  144. package/dist/cjs/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +1 -1
  145. package/dist/cjs/src/components/Typography/Typography.d.ts +1 -1
  146. package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +8 -2
  147. package/dist/cjs/src/components/miscellaneous/IdentityProviderButton.d.ts +1 -0
  148. package/dist/cjs/src/components/withReadOnly.d.ts +1 -1
  149. package/dist/cjs/src/hooks/useDebouncedCallback.cjs.js.map +1 -1
  150. package/dist/cjs/src/hooks/useRepeatFocus.cjs.js.map +1 -1
  151. package/dist/cjs/src/index.cjs.js +1 -1
  152. package/dist/cjs/src/index.d.ts +6 -1
  153. package/dist/cjs/src/readyclasses.module.scss.cjs.js +1 -1
  154. package/dist/cjs/src/util/helper.cjs.js +1 -1
  155. package/dist/cjs/src/util/helper.cjs.js.map +1 -1
  156. package/dist/cjs/src/util/helper.d.ts +1 -2
  157. package/dist/cjs/withReadOnly.cjs.js.map +1 -1
  158. package/dist/esm/Breadcrumbs/Breadcrumbs.esm.js +1 -1
  159. package/dist/esm/Breadcrumbs/Breadcrumbs.esm.js.map +1 -1
  160. package/dist/esm/Breadcrumbs/Breadcrumbs.module.scss.esm.js +2 -2
  161. package/dist/esm/Button/BaseButton.esm.js +2 -1
  162. package/dist/esm/Button/BaseButton.esm.js.map +1 -1
  163. package/dist/esm/Button/BaseButton.module.scss.esm.js +2 -2
  164. package/dist/esm/Button/Button.module.scss.esm.js +2 -2
  165. package/dist/esm/Button/IconButton.module.scss.esm.js +2 -2
  166. package/dist/esm/ContextMenu/ContextMenu.module.scss.esm.js +2 -2
  167. package/dist/esm/ContextMenu/ContextMenuItem.esm.js +1 -1
  168. package/dist/esm/ContextMenu/ContextMenuItem.esm.js.map +1 -1
  169. package/dist/esm/ContextMenu/ContextMenuItem.module.scss.esm.js +2 -2
  170. package/dist/esm/DataGrid/DataGrid.esm.js.map +1 -1
  171. package/dist/esm/DataGrid/DataGrid.module.scss.esm.js +2 -2
  172. package/dist/esm/DataGrid/DataGridActions/DataGridActions.module.scss.esm.js +2 -2
  173. package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.esm.js +2 -2
  174. package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js.map +1 -1
  175. package/dist/esm/DataGrid/DataGridBody/DataGridBody.module.scss.esm.js +2 -2
  176. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js +3 -2
  177. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js.map +1 -1
  178. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.esm.js +2 -2
  179. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.esm.js +2 -2
  180. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.esm.js +2 -2
  181. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js.map +1 -1
  182. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.esm.js +2 -2
  183. package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.scss.esm.js +2 -2
  184. package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.scss.esm.js +2 -2
  185. package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.esm.js +2 -2
  186. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
  187. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
  188. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.scss.esm.js +2 -2
  189. package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.esm.js +2 -2
  190. package/dist/esm/DatePicker/DatePicker.esm.js +1 -1
  191. package/dist/esm/DatePicker/DatePicker.esm.js.map +1 -1
  192. package/dist/esm/DatePicker/DatePicker.module.scss.esm.js +2 -2
  193. package/dist/esm/Form/Checkbox/Checkbox.module.scss.esm.js +2 -2
  194. package/dist/esm/Form/Fieldset/Fieldset.esm.js +4 -3
  195. package/dist/esm/Form/Fieldset/Fieldset.esm.js.map +1 -1
  196. package/dist/esm/Form/Fieldset/Fieldset.module.scss.esm.js +2 -2
  197. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
  198. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
  199. package/dist/esm/Form/FileUpload/FileItem/FileItem.module.scss.esm.js +2 -2
  200. package/dist/esm/Form/FileUpload/FileUpload.esm.js +5 -5
  201. package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
  202. package/dist/esm/Form/FileUpload/FileUpload.module.scss.esm.js +2 -2
  203. package/dist/esm/Form/Form.module.scss.esm.js +2 -2
  204. package/dist/esm/Form/FormControl/FormControl.module.scss.esm.js +2 -2
  205. package/dist/esm/Form/FormGroup/FormGroup.module.scss.esm.js +2 -2
  206. package/dist/esm/Form/FormHelperText/FormHelperText.module.scss.esm.js +2 -2
  207. package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.esm.js +2 -2
  208. package/dist/esm/Form/Input/Input.module.scss.esm.js +2 -2
  209. package/dist/esm/Form/Label/Label.module.scss.esm.js +2 -2
  210. package/dist/esm/Form/Radio/Radio.esm.js +1 -0
  211. package/dist/esm/Form/Radio/Radio.esm.js.map +1 -1
  212. package/dist/esm/Form/Radio/Radio.module.scss.esm.js +2 -2
  213. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +1 -1
  214. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
  215. package/dist/esm/Form/Select/MultiSelect/MultiSelect.module.scss.esm.js +2 -2
  216. package/dist/esm/Form/Select/MultiSelect/SelectButton.module.scss.esm.js +2 -2
  217. package/dist/esm/Form/Select/MultiSelect/SelectedOptions.module.scss.esm.js +2 -2
  218. package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -1
  219. package/dist/esm/Form/Select/SingleSelect/Option.esm.js +1 -1
  220. package/dist/esm/Form/Select/SingleSelect/Option.esm.js.map +1 -1
  221. package/dist/esm/Form/Select/SingleSelect/Select.module.scss.esm.js +2 -2
  222. package/dist/esm/Form/Select/useAddNewBtn.module.scss.esm.js +2 -2
  223. package/dist/esm/Form/Textarea/Textarea.module.scss.esm.js +2 -2
  224. package/dist/esm/Form/Toggle/Toggle.module.scss.esm.js +2 -2
  225. package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.esm.js +2 -2
  226. package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.scss.esm.js +2 -2
  227. package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.esm.js +2 -2
  228. package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.esm.js +2 -2
  229. package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.esm.js +2 -2
  230. package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.esm.js +2 -2
  231. package/dist/esm/Form/Wrapper/Wrapper/Wrapper.module.scss.esm.js +2 -2
  232. package/dist/esm/Icon/Icon.module.scss.esm.js +2 -2
  233. package/dist/esm/Layout/ContentHeader/ContentHeader.module.scss.esm.js +2 -2
  234. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.esm.js +2 -2
  235. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.esm.js +2 -2
  236. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.esm.js +2 -2
  237. package/dist/esm/Link/Link.esm.js.map +1 -1
  238. package/dist/esm/Link/Link.module.scss.esm.js +2 -2
  239. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.scss.esm.js +2 -2
  240. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.scss.esm.js +2 -2
  241. package/dist/esm/Notifications/Banner/Banner.module.scss.esm.js +2 -2
  242. package/dist/esm/Notifications/BaseModal/BaseModal.module.scss.esm.js +2 -2
  243. package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.esm.js +2 -2
  244. package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.esm.js +2 -2
  245. package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.esm.js +2 -2
  246. package/dist/esm/Notifications/Dialog/Dialog.module.scss.esm.js +2 -2
  247. package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.esm.js.map +1 -1
  248. package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.module.scss.esm.js +2 -2
  249. package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.esm.js +2 -2
  250. package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.esm.js.map +1 -1
  251. package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js +2 -2
  252. package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js +2 -2
  253. package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js +2 -2
  254. package/dist/esm/Notifications/SlideInModal/SlideInModal.module.scss.esm.js +2 -2
  255. package/dist/esm/Pagination/Pagination.esm.js +2 -1
  256. package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
  257. package/dist/esm/Pagination/Pagination.module.scss.esm.js +2 -2
  258. package/dist/esm/Popover/Popover.module.scss.esm.js +2 -2
  259. package/dist/esm/ProgressBar/ProgressBar.module.scss.esm.js +2 -2
  260. package/dist/esm/Skeleton/Skeleton.module.scss.esm.js +2 -2
  261. package/dist/esm/Spinner/Spinner.module.scss.esm.js +2 -2
  262. package/dist/esm/Stepper/Step.module.scss.esm.js +2 -2
  263. package/dist/esm/Stepper/Stepper.module.scss.esm.js +2 -2
  264. package/dist/esm/Tabs/Tab.esm.js.map +1 -1
  265. package/dist/esm/Tabs/Tab.module.scss.esm.js +2 -2
  266. package/dist/esm/Tabs/TabButton.esm.js +1 -1
  267. package/dist/esm/Tabs/TabButton.esm.js.map +1 -1
  268. package/dist/esm/Tabs/TabButton.module.scss.esm.js +2 -2
  269. package/dist/esm/Tabs/Tabs.esm.js +4 -2
  270. package/dist/esm/Tabs/Tabs.esm.js.map +1 -1
  271. package/dist/esm/Tabs/Tabs.module.scss.esm.js +2 -2
  272. package/dist/esm/Tag/RemoveButton.module.scss.esm.js +2 -2
  273. package/dist/esm/Tag/Tag.esm.js.map +1 -1
  274. package/dist/esm/Tag/Tag.module.scss.esm.js +2 -2
  275. package/dist/esm/TextEllipsis/TextEllipsis.module.scss.esm.js +2 -2
  276. package/dist/esm/Tiles/Tile.module.scss.esm.js +2 -2
  277. package/dist/esm/Tiles/Tiles.module.scss.esm.js +2 -2
  278. package/dist/esm/Tooltip/Tooltip.esm.js +2 -1
  279. package/dist/esm/Tooltip/Tooltip.esm.js.map +1 -1
  280. package/dist/esm/Tooltip/Tooltip.module.scss.esm.js +2 -2
  281. package/dist/esm/Typography/Typography.esm.js +1 -1
  282. package/dist/esm/Typography/Typography.esm.js.map +1 -1
  283. package/dist/esm/Typography/Typography.module.scss.esm.js +2 -2
  284. package/dist/esm/_BaseStyling_/BaseStyling.esm.js +13 -6
  285. package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
  286. package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.esm.js +2 -2
  287. package/dist/esm/miscellaneous/IdentityProviderButton.esm.js +46 -0
  288. package/dist/esm/miscellaneous/IdentityProviderButton.esm.js.map +1 -0
  289. package/dist/esm/miscellaneous/IdentityProviderButton.module.scss.esm.js +8 -0
  290. package/dist/esm/miscellaneous/IdentityProviderButton.module.scss.esm.js.map +1 -0
  291. package/dist/esm/src/components/DataGrid/DataGrid.d.ts +1 -1
  292. package/dist/esm/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +1 -1
  293. package/dist/esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +1 -1
  294. package/dist/esm/src/components/Form/Checkbox/Checkbox.d.ts +1 -1
  295. package/dist/esm/src/components/Form/Fieldset/Fieldset.d.ts +1 -1
  296. package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +1 -1
  297. package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +1 -1
  298. package/dist/esm/src/components/Form/Input/Input.d.ts +1 -1
  299. package/dist/esm/src/components/Form/Radio/Radio.d.ts +1 -1
  300. package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.d.ts +1 -1
  301. package/dist/esm/src/components/Form/Select/SingleSelect/Select.d.ts +1 -1
  302. package/dist/esm/src/components/Form/Textarea/Textarea.d.ts +1 -1
  303. package/dist/esm/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +1 -1
  304. package/dist/esm/src/components/Form/Wrapper/InputWrapper/InputWrapper.d.ts +1 -1
  305. package/dist/esm/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.d.ts +1 -1
  306. package/dist/esm/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +1 -1
  307. package/dist/esm/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
  308. package/dist/esm/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +1 -1
  309. package/dist/esm/src/components/Typography/Typography.d.ts +1 -1
  310. package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +8 -2
  311. package/dist/esm/src/components/miscellaneous/IdentityProviderButton.d.ts +1 -0
  312. package/dist/esm/src/components/withReadOnly.d.ts +1 -1
  313. package/dist/esm/src/hooks/useDebouncedCallback.esm.js +2 -0
  314. package/dist/esm/src/hooks/useDebouncedCallback.esm.js.map +1 -1
  315. package/dist/esm/src/hooks/useRepeatFocus.esm.js +6 -3
  316. package/dist/esm/src/hooks/useRepeatFocus.esm.js.map +1 -1
  317. package/dist/esm/src/index.d.ts +6 -1
  318. package/dist/esm/src/index.esm.js +1 -0
  319. package/dist/esm/src/index.esm.js.map +1 -1
  320. package/dist/esm/src/readyclasses.module.scss.esm.js +2 -2
  321. package/dist/esm/src/util/helper.d.ts +1 -2
  322. package/dist/esm/src/util/helper.esm.js +7 -6
  323. package/dist/esm/src/util/helper.esm.js.map +1 -1
  324. package/dist/esm/withReadOnly.esm.js.map +1 -1
  325. package/package.json +11 -12
  326. package/src/_functions.scss +19 -0
  327. package/src/components/Breadcrumbs/Breadcrumbs.module.scss +1 -1
  328. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  329. package/src/components/Button/BaseButton.tsx +2 -1
  330. package/src/components/Button/Button.module.scss +3 -2
  331. package/src/components/Button/IconButton.module.scss +10 -9
  332. package/src/components/ContextMenu/ContextMenuItem.module.scss +2 -2
  333. package/src/components/ContextMenu/ContextMenuItem.tsx +1 -1
  334. package/src/components/DataGrid/DataGrid.tsx +2 -2
  335. package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +2 -2
  336. package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.tsx +4 -2
  337. package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss +3 -2
  338. package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +1 -1
  339. package/src/components/DataGrid/DataGridFilters/DataGridFilter.module.scss +2 -1
  340. package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss +9 -7
  341. package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
  342. package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +1 -1
  343. package/src/components/DatePicker/DatePicker.module.scss +10 -6
  344. package/src/components/DatePicker/DatePicker.tsx +2 -1
  345. package/src/components/Form/Checkbox/Checkbox.module.scss +9 -6
  346. package/src/components/Form/Fieldset/Fieldset.tsx +4 -3
  347. package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +7 -7
  348. package/src/components/Form/FileUpload/FileItem/FileItem.tsx +1 -1
  349. package/src/components/Form/FileUpload/FileUpload.module.scss +2 -2
  350. package/src/components/Form/FileUpload/FileUpload.tsx +6 -5
  351. package/src/components/Form/FormGroup/FormGroup.module.scss +2 -2
  352. package/src/components/Form/FormSection/FormSection.module.scss +1 -1
  353. package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +3 -1
  354. package/src/components/Form/Input/Input.module.scss +5 -4
  355. package/src/components/Form/Radio/Radio.module.scss +11 -9
  356. package/src/components/Form/Radio/Radio.tsx +1 -0
  357. package/src/components/Form/Select/MultiSelect/MultiOption.tsx +1 -1
  358. package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +7 -5
  359. package/src/components/Form/Select/MultiSelect/useSearch.tsx +1 -0
  360. package/src/components/Form/Select/SingleSelect/Option.tsx +1 -1
  361. package/src/components/Form/Select/SingleSelect/Select.module.scss +6 -5
  362. package/src/components/Form/Select/useAddNewBtn.module.scss +2 -1
  363. package/src/components/Form/Textarea/Textarea.module.scss +4 -4
  364. package/src/components/Form/Toggle/Toggle.module.scss +11 -10
  365. package/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss +3 -1
  366. package/src/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -2
  367. package/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss +1 -1
  368. package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +1 -1
  369. package/src/components/Icon/Icon.module.scss +1 -1
  370. package/src/components/Layout/ContentHeader/ContentHeader.module.scss +1 -1
  371. package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +1 -1
  372. package/src/components/Link/Link.tsx +1 -0
  373. package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +9 -9
  374. package/src/components/Notifications/Banner/Banner.module.scss +1 -1
  375. package/src/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss +2 -2
  376. package/src/components/Notifications/Dialog/DialogActions/DialogActions.tsx +1 -0
  377. package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +1 -1
  378. package/src/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +3 -0
  379. package/src/components/Notifications/SideSheet/SideSheet.module.scss +2 -1
  380. package/src/components/Pagination/Pagination.module.scss +7 -5
  381. package/src/components/Pagination/Pagination.tsx +3 -1
  382. package/src/components/Tabs/Tab.tsx +1 -0
  383. package/src/components/Tabs/TabButton.module.scss +5 -3
  384. package/src/components/Tabs/TabButton.tsx +1 -1
  385. package/src/components/Tabs/Tabs.tsx +6 -2
  386. package/src/components/Tag/RemoveButton.module.scss +1 -1
  387. package/src/components/Tag/Tag.module.scss +1 -3
  388. package/src/components/Tag/Tag.tsx +1 -1
  389. package/src/components/Tooltip/Tooltip.module.scss +4 -4
  390. package/src/components/Tooltip/Tooltip.tsx +3 -1
  391. package/src/components/Typography/Typography.module.scss +1 -1
  392. package/src/components/Typography/Typography.tsx +3 -2
  393. package/src/components/_BaseStyling_/BaseStyling.tsx +21 -7
  394. package/src/components/miscellaneous/IdentityProviderButton.tsx +4 -1
  395. package/src/components/withReadOnly.tsx +3 -3
  396. package/src/hooks/useDebouncedCallback.tsx +2 -0
  397. package/src/hooks/useRepeatFocus.tsx +9 -3
  398. package/src/index.ts +10 -1
  399. package/src/mixins.module.scss +1 -1
  400. package/src/util/helper.tsx +12 -8
@@ -3,7 +3,7 @@
3
3
  * and make sure to add it to the shouldBeColorPicker array!
4
4
  */
5
5
  import React, { HTMLAttributes, ReactElement } from "react";
6
- interface CSSProperties {
6
+ export interface CSSProperties {
7
7
  colorFocus?: string;
8
8
  colorPrimary?: string;
9
9
  colorSuccess?: string;
@@ -95,14 +95,17 @@ interface CSSProperties {
95
95
  inputHelperTextColor?: string;
96
96
  inputHoverBackgroundColor?: string;
97
97
  inputDisabledBackgroundColor?: string;
98
+ inputFontSize?: string;
98
99
  dragBorderStyle?: string;
99
100
  modalShadowColor?: string;
100
101
  modalBackgroundColor?: string;
101
102
  modalBackdropColor?: string;
103
+ modalContentFontSize?: string;
102
104
  sideSheetShadowColorOne?: string;
103
105
  sideSheetShadowColorTwo?: string;
104
106
  skeletonBackgroundColor?: string;
105
107
  skeletonAnimationColorRgb?: string;
108
+ alertFontSize?: string;
106
109
  alertTextColor?: string;
107
110
  alertTextInvertedColor?: string;
108
111
  alertNeutralBackgroundColor?: string;
@@ -163,6 +166,7 @@ interface CSSProperties {
163
166
  tooltipBackgroundColor?: string;
164
167
  contextMenuHoverColor?: string;
165
168
  contextMenuPressedColor?: string;
169
+ contextMenuFontSize?: string;
166
170
  default?: string;
167
171
  success?: string;
168
172
  error?: string;
@@ -181,6 +185,8 @@ interface CSSProperties {
181
185
  fontSizeH3?: string;
182
186
  fontSizeH4?: string;
183
187
  fontSizeSub?: string;
188
+ fontSizeSmall?: string;
189
+ fontSizeBig?: string;
184
190
  fontSizeCode?: string;
185
191
  formControlFontSize?: string;
186
192
  fileUploadBorderWidth?: string;
@@ -188,10 +194,10 @@ interface CSSProperties {
188
194
  fontSizeDataGrid?: string;
189
195
  readOnlyBorderColor?: string;
190
196
  readOnlyTextColor?: string;
197
+ iconFontBig?: string;
191
198
  }
192
199
  export interface Props extends HTMLAttributes<HTMLDivElement> {
193
200
  children?: ReactElement[] | ReactElement | string[] | string | number[] | number;
194
201
  properties?: CSSProperties;
195
202
  }
196
203
  export declare const BaseStyling: ({ children, properties }: Props) => React.JSX.Element;
197
- export {};
@@ -13,5 +13,6 @@ export interface Props extends Omit<ComponentPropsWithRef<"button">, "color"> {
13
13
  imgAltText?: string;
14
14
  idpType: string;
15
15
  customization?: SupportedCustomizationKeys;
16
+ loading?: boolean;
16
17
  }
17
18
  export declare const IdentityProviderButton: ForwardRefRenderFunction<HTMLButtonElement, Props>;
@@ -5,4 +5,4 @@ export interface WithReadOnlyProps {
5
5
  helperText?: string;
6
6
  type?: string;
7
7
  }
8
- export declare const withReadOnly: <P extends object>(WrappedComponent: ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & WithReadOnlyProps>> & React.RefAttributes<any>>;
8
+ export declare const withReadOnly: <P extends object>(WrappedComponent: ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & WithReadOnlyProps>> & React.RefAttributes<unknown>>;
@@ -15,9 +15,11 @@ import React from 'react';
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */
18
19
  const useDebouncedCallback = (callback, delay, dependencies) => {
19
20
  const timeout = React.useRef();
20
21
  const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];
22
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
21
23
  return React.useCallback((...args) => {
22
24
  if (timeout.current != null) {
23
25
  clearTimeout(timeout.current);
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedCallback.esm.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 = (callback: Function, delay: number, dependencies?: any[]) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n return React.useCallback((...args: any[]) => {\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":";;AAAA;;;;;;;;;;;;;;AAcG;AAIU,MAAA,oBAAoB,GAAG,CAAC,QAAkB,EAAE,KAAa,EAAE,YAAoB,KAAI;AAC9F,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAiC,CAAC;IAC9D,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAExF,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,IAAW,KAAI;AAC1C,QAAA,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,EAAE;AAC3B,YAAA,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC/B;AAED,QAAA,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,MAAK;AAChC,YAAA,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;SACnB,EAAE,KAAK,CAAC,CAAC;KACX,EAAE,SAAS,CAAC,CAAC;AAChB;;;;"}
1
+ {"version":3,"file":"useDebouncedCallback.esm.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\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */\nexport const useDebouncedCallback = (callback: Function, delay: number, dependencies?: any[]) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n return React.useCallback((...args: any[]) => {\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":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;AACa,MAAA,oBAAoB,GAAG,CAAC,QAAkB,EAAE,KAAa,EAAE,YAAoB,KAAI;AAC9F,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAiC,CAAC;IAC9D,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;;IAGxF,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,IAAW,KAAI;AAC1C,QAAA,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,EAAE;AAC3B,YAAA,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC/B;AAED,QAAA,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,MAAK;AAChC,YAAA,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;SACnB,EAAE,KAAK,CAAC,CAAC;KACX,EAAE,SAAS,CAAC,CAAC;AAChB;;;;"}
@@ -44,15 +44,18 @@ const useRepeatFocus = (ref) => {
44
44
  return null;
45
45
  };
46
46
  useEffect(() => {
47
- if (!ref.current || !open)
47
+ if (!ref.current || !open) {
48
48
  return;
49
+ }
49
50
  const lastFocusableElement = getFocusableElement(ref.current, "last");
50
51
  const firstFocusableElement = getFocusableElement(ref.current, "first");
51
- if (!lastFocusableElement || !firstFocusableElement)
52
+ if (!lastFocusableElement || !firstFocusableElement) {
52
53
  return;
54
+ }
53
55
  const handleTabKeyPress = (event) => {
54
- if (event.key !== "Tab")
56
+ if (event.key !== "Tab") {
55
57
  return;
58
+ }
56
59
  if (event.shiftKey) {
57
60
  if (document.activeElement === firstFocusableElement) {
58
61
  event.preventDefault();
@@ -1 +1 @@
1
- {"version":3,"file":"useRepeatFocus.esm.js","sources":["../../../../../../src/hooks/useRepeatFocus.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 { RefObject, useEffect } from \"react\";\n\n/**\n * @description This is a hook that will make sure that when a modal is open and the user tabs through the it,\n * the focus will be repeated and the user will not lose their entire focusable element to an element in the background\n * that is being blocked by the modal.\n */\n\nexport const useRepeatFocus = (ref: RefObject<HTMLDivElement>) => {\n const getFocusableElement = (\n element: HTMLElement,\n position: \"first\" | \"last\"\n ): HTMLElement | null => {\n const baseSelectors = [\n \"button\",\n \"[href]\",\n \"input\",\n \"select\",\n \"textarea\",\n \"[tabindex]\",\n \"[contenteditable]\"\n ];\n const focusableSelectors = baseSelectors\n .map(selector => `${selector}:not([tabindex=\"-1\"])`)\n .join(\", \");\n const focusableElements = element.querySelectorAll<HTMLElement>(focusableSelectors);\n\n if (position === \"first\") {\n return focusableElements[0] || null;\n } else if (position === \"last\") {\n return focusableElements[focusableElements.length - 1] || null;\n }\n\n return null;\n };\n\n useEffect(() => {\n if (!ref.current || !open) return;\n\n const lastFocusableElement = getFocusableElement(ref.current, \"last\");\n const firstFocusableElement = getFocusableElement(ref.current, \"first\");\n\n if (!lastFocusableElement || !firstFocusableElement) return;\n\n const handleTabKeyPress = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") return;\n\n if (event.shiftKey) {\n if (document.activeElement === firstFocusableElement) {\n event.preventDefault();\n lastFocusableElement?.focus();\n }\n } else if (document.activeElement === lastFocusableElement) {\n event.preventDefault();\n firstFocusableElement?.focus();\n }\n };\n\n lastFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n\n return () => {\n lastFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n };\n }, [ref, open]);\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;;;;AAIG;AAEU,MAAA,cAAc,GAAG,CAAC,GAA8B,KAAI;AAC/D,IAAA,MAAM,mBAAmB,GAAG,CAC1B,OAAoB,EACpB,QAA0B,KACJ;AACtB,QAAA,MAAM,aAAa,GAAG;YACpB,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,QAAQ;YACR,UAAU;YACV,YAAY;YACZ,mBAAmB;SACpB,CAAC;QACF,MAAM,kBAAkB,GAAG,aAAa;aACrC,GAAG,CAAC,QAAQ,IAAI,CAAG,EAAA,QAAQ,uBAAuB,CAAC;aACnD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAAC;AAEpF,QAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;AACxB,YAAA,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;SACrC;AAAM,aAAA,IAAI,QAAQ,KAAK,MAAM,EAAE;YAC9B,OAAO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ACV,YAAA,oBAAoB,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACvE,YAAA,qBAAqB,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC1E,SAAC,CAAC;AACJ,KAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAClB;;;;"}
1
+ {"version":3,"file":"useRepeatFocus.esm.js","sources":["../../../../../../src/hooks/useRepeatFocus.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 { RefObject, useEffect } from \"react\";\n\n/**\n * @description This is a hook that will make sure that when a modal is open and the user tabs through the it,\n * the focus will be repeated and the user will not lose their entire focusable element to an element in the background\n * that is being blocked by the modal.\n */\n\nexport const useRepeatFocus = (ref: RefObject<HTMLDivElement>) => {\n const getFocusableElement = (\n element: HTMLElement,\n position: \"first\" | \"last\"\n ): HTMLElement | null => {\n const baseSelectors = [\n \"button\",\n \"[href]\",\n \"input\",\n \"select\",\n \"textarea\",\n \"[tabindex]\",\n \"[contenteditable]\"\n ];\n const focusableSelectors = baseSelectors\n .map(selector => `${selector}:not([tabindex=\"-1\"])`)\n .join(\", \");\n const focusableElements = element.querySelectorAll<HTMLElement>(focusableSelectors);\n\n if (position === \"first\") {\n return focusableElements[0] || null;\n } else if (position === \"last\") {\n return focusableElements[focusableElements.length - 1] || null;\n }\n\n return null;\n };\n\n useEffect(() => {\n if (!ref.current || !open) {\n return;\n }\n\n const lastFocusableElement = getFocusableElement(ref.current, \"last\");\n const firstFocusableElement = getFocusableElement(ref.current, \"first\");\n\n if (!lastFocusableElement || !firstFocusableElement) {\n return;\n }\n\n const handleTabKeyPress = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstFocusableElement) {\n event.preventDefault();\n lastFocusableElement?.focus();\n }\n } else if (document.activeElement === lastFocusableElement) {\n event.preventDefault();\n firstFocusableElement?.focus();\n }\n };\n\n lastFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n\n return () => {\n lastFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n };\n }, [ref, open]);\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;;;;AAIG;AAEU,MAAA,cAAc,GAAG,CAAC,GAA8B,KAAI;AAC/D,IAAA,MAAM,mBAAmB,GAAG,CAC1B,OAAoB,EACpB,QAA0B,KACJ;AACtB,QAAA,MAAM,aAAa,GAAG;YACpB,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,QAAQ;YACR,UAAU;YACV,YAAY;YACZ,mBAAmB;SACpB,CAAC;QACF,MAAM,kBAAkB,GAAG,aAAa;aACrC,GAAG,CAAC,QAAQ,IAAI,CAAG,EAAA,QAAQ,uBAAuB,CAAC;aACnD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAAC;AAEpF,QAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;AACxB,YAAA,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;SACrC;AAAM,aAAA,IAAI,QAAQ,KAAK,MAAM,EAAE;YAC9B,OAAO,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;SAChE;AAED,QAAA,OA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AACvE,YAAA,qBAAqB,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC1E,SAAC,CAAC;AACJ,KAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAClB;;;;"}
@@ -1,4 +1,4 @@
1
- export { BaseStyling } from "./components/_BaseStyling_/BaseStyling";
1
+ export { BaseStyling, CSSProperties as BaseStylingCSSProperties } from "./components/_BaseStyling_/BaseStyling";
2
2
  export type { Props as BaseStylingProps } from "./components/_BaseStyling_/BaseStyling";
3
3
  export { Button } from "./components/Button/Button";
4
4
  export type { Props as ButtonProps } from "./components/Button/Button";
@@ -156,3 +156,8 @@ export type { Props as DatePickerProps } from "./components/DatePicker/DatePicke
156
156
  /** Admin */
157
157
  export { MicrofrontendContainer } from "./components/admin/layout/MicrofrontendContainer/MicrofrontendContainer";
158
158
  export type { Props as MicrofrontendContainerProps } from "./components/admin/layout/MicrofrontendContainer/MicrofrontendContainer";
159
+ /**
160
+ * Miscellaneous
161
+ */
162
+ export { IdentityProviderButton } from "./components/miscellaneous/IdentityProviderButton";
163
+ export type { Props as IdentityProviderButtonProps } from "./components/miscellaneous/IdentityProviderButton";
@@ -77,4 +77,5 @@ export { useFiltersReducer } from '../DataGrid/DataGridFilters/useFiltersReducer
77
77
  export { Banner } from '../Notifications/Banner/Banner.esm.js';
78
78
  export { DatePicker } from '../DatePicker/DatePicker.esm.js';
79
79
  export { MicrofrontendContainer } from '../admin/layout/MicrofrontendContainer/MicrofrontendContainer.esm.js';
80
+ export { IdentityProviderButton } from '../miscellaneous/IdentityProviderButton.esm.js';
80
81
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../node_modules/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*!\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_POUbO{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.readyclasses_hidden_POUbO{display:none}.readyclasses_slide-in_POUbO{animation:readyclasses_slide-in_POUbO .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-in_POUbO{animation-duration:.1ms}}.readyclasses_slide-out_POUbO{animation:readyclasses_slide-out_POUbO .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-out_POUbO{animation-duration:.1ms}}@keyframes readyclasses_slide-in_POUbO{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_POUbO{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWR5Y2xhc3Nlcy5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLDRCQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUVYLFdBQVksQ0FDWixlQUFnQixDQUZoQixTQUFV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UpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxMDB2aCk7XG4gIH1cbn0iXX0= */";
4
- var readyclasses = {"sr-only":"readyclasses_sr-only_POUbO","hidden":"readyclasses_hidden_POUbO","slide-in":"readyclasses_slide-in_POUbO","slide-out":"readyclasses_slide-out_POUbO"};
3
+ var css_248z = "/*!\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_jzOEv{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.readyclasses_hidden_jzOEv{display:none}.readyclasses_slide-in_jzOEv{animation:readyclasses_slide-in_jzOEv .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-in_jzOEv{animation-duration:.1ms}}.readyclasses_slide-out_jzOEv{animation:readyclasses_slide-out_jzOEv .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-out_jzOEv{animation-duration:.1ms}}@keyframes readyclasses_slide-in_jzOEv{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_jzOEv{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWR5Y2xhc3Nlcy5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLDRCQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUV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ICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxMDB2aCk7XG4gIH1cbn0iXX0= */";
4
+ var readyclasses = {"sr-only":"readyclasses_sr-only_jzOEv","hidden":"readyclasses_hidden_jzOEv","slide-in":"readyclasses_slide-in_jzOEv","slide-out":"readyclasses_slide-out_jzOEv"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { readyclasses as default };
@@ -2,7 +2,6 @@ export declare const generateID: (length?: number, stringToWeaveIn?: string) =>
2
2
  export declare const filterProps: (props: any, regexPattern: RegExp, returnFiltered?: boolean) => {};
3
3
  export declare const debounce: (fn: (...args: unknown[]) => unknown, delay: number) => (...args: unknown[]) => void;
4
4
  export declare const throttle: (fn: (...args: unknown[]) => unknown, delay: number) => () => void;
5
- export declare const isEqual: (x: any, y: any) => boolean;
6
5
  export declare const areArraysDifferent: (arr1: Record<string, any>[], arr2: Record<string, any>[], key: string) => boolean;
7
6
  /** Source: https://stackoverflow.com/a/42769683/5084110 */
8
7
  export declare const remToPx: (rem: number) => number;
@@ -10,6 +9,6 @@ export declare const isJsonString: (str: any) => boolean;
10
9
  type ObjectType = {
11
10
  [key: string]: any;
12
11
  };
13
- export declare const deepMerge: <T extends {}>(obj1: ObjectType, obj2: ObjectType | false) => T;
12
+ export declare const deepMerge: <T extends object>(obj1: ObjectType, obj2: ObjectType | false) => T;
14
13
  export declare const escapeRegExp: (str: string) => string;
15
14
  export {};
@@ -15,7 +15,7 @@
15
15
  */
16
16
  const generateID = (length = 15, stringToWeaveIn) => {
17
17
  /** We will make sure to mesh the generate id and name property together to basically create a unique ID */
18
- let hashCharacters = [
18
+ const hashCharacters = [
19
19
  "1",
20
20
  "2",
21
21
  "3",
@@ -82,7 +82,7 @@ const generateID = (length = 15, stringToWeaveIn) => {
82
82
  let id = "";
83
83
  /** Generate an id of x characters in length */
84
84
  for (let i = 0; i < length && id.length < length; i++) {
85
- let stringCharacter = typeof stringToWeaveIn === "string" &&
85
+ const stringCharacter = typeof stringToWeaveIn === "string" &&
86
86
  (stringToWeaveIn === null || stringToWeaveIn === void 0 ? void 0 : stringToWeaveIn[i]) !== undefined &&
87
87
  !/\s/.test(stringToWeaveIn[i])
88
88
  ? stringToWeaveIn[i]
@@ -120,7 +120,7 @@ const debounce = (fn, delay) => {
120
120
  const throttle = (fn, delay) => {
121
121
  let lastTime = 0;
122
122
  return function () {
123
- let now = Date.now();
123
+ const now = Date.now();
124
124
  if (now - lastTime >= delay) {
125
125
  fn();
126
126
  lastTime = now;
@@ -141,10 +141,11 @@ const isJsonString = (str) => {
141
141
  return true;
142
142
  };
143
143
  const deepMerge = (obj1, obj2) => {
144
- if (!obj2)
144
+ if (!obj2) {
145
145
  return obj1;
146
- let result = { ...obj1 };
147
- for (let key in obj2) {
146
+ }
147
+ const result = { ...obj1 };
148
+ for (const key in obj2) {
148
149
  if (Object.prototype.hasOwnProperty.call(obj2, key)) {
149
150
  if (typeof obj2[key] === "object" &&
150
151
  obj2[key] !== null &&
@@ -1 +1 @@
1
- {"version":3,"file":"helper.esm.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\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 let 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 let 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\nexport const filterProps = (props: any, regexPattern: RegExp, returnFiltered: boolean = true) => {\n if (returnFiltered) {\n return Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n } else {\n return Object.entries(props)\n .filter(([key]) => !regexPattern.test(key))\n .reduce(\n (prevObj, currKeyValPair) => ({ ...prevObj, [currKeyValPair[0]]: currKeyValPair[1] }),\n {}\n );\n }\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 let now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nexport const 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 * parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends {}>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) return obj1 as T;\n\n let result: ObjectType = { ...obj1 };\n\n for (let 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":"AAAA;;;;;;;;;;;;;;AAcG;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KAAK,QAAQ;AAC7B,gBAAA,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI;gBAClB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;gBAC/C,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACzB;AACA,gBAAA,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC/C;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;aACzB;SACF;KACF;AAED,IAAA,OAAO,MAAW,CAAC;AACrB,EAAE;AAEW,MAAA,YAAY,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM;;;;"}
1
+ {"version":3,"file":"helper.esm.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\nexport const filterProps = (props: any, regexPattern: RegExp, returnFiltered: boolean = true) => {\n if (returnFiltered) {\n return Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n } else {\n return Object.entries(props)\n .filter(([key]) => !regexPattern.test(key))\n .reduce(\n (prevObj, currKeyValPair) => ({ ...prevObj, [currKeyValPair[0]]: currKeyValPair[1] }),\n {}\n );\n }\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 * parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch (e) {\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":"AAAA;;;;;;;;;;;;;;AAcG;AAMU,MAAA,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,EAAE,eAAwB,KAAI;;AAElE,IA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,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;gBAC/C,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACzB;AACA,gBAAA,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC/C;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;aACzB;SACF;KACF;AAED,IAAA,OAAO,MAAW,CAAC;AACrB,EAAE;AAEW,MAAA,YAAY,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"withReadOnly.esm.js","sources":["../../../../src/components/withReadOnly.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, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, any> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\nexport const withReadOnly = <P extends object>(WrappedComponent: ComponentType<P>) => {\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, any> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps>, ref: ForwardedRef<any>) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAWH,MAAM,gCAAgC,GAAa,CAAC,iBAAiB,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAK,gBAAkC,KAAI;;IAChE,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,gBAAgB,CAAC,WAAW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E,CAAC;AAEtC,YAAA,KAAK,CAAC,OAAO,GAAG,CAAC,CAAgB,KAAI;gBACnC,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC3B,aAAC,CAAC;AAEF,YAAA,KAAK,CAAC,SAAS,GAAG,CAAC,CAAgB,KAAI;gBACrC,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC3B,aAAC,CAAC;AAEF,YAAA,OAAO,KAAK,CAAC;SACd;AAED,QAAA,OAAO,EAAE,CAAC;AACZ,KAAC,CAAC;IAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CAAC,KAA+C,EAAE,GAAsB,KAAI;QAC1E,MAAM,EACJ,YAAY,GAAG,KAAK,EACpB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,GAAG,EAAE,EACT,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;AAEV,QAAA,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,IACf,GAAG,EAAE,GAAG,EACH,GAAA,SAAe,uBACD,YAAY,EAAA,eAAA,EAChB,YAAY,EAC3B,QAAQ,EAAE,YAAY,GAAG,KAAK,GAAG,QAAQ,EACrC,GAAA,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,EACnD,GAAA,kDAAkD,CAAC,YAAY,CAAC,IAEnE,QAAQ,CACQ,EACnB;AACJ,KAAC,CACF,CAAC;IAEF,qBAAqB,CAAC,WAAW,GAAG,CAAA,aAAA,EAAgB,cAAc,CAAC,gBAAgB,CAAC,CAAA,CAAE,CAAC;AACvF,IAAA,OAAO,qBAAqB,CAAC;AAC/B;;;;"}
1
+ {"version":3,"file":"withReadOnly.esm.js","sources":["../../../../src/components/withReadOnly.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, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\nexport const withReadOnly = <P extends object>(WrappedComponent: ComponentType<P>) => {\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps>, ref: ForwardedRef<unknown>) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAWH,MAAM,gCAAgC,GAAa,CAAC,iBAAiB,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAK,gBAAkC,KAAI;;IAChE,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,gBAAgB,CAAC,WAAW,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,gBAAgB,CAAC,IAAI,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,WAAW,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,YAAqB,EAAE,IAAY,EAAE,UAAmB,KAAI;IACvF,MAAM,KAAK,GAA4B,EAAE,CAAC;IAE1C,IAAI,YAAY,EAAE;AAChB,QAAA,KAAK,CAAC,KAAK,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAC5D,IAAI,UAAU,EAAE;AACd,YAAA,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;SACvB;KACF;SAAM;AACL,QAAA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;KAC/B;IAED,IAAI,IAAI,EAAE;AACR,QAAA,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;KACnB;AAED,IAAA,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEW,MAAA,YAAY,GAAG,CAAmB,gBAAkC,KAAI;AACnF,IAAA,M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A,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,EACnD,GAAA,kDAAkD,CAAC,YAAY,CAAC,IAEnE,QAAQ,CACQ,EACnB;AACJ,KAAC,CACF,CAAC;IAEF,qBAAqB,CAAC,WAAW,GAAG,CAAA,aAAA,EAAgB,cAAc,CAAC,gBAAgB,CAAC,CAAA,CAAE,CAAC;AACvF,IAAA,OAAO,qBAAqB,CAAC;AAC/B;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "http://onewelcome.github.io/react-lib-components",
3
3
  "name": "@onewelcome/react-lib-components",
4
- "version": "8.9.0",
4
+ "version": "8.10.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OneWelcome B.V.",
7
7
  "main": "dist/cjs/src/index.cjs.js",
@@ -57,13 +57,13 @@
57
57
  "node": ">=16"
58
58
  },
59
59
  "devDependencies": {
60
- "@babel/core": "^7.24.7",
61
- "@babel/preset-env": "^7.24.7",
62
- "@babel/preset-react": "^7.24.7",
63
- "@babel/preset-typescript": "^7.24.7",
60
+ "@babel/core": "^7.26.9",
61
+ "@babel/preset-env": "^7.26.9",
62
+ "@babel/preset-react": "^7.26.3",
63
+ "@babel/preset-typescript": "^7.26.0",
64
64
  "@chromatic-com/storybook": "^1.6.0",
65
65
  "@mdx-js/react": "^3.0.1",
66
- "@onewelcome/eslint-config-shared-codestyle": "^9.2.3",
66
+ "@onewelcome/eslint-config-shared-codestyle": "^9.3.0",
67
67
  "@onewelcome/storybook-addon-basestyling": "^2.0.0",
68
68
  "@rollup/plugin-commonjs": "^28.0.1",
69
69
  "@rollup/plugin-node-resolve": "^15.2.3",
@@ -97,9 +97,8 @@
97
97
  "babel-loader": "^9.1.3",
98
98
  "chromatic": "^11.5.4",
99
99
  "css-loader": "^7.1.2",
100
- "eslint": "^8.57.0",
100
+ "eslint": "^8.57.1",
101
101
  "eslint-config-prettier": "^9.1.0",
102
- "eslint-plugin-cypress": "^3.3.0",
103
102
  "eslint-plugin-export-scope": "^2.4.0",
104
103
  "eslint-plugin-jest": "^28.6.0",
105
104
  "eslint-plugin-license-header": "^0.6.1",
@@ -107,24 +106,24 @@
107
106
  "eslint-plugin-react": "^7.34.3",
108
107
  "eslint-plugin-react-hooks": "^4.6.2",
109
108
  "eslint-plugin-storybook": "^0.8.0",
110
- "husky": "^9.1.6",
109
+ "husky": "^9.1.7",
111
110
  "identity-obj-proxy": "^3.0.0",
112
111
  "jest": "^29.7.0",
113
112
  "jest-environment-jsdom": "^29.7.0",
114
113
  "jest-junit": "^16.0.0",
115
114
  "jest-sonar-reporter": "^2.0.0",
116
115
  "lint-staged": "^15.2.7",
117
- "mini-css-extract-plugin": "^2.9.0",
116
+ "mini-css-extract-plugin": "^2.9.2",
118
117
  "npm-run-all": "^4.1.5",
119
118
  "postcss": "^8.4.39",
120
- "postcss-modules": "^6.0.0",
119
+ "postcss-modules": "^6.0.1",
121
120
  "postcss-url": "^10.1.3",
122
121
  "prettier": "^3.3.2",
123
122
  "react": "^18.3.1",
124
123
  "react-dom": "^18.3.1",
125
124
  "react-is": "^18.3.1",
126
125
  "react-router-dom": "^6.24.1",
127
- "remark-gfm": "^4.0.0",
126
+ "remark-gfm": "^4.0.1",
128
127
  "rimraf": "^6.0.1",
129
128
  "rollup": "^4.18.0",
130
129
  "rollup-plugin-postcss": "^4.0.2",
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ @function relativeToBaseFontSize($ratio) {
18
+ @return calc($ratio * var(--font-size));
19
+ }
@@ -23,7 +23,7 @@
23
23
 
24
24
  .icon {
25
25
  color: var(--color-primary);
26
- font-size: 0.625rem;
26
+ font-size: var(--font-size-small);
27
27
  line-height: var(--default-line-height);
28
28
  margin: 0 0.84rem;
29
29
  }
@@ -39,7 +39,7 @@ const BreadcrumbsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
39
39
  const items = React.Children.map(children, (child, index) => {
40
40
  const isLastElement = Array.isArray(children) ? index === children.length - 1 : true;
41
41
  const isFirstElement = Array.isArray(children) && index === 0;
42
- let item = React.cloneElement(child, {
42
+ const item = React.cloneElement(child, {
43
43
  className: classes["breadcrumb-link"],
44
44
  ...(isFirstElement
45
45
  ? {
@@ -31,10 +31,11 @@ const BaseButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> =
31
31
  ) => {
32
32
  const validTypes = ["submit", "button", "reset"];
33
33
  const isDisabled = disabled ?? loading;
34
- if (!validTypes.includes(type))
34
+ if (!validTypes.includes(type)) {
35
35
  throw new Error(
36
36
  `You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got ${type}`
37
37
  );
38
+ }
38
39
 
39
40
  const buttonClasses = [classes.button];
40
41
  loading && buttonClasses.push(classes.loading);
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  @use "../../mixins.module.scss";
18
+ @use "src/functions" as *;
18
19
 
19
20
  .fill {
20
21
  @include mixins.button("fill");
@@ -47,11 +48,11 @@
47
48
  align-items: center;
48
49
  justify-content: center;
49
50
 
50
- width: 1.5rem;
51
+ width: relativeToBaseFontSize(1.5);
51
52
  margin-right: 0.25rem;
52
53
 
53
54
  span {
54
- font-size: 1rem;
55
+ font-size: var(--font-size);
55
56
  }
56
57
  }
57
58
  }
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  @use "../../mixins.module.scss";
18
+ @use "src/functions" as *;
18
19
 
19
20
  .icon-button {
20
21
  border: var(--button-border-width) var(--button-border-style) transparent;
@@ -32,29 +33,29 @@
32
33
 
33
34
  /** Sizes **/
34
35
  &.button-s {
35
- width: 1.875rem;
36
- height: 1.875rem;
36
+ width: relativeToBaseFontSize(1.875);
37
+ height: relativeToBaseFontSize(1.875);
37
38
 
38
39
  span {
39
- font-size: 0.75rem;
40
+ font-size: relativeToBaseFontSize(0.75);
40
41
  }
41
42
  }
42
43
 
43
44
  &.button-m {
44
- width: 2.5rem;
45
- height: 2.5rem;
45
+ width: relativeToBaseFontSize(2.5);
46
+ height: relativeToBaseFontSize(2.5);
46
47
 
47
48
  span {
48
- font-size: 1rem;
49
+ font-size: var(--font-size);
49
50
  }
50
51
  }
51
52
 
52
53
  &.button-l {
53
- width: 3.125rem;
54
- height: 3.125rem;
54
+ width: relativeToBaseFontSize(3.125);
55
+ height: relativeToBaseFontSize(3.125);
55
56
 
56
57
  span {
57
- font-size: 1.375rem;
58
+ font-size: relativeToBaseFontSize(1.375);
58
59
  }
59
60
  }
60
61
 
@@ -24,8 +24,8 @@
24
24
  background-color: transparent;
25
25
  border: 0;
26
26
  font-family: var(--font-family);
27
- font-size: var(--font-size-form-label);
28
- line-height: 1.25rem; //FIXME: UCL-395
27
+ font-size: var(--context-menu-font-size);
28
+ line-height: 1.43;
29
29
  cursor: pointer;
30
30
  width: 100%;
31
31
  height: 100%;
@@ -54,7 +54,7 @@ const ContextMenuItemComponent: ForwardRefRenderFunction<HTMLButtonElement, Prop
54
54
  }: Props,
55
55
  ref
56
56
  ) => {
57
- let innerButtonRef = (ref as RefObject<HTMLButtonElement>) || createRef<HTMLButtonElement>();
57
+ const innerButtonRef = (ref as RefObject<HTMLButtonElement>) || createRef<HTMLButtonElement>();
58
58
 
59
59
  useEffect(() => {
60
60
  if (isSelected && innerButtonRef.current && shouldClick) {
@@ -69,7 +69,7 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"div">, "children">
69
69
  spacing?: Spacing;
70
70
  }
71
71
 
72
- const DataGridInner = <T extends {}>(
72
+ const DataGridInner = <T extends object>(
73
73
  {
74
74
  children,
75
75
  data,
@@ -214,6 +214,6 @@ const DataGridInner = <T extends {}>(
214
214
  );
215
215
  };
216
216
 
217
- export const DataGrid = React.forwardRef(DataGridInner) as <T extends {}>(
217
+ export const DataGrid = React.forwardRef(DataGridInner) as <T extends object>(
218
218
  p: Props<T> & { ref?: Ref<HTMLDivElement> }
219
219
  ) => ReactElement;
@@ -37,7 +37,7 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"tbody">, "children
37
37
 
38
38
  const skeletonLoadingRows = 9;
39
39
 
40
- const DataGridBodyInner = <T extends {}>(
40
+ const DataGridBodyInner = <T extends object>(
41
41
  {
42
42
  children,
43
43
  data,
@@ -105,6 +105,6 @@ const DataGridBodyInner = <T extends {}>(
105
105
  );
106
106
  };
107
107
 
108
- export const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends {}>(
108
+ export const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends object>(
109
109
  p: Props<T> & { ref?: Ref<HTMLTableSectionElement> }
110
110
  ) => ReactElement;
@@ -49,7 +49,7 @@ const DataGridCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Prop
49
49
  }: Props,
50
50
  ref
51
51
  ) => {
52
- let cellStyle: React.CSSProperties = {};
52
+ const cellStyle: React.CSSProperties = {};
53
53
 
54
54
  if (cellIndex === 0) {
55
55
  cellStyle.paddingLeft = spacing?.paddingLeft;
@@ -72,7 +72,9 @@ const DataGridCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Prop
72
72
 
73
73
  const parts = children.split(matchingSequence?.[0] ?? "");
74
74
  return parts.map((part, i) => {
75
- if (i === parts.length - 1) return <Fragment key={`${part}-${i}`}>{part}</Fragment>;
75
+ if (i === parts.length - 1) {
76
+ return <Fragment key={`${part}-${i}`}>{part}</Fragment>;
77
+ }
76
78
 
77
79
  return (
78
80
  <Fragment key={`${part}-${i}`}>