@onewelcome/react-lib-components 6.5.0 → 6.7.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 (347) hide show
  1. package/dist/cjs/DataGrid/DataGrid.module.cjs.js +1 -1
  2. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js +1 -1
  3. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js.map +1 -1
  4. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +1 -1
  5. package/dist/cjs/DataGrid/DataGridBody/DataGridRow.module.cjs.js +1 -1
  6. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
  7. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
  8. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.cjs.js +1 -1
  9. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.cjs.js +1 -1
  10. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  11. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
  12. package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.cjs.js +1 -1
  13. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
  14. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
  15. package/dist/cjs/Form/FileUpload/FileUpload.module.cjs.js +1 -1
  16. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  17. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  18. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
  19. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
  20. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.module.cjs.js +1 -1
  21. package/dist/cjs/Form/Select/MultiSelect/SelectButton.cjs.js +1 -1
  22. package/dist/cjs/Form/Select/MultiSelect/SelectButton.cjs.js.map +1 -1
  23. package/dist/cjs/Form/Select/MultiSelect/SelectButton.module.cjs.js +1 -1
  24. package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.cjs.js +1 -1
  25. package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
  26. package/dist/cjs/Form/Select/MultiSelect/useArrowNavigation.cjs.js +2 -0
  27. package/dist/cjs/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -0
  28. package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js +2 -0
  29. package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -0
  30. package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js +1 -1
  31. package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
  32. package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js +1 -1
  33. package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
  34. package/dist/cjs/Form/Select/SingleSelect/Select.module.cjs.js +1 -1
  35. package/dist/cjs/Form/Select/SingleSelect/useArrowNavigation.cjs.js +2 -0
  36. package/dist/cjs/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -0
  37. package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js +2 -0
  38. package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -0
  39. package/dist/cjs/Form/Select/useAddNewBtn.cjs.js +1 -1
  40. package/dist/cjs/Form/Select/useAddNewBtn.cjs.js.map +1 -1
  41. package/dist/cjs/Form/Select/useAddNewBtn.module.cjs.js +1 -1
  42. package/dist/cjs/Form/Select/useSelectPositionList.cjs.js +2 -0
  43. package/dist/cjs/Form/Select/useSelectPositionList.cjs.js.map +1 -0
  44. package/dist/cjs/Icon/Icon.cjs.js +1 -1
  45. package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
  46. package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
  47. package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js +2 -0
  48. package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -0
  49. package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js +2 -0
  50. package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js.map +1 -0
  51. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js +2 -0
  52. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -0
  53. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js +2 -0
  54. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js.map +1 -0
  55. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +2 -0
  56. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -0
  57. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js +2 -0
  58. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js.map +1 -0
  59. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +2 -0
  60. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -0
  61. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +2 -0
  62. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js.map +1 -0
  63. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js +2 -0
  64. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -0
  65. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js +2 -0
  66. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js.map +1 -0
  67. package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +2 -0
  68. package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -0
  69. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js +2 -0
  70. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -0
  71. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js +2 -0
  72. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js.map +1 -0
  73. package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js +2 -0
  74. package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -0
  75. package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +2 -0
  76. package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -0
  77. package/dist/cjs/Notifications/Alert/useAlert.cjs.js +2 -0
  78. package/dist/cjs/Notifications/Alert/useAlert.cjs.js.map +1 -0
  79. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +1 -1
  80. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +1 -1
  81. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +1 -1
  82. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +1 -1
  83. package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +1 -1
  84. package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +1 -1
  85. package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
  86. package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
  87. package/dist/cjs/Pagination/Pagination.module.cjs.js +1 -1
  88. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
  89. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  90. package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
  91. package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
  92. package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +63 -1
  93. package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelectKeyboardNavigation.test.d.ts +1 -0
  94. package/dist/cjs/src/components/Form/Select/MultiSelect/SelectedOptions.d.ts +2 -1
  95. package/dist/cjs/src/components/Form/Select/MultiSelect/useArrowNavigation.d.ts +16 -0
  96. package/dist/cjs/src/components/Form/Select/MultiSelect/useSearch.d.ts +34 -0
  97. package/dist/cjs/src/components/Form/Select/Select.interfaces.d.ts +1 -0
  98. package/dist/cjs/src/components/Form/Select/SingleSelect/Option.d.ts +1 -0
  99. package/dist/cjs/src/components/Form/Select/SingleSelect/useArrowNavigation.d.ts +5 -0
  100. package/dist/cjs/src/components/Form/Select/{useSearch.d.ts → SingleSelect/useSearch.d.ts} +2 -1
  101. package/dist/cjs/src/components/Form/Select/useAddNewBtn.d.ts +10 -3
  102. package/dist/cjs/src/components/Form/Select/useSelectPositionList.d.ts +12 -0
  103. package/dist/cjs/src/components/Icon/Icon.d.ts +5 -1
  104. package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
  105. package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
  106. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
  107. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
  108. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
  109. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
  110. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
  111. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
  112. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
  113. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
  114. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
  115. package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
  116. package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
  117. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
  118. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
  119. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
  120. package/dist/cjs/src/components/Notifications/Alert/useAlert.d.ts +7 -0
  121. package/dist/cjs/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
  122. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
  123. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
  124. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
  125. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
  126. package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
  127. package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
  128. package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
  129. package/dist/cjs/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
  130. package/dist/cjs/src/index.cjs.js +1 -1
  131. package/dist/cjs/src/index.d.ts +15 -0
  132. package/dist/cjs/src/util/helper.cjs.js +1 -1
  133. package/dist/cjs/src/util/helper.cjs.js.map +1 -1
  134. package/dist/cjs/src/util/helper.d.ts +1 -0
  135. package/dist/esm/DataGrid/DataGrid.module.esm.js +1 -1
  136. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +1 -1
  137. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +1 -1
  138. package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +1 -1
  139. package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +1 -1
  140. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
  141. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
  142. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.esm.js +1 -1
  143. package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.esm.js +1 -1
  144. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
  145. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
  146. package/dist/esm/Form/FileUpload/FileItem/FileItem.module.esm.js +1 -1
  147. package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
  148. package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
  149. package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
  150. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +1 -1
  151. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
  152. package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js +1 -1
  153. package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js.map +1 -1
  154. package/dist/esm/Form/Select/MultiSelect/MultiSelect.module.esm.js +1 -1
  155. package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js +1 -1
  156. package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js.map +1 -1
  157. package/dist/esm/Form/Select/MultiSelect/SelectButton.module.esm.js +1 -1
  158. package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js +1 -1
  159. package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js.map +1 -1
  160. package/dist/esm/Form/Select/MultiSelect/useArrowNavigation.esm.js +2 -0
  161. package/dist/esm/Form/Select/MultiSelect/useArrowNavigation.esm.js.map +1 -0
  162. package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js +2 -0
  163. package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -0
  164. package/dist/esm/Form/Select/SingleSelect/Option.esm.js +1 -1
  165. package/dist/esm/Form/Select/SingleSelect/Option.esm.js.map +1 -1
  166. package/dist/esm/Form/Select/SingleSelect/Select.esm.js +1 -1
  167. package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
  168. package/dist/esm/Form/Select/SingleSelect/Select.module.esm.js +1 -1
  169. package/dist/esm/Form/Select/SingleSelect/useArrowNavigation.esm.js +2 -0
  170. package/dist/esm/Form/Select/SingleSelect/useArrowNavigation.esm.js.map +1 -0
  171. package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js +2 -0
  172. package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js.map +1 -0
  173. package/dist/esm/Form/Select/useAddNewBtn.esm.js +1 -1
  174. package/dist/esm/Form/Select/useAddNewBtn.esm.js.map +1 -1
  175. package/dist/esm/Form/Select/useAddNewBtn.module.esm.js +1 -1
  176. package/dist/esm/Form/Select/useSelectPositionList.esm.js +2 -0
  177. package/dist/esm/Form/Select/useSelectPositionList.esm.js.map +1 -0
  178. package/dist/esm/Icon/Icon.esm.js +1 -1
  179. package/dist/esm/Icon/Icon.esm.js.map +1 -1
  180. package/dist/esm/Icon/Icon.module.esm.js +1 -1
  181. package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js +2 -0
  182. package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js.map +1 -0
  183. package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js +2 -0
  184. package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js.map +1 -0
  185. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js +2 -0
  186. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js.map +1 -0
  187. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js +2 -0
  188. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js.map +1 -0
  189. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js +2 -0
  190. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js.map +1 -0
  191. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js +2 -0
  192. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js.map +1 -0
  193. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +2 -0
  194. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -0
  195. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +2 -0
  196. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js.map +1 -0
  197. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js +2 -0
  198. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js.map +1 -0
  199. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js +2 -0
  200. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js.map +1 -0
  201. package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js +2 -0
  202. package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js.map +1 -0
  203. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js +2 -0
  204. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js.map +1 -0
  205. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js +2 -0
  206. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js.map +1 -0
  207. package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js +2 -0
  208. package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js.map +1 -0
  209. package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js +2 -0
  210. package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js.map +1 -0
  211. package/dist/esm/Notifications/Alert/useAlert.esm.js +2 -0
  212. package/dist/esm/Notifications/Alert/useAlert.esm.js.map +1 -0
  213. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +1 -1
  214. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +1 -1
  215. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +1 -1
  216. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +1 -1
  217. package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +1 -1
  218. package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +1 -1
  219. package/dist/esm/Pagination/Pagination.esm.js +1 -1
  220. package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
  221. package/dist/esm/Pagination/Pagination.module.esm.js +1 -1
  222. package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
  223. package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
  224. package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
  225. package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
  226. package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +63 -1
  227. package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelectKeyboardNavigation.test.d.ts +1 -0
  228. package/dist/esm/src/components/Form/Select/MultiSelect/SelectedOptions.d.ts +2 -1
  229. package/dist/esm/src/components/Form/Select/MultiSelect/useArrowNavigation.d.ts +16 -0
  230. package/dist/esm/src/components/Form/Select/MultiSelect/useSearch.d.ts +34 -0
  231. package/dist/esm/src/components/Form/Select/Select.interfaces.d.ts +1 -0
  232. package/dist/esm/src/components/Form/Select/SingleSelect/Option.d.ts +1 -0
  233. package/dist/esm/src/components/Form/Select/SingleSelect/useArrowNavigation.d.ts +5 -0
  234. package/dist/esm/src/components/Form/Select/{useSearch.d.ts → SingleSelect/useSearch.d.ts} +2 -1
  235. package/dist/esm/src/components/Form/Select/useAddNewBtn.d.ts +10 -3
  236. package/dist/esm/src/components/Form/Select/useSelectPositionList.d.ts +12 -0
  237. package/dist/esm/src/components/Icon/Icon.d.ts +5 -1
  238. package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
  239. package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
  240. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
  241. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
  242. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
  243. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
  244. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
  245. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
  246. package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
  247. package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
  248. package/dist/esm/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
  249. package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
  250. package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
  251. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
  252. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
  253. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
  254. package/dist/esm/src/components/Notifications/Alert/useAlert.d.ts +7 -0
  255. package/dist/esm/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
  256. package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
  257. package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
  258. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
  259. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
  260. package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
  261. package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
  262. package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
  263. package/dist/esm/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
  264. package/dist/esm/src/index.d.ts +15 -0
  265. package/dist/esm/src/index.esm.js +1 -1
  266. package/dist/esm/src/util/helper.d.ts +1 -0
  267. package/dist/esm/src/util/helper.esm.js +1 -1
  268. package/dist/esm/src/util/helper.esm.js.map +1 -1
  269. package/package.json +6 -6
  270. package/src/components/DataGrid/DataGrid.module.scss +2 -2
  271. package/src/components/DataGrid/DataGridBody/DataGridCell.module.scss +7 -2
  272. package/src/components/DataGrid/DataGridBody/DataGridCell.tsx +1 -1
  273. package/src/components/DataGrid/DataGridBody/DataGridRow.module.scss +10 -0
  274. package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +16 -16
  275. package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +0 -10
  276. package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
  277. package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +3 -3
  278. package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +114 -3
  279. package/src/components/Form/FileUpload/FileItem/FileItem.tsx +154 -47
  280. package/src/components/Form/FileUpload/FileUpload.module.scss +73 -16
  281. package/src/components/Form/FileUpload/FileUpload.tsx +82 -53
  282. package/src/components/Form/FormSection/FormSection.module.scss +12 -0
  283. package/src/components/Form/Select/MultiSelect/MultiOption.tsx +36 -3
  284. package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +29 -19
  285. package/src/components/Form/Select/MultiSelect/MultiSelect.tsx +85 -62
  286. package/src/components/Form/Select/MultiSelect/SelectButton.module.scss +1 -1
  287. package/src/components/Form/Select/MultiSelect/SelectButton.tsx +1 -1
  288. package/src/components/Form/Select/MultiSelect/SelectedOptions.tsx +5 -4
  289. package/src/components/Form/Select/MultiSelect/useArrowNavigation.ts +128 -0
  290. package/src/components/Form/Select/MultiSelect/useSearch.tsx +126 -0
  291. package/src/components/Form/Select/Select.interfaces.ts +1 -0
  292. package/src/components/Form/Select/SingleSelect/Option.tsx +15 -4
  293. package/src/components/Form/Select/SingleSelect/Select.module.scss +13 -2
  294. package/src/components/Form/Select/SingleSelect/Select.tsx +7 -3
  295. package/src/components/Form/Select/{SelectService.ts → SingleSelect/useArrowNavigation.ts} +1 -101
  296. package/src/components/Form/Select/{useSearch.tsx → SingleSelect/useSearch.tsx} +3 -2
  297. package/src/components/Form/Select/useAddNewBtn.module.scss +18 -4
  298. package/src/components/Form/Select/useAddNewBtn.tsx +42 -8
  299. package/src/components/Form/Select/useSelectPositionList.ts +113 -0
  300. package/src/components/Icon/Icon.module.scss +16 -1
  301. package/src/components/Icon/Icon.tsx +5 -1
  302. package/src/components/Layout/ContentHeader/ContentHeader.module.scss +44 -0
  303. package/src/components/Layout/ContentHeader/ContentHeader.tsx +70 -0
  304. package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +12 -0
  305. package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.tsx +53 -0
  306. package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss +25 -0
  307. package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.tsx +54 -0
  308. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +39 -0
  309. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +34 -0
  310. package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +56 -0
  311. package/src/components/Notifications/Alert/AlertContainer/AlertContainer.tsx +52 -0
  312. package/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.ts +47 -0
  313. package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +277 -0
  314. package/src/components/Notifications/Alert/AlertItem/AlertItem.tsx +214 -0
  315. package/src/components/Notifications/Alert/AlertProvider/AlertContext.ts +42 -0
  316. package/src/components/Notifications/Alert/AlertProvider/AlertProvider.tsx +173 -0
  317. package/src/components/Notifications/Alert/useAlert.ts +30 -0
  318. package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +9 -0
  319. package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +6 -0
  320. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +9 -0
  321. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +9 -0
  322. package/src/components/Notifications/Snackbar/interfaces.ts +18 -0
  323. package/src/components/Notifications/Snackbar/useSnackbar.ts +3 -0
  324. package/src/components/Pagination/Pagination.module.scss +4 -6
  325. package/src/components/Pagination/Pagination.tsx +3 -1
  326. package/src/components/_BaseStyling_/BaseStyling.tsx +78 -1
  327. package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss +25 -0
  328. package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.tsx +47 -0
  329. package/src/font/icomoon.eot +0 -0
  330. package/src/font/icomoon.svg +3 -0
  331. package/src/font/icomoon.ttf +0 -0
  332. package/src/font/icomoon.woff +0 -0
  333. package/src/font/selection.json +1 -1
  334. package/src/index.ts +21 -0
  335. package/src/mixins.module.scss +7 -0
  336. package/src/util/helper.tsx +2 -0
  337. package/src/variables.scss +1 -0
  338. package/dist/cjs/Form/Select/SelectService.cjs.js +0 -2
  339. package/dist/cjs/Form/Select/SelectService.cjs.js.map +0 -1
  340. package/dist/cjs/Form/Select/useSearch.cjs.js +0 -2
  341. package/dist/cjs/Form/Select/useSearch.cjs.js.map +0 -1
  342. package/dist/cjs/src/components/Form/Select/SelectService.d.ts +0 -17
  343. package/dist/esm/Form/Select/SelectService.esm.js +0 -2
  344. package/dist/esm/Form/Select/SelectService.esm.js.map +0 -1
  345. package/dist/esm/Form/Select/useSearch.esm.js +0 -2
  346. package/dist/esm/Form/Select/useSearch.esm.js.map +0 -1
  347. package/dist/esm/src/components/Form/Select/SelectService.d.ts +0 -17
@@ -0,0 +1,214 @@
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
+ import React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from "react";
18
+ import { IconButton } from "../../../Button/IconButton";
19
+ import { Icon, Icons } from "../../../Icon/Icon";
20
+ import classes from "./AlertItem.module.scss";
21
+ import readyclasses from "../../../../readyclasses.module.scss";
22
+ import { useAnimation } from "../../../../hooks/useAnimation";
23
+ import { Typography } from "../../../Typography/Typography";
24
+ import AlertContext from "../AlertProvider/AlertContext";
25
+
26
+ export const EMPHASES = ["low", "medium", "high"] as const;
27
+ export type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];
28
+
29
+ export const VARIANTS = ["neutral", "informative", "success", "warning", "error"] as const;
30
+ export type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];
31
+
32
+ export type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];
33
+
34
+ export interface Props {
35
+ id: string;
36
+ title?: string;
37
+ content?: string;
38
+ duration?: number;
39
+ emphasis?: Emphasis;
40
+ variant?: Variant;
41
+ className?: string;
42
+ onClose?: () => void;
43
+ closeButtonTitle?: string;
44
+ actions?: Actions;
45
+ wasShown?: boolean;
46
+ }
47
+
48
+ const useRegisterAlertHeight = (
49
+ singleAlertRef: React.RefObject<HTMLDivElement>,
50
+ alertId: string
51
+ ) => {
52
+ const ctx = useContext(AlertContext);
53
+
54
+ useEffect(() => {
55
+ if (singleAlertRef.current) {
56
+ ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);
57
+ }
58
+ }, [singleAlertRef.current]);
59
+ };
60
+
61
+ let actionButtonKeyCounter = 1;
62
+ export const AlertItem = ({
63
+ id,
64
+ title,
65
+ duration,
66
+ variant = "neutral",
67
+ emphasis = "low",
68
+ content,
69
+ className,
70
+ actions = [],
71
+ onClose,
72
+ closeButtonTitle,
73
+ wasShown
74
+ }: Props) => {
75
+ const timerHandler = useRef<ReturnType<typeof setTimeout>>();
76
+ const onAnimationEnd = () => {
77
+ onClose?.();
78
+ };
79
+ const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);
80
+
81
+ useRegisterAlertHeight(ref, id);
82
+
83
+ useEffect(() => {
84
+ if (duration && duration > 0) {
85
+ timerHandler.current = setTimeout(() => startAnimation(), duration);
86
+ }
87
+ if (ref) {
88
+ ref.current?.addEventListener("focus", onItemFocus);
89
+ ref.current?.addEventListener("blur", onItemBlur);
90
+ ref.current?.addEventListener("mouseenter", onItemFocus);
91
+ ref.current?.addEventListener("mouseleave", onItemBlur);
92
+ }
93
+ return () => {
94
+ timerHandler.current && clearTimeout(timerHandler.current);
95
+ };
96
+ }, []);
97
+
98
+ const onItemFocus = () => {
99
+ timerHandler.current && clearTimeout(timerHandler.current);
100
+ };
101
+
102
+ const onItemBlur = () => {
103
+ if (duration && duration > 0) {
104
+ timerHandler.current = setTimeout(() => startAnimation(), duration);
105
+ }
106
+ };
107
+
108
+ const getVariantIcon = () => {
109
+ if (variant === "error") {
110
+ return Icons.ErrorAlt;
111
+ }
112
+
113
+ if (variant === "warning") {
114
+ return Icons.Warning;
115
+ }
116
+
117
+ return variant === "success" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;
118
+ };
119
+
120
+ const actionButtons = actions.map(actionProp => (
121
+ <button
122
+ key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}
123
+ {...actionProp}
124
+ onClick={e => {
125
+ onClose?.();
126
+ actionProp.onClick?.(e);
127
+ }}
128
+ className={classes["action-button"]}
129
+ >
130
+ {actionProp.label}
131
+ </button>
132
+ ));
133
+
134
+ const getAlertClasses = (): string => {
135
+ const alertClasses = [classes["alert"], classes[`${variant}`], classes[`emph-${emphasis}`]];
136
+ if (animationStarted) {
137
+ alertClasses.push(readyclasses["slide-out"]);
138
+ }
139
+ if (!animationStarted && !wasShown) {
140
+ alertClasses.push(readyclasses["slide-in"]);
141
+ }
142
+ if (className) {
143
+ alertClasses.push(className);
144
+ }
145
+ return alertClasses.join(" ");
146
+ };
147
+
148
+ const getAria = () => {
149
+ if (variant === "error" && (emphasis === "medium" || emphasis === "high")) {
150
+ return "assertive";
151
+ }
152
+ return "polite";
153
+ };
154
+
155
+ const getContentOrTitle = () => {
156
+ if (content) {
157
+ return content;
158
+ }
159
+ return title;
160
+ };
161
+
162
+ return (
163
+ <div
164
+ {...{ ["data-testid"]: "alert-container" }}
165
+ ref={ref}
166
+ aria-live={getAria()}
167
+ className={getAlertClasses()}
168
+ role="alert"
169
+ >
170
+ <div className={classes["outer-content-wrapper"]}>
171
+ <Icon icon={getVariantIcon()} className={classes["icon"]} />
172
+ <div className={classes["content-wrapper"]} role="log">
173
+ {!!title && !!content && (
174
+ <Typography
175
+ {...{ ["data-testid"]: "alert-title" }}
176
+ className={classes["title"]}
177
+ variant="body-bold"
178
+ tag="span"
179
+ >
180
+ {title}
181
+ </Typography>
182
+ )}
183
+ {(!!content || !!title) && (
184
+ <Typography
185
+ {...{ ["data-testid"]: "alert-content" }}
186
+ className={classes["content"]}
187
+ variant="body"
188
+ >
189
+ {getContentOrTitle()}
190
+ </Typography>
191
+ )}
192
+ </div>
193
+ </div>
194
+ {actionButtons.length > 0 && (
195
+ <div {...{ ["data-testid"]: "alert-actions" }} className={classes["actions"]}>
196
+ {actionButtons}
197
+ </div>
198
+ )}
199
+ {onClose && (
200
+ <IconButton
201
+ className={classes["close-btn"]}
202
+ onClick={e => {
203
+ e.stopPropagation();
204
+ startAnimation();
205
+ }}
206
+ title={closeButtonTitle}
207
+ {...{ ["data-testid"]: "alert-close" }}
208
+ >
209
+ <Icon icon={Icons.Times} />
210
+ </IconButton>
211
+ )}
212
+ </div>
213
+ );
214
+ };
@@ -0,0 +1,42 @@
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
+ import { AlertEntry } from "./AlertProvider";
18
+ import { createContext } from "react";
19
+
20
+ export type AlertQueue = Omit<AlertEntry, "id">;
21
+
22
+ export interface AlertContextValue {
23
+ enqueueAlert: (entry: AlertQueue) => void;
24
+ enqueueInfoAlert: (entry: AlertQueue) => void;
25
+ enqueueSuccessAlert: (entry: AlertQueue) => void;
26
+ enqueueWarningAlert: (entry: AlertQueue) => void;
27
+ enqueueErrorAlert: (entry: AlertQueue) => void;
28
+ setAlertHeight: (id: string, height: number) => void;
29
+ alerts: AlertEntry[];
30
+ }
31
+
32
+ const AlertContext = createContext<AlertContextValue>({
33
+ enqueueAlert: entry => null,
34
+ enqueueInfoAlert: entry => null,
35
+ enqueueSuccessAlert: entry => null,
36
+ enqueueErrorAlert: entry => null,
37
+ enqueueWarningAlert: entry => null,
38
+ setAlertHeight: (id, height) => null,
39
+ alerts: []
40
+ });
41
+
42
+ export default AlertContext;
@@ -0,0 +1,173 @@
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
+ import React, { ReactNode, useRef, useState, useMemo } from "react";
18
+ import { createPortal } from "react-dom";
19
+ import { Placement, AlertContainer } from "../AlertContainer/AlertContainer";
20
+ import { generateID } from "../../../../util/helper";
21
+ import { AlertItem, Props as AlertComponentProps, Variant } from "../AlertItem/AlertItem";
22
+ import { useGetDomRoot } from "../../../../hooks/useGetDomRoot";
23
+ import AlertContext, { AlertContextValue } from "./AlertContext";
24
+
25
+ /** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */
26
+ interface Duration {
27
+ long: number;
28
+ short: number;
29
+ }
30
+
31
+ export interface Props {
32
+ closeButtonTitle: string;
33
+ children?: ReactNode;
34
+ placement?: Placement;
35
+ stackSize?: number;
36
+ domRoot?: HTMLElement;
37
+ autoHideDuration?: Duration;
38
+ className?: string;
39
+ }
40
+
41
+ export type AlertEntry = AlertComponentProps & { height?: number };
42
+
43
+ export const AlertProvider = ({
44
+ closeButtonTitle,
45
+ placement = { vertical: "bottom", horizontal: "center" },
46
+ autoHideDuration = { long: 8000, short: 4000 },
47
+ stackSize = 3,
48
+ domRoot,
49
+ children,
50
+ className
51
+ }: Props) => {
52
+ const [alertEntries, setAlertEntries] = useState<AlertEntry[]>([]);
53
+ const wrappingDivRef = useRef(null);
54
+ const { root } = useGetDomRoot(domRoot, wrappingDivRef);
55
+
56
+ const getDuration = (entry: Omit<AlertEntry, "id">) => {
57
+ if (entry.variant === "error") {
58
+ return autoHideDuration.long;
59
+ }
60
+ if (entry.actions?.length) {
61
+ return autoHideDuration.long;
62
+ }
63
+ return autoHideDuration.short;
64
+ };
65
+
66
+ const buildEntryWithVariant = (arg: Omit<AlertEntry, "id">, variant?: Variant): AlertEntry => {
67
+ let closeTitle = closeButtonTitle;
68
+ if (arg.closeButtonTitle) {
69
+ closeTitle = arg.closeButtonTitle;
70
+ }
71
+ return {
72
+ ...arg,
73
+ variant: variant ?? arg.variant,
74
+ id: generateID(15, arg.content ?? arg.title),
75
+ duration: arg.duration ?? getDuration(arg),
76
+ closeButtonTitle: closeTitle
77
+ };
78
+ };
79
+
80
+ const enqueueAlert = (arg: Omit<AlertEntry, "id">) => {
81
+ const newEntry = buildEntryWithVariant(arg);
82
+ setAlertEntries(entries => [...entries, newEntry]);
83
+ };
84
+
85
+ const enqueueInfoAlert: AlertContextValue["enqueueInfoAlert"] = arg => {
86
+ const newEntry: AlertEntry = buildEntryWithVariant(arg, "informative");
87
+ setAlertEntries(entries => [...entries, newEntry]);
88
+ };
89
+
90
+ const enqueueSuccessAlert: AlertContextValue["enqueueSuccessAlert"] = arg => {
91
+ const newEntry: AlertEntry = buildEntryWithVariant(arg, "success");
92
+ setAlertEntries(entries => [...entries, newEntry]);
93
+ };
94
+
95
+ const enqueueWarningAlert: AlertContextValue["enqueueWarningAlert"] = arg => {
96
+ const newEntry: AlertEntry = buildEntryWithVariant(arg, "warning");
97
+ setAlertEntries(entries => [...entries, newEntry]);
98
+ };
99
+
100
+ const enqueueErrorAlert: AlertContextValue["enqueueErrorAlert"] = arg => {
101
+ const newEntry: AlertEntry = buildEntryWithVariant(arg, "error");
102
+ setAlertEntries(entries => [...entries, newEntry]);
103
+ };
104
+
105
+ const setAlertHeight = (id: string, height: number) => {
106
+ const newAlertsState = alertEntries.map(alertEntry => {
107
+ if (alertEntry.id !== id) {
108
+ return alertEntry;
109
+ }
110
+ return { ...alertEntry, height };
111
+ });
112
+ setAlertEntries(newAlertsState);
113
+ };
114
+
115
+ const removeEntry = (entryId: string) => {
116
+ setAlertEntries(entries => {
117
+ return entries.filter((entry, idx) => {
118
+ if (idx < stackSize) {
119
+ entries[idx] = { ...entries[idx], wasShown: true };
120
+ }
121
+ return entry.id !== entryId;
122
+ });
123
+ });
124
+ };
125
+
126
+ const renderAlertList = (): ReactNode => {
127
+ return alertEntries.slice(0, stackSize).map(entry => (
128
+ <AlertItem
129
+ {...entry}
130
+ key={`${entry.id}`}
131
+ onClose={() => {
132
+ removeEntry(entry.id);
133
+ entry.onClose?.();
134
+ }}
135
+ />
136
+ ));
137
+ };
138
+
139
+ const contextValue = useMemo(
140
+ () => ({
141
+ enqueueAlert,
142
+ enqueueInfoAlert,
143
+ enqueueSuccessAlert,
144
+ enqueueErrorAlert,
145
+ enqueueWarningAlert,
146
+ setAlertHeight,
147
+ alerts: alertEntries
148
+ }),
149
+ [
150
+ enqueueAlert,
151
+ enqueueInfoAlert,
152
+ enqueueSuccessAlert,
153
+ enqueueErrorAlert,
154
+ enqueueWarningAlert,
155
+ setAlertHeight,
156
+ alertEntries
157
+ ]
158
+ );
159
+
160
+ return (
161
+ <AlertContext.Provider value={contextValue}>
162
+ {children}
163
+ <div ref={wrappingDivRef}>
164
+ {createPortal(
165
+ <AlertContainer placement={placement} className={className}>
166
+ {renderAlertList()}
167
+ </AlertContainer>,
168
+ root
169
+ )}
170
+ </div>
171
+ </AlertContext.Provider>
172
+ );
173
+ };
@@ -0,0 +1,30 @@
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
+ import { useContext } from "react";
18
+ import AlertContext from "./AlertProvider/AlertContext";
19
+
20
+ export const useAlert = () => {
21
+ const ctx = useContext(AlertContext);
22
+
23
+ return {
24
+ enqueueAlert: ctx.enqueueAlert,
25
+ enqueueInfoAlert: ctx.enqueueInfoAlert,
26
+ enqueueSuccessAlert: ctx.enqueueSuccessAlert,
27
+ enqueueWarningAlert: ctx.enqueueWarningAlert,
28
+ enqueueErrorAlert: ctx.enqueueErrorAlert
29
+ };
30
+ };
@@ -18,11 +18,17 @@ import React, { useContext, useEffect, useState } from "react";
18
18
  import classes from "./SnackbarContainer.module.scss";
19
19
  import { SnackbarContext } from "../SnackbarProvider/SnackbarStateProvider";
20
20
 
21
+ /**
22
+ * @deprecated
23
+ */
21
24
  export interface Placement {
22
25
  vertical: "top" | "bottom";
23
26
  horizontal: "start" | "center" | "end";
24
27
  }
25
28
 
29
+ /**
30
+ * @deprecated
31
+ */
26
32
  export interface Props {
27
33
  placement: Placement;
28
34
  children?: React.ReactNode;
@@ -66,6 +72,9 @@ const useSnackbarContainerHeightAnimation = () => {
66
72
  return { height, justifyContent };
67
73
  };
68
74
 
75
+ /**
76
+ * @deprecated
77
+ */
69
78
  export const SnackbarContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {
70
79
  const { height, justifyContent } = useSnackbarContainerHeightAnimation();
71
80
 
@@ -26,6 +26,9 @@ import { SnackbarContext } from "../SnackbarProvider/SnackbarStateProvider";
26
26
 
27
27
  const textColor = "var(--snackbar-text-color)";
28
28
 
29
+ /**
30
+ * @deprecated
31
+ */
29
32
  export interface Props {
30
33
  id: string;
31
34
  title?: string;
@@ -51,6 +54,9 @@ const useRegisterSnackbarHeight = (
51
54
  }, [singleSnackbarRef.current]);
52
55
  };
53
56
 
57
+ /**
58
+ * @deprecated
59
+ */
54
60
  export const SnackbarItem = ({
55
61
  id,
56
62
  title,
@@ -35,6 +35,9 @@ interface Duration {
35
35
  short: number;
36
36
  }
37
37
 
38
+ /**
39
+ * @deprecated
40
+ */
38
41
  export interface Props {
39
42
  closeButtonTitle: string;
40
43
  children?: ReactNode;
@@ -45,6 +48,9 @@ export interface Props {
45
48
  className?: string;
46
49
  }
47
50
 
51
+ /**
52
+ * @deprecated
53
+ */
48
54
  export interface Item {
49
55
  id: string;
50
56
  title?: string;
@@ -57,6 +63,9 @@ export interface Item {
57
63
  onClose?: () => void;
58
64
  }
59
65
 
66
+ /**
67
+ * @deprecated
68
+ */
60
69
  export const SnackbarProvider = (
61
70
  {
62
71
  closeButtonTitle,
@@ -18,6 +18,9 @@ import React, { createContext } from "react";
18
18
  import { DeprecatedEnqueueSnackbarType } from "../interfaces";
19
19
  import { Item } from "./SnackbarProvider";
20
20
 
21
+ /**
22
+ * @deprecated
23
+ */
21
24
  interface SnackbarContextProps {
22
25
  enqueueSnackbar: DeprecatedEnqueueSnackbarType;
23
26
  enqueueSuccessSnackbar: DeprecatedEnqueueSnackbarType;
@@ -27,6 +30,9 @@ interface SnackbarContextProps {
27
30
  snackbars: Item[];
28
31
  }
29
32
 
33
+ /**
34
+ * @deprecated
35
+ */
30
36
  const SnackbarContext = createContext<SnackbarContextProps>({
31
37
  enqueueSnackbar: () => null,
32
38
  enqueueSuccessSnackbar: () => null,
@@ -41,6 +47,9 @@ interface Props {
41
47
  children?: React.ReactNode;
42
48
  }
43
49
 
50
+ /**
51
+ * @deprecated
52
+ */
44
53
  const SnackbarContextProvider = ({ children, initialState }: Props) => {
45
54
  return <SnackbarContext.Provider value={initialState}>{children}</SnackbarContext.Provider>;
46
55
  };
@@ -16,10 +16,19 @@
16
16
 
17
17
  import { ButtonHTMLAttributes } from "react";
18
18
 
19
+ /**
20
+ * @deprecated
21
+ */
19
22
  export type Variant = "info" | "success" | "error" | "warning";
20
23
 
24
+ /**
25
+ * @deprecated
26
+ */
21
27
  export type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];
22
28
 
29
+ /**
30
+ * @deprecated
31
+ */
23
32
  export interface SnackbarOptionsProps {
24
33
  actions?: Actions;
25
34
  className?: string;
@@ -28,17 +37,26 @@ export interface SnackbarOptionsProps {
28
37
  onClose?: () => void;
29
38
  }
30
39
 
40
+ /**
41
+ * @deprecated
42
+ */
31
43
  export interface EnqueueSnackbarProps extends SnackbarOptionsProps {
32
44
  title?: string;
33
45
  content?: string;
34
46
  }
35
47
 
48
+ /**
49
+ * @deprecated
50
+ */
36
51
  export type DeprecatedEnqueueSnackbarType = (
37
52
  propsOrTitle: EnqueueSnackbarProps | string | undefined,
38
53
  content?: string,
39
54
  options?: SnackbarOptionsProps
40
55
  ) => void;
41
56
 
57
+ /**
58
+ * @deprecated
59
+ */
42
60
  export function isNewEnqueueSnackbarInterface(args: unknown): args is EnqueueSnackbarProps {
43
61
  return args !== null && typeof args === "object" && ("title" in args || "content" in args);
44
62
  }
@@ -17,6 +17,9 @@
17
17
  import { useContext } from "react";
18
18
  import { SnackbarContext } from "./SnackbarProvider/SnackbarStateProvider";
19
19
 
20
+ /**
21
+ * @deprecated
22
+ */
20
23
  export const useSnackbar = () => {
21
24
  const ctx = useContext(SnackbarContext);
22
25
 
@@ -16,8 +16,8 @@
16
16
 
17
17
  .pagination-wrapper {
18
18
  font-family: var(--font-family);
19
- font-size: var(--font-size);
20
- line-height: var(--default-line-height);
19
+ font-size: var(--font-size-data-grid);
20
+ line-height: var(--data-grid-line-height);
21
21
  color: var(--greyed-out);
22
22
  display: flex;
23
23
  flex-direction: column;
@@ -27,10 +27,6 @@
27
27
  display: flex;
28
28
  }
29
29
 
30
- label {
31
- margin-bottom: 0;
32
- }
33
-
34
30
  .form-element {
35
31
  height: 2.5rem;
36
32
 
@@ -77,6 +73,8 @@
77
73
  align-items: center;
78
74
 
79
75
  label {
76
+ font-size: var(--font-size-data-grid);
77
+ line-height: var(--data-grid-line-height);
80
78
  font-weight: 500;
81
79
  color: var(--color-blue-grey900);
82
80
  }
@@ -102,7 +102,9 @@ const PaginationComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
102
102
  <div className={classes["left"]}>
103
103
  {pageSize && (
104
104
  <div className={classes["per-page"]}>
105
- <Label id="page-size-select-label">{translate.itemsPerPage}</Label>
105
+ <Label id="page-size-select-label" className={classes["label"]}>
106
+ {translate.itemsPerPage}
107
+ </Label>
106
108
  <Select
107
109
  labeledBy="page-size-select-label"
108
110
  className={`${classes["form-element"]} ${classes["page-size-select"]}`}