@onewelcome/react-lib-components 6.7.1 → 7.0.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 (387) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/DataGrid/DataGrid.cjs.js +1 -1
  3. package/dist/cjs/DataGrid/DataGrid.cjs.js.map +1 -1
  4. package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
  5. package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
  6. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +2 -0
  7. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -0
  8. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.cjs.js +2 -0
  9. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js +2 -0
  10. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js.map +1 -0
  11. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.cjs.js +2 -0
  12. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.cjs.js.map +1 -0
  13. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js +2 -0
  14. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js.map +1 -0
  15. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.cjs.js +2 -0
  16. package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.cjs.js.map +1 -0
  17. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +2 -0
  18. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -0
  19. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.cjs.js +2 -0
  20. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.cjs.js +2 -0
  21. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -0
  22. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.cjs.js +2 -0
  23. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.cjs.js.map +1 -0
  24. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +2 -0
  25. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -0
  26. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +2 -0
  27. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -0
  28. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +2 -0
  29. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -0
  30. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js +2 -0
  31. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -0
  32. package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +2 -0
  33. package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -0
  34. package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.cjs.js +2 -0
  35. package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.cjs.js.map +1 -0
  36. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
  37. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
  38. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  39. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +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.cjs.js +1 -1
  43. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  44. package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  45. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
  46. package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
  47. package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
  48. package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
  49. package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js +1 -1
  50. package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
  51. package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
  52. package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
  53. package/dist/cjs/Icon/Icon.cjs.js +1 -1
  54. package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
  55. package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
  56. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +1 -1
  57. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -1
  58. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +1 -1
  59. package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js +1 -1
  60. package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -1
  61. package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
  62. package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
  63. package/dist/cjs/Popover/Popover.cjs.js +1 -1
  64. package/dist/cjs/Popover/Popover.cjs.js.map +1 -1
  65. package/dist/cjs/Tag/RemoveButton.module.cjs.js +1 -1
  66. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
  67. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  68. package/dist/cjs/src/components/DataGrid/DataGrid.d.ts +6 -0
  69. package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.d.ts +5 -0
  70. package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.d.ts +6 -0
  71. package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridRow.d.ts → DataGridRow/DataGridRow.d.ts} +8 -1
  72. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilter.d.ts +15 -0
  73. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.d.ts +22 -0
  74. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterService.d.ts +15 -0
  75. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterTag.d.ts +12 -0
  76. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +57 -0
  77. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridToolbar.d.ts +13 -0
  78. package/dist/cjs/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
  79. package/dist/cjs/src/components/DataGrid/testUtils.d.ts +13 -0
  80. package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +2 -1
  81. package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +2 -3
  82. package/dist/cjs/src/components/Form/Select/MultiSelect/useSearch.d.ts +2 -12
  83. package/dist/cjs/src/components/Form/Select/Select.interfaces.d.ts +1 -11
  84. package/dist/cjs/src/components/Form/Select/SingleSelect/Select.test.d.ts +2 -3
  85. package/dist/cjs/src/components/Form/Select/SingleSelect/useSearch.d.ts +2 -12
  86. package/dist/cjs/src/components/Form/Select/useSelectPositionList.d.ts +2 -2
  87. package/dist/cjs/src/components/Icon/Icon.d.ts +2 -1
  88. package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +0 -26
  89. package/dist/cjs/src/hooks/useFullHeightCollapse.cjs.js +2 -0
  90. package/dist/cjs/src/hooks/useFullHeightCollapse.cjs.js.map +1 -0
  91. package/dist/cjs/src/hooks/useFullHeightCollapse.d.ts +4 -0
  92. package/dist/cjs/src/hooks/usePosition.cjs.js +1 -1
  93. package/dist/cjs/src/hooks/usePosition.cjs.js.map +1 -1
  94. package/dist/cjs/src/index.cjs.js +1 -1
  95. package/dist/cjs/src/index.d.ts +7 -21
  96. package/dist/esm/DataGrid/DataGrid.esm.js +1 -1
  97. package/dist/esm/DataGrid/DataGrid.esm.js.map +1 -1
  98. package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js +1 -1
  99. package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js.map +1 -1
  100. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js +2 -0
  101. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js.map +1 -0
  102. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.esm.js +2 -0
  103. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js +2 -0
  104. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js.map +1 -0
  105. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.esm.js +2 -0
  106. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.esm.js.map +1 -0
  107. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js +2 -0
  108. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js.map +1 -0
  109. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.esm.js +2 -0
  110. package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.esm.js.map +1 -0
  111. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js +2 -0
  112. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js.map +1 -0
  113. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.esm.js +2 -0
  114. package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js +2 -0
  115. package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js.map +1 -0
  116. package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.esm.js +2 -0
  117. package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.esm.js.map +1 -0
  118. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js +2 -0
  119. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js.map +1 -0
  120. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterService.esm.js +2 -0
  121. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterService.esm.js.map +1 -0
  122. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js +2 -0
  123. package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js.map +1 -0
  124. package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js +2 -0
  125. package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js.map +1 -0
  126. package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js +2 -0
  127. package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js.map +1 -0
  128. package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.esm.js +2 -0
  129. package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.esm.js.map +1 -0
  130. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
  131. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
  132. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
  133. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
  134. package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
  135. package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
  136. package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
  137. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +1 -1
  138. package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
  139. package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js +1 -1
  140. package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js.map +1 -1
  141. package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js +1 -1
  142. package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -1
  143. package/dist/esm/Form/Select/SingleSelect/Select.esm.js +1 -1
  144. package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
  145. package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js +1 -1
  146. package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js.map +1 -1
  147. package/dist/esm/Icon/Icon.esm.js +1 -1
  148. package/dist/esm/Icon/Icon.esm.js.map +1 -1
  149. package/dist/esm/Icon/Icon.module.esm.js +1 -1
  150. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +1 -1
  151. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -1
  152. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +1 -1
  153. package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js +1 -1
  154. package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js.map +1 -1
  155. package/dist/esm/Pagination/Pagination.esm.js +1 -1
  156. package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
  157. package/dist/esm/Popover/Popover.esm.js +1 -1
  158. package/dist/esm/Popover/Popover.esm.js.map +1 -1
  159. package/dist/esm/Tag/RemoveButton.module.esm.js +1 -1
  160. package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
  161. package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
  162. package/dist/esm/src/components/DataGrid/DataGrid.d.ts +6 -0
  163. package/dist/esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.d.ts +5 -0
  164. package/dist/esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.d.ts +6 -0
  165. package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridRow.d.ts → DataGridRow/DataGridRow.d.ts} +8 -1
  166. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilter.d.ts +15 -0
  167. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.d.ts +22 -0
  168. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterService.d.ts +15 -0
  169. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterTag.d.ts +12 -0
  170. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +57 -0
  171. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridToolbar.d.ts +13 -0
  172. package/dist/esm/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
  173. package/dist/esm/src/components/DataGrid/testUtils.d.ts +13 -0
  174. package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +2 -1
  175. package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +2 -3
  176. package/dist/esm/src/components/Form/Select/MultiSelect/useSearch.d.ts +2 -12
  177. package/dist/esm/src/components/Form/Select/Select.interfaces.d.ts +1 -11
  178. package/dist/esm/src/components/Form/Select/SingleSelect/Select.test.d.ts +2 -3
  179. package/dist/esm/src/components/Form/Select/SingleSelect/useSearch.d.ts +2 -12
  180. package/dist/esm/src/components/Form/Select/useSelectPositionList.d.ts +2 -2
  181. package/dist/esm/src/components/Icon/Icon.d.ts +2 -1
  182. package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +0 -26
  183. package/dist/esm/src/hooks/useFullHeightCollapse.d.ts +4 -0
  184. package/dist/esm/src/hooks/useFullHeightCollapse.esm.js +2 -0
  185. package/dist/esm/src/hooks/useFullHeightCollapse.esm.js.map +1 -0
  186. package/dist/esm/src/hooks/usePosition.esm.js +1 -1
  187. package/dist/esm/src/hooks/usePosition.esm.js.map +1 -1
  188. package/dist/esm/src/index.d.ts +7 -21
  189. package/dist/esm/src/index.esm.js +1 -1
  190. package/package.json +50 -49
  191. package/src/components/DataGrid/DataGrid.tsx +24 -10
  192. package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +2 -2
  193. package/src/components/DataGrid/DataGridBody/{DataGridCell.module.scss → DataGridCell/DataGridCell.module.scss} +2 -2
  194. package/src/components/DataGrid/DataGridBody/{DataGridCell.tsx → DataGridCell/DataGridCell.tsx} +1 -1
  195. package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss +60 -0
  196. package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.tsx +39 -0
  197. package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss +21 -0
  198. package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx +47 -0
  199. package/src/components/DataGrid/DataGridBody/{DataGridRow.module.scss → DataGridRow/DataGridRow.module.scss} +17 -1
  200. package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +122 -0
  201. package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +4 -4
  202. package/src/components/DataGrid/DataGridFilters/DataGridFilter.module.scss +105 -0
  203. package/src/components/DataGrid/DataGridFilters/DataGridFilter.tsx +150 -0
  204. package/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.tsx +181 -0
  205. package/src/components/DataGrid/DataGridFilters/DataGridFilterService.ts +97 -0
  206. package/src/components/DataGrid/DataGridFilters/DataGridFilterTag.tsx +91 -0
  207. package/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.ts +84 -0
  208. package/src/components/{Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss → DataGrid/DataGridFilters/DataGridToolbar.module.scss} +27 -34
  209. package/src/components/DataGrid/DataGridFilters/DataGridToolbar.tsx +126 -0
  210. package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +6 -1
  211. package/src/components/DataGrid/testUtils.ts +77 -0
  212. package/src/components/Form/FileUpload/FileItem/FileItem.tsx +5 -8
  213. package/src/components/Form/FileUpload/FileUpload.module.scss +9 -4
  214. package/src/components/Form/FileUpload/FileUpload.tsx +34 -15
  215. package/src/components/Form/Select/MultiSelect/MultiOption.tsx +4 -2
  216. package/src/components/Form/Select/MultiSelect/MultiSelect.tsx +1 -5
  217. package/src/components/Form/Select/MultiSelect/useSearch.tsx +6 -16
  218. package/src/components/Form/Select/Select.interfaces.ts +1 -9
  219. package/src/components/Form/Select/SingleSelect/Select.tsx +1 -5
  220. package/src/components/Form/Select/SingleSelect/useSearch.tsx +6 -18
  221. package/src/components/Icon/Icon.module.scss +5 -0
  222. package/src/components/Icon/Icon.tsx +2 -1
  223. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +12 -15
  224. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +3 -5
  225. package/src/components/Notifications/NotificationProvider/NotificationContext.tsx +12 -16
  226. package/src/components/Pagination/Pagination.tsx +15 -6
  227. package/src/components/Popover/Popover.tsx +1 -1
  228. package/src/components/Tag/RemoveButton.module.scss +1 -0
  229. package/src/components/_BaseStyling_/BaseStyling.tsx +0 -36
  230. package/src/font/icomoon.eot +0 -0
  231. package/src/font/icomoon.svg +1 -0
  232. package/src/font/icomoon.ttf +0 -0
  233. package/src/font/icomoon.woff +0 -0
  234. package/src/font/selection.json +1 -1
  235. package/src/{components/Notifications/Snackbar/useSnackbar.ts → hooks/useFullHeightCollapse.ts} +12 -11
  236. package/src/hooks/usePosition.ts +3 -4
  237. package/src/index.ts +7 -25
  238. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js +0 -2
  239. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js.map +0 -1
  240. package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +0 -2
  241. package/dist/cjs/DataGrid/DataGridBody/DataGridRow.cjs.js +0 -2
  242. package/dist/cjs/DataGrid/DataGridBody/DataGridRow.cjs.js.map +0 -1
  243. package/dist/cjs/DataGrid/DataGridBody/DataGridRow.module.cjs.js +0 -2
  244. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js +0 -2
  245. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +0 -1
  246. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.cjs.js +0 -2
  247. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.cjs.js.map +0 -1
  248. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js +0 -2
  249. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +0 -1
  250. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.cjs.js +0 -2
  251. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.cjs.js.map +0 -1
  252. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js +0 -2
  253. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +0 -1
  254. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js +0 -2
  255. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +0 -1
  256. package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js +0 -2
  257. package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +0 -1
  258. package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js +0 -2
  259. package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +0 -1
  260. package/dist/cjs/StatusIndicator/StatusIndicator.cjs.js +0 -2
  261. package/dist/cjs/StatusIndicator/StatusIndicator.cjs.js.map +0 -1
  262. package/dist/cjs/StatusIndicator/StatusIndicator.module.cjs.js +0 -2
  263. package/dist/cjs/StatusIndicator/StatusIndicator.module.cjs.js.map +0 -1
  264. package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.cjs.js +0 -2
  265. package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.cjs.js.map +0 -1
  266. package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.module.cjs.js +0 -2
  267. package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.module.cjs.js.map +0 -1
  268. package/dist/cjs/Wizard/Wizard.cjs.js +0 -2
  269. package/dist/cjs/Wizard/Wizard.cjs.js.map +0 -1
  270. package/dist/cjs/Wizard/WizardActions/WizardActions.cjs.js +0 -2
  271. package/dist/cjs/Wizard/WizardActions/WizardActions.cjs.js.map +0 -1
  272. package/dist/cjs/Wizard/WizardStateProvider.cjs.js +0 -2
  273. package/dist/cjs/Wizard/WizardStateProvider.cjs.js.map +0 -1
  274. package/dist/cjs/Wizard/WizardSteps/WizardSteps.cjs.js +0 -2
  275. package/dist/cjs/Wizard/WizardSteps/WizardSteps.cjs.js.map +0 -1
  276. package/dist/cjs/Wizard/wizardStateReducer.cjs.js +0 -2
  277. package/dist/cjs/Wizard/wizardStateReducer.cjs.js.map +0 -1
  278. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -21
  279. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +0 -20
  280. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +0 -39
  281. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +0 -27
  282. package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +0 -36
  283. package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +0 -9
  284. package/dist/cjs/src/components/StatusIndicator/StatusIndicator.d.ts +0 -9
  285. package/dist/cjs/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -12
  286. package/dist/cjs/src/components/Wizard/Wizard.d.ts +0 -11
  287. package/dist/cjs/src/components/Wizard/WizardActions/WizardActions.d.ts +0 -25
  288. package/dist/cjs/src/components/Wizard/WizardStateProvider.d.ts +0 -15
  289. package/dist/cjs/src/components/Wizard/WizardSteps/WizardSteps.d.ts +0 -8
  290. package/dist/cjs/src/components/Wizard/WizardSteps/WizardSteps.test.d.ts +0 -1
  291. package/dist/cjs/src/components/Wizard/wizardStateReducer.d.ts +0 -24
  292. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +0 -2
  293. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +0 -1
  294. package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +0 -2
  295. package/dist/esm/DataGrid/DataGridBody/DataGridRow.esm.js +0 -2
  296. package/dist/esm/DataGrid/DataGridBody/DataGridRow.esm.js.map +0 -1
  297. package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +0 -2
  298. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js +0 -2
  299. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +0 -1
  300. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.esm.js +0 -2
  301. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.esm.js.map +0 -1
  302. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js +0 -2
  303. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +0 -1
  304. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.esm.js +0 -2
  305. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.esm.js.map +0 -1
  306. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js +0 -2
  307. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +0 -1
  308. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js +0 -2
  309. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +0 -1
  310. package/dist/esm/Notifications/Snackbar/interfaces.esm.js +0 -2
  311. package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +0 -1
  312. package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js +0 -2
  313. package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +0 -1
  314. package/dist/esm/StatusIndicator/StatusIndicator.esm.js +0 -2
  315. package/dist/esm/StatusIndicator/StatusIndicator.esm.js.map +0 -1
  316. package/dist/esm/StatusIndicator/StatusIndicator.module.esm.js +0 -2
  317. package/dist/esm/StatusIndicator/StatusIndicator.module.esm.js.map +0 -1
  318. package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.esm.js +0 -2
  319. package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.esm.js.map +0 -1
  320. package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.module.esm.js +0 -2
  321. package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.module.esm.js.map +0 -1
  322. package/dist/esm/Wizard/Wizard.esm.js +0 -2
  323. package/dist/esm/Wizard/Wizard.esm.js.map +0 -1
  324. package/dist/esm/Wizard/WizardActions/WizardActions.esm.js +0 -2
  325. package/dist/esm/Wizard/WizardActions/WizardActions.esm.js.map +0 -1
  326. package/dist/esm/Wizard/WizardStateProvider.esm.js +0 -2
  327. package/dist/esm/Wizard/WizardStateProvider.esm.js.map +0 -1
  328. package/dist/esm/Wizard/WizardSteps/WizardSteps.esm.js +0 -2
  329. package/dist/esm/Wizard/WizardSteps/WizardSteps.esm.js.map +0 -1
  330. package/dist/esm/Wizard/wizardStateReducer.esm.js +0 -2
  331. package/dist/esm/Wizard/wizardStateReducer.esm.js.map +0 -1
  332. package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -21
  333. package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts +0 -1
  334. package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +0 -20
  335. package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts +0 -1
  336. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +0 -39
  337. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts +0 -1
  338. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +0 -27
  339. package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +0 -36
  340. package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +0 -9
  341. package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.test.d.ts +0 -1
  342. package/dist/esm/src/components/StatusIndicator/StatusIndicator.d.ts +0 -9
  343. package/dist/esm/src/components/StatusIndicator/StatusIndicator.test.d.ts +0 -1
  344. package/dist/esm/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -12
  345. package/dist/esm/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts +0 -1
  346. package/dist/esm/src/components/Wizard/Wizard.d.ts +0 -11
  347. package/dist/esm/src/components/Wizard/Wizard.test.d.ts +0 -1
  348. package/dist/esm/src/components/Wizard/WizardActions/WizardActions.d.ts +0 -25
  349. package/dist/esm/src/components/Wizard/WizardActions/WizardActions.test.d.ts +0 -1
  350. package/dist/esm/src/components/Wizard/WizardStateProvider.d.ts +0 -15
  351. package/dist/esm/src/components/Wizard/WizardSteps/WizardSteps.d.ts +0 -8
  352. package/dist/esm/src/components/Wizard/WizardSteps/WizardSteps.test.d.ts +0 -1
  353. package/dist/esm/src/components/Wizard/wizardStateReducer.d.ts +0 -24
  354. package/src/components/DataGrid/DataGridBody/DataGridRow.tsx +0 -58
  355. package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +0 -92
  356. package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +0 -156
  357. package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +0 -161
  358. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +0 -219
  359. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +0 -57
  360. package/src/components/Notifications/Snackbar/interfaces.ts +0 -62
  361. package/src/components/StatusIndicator/StatusIndicator.module.scss +0 -43
  362. package/src/components/StatusIndicator/StatusIndicator.tsx +0 -44
  363. package/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +0 -214
  364. package/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +0 -93
  365. package/src/components/Wizard/Wizard.tsx +0 -67
  366. package/src/components/Wizard/WizardActions/WizardActions.tsx +0 -116
  367. package/src/components/Wizard/WizardStateProvider.tsx +0 -45
  368. package/src/components/Wizard/WizardSteps/WizardSteps.tsx +0 -54
  369. package/src/components/Wizard/wizardStateReducer.ts +0 -61
  370. /package/dist/cjs/DataGrid/DataGridBody/{DataGridCell.module.cjs.js.map → DataGridCell/DataGridCell.module.cjs.js.map} +0 -0
  371. /package/dist/cjs/DataGrid/DataGridBody/{DataGridRow.module.cjs.js.map → DataGridRow/DataGridRow.module.cjs.js.map} +0 -0
  372. /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridCell.d.ts → DataGridCell/DataGridCell.d.ts} +0 -0
  373. /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridCell.test.d.ts → DataGridCell/DataGridCell.test.d.ts} +0 -0
  374. /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridRow.test.d.ts → DataGridDrawer/DataGridDrawerItem.test.d.ts} +0 -0
  375. /package/dist/{esm/src/components/DataGrid/DataGridBody → cjs/src/components/DataGrid/DataGridBody/DataGridRow}/DataGridRow.test.d.ts +0 -0
  376. /package/dist/cjs/src/components/{Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts → DataGrid/DataGridFilters/DataGridFilterTag.test.d.ts} +0 -0
  377. /package/dist/cjs/src/components/{Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts → DataGrid/DataGridFilters/DataGridToolbar.test.d.ts} +0 -0
  378. /package/dist/cjs/src/{components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts → hooks/useFullHeightCollapse.test.d.ts} +0 -0
  379. /package/dist/esm/DataGrid/DataGridBody/{DataGridCell.module.esm.js.map → DataGridCell/DataGridCell.module.esm.js.map} +0 -0
  380. /package/dist/esm/DataGrid/DataGridBody/{DataGridRow.module.esm.js.map → DataGridRow/DataGridRow.module.esm.js.map} +0 -0
  381. /package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridCell.d.ts → DataGridCell/DataGridCell.d.ts} +0 -0
  382. /package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridCell.test.d.ts → DataGridCell/DataGridCell.test.d.ts} +0 -0
  383. /package/dist/{cjs/src/components/Notifications/Snackbar/useSnackbar.test.d.ts → esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.test.d.ts} +0 -0
  384. /package/dist/{cjs/src/components/StatusIndicator/StatusIndicator.test.d.ts → esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.test.d.ts} +0 -0
  385. /package/dist/{cjs/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts → esm/src/components/DataGrid/DataGridFilters/DataGridFilterTag.test.d.ts} +0 -0
  386. /package/dist/{cjs/src/components/Wizard/Wizard.test.d.ts → esm/src/components/DataGrid/DataGridFilters/DataGridToolbar.test.d.ts} +0 -0
  387. /package/dist/{cjs/src/components/Wizard/WizardActions/WizardActions.test.d.ts → esm/src/hooks/useFullHeightCollapse.test.d.ts} +0 -0
@@ -1,214 +0,0 @@
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
- @mixin clickable-element {
18
- &:enabled:hover,
19
- &:focus,
20
- &:enabled:active {
21
- cursor: pointer;
22
-
23
- .number-wrapper {
24
- .number {
25
- background-color: var(--color-primary);
26
- color: var(--light);
27
- }
28
- }
29
-
30
- .label {
31
- text-decoration: underline;
32
- }
33
- }
34
-
35
- &:enabled:active {
36
- .number-wrapper {
37
- .number {
38
- border: none;
39
- margin: 2px;
40
- }
41
- }
42
- }
43
- }
44
-
45
- @mixin disabled-element {
46
- &:disabled {
47
- .number-wrapper {
48
- .number {
49
- border: 2px solid var(--disabled);
50
- color: var(--disabled);
51
- }
52
- }
53
-
54
- .label {
55
- color: var(--greyed-out);
56
- }
57
- }
58
- }
59
-
60
- .wizard {
61
- padding: 1rem;
62
- display: flex;
63
- }
64
-
65
- .wizard-element {
66
- display: flex;
67
- flex: 1;
68
- flex-direction: column;
69
- background-color: transparent;
70
- border: 0;
71
- align-items: stretch;
72
- padding: 0;
73
- margin: 0;
74
-
75
- &:focus-visible {
76
- outline: 1px dashed var(--color-primary);
77
- outline-offset: 1px;
78
- }
79
-
80
- // Completed/finished state
81
- &.finished {
82
- .number-wrapper {
83
- .number {
84
- border: 2px solid var(--color-primary);
85
- color: var(--color-primary);
86
- font-weight: normal;
87
- }
88
-
89
- &:before,
90
- &:after {
91
- border-bottom: 2px solid var(--color-primary);
92
- }
93
- }
94
-
95
- .label {
96
- color: var(--color-primary);
97
- }
98
- @include disabled-element;
99
- @include clickable-element;
100
- }
101
-
102
- //Active/current step
103
- &.current {
104
- .number-wrapper {
105
- .number {
106
- color: var(--light);
107
- border: 2px solid var(--color-primary);
108
- background-color: var(--color-primary);
109
- }
110
-
111
- &:before {
112
- border-bottom: 2px solid var(--color-primary);
113
- }
114
- }
115
-
116
- .label {
117
- font-weight: 700;
118
- color: var(--color-primary);
119
- }
120
-
121
- .two-line-text-overflow {
122
- display: unset;
123
- }
124
- }
125
-
126
- //Future state for clickable elements - future state is a default one
127
- &.future.clickable {
128
- .number-wrapper {
129
- .number {
130
- border: 2px solid var(--color-primary);
131
- color: var(--color-primary);
132
- }
133
- }
134
-
135
- .label {
136
- color: var(--color-primary);
137
- }
138
-
139
- @include clickable-element;
140
- @include disabled-element;
141
- }
142
-
143
- &:first-child {
144
- .number-wrapper:before {
145
- border-bottom: none;
146
- }
147
- }
148
-
149
- &:last-child {
150
- .number-wrapper:after {
151
- border-bottom: none;
152
- }
153
- }
154
- }
155
-
156
- .number-wrapper {
157
- display: flex;
158
- flex-direction: row;
159
-
160
- &:after,
161
- &:before {
162
- content: " ";
163
- margin-bottom: 0.8125rem;
164
- width: 100%;
165
- border-bottom: 2px solid var(--greyed-out);
166
- }
167
- }
168
-
169
- .number {
170
- font-family: var(--font-family);
171
- font-size: 1rem;
172
- font-weight: normal;
173
- display: flex;
174
- align-items: center;
175
- justify-content: center;
176
- border: 2px solid var(--wizard-step-indicator-future-color);
177
- border-radius: 50%;
178
- min-width: 1.5rem;
179
- min-height: 1.5rem;
180
- width: 1.5rem;
181
- height: 1.5rem;
182
- color: var(--wizard-step-indicator-future-color);
183
- line-height: var(--default-line-height);
184
- background-color: var(--light);
185
- box-sizing: content-box;
186
- }
187
-
188
- .two-line-text-overflow {
189
- max-height: 2rem;
190
- display: none;
191
- -webkit-line-clamp: 2;
192
- -webkit-box-orient: vertical;
193
- overflow: hidden;
194
- padding: 0.25rem 1rem 0;
195
- }
196
-
197
- .label {
198
- font-family: var(--font-family);
199
- font-size: 0.75rem;
200
- line-height: 1rem;
201
- overflow: hidden;
202
- color: var(--default);
203
- text-align: center;
204
- }
205
-
206
- .checkmark {
207
- font-size: 0.875rem;
208
- }
209
-
210
- @media only screen and (min-width: 30em) {
211
- .two-line-text-overflow {
212
- display: unset;
213
- }
214
- }
@@ -1,93 +0,0 @@
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, { ForwardRefRenderFunction, ComponentPropsWithRef, Fragment } from "react";
18
- import classes from "./BaseWizardSteps.module.scss";
19
- import { Icon, Icons } from "../../Icon/Icon";
20
-
21
- type StepState = "finished" | "current" | "future";
22
-
23
- export interface Step {
24
- label: string;
25
- disabled?: boolean;
26
- }
27
-
28
- export interface Props extends Omit<ComponentPropsWithRef<"div">, "onClick"> {
29
- steps: Step[];
30
- currentStepNo: number;
31
- onClick?: (stepNo: number) => void;
32
- futureStepsClickable?: boolean;
33
- }
34
-
35
- const BaseWizardStepsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
36
- { steps, currentStepNo, onClick, futureStepsClickable = false, ...rest }: Props,
37
- ref
38
- ) => {
39
- const getStepState = (stepNo: number): StepState => {
40
- if (currentStepNo === stepNo) {
41
- return "current";
42
- } else if (stepNo < currentStepNo) {
43
- return "finished";
44
- }
45
- return "future";
46
- };
47
-
48
- const getStepContent = (stepState: StepState, index: number, disabled?: boolean) => {
49
- const stepNumberString = String(index + 1);
50
- if (stepState === "finished") {
51
- return disabled ? null : <Icon className={classes["checkmark"]} icon={Icons.Checkmark} />;
52
- } else {
53
- return <Fragment>{stepNumberString}</Fragment>;
54
- }
55
- };
56
-
57
- const generatedSteps = steps.map((step, index) => {
58
- const stepState = getStepState(index);
59
- const disabledStyleClassName = step.disabled ? classes["disabled"] : "";
60
- const clickableClassName = futureStepsClickable ? classes["clickable"] : "";
61
-
62
- return (
63
- <button
64
- key={step.label.toLowerCase().replace(/\s/, "-")}
65
- disabled={
66
- step.disabled ||
67
- (stepState === "future" && !futureStepsClickable) ||
68
- stepState === "current"
69
- }
70
- aria-current={stepState === "current" ? "step" : undefined}
71
- onClick={() => onClick?.(index)}
72
- className={`${classes["wizard-element"]} ${classes[stepState]} ${clickableClassName} ${disabledStyleClassName}`}
73
- >
74
- <div className={classes["number-wrapper"]}>
75
- <span className={classes["number"]}>
76
- {getStepContent(stepState, index, step.disabled)}
77
- </span>
78
- </div>
79
- <div className={classes["two-line-text-overflow"]}>
80
- <span className={classes["label"]}>{step.label}</span>
81
- </div>
82
- </button>
83
- );
84
- });
85
-
86
- return (
87
- <div {...rest} ref={ref} className={classes["wizard"]}>
88
- {generatedSteps}
89
- </div>
90
- );
91
- };
92
-
93
- export const BaseWizardSteps = React.forwardRef(BaseWizardStepsComponent);
@@ -1,67 +0,0 @@
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, { Fragment, useContext, useEffect } from "react";
18
- import { Step } from "./BaseWizardSteps/BaseWizardSteps";
19
- import { WizardStateContext, WizardStateProvider } from "./WizardStateProvider";
20
- import { setWizardState } from "./wizardStateReducer";
21
-
22
- export type WizardMode = "add" | "edit";
23
-
24
- export interface Props {
25
- steps: Step[];
26
- mode: WizardMode;
27
- initialStepNo?: number;
28
- onStepChange: (stepNo: number) => void;
29
- children: React.ReactNode;
30
- }
31
-
32
- const useSetWizardState = (steps: Step[], mode: WizardMode) => {
33
- const { dispatch } = useContext(WizardStateContext);
34
-
35
- useEffect(() => {
36
- dispatch(setWizardState(steps, mode));
37
- }, [steps, mode]);
38
- };
39
-
40
- const useStepChanging = (onStepChange: (stepNo: number) => void) => {
41
- const {
42
- state: { currentStepNo }
43
- } = useContext(WizardStateContext);
44
-
45
- useEffect(() => {
46
- onStepChange(currentStepNo);
47
- }, [currentStepNo]);
48
- };
49
-
50
- /**
51
- * @deprecated
52
- */
53
- const WizardContent = ({ steps, mode, onStepChange, children }: Props) => {
54
- useSetWizardState(steps, mode);
55
- useStepChanging(onStepChange);
56
-
57
- return <Fragment>{children}</Fragment>;
58
- };
59
-
60
- export const Wizard = (props: Props) => {
61
- const { steps, initialStepNo: currentStepNo = 0, mode } = props;
62
- return (
63
- <WizardStateProvider initialState={{ steps, currentStepNo, mode }}>
64
- <WizardContent {...props} />
65
- </WizardStateProvider>
66
- );
67
- };
@@ -1,116 +0,0 @@
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, { Fragment, useContext, useMemo } from "react";
18
- import { Button, Props as ButtonProps } from "../../Button/Button";
19
- import { Step } from "../BaseWizardSteps/BaseWizardSteps";
20
- import { WizardMode } from "../Wizard";
21
- import { WizardStateContext } from "../WizardStateProvider";
22
- import { changeCurrentStepNo } from "../wizardStateReducer";
23
-
24
- export interface Props extends React.HTMLProps<HTMLDivElement> {
25
- actions: {
26
- previous: {
27
- label: string;
28
- onClick: () => void;
29
- previousButtonProps?: ButtonProps;
30
- };
31
- next: {
32
- label: string;
33
- onClick: (currentStepNo: number) => boolean;
34
- nextButtonProps?: ButtonProps;
35
- };
36
- saveAndClose: {
37
- label: string;
38
- onClick: (currentStepNo: number) => void;
39
- saveAndCloseButtonProps?: ButtonProps;
40
- };
41
- };
42
- }
43
-
44
- const calculateNextStepNo = (steps: Step[], currentStepNo: number) => () =>
45
- steps.findIndex((step, stepNo) => stepNo > currentStepNo && !step.disabled);
46
-
47
- const calculatePrevStepNo = (steps: Step[], currentStepNo: number) => () => {
48
- const reversedCurrentStepNo = steps.length - 1 - currentStepNo;
49
- const reversedPrevStepNo = [...steps]
50
- .reverse()
51
- .findIndex((step, stepNo) => stepNo > reversedCurrentStepNo && !step.disabled);
52
- if (reversedPrevStepNo > 0) {
53
- return steps.length - 1 - reversedPrevStepNo;
54
- }
55
- return -1;
56
- };
57
-
58
- const useNextStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>
59
- useMemo(calculateNextStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);
60
-
61
- const usePreviousStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>
62
- useMemo(calculatePrevStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);
63
-
64
- /**
65
- * @deprecated
66
- */
67
- export const WizardActions = ({ actions }: Props) => {
68
- const {
69
- state: { mode, steps, currentStepNo },
70
- dispatch
71
- } = useContext(WizardStateContext);
72
- const nextStepNo = useNextStepNo(mode, currentStepNo, steps);
73
- const hasNextStep = nextStepNo !== -1;
74
- const previousStepNo = usePreviousStepNo(mode, currentStepNo, steps);
75
- const hasPreviousStep = previousStepNo !== -1;
76
- const isLastStepOrEditMode = !hasNextStep || mode === "edit";
77
-
78
- const changeStepNo = (direction: "forward" | "backward") => {
79
- if (direction === "forward") {
80
- hasNextStep && dispatch(changeCurrentStepNo(nextStepNo));
81
- } else {
82
- hasPreviousStep && dispatch(changeCurrentStepNo(previousStepNo));
83
- }
84
- };
85
-
86
- const onNextWrapper = () => {
87
- actions.next.onClick(currentStepNo) && changeStepNo("forward");
88
- };
89
-
90
- const onPreviousWrapper = () => {
91
- actions.previous.onClick?.();
92
- changeStepNo("backward");
93
- };
94
-
95
- const onSaveAndCloseWrapper = () => {
96
- actions.saveAndClose.onClick(currentStepNo);
97
- };
98
-
99
- return (
100
- <Fragment>
101
- {hasPreviousStep && (
102
- <Button variant="outline" onClick={onPreviousWrapper}>
103
- {actions.previous.label}
104
- </Button>
105
- )}
106
- {hasNextStep && (
107
- <Button variant={mode === "edit" ? "outline" : "fill"} onClick={onNextWrapper}>
108
- {actions.next.label}
109
- </Button>
110
- )}
111
- {isLastStepOrEditMode && (
112
- <Button onClick={onSaveAndCloseWrapper}>{actions.saveAndClose.label}</Button>
113
- )}
114
- </Fragment>
115
- );
116
- };
@@ -1,45 +0,0 @@
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, { createContext, Dispatch, useReducer } from "react";
18
- import { WizardActions, WizardStateType, reducer } from "./wizardStateReducer";
19
-
20
- const WizardStateContext = createContext<{
21
- state: WizardStateType;
22
- dispatch: Dispatch<WizardActions>;
23
- }>({
24
- state: {} as WizardStateType,
25
- dispatch: () => null
26
- });
27
-
28
- export interface Props {
29
- initialState: WizardStateType;
30
- children?: React.ReactNode;
31
- }
32
-
33
- /**
34
- * @deprecated
35
- */
36
- const WizardStateProvider = ({ children, initialState }: Props) => {
37
- const [state, dispatch] = useReducer(reducer, initialState);
38
- return (
39
- <WizardStateContext.Provider value={{ state, dispatch }}>
40
- {children}
41
- </WizardStateContext.Provider>
42
- );
43
- };
44
-
45
- export { WizardStateProvider, WizardStateContext };
@@ -1,54 +0,0 @@
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, { ForwardRefRenderFunction, ComponentPropsWithRef, useContext } from "react";
18
- import { WizardStateContext } from "../WizardStateProvider";
19
- import { BaseWizardSteps } from "../BaseWizardSteps/BaseWizardSteps";
20
- import { changeCurrentStepNo } from "../wizardStateReducer";
21
-
22
- export interface Props extends ComponentPropsWithRef<"div"> {
23
- onStepClick: (currentStepNo: number, selectedStepNo: number) => boolean;
24
- }
25
-
26
- const WizardStepsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
27
- { onStepClick, ...rest }: Props,
28
- ref
29
- ) => {
30
- const {
31
- state: { currentStepNo, mode, steps },
32
- dispatch
33
- } = useContext(WizardStateContext);
34
-
35
- const onClick = (selectedStepNo: number) => {
36
- onStepClick(currentStepNo, selectedStepNo) && dispatch(changeCurrentStepNo(selectedStepNo));
37
- };
38
-
39
- return (
40
- <BaseWizardSteps
41
- {...rest}
42
- ref={ref}
43
- onClick={onClick}
44
- steps={steps}
45
- currentStepNo={currentStepNo}
46
- futureStepsClickable={mode === "edit"}
47
- />
48
- );
49
- };
50
-
51
- /**
52
- * @deprecated
53
- */
54
- export const WizardSteps = React.forwardRef(WizardStepsComponent);
@@ -1,61 +0,0 @@
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 { Reducer } from "react";
18
- import { Step } from "./BaseWizardSteps/BaseWizardSteps";
19
- import { WizardMode } from "./Wizard";
20
-
21
- type WizardStateType = {
22
- steps: Step[];
23
- currentStepNo: number;
24
- mode: WizardMode;
25
- };
26
-
27
- interface SetWizardStateAction {
28
- type: "SET_STATE";
29
- payload: {
30
- steps: Step[];
31
- mode: WizardMode;
32
- };
33
- }
34
-
35
- interface ChangeCurrentStepNoAction {
36
- type: "CHANGE_CURRENT_STEP_NO";
37
- payload: number;
38
- }
39
-
40
- const setWizardState = (steps: Step[], mode: WizardMode): SetWizardStateAction => {
41
- return { type: "SET_STATE", payload: { steps, mode } };
42
- };
43
-
44
- const changeCurrentStepNo = (currentStepNo: number): ChangeCurrentStepNoAction => {
45
- return { type: "CHANGE_CURRENT_STEP_NO", payload: currentStepNo };
46
- };
47
-
48
- type WizardActions = SetWizardStateAction | ChangeCurrentStepNoAction;
49
-
50
- const reducer: Reducer<WizardStateType, WizardActions> = (state, action) => {
51
- switch (action.type) {
52
- case "SET_STATE":
53
- return { ...state, ...action.payload };
54
- case "CHANGE_CURRENT_STEP_NO":
55
- return { ...state, currentStepNo: action.payload };
56
- default:
57
- return state;
58
- }
59
- };
60
-
61
- export { setWizardState, changeCurrentStepNo, reducer, WizardActions, WizardStateType };