@onewelcome/react-lib-components 6.6.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 (235) 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/Icon/Icon.cjs.js +1 -1
  17. package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
  18. package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
  19. package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js +2 -0
  20. package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -0
  21. package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js +2 -0
  22. package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js.map +1 -0
  23. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js +2 -0
  24. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -0
  25. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js +2 -0
  26. package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js.map +1 -0
  27. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +2 -0
  28. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -0
  29. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js +2 -0
  30. package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js.map +1 -0
  31. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +2 -0
  32. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -0
  33. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +2 -0
  34. package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js.map +1 -0
  35. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js +2 -0
  36. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -0
  37. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js +2 -0
  38. package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js.map +1 -0
  39. package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +2 -0
  40. package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -0
  41. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js +2 -0
  42. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -0
  43. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js +2 -0
  44. package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js.map +1 -0
  45. package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js +2 -0
  46. package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -0
  47. package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +2 -0
  48. package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -0
  49. package/dist/cjs/Notifications/Alert/useAlert.cjs.js +2 -0
  50. package/dist/cjs/Notifications/Alert/useAlert.cjs.js.map +1 -0
  51. package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +1 -1
  52. package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +1 -1
  53. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +1 -1
  54. package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +1 -1
  55. package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +1 -1
  56. package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +1 -1
  57. package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
  58. package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
  59. package/dist/cjs/Pagination/Pagination.module.cjs.js +1 -1
  60. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
  61. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  62. package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
  63. package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
  64. package/dist/cjs/src/components/Icon/Icon.d.ts +5 -1
  65. package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
  66. package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
  67. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
  68. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
  69. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
  70. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
  71. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
  72. package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
  73. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
  74. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
  75. package/dist/cjs/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
  76. package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
  77. package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
  78. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
  79. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
  80. package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
  81. package/dist/cjs/src/components/Notifications/Alert/useAlert.d.ts +7 -0
  82. package/dist/cjs/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
  83. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
  84. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
  85. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
  86. package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
  87. package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
  88. package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
  89. package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
  90. package/dist/cjs/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
  91. package/dist/cjs/src/index.cjs.js +1 -1
  92. package/dist/cjs/src/index.d.ts +15 -0
  93. package/dist/esm/DataGrid/DataGrid.module.esm.js +1 -1
  94. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +1 -1
  95. package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +1 -1
  96. package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +1 -1
  97. package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +1 -1
  98. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
  99. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
  100. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.esm.js +1 -1
  101. package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.esm.js +1 -1
  102. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
  103. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
  104. package/dist/esm/Form/FileUpload/FileItem/FileItem.module.esm.js +1 -1
  105. package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
  106. package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
  107. package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
  108. package/dist/esm/Icon/Icon.esm.js +1 -1
  109. package/dist/esm/Icon/Icon.esm.js.map +1 -1
  110. package/dist/esm/Icon/Icon.module.esm.js +1 -1
  111. package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js +2 -0
  112. package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js.map +1 -0
  113. package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js +2 -0
  114. package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js.map +1 -0
  115. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js +2 -0
  116. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js.map +1 -0
  117. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js +2 -0
  118. package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js.map +1 -0
  119. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js +2 -0
  120. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js.map +1 -0
  121. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js +2 -0
  122. package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js.map +1 -0
  123. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +2 -0
  124. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -0
  125. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +2 -0
  126. package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js.map +1 -0
  127. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js +2 -0
  128. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js.map +1 -0
  129. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js +2 -0
  130. package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js.map +1 -0
  131. package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js +2 -0
  132. package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js.map +1 -0
  133. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js +2 -0
  134. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js.map +1 -0
  135. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js +2 -0
  136. package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js.map +1 -0
  137. package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js +2 -0
  138. package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js.map +1 -0
  139. package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js +2 -0
  140. package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js.map +1 -0
  141. package/dist/esm/Notifications/Alert/useAlert.esm.js +2 -0
  142. package/dist/esm/Notifications/Alert/useAlert.esm.js.map +1 -0
  143. package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +1 -1
  144. package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +1 -1
  145. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +1 -1
  146. package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +1 -1
  147. package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +1 -1
  148. package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +1 -1
  149. package/dist/esm/Pagination/Pagination.esm.js +1 -1
  150. package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
  151. package/dist/esm/Pagination/Pagination.module.esm.js +1 -1
  152. package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
  153. package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
  154. package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
  155. package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
  156. package/dist/esm/src/components/Icon/Icon.d.ts +5 -1
  157. package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
  158. package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
  159. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
  160. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
  161. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
  162. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
  163. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
  164. package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
  165. package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
  166. package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
  167. package/dist/esm/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
  168. package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
  169. package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
  170. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
  171. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
  172. package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
  173. package/dist/esm/src/components/Notifications/Alert/useAlert.d.ts +7 -0
  174. package/dist/esm/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
  175. package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
  176. package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
  177. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
  178. package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
  179. package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
  180. package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
  181. package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
  182. package/dist/esm/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
  183. package/dist/esm/src/index.d.ts +15 -0
  184. package/dist/esm/src/index.esm.js +1 -1
  185. package/package.json +1 -1
  186. package/src/components/DataGrid/DataGrid.module.scss +2 -2
  187. package/src/components/DataGrid/DataGridBody/DataGridCell.module.scss +7 -2
  188. package/src/components/DataGrid/DataGridBody/DataGridCell.tsx +1 -1
  189. package/src/components/DataGrid/DataGridBody/DataGridRow.module.scss +10 -0
  190. package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +16 -16
  191. package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +0 -10
  192. package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
  193. package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +3 -3
  194. package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +114 -3
  195. package/src/components/Form/FileUpload/FileItem/FileItem.tsx +154 -47
  196. package/src/components/Form/FileUpload/FileUpload.module.scss +73 -16
  197. package/src/components/Form/FileUpload/FileUpload.tsx +82 -53
  198. package/src/components/Form/FormSection/FormSection.module.scss +12 -0
  199. package/src/components/Icon/Icon.module.scss +16 -1
  200. package/src/components/Icon/Icon.tsx +5 -1
  201. package/src/components/Layout/ContentHeader/ContentHeader.module.scss +44 -0
  202. package/src/components/Layout/ContentHeader/ContentHeader.tsx +70 -0
  203. package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +12 -0
  204. package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.tsx +53 -0
  205. package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss +25 -0
  206. package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.tsx +54 -0
  207. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +39 -0
  208. package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +34 -0
  209. package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +56 -0
  210. package/src/components/Notifications/Alert/AlertContainer/AlertContainer.tsx +52 -0
  211. package/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.ts +47 -0
  212. package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +277 -0
  213. package/src/components/Notifications/Alert/AlertItem/AlertItem.tsx +214 -0
  214. package/src/components/Notifications/Alert/AlertProvider/AlertContext.ts +42 -0
  215. package/src/components/Notifications/Alert/AlertProvider/AlertProvider.tsx +173 -0
  216. package/src/components/Notifications/Alert/useAlert.ts +30 -0
  217. package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +9 -0
  218. package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +6 -0
  219. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +9 -0
  220. package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +9 -0
  221. package/src/components/Notifications/Snackbar/interfaces.ts +18 -0
  222. package/src/components/Notifications/Snackbar/useSnackbar.ts +3 -0
  223. package/src/components/Pagination/Pagination.module.scss +4 -6
  224. package/src/components/Pagination/Pagination.tsx +3 -1
  225. package/src/components/_BaseStyling_/BaseStyling.tsx +78 -1
  226. package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss +25 -0
  227. package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.tsx +47 -0
  228. package/src/font/icomoon.eot +0 -0
  229. package/src/font/icomoon.svg +3 -0
  230. package/src/font/icomoon.ttf +0 -0
  231. package/src/font/icomoon.woff +0 -0
  232. package/src/font/selection.json +1 -1
  233. package/src/index.ts +21 -0
  234. package/src/mixins.module.scss +7 -0
  235. package/src/variables.scss +1 -0
@@ -20,7 +20,8 @@ import { Typography } from "../../../Typography/Typography";
20
20
  import { Icon, Icons } from "../../../Icon/Icon";
21
21
  import { ProgressBar } from "../../../ProgressBar/ProgressBar";
22
22
  import { FileType } from "../FileUpload";
23
-
23
+ import { Button } from "../../../Button/Button";
24
+ import { Link } from "../../../Link/Link";
24
25
  export type UploadProgress = "uploading" | "completed" | "error" | "readonly" | "retry";
25
26
 
26
27
  export interface Props extends ComponentPropsWithRef<"div"> {
@@ -28,61 +29,96 @@ export interface Props extends ComponentPropsWithRef<"div"> {
28
29
  status?: UploadProgress;
29
30
  progress?: number;
30
31
  error?: string;
32
+ downloadFileLink?: string;
33
+ totalPercentage?: number;
31
34
  onRequestedFileAction?: (action: FILE_ACTION, name: FileType["name"]) => void;
32
35
  }
33
36
  interface FileItemIcons {
34
37
  fileIcon: Icons;
35
- actionIcon?: { type: Icons; action: FILE_ACTION };
38
+ actionIcons?: { type: Icons; action: FILE_ACTION }[];
36
39
  }
37
40
 
38
41
  export enum FILE_ACTION {
39
42
  DELETE = "delete",
43
+ DOWNLOAD = "download",
40
44
  REMOVE = "remove",
41
45
  ABORT = "abort",
42
46
  RETRY = "retry"
43
47
  }
44
48
 
49
+ export enum ACTION_STATUS {
50
+ COMPLETED = "completed",
51
+ UPLOADING = "uploading",
52
+ ERROR = "error",
53
+ RETRY = "retry",
54
+ READONLY = "readonly"
55
+ }
56
+
45
57
  const FileItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
46
- { name, status, error, progress, onRequestedFileAction }: Props,
58
+ {
59
+ name,
60
+ status,
61
+ error,
62
+ progress,
63
+ downloadFileLink,
64
+ totalPercentage,
65
+ onRequestedFileAction
66
+ }: Props,
47
67
  ref
48
68
  ) => {
49
69
  const determineIcons = (status?: UploadProgress): FileItemIcons => {
50
70
  switch (status) {
51
- case "completed":
71
+ case ACTION_STATUS.COMPLETED:
52
72
  return {
53
- fileIcon: Icons.FileOutline,
54
- actionIcon: {
55
- type: Icons.Trash,
56
- action: FILE_ACTION.DELETE
57
- }
73
+ fileIcon: Icons.FileAltIcon,
74
+ actionIcons: [
75
+ {
76
+ type: Icons.Trash,
77
+ action: FILE_ACTION.DELETE
78
+ },
79
+ {
80
+ type: Icons.DownloadFile,
81
+ action: FILE_ACTION.DOWNLOAD
82
+ }
83
+ ]
58
84
  };
59
- case "error":
85
+ case ACTION_STATUS.ERROR:
60
86
  return {
61
- fileIcon: Icons.InfoCircle,
62
- actionIcon: {
63
- type: Icons.Times,
64
- action: FILE_ACTION.REMOVE
65
- }
87
+ fileIcon: Icons.Error,
88
+ actionIcons: [
89
+ {
90
+ type: Icons.Times,
91
+ action: FILE_ACTION.REMOVE
92
+ }
93
+ ]
66
94
  };
67
- case "uploading":
95
+ case ACTION_STATUS.UPLOADING:
68
96
  return {
69
- fileIcon: Icons.FileUpload,
70
- actionIcon: {
71
- type: Icons.Times,
72
- action: FILE_ACTION.ABORT
73
- }
97
+ fileIcon: Icons.FileAltIcon,
98
+ actionIcons: [
99
+ {
100
+ type: Icons.AbortFile,
101
+ action: FILE_ACTION.ABORT
102
+ }
103
+ ]
74
104
  };
75
- case "retry":
105
+ case ACTION_STATUS.RETRY:
76
106
  return {
77
- fileIcon: Icons.InfoCircle,
78
- actionIcon: {
79
- type: Icons.Refresh,
80
- action: FILE_ACTION.RETRY
81
- }
107
+ fileIcon: Icons.FileAltIcon,
108
+ actionIcons: [
109
+ {
110
+ type: Icons.Refresh,
111
+ action: FILE_ACTION.RETRY
112
+ },
113
+ {
114
+ type: Icons.Trash,
115
+ action: FILE_ACTION.REMOVE
116
+ }
117
+ ]
82
118
  };
83
- case "readonly":
119
+ case ACTION_STATUS.READONLY:
84
120
  default:
85
- return { fileIcon: Icons.FileOutline };
121
+ return { fileIcon: Icons.FileAltIcon };
86
122
  }
87
123
  };
88
124
 
@@ -95,28 +131,104 @@ const FileItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
95
131
 
96
132
  const { friendlyName, extension } = getFriendlyNameAndExtension(name);
97
133
 
98
- return (
99
- <div ref={ref} className={classes["file-item-wrapper"]} aria-label={`${name}-wrapper`}>
134
+ const getStartIcon = (icon: { type: Icons; action: FILE_ACTION }) => (
135
+ <Icon
136
+ key={icon.action}
137
+ title={icon.action}
138
+ icon={icon.type}
139
+ className={classes["action-icon"]}
140
+ ></Icon>
141
+ );
142
+
143
+ const renderActionIcons = (
144
+ actionIcons: { type: Icons; action: FILE_ACTION }[],
145
+ status: UploadProgress = ACTION_STATUS.UPLOADING
146
+ ) => {
147
+ return actionIcons.map(icon => (
148
+ <>
149
+ {icon.action !== FILE_ACTION.DOWNLOAD && (
150
+ <Button
151
+ color="primary"
152
+ startIcon={getStartIcon(icon)}
153
+ title={icon.action !== FILE_ACTION.ABORT ? icon.action : ""}
154
+ type="button"
155
+ variant="text"
156
+ onClick={() =>
157
+ icon && onRequestedFileAction && onRequestedFileAction(icon.action, name)
158
+ }
159
+ >
160
+ {icon.action !== FILE_ACTION.ABORT ? icon.action : ""}
161
+ </Button>
162
+ )}
163
+
164
+ {icon.action === FILE_ACTION.DOWNLOAD && downloadFileLink && (
165
+ <Link
166
+ color="primary"
167
+ display="link"
168
+ to={downloadFileLink}
169
+ type="download"
170
+ target="_blank"
171
+ prefixIcon={
172
+ <Icon
173
+ key={icon.action}
174
+ className={classes["action-icon"]}
175
+ title={icon.action}
176
+ icon={icon.type}
177
+ ></Icon>
178
+ }
179
+ >
180
+ {icon.action}
181
+ </Link>
182
+ )}
183
+ </>
184
+ ));
185
+ };
186
+
187
+ const getUploadedFileInfo = () => {
188
+ return (
100
189
  <Typography
101
190
  variant={"body"}
102
191
  title={name}
103
192
  className={`${classes["file-name"]} ${status ? classes[status] : ""}`}
104
193
  >
105
- <Icon icon={icons.fileIcon} className={classes["file-icon"]} />
106
- <span className={classes["friendly-name"]}>{friendlyName}</span>.<span>{extension}</span>
107
- {icons.actionIcon && (
194
+ {status === "retry" && (
108
195
  <Icon
109
- title={icons.actionIcon.action}
110
- icon={icons.actionIcon.type}
111
- className={classes["action-icon"]}
112
- onClick={() =>
113
- icons.actionIcon &&
114
- onRequestedFileAction &&
115
- onRequestedFileAction(icons.actionIcon.action, name)
116
- }
196
+ icon={Icons.Error}
197
+ className={`${classes["file-icon"]} ${status ? classes[status] : ""}`}
117
198
  />
118
199
  )}
200
+ <Icon icon={icons.fileIcon} className={classes["file-icon"]} />
201
+ <span className={classes["friendly-name"]}>{friendlyName}</span>.<span>{extension}</span>
119
202
  </Typography>
203
+ );
204
+ };
205
+
206
+ const getProgressBar = () => {
207
+ return (
208
+ <ProgressBar
209
+ className={classes["progress-bar"]}
210
+ completed={progress}
211
+ label={`${friendlyName}.${extension}`}
212
+ percentage={totalPercentage}
213
+ />
214
+ );
215
+ };
216
+
217
+ return (
218
+ <div ref={ref} className={classes["file-item-wrapper"]} aria-label={`${name}-wrapper`}>
219
+ <div className={classes["file-list-container"]}>
220
+ {status !== ACTION_STATUS.UPLOADING && getUploadedFileInfo()}
221
+
222
+ <div
223
+ className={`${status === ACTION_STATUS.UPLOADING ? classes["progress-with-action"] : ""}`}
224
+ >
225
+ {status === ACTION_STATUS.UPLOADING && getProgressBar()}
226
+
227
+ <div className={classes["action-button-wrapper"]}>
228
+ {icons.actionIcons && renderActionIcons(icons.actionIcons, status)}
229
+ </div>
230
+ </div>
231
+ </div>
120
232
  {error && (
121
233
  <Typography
122
234
  variant={"sub-text"}
@@ -125,11 +237,6 @@ const FileItemComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
125
237
  {error}
126
238
  </Typography>
127
239
  )}
128
- {status === "uploading" ? (
129
- <ProgressBar className={classes["progress-bar"]} completed={progress} />
130
- ) : (
131
- ""
132
- )}
133
240
  </div>
134
241
  );
135
242
  };
@@ -24,25 +24,27 @@
24
24
  .file-dropzone {
25
25
  border-radius: var(--input-border-radius);
26
26
  background-color: var(--input-background-color);
27
- padding: 1.25rem;
27
+ padding: 0.25rem 1.25rem;
28
28
  position: relative;
29
- @include transition(all, 0.2s, ease-in-out);
30
- &.drag-active {
31
- @include outline(
32
- var(--color-blue-grey500),
33
- var(--drag-border-style),
34
- var(--input-border-width),
35
- var(--input-border-radius),
36
- var(--drag-background-color)
37
- );
38
- @include outlineStates;
29
+
30
+ .file-upload-title {
31
+ margin: 0 0 0.25rem 0;
32
+ font-size: 0.875rem;
33
+ font-weight: 400;
39
34
  }
35
+
36
+ @include transition(all, 0.2s, ease-in-out);
40
37
  &.error {
41
38
  span[data-icon-status],
42
39
  .file-upload-title {
43
40
  color: var(--error);
44
41
  }
42
+
43
+ .file-select {
44
+ border-color: var(--error);
45
+ }
45
46
  }
47
+
46
48
  &.success {
47
49
  span[data-icon-status] {
48
50
  color: var(--success);
@@ -54,11 +56,58 @@
54
56
  background-color: var(--disabled);
55
57
  color: var(--greyed-out);
56
58
  }
59
+
57
60
  span[data-icon-status] {
58
61
  font-size: 1.25rem;
59
62
  position: absolute;
60
- top: 2.74rem;
61
- right: 1.375rem;
63
+ top: auto;
64
+ right: 2rem;
65
+ }
66
+
67
+ .file-upload-title-mandatory {
68
+ color: var(--color-red500);
69
+ }
70
+ }
71
+
72
+ .upload-button-wrapper {
73
+ background: var(--color-blue-grey25);
74
+ padding: 4px;
75
+
76
+ &.drag-active {
77
+ .outline {
78
+ pointer-events: none;
79
+ position: absolute;
80
+ margin: 0;
81
+ padding: 0;
82
+ inset: 0;
83
+ border: var(--file-upload-border-width) var(--drag-drop-border-style)
84
+ var(--color-blue-grey500);
85
+ border-radius: var(--input-border-radius);
86
+ background-color: var(--color-primary-light);
87
+
88
+ @include transition(all, 0.2s, ease-in-out);
89
+ &::before {
90
+ content: "Drop here";
91
+ text-align: center;
92
+ display: block;
93
+ color: var(--color-primary);
94
+ padding-top: 2rem;
95
+ }
96
+ }
97
+
98
+ &:hover .outline {
99
+ background-color: var(--color-primary-light);
100
+ }
101
+
102
+ & .file-select {
103
+ position: relative;
104
+ }
105
+
106
+ .error {
107
+ .outline {
108
+ border-color: var(--error);
109
+ }
110
+ }
62
111
  }
63
112
  }
64
113
 
@@ -73,12 +122,18 @@
73
122
  .file-select {
74
123
  display: flex;
75
124
  align-items: center;
76
- flex-direction: column;
125
+ flex-direction: row;
126
+ justify-content: center;
127
+ border: var(--file-upload-border-width) var(--drag-drop-border-style) var(--color-blue-grey100);
128
+ padding: 1.25rem;
129
+
77
130
  [class*="file"] {
78
131
  font-size: 1.25rem;
132
+ margin-left: 0.5rem;
79
133
  }
134
+
80
135
  [class*="typography"] {
81
- margin-bottom: 0.625rem;
136
+ margin-bottom: 0;
82
137
  }
83
138
  }
84
139
 
@@ -94,6 +149,7 @@
94
149
  bottom: 0;
95
150
  opacity: 0;
96
151
  cursor: pointer;
152
+
97
153
  &:focus {
98
154
  outline: none;
99
155
  }
@@ -106,7 +162,8 @@
106
162
  .file-list {
107
163
  list-style: none;
108
164
  padding: 0;
109
- margin: 0.75rem 0;
165
+ margin: 0.25rem 0;
166
+
110
167
  li:not(:last-child) {
111
168
  margin-bottom: 0.5rem;
112
169
  }
@@ -27,7 +27,6 @@ import { FILE_ACTION, FileItem, Props as FileConfig } from "./FileItem/FileItem"
27
27
  import { Props as InputProps } from "../Input/Input";
28
28
  import { Typography } from "../../Typography/Typography";
29
29
  import classes from "./FileUpload.module.scss";
30
- import { Icon, Icons } from "../../Icon/Icon";
31
30
  import { useDetermineStatusIcon } from "../../../hooks/useDetermineStatusIcon";
32
31
 
33
32
  type FileUploadType = Omit<InputProps, "onDrop" | "type" | "onChange" | "suffix" | "prefix">;
@@ -50,6 +49,9 @@ export interface Props extends FileUploadType {
50
49
  onDrop?: (e: FileType[]) => void;
51
50
  onChange?: (e: FileType[]) => void;
52
51
  onRequestedFileAction?: (action: FILE_ACTION, name: FileType["name"]) => void;
52
+ downloadFileLink?: string;
53
+ isRequired?: boolean;
54
+ invalidDropErrorMessage?: string;
53
55
  }
54
56
 
55
57
  const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
@@ -65,8 +67,8 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
65
67
  labeledBy,
66
68
  disabled = false,
67
69
  onChange,
68
- dragAndDropText = "Drop file here or",
69
- selectButtonText = "Select file",
70
+ dragAndDropText = "Drag and drop or",
71
+ selectButtonText = "Browse file",
70
72
  onDragOver,
71
73
  onDragLeave,
72
74
  wrapperProps,
@@ -75,19 +77,30 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
75
77
  onRequestedFileAction,
76
78
  exceedingMaxSizeErrorText,
77
79
  fileList,
80
+ downloadFileLink,
81
+ isRequired = true,
82
+ invalidDropErrorMessage = "Invalid file format. Supported formats are: $accept.",
78
83
  ...rest
79
84
  }: Props,
80
85
  ref
81
86
  ) => {
82
87
  const labelRef = useRef(null);
83
88
  const [dragActive, setDragActive] = useState(false);
89
+ const [errorMsg, setErrorMsg] = useState("");
84
90
  const [inputError, setInputError] = useState(false);
85
91
  const icon = useDetermineStatusIcon({ success, error });
86
92
  let dropzoneClassNames = [classes["file-dropzone"]];
93
+ let dropzoneContainerClassNames = [classes["upload-button-wrapper"]];
87
94
  let subTextClass = [classes["file-selector-sub-text"]];
88
- dragActive && dropzoneClassNames.push(classes["drag-active"]);
89
- inputError ||
90
- (error && dropzoneClassNames.push(classes["error"]) && subTextClass.push(classes["error"]));
95
+ let errorTextClass = [classes["file-selector-sub-text"]];
96
+ dragActive && dropzoneContainerClassNames.push(classes["drag-active"]);
97
+ const hasError = inputError || error || errorMsg;
98
+ if (hasError) {
99
+ const errorClass = classes["error"];
100
+ dropzoneClassNames.push(errorClass);
101
+ subTextClass.push(errorClass);
102
+ errorTextClass.push(errorClass);
103
+ }
91
104
  disabled && dropzoneClassNames.push(classes["disabled"]);
92
105
  success && !error && dropzoneClassNames.push(classes["success"]);
93
106
 
@@ -177,10 +190,13 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
177
190
  e.preventDefault();
178
191
  e.stopPropagation();
179
192
  if (e?.dataTransfer?.files && e.dataTransfer.files.length) {
180
- const extension = e?.dataTransfer?.files[0].name.split(".").pop();
193
+ const extension = e?.dataTransfer?.files[0]?.name.split(".").pop();
181
194
  if (extension && accept && !accept.includes(extension)) {
195
+ setErrorMsg(invalidDropErrorMessage.replace("$accept", accept));
182
196
  setDragActive(false);
183
197
  return;
198
+ } else {
199
+ setErrorMsg("");
184
200
  }
185
201
  const validatedFiles = getFileList(e.dataTransfer.files);
186
202
  onDrop?.(validatedFiles);
@@ -191,40 +207,62 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
191
207
  return (
192
208
  <div className={classes["file-upload-wrapper"]} {...wrapperProps}>
193
209
  <div className={classes["dropzone-wrapper"]}>
194
- <div
195
- className={dropzoneClassNames.join(" ")}
196
- onDragOver={e => !disabled && handleOnDragOver(e)}
197
- onDragLeave={e => !disabled && handleOnDragLeave(e)}
198
- onDrop={e => !disabled && handleOnDrop(e)}
199
- >
210
+ <div className={dropzoneClassNames.join(" ")}>
200
211
  <Typography variant="body-bold" className={classes["file-upload-title"]} ref={labelRef}>
201
- {title}
212
+ {title}{" "}
213
+ {isRequired && <span className={classes["file-upload-title-mandatory"]}>*</span>}
202
214
  </Typography>
203
- <div className={classes["file-select"]}>
204
- <Icon className={"drop-file-icon"} icon={Icons.FileUpload} />
205
- <Typography variant="body" className={"drag-and-drop-text"}>
206
- {dragAndDropText}
207
- </Typography>
208
- <div className={classes["file-upload-btn"]}>
209
- <Button variant="outline" disabled={disabled}>
210
- {selectButtonText}
211
- <input
212
- className={classes["upload-input"]}
213
- {...rest}
214
- ref={ref}
215
- aria-labelledby={labeledBy}
216
- type="file"
217
- name={name}
218
- {...(multiple && { multiple: true })}
219
- disabled={disabled}
220
- accept={accept}
221
- onChange={onInputChange}
222
- spellCheck={rest.spellCheck ?? false}
223
- />
224
- </Button>
215
+
216
+ {fileList?.length > 0 && (
217
+ <ul className={classes["file-list"]}>
218
+ {fileList.map(({ name, status, progress, error }) => (
219
+ <li key={name} className={status} id={name}>
220
+ <FileItem
221
+ name={name}
222
+ key={`${name}_${status}`}
223
+ status={status}
224
+ progress={progress}
225
+ error={error}
226
+ downloadFileLink={downloadFileLink}
227
+ onRequestedFileAction={onRequestedFileAction}
228
+ />
229
+ </li>
230
+ ))}
231
+ </ul>
232
+ )}
233
+
234
+ <div
235
+ className={dropzoneContainerClassNames.join(" ")}
236
+ onDragOver={e => !disabled && handleOnDragOver(e)}
237
+ onDragLeave={e => !disabled && handleOnDragLeave(e)}
238
+ onDrop={e => !disabled && handleOnDrop(e)}
239
+ >
240
+ <div className={classes["file-select"]}>
241
+ <Typography variant="body" className={"drag-and-drop-text"}>
242
+ {dragAndDropText}
243
+ </Typography>
244
+
245
+ <div className={classes["file-upload-btn"]}>
246
+ <Button variant="outline" disabled={disabled}>
247
+ {selectButtonText}
248
+ <input
249
+ {...rest}
250
+ className={`${classes["upload-input"]} ${rest.className}`}
251
+ ref={ref}
252
+ aria-labelledby={labeledBy}
253
+ type="file"
254
+ name={name}
255
+ multiple={multiple}
256
+ disabled={disabled}
257
+ accept={accept}
258
+ onChange={onInputChange}
259
+ spellCheck={false}
260
+ />
261
+ </Button>
262
+ </div>
263
+ {!disabled && icon}
264
+ <span className={classes["outline"]}></span>
225
265
  </div>
226
- {!disabled && icon}
227
- <span className={classes["outline"]}></span>
228
266
  </div>
229
267
  </div>
230
268
  {subText && (
@@ -232,22 +270,13 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
232
270
  {subText}
233
271
  </Typography>
234
272
  )}
273
+
274
+ {errorMsg && (
275
+ <Typography variant={"sub-text"} className={errorTextClass.join(" ")}>
276
+ {errorMsg}
277
+ </Typography>
278
+ )}
235
279
  </div>
236
- {fileList?.length > 0 && (
237
- <ul className={classes["file-list"]}>
238
- {fileList.map(({ name, status, progress, error }) => (
239
- <li key={name} className={status} id={name}>
240
- <FileItem
241
- name={name}
242
- status={status}
243
- progress={progress}
244
- error={error}
245
- onRequestedFileAction={onRequestedFileAction}
246
- />
247
- </li>
248
- ))}
249
- </ul>
250
- )}
251
280
  </div>
252
281
  );
253
282
  };
@@ -0,0 +1,12 @@
1
+ .section-wrapper {
2
+ padding-bottom: 4rem;
3
+ }
4
+
5
+ .section-header-wrapper {
6
+ margin-bottom: 1rem;
7
+ }
8
+
9
+ .section-header {
10
+ line-height: 2rem;
11
+ color: var(--color-primary500);
12
+ }
@@ -337,8 +337,23 @@
337
337
  content: "\e9d1";
338
338
  @include fontProperties();
339
339
  }
340
-
341
340
  .icon-warning-filled:before {
342
341
  content: "\e948";
343
342
  @include fontProperties();
344
343
  }
344
+ .icon-download-file-outline:before {
345
+ content: "\e945";
346
+ @include fontProperties();
347
+ }
348
+ .icon-retry:before {
349
+ content: "\e949";
350
+ @include fontProperties();
351
+ }
352
+ .icon-cancel:before {
353
+ content: "\e94a";
354
+ @include fontProperties();
355
+ }
356
+ .icon-file-alt:before {
357
+ content: "\e94b";
358
+ @include fontProperties();
359
+ }
@@ -91,7 +91,11 @@ export enum Icons {
91
91
  FileDownload = "file-download-outline",
92
92
  UploadOutline = "upload-outline",
93
93
  ReplyOutline = "reply-outline",
94
- SaveOutline = "save-outline"
94
+ SaveOutline = "save-outline",
95
+ DownloadFile = "download-file-outline",
96
+ RetryFile = "retry",
97
+ AbortFile = "cancel",
98
+ FileAltIcon = "file-alt"
95
99
  }
96
100
 
97
101
  type Tag = "span" | "div" | "i";