@groupeactual/ui-kit 1.7.0-beta.5 → 1.7.0-beta.7

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.
@@ -19,7 +19,7 @@ interface Props {
19
19
  _isDroppingFile?: boolean;
20
20
  validateFile?: (_size: number, _type: string, _accept: string[], _setUploadFileError: React.Dispatch<React.SetStateAction<boolean | string>>) => boolean;
21
21
  onTouched?: () => void;
22
- onFilesDataChange?: (_fileData: FileDataType[] | undefined) => void;
22
+ onFilesDataChange?: (_fileData: FileDataType[] | undefined, _filesInput?: File[]) => void;
23
23
  }
24
24
  declare const FileUploader: ({ title, subTitle, titleAddButton, helperText, titleTooltip, files, isMulti, accept, acceptText, orText, disabled, error, enableGoogleDrive, googleAuthClientId, googleApiKey, _isDroppingFile, validateFile, onTouched, onFilesDataChange, }: Props) => React.JSX.Element;
25
25
  export default FileUploader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupeactual/ui-kit",
3
- "version": "1.7.0-beta.5",
3
+ "version": "1.7.0-beta.7",
4
4
  "type": "module",
5
5
  "description": "A simple template for a custom React component library",
6
6
  "devDependencies": {
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^18.3.1",
58
58
  "react-google-picker": "^0.1.0",
59
59
  "react-dropzone": "^14.3.5",
60
- "@groupeactual/design-tokens": "1.7.0-beta.5"
60
+ "@groupeactual/design-tokens": "1.7.0-beta.7"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "rollup -c",
@@ -17,7 +17,7 @@ import {
17
17
  } from '@fortawesome/pro-regular-svg-icons';
18
18
  import {
19
19
  faCaretDown,
20
- faFileAlt,
20
+ faFile,
21
21
  faInfoCircle,
22
22
  } from '@fortawesome/pro-solid-svg-icons';
23
23
  import { Box, IconButton } from '@mui/material';
@@ -60,7 +60,10 @@ interface Props {
60
60
  _setUploadFileError: React.Dispatch<React.SetStateAction<boolean | string>>,
61
61
  ) => boolean;
62
62
  onTouched?: () => void;
63
- onFilesDataChange?: (_fileData: FileDataType[] | undefined) => void;
63
+ onFilesDataChange?: (
64
+ _fileData: FileDataType[] | undefined,
65
+ _filesInput?: File[],
66
+ ) => void;
64
67
  }
65
68
 
66
69
  const FileUploader = ({
@@ -336,7 +339,7 @@ const FileUploader = ({
336
339
 
337
340
  useEffect(() => {
338
341
  // * Notify parent component
339
- onFilesDataChange?.(filesData);
342
+ onFilesDataChange?.(filesData, currentFiles);
340
343
  }, [filesData]);
341
344
 
342
345
  useEffect(() => {
@@ -591,7 +594,7 @@ const FileUploader = ({
591
594
  }}
592
595
  >
593
596
  <IconProvider
594
- icon={faFileAlt}
597
+ icon={faFile}
595
598
  color="greyMediumInactive"
596
599
  size="sm"
597
600
  mr={1}