@groupeactual/ui-kit 1.7.0-beta.3 → 1.7.0-beta.5
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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.d.ts +24 -68
- package/dist/es/index.js +2 -2
- package/dist/es/index.js.map +1 -1
- package/dist/es/src/components/UploadDocument/FileUploader.d.ts +25 -0
- package/dist/es/src/components/UploadDocument/fileuploader.interface.d.ts +19 -0
- package/dist/es/src/components/UploadDocument/index.d.ts +1 -1
- package/dist/es/src/components/index.d.ts +2 -1
- package/package.json +3 -2
- package/src/components/Form/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/UploadDocument/FileUploader.tsx +690 -0
- package/src/components/UploadDocument/fileuploader.interface.ts +21 -0
- package/src/components/UploadDocument/index.ts +1 -1
- package/src/components/index.ts +5 -1
- package/dist/es/src/components/UploadDocument/FileUploaderSingle.d.ts +0 -77
- package/dist/es/src/components/UploadDocument/fileuploadersingle.interface.d.ts +0 -5
- package/src/components/UploadDocument/FileUploaderSingle.tsx +0 -634
- package/src/components/UploadDocument/fileuploadersingle.interface.ts +0 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AcceptTextType, FileDataType } from './fileuploader.interface';
|
|
3
|
+
interface Props {
|
|
4
|
+
title?: string;
|
|
5
|
+
subTitle?: string;
|
|
6
|
+
titleAddButton?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
titleTooltip?: string;
|
|
9
|
+
files?: FileDataType[];
|
|
10
|
+
isMulti?: boolean;
|
|
11
|
+
accept?: string[];
|
|
12
|
+
acceptText?: AcceptTextType;
|
|
13
|
+
orText?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
enableGoogleDrive?: boolean;
|
|
17
|
+
googleAuthClientId?: string;
|
|
18
|
+
googleApiKey?: string;
|
|
19
|
+
_isDroppingFile?: boolean;
|
|
20
|
+
validateFile?: (_size: number, _type: string, _accept: string[], _setUploadFileError: React.Dispatch<React.SetStateAction<boolean | string>>) => boolean;
|
|
21
|
+
onTouched?: () => void;
|
|
22
|
+
onFilesDataChange?: (_fileData: FileDataType[] | undefined) => void;
|
|
23
|
+
}
|
|
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
|
+
export default FileUploader;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface AcceptTextType {
|
|
2
|
+
fileFormat?: string;
|
|
3
|
+
maxSize?: string;
|
|
4
|
+
subText?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FileDataType {
|
|
7
|
+
name: string;
|
|
8
|
+
size: number;
|
|
9
|
+
type: string;
|
|
10
|
+
url: string;
|
|
11
|
+
driveFileId?: string;
|
|
12
|
+
driveAccessToken?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GoogleDriveFile {
|
|
15
|
+
name: string;
|
|
16
|
+
sizeBytes: number;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './
|
|
1
|
+
export { default } from './FileUploader';
|
|
@@ -17,7 +17,8 @@ export { default as EmbeddedNotification } from './EmbbededNotification/Embedded
|
|
|
17
17
|
export { default as Tooltip } from './Tooltip/Tooltip';
|
|
18
18
|
export { default as AutoCompleteSingle } from './Form/AutoCompleteSingle';
|
|
19
19
|
export { default as AutoCompleteMulti } from './Form/AutoCompleteMulti';
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as FileUploader } from './UploadDocument/FileUploader';
|
|
21
|
+
export type { AcceptTextType, FileDataType, } from './UploadDocument/fileuploader.interface';
|
|
21
22
|
export { default as MenuItem } from './MenuItem/MenuItem';
|
|
22
23
|
export { default as Snackbar } from './Snackbar/Snackbar';
|
|
23
24
|
export { default as NotistackAdapter } from './NotistackAdapter/NotistackAdapter';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"react": "^18.3.1",
|
|
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
61
|
},
|
|
61
62
|
"scripts": {
|
|
62
63
|
"build": "rollup -c",
|