@groupeactual/ui-kit 1.7.0-beta.8 → 1.7.1-beta.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.
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.d.ts +57 -3
- package/dist/es/index.js +8 -8
- package/dist/es/index.js.map +1 -1
- package/dist/es/src/components/EmbbededNotification/EmbeddedNotification.d.ts +1 -1
- package/dist/es/src/index.d.ts +1 -0
- package/dist/es/src/interfaces/theme.d.ts +55 -0
- package/package.json +7 -9
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +1 -2
- package/src/components/Form/TimePicker/TimePicker.tsx +0 -1
- package/src/components/UploadDocument/FileUploader.tsx +28 -24
- package/src/index.ts +1 -0
- package/src/interfaces/theme.ts +55 -0
package/dist/es/src/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export * from './components';
|
|
|
2
2
|
export { default as DesignSystemProvider } from './DesignSystemProvider';
|
|
3
3
|
export { DesignSystemContext } from './DesignSystemProvider';
|
|
4
4
|
export { type DesignSystemContextValues } from './DesignSystemProvider';
|
|
5
|
+
export { type ThemeDS } from './interfaces/theme';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
interface PaletteDS {
|
|
2
|
+
redActual: string;
|
|
3
|
+
blueClickable: string;
|
|
4
|
+
blueHoverClickable: string;
|
|
5
|
+
greyMediumInactive: string;
|
|
6
|
+
greyXDark: string;
|
|
7
|
+
greyDark: string;
|
|
8
|
+
white: string;
|
|
9
|
+
greyXLight: string;
|
|
10
|
+
greyXDarkBgModal: string;
|
|
11
|
+
blueHoverEquivalence: string;
|
|
12
|
+
blueHoverOpacity12: string;
|
|
13
|
+
greyLightDefaultBorder: string;
|
|
14
|
+
blueInfo: string;
|
|
15
|
+
greenSuccess: string;
|
|
16
|
+
redError: string;
|
|
17
|
+
orangeWarning: string;
|
|
18
|
+
blueDark: string;
|
|
19
|
+
blueMedium: string;
|
|
20
|
+
blueLight: string;
|
|
21
|
+
greenDark: string;
|
|
22
|
+
greenMedium: string;
|
|
23
|
+
green: string;
|
|
24
|
+
brown: string;
|
|
25
|
+
greenLight: string;
|
|
26
|
+
orangeLight: string;
|
|
27
|
+
yellow: string;
|
|
28
|
+
purpleDark: string;
|
|
29
|
+
purple: string;
|
|
30
|
+
pink: string;
|
|
31
|
+
pinkLight: string;
|
|
32
|
+
primary: {
|
|
33
|
+
main: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
};
|
|
36
|
+
secondary: {
|
|
37
|
+
main: string;
|
|
38
|
+
};
|
|
39
|
+
success: {
|
|
40
|
+
main: string;
|
|
41
|
+
};
|
|
42
|
+
error: {
|
|
43
|
+
main: string;
|
|
44
|
+
};
|
|
45
|
+
warning: {
|
|
46
|
+
main: string;
|
|
47
|
+
};
|
|
48
|
+
infos: {
|
|
49
|
+
main: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface ThemeDS {
|
|
53
|
+
palette: PaletteDS;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@mdx-js/react": "^3.1.0",
|
|
13
13
|
"@types/google.picker": "^0.0.46",
|
|
14
14
|
"@types/lodash": "^4.17.13",
|
|
15
|
-
"@types/react": "^18.
|
|
15
|
+
"@types/react": "^18.2.75",
|
|
16
16
|
"@types/styled-components": "^5.1.34",
|
|
17
17
|
"babel-loader": "^9.2.1",
|
|
18
18
|
"clsx": "^2.1.1",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style-loader": "^4.0.0",
|
|
29
29
|
"styled-components": "^6.1.13",
|
|
30
30
|
"tslib": "^2.8.1",
|
|
31
|
-
"typescript": "^5.
|
|
31
|
+
"typescript": "^5.5.4"
|
|
32
32
|
},
|
|
33
33
|
"main": "dist/cjs/index.js",
|
|
34
34
|
"module": "dist/es/index.js",
|
|
@@ -39,15 +39,13 @@
|
|
|
39
39
|
"types": "dist/es/index.d.ts",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
42
|
-
"@emotion/react": "^11.13.3",
|
|
43
|
-
"@emotion/serialize": "^1.3.2",
|
|
44
|
-
"@emotion/styled": "^11.13.0",
|
|
45
42
|
"@fortawesome/fontawesome-svg-core": "6.6.0",
|
|
46
43
|
"@fortawesome/free-brands-svg-icons": "6.6.0",
|
|
47
44
|
"@fortawesome/pro-regular-svg-icons": "git+https://github.com/actualtysoft/pro-regular-svg-icons.git#6.4.2",
|
|
48
45
|
"@fortawesome/pro-solid-svg-icons": "git+https://github.com/actualtysoft/pro-solid-svg-icons.git#6.4.2",
|
|
49
|
-
"@mui/material": "
|
|
50
|
-
"@mui/
|
|
46
|
+
"@mui/material": "5.16.7",
|
|
47
|
+
"@mui/styled-engine": "5.16.6",
|
|
48
|
+
"@mui/system": "5.16.7",
|
|
51
49
|
"@mui/x-date-pickers": "^7.15.0",
|
|
52
50
|
"@mui/x-date-pickers-pro": "^7.15.0",
|
|
53
51
|
"@react-oauth/google": "^0.12.1",
|
|
@@ -57,7 +55,7 @@
|
|
|
57
55
|
"react-dom": "^18.3.1",
|
|
58
56
|
"react-google-picker": "^0.1.0",
|
|
59
57
|
"react-dropzone": "^14.3.5",
|
|
60
|
-
"@groupeactual/design-tokens": "1.7.
|
|
58
|
+
"@groupeactual/design-tokens": "1.7.1-beta.0"
|
|
61
59
|
},
|
|
62
60
|
"scripts": {
|
|
63
61
|
"build": "rollup -c",
|
|
@@ -7,8 +7,7 @@ import {
|
|
|
7
7
|
faCircleInfo,
|
|
8
8
|
faCircleXmark,
|
|
9
9
|
} from '@fortawesome/pro-solid-svg-icons';
|
|
10
|
-
import { Box } from '@mui/material';
|
|
11
|
-
import { BoxProps } from '@mui/system';
|
|
10
|
+
import { Box, BoxProps } from '@mui/material';
|
|
12
11
|
|
|
13
12
|
import Text from '@/components//Text';
|
|
14
13
|
import Icon from '@/components/IconProvider';
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from '@fortawesome/pro-solid-svg-icons';
|
|
23
23
|
import { Box, IconButton } from '@mui/material';
|
|
24
24
|
import Menu from '@mui/material/Menu';
|
|
25
|
+
import { set } from 'lodash';
|
|
25
26
|
|
|
26
27
|
import Button from '@/components/Button';
|
|
27
28
|
import IconProvider from '@/components/IconProvider';
|
|
@@ -103,7 +104,7 @@ const FileUploader = ({
|
|
|
103
104
|
const [uploadFileError, setUploadFileError] = useState<string | boolean>(
|
|
104
105
|
false,
|
|
105
106
|
);
|
|
106
|
-
const [isInitialized, setIsInitialized] = useState
|
|
107
|
+
const [isInitialized, setIsInitialized] = useState(false);
|
|
107
108
|
|
|
108
109
|
// * Refs
|
|
109
110
|
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
|
@@ -316,30 +317,33 @@ const FileUploader = ({
|
|
|
316
317
|
|
|
317
318
|
// * Initialize the component with the files passed as props
|
|
318
319
|
useEffect(() => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
320
|
+
if (!isInitialized && files.length > 0) {
|
|
321
|
+
const FilesDataDto: FileDataType[] = files.map((file) => ({
|
|
322
|
+
name: file.name,
|
|
323
|
+
size: Math.round(file.size / 1024), // Convert size to KB
|
|
324
|
+
type: file.type,
|
|
325
|
+
url: file.url,
|
|
326
|
+
}));
|
|
327
|
+
|
|
328
|
+
const initializeFiles = async () => {
|
|
329
|
+
const initialFiles = await Promise.all(
|
|
330
|
+
FilesDataDto.map(async (fileData) => {
|
|
331
|
+
const response = await fetch(fileData.url);
|
|
332
|
+
const blob = await response.blob();
|
|
333
|
+
|
|
334
|
+
return new File([blob], fileData.name, {
|
|
335
|
+
type: fileData.type,
|
|
336
|
+
});
|
|
337
|
+
}),
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
setCurrentFiles(initialFiles); // Now files is a File[] array
|
|
341
|
+
};
|
|
340
342
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
+
initializeFiles();
|
|
344
|
+
setFilesData(FilesDataDto);
|
|
345
|
+
setIsInitialized(true);
|
|
346
|
+
}
|
|
343
347
|
}, [files]);
|
|
344
348
|
|
|
345
349
|
useEffect(() => {
|
package/src/index.ts
CHANGED
|
@@ -2,3 +2,4 @@ export * from './components';
|
|
|
2
2
|
export { default as DesignSystemProvider } from './DesignSystemProvider';
|
|
3
3
|
export { DesignSystemContext } from './DesignSystemProvider';
|
|
4
4
|
export { type DesignSystemContextValues } from './DesignSystemProvider';
|
|
5
|
+
export { type ThemeDS } from './interfaces/theme';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
interface PaletteDS {
|
|
2
|
+
redActual: string;
|
|
3
|
+
blueClickable: string;
|
|
4
|
+
blueHoverClickable: string;
|
|
5
|
+
greyMediumInactive: string;
|
|
6
|
+
greyXDark: string;
|
|
7
|
+
greyDark: string;
|
|
8
|
+
white: string;
|
|
9
|
+
greyXLight: string;
|
|
10
|
+
greyXDarkBgModal: string;
|
|
11
|
+
blueHoverEquivalence: string;
|
|
12
|
+
blueHoverOpacity12: string;
|
|
13
|
+
greyLightDefaultBorder: string;
|
|
14
|
+
blueInfo: string;
|
|
15
|
+
greenSuccess: string;
|
|
16
|
+
redError: string;
|
|
17
|
+
orangeWarning: string;
|
|
18
|
+
blueDark: string;
|
|
19
|
+
blueMedium: string;
|
|
20
|
+
blueLight: string;
|
|
21
|
+
greenDark: string;
|
|
22
|
+
greenMedium: string;
|
|
23
|
+
green: string;
|
|
24
|
+
brown: string;
|
|
25
|
+
greenLight: string;
|
|
26
|
+
orangeLight: string;
|
|
27
|
+
yellow: string;
|
|
28
|
+
purpleDark: string;
|
|
29
|
+
purple: string;
|
|
30
|
+
pink: string;
|
|
31
|
+
pinkLight: string;
|
|
32
|
+
primary: {
|
|
33
|
+
main: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
};
|
|
36
|
+
secondary: {
|
|
37
|
+
main: string;
|
|
38
|
+
};
|
|
39
|
+
success: {
|
|
40
|
+
main: string;
|
|
41
|
+
};
|
|
42
|
+
error: {
|
|
43
|
+
main: string;
|
|
44
|
+
};
|
|
45
|
+
warning: {
|
|
46
|
+
main: string;
|
|
47
|
+
};
|
|
48
|
+
infos: {
|
|
49
|
+
main: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ThemeDS {
|
|
54
|
+
palette: PaletteDS;
|
|
55
|
+
}
|