@groupeactual/ui-kit 1.6.7-beta.0 → 1.7.0-beta.3
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 +132 -166
- package/dist/es/index.js +97 -0
- package/dist/es/index.js.map +1 -0
- package/dist/{cjs/types → es/src}/components/Accordion/Accordion.d.ts +1 -4
- package/dist/es/{types → src}/components/BannerNotification/BannerNotification.d.ts +1 -4
- package/dist/es/{types → src}/components/Breadcrumbs/Breadcrumbs.d.ts +1 -4
- package/dist/{cjs/types → es/src}/components/Button/Button.d.ts +1 -4
- package/dist/es/{types → src}/components/Chip/Chip.d.ts +2 -5
- package/dist/es/{types → src}/components/Datatable/Datatable.d.ts +1 -1
- package/dist/es/{types → src}/components/Datatable/datatable.interface.d.ts +5 -4
- package/dist/{cjs/types → es/src}/components/EmbbededNotification/EmbeddedNotification.d.ts +1 -4
- package/dist/es/{types → src}/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +7 -6
- package/dist/{cjs/types → es/src}/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +4 -6
- package/dist/{cjs/types → es/src}/components/Form/Checkbox/Checkbox.d.ts +4 -7
- package/dist/es/src/components/Form/CheckboxGroup/CheckboxGroup.d.ts +12 -0
- package/dist/es/src/components/Form/CheckboxGroup/checkboxgroup.interface.d.ts +8 -0
- package/dist/{cjs/types → es/src}/components/Form/DatePicker/DatePicker.d.ts +1 -1
- package/dist/es/{types → src}/components/Form/MultiSelect/MultiSelect.d.ts +4 -7
- package/dist/{cjs/types → es/src}/components/Form/RadioGroup/RadioGroup.d.ts +2 -5
- package/dist/es/src/components/Form/Select/Select.d.ts +22 -0
- package/dist/{cjs/types → es/src}/components/Form/Switch/Switch.d.ts +1 -4
- package/dist/es/{types → src}/components/Form/TextField/TextField.d.ts +5 -6
- package/dist/es/src/components/Form/TimePicker/TimePicker.d.ts +20 -0
- package/dist/es/src/components/Form/TimePicker/index.d.ts +1 -0
- package/dist/es/src/components/IconButton/IconButton.d.ts +17 -0
- package/dist/{cjs/types → es/src}/components/IconProvider/IconProvider.d.ts +1 -4
- package/dist/es/{types → src}/components/Link/Link.d.ts +1 -4
- package/dist/es/src/components/MenuItem/MenuItem.d.ts +10 -0
- package/dist/es/{types → src}/components/Modal/Dialog/Dialog.d.ts +1 -1
- package/dist/es/{types → src}/components/Modal/Drawer/Drawer.d.ts +1 -1
- package/dist/{cjs/types → es/src}/components/Navigation/Stepper/Step.d.ts +1 -1
- package/dist/{cjs/types → es/src}/components/Navigation/Stepper/Stepper.d.ts +1 -1
- package/dist/es/src/components/Pagination/Pagination.d.ts +13 -0
- package/dist/{cjs/types → es/src}/components/Snackbar/Snackbar.d.ts +1 -4
- package/dist/{cjs/types → es/src}/components/Text/Text.d.ts +1 -4
- package/dist/es/src/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/{cjs/types → es/src}/components/UploadDocument/FileUploaderSingle.d.ts +10 -11
- package/dist/es/src/components/UploadDocument/fileuploadersingle.interface.d.ts +5 -0
- package/dist/{cjs/types → es/src}/components/index.d.ts +2 -0
- package/dist/{cjs/types → es/src}/helpers/GooglePickerWrapper.d.ts +2 -1
- package/dist/es/src/hooks/useGooleDrivePicker.d.ts +4 -0
- package/dist/es/src/index.d.ts +4 -0
- package/package.json +30 -35
- package/src/DesignSystemProvider.tsx +2 -1
- package/src/components/Accordion/Accordion.tsx +4 -4
- package/src/components/BannerNotification/BannerNotification.tsx +1 -3
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +2 -4
- package/src/components/Button/Button.tsx +0 -2
- package/src/components/Chip/Chip.tsx +2 -4
- package/src/components/Datatable/Datatable.tsx +31 -9
- package/src/components/Datatable/DatatableCellRender.tsx +4 -3
- package/src/components/Datatable/datatable.interface.ts +5 -4
- package/src/components/Datatable/use-pagination-props.hook.ts +2 -2
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +2 -4
- package/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.tsx +37 -12
- package/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.tsx +28 -11
- package/src/components/Form/Checkbox/Checkbox.tsx +24 -27
- package/src/components/Form/CheckboxGroup/CheckboxGroup.tsx +9 -26
- package/src/components/Form/CheckboxGroup/checkboxgroup.interface.ts +22 -0
- package/src/components/Form/DatePicker/DatePicker.tsx +16 -4
- package/src/components/Form/MultiSelect/MultiSelect.tsx +43 -14
- package/src/components/Form/RadioGroup/RadioGroup.tsx +20 -25
- package/src/components/Form/Select/Select.tsx +49 -12
- package/src/components/Form/Switch/Switch.tsx +0 -2
- package/src/components/Form/TextField/TextField.tsx +121 -108
- package/src/components/Form/TimePicker/TimePicker.tsx +228 -0
- package/src/components/Form/TimePicker/index.ts +1 -0
- package/src/components/IconButton/IconButton.tsx +15 -9
- package/src/components/IconProvider/IconProvider.tsx +3 -4
- package/src/components/Link/Link.tsx +0 -2
- package/src/components/MenuItem/MenuItem.tsx +10 -39
- package/src/components/Modal/Dialog/Dialog.tsx +7 -4
- package/src/components/Modal/Drawer/Drawer.tsx +2 -2
- package/src/components/Navigation/Stepper/Step.tsx +4 -3
- package/src/components/Navigation/Stepper/Stepper.tsx +1 -1
- package/src/components/NotistackAdapter/NotistackAdapter.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +9 -14
- package/src/components/Snackbar/Snackbar.tsx +1 -3
- package/src/components/Text/Text.tsx +0 -2
- package/src/components/Tooltip/Tooltip.tsx +41 -32
- package/src/components/UploadDocument/FileUploaderSingle.tsx +97 -55
- package/src/components/UploadDocument/fileuploadersingle.interface.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/helpers/GooglePickerWrapper.tsx +3 -3
- package/src/hooks/useGooleDrivePicker.ts +10 -8
- package/src/index.ts +3 -5
- package/src/types/global.d.ts +6 -4
- package/src/types/googleDrive.ts +1 -0
- package/dist/cjs/types/components/BannerNotification/BannerNotification.d.ts +0 -11
- package/dist/cjs/types/components/Breadcrumbs/Breadcrumbs.d.ts +0 -15
- package/dist/cjs/types/components/Chip/Chip.d.ts +0 -19
- package/dist/cjs/types/components/Datatable/Datatable.d.ts +0 -4
- package/dist/cjs/types/components/Datatable/datatable.interface.d.ts +0 -53
- package/dist/cjs/types/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +0 -18
- package/dist/cjs/types/components/Form/CheckboxGroup/CheckboxGroup.d.ts +0 -20
- package/dist/cjs/types/components/Form/MultiSelect/MultiSelect.d.ts +0 -23
- package/dist/cjs/types/components/Form/Select/Select.d.ts +0 -22
- package/dist/cjs/types/components/Form/TextField/TextField.d.ts +0 -21
- package/dist/cjs/types/components/IconButton/IconButton.d.ts +0 -19
- package/dist/cjs/types/components/Link/Link.d.ts +0 -11
- package/dist/cjs/types/components/MenuItem/MenuItem.d.ts +0 -13
- package/dist/cjs/types/components/Modal/Dialog/Dialog.d.ts +0 -4
- package/dist/cjs/types/components/Modal/Drawer/Drawer.d.ts +0 -4
- package/dist/cjs/types/components/Pagination/Pagination.d.ts +0 -16
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +0 -13
- package/dist/cjs/types/helpers/dataGetValue.d.ts +0 -2
- package/dist/cjs/types/hooks/useGooleDrivePicker.d.ts +0 -4
- package/dist/cjs/types/index.d.ts +0 -2
- package/dist/es/index.mjs +0 -106
- package/dist/es/index.mjs.map +0 -1
- package/dist/es/types/DesignSystemProvider.d.ts +0 -13
- package/dist/es/types/components/Accordion/Accordion.d.ts +0 -15
- package/dist/es/types/components/Accordion/index.d.ts +0 -1
- package/dist/es/types/components/BannerNotification/index.d.ts +0 -1
- package/dist/es/types/components/Breadcrumbs/index.d.ts +0 -1
- package/dist/es/types/components/Button/Button.d.ts +0 -11
- package/dist/es/types/components/Button/index.d.ts +0 -1
- package/dist/es/types/components/Chip/index.d.ts +0 -1
- package/dist/es/types/components/Datatable/DatatableCellRender.d.ts +0 -4
- package/dist/es/types/components/Datatable/index.d.ts +0 -1
- package/dist/es/types/components/Datatable/use-pagination-props.hook.d.ts +0 -3
- package/dist/es/types/components/EmbbededNotification/EmbeddedNotification.d.ts +0 -13
- package/dist/es/types/components/EmbbededNotification/index.d.ts +0 -1
- package/dist/es/types/components/Form/AutoCompleteMulti/index.d.ts +0 -1
- package/dist/es/types/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +0 -19
- package/dist/es/types/components/Form/AutoCompleteSingle/index.d.ts +0 -1
- package/dist/es/types/components/Form/Checkbox/Checkbox.d.ts +0 -17
- package/dist/es/types/components/Form/Checkbox/index.d.ts +0 -1
- package/dist/es/types/components/Form/CheckboxGroup/CheckboxGroup.d.ts +0 -20
- package/dist/es/types/components/Form/CheckboxGroup/index.d.ts +0 -1
- package/dist/es/types/components/Form/DatePicker/DatePicker.d.ts +0 -15
- package/dist/es/types/components/Form/DatePicker/index.d.ts +0 -1
- package/dist/es/types/components/Form/MultiSelect/index.d.ts +0 -1
- package/dist/es/types/components/Form/RadioGroup/RadioGroup.d.ts +0 -21
- package/dist/es/types/components/Form/RadioGroup/index.d.ts +0 -1
- package/dist/es/types/components/Form/Select/Select.d.ts +0 -22
- package/dist/es/types/components/Form/Select/index.d.ts +0 -1
- package/dist/es/types/components/Form/Switch/Switch.d.ts +0 -13
- package/dist/es/types/components/Form/Switch/index.d.ts +0 -1
- package/dist/es/types/components/Form/TextField/index.d.ts +0 -1
- package/dist/es/types/components/IconButton/IconButton.d.ts +0 -19
- package/dist/es/types/components/IconButton/index.d.ts +0 -1
- package/dist/es/types/components/IconProvider/IconProvider.d.ts +0 -22
- package/dist/es/types/components/IconProvider/index.d.ts +0 -1
- package/dist/es/types/components/Link/index.d.ts +0 -1
- package/dist/es/types/components/MenuItem/MenuItem.d.ts +0 -13
- package/dist/es/types/components/MenuItem/index.d.ts +0 -1
- package/dist/es/types/components/Modal/Dialog/index.d.ts +0 -1
- package/dist/es/types/components/Modal/Drawer/index.d.ts +0 -1
- package/dist/es/types/components/Modal/modal.interface.d.ts +0 -24
- package/dist/es/types/components/Navigation/Stepper/Step.d.ts +0 -7
- package/dist/es/types/components/Navigation/Stepper/Stepper.d.ts +0 -11
- package/dist/es/types/components/Navigation/Stepper/index.d.ts +0 -1
- package/dist/es/types/components/Navigation/Stepper/stepper.helper.d.ts +0 -2
- package/dist/es/types/components/Navigation/Stepper/stepper.interface.d.ts +0 -12
- package/dist/es/types/components/NotistackAdapter/NotistackAdapter.d.ts +0 -4
- package/dist/es/types/components/NotistackAdapter/index.d.ts +0 -1
- package/dist/es/types/components/Pagination/Pagination.d.ts +0 -16
- package/dist/es/types/components/Pagination/index.d.ts +0 -1
- package/dist/es/types/components/Pagination/pagination.helper.d.ts +0 -1
- package/dist/es/types/components/Snackbar/Snackbar.d.ts +0 -11
- package/dist/es/types/components/Snackbar/index.d.ts +0 -1
- package/dist/es/types/components/Text/Text.d.ts +0 -11
- package/dist/es/types/components/Text/index.d.ts +0 -1
- package/dist/es/types/components/Tooltip/Tooltip.d.ts +0 -13
- package/dist/es/types/components/Tooltip/index.d.ts +0 -1
- package/dist/es/types/components/Tooltip/tooltip.interface.d.ts +0 -1
- package/dist/es/types/components/UploadDocument/FileUploaderSingle.d.ts +0 -78
- package/dist/es/types/components/UploadDocument/index.d.ts +0 -1
- package/dist/es/types/components/index.d.ts +0 -31
- package/dist/es/types/helpers/GooglePickerWrapper.d.ts +0 -13
- package/dist/es/types/helpers/dataGetValue.d.ts +0 -2
- package/dist/es/types/hooks/useGooleDrivePicker.d.ts +0 -4
- package/dist/es/types/index.d.ts +0 -2
- package/dist/es/types/types/googleDrive.d.ts +0 -133
- package/src/helpers/dataGetValue.ts +0 -22
- /package/dist/{cjs/types → es/src}/DesignSystemProvider.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Accordion/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/BannerNotification/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Breadcrumbs/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Button/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Chip/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/DatatableCellRender.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/use-pagination-props.hook.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/EmbbededNotification/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/AutoCompleteMulti/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/AutoCompleteSingle/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Checkbox/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/CheckboxGroup/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/DatePicker/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/MultiSelect/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/RadioGroup/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Select/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Switch/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/TextField/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/IconButton/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/IconProvider/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Link/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/MenuItem/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/Dialog/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/Drawer/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/modal.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/stepper.helper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/stepper.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/NotistackAdapter/NotistackAdapter.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/NotistackAdapter/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Pagination/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Pagination/pagination.helper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Snackbar/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Text/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Tooltip/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Tooltip/tooltip.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/UploadDocument/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/types/googleDrive.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,73 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@
|
|
8
|
-
"@babel/
|
|
9
|
-
"@babel/preset-
|
|
10
|
-
"@babel/preset-
|
|
11
|
-
"@
|
|
12
|
-
"@mdx-js/react": "^3.0
|
|
13
|
-
"@types/google.picker": "^0.0.
|
|
14
|
-
"@types/lodash": "^4.17.
|
|
15
|
-
"@types/react": "^18.3.
|
|
7
|
+
"@babel/core": "^7.26.0",
|
|
8
|
+
"@babel/preset-env": "^7.26.0",
|
|
9
|
+
"@babel/preset-react": "^7.25.9",
|
|
10
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
11
|
+
"@groupeactual/code-quality-front": "^1.3.0",
|
|
12
|
+
"@mdx-js/react": "^3.1.0",
|
|
13
|
+
"@types/google.picker": "^0.0.46",
|
|
14
|
+
"@types/lodash": "^4.17.13",
|
|
15
|
+
"@types/react": "^18.3.12",
|
|
16
16
|
"@types/styled-components": "^5.1.34",
|
|
17
|
-
"babel-loader": "^9.1
|
|
17
|
+
"babel-loader": "^9.2.1",
|
|
18
18
|
"clsx": "^2.1.1",
|
|
19
19
|
"css-loader": "^7.1.2",
|
|
20
|
-
"framer-motion": "^11.
|
|
20
|
+
"framer-motion": "^11.11.17",
|
|
21
21
|
"identity-obj-proxy": "^3.0.0",
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
|
-
"postcss": "^8.4.
|
|
23
|
+
"postcss": "^8.4.49",
|
|
24
24
|
"prettier": "^3.3.3",
|
|
25
25
|
"prop-types": "^15.8.1",
|
|
26
|
-
"
|
|
27
|
-
"sass": "^
|
|
28
|
-
"sass-loader": "^16.0.1",
|
|
26
|
+
"sass": "^1.81.0",
|
|
27
|
+
"sass-loader": "^16.0.3",
|
|
29
28
|
"style-loader": "^4.0.0",
|
|
30
|
-
"styled-components": "^6.1.
|
|
31
|
-
"tslib": "^2.
|
|
32
|
-
"typescript": "^5.
|
|
29
|
+
"styled-components": "^6.1.13",
|
|
30
|
+
"tslib": "^2.8.1",
|
|
31
|
+
"typescript": "^5.6.3"
|
|
33
32
|
},
|
|
34
33
|
"main": "dist/cjs/index.js",
|
|
35
|
-
"module": "dist/es/index.
|
|
34
|
+
"module": "dist/es/index.js",
|
|
36
35
|
"files": [
|
|
37
36
|
"dist",
|
|
38
37
|
"src"
|
|
39
38
|
],
|
|
40
|
-
"types": "dist/es/
|
|
39
|
+
"types": "dist/es/index.d.ts",
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@emotion/is-prop-valid": "^1.3.
|
|
41
|
+
"@emotion/is-prop-valid": "^1.3.1",
|
|
43
42
|
"@emotion/react": "^11.13.3",
|
|
44
|
-
"@emotion/serialize": "^1.3.
|
|
43
|
+
"@emotion/serialize": "^1.3.2",
|
|
45
44
|
"@emotion/styled": "^11.13.0",
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
45
|
+
"@fortawesome/fontawesome-svg-core": "6.6.0",
|
|
46
|
+
"@fortawesome/free-brands-svg-icons": "6.6.0",
|
|
49
47
|
"@fortawesome/pro-regular-svg-icons": "git+https://github.com/actualtysoft/pro-regular-svg-icons.git#6.4.2",
|
|
50
48
|
"@fortawesome/pro-solid-svg-icons": "git+https://github.com/actualtysoft/pro-solid-svg-icons.git#6.4.2",
|
|
51
|
-
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
52
49
|
"@mui/material": "^5.16.7",
|
|
53
50
|
"@mui/system": "^5.16.7",
|
|
54
51
|
"@mui/x-date-pickers": "^7.15.0",
|
|
55
52
|
"@mui/x-date-pickers-pro": "^7.15.0",
|
|
53
|
+
"@react-oauth/google": "^0.12.1",
|
|
56
54
|
"dayjs": "^1.11.13",
|
|
57
55
|
"notistack": "^3.0.1",
|
|
58
56
|
"react": "^18.3.1",
|
|
59
57
|
"react-dom": "^18.3.1",
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"react": "^18.3.1",
|
|
64
|
-
"react-dom": "^18.3.1"
|
|
58
|
+
"react-google-picker": "^0.1.0",
|
|
59
|
+
"@groupeactual/design-tokens": "1.7.0-beta.3"
|
|
65
60
|
},
|
|
66
61
|
"scripts": {
|
|
67
62
|
"build": "rollup -c",
|
|
68
|
-
"build:watch": "rollup -c -w",
|
|
69
|
-
"dev": "npm run build:watch
|
|
70
|
-
"eslint": "eslint
|
|
63
|
+
"build:watch": "rollup --bundleConfigAsCjs -c -w",
|
|
64
|
+
"dev": "npm run build:watch",
|
|
65
|
+
"eslint": "eslint --config \"eslint.config.js\" --color \".\"",
|
|
71
66
|
"lint": "npm run eslint"
|
|
72
67
|
}
|
|
73
68
|
}
|
|
@@ -35,7 +35,8 @@ const MaterialThemeProvider = ({ children }: PropsWithChildren<unknown>) => {
|
|
|
35
35
|
const { themeName } =
|
|
36
36
|
useContext<DesignSystemContextValues>(DesignSystemContext);
|
|
37
37
|
const { muiTokens } = useMaterialThemeTokens(themeName);
|
|
38
|
-
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
const theme = createTheme(muiTokens as any);
|
|
39
40
|
|
|
40
41
|
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
|
|
41
42
|
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
useTheme,
|
|
18
18
|
} from '@mui/material';
|
|
19
19
|
|
|
20
|
-
import
|
|
20
|
+
import IconButton from '@/components/IconButton';
|
|
21
21
|
|
|
22
22
|
interface Props extends AccordionProps {
|
|
23
23
|
title?: string;
|
|
@@ -64,7 +64,9 @@ const Accordion = ({
|
|
|
64
64
|
{...props}
|
|
65
65
|
>
|
|
66
66
|
<AccordionSummary
|
|
67
|
-
expandIcon={
|
|
67
|
+
expandIcon={
|
|
68
|
+
<IconButton variant="table" size="medium" icon={faChevronDown} />
|
|
69
|
+
}
|
|
68
70
|
sx={{
|
|
69
71
|
fontWeight: 500,
|
|
70
72
|
fontSize: 18,
|
|
@@ -87,6 +89,4 @@ const Accordion = ({
|
|
|
87
89
|
);
|
|
88
90
|
};
|
|
89
91
|
|
|
90
|
-
Accordion.displayName = 'Accordion';
|
|
91
|
-
|
|
92
92
|
export default Accordion;
|
|
@@ -4,7 +4,7 @@ import { faBell, faTimes } from '@fortawesome/pro-solid-svg-icons';
|
|
|
4
4
|
import { BannerNotificationStyle } from '@groupeactual/design-tokens';
|
|
5
5
|
import { Alert, AlertProps, styled, useTheme } from '@mui/material';
|
|
6
6
|
|
|
7
|
-
import IconProvider from '
|
|
7
|
+
import IconProvider from '@/components/IconProvider';
|
|
8
8
|
|
|
9
9
|
interface Props extends AlertProps {
|
|
10
10
|
text: string;
|
|
@@ -30,6 +30,4 @@ const BannerNotification = ({ text, severity, onClose }: Props) => {
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
BannerNotification.displayName = 'BannerNotification';
|
|
34
|
-
|
|
35
33
|
export default BannerNotification;
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
useTheme,
|
|
9
9
|
} from '@mui/material';
|
|
10
10
|
|
|
11
|
-
import Link from '
|
|
12
|
-
import Text from '
|
|
11
|
+
import Link from '@/components/Link';
|
|
12
|
+
import Text from '@/components/Text';
|
|
13
13
|
|
|
14
14
|
interface LinkItem {
|
|
15
15
|
link: string;
|
|
@@ -42,6 +42,4 @@ const Breadcrumbs = ({ PageName, links, ...props }: Props) => {
|
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
46
|
-
|
|
47
45
|
export default Breadcrumbs;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useTheme,
|
|
12
12
|
} from '@mui/material';
|
|
13
13
|
|
|
14
|
-
import IconProvider from '
|
|
14
|
+
import IconProvider from '@/components/IconProvider';
|
|
15
15
|
|
|
16
16
|
interface Props
|
|
17
17
|
extends Omit<
|
|
@@ -22,7 +22,7 @@ interface Props
|
|
|
22
22
|
label: string;
|
|
23
23
|
prefixIcon?: IconDefinition;
|
|
24
24
|
suffixIcon?: IconDefinition;
|
|
25
|
-
suffixAction?: (
|
|
25
|
+
suffixAction?: (_e: MouseEvent) => void;
|
|
26
26
|
suffixTooltip?: string;
|
|
27
27
|
tooltip?: string;
|
|
28
28
|
maxWidth?: string | number;
|
|
@@ -145,6 +145,4 @@ const Chip = ({
|
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
Chip.displayName = 'Chip';
|
|
149
|
-
|
|
150
148
|
export default Chip;
|
|
@@ -18,9 +18,10 @@ import {
|
|
|
18
18
|
useTheme,
|
|
19
19
|
} from '@mui/material';
|
|
20
20
|
|
|
21
|
-
import IconButton from '
|
|
22
|
-
import Pagination from '
|
|
23
|
-
import Text from '
|
|
21
|
+
import IconButton from '@/components/IconButton';
|
|
22
|
+
import Pagination from '@/components/Pagination';
|
|
23
|
+
import Text from '@/components/Text';
|
|
24
|
+
|
|
24
25
|
import { RowDetail as D, Props } from './datatable.interface';
|
|
25
26
|
import usePaginationProps from './use-pagination-props.hook';
|
|
26
27
|
|
|
@@ -31,6 +32,7 @@ const Datatable = <T extends object>({
|
|
|
31
32
|
withHeader = false,
|
|
32
33
|
withPagination,
|
|
33
34
|
columns,
|
|
35
|
+
isTableLayoutFixed = false,
|
|
34
36
|
...props
|
|
35
37
|
}: Props<T>) => {
|
|
36
38
|
const { trans, limits, withTopPagination, setPage, setLimit } =
|
|
@@ -83,8 +85,14 @@ const Datatable = <T extends object>({
|
|
|
83
85
|
return (
|
|
84
86
|
<StyledDatatable>
|
|
85
87
|
{withTopPagination && <SyncedPagination />}
|
|
86
|
-
<TableContainer
|
|
87
|
-
|
|
88
|
+
<TableContainer
|
|
89
|
+
sx={{ display: 'flex', maxWidth: '100%', overflow: 'auto' }}
|
|
90
|
+
>
|
|
91
|
+
<Table
|
|
92
|
+
sx={{
|
|
93
|
+
tableLayout: isTableLayoutFixed ? 'fixed' : 'auto',
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
88
96
|
{withHeader && (
|
|
89
97
|
<TableHead>
|
|
90
98
|
<TableRow data-testid="datatable-head-row">
|
|
@@ -103,8 +111,9 @@ const Datatable = <T extends object>({
|
|
|
103
111
|
key={name}
|
|
104
112
|
variant="head"
|
|
105
113
|
sx={{
|
|
114
|
+
overflow: 'hidden',
|
|
115
|
+
textOverflow: 'ellipsis',
|
|
106
116
|
width: width,
|
|
107
|
-
maxWidth: width,
|
|
108
117
|
height: hasTopTitle ? '55px' : 'inherit',
|
|
109
118
|
}}
|
|
110
119
|
>
|
|
@@ -170,8 +179,10 @@ const Datatable = <T extends object>({
|
|
|
170
179
|
key={name}
|
|
171
180
|
variant="body"
|
|
172
181
|
sx={{
|
|
182
|
+
overflow: 'hidden',
|
|
183
|
+
textOverflow: 'ellipsis',
|
|
184
|
+
borderColor: 'greyLightDefaultBorder',
|
|
173
185
|
width: width,
|
|
174
|
-
maxWidth: width,
|
|
175
186
|
border:
|
|
176
187
|
'details' in record && record.details
|
|
177
188
|
? '0px'
|
|
@@ -183,8 +194,19 @@ const Datatable = <T extends object>({
|
|
|
183
194
|
))}
|
|
184
195
|
</TableRow>
|
|
185
196
|
{'details' in record && record.details && (
|
|
186
|
-
<TableRow
|
|
187
|
-
|
|
197
|
+
<TableRow
|
|
198
|
+
sx={{
|
|
199
|
+
borderBottom: '1px solid',
|
|
200
|
+
width: record.width,
|
|
201
|
+
borderColor: 'greyLightDefaultBorder',
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
<TableCell
|
|
205
|
+
sx={{
|
|
206
|
+
columnSpan: columns.length,
|
|
207
|
+
borderBottom: 'none',
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
188
210
|
{record.details}
|
|
189
211
|
</TableCell>
|
|
190
212
|
</TableRow>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import Text from '
|
|
4
|
-
import Tooltip from '
|
|
3
|
+
import Text from '@/components/Text';
|
|
4
|
+
import Tooltip from '@/components/Tooltip';
|
|
5
5
|
|
|
6
6
|
const DatatableCellRender = ({ data }: { data: string }): JSX.Element => {
|
|
7
7
|
if (!data) {
|
|
@@ -9,8 +9,9 @@ const DatatableCellRender = ({ data }: { data: string }): JSX.Element => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Tooltip title={data} placement="
|
|
12
|
+
<Tooltip title={data} placement="bottom-start">
|
|
13
13
|
<Text
|
|
14
|
+
variant="body2Regular"
|
|
14
15
|
style={{
|
|
15
16
|
whiteSpace: 'nowrap',
|
|
16
17
|
overflow: 'hidden',
|
|
@@ -14,7 +14,7 @@ export interface PaginationTrans {
|
|
|
14
14
|
|
|
15
15
|
export type ColumnDatatable<T> = {
|
|
16
16
|
name: string;
|
|
17
|
-
render: (
|
|
17
|
+
render: (_record: T) => JSX.Element;
|
|
18
18
|
title?: string;
|
|
19
19
|
topTitle?: string;
|
|
20
20
|
width?: string;
|
|
@@ -30,7 +30,8 @@ type BaseProps<T> = {
|
|
|
30
30
|
withPagination: boolean;
|
|
31
31
|
withHeader?: boolean;
|
|
32
32
|
sortInfo?: SortInfo | null;
|
|
33
|
-
|
|
33
|
+
isTableLayoutFixed?: boolean;
|
|
34
|
+
onSort?: (_info: SortInfo | null) => void;
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
type WithoutPaginationProps = {
|
|
@@ -39,8 +40,8 @@ type WithoutPaginationProps = {
|
|
|
39
40
|
|
|
40
41
|
export type PaginationProps = {
|
|
41
42
|
withPagination: true;
|
|
42
|
-
setPage: (
|
|
43
|
-
setLimit: (
|
|
43
|
+
setPage: (_page: number) => void;
|
|
44
|
+
setLimit: (_limit: number) => void;
|
|
44
45
|
trans: PaginationTrans;
|
|
45
46
|
withTopPagination?: boolean;
|
|
46
47
|
limits?: number[];
|
|
@@ -7,8 +7,8 @@ const usePaginationProps = <T extends object>(
|
|
|
7
7
|
let trans = {} as PaginationTrans;
|
|
8
8
|
let limits: number[] = [3, 5, 10, 20];
|
|
9
9
|
let withTopPagination = false;
|
|
10
|
-
let setPage: (
|
|
11
|
-
let setLimit: (
|
|
10
|
+
let setPage: (_page: number) => void = () => {};
|
|
11
|
+
let setLimit: (_limit: number) => void = () => {};
|
|
12
12
|
|
|
13
13
|
if ('trans' in props && props.trans) {
|
|
14
14
|
trans = props.trans;
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
import { Box } from '@mui/material';
|
|
11
11
|
import { BoxProps } from '@mui/system';
|
|
12
12
|
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import Text from '@/components//Text';
|
|
14
|
+
import Icon from '@/components/IconProvider';
|
|
15
15
|
|
|
16
16
|
interface Props extends BoxProps {
|
|
17
17
|
variant: 'warning' | 'error' | 'success' | 'infos';
|
|
@@ -99,6 +99,4 @@ const EmbeddedNotification = ({
|
|
|
99
99
|
);
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
EmbeddedNotification.displayName = 'EmbeddedNotification';
|
|
103
|
-
|
|
104
102
|
export default EmbeddedNotification;
|
|
@@ -3,9 +3,10 @@ import React, { useMemo, useRef } from 'react';
|
|
|
3
3
|
import {
|
|
4
4
|
faCheck,
|
|
5
5
|
faChevronDown,
|
|
6
|
-
|
|
6
|
+
faSearch,
|
|
7
7
|
faTimes,
|
|
8
|
-
} from '@fortawesome/pro-
|
|
8
|
+
} from '@fortawesome/pro-regular-svg-icons';
|
|
9
|
+
import { faCircleX } from '@fortawesome/pro-solid-svg-icons';
|
|
9
10
|
import { AutoCompleteStyle } from '@groupeactual/design-tokens';
|
|
10
11
|
import {
|
|
11
12
|
type AutocompleteProps,
|
|
@@ -19,26 +20,33 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|
|
19
20
|
import Box from '@mui/material/Box';
|
|
20
21
|
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
21
22
|
|
|
22
|
-
import Chip from '
|
|
23
|
-
import IconProvider from '
|
|
23
|
+
import Chip from '@/components/Chip';
|
|
24
|
+
import IconProvider from '@/components/IconProvider';
|
|
24
25
|
|
|
25
26
|
interface AutocompleteMultipleSelectProps<T>
|
|
26
27
|
extends Omit<
|
|
27
28
|
AutocompleteProps<T, true, true, false>,
|
|
28
|
-
|
|
29
|
+
| 'onChange'
|
|
30
|
+
| 'value'
|
|
31
|
+
| 'options'
|
|
32
|
+
| 'renderInput'
|
|
33
|
+
| 'error'
|
|
34
|
+
| 'autocomplete'
|
|
35
|
+
| 'searchIcon'
|
|
29
36
|
> {
|
|
30
37
|
value: T[] | undefined;
|
|
31
38
|
label?: string;
|
|
32
39
|
helperText?: string;
|
|
33
40
|
placeholder?: string;
|
|
34
41
|
options: T[];
|
|
35
|
-
getOptionLabel: (
|
|
36
|
-
getKeyValue: (
|
|
37
|
-
onChange: (
|
|
38
|
-
getOptionDisabled?: (
|
|
42
|
+
getOptionLabel: (_option: T) => string;
|
|
43
|
+
getKeyValue: (_option: T) => string;
|
|
44
|
+
onChange: (_value: T[]) => void;
|
|
45
|
+
getOptionDisabled?: (_option: T) => boolean;
|
|
39
46
|
color?: 'success';
|
|
40
47
|
width?: number | string;
|
|
41
48
|
error?: string;
|
|
49
|
+
searchIcon?: boolean;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
const AutocompleteMultipleSelect = <T,>({
|
|
@@ -55,6 +63,7 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
55
63
|
color,
|
|
56
64
|
helperText,
|
|
57
65
|
error,
|
|
66
|
+
searchIcon = false,
|
|
58
67
|
...props
|
|
59
68
|
}: AutocompleteMultipleSelectProps<T>) => {
|
|
60
69
|
const theme = useTheme();
|
|
@@ -105,6 +114,16 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
105
114
|
return classNames.filter(Boolean).join(' ');
|
|
106
115
|
}, [error, color, value]);
|
|
107
116
|
|
|
117
|
+
const getPopupIcon = useMemo(() => {
|
|
118
|
+
if (color === 'success') {
|
|
119
|
+
return faCheck;
|
|
120
|
+
} else if (searchIcon) {
|
|
121
|
+
return faSearch;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return faChevronDown;
|
|
125
|
+
}, [color, searchIcon]);
|
|
126
|
+
|
|
108
127
|
const withPlaceholder = !value?.length && !!placeholder;
|
|
109
128
|
const boxRef = useRef<HTMLHeadingElement>(null);
|
|
110
129
|
|
|
@@ -122,12 +141,18 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
122
141
|
aria-placeholder={(withPlaceholder && placeholder) || ''}
|
|
123
142
|
disableCloseOnSelect
|
|
124
143
|
multiple
|
|
144
|
+
sx={{
|
|
145
|
+
...props.sx,
|
|
146
|
+
'& .MuiAutocomplete-popupIndicator': { transform: 'none' },
|
|
147
|
+
}}
|
|
125
148
|
disabled={disabled}
|
|
126
149
|
options={options}
|
|
127
150
|
slotProps={{
|
|
128
151
|
paper: {
|
|
129
152
|
sx: {
|
|
130
|
-
|
|
153
|
+
fontSize: '14px',
|
|
154
|
+
marginTop: '4px',
|
|
155
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
131
156
|
},
|
|
132
157
|
},
|
|
133
158
|
}}
|
|
@@ -147,8 +172,8 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
147
172
|
popupIcon={
|
|
148
173
|
<IconProvider
|
|
149
174
|
className={disabled ? 'Mui-disabled SelectIcon' : 'SelectIcon'}
|
|
150
|
-
icon={
|
|
151
|
-
size=
|
|
175
|
+
icon={getPopupIcon}
|
|
176
|
+
size="md"
|
|
152
177
|
/>
|
|
153
178
|
}
|
|
154
179
|
renderTags={(tag: T[]) => {
|
|
@@ -3,8 +3,9 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
import {
|
|
4
4
|
faCheck,
|
|
5
5
|
faChevronDown,
|
|
6
|
+
faSearch,
|
|
6
7
|
faTimes,
|
|
7
|
-
} from '@fortawesome/pro-
|
|
8
|
+
} from '@fortawesome/pro-regular-svg-icons';
|
|
8
9
|
import { AutoCompleteStyle } from '@groupeactual/design-tokens';
|
|
9
10
|
import {
|
|
10
11
|
Autocomplete,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
useTheme,
|
|
20
21
|
} from '@mui/material';
|
|
21
22
|
|
|
22
|
-
import IconProvider from '
|
|
23
|
+
import IconProvider from '@/components/IconProvider';
|
|
23
24
|
|
|
24
25
|
interface Props<T>
|
|
25
26
|
extends Omit<
|
|
@@ -37,11 +38,12 @@ interface Props<T>
|
|
|
37
38
|
color?: 'success';
|
|
38
39
|
placeholder?: string;
|
|
39
40
|
// * Issue on MUI : MUI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string
|
|
40
|
-
getOptionLabel: (
|
|
41
|
-
onChange: (
|
|
41
|
+
getOptionLabel: (_option: T) => string | null | undefined;
|
|
42
|
+
onChange: (_value: T | null) => void;
|
|
42
43
|
value?: T | null;
|
|
43
44
|
width?: number | string;
|
|
44
45
|
error?: string;
|
|
46
|
+
searchIcon?: boolean;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
const AutoCompleteSingle = <T,>({
|
|
@@ -56,6 +58,7 @@ const AutoCompleteSingle = <T,>({
|
|
|
56
58
|
color,
|
|
57
59
|
helperText,
|
|
58
60
|
error,
|
|
61
|
+
searchIcon = false,
|
|
59
62
|
...props
|
|
60
63
|
}: Props<T>) => {
|
|
61
64
|
const theme = useTheme();
|
|
@@ -111,6 +114,16 @@ const AutoCompleteSingle = <T,>({
|
|
|
111
114
|
return classNames.filter(Boolean).join(' ');
|
|
112
115
|
}, [color, placeholder, value]);
|
|
113
116
|
|
|
117
|
+
const getPopupIcon = useMemo(() => {
|
|
118
|
+
if (color === 'success') {
|
|
119
|
+
return faCheck;
|
|
120
|
+
} else if (searchIcon) {
|
|
121
|
+
return faSearch;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return faChevronDown;
|
|
125
|
+
}, [color, searchIcon]);
|
|
126
|
+
|
|
114
127
|
return (
|
|
115
128
|
<Box sx={{ width }}>
|
|
116
129
|
<StyledAutoCompleteForm
|
|
@@ -120,21 +133,25 @@ const AutoCompleteSingle = <T,>({
|
|
|
120
133
|
>
|
|
121
134
|
<Autocomplete
|
|
122
135
|
{...props}
|
|
123
|
-
value={isValueLabelNotEmpty && value || null}
|
|
136
|
+
value={(isValueLabelNotEmpty && value) || null}
|
|
124
137
|
onChange={handleValueChange}
|
|
125
138
|
aria-placeholder={placeholder}
|
|
126
139
|
disabled={disabled}
|
|
127
140
|
options={options}
|
|
128
141
|
sx={{
|
|
142
|
+
...props.sx,
|
|
129
143
|
'.MuiOutlinedInput-input': {
|
|
130
144
|
marginTop: value ? '0px' : '2px',
|
|
131
145
|
},
|
|
146
|
+
'& .MuiAutocomplete-popupIndicator': { transform: 'none' },
|
|
132
147
|
}}
|
|
133
|
-
getOptionLabel={getOptionLabel as (
|
|
148
|
+
getOptionLabel={getOptionLabel as (_option: T) => string}
|
|
134
149
|
slotProps={{
|
|
135
150
|
paper: {
|
|
136
151
|
sx: {
|
|
137
|
-
|
|
152
|
+
fontSize: '14px',
|
|
153
|
+
marginTop: '4px',
|
|
154
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
138
155
|
},
|
|
139
156
|
},
|
|
140
157
|
}}
|
|
@@ -175,8 +192,8 @@ const AutoCompleteSingle = <T,>({
|
|
|
175
192
|
popupIcon={
|
|
176
193
|
<IconProvider
|
|
177
194
|
className={disabled ? 'icon-disabled SelectIcon' : 'SelectIcon'}
|
|
178
|
-
icon={
|
|
179
|
-
size=
|
|
195
|
+
icon={getPopupIcon}
|
|
196
|
+
size="md"
|
|
180
197
|
/>
|
|
181
198
|
}
|
|
182
199
|
renderInput={(params) => (
|
|
@@ -186,6 +203,8 @@ const AutoCompleteSingle = <T,>({
|
|
|
186
203
|
error={!!error}
|
|
187
204
|
fullWidth
|
|
188
205
|
variant="outlined"
|
|
206
|
+
type="text"
|
|
207
|
+
inputProps={{ ...params.inputProps }}
|
|
189
208
|
InputLabelProps={{
|
|
190
209
|
shrink: (placeholder && true) || undefined,
|
|
191
210
|
disabled: false,
|
|
@@ -205,6 +224,4 @@ const AutoCompleteSingle = <T,>({
|
|
|
205
224
|
);
|
|
206
225
|
};
|
|
207
226
|
|
|
208
|
-
AutoCompleteSingle.displayName = 'AutocompleteSingle';
|
|
209
|
-
|
|
210
227
|
export default AutoCompleteSingle;
|