@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
|
@@ -4,8 +4,9 @@ import { faCheck } from '@fortawesome/pro-regular-svg-icons';
|
|
|
4
4
|
import { faCheckCircle, faDotCircle } from '@fortawesome/pro-solid-svg-icons';
|
|
5
5
|
import { Box, Stack, useTheme } from '@mui/material';
|
|
6
6
|
|
|
7
|
-
import IconProvider from '
|
|
8
|
-
import Text from '
|
|
7
|
+
import IconProvider from '@/components/IconProvider';
|
|
8
|
+
import Text from '@/components/Text';
|
|
9
|
+
|
|
9
10
|
import { stepperItemsToPercent } from './stepper.helper';
|
|
10
11
|
import { Step } from './stepper.interface';
|
|
11
12
|
|
|
@@ -16,7 +17,7 @@ export const StepComponent = ({
|
|
|
16
17
|
}: {
|
|
17
18
|
step: Step;
|
|
18
19
|
canNavigate: boolean;
|
|
19
|
-
onNavigate: (
|
|
20
|
+
onNavigate: (_link: string) => void;
|
|
20
21
|
}) => {
|
|
21
22
|
const percent = stepperItemsToPercent(items);
|
|
22
23
|
const isFullyValidated = percent === 100;
|
|
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { CustomContentProps, SnackbarContent } from 'notistack';
|
|
4
4
|
|
|
5
|
-
import Snackbar from '
|
|
5
|
+
import Snackbar from '@/components/Snackbar';
|
|
6
6
|
|
|
7
7
|
const NotistackAdapter = forwardRef<HTMLDivElement, CustomContentProps>(
|
|
8
8
|
({ message, variant }, ref) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ChangeEvent, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
|
|
3
|
+
import { faCaretDown } from '@fortawesome/pro-solid-svg-icons';
|
|
3
4
|
import { PaginationStyle } from '@groupeactual/design-tokens';
|
|
4
5
|
import {
|
|
5
6
|
Box,
|
|
@@ -9,8 +10,9 @@ import {
|
|
|
9
10
|
useTheme,
|
|
10
11
|
} from '@mui/material';
|
|
11
12
|
|
|
12
|
-
import Select from '
|
|
13
|
-
import Text from '
|
|
13
|
+
import Select from '@/components/Form/Select';
|
|
14
|
+
import Text from '@/components/Text';
|
|
15
|
+
|
|
14
16
|
import { getTotalPages } from './pagination.helper';
|
|
15
17
|
|
|
16
18
|
interface Props {
|
|
@@ -20,8 +22,8 @@ interface Props {
|
|
|
20
22
|
limitsPerPage?: number[];
|
|
21
23
|
page?: number;
|
|
22
24
|
limit?: number;
|
|
23
|
-
setPage?: (
|
|
24
|
-
setLimit?: (
|
|
25
|
+
setPage?: (_page: number) => void;
|
|
26
|
+
setLimit?: (_limit: number) => void;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
const Pagination = ({
|
|
@@ -99,20 +101,15 @@ const Pagination = ({
|
|
|
99
101
|
}}
|
|
100
102
|
/>
|
|
101
103
|
<Select
|
|
102
|
-
label=""
|
|
103
104
|
className="dac-select-label"
|
|
104
105
|
labelId="select-label"
|
|
105
106
|
value={internalLimit}
|
|
107
|
+
inputProps={{ MenuProps: { disableScrollLock: true } }}
|
|
106
108
|
onChange={handleChangeLimit}
|
|
107
109
|
options={limitsPerPage}
|
|
108
110
|
getRenderValue={(value) => value.toString()}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
backgroundColor: 'white',
|
|
112
|
-
'&.MuiInputBase-root': {
|
|
113
|
-
height: '32px !important',
|
|
114
|
-
},
|
|
115
|
-
}}
|
|
111
|
+
popupIcon={faCaretDown}
|
|
112
|
+
width={60}
|
|
116
113
|
/>
|
|
117
114
|
<Text variant="body1" pl="8px">
|
|
118
115
|
{totalPerPageString}
|
|
@@ -142,6 +139,4 @@ const Pagination = ({
|
|
|
142
139
|
);
|
|
143
140
|
};
|
|
144
141
|
|
|
145
|
-
Pagination.displayName = 'Pagination';
|
|
146
|
-
|
|
147
142
|
export default Pagination;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { SnackbarStyle } from '@groupeactual/design-tokens';
|
|
10
10
|
import { Alert, AlertProps, styled, useTheme } from '@mui/material';
|
|
11
11
|
|
|
12
|
-
import IconProvider from '
|
|
12
|
+
import IconProvider from '@/components/IconProvider';
|
|
13
13
|
|
|
14
14
|
interface Props extends Omit<AlertProps, 'severity' | 'text'> {
|
|
15
15
|
text: string | React.ReactNode;
|
|
@@ -45,6 +45,4 @@ const Snackbar = ({ text, severity }: Props) => {
|
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
Snackbar.displayName = 'Snackbar';
|
|
49
|
-
|
|
50
48
|
export default Snackbar;
|
|
@@ -1,65 +1,74 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Box,
|
|
5
5
|
Tooltip as TooltipMui,
|
|
6
6
|
TooltipProps,
|
|
7
|
-
styled,
|
|
8
7
|
tooltipClasses,
|
|
9
8
|
} from '@mui/material';
|
|
10
9
|
|
|
11
10
|
import { Placement } from './tooltip.interface';
|
|
12
11
|
|
|
13
12
|
interface Props extends Omit<TooltipProps, 'icon' | 'children' | 'placement'> {
|
|
14
|
-
title:
|
|
15
|
-
children:
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
children: ReactNode;
|
|
16
15
|
placement?: Placement;
|
|
16
|
+
placementMargin?: number;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const Tooltip = ({
|
|
20
20
|
title,
|
|
21
21
|
placement = 'right',
|
|
22
22
|
children,
|
|
23
|
+
placementMargin = 4,
|
|
23
24
|
...tooltipProps
|
|
24
25
|
}: Props) => {
|
|
25
26
|
if (!title) {
|
|
26
27
|
return <>{children}</>;
|
|
27
28
|
}
|
|
28
|
-
const StyledTooltip = styled(({ classes, ...tooltipProps }: TooltipProps) => (
|
|
29
|
-
<TooltipMui {...tooltipProps} classes={classes} />
|
|
30
|
-
))(() => ({
|
|
31
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
32
|
-
backgroundColor: '#272727',
|
|
33
|
-
padding: '4px !important',
|
|
34
|
-
fontFamily: 'Roboto, sans-serif',
|
|
35
|
-
fontSize: '13px',
|
|
36
|
-
color: 'white',
|
|
37
|
-
fontWeight: 400,
|
|
38
|
-
},
|
|
39
|
-
[`& .${tooltipClasses.tooltipPlacementTop}`]: {
|
|
40
|
-
marginBottom: '4px !important',
|
|
41
|
-
},
|
|
42
|
-
[`& .${tooltipClasses.tooltipPlacementRight}`]: {
|
|
43
|
-
marginLeft: '4px !important',
|
|
44
|
-
},
|
|
45
|
-
[`& .${tooltipClasses.tooltipPlacementBottom}`]: {
|
|
46
|
-
marginTop: '4px !important',
|
|
47
|
-
},
|
|
48
|
-
[`& .${tooltipClasses.tooltipPlacementLeft}`]: {
|
|
49
|
-
marginRight: '4px !important',
|
|
50
|
-
},
|
|
51
|
-
}));
|
|
52
29
|
|
|
53
30
|
return (
|
|
54
|
-
<
|
|
55
|
-
placement={placement || undefined}
|
|
31
|
+
<TooltipMui
|
|
56
32
|
title={<>{title}</>}
|
|
57
33
|
{...tooltipProps}
|
|
34
|
+
sx={{
|
|
35
|
+
...tooltipProps.sx,
|
|
36
|
+
display: 'inline-flex',
|
|
37
|
+
}}
|
|
38
|
+
placement={placement || undefined}
|
|
39
|
+
slotProps={{
|
|
40
|
+
popper: {
|
|
41
|
+
sx: {
|
|
42
|
+
[`&.${tooltipClasses.popper} .MuiTooltip-tooltip`]: {
|
|
43
|
+
backgroundColor: 'greyXDark',
|
|
44
|
+
padding: '4px !important',
|
|
45
|
+
fontSize: '12px !important',
|
|
46
|
+
color: 'white',
|
|
47
|
+
fontWeight: 400,
|
|
48
|
+
},
|
|
49
|
+
[`&.${tooltipClasses.popper}[data-popper-placement*="bottom"] .${tooltipClasses.tooltip}`]:
|
|
50
|
+
{
|
|
51
|
+
marginTop: placementMargin + 'px',
|
|
52
|
+
},
|
|
53
|
+
[`&.${tooltipClasses.popper}[data-popper-placement*="top"] .${tooltipClasses.tooltip}`]:
|
|
54
|
+
{
|
|
55
|
+
marginBottom: placementMargin + 'px',
|
|
56
|
+
},
|
|
57
|
+
[`&.${tooltipClasses.popper}[data-popper-placement*="right"] .${tooltipClasses.tooltip}`]:
|
|
58
|
+
{
|
|
59
|
+
marginLeft: placementMargin + 'px',
|
|
60
|
+
},
|
|
61
|
+
[`&.${tooltipClasses.popper}[data-popper-placement*="left"] .${tooltipClasses.tooltip}`]:
|
|
62
|
+
{
|
|
63
|
+
marginRight: placementMargin + 'px',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}}
|
|
58
68
|
>
|
|
59
69
|
<Box component="span">{children}</Box>
|
|
60
|
-
</
|
|
70
|
+
</TooltipMui>
|
|
61
71
|
);
|
|
62
72
|
};
|
|
63
|
-
Tooltip.displayName = 'Tooltip';
|
|
64
73
|
|
|
65
74
|
export default Tooltip;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, {
|
|
2
|
+
ChangeEvent,
|
|
2
3
|
useCallback,
|
|
3
4
|
useEffect,
|
|
4
5
|
useMemo,
|
|
@@ -14,24 +15,27 @@ import {
|
|
|
14
15
|
faUpload,
|
|
15
16
|
} from '@fortawesome/pro-regular-svg-icons';
|
|
16
17
|
import {
|
|
17
|
-
IconDefinition,
|
|
18
18
|
faCaretDown,
|
|
19
19
|
faFileAlt,
|
|
20
|
+
faInfoCircle,
|
|
20
21
|
} from '@fortawesome/pro-solid-svg-icons';
|
|
21
22
|
import { Box, IconButton } from '@mui/material';
|
|
22
23
|
import Menu from '@mui/material/Menu';
|
|
23
24
|
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
|
|
25
|
+
import Button from '@/components/Button';
|
|
26
|
+
import IconProvider from '@/components/IconProvider';
|
|
27
|
+
import MenuItem from '@/components/MenuItem';
|
|
28
|
+
import Text from '@/components/Text';
|
|
29
|
+
import Tooltip from '@/components/Tooltip';
|
|
30
|
+
import GooglePickerWrapper from '@/helpers/GooglePickerWrapper';
|
|
31
|
+
|
|
32
|
+
import { acceptText } from './fileuploadersingle.interface';
|
|
31
33
|
|
|
32
34
|
export interface Props {
|
|
33
|
-
setFile: (
|
|
34
|
-
|
|
35
|
+
setFile: (_file: File | null) => void;
|
|
36
|
+
title?: string;
|
|
37
|
+
titleTooltip?: string;
|
|
38
|
+
enableGoogleDrive?: boolean;
|
|
35
39
|
googleAuthClientId?: string;
|
|
36
40
|
googleApiKey?: string;
|
|
37
41
|
error?: boolean;
|
|
@@ -39,16 +43,16 @@ export interface Props {
|
|
|
39
43
|
fileUrl?: string | null;
|
|
40
44
|
fileName?: string | null;
|
|
41
45
|
accept?: string[];
|
|
42
|
-
acceptText?:
|
|
46
|
+
acceptText?: acceptText;
|
|
43
47
|
disabledInput?: boolean;
|
|
44
|
-
title?: string;
|
|
45
48
|
children?: JSX.Element | null;
|
|
46
49
|
titleAddButton?: string;
|
|
47
|
-
|
|
50
|
+
_isDroppingFile?: boolean; // * Only used for storybook
|
|
51
|
+
validateFile?: (_size: number, _type: string) => boolean;
|
|
48
52
|
removeExistingFile?: () => void;
|
|
49
53
|
onTouched?: () => void;
|
|
50
54
|
onFileDataChange?: (
|
|
51
|
-
|
|
55
|
+
_fileData: {
|
|
52
56
|
name: string;
|
|
53
57
|
size: number;
|
|
54
58
|
type?: string;
|
|
@@ -113,17 +117,23 @@ const FileUploaderSingle = ({
|
|
|
113
117
|
accept = [],
|
|
114
118
|
acceptText = { fileFormat: '', maxSize: '', subText: '' },
|
|
115
119
|
title = '',
|
|
120
|
+
titleTooltip,
|
|
116
121
|
disabledInput = false,
|
|
117
122
|
children = null,
|
|
118
123
|
fileUrl = null,
|
|
119
124
|
fileName = null,
|
|
120
125
|
titleAddButton,
|
|
126
|
+
_isDroppingFile = false,
|
|
121
127
|
validateFile,
|
|
122
128
|
setFile,
|
|
123
129
|
removeExistingFile,
|
|
124
130
|
onTouched,
|
|
125
131
|
onFileDataChange,
|
|
126
132
|
}: Props) => {
|
|
133
|
+
const DEFAULT_COLOR = '%23CBCBCB';
|
|
134
|
+
const ERROR_COLOR = '%23b80025';
|
|
135
|
+
const DROPPING_COLOR = '%23004F88';
|
|
136
|
+
|
|
127
137
|
const [currentFile, setCurrentFile] = useState<File | null>(null);
|
|
128
138
|
const [fileData, setFileData] = useState<{
|
|
129
139
|
name: string;
|
|
@@ -133,7 +143,8 @@ const FileUploaderSingle = ({
|
|
|
133
143
|
driveAccessToken?: string;
|
|
134
144
|
} | null>(fileName ? { name: fileName, size: 0 } : null);
|
|
135
145
|
|
|
136
|
-
const [isDroppingFile, setIsDroppingFile] =
|
|
146
|
+
const [isDroppingFile, setIsDroppingFile] =
|
|
147
|
+
useState<boolean>(_isDroppingFile);
|
|
137
148
|
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
|
138
149
|
|
|
139
150
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
@@ -145,19 +156,31 @@ const FileUploaderSingle = ({
|
|
|
145
156
|
};
|
|
146
157
|
|
|
147
158
|
const handleFileChange = useCallback(
|
|
148
|
-
|
|
149
|
-
|
|
159
|
+
(
|
|
160
|
+
_event: ChangeEvent<HTMLInputElement> | null,
|
|
161
|
+
data?: {
|
|
162
|
+
docs: {
|
|
163
|
+
name: string;
|
|
164
|
+
sizeBytes: number;
|
|
165
|
+
mimeType: string;
|
|
166
|
+
id: string;
|
|
167
|
+
}[];
|
|
168
|
+
} | null,
|
|
169
|
+
token: string | null = null,
|
|
170
|
+
fakeClick?: boolean,
|
|
171
|
+
) => {
|
|
150
172
|
if (fakeClick) {
|
|
151
173
|
fileInputRef?.current?.click();
|
|
152
174
|
}
|
|
153
175
|
handleClose();
|
|
154
176
|
onTouched?.();
|
|
177
|
+
|
|
155
178
|
if (
|
|
156
179
|
fileInputRef.current?.files &&
|
|
157
|
-
fileInputRef.current
|
|
180
|
+
fileInputRef.current.files.length > 0
|
|
158
181
|
) {
|
|
159
182
|
const file = fileInputRef.current.files[0];
|
|
160
|
-
setCurrentFile(
|
|
183
|
+
setCurrentFile(file);
|
|
161
184
|
if (validateFile && validateFile(file.size, file.type)) {
|
|
162
185
|
setIsDroppingFile(false);
|
|
163
186
|
return;
|
|
@@ -175,17 +198,19 @@ const FileUploaderSingle = ({
|
|
|
175
198
|
setFile(file);
|
|
176
199
|
setIsDroppingFile(false);
|
|
177
200
|
}
|
|
178
|
-
|
|
201
|
+
|
|
202
|
+
if (token && data && data.docs && data.docs.length > 0) {
|
|
203
|
+
const googleFile = data.docs[0];
|
|
179
204
|
const fileData = {
|
|
180
|
-
name:
|
|
181
|
-
size: Math.round(
|
|
182
|
-
type:
|
|
183
|
-
driveFileId:
|
|
205
|
+
name: googleFile.name,
|
|
206
|
+
size: Math.round(googleFile.sizeBytes / 1024),
|
|
207
|
+
type: googleFile.mimeType,
|
|
208
|
+
driveFileId: googleFile.id,
|
|
184
209
|
driveAccessToken: token,
|
|
185
210
|
};
|
|
186
211
|
if (
|
|
187
212
|
validateFile &&
|
|
188
|
-
validateFile(
|
|
213
|
+
validateFile(googleFile.sizeBytes, googleFile.mimeType)
|
|
189
214
|
) {
|
|
190
215
|
return;
|
|
191
216
|
}
|
|
@@ -225,14 +250,14 @@ const FileUploaderSingle = ({
|
|
|
225
250
|
}, [removeExistingFile, setFile, onFileDataChange, currentFile]);
|
|
226
251
|
|
|
227
252
|
const dashedColor = useMemo(() => {
|
|
228
|
-
if (isDroppingFile) return
|
|
229
|
-
if (error) return
|
|
230
|
-
return
|
|
253
|
+
if (isDroppingFile) return DROPPING_COLOR;
|
|
254
|
+
if (error) return ERROR_COLOR;
|
|
255
|
+
return DEFAULT_COLOR;
|
|
231
256
|
}, [isDroppingFile, error]);
|
|
232
257
|
|
|
233
258
|
const bgColor = useMemo(() => {
|
|
234
|
-
if (fileData?.name || disabledInput) return '
|
|
235
|
-
if (isDroppingFile) return '
|
|
259
|
+
if (fileData?.name || disabledInput) return 'greyXLight';
|
|
260
|
+
if (isDroppingFile) return 'blueHoverEquivalence';
|
|
236
261
|
return 'white';
|
|
237
262
|
}, [fileData?.name, disabledInput, isDroppingFile]);
|
|
238
263
|
|
|
@@ -247,8 +272,10 @@ const FileUploaderSingle = ({
|
|
|
247
272
|
height: '87px',
|
|
248
273
|
backgroundImage: `url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='4' ry='4' stroke='${dashedColor}' stroke-width='2' stroke-dasharray='8%2c 8' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e")`,
|
|
249
274
|
borderRadius: '4px',
|
|
275
|
+
py: '24px',
|
|
276
|
+
px: '22px',
|
|
250
277
|
display: 'flex',
|
|
251
|
-
justifyContent: 'space-
|
|
278
|
+
justifyContent: 'space-between',
|
|
252
279
|
position: 'relative',
|
|
253
280
|
alignItems: 'center',
|
|
254
281
|
backgroundColor: bgColor,
|
|
@@ -282,17 +309,27 @@ const FileUploaderSingle = ({
|
|
|
282
309
|
return (
|
|
283
310
|
<Box
|
|
284
311
|
data-testid="Uploader-document"
|
|
285
|
-
|
|
312
|
+
sx={{
|
|
313
|
+
pb: 3,
|
|
314
|
+
}}
|
|
286
315
|
onDragLeave={() => setIsDroppingFile(false)}
|
|
287
316
|
>
|
|
288
|
-
<
|
|
289
|
-
{
|
|
290
|
-
|
|
317
|
+
<Box sx={{ display: 'flex' }}>
|
|
318
|
+
<Text variant="body2Medium" color={titleColor} pl={1}>
|
|
319
|
+
{title}
|
|
320
|
+
</Text>
|
|
321
|
+
{titleTooltip && (
|
|
322
|
+
<Box sx={{ marginLeft: '4px' }}>
|
|
323
|
+
<Tooltip title={titleTooltip}>
|
|
324
|
+
<IconProvider icon={faInfoCircle} size="sm" color="blueInfo" />
|
|
325
|
+
</Tooltip>
|
|
326
|
+
</Box>
|
|
327
|
+
)}
|
|
328
|
+
</Box>
|
|
291
329
|
<Tooltip
|
|
292
330
|
data-testid="tooltip"
|
|
293
331
|
title={(fileData?.name && 'Un seul fichier autorisé') || ''}
|
|
294
332
|
sx={{
|
|
295
|
-
padding: '0 !important',
|
|
296
333
|
display: (fileData?.name && 'block') || 'none',
|
|
297
334
|
}}
|
|
298
335
|
placement="top"
|
|
@@ -409,12 +446,17 @@ const FileUploaderSingle = ({
|
|
|
409
446
|
>
|
|
410
447
|
<MenuItem
|
|
411
448
|
testId="pc-add"
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
449
|
+
onClick={() => handleFileChange(null, null, null, true)}
|
|
450
|
+
>
|
|
451
|
+
<Box gap={1} display="flex">
|
|
452
|
+
<IconProvider size="sm" icon={faFolderOpen} />
|
|
453
|
+
<Text variant="body2">Depuis votre PC</Text>
|
|
454
|
+
</Box>
|
|
455
|
+
</MenuItem>
|
|
416
456
|
<GooglePickerWrapper
|
|
417
|
-
callback={(data, token) =>
|
|
457
|
+
callback={(data, token) =>
|
|
458
|
+
handleFileChange(null, data, token)
|
|
459
|
+
}
|
|
418
460
|
multiselect={true}
|
|
419
461
|
navHidden={false}
|
|
420
462
|
googleAuthClientId={googleAuthClientId ?? ''}
|
|
@@ -422,12 +464,12 @@ const FileUploaderSingle = ({
|
|
|
422
464
|
scopes="https://www.googleapis.com/auth/drive.file"
|
|
423
465
|
viewId="FOLDERS"
|
|
424
466
|
>
|
|
425
|
-
<MenuItem
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
467
|
+
<MenuItem testId="drive-add" onClick={handleClose}>
|
|
468
|
+
<Box gap={1} display="flex">
|
|
469
|
+
<IconProvider size="sm" icon={faGoogleDrive} />
|
|
470
|
+
<Text variant="body2">Depuis Google Drive</Text>
|
|
471
|
+
</Box>
|
|
472
|
+
</MenuItem>
|
|
431
473
|
</GooglePickerWrapper>
|
|
432
474
|
</Menu>
|
|
433
475
|
</>
|
|
@@ -440,7 +482,7 @@ const FileUploaderSingle = ({
|
|
|
440
482
|
backgroundColor: '#FFFFFF !important',
|
|
441
483
|
},
|
|
442
484
|
}}
|
|
443
|
-
onClick={() => handleFileChange(null, null, true)}
|
|
485
|
+
onClick={() => handleFileChange(null, null, null, true)}
|
|
444
486
|
disabled={!!fileData?.name}
|
|
445
487
|
>
|
|
446
488
|
<IconProvider icon={faUpload} size="md" mr={1} />
|
|
@@ -467,8 +509,9 @@ const FileUploaderSingle = ({
|
|
|
467
509
|
sx={{
|
|
468
510
|
display: 'flex',
|
|
469
511
|
alignItems: 'center',
|
|
470
|
-
border:
|
|
471
|
-
|
|
512
|
+
border: '0.5px solid',
|
|
513
|
+
borderColor: error ? 'redError' : 'greyLightDefaultBorder',
|
|
514
|
+
borderRadius: '0',
|
|
472
515
|
justifyContent: 'space-between',
|
|
473
516
|
maxHeight: '50px',
|
|
474
517
|
}}
|
|
@@ -500,19 +543,18 @@ const FileUploaderSingle = ({
|
|
|
500
543
|
flexShrink: 1,
|
|
501
544
|
}}
|
|
502
545
|
>
|
|
503
|
-
{fileData?.name}
|
|
546
|
+
{fileData?.name}
|
|
504
547
|
</Text>
|
|
505
|
-
{fileData?.size && (
|
|
548
|
+
{fileData?.size && fileData.size !== 0 ? (
|
|
506
549
|
<Text
|
|
507
550
|
component="span"
|
|
508
551
|
variant="body2Regular"
|
|
509
552
|
color="greyDark"
|
|
510
|
-
sx={{ minWidth: '41px' }}
|
|
553
|
+
sx={{ minWidth: '41px', marginLeft: '8px' }}
|
|
511
554
|
>
|
|
512
|
-
{' '}
|
|
513
555
|
({fileData?.size} ko)
|
|
514
556
|
</Text>
|
|
515
|
-
)}
|
|
557
|
+
) : null}
|
|
516
558
|
</Box>
|
|
517
559
|
<Box
|
|
518
560
|
sx={{
|
package/src/components/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as Select } from './Form/Select';
|
|
|
6
6
|
export { default as MultiSelect } from './Form/MultiSelect';
|
|
7
7
|
export { default as Checkbox } from './Form/Checkbox';
|
|
8
8
|
export { default as CheckboxGroup } from './Form/CheckboxGroup';
|
|
9
|
+
export type { CheckboxItemType } from './Form/CheckboxGroup/checkboxgroup.interface';
|
|
9
10
|
export { default as RadioGroup } from './Form/RadioGroup';
|
|
10
11
|
export { default as Accordion } from './Accordion';
|
|
11
12
|
export { default as Breadcrumbs } from './Breadcrumbs';
|
|
@@ -26,6 +27,7 @@ export { default as Drawer } from './Modal/Drawer/Drawer';
|
|
|
26
27
|
export { default as Dialog } from './Modal/Dialog/Dialog';
|
|
27
28
|
export { default as Switch } from './Form/Switch/Switch';
|
|
28
29
|
export { default as DatePicker } from './Form/DatePicker';
|
|
30
|
+
export { default as TimePicker } from './Form/TimePicker';
|
|
29
31
|
export { default as Datatable } from './Datatable/Datatable';
|
|
30
32
|
export { default as DatatableCellRender } from './Datatable/DatatableCellRender';
|
|
31
33
|
export { default as IconButton } from './IconButton/IconButton';
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import useGoogleDrivePicker, {
|
|
4
4
|
GOOGLE_ACTION,
|
|
5
|
-
|
|
5
|
+
GoogleDrivePickerData,
|
|
6
|
+
} from '@/hooks/useGooleDrivePicker';
|
|
6
7
|
|
|
7
8
|
interface GooglePickerWrapperProps {
|
|
8
|
-
|
|
9
|
-
callback: (data: any, token: string) => void;
|
|
9
|
+
callback: (_data: GoogleDrivePickerData, _token: string) => void;
|
|
10
10
|
multiselect?: boolean;
|
|
11
11
|
navHidden?: boolean;
|
|
12
12
|
googleAuthClientId: string;
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
GoogleDrivePickerData,
|
|
5
5
|
GoogleDrivePickerOptions,
|
|
6
6
|
TokenResponse,
|
|
7
|
-
} from '
|
|
7
|
+
} from '@/types/googleDrive';
|
|
8
8
|
|
|
9
9
|
const useGoogleDrivePicker = (
|
|
10
|
-
callbackFunction: (
|
|
10
|
+
callbackFunction: (_result: GoogleDrivePickerData, _token: string) => void,
|
|
11
11
|
options: GoogleDrivePickerOptions,
|
|
12
12
|
) => {
|
|
13
13
|
const {
|
|
@@ -30,11 +30,13 @@ const useGoogleDrivePicker = (
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const view = new google.picker.DocsView(google.picker.ViewId[viewId ?? ''])
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
const view = new google.picker.DocsView(google.picker.ViewId[viewId ?? '']);
|
|
34
|
+
|
|
35
|
+
view.setParent('root');
|
|
36
|
+
view.setIncludeFolders(true);
|
|
37
|
+
view.setSelectFolderEnabled(false);
|
|
38
|
+
view.setMimeTypes(mimeType?.join(',') ?? '');
|
|
39
|
+
|
|
38
40
|
const picker = new google.picker.PickerBuilder()
|
|
39
41
|
.setOAuthToken(innerToken)
|
|
40
42
|
.setDeveloperKey(googleApiKey)
|
|
@@ -103,6 +105,6 @@ const useGoogleDrivePicker = (
|
|
|
103
105
|
return [openPicker, token] as const;
|
|
104
106
|
};
|
|
105
107
|
|
|
106
|
-
export * from '
|
|
108
|
+
export * from '@/types/googleDrive';
|
|
107
109
|
|
|
108
110
|
export default useGoogleDrivePicker;
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from './components';
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type DesignSystemContextValues
|
|
6
|
-
} from './DesignSystemProvider';
|
|
2
|
+
export { default as DesignSystemProvider } from './DesignSystemProvider';
|
|
3
|
+
export { DesignSystemContext } from './DesignSystemProvider';
|
|
4
|
+
export { type DesignSystemContextValues } from './DesignSystemProvider';
|
package/src/types/global.d.ts
CHANGED
|
@@ -5,15 +5,17 @@ declare global {
|
|
|
5
5
|
google: {
|
|
6
6
|
accounts: {
|
|
7
7
|
oauth2: {
|
|
8
|
-
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
initTokenClient: (_params: TokenClientConfig) => any;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
gapi: {
|
|
13
14
|
load: (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
_module: string,
|
|
16
|
+
_params: {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
callback: (_param: any) => void;
|
|
17
19
|
},
|
|
18
20
|
) => void;
|
|
19
21
|
};
|