@groupeactual/ui-kit 1.7.10 → 2.0.0-beta.1
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 +15095 -66
- package/dist/es/{src/DesignSystemProvider.d.ts → DesignSystemProvider.d.ts} +6 -5
- package/dist/es/{src/components → components}/Accordion/Accordion.d.ts +1 -1
- package/dist/es/{src/components → components}/BannerNotification/BannerNotification.d.ts +1 -1
- package/dist/es/{src/components → components}/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/es/{src/components → components}/Button/Button.d.ts +2 -2
- package/dist/es/{src/components → components}/Chip/Chip.d.ts +1 -1
- package/dist/es/components/Datatable/Datatable.d.ts +4 -0
- package/dist/es/{src/components → components}/EmbbededNotification/EmbeddedNotification.d.ts +1 -1
- package/dist/es/{src/components/UploadDocument → components/FileUploader}/FileUploader.d.ts +1 -1
- package/dist/es/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +23 -0
- package/dist/es/{src/components → components}/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +8 -5
- package/dist/es/components/Form/Checkbox/Checkbox.d.ts +12 -0
- package/dist/es/components/Form/CheckboxGroup/CheckboxGroup.d.ts +12 -0
- package/dist/es/components/Form/CheckboxGroup/checkboxgroup.interface.d.ts +6 -0
- package/dist/es/{src/components → components}/Form/DatePicker/DatePicker.d.ts +6 -4
- package/dist/es/{src/components → components}/Form/MultiSelect/MultiSelect.d.ts +3 -3
- package/dist/es/components/Form/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/es/{src/components → components}/Form/Select/Select.d.ts +3 -3
- package/dist/es/components/Form/Switch/Switch.d.ts +11 -0
- package/dist/es/{src/components → components}/Form/TextField/TextField.d.ts +6 -5
- package/dist/es/{src/components → components}/Form/TimePicker/TimePicker.d.ts +3 -3
- package/dist/es/{src/components → components}/IconButton/IconButton.d.ts +3 -3
- package/dist/es/components/IconProvider/IconProvider.d.ts +24 -0
- package/dist/es/{src/components → components}/Link/Link.d.ts +1 -2
- package/dist/es/components/MenuItem/MenuItem.d.ts +9 -0
- package/dist/es/components/Modal/Dialog/Dialog.d.ts +4 -0
- package/dist/es/components/Modal/Drawer/Drawer.d.ts +4 -0
- package/dist/es/{src/components → components}/Navigation/Stepper/Stepper.d.ts +1 -1
- package/dist/es/{src/components → components}/Pagination/Pagination.d.ts +2 -1
- package/dist/es/{src/components → components}/Snackbar/Snackbar.d.ts +1 -1
- package/dist/es/components/TabsPanel/TabsPanel.d.ts +4 -0
- package/dist/es/components/TabsPanel/index.d.ts +1 -0
- package/dist/es/components/TabsPanel/tab.interface.d.ts +17 -0
- package/dist/es/components/Text/Text.d.ts +8 -0
- package/dist/es/{src/components → components}/Tooltip/Tooltip.d.ts +1 -1
- package/dist/es/{src/components → components}/index.d.ts +3 -2
- package/dist/es/index.d.ts +104 -152
- package/dist/es/index.js +37 -79
- package/package.json +20 -17
- package/src/DesignSystemProvider.tsx +21 -36
- package/src/components/Accordion/Accordion.tsx +41 -59
- package/src/components/BannerNotification/BannerNotification.tsx +19 -20
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +32 -28
- package/src/components/Button/Button.tsx +70 -17
- package/src/components/Chip/Chip.tsx +88 -117
- package/src/components/Datatable/Datatable.tsx +49 -37
- package/src/components/Datatable/DatatableCellRender.tsx +1 -1
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +78 -69
- package/src/components/FileUploader/FileUploader.tsx +767 -0
- package/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.tsx +289 -172
- package/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.tsx +228 -126
- package/src/components/Form/Checkbox/Checkbox.tsx +38 -96
- package/src/components/Form/CheckboxGroup/CheckboxGroup.tsx +86 -60
- package/src/components/Form/CheckboxGroup/checkboxgroup.interface.ts +0 -15
- package/src/components/Form/DatePicker/DatePicker.tsx +88 -40
- package/src/components/Form/MultiSelect/MultiSelect.tsx +196 -171
- package/src/components/Form/RadioGroup/RadioGroup.tsx +76 -82
- package/src/components/Form/Select/Select.tsx +156 -136
- package/src/components/Form/Switch/Switch.tsx +87 -47
- package/src/components/Form/TextField/TextField.tsx +125 -76
- package/src/components/Form/TimePicker/TimePicker.tsx +26 -7
- package/src/components/IconButton/IconButton.tsx +64 -39
- package/src/components/IconProvider/IconProvider.tsx +88 -69
- package/src/components/Link/Link.tsx +6 -10
- package/src/components/MenuItem/MenuItem.tsx +35 -23
- package/src/components/Modal/Dialog/Dialog.tsx +17 -14
- package/src/components/Modal/Drawer/Drawer.tsx +95 -74
- package/src/components/Navigation/Stepper/Step.tsx +7 -6
- package/src/components/Navigation/Stepper/Stepper.tsx +24 -23
- package/src/components/NotistackAdapter/NotistackAdapter.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +131 -118
- package/src/components/Snackbar/Snackbar.tsx +29 -29
- package/src/components/TabsPanel/TabsPanel.tsx +151 -0
- package/src/components/TabsPanel/index.ts +1 -0
- package/src/components/TabsPanel/tab.interface.ts +20 -0
- package/src/components/Text/Text.tsx +25 -12
- package/src/components/Tooltip/Tooltip.tsx +54 -51
- package/src/components/index.ts +3 -2
- package/src/index.ts +0 -1
- package/dist/es/src/components/Datatable/Datatable.d.ts +0 -4
- package/dist/es/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +0 -19
- package/dist/es/src/components/Form/Checkbox/Checkbox.d.ts +0 -14
- package/dist/es/src/components/Form/CheckboxGroup/CheckboxGroup.d.ts +0 -12
- package/dist/es/src/components/Form/CheckboxGroup/checkboxgroup.interface.d.ts +0 -8
- package/dist/es/src/components/Form/RadioGroup/RadioGroup.d.ts +0 -18
- package/dist/es/src/components/Form/Switch/Switch.d.ts +0 -10
- package/dist/es/src/components/IconProvider/IconProvider.d.ts +0 -19
- package/dist/es/src/components/MenuItem/MenuItem.d.ts +0 -10
- package/dist/es/src/components/Modal/Dialog/Dialog.d.ts +0 -4
- package/dist/es/src/components/Modal/Drawer/Drawer.d.ts +0 -4
- package/dist/es/src/components/Text/Text.d.ts +0 -8
- package/dist/es/src/index.d.ts +0 -5
- package/dist/es/src/interfaces/theme.d.ts +0 -51
- package/src/components/UploadDocument/FileUploader.tsx +0 -728
- package/src/interfaces/theme.ts +0 -51
- /package/dist/es/{src/components → components}/Accordion/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/BannerNotification/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Breadcrumbs/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Button/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Chip/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Datatable/DatatableCellRender.d.ts +0 -0
- /package/dist/es/{src/components → components}/Datatable/datatable.interface.d.ts +0 -0
- /package/dist/es/{src/components → components}/Datatable/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Datatable/use-pagination-props.hook.d.ts +0 -0
- /package/dist/es/{src/components → components}/EmbbededNotification/index.d.ts +0 -0
- /package/dist/es/{src/components/UploadDocument → components/FileUploader}/fileuploader.interface.d.ts +0 -0
- /package/dist/es/{src/components/UploadDocument → components/FileUploader}/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/AutoCompleteMulti/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/AutoCompleteSingle/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/Checkbox/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/CheckboxGroup/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/DatePicker/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/MultiSelect/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/RadioGroup/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/Select/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/Switch/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/TextField/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Form/TimePicker/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/IconButton/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/IconProvider/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Link/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/MenuItem/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Modal/Dialog/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Modal/Drawer/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Modal/modal.interface.d.ts +0 -0
- /package/dist/es/{src/components → components}/Navigation/Stepper/Step.d.ts +0 -0
- /package/dist/es/{src/components → components}/Navigation/Stepper/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Navigation/Stepper/stepper.helper.d.ts +0 -0
- /package/dist/es/{src/components → components}/Navigation/Stepper/stepper.interface.d.ts +0 -0
- /package/dist/es/{src/components → components}/NotistackAdapter/NotistackAdapter.d.ts +0 -0
- /package/dist/es/{src/components → components}/NotistackAdapter/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Pagination/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Pagination/pagination.helper.d.ts +0 -0
- /package/dist/es/{src/components → components}/Snackbar/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Text/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Tooltip/index.d.ts +0 -0
- /package/dist/es/{src/components → components}/Tooltip/tooltip.interface.d.ts +0 -0
- /package/dist/es/{src/helpers → helpers}/GooglePickerWrapper.d.ts +0 -0
- /package/dist/es/{src/hooks → hooks}/useGooleDrivePicker.d.ts +0 -0
- /package/dist/es/{src/types → types}/googleDrive.d.ts +0 -0
- /package/src/components/{UploadDocument → FileUploader}/fileuploader.interface.ts +0 -0
- /package/src/components/{UploadDocument → FileUploader}/index.ts +0 -0
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { Link as LinkMui, LinkProps, styled, useTheme } from '@mui/material';
|
|
3
|
+
import { Link as LinkMui, LinkProps } from '@mui/material';
|
|
5
4
|
|
|
6
5
|
interface Props extends Omit<LinkProps, 'variant'> {
|
|
7
6
|
variant?: 'link1' | 'link2';
|
|
8
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
|
-
component?: any;
|
|
10
7
|
}
|
|
11
8
|
|
|
12
|
-
const Link = (props
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return <StyledLink {...(props as LinkProps)} />;
|
|
16
|
-
};
|
|
9
|
+
const Link = React.forwardRef<HTMLAnchorElement, Props>(({ ...props }, ref) => {
|
|
10
|
+
return <LinkMui ref={ref} {...(props as LinkProps)} data-testid="ds-link" />;
|
|
11
|
+
});
|
|
17
12
|
|
|
13
|
+
Link.displayName = 'Link';
|
|
18
14
|
export default Link;
|
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import React, { ReactNode
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { MenuItemStyle } from '@groupeactual/design-tokens';
|
|
4
3
|
import {
|
|
5
4
|
MenuItem as MenuItemMUI,
|
|
6
5
|
MenuItemProps,
|
|
7
|
-
styled,
|
|
8
6
|
useTheme,
|
|
9
7
|
} from '@mui/material';
|
|
10
8
|
|
|
11
9
|
interface Props extends Omit<MenuItemProps, 'onClick'> {
|
|
12
|
-
onClick
|
|
10
|
+
onClick?: (_event?: React.MouseEvent<HTMLLIElement>) => void;
|
|
11
|
+
selected?: boolean;
|
|
13
12
|
children: NonNullable<ReactNode>;
|
|
14
|
-
testId?: string;
|
|
15
|
-
disabled?: boolean;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
|
-
const MenuItem =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
15
|
+
const MenuItem = React.forwardRef<HTMLLIElement, Props>(
|
|
16
|
+
({ onClick, selected, children, ...props }, ref) => {
|
|
17
|
+
const { palette } = useTheme();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<MenuItemMUI
|
|
21
|
+
{...props}
|
|
22
|
+
sx={
|
|
23
|
+
selected
|
|
24
|
+
? {
|
|
25
|
+
backgroundColor: palette?.background?.grey + ' !important',
|
|
26
|
+
'.MuiTypography-root': {
|
|
27
|
+
fontWeight: 500,
|
|
28
|
+
},
|
|
29
|
+
'.itemIcon': {
|
|
30
|
+
color: palette?.blueHoverClickable + ' !important',
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
: {}
|
|
34
|
+
}
|
|
35
|
+
onClick={onClick}
|
|
36
|
+
ref={ref}
|
|
37
|
+
selected={selected}
|
|
38
|
+
data-testid="ds-menu-item"
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
</MenuItemMUI>
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
MenuItem.displayName = 'MenuItem';
|
|
35
47
|
|
|
36
48
|
export default MenuItem;
|
|
@@ -53,7 +53,7 @@ const BootstrapDialogTitle = <T extends OverridableTypeMap>({
|
|
|
53
53
|
justifyContent: 'space-between',
|
|
54
54
|
alignItems: 'center',
|
|
55
55
|
}}
|
|
56
|
-
variant=
|
|
56
|
+
variant="h3"
|
|
57
57
|
{...props}
|
|
58
58
|
>
|
|
59
59
|
<Box
|
|
@@ -69,7 +69,7 @@ const BootstrapDialogTitle = <T extends OverridableTypeMap>({
|
|
|
69
69
|
aria-label="close"
|
|
70
70
|
data-testid="close-button"
|
|
71
71
|
onClick={() => onClose?.()}
|
|
72
|
-
variant="
|
|
72
|
+
variant="plain"
|
|
73
73
|
size="medium"
|
|
74
74
|
icon={faClose}
|
|
75
75
|
/>
|
|
@@ -77,27 +77,30 @@ const BootstrapDialogTitle = <T extends OverridableTypeMap>({
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
const Dialog =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
children,
|
|
85
|
-
icon,
|
|
86
|
-
...props
|
|
87
|
-
}: Omit<ModalProps, 'footer' | 'cardProps' | 'size' | 'component'>) => {
|
|
80
|
+
const Dialog = React.forwardRef<
|
|
81
|
+
HTMLDivElement,
|
|
82
|
+
Omit<ModalProps, 'footer' | 'cardProps' | 'size' | 'component'>
|
|
83
|
+
>(({ title, open, onClose, children, icon, ...props }, ref) => {
|
|
88
84
|
return (
|
|
89
85
|
<BootstrapDialog
|
|
86
|
+
ref={ref}
|
|
90
87
|
onClose={() => onClose?.()}
|
|
91
88
|
open={open}
|
|
92
89
|
{...props}
|
|
93
|
-
data-testid="dialog"
|
|
90
|
+
data-testid="ds-dialog"
|
|
94
91
|
>
|
|
95
|
-
<BootstrapDialogTitle
|
|
92
|
+
<BootstrapDialogTitle
|
|
93
|
+
icon={icon}
|
|
94
|
+
onClose={() => onClose?.()}
|
|
95
|
+
data-testid="ds-dialog-title"
|
|
96
|
+
>
|
|
96
97
|
{title && <Text variant="h3">{title}</Text>}
|
|
97
98
|
</BootstrapDialogTitle>
|
|
98
|
-
<DialogContent>{children}</DialogContent>
|
|
99
|
+
<DialogContent data-testid="ds-dialog-content">{children}</DialogContent>
|
|
99
100
|
</BootstrapDialog>
|
|
100
101
|
);
|
|
101
|
-
};
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
Dialog.displayName = 'Dialog';
|
|
102
105
|
|
|
103
106
|
export default Dialog;
|
|
@@ -11,84 +11,105 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import IconButton from '@/components/IconButton';
|
|
13
13
|
import { DrawerProps } from '@/components/Modal/modal.interface';
|
|
14
|
+
import Text from '@/components/Text';
|
|
14
15
|
|
|
15
|
-
const Drawer = (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
margin: '0',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
'.MuiCardContent-root': {
|
|
43
|
-
padding: '10px 24px 24px 24px',
|
|
44
|
-
color: 'greyXDark',
|
|
45
|
-
},
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
<Card
|
|
49
|
-
elevation={0}
|
|
50
|
-
{...cardProps}
|
|
16
|
+
const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
17
|
+
(
|
|
18
|
+
{
|
|
19
|
+
title,
|
|
20
|
+
open,
|
|
21
|
+
hideCloseButton,
|
|
22
|
+
titleLeftComponent,
|
|
23
|
+
footer,
|
|
24
|
+
cardProps,
|
|
25
|
+
size = 'small',
|
|
26
|
+
children,
|
|
27
|
+
onClose,
|
|
28
|
+
...props
|
|
29
|
+
},
|
|
30
|
+
ref,
|
|
31
|
+
) => {
|
|
32
|
+
return (
|
|
33
|
+
<DrawerMUI
|
|
34
|
+
ref={ref}
|
|
35
|
+
anchor="right"
|
|
36
|
+
open={open}
|
|
37
|
+
onClose={() => onClose?.()}
|
|
38
|
+
data-testid="ds-drawer"
|
|
39
|
+
{...props}
|
|
51
40
|
sx={{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
'.MuiCardHeader-root': {
|
|
42
|
+
padding: '24px 24px 0 24px',
|
|
43
|
+
color: 'greyXDark',
|
|
44
|
+
'.MuiCardHeader-action': {
|
|
45
|
+
margin: '0',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'.MuiCardContent-root': {
|
|
49
|
+
padding: '10px 24px 24px 24px',
|
|
50
|
+
color: 'greyXDark',
|
|
51
|
+
},
|
|
52
|
+
'.MuiButton-outlinedPrimary': {
|
|
53
|
+
backgroundColor: 'white',
|
|
54
|
+
},
|
|
56
55
|
}}
|
|
57
56
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
|
|
57
|
+
<Card
|
|
58
|
+
elevation={0}
|
|
59
|
+
{...cardProps}
|
|
60
|
+
sx={{
|
|
61
|
+
height: '100%',
|
|
62
|
+
width: size === 'large' ? 980 : 608,
|
|
63
|
+
overflowY: 'scroll',
|
|
64
|
+
...cardProps?.sx,
|
|
65
|
+
}}
|
|
66
|
+
data-testid="ds-drawer-card"
|
|
67
|
+
>
|
|
68
|
+
<CardHeader
|
|
69
|
+
action={
|
|
70
|
+
!hideCloseButton ? (
|
|
71
|
+
<IconButton
|
|
72
|
+
aria-label="close"
|
|
73
|
+
data-testid="ds-close-button"
|
|
74
|
+
onClick={() => onClose?.()}
|
|
75
|
+
variant="plain"
|
|
76
|
+
size="medium"
|
|
77
|
+
icon={faClose}
|
|
78
|
+
/>
|
|
79
|
+
) : null
|
|
80
|
+
}
|
|
81
|
+
title={
|
|
82
|
+
title ? (
|
|
83
|
+
<Box display="flex" data-testid="ds-drawer-title">
|
|
84
|
+
<Box
|
|
85
|
+
mt="2px"
|
|
86
|
+
sx={{
|
|
87
|
+
display: 'flex',
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
justifyContent: 'center',
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
{titleLeftComponent}
|
|
94
|
+
<Text variant="h3">{title}</Text>
|
|
95
|
+
</Box>
|
|
77
96
|
</Box>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
) : (
|
|
98
|
+
''
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
subheader=""
|
|
102
|
+
/>
|
|
103
|
+
<CardContent data-testid="ds-drawer-content">
|
|
104
|
+
<Box pb={footer ? '94px !important' : 0}>{children}</Box>
|
|
105
|
+
</CardContent>
|
|
106
|
+
{footer}
|
|
107
|
+
</Card>
|
|
108
|
+
</DrawerMUI>
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
Drawer.displayName = 'Drawer';
|
|
93
114
|
|
|
94
115
|
export default Drawer;
|
|
@@ -21,7 +21,7 @@ export const StepComponent = ({
|
|
|
21
21
|
}) => {
|
|
22
22
|
const percent = stepperItemsToPercent(items);
|
|
23
23
|
const isFullyValidated = percent === 100;
|
|
24
|
-
const { palette
|
|
24
|
+
const { palette } = useTheme();
|
|
25
25
|
const isNavigeable = canNavigate && link && !isActive;
|
|
26
26
|
|
|
27
27
|
return (
|
|
@@ -33,9 +33,9 @@ export const StepComponent = ({
|
|
|
33
33
|
(isActive && {
|
|
34
34
|
content: "' '",
|
|
35
35
|
position: 'absolute',
|
|
36
|
-
left:
|
|
37
|
-
top:
|
|
38
|
-
bottom:
|
|
36
|
+
left: '25px',
|
|
37
|
+
top: '40px',
|
|
38
|
+
bottom: '20px',
|
|
39
39
|
height: 'auto',
|
|
40
40
|
width: '1px',
|
|
41
41
|
background: palette.greyLightDefaultBorder,
|
|
@@ -50,6 +50,7 @@ export const StepComponent = ({
|
|
|
50
50
|
sx={{
|
|
51
51
|
px: 2,
|
|
52
52
|
py: 1,
|
|
53
|
+
mb: 4,
|
|
53
54
|
cursor: (isNavigeable && 'pointer') || 'inherit',
|
|
54
55
|
borderRight:
|
|
55
56
|
(isActive && `4px solid ${palette.blueClickable as string}`) || '',
|
|
@@ -82,7 +83,7 @@ export const StepComponent = ({
|
|
|
82
83
|
<Stack>
|
|
83
84
|
{items.map(({ label, isValid }) => {
|
|
84
85
|
return (
|
|
85
|
-
<Stack direction="row" key={label}
|
|
86
|
+
<Stack direction="row" key={label} sx={{ mb: 2, ml: 1 }}>
|
|
86
87
|
<IconProvider
|
|
87
88
|
icon={(isValid && faCheckCircle) || faDotCircle}
|
|
88
89
|
mr={2.25}
|
|
@@ -97,7 +98,7 @@ export const StepComponent = ({
|
|
|
97
98
|
}}
|
|
98
99
|
/>
|
|
99
100
|
<Text
|
|
100
|
-
variant={(isValid && 'body1Medium') || '
|
|
101
|
+
variant={(isValid && 'body1Medium') || 'body1'}
|
|
101
102
|
color={(isValid && palette.greyXDark) || palette.greyDark}
|
|
102
103
|
>
|
|
103
104
|
{label}
|
|
@@ -12,29 +12,30 @@ interface Props {
|
|
|
12
12
|
onNavigate?: (_url: string) => void;
|
|
13
13
|
sx?: SxProps<Theme>;
|
|
14
14
|
}
|
|
15
|
-
const Stepper = ({
|
|
16
|
-
steps,
|
|
17
|
-
canNavigate,
|
|
18
|
-
onNavigate = () => null,
|
|
19
|
-
sx = {},
|
|
20
|
-
}: Props) => {
|
|
21
|
-
const isCurrentStepCompleted =
|
|
22
|
-
stepperItemsToPercent(
|
|
23
|
-
steps.find(({ isActive }) => isActive)?.items ?? [],
|
|
24
|
-
) === 100;
|
|
25
15
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
16
|
+
const Stepper = React.forwardRef<HTMLDivElement, Props>(
|
|
17
|
+
({ steps, canNavigate, onNavigate = () => null, sx = {} }, ref) => {
|
|
18
|
+
const isCurrentStepCompleted =
|
|
19
|
+
stepperItemsToPercent(
|
|
20
|
+
steps.find(({ isActive }) => isActive)?.items ?? [],
|
|
21
|
+
) === 100;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Box gap={2} sx={sx} ref={ref} data-testid="ds-stepper-container">
|
|
25
|
+
{steps.map((step) => (
|
|
26
|
+
<StepComponent
|
|
27
|
+
step={step}
|
|
28
|
+
key={step.label}
|
|
29
|
+
canNavigate={canNavigate && isCurrentStepCompleted}
|
|
30
|
+
onNavigate={onNavigate}
|
|
31
|
+
data-testid={`ds-step-${step.label}`}
|
|
32
|
+
/>
|
|
33
|
+
))}
|
|
34
|
+
</Box>
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
Stepper.displayName = 'Stepper';
|
|
39
40
|
|
|
40
41
|
export default Stepper;
|
|
@@ -10,7 +10,7 @@ const NotistackAdapter = forwardRef<HTMLDivElement, CustomContentProps>(
|
|
|
10
10
|
return <></>;
|
|
11
11
|
}
|
|
12
12
|
return (
|
|
13
|
-
<SnackbarContent ref={ref}>
|
|
13
|
+
<SnackbarContent ref={ref} data-testid="ds-notistack-adapter">
|
|
14
14
|
<Snackbar text={message} severity={variant} />
|
|
15
15
|
</SnackbarContent>
|
|
16
16
|
);
|