@groupeactual/ui-kit 1.7.0-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 +176 -163
- package/dist/es/index.js +8 -18
- package/dist/es/index.js.map +1 -1
- package/dist/es/src/components/Accordion/Accordion.d.ts +1 -4
- package/dist/es/src/components/BannerNotification/BannerNotification.d.ts +1 -4
- package/dist/es/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -4
- package/dist/es/src/components/Button/Button.d.ts +1 -4
- package/dist/es/src/components/Chip/Chip.d.ts +2 -5
- package/dist/es/src/components/Datatable/Datatable.d.ts +1 -1
- package/dist/es/src/components/Datatable/datatable.interface.d.ts +5 -4
- package/dist/es/src/components/EmbbededNotification/EmbeddedNotification.d.ts +1 -4
- package/dist/es/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +7 -6
- package/dist/es/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +5 -7
- package/dist/es/src/components/Form/Checkbox/Checkbox.d.ts +4 -7
- package/dist/es/src/components/Form/CheckboxGroup/CheckboxGroup.d.ts +4 -12
- package/dist/es/src/components/Form/CheckboxGroup/checkboxgroup.interface.d.ts +8 -0
- package/dist/es/src/components/Form/DatePicker/DatePicker.d.ts +1 -1
- package/dist/es/src/components/Form/MultiSelect/MultiSelect.d.ts +4 -7
- package/dist/es/src/components/Form/RadioGroup/RadioGroup.d.ts +2 -5
- package/dist/es/src/components/Form/Select/Select.d.ts +5 -7
- package/dist/es/src/components/Form/Switch/Switch.d.ts +1 -4
- package/dist/es/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 +5 -7
- package/dist/es/src/components/IconProvider/IconProvider.d.ts +1 -4
- package/dist/es/src/components/Link/Link.d.ts +1 -4
- package/dist/es/src/components/MenuItem/MenuItem.d.ts +7 -10
- package/dist/es/src/components/Navigation/Stepper/Step.d.ts +1 -1
- package/dist/es/src/components/Navigation/Stepper/Stepper.d.ts +1 -1
- package/dist/es/src/components/Pagination/Pagination.d.ts +3 -6
- package/dist/es/src/components/Snackbar/Snackbar.d.ts +1 -4
- package/dist/es/src/components/Text/Text.d.ts +1 -4
- package/dist/es/src/components/Tooltip/Tooltip.d.ts +5 -7
- package/dist/es/src/components/UploadDocument/FileUploaderSingle.d.ts +55 -8
- package/dist/es/src/components/UploadDocument/fileuploadersingle.interface.d.ts +5 -0
- package/dist/es/src/components/index.d.ts +2 -0
- package/dist/es/src/helpers/GooglePickerWrapper.d.ts +2 -1
- package/dist/es/src/hooks/useGooleDrivePicker.d.ts +1 -1
- package/package.json +20 -20
- package/src/components/Accordion/Accordion.tsx +4 -4
- package/src/components/BannerNotification/BannerNotification.tsx +0 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -2
- package/src/components/Button/Button.tsx +0 -2
- package/src/components/Chip/Chip.tsx +1 -3
- package/src/components/Datatable/Datatable.tsx +27 -6
- package/src/components/Datatable/DatatableCellRender.tsx +2 -1
- 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 +0 -2
- package/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.tsx +24 -9
- package/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.tsx +15 -10
- package/src/components/Form/Checkbox/Checkbox.tsx +22 -25
- package/src/components/Form/CheckboxGroup/CheckboxGroup.tsx +8 -25
- package/src/components/Form/CheckboxGroup/checkboxgroup.interface.ts +22 -0
- package/src/components/Form/DatePicker/DatePicker.tsx +15 -3
- package/src/components/Form/MultiSelect/MultiSelect.tsx +33 -7
- package/src/components/Form/RadioGroup/RadioGroup.tsx +18 -23
- package/src/components/Form/Select/Select.tsx +34 -6
- package/src/components/Form/Switch/Switch.tsx +0 -2
- package/src/components/Form/TextField/TextField.tsx +120 -107
- package/src/components/Form/TimePicker/TimePicker.tsx +228 -0
- package/src/components/Form/TimePicker/index.ts +1 -0
- package/src/components/IconButton/IconButton.tsx +12 -6
- 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/Navigation/Stepper/Step.tsx +1 -1
- package/src/components/Navigation/Stepper/Stepper.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +4 -5
- package/src/components/Snackbar/Snackbar.tsx +0 -2
- package/src/components/Text/Text.tsx +0 -2
- package/src/components/Tooltip/Tooltip.tsx +41 -32
- package/src/components/UploadDocument/FileUploaderSingle.tsx +156 -86
- package/src/components/UploadDocument/fileuploadersingle.interface.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/helpers/GooglePickerWrapper.tsx +2 -2
- package/src/hooks/useGooleDrivePicker.ts +8 -6
- package/src/types/global.d.ts +6 -4
- package/src/types/googleDrive.ts +1 -0
- package/dist/es/src/helpers/dataGetValue.d.ts +0 -2
- package/src/helpers/dataGetValue.ts +0 -22
package/dist/es/index.d.ts
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
|
-
import React, { ReactNode, FocusEventHandler, BaseSyntheticEvent, MouseEventHandler, MouseEvent,
|
|
1
|
+
import React, { ReactNode, FocusEventHandler, BaseSyntheticEvent, MouseEventHandler, MouseEvent, PropsWithChildren } from 'react';
|
|
2
2
|
import { TypographyProps, LinkProps, ButtonProps, TextFieldProps, SelectProps, CheckboxProps, RadioGroupProps, AccordionProps, BreadcrumbsProps, BoxProps, ChipProps, TooltipProps, AutocompleteProps, MenuItemProps, AlertProps, SxProps, Theme as Theme$1, CardProps, SwitchProps, IconButtonProps } from '@mui/material';
|
|
3
3
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
4
4
|
import { BoxProps as BoxProps$1 } from '@mui/system';
|
|
5
|
-
import { IconDefinition as IconDefinition$1 } from '@fortawesome/pro-regular-svg-icons';
|
|
6
5
|
import { CustomContentProps } from 'notistack';
|
|
7
6
|
import { ModalProps as ModalProps$1 } from '@mui/material/Modal';
|
|
8
7
|
import { DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
9
8
|
import { Dayjs } from 'dayjs';
|
|
10
9
|
|
|
11
|
-
interface Props$
|
|
10
|
+
interface Props$q extends Omit<TypographyProps, 'variant'> {
|
|
12
11
|
variant?: 'bigNumber' | 'body1' | 'body1Regular' | 'body1Medium' | 'body1Bold' | 'body2' | 'body2Regular' | 'body2Medium' | 'body2Bold' | 'caption' | 'buttonNotif' | 'header1' | 'header2' | 'header3' | 'header4' | 'h1' | 'h2' | 'h3' | 'h4' | 'link1' | 'link2';
|
|
13
12
|
component?: any;
|
|
14
13
|
}
|
|
15
|
-
declare const Text:
|
|
16
|
-
(props: Props$p): React.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
14
|
+
declare const Text: (props: Props$q) => React.JSX.Element;
|
|
19
15
|
|
|
20
|
-
interface Props$
|
|
16
|
+
interface Props$p extends Omit<LinkProps, 'variant'> {
|
|
21
17
|
variant?: 'link1' | 'link2';
|
|
22
18
|
component?: any;
|
|
23
19
|
}
|
|
24
|
-
declare const Link:
|
|
25
|
-
(props: Props$o): React.JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
20
|
+
declare const Link: (props: Props$p) => React.JSX.Element;
|
|
28
21
|
|
|
29
|
-
interface Props$
|
|
22
|
+
interface Props$o extends Omit<ButtonProps, 'variant' | 'children'> {
|
|
30
23
|
variant?: 'primary' | 'secondary';
|
|
31
24
|
children?: ReactNode;
|
|
32
25
|
}
|
|
33
|
-
declare const Button: {
|
|
34
|
-
({ variant, children, ...props }: Props$n): React.JSX.Element;
|
|
35
|
-
displayName: string;
|
|
36
|
-
};
|
|
26
|
+
declare const Button: ({ variant, children, ...props }: Props$o) => React.JSX.Element;
|
|
37
27
|
|
|
38
|
-
interface Props$
|
|
28
|
+
interface Props$n extends Omit<TextFieldProps, 'error'> {
|
|
39
29
|
error?: string;
|
|
40
|
-
label
|
|
30
|
+
label?: string;
|
|
41
31
|
value?: string | unknown;
|
|
42
32
|
name?: string;
|
|
43
33
|
placeholder?: string;
|
|
@@ -46,15 +36,14 @@ interface Props$m extends Omit<TextFieldProps, 'error'> {
|
|
|
46
36
|
maxLength?: number;
|
|
47
37
|
width?: number | string;
|
|
48
38
|
className?: string;
|
|
39
|
+
focused?: boolean;
|
|
40
|
+
onClick?: (_e: React.MouseEvent<HTMLInputElement>) => void;
|
|
49
41
|
onBlur?: FocusEventHandler<unknown>;
|
|
50
|
-
onChange?: (
|
|
42
|
+
onChange?: (_e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
51
43
|
}
|
|
52
|
-
declare const TextField:
|
|
53
|
-
({ name, value, error, onBlur, onChange, label, disabled, width, endAdornment, placeholder, maxLength, ...props }: Props$m): React.JSX.Element;
|
|
54
|
-
displayName: string;
|
|
55
|
-
};
|
|
44
|
+
declare const TextField: React.ForwardRefExoticComponent<Props$n & React.RefAttributes<HTMLDivElement>>;
|
|
56
45
|
|
|
57
|
-
interface Props$
|
|
46
|
+
interface Props$m<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color' | 'error'> {
|
|
58
47
|
options: T[];
|
|
59
48
|
placeholder?: string;
|
|
60
49
|
disabled?: boolean;
|
|
@@ -66,16 +55,14 @@ interface Props$l<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color'
|
|
|
66
55
|
error?: string;
|
|
67
56
|
className?: string;
|
|
68
57
|
popupIcon?: IconDefinition;
|
|
69
|
-
getRenderValue: (
|
|
70
|
-
onChange: (
|
|
71
|
-
onBlur?: (
|
|
58
|
+
getRenderValue: (_option: T) => string;
|
|
59
|
+
onChange: (_value: T) => void;
|
|
60
|
+
onBlur?: (_event: BaseSyntheticEvent) => void;
|
|
61
|
+
onClick?: (_event: BaseSyntheticEvent) => void;
|
|
72
62
|
}
|
|
73
|
-
declare const Select: {
|
|
74
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, disabled, popupIcon, onChange, getRenderValue, ...props }: Props$l<T>): React.JSX.Element;
|
|
75
|
-
displayName: string;
|
|
76
|
-
};
|
|
63
|
+
declare const Select: <T>({ value, label, options, color, error, placeholder, helperText, width, disabled, popupIcon, onChange, getRenderValue, ...props }: Props$m<T>) => React.JSX.Element;
|
|
77
64
|
|
|
78
|
-
interface Props$
|
|
65
|
+
interface Props$l<T> extends Omit<SelectProps<T[]>, 'value' | 'onChange' | 'value' | 'color' | 'error'> {
|
|
79
66
|
label: string;
|
|
80
67
|
options: T[] | [];
|
|
81
68
|
helperText?: string;
|
|
@@ -87,48 +74,41 @@ interface Props$k<T> extends Omit<SelectProps<T[]>, 'value' | 'onChange' | 'valu
|
|
|
87
74
|
disabled?: boolean;
|
|
88
75
|
className?: string;
|
|
89
76
|
onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
90
|
-
onChange: (
|
|
91
|
-
getRenderValue: (
|
|
92
|
-
getKeyValue: (
|
|
77
|
+
onChange: (_value: T[]) => void;
|
|
78
|
+
getRenderValue: (_option: T) => string;
|
|
79
|
+
getKeyValue: (_option: T) => string;
|
|
93
80
|
}
|
|
94
|
-
declare const MultiSelect: {
|
|
95
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, disabled, ...props }: Props$k<T>): React.JSX.Element;
|
|
96
|
-
displayName: string;
|
|
97
|
-
};
|
|
81
|
+
declare const MultiSelect: <T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, disabled, ...props }: Props$l<T>) => React.JSX.Element;
|
|
98
82
|
|
|
99
|
-
interface Props$
|
|
83
|
+
interface Props$k {
|
|
100
84
|
name: string;
|
|
101
85
|
value: boolean;
|
|
102
|
-
label:
|
|
103
|
-
onChange?: (
|
|
86
|
+
label: ReactNode;
|
|
87
|
+
onChange?: (_field: string, _value: boolean, _shouldValidate?: boolean | undefined) => void;
|
|
104
88
|
helperText?: string;
|
|
105
89
|
error?: string;
|
|
106
90
|
infoBubbleContent?: string;
|
|
107
91
|
infoBubblePosition?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
108
92
|
}
|
|
109
|
-
declare const Checkbox: {
|
|
110
|
-
({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props$j): React.JSX.Element;
|
|
111
|
-
displayName: string;
|
|
112
|
-
};
|
|
93
|
+
declare const Checkbox: ({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props$k) => React.JSX.Element;
|
|
113
94
|
|
|
114
|
-
interface
|
|
115
|
-
label:
|
|
95
|
+
interface CheckboxItemType {
|
|
96
|
+
label: ReactNode;
|
|
116
97
|
value: boolean;
|
|
117
98
|
name: string;
|
|
118
99
|
infoBubbleContent?: string;
|
|
119
100
|
infoBubblePosition?: 'right' | 'bottom' | 'left' | 'top' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
120
101
|
}
|
|
102
|
+
|
|
121
103
|
interface CheckboxGroupProps {
|
|
122
104
|
label: string;
|
|
123
|
-
options:
|
|
105
|
+
options: CheckboxItemType[];
|
|
124
106
|
disabled?: boolean;
|
|
125
107
|
error?: string;
|
|
126
108
|
helperText?: string;
|
|
109
|
+
onChange?: (_selectedOptions: Record<string, boolean>) => void;
|
|
127
110
|
}
|
|
128
|
-
declare const CheckboxGroup: {
|
|
129
|
-
({ options, label, disabled, error, helperText, }: CheckboxGroupProps): React.JSX.Element;
|
|
130
|
-
displayName: string;
|
|
131
|
-
};
|
|
111
|
+
declare const CheckboxGroup: ({ options, label, disabled, error, helperText, onChange, }: CheckboxGroupProps) => React.JSX.Element;
|
|
132
112
|
|
|
133
113
|
interface ItemType<T> {
|
|
134
114
|
label: string;
|
|
@@ -136,20 +116,17 @@ interface ItemType<T> {
|
|
|
136
116
|
infoBubbleContent?: string;
|
|
137
117
|
infoBubblePosition?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
138
118
|
}
|
|
139
|
-
interface Props$
|
|
119
|
+
interface Props$j<T> extends Omit<RadioGroupProps, 'onChange'> {
|
|
140
120
|
label: string;
|
|
141
121
|
options: ItemType<T>[];
|
|
142
|
-
onChange: (
|
|
122
|
+
onChange: (_value: T) => void;
|
|
143
123
|
error?: string;
|
|
144
124
|
helperText?: string;
|
|
145
125
|
disabled?: boolean;
|
|
146
126
|
}
|
|
147
|
-
declare const RadioGroup: {
|
|
148
|
-
<T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props$i<T>): React.JSX.Element;
|
|
149
|
-
displayName: string;
|
|
150
|
-
};
|
|
127
|
+
declare const RadioGroup: <T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props$j<T>) => React.JSX.Element;
|
|
151
128
|
|
|
152
|
-
interface Props$
|
|
129
|
+
interface Props$i extends AccordionProps {
|
|
153
130
|
title?: string;
|
|
154
131
|
summaryHeight?: number;
|
|
155
132
|
expanded?: boolean;
|
|
@@ -157,23 +134,17 @@ interface Props$h extends AccordionProps {
|
|
|
157
134
|
disabled?: boolean;
|
|
158
135
|
onClick?: MouseEventHandler;
|
|
159
136
|
}
|
|
160
|
-
declare const Accordion: {
|
|
161
|
-
({ title, summaryHeight, expanded, onClick, children, ...props }: Props$h): React.JSX.Element;
|
|
162
|
-
displayName: string;
|
|
163
|
-
};
|
|
137
|
+
declare const Accordion: ({ title, summaryHeight, expanded, onClick, children, ...props }: Props$i) => React.JSX.Element;
|
|
164
138
|
|
|
165
139
|
interface LinkItem {
|
|
166
140
|
link: string;
|
|
167
141
|
title: string;
|
|
168
142
|
}
|
|
169
|
-
interface Props$
|
|
143
|
+
interface Props$h extends BreadcrumbsProps {
|
|
170
144
|
PageName: string;
|
|
171
145
|
links: LinkItem[];
|
|
172
146
|
}
|
|
173
|
-
declare const Breadcrumbs: {
|
|
174
|
-
({ PageName, links, ...props }: Props$g): React.JSX.Element;
|
|
175
|
-
displayName: string;
|
|
176
|
-
};
|
|
147
|
+
declare const Breadcrumbs: ({ PageName, links, ...props }: Props$h) => React.JSX.Element;
|
|
177
148
|
|
|
178
149
|
declare const FontSizes: {
|
|
179
150
|
xs: number;
|
|
@@ -184,107 +155,100 @@ declare const FontSizes: {
|
|
|
184
155
|
xxl: number;
|
|
185
156
|
xxxl: number;
|
|
186
157
|
};
|
|
187
|
-
interface Props$
|
|
158
|
+
interface Props$g {
|
|
188
159
|
variant?: 'square' | 'none';
|
|
189
160
|
icon: IconDefinition;
|
|
190
161
|
color?: string;
|
|
191
162
|
size?: number | keyof typeof FontSizes;
|
|
192
163
|
}
|
|
193
|
-
declare const IconProvider: {
|
|
194
|
-
({ variant, icon, color, size, sx, ...props }: Props$f & BoxProps): JSX.Element;
|
|
195
|
-
displayName: string;
|
|
196
|
-
};
|
|
164
|
+
declare const IconProvider: ({ variant, icon, color, size, sx, ...props }: Props$g & BoxProps) => JSX.Element;
|
|
197
165
|
|
|
198
|
-
interface Props$
|
|
166
|
+
interface Props$f {
|
|
199
167
|
totalString: string;
|
|
200
168
|
totalPerPageString: string;
|
|
201
169
|
totalRows: number;
|
|
202
170
|
limitsPerPage?: number[];
|
|
203
171
|
page?: number;
|
|
204
172
|
limit?: number;
|
|
205
|
-
setPage?: (
|
|
206
|
-
setLimit?: (
|
|
173
|
+
setPage?: (_page: number) => void;
|
|
174
|
+
setLimit?: (_limit: number) => void;
|
|
207
175
|
}
|
|
208
|
-
declare const Pagination: {
|
|
209
|
-
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props$e): React.JSX.Element;
|
|
210
|
-
displayName: string;
|
|
211
|
-
};
|
|
176
|
+
declare const Pagination: ({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props$f) => React.JSX.Element;
|
|
212
177
|
|
|
213
|
-
interface Props$
|
|
178
|
+
interface Props$e extends Omit<ChipProps, 'suffix' | 'prefix' | 'onDelete' | 'onDeleteIcon' | 'variant'> {
|
|
214
179
|
variant: 'filled' | 'outlined' | 'status' | 'statusFilled';
|
|
215
180
|
label: string;
|
|
216
181
|
prefixIcon?: IconDefinition;
|
|
217
182
|
suffixIcon?: IconDefinition;
|
|
218
|
-
suffixAction?: (
|
|
183
|
+
suffixAction?: (_e: MouseEvent) => void;
|
|
219
184
|
suffixTooltip?: string;
|
|
220
185
|
tooltip?: string;
|
|
221
186
|
maxWidth?: string | number;
|
|
222
187
|
maxLength?: number;
|
|
223
188
|
}
|
|
224
|
-
declare const Chip: {
|
|
225
|
-
({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props$d): React.JSX.Element;
|
|
226
|
-
displayName: string;
|
|
227
|
-
};
|
|
189
|
+
declare const Chip: ({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props$e) => React.JSX.Element;
|
|
228
190
|
|
|
229
|
-
interface Props$
|
|
191
|
+
interface Props$d extends BoxProps$1 {
|
|
230
192
|
variant: 'warning' | 'error' | 'success' | 'infos';
|
|
231
193
|
title: string;
|
|
232
194
|
text?: ReactNode;
|
|
233
195
|
actionButton?: ReactNode;
|
|
234
196
|
}
|
|
235
|
-
declare const EmbeddedNotification: {
|
|
236
|
-
({ title, text, variant, actionButton, ...props }: Props$c): React.JSX.Element;
|
|
237
|
-
displayName: string;
|
|
238
|
-
};
|
|
197
|
+
declare const EmbeddedNotification: ({ title, text, variant, actionButton, ...props }: Props$d) => React.JSX.Element;
|
|
239
198
|
|
|
240
199
|
type Placement = 'right' | 'bottom' | 'left' | 'top' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
241
200
|
|
|
242
|
-
interface Props$
|
|
243
|
-
title:
|
|
244
|
-
children:
|
|
201
|
+
interface Props$c extends Omit<TooltipProps, 'icon' | 'children' | 'placement'> {
|
|
202
|
+
title: ReactNode;
|
|
203
|
+
children: ReactNode;
|
|
245
204
|
placement?: Placement;
|
|
205
|
+
placementMargin?: number;
|
|
246
206
|
}
|
|
247
|
-
declare const Tooltip: {
|
|
248
|
-
({ title, placement, children, ...tooltipProps }: Props$b): React.JSX.Element;
|
|
249
|
-
displayName: string;
|
|
250
|
-
};
|
|
207
|
+
declare const Tooltip: ({ title, placement, children, placementMargin, ...tooltipProps }: Props$c) => React.JSX.Element;
|
|
251
208
|
|
|
252
|
-
interface Props$
|
|
209
|
+
interface Props$b<T> extends Omit<AutocompleteProps<T, false, false, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'getOptionLabel'> {
|
|
253
210
|
label: string;
|
|
254
211
|
options: T[];
|
|
255
212
|
helperText?: string;
|
|
256
213
|
color?: 'success';
|
|
257
214
|
placeholder?: string;
|
|
258
|
-
getOptionLabel: (
|
|
259
|
-
onChange: (
|
|
215
|
+
getOptionLabel: (_option: T) => string | null | undefined;
|
|
216
|
+
onChange: (_value: T | null) => void;
|
|
260
217
|
value?: T | null;
|
|
261
218
|
width?: number | string;
|
|
262
219
|
error?: string;
|
|
220
|
+
searchIcon?: boolean;
|
|
263
221
|
}
|
|
264
|
-
declare const AutoCompleteSingle: {
|
|
265
|
-
<T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, ...props }: Props$a<T>): React.JSX.Element;
|
|
266
|
-
displayName: string;
|
|
267
|
-
};
|
|
222
|
+
declare const AutoCompleteSingle: <T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, searchIcon, ...props }: Props$b<T>) => React.JSX.Element;
|
|
268
223
|
|
|
269
|
-
interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, true, true, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete'> {
|
|
224
|
+
interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, true, true, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete' | 'searchIcon'> {
|
|
270
225
|
value: T[] | undefined;
|
|
271
226
|
label?: string;
|
|
272
227
|
helperText?: string;
|
|
273
228
|
placeholder?: string;
|
|
274
229
|
options: T[];
|
|
275
|
-
getOptionLabel: (
|
|
276
|
-
getKeyValue: (
|
|
277
|
-
onChange: (
|
|
278
|
-
getOptionDisabled?: (
|
|
230
|
+
getOptionLabel: (_option: T) => string;
|
|
231
|
+
getKeyValue: (_option: T) => string;
|
|
232
|
+
onChange: (_value: T[]) => void;
|
|
233
|
+
getOptionDisabled?: (_option: T) => boolean;
|
|
279
234
|
color?: 'success';
|
|
280
235
|
width?: number | string;
|
|
281
236
|
error?: string;
|
|
237
|
+
searchIcon?: boolean;
|
|
238
|
+
}
|
|
239
|
+
declare const AutocompleteMultipleSelect: <T>({ value, label, placeholder, options, disabled, getOptionLabel, getKeyValue, onChange, getOptionDisabled, width, color, helperText, error, searchIcon, ...props }: AutocompleteMultipleSelectProps<T>) => React.JSX.Element;
|
|
240
|
+
|
|
241
|
+
interface acceptText {
|
|
242
|
+
fileFormat?: string;
|
|
243
|
+
maxSize?: string;
|
|
244
|
+
subText?: string;
|
|
282
245
|
}
|
|
283
|
-
declare const AutocompleteMultipleSelect: <T>({ value, label, placeholder, options, disabled, getOptionLabel, getKeyValue, onChange, getOptionDisabled, width, color, helperText, error, ...props }: AutocompleteMultipleSelectProps<T>) => React.JSX.Element;
|
|
284
246
|
|
|
285
|
-
interface Props$
|
|
286
|
-
setFile: (
|
|
287
|
-
|
|
247
|
+
interface Props$a {
|
|
248
|
+
setFile: (_file: File | null) => void;
|
|
249
|
+
title?: string;
|
|
250
|
+
titleTooltip?: string;
|
|
251
|
+
enableGoogleDrive?: boolean;
|
|
288
252
|
googleAuthClientId?: string;
|
|
289
253
|
googleApiKey?: string;
|
|
290
254
|
error?: boolean;
|
|
@@ -292,16 +256,15 @@ interface Props$9 {
|
|
|
292
256
|
fileUrl?: string | null;
|
|
293
257
|
fileName?: string | null;
|
|
294
258
|
accept?: string[];
|
|
295
|
-
acceptText?:
|
|
259
|
+
acceptText?: acceptText;
|
|
296
260
|
disabledInput?: boolean;
|
|
297
|
-
title?: string;
|
|
298
261
|
children?: JSX.Element | null;
|
|
299
262
|
titleAddButton?: string;
|
|
300
|
-
|
|
301
|
-
|
|
263
|
+
_isDroppingFile?: boolean;
|
|
264
|
+
validateFile?: (_size: number, _type: string) => boolean;
|
|
302
265
|
removeExistingFile?: () => void;
|
|
303
266
|
onTouched?: () => void;
|
|
304
|
-
onFileDataChange?: (
|
|
267
|
+
onFileDataChange?: (_fileData: {
|
|
305
268
|
name: string;
|
|
306
269
|
size: number;
|
|
307
270
|
type?: string;
|
|
@@ -309,37 +272,74 @@ interface Props$9 {
|
|
|
309
272
|
driveAccessToken?: string;
|
|
310
273
|
} | null) => void;
|
|
311
274
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
275
|
+
/**
|
|
276
|
+
* A single file uploader component that supports file selection from local storage or Google Drive.
|
|
277
|
+
*
|
|
278
|
+
* @param {string[]} accept - Array of accepted file types, will display acceptText message
|
|
279
|
+
* but not verify size or type of your file.
|
|
280
|
+
*
|
|
281
|
+
* Example:
|
|
282
|
+
* ```js
|
|
283
|
+
* accept={[
|
|
284
|
+
'application/pdf',
|
|
285
|
+
'image/png',
|
|
286
|
+
'image/jpeg',
|
|
287
|
+
'image/jpg',
|
|
288
|
+
]}
|
|
289
|
+
* ```
|
|
290
|
+
* @param {Object} acceptText - Object containing text for accepted file format, max size, and additional subtext.
|
|
291
|
+
*
|
|
292
|
+
* Example:
|
|
293
|
+
* ```js
|
|
294
|
+
* acceptText={{
|
|
295
|
+
maxSize: '10 Mo',
|
|
296
|
+
subText: 'Sélectionnez un fichier',
|
|
297
|
+
}}
|
|
298
|
+
* ```
|
|
299
|
+
*
|
|
300
|
+
* @param {Function} validateFile - Function to validate the file size and type.
|
|
301
|
+
*
|
|
302
|
+
* Example:
|
|
303
|
+
* ```js
|
|
304
|
+
* validateFile={(size, type) => {
|
|
305
|
+
* if (size > 10 * 1024 * 1024) {
|
|
306
|
+
* setCustomFileError('Le fichier doit être inférieur à 10 Mo');
|
|
307
|
+
* return true;
|
|
308
|
+
* }
|
|
309
|
+
* if (!['application/pdf', 'image/png', 'image/jpeg', 'image/jpg'].includes(type)) {
|
|
310
|
+
* setCustomFileError('Le fichier doit être au format PDF, PNG, JPEG ou JPG');
|
|
311
|
+
* return true;
|
|
312
|
+
* }
|
|
313
|
+
* return false;
|
|
314
|
+
* }}
|
|
315
|
+
* ```
|
|
316
|
+
*
|
|
317
|
+
* @param {Function} onFileDataChange - Callback function to handle file data changes and give you all informations you need
|
|
318
|
+
* to handle google drive file.
|
|
319
|
+
*/
|
|
320
|
+
declare const FileUploaderSingle: ({ enableGoogleDrive, googleAuthClientId, googleApiKey, error, helperText, accept, acceptText, title, titleTooltip, disabledInput, children, fileUrl, fileName, titleAddButton, _isDroppingFile, validateFile, setFile, removeExistingFile, onTouched, onFileDataChange, }: Props$a) => React.JSX.Element;
|
|
321
|
+
|
|
322
|
+
interface Props$9 extends Omit<MenuItemProps, 'onClick'> {
|
|
323
|
+
onClick: (_event?: React.MouseEvent<HTMLElement>) => void;
|
|
324
|
+
children: NonNullable<ReactNode>;
|
|
325
|
+
testId?: string;
|
|
320
326
|
disabled?: boolean;
|
|
321
327
|
}
|
|
322
|
-
declare const
|
|
328
|
+
declare const MenuItem: ({ onClick, children, testId, disabled, ...props }: Props$9) => React.JSX.Element;
|
|
323
329
|
|
|
324
|
-
interface Props$
|
|
330
|
+
interface Props$8 extends Omit<AlertProps, 'severity' | 'text'> {
|
|
325
331
|
text: string | React.ReactNode;
|
|
326
332
|
severity: 'success' | 'warning' | 'error' | 'info';
|
|
327
333
|
}
|
|
328
|
-
declare const Snackbar: {
|
|
329
|
-
({ text, severity }: Props$7): React.JSX.Element;
|
|
330
|
-
displayName: string;
|
|
331
|
-
};
|
|
334
|
+
declare const Snackbar: ({ text, severity }: Props$8) => React.JSX.Element;
|
|
332
335
|
|
|
333
336
|
declare const NotistackAdapter: React.ForwardRefExoticComponent<CustomContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
334
337
|
|
|
335
|
-
interface Props$
|
|
338
|
+
interface Props$7 extends AlertProps {
|
|
336
339
|
text: string;
|
|
337
340
|
onClose?: () => void;
|
|
338
341
|
}
|
|
339
|
-
declare const BannerNotification: {
|
|
340
|
-
({ text, severity, onClose }: Props$6): React.JSX.Element;
|
|
341
|
-
displayName: string;
|
|
342
|
-
};
|
|
342
|
+
declare const BannerNotification: ({ text, severity, onClose }: Props$7) => React.JSX.Element;
|
|
343
343
|
|
|
344
344
|
interface StepperItem {
|
|
345
345
|
label: string;
|
|
@@ -353,13 +353,13 @@ interface Step {
|
|
|
353
353
|
icon: IconDefinition;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
interface Props$
|
|
356
|
+
interface Props$6 {
|
|
357
357
|
steps: Step[];
|
|
358
358
|
canNavigate: boolean;
|
|
359
|
-
onNavigate?: (
|
|
359
|
+
onNavigate?: (_url: string) => void;
|
|
360
360
|
sx?: SxProps<Theme$1>;
|
|
361
361
|
}
|
|
362
|
-
declare const Stepper: ({ steps, canNavigate, onNavigate, sx, }: Props$
|
|
362
|
+
declare const Stepper: ({ steps, canNavigate, onNavigate, sx, }: Props$6) => React.JSX.Element;
|
|
363
363
|
|
|
364
364
|
interface ModalProps extends Omit<ModalProps$1, 'component' | 'open' | 'className' | 'onClose'> {
|
|
365
365
|
open: boolean;
|
|
@@ -377,27 +377,41 @@ declare const Drawer: ({ title, open, onClose, component, footer, cardProps, siz
|
|
|
377
377
|
|
|
378
378
|
declare const Dialog: ({ title, open, onClose, component, icon, ...props }: Omit<ModalProps, "footer" | "cardProps" | "size">) => React.JSX.Element;
|
|
379
379
|
|
|
380
|
-
interface Props$
|
|
380
|
+
interface Props$5 {
|
|
381
381
|
label: string;
|
|
382
382
|
checked: boolean;
|
|
383
383
|
leftSideLabel?: string;
|
|
384
384
|
onClick: () => void;
|
|
385
385
|
}
|
|
386
|
-
declare const Switch: {
|
|
387
|
-
({ label, checked, leftSideLabel, onClick, ...props }: SwitchProps & Props$4): React.JSX.Element;
|
|
388
|
-
displayName: string;
|
|
389
|
-
};
|
|
386
|
+
declare const Switch: ({ label, checked, leftSideLabel, onClick, ...props }: SwitchProps & Props$5) => React.JSX.Element;
|
|
390
387
|
|
|
391
|
-
interface Props$
|
|
388
|
+
interface Props$4<T extends Dayjs> extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
392
389
|
value: T | null | undefined;
|
|
393
|
-
onChange: (
|
|
390
|
+
onChange: (_value: T | null | undefined) => void;
|
|
394
391
|
error?: string;
|
|
395
392
|
success?: boolean;
|
|
396
393
|
helperText?: string;
|
|
397
394
|
width?: string;
|
|
398
395
|
locale?: 'fr' | 'en';
|
|
399
396
|
}
|
|
400
|
-
declare const DatePicker: <T extends Dayjs>({ value, onChange, error, success, helperText, width, locale, ...props }: Props$
|
|
397
|
+
declare const DatePicker: <T extends Dayjs>({ value, onChange, error, success, helperText, width, locale, ...props }: Props$4<T>) => React.JSX.Element;
|
|
398
|
+
|
|
399
|
+
interface Props$3 extends Omit<TextFieldProps, 'error' | 'onChange'> {
|
|
400
|
+
value: Dayjs | undefined;
|
|
401
|
+
onChange?: (_time: string | Dayjs | undefined) => void;
|
|
402
|
+
onTouched?: () => void;
|
|
403
|
+
label?: string;
|
|
404
|
+
helperText?: string;
|
|
405
|
+
minTime?: Dayjs;
|
|
406
|
+
maxTime?: Dayjs;
|
|
407
|
+
timeStep?: number;
|
|
408
|
+
error?: string;
|
|
409
|
+
disabled?: boolean;
|
|
410
|
+
width?: string | number;
|
|
411
|
+
locale?: 'fr' | 'en';
|
|
412
|
+
color?: 'success';
|
|
413
|
+
}
|
|
414
|
+
declare const TimePicker: ({ value, label, helperText, error, disabled, minTime, maxTime, timeStep, locale, width, color, onTouched, onChange, ...props }: Props$3) => React.JSX.Element;
|
|
401
415
|
|
|
402
416
|
type Order = 'asc' | 'desc';
|
|
403
417
|
interface SortInfo {
|
|
@@ -410,7 +424,7 @@ interface PaginationTrans {
|
|
|
410
424
|
}
|
|
411
425
|
type ColumnDatatable<T> = {
|
|
412
426
|
name: string;
|
|
413
|
-
render: (
|
|
427
|
+
render: (_record: T) => JSX.Element;
|
|
414
428
|
title?: string;
|
|
415
429
|
topTitle?: string;
|
|
416
430
|
width?: string;
|
|
@@ -424,15 +438,16 @@ type BaseProps<T> = {
|
|
|
424
438
|
withPagination: boolean;
|
|
425
439
|
withHeader?: boolean;
|
|
426
440
|
sortInfo?: SortInfo | null;
|
|
427
|
-
|
|
441
|
+
isTableLayoutFixed?: boolean;
|
|
442
|
+
onSort?: (_info: SortInfo | null) => void;
|
|
428
443
|
};
|
|
429
444
|
type WithoutPaginationProps = {
|
|
430
445
|
withPagination: false;
|
|
431
446
|
};
|
|
432
447
|
type PaginationProps = {
|
|
433
448
|
withPagination: true;
|
|
434
|
-
setPage: (
|
|
435
|
-
setLimit: (
|
|
449
|
+
setPage: (_page: number) => void;
|
|
450
|
+
setLimit: (_limit: number) => void;
|
|
436
451
|
trans: PaginationTrans;
|
|
437
452
|
withTopPagination?: boolean;
|
|
438
453
|
limits?: number[];
|
|
@@ -451,13 +466,13 @@ type WithoutDetailsProps<T> = {
|
|
|
451
466
|
};
|
|
452
467
|
type Props$2<T extends object> = BaseProps<T> & (WithoutPaginationProps | PaginationProps) & (WithDetailsProps<T, RowDetail> | WithoutDetailsProps<T>);
|
|
453
468
|
|
|
454
|
-
declare const Datatable: <T extends object>({ onLoad, onSort, sortInfo, withHeader, withPagination, columns, ...props }: Props$2<T>) => React.JSX.Element;
|
|
469
|
+
declare const Datatable: <T extends object>({ onLoad, onSort, sortInfo, withHeader, withPagination, columns, isTableLayoutFixed, ...props }: Props$2<T>) => React.JSX.Element;
|
|
455
470
|
|
|
456
471
|
declare const DatatableCellRender: ({ data }: {
|
|
457
472
|
data: string;
|
|
458
473
|
}) => JSX.Element;
|
|
459
474
|
|
|
460
|
-
interface Props$1 extends IconButtonProps {
|
|
475
|
+
interface Props$1 extends Omit<IconButtonProps, 'color'> {
|
|
461
476
|
icon: IconDefinition;
|
|
462
477
|
variant?: 'default' | 'table';
|
|
463
478
|
positionGroup?: 'left' | 'middle' | 'right';
|
|
@@ -465,12 +480,10 @@ interface Props$1 extends IconButtonProps {
|
|
|
465
480
|
tooltipPosition?: Placement;
|
|
466
481
|
size?: 'small' | 'medium';
|
|
467
482
|
sx?: SxProps<Theme$1>;
|
|
468
|
-
|
|
483
|
+
color?: string;
|
|
484
|
+
onClick?: MouseEventHandler | undefined;
|
|
469
485
|
}
|
|
470
|
-
declare const IconButton: {
|
|
471
|
-
({ icon, variant, positionGroup, tooltipText, tooltipPosition, size, ...iconButtonProps }: Props$1): React.JSX.Element;
|
|
472
|
-
displayName: string;
|
|
473
|
-
};
|
|
486
|
+
declare const IconButton: ({ icon, variant, positionGroup, tooltipText, tooltipPosition, size, color, onClick, ...iconButtonProps }: Props$1) => React.JSX.Element;
|
|
474
487
|
|
|
475
488
|
type Theme = 'Default' | 'Ep';
|
|
476
489
|
interface DesignSystemContextValues {
|
|
@@ -484,4 +497,4 @@ interface Props {
|
|
|
484
497
|
}
|
|
485
498
|
declare const DesignSystemProvider: ({ children, name: themeName, }: PropsWithChildren<Props>) => React.JSX.Element;
|
|
486
499
|
|
|
487
|
-
export { Accordion, AutocompleteMultipleSelect as AutoCompleteMulti, AutoCompleteSingle, BannerNotification, Breadcrumbs, Button, Checkbox, CheckboxGroup, Chip, Datatable, DatatableCellRender, DatePicker, DesignSystemContext, type DesignSystemContextValues, DesignSystemProvider, Dialog, Drawer, EmbeddedNotification, FileUploaderSingle, IconButton, IconProvider, Link,
|
|
500
|
+
export { Accordion, AutocompleteMultipleSelect as AutoCompleteMulti, AutoCompleteSingle, BannerNotification, Breadcrumbs, Button, Checkbox, CheckboxGroup, type CheckboxItemType, Chip, Datatable, DatatableCellRender, DatePicker, DesignSystemContext, type DesignSystemContextValues, DesignSystemProvider, Dialog, Drawer, EmbeddedNotification, FileUploaderSingle, IconButton, IconProvider, Link, MenuItem, MultiSelect, NotistackAdapter, Pagination, RadioGroup, Select, Snackbar, Stepper, Switch, Text, TextField, TimePicker, Tooltip };
|