@groupeactual/ui-kit 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Form/DatePicker/DatePicker.d.ts +3 -1
- package/dist/cjs/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/cjs/types/components/UploadDocument/UploaderDocument.d.ts +17 -0
- package/dist/cjs/types/components/UploadDocument/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +1 -0
- package/dist/es/index.d.ts +51 -34
- package/dist/es/index.mjs +9 -10
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/types/components/Form/DatePicker/DatePicker.d.ts +3 -1
- package/dist/es/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/es/types/components/UploadDocument/UploaderDocument.d.ts +17 -0
- package/dist/es/types/components/UploadDocument/index.d.ts +1 -0
- package/dist/es/types/components/index.d.ts +1 -0
- package/package.json +8 -7
- package/src/components/Form/DatePicker/DatePicker.tsx +20 -17
- package/src/components/Form/MultiSelect/MultiSelect.tsx +12 -12
- package/src/components/Pagination/Pagination.tsx +9 -9
- package/src/components/UploadDocument/UploaderDocument.tsx +364 -0
- package/src/components/UploadDocument/index.ts +1 -0
- package/src/components/index.ts +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
2
|
+
import 'dayjs/locale/fr';
|
|
2
3
|
interface Props<T> extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
3
4
|
value: T;
|
|
4
5
|
onChange: (value: T | null) => void;
|
|
@@ -6,6 +7,7 @@ interface Props<T> extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
|
6
7
|
success?: boolean;
|
|
7
8
|
helperText?: string;
|
|
8
9
|
width?: string;
|
|
10
|
+
locale?: 'fr' | 'en';
|
|
9
11
|
}
|
|
10
|
-
declare const DatePicker: <T extends {}>({ value, onChange, error, success, helperText, width, ...props }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const DatePicker: <T extends {}>({ value, onChange, error, success, helperText, width, locale, ...props }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export default DatePicker;
|
|
@@ -9,7 +9,7 @@ interface Props {
|
|
|
9
9
|
setLimit?: (limit: number) => void;
|
|
10
10
|
}
|
|
11
11
|
declare const Pagination: {
|
|
12
|
-
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
export default Pagination;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Props {
|
|
3
|
+
setFile: (file: File | null) => void;
|
|
4
|
+
removeExistingFile: () => void;
|
|
5
|
+
onTouched?: () => void;
|
|
6
|
+
error: boolean;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
fileUrl?: string | null;
|
|
9
|
+
fileName?: string | null;
|
|
10
|
+
accept: string[];
|
|
11
|
+
disabledInput?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
children?: JSX.Element | null;
|
|
14
|
+
titleAddButton: string;
|
|
15
|
+
}
|
|
16
|
+
declare const UploaderDocument: ({ setFile, error, helperText, removeExistingFile, onTouched, accept, title, disabledInput, children, fileUrl, fileName, titleAddButton, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default UploaderDocument;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UploaderDocument';
|
|
@@ -16,6 +16,7 @@ export { default as EmbeddedNotification } from './EmbbededNotification/Embedded
|
|
|
16
16
|
export { default as Tooltip } from './Tooltip/Tooltip';
|
|
17
17
|
export { default as AutoCompleteSingle } from './Form/AutoCompleteSingle';
|
|
18
18
|
export { default as AutoCompleteMulti } from './Form/AutoCompleteMulti';
|
|
19
|
+
export { default as UploaderDocument } from './UploadDocument/UploaderDocument';
|
|
19
20
|
export { default as Snackbar } from './Snackbar/Snackbar';
|
|
20
21
|
export { default as NotistackAdapter } from './NotistackAdapter/NotistackAdapter';
|
|
21
22
|
export { default as BannerNotification } from './BannerNotification/BannerNotification';
|
package/dist/es/index.d.ts
CHANGED
|
@@ -5,34 +5,34 @@ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
|
5
5
|
import { CustomContentProps } from 'notistack';
|
|
6
6
|
import { DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
7
7
|
|
|
8
|
-
interface Props$
|
|
8
|
+
interface Props$o extends Omit<TypographyProps, 'variant'> {
|
|
9
9
|
variant?: 'bigNumber' | 'body1' | 'body1Regular' | 'body1Medium' | 'body1Bold' | 'body2' | 'body2Regular' | 'body2Medium' | 'body2Bold' | 'caption' | 'buttonNotif' | 'header1' | 'header2' | 'header3' | 'header4' | 'h1' | 'h2' | 'h3' | 'h4' | 'link1' | 'link2';
|
|
10
10
|
component?: any;
|
|
11
11
|
}
|
|
12
12
|
declare const Text: {
|
|
13
|
-
(props: Props$
|
|
13
|
+
(props: Props$o): react_jsx_runtime.JSX.Element;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
interface Props$
|
|
17
|
+
interface Props$n extends Omit<LinkProps, 'variant'> {
|
|
18
18
|
variant?: 'link1' | 'link2';
|
|
19
19
|
component?: any;
|
|
20
20
|
}
|
|
21
21
|
declare const Link: {
|
|
22
|
-
(props: Props$
|
|
22
|
+
(props: Props$n): react_jsx_runtime.JSX.Element;
|
|
23
23
|
displayName: string;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
interface Props$
|
|
26
|
+
interface Props$m extends Omit<ButtonProps, 'variant' | 'children'> {
|
|
27
27
|
variant?: 'primary' | 'secondary';
|
|
28
28
|
children?: ReactNode;
|
|
29
29
|
}
|
|
30
30
|
declare const Button: {
|
|
31
|
-
({ variant, children, ...props }: Props$
|
|
31
|
+
({ variant, children, ...props }: Props$m): react_jsx_runtime.JSX.Element;
|
|
32
32
|
displayName: string;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
interface Props$
|
|
35
|
+
interface Props$l extends Omit<TextFieldProps, 'error'> {
|
|
36
36
|
error?: string;
|
|
37
37
|
onBlur?: FocusEventHandler<unknown>;
|
|
38
38
|
onChange?: InputProps['onChange'];
|
|
@@ -46,11 +46,11 @@ interface Props$k extends Omit<TextFieldProps, 'error'> {
|
|
|
46
46
|
width?: number | string;
|
|
47
47
|
}
|
|
48
48
|
declare const TextField: {
|
|
49
|
-
({ name, value, error, onBlur, onChange, label, disabled, width, endAdornment, placeholder, maxLength, ...props }: Props$
|
|
49
|
+
({ name, value, error, onBlur, onChange, label, disabled, width, endAdornment, placeholder, maxLength, ...props }: Props$l): react_jsx_runtime.JSX.Element;
|
|
50
50
|
displayName: string;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
interface Props$
|
|
53
|
+
interface Props$k<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color' | 'error'> {
|
|
54
54
|
options: T[];
|
|
55
55
|
getRenderValue: (option: T) => string;
|
|
56
56
|
onChange: (value: T) => void;
|
|
@@ -62,11 +62,11 @@ interface Props$j<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color'
|
|
|
62
62
|
error?: string;
|
|
63
63
|
}
|
|
64
64
|
declare const Select: {
|
|
65
|
-
<T>({ value, label, options, color, error, placeholder, onChange, getRenderValue, helperText, onBlur, width, disabled, ...props }: Props$
|
|
65
|
+
<T>({ value, label, options, color, error, placeholder, onChange, getRenderValue, helperText, onBlur, width, disabled, ...props }: Props$k<T>): react_jsx_runtime.JSX.Element;
|
|
66
66
|
displayName: string;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
interface Props$
|
|
69
|
+
interface Props$j<T> extends Omit<SelectProps<T[]>, 'value' | 'onChange' | 'value' | 'color' | 'error'> {
|
|
70
70
|
label: string;
|
|
71
71
|
options: T[] | [];
|
|
72
72
|
helperText?: string;
|
|
@@ -79,11 +79,11 @@ interface Props$i<T> extends Omit<SelectProps<T[]>, 'value' | 'onChange' | 'valu
|
|
|
79
79
|
error?: string;
|
|
80
80
|
}
|
|
81
81
|
declare const MultiSelect: {
|
|
82
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, onBlur, disabled, ...props }: Props$
|
|
82
|
+
<T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, onBlur, disabled, ...props }: Props$j<T>): react_jsx_runtime.JSX.Element;
|
|
83
83
|
displayName: string;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
interface Props$
|
|
86
|
+
interface Props$i {
|
|
87
87
|
name: string;
|
|
88
88
|
value: boolean;
|
|
89
89
|
label: string;
|
|
@@ -94,7 +94,7 @@ interface Props$h {
|
|
|
94
94
|
infoBubblePosition?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
95
95
|
}
|
|
96
96
|
declare const Checkbox: {
|
|
97
|
-
({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props$
|
|
97
|
+
({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props$i): react_jsx_runtime.JSX.Element;
|
|
98
98
|
displayName: string;
|
|
99
99
|
};
|
|
100
100
|
|
|
@@ -123,7 +123,7 @@ interface ItemType<T> {
|
|
|
123
123
|
infoBubbleContent?: string;
|
|
124
124
|
infoBubblePosition?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
125
125
|
}
|
|
126
|
-
interface Props$
|
|
126
|
+
interface Props$h<T> extends Omit<RadioGroupProps, 'onChange'> {
|
|
127
127
|
label: string;
|
|
128
128
|
options: ItemType<T>[];
|
|
129
129
|
onChange: (value: T) => void;
|
|
@@ -132,18 +132,18 @@ interface Props$g<T> extends Omit<RadioGroupProps, 'onChange'> {
|
|
|
132
132
|
disabled?: boolean;
|
|
133
133
|
}
|
|
134
134
|
declare const RadioGroup: {
|
|
135
|
-
<T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props$
|
|
135
|
+
<T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props$h<T>): react_jsx_runtime.JSX.Element;
|
|
136
136
|
displayName: string;
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
interface Props$
|
|
139
|
+
interface Props$g extends AccordionProps {
|
|
140
140
|
title?: string;
|
|
141
141
|
summaryHeight?: number;
|
|
142
142
|
expanded?: boolean;
|
|
143
143
|
onClick?: MouseEventHandler;
|
|
144
144
|
}
|
|
145
145
|
declare const Accordion: {
|
|
146
|
-
({ title, summaryHeight, expanded, onClick, children, ...props }: Props$
|
|
146
|
+
({ title, summaryHeight, expanded, onClick, children, ...props }: Props$g): react_jsx_runtime.JSX.Element;
|
|
147
147
|
displayName: string;
|
|
148
148
|
};
|
|
149
149
|
|
|
@@ -151,12 +151,12 @@ interface LinkItem {
|
|
|
151
151
|
link: string;
|
|
152
152
|
title: string;
|
|
153
153
|
}
|
|
154
|
-
interface Props$
|
|
154
|
+
interface Props$f extends BreadcrumbsProps {
|
|
155
155
|
PageName: string;
|
|
156
156
|
links: LinkItem[];
|
|
157
157
|
}
|
|
158
158
|
declare const Breadcrumbs: {
|
|
159
|
-
({ PageName, links, ...props }: Props$
|
|
159
|
+
({ PageName, links, ...props }: Props$f): react_jsx_runtime.JSX.Element;
|
|
160
160
|
displayName: string;
|
|
161
161
|
};
|
|
162
162
|
|
|
@@ -169,18 +169,18 @@ declare const FontSizes: {
|
|
|
169
169
|
xxl: number;
|
|
170
170
|
xxxl: number;
|
|
171
171
|
};
|
|
172
|
-
interface Props$
|
|
172
|
+
interface Props$e {
|
|
173
173
|
variant?: 'square' | 'none';
|
|
174
174
|
icon: IconDefinition;
|
|
175
175
|
color?: string;
|
|
176
176
|
size?: number | keyof typeof FontSizes;
|
|
177
177
|
}
|
|
178
178
|
declare const IconProvider: {
|
|
179
|
-
({ variant, icon, color, size, sx, ...props }: Props$
|
|
179
|
+
({ variant, icon, color, size, sx, ...props }: Props$e & BoxProps): JSX.Element;
|
|
180
180
|
displayName: string;
|
|
181
181
|
};
|
|
182
182
|
|
|
183
|
-
interface Props$
|
|
183
|
+
interface Props$d {
|
|
184
184
|
totalString: string;
|
|
185
185
|
totalPerPageString: string;
|
|
186
186
|
totalRows: number;
|
|
@@ -191,11 +191,11 @@ interface Props$c {
|
|
|
191
191
|
setLimit?: (limit: number) => void;
|
|
192
192
|
}
|
|
193
193
|
declare const Pagination: {
|
|
194
|
-
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit }: Props$
|
|
194
|
+
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props$d): react_jsx_runtime.JSX.Element;
|
|
195
195
|
displayName: string;
|
|
196
196
|
};
|
|
197
197
|
|
|
198
|
-
interface Props$
|
|
198
|
+
interface Props$c extends Omit<ChipProps, 'suffix' | 'prefix' | 'onDelete' | 'onDeleteIcon' | 'variant'> {
|
|
199
199
|
variant: 'filled' | 'outlined' | 'status' | 'statusFilled';
|
|
200
200
|
label: string;
|
|
201
201
|
prefixIcon?: IconDefinition;
|
|
@@ -207,34 +207,34 @@ interface Props$b extends Omit<ChipProps, 'suffix' | 'prefix' | 'onDelete' | 'on
|
|
|
207
207
|
maxLength?: number;
|
|
208
208
|
}
|
|
209
209
|
declare const Chip: {
|
|
210
|
-
({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props$
|
|
210
|
+
({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props$c): react_jsx_runtime.JSX.Element;
|
|
211
211
|
displayName: string;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
interface Props$
|
|
214
|
+
interface Props$b extends BoxProps {
|
|
215
215
|
variant: 'warning' | 'error' | 'success' | 'infos';
|
|
216
216
|
title: string;
|
|
217
217
|
text?: ReactNode;
|
|
218
218
|
actionButton?: ReactNode;
|
|
219
219
|
}
|
|
220
220
|
declare const EmbeddedNotification: {
|
|
221
|
-
({ title, text, variant, actionButton, ...props }: Props$
|
|
221
|
+
({ title, text, variant, actionButton, ...props }: Props$b): react_jsx_runtime.JSX.Element;
|
|
222
222
|
displayName: string;
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
type Placement = 'right' | 'bottom' | 'left' | 'top' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
226
226
|
|
|
227
|
-
interface Props$
|
|
227
|
+
interface Props$a extends Omit<TooltipProps, 'icon' | 'children' | 'placement'> {
|
|
228
228
|
title: string;
|
|
229
229
|
children: ReactElement;
|
|
230
230
|
placement?: Placement;
|
|
231
231
|
}
|
|
232
232
|
declare const Tooltip: {
|
|
233
|
-
({ title, placement, children, ...tooltipProps }: Props$
|
|
233
|
+
({ title, placement, children, ...tooltipProps }: Props$a): react_jsx_runtime.JSX.Element;
|
|
234
234
|
displayName: string;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
interface Props$
|
|
237
|
+
interface Props$9<T> extends Omit<AutocompleteProps<T, false, false, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error'> {
|
|
238
238
|
label: string;
|
|
239
239
|
options: T[];
|
|
240
240
|
helperText?: string;
|
|
@@ -247,7 +247,7 @@ interface Props$8<T> extends Omit<AutocompleteProps<T, false, false, false>, 'on
|
|
|
247
247
|
error?: string;
|
|
248
248
|
}
|
|
249
249
|
declare const AutoCompleteSingle: {
|
|
250
|
-
<T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, ...props }: Props$
|
|
250
|
+
<T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, ...props }: Props$9<T>): react_jsx_runtime.JSX.Element;
|
|
251
251
|
displayName: string;
|
|
252
252
|
};
|
|
253
253
|
|
|
@@ -267,6 +267,22 @@ interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, t
|
|
|
267
267
|
}
|
|
268
268
|
declare const AutocompleteMultipleSelect: <T>({ value, label, placeholder, options, disabled, getOptionLabel, getKeyValue, onChange, getOptionDisabled, width, color, helperText, error, ...props }: AutocompleteMultipleSelectProps<T>) => react_jsx_runtime.JSX.Element;
|
|
269
269
|
|
|
270
|
+
interface Props$8 {
|
|
271
|
+
setFile: (file: File | null) => void;
|
|
272
|
+
removeExistingFile: () => void;
|
|
273
|
+
onTouched?: () => void;
|
|
274
|
+
error: boolean;
|
|
275
|
+
helperText?: string;
|
|
276
|
+
fileUrl?: string | null;
|
|
277
|
+
fileName?: string | null;
|
|
278
|
+
accept: string[];
|
|
279
|
+
disabledInput?: boolean;
|
|
280
|
+
title?: string;
|
|
281
|
+
children?: JSX.Element | null;
|
|
282
|
+
titleAddButton: string;
|
|
283
|
+
}
|
|
284
|
+
declare const UploaderDocument: ({ setFile, error, helperText, removeExistingFile, onTouched, accept, title, disabledInput, children, fileUrl, fileName, titleAddButton, }: Props$8) => react_jsx_runtime.JSX.Element;
|
|
285
|
+
|
|
270
286
|
interface Props$7 extends Omit<AlertProps, 'severity' | 'text'> {
|
|
271
287
|
text: string | React.ReactNode;
|
|
272
288
|
severity: 'success' | 'warning' | 'error' | 'info';
|
|
@@ -325,8 +341,9 @@ interface Props$3<T> extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
|
325
341
|
success?: boolean;
|
|
326
342
|
helperText?: string;
|
|
327
343
|
width?: string;
|
|
344
|
+
locale?: 'fr' | 'en';
|
|
328
345
|
}
|
|
329
|
-
declare const DatePicker: <T extends {}>({ value, onChange, error, success, helperText, width, ...props }: Props$3<T>) => react_jsx_runtime.JSX.Element;
|
|
346
|
+
declare const DatePicker: <T extends {}>({ value, onChange, error, success, helperText, width, locale, ...props }: Props$3<T>) => react_jsx_runtime.JSX.Element;
|
|
330
347
|
|
|
331
348
|
type Order = 'asc' | 'desc';
|
|
332
349
|
interface SortInfo {
|
|
@@ -406,4 +423,4 @@ interface Props {
|
|
|
406
423
|
}
|
|
407
424
|
declare const DesignSystemProvider: ({ children, name: themeName }: PropsWithChildren<Props>) => react_jsx_runtime.JSX.Element;
|
|
408
425
|
|
|
409
|
-
export { Accordion, AutocompleteMultipleSelect as AutoCompleteMulti, AutoCompleteSingle, BannerNotification, Breadcrumbs, Button, Checkbox, CheckboxGroup, Chip, Datatable, DatePicker, DesignSystemContext, type DesignSystemContextValues, DesignSystemProvider, EmbeddedNotification, IconButton, IconProvider, Link, MultiSelect, NotistackAdapter, Pagination, RadioGroup, Select, Snackbar, Stepper, Switch, Text, TextField, Tooltip };
|
|
426
|
+
export { Accordion, AutocompleteMultipleSelect as AutoCompleteMulti, AutoCompleteSingle, BannerNotification, Breadcrumbs, Button, Checkbox, CheckboxGroup, Chip, Datatable, DatePicker, DesignSystemContext, type DesignSystemContextValues, DesignSystemProvider, EmbeddedNotification, IconButton, IconProvider, Link, MultiSelect, NotistackAdapter, Pagination, RadioGroup, Select, Snackbar, Stepper, Switch, Text, TextField, Tooltip, UploaderDocument };
|