@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
|
@@ -8,8 +8,5 @@ interface Props extends AccordionProps {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
onClick?: MouseEventHandler;
|
|
10
10
|
}
|
|
11
|
-
declare const Accordion: {
|
|
12
|
-
({ title, summaryHeight, expanded, onClick, children, ...props }: Props): React.JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
11
|
+
declare const Accordion: ({ title, summaryHeight, expanded, onClick, children, ...props }: Props) => React.JSX.Element;
|
|
15
12
|
export default Accordion;
|
|
@@ -4,8 +4,5 @@ interface Props extends AlertProps {
|
|
|
4
4
|
text: string;
|
|
5
5
|
onClose?: () => void;
|
|
6
6
|
}
|
|
7
|
-
declare const BannerNotification: {
|
|
8
|
-
({ text, severity, onClose }: Props): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
declare const BannerNotification: ({ text, severity, onClose }: Props) => React.JSX.Element;
|
|
11
8
|
export default BannerNotification;
|
|
@@ -8,8 +8,5 @@ interface Props extends BreadcrumbsProps {
|
|
|
8
8
|
PageName: string;
|
|
9
9
|
links: LinkItem[];
|
|
10
10
|
}
|
|
11
|
-
declare const Breadcrumbs: {
|
|
12
|
-
({ PageName, links, ...props }: Props): React.JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
11
|
+
declare const Breadcrumbs: ({ PageName, links, ...props }: Props) => React.JSX.Element;
|
|
15
12
|
export default Breadcrumbs;
|
|
@@ -4,8 +4,5 @@ interface Props extends Omit<ButtonProps, 'variant' | 'children'> {
|
|
|
4
4
|
variant?: 'primary' | 'secondary';
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare const Button: {
|
|
8
|
-
({ variant, children, ...props }: Props): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
declare const Button: ({ variant, children, ...props }: Props) => React.JSX.Element;
|
|
11
8
|
export default Button;
|
|
@@ -6,14 +6,11 @@ interface Props extends Omit<ChipPropsMUI, 'suffix' | 'prefix' | 'onDelete' | 'o
|
|
|
6
6
|
label: string;
|
|
7
7
|
prefixIcon?: IconDefinition;
|
|
8
8
|
suffixIcon?: IconDefinition;
|
|
9
|
-
suffixAction?: (
|
|
9
|
+
suffixAction?: (_e: MouseEvent) => void;
|
|
10
10
|
suffixTooltip?: string;
|
|
11
11
|
tooltip?: string;
|
|
12
12
|
maxWidth?: string | number;
|
|
13
13
|
maxLength?: number;
|
|
14
14
|
}
|
|
15
|
-
declare const Chip: {
|
|
16
|
-
({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props): React.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
15
|
+
declare const Chip: ({ variant, label, prefixIcon, suffixIcon, suffixTooltip, suffixAction, tooltip, maxWidth, ...props }: Props) => React.JSX.Element;
|
|
19
16
|
export default Chip;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Props } from './datatable.interface';
|
|
3
|
-
declare const Datatable: <T extends object>({ onLoad, onSort, sortInfo, withHeader, withPagination, columns, ...props }: Props<T>) => React.JSX.Element;
|
|
3
|
+
declare const Datatable: <T extends object>({ onLoad, onSort, sortInfo, withHeader, withPagination, columns, isTableLayoutFixed, ...props }: Props<T>) => React.JSX.Element;
|
|
4
4
|
export default Datatable;
|
|
@@ -10,7 +10,7 @@ export interface PaginationTrans {
|
|
|
10
10
|
}
|
|
11
11
|
export type ColumnDatatable<T> = {
|
|
12
12
|
name: string;
|
|
13
|
-
render: (
|
|
13
|
+
render: (_record: T) => JSX.Element;
|
|
14
14
|
title?: string;
|
|
15
15
|
topTitle?: string;
|
|
16
16
|
width?: string;
|
|
@@ -24,15 +24,16 @@ type BaseProps<T> = {
|
|
|
24
24
|
withPagination: boolean;
|
|
25
25
|
withHeader?: boolean;
|
|
26
26
|
sortInfo?: SortInfo | null;
|
|
27
|
-
|
|
27
|
+
isTableLayoutFixed?: boolean;
|
|
28
|
+
onSort?: (_info: SortInfo | null) => void;
|
|
28
29
|
};
|
|
29
30
|
type WithoutPaginationProps = {
|
|
30
31
|
withPagination: false;
|
|
31
32
|
};
|
|
32
33
|
export type PaginationProps = {
|
|
33
34
|
withPagination: true;
|
|
34
|
-
setPage: (
|
|
35
|
-
setLimit: (
|
|
35
|
+
setPage: (_page: number) => void;
|
|
36
|
+
setLimit: (_limit: number) => void;
|
|
36
37
|
trans: PaginationTrans;
|
|
37
38
|
withTopPagination?: boolean;
|
|
38
39
|
limits?: number[];
|
|
@@ -6,8 +6,5 @@ interface Props extends BoxProps {
|
|
|
6
6
|
text?: ReactNode;
|
|
7
7
|
actionButton?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
declare const EmbeddedNotification: {
|
|
10
|
-
({ title, text, variant, actionButton, ...props }: Props): React.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
9
|
+
declare const EmbeddedNotification: ({ title, text, variant, actionButton, ...props }: Props) => React.JSX.Element;
|
|
13
10
|
export default EmbeddedNotification;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AutocompleteProps } from '@mui/material';
|
|
3
|
-
interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, true, true, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete'> {
|
|
3
|
+
interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, true, true, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete' | 'searchIcon'> {
|
|
4
4
|
value: T[] | undefined;
|
|
5
5
|
label?: string;
|
|
6
6
|
helperText?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
options: T[];
|
|
9
|
-
getOptionLabel: (
|
|
10
|
-
getKeyValue: (
|
|
11
|
-
onChange: (
|
|
12
|
-
getOptionDisabled?: (
|
|
9
|
+
getOptionLabel: (_option: T) => string;
|
|
10
|
+
getKeyValue: (_option: T) => string;
|
|
11
|
+
onChange: (_value: T[]) => void;
|
|
12
|
+
getOptionDisabled?: (_option: T) => boolean;
|
|
13
13
|
color?: 'success';
|
|
14
14
|
width?: number | string;
|
|
15
15
|
error?: string;
|
|
16
|
+
searchIcon?: boolean;
|
|
16
17
|
}
|
|
17
|
-
declare const AutocompleteMultipleSelect: <T>({ value, label, placeholder, options, disabled, getOptionLabel, getKeyValue, onChange, getOptionDisabled, width, color, helperText, error, ...props }: AutocompleteMultipleSelectProps<T>) => React.JSX.Element;
|
|
18
|
+
declare const AutocompleteMultipleSelect: <T>({ value, label, placeholder, options, disabled, getOptionLabel, getKeyValue, onChange, getOptionDisabled, width, color, helperText, error, searchIcon, ...props }: AutocompleteMultipleSelectProps<T>) => React.JSX.Element;
|
|
18
19
|
export default AutocompleteMultipleSelect;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AutocompleteProps } from '@mui/material';
|
|
3
|
-
interface Props<T> extends Omit<AutocompleteProps<T, false, false, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'getOptionLabel'
|
|
3
|
+
interface Props<T> extends Omit<AutocompleteProps<T, false, false, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'getOptionLabel'> {
|
|
4
4
|
label: string;
|
|
5
5
|
options: T[];
|
|
6
6
|
helperText?: string;
|
|
7
7
|
color?: 'success';
|
|
8
8
|
placeholder?: string;
|
|
9
|
-
getOptionLabel: (
|
|
10
|
-
onChange: (
|
|
9
|
+
getOptionLabel: (_option: T) => string | null | undefined;
|
|
10
|
+
onChange: (_value: T | null) => void;
|
|
11
11
|
value?: T | null;
|
|
12
12
|
width?: number | string;
|
|
13
13
|
error?: string;
|
|
14
|
+
searchIcon?: boolean;
|
|
14
15
|
}
|
|
15
|
-
declare const AutoCompleteSingle: {
|
|
16
|
-
<T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, ...props }: Props<T>): React.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
16
|
+
declare const AutoCompleteSingle: <T>({ value, label, placeholder, options, disabled, getOptionLabel, onChange, width, color, helperText, error, searchIcon, ...props }: Props<T>) => React.JSX.Element;
|
|
19
17
|
export default AutoCompleteSingle;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CheckboxProps } from '@mui/material';
|
|
3
3
|
interface Props {
|
|
4
4
|
name: string;
|
|
5
5
|
value: boolean;
|
|
6
|
-
label:
|
|
7
|
-
onChange?: (
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
onChange?: (_field: string, _value: boolean, _shouldValidate?: boolean | undefined) => void;
|
|
8
8
|
helperText?: string;
|
|
9
9
|
error?: string;
|
|
10
10
|
infoBubbleContent?: string;
|
|
11
11
|
infoBubblePosition?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
12
12
|
}
|
|
13
|
-
declare const Checkbox: {
|
|
14
|
-
({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props): React.JSX.Element;
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
13
|
+
declare const Checkbox: ({ name, value, error, helperText, label, infoBubbleContent, infoBubblePosition, onChange, disabled, ...props }: CheckboxProps & Props) => React.JSX.Element;
|
|
17
14
|
export default Checkbox;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
value: boolean;
|
|
5
|
-
name: string;
|
|
6
|
-
infoBubbleContent?: string;
|
|
7
|
-
infoBubblePosition?: 'right' | 'bottom' | 'left' | 'top' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
8
|
-
}
|
|
2
|
+
import { CheckboxItemType } from './checkboxgroup.interface';
|
|
9
3
|
interface CheckboxGroupProps {
|
|
10
4
|
label: string;
|
|
11
|
-
options:
|
|
5
|
+
options: CheckboxItemType[];
|
|
12
6
|
disabled?: boolean;
|
|
13
7
|
error?: string;
|
|
14
8
|
helperText?: string;
|
|
9
|
+
onChange?: (_selectedOptions: Record<string, boolean>) => void;
|
|
15
10
|
}
|
|
16
|
-
declare const CheckboxGroup: {
|
|
17
|
-
({ options, label, disabled, error, helperText, }: CheckboxGroupProps): React.JSX.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
11
|
+
declare const CheckboxGroup: ({ options, label, disabled, error, helperText, onChange, }: CheckboxGroupProps) => React.JSX.Element;
|
|
20
12
|
export default CheckboxGroup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CheckboxItemType {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
value: boolean;
|
|
5
|
+
name: string;
|
|
6
|
+
infoBubbleContent?: string;
|
|
7
|
+
infoBubblePosition?: 'right' | 'bottom' | 'left' | 'top' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start' | undefined;
|
|
8
|
+
}
|
|
@@ -4,7 +4,7 @@ import { Dayjs } from 'dayjs';
|
|
|
4
4
|
import 'dayjs/locale/fr';
|
|
5
5
|
interface Props<T extends Dayjs> extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
6
6
|
value: T | null | undefined;
|
|
7
|
-
onChange: (
|
|
7
|
+
onChange: (_value: T | null | undefined) => void;
|
|
8
8
|
error?: string;
|
|
9
9
|
success?: boolean;
|
|
10
10
|
helperText?: string;
|
|
@@ -12,12 +12,9 @@ interface Props<T> extends Omit<SelectProps<T[]>, 'value' | 'onChange' | 'value'
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
15
|
-
onChange: (
|
|
16
|
-
getRenderValue: (
|
|
17
|
-
getKeyValue: (
|
|
15
|
+
onChange: (_value: T[]) => void;
|
|
16
|
+
getRenderValue: (_option: T) => string;
|
|
17
|
+
getKeyValue: (_option: T) => string;
|
|
18
18
|
}
|
|
19
|
-
declare const MultiSelect: {
|
|
20
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, disabled, ...props }: Props<T>): React.JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
19
|
+
declare const MultiSelect: <T>({ value, label, options, color, error, placeholder, helperText, width, getRenderValue, getKeyValue, onChange, disabled, ...props }: Props<T>) => React.JSX.Element;
|
|
23
20
|
export default MultiSelect;
|
|
@@ -9,13 +9,10 @@ interface ItemType<T> {
|
|
|
9
9
|
interface Props<T> extends Omit<RadioGroupProps, 'onChange'> {
|
|
10
10
|
label: string;
|
|
11
11
|
options: ItemType<T>[];
|
|
12
|
-
onChange: (
|
|
12
|
+
onChange: (_value: T) => void;
|
|
13
13
|
error?: string;
|
|
14
14
|
helperText?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
}
|
|
17
|
-
declare const RadioGroup: {
|
|
18
|
-
<T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props<T>): React.JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
17
|
+
declare const RadioGroup: <T>({ options, value, label, onChange, helperText, disabled, error, ...props }: Props<T>) => React.JSX.Element;
|
|
21
18
|
export default RadioGroup;
|
|
@@ -13,12 +13,10 @@ interface Props<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color' |
|
|
|
13
13
|
error?: string;
|
|
14
14
|
className?: string;
|
|
15
15
|
popupIcon?: IconDefinition;
|
|
16
|
-
getRenderValue: (
|
|
17
|
-
onChange: (
|
|
18
|
-
onBlur?: (
|
|
16
|
+
getRenderValue: (_option: T) => string;
|
|
17
|
+
onChange: (_value: T) => void;
|
|
18
|
+
onBlur?: (_event: BaseSyntheticEvent) => void;
|
|
19
|
+
onClick?: (_event: BaseSyntheticEvent) => void;
|
|
19
20
|
}
|
|
20
|
-
declare const Select: {
|
|
21
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, disabled, popupIcon, onChange, getRenderValue, ...props }: Props<T>): React.JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
21
|
+
declare const Select: <T>({ value, label, options, color, error, placeholder, helperText, width, disabled, popupIcon, onChange, getRenderValue, ...props }: Props<T>) => React.JSX.Element;
|
|
24
22
|
export default Select;
|
|
@@ -6,8 +6,5 @@ interface Props {
|
|
|
6
6
|
leftSideLabel?: string;
|
|
7
7
|
onClick: () => void;
|
|
8
8
|
}
|
|
9
|
-
declare const Switch: {
|
|
10
|
-
({ label, checked, leftSideLabel, onClick, ...props }: SwitchProps & Props): React.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
9
|
+
declare const Switch: ({ label, checked, leftSideLabel, onClick, ...props }: SwitchProps & Props) => React.JSX.Element;
|
|
13
10
|
export default Switch;
|
|
@@ -2,7 +2,7 @@ import React, { FocusEventHandler, ReactNode } from 'react';
|
|
|
2
2
|
import { TextFieldProps } from '@mui/material';
|
|
3
3
|
interface Props extends Omit<TextFieldProps, 'error'> {
|
|
4
4
|
error?: string;
|
|
5
|
-
label
|
|
5
|
+
label?: string;
|
|
6
6
|
value?: string | unknown;
|
|
7
7
|
name?: string;
|
|
8
8
|
placeholder?: string;
|
|
@@ -11,11 +11,10 @@ interface Props extends Omit<TextFieldProps, 'error'> {
|
|
|
11
11
|
maxLength?: number;
|
|
12
12
|
width?: number | string;
|
|
13
13
|
className?: string;
|
|
14
|
+
focused?: boolean;
|
|
15
|
+
onClick?: (_e: React.MouseEvent<HTMLInputElement>) => void;
|
|
14
16
|
onBlur?: FocusEventHandler<unknown>;
|
|
15
|
-
onChange?: (
|
|
17
|
+
onChange?: (_e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
16
18
|
}
|
|
17
|
-
declare const TextField:
|
|
18
|
-
({ name, value, error, onBlur, onChange, label, disabled, width, endAdornment, placeholder, maxLength, ...props }: Props): React.JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
19
|
+
declare const TextField: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
20
|
export default TextField;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextFieldProps } from '@mui/material';
|
|
3
|
+
import { Dayjs } from 'dayjs';
|
|
4
|
+
interface Props extends Omit<TextFieldProps, 'error' | 'onChange'> {
|
|
5
|
+
value: Dayjs | undefined;
|
|
6
|
+
onChange?: (_time: string | Dayjs | undefined) => void;
|
|
7
|
+
onTouched?: () => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
minTime?: Dayjs;
|
|
11
|
+
maxTime?: Dayjs;
|
|
12
|
+
timeStep?: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
locale?: 'fr' | 'en';
|
|
17
|
+
color?: 'success';
|
|
18
|
+
}
|
|
19
|
+
declare const TimePicker: ({ value, label, helperText, error, disabled, minTime, maxTime, timeStep, locale, width, color, onTouched, onChange, ...props }: Props) => React.JSX.Element;
|
|
20
|
+
export default TimePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TimePicker';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { MouseEventHandler } from 'react';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { IconButtonProps, SxProps, Theme } from '@mui/material';
|
|
4
4
|
import { Placement } from '@/components/Tooltip/tooltip.interface';
|
|
5
|
-
interface Props extends IconButtonProps {
|
|
5
|
+
interface Props extends Omit<IconButtonProps, 'color'> {
|
|
6
6
|
icon: IconDefinition;
|
|
7
7
|
variant?: 'default' | 'table';
|
|
8
8
|
positionGroup?: 'left' | 'middle' | 'right';
|
|
@@ -10,10 +10,8 @@ interface Props extends IconButtonProps {
|
|
|
10
10
|
tooltipPosition?: Placement;
|
|
11
11
|
size?: 'small' | 'medium';
|
|
12
12
|
sx?: SxProps<Theme>;
|
|
13
|
-
|
|
13
|
+
color?: string;
|
|
14
|
+
onClick?: MouseEventHandler | undefined;
|
|
14
15
|
}
|
|
15
|
-
declare const IconButton: {
|
|
16
|
-
({ icon, variant, positionGroup, tooltipText, tooltipPosition, size, ...iconButtonProps }: Props): React.JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
16
|
+
declare const IconButton: ({ icon, variant, positionGroup, tooltipText, tooltipPosition, size, color, onClick, ...iconButtonProps }: Props) => React.JSX.Element;
|
|
19
17
|
export default IconButton;
|
|
@@ -15,8 +15,5 @@ interface Props {
|
|
|
15
15
|
color?: string;
|
|
16
16
|
size?: number | keyof typeof FontSizes;
|
|
17
17
|
}
|
|
18
|
-
declare const IconProvider: {
|
|
19
|
-
({ variant, icon, color, size, sx, ...props }: Props & BoxProps): JSX.Element;
|
|
20
|
-
displayName: string;
|
|
21
|
-
};
|
|
18
|
+
declare const IconProvider: ({ variant, icon, color, size, sx, ...props }: Props & BoxProps) => JSX.Element;
|
|
22
19
|
export default IconProvider;
|
|
@@ -4,8 +4,5 @@ interface Props extends Omit<LinkProps, 'variant'> {
|
|
|
4
4
|
variant?: 'link1' | 'link2';
|
|
5
5
|
component?: any;
|
|
6
6
|
}
|
|
7
|
-
declare const Link:
|
|
8
|
-
(props: Props): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
declare const Link: (props: Props) => React.JSX.Element;
|
|
11
8
|
export default Link;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
3
2
|
import { MenuItemProps } from '@mui/material';
|
|
4
|
-
interface Props extends MenuItemProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
text: string;
|
|
9
|
-
value?: string;
|
|
3
|
+
interface Props extends Omit<MenuItemProps, 'onClick'> {
|
|
4
|
+
onClick: (_event?: React.MouseEvent<HTMLElement>) => void;
|
|
5
|
+
children: NonNullable<ReactNode>;
|
|
6
|
+
testId?: string;
|
|
10
7
|
disabled?: boolean;
|
|
11
8
|
}
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
9
|
+
declare const MenuItem: ({ onClick, children, testId, disabled, ...props }: Props) => React.JSX.Element;
|
|
10
|
+
export default MenuItem;
|
|
@@ -3,5 +3,5 @@ import { Step } from './stepper.interface';
|
|
|
3
3
|
export declare const StepComponent: ({ step: { items, isActive, icon, label, link }, canNavigate, onNavigate, }: {
|
|
4
4
|
step: Step;
|
|
5
5
|
canNavigate: boolean;
|
|
6
|
-
onNavigate: (
|
|
6
|
+
onNavigate: (_link: string) => void;
|
|
7
7
|
}) => React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { Step } from './stepper.interface';
|
|
|
4
4
|
interface Props {
|
|
5
5
|
steps: Step[];
|
|
6
6
|
canNavigate: boolean;
|
|
7
|
-
onNavigate?: (
|
|
7
|
+
onNavigate?: (_url: string) => void;
|
|
8
8
|
sx?: SxProps<Theme>;
|
|
9
9
|
}
|
|
10
10
|
declare const Stepper: ({ steps, canNavigate, onNavigate, sx, }: Props) => React.JSX.Element;
|
|
@@ -6,11 +6,8 @@ interface Props {
|
|
|
6
6
|
limitsPerPage?: number[];
|
|
7
7
|
page?: number;
|
|
8
8
|
limit?: number;
|
|
9
|
-
setPage?: (
|
|
10
|
-
setLimit?: (
|
|
9
|
+
setPage?: (_page: number) => void;
|
|
10
|
+
setLimit?: (_limit: number) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const Pagination: {
|
|
13
|
-
({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
12
|
+
declare const Pagination: ({ totalString, totalPerPageString, limitsPerPage, setLimit, setPage, page, totalRows, limit, }: Props) => React.JSX.Element;
|
|
16
13
|
export default Pagination;
|
|
@@ -4,8 +4,5 @@ interface Props extends Omit<AlertProps, 'severity' | 'text'> {
|
|
|
4
4
|
text: string | React.ReactNode;
|
|
5
5
|
severity: 'success' | 'warning' | 'error' | 'info';
|
|
6
6
|
}
|
|
7
|
-
declare const Snackbar: {
|
|
8
|
-
({ text, severity }: Props): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
declare const Snackbar: ({ text, severity }: Props) => React.JSX.Element;
|
|
11
8
|
export default Snackbar;
|
|
@@ -4,8 +4,5 @@ interface Props extends Omit<TypographyProps, 'variant'> {
|
|
|
4
4
|
variant?: 'bigNumber' | 'body1' | 'body1Regular' | 'body1Medium' | 'body1Bold' | 'body2' | 'body2Regular' | 'body2Medium' | 'body2Bold' | 'caption' | 'buttonNotif' | 'header1' | 'header2' | 'header3' | 'header4' | 'h1' | 'h2' | 'h3' | 'h4' | 'link1' | 'link2';
|
|
5
5
|
component?: any;
|
|
6
6
|
}
|
|
7
|
-
declare const Text:
|
|
8
|
-
(props: Props): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
declare const Text: (props: Props) => React.JSX.Element;
|
|
11
8
|
export default Text;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TooltipProps } from '@mui/material';
|
|
3
3
|
import { Placement } from './tooltip.interface';
|
|
4
4
|
interface Props extends Omit<TooltipProps, 'icon' | 'children' | 'placement'> {
|
|
5
|
-
title:
|
|
6
|
-
children:
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
7
|
placement?: Placement;
|
|
8
|
+
placementMargin?: number;
|
|
8
9
|
}
|
|
9
|
-
declare const Tooltip: {
|
|
10
|
-
({ title, placement, children, ...tooltipProps }: Props): React.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
10
|
+
declare const Tooltip: ({ title, placement, children, placementMargin, ...tooltipProps }: Props) => React.JSX.Element;
|
|
13
11
|
export default Tooltip;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { acceptText } from './fileuploadersingle.interface';
|
|
2
3
|
export interface Props {
|
|
3
|
-
setFile: (
|
|
4
|
-
|
|
4
|
+
setFile: (_file: File | null) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
titleTooltip?: string;
|
|
7
|
+
enableGoogleDrive?: boolean;
|
|
5
8
|
googleAuthClientId?: string;
|
|
6
9
|
googleApiKey?: string;
|
|
7
10
|
error?: boolean;
|
|
@@ -9,16 +12,15 @@ export interface Props {
|
|
|
9
12
|
fileUrl?: string | null;
|
|
10
13
|
fileName?: string | null;
|
|
11
14
|
accept?: string[];
|
|
12
|
-
acceptText?:
|
|
15
|
+
acceptText?: acceptText;
|
|
13
16
|
disabledInput?: boolean;
|
|
14
|
-
title?: string;
|
|
15
17
|
children?: JSX.Element | null;
|
|
16
18
|
titleAddButton?: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
_isDroppingFile?: boolean;
|
|
20
|
+
validateFile?: (_size: number, _type: string) => boolean;
|
|
19
21
|
removeExistingFile?: () => void;
|
|
20
22
|
onTouched?: () => void;
|
|
21
|
-
onFileDataChange?: (
|
|
23
|
+
onFileDataChange?: (_fileData: {
|
|
22
24
|
name: string;
|
|
23
25
|
size: number;
|
|
24
26
|
type?: string;
|
|
@@ -26,5 +28,50 @@ export interface Props {
|
|
|
26
28
|
driveAccessToken?: string;
|
|
27
29
|
} | null) => void;
|
|
28
30
|
}
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* A single file uploader component that supports file selection from local storage or Google Drive.
|
|
33
|
+
*
|
|
34
|
+
* @param {string[]} accept - Array of accepted file types, will display acceptText message
|
|
35
|
+
* but not verify size or type of your file.
|
|
36
|
+
*
|
|
37
|
+
* Example:
|
|
38
|
+
* ```js
|
|
39
|
+
* accept={[
|
|
40
|
+
'application/pdf',
|
|
41
|
+
'image/png',
|
|
42
|
+
'image/jpeg',
|
|
43
|
+
'image/jpg',
|
|
44
|
+
]}
|
|
45
|
+
* ```
|
|
46
|
+
* @param {Object} acceptText - Object containing text for accepted file format, max size, and additional subtext.
|
|
47
|
+
*
|
|
48
|
+
* Example:
|
|
49
|
+
* ```js
|
|
50
|
+
* acceptText={{
|
|
51
|
+
maxSize: '10 Mo',
|
|
52
|
+
subText: 'Sélectionnez un fichier',
|
|
53
|
+
}}
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @param {Function} validateFile - Function to validate the file size and type.
|
|
57
|
+
*
|
|
58
|
+
* Example:
|
|
59
|
+
* ```js
|
|
60
|
+
* validateFile={(size, type) => {
|
|
61
|
+
* if (size > 10 * 1024 * 1024) {
|
|
62
|
+
* setCustomFileError('Le fichier doit être inférieur à 10 Mo');
|
|
63
|
+
* return true;
|
|
64
|
+
* }
|
|
65
|
+
* if (!['application/pdf', 'image/png', 'image/jpeg', 'image/jpg'].includes(type)) {
|
|
66
|
+
* setCustomFileError('Le fichier doit être au format PDF, PNG, JPEG ou JPG');
|
|
67
|
+
* return true;
|
|
68
|
+
* }
|
|
69
|
+
* return false;
|
|
70
|
+
* }}
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @param {Function} onFileDataChange - Callback function to handle file data changes and give you all informations you need
|
|
74
|
+
* to handle google drive file.
|
|
75
|
+
*/
|
|
76
|
+
declare const FileUploaderSingle: ({ enableGoogleDrive, googleAuthClientId, googleApiKey, error, helperText, accept, acceptText, title, titleTooltip, disabledInput, children, fileUrl, fileName, titleAddButton, _isDroppingFile, validateFile, setFile, removeExistingFile, onTouched, onFileDataChange, }: Props) => React.JSX.Element;
|
|
30
77
|
export default FileUploaderSingle;
|
|
@@ -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';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { GoogleDrivePickerData } from '@/hooks/useGooleDrivePicker';
|
|
2
3
|
interface GooglePickerWrapperProps {
|
|
3
|
-
callback: (
|
|
4
|
+
callback: (_data: GoogleDrivePickerData, _token: string) => void;
|
|
4
5
|
multiselect?: boolean;
|
|
5
6
|
navHidden?: boolean;
|
|
6
7
|
googleAuthClientId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GoogleDrivePickerData, GoogleDrivePickerOptions } from '@/types/googleDrive';
|
|
2
|
-
declare const useGoogleDrivePicker: (callbackFunction: (
|
|
2
|
+
declare const useGoogleDrivePicker: (callbackFunction: (_result: GoogleDrivePickerData, _token: string) => void, options: GoogleDrivePickerOptions) => readonly [() => Promise<void>, string];
|
|
3
3
|
export * from '@/types/googleDrive';
|
|
4
4
|
export default useGoogleDrivePicker;
|