@groupeactual/ui-kit 1.6.6 → 1.7.0-beta.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/es/index.d.ts +5 -4
- package/dist/es/index.js +107 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/{types → src}/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +1 -1
- package/dist/{cjs/types → es/src}/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +1 -1
- package/dist/{cjs/types → es/src}/components/Form/Select/Select.d.ts +4 -2
- package/dist/{cjs/types → es/src}/components/IconButton/IconButton.d.ts +1 -1
- package/dist/es/{types → src}/components/Modal/Dialog/Dialog.d.ts +1 -1
- package/dist/es/{types → src}/components/Modal/Drawer/Drawer.d.ts +1 -1
- package/dist/{cjs/types → es/src}/helpers/dataGetValue.d.ts +1 -1
- package/dist/{cjs/types → es/src}/hooks/useGooleDrivePicker.d.ts +2 -2
- package/dist/es/src/index.d.ts +4 -0
- package/package.json +18 -23
- package/src/DesignSystemProvider.tsx +2 -1
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/BannerNotification/BannerNotification.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +2 -2
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/Datatable/Datatable.tsx +4 -3
- package/src/components/Datatable/DatatableCellRender.tsx +2 -2
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +2 -2
- package/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.tsx +22 -12
- package/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.tsx +22 -10
- package/src/components/Form/Checkbox/Checkbox.tsx +2 -2
- package/src/components/Form/CheckboxGroup/CheckboxGroup.tsx +1 -1
- package/src/components/Form/DatePicker/DatePicker.tsx +1 -1
- package/src/components/Form/MultiSelect/MultiSelect.tsx +10 -7
- package/src/components/Form/RadioGroup/RadioGroup.tsx +2 -2
- package/src/components/Form/Select/Select.tsx +15 -6
- package/src/components/Form/TextField/TextField.tsx +1 -1
- package/src/components/IconButton/IconButton.tsx +3 -3
- package/src/components/MenuItem/MenuItem.tsx +2 -2
- package/src/components/Modal/Dialog/Dialog.tsx +7 -4
- package/src/components/Modal/Drawer/Drawer.tsx +2 -2
- package/src/components/Navigation/Stepper/Step.tsx +3 -2
- package/src/components/NotistackAdapter/NotistackAdapter.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +7 -11
- package/src/components/Snackbar/Snackbar.tsx +1 -1
- package/src/components/UploadDocument/FileUploaderSingle.tsx +7 -7
- package/src/helpers/GooglePickerWrapper.tsx +1 -1
- package/src/helpers/dataGetValue.ts +1 -1
- package/src/hooks/useGooleDrivePicker.ts +2 -2
- package/src/index.ts +3 -5
- package/dist/cjs/types/components/Form/AutoCompleteMulti/AutoCompleteMulti.d.ts +0 -18
- package/dist/cjs/types/components/Modal/Dialog/Dialog.d.ts +0 -4
- package/dist/cjs/types/components/Modal/Drawer/Drawer.d.ts +0 -4
- package/dist/cjs/types/index.d.ts +0 -2
- package/dist/es/index.mjs +0 -106
- package/dist/es/index.mjs.map +0 -1
- package/dist/es/types/DesignSystemProvider.d.ts +0 -13
- package/dist/es/types/components/Accordion/Accordion.d.ts +0 -15
- package/dist/es/types/components/Accordion/index.d.ts +0 -1
- package/dist/es/types/components/BannerNotification/BannerNotification.d.ts +0 -11
- package/dist/es/types/components/BannerNotification/index.d.ts +0 -1
- package/dist/es/types/components/Breadcrumbs/Breadcrumbs.d.ts +0 -15
- package/dist/es/types/components/Breadcrumbs/index.d.ts +0 -1
- package/dist/es/types/components/Button/Button.d.ts +0 -11
- package/dist/es/types/components/Button/index.d.ts +0 -1
- package/dist/es/types/components/Chip/Chip.d.ts +0 -19
- package/dist/es/types/components/Chip/index.d.ts +0 -1
- package/dist/es/types/components/Datatable/Datatable.d.ts +0 -4
- package/dist/es/types/components/Datatable/DatatableCellRender.d.ts +0 -4
- package/dist/es/types/components/Datatable/datatable.interface.d.ts +0 -53
- package/dist/es/types/components/Datatable/index.d.ts +0 -1
- package/dist/es/types/components/Datatable/use-pagination-props.hook.d.ts +0 -3
- package/dist/es/types/components/EmbbededNotification/EmbeddedNotification.d.ts +0 -13
- package/dist/es/types/components/EmbbededNotification/index.d.ts +0 -1
- package/dist/es/types/components/Form/AutoCompleteMulti/index.d.ts +0 -1
- package/dist/es/types/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts +0 -19
- package/dist/es/types/components/Form/AutoCompleteSingle/index.d.ts +0 -1
- package/dist/es/types/components/Form/Checkbox/Checkbox.d.ts +0 -17
- package/dist/es/types/components/Form/Checkbox/index.d.ts +0 -1
- package/dist/es/types/components/Form/CheckboxGroup/CheckboxGroup.d.ts +0 -20
- package/dist/es/types/components/Form/CheckboxGroup/index.d.ts +0 -1
- package/dist/es/types/components/Form/DatePicker/DatePicker.d.ts +0 -15
- package/dist/es/types/components/Form/DatePicker/index.d.ts +0 -1
- package/dist/es/types/components/Form/MultiSelect/MultiSelect.d.ts +0 -23
- package/dist/es/types/components/Form/MultiSelect/index.d.ts +0 -1
- package/dist/es/types/components/Form/RadioGroup/RadioGroup.d.ts +0 -21
- package/dist/es/types/components/Form/RadioGroup/index.d.ts +0 -1
- package/dist/es/types/components/Form/Select/Select.d.ts +0 -22
- package/dist/es/types/components/Form/Select/index.d.ts +0 -1
- package/dist/es/types/components/Form/Switch/Switch.d.ts +0 -13
- package/dist/es/types/components/Form/Switch/index.d.ts +0 -1
- package/dist/es/types/components/Form/TextField/TextField.d.ts +0 -21
- package/dist/es/types/components/Form/TextField/index.d.ts +0 -1
- package/dist/es/types/components/IconButton/IconButton.d.ts +0 -19
- package/dist/es/types/components/IconButton/index.d.ts +0 -1
- package/dist/es/types/components/IconProvider/IconProvider.d.ts +0 -22
- package/dist/es/types/components/IconProvider/index.d.ts +0 -1
- package/dist/es/types/components/Link/Link.d.ts +0 -11
- package/dist/es/types/components/Link/index.d.ts +0 -1
- package/dist/es/types/components/MenuItem/MenuItem.d.ts +0 -13
- package/dist/es/types/components/MenuItem/index.d.ts +0 -1
- package/dist/es/types/components/Modal/Dialog/index.d.ts +0 -1
- package/dist/es/types/components/Modal/Drawer/index.d.ts +0 -1
- package/dist/es/types/components/Modal/modal.interface.d.ts +0 -24
- package/dist/es/types/components/Navigation/Stepper/Step.d.ts +0 -7
- package/dist/es/types/components/Navigation/Stepper/Stepper.d.ts +0 -11
- package/dist/es/types/components/Navigation/Stepper/index.d.ts +0 -1
- package/dist/es/types/components/Navigation/Stepper/stepper.helper.d.ts +0 -2
- package/dist/es/types/components/Navigation/Stepper/stepper.interface.d.ts +0 -12
- package/dist/es/types/components/NotistackAdapter/NotistackAdapter.d.ts +0 -4
- package/dist/es/types/components/NotistackAdapter/index.d.ts +0 -1
- package/dist/es/types/components/Pagination/Pagination.d.ts +0 -16
- package/dist/es/types/components/Pagination/index.d.ts +0 -1
- package/dist/es/types/components/Pagination/pagination.helper.d.ts +0 -1
- package/dist/es/types/components/Snackbar/Snackbar.d.ts +0 -11
- package/dist/es/types/components/Snackbar/index.d.ts +0 -1
- package/dist/es/types/components/Text/Text.d.ts +0 -11
- package/dist/es/types/components/Text/index.d.ts +0 -1
- package/dist/es/types/components/Tooltip/Tooltip.d.ts +0 -13
- package/dist/es/types/components/Tooltip/index.d.ts +0 -1
- package/dist/es/types/components/Tooltip/tooltip.interface.d.ts +0 -1
- package/dist/es/types/components/UploadDocument/FileUploaderSingle.d.ts +0 -30
- package/dist/es/types/components/UploadDocument/index.d.ts +0 -1
- package/dist/es/types/components/index.d.ts +0 -31
- package/dist/es/types/helpers/GooglePickerWrapper.d.ts +0 -13
- package/dist/es/types/helpers/dataGetValue.d.ts +0 -2
- package/dist/es/types/hooks/useGooleDrivePicker.d.ts +0 -4
- package/dist/es/types/index.d.ts +0 -2
- package/dist/es/types/types/googleDrive.d.ts +0 -133
- /package/dist/{cjs/types → es/src}/DesignSystemProvider.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Accordion/Accordion.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Accordion/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/BannerNotification/BannerNotification.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/BannerNotification/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Breadcrumbs/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Button/Button.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Button/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Chip/Chip.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Chip/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/Datatable.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/DatatableCellRender.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/datatable.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Datatable/use-pagination-props.hook.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/EmbbededNotification/EmbeddedNotification.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/EmbbededNotification/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/AutoCompleteMulti/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/AutoCompleteSingle/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Checkbox/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/CheckboxGroup/CheckboxGroup.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/CheckboxGroup/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/DatePicker/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/MultiSelect/MultiSelect.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/MultiSelect/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/RadioGroup/RadioGroup.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/RadioGroup/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Select/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Switch/Switch.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/Switch/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/TextField/TextField.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Form/TextField/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/IconButton/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/IconProvider/IconProvider.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/IconProvider/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Link/Link.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Link/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/MenuItem/MenuItem.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/MenuItem/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/Dialog/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/Drawer/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Modal/modal.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/Step.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/Stepper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/stepper.helper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Navigation/Stepper/stepper.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/NotistackAdapter/NotistackAdapter.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/NotistackAdapter/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Pagination/Pagination.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Pagination/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Pagination/pagination.helper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Snackbar/Snackbar.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Snackbar/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Text/Text.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Text/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Tooltip/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/Tooltip/tooltip.interface.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/UploadDocument/FileUploaderSingle.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/UploadDocument/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/components/index.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/helpers/GooglePickerWrapper.d.ts +0 -0
- /package/dist/{cjs/types → es/src}/types/googleDrive.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
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'> {
|
|
3
|
+
interface AutocompleteMultipleSelectProps<T> extends Omit<AutocompleteProps<T, true, true, false>, 'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete'> {
|
|
4
4
|
value: T[] | undefined;
|
|
5
5
|
label?: string;
|
|
6
6
|
helperText?: string;
|
package/dist/{cjs/types → es/src}/components/Form/AutoCompleteSingle/AutoCompleteSingle.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
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' | 'autocomplete'> {
|
|
4
4
|
label: string;
|
|
5
5
|
options: T[];
|
|
6
6
|
helperText?: string;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import React, { BaseSyntheticEvent } from 'react';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
3
|
import { SelectProps } from '@mui/material';
|
|
3
4
|
interface Props<T> extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color' | 'error'> {
|
|
4
5
|
options: T[];
|
|
5
6
|
placeholder?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
label
|
|
8
|
+
label?: string;
|
|
8
9
|
helperText?: string;
|
|
9
10
|
color?: 'success';
|
|
10
11
|
value: T | undefined;
|
|
11
12
|
width?: number | string;
|
|
12
13
|
error?: string;
|
|
13
14
|
className?: string;
|
|
15
|
+
popupIcon?: IconDefinition;
|
|
14
16
|
getRenderValue: (option: T) => string;
|
|
15
17
|
onChange: (value: T) => void;
|
|
16
18
|
onBlur?: (event: BaseSyntheticEvent) => void;
|
|
17
19
|
}
|
|
18
20
|
declare const Select: {
|
|
19
|
-
<T>({ value, label, options, color, error, placeholder, helperText, width, disabled, onChange, getRenderValue, ...props }: Props<T>): React.JSX.Element;
|
|
21
|
+
<T>({ value, label, options, color, error, placeholder, helperText, width, disabled, popupIcon, onChange, getRenderValue, ...props }: Props<T>): React.JSX.Element;
|
|
20
22
|
displayName: string;
|
|
21
23
|
};
|
|
22
24
|
export default Select;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { IconButtonProps, SxProps, Theme } from '@mui/material';
|
|
4
|
-
import { Placement } from '
|
|
4
|
+
import { Placement } from '@/components/Tooltip/tooltip.interface';
|
|
5
5
|
interface Props extends IconButtonProps {
|
|
6
6
|
icon: IconDefinition;
|
|
7
7
|
variant?: 'default' | 'table';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ModalProps } from '
|
|
2
|
+
import { ModalProps } from '@/components/Modal/modal.interface';
|
|
3
3
|
declare const Dialog: ({ title, open, onClose, component, icon, ...props }: Omit<ModalProps, "footer" | "cardProps" | "size">) => React.JSX.Element;
|
|
4
4
|
export default Dialog;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ModalProps } from '
|
|
2
|
+
import { ModalProps } from '@/components/Modal/modal.interface';
|
|
3
3
|
declare const Drawer: ({ title, open, onClose, component, footer, cardProps, size, ...props }: Omit<ModalProps, "withHeaderDivider" | "icon">) => React.JSX.Element;
|
|
4
4
|
export default Drawer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Haystack } from '
|
|
1
|
+
import { Haystack } from '@/types/googleDrive';
|
|
2
2
|
export declare function dataGetValue(object: Haystack, key: string | number, defaultValue?: any): object | number | string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoogleDrivePickerData, GoogleDrivePickerOptions } from '
|
|
1
|
+
import { GoogleDrivePickerData, GoogleDrivePickerOptions } from '@/types/googleDrive';
|
|
2
2
|
declare const useGoogleDrivePicker: (callbackFunction: (result: GoogleDrivePickerData, token: string) => void, options: GoogleDrivePickerOptions) => readonly [() => Promise<void>, string];
|
|
3
|
-
export * from '
|
|
3
|
+
export * from '@/types/googleDrive';
|
|
4
4
|
export default useGoogleDrivePicker;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@groupeactual/code-quality-front": "1.2.1",
|
|
8
7
|
"@babel/core": "^7.25.2",
|
|
9
8
|
"@babel/preset-env": "^7.25.4",
|
|
10
9
|
"@babel/preset-react": "^7.24.7",
|
|
11
10
|
"@babel/preset-typescript": "^7.24.7",
|
|
11
|
+
"@groupeactual/code-quality-front": "^1.2.1",
|
|
12
12
|
"@mdx-js/react": "^3.0.1",
|
|
13
|
-
"@types/google.picker": "^0.0.
|
|
14
|
-
"@types/lodash": "^4.17.
|
|
15
|
-
"@types/react": "^18.3.
|
|
13
|
+
"@types/google.picker": "^0.0.43",
|
|
14
|
+
"@types/lodash": "^4.17.12",
|
|
15
|
+
"@types/react": "^18.3.12",
|
|
16
16
|
"@types/styled-components": "^5.1.34",
|
|
17
17
|
"babel-loader": "^9.1.3",
|
|
18
18
|
"clsx": "^2.1.1",
|
|
@@ -20,53 +20,48 @@
|
|
|
20
20
|
"framer-motion": "^11.3.31",
|
|
21
21
|
"identity-obj-proxy": "^3.0.0",
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
|
-
"postcss": "^8.4.
|
|
23
|
+
"postcss": "^8.4.47",
|
|
24
24
|
"prettier": "^3.3.3",
|
|
25
25
|
"prop-types": "^15.8.1",
|
|
26
|
-
"dotenv-webpack": "^8.1.0",
|
|
27
26
|
"sass": "^1.77.8",
|
|
28
|
-
"sass-loader": "^16.0.
|
|
27
|
+
"sass-loader": "^16.0.2",
|
|
29
28
|
"style-loader": "^4.0.0",
|
|
30
|
-
"styled-components": "^6.1.
|
|
29
|
+
"styled-components": "^6.1.13",
|
|
31
30
|
"tslib": "^2.7.0",
|
|
32
31
|
"typescript": "^5.5.4"
|
|
33
32
|
},
|
|
34
33
|
"main": "dist/cjs/index.js",
|
|
35
|
-
"module": "dist/es/index.
|
|
34
|
+
"module": "dist/es/index.js",
|
|
36
35
|
"files": [
|
|
37
36
|
"dist",
|
|
38
37
|
"src"
|
|
39
38
|
],
|
|
40
|
-
"types": "dist/es/
|
|
39
|
+
"types": "dist/es/index.d.ts",
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@emotion/is-prop-valid": "^1.3.
|
|
41
|
+
"@emotion/is-prop-valid": "^1.3.1",
|
|
43
42
|
"@emotion/react": "^11.13.3",
|
|
44
|
-
"@emotion/serialize": "^1.3.
|
|
43
|
+
"@emotion/serialize": "^1.3.2",
|
|
45
44
|
"@emotion/styled": "^11.13.0",
|
|
46
|
-
"@react-oauth/google": "^0.12.1",
|
|
47
|
-
"react-google-picker": "^0.1.0",
|
|
48
45
|
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
46
|
+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
49
47
|
"@fortawesome/pro-regular-svg-icons": "git+https://github.com/actualtysoft/pro-regular-svg-icons.git#6.4.2",
|
|
50
48
|
"@fortawesome/pro-solid-svg-icons": "git+https://github.com/actualtysoft/pro-solid-svg-icons.git#6.4.2",
|
|
51
|
-
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
52
49
|
"@mui/material": "^5.16.7",
|
|
53
50
|
"@mui/system": "^5.16.7",
|
|
54
51
|
"@mui/x-date-pickers": "^7.15.0",
|
|
55
52
|
"@mui/x-date-pickers-pro": "^7.15.0",
|
|
53
|
+
"@react-oauth/google": "^0.12.1",
|
|
56
54
|
"dayjs": "^1.11.13",
|
|
57
55
|
"notistack": "^3.0.1",
|
|
58
56
|
"react": "^18.3.1",
|
|
59
57
|
"react-dom": "^18.3.1",
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"react": "^18.3.1",
|
|
64
|
-
"react-dom": "^18.3.1"
|
|
58
|
+
"react-google-picker": "^0.1.0",
|
|
59
|
+
"@groupeactual/design-tokens": "1.7.0-beta.0"
|
|
65
60
|
},
|
|
66
61
|
"scripts": {
|
|
67
62
|
"build": "rollup -c",
|
|
68
|
-
"build:watch": "rollup -c -w",
|
|
69
|
-
"dev": "npm run build:watch
|
|
63
|
+
"build:watch": "rollup --bundleConfigAsCjs -c -w",
|
|
64
|
+
"dev": "npm run build:watch",
|
|
70
65
|
"eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
|
|
71
66
|
"lint": "npm run eslint"
|
|
72
67
|
}
|
|
@@ -35,7 +35,8 @@ const MaterialThemeProvider = ({ children }: PropsWithChildren<unknown>) => {
|
|
|
35
35
|
const { themeName } =
|
|
36
36
|
useContext<DesignSystemContextValues>(DesignSystemContext);
|
|
37
37
|
const { muiTokens } = useMaterialThemeTokens(themeName);
|
|
38
|
-
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
const theme = createTheme(muiTokens as any);
|
|
39
40
|
|
|
40
41
|
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
|
|
41
42
|
};
|
|
@@ -4,7 +4,7 @@ import { faBell, faTimes } from '@fortawesome/pro-solid-svg-icons';
|
|
|
4
4
|
import { BannerNotificationStyle } from '@groupeactual/design-tokens';
|
|
5
5
|
import { Alert, AlertProps, styled, useTheme } from '@mui/material';
|
|
6
6
|
|
|
7
|
-
import IconProvider from '
|
|
7
|
+
import IconProvider from '@/components/IconProvider';
|
|
8
8
|
|
|
9
9
|
interface Props extends AlertProps {
|
|
10
10
|
text: string;
|
|
@@ -18,9 +18,10 @@ import {
|
|
|
18
18
|
useTheme,
|
|
19
19
|
} from '@mui/material';
|
|
20
20
|
|
|
21
|
-
import IconButton from '
|
|
22
|
-
import Pagination from '
|
|
23
|
-
import Text from '
|
|
21
|
+
import IconButton from '@/components/IconButton';
|
|
22
|
+
import Pagination from '@/components/Pagination';
|
|
23
|
+
import Text from '@/components/Text';
|
|
24
|
+
|
|
24
25
|
import { RowDetail as D, Props } from './datatable.interface';
|
|
25
26
|
import usePaginationProps from './use-pagination-props.hook';
|
|
26
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import Text from '
|
|
4
|
-
import Tooltip from '
|
|
3
|
+
import Text from '@/components/Text';
|
|
4
|
+
import Tooltip from '@/components/Tooltip';
|
|
5
5
|
|
|
6
6
|
const DatatableCellRender = ({ data }: { data: string }): JSX.Element => {
|
|
7
7
|
if (!data) {
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
import { Box } from '@mui/material';
|
|
11
11
|
import { BoxProps } from '@mui/system';
|
|
12
12
|
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import Text from '@/components//Text';
|
|
14
|
+
import Icon from '@/components/IconProvider';
|
|
15
15
|
|
|
16
16
|
interface Props extends BoxProps {
|
|
17
17
|
variant: 'warning' | 'error' | 'success' | 'infos';
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
faChevronDown,
|
|
6
|
-
faCircleX,
|
|
7
|
-
faTimes,
|
|
8
|
-
} from '@fortawesome/pro-solid-svg-icons';
|
|
3
|
+
import { faSearch } from '@fortawesome/pro-regular-svg-icons';
|
|
4
|
+
import { faCheck, faCircleX, faTimes } from '@fortawesome/pro-solid-svg-icons';
|
|
9
5
|
import { AutoCompleteStyle } from '@groupeactual/design-tokens';
|
|
10
6
|
import {
|
|
11
7
|
type AutocompleteProps,
|
|
@@ -19,13 +15,13 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|
|
19
15
|
import Box from '@mui/material/Box';
|
|
20
16
|
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
21
17
|
|
|
22
|
-
import Chip from '
|
|
23
|
-
import IconProvider from '
|
|
18
|
+
import Chip from '@/components/Chip';
|
|
19
|
+
import IconProvider from '@/components/IconProvider';
|
|
24
20
|
|
|
25
21
|
interface AutocompleteMultipleSelectProps<T>
|
|
26
22
|
extends Omit<
|
|
27
23
|
AutocompleteProps<T, true, true, false>,
|
|
28
|
-
'onChange' | 'value' | 'options' | 'renderInput' | 'error'
|
|
24
|
+
'onChange' | 'value' | 'options' | 'renderInput' | 'error' | 'autocomplete'
|
|
29
25
|
> {
|
|
30
26
|
value: T[] | undefined;
|
|
31
27
|
label?: string;
|
|
@@ -105,6 +101,14 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
105
101
|
return classNames.filter(Boolean).join(' ');
|
|
106
102
|
}, [error, color, value]);
|
|
107
103
|
|
|
104
|
+
const getPopupIcon = useMemo(() => {
|
|
105
|
+
if (color === 'success') {
|
|
106
|
+
return faCheck;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return faSearch;
|
|
110
|
+
}, [color]);
|
|
111
|
+
|
|
108
112
|
const withPlaceholder = !value?.length && !!placeholder;
|
|
109
113
|
const boxRef = useRef<HTMLHeadingElement>(null);
|
|
110
114
|
|
|
@@ -122,12 +126,18 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
122
126
|
aria-placeholder={(withPlaceholder && placeholder) || ''}
|
|
123
127
|
disableCloseOnSelect
|
|
124
128
|
multiple
|
|
129
|
+
sx={{
|
|
130
|
+
...props.sx,
|
|
131
|
+
'& .MuiAutocomplete-popupIndicator': { transform: 'none' },
|
|
132
|
+
}}
|
|
125
133
|
disabled={disabled}
|
|
126
134
|
options={options}
|
|
127
135
|
slotProps={{
|
|
128
136
|
paper: {
|
|
129
137
|
sx: {
|
|
130
|
-
|
|
138
|
+
fontSize: '14px',
|
|
139
|
+
marginTop: '4px',
|
|
140
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
131
141
|
},
|
|
132
142
|
},
|
|
133
143
|
}}
|
|
@@ -147,8 +157,8 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
147
157
|
popupIcon={
|
|
148
158
|
<IconProvider
|
|
149
159
|
className={disabled ? 'Mui-disabled SelectIcon' : 'SelectIcon'}
|
|
150
|
-
icon={
|
|
151
|
-
size=
|
|
160
|
+
icon={getPopupIcon}
|
|
161
|
+
size="md"
|
|
152
162
|
/>
|
|
153
163
|
}
|
|
154
164
|
renderTags={(tag: T[]) => {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
faChevronDown,
|
|
6
|
-
faTimes,
|
|
7
|
-
} from '@fortawesome/pro-solid-svg-icons';
|
|
3
|
+
import { faSearch } from '@fortawesome/pro-regular-svg-icons';
|
|
4
|
+
import { faCheck, faTimes } from '@fortawesome/pro-solid-svg-icons';
|
|
8
5
|
import { AutoCompleteStyle } from '@groupeactual/design-tokens';
|
|
9
6
|
import {
|
|
10
7
|
Autocomplete,
|
|
@@ -19,7 +16,7 @@ import {
|
|
|
19
16
|
useTheme,
|
|
20
17
|
} from '@mui/material';
|
|
21
18
|
|
|
22
|
-
import IconProvider from '
|
|
19
|
+
import IconProvider from '@/components/IconProvider';
|
|
23
20
|
|
|
24
21
|
interface Props<T>
|
|
25
22
|
extends Omit<
|
|
@@ -30,6 +27,7 @@ interface Props<T>
|
|
|
30
27
|
| 'renderInput'
|
|
31
28
|
| 'error'
|
|
32
29
|
| 'getOptionLabel'
|
|
30
|
+
| 'autocomplete'
|
|
33
31
|
> {
|
|
34
32
|
label: string;
|
|
35
33
|
options: T[];
|
|
@@ -111,6 +109,14 @@ const AutoCompleteSingle = <T,>({
|
|
|
111
109
|
return classNames.filter(Boolean).join(' ');
|
|
112
110
|
}, [color, placeholder, value]);
|
|
113
111
|
|
|
112
|
+
const getPopupIcon = useMemo(() => {
|
|
113
|
+
if (color === 'success') {
|
|
114
|
+
return faCheck;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return faSearch;
|
|
118
|
+
}, [color]);
|
|
119
|
+
|
|
114
120
|
return (
|
|
115
121
|
<Box sx={{ width }}>
|
|
116
122
|
<StyledAutoCompleteForm
|
|
@@ -120,21 +126,25 @@ const AutoCompleteSingle = <T,>({
|
|
|
120
126
|
>
|
|
121
127
|
<Autocomplete
|
|
122
128
|
{...props}
|
|
123
|
-
value={isValueLabelNotEmpty && value || null}
|
|
129
|
+
value={(isValueLabelNotEmpty && value) || null}
|
|
124
130
|
onChange={handleValueChange}
|
|
125
131
|
aria-placeholder={placeholder}
|
|
126
132
|
disabled={disabled}
|
|
127
133
|
options={options}
|
|
128
134
|
sx={{
|
|
135
|
+
...props.sx,
|
|
129
136
|
'.MuiOutlinedInput-input': {
|
|
130
137
|
marginTop: value ? '0px' : '2px',
|
|
131
138
|
},
|
|
139
|
+
'& .MuiAutocomplete-popupIndicator': { transform: 'none' },
|
|
132
140
|
}}
|
|
133
141
|
getOptionLabel={getOptionLabel as (option: T) => string}
|
|
134
142
|
slotProps={{
|
|
135
143
|
paper: {
|
|
136
144
|
sx: {
|
|
137
|
-
|
|
145
|
+
fontSize: '14px',
|
|
146
|
+
marginTop: '4px',
|
|
147
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
138
148
|
},
|
|
139
149
|
},
|
|
140
150
|
}}
|
|
@@ -175,8 +185,8 @@ const AutoCompleteSingle = <T,>({
|
|
|
175
185
|
popupIcon={
|
|
176
186
|
<IconProvider
|
|
177
187
|
className={disabled ? 'icon-disabled SelectIcon' : 'SelectIcon'}
|
|
178
|
-
icon={
|
|
179
|
-
size=
|
|
188
|
+
icon={getPopupIcon}
|
|
189
|
+
size="md"
|
|
180
190
|
/>
|
|
181
191
|
}
|
|
182
192
|
renderInput={(params) => (
|
|
@@ -186,6 +196,8 @@ const AutoCompleteSingle = <T,>({
|
|
|
186
196
|
error={!!error}
|
|
187
197
|
fullWidth
|
|
188
198
|
variant="outlined"
|
|
199
|
+
type="text"
|
|
200
|
+
inputProps={{ ...params.inputProps }}
|
|
189
201
|
InputLabelProps={{
|
|
190
202
|
shrink: (placeholder && true) || undefined,
|
|
191
203
|
disabled: false,
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
useTheme,
|
|
15
15
|
} from '@mui/material';
|
|
16
16
|
|
|
17
|
-
import IconProvider from '
|
|
18
|
-
import Tooltip from '
|
|
17
|
+
import IconProvider from '@/components/IconProvider';
|
|
18
|
+
import Tooltip from '@/components/Tooltip';
|
|
19
19
|
|
|
20
20
|
interface Props {
|
|
21
21
|
name: string;
|
|
@@ -24,7 +24,7 @@ import { enUS, frFR } from '@mui/x-date-pickers/locales';
|
|
|
24
24
|
import { Dayjs } from 'dayjs';
|
|
25
25
|
import 'dayjs/locale/fr';
|
|
26
26
|
|
|
27
|
-
import IconProvider from '
|
|
27
|
+
import IconProvider from '@/components/IconProvider';
|
|
28
28
|
|
|
29
29
|
interface Props<T extends Dayjs>
|
|
30
30
|
extends Omit<DatePickerProps<T>, 'onChange' | 'width'> {
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
useTheme,
|
|
21
21
|
} from '@mui/material';
|
|
22
22
|
|
|
23
|
-
import Chip from '
|
|
24
|
-
import IconProvider from '
|
|
23
|
+
import Chip from '@/components/Chip';
|
|
24
|
+
import IconProvider from '@/components/IconProvider';
|
|
25
25
|
|
|
26
26
|
interface Props<T>
|
|
27
27
|
extends Omit<
|
|
@@ -50,7 +50,7 @@ const MenuProps = {
|
|
|
50
50
|
disableAutoFocusItem: true,
|
|
51
51
|
PaperProps: {
|
|
52
52
|
sx: {
|
|
53
|
-
boxShadow: '0px 2px 10px 0px',
|
|
53
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
54
54
|
width: 0,
|
|
55
55
|
},
|
|
56
56
|
},
|
|
@@ -179,7 +179,7 @@ const MultiSelect = <T,>({
|
|
|
179
179
|
<IconProvider
|
|
180
180
|
className={disabled ? 'Mui-disabled SelectIcon' : 'SelectIcon'}
|
|
181
181
|
icon={color === 'success' ? faCheck : faChevronDown}
|
|
182
|
-
size=
|
|
182
|
+
size="md"
|
|
183
183
|
sx={{
|
|
184
184
|
transform:
|
|
185
185
|
className.toString().includes('iconOpen') &&
|
|
@@ -197,6 +197,12 @@ const MultiSelect = <T,>({
|
|
|
197
197
|
key={getKeyValue(option)}
|
|
198
198
|
value={option as never}
|
|
199
199
|
sx={{
|
|
200
|
+
'&:hover': {
|
|
201
|
+
backgroundColor: theme.palette['blueHoverEquivalence'],
|
|
202
|
+
},
|
|
203
|
+
'&.Mui-selected': {
|
|
204
|
+
backgroundColor: theme.palette['greyXLight'] + ' !important',
|
|
205
|
+
},
|
|
200
206
|
fontSize: 14,
|
|
201
207
|
fontWeight: value.indexOf(option) === -1 ? 400 : 500,
|
|
202
208
|
whiteSpace: 'normal',
|
|
@@ -205,9 +211,6 @@ const MultiSelect = <T,>({
|
|
|
205
211
|
maxWidth: '100%',
|
|
206
212
|
backgroundColor:
|
|
207
213
|
value.indexOf(option) === -1 ? 'white' : 'greyXLight',
|
|
208
|
-
'&:hover': {
|
|
209
|
-
backgroundColor: 'blueHoverEquivalence',
|
|
210
|
-
},
|
|
211
214
|
}}
|
|
212
215
|
>
|
|
213
216
|
{getRenderValue(option)}
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
useTheme,
|
|
16
16
|
} from '@mui/material';
|
|
17
17
|
|
|
18
|
-
import IconProvider from '
|
|
19
|
-
import Tooltip from '
|
|
18
|
+
import IconProvider from '@/components/IconProvider';
|
|
19
|
+
import Tooltip from '@/components/Tooltip';
|
|
20
20
|
|
|
21
21
|
interface ItemType<T> {
|
|
22
22
|
label: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { BaseSyntheticEvent, useMemo } from 'react';
|
|
2
2
|
|
|
3
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
4
|
import { faCheck, faChevronDown } from '@fortawesome/pro-solid-svg-icons';
|
|
4
5
|
import { SelectStyle } from '@groupeactual/design-tokens';
|
|
5
6
|
import {
|
|
@@ -15,20 +16,21 @@ import {
|
|
|
15
16
|
useTheme,
|
|
16
17
|
} from '@mui/material';
|
|
17
18
|
|
|
18
|
-
import
|
|
19
|
+
import IconProvider from '@/components/IconProvider';
|
|
19
20
|
|
|
20
21
|
interface Props<T>
|
|
21
22
|
extends Omit<SelectProps<T>, 'value' | 'onChange' | 'color' | 'error'> {
|
|
22
23
|
options: T[];
|
|
23
24
|
placeholder?: string;
|
|
24
25
|
disabled?: boolean;
|
|
25
|
-
label
|
|
26
|
+
label?: string;
|
|
26
27
|
helperText?: string;
|
|
27
28
|
color?: 'success';
|
|
28
29
|
value: T | undefined;
|
|
29
30
|
width?: number | string;
|
|
30
31
|
error?: string;
|
|
31
32
|
className?: string;
|
|
33
|
+
popupIcon?: IconDefinition;
|
|
32
34
|
getRenderValue: (option: T) => string;
|
|
33
35
|
onChange: (value: T) => void;
|
|
34
36
|
onBlur?: (event: BaseSyntheticEvent) => void;
|
|
@@ -38,7 +40,7 @@ const MenuProps = {
|
|
|
38
40
|
disableAutoFocusItem: true,
|
|
39
41
|
PaperProps: {
|
|
40
42
|
sx: {
|
|
41
|
-
boxShadow: '0px 2px 10px 0px',
|
|
43
|
+
boxShadow: '0px 2px 10px 0px #2727271F',
|
|
42
44
|
width: 0,
|
|
43
45
|
},
|
|
44
46
|
},
|
|
@@ -54,6 +56,7 @@ const Select = <T,>({
|
|
|
54
56
|
helperText,
|
|
55
57
|
width = '100%',
|
|
56
58
|
disabled,
|
|
59
|
+
popupIcon = faChevronDown,
|
|
57
60
|
onChange,
|
|
58
61
|
getRenderValue,
|
|
59
62
|
...props
|
|
@@ -109,10 +112,10 @@ const Select = <T,>({
|
|
|
109
112
|
notched={(placeholder && true) || undefined}
|
|
110
113
|
onChange={handleChange}
|
|
111
114
|
IconComponent={({ className }) => (
|
|
112
|
-
<
|
|
115
|
+
<IconProvider
|
|
113
116
|
className={disabled ? 'Mui-disabled SelectIcon' : 'SelectIcon'}
|
|
114
|
-
icon={color === 'success' ? faCheck :
|
|
115
|
-
size=
|
|
117
|
+
icon={color === 'success' ? faCheck : popupIcon}
|
|
118
|
+
size="md"
|
|
116
119
|
sx={{
|
|
117
120
|
marginTop: color === 'success' ? '2px' : '0px',
|
|
118
121
|
transform:
|
|
@@ -130,6 +133,12 @@ const Select = <T,>({
|
|
|
130
133
|
{options?.map((option, i) => (
|
|
131
134
|
<MenuItem
|
|
132
135
|
sx={{
|
|
136
|
+
'&:hover': {
|
|
137
|
+
backgroundColor: theme.palette['blueHoverEquivalence'],
|
|
138
|
+
},
|
|
139
|
+
'&.Mui-selected': {
|
|
140
|
+
backgroundColor: theme.palette['greyXLight'] + ' !important',
|
|
141
|
+
},
|
|
133
142
|
fontSize: 14,
|
|
134
143
|
fontWeight: value === option ? 500 : 400,
|
|
135
144
|
whiteSpace: 'normal',
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
useTheme,
|
|
12
12
|
} from '@mui/material';
|
|
13
13
|
|
|
14
|
-
import IconProvider from '
|
|
15
|
-
import Tooltip from '
|
|
16
|
-
import { Placement } from '
|
|
14
|
+
import IconProvider from '@/components/IconProvider';
|
|
15
|
+
import Tooltip from '@/components/Tooltip';
|
|
16
|
+
import { Placement } from '@/components/Tooltip/tooltip.interface';
|
|
17
17
|
|
|
18
18
|
interface Props extends IconButtonProps {
|
|
19
19
|
icon: IconDefinition;
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
useTheme,
|
|
11
11
|
} from '@mui/material';
|
|
12
12
|
|
|
13
|
-
import IconProvider from '
|
|
14
|
-
import Text from '
|
|
13
|
+
import IconProvider from '@/components/IconProvider';
|
|
14
|
+
import Text from '@/components/Text';
|
|
15
15
|
|
|
16
16
|
interface Props extends MenuItemProps {
|
|
17
17
|
testId: string;
|