@axa-fr/design-system-look-and-feel-react 1.0.0-ci.351 → 1.0.3-alpha.144
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/AccordionCore/AccordionCore.js +1 -1
- package/dist/Alert/Alert.d.ts +3 -3
- package/dist/Alert/Alert.js +6 -6
- package/dist/Button/Button.d.ts +2 -17
- package/dist/Button/Button.js +1 -15
- package/dist/Card/Card.js +1 -1
- package/dist/Divider/Divider.js +1 -1
- package/dist/Form/Checkbox/Checkbox.js +2 -2
- package/dist/Form/Checkbox/CheckboxSelect.d.ts +4 -3
- package/dist/Form/Checkbox/CheckboxSelect.js +5 -2
- package/dist/Form/FileUpload/FileUpload.d.ts +7 -5
- package/dist/Form/FileUpload/FileUpload.js +14 -23
- package/dist/Form/ItemMessage/ItemMessage.d.ts +1 -0
- package/dist/Form/ItemMessage/ItemMessage.js +1 -0
- package/dist/Form/Radio/Radio.js +2 -2
- package/dist/Form/Radio/RadioSelect.d.ts +2 -1
- package/dist/Form/Radio/RadioSelect.js +5 -5
- package/dist/Form/Select/Select.d.ts +5 -22
- package/dist/Form/Select/Select.js +11 -23
- package/dist/Form/Text/Text.d.ts +3 -0
- package/dist/Form/Text/Text.js +7 -4
- package/dist/Form/TextArea/TextArea.js +2 -3
- package/dist/Form/core/FieldForm.d.ts +1 -1
- package/dist/Form/core/FieldForm.js +3 -2
- package/dist/Grid/DebugGrid.d.ts +1 -0
- package/dist/Grid/DebugGrid.js +1 -0
- package/dist/IconBg/IconBg.js +1 -1
- package/dist/Layout/Footer/index.d.ts +1 -0
- package/dist/Layout/Footer/index.js +1 -0
- package/dist/Layout/Header/BurgerMenu/BurgerMenu.d.ts +13 -0
- package/dist/Layout/Header/BurgerMenu/BurgerMenu.js +26 -0
- package/dist/Layout/Header/BurgerMenu/index.d.ts +1 -0
- package/dist/Layout/Header/BurgerMenu/index.js +1 -0
- package/dist/Layout/Header/Header.d.ts +6 -6
- package/dist/Layout/Header/Header.js +30 -4
- package/dist/Layout/Header/NavBar/NavBar.d.ts +3 -3
- package/dist/Layout/Header/NavBar/NavBar.js +10 -5
- package/dist/Layout/Header/PreviousLink/PreviousLink.d.ts +1 -1
- package/dist/Layout/Header/PreviousLink/PreviousLink.js +3 -1
- package/dist/Layout/Header/index.d.ts +3 -0
- package/dist/Layout/Header/index.js +3 -0
- package/dist/Link/Link.js +1 -1
- package/dist/List/ClickList/ClickItem/ClickItem.d.ts +1 -1
- package/dist/List/ClickList/ClickItem/ClickItem.js +3 -3
- package/dist/List/ContentItemDuo/ContentItemDuo.d.ts +2 -1
- package/dist/List/ContentItemDuo/ContentItemDuo.js +3 -4
- package/dist/List/ContentItemMono/ContentItemMono.js +1 -1
- package/dist/Modal/Modal.d.ts +12 -0
- package/dist/Modal/Modal.js +10 -0
- package/dist/Modal/ModalCore.d.ts +11 -0
- package/dist/Modal/ModalCore.js +6 -0
- package/dist/Modal/components/ModalCoreBody.d.ts +2 -0
- package/dist/Modal/components/ModalCoreBody.js +2 -0
- package/dist/Modal/components/ModalCoreFooter.d.ts +2 -0
- package/dist/Modal/components/ModalCoreFooter.js +2 -0
- package/dist/Modal/components/ModalCoreHeader.d.ts +12 -0
- package/dist/Modal/components/ModalCoreHeader.js +8 -0
- package/dist/Modal/index.d.ts +5 -0
- package/dist/Modal/index.js +5 -0
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/SkeletonList/SkeletonList.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts +2 -0
- package/dist/Spinner/Spinner.js +1 -0
- package/dist/Stepper/Stepper.d.ts +1 -1
- package/dist/Stepper/Stepper.js +3 -3
- package/dist/Svg/svgInjector.js +3 -0
- package/dist/Tag/Tag.js +1 -1
- package/dist/Title/Title.js +1 -1
- package/dist/Title/TitleWithSubtitles.d.ts +1 -1
- package/dist/index.d.ts +9 -5
- package/dist/index.js +8 -4
- package/dist/utilities/helpers/getComponentClassName.d.ts +1 -1
- package/dist/utilities/helpers/getComponentClassName.js +7 -8
- package/package.json +36 -69
- package/dist/Form/Select/CustomOption.d.ts +0 -4
- package/dist/Form/Select/CustomOption.js +0 -8
- package/dist/Form/Select/DropdownIndicator.d.ts +0 -4
- package/dist/Form/Select/DropdownIndicator.js +0 -11
- package/dist/Loader/Loader.d.ts +0 -11
- package/dist/Loader/Loader.js +0 -10
- package/dist/Loader/index.d.ts +0 -1
- package/dist/Loader/index.js +0 -1
- package/dist/ModalClient/Modal.container.d.ts +0 -4
- package/dist/ModalClient/Modal.container.js +0 -45
- package/dist/ModalClient/Modal.d.ts +0 -4
- package/dist/ModalClient/Modal.hook.d.ts +0 -6
- package/dist/ModalClient/Modal.hook.js +0 -25
- package/dist/ModalClient/Modal.js +0 -6
- package/dist/ModalClient/index.d.ts +0 -1
- package/dist/ModalClient/index.js +0 -1
- package/dist/ModalClient/type.d.ts +0 -38
- package/dist/ModalClient/type.js +0 -1
package/package.json
CHANGED
@@ -1,15 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axa-fr/design-system-look-and-feel-react",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3-alpha.144",
|
4
4
|
"description": "",
|
5
|
+
"main": "./dist/index.js",
|
6
|
+
"types": "./dist/index.d.ts",
|
5
7
|
"exports": {
|
6
8
|
".": {
|
7
|
-
"
|
8
|
-
|
9
|
+
"default": {
|
10
|
+
"import": "./dist/index.js",
|
11
|
+
"types": "./dist/index.d.ts"
|
12
|
+
}
|
9
13
|
},
|
10
14
|
"./utilities": {
|
11
|
-
"
|
12
|
-
|
15
|
+
"default": {
|
16
|
+
"import": "./dist/utilities.js",
|
17
|
+
"types": "./dist/utilities.d.ts"
|
18
|
+
}
|
13
19
|
}
|
14
20
|
},
|
15
21
|
"files": [
|
@@ -19,18 +25,14 @@
|
|
19
25
|
"prebuild": "rimraf dist",
|
20
26
|
"build": "tsc -p tsconfig.build.json",
|
21
27
|
"postbuild": "copyfiles --up 1 \"src/assets/svg/*.svg\" ./dist/",
|
22
|
-
"start:storybook": "storybook dev -p 6009",
|
23
|
-
"build:storybook": "storybook build",
|
24
|
-
"build-storybook": "storybook build",
|
25
28
|
"eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
26
29
|
"eslint:fix": "eslint src --ext js,jsx,ts,tsx --fix",
|
27
|
-
"prettier": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --check",
|
28
|
-
"prettier:fix": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --write",
|
29
|
-
"
|
30
|
+
"prettier": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --check --ignore-unknow",
|
31
|
+
"prettier:fix": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --write --ignore-unknow",
|
32
|
+
"check-types": "tsc --noEmit",
|
30
33
|
"test": "vitest",
|
31
34
|
"test:ui": "vitest --ui",
|
32
|
-
"test:ci": "vitest run --coverage"
|
33
|
-
"chromatic": "npx chromatic"
|
35
|
+
"test:ci": "vitest run --coverage"
|
34
36
|
},
|
35
37
|
"repository": {
|
36
38
|
"type": "git",
|
@@ -45,7 +47,8 @@
|
|
45
47
|
},
|
46
48
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
47
49
|
"peerDependencies": {
|
48
|
-
"@axa-fr/design-system-
|
50
|
+
"@axa-fr/design-system-apollo-react": "1.0.3-alpha.144",
|
51
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.144",
|
49
52
|
"@material-symbols/svg-400": ">= 0.19.0",
|
50
53
|
"react": ">= 18"
|
51
54
|
},
|
@@ -57,72 +60,36 @@
|
|
57
60
|
"dependencies": {
|
58
61
|
"@fontsource/source-sans-pro": "^5.0.8",
|
59
62
|
"@tanem/svg-injector": "^10.1.68",
|
60
|
-
"@types/react-dom": "^18.2.24",
|
61
63
|
"classnames": "^2.5.1",
|
62
|
-
"dompurify": "^3.1.5"
|
63
|
-
"rc-slider": "^10.5.0",
|
64
|
-
"react-select": "^5.8.0"
|
64
|
+
"dompurify": "^3.1.5"
|
65
65
|
},
|
66
66
|
"devDependencies": {
|
67
|
-
"@
|
68
|
-
"@
|
69
|
-
"@
|
70
|
-
"@
|
71
|
-
"@
|
72
|
-
"@
|
73
|
-
"@
|
74
|
-
"@
|
75
|
-
"@storybook/blocks": "^8.3.5",
|
76
|
-
"@storybook/manager-api": "^8.3.5",
|
77
|
-
"@storybook/react": "^8.3.5",
|
78
|
-
"@storybook/react-vite": "^8.3.5",
|
79
|
-
"@storybook/test": "^8.3.5",
|
80
|
-
"@storybook/theming": "^8.3.5",
|
81
|
-
"@testing-library/dom": "^10.1.0",
|
82
|
-
"@testing-library/jest-dom": "^6.5.0",
|
83
|
-
"@testing-library/react": "^15.0.7",
|
84
|
-
"@testing-library/user-event": "^14.5.2",
|
67
|
+
"@axa-fr/design-system-look-and-feel-css": "*",
|
68
|
+
"@axa-fr/design-system-apollo-react": "*",
|
69
|
+
"@axa-fr/eslint-config-design-system": "*",
|
70
|
+
"@axa-fr/prettier-config-design-system": "*",
|
71
|
+
"@testing-library/dom": "^10.4.0",
|
72
|
+
"@testing-library/jest-dom": "^6.6.3",
|
73
|
+
"@testing-library/react": "^16.2.0",
|
74
|
+
"@testing-library/user-event": "^14.6.1",
|
85
75
|
"@types/dompurify": "^3.0.5",
|
86
|
-
"@types/jest": "^29.5.
|
76
|
+
"@types/jest": "^29.5.14",
|
87
77
|
"@types/jest-axe": "^3.5.9",
|
88
|
-
"@
|
89
|
-
"@
|
90
|
-
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
91
|
-
"@typescript-eslint/parser": "^8.17.0",
|
92
|
-
"@vitejs/plugin-react": "^4.3.1",
|
93
|
-
"@vitest/coverage-v8": "^2.0.5",
|
94
|
-
"@vitest/ui": "^2.1.2",
|
95
|
-
"chromatic": "^11.12.0",
|
78
|
+
"@vitest/coverage-v8": "^3.0.7",
|
79
|
+
"@vitest/ui": "^3.0.7",
|
96
80
|
"copyfiles": "^2.4.1",
|
97
|
-
"
|
98
|
-
"eslint-config-airbnb": "^19.0.4",
|
99
|
-
"eslint-config-prettier": "^9.1.0",
|
100
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
101
|
-
"eslint-plugin-import": "^2.29.1",
|
102
|
-
"eslint-plugin-jsx-a11y": "^6.8.0",
|
103
|
-
"eslint-plugin-prettier": "^5.1.3",
|
104
|
-
"eslint-plugin-react": "^7.36.1",
|
105
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
106
|
-
"eslint-plugin-storybook": "^0.9.0",
|
107
|
-
"jest-axe": "^8.0.0",
|
81
|
+
"jest-axe": "^9.0.0",
|
108
82
|
"jsdom": "^25.0.1",
|
109
|
-
"
|
110
|
-
"prop-types": "^15.8.1",
|
111
|
-
"react": "^18.3.1",
|
112
|
-
"react-dom": "^18.2.0",
|
83
|
+
"react": "^19.0.0",
|
113
84
|
"rimraf": "^6.0.1",
|
114
|
-
"
|
115
|
-
"tsc-files": "^1.1.4",
|
116
|
-
"typescript": "^5.6.3",
|
117
|
-
"vitest": "^2.0.5"
|
85
|
+
"vitest": "^3.0.7"
|
118
86
|
},
|
119
87
|
"lint-staged": {
|
120
88
|
"*.(js|jsx|ts|tsx)": "eslint --fix",
|
121
|
-
"*.(ts|tsx)": "tsc-files --noEmit"
|
122
|
-
"*.mdx": "prettier --write"
|
89
|
+
"*.(ts|tsx)": "tsc-files --noEmit"
|
123
90
|
},
|
91
|
+
"prettier": "@axa-fr/prettier-config-design-system",
|
124
92
|
"volta": {
|
125
|
-
"
|
126
|
-
"npm": "10.2.5"
|
93
|
+
"extends": "../../../package.json"
|
127
94
|
}
|
128
|
-
}
|
95
|
+
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { useMemo } from "react";
|
3
|
-
import { components } from "react-select";
|
4
|
-
const CustomOption = ({ getValue, ...otherProps }) => {
|
5
|
-
const value = useMemo(() => getValue(), [getValue]);
|
6
|
-
return (_jsx(components.Option, { ...otherProps, getValue: getValue, "data-value": value }));
|
7
|
-
};
|
8
|
-
export { CustomOption };
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import arrowDropDown from "@material-symbols/svg-400/outlined/arrow_drop_down.svg";
|
3
|
-
import arrowDropUp from "@material-symbols/svg-400/outlined/arrow_drop_up.svg";
|
4
|
-
import { components } from "react-select";
|
5
|
-
import classNames from "classnames";
|
6
|
-
import { Svg } from "../../Svg";
|
7
|
-
const DropdownIndicator = (props) => {
|
8
|
-
const { selectProps: { menuIsOpen, isDisabled }, } = props;
|
9
|
-
return (_jsx(components.DropdownIndicator, { ...props, children: _jsx(Svg, { src: menuIsOpen ? arrowDropUp : arrowDropDown, className: classNames(isDisabled && "af-form__input-select-container-icon-disabled") }) }));
|
10
|
-
};
|
11
|
-
export { DropdownIndicator };
|
package/dist/Loader/Loader.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Loader/Loader.scss";
|
2
|
-
type LoaderProps = {
|
3
|
-
border?: number;
|
4
|
-
size?: number;
|
5
|
-
text?: string;
|
6
|
-
};
|
7
|
-
declare const Loader: {
|
8
|
-
({ border, size, text, }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
9
|
-
displayName: string;
|
10
|
-
};
|
11
|
-
export { Loader };
|
package/dist/Loader/Loader.js
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Loader/Loader.scss";
|
3
|
-
const Loader = ({ border = 5, size = 60, text = "Chargement en cours", }) => (_jsx("div", { role: "alert", "aria-busy": true, "aria-label": text, "aria-live": "assertive", className: "af-loader__container", style: {
|
4
|
-
width: `${size}px`,
|
5
|
-
height: `${size}px`,
|
6
|
-
border: `${border}px solid #f3f3f3`,
|
7
|
-
borderTop: `${border}px solid #00008f`,
|
8
|
-
}, children: _jsx("div", { className: "af-loader__container-spin", "aria-hidden": "true" }) }));
|
9
|
-
Loader.displayName = "Loader";
|
10
|
-
export { Loader };
|
package/dist/Loader/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { Loader } from "./Loader";
|
package/dist/Loader/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { Loader } from "./Loader";
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
|
2
|
-
import { PropsWithChildren } from "react";
|
3
|
-
import { ModalProps } from "./type";
|
4
|
-
export declare const ModalContainer: ({ open, setIsOpen, hasCloseButton, onClose, onClickOutside, children, title, subtitle, iconTitle, actions, fullWidthButtons, }: PropsWithChildren<ModalProps>) => import("react").ReactPortal;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
|
3
|
-
import { useEffect, useId, useRef } from "react";
|
4
|
-
import { createPortal } from "react-dom";
|
5
|
-
import { Modal } from "./Modal";
|
6
|
-
import { useModal } from "./Modal.hook";
|
7
|
-
export const ModalContainer = ({ open, setIsOpen, hasCloseButton = true, onClose, onClickOutside, children, title, subtitle, iconTitle, actions, fullWidthButtons, }) => {
|
8
|
-
const { handleClickOutside, handleKeyDown, handleCloseModal } = useModal({
|
9
|
-
setIsOpen,
|
10
|
-
onClose,
|
11
|
-
onClickOutside,
|
12
|
-
});
|
13
|
-
const modalRef = useRef(null);
|
14
|
-
const idTitle = useId();
|
15
|
-
const idContent = useId();
|
16
|
-
const actionCallback = (callback) => {
|
17
|
-
callback?.();
|
18
|
-
setIsOpen(false);
|
19
|
-
};
|
20
|
-
useEffect(() => {
|
21
|
-
const modalElement = modalRef.current;
|
22
|
-
if (modalElement) {
|
23
|
-
if (open) {
|
24
|
-
document.body.style.overflow = "hidden";
|
25
|
-
modalElement.showModal?.();
|
26
|
-
}
|
27
|
-
else {
|
28
|
-
document.body.style.overflow = "inherit";
|
29
|
-
modalElement.close?.();
|
30
|
-
}
|
31
|
-
}
|
32
|
-
return () => {
|
33
|
-
document.body.style.overflow = "inherit";
|
34
|
-
};
|
35
|
-
}, [open]);
|
36
|
-
useEffect(() => {
|
37
|
-
document.body.addEventListener("keydown", handleKeyDown);
|
38
|
-
document.body.addEventListener("click", handleClickOutside);
|
39
|
-
return () => {
|
40
|
-
document.body.removeEventListener("keydown", handleKeyDown);
|
41
|
-
document.body.removeEventListener("click", handleClickOutside);
|
42
|
-
};
|
43
|
-
}, [handleClickOutside, handleKeyDown]);
|
44
|
-
return createPortal(_jsx(Modal, { modalRef: modalRef, idTitle: idTitle, idContent: idContent, iconTitle: iconTitle, title: title, subtitle: subtitle, hasCloseButton: hasCloseButton, handleCloseModal: handleCloseModal, actionCallback: actionCallback, actions: actions, fullWidthButtons: fullWidthButtons, children: children }), document.body);
|
45
|
-
};
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { PropsWithChildren } from "react";
|
2
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
|
3
|
-
import { TModalType } from "./type";
|
4
|
-
export declare const Modal: ({ modalRef, idTitle, idContent, iconTitle, title, subtitle, hasCloseButton, handleCloseModal, actionCallback, children, actions, fullWidthButtons, }: PropsWithChildren<TModalType>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { useCallback } from "react";
|
2
|
-
export const useModal = ({ setIsOpen, onClose, onClickOutside, }) => {
|
3
|
-
const handleCloseModal = useCallback(() => {
|
4
|
-
onClose?.();
|
5
|
-
setIsOpen(false);
|
6
|
-
}, [onClose, setIsOpen]);
|
7
|
-
const handleClickOutside = useCallback((event) => {
|
8
|
-
if (event.target.tagName !== "DIALOG") {
|
9
|
-
return;
|
10
|
-
}
|
11
|
-
if (onClickOutside) {
|
12
|
-
onClickOutside();
|
13
|
-
setIsOpen(false);
|
14
|
-
}
|
15
|
-
else {
|
16
|
-
handleCloseModal();
|
17
|
-
}
|
18
|
-
}, [handleCloseModal, onClickOutside, setIsOpen]);
|
19
|
-
const handleKeyDown = useCallback((event) => {
|
20
|
-
if (event.key === "Escape") {
|
21
|
-
handleCloseModal();
|
22
|
-
}
|
23
|
-
}, [handleCloseModal]);
|
24
|
-
return { handleClickOutside, handleKeyDown, handleCloseModal };
|
25
|
-
};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import close from "@material-symbols/svg-400/outlined/close.svg";
|
3
|
-
import { ButtonClient as Button, Variants, Variants as ButtonVariants, } from "../Button/Button";
|
4
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Modal/Modal.scss";
|
5
|
-
import { Svg } from "../Svg";
|
6
|
-
export const Modal = ({ modalRef, idTitle, idContent, iconTitle, title, subtitle, hasCloseButton, handleCloseModal, actionCallback, children, actions, fullWidthButtons, }) => (_jsxs("dialog", { ref: modalRef, className: "af-modal", "aria-labelledby": idTitle, "aria-describedby": idContent, children: [_jsxs("div", { id: idTitle, className: "af-modal__top", children: [iconTitle, _jsxs("h2", { className: "af-modal__top-title", children: [_jsxs("div", { children: [_jsx("div", { className: "af-modal__top-title-text", children: title }), subtitle && (_jsx("span", { className: "af-modal__top-title-subtitle", children: subtitle }))] }), hasCloseButton && (_jsx(Button, { className: "af-modal__top-title-close-btn", onClick: handleCloseModal, variant: Variants.ghost, type: "button", "aria-label": "close", children: _jsx(Svg, { src: close, width: 32, height: 32 }) }))] })] }), _jsxs("div", { id: idContent, className: "af-modal__content", children: [children, actions && (_jsxs("div", { className: `af-modal__actions${fullWidthButtons ? " af-modal__actions--fullWidth" : ""} `, children: [actions?.primary && (_jsx(Button, { variant: ButtonVariants.primary, onClick: () => actionCallback(actions?.primary?.callback), disabled: actions?.primary.disabled, children: actions?.primary.text })), actions?.secondary && (_jsx(Button, { variant: ButtonVariants.secondary, onClick: () => actionCallback(actions?.secondary?.callback), disabled: actions?.secondary.disabled, children: actions?.secondary.text })), actions?.tertiary && (_jsx(Button, { variant: ButtonVariants.tertiary, onClick: () => actionCallback(actions?.tertiary?.callback), disabled: actions?.tertiary.disabled, children: actions?.tertiary.text }))] }))] })] }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export { ModalContainer as Modal } from "./Modal.container";
|
@@ -1 +0,0 @@
|
|
1
|
-
export { ModalContainer as Modal } from "./Modal.container";
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { ReactNode, RefObject } from "react";
|
2
|
-
export type ButtonAction = {
|
3
|
-
text: string;
|
4
|
-
disabled?: boolean;
|
5
|
-
callback: () => void;
|
6
|
-
};
|
7
|
-
export type TActionButton = {
|
8
|
-
primary?: ButtonAction;
|
9
|
-
secondary?: ButtonAction;
|
10
|
-
tertiary?: ButtonAction;
|
11
|
-
};
|
12
|
-
export type TModalHook = {
|
13
|
-
setIsOpen: (value: boolean) => void;
|
14
|
-
onClose?: () => void;
|
15
|
-
onClickOutside?: () => void;
|
16
|
-
};
|
17
|
-
export type ModalProps = TModalHook & {
|
18
|
-
open: boolean;
|
19
|
-
hasCloseButton?: boolean;
|
20
|
-
title: string;
|
21
|
-
subtitle?: string;
|
22
|
-
iconTitle?: ReactNode;
|
23
|
-
fullWidthButtons?: boolean;
|
24
|
-
actions?: TActionButton;
|
25
|
-
};
|
26
|
-
export type TModalType = {
|
27
|
-
modalRef: RefObject<HTMLDialogElement>;
|
28
|
-
idTitle: string;
|
29
|
-
idContent: string;
|
30
|
-
iconTitle: ReactNode;
|
31
|
-
title: string;
|
32
|
-
subtitle?: string;
|
33
|
-
hasCloseButton: boolean;
|
34
|
-
handleCloseModal: () => void;
|
35
|
-
actionCallback: (callback?: () => void) => void;
|
36
|
-
actions?: TActionButton;
|
37
|
-
fullWidthButtons?: boolean;
|
38
|
-
};
|
package/dist/ModalClient/type.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|