@festo-ui/react 8.1.0-dev.564 → 8.1.0-dev.565
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.
|
@@ -3,6 +3,7 @@ interface CustomModalProps extends ModalBaseProps {
|
|
|
3
3
|
large?: boolean;
|
|
4
4
|
title?: string;
|
|
5
5
|
subtitle?: string;
|
|
6
|
+
onCloseDone?: () => void;
|
|
6
7
|
}
|
|
7
8
|
declare const CustomModal: (props: CustomModalProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
8
9
|
export default CustomModal;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './Modal.scss';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ModalBaseProps } from './ModalBase';
|
|
4
|
-
export interface ModalProps extends ModalBaseProps {
|
|
4
|
+
export interface ModalProps extends Omit<ModalBaseProps, 'onCloseDone'> {
|
|
5
5
|
head?: React.ReactNode;
|
|
6
6
|
body: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -4,6 +4,7 @@ export interface ModalBaseProps extends ClassNamePropsWithChildren {
|
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
isLoading?: boolean;
|
|
6
6
|
onClose?: () => void;
|
|
7
|
+
onCloseDone?: () => void;
|
|
7
8
|
}
|
|
8
9
|
declare const ModalBase: (props: ModalBaseProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
9
10
|
export default ModalBase;
|
|
@@ -14,6 +14,7 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14
14
|
isOpen,
|
|
15
15
|
isLoading,
|
|
16
16
|
onClose,
|
|
17
|
+
onCloseDone,
|
|
17
18
|
className,
|
|
18
19
|
children
|
|
19
20
|
} = _ref;
|
|
@@ -49,6 +50,7 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
49
50
|
}), /*#__PURE__*/_jsx(CSSTransition, {
|
|
50
51
|
classNames: "fr-modal",
|
|
51
52
|
in: isOpen && !isLoading,
|
|
53
|
+
onExited: onCloseDone,
|
|
52
54
|
timeout: {
|
|
53
55
|
exit: 300,
|
|
54
56
|
enter: 100
|
|
@@ -63,9 +65,7 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
63
65
|
if (e.target === e.currentTarget) {
|
|
64
66
|
onClose?.();
|
|
65
67
|
}
|
|
66
|
-
}
|
|
67
|
-
//
|
|
68
|
-
,
|
|
68
|
+
},
|
|
69
69
|
className: "fr-modal-overlay-wrapper",
|
|
70
70
|
children: /*#__PURE__*/_jsx(RemoveScroll, {
|
|
71
71
|
ref: allRefs,
|
|
@@ -21,6 +21,7 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
21
21
|
isOpen,
|
|
22
22
|
isLoading,
|
|
23
23
|
onClose,
|
|
24
|
+
onCloseDone,
|
|
24
25
|
className,
|
|
25
26
|
children
|
|
26
27
|
} = _ref;
|
|
@@ -56,6 +57,7 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
56
57
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
57
58
|
classNames: "fr-modal",
|
|
58
59
|
in: isOpen && !isLoading,
|
|
60
|
+
onExited: onCloseDone,
|
|
59
61
|
timeout: {
|
|
60
62
|
exit: 300,
|
|
61
63
|
enter: 100
|
|
@@ -70,9 +72,7 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
70
72
|
if (e.target === e.currentTarget) {
|
|
71
73
|
onClose?.();
|
|
72
74
|
}
|
|
73
|
-
}
|
|
74
|
-
//
|
|
75
|
-
,
|
|
75
|
+
},
|
|
76
76
|
className: "fr-modal-overlay-wrapper",
|
|
77
77
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRemoveScroll.RemoveScroll, {
|
|
78
78
|
ref: allRefs,
|
package/package.json
CHANGED