@snack-uikit/modal 0.9.15 → 0.9.16
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.9.16 (2024-03-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **FF-4401:** fix always mount modal portal ([c8f9444](https://github.com/cloud-ru-tech/snack-uikit/commit/c8f9444bd990f8f8de6b4a7d402592cf3b46da8f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.9.15 (2024-02-29)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -25,7 +25,7 @@ export type ModalCustomProps = WithSupportProps<{
|
|
|
25
25
|
/** Контент */
|
|
26
26
|
children: ReactNode;
|
|
27
27
|
}>;
|
|
28
|
-
export declare function ModalCustom({ open, onClose, size, mode, children, className, ...rest }: ModalCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function ModalCustom({ open, onClose, size, mode, children, className, ...rest }: ModalCustomProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
29
|
export declare namespace ModalCustom {
|
|
30
30
|
type HeaderProps = ModalHeaderProps;
|
|
31
31
|
type BodyProps = ModalBodyProps;
|
|
@@ -26,7 +26,10 @@ export function ModalCustom(_a) {
|
|
|
26
26
|
onClose();
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
if (!open) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return (_jsxs(RCModal, { data: Object.assign(Object.assign({}, getDataTestAttributes(rest)), { size }), isOpen: true, onRequestClose: handleClose, appElement: document.body, overlayElement: (_, content) => (_jsx(OverlayElement, { blur: [MODE.Forced, MODE.Aggressive].includes(mode), content: content, onClose: handleClose })), className: cn(styles.modal, className), children: [mode !== MODE.Forced && (_jsx("div", { className: styles.headerElements, children: _jsx(ButtonClose, { onClick: handleCloseButtonClick }) })), children] }));
|
|
30
33
|
}
|
|
31
34
|
(function (ModalCustom) {
|
|
32
35
|
ModalCustom.Header = ModalHeader;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Modal",
|
|
7
|
-
"version": "0.9.
|
|
7
|
+
"version": "0.9.16",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react-modal": "3.16.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "12402658894be14fd3bb885ed4c72cf42e858dc6"
|
|
51
51
|
}
|
|
@@ -62,10 +62,14 @@ export function ModalCustom({
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
if (!open) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
return (
|
|
66
70
|
<RCModal
|
|
67
71
|
data={{ ...getDataTestAttributes(rest), size }}
|
|
68
|
-
isOpen
|
|
72
|
+
isOpen
|
|
69
73
|
onRequestClose={handleClose}
|
|
70
74
|
appElement={document.body}
|
|
71
75
|
overlayElement={(_, content) => (
|