@plesk/ui-library 3.35.7 → 3.35.8
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/cjs/components/Overlay/Overlay.js +26 -18
- package/cjs/index.js +1 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +27 -19
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +2 -2
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Overlay/Overlay.js +26 -18
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/bundle.50841a29.js +2 -0
- package/styleguide/index.html +2 -2
- package/styleguide/build/bundle.a2d3190d.js +0 -2
- /package/styleguide/build/{bundle.a2d3190d.js.LICENSE.txt → bundle.50841a29.js.LICENSE.txt} +0 -0
|
@@ -32,7 +32,7 @@ const OverlayCore = _ref => {
|
|
|
32
32
|
onAnimationExited,
|
|
33
33
|
...props
|
|
34
34
|
} = _ref;
|
|
35
|
-
const
|
|
35
|
+
const backdropRef = useRef(null);
|
|
36
36
|
const contentRef = useRef(null);
|
|
37
37
|
const [isOpen, setIsOpen] = useState(false);
|
|
38
38
|
useEffect(() => setIsOpen(externalIsOpen), [externalIsOpen]);
|
|
@@ -88,30 +88,38 @@ const OverlayCore = _ref => {
|
|
|
88
88
|
children: element
|
|
89
89
|
});
|
|
90
90
|
};
|
|
91
|
+
const openClassName = `${baseClassName}--open`;
|
|
92
|
+
const transitionBaseProps = {
|
|
93
|
+
in: isOpen,
|
|
94
|
+
classNames: {
|
|
95
|
+
enterActive: openClassName,
|
|
96
|
+
enterDone: openClassName
|
|
97
|
+
},
|
|
98
|
+
timeout: 300
|
|
99
|
+
};
|
|
91
100
|
return /*#__PURE__*/_jsx(Layer, {
|
|
92
101
|
level: Z_INDEX_OVERLAY,
|
|
93
|
-
children: /*#__PURE__*/
|
|
94
|
-
|
|
95
|
-
timeout: 300,
|
|
96
|
-
classNames: {
|
|
97
|
-
enterActive: `${baseClassName}--open`,
|
|
98
|
-
enterDone: `${baseClassName}--open`
|
|
99
|
-
},
|
|
100
|
-
onExited: onAnimationExited,
|
|
101
|
-
nodeRef: overlayRef,
|
|
102
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
103
|
+
className: classNames(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, className),
|
|
102
104
|
style: {
|
|
103
105
|
'--overlay-side-banner-background': sideBannerContainer?.background,
|
|
104
106
|
'--overlay-side-banner-align': sideBannerContainer?.align,
|
|
105
107
|
...style
|
|
106
108
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
...
|
|
111
|
-
children:
|
|
109
|
+
...props,
|
|
110
|
+
children: [/*#__PURE__*/_jsx(CSSTransition, {
|
|
111
|
+
nodeRef: backdropRef,
|
|
112
|
+
...transitionBaseProps,
|
|
113
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
114
|
+
ref: backdropRef,
|
|
112
115
|
className: `${baseClassName}__backdrop`,
|
|
113
116
|
onClick: handleBackdropClick
|
|
114
|
-
})
|
|
117
|
+
})
|
|
118
|
+
}), /*#__PURE__*/_jsx(CSSTransition, {
|
|
119
|
+
onExited: onAnimationExited,
|
|
120
|
+
nodeRef: contentRef,
|
|
121
|
+
...transitionBaseProps,
|
|
122
|
+
children: /*#__PURE__*/_jsxs(FocusTrap, {
|
|
115
123
|
className: `${baseClassName}__content`,
|
|
116
124
|
onKeyUp: canCloseOnEscapePress ? handleContentKeyUp : undefined,
|
|
117
125
|
ref: contentRef,
|
|
@@ -121,8 +129,8 @@ const OverlayCore = _ref => {
|
|
|
121
129
|
className: `${baseClassName}__body`,
|
|
122
130
|
children: children
|
|
123
131
|
}), sideBanner && renderImage(sideBanner)]
|
|
124
|
-
})
|
|
125
|
-
})
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
126
134
|
})
|
|
127
135
|
});
|
|
128
136
|
};
|
package/esm/index.js
CHANGED