@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
|
@@ -38,7 +38,7 @@ const OverlayCore = _ref => {
|
|
|
38
38
|
onAnimationExited,
|
|
39
39
|
...props
|
|
40
40
|
} = _ref;
|
|
41
|
-
const
|
|
41
|
+
const backdropRef = (0, _react.useRef)(null);
|
|
42
42
|
const contentRef = (0, _react.useRef)(null);
|
|
43
43
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
44
44
|
(0, _react.useEffect)(() => setIsOpen(externalIsOpen), [externalIsOpen]);
|
|
@@ -94,30 +94,38 @@ const OverlayCore = _ref => {
|
|
|
94
94
|
children: element
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
|
+
const openClassName = `${baseClassName}--open`;
|
|
98
|
+
const transitionBaseProps = {
|
|
99
|
+
in: isOpen,
|
|
100
|
+
classNames: {
|
|
101
|
+
enterActive: openClassName,
|
|
102
|
+
enterDone: openClassName
|
|
103
|
+
},
|
|
104
|
+
timeout: 300
|
|
105
|
+
};
|
|
97
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layer.default, {
|
|
98
107
|
level: _constants.Z_INDEX_OVERLAY,
|
|
99
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
100
|
-
|
|
101
|
-
timeout: 300,
|
|
102
|
-
classNames: {
|
|
103
|
-
enterActive: `${baseClassName}--open`,
|
|
104
|
-
enterDone: `${baseClassName}--open`
|
|
105
|
-
},
|
|
106
|
-
onExited: onAnimationExited,
|
|
107
|
-
nodeRef: overlayRef,
|
|
108
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
|
+
className: (0, _classnames.default)(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, className),
|
|
108
110
|
style: {
|
|
109
111
|
'--overlay-side-banner-background': sideBannerContainer?.background,
|
|
110
112
|
'--overlay-side-banner-align': sideBannerContainer?.align,
|
|
111
113
|
...style
|
|
112
114
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
...
|
|
117
|
-
children:
|
|
115
|
+
...props,
|
|
116
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
117
|
+
nodeRef: backdropRef,
|
|
118
|
+
...transitionBaseProps,
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
120
|
+
ref: backdropRef,
|
|
118
121
|
className: `${baseClassName}__backdrop`,
|
|
119
122
|
onClick: handleBackdropClick
|
|
120
|
-
})
|
|
123
|
+
})
|
|
124
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
125
|
+
onExited: onAnimationExited,
|
|
126
|
+
nodeRef: contentRef,
|
|
127
|
+
...transitionBaseProps,
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FocusTrap.default, {
|
|
121
129
|
className: `${baseClassName}__content`,
|
|
122
130
|
onKeyUp: canCloseOnEscapePress ? handleContentKeyUp : undefined,
|
|
123
131
|
ref: contentRef,
|
|
@@ -127,8 +135,8 @@ const OverlayCore = _ref => {
|
|
|
127
135
|
className: `${baseClassName}__body`,
|
|
128
136
|
children: children
|
|
129
137
|
}), sideBanner && renderImage(sideBanner)]
|
|
130
|
-
})
|
|
131
|
-
})
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
132
140
|
})
|
|
133
141
|
});
|
|
134
142
|
};
|
package/cjs/index.js
CHANGED