@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.
@@ -38,7 +38,7 @@ const OverlayCore = _ref => {
38
38
  onAnimationExited,
39
39
  ...props
40
40
  } = _ref;
41
- const overlayRef = (0, _react.useRef)(null);
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.jsx)(_reactTransitionGroup.CSSTransition, {
100
- in: isOpen,
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
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
114
- ref: overlayRef,
115
- className: (0, _classnames.default)(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, className),
116
- ...props,
117
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
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
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FocusTrap.default, {
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
@@ -46,5 +46,5 @@ Object.keys(_components).forEach(function (key) {
46
46
  });
47
47
  });
48
48
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
49
- const version = exports.version = "3.35.7";
49
+ const version = exports.version = "3.35.8";
50
50
  (0, _svg4everybody.default)();