@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.
@@ -32,7 +32,7 @@ const OverlayCore = _ref => {
32
32
  onAnimationExited,
33
33
  ...props
34
34
  } = _ref;
35
- const overlayRef = useRef(null);
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__*/_jsx(CSSTransition, {
94
- in: isOpen,
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
- children: /*#__PURE__*/_jsxs("div", {
108
- ref: overlayRef,
109
- className: classNames(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, className),
110
- ...props,
111
- children: [/*#__PURE__*/_jsx("div", {
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
- }), /*#__PURE__*/_jsxs(FocusTrap, {
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
@@ -1,6 +1,6 @@
1
1
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
2
2
  import svg4everybody from 'svg4everybody';
3
- const version = "3.35.7";
3
+ const version = "3.35.8";
4
4
  export * from './publicPath';
5
5
  export { version };
6
6
  export * from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plesk/ui-library",
3
- "version": "3.35.7",
3
+ "version": "3.35.8",
4
4
  "description": "Plesk UI Library",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",