@plesk/ui-library 3.46.1 → 3.46.2
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/Layout/Layout.js +17 -7
- 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 +18 -8
- 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/Layout/Layout.js +17 -7
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/{bundle.19f0a6f2.js → bundle.1a395777.js} +2 -2
- package/styleguide/index.html +2 -2
- /package/styleguide/build/{bundle.19f0a6f2.js.LICENSE.txt → bundle.1a395777.js.LICENSE.txt} +0 -0
|
@@ -47,6 +47,7 @@ class Layout extends Component {
|
|
|
47
47
|
});
|
|
48
48
|
_defineProperty(this, "headerRef", /*#__PURE__*/createRef());
|
|
49
49
|
_defineProperty(this, "sidebarRef", /*#__PURE__*/createRef());
|
|
50
|
+
_defineProperty(this, "rightSidebarRef", /*#__PURE__*/createRef());
|
|
50
51
|
_defineProperty(this, "responsiveSidebarTogglerRef", /*#__PURE__*/createRef());
|
|
51
52
|
_defineProperty(this, "unsubscribeMatchMedia", void 0);
|
|
52
53
|
_defineProperty(this, "unsubscribeClickOutside", void 0);
|
|
@@ -301,6 +302,8 @@ class Layout extends Component {
|
|
|
301
302
|
const {
|
|
302
303
|
baseClassName
|
|
303
304
|
} = this.props;
|
|
305
|
+
const isMobile = window.matchMedia('(max-width: 768px)').matches;
|
|
306
|
+
const sidebarOffsetTop = this.headerRef.current?.getBoundingClientRect().height || 0;
|
|
304
307
|
return /*#__PURE__*/_jsx(CSSTransition, {
|
|
305
308
|
in: !rightSidebarVisible,
|
|
306
309
|
timeout: 300,
|
|
@@ -313,7 +316,14 @@ class Layout extends Component {
|
|
|
313
316
|
exitDone: `${baseClassName}__right-sidebar--off`
|
|
314
317
|
},
|
|
315
318
|
children: /*#__PURE__*/_jsx("aside", {
|
|
316
|
-
|
|
319
|
+
ref: this.rightSidebarRef,
|
|
320
|
+
className: classNames(`${baseClassName}__right-sidebar`, {
|
|
321
|
+
[`${baseClassName}__right-sidebar--on`]: rightSidebarVisible,
|
|
322
|
+
[`${baseClassName}__right-sidebar--off`]: !rightSidebarVisible
|
|
323
|
+
}),
|
|
324
|
+
style: {
|
|
325
|
+
height: isMobile ? '100vh' : `calc(100vh - ${sidebarOffsetTop}px)`
|
|
326
|
+
},
|
|
317
327
|
children: /*#__PURE__*/_jsx("div", {
|
|
318
328
|
className: `${baseClassName}__right-sidebar-inner`,
|
|
319
329
|
children: /*#__PURE__*/_jsx("div", {
|
|
@@ -412,9 +422,9 @@ class Layout extends Component {
|
|
|
412
422
|
className: `${baseClassName}__container`,
|
|
413
423
|
children: [this.renderSidebar({
|
|
414
424
|
sidebar
|
|
415
|
-
}), /*#__PURE__*/
|
|
425
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
416
426
|
className: `${baseClassName}__content-wrapper`,
|
|
417
|
-
children:
|
|
427
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
418
428
|
className: `${baseClassName}__content`,
|
|
419
429
|
children: [this.renderContentAddon({
|
|
420
430
|
contentAddon
|
|
@@ -425,10 +435,10 @@ class Layout extends Component {
|
|
|
425
435
|
}), this.renderFooter({
|
|
426
436
|
footer
|
|
427
437
|
})]
|
|
428
|
-
})
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
438
|
+
})
|
|
439
|
+
}), this.renderRightSidebar({
|
|
440
|
+
rightSidebar,
|
|
441
|
+
rightSidebarVisible
|
|
432
442
|
})]
|
|
433
443
|
})]
|
|
434
444
|
})
|
package/esm/index.js
CHANGED