@plesk/ui-library 3.45.1 → 3.46.0

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.
@@ -237,4 +237,5 @@ const FormFieldPasswordWrapper = props => {
237
237
  translate: translate
238
238
  });
239
239
  };
240
+ FormFieldPasswordWrapper.defaultProps = FormFieldPassword.defaultProps;
240
241
  export default FormFieldPasswordWrapper;
@@ -7,6 +7,7 @@ import classNames from 'classnames';
7
7
  import { CSSTransition } from 'react-transition-group';
8
8
  import { useInternalTranslate } from '../LocaleProvider';
9
9
  import { CLS_PREFIX } from '../../constants';
10
+ import { disableDocumentScroll, enableDocumentScroll } from '../../utils';
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const subscribeMatchMedia = (query, handler) => {
12
13
  const mq = window.matchMedia(query);
@@ -121,6 +122,17 @@ class Layout extends Component {
121
122
  this.unsubscribeMatchMedia = subscribeMatchMedia('(max-width: 1022px)', this.handleMatchMedia);
122
123
  this.unsubscribeClickOutside = subscribeClickOutside([this.sidebarRef, this.responsiveSidebarTogglerRef], this.handleClickOutside);
123
124
  }
125
+ componentDidUpdate(prevProps) {
126
+ const isRightSidebarOpen = this.props.rightSidebar && this.props.rightSidebarVisible;
127
+ const wasRightSidebarOpen = prevProps.rightSidebar && prevProps.rightSidebarVisible;
128
+ const isMobile = window.matchMedia('(max-width: 780px)').matches;
129
+ if (!wasRightSidebarOpen && isRightSidebarOpen && isMobile) {
130
+ disableDocumentScroll();
131
+ }
132
+ if (wasRightSidebarOpen && !isRightSidebarOpen) {
133
+ enableDocumentScroll();
134
+ }
135
+ }
124
136
  componentWillUnmount() {
125
137
  this.unsubscribeMatchMedia?.();
126
138
  this.unsubscribeClickOutside?.();
@@ -279,6 +291,42 @@ class Layout extends Component {
279
291
  })
280
292
  });
281
293
  }
294
+ renderRightSidebar({
295
+ rightSidebar,
296
+ rightSidebarVisible
297
+ }) {
298
+ if (!rightSidebar) {
299
+ return null;
300
+ }
301
+ const {
302
+ baseClassName
303
+ } = this.props;
304
+ return /*#__PURE__*/_jsx(CSSTransition, {
305
+ in: !rightSidebarVisible,
306
+ timeout: 300,
307
+ classNames: {
308
+ enter: `${baseClassName}__right-sidebar--enter`,
309
+ enterActive: `${baseClassName}__right-sidebar--active-enter`,
310
+ enterDone: `${baseClassName}__right-sidebar--on`,
311
+ exit: `${baseClassName}__right-sidebar--exit`,
312
+ exitActive: `${baseClassName}__right-sidebar--active-exit`,
313
+ exitDone: `${baseClassName}__right-sidebar--off`
314
+ },
315
+ children: /*#__PURE__*/_jsx("aside", {
316
+ className: `${baseClassName}__right-sidebar`,
317
+ children: /*#__PURE__*/_jsx("div", {
318
+ className: `${baseClassName}__right-sidebar-inner`,
319
+ children: /*#__PURE__*/_jsx("div", {
320
+ className: `${baseClassName}__right-sidebar-content`,
321
+ children: /*#__PURE__*/_jsx("div", {
322
+ className: `${baseClassName}__right-sidebar-content-inner`,
323
+ children: rightSidebar
324
+ })
325
+ })
326
+ })
327
+ })
328
+ });
329
+ }
282
330
  renderMainContent({
283
331
  children
284
332
  }) {
@@ -323,6 +371,8 @@ class Layout extends Component {
323
371
  sidebarType,
324
372
  sidebarCollapsible,
325
373
  sidebarCollapsed,
374
+ rightSidebar,
375
+ rightSidebarVisible,
326
376
  translate,
327
377
  onSidebarToggle,
328
378
  contentAddon,
@@ -350,6 +400,7 @@ class Layout extends Component {
350
400
  [`${baseClassName}--sidebar`]: sidebar,
351
401
  [`${baseClassName}--sidebar-type-${sidebarType}`]: sidebarType && sidebar,
352
402
  [`${baseClassName}--sidebar-collapsed`]: sidebarType === 'collapsed' && isSidebarClosed,
403
+ [`${baseClassName}--right-sidebar-collapsed`]: !rightSidebar || !rightSidebarVisible,
353
404
  [`${baseClassName}--sidebar-folded`]: sidebarType === 'folded' && isSidebarClosed
354
405
  }, className),
355
406
  ...props,
@@ -362,15 +413,21 @@ class Layout extends Component {
362
413
  children: [this.renderSidebar({
363
414
  sidebar
364
415
  }), /*#__PURE__*/_jsxs("div", {
365
- className: `${baseClassName}__content`,
366
- children: [this.renderContentAddon({
367
- contentAddon
368
- }), this.renderContentHeader({
369
- contentHeader
370
- }), this.renderMainContent({
371
- children
372
- }), this.renderFooter({
373
- footer
416
+ className: `${baseClassName}__content-wrapper`,
417
+ children: [/*#__PURE__*/_jsxs("div", {
418
+ className: `${baseClassName}__content`,
419
+ children: [this.renderContentAddon({
420
+ contentAddon
421
+ }), this.renderContentHeader({
422
+ contentHeader
423
+ }), this.renderMainContent({
424
+ children
425
+ }), this.renderFooter({
426
+ footer
427
+ })]
428
+ }), this.renderRightSidebar({
429
+ rightSidebar,
430
+ rightSidebarVisible
374
431
  })]
375
432
  })]
376
433
  })]
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
2
2
  import svg4everybody from 'svg4everybody';
3
- const version = "3.45.1";
3
+ const version = "3.46.0";
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.45.1",
3
+ "version": "3.46.0",
4
4
  "description": "Plesk UI Library",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",