@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.
@@ -61321,7 +61321,7 @@ function useFocusVisible() {
61321
61321
  /***/ ((module) => {
61322
61322
 
61323
61323
  "use strict";
61324
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.46.1","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style && yarn format:check","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"{src,styleguidist}/**/*.(less|css)\\"","format:check":"prettier --check src styleguidist","format":"prettier --write src styleguidist","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"rimraf ./styleguide && styleguidist build --config ./configs/styleguide.config.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --allowed-hosts all","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.27.6","@floating-ui/react-dom":"^2.1.3","@plesk/react-movable":"^2.7.1","classnames":"^2.5.1","codemirror":"5.65.20","marked":"15.0.12","memoize-one":"^6.0.0","popper.js":"1.16.1","prop-types":"^15.8.1","react-measure":"2.5.2","react-sortable-hoc":"2.0.0","react-transition-group":"^4.4.5","scroll-into-view-if-needed":"^3.1.0","svg4everybody":"2.1.9","use-focus-visible":"^1.0.2"},"devDependencies":{"@babel/core":"^7.27.7","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.27.4","@babel/preset-env":"^7.27.2","@babel/preset-react":"^7.27.1","@babel/preset-typescript":"^7.27.1","@babel/types":"^7.27.7","@csstools/postcss-logical-float-and-clear":"^3.0.0","@plesk/eslint-config":"^4.0.0","@plesk/stylelint-config":"^3.0.1","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.3.0","@testing-library/user-event":"^14.6.1","@types/buble":"^0.20.5","@types/classnames":"2.3.4","@types/codemirror":"^5.60.16","@types/doctrine":"^0.0.9","@types/jest":"^30.0.0","@types/jest-image-snapshot":"^6.4.0","@types/marked":"^6.0.0","@types/node":"^24.0.7","@types/react":"^18.3.8","@types/react-dom":"^18.3.0","@types/react-measure":"2.0.12","@types/react-transition-group":"^4.4.12","@types/svg4everybody":"2.1.5","@types/webpack-env":"^1.18.8","autoprefixer":"^10.4.21","babel-loader":"^10.0.0","babel-plugin-transform-require-ignore":"^0.1.1","cross-env":"^10.0.0","css-loader":"^7.1.2","css-minimizer-webpack-plugin":"^7.0.2","eslint":"^9.30.0","eslint-config-prettier":"^10.1.5","eslint-plugin-markdown":"^5.1.0","html-webpack-plugin":"^5.6.3","jest":"^30.0.3","jest-dev-server":"^11.0.0","jest-environment-jsdom":"^30.0.2","jest-image-snapshot":"^6.5.1","less":"^4.3.0","less-loader":"^12.3.0","mini-css-extract-plugin":"^2.9.2","postcss":"^8.5.6","postcss-less":"^6.0.0","postcss-loader":"^8.1.1","postcss-logical":"^8.1.0","prettier":"^3.6.2","puppeteer-core":"22.15.0","react":"^18.3.1","react-docgen-typescript":"^2.4.0","react-dom":"^18.3.1","react-styleguidist":"^13.1.4","rimraf":"^6.0.1","rtlcss":"^4.3.0","style-loader":"^4.0.0","stylelint":"^16.21.0","stylelint-declaration-block-no-ignored-properties":"^2.8.0","stylelint-no-unsupported-browser-features":"^8.0.4","stylelint-prettier":"^5.0.3","stylelint-use-logical-spec":"^5.0.1","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.14","typescript":"5.9.3","typescript-eslint":"^8.35.0","webpack":"^5.99.9","webpack-cli":"^6.0.1"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"browserslist":["defaults","not op_mini all","not kaios > 0"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
61324
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.46.2","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style && yarn format:check","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"{src,styleguidist}/**/*.(less|css)\\"","format:check":"prettier --check src styleguidist","format":"prettier --write src styleguidist","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"rimraf ./styleguide && styleguidist build --config ./configs/styleguide.config.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --allowed-hosts all","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.27.6","@floating-ui/react-dom":"^2.1.3","@plesk/react-movable":"^2.7.1","classnames":"^2.5.1","codemirror":"5.65.20","marked":"15.0.12","memoize-one":"^6.0.0","popper.js":"1.16.1","prop-types":"^15.8.1","react-measure":"2.5.2","react-sortable-hoc":"2.0.0","react-transition-group":"^4.4.5","scroll-into-view-if-needed":"^3.1.0","svg4everybody":"2.1.9","use-focus-visible":"^1.0.2"},"devDependencies":{"@babel/core":"^7.27.7","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.27.4","@babel/preset-env":"^7.27.2","@babel/preset-react":"^7.27.1","@babel/preset-typescript":"^7.27.1","@babel/types":"^7.27.7","@csstools/postcss-logical-float-and-clear":"^3.0.0","@plesk/eslint-config":"^4.0.0","@plesk/stylelint-config":"^3.0.1","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.3.0","@testing-library/user-event":"^14.6.1","@types/buble":"^0.20.5","@types/classnames":"2.3.4","@types/codemirror":"^5.60.16","@types/doctrine":"^0.0.9","@types/jest":"^30.0.0","@types/jest-image-snapshot":"^6.4.0","@types/marked":"^6.0.0","@types/node":"^24.0.7","@types/react":"^18.3.8","@types/react-dom":"^18.3.0","@types/react-measure":"2.0.12","@types/react-transition-group":"^4.4.12","@types/svg4everybody":"2.1.5","@types/webpack-env":"^1.18.8","autoprefixer":"^10.4.21","babel-loader":"^10.0.0","babel-plugin-transform-require-ignore":"^0.1.1","cross-env":"^10.0.0","css-loader":"^7.1.2","css-minimizer-webpack-plugin":"^7.0.2","eslint":"^9.30.0","eslint-config-prettier":"^10.1.5","eslint-plugin-markdown":"^5.1.0","html-webpack-plugin":"^5.6.3","jest":"^30.0.3","jest-dev-server":"^11.0.0","jest-environment-jsdom":"^30.0.2","jest-image-snapshot":"^6.5.1","less":"^4.3.0","less-loader":"^12.3.0","mini-css-extract-plugin":"^2.9.2","postcss":"^8.5.6","postcss-less":"^6.0.0","postcss-loader":"^8.1.1","postcss-logical":"^8.1.0","prettier":"^3.6.2","puppeteer-core":"22.15.0","react":"^18.3.1","react-docgen-typescript":"^2.4.0","react-dom":"^18.3.1","react-styleguidist":"^13.1.4","rimraf":"^6.0.1","rtlcss":"^4.3.0","style-loader":"^4.0.0","stylelint":"^16.21.0","stylelint-declaration-block-no-ignored-properties":"^2.8.0","stylelint-no-unsupported-browser-features":"^8.0.4","stylelint-prettier":"^5.0.3","stylelint-use-logical-spec":"^5.0.1","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.14","typescript":"5.9.3","typescript-eslint":"^8.35.0","webpack":"^5.99.9","webpack-cli":"^6.0.1"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"browserslist":["defaults","not op_mini all","not kaios > 0"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
61325
61325
 
61326
61326
  /***/ }),
61327
61327
 
@@ -72103,6 +72103,7 @@ class Layout extends _react.Component {
72103
72103
  });
72104
72104
  _defineProperty(this, "headerRef", /*#__PURE__*/(0, _react.createRef)());
72105
72105
  _defineProperty(this, "sidebarRef", /*#__PURE__*/(0, _react.createRef)());
72106
+ _defineProperty(this, "rightSidebarRef", /*#__PURE__*/(0, _react.createRef)());
72106
72107
  _defineProperty(this, "responsiveSidebarTogglerRef", /*#__PURE__*/(0, _react.createRef)());
72107
72108
  _defineProperty(this, "unsubscribeMatchMedia", void 0);
72108
72109
  _defineProperty(this, "unsubscribeClickOutside", void 0);
@@ -72357,6 +72358,8 @@ class Layout extends _react.Component {
72357
72358
  const {
72358
72359
  baseClassName
72359
72360
  } = this.props;
72361
+ const isMobile = window.matchMedia('(max-width: 768px)').matches;
72362
+ const sidebarOffsetTop = this.headerRef.current?.getBoundingClientRect().height || 0;
72360
72363
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
72361
72364
  in: !rightSidebarVisible,
72362
72365
  timeout: 300,
@@ -72369,7 +72372,14 @@ class Layout extends _react.Component {
72369
72372
  exitDone: `${baseClassName}__right-sidebar--off`
72370
72373
  },
72371
72374
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
72372
- className: `${baseClassName}__right-sidebar`,
72375
+ ref: this.rightSidebarRef,
72376
+ className: (0, _classnames.default)(`${baseClassName}__right-sidebar`, {
72377
+ [`${baseClassName}__right-sidebar--on`]: rightSidebarVisible,
72378
+ [`${baseClassName}__right-sidebar--off`]: !rightSidebarVisible
72379
+ }),
72380
+ style: {
72381
+ height: isMobile ? '100vh' : `calc(100vh - ${sidebarOffsetTop}px)`
72382
+ },
72373
72383
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72374
72384
  className: `${baseClassName}__right-sidebar-inner`,
72375
72385
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -72468,9 +72478,9 @@ class Layout extends _react.Component {
72468
72478
  className: `${baseClassName}__container`,
72469
72479
  children: [this.renderSidebar({
72470
72480
  sidebar
72471
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72481
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72472
72482
  className: `${baseClassName}__content-wrapper`,
72473
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72483
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72474
72484
  className: `${baseClassName}__content`,
72475
72485
  children: [this.renderContentAddon({
72476
72486
  contentAddon
@@ -72481,10 +72491,10 @@ class Layout extends _react.Component {
72481
72491
  }), this.renderFooter({
72482
72492
  footer
72483
72493
  })]
72484
- }), this.renderRightSidebar({
72485
- rightSidebar,
72486
- rightSidebarVisible
72487
- })]
72494
+ })
72495
+ }), this.renderRightSidebar({
72496
+ rightSidebar,
72497
+ rightSidebarVisible
72488
72498
  })]
72489
72499
  })]
72490
72500
  })