@plesk/ui-library 3.46.0 → 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.
Files changed (31) hide show
  1. package/cjs/components/FormFieldPassword/FormFieldPassword.js +0 -1
  2. package/cjs/components/FormFieldPassword/PasswordMeter.js +8 -2
  3. package/cjs/components/FormFieldPassword/index.js +8 -1
  4. package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
  5. package/cjs/components/Layout/Layout.js +17 -7
  6. package/cjs/components/Markdown/Markdown.js +2 -1
  7. package/cjs/index.js +1 -1
  8. package/dist/plesk-ui-library-rtl.css +1 -1
  9. package/dist/plesk-ui-library-rtl.css.map +1 -1
  10. package/dist/plesk-ui-library.css +1 -1
  11. package/dist/plesk-ui-library.css.map +1 -1
  12. package/dist/plesk-ui-library.js +38 -16
  13. package/dist/plesk-ui-library.js.map +1 -1
  14. package/dist/plesk-ui-library.min.js +5 -5
  15. package/dist/plesk-ui-library.min.js.map +1 -1
  16. package/esm/components/FormFieldPassword/FormFieldPassword.js +0 -1
  17. package/esm/components/FormFieldPassword/PasswordMeter.js +6 -1
  18. package/esm/components/FormFieldPassword/index.js +2 -1
  19. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
  20. package/esm/components/Layout/Layout.js +17 -7
  21. package/esm/components/Markdown/Markdown.js +2 -1
  22. package/esm/index.js +1 -1
  23. package/package.json +2 -2
  24. package/styleguide/build/bundle.1a395777.js +2 -0
  25. package/styleguide/index.html +2 -2
  26. package/types/components/FormFieldPassword/FormFieldPassword.d.ts +1 -17
  27. package/types/components/FormFieldPassword/PasswordMeter.d.ts +3 -1
  28. package/types/components/FormFieldPassword/index.d.ts +1 -0
  29. package/types/components/Markdown/Markdown.d.ts +7 -1
  30. package/styleguide/build/bundle.1db50e1a.js +0 -2
  31. /package/styleguide/build/{bundle.1db50e1a.js.LICENSE.txt → bundle.1a395777.js.LICENSE.txt} +0 -0
@@ -7,7 +7,7 @@
7
7
  exports["PleskUiLibrary"] = factory(require("react"), require("react-dom"));
8
8
  else
9
9
  root["PleskUiLibrary"] = factory(root["React"], root["ReactDOM"]);
10
- })(self, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) => {
10
+ })(globalThis, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -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.0","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.2","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
 
@@ -69104,7 +69104,6 @@ const FormFieldPasswordWrapper = props => {
69104
69104
  translate: translate
69105
69105
  });
69106
69106
  };
69107
- FormFieldPasswordWrapper.defaultProps = FormFieldPassword.defaultProps;
69108
69107
  var _default = exports["default"] = FormFieldPasswordWrapper;
69109
69108
 
69110
69109
  /***/ }),
@@ -69121,7 +69120,7 @@ var _default = exports["default"] = FormFieldPasswordWrapper;
69121
69120
  Object.defineProperty(exports, "__esModule", ({
69122
69121
  value: true
69123
69122
  }));
69124
- exports["default"] = void 0;
69123
+ exports.setDefaultPasswordEstimateFunction = exports["default"] = void 0;
69125
69124
  var _react = __webpack_require__(/*! react */ "react");
69126
69125
  var _Popover = _interopRequireDefault(__webpack_require__(/*! ../Popover */ "./components/Popover/index.tsx"));
69127
69126
  var _Translate = __webpack_require__(/*! ../Translate */ "./components/Translate/index.tsx");
@@ -69131,6 +69130,11 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
69131
69130
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
69132
69131
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
69133
69132
 
69133
+ let defaultEstimateFunction = null;
69134
+ const setDefaultPasswordEstimateFunction = fn => {
69135
+ defaultEstimateFunction = fn;
69136
+ };
69137
+ exports.setDefaultPasswordEstimateFunction = setDefaultPasswordEstimateFunction;
69134
69138
  const strengthIntents = {
69135
69139
  VeryWeak: 'danger',
69136
69140
  Weak: 'danger',
@@ -69150,7 +69154,8 @@ const PasswordMeter = ({
69150
69154
  if (!visible) {
69151
69155
  return;
69152
69156
  }
69153
- Promise.resolve(onEstimate ? onEstimate(value, _estimatePassword.default, _estimatePassword.DEFAULT_RULES) : (0, _estimatePassword.default)(value)).then(result => {
69157
+ const estimateFunction = onEstimate ?? defaultEstimateFunction;
69158
+ Promise.resolve(estimateFunction ? estimateFunction(value, _estimatePassword.default, _estimatePassword.DEFAULT_RULES) : (0, _estimatePassword.default)(value)).then(result => {
69154
69159
  setResult(result);
69155
69160
  });
69156
69161
  }, [visible, value, onEstimate]);
@@ -69414,8 +69419,15 @@ Object.defineProperty(exports, "generatePassword", ({
69414
69419
  return _generatePassword.default;
69415
69420
  }
69416
69421
  }));
69422
+ Object.defineProperty(exports, "setDefaultPasswordEstimateFunction", ({
69423
+ enumerable: true,
69424
+ get: function () {
69425
+ return _PasswordMeter.setDefaultPasswordEstimateFunction;
69426
+ }
69427
+ }));
69417
69428
  var _FormFieldPassword = _interopRequireDefault(__webpack_require__(/*! ./FormFieldPassword */ "./components/FormFieldPassword/FormFieldPassword.tsx"));
69418
69429
  var _generatePassword = _interopRequireDefault(__webpack_require__(/*! ./generatePassword */ "./components/FormFieldPassword/generatePassword.tsx"));
69430
+ var _PasswordMeter = __webpack_require__(/*! ./PasswordMeter */ "./components/FormFieldPassword/PasswordMeter.tsx");
69419
69431
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
69420
69432
 
69421
69433
  /***/ }),
@@ -69467,7 +69479,6 @@ const FormFieldRadioButtons = ({
69467
69479
  className,
69468
69480
  options,
69469
69481
  autoFocus,
69470
- label,
69471
69482
  ...props
69472
69483
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormField.default, {
69473
69484
  className: (0, _classnames.default)(baseClassName, className),
@@ -69484,9 +69495,9 @@ const FormFieldRadioButtons = ({
69484
69495
  "aria-invalid": !!Object.keys(getErrors() ?? {}).length,
69485
69496
  "aria-describedby": getDescriptionLabelId(),
69486
69497
  className: `${baseClassName}__fieldset`,
69487
- children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
69498
+ children: [props.label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
69488
69499
  className: `${baseClassName}__legend`,
69489
- children: label
69500
+ children: props.label
69490
69501
  }), options.map(({
69491
69502
  value,
69492
69503
  label,
@@ -72092,6 +72103,7 @@ class Layout extends _react.Component {
72092
72103
  });
72093
72104
  _defineProperty(this, "headerRef", /*#__PURE__*/(0, _react.createRef)());
72094
72105
  _defineProperty(this, "sidebarRef", /*#__PURE__*/(0, _react.createRef)());
72106
+ _defineProperty(this, "rightSidebarRef", /*#__PURE__*/(0, _react.createRef)());
72095
72107
  _defineProperty(this, "responsiveSidebarTogglerRef", /*#__PURE__*/(0, _react.createRef)());
72096
72108
  _defineProperty(this, "unsubscribeMatchMedia", void 0);
72097
72109
  _defineProperty(this, "unsubscribeClickOutside", void 0);
@@ -72346,6 +72358,8 @@ class Layout extends _react.Component {
72346
72358
  const {
72347
72359
  baseClassName
72348
72360
  } = this.props;
72361
+ const isMobile = window.matchMedia('(max-width: 768px)').matches;
72362
+ const sidebarOffsetTop = this.headerRef.current?.getBoundingClientRect().height || 0;
72349
72363
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
72350
72364
  in: !rightSidebarVisible,
72351
72365
  timeout: 300,
@@ -72358,7 +72372,14 @@ class Layout extends _react.Component {
72358
72372
  exitDone: `${baseClassName}__right-sidebar--off`
72359
72373
  },
72360
72374
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
72361
- 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
+ },
72362
72383
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72363
72384
  className: `${baseClassName}__right-sidebar-inner`,
72364
72385
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -72457,9 +72478,9 @@ class Layout extends _react.Component {
72457
72478
  className: `${baseClassName}__container`,
72458
72479
  children: [this.renderSidebar({
72459
72480
  sidebar
72460
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72481
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72461
72482
  className: `${baseClassName}__content-wrapper`,
72462
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72483
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
72463
72484
  className: `${baseClassName}__content`,
72464
72485
  children: [this.renderContentAddon({
72465
72486
  contentAddon
@@ -72470,10 +72491,10 @@ class Layout extends _react.Component {
72470
72491
  }), this.renderFooter({
72471
72492
  footer
72472
72493
  })]
72473
- }), this.renderRightSidebar({
72474
- rightSidebar,
72475
- rightSidebarVisible
72476
- })]
72494
+ })
72495
+ }), this.renderRightSidebar({
72496
+ rightSidebar,
72497
+ rightSidebarVisible
72477
72498
  })]
72478
72499
  })]
72479
72500
  })
@@ -74927,13 +74948,14 @@ const Markdown = ({
74927
74948
  className,
74928
74949
  compact = false,
74929
74950
  children,
74951
+ parserOptions,
74930
74952
  ...props
74931
74953
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
74932
74954
  className: (0, _classnames.default)(baseClassName, {
74933
74955
  [`${baseClassName}--compact`]: compact
74934
74956
  }, className),
74935
74957
  dangerouslySetInnerHTML: {
74936
- __html: (0, _marked.marked)(children)
74958
+ __html: (0, _marked.marked)(children, parserOptions)
74937
74959
  },
74938
74960
  ...props
74939
74961
  });