@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.
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +1 -0
- package/cjs/components/Layout/Layout.js +66 -9
- 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 +68 -10
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +3 -3
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/FormFieldPassword/FormFieldPassword.js +1 -0
- package/esm/components/Layout/Layout.js +66 -9
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/{bundle.a9dbfec3.js → bundle.1db50e1a.js} +2 -2
- package/styleguide/index.html +2 -2
- package/types/components/FormFieldPassword/FormFieldPassword.d.ts +17 -1
- package/types/components/FormFieldPassword/PasswordMeter.d.ts +1 -1
- package/types/components/Layout/Layout.d.ts +10 -0
- /package/styleguide/build/{bundle.a9dbfec3.js.LICENSE.txt → bundle.1db50e1a.js.LICENSE.txt} +0 -0
package/dist/plesk-ui-library.js
CHANGED
|
@@ -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.
|
|
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"}');
|
|
61325
61325
|
|
|
61326
61326
|
/***/ }),
|
|
61327
61327
|
|
|
@@ -69104,6 +69104,7 @@ const FormFieldPasswordWrapper = props => {
|
|
|
69104
69104
|
translate: translate
|
|
69105
69105
|
});
|
|
69106
69106
|
};
|
|
69107
|
+
FormFieldPasswordWrapper.defaultProps = FormFieldPassword.defaultProps;
|
|
69107
69108
|
var _default = exports["default"] = FormFieldPasswordWrapper;
|
|
69108
69109
|
|
|
69109
69110
|
/***/ }),
|
|
@@ -72047,6 +72048,7 @@ var _LocaleProvider = __webpack_require__(/*! ../LocaleProvider */ "./components
|
|
|
72047
72048
|
var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
|
|
72048
72049
|
__webpack_require__(/*! ../../helpers/base.less */ "./helpers/base.less");
|
|
72049
72050
|
__webpack_require__(/*! ./Layout.less */ "./components/Layout/Layout.less");
|
|
72051
|
+
var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
|
|
72050
72052
|
var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
|
|
72051
72053
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
72052
72054
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -72165,6 +72167,17 @@ class Layout extends _react.Component {
|
|
|
72165
72167
|
this.unsubscribeMatchMedia = subscribeMatchMedia('(max-width: 1022px)', this.handleMatchMedia);
|
|
72166
72168
|
this.unsubscribeClickOutside = subscribeClickOutside([this.sidebarRef, this.responsiveSidebarTogglerRef], this.handleClickOutside);
|
|
72167
72169
|
}
|
|
72170
|
+
componentDidUpdate(prevProps) {
|
|
72171
|
+
const isRightSidebarOpen = this.props.rightSidebar && this.props.rightSidebarVisible;
|
|
72172
|
+
const wasRightSidebarOpen = prevProps.rightSidebar && prevProps.rightSidebarVisible;
|
|
72173
|
+
const isMobile = window.matchMedia('(max-width: 780px)').matches;
|
|
72174
|
+
if (!wasRightSidebarOpen && isRightSidebarOpen && isMobile) {
|
|
72175
|
+
(0, _utils.disableDocumentScroll)();
|
|
72176
|
+
}
|
|
72177
|
+
if (wasRightSidebarOpen && !isRightSidebarOpen) {
|
|
72178
|
+
(0, _utils.enableDocumentScroll)();
|
|
72179
|
+
}
|
|
72180
|
+
}
|
|
72168
72181
|
componentWillUnmount() {
|
|
72169
72182
|
this.unsubscribeMatchMedia?.();
|
|
72170
72183
|
this.unsubscribeClickOutside?.();
|
|
@@ -72323,6 +72336,42 @@ class Layout extends _react.Component {
|
|
|
72323
72336
|
})
|
|
72324
72337
|
});
|
|
72325
72338
|
}
|
|
72339
|
+
renderRightSidebar({
|
|
72340
|
+
rightSidebar,
|
|
72341
|
+
rightSidebarVisible
|
|
72342
|
+
}) {
|
|
72343
|
+
if (!rightSidebar) {
|
|
72344
|
+
return null;
|
|
72345
|
+
}
|
|
72346
|
+
const {
|
|
72347
|
+
baseClassName
|
|
72348
|
+
} = this.props;
|
|
72349
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
72350
|
+
in: !rightSidebarVisible,
|
|
72351
|
+
timeout: 300,
|
|
72352
|
+
classNames: {
|
|
72353
|
+
enter: `${baseClassName}__right-sidebar--enter`,
|
|
72354
|
+
enterActive: `${baseClassName}__right-sidebar--active-enter`,
|
|
72355
|
+
enterDone: `${baseClassName}__right-sidebar--on`,
|
|
72356
|
+
exit: `${baseClassName}__right-sidebar--exit`,
|
|
72357
|
+
exitActive: `${baseClassName}__right-sidebar--active-exit`,
|
|
72358
|
+
exitDone: `${baseClassName}__right-sidebar--off`
|
|
72359
|
+
},
|
|
72360
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
|
|
72361
|
+
className: `${baseClassName}__right-sidebar`,
|
|
72362
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72363
|
+
className: `${baseClassName}__right-sidebar-inner`,
|
|
72364
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72365
|
+
className: `${baseClassName}__right-sidebar-content`,
|
|
72366
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72367
|
+
className: `${baseClassName}__right-sidebar-content-inner`,
|
|
72368
|
+
children: rightSidebar
|
|
72369
|
+
})
|
|
72370
|
+
})
|
|
72371
|
+
})
|
|
72372
|
+
})
|
|
72373
|
+
});
|
|
72374
|
+
}
|
|
72326
72375
|
renderMainContent({
|
|
72327
72376
|
children
|
|
72328
72377
|
}) {
|
|
@@ -72367,6 +72416,8 @@ class Layout extends _react.Component {
|
|
|
72367
72416
|
sidebarType,
|
|
72368
72417
|
sidebarCollapsible,
|
|
72369
72418
|
sidebarCollapsed,
|
|
72419
|
+
rightSidebar,
|
|
72420
|
+
rightSidebarVisible,
|
|
72370
72421
|
translate,
|
|
72371
72422
|
onSidebarToggle,
|
|
72372
72423
|
contentAddon,
|
|
@@ -72394,6 +72445,7 @@ class Layout extends _react.Component {
|
|
|
72394
72445
|
[`${baseClassName}--sidebar`]: sidebar,
|
|
72395
72446
|
[`${baseClassName}--sidebar-type-${sidebarType}`]: sidebarType && sidebar,
|
|
72396
72447
|
[`${baseClassName}--sidebar-collapsed`]: sidebarType === 'collapsed' && isSidebarClosed,
|
|
72448
|
+
[`${baseClassName}--right-sidebar-collapsed`]: !rightSidebar || !rightSidebarVisible,
|
|
72397
72449
|
[`${baseClassName}--sidebar-folded`]: sidebarType === 'folded' && isSidebarClosed
|
|
72398
72450
|
}, className),
|
|
72399
72451
|
...props,
|
|
@@ -72406,15 +72458,21 @@ class Layout extends _react.Component {
|
|
|
72406
72458
|
children: [this.renderSidebar({
|
|
72407
72459
|
sidebar
|
|
72408
72460
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72409
|
-
className: `${baseClassName}__content`,
|
|
72410
|
-
children: [
|
|
72411
|
-
|
|
72412
|
-
|
|
72413
|
-
|
|
72414
|
-
|
|
72415
|
-
|
|
72416
|
-
|
|
72417
|
-
|
|
72461
|
+
className: `${baseClassName}__content-wrapper`,
|
|
72462
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72463
|
+
className: `${baseClassName}__content`,
|
|
72464
|
+
children: [this.renderContentAddon({
|
|
72465
|
+
contentAddon
|
|
72466
|
+
}), this.renderContentHeader({
|
|
72467
|
+
contentHeader
|
|
72468
|
+
}), this.renderMainContent({
|
|
72469
|
+
children
|
|
72470
|
+
}), this.renderFooter({
|
|
72471
|
+
footer
|
|
72472
|
+
})]
|
|
72473
|
+
}), this.renderRightSidebar({
|
|
72474
|
+
rightSidebar,
|
|
72475
|
+
rightSidebarVisible
|
|
72418
72476
|
})]
|
|
72419
72477
|
})]
|
|
72420
72478
|
})]
|