@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
@@ -237,5 +237,4 @@ const FormFieldPasswordWrapper = props => {
237
237
  translate: translate
238
238
  });
239
239
  };
240
- FormFieldPasswordWrapper.defaultProps = FormFieldPassword.defaultProps;
241
240
  export default FormFieldPasswordWrapper;
@@ -5,6 +5,10 @@ import Popover from '../Popover';
5
5
  import { InternalTranslate } from '../Translate';
6
6
  import estimatePassword, { DEFAULT_RULES } from './estimatePassword';
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
+ let defaultEstimateFunction = null;
9
+ export const setDefaultPasswordEstimateFunction = fn => {
10
+ defaultEstimateFunction = fn;
11
+ };
8
12
  const strengthIntents = {
9
13
  VeryWeak: 'danger',
10
14
  Weak: 'danger',
@@ -24,7 +28,8 @@ const PasswordMeter = ({
24
28
  if (!visible) {
25
29
  return;
26
30
  }
27
- Promise.resolve(onEstimate ? onEstimate(value, estimatePassword, DEFAULT_RULES) : estimatePassword(value)).then(result => {
31
+ const estimateFunction = onEstimate ?? defaultEstimateFunction;
32
+ Promise.resolve(estimateFunction ? estimateFunction(value, estimatePassword, DEFAULT_RULES) : estimatePassword(value)).then(result => {
28
33
  setResult(result);
29
34
  });
30
35
  }, [visible, value, onEstimate]);
@@ -1,4 +1,5 @@
1
1
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
2
2
 
3
3
  export { default } from './FormFieldPassword';
4
- export { default as generatePassword } from './generatePassword';
4
+ export { default as generatePassword } from './generatePassword';
5
+ export { setDefaultPasswordEstimateFunction } from './PasswordMeter';
@@ -16,7 +16,6 @@ const FormFieldRadioButtons = ({
16
16
  className,
17
17
  options,
18
18
  autoFocus,
19
- label,
20
19
  ...props
21
20
  }) => /*#__PURE__*/_jsx(FormField, {
22
21
  className: classNames(baseClassName, className),
@@ -33,9 +32,9 @@ const FormFieldRadioButtons = ({
33
32
  "aria-invalid": !!Object.keys(getErrors() ?? {}).length,
34
33
  "aria-describedby": getDescriptionLabelId(),
35
34
  className: `${baseClassName}__fieldset`,
36
- children: [label && /*#__PURE__*/_jsx("legend", {
35
+ children: [props.label && /*#__PURE__*/_jsx("legend", {
37
36
  className: `${baseClassName}__legend`,
38
- children: label
37
+ children: props.label
39
38
  }), options.map(({
40
39
  value,
41
40
  label,
@@ -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
- className: `${baseClassName}__right-sidebar`,
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__*/_jsxs("div", {
425
+ }), /*#__PURE__*/_jsx("div", {
416
426
  className: `${baseClassName}__content-wrapper`,
417
- children: [/*#__PURE__*/_jsxs("div", {
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
- }), this.renderRightSidebar({
429
- rightSidebar,
430
- rightSidebarVisible
431
- })]
438
+ })
439
+ }), this.renderRightSidebar({
440
+ rightSidebar,
441
+ rightSidebarVisible
432
442
  })]
433
443
  })]
434
444
  })
@@ -15,13 +15,14 @@ const Markdown = ({
15
15
  className,
16
16
  compact = false,
17
17
  children,
18
+ parserOptions,
18
19
  ...props
19
20
  }) => /*#__PURE__*/_jsx("div", {
20
21
  className: classNames(baseClassName, {
21
22
  [`${baseClassName}--compact`]: compact
22
23
  }, className),
23
24
  dangerouslySetInnerHTML: {
24
- __html: marked(children)
25
+ __html: marked(children, parserOptions)
25
26
  },
26
27
  ...props
27
28
  });
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.46.0";
3
+ const version = "3.46.2";
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.46.0",
3
+ "version": "3.46.2",
4
4
  "description": "Plesk UI Library",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",
@@ -126,7 +126,7 @@
126
126
  "stylelint-use-logical-spec": "^5.0.1",
127
127
  "svg-mixer": "^2.3.14",
128
128
  "terser-webpack-plugin": "^5.3.14",
129
- "typescript": "5.9.2",
129
+ "typescript": "5.9.3",
130
130
  "typescript-eslint": "^8.35.0",
131
131
  "webpack": "^5.99.9",
132
132
  "webpack-cli": "^6.0.1"