@plesk/ui-library 3.46.0 → 3.46.1

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 (29) 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/Markdown/Markdown.js +2 -1
  6. package/cjs/index.js +1 -1
  7. package/dist/plesk-ui-library-rtl.css +1 -1
  8. package/dist/plesk-ui-library-rtl.css.map +1 -1
  9. package/dist/plesk-ui-library.css +1 -1
  10. package/dist/plesk-ui-library.css.map +1 -1
  11. package/dist/plesk-ui-library.js +21 -9
  12. package/dist/plesk-ui-library.js.map +1 -1
  13. package/dist/plesk-ui-library.min.js +5 -5
  14. package/dist/plesk-ui-library.min.js.map +1 -1
  15. package/esm/components/FormFieldPassword/FormFieldPassword.js +0 -1
  16. package/esm/components/FormFieldPassword/PasswordMeter.js +6 -1
  17. package/esm/components/FormFieldPassword/index.js +2 -1
  18. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
  19. package/esm/components/Markdown/Markdown.js +2 -1
  20. package/esm/index.js +1 -1
  21. package/package.json +2 -2
  22. package/styleguide/build/bundle.19f0a6f2.js +2 -0
  23. package/styleguide/index.html +2 -2
  24. package/types/components/FormFieldPassword/FormFieldPassword.d.ts +1 -17
  25. package/types/components/FormFieldPassword/PasswordMeter.d.ts +3 -1
  26. package/types/components/FormFieldPassword/index.d.ts +1 -0
  27. package/types/components/Markdown/Markdown.d.ts +7 -1
  28. package/styleguide/build/bundle.1db50e1a.js +0 -2
  29. /package/styleguide/build/{bundle.1db50e1a.js.LICENSE.txt → bundle.19f0a6f2.js.LICENSE.txt} +0 -0
@@ -244,5 +244,4 @@ const FormFieldPasswordWrapper = props => {
244
244
  translate: translate
245
245
  });
246
246
  };
247
- FormFieldPasswordWrapper.defaultProps = FormFieldPassword.defaultProps;
248
247
  var _default = exports.default = FormFieldPasswordWrapper;
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.setDefaultPasswordEstimateFunction = exports.default = void 0;
8
8
  var _react = require("react");
9
9
  var _Popover = _interopRequireDefault(require("../Popover"));
10
10
  var _Translate = require("../Translate");
@@ -13,6 +13,11 @@ var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
14
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
15
15
 
16
+ let defaultEstimateFunction = null;
17
+ const setDefaultPasswordEstimateFunction = fn => {
18
+ defaultEstimateFunction = fn;
19
+ };
20
+ exports.setDefaultPasswordEstimateFunction = setDefaultPasswordEstimateFunction;
16
21
  const strengthIntents = {
17
22
  VeryWeak: 'danger',
18
23
  Weak: 'danger',
@@ -32,7 +37,8 @@ const PasswordMeter = ({
32
37
  if (!visible) {
33
38
  return;
34
39
  }
35
- Promise.resolve(onEstimate ? onEstimate(value, _estimatePassword.default, _estimatePassword.DEFAULT_RULES) : (0, _estimatePassword.default)(value)).then(result => {
40
+ const estimateFunction = onEstimate ?? defaultEstimateFunction;
41
+ Promise.resolve(estimateFunction ? estimateFunction(value, _estimatePassword.default, _estimatePassword.DEFAULT_RULES) : (0, _estimatePassword.default)(value)).then(result => {
36
42
  setResult(result);
37
43
  });
38
44
  }, [visible, value, onEstimate]);
@@ -16,5 +16,12 @@ Object.defineProperty(exports, "generatePassword", {
16
16
  return _generatePassword.default;
17
17
  }
18
18
  });
19
+ Object.defineProperty(exports, "setDefaultPasswordEstimateFunction", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _PasswordMeter.setDefaultPasswordEstimateFunction;
23
+ }
24
+ });
19
25
  var _FormFieldPassword = _interopRequireDefault(require("./FormFieldPassword"));
20
- var _generatePassword = _interopRequireDefault(require("./generatePassword"));
26
+ var _generatePassword = _interopRequireDefault(require("./generatePassword"));
27
+ var _PasswordMeter = require("./PasswordMeter");
@@ -24,7 +24,6 @@ const FormFieldRadioButtons = ({
24
24
  className,
25
25
  options,
26
26
  autoFocus,
27
- label,
28
27
  ...props
29
28
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormField.default, {
30
29
  className: (0, _classnames.default)(baseClassName, className),
@@ -41,9 +40,9 @@ const FormFieldRadioButtons = ({
41
40
  "aria-invalid": !!Object.keys(getErrors() ?? {}).length,
42
41
  "aria-describedby": getDescriptionLabelId(),
43
42
  className: `${baseClassName}__fieldset`,
44
- children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
43
+ children: [props.label && /*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
45
44
  className: `${baseClassName}__legend`,
46
- children: label
45
+ children: props.label
47
46
  }), options.map(({
48
47
  value,
49
48
  label,
@@ -22,13 +22,14 @@ const Markdown = ({
22
22
  className,
23
23
  compact = false,
24
24
  children,
25
+ parserOptions,
25
26
  ...props
26
27
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
27
28
  className: (0, _classnames.default)(baseClassName, {
28
29
  [`${baseClassName}--compact`]: compact
29
30
  }, className),
30
31
  dangerouslySetInnerHTML: {
31
- __html: (0, _marked.marked)(children)
32
+ __html: (0, _marked.marked)(children, parserOptions)
32
33
  },
33
34
  ...props
34
35
  });
package/cjs/index.js CHANGED
@@ -46,5 +46,5 @@ Object.keys(_components).forEach(function (key) {
46
46
  });
47
47
  });
48
48
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
49
- const version = exports.version = "3.46.0";
49
+ const version = exports.version = "3.46.1";
50
50
  (0, _svg4everybody.default)();