@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.
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +0 -1
- package/cjs/components/FormFieldPassword/PasswordMeter.js +8 -2
- package/cjs/components/FormFieldPassword/index.js +8 -1
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
- package/cjs/components/Markdown/Markdown.js +2 -1
- 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 +21 -9
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +5 -5
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/FormFieldPassword/FormFieldPassword.js +0 -1
- package/esm/components/FormFieldPassword/PasswordMeter.js +6 -1
- package/esm/components/FormFieldPassword/index.js +2 -1
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +2 -3
- package/esm/components/Markdown/Markdown.js +2 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/styleguide/build/bundle.19f0a6f2.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/components/FormFieldPassword/FormFieldPassword.d.ts +1 -17
- package/types/components/FormFieldPassword/PasswordMeter.d.ts +3 -1
- package/types/components/FormFieldPassword/index.d.ts +1 -0
- package/types/components/Markdown/Markdown.d.ts +7 -1
- package/styleguide/build/bundle.1db50e1a.js +0 -2
- /package/styleguide/build/{bundle.1db50e1a.js.LICENSE.txt → bundle.19f0a6f2.js.LICENSE.txt} +0 -0
|
@@ -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
|
-
|
|
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,
|
|
@@ -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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plesk/ui-library",
|
|
3
|
-
"version": "3.46.
|
|
3
|
+
"version": "3.46.1",
|
|
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.
|
|
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"
|