@plesk/ui-library 3.34.0 → 3.34.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.
- package/cjs/components/Button/Button.js +17 -100
- package/cjs/components/ContentLoader/IconsLoader.js +2 -1
- package/cjs/components/Dialog/Dialog.js +4 -113
- package/cjs/components/Drawer/Drawer.js +10 -143
- package/cjs/components/Drawer/Header.js +5 -12
- package/cjs/components/Dropdown/Dropdown.js +4 -42
- package/cjs/components/Form/Form.js +2 -1
- package/cjs/components/FormFieldPassword/PasswordMeter.js +4 -4
- package/cjs/components/Overlay/Overlay.js +4 -3
- package/cjs/components/Section/Section.js +2 -1
- package/cjs/components/Skeleton/SkeletonText.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/types/PolymorphicComponent.js +5 -0
- package/cjs/utils/types/index.js +5 -0
- 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 +128 -494
- 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/Button/Button.js +17 -98
- package/esm/components/ContentLoader/IconsLoader.js +2 -1
- package/esm/components/Dialog/Dialog.js +4 -113
- package/esm/components/Drawer/Drawer.js +10 -141
- package/esm/components/Drawer/Header.js +5 -10
- package/esm/components/Dropdown/Dropdown.js +4 -40
- package/esm/components/Form/Form.js +2 -1
- package/esm/components/FormFieldPassword/PasswordMeter.js +4 -4
- package/esm/components/Overlay/Overlay.js +4 -3
- package/esm/components/Section/Section.js +2 -1
- package/esm/components/Skeleton/SkeletonText.js +1 -1
- package/esm/index.js +1 -1
- package/esm/utils/types/PolymorphicComponent.js +1 -0
- package/esm/utils/types/index.js +1 -0
- package/package.json +24 -23
- package/styleguide/build/bundle.70f167a3.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/AutoClosable/AutoClosable.d.ts +2 -2
- package/types/src/components/Button/Button.d.ts +105 -0
- package/types/src/components/Button/index.d.ts +2 -0
- package/types/src/components/Dialog/Dialog.d.ts +126 -0
- package/types/src/components/Dialog/index.d.ts +2 -0
- package/types/src/components/Drawer/Drawer.d.ts +108 -0
- package/types/src/components/Drawer/DrawerProgress.d.ts +1 -1
- package/types/src/components/Drawer/Header.d.ts +28 -0
- package/types/src/components/Drawer/index.d.ts +2 -0
- package/types/src/components/Dropdown/Dropdown.d.ts +54 -0
- package/types/src/components/Form/Form.d.ts +11 -11
- package/types/src/components/Icon/Icon.d.ts +1 -1
- package/types/src/components/Icon/index.d.ts +1 -0
- package/types/src/components/Overlay/Overlay.d.ts +1 -1
- package/types/src/components/Overlay/index.d.ts +1 -0
- package/types/src/components/index.d.ts +3 -0
- package/types/src/utils/types/PolymorphicComponent.d.ts +11 -0
- package/types/src/utils/types/index.d.ts +1 -0
- package/styleguide/build/bundle.ad46084d.js +0 -2
- /package/styleguide/build/{bundle.ad46084d.js.LICENSE.txt → bundle.70f167a3.js.LICENSE.txt} +0 -0
|
@@ -47,19 +47,19 @@ const PasswordMeter = _ref => {
|
|
|
47
47
|
canCloseOnOutsideClick: false,
|
|
48
48
|
canCloseOnEscapePress: false,
|
|
49
49
|
...props,
|
|
50
|
-
children: [result
|
|
50
|
+
children: [result !== null && result !== void 0 && result.strength ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Translate.default, {
|
|
51
51
|
component: "div",
|
|
52
52
|
content: "FormFieldPassword.passwordStrength",
|
|
53
53
|
fallback: _enUS.default.passwordStrength,
|
|
54
54
|
params: {
|
|
55
55
|
strength: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
56
56
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Translate.default, {
|
|
57
|
-
content: `FormFieldPassword.strength${result
|
|
58
|
-
fallback: _enUS.default[`strength${result
|
|
57
|
+
content: `FormFieldPassword.strength${result === null || result === void 0 ? void 0 : result.strength}`,
|
|
58
|
+
fallback: _enUS.default[`strength${result === null || result === void 0 ? void 0 : result.strength}`]
|
|
59
59
|
})
|
|
60
60
|
})
|
|
61
61
|
}
|
|
62
|
-
}) : null, result
|
|
62
|
+
}) : null, result !== null && result !== void 0 && result.suggestions.length ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
63
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Translate.default, {
|
|
64
64
|
content: "FormFieldPassword.improvePassword",
|
|
65
65
|
fallback: _enUS.default.improvePassword
|
|
@@ -108,8 +108,8 @@ const OverlayCore = _ref => {
|
|
|
108
108
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
109
|
className: (0, _classnames.default)(baseClassName, `${baseClassName}--${placement}`, `${baseClassName}--${size}`, sideBanner && `${baseClassName}--side`, isOpen && `${baseClassName}--open`, className),
|
|
110
110
|
style: {
|
|
111
|
-
'--overlay-side-banner-background': sideBannerContainer
|
|
112
|
-
'--overlay-side-banner-align': sideBannerContainer
|
|
111
|
+
'--overlay-side-banner-background': sideBannerContainer === null || sideBannerContainer === void 0 ? void 0 : sideBannerContainer.background,
|
|
112
|
+
'--overlay-side-banner-align': sideBannerContainer === null || sideBannerContainer === void 0 ? void 0 : sideBannerContainer.align,
|
|
113
113
|
...style
|
|
114
114
|
},
|
|
115
115
|
...props,
|
|
@@ -139,10 +139,11 @@ const Overlay = _ref2 => {
|
|
|
139
139
|
const [isExist, setIsExist] = (0, _react.useState)(false);
|
|
140
140
|
const prevFocusElementRef = (0, _react.useRef)(null);
|
|
141
141
|
const handleClose = (0, _react.useCallback)(() => {
|
|
142
|
+
var _prevFocusElementRef$;
|
|
142
143
|
if (!isOpenRef.current) return;
|
|
143
144
|
isOpenRef.current = false;
|
|
144
145
|
if (--overlaysCount === 0) (0, _utils.enableDocumentScroll)();
|
|
145
|
-
prevFocusElementRef.current
|
|
146
|
+
(_prevFocusElementRef$ = prevFocusElementRef.current) === null || _prevFocusElementRef$ === void 0 ? void 0 : _prevFocusElementRef$.focus();
|
|
146
147
|
}, []);
|
|
147
148
|
(0, _react.useEffect)(() => {
|
|
148
149
|
if (isOpen) {
|
|
@@ -147,7 +147,8 @@ class Section extends _react.Component {
|
|
|
147
147
|
value: title,
|
|
148
148
|
onChange: onTitleChange,
|
|
149
149
|
onClick: e => {
|
|
150
|
-
|
|
150
|
+
var _e$target$closest$que;
|
|
151
|
+
(_e$target$closest$que = e.target.closest(`.${baseClassName}__header`).querySelector(`.${baseClassName}__control-button`)) === null || _e$target$closest$que === void 0 ? void 0 : _e$target$closest$que.click();
|
|
151
152
|
}
|
|
152
153
|
});
|
|
153
154
|
}
|
|
@@ -33,7 +33,7 @@ const SkeletonText = _ref => {
|
|
|
33
33
|
// eslint-disable-next-line react/no-array-index-key
|
|
34
34
|
, {
|
|
35
35
|
...lineProps,
|
|
36
|
-
className: (0, _classnames.default)(`${baseClassName}__line`, lineProps
|
|
36
|
+
className: (0, _classnames.default)(`${baseClassName}__line`, lineProps === null || lineProps === void 0 ? void 0 : lineProps.className)
|
|
37
37
|
}, key))
|
|
38
38
|
});
|
|
39
39
|
};
|
package/cjs/index.js
CHANGED