@plesk/ui-library 3.35.1 → 3.35.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 +1 -2
- package/cjs/components/Carousel/Carousel.js +25 -39
- package/cjs/components/Drawer/Header.js +71 -108
- package/cjs/components/Form/Form.js +5 -7
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -67
- package/cjs/components/Grid/Grid.js +9 -71
- package/cjs/components/GridCol/GridCol.js +3 -54
- package/cjs/components/Link/Link.js +1 -2
- package/cjs/components/List/List.js +11 -8
- package/cjs/components/ProgressDialog/ProgressDialog.js +12 -85
- package/cjs/components/Rating/Rating.js +5 -36
- package/cjs/components/Skeleton/index.js +2 -2
- package/cjs/components/SplitButton/SplitButton.js +1 -2
- package/cjs/components/SwitchesPanel/SwitchesPanel.js +3 -26
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -57
- package/cjs/components/Toaster/Toaster.js +3 -3
- package/cjs/components/index.js +14 -11
- package/cjs/index.js +1 -1
- package/cjs/tests/renderer.js +7 -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 +273 -672
- 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 +1 -2
- package/esm/components/Carousel/Carousel.js +25 -37
- package/esm/components/Drawer/Header.js +70 -107
- package/esm/components/Form/Form.js +5 -7
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -65
- package/esm/components/Grid/Grid.js +9 -69
- package/esm/components/GridCol/GridCol.js +2 -55
- package/esm/components/Link/Link.js +1 -2
- package/esm/components/List/List.js +11 -8
- package/esm/components/ProgressDialog/ProgressDialog.js +12 -83
- package/esm/components/Rating/Rating.js +5 -36
- package/esm/components/Skeleton/index.js +2 -2
- package/esm/components/SplitButton/SplitButton.js +1 -2
- package/esm/components/SwitchesPanel/SwitchesPanel.js +3 -24
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -55
- package/esm/components/Toaster/Toaster.js +3 -1
- package/esm/components/index.js +1 -2
- package/esm/index.js +1 -1
- package/esm/tests/renderer.js +7 -1
- package/package.json +16 -17
- package/styleguide/build/bundle.6318f4a5.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/src/components/Button/Button.d.ts +2 -3
- package/types/src/components/Carousel/Carousel.d.ts +58 -0
- package/types/src/components/Carousel/index.d.ts +2 -0
- package/types/src/components/Dialog/Dialog.d.ts +1 -1
- package/types/src/components/Dialog/index.d.ts +1 -1
- package/types/src/components/Drawer/Header.d.ts +4 -20
- package/types/src/components/Form/Form.d.ts +5 -0
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +53 -0
- package/types/src/components/FormFieldCheckbox/index.d.ts +2 -0
- package/types/src/components/FormFieldPassword/generatePassword.d.ts +2 -0
- package/types/src/components/Grid/Grid.d.ts +97 -0
- package/types/src/components/Grid/index.d.ts +2 -0
- package/types/src/components/GridCol/GridCol.d.ts +53 -0
- package/types/src/components/GridCol/index.d.ts +2 -0
- package/types/src/components/Link/Link.d.ts +1 -2
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +1 -1
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +125 -0
- package/types/src/components/ProgressDialog/index.d.ts +2 -0
- package/types/src/components/Rating/Rating.d.ts +27 -0
- package/types/src/components/Rating/index.d.ts +2 -0
- package/types/src/components/Skeleton/Skeleton.d.ts +3 -5
- package/types/src/components/Skeleton/SkeletonTabs.d.ts +4 -4
- package/types/src/components/Skeleton/SkeletonText.d.ts +2 -2
- package/types/src/components/Skeleton/index.d.ts +4 -1
- package/types/src/components/SplitButton/SplitButton.d.ts +1 -2
- package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +24 -0
- package/types/src/components/SwitchesPanel/index.d.ts +2 -0
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +78 -0
- package/types/src/components/SwitchesPanelItem/index.d.ts +2 -0
- package/types/src/components/index.d.ts +10 -2
- package/types/src/components/utils.d.ts +1 -1
- package/cjs/components/Alert/Alert.stories.js +0 -34
- package/cjs/components/Button/Button.stories.js +0 -109
- package/cjs/components/Cuttable/Cuttable.stories.js +0 -46
- package/cjs/components/Dialog/Dialog.stories.js +0 -49
- package/cjs/components/Drawer/Drawer.stories.js +0 -65
- package/cjs/components/Form/Form.stories.js +0 -35
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -32
- package/cjs/components/Icon/Icon.stories.js +0 -32
- package/cjs/components/ItemLink/ItemLink.stories.js +0 -20
- package/cjs/components/ItemList/ItemList.stories.js +0 -122
- package/cjs/components/List/List.stories.js +0 -152
- package/cjs/components/Markdown/Markdown.stories.js +0 -51
- package/cjs/components/Menu/Menu.stories.js +0 -77
- package/cjs/components/Popover/Popover.stories.js +0 -60
- package/cjs/components/Select/Select.stories.js +0 -57
- package/cjs/components/Skeleton/Skeleton.stories.js +0 -24
- package/cjs/components/Skeleton/SkeletonTabs.stories.js +0 -15
- package/cjs/components/Skeleton/SkeletonText.stories.js +0 -33
- package/cjs/components/Status/Status.stories.js +0 -19
- package/cjs/components/Tabs/Tabs.stories.js +0 -24
- package/dist/.DS_Store +0 -0
- package/dist/images/default.svg +0 -1
- package/dist/images/filtered.svg +0 -1
- package/esm/components/Alert/Alert.stories.js +0 -27
- package/esm/components/Button/Button.stories.js +0 -99
- package/esm/components/Cuttable/Cuttable.stories.js +0 -39
- package/esm/components/Dialog/Dialog.stories.js +0 -42
- package/esm/components/Drawer/Drawer.stories.js +0 -56
- package/esm/components/Form/Form.stories.js +0 -27
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -23
- package/esm/components/Icon/Icon.stories.js +0 -23
- package/esm/components/ItemLink/ItemLink.stories.js +0 -12
- package/esm/components/ItemList/ItemList.stories.js +0 -109
- package/esm/components/List/List.stories.js +0 -139
- package/esm/components/Markdown/Markdown.stories.js +0 -43
- package/esm/components/Menu/Menu.stories.js +0 -65
- package/esm/components/Popover/Popover.stories.js +0 -52
- package/esm/components/Select/Select.stories.js +0 -48
- package/esm/components/Skeleton/Skeleton.stories.js +0 -15
- package/esm/components/Skeleton/SkeletonTabs.stories.js +0 -7
- package/esm/components/Skeleton/SkeletonText.stories.js +0 -23
- package/esm/components/Status/Status.stories.js +0 -11
- package/esm/components/Tabs/Tabs.stories.js +0 -16
- package/styleguide/build/bundle.edc3f2a1.js +0 -2
- package/types/src/components/Alert/Alert.stories.d.ts +0 -11
- package/types/src/components/Button/Button.stories.d.ts +0 -17
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +0 -17
- package/types/src/components/Dialog/Dialog.stories.d.ts +0 -25
- package/types/src/components/Drawer/Drawer.stories.d.ts +0 -43
- package/types/src/components/Form/Form.stories.d.ts +0 -13
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -20
- package/types/src/components/Icon/Icon.stories.d.ts +0 -7
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +0 -12
- package/types/src/components/ItemList/ItemList.stories.d.ts +0 -172
- package/types/src/components/List/List.stories.d.ts +0 -30
- package/types/src/components/Markdown/Markdown.stories.d.ts +0 -10
- package/types/src/components/Menu/Menu.stories.d.ts +0 -20
- package/types/src/components/Popover/Popover.stories.d.ts +0 -25
- package/types/src/components/Select/Select.stories.d.ts +0 -12
- package/types/src/components/Skeleton/Skeleton.stories.d.ts +0 -15
- package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +0 -5
- package/types/src/components/Skeleton/SkeletonText.stories.d.ts +0 -23
- package/types/src/components/Status/Status.stories.d.ts +0 -11
- package/types/src/components/Tabs/Tabs.stories.d.ts +0 -10
- package/types/src/tests/index.d.ts +0 -1
- package/types/src/tests/renderer.d.ts +0 -23
- /package/styleguide/build/{bundle.edc3f2a1.js.LICENSE.txt → bundle.6318f4a5.js.LICENSE.txt} +0 -0
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
9
|
var _constants = require("../../constants");
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -15,9 +13,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
13
|
/**
|
|
16
14
|
* `GridCol` component is a part of [Grid](#!/Grid) component.
|
|
17
15
|
* @since 0.0.48
|
|
18
|
-
*/
|
|
16
|
+
*/
|
|
17
|
+
const GridCol = _ref => {
|
|
19
18
|
let {
|
|
20
|
-
baseClassName
|
|
19
|
+
baseClassName = `${_constants.CLS_PREFIX}grid__col`,
|
|
21
20
|
className,
|
|
22
21
|
children,
|
|
23
22
|
xs,
|
|
@@ -40,55 +39,5 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
40
39
|
children: children
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
|
-
GridCol.propTypes = {
|
|
44
|
-
/**
|
|
45
|
-
* Content of the `GridCol`.
|
|
46
|
-
* @since 0.0.48
|
|
47
|
-
*/
|
|
48
|
-
children: _propTypes.default.node,
|
|
49
|
-
/**
|
|
50
|
-
* @ignore
|
|
51
|
-
*/
|
|
52
|
-
className: _propTypes.default.string,
|
|
53
|
-
/**
|
|
54
|
-
* @ignore
|
|
55
|
-
*/
|
|
56
|
-
baseClassName: _propTypes.default.string,
|
|
57
|
-
/**
|
|
58
|
-
* Column size for `xs` breakpoint (from 1 to 12)
|
|
59
|
-
* @since 0.0.53
|
|
60
|
-
*/
|
|
61
|
-
xs: _propTypes.default.number,
|
|
62
|
-
/**
|
|
63
|
-
* Column size for `sm` breakpoint (from 1 to 12)
|
|
64
|
-
* @since 0.0.53
|
|
65
|
-
*/
|
|
66
|
-
sm: _propTypes.default.number,
|
|
67
|
-
/**
|
|
68
|
-
* Column size for `sm` breakpoint (from 1 to 12)
|
|
69
|
-
* @since 0.0.53
|
|
70
|
-
*/
|
|
71
|
-
md: _propTypes.default.number,
|
|
72
|
-
/**
|
|
73
|
-
* Column size for `md` breakpoint (from 1 to 12)
|
|
74
|
-
* @since 0.0.53
|
|
75
|
-
*/
|
|
76
|
-
lg: _propTypes.default.number,
|
|
77
|
-
/**
|
|
78
|
-
* Column size for `lg` breakpoint (from 1 to 12)
|
|
79
|
-
* @since 0.0.53
|
|
80
|
-
*/
|
|
81
|
-
xl: _propTypes.default.number
|
|
82
|
-
};
|
|
83
|
-
GridCol.defaultProps = {
|
|
84
|
-
children: null,
|
|
85
|
-
className: null,
|
|
86
|
-
baseClassName: `${_constants.CLS_PREFIX}grid__col`,
|
|
87
|
-
xs: null,
|
|
88
|
-
sm: null,
|
|
89
|
-
md: null,
|
|
90
|
-
lg: null,
|
|
91
|
-
xl: null
|
|
92
|
-
};
|
|
93
42
|
var _default = GridCol;
|
|
94
43
|
exports.default = _default;
|
|
@@ -298,7 +298,9 @@ class List extends _react.Component {
|
|
|
298
298
|
data,
|
|
299
299
|
pagination,
|
|
300
300
|
vertical,
|
|
301
|
-
rowKey
|
|
301
|
+
rowKey,
|
|
302
|
+
totalRows,
|
|
303
|
+
filtered
|
|
302
304
|
} = _ref5;
|
|
303
305
|
let {
|
|
304
306
|
prevSortColumn,
|
|
@@ -317,16 +319,17 @@ class List extends _react.Component {
|
|
|
317
319
|
sortDirection
|
|
318
320
|
};
|
|
319
321
|
}
|
|
322
|
+
const additionalExpanded = [];
|
|
320
323
|
if (prevData !== data) {
|
|
321
|
-
|
|
324
|
+
const isSingleElementInCurrentExpanded = () => state.expandedRows.includes(getRowKey(data[0], {
|
|
325
|
+
rowKey
|
|
326
|
+
}));
|
|
327
|
+
if (renderRowBody && data?.length === 1 && (!pagination || totalRows === 1) && (!prevData || prevData?.length === 0 || isSingleElementInCurrentExpanded()) && (!filtered || isSingleElementInCurrentExpanded())) {
|
|
322
328
|
const key = getRowKey(data[0], {
|
|
323
329
|
rowKey
|
|
324
330
|
});
|
|
325
331
|
if (notExpandableRows.indexOf(key) === -1) {
|
|
326
|
-
|
|
327
|
-
...nextState,
|
|
328
|
-
expandedRows: [...expandedRows, key]
|
|
329
|
-
};
|
|
332
|
+
additionalExpanded.push(key);
|
|
330
333
|
}
|
|
331
334
|
}
|
|
332
335
|
const keys = data.map(row => getRowKey(row, {
|
|
@@ -344,10 +347,10 @@ class List extends _react.Component {
|
|
|
344
347
|
selection
|
|
345
348
|
};
|
|
346
349
|
}
|
|
347
|
-
if (prevExpandedRows !== expandedRows) {
|
|
350
|
+
if (prevExpandedRows !== expandedRows || additionalExpanded.length) {
|
|
348
351
|
nextState = {
|
|
349
352
|
...nextState,
|
|
350
|
-
expandedRows
|
|
353
|
+
expandedRows: [...expandedRows, ...additionalExpanded]
|
|
351
354
|
};
|
|
352
355
|
}
|
|
353
356
|
if (prevPagination !== pagination) {
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react =
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _react = require("react");
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _Dialog = _interopRequireDefault(require("../Dialog"));
|
|
13
12
|
var _constants = require("../../constants");
|
|
@@ -16,8 +15,6 @@ var _utils = require("../utils");
|
|
|
16
15
|
var _ProgressStep = require("../ProgressStep");
|
|
17
16
|
var _Progress = _interopRequireDefault(require("../Progress"));
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
18
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
22
19
|
|
|
23
20
|
/**
|
|
@@ -52,7 +49,7 @@ class ProgressDialog extends _react.Component {
|
|
|
52
49
|
isFinished,
|
|
53
50
|
isFailed
|
|
54
51
|
} = this.state;
|
|
55
|
-
|
|
52
|
+
this.clearCloseTimeout();
|
|
56
53
|
if (!isOpen) {
|
|
57
54
|
return;
|
|
58
55
|
}
|
|
@@ -76,7 +73,7 @@ class ProgressDialog extends _react.Component {
|
|
|
76
73
|
isOpen
|
|
77
74
|
};
|
|
78
75
|
}
|
|
79
|
-
componentDidUpdate(
|
|
76
|
+
componentDidUpdate(_, prevState) {
|
|
80
77
|
const {
|
|
81
78
|
isFinished
|
|
82
79
|
} = this.state;
|
|
@@ -84,13 +81,19 @@ class ProgressDialog extends _react.Component {
|
|
|
84
81
|
autoCloseTimeout
|
|
85
82
|
} = this.props;
|
|
86
83
|
if (prevState.isFinished === false && isFinished === true) {
|
|
87
|
-
|
|
84
|
+
this.clearCloseTimeout();
|
|
88
85
|
if (autoCloseTimeout) {
|
|
89
86
|
this.closeTimeout = setTimeout(this.handleClose, autoCloseTimeout);
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
}
|
|
93
90
|
componentWillUnmount() {
|
|
91
|
+
this.clearCloseTimeout();
|
|
92
|
+
}
|
|
93
|
+
clearCloseTimeout() {
|
|
94
|
+
if (!this.closeTimeout) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
94
97
|
clearTimeout(this.closeTimeout);
|
|
95
98
|
}
|
|
96
99
|
render() {
|
|
@@ -141,83 +144,7 @@ class ProgressDialog extends _react.Component {
|
|
|
141
144
|
});
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
|
-
ProgressDialog
|
|
145
|
-
/**
|
|
146
|
-
* Toggles visibility.
|
|
147
|
-
* @since 1.2.0
|
|
148
|
-
*/
|
|
149
|
-
isOpen: _propTypes.default.bool,
|
|
150
|
-
/**
|
|
151
|
-
* Banner. Renders in front of content as wide as dialog.
|
|
152
|
-
* @since 1.2.0
|
|
153
|
-
*/
|
|
154
|
-
banner: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
155
|
-
/**
|
|
156
|
-
* Image. Renders into content.
|
|
157
|
-
* @since 1.2.0
|
|
158
|
-
*/
|
|
159
|
-
image: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
160
|
-
/**
|
|
161
|
-
* Title
|
|
162
|
-
* @since 1.2.0
|
|
163
|
-
*/
|
|
164
|
-
title: _propTypes.default.node,
|
|
165
|
-
/**
|
|
166
|
-
* Description of the `ProgressDialog`.
|
|
167
|
-
* @since 1.2.0
|
|
168
|
-
*/
|
|
169
|
-
description: _propTypes.default.node,
|
|
170
|
-
/**
|
|
171
|
-
* Actions which will be shown in Dialog header.
|
|
172
|
-
* @since 1.2.0
|
|
173
|
-
*/
|
|
174
|
-
actions: _propTypes.default.node,
|
|
175
|
-
/**
|
|
176
|
-
* Whether the dialog should be canceled with the cancel button.
|
|
177
|
-
* @since 1.2.0
|
|
178
|
-
*/
|
|
179
|
-
cancelable: _propTypes.default.bool,
|
|
180
|
-
/**
|
|
181
|
-
* The interval of time to auto close dialog when it successful finished.
|
|
182
|
-
* Set `null` for disable auto close.
|
|
183
|
-
* @since 1.2.0
|
|
184
|
-
*/
|
|
185
|
-
autoCloseTimeout: _propTypes.default.number,
|
|
186
|
-
/**
|
|
187
|
-
* On cancel event handler.
|
|
188
|
-
* @since 1.2.0
|
|
189
|
-
*/
|
|
190
|
-
onCancel: _propTypes.default.func,
|
|
191
|
-
/**
|
|
192
|
-
* On close event handler.
|
|
193
|
-
* @since 1.2.0
|
|
194
|
-
*/
|
|
195
|
-
onClose: _propTypes.default.func,
|
|
196
|
-
/**
|
|
197
|
-
* On finish event handler.
|
|
198
|
-
* @since 1.2.0
|
|
199
|
-
*/
|
|
200
|
-
onFinish: _propTypes.default.func,
|
|
201
|
-
/**
|
|
202
|
-
* On fail event handler.
|
|
203
|
-
* @since 1.2.0
|
|
204
|
-
*/
|
|
205
|
-
onFail: _propTypes.default.func,
|
|
206
|
-
/**
|
|
207
|
-
* Content of the `ProgressDialog`.
|
|
208
|
-
* @since 1.2.0
|
|
209
|
-
*/
|
|
210
|
-
children: _propTypes.default.node,
|
|
211
|
-
/**
|
|
212
|
-
* @ignore
|
|
213
|
-
*/
|
|
214
|
-
className: _propTypes.default.string,
|
|
215
|
-
/**
|
|
216
|
-
* @ignore
|
|
217
|
-
*/
|
|
218
|
-
baseClassName: _propTypes.default.string
|
|
219
|
-
};
|
|
220
|
-
ProgressDialog.defaultProps = {
|
|
147
|
+
(0, _defineProperty2.default)(ProgressDialog, "defaultProps", {
|
|
221
148
|
isOpen: false,
|
|
222
149
|
banner: null,
|
|
223
150
|
image: null,
|
|
@@ -233,6 +160,6 @@ ProgressDialog.defaultProps = {
|
|
|
233
160
|
children: null,
|
|
234
161
|
className: null,
|
|
235
162
|
baseClassName: `${_constants.CLS_PREFIX}progress-dialog`
|
|
236
|
-
};
|
|
163
|
+
});
|
|
237
164
|
var _default = ProgressDialog;
|
|
238
165
|
exports.default = _default;
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
9
|
var _constants = require("../../constants");
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -21,25 +19,22 @@ const width = value => {
|
|
|
21
19
|
}
|
|
22
20
|
return result;
|
|
23
21
|
};
|
|
24
|
-
|
|
25
22
|
/**
|
|
26
23
|
* `Rating` component is used for showing and collecting feedback of users' opinion in 0-5 grade scale.
|
|
27
24
|
* @since 0.0.42
|
|
28
25
|
*/
|
|
29
26
|
const Rating = _ref => {
|
|
30
27
|
let {
|
|
31
|
-
baseClassName
|
|
28
|
+
baseClassName = `${_constants.CLS_PREFIX}rating`,
|
|
32
29
|
className,
|
|
33
|
-
value,
|
|
34
|
-
small,
|
|
30
|
+
value = 0,
|
|
31
|
+
small = false,
|
|
35
32
|
...props
|
|
36
33
|
} = _ref;
|
|
37
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
-
className: (0, _classnames.default)({
|
|
39
|
-
[baseClassName]: true,
|
|
35
|
+
className: (0, _classnames.default)(baseClassName, className, {
|
|
40
36
|
[`${baseClassName}--static`]: true,
|
|
41
|
-
[`${baseClassName}--small`]: small
|
|
42
|
-
[className]: true
|
|
37
|
+
[`${baseClassName}--small`]: small
|
|
43
38
|
}),
|
|
44
39
|
...props,
|
|
45
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -50,31 +45,5 @@ const Rating = _ref => {
|
|
|
50
45
|
})
|
|
51
46
|
});
|
|
52
47
|
};
|
|
53
|
-
Rating.propTypes = {
|
|
54
|
-
/**
|
|
55
|
-
* Rating value from 0 to 5.
|
|
56
|
-
* @since 0.0.42
|
|
57
|
-
*/
|
|
58
|
-
value: _propTypes.default.number,
|
|
59
|
-
/**
|
|
60
|
-
* Small variant.
|
|
61
|
-
* @since 0.0.42
|
|
62
|
-
*/
|
|
63
|
-
small: _propTypes.default.bool,
|
|
64
|
-
/**
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
className: _propTypes.default.string,
|
|
68
|
-
/**
|
|
69
|
-
* @ignore
|
|
70
|
-
*/
|
|
71
|
-
baseClassName: _propTypes.default.string
|
|
72
|
-
};
|
|
73
|
-
Rating.defaultProps = {
|
|
74
|
-
value: 0,
|
|
75
|
-
small: false,
|
|
76
|
-
className: null,
|
|
77
|
-
baseClassName: `${_constants.CLS_PREFIX}rating`
|
|
78
|
-
};
|
|
79
48
|
var _default = Rating;
|
|
80
49
|
exports.default = _default;
|
|
@@ -23,5 +23,5 @@ Object.defineProperty(exports, "default", {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
var _Skeleton = _interopRequireDefault(require("./Skeleton"));
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var _SkeletonTabs = _interopRequireDefault(require("./SkeletonTabs"));
|
|
27
|
+
var _SkeletonText = _interopRequireDefault(require("./SkeletonText"));
|
|
@@ -41,8 +41,7 @@ const focusStrategy = {
|
|
|
41
41
|
* `Split Button` is a combination of a standard [Button](#!/Button) with a [Dropdown](#!/Dropdown) menu.
|
|
42
42
|
* It is used for grouping several related actions when one of the actions should be accessible immediately
|
|
43
43
|
* because it is used more often than others.
|
|
44
|
-
*
|
|
45
|
-
* Since: 0.0.40
|
|
44
|
+
* @since 0.0.40
|
|
46
45
|
*/
|
|
47
46
|
const SplitButton = _ref => {
|
|
48
47
|
let {
|
|
@@ -5,14 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _react = require("react");
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _constants = require("../../constants");
|
|
12
11
|
var _Section = _interopRequireDefault(require("../Section"));
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
13
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
17
14
|
|
|
18
15
|
/**
|
|
@@ -21,7 +18,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
18
|
*/
|
|
22
19
|
const SwitchesPanel = _ref => {
|
|
23
20
|
let {
|
|
24
|
-
baseClassName
|
|
21
|
+
baseClassName = `${_constants.CLS_PREFIX}switches-panel`,
|
|
25
22
|
className,
|
|
26
23
|
children,
|
|
27
24
|
...props
|
|
@@ -31,31 +28,11 @@ const SwitchesPanel = _ref => {
|
|
|
31
28
|
...props,
|
|
32
29
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
30
|
className: `${baseClassName}__items`,
|
|
34
|
-
children: _react.Children.map(children, child => /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
31
|
+
children: children && _react.Children.map(children, child => /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
35
32
|
className: (0, _classnames.default)(child.props.className, `${baseClassName}__item`)
|
|
36
33
|
}))
|
|
37
34
|
})
|
|
38
35
|
});
|
|
39
36
|
};
|
|
40
|
-
SwitchesPanel.propTypes = {
|
|
41
|
-
/**
|
|
42
|
-
* Content of the `SwitchesPanel`. Recommended to use [SwitchesPanelItem](#!/SwitchesPanelItem) components.
|
|
43
|
-
* @since 0.3.0
|
|
44
|
-
*/
|
|
45
|
-
children: _propTypes.default.node,
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
className: _propTypes.default.string,
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
baseClassName: _propTypes.default.string
|
|
54
|
-
};
|
|
55
|
-
SwitchesPanel.defaultProps = {
|
|
56
|
-
children: null,
|
|
57
|
-
className: null,
|
|
58
|
-
baseClassName: `${_constants.CLS_PREFIX}switches-panel`
|
|
59
|
-
};
|
|
60
37
|
var _default = SwitchesPanel;
|
|
61
38
|
exports.default = _default;
|
|
@@ -6,16 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react =
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _react = require("react");
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _constants = require("../../constants");
|
|
13
12
|
var _Switch = _interopRequireDefault(require("../Switch"));
|
|
14
13
|
var _Action = _interopRequireDefault(require("../Action"));
|
|
15
14
|
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
16
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
20
17
|
|
|
21
18
|
/**
|
|
@@ -90,58 +87,7 @@ class SwitchesPanelItem extends _react.Component {
|
|
|
90
87
|
});
|
|
91
88
|
}
|
|
92
89
|
}
|
|
93
|
-
SwitchesPanelItem
|
|
94
|
-
/**
|
|
95
|
-
* A callback function, can be executed when the checked state is changing.
|
|
96
|
-
* @since 0.3.0
|
|
97
|
-
*/
|
|
98
|
-
onChange: _propTypes.default.func.isRequired,
|
|
99
|
-
/**
|
|
100
|
-
* @ignore
|
|
101
|
-
*/
|
|
102
|
-
defaultChecked: _propTypes.default.bool,
|
|
103
|
-
/**
|
|
104
|
-
* Visual intent color to apply to component.
|
|
105
|
-
* @since 0.3.0
|
|
106
|
-
*/
|
|
107
|
-
intent: _propTypes.default.oneOf(['warning', 'danger']),
|
|
108
|
-
/**
|
|
109
|
-
* Title of the `SwitchesPanelItem`. Must be no longer than two lines.
|
|
110
|
-
* @since 0.3.0
|
|
111
|
-
*/
|
|
112
|
-
title: _propTypes.default.node.isRequired,
|
|
113
|
-
/**
|
|
114
|
-
* `SwitchesPanelItem` description. Must be no longer than three lines.
|
|
115
|
-
* @since 0.3.0
|
|
116
|
-
*/
|
|
117
|
-
description: _propTypes.default.node,
|
|
118
|
-
/**
|
|
119
|
-
* Rich full description of the `SwitchesPanelItem`.
|
|
120
|
-
* Adds control button with question mark that shows `Popover` on click.
|
|
121
|
-
* @since 0.3.0
|
|
122
|
-
*/
|
|
123
|
-
fullDescription: _propTypes.default.node,
|
|
124
|
-
/**
|
|
125
|
-
* Props of underlying [Switch](#!/Switch) component.
|
|
126
|
-
* @since 0.5.0
|
|
127
|
-
*/
|
|
128
|
-
switchProps: _propTypes.default.object,
|
|
129
|
-
/**
|
|
130
|
-
* Content of the control actions.
|
|
131
|
-
* Don't place here more than three buttons (with the one from 'fullDescription' property) or one link and one button.
|
|
132
|
-
* @since 0.3.0
|
|
133
|
-
*/
|
|
134
|
-
children: _propTypes.default.node,
|
|
135
|
-
/**
|
|
136
|
-
* @ignore
|
|
137
|
-
*/
|
|
138
|
-
className: _propTypes.default.string,
|
|
139
|
-
/**
|
|
140
|
-
* @ignore
|
|
141
|
-
*/
|
|
142
|
-
baseClassName: _propTypes.default.string
|
|
143
|
-
};
|
|
144
|
-
SwitchesPanelItem.defaultProps = {
|
|
90
|
+
(0, _defineProperty2.default)(SwitchesPanelItem, "defaultProps", {
|
|
145
91
|
defaultChecked: false,
|
|
146
92
|
intent: null,
|
|
147
93
|
description: null,
|
|
@@ -150,6 +96,6 @@ SwitchesPanelItem.defaultProps = {
|
|
|
150
96
|
children: null,
|
|
151
97
|
className: null,
|
|
152
98
|
baseClassName: `${_constants.CLS_PREFIX}switches-panel-item`
|
|
153
|
-
};
|
|
99
|
+
});
|
|
154
100
|
var _default = SwitchesPanelItem;
|
|
155
101
|
exports.default = _default;
|
|
@@ -14,8 +14,7 @@ var _constants = require("../../constants");
|
|
|
14
14
|
var _Toast = _interopRequireDefault(require("../Toast"));
|
|
15
15
|
var _Layer = _interopRequireDefault(require("../Layer"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
18
|
-
|
|
17
|
+
var _class; // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
19
18
|
let toastId = 0;
|
|
20
19
|
/**
|
|
21
20
|
* `Toaster` is used for notifying about events happened in the system. For example, about results of performed operations.
|
|
@@ -192,6 +191,7 @@ class Toaster extends _react.Component {
|
|
|
192
191
|
}
|
|
193
192
|
}
|
|
194
193
|
exports.default = Toaster;
|
|
194
|
+
_class = Toaster;
|
|
195
195
|
// eslint-disable-next-line react/sort-comp
|
|
196
196
|
(0, _defineProperty2.default)(Toaster, "defaultProps", {
|
|
197
197
|
position: 'top-end',
|
|
@@ -202,7 +202,7 @@ exports.default = Toaster;
|
|
|
202
202
|
let container = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document.body;
|
|
203
203
|
const containerElement = document.createElement('div');
|
|
204
204
|
container.appendChild(containerElement);
|
|
205
|
-
return (0, _reactDom.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
205
|
+
return (0, _reactDom.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_class, {
|
|
206
206
|
...props
|
|
207
207
|
}), containerElement);
|
|
208
208
|
});
|
package/cjs/components/index.js
CHANGED
|
@@ -89,6 +89,8 @@ var _exportNames = {
|
|
|
89
89
|
Translate: true,
|
|
90
90
|
Link: true,
|
|
91
91
|
Skeleton: true,
|
|
92
|
+
SkeletonTabs: true,
|
|
93
|
+
SkeletonText: true,
|
|
92
94
|
PortalContext: true
|
|
93
95
|
};
|
|
94
96
|
Object.defineProperty(exports, "Action", {
|
|
@@ -505,6 +507,18 @@ Object.defineProperty(exports, "Skeleton", {
|
|
|
505
507
|
return _Skeleton.default;
|
|
506
508
|
}
|
|
507
509
|
});
|
|
510
|
+
Object.defineProperty(exports, "SkeletonTabs", {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function () {
|
|
513
|
+
return _Skeleton.SkeletonTabs;
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
Object.defineProperty(exports, "SkeletonText", {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function () {
|
|
519
|
+
return _Skeleton.SkeletonText;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
508
522
|
Object.defineProperty(exports, "SplitButton", {
|
|
509
523
|
enumerable: true,
|
|
510
524
|
get: function () {
|
|
@@ -850,17 +864,6 @@ var _Tour = _interopRequireDefault(require("./Tour"));
|
|
|
850
864
|
var _Translate = _interopRequireDefault(require("./Translate"));
|
|
851
865
|
var _Link = _interopRequireDefault(require("./Link"));
|
|
852
866
|
var _Skeleton = _interopRequireWildcard(require("./Skeleton"));
|
|
853
|
-
Object.keys(_Skeleton).forEach(function (key) {
|
|
854
|
-
if (key === "default" || key === "__esModule") return;
|
|
855
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
856
|
-
if (key in exports && exports[key] === _Skeleton[key]) return;
|
|
857
|
-
Object.defineProperty(exports, key, {
|
|
858
|
-
enumerable: true,
|
|
859
|
-
get: function () {
|
|
860
|
-
return _Skeleton[key];
|
|
861
|
-
}
|
|
862
|
-
});
|
|
863
|
-
});
|
|
864
867
|
var _Layer = require("./Layer");
|
|
865
868
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
866
869
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/cjs/index.js
CHANGED
package/cjs/tests/renderer.js
CHANGED
|
@@ -12,7 +12,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
12
|
|
|
13
13
|
const renderer = (Component, baseProps) => propOverrides => {
|
|
14
14
|
const {
|
|
15
|
-
asFragment
|
|
15
|
+
asFragment,
|
|
16
|
+
rerender
|
|
16
17
|
} = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
17
18
|
...baseProps,
|
|
18
19
|
...propOverrides
|
|
@@ -20,6 +21,11 @@ const renderer = (Component, baseProps) => propOverrides => {
|
|
|
20
21
|
return {
|
|
21
22
|
asFragment,
|
|
22
23
|
user: _userEvent.default,
|
|
24
|
+
rerender: rerenderPropsOverrides => rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
25
|
+
...baseProps,
|
|
26
|
+
...propOverrides,
|
|
27
|
+
...rerenderPropsOverrides
|
|
28
|
+
})),
|
|
23
29
|
...baseProps
|
|
24
30
|
};
|
|
25
31
|
};
|