@plesk/ui-library 3.25.6 → 3.27.0
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/README.md +35 -35
- package/cjs/components/Action/Action.js +3 -3
- package/cjs/components/Button/Button.js +50 -50
- package/cjs/components/Checkbox/Checkbox.js +3 -3
- package/cjs/components/CodeEditor/CodeEditor.js +40 -40
- package/cjs/components/Dialog/Dialog.js +63 -63
- package/cjs/components/Drawer/Drawer.js +100 -90
- package/cjs/components/Drawer/DrawerProgress.js +17 -14
- package/cjs/components/Drawer/Header.js +11 -4
- package/cjs/components/Form/Form.js +4 -4
- package/cjs/components/FormField/FormField.js +87 -82
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +34 -34
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +32 -32
- package/cjs/components/FormFieldSelect/FormFieldSelect.js +1 -1
- package/cjs/components/Icon/Icon.js +6 -6
- package/cjs/components/Icon/constants.js +2 -2
- package/cjs/components/Icon/images/symbols.svg +1653 -1639
- package/cjs/components/InputNumber/InputNumber.js +3 -3
- package/cjs/components/Item/Item.js +50 -41
- package/cjs/components/ItemLink/ItemLink.js +1 -0
- package/cjs/components/ItemList/ItemList.js +43 -12
- package/cjs/components/ItemList/ItemList.stories.js +35 -3
- package/cjs/components/Layout/Layout.js +55 -55
- package/cjs/components/List/List.js +139 -134
- package/cjs/components/LocaleProvider/LocaleProvider.js +3 -3
- package/cjs/components/Menu/MenuBaseItem.js +19 -19
- package/cjs/components/Overlay/Overlay.js +34 -34
- package/cjs/components/Pagination/Pagination.js +3 -3
- package/cjs/components/Panel/Panel.js +14 -4
- package/cjs/components/Popper/Popper.js +30 -30
- package/cjs/components/ProgressStep/ProgressStep.js +16 -14
- package/cjs/components/Section/Section.js +128 -68
- package/cjs/components/Select/Select.js +9 -9
- package/cjs/components/Select/SelectControl.js +1 -1
- package/cjs/components/Tabs/Tab.js +28 -28
- package/cjs/components/Tabs/Tabs.js +33 -33
- package/cjs/components/Translate/Translate.js +25 -25
- package/cjs/index.js +1 -1
- package/dist/images/symbols.svg +1653 -1639
- 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 +1116 -970
- 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/Action/Action.js +3 -3
- package/esm/components/Button/Button.js +50 -50
- package/esm/components/Checkbox/Checkbox.js +3 -3
- package/esm/components/CodeEditor/CodeEditor.js +40 -40
- package/esm/components/Dialog/Dialog.js +63 -63
- package/esm/components/Drawer/Drawer.js +100 -89
- package/esm/components/Drawer/DrawerProgress.js +16 -15
- package/esm/components/Drawer/Header.js +11 -4
- package/esm/components/Form/Form.js +4 -4
- package/esm/components/FormField/FormField.js +87 -82
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
- package/esm/components/FormFieldPassword/FormFieldPassword.js +34 -34
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +32 -32
- package/esm/components/FormFieldSelect/FormFieldSelect.js +1 -1
- package/esm/components/Icon/Icon.js +6 -6
- package/esm/components/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +1653 -1639
- package/esm/components/InputNumber/InputNumber.js +3 -3
- package/esm/components/Item/Item.js +50 -41
- package/esm/components/ItemLink/ItemLink.js +1 -0
- package/esm/components/ItemList/ItemList.js +43 -12
- package/esm/components/ItemList/ItemList.stories.js +32 -2
- package/esm/components/Layout/Layout.js +55 -55
- package/esm/components/List/List.js +139 -134
- package/esm/components/LocaleProvider/LocaleProvider.js +3 -3
- package/esm/components/Menu/MenuBaseItem.js +19 -19
- package/esm/components/Overlay/Overlay.js +34 -34
- package/esm/components/Pagination/Pagination.js +3 -3
- package/esm/components/Panel/Panel.js +14 -5
- package/esm/components/Popper/Popper.js +30 -30
- package/esm/components/ProgressStep/ProgressStep.js +17 -15
- package/esm/components/Section/Section.js +129 -72
- package/esm/components/Select/Select.js +9 -9
- package/esm/components/Select/SelectControl.js +1 -1
- package/esm/components/Tabs/Tab.js +28 -28
- package/esm/components/Tabs/Tabs.js +33 -33
- package/esm/components/Translate/Translate.js +25 -25
- package/esm/index.js +1 -1
- package/package.json +146 -146
- package/styleguide/build/bundle.ff1f903a.js +2 -0
- package/styleguide/build/{bundle.b7db9339.js.LICENSE.txt → bundle.ff1f903a.js.LICENSE.txt} +0 -0
- package/styleguide/images/symbols.svg +1653 -1639
- package/styleguide/index.html +6 -6
- package/types/src/components/Drawer/DrawerProgress.d.ts +7 -2
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/ItemLink/ItemLink.d.ts +4 -0
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +1 -0
- package/types/src/components/ItemList/ItemList.d.ts +8 -0
- package/types/src/components/ItemList/ItemList.stories.d.ts +104 -0
- package/styleguide/build/bundle.b7db9339.js +0 -2
|
@@ -29,8 +29,6 @@ var _Form = _interopRequireDefault(require("../Form"));
|
|
|
29
29
|
|
|
30
30
|
var _Heading = _interopRequireDefault(require("../Heading"));
|
|
31
31
|
|
|
32
|
-
var _Text = _interopRequireDefault(require("../Text"));
|
|
33
|
-
|
|
34
32
|
var _Translate = require("../Translate");
|
|
35
33
|
|
|
36
34
|
var _ScrollableElementFormContext = _interopRequireDefault(require("../Form/ScrollableElementFormContext"));
|
|
@@ -43,107 +41,113 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
43
41
|
|
|
44
42
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
45
43
|
const propTypes = {
|
|
46
|
-
/**
|
|
47
|
-
* Toggles visibility.
|
|
48
|
-
* @since 0.0.65
|
|
44
|
+
/**
|
|
45
|
+
* Toggles visibility.
|
|
46
|
+
* @since 0.0.65
|
|
49
47
|
*/
|
|
50
48
|
isOpen: _propTypes.default.bool,
|
|
51
49
|
|
|
52
|
-
/**
|
|
53
|
-
* The title of the `Drawer`.
|
|
54
|
-
* @since 0.0.65
|
|
50
|
+
/**
|
|
51
|
+
* The title of the `Drawer`.
|
|
52
|
+
* @since 0.0.65
|
|
55
53
|
*/
|
|
56
54
|
title: _propTypes.default.node.isRequired,
|
|
57
55
|
|
|
58
|
-
/**
|
|
59
|
-
* The subtitle of the `Drawer`.
|
|
60
|
-
* @since 0.0.65
|
|
56
|
+
/**
|
|
57
|
+
* The subtitle of the `Drawer`.
|
|
58
|
+
* @since 0.0.65
|
|
61
59
|
*/
|
|
62
60
|
subtitle: _propTypes.default.node,
|
|
63
61
|
|
|
64
|
-
/**
|
|
65
|
-
* Show the minimize button and the inactive close button.
|
|
66
|
-
* @since 1.4.1
|
|
62
|
+
/**
|
|
63
|
+
* Show the minimize button and the inactive close button.
|
|
64
|
+
* @since 1.4.1
|
|
67
65
|
*/
|
|
68
66
|
hideButton: _propTypes.default.bool,
|
|
69
67
|
|
|
70
|
-
/**
|
|
71
|
-
* Show back button in the header. If true the close button is not show.
|
|
72
|
-
* @deprecated Not recommended to use. Use default close button instead.
|
|
73
|
-
* @since 0.0.65
|
|
68
|
+
/**
|
|
69
|
+
* Show back button in the header. If true the close button is not show.
|
|
70
|
+
* @deprecated Not recommended to use. Use default close button instead.
|
|
71
|
+
* @since 0.0.65
|
|
74
72
|
*/
|
|
75
73
|
backButton: _propTypes.default.bool,
|
|
76
74
|
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
* @since
|
|
75
|
+
/**
|
|
76
|
+
* A slot for `Tabs` component.
|
|
77
|
+
* @since 3.26.0
|
|
78
|
+
*/
|
|
79
|
+
tabs: _propTypes.default.node,
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Overlay placement.
|
|
83
|
+
* @since 0.0.65
|
|
80
84
|
*/
|
|
81
85
|
placement: _propTypes.default.oneOf(['left', 'right']),
|
|
82
86
|
|
|
83
|
-
/**
|
|
84
|
-
* Overlay size.
|
|
85
|
-
* @since 0.0.65
|
|
87
|
+
/**
|
|
88
|
+
* Overlay size.
|
|
89
|
+
* @since 0.0.65
|
|
86
90
|
*/
|
|
87
91
|
size: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
88
92
|
|
|
89
|
-
/**
|
|
90
|
-
* onClose handler.
|
|
91
|
-
* @since 0.0.65
|
|
93
|
+
/**
|
|
94
|
+
* onClose handler.
|
|
95
|
+
* @since 0.0.65
|
|
92
96
|
*/
|
|
93
97
|
onClose: _propTypes.default.func,
|
|
94
98
|
|
|
95
|
-
/**
|
|
96
|
-
* Whether show or not a confirmation dialog on close.
|
|
97
|
-
* @since 3.21.0
|
|
99
|
+
/**
|
|
100
|
+
* Whether show or not a confirmation dialog on close.
|
|
101
|
+
* @since 3.21.0
|
|
98
102
|
*/
|
|
99
103
|
closingConfirmation: _propTypes.default.bool,
|
|
100
104
|
|
|
101
|
-
/**
|
|
102
|
-
* Wraps children into [Form](#!/Form) if not empty.
|
|
103
|
-
* @since 0.0.66
|
|
105
|
+
/**
|
|
106
|
+
* Wraps children into [Form](#!/Form) if not empty.
|
|
107
|
+
* @since 0.0.66
|
|
104
108
|
*/
|
|
105
109
|
form: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.element]),
|
|
106
110
|
|
|
107
|
-
/**
|
|
108
|
-
* Block with an image, placed at the side of the component
|
|
109
|
-
* @since 3.25.0
|
|
111
|
+
/**
|
|
112
|
+
* Block with an image, placed at the side of the component
|
|
113
|
+
* @since 3.25.0
|
|
110
114
|
*/
|
|
111
115
|
sideBanner: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
112
116
|
|
|
113
|
-
/**
|
|
114
|
-
* Additional properties for the sideBanner
|
|
115
|
-
* @since 3.25.0
|
|
117
|
+
/**
|
|
118
|
+
* Additional properties for the sideBanner
|
|
119
|
+
* @since 3.25.0
|
|
116
120
|
*/
|
|
117
121
|
sideBannerContainer: _propTypes.default.shape({
|
|
118
|
-
/**
|
|
119
|
-
* Values for css background property
|
|
122
|
+
/**
|
|
123
|
+
* Values for css background property
|
|
120
124
|
*/
|
|
121
125
|
background: _propTypes.default.string,
|
|
122
126
|
|
|
123
|
-
/**
|
|
124
|
-
* One of: center, flex-start, flex-end
|
|
127
|
+
/**
|
|
128
|
+
* One of: center, flex-start, flex-end
|
|
125
129
|
*/
|
|
126
130
|
align: _propTypes.default.oneOf(['center', 'flex-start', 'flex-end'])
|
|
127
131
|
}),
|
|
128
132
|
|
|
129
|
-
/**
|
|
130
|
-
* Content of the `Drawer`.
|
|
131
|
-
* @since 0.0.65
|
|
133
|
+
/**
|
|
134
|
+
* Content of the `Drawer`.
|
|
135
|
+
* @since 0.0.65
|
|
132
136
|
*/
|
|
133
137
|
children: _propTypes.default.node,
|
|
134
138
|
|
|
135
|
-
/**
|
|
136
|
-
* Adds [Progress](#!/Progress) into footer.
|
|
137
|
-
* @since 1.11.0
|
|
139
|
+
/**
|
|
140
|
+
* Adds [Progress](#!/Progress) into footer.
|
|
141
|
+
* @since 1.11.0
|
|
138
142
|
*/
|
|
139
143
|
progress: _propTypes.default.shape({
|
|
140
|
-
/**
|
|
141
|
-
* A title for the progress.
|
|
144
|
+
/**
|
|
145
|
+
* A title for the progress.
|
|
142
146
|
*/
|
|
143
147
|
title: _propTypes.default.string,
|
|
144
148
|
|
|
145
|
-
/**
|
|
146
|
-
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
149
|
+
/**
|
|
150
|
+
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
147
151
|
*/
|
|
148
152
|
steps: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
149
153
|
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.element]),
|
|
@@ -152,35 +156,35 @@ const propTypes = {
|
|
|
152
156
|
icon: _propTypes.default.string
|
|
153
157
|
})).isRequired,
|
|
154
158
|
|
|
155
|
-
/**
|
|
156
|
-
* An option that controls drawer closing ability.
|
|
159
|
+
/**
|
|
160
|
+
* An option that controls drawer closing ability.
|
|
157
161
|
*/
|
|
158
162
|
cancelable: _propTypes.default.bool,
|
|
159
163
|
|
|
160
|
-
/**
|
|
161
|
-
* On overall status event handler.
|
|
162
|
-
* @since 3.8.0
|
|
164
|
+
/**
|
|
165
|
+
* On overall status event handler.
|
|
166
|
+
* @since 3.8.0
|
|
163
167
|
*/
|
|
164
168
|
onStatusChange: _propTypes.default.func,
|
|
165
169
|
|
|
166
|
-
/**
|
|
167
|
-
* @ignore
|
|
170
|
+
/**
|
|
171
|
+
* @ignore
|
|
168
172
|
*/
|
|
169
173
|
onClose: _propTypes.default.func,
|
|
170
174
|
|
|
171
|
-
/**
|
|
172
|
-
* @ignore
|
|
175
|
+
/**
|
|
176
|
+
* @ignore
|
|
173
177
|
*/
|
|
174
178
|
onClosableChange: _propTypes.default.func
|
|
175
179
|
}),
|
|
176
180
|
|
|
177
|
-
/**
|
|
178
|
-
* @ignore
|
|
181
|
+
/**
|
|
182
|
+
* @ignore
|
|
179
183
|
*/
|
|
180
184
|
className: _propTypes.default.string,
|
|
181
185
|
|
|
182
|
-
/**
|
|
183
|
-
* @ignore
|
|
186
|
+
/**
|
|
187
|
+
* @ignore
|
|
184
188
|
*/
|
|
185
189
|
baseClassName: _propTypes.default.string
|
|
186
190
|
};
|
|
@@ -189,6 +193,7 @@ const defaultProps = {
|
|
|
189
193
|
subtitle: '',
|
|
190
194
|
backButton: undefined,
|
|
191
195
|
hideButton: undefined,
|
|
196
|
+
tabs: undefined,
|
|
192
197
|
placement: 'left',
|
|
193
198
|
size: 'md',
|
|
194
199
|
onClose: null,
|
|
@@ -201,10 +206,10 @@ const defaultProps = {
|
|
|
201
206
|
className: null,
|
|
202
207
|
baseClassName: `${_constants.CLS_PREFIX}drawer`
|
|
203
208
|
};
|
|
204
|
-
/**
|
|
205
|
-
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
206
|
-
* The component is similar to `Dialog` but it is intended to work with more complex forms or lists.
|
|
207
|
-
* @since 0.0.65
|
|
209
|
+
/**
|
|
210
|
+
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
211
|
+
* The component is similar to `Dialog` but it is intended to work with more complex forms or lists.
|
|
212
|
+
* @since 0.0.65
|
|
208
213
|
*/
|
|
209
214
|
|
|
210
215
|
const Drawer = ({
|
|
@@ -215,6 +220,7 @@ const Drawer = ({
|
|
|
215
220
|
subtitle,
|
|
216
221
|
backButton,
|
|
217
222
|
hideButton,
|
|
223
|
+
tabs,
|
|
218
224
|
onClose,
|
|
219
225
|
form,
|
|
220
226
|
progress,
|
|
@@ -235,9 +241,23 @@ const Drawer = ({
|
|
|
235
241
|
if (progress) {
|
|
236
242
|
progress.onClose = onCloseWithConfirmation;
|
|
237
243
|
progress.onClosableChange = setIsClosable;
|
|
238
|
-
}
|
|
239
244
|
|
|
240
|
-
|
|
245
|
+
const drawerProgressRender = ({
|
|
246
|
+
content,
|
|
247
|
+
footer
|
|
248
|
+
}) => {
|
|
249
|
+
return render({
|
|
250
|
+
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
251
|
+
className: `${baseClassName}__form`
|
|
252
|
+
}, content),
|
|
253
|
+
footer
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
return /*#__PURE__*/_react.default.createElement(_DrawerProgress.default, (0, _extends2.default)({
|
|
258
|
+
render: drawerProgressRender
|
|
259
|
+
}, progress));
|
|
260
|
+
}
|
|
241
261
|
|
|
242
262
|
if (form) {
|
|
243
263
|
if ( /*#__PURE__*/(0, _react.isValidElement)(form)) {
|
|
@@ -252,7 +272,7 @@ const Drawer = ({
|
|
|
252
272
|
renderActionButtons
|
|
253
273
|
}) => render({
|
|
254
274
|
content: renderForm(),
|
|
255
|
-
footer:
|
|
275
|
+
footer: renderActionButtons()
|
|
256
276
|
})
|
|
257
277
|
});
|
|
258
278
|
}
|
|
@@ -273,25 +293,16 @@ const Drawer = ({
|
|
|
273
293
|
renderActionButtons
|
|
274
294
|
}) => render({
|
|
275
295
|
content: renderForm(),
|
|
276
|
-
footer:
|
|
296
|
+
footer: renderActionButtons()
|
|
277
297
|
})
|
|
278
298
|
}), children);
|
|
279
299
|
}
|
|
280
300
|
}
|
|
281
301
|
|
|
282
|
-
children = /*#__PURE__*/_react.default.createElement("div", {
|
|
283
|
-
className: `${baseClassName}__inner-body`
|
|
284
|
-
}, children);
|
|
285
|
-
|
|
286
|
-
if (progress) {
|
|
287
|
-
return render({
|
|
288
|
-
content: children,
|
|
289
|
-
footer: createProgress()
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
|
|
293
302
|
return render({
|
|
294
|
-
content:
|
|
303
|
+
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
304
|
+
className: `${baseClassName}__inner-body`
|
|
305
|
+
}, children)
|
|
295
306
|
});
|
|
296
307
|
};
|
|
297
308
|
|
|
@@ -307,7 +318,8 @@ const Drawer = ({
|
|
|
307
318
|
}) => /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.default, {
|
|
308
319
|
backButton: backButton,
|
|
309
320
|
hideButton: typeof hideButton === 'boolean' ? hideButton : Boolean(progress && !isClosable),
|
|
310
|
-
onClose: onCloseWithConfirmation
|
|
321
|
+
onClose: onCloseWithConfirmation,
|
|
322
|
+
tabs: tabs
|
|
311
323
|
}, (0, _Translate.isLikeText)(title) ? /*#__PURE__*/_react.default.createElement(_Heading.default, {
|
|
312
324
|
level: "2",
|
|
313
325
|
className: `${baseClassName}__title`
|
|
@@ -315,9 +327,7 @@ const Drawer = ({
|
|
|
315
327
|
className: `${baseClassName}__title`
|
|
316
328
|
}, title), subtitle && /*#__PURE__*/_react.default.createElement("div", {
|
|
317
329
|
className: `${baseClassName}__subtitle`
|
|
318
|
-
},
|
|
319
|
-
intent: "muted"
|
|
320
|
-
}, subtitle) : subtitle)), /*#__PURE__*/_react.default.createElement(_ScrollDirection.default, null, ({
|
|
330
|
+
}, subtitle)), /*#__PURE__*/_react.default.createElement(_ScrollDirection.default, null, ({
|
|
321
331
|
handleScroll
|
|
322
332
|
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
323
333
|
className: `${baseClassName}__body`,
|
|
@@ -101,7 +101,7 @@ class DrawerProgress extends _react.Component {
|
|
|
101
101
|
if (prevState.status !== _ProgressStep.STATUS_DONE && status === _ProgressStep.STATUS_DONE) {
|
|
102
102
|
window.clearTimeout(this.closeTimeout);
|
|
103
103
|
|
|
104
|
-
if (autoCloseTimeout) {
|
|
104
|
+
if (autoCloseTimeout !== undefined) {
|
|
105
105
|
this.closeTimeout = window.setTimeout(this.handleClose, autoCloseTimeout);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -121,7 +121,8 @@ class DrawerProgress extends _react.Component {
|
|
|
121
121
|
title,
|
|
122
122
|
steps,
|
|
123
123
|
buttons,
|
|
124
|
-
cancelable
|
|
124
|
+
cancelable,
|
|
125
|
+
render
|
|
125
126
|
} = this.props;
|
|
126
127
|
const {
|
|
127
128
|
status
|
|
@@ -129,35 +130,37 @@ class DrawerProgress extends _react.Component {
|
|
|
129
130
|
const isFinished = status === _ProgressStep.STATUS_DONE;
|
|
130
131
|
const isFailed = status === _ProgressStep.STATUS_ERROR;
|
|
131
132
|
const canCancel = cancelable && !(isFinished || isFailed);
|
|
132
|
-
|
|
133
|
+
const hasFooter = !!(buttons || canCancel);
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
const content = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
135
136
|
className: `${baseClassName}__title`
|
|
136
137
|
}, title), /*#__PURE__*/_react.default.createElement(_Progress.default, {
|
|
137
138
|
onStatusChange: this.handleStatusChange,
|
|
138
139
|
className: `${baseClassName}__progress`
|
|
139
140
|
}, steps.map((step, index) => /*#__PURE__*/_react.default.createElement(_ProgressStep.default, (0, _extends2.default)({
|
|
140
141
|
key: index.toString()
|
|
141
|
-
}, step))))
|
|
142
|
+
}, step)))));
|
|
143
|
+
|
|
144
|
+
const footer = hasFooter ? /*#__PURE__*/_react.default.createElement("div", {
|
|
142
145
|
className: `${baseClassName}__footer`
|
|
143
|
-
}, buttons,
|
|
144
|
-
onClick: this.
|
|
145
|
-
|
|
146
|
-
content: "DrawerProgress.closeButton",
|
|
147
|
-
fallback: "Close"
|
|
148
|
-
})), canCancel && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
149
|
-
onClick: this.handleCancel
|
|
146
|
+
}, buttons, canCancel && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
147
|
+
onClick: this.handleCancel,
|
|
148
|
+
size: "lg"
|
|
150
149
|
}, /*#__PURE__*/_react.default.createElement(_Translate.default, {
|
|
151
150
|
content: "DrawerProgress.cancelButton",
|
|
152
151
|
fallback: "Cancel"
|
|
153
|
-
})))
|
|
152
|
+
}))) : null;
|
|
153
|
+
return typeof render === 'function' ? render({
|
|
154
|
+
content,
|
|
155
|
+
footer
|
|
156
|
+
}) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, content, footer);
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
(0, _defineProperty2.default)(DrawerProgress, "defaultProps", {
|
|
159
162
|
baseClassName: `${_constants.CLS_PREFIX}drawer-progress`,
|
|
160
|
-
autoCloseTimeout:
|
|
163
|
+
autoCloseTimeout: 0,
|
|
161
164
|
cancelable: false,
|
|
162
165
|
steps: []
|
|
163
166
|
});
|
|
@@ -29,7 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
// Copyright 1999-
|
|
32
|
+
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
33
33
|
class Header extends _react.Component {
|
|
34
34
|
componentDidMount() {
|
|
35
35
|
this.isRtl = (0, _utils.isRtl)();
|
|
@@ -97,6 +97,7 @@ class Header extends _react.Component {
|
|
|
97
97
|
children,
|
|
98
98
|
backButton,
|
|
99
99
|
hideButton,
|
|
100
|
+
tabs,
|
|
100
101
|
...props
|
|
101
102
|
} = this.props;
|
|
102
103
|
let prefix;
|
|
@@ -130,7 +131,11 @@ class Header extends _react.Component {
|
|
|
130
131
|
className: `${baseClassName}__inner`
|
|
131
132
|
}, prefix, /*#__PURE__*/_react.default.createElement("div", {
|
|
132
133
|
className: `${baseClassName}__content`
|
|
133
|
-
}, children
|
|
134
|
+
}, children, tabs && /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
className: `${baseClassName}__tabs`
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
+
className: `${baseClassName}__tabs-inner`
|
|
138
|
+
}, tabs))), suffix));
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
}
|
|
@@ -141,11 +146,13 @@ exports.default = Header;
|
|
|
141
146
|
onClose: _propTypes.default.func,
|
|
142
147
|
children: _propTypes.default.node.isRequired,
|
|
143
148
|
backButton: _propTypes.default.bool,
|
|
144
|
-
hideButton: _propTypes.default.bool
|
|
149
|
+
hideButton: _propTypes.default.bool,
|
|
150
|
+
tabs: _propTypes.default.node
|
|
145
151
|
});
|
|
146
152
|
(0, _defineProperty2.default)(Header, "defaultProps", {
|
|
147
153
|
onClose: null,
|
|
148
154
|
baseClassName: `${_constants.CLS_PREFIX}drawer-header`,
|
|
149
155
|
backButton: false,
|
|
150
|
-
hideButton: false
|
|
156
|
+
hideButton: false,
|
|
157
|
+
tabs: undefined
|
|
151
158
|
});
|
|
@@ -396,10 +396,10 @@ class Form extends _react.Component {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
}
|
|
399
|
-
/**
|
|
400
|
-
* `Form` component is used for entering and submitting of user data.
|
|
401
|
-
* [More details about designing of forms.](#!/Good%20Forms)
|
|
402
|
-
* @since 0.0.54
|
|
399
|
+
/**
|
|
400
|
+
* `Form` component is used for entering and submitting of user data.
|
|
401
|
+
* [More details about designing of forms.](#!/Good%20Forms)
|
|
402
|
+
* @since 0.0.54
|
|
403
403
|
*/
|
|
404
404
|
|
|
405
405
|
|