@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
|
@@ -10,112 +10,117 @@ import Header from './Header';
|
|
|
10
10
|
import ScrollDirection from './ScrollDirection';
|
|
11
11
|
import Form from '../Form';
|
|
12
12
|
import Heading from '../Heading';
|
|
13
|
-
import Text from '../Text';
|
|
14
13
|
import { isLikeText } from '../Translate';
|
|
15
14
|
import ScrollableElementFormContext from '../Form/ScrollableElementFormContext';
|
|
16
15
|
import DrawerProgress from './DrawerProgress';
|
|
17
16
|
const propTypes = {
|
|
18
|
-
/**
|
|
19
|
-
* Toggles visibility.
|
|
20
|
-
* @since 0.0.65
|
|
17
|
+
/**
|
|
18
|
+
* Toggles visibility.
|
|
19
|
+
* @since 0.0.65
|
|
21
20
|
*/
|
|
22
21
|
isOpen: PropTypes.bool,
|
|
23
22
|
|
|
24
|
-
/**
|
|
25
|
-
* The title of the `Drawer`.
|
|
26
|
-
* @since 0.0.65
|
|
23
|
+
/**
|
|
24
|
+
* The title of the `Drawer`.
|
|
25
|
+
* @since 0.0.65
|
|
27
26
|
*/
|
|
28
27
|
title: PropTypes.node.isRequired,
|
|
29
28
|
|
|
30
|
-
/**
|
|
31
|
-
* The subtitle of the `Drawer`.
|
|
32
|
-
* @since 0.0.65
|
|
29
|
+
/**
|
|
30
|
+
* The subtitle of the `Drawer`.
|
|
31
|
+
* @since 0.0.65
|
|
33
32
|
*/
|
|
34
33
|
subtitle: PropTypes.node,
|
|
35
34
|
|
|
36
|
-
/**
|
|
37
|
-
* Show the minimize button and the inactive close button.
|
|
38
|
-
* @since 1.4.1
|
|
35
|
+
/**
|
|
36
|
+
* Show the minimize button and the inactive close button.
|
|
37
|
+
* @since 1.4.1
|
|
39
38
|
*/
|
|
40
39
|
hideButton: PropTypes.bool,
|
|
41
40
|
|
|
42
|
-
/**
|
|
43
|
-
* Show back button in the header. If true the close button is not show.
|
|
44
|
-
* @deprecated Not recommended to use. Use default close button instead.
|
|
45
|
-
* @since 0.0.65
|
|
41
|
+
/**
|
|
42
|
+
* Show back button in the header. If true the close button is not show.
|
|
43
|
+
* @deprecated Not recommended to use. Use default close button instead.
|
|
44
|
+
* @since 0.0.65
|
|
46
45
|
*/
|
|
47
46
|
backButton: PropTypes.bool,
|
|
48
47
|
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @since
|
|
48
|
+
/**
|
|
49
|
+
* A slot for `Tabs` component.
|
|
50
|
+
* @since 3.26.0
|
|
51
|
+
*/
|
|
52
|
+
tabs: PropTypes.node,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Overlay placement.
|
|
56
|
+
* @since 0.0.65
|
|
52
57
|
*/
|
|
53
58
|
placement: PropTypes.oneOf(['left', 'right']),
|
|
54
59
|
|
|
55
|
-
/**
|
|
56
|
-
* Overlay size.
|
|
57
|
-
* @since 0.0.65
|
|
60
|
+
/**
|
|
61
|
+
* Overlay size.
|
|
62
|
+
* @since 0.0.65
|
|
58
63
|
*/
|
|
59
64
|
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
60
65
|
|
|
61
|
-
/**
|
|
62
|
-
* onClose handler.
|
|
63
|
-
* @since 0.0.65
|
|
66
|
+
/**
|
|
67
|
+
* onClose handler.
|
|
68
|
+
* @since 0.0.65
|
|
64
69
|
*/
|
|
65
70
|
onClose: PropTypes.func,
|
|
66
71
|
|
|
67
|
-
/**
|
|
68
|
-
* Whether show or not a confirmation dialog on close.
|
|
69
|
-
* @since 3.21.0
|
|
72
|
+
/**
|
|
73
|
+
* Whether show or not a confirmation dialog on close.
|
|
74
|
+
* @since 3.21.0
|
|
70
75
|
*/
|
|
71
76
|
closingConfirmation: PropTypes.bool,
|
|
72
77
|
|
|
73
|
-
/**
|
|
74
|
-
* Wraps children into [Form](#!/Form) if not empty.
|
|
75
|
-
* @since 0.0.66
|
|
78
|
+
/**
|
|
79
|
+
* Wraps children into [Form](#!/Form) if not empty.
|
|
80
|
+
* @since 0.0.66
|
|
76
81
|
*/
|
|
77
82
|
form: PropTypes.oneOfType([PropTypes.object, PropTypes.element]),
|
|
78
83
|
|
|
79
|
-
/**
|
|
80
|
-
* Block with an image, placed at the side of the component
|
|
81
|
-
* @since 3.25.0
|
|
84
|
+
/**
|
|
85
|
+
* Block with an image, placed at the side of the component
|
|
86
|
+
* @since 3.25.0
|
|
82
87
|
*/
|
|
83
88
|
sideBanner: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
84
89
|
|
|
85
|
-
/**
|
|
86
|
-
* Additional properties for the sideBanner
|
|
87
|
-
* @since 3.25.0
|
|
90
|
+
/**
|
|
91
|
+
* Additional properties for the sideBanner
|
|
92
|
+
* @since 3.25.0
|
|
88
93
|
*/
|
|
89
94
|
sideBannerContainer: PropTypes.shape({
|
|
90
|
-
/**
|
|
91
|
-
* Values for css background property
|
|
95
|
+
/**
|
|
96
|
+
* Values for css background property
|
|
92
97
|
*/
|
|
93
98
|
background: PropTypes.string,
|
|
94
99
|
|
|
95
|
-
/**
|
|
96
|
-
* One of: center, flex-start, flex-end
|
|
100
|
+
/**
|
|
101
|
+
* One of: center, flex-start, flex-end
|
|
97
102
|
*/
|
|
98
103
|
align: PropTypes.oneOf(['center', 'flex-start', 'flex-end'])
|
|
99
104
|
}),
|
|
100
105
|
|
|
101
|
-
/**
|
|
102
|
-
* Content of the `Drawer`.
|
|
103
|
-
* @since 0.0.65
|
|
106
|
+
/**
|
|
107
|
+
* Content of the `Drawer`.
|
|
108
|
+
* @since 0.0.65
|
|
104
109
|
*/
|
|
105
110
|
children: PropTypes.node,
|
|
106
111
|
|
|
107
|
-
/**
|
|
108
|
-
* Adds [Progress](#!/Progress) into footer.
|
|
109
|
-
* @since 1.11.0
|
|
112
|
+
/**
|
|
113
|
+
* Adds [Progress](#!/Progress) into footer.
|
|
114
|
+
* @since 1.11.0
|
|
110
115
|
*/
|
|
111
116
|
progress: PropTypes.shape({
|
|
112
|
-
/**
|
|
113
|
-
* A title for the progress.
|
|
117
|
+
/**
|
|
118
|
+
* A title for the progress.
|
|
114
119
|
*/
|
|
115
120
|
title: PropTypes.string,
|
|
116
121
|
|
|
117
|
-
/**
|
|
118
|
-
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
122
|
+
/**
|
|
123
|
+
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
119
124
|
*/
|
|
120
125
|
steps: PropTypes.arrayOf(PropTypes.shape({
|
|
121
126
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
@@ -124,35 +129,35 @@ const propTypes = {
|
|
|
124
129
|
icon: PropTypes.string
|
|
125
130
|
})).isRequired,
|
|
126
131
|
|
|
127
|
-
/**
|
|
128
|
-
* An option that controls drawer closing ability.
|
|
132
|
+
/**
|
|
133
|
+
* An option that controls drawer closing ability.
|
|
129
134
|
*/
|
|
130
135
|
cancelable: PropTypes.bool,
|
|
131
136
|
|
|
132
|
-
/**
|
|
133
|
-
* On overall status event handler.
|
|
134
|
-
* @since 3.8.0
|
|
137
|
+
/**
|
|
138
|
+
* On overall status event handler.
|
|
139
|
+
* @since 3.8.0
|
|
135
140
|
*/
|
|
136
141
|
onStatusChange: PropTypes.func,
|
|
137
142
|
|
|
138
|
-
/**
|
|
139
|
-
* @ignore
|
|
143
|
+
/**
|
|
144
|
+
* @ignore
|
|
140
145
|
*/
|
|
141
146
|
onClose: PropTypes.func,
|
|
142
147
|
|
|
143
|
-
/**
|
|
144
|
-
* @ignore
|
|
148
|
+
/**
|
|
149
|
+
* @ignore
|
|
145
150
|
*/
|
|
146
151
|
onClosableChange: PropTypes.func
|
|
147
152
|
}),
|
|
148
153
|
|
|
149
|
-
/**
|
|
150
|
-
* @ignore
|
|
154
|
+
/**
|
|
155
|
+
* @ignore
|
|
151
156
|
*/
|
|
152
157
|
className: PropTypes.string,
|
|
153
158
|
|
|
154
|
-
/**
|
|
155
|
-
* @ignore
|
|
159
|
+
/**
|
|
160
|
+
* @ignore
|
|
156
161
|
*/
|
|
157
162
|
baseClassName: PropTypes.string
|
|
158
163
|
};
|
|
@@ -161,6 +166,7 @@ const defaultProps = {
|
|
|
161
166
|
subtitle: '',
|
|
162
167
|
backButton: undefined,
|
|
163
168
|
hideButton: undefined,
|
|
169
|
+
tabs: undefined,
|
|
164
170
|
placement: 'left',
|
|
165
171
|
size: 'md',
|
|
166
172
|
onClose: null,
|
|
@@ -173,10 +179,10 @@ const defaultProps = {
|
|
|
173
179
|
className: null,
|
|
174
180
|
baseClassName: `${CLS_PREFIX}drawer`
|
|
175
181
|
};
|
|
176
|
-
/**
|
|
177
|
-
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
178
|
-
* The component is similar to `Dialog` but it is intended to work with more complex forms or lists.
|
|
179
|
-
* @since 0.0.65
|
|
182
|
+
/**
|
|
183
|
+
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
184
|
+
* The component is similar to `Dialog` but it is intended to work with more complex forms or lists.
|
|
185
|
+
* @since 0.0.65
|
|
180
186
|
*/
|
|
181
187
|
|
|
182
188
|
const Drawer = ({
|
|
@@ -187,6 +193,7 @@ const Drawer = ({
|
|
|
187
193
|
subtitle,
|
|
188
194
|
backButton,
|
|
189
195
|
hideButton,
|
|
196
|
+
tabs,
|
|
190
197
|
onClose,
|
|
191
198
|
form,
|
|
192
199
|
progress,
|
|
@@ -207,9 +214,23 @@ const Drawer = ({
|
|
|
207
214
|
if (progress) {
|
|
208
215
|
progress.onClose = onCloseWithConfirmation;
|
|
209
216
|
progress.onClosableChange = setIsClosable;
|
|
210
|
-
}
|
|
211
217
|
|
|
212
|
-
|
|
218
|
+
const drawerProgressRender = ({
|
|
219
|
+
content,
|
|
220
|
+
footer
|
|
221
|
+
}) => {
|
|
222
|
+
return render({
|
|
223
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
224
|
+
className: `${baseClassName}__form`
|
|
225
|
+
}, content),
|
|
226
|
+
footer
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
return /*#__PURE__*/React.createElement(DrawerProgress, _extends({
|
|
231
|
+
render: drawerProgressRender
|
|
232
|
+
}, progress));
|
|
233
|
+
}
|
|
213
234
|
|
|
214
235
|
if (form) {
|
|
215
236
|
if ( /*#__PURE__*/isValidElement(form)) {
|
|
@@ -224,7 +245,7 @@ const Drawer = ({
|
|
|
224
245
|
renderActionButtons
|
|
225
246
|
}) => render({
|
|
226
247
|
content: renderForm(),
|
|
227
|
-
footer:
|
|
248
|
+
footer: renderActionButtons()
|
|
228
249
|
})
|
|
229
250
|
});
|
|
230
251
|
}
|
|
@@ -245,25 +266,16 @@ const Drawer = ({
|
|
|
245
266
|
renderActionButtons
|
|
246
267
|
}) => render({
|
|
247
268
|
content: renderForm(),
|
|
248
|
-
footer:
|
|
269
|
+
footer: renderActionButtons()
|
|
249
270
|
})
|
|
250
271
|
}), children);
|
|
251
272
|
}
|
|
252
273
|
}
|
|
253
274
|
|
|
254
|
-
children = /*#__PURE__*/React.createElement("div", {
|
|
255
|
-
className: `${baseClassName}__inner-body`
|
|
256
|
-
}, children);
|
|
257
|
-
|
|
258
|
-
if (progress) {
|
|
259
|
-
return render({
|
|
260
|
-
content: children,
|
|
261
|
-
footer: createProgress()
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
|
|
265
275
|
return render({
|
|
266
|
-
content:
|
|
276
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
277
|
+
className: `${baseClassName}__inner-body`
|
|
278
|
+
}, children)
|
|
267
279
|
});
|
|
268
280
|
};
|
|
269
281
|
|
|
@@ -279,7 +291,8 @@ const Drawer = ({
|
|
|
279
291
|
}) => /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
|
|
280
292
|
backButton: backButton,
|
|
281
293
|
hideButton: typeof hideButton === 'boolean' ? hideButton : Boolean(progress && !isClosable),
|
|
282
|
-
onClose: onCloseWithConfirmation
|
|
294
|
+
onClose: onCloseWithConfirmation,
|
|
295
|
+
tabs: tabs
|
|
283
296
|
}, isLikeText(title) ? /*#__PURE__*/React.createElement(Heading, {
|
|
284
297
|
level: "2",
|
|
285
298
|
className: `${baseClassName}__title`
|
|
@@ -287,9 +300,7 @@ const Drawer = ({
|
|
|
287
300
|
className: `${baseClassName}__title`
|
|
288
301
|
}, title), subtitle && /*#__PURE__*/React.createElement("div", {
|
|
289
302
|
className: `${baseClassName}__subtitle`
|
|
290
|
-
},
|
|
291
|
-
intent: "muted"
|
|
292
|
-
}, subtitle) : subtitle)), /*#__PURE__*/React.createElement(ScrollDirection, null, ({
|
|
303
|
+
}, subtitle)), /*#__PURE__*/React.createElement(ScrollDirection, null, ({
|
|
293
304
|
handleScroll
|
|
294
305
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
295
306
|
className: `${baseClassName}__body`,
|
|
@@ -85,7 +85,7 @@ class DrawerProgress extends Component {
|
|
|
85
85
|
if (prevState.status !== STATUS_DONE && status === STATUS_DONE) {
|
|
86
86
|
window.clearTimeout(this.closeTimeout);
|
|
87
87
|
|
|
88
|
-
if (autoCloseTimeout) {
|
|
88
|
+
if (autoCloseTimeout !== undefined) {
|
|
89
89
|
this.closeTimeout = window.setTimeout(this.handleClose, autoCloseTimeout);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -105,7 +105,8 @@ class DrawerProgress extends Component {
|
|
|
105
105
|
title,
|
|
106
106
|
steps,
|
|
107
107
|
buttons,
|
|
108
|
-
cancelable
|
|
108
|
+
cancelable,
|
|
109
|
+
render
|
|
109
110
|
} = this.props;
|
|
110
111
|
const {
|
|
111
112
|
status
|
|
@@ -113,35 +114,35 @@ class DrawerProgress extends Component {
|
|
|
113
114
|
const isFinished = status === STATUS_DONE;
|
|
114
115
|
const isFailed = status === STATUS_ERROR;
|
|
115
116
|
const canCancel = cancelable && !(isFinished || isFailed);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return /*#__PURE__*/React.createElement(Fragment, null, title && /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
const hasFooter = !!(buttons || canCancel);
|
|
118
|
+
const content = /*#__PURE__*/React.createElement(Fragment, null, title && /*#__PURE__*/React.createElement("div", {
|
|
119
119
|
className: `${baseClassName}__title`
|
|
120
120
|
}, title), /*#__PURE__*/React.createElement(Progress, {
|
|
121
121
|
onStatusChange: this.handleStatusChange,
|
|
122
122
|
className: `${baseClassName}__progress`
|
|
123
123
|
}, steps.map((step, index) => /*#__PURE__*/React.createElement(ProgressStep, _extends({
|
|
124
124
|
key: index.toString()
|
|
125
|
-
}, step))))
|
|
125
|
+
}, step)))));
|
|
126
|
+
const footer = hasFooter ? /*#__PURE__*/React.createElement("div", {
|
|
126
127
|
className: `${baseClassName}__footer`
|
|
127
|
-
}, buttons,
|
|
128
|
-
onClick: this.
|
|
129
|
-
|
|
130
|
-
content: "DrawerProgress.closeButton",
|
|
131
|
-
fallback: "Close"
|
|
132
|
-
})), canCancel && /*#__PURE__*/React.createElement(Button, {
|
|
133
|
-
onClick: this.handleCancel
|
|
128
|
+
}, buttons, canCancel && /*#__PURE__*/React.createElement(Button, {
|
|
129
|
+
onClick: this.handleCancel,
|
|
130
|
+
size: "lg"
|
|
134
131
|
}, /*#__PURE__*/React.createElement(Translate, {
|
|
135
132
|
content: "DrawerProgress.cancelButton",
|
|
136
133
|
fallback: "Cancel"
|
|
137
|
-
})))
|
|
134
|
+
}))) : null;
|
|
135
|
+
return typeof render === 'function' ? render({
|
|
136
|
+
content,
|
|
137
|
+
footer
|
|
138
|
+
}) : /*#__PURE__*/React.createElement(Fragment, null, content, footer);
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
_defineProperty(DrawerProgress, "defaultProps", {
|
|
143
144
|
baseClassName: `${CLS_PREFIX}drawer-progress`,
|
|
144
|
-
autoCloseTimeout:
|
|
145
|
+
autoCloseTimeout: 0,
|
|
145
146
|
cancelable: false,
|
|
146
147
|
steps: []
|
|
147
148
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
// Copyright 1999-
|
|
3
|
+
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
4
4
|
import { isRtl } from '../../utils';
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -75,6 +75,7 @@ export default class Header extends Component {
|
|
|
75
75
|
children,
|
|
76
76
|
backButton,
|
|
77
77
|
hideButton,
|
|
78
|
+
tabs,
|
|
78
79
|
...props
|
|
79
80
|
} = this.props;
|
|
80
81
|
let prefix;
|
|
@@ -108,7 +109,11 @@ export default class Header extends Component {
|
|
|
108
109
|
className: `${baseClassName}__inner`
|
|
109
110
|
}, prefix, /*#__PURE__*/React.createElement("div", {
|
|
110
111
|
className: `${baseClassName}__content`
|
|
111
|
-
}, children
|
|
112
|
+
}, children, tabs && /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: `${baseClassName}__tabs`
|
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: `${baseClassName}__tabs-inner`
|
|
116
|
+
}, tabs))), suffix));
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
}
|
|
@@ -118,12 +123,14 @@ _defineProperty(Header, "propTypes", {
|
|
|
118
123
|
onClose: PropTypes.func,
|
|
119
124
|
children: PropTypes.node.isRequired,
|
|
120
125
|
backButton: PropTypes.bool,
|
|
121
|
-
hideButton: PropTypes.bool
|
|
126
|
+
hideButton: PropTypes.bool,
|
|
127
|
+
tabs: PropTypes.node
|
|
122
128
|
});
|
|
123
129
|
|
|
124
130
|
_defineProperty(Header, "defaultProps", {
|
|
125
131
|
onClose: null,
|
|
126
132
|
baseClassName: `${CLS_PREFIX}drawer-header`,
|
|
127
133
|
backButton: false,
|
|
128
|
-
hideButton: false
|
|
134
|
+
hideButton: false,
|
|
135
|
+
tabs: undefined
|
|
129
136
|
});
|
|
@@ -377,10 +377,10 @@ class Form extends Component {
|
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
}
|
|
380
|
-
/**
|
|
381
|
-
* `Form` component is used for entering and submitting of user data.
|
|
382
|
-
* [More details about designing of forms.](#!/Good%20Forms)
|
|
383
|
-
* @since 0.0.54
|
|
380
|
+
/**
|
|
381
|
+
* `Form` component is used for entering and submitting of user data.
|
|
382
|
+
* [More details about designing of forms.](#!/Good%20Forms)
|
|
383
|
+
* @since 0.0.54
|
|
384
384
|
*/
|
|
385
385
|
|
|
386
386
|
|