@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
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# UI Library
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
yarn add @plesk/ui-library
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
Here is an example of how to use the UI Library with `create-react-app`.
|
|
12
|
-
|
|
13
|
-
```shell
|
|
14
|
-
yarn create react-app example
|
|
15
|
-
cd example
|
|
16
|
-
yarn add @plesk/ui-library
|
|
17
|
-
yarn start
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Replace the contents of the `src/App.js` file with the following code:
|
|
21
|
-
|
|
22
|
-
```js
|
|
23
|
-
import { Layout, Button } from '@plesk/ui-library';
|
|
24
|
-
import '@plesk/ui-library/dist/plesk-ui-library.css';
|
|
25
|
-
|
|
26
|
-
function App() {
|
|
27
|
-
return (
|
|
28
|
-
<Layout>
|
|
29
|
-
<Button>{'Hello World!'}</Button>
|
|
30
|
-
</Layout>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default App;
|
|
35
|
-
```
|
|
1
|
+
# UI Library
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
yarn add @plesk/ui-library
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Here is an example of how to use the UI Library with `create-react-app`.
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
yarn create react-app example
|
|
15
|
+
cd example
|
|
16
|
+
yarn add @plesk/ui-library
|
|
17
|
+
yarn start
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Replace the contents of the `src/App.js` file with the following code:
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import { Layout, Button } from '@plesk/ui-library';
|
|
24
|
+
import '@plesk/ui-library/dist/plesk-ui-library.css';
|
|
25
|
+
|
|
26
|
+
function App() {
|
|
27
|
+
return (
|
|
28
|
+
<Layout>
|
|
29
|
+
<Button>{'Hello World!'}</Button>
|
|
30
|
+
</Layout>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default App;
|
|
35
|
+
```
|
|
@@ -27,9 +27,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
|
|
28
28
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* `Action` component is used mostly for navigation, to go between pages, and not for immediate action or submitting data.
|
|
32
|
-
* @since 0.0.68
|
|
30
|
+
/**
|
|
31
|
+
* `Action` component is used mostly for navigation, to go between pages, and not for immediate action or submitting data.
|
|
32
|
+
* @since 0.0.68
|
|
33
33
|
*/
|
|
34
34
|
const Action = ({
|
|
35
35
|
baseClassName = `${_constants.CLS_PREFIX}action`,
|
|
@@ -88,10 +88,10 @@ const renderCaret = ({
|
|
|
88
88
|
|
|
89
89
|
return caretElement;
|
|
90
90
|
};
|
|
91
|
-
/**
|
|
92
|
-
* `Button` component is used for executing actions, changing the application state, opening forms or dialog windows, and submitting data.
|
|
93
|
-
* As a rule, you should not use buttons for navigation between individual pages (use `Link` instead).
|
|
94
|
-
* @since 0.0.37
|
|
91
|
+
/**
|
|
92
|
+
* `Button` component is used for executing actions, changing the application state, opening forms or dialog windows, and submitting data.
|
|
93
|
+
* As a rule, you should not use buttons for navigation between individual pages (use `Link` instead).
|
|
94
|
+
* @since 0.0.37
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
|
|
@@ -211,97 +211,97 @@ const Button = ({
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
Button.propTypes = {
|
|
214
|
-
/**
|
|
215
|
-
* Button size.
|
|
216
|
-
* @since 2.5.0
|
|
214
|
+
/**
|
|
215
|
+
* Button size.
|
|
216
|
+
* @since 2.5.0
|
|
217
217
|
*/
|
|
218
218
|
size: _propTypes.default.oneOf(['md', 'lg']),
|
|
219
219
|
|
|
220
|
-
/**
|
|
221
|
-
* Visual intent color to apply to component.
|
|
222
|
-
* @since 0.0.42
|
|
220
|
+
/**
|
|
221
|
+
* Visual intent color to apply to component.
|
|
222
|
+
* @since 0.0.42
|
|
223
223
|
*/
|
|
224
224
|
intent: _propTypes.default.oneOf(['primary', 'secondary', 'success', 'warning', 'danger', 'info']),
|
|
225
225
|
|
|
226
|
-
/**
|
|
227
|
-
* Display button with transparent background.
|
|
228
|
-
* @since 2.1.0
|
|
226
|
+
/**
|
|
227
|
+
* Display button with transparent background.
|
|
228
|
+
* @since 2.1.0
|
|
229
229
|
*/
|
|
230
230
|
ghost: _propTypes.default.bool,
|
|
231
231
|
|
|
232
|
-
/**
|
|
233
|
-
* Arrow button.
|
|
234
|
-
* @since 2.6.0
|
|
232
|
+
/**
|
|
233
|
+
* Arrow button.
|
|
234
|
+
* @since 2.6.0
|
|
235
235
|
*/
|
|
236
236
|
arrow: _propTypes.default.oneOf(['forward', 'backward']),
|
|
237
237
|
|
|
238
|
-
/**
|
|
239
|
-
* Selected state of toggle button. Used in controlled component mode.
|
|
240
|
-
* @since 0.0.68
|
|
238
|
+
/**
|
|
239
|
+
* Selected state of toggle button. Used in controlled component mode.
|
|
240
|
+
* @since 0.0.68
|
|
241
241
|
*/
|
|
242
242
|
selected: _propTypes.default.bool,
|
|
243
243
|
|
|
244
|
-
/**
|
|
245
|
-
* Toggle button callback. Used in uncontrolled component mode.
|
|
246
|
-
* @since 0.0.68
|
|
244
|
+
/**
|
|
245
|
+
* Toggle button callback. Used in uncontrolled component mode.
|
|
246
|
+
* @since 0.0.68
|
|
247
247
|
*/
|
|
248
248
|
onToggle: _propTypes.default.func,
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
* State of the button
|
|
252
|
-
* @since 0.0.42
|
|
250
|
+
/**
|
|
251
|
+
* State of the button
|
|
252
|
+
* @since 0.0.42
|
|
253
253
|
*/
|
|
254
254
|
state: _propTypes.default.oneOf(['active', 'loading', 'hovered', 'focused']),
|
|
255
255
|
|
|
256
|
-
/**
|
|
257
|
-
* Is button disabled?
|
|
258
|
-
* @since 0.0.42
|
|
256
|
+
/**
|
|
257
|
+
* Is button disabled?
|
|
258
|
+
* @since 0.0.42
|
|
259
259
|
*/
|
|
260
260
|
disabled: _propTypes.default.bool,
|
|
261
261
|
|
|
262
|
-
/**
|
|
263
|
-
* Tooltip for component
|
|
264
|
-
* @since 0.0.42
|
|
262
|
+
/**
|
|
263
|
+
* Tooltip for component
|
|
264
|
+
* @since 0.0.42
|
|
265
265
|
*/
|
|
266
266
|
tooltip: _propTypes.default.node,
|
|
267
267
|
|
|
268
|
-
/**
|
|
269
|
-
* Name of icon or [Icon](#!/Icon) component
|
|
270
|
-
* @since 0.0.42
|
|
268
|
+
/**
|
|
269
|
+
* Name of icon or [Icon](#!/Icon) component
|
|
270
|
+
* @since 0.0.42
|
|
271
271
|
*/
|
|
272
272
|
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
273
273
|
|
|
274
|
-
/**
|
|
275
|
-
* Show caret
|
|
276
|
-
* @since 0.0.42
|
|
274
|
+
/**
|
|
275
|
+
* Show caret
|
|
276
|
+
* @since 0.0.42
|
|
277
277
|
*/
|
|
278
278
|
caret: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.element]),
|
|
279
279
|
|
|
280
|
-
/**
|
|
281
|
-
* Dynamically expand the button to fill out the whole available width of its parent container.
|
|
282
|
-
* @since 1.8.0
|
|
280
|
+
/**
|
|
281
|
+
* Dynamically expand the button to fill out the whole available width of its parent container.
|
|
282
|
+
* @since 1.8.0
|
|
283
283
|
*/
|
|
284
284
|
fill: _propTypes.default.bool,
|
|
285
285
|
|
|
286
|
-
/**
|
|
287
|
-
* Content of the button
|
|
288
|
-
* @since 0.0.37
|
|
286
|
+
/**
|
|
287
|
+
* Content of the button
|
|
288
|
+
* @since 0.0.37
|
|
289
289
|
*/
|
|
290
290
|
children: _propTypes.default.node,
|
|
291
291
|
|
|
292
|
-
/**
|
|
293
|
-
* Component to render as the root element. Useful when rendering a `Button` as `<a>` or `<Link>`.
|
|
294
|
-
* @since 0.0.42
|
|
292
|
+
/**
|
|
293
|
+
* Component to render as the root element. Useful when rendering a `Button` as `<a>` or `<Link>`.
|
|
294
|
+
* @since 0.0.42
|
|
295
295
|
*/
|
|
296
296
|
component: _propTypes.default.elementType,
|
|
297
297
|
|
|
298
|
-
/**
|
|
299
|
-
* @ignore
|
|
298
|
+
/**
|
|
299
|
+
* @ignore
|
|
300
300
|
*/
|
|
301
301
|
className: _propTypes.default.string,
|
|
302
302
|
|
|
303
|
-
/**
|
|
304
|
-
* @ignore
|
|
303
|
+
/**
|
|
304
|
+
* @ignore
|
|
305
305
|
*/
|
|
306
306
|
baseClassName: _propTypes.default.string
|
|
307
307
|
};
|
|
@@ -19,9 +19,9 @@ var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
|
19
19
|
|
|
20
20
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* `Checkbox` component is used for turning an option on or off and selecting or deselecting an item.
|
|
24
|
-
* @since 0.0.55
|
|
22
|
+
/**
|
|
23
|
+
* `Checkbox` component is used for turning an option on or off and selecting or deselecting an item.
|
|
24
|
+
* @since 0.0.55
|
|
25
25
|
*/
|
|
26
26
|
const Checkbox = ({
|
|
27
27
|
baseClassName = `${_constants.CLS_PREFIX}checkbox`,
|
|
@@ -27,9 +27,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* `CodeEditor` component is used for editing text as code with proper color highlighting according to selected programming language.
|
|
32
|
-
* @since 0.0.61
|
|
30
|
+
/**
|
|
31
|
+
* `CodeEditor` component is used for editing text as code with proper color highlighting according to selected programming language.
|
|
32
|
+
* @since 0.0.61
|
|
33
33
|
*/
|
|
34
34
|
class CodeEditor extends _react.Component {
|
|
35
35
|
constructor(...args) {
|
|
@@ -232,82 +232,82 @@ class CodeEditor extends _react.Component {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
CodeEditor.propTypes = {
|
|
235
|
-
/**
|
|
236
|
-
* The mode to use. When not given, this will default to the first mode that was loaded.
|
|
237
|
-
* @since 0.0.61
|
|
235
|
+
/**
|
|
236
|
+
* The mode to use. When not given, this will default to the first mode that was loaded.
|
|
237
|
+
* @since 0.0.61
|
|
238
238
|
*/
|
|
239
239
|
mode: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
|
|
240
240
|
|
|
241
|
-
/**
|
|
242
|
-
* CodeEditor can detect mode by file name. Will be ignored if you set mode property.
|
|
243
|
-
* @since 0.0.61
|
|
241
|
+
/**
|
|
242
|
+
* CodeEditor can detect mode by file name. Will be ignored if you set mode property.
|
|
243
|
+
* @since 0.0.61
|
|
244
244
|
*/
|
|
245
245
|
fileName: _propTypes.default.string,
|
|
246
246
|
|
|
247
|
-
/**
|
|
248
|
-
* Content of the `CodeEditor`.
|
|
249
|
-
* @since 0.0.61
|
|
247
|
+
/**
|
|
248
|
+
* Content of the `CodeEditor`.
|
|
249
|
+
* @since 0.0.61
|
|
250
250
|
*/
|
|
251
251
|
children: _propTypes.default.string,
|
|
252
252
|
|
|
253
|
-
/**
|
|
254
|
-
* Set read only.
|
|
255
|
-
* @since 0.0.61
|
|
253
|
+
/**
|
|
254
|
+
* Set read only.
|
|
255
|
+
* @since 0.0.61
|
|
256
256
|
*/
|
|
257
257
|
readOnly: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
|
|
258
258
|
|
|
259
|
-
/**
|
|
260
|
-
* Set auto focus.
|
|
261
|
-
* @since 0.0.61
|
|
259
|
+
/**
|
|
260
|
+
* Set auto focus.
|
|
261
|
+
* @since 0.0.61
|
|
262
262
|
*/
|
|
263
263
|
autofocus: _propTypes.default.bool,
|
|
264
264
|
|
|
265
|
-
/**
|
|
266
|
-
* onInit event handler.
|
|
267
|
-
* @since 0.0.61
|
|
265
|
+
/**
|
|
266
|
+
* onInit event handler.
|
|
267
|
+
* @since 0.0.61
|
|
268
268
|
*/
|
|
269
269
|
onInit: _propTypes.default.func,
|
|
270
270
|
|
|
271
|
-
/**
|
|
272
|
-
* onChange event handler.
|
|
273
|
-
* @since 0.0.61
|
|
271
|
+
/**
|
|
272
|
+
* onChange event handler.
|
|
273
|
+
* @since 0.0.61
|
|
274
274
|
*/
|
|
275
275
|
onChange: _propTypes.default.func,
|
|
276
276
|
|
|
277
|
-
/**
|
|
278
|
-
* onSave event handler.
|
|
279
|
-
* @since 0.0.61
|
|
277
|
+
/**
|
|
278
|
+
* onSave event handler.
|
|
279
|
+
* @since 0.0.61
|
|
280
280
|
*/
|
|
281
281
|
onSave: _propTypes.default.func,
|
|
282
282
|
|
|
283
|
-
/**
|
|
284
|
-
* See all supported options in [CodeMirror](https://codemirror.net/doc/manual.html#config) documentation.
|
|
285
|
-
* @since 0.0.61
|
|
283
|
+
/**
|
|
284
|
+
* See all supported options in [CodeMirror](https://codemirror.net/doc/manual.html#config) documentation.
|
|
285
|
+
* @since 0.0.61
|
|
286
286
|
*/
|
|
287
287
|
options: _propTypes.default.object,
|
|
288
288
|
|
|
289
|
-
/**
|
|
290
|
-
* Set scroll position.
|
|
291
|
-
* @since 1.12.4
|
|
289
|
+
/**
|
|
290
|
+
* Set scroll position.
|
|
291
|
+
* @since 1.12.4
|
|
292
292
|
*/
|
|
293
293
|
scrollPosition: _propTypes.default.shape({
|
|
294
294
|
left: _propTypes.default.number,
|
|
295
295
|
top: _propTypes.default.number
|
|
296
296
|
}),
|
|
297
297
|
|
|
298
|
-
/**
|
|
299
|
-
* onScroll event handler.
|
|
300
|
-
* @since 1.12.4
|
|
298
|
+
/**
|
|
299
|
+
* onScroll event handler.
|
|
300
|
+
* @since 1.12.4
|
|
301
301
|
*/
|
|
302
302
|
onScroll: _propTypes.default.func,
|
|
303
303
|
|
|
304
|
-
/**
|
|
305
|
-
* @ignore
|
|
304
|
+
/**
|
|
305
|
+
* @ignore
|
|
306
306
|
*/
|
|
307
307
|
className: _propTypes.default.string,
|
|
308
308
|
|
|
309
|
-
/**
|
|
310
|
-
* @ignore
|
|
309
|
+
/**
|
|
310
|
+
* @ignore
|
|
311
311
|
*/
|
|
312
312
|
baseClassName: _propTypes.default.string
|
|
313
313
|
};
|
|
@@ -41,9 +41,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
41
41
|
|
|
42
42
|
/* eslint-disable react/no-deprecated */
|
|
43
43
|
const isProps = value => value && typeof value === 'object' && ! /*#__PURE__*/(0, _react.isValidElement)(value);
|
|
44
|
-
/**
|
|
45
|
-
* `Dialog` is a modal window that asks users to make a decision or enter additional information.
|
|
46
|
-
* @since 0.0.68
|
|
44
|
+
/**
|
|
45
|
+
* `Dialog` is a modal window that asks users to make a decision or enter additional information.
|
|
46
|
+
* @since 0.0.68
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
|
|
@@ -209,126 +209,126 @@ const Dialog = ({
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
Dialog.propTypes = {
|
|
212
|
-
/**
|
|
213
|
-
* Toggles visibility.
|
|
214
|
-
* @since 0.0.68
|
|
212
|
+
/**
|
|
213
|
+
* Toggles visibility.
|
|
214
|
+
* @since 0.0.68
|
|
215
215
|
*/
|
|
216
216
|
isOpen: _propTypes.default.bool,
|
|
217
217
|
|
|
218
|
-
/**
|
|
219
|
-
* Banner. Renders in front of content as wide as dialog.
|
|
220
|
-
* @since 0.0.68
|
|
218
|
+
/**
|
|
219
|
+
* Banner. Renders in front of content as wide as dialog.
|
|
220
|
+
* @since 0.0.68
|
|
221
221
|
*/
|
|
222
222
|
banner: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
223
223
|
|
|
224
|
-
/**
|
|
225
|
-
* Block with an image, placed at the side of the component
|
|
226
|
-
* @since 3.25.0
|
|
224
|
+
/**
|
|
225
|
+
* Block with an image, placed at the side of the component
|
|
226
|
+
* @since 3.25.0
|
|
227
227
|
*/
|
|
228
228
|
sideBanner: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
229
229
|
|
|
230
|
-
/**
|
|
231
|
-
* Additional properties for the sideBanner
|
|
232
|
-
* @since 3.25.0
|
|
230
|
+
/**
|
|
231
|
+
* Additional properties for the sideBanner
|
|
232
|
+
* @since 3.25.0
|
|
233
233
|
*/
|
|
234
234
|
sideBannerContainer: _propTypes.default.shape({
|
|
235
|
-
/**
|
|
236
|
-
* Values for css background property
|
|
235
|
+
/**
|
|
236
|
+
* Values for css background property
|
|
237
237
|
*/
|
|
238
238
|
background: _propTypes.default.string,
|
|
239
239
|
|
|
240
|
-
/**
|
|
241
|
-
* One of: center, flex-start, flex-end
|
|
240
|
+
/**
|
|
241
|
+
* One of: center, flex-start, flex-end
|
|
242
242
|
*/
|
|
243
243
|
align: _propTypes.default.oneOf(['center', 'flex-start', 'flex-end'])
|
|
244
244
|
}),
|
|
245
245
|
|
|
246
|
-
/**
|
|
247
|
-
* Image. Renders into content.
|
|
248
|
-
* @since 0.0.68
|
|
246
|
+
/**
|
|
247
|
+
* Image. Renders into content.
|
|
248
|
+
* @since 0.0.68
|
|
249
249
|
*/
|
|
250
250
|
image: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
251
251
|
|
|
252
|
-
/**
|
|
253
|
-
* Title
|
|
254
|
-
* @since 0.0.68
|
|
252
|
+
/**
|
|
253
|
+
* Title
|
|
254
|
+
* @since 0.0.68
|
|
255
255
|
*/
|
|
256
256
|
title: _propTypes.default.node,
|
|
257
257
|
|
|
258
|
-
/**
|
|
259
|
-
* The subtitle of the `Dialog`.
|
|
260
|
-
* @since 4.0.0
|
|
258
|
+
/**
|
|
259
|
+
* The subtitle of the `Dialog`.
|
|
260
|
+
* @since 4.0.0
|
|
261
261
|
*/
|
|
262
262
|
subtitle: _propTypes.default.node,
|
|
263
263
|
|
|
264
|
-
/**
|
|
265
|
-
* Title of "cancel" button
|
|
266
|
-
* @since 0.0.68
|
|
267
|
-
* @deprecated Use `cancelButton` instead.
|
|
264
|
+
/**
|
|
265
|
+
* Title of "cancel" button
|
|
266
|
+
* @since 0.0.68
|
|
267
|
+
* @deprecated Use `cancelButton` instead.
|
|
268
268
|
*/
|
|
269
269
|
cancelTitle: _propTypes.default.node,
|
|
270
270
|
|
|
271
|
-
/**
|
|
272
|
-
* Cancel button visibility or custom configuration. It accepts all props of the `Button` component.
|
|
273
|
-
* @since 3.13.0
|
|
271
|
+
/**
|
|
272
|
+
* Cancel button visibility or custom configuration. It accepts all props of the `Button` component.
|
|
273
|
+
* @since 3.13.0
|
|
274
274
|
*/
|
|
275
275
|
cancelButton: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),
|
|
276
276
|
|
|
277
|
-
/**
|
|
278
|
-
* Buttons except "cancel" button
|
|
279
|
-
* @since 0.0.68
|
|
277
|
+
/**
|
|
278
|
+
* Buttons except "cancel" button
|
|
279
|
+
* @since 0.0.68
|
|
280
280
|
*/
|
|
281
281
|
buttons: _propTypes.default.node,
|
|
282
282
|
|
|
283
|
-
/**
|
|
284
|
-
* Actions which will be shown in Dialog header
|
|
285
|
-
* @since 1.2.0
|
|
283
|
+
/**
|
|
284
|
+
* Actions which will be shown in Dialog header
|
|
285
|
+
* @since 1.2.0
|
|
286
286
|
*/
|
|
287
287
|
actions: _propTypes.default.node,
|
|
288
288
|
|
|
289
|
-
/**
|
|
290
|
-
* Wraps children into [Form](#!/Form) if not empty.
|
|
291
|
-
* @since 0.0.68
|
|
289
|
+
/**
|
|
290
|
+
* Wraps children into [Form](#!/Form) if not empty.
|
|
291
|
+
* @since 0.0.68
|
|
292
292
|
*/
|
|
293
293
|
form: _propTypes.default.object,
|
|
294
294
|
|
|
295
|
-
/**
|
|
296
|
-
* Dialog width
|
|
297
|
-
* @since 0.0.68
|
|
295
|
+
/**
|
|
296
|
+
* Dialog width
|
|
297
|
+
* @since 0.0.68
|
|
298
298
|
*/
|
|
299
299
|
size: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
300
300
|
|
|
301
|
-
/**
|
|
302
|
-
* If the value is false, the dialog cannot be closed and the Close button is hidden.
|
|
303
|
-
* @since 1.2.0
|
|
301
|
+
/**
|
|
302
|
+
* If the value is false, the dialog cannot be closed and the Close button is hidden.
|
|
303
|
+
* @since 1.2.0
|
|
304
304
|
*/
|
|
305
305
|
closable: _propTypes.default.bool,
|
|
306
306
|
|
|
307
|
-
/**
|
|
308
|
-
* On close event handler. Called immediately after dialog closed by "cancel" button or "Esc" key.
|
|
309
|
-
* @since 0.0.68
|
|
307
|
+
/**
|
|
308
|
+
* On close event handler. Called immediately after dialog closed by "cancel" button or "Esc" key.
|
|
309
|
+
* @since 0.0.68
|
|
310
310
|
*/
|
|
311
311
|
onClose: _propTypes.default.func,
|
|
312
312
|
|
|
313
|
-
/**
|
|
314
|
-
* Whether show or not a confirmation dialog on close.
|
|
315
|
-
* @since 3.21.0
|
|
313
|
+
/**
|
|
314
|
+
* Whether show or not a confirmation dialog on close.
|
|
315
|
+
* @since 3.21.0
|
|
316
316
|
*/
|
|
317
317
|
closingConfirmation: _propTypes.default.bool,
|
|
318
318
|
|
|
319
|
-
/**
|
|
320
|
-
* Content of the `DialogWindow`.
|
|
321
|
-
* @since 0.0.68
|
|
319
|
+
/**
|
|
320
|
+
* Content of the `DialogWindow`.
|
|
321
|
+
* @since 0.0.68
|
|
322
322
|
*/
|
|
323
323
|
children: _propTypes.default.node,
|
|
324
324
|
|
|
325
|
-
/**
|
|
326
|
-
* @ignore
|
|
325
|
+
/**
|
|
326
|
+
* @ignore
|
|
327
327
|
*/
|
|
328
328
|
className: _propTypes.default.string,
|
|
329
329
|
|
|
330
|
-
/**
|
|
331
|
-
* @ignore
|
|
330
|
+
/**
|
|
331
|
+
* @ignore
|
|
332
332
|
*/
|
|
333
333
|
baseClassName: _propTypes.default.string
|
|
334
334
|
};
|