@plesk/ui-library 3.25.3 → 3.25.4
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 +68 -68
- package/cjs/components/Form/Form.js +4 -4
- package/cjs/components/FormField/FormField.js +78 -78
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +34 -34
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +3 -1
- package/cjs/components/Icon/Icon.js +6 -6
- package/cjs/components/Icon/images/symbols.svg +1631 -1631
- package/cjs/components/InputNumber/InputNumber.js +3 -3
- package/cjs/components/Item/Item.js +38 -38
- package/cjs/components/ItemList/ItemList.js +4 -4
- package/cjs/components/Layout/Layout.js +55 -55
- package/cjs/components/List/List.js +133 -133
- 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/Popper/Popper.js +30 -30
- package/cjs/components/Section/Section.js +36 -36
- package/cjs/components/Select/Select.js +3 -3
- 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 +1631 -1631
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +825 -823
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +825 -823
- 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 +68 -68
- package/esm/components/Form/Form.js +4 -4
- package/esm/components/FormField/FormField.js +78 -78
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
- package/esm/components/FormFieldPassword/FormFieldPassword.js +34 -34
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +3 -1
- package/esm/components/Icon/Icon.js +6 -6
- package/esm/components/Icon/images/symbols.svg +1631 -1631
- package/esm/components/InputNumber/InputNumber.js +3 -3
- package/esm/components/Item/Item.js +38 -38
- package/esm/components/ItemList/ItemList.js +4 -4
- package/esm/components/Layout/Layout.js +55 -55
- package/esm/components/List/List.js +133 -133
- 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/Popper/Popper.js +30 -30
- package/esm/components/Section/Section.js +36 -36
- package/esm/components/Select/Select.js +3 -3
- 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 +145 -145
- package/styleguide/build/bundle.cef4705c.js +2 -0
- package/styleguide/build/{bundle.47dacd83.js.LICENSE.txt → bundle.cef4705c.js.LICENSE.txt} +0 -0
- package/styleguide/images/symbols.svg +1631 -1631
- package/styleguide/index.html +2 -2
- package/styleguide/build/bundle.47dacd83.js +0 -2
|
@@ -15,107 +15,107 @@ import { isLikeText } from '../Translate';
|
|
|
15
15
|
import ScrollableElementFormContext from '../Form/ScrollableElementFormContext';
|
|
16
16
|
import DrawerProgress from './DrawerProgress';
|
|
17
17
|
const propTypes = {
|
|
18
|
-
/**
|
|
19
|
-
* Toggles visibility.
|
|
20
|
-
* @since 0.0.65
|
|
18
|
+
/**
|
|
19
|
+
* Toggles visibility.
|
|
20
|
+
* @since 0.0.65
|
|
21
21
|
*/
|
|
22
22
|
isOpen: PropTypes.bool,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* The title of the `Drawer`.
|
|
26
|
-
* @since 0.0.65
|
|
24
|
+
/**
|
|
25
|
+
* The title of the `Drawer`.
|
|
26
|
+
* @since 0.0.65
|
|
27
27
|
*/
|
|
28
28
|
title: PropTypes.node.isRequired,
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* The subtitle of the `Drawer`.
|
|
32
|
-
* @since 0.0.65
|
|
30
|
+
/**
|
|
31
|
+
* The subtitle of the `Drawer`.
|
|
32
|
+
* @since 0.0.65
|
|
33
33
|
*/
|
|
34
34
|
subtitle: PropTypes.node,
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Show the minimize button and the inactive close button.
|
|
38
|
-
* @since 1.4.1
|
|
36
|
+
/**
|
|
37
|
+
* Show the minimize button and the inactive close button.
|
|
38
|
+
* @since 1.4.1
|
|
39
39
|
*/
|
|
40
40
|
hideButton: PropTypes.bool,
|
|
41
41
|
|
|
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
|
|
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
|
|
46
46
|
*/
|
|
47
47
|
backButton: PropTypes.bool,
|
|
48
48
|
|
|
49
|
-
/**
|
|
50
|
-
* Overlay placement.
|
|
51
|
-
* @since 0.0.65
|
|
49
|
+
/**
|
|
50
|
+
* Overlay placement.
|
|
51
|
+
* @since 0.0.65
|
|
52
52
|
*/
|
|
53
53
|
placement: PropTypes.oneOf(['left', 'right']),
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* Overlay size.
|
|
57
|
-
* @since 0.0.65
|
|
55
|
+
/**
|
|
56
|
+
* Overlay size.
|
|
57
|
+
* @since 0.0.65
|
|
58
58
|
*/
|
|
59
59
|
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* onClose handler.
|
|
63
|
-
* @since 0.0.65
|
|
61
|
+
/**
|
|
62
|
+
* onClose handler.
|
|
63
|
+
* @since 0.0.65
|
|
64
64
|
*/
|
|
65
65
|
onClose: PropTypes.func,
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* Whether show or not a confirmation dialog on close.
|
|
69
|
-
* @since 3.21.0
|
|
67
|
+
/**
|
|
68
|
+
* Whether show or not a confirmation dialog on close.
|
|
69
|
+
* @since 3.21.0
|
|
70
70
|
*/
|
|
71
71
|
closingConfirmation: PropTypes.bool,
|
|
72
72
|
|
|
73
|
-
/**
|
|
74
|
-
* Wraps children into [Form](#!/Form) if not empty.
|
|
75
|
-
* @since 0.0.66
|
|
73
|
+
/**
|
|
74
|
+
* Wraps children into [Form](#!/Form) if not empty.
|
|
75
|
+
* @since 0.0.66
|
|
76
76
|
*/
|
|
77
77
|
form: PropTypes.oneOfType([PropTypes.object, PropTypes.element]),
|
|
78
78
|
|
|
79
|
-
/**
|
|
80
|
-
* Block with an image, placed at the side of the component
|
|
81
|
-
* @since 3.25.0
|
|
79
|
+
/**
|
|
80
|
+
* Block with an image, placed at the side of the component
|
|
81
|
+
* @since 3.25.0
|
|
82
82
|
*/
|
|
83
83
|
sideBanner: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Additional properties for the sideBanner
|
|
87
|
-
* @since 3.25.0
|
|
85
|
+
/**
|
|
86
|
+
* Additional properties for the sideBanner
|
|
87
|
+
* @since 3.25.0
|
|
88
88
|
*/
|
|
89
89
|
sideBannerContainer: PropTypes.shape({
|
|
90
|
-
/**
|
|
91
|
-
* Values for css background property
|
|
90
|
+
/**
|
|
91
|
+
* Values for css background property
|
|
92
92
|
*/
|
|
93
93
|
background: PropTypes.string,
|
|
94
94
|
|
|
95
|
-
/**
|
|
96
|
-
* One of: center, flex-start, flex-end
|
|
95
|
+
/**
|
|
96
|
+
* One of: center, flex-start, flex-end
|
|
97
97
|
*/
|
|
98
98
|
align: PropTypes.oneOf(['center', 'flex-start', 'flex-end'])
|
|
99
99
|
}),
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
* Content of the `Drawer`.
|
|
103
|
-
* @since 0.0.65
|
|
101
|
+
/**
|
|
102
|
+
* Content of the `Drawer`.
|
|
103
|
+
* @since 0.0.65
|
|
104
104
|
*/
|
|
105
105
|
children: PropTypes.node,
|
|
106
106
|
|
|
107
|
-
/**
|
|
108
|
-
* Adds [Progress](#!/Progress) into footer.
|
|
109
|
-
* @since 1.11.0
|
|
107
|
+
/**
|
|
108
|
+
* Adds [Progress](#!/Progress) into footer.
|
|
109
|
+
* @since 1.11.0
|
|
110
110
|
*/
|
|
111
111
|
progress: PropTypes.shape({
|
|
112
|
-
/**
|
|
113
|
-
* A title for the progress.
|
|
112
|
+
/**
|
|
113
|
+
* A title for the progress.
|
|
114
114
|
*/
|
|
115
115
|
title: PropTypes.string,
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
117
|
+
/**
|
|
118
|
+
* An array of [ProgressStep](#!/ProgressStep) props.
|
|
119
119
|
*/
|
|
120
120
|
steps: PropTypes.arrayOf(PropTypes.shape({
|
|
121
121
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
@@ -124,35 +124,35 @@ const propTypes = {
|
|
|
124
124
|
icon: PropTypes.string
|
|
125
125
|
})).isRequired,
|
|
126
126
|
|
|
127
|
-
/**
|
|
128
|
-
* An option that controls drawer closing ability.
|
|
127
|
+
/**
|
|
128
|
+
* An option that controls drawer closing ability.
|
|
129
129
|
*/
|
|
130
130
|
cancelable: PropTypes.bool,
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* On overall status event handler.
|
|
134
|
-
* @since 3.8.0
|
|
132
|
+
/**
|
|
133
|
+
* On overall status event handler.
|
|
134
|
+
* @since 3.8.0
|
|
135
135
|
*/
|
|
136
136
|
onStatusChange: PropTypes.func,
|
|
137
137
|
|
|
138
|
-
/**
|
|
139
|
-
* @ignore
|
|
138
|
+
/**
|
|
139
|
+
* @ignore
|
|
140
140
|
*/
|
|
141
141
|
onClose: PropTypes.func,
|
|
142
142
|
|
|
143
|
-
/**
|
|
144
|
-
* @ignore
|
|
143
|
+
/**
|
|
144
|
+
* @ignore
|
|
145
145
|
*/
|
|
146
146
|
onClosableChange: PropTypes.func
|
|
147
147
|
}),
|
|
148
148
|
|
|
149
|
-
/**
|
|
150
|
-
* @ignore
|
|
149
|
+
/**
|
|
150
|
+
* @ignore
|
|
151
151
|
*/
|
|
152
152
|
className: PropTypes.string,
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* @ignore
|
|
154
|
+
/**
|
|
155
|
+
* @ignore
|
|
156
156
|
*/
|
|
157
157
|
baseClassName: PropTypes.string
|
|
158
158
|
};
|
|
@@ -173,10 +173,10 @@ const defaultProps = {
|
|
|
173
173
|
className: null,
|
|
174
174
|
baseClassName: "".concat(CLS_PREFIX, "drawer")
|
|
175
175
|
};
|
|
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
|
|
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
|
|
180
180
|
*/
|
|
181
181
|
|
|
182
182
|
const Drawer = ({
|
|
@@ -376,10 +376,10 @@ class Form extends Component {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
}
|
|
379
|
-
/**
|
|
380
|
-
* `Form` component is used for entering and submitting of user data.
|
|
381
|
-
* [More details about designing of forms.](#!/Good%20Forms)
|
|
382
|
-
* @since 0.0.54
|
|
379
|
+
/**
|
|
380
|
+
* `Form` component is used for entering and submitting of user data.
|
|
381
|
+
* [More details about designing of forms.](#!/Good%20Forms)
|
|
382
|
+
* @since 0.0.54
|
|
383
383
|
*/
|
|
384
384
|
|
|
385
385
|
|
|
@@ -22,11 +22,11 @@ import VerticalContext from '../VerticalContext';
|
|
|
22
22
|
import ScrollableElementFormContext from '../Form/ScrollableElementFormContext';
|
|
23
23
|
import DisabledContext from '../Form/DisabledContext';
|
|
24
24
|
const defaultValue = undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Simple helper to handle situations when we expecting only array
|
|
27
|
-
* @param value
|
|
28
|
-
* @param nonEmpty
|
|
29
|
-
* @returns {Array}
|
|
25
|
+
/**
|
|
26
|
+
* Simple helper to handle situations when we expecting only array
|
|
27
|
+
* @param value
|
|
28
|
+
* @param nonEmpty
|
|
29
|
+
* @returns {Array}
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
const getArrayHelper = (value, nonEmpty = false) => {
|
|
@@ -44,8 +44,8 @@ const getArrayHelper = (value, nonEmpty = false) => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const isControlled = props => props.value !== undefined;
|
|
47
|
-
/**
|
|
48
|
-
* @since 0.0.54
|
|
47
|
+
/**
|
|
48
|
+
* @since 0.0.54
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
|
|
@@ -410,10 +410,10 @@ class FormField extends Component {
|
|
|
410
410
|
|
|
411
411
|
clearTimeout(this.focusTimer);
|
|
412
412
|
}
|
|
413
|
-
/**
|
|
414
|
-
* Field API provided to field
|
|
415
|
-
* @param index
|
|
416
|
-
* @returns {Object}
|
|
413
|
+
/**
|
|
414
|
+
* Field API provided to field
|
|
415
|
+
* @param index
|
|
416
|
+
* @returns {Object}
|
|
417
417
|
*/
|
|
418
418
|
|
|
419
419
|
|
|
@@ -437,127 +437,127 @@ class FormField extends Component {
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
const propTypes = {
|
|
440
|
-
/**
|
|
441
|
-
* Field ID.
|
|
442
|
-
* @since 0.0.59
|
|
440
|
+
/**
|
|
441
|
+
* Field ID.
|
|
442
|
+
* @since 0.0.59
|
|
443
443
|
*/
|
|
444
444
|
id: PropTypes.string,
|
|
445
445
|
|
|
446
|
-
/**
|
|
447
|
-
* Field name.
|
|
448
|
-
* @since 0.0.54
|
|
446
|
+
/**
|
|
447
|
+
* Field name.
|
|
448
|
+
* @since 0.0.54
|
|
449
449
|
*/
|
|
450
450
|
name: PropTypes.string,
|
|
451
451
|
|
|
452
|
-
/**
|
|
453
|
-
* Field value.
|
|
454
|
-
* @deprecated Use [Form](#!/Form) values.
|
|
455
|
-
* @since 0.0.57
|
|
452
|
+
/**
|
|
453
|
+
* Field value.
|
|
454
|
+
* @deprecated Use [Form](#!/Form) values.
|
|
455
|
+
* @since 0.0.57
|
|
456
456
|
*/
|
|
457
457
|
value: PropTypes.any,
|
|
458
458
|
|
|
459
|
-
/**
|
|
460
|
-
* A callback function, can be executed when the value is changing.
|
|
461
|
-
* @since 0.4.1
|
|
459
|
+
/**
|
|
460
|
+
* A callback function, can be executed when the value is changing.
|
|
461
|
+
* @since 0.4.1
|
|
462
462
|
*/
|
|
463
463
|
onChange: PropTypes.func,
|
|
464
464
|
|
|
465
|
-
/**
|
|
466
|
-
* Field label.
|
|
467
|
-
* @since 0.0.54
|
|
465
|
+
/**
|
|
466
|
+
* Field label.
|
|
467
|
+
* @since 0.0.54
|
|
468
468
|
*/
|
|
469
469
|
label: PropTypes.any,
|
|
470
470
|
|
|
471
|
-
/**
|
|
472
|
-
* Field description.
|
|
473
|
-
* @since 0.0.57
|
|
471
|
+
/**
|
|
472
|
+
* Field description.
|
|
473
|
+
* @since 0.0.57
|
|
474
474
|
*/
|
|
475
475
|
description: PropTypes.any,
|
|
476
476
|
|
|
477
|
-
/**
|
|
478
|
-
* Show long descriptions in popover after clicking on "( i )" icon
|
|
479
|
-
* @since 3.14.0
|
|
477
|
+
/**
|
|
478
|
+
* Show long descriptions in popover after clicking on "( i )" icon
|
|
479
|
+
* @since 3.14.0
|
|
480
480
|
*/
|
|
481
481
|
fullDescription: PropTypes.node,
|
|
482
482
|
|
|
483
|
-
/**
|
|
484
|
-
* Field errors.
|
|
485
|
-
* @deprecated Use [Form](#!/Form) errors.
|
|
486
|
-
* @since 0.0.57
|
|
483
|
+
/**
|
|
484
|
+
* Field errors.
|
|
485
|
+
* @deprecated Use [Form](#!/Form) errors.
|
|
486
|
+
* @since 0.0.57
|
|
487
487
|
*/
|
|
488
488
|
errors: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
489
489
|
|
|
490
|
-
/**
|
|
491
|
-
* Indicates whether field is required.
|
|
492
|
-
* @since 0.0.54
|
|
490
|
+
/**
|
|
491
|
+
* Indicates whether field is required.
|
|
492
|
+
* @since 0.0.54
|
|
493
493
|
*/
|
|
494
494
|
required: PropTypes.bool,
|
|
495
495
|
|
|
496
|
-
/**
|
|
497
|
-
* Content of the `FormField`.
|
|
498
|
-
* @since 0.0.54
|
|
496
|
+
/**
|
|
497
|
+
* Content of the `FormField`.
|
|
498
|
+
* @since 0.0.54
|
|
499
499
|
*/
|
|
500
500
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
501
501
|
|
|
502
|
-
/**
|
|
503
|
-
* If 'true', a field will be multiple. You can also limit the number of fields with a value like { max: 5 }.
|
|
504
|
-
* @since 1.12.0
|
|
502
|
+
/**
|
|
503
|
+
* If 'true', a field will be multiple. You can also limit the number of fields with a value like { max: 5 }.
|
|
504
|
+
* @since 1.12.0
|
|
505
505
|
*/
|
|
506
506
|
multi: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
|
507
507
|
max: PropTypes.number.isRequired
|
|
508
508
|
})]),
|
|
509
509
|
|
|
510
|
-
/**
|
|
511
|
-
* @ignore Disabled state of multiple field.
|
|
510
|
+
/**
|
|
511
|
+
* @ignore Disabled state of multiple field.
|
|
512
512
|
*/
|
|
513
513
|
disabled: PropTypes.bool,
|
|
514
514
|
|
|
515
|
-
/**
|
|
516
|
-
* Localization messages
|
|
517
|
-
* @since 1.12.0
|
|
515
|
+
/**
|
|
516
|
+
* Localization messages
|
|
517
|
+
* @since 1.12.0
|
|
518
518
|
*/
|
|
519
519
|
locale: PropTypes.shape({
|
|
520
520
|
addMore: PropTypes.node,
|
|
521
521
|
remove: PropTypes.node
|
|
522
522
|
}),
|
|
523
523
|
|
|
524
|
-
/**
|
|
525
|
-
* Callback which called for all values. If it returns 'true' a pseudo-link 'Add more' will be disabled
|
|
526
|
-
* @ignore
|
|
527
|
-
* @deprecated
|
|
524
|
+
/**
|
|
525
|
+
* Callback which called for all values. If it returns 'true' a pseudo-link 'Add more' will be disabled
|
|
526
|
+
* @ignore
|
|
527
|
+
* @deprecated
|
|
528
528
|
*/
|
|
529
529
|
addMoreValidator: PropTypes.func,
|
|
530
530
|
|
|
531
|
-
/**
|
|
532
|
-
* A callback function, can be executed when the row is removed.
|
|
533
|
-
* @since 1.12.0
|
|
531
|
+
/**
|
|
532
|
+
* A callback function, can be executed when the row is removed.
|
|
533
|
+
* @since 1.12.0
|
|
534
534
|
*/
|
|
535
535
|
onRemoveRow: PropTypes.func,
|
|
536
536
|
|
|
537
|
-
/**
|
|
538
|
-
* @ignore
|
|
537
|
+
/**
|
|
538
|
+
* @ignore
|
|
539
539
|
*/
|
|
540
540
|
className: PropTypes.string,
|
|
541
541
|
|
|
542
|
-
/**
|
|
543
|
-
* @ignore
|
|
542
|
+
/**
|
|
543
|
+
* @ignore
|
|
544
544
|
*/
|
|
545
545
|
baseClassName: PropTypes.string,
|
|
546
546
|
|
|
547
|
-
/**
|
|
548
|
-
* @ignore
|
|
547
|
+
/**
|
|
548
|
+
* @ignore
|
|
549
549
|
*/
|
|
550
550
|
form: PropTypes.object,
|
|
551
551
|
|
|
552
|
-
/**
|
|
553
|
-
* Vertical or horizontal field view.
|
|
554
|
-
* If it is not defined explicitly, the vertical mode will use from Form or Section components.
|
|
555
|
-
* @since 3.13.0
|
|
552
|
+
/**
|
|
553
|
+
* Vertical or horizontal field view.
|
|
554
|
+
* If it is not defined explicitly, the vertical mode will use from Form or Section components.
|
|
555
|
+
* @since 3.13.0
|
|
556
556
|
*/
|
|
557
557
|
vertical: PropTypes.bool,
|
|
558
558
|
|
|
559
|
-
/**
|
|
560
|
-
* @ignore
|
|
559
|
+
/**
|
|
560
|
+
* @ignore
|
|
561
561
|
*/
|
|
562
562
|
scrollableElement: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.instanceOf(Window)])
|
|
563
563
|
};
|
|
@@ -585,14 +585,14 @@ const defaultProps = {
|
|
|
585
585
|
};
|
|
586
586
|
FormField.propTypes = propTypes;
|
|
587
587
|
FormField.defaultProps = defaultProps;
|
|
588
|
-
/**
|
|
589
|
-
* `FormField` component is used for showing of parameter values in Form or
|
|
590
|
-
* for entering of user data with any form elements.
|
|
591
|
-
*
|
|
592
|
-
* For the most cases the following form elements can be used:
|
|
593
|
-
* * [FormFieldText](#!/FormFieldText) for entering text,
|
|
594
|
-
* * [FormFieldSelect](#!/FormFieldSelect), [FormFieldCheckbox](#!/FormFieldCheckbox),
|
|
595
|
-
* [FormFieldRadioButtons](#!/FormFieldRadioButtons) for selecting options.
|
|
588
|
+
/**
|
|
589
|
+
* `FormField` component is used for showing of parameter values in Form or
|
|
590
|
+
* for entering of user data with any form elements.
|
|
591
|
+
*
|
|
592
|
+
* For the most cases the following form elements can be used:
|
|
593
|
+
* * [FormFieldText](#!/FormFieldText) for entering text,
|
|
594
|
+
* * [FormFieldSelect](#!/FormFieldSelect), [FormFieldCheckbox](#!/FormFieldCheckbox),
|
|
595
|
+
* [FormFieldRadioButtons](#!/FormFieldRadioButtons) for selecting options.
|
|
596
596
|
*/
|
|
597
597
|
|
|
598
598
|
const FormFieldWrapper = props => {
|
|
@@ -7,10 +7,10 @@ import { CLS_PREFIX } from '../../constants';
|
|
|
7
7
|
import Checkbox from '../Checkbox';
|
|
8
8
|
import FormField from '../FormField';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* `FormFieldCheckbox` component component is used for turning an option on or off
|
|
12
|
-
* and selecting or deselecting an item.
|
|
13
|
-
* @since 0.0.58
|
|
10
|
+
/**
|
|
11
|
+
* `FormFieldCheckbox` component component is used for turning an option on or off
|
|
12
|
+
* and selecting or deselecting an item.
|
|
13
|
+
* @since 0.0.58
|
|
14
14
|
*/
|
|
15
15
|
const FormFieldCheckbox = ({
|
|
16
16
|
baseClassName,
|
|
@@ -52,52 +52,52 @@ const FormFieldCheckbox = ({
|
|
|
52
52
|
}, label)));
|
|
53
53
|
|
|
54
54
|
FormFieldCheckbox.propTypes = {
|
|
55
|
-
/**
|
|
56
|
-
* Disabled state of field.
|
|
57
|
-
* @since 0.1.0
|
|
55
|
+
/**
|
|
56
|
+
* Disabled state of field.
|
|
57
|
+
* @since 0.1.0
|
|
58
58
|
*/
|
|
59
59
|
disabled: PropTypes.bool,
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* Custom checked value. Default is boolean true.
|
|
63
|
-
* @since 0.0.59
|
|
61
|
+
/**
|
|
62
|
+
* Custom checked value. Default is boolean true.
|
|
63
|
+
* @since 0.0.59
|
|
64
64
|
*/
|
|
65
65
|
checkedValue: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* Custom unchecked value. Default is boolean false.
|
|
69
|
-
* @since 0.0.59
|
|
67
|
+
/**
|
|
68
|
+
* Custom unchecked value. Default is boolean false.
|
|
69
|
+
* @since 0.0.59
|
|
70
70
|
*/
|
|
71
71
|
uncheckedValue: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
72
72
|
|
|
73
|
-
/**
|
|
74
|
-
* The browser will automatically focus on the component upon rendering the screen
|
|
75
|
-
* @since 1.9.0
|
|
73
|
+
/**
|
|
74
|
+
* The browser will automatically focus on the component upon rendering the screen
|
|
75
|
+
* @since 1.9.0
|
|
76
76
|
*/
|
|
77
77
|
autoFocus: PropTypes.bool,
|
|
78
78
|
|
|
79
|
-
/**
|
|
80
|
-
* @ignore Field cannot be multiple
|
|
79
|
+
/**
|
|
80
|
+
* @ignore Field cannot be multiple
|
|
81
81
|
*/
|
|
82
82
|
multi: PropTypes.bool,
|
|
83
83
|
|
|
84
|
-
/**
|
|
85
|
-
* @ignore
|
|
84
|
+
/**
|
|
85
|
+
* @ignore
|
|
86
86
|
*/
|
|
87
87
|
label: PropTypes.any,
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* @ignore
|
|
89
|
+
/**
|
|
90
|
+
* @ignore
|
|
91
91
|
*/
|
|
92
92
|
required: PropTypes.bool,
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* @ignore
|
|
94
|
+
/**
|
|
95
|
+
* @ignore
|
|
96
96
|
*/
|
|
97
97
|
className: PropTypes.string,
|
|
98
98
|
|
|
99
|
-
/**
|
|
100
|
-
* @ignore
|
|
99
|
+
/**
|
|
100
|
+
* @ignore
|
|
101
101
|
*/
|
|
102
102
|
baseClassName: PropTypes.string,
|
|
103
103
|
fullDescription: PropTypes.string
|
|
@@ -22,9 +22,9 @@ export const generatePassword = () => {
|
|
|
22
22
|
const password = ['upper', 'lower', 'lower', 'lower', 'number', 'number', 'special', 'number', 'upper', 'upper', 'lower', 'lower', 'lower', 'lower', 'lower', 'lower'];
|
|
23
23
|
return password.sort((a, b) => Math.floor(b.length * Math.random()) - Math.floor(a.length * Math.random())).map(symbolClass => symbolClasses[symbolClass][Math.floor(symbolClasses[symbolClass].length * Math.random())]).join('');
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* `FormFieldPassword` component provides secure way to enter a password.
|
|
27
|
-
* @since 0.0.58
|
|
25
|
+
/**
|
|
26
|
+
* `FormFieldPassword` component provides secure way to enter a password.
|
|
27
|
+
* @since 0.0.58
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
class FormFieldPassword extends Component {
|
|
@@ -272,33 +272,33 @@ class FormFieldPassword extends Component {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
FormFieldPassword.propTypes = {
|
|
275
|
-
/**
|
|
276
|
-
* Is show button hidden?
|
|
277
|
-
* @since 0.0.59
|
|
275
|
+
/**
|
|
276
|
+
* Is show button hidden?
|
|
277
|
+
* @since 0.0.59
|
|
278
278
|
*/
|
|
279
279
|
hideShowButton: PropTypes.bool,
|
|
280
280
|
|
|
281
|
-
/**
|
|
282
|
-
* Is generate button hidden?
|
|
283
|
-
* @since 0.0.59
|
|
281
|
+
/**
|
|
282
|
+
* Is generate button hidden?
|
|
283
|
+
* @since 0.0.59
|
|
284
284
|
*/
|
|
285
285
|
hideGenerateButton: PropTypes.bool,
|
|
286
286
|
|
|
287
|
-
/**
|
|
288
|
-
* Is password meter hidden?
|
|
289
|
-
* @since 0.0.59
|
|
287
|
+
/**
|
|
288
|
+
* Is password meter hidden?
|
|
289
|
+
* @since 0.0.59
|
|
290
290
|
*/
|
|
291
291
|
hidePasswordMeter: PropTypes.bool,
|
|
292
292
|
|
|
293
|
-
/**
|
|
294
|
-
* Additional props for password meter. . See [Popover](#!/Popover) for more information.
|
|
295
|
-
* @since 1.5.6
|
|
293
|
+
/**
|
|
294
|
+
* Additional props for password meter. . See [Popover](#!/Popover) for more information.
|
|
295
|
+
* @since 1.5.6
|
|
296
296
|
*/
|
|
297
297
|
passwordMeterProps: PropTypes.object,
|
|
298
298
|
|
|
299
|
-
/**
|
|
300
|
-
* A set of custom password score rules.
|
|
301
|
-
* @since 3.21.0
|
|
299
|
+
/**
|
|
300
|
+
* A set of custom password score rules.
|
|
301
|
+
* @since 3.21.0
|
|
302
302
|
*/
|
|
303
303
|
passwordScoreRules: PropTypes.arrayOf(PropTypes.shape({
|
|
304
304
|
name: PropTypes.string,
|
|
@@ -306,37 +306,37 @@ FormFieldPassword.propTypes = {
|
|
|
306
306
|
score: PropTypes.func.isRequired
|
|
307
307
|
})),
|
|
308
308
|
|
|
309
|
-
/**
|
|
310
|
-
* Size of the control
|
|
311
|
-
* @since 1.5.6
|
|
309
|
+
/**
|
|
310
|
+
* Size of the control
|
|
311
|
+
* @since 1.5.6
|
|
312
312
|
*/
|
|
313
313
|
size: PropTypes.oneOf(['md', 'lg', 'xl', 'fill']),
|
|
314
314
|
|
|
315
|
-
/**
|
|
316
|
-
* The browser will automatically focus on the component upon rendering the screen
|
|
317
|
-
* @since 1.9.0
|
|
315
|
+
/**
|
|
316
|
+
* The browser will automatically focus on the component upon rendering the screen
|
|
317
|
+
* @since 1.9.0
|
|
318
318
|
*/
|
|
319
319
|
autoFocus: PropTypes.bool,
|
|
320
320
|
|
|
321
|
-
/**
|
|
322
|
-
* Prevent password autocompletion.
|
|
323
|
-
* @since 2.5.1
|
|
321
|
+
/**
|
|
322
|
+
* Prevent password autocompletion.
|
|
323
|
+
* @since 2.5.1
|
|
324
324
|
*/
|
|
325
325
|
autoComplete: PropTypes.oneOf(['new-password']),
|
|
326
326
|
|
|
327
|
-
/**
|
|
328
|
-
* A render function for customizing the password generation button.
|
|
329
|
-
* @since 3.13.0
|
|
327
|
+
/**
|
|
328
|
+
* A render function for customizing the password generation button.
|
|
329
|
+
* @since 3.13.0
|
|
330
330
|
*/
|
|
331
331
|
generateButton: PropTypes.func,
|
|
332
332
|
|
|
333
|
-
/**
|
|
334
|
-
* @ignore
|
|
333
|
+
/**
|
|
334
|
+
* @ignore
|
|
335
335
|
*/
|
|
336
336
|
className: PropTypes.string,
|
|
337
337
|
|
|
338
|
-
/**
|
|
339
|
-
* @ignore
|
|
338
|
+
/**
|
|
339
|
+
* @ignore
|
|
340
340
|
*/
|
|
341
341
|
baseClassName: PropTypes.string
|
|
342
342
|
};
|