@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
|
@@ -64,9 +64,9 @@ const toNumber = value => {
|
|
|
64
64
|
const isMinDisabled = (value, min) => min !== undefined && value !== '' && value <= min;
|
|
65
65
|
|
|
66
66
|
const isMaxDisabled = (value, max) => max !== undefined && value !== '' && value >= max;
|
|
67
|
-
/**
|
|
68
|
-
* `InputNumber` component is used for entering integer numbers.
|
|
69
|
-
* @since 2.2.0
|
|
67
|
+
/**
|
|
68
|
+
* `InputNumber` component is used for entering integer numbers.
|
|
69
|
+
* @since 2.2.0
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
|
|
@@ -31,13 +31,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
|
-
// Copyright 1999-
|
|
34
|
+
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
35
35
|
const VIEW_SIMPLE = 'simple';
|
|
36
36
|
const VIEW_CARD = 'card';
|
|
37
|
-
/**
|
|
38
|
-
* `Item` component is element of [ItemList](#!/ItemList) and it is presented as
|
|
39
|
-
* a combination of icon, text title and content (similar to [Media](#!/Media)).
|
|
40
|
-
* @since 0.0.48
|
|
37
|
+
/**
|
|
38
|
+
* `Item` component is element of [ItemList](#!/ItemList) and it is presented as
|
|
39
|
+
* a combination of icon, text title and content (similar to [Media](#!/Media)).
|
|
40
|
+
* @since 0.0.48
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
43
|
class Item extends _react.Component {
|
|
@@ -106,6 +106,7 @@ class Item extends _react.Component {
|
|
|
106
106
|
value,
|
|
107
107
|
tooltip,
|
|
108
108
|
disabled,
|
|
109
|
+
hoverable,
|
|
109
110
|
...props
|
|
110
111
|
} = this.props;
|
|
111
112
|
|
|
@@ -126,7 +127,8 @@ class Item extends _react.Component {
|
|
|
126
127
|
const item = /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({
|
|
127
128
|
className: (0, _classnames.default)(baseClassName, {
|
|
128
129
|
[`${baseClassName}--card`]: view === 'card',
|
|
129
|
-
[`${baseClassName}--disabled`]: disabled
|
|
130
|
+
[`${baseClassName}--disabled`]: disabled,
|
|
131
|
+
[`${baseClassName}--hoverable`]: hoverable
|
|
130
132
|
}, className)
|
|
131
133
|
}, props), /*#__PURE__*/_react.default.createElement(_Media.default, {
|
|
132
134
|
image: this.renderIcon(icon),
|
|
@@ -152,79 +154,86 @@ class Item extends _react.Component {
|
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
Item.propTypes = {
|
|
155
|
-
/**
|
|
156
|
-
* Component to render as the root element. Useful when rendering a `Item` as `<a>` or `<Link>`.
|
|
157
|
-
* @since 0.0.48
|
|
157
|
+
/**
|
|
158
|
+
* Component to render as the root element. Useful when rendering a `Item` as `<a>` or `<Link>`.
|
|
159
|
+
* @since 0.0.48
|
|
158
160
|
*/
|
|
159
161
|
component: _propTypes.default.elementType,
|
|
160
162
|
|
|
161
|
-
/**
|
|
162
|
-
* View mode.
|
|
163
|
-
* @since 2.1.0
|
|
163
|
+
/**
|
|
164
|
+
* View mode.
|
|
165
|
+
* @since 2.1.0
|
|
164
166
|
*/
|
|
165
167
|
view: _propTypes.default.oneOf([VIEW_SIMPLE, VIEW_CARD]),
|
|
166
168
|
|
|
167
|
-
/**
|
|
168
|
-
* Icon.
|
|
169
|
-
* @since 0.0.48
|
|
169
|
+
/**
|
|
170
|
+
* Icon.
|
|
171
|
+
* @since 0.0.48
|
|
170
172
|
*/
|
|
171
173
|
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
172
174
|
|
|
173
|
-
/**
|
|
174
|
-
* Title.
|
|
175
|
-
* @since 0.0.48
|
|
175
|
+
/**
|
|
176
|
+
* Title.
|
|
177
|
+
* @since 0.0.48
|
|
176
178
|
*/
|
|
177
179
|
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
178
180
|
|
|
179
|
-
/**
|
|
180
|
-
* Content for footer.
|
|
181
|
-
* @since 2.1.0
|
|
181
|
+
/**
|
|
182
|
+
* Content for footer.
|
|
183
|
+
* @since 2.1.0
|
|
182
184
|
*/
|
|
183
185
|
footer: _propTypes.default.node,
|
|
184
186
|
|
|
185
|
-
/**
|
|
186
|
-
* Description. Renders as small grey text.
|
|
187
|
-
* @since 2.1.0
|
|
187
|
+
/**
|
|
188
|
+
* Description. Renders as small grey text.
|
|
189
|
+
* @since 2.1.0
|
|
188
190
|
*/
|
|
189
191
|
description: _propTypes.default.node,
|
|
190
192
|
|
|
191
|
-
/**
|
|
192
|
-
* Content of the `Item`.
|
|
193
|
-
* @since 0.0.48
|
|
193
|
+
/**
|
|
194
|
+
* Content of the `Item`.
|
|
195
|
+
* @since 0.0.48
|
|
194
196
|
*/
|
|
195
197
|
children: _propTypes.default.node,
|
|
196
198
|
|
|
197
|
-
/**
|
|
198
|
-
* An unique value. It needs only in ItemList with selectable view.
|
|
199
|
-
* @since 2.3.0
|
|
199
|
+
/**
|
|
200
|
+
* An unique value. It needs only in ItemList with selectable view.
|
|
201
|
+
* @since 2.3.0
|
|
200
202
|
*/
|
|
201
203
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
202
204
|
|
|
203
|
-
/**
|
|
204
|
-
* Tooltip for component.
|
|
205
|
-
* @since 2.5.1
|
|
205
|
+
/**
|
|
206
|
+
* Tooltip for component.
|
|
207
|
+
* @since 2.5.1
|
|
206
208
|
*/
|
|
207
209
|
tooltip: _propTypes.default.node,
|
|
208
210
|
|
|
209
|
-
/**
|
|
210
|
-
* @ignore
|
|
211
|
+
/**
|
|
212
|
+
* @ignore
|
|
211
213
|
*/
|
|
212
214
|
className: _propTypes.default.string,
|
|
213
215
|
|
|
214
|
-
/**
|
|
215
|
-
* @ignore
|
|
216
|
+
/**
|
|
217
|
+
* @ignore
|
|
216
218
|
*/
|
|
217
219
|
baseClassName: _propTypes.default.string,
|
|
218
220
|
|
|
219
|
-
/**
|
|
220
|
-
* Whether disabled or not.
|
|
221
|
-
* @since 3.15.0
|
|
221
|
+
/**
|
|
222
|
+
* Whether disabled or not.
|
|
223
|
+
* @since 3.15.0
|
|
222
224
|
*/
|
|
223
|
-
disabled: _propTypes.default.bool
|
|
225
|
+
disabled: _propTypes.default.bool,
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Add hover shadow and pointer cursor.
|
|
229
|
+
* @since 3.26.0
|
|
230
|
+
*/
|
|
231
|
+
hoverable: _propTypes.default.bool
|
|
224
232
|
};
|
|
225
233
|
Item.defaultProps = {
|
|
226
234
|
component: 'div',
|
|
227
235
|
view: VIEW_SIMPLE,
|
|
236
|
+
hoverable: undefined,
|
|
228
237
|
title: undefined,
|
|
229
238
|
description: undefined,
|
|
230
239
|
icon: undefined,
|
|
@@ -47,10 +47,10 @@ const getNextSelectedValue = (value, prevValue, toggleable) => {
|
|
|
47
47
|
return value;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* `ItemList` component is used for displaying list of [Items](#!/Item)
|
|
52
|
-
* according to [Grid](#!/Grid) principle.
|
|
53
|
-
* @since 0.0.48
|
|
50
|
+
/**
|
|
51
|
+
* `ItemList` component is used for displaying list of [Items](#!/Item)
|
|
52
|
+
* according to [Grid](#!/Grid) principle.
|
|
53
|
+
* @since 0.0.48
|
|
54
54
|
*/
|
|
55
55
|
class ItemList extends _react.Component {
|
|
56
56
|
constructor(_props) {
|
|
@@ -61,7 +61,8 @@ class ItemList extends _react.Component {
|
|
|
61
61
|
baseClassName,
|
|
62
62
|
selectable,
|
|
63
63
|
onSelect,
|
|
64
|
-
reorderable
|
|
64
|
+
reorderable,
|
|
65
|
+
hoverable
|
|
65
66
|
} = this.props;
|
|
66
67
|
const classNameList = [`${baseClassName}__item`];
|
|
67
68
|
const props = {};
|
|
@@ -86,6 +87,11 @@ class ItemList extends _react.Component {
|
|
|
86
87
|
});
|
|
87
88
|
(0, _utils.safeInvoke)(onSelect, nextValue);
|
|
88
89
|
};
|
|
90
|
+
} // Extends hoverable behavior from the ItemList in case if its child doesn't have its own
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
if (item.props.hoverable === undefined) {
|
|
94
|
+
props.hoverable = hoverable && this.canManageHoverableState();
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
if (reorderable) {
|
|
@@ -177,20 +183,45 @@ class ItemList extends _react.Component {
|
|
|
177
183
|
}));
|
|
178
184
|
}
|
|
179
185
|
|
|
180
|
-
|
|
181
|
-
const {
|
|
182
|
-
children
|
|
183
|
-
} = this.props;
|
|
186
|
+
someChild(predicate) {
|
|
184
187
|
let result = false;
|
|
185
188
|
|
|
186
|
-
_react.Children.forEach(children, child => {
|
|
187
|
-
if (child && child
|
|
189
|
+
_react.Children.forEach(this.props.children, child => {
|
|
190
|
+
if (child && predicate(child)) {
|
|
188
191
|
result = true;
|
|
189
192
|
}
|
|
190
193
|
});
|
|
191
194
|
|
|
192
195
|
return result;
|
|
193
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* There are some states where we can't manage hoverable state
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
canManageHoverableState() {
|
|
203
|
+
const {
|
|
204
|
+
reorderable,
|
|
205
|
+
selectable
|
|
206
|
+
} = this.props;
|
|
207
|
+
return !reorderable && !selectable;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
isHoverable() {
|
|
211
|
+
if (!this.canManageHoverableState()) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return this.props.hoverable || this.hasHoverableCard();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
hasViewCard() {
|
|
219
|
+
return this.someChild(child => child.props && child.props.view === 'card');
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
hasHoverableCard() {
|
|
223
|
+
return this.someChild(child => child.props && !!child.props.hoverable);
|
|
224
|
+
}
|
|
194
225
|
|
|
195
226
|
renderReorderable({
|
|
196
227
|
baseClassName,
|
|
@@ -249,7 +280,7 @@ class ItemList extends _react.Component {
|
|
|
249
280
|
} = this.props;
|
|
250
281
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
251
282
|
className: (0, _classnames.default)(this.props.baseClassName, {
|
|
252
|
-
[`${this.props.baseClassName}--hoverable`]:
|
|
283
|
+
[`${this.props.baseClassName}--hoverable`]: this.isHoverable(),
|
|
253
284
|
[`${this.props.baseClassName}--stretchable`]: stretchable,
|
|
254
285
|
[`${this.props.baseClassName}--selectable`]: selectable,
|
|
255
286
|
[`${this.props.baseClassName}--cards`]: this.hasViewCard()
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Selectables = exports.Reorderables = exports.Cards = exports.Basic = void 0;
|
|
8
|
+
exports.Selectables = exports.Reorderables = exports.HoverableItems = exports.HoverableItemList = exports.Cards = exports.Basic = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -58,7 +58,8 @@ Basic.args = {
|
|
|
58
58
|
name: "star-circle-filled",
|
|
59
59
|
intent: "warning"
|
|
60
60
|
}),
|
|
61
|
-
onClick: () => {}
|
|
61
|
+
onClick: () => {},
|
|
62
|
+
hoverable: true
|
|
62
63
|
}, 'Content 3'), /*#__PURE__*/_react.default.createElement(_Item.default, {
|
|
63
64
|
key: "4",
|
|
64
65
|
value: "4",
|
|
@@ -70,7 +71,8 @@ Basic.args = {
|
|
|
70
71
|
intent: "danger"
|
|
71
72
|
}),
|
|
72
73
|
onClick: () => {},
|
|
73
|
-
disabled: true
|
|
74
|
+
disabled: true,
|
|
75
|
+
hoverable: true
|
|
74
76
|
}, 'Content 4')]
|
|
75
77
|
};
|
|
76
78
|
const Cards = Basic.bind(null);
|
|
@@ -93,4 +95,34 @@ exports.Selectables = Selectables;
|
|
|
93
95
|
Selectables.args = { ...Basic.args,
|
|
94
96
|
selectable: true,
|
|
95
97
|
defaultValue: '2'
|
|
98
|
+
};
|
|
99
|
+
const HoverableItemList = Basic.bind(null);
|
|
100
|
+
exports.HoverableItemList = HoverableItemList;
|
|
101
|
+
HoverableItemList.args = { ...Basic.args,
|
|
102
|
+
hoverable: true,
|
|
103
|
+
defaultValue: '2',
|
|
104
|
+
children: Basic.args.children.map((child, index) => {
|
|
105
|
+
if (!child) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
110
|
+
hoverable: index === 0 ? false : undefined
|
|
111
|
+
});
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
const HoverableItems = Basic.bind(null);
|
|
115
|
+
exports.HoverableItems = HoverableItems;
|
|
116
|
+
HoverableItems.args = { ...Basic.args,
|
|
117
|
+
hoverable: false,
|
|
118
|
+
defaultValue: '2',
|
|
119
|
+
children: Basic.args.children.map((child, index) => {
|
|
120
|
+
if (!child) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
125
|
+
hoverable: index % 2 === 0
|
|
126
|
+
});
|
|
127
|
+
})
|
|
96
128
|
};
|
|
@@ -29,104 +29,104 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
31
31
|
const propTypes = {
|
|
32
|
-
/**
|
|
33
|
-
* Type of the `Layout`
|
|
34
|
-
* @since 1.4.0
|
|
32
|
+
/**
|
|
33
|
+
* Type of the `Layout`
|
|
34
|
+
* @since 1.4.0
|
|
35
35
|
*/
|
|
36
36
|
type: _propTypes.default.oneOf(['fluid', 'simplified']),
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Header content.
|
|
40
|
-
* @since 1.4.0
|
|
38
|
+
/**
|
|
39
|
+
* Header content.
|
|
40
|
+
* @since 1.4.0
|
|
41
41
|
*/
|
|
42
42
|
header: _propTypes.default.node,
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* Define header position - always on top (fixed) or static.
|
|
46
|
-
* @since 1.4.0
|
|
44
|
+
/**
|
|
45
|
+
* Define header position - always on top (fixed) or static.
|
|
46
|
+
* @since 1.4.0
|
|
47
47
|
*/
|
|
48
48
|
headerFixed: _propTypes.default.bool,
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* Additional content at the top of the header.
|
|
52
|
-
* @since 3.2.0
|
|
50
|
+
/**
|
|
51
|
+
* Additional content at the top of the header.
|
|
52
|
+
* @since 3.2.0
|
|
53
53
|
*/
|
|
54
54
|
headerAddon: _propTypes.default.node,
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* Sidebar content.
|
|
58
|
-
* @since 1.4.0
|
|
56
|
+
/**
|
|
57
|
+
* Sidebar content.
|
|
58
|
+
* @since 1.4.0
|
|
59
59
|
*/
|
|
60
60
|
sidebar: _propTypes.default.node,
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* Sidebar type.
|
|
64
|
-
* @since 3.2.0
|
|
62
|
+
/**
|
|
63
|
+
* Sidebar type.
|
|
64
|
+
* @since 3.2.0
|
|
65
65
|
*/
|
|
66
66
|
sidebarType: _propTypes.default.oneOf(['collapsed', 'folded']),
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* Define if sidebar can collapse.
|
|
70
|
-
* @since 1.4.0
|
|
68
|
+
/**
|
|
69
|
+
* Define if sidebar can collapse.
|
|
70
|
+
* @since 1.4.0
|
|
71
71
|
*/
|
|
72
72
|
sidebarCollapsible: _propTypes.default.bool,
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
* Sidebar collapsed state.
|
|
76
|
-
* A boolean value is used for desktop mode only, but you can set an array with collapsed states for all modes, e.g. `['responsive', 'desktop']`.
|
|
77
|
-
*
|
|
78
|
-
* @since 1.4.0
|
|
74
|
+
/**
|
|
75
|
+
* Sidebar collapsed state.
|
|
76
|
+
* A boolean value is used for desktop mode only, but you can set an array with collapsed states for all modes, e.g. `['responsive', 'desktop']`.
|
|
77
|
+
*
|
|
78
|
+
* @since 1.4.0
|
|
79
79
|
*/
|
|
80
80
|
sidebarCollapsed: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.array]),
|
|
81
81
|
|
|
82
|
-
/**
|
|
83
|
-
* Additional content between header and main content.
|
|
84
|
-
* @since 1.4.0
|
|
82
|
+
/**
|
|
83
|
+
* Additional content between header and main content.
|
|
84
|
+
* @since 1.4.0
|
|
85
85
|
*/
|
|
86
86
|
contentAddon: _propTypes.default.node,
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Content header.
|
|
90
|
-
* @since 3.0.0
|
|
88
|
+
/**
|
|
89
|
+
* Content header.
|
|
90
|
+
* @since 3.0.0
|
|
91
91
|
*/
|
|
92
92
|
contentHeader: _propTypes.default.node,
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* Footer content.
|
|
96
|
-
* @since 1.4.0
|
|
94
|
+
/**
|
|
95
|
+
* Footer content.
|
|
96
|
+
* @since 1.4.0
|
|
97
97
|
*/
|
|
98
98
|
footer: _propTypes.default.node,
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* Main content of the `Layout`.
|
|
102
|
-
* @since 1.4.0
|
|
100
|
+
/**
|
|
101
|
+
* Main content of the `Layout`.
|
|
102
|
+
* @since 1.4.0
|
|
103
103
|
*/
|
|
104
104
|
children: _propTypes.default.node,
|
|
105
105
|
|
|
106
|
-
/**
|
|
107
|
-
* Width of the content
|
|
108
|
-
* @since 3.0.0
|
|
106
|
+
/**
|
|
107
|
+
* Width of the content
|
|
108
|
+
* @since 3.0.0
|
|
109
109
|
*/
|
|
110
110
|
width: _propTypes.default.oneOf(['sm', 'md', 'lg']),
|
|
111
111
|
|
|
112
|
-
/**
|
|
113
|
-
* Sidebar onToggle handler.
|
|
114
|
-
* The handler is called with two args:
|
|
115
|
-
*
|
|
116
|
-
* * Whether collapsed or not.
|
|
117
|
-
* * In which mode: responsive or desktop.
|
|
118
|
-
*
|
|
119
|
-
* @since 1.4.0
|
|
112
|
+
/**
|
|
113
|
+
* Sidebar onToggle handler.
|
|
114
|
+
* The handler is called with two args:
|
|
115
|
+
*
|
|
116
|
+
* * Whether collapsed or not.
|
|
117
|
+
* * In which mode: responsive or desktop.
|
|
118
|
+
*
|
|
119
|
+
* @since 1.4.0
|
|
120
120
|
*/
|
|
121
121
|
onSidebarToggle: _propTypes.default.func,
|
|
122
122
|
|
|
123
|
-
/**
|
|
124
|
-
* @ignore
|
|
123
|
+
/**
|
|
124
|
+
* @ignore
|
|
125
125
|
*/
|
|
126
126
|
className: _propTypes.default.string,
|
|
127
127
|
|
|
128
|
-
/**
|
|
129
|
-
* @ignore
|
|
128
|
+
/**
|
|
129
|
+
* @ignore
|
|
130
130
|
*/
|
|
131
131
|
baseClassName: _propTypes.default.string
|
|
132
132
|
};
|
|
@@ -176,8 +176,8 @@ const subscribeClickOutside = (refs, handler) => {
|
|
|
176
176
|
document.removeEventListener('touchstart', listener);
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
|
-
/**
|
|
180
|
-
* @since 1.4.0
|
|
179
|
+
/**
|
|
180
|
+
* @since 1.4.0
|
|
181
181
|
*/
|
|
182
182
|
|
|
183
183
|
|