@carbon/ibm-products 1.69.0 → 1.70.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/css/index-full-carbon.css +17 -5
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +4 -4
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +16 -5
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +3 -3
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +17 -5
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +4 -4
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +17 -5
- package/css/index.css.map +1 -1
- package/css/index.min.css +4 -4
- package/css/index.min.css.map +1 -1
- package/es/components/ButtonMenu/ButtonMenu.js +11 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +9 -8
- package/es/components/Datagrid/Datagrid/DatagridRow.js +6 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +14 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +21 -10
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +6 -8
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -6
- package/es/components/Datagrid/useActionsColumn.js +18 -14
- package/es/components/Datagrid/useFiltering.js +3 -1
- package/es/components/Datagrid/useNestedRowExpander.js +2 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +3 -1
- package/es/components/Datagrid/utils/filterPropsForTesting.js +150 -0
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +9 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +8 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +8 -3
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +8 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +8 -3
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -6
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -6
- package/es/components/FilterSummary/FilterSummary.js +19 -15
- package/es/components/InterstitialScreen/InterstitialScreen.js +8 -7
- package/lib/components/ButtonMenu/ButtonMenu.js +11 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +9 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +6 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +14 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +21 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -6
- package/lib/components/Datagrid/useActionsColumn.js +17 -13
- package/lib/components/Datagrid/useFiltering.js +2 -0
- package/lib/components/Datagrid/useNestedRowExpander.js +1 -1
- package/lib/components/Datagrid/useRowIsMouseOver.js +3 -1
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +159 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +9 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +8 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +8 -3
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +8 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +8 -3
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -6
- package/lib/components/FilterSummary/FilterSummary.js +18 -14
- package/lib/components/InterstitialScreen/InterstitialScreen.js +8 -6
- package/package.json +2 -2
- package/scss/components/Datagrid/_datagrid.scss +9 -1
- package/scss/components/Datagrid/styles/_datagrid.scss +10 -4
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +1 -0
- package/scss/components/SidePanel/_side-panel.scss +5 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.generateDummyCheckboxes = exports.filterProps = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _handleFilterTagLabelText = require("./handleFilterTagLabelText");
|
|
11
|
+
/**
|
|
12
|
+
* Copyright IBM Corp. 2024, 2024
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
var generateDummyCheckboxes = Array(25).fill(null).map(function (_, index) {
|
|
19
|
+
return {
|
|
20
|
+
id: "".concat(index),
|
|
21
|
+
labelText: "Dummy checkbox ".concat(index + 1),
|
|
22
|
+
value: 'dummy-checkbox',
|
|
23
|
+
disabled: true
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
exports.generateDummyCheckboxes = generateDummyCheckboxes;
|
|
27
|
+
var filterProps = function filterProps() {
|
|
28
|
+
var _Dropdown;
|
|
29
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
30
|
+
_ref$includeManyCheck = _ref.includeManyCheckboxes,
|
|
31
|
+
includeManyCheckboxes = _ref$includeManyCheck === void 0 ? false : _ref$includeManyCheck,
|
|
32
|
+
_ref$dropdownOnChange = _ref.dropdownOnChange,
|
|
33
|
+
dropdownOnChange = _ref$dropdownOnChange === void 0 ? function () {} : _ref$dropdownOnChange;
|
|
34
|
+
var checkboxList = [{
|
|
35
|
+
id: 'normal',
|
|
36
|
+
labelText: 'Normal',
|
|
37
|
+
value: 'normal'
|
|
38
|
+
}, {
|
|
39
|
+
id: 'minor-warning',
|
|
40
|
+
labelText: 'Minor warning',
|
|
41
|
+
value: 'minor-warning'
|
|
42
|
+
}, {
|
|
43
|
+
id: 'critical',
|
|
44
|
+
labelText: 'Critical',
|
|
45
|
+
value: 'critical'
|
|
46
|
+
}].concat((0, _toConsumableArray2.default)(includeManyCheckboxes ? generateDummyCheckboxes : []));
|
|
47
|
+
return {
|
|
48
|
+
autoHideFilters: includeManyCheckboxes ? false : true,
|
|
49
|
+
variation: 'panel',
|
|
50
|
+
panelIconDescription: 'Open filters',
|
|
51
|
+
sections: [{
|
|
52
|
+
categoryTitle: 'Category title',
|
|
53
|
+
hasAccordion: true,
|
|
54
|
+
filters: [{
|
|
55
|
+
filterLabel: 'Joined',
|
|
56
|
+
filter: {
|
|
57
|
+
type: 'date',
|
|
58
|
+
column: 'joined',
|
|
59
|
+
props: {
|
|
60
|
+
DatePicker: {
|
|
61
|
+
datePickerType: 'range'
|
|
62
|
+
},
|
|
63
|
+
DatePickerInput: {
|
|
64
|
+
start: {
|
|
65
|
+
id: 'date-picker-input-id-start',
|
|
66
|
+
placeholder: 'mm/dd/yyyy',
|
|
67
|
+
labelText: 'Joined start date'
|
|
68
|
+
},
|
|
69
|
+
end: {
|
|
70
|
+
id: 'date-picker-input-id-end',
|
|
71
|
+
placeholder: 'mm/dd/yyyy',
|
|
72
|
+
labelText: 'Joined end date'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
filterLabel: 'Status',
|
|
79
|
+
filter: {
|
|
80
|
+
type: 'dropdown',
|
|
81
|
+
column: 'status',
|
|
82
|
+
props: {
|
|
83
|
+
Dropdown: (_Dropdown = {
|
|
84
|
+
id: 'marital-status-dropdown'
|
|
85
|
+
}, (0, _defineProperty2.default)(_Dropdown, 'aria-label', 'Marital status dropdown'), (0, _defineProperty2.default)(_Dropdown, "items", ['relationship', 'complicated', 'single']), (0, _defineProperty2.default)(_Dropdown, "label", 'Marital status'), (0, _defineProperty2.default)(_Dropdown, "titleText", 'Marital status'), (0, _defineProperty2.default)(_Dropdown, "onChange", dropdownOnChange), _Dropdown)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}]
|
|
89
|
+
}, {
|
|
90
|
+
categoryTitle: 'Category title',
|
|
91
|
+
filters: [{
|
|
92
|
+
filterLabel: 'Role',
|
|
93
|
+
filter: {
|
|
94
|
+
type: 'radio',
|
|
95
|
+
column: 'role',
|
|
96
|
+
props: {
|
|
97
|
+
FormGroup: {
|
|
98
|
+
legendText: 'Role'
|
|
99
|
+
},
|
|
100
|
+
RadioButtonGroup: {
|
|
101
|
+
orientation: 'vertical',
|
|
102
|
+
legend: 'Role legend',
|
|
103
|
+
name: 'role-radio-button-group'
|
|
104
|
+
},
|
|
105
|
+
RadioButton: [{
|
|
106
|
+
id: 'developer',
|
|
107
|
+
labelText: 'Developer',
|
|
108
|
+
value: 'developer'
|
|
109
|
+
}, {
|
|
110
|
+
id: 'designer',
|
|
111
|
+
labelText: 'Designer',
|
|
112
|
+
value: 'designer'
|
|
113
|
+
}, {
|
|
114
|
+
id: 'researcher',
|
|
115
|
+
labelText: 'Researcher',
|
|
116
|
+
value: 'researcher'
|
|
117
|
+
}]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
filterLabel: 'Visits',
|
|
122
|
+
filter: {
|
|
123
|
+
type: 'number',
|
|
124
|
+
column: 'visits',
|
|
125
|
+
props: {
|
|
126
|
+
NumberInput: {
|
|
127
|
+
min: 0,
|
|
128
|
+
id: 'visits-number-input',
|
|
129
|
+
invalidText: 'A valid value is required',
|
|
130
|
+
label: 'Visits',
|
|
131
|
+
placeholder: 'Type a number amount of visits'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
filterLabel: 'Password strength',
|
|
137
|
+
filter: {
|
|
138
|
+
type: 'checkbox',
|
|
139
|
+
column: 'passwordStrength',
|
|
140
|
+
props: {
|
|
141
|
+
FormGroup: {
|
|
142
|
+
legendText: 'Password strength'
|
|
143
|
+
},
|
|
144
|
+
Checkbox: checkboxList
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
renderLabel: function renderLabel(key, value) {
|
|
150
|
+
return (0, _handleFilterTagLabelText.handleFilterTagLabelText)(key, value);
|
|
151
|
+
},
|
|
152
|
+
renderDateLabel: function renderDateLabel(start, end) {
|
|
153
|
+
var startDateObj = new Date(start);
|
|
154
|
+
var endDateObj = new Date(end);
|
|
155
|
+
return "".concat(startDateObj.toLocaleDateString(), " - ").concat(endDateObj.toLocaleDateString());
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
exports.filterProps = filterProps;
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _ErrorIllustration = require("../assets/ErrorIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationDescription", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -26,6 +26,7 @@ var componentName = 'ErrorEmptyState';
|
|
|
26
26
|
var ErrorEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
29
30
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
@@ -37,9 +38,9 @@ var ErrorEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
|
37
38
|
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--error")),
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_ErrorIllustration.ErrorIllustration, {
|
|
40
|
-
title: title,
|
|
41
41
|
theme: illustrationTheme,
|
|
42
|
-
size: size
|
|
42
|
+
size: size,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,11 @@ ErrorEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
/**
|
|
80
|
+
* The alt text for empty state svg images. If not provided , title will be used.
|
|
81
|
+
*/
|
|
82
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
83
|
/**
|
|
78
84
|
* Empty state illustration theme variations.
|
|
79
85
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _NoDataIllustration = require("../assets/NoDataIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -27,6 +27,7 @@ var NoDataEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
|
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
32
33
|
size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
|
|
@@ -37,9 +38,9 @@ var NoDataEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
|
|
|
37
38
|
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--noData")),
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoDataIllustration.NoDataIllustration, {
|
|
40
|
-
title: title,
|
|
41
41
|
theme: illustrationTheme,
|
|
42
|
-
size: size
|
|
42
|
+
size: size,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,10 @@ NoDataEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
* The alt text for empty state svg images.If not provided , title will be used.
|
|
80
|
+
*/
|
|
81
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
82
|
/**
|
|
78
83
|
* Empty state illustration theme variations.
|
|
79
84
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _NoTagsIllustration = require("../assets/NoTagsIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -27,6 +27,7 @@ var NoTagsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
|
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
32
33
|
size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
|
|
@@ -37,9 +38,9 @@ var NoTagsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
|
|
|
37
38
|
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--noTags")),
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoTagsIllustration.NoTagsIllustration, {
|
|
40
|
-
title: title,
|
|
41
41
|
theme: illustrationTheme,
|
|
42
|
-
size: size
|
|
42
|
+
size: size,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,10 @@ NoTagsEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
* The alt text for empty state svg images.If not provided , title will be used.
|
|
80
|
+
*/
|
|
81
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
82
|
/**
|
|
78
83
|
* Empty state illustration theme variations.
|
|
79
84
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _NotFoundIllustration = require("../assets/NotFoundIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -27,6 +27,7 @@ var NotFoundEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
32
33
|
size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
|
|
@@ -37,9 +38,9 @@ var NotFoundEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
|
37
38
|
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--notFound")),
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotFoundIllustration.NotFoundIllustration, {
|
|
40
|
-
title: title,
|
|
41
41
|
theme: illustrationTheme,
|
|
42
|
-
size: size
|
|
42
|
+
size: size,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,10 @@ NotFoundEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
* The alt text for empty state svg images.If not provided , title will be used.
|
|
80
|
+
*/
|
|
81
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
82
|
/**
|
|
78
83
|
* Empty state illustration theme variations.
|
|
79
84
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _NotificationsIllustration = require("../assets/NotificationsIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -27,6 +27,7 @@ var NotificationsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_
|
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
32
33
|
size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
|
|
@@ -38,8 +39,8 @@ var NotificationsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_
|
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotificationsIllustration.NotificationsIllustration, {
|
|
40
41
|
size: size,
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
theme: illustrationTheme,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,10 @@ NotificationsEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
* The alt text for empty state svg images.If not provided , title will be used.
|
|
80
|
+
*/
|
|
81
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
82
|
/**
|
|
78
83
|
* Empty state illustration theme variations.
|
|
79
84
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
|
|
|
17
17
|
var _EmptyStateContent = require("../EmptyStateContent");
|
|
18
18
|
var _UnauthorizedIllustration = require("../assets/UnauthorizedIllustration");
|
|
19
19
|
var _EmptyState = require("../EmptyState");
|
|
20
|
-
var _excluded = ["action", "className", "illustrationTheme", "link", "size", "subtitle", "title"];
|
|
20
|
+
var _excluded = ["action", "className", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -27,6 +27,7 @@ var UnauthorizedEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_r
|
|
|
27
27
|
var action = _ref.action,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
illustrationTheme = _ref.illustrationTheme,
|
|
30
|
+
illustrationDescription = _ref.illustrationDescription,
|
|
30
31
|
link = _ref.link,
|
|
31
32
|
_ref$size = _ref.size,
|
|
32
33
|
size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
|
|
@@ -38,8 +39,8 @@ var UnauthorizedEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_r
|
|
|
38
39
|
ref: ref
|
|
39
40
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_UnauthorizedIllustration.UnauthorizedIllustration, {
|
|
40
41
|
size: size,
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
theme: illustrationTheme,
|
|
43
|
+
alt: illustrationDescription || title
|
|
43
44
|
}), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
|
|
44
45
|
action: action,
|
|
45
46
|
link: link,
|
|
@@ -74,6 +75,10 @@ UnauthorizedEmptyState.propTypes = {
|
|
|
74
75
|
* Provide an optional class to be applied to the containing node.
|
|
75
76
|
*/
|
|
76
77
|
className: _propTypes.default.string,
|
|
78
|
+
/**
|
|
79
|
+
* The alt text for empty state svg images.If not provided , title will be used.
|
|
80
|
+
*/
|
|
81
|
+
illustrationDescription: _propTypes.default.string,
|
|
77
82
|
/**
|
|
78
83
|
* Empty state illustration theme variations.
|
|
79
84
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -28,7 +28,7 @@ var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
|
28
28
|
viewBox: "0 0 80 80",
|
|
29
29
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-error"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
30
30
|
role: "img"
|
|
31
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
31
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
32
32
|
id: "prefix__a_dark_".concat(svgId),
|
|
33
33
|
x1: 38.9,
|
|
34
34
|
y1: 77.08,
|
|
@@ -206,7 +206,7 @@ var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
|
206
206
|
};
|
|
207
207
|
exports.ErrorIllustration = ErrorIllustration;
|
|
208
208
|
ErrorIllustration.propTypes = {
|
|
209
|
+
alt: _propTypes.default.string.isRequired,
|
|
209
210
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
210
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
211
|
-
title: _propTypes.default.string
|
|
211
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
212
212
|
};
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -28,7 +28,7 @@ var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
|
28
28
|
viewBox: "0 0 80 80",
|
|
29
29
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noData"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
30
30
|
role: "img"
|
|
31
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
31
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
32
32
|
id: "prefix__a_dark_".concat(svgId),
|
|
33
33
|
x1: 11.12,
|
|
34
34
|
y1: 43.34,
|
|
@@ -169,7 +169,7 @@ var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
|
169
169
|
};
|
|
170
170
|
exports.NoDataIllustration = NoDataIllustration;
|
|
171
171
|
NoDataIllustration.propTypes = {
|
|
172
|
+
alt: _propTypes.default.string.isRequired,
|
|
172
173
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
173
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
174
|
-
title: _propTypes.default.string
|
|
174
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
175
175
|
};
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -29,7 +29,7 @@ var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
|
29
29
|
viewBox: "0 0 80 80",
|
|
30
30
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noTags"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
31
31
|
role: "img"
|
|
32
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
33
33
|
id: "prefix__c_dark_".concat(svgId),
|
|
34
34
|
x1: 34.96,
|
|
35
35
|
y1: 5.37,
|
|
@@ -476,7 +476,7 @@ var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
|
476
476
|
};
|
|
477
477
|
exports.NoTagsIllustration = NoTagsIllustration;
|
|
478
478
|
NoTagsIllustration.propTypes = {
|
|
479
|
+
alt: _propTypes.default.string.isRequired,
|
|
479
480
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
480
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
481
|
-
title: _propTypes.default.string
|
|
481
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
482
482
|
};
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -28,7 +28,7 @@ var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
|
28
28
|
viewBox: "0 0 80 80",
|
|
29
29
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notFound"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
30
30
|
role: "img"
|
|
31
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
31
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
32
32
|
id: "prefix__a_dark_".concat(svgId),
|
|
33
33
|
x1: 2.6,
|
|
34
34
|
y1: -12.81,
|
|
@@ -353,7 +353,7 @@ var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
|
353
353
|
};
|
|
354
354
|
exports.NotFoundIllustration = NotFoundIllustration;
|
|
355
355
|
NotFoundIllustration.propTypes = {
|
|
356
|
+
alt: _propTypes.default.string.isRequired,
|
|
356
357
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
357
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
358
|
-
title: _propTypes.default.string
|
|
358
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
359
359
|
};
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var NotificationsIllustration = function NotificationsIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -28,7 +28,7 @@ var NotificationsIllustration = function NotificationsIllustration(_ref) {
|
|
|
28
28
|
viewBox: "0 0 80 80",
|
|
29
29
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notification"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
30
30
|
role: "img"
|
|
31
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
31
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
32
32
|
id: "prefix__a_dark_".concat(svgId),
|
|
33
33
|
x1: 30.05,
|
|
34
34
|
y1: 54.31,
|
|
@@ -324,7 +324,7 @@ var NotificationsIllustration = function NotificationsIllustration(_ref) {
|
|
|
324
324
|
};
|
|
325
325
|
exports.NotificationsIllustration = NotificationsIllustration;
|
|
326
326
|
NotificationsIllustration.propTypes = {
|
|
327
|
+
alt: _propTypes.default.string.isRequired,
|
|
327
328
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
328
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
329
|
-
title: _propTypes.default.string
|
|
329
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
330
330
|
};
|
|
@@ -12,13 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _settings = require("../../../settings");
|
|
14
14
|
var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
|
|
15
|
-
var _excluded = ["
|
|
15
|
+
var _excluded = ["theme", "size", "alt"];
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
17
17
|
var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
|
|
18
18
|
var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
19
|
-
var
|
|
20
|
-
theme = _ref.theme,
|
|
19
|
+
var theme = _ref.theme,
|
|
21
20
|
size = _ref.size,
|
|
21
|
+
alt = _ref.alt,
|
|
22
22
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
23
|
var svgId = (0, _uuidv.default)();
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({}, rest, {
|
|
@@ -29,7 +29,7 @@ var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
|
29
29
|
viewBox: "0 0 80 80",
|
|
30
30
|
className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-unauthorized"), "".concat(blockClass, "__illustration--").concat(size)]),
|
|
31
31
|
role: "img"
|
|
32
|
-
}), /*#__PURE__*/_react.default.createElement("title", null,
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("title", null, alt), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
33
33
|
id: "prefix__b_dark_".concat(svgId),
|
|
34
34
|
x1: 17.33,
|
|
35
35
|
y1: 40.68,
|
|
@@ -297,7 +297,7 @@ var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
|
297
297
|
};
|
|
298
298
|
exports.UnauthorizedIllustration = UnauthorizedIllustration;
|
|
299
299
|
UnauthorizedIllustration.propTypes = {
|
|
300
|
+
alt: _propTypes.default.string.isRequired,
|
|
300
301
|
size: _propTypes.default.oneOf(['lg', 'sm']),
|
|
301
|
-
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
302
|
-
title: _propTypes.default.string
|
|
302
|
+
theme: _propTypes.default.oneOf(['light', 'dark'])
|
|
303
303
|
};
|