@elastic/eui 78.0.0 → 79.0.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/es/components/loading/index.js +0 -1
- package/es/components/page/page_header/page_header_content.js +15 -11
- package/es/components/skeleton/skeleton_circle.js +24 -3
- package/es/components/skeleton/skeleton_loading.js +11 -5
- package/es/components/skeleton/skeleton_rectangle.js +24 -3
- package/es/components/skeleton/skeleton_text.js +24 -3
- package/es/components/skeleton/skeleton_title.js +24 -3
- package/eui.d.ts +419 -418
- package/i18ntokens.json +14 -14
- package/lib/components/loading/index.js +0 -7
- package/lib/components/page/page_header/page_header_content.js +15 -11
- package/lib/components/skeleton/skeleton_circle.js +24 -3
- package/lib/components/skeleton/skeleton_loading.js +11 -5
- package/lib/components/skeleton/skeleton_rectangle.js +24 -3
- package/lib/components/skeleton/skeleton_text.js +24 -3
- package/lib/components/skeleton/skeleton_title.js +24 -3
- package/optimize/es/components/loading/index.js +0 -1
- package/optimize/es/components/page/page_header/page_header_content.js +10 -11
- package/optimize/es/components/skeleton/skeleton_circle.js +8 -2
- package/optimize/es/components/skeleton/skeleton_loading.js +11 -5
- package/optimize/es/components/skeleton/skeleton_rectangle.js +8 -2
- package/optimize/es/components/skeleton/skeleton_text.js +8 -2
- package/optimize/es/components/skeleton/skeleton_title.js +8 -2
- package/optimize/lib/components/loading/index.js +0 -7
- package/optimize/lib/components/page/page_header/page_header_content.js +10 -11
- package/optimize/lib/components/skeleton/skeleton_circle.js +8 -2
- package/optimize/lib/components/skeleton/skeleton_loading.js +11 -5
- package/optimize/lib/components/skeleton/skeleton_rectangle.js +8 -2
- package/optimize/lib/components/skeleton/skeleton_text.js +8 -2
- package/optimize/lib/components/skeleton/skeleton_title.js +8 -2
- package/package.json +1 -1
- package/test-env/components/loading/index.js +0 -7
- package/test-env/components/page/page_header/page_header_content.js +10 -11
- package/test-env/components/skeleton/skeleton_circle.js +24 -3
- package/test-env/components/skeleton/skeleton_loading.js +11 -5
- package/test-env/components/skeleton/skeleton_rectangle.js +24 -3
- package/test-env/components/skeleton/skeleton_text.js +24 -3
- package/test-env/components/skeleton/skeleton_title.js +24 -3
- package/es/components/loading/loading_content.js +0 -50
- package/lib/components/loading/loading_content.js +0 -54
- package/optimize/es/components/loading/loading_content.js +0 -21
- package/optimize/lib/components/loading/loading_content.js +0 -25
- package/test-env/components/loading/loading_content.js +0 -54
|
@@ -8,6 +8,5 @@
|
|
|
8
8
|
|
|
9
9
|
export { EuiLoadingElastic } from './loading_elastic';
|
|
10
10
|
export { EuiLoadingChart } from './loading_chart';
|
|
11
|
-
export { EuiLoadingContent } from './loading_content';
|
|
12
11
|
export { EuiLoadingSpinner } from './loading_spinner';
|
|
13
12
|
export { EuiLoadingLogo } from './loading_logo';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
var _excluded = ["className", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "description", "breadcrumbs", "breadcrumbProps", "alignItems", "responsive", "rightSideItems", "rightSideGroupProps", "children", "restrictWidth", "paddingSize", "bottomBorder", "style"],
|
|
2
2
|
_excluded2 = ["label"];
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
3
9
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -158,21 +164,19 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
|
|
|
158
164
|
}
|
|
159
165
|
var rightSideFlexItem;
|
|
160
166
|
if (rightSideItems && rightSideItems.length) {
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
};
|
|
167
|
+
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
|
|
168
|
+
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
169
|
+
return ___EmotionJSX(EuiFlexItem, {
|
|
170
|
+
grow: false,
|
|
171
|
+
key: index
|
|
172
|
+
}, item);
|
|
173
|
+
});
|
|
169
174
|
rightSideFlexItem = ___EmotionJSX(EuiFlexItem, {
|
|
170
175
|
grow: false
|
|
171
176
|
}, ___EmotionJSX(EuiFlexGroup, _extends({
|
|
172
177
|
wrap: true,
|
|
173
|
-
responsive: false
|
|
174
|
-
|
|
175
|
-
}, rightSideGroupProps), wrapWithFlex()));
|
|
178
|
+
responsive: false
|
|
179
|
+
}, rightSideGroupProps), rightSideFlexItems));
|
|
176
180
|
}
|
|
177
181
|
return alignItems === 'top' || isResponsiveBreakpoint ? ___EmotionJSX("div", _extends({
|
|
178
182
|
className: classes,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
|
|
1
|
+
var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -25,6 +25,9 @@ export var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
25
25
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
26
26
|
className = _ref.className,
|
|
27
27
|
contentAriaLabel = _ref.contentAriaLabel,
|
|
28
|
+
announceLoadingStatus = _ref.announceLoadingStatus,
|
|
29
|
+
announceLoadedStatus = _ref.announceLoadedStatus,
|
|
30
|
+
ariaLiveProps = _ref.ariaLiveProps,
|
|
28
31
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
29
32
|
children = _ref.children,
|
|
30
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -38,7 +41,10 @@ export var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
38
41
|
css: cssStyles
|
|
39
42
|
}, rest)),
|
|
40
43
|
loadedContent: children || '',
|
|
41
|
-
contentAriaLabel: contentAriaLabel
|
|
44
|
+
contentAriaLabel: contentAriaLabel,
|
|
45
|
+
announceLoadingStatus: announceLoadingStatus,
|
|
46
|
+
announceLoadedStatus: announceLoadedStatus,
|
|
47
|
+
ariaLiveProps: ariaLiveProps
|
|
42
48
|
}, ariaWrapperProps));
|
|
43
49
|
};
|
|
44
50
|
EuiSkeletonCircle.propTypes = {
|
|
@@ -57,7 +63,22 @@ EuiSkeletonCircle.propTypes = {
|
|
|
57
63
|
*/
|
|
58
64
|
contentAriaLabel: PropTypes.string,
|
|
59
65
|
/**
|
|
60
|
-
*
|
|
66
|
+
* Makes a live screen reader announcement when `isLoading` is true
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
announceLoadingStatus: PropTypes.bool,
|
|
70
|
+
/**
|
|
71
|
+
* Makes a live screen reader announcement when `isLoading` is false
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
announceLoadedStatus: PropTypes.bool,
|
|
75
|
+
/**
|
|
76
|
+
* Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
|
|
77
|
+
* Accepts any `EuiScreenReaderLive` props.
|
|
78
|
+
*/
|
|
79
|
+
ariaLiveProps: PropTypes.any,
|
|
80
|
+
/**
|
|
81
|
+
* Optional props to pass to the `aria-busy` wrapper around the skeleton content
|
|
61
82
|
*/
|
|
62
83
|
ariaWrapperProps: PropTypes.any,
|
|
63
84
|
size: PropTypes.any
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent"];
|
|
1
|
+
var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -19,23 +19,29 @@ export var EuiSkeletonLoading = function EuiSkeletonLoading(_ref) {
|
|
|
19
19
|
var _ref$isLoading = _ref.isLoading,
|
|
20
20
|
isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
|
|
21
21
|
contentAriaLabel = _ref.contentAriaLabel,
|
|
22
|
-
|
|
22
|
+
_loadingContent = _ref.loadingContent,
|
|
23
23
|
loadedContent = _ref.loadedContent,
|
|
24
|
+
_ref$announceLoadingS = _ref.announceLoadingStatus,
|
|
25
|
+
announceLoadingStatus = _ref$announceLoadingS === void 0 ? false : _ref$announceLoadingS,
|
|
26
|
+
_ref$announceLoadedSt = _ref.announceLoadedStatus,
|
|
27
|
+
announceLoadedStatus = _ref$announceLoadedSt === void 0 ? true : _ref$announceLoadedSt,
|
|
28
|
+
ariaLiveProps = _ref.ariaLiveProps,
|
|
24
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
var
|
|
30
|
+
var loadedAriaLive = useEuiI18n('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
|
|
26
31
|
contentAriaLabel: contentAriaLabel
|
|
27
32
|
});
|
|
28
|
-
var
|
|
33
|
+
var loadingAriaLabel = useEuiI18n('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
|
|
29
34
|
contentAriaLabel: contentAriaLabel
|
|
30
35
|
});
|
|
31
36
|
var loadingProps = {
|
|
32
37
|
'aria-label': loadingAriaLabel,
|
|
33
38
|
role: 'progressbar'
|
|
34
39
|
};
|
|
40
|
+
var loadingContent = /*#__PURE__*/React.cloneElement(_loadingContent, loadingProps);
|
|
35
41
|
return ___EmotionJSX("div", _extends({
|
|
36
42
|
"aria-busy": isLoading,
|
|
37
43
|
"data-test-subj": "euiSkeletonLoadingAriaWrapper"
|
|
38
|
-
}, rest), isLoading ?
|
|
44
|
+
}, rest), isLoading ? ___EmotionJSX(React.Fragment, null, announceLoadingStatus && ___EmotionJSX(EuiScreenReaderLive, ariaLiveProps, loadingAriaLabel), loadingContent) : ___EmotionJSX(React.Fragment, null, announceLoadedStatus && ___EmotionJSX(EuiScreenReaderLive, ariaLiveProps, loadedAriaLive), loadedContent));
|
|
39
45
|
};
|
|
40
46
|
EuiSkeletonLoading.propTypes = {
|
|
41
47
|
className: PropTypes.string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
|
|
2
|
+
var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
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; }
|
|
5
5
|
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) { _defineProperty(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; }
|
|
@@ -37,6 +37,9 @@ export var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
37
37
|
style = _ref.style,
|
|
38
38
|
className = _ref.className,
|
|
39
39
|
contentAriaLabel = _ref.contentAriaLabel,
|
|
40
|
+
announceLoadingStatus = _ref.announceLoadingStatus,
|
|
41
|
+
announceLoadedStatus = _ref.announceLoadedStatus,
|
|
42
|
+
ariaLiveProps = _ref.ariaLiveProps,
|
|
40
43
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
41
44
|
children = _ref.children,
|
|
42
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -54,7 +57,10 @@ export var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
54
57
|
}))
|
|
55
58
|
}, rest)),
|
|
56
59
|
loadedContent: children || '',
|
|
57
|
-
contentAriaLabel: contentAriaLabel
|
|
60
|
+
contentAriaLabel: contentAriaLabel,
|
|
61
|
+
announceLoadingStatus: announceLoadingStatus,
|
|
62
|
+
announceLoadedStatus: announceLoadedStatus,
|
|
63
|
+
ariaLiveProps: ariaLiveProps
|
|
58
64
|
}, ariaWrapperProps));
|
|
59
65
|
};
|
|
60
66
|
EuiSkeletonRectangle.propTypes = {
|
|
@@ -73,7 +79,22 @@ EuiSkeletonRectangle.propTypes = {
|
|
|
73
79
|
*/
|
|
74
80
|
contentAriaLabel: PropTypes.string,
|
|
75
81
|
/**
|
|
76
|
-
*
|
|
82
|
+
* Makes a live screen reader announcement when `isLoading` is true
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
announceLoadingStatus: PropTypes.bool,
|
|
86
|
+
/**
|
|
87
|
+
* Makes a live screen reader announcement when `isLoading` is false
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
announceLoadedStatus: PropTypes.bool,
|
|
91
|
+
/**
|
|
92
|
+
* Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
|
|
93
|
+
* Accepts any `EuiScreenReaderLive` props.
|
|
94
|
+
*/
|
|
95
|
+
ariaLiveProps: PropTypes.any,
|
|
96
|
+
/**
|
|
97
|
+
* Optional props to pass to the `aria-busy` wrapper around the skeleton content
|
|
77
98
|
*/
|
|
78
99
|
ariaWrapperProps: PropTypes.any,
|
|
79
100
|
width: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.number.isRequired]),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
|
|
1
|
+
var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -27,6 +27,9 @@ export var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
27
27
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
contentAriaLabel = _ref.contentAriaLabel,
|
|
30
|
+
announceLoadingStatus = _ref.announceLoadingStatus,
|
|
31
|
+
announceLoadedStatus = _ref.announceLoadedStatus,
|
|
32
|
+
ariaLiveProps = _ref.ariaLiveProps,
|
|
30
33
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
31
34
|
children = _ref.children,
|
|
32
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -46,7 +49,10 @@ export var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
46
49
|
className: classNames('euiSkeletonText', className)
|
|
47
50
|
}, rest), lineElements),
|
|
48
51
|
loadedContent: children || '',
|
|
49
|
-
contentAriaLabel: contentAriaLabel
|
|
52
|
+
contentAriaLabel: contentAriaLabel,
|
|
53
|
+
announceLoadingStatus: announceLoadingStatus,
|
|
54
|
+
announceLoadedStatus: announceLoadedStatus,
|
|
55
|
+
ariaLiveProps: ariaLiveProps
|
|
50
56
|
}, ariaWrapperProps));
|
|
51
57
|
};
|
|
52
58
|
EuiSkeletonText.propTypes = {
|
|
@@ -65,7 +71,22 @@ EuiSkeletonText.propTypes = {
|
|
|
65
71
|
*/
|
|
66
72
|
contentAriaLabel: PropTypes.string,
|
|
67
73
|
/**
|
|
68
|
-
*
|
|
74
|
+
* Makes a live screen reader announcement when `isLoading` is true
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
announceLoadingStatus: PropTypes.bool,
|
|
78
|
+
/**
|
|
79
|
+
* Makes a live screen reader announcement when `isLoading` is false
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
announceLoadedStatus: PropTypes.bool,
|
|
83
|
+
/**
|
|
84
|
+
* Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
|
|
85
|
+
* Accepts any `EuiScreenReaderLive` props.
|
|
86
|
+
*/
|
|
87
|
+
ariaLiveProps: PropTypes.any,
|
|
88
|
+
/**
|
|
89
|
+
* Optional props to pass to the `aria-busy` wrapper around the skeleton content
|
|
69
90
|
*/
|
|
70
91
|
ariaWrapperProps: PropTypes.any,
|
|
71
92
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
|
|
1
|
+
var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -24,6 +24,9 @@ export var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
24
24
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
25
25
|
className = _ref.className,
|
|
26
26
|
contentAriaLabel = _ref.contentAriaLabel,
|
|
27
|
+
announceLoadingStatus = _ref.announceLoadingStatus,
|
|
28
|
+
announceLoadedStatus = _ref.announceLoadedStatus,
|
|
29
|
+
ariaLiveProps = _ref.ariaLiveProps,
|
|
27
30
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
28
31
|
children = _ref.children,
|
|
29
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -37,7 +40,10 @@ export var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
37
40
|
css: cssStyles
|
|
38
41
|
}, rest)),
|
|
39
42
|
loadedContent: children || '',
|
|
40
|
-
contentAriaLabel: contentAriaLabel
|
|
43
|
+
contentAriaLabel: contentAriaLabel,
|
|
44
|
+
announceLoadingStatus: announceLoadingStatus,
|
|
45
|
+
announceLoadedStatus: announceLoadedStatus,
|
|
46
|
+
ariaLiveProps: ariaLiveProps
|
|
41
47
|
}, ariaWrapperProps));
|
|
42
48
|
};
|
|
43
49
|
EuiSkeletonTitle.propTypes = {
|
|
@@ -56,7 +62,22 @@ EuiSkeletonTitle.propTypes = {
|
|
|
56
62
|
*/
|
|
57
63
|
contentAriaLabel: PropTypes.string,
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
65
|
+
* Makes a live screen reader announcement when `isLoading` is true
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
announceLoadingStatus: PropTypes.bool,
|
|
69
|
+
/**
|
|
70
|
+
* Makes a live screen reader announcement when `isLoading` is false
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
|
+
announceLoadedStatus: PropTypes.bool,
|
|
74
|
+
/**
|
|
75
|
+
* Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
|
|
76
|
+
* Accepts any `EuiScreenReaderLive` props.
|
|
77
|
+
*/
|
|
78
|
+
ariaLiveProps: PropTypes.any,
|
|
79
|
+
/**
|
|
80
|
+
* Optional props to pass to the `aria-busy` wrapper around the skeleton content
|
|
60
81
|
*/
|
|
61
82
|
ariaWrapperProps: PropTypes.any,
|
|
62
83
|
/**
|