@elastic/eui 78.0.0 → 79.0.1

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.
Files changed (51) hide show
  1. package/es/components/flyout/flyout.js +1 -1
  2. package/es/components/focus_trap/focus_trap.js +1 -1
  3. package/es/components/loading/index.js +0 -1
  4. package/es/components/page/page_header/page_header_content.js +15 -11
  5. package/es/components/skeleton/skeleton_circle.js +24 -3
  6. package/es/components/skeleton/skeleton_loading.js +11 -5
  7. package/es/components/skeleton/skeleton_rectangle.js +24 -3
  8. package/es/components/skeleton/skeleton_text.js +24 -3
  9. package/es/components/skeleton/skeleton_title.js +24 -3
  10. package/eui.d.ts +419 -418
  11. package/i18ntokens.json +14 -14
  12. package/lib/components/flyout/flyout.js +1 -1
  13. package/lib/components/focus_trap/focus_trap.js +1 -1
  14. package/lib/components/loading/index.js +0 -7
  15. package/lib/components/page/page_header/page_header_content.js +15 -11
  16. package/lib/components/skeleton/skeleton_circle.js +24 -3
  17. package/lib/components/skeleton/skeleton_loading.js +11 -5
  18. package/lib/components/skeleton/skeleton_rectangle.js +24 -3
  19. package/lib/components/skeleton/skeleton_text.js +24 -3
  20. package/lib/components/skeleton/skeleton_title.js +24 -3
  21. package/optimize/es/components/flyout/flyout.js +1 -1
  22. package/optimize/es/components/focus_trap/focus_trap.js +1 -1
  23. package/optimize/es/components/loading/index.js +0 -1
  24. package/optimize/es/components/page/page_header/page_header_content.js +10 -11
  25. package/optimize/es/components/skeleton/skeleton_circle.js +8 -2
  26. package/optimize/es/components/skeleton/skeleton_loading.js +11 -5
  27. package/optimize/es/components/skeleton/skeleton_rectangle.js +8 -2
  28. package/optimize/es/components/skeleton/skeleton_text.js +8 -2
  29. package/optimize/es/components/skeleton/skeleton_title.js +8 -2
  30. package/optimize/lib/components/flyout/flyout.js +1 -1
  31. package/optimize/lib/components/focus_trap/focus_trap.js +1 -1
  32. package/optimize/lib/components/loading/index.js +0 -7
  33. package/optimize/lib/components/page/page_header/page_header_content.js +10 -11
  34. package/optimize/lib/components/skeleton/skeleton_circle.js +8 -2
  35. package/optimize/lib/components/skeleton/skeleton_loading.js +11 -5
  36. package/optimize/lib/components/skeleton/skeleton_rectangle.js +8 -2
  37. package/optimize/lib/components/skeleton/skeleton_text.js +8 -2
  38. package/optimize/lib/components/skeleton/skeleton_title.js +8 -2
  39. package/package.json +1 -1
  40. package/test-env/components/loading/index.js +0 -7
  41. package/test-env/components/page/page_header/page_header_content.js +10 -11
  42. package/test-env/components/skeleton/skeleton_circle.js +24 -3
  43. package/test-env/components/skeleton/skeleton_loading.js +11 -5
  44. package/test-env/components/skeleton/skeleton_rectangle.js +24 -3
  45. package/test-env/components/skeleton/skeleton_text.js +24 -3
  46. package/test-env/components/skeleton/skeleton_title.js +24 -3
  47. package/es/components/loading/loading_content.js +0 -50
  48. package/lib/components/loading/loading_content.js +0 -54
  49. package/optimize/es/components/loading/loading_content.js +0 -21
  50. package/optimize/lib/components/loading/loading_content.js +0 -25
  51. package/test-env/components/loading/loading_content.js +0 -54
@@ -255,7 +255,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
255
255
  };
256
256
  var flyout = ___EmotionJSX(EuiFocusTrap, _extends({
257
257
  disabled: isPushed,
258
- scrollLock: ownFocus,
258
+ scrollLock: hasOverlayMask,
259
259
  clickOutsideDisables: !ownFocus,
260
260
  onClickOutside: onClickOutside
261
261
  }, focusTrapProps), ___EmotionJSX(Element, _extends({
@@ -133,7 +133,7 @@ export var EuiFocusTrap = /*#__PURE__*/function (_Component) {
133
133
  */
134
134
  scrollLock: false
135
135
  });
136
- return ___EmotionJSX(FocusOn, focusOnProps, children, scrollLock && ___EmotionJSX(RemoveScrollBar, {
136
+ return ___EmotionJSX(FocusOn, focusOnProps, children, !isDisabled && scrollLock && ___EmotionJSX(RemoveScrollBar, {
137
137
  gapMode: gapMode
138
138
  }));
139
139
  }
@@ -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 wrapWithFlex = function wrapWithFlex() {
162
- return rightSideItems.map(function (item, index) {
163
- return ___EmotionJSX(EuiFlexItem, {
164
- grow: false,
165
- key: index
166
- }, item);
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
- direction: isResponsiveBreakpoint ? undefined : 'rowReverse'
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
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
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
- loadingContent = _ref.loadingContent,
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 loadingAriaLabel = useEuiI18n('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
30
+ var loadedAriaLive = useEuiI18n('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
26
31
  contentAriaLabel: contentAriaLabel
27
32
  });
28
- var loadedAriaLive = useEuiI18n('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
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 ? /*#__PURE__*/React.cloneElement(loadingContent, loadingProps) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiScreenReaderLive, null, loadedAriaLive), loadedContent));
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
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
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
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
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
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
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
  /**