@elastic/eui 77.2.2 → 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.
Files changed (87) hide show
  1. package/README.md +7 -21
  2. package/dist/eui_theme_dark.css +28 -29
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +28 -29
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/avatar/avatar.js +15 -3
  7. package/es/components/avatar/avatar.styles.js +46 -9
  8. package/es/components/form/form.styles.js +2 -2
  9. package/es/components/loading/index.js +0 -1
  10. package/es/components/page/page_header/page_header_content.js +15 -11
  11. package/es/components/search_bar/query/ast_to_es_query_dsl.js +2 -2
  12. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +7 -0
  13. package/es/components/skeleton/skeleton_circle.js +24 -3
  14. package/es/components/skeleton/skeleton_loading.js +11 -5
  15. package/es/components/skeleton/skeleton_rectangle.js +24 -3
  16. package/es/components/skeleton/skeleton_text.js +24 -3
  17. package/es/components/skeleton/skeleton_title.js +24 -3
  18. package/es/test/rtl/custom_render.js +11 -1
  19. package/es/test/rtl/index.d.ts +1 -1
  20. package/es/test/rtl/index.js +1 -1
  21. package/eui.d.ts +433 -419
  22. package/i18ntokens.json +14 -14
  23. package/lib/components/avatar/avatar.js +17 -4
  24. package/lib/components/avatar/avatar.styles.js +46 -9
  25. package/lib/components/form/form.styles.js +2 -2
  26. package/lib/components/loading/index.js +0 -7
  27. package/lib/components/page/page_header/page_header_content.js +15 -11
  28. package/lib/components/search_bar/query/ast_to_es_query_dsl.js +2 -2
  29. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +7 -0
  30. package/lib/components/skeleton/skeleton_circle.js +24 -3
  31. package/lib/components/skeleton/skeleton_loading.js +11 -5
  32. package/lib/components/skeleton/skeleton_rectangle.js +24 -3
  33. package/lib/components/skeleton/skeleton_text.js +24 -3
  34. package/lib/components/skeleton/skeleton_title.js +24 -3
  35. package/lib/test/rtl/custom_render.js +11 -2
  36. package/lib/test/rtl/index.d.ts +1 -1
  37. package/lib/test/rtl/index.js +8 -1
  38. package/optimize/es/components/avatar/avatar.js +8 -3
  39. package/optimize/es/components/avatar/avatar.styles.js +46 -9
  40. package/optimize/es/components/form/form.styles.js +2 -2
  41. package/optimize/es/components/loading/index.js +0 -1
  42. package/optimize/es/components/page/page_header/page_header_content.js +10 -11
  43. package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +2 -2
  44. package/optimize/es/components/skeleton/skeleton_circle.js +8 -2
  45. package/optimize/es/components/skeleton/skeleton_loading.js +11 -5
  46. package/optimize/es/components/skeleton/skeleton_rectangle.js +8 -2
  47. package/optimize/es/components/skeleton/skeleton_text.js +8 -2
  48. package/optimize/es/components/skeleton/skeleton_title.js +8 -2
  49. package/optimize/es/test/rtl/custom_render.js +11 -1
  50. package/optimize/es/test/rtl/index.d.ts +1 -1
  51. package/optimize/es/test/rtl/index.js +1 -1
  52. package/optimize/lib/components/avatar/avatar.js +10 -4
  53. package/optimize/lib/components/avatar/avatar.styles.js +46 -9
  54. package/optimize/lib/components/form/form.styles.js +2 -2
  55. package/optimize/lib/components/loading/index.js +0 -7
  56. package/optimize/lib/components/page/page_header/page_header_content.js +10 -11
  57. package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +2 -2
  58. package/optimize/lib/components/skeleton/skeleton_circle.js +8 -2
  59. package/optimize/lib/components/skeleton/skeleton_loading.js +11 -5
  60. package/optimize/lib/components/skeleton/skeleton_rectangle.js +8 -2
  61. package/optimize/lib/components/skeleton/skeleton_text.js +8 -2
  62. package/optimize/lib/components/skeleton/skeleton_title.js +8 -2
  63. package/optimize/lib/test/rtl/custom_render.js +11 -2
  64. package/optimize/lib/test/rtl/index.d.ts +1 -1
  65. package/optimize/lib/test/rtl/index.js +8 -1
  66. package/package.json +2 -2
  67. package/src/components/form/switch/_switch.scss +30 -26
  68. package/src/global_styling/variables/_form.scss +2 -2
  69. package/test-env/components/avatar/avatar.js +17 -4
  70. package/test-env/components/avatar/avatar.styles.js +46 -9
  71. package/test-env/components/form/form.styles.js +2 -2
  72. package/test-env/components/loading/index.js +0 -7
  73. package/test-env/components/page/page_header/page_header_content.js +10 -11
  74. package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +2 -2
  75. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +7 -0
  76. package/test-env/components/skeleton/skeleton_circle.js +24 -3
  77. package/test-env/components/skeleton/skeleton_loading.js +11 -5
  78. package/test-env/components/skeleton/skeleton_rectangle.js +24 -3
  79. package/test-env/components/skeleton/skeleton_text.js +24 -3
  80. package/test-env/components/skeleton/skeleton_title.js +24 -3
  81. package/test-env/test/rtl/custom_render.js +11 -2
  82. package/test-env/test/rtl/index.js +8 -1
  83. package/es/components/loading/loading_content.js +0 -50
  84. package/lib/components/loading/loading_content.js +0 -54
  85. package/optimize/es/components/loading/loading_content.js +0 -21
  86. package/optimize/lib/components/loading/loading_content.js +0 -25
  87. package/test-env/components/loading/loading_content.js +0 -54
@@ -14,7 +14,7 @@ var _services = require("../../services");
14
14
  var _skeleton_loading = require("./skeleton_loading");
15
15
  var _skeleton_circle = require("./skeleton_circle.styles");
16
16
  var _react2 = require("@emotion/react");
17
- var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
17
+ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
18
18
  var SIZES = ['s', 'm', 'l', 'xl'];
19
19
  exports.SIZES = SIZES;
20
20
  var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
@@ -24,6 +24,9 @@ var EuiSkeletonCircle = function EuiSkeletonCircle(_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 = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -37,7 +40,10 @@ var EuiSkeletonCircle = function EuiSkeletonCircle(_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
  exports.EuiSkeletonCircle = EuiSkeletonCircle;
@@ -57,7 +63,22 @@ EuiSkeletonCircle.propTypes = {
57
63
  */
58
64
  contentAriaLabel: _propTypes.default.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.default.bool,
70
+ /**
71
+ * Makes a live screen reader announcement when `isLoading` is false
72
+ * @default true
73
+ */
74
+ announceLoadedStatus: _propTypes.default.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.default.any,
80
+ /**
81
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
61
82
  */
62
83
  ariaWrapperProps: _propTypes.default.any,
63
84
  size: _propTypes.default.any
@@ -12,28 +12,34 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _screen_reader_live = require("../accessibility/screen_reader_live");
13
13
  var _i18n = require("../i18n");
14
14
  var _react2 = require("@emotion/react");
15
- var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent"];
15
+ var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps"];
16
16
  var EuiSkeletonLoading = function EuiSkeletonLoading(_ref) {
17
17
  var _ref$isLoading = _ref.isLoading,
18
18
  isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
19
19
  contentAriaLabel = _ref.contentAriaLabel,
20
- loadingContent = _ref.loadingContent,
20
+ _loadingContent = _ref.loadingContent,
21
21
  loadedContent = _ref.loadedContent,
22
+ _ref$announceLoadingS = _ref.announceLoadingStatus,
23
+ announceLoadingStatus = _ref$announceLoadingS === void 0 ? false : _ref$announceLoadingS,
24
+ _ref$announceLoadedSt = _ref.announceLoadedStatus,
25
+ announceLoadedStatus = _ref$announceLoadedSt === void 0 ? true : _ref$announceLoadedSt,
26
+ ariaLiveProps = _ref.ariaLiveProps,
22
27
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
23
- var loadingAriaLabel = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
28
+ var loadedAriaLive = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
24
29
  contentAriaLabel: contentAriaLabel
25
30
  });
26
- var loadedAriaLive = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
31
+ var loadingAriaLabel = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
27
32
  contentAriaLabel: contentAriaLabel
28
33
  });
29
34
  var loadingProps = {
30
35
  'aria-label': loadingAriaLabel,
31
36
  role: 'progressbar'
32
37
  };
38
+ var loadingContent = /*#__PURE__*/_react.default.cloneElement(_loadingContent, loadingProps);
33
39
  return (0, _react2.jsx)("div", (0, _extends2.default)({
34
40
  "aria-busy": isLoading,
35
41
  "data-test-subj": "euiSkeletonLoadingAriaWrapper"
36
- }, rest), isLoading ? /*#__PURE__*/_react.default.cloneElement(loadingContent, loadingProps) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_screen_reader_live.EuiScreenReaderLive, null, loadedAriaLive), loadedContent));
42
+ }, rest), isLoading ? (0, _react2.jsx)(_react.default.Fragment, null, announceLoadingStatus && (0, _react2.jsx)(_screen_reader_live.EuiScreenReaderLive, ariaLiveProps, loadingAriaLabel), loadingContent) : (0, _react2.jsx)(_react.default.Fragment, null, announceLoadedStatus && (0, _react2.jsx)(_screen_reader_live.EuiScreenReaderLive, ariaLiveProps, loadedAriaLive), loadedContent));
37
43
  };
38
44
  exports.EuiSkeletonLoading = EuiSkeletonLoading;
39
45
  EuiSkeletonLoading.propTypes = {
@@ -16,7 +16,7 @@ var _global_styling = require("../../global_styling");
16
16
  var _skeleton_loading = require("./skeleton_loading");
17
17
  var _skeleton_rectangle = require("./skeleton_rectangle.styles");
18
18
  var _react2 = require("@emotion/react");
19
- var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
19
+ var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
20
20
  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; }
21
21
  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; }
22
22
  var RADIUS = ['s', 'm', 'none'];
@@ -33,6 +33,9 @@ var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
33
33
  style = _ref.style,
34
34
  className = _ref.className,
35
35
  contentAriaLabel = _ref.contentAriaLabel,
36
+ announceLoadingStatus = _ref.announceLoadingStatus,
37
+ announceLoadedStatus = _ref.announceLoadedStatus,
38
+ ariaLiveProps = _ref.ariaLiveProps,
36
39
  ariaWrapperProps = _ref.ariaWrapperProps,
37
40
  children = _ref.children,
38
41
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -50,7 +53,10 @@ var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
50
53
  }))
51
54
  }, rest)),
52
55
  loadedContent: children || '',
53
- contentAriaLabel: contentAriaLabel
56
+ contentAriaLabel: contentAriaLabel,
57
+ announceLoadingStatus: announceLoadingStatus,
58
+ announceLoadedStatus: announceLoadedStatus,
59
+ ariaLiveProps: ariaLiveProps
54
60
  }, ariaWrapperProps));
55
61
  };
56
62
  exports.EuiSkeletonRectangle = EuiSkeletonRectangle;
@@ -70,7 +76,22 @@ EuiSkeletonRectangle.propTypes = {
70
76
  */
71
77
  contentAriaLabel: _propTypes.default.string,
72
78
  /**
73
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
79
+ * Makes a live screen reader announcement when `isLoading` is true
80
+ * @default false
81
+ */
82
+ announceLoadingStatus: _propTypes.default.bool,
83
+ /**
84
+ * Makes a live screen reader announcement when `isLoading` is false
85
+ * @default true
86
+ */
87
+ announceLoadedStatus: _propTypes.default.bool,
88
+ /**
89
+ * Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
90
+ * Accepts any `EuiScreenReaderLive` props.
91
+ */
92
+ ariaLiveProps: _propTypes.default.any,
93
+ /**
94
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
74
95
  */
75
96
  ariaWrapperProps: _propTypes.default.any,
76
97
  width: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired]),
@@ -14,7 +14,7 @@ var _services = require("../../services");
14
14
  var _skeleton_loading = require("./skeleton_loading");
15
15
  var _skeleton_text = require("./skeleton_text.styles");
16
16
  var _react2 = require("@emotion/react");
17
- var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
17
+ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
18
18
  var LINES = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
19
19
  exports.LINES = LINES;
20
20
  var EuiSkeletonText = function EuiSkeletonText(_ref) {
@@ -26,6 +26,9 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
26
26
  size = _ref$size === void 0 ? 'm' : _ref$size,
27
27
  className = _ref.className,
28
28
  contentAriaLabel = _ref.contentAriaLabel,
29
+ announceLoadingStatus = _ref.announceLoadingStatus,
30
+ announceLoadedStatus = _ref.announceLoadedStatus,
31
+ ariaLiveProps = _ref.ariaLiveProps,
29
32
  ariaWrapperProps = _ref.ariaWrapperProps,
30
33
  children = _ref.children,
31
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -45,7 +48,10 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
45
48
  className: (0, _classnames.default)('euiSkeletonText', className)
46
49
  }, rest), lineElements),
47
50
  loadedContent: children || '',
48
- contentAriaLabel: contentAriaLabel
51
+ contentAriaLabel: contentAriaLabel,
52
+ announceLoadingStatus: announceLoadingStatus,
53
+ announceLoadedStatus: announceLoadedStatus,
54
+ ariaLiveProps: ariaLiveProps
49
55
  }, ariaWrapperProps));
50
56
  };
51
57
  exports.EuiSkeletonText = EuiSkeletonText;
@@ -65,7 +71,22 @@ EuiSkeletonText.propTypes = {
65
71
  */
66
72
  contentAriaLabel: _propTypes.default.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.default.bool,
78
+ /**
79
+ * Makes a live screen reader announcement when `isLoading` is false
80
+ * @default true
81
+ */
82
+ announceLoadedStatus: _propTypes.default.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.default.any,
88
+ /**
89
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
69
90
  */
70
91
  ariaWrapperProps: _propTypes.default.any,
71
92
  /**
@@ -14,7 +14,7 @@ var _services = require("../../services");
14
14
  var _skeleton_loading = require("./skeleton_loading");
15
15
  var _skeleton_title = require("./skeleton_title.styles");
16
16
  var _react2 = require("@emotion/react");
17
- var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
17
+ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
18
18
  var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
19
19
  var _ref$isLoading = _ref.isLoading,
20
20
  isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
@@ -22,6 +22,9 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
22
22
  size = _ref$size === void 0 ? 'm' : _ref$size,
23
23
  className = _ref.className,
24
24
  contentAriaLabel = _ref.contentAriaLabel,
25
+ announceLoadingStatus = _ref.announceLoadingStatus,
26
+ announceLoadedStatus = _ref.announceLoadedStatus,
27
+ ariaLiveProps = _ref.ariaLiveProps,
25
28
  ariaWrapperProps = _ref.ariaWrapperProps,
26
29
  children = _ref.children,
27
30
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -35,7 +38,10 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
35
38
  css: cssStyles
36
39
  }, rest)),
37
40
  loadedContent: children || '',
38
- contentAriaLabel: contentAriaLabel
41
+ contentAriaLabel: contentAriaLabel,
42
+ announceLoadingStatus: announceLoadingStatus,
43
+ announceLoadedStatus: announceLoadedStatus,
44
+ ariaLiveProps: ariaLiveProps
39
45
  }, ariaWrapperProps));
40
46
  };
41
47
  exports.EuiSkeletonTitle = EuiSkeletonTitle;
@@ -55,7 +61,22 @@ EuiSkeletonTitle.propTypes = {
55
61
  */
56
62
  contentAriaLabel: _propTypes.default.string,
57
63
  /**
58
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
64
+ * Makes a live screen reader announcement when `isLoading` is true
65
+ * @default false
66
+ */
67
+ announceLoadingStatus: _propTypes.default.bool,
68
+ /**
69
+ * Makes a live screen reader announcement when `isLoading` is false
70
+ * @default true
71
+ */
72
+ announceLoadedStatus: _propTypes.default.bool,
73
+ /**
74
+ * Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
75
+ * Accepts any `EuiScreenReaderLive` props.
76
+ */
77
+ ariaLiveProps: _propTypes.default.any,
78
+ /**
79
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
59
80
  */
60
81
  ariaWrapperProps: _propTypes.default.any,
61
82
  /**
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.screen = exports.render = void 0;
8
+ exports.within = exports.screen = exports.render = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("@testing-library/react");
@@ -40,4 +40,13 @@ exports.render = customRender;
40
40
  * @see https://github.com/testing-library/dom-testing-library/issues/516
41
41
  */
42
42
  var customScreen = _objectSpread(_objectSpread({}, _react.screen), (0, _react.within)(document.body, dataTestSubjQueries));
43
- exports.screen = customScreen;
43
+ exports.screen = customScreen;
44
+ /**
45
+ * Custom within util with EUI query helpers
46
+ *
47
+ * @see https://testing-library.com/docs/dom-testing-library/api-within/
48
+ */
49
+ var customWithin = function customWithin(element) {
50
+ return (0, _react.within)(element, _objectSpread(_objectSpread({}, _react.queries), dataTestSubjQueries));
51
+ };
52
+ exports.within = customWithin;
@@ -11,7 +11,8 @@ var _exportNames = {
11
11
  findAllByTestSubject: true,
12
12
  findByTestSubject: true,
13
13
  render: true,
14
- screen: true
14
+ screen: true,
15
+ within: true
15
16
  };
16
17
  Object.defineProperty(exports, "findAllByTestSubject", {
17
18
  enumerable: true,
@@ -61,6 +62,12 @@ Object.defineProperty(exports, "screen", {
61
62
  return _custom_render.screen;
62
63
  }
63
64
  });
65
+ Object.defineProperty(exports, "within", {
66
+ enumerable: true,
67
+ get: function get() {
68
+ return _custom_render.within;
69
+ }
70
+ });
64
71
  var _component_helpers = require("./component_helpers");
65
72
  Object.keys(_component_helpers).forEach(function (key) {
66
73
  if (key === "default" || key === "__esModule") return;
@@ -1,50 +0,0 @@
1
- /*
2
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
- * or more contributor license agreements. Licensed under the Elastic License
4
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
- * in compliance with, at your election, the Elastic License 2.0 or the Server
6
- * Side Public License, v 1.
7
- */
8
-
9
- import React from 'react';
10
- import PropTypes from "prop-types";
11
- import { EuiSkeletonText } from '../skeleton';
12
-
13
- /**
14
- * @deprecated Use `EuiSkeletonTextProps` instead
15
- */
16
- import { jsx as ___EmotionJSX } from "@emotion/react";
17
- /**
18
- * @deprecated Use `EuiSkeletonText` instead
19
- */
20
- export var EuiLoadingContent = function EuiLoadingContent(props) {
21
- return ___EmotionJSX(EuiSkeletonText, props);
22
- };
23
- EuiLoadingContent.propTypes = {
24
- className: PropTypes.string,
25
- "aria-label": PropTypes.string,
26
- "data-test-subj": PropTypes.string,
27
- css: PropTypes.any,
28
- /**
29
- * When true, shows the loading skeleton component.
30
- * When false, shows any `children` and announces to screen readers that your content has loaded.
31
- */
32
- isLoading: PropTypes.bool,
33
- /**
34
- * Label your loading sections to provide more helpful context to screen readers.
35
- * For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".
36
- */
37
- contentAriaLabel: PropTypes.string,
38
- /**
39
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
40
- */
41
- ariaWrapperProps: PropTypes.any,
42
- /**
43
- * Number of lines to display (between 1 to 10)
44
- */
45
- lines: PropTypes.any,
46
- /**
47
- * EuiText size to render
48
- */
49
- size: PropTypes.any
50
- };
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EuiLoadingContent = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _skeleton = require("../skeleton");
10
- var _react2 = require("@emotion/react");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- /*
13
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
- * or more contributor license agreements. Licensed under the Elastic License
15
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
- * in compliance with, at your election, the Elastic License 2.0 or the Server
17
- * Side Public License, v 1.
18
- */
19
-
20
- /**
21
- * @deprecated Use `EuiSkeletonText` instead
22
- */
23
- var EuiLoadingContent = function EuiLoadingContent(props) {
24
- return (0, _react2.jsx)(_skeleton.EuiSkeletonText, props);
25
- };
26
- exports.EuiLoadingContent = EuiLoadingContent;
27
- EuiLoadingContent.propTypes = {
28
- className: _propTypes.default.string,
29
- "aria-label": _propTypes.default.string,
30
- "data-test-subj": _propTypes.default.string,
31
- css: _propTypes.default.any,
32
- /**
33
- * When true, shows the loading skeleton component.
34
- * When false, shows any `children` and announces to screen readers that your content has loaded.
35
- */
36
- isLoading: _propTypes.default.bool,
37
- /**
38
- * Label your loading sections to provide more helpful context to screen readers.
39
- * For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".
40
- */
41
- contentAriaLabel: _propTypes.default.string,
42
- /**
43
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
44
- */
45
- ariaWrapperProps: _propTypes.default.any,
46
- /**
47
- * Number of lines to display (between 1 to 10)
48
- */
49
- lines: _propTypes.default.any,
50
- /**
51
- * EuiText size to render
52
- */
53
- size: _propTypes.default.any
54
- };
@@ -1,21 +0,0 @@
1
- /*
2
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
- * or more contributor license agreements. Licensed under the Elastic License
4
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
- * in compliance with, at your election, the Elastic License 2.0 or the Server
6
- * Side Public License, v 1.
7
- */
8
-
9
- import React from 'react';
10
- import { EuiSkeletonText } from '../skeleton';
11
-
12
- /**
13
- * @deprecated Use `EuiSkeletonTextProps` instead
14
- */
15
- import { jsx as ___EmotionJSX } from "@emotion/react";
16
- /**
17
- * @deprecated Use `EuiSkeletonText` instead
18
- */
19
- export var EuiLoadingContent = function EuiLoadingContent(props) {
20
- return ___EmotionJSX(EuiSkeletonText, props);
21
- };
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EuiLoadingContent = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _skeleton = require("../skeleton");
10
- var _react2 = require("@emotion/react");
11
- /*
12
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
- * or more contributor license agreements. Licensed under the Elastic License
14
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
15
- * in compliance with, at your election, the Elastic License 2.0 or the Server
16
- * Side Public License, v 1.
17
- */
18
-
19
- /**
20
- * @deprecated Use `EuiSkeletonText` instead
21
- */
22
- var EuiLoadingContent = function EuiLoadingContent(props) {
23
- return (0, _react2.jsx)(_skeleton.EuiSkeletonText, props);
24
- };
25
- exports.EuiLoadingContent = EuiLoadingContent;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EuiLoadingContent = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _skeleton = require("../skeleton");
11
- var _react2 = require("@emotion/react");
12
- /*
13
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
- * or more contributor license agreements. Licensed under the Elastic License
15
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
- * in compliance with, at your election, the Elastic License 2.0 or the Server
17
- * Side Public License, v 1.
18
- */
19
-
20
- /**
21
- * @deprecated Use `EuiSkeletonText` instead
22
- */
23
- var EuiLoadingContent = function EuiLoadingContent(props) {
24
- return (0, _react2.jsx)(_skeleton.EuiSkeletonText, props);
25
- };
26
- exports.EuiLoadingContent = EuiLoadingContent;
27
- EuiLoadingContent.propTypes = {
28
- className: _propTypes.default.string,
29
- "aria-label": _propTypes.default.string,
30
- "data-test-subj": _propTypes.default.string,
31
- css: _propTypes.default.any,
32
- /**
33
- * When true, shows the loading skeleton component.
34
- * When false, shows any `children` and announces to screen readers that your content has loaded.
35
- */
36
- isLoading: _propTypes.default.bool,
37
- /**
38
- * Label your loading sections to provide more helpful context to screen readers.
39
- * For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".
40
- */
41
- contentAriaLabel: _propTypes.default.string,
42
- /**
43
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
44
- */
45
- ariaWrapperProps: _propTypes.default.any,
46
- /**
47
- * Number of lines to display (between 1 to 10)
48
- */
49
- lines: _propTypes.default.any,
50
- /**
51
- * EuiText size to render
52
- */
53
- size: _propTypes.default.any
54
- };