@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
package/i18ntokens.json CHANGED
@@ -6300,37 +6300,37 @@
6300
6300
  "filepath": "src/components/selectable/selectable.tsx"
6301
6301
  },
6302
6302
  {
6303
- "token": "euiSkeletonLoading.loadingAriaText",
6304
- "defString": "Loading {contentAriaLabel}",
6303
+ "token": "euiSkeletonLoading.loadedAriaText",
6304
+ "defString": "Loaded {contentAriaLabel}",
6305
6305
  "highlighting": "string",
6306
6306
  "loc": {
6307
6307
  "start": {
6308
- "line": 52,
6309
- "column": 27,
6310
- "index": 1743
6308
+ "line": 73,
6309
+ "column": 25,
6310
+ "index": 2343
6311
6311
  },
6312
6312
  "end": {
6313
- "line": 56,
6313
+ "line": 77,
6314
6314
  "column": 3,
6315
- "index": 1859
6315
+ "index": 2457
6316
6316
  }
6317
6317
  },
6318
6318
  "filepath": "src/components/skeleton/skeleton_loading.tsx"
6319
6319
  },
6320
6320
  {
6321
- "token": "euiSkeletonLoading.loadedAriaText",
6322
- "defString": "Loaded {contentAriaLabel}",
6321
+ "token": "euiSkeletonLoading.loadingAriaText",
6322
+ "defString": "Loading {contentAriaLabel}",
6323
6323
  "highlighting": "string",
6324
6324
  "loc": {
6325
6325
  "start": {
6326
- "line": 57,
6327
- "column": 25,
6328
- "index": 1886
6326
+ "line": 79,
6327
+ "column": 27,
6328
+ "index": 2487
6329
6329
  },
6330
6330
  "end": {
6331
- "line": 61,
6331
+ "line": 83,
6332
6332
  "column": 3,
6333
- "index": 2000
6333
+ "index": 2603
6334
6334
  }
6335
6335
  },
6336
6336
  "filepath": "src/components/skeleton/skeleton_loading.tsx"
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
7
+ exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = exports.CASING = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -13,7 +13,8 @@ var _services = require("../../services");
13
13
  var _icon = require("../icon");
14
14
  var _avatar = require("./avatar.styles");
15
15
  var _react2 = require("@emotion/react");
16
- var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
16
+ var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"],
17
+ _excluded2 = ["casing"];
17
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
19
  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); }
19
20
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -33,6 +34,8 @@ var SIZES = ['s', 'm', 'l', 'xl'];
33
34
  exports.SIZES = SIZES;
34
35
  var TYPES = ['space', 'user'];
35
36
  exports.TYPES = TYPES;
37
+ var CASING = ['capitalize', 'uppercase', 'lowercase', 'none'];
38
+ exports.CASING = CASING;
36
39
  var EuiAvatar = function EuiAvatar(_ref) {
37
40
  var _classNames;
38
41
  var className = _ref.className,
@@ -51,14 +54,17 @@ var EuiAvatar = function EuiAvatar(_ref) {
51
54
  _ref$isDisabled = _ref.isDisabled,
52
55
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
53
56
  style = _ref.style,
54
- rest = _objectWithoutProperties(_ref, _excluded);
57
+ props = _objectWithoutProperties(_ref, _excluded);
58
+ var _props$casing = props.casing,
59
+ casing = _props$casing === void 0 ? type === 'space' ? 'none' : 'uppercase' : _props$casing,
60
+ rest = _objectWithoutProperties(props, _excluded2);
55
61
  var euiTheme = (0, _services.useEuiTheme)();
56
62
  var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
57
63
  var visColors = (0, _services.euiPaletteColorBlindBehindText)();
58
64
  var isPlain = color === 'plain';
59
65
  var isSubdued = color === 'subdued';
60
66
  var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
61
- var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
67
+ var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
62
68
  checkValidInitials(initials);
63
69
  var avatarStyle = _objectSpread({}, style);
64
70
  var iconCustomColor = iconColor;
@@ -151,6 +157,13 @@ EuiAvatar.propTypes = {
151
157
  */
152
158
  type: _propTypes.default.any,
153
159
  size: _propTypes.default.any,
160
+ /**
161
+ * Sets the letter casing of the displayed initials.
162
+ * Defaults to `uppercase` for `type="user"` avatars.
163
+ * Defaults to `none` (uses the existing casing of the passed `name` or `initials`) for `type="space"` avatars.
164
+ * @default uppercase
165
+ */
166
+ casing: _propTypes.default.any,
154
167
  /**
155
168
  * Grays out the avatar to simulate being disabled
156
169
  */
@@ -7,12 +7,44 @@ exports.euiAvatarStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10
- var _avatarSize = function _avatarSize(_ref3) {
11
- var size = _ref3.size,
12
- fontSize = _ref3.fontSize;
10
+ var _avatarSize = function _avatarSize(_ref7) {
11
+ var size = _ref7.size,
12
+ fontSize = _ref7.fontSize;
13
13
  return "\n ".concat((0, _global_styling.logicalCSS)('width', size), ";\n ").concat((0, _global_styling.logicalCSS)('height', size), ";\n line-height: ").concat(size, ";\n font-size: ").concat(fontSize, ";\n ");
14
14
  };
15
15
  var _ref = process.env.NODE_ENV === "production" ? {
16
+ name: "4wfy2n-none",
17
+ styles: "text-transform:none;label:none;"
18
+ } : {
19
+ name: "4wfy2n-none",
20
+ styles: "text-transform:none;label:none;",
21
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
+ };
23
+ var _ref2 = process.env.NODE_ENV === "production" ? {
24
+ name: "5xhpzh-lowercase",
25
+ styles: "text-transform:lowercase;label:lowercase;"
26
+ } : {
27
+ name: "5xhpzh-lowercase",
28
+ styles: "text-transform:lowercase;label:lowercase;",
29
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
+ };
31
+ var _ref3 = process.env.NODE_ENV === "production" ? {
32
+ name: "1x2qsb1-uppercase",
33
+ styles: "text-transform:uppercase;label:uppercase;"
34
+ } : {
35
+ name: "1x2qsb1-uppercase",
36
+ styles: "text-transform:uppercase;label:uppercase;",
37
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
+ };
39
+ var _ref4 = process.env.NODE_ENV === "production" ? {
40
+ name: "mxeh3g-capitalize",
41
+ styles: "text-transform:capitalize;label:capitalize;"
42
+ } : {
43
+ name: "mxeh3g-capitalize",
44
+ styles: "text-transform:capitalize;label:capitalize;",
45
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
46
+ };
47
+ var _ref5 = process.env.NODE_ENV === "production" ? {
16
48
  name: "14sj6wh-isDisabled",
17
49
  styles: "cursor:not-allowed;filter:grayscale(100%);label:isDisabled;"
18
50
  } : {
@@ -20,7 +52,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
20
52
  styles: "cursor:not-allowed;filter:grayscale(100%);label:isDisabled;",
21
53
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
54
  };
23
- var _ref2 = process.env.NODE_ENV === "production" ? {
55
+ var _ref6 = process.env.NODE_ENV === "production" ? {
24
56
  name: "ont6vs-user",
25
57
  styles: "border-radius:50%;label:user;"
26
58
  } : {
@@ -28,18 +60,18 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
28
60
  styles: "border-radius:50%;label:user;",
29
61
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
62
  };
31
- var euiAvatarStyles = function euiAvatarStyles(_ref4) {
32
- var euiTheme = _ref4.euiTheme;
63
+ var euiAvatarStyles = function euiAvatarStyles(_ref8) {
64
+ var euiTheme = _ref8.euiTheme;
33
65
  return {
34
66
  // Base
35
67
  euiAvatar: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;", (0, _global_styling.logicalTextAlignCSS)('center'), ";", (0, _global_styling.logicalCSS)('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
36
68
  // Variants
37
69
  plain: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";;label:plain;"),
38
70
  subdued: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";;label:subdued;"),
39
- user: _ref2,
71
+ user: _ref6,
40
72
  space: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:space;"),
41
73
  // States
42
- isDisabled: _ref,
74
+ isDisabled: _ref5,
43
75
  // Sizes
44
76
  s: /*#__PURE__*/(0, _react.css)(_avatarSize({
45
77
  size: euiTheme.size.l,
@@ -56,7 +88,12 @@ var euiAvatarStyles = function euiAvatarStyles(_ref4) {
56
88
  xl: /*#__PURE__*/(0, _react.css)(_avatarSize({
57
89
  size: "calc(".concat(euiTheme.size.base, " * 4)"),
58
90
  fontSize: "calc(".concat(euiTheme.size.xl, " * 0.8)")
59
- }), ";label:xl;")
91
+ }), ";label:xl;"),
92
+ // Casing
93
+ capitalize: _ref4,
94
+ uppercase: _ref3,
95
+ lowercase: _ref2,
96
+ none: _ref
60
97
  };
61
98
  };
62
99
  exports.euiAvatarStyles = euiAvatarStyles;
@@ -43,10 +43,10 @@ var euiFormVariables = function euiFormVariables(euiThemeContext) {
43
43
  inputGroupBorder: 'none'
44
44
  };
45
45
 
46
- // Colors - specific for checkboxes and radios
46
+ // Colors - specific to checkboxes, radios, switches, and range thumbs
47
47
  var customControlColors = {
48
48
  customControlDisabledIconColor: isColorDark ? (0, _services.shade)(euiTheme.colors.mediumShade, 0.38) : (0, _services.tint)(euiTheme.colors.mediumShade, 0.485),
49
- customControlBorderColor: isColorDark ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.18) : (0, _services.tint)(euiTheme.colors.lightestShade, 0.3)
49
+ customControlBorderColor: isColorDark ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.4) : (0, _services.tint)(euiTheme.colors.lightestShade, 0.31)
50
50
  };
51
51
  var controlLayout = {
52
52
  controlLayoutGroupInputHeight: (0, _global_styling.mathWithUnits)(controlHeight, function (x) {
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "EuiLoadingChart", {
9
9
  return _loading_chart.EuiLoadingChart;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "EuiLoadingContent", {
13
- enumerable: true,
14
- get: function get() {
15
- return _loading_content.EuiLoadingContent;
16
- }
17
- });
18
12
  Object.defineProperty(exports, "EuiLoadingElastic", {
19
13
  enumerable: true,
20
14
  get: function get() {
@@ -35,6 +29,5 @@ Object.defineProperty(exports, "EuiLoadingSpinner", {
35
29
  });
36
30
  var _loading_elastic = require("./loading_elastic");
37
31
  var _loading_chart = require("./loading_chart");
38
- var _loading_content = require("./loading_content");
39
32
  var _loading_spinner = require("./loading_spinner");
40
33
  var _loading_logo = require("./loading_logo");
@@ -24,6 +24,12 @@ var _react2 = require("@emotion/react");
24
24
  var _excluded = ["className", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "description", "breadcrumbs", "breadcrumbProps", "alignItems", "responsive", "rightSideItems", "rightSideGroupProps", "children", "restrictWidth", "paddingSize", "bottomBorder", "style"],
25
25
  _excluded2 = ["label"];
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
28
+ 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."); }
29
+ 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); }
30
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
31
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
32
+ 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; }
27
33
  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); }
28
34
  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; }
29
35
  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; }
@@ -157,21 +163,19 @@ var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
157
163
  }
158
164
  var rightSideFlexItem;
159
165
  if (rightSideItems && rightSideItems.length) {
160
- var wrapWithFlex = function wrapWithFlex() {
161
- return rightSideItems.map(function (item, index) {
162
- return (0, _react2.jsx)(_flex.EuiFlexItem, {
163
- grow: false,
164
- key: index
165
- }, item);
166
- });
167
- };
166
+ var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
167
+ var rightSideFlexItems = itemsToRender.map(function (item, index) {
168
+ return (0, _react2.jsx)(_flex.EuiFlexItem, {
169
+ grow: false,
170
+ key: index
171
+ }, item);
172
+ });
168
173
  rightSideFlexItem = (0, _react2.jsx)(_flex.EuiFlexItem, {
169
174
  grow: false
170
175
  }, (0, _react2.jsx)(_flex.EuiFlexGroup, _extends({
171
176
  wrap: true,
172
- responsive: false,
173
- direction: isResponsiveBreakpoint ? undefined : 'rowReverse'
174
- }, rightSideGroupProps), wrapWithFlex()));
177
+ responsive: false
178
+ }, rightSideGroupProps), rightSideFlexItems));
175
179
  }
176
180
  return alignItems === 'top' || isResponsiveBreakpoint ? (0, _react2.jsx)("div", _extends({
177
181
  className: classes,
@@ -66,9 +66,9 @@ var _termValuesToQuery = function _termValuesToQuery(values, options) {
66
66
  var body = {
67
67
  query: values.map(function (value) {
68
68
  if ((0, _predicate.isString)(value) && value.match(/\s/)) {
69
- return "\"".concat(value, "\"");
69
+ return "+\"".concat(value, "\"");
70
70
  }
71
- return value;
71
+ return "+".concat(value);
72
72
  }).join(' ')
73
73
  };
74
74
  if (body.query === '') {
@@ -310,6 +310,13 @@ EuiSelectableTemplateSitewide.propTypes = {
310
310
  */
311
311
  type: _propTypes.default.any,
312
312
  size: _propTypes.default.any,
313
+ /**
314
+ * Sets the letter casing of the displayed initials.
315
+ * Defaults to `uppercase` for `type="user"` avatars.
316
+ * Defaults to `none` (uses the existing casing of the passed `name` or `initials`) for `type="space"` avatars.
317
+ * @default uppercase
318
+ */
319
+ casing: _propTypes.default.any,
313
320
  /**
314
321
  * Grays out the avatar to simulate being disabled
315
322
  */
@@ -11,7 +11,7 @@ var _services = require("../../services");
11
11
  var _skeleton_loading = require("./skeleton_loading");
12
12
  var _skeleton_circle = require("./skeleton_circle.styles");
13
13
  var _react2 = require("@emotion/react");
14
- var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
14
+ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
@@ -25,6 +25,9 @@ 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 @@ 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
  exports.EuiSkeletonCircle = EuiSkeletonCircle;
@@ -58,7 +64,22 @@ EuiSkeletonCircle.propTypes = {
58
64
  */
59
65
  contentAriaLabel: _propTypes.default.string,
60
66
  /**
61
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
67
+ * Makes a live screen reader announcement when `isLoading` is true
68
+ * @default false
69
+ */
70
+ announceLoadingStatus: _propTypes.default.bool,
71
+ /**
72
+ * Makes a live screen reader announcement when `isLoading` is false
73
+ * @default true
74
+ */
75
+ announceLoadedStatus: _propTypes.default.bool,
76
+ /**
77
+ * Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
78
+ * Accepts any `EuiScreenReaderLive` props.
79
+ */
80
+ ariaLiveProps: _propTypes.default.any,
81
+ /**
82
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
62
83
  */
63
84
  ariaWrapperProps: _propTypes.default.any,
64
85
  size: _propTypes.default.any
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _screen_reader_live = require("../accessibility/screen_reader_live");
10
10
  var _i18n = require("../i18n");
11
11
  var _react2 = require("@emotion/react");
12
- var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent"];
12
+ var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps"];
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  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); }
15
15
  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; }
@@ -18,23 +18,29 @@ var EuiSkeletonLoading = function EuiSkeletonLoading(_ref) {
18
18
  var _ref$isLoading = _ref.isLoading,
19
19
  isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
20
20
  contentAriaLabel = _ref.contentAriaLabel,
21
- loadingContent = _ref.loadingContent,
21
+ _loadingContent = _ref.loadingContent,
22
22
  loadedContent = _ref.loadedContent,
23
+ _ref$announceLoadingS = _ref.announceLoadingStatus,
24
+ announceLoadingStatus = _ref$announceLoadingS === void 0 ? false : _ref$announceLoadingS,
25
+ _ref$announceLoadedSt = _ref.announceLoadedStatus,
26
+ announceLoadedStatus = _ref$announceLoadedSt === void 0 ? true : _ref$announceLoadedSt,
27
+ ariaLiveProps = _ref.ariaLiveProps,
23
28
  rest = _objectWithoutProperties(_ref, _excluded);
24
- var loadingAriaLabel = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
29
+ var loadedAriaLive = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
25
30
  contentAriaLabel: contentAriaLabel
26
31
  });
27
- var loadedAriaLive = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
32
+ var loadingAriaLabel = (0, _i18n.useEuiI18n)('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
28
33
  contentAriaLabel: contentAriaLabel
29
34
  });
30
35
  var loadingProps = {
31
36
  'aria-label': loadingAriaLabel,
32
37
  role: 'progressbar'
33
38
  };
39
+ var loadingContent = /*#__PURE__*/_react.default.cloneElement(_loadingContent, loadingProps);
34
40
  return (0, _react2.jsx)("div", _extends({
35
41
  "aria-busy": isLoading,
36
42
  "data-test-subj": "euiSkeletonLoadingAriaWrapper"
37
- }, 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));
43
+ }, 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));
38
44
  };
39
45
  exports.EuiSkeletonLoading = EuiSkeletonLoading;
40
46
  EuiSkeletonLoading.propTypes = {
@@ -13,7 +13,7 @@ var _global_styling = require("../../global_styling");
13
13
  var _skeleton_loading = require("./skeleton_loading");
14
14
  var _skeleton_rectangle = require("./skeleton_rectangle.styles");
15
15
  var _react2 = require("@emotion/react");
16
- var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
16
+ var _excluded = ["isLoading", "borderRadius", "width", "height", "style", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  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); }
19
19
  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; }
@@ -37,6 +37,9 @@ 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 @@ 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
  exports.EuiSkeletonRectangle = EuiSkeletonRectangle;
@@ -74,7 +80,22 @@ EuiSkeletonRectangle.propTypes = {
74
80
  */
75
81
  contentAriaLabel: _propTypes.default.string,
76
82
  /**
77
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
83
+ * Makes a live screen reader announcement when `isLoading` is true
84
+ * @default false
85
+ */
86
+ announceLoadingStatus: _propTypes.default.bool,
87
+ /**
88
+ * Makes a live screen reader announcement when `isLoading` is false
89
+ * @default true
90
+ */
91
+ announceLoadedStatus: _propTypes.default.bool,
92
+ /**
93
+ * Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
94
+ * Accepts any `EuiScreenReaderLive` props.
95
+ */
96
+ ariaLiveProps: _propTypes.default.any,
97
+ /**
98
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
78
99
  */
79
100
  ariaWrapperProps: _propTypes.default.any,
80
101
  width: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired]),
@@ -11,7 +11,7 @@ var _services = require("../../services");
11
11
  var _skeleton_loading = require("./skeleton_loading");
12
12
  var _skeleton_text = require("./skeleton_text.styles");
13
13
  var _react2 = require("@emotion/react");
14
- var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
14
+ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
@@ -27,6 +27,9 @@ 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 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
46
49
  className: (0, _classnames.default)('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
  exports.EuiSkeletonText = EuiSkeletonText;
@@ -66,7 +72,22 @@ EuiSkeletonText.propTypes = {
66
72
  */
67
73
  contentAriaLabel: _propTypes.default.string,
68
74
  /**
69
- * Any optional props to pass to the `aria-busy` wrapper around the skeleton content
75
+ * Makes a live screen reader announcement when `isLoading` is true
76
+ * @default false
77
+ */
78
+ announceLoadingStatus: _propTypes.default.bool,
79
+ /**
80
+ * Makes a live screen reader announcement when `isLoading` is false
81
+ * @default true
82
+ */
83
+ announceLoadedStatus: _propTypes.default.bool,
84
+ /**
85
+ * Optional props to pass to the `aria-live` region that announces the loading status to screen readers.
86
+ * Accepts any `EuiScreenReaderLive` props.
87
+ */
88
+ ariaLiveProps: _propTypes.default.any,
89
+ /**
90
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
70
91
  */
71
92
  ariaWrapperProps: _propTypes.default.any,
72
93
  /**
@@ -11,7 +11,7 @@ var _services = require("../../services");
11
11
  var _skeleton_loading = require("./skeleton_loading");
12
12
  var _skeleton_title = require("./skeleton_title.styles");
13
13
  var _react2 = require("@emotion/react");
14
- var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
14
+ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announceLoadingStatus", "announceLoadedStatus", "ariaLiveProps", "ariaWrapperProps", "children"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
@@ -23,6 +23,9 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
23
23
  size = _ref$size === void 0 ? 'm' : _ref$size,
24
24
  className = _ref.className,
25
25
  contentAriaLabel = _ref.contentAriaLabel,
26
+ announceLoadingStatus = _ref.announceLoadingStatus,
27
+ announceLoadedStatus = _ref.announceLoadedStatus,
28
+ ariaLiveProps = _ref.ariaLiveProps,
26
29
  ariaWrapperProps = _ref.ariaWrapperProps,
27
30
  children = _ref.children,
28
31
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -36,7 +39,10 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
36
39
  css: cssStyles
37
40
  }, rest)),
38
41
  loadedContent: children || '',
39
- contentAriaLabel: contentAriaLabel
42
+ contentAriaLabel: contentAriaLabel,
43
+ announceLoadingStatus: announceLoadingStatus,
44
+ announceLoadedStatus: announceLoadedStatus,
45
+ ariaLiveProps: ariaLiveProps
40
46
  }, ariaWrapperProps));
41
47
  };
42
48
  exports.EuiSkeletonTitle = EuiSkeletonTitle;
@@ -56,7 +62,22 @@ EuiSkeletonTitle.propTypes = {
56
62
  */
57
63
  contentAriaLabel: _propTypes.default.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.default.bool,
69
+ /**
70
+ * Makes a live screen reader announcement when `isLoading` is false
71
+ * @default true
72
+ */
73
+ announceLoadedStatus: _propTypes.default.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.default.any,
79
+ /**
80
+ * Optional props to pass to the `aria-busy` wrapper around the skeleton content
60
81
  */
61
82
  ariaWrapperProps: _propTypes.default.any,
62
83
  /**
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.screen = exports.render = void 0;
7
+ exports.within = exports.screen = exports.render = void 0;
8
8
  var _react = require("@testing-library/react");
9
9
  var _components = require("../../components");
10
10
  var dataTestSubjQueries = _interopRequireWildcard(require("./data_test_subj_queries"));
@@ -42,4 +42,13 @@ exports.render = customRender;
42
42
  * @see https://github.com/testing-library/dom-testing-library/issues/516
43
43
  */
44
44
  var customScreen = _objectSpread(_objectSpread({}, _react.screen), (0, _react.within)(document.body, dataTestSubjQueries));
45
- exports.screen = customScreen;
45
+ exports.screen = customScreen;
46
+ /**
47
+ * Custom within util with EUI query helpers
48
+ *
49
+ * @see https://testing-library.com/docs/dom-testing-library/api-within/
50
+ */
51
+ var customWithin = function customWithin(element) {
52
+ return (0, _react.within)(element, _objectSpread(_objectSpread({}, _react.queries), dataTestSubjQueries));
53
+ };
54
+ exports.within = customWithin;
@@ -1,3 +1,3 @@
1
1
  export * from './component_helpers';
2
2
  export { queryByTestSubject, queryAllByTestSubject, getByTestSubject, getAllByTestSubject, findAllByTestSubject, findByTestSubject, } from './data_test_subj_queries';
3
- export { render, screen } from './custom_render';
3
+ export { render, screen, within } from './custom_render';
@@ -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;