@elastic/eui 109.2.0 → 110.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 (97) hide show
  1. package/es/components/basic_table/in_memory_table.js +87 -61
  2. package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
  3. package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
  4. package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
  5. package/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
  6. package/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
  7. package/es/components/filter_group/filter_group.a11y.js +1 -1
  8. package/es/components/header/header_logo/header_logo.js +6 -1
  9. package/es/components/header/header_logo/header_logo.styles.js +1 -1
  10. package/es/components/icon/icon.styles.js +4 -4
  11. package/es/components/page/page.js +11 -3
  12. package/es/components/page/page.styles.js +1 -2
  13. package/es/components/page/page_header/page_header.js +11 -3
  14. package/es/components/page_template/outer/page_outer.js +2 -3
  15. package/es/components/page_template/outer/page_outer.styles.js +29 -35
  16. package/es/components/page_template/page_template.js +8 -2
  17. package/es/components/search_bar/search_bar.js +10 -4
  18. package/es/components/selectable/selectable.js +7 -2
  19. package/es/services/string/to_initials.js +26 -4
  20. package/eui.d.ts +41 -18
  21. package/lib/components/basic_table/in_memory_table.js +87 -61
  22. package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
  23. package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
  24. package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
  25. package/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
  26. package/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
  27. package/lib/components/filter_group/filter_group.a11y.js +1 -1
  28. package/lib/components/header/header_logo/header_logo.js +6 -1
  29. package/lib/components/header/header_logo/header_logo.styles.js +1 -1
  30. package/lib/components/icon/icon.styles.js +4 -4
  31. package/lib/components/page/page.js +10 -2
  32. package/lib/components/page/page.styles.js +1 -2
  33. package/lib/components/page/page_header/page_header.js +10 -2
  34. package/lib/components/page_template/outer/page_outer.js +1 -2
  35. package/lib/components/page_template/outer/page_outer.styles.js +29 -35
  36. package/lib/components/page_template/page_template.js +8 -2
  37. package/lib/components/search_bar/search_bar.js +9 -4
  38. package/lib/components/selectable/selectable.js +7 -2
  39. package/lib/services/string/to_initials.js +26 -4
  40. package/optimize/es/components/basic_table/in_memory_table.js +71 -46
  41. package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
  42. package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
  43. package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
  44. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
  45. package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
  46. package/optimize/es/components/filter_group/filter_group.a11y.js +1 -1
  47. package/optimize/es/components/header/header_logo/header_logo.js +6 -1
  48. package/optimize/es/components/header/header_logo/header_logo.styles.js +1 -1
  49. package/optimize/es/components/icon/icon.styles.js +4 -4
  50. package/optimize/es/components/page/page.js +6 -3
  51. package/optimize/es/components/page/page.styles.js +1 -2
  52. package/optimize/es/components/page/page_header/page_header.js +6 -3
  53. package/optimize/es/components/page_template/outer/page_outer.js +2 -3
  54. package/optimize/es/components/page_template/outer/page_outer.styles.js +29 -35
  55. package/optimize/es/components/page_template/page_template.js +2 -1
  56. package/optimize/es/components/search_bar/search_bar.js +6 -0
  57. package/optimize/es/components/selectable/selectable.js +7 -2
  58. package/optimize/es/services/string/to_initials.js +26 -4
  59. package/optimize/lib/components/basic_table/in_memory_table.js +71 -46
  60. package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
  61. package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
  62. package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
  63. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
  64. package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
  65. package/optimize/lib/components/filter_group/filter_group.a11y.js +1 -1
  66. package/optimize/lib/components/header/header_logo/header_logo.js +6 -1
  67. package/optimize/lib/components/header/header_logo/header_logo.styles.js +1 -1
  68. package/optimize/lib/components/icon/icon.styles.js +4 -4
  69. package/optimize/lib/components/page/page.js +5 -2
  70. package/optimize/lib/components/page/page.styles.js +1 -2
  71. package/optimize/lib/components/page/page_header/page_header.js +5 -2
  72. package/optimize/lib/components/page_template/outer/page_outer.js +1 -2
  73. package/optimize/lib/components/page_template/outer/page_outer.styles.js +29 -35
  74. package/optimize/lib/components/page_template/page_template.js +2 -1
  75. package/optimize/lib/components/search_bar/search_bar.js +5 -0
  76. package/optimize/lib/components/selectable/selectable.js +7 -2
  77. package/optimize/lib/services/string/to_initials.js +26 -4
  78. package/package.json +1 -1
  79. package/test-env/components/basic_table/in_memory_table.js +87 -61
  80. package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
  81. package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
  82. package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
  83. package/test-env/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
  84. package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
  85. package/test-env/components/filter_group/filter_group.a11y.js +1 -1
  86. package/test-env/components/header/header_logo/header_logo.js +6 -1
  87. package/test-env/components/header/header_logo/header_logo.styles.js +1 -1
  88. package/test-env/components/icon/icon.styles.js +4 -4
  89. package/test-env/components/page/page.js +10 -2
  90. package/test-env/components/page/page.styles.js +1 -2
  91. package/test-env/components/page/page_header/page_header.js +10 -2
  92. package/test-env/components/page_template/outer/page_outer.js +1 -2
  93. package/test-env/components/page_template/outer/page_outer.styles.js +29 -35
  94. package/test-env/components/page_template/page_template.js +8 -2
  95. package/test-env/components/search_bar/search_bar.js +9 -4
  96. package/test-env/components/selectable/selectable.js +7 -2
  97. package/test-env/services/string/to_initials.js +26 -4
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["schema"],
2
2
  _excluded2 = ["onChange"],
3
- _excluded3 = ["columns", "loading", "message", "noItemsMessage", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
3
+ _excluded3 = ["columns", "loading", "noItemsMessage", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
4
4
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5
5
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
6
6
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -42,17 +42,27 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
42
42
  function isEuiSearchBarProps(x) {
43
43
  return typeof x !== 'boolean';
44
44
  }
45
- var getQueryFromSearch = function getQueryFromSearch(search, defaultQuery) {
46
- var query;
45
+ /**
46
+ * Extracts and formats a query from search props based on the search format
47
+ * @param search - The search configuration
48
+ * @param defaultQuery - Whether to use the defaultQuery property as fallback
49
+ * @param searchFormat - The search format: 'eql' for parsed queries, 'text' for plain text
50
+ * @returns Formatted query string or Query object
51
+ */
52
+ var getQueryFromSearch = function getQueryFromSearch(search, defaultQuery, searchFormat) {
53
+ var _ref, _searchProps$defaultQ, _searchProps$query;
47
54
  if (!search) {
48
- query = '';
49
- } else {
50
- query = (defaultQuery ? search.defaultQuery || search.query || '' : search.query) || '';
55
+ return searchFormat === 'text' ? '""' : '';
56
+ }
57
+ var searchProps = search;
58
+ var queryString = defaultQuery ? (_ref = (_searchProps$defaultQ = searchProps.defaultQuery) !== null && _searchProps$defaultQ !== void 0 ? _searchProps$defaultQ : searchProps.query) !== null && _ref !== void 0 ? _ref : '' : (_searchProps$query = searchProps.query) !== null && _searchProps$query !== void 0 ? _searchProps$query : '';
59
+ if (searchFormat === 'text') {
60
+ return "\"".concat(queryString, "\"");
51
61
  }
52
- return isString(query) ? EuiSearchBar.Query.parse(query) : query;
62
+ return isString(queryString) ? EuiSearchBar.Query.parse(queryString) : queryString;
53
63
  };
54
64
  var getInitialPagination = function getInitialPagination(pagination, consumerDefaults) {
55
- var _ref2, _pagination$pageIndex, _ref3, _pagination$pageSize;
65
+ var _ref3, _pagination$pageIndex, _ref4, _pagination$pageSize;
56
66
  if (!pagination) {
57
67
  return {
58
68
  pageIndex: undefined,
@@ -60,14 +70,14 @@ var getInitialPagination = function getInitialPagination(pagination, consumerDef
60
70
  };
61
71
  }
62
72
  var defaults = _objectSpread(_objectSpread({}, euiTablePaginationDefaults), consumerDefaults);
63
- var _ref = pagination,
64
- _ref$pageSizeOptions = _ref.pageSizeOptions,
65
- pageSizeOptions = _ref$pageSizeOptions === void 0 ? defaults.itemsPerPageOptions : _ref$pageSizeOptions,
66
- _ref$showPerPageOptio = _ref.showPerPageOptions,
67
- showPerPageOptions = _ref$showPerPageOptio === void 0 ? defaults.showPerPageOptions : _ref$showPerPageOptio;
73
+ var _ref2 = pagination,
74
+ _ref2$pageSizeOptions = _ref2.pageSizeOptions,
75
+ pageSizeOptions = _ref2$pageSizeOptions === void 0 ? defaults.itemsPerPageOptions : _ref2$pageSizeOptions,
76
+ _ref2$showPerPageOpti = _ref2.showPerPageOptions,
77
+ showPerPageOptions = _ref2$showPerPageOpti === void 0 ? defaults.showPerPageOptions : _ref2$showPerPageOpti;
68
78
  var defaultPageSize = pageSizeOptions !== null && pageSizeOptions !== void 0 && pageSizeOptions.includes(defaults.itemsPerPage) ? defaults.itemsPerPage : pageSizeOptions[0];
69
- var initialPageIndex = pagination === true ? 0 : (_ref2 = (_pagination$pageIndex = pagination.pageIndex) !== null && _pagination$pageIndex !== void 0 ? _pagination$pageIndex : pagination.initialPageIndex) !== null && _ref2 !== void 0 ? _ref2 : 0;
70
- var initialPageSize = pagination === true ? defaultPageSize : (_ref3 = (_pagination$pageSize = pagination.pageSize) !== null && _pagination$pageSize !== void 0 ? _pagination$pageSize : pagination.initialPageSize) !== null && _ref3 !== void 0 ? _ref3 : defaultPageSize;
79
+ var initialPageIndex = pagination === true ? 0 : (_ref3 = (_pagination$pageIndex = pagination.pageIndex) !== null && _pagination$pageIndex !== void 0 ? _pagination$pageIndex : pagination.initialPageIndex) !== null && _ref3 !== void 0 ? _ref3 : 0;
80
+ var initialPageSize = pagination === true ? defaultPageSize : (_ref4 = (_pagination$pageSize = pagination.pageSize) !== null && _pagination$pageSize !== void 0 ? _pagination$pageSize : pagination.initialPageSize) !== null && _ref4 !== void 0 ? _ref4 : defaultPageSize;
71
81
  if (showPerPageOptions && initialPageSize != null && !(pageSizeOptions !== null && pageSizeOptions !== void 0 && pageSizeOptions.includes(initialPageSize))) {
72
82
  throw new Error("EuiInMemoryTable received initialPageSize ".concat(initialPageSize, ", which wasn't provided within pageSizeOptions."));
73
83
  }
@@ -120,15 +130,16 @@ function getInitialSorting(columns, sorting) {
120
130
  }
121
131
  export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
122
132
  function EuiInMemoryTable(props, context) {
133
+ var _props$searchFormat;
123
134
  var _this;
124
135
  _classCallCheck(this, EuiInMemoryTable);
125
136
  _this = _callSuper(this, EuiInMemoryTable, [props]);
126
- _defineProperty(_this, "onTableChange", function (_ref4) {
127
- var page = _ref4.page,
128
- sort = _ref4.sort;
129
- var _ref5 = page || {},
130
- pageIndex = _ref5.index,
131
- pageSize = _ref5.size;
137
+ _defineProperty(_this, "onTableChange", function (_ref5) {
138
+ var page = _ref5.page,
139
+ sort = _ref5.sort;
140
+ var _ref6 = page || {},
141
+ pageIndex = _ref6.index,
142
+ pageSize = _ref6.size;
132
143
 
133
144
  // don't apply pagination changes that are otherwise controlled
134
145
  // `page` is left unchanged as it goes to the consumer's `onTableChange` callback, allowing the app to respond
@@ -137,9 +148,9 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
137
148
  if (pagination.pageSize != null) pageSize = pagination.pageSize;
138
149
  if (pagination.pageIndex != null) pageIndex = pagination.pageIndex;
139
150
  }
140
- var _ref6 = sort || {},
141
- sortName = _ref6.field,
142
- sortDirection = _ref6.direction;
151
+ var _ref7 = sort || {},
152
+ sortName = _ref7.field,
153
+ sortDirection = _ref7.direction;
143
154
 
144
155
  // To keep backwards compatibility reportedSortName needs to be tracked separately
145
156
  // from sortName; sortName gets stored internally while reportedSortName is sent to the callback
@@ -182,10 +193,10 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
182
193
  sortDirection: sortDirection
183
194
  });
184
195
  });
185
- _defineProperty(_this, "onQueryChange", function (_ref7) {
186
- var query = _ref7.query,
187
- queryText = _ref7.queryText,
188
- error = _ref7.error;
196
+ _defineProperty(_this, "onQueryChange", function (_ref8) {
197
+ var query = _ref8.query,
198
+ queryText = _ref8.queryText,
199
+ error = _ref8.error;
189
200
  var search = _this.props.search;
190
201
  if (isEuiSearchBarProps(search)) {
191
202
  if (search.onChange) {
@@ -219,12 +230,11 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
219
230
  // search bar to ignore EQL syntax and only use the searchbar for plain text
220
231
  _defineProperty(_this, "onPlainTextSearch", function (searchValue) {
221
232
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
222
- var finalQuery = "\"".concat(escapedQueryText, "\"");
223
233
  var search = _this.props.search;
224
234
  if (isEuiSearchBarProps(search)) {
225
235
  if (search.onChange) {
226
236
  var shouldQueryInMemory = search.onChange({
227
- query: EuiSearchBar.Query.parse(finalQuery),
237
+ query: null,
228
238
  queryText: escapedQueryText,
229
239
  error: null
230
240
  });
@@ -234,7 +244,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
234
244
  }
235
245
  }
236
246
  _this.setState({
237
- query: EuiSearchBar.Query.parse(finalQuery)
247
+ query: "\"".concat(escapedQueryText, "\"")
238
248
  });
239
249
  });
240
250
  var columns = props.columns,
@@ -258,7 +268,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
258
268
  search: _search
259
269
  },
260
270
  search: _search,
261
- query: getQueryFromSearch(_search, true),
271
+ query: getQueryFromSearch(_search, true, (_props$searchFormat = props.searchFormat) !== null && _props$searchFormat !== void 0 ? _props$searchFormat : 'eql'),
262
272
  pageIndex: _pageIndex || 0,
263
273
  pageSize: _pageSize,
264
274
  pageSizeOptions: pageSizeOptions,
@@ -279,13 +289,28 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
279
289
  if (!search) return;
280
290
  var searchBar;
281
291
  if (searchFormat === 'text') {
282
- var _searchBoxProps = (search === null || search === void 0 ? void 0 : search.box) || {}; // Work around | boolean type
283
- var schema = _searchBoxProps.schema,
284
- searchBoxProps = _objectWithoutProperties(_searchBoxProps, _excluded); // Destructure `schema` so it doesn't get rendered to DOM
292
+ var _ref9 = search,
293
+ _ref9$box = _ref9.box,
294
+ box = _ref9$box === void 0 ? {} : _ref9$box,
295
+ query = _ref9.query,
296
+ defaultQuery = _ref9.defaultQuery;
297
+ var schema = box.schema,
298
+ searchBoxProps = _objectWithoutProperties(box, _excluded);
285
299
 
286
- searchBar = ___EmotionJSX(EuiSearchBox, _extends({
287
- query: "" // Unused, passed to satisfy Typescript
288
- }, searchBoxProps, {
300
+ // in the unexpected case a Query object is passed with searchFormat=text
301
+ if (process.env.NODE_ENV === 'development') {
302
+ if (query != null && !isString(query)) {
303
+ console.warn('EuiInMemoryTable: `query` should be a string when using searchFormat="text". Query objects are only supported with searchFormat="eql".');
304
+ }
305
+ if (defaultQuery != null && !isString(defaultQuery)) {
306
+ console.warn('EuiInMemoryTable: `defaultQuery` should be a string when using searchFormat="text". Query objects are only supported with searchFormat="eql".');
307
+ }
308
+ }
309
+
310
+ // use only string values, ignore Query objects
311
+ var displayQuery = isString(query) ? query : isString(defaultQuery) ? defaultQuery : '';
312
+ searchBar = ___EmotionJSX(EuiSearchBox, _extends({}, searchBoxProps, {
313
+ query: displayQuery,
289
314
  onSearch: this.onPlainTextSearch
290
315
  }));
291
316
  } else {
@@ -313,9 +338,9 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
313
338
  value: function resolveSearchSchema() {
314
339
  var columns = this.props.columns;
315
340
  return columns.reduce(function (schema, column) {
316
- var _ref8 = column,
317
- field = _ref8.field,
318
- dataType = _ref8.dataType;
341
+ var _ref10 = column,
342
+ field = _ref10.field,
343
+ dataType = _ref10.dataType;
319
344
  if (field) {
320
345
  var type = dataType || 'string';
321
346
  schema.fields[field] = {
@@ -335,8 +360,8 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
335
360
  sortName = _this$state.sortName,
336
361
  sortDirection = _this$state.sortDirection;
337
362
  var columns = this.props.columns;
338
- var sortColumn = columns.find(function (_ref9) {
339
- var name = _ref9.name;
363
+ var sortColumn = columns.find(function (_ref11) {
364
+ var name = _ref11.name;
340
365
  return name === sortName;
341
366
  });
342
367
  if (sortColumn == null) {
@@ -386,7 +411,6 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
386
411
  var _this$props2 = this.props,
387
412
  columns = _this$props2.columns,
388
413
  loading = _this$props2.loading,
389
- message = _this$props2.message,
390
414
  noItemsMessage = _this$props2.noItemsMessage,
391
415
  error = _this$props2.error,
392
416
  selection = _this$props2.selection,
@@ -449,7 +473,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
449
473
  onChange: this.onTableChange,
450
474
  error: error,
451
475
  loading: loading,
452
- noItemsMessage: noItemsMessage || message,
476
+ noItemsMessage: noItemsMessage,
453
477
  tableLayout: tableLayout,
454
478
  compressed: compressed,
455
479
  itemIdToExpandedRowMap: itemIdToExpandedRowMap
@@ -507,11 +531,12 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
507
531
  var nextQuery = nextProps.search ? nextProps.search.query : '';
508
532
  var prevQuery = prevState.prevProps.search ? prevState.prevProps.search.query : '';
509
533
  if (nextQuery !== prevQuery) {
534
+ var _nextProps$searchForm;
510
535
  updatedPrevState = _objectSpread(_objectSpread({}, updatedPrevState), {}, {
511
536
  prevProps: _objectSpread(_objectSpread({}, updatedPrevState.prevProps), {}, {
512
537
  search: nextProps.search
513
538
  }),
514
- query: getQueryFromSearch(nextProps.search, false)
539
+ query: getQueryFromSearch(nextProps.search, false, (_nextProps$searchForm = nextProps.searchFormat) !== null && _nextProps$searchForm !== void 0 ? _nextProps$searchForm : 'eql')
515
540
  });
516
541
  }
517
542
  if (updatedPrevState !== prevState) {
@@ -990,15 +1015,6 @@ EuiInMemoryTable.propTypes = {
990
1015
  * Sets the table-layout CSS property. Note that auto tableLayout prevents truncateText from working properly.
991
1016
  */
992
1017
  tableLayout: PropTypes.oneOf(["fixed", "auto"]),
993
- /**
994
- * Message to display if table is empty
995
- * @deprecated Use `noItemsMessage` instead.
996
- */
997
- /**
998
- * Message to display if table is empty
999
- * @deprecated Use `noItemsMessage` instead.
1000
- */
1001
- message: PropTypes.node,
1002
1018
  /**
1003
1019
  * Message to display if table is empty
1004
1020
  */
@@ -1007,23 +1023,31 @@ EuiInMemoryTable.propTypes = {
1007
1023
  */
1008
1024
  noItemsMessage: PropTypes.node,
1009
1025
  /**
1010
- * Configures {@link Search}.
1026
+ * Configures the search bar. Can be `true` for defaults,
1027
+ * or an {@link EuiSearchBarProps} object.
1028
+ *
1029
+ * When `searchFormat="text"`, `query` and `defaultQuery` must be strings
1030
+ * ({@link Query} objects are ignored).
1011
1031
  */
1012
1032
  /**
1013
- * Configures {@link Search}.
1033
+ * Configures the search bar. Can be `true` for defaults,
1034
+ * or an {@link EuiSearchBarProps} object.
1035
+ *
1036
+ * When `searchFormat="text"`, `query` and `defaultQuery` must be strings
1037
+ * ({@link Query} objects are ignored).
1014
1038
  */
1015
1039
  search: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
1016
1040
  onChange: PropTypes.func,
1017
1041
  /**
1018
- The initial query the bar will hold when first mounted
1042
+ * The initial query the bar will hold when first mounted
1019
1043
  */
1020
1044
  defaultQuery: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
1021
1045
  /**
1022
- If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
1046
+ * If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
1023
1047
  */
1024
1048
  query: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
1025
1049
  /**
1026
- Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
1050
+ * Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
1027
1051
  */
1028
1052
  box: PropTypes.shape({
1029
1053
  name: PropTypes.string,
@@ -1083,7 +1107,7 @@ EuiInMemoryTable.propTypes = {
1083
1107
  }).isRequired, PropTypes.bool.isRequired])
1084
1108
  }),
1085
1109
  /**
1086
- An array of search filters. See {@link SearchFilterConfig}.
1110
+ * An array of search filters. See {@link SearchFilterConfig}.
1087
1111
  */
1088
1112
  filters: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
1089
1113
  type: PropTypes.oneOf(["is"]).isRequired,
@@ -1195,6 +1219,7 @@ EuiInMemoryTable.propTypes = {
1195
1219
  *
1196
1220
  * However, certain special characters (such as quotes, parentheses, and colons)
1197
1221
  * are reserved for EQL syntax and will error if used.
1222
+ *
1198
1223
  * If your table does not require filter search and instead requires searching for certain
1199
1224
  * symbols, use a plain `text` search format instead (note that filters will be ignored
1200
1225
  * in this format).
@@ -1206,6 +1231,7 @@ EuiInMemoryTable.propTypes = {
1206
1231
  *
1207
1232
  * However, certain special characters (such as quotes, parentheses, and colons)
1208
1233
  * are reserved for EQL syntax and will error if used.
1234
+ *
1209
1235
  * If your table does not require filter search and instead requires searching for certain
1210
1236
  * symbols, use a plain `text` search format instead (note that filters will be ignored
1211
1237
  * in this format).
@@ -63,6 +63,7 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
63
63
  setHasUnparsedText(false);
64
64
  setIsTextInvalid(false);
65
65
  }, [dateFormat]);
66
+ var textInputLabelId = useGeneratedHtmlId();
66
67
  var timeZomeDescriptionId = useGeneratedHtmlId();
67
68
  var submitButtonLabel = useEuiI18n('euiAbsoluteTab.dateFormatButtonLabel', 'Parse date');
68
69
  var dateFormatError = useEuiI18n('euiAbsoluteTab.dateFormatError', 'Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp.', {
@@ -163,6 +164,7 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
163
164
  helpText: hasUnparsedText && !isTextInvalid ? dateFormatError : undefined,
164
165
  describedByIds: [timeZomeDescriptionId]
165
166
  }, ___EmotionJSX(EuiFieldText, {
167
+ "aria-labelledby": textInputLabelId,
166
168
  compressed: true,
167
169
  isInvalid: isTextInvalid,
168
170
  value: textInputValue,
@@ -175,7 +177,9 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
175
177
  setIsReadyToParse(true);
176
178
  },
177
179
  "data-test-subj": "superDatePickerAbsoluteDateInput",
178
- prepend: ___EmotionJSX(EuiFormLabel, null, labelPrefix)
180
+ prepend: ___EmotionJSX(EuiFormLabel, {
181
+ id: textInputLabelId
182
+ }, labelPrefix)
179
183
  })), hasUnparsedText && ___EmotionJSX(EuiButtonIcon, {
180
184
  type: "submit",
181
185
  css: styles.euiAbsoluteTabDateForm__submit,
@@ -86,6 +86,7 @@ export var EuiRelativeTab = function EuiRelativeTab(_ref) {
86
86
  if (!parsedValue || !parsedValue.isValid()) return '';
87
87
  return parsedValue.locale(locale || 'en').format(dateFormat);
88
88
  }, [isInvalid, value, roundUp, locale, dateFormat]);
89
+ var textInputLabelId = useGeneratedHtmlId();
89
90
  var relativeDateInputNumberDescriptionId = useGeneratedHtmlId();
90
91
  var timeZomeDescriptionId = useGeneratedHtmlId();
91
92
  var numberAriaLabel = useEuiI18n('euiRelativeTab.numberInputLabel', 'Time span amount');
@@ -118,11 +119,14 @@ export var EuiRelativeTab = function EuiRelativeTab(_ref) {
118
119
  }))), ___EmotionJSX(EuiSpacer, {
119
120
  size: "s"
120
121
  }), ___EmotionJSX(EuiFieldText, {
122
+ "aria-labelledby": textInputLabelId,
121
123
  compressed: true,
122
124
  value: formattedValue,
123
125
  readOnly: true,
124
126
  "aria-describedby": timeZomeDescriptionId,
125
- prepend: ___EmotionJSX(EuiFormLabel, null, labelPrefix)
127
+ prepend: ___EmotionJSX(EuiFormLabel, {
128
+ id: textInputLabelId
129
+ }, labelPrefix)
126
130
  }), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
127
131
  id: relativeDateInputNumberDescriptionId
128
132
  }, ___EmotionJSX(EuiI18n, {
@@ -54,7 +54,9 @@ export var EuiTimeZoneDisplay = function EuiTimeZoneDisplay(_ref) {
54
54
  "data-test-subj": "euiTimeZoneDisplay",
55
55
  "aria-label": label
56
56
  }, rest), typeof customRender === 'function' ? customRender({
57
- nameDisplay: nameDisplay
57
+ nameDisplay: nameDisplay,
58
+ utcOffset: utc,
59
+ timeZoneName: name
58
60
  }) : nameDisplay);
59
61
  };
60
62
 
@@ -9,4 +9,5 @@
9
9
  export { EuiCommonlyUsedTimeRanges } from './commonly_used_time_ranges';
10
10
  export { EuiQuickSelectPopover } from './quick_select_popover';
11
11
  export { EuiQuickSelect } from './quick_select';
12
+ export { EuiQuickSelectPanel } from './quick_select_panel';
12
13
  export { EuiRecentlyUsed } from './recently_used';
@@ -35,7 +35,7 @@ export var EuiTimeWindowButtons = function EuiTimeWindowButtons(_ref) {
35
35
  zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
36
36
  var buttonColor = 'text';
37
37
  var buttonSize = compressed ? 's' : 'm';
38
- var iconSize = compressed ? 's' : 'm';
38
+ var iconSize = 'm';
39
39
  var styles = useEuiMemoizedStyles(euiButtonGroupButtonsStyles);
40
40
  var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
41
41
  zoomFactor: zoomFactor
@@ -236,7 +236,7 @@ describe('EuiFilterGroup multiselect example', function () {
236
236
  cy.realPress('Enter');
237
237
  cy.get('div[data-test-subj="euiSelectableList"]').should('exist');
238
238
  cy.realPress('Tab');
239
- cy.repeatRealPress('ArrowDown', 3);
239
+ cy.repeatRealPress('ArrowDown', 4);
240
240
  cy.realPress('Enter');
241
241
  cy.get('li[aria-selected="true"]').find('span.euiSelectableListItem__text').should('have.text', 'Dmitri Shostakovich. Checked option. To exclude this option, press Enter.');
242
242
  cy.realPress('ArrowDown');
@@ -15,6 +15,7 @@ import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { useEuiMemoizedStyles, getSecureRelForTarget } from '../../../services';
17
17
  import { validateHref } from '../../../services/security/href_validator';
18
+ import { useEuiButtonColorCSS } from '../../../global_styling';
18
19
  import { EuiIcon } from '../../icon';
19
20
  import { euiHeaderLogoStyles } from './header_logo.styles';
20
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -31,6 +32,10 @@ export var EuiHeaderLogo = function EuiHeaderLogo(_ref) {
31
32
  rest = _objectWithoutProperties(_ref, _excluded);
32
33
  var classes = classNames('euiHeaderLogo', className);
33
34
  var styles = useEuiMemoizedStyles(euiHeaderLogoStyles);
35
+ var buttonColorStyles = useEuiButtonColorCSS({
36
+ display: 'empty'
37
+ });
38
+ var cssStyles = [styles.euiHeaderLogo, buttonColorStyles.text];
34
39
  var secureRel = getSecureRelForTarget({
35
40
  href: href,
36
41
  rel: rel,
@@ -41,7 +46,7 @@ export var EuiHeaderLogo = function EuiHeaderLogo(_ref) {
41
46
  href: isHrefValid ? href : '',
42
47
  rel: secureRel,
43
48
  target: target,
44
- css: styles.euiHeaderLogo,
49
+ css: cssStyles,
45
50
  className: classes
46
51
  }, rest), ___EmotionJSX(EuiIcon, {
47
52
  "aria-label": iconTitle,
@@ -15,7 +15,7 @@ export var euiHeaderLogoStyles = function euiHeaderLogoStyles(euiThemeContext) {
15
15
  var _euiHeaderVariables = euiHeaderVariables(euiThemeContext),
16
16
  childHeight = _euiHeaderVariables.childHeight;
17
17
  return {
18
- euiHeaderLogo: /*#__PURE__*/css("position:relative;", logicalCSS('height', childHeight), " line-height:", childHeight, ";", logicalCSS('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;align-items:center;white-space:nowrap;", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
18
+ euiHeaderLogo: /*#__PURE__*/css("position:relative;", logicalCSS('height', childHeight), " line-height:", childHeight, ";", logicalCSS('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;border-radius:", euiTheme.border.radius.small, ";align-items:center;white-space:nowrap;", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
19
19
  euiHeaderLogo__text: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), " ", logicalCSS('padding-left', euiTheme.size.base), " ", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.s), ";};label:euiHeaderLogo__text;")
20
20
  };
21
21
  };
@@ -14,11 +14,11 @@ import { logicalSizeCSS, euiCanAnimate } from '../../global_styling';
14
14
  export var iconLoadingOpacity = 0.05;
15
15
  var iconLoading = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: ", ";\n }\n\n 100% {\n opacity: 1;\n }\n"])), iconLoadingOpacity);
16
16
  var _ref = process.env.NODE_ENV === "production" ? {
17
- name: "njd749-logoElasticOutline",
18
- styles: "*[fill]{fill:none!important;}.outline{fill:currentColor!important;};label:logoElasticOutline;"
17
+ name: "p0011s-logoElasticOutline",
18
+ styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;"
19
19
  } : {
20
- name: "njd749-logoElasticOutline",
21
- styles: "*[fill]{fill:none!important;}.outline{fill:currentColor!important;};label:logoElasticOutline;",
20
+ name: "p0011s-logoElasticOutline",
21
+ styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;",
22
22
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
23
  };
24
24
  var _ref2 = process.env.NODE_ENV === "production" ? {
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction"];
1
+ var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction", "color"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
@@ -14,7 +14,7 @@ import React from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { setStyleForRestrictedPageWidth } from './_restrict_width';
17
- import { useEuiPaddingCSS } from '../../global_styling';
17
+ import { useEuiPaddingCSS, useEuiBackgroundColorCSS } from '../../global_styling';
18
18
  import { euiPageStyles } from './page.styles';
19
19
  import { useEuiTheme } from '../../services';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -29,13 +29,16 @@ export var EuiPage = function EuiPage(_ref) {
29
29
  grow = _ref$grow === void 0 ? true : _ref$grow,
30
30
  _ref$direction = _ref.direction,
31
31
  direction = _ref$direction === void 0 ? 'row' : _ref$direction,
32
+ _ref$color = _ref.color,
33
+ color = _ref$color === void 0 ? 'transparent' : _ref$color,
32
34
  rest = _objectWithoutProperties(_ref, _excluded);
33
35
  // Set max-width as a style prop
34
36
  var widthStyles = setStyleForRestrictedPageWidth(restrictWidth, rest === null || rest === void 0 ? void 0 : rest.style);
35
37
  var euiTheme = useEuiTheme();
36
38
  var styles = euiPageStyles(euiTheme);
37
39
  var padding = useEuiPaddingCSS()[paddingSize];
38
- var stylesCSS = [styles.euiPage, styles[direction], grow && styles.grow, padding, restrictWidth && styles.restrictWidth];
40
+ var backgroundColor = useEuiBackgroundColorCSS()[color];
41
+ var stylesCSS = [styles.euiPage, styles[direction], backgroundColor, grow && styles.grow, padding, restrictWidth && styles.restrictWidth];
39
42
  var classes = classNames('euiPage', className);
40
43
  return ___EmotionJSX("div", _extends({
41
44
  css: stylesCSS,
@@ -60,6 +63,11 @@ EuiPage.propTypes = {
60
63
  * Flip to `column` when not including a sidebar.
61
64
  */
62
65
  direction: PropTypes.oneOf(["row", "column"]),
66
+ /**
67
+ * Defines the page background color.
68
+ * @default 'transparent'
69
+ */
70
+ color: PropTypes.oneOf(["plain", "transparent"]),
63
71
  className: PropTypes.string,
64
72
  "aria-label": PropTypes.string,
65
73
  "data-test-subj": PropTypes.string,
@@ -26,9 +26,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
26
26
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
27
  };
28
28
  export var euiPageStyles = function euiPageStyles(euiThemeContext) {
29
- var euiTheme = euiThemeContext.euiTheme;
30
29
  return {
31
- euiPage: /*#__PURE__*/css("display:flex;background-color:", euiTheme.colors.body, ";flex-shrink:0;", logicalCSS('max-width', '100%'), ";;label:euiPage;"),
30
+ euiPage: /*#__PURE__*/css("display:flex;flex-shrink:0;", logicalCSS('max-width', '100%'), ";;label:euiPage;"),
32
31
  // Grow
33
32
  grow: _ref2,
34
33
  // Direction
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
1
+ var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "color", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
@@ -14,7 +14,7 @@ import React from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { useEuiTheme } from '../../../services';
17
- import { useEuiPaddingCSS } from '../../../global_styling';
17
+ import { useEuiPaddingCSS, useEuiBackgroundColorCSS } from '../../../global_styling';
18
18
  import { EuiPageHeaderContent } from './page_header_content';
19
19
  import { euiPageHeaderStyles } from './page_header.styles';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -25,6 +25,8 @@ export var EuiPageHeader = function EuiPageHeader(_ref) {
25
25
  _ref$paddingSize = _ref.paddingSize,
26
26
  paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
27
27
  bottomBorder = _ref.bottomBorder,
28
+ _ref$color = _ref.color,
29
+ color = _ref$color === void 0 ? 'transparent' : _ref$color,
28
30
  alignItems = _ref.alignItems,
29
31
  _ref$responsive = _ref.responsive,
30
32
  responsive = _ref$responsive === void 0 ? true : _ref$responsive,
@@ -44,7 +46,8 @@ export var EuiPageHeader = function EuiPageHeader(_ref) {
44
46
  var useTheme = useEuiTheme();
45
47
  var styles = euiPageHeaderStyles(useTheme);
46
48
  var inlinePadding = useEuiPaddingCSS('horizontal');
47
- var cssStyles = [styles.euiPageHeader, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border];
49
+ var backgroundColor = useEuiBackgroundColorCSS()[color];
50
+ var cssStyles = [styles.euiPageHeader, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, backgroundColor];
48
51
  var classes = classNames('euiPageHeader', className);
49
52
  var contentProps = {
50
53
  restrictWidth: restrictWidth,
@@ -76,6 +79,11 @@ EuiPageHeader.propTypes = {
76
79
  * Adjust the overall padding.
77
80
  */
78
81
  paddingSize: PropTypes.any,
82
+ /**
83
+ * Define the header background color
84
+ * @default 'transparent'
85
+ */
86
+ color: PropTypes.oneOf(["plain", "transparent"]),
79
87
  className: PropTypes.string,
80
88
  "aria-label": PropTypes.string,
81
89
  "data-test-subj": PropTypes.string,
@@ -12,7 +12,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
12
12
 
13
13
  import React from 'react';
14
14
  import PropTypes from "prop-types";
15
- import { useEuiTheme, useIsWithinBreakpoints } from '../../../services';
15
+ import { useIsWithinBreakpoints } from '../../../services';
16
16
  import { euiPageOuterStyles } from './page_outer.styles';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export var PAGE_DIRECTIONS = ['row', 'column'];
@@ -25,8 +25,7 @@ export var _EuiPageOuter = function _EuiPageOuter(_ref) {
25
25
  _ref$responsive = _ref.responsive,
26
26
  responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
27
27
  rest = _objectWithoutProperties(_ref, _excluded);
28
- var themeContext = useEuiTheme();
29
- var styles = euiPageOuterStyles(themeContext);
28
+ var styles = euiPageOuterStyles;
30
29
  var isResponding = useIsWithinBreakpoints(responsive);
31
30
  var cssStyles = [styles.euiPageOuter, styles[isResponding ? 'column' : direction], grow && styles.grow];
32
31
  return ___EmotionJSX("div", _extends({