@elastic/eui 97.1.0 → 97.3.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 (79) hide show
  1. package/es/components/context_menu/context_menu_panel.js +17 -1
  2. package/es/components/datagrid/body/cell/data_grid_cell.js +31 -8
  3. package/es/components/datagrid/body/data_grid_body.js +8 -0
  4. package/es/components/datagrid/body/data_grid_body_custom.js +8 -1
  5. package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  6. package/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  7. package/es/components/datagrid/controls/display_selector.js +277 -207
  8. package/es/components/datagrid/data_grid.stories.utils.js +28 -2
  9. package/es/components/datagrid/data_grid.styles.js +1 -1
  10. package/es/components/datagrid/utils/col_widths.js +7 -13
  11. package/es/components/datagrid/utils/grid_height_width.js +1 -1
  12. package/es/components/datagrid/utils/row_heights.js +29 -13
  13. package/es/components/header/header.styles.js +8 -1
  14. package/es/components/header/header_links/header_links.js +1 -1
  15. package/es/components/header/header_links/header_links.styles.js +1 -0
  16. package/es/services/hooks/useDeepEqual.js +18 -6
  17. package/eui.d.ts +40 -11
  18. package/i18ntokens.json +92 -110
  19. package/lib/components/context_menu/context_menu_panel.js +17 -1
  20. package/lib/components/datagrid/body/cell/data_grid_cell.js +31 -8
  21. package/lib/components/datagrid/body/data_grid_body.js +8 -0
  22. package/lib/components/datagrid/body/data_grid_body_custom.js +8 -1
  23. package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  24. package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  25. package/lib/components/datagrid/controls/display_selector.js +275 -204
  26. package/lib/components/datagrid/data_grid.stories.utils.js +28 -2
  27. package/lib/components/datagrid/data_grid.styles.js +1 -1
  28. package/lib/components/datagrid/utils/col_widths.js +7 -13
  29. package/lib/components/datagrid/utils/grid_height_width.js +1 -1
  30. package/lib/components/datagrid/utils/row_heights.js +29 -13
  31. package/lib/components/header/header.styles.js +8 -1
  32. package/lib/components/header/header_links/header_links.js +1 -1
  33. package/lib/components/header/header_links/header_links.styles.js +1 -0
  34. package/lib/services/hooks/useDeepEqual.js +17 -7
  35. package/optimize/es/components/context_menu/context_menu_panel.js +11 -1
  36. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +15 -8
  37. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +0 -1
  38. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +0 -1
  39. package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  40. package/optimize/es/components/datagrid/controls/display_selector.js +277 -207
  41. package/optimize/es/components/datagrid/data_grid.styles.js +1 -1
  42. package/optimize/es/components/datagrid/utils/col_widths.js +7 -13
  43. package/optimize/es/components/datagrid/utils/grid_height_width.js +1 -1
  44. package/optimize/es/components/datagrid/utils/row_heights.js +29 -13
  45. package/optimize/es/components/header/header.styles.js +8 -1
  46. package/optimize/es/components/header/header_links/header_links.js +1 -1
  47. package/optimize/es/components/header/header_links/header_links.styles.js +1 -0
  48. package/optimize/es/services/hooks/useDeepEqual.js +13 -6
  49. package/optimize/lib/components/context_menu/context_menu_panel.js +11 -1
  50. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +15 -8
  51. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +0 -1
  52. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +0 -1
  53. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  54. package/optimize/lib/components/datagrid/controls/display_selector.js +274 -204
  55. package/optimize/lib/components/datagrid/data_grid.styles.js +1 -1
  56. package/optimize/lib/components/datagrid/utils/col_widths.js +7 -13
  57. package/optimize/lib/components/datagrid/utils/grid_height_width.js +1 -1
  58. package/optimize/lib/components/datagrid/utils/row_heights.js +29 -13
  59. package/optimize/lib/components/header/header.styles.js +8 -1
  60. package/optimize/lib/components/header/header_links/header_links.js +1 -1
  61. package/optimize/lib/components/header/header_links/header_links.styles.js +1 -0
  62. package/optimize/lib/services/hooks/useDeepEqual.js +12 -5
  63. package/package.json +1 -1
  64. package/test-env/components/context_menu/context_menu_panel.js +17 -1
  65. package/test-env/components/datagrid/body/cell/data_grid_cell.js +31 -8
  66. package/test-env/components/datagrid/body/data_grid_body.js +8 -0
  67. package/test-env/components/datagrid/body/data_grid_body_custom.js +8 -1
  68. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  69. package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  70. package/test-env/components/datagrid/controls/display_selector.js +274 -204
  71. package/test-env/components/datagrid/data_grid.stories.utils.js +28 -2
  72. package/test-env/components/datagrid/data_grid.styles.js +1 -1
  73. package/test-env/components/datagrid/utils/col_widths.js +7 -13
  74. package/test-env/components/datagrid/utils/grid_height_width.js +1 -1
  75. package/test-env/components/datagrid/utils/row_heights.js +29 -13
  76. package/test-env/components/header/header.styles.js +8 -1
  77. package/test-env/components/header/header_links/header_links.js +1 -1
  78. package/test-env/components/header/header_links/header_links.styles.js +1 -0
  79. package/test-env/services/hooks/useDeepEqual.js +12 -5
@@ -57,27 +57,21 @@ export var useColumnWidths = function useColumnWidths(_ref) {
57
57
  trailingControlColumns = _ref.trailingControlColumns,
58
58
  defaultColumnWidth = _ref.defaultColumnWidth,
59
59
  onColumnResize = _ref.onColumnResize;
60
- var getInitialWidths = useCallback(function (prevColumnWidths) {
61
- var columnWidths = _objectSpread({}, prevColumnWidths);
62
- columns.filter(doesColumnHaveAnInitialWidth).forEach(function (_ref2) {
63
- var id = _ref2.id,
64
- initialWidth = _ref2.initialWidth;
65
- if (columnWidths[id] == null) {
66
- columnWidths[id] = initialWidth;
67
- }
68
- });
69
- return columnWidths;
60
+ var computeColumnWidths = useCallback(function () {
61
+ return columns.filter(doesColumnHaveAnInitialWidth).reduce(function (initialWidths, column) {
62
+ return _objectSpread(_objectSpread({}, initialWidths), {}, _defineProperty({}, column.id, column.initialWidth));
63
+ }, {});
70
64
  }, [columns]);
71
65
 
72
66
  // Passes initializer function for performance, so computing only runs once on init
73
67
  // @see https://react.dev/reference/react/useState#examples-initializer
74
- var _useState = useState(getInitialWidths),
68
+ var _useState = useState(computeColumnWidths),
75
69
  _useState2 = _slicedToArray(_useState, 2),
76
70
  columnWidths = _useState2[0],
77
71
  setColumnWidths = _useState2[1];
78
72
  useUpdateEffect(function () {
79
- setColumnWidths(getInitialWidths);
80
- }, [columns]);
73
+ setColumnWidths(computeColumnWidths());
74
+ }, [computeColumnWidths]);
81
75
  var setColumnWidth = useCallback(function (columnId, width) {
82
76
  setColumnWidths(function (prevColumnWidths) {
83
77
  return _objectSpread(_objectSpread({}, prevColumnWidths), {}, _defineProperty({}, columnId, width));
@@ -107,7 +107,7 @@ export var useUnconstrainedHeight = function useUnconstrainedHeight(_ref2) {
107
107
  if (rowHeightOption) {
108
108
  // this row's height is known
109
109
  knownRowCount++;
110
- knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex, rowHeightUtils.isRowHeightOverride(correctRowIndex, rowHeightsOptions));
110
+ knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex, rowHeightsOptions);
111
111
  }
112
112
  }
113
113
 
@@ -74,7 +74,7 @@ export var RowHeightUtils = /*#__PURE__*/function () {
74
74
  }
75
75
  }, {
76
76
  key: "getCalculatedHeight",
77
- value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex, isRowHeightOverride) {
77
+ value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex, rowHeightsOptions) {
78
78
  if (isObject(heightOption) && heightOption.height) {
79
79
  return Math.max(heightOption.height, defaultHeight);
80
80
  }
@@ -82,8 +82,13 @@ export var RowHeightUtils = /*#__PURE__*/function () {
82
82
  return Math.max(heightOption, defaultHeight);
83
83
  }
84
84
  if (isObject(heightOption) && heightOption.lineCount) {
85
- if (isRowHeightOverride) {
86
- return this.getRowHeight(rowIndex) || defaultHeight; // lineCount overrides are stored in the heights cache
85
+ var _ref = rowHeightsOptions || {},
86
+ autoBelowLineCount = _ref.autoBelowLineCount; // uses auto height cache
87
+ var isRowHeightOverride =
88
+ // lineCount overrides are stored in the heights cache
89
+ rowIndex != null && this.isRowHeightOverride(rowIndex, rowHeightsOptions);
90
+ if (autoBelowLineCount || isRowHeightOverride) {
91
+ return this.getRowHeight(rowIndex) || defaultHeight;
87
92
  } else {
88
93
  return defaultHeight; // default lineCount height is set in minRowHeight state in grid_row_body
89
94
  }
@@ -114,6 +119,14 @@ export var RowHeightUtils = /*#__PURE__*/function () {
114
119
  // Assumes both padding-top and bottom are the same
115
120
  return contentHeight + padding * 2;
116
121
  }
122
+ }, {
123
+ key: "isAutoBelowLineCount",
124
+ value: function isAutoBelowLineCount(options, option) {
125
+ var _this$getLineCount;
126
+ if (!(options !== null && options !== void 0 && options.autoBelowLineCount)) return false;
127
+ if (((_this$getLineCount = this.getLineCount(option)) !== null && _this$getLineCount !== void 0 ? _this$getLineCount : 0) > 1) return true;
128
+ return false;
129
+ }
117
130
 
118
131
  /**
119
132
  * Auto height utils
@@ -125,6 +138,9 @@ export var RowHeightUtils = /*#__PURE__*/function () {
125
138
  if (height === AUTO_HEIGHT) {
126
139
  return true;
127
140
  }
141
+ if (this.isAutoBelowLineCount(rowHeightsOptions, height)) {
142
+ return true;
143
+ }
128
144
  return false;
129
145
  }
130
146
  }, {
@@ -154,8 +170,8 @@ export var RowHeightUtils = /*#__PURE__*/function () {
154
170
  }, {
155
171
  key: "pruneHiddenColumnHeights",
156
172
  value: function pruneHiddenColumnHeights(visibleColumns) {
157
- var visibleColumnIds = new Set(visibleColumns.map(function (_ref) {
158
- var id = _ref.id;
173
+ var visibleColumnIds = new Set(visibleColumns.map(function (_ref2) {
174
+ var id = _ref2.id;
159
175
  return id;
160
176
  }));
161
177
  var didModify = false;
@@ -267,10 +283,10 @@ export var RowHeightVirtualizationUtils = /*#__PURE__*/function (_RowHeightUtils
267
283
  * Hook for instantiating RowHeightUtils, setting internal class vars,
268
284
  * and setting up various row-height-related side effects
269
285
  */
270
- export var useRowHeightUtils = function useRowHeightUtils(_ref2) {
271
- var virtualization = _ref2.virtualization,
272
- rowHeightsOptions = _ref2.rowHeightsOptions,
273
- columns = _ref2.columns;
286
+ export var useRowHeightUtils = function useRowHeightUtils(_ref3) {
287
+ var virtualization = _ref3.virtualization,
288
+ rowHeightsOptions = _ref3.rowHeightsOptions,
289
+ columns = _ref3.columns;
274
290
  var forceRenderRef = useLatest(useForceRender());
275
291
  var _useState = useState(function () {
276
292
  if (virtualization) {
@@ -303,9 +319,9 @@ export var useRowHeightUtils = function useRowHeightUtils(_ref2) {
303
319
  }, [rowHeightUtils, columns]);
304
320
  return rowHeightUtils;
305
321
  };
306
- export var useDefaultRowHeight = function useDefaultRowHeight(_ref3) {
307
- var rowHeightsOptions = _ref3.rowHeightsOptions,
308
- rowHeightUtils = _ref3.rowHeightUtils;
322
+ export var useDefaultRowHeight = function useDefaultRowHeight(_ref4) {
323
+ var rowHeightsOptions = _ref4.rowHeightsOptions,
324
+ rowHeightUtils = _ref4.rowHeightUtils;
309
325
  var _useContext = useContext(DataGridSortedContext),
310
326
  getCorrectRowIndex = _useContext.getCorrectRowIndex;
311
327
 
@@ -329,7 +345,7 @@ export var useDefaultRowHeight = function useDefaultRowHeight(_ref3) {
329
345
  // Account for row-specific height overrides
330
346
  var rowHeightOption = rowHeightUtils.getRowHeightOption(correctRowIndex, rowHeightsOptions);
331
347
  if (rowHeightOption) {
332
- rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex, rowHeightUtils.isRowHeightOverride(correctRowIndex, rowHeightsOptions));
348
+ rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex, rowHeightsOptions);
333
349
  }
334
350
 
335
351
  // Use the row-specific height if it exists, if not, fall back to the default
@@ -50,5 +50,12 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
50
50
  var _euiFormVariables = euiFormVariables(euiThemeContext),
51
51
  controlPlaceholderText = _euiFormVariables.controlPlaceholderText;
52
52
  var backgroundColor = colorMode === 'DARK' ? shade(euiTheme.colors.lightestShade, 0.5) : shade(euiTheme.colors.darkestShade, 0.28);
53
- return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(shade(euiTheme.colors.primary, 0.5), ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n &--group {\n border-color: ").concat(transparentize(euiTheme.colors.ghost, 0.3), ";\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(euiTheme.colors.ghost, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor), ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
53
+
54
+ // Specific color overrides for EuiSelectableTemplateSitewide
55
+ var selectableSitewide = {
56
+ color: euiTheme.colors.ghost,
57
+ borderColor: transparentize(euiTheme.colors.ghost, 0.3),
58
+ placeholderColor: makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor)
59
+ };
60
+ return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(shade(euiTheme.colors.primary, 0.5), ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(selectableSitewide.borderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
54
61
  };
@@ -28,7 +28,7 @@ import { EuiHeaderSectionItemButton } from '../header_section';
28
28
  import { EuiHideFor, EuiShowFor } from '../../responsive';
29
29
  import { euiHeaderLinksStyles } from './header_links.styles';
30
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
31
- export var GUTTER_SIZES = ['xs', 's', 'm', 'l'];
31
+ export var GUTTER_SIZES = ['xxs', 'xs', 's', 'm', 'l'];
32
32
  export var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
33
33
  var children = _ref.children,
34
34
  className = _ref.className,
@@ -31,6 +31,7 @@ export var euiHeaderLinksStyles = function euiHeaderLinksStyles(_ref3) {
31
31
  euiHeaderLinks: _ref2,
32
32
  euiHeaderLinks__list: _ref,
33
33
  gutterSizes: {
34
+ xxs: /*#__PURE__*/css("gap:", euiTheme.size.xs, ";;label:xxs;"),
34
35
  xs: /*#__PURE__*/css("gap:", euiTheme.size.s, ";;label:xs;"),
35
36
  s: /*#__PURE__*/css("gap:", euiTheme.size.m, ";;label:s;"),
36
37
  m: /*#__PURE__*/css("gap:", euiTheme.size.base, ";;label:m;"),
@@ -1,3 +1,9 @@
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1
7
  /*
2
8
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
9
  * or more contributor license agreements. Licensed under the Elastic License
@@ -6,8 +12,9 @@
6
12
  * Side Public License, v 1.
7
13
  */
8
14
 
9
- import { useRef } from 'react';
15
+ import { useState } from 'react';
10
16
  import isEqual from 'lodash/isEqual';
17
+ import { useUpdateEffect } from './useUpdateEffect';
11
18
 
12
19
  /**
13
20
  * This hook is mostly a performance concern for third-party objs/arrays that EUI
@@ -15,9 +22,14 @@ import isEqual from 'lodash/isEqual';
15
22
  * reference on every rerender unless passed through this hook).
16
23
  */
17
24
  export var useDeepEqual = function useDeepEqual(object) {
18
- var ref = useRef(object);
19
- if (!isEqual(object, ref.current)) {
20
- ref.current = object;
21
- }
22
- return ref.current;
25
+ var _useState = useState(object),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ memoizedObject = _useState2[0],
28
+ setMemoizedObject = _useState2[1];
29
+ useUpdateEffect(function () {
30
+ if (!isEqual(object, memoizedObject)) {
31
+ setMemoizedObject(object);
32
+ }
33
+ }, [object]);
34
+ return memoizedObject;
23
35
  };
package/eui.d.ts CHANGED
@@ -4579,6 +4579,12 @@ declare module '@elastic/eui/src/components/context_menu/context_menu_panel' {
4579
4579
  export type EuiContextMenuPanelShowPanelCallback = (currentPanelIndex?: number) => void;
4580
4580
  export const SIZES: readonly ["s", "m"];
4581
4581
  export type EuiContextMenuPanelProps = PropsWithChildren & CommonProps & Omit<HTMLAttributes<HTMLDivElement>, 'onKeyDown' | 'tabIndex' | 'onAnimationEnd' | 'title'> & {
4582
+ /**
4583
+ * Determines the initially focused menu item for keyboard and screen reader users.
4584
+ *
4585
+ * Can be set to `-1` to prevent autofocus (an uncommon case that must have
4586
+ * keyboard accessibility accounted for manually if used)
4587
+ */
4582
4588
  initialFocusedItemIndex?: number;
4583
4589
  items?: ReactElement[];
4584
4590
  onClose?: NoArgCallback<void>;
@@ -14211,9 +14217,10 @@ declare module '@elastic/eui/src/components/comment_list/comment_timeline' {
14211
14217
  }
14212
14218
  declare module '@elastic/eui/src/components/comment_list/comment' {
14213
14219
  import { FunctionComponent } from 'react';
14220
+ import { EuiTimelineItemProps } from '@elastic/eui/src/components/timeline';
14214
14221
  import { EuiCommentEventProps } from '@elastic/eui/src/components/comment_list/comment_event';
14215
14222
  import { EuiCommentTimelineProps } from '@elastic/eui/src/components/comment_list/comment_timeline';
14216
- export interface EuiCommentProps extends EuiCommentEventProps, EuiCommentTimelineProps {
14223
+ export interface EuiCommentProps extends EuiCommentEventProps, EuiCommentTimelineProps, Omit<EuiTimelineItemProps, 'children' | 'icon' | 'iconAriaLabel'> {
14217
14224
  }
14218
14225
  export const EuiComment: FunctionComponent<EuiCommentProps>;
14219
14226
 
@@ -14294,12 +14301,12 @@ declare module '@elastic/eui/src/components/datagrid/utils/sorting' {
14294
14301
  declare module '@elastic/eui/src/components/datagrid/utils/row_heights' {
14295
14302
  import { MutableRefObject } from 'react';
14296
14303
  import { GridOnItemsRenderedProps } from 'react-window';
14297
- import { EuiDataGridColumn, EuiDataGridRowHeightOption, EuiDataGridRowHeightsOptions, EuiDataGridScrollAnchorRow, EuiDataGridStyle, ImperativeGridApi } from '@elastic/eui/src/components/datagrid/data_grid_types';
14304
+ import { EuiDataGridColumn, EuiDataGridRowHeightOption, EuiDataGridRowHeightsOptions, EuiDataGridScrollAnchorRow, ImperativeGridApi } from '@elastic/eui/src/components/datagrid/data_grid_types';
14298
14305
  export type RowHeightUtilsType = RowHeightUtils | RowHeightVirtualizationUtils;
14299
14306
  export class RowHeightUtils {
14300
14307
  getRowHeightOption(rowIndex: number, rowHeightsOptions?: EuiDataGridRowHeightsOptions): EuiDataGridRowHeightOption | undefined;
14301
14308
  isRowHeightOverride(rowIndex: number, rowHeightsOptions?: EuiDataGridRowHeightsOptions): boolean;
14302
- getCalculatedHeight(heightOption: EuiDataGridRowHeightOption, defaultHeight: number, rowIndex?: number, isRowHeightOverride?: boolean): number;
14309
+ getCalculatedHeight(heightOption: EuiDataGridRowHeightOption, defaultHeight: number, rowIndex?: number, rowHeightsOptions?: EuiDataGridRowHeightsOptions): number;
14303
14310
  /**
14304
14311
  * Height types
14305
14312
  */
@@ -14309,6 +14316,7 @@ declare module '@elastic/eui/src/components/datagrid/utils/row_heights' {
14309
14316
  */
14310
14317
  getLineCount(option?: EuiDataGridRowHeightOption): number | undefined;
14311
14318
  calculateHeightForLineCount(cellRef: HTMLElement, lineCount: number): number;
14319
+ isAutoBelowLineCount(options?: EuiDataGridRowHeightsOptions, option?: EuiDataGridRowHeightOption): boolean;
14312
14320
  /**
14313
14321
  * Auto height utils
14314
14322
  */
@@ -14353,7 +14361,6 @@ declare module '@elastic/eui/src/components/datagrid/utils/row_heights' {
14353
14361
  gridItemsRenderedRef: MutableRefObject<GridOnItemsRenderedProps | null>;
14354
14362
  } | undefined;
14355
14363
  rowHeightsOptions?: EuiDataGridRowHeightsOptions | undefined;
14356
- gridStyles: EuiDataGridStyle;
14357
14364
  columns: EuiDataGridColumn[];
14358
14365
  }) => RowHeightUtils;
14359
14366
  export const useDefaultRowHeight: ({ rowHeightsOptions, rowHeightUtils, }: {
@@ -15288,7 +15295,18 @@ declare module '@elastic/eui/src/components/datagrid/data_grid_types' {
15288
15295
  * Allows appending additional content to the bottom of the display settings popover
15289
15296
  */
15290
15297
  additionalDisplaySettings?: ReactNode;
15298
+ /**
15299
+ * Allows completely custom rendering of the display selector popover via render prop.
15300
+ * Passes back the default controls as arguments for optional rendering.
15301
+ */
15302
+ customRender?: EuiDataGridDisplaySelectorCustomRender;
15291
15303
  }
15304
+ export type EuiDataGridDisplaySelectorCustomRender = (args: {
15305
+ densityControl: ReactNode;
15306
+ rowHeightControl: ReactNode;
15307
+ additionalDisplaySettings: ReactNode;
15308
+ resetButton: ReactNode;
15309
+ }) => ReactNode;
15292
15310
  export interface EuiDataGridToolBarVisibilityOptions {
15293
15311
  /**
15294
15312
  * Allows the ability for the user to hide fields and sort columns, boolean or a #EuiDataGridToolBarVisibilityColumnSelectorOptions
@@ -15428,6 +15446,14 @@ declare module '@elastic/eui/src/components/datagrid/data_grid_types' {
15428
15446
  * Defines the default size for all rows. It can be line count or just height.
15429
15447
  */
15430
15448
  defaultHeight?: EuiDataGridRowHeightOption;
15449
+ /**
15450
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
15451
+ * *max* number of lines (instead of a set number of lines for all rows).
15452
+ *
15453
+ * This functionality is in beta and has performance implications;
15454
+ * we do not yet fully recommend/support it for heavy production usage.
15455
+ */
15456
+ autoBelowLineCount?: boolean;
15431
15457
  /**
15432
15458
  * Defines the height for a specific row. It can be line count or just height.
15433
15459
  *
@@ -16463,7 +16489,10 @@ declare module '@elastic/eui/src/components/datagrid/controls/display_selector'
16463
16489
  import { ReactNode } from 'react';
16464
16490
  import { EuiDataGridToolBarVisibilityOptions, EuiDataGridStyle, EuiDataGridRowHeightsOptions } from '@elastic/eui/src/components/datagrid/data_grid_types';
16465
16491
  export const startingStyles: EuiDataGridStyle;
16466
- export const useDataGridDisplaySelector: (showDisplaySelector: EuiDataGridToolBarVisibilityOptions['showDisplaySelector'], initialStyles: EuiDataGridStyle, initialRowHeightsOptions?: EuiDataGridRowHeightsOptions | undefined) => [ReactNode, EuiDataGridStyle, EuiDataGridRowHeightsOptions];
16492
+ /**
16493
+ * Display settings/selector popover
16494
+ */
16495
+ export const useDataGridDisplaySelector: (showDisplaySelector: EuiDataGridToolBarVisibilityOptions['showDisplaySelector'], passedGridStyles: EuiDataGridStyle, passedRowHeightsOptions?: EuiDataGridRowHeightsOptions) => [ReactNode, EuiDataGridStyle, EuiDataGridRowHeightsOptions];
16467
16496
 
16468
16497
  }
16469
16498
  declare module '@elastic/eui/src/components/description_list/description_list_types' {
@@ -19030,6 +19059,7 @@ declare module '@elastic/eui/src/components/header/header_links/header_links.sty
19030
19059
  euiHeaderLinks: import("@emotion/utils").SerializedStyles;
19031
19060
  euiHeaderLinks__list: import("@emotion/utils").SerializedStyles;
19032
19061
  gutterSizes: {
19062
+ xxs: import("@emotion/utils").SerializedStyles;
19033
19063
  xs: import("@emotion/utils").SerializedStyles;
19034
19064
  s: import("@emotion/utils").SerializedStyles;
19035
19065
  m: import("@emotion/utils").SerializedStyles;
@@ -19046,7 +19076,7 @@ declare module '@elastic/eui/src/components/header/header_links/header_links' {
19046
19076
  import { EuiPopoverProps } from '@elastic/eui/src/components/popover';
19047
19077
  import { EuiHeaderSectionItemButtonProps } from '@elastic/eui/src/components/header/header_section';
19048
19078
  import { EuiBreakpointSize } from '@elastic/eui/src/services/breakpoint';
19049
- export const GUTTER_SIZES: readonly ["xs", "s", "m", "l"]; type EuiHeaderLinksGutterSize = (typeof GUTTER_SIZES)[number]; type EuiHeaderLinksPopoverButtonProps = Partial<EuiHeaderSectionItemButtonProps> & {
19079
+ export const GUTTER_SIZES: readonly ["xxs", "xs", "s", "m", "l"]; type EuiHeaderLinksGutterSize = (typeof GUTTER_SIZES)[number]; type EuiHeaderLinksPopoverButtonProps = Partial<EuiHeaderSectionItemButtonProps> & {
19050
19080
  iconType?: IconType;
19051
19081
  };
19052
19082
  export type EuiHeaderLinksProps = CommonProps & Omit<HTMLAttributes<HTMLElement>, 'children'> & {
@@ -31289,17 +31319,16 @@ declare module '@elastic/eui' {
31289
31319
  "euiColumnSorting.pickFields": any;
31290
31320
  "euiColumnSorting.clearAll": any;
31291
31321
  "euiDataGridToolbarControl.badgeAriaLabel": any;
31292
- "euiDisplaySelector.buttonText": any;
31293
- "euiDisplaySelector.resetButtonText": any;
31294
31322
  "euiDisplaySelector.densityLabel": any;
31295
31323
  "euiDisplaySelector.labelCompact": any;
31296
31324
  "euiDisplaySelector.labelNormal": any;
31297
31325
  "euiDisplaySelector.labelExpanded": any;
31298
31326
  "euiDisplaySelector.rowHeightLabel": any;
31299
- "euiDisplaySelector.labelSingle": any;
31300
31327
  "euiDisplaySelector.labelAuto": any;
31301
- "euiDisplaySelector.labelCustom": any;
31302
- "euiDisplaySelector.lineCountLabel": any;
31328
+ "euiDisplaySelector.labelStatic": any;
31329
+ "euiDisplaySelector.labelMax": any;
31330
+ "euiDisplaySelector.buttonText": any;
31331
+ "euiDisplaySelector.resetButtonText": any;
31303
31332
  "euiFullscreenSelector.fullscreenButton": any;
31304
31333
  "euiFullscreenSelector.fullscreenButtonActive": any;
31305
31334
  "euiKeyboardShortcuts.title": any;