@elastic/eui 92.0.0 → 92.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/eui_theme_dark.css +3 -18
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +3 -18
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/aspect_ratio/aspect_ratio.js +1 -1
  6. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +7 -3
  7. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +4 -4
  8. package/es/components/datagrid/body/{data_grid_cell.js → cell/data_grid_cell.js} +111 -244
  9. package/es/components/datagrid/body/{data_grid_cell_actions.js → cell/data_grid_cell_actions.js} +5 -5
  10. package/es/components/datagrid/body/{data_grid_cell_popover.js → cell/data_grid_cell_popover.js} +4 -4
  11. package/es/components/datagrid/body/{data_grid_cell_wrapper.js → cell/data_grid_cell_wrapper.js} +1 -1
  12. package/es/components/datagrid/body/cell/focus_utils.js +166 -0
  13. package/es/components/datagrid/body/cell/index.js +11 -0
  14. package/es/components/datagrid/body/data_grid_body.js +0 -2
  15. package/es/components/datagrid/body/data_grid_body_custom.js +1 -7
  16. package/es/components/datagrid/body/data_grid_body_virtualized.js +1 -7
  17. package/es/components/datagrid/body/footer/data_grid_footer_row.js +1 -2
  18. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +3 -6
  19. package/es/components/datagrid/body/header/data_grid_header_cell.js +27 -12
  20. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +45 -116
  21. package/es/components/datagrid/body/header/data_grid_header_row.js +5 -10
  22. package/es/components/datagrid/body/header/use_data_grid_header.js +3 -14
  23. package/es/components/datagrid/data_grid.js +2 -12
  24. package/es/components/datagrid/utils/focus.js +25 -54
  25. package/es/components/datagrid/utils/scrolling.js +1 -1
  26. package/es/components/flyout/flyout_resizable.js +10 -10
  27. package/es/components/flyout/flyout_resizable.styles.js +12 -6
  28. package/es/components/resizable_container/helpers.js +5 -6
  29. package/es/components/resizable_container/resizable_button.js +13 -4
  30. package/es/components/resizable_container/resizable_button.styles.js +18 -8
  31. package/es/components/resizable_container/resizable_container.js +28 -22
  32. package/es/components/steps/step_number.styles.js +6 -7
  33. package/es/components/tree_view/tree_view.js +9 -2
  34. package/eui.d.ts +130 -90
  35. package/i18ntokens.json +108 -72
  36. package/lib/components/aspect_ratio/aspect_ratio.js +1 -1
  37. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +7 -3
  38. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +4 -4
  39. package/lib/components/datagrid/body/{data_grid_cell.js → cell/data_grid_cell.js} +111 -244
  40. package/lib/components/datagrid/body/{data_grid_cell_actions.js → cell/data_grid_cell_actions.js} +5 -5
  41. package/lib/components/datagrid/body/{data_grid_cell_popover.js → cell/data_grid_cell_popover.js} +4 -4
  42. package/lib/components/datagrid/body/{data_grid_cell_wrapper.js → cell/data_grid_cell_wrapper.js} +1 -1
  43. package/lib/components/datagrid/body/cell/focus_utils.js +174 -0
  44. package/lib/components/datagrid/body/cell/index.js +32 -0
  45. package/lib/components/datagrid/body/data_grid_body.js +0 -2
  46. package/lib/components/datagrid/body/data_grid_body_custom.js +2 -8
  47. package/lib/components/datagrid/body/data_grid_body_virtualized.js +2 -8
  48. package/lib/components/datagrid/body/footer/data_grid_footer_row.js +5 -6
  49. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +3 -6
  50. package/lib/components/datagrid/body/header/data_grid_header_cell.js +35 -20
  51. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +47 -119
  52. package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -10
  53. package/lib/components/datagrid/body/header/use_data_grid_header.js +10 -24
  54. package/lib/components/datagrid/data_grid.js +4 -14
  55. package/lib/components/datagrid/utils/focus.js +26 -56
  56. package/lib/components/datagrid/utils/scrolling.js +2 -2
  57. package/lib/components/flyout/flyout_resizable.js +10 -10
  58. package/lib/components/flyout/flyout_resizable.styles.js +12 -6
  59. package/lib/components/resizable_container/helpers.js +7 -7
  60. package/lib/components/resizable_container/resizable_button.js +13 -4
  61. package/lib/components/resizable_container/resizable_button.styles.js +18 -8
  62. package/lib/components/resizable_container/resizable_container.js +28 -22
  63. package/lib/components/steps/step_number.styles.js +6 -7
  64. package/lib/components/tree_view/tree_view.js +9 -2
  65. package/optimize/es/components/aspect_ratio/aspect_ratio.js +1 -1
  66. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +7 -3
  67. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +4 -4
  68. package/optimize/es/components/datagrid/body/{data_grid_cell.js → cell/data_grid_cell.js} +111 -244
  69. package/optimize/es/components/datagrid/body/{data_grid_cell_actions.js → cell/data_grid_cell_actions.js} +5 -5
  70. package/optimize/es/components/datagrid/body/{data_grid_cell_popover.js → cell/data_grid_cell_popover.js} +4 -4
  71. package/optimize/es/components/datagrid/body/{data_grid_cell_wrapper.js → cell/data_grid_cell_wrapper.js} +1 -1
  72. package/optimize/es/components/datagrid/body/cell/focus_utils.js +153 -0
  73. package/optimize/es/components/datagrid/body/cell/index.js +11 -0
  74. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +1 -5
  75. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +1 -5
  76. package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +1 -2
  77. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -4
  78. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +25 -10
  79. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +41 -115
  80. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +4 -8
  81. package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +3 -13
  82. package/optimize/es/components/datagrid/data_grid.js +2 -12
  83. package/optimize/es/components/datagrid/utils/focus.js +25 -54
  84. package/optimize/es/components/datagrid/utils/scrolling.js +1 -1
  85. package/optimize/es/components/flyout/flyout_resizable.js +10 -10
  86. package/optimize/es/components/flyout/flyout_resizable.styles.js +12 -6
  87. package/optimize/es/components/resizable_container/helpers.js +5 -6
  88. package/optimize/es/components/resizable_container/resizable_button.js +5 -2
  89. package/optimize/es/components/resizable_container/resizable_button.styles.js +18 -8
  90. package/optimize/es/components/resizable_container/resizable_container.js +28 -22
  91. package/optimize/es/components/steps/step_number.styles.js +6 -7
  92. package/optimize/es/components/tree_view/tree_view.js +9 -2
  93. package/optimize/lib/components/aspect_ratio/aspect_ratio.js +1 -1
  94. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +7 -3
  95. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +4 -4
  96. package/optimize/lib/components/datagrid/body/{data_grid_cell.js → cell/data_grid_cell.js} +111 -244
  97. package/optimize/lib/components/datagrid/body/{data_grid_cell_actions.js → cell/data_grid_cell_actions.js} +5 -5
  98. package/optimize/lib/components/datagrid/body/{data_grid_cell_popover.js → cell/data_grid_cell_popover.js} +4 -4
  99. package/optimize/lib/components/datagrid/body/{data_grid_cell_wrapper.js → cell/data_grid_cell_wrapper.js} +1 -1
  100. package/optimize/lib/components/datagrid/body/cell/focus_utils.js +163 -0
  101. package/optimize/lib/components/datagrid/body/cell/index.js +32 -0
  102. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +2 -6
  103. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +2 -6
  104. package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +5 -6
  105. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -4
  106. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +25 -10
  107. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +41 -115
  108. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +4 -8
  109. package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +4 -14
  110. package/optimize/lib/components/datagrid/data_grid.js +4 -14
  111. package/optimize/lib/components/datagrid/utils/focus.js +26 -56
  112. package/optimize/lib/components/datagrid/utils/scrolling.js +2 -2
  113. package/optimize/lib/components/flyout/flyout_resizable.js +10 -10
  114. package/optimize/lib/components/flyout/flyout_resizable.styles.js +12 -6
  115. package/optimize/lib/components/resizable_container/helpers.js +7 -7
  116. package/optimize/lib/components/resizable_container/resizable_button.js +5 -2
  117. package/optimize/lib/components/resizable_container/resizable_button.styles.js +18 -8
  118. package/optimize/lib/components/resizable_container/resizable_container.js +28 -22
  119. package/optimize/lib/components/steps/step_number.styles.js +6 -7
  120. package/optimize/lib/components/tree_view/tree_view.js +9 -2
  121. package/package.json +1 -1
  122. package/src/components/datagrid/body/header/_data_grid_header_row.scss +8 -7
  123. package/test-env/components/aspect_ratio/aspect_ratio.js +1 -1
  124. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +7 -3
  125. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +4 -4
  126. package/test-env/components/datagrid/body/{data_grid_cell.js → cell/data_grid_cell.js} +111 -244
  127. package/test-env/components/datagrid/body/{data_grid_cell_actions.js → cell/data_grid_cell_actions.js} +5 -5
  128. package/test-env/components/datagrid/body/{data_grid_cell_popover.js → cell/data_grid_cell_popover.js} +4 -4
  129. package/test-env/components/datagrid/body/{data_grid_cell_wrapper.js → cell/data_grid_cell_wrapper.js} +1 -1
  130. package/test-env/components/datagrid/body/cell/focus_utils.js +172 -0
  131. package/test-env/components/datagrid/body/cell/index.js +32 -0
  132. package/test-env/components/datagrid/body/data_grid_body.js +0 -2
  133. package/test-env/components/datagrid/body/data_grid_body_custom.js +2 -8
  134. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +2 -8
  135. package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +5 -6
  136. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +3 -6
  137. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +25 -10
  138. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +44 -116
  139. package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -10
  140. package/test-env/components/datagrid/body/header/use_data_grid_header.js +4 -14
  141. package/test-env/components/datagrid/data_grid.js +4 -14
  142. package/test-env/components/datagrid/utils/focus.js +26 -56
  143. package/test-env/components/datagrid/utils/scrolling.js +2 -2
  144. package/test-env/components/flyout/flyout_resizable.js +10 -10
  145. package/test-env/components/flyout/flyout_resizable.styles.js +12 -6
  146. package/test-env/components/resizable_container/helpers.js +7 -7
  147. package/test-env/components/resizable_container/resizable_button.js +13 -4
  148. package/test-env/components/resizable_container/resizable_button.styles.js +18 -8
  149. package/test-env/components/resizable_container/resizable_container.js +28 -22
  150. package/test-env/components/steps/step_number.styles.js +6 -7
  151. package/test-env/components/tree_view/tree_view.js +9 -2
  152. package/es/components/datagrid/body/header/header_is_interactive.js +0 -58
  153. package/lib/components/datagrid/body/header/header_is_interactive.js +0 -63
  154. package/optimize/es/components/datagrid/body/header/header_is_interactive.js +0 -53
  155. package/optimize/lib/components/datagrid/body/header/header_is_interactive.js +0 -61
  156. package/test-env/components/datagrid/body/header/header_is_interactive.js +0 -61
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.euiStepNumberStyles = exports.euiStepNumberContentStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
- var _services = require("../../services");
10
9
  var _step = require("./step.styles");
11
10
  var _mixins = require("../../themes/amsterdam/global_styling/mixins");
12
11
  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)."; } /*
@@ -46,12 +45,12 @@ var euiStepNumberStyles = function euiStepNumberStyles(euiThemeContext) {
46
45
  xs: /*#__PURE__*/(0, _react.css)(createStepsNumber(euiStep.numberXSSize, (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme)), ";;label:xs;"),
47
46
  // status
48
47
  incomplete: /*#__PURE__*/(0, _react.css)("background-color:transparent;color:", euiTheme.colors.text, ";border:", euiTheme.border.thick, ";;label:incomplete;"),
49
- disabled: /*#__PURE__*/(0, _react.css)("background-color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'disabled').backgroundColor, ";color:", (0, _services.makeHighContrastColor)(euiTheme.colors.disabledText)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'disabled').backgroundColor), ";;label:disabled;"),
48
+ disabled: /*#__PURE__*/(0, _react.css)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'disabled'), ";;label:disabled;"),
50
49
  loading: _ref,
51
- warning: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'warning').color, ";background-color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'warning').backgroundColor, ";", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:warning;"),
52
- danger: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'danger').color, ";background-color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'danger').backgroundColor, ";", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:danger;"),
53
- complete: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'success').color, ";background-color:", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'success').backgroundColor, ";", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:complete;"),
54
- current: /*#__PURE__*/(0, _react.css)("border:2px solid ", euiTheme.colors.body, ";box-shadow:0 0 0 2px ", euiTheme.colors.primary, ";.euiStepNumber__number{display:inline-block;transform:translateY(-2px);};label:current;")
50
+ warning: /*#__PURE__*/(0, _react.css)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'warning'), " ", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:warning;"),
51
+ danger: /*#__PURE__*/(0, _react.css)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'danger'), " ", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:danger;"),
52
+ complete: /*#__PURE__*/(0, _react.css)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'success'), " ", _global_styling.euiCanAnimate, "{animation:", _global_styling.euiAnimScale, " ", euiTheme.animation.fast, " ", euiTheme.animation.bounce, ";};label:complete;"),
53
+ current: /*#__PURE__*/(0, _react.css)("border:", euiTheme.border.width.thick, " solid ", euiTheme.colors.body, ";box-shadow:0 0 0 ", euiTheme.border.width.thick, " ", euiTheme.colors.primary, ";;label:current;")
55
54
  };
56
55
  };
57
56
  exports.euiStepNumberStyles = euiStepNumberStyles;
@@ -72,7 +71,7 @@ var euiStepNumberContentStyles = function euiStepNumberContentStyles(_ref3) {
72
71
  incomplete: /*#__PURE__*/(0, _react.css)("display:unset;position:relative;inset-block-start:-", euiTheme.border.width.thick, ";;label:incomplete;"),
73
72
  loading: /*#__PURE__*/(0, _react.css)(";label:loading;"),
74
73
  disabled: /*#__PURE__*/(0, _react.css)(";label:disabled;"),
75
- current: /*#__PURE__*/(0, _react.css)(";label:current;")
74
+ current: /*#__PURE__*/(0, _react.css)("display:inline-block;transform:translateY(-", euiTheme.border.width.thick, ");;label:current;")
76
75
  };
77
76
  };
78
77
  exports.euiStepNumberContentStyles = euiStepNumberContentStyles;
@@ -40,7 +40,9 @@ var EuiTreeViewContext = /*#__PURE__*/(0, _react.createContext)('');
40
40
  function hasAriaLabel(x) {
41
41
  return x.hasOwnProperty('aria-label');
42
42
  }
43
- function getTreeId(propId, contextId, idGenerator) {
43
+ function getTreeId(propId) {
44
+ var contextId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
45
+ var idGenerator = arguments.length > 2 ? arguments[2] : undefined;
44
46
  return propId !== null && propId !== void 0 ? propId : contextId === '' ? idGenerator() : contextId;
45
47
  }
46
48
  var displayToClassNameMap = {
@@ -50,9 +52,14 @@ var displayToClassNameMap = {
50
52
  var EuiTreeView = /*#__PURE__*/function (_Component) {
51
53
  (0, _inherits2.default)(EuiTreeView, _Component);
52
54
  var _super = _createSuper(EuiTreeView);
53
- function EuiTreeView(props, context) {
55
+ function EuiTreeView(props,
56
+ // Without the optional ? typing, TS will throw errors on JSX component errors
57
+ // @see https://github.com/facebook/react/issues/13944#issuecomment-1183693239
58
+ context) {
54
59
  var _this;
55
60
  (0, _classCallCheck2.default)(this, EuiTreeView);
61
+ // TODO: context in constructor has been deprecated.
62
+ // We should likely convert this to a function component
56
63
  _this = _super.call(this, props, context);
57
64
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "treeIdGenerator", (0, _services.htmlIdGenerator)('euiTreeView'));
58
65
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isNested", void 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "92.0.0",
4
+ "version": "92.1.1",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -17,18 +17,19 @@
17
17
  align-items: center;
18
18
  display: flex;
19
19
 
20
- &:focus {
20
+ // Workaround for focus trap
21
+ & > [data-focus-lock-disabled] {
22
+ width: 100%;
23
+ }
24
+
25
+ &:focus,
26
+ &--hasColumnActions:focus-within,
27
+ &--isActionsPopoverOpen {
21
28
  @include euiDataGridCellFocus;
22
- border-top: none;
23
29
  }
24
30
 
25
31
  // We only truncate if the cell is not a control column.
26
32
  &:not(.euiDataGridHeaderCell--controlColumn) {
27
- &:focus-within {
28
- @include euiDataGridCellFocus;
29
- border-top: none;
30
- }
31
-
32
33
  .euiDataGridHeaderCell__button {
33
34
  position: relative;
34
35
  display: flex;
@@ -29,7 +29,7 @@ var EuiAspectRatio = function EuiAspectRatio(_ref) {
29
29
  style = _ref.style,
30
30
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
31
31
  var classes = (0, _classnames.default)('euiAspectRatio', className);
32
- var euiAspectRatioStyle = _objectSpread({
32
+ var euiAspectRatioStyle = _objectSpread(_objectSpread({}, children.props.style), {}, {
33
33
  aspectRatio: "".concat(width, " / ").concat(height),
34
34
  height: 'auto',
35
35
  width: '100%',
@@ -16,7 +16,7 @@ var _context = require("./context");
16
16
  var _collapsible_nav_body_footer = require("./collapsible_nav_body_footer.styles");
17
17
  var _react2 = require("@emotion/react");
18
18
  var _excluded = ["className"],
19
- _excluded2 = ["className"];
19
+ _excluded2 = ["className", "children"];
20
20
  /*
21
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
22
  * or more contributor license agreements. Licensed under the Elastic License
@@ -53,6 +53,7 @@ var EuiCollapsibleNavBody = function EuiCollapsibleNavBody(_ref) {
53
53
  exports.EuiCollapsibleNavBody = EuiCollapsibleNavBody;
54
54
  var EuiCollapsibleNavFooter = function EuiCollapsibleNavFooter(_ref2) {
55
55
  var className = _ref2.className,
56
+ children = _ref2.children,
56
57
  props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
57
58
  var classes = (0, _classnames.default)('euiCollapsibleNav__footer', className);
58
59
  var _useContext2 = (0, _react.useContext)(_context.EuiCollapsibleNavContext),
@@ -60,10 +61,13 @@ var EuiCollapsibleNavFooter = function EuiCollapsibleNavFooter(_ref2) {
60
61
  isPush = _useContext2.isPush;
61
62
  var euiTheme = (0, _services.useEuiTheme)();
62
63
  var styles = (0, _collapsible_nav_body_footer.euiCollapsibleNavFooterStyles)(euiTheme);
63
- var cssStyles = [styles.euiCollapsibleNav__footer, isCollapsed && isPush && styles.isPushCollapsed];
64
+ var cssStyles = styles.euiCollapsibleNav__footer;
65
+ var overflowWrapperStyles = [styles.euiFlyoutFooter__overflow, isCollapsed && isPush && styles.isPushCollapsed];
64
66
  return (0, _react2.jsx)(_flyout.EuiFlyoutFooter, (0, _extends2.default)({
65
67
  className: classes,
66
68
  css: cssStyles
67
- }, props));
69
+ }, props), (0, _react2.jsx)("div", {
70
+ css: overflowWrapperStyles
71
+ }, children));
68
72
  };
69
73
  exports.EuiCollapsibleNavFooter = EuiCollapsibleNavFooter;
@@ -19,17 +19,17 @@ var _global_styling = require("../../global_styling");
19
19
  var hideScrollbars = "\n scrollbar-width: none; /* Firefox */\n\n &::-webkit-scrollbar {\n display: none; /* Chrome, Edge, & Safari */\n }\n";
20
20
  exports.hideScrollbars = hideScrollbars;
21
21
  var euiCollapsibleNavBodyStyles = {
22
- // In case things get really dire responsively, ensure the footer doesn't overtake the body
23
- euiCollapsibleNav__body: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-height', '50%'), ";;label:euiCollapsibleNav__body;"),
22
+ euiCollapsibleNav__body: /*#__PURE__*/(0, _react.css)(";label:euiCollapsibleNav__body;"),
24
23
  isPushCollapsed: /*#__PURE__*/(0, _react.css)(".euiFlyoutBody__overflow{", hideScrollbars, ";};label:isPushCollapsed;")
25
24
  };
26
25
  exports.euiCollapsibleNavBodyStyles = euiCollapsibleNavBodyStyles;
27
26
  var euiCollapsibleNavFooterStyles = function euiCollapsibleNavFooterStyles(euiThemeContext) {
28
27
  var euiTheme = euiThemeContext.euiTheme;
29
28
  return {
30
- euiCollapsibleNav__footer: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), " ", (0, _global_styling.euiYScrollWithShadows)(euiThemeContext, {
29
+ euiCollapsibleNav__footer: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '50%'), " background-color:", euiTheme.colors.emptyShade, ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";;label:euiCollapsibleNav__footer;"),
30
+ euiFlyoutFooter__overflow: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext, {
31
31
  side: 'end'
32
- }), ";;label:euiCollapsibleNav__footer;"),
32
+ }), ";;label:euiFlyoutFooter__overflow;"),
33
33
  isPushCollapsed: /*#__PURE__*/(0, _react.css)(hideScrollbars, ";;label:isPushCollapsed;")
34
34
  };
35
35
  };
@@ -19,17 +19,16 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
19
  var _propTypes = _interopRequireDefault(require("prop-types"));
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
  var _reactDom = require("react-dom");
22
- var _tabbable = require("tabbable");
23
- var _services = require("../../../services");
24
- var _accessibility = require("../../accessibility");
25
- var _focus_trap = require("../../focus_trap");
26
- var _i18n = require("../../i18n");
27
- var _text_truncate = require("../../text_truncate");
28
- var _resize_observer = require("../../observer/resize_observer/resize_observer");
29
- var _focus = require("../utils/focus");
22
+ var _utils = require("../../../../utils");
23
+ var _services = require("../../../../services");
24
+ var _accessibility = require("../../../accessibility");
25
+ var _i18n = require("../../../i18n");
26
+ var _text_truncate = require("../../../text_truncate");
27
+ var _resize_observer = require("../../../observer/resize_observer/resize_observer");
28
+ var _focus = require("../../utils/focus");
30
29
  var _data_grid_cell_actions = require("./data_grid_cell_actions");
31
30
  var _data_grid_cell_popover = require("./data_grid_cell_popover");
32
- var _utils = require("../../../utils");
31
+ var _focus_utils = require("./focus_utils");
33
32
  var _react2 = require("@emotion/react");
34
33
  var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
35
34
  _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
@@ -95,7 +94,10 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
95
94
  col: colIndex + 1,
96
95
  row: ariaRowIndex
97
96
  }
98
- })));
97
+ }), cellActions && (0, _react2.jsx)(_react.default.Fragment, null, '. ', (0, _react2.jsx)(_i18n.EuiI18n, {
98
+ token: "euiDataGridCell.expansionEnterPrompt",
99
+ default: "Press the Enter key to expand this cell."
100
+ }))));
99
101
  return (0, _react2.jsx)(_react.default.Fragment, null, cellContent, screenReaderText, cellActions);
100
102
  });
101
103
  EuiDataGridCellContent.propTypes = {
@@ -598,43 +600,21 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
598
600
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
599
601
  cellProps: {},
600
602
  isFocused: false,
601
- isEntered: false,
602
- enableInteractions: false,
603
- disableCellTabIndex: false,
603
+ isHovered: false,
604
604
  cellTextAlign: 'Left'
605
605
  });
606
606
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "unsubscribeCell", void 0);
607
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusTimeout", void 0);
608
607
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "style", null);
609
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getInteractables", function () {
610
- var tabbingRef = _this.cellContentsRef;
611
- if (tabbingRef) {
612
- return tabbingRef.querySelectorAll('[data-datagrid-interactable=true]');
613
- }
614
- return [];
608
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateCellFocusContext", function () {
609
+ _this.context.setFocusedCell([_this.props.colIndex, _this.props.visibleRowIndex]);
615
610
  });
616
611
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "takeFocus", function (preventScroll) {
617
612
  var cell = _this.cellRef.current;
618
- if (cell) {
619
- // only update focus if we are not already focused on something in this cell
620
- var element = document.activeElement;
621
- while (element != null && element !== cell) {
622
- element = element.parentElement;
623
- }
624
- var doFocusUpdate = element !== cell;
625
- if (doFocusUpdate) {
626
- var interactables = _this.getInteractables();
627
- if (_this.isExpandable() === false && interactables.length === 1) {
628
- // Only one element can be interacted with
629
- interactables[0].focus({
630
- preventScroll: preventScroll
631
- });
632
- } else {
633
- cell.focus({
634
- preventScroll: preventScroll
635
- });
636
- }
637
- }
613
+ // Only focus the cell if not already focused on something in the cell
614
+ if (cell && !cell.contains(document.activeElement)) {
615
+ cell.focus({
616
+ preventScroll: preventScroll
617
+ });
638
618
  }
639
619
  });
640
620
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recalculateAutoHeight", function () {
@@ -703,61 +683,8 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
703
683
  } else if (_this.contentObserver) {
704
684
  _this.contentObserver.disconnect();
705
685
  }
706
- _this.preventTabbing();
707
686
  _this.setCellTextAlign();
708
687
  });
709
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onFocus", function (e) {
710
- // only perform this logic when the event's originating element (e.target) is
711
- // the wrapping element with the onFocus logic
712
- // reasons:
713
- // * the outcome is only meaningful when the focus shifts to the wrapping element
714
- // * if the cell children include portalled content React will bubble the focus
715
- // event up, which can trigger the focus() call below, causing focus lock fighting
716
- if (_this.cellRef.current === e.target) {
717
- var _this$props5 = _this.props,
718
- colIndex = _this$props5.colIndex,
719
- visibleRowIndex = _this$props5.visibleRowIndex;
720
- // focus in next tick to give potential focus capturing mechanisms time to release their traps
721
- // also clear any previous focus timeout that may still be queued
722
- if (EuiDataGridCell.activeFocusTimeoutId) {
723
- window.clearTimeout(EuiDataGridCell.activeFocusTimeoutId);
724
- }
725
- EuiDataGridCell.activeFocusTimeoutId = _this.focusTimeout = window.setTimeout(function () {
726
- _this.context.setFocusedCell([colIndex, visibleRowIndex]);
727
- var interactables = _this.getInteractables();
728
- if (interactables.length === 1 && _this.isExpandable() === false) {
729
- interactables[0].focus();
730
- _this.setState({
731
- disableCellTabIndex: true
732
- });
733
- }
734
- }, 0);
735
- }
736
- });
737
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onBlur", function () {
738
- _this.setState({
739
- disableCellTabIndex: false
740
- });
741
- });
742
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "preventTabbing", function () {
743
- if (_this.cellContentsRef) {
744
- var tabbables = (0, _tabbable.tabbable)(_this.cellContentsRef);
745
- for (var i = 0; i < tabbables.length; i++) {
746
- var element = tabbables[i];
747
- element.setAttribute('tabIndex', '-1');
748
- element.setAttribute('data-datagrid-interactable', 'true');
749
- }
750
- }
751
- });
752
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "enableTabbing", function () {
753
- if (_this.cellContentsRef) {
754
- var interactables = _this.getInteractables();
755
- for (var i = 0; i < interactables.length; i++) {
756
- var element = interactables[i];
757
- element.removeAttribute('tabIndex');
758
- }
759
- }
760
- });
761
688
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setCellTextAlign", function () {
762
689
  if (_this.cellContentsRef) {
763
690
  var columnType = _this.props.columnType;
@@ -810,14 +737,14 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
810
737
  setPopoverAnchorPosition("down".concat(_this.state.cellTextAlign));
811
738
 
812
739
  // Set popover contents with cell content
813
- var _this$props6 = _this.props,
814
- renderCellPopover = _this$props6.renderCellPopover,
815
- renderCellValue = _this$props6.renderCellValue,
816
- rowIndex = _this$props6.rowIndex,
817
- colIndex = _this$props6.colIndex,
818
- column = _this$props6.column,
819
- columnId = _this$props6.columnId,
820
- columnType = _this$props6.columnType;
740
+ var _this$props5 = _this.props,
741
+ renderCellPopover = _this$props5.renderCellPopover,
742
+ renderCellValue = _this$props5.renderCellValue,
743
+ rowIndex = _this$props5.rowIndex,
744
+ colIndex = _this$props5.colIndex,
745
+ column = _this$props5.column,
746
+ columnId = _this$props5.columnId,
747
+ columnType = _this$props5.columnType;
821
748
  var PopoverElement = renderCellPopover || _data_grid_cell_popover.DefaultCellPopover;
822
749
  var CellElement = renderCellValue;
823
750
  var sharedProps = {
@@ -842,14 +769,59 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
842
769
  setPopoverContent(popoverContent);
843
770
  }
844
771
  });
772
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCellKeyDown", function (event) {
773
+ if (_this.isExpandable()) {
774
+ if (_this.isPopoverOpen()) return;
775
+ var _this$props6 = _this.props,
776
+ openCellPopover = _this$props6.popoverContext.openCellPopover,
777
+ visibleRowIndex = _this$props6.visibleRowIndex,
778
+ colIndex = _this$props6.colIndex;
779
+ switch (event.key) {
780
+ case _services.keys.ENTER:
781
+ case _services.keys.F2:
782
+ event.preventDefault();
783
+ openCellPopover({
784
+ rowIndex: visibleRowIndex,
785
+ colIndex: colIndex
786
+ });
787
+ break;
788
+ }
789
+ }
790
+ });
791
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCellExpansionClick", function () {
792
+ var _this$props7 = _this.props,
793
+ _this$props7$popoverC = _this$props7.popoverContext,
794
+ openCellPopover = _this$props7$popoverC.openCellPopover,
795
+ closeCellPopover = _this$props7$popoverC.closeCellPopover,
796
+ visibleRowIndex = _this$props7.visibleRowIndex,
797
+ colIndex = _this$props7.colIndex;
798
+ if (_this.isPopoverOpen()) {
799
+ closeCellPopover();
800
+ } else {
801
+ openCellPopover({
802
+ rowIndex: visibleRowIndex,
803
+ colIndex: colIndex
804
+ });
805
+ }
806
+ });
807
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMouseEnter", function () {
808
+ return _this.setState({
809
+ isHovered: true
810
+ });
811
+ });
812
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMouseLeave", function () {
813
+ return _this.setState({
814
+ isHovered: false
815
+ });
816
+ });
845
817
  return _this;
846
818
  }
847
819
  (0, _createClass2.default)(EuiDataGridCell, [{
848
820
  key: "componentDidMount",
849
821
  value: function componentDidMount() {
850
- var _this$props7 = this.props,
851
- colIndex = _this$props7.colIndex,
852
- visibleRowIndex = _this$props7.visibleRowIndex;
822
+ var _this$props8 = this.props,
823
+ colIndex = _this$props8.colIndex,
824
+ visibleRowIndex = _this$props8.visibleRowIndex;
853
825
  this.unsubscribeCell = this.context.onFocusUpdate([colIndex, visibleRowIndex], this.onFocusUpdate);
854
826
 
855
827
  // Account for virtualization - when a cell unmounts when scrolled out of view
@@ -868,7 +840,6 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
868
840
  }, {
869
841
  key: "componentWillUnmount",
870
842
  value: function componentWillUnmount() {
871
- window.clearTimeout(this.focusTimeout);
872
843
  if (this.unsubscribeCell) {
873
844
  this.unsubscribeCell();
874
845
  }
@@ -935,39 +906,33 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
935
906
  if (nextProps.style.width !== this.props.style.width) return true;
936
907
  }
937
908
  if (nextState.cellProps !== this.state.cellProps) return true;
938
- if (nextState.isEntered !== this.state.isEntered) return true;
939
909
  if (nextState.isFocused !== this.state.isFocused) return true;
940
- if (nextState.enableInteractions !== this.state.enableInteractions) return true;
941
- if (nextState.disableCellTabIndex !== this.state.disableCellTabIndex) return true;
910
+ if (nextState.isHovered !== this.state.isHovered) return true;
942
911
  return false;
943
912
  }
944
913
  }, {
945
914
  key: "render",
946
915
  value: function render() {
947
- var _classNames,
948
- _rowHeightsOptions$li,
949
- _this2 = this;
950
- var _this$props8 = this.props,
951
- width = _this$props8.width,
952
- _this$props8$popoverC = _this$props8.popoverContext,
953
- closeCellPopover = _this$props8$popoverC.closeCellPopover,
954
- openCellPopover = _this$props8$popoverC.openCellPopover,
955
- interactiveCellId = _this$props8.interactiveCellId,
956
- columnType = _this$props8.columnType,
957
- className = _this$props8.className,
958
- column = _this$props8.column,
959
- style = _this$props8.style,
960
- rowHeightUtils = _this$props8.rowHeightUtils,
961
- rowHeightsOptions = _this$props8.rowHeightsOptions,
962
- rowManager = _this$props8.rowManager,
963
- pagination = _this$props8.pagination,
964
- rest = (0, _objectWithoutProperties2.default)(_this$props8, _excluded2);
916
+ var _classNames, _rowHeightsOptions$li;
917
+ var _this$props9 = this.props,
918
+ width = _this$props9.width,
919
+ popoverContext = _this$props9.popoverContext,
920
+ interactiveCellId = _this$props9.interactiveCellId,
921
+ columnType = _this$props9.columnType,
922
+ className = _this$props9.className,
923
+ column = _this$props9.column,
924
+ style = _this$props9.style,
925
+ rowHeightUtils = _this$props9.rowHeightUtils,
926
+ rowHeightsOptions = _this$props9.rowHeightsOptions,
927
+ rowManager = _this$props9.rowManager,
928
+ pagination = _this$props9.pagination,
929
+ rest = (0, _objectWithoutProperties2.default)(_this$props9, _excluded2);
965
930
  var rowIndex = rest.rowIndex,
966
931
  visibleRowIndex = rest.visibleRowIndex,
967
932
  colIndex = rest.colIndex;
968
933
  var isExpandable = this.isExpandable();
969
934
  var popoverIsOpen = this.isPopoverOpen();
970
- var showCellActions = this.state.isFocused || this.state.isEntered || this.state.enableInteractions || popoverIsOpen;
935
+ var showCellActions = isExpandable && (popoverIsOpen || this.state.isFocused || this.state.isHovered);
971
936
  var cellClasses = (0, _classnames.default)('euiDataGridRowCell', "euiDataGridRowCell--align".concat(this.state.cellTextAlign), (_classNames = {}, (0, _defineProperty2.default)(_classNames, "euiDataGridRowCell--".concat(columnType), columnType), (0, _defineProperty2.default)(_classNames, 'euiDataGridRowCell--open', popoverIsOpen), _classNames), className);
972
937
  var ariaRowIndex = pagination ? visibleRowIndex + 1 + pagination.pageSize * pagination.pageIndex : visibleRowIndex + 1;
973
938
  var _this$state$cellProps2 = this.state.cellProps,
@@ -988,68 +953,6 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
988
953
  // column width, can be undefined
989
954
  lineHeight: (_rowHeightsOptions$li = rowHeightsOptions === null || rowHeightsOptions === void 0 ? void 0 : rowHeightsOptions.lineHeight) !== null && _rowHeightsOptions$li !== void 0 ? _rowHeightsOptions$li : undefined
990
955
  }, cellPropsStyle);
991
- var handleCellKeyDown = function handleCellKeyDown(event) {
992
- if (isExpandable) {
993
- if (popoverIsOpen) {
994
- return;
995
- }
996
- switch (event.key) {
997
- case _services.keys.ENTER:
998
- case _services.keys.F2:
999
- event.preventDefault();
1000
- openCellPopover({
1001
- rowIndex: visibleRowIndex,
1002
- colIndex: colIndex
1003
- });
1004
- break;
1005
- }
1006
- } else {
1007
- if (event.key === _services.keys.ENTER || event.key === _services.keys.F2 || event.key === _services.keys.ESCAPE) {
1008
- var interactables = _this2.getInteractables();
1009
- if (interactables.length >= 2) {
1010
- switch (event.key) {
1011
- case _services.keys.ENTER:
1012
- // `Enter` only activates the trap
1013
- if (_this2.state.isEntered === false) {
1014
- _this2.enableTabbing();
1015
- _this2.setState({
1016
- isEntered: true
1017
- });
1018
-
1019
- // result of this keypress is focus shifts to the first interactive element
1020
- // and then the browser fires the onClick event because that's how [Enter] works
1021
- // so we need to prevent that default action otherwise entering the trap triggers the first element
1022
- event.preventDefault();
1023
- }
1024
- break;
1025
- case _services.keys.F2:
1026
- // toggle interactives' focus trap
1027
- _this2.setState(function (_ref2) {
1028
- var isEntered = _ref2.isEntered;
1029
- if (isEntered) {
1030
- _this2.preventTabbing();
1031
- } else {
1032
- _this2.enableTabbing();
1033
- }
1034
- return {
1035
- isEntered: !isEntered
1036
- };
1037
- });
1038
- break;
1039
- case _services.keys.ESCAPE:
1040
- // `Escape` only de-activates the trap
1041
- _this2.preventTabbing();
1042
- if (_this2.state.isEntered === true) {
1043
- _this2.setState({
1044
- isEntered: false
1045
- });
1046
- }
1047
- break;
1048
- }
1049
- }
1050
- }
1051
- }
1052
- };
1053
956
  var rowHeight = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
1054
957
  var cellContentProps = _objectSpread(_objectSpread({}, rest), {}, {
1055
958
  setCellProps: this.setCellProps,
@@ -1065,40 +968,10 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
1065
968
  isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
1066
969
  ariaRowIndex: ariaRowIndex
1067
970
  });
1068
- var cellActions = showCellActions && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
1069
- rowIndex: rowIndex,
1070
- colIndex: colIndex,
1071
- column: column,
1072
- onExpandClick: function onExpandClick() {
1073
- if (popoverIsOpen) {
1074
- closeCellPopover();
1075
- } else {
1076
- openCellPopover({
1077
- rowIndex: visibleRowIndex,
1078
- colIndex: colIndex
1079
- });
1080
- }
1081
- }
1082
- }), (0, _react2.jsx)("div", {
1083
- ref: this.popoverAnchorRef,
1084
- "data-test-subject": "cellPopoverAnchor"
1085
- }));
1086
- var cellContent = isExpandable ? (0, _react2.jsx)(EuiDataGridCellContent, (0, _extends2.default)({}, cellContentProps, {
1087
- cellActions: cellActions
1088
- })) : (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
1089
- disabled: !this.state.isEntered,
1090
- autoFocus: true,
1091
- onDeactivation: function onDeactivation() {
1092
- _this2.setState({
1093
- isEntered: false
1094
- }, _this2.preventTabbing);
1095
- },
1096
- clickOutsideDisables: true
1097
- }, (0, _react2.jsx)(EuiDataGridCellContent, cellContentProps));
1098
971
  var cell = (0, _react2.jsx)("div", (0, _extends2.default)({
1099
972
  role: "gridcell",
1100
973
  "aria-rowindex": ariaRowIndex,
1101
- tabIndex: this.state.isFocused && !this.state.disableCellTabIndex ? 0 : -1,
974
+ tabIndex: this.state.isFocused ? 0 : -1,
1102
975
  ref: this.cellRef
1103
976
  }, cellProps, {
1104
977
  "data-test-subj": "dataGridRowCell"
@@ -1112,20 +985,24 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
1112
985
  ,
1113
986
  "data-gridcell-visible-row-index": this.props.visibleRowIndex // Affected by sorting & pagination
1114
987
  ,
1115
- onKeyDown: handleCellKeyDown,
1116
- onFocus: this.onFocus,
1117
- onMouseEnter: function onMouseEnter() {
1118
- _this2.setState({
1119
- enableInteractions: true
1120
- });
1121
- },
1122
- onMouseLeave: function onMouseLeave() {
1123
- _this2.setState({
1124
- enableInteractions: false
1125
- });
1126
- },
1127
- onBlur: this.onBlur
1128
- }), cellContent);
988
+ onKeyDown: this.handleCellKeyDown,
989
+ onMouseEnter: this.onMouseEnter,
990
+ onMouseLeave: this.onMouseLeave
991
+ }), (0, _react2.jsx)(_focus_utils.HandleInteractiveChildren, {
992
+ cellEl: this.cellRef.current,
993
+ updateCellFocusContext: this.updateCellFocusContext,
994
+ renderFocusTrap: !isExpandable
995
+ }, (0, _react2.jsx)(EuiDataGridCellContent, (0, _extends2.default)({}, cellContentProps, {
996
+ cellActions: showCellActions && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
997
+ rowIndex: rowIndex,
998
+ colIndex: colIndex,
999
+ column: column,
1000
+ onExpandClick: this.handleCellExpansionClick
1001
+ }), (0, _react2.jsx)("div", {
1002
+ ref: this.popoverAnchorRef,
1003
+ "data-test-subject": "cellPopoverAnchor"
1004
+ }))
1005
+ }))));
1129
1006
  return rowManager && !_utils.IS_JEST_ENVIRONMENT ? /*#__PURE__*/(0, _reactDom.createPortal)(cell, rowManager.getRow({
1130
1007
  rowIndex: rowIndex,
1131
1008
  visibleRowIndex: visibleRowIndex,
@@ -1138,16 +1015,6 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
1138
1015
  return EuiDataGridCell;
1139
1016
  }(_react.Component);
1140
1017
  exports.EuiDataGridCell = EuiDataGridCell;
1141
- // focus tracking is split between the entire grid & individual cells,
1142
- // the parent grid owns which cell is focused,
1143
- // but individual cells need to react to changes and also report that
1144
- // they are focused in response to user actions like clicking on the cell
1145
- // to avoid focus trap fighting, cells wait a tick after being clicked to allow
1146
- // any existing traps to disconnect before the cell reports the new focus state to the parent grid
1147
- // but because of this small delay, multiple cells could queue up focus and
1148
- // create an infinite loop as the cells activate->deactivate->...
1149
- // so we track the last timeout id and clear that request if superseded
1150
- (0, _defineProperty2.default)(EuiDataGridCell, "activeFocusTimeoutId", undefined);
1151
1018
  (0, _defineProperty2.default)(EuiDataGridCell, "contextType", _focus.DataGridFocusContext);
1152
1019
  EuiDataGridCell.propTypes = {
1153
1020
  rowIndex: _propTypes.default.number.isRequired,