@elastic/eui 88.5.4 → 89.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 (206) hide show
  1. package/dist/eui_theme_dark.css +26 -526
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +26 -526
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +7 -2
  6. package/es/components/basic_table/in_memory_table.js +7 -2
  7. package/es/components/collapsible_nav/collapsible_nav.js +5 -0
  8. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  9. package/es/components/color_picker/index.js +0 -4
  10. package/es/components/combo_box/combo_box.js +142 -304
  11. package/es/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  12. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +34 -118
  13. package/es/components/context_menu/context_menu_panel.js +6 -6
  14. package/es/components/flex/flex_grid.styles.js +1 -1
  15. package/es/components/flex/flex_group.styles.js +1 -1
  16. package/es/components/flyout/flyout.js +32 -33
  17. package/es/components/flyout/flyout.styles.js +13 -3
  18. package/es/components/form/range/dual_range.js +4 -0
  19. package/es/components/form/range/range.js +4 -0
  20. package/es/components/index.js +0 -1
  21. package/es/components/popover/input_popover.js +47 -3
  22. package/es/components/popover/popover.js +2 -2
  23. package/es/components/table/table_row_cell.js +27 -9
  24. package/es/components/text_truncate/index.js +1 -0
  25. package/es/components/text_truncate/text_block_truncate.js +78 -0
  26. package/es/global_styling/reset/global_styles.js +16 -2
  27. package/es/services/accessibility/index.js +0 -3
  28. package/es/services/index.js +1 -1
  29. package/es/test/rtl/component_helpers.d.ts +2 -0
  30. package/es/test/rtl/component_helpers.js +29 -1
  31. package/eui.d.ts +375 -667
  32. package/i18ntokens.json +52 -286
  33. package/lib/components/basic_table/basic_table.js +7 -2
  34. package/lib/components/basic_table/in_memory_table.js +7 -2
  35. package/lib/components/collapsible_nav/collapsible_nav.js +5 -0
  36. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  37. package/lib/components/color_picker/index.js +0 -7
  38. package/lib/components/combo_box/combo_box.js +141 -303
  39. package/lib/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  40. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +34 -118
  41. package/lib/components/context_menu/context_menu_panel.js +5 -5
  42. package/lib/components/flex/flex_grid.styles.js +1 -1
  43. package/lib/components/flex/flex_group.styles.js +1 -1
  44. package/lib/components/flyout/flyout.js +31 -32
  45. package/lib/components/flyout/flyout.styles.js +19 -10
  46. package/lib/components/form/range/dual_range.js +4 -0
  47. package/lib/components/index.js +0 -11
  48. package/lib/components/popover/input_popover.js +48 -3
  49. package/lib/components/popover/popover.js +1 -1
  50. package/lib/components/table/table_row_cell.js +26 -8
  51. package/lib/components/text_truncate/index.js +7 -0
  52. package/lib/components/text_truncate/text_block_truncate.js +85 -0
  53. package/lib/global_styling/reset/global_styles.js +16 -2
  54. package/lib/services/accessibility/index.js +0 -21
  55. package/lib/services/index.js +0 -21
  56. package/lib/test/rtl/component_helpers.d.ts +2 -0
  57. package/lib/test/rtl/component_helpers.js +31 -2
  58. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  59. package/optimize/es/components/color_picker/index.js +0 -4
  60. package/optimize/es/components/combo_box/combo_box.js +137 -304
  61. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +0 -12
  62. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +28 -107
  63. package/optimize/es/components/context_menu/context_menu_panel.js +6 -6
  64. package/optimize/es/components/flex/flex_grid.styles.js +1 -1
  65. package/optimize/es/components/flex/flex_group.styles.js +1 -1
  66. package/optimize/es/components/flyout/flyout.js +32 -33
  67. package/optimize/es/components/flyout/flyout.styles.js +13 -3
  68. package/optimize/es/components/index.js +0 -1
  69. package/optimize/es/components/popover/input_popover.js +43 -3
  70. package/optimize/es/components/popover/popover.js +2 -2
  71. package/optimize/es/components/table/table_row_cell.js +13 -5
  72. package/optimize/es/components/text_truncate/index.js +1 -0
  73. package/optimize/es/components/text_truncate/text_block_truncate.js +58 -0
  74. package/optimize/es/global_styling/reset/global_styles.js +13 -2
  75. package/optimize/es/services/accessibility/index.js +0 -3
  76. package/optimize/es/services/index.js +1 -1
  77. package/optimize/es/test/rtl/component_helpers.d.ts +2 -0
  78. package/optimize/es/test/rtl/component_helpers.js +29 -1
  79. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  80. package/optimize/lib/components/color_picker/index.js +0 -7
  81. package/optimize/lib/components/combo_box/combo_box.js +136 -303
  82. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +0 -12
  83. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +28 -107
  84. package/optimize/lib/components/context_menu/context_menu_panel.js +5 -5
  85. package/optimize/lib/components/flex/flex_grid.styles.js +1 -1
  86. package/optimize/lib/components/flex/flex_group.styles.js +1 -1
  87. package/optimize/lib/components/flyout/flyout.js +31 -32
  88. package/optimize/lib/components/flyout/flyout.styles.js +19 -10
  89. package/optimize/lib/components/index.js +0 -11
  90. package/optimize/lib/components/popover/input_popover.js +44 -3
  91. package/optimize/lib/components/popover/popover.js +1 -1
  92. package/optimize/lib/components/table/table_row_cell.js +12 -4
  93. package/optimize/lib/components/text_truncate/index.js +7 -0
  94. package/optimize/lib/components/text_truncate/text_block_truncate.js +66 -0
  95. package/optimize/lib/global_styling/reset/global_styles.js +19 -10
  96. package/optimize/lib/services/accessibility/index.js +0 -21
  97. package/optimize/lib/services/index.js +0 -21
  98. package/optimize/lib/test/rtl/component_helpers.d.ts +2 -0
  99. package/optimize/lib/test/rtl/component_helpers.js +31 -2
  100. package/package.json +1 -1
  101. package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +5 -15
  102. package/src/components/context_menu/_context_menu_panel.scss +4 -0
  103. package/src/components/index.scss +0 -1
  104. package/src/global_styling/mixins/_index.scss +0 -1
  105. package/src/global_styling/variables/_index.scss +0 -1
  106. package/src/test/README.md +0 -15
  107. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -1
  108. package/test-env/components/basic_table/basic_table.js +7 -2
  109. package/test-env/components/basic_table/in_memory_table.js +7 -2
  110. package/test-env/components/collapsible_nav/collapsible_nav.js +5 -0
  111. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  112. package/test-env/components/color_picker/index.js +0 -7
  113. package/test-env/components/combo_box/combo_box.js +141 -303
  114. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  115. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +33 -117
  116. package/test-env/components/context_menu/context_menu_panel.js +5 -5
  117. package/test-env/components/flex/flex_grid.styles.js +1 -1
  118. package/test-env/components/flex/flex_group.styles.js +1 -1
  119. package/test-env/components/flyout/flyout.styles.js +19 -10
  120. package/test-env/components/form/range/dual_range.js +4 -0
  121. package/test-env/components/index.js +0 -11
  122. package/test-env/components/popover/input_popover.js +48 -3
  123. package/test-env/components/popover/popover.js +1 -1
  124. package/test-env/components/table/table_row_cell.js +26 -8
  125. package/test-env/components/text_truncate/index.js +7 -0
  126. package/test-env/components/text_truncate/text_block_truncate.js +82 -0
  127. package/test-env/global_styling/reset/global_styles.js +19 -10
  128. package/test-env/services/accessibility/index.js +0 -21
  129. package/test-env/services/index.js +0 -21
  130. package/test-env/test/rtl/component_helpers.js +31 -2
  131. package/es/components/color_picker/color_stops/color_stop_thumb.js +0 -371
  132. package/es/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -55
  133. package/es/components/color_picker/color_stops/color_stops.js +0 -499
  134. package/es/components/color_picker/color_stops/color_stops.styles.js +0 -61
  135. package/es/components/color_picker/color_stops/index.js +0 -9
  136. package/es/components/color_picker/color_stops/utils.js +0 -95
  137. package/es/components/suggest/index.js +0 -10
  138. package/es/components/suggest/suggest.a11y.js +0 -70
  139. package/es/components/suggest/suggest.js +0 -347
  140. package/es/components/suggest/suggest_item.js +0 -123
  141. package/es/components/suggest/types.js +0 -9
  142. package/es/services/accessibility/accessible_click_keys.js +0 -17
  143. package/es/services/accessibility/cascading_menu_keys.js +0 -28
  144. package/es/services/accessibility/combo_box_keys.js +0 -25
  145. package/lib/components/color_picker/color_stops/color_stop_thumb.js +0 -380
  146. package/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  147. package/lib/components/color_picker/color_stops/color_stops.js +0 -505
  148. package/lib/components/color_picker/color_stops/color_stops.styles.js +0 -67
  149. package/lib/components/color_picker/color_stops/index.js +0 -12
  150. package/lib/components/color_picker/color_stops/utils.js +0 -108
  151. package/lib/components/suggest/index.js +0 -19
  152. package/lib/components/suggest/suggest.a11y.js +0 -73
  153. package/lib/components/suggest/suggest.js +0 -356
  154. package/lib/components/suggest/suggest_item.js +0 -130
  155. package/lib/components/suggest/types.js +0 -16
  156. package/lib/services/accessibility/accessible_click_keys.js +0 -21
  157. package/lib/services/accessibility/cascading_menu_keys.js +0 -35
  158. package/lib/services/accessibility/combo_box_keys.js +0 -32
  159. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.js +0 -329
  160. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -55
  161. package/optimize/es/components/color_picker/color_stops/color_stops.js +0 -444
  162. package/optimize/es/components/color_picker/color_stops/color_stops.styles.js +0 -61
  163. package/optimize/es/components/color_picker/color_stops/index.js +0 -9
  164. package/optimize/es/components/color_picker/color_stops/utils.js +0 -90
  165. package/optimize/es/components/suggest/index.js +0 -10
  166. package/optimize/es/components/suggest/suggest.a11y.js +0 -70
  167. package/optimize/es/components/suggest/suggest.js +0 -256
  168. package/optimize/es/components/suggest/suggest_item.js +0 -89
  169. package/optimize/es/components/suggest/types.js +0 -9
  170. package/optimize/es/services/accessibility/accessible_click_keys.js +0 -14
  171. package/optimize/es/services/accessibility/cascading_menu_keys.js +0 -28
  172. package/optimize/es/services/accessibility/combo_box_keys.js +0 -25
  173. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.js +0 -339
  174. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  175. package/optimize/lib/components/color_picker/color_stops/color_stops.js +0 -451
  176. package/optimize/lib/components/color_picker/color_stops/color_stops.styles.js +0 -67
  177. package/optimize/lib/components/color_picker/color_stops/index.js +0 -12
  178. package/optimize/lib/components/color_picker/color_stops/utils.js +0 -106
  179. package/optimize/lib/components/suggest/index.js +0 -19
  180. package/optimize/lib/components/suggest/suggest.a11y.js +0 -73
  181. package/optimize/lib/components/suggest/suggest.js +0 -266
  182. package/optimize/lib/components/suggest/suggest_item.js +0 -96
  183. package/optimize/lib/components/suggest/types.js +0 -16
  184. package/optimize/lib/services/accessibility/accessible_click_keys.js +0 -20
  185. package/optimize/lib/services/accessibility/cascading_menu_keys.js +0 -35
  186. package/optimize/lib/services/accessibility/combo_box_keys.js +0 -32
  187. package/src/components/suggest/_index.scss +0 -5
  188. package/src/components/suggest/_suggest_input.scss +0 -4
  189. package/src/components/suggest/_suggest_item.scss +0 -103
  190. package/src/components/suggest/_variables.scss +0 -13
  191. package/src/global_styling/mixins/_header.scss +0 -29
  192. package/src/global_styling/variables/_header.scss +0 -3
  193. package/test-env/components/color_picker/color_stops/color_stop_thumb.js +0 -372
  194. package/test-env/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  195. package/test-env/components/color_picker/color_stops/color_stops.js +0 -494
  196. package/test-env/components/color_picker/color_stops/color_stops.styles.js +0 -67
  197. package/test-env/components/color_picker/color_stops/index.js +0 -12
  198. package/test-env/components/color_picker/color_stops/utils.js +0 -106
  199. package/test-env/components/suggest/index.js +0 -19
  200. package/test-env/components/suggest/suggest.a11y.js +0 -73
  201. package/test-env/components/suggest/suggest.js +0 -348
  202. package/test-env/components/suggest/suggest_item.js +0 -129
  203. package/test-env/components/suggest/types.js +0 -16
  204. package/test-env/services/accessibility/accessible_click_keys.js +0 -20
  205. package/test-env/services/accessibility/cascading_menu_keys.js +0 -35
  206. package/test-env/services/accessibility/combo_box_keys.js +0 -32
@@ -72,12 +72,6 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
72
72
  inputWidth: inputWidth
73
73
  });
74
74
  });
75
- _defineProperty(_assertThisInitialized(_this), "updatePosition", function () {
76
- // Wait a beat for the DOM to update, since we depend on DOM elements' bounds.
77
- requestAnimationFrame(function () {
78
- _this.props.updatePosition();
79
- });
80
- });
81
75
  _defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
82
76
  _this.props.onFocus(event);
83
77
  _this.setState({
@@ -118,10 +112,6 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
118
112
  value: function componentDidUpdate(prevProps) {
119
113
  if (prevProps.searchValue !== this.props.searchValue) {
120
114
  this.updateInputSize(this.props.searchValue);
121
-
122
- // We need to update the position of everything if the user enters enough input to change
123
- // the size of the input.
124
- this.updatePosition();
125
115
  }
126
116
  }
127
117
  }, {
@@ -147,7 +137,6 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
147
137
  searchValue = _this$props3.searchValue,
148
138
  selectedOptions = _this$props3.selectedOptions,
149
139
  singleSelectionProp = _this$props3.singleSelection,
150
- toggleButtonRef = _this$props3.toggleButtonRef,
151
140
  value = _this$props3.value,
152
141
  prepend = _this$props3.prepend,
153
142
  append = _this$props3.append,
@@ -214,7 +203,6 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
214
203
  'data-test-subj': 'comboBoxToggleListButton',
215
204
  disabled: isDisabled,
216
205
  onClick: isListOpen && !isDisabled ? onCloseListClick : onOpenListClick,
217
- ref: toggleButtonRef,
218
206
  side: 'right',
219
207
  tabIndex: -1,
220
208
  type: 'arrowDown'
@@ -330,7 +318,6 @@ EuiComboBoxInput.propTypes = {
330
318
  asPlainText: _propTypes.default.bool
331
319
  }).isRequired]),
332
320
  toggleButtonRef: _propTypes.default.any,
333
- updatePosition: _propTypes.default.func.isRequired,
334
321
  value: _propTypes.default.string,
335
322
  prepend: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired).isRequired]),
336
323
  append: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired).isRequired]),
@@ -17,18 +17,19 @@ var _combo_box_title = require("./combo_box_title");
17
17
  var _i18n = require("../../i18n");
18
18
  var _filter_select_item = require("../../filter_group/filter_select_item");
19
19
  var _badge = require("../../badge");
20
- var _popover_panel = require("../../popover/popover_panel");
21
20
  var _text_truncate = require("../../text_truncate");
21
+ var _input_popover = require("../../popover/input_popover");
22
22
  var _react2 = require("@emotion/react");
23
- var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
24
- _excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "truncationProps", "listboxAriaLabel"];
23
+ var _excluded = ["children"],
24
+ _excluded2 = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
25
+ _excluded3 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "options", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "delimiter", "truncationProps", "listboxAriaLabel"];
25
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
27
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
29
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
29
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
30
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
31
31
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
32
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
32
33
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
33
34
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
34
35
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -66,43 +67,25 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
66
67
  args[_key] = arguments[_key];
67
68
  }
68
69
  _this = _super.call.apply(_super, [this].concat(args));
69
- _defineProperty(_assertThisInitialized(_this), "listRefInstance", null);
70
70
  _defineProperty(_assertThisInitialized(_this), "listRef", null);
71
- _defineProperty(_assertThisInitialized(_this), "listBoxRef", null);
72
- _defineProperty(_assertThisInitialized(_this), "updatePosition", function () {
73
- // Wait a beat for the DOM to update, since we depend on DOM elements' bounds.
74
- requestAnimationFrame(function () {
75
- _this.props.updatePosition(_this.listRefInstance);
76
- });
77
- });
78
- _defineProperty(_assertThisInitialized(_this), "closeListOnScroll", function (event) {
79
- // Close the list when a scroll event happens, but not if the scroll happened in the options list.
80
- // This mirrors Firefox's approach of auto-closing `select` elements onscroll.
81
- if (_this.listRefInstance && event.target && _this.listRefInstance.contains(event.target) === false) {
82
- _this.props.onCloseList(event);
83
- }
84
- });
85
- _defineProperty(_assertThisInitialized(_this), "listRefCallback", function (ref) {
86
- _this.props.listRef(ref);
87
- _this.listRefInstance = ref;
88
- });
89
71
  _defineProperty(_assertThisInitialized(_this), "setListRef", function (ref) {
90
72
  _this.listRef = ref;
91
73
  });
92
- _defineProperty(_assertThisInitialized(_this), "setListBoxRef", function (ref) {
93
- _this.listBoxRef = ref;
94
- if (ref) {
95
- ref.setAttribute('aria-label', _this.props.listboxAriaLabel);
96
- ref.setAttribute('id', _this.props.rootId('listbox'));
97
- ref.setAttribute('role', 'listbox');
98
- ref.setAttribute('tabIndex', '0');
99
- }
74
+ _defineProperty(_assertThisInitialized(_this), "ListInnerElement", function (_ref) {
75
+ var children = _ref.children,
76
+ rest = _objectWithoutProperties(_ref, _excluded);
77
+ return (0, _react2.jsx)("div", _extends({}, rest, {
78
+ "aria-label": _this.props.listboxAriaLabel,
79
+ id: _this.props.rootId('listbox'),
80
+ role: "listbox",
81
+ tabIndex: "0"
82
+ }), children);
100
83
  });
101
- _defineProperty(_assertThisInitialized(_this), "ListRow", function (_ref) {
84
+ _defineProperty(_assertThisInitialized(_this), "ListRow", function (_ref2) {
102
85
  var _option$key;
103
- var data = _ref.data,
104
- index = _ref.index,
105
- style = _ref.style;
86
+ var data = _ref2.data,
87
+ index = _ref2.index,
88
+ style = _ref2.style;
106
89
  var option = data[index];
107
90
  var key = option.key,
108
91
  isGroupLabelOption = option.isGroupLabelOption,
@@ -111,12 +94,11 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
111
94
  prepend = option.prepend,
112
95
  append = option.append,
113
96
  _truncationProps = option.truncationProps,
114
- rest = _objectWithoutProperties(option, _excluded);
97
+ rest = _objectWithoutProperties(option, _excluded2);
115
98
  var _this$props = _this.props,
116
99
  singleSelection = _this$props.singleSelection,
117
100
  selectedOptions = _this$props.selectedOptions,
118
101
  onOptionClick = _this$props.onOptionClick,
119
- optionRef = _this$props.optionRef,
120
102
  activeOptionIndex = _this$props.activeOptionIndex,
121
103
  renderOption = _this$props.renderOption,
122
104
  searchValue = _this$props.searchValue,
@@ -144,7 +126,6 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
144
126
  onOptionClick(option);
145
127
  }
146
128
  },
147
- ref: optionRef.bind(_assertThisInitialized(_this), index),
148
129
  isFocused: optionIsFocused,
149
130
  checked: checked,
150
131
  showIcons: singleSelection ? true : false,
@@ -203,51 +184,12 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
203
184
  return _this;
204
185
  }
205
186
  _createClass(EuiComboBoxOptionsList, [{
206
- key: "componentDidMount",
207
- value: function componentDidMount() {
208
- var _this2 = this;
209
- // Wait a frame, otherwise moving focus from one combo box to another will result in the class
210
- // being removed from the body.
211
- requestAnimationFrame(function () {
212
- document.body.classList.add('euiBody-hasPortalContent');
213
- });
214
- this.updatePosition();
215
- window.addEventListener('resize', this.updatePosition);
216
-
217
- // Firefox will trigger a scroll event in many common situations when the options list div is appended
218
- // to the DOM; in testing it was always within 100ms, but setting a timeout here for 500ms to be safe
219
- setTimeout(function () {
220
- window.addEventListener('scroll', _this2.closeListOnScroll, {
221
- passive: true,
222
- // for better performance as we won't call preventDefault
223
- capture: true // scroll events don't bubble, they must be captured instead
224
- });
225
- }, 500);
226
- }
227
- }, {
228
187
  key: "componentDidUpdate",
229
188
  value: function componentDidUpdate(prevProps) {
230
- var options = prevProps.options,
231
- selectedOptions = prevProps.selectedOptions,
232
- searchValue = prevProps.searchValue;
233
-
234
- // We don't compare matchingOptions because that will result in a loop.
235
- if (searchValue !== this.props.searchValue || options !== this.props.options || selectedOptions !== this.props.selectedOptions) {
236
- this.updatePosition();
237
- }
238
189
  if (this.listRef && typeof this.props.activeOptionIndex !== 'undefined' && this.props.activeOptionIndex !== prevProps.activeOptionIndex) {
239
190
  this.listRef.scrollToItem(this.props.activeOptionIndex, 'auto');
240
191
  }
241
192
  }
242
- }, {
243
- key: "componentWillUnmount",
244
- value: function componentWillUnmount() {
245
- document.body.classList.remove('euiBody-hasPortalContent');
246
- window.removeEventListener('resize', this.updatePosition);
247
- window.removeEventListener('scroll', this.closeListOnScroll, {
248
- capture: true
249
- });
250
- }
251
193
  }, {
252
194
  key: "render",
253
195
  value: function render() {
@@ -267,10 +209,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
267
209
  onOptionClick = _this$props2.onOptionClick,
268
210
  onOptionEnterKey = _this$props2.onOptionEnterKey,
269
211
  onScroll = _this$props2.onScroll,
270
- optionRef = _this$props2.optionRef,
271
212
  options = _this$props2.options,
272
- _this$props2$position = _this$props2.position,
273
- position = _this$props2$position === void 0 ? 'bottom' : _this$props2$position,
274
213
  renderOption = _this$props2.renderOption,
275
214
  rootId = _this$props2.rootId,
276
215
  rowHeight = _this$props2.rowHeight,
@@ -278,14 +217,10 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
278
217
  searchValue = _this$props2.searchValue,
279
218
  selectedOptions = _this$props2.selectedOptions,
280
219
  singleSelection = _this$props2.singleSelection,
281
- updatePosition = _this$props2.updatePosition,
282
- width = _this$props2.width,
283
220
  delimiter = _this$props2.delimiter,
284
- zIndex = _this$props2.zIndex,
285
- style = _this$props2.style,
286
221
  truncationProps = _this$props2.truncationProps,
287
222
  listboxAriaLabel = _this$props2.listboxAriaLabel,
288
- rest = _objectWithoutProperties(_this$props2, _excluded2);
223
+ rest = _objectWithoutProperties(_this$props2, _excluded3);
289
224
  var emptyStateContent;
290
225
  if (isLoading) {
291
226
  emptyStateContent = (0, _react2.jsx)(_flex.EuiFlexGroup, {
@@ -382,44 +317,30 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
382
317
  var numVisibleOptions = matchingOptions.length < 7 ? matchingOptions.length : 7;
383
318
  var height = numVisibleOptions * (rowHeight + 1); // Add one for the border
384
319
 
385
- // bounded by max-height of euiComboBoxOptionsList__rowWrap
320
+ // bounded by max-height of .euiComboBoxOptionsList
386
321
  var boundedHeight = height > 200 ? 200 : height;
387
322
  var optionsList = (0, _react2.jsx)(_reactWindow.FixedSizeList, {
323
+ className: "euiComboBoxOptionsList__virtualization",
388
324
  height: boundedHeight,
389
325
  onScroll: onScroll,
390
326
  itemCount: matchingOptions.length,
391
327
  itemSize: rowHeight,
392
328
  itemData: matchingOptions,
393
329
  ref: this.setListRef,
394
- innerRef: this.setListBoxRef,
395
- width: width
330
+ innerElementType: this.ListInnerElement,
331
+ width: this.context
396
332
  }, this.ListRow);
397
-
398
- /**
399
- * Reusing the EuiPopover__panel classes to help with consistency/maintenance.
400
- * But this should really be converted to user the popover component.
401
- */
402
- var classes = (0, _classnames.default)('euiComboBoxOptionsList');
403
- return (0, _react2.jsx)(_popover_panel.EuiPopoverPanel, _extends({
404
- paddingSize: "none",
405
- hasShadow: false,
406
- className: classes,
407
- panelRef: this.listRefCallback,
333
+ return (0, _react2.jsx)("div", _extends({
334
+ className: "euiComboBoxOptionsList",
408
335
  "data-test-subj": (0, _classnames.default)('comboBoxOptionsList', dataTestSubj),
409
- style: _objectSpread(_objectSpread({}, style), {}, {
410
- zIndex: zIndex
411
- }),
412
- isOpen: true,
413
- isAttached: true,
414
- position: position
415
- }, rest), (0, _react2.jsx)("div", {
416
- className: "euiComboBoxOptionsList__rowWrap"
417
- }, emptyState || optionsList));
336
+ ref: listRef
337
+ }, rest), emptyState || optionsList);
418
338
  }
419
339
  }]);
420
340
  return EuiComboBoxOptionsList;
421
341
  }(_react.Component);
422
342
  exports.EuiComboBoxOptionsList = EuiComboBoxOptionsList;
343
+ _defineProperty(EuiComboBoxOptionsList, "contextType", _input_popover.EuiInputPopoverWidthContext);
423
344
  _defineProperty(EuiComboBoxOptionsList, "defaultProps", {
424
345
  'data-test-subj': '',
425
346
  rowHeight: 29,
@@ -435,9 +356,9 @@ EuiComboBoxOptionsList.propTypes = {
435
356
  areAllOptionsSelected: _propTypes.default.bool,
436
357
  listboxAriaLabel: _propTypes.default.string.isRequired,
437
358
  /**
438
- * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
439
- * It won't show if there's no onCreateOption.
440
- */
359
+ * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
360
+ * It won't show if there's no onCreateOption.
361
+ */
441
362
  customOptionText: _propTypes.default.string,
442
363
  fullWidth: _propTypes.default.bool,
443
364
  getSelectedOptionForSearchValue: _propTypes.default.func,
@@ -476,10 +397,9 @@ EuiComboBoxOptionsList.propTypes = {
476
397
  onOptionClick: _propTypes.default.func,
477
398
  onOptionEnterKey: _propTypes.default.func,
478
399
  onScroll: _propTypes.default.any,
479
- optionRef: _propTypes.default.func.isRequired,
480
400
  /**
481
- * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
482
- */
401
+ * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
402
+ */
483
403
  options: _propTypes.default.arrayOf(_propTypes.default.shape({
484
404
  isGroupLabelOption: _propTypes.default.bool,
485
405
  label: _propTypes.default.string.isRequired,
@@ -507,7 +427,6 @@ EuiComboBoxOptionsList.propTypes = {
507
427
  "data-test-subj": _propTypes.default.string,
508
428
  css: _propTypes.default.any
509
429
  }).isRequired).isRequired,
510
- position: _propTypes.default.oneOf(["top", "bottom"]),
511
430
  renderOption: _propTypes.default.func,
512
431
  rootId: _propTypes.default.any.isRequired,
513
432
  rowHeight: _propTypes.default.number.isRequired,
@@ -540,12 +459,9 @@ EuiComboBoxOptionsList.propTypes = {
540
459
  "data-test-subj": _propTypes.default.string,
541
460
  css: _propTypes.default.any
542
461
  }).isRequired).isRequired,
543
- updatePosition: _propTypes.default.func.isRequired,
544
- width: _propTypes.default.number.isRequired,
545
462
  singleSelection: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
546
463
  asPlainText: _propTypes.default.bool
547
464
  }).isRequired]),
548
465
  delimiter: _propTypes.default.string,
549
- zIndex: _propTypes.default.number,
550
466
  truncationProps: _propTypes.default.any
551
467
  };
@@ -114,7 +114,7 @@ var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
114
114
  onClose = _this$props.onClose,
115
115
  showPreviousPanel = _this$props.showPreviousPanel;
116
116
  if (onClose && (items !== null && items !== void 0 && items.length || document.activeElement === _this.backButton || document.activeElement === _this.panel)) {
117
- if (event.key === _services.cascadingMenuKeys.ARROW_LEFT) {
117
+ if (event.key === _services.keys.ARROW_LEFT) {
118
118
  if (showPreviousPanel) {
119
119
  event.preventDefault();
120
120
  event.stopPropagation();
@@ -127,7 +127,7 @@ var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
127
127
  }
128
128
  if (items !== null && items !== void 0 && items.length) {
129
129
  switch (event.key) {
130
- case _services.cascadingMenuKeys.TAB:
130
+ case _services.keys.TAB:
131
131
  requestAnimationFrame(function () {
132
132
  // NOTE: document.activeElement is stale if not wrapped in requestAnimationFrame
133
133
  var focusedItemIndex = _this.state.menuItems.indexOf(document.activeElement);
@@ -138,21 +138,21 @@ var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
138
138
  });
139
139
  });
140
140
  break;
141
- case _services.cascadingMenuKeys.ARROW_UP:
141
+ case _services.keys.ARROW_UP:
142
142
  event.preventDefault();
143
143
  _this.focusMenuItem('up');
144
144
  if (_this.props.onUseKeyboardToNavigate) {
145
145
  _this.props.onUseKeyboardToNavigate();
146
146
  }
147
147
  break;
148
- case _services.cascadingMenuKeys.ARROW_DOWN:
148
+ case _services.keys.ARROW_DOWN:
149
149
  event.preventDefault();
150
150
  _this.focusMenuItem('down');
151
151
  if (_this.props.onUseKeyboardToNavigate) {
152
152
  _this.props.onUseKeyboardToNavigate();
153
153
  }
154
154
  break;
155
- case _services.cascadingMenuKeys.ARROW_RIGHT:
155
+ case _services.keys.ARROW_RIGHT:
156
156
  if (_this.props.showNextPanel) {
157
157
  event.preventDefault();
158
158
  _this.props.showNextPanel(onClose && _this.state.focusedItemIndex ? _this.state.focusedItemIndex - 1 // Account for panel title back button
@@ -115,7 +115,7 @@ var euiFlexGridStyles = function euiFlexGridStyles(euiThemeContext) {
115
115
  gutterSizes: {
116
116
  none: /*#__PURE__*/(0, _react.css)(";label:none;"),
117
117
  s: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.s, ";;label:s;"),
118
- m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.m, ";;label:m;"),
118
+ m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.base, ";;label:m;"),
119
119
  l: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.l, ";;label:l;"),
120
120
  xl: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xl, ";;label:xl;")
121
121
  },
@@ -159,7 +159,7 @@ var euiFlexGroupStyles = function euiFlexGroupStyles(euiThemeContext) {
159
159
  none: /*#__PURE__*/(0, _react.css)(";label:none;"),
160
160
  xs: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xs, ";;label:xs;"),
161
161
  s: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.s, ";;label:s;"),
162
- m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.m, ";;label:m;"),
162
+ m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.base, ";;label:m;"),
163
163
  l: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.l, ";;label:l;"),
164
164
  xl: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xxl, ";;label:xl;")
165
165
  },
@@ -18,7 +18,7 @@ var _portal = require("../portal");
18
18
  var _accessibility = require("../accessibility");
19
19
  var _flyout = require("./flyout.styles");
20
20
  var _react2 = require("@emotion/react");
21
- var _excluded = ["className", "children", "as", "hideCloseButton", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "focusTrapProps", "includeFixedHeadersInFocusTrap", "aria-describedby"];
21
+ var _excluded = ["className", "children", "as", "hideCloseButton", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "aria-describedby"];
22
22
  /*
23
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
24
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -90,8 +90,9 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
90
90
  outsideClickCloses = _ref.outsideClickCloses,
91
91
  _ref$pushMinBreakpoin = _ref.pushMinBreakpoint,
92
92
  pushMinBreakpoint = _ref$pushMinBreakpoin === void 0 ? 'l' : _ref$pushMinBreakpoin,
93
- _ref$focusTrapProps = _ref.focusTrapProps,
94
- _focusTrapProps = _ref$focusTrapProps === void 0 ? {} : _ref$focusTrapProps,
93
+ _ref$pushAnimation = _ref.pushAnimation,
94
+ pushAnimation = _ref$pushAnimation === void 0 ? false : _ref$pushAnimation,
95
+ _focusTrapProps = _ref.focusTrapProps,
95
96
  _ref$includeFixedHead = _ref.includeFixedHeadersInFocusTrap,
96
97
  includeFixedHeadersInFocusTrap = _ref$includeFixedHead === void 0 ? true : _ref$includeFixedHead,
97
98
  _ariaDescribedBy = _ref['aria-describedby'],
@@ -119,18 +120,16 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
119
120
  /**
120
121
  * Accomodate for the `isPushed` state by adding padding to the body equal to the width of the element
121
122
  */
122
- if (type === 'push') {
123
- if (isPushed) {
124
- if (side === 'right') {
125
- document.body.style.paddingRight = "".concat(dimensions.width, "px");
126
- } else if (side === 'left') {
127
- document.body.style.paddingLeft = "".concat(dimensions.width, "px");
128
- }
123
+ if (isPushed) {
124
+ if (side === 'right') {
125
+ document.body.style.paddingRight = "".concat(dimensions.width, "px");
126
+ } else if (side === 'left') {
127
+ document.body.style.paddingLeft = "".concat(dimensions.width, "px");
129
128
  }
130
129
  }
131
130
  return function () {
132
131
  document.body.classList.remove('euiBody--hasFlyout');
133
- if (type === 'push') {
132
+ if (isPushed) {
134
133
  if (side === 'right') {
135
134
  document.body.style.paddingRight = '';
136
135
  } else if (side === 'left') {
@@ -138,38 +137,36 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
138
137
  }
139
138
  }
140
139
  };
141
- }, [type, side, dimensions, isPushed]);
140
+ }, [side, dimensions, isPushed]);
142
141
 
143
142
  /**
144
143
  * ESC key closes flyout (always?)
145
144
  */
146
- var onKeyDown = function onKeyDown(event) {
145
+ var onKeyDown = (0, _react.useCallback)(function (event) {
147
146
  if (!isPushed && event.key === _services.keys.ESCAPE) {
148
147
  event.preventDefault();
149
148
  onClose(event);
150
149
  }
151
- };
150
+ }, [onClose, isPushed]);
152
151
 
153
152
  /**
154
153
  * Set inline styles
155
154
  */
156
- var newStyle = style;
157
- if (typeof maxWidth !== 'boolean') {
158
- newStyle = _objectSpread(_objectSpread({}, newStyle), (0, _global_styling.logicalStyle)('max-width', maxWidth));
159
- }
160
- if (!isEuiFlyoutSizeNamed(size)) {
161
- newStyle = _objectSpread(_objectSpread({}, newStyle), (0, _global_styling.logicalStyle)('width', size));
162
- }
155
+ var inlineStyles = (0, _react.useMemo)(function () {
156
+ var widthStyle = !isEuiFlyoutSizeNamed(size) && (0, _global_styling.logicalStyle)('width', size);
157
+ var maxWidthStyle = typeof maxWidth !== 'boolean' && (0, _global_styling.logicalStyle)('max-width', maxWidth);
158
+ return _objectSpread(_objectSpread(_objectSpread({}, style), widthStyle), maxWidthStyle);
159
+ }, [style, maxWidth, size]);
163
160
  var euiTheme = (0, _services.useEuiTheme)();
164
161
  var styles = (0, _flyout.euiFlyoutStyles)(euiTheme);
165
- var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, styles[type], type === 'push' && styles.pushSide[side], styles[side]];
162
+ var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay, isPushed && styles.push[side], isPushed && !pushAnimation && styles.push.noAnimation, styles[side]];
166
163
  var classes = (0, _classnames.default)('euiFlyout', className);
167
- var closeButton;
168
- if (onClose && !hideCloseButton) {
164
+ var closeButton = (0, _react.useMemo)(function () {
165
+ if (hideCloseButton || !onClose) return null;
169
166
  var closeButtonClasses = (0, _classnames.default)('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
170
167
  var closeButtonStyles = (0, _flyout.euiFlyoutCloseButtonStyles)(euiTheme);
171
168
  var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side], closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.css];
172
- closeButton = (0, _react2.jsx)(_i18n.EuiI18n, {
169
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
173
170
  token: "euiFlyout.closeAriaLabel",
174
171
  default: "Close this dialog"
175
172
  }, function (closeAriaLabel) {
@@ -189,7 +186,7 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
189
186
  }
190
187
  }));
191
188
  });
192
- }
189
+ }, [onClose, hideCloseButton, closeButtonPosition, closeButtonProps, side, euiTheme]);
193
190
 
194
191
  /*
195
192
  * If not disabled, automatically add fixed EuiHeaders as shards
@@ -219,9 +216,11 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
219
216
  });
220
217
  }
221
218
  }, [includeFixedHeadersInFocusTrap, resizeRef]);
222
- var focusTrapProps = _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
223
- shards: [].concat(_toConsumableArray(fixedHeaders), _toConsumableArray(_focusTrapProps.shards || []))
224
- });
219
+ var focusTrapProps = (0, _react.useMemo)(function () {
220
+ return _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
221
+ shards: [].concat(_toConsumableArray(fixedHeaders), _toConsumableArray((_focusTrapProps === null || _focusTrapProps === void 0 ? void 0 : _focusTrapProps.shards) || []))
222
+ });
223
+ }, [fixedHeaders, _focusTrapProps]);
225
224
 
226
225
  /*
227
226
  * Provide meaningful screen reader instructions/details
@@ -254,7 +253,7 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
254
253
  * or if `outsideClickCloses={true}` to close on clicks that target
255
254
  * (both mousedown and mouseup) the overlay mask.
256
255
  */
257
- var onClickOutside = function onClickOutside(event) {
256
+ var onClickOutside = (0, _react.useCallback)(function (event) {
258
257
  // Do not close the flyout for any external click
259
258
  if (outsideClickCloses === false) return undefined;
260
259
  if (hasOverlayMask) {
@@ -266,7 +265,7 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
266
265
  }
267
266
  // Otherwise if ownFocus is false and outsideClickCloses is undefined, outside clicks should not close the flyout
268
267
  return undefined;
269
- };
268
+ }, [onClose, hasOverlayMask, outsideClickCloses]);
270
269
  var flyout = (0, _react2.jsx)(_focus_trap.EuiFocusTrap, _extends({
271
270
  disabled: isPushed,
272
271
  scrollLock: hasOverlayMask,
@@ -275,7 +274,7 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
275
274
  }, focusTrapProps), (0, _react2.jsx)(Element, _extends({
276
275
  className: classes,
277
276
  css: cssStyles,
278
- style: newStyle,
277
+ style: inlineStyles,
279
278
  ref: setRef
280
279
  }, rest, {
281
280
  role: !isPushed ? 'dialog' : rest.role,
@@ -10,14 +10,14 @@ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
10
10
  var _color = require("../../services/color");
11
11
  var _form = require("../form/form.styles");
12
12
  var _templateObject, _templateObject2;
13
- /*
14
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
- * or more contributor license agreements. Licensed under the Elastic License
16
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
- * in compliance with, at your election, the Elastic License 2.0 or the Server
18
- * Side Public License, v 1.
19
- */
20
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
14
+ 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)."; } /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
21
  var euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
22
22
  exports.euiFlyoutSlideInRight = euiFlyoutSlideInRight;
23
23
  var euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
@@ -37,6 +37,14 @@ var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeCon
37
37
  };
38
38
  };
39
39
  exports.euiFlyoutCloseButtonStyles = euiFlyoutCloseButtonStyles;
40
+ var _ref = process.env.NODE_ENV === "production" ? {
41
+ name: "yokctr-noAnimation",
42
+ styles: "animation-duration:0s!important;label:noAnimation;"
43
+ } : {
44
+ name: "yokctr-noAnimation",
45
+ styles: "animation-duration:0s!important;label:noAnimation;",
46
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
47
+ };
40
48
  var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
41
49
  var euiTheme = euiThemeContext.euiTheme;
42
50
  return {
@@ -52,10 +60,11 @@ var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
52
60
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
53
61
  // Type
54
62
  overlay: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";;label:overlay;"),
55
- push: /*#__PURE__*/(0, _react.css)("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
56
- pushSide: {
63
+ push: {
64
+ push: /*#__PURE__*/(0, _react.css)("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
57
65
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thick), ";;label:right;"),
58
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-right', euiTheme.border.thick), ";;label:left;")
66
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-right', euiTheme.border.thick), ";;label:left;"),
67
+ noAnimation: _ref
59
68
  },
60
69
  // Padding
61
70
  paddingSizes: {
@@ -799,6 +799,10 @@ EuiDualRangeClass.propTypes = {
799
799
  * Alignment of the popover relative to the input
800
800
  */
801
801
  anchorPosition: _propTypes.default.oneOf(["downLeft", "downRight", "downCenter"]),
802
+ /**
803
+ * Allows automatically closing the input popover on page scroll
804
+ */
805
+ closeOnScroll: _propTypes.default.bool,
802
806
  inputRef: _propTypes.default.any,
803
807
  onPanelResize: _propTypes.default.func,
804
808
  /**
@@ -817,17 +817,6 @@ Object.keys(_steps).forEach(function (key) {
817
817
  }
818
818
  });
819
819
  });
820
- var _suggest = require("./suggest");
821
- Object.keys(_suggest).forEach(function (key) {
822
- if (key === "default" || key === "__esModule") return;
823
- if (key in exports && exports[key] === _suggest[key]) return;
824
- Object.defineProperty(exports, key, {
825
- enumerable: true,
826
- get: function get() {
827
- return _suggest[key];
828
- }
829
- });
830
- });
831
820
  var _table = require("./table");
832
821
  Object.keys(_table).forEach(function (key) {
833
822
  if (key === "default" || key === "__esModule") return;