@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
@@ -65,12 +65,6 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
65
65
  inputWidth: inputWidth
66
66
  });
67
67
  });
68
- _defineProperty(_assertThisInitialized(_this), "updatePosition", function () {
69
- // Wait a beat for the DOM to update, since we depend on DOM elements' bounds.
70
- requestAnimationFrame(function () {
71
- _this.props.updatePosition();
72
- });
73
- });
74
68
  _defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
75
69
  _this.props.onFocus(event);
76
70
  _this.setState({
@@ -111,10 +105,6 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
111
105
  value: function componentDidUpdate(prevProps) {
112
106
  if (prevProps.searchValue !== this.props.searchValue) {
113
107
  this.updateInputSize(this.props.searchValue);
114
-
115
- // We need to update the position of everything if the user enters enough input to change
116
- // the size of the input.
117
- this.updatePosition();
118
108
  }
119
109
  }
120
110
  }, {
@@ -140,7 +130,6 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
140
130
  searchValue = _this$props3.searchValue,
141
131
  selectedOptions = _this$props3.selectedOptions,
142
132
  singleSelectionProp = _this$props3.singleSelection,
143
- toggleButtonRef = _this$props3.toggleButtonRef,
144
133
  value = _this$props3.value,
145
134
  prepend = _this$props3.prepend,
146
135
  append = _this$props3.append,
@@ -207,7 +196,6 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
207
196
  'data-test-subj': 'comboBoxToggleListButton',
208
197
  disabled: isDisabled,
209
198
  onClick: isListOpen && !isDisabled ? onCloseListClick : onOpenListClick,
210
- ref: toggleButtonRef,
211
199
  side: 'right',
212
200
  tabIndex: -1,
213
201
  type: 'arrowDown'
@@ -322,7 +310,6 @@ EuiComboBoxInput.propTypes = {
322
310
  asPlainText: PropTypes.bool
323
311
  }).isRequired]),
324
312
  toggleButtonRef: PropTypes.any,
325
- updatePosition: PropTypes.func.isRequired,
326
313
  value: PropTypes.string,
327
314
  prepend: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired).isRequired]),
328
315
  append: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired).isRequired]),
@@ -1,9 +1,10 @@
1
- var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
2
- _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"];
1
+ var _excluded = ["children"],
2
+ _excluded2 = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
3
+ _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"];
3
4
  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); }
4
- 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); }
5
5
  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; }
6
6
  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; }
7
+ 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); }
7
8
  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; }
8
9
  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; }
9
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -40,8 +41,8 @@ import { EuiComboBoxTitle } from './combo_box_title';
40
41
  import { EuiI18n } from '../../i18n';
41
42
  import { EuiFilterSelectItem } from '../../filter_group/filter_select_item';
42
43
  import { EuiBadge } from '../../badge';
43
- import { EuiPopoverPanel } from '../../popover/popover_panel';
44
44
  import { EuiTextTruncate } from '../../text_truncate';
45
+ import { EuiInputPopoverWidthContext } from '../../popover/input_popover';
45
46
  import { jsx as ___EmotionJSX } from "@emotion/react";
46
47
  var hitEnterBadge = ___EmotionJSX(EuiBadge, {
47
48
  className: "euiComboBoxOption__enterBadge",
@@ -59,43 +60,25 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
59
60
  args[_key] = arguments[_key];
60
61
  }
61
62
  _this = _super.call.apply(_super, [this].concat(args));
62
- _defineProperty(_assertThisInitialized(_this), "listRefInstance", null);
63
63
  _defineProperty(_assertThisInitialized(_this), "listRef", null);
64
- _defineProperty(_assertThisInitialized(_this), "listBoxRef", null);
65
- _defineProperty(_assertThisInitialized(_this), "updatePosition", function () {
66
- // Wait a beat for the DOM to update, since we depend on DOM elements' bounds.
67
- requestAnimationFrame(function () {
68
- _this.props.updatePosition(_this.listRefInstance);
69
- });
70
- });
71
- _defineProperty(_assertThisInitialized(_this), "closeListOnScroll", function (event) {
72
- // Close the list when a scroll event happens, but not if the scroll happened in the options list.
73
- // This mirrors Firefox's approach of auto-closing `select` elements onscroll.
74
- if (_this.listRefInstance && event.target && _this.listRefInstance.contains(event.target) === false) {
75
- _this.props.onCloseList(event);
76
- }
77
- });
78
- _defineProperty(_assertThisInitialized(_this), "listRefCallback", function (ref) {
79
- _this.props.listRef(ref);
80
- _this.listRefInstance = ref;
81
- });
82
64
  _defineProperty(_assertThisInitialized(_this), "setListRef", function (ref) {
83
65
  _this.listRef = ref;
84
66
  });
85
- _defineProperty(_assertThisInitialized(_this), "setListBoxRef", function (ref) {
86
- _this.listBoxRef = ref;
87
- if (ref) {
88
- ref.setAttribute('aria-label', _this.props.listboxAriaLabel);
89
- ref.setAttribute('id', _this.props.rootId('listbox'));
90
- ref.setAttribute('role', 'listbox');
91
- ref.setAttribute('tabIndex', '0');
92
- }
67
+ _defineProperty(_assertThisInitialized(_this), "ListInnerElement", function (_ref) {
68
+ var children = _ref.children,
69
+ rest = _objectWithoutProperties(_ref, _excluded);
70
+ return ___EmotionJSX("div", _extends({}, rest, {
71
+ "aria-label": _this.props.listboxAriaLabel,
72
+ id: _this.props.rootId('listbox'),
73
+ role: "listbox",
74
+ tabIndex: "0"
75
+ }), children);
93
76
  });
94
- _defineProperty(_assertThisInitialized(_this), "ListRow", function (_ref) {
77
+ _defineProperty(_assertThisInitialized(_this), "ListRow", function (_ref2) {
95
78
  var _option$key;
96
- var data = _ref.data,
97
- index = _ref.index,
98
- style = _ref.style;
79
+ var data = _ref2.data,
80
+ index = _ref2.index,
81
+ style = _ref2.style;
99
82
  var option = data[index];
100
83
  var key = option.key,
101
84
  isGroupLabelOption = option.isGroupLabelOption,
@@ -104,12 +87,11 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
104
87
  prepend = option.prepend,
105
88
  append = option.append,
106
89
  _truncationProps = option.truncationProps,
107
- rest = _objectWithoutProperties(option, _excluded);
90
+ rest = _objectWithoutProperties(option, _excluded2);
108
91
  var _this$props = _this.props,
109
92
  singleSelection = _this$props.singleSelection,
110
93
  selectedOptions = _this$props.selectedOptions,
111
94
  onOptionClick = _this$props.onOptionClick,
112
- optionRef = _this$props.optionRef,
113
95
  activeOptionIndex = _this$props.activeOptionIndex,
114
96
  renderOption = _this$props.renderOption,
115
97
  searchValue = _this$props.searchValue,
@@ -137,7 +119,6 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
137
119
  onOptionClick(option);
138
120
  }
139
121
  },
140
- ref: optionRef.bind(_assertThisInitialized(_this), index),
141
122
  isFocused: optionIsFocused,
142
123
  checked: checked,
143
124
  showIcons: singleSelection ? true : false,
@@ -196,51 +177,12 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
196
177
  return _this;
197
178
  }
198
179
  _createClass(EuiComboBoxOptionsList, [{
199
- key: "componentDidMount",
200
- value: function componentDidMount() {
201
- var _this2 = this;
202
- // Wait a frame, otherwise moving focus from one combo box to another will result in the class
203
- // being removed from the body.
204
- requestAnimationFrame(function () {
205
- document.body.classList.add('euiBody-hasPortalContent');
206
- });
207
- this.updatePosition();
208
- window.addEventListener('resize', this.updatePosition);
209
-
210
- // Firefox will trigger a scroll event in many common situations when the options list div is appended
211
- // to the DOM; in testing it was always within 100ms, but setting a timeout here for 500ms to be safe
212
- setTimeout(function () {
213
- window.addEventListener('scroll', _this2.closeListOnScroll, {
214
- passive: true,
215
- // for better performance as we won't call preventDefault
216
- capture: true // scroll events don't bubble, they must be captured instead
217
- });
218
- }, 500);
219
- }
220
- }, {
221
180
  key: "componentDidUpdate",
222
181
  value: function componentDidUpdate(prevProps) {
223
- var options = prevProps.options,
224
- selectedOptions = prevProps.selectedOptions,
225
- searchValue = prevProps.searchValue;
226
-
227
- // We don't compare matchingOptions because that will result in a loop.
228
- if (searchValue !== this.props.searchValue || options !== this.props.options || selectedOptions !== this.props.selectedOptions) {
229
- this.updatePosition();
230
- }
231
182
  if (this.listRef && typeof this.props.activeOptionIndex !== 'undefined' && this.props.activeOptionIndex !== prevProps.activeOptionIndex) {
232
183
  this.listRef.scrollToItem(this.props.activeOptionIndex, 'auto');
233
184
  }
234
185
  }
235
- }, {
236
- key: "componentWillUnmount",
237
- value: function componentWillUnmount() {
238
- document.body.classList.remove('euiBody-hasPortalContent');
239
- window.removeEventListener('resize', this.updatePosition);
240
- window.removeEventListener('scroll', this.closeListOnScroll, {
241
- capture: true
242
- });
243
- }
244
186
  }, {
245
187
  key: "render",
246
188
  value: function render() {
@@ -260,10 +202,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
260
202
  onOptionClick = _this$props2.onOptionClick,
261
203
  onOptionEnterKey = _this$props2.onOptionEnterKey,
262
204
  onScroll = _this$props2.onScroll,
263
- optionRef = _this$props2.optionRef,
264
205
  options = _this$props2.options,
265
- _this$props2$position = _this$props2.position,
266
- position = _this$props2$position === void 0 ? 'bottom' : _this$props2$position,
267
206
  renderOption = _this$props2.renderOption,
268
207
  rootId = _this$props2.rootId,
269
208
  rowHeight = _this$props2.rowHeight,
@@ -271,14 +210,10 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
271
210
  searchValue = _this$props2.searchValue,
272
211
  selectedOptions = _this$props2.selectedOptions,
273
212
  singleSelection = _this$props2.singleSelection,
274
- updatePosition = _this$props2.updatePosition,
275
- width = _this$props2.width,
276
213
  delimiter = _this$props2.delimiter,
277
- zIndex = _this$props2.zIndex,
278
- style = _this$props2.style,
279
214
  truncationProps = _this$props2.truncationProps,
280
215
  listboxAriaLabel = _this$props2.listboxAriaLabel,
281
- rest = _objectWithoutProperties(_this$props2, _excluded2);
216
+ rest = _objectWithoutProperties(_this$props2, _excluded3);
282
217
  var emptyStateContent;
283
218
  if (isLoading) {
284
219
  emptyStateContent = ___EmotionJSX(EuiFlexGroup, {
@@ -375,43 +310,29 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
375
310
  var numVisibleOptions = matchingOptions.length < 7 ? matchingOptions.length : 7;
376
311
  var height = numVisibleOptions * (rowHeight + 1); // Add one for the border
377
312
 
378
- // bounded by max-height of euiComboBoxOptionsList__rowWrap
313
+ // bounded by max-height of .euiComboBoxOptionsList
379
314
  var boundedHeight = height > 200 ? 200 : height;
380
315
  var optionsList = ___EmotionJSX(FixedSizeList, {
316
+ className: "euiComboBoxOptionsList__virtualization",
381
317
  height: boundedHeight,
382
318
  onScroll: onScroll,
383
319
  itemCount: matchingOptions.length,
384
320
  itemSize: rowHeight,
385
321
  itemData: matchingOptions,
386
322
  ref: this.setListRef,
387
- innerRef: this.setListBoxRef,
388
- width: width
323
+ innerElementType: this.ListInnerElement,
324
+ width: this.context
389
325
  }, this.ListRow);
390
-
391
- /**
392
- * Reusing the EuiPopover__panel classes to help with consistency/maintenance.
393
- * But this should really be converted to user the popover component.
394
- */
395
- var classes = classNames('euiComboBoxOptionsList');
396
- return ___EmotionJSX(EuiPopoverPanel, _extends({
397
- paddingSize: "none",
398
- hasShadow: false,
399
- className: classes,
400
- panelRef: this.listRefCallback,
326
+ return ___EmotionJSX("div", _extends({
327
+ className: "euiComboBoxOptionsList",
401
328
  "data-test-subj": classNames('comboBoxOptionsList', dataTestSubj),
402
- style: _objectSpread(_objectSpread({}, style), {}, {
403
- zIndex: zIndex
404
- }),
405
- isOpen: true,
406
- isAttached: true,
407
- position: position
408
- }, rest), ___EmotionJSX("div", {
409
- className: "euiComboBoxOptionsList__rowWrap"
410
- }, emptyState || optionsList));
329
+ ref: listRef
330
+ }, rest), emptyState || optionsList);
411
331
  }
412
332
  }]);
413
333
  return EuiComboBoxOptionsList;
414
334
  }(Component);
335
+ _defineProperty(EuiComboBoxOptionsList, "contextType", EuiInputPopoverWidthContext);
415
336
  _defineProperty(EuiComboBoxOptionsList, "defaultProps", {
416
337
  'data-test-subj': '',
417
338
  rowHeight: 29,
@@ -427,9 +348,9 @@ EuiComboBoxOptionsList.propTypes = {
427
348
  areAllOptionsSelected: PropTypes.bool,
428
349
  listboxAriaLabel: PropTypes.string.isRequired,
429
350
  /**
430
- * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
431
- * It won't show if there's no onCreateOption.
432
- */
351
+ * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
352
+ * It won't show if there's no onCreateOption.
353
+ */
433
354
  customOptionText: PropTypes.string,
434
355
  fullWidth: PropTypes.bool,
435
356
  getSelectedOptionForSearchValue: PropTypes.func,
@@ -468,10 +389,9 @@ EuiComboBoxOptionsList.propTypes = {
468
389
  onOptionClick: PropTypes.func,
469
390
  onOptionEnterKey: PropTypes.func,
470
391
  onScroll: PropTypes.any,
471
- optionRef: PropTypes.func.isRequired,
472
392
  /**
473
- * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
474
- */
393
+ * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
394
+ */
475
395
  options: PropTypes.arrayOf(PropTypes.shape({
476
396
  isGroupLabelOption: PropTypes.bool,
477
397
  label: PropTypes.string.isRequired,
@@ -499,7 +419,6 @@ EuiComboBoxOptionsList.propTypes = {
499
419
  "data-test-subj": PropTypes.string,
500
420
  css: PropTypes.any
501
421
  }).isRequired).isRequired,
502
- position: PropTypes.oneOf(["top", "bottom"]),
503
422
  renderOption: PropTypes.func,
504
423
  rootId: PropTypes.any.isRequired,
505
424
  rowHeight: PropTypes.number.isRequired,
@@ -532,12 +451,9 @@ EuiComboBoxOptionsList.propTypes = {
532
451
  "data-test-subj": PropTypes.string,
533
452
  css: PropTypes.any
534
453
  }).isRequired).isRequired,
535
- updatePosition: PropTypes.func.isRequired,
536
- width: PropTypes.number.isRequired,
537
454
  singleSelection: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
538
455
  asPlainText: PropTypes.bool
539
456
  }).isRequired]),
540
457
  delimiter: PropTypes.string,
541
- zIndex: PropTypes.number,
542
458
  truncationProps: PropTypes.any
543
459
  };
@@ -31,7 +31,7 @@ import { tabbable } from 'tabbable';
31
31
  import { keysOf } from '../common';
32
32
  import { EuiIcon } from '../icon';
33
33
  import { EuiResizeObserver } from '../observer/resize_observer';
34
- import { cascadingMenuKeys } from '../../services';
34
+ import { keys } from '../../services';
35
35
  import { EuiContextMenuItem } from './context_menu_item';
36
36
  import { jsx as ___EmotionJSX } from "@emotion/react";
37
37
  var titleSizeToClassNameMap = {
@@ -106,7 +106,7 @@ export var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
106
106
  onClose = _this$props.onClose,
107
107
  showPreviousPanel = _this$props.showPreviousPanel;
108
108
  if (onClose && (items !== null && items !== void 0 && items.length || document.activeElement === _this.backButton || document.activeElement === _this.panel)) {
109
- if (event.key === cascadingMenuKeys.ARROW_LEFT) {
109
+ if (event.key === keys.ARROW_LEFT) {
110
110
  if (showPreviousPanel) {
111
111
  event.preventDefault();
112
112
  event.stopPropagation();
@@ -119,7 +119,7 @@ export var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
119
119
  }
120
120
  if (items !== null && items !== void 0 && items.length) {
121
121
  switch (event.key) {
122
- case cascadingMenuKeys.TAB:
122
+ case keys.TAB:
123
123
  requestAnimationFrame(function () {
124
124
  // NOTE: document.activeElement is stale if not wrapped in requestAnimationFrame
125
125
  var focusedItemIndex = _this.state.menuItems.indexOf(document.activeElement);
@@ -130,21 +130,21 @@ export var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
130
130
  });
131
131
  });
132
132
  break;
133
- case cascadingMenuKeys.ARROW_UP:
133
+ case keys.ARROW_UP:
134
134
  event.preventDefault();
135
135
  _this.focusMenuItem('up');
136
136
  if (_this.props.onUseKeyboardToNavigate) {
137
137
  _this.props.onUseKeyboardToNavigate();
138
138
  }
139
139
  break;
140
- case cascadingMenuKeys.ARROW_DOWN:
140
+ case keys.ARROW_DOWN:
141
141
  event.preventDefault();
142
142
  _this.focusMenuItem('down');
143
143
  if (_this.props.onUseKeyboardToNavigate) {
144
144
  _this.props.onUseKeyboardToNavigate();
145
145
  }
146
146
  break;
147
- case cascadingMenuKeys.ARROW_RIGHT:
147
+ case keys.ARROW_RIGHT:
148
148
  if (_this.props.showNextPanel) {
149
149
  event.preventDefault();
150
150
  _this.props.showNextPanel(onClose && _this.state.focusedItemIndex ? _this.state.focusedItemIndex - 1 // Account for panel title back button
@@ -111,7 +111,7 @@ export var euiFlexGridStyles = function euiFlexGridStyles(euiThemeContext) {
111
111
  gutterSizes: {
112
112
  none: /*#__PURE__*/css(";label:none;"),
113
113
  s: /*#__PURE__*/css("gap:", euiTheme.size.s, ";;label:s;"),
114
- m: /*#__PURE__*/css("gap:", euiTheme.size.m, ";;label:m;"),
114
+ m: /*#__PURE__*/css("gap:", euiTheme.size.base, ";;label:m;"),
115
115
  l: /*#__PURE__*/css("gap:", euiTheme.size.l, ";;label:l;"),
116
116
  xl: /*#__PURE__*/css("gap:", euiTheme.size.xl, ";;label:xl;")
117
117
  },
@@ -155,7 +155,7 @@ export var euiFlexGroupStyles = function euiFlexGroupStyles(euiThemeContext) {
155
155
  none: /*#__PURE__*/css(";label:none;"),
156
156
  xs: /*#__PURE__*/css("gap:", euiTheme.size.xs, ";;label:xs;"),
157
157
  s: /*#__PURE__*/css("gap:", euiTheme.size.s, ";;label:s;"),
158
- m: /*#__PURE__*/css("gap:", euiTheme.size.m, ";;label:m;"),
158
+ m: /*#__PURE__*/css("gap:", euiTheme.size.base, ";;label:m;"),
159
159
  l: /*#__PURE__*/css("gap:", euiTheme.size.l, ";;label:l;"),
160
160
  xl: /*#__PURE__*/css("gap:", euiTheme.size.xxl, ";;label:xl;")
161
161
  },
@@ -1,5 +1,5 @@
1
1
  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); }
2
- var _excluded = ["className", "children", "as", "hideCloseButton", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "focusTrapProps", "includeFixedHeadersInFocusTrap", "aria-describedby"];
2
+ var _excluded = ["className", "children", "as", "hideCloseButton", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "aria-describedby"];
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -26,7 +26,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
26
26
  * Side Public License, v 1.
27
27
  */
28
28
 
29
- import React, { useEffect, useRef, useState, forwardRef } from 'react';
29
+ import React, { useEffect, useRef, useMemo, useCallback, useState, forwardRef } from 'react';
30
30
  import classnames from 'classnames';
31
31
  import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiTheme, useGeneratedHtmlId } from '../../services';
32
32
  import { logicalStyle } from '../../global_styling';
@@ -78,8 +78,9 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
78
78
  outsideClickCloses = _ref.outsideClickCloses,
79
79
  _ref$pushMinBreakpoin = _ref.pushMinBreakpoint,
80
80
  pushMinBreakpoint = _ref$pushMinBreakpoin === void 0 ? 'l' : _ref$pushMinBreakpoin,
81
- _ref$focusTrapProps = _ref.focusTrapProps,
82
- _focusTrapProps = _ref$focusTrapProps === void 0 ? {} : _ref$focusTrapProps,
81
+ _ref$pushAnimation = _ref.pushAnimation,
82
+ pushAnimation = _ref$pushAnimation === void 0 ? false : _ref$pushAnimation,
83
+ _focusTrapProps = _ref.focusTrapProps,
83
84
  _ref$includeFixedHead = _ref.includeFixedHeadersInFocusTrap,
84
85
  includeFixedHeadersInFocusTrap = _ref$includeFixedHead === void 0 ? true : _ref$includeFixedHead,
85
86
  _ariaDescribedBy = _ref['aria-describedby'],
@@ -107,18 +108,16 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
107
108
  /**
108
109
  * Accomodate for the `isPushed` state by adding padding to the body equal to the width of the element
109
110
  */
110
- if (type === 'push') {
111
- if (isPushed) {
112
- if (side === 'right') {
113
- document.body.style.paddingRight = "".concat(dimensions.width, "px");
114
- } else if (side === 'left') {
115
- document.body.style.paddingLeft = "".concat(dimensions.width, "px");
116
- }
111
+ if (isPushed) {
112
+ if (side === 'right') {
113
+ document.body.style.paddingRight = "".concat(dimensions.width, "px");
114
+ } else if (side === 'left') {
115
+ document.body.style.paddingLeft = "".concat(dimensions.width, "px");
117
116
  }
118
117
  }
119
118
  return function () {
120
119
  document.body.classList.remove('euiBody--hasFlyout');
121
- if (type === 'push') {
120
+ if (isPushed) {
122
121
  if (side === 'right') {
123
122
  document.body.style.paddingRight = '';
124
123
  } else if (side === 'left') {
@@ -126,38 +125,36 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
126
125
  }
127
126
  }
128
127
  };
129
- }, [type, side, dimensions, isPushed]);
128
+ }, [side, dimensions, isPushed]);
130
129
 
131
130
  /**
132
131
  * ESC key closes flyout (always?)
133
132
  */
134
- var onKeyDown = function onKeyDown(event) {
133
+ var onKeyDown = useCallback(function (event) {
135
134
  if (!isPushed && event.key === keys.ESCAPE) {
136
135
  event.preventDefault();
137
136
  onClose(event);
138
137
  }
139
- };
138
+ }, [onClose, isPushed]);
140
139
 
141
140
  /**
142
141
  * Set inline styles
143
142
  */
144
- var newStyle = style;
145
- if (typeof maxWidth !== 'boolean') {
146
- newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('max-width', maxWidth));
147
- }
148
- if (!isEuiFlyoutSizeNamed(size)) {
149
- newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('width', size));
150
- }
143
+ var inlineStyles = useMemo(function () {
144
+ var widthStyle = !isEuiFlyoutSizeNamed(size) && logicalStyle('width', size);
145
+ var maxWidthStyle = typeof maxWidth !== 'boolean' && logicalStyle('max-width', maxWidth);
146
+ return _objectSpread(_objectSpread(_objectSpread({}, style), widthStyle), maxWidthStyle);
147
+ }, [style, maxWidth, size]);
151
148
  var euiTheme = useEuiTheme();
152
149
  var styles = euiFlyoutStyles(euiTheme);
153
- var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, styles[type], type === 'push' && styles.pushSide[side], styles[side]];
150
+ 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]];
154
151
  var classes = classnames('euiFlyout', className);
155
- var closeButton;
156
- if (onClose && !hideCloseButton) {
152
+ var closeButton = useMemo(function () {
153
+ if (hideCloseButton || !onClose) return null;
157
154
  var closeButtonClasses = classnames('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
158
155
  var closeButtonStyles = euiFlyoutCloseButtonStyles(euiTheme);
159
156
  var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side], closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.css];
160
- closeButton = ___EmotionJSX(EuiI18n, {
157
+ return ___EmotionJSX(EuiI18n, {
161
158
  token: "euiFlyout.closeAriaLabel",
162
159
  default: "Close this dialog"
163
160
  }, function (closeAriaLabel) {
@@ -177,7 +174,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
177
174
  }
178
175
  }));
179
176
  });
180
- }
177
+ }, [onClose, hideCloseButton, closeButtonPosition, closeButtonProps, side, euiTheme]);
181
178
 
182
179
  /*
183
180
  * If not disabled, automatically add fixed EuiHeaders as shards
@@ -207,9 +204,11 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
207
204
  });
208
205
  }
209
206
  }, [includeFixedHeadersInFocusTrap, resizeRef]);
210
- var focusTrapProps = _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
211
- shards: [].concat(_toConsumableArray(fixedHeaders), _toConsumableArray(_focusTrapProps.shards || []))
212
- });
207
+ var focusTrapProps = useMemo(function () {
208
+ return _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
209
+ shards: [].concat(_toConsumableArray(fixedHeaders), _toConsumableArray((_focusTrapProps === null || _focusTrapProps === void 0 ? void 0 : _focusTrapProps.shards) || []))
210
+ });
211
+ }, [fixedHeaders, _focusTrapProps]);
213
212
 
214
213
  /*
215
214
  * Provide meaningful screen reader instructions/details
@@ -242,7 +241,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
242
241
  * or if `outsideClickCloses={true}` to close on clicks that target
243
242
  * (both mousedown and mouseup) the overlay mask.
244
243
  */
245
- var onClickOutside = function onClickOutside(event) {
244
+ var onClickOutside = useCallback(function (event) {
246
245
  // Do not close the flyout for any external click
247
246
  if (outsideClickCloses === false) return undefined;
248
247
  if (hasOverlayMask) {
@@ -254,7 +253,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
254
253
  }
255
254
  // Otherwise if ownFocus is false and outsideClickCloses is undefined, outside clicks should not close the flyout
256
255
  return undefined;
257
- };
256
+ }, [onClose, hasOverlayMask, outsideClickCloses]);
258
257
  var flyout = ___EmotionJSX(EuiFocusTrap, _extends({
259
258
  disabled: isPushed,
260
259
  scrollLock: hasOverlayMask,
@@ -263,7 +262,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
263
262
  }, focusTrapProps), ___EmotionJSX(Element, _extends({
264
263
  className: classes,
265
264
  css: cssStyles,
266
- style: newStyle,
265
+ style: inlineStyles,
267
266
  ref: setRef
268
267
  }, rest, {
269
268
  role: !isPushed ? 'dialog' : rest.role,
@@ -1,5 +1,6 @@
1
1
  var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ 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)."; }
3
4
  /*
4
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -29,6 +30,14 @@ export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiT
29
30
  }
30
31
  };
31
32
  };
33
+ var _ref = process.env.NODE_ENV === "production" ? {
34
+ name: "yokctr-noAnimation",
35
+ styles: "animation-duration:0s!important;label:noAnimation;"
36
+ } : {
37
+ name: "yokctr-noAnimation",
38
+ styles: "animation-duration:0s!important;label:noAnimation;",
39
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
40
+ };
32
41
  export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
33
42
  var euiTheme = euiThemeContext.euiTheme;
34
43
  return {
@@ -44,10 +53,11 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
44
53
  left: /*#__PURE__*/css(logicalCSS('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
45
54
  // Type
46
55
  overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";;label:overlay;"),
47
- push: /*#__PURE__*/css("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
48
- pushSide: {
56
+ push: {
57
+ push: /*#__PURE__*/css("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
49
58
  right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
50
- left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
59
+ left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;"),
60
+ noAnimation: _ref
51
61
  },
52
62
  // Padding
53
63
  paddingSizes: {
@@ -791,6 +791,10 @@ EuiDualRangeClass.propTypes = {
791
791
  * Alignment of the popover relative to the input
792
792
  */
793
793
  anchorPosition: PropTypes.oneOf(["downLeft", "downRight", "downCenter"]),
794
+ /**
795
+ * Allows automatically closing the input popover on page scroll
796
+ */
797
+ closeOnScroll: PropTypes.bool,
794
798
  inputRef: PropTypes.any,
795
799
  onPanelResize: PropTypes.func,
796
800
  /**
@@ -385,6 +385,10 @@ EuiRangeClass.propTypes = {
385
385
  * Alignment of the popover relative to the input
386
386
  */
387
387
  anchorPosition: PropTypes.oneOf(["downLeft", "downRight", "downCenter"]),
388
+ /**
389
+ * Allows automatically closing the input popover on page scroll
390
+ */
391
+ closeOnScroll: PropTypes.bool,
388
392
  inputRef: PropTypes.any,
389
393
  onPanelResize: PropTypes.func,
390
394
  /**
@@ -80,7 +80,6 @@ export * from './skeleton';
80
80
  export * from './spacer';
81
81
  export * from './stat';
82
82
  export * from './steps';
83
- export * from './suggest';
84
83
  export * from './table';
85
84
  export * from './token';
86
85
  export * from './tour';