@elastic/eui 91.3.0 → 92.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 (175) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +0 -513
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -513
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.js +25 -22
  7. package/es/components/basic_table/collapsed_item_actions.js +14 -15
  8. package/es/components/basic_table/expanded_item_actions.js +4 -4
  9. package/es/components/datagrid/body/header/data_grid_header_cell.js +3 -3
  10. package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  11. package/es/components/filter_group/filter_button.js +20 -13
  12. package/es/components/filter_group/filter_button.styles.js +11 -20
  13. package/es/components/flyout/flyout.js +4 -4
  14. package/es/components/flyout/flyout_resizable.js +127 -0
  15. package/es/components/flyout/flyout_resizable.styles.js +27 -0
  16. package/es/components/flyout/index.js +2 -1
  17. package/es/components/form/range/dual_range.js +15 -66
  18. package/es/components/form/range/range.js +6 -5
  19. package/es/components/form/range/range_slider.js +28 -22
  20. package/es/components/form/text_area/text_area.js +39 -3
  21. package/es/components/index.js +0 -2
  22. package/es/components/markdown_editor/markdown_editor.js +12 -13
  23. package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  24. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  25. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
  26. package/es/components/tree_view/tree_view.js +23 -25
  27. package/es/utils/prop_types/is.js +2 -2
  28. package/eui.d.ts +830 -1145
  29. package/i18ntokens.json +121 -373
  30. package/lib/components/basic_table/basic_table.js +25 -22
  31. package/lib/components/basic_table/collapsed_item_actions.js +14 -15
  32. package/lib/components/basic_table/expanded_item_actions.js +4 -4
  33. package/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -3
  34. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  35. package/lib/components/filter_group/filter_button.js +20 -13
  36. package/lib/components/filter_group/filter_button.styles.js +11 -20
  37. package/lib/components/flyout/flyout.js +4 -4
  38. package/lib/components/flyout/flyout_resizable.js +136 -0
  39. package/lib/components/flyout/flyout_resizable.styles.js +32 -0
  40. package/lib/components/flyout/index.js +8 -1
  41. package/lib/components/form/range/dual_range.js +15 -66
  42. package/lib/components/form/range/range.js +6 -5
  43. package/lib/components/form/range/range_slider.js +27 -21
  44. package/lib/components/form/text_area/text_area.js +42 -3
  45. package/lib/components/index.js +0 -22
  46. package/lib/components/markdown_editor/markdown_editor.js +12 -13
  47. package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  48. package/lib/components/pagination/pagination_button.js +79 -2
  49. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  50. package/lib/components/tree_view/tree_view.js +23 -25
  51. package/lib/utils/prop_types/is.js +2 -2
  52. package/optimize/es/components/basic_table/basic_table.js +25 -22
  53. package/optimize/es/components/basic_table/collapsed_item_actions.js +14 -15
  54. package/optimize/es/components/basic_table/expanded_item_actions.js +4 -4
  55. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +3 -3
  56. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  57. package/optimize/es/components/filter_group/filter_button.js +20 -13
  58. package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
  59. package/optimize/es/components/flyout/flyout.js +4 -4
  60. package/optimize/es/components/flyout/flyout_resizable.js +121 -0
  61. package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
  62. package/optimize/es/components/flyout/index.js +2 -1
  63. package/optimize/es/components/form/range/dual_range.js +15 -66
  64. package/optimize/es/components/form/range/range.js +6 -5
  65. package/optimize/es/components/form/range/range_slider.js +26 -21
  66. package/optimize/es/components/form/text_area/text_area.js +29 -3
  67. package/optimize/es/components/index.js +0 -2
  68. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
  69. package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  70. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  71. package/optimize/es/components/tree_view/tree_view.js +23 -25
  72. package/optimize/es/utils/prop_types/is.js +2 -2
  73. package/optimize/lib/components/basic_table/basic_table.js +25 -22
  74. package/optimize/lib/components/basic_table/collapsed_item_actions.js +14 -15
  75. package/optimize/lib/components/basic_table/expanded_item_actions.js +4 -4
  76. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -3
  77. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  78. package/optimize/lib/components/filter_group/filter_button.js +20 -13
  79. package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
  80. package/optimize/lib/components/flyout/flyout.js +4 -4
  81. package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
  82. package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
  83. package/optimize/lib/components/flyout/index.js +8 -1
  84. package/optimize/lib/components/form/range/dual_range.js +15 -66
  85. package/optimize/lib/components/form/range/range.js +6 -5
  86. package/optimize/lib/components/form/range/range_slider.js +26 -21
  87. package/optimize/lib/components/form/text_area/text_area.js +32 -3
  88. package/optimize/lib/components/index.js +0 -22
  89. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
  90. package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  91. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  92. package/optimize/lib/components/tree_view/tree_view.js +23 -25
  93. package/optimize/lib/utils/prop_types/is.js +2 -2
  94. package/package.json +3 -5
  95. package/src/components/index.scss +0 -2
  96. package/test-env/components/basic_table/basic_table.js +25 -22
  97. package/test-env/components/basic_table/collapsed_item_actions.js +14 -15
  98. package/test-env/components/basic_table/expanded_item_actions.js +4 -4
  99. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +3 -3
  100. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  101. package/test-env/components/filter_group/filter_button.js +20 -13
  102. package/test-env/components/filter_group/filter_button.styles.js +11 -20
  103. package/test-env/components/flyout/flyout_resizable.js +131 -0
  104. package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
  105. package/test-env/components/flyout/index.js +8 -1
  106. package/test-env/components/form/range/dual_range.js +15 -66
  107. package/test-env/components/form/range/range.js +6 -5
  108. package/test-env/components/form/range/range_slider.js +27 -21
  109. package/test-env/components/form/text_area/text_area.js +42 -3
  110. package/test-env/components/index.js +0 -22
  111. package/test-env/components/markdown_editor/markdown_editor.js +12 -13
  112. package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  113. package/test-env/components/pagination/pagination_button.js +79 -2
  114. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  115. package/test-env/components/tree_view/tree_view.js +23 -25
  116. package/test-env/utils/prop_types/is.js +2 -2
  117. package/es/components/control_bar/control_bar.a11y.js +0 -133
  118. package/es/components/control_bar/control_bar.js +0 -609
  119. package/es/components/control_bar/index.js +0 -9
  120. package/es/components/notification/index.js +0 -9
  121. package/es/components/notification/notification_event.a11y.js +0 -104
  122. package/es/components/notification/notification_event.js +0 -288
  123. package/es/components/notification/notification_event_messages.js +0 -79
  124. package/es/components/notification/notification_event_meta.js +0 -148
  125. package/es/components/notification/notification_event_read_button.js +0 -86
  126. package/es/components/notification/notification_event_read_icon.js +0 -77
  127. package/lib/components/control_bar/control_bar.a11y.js +0 -134
  128. package/lib/components/control_bar/control_bar.js +0 -441
  129. package/lib/components/control_bar/index.js +0 -12
  130. package/lib/components/notification/index.js +0 -12
  131. package/lib/components/notification/notification_event.a11y.js +0 -105
  132. package/lib/components/notification/notification_event.js +0 -297
  133. package/lib/components/notification/notification_event_messages.js +0 -88
  134. package/lib/components/notification/notification_event_meta.js +0 -157
  135. package/lib/components/notification/notification_event_read_button.js +0 -93
  136. package/lib/components/notification/notification_event_read_icon.js +0 -64
  137. package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
  138. package/optimize/es/components/control_bar/control_bar.js +0 -308
  139. package/optimize/es/components/control_bar/index.js +0 -9
  140. package/optimize/es/components/notification/index.js +0 -9
  141. package/optimize/es/components/notification/notification_event.a11y.js +0 -99
  142. package/optimize/es/components/notification/notification_event.js +0 -114
  143. package/optimize/es/components/notification/notification_event_messages.js +0 -63
  144. package/optimize/es/components/notification/notification_event_meta.js +0 -106
  145. package/optimize/es/components/notification/notification_event_read_button.js +0 -44
  146. package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
  147. package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
  148. package/optimize/lib/components/control_bar/control_bar.js +0 -301
  149. package/optimize/lib/components/control_bar/index.js +0 -12
  150. package/optimize/lib/components/notification/index.js +0 -12
  151. package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
  152. package/optimize/lib/components/notification/notification_event.js +0 -123
  153. package/optimize/lib/components/notification/notification_event_messages.js +0 -74
  154. package/optimize/lib/components/notification/notification_event_meta.js +0 -117
  155. package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
  156. package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
  157. package/src/components/control_bar/_control_bar.scss +0 -232
  158. package/src/components/control_bar/_index.scss +0 -2
  159. package/src/components/control_bar/_variables.scss +0 -12
  160. package/src/components/notification/_index.scss +0 -5
  161. package/src/components/notification/_notification_event.scss +0 -40
  162. package/src/components/notification/_notification_event_messages.scss +0 -17
  163. package/src/components/notification/_notification_event_meta.scss +0 -44
  164. package/src/components/notification/_notification_event_read_button.scss +0 -5
  165. package/src/components/notification/_notification_event_read_icon.scss +0 -12
  166. package/test-env/components/control_bar/control_bar.a11y.js +0 -134
  167. package/test-env/components/control_bar/control_bar.js +0 -436
  168. package/test-env/components/control_bar/index.js +0 -12
  169. package/test-env/components/notification/index.js +0 -12
  170. package/test-env/components/notification/notification_event.a11y.js +0 -105
  171. package/test-env/components/notification/notification_event.js +0 -296
  172. package/test-env/components/notification/notification_event_messages.js +0 -85
  173. package/test-env/components/notification/notification_event_meta.js +0 -154
  174. package/test-env/components/notification/notification_event_read_button.js +0 -92
  175. package/test-env/components/notification/notification_event_read_icon.js +0 -63
@@ -68,38 +68,10 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
68
68
  _this = _super.call.apply(_super, [this].concat(args));
69
69
  _defineProperty(_assertThisInitialized(_this), "state", {
70
70
  id: _this.props.id || (0, _services.htmlIdGenerator)()(),
71
- rangeSliderRefAvailable: false,
72
71
  isPopoverOpen: false,
73
- rangeWidth: 0,
74
- isVisible: true // used to trigger a rerender if initial element width is 0
72
+ rangeWidth: 0
75
73
  });
76
74
  _defineProperty(_assertThisInitialized(_this), "preventPopoverClose", false);
77
- _defineProperty(_assertThisInitialized(_this), "rangeSliderRef", null);
78
- _defineProperty(_assertThisInitialized(_this), "handleRangeSliderRefUpdate", function (ref) {
79
- _this.rangeSliderRef = ref;
80
- if (ref) {
81
- if (_this.isInPopover) {
82
- // Wait a tick for popover rendering to settle
83
- requestAnimationFrame(function () {
84
- _this.setState({
85
- rangeSliderRefAvailable: true,
86
- rangeWidth: ref.clientWidth
87
- });
88
- });
89
- } else {
90
- // If not in a popover, no need to wait
91
- _this.setState({
92
- rangeSliderRefAvailable: true,
93
- rangeWidth: ref.clientWidth
94
- });
95
- }
96
- } else {
97
- _this.setState({
98
- rangeSliderRefAvailable: false,
99
- rangeWidth: 0
100
- });
101
- }
102
- });
103
75
  _defineProperty(_assertThisInitialized(_this), "leftPosition", 0);
104
76
  _defineProperty(_assertThisInitialized(_this), "dragAcc", 0);
105
77
  _defineProperty(_assertThisInitialized(_this), "_determineInvalidThumbMovement", function (newVal, lower, upper, e) {
@@ -290,14 +262,11 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
290
262
  isPopoverOpen: false
291
263
  });
292
264
  });
293
- _defineProperty(_assertThisInitialized(_this), "onResize", function (width) {
294
- var _this$props$inputPopo, _this$props$inputPopo2;
295
- if (_this.rangeSliderRef) {
296
- _this.setState({
297
- rangeWidth: _this.rangeSliderRef.clientWidth
298
- });
299
- }
300
- (_this$props$inputPopo = _this.props.inputPopoverProps) === null || _this$props$inputPopo === void 0 ? void 0 : (_this$props$inputPopo2 = _this$props$inputPopo.onPanelResize) === null || _this$props$inputPopo2 === void 0 ? void 0 : _this$props$inputPopo2.call(_this$props$inputPopo, width);
265
+ _defineProperty(_assertThisInitialized(_this), "setRangeWidth", function (_ref) {
266
+ var width = _ref.width;
267
+ _this.setState({
268
+ rangeWidth: width
269
+ });
301
270
  });
302
271
  _defineProperty(_assertThisInitialized(_this), "getNearestStep", function (value) {
303
272
  var min = _this.props.min;
@@ -320,7 +289,7 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
320
289
  var delta = _this.leftPosition - x;
321
290
  _this.leftPosition = x;
322
291
  _this.dragAcc = _this.dragAcc + delta;
323
- var percentageOfArea = _this.dragAcc / _this.rangeSliderRef.clientWidth;
292
+ var percentageOfArea = _this.dragAcc / _this.state.rangeWidth;
324
293
  var percentageOfRange = percentageOfArea * (max - min);
325
294
  var newLower = _this.getNearestStep(lowerValue - percentageOfRange);
326
295
  var newUpper = _this.getNearestStep(upperValue - percentageOfRange);
@@ -364,32 +333,12 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
364
333
  get: function get() {
365
334
  return this.lowerValueIsValid && this.upperValueIsValid;
366
335
  }
367
- }, {
368
- key: "componentDidMount",
369
- value: function componentDidMount() {
370
- var _this$rangeSliderRef;
371
- if (((_this$rangeSliderRef = this.rangeSliderRef) === null || _this$rangeSliderRef === void 0 ? void 0 : _this$rangeSliderRef.clientWidth) === 0) {
372
- this.setState({
373
- isVisible: false
374
- });
375
- }
376
- }
377
- }, {
378
- key: "componentDidUpdate",
379
- value: function componentDidUpdate() {
380
- var _this$rangeSliderRef2;
381
- if ((_this$rangeSliderRef2 = this.rangeSliderRef) !== null && _this$rangeSliderRef2 !== void 0 && _this$rangeSliderRef2.clientWidth && !this.state.isVisible) {
382
- this.setState({
383
- isVisible: true
384
- });
385
- }
386
- }
387
336
  }, {
388
337
  key: "render",
389
338
  value: function render() {
390
339
  var _this2 = this;
391
- var _ref = this.context,
392
- defaultFullWidth = _ref.defaultFullWidth;
340
+ var _ref2 = this.context,
341
+ defaultFullWidth = _ref2.defaultFullWidth;
393
342
  var _this$props = this.props,
394
343
  className = _this$props.className,
395
344
  customCss = _this$props.css,
@@ -545,10 +494,10 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
545
494
  var classes = (0, _classnames.default)('euiDualRange', className);
546
495
  var dualRangeStyles = (0, _dual_range.euiDualRangeStyles)();
547
496
  var cssStyles = [dualRangeStyles.euiDualRange, customCss];
548
- var leftThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
497
+ var leftThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
549
498
  left: '0'
550
499
  };
551
- var rightThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
500
+ var rightThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
552
501
  left: '0'
553
502
  };
554
503
  var leftThumbColor = levels && (0, _range_levels_colors.getLevelColor)(levels, Number(this.lowerValue));
@@ -592,7 +541,6 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
592
541
  }, (0, _react2.jsx)(_range_slider.EuiRangeSlider, _extends({
593
542
  className: "euiDualRange__slider",
594
543
  css: dualRangeStyles.euiDualRange__slider,
595
- ref: this.handleRangeSliderRefUpdate,
596
544
  id: id,
597
545
  name: name,
598
546
  min: min,
@@ -606,7 +554,9 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
606
554
  showRange: showRange,
607
555
  onFocus: _onFocus,
608
556
  onBlur: _onBlur
609
- }, rest)), this.state.rangeSliderRefAvailable && (0, _react2.jsx)(_react.default.Fragment, null, isDraggable && this.isValid && (0, _react2.jsx)(_range_draggable.EuiRangeDraggable, {
557
+ }, rest, {
558
+ onResize: this.setRangeWidth
559
+ })), isDraggable && this.isValid && (0, _react2.jsx)(_range_draggable.EuiRangeDraggable, {
610
560
  min: min,
611
561
  max: max,
612
562
  value: [this.lowerValue, this.upperValue],
@@ -646,7 +596,7 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
646
596
  style: (0, _global_styling.logicalStyles)(rightThumbStyles),
647
597
  "aria-describedby": showInputOnly ? undefined : this.props['aria-describedby'],
648
598
  "aria-label": showInputOnly ? undefined : this.props['aria-label']
649
- })), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
599
+ }), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
650
600
  showTicks: showTicks,
651
601
  min: Number(min),
652
602
  max: Number(max),
@@ -678,7 +628,6 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
678
628
  isOpen: this.state.isPopoverOpen,
679
629
  closePopover: this.closePopover,
680
630
  disableFocusTrap: true,
681
- onPanelResize: this.onResize,
682
631
  popoverScreenReaderText: dualSliderScreenReaderInstructions
683
632
  }), theRange) : undefined;
684
633
  return thePopover || theRange;
@@ -71,9 +71,10 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
71
71
  _this.props.onChange(e, isValid);
72
72
  }
73
73
  });
74
- _defineProperty(_assertThisInitialized(_this), "rangeSliderRef", function (ref) {
74
+ _defineProperty(_assertThisInitialized(_this), "setTrackWidth", function (_ref) {
75
+ var width = _ref.width;
75
76
  _this.setState({
76
- trackWidth: (ref === null || ref === void 0 ? void 0 : ref.clientWidth) || 0
77
+ trackWidth: width
77
78
  });
78
79
  });
79
80
  _defineProperty(_assertThisInitialized(_this), "onInputFocus", function (e) {
@@ -117,8 +118,8 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
117
118
  key: "render",
118
119
  value: function render() {
119
120
  var _this2 = this;
120
- var _ref = this.context,
121
- defaultFullWidth = _ref.defaultFullWidth;
121
+ var _ref2 = this.context,
122
+ defaultFullWidth = _ref2.defaultFullWidth;
122
123
  var _this$props = this.props,
123
124
  className = _this$props.className,
124
125
  compressed = _this$props.compressed,
@@ -224,7 +225,7 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
224
225
  "aria-hidden": !!showInput,
225
226
  thumbColor: thumbColor
226
227
  }, rest, {
227
- ref: this.rangeSliderRef
228
+ onResize: this.setTrackWidth
228
229
  })), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
229
230
  showTicks: showTicks,
230
231
  min: Number(min),
@@ -10,10 +10,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _services = require("../../../services");
12
12
  var _global_styling = require("../../../global_styling");
13
+ var _resize_observer = require("../../observer/resize_observer");
13
14
  var _range_levels_colors = require("./range_levels_colors");
14
15
  var _range_slider = require("./range_slider.styles");
15
16
  var _react2 = require("@emotion/react");
16
- var _excluded = ["className", "disabled", "id", "max", "min", "name", "step", "onChange", "tabIndex", "value", "style", "showTicks", "showRange", "thumbColor"];
17
+ var _excluded = ["className", "disabled", "id", "max", "min", "name", "step", "onChange", "tabIndex", "value", "style", "showTicks", "showRange", "thumbColor", "onResize"];
17
18
  /*
18
19
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
20
  * or more contributor license agreements. Licensed under the Elastic License
@@ -32,7 +33,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
32
33
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
33
34
  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; }
34
35
  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; }
35
- var EuiRangeSlider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
36
+ var EuiRangeSlider = function EuiRangeSlider(_ref) {
36
37
  var className = _ref.className,
37
38
  disabled = _ref.disabled,
38
39
  id = _ref.id,
@@ -47,6 +48,7 @@ var EuiRangeSlider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
47
48
  showTicks = _ref.showTicks,
48
49
  showRange = _ref.showRange,
49
50
  thumbColor = _ref.thumbColor,
51
+ onResize = _ref.onResize,
50
52
  rest = _objectWithoutProperties(_ref, _excluded);
51
53
  var classes = (0, _classnames.default)('euiRangeSlider', className);
52
54
  var euiTheme = (0, _services.useEuiTheme)();
@@ -58,30 +60,34 @@ var EuiRangeSlider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
58
60
  color: thumbColor && (0, _range_levels_colors.euiRangeLevelColor)(thumbColor, euiTheme.euiTheme)
59
61
  }, style));
60
62
  }, [thumbColor, euiTheme, style]);
61
- return (0, _react2.jsx)("input", _extends({
62
- ref: ref,
63
- type: "range",
64
- id: id,
65
- name: name,
66
- className: classes,
67
- css: cssStyles,
68
- min: min,
69
- max: max,
70
- step: step,
71
- value: value,
72
- disabled: disabled,
73
- onChange: onChange,
74
- style: sliderStyle,
75
- tabIndex: tabIndex
76
- }, rest));
77
- });
63
+ return (0, _react2.jsx)(_resize_observer.EuiResizeObserver, {
64
+ onResize: onResize
65
+ }, function (resizeRef) {
66
+ return (0, _react2.jsx)("input", _extends({
67
+ ref: resizeRef,
68
+ type: "range",
69
+ id: id,
70
+ name: name,
71
+ className: classes,
72
+ css: cssStyles,
73
+ min: min,
74
+ max: max,
75
+ step: step,
76
+ value: value,
77
+ disabled: disabled,
78
+ onChange: onChange,
79
+ style: sliderStyle,
80
+ tabIndex: tabIndex
81
+ }, rest));
82
+ });
83
+ };
78
84
  exports.EuiRangeSlider = EuiRangeSlider;
79
85
  EuiRangeSlider.propTypes = {
80
86
  onChange: _propTypes.default.any,
81
87
  thumbColor: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
88
+ onResize: _propTypes.default.func.isRequired,
82
89
  className: _propTypes.default.string,
83
90
  "aria-label": _propTypes.default.string,
84
91
  "data-test-subj": _propTypes.default.string,
85
92
  css: _propTypes.default.any
86
- };
87
- EuiRangeSlider.displayName = 'EuiRangeSlider';
93
+ };
@@ -1,17 +1,19 @@
1
1
  "use strict";
2
2
 
3
+ 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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.RESIZE = exports.EuiTextArea = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
8
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _services = require("../../../services");
10
12
  var _form_control_layout = require("../form_control_layout");
11
13
  var _validatable_control = require("../validatable_control");
12
14
  var _eui_form_context = require("../eui_form_context");
13
15
  var _react2 = require("@emotion/react");
14
- var _excluded = ["children", "className", "compressed", "fullWidth", "id", "inputRef", "isLoading", "isInvalid", "name", "placeholder", "resize", "rows"];
16
+ var _excluded = ["children", "className", "compressed", "fullWidth", "id", "icon", "inputRef", "isLoading", "isInvalid", "isClearable", "name", "placeholder", "resize", "rows"];
15
17
  /*
16
18
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
17
19
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,6 +22,8 @@ var _excluded = ["children", "className", "compressed", "fullWidth", "id", "inpu
20
22
  * Side Public License, v 1.
21
23
  */
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+ 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); }
26
+ 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; }
23
27
  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); }
24
28
  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; }
25
29
  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; }
@@ -40,9 +44,11 @@ var EuiTextArea = function EuiTextArea(props) {
40
44
  _props$fullWidth = props.fullWidth,
41
45
  fullWidth = _props$fullWidth === void 0 ? defaultFullWidth : _props$fullWidth,
42
46
  id = props.id,
47
+ icon = props.icon,
43
48
  inputRef = props.inputRef,
44
49
  isLoading = props.isLoading,
45
50
  isInvalid = props.isInvalid,
51
+ isClearable = props.isClearable,
46
52
  name = props.name,
47
53
  placeholder = props.placeholder,
48
54
  _props$resize = props.resize,
@@ -61,10 +67,33 @@ var EuiTextArea = function EuiTextArea(props) {
61
67
  } else {
62
68
  definedRows = 6;
63
69
  }
70
+ var ref = (0, _react.useRef)(null);
71
+ var refs = (0, _services.useCombinedRefs)([ref, inputRef]);
72
+ var clear = (0, _react.useMemo)(function () {
73
+ if (isClearable) {
74
+ return {
75
+ onClick: function onClick() {
76
+ if (ref.current) {
77
+ ref.current.value = '';
78
+ var event = new Event('input', {
79
+ bubbles: true,
80
+ cancelable: false
81
+ });
82
+ ref.current.dispatchEvent(event);
83
+ ref.current.focus(); // set focus back to the textarea
84
+ }
85
+ },
86
+
87
+ 'data-test-subj': 'clearTextAreaButton'
88
+ };
89
+ }
90
+ }, [isClearable]);
64
91
  return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, {
65
92
  fullWidth: fullWidth,
66
93
  isLoading: isLoading,
67
94
  isInvalid: isInvalid,
95
+ clear: clear,
96
+ icon: icon,
68
97
  className: "euiFormControlLayout--euiTextArea"
69
98
  }, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
70
99
  isInvalid: isInvalid
@@ -74,7 +103,7 @@ var EuiTextArea = function EuiTextArea(props) {
74
103
  rows: definedRows,
75
104
  name: name,
76
105
  id: id,
77
- ref: inputRef,
106
+ ref: refs,
78
107
  placeholder: placeholder
79
108
  }), children)));
80
109
  };
@@ -84,8 +113,18 @@ EuiTextArea.propTypes = {
84
113
  "aria-label": _propTypes.default.string,
85
114
  "data-test-subj": _propTypes.default.string,
86
115
  css: _propTypes.default.any,
116
+ icon: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "esqlVis", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired, _propTypes.default.shape({
117
+ type: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "esqlVis", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired,
118
+ side: _propTypes.default.any,
119
+ color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.any.isRequired]),
120
+ ref: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.func.isRequired])
121
+ }).isRequired]),
87
122
  isLoading: _propTypes.default.bool,
88
123
  isInvalid: _propTypes.default.bool,
124
+ /**
125
+ * Shows a button that allows users to quickly clear the textarea
126
+ */
127
+ isClearable: _propTypes.default.bool,
89
128
  /**
90
129
  * Expand to fill 100% of the parent.
91
130
  * Defaults to `fullWidth` prop of `<EuiForm>`.
@@ -223,17 +223,6 @@ Object.keys(_context_menu).forEach(function (key) {
223
223
  }
224
224
  });
225
225
  });
226
- var _control_bar = require("./control_bar");
227
- Object.keys(_control_bar).forEach(function (key) {
228
- if (key === "default" || key === "__esModule") return;
229
- if (key in exports && exports[key] === _control_bar[key]) return;
230
- Object.defineProperty(exports, key, {
231
- enumerable: true,
232
- get: function get() {
233
- return _control_bar[key];
234
- }
235
- });
236
- });
237
226
  var _copy = require("./copy");
238
227
  Object.keys(_copy).forEach(function (key) {
239
228
  if (key === "default" || key === "__esModule") return;
@@ -597,17 +586,6 @@ Object.keys(_mutation_observer).forEach(function (key) {
597
586
  }
598
587
  });
599
588
  });
600
- var _notification = require("./notification");
601
- Object.keys(_notification).forEach(function (key) {
602
- if (key === "default" || key === "__esModule") return;
603
- if (key in exports && exports[key] === _notification[key]) return;
604
- Object.defineProperty(exports, key, {
605
- enumerable: true,
606
- get: function get() {
607
- return _notification[key];
608
- }
609
- });
610
- });
611
589
  var _outside_click_detector = require("./outside_click_detector");
612
590
  Object.keys(_outside_click_detector).forEach(function (key) {
613
591
  if (key === "default" || key === "__esModule") return;
@@ -274,20 +274,19 @@ var EuiMarkdownEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
274
274
  setEditorToolbarHeight(editorToolbarRef.current.offsetHeight);
275
275
  }, [setEditorToolbarHeight]);
276
276
  (0, _react.useEffect)(function () {
277
- if (isPreviewing && autoExpandPreview && height !== 'full') {
278
- if (previewRef.current.scrollHeight > currentHeight) {
279
- // scrollHeight does not include the border or margin
280
- // so we ask for the computed value for those,
281
- // which is always in pixels because getComputedValue
282
- // returns the resolved values
283
- var elementComputedStyle = window.getComputedStyle(previewRef.current);
284
- var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
285
- var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
277
+ if (height === 'full' || currentHeight === 'full') return;
278
+ if (isPreviewing && autoExpandPreview && previewRef.current.scrollHeight > currentHeight) {
279
+ // scrollHeight does not include the border or margin
280
+ // so we ask for the computed value for those,
281
+ // which is always in pixels because getComputedValue
282
+ // returns the resolved values
283
+ var elementComputedStyle = window.getComputedStyle(previewRef.current);
284
+ var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
285
+ var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
286
286
 
287
- // then add an extra pixel for safety and because the scrollHeight value is rounded
288
- var extraHeight = borderWidth + marginWidth + 1;
289
- setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
290
- }
287
+ // then add an extra pixel for safety and because the scrollHeight value is rounded
288
+ var extraHeight = borderWidth + marginWidth + 1;
289
+ setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
291
290
  }
292
291
  }, [currentHeight, isPreviewing, height, autoExpandPreview]);
293
292
  var previewHeight = height === 'full' ? "calc(100% - ".concat(editorFooterHeight, "px)") : currentHeight;
@@ -69,7 +69,7 @@ var _EuiPageBottomBar = function _EuiPageBottomBar(_ref2) {
69
69
  // Hide the overflow in case of larger flex margins than padding
70
70
  ,
71
71
  css: _ref
72
- // Using unknown here because of the possible conflict with overriding props and position `sticky`
72
+ // Using object here because of the possible conflict with overriding props and position `sticky`
73
73
  }, rest), (0, _react.jsx)(_page_section.EuiPageSection, {
74
74
  paddingSize: paddingSize,
75
75
  restrictWidth: restrictWidth
@@ -76,8 +76,85 @@ var EuiPaginationButton = function EuiPaginationButton(_ref) {
76
76
  };
77
77
  exports.EuiPaginationButton = EuiPaginationButton;
78
78
  EuiPaginationButton.propTypes = {
79
- href: _propTypes.default.string,
80
- onClick: _propTypes.default.func,
79
+ href: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]), _propTypes.default.string]),
80
+ onClick: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.func]),
81
+ /**
82
+ * Any of the named color palette options.
83
+ */
84
+ color: _propTypes.default.any,
85
+ size: _propTypes.default.any,
86
+ /**
87
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
88
+ */
89
+ /**
90
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
91
+ */
92
+ flush: _propTypes.default.any,
93
+ /**
94
+ * `disabled` is also allowed
95
+ */
96
+ /**
97
+ * `disabled` is also allowed
98
+ */
99
+ isDisabled: _propTypes.default.bool,
100
+ /**
101
+ * Force disables the button and changes the icon to a loading spinner
102
+ */
103
+ /**
104
+ * Force disables the button and changes the icon to a loading spinner
105
+ */
106
+ isLoading: _propTypes.default.bool,
107
+ /**
108
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
109
+ * *Only use when the readable text does not change between states.*
110
+ */
111
+ /**
112
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
113
+ * *Only use when the readable text does not change between states.*
114
+ */
115
+ isSelected: _propTypes.default.bool,
116
+ target: _propTypes.default.string,
117
+ rel: _propTypes.default.string,
118
+ type: _propTypes.default.oneOf(["button", "submit"]),
119
+ buttonRef: _propTypes.default.any,
120
+ /**
121
+ * Object of props passed to the `<span>` wrapping the button's content
122
+ */
123
+ /**
124
+ * Object of props passed to the `<span>` wrapping the button's content
125
+ */
126
+ contentProps: _propTypes.default.shape({
127
+ className: _propTypes.default.string,
128
+ "aria-label": _propTypes.default.string,
129
+ "data-test-subj": _propTypes.default.string,
130
+ css: _propTypes.default.any
131
+ }),
132
+ /**
133
+ * Any `type` accepted by EuiIcon
134
+ */
135
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "esqlVis", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
136
+ /**
137
+ * Can only be one side `left` or `right`
138
+ */
139
+ iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
140
+ /**
141
+ * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
142
+ *
143
+ * This span wrapper can be removed by passing `textProps={false}`.
144
+ */
145
+ textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
146
+ className: _propTypes.default.string,
147
+ "aria-label": _propTypes.default.string,
148
+ "data-test-subj": _propTypes.default.string,
149
+ css: _propTypes.default.any,
150
+ ref: _propTypes.default.any,
151
+ "data-text": _propTypes.default.string
152
+ }).isRequired, _propTypes.default.oneOf([false])]),
153
+ iconSize: _propTypes.default.any,
154
+ className: _propTypes.default.string,
155
+ "aria-label": _propTypes.default.string,
156
+ "data-test-subj": _propTypes.default.string,
157
+ css: _propTypes.default.any,
81
158
  isActive: _propTypes.default.bool,
82
159
  pageIndex: _propTypes.default.number.isRequired,
83
160
  totalPages: _propTypes.default.number
@@ -223,7 +223,7 @@ var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
223
223
  onFocusBadgeNode = (0, _react2.jsx)(_badge.EuiBadge, _extends({
224
224
  className: "euiSelectableListItem__onFocusBadge"
225
225
  }, defaultOnFocusBadgeProps));
226
- } else if (!!onFocusBadge && onFocusBadge !== false) {
226
+ } else if (typeof onFocusBadge !== 'boolean' && !!onFocusBadge) {
227
227
  var _children = onFocusBadge.children,
228
228
  _className = onFocusBadge.className,
229
229
  restBadgeProps = _objectWithoutProperties(onFocusBadge, _excluded2);