@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
@@ -61,38 +61,10 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
61
61
  _this = _super.call.apply(_super, [this].concat(args));
62
62
  _defineProperty(_assertThisInitialized(_this), "state", {
63
63
  id: _this.props.id || htmlIdGenerator()(),
64
- rangeSliderRefAvailable: false,
65
64
  isPopoverOpen: false,
66
- rangeWidth: 0,
67
- isVisible: true // used to trigger a rerender if initial element width is 0
65
+ rangeWidth: 0
68
66
  });
69
67
  _defineProperty(_assertThisInitialized(_this), "preventPopoverClose", false);
70
- _defineProperty(_assertThisInitialized(_this), "rangeSliderRef", null);
71
- _defineProperty(_assertThisInitialized(_this), "handleRangeSliderRefUpdate", function (ref) {
72
- _this.rangeSliderRef = ref;
73
- if (ref) {
74
- if (_this.isInPopover) {
75
- // Wait a tick for popover rendering to settle
76
- requestAnimationFrame(function () {
77
- _this.setState({
78
- rangeSliderRefAvailable: true,
79
- rangeWidth: ref.clientWidth
80
- });
81
- });
82
- } else {
83
- // If not in a popover, no need to wait
84
- _this.setState({
85
- rangeSliderRefAvailable: true,
86
- rangeWidth: ref.clientWidth
87
- });
88
- }
89
- } else {
90
- _this.setState({
91
- rangeSliderRefAvailable: false,
92
- rangeWidth: 0
93
- });
94
- }
95
- });
96
68
  _defineProperty(_assertThisInitialized(_this), "leftPosition", 0);
97
69
  _defineProperty(_assertThisInitialized(_this), "dragAcc", 0);
98
70
  _defineProperty(_assertThisInitialized(_this), "_determineInvalidThumbMovement", function (newVal, lower, upper, e) {
@@ -283,14 +255,11 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
283
255
  isPopoverOpen: false
284
256
  });
285
257
  });
286
- _defineProperty(_assertThisInitialized(_this), "onResize", function (width) {
287
- var _this$props$inputPopo, _this$props$inputPopo2;
288
- if (_this.rangeSliderRef) {
289
- _this.setState({
290
- rangeWidth: _this.rangeSliderRef.clientWidth
291
- });
292
- }
293
- (_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);
258
+ _defineProperty(_assertThisInitialized(_this), "setRangeWidth", function (_ref) {
259
+ var width = _ref.width;
260
+ _this.setState({
261
+ rangeWidth: width
262
+ });
294
263
  });
295
264
  _defineProperty(_assertThisInitialized(_this), "getNearestStep", function (value) {
296
265
  var min = _this.props.min;
@@ -313,7 +282,7 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
313
282
  var delta = _this.leftPosition - x;
314
283
  _this.leftPosition = x;
315
284
  _this.dragAcc = _this.dragAcc + delta;
316
- var percentageOfArea = _this.dragAcc / _this.rangeSliderRef.clientWidth;
285
+ var percentageOfArea = _this.dragAcc / _this.state.rangeWidth;
317
286
  var percentageOfRange = percentageOfArea * (max - min);
318
287
  var newLower = _this.getNearestStep(lowerValue - percentageOfRange);
319
288
  var newUpper = _this.getNearestStep(upperValue - percentageOfRange);
@@ -357,32 +326,12 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
357
326
  get: function get() {
358
327
  return this.lowerValueIsValid && this.upperValueIsValid;
359
328
  }
360
- }, {
361
- key: "componentDidMount",
362
- value: function componentDidMount() {
363
- var _this$rangeSliderRef;
364
- if (((_this$rangeSliderRef = this.rangeSliderRef) === null || _this$rangeSliderRef === void 0 ? void 0 : _this$rangeSliderRef.clientWidth) === 0) {
365
- this.setState({
366
- isVisible: false
367
- });
368
- }
369
- }
370
- }, {
371
- key: "componentDidUpdate",
372
- value: function componentDidUpdate() {
373
- var _this$rangeSliderRef2;
374
- if ((_this$rangeSliderRef2 = this.rangeSliderRef) !== null && _this$rangeSliderRef2 !== void 0 && _this$rangeSliderRef2.clientWidth && !this.state.isVisible) {
375
- this.setState({
376
- isVisible: true
377
- });
378
- }
379
- }
380
329
  }, {
381
330
  key: "render",
382
331
  value: function render() {
383
332
  var _this2 = this;
384
- var _ref = this.context,
385
- defaultFullWidth = _ref.defaultFullWidth;
333
+ var _ref2 = this.context,
334
+ defaultFullWidth = _ref2.defaultFullWidth;
386
335
  var _this$props = this.props,
387
336
  className = _this$props.className,
388
337
  customCss = _this$props.css,
@@ -538,10 +487,10 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
538
487
  var classes = classNames('euiDualRange', className);
539
488
  var dualRangeStyles = euiDualRangeStyles();
540
489
  var cssStyles = [dualRangeStyles.euiDualRange, customCss];
541
- var leftThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
490
+ var leftThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
542
491
  left: '0'
543
492
  };
544
- var rightThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
493
+ var rightThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
545
494
  left: '0'
546
495
  };
547
496
  var leftThumbColor = levels && getLevelColor(levels, Number(this.lowerValue));
@@ -585,7 +534,6 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
585
534
  }, ___EmotionJSX(EuiRangeSlider, _extends({
586
535
  className: "euiDualRange__slider",
587
536
  css: dualRangeStyles.euiDualRange__slider,
588
- ref: this.handleRangeSliderRefUpdate,
589
537
  id: id,
590
538
  name: name,
591
539
  min: min,
@@ -599,7 +547,9 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
599
547
  showRange: showRange,
600
548
  onFocus: _onFocus,
601
549
  onBlur: _onBlur
602
- }, rest)), this.state.rangeSliderRefAvailable && ___EmotionJSX(React.Fragment, null, isDraggable && this.isValid && ___EmotionJSX(EuiRangeDraggable, {
550
+ }, rest, {
551
+ onResize: this.setRangeWidth
552
+ })), isDraggable && this.isValid && ___EmotionJSX(EuiRangeDraggable, {
603
553
  min: min,
604
554
  max: max,
605
555
  value: [this.lowerValue, this.upperValue],
@@ -639,7 +589,7 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
639
589
  style: logicalStyles(rightThumbStyles),
640
590
  "aria-describedby": showInputOnly ? undefined : this.props['aria-describedby'],
641
591
  "aria-label": showInputOnly ? undefined : this.props['aria-label']
642
- })), showRange && this.isValid && ___EmotionJSX(EuiRangeHighlight, {
592
+ }), showRange && this.isValid && ___EmotionJSX(EuiRangeHighlight, {
643
593
  showTicks: showTicks,
644
594
  min: Number(min),
645
595
  max: Number(max),
@@ -671,7 +621,6 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
671
621
  isOpen: this.state.isPopoverOpen,
672
622
  closePopover: this.closePopover,
673
623
  disableFocusTrap: true,
674
- onPanelResize: this.onResize,
675
624
  popoverScreenReaderText: dualSliderScreenReaderInstructions
676
625
  }), theRange) : undefined;
677
626
  return thePopover || theRange;
@@ -64,9 +64,10 @@ export var EuiRangeClass = /*#__PURE__*/function (_Component) {
64
64
  _this.props.onChange(e, isValid);
65
65
  }
66
66
  });
67
- _defineProperty(_assertThisInitialized(_this), "rangeSliderRef", function (ref) {
67
+ _defineProperty(_assertThisInitialized(_this), "setTrackWidth", function (_ref) {
68
+ var width = _ref.width;
68
69
  _this.setState({
69
- trackWidth: (ref === null || ref === void 0 ? void 0 : ref.clientWidth) || 0
70
+ trackWidth: width
70
71
  });
71
72
  });
72
73
  _defineProperty(_assertThisInitialized(_this), "onInputFocus", function (e) {
@@ -110,8 +111,8 @@ export var EuiRangeClass = /*#__PURE__*/function (_Component) {
110
111
  key: "render",
111
112
  value: function render() {
112
113
  var _this2 = this;
113
- var _ref = this.context,
114
- defaultFullWidth = _ref.defaultFullWidth;
114
+ var _ref2 = this.context,
115
+ defaultFullWidth = _ref2.defaultFullWidth;
115
116
  var _this$props = this.props,
116
117
  className = _this$props.className,
117
118
  compressed = _this$props.compressed,
@@ -217,7 +218,7 @@ export var EuiRangeClass = /*#__PURE__*/function (_Component) {
217
218
  "aria-hidden": !!showInput,
218
219
  thumbColor: thumbColor
219
220
  }, rest, {
220
- ref: this.rangeSliderRef
221
+ onResize: this.setTrackWidth
221
222
  })), showRange && this.isValid && ___EmotionJSX(EuiRangeHighlight, {
222
223
  showTicks: showTicks,
223
224
  min: Number(min),
@@ -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", "disabled", "id", "max", "min", "name", "step", "onChange", "tabIndex", "value", "style", "showTicks", "showRange", "thumbColor"];
2
+ var _excluded = ["className", "disabled", "id", "max", "min", "name", "step", "onChange", "tabIndex", "value", "style", "showTicks", "showRange", "thumbColor", "onResize"];
3
3
  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); }
4
4
  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; }
5
5
  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; }
@@ -16,15 +16,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  * Side Public License, v 1.
17
17
  */
18
18
 
19
- import React, { forwardRef, useMemo } from 'react';
19
+ import React, { useMemo } from 'react';
20
20
  import PropTypes from "prop-types";
21
21
  import classNames from 'classnames';
22
22
  import { useEuiTheme } from '../../../services';
23
23
  import { logicalStyles } from '../../../global_styling';
24
+ import { EuiResizeObserver } from '../../observer/resize_observer';
24
25
  import { euiRangeLevelColor } from './range_levels_colors';
25
26
  import { euiRangeSliderStyles, euiRangeSliderThumbStyles } from './range_slider.styles';
26
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
- export var EuiRangeSlider = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
+ export var EuiRangeSlider = function EuiRangeSlider(_ref) {
28
29
  var className = _ref.className,
29
30
  disabled = _ref.disabled,
30
31
  id = _ref.id,
@@ -39,6 +40,7 @@ export var EuiRangeSlider = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
40
  showTicks = _ref.showTicks,
40
41
  showRange = _ref.showRange,
41
42
  thumbColor = _ref.thumbColor,
43
+ onResize = _ref.onResize,
42
44
  rest = _objectWithoutProperties(_ref, _excluded);
43
45
  var classes = classNames('euiRangeSlider', className);
44
46
  var euiTheme = useEuiTheme();
@@ -50,29 +52,33 @@ export var EuiRangeSlider = /*#__PURE__*/forwardRef(function (_ref, ref) {
50
52
  color: thumbColor && euiRangeLevelColor(thumbColor, euiTheme.euiTheme)
51
53
  }, style));
52
54
  }, [thumbColor, euiTheme, style]);
53
- return ___EmotionJSX("input", _extends({
54
- ref: ref,
55
- type: "range",
56
- id: id,
57
- name: name,
58
- className: classes,
59
- css: cssStyles,
60
- min: min,
61
- max: max,
62
- step: step,
63
- value: value,
64
- disabled: disabled,
65
- onChange: onChange,
66
- style: sliderStyle,
67
- tabIndex: tabIndex
68
- }, rest));
69
- });
55
+ return ___EmotionJSX(EuiResizeObserver, {
56
+ onResize: onResize
57
+ }, function (resizeRef) {
58
+ return ___EmotionJSX("input", _extends({
59
+ ref: resizeRef,
60
+ type: "range",
61
+ id: id,
62
+ name: name,
63
+ className: classes,
64
+ css: cssStyles,
65
+ min: min,
66
+ max: max,
67
+ step: step,
68
+ value: value,
69
+ disabled: disabled,
70
+ onChange: onChange,
71
+ style: sliderStyle,
72
+ tabIndex: tabIndex
73
+ }, rest));
74
+ });
75
+ };
70
76
  EuiRangeSlider.propTypes = {
71
77
  onChange: PropTypes.any,
72
78
  thumbColor: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
79
+ onResize: PropTypes.func.isRequired,
73
80
  className: PropTypes.string,
74
81
  "aria-label": PropTypes.string,
75
82
  "data-test-subj": PropTypes.string,
76
83
  css: PropTypes.any
77
- };
78
- EuiRangeSlider.displayName = 'EuiRangeSlider';
84
+ };
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "compressed", "fullWidth", "id", "inputRef", "isLoading", "isInvalid", "name", "placeholder", "resize", "rows"];
1
+ var _excluded = ["children", "className", "compressed", "fullWidth", "id", "icon", "inputRef", "isLoading", "isInvalid", "isClearable", "name", "placeholder", "resize", "rows"];
2
2
  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); }
3
3
  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; }
4
4
  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; }
@@ -10,9 +10,10 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
10
  * Side Public License, v 1.
11
11
  */
12
12
 
13
- import React from 'react';
13
+ import React, { useRef, useMemo } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
+ import { useCombinedRefs } from '../../../services';
16
17
  import { EuiFormControlLayout } from '../form_control_layout';
17
18
  import { EuiValidatableControl } from '../validatable_control';
18
19
  import { useFormContext } from '../eui_form_context';
@@ -33,9 +34,11 @@ export var EuiTextArea = function EuiTextArea(props) {
33
34
  _props$fullWidth = props.fullWidth,
34
35
  fullWidth = _props$fullWidth === void 0 ? defaultFullWidth : _props$fullWidth,
35
36
  id = props.id,
37
+ icon = props.icon,
36
38
  inputRef = props.inputRef,
37
39
  isLoading = props.isLoading,
38
40
  isInvalid = props.isInvalid,
41
+ isClearable = props.isClearable,
39
42
  name = props.name,
40
43
  placeholder = props.placeholder,
41
44
  _props$resize = props.resize,
@@ -54,10 +57,33 @@ export var EuiTextArea = function EuiTextArea(props) {
54
57
  } else {
55
58
  definedRows = 6;
56
59
  }
60
+ var ref = useRef(null);
61
+ var refs = useCombinedRefs([ref, inputRef]);
62
+ var clear = useMemo(function () {
63
+ if (isClearable) {
64
+ return {
65
+ onClick: function onClick() {
66
+ if (ref.current) {
67
+ ref.current.value = '';
68
+ var event = new Event('input', {
69
+ bubbles: true,
70
+ cancelable: false
71
+ });
72
+ ref.current.dispatchEvent(event);
73
+ ref.current.focus(); // set focus back to the textarea
74
+ }
75
+ },
76
+
77
+ 'data-test-subj': 'clearTextAreaButton'
78
+ };
79
+ }
80
+ }, [isClearable]);
57
81
  return ___EmotionJSX(EuiFormControlLayout, {
58
82
  fullWidth: fullWidth,
59
83
  isLoading: isLoading,
60
84
  isInvalid: isInvalid,
85
+ clear: clear,
86
+ icon: icon,
61
87
  className: "euiFormControlLayout--euiTextArea"
62
88
  }, ___EmotionJSX(EuiValidatableControl, {
63
89
  isInvalid: isInvalid
@@ -67,7 +93,7 @@ export var EuiTextArea = function EuiTextArea(props) {
67
93
  rows: definedRows,
68
94
  name: name,
69
95
  id: id,
70
- ref: inputRef,
96
+ ref: refs,
71
97
  placeholder: placeholder
72
98
  }), children)));
73
99
  };
@@ -76,8 +102,18 @@ EuiTextArea.propTypes = {
76
102
  "aria-label": PropTypes.string,
77
103
  "data-test-subj": PropTypes.string,
78
104
  css: PropTypes.any,
105
+ icon: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.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.string.isRequired, PropTypes.elementType.isRequired]).isRequired, PropTypes.shape({
106
+ type: PropTypes.oneOfType([PropTypes.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.string.isRequired, PropTypes.elementType.isRequired]).isRequired,
107
+ side: PropTypes.any,
108
+ color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
109
+ ref: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.func.isRequired])
110
+ }).isRequired]),
79
111
  isLoading: PropTypes.bool,
80
112
  isInvalid: PropTypes.bool,
113
+ /**
114
+ * Shows a button that allows users to quickly clear the textarea
115
+ */
116
+ isClearable: PropTypes.bool,
81
117
  /**
82
118
  * Expand to fill 100% of the parent.
83
119
  * Defaults to `fullWidth` prop of `<EuiForm>`.
@@ -26,7 +26,6 @@ export * from './combo_box';
26
26
  export * from './comment_list';
27
27
  export * from './context';
28
28
  export * from './context_menu';
29
- export * from './control_bar';
30
29
  export * from './copy';
31
30
  export * from './datagrid';
32
31
  export * from './date_picker';
@@ -60,7 +59,6 @@ export * from './markdown_editor';
60
59
  export * from './mark';
61
60
  export * from './modal';
62
61
  export * from './observer/mutation_observer';
63
- export * from './notification';
64
62
  export * from './outside_click_detector';
65
63
  export * from './overlay_mask';
66
64
  export * from './page';
@@ -266,20 +266,19 @@ export var EuiMarkdownEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
266
266
  setEditorToolbarHeight(editorToolbarRef.current.offsetHeight);
267
267
  }, [setEditorToolbarHeight]);
268
268
  useEffect(function () {
269
- if (isPreviewing && autoExpandPreview && height !== 'full') {
270
- if (previewRef.current.scrollHeight > currentHeight) {
271
- // scrollHeight does not include the border or margin
272
- // so we ask for the computed value for those,
273
- // which is always in pixels because getComputedValue
274
- // returns the resolved values
275
- var elementComputedStyle = window.getComputedStyle(previewRef.current);
276
- var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
277
- var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
269
+ if (height === 'full' || currentHeight === 'full') return;
270
+ if (isPreviewing && autoExpandPreview && previewRef.current.scrollHeight > currentHeight) {
271
+ // scrollHeight does not include the border or margin
272
+ // so we ask for the computed value for those,
273
+ // which is always in pixels because getComputedValue
274
+ // returns the resolved values
275
+ var elementComputedStyle = window.getComputedStyle(previewRef.current);
276
+ var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
277
+ var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
278
278
 
279
- // then add an extra pixel for safety and because the scrollHeight value is rounded
280
- var extraHeight = borderWidth + marginWidth + 1;
281
- setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
282
- }
279
+ // then add an extra pixel for safety and because the scrollHeight value is rounded
280
+ var extraHeight = borderWidth + marginWidth + 1;
281
+ setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
283
282
  }
284
283
  }, [currentHeight, isPreviewing, height, autoExpandPreview]);
285
284
  var previewHeight = height === 'full' ? "calc(100% - ".concat(editorFooterHeight, "px)") : currentHeight;
@@ -62,7 +62,7 @@ export var _EuiPageBottomBar = function _EuiPageBottomBar(_ref2) {
62
62
  // Hide the overflow in case of larger flex margins than padding
63
63
  ,
64
64
  css: _ref
65
- // Using unknown here because of the possible conflict with overriding props and position `sticky`
65
+ // Using object here because of the possible conflict with overriding props and position `sticky`
66
66
  }, rest), ___EmotionJSX(EuiPageSection, {
67
67
  paddingSize: paddingSize,
68
68
  restrictWidth: restrictWidth
@@ -215,7 +215,7 @@ export var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
215
215
  onFocusBadgeNode = ___EmotionJSX(EuiBadge, _extends({
216
216
  className: "euiSelectableListItem__onFocusBadge"
217
217
  }, defaultOnFocusBadgeProps));
218
- } else if (!!onFocusBadge && onFocusBadge !== false) {
218
+ } else if (typeof onFocusBadge !== 'boolean' && !!onFocusBadge) {
219
219
  var _children = onFocusBadge.children,
220
220
  _className = onFocusBadge.className,
221
221
  restBadgeProps = _objectWithoutProperties(onFocusBadge, _excluded2);
@@ -237,6 +237,11 @@ EuiSelectableTemplateSitewide.propTypes = {
237
237
  "aria-label": PropTypes.string,
238
238
  "data-test-subj": PropTypes.string,
239
239
  css: PropTypes.any,
240
+ /**
241
+ * One of EUI's color palette or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value.
242
+ * Note that coloring only works if your SVG is removed of fill attributes.
243
+ */
244
+ color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
240
245
  /**
241
246
  * Descriptive title for naming the icon based on its use
242
247
  */
@@ -54,34 +54,12 @@ var displayToClassNameMap = {
54
54
  export var EuiTreeView = /*#__PURE__*/function (_Component) {
55
55
  _inherits(EuiTreeView, _Component);
56
56
  var _super = _createSuper(EuiTreeView);
57
- function EuiTreeView() {
57
+ function EuiTreeView(props, context) {
58
58
  var _this;
59
59
  _classCallCheck(this, EuiTreeView);
60
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
61
- args[_key] = arguments[_key];
62
- }
63
- _this = _super.call.apply(_super, [this].concat(args));
60
+ _this = _super.call(this, props, context);
64
61
  _defineProperty(_assertThisInitialized(_this), "treeIdGenerator", htmlIdGenerator('euiTreeView'));
65
- _defineProperty(_assertThisInitialized(_this), "isNested", !!_this.context);
66
- _defineProperty(_assertThisInitialized(_this), "state", {
67
- openItems: _this.props.expandByDefault ? _this.props.items.map(function (_ref) {
68
- var id = _ref.id,
69
- children = _ref.children;
70
- return children ? id : null;
71
- }).filter(function (x) {
72
- return x != null;
73
- }) : _this.props.items.map(function (_ref2) {
74
- var id = _ref2.id,
75
- children = _ref2.children,
76
- isExpanded = _ref2.isExpanded;
77
- return children && isExpanded ? id : null;
78
- }).filter(function (x) {
79
- return x != null;
80
- }),
81
- activeItem: '',
82
- treeID: getTreeId(_this.props.id, _this.context, _this.treeIdGenerator),
83
- expandChildNodes: _this.props.expandByDefault || false
84
- });
62
+ _defineProperty(_assertThisInitialized(_this), "isNested", void 0);
85
63
  _defineProperty(_assertThisInitialized(_this), "buttonRef", []);
86
64
  _defineProperty(_assertThisInitialized(_this), "setButtonRef", function (ref, index) {
87
65
  _this.buttonRef[index] = ref;
@@ -176,6 +154,26 @@ export var EuiTreeView = /*#__PURE__*/function (_Component) {
176
154
  _this.buttonRef[index].focus();
177
155
  }
178
156
  });
157
+ _this.isNested = !!_this.context;
158
+ _this.state = {
159
+ openItems: _this.props.expandByDefault ? _this.props.items.map(function (_ref) {
160
+ var id = _ref.id,
161
+ children = _ref.children;
162
+ return children ? id : null;
163
+ }).filter(function (x) {
164
+ return x != null;
165
+ }) : _this.props.items.map(function (_ref2) {
166
+ var id = _ref2.id,
167
+ children = _ref2.children,
168
+ isExpanded = _ref2.isExpanded;
169
+ return children && isExpanded ? id : null;
170
+ }).filter(function (x) {
171
+ return x != null;
172
+ }),
173
+ activeItem: '',
174
+ treeID: getTreeId(_this.props.id, context, _this.treeIdGenerator),
175
+ expandChildNodes: _this.props.expandByDefault || false
176
+ };
179
177
  return _this;
180
178
  }
181
179
  _createClass(EuiTreeView, [{
@@ -12,7 +12,7 @@ export var is = function is(expectedValue) {
12
12
  var compName = componentName || 'ANONYMOUS';
13
13
  var value = props[propName];
14
14
  if (value !== expectedValue) {
15
- return new Error("[".concat(propName, "] property in [").concat(compName, "] component is expected to equal [").concat(expectedValue, "] but\n [").concat(value, "] was provided instead."));
15
+ return new Error("[".concat(propName.toString(), "] property in [").concat(compName, "] component is expected to equal [").concat(expectedValue, "] but\n [").concat(value, "] was provided instead."));
16
16
  }
17
17
  return null;
18
18
  };
@@ -20,7 +20,7 @@ export var is = function is(expectedValue) {
20
20
  var compName = componentName || 'ANONYMOUS';
21
21
  var value = props[propName];
22
22
  if (isNil(value)) {
23
- return new Error("[".concat(propName, "] property in [").concat(compName, "] component is required but seems to be missing"));
23
+ return new Error("[".concat(propName.toString(), "] property in [").concat(compName, "] component is required but seems to be missing"));
24
24
  }
25
25
  return validator(props, propName, componentName);
26
26
  };