@elastic/eui 91.3.1 → 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 (160) 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 +5 -5
  7. package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  8. package/es/components/filter_group/filter_button.js +20 -13
  9. package/es/components/filter_group/filter_button.styles.js +11 -20
  10. package/es/components/flyout/flyout.js +4 -4
  11. package/es/components/flyout/flyout_resizable.js +127 -0
  12. package/es/components/flyout/flyout_resizable.styles.js +27 -0
  13. package/es/components/flyout/index.js +2 -1
  14. package/es/components/form/range/dual_range.js +15 -66
  15. package/es/components/form/range/range.js +6 -5
  16. package/es/components/form/range/range_slider.js +28 -22
  17. package/es/components/form/text_area/text_area.js +39 -3
  18. package/es/components/index.js +0 -2
  19. package/es/components/markdown_editor/markdown_editor.js +12 -13
  20. package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  21. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  22. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
  23. package/es/components/tree_view/tree_view.js +23 -25
  24. package/es/utils/prop_types/is.js +2 -2
  25. package/eui.d.ts +825 -1141
  26. package/i18ntokens.json +68 -338
  27. package/lib/components/basic_table/basic_table.js +5 -5
  28. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  29. package/lib/components/filter_group/filter_button.js +20 -13
  30. package/lib/components/filter_group/filter_button.styles.js +11 -20
  31. package/lib/components/flyout/flyout.js +4 -4
  32. package/lib/components/flyout/flyout_resizable.js +136 -0
  33. package/lib/components/flyout/flyout_resizable.styles.js +32 -0
  34. package/lib/components/flyout/index.js +8 -1
  35. package/lib/components/form/range/dual_range.js +15 -66
  36. package/lib/components/form/range/range.js +6 -5
  37. package/lib/components/form/range/range_slider.js +27 -21
  38. package/lib/components/form/text_area/text_area.js +42 -3
  39. package/lib/components/index.js +0 -22
  40. package/lib/components/markdown_editor/markdown_editor.js +12 -13
  41. package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  42. package/lib/components/pagination/pagination_button.js +79 -2
  43. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  44. package/lib/components/tree_view/tree_view.js +23 -25
  45. package/lib/utils/prop_types/is.js +2 -2
  46. package/optimize/es/components/basic_table/basic_table.js +5 -5
  47. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  48. package/optimize/es/components/filter_group/filter_button.js +20 -13
  49. package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
  50. package/optimize/es/components/flyout/flyout.js +4 -4
  51. package/optimize/es/components/flyout/flyout_resizable.js +121 -0
  52. package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
  53. package/optimize/es/components/flyout/index.js +2 -1
  54. package/optimize/es/components/form/range/dual_range.js +15 -66
  55. package/optimize/es/components/form/range/range.js +6 -5
  56. package/optimize/es/components/form/range/range_slider.js +26 -21
  57. package/optimize/es/components/form/text_area/text_area.js +29 -3
  58. package/optimize/es/components/index.js +0 -2
  59. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
  60. package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  61. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  62. package/optimize/es/components/tree_view/tree_view.js +23 -25
  63. package/optimize/es/utils/prop_types/is.js +2 -2
  64. package/optimize/lib/components/basic_table/basic_table.js +5 -5
  65. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  66. package/optimize/lib/components/filter_group/filter_button.js +20 -13
  67. package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
  68. package/optimize/lib/components/flyout/flyout.js +4 -4
  69. package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
  70. package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
  71. package/optimize/lib/components/flyout/index.js +8 -1
  72. package/optimize/lib/components/form/range/dual_range.js +15 -66
  73. package/optimize/lib/components/form/range/range.js +6 -5
  74. package/optimize/lib/components/form/range/range_slider.js +26 -21
  75. package/optimize/lib/components/form/text_area/text_area.js +32 -3
  76. package/optimize/lib/components/index.js +0 -22
  77. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
  78. package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  79. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  80. package/optimize/lib/components/tree_view/tree_view.js +23 -25
  81. package/optimize/lib/utils/prop_types/is.js +2 -2
  82. package/package.json +2 -2
  83. package/src/components/index.scss +0 -2
  84. package/test-env/components/basic_table/basic_table.js +5 -5
  85. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  86. package/test-env/components/filter_group/filter_button.js +20 -13
  87. package/test-env/components/filter_group/filter_button.styles.js +11 -20
  88. package/test-env/components/flyout/flyout_resizable.js +131 -0
  89. package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
  90. package/test-env/components/flyout/index.js +8 -1
  91. package/test-env/components/form/range/dual_range.js +15 -66
  92. package/test-env/components/form/range/range.js +6 -5
  93. package/test-env/components/form/range/range_slider.js +27 -21
  94. package/test-env/components/form/text_area/text_area.js +42 -3
  95. package/test-env/components/index.js +0 -22
  96. package/test-env/components/markdown_editor/markdown_editor.js +12 -13
  97. package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  98. package/test-env/components/pagination/pagination_button.js +79 -2
  99. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  100. package/test-env/components/tree_view/tree_view.js +23 -25
  101. package/test-env/utils/prop_types/is.js +2 -2
  102. package/es/components/control_bar/control_bar.a11y.js +0 -133
  103. package/es/components/control_bar/control_bar.js +0 -609
  104. package/es/components/control_bar/index.js +0 -9
  105. package/es/components/notification/index.js +0 -9
  106. package/es/components/notification/notification_event.a11y.js +0 -104
  107. package/es/components/notification/notification_event.js +0 -288
  108. package/es/components/notification/notification_event_messages.js +0 -79
  109. package/es/components/notification/notification_event_meta.js +0 -148
  110. package/es/components/notification/notification_event_read_button.js +0 -86
  111. package/es/components/notification/notification_event_read_icon.js +0 -77
  112. package/lib/components/control_bar/control_bar.a11y.js +0 -134
  113. package/lib/components/control_bar/control_bar.js +0 -441
  114. package/lib/components/control_bar/index.js +0 -12
  115. package/lib/components/notification/index.js +0 -12
  116. package/lib/components/notification/notification_event.a11y.js +0 -105
  117. package/lib/components/notification/notification_event.js +0 -297
  118. package/lib/components/notification/notification_event_messages.js +0 -88
  119. package/lib/components/notification/notification_event_meta.js +0 -157
  120. package/lib/components/notification/notification_event_read_button.js +0 -93
  121. package/lib/components/notification/notification_event_read_icon.js +0 -64
  122. package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
  123. package/optimize/es/components/control_bar/control_bar.js +0 -308
  124. package/optimize/es/components/control_bar/index.js +0 -9
  125. package/optimize/es/components/notification/index.js +0 -9
  126. package/optimize/es/components/notification/notification_event.a11y.js +0 -99
  127. package/optimize/es/components/notification/notification_event.js +0 -114
  128. package/optimize/es/components/notification/notification_event_messages.js +0 -63
  129. package/optimize/es/components/notification/notification_event_meta.js +0 -106
  130. package/optimize/es/components/notification/notification_event_read_button.js +0 -44
  131. package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
  132. package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
  133. package/optimize/lib/components/control_bar/control_bar.js +0 -301
  134. package/optimize/lib/components/control_bar/index.js +0 -12
  135. package/optimize/lib/components/notification/index.js +0 -12
  136. package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
  137. package/optimize/lib/components/notification/notification_event.js +0 -123
  138. package/optimize/lib/components/notification/notification_event_messages.js +0 -74
  139. package/optimize/lib/components/notification/notification_event_meta.js +0 -117
  140. package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
  141. package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
  142. package/src/components/control_bar/_control_bar.scss +0 -232
  143. package/src/components/control_bar/_index.scss +0 -2
  144. package/src/components/control_bar/_variables.scss +0 -12
  145. package/src/components/notification/_index.scss +0 -5
  146. package/src/components/notification/_notification_event.scss +0 -40
  147. package/src/components/notification/_notification_event_messages.scss +0 -17
  148. package/src/components/notification/_notification_event_meta.scss +0 -44
  149. package/src/components/notification/_notification_event_read_button.scss +0 -5
  150. package/src/components/notification/_notification_event_read_icon.scss +0 -12
  151. package/test-env/components/control_bar/control_bar.a11y.js +0 -134
  152. package/test-env/components/control_bar/control_bar.js +0 -436
  153. package/test-env/components/control_bar/index.js +0 -12
  154. package/test-env/components/notification/index.js +0 -12
  155. package/test-env/components/notification/notification_event.a11y.js +0 -105
  156. package/test-env/components/notification/notification_event.js +0 -296
  157. package/test-env/components/notification/notification_event_messages.js +0 -85
  158. package/test-env/components/notification/notification_event_meta.js +0 -154
  159. package/test-env/components/notification/notification_event_read_button.js +0 -92
  160. package/test-env/components/notification/notification_event_read_icon.js +0 -63
@@ -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
  };
@@ -430,7 +430,7 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
430
430
  var sortDirection = _this2.resolveColumnSortDirection(column);
431
431
  items.push({
432
432
  name: column.name,
433
- key: "_data_s_".concat(column.field, "_").concat(index),
433
+ key: "_data_s_".concat(String(column.field), "_").concat(index),
434
434
  onSort: _this2.resolveColumnOnSort(column),
435
435
  isSorted: !!sortDirection,
436
436
  isSortAscending: sortDirection ? _services.SortDirection.isAsc(sortDirection) : undefined
@@ -583,11 +583,11 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
583
583
  }
584
584
  }
585
585
  headers.push((0, _react2.jsx)(_table.EuiTableHeaderCell, (0, _extends2.default)({
586
- key: "_data_h_".concat(field, "_").concat(index),
586
+ key: "_data_h_".concat(String(field), "_").concat(index),
587
587
  align: columnAlign,
588
588
  width: width,
589
589
  mobileOptions: mobileOptions,
590
- "data-test-subj": "tableHeaderCell_".concat(field, "_").concat(index),
590
+ "data-test-subj": "tableHeaderCell_".concat(String(field), "_").concat(index),
591
591
  description: description
592
592
  }, sorting), name));
593
593
  });
@@ -624,7 +624,7 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
624
624
 
625
625
  if (footer) {
626
626
  footers.push((0, _react2.jsx)(_table.EuiTableFooterCell, {
627
- key: "footer_".concat(field, "_").concat(footers.length - 1),
627
+ key: "footer_".concat(String(field), "_").concat(footers.length - 1),
628
628
  align: align
629
629
  }, footer));
630
630
  hasDefinedFooter = true;
@@ -864,7 +864,7 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
864
864
  var field = column.field,
865
865
  render = column.render,
866
866
  dataType = column.dataType;
867
- var key = "_data_column_".concat(field, "_").concat(itemId, "_").concat(columnIndex);
867
+ var key = "_data_column_".concat(String(field), "_").concat(itemId, "_").concat(columnIndex);
868
868
  var contentRenderer = render || this.getRendererForDataType(dataType);
869
869
  var value = (0, _objects.get)(item, field);
870
870
  var content = contentRenderer(value, item);
@@ -77,7 +77,7 @@ var DragAndDrop = function DragAndDrop() {
77
77
  beforeEach(function () {
78
78
  cy.realMount((0, _react2.jsx)(DragAndDrop, null));
79
79
  });
80
- describe('EuiControlBar', function () {
80
+ describe('EuiDragDrop', function () {
81
81
  describe('Automated accessibility check', function () {
82
82
  it('has zero violations on render', function () {
83
83
  cy.checkAxe();
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.EuiFilterButton = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
12
  var _react = _interopRequireDefault(require("react"));
@@ -65,6 +65,10 @@ var EuiFilterButton = function EuiFilterButton(_ref) {
65
65
  'euiFilterButton-hasActiveFilters': hasActiveFilters,
66
66
  'euiFilterButton-hasNotification': numFiltersDefined
67
67
  }, className);
68
+
69
+ /**
70
+ * Badge
71
+ */
68
72
  var showBadge = numFiltersDefined || numActiveFiltersDefined;
69
73
  var badgeCount = numActiveFilters || numFilters;
70
74
  var activeBadgeLabel = (0, _i18n.useEuiI18n)('euiFilterButton.filterBadgeActiveAriaLabel', '{count} active filters', {
@@ -73,9 +77,6 @@ var EuiFilterButton = function EuiFilterButton(_ref) {
73
77
  var availableBadgeLabel = (0, _i18n.useEuiI18n)('euiFilterButton.filterBadgeAvailableAriaLabel', '{count} available filters', {
74
78
  count: badgeCount
75
79
  });
76
- var buttonTextClassNames = (0, _classnames.default)('euiFilterButton__text', {
77
- 'euiFilterButton__text-hasNotification': showBadge
78
- }, textProps && textProps.className);
79
80
  var badgeContent = showBadge && (0, _react2.jsx)(_badge.EuiNotificationBadge, {
80
81
  className: "euiFilterButton__notification",
81
82
  css: [notificationStyles.euiFilterButton__notification, isDisabled && notificationStyles.disabled, ";label:badgeContent;"],
@@ -83,18 +84,27 @@ var EuiFilterButton = function EuiFilterButton(_ref) {
83
84
  color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
84
85
  role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
85
86
  }, badgeCount);
87
+
88
+ /**
89
+ * Text
90
+ */
91
+ var buttonTextClassNames = (0, _classnames.default)('euiFilterButton__text', {
92
+ 'euiFilterButton__text-hasNotification': showBadge
93
+ }, textProps && textProps.className);
94
+ var textCssStyles = [textStyles.euiFilterButton__text, showBadge && textStyles.hasNotification, textProps && textProps.css];
86
95
  var _useInnerText = (0, _inner_text.useInnerText)(),
87
96
  _useInnerText2 = (0, _slicedToArray2.default)(_useInnerText, 2),
88
97
  ref = _useInnerText2[0],
89
98
  innerText = _useInnerText2[1];
90
99
  var dataText = children && typeof children === 'string' ? children : innerText;
91
- var buttonContents = (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("span", {
100
+ var textContent = (0, _react2.jsx)("span", (0, _extends2.default)({
92
101
  ref: ref,
93
- className: "euiFilterButton__textShift",
94
- css: textStyles.euiFilterButton__textShift,
95
102
  "data-text": dataText,
96
103
  title: dataText
97
- }, children), badgeContent);
104
+ }, textProps, {
105
+ className: buttonTextClassNames,
106
+ css: textCssStyles
107
+ }), children);
98
108
  return (0, _react2.jsx)(_button_empty.EuiButtonEmpty, (0, _extends2.default)({
99
109
  className: classes,
100
110
  css: cssStyles,
@@ -103,13 +113,10 @@ var EuiFilterButton = function EuiFilterButton(_ref) {
103
113
  iconSide: iconSide,
104
114
  iconType: iconType,
105
115
  type: type,
106
- textProps: _objectSpread(_objectSpread({}, textProps), {}, {
107
- className: buttonTextClassNames,
108
- css: [textStyles.euiFilterButton__text, showBadge && textStyles.hasNotification, textProps && textProps.css]
109
- }),
116
+ textProps: false,
110
117
  contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
111
118
  css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
112
119
  })
113
- }, rest), buttonContents);
120
+ }, rest), textContent, badgeContent);
114
121
  };
115
122
  exports.EuiFilterButton = EuiFilterButton;
@@ -14,8 +14,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
14
14
  * in compliance with, at your election, the Elastic License 2.0 or the Server
15
15
  * Side Public License, v 1.
16
16
  */
17
- var euiFilterButtonDisplay = function euiFilterButtonDisplay(_ref5) {
18
- var euiTheme = _ref5.euiTheme;
17
+ var euiFilterButtonDisplay = function euiFilterButtonDisplay(_ref4) {
18
+ var euiTheme = _ref4.euiTheme;
19
19
  return {
20
20
  flex: '1 1 auto',
21
21
  minInlineSize: (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
@@ -24,7 +24,7 @@ var euiFilterButtonDisplay = function euiFilterButtonDisplay(_ref5) {
24
24
  };
25
25
  };
26
26
  exports.euiFilterButtonDisplay = euiFilterButtonDisplay;
27
- var _ref4 = process.env.NODE_ENV === "production" ? {
27
+ var _ref3 = process.env.NODE_ENV === "production" ? {
28
28
  name: "jkp921-noGrow",
29
29
  styles: "flex-grow:0;label:noGrow;"
30
30
  } : {
@@ -43,9 +43,9 @@ var euiFilterButtonStyles = function euiFilterButtonStyles(euiThemeContext) {
43
43
  // Bottom borders are needed for responsive flex-wrap behavior
44
44
  var bottomBoxShadow = "0 ".concat(euiTheme.border.width.thin, " 0 0 ").concat(borderColor);
45
45
  return {
46
- euiFilterButton: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " ", (0, _global_styling.logicalCSS)('height', controlHeight), " border-radius:0;box-shadow:", leftBoxShadow, ",", bottomBoxShadow, ";&:hover:not(:disabled),&:focus:not(:disabled){text-decoration:none;.euiFilterButton__textShift{text-decoration:underline;}}&:focus-visible{outline-offset:-", euiTheme.focus.width, ";};label:euiFilterButton;"),
46
+ euiFilterButton: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " ", (0, _global_styling.logicalCSS)('height', controlHeight), " border-radius:0;box-shadow:", leftBoxShadow, ",", bottomBoxShadow, ";&:hover:not(:disabled),&:focus:not(:disabled){text-decoration:none;.euiFilterButton__text{text-decoration:underline;}}&:focus-visible{outline-offset:-", euiTheme.focus.width, ";};label:euiFilterButton;"),
47
47
  withNext: /*#__PURE__*/(0, _react.css)("&+.euiFilterButton{", (0, _global_styling.logicalCSS)('margin-left', "-".concat(euiTheme.size.xs)), "box-shadow:", bottomBoxShadow, ";};label:withNext;"),
48
- noGrow: _ref4,
48
+ noGrow: _ref3,
49
49
  hasNotification: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
50
50
  return x * 6;
51
51
  })), ";;label:hasNotification;"),
@@ -69,27 +69,18 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
69
69
  styles: "cursor:inherit;label:euiFilterButton__notification;",
70
70
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
71
71
  };
72
- var _ref3 = process.env.NODE_ENV === "production" ? {
73
- name: "f0jxzj-hasIcon",
74
- styles: "justify-content:space-between;label:hasIcon;"
75
- } : {
76
- name: "f0jxzj-hasIcon",
77
- styles: "justify-content:space-between;label:hasIcon;",
78
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
79
- };
80
- var euiFilterButtonChildStyles = function euiFilterButtonChildStyles(_ref6) {
81
- var euiTheme = _ref6.euiTheme;
72
+ var euiFilterButtonChildStyles = function euiFilterButtonChildStyles(_ref5) {
73
+ var euiTheme = _ref5.euiTheme;
82
74
  return {
83
75
  content: {
84
76
  euiFilterButton__content: /*#__PURE__*/(0, _react.css)(";label:euiFilterButton__content;"),
85
- hasIcon: _ref3
77
+ hasIcon: /*#__PURE__*/(0, _react.css)("&>.euiIcon:last-child{", (0, _global_styling.logicalCSS)('margin-left', 'auto'), ";};label:hasIcon;")
86
78
  },
87
79
  text: {
88
- euiFilterButton__text: /*#__PURE__*/(0, _react.css)(";label:euiFilterButton__text;"),
89
- hasNotification: /*#__PURE__*/(0, _react.css)("display:flex;align-items:center;gap:", euiTheme.size.s, ";;label:hasNotification;"),
90
- euiFilterButton__textShift: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextShift)('bold', 'data-text', euiTheme), " ", (0, _global_styling.euiTextTruncate)(), " ", (0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
80
+ euiFilterButton__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextShift)('bold', 'data-text', euiTheme), " ", (0, _global_styling.euiTextTruncate)(), ";;label:euiFilterButton__text;"),
81
+ hasNotification: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
91
82
  return x * 3;
92
- })), ";;label:euiFilterButton__textShift;")
83
+ })), ";;label:hasNotification;")
93
84
  },
94
85
  notification: {
95
86
  euiFilterButton__notification: _ref2,
@@ -111,18 +111,18 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
111
111
  */
112
112
  if (isPushed) {
113
113
  if (side === 'right') {
114
- document.body.style.paddingRight = "".concat(dimensions.width, "px");
114
+ document.body.style.paddingInlineEnd = "".concat(dimensions.width, "px");
115
115
  } else if (side === 'left') {
116
- document.body.style.paddingLeft = "".concat(dimensions.width, "px");
116
+ document.body.style.paddingInlineStart = "".concat(dimensions.width, "px");
117
117
  }
118
118
  }
119
119
  return function () {
120
120
  document.body.classList.remove('euiBody--hasFlyout');
121
121
  if (isPushed) {
122
122
  if (side === 'right') {
123
- document.body.style.paddingRight = '';
123
+ document.body.style.paddingInlineEnd = '';
124
124
  } else if (side === 'left') {
125
- document.body.style.paddingLeft = '';
125
+ document.body.style.paddingInlineStart = '';
126
126
  }
127
127
  }
128
128
  };
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.EuiFlyoutResizable = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _services = require("../../services");
14
+ var _resizable_container = require("../resizable_container");
15
+ var _flyout = require("./flyout");
16
+ var _flyout_resizable = require("./flyout_resizable.styles");
17
+ var _react2 = require("@emotion/react");
18
+ var _excluded = ["size", "maxWidth", "minWidth", "side", "children"];
19
+ /*
20
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
21
+ * or more contributor license agreements. Licensed under the Elastic License
22
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
23
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
24
+ * Side Public License, v 1.
25
+ */
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
+ var EuiFlyoutResizable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
29
+ var size = _ref.size,
30
+ maxWidth = _ref.maxWidth,
31
+ _ref$minWidth = _ref.minWidth,
32
+ minWidth = _ref$minWidth === void 0 ? 200 : _ref$minWidth,
33
+ _ref$side = _ref.side,
34
+ side = _ref$side === void 0 ? 'right' : _ref$side,
35
+ children = _ref.children,
36
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
37
+ var euiTheme = (0, _services.useEuiTheme)();
38
+ var styles = (0, _flyout_resizable.euiFlyoutResizableButtonStyles)(euiTheme);
39
+ var cssStyles = [styles.euiFlyoutResizableButton, styles[side]];
40
+ var getFlyoutMinMaxWidth = (0, _react.useCallback)(function (width) {
41
+ return Math.min(Math.max(width, minWidth), maxWidth || Infinity, window.innerWidth - 20 // Leave some offset
42
+ );
43
+ }, [minWidth, maxWidth]);
44
+ var _useState = (0, _react.useState)(0),
45
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
46
+ flyoutWidth = _useState2[0],
47
+ setFlyoutWidth = _useState2[1];
48
+
49
+ // Must use state for the flyout ref in order for the useEffect to be correctly called after render
50
+ var _useState3 = (0, _react.useState)(null),
51
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
52
+ flyoutRef = _useState4[0],
53
+ setFlyoutRef = _useState4[1];
54
+ var setRefs = (0, _services.useCombinedRefs)([setFlyoutRef, ref]);
55
+ (0, _react.useEffect)(function () {
56
+ setFlyoutWidth(flyoutRef ? getFlyoutMinMaxWidth(flyoutRef.offsetWidth) : 0);
57
+ }, [flyoutRef, getFlyoutMinMaxWidth, size]);
58
+
59
+ // Initial numbers to calculate from, on resize drag start
60
+ var initialWidth = (0, _react.useRef)(0);
61
+ var initialMouseX = (0, _react.useRef)(0);
62
+
63
+ // Account for flyout side and logical property direction
64
+ var direction = (0, _react.useMemo)(function () {
65
+ var modifier = side === 'right' ? -1 : 1;
66
+ if (flyoutRef) {
67
+ var languageDirection = window.getComputedStyle(flyoutRef).direction;
68
+ if (languageDirection === 'rtl') modifier *= -1;
69
+ }
70
+ return modifier;
71
+ }, [side, flyoutRef]);
72
+ var onMouseMove = (0, _react.useCallback)(function (e) {
73
+ var mouseOffset = getMouseOrTouchX(e) - initialMouseX.current;
74
+ var changedFlyoutWidth = initialWidth.current + mouseOffset * direction;
75
+ setFlyoutWidth(getFlyoutMinMaxWidth(changedFlyoutWidth));
76
+ }, [getFlyoutMinMaxWidth, direction]);
77
+ var onMouseUp = (0, _react.useCallback)(function () {
78
+ initialMouseX.current = 0;
79
+ window.removeEventListener('mousemove', onMouseMove);
80
+ window.removeEventListener('mouseup', onMouseUp);
81
+ window.removeEventListener('touchmove', onMouseMove);
82
+ window.removeEventListener('touchend', onMouseUp);
83
+ }, [onMouseMove]);
84
+ var onMouseDown = (0, _react.useCallback)(function (e) {
85
+ var _flyoutRef$offsetWidt;
86
+ initialMouseX.current = getMouseOrTouchX(e);
87
+ initialWidth.current = (_flyoutRef$offsetWidt = flyoutRef === null || flyoutRef === void 0 ? void 0 : flyoutRef.offsetWidth) !== null && _flyoutRef$offsetWidt !== void 0 ? _flyoutRef$offsetWidt : 0;
88
+
89
+ // Window event listeners instead of React events are used
90
+ // in case the user's mouse leaves the component
91
+ window.addEventListener('mousemove', onMouseMove);
92
+ window.addEventListener('mouseup', onMouseUp);
93
+ window.addEventListener('touchmove', onMouseMove);
94
+ window.addEventListener('touchend', onMouseUp);
95
+ }, [flyoutRef, onMouseMove, onMouseUp]);
96
+ var onKeyDown = (0, _react.useCallback)(function (e) {
97
+ var KEYBOARD_OFFSET = 10;
98
+ switch (e.key) {
99
+ case _services.keys.ARROW_RIGHT:
100
+ e.preventDefault(); // Safari+VO will screen reader navigate off the button otherwise
101
+ setFlyoutWidth(function (flyoutWidth) {
102
+ return getFlyoutMinMaxWidth(flyoutWidth + KEYBOARD_OFFSET * direction);
103
+ });
104
+ break;
105
+ case _services.keys.ARROW_LEFT:
106
+ e.preventDefault(); // Safari+VO will screen reader navigate off the button otherwise
107
+ setFlyoutWidth(function (flyoutWidth) {
108
+ return getFlyoutMinMaxWidth(flyoutWidth - KEYBOARD_OFFSET * direction);
109
+ });
110
+ }
111
+ }, [getFlyoutMinMaxWidth, direction]);
112
+ return (0, _react2.jsx)(_flyout.EuiFlyout, (0, _extends2.default)({}, rest, {
113
+ size: flyoutWidth || size,
114
+ maxWidth: maxWidth,
115
+ side: side,
116
+ ref: setRefs
117
+ }), (0, _react2.jsx)(_resizable_container.EuiResizableButton, {
118
+ isHorizontal: true,
119
+ css: cssStyles,
120
+ onMouseDown: onMouseDown,
121
+ onTouchStart: onMouseDown,
122
+ onKeyDown: onKeyDown
123
+ }), children);
124
+ });
125
+ exports.EuiFlyoutResizable = EuiFlyoutResizable;
126
+ EuiFlyoutResizable.displayName = 'EuiFlyoutResizable';
127
+ var getMouseOrTouchX = function getMouseOrTouchX(e) {
128
+ // Some Typescript fooling is needed here
129
+ var x = e.targetTouches ? e.targetTouches[0].pageX : e.pageX;
130
+ return x;
131
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutResizableButtonStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../global_styling");
9
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+ var _ref = process.env.NODE_ENV === "production" ? {
17
+ name: "6syi0e-euiFlyoutResizableButton",
18
+ styles: "position:absolute;&::before,&::after{background-color:transparent;};label:euiFlyoutResizableButton;"
19
+ } : {
20
+ name: "6syi0e-euiFlyoutResizableButton",
21
+ styles: "position:absolute;&::before,&::after{background-color:transparent;};label:euiFlyoutResizableButton;",
22
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
+ };
24
+ var euiFlyoutResizableButtonStyles = function euiFlyoutResizableButtonStyles(_ref2) {
25
+ var euiTheme = _ref2.euiTheme;
26
+ return {
27
+ euiFlyoutResizableButton: _ref,
28
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', "-".concat(euiTheme.border.width.thin)), ";;label:left;"),
29
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', "-".concat(euiTheme.border.width.thin)), ";;label:right;")
30
+ };
31
+ };
32
+ exports.euiFlyoutResizableButtonStyles = euiFlyoutResizableButtonStyles;
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "EuiFlyoutHeader", {
27
27
  return _flyout_header.EuiFlyoutHeader;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "EuiFlyoutResizable", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _flyout_resizable.EuiFlyoutResizable;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "euiFlyoutSlideInLeft", {
31
37
  enumerable: true,
32
38
  get: function get() {
@@ -43,4 +49,5 @@ var _flyout = require("./flyout");
43
49
  var _flyout_body = require("./flyout_body");
44
50
  var _flyout_footer = require("./flyout_footer");
45
51
  var _flyout_header = require("./flyout_header");
46
- var _flyout2 = require("./flyout.styles");
52
+ var _flyout2 = require("./flyout.styles");
53
+ var _flyout_resizable = require("./flyout_resizable");
@@ -62,38 +62,10 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
62
62
  _this = _super.call.apply(_super, [this].concat(args));
63
63
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
64
64
  id: _this.props.id || (0, _services.htmlIdGenerator)()(),
65
- rangeSliderRefAvailable: false,
66
65
  isPopoverOpen: false,
67
- rangeWidth: 0,
68
- isVisible: true // used to trigger a rerender if initial element width is 0
66
+ rangeWidth: 0
69
67
  });
70
68
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "preventPopoverClose", false);
71
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rangeSliderRef", null);
72
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleRangeSliderRefUpdate", function (ref) {
73
- _this.rangeSliderRef = ref;
74
- if (ref) {
75
- if (_this.isInPopover) {
76
- // Wait a tick for popover rendering to settle
77
- requestAnimationFrame(function () {
78
- _this.setState({
79
- rangeSliderRefAvailable: true,
80
- rangeWidth: ref.clientWidth
81
- });
82
- });
83
- } else {
84
- // If not in a popover, no need to wait
85
- _this.setState({
86
- rangeSliderRefAvailable: true,
87
- rangeWidth: ref.clientWidth
88
- });
89
- }
90
- } else {
91
- _this.setState({
92
- rangeSliderRefAvailable: false,
93
- rangeWidth: 0
94
- });
95
- }
96
- });
97
69
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "leftPosition", 0);
98
70
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dragAcc", 0);
99
71
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_determineInvalidThumbMovement", function (newVal, lower, upper, e) {
@@ -284,14 +256,11 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
284
256
  isPopoverOpen: false
285
257
  });
286
258
  });
287
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function (width) {
288
- var _this$props$inputPopo, _this$props$inputPopo2;
289
- if (_this.rangeSliderRef) {
290
- _this.setState({
291
- rangeWidth: _this.rangeSliderRef.clientWidth
292
- });
293
- }
294
- (_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);
259
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setRangeWidth", function (_ref) {
260
+ var width = _ref.width;
261
+ _this.setState({
262
+ rangeWidth: width
263
+ });
295
264
  });
296
265
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getNearestStep", function (value) {
297
266
  var min = _this.props.min;
@@ -314,7 +283,7 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
314
283
  var delta = _this.leftPosition - x;
315
284
  _this.leftPosition = x;
316
285
  _this.dragAcc = _this.dragAcc + delta;
317
- var percentageOfArea = _this.dragAcc / _this.rangeSliderRef.clientWidth;
286
+ var percentageOfArea = _this.dragAcc / _this.state.rangeWidth;
318
287
  var percentageOfRange = percentageOfArea * (max - min);
319
288
  var newLower = _this.getNearestStep(lowerValue - percentageOfRange);
320
289
  var newUpper = _this.getNearestStep(upperValue - percentageOfRange);
@@ -358,32 +327,12 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
358
327
  get: function get() {
359
328
  return this.lowerValueIsValid && this.upperValueIsValid;
360
329
  }
361
- }, {
362
- key: "componentDidMount",
363
- value: function componentDidMount() {
364
- var _this$rangeSliderRef;
365
- if (((_this$rangeSliderRef = this.rangeSliderRef) === null || _this$rangeSliderRef === void 0 ? void 0 : _this$rangeSliderRef.clientWidth) === 0) {
366
- this.setState({
367
- isVisible: false
368
- });
369
- }
370
- }
371
- }, {
372
- key: "componentDidUpdate",
373
- value: function componentDidUpdate() {
374
- var _this$rangeSliderRef2;
375
- if ((_this$rangeSliderRef2 = this.rangeSliderRef) !== null && _this$rangeSliderRef2 !== void 0 && _this$rangeSliderRef2.clientWidth && !this.state.isVisible) {
376
- this.setState({
377
- isVisible: true
378
- });
379
- }
380
- }
381
330
  }, {
382
331
  key: "render",
383
332
  value: function render() {
384
333
  var _this2 = this;
385
- var _ref = this.context,
386
- defaultFullWidth = _ref.defaultFullWidth;
334
+ var _ref2 = this.context,
335
+ defaultFullWidth = _ref2.defaultFullWidth;
387
336
  var _this$props = this.props,
388
337
  className = _this$props.className,
389
338
  customCss = _this$props.css,
@@ -539,10 +488,10 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
539
488
  var classes = (0, _classnames.default)('euiDualRange', className);
540
489
  var dualRangeStyles = (0, _dual_range.euiDualRangeStyles)();
541
490
  var cssStyles = [dualRangeStyles.euiDualRange, customCss];
542
- var leftThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
491
+ var leftThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.lowerValue) || min, this.state.rangeWidth) : {
543
492
  left: '0'
544
493
  };
545
- var rightThumbPosition = this.state.rangeSliderRefAvailable ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
494
+ var rightThumbPosition = this.state.rangeWidth ? this.calculateThumbPositionStyle(Number(this.upperValue) || max, this.state.rangeWidth) : {
546
495
  left: '0'
547
496
  };
548
497
  var leftThumbColor = levels && (0, _range_levels_colors.getLevelColor)(levels, Number(this.lowerValue));
@@ -586,7 +535,6 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
586
535
  }, (0, _react2.jsx)(_range_slider.EuiRangeSlider, (0, _extends2.default)({
587
536
  className: "euiDualRange__slider",
588
537
  css: dualRangeStyles.euiDualRange__slider,
589
- ref: this.handleRangeSliderRefUpdate,
590
538
  id: id,
591
539
  name: name,
592
540
  min: min,
@@ -600,7 +548,9 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
600
548
  showRange: showRange,
601
549
  onFocus: _onFocus,
602
550
  onBlur: _onBlur
603
- }, rest)), this.state.rangeSliderRefAvailable && (0, _react2.jsx)(_react.default.Fragment, null, isDraggable && this.isValid && (0, _react2.jsx)(_range_draggable.EuiRangeDraggable, {
551
+ }, rest, {
552
+ onResize: this.setRangeWidth
553
+ })), isDraggable && this.isValid && (0, _react2.jsx)(_range_draggable.EuiRangeDraggable, {
604
554
  min: min,
605
555
  max: max,
606
556
  value: [this.lowerValue, this.upperValue],
@@ -640,7 +590,7 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
640
590
  style: (0, _global_styling.logicalStyles)(rightThumbStyles),
641
591
  "aria-describedby": showInputOnly ? undefined : this.props['aria-describedby'],
642
592
  "aria-label": showInputOnly ? undefined : this.props['aria-label']
643
- })), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
593
+ }), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
644
594
  showTicks: showTicks,
645
595
  min: Number(min),
646
596
  max: Number(max),
@@ -672,7 +622,6 @@ var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
672
622
  isOpen: this.state.isPopoverOpen,
673
623
  closePopover: this.closePopover,
674
624
  disableFocusTrap: true,
675
- onPanelResize: this.onResize,
676
625
  popoverScreenReaderText: dualSliderScreenReaderInstructions
677
626
  }), theRange) : undefined;
678
627
  return thePopover || theRange;
@@ -65,9 +65,10 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
65
65
  _this.props.onChange(e, isValid);
66
66
  }
67
67
  });
68
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rangeSliderRef", function (ref) {
68
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setTrackWidth", function (_ref) {
69
+ var width = _ref.width;
69
70
  _this.setState({
70
- trackWidth: (ref === null || ref === void 0 ? void 0 : ref.clientWidth) || 0
71
+ trackWidth: width
71
72
  });
72
73
  });
73
74
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onInputFocus", function (e) {
@@ -111,8 +112,8 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
111
112
  key: "render",
112
113
  value: function render() {
113
114
  var _this2 = this;
114
- var _ref = this.context,
115
- defaultFullWidth = _ref.defaultFullWidth;
115
+ var _ref2 = this.context,
116
+ defaultFullWidth = _ref2.defaultFullWidth;
116
117
  var _this$props = this.props,
117
118
  className = _this$props.className,
118
119
  compressed = _this$props.compressed,
@@ -218,7 +219,7 @@ var EuiRangeClass = /*#__PURE__*/function (_Component) {
218
219
  "aria-hidden": !!showInput,
219
220
  thumbColor: thumbColor
220
221
  }, rest, {
221
- ref: this.rangeSliderRef
222
+ onResize: this.setTrackWidth
222
223
  })), showRange && this.isValid && (0, _react2.jsx)(_range_highlight.EuiRangeHighlight, {
223
224
  showTicks: showTicks,
224
225
  min: Number(min),