@elastic/eui 87.0.0 → 87.2.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 (174) hide show
  1. package/dist/eui_theme_dark.css +0 -234
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -234
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accordion/accordion.js +82 -35
  6. package/es/components/auto_sizer/index.js +1 -1
  7. package/es/components/breadcrumbs/breadcrumb.js +2 -3
  8. package/es/components/breadcrumbs/breadcrumbs.js +2 -3
  9. package/es/components/code/code_block_virtualized.js +25 -17
  10. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
  11. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
  12. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
  13. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
  14. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
  15. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
  16. package/es/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
  17. package/es/components/control_bar/control_bar.js +2 -3
  18. package/es/components/date_picker/date_picker_range.js +5 -2
  19. package/es/components/date_picker/super_date_picker/super_date_picker.js +2 -2
  20. package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  21. package/es/components/empty_prompt/empty_prompt.js +0 -1
  22. package/es/components/flyout/flyout.js +9 -7
  23. package/es/components/flyout/flyout_body.js +15 -3
  24. package/es/components/form/range/dual_range.js +33 -6
  25. package/es/components/form/range/range.js +31 -6
  26. package/es/components/form/super_select/super_select.js +1 -1
  27. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -3
  28. package/es/components/header/header_links/header_links.js +2 -3
  29. package/es/components/page/page_header/page_header_content.js +2 -3
  30. package/es/components/page/page_sidebar/page_sidebar.js +2 -2
  31. package/es/components/page_template/page_template.js +14 -5
  32. package/es/components/popover/input_popover.js +24 -9
  33. package/es/components/popover/popover.js +4 -6
  34. package/es/components/resizable_container/index.js +2 -1
  35. package/es/components/resizable_container/resizable_button.js +81 -50
  36. package/es/components/resizable_container/resizable_button.styles.js +66 -0
  37. package/es/components/resizable_container/resizable_collapse_button.js +24 -14
  38. package/es/components/resizable_container/resizable_collapse_button.styles.js +85 -0
  39. package/es/components/selectable/selectable_list/selectable_list.js +97 -79
  40. package/es/components/steps/step.styles.js +5 -5
  41. package/es/components/tool_tip/icon_tip.js +1 -1
  42. package/es/components/tool_tip/tool_tip.js +4 -14
  43. package/es/components/tool_tip/tool_tip_anchor.js +5 -14
  44. package/es/components/tour/tour_step.js +2 -3
  45. package/es/services/accessibility/html_id_generator.js +19 -3
  46. package/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  47. package/eui.d.ts +198 -56
  48. package/i18ntokens.json +64 -46
  49. package/lib/components/accordion/accordion.js +82 -35
  50. package/lib/components/auto_sizer/index.js +11 -7
  51. package/lib/components/breadcrumbs/breadcrumb.js +2 -3
  52. package/lib/components/code/code_block_virtualized.js +25 -17
  53. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
  54. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
  55. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
  56. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
  57. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
  58. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
  59. package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
  60. package/lib/components/date_picker/date_picker_range.js +5 -2
  61. package/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -2
  62. package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  63. package/lib/components/empty_prompt/empty_prompt.js +0 -1
  64. package/lib/components/flyout/flyout.js +9 -7
  65. package/lib/components/flyout/flyout_body.js +15 -3
  66. package/lib/components/form/range/dual_range.js +33 -6
  67. package/lib/components/form/range/range.js +14 -6
  68. package/lib/components/form/super_select/super_select.js +1 -1
  69. package/lib/components/page/page_sidebar/page_sidebar.js +1 -1
  70. package/lib/components/page_template/page_template.js +14 -5
  71. package/lib/components/popover/input_popover.js +23 -8
  72. package/lib/components/popover/popover.js +4 -6
  73. package/lib/components/resizable_container/index.js +8 -1
  74. package/lib/components/resizable_container/resizable_button.js +83 -51
  75. package/lib/components/resizable_container/resizable_button.styles.js +71 -0
  76. package/lib/components/resizable_container/resizable_collapse_button.js +24 -14
  77. package/lib/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  78. package/lib/components/selectable/selectable_list/selectable_list.js +97 -79
  79. package/lib/components/steps/step.styles.js +5 -5
  80. package/lib/components/tool_tip/icon_tip.js +1 -1
  81. package/lib/components/tool_tip/tool_tip.js +4 -14
  82. package/lib/components/tool_tip/tool_tip_anchor.js +5 -13
  83. package/lib/services/accessibility/html_id_generator.js +21 -2
  84. package/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  85. package/optimize/es/components/accordion/accordion.js +82 -35
  86. package/optimize/es/components/auto_sizer/index.js +1 -1
  87. package/optimize/es/components/code/code_block_virtualized.js +25 -17
  88. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -1
  89. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -1
  90. package/optimize/es/components/date_picker/date_picker_range.js +5 -2
  91. package/optimize/es/components/flyout/flyout.js +9 -7
  92. package/optimize/es/components/flyout/flyout_body.js +4 -2
  93. package/optimize/es/components/form/range/dual_range.js +7 -4
  94. package/optimize/es/components/form/range/range.js +5 -4
  95. package/optimize/es/components/page/page_sidebar/page_sidebar.js +2 -2
  96. package/optimize/es/components/page_template/page_template.js +14 -5
  97. package/optimize/es/components/popover/input_popover.js +13 -8
  98. package/optimize/es/components/popover/popover.js +2 -3
  99. package/optimize/es/components/resizable_container/index.js +2 -1
  100. package/optimize/es/components/resizable_container/resizable_button.js +61 -44
  101. package/optimize/es/components/resizable_container/resizable_button.styles.js +66 -0
  102. package/optimize/es/components/resizable_container/resizable_collapse_button.js +19 -11
  103. package/optimize/es/components/resizable_container/resizable_collapse_button.styles.js +85 -0
  104. package/optimize/es/components/selectable/selectable_list/selectable_list.js +97 -79
  105. package/optimize/es/components/steps/step.styles.js +5 -5
  106. package/optimize/es/components/tool_tip/tool_tip.js +3 -13
  107. package/optimize/es/components/tool_tip/tool_tip_anchor.js +4 -8
  108. package/optimize/es/services/accessibility/html_id_generator.js +19 -3
  109. package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  110. package/optimize/lib/components/accordion/accordion.js +82 -35
  111. package/optimize/lib/components/auto_sizer/index.js +11 -7
  112. package/optimize/lib/components/code/code_block_virtualized.js +25 -17
  113. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -1
  114. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -1
  115. package/optimize/lib/components/date_picker/date_picker_range.js +5 -2
  116. package/optimize/lib/components/flyout/flyout.js +9 -7
  117. package/optimize/lib/components/flyout/flyout_body.js +4 -2
  118. package/optimize/lib/components/form/range/dual_range.js +7 -4
  119. package/optimize/lib/components/form/range/range.js +5 -4
  120. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +1 -1
  121. package/optimize/lib/components/page_template/page_template.js +14 -5
  122. package/optimize/lib/components/popover/input_popover.js +12 -7
  123. package/optimize/lib/components/popover/popover.js +2 -3
  124. package/optimize/lib/components/resizable_container/index.js +8 -1
  125. package/optimize/lib/components/resizable_container/resizable_button.js +63 -45
  126. package/optimize/lib/components/resizable_container/resizable_button.styles.js +71 -0
  127. package/optimize/lib/components/resizable_container/resizable_collapse_button.js +19 -11
  128. package/optimize/lib/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  129. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +97 -79
  130. package/optimize/lib/components/steps/step.styles.js +5 -5
  131. package/optimize/lib/components/tool_tip/tool_tip.js +3 -13
  132. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +4 -8
  133. package/optimize/lib/services/accessibility/html_id_generator.js +21 -2
  134. package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  135. package/package.json +19 -21
  136. package/src/components/index.scss +0 -1
  137. package/test-env/components/accordion/accordion.js +82 -35
  138. package/test-env/components/auto_sizer/index.js +11 -7
  139. package/test-env/components/breadcrumbs/breadcrumb.js +2 -3
  140. package/test-env/components/code/code_block_virtualized.js +25 -17
  141. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
  142. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
  143. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
  144. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
  145. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
  146. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
  147. package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
  148. package/test-env/components/date_picker/date_picker_range.js +5 -2
  149. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +2 -2
  150. package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
  151. package/test-env/components/empty_prompt/empty_prompt.js +0 -1
  152. package/test-env/components/flyout/flyout_body.js +15 -3
  153. package/test-env/components/form/range/dual_range.js +33 -6
  154. package/test-env/components/form/range/range.js +14 -6
  155. package/test-env/components/form/super_select/super_select.js +1 -1
  156. package/test-env/components/page/page_sidebar/page_sidebar.js +1 -1
  157. package/test-env/components/page_template/page_template.js +14 -5
  158. package/test-env/components/popover/input_popover.js +23 -8
  159. package/test-env/components/popover/popover.js +4 -6
  160. package/test-env/components/resizable_container/index.js +8 -1
  161. package/test-env/components/resizable_container/resizable_button.js +83 -51
  162. package/test-env/components/resizable_container/resizable_button.styles.js +71 -0
  163. package/test-env/components/resizable_container/resizable_collapse_button.js +19 -14
  164. package/test-env/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  165. package/test-env/components/selectable/selectable_list/selectable_list.js +97 -79
  166. package/test-env/components/steps/step.styles.js +5 -5
  167. package/test-env/components/tool_tip/icon_tip.js +1 -1
  168. package/test-env/components/tool_tip/tool_tip.js +4 -14
  169. package/test-env/components/tool_tip/tool_tip_anchor.js +5 -11
  170. package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  171. package/src/components/resizable_container/_index.scss +0 -3
  172. package/src/components/resizable_container/_resizable_button.scss +0 -129
  173. package/src/components/resizable_container/_resizable_collapse_button.scss +0 -145
  174. package/src/components/resizable_container/_variables.scss +0 -2
@@ -170,17 +170,67 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
170
170
  search: searchValue
171
171
  }, label));
172
172
  }, _reactWindow.areEqual));
173
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderVirtualizedList", function (heightIsFull, optionArray) {
174
+ if (!_this.props.isVirtualized) return null;
175
+ var _this$props3 = _this.props,
176
+ windowProps = _this$props3.windowProps,
177
+ forcedHeight = _this$props3.height,
178
+ rowHeight = _this$props3.rowHeight;
179
+ var virtualizationProps = _objectSpread({
180
+ className: 'euiSelectableList__list',
181
+ ref: _this.setListRef,
182
+ outerRef: _this.removeScrollableTabStop,
183
+ innerRef: _this.setListBoxRef,
184
+ innerElementType: 'ul',
185
+ itemCount: optionArray.length,
186
+ itemData: optionArray,
187
+ itemSize: rowHeight,
188
+ 'data-skip-axe': 'scrollable-region-focusable'
189
+ }, windowProps);
190
+
191
+ // Calculated height is only used if height is not full
192
+ var calculatedHeight = !heightIsFull ? forcedHeight || 0 : 0;
193
+
194
+ // If calculatedHeight is still falsy, then calculate it
195
+ if (!heightIsFull && !calculatedHeight) {
196
+ var maxVisibleOptions = 7;
197
+ var numVisibleOptions = optionArray.length;
198
+ var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
199
+ if (numVisibleMoreThanMax) {
200
+ // Show only half of the last one to indicate there's more to scroll to
201
+ calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
202
+ } else {
203
+ calculatedHeight = numVisibleOptions * rowHeight;
204
+ }
205
+ }
206
+ return heightIsFull ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, null, function (_ref2) {
207
+ var width = _ref2.width,
208
+ height = _ref2.height;
209
+ return (0, _react2.jsx)(_reactWindow.FixedSizeList, (0, _extends2.default)({
210
+ width: width,
211
+ height: height
212
+ }, virtualizationProps), _this.ListRow);
213
+ }) : (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
214
+ disableHeight: true
215
+ }, function (_ref3) {
216
+ var width = _ref3.width;
217
+ return (0, _react2.jsx)(_reactWindow.FixedSizeList, (0, _extends2.default)({
218
+ width: width,
219
+ height: calculatedHeight
220
+ }, virtualizationProps), _this.ListRow);
221
+ });
222
+ });
173
223
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAddOrRemoveOption", function (option, event) {
174
224
  if (option.disabled) {
175
225
  return;
176
226
  }
177
- var _this$props3 = _this.props,
178
- allowExclusions = _this$props3.allowExclusions,
179
- options = _this$props3.options,
180
- _this$props3$visibleO = _this$props3.visibleOptions,
181
- visibleOptions = _this$props3$visibleO === void 0 ? options : _this$props3$visibleO;
182
- _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref2) {
183
- var label = _ref2.label;
227
+ var _this$props4 = _this.props,
228
+ allowExclusions = _this$props4.allowExclusions,
229
+ options = _this$props4.options,
230
+ _this$props4$visibleO = _this$props4.visibleOptions,
231
+ visibleOptions = _this$props4$visibleO === void 0 ? options : _this$props4$visibleO;
232
+ _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref4) {
233
+ var label = _ref4.label;
184
234
  return label === option.label;
185
235
  }), function () {
186
236
  if (option.checked === 'on' && allowExclusions) {
@@ -193,10 +243,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
193
243
  });
194
244
  });
195
245
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAddOption", function (addedOption, event) {
196
- var _this$props4 = _this.props,
197
- onOptionClick = _this$props4.onOptionClick,
198
- options = _this$props4.options,
199
- singleSelection = _this$props4.singleSelection;
246
+ var _this$props5 = _this.props,
247
+ onOptionClick = _this$props5.onOptionClick,
248
+ options = _this$props5.options,
249
+ singleSelection = _this$props5.singleSelection;
200
250
  var changedOption = _objectSpread({}, addedOption);
201
251
  var updatedOptions = options.map(function (option) {
202
252
  // if singleSelection is enabled, uncheck any selected option(s)
@@ -215,10 +265,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
215
265
  onOptionClick(updatedOptions, event, changedOption);
216
266
  });
217
267
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onRemoveOption", function (removedOption, event) {
218
- var _this$props5 = _this.props,
219
- onOptionClick = _this$props5.onOptionClick,
220
- singleSelection = _this$props5.singleSelection,
221
- options = _this$props5.options;
268
+ var _this$props6 = _this.props,
269
+ onOptionClick = _this$props6.onOptionClick,
270
+ singleSelection = _this$props6.singleSelection,
271
+ options = _this$props6.options;
222
272
  var changedOption = _objectSpread({}, removedOption);
223
273
  var updatedOptions = options.map(function (option) {
224
274
  var updatedOption = _objectSpread({}, option);
@@ -231,9 +281,9 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
231
281
  onOptionClick(updatedOptions, event, changedOption);
232
282
  });
233
283
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onExcludeOption", function (excludedOption, event) {
234
- var _this$props6 = _this.props,
235
- onOptionClick = _this$props6.onOptionClick,
236
- options = _this$props6.options;
284
+ var _this$props7 = _this.props,
285
+ onOptionClick = _this$props7.onOptionClick,
286
+ options = _this$props7.options;
237
287
  var changedOption = _objectSpread({}, excludedOption);
238
288
  var updatedOptions = options.map(function (option) {
239
289
  var updatedOption = _objectSpread({}, option);
@@ -262,76 +312,44 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
262
312
  key: "render",
263
313
  value: function render() {
264
314
  var _this2 = this;
265
- var _this$props7 = this.props,
266
- className = _this$props7.className,
267
- options = _this$props7.options,
268
- searchValue = _this$props7.searchValue,
269
- onOptionClick = _this$props7.onOptionClick,
270
- renderOption = _this$props7.renderOption,
271
- forcedHeight = _this$props7.height,
272
- windowProps = _this$props7.windowProps,
273
- rowHeight = _this$props7.rowHeight,
274
- activeOptionIndex = _this$props7.activeOptionIndex,
275
- makeOptionId = _this$props7.makeOptionId,
276
- showIcons = _this$props7.showIcons,
277
- singleSelection = _this$props7.singleSelection,
278
- visibleOptions = _this$props7.visibleOptions,
279
- allowExclusions = _this$props7.allowExclusions,
280
- bordered = _this$props7.bordered,
281
- paddingSize = _this$props7.paddingSize,
282
- searchable = _this$props7.searchable,
283
- onFocusBadge = _this$props7.onFocusBadge,
284
- listId = _this$props7.listId,
285
- setActiveOptionIndex = _this$props7.setActiveOptionIndex,
286
- ariaLabel = _this$props7['aria-label'],
287
- ariaLabelledby = _this$props7['aria-labelledby'],
288
- ariaDescribedby = _this$props7['aria-describedby'],
289
- role = _this$props7.role,
290
- isVirtualized = _this$props7.isVirtualized,
291
- textWrap = _this$props7.textWrap,
292
- rest = (0, _objectWithoutProperties2.default)(_this$props7, _excluded3);
315
+ var _this$props8 = this.props,
316
+ className = _this$props8.className,
317
+ options = _this$props8.options,
318
+ searchValue = _this$props8.searchValue,
319
+ onOptionClick = _this$props8.onOptionClick,
320
+ renderOption = _this$props8.renderOption,
321
+ forcedHeight = _this$props8.height,
322
+ windowProps = _this$props8.windowProps,
323
+ rowHeight = _this$props8.rowHeight,
324
+ activeOptionIndex = _this$props8.activeOptionIndex,
325
+ makeOptionId = _this$props8.makeOptionId,
326
+ showIcons = _this$props8.showIcons,
327
+ singleSelection = _this$props8.singleSelection,
328
+ visibleOptions = _this$props8.visibleOptions,
329
+ allowExclusions = _this$props8.allowExclusions,
330
+ bordered = _this$props8.bordered,
331
+ paddingSize = _this$props8.paddingSize,
332
+ searchable = _this$props8.searchable,
333
+ onFocusBadge = _this$props8.onFocusBadge,
334
+ listId = _this$props8.listId,
335
+ setActiveOptionIndex = _this$props8.setActiveOptionIndex,
336
+ ariaLabel = _this$props8['aria-label'],
337
+ ariaLabelledby = _this$props8['aria-labelledby'],
338
+ ariaDescribedby = _this$props8['aria-describedby'],
339
+ role = _this$props8.role,
340
+ isVirtualized = _this$props8.isVirtualized,
341
+ textWrap = _this$props8.textWrap,
342
+ rest = (0, _objectWithoutProperties2.default)(_this$props8, _excluded3);
293
343
  var optionArray = visibleOptions || options;
294
344
  this.calculateAriaSetAttrs(optionArray);
295
345
  var heightIsFull = forcedHeight === 'full';
296
- var calculatedHeight = heightIsFull ? false : forcedHeight;
297
-
298
- // If calculatedHeight is still undefined, then calculate it
299
- if (calculatedHeight === undefined) {
300
- var maxVisibleOptions = 7;
301
- var numVisibleOptions = optionArray.length;
302
- var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
303
- if (numVisibleMoreThanMax) {
304
- // Show only half of the last one to indicate there's more to scroll to
305
- calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
306
- } else {
307
- calculatedHeight = numVisibleOptions * rowHeight;
308
- }
309
- }
310
346
  var classes = (0, _classnames.default)('euiSelectableList', {
311
347
  'euiSelectableList-fullHeight': heightIsFull,
312
348
  'euiSelectableList-bordered': bordered
313
349
  }, className);
314
350
  return (0, _react2.jsx)("div", (0, _extends2.default)({
315
351
  className: classes
316
- }, rest), isVirtualized ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
317
- disableHeight: !heightIsFull
318
- }, function (_ref3) {
319
- var width = _ref3.width,
320
- height = _ref3.height;
321
- return (0, _react2.jsx)(_reactWindow.FixedSizeList, (0, _extends2.default)({
322
- ref: _this2.setListRef,
323
- outerRef: _this2.removeScrollableTabStop,
324
- className: "euiSelectableList__list",
325
- "data-skip-axe": "scrollable-region-focusable",
326
- width: width,
327
- height: calculatedHeight || height,
328
- itemCount: optionArray.length,
329
- itemData: optionArray,
330
- itemSize: rowHeight,
331
- innerElementType: "ul",
332
- innerRef: _this2.setListBoxRef
333
- }, windowProps), _this2.ListRow);
334
- }) : (0, _react2.jsx)("div", {
352
+ }, rest), isVirtualized ? this.renderVirtualizedList(heightIsFull, optionArray) : (0, _react2.jsx)("div", {
335
353
  className: "euiSelectableList__list",
336
354
  ref: this.removeScrollableTabStop
337
355
  }, (0, _react2.jsx)("ul", {
@@ -48,7 +48,7 @@ exports.euiStepStyles = euiStepStyles;
48
48
  var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
49
49
  var euiTheme = euiThemeContext.euiTheme;
50
50
  var euiStep = euiStepVariables(euiTheme);
51
- var styles = {
51
+ return {
52
52
  euiStep__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-top', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('padding-bottom', (0, _global_styling.mathWithUnits)([euiTheme.size.xl, euiTheme.size.s], function (x, y) {
53
53
  return x + y;
54
54
  })), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";;label:euiStep__content;"),
@@ -58,16 +58,16 @@ var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
58
58
  })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberSize, function (x) {
59
59
  return x / 2;
60
60
  })), ";;label:m;"),
61
- s: /*#__PURE__*/(0, _react.css)(";label:s;"),
62
- // s is the same as m, so we'll programmatically duplicate it below
61
+ // `s` is the same as `m` - use a getter to duplicate its content
62
+ get s() {
63
+ return this.m;
64
+ },
63
65
  xs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberXSSize, euiStep.numberMargin], function (x, y) {
64
66
  return x / 2 + y;
65
67
  })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXSSize, function (x) {
66
68
  return x / 2;
67
69
  })), ";;label:xs;")
68
70
  };
69
- styles.s = styles.m;
70
- return styles;
71
71
  };
72
72
  exports.euiStepContentStyles = euiStepContentStyles;
73
73
  var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
@@ -17,7 +17,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
18
  var _react = _interopRequireWildcard(require("react"));
19
19
  var _classnames = _interopRequireDefault(require("classnames"));
20
- var _common = require("../common");
21
20
  var _services = require("../../services");
22
21
  var _react2 = require("../../services/react");
23
22
  var _resize_observer = require("../observer/resize_observer");
@@ -38,22 +37,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
38
37
  * in compliance with, at your election, the Elastic License 2.0 or the Server
39
38
  * Side Public License, v 1.
40
39
  */
41
- var positionsToClassNameMap = {
42
- top: 'euiToolTip--top',
43
- right: 'euiToolTip--right',
44
- bottom: 'euiToolTip--bottom',
45
- left: 'euiToolTip--left'
46
- };
47
- var POSITIONS = (0, _common.keysOf)(positionsToClassNameMap);
40
+ var POSITIONS = ['top', 'right', 'bottom', 'left'];
48
41
  exports.POSITIONS = POSITIONS;
42
+ var DISPLAYS = ['inlineBlock', 'block'];
49
43
  var delayToMsMap = {
50
44
  regular: 250,
51
45
  long: 250 * 5
52
46
  };
53
- var displayToClassNameMap = {
54
- inlineBlock: undefined,
55
- block: 'euiToolTipAnchor--displayBlock'
56
- };
57
47
  var DEFAULT_TOOLTIP_STYLES = {
58
48
  // position the tooltip content near the top-left
59
49
  // corner of the window so it can't create scrollbars
@@ -264,7 +254,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
264
254
  onFocus: this.onFocus,
265
255
  onMouseOver: this.showToolTip,
266
256
  onMouseOut: this.onMouseOut,
267
- id: this.state.id,
257
+ id: id,
268
258
  className: anchorClasses,
269
259
  display: display,
270
260
  isVisible: visible
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.EuiToolTipAnchor = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
11
  var _react = _interopRequireWildcard(require("react"));
13
12
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -23,8 +22,6 @@ var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "classN
23
22
  */
24
23
  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); }
25
24
  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; }
26
- 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; }
27
- 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) { (0, _defineProperty2.default)(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; }
28
25
  var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
29
26
  var _onBlur = _ref.onBlur,
30
27
  _onFocus = _ref.onFocus,
@@ -48,7 +45,7 @@ var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
48
45
  className: classes,
49
46
  onMouseOver: onMouseOver,
50
47
  onMouseOut: onMouseOut
51
- }), /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
48
+ }), /*#__PURE__*/(0, _react.cloneElement)(children, {
52
49
  onFocus: function onFocus(e) {
53
50
  _onFocus();
54
51
  children.props.onFocus && children.props.onFocus(e);
@@ -56,10 +53,9 @@ var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
56
53
  onBlur: function onBlur(e) {
57
54
  _onBlur();
58
55
  children.props.onBlur && children.props.onBlur(e);
59
- }
60
- }, isVisible && {
61
- 'aria-describedby': id
62
- })))
56
+ },
57
+ 'aria-describedby': isVisible ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
58
+ }))
63
59
  );
64
60
  });
65
61
  exports.EuiToolTipAnchor = EuiToolTipAnchor;
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
 
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.htmlIdGenerator = htmlIdGenerator;
7
8
  exports.useGeneratedHtmlId = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
8
10
  var _uuid = require("uuid");
9
- var _react = require("react");
11
+ 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); }
12
+ 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; }
10
13
  /*
11
14
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
15
  * or more contributor license agreements. Licensed under the Elastic License
@@ -38,7 +41,8 @@ function htmlIdGenerator() {
38
41
  * This prevents IDs from being re-randomized on every component update.
39
42
  */
40
43
 
41
- var useGeneratedHtmlId = function useGeneratedHtmlId() {
44
+ // We can remove this deprecated hook once EUI no longer needs to support React 16-17
45
+ var useDeprecatedGeneratedHtmlId = function useDeprecatedGeneratedHtmlId() {
42
46
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
43
47
  prefix = _ref.prefix,
44
48
  suffix = _ref.suffix,
@@ -47,4 +51,19 @@ var useGeneratedHtmlId = function useGeneratedHtmlId() {
47
51
  return conditionalId || htmlIdGenerator(prefix)(suffix);
48
52
  }, [conditionalId, prefix, suffix]);
49
53
  };
54
+ var useNewGeneratedHtmlId = function useNewGeneratedHtmlId() {
55
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
56
+ _ref2$prefix = _ref2.prefix,
57
+ prefix = _ref2$prefix === void 0 ? '' : _ref2$prefix,
58
+ _ref2$suffix = _ref2.suffix,
59
+ suffix = _ref2$suffix === void 0 ? '' : _ref2$suffix,
60
+ conditionalId = _ref2.conditionalId;
61
+ // Using the default export and dot notation here is intentional
62
+ // to prevent React <18 import errors.
63
+ var id = _react.default.useId();
64
+ return (0, _react.useMemo)(function () {
65
+ return conditionalId || "".concat(prefix).concat(id).concat(suffix);
66
+ }, [id, conditionalId, prefix, suffix]);
67
+ };
68
+ var useGeneratedHtmlId = 'useId' in _react.default ? useNewGeneratedHtmlId : useDeprecatedGeneratedHtmlId;
50
69
  exports.useGeneratedHtmlId = useGeneratedHtmlId;
@@ -87,7 +87,6 @@ var euiShadowXLarge = function euiShadowXLarge(_ref9) {
87
87
 
88
88
  /**
89
89
  * slightShadowHover
90
- * TODO: I think this is only used by panels/cards in the Amsterdam theme, move there
91
90
  */
92
91
  exports.euiShadowXLarge = euiShadowXLarge;
93
92
  var euiSlightShadowHover = function euiSlightShadowHover(_ref11) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "87.0.0",
4
+ "version": "87.2.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
8
8
  "types": "eui.d.ts",
9
- "docker_image": "18.17.0",
9
+ "docker_image": "18.17.1",
10
10
  "engines": {
11
11
  "node": "16.x || 18.x || >=20.0"
12
12
  },
@@ -47,8 +47,8 @@
47
47
  "yo-doc": "yo ./generator-eui/app/documentation.js",
48
48
  "yo-changelog": "yo ./generator-eui/changelog/index.js",
49
49
  "release": "node ./scripts/release.js",
50
- "storybook": "storybook dev -p 6006",
51
- "build-storybook": "storybook build"
50
+ "storybook": "yarn compile-scss && storybook dev -p 6006",
51
+ "build-storybook": "yarn compile-scss && storybook build"
52
52
  },
53
53
  "repository": {
54
54
  "type": "git",
@@ -68,25 +68,24 @@
68
68
  "@types/lodash": "^4.14.194",
69
69
  "@types/numeral": "^0.0.28",
70
70
  "@types/react-input-autosize": "^2.2.1",
71
- "@types/react-virtualized-auto-sizer": "^1.0.1",
72
71
  "@types/react-window": "^1.8.5",
73
72
  "@types/refractor": "^3.0.0",
74
73
  "@types/resize-observer-browser": "^0.1.5",
75
74
  "@types/vfile-message": "^2.0.0",
76
75
  "chroma-js": "^2.4.2",
77
- "classnames": "^2.2.6",
76
+ "classnames": "^2.3.2",
78
77
  "lodash": "^4.17.21",
79
78
  "mdast-util-to-hast": "^10.2.0",
80
79
  "numeral": "^2.0.6",
81
80
  "prop-types": "^15.6.0",
82
- "react-dropzone": "^11.5.3",
81
+ "react-dropzone": "^11.7.1",
83
82
  "react-element-to-jsx-string": "^14.3.4",
84
83
  "react-focus-on": "^3.9.1",
85
84
  "react-input-autosize": "^3.0.0",
86
85
  "react-is": "^17.0.2",
87
86
  "react-remove-scroll-bar": "^2.3.4",
88
- "react-virtualized-auto-sizer": "^1.0.6",
89
- "react-window": "^1.8.6",
87
+ "react-virtualized-auto-sizer": "^1.0.20",
88
+ "react-window": "^1.8.9",
90
89
  "refractor": "^3.5.0",
91
90
  "rehype-raw": "^5.0.0",
92
91
  "rehype-react": "^6.0.0",
@@ -95,7 +94,7 @@
95
94
  "remark-emoji": "^2.1.0",
96
95
  "remark-parse-no-trim": "^8.0.4",
97
96
  "remark-rehype": "^8.0.0",
98
- "tabbable": "^5.2.1",
97
+ "tabbable": "^5.3.3",
99
98
  "text-diff": "^1.0.1",
100
99
  "unified": "^9.2.0",
101
100
  "unist-util-visit": "^2.0.3",
@@ -130,13 +129,13 @@
130
129
  "@emotion/react": "^11.11.0",
131
130
  "@faker-js/faker": "^7.6.0",
132
131
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
133
- "@storybook/addon-essentials": "^7.0.17",
134
- "@storybook/addon-interactions": "^7.0.17",
135
- "@storybook/addon-links": "^7.0.17",
136
- "@storybook/blocks": "^7.0.17",
137
- "@storybook/react": "^7.0.17",
138
- "@storybook/react-webpack5": "^7.0.17",
139
- "@storybook/testing-library": "^0.0.14-next.2",
132
+ "@storybook/addon-essentials": "^7.3.1",
133
+ "@storybook/addon-interactions": "^7.3.1",
134
+ "@storybook/addon-links": "^7.3.1",
135
+ "@storybook/blocks": "^7.3.1",
136
+ "@storybook/react": "^7.3.1",
137
+ "@storybook/react-webpack5": "^7.3.1",
138
+ "@storybook/testing-library": "^0.1.0",
140
139
  "@svgr/core": "8.0.0",
141
140
  "@svgr/plugin-jsx": "^8.0.1",
142
141
  "@svgr/plugin-svgo": "^8.0.1",
@@ -147,7 +146,7 @@
147
146
  "@testing-library/user-event": "^13.5.0",
148
147
  "@types/cheerio": "^0.22.31",
149
148
  "@types/chroma-js": "^2.4.0",
150
- "@types/classnames": "^2.2.10",
149
+ "@types/classnames": "^2.3.1",
151
150
  "@types/enzyme": "^3.10.5",
152
151
  "@types/jest": "^24.0.6",
153
152
  "@types/node": "^10.17.5",
@@ -155,7 +154,6 @@
155
154
  "@types/react-dom": "^18.2.6",
156
155
  "@types/react-is": "^17.0.3",
157
156
  "@types/react-router-dom": "^5.3.3",
158
- "@types/tabbable": "^3.1.2",
159
157
  "@types/testing-library__jest-dom": "^5.14.3",
160
158
  "@types/url-parse": "^1.4.8",
161
159
  "@types/uuid": "^8.3.0",
@@ -201,7 +199,7 @@
201
199
  "eslint-plugin-prettier": "^4.2.1",
202
200
  "eslint-plugin-react": "^7.32.2",
203
201
  "eslint-plugin-react-hooks": "^4.6.0",
204
- "eslint-plugin-storybook": "^0.6.12",
202
+ "eslint-plugin-storybook": "^0.6.13",
205
203
  "expose-gc": "^1.0.0",
206
204
  "file-loader": "^6.1.0",
207
205
  "findup": "^0.1.5",
@@ -248,7 +246,7 @@
248
246
  "sass-loader": "^13.2.0",
249
247
  "shelljs": "^0.8.4",
250
248
  "start-server-and-test": "^1.11.3",
251
- "storybook": "^7.0.17",
249
+ "storybook": "^7.3.1",
252
250
  "style-loader": "^3.3.1",
253
251
  "stylelint": "^15.7.0",
254
252
  "stylelint-config-prettier-scss": "^1.0.0",
@@ -16,7 +16,6 @@
16
16
  @import 'panel/index';
17
17
  @import 'page/index'; // Page needs to come after Panel for cascade specificity
18
18
  @import 'tree_view/index';
19
- @import 'resizable_container/index';
20
19
  @import 'side_nav/index';
21
20
  @import 'search_bar/index';
22
21
  @import 'selectable/index';