@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
@@ -176,17 +176,67 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
176
176
  search: searchValue
177
177
  }, label));
178
178
  }, _reactWindow.areEqual));
179
+ _defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function (heightIsFull, optionArray) {
180
+ if (!_this.props.isVirtualized) return null;
181
+ var _this$props3 = _this.props,
182
+ windowProps = _this$props3.windowProps,
183
+ forcedHeight = _this$props3.height,
184
+ rowHeight = _this$props3.rowHeight;
185
+ var virtualizationProps = _objectSpread({
186
+ className: 'euiSelectableList__list',
187
+ ref: _this.setListRef,
188
+ outerRef: _this.removeScrollableTabStop,
189
+ innerRef: _this.setListBoxRef,
190
+ innerElementType: 'ul',
191
+ itemCount: optionArray.length,
192
+ itemData: optionArray,
193
+ itemSize: rowHeight,
194
+ 'data-skip-axe': 'scrollable-region-focusable'
195
+ }, windowProps);
196
+
197
+ // Calculated height is only used if height is not full
198
+ var calculatedHeight = !heightIsFull ? forcedHeight || 0 : 0;
199
+
200
+ // If calculatedHeight is still falsy, then calculate it
201
+ if (!heightIsFull && !calculatedHeight) {
202
+ var maxVisibleOptions = 7;
203
+ var numVisibleOptions = optionArray.length;
204
+ var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
205
+ if (numVisibleMoreThanMax) {
206
+ // Show only half of the last one to indicate there's more to scroll to
207
+ calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
208
+ } else {
209
+ calculatedHeight = numVisibleOptions * rowHeight;
210
+ }
211
+ }
212
+ return heightIsFull ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, null, function (_ref2) {
213
+ var width = _ref2.width,
214
+ height = _ref2.height;
215
+ return (0, _react2.jsx)(_reactWindow.FixedSizeList, _extends({
216
+ width: width,
217
+ height: height
218
+ }, virtualizationProps), _this.ListRow);
219
+ }) : (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
220
+ disableHeight: true
221
+ }, function (_ref3) {
222
+ var width = _ref3.width;
223
+ return (0, _react2.jsx)(_reactWindow.FixedSizeList, _extends({
224
+ width: width,
225
+ height: calculatedHeight
226
+ }, virtualizationProps), _this.ListRow);
227
+ });
228
+ });
179
229
  _defineProperty(_assertThisInitialized(_this), "onAddOrRemoveOption", function (option, event) {
180
230
  if (option.disabled) {
181
231
  return;
182
232
  }
183
- var _this$props3 = _this.props,
184
- allowExclusions = _this$props3.allowExclusions,
185
- options = _this$props3.options,
186
- _this$props3$visibleO = _this$props3.visibleOptions,
187
- visibleOptions = _this$props3$visibleO === void 0 ? options : _this$props3$visibleO;
188
- _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref2) {
189
- var label = _ref2.label;
233
+ var _this$props4 = _this.props,
234
+ allowExclusions = _this$props4.allowExclusions,
235
+ options = _this$props4.options,
236
+ _this$props4$visibleO = _this$props4.visibleOptions,
237
+ visibleOptions = _this$props4$visibleO === void 0 ? options : _this$props4$visibleO;
238
+ _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref4) {
239
+ var label = _ref4.label;
190
240
  return label === option.label;
191
241
  }), function () {
192
242
  if (option.checked === 'on' && allowExclusions) {
@@ -199,10 +249,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
199
249
  });
200
250
  });
201
251
  _defineProperty(_assertThisInitialized(_this), "onAddOption", function (addedOption, event) {
202
- var _this$props4 = _this.props,
203
- onOptionClick = _this$props4.onOptionClick,
204
- options = _this$props4.options,
205
- singleSelection = _this$props4.singleSelection;
252
+ var _this$props5 = _this.props,
253
+ onOptionClick = _this$props5.onOptionClick,
254
+ options = _this$props5.options,
255
+ singleSelection = _this$props5.singleSelection;
206
256
  var changedOption = _objectSpread({}, addedOption);
207
257
  var updatedOptions = options.map(function (option) {
208
258
  // if singleSelection is enabled, uncheck any selected option(s)
@@ -221,10 +271,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
221
271
  onOptionClick(updatedOptions, event, changedOption);
222
272
  });
223
273
  _defineProperty(_assertThisInitialized(_this), "onRemoveOption", function (removedOption, event) {
224
- var _this$props5 = _this.props,
225
- onOptionClick = _this$props5.onOptionClick,
226
- singleSelection = _this$props5.singleSelection,
227
- options = _this$props5.options;
274
+ var _this$props6 = _this.props,
275
+ onOptionClick = _this$props6.onOptionClick,
276
+ singleSelection = _this$props6.singleSelection,
277
+ options = _this$props6.options;
228
278
  var changedOption = _objectSpread({}, removedOption);
229
279
  var updatedOptions = options.map(function (option) {
230
280
  var updatedOption = _objectSpread({}, option);
@@ -237,9 +287,9 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
237
287
  onOptionClick(updatedOptions, event, changedOption);
238
288
  });
239
289
  _defineProperty(_assertThisInitialized(_this), "onExcludeOption", function (excludedOption, event) {
240
- var _this$props6 = _this.props,
241
- onOptionClick = _this$props6.onOptionClick,
242
- options = _this$props6.options;
290
+ var _this$props7 = _this.props,
291
+ onOptionClick = _this$props7.onOptionClick,
292
+ options = _this$props7.options;
243
293
  var changedOption = _objectSpread({}, excludedOption);
244
294
  var updatedOptions = options.map(function (option) {
245
295
  var updatedOption = _objectSpread({}, option);
@@ -268,76 +318,44 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
268
318
  key: "render",
269
319
  value: function render() {
270
320
  var _this2 = this;
271
- var _this$props7 = this.props,
272
- className = _this$props7.className,
273
- options = _this$props7.options,
274
- searchValue = _this$props7.searchValue,
275
- onOptionClick = _this$props7.onOptionClick,
276
- renderOption = _this$props7.renderOption,
277
- forcedHeight = _this$props7.height,
278
- windowProps = _this$props7.windowProps,
279
- rowHeight = _this$props7.rowHeight,
280
- activeOptionIndex = _this$props7.activeOptionIndex,
281
- makeOptionId = _this$props7.makeOptionId,
282
- showIcons = _this$props7.showIcons,
283
- singleSelection = _this$props7.singleSelection,
284
- visibleOptions = _this$props7.visibleOptions,
285
- allowExclusions = _this$props7.allowExclusions,
286
- bordered = _this$props7.bordered,
287
- paddingSize = _this$props7.paddingSize,
288
- searchable = _this$props7.searchable,
289
- onFocusBadge = _this$props7.onFocusBadge,
290
- listId = _this$props7.listId,
291
- setActiveOptionIndex = _this$props7.setActiveOptionIndex,
292
- ariaLabel = _this$props7['aria-label'],
293
- ariaLabelledby = _this$props7['aria-labelledby'],
294
- ariaDescribedby = _this$props7['aria-describedby'],
295
- role = _this$props7.role,
296
- isVirtualized = _this$props7.isVirtualized,
297
- textWrap = _this$props7.textWrap,
298
- rest = _objectWithoutProperties(_this$props7, _excluded3);
321
+ var _this$props8 = this.props,
322
+ className = _this$props8.className,
323
+ options = _this$props8.options,
324
+ searchValue = _this$props8.searchValue,
325
+ onOptionClick = _this$props8.onOptionClick,
326
+ renderOption = _this$props8.renderOption,
327
+ forcedHeight = _this$props8.height,
328
+ windowProps = _this$props8.windowProps,
329
+ rowHeight = _this$props8.rowHeight,
330
+ activeOptionIndex = _this$props8.activeOptionIndex,
331
+ makeOptionId = _this$props8.makeOptionId,
332
+ showIcons = _this$props8.showIcons,
333
+ singleSelection = _this$props8.singleSelection,
334
+ visibleOptions = _this$props8.visibleOptions,
335
+ allowExclusions = _this$props8.allowExclusions,
336
+ bordered = _this$props8.bordered,
337
+ paddingSize = _this$props8.paddingSize,
338
+ searchable = _this$props8.searchable,
339
+ onFocusBadge = _this$props8.onFocusBadge,
340
+ listId = _this$props8.listId,
341
+ setActiveOptionIndex = _this$props8.setActiveOptionIndex,
342
+ ariaLabel = _this$props8['aria-label'],
343
+ ariaLabelledby = _this$props8['aria-labelledby'],
344
+ ariaDescribedby = _this$props8['aria-describedby'],
345
+ role = _this$props8.role,
346
+ isVirtualized = _this$props8.isVirtualized,
347
+ textWrap = _this$props8.textWrap,
348
+ rest = _objectWithoutProperties(_this$props8, _excluded3);
299
349
  var optionArray = visibleOptions || options;
300
350
  this.calculateAriaSetAttrs(optionArray);
301
351
  var heightIsFull = forcedHeight === 'full';
302
- var calculatedHeight = heightIsFull ? false : forcedHeight;
303
-
304
- // If calculatedHeight is still undefined, then calculate it
305
- if (calculatedHeight === undefined) {
306
- var maxVisibleOptions = 7;
307
- var numVisibleOptions = optionArray.length;
308
- var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
309
- if (numVisibleMoreThanMax) {
310
- // Show only half of the last one to indicate there's more to scroll to
311
- calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
312
- } else {
313
- calculatedHeight = numVisibleOptions * rowHeight;
314
- }
315
- }
316
352
  var classes = (0, _classnames.default)('euiSelectableList', {
317
353
  'euiSelectableList-fullHeight': heightIsFull,
318
354
  'euiSelectableList-bordered': bordered
319
355
  }, className);
320
356
  return (0, _react2.jsx)("div", _extends({
321
357
  className: classes
322
- }, rest), isVirtualized ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
323
- disableHeight: !heightIsFull
324
- }, function (_ref3) {
325
- var width = _ref3.width,
326
- height = _ref3.height;
327
- return (0, _react2.jsx)(_reactWindow.FixedSizeList, _extends({
328
- ref: _this2.setListRef,
329
- outerRef: _this2.removeScrollableTabStop,
330
- className: "euiSelectableList__list",
331
- "data-skip-axe": "scrollable-region-focusable",
332
- width: width,
333
- height: calculatedHeight || height,
334
- itemCount: optionArray.length,
335
- itemData: optionArray,
336
- itemSize: rowHeight,
337
- innerElementType: "ul",
338
- innerRef: _this2.setListBoxRef
339
- }, windowProps), _this2.ListRow);
340
- }) : (0, _react2.jsx)("div", {
358
+ }, rest), isVirtualized ? this.renderVirtualizedList(heightIsFull, optionArray) : (0, _react2.jsx)("div", {
341
359
  className: "euiSelectableList__list",
342
360
  ref: this.removeScrollableTabStop
343
361
  }, (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) {
@@ -71,7 +71,7 @@ EuiIconTip.propTypes = {
71
71
  /**
72
72
  * Common display alternatives for the anchor wrapper
73
73
  */
74
- display: _propTypes.default.oneOf(["inlineBlock", "block"]),
74
+ display: _propTypes.default.any,
75
75
  /**
76
76
  * An optional title for your tooltip.
77
77
  */
@@ -7,7 +7,6 @@ exports.POSITIONS = exports.EuiToolTip = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _common = require("../common");
11
10
  var _services = require("../../services");
12
11
  var _react2 = require("../../services/react");
13
12
  var _resize_observer = require("../observer/resize_observer");
@@ -44,22 +43,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
44
43
  * in compliance with, at your election, the Elastic License 2.0 or the Server
45
44
  * Side Public License, v 1.
46
45
  */
47
- var positionsToClassNameMap = {
48
- top: 'euiToolTip--top',
49
- right: 'euiToolTip--right',
50
- bottom: 'euiToolTip--bottom',
51
- left: 'euiToolTip--left'
52
- };
53
- var POSITIONS = (0, _common.keysOf)(positionsToClassNameMap);
46
+ var POSITIONS = ['top', 'right', 'bottom', 'left'];
54
47
  exports.POSITIONS = POSITIONS;
48
+ var DISPLAYS = ['inlineBlock', 'block'];
55
49
  var delayToMsMap = {
56
50
  regular: 250,
57
51
  long: 250 * 5
58
52
  };
59
- var displayToClassNameMap = {
60
- inlineBlock: undefined,
61
- block: 'euiToolTipAnchor--displayBlock'
62
- };
63
53
  var DEFAULT_TOOLTIP_STYLES = {
64
54
  // position the tooltip content near the top-left
65
55
  // corner of the window so it can't create scrollbars
@@ -270,7 +260,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
270
260
  onFocus: this.onFocus,
271
261
  onMouseOver: this.showToolTip,
272
262
  onMouseOut: this.onMouseOut,
273
- id: this.state.id,
263
+ id: id,
274
264
  className: anchorClasses,
275
265
  display: display,
276
266
  isVisible: visible
@@ -333,7 +323,7 @@ EuiToolTip.propTypes = {
333
323
  /**
334
324
  * Common display alternatives for the anchor wrapper
335
325
  */
336
- display: _propTypes.default.oneOf(["inlineBlock", "block"]),
326
+ display: _propTypes.default.any,
337
327
  /**
338
328
  * Delay before showing tooltip. Good for repeatable items.
339
329
  */
@@ -22,11 +22,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
22
  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); }
23
23
  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; }
24
24
  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); }
25
- 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; }
26
- 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; }
27
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
29
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
30
25
  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; }
31
26
  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; }
32
27
  var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
@@ -52,7 +47,7 @@ var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
52
47
  className: classes,
53
48
  onMouseOver: onMouseOver,
54
49
  onMouseOut: onMouseOut
55
- }), /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
50
+ }), /*#__PURE__*/(0, _react.cloneElement)(children, {
56
51
  onFocus: function onFocus(e) {
57
52
  _onFocus();
58
53
  children.props.onFocus && children.props.onFocus(e);
@@ -60,18 +55,15 @@ var EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
60
55
  onBlur: function onBlur(e) {
61
56
  _onBlur();
62
57
  children.props.onBlur && children.props.onBlur(e);
63
- }
64
- }, isVisible && {
65
- 'aria-describedby': id
66
- })))
58
+ },
59
+ 'aria-describedby': isVisible ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
60
+ }))
67
61
  );
68
62
  });
69
63
  exports.EuiToolTipAnchor = EuiToolTipAnchor;
70
64
  EuiToolTipAnchor.propTypes = {
71
65
  onBlur: _propTypes.default.func.isRequired,
72
66
  onFocus: _propTypes.default.func.isRequired,
73
- children: _propTypes.default.element.isRequired,
74
- isVisible: _propTypes.default.bool.isRequired,
75
- display: _propTypes.default.oneOf(["block", "inlineBlock"]).isRequired
67
+ isVisible: _propTypes.default.bool.isRequired
76
68
  };
77
69
  EuiToolTipAnchor.displayName = 'EuiToolTipAnchor';
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.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) {
@@ -20,6 +20,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
20
20
 
21
21
  import React, { Component } from 'react';
22
22
  import classNames from 'classnames';
23
+ import { tabbable } from 'tabbable';
23
24
  import { EuiLoadingSpinner } from '../loading';
24
25
  import { EuiResizeObserver } from '../observer/resize_observer';
25
26
  import { EuiText } from '../text';
@@ -42,33 +43,68 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
42
43
  _this = _super.call.apply(_super, [this].concat(args));
43
44
  _defineProperty(_assertThisInitialized(_this), "childContent", null);
44
45
  _defineProperty(_assertThisInitialized(_this), "childWrapper", null);
46
+ _defineProperty(_assertThisInitialized(_this), "tabbableChildren", null);
45
47
  _defineProperty(_assertThisInitialized(_this), "state", {
46
48
  isOpen: _this.props.forceState ? _this.props.forceState === 'open' : _this.props.initialIsOpen
47
49
  });
48
50
  _defineProperty(_assertThisInitialized(_this), "setChildContentHeight", function () {
49
- var forceState = _this.props.forceState;
50
51
  requestAnimationFrame(function () {
51
- var height = _this.childContent && (forceState ? forceState === 'open' : _this.state.isOpen) ? _this.childContent.clientHeight : 0;
52
+ var height = _this.childContent && _this.isOpen ? _this.childContent.clientHeight : 0;
52
53
  _this.childWrapper && _this.childWrapper.setAttribute('style', logicalCSS('height', "".concat(height, "px")));
53
54
  });
54
55
  });
55
56
  _defineProperty(_assertThisInitialized(_this), "onToggle", function () {
56
57
  var forceState = _this.props.forceState;
57
58
  if (forceState) {
58
- _this.props.onToggle && _this.props.onToggle(forceState === 'open' ? false : true);
59
+ var _this$props$onToggle, _this$props;
60
+ (_this$props$onToggle = (_this$props = _this.props).onToggle) === null || _this$props$onToggle === void 0 ? void 0 : _this$props$onToggle.call(_this$props, forceState === 'open' ? false : true);
59
61
  } else {
60
62
  _this.setState(function (prevState) {
61
63
  return {
62
64
  isOpen: !prevState.isOpen
63
65
  };
64
66
  }, function () {
67
+ var _this$props$onToggle2, _this$props2;
65
68
  if (_this.state.isOpen && _this.childWrapper) {
66
69
  _this.childWrapper.focus();
67
70
  }
68
- _this.props.onToggle && _this.props.onToggle(_this.state.isOpen);
71
+ (_this$props$onToggle2 = (_this$props2 = _this.props).onToggle) === null || _this$props$onToggle2 === void 0 ? void 0 : _this$props$onToggle2.call(_this$props2, _this.state.isOpen);
69
72
  });
70
73
  }
71
74
  });
75
+ // When accordions are closed, tabbable children should not be present in the tab order
76
+ _defineProperty(_assertThisInitialized(_this), "preventTabbing", function () {
77
+ if (_this.childContent) {
78
+ // Re-check for children on every close - content can change dynamically
79
+ _this.tabbableChildren = tabbable(_this.childContent);
80
+ _this.tabbableChildren.forEach(function (element) {
81
+ // If the element has an existing `tabIndex` set, make sure we can restore it
82
+ var originalTabIndex = element.getAttribute('tabIndex');
83
+ if (originalTabIndex) {
84
+ element.setAttribute('data-original-tabindex', originalTabIndex);
85
+ }
86
+ element.setAttribute('tabIndex', '-1');
87
+ });
88
+ }
89
+ });
90
+ _defineProperty(_assertThisInitialized(_this), "enableTabbing", function () {
91
+ // If no tabbable children were set, we don't need to re-enable anything
92
+ if (_this.tabbableChildren) {
93
+ _this.tabbableChildren.forEach(function (element) {
94
+ var originalTabIndex = element.getAttribute('data-original-tabindex');
95
+ if (originalTabIndex) {
96
+ // If the element originally had an existing `tabIndex` set, restore it
97
+ element.setAttribute('tabIndex', originalTabIndex);
98
+ element.removeAttribute('data-original-tabindex');
99
+ } else {
100
+ // If not, remove the tabIndex property
101
+ element.removeAttribute('tabIndex');
102
+ }
103
+ });
104
+ // Cleanup - unset the list of children
105
+ _this.tabbableChildren = null;
106
+ }
107
+ });
72
108
  _defineProperty(_assertThisInitialized(_this), "setChildContentRef", function (node) {
73
109
  _this.childContent = node;
74
110
  });
@@ -83,44 +119,55 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
83
119
  return _this;
84
120
  }
85
121
  _createClass(EuiAccordionClass, [{
122
+ key: "isOpen",
123
+ get: function get() {
124
+ return this.props.forceState ? this.props.forceState === 'open' : this.state.isOpen;
125
+ }
126
+ }, {
86
127
  key: "componentDidMount",
87
128
  value: function componentDidMount() {
88
129
  this.setChildContentHeight();
130
+ if (!this.isOpen) this.preventTabbing();
89
131
  }
90
132
  }, {
91
133
  key: "componentDidUpdate",
92
- value: function componentDidUpdate() {
134
+ value: function componentDidUpdate(prevProps, prevState) {
93
135
  this.setChildContentHeight();
136
+ if (prevProps.forceState === 'open' && this.props.forceState === 'closed' || prevState.isOpen === true && this.state.isOpen === false) {
137
+ this.preventTabbing();
138
+ }
139
+ if (prevProps.forceState === 'closed' && this.props.forceState === 'open' || prevState.isOpen === false && this.state.isOpen === true) {
140
+ this.enableTabbing();
141
+ }
94
142
  }
95
143
  }, {
96
144
  key: "render",
97
145
  value: function render() {
98
146
  var _buttonProps$id,
99
147
  _this2 = this;
100
- var _this$props = this.props,
101
- children = _this$props.children,
102
- buttonContent = _this$props.buttonContent,
103
- className = _this$props.className,
104
- id = _this$props.id,
105
- _this$props$element = _this$props.element,
106
- Element = _this$props$element === void 0 ? 'div' : _this$props$element,
107
- buttonClassName = _this$props.buttonClassName,
108
- buttonContentClassName = _this$props.buttonContentClassName,
109
- extraAction = _this$props.extraAction,
110
- paddingSize = _this$props.paddingSize,
111
- initialIsOpen = _this$props.initialIsOpen,
112
- arrowDisplay = _this$props.arrowDisplay,
113
- forceState = _this$props.forceState,
114
- isLoading = _this$props.isLoading,
115
- isLoadingMessage = _this$props.isLoadingMessage,
116
- isDisabled = _this$props.isDisabled,
117
- buttonProps = _this$props.buttonProps,
118
- _this$props$buttonEle = _this$props.buttonElement,
119
- _ButtonElement = _this$props$buttonEle === void 0 ? 'button' : _this$props$buttonEle,
120
- arrowProps = _this$props.arrowProps,
121
- theme = _this$props.theme,
122
- rest = _objectWithoutProperties(_this$props, _excluded);
123
- var isOpen = forceState ? forceState === 'open' : this.state.isOpen;
148
+ var _this$props3 = this.props,
149
+ children = _this$props3.children,
150
+ buttonContent = _this$props3.buttonContent,
151
+ className = _this$props3.className,
152
+ id = _this$props3.id,
153
+ _this$props3$element = _this$props3.element,
154
+ Element = _this$props3$element === void 0 ? 'div' : _this$props3$element,
155
+ buttonClassName = _this$props3.buttonClassName,
156
+ buttonContentClassName = _this$props3.buttonContentClassName,
157
+ extraAction = _this$props3.extraAction,
158
+ paddingSize = _this$props3.paddingSize,
159
+ initialIsOpen = _this$props3.initialIsOpen,
160
+ arrowDisplay = _this$props3.arrowDisplay,
161
+ forceState = _this$props3.forceState,
162
+ isLoading = _this$props3.isLoading,
163
+ isLoadingMessage = _this$props3.isLoadingMessage,
164
+ isDisabled = _this$props3.isDisabled,
165
+ buttonProps = _this$props3.buttonProps,
166
+ _this$props3$buttonEl = _this$props3.buttonElement,
167
+ _ButtonElement = _this$props3$buttonEl === void 0 ? 'button' : _this$props3$buttonEl,
168
+ arrowProps = _this$props3.arrowProps,
169
+ theme = _this$props3.theme,
170
+ rest = _objectWithoutProperties(_this$props3, _excluded);
124
171
 
125
172
  // Force button element to be a legend if the element is a fieldset
126
173
  var ButtonElement = Element === 'fieldset' ? 'legend' : _ButtonElement;
@@ -129,7 +176,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
129
176
  // Force visibility of arrow button if button element is not focusable
130
177
  var _arrowDisplay = arrowDisplay === 'none' && !buttonElementIsFocusable ? 'left' : arrowDisplay;
131
178
  var classes = classNames('euiAccordion', {
132
- 'euiAccordion-isOpen': isOpen
179
+ 'euiAccordion-isOpen': this.isOpen
133
180
  }, className);
134
181
  var childrenClasses = classNames('euiAccordion__children', {
135
182
  'euiAccordion__children-isLoading': isLoading
@@ -137,7 +184,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
137
184
  var buttonClasses = classNames('euiAccordion__button', buttonClassName, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className);
138
185
  var buttonContentClasses = classNames('euiAccordion__buttonContent', buttonContentClassName);
139
186
  var iconButtonClasses = classNames('euiAccordion__iconButton', {
140
- 'euiAccordion__iconButton-isOpen': isOpen,
187
+ 'euiAccordion__iconButton-isOpen': this.isOpen,
141
188
  'euiAccordion__iconButton--right': _arrowDisplay === 'right'
142
189
  }, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.className);
143
190
 
@@ -147,9 +194,9 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
147
194
  var childrenStyles = euiAccordionChildrenStyles(theme);
148
195
  var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
149
196
  var childWrapperStyles = euiAccordionChildWrapperStyles(theme);
150
- var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, isOpen && childWrapperStyles.isOpen];
197
+ var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, this.isOpen && childWrapperStyles.isOpen];
151
198
  var iconButtonStyles = euiAccordionIconButtonStyles(theme);
152
- var cssIconButtonStyles = [iconButtonStyles.euiAccordion__iconButton, isOpen && iconButtonStyles.isOpen, _arrowDisplay === 'right' && iconButtonStyles.arrowRight, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.css];
199
+ var cssIconButtonStyles = [iconButtonStyles.euiAccordion__iconButton, this.isOpen && iconButtonStyles.isOpen, _arrowDisplay === 'right' && iconButtonStyles.arrowRight, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.css];
153
200
  var optionalActionStyles = euiAccordionOptionalActionStyles();
154
201
  var cssOptionalActionStyles = [optionalActionStyles.euiAccordion__optionalAction];
155
202
  var spinnerStyles = euiAccordionSpinnerStyles(theme);
@@ -167,7 +214,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
167
214
  iconType: "arrowRight",
168
215
  onClick: this.onToggle,
169
216
  "aria-controls": id,
170
- "aria-expanded": isOpen,
217
+ "aria-expanded": this.isOpen,
171
218
  "aria-labelledby": buttonId,
172
219
  tabIndex: buttonElementIsFocusable ? -1 : 0,
173
220
  isDisabled: isDisabled
@@ -201,7 +248,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
201
248
  "aria-controls": id
202
249
  // `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
203
250
  ,
204
- "aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
251
+ "aria-expanded": ButtonElement === 'button' ? this.isOpen : undefined,
205
252
  onClick: isDisabled ? undefined : this.onToggle,
206
253
  type: ButtonElement === 'button' ? 'button' : undefined,
207
254
  disabled: ButtonElement === 'button' ? isDisabled : undefined
@@ -6,4 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- export { EuiAutoSizer } from './auto_sizer';
9
+ export * from './auto_sizer';