@elastic/eui 94.3.0 → 94.4.1

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 (145) hide show
  1. package/README.md +3 -0
  2. package/dist/eui_charts_theme.js +1519 -1519
  3. package/dist/eui_charts_theme.js.map +1 -1
  4. package/dist/eui_theme_dark.css +41 -497
  5. package/dist/eui_theme_dark.min.css +1 -1
  6. package/dist/eui_theme_light.css +41 -497
  7. package/dist/eui_theme_light.min.css +1 -1
  8. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +5 -1
  9. package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +25 -11
  10. package/es/components/form/form.styles.js +26 -3
  11. package/es/components/markdown_editor/markdown_editor.js +12 -8
  12. package/es/components/markdown_editor/markdown_editor.styles.js +29 -0
  13. package/es/components/markdown_editor/markdown_editor_drop_zone.js +22 -9
  14. package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +33 -0
  15. package/es/components/markdown_editor/markdown_editor_footer.js +11 -2
  16. package/es/components/markdown_editor/markdown_editor_footer.styles.js +26 -0
  17. package/es/components/markdown_editor/markdown_editor_text_area.js +6 -1
  18. package/es/components/markdown_editor/markdown_editor_text_area.styles.js +22 -0
  19. package/es/components/markdown_editor/markdown_editor_toolbar.js +10 -2
  20. package/es/components/markdown_editor/markdown_editor_toolbar.styles.js +21 -0
  21. package/es/components/markdown_editor/markdown_format.js +9 -6
  22. package/es/components/markdown_editor/markdown_format.styles.js +25 -10
  23. package/es/components/markdown_editor/plugins/markdown_checkbox/renderer.js +9 -3
  24. package/es/components/markdown_editor/plugins/markdown_tooltip/renderer.js +13 -2
  25. package/es/components/selectable/selectable.js +10 -2
  26. package/es/components/selectable/selectable_list/selectable_list.js +95 -42
  27. package/es/components/selectable/selectable_list/selectable_list_item.js +234 -204
  28. package/es/components/selectable/selectable_option.js +9 -1
  29. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +10 -2
  30. package/es/components/text/text_color.js +4 -1
  31. package/es/components/toast/global_toast_list_item.js +5 -5
  32. package/eui.d.ts +332 -234
  33. package/i18ntokens.json +124 -106
  34. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +5 -1
  35. package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +25 -11
  36. package/lib/components/form/form.styles.js +30 -4
  37. package/lib/components/markdown_editor/markdown_editor.js +12 -8
  38. package/lib/components/markdown_editor/markdown_editor.styles.js +37 -0
  39. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +20 -8
  40. package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +38 -0
  41. package/lib/components/markdown_editor/markdown_editor_footer.js +10 -1
  42. package/lib/components/markdown_editor/markdown_editor_footer.styles.js +33 -0
  43. package/lib/components/markdown_editor/markdown_editor_text_area.js +6 -1
  44. package/lib/components/markdown_editor/markdown_editor_text_area.styles.js +29 -0
  45. package/lib/components/markdown_editor/markdown_editor_toolbar.js +10 -2
  46. package/lib/components/markdown_editor/markdown_editor_toolbar.styles.js +28 -0
  47. package/lib/components/markdown_editor/markdown_format.js +8 -5
  48. package/lib/components/markdown_editor/markdown_format.styles.js +25 -10
  49. package/lib/components/markdown_editor/plugins/markdown_checkbox/renderer.js +9 -4
  50. package/lib/components/markdown_editor/plugins/markdown_tooltip/renderer.js +19 -10
  51. package/lib/components/selectable/selectable.js +10 -2
  52. package/lib/components/selectable/selectable_list/selectable_list.js +95 -42
  53. package/lib/components/selectable/selectable_list/selectable_list_item.js +241 -210
  54. package/lib/components/selectable/selectable_option.js +12 -1
  55. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +10 -2
  56. package/lib/components/text/text_color.js +6 -2
  57. package/lib/components/toast/global_toast_list_item.js +5 -5
  58. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +5 -1
  59. package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +25 -11
  60. package/optimize/es/components/form/form.styles.js +26 -3
  61. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -8
  62. package/optimize/es/components/markdown_editor/markdown_editor.styles.js +29 -0
  63. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.js +19 -9
  64. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +33 -0
  65. package/optimize/es/components/markdown_editor/markdown_editor_footer.js +11 -2
  66. package/optimize/es/components/markdown_editor/markdown_editor_footer.styles.js +26 -0
  67. package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +6 -1
  68. package/optimize/es/components/markdown_editor/markdown_editor_text_area.styles.js +22 -0
  69. package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +10 -2
  70. package/optimize/es/components/markdown_editor/markdown_editor_toolbar.styles.js +21 -0
  71. package/optimize/es/components/markdown_editor/markdown_format.js +9 -6
  72. package/optimize/es/components/markdown_editor/markdown_format.styles.js +25 -10
  73. package/optimize/es/components/markdown_editor/plugins/markdown_checkbox/renderer.js +9 -3
  74. package/optimize/es/components/markdown_editor/plugins/markdown_tooltip/renderer.js +13 -2
  75. package/optimize/es/components/selectable/selectable_list/selectable_list.js +81 -38
  76. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +217 -198
  77. package/optimize/es/components/selectable/selectable_option.js +9 -1
  78. package/optimize/es/components/text/text_color.js +4 -1
  79. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +5 -1
  80. package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +25 -11
  81. package/optimize/lib/components/form/form.styles.js +30 -4
  82. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -8
  83. package/optimize/lib/components/markdown_editor/markdown_editor.styles.js +37 -0
  84. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.js +24 -16
  85. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +38 -0
  86. package/optimize/lib/components/markdown_editor/markdown_editor_footer.js +10 -1
  87. package/optimize/lib/components/markdown_editor/markdown_editor_footer.styles.js +33 -0
  88. package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +6 -1
  89. package/optimize/lib/components/markdown_editor/markdown_editor_text_area.styles.js +29 -0
  90. package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +10 -2
  91. package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.styles.js +28 -0
  92. package/optimize/lib/components/markdown_editor/markdown_format.js +8 -5
  93. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +25 -10
  94. package/optimize/lib/components/markdown_editor/plugins/markdown_checkbox/renderer.js +9 -4
  95. package/optimize/lib/components/markdown_editor/plugins/markdown_tooltip/renderer.js +19 -10
  96. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +81 -38
  97. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +224 -204
  98. package/optimize/lib/components/selectable/selectable_option.js +12 -1
  99. package/optimize/lib/components/text/text_color.js +6 -2
  100. package/package.json +5 -12
  101. package/src/components/date_picker/react-datepicker/LICENSE +21 -0
  102. package/src/components/date_picker/react-datepicker/README.md +168 -0
  103. package/src/components/date_picker/super_date_picker/date_popover/_absolute_tab.scss +13 -18
  104. package/src/components/form/checkbox/_checkbox.scss +23 -6
  105. package/src/components/index.scss +0 -1
  106. package/src/components/selectable/selectable_list/_selectable_list_item.scss +4 -0
  107. package/src/components/selectable/selectable_templates/_selectable_template_sitewide_option.scss +5 -1
  108. package/src/services/theme/README.md +153 -0
  109. package/src/test/README.md +44 -0
  110. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  111. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +5 -1
  112. package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +25 -11
  113. package/test-env/components/form/form.styles.js +30 -4
  114. package/test-env/components/markdown_editor/markdown_editor.js +12 -8
  115. package/test-env/components/markdown_editor/markdown_editor.styles.js +37 -0
  116. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +24 -16
  117. package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +38 -0
  118. package/test-env/components/markdown_editor/markdown_editor_footer.js +10 -1
  119. package/test-env/components/markdown_editor/markdown_editor_footer.styles.js +33 -0
  120. package/test-env/components/markdown_editor/markdown_editor_text_area.js +6 -1
  121. package/test-env/components/markdown_editor/markdown_editor_text_area.styles.js +29 -0
  122. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +10 -2
  123. package/test-env/components/markdown_editor/markdown_editor_toolbar.styles.js +28 -0
  124. package/test-env/components/markdown_editor/markdown_format.js +8 -5
  125. package/test-env/components/markdown_editor/markdown_format.styles.js +25 -10
  126. package/test-env/components/markdown_editor/plugins/markdown_checkbox/renderer.js +9 -4
  127. package/test-env/components/markdown_editor/plugins/markdown_tooltip/renderer.js +19 -10
  128. package/test-env/components/selectable/selectable.js +10 -2
  129. package/test-env/components/selectable/selectable_list/selectable_list.js +95 -42
  130. package/test-env/components/selectable/selectable_list/selectable_list_item.js +233 -205
  131. package/test-env/components/selectable/selectable_option.js +12 -1
  132. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +10 -2
  133. package/test-env/components/text/text_color.js +6 -2
  134. package/test-env/components/toast/global_toast_list_item.js +5 -5
  135. package/src/components/markdown_editor/_index.scss +0 -9
  136. package/src/components/markdown_editor/_markdown_editor.scss +0 -22
  137. package/src/components/markdown_editor/_markdown_editor_drop_zone.scss +0 -58
  138. package/src/components/markdown_editor/_markdown_editor_footer.scss +0 -42
  139. package/src/components/markdown_editor/_markdown_editor_preview.scss +0 -20
  140. package/src/components/markdown_editor/_markdown_editor_text_area.scss +0 -43
  141. package/src/components/markdown_editor/_markdown_editor_toolbar.scss +0 -29
  142. package/src/components/markdown_editor/_markdown_format.scss +0 -78
  143. package/src/components/markdown_editor/_variables.scss +0 -1
  144. package/src/components/markdown_editor/plugins/markdown_tooltip.scss +0 -4
  145. package/src/themes/amsterdam/overrides/_markdown_editor.scss +0 -18
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import { css } from '@emotion/react';
10
+ import { transparentize } from '../../services';
10
11
  import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
11
12
 
12
13
  /**
@@ -15,10 +16,7 @@ import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
15
16
  // Internal utility for text scales/sizes
16
17
  var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, options) {
17
18
  var _euiFontSize = euiFontSize(euiTheme, 'm', options),
18
- fontSize = _euiFontSize.fontSize,
19
- lineHeight = _euiFontSize.lineHeight;
20
- var unit = options.unit;
21
- var lineHeightSize = unit === 'em' ? "".concat(lineHeight, "em") : lineHeight;
19
+ fontSize = _euiFontSize.fontSize;
22
20
 
23
21
  // Custom scales
24
22
  var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
@@ -27,7 +25,14 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
27
25
  var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
28
26
  return x / 2;
29
27
  });
30
- return "\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ".concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
28
+ return "\n .euiMarkdownFormat__codeblockWrapper {\n ".concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
29
+ };
30
+
31
+ // Internal utility for generating border colors based on EuiText colors
32
+ var euiMarkdownAdjustBorderColors = function euiMarkdownAdjustBorderColors(_ref, color) {
33
+ var euiTheme = _ref.euiTheme;
34
+ var border = "".concat(euiTheme.border.width.thin, " solid ").concat(color);
35
+ return "\n .euiMarkdownFormat__blockquote {\n ".concat(logicalCSS('border-left-color', color), "\n }\n\n .euiHorizontalRule {\n background-color: ").concat(color, ";\n color: ").concat(color, "; /* ensure that firefox gets the currentColor */\n }\n\n /* Tables */\n\n .euiMarkdownFormat__table {\n display: block;\n ").concat(logicalCSS('width', '100%'), "\n overflow: auto;\n border-spacing: 0;\n border-collapse: collapse;\n ").concat(logicalCSS('border-left', border), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('border-vertical', border), "\n\n &:last-child {\n ").concat(logicalCSS('border-right', border), "\n }\n }\n\n .euiMarkdownFormat__table tr {\n ").concat(logicalCSS('border-top', border), "\n }\n ");
31
36
  };
32
37
 
33
38
  /**
@@ -35,20 +40,30 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
35
40
  */
36
41
  export var euiMarkdownFormatStyles = function euiMarkdownFormatStyles(euiTheme) {
37
42
  return {
38
- // TODO: Remaining _markdown_format.scss styles
39
43
  euiMarkdownFormat: /*#__PURE__*/css(";label:euiMarkdownFormat;"),
40
44
  // Text sizes
41
45
  m: /*#__PURE__*/css(euiScaleMarkdownFormatText(euiTheme, {
42
46
  customScale: 'm'
43
- }), ";;label:m;"),
47
+ }), ";label:m;"),
44
48
  s: /*#__PURE__*/css(euiScaleMarkdownFormatText(euiTheme, {
45
49
  customScale: 's'
46
- }), ";;label:s;"),
50
+ }), ";label:s;"),
47
51
  xs: /*#__PURE__*/css(euiScaleMarkdownFormatText(euiTheme, {
48
52
  customScale: 'xs'
49
- }), ";;label:xs;"),
53
+ }), ";label:xs;"),
50
54
  relative: /*#__PURE__*/css(euiScaleMarkdownFormatText(euiTheme, {
51
55
  unit: 'em'
52
- }), ";;label:relative;")
56
+ }), ";label:relative;"),
57
+ colors: {
58
+ default: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, transparentize(euiTheme.euiTheme.colors.fullShade, 0.15)), ";label:default;"),
59
+ subdued: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.subduedText), ";label:subdued;"),
60
+ success: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.success), ";label:success;"),
61
+ accent: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.accent), ";label:accent;"),
62
+ warning: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.warning), ";label:warning;"),
63
+ danger: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.danger), ";label:danger;"),
64
+ ghost: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, euiTheme.euiTheme.colors.ghost), ";label:ghost;"),
65
+ inherit: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, 'currentColor'), ";label:inherit;"),
66
+ custom: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiTheme, 'currentColor'), ";label:custom;")
67
+ }
53
68
  };
54
69
  };
@@ -7,6 +7,8 @@
7
7
  */
8
8
 
9
9
  import React, { useContext } from 'react';
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS } from '../../../../global_styling';
10
12
  import { EuiCheckbox } from '../../../form/checkbox';
11
13
  import { EuiMarkdownContext } from '../../markdown_context';
12
14
  import { useGeneratedHtmlId } from '../../../../services/accessibility';
@@ -18,13 +20,17 @@ export var CheckboxMarkdownRenderer = function CheckboxMarkdownRenderer(_ref) {
18
20
  isChecked = _ref.isChecked,
19
21
  children = _ref.children;
20
22
  var _useContext = useContext(EuiMarkdownContext),
21
- replaceNode = _useContext.replaceNode;
23
+ replaceNode = _useContext.replaceNode,
24
+ readOnly = _useContext.readOnly;
22
25
  return ___EmotionJSX(EuiCheckbox, {
23
26
  id: useGeneratedHtmlId(),
24
27
  checked: isChecked,
25
28
  label: children,
26
29
  onChange: function onChange() {
27
30
  replaceNode(position, "".concat(lead, "[").concat(isChecked ? ' ' : 'x', "]").concat(label));
28
- }
31
+ },
32
+ css: markdownCheckboxStyles,
33
+ readOnly: readOnly
29
34
  });
30
- };
35
+ };
36
+ var markdownCheckboxStyles = /*#__PURE__*/css("&&{.euiCheckbox__input~.euiCheckbox__label{font-size:inherit;line-height:inherit;", logicalCSS('padding-left', '1.5em'), ";}&:has(+ :not(.euiCheckbox)){", logicalCSS('margin-bottom', '1em'), ";}.euiCheckbox__input+.euiCheckbox__square{", logicalCSS('top', '50%'), " transform:translateY(-50%);}};label:markdownCheckboxStyles;");
@@ -1,3 +1,4 @@
1
+ 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)."; }
1
2
  /*
2
3
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
4
  * or more contributor license agreements. Licensed under the Elastic License
@@ -10,13 +11,23 @@ import React from 'react';
10
11
  import { EuiToolTip } from '../../../tool_tip';
11
12
  import { EuiIcon } from '../../../icon';
12
13
  import { jsx as ___EmotionJSX } from "@emotion/react";
14
+ var _ref2 = process.env.NODE_ENV === "production" ? {
15
+ name: "blrk0m-tooltipMarkdownRenderer",
16
+ styles: "transform:translateY(-1px);label:tooltipMarkdownRenderer;"
17
+ } : {
18
+ name: "blrk0m-tooltipMarkdownRenderer",
19
+ styles: "transform:translateY(-1px);label:tooltipMarkdownRenderer;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
13
22
  export var tooltipMarkdownRenderer = function tooltipMarkdownRenderer(_ref) {
14
23
  var content = _ref.content,
15
24
  children = _ref.children;
16
25
  return ___EmotionJSX("span", null, ___EmotionJSX(EuiToolTip, {
17
26
  content: content
18
27
  }, ___EmotionJSX("span", null, ___EmotionJSX("strong", null, children), ___EmotionJSX(EuiIcon, {
19
- type: "questionInCircle",
20
- className: "euiMarkdownTooltip__icon"
28
+ type: "questionInCircle"
29
+ // This is to offset the tooltip icon, which isn't perfectly centered
30
+ ,
31
+ css: _ref2
21
32
  }))));
22
33
  };
@@ -41,6 +41,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
41
41
  var _this;
42
42
  _classCallCheck(this, EuiSelectableList);
43
43
  _this = _super.call(this, props);
44
+ _defineProperty(_assertThisInitialized(_this), "animationFrameId", void 0);
45
+ // counter for tracking list renders and ensuring rerenders
46
+ _defineProperty(_assertThisInitialized(_this), "listRowRerender", 0);
44
47
  _defineProperty(_assertThisInitialized(_this), "listRef", null);
45
48
  _defineProperty(_assertThisInitialized(_this), "listBoxRef", null);
46
49
  _defineProperty(_assertThisInitialized(_this), "setListRef", function (ref) {
@@ -165,7 +168,6 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
165
168
  event.persist(); // NOTE: This is needed for React v16 backwards compatibility
166
169
  _this.onAddOrRemoveOption(option, event);
167
170
  },
168
- ref: ref ? ref.bind(null, index) : undefined,
169
171
  isFocused: isFocused,
170
172
  title: searchableLabel || label,
171
173
  checked: checked,
@@ -266,7 +268,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
266
268
  _this.focusBadgeOffset = _this.props.onFocusBadge === false ? 0 : 46;
267
269
 
268
270
  // Wait a tick for the listbox ref to update before proceeding
269
- requestAnimationFrame(function () {
271
+ _this.animationFrameId = requestAnimationFrame(function () {
270
272
  var scrollbarOffset = _this.listBoxRef ? containerWidth - _this.listBoxRef.offsetWidth : 0;
271
273
  _this.setState({
272
274
  defaultOptionWidth: containerWidth - scrollbarOffset - paddingOffset - checkedIconOffset
@@ -418,13 +420,47 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
418
420
  return _this;
419
421
  }
420
422
  _createClass(EuiSelectableList, [{
423
+ key: "componentWillUnmount",
424
+ value: function componentWillUnmount() {
425
+ // ensure requestAnimationFrame is canceled on unmount as
426
+ // it could potentially run on a next tick otherwise
427
+ if (this.animationFrameId !== undefined) {
428
+ cancelAnimationFrame(this.animationFrameId);
429
+ this.animationFrameId = undefined;
430
+ }
431
+ }
432
+ }, {
433
+ key: "shouldComponentUpdate",
434
+ value: function shouldComponentUpdate(nextProps) {
435
+ var _this$props9 = this.props,
436
+ allowExclusions = _this$props9.allowExclusions,
437
+ showIcons = _this$props9.showIcons,
438
+ paddingSize = _this$props9.paddingSize,
439
+ textWrap = _this$props9.textWrap,
440
+ onFocusBadge = _this$props9.onFocusBadge,
441
+ searchable = _this$props9.searchable;
442
+
443
+ // using shouldComponentUpdate to determine needed rerender before actual rerender
444
+ // without needing state updates or lagging behind on updates
445
+ if (nextProps.allowExclusions !== allowExclusions || nextProps.showIcons !== showIcons || nextProps.paddingSize !== paddingSize || nextProps.textWrap !== textWrap || nextProps.onFocusBadge !== onFocusBadge || nextProps.searchable !== searchable) {
446
+ this.listRowRerender += 1;
447
+ }
448
+ return true;
449
+ }
450
+ }, {
421
451
  key: "componentDidUpdate",
422
452
  value: function componentDidUpdate(prevProps) {
423
- var _this$props9 = this.props,
424
- isVirtualized = _this$props9.isVirtualized,
425
- activeOptionIndex = _this$props9.activeOptionIndex,
426
- visibleOptions = _this$props9.visibleOptions,
427
- options = _this$props9.options;
453
+ var _this$props10 = this.props,
454
+ isVirtualized = _this$props10.isVirtualized,
455
+ activeOptionIndex = _this$props10.activeOptionIndex,
456
+ visibleOptions = _this$props10.visibleOptions,
457
+ options = _this$props10.options,
458
+ allowExclusions = _this$props10.allowExclusions,
459
+ showIcons = _this$props10.showIcons,
460
+ paddingSize = _this$props10.paddingSize,
461
+ textWrap = _this$props10.textWrap,
462
+ onFocusBadge = _this$props10.onFocusBadge,
463
+ searchable = _this$props10.searchable;
428
464
  if (prevProps.activeOptionIndex !== activeOptionIndex) {
429
465
  var makeOptionId = this.props.makeOptionId;
430
466
  if (this.listBoxRef && this.props.searchable !== true) {
@@ -456,41 +492,48 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
456
492
  itemData: _objectSpread({}, optionArray)
457
493
  }, this.calculateAriaSetAttrs(optionArray)));
458
494
  }
495
+
496
+ // ensure that ListRow updates based on item props
497
+ if (isVirtualized) {
498
+ if (prevProps.allowExclusions !== allowExclusions || prevProps.showIcons !== showIcons || prevProps.paddingSize !== paddingSize || prevProps.textWrap !== textWrap || prevProps.onFocusBadge !== onFocusBadge || prevProps.searchable !== searchable) {
499
+ this.forceVirtualizedListRowRerender();
500
+ }
501
+ }
459
502
  }
460
503
  }, {
461
504
  key: "render",
462
505
  value: function render() {
463
506
  var _this2 = this;
464
- var _this$props10 = this.props,
465
- className = _this$props10.className,
466
- options = _this$props10.options,
467
- searchValue = _this$props10.searchValue,
468
- onOptionClick = _this$props10.onOptionClick,
469
- renderOption = _this$props10.renderOption,
470
- forcedHeight = _this$props10.height,
471
- windowProps = _this$props10.windowProps,
472
- rowHeight = _this$props10.rowHeight,
473
- activeOptionIndex = _this$props10.activeOptionIndex,
474
- makeOptionId = _this$props10.makeOptionId,
475
- showIcons = _this$props10.showIcons,
476
- singleSelection = _this$props10.singleSelection,
477
- visibleOptions = _this$props10.visibleOptions,
478
- allowExclusions = _this$props10.allowExclusions,
479
- bordered = _this$props10.bordered,
480
- paddingSize = _this$props10.paddingSize,
481
- searchable = _this$props10.searchable,
482
- onFocusBadge = _this$props10.onFocusBadge,
483
- listId = _this$props10.listId,
484
- setActiveOptionIndex = _this$props10.setActiveOptionIndex,
485
- ariaLabel = _this$props10['aria-label'],
486
- ariaLabelledby = _this$props10['aria-labelledby'],
487
- ariaDescribedby = _this$props10['aria-describedby'],
488
- role = _this$props10.role,
489
- isPreFiltered = _this$props10.isPreFiltered,
490
- isVirtualized = _this$props10.isVirtualized,
491
- textWrap = _this$props10.textWrap,
492
- truncationProps = _this$props10.truncationProps,
493
- rest = _objectWithoutProperties(_this$props10, _excluded3);
507
+ var _this$props11 = this.props,
508
+ className = _this$props11.className,
509
+ options = _this$props11.options,
510
+ searchValue = _this$props11.searchValue,
511
+ onOptionClick = _this$props11.onOptionClick,
512
+ renderOption = _this$props11.renderOption,
513
+ forcedHeight = _this$props11.height,
514
+ windowProps = _this$props11.windowProps,
515
+ rowHeight = _this$props11.rowHeight,
516
+ activeOptionIndex = _this$props11.activeOptionIndex,
517
+ makeOptionId = _this$props11.makeOptionId,
518
+ showIcons = _this$props11.showIcons,
519
+ singleSelection = _this$props11.singleSelection,
520
+ visibleOptions = _this$props11.visibleOptions,
521
+ allowExclusions = _this$props11.allowExclusions,
522
+ bordered = _this$props11.bordered,
523
+ paddingSize = _this$props11.paddingSize,
524
+ searchable = _this$props11.searchable,
525
+ onFocusBadge = _this$props11.onFocusBadge,
526
+ listId = _this$props11.listId,
527
+ setActiveOptionIndex = _this$props11.setActiveOptionIndex,
528
+ ariaLabel = _this$props11['aria-label'],
529
+ ariaLabelledby = _this$props11['aria-labelledby'],
530
+ ariaDescribedby = _this$props11['aria-describedby'],
531
+ role = _this$props11.role,
532
+ isPreFiltered = _this$props11.isPreFiltered,
533
+ isVirtualized = _this$props11.isVirtualized,
534
+ textWrap = _this$props11.textWrap,
535
+ truncationProps = _this$props11.truncationProps,
536
+ rest = _objectWithoutProperties(_this$props11, _excluded3);
494
537
  var heightIsFull = forcedHeight === 'full';
495
538
  var classes = classNames('euiSelectableList', {
496
539
  'euiSelectableList-fullHeight': heightIsFull,
@@ -508,7 +551,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
508
551
  ref: this.setListBoxRef
509
552
  }, this.state.optionArray.map(function (_, index) {
510
553
  return /*#__PURE__*/React.createElement(_this2.ListRow, {
511
- key: index,
554
+ key: "".concat(index, "-").concat(_this2.listRowRerender),
512
555
  data: _this2.state.optionArray,
513
556
  index: index
514
557
  }, null);