@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
@@ -0,0 +1,66 @@
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)."; }
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+
10
+ import { css } from '@emotion/react';
11
+ import { transparentize } from '../../services';
12
+ import { logicalCSS, mathWithUnits, euiCanAnimate } from '../../global_styling';
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "1fvu7sv-end",
15
+ styles: "align-items:flex-end;label:end;"
16
+ } : {
17
+ name: "1fvu7sv-end",
18
+ styles: "align-items:flex-end;label:end;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+ var _ref2 = process.env.NODE_ENV === "production" ? {
22
+ name: "h0ntv8-start",
23
+ styles: "align-items:flex-start;label:start;"
24
+ } : {
25
+ name: "h0ntv8-start",
26
+ styles: "align-items:flex-start;label:start;",
27
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
+ };
29
+ var _ref3 = process.env.NODE_ENV === "production" ? {
30
+ name: "8391db-center",
31
+ styles: "align-items:center;label:center;"
32
+ } : {
33
+ name: "8391db-center",
34
+ styles: "align-items:center;label:center;",
35
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
+ };
37
+ export var euiResizableButtonStyles = function euiResizableButtonStyles(euiThemeContext) {
38
+ var euiTheme = euiThemeContext.euiTheme;
39
+ var buttonSize = euiTheme.size.base;
40
+ var grabHandleWidth = euiTheme.size.m;
41
+ var grabHandleHeight = euiTheme.border.width.thin;
42
+ var transitionSpeed = euiTheme.animation.fast;
43
+ var transition = "".concat(transitionSpeed, " ease");
44
+ return {
45
+ // Mimics the "grab" icon with CSS psuedo-elements.
46
+ // 1. The "grab" icon transforms into a thicker straight line on :hover and :focus
47
+ // 2. Start/end aligned handles should have a slight margin offset that disappears on hover/focus
48
+ // 3. CSS hack to smooth out/anti-alias the 1px wide handles at various zoom levels
49
+ euiResizableButton: /*#__PURE__*/css("z-index:1;flex-shrink:0;display:flex;justify-content:center;gap:", mathWithUnits(grabHandleHeight, function (x) {
50
+ return x * 2;
51
+ }), ";&:disabled{display:none;}&:hover,&:focus{gap:0;justify-content:center;}", euiCanAnimate, "{transition:gap ", transition, ",justify-content ", transition, ";}&::before,&::after{content:'';display:block;background-color:", euiTheme.colors.darkestShade, ";transform:translateZ(0);", euiCanAnimate, "{transition:width ", transition, ",height ", transition, ",margin ", transition, ",background-color ", transition, ";}}&:hover{&::before,&::after{background-color:", euiTheme.colors.mediumShade, ";", euiCanAnimate, "{transition-delay:", transitionSpeed, ";}}}&:focus,&:active{background-color:", transparentize(euiTheme.colors.primary, 0.1), ";&::before,&::after{background-color:", euiTheme.colors.primary, ";", euiCanAnimate, "{transition:width ", transition, ",height ", transition, ";transition-delay:", mathWithUnits(transitionSpeed, function (x) {
52
+ return x / 2;
53
+ }), ";}}};label:euiResizableButton;"),
54
+ horizontal: /*#__PURE__*/css("cursor:col-resize;", logicalCSS('height', '100%'), " ", logicalCSS('width', buttonSize), " margin-inline:", mathWithUnits(buttonSize, function (x) {
55
+ return x / -2;
56
+ }), ";&::before,&::after{", logicalCSS('width', grabHandleHeight), " ", logicalCSS('height', grabHandleWidth), " margin-block:", euiTheme.size.base, ";}&:hover,&:focus,&:active{&::before,&::after{", logicalCSS('height', '100%'), " margin-block:0;transform:none;}};label:horizontal;"),
57
+ vertical: /*#__PURE__*/css("flex-direction:column;cursor:row-resize;", logicalCSS('width', '100%'), " ", logicalCSS('height', buttonSize), " margin-block:", mathWithUnits(buttonSize, function (x) {
58
+ return x / -2;
59
+ }), ";&::before,&::after{", logicalCSS('height', grabHandleHeight), " ", logicalCSS('width', grabHandleWidth), " margin-inline:", euiTheme.size.base, ";}&:hover,&:focus,&:active{&::before,&::after{", logicalCSS('width', '100%'), " margin-inline:0;transform:none;}};label:vertical;"),
60
+ alignIndicator: {
61
+ center: _ref3,
62
+ start: _ref2,
63
+ end: _ref
64
+ }
65
+ };
66
+ };
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
  var _excluded = ["className", "externalPosition", "internalPosition", "direction", "isVisible", "isCollapsed"];
4
5
  /*
@@ -11,11 +12,15 @@ var _excluded = ["className", "externalPosition", "internalPosition", "direction
11
12
 
12
13
  import React from 'react';
13
14
  import classNames from 'classnames';
15
+ import { useEuiTheme } from '../../services';
14
16
  import { EuiButtonIcon } from '../button';
17
+ import { euiScreenReaderOnlyStyles } from '../accessibility/screen_reader_only/screen_reader_only.styles';
18
+ import { euiResizableCollapseButtonStyles } from './resizable_collapse_button.styles';
15
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
20
  export var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref) {
17
21
  var className = _ref.className,
18
- externalPosition = _ref.externalPosition,
22
+ _ref$externalPosition = _ref.externalPosition,
23
+ externalPosition = _ref$externalPosition === void 0 ? 'before' : _ref$externalPosition,
19
24
  _ref$internalPosition = _ref.internalPosition,
20
25
  internalPosition = _ref$internalPosition === void 0 ? 'middle' : _ref$internalPosition,
21
26
  _ref$direction = _ref.direction,
@@ -24,14 +29,15 @@ export var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref
24
29
  isCollapsed = _ref.isCollapsed,
25
30
  rest = _objectWithoutProperties(_ref, _excluded);
26
31
  var isHorizontal = direction === 'horizontal';
27
- var classes = classNames('euiResizableToggleButton', "euiResizableToggleButton--".concat(direction), "euiResizableToggleButton--".concat(externalPosition), "euiResizableToggleButton--".concat(internalPosition), {
28
- 'euiResizableToggleButton-isVisible': isVisible,
29
- 'euiResizableToggleButton-isCollapsed': isCollapsed
30
- }, className);
31
-
32
- // Default to simiple grab icon in case there is no externalPosition specified
33
- var COLLAPSED_ICON = isHorizontal ? 'grab' : 'grabHorizontal';
34
- var NOT_COLLAPSED_ICON = isHorizontal ? 'grab' : 'grabHorizontal';
32
+ var showOnFocus = !isCollapsed && !isVisible;
33
+ var screenReaderOnlyStyles = euiScreenReaderOnlyStyles(showOnFocus).euiScreenReaderOnly;
34
+ var euiTheme = useEuiTheme();
35
+ var styles = euiResizableCollapseButtonStyles(euiTheme);
36
+ var collapsedStyles = [styles.collapsed.collapsed, styles.collapsed[direction], styles.collapsed["".concat(direction, "Positions")][internalPosition]];
37
+ var collapsibleStyles = [styles.collapsible.collapsible, styles.collapsible[direction][externalPosition], styles.collapsible[direction][internalPosition]];
38
+ var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && screenReaderOnlyStyles].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
39
+ var COLLAPSED_ICON = '';
40
+ var NOT_COLLAPSED_ICON = '';
35
41
  switch (externalPosition) {
36
42
  case 'before':
37
43
  COLLAPSED_ICON = isHorizontal ? 'menuLeft' : 'menuUp';
@@ -42,11 +48,13 @@ export var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref
42
48
  NOT_COLLAPSED_ICON = isHorizontal ? 'menuLeft' : 'menuUp';
43
49
  break;
44
50
  }
51
+ var classes = classNames('euiResizableCollapseButton', className);
45
52
  return ___EmotionJSX(EuiButtonIcon, _extends({
46
53
  display: isCollapsed ? 'empty' : 'base',
47
- color: "text"
48
- }, rest, {
54
+ color: "text",
49
55
  className: classes,
56
+ css: cssStyles
57
+ }, rest, {
50
58
  iconType: isCollapsed ? COLLAPSED_ICON : NOT_COLLAPSED_ICON
51
59
  }));
52
60
  };
@@ -0,0 +1,85 @@
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)."; }
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS, mathWithUnits } from '../../global_styling';
12
+ import { euiShadowXSmall, euiSlightShadowHover } from '../../themes/amsterdam';
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "fuwsll-euiResizableCollapseButton",
15
+ styles: "z-index:2;position:absolute;&:focus{animation:none;};label:euiResizableCollapseButton;"
16
+ } : {
17
+ name: "fuwsll-euiResizableCollapseButton",
18
+ styles: "z-index:2;position:absolute;&:focus{animation:none;};label:euiResizableCollapseButton;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+ export var euiResizableCollapseButtonStyles = function euiResizableCollapseButtonStyles(euiThemeContext) {
22
+ var euiTheme = euiThemeContext.euiTheme;
23
+ var buttonSize = euiTheme.size.l;
24
+ var centeringOffset = mathWithUnits(buttonSize, function (x) {
25
+ return x / -2;
26
+ }); // Use negative margins instead of transforms to avoid having to override EuiButtonIcon's CSS
27
+ var buttonOffset = euiTheme.size.base;
28
+ return {
29
+ euiResizableCollapseButton: _ref,
30
+ collapsible: {
31
+ collapsible: /*#__PURE__*/css("background:", euiTheme.colors.emptyShade, ";", euiShadowXSmall(euiThemeContext), " &:focus{", euiSlightShadowHover(euiThemeContext), ";};label:collapsible;"),
32
+ horizontal: {
33
+ after: /*#__PURE__*/css(logicalCSS('right', 0), " ", logicalCSS('margin-right', centeringOffset), ";;label:after;"),
34
+ before: /*#__PURE__*/css(logicalCSS('left', 0), " ", logicalCSS('margin-left', centeringOffset), ";;label:before;"),
35
+ middle: /*#__PURE__*/css(logicalCSS('top', '50%'), " ", logicalCSS('margin-top', centeringOffset), ";;label:middle;"),
36
+ top: /*#__PURE__*/css(logicalCSS('top', 0), " ", logicalCSS('margin-top', buttonOffset), ";;label:top;"),
37
+ bottom: /*#__PURE__*/css(logicalCSS('bottom', 0), " ", logicalCSS('margin-bottom', buttonOffset), ";;label:bottom;"),
38
+ // `left/right` aren't valid positions for the horizontal direction,
39
+ // so we're using getters to fall back to the `middle` CSS
40
+ get left() {
41
+ return this.middle;
42
+ },
43
+ get right() {
44
+ return this.middle;
45
+ }
46
+ },
47
+ vertical: {
48
+ after: /*#__PURE__*/css(logicalCSS('top', '100%'), " ", logicalCSS('margin-top', centeringOffset), ";;label:after;"),
49
+ before: /*#__PURE__*/css(logicalCSS('bottom', '100%'), " ", logicalCSS('margin-bottom', centeringOffset), ";;label:before;"),
50
+ middle: /*#__PURE__*/css(logicalCSS('left', '50%'), " ", logicalCSS('margin-left', centeringOffset), ";;label:middle;"),
51
+ left: /*#__PURE__*/css(logicalCSS('left', 0), " ", logicalCSS('margin-left', buttonOffset), ";;label:left;"),
52
+ right: /*#__PURE__*/css(logicalCSS('right', 0), " ", logicalCSS('margin-right', buttonOffset), ";;label:right;"),
53
+ // `top/bottom` aren't valid positions for the horizontal direction,
54
+ // so we're using getters to fall back to the `middle` CSS
55
+ get top() {
56
+ return this.middle;
57
+ },
58
+ get bottom() {
59
+ return this.middle;
60
+ }
61
+ }
62
+ },
63
+ collapsed: {
64
+ // When collapsed, the button itself is the full collapsed area
65
+ // and we use flex to align the icon within
66
+ collapsed: /*#__PURE__*/css("border-radius:0;", logicalCSS('top', 0), ";;label:collapsed;"),
67
+ horizontal: /*#__PURE__*/css(logicalCSS('height', '100%'), ";;label:horizontal;"),
68
+ vertical: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:vertical;"),
69
+ horizontalPositions: {
70
+ top: /*#__PURE__*/css(logicalCSS('padding-top', buttonOffset), " align-items:flex-start;;label:top;"),
71
+ bottom: /*#__PURE__*/css(logicalCSS('padding-bottom', buttonOffset), " align-items:flex-end;;label:bottom;"),
72
+ middle: /*#__PURE__*/css(";label:middle;"),
73
+ left: /*#__PURE__*/css(";label:left;"),
74
+ right: /*#__PURE__*/css(";label:right;")
75
+ },
76
+ verticalPositions: {
77
+ left: /*#__PURE__*/css(logicalCSS('padding-left', buttonOffset), " justify-content:flex-start;;label:left;"),
78
+ right: /*#__PURE__*/css(logicalCSS('padding-right', buttonOffset), " justify-content:flex-end;;label:right;"),
79
+ middle: /*#__PURE__*/css(";label:middle;"),
80
+ top: /*#__PURE__*/css(";label:top;"),
81
+ bottom: /*#__PURE__*/css(";label:bottom;")
82
+ }
83
+ }
84
+ };
85
+ };
@@ -164,17 +164,67 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
164
164
  search: searchValue
165
165
  }, label));
166
166
  }, areEqual));
167
+ _defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function (heightIsFull, optionArray) {
168
+ if (!_this.props.isVirtualized) return null;
169
+ var _this$props3 = _this.props,
170
+ windowProps = _this$props3.windowProps,
171
+ forcedHeight = _this$props3.height,
172
+ rowHeight = _this$props3.rowHeight;
173
+ var virtualizationProps = _objectSpread({
174
+ className: 'euiSelectableList__list',
175
+ ref: _this.setListRef,
176
+ outerRef: _this.removeScrollableTabStop,
177
+ innerRef: _this.setListBoxRef,
178
+ innerElementType: 'ul',
179
+ itemCount: optionArray.length,
180
+ itemData: optionArray,
181
+ itemSize: rowHeight,
182
+ 'data-skip-axe': 'scrollable-region-focusable'
183
+ }, windowProps);
184
+
185
+ // Calculated height is only used if height is not full
186
+ var calculatedHeight = !heightIsFull ? forcedHeight || 0 : 0;
187
+
188
+ // If calculatedHeight is still falsy, then calculate it
189
+ if (!heightIsFull && !calculatedHeight) {
190
+ var maxVisibleOptions = 7;
191
+ var numVisibleOptions = optionArray.length;
192
+ var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
193
+ if (numVisibleMoreThanMax) {
194
+ // Show only half of the last one to indicate there's more to scroll to
195
+ calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
196
+ } else {
197
+ calculatedHeight = numVisibleOptions * rowHeight;
198
+ }
199
+ }
200
+ return heightIsFull ? ___EmotionJSX(EuiAutoSizer, null, function (_ref2) {
201
+ var width = _ref2.width,
202
+ height = _ref2.height;
203
+ return ___EmotionJSX(FixedSizeList, _extends({
204
+ width: width,
205
+ height: height
206
+ }, virtualizationProps), _this.ListRow);
207
+ }) : ___EmotionJSX(EuiAutoSizer, {
208
+ disableHeight: true
209
+ }, function (_ref3) {
210
+ var width = _ref3.width;
211
+ return ___EmotionJSX(FixedSizeList, _extends({
212
+ width: width,
213
+ height: calculatedHeight
214
+ }, virtualizationProps), _this.ListRow);
215
+ });
216
+ });
167
217
  _defineProperty(_assertThisInitialized(_this), "onAddOrRemoveOption", function (option, event) {
168
218
  if (option.disabled) {
169
219
  return;
170
220
  }
171
- var _this$props3 = _this.props,
172
- allowExclusions = _this$props3.allowExclusions,
173
- options = _this$props3.options,
174
- _this$props3$visibleO = _this$props3.visibleOptions,
175
- visibleOptions = _this$props3$visibleO === void 0 ? options : _this$props3$visibleO;
176
- _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref2) {
177
- var label = _ref2.label;
221
+ var _this$props4 = _this.props,
222
+ allowExclusions = _this$props4.allowExclusions,
223
+ options = _this$props4.options,
224
+ _this$props4$visibleO = _this$props4.visibleOptions,
225
+ visibleOptions = _this$props4$visibleO === void 0 ? options : _this$props4$visibleO;
226
+ _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref4) {
227
+ var label = _ref4.label;
178
228
  return label === option.label;
179
229
  }), function () {
180
230
  if (option.checked === 'on' && allowExclusions) {
@@ -187,10 +237,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
187
237
  });
188
238
  });
189
239
  _defineProperty(_assertThisInitialized(_this), "onAddOption", function (addedOption, event) {
190
- var _this$props4 = _this.props,
191
- onOptionClick = _this$props4.onOptionClick,
192
- options = _this$props4.options,
193
- singleSelection = _this$props4.singleSelection;
240
+ var _this$props5 = _this.props,
241
+ onOptionClick = _this$props5.onOptionClick,
242
+ options = _this$props5.options,
243
+ singleSelection = _this$props5.singleSelection;
194
244
  var changedOption = _objectSpread({}, addedOption);
195
245
  var updatedOptions = options.map(function (option) {
196
246
  // if singleSelection is enabled, uncheck any selected option(s)
@@ -209,10 +259,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
209
259
  onOptionClick(updatedOptions, event, changedOption);
210
260
  });
211
261
  _defineProperty(_assertThisInitialized(_this), "onRemoveOption", function (removedOption, event) {
212
- var _this$props5 = _this.props,
213
- onOptionClick = _this$props5.onOptionClick,
214
- singleSelection = _this$props5.singleSelection,
215
- options = _this$props5.options;
262
+ var _this$props6 = _this.props,
263
+ onOptionClick = _this$props6.onOptionClick,
264
+ singleSelection = _this$props6.singleSelection,
265
+ options = _this$props6.options;
216
266
  var changedOption = _objectSpread({}, removedOption);
217
267
  var updatedOptions = options.map(function (option) {
218
268
  var updatedOption = _objectSpread({}, option);
@@ -225,9 +275,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
225
275
  onOptionClick(updatedOptions, event, changedOption);
226
276
  });
227
277
  _defineProperty(_assertThisInitialized(_this), "onExcludeOption", function (excludedOption, event) {
228
- var _this$props6 = _this.props,
229
- onOptionClick = _this$props6.onOptionClick,
230
- options = _this$props6.options;
278
+ var _this$props7 = _this.props,
279
+ onOptionClick = _this$props7.onOptionClick,
280
+ options = _this$props7.options;
231
281
  var changedOption = _objectSpread({}, excludedOption);
232
282
  var updatedOptions = options.map(function (option) {
233
283
  var updatedOption = _objectSpread({}, option);
@@ -256,76 +306,44 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
256
306
  key: "render",
257
307
  value: function render() {
258
308
  var _this2 = this;
259
- var _this$props7 = this.props,
260
- className = _this$props7.className,
261
- options = _this$props7.options,
262
- searchValue = _this$props7.searchValue,
263
- onOptionClick = _this$props7.onOptionClick,
264
- renderOption = _this$props7.renderOption,
265
- forcedHeight = _this$props7.height,
266
- windowProps = _this$props7.windowProps,
267
- rowHeight = _this$props7.rowHeight,
268
- activeOptionIndex = _this$props7.activeOptionIndex,
269
- makeOptionId = _this$props7.makeOptionId,
270
- showIcons = _this$props7.showIcons,
271
- singleSelection = _this$props7.singleSelection,
272
- visibleOptions = _this$props7.visibleOptions,
273
- allowExclusions = _this$props7.allowExclusions,
274
- bordered = _this$props7.bordered,
275
- paddingSize = _this$props7.paddingSize,
276
- searchable = _this$props7.searchable,
277
- onFocusBadge = _this$props7.onFocusBadge,
278
- listId = _this$props7.listId,
279
- setActiveOptionIndex = _this$props7.setActiveOptionIndex,
280
- ariaLabel = _this$props7['aria-label'],
281
- ariaLabelledby = _this$props7['aria-labelledby'],
282
- ariaDescribedby = _this$props7['aria-describedby'],
283
- role = _this$props7.role,
284
- isVirtualized = _this$props7.isVirtualized,
285
- textWrap = _this$props7.textWrap,
286
- rest = _objectWithoutProperties(_this$props7, _excluded3);
309
+ var _this$props8 = this.props,
310
+ className = _this$props8.className,
311
+ options = _this$props8.options,
312
+ searchValue = _this$props8.searchValue,
313
+ onOptionClick = _this$props8.onOptionClick,
314
+ renderOption = _this$props8.renderOption,
315
+ forcedHeight = _this$props8.height,
316
+ windowProps = _this$props8.windowProps,
317
+ rowHeight = _this$props8.rowHeight,
318
+ activeOptionIndex = _this$props8.activeOptionIndex,
319
+ makeOptionId = _this$props8.makeOptionId,
320
+ showIcons = _this$props8.showIcons,
321
+ singleSelection = _this$props8.singleSelection,
322
+ visibleOptions = _this$props8.visibleOptions,
323
+ allowExclusions = _this$props8.allowExclusions,
324
+ bordered = _this$props8.bordered,
325
+ paddingSize = _this$props8.paddingSize,
326
+ searchable = _this$props8.searchable,
327
+ onFocusBadge = _this$props8.onFocusBadge,
328
+ listId = _this$props8.listId,
329
+ setActiveOptionIndex = _this$props8.setActiveOptionIndex,
330
+ ariaLabel = _this$props8['aria-label'],
331
+ ariaLabelledby = _this$props8['aria-labelledby'],
332
+ ariaDescribedby = _this$props8['aria-describedby'],
333
+ role = _this$props8.role,
334
+ isVirtualized = _this$props8.isVirtualized,
335
+ textWrap = _this$props8.textWrap,
336
+ rest = _objectWithoutProperties(_this$props8, _excluded3);
287
337
  var optionArray = visibleOptions || options;
288
338
  this.calculateAriaSetAttrs(optionArray);
289
339
  var heightIsFull = forcedHeight === 'full';
290
- var calculatedHeight = heightIsFull ? false : forcedHeight;
291
-
292
- // If calculatedHeight is still undefined, then calculate it
293
- if (calculatedHeight === undefined) {
294
- var maxVisibleOptions = 7;
295
- var numVisibleOptions = optionArray.length;
296
- var numVisibleMoreThanMax = optionArray.length > maxVisibleOptions;
297
- if (numVisibleMoreThanMax) {
298
- // Show only half of the last one to indicate there's more to scroll to
299
- calculatedHeight = (maxVisibleOptions - 0.5) * rowHeight;
300
- } else {
301
- calculatedHeight = numVisibleOptions * rowHeight;
302
- }
303
- }
304
340
  var classes = classNames('euiSelectableList', {
305
341
  'euiSelectableList-fullHeight': heightIsFull,
306
342
  'euiSelectableList-bordered': bordered
307
343
  }, className);
308
344
  return ___EmotionJSX("div", _extends({
309
345
  className: classes
310
- }, rest), isVirtualized ? ___EmotionJSX(EuiAutoSizer, {
311
- disableHeight: !heightIsFull
312
- }, function (_ref3) {
313
- var width = _ref3.width,
314
- height = _ref3.height;
315
- return ___EmotionJSX(FixedSizeList, _extends({
316
- ref: _this2.setListRef,
317
- outerRef: _this2.removeScrollableTabStop,
318
- className: "euiSelectableList__list",
319
- "data-skip-axe": "scrollable-region-focusable",
320
- width: width,
321
- height: calculatedHeight || height,
322
- itemCount: optionArray.length,
323
- itemData: optionArray,
324
- itemSize: rowHeight,
325
- innerElementType: "ul",
326
- innerRef: _this2.setListBoxRef
327
- }, windowProps), _this2.ListRow);
328
- }) : ___EmotionJSX("div", {
346
+ }, rest), isVirtualized ? this.renderVirtualizedList(heightIsFull, optionArray) : ___EmotionJSX("div", {
329
347
  className: "euiSelectableList__list",
330
348
  ref: this.removeScrollableTabStop
331
349
  }, ___EmotionJSX("ul", {
@@ -40,7 +40,7 @@ export var euiStepStyles = function euiStepStyles(euiThemeContext) {
40
40
  export var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
41
41
  var euiTheme = euiThemeContext.euiTheme;
42
42
  var euiStep = euiStepVariables(euiTheme);
43
- var styles = {
43
+ return {
44
44
  euiStep__content: /*#__PURE__*/css(logicalCSS('margin-top', euiTheme.size.s), " ", logicalCSS('padding-top', euiTheme.size.base), " ", logicalCSS('padding-bottom', mathWithUnits([euiTheme.size.xl, euiTheme.size.s], function (x, y) {
45
45
  return x + y;
46
46
  })), " ", logicalCSS('padding-right', euiTheme.size.base), ";;label:euiStep__content;"),
@@ -50,16 +50,16 @@ export var euiStepContentStyles = function euiStepContentStyles(euiThemeContext)
50
50
  })), logicalCSS('margin-left', mathWithUnits(euiStep.numberSize, function (x) {
51
51
  return x / 2;
52
52
  })), ";;label:m;"),
53
- s: /*#__PURE__*/css(";label:s;"),
54
- // s is the same as m, so we'll programmatically duplicate it below
53
+ // `s` is the same as `m` - use a getter to duplicate its content
54
+ get s() {
55
+ return this.m;
56
+ },
55
57
  xs: /*#__PURE__*/css(logicalCSS('padding-left', mathWithUnits([euiStep.numberXSSize, euiStep.numberMargin], function (x, y) {
56
58
  return x / 2 + y;
57
59
  })), logicalCSS('margin-left', mathWithUnits(euiStep.numberXSSize, function (x) {
58
60
  return x / 2;
59
61
  })), ";;label:xs;")
60
62
  };
61
- styles.s = styles.m;
62
- return styles;
63
63
  };
64
64
  export var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
65
65
  var euiTheme = euiThemeContext.euiTheme;
@@ -20,7 +20,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
20
20
 
21
21
  import React, { Component } from 'react';
22
22
  import classNames from 'classnames';
23
- import { keysOf } from '../common';
24
23
  import { findPopoverPosition, htmlIdGenerator } from '../../services';
25
24
  import { enqueueStateChange } from '../../services/react';
26
25
  import { EuiResizeObserver } from '../observer/resize_observer';
@@ -30,21 +29,12 @@ import { EuiToolTipAnchor } from './tool_tip_anchor';
30
29
  import { EuiToolTipArrow } from './tool_tip_arrow';
31
30
  import { toolTipManager } from './tool_tip_manager';
32
31
  import { jsx as ___EmotionJSX } from "@emotion/react";
33
- var positionsToClassNameMap = {
34
- top: 'euiToolTip--top',
35
- right: 'euiToolTip--right',
36
- bottom: 'euiToolTip--bottom',
37
- left: 'euiToolTip--left'
38
- };
39
- export var POSITIONS = keysOf(positionsToClassNameMap);
32
+ export var POSITIONS = ['top', 'right', 'bottom', 'left'];
33
+ var DISPLAYS = ['inlineBlock', 'block'];
40
34
  var delayToMsMap = {
41
35
  regular: 250,
42
36
  long: 250 * 5
43
37
  };
44
- var displayToClassNameMap = {
45
- inlineBlock: undefined,
46
- block: 'euiToolTipAnchor--displayBlock'
47
- };
48
38
  var DEFAULT_TOOLTIP_STYLES = {
49
39
  // position the tooltip content near the top-left
50
40
  // corner of the window so it can't create scrollbars
@@ -255,7 +245,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
255
245
  onFocus: this.onFocus,
256
246
  onMouseOver: this.showToolTip,
257
247
  onMouseOut: this.onMouseOut,
258
- id: this.state.id,
248
+ id: id,
259
249
  className: anchorClasses,
260
250
  display: display,
261
251
  isVisible: visible
@@ -1,9 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "className", "children", "display", "isVisible"];
5
- 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; }
6
- 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; }
7
4
  /*
8
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -39,7 +36,7 @@ export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
36
  className: classes,
40
37
  onMouseOver: onMouseOver,
41
38
  onMouseOut: onMouseOut
42
- }), /*#__PURE__*/cloneElement(children, _objectSpread({
39
+ }), /*#__PURE__*/cloneElement(children, {
43
40
  onFocus: function onFocus(e) {
44
41
  _onFocus();
45
42
  children.props.onFocus && children.props.onFocus(e);
@@ -47,10 +44,9 @@ export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
44
  onBlur: function onBlur(e) {
48
45
  _onBlur();
49
46
  children.props.onBlur && children.props.onBlur(e);
50
- }
51
- }, isVisible && {
52
- 'aria-describedby': id
53
- })))
47
+ },
48
+ 'aria-describedby': isVisible ? classNames(id, children.props['aria-describedby']) : children.props['aria-describedby']
49
+ }))
54
50
  );
55
51
  });
56
52
  EuiToolTipAnchor.displayName = 'EuiToolTipAnchor';
@@ -6,8 +6,8 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
+ import React, { useMemo } from 'react';
9
10
  import { v1 as uuidv1 } from 'uuid';
10
- import { useMemo } from 'react';
11
11
 
12
12
  /**
13
13
  * This function returns a function to generate ids.
@@ -32,7 +32,8 @@ export function htmlIdGenerator() {
32
32
  * This prevents IDs from being re-randomized on every component update.
33
33
  */
34
34
 
35
- export var useGeneratedHtmlId = function useGeneratedHtmlId() {
35
+ // We can remove this deprecated hook once EUI no longer needs to support React 16-17
36
+ var useDeprecatedGeneratedHtmlId = function useDeprecatedGeneratedHtmlId() {
36
37
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
37
38
  prefix = _ref.prefix,
38
39
  suffix = _ref.suffix,
@@ -40,4 +41,19 @@ export var useGeneratedHtmlId = function useGeneratedHtmlId() {
40
41
  return useMemo(function () {
41
42
  return conditionalId || htmlIdGenerator(prefix)(suffix);
42
43
  }, [conditionalId, prefix, suffix]);
43
- };
44
+ };
45
+ var useNewGeneratedHtmlId = function useNewGeneratedHtmlId() {
46
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
47
+ _ref2$prefix = _ref2.prefix,
48
+ prefix = _ref2$prefix === void 0 ? '' : _ref2$prefix,
49
+ _ref2$suffix = _ref2.suffix,
50
+ suffix = _ref2$suffix === void 0 ? '' : _ref2$suffix,
51
+ conditionalId = _ref2.conditionalId;
52
+ // Using the default export and dot notation here is intentional
53
+ // to prevent React <18 import errors.
54
+ var id = React.useId();
55
+ return useMemo(function () {
56
+ return conditionalId || "".concat(prefix).concat(id).concat(suffix);
57
+ }, [id, conditionalId, prefix, suffix]);
58
+ };
59
+ export var useGeneratedHtmlId = 'useId' in React ? useNewGeneratedHtmlId : useDeprecatedGeneratedHtmlId;
@@ -78,7 +78,6 @@ export var euiShadowXLarge = function euiShadowXLarge(_ref9) {
78
78
 
79
79
  /**
80
80
  * slightShadowHover
81
- * TODO: I think this is only used by panels/cards in the Amsterdam theme, move there
82
81
  */
83
82
  export var euiSlightShadowHover = function euiSlightShadowHover(_ref11) {
84
83
  var euiTheme = _ref11.euiTheme,