@elastic/eui 72.0.0 → 72.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 (149) hide show
  1. package/dist/eui_charts_theme.js +13 -1
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +0 -151
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -151
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/accordion/accordion.js +1 -1
  8. package/es/components/basic_table/basic_table.js +2 -2
  9. package/es/components/basic_table/in_memory_table.js +3 -6
  10. package/es/components/basic_table/table.a11y.js +128 -0
  11. package/es/components/color_picker/color_picker.styles.js +16 -0
  12. package/es/components/color_picker/color_stops/color_stop_thumb.js +19 -7
  13. package/es/components/color_picker/color_stops/color_stop_thumb.styles.js +59 -0
  14. package/es/components/color_picker/color_stops/color_stops.js +25 -15
  15. package/es/components/color_picker/color_stops/color_stops.styles.js +65 -0
  16. package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  17. package/es/components/date_picker/super_date_picker/super_update_button.js +8 -0
  18. package/es/components/form/range/range_highlight.styles.js +1 -1
  19. package/es/components/form/range/range_levels.styles.js +1 -1
  20. package/es/components/form/range/range_track.js +5 -2
  21. package/es/components/image/image.a11y.js +55 -0
  22. package/es/components/image/image.js +9 -2
  23. package/es/components/image/image_fullscreen_wrapper.js +3 -1
  24. package/es/components/image/image_wrapper.js +3 -1
  25. package/es/components/key_pad_menu/key_pad_menu.a11y.js +158 -0
  26. package/es/components/markdown_editor/markdown_format.styles.js +2 -5
  27. package/es/components/popover/popover.js +2 -2
  28. package/es/components/table/table_footer_cell.js +1 -1
  29. package/es/components/table/table_header_cell.js +1 -1
  30. package/es/components/table/table_row_cell.js +2 -2
  31. package/es/components/text/text.styles.js +6 -3
  32. package/es/components/tool_tip/icon_tip.js +8 -0
  33. package/es/components/tool_tip/tool_tip.js +24 -1
  34. package/es/components/tour/tour.styles.js +1 -1
  35. package/es/services/color/manipulation.js +9 -0
  36. package/es/services/index.js +11 -11
  37. package/eui.d.ts +166 -107
  38. package/i18ntokens.json +16 -16
  39. package/lib/components/accordion/accordion.js +1 -1
  40. package/lib/components/basic_table/basic_table.js +2 -2
  41. package/lib/components/basic_table/in_memory_table.js +3 -6
  42. package/lib/components/basic_table/table.a11y.js +139 -0
  43. package/lib/components/color_picker/color_picker.styles.js +26 -0
  44. package/lib/components/color_picker/color_stops/color_stop_thumb.js +19 -6
  45. package/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
  46. package/lib/components/color_picker/color_stops/color_stops.js +25 -14
  47. package/lib/components/color_picker/color_stops/color_stops.styles.js +73 -0
  48. package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  49. package/lib/components/date_picker/super_date_picker/super_update_button.js +8 -0
  50. package/lib/components/form/range/range_highlight.styles.js +1 -1
  51. package/lib/components/form/range/range_levels.styles.js +1 -1
  52. package/lib/components/form/range/range_track.js +6 -2
  53. package/lib/components/image/image.a11y.js +61 -0
  54. package/lib/components/image/image.js +9 -2
  55. package/lib/components/image/image_fullscreen_wrapper.js +3 -1
  56. package/lib/components/image/image_wrapper.js +3 -1
  57. package/lib/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
  58. package/lib/components/markdown_editor/markdown_format.styles.js +1 -4
  59. package/lib/components/popover/popover.js +2 -2
  60. package/lib/components/table/table_footer_cell.js +1 -1
  61. package/lib/components/table/table_header_cell.js +1 -1
  62. package/lib/components/table/table_row_cell.js +2 -2
  63. package/lib/components/text/text.styles.js +5 -2
  64. package/lib/components/tool_tip/icon_tip.js +8 -0
  65. package/lib/components/tool_tip/tool_tip.js +24 -1
  66. package/lib/components/tour/tour.styles.js +1 -1
  67. package/lib/services/color/manipulation.js +14 -2
  68. package/lib/services/index.js +65 -58
  69. package/optimize/es/components/accordion/accordion.js +1 -1
  70. package/optimize/es/components/basic_table/table.a11y.js +128 -0
  71. package/optimize/es/components/color_picker/color_picker.styles.js +16 -0
  72. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.js +19 -7
  73. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.styles.js +59 -0
  74. package/optimize/es/components/color_picker/color_stops/color_stops.js +25 -15
  75. package/optimize/es/components/color_picker/color_stops/color_stops.styles.js +65 -0
  76. package/optimize/es/components/form/range/range_highlight.styles.js +1 -1
  77. package/optimize/es/components/form/range/range_levels.styles.js +1 -1
  78. package/optimize/es/components/form/range/range_track.js +5 -2
  79. package/optimize/es/components/image/image.a11y.js +55 -0
  80. package/optimize/es/components/image/image.js +4 -2
  81. package/optimize/es/components/image/image_fullscreen_wrapper.js +3 -1
  82. package/optimize/es/components/image/image_wrapper.js +3 -1
  83. package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +148 -0
  84. package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -5
  85. package/optimize/es/components/popover/popover.js +2 -2
  86. package/optimize/es/components/text/text.styles.js +6 -3
  87. package/optimize/es/components/tool_tip/tool_tip.js +16 -1
  88. package/optimize/es/components/tour/tour.styles.js +1 -1
  89. package/optimize/es/services/color/manipulation.js +9 -0
  90. package/optimize/es/services/index.js +11 -11
  91. package/optimize/lib/components/accordion/accordion.js +1 -1
  92. package/optimize/lib/components/basic_table/table.a11y.js +139 -0
  93. package/optimize/lib/components/color_picker/color_picker.styles.js +26 -0
  94. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.js +19 -6
  95. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
  96. package/optimize/lib/components/color_picker/color_stops/color_stops.js +25 -14
  97. package/optimize/lib/components/color_picker/color_stops/color_stops.styles.js +73 -0
  98. package/optimize/lib/components/form/range/range_highlight.styles.js +1 -1
  99. package/optimize/lib/components/form/range/range_levels.styles.js +1 -1
  100. package/optimize/lib/components/form/range/range_track.js +6 -2
  101. package/optimize/lib/components/image/image.a11y.js +61 -0
  102. package/optimize/lib/components/image/image.js +4 -2
  103. package/optimize/lib/components/image/image_fullscreen_wrapper.js +3 -1
  104. package/optimize/lib/components/image/image_wrapper.js +3 -1
  105. package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
  106. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +1 -4
  107. package/optimize/lib/components/popover/popover.js +2 -2
  108. package/optimize/lib/components/text/text.styles.js +5 -2
  109. package/optimize/lib/components/tool_tip/tool_tip.js +16 -1
  110. package/optimize/lib/components/tour/tour.styles.js +1 -1
  111. package/optimize/lib/services/color/manipulation.js +14 -2
  112. package/optimize/lib/services/index.js +65 -58
  113. package/package.json +2 -2
  114. package/src/components/color_picker/_index.scss +0 -1
  115. package/src/components/markdown_editor/_markdown_format.scss +0 -4
  116. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  117. package/test-env/components/accordion/accordion.js +1 -1
  118. package/test-env/components/basic_table/basic_table.js +2 -2
  119. package/test-env/components/basic_table/in_memory_table.js +3 -6
  120. package/test-env/components/basic_table/table.a11y.js +139 -0
  121. package/test-env/components/color_picker/color_picker.styles.js +26 -0
  122. package/test-env/components/color_picker/color_stops/color_stop_thumb.js +19 -6
  123. package/test-env/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
  124. package/test-env/components/color_picker/color_stops/color_stops.js +25 -14
  125. package/test-env/components/color_picker/color_stops/color_stops.styles.js +73 -0
  126. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  127. package/test-env/components/date_picker/super_date_picker/super_update_button.js +8 -0
  128. package/test-env/components/form/range/range_highlight.styles.js +1 -1
  129. package/test-env/components/form/range/range_levels.styles.js +1 -1
  130. package/test-env/components/form/range/range_track.js +6 -2
  131. package/test-env/components/image/image.a11y.js +61 -0
  132. package/test-env/components/image/image.js +9 -2
  133. package/test-env/components/image/image_fullscreen_wrapper.js +3 -1
  134. package/test-env/components/image/image_wrapper.js +3 -1
  135. package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
  136. package/test-env/components/markdown_editor/markdown_format.styles.js +1 -4
  137. package/test-env/components/popover/popover.js +2 -2
  138. package/test-env/components/table/table_footer_cell.js +1 -1
  139. package/test-env/components/table/table_header_cell.js +1 -1
  140. package/test-env/components/table/table_row_cell.js +2 -2
  141. package/test-env/components/text/text.styles.js +5 -2
  142. package/test-env/components/tool_tip/icon_tip.js +8 -0
  143. package/test-env/components/tool_tip/tool_tip.js +24 -1
  144. package/test-env/components/tour/tour.styles.js +1 -1
  145. package/test-env/services/color/manipulation.js +14 -2
  146. package/test-env/services/index.js +65 -58
  147. package/src/components/color_picker/color_stops/_color_stops.scss +0 -101
  148. package/src/components/color_picker/color_stops/_index.scss +0 -1
  149. package/src/themes/amsterdam/overrides/_color_stops.scss +0 -58
@@ -17,7 +17,7 @@ export var euiRangeHighlightStyles = function euiRangeHighlightStyles(euiThemeCo
17
17
  export var euiRangeHighlightProgressStyles = function euiRangeHighlightProgressStyles(euiThemeContext) {
18
18
  var range = euiRangeVariables(euiThemeContext);
19
19
  return {
20
- euiRangeHighlight__progress: /*#__PURE__*/css("block-size:", range.highlightHeight, ";border-radius:", range.trackBorderRadius, ";background-color:", range.highlightColor, ";border-color:", range.highlightColor, ";.euiRangeSlider:focus-visible~.euiRangeHighlight &,.euiRangeThumb:focus-visible~.euiRangeHighlight &,.euiRangeDraggable:focus~.euiRangeHighlight &{background-color:", range.focusColor, ";};label:euiRangeHighlight__progress;")
20
+ euiRangeHighlight__progress: /*#__PURE__*/css("block-size:", range.highlightHeight, ";border-radius:", range.trackBorderRadius, ";background-color:", range.highlightColor, ";.euiRangeSlider:focus-visible~.euiRangeHighlight &,.euiRangeThumb:focus-visible~.euiRangeHighlight &,.euiRangeDraggable:focus~.euiRangeHighlight &{background-color:", range.focusColor, ";};label:euiRangeHighlight__progress;")
21
21
  };
22
22
  };
23
23
  export var euiRangeHighlightLevelsWrapperStyles = function euiRangeHighlightLevelsWrapperStyles(euiThemeContext) {
@@ -18,7 +18,7 @@ export var euiRangeLevelsStyles = function euiRangeLevelsStyles(euiThemeContext)
18
18
  var stripesBackground = "repeating-linear-gradient(\n -45deg,\n ".concat(transparentize(stripeColor, 0.5), ",\n ").concat(transparentize(stripeColor, 0.5), " 25%,\n ").concat(transparentize(stripeColor, 0.7), " 25%,\n ").concat(transparentize(stripeColor, 0.7), " 50%,\n ").concat(transparentize(stripeColor, 0.5), " 50%\n )");
19
19
  return {
20
20
  euiRangeLevels: /*#__PURE__*/css("display:flex;justify-content:stretch;position:absolute;inset-inline:0;inset-block-start:", range.trackTopPositionWithoutTicks, ";z-index:", range.levelsZIndex, ";;label:euiRangeLevels;"),
21
- hasRange: /*#__PURE__*/css("&::after{content:'';position:absolute;block-size:", range.trackHeight, ";inline-size:100%;background-image:", stripesBackground, ";background-size:", euiTheme.size.s, " ", euiTheme.size.s, ";border-radius:", range.trackBorderRadius, ";};label:hasRange;"),
21
+ hasRange: /*#__PURE__*/css("&::after{content:'';position:absolute;block-size:", range.trackHeight, ";inline-size:100%;background-image:", stripesBackground, ";background-size:", euiTheme.size.xs, " ", euiTheme.size.xs, ";border-radius:", range.trackBorderRadius, ";};label:hasRange;"),
22
22
  hasTicks: /*#__PURE__*/css("inset-block-start:", range.trackTopPositionWithTicks, ";;label:hasTicks;")
23
23
  };
24
24
  };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["children", "disabled", "max", "min", "step", "showTicks", "tickInterval", "ticks", "levels", "onChange", "value", "compressed", "showRange"];
4
+ var _excluded = ["children", "disabled", "max", "min", "step", "showTicks", "tickInterval", "ticks", "levels", "onChange", "value", "compressed", "showRange", "className"];
5
5
 
6
6
  /*
7
7
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,6 +11,7 @@ var _excluded = ["children", "disabled", "max", "min", "step", "showTicks", "tic
11
11
  * Side Public License, v 1.
12
12
  */
13
13
  import React, { useState, useMemo, useEffect } from 'react';
14
+ import classNames from 'classnames';
14
15
  import range from 'lodash/range';
15
16
  import { useEuiTheme, isEvenlyDivisibleBy } from '../../../services';
16
17
  import { EuiRangeLevels } from './range_levels';
@@ -31,6 +32,7 @@ export var EuiRangeTrack = function EuiRangeTrack(_ref) {
31
32
  value = _ref.value,
32
33
  compressed = _ref.compressed,
33
34
  showRange = _ref.showRange,
35
+ className = _ref.className,
34
36
  rest = _objectWithoutProperties(_ref, _excluded);
35
37
 
36
38
  useEffect(function () {
@@ -90,8 +92,9 @@ export var EuiRangeTrack = function EuiRangeTrack(_ref) {
90
92
  trackWidth = _useState2[0],
91
93
  setTrackWidth = _useState2[1];
92
94
 
95
+ var classes = classNames('euiRangeTrack', className);
93
96
  return ___EmotionJSX("div", _extends({
94
- className: "euiRangeTrack",
97
+ className: classes,
95
98
  css: cssStyles
96
99
  }, rest, {
97
100
  ref: function ref(node) {
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ /// <reference types="../../../cypress/support"/>
9
+ import React from 'react';
10
+ import { EuiImage } from './image';
11
+ import { jsx as ___EmotionJSX } from "@emotion/react";
12
+
13
+ var Image = function Image() {
14
+ return ___EmotionJSX(EuiImage, {
15
+ size: "m",
16
+ hasShadow: true,
17
+ allowFullScreen: true,
18
+ caption: "Albert Einstein, theoretical physicist",
19
+ alt: "" // Because this image is sufficiently described by its caption, there is no need to repeat it via alt text
20
+ ,
21
+ src: "https://upload.wikimedia.org/wikipedia/commons/d/d3/Albert_Einstein_Head.jpg"
22
+ });
23
+ };
24
+
25
+ beforeEach(function () {
26
+ cy.viewport(1024, 768); // medium breakpoint
27
+
28
+ cy.realMount(___EmotionJSX(Image, null));
29
+ cy.get('figure[aria-label="Albert Einstein, theoretical physicist"]').should('exist');
30
+ });
31
+ describe('EuiImage', function () {
32
+ describe('Automated accessibility check', function () {
33
+ it('has zero violations on first render', function () {
34
+ cy.checkAxe();
35
+ });
36
+ it('has zero violations on fullscreen render', function () {
37
+ cy.get('button[data-test-subj="activateFullScreenButton"]').realClick();
38
+ cy.get('button[data-test-subj="deactivateFullScreenButton"]').should('exist');
39
+ cy.checkAxe();
40
+ cy.get('div[data-test-subj="fullScreenOverlayMask"]').realClick();
41
+ cy.checkAxe();
42
+ });
43
+ it('has zero violations on keyboard interaction', function () {
44
+ cy.realPress('Tab');
45
+ cy.get('button[data-test-subj="activateFullScreenButton"]').should('have.focus');
46
+ cy.realPress('Enter');
47
+ cy.get('button[data-test-subj="deactivateFullScreenButton"]').should('exist');
48
+ cy.get('button[data-test-subj="deactivateFullScreenButton"]').should('have.focus');
49
+ cy.checkAxe();
50
+ cy.realPress('Escape');
51
+ cy.get('button[data-test-subj="activateFullScreenButton"]').should('have.focus');
52
+ cy.checkAxe();
53
+ });
54
+ });
55
+ });
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin"];
5
+ var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin", "onFullScreen"];
6
6
 
7
7
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
8
8
 
@@ -38,6 +38,7 @@ export var EuiImage = function EuiImage(_ref) {
38
38
  caption = _ref.caption,
39
39
  float = _ref.float,
40
40
  margin = _ref.margin,
41
+ onFullScreen = _ref.onFullScreen,
41
42
  rest = _objectWithoutProperties(_ref, _excluded);
42
43
 
43
44
  var _useState = useState(false),
@@ -68,7 +69,8 @@ export var EuiImage = function EuiImage(_ref) {
68
69
  alt: alt,
69
70
  caption: caption,
70
71
  float: float,
71
- margin: margin
72
+ margin: margin,
73
+ onFullScreen: onFullScreen
72
74
  };
73
75
 
74
76
  var commonImgProps = _objectSpread({
@@ -28,7 +28,8 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
28
28
  setIsFullScreen = _ref.setIsFullScreen,
29
29
  wrapperProps = _ref.wrapperProps,
30
30
  isFullWidth = _ref.isFullWidth,
31
- fullScreenIconColor = _ref.fullScreenIconColor;
31
+ fullScreenIconColor = _ref.fullScreenIconColor,
32
+ onFullScreen = _ref.onFullScreen;
32
33
  var euiTheme = useEuiTheme();
33
34
  var styles = euiImageFullscreenWrapperStyles(euiTheme);
34
35
  var cssStyles = [styles.euiImageFullscreenWrapper];
@@ -44,6 +45,7 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
44
45
 
45
46
  var closeFullScreen = function closeFullScreen() {
46
47
  setIsFullScreen(false);
48
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(false);
47
49
  };
48
50
 
49
51
  var _useInnerText = useInnerText(),
@@ -27,10 +27,12 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
27
27
  setIsFullScreen = _ref.setIsFullScreen,
28
28
  wrapperProps = _ref.wrapperProps,
29
29
  fullScreenIconColor = _ref.fullScreenIconColor,
30
- isFullWidth = _ref.isFullWidth;
30
+ isFullWidth = _ref.isFullWidth,
31
+ onFullScreen = _ref.onFullScreen;
31
32
 
32
33
  var openFullScreen = function openFullScreen() {
33
34
  setIsFullScreen(true);
35
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(true);
34
36
  };
35
37
 
36
38
  var classes = classNames('euiImageWrapper', wrapperProps && wrapperProps.className);
@@ -0,0 +1,148 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ /// <reference types="../../../cypress/support"/>
11
+ import React, { useState } from 'react';
12
+ import { EuiKeyPadMenu } from './key_pad_menu';
13
+ import { EuiKeyPadMenuItem } from './key_pad_menu_item';
14
+ import { EuiIcon } from '../icon';
15
+ import { useGeneratedHtmlId } from '../../services';
16
+ import { jsx as ___EmotionJSX } from "@emotion/react";
17
+
18
+ var KeyPadMenu = function KeyPadMenu() {
19
+ var keypadButtonId__1 = useGeneratedHtmlId({
20
+ prefix: 'keypadButton',
21
+ suffix: 'first'
22
+ });
23
+ var keypadButtonId__2 = useGeneratedHtmlId({
24
+ prefix: 'keypadButton',
25
+ suffix: 'second'
26
+ });
27
+ var keypadButtonId__3 = useGeneratedHtmlId({
28
+ prefix: 'keypadButton',
29
+ suffix: 'third'
30
+ });
31
+ var keypadButtonId__4 = useGeneratedHtmlId({
32
+ prefix: 'keypadButton',
33
+ suffix: 'fourth'
34
+ });
35
+ var keypadButtonId__5 = useGeneratedHtmlId({
36
+ prefix: 'keypadButton',
37
+ suffix: 'fifth'
38
+ });
39
+ var keypadButtonId__6 = useGeneratedHtmlId({
40
+ prefix: 'keypadButton',
41
+ suffix: 'sixth'
42
+ });
43
+
44
+ var _useState = useState(keypadButtonId__6),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ selectedID = _useState2[0],
47
+ setSelectedID = _useState2[1];
48
+
49
+ return ___EmotionJSX("div", {
50
+ "aria-label": "Menu keypad"
51
+ }, ___EmotionJSX(EuiKeyPadMenu, null, ___EmotionJSX(EuiKeyPadMenuItem, {
52
+ "data-test-subj": "cy-keypad-button-1",
53
+ id: keypadButtonId__1,
54
+ label: "Button 1",
55
+ isSelected: selectedID === keypadButtonId__1,
56
+ onClick: function onClick() {
57
+ return setSelectedID(keypadButtonId__1);
58
+ }
59
+ }, ___EmotionJSX(EuiIcon, {
60
+ type: "grid",
61
+ size: "l"
62
+ })), ___EmotionJSX(EuiKeyPadMenuItem, {
63
+ "data-test-subj": "cy-keypad-button-2",
64
+ id: keypadButtonId__2,
65
+ label: "Button 2",
66
+ isSelected: selectedID === keypadButtonId__2,
67
+ onClick: function onClick() {
68
+ return setSelectedID(keypadButtonId__2);
69
+ }
70
+ }, ___EmotionJSX(EuiIcon, {
71
+ type: "grid",
72
+ size: "l"
73
+ })), ___EmotionJSX(EuiKeyPadMenuItem, {
74
+ "data-test-subj": "cy-keypad-button-3",
75
+ id: keypadButtonId__3,
76
+ label: "Button 3",
77
+ isSelected: selectedID === keypadButtonId__3,
78
+ onClick: function onClick() {
79
+ return setSelectedID(keypadButtonId__3);
80
+ }
81
+ }, ___EmotionJSX(EuiIcon, {
82
+ type: "grid",
83
+ size: "l"
84
+ })), ___EmotionJSX(EuiKeyPadMenuItem, {
85
+ "data-test-subj": "cy-keypad-link-1",
86
+ id: keypadButtonId__4,
87
+ label: "Link 1",
88
+ href: "#/navigation/key-pad-menu",
89
+ isSelected: selectedID === keypadButtonId__4,
90
+ onClick: function onClick() {
91
+ return setSelectedID(keypadButtonId__4);
92
+ }
93
+ }, ___EmotionJSX(EuiIcon, {
94
+ type: "link",
95
+ size: "l"
96
+ })), ___EmotionJSX(EuiKeyPadMenuItem, {
97
+ "data-test-subj": "cy-keypad-link-2",
98
+ id: keypadButtonId__5,
99
+ label: "Link 2",
100
+ href: "#/navigation/key-pad-menu",
101
+ isSelected: selectedID === keypadButtonId__5,
102
+ onClick: function onClick() {
103
+ return setSelectedID(keypadButtonId__5);
104
+ }
105
+ }, ___EmotionJSX(EuiIcon, {
106
+ type: "link",
107
+ size: "l"
108
+ })), ___EmotionJSX(EuiKeyPadMenuItem, {
109
+ "data-test-subj": "cy-keypad-link-3",
110
+ id: keypadButtonId__6,
111
+ label: "Disabled Link 3",
112
+ isDisabled: true,
113
+ isSelected: selectedID === keypadButtonId__6
114
+ }, ___EmotionJSX(EuiIcon, {
115
+ type: "link",
116
+ size: "l"
117
+ }))));
118
+ };
119
+
120
+ beforeEach(function () {
121
+ cy.realMount(___EmotionJSX(KeyPadMenu, null));
122
+ cy.get('div[aria-label="Menu keypad"]').should('exist');
123
+ });
124
+ describe('EuiKeyPadMenu', function () {
125
+ describe('Automated accessibility check', function () {
126
+ it('has zero violations on first render', function () {
127
+ cy.checkAxe();
128
+ });
129
+ it('has zero violations on item click', function () {
130
+ cy.get('a[data-test-subj="cy-keypad-link-2"]').realClick();
131
+ cy.get('a[data-test-subj="cy-keypad-link-2"]').should('have.class', 'euiKeyPadMenuItem-isSelected');
132
+ cy.checkAxe();
133
+ });
134
+ it('has zero violations on item keypress', function () {
135
+ cy.repeatRealPress('Tab', 3);
136
+ cy.get('button[data-test-subj="cy-keypad-button-3"]').should('have.focus');
137
+ cy.realPress('Space');
138
+ cy.get('button[data-test-subj="cy-keypad-button-3"]').should('have.class', 'euiKeyPadMenuItem-isSelected');
139
+ cy.checkAxe();
140
+ cy.realPress(['Shift', 'Tab']);
141
+ cy.get('button[data-test-subj="cy-keypad-button-2"]').should('have.focus');
142
+ cy.realPress('Space');
143
+ cy.get('button[data-test-subj="cy-keypad-button-2"]').should('have.class', 'euiKeyPadMenuItem-isSelected');
144
+ cy.get('button[data-test-subj="cy-keypad-button-3"]').should('not.have.class', 'euiKeyPadMenuItem-isSelected');
145
+ cy.checkAxe();
146
+ });
147
+ });
148
+ });
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalShorthandCSS, euiFontSize, mathWithUnits } from '../../global_styling';
9
+ import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
10
10
  /**
11
11
  * Mixins
12
12
  */
@@ -20,16 +20,13 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
20
20
  var measurement = options.measurement;
21
21
  var lineHeightSize = measurement === 'em' ? "".concat(lineHeight, "em") : lineHeight; // Custom scales
22
22
 
23
- var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
24
- return x / 4;
25
- });
26
23
  var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
27
24
  return x / 4;
28
25
  });
29
26
  var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
30
27
  return x / 2;
31
28
  });
32
- return "\n .euiMarkdownFormat__blockquote {\n ".concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\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 ");
29
+ 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 ");
33
30
  };
34
31
  /**
35
32
  * Styles
@@ -471,13 +471,13 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
471
471
  panel = ___EmotionJSX(EuiPortal, {
472
472
  insert: insert
473
473
  }, ___EmotionJSX(EuiFocusTrap, _extends({
474
- clickOutsideDisables: true
474
+ clickOutsideDisables: true,
475
+ onClickOutside: this.onClickOutside
475
476
  }, focusTrapProps, {
476
477
  returnFocus: returnFocus // Ignore temporary state of indecisive focus
477
478
  ,
478
479
  initialFocus: initialFocus,
479
480
  onDeactivation: onTrapDeactivation,
480
- onClickOutside: this.onClickOutside,
481
481
  onEscapeKey: this.onEscapeKey,
482
482
  disabled: !ownFocus || !this.state.isOpenStable || this.state.isClosing
483
483
  }), ___EmotionJSX(EuiPopoverPanel, _extends({}, panelProps, {
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
9
+ import { logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
10
10
  import { euiLinkCSS } from '../link/link.styles';
11
11
  import { euiTitle } from '../title/title.styles';
12
12
  /**
@@ -50,7 +50,10 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
50
50
  return x * 2;
51
51
  });
52
52
  var headingMarginBottom = marginSize;
53
- return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n padding: ").concat(lineHeightSize, ";\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
53
+ var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
54
+ return x / 4;
55
+ });
56
+ return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n ").concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
54
57
  _customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n // ensures when only one character the shape looks like a square\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
55
58
  };
56
59
  /**
@@ -61,7 +64,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
61
64
  export var euiTextStyles = function euiTextStyles(euiThemeContext) {
62
65
  var euiTheme = euiThemeContext.euiTheme;
63
66
  return {
64
- euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", logicalTextAlignCSS('center'), " ", logicalCSS('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", logicalCSS('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", logicalCSS('height', euiTheme.border.width.thick), " ", logicalCSS('width', '50%'), " ", logicalCSS('left', '25%'), " ", logicalCSS('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", logicalCSS('top', '0'), ";}&:after{", logicalCSS('bottom', '0'), ";}}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
67
+ euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote{border-inline-start-color:", euiTheme.border.color, ";border-inline-start-style:solid;}blockquote:not(.euiMarkdownFormat__blockquote){color:", euiTheme.colors.subduedText, ";}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
65
68
  return x / 2;
66
69
  }), ";};label:euiText;"),
67
70
  constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
@@ -7,7 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
10
+ var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll"];
11
11
 
12
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
13
 
@@ -228,18 +228,32 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
228
228
  key: "componentDidMount",
229
229
  value: function componentDidMount() {
230
230
  this._isMounted = true;
231
+
232
+ if (this.props.repositionOnScroll) {
233
+ window.addEventListener('scroll', this.positionToolTip, true);
234
+ }
231
235
  }
232
236
  }, {
233
237
  key: "componentWillUnmount",
234
238
  value: function componentWillUnmount() {
235
239
  this.clearAnimationTimeout();
236
240
  this._isMounted = false;
241
+ window.removeEventListener('scroll', this.positionToolTip, true);
237
242
  }
238
243
  }, {
239
244
  key: "componentDidUpdate",
240
245
  value: function componentDidUpdate(prevProps, prevState) {
241
246
  if (prevState.visible === false && this.state.visible === true) {
242
247
  requestAnimationFrame(this.testAnchor);
248
+ } // update scroll listener
249
+
250
+
251
+ if (prevProps.repositionOnScroll !== this.props.repositionOnScroll) {
252
+ if (this.props.repositionOnScroll) {
253
+ window.addEventListener('scroll', this.positionToolTip, true);
254
+ } else {
255
+ window.removeEventListener('scroll', this.positionToolTip, true);
256
+ }
243
257
  }
244
258
  }
245
259
  }, {
@@ -254,6 +268,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
254
268
  title = _this$props.title,
255
269
  delay = _this$props.delay,
256
270
  display = _this$props.display,
271
+ repositionOnScroll = _this$props.repositionOnScroll,
257
272
  rest = _objectWithoutProperties(_this$props, _excluded);
258
273
 
259
274
  var _this$state = this.state,
@@ -50,7 +50,7 @@ export var euiTourHeaderStyles = function euiTourHeaderStyles(_ref3) {
50
50
  euiTourHeader: /*#__PURE__*/css(logicalCSS('border-bottom', 'none'), ";", logicalCSS('margin-bottom', euiTheme.size.s), ";;label:euiTourHeader;"),
51
51
  // Elements
52
52
  euiTourHeader__title: /*#__PURE__*/css(logicalCSS('margin-top', 0), ";;label:euiTourHeader__title;"),
53
- euiTourHeader__subtitle: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";;label:euiTourHeader__subtitle;")
53
+ euiTourHeader__subtitle: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";padding-block-end:", euiTheme.size.xs, ";;label:euiTourHeader__subtitle;")
54
54
  };
55
55
  };
56
56
  export var euiTourFooterStyles = function euiTourFooterStyles(_ref4) {
@@ -97,4 +97,13 @@ export var lightness = function lightness(color) {
97
97
 
98
98
  export var darken = function darken(color, amount) {
99
99
  return chroma(color).darken(amount).hex();
100
+ };
101
+ /**
102
+ * Returns the brighten value of a color. 0-100
103
+ * @param color - Color to manipulate
104
+ * @param amount - Amount to change in absolute terms. 0-1.
105
+ */
106
+
107
+ export var brighten = function brighten(color, amount) {
108
+ return chroma(color).brighten(amount).hex();
100
109
  };
@@ -7,25 +7,25 @@
7
7
  */
8
8
  // Export all keys under a `keys` named variable
9
9
  import * as keys from './keys';
10
- export { keys };
11
10
  export { accessibleClickKeys, cascadingMenuKeys, comboBoxKeys, htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
12
- export { LEFT_ALIGNMENT, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from './alignment';
13
- export { useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint, CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint } from './breakpoint';
14
- export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, darken, makeHighContrastColor, makeDisabledContrastColor, wcagContrastMin } from './color';
11
+ export { CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from './alignment';
12
+ export { CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint, useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint } from './breakpoint';
13
+ export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplimentary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteNegative, euiPalettePositive, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, wcagContrastMin } from './color';
15
14
  export { useColorPickerState, useColorStopsState } from './color_picker';
16
15
  export * from './console';
17
16
  export { copyToClipboard } from './copy_to_clipboard';
18
17
  export * from './findElement';
19
- export { formatAuto, formatBoolean, formatDate, formatNumber, formatText, dateFormatAliases } from './format';
18
+ export { dateFormatAliases, formatAuto, formatBoolean, formatDate, formatNumber, formatText } from './format';
19
+ export * from './hooks';
20
20
  export { isEvenlyDivisibleBy, isWithinRange } from './number';
21
21
  export { Pager } from './paging';
22
+ export { calculatePopoverPosition, findPopoverPosition } from './popover';
22
23
  export { Random } from './random';
23
24
  export { getSecureRelForTarget } from './security';
24
- export { toSentenceCase, toInitials, slugify } from './string';
25
- export { PropertySortType, SortDirectionType, SortDirection, SortableProperties, Comparators } from './sort';
26
- export { calculatePopoverPosition, findPopoverPosition } from './popover';
25
+ export { Comparators, PropertySortType, SortableProperties, SortDirection, SortDirectionType } from './sort';
26
+ export { slugify, toInitials, toSentenceCase } from './string';
27
+ export * from './theme';
28
+ export { throttle } from './throttle';
27
29
  export { getDurationAndPerformOnFrame, getTransitionTimings, getWaitDuration, performOnFrame } from './transition';
28
30
  export { EuiWindowEvent } from './window_event';
29
- export * from './hooks';
30
- export { throttle } from './throttle';
31
- export * from './theme';
31
+ export { keys };
@@ -242,7 +242,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
242
242
  css: cssSpinnerStyles
243
243
  }), (0, _react2.jsx)(_text.EuiText, {
244
244
  size: "s"
245
- }, (0, _react2.jsx)("p", null, isLoadingMessage && isLoadingMessage !== true ? isLoadingMessage : (0, _react2.jsx)(_i18n.EuiI18n, {
245
+ }, (0, _react2.jsx)("p", null, isLoadingMessage !== true ? isLoadingMessage : (0, _react2.jsx)(_i18n.EuiI18n, {
246
246
  token: "euiAccordion.isLoading",
247
247
  default: "Loading"
248
248
  }))));