@elastic/eui 102.0.0 → 102.1.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 (136) hide show
  1. package/es/components/accessibility/skip_link/skip_link.js +7 -0
  2. package/es/components/button/button.js +7 -0
  3. package/es/components/button/button_empty/button_empty.js +7 -0
  4. package/es/components/button/button_group/button_group.js +5 -0
  5. package/es/components/button/button_icon/button_icon.js +7 -0
  6. package/es/components/card/card.js +7 -0
  7. package/es/components/card/card_select/card_select.js +7 -0
  8. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  9. package/es/components/color_picker/color_picker.js +13 -8
  10. package/es/components/color_picker/hue.js +27 -6
  11. package/es/components/color_picker/hue.styles.js +3 -2
  12. package/es/components/color_picker/saturation.js +16 -11
  13. package/es/components/color_picker/saturation.styles.js +2 -1
  14. package/es/components/datagrid/body/cell/data_grid_cell.js +7 -0
  15. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  16. package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  17. package/es/components/datagrid/body/data_grid_body.js +7 -0
  18. package/es/components/datagrid/body/data_grid_body_custom.js +7 -0
  19. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  20. package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  21. package/es/components/datagrid/controls/column_sorting.js +7 -0
  22. package/es/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  23. package/es/components/datagrid/utils/in_memory.js +7 -0
  24. package/es/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  25. package/es/components/filter_group/filter_button.js +10 -1
  26. package/es/components/header/header_links/header_link.js +7 -0
  27. package/es/components/header/header_section/header_section_item_button.js +7 -0
  28. package/es/components/list_group/list_group.js +7 -0
  29. package/es/components/list_group/list_group_item.js +7 -0
  30. package/es/components/list_group/list_group_item_extra_action.js +7 -0
  31. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  32. package/es/components/pagination/pagination_button.js +7 -0
  33. package/es/components/table/table_header_cell.js +30 -12
  34. package/es/components/tool_tip/tool_tip.js +4 -1
  35. package/es/global_styling/mixins/_button.js +13 -3
  36. package/es/global_styling/mixins/_color.js +9 -2
  37. package/es/test/index.d.ts +2 -1
  38. package/eui.d.ts +828 -639
  39. package/lib/components/accessibility/skip_link/skip_link.js +7 -0
  40. package/lib/components/button/button.js +7 -0
  41. package/lib/components/button/button_empty/button_empty.js +7 -0
  42. package/lib/components/button/button_group/button_group.js +5 -0
  43. package/lib/components/button/button_icon/button_icon.js +7 -0
  44. package/lib/components/card/card.js +7 -0
  45. package/lib/components/card/card_select/card_select.js +7 -0
  46. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  47. package/lib/components/color_picker/color_picker.js +13 -8
  48. package/lib/components/color_picker/hue.js +26 -5
  49. package/lib/components/color_picker/hue.styles.js +3 -2
  50. package/lib/components/color_picker/saturation.js +16 -11
  51. package/lib/components/color_picker/saturation.styles.js +2 -1
  52. package/lib/components/datagrid/body/cell/data_grid_cell.js +7 -0
  53. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  54. package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  55. package/lib/components/datagrid/body/data_grid_body.js +7 -0
  56. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -0
  57. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  58. package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  59. package/lib/components/datagrid/controls/column_sorting.js +7 -0
  60. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  61. package/lib/components/datagrid/utils/in_memory.js +7 -0
  62. package/lib/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  63. package/lib/components/filter_group/filter_button.js +10 -1
  64. package/lib/components/header/header_links/header_link.js +7 -0
  65. package/lib/components/header/header_section/header_section_item_button.js +7 -0
  66. package/lib/components/list_group/list_group.js +7 -0
  67. package/lib/components/list_group/list_group_item.js +7 -0
  68. package/lib/components/list_group/list_group_item_extra_action.js +7 -0
  69. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  70. package/lib/components/pagination/pagination_button.js +7 -0
  71. package/lib/components/table/table_header_cell.js +28 -10
  72. package/lib/components/tool_tip/tool_tip.js +4 -1
  73. package/lib/global_styling/mixins/_button.js +13 -4
  74. package/lib/global_styling/mixins/_color.js +11 -4
  75. package/lib/test/index.d.ts +2 -1
  76. package/optimize/es/components/color_picker/color_picker.js +13 -8
  77. package/optimize/es/components/color_picker/hue.js +22 -6
  78. package/optimize/es/components/color_picker/hue.styles.js +3 -2
  79. package/optimize/es/components/color_picker/saturation.js +16 -11
  80. package/optimize/es/components/color_picker/saturation.styles.js +2 -1
  81. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  82. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  83. package/optimize/es/components/table/table_header_cell.js +26 -11
  84. package/optimize/es/components/tool_tip/tool_tip.js +4 -1
  85. package/optimize/es/global_styling/mixins/_button.js +8 -3
  86. package/optimize/es/global_styling/mixins/_color.js +4 -2
  87. package/optimize/es/test/index.d.ts +2 -1
  88. package/optimize/lib/components/color_picker/color_picker.js +13 -8
  89. package/optimize/lib/components/color_picker/hue.js +21 -5
  90. package/optimize/lib/components/color_picker/hue.styles.js +3 -2
  91. package/optimize/lib/components/color_picker/saturation.js +16 -11
  92. package/optimize/lib/components/color_picker/saturation.styles.js +2 -1
  93. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  94. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  95. package/optimize/lib/components/table/table_header_cell.js +25 -11
  96. package/optimize/lib/components/tool_tip/tool_tip.js +4 -1
  97. package/optimize/lib/global_styling/mixins/_button.js +8 -4
  98. package/optimize/lib/global_styling/mixins/_color.js +4 -2
  99. package/optimize/lib/test/index.d.ts +2 -1
  100. package/package.json +2 -2
  101. package/test-env/components/accessibility/skip_link/skip_link.js +7 -0
  102. package/test-env/components/button/button.js +7 -0
  103. package/test-env/components/button/button_empty/button_empty.js +7 -0
  104. package/test-env/components/button/button_group/button_group.js +5 -0
  105. package/test-env/components/button/button_icon/button_icon.js +7 -0
  106. package/test-env/components/card/card.js +7 -0
  107. package/test-env/components/card/card_select/card_select.js +7 -0
  108. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  109. package/test-env/components/color_picker/color_picker.js +13 -8
  110. package/test-env/components/color_picker/hue.js +21 -5
  111. package/test-env/components/color_picker/hue.styles.js +3 -2
  112. package/test-env/components/color_picker/saturation.js +16 -11
  113. package/test-env/components/color_picker/saturation.styles.js +2 -1
  114. package/test-env/components/datagrid/body/cell/data_grid_cell.js +7 -0
  115. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  116. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  117. package/test-env/components/datagrid/body/data_grid_body.js +7 -0
  118. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -0
  119. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  120. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  121. package/test-env/components/datagrid/controls/column_sorting.js +7 -0
  122. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  123. package/test-env/components/datagrid/utils/in_memory.js +7 -0
  124. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  125. package/test-env/components/filter_group/filter_button.js +10 -1
  126. package/test-env/components/header/header_links/header_link.js +7 -0
  127. package/test-env/components/header/header_section/header_section_item_button.js +7 -0
  128. package/test-env/components/list_group/list_group.js +7 -0
  129. package/test-env/components/list_group/list_group_item.js +7 -0
  130. package/test-env/components/list_group/list_group_item_extra_action.js +7 -0
  131. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  132. package/test-env/components/pagination/pagination_button.js +7 -0
  133. package/test-env/components/table/table_header_cell.js +26 -12
  134. package/test-env/components/tool_tip/tool_tip.js +4 -1
  135. package/test-env/global_styling/mixins/_button.js +8 -4
  136. package/test-env/global_styling/mixins/_color.js +4 -2
@@ -16,6 +16,7 @@ import { useEuiMemoizedStyles, keys, useEuiPaletteColorBlind } from '../../servi
16
16
  import { EuiFieldText, EuiFormControlLayout, EuiFormRow, EuiRange } from '../form';
17
17
  import { useEuiI18n } from '../i18n';
18
18
  import { EuiPopover } from '../popover';
19
+ import { EuiScreenReaderOnly } from '../accessibility';
19
20
  import { EuiColorPickerSwatch } from './color_picker_swatch';
20
21
  import { EuiHue } from './hue';
21
22
  import { EuiSaturation } from './saturation';
@@ -85,15 +86,16 @@ export var EuiColorPicker = function EuiColorPicker(_ref) {
85
86
  isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
86
87
  placeholder = _ref.placeholder,
87
88
  dataTestSubj = _ref['data-test-subj'];
88
- var _useEuiI18n = useEuiI18n(['euiColorPicker.popoverLabel', 'euiColorPicker.colorLabel', 'euiColorPicker.colorErrorMessage', 'euiColorPicker.transparent', 'euiColorPicker.alphaLabel', 'euiColorPicker.openLabel', 'euiColorPicker.closeLabel'], ['Color selection dialog', 'Color value', 'Invalid color value', 'Transparent', 'Alpha channel (opacity) value', 'Press the escape key to close the popover', 'Press the down key to open a popover containing color options']),
89
- _useEuiI18n2 = _slicedToArray(_useEuiI18n, 7),
89
+ var _useEuiI18n = useEuiI18n(['euiColorPicker.popoverLabel', 'euiColorPicker.colorLabel', 'euiColorPicker.selectedColorLabel', 'euiColorPicker.colorErrorMessage', 'euiColorPicker.transparent', 'euiColorPicker.alphaLabel', 'euiColorPicker.openLabel', 'euiColorPicker.closeLabel'], ['Color selection dialog', 'Color value', 'Selected color', 'Invalid color value', 'Transparent', 'Alpha channel (opacity) value', 'Press the escape key to close the popover', 'Press the down key to open a popover containing color options']),
90
+ _useEuiI18n2 = _slicedToArray(_useEuiI18n, 8),
90
91
  popoverLabel = _useEuiI18n2[0],
91
92
  colorLabel = _useEuiI18n2[1],
92
- colorErrorMessage = _useEuiI18n2[2],
93
- transparent = _useEuiI18n2[3],
94
- alphaLabel = _useEuiI18n2[4],
95
- openLabel = _useEuiI18n2[5],
96
- closeLabel = _useEuiI18n2[6];
93
+ selectedColorLabel = _useEuiI18n2[2],
94
+ colorErrorMessage = _useEuiI18n2[3],
95
+ transparent = _useEuiI18n2[4],
96
+ alphaLabel = _useEuiI18n2[5],
97
+ openLabel = _useEuiI18n2[6],
98
+ closeLabel = _useEuiI18n2[7];
97
99
  var defaultSwatches = useEuiPaletteColorBlind();
98
100
  var swatches = _swatches !== null && _swatches !== void 0 ? _swatches : defaultSwatches;
99
101
  var preferredFormat = useMemo(function () {
@@ -343,7 +345,10 @@ export var EuiColorPicker = function EuiColorPicker(_ref) {
343
345
  hex: chromaColor ? chromaColor.hex() : undefined,
344
346
  onChange: handleHueSelection,
345
347
  onKeyDown: handleOnKeyDown
346
- })), showSwatches && ___EmotionJSX("ul", {
348
+ }), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
349
+ "aria-live": "polite",
350
+ "aria-atomic": "true"
351
+ }, selectedColorLabel, ": ", chromaColor === null || chromaColor === void 0 ? void 0 : chromaColor.hex().toUpperCase()))), showSwatches && ___EmotionJSX("ul", {
347
352
  css: styles.euiColorPicker__swatches,
348
353
  className: "euiColorPicker__swatches"
349
354
  }, swatches.map(function (swatch, index) {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
  var _excluded = ["className", "hex", "hue", "id", "onChange"];
4
5
  /*
@@ -13,8 +14,9 @@ import React from 'react';
13
14
  import classNames from 'classnames';
14
15
  import { useEuiMemoizedStyles } from '../../services';
15
16
  import { EuiScreenReaderOnly } from '../accessibility';
16
- import { EuiI18n } from '../i18n';
17
+ import { EuiI18n, useEuiI18n } from '../i18n';
17
18
  import { euiHueStyles } from './hue.styles';
19
+ import { EuiToolTip } from '../tool_tip';
18
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
21
  var HUE_RANGE = 359;
20
22
  export var EuiHue = function EuiHue(_ref) {
@@ -27,9 +29,16 @@ export var EuiHue = function EuiHue(_ref) {
27
29
  rest = _objectWithoutProperties(_ref, _excluded);
28
30
  var classes = classNames('euiHue', className);
29
31
  var styles = useEuiMemoizedStyles(euiHueStyles);
32
+ var _useEuiI18n = useEuiI18n(['euiHue.ariaValueText', 'euiHue.ariaRoleDescription'], ['Hue', 'Hue slider']),
33
+ _useEuiI18n2 = _slicedToArray(_useEuiI18n, 2),
34
+ ariaValueText = _useEuiI18n2[0],
35
+ ariaRoleDescription = _useEuiI18n2[1];
30
36
  var handleChange = function handleChange(e) {
31
37
  onChange(Number(e.target.value));
32
38
  };
39
+ var hueValue = typeof hue === 'string' ? parseInt(hue) : hue;
40
+ // align the tooltip contextually closer to the thumb
41
+ var tooltipPosition = hueValue < Math.floor(HUE_RANGE / 2) ? 'left' : 'right';
33
42
  return ___EmotionJSX("div", {
34
43
  css: styles.euiHue,
35
44
  className: classes
@@ -38,9 +47,14 @@ export var EuiHue = function EuiHue(_ref) {
38
47
  }, ___EmotionJSX(EuiI18n, {
39
48
  token: "euiHue.label",
40
49
  default: "Select the HSV color mode 'hue' value"
41
- }))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
42
- "aria-live": "polite"
43
- }, hex)), ___EmotionJSX("input", _extends({
50
+ }))), ___EmotionJSX(EuiToolTip, {
51
+ content: hex,
52
+ anchorProps: {
53
+ css: styles.euiHue__tooltip
54
+ },
55
+ disableScreenReaderOutput: true,
56
+ position: tooltipPosition
57
+ }, ___EmotionJSX("input", _extends({
44
58
  id: "".concat(id, "-hue"),
45
59
  min: 0,
46
60
  max: HUE_RANGE,
@@ -49,6 +63,8 @@ export var EuiHue = function EuiHue(_ref) {
49
63
  css: styles.euiHue__range,
50
64
  className: "euiHue__range",
51
65
  value: hue,
52
- onChange: handleChange
53
- }, rest)));
66
+ onChange: handleChange,
67
+ "aria-roledescription": ariaRoleDescription,
68
+ "aria-valuetext": "".concat(ariaValueText, " ").concat(hue, "\xB0")
69
+ }, rest))));
54
70
  };
@@ -26,9 +26,10 @@ export var euiHueStyles = function euiHueStyles(euiThemeContext) {
26
26
  preferred: "border: ".concat(euiTheme.border.thin, ";"),
27
27
  forced: preventForcedColors(euiThemeContext)
28
28
  }), ";;label:euiHue;"),
29
- euiHue__range: /*#__PURE__*/css(logicalCSS('height', thumbSize), logicalCSS('width', "calc(100% + 2px)"), logicalCSS('margin-horizontal', '-1px'), " ", logicalCSS('margin-top', mathWithUnits(height, function (x) {
29
+ euiHue__tooltip: /*#__PURE__*/css(logicalCSS('height', thumbSize), logicalCSS('width', "calc(100% + 2px)"), logicalCSS('margin-horizontal', '-1px'), " ", logicalCSS('margin-top', mathWithUnits(height, function (x) {
30
30
  return x / -2;
31
- })), "appearance:none;background:transparent;&::-webkit-slider-thumb{-webkit-appearance:none;}", euiRangeThumbPerBrowser("\n ".concat(euiRangeThumbStyle(euiThemeContext), "\n border-width: ").concat(thumbBorder, ";\n\n ").concat(highContrastModeStyles(euiThemeContext, {
31
+ })), ";;label:euiHue__tooltip;"),
32
+ euiHue__range: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", logicalCSS('width', '100%'), "appearance:none;background:transparent;&::-webkit-slider-thumb{-webkit-appearance:none;}", euiRangeThumbPerBrowser("\n ".concat(euiRangeThumbStyle(euiThemeContext), "\n border-width: ").concat(thumbBorder, ";\n\n ").concat(highContrastModeStyles(euiThemeContext, {
32
33
  none: "\n background-color: transparent;\n box-shadow: ".concat(thumbBoxShadow, ";\n "),
33
34
  preferred: "\n background-color: ".concat(euiTheme.colors.ghost, ";\n border: ").concat(thumbBorder, " solid ").concat(euiTheme.colors.ink, ";\n box-shadow: none;\n ")
34
35
  }), "\n ")), "&:focus{outline:none;}", highContrastModeStyles(euiThemeContext, {
@@ -19,6 +19,7 @@ import { keys, useMouseMove, useEuiMemoizedStyles, useGeneratedHtmlId } from '..
19
19
  import { isNil } from '../../services/predicate';
20
20
  import { logicalStyles } from '../../global_styling';
21
21
  import { useEuiI18n } from '../i18n';
22
+ import { EuiToolTip } from '../tool_tip';
22
23
  import { getEventPosition } from './utils';
23
24
  import { euiSaturationStyles } from './saturation.styles';
24
25
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -41,10 +42,11 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
41
42
  });
42
43
  var instructionsId = "".concat(id, "-instructions");
43
44
  var indicatorId = "".concat(id, "-saturationIndicator");
44
- var _useEuiI18n = useEuiI18n(['euiSaturation.ariaLabel', 'euiSaturation.screenReaderInstructions'], ['HSV color mode saturation and value 2-axis slider', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
45
- _useEuiI18n2 = _slicedToArray(_useEuiI18n, 2),
46
- roleDescString = _useEuiI18n2[0],
47
- instructionsString = _useEuiI18n2[1];
45
+ var _useEuiI18n = useEuiI18n(['euiSaturation.ariaLabel', 'euiSaturation.roleDescription', 'euiSaturation.screenReaderInstructions'], ['Select a color', 'HSV color mode saturation and value 2-axis slider.', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
46
+ _useEuiI18n2 = _slicedToArray(_useEuiI18n, 3),
47
+ ariaLabel = _useEuiI18n2[0],
48
+ roleDescString = _useEuiI18n2[1],
49
+ instructionsString = _useEuiI18n2[2];
48
50
  var _useState = useState({
49
51
  left: 0,
50
52
  top: 0
@@ -166,18 +168,21 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
166
168
  }, ___EmotionJSX("div", {
167
169
  css: styles.euiSaturation__saturation,
168
170
  className: "euiSaturation__saturation"
169
- })), ___EmotionJSX("button", {
171
+ })), ___EmotionJSX(EuiToolTip, {
172
+ content: hex,
173
+ anchorProps: {
174
+ css: styles.euiSaturation__tooltip,
175
+ style: logicalStyles(indicator)
176
+ },
177
+ disableScreenReaderOutput: true // required to prevent verbose screen reader output
178
+ }, ___EmotionJSX("button", {
170
179
  id: indicatorId,
171
180
  css: styles.euiSaturation__indicator,
172
181
  className: "euiSaturation__indicator",
173
- style: logicalStyles(indicator),
174
182
  "aria-roledescription": roleDescString,
175
- "aria-label": hex,
183
+ "aria-label": ariaLabel,
176
184
  "aria-describedby": instructionsId
177
- }), ___EmotionJSX("span", {
178
- hidden: true,
179
- "aria-live": "assertive"
180
- }, hex), ___EmotionJSX("span", {
185
+ })), ___EmotionJSX("span", {
181
186
  hidden: true,
182
187
  id: instructionsId
183
188
  }, instructionsString));
@@ -30,7 +30,8 @@ export var euiSaturationStyles = function euiSaturationStyles(euiThemeContext) {
30
30
  }), ";;label:euiSaturation;"),
31
31
  euiSaturation__lightness: /*#__PURE__*/css("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(\n to right,\n rgba(255, 255, 255, 1),\n rgba(255, 255, 255, 0)\n );;label:euiSaturation__lightness;"),
32
32
  euiSaturation__saturation: /*#__PURE__*/css("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));;label:euiSaturation__saturation;"),
33
- euiSaturation__indicator: /*#__PURE__*/css("z-index:2;position:absolute;", logicalSizeCSS(indicatorSize), " transform:translateX(-50%) translateY(-50%);border-radius:100%;", highContrastModeStyles(euiThemeContext, {
33
+ euiSaturation__tooltip: /*#__PURE__*/css("z-index:2;position:absolute;", logicalSizeCSS(indicatorSize), " transform:translateX(-50%) translateY(-50%);border-radius:100%;;label:euiSaturation__tooltip;"),
34
+ euiSaturation__indicator: /*#__PURE__*/css("position:absolute;inset:0;", logicalSizeCSS(indicatorSize), " border-radius:100%;", highContrastModeStyles(euiThemeContext, {
34
35
  none: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.darkestShade, ";\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: ").concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.lightestShade, ";\n }\n "),
35
36
  preferred: "\n border: ".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.ink, ";\n background-color: ").concat(euiTheme.colors.ghost, ";\n ")
36
37
  }), ";;label:euiSaturation__indicator;")
@@ -42,8 +42,8 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
42
42
  "data-test-subj": "euiDataGridCellExpandButton",
43
43
  display: "fill",
44
44
  color: "primary",
45
- iconSize: "m",
46
- iconType: "expandMini",
45
+ iconSize: "s",
46
+ iconType: "expand",
47
47
  "aria-hidden": true,
48
48
  onClick: onExpandClick,
49
49
  title: expandButtonTitle
@@ -28,7 +28,7 @@ export var euiDataGridCellActionsStyles = function euiDataGridCellActionsStyles(
28
28
  })), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
29
29
  euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.base), " ", logicalCSS('height', mathWithUnits([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
30
30
  return x + y;
31
- })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}&.euiDataGridRowCell__expandCell .euiIcon{", logicalCSS('width', '120%'), " ", logicalCSS('height', '100%'), ";}", highContrastModeStyles(euiThemeContext, {
31
+ })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}", highContrastModeStyles(euiThemeContext, {
32
32
  preferred: 'border: none;'
33
33
  }), ";;label:euiDataGridRowCell__actionButtonIcon;")
34
34
  };
@@ -1,6 +1,9 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  var _excluded = ["children", "align", "onSort", "isSorted", "isSortAscending", "className", "scope", "mobileOptions", "width", "style", "readOnly", "tooltipProps", "description", "append"];
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
7
  /*
5
8
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
9
  * or more contributor license agreements. Licensed under the Elastic License
@@ -16,7 +19,7 @@ import { EuiI18n } from '../i18n';
16
19
  import { EuiScreenReaderOnly } from '../accessibility';
17
20
  import { EuiIcon } from '../icon';
18
21
  import { EuiInnerText } from '../inner_text';
19
- import { EuiIconTip } from '../tool_tip';
22
+ import { EuiIconTip, EuiToolTip } from '../tool_tip';
20
23
  import { resolveWidthAsStyle } from './utils';
21
24
  import { useEuiTableIsResponsive } from './mobile/responsive_context';
22
25
  import { EuiTableCellContent } from './_table_cell_content';
@@ -31,6 +34,21 @@ var CellContents = function CellContents(_ref) {
31
34
  canSort = _ref.canSort,
32
35
  isSorted = _ref.isSorted,
33
36
  isSortAscending = _ref.isSortAscending;
37
+ var tooltipIcon = tooltipProps ? canSort ? ___EmotionJSX(EuiIcon, _extends({
38
+ className: "euiTableSortIcon",
39
+ type: tooltipProps.icon || 'questionInCircle',
40
+ size: "m",
41
+ color: "subdued"
42
+ }, tooltipProps.iconProps)) : ___EmotionJSX(EuiIconTip, _extends({
43
+ content: tooltipProps.content,
44
+ type: tooltipProps.icon || 'questionInCircle',
45
+ size: "m",
46
+ color: "subdued",
47
+ position: "top",
48
+ iconProps: _objectSpread({
49
+ role: 'button'
50
+ }, tooltipProps.iconProps)
51
+ }, tooltipProps.tooltipProps)) : null;
34
52
  return ___EmotionJSX(EuiTableCellContent, {
35
53
  className: className,
36
54
  align: align,
@@ -51,14 +69,7 @@ var CellContents = function CellContents(_ref) {
51
69
  className: "eui-textTruncate"
52
70
  }, children);
53
71
  });
54
- }), description && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, description)), tooltipProps && ___EmotionJSX(EuiIconTip, _extends({
55
- content: tooltipProps.content,
56
- type: tooltipProps.icon || 'questionInCircle',
57
- size: "m",
58
- color: "subdued",
59
- position: "top",
60
- iconProps: tooltipProps.iconProps
61
- }, tooltipProps.tooltipProps)), isSorted ? ___EmotionJSX(EuiIcon, {
72
+ }), description && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, description)), tooltipIcon, isSorted ? ___EmotionJSX(EuiIcon, {
62
73
  className: "euiTableSortIcon",
63
74
  type: isSortAscending ? 'sortUp' : 'sortDown',
64
75
  size: "m"
@@ -120,7 +131,11 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
120
131
  role: "columnheader",
121
132
  "aria-sort": ariaSortValue,
122
133
  style: inlineStyles
123
- }, rest), canSort ? ___EmotionJSX("button", {
134
+ }, rest), canSort ? ___EmotionJSX(EuiToolTip, _extends({
135
+ content: tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content
136
+ }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.tooltipProps, {
137
+ display: "block"
138
+ }), ___EmotionJSX("button", {
124
139
  type: "button",
125
140
  css: styles.euiTableHeaderCell__button,
126
141
  className: classNames('euiTableHeaderButton', {
@@ -128,5 +143,5 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
128
143
  }),
129
144
  onClick: onSort,
130
145
  "data-test-subj": "tableHeaderSortButton"
131
- }, ___EmotionJSX(CellContents, cellContentsProps)) : ___EmotionJSX(CellContents, cellContentsProps), append);
146
+ }, ___EmotionJSX(CellContents, cellContentsProps))) : ___EmotionJSX(CellContents, cellContentsProps), append);
132
147
  };
@@ -171,7 +171,10 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
171
171
  });
172
172
  _defineProperty(_this, "onEscapeKey", function (event) {
173
173
  if (event.key === keys.ESCAPE) {
174
- if (_this.state.visible) event.stopPropagation();
174
+ // when the tooltip is only visual, we don't want it to add an additional key stop
175
+ if (!_this.props.disableScreenReaderOutput) {
176
+ if (_this.state.visible) event.stopPropagation();
177
+ }
175
178
  _this.setState({
176
179
  hasFocus: false
177
180
  }); // Allows mousing over back into the tooltip to work correctly
@@ -1,4 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
4
  var _templateObject;
4
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -14,7 +15,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
14
15
  import { css, keyframes } from '@emotion/react';
15
16
  import { getTokenName, euiCanAnimate } from '@elastic/eui-theme-common';
16
17
  import { makeHighContrastColor, useEuiMemoizedStyles } from '../../services';
17
- export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
18
+
19
+ /** Tentative usage; these exist only to be used as button directly when used within other components */
20
+ export var SEVERITY_COLORS = ['neutral', 'risk'];
21
+ export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
22
+ export var EXTENDED_BUTTON_COLORS = [].concat(BUTTON_COLORS, SEVERITY_COLORS);
18
23
  export var BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
19
24
  /**
20
25
  * Creates the `base` version of button styles with proper text contrast.
@@ -86,7 +91,7 @@ export var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, c
86
91
  /**
87
92
  * Given the button display type, returns the Emotion based color keys.
88
93
  * @param options Button display type
89
- * @returns An object of `_EuiButtonColor` keys including `disabled`
94
+ * @returns An object of `_EuiExtendedButtonColor` keys including `disabled`
90
95
  */
91
96
  export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
92
97
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -96,7 +101,7 @@ export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
96
101
  return colorsDisplaysMap[display];
97
102
  };
98
103
  var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
99
- var COLORS = [].concat(BUTTON_COLORS, ['disabled']);
104
+ var COLORS = [].concat(_toConsumableArray(EXTENDED_BUTTON_COLORS), ['disabled']);
100
105
  var displaysColorsMap = {};
101
106
  BUTTON_DISPLAYS.forEach(function (display) {
102
107
  displaysColorsMap[display] = {};
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
5
  /*
@@ -10,9 +11,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
11
  */
11
12
 
12
13
  import { css } from '@emotion/react';
13
- import { useEuiMemoizedStyles } from '../../services';
14
14
  import { getTokenName } from '@elastic/eui-theme-common';
15
- export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
15
+ import { useEuiMemoizedStyles } from '../../services';
16
+ import { SEVERITY_COLORS } from './_button';
17
+ export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'].concat(_toConsumableArray(SEVERITY_COLORS));
16
18
  /**
17
19
  * @deprecated - use background tokens directly
18
20
  * @returns A single background color with optional alpha transparency
@@ -24,7 +24,8 @@ declare module '@elastic/eui/optimize/es/test/take_mounted_snapshot' {
24
24
 
25
25
  }
26
26
  declare module '@elastic/eui/optimize/es/test/find_test_subject' {
27
- import { ReactWrapper, ShallowWrapper } from 'enzyme'; const MATCHERS: readonly ["=", "~=", "|=", "^=", "$=", "*="]; type FindTestSubject<T extends ShallowWrapper | ReactWrapper> = (mountedComponent: T, testSubjectSelector: string, matcher?: (typeof MATCHERS)[number]) => ReturnType<T['find']>;
27
+ import { ReactWrapper, ShallowWrapper } from 'enzyme'; const MATCHERS: readonly ["=", "~=", "|=", "^=", "$=", "*="];
28
+ type FindTestSubject<T extends ShallowWrapper | ReactWrapper> = (mountedComponent: T, testSubjectSelector: string, matcher?: (typeof MATCHERS)[number]) => ReturnType<T['find']>;
28
29
  export const findTestSubject: FindTestSubject<ShallowWrapper<any> | ReactWrapper<any>>;
29
30
  export {};
30
31
 
@@ -16,6 +16,7 @@ var _services = require("../../services");
16
16
  var _form = require("../form");
17
17
  var _i18n = require("../i18n");
18
18
  var _popover = require("../popover");
19
+ var _accessibility = require("../accessibility");
19
20
  var _color_picker_swatch = require("./color_picker_swatch");
20
21
  var _hue = require("./hue");
21
22
  var _saturation = require("./saturation");
@@ -95,15 +96,16 @@ var EuiColorPicker = exports.EuiColorPicker = function EuiColorPicker(_ref) {
95
96
  isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
96
97
  placeholder = _ref.placeholder,
97
98
  dataTestSubj = _ref['data-test-subj'];
98
- var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiColorPicker.popoverLabel', 'euiColorPicker.colorLabel', 'euiColorPicker.colorErrorMessage', 'euiColorPicker.transparent', 'euiColorPicker.alphaLabel', 'euiColorPicker.openLabel', 'euiColorPicker.closeLabel'], ['Color selection dialog', 'Color value', 'Invalid color value', 'Transparent', 'Alpha channel (opacity) value', 'Press the escape key to close the popover', 'Press the down key to open a popover containing color options']),
99
- _useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 7),
99
+ var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiColorPicker.popoverLabel', 'euiColorPicker.colorLabel', 'euiColorPicker.selectedColorLabel', 'euiColorPicker.colorErrorMessage', 'euiColorPicker.transparent', 'euiColorPicker.alphaLabel', 'euiColorPicker.openLabel', 'euiColorPicker.closeLabel'], ['Color selection dialog', 'Color value', 'Selected color', 'Invalid color value', 'Transparent', 'Alpha channel (opacity) value', 'Press the escape key to close the popover', 'Press the down key to open a popover containing color options']),
100
+ _useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 8),
100
101
  popoverLabel = _useEuiI18n2[0],
101
102
  colorLabel = _useEuiI18n2[1],
102
- colorErrorMessage = _useEuiI18n2[2],
103
- transparent = _useEuiI18n2[3],
104
- alphaLabel = _useEuiI18n2[4],
105
- openLabel = _useEuiI18n2[5],
106
- closeLabel = _useEuiI18n2[6];
103
+ selectedColorLabel = _useEuiI18n2[2],
104
+ colorErrorMessage = _useEuiI18n2[3],
105
+ transparent = _useEuiI18n2[4],
106
+ alphaLabel = _useEuiI18n2[5],
107
+ openLabel = _useEuiI18n2[6],
108
+ closeLabel = _useEuiI18n2[7];
107
109
  var defaultSwatches = (0, _services.useEuiPaletteColorBlind)();
108
110
  var swatches = _swatches !== null && _swatches !== void 0 ? _swatches : defaultSwatches;
109
111
  var preferredFormat = (0, _react.useMemo)(function () {
@@ -353,7 +355,10 @@ var EuiColorPicker = exports.EuiColorPicker = function EuiColorPicker(_ref) {
353
355
  hex: chromaColor ? chromaColor.hex() : undefined,
354
356
  onChange: handleHueSelection,
355
357
  onKeyDown: handleOnKeyDown
356
- })), showSwatches && (0, _react2.jsx)("ul", {
358
+ }), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
359
+ "aria-live": "polite",
360
+ "aria-atomic": "true"
361
+ }, selectedColorLabel, ": ", chromaColor === null || chromaColor === void 0 ? void 0 : chromaColor.hex().toUpperCase()))), showSwatches && (0, _react2.jsx)("ul", {
357
362
  css: styles.euiColorPicker__swatches,
358
363
  className: "euiColorPicker__swatches"
359
364
  }, swatches.map(function (swatch, index) {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.EuiHue = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
11
  var _react = _interopRequireDefault(require("react"));
11
12
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -13,6 +14,7 @@ var _services = require("../../services");
13
14
  var _accessibility = require("../accessibility");
14
15
  var _i18n = require("../i18n");
15
16
  var _hue = require("./hue.styles");
17
+ var _tool_tip = require("../tool_tip");
16
18
  var _react2 = require("@emotion/react");
17
19
  var _excluded = ["className", "hex", "hue", "id", "onChange"];
18
20
  /*
@@ -33,9 +35,16 @@ var EuiHue = exports.EuiHue = function EuiHue(_ref) {
33
35
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
36
  var classes = (0, _classnames.default)('euiHue', className);
35
37
  var styles = (0, _services.useEuiMemoizedStyles)(_hue.euiHueStyles);
38
+ var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiHue.ariaValueText', 'euiHue.ariaRoleDescription'], ['Hue', 'Hue slider']),
39
+ _useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 2),
40
+ ariaValueText = _useEuiI18n2[0],
41
+ ariaRoleDescription = _useEuiI18n2[1];
36
42
  var handleChange = function handleChange(e) {
37
43
  onChange(Number(e.target.value));
38
44
  };
45
+ var hueValue = typeof hue === 'string' ? parseInt(hue) : hue;
46
+ // align the tooltip contextually closer to the thumb
47
+ var tooltipPosition = hueValue < Math.floor(HUE_RANGE / 2) ? 'left' : 'right';
39
48
  return (0, _react2.jsx)("div", {
40
49
  css: styles.euiHue,
41
50
  className: classes
@@ -44,9 +53,14 @@ var EuiHue = exports.EuiHue = function EuiHue(_ref) {
44
53
  }, (0, _react2.jsx)(_i18n.EuiI18n, {
45
54
  token: "euiHue.label",
46
55
  default: "Select the HSV color mode 'hue' value"
47
- }))), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
48
- "aria-live": "polite"
49
- }, hex)), (0, _react2.jsx)("input", (0, _extends2.default)({
56
+ }))), (0, _react2.jsx)(_tool_tip.EuiToolTip, {
57
+ content: hex,
58
+ anchorProps: {
59
+ css: styles.euiHue__tooltip
60
+ },
61
+ disableScreenReaderOutput: true,
62
+ position: tooltipPosition
63
+ }, (0, _react2.jsx)("input", (0, _extends2.default)({
50
64
  id: "".concat(id, "-hue"),
51
65
  min: 0,
52
66
  max: HUE_RANGE,
@@ -55,6 +69,8 @@ var EuiHue = exports.EuiHue = function EuiHue(_ref) {
55
69
  css: styles.euiHue__range,
56
70
  className: "euiHue__range",
57
71
  value: hue,
58
- onChange: handleChange
59
- }, rest)));
72
+ onChange: handleChange,
73
+ "aria-roledescription": ariaRoleDescription,
74
+ "aria-valuetext": "".concat(ariaValueText, " ").concat(hue, "\xB0")
75
+ }, rest))));
60
76
  };
@@ -32,9 +32,10 @@ var euiHueStyles = exports.euiHueStyles = function euiHueStyles(euiThemeContext)
32
32
  preferred: "border: ".concat(euiTheme.border.thin, ";"),
33
33
  forced: (0, _high_contrast.preventForcedColors)(euiThemeContext)
34
34
  }), ";;label:euiHue;"),
35
- euiHue__range: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', thumbSize), (0, _global_styling.logicalCSS)('width', "calc(100% + 2px)"), (0, _global_styling.logicalCSS)('margin-horizontal', '-1px'), " ", (0, _global_styling.logicalCSS)('margin-top', (0, _global_styling.mathWithUnits)(height, function (x) {
35
+ euiHue__tooltip: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', thumbSize), (0, _global_styling.logicalCSS)('width', "calc(100% + 2px)"), (0, _global_styling.logicalCSS)('margin-horizontal', '-1px'), " ", (0, _global_styling.logicalCSS)('margin-top', (0, _global_styling.mathWithUnits)(height, function (x) {
36
36
  return x / -2;
37
- })), "appearance:none;background:transparent;&::-webkit-slider-thumb{-webkit-appearance:none;}", (0, _range.euiRangeThumbPerBrowser)("\n ".concat((0, _range.euiRangeThumbStyle)(euiThemeContext), "\n border-width: ").concat(thumbBorder, ";\n\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
37
+ })), ";;label:euiHue__tooltip;"),
38
+ euiHue__range: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.logicalCSS)('width', '100%'), "appearance:none;background:transparent;&::-webkit-slider-thumb{-webkit-appearance:none;}", (0, _range.euiRangeThumbPerBrowser)("\n ".concat((0, _range.euiRangeThumbStyle)(euiThemeContext), "\n border-width: ").concat(thumbBorder, ";\n\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
38
39
  none: "\n background-color: transparent;\n box-shadow: ".concat(thumbBoxShadow, ";\n "),
39
40
  preferred: "\n background-color: ".concat(euiTheme.colors.ghost, ";\n border: ").concat(thumbBorder, " solid ").concat(euiTheme.colors.ink, ";\n box-shadow: none;\n ")
40
41
  }), "\n ")), "&:focus{outline:none;}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
@@ -16,6 +16,7 @@ var _services = require("../../services");
16
16
  var _predicate = require("../../services/predicate");
17
17
  var _global_styling = require("../../global_styling");
18
18
  var _i18n = require("../i18n");
19
+ var _tool_tip = require("../tool_tip");
19
20
  var _utils = require("./utils");
20
21
  var _saturation = require("./saturation.styles");
21
22
  var _react2 = require("@emotion/react");
@@ -50,10 +51,11 @@ var EuiSaturation = exports.EuiSaturation = /*#__PURE__*/(0, _react.forwardRef)(
50
51
  });
51
52
  var instructionsId = "".concat(id, "-instructions");
52
53
  var indicatorId = "".concat(id, "-saturationIndicator");
53
- var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiSaturation.ariaLabel', 'euiSaturation.screenReaderInstructions'], ['HSV color mode saturation and value 2-axis slider', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
54
- _useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 2),
55
- roleDescString = _useEuiI18n2[0],
56
- instructionsString = _useEuiI18n2[1];
54
+ var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiSaturation.ariaLabel', 'euiSaturation.roleDescription', 'euiSaturation.screenReaderInstructions'], ['Select a color', 'HSV color mode saturation and value 2-axis slider.', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
55
+ _useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 3),
56
+ ariaLabel = _useEuiI18n2[0],
57
+ roleDescString = _useEuiI18n2[1],
58
+ instructionsString = _useEuiI18n2[2];
57
59
  var _useState = (0, _react.useState)({
58
60
  left: 0,
59
61
  top: 0
@@ -175,18 +177,21 @@ var EuiSaturation = exports.EuiSaturation = /*#__PURE__*/(0, _react.forwardRef)(
175
177
  }, (0, _react2.jsx)("div", {
176
178
  css: styles.euiSaturation__saturation,
177
179
  className: "euiSaturation__saturation"
178
- })), (0, _react2.jsx)("button", {
180
+ })), (0, _react2.jsx)(_tool_tip.EuiToolTip, {
181
+ content: hex,
182
+ anchorProps: {
183
+ css: styles.euiSaturation__tooltip,
184
+ style: (0, _global_styling.logicalStyles)(indicator)
185
+ },
186
+ disableScreenReaderOutput: true // required to prevent verbose screen reader output
187
+ }, (0, _react2.jsx)("button", {
179
188
  id: indicatorId,
180
189
  css: styles.euiSaturation__indicator,
181
190
  className: "euiSaturation__indicator",
182
- style: (0, _global_styling.logicalStyles)(indicator),
183
191
  "aria-roledescription": roleDescString,
184
- "aria-label": hex,
192
+ "aria-label": ariaLabel,
185
193
  "aria-describedby": instructionsId
186
- }), (0, _react2.jsx)("span", {
187
- hidden: true,
188
- "aria-live": "assertive"
189
- }, hex), (0, _react2.jsx)("span", {
194
+ })), (0, _react2.jsx)("span", {
190
195
  hidden: true,
191
196
  id: instructionsId
192
197
  }, instructionsString));
@@ -36,7 +36,8 @@ var euiSaturationStyles = exports.euiSaturationStyles = function euiSaturationSt
36
36
  }), ";;label:euiSaturation;"),
37
37
  euiSaturation__lightness: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(\n to right,\n rgba(255, 255, 255, 1),\n rgba(255, 255, 255, 0)\n );;label:euiSaturation__lightness;"),
38
38
  euiSaturation__saturation: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));;label:euiSaturation__saturation;"),
39
- euiSaturation__indicator: /*#__PURE__*/(0, _react.css)("z-index:2;position:absolute;", (0, _global_styling.logicalSizeCSS)(indicatorSize), " transform:translateX(-50%) translateY(-50%);border-radius:100%;", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
39
+ euiSaturation__tooltip: /*#__PURE__*/(0, _react.css)("z-index:2;position:absolute;", (0, _global_styling.logicalSizeCSS)(indicatorSize), " transform:translateX(-50%) translateY(-50%);border-radius:100%;;label:euiSaturation__tooltip;"),
40
+ euiSaturation__indicator: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;", (0, _global_styling.logicalSizeCSS)(indicatorSize), " border-radius:100%;", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
40
41
  none: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.darkestShade, ";\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: ").concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.lightestShade, ";\n }\n "),
41
42
  preferred: "\n border: ".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.ink, ";\n background-color: ").concat(euiTheme.colors.ghost, ";\n ")
42
43
  }), ";;label:euiSaturation__indicator;")
@@ -52,8 +52,8 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
52
52
  "data-test-subj": "euiDataGridCellExpandButton",
53
53
  display: "fill",
54
54
  color: "primary",
55
- iconSize: "m",
56
- iconType: "expandMini",
55
+ iconSize: "s",
56
+ iconType: "expand",
57
57
  "aria-hidden": true,
58
58
  onClick: onExpandClick,
59
59
  title: expandButtonTitle
@@ -34,7 +34,7 @@ var euiDataGridCellActionsStyles = exports.euiDataGridCellActionsStyles = functi
34
34
  })), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", _global_styling.euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
35
35
  euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
36
36
  return x + y;
37
- })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}&.euiDataGridRowCell__expandCell .euiIcon{", (0, _global_styling.logicalCSS)('width', '120%'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
37
+ })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
38
38
  preferred: 'border: none;'
39
39
  }), ";;label:euiDataGridRowCell__actionButtonIcon;")
40
40
  };