@elastic/eui 101.1.0 → 101.2.0-classic.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 (155) hide show
  1. package/es/components/badge/badge.styles.js +2 -2
  2. package/es/components/badge/color_utils.js +16 -6
  3. package/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
  4. package/es/components/basic_table/basic_table.js +11 -0
  5. package/es/components/basic_table/in_memory_table.js +11 -0
  6. package/es/components/code/code.styles.js +4 -2
  7. package/es/components/code/code_syntax.styles.js +6 -3
  8. package/es/components/color_picker/color_picker_swatch.js +85 -3
  9. package/es/components/color_picker/color_picker_swatch.styles.js +11 -1
  10. package/es/components/header/header.styles.js +4 -1
  11. package/es/components/panel/panel.styles.js +1 -1
  12. package/es/components/provider/provider.js +2 -2
  13. package/es/components/table/table_header_cell.js +9 -0
  14. package/es/components/toast/toast.styles.js +3 -3
  15. package/es/components/tool_tip/icon_tip.js +9 -0
  16. package/es/components/tool_tip/tool_tip.js +18 -4
  17. package/es/components/tool_tip/tool_tip_anchor.js +1 -1
  18. package/es/global_styling/mixins/_button.js +3 -2
  19. package/es/services/color/vis_color_store.js +1 -1
  20. package/es/services/theme/context.js +2 -2
  21. package/eui.d.ts +366 -327
  22. package/lib/components/badge/badge.styles.js +2 -2
  23. package/lib/components/badge/color_utils.js +16 -6
  24. package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
  25. package/lib/components/basic_table/basic_table.js +11 -0
  26. package/lib/components/basic_table/in_memory_table.js +11 -0
  27. package/lib/components/code/code.styles.js +3 -1
  28. package/lib/components/code/code_syntax.styles.js +6 -3
  29. package/lib/components/color_picker/color_picker_swatch.js +85 -3
  30. package/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
  31. package/lib/components/header/header.styles.js +4 -1
  32. package/lib/components/icon/svgs/aggregate.svg +0 -0
  33. package/lib/components/icon/svgs/color.svg +0 -0
  34. package/lib/components/icon/svgs/continuityAbove.svg +0 -0
  35. package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
  36. package/lib/components/icon/svgs/continuityBelow.svg +0 -0
  37. package/lib/components/icon/svgs/continuityWithin.svg +0 -0
  38. package/lib/components/icon/svgs/documentation.svg +0 -0
  39. package/lib/components/icon/svgs/eraser.svg +0 -0
  40. package/lib/components/icon/svgs/folder_check.svg +0 -0
  41. package/lib/components/icon/svgs/folder_closed.svg +0 -0
  42. package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
  43. package/lib/components/icon/svgs/folder_open.svg +0 -0
  44. package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
  45. package/lib/components/icon/svgs/function.svg +0 -0
  46. package/lib/components/icon/svgs/layers.svg +0 -0
  47. package/lib/components/icon/svgs/menu.svg +0 -0
  48. package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
  49. package/lib/components/icon/svgs/pageSelect.svg +0 -0
  50. package/lib/components/icon/svgs/pagesSelect.svg +0 -0
  51. package/lib/components/icon/svgs/percent.svg +0 -0
  52. package/lib/components/icon/svgs/push.svg +0 -0
  53. package/lib/components/icon/svgs/quote.svg +0 -0
  54. package/lib/components/icon/svgs/reporter.svg +0 -0
  55. package/lib/components/icon/svgs/securitySignal.svg +0 -0
  56. package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
  57. package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
  58. package/lib/components/icon/svgs/timeline.svg +0 -0
  59. package/lib/components/icon/svgs/users.svg +0 -0
  60. package/lib/components/icon/svgs/wordWrap.svg +0 -0
  61. package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
  62. package/lib/components/panel/panel.styles.js +1 -1
  63. package/lib/components/provider/provider.js +2 -2
  64. package/lib/components/table/table_header_cell.js +9 -0
  65. package/lib/components/toast/toast.styles.js +3 -3
  66. package/lib/components/tool_tip/icon_tip.js +9 -0
  67. package/lib/components/tool_tip/tool_tip.js +18 -4
  68. package/lib/components/tool_tip/tool_tip_anchor.js +1 -1
  69. package/lib/global_styling/mixins/_button.js +3 -2
  70. package/lib/services/color/vis_color_store.js +2 -2
  71. package/lib/services/theme/context.js +2 -2
  72. package/optimize/es/components/badge/badge.styles.js +2 -2
  73. package/optimize/es/components/badge/color_utils.js +16 -6
  74. package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
  75. package/optimize/es/components/code/code.styles.js +4 -2
  76. package/optimize/es/components/code/code_syntax.styles.js +6 -3
  77. package/optimize/es/components/color_picker/color_picker_swatch.js +18 -2
  78. package/optimize/es/components/color_picker/color_picker_swatch.styles.js +11 -1
  79. package/optimize/es/components/header/header.styles.js +4 -1
  80. package/optimize/es/components/panel/panel.styles.js +1 -1
  81. package/optimize/es/components/provider/provider.js +2 -2
  82. package/optimize/es/components/toast/toast.styles.js +3 -3
  83. package/optimize/es/components/tool_tip/tool_tip.js +9 -4
  84. package/optimize/es/components/tool_tip/tool_tip_anchor.js +1 -1
  85. package/optimize/es/global_styling/mixins/_button.js +3 -2
  86. package/optimize/es/services/color/vis_color_store.js +1 -1
  87. package/optimize/es/services/theme/context.js +2 -2
  88. package/optimize/lib/components/badge/badge.styles.js +2 -2
  89. package/optimize/lib/components/badge/color_utils.js +16 -6
  90. package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
  91. package/optimize/lib/components/code/code.styles.js +3 -1
  92. package/optimize/lib/components/code/code_syntax.styles.js +6 -3
  93. package/optimize/lib/components/color_picker/color_picker_swatch.js +18 -2
  94. package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
  95. package/optimize/lib/components/header/header.styles.js +4 -1
  96. package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
  97. package/optimize/lib/components/icon/svgs/color.svg +0 -0
  98. package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
  99. package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
  100. package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
  101. package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
  102. package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
  103. package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
  104. package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
  105. package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
  106. package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
  107. package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
  108. package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
  109. package/optimize/lib/components/icon/svgs/function.svg +0 -0
  110. package/optimize/lib/components/icon/svgs/layers.svg +0 -0
  111. package/optimize/lib/components/icon/svgs/menu.svg +0 -0
  112. package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
  113. package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
  114. package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
  115. package/optimize/lib/components/icon/svgs/percent.svg +0 -0
  116. package/optimize/lib/components/icon/svgs/push.svg +0 -0
  117. package/optimize/lib/components/icon/svgs/quote.svg +0 -0
  118. package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
  119. package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
  120. package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
  121. package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
  122. package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
  123. package/optimize/lib/components/icon/svgs/users.svg +0 -0
  124. package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
  125. package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
  126. package/optimize/lib/components/panel/panel.styles.js +1 -1
  127. package/optimize/lib/components/provider/provider.js +2 -2
  128. package/optimize/lib/components/toast/toast.styles.js +3 -3
  129. package/optimize/lib/components/tool_tip/tool_tip.js +9 -4
  130. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +1 -1
  131. package/optimize/lib/global_styling/mixins/_button.js +3 -2
  132. package/optimize/lib/services/color/vis_color_store.js +2 -2
  133. package/optimize/lib/services/theme/context.js +2 -2
  134. package/package.json +4 -4
  135. package/test-env/components/badge/badge.styles.js +2 -2
  136. package/test-env/components/badge/color_utils.js +16 -6
  137. package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -1
  138. package/test-env/components/basic_table/basic_table.js +11 -0
  139. package/test-env/components/basic_table/in_memory_table.js +11 -0
  140. package/test-env/components/code/code.styles.js +3 -1
  141. package/test-env/components/code/code_syntax.styles.js +6 -3
  142. package/test-env/components/color_picker/color_picker_swatch.js +85 -3
  143. package/test-env/components/color_picker/color_picker_swatch.styles.js +11 -3
  144. package/test-env/components/header/header.styles.js +4 -1
  145. package/test-env/components/panel/panel.styles.js +1 -1
  146. package/test-env/components/provider/provider.js +2 -2
  147. package/test-env/components/table/table_header_cell.js +9 -0
  148. package/test-env/components/toast/toast.styles.js +3 -3
  149. package/test-env/components/tool_tip/icon_tip.js +9 -0
  150. package/test-env/components/tool_tip/tool_tip.js +18 -4
  151. package/test-env/components/tool_tip/tool_tip_anchor.js +1 -1
  152. package/test-env/global_styling/mixins/_button.js +3 -2
  153. package/test-env/services/color/vis_color_store.js +2 -2
  154. package/test-env/services/theme/context.js +2 -2
  155. package/CHANGELOG.md +0 -5
@@ -34,14 +34,14 @@ export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
34
34
  }), ";", logicalTextAlignCSS('left'), "color:var(--euiBadgeTextColor, ", badgeColors.default.color, ");background-color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );*::selection{color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );background-color:var(\n --euiBadgeTextColor,\n ", badgeColors.default.color, "\n );}&:focus-within{", euiFocusRing(euiThemeContext), ";}&+.euiBadge{", logicalCSS('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
35
35
  clickable: /*#__PURE__*/css("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", euiFocusRing(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
36
36
  // Colors
37
- default: /*#__PURE__*/css(setBadgeColorVars(badgeColors.default), ";label:default;"),
37
+ default: /*#__PURE__*/css(setBadgeColorVars(badgeColors.default), " border-color:", badgeColors.default.borderColor, ";;label:default;"),
38
38
  hollow: /*#__PURE__*/css(setBadgeColorVars(badgeColors.hollow), " border-color:", badgeColors.hollow.borderColor, ";;label:hollow;"),
39
39
  primary: /*#__PURE__*/css(setBadgeColorVars(badgeColors.primary), ";label:primary;"),
40
40
  accent: /*#__PURE__*/css(setBadgeColorVars(badgeColors.accent), ";label:accent;"),
41
41
  warning: /*#__PURE__*/css(setBadgeColorVars(badgeColors.warning), ";label:warning;"),
42
42
  danger: /*#__PURE__*/css(setBadgeColorVars(badgeColors.danger), ";label:danger;"),
43
43
  success: /*#__PURE__*/css(setBadgeColorVars(badgeColors.success), ";label:success;"),
44
- disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), "*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
44
+ disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
45
45
  // Content wrapper
46
46
  euiBadge__content: /*#__PURE__*/css(logicalCSS(
47
47
  // Ensure proper height in case of just displaying an icon
@@ -23,7 +23,9 @@ import { isColorDark } from '../../services';
23
23
  import { euiButtonColor, euiButtonFillColor } from '../../global_styling/mixins/_button';
24
24
  import { chromaValid, parseColor } from '../color_picker/utils';
25
25
  export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
26
- var euiTheme = euiThemeContext.euiTheme;
26
+ var euiTheme = euiThemeContext.euiTheme,
27
+ highContrastMode = euiThemeContext.highContrastMode;
28
+ var badgeColorsAccentText = getBadgeColors(euiThemeContext, euiTheme.colors.textAccent);
27
29
  return {
28
30
  // Colors shared between buttons and badges
29
31
  primary: euiButtonFillColor(euiThemeContext, 'primary'),
@@ -32,16 +34,24 @@ export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
32
34
  danger: euiButtonFillColor(euiThemeContext, 'danger'),
33
35
  accent: euiButtonFillColor(euiThemeContext, 'accent'),
34
36
  accentSecondary: euiButtonFillColor(euiThemeContext, 'accentSecondary'),
35
- disabled: euiButtonColor(euiThemeContext, 'disabled'),
37
+ disabled: _objectSpread(_objectSpread({}, euiButtonColor(euiThemeContext, 'disabled')), {}, {
38
+ borderColor: highContrastMode ? euiTheme.colors.textDisabled : ''
39
+ }),
36
40
  // Colors unique to badges
37
- default: getBadgeColors(euiThemeContext, euiTheme.components.badgeBackground),
41
+ default: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.components.badgeBackground)), {}, {
42
+ borderColor: highContrastMode ? euiTheme.border.color : ''
43
+ }),
38
44
  // Hollow has a border and is used for autocompleters and beta badges
39
45
  hollow: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.colors.emptyShade)), {}, {
40
- borderColor: euiTheme.components.badgeBorderColorHollow
46
+ borderColor: highContrastMode ? euiTheme.border.color : euiTheme.components.badgeBorderColorHollow
41
47
  }),
42
48
  // Colors used by beta and notification badges
43
- subdued: getBadgeColors(euiThemeContext, euiTheme.components.badgeBackgroundSubdued),
44
- accentText: getBadgeColors(euiThemeContext, euiTheme.colors.textAccent),
49
+ subdued: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.components.badgeBackgroundSubdued)), {}, {
50
+ borderColor: highContrastMode ? euiTheme.border.color : ''
51
+ }),
52
+ accentText: _objectSpread(_objectSpread({}, badgeColorsAccentText), {}, {
53
+ borderColor: highContrastMode ? badgeColorsAccentText.backgroundColor : ''
54
+ }),
45
55
  accentSecondaryText: getBadgeColors(euiThemeContext, euiTheme.colors.textAccentSecondary)
46
56
  };
47
57
  };
@@ -15,7 +15,7 @@ export var euiNotificationBadgeStyles = function euiNotificationBadgeStyles(euiT
15
15
  var badgeColors = euiBadgeColors(euiThemeContext);
16
16
  return {
17
17
  euiNotificationBadge: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;", logicalCSS('padding-horizontal', euiTheme.size.xs), " border-radius:", euiTheme.border.radius.small, ";", highContrastModeStyles(euiThemeContext, {
18
- forced: "\n border: ".concat(euiTheme.border.thin, ";\n overflow: hidden; /* Fix text clipping */\n ")
18
+ preferred: "\n border: ".concat(euiTheme.border.thin, ";\n overflow: hidden; /* Fix text clipping */\n ")
19
19
  }), " cursor:default;font-size:", euiFontSizeFromScale('xs', euiTheme), ";font-weight:", euiTheme.font.weight.medium, ";", euiNumberFormat(euiThemeContext), " text-align:center;", euiCanAnimate, "{transition:all ", euiTheme.animation.fast, " ease-in;};label:euiNotificationBadge;"),
20
20
  // Sizes
21
21
  s: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.base), " ", logicalCSS('min-width', euiTheme.size.base), ";;label:s;"),
@@ -1121,6 +1121,15 @@ EuiBasicTable.propTypes = {
1121
1121
  * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
1122
1122
  */
1123
1123
  repositionOnScroll: PropTypes.bool,
1124
+ /**
1125
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
1126
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
1127
+ * information (action & additional information).
1128
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
1129
+ * the tooltip content and would result in repetitive output.
1130
+ * @default false
1131
+ */
1132
+ disableScreenReaderOutput: PropTypes.bool,
1124
1133
  /**
1125
1134
  * If supplied, called when mouse movement causes the tool tip to be
1126
1135
  * hidden.
@@ -1236,6 +1245,7 @@ EuiBasicTable.propTypes = {
1236
1245
  title: PropTypes.node,
1237
1246
  id: PropTypes.string,
1238
1247
  repositionOnScroll: PropTypes.bool,
1248
+ disableScreenReaderOutput: PropTypes.bool,
1239
1249
  onMouseOut: PropTypes.func,
1240
1250
  "aria-label": PropTypes.string,
1241
1251
  "data-test-subj": PropTypes.string,
@@ -1376,6 +1386,7 @@ EuiBasicTable.propTypes = {
1376
1386
  title: PropTypes.node,
1377
1387
  id: PropTypes.string,
1378
1388
  repositionOnScroll: PropTypes.bool,
1389
+ disableScreenReaderOutput: PropTypes.bool,
1379
1390
  onMouseOut: PropTypes.func,
1380
1391
  "aria-label": PropTypes.string,
1381
1392
  "data-test-subj": PropTypes.string,
@@ -615,6 +615,15 @@ EuiInMemoryTable.propTypes = {
615
615
  * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
616
616
  */
617
617
  repositionOnScroll: PropTypes.bool,
618
+ /**
619
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
620
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
621
+ * information (action & additional information).
622
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
623
+ * the tooltip content and would result in repetitive output.
624
+ * @default false
625
+ */
626
+ disableScreenReaderOutput: PropTypes.bool,
618
627
  /**
619
628
  * If supplied, called when mouse movement causes the tool tip to be
620
629
  * hidden.
@@ -730,6 +739,7 @@ EuiInMemoryTable.propTypes = {
730
739
  title: PropTypes.node,
731
740
  id: PropTypes.string,
732
741
  repositionOnScroll: PropTypes.bool,
742
+ disableScreenReaderOutput: PropTypes.bool,
733
743
  onMouseOut: PropTypes.func,
734
744
  "aria-label": PropTypes.string,
735
745
  "data-test-subj": PropTypes.string,
@@ -870,6 +880,7 @@ EuiInMemoryTable.propTypes = {
870
880
  title: PropTypes.node,
871
881
  id: PropTypes.string,
872
882
  repositionOnScroll: PropTypes.bool,
883
+ disableScreenReaderOutput: PropTypes.bool,
873
884
  onMouseOut: PropTypes.func,
874
885
  "aria-label": PropTypes.string,
875
886
  "data-test-subj": PropTypes.string,
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { logicalShorthandCSS } from '../../global_styling';
11
+ import { highContrastModeStyles, logicalShorthandCSS } from '../../global_styling';
12
12
  import { euiCodeSyntaxVariables } from './code_syntax.styles';
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
14
  name: "gfiv3z-transparentBackground",
@@ -25,7 +25,9 @@ export var euiCodeStyles = function euiCodeStyles(euiThemeContext) {
25
25
  /*
26
26
  * 1. Size the code against the text its embedded within.
27
27
  */
28
- euiCode: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", logicalShorthandCSS('padding', '0.2em 0.5em'), "background:", codeSyntaxVariables.backgroundColor, ";border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", codeSyntaxVariables.inlineCodeColor, ";", codeSyntaxVariables.tokensCss, " .token.atrule .token.rule,.token.keyword{color:", codeSyntaxVariables.inlineCodeKeywordColor, ";};label:euiCode;"),
28
+ euiCode: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", logicalShorthandCSS('padding', '0.2em 0.5em'), "background-color:", codeSyntaxVariables.backgroundColor, ";", highContrastModeStyles(euiThemeContext, {
29
+ forced: "\n border: ".concat(euiTheme.border.thin, ";\n ")
30
+ }), " border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", codeSyntaxVariables.inlineCodeColor, ";", codeSyntaxVariables.tokensCss, " .token.atrule .token.rule,.token.keyword{color:", codeSyntaxVariables.inlineCodeKeywordColor, ";};label:euiCode;"),
29
31
  transparentBackground: _ref
30
32
  };
31
33
  };
@@ -14,9 +14,12 @@ export var euiCodeTextColors = function euiCodeTextColors(_ref) {
14
14
  };
15
15
  };
16
16
 
17
- // These variables are computationally expensive - do not call them outside `useEuiMemoizedStyles`
17
+ /**
18
+ * These variables are computationally expensive - do not call them outside `useEuiMemoizedStyles`
19
+ */
18
20
  export var euiCodeSyntaxVariables = function euiCodeSyntaxVariables(euiThemeContext) {
19
- var euiTheme = euiThemeContext.euiTheme;
21
+ var euiTheme = euiThemeContext.euiTheme,
22
+ highContrastMode = euiThemeContext.highContrastMode;
20
23
  var _euiCodeTextColors = euiCodeTextColors(euiThemeContext),
21
24
  backgroundColor = _euiCodeTextColors.backgroundColor,
22
25
  color = _euiCodeTextColors.color;
@@ -46,7 +49,7 @@ export var euiCodeSyntaxVariables = function euiCodeSyntaxVariables(euiThemeCont
46
49
  selectorClassColor: euiTheme.components.codeSelectorClassColor,
47
50
  selectorIdColor: euiTheme.components.codeSelectorIdColor,
48
51
  get tokensCss() {
49
- return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(this.commentColor, ";\n font-style: italic;\n }\n\n .token.selector {\n color: ").concat(this.selectorTagColor, ";\n }\n\n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(this.stringColor, ";\n }\n\n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(this.numberColor, ";\n }\n\n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(this.keywordColor, ";\n }\n\n .token.function {\n color: ").concat(this.functionTitleColor, ";\n }\n\n .token.tag {\n color: ").concat(this.tagColor, ";\n }\n\n .token.class-name {\n color: ").concat(this.typeColor, ";\n }\n\n .token.property {\n color: ").concat(this.attributeColor, ";\n }\n\n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(this.symbolColor, ";\n }\n\n .token.paramater {\n color: ").concat(this.paramsColor, ";\n }\n\n .token.meta,\n .token.important {\n color: ").concat(this.metaColor, ";\n }\n\n .token.title {\n color: ").concat(this.titleColor, ";\n }\n\n .token.section {\n color: ").concat(this.sectionColor, ";\n }\n\n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n\n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.additionColor, ";\n color: ").concat(this.additionColor, ";\n }\n\n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.deletionColor, ";\n color: ").concat(this.deletionColor, ";\n }\n\n .token.selector .token.class {\n color: ").concat(this.selectorClassColor, ";\n }\n\n .token.selector .token.id {\n color: ").concat(this.selectorIdColor, ";\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n\n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n\n .token.entity {\n cursor: help;\n }");
52
+ return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: ".concat(highContrastMode ? '1' : '.7', ";\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ").concat(this.commentColor, ";\n font-style: italic;\n }\n\n .token.selector {\n color: ").concat(this.selectorTagColor, ";\n }\n\n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(this.stringColor, ";\n }\n\n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(this.numberColor, ";\n }\n\n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(this.keywordColor, ";\n }\n\n .token.function {\n color: ").concat(this.functionTitleColor, ";\n }\n\n .token.tag {\n color: ").concat(this.tagColor, ";\n }\n\n .token.class-name {\n color: ").concat(this.typeColor, ";\n }\n\n .token.property {\n color: ").concat(this.attributeColor, ";\n }\n\n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(this.symbolColor, ";\n }\n\n .token.paramater {\n color: ").concat(this.paramsColor, ";\n }\n\n .token.meta,\n .token.important {\n color: ").concat(this.metaColor, ";\n }\n\n .token.title {\n color: ").concat(this.titleColor, ";\n }\n\n .token.section {\n color: ").concat(this.sectionColor, ";\n }\n\n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n\n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.additionColor, ";\n color: ").concat(this.additionColor, ";\n }\n\n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.deletionColor, ";\n color: ").concat(this.deletionColor, ";\n }\n\n .token.selector .token.class {\n color: ").concat(this.selectorClassColor, ";\n }\n\n .token.selector .token.id {\n color: ").concat(this.selectorIdColor, ";\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n\n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n\n .token.entity {\n cursor: help;\n }");
50
53
  }
51
54
  };
52
55
  };
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "color", "style"];
2
+ var _excluded = ["className", "color", "style", "toolTipProps", "showToolTip"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  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; }
5
5
  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; }
@@ -23,11 +23,16 @@ import { useEuiMemoizedStyles } from '../../services';
23
23
  import { useEuiI18n } from '../i18n';
24
24
  import { getChromaColor } from './utils';
25
25
  import { euiColorPickerSwatchStyles } from './color_picker_swatch.styles';
26
+ import { EuiToolTip } from '../tool_tip';
26
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
28
  export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
+ var _toolTipProps$anchorP;
28
30
  var className = _ref.className,
29
31
  color = _ref.color,
30
32
  style = _ref.style,
33
+ toolTipProps = _ref.toolTipProps,
34
+ _ref$showToolTip = _ref.showToolTip,
35
+ showToolTip = _ref$showToolTip === void 0 ? true : _ref$showToolTip,
31
36
  rest = _objectWithoutProperties(_ref, _excluded);
32
37
  var classes = classNames('euiColorPickerSwatch', className);
33
38
  var styles = useEuiMemoizedStyles(euiColorPickerSwatchStyles);
@@ -40,7 +45,7 @@ export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
45
  var ariaLabel = useEuiI18n('euiColorPickerSwatch.ariaLabel', 'Select {color} as the color', {
41
46
  color: color
42
47
  });
43
- return ___EmotionJSX("button", _extends({
48
+ var element = ___EmotionJSX("button", _extends({
44
49
  type: "button",
45
50
  css: styles.euiColorPickerSwatch,
46
51
  className: classes,
@@ -50,12 +55,89 @@ export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
50
55
  background: background
51
56
  }, style)
52
57
  }, rest));
58
+ return showToolTip ? ___EmotionJSX(EuiToolTip, _extends({
59
+ content: color
60
+ }, toolTipProps, {
61
+ anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
62
+ css: [toolTipProps === null || toolTipProps === void 0 || (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.css, styles.tooltip]
63
+ })
64
+ // since the button already has a descriptive `ariaLabel` we can disable
65
+ // the tooltip content from being read additionally by screen readers
66
+ ,
67
+ disableScreenReaderOutput: true
68
+ }), element) : element;
53
69
  });
54
70
  EuiColorPickerSwatch.propTypes = {
55
71
  className: PropTypes.string,
56
72
  "aria-label": PropTypes.string,
57
73
  "data-test-subj": PropTypes.string,
58
74
  css: PropTypes.any,
59
- color: PropTypes.string
75
+ color: PropTypes.string,
76
+ /**
77
+ * renders a tooltip with the color value to provide a visual text alternative
78
+ * @default true
79
+ */
80
+ showToolTip: PropTypes.bool,
81
+ /** Additional props for the EuiToolip when `showToolTip={true}` */toolTipProps: PropTypes.shape({
82
+ /**
83
+ * Passes onto the span wrapping the trigger.
84
+ */
85
+ anchorClassName: PropTypes.string,
86
+ /**
87
+ * Passes onto the span wrapping the trigger.
88
+ */
89
+ anchorProps: PropTypes.shape({
90
+ className: PropTypes.string,
91
+ "aria-label": PropTypes.string,
92
+ "data-test-subj": PropTypes.string,
93
+ css: PropTypes.any
94
+ }),
95
+ /**
96
+ * Passes onto the tooltip itself, not the trigger.
97
+ */
98
+ className: PropTypes.string,
99
+ /**
100
+ * The main content of your tooltip.
101
+ */
102
+ content: PropTypes.node,
103
+ /**
104
+ * Common display alternatives for the anchor wrapper
105
+ */
106
+ display: PropTypes.any,
107
+ /**
108
+ * An optional title for your tooltip.
109
+ */
110
+ title: PropTypes.node,
111
+ /**
112
+ * Unless you provide one, this will be randomly generated.
113
+ */
114
+ id: PropTypes.string,
115
+ /**
116
+ * When `true`, the tooltip's position is re-calculated when the user
117
+ * scrolls. This supports having fixed-position tooltip anchors.
118
+ *
119
+ * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
120
+ */
121
+ repositionOnScroll: PropTypes.bool,
122
+ /**
123
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
124
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
125
+ * information (action & additional information).
126
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
127
+ * the tooltip content and would result in repetitive output.
128
+ * @default false
129
+ */
130
+ disableScreenReaderOutput: PropTypes.bool,
131
+ /**
132
+ * If supplied, called when mouse movement causes the tool tip to be
133
+ * hidden.
134
+ */
135
+ onMouseOut: PropTypes.func,
136
+ "aria-label": PropTypes.string,
137
+ "data-test-subj": PropTypes.string,
138
+ css: PropTypes.any,
139
+ delay: PropTypes.any,
140
+ position: PropTypes.any
141
+ })
60
142
  };
61
143
  EuiColorPickerSwatch.displayName = 'EuiColorPickerSwatch';
@@ -1,3 +1,4 @@
1
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
1
2
  /*
2
3
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
4
  * or more contributor license agreements. Licensed under the Elastic License
@@ -10,6 +11,14 @@ import { css } from '@emotion/react';
10
11
  import { transparentize } from '../../services';
11
12
  import { logicalSizeCSS, mathWithUnits, euiOutline } from '../../global_styling';
12
13
  import { highContrastModeStyles, preventForcedColors } from '../../global_styling/functions/high_contrast';
14
+ var _ref = process.env.NODE_ENV === "production" ? {
15
+ name: "164u3xw-tooltip",
16
+ styles: "display:inline-flex;label:tooltip;"
17
+ } : {
18
+ name: "164u3xw-tooltip",
19
+ styles: "display:inline-flex;label:tooltip;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
13
22
  export var euiColorPickerSwatchStyles = function euiColorPickerSwatchStyles(euiThemeContext) {
14
23
  var euiTheme = euiThemeContext.euiTheme;
15
24
  return {
@@ -19,6 +28,7 @@ export var euiColorPickerSwatchStyles = function euiColorPickerSwatchStyles(euiT
19
28
  none: "\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFormsColorSwatch, ";\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, "\n ").concat(transparentize(euiTheme.colors.emptyShade, 0.05), ";\n "),
20
29
  preferred: "border: ".concat(euiTheme.border.thin, ";"),
21
30
  forced: preventForcedColors(euiThemeContext)
22
- }), " cursor:pointer;&:disabled{cursor:default;}&:focus{", euiOutline(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
31
+ }), " cursor:pointer;&:disabled{cursor:default;}&:focus{", euiOutline(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;"),
32
+ tooltip: _ref
23
33
  };
24
34
  };
@@ -57,5 +57,8 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
57
57
  borderColor: euiTheme.components.headerDarkSearchBorderColor,
58
58
  placeholderColor: makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor)
59
59
  };
60
- return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(highContrastMode ? euiTheme.border.color : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
60
+ return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
61
+ // the header is in a faux dark mode, we can't rely on color
62
+ // switch tokens as they'd be in the wrong color mode
63
+ highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
61
64
  };
@@ -23,7 +23,7 @@ export var euiPanelBorderStyles = function euiPanelBorderStyles(euiThemeContext,
23
23
  euiTheme.colors.borderBaseFloating is enough then */
24
24
  var hasVisibleBorder = hasFloatingBorder && colorMode === 'DARK';
25
25
  return highContrastModeStyles(euiThemeContext, {
26
- none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::before {\n content: '';\n position: absolute;\n /* ensure to keep on top of flush content */\n z-index: 1;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat((borderColor !== null && borderColor !== void 0 ? borderColor : hasVisibleBorder) ? euiTheme.border.color : euiTheme.colors.borderBaseFloating, ";\n border-radius: inherit;\n pointer-events: none;\n }\n "),
26
+ none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::after {\n content: '';\n position: absolute;\n /* ensure to keep on top of flush content */\n z-index: 0;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat((borderColor !== null && borderColor !== void 0 ? borderColor : hasVisibleBorder) ? euiTheme.border.color : euiTheme.colors.borderBaseFloating, ";\n border-radius: inherit;\n pointer-events: none;\n }\n "),
27
27
  preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
28
28
  });
29
29
  };
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import { EuiThemeBorealis } from '@elastic/eui-theme-borealis';
10
+ import { EuiThemeAmsterdam } from '../../themes';
11
11
  import { EuiThemeProvider } from '../../services';
12
12
  import { emitEuiProviderWarning } from '../../services/theme/warning';
13
13
  import { cache as fallbackCache } from '../../services/emotion/css';
@@ -26,7 +26,7 @@ export var EuiProvider = function EuiProvider(_ref) {
26
26
  var _ref$cache = _ref.cache,
27
27
  cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
28
28
  _ref$theme = _ref.theme,
29
- theme = _ref$theme === void 0 ? EuiThemeBorealis : _ref$theme,
29
+ theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
30
30
  _ref$globalStyles = _ref.globalStyles,
31
31
  Globals = _ref$globalStyles === void 0 ? EuiGlobalStyles : _ref$globalStyles,
32
32
  _ref$utilityClasses = _ref.utilityClasses,
@@ -193,6 +193,15 @@ EuiTableHeaderCell.propTypes = {
193
193
  * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
194
194
  */
195
195
  repositionOnScroll: PropTypes.bool,
196
+ /**
197
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
198
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
199
+ * information (action & additional information).
200
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
201
+ * the tooltip content and would result in repetitive output.
202
+ * @default false
203
+ */
204
+ disableScreenReaderOutput: PropTypes.bool,
196
205
  /**
197
206
  * If supplied, called when mouse movement causes the tool tip to be
198
207
  * hidden.
@@ -16,7 +16,7 @@ export var euiToastStyles = function euiToastStyles(euiThemeContext) {
16
16
  var euiTheme = euiThemeContext.euiTheme,
17
17
  highContrastMode = euiThemeContext.highContrastMode;
18
18
  var highlightStyles = function highlightStyles(color, width) {
19
- return "\n &:after {\n content: '';\n position: absolute;\n /* ensure highlight border is on top of panel border */\n z-index: 1;\n inset: 0;\n border-radius: inherit;\n ".concat(logicalCSS('border-top', "".concat(width, " solid ").concat(color)), "\n pointer-events: none;\n }\n ");
19
+ return "\n &:before {\n content: '';\n position: absolute;\n /* ensure highlight border is on top of panel border */\n z-index: 1;\n inset: 0;\n border-radius: inherit;\n ".concat(logicalCSS('border-top', "".concat(width, " solid ").concat(color)), "\n pointer-events: none;\n }\n ");
20
20
  };
21
21
  return {
22
22
  // Base
@@ -36,11 +36,11 @@ export var euiToastStyles = function euiToastStyles(euiThemeContext) {
36
36
  }) : euiTheme.border.width.thick;
37
37
  return highContrastModeStyles(euiThemeContext, {
38
38
  none: highlightStyles(color, borderWidth),
39
- preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::after {\n ").concat(logicalCSS('width', "calc(100% + ".concat(mathWithUnits(euiTheme.border.width.thin, function (x) {
39
+ preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::before {\n ").concat(logicalCSS('width', "calc(100% + ".concat(mathWithUnits(euiTheme.border.width.thin, function (x) {
40
40
  return x * 2;
41
41
  }), ")")), "\n ").concat(logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), "\n ").concat(logicalCSS('margin-left', "-".concat(euiTheme.border.width.thin)), "\n }\n "),
42
42
  // Windows high contrast mode ignores/overrides border colors, which have semantic meaning here. To get around this, we'll use a pseudo element that ignores forced colors
43
- forced: "\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n ".concat(logicalCSS('top', 0), "\n ").concat(logicalCSS('horizontal', 0), "\n ").concat(logicalCSS('height', borderWidth), "\n background-color: ").concat(color, ";\n ").concat(preventForcedColors(euiThemeContext), "\n pointer-events: none;\n }\n ")
43
+ forced: "\n overflow: hidden;\n\n &::before {\n content: '';\n position: absolute;\n ".concat(logicalCSS('top', 0), "\n ").concat(logicalCSS('horizontal', 0), "\n ").concat(logicalCSS('height', borderWidth), "\n background-color: ").concat(color, ";\n ").concat(preventForcedColors(euiThemeContext), "\n pointer-events: none;\n }\n ")
44
44
  });
45
45
  },
46
46
  get primary() {
@@ -81,6 +81,15 @@ EuiIconTip.propTypes = {
81
81
  * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
82
82
  */
83
83
  repositionOnScroll: PropTypes.bool,
84
+ /**
85
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
86
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
87
+ * information (action & additional information).
88
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
89
+ * the tooltip content and would result in repetitive output.
90
+ * @default false
91
+ */
92
+ disableScreenReaderOutput: PropTypes.bool,
84
93
  /**
85
94
  * If supplied, called when mouse movement causes the tool tip to be
86
95
  * hidden.
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll"];
1
+ var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll", "disableScreenReaderOutput"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -245,6 +245,8 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
245
245
  delay = _this$props.delay,
246
246
  display = _this$props.display,
247
247
  repositionOnScroll = _this$props.repositionOnScroll,
248
+ _this$props$disableSc = _this$props.disableScreenReaderOutput,
249
+ disableScreenReaderOutput = _this$props$disableSc === void 0 ? false : _this$props$disableSc,
248
250
  rest = _objectWithoutProperties(_this$props, _excluded);
249
251
  var _this$state = this.state,
250
252
  arrowStyles = _this$state.arrowStyles,
@@ -260,8 +262,10 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
260
262
  onFocus: this.onFocus,
261
263
  onKeyDown: this.onEscapeKey,
262
264
  onMouseOver: this.showToolTip,
263
- onMouseOut: this.onMouseOut,
264
- id: id,
265
+ onMouseOut: this.onMouseOut
266
+ // `id` defines if the trigger and tooltip are automatically linked via `aria-describedby`.
267
+ ,
268
+ id: !disableScreenReaderOutput ? id : undefined,
265
269
  className: anchorClasses,
266
270
  display: display,
267
271
  isVisible: visible
@@ -291,7 +295,8 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
291
295
  _defineProperty(EuiToolTip, "defaultProps", {
292
296
  position: 'top',
293
297
  delay: 'regular',
294
- display: 'inlineBlock'
298
+ display: 'inlineBlock',
299
+ disableScreenReaderOutput: false
295
300
  });
296
301
  EuiToolTip.propTypes = {
297
302
  /**
@@ -346,6 +351,15 @@ EuiToolTip.propTypes = {
346
351
  * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
347
352
  */
348
353
  repositionOnScroll: PropTypes.bool,
354
+ /**
355
+ * Disables the tooltip content being read by screen readers when focusing the trigger element.
356
+ * Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
357
+ * information (action & additional information).
358
+ * Enable this prop only when the trigger has a descriptive label that either duplicates or includes
359
+ * the tooltip content and would result in repetitive output.
360
+ * @default false
361
+ */
362
+ disableScreenReaderOutput: PropTypes.bool,
349
363
  /**
350
364
  * If supplied, called when mouse movement causes the tool tip to be
351
365
  * hidden.
@@ -47,7 +47,7 @@ export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
47
  _onBlur();
48
48
  children.props.onBlur && children.props.onBlur(e);
49
49
  },
50
- 'aria-describedby': isVisible ? classNames(id, children.props['aria-describedby']) : children.props['aria-describedby']
50
+ 'aria-describedby': isVisible && id ? classNames(id, children.props['aria-describedby']) : children.props['aria-describedby']
51
51
  }))
52
52
  );
53
53
  });
@@ -44,10 +44,11 @@ export var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
44
44
  * @returns Style object `{ backgroundColor, color }`
45
45
  */
46
46
  export var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
47
- var euiTheme = euiThemeContext.euiTheme;
47
+ var euiTheme = euiThemeContext.euiTheme,
48
+ highContrastMode = euiThemeContext.highContrastMode;
48
49
  var backgroundTokenName = getTokenName('backgroundFilled', color);
49
50
  var textColorTokenName = getTokenName('textColorFilled', color);
50
- var foreground = euiTheme.components.buttons[textColorTokenName];
51
+ var foreground = highContrastMode ? color === 'warning' ? euiTheme.colors.ink : euiTheme.colors.textInverse : euiTheme.components.buttons[textColorTokenName];
51
52
  var background = euiTheme.components.buttons[backgroundTokenName];
52
53
  return _objectSpread({
53
54
  color: foreground,
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { EuiVisColorStore } from '@elastic/eui-theme-common';
10
- import { colorVis } from '@elastic/eui-theme-borealis';
10
+ import { colorVis } from '../../themes/amsterdam/global_styling/variables/_colors_vis';
11
11
 
12
12
  // initialsetup of Vis color storage with default colors
13
13
  export var EUI_VIS_COLOR_STORE = EuiVisColorStore.getInstance(colorVis, true);
@@ -7,10 +7,10 @@
7
7
  */
8
8
 
9
9
  import { createContext } from 'react';
10
- import { EuiThemeBorealis } from '@elastic/eui-theme-borealis';
10
+ import { EuiThemeAmsterdam } from '../../themes/amsterdam/theme';
11
11
  import { DEFAULT_COLOR_MODE, getComputed } from './utils';
12
12
  export var DEFAULTS = {
13
- system: EuiThemeBorealis,
13
+ system: EuiThemeAmsterdam,
14
14
  modifications: {},
15
15
  colorMode: DEFAULT_COLOR_MODE,
16
16
  highContrastMode: false