@elastic/eui 106.7.0 → 107.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/eui_theme_amsterdam_dark.json +36 -0
  2. package/dist/eui_theme_amsterdam_dark.json.d.ts +36 -0
  3. package/dist/eui_theme_amsterdam_light.json +36 -0
  4. package/dist/eui_theme_amsterdam_light.json.d.ts +36 -0
  5. package/dist/eui_theme_borealis_dark.json +36 -0
  6. package/dist/eui_theme_borealis_dark.json.d.ts +36 -0
  7. package/dist/eui_theme_borealis_light.json +37 -1
  8. package/dist/eui_theme_borealis_light.json.d.ts +36 -0
  9. package/es/components/badge/beta_badge/beta_badge.js +1 -0
  10. package/es/components/basic_table/basic_table.styles.js +6 -4
  11. package/es/components/bottom_bar/bottom_bar.styles.js +4 -2
  12. package/es/components/code/code_syntax.styles.js +1 -1
  13. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -1
  14. package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +3 -1
  15. package/es/components/flyout/flyout.styles.js +18 -7
  16. package/es/components/header/header.styles.js +3 -1
  17. package/es/components/icon/icon.js +31 -14
  18. package/es/components/icon/icon_map.js +1 -1
  19. package/es/components/page_template/inner/page_inner.styles.js +3 -1
  20. package/es/components/panel/panel.styles.js +6 -6
  21. package/es/components/table/table_row.styles.js +3 -3
  22. package/es/global_styling/mixins/_shadow.js +14 -2
  23. package/es/themes/amsterdam/global_styling/variables/_shadows.js +439 -0
  24. package/es/themes/amsterdam/theme.js +4 -1
  25. package/es/themes/json/eui_theme_amsterdam_dark.json +36 -0
  26. package/es/themes/json/eui_theme_amsterdam_light.json +36 -0
  27. package/es/themes/json/eui_theme_borealis_dark.json +36 -0
  28. package/es/themes/json/eui_theme_borealis_light.json +37 -1
  29. package/eui.d.ts +159 -4
  30. package/lib/components/badge/beta_badge/beta_badge.js +1 -0
  31. package/lib/components/basic_table/basic_table.styles.js +5 -3
  32. package/lib/components/bottom_bar/bottom_bar.styles.js +4 -2
  33. package/lib/components/code/code_syntax.styles.js +1 -1
  34. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -1
  35. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +3 -1
  36. package/lib/components/flyout/flyout.styles.js +18 -7
  37. package/lib/components/header/header.styles.js +3 -1
  38. package/lib/components/icon/icon.js +31 -14
  39. package/lib/components/icon/icon_map.js +1 -1
  40. package/lib/components/page_template/inner/page_inner.styles.js +3 -1
  41. package/lib/components/panel/panel.styles.js +5 -5
  42. package/lib/components/table/table_row.styles.js +3 -3
  43. package/lib/global_styling/mixins/_shadow.js +18 -1
  44. package/lib/themes/amsterdam/global_styling/variables/_shadows.js +442 -0
  45. package/lib/themes/amsterdam/theme.js +4 -1
  46. package/lib/themes/json/eui_theme_amsterdam_dark.json +36 -0
  47. package/lib/themes/json/eui_theme_amsterdam_light.json +36 -0
  48. package/lib/themes/json/eui_theme_borealis_dark.json +36 -0
  49. package/lib/themes/json/eui_theme_borealis_light.json +37 -1
  50. package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -0
  51. package/optimize/es/components/basic_table/basic_table.styles.js +6 -4
  52. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +4 -2
  53. package/optimize/es/components/code/code_syntax.styles.js +1 -1
  54. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -1
  55. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +3 -1
  56. package/optimize/es/components/flyout/flyout.styles.js +18 -7
  57. package/optimize/es/components/header/header.styles.js +3 -1
  58. package/optimize/es/components/icon/icon.js +31 -14
  59. package/optimize/es/components/icon/icon_map.js +1 -1
  60. package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -1
  61. package/optimize/es/components/panel/panel.styles.js +6 -6
  62. package/optimize/es/components/table/table_row.styles.js +3 -3
  63. package/optimize/es/global_styling/mixins/_shadow.js +14 -2
  64. package/optimize/es/themes/amsterdam/global_styling/variables/_shadows.js +436 -0
  65. package/optimize/es/themes/amsterdam/theme.js +4 -1
  66. package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +36 -0
  67. package/optimize/es/themes/json/eui_theme_amsterdam_light.json +36 -0
  68. package/optimize/es/themes/json/eui_theme_borealis_dark.json +36 -0
  69. package/optimize/es/themes/json/eui_theme_borealis_light.json +37 -1
  70. package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -0
  71. package/optimize/lib/components/basic_table/basic_table.styles.js +5 -3
  72. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +4 -2
  73. package/optimize/lib/components/code/code_syntax.styles.js +1 -1
  74. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -1
  75. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +3 -1
  76. package/optimize/lib/components/flyout/flyout.styles.js +18 -7
  77. package/optimize/lib/components/header/header.styles.js +3 -1
  78. package/optimize/lib/components/icon/icon.js +31 -14
  79. package/optimize/lib/components/icon/icon_map.js +1 -1
  80. package/optimize/lib/components/page_template/inner/page_inner.styles.js +3 -1
  81. package/optimize/lib/components/panel/panel.styles.js +5 -5
  82. package/optimize/lib/components/table/table_row.styles.js +3 -3
  83. package/optimize/lib/global_styling/mixins/_shadow.js +18 -1
  84. package/optimize/lib/themes/amsterdam/global_styling/variables/_shadows.js +440 -0
  85. package/optimize/lib/themes/amsterdam/theme.js +4 -1
  86. package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +36 -0
  87. package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +36 -0
  88. package/optimize/lib/themes/json/eui_theme_borealis_dark.json +36 -0
  89. package/optimize/lib/themes/json/eui_theme_borealis_light.json +37 -1
  90. package/package/eui.d.ts +33359 -0
  91. package/package.json +5 -5
  92. package/src/themes/amsterdam/global_styling/mixins/_index.scss +1 -1
  93. package/src/themes/amsterdam/global_styling/mixins/_shadow.scss +100 -0
  94. package/src/themes/amsterdam/global_styling/variables/_index.scss +1 -0
  95. package/src/themes/amsterdam/global_styling/variables/_shadows.scss +20 -0
  96. package/test-env/components/badge/beta_badge/beta_badge.js +1 -0
  97. package/test-env/components/basic_table/basic_table.styles.js +5 -3
  98. package/test-env/components/bottom_bar/bottom_bar.styles.js +4 -2
  99. package/test-env/components/code/code_syntax.styles.js +1 -1
  100. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -1
  101. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +3 -1
  102. package/test-env/components/flyout/flyout.styles.js +18 -7
  103. package/test-env/components/header/header.styles.js +3 -1
  104. package/test-env/components/icon/icon_map.js +1 -1
  105. package/test-env/components/page_template/inner/page_inner.styles.js +3 -1
  106. package/test-env/components/panel/panel.styles.js +5 -5
  107. package/test-env/components/table/table_row.styles.js +3 -3
  108. package/test-env/global_styling/mixins/_shadow.js +18 -1
  109. package/test-env/themes/amsterdam/global_styling/variables/_shadows.js +440 -0
  110. package/test-env/themes/amsterdam/theme.js +4 -1
  111. package/test-env/themes/json/eui_theme_amsterdam_dark.json +36 -0
  112. package/test-env/themes/json/eui_theme_amsterdam_light.json +36 -0
  113. package/test-env/themes/json/eui_theme_borealis_dark.json +36 -0
  114. package/test-env/themes/json/eui_theme_borealis_light.json +37 -1
@@ -50,7 +50,7 @@ export var euiCodeSyntaxVariables = function euiCodeSyntaxVariables(euiThemeCont
50
50
  selectorClassColor: euiTheme.components.codeSelectorClassColor,
51
51
  selectorIdColor: euiTheme.components.codeSelectorIdColor,
52
52
  get tokensCss() {
53
- 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 }");
53
+ 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.key.atrule,\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 }");
54
54
  }
55
55
  };
56
56
  };
@@ -138,7 +138,7 @@ var _EuiCollapsibleNavBeta = function _EuiCollapsibleNavBeta(_ref) {
138
138
  }, [_focusTrapProps]);
139
139
  var classes = classNames('euiCollapsibleNav', 'euiCollapsibleNavBeta', className);
140
140
  var styles = useEuiMemoizedStyles(euiCollapsibleNavBetaStyles);
141
- var cssStyles = [styles.euiCollapsibleNavBeta, styles[side], isPush && styles.isPush, isPush && isCollapsed && styles.isPushCollapsed, isOverlayFullWidth && styles.isOverlayFullWidth];
141
+ var cssStyles = [styles.euiCollapsibleNavBeta, isPush && styles.isPush, styles[side], isPush && isCollapsed && styles.isPushCollapsed, isOverlayFullWidth && styles.isOverlayFullWidth];
142
142
  var flyout = ___EmotionJSX(EuiFlyout, _extends({
143
143
  "aria-label": defaultAriaLabel
144
144
  }, rest, {
@@ -23,7 +23,9 @@ export var euiCollapsibleNavBetaStyles = function euiCollapsibleNavBetaStyles(eu
23
23
  euiCollapsibleNavBeta: /*#__PURE__*/css(logicalCSS('top', fixedHeaderOffset), logicalCSS('padding-bottom', euiTheme.size.xs), ";;label:euiCollapsibleNavBeta;"),
24
24
  left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thin), ";;label:left;"),
25
25
  right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), ";;label:right;"),
26
- isPush: /*#__PURE__*/css(euiShadowFlat(euiThemeContext), ";;label:isPush;"),
26
+ isPush: /*#__PURE__*/css(euiShadowFlat(euiThemeContext, {
27
+ border: 'none'
28
+ }), ";;label:isPush;"),
27
29
  isPushCollapsed: /*#__PURE__*/css(hideScrollbars, ";;label:isPushCollapsed;"),
28
30
  isOverlayFullWidth: /*#__PURE__*/css("&.euiFlyout{", logicalCSS('max-width', '100% !important'), ";};label:isOverlayFullWidth;")
29
31
  };
@@ -24,9 +24,16 @@ var _ref = process.env.NODE_ENV === "production" ? {
24
24
  styles: "animation-duration:0s!important;label:noAnimation;",
25
25
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
26
26
  };
27
+ var _ref2 = process.env.NODE_ENV === "production" ? {
28
+ name: "rks1ev-overlay",
29
+ styles: "&:has(.euiResizableButton){border-inline:none;};label:overlay;"
30
+ } : {
31
+ name: "rks1ev-overlay",
32
+ styles: "&:has(.euiResizableButton){border-inline:none;};label:overlay;",
33
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
34
+ };
27
35
  export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
28
- var euiTheme = euiThemeContext.euiTheme,
29
- colorMode = euiThemeContext.colorMode;
36
+ var euiTheme = euiThemeContext.euiTheme;
30
37
  return {
31
38
  euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('bottom', 0), " ", logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)'), " ", logicalCSS('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyout;"),
32
39
  // Flyout sizes
@@ -41,11 +48,15 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
41
48
  left: /*#__PURE__*/css(logicalCSS('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
42
49
  // Type
43
50
  overlay: {
44
- overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext, {
45
- borderAllInHighContrastMode: true
46
- }), " &:has(.euiResizableButton){border-inline:none;};label:overlay;"),
47
- left: /*#__PURE__*/css("border-inline-end:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:left;"),
48
- right: /*#__PURE__*/css("border-inline-start:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:right;")
51
+ overlay: _ref2,
52
+ left: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext, {
53
+ borderAllInHighContrastMode: true,
54
+ border: 'right'
55
+ }), ";;label:left;"),
56
+ right: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext, {
57
+ borderAllInHighContrastMode: true,
58
+ border: 'left'
59
+ }), ";;label:right;")
49
60
  },
50
61
  push: {
51
62
  push: /*#__PURE__*/css("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
@@ -24,7 +24,9 @@ export var euiHeaderStyles = function euiHeaderStyles(euiThemeContext) {
24
24
  height = _euiHeaderVariables.height,
25
25
  padding = _euiHeaderVariables.padding;
26
26
  return {
27
- euiHeader: /*#__PURE__*/css("display:flex;justify-content:space-between;", logicalCSS('height', height), " ", logicalCSS('padding-horizontal', padding), " ", logicalCSS('border-bottom', euiTheme.border.thin), " ", euiShadowXSmall(euiThemeContext), ";;label:euiHeader;"),
27
+ euiHeader: /*#__PURE__*/css("display:flex;justify-content:space-between;", logicalCSS('height', height), " ", logicalCSS('padding-horizontal', padding), " ", logicalCSS('border-bottom', euiTheme.border.thin), " ", euiShadowXSmall(euiThemeContext, {
28
+ border: 'none'
29
+ }), "&+.euiHeader{clip-path:polygon(0 0, 100% 0, 100% 100vh, 0 100vh);};label:euiHeader;"),
28
30
  // Position
29
31
  static: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 1, ";position:relative;;label:static;"),
30
32
  fixed: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) + 1, ";position:fixed;", logicalCSS('top', 0), " ", logicalCSS('horizontal', 0), ";;label:fixed;"),
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _inherits from "@babel/runtime/helpers/inherits";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _excluded = ["type", "size", "color", "className", "tabIndex", "title", "onIconLoad", "style", "stylesMemoizer"];
9
+ var _excluded = ["type", "size", "color", "className", "tabIndex", "title", "role", "onIconLoad", "style", "stylesMemoizer", "aria-hidden", "titleId"];
10
10
  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; }
11
11
  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; }
12
12
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
@@ -175,9 +175,12 @@ export var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
175
175
  className = _this$props.className,
176
176
  tabIndex = _this$props.tabIndex,
177
177
  title = _this$props.title,
178
+ role = _this$props.role,
178
179
  onIconLoad = _this$props.onIconLoad,
179
180
  style = _this$props.style,
180
181
  stylesMemoizer = _this$props.stylesMemoizer,
182
+ ariaHidden = _this$props['aria-hidden'],
183
+ titleId = _this$props.titleId,
181
184
  rest = _objectWithoutProperties(_this$props, _excluded);
182
185
  var _this$state = this.state,
183
186
  isLoading = _this$state.isLoading,
@@ -202,41 +205,55 @@ export var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
202
205
  var styles = stylesMemoizer(euiIconStyles);
203
206
  var cssStyles = [styles.euiIcon, styles[size], color && isNamedColor(color) && styles[color], isCustomColor && styles.customColor, isElasticLogoOutline && styles.logoElasticOutline, isAppIcon && !appIconHasColor && styles.app, isLoading && styles.isLoading, !isLoading && neededLoading && styles.isLoaded];
204
207
  var icon = this.state.icon || empty;
208
+ var isAriaHidden = [true, 'true'].includes(ariaHidden !== null && ariaHidden !== void 0 ? ariaHidden : false);
209
+ var isPresentationOnly = !(title || this.props['aria-label'] || this.props['aria-labelledby']) || ['none', 'presentation'].includes(role !== null && role !== void 0 ? role : '') || isAriaHidden;
210
+ var accessibleTitle = isPresentationOnly ? undefined : title;
211
+
212
+ // implicitly set the ARIA role for the icon only if:
213
+ // - The user did NOT provide a `role` prop
214
+ // - `aria-hidden` is NOT true
215
+ // This ensures user-supplied `role` and `aria-hidden` always take precedence.
216
+ // If set, role is:
217
+ // - 'presentation' for decorative icons
218
+ // - 'img' for meaningful icons
219
+ var accessibleRole = function () {
220
+ if (isAriaHidden) return undefined;
221
+ if (isPresentationOnly) return 'presentation';
222
+ return 'img';
223
+ }();
205
224
  if (typeof icon === 'string') {
206
225
  return ___EmotionJSX("img", _extends({
207
- alt: title ? title : '',
226
+ alt: accessibleTitle,
208
227
  src: icon,
209
228
  className: classes,
210
229
  css: cssStyles,
211
230
  style: style,
212
- tabIndex: tabIndex
231
+ tabIndex: tabIndex,
232
+ role: role !== null && role !== void 0 ? role : accessibleRole,
233
+ "aria-hidden": ariaHidden
213
234
  }, rest));
214
235
  } else {
215
236
  var Svg = icon;
216
237
 
217
- // If there is no aria-label, aria-labelledby, or title it gets aria-hidden true
218
- var isAriaHidden = !(this.props['aria-label'] || this.props['aria-labelledby'] || this.props.title);
219
-
220
238
  // If no aria-label or aria-labelledby is provided but there's a title, a titleId is generated
221
239
  // The svg aria-labelledby attribute gets this titleId
222
240
  // The svg title element gets this titleId as an id
223
- var titleId = !this.props['aria-label'] && !this.props['aria-labelledby'] && title ? {
224
- titleId: generateId()
241
+ var accessibleTitleId = !this.props['aria-label'] && !this.props['aria-labelledby'] && title ? {
242
+ titleId: titleId || generateId()
225
243
  } : undefined;
226
244
  return ___EmotionJSX(Svg, _extends({
227
245
  className: classes,
228
246
  style: optionalCustomStyles,
229
247
  css: cssStyles,
230
248
  tabIndex: tabIndex,
231
- role: "img",
232
- title: title
233
- }, titleId, {
249
+ title: accessibleTitle,
250
+ role: role !== null && role !== void 0 ? role : accessibleRole,
251
+ "aria-hidden": ariaHidden
252
+ }, accessibleTitleId, {
234
253
  "data-icon-type": iconTitle,
235
254
  "data-is-loaded": isLoaded || undefined,
236
255
  "data-is-loading": isLoading || undefined
237
- }, rest, {
238
- "aria-hidden": isAriaHidden || rest['aria-hidden']
239
- }));
256
+ }, rest));
240
257
  }
241
258
  }
242
259
  }]);
@@ -501,7 +501,7 @@ export var typeToPathMap = {
501
501
  vulnerabilityManagementApp: 'app_vulnerability_management',
502
502
  warning: 'warning',
503
503
  warningFilled: 'warning',
504
- // NOTE: To be deprecated in favor of `export`
504
+ // NOTE: To be deprecated in favor of `warning`
505
505
  watchesApp: 'app_watches',
506
506
  web: 'web',
507
507
  wordWrap: 'wordWrap',
@@ -13,7 +13,9 @@ export var euiPageInnerStyles = function euiPageInnerStyles(euiThemeContext) {
13
13
  var euiTheme = euiThemeContext.euiTheme;
14
14
  return {
15
15
  euiPageInner: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;flex:1 1 100%;", logicalCSS('max-width', '100%'), " ", logicalCSS('min-width', '0'), ";;label:euiPageInner;"),
16
- panelled: /*#__PURE__*/css("background:", euiThemeContext.euiTheme.colors.backgroundBasePlain, ";", euiShadow(euiThemeContext, 'm'), ";;label:panelled;"),
16
+ panelled: /*#__PURE__*/css("background:", euiThemeContext.euiTheme.colors.backgroundBasePlain, ";", euiShadow(euiThemeContext, 'm', {
17
+ border: 'none'
18
+ }), ";;label:panelled;"),
17
19
  border: {
18
20
  top: /*#__PURE__*/css(logicalCSS('border-top', euiTheme.border.thin), ";;label:top;"),
19
21
  left: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), ";;label:left;")
@@ -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 { euiShadow } from '@elastic/eui-theme-common';
11
+ import { euiBorderStyles, euiShadow, euiShadowHover } from '@elastic/eui-theme-common';
12
12
  import { euiCanAnimate, logicalCSS, logicalTextAlignCSS } from '../../global_styling';
13
13
  import { highContrastModeStyles } from '../../global_styling/functions/high_contrast';
14
14
  export var euiPanelBorderStyles = function euiPanelBorderStyles(euiThemeContext, options) {
@@ -23,7 +23,9 @@ 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 &::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 "),
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 ".concat(euiBorderStyles(euiThemeContext, {
27
+ borderColor: (borderColor !== null && borderColor !== void 0 ? borderColor : hasVisibleBorder) ? euiTheme.border.color : euiTheme.colors.borderBaseFloating
28
+ }), "\n "),
27
29
  preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
28
30
  });
29
31
  };
@@ -49,9 +51,7 @@ export var euiPanelStyles = function euiPanelStyles(euiThemeContext) {
49
51
  // Base
50
52
  euiPanel: _ref2,
51
53
  grow: _ref,
52
- hasShadow: /*#__PURE__*/css(euiShadow(euiThemeContext, 'm'), " ", euiPanelBorderStyles(euiThemeContext, {
53
- hasFloatingBorder: false
54
- }), ";;label:hasShadow;"),
54
+ hasShadow: /*#__PURE__*/css(euiShadow(euiThemeContext, 'm'), ";;label:hasShadow;"),
55
55
  hasBorder: /*#__PURE__*/css(euiPanelBorderStyles(euiThemeContext, {
56
56
  borderColor: euiTheme.border.color,
57
57
  hasFloatingBorder: false
@@ -62,7 +62,7 @@ export var euiPanelStyles = function euiPanelStyles(euiThemeContext) {
62
62
  },
63
63
  // Setup interactive behavior
64
64
  isClickable: /*#__PURE__*/css(euiCanAnimate, "{transition:box-shadow ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ",transform ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}&:enabled{display:block;", logicalCSS('width', '100%'), " ", logicalTextAlignCSS('left'), ";}&:hover,&:focus{", highContrastModeStyles(euiThemeContext, {
65
- none: euiShadow(euiThemeContext, 'l'),
65
+ none: euiShadowHover(euiThemeContext, 'l'),
66
66
  // Windows high contrast themes ignore box-shadows - use a filter workaround instead
67
67
  preferred: "\n &:not(.euiPanel--transparent) {\n filter: drop-shadow(0 ".concat(euiTheme.border.width.thick, " 0 ").concat(euiTheme.border.color, ");\n }\n ")
68
68
  }), " transform:translateY(-2px);cursor:pointer;};label:isClickable;")
@@ -47,7 +47,7 @@ export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
47
47
  * Right column styles + border
48
48
  * Used for cell actions and row expander arrow
49
49
  */
50
- hasRightColumn: /*#__PURE__*/css(logicalCSS('padding-right', mobileSizes.actions.width), " &::after{content:'';position:absolute;", logicalCSS('vertical', 0), " ", logicalCSS('right', mobileSizes.actions.width), " ", logicalCSS('border-right', euiTheme.border.thin), ";};label:hasRightColumn;"),
50
+ hasRightColumn: /*#__PURE__*/css(logicalCSS('padding-right', mobileSizes.actions.width), " &::before{content:'';position:absolute;", logicalCSS('vertical', 0), " ", logicalCSS('right', mobileSizes.actions.width), " ", logicalCSS('border-right', euiTheme.border.thin), ";};label:hasRightColumn;"),
51
51
  /**
52
52
  * Bottom of card - expanded rows
53
53
  */
@@ -55,8 +55,8 @@ export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
55
55
  // On mobile, visually move the expanded row to join up with the
56
56
  // preceding table row via negative margins
57
57
  'margin-top', mathWithUnits([cellContentPadding, euiTheme.border.width.thin], function (x, y) {
58
- return (x + y) * -1;
59
- })), logicalCSS('padding-left', cellContentPadding), " ", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('border-top-left-radius', 0), " ", logicalCSS('border-top-right-radius', 0), ">.euiTableRowCell{", logicalCSS('width', '100%'), ";}", expandedAnimationCss, ";;label:expanded;")
58
+ return (x + y * 2) * -1;
59
+ })), logicalCSS('padding-left', cellContentPadding), " ", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('border-top-left-radius', 0), " ", logicalCSS('border-top-right-radius', 0), " &:after{", logicalCSS('border-top', 'none'), ";}clip-path:polygon(-50% 0, 150% 0, 150% 100vh, -50% 100vh);>.euiTableRowCell{", logicalCSS('width', '100%'), ";}", expandedAnimationCss, ";;label:expanded;")
60
60
  }
61
61
  };
62
62
  };
@@ -6,13 +6,19 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- import { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge } from '@elastic/eui-theme-common';
9
+ import { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge, euiShadowHover } from '@elastic/eui-theme-common';
10
10
  import { useEuiTheme } from '../../services/theme';
11
- export { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge };
11
+ export { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge, euiShadowHover };
12
+
13
+ /** @deprecated */
14
+
15
+ /** @deprecated use euiShadowHover/useEuiShadowHover instead */
12
16
  export var useEuiSlightShadowHover = function useEuiSlightShadowHover(options) {
13
17
  var euiThemeContext = useEuiTheme();
14
18
  return euiSlightShadowHover(euiThemeContext, options);
15
19
  };
20
+
21
+ /** @deprecated - useEuiShadow instead */
16
22
  export var useEuiShadowFlat = function useEuiShadowFlat(options) {
17
23
  var euiThemeContext = useEuiTheme();
18
24
  return euiShadowFlat(euiThemeContext, options);
@@ -22,4 +28,10 @@ export var useEuiShadow = function useEuiShadow() {
22
28
  var options = arguments.length > 1 ? arguments[1] : undefined;
23
29
  var euiThemeContext = useEuiTheme();
24
30
  return euiShadow(euiThemeContext, size, options);
31
+ };
32
+ export var useEuiShadowHover = function useEuiShadowHover() {
33
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'l';
34
+ var options = arguments.length > 1 ? arguments[1] : undefined;
35
+ var euiThemeContext = useEuiTheme();
36
+ return euiShadowHover(euiThemeContext, size, options);
25
37
  };