@elastic/eui 64.0.0 → 64.0.3

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 (185) hide show
  1. package/dist/eui_charts_theme.js +330 -330
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +7 -313
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +7 -313
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/basic_table/collapsed_item_actions.js +1 -2
  8. package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  9. package/es/components/button/button_display/_button_display.js +6 -1
  10. package/es/components/button/button_empty/button_empty.js +10 -1
  11. package/es/components/card/card.js +10 -1
  12. package/es/components/card/card_select.js +10 -1
  13. package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  14. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
  15. package/es/components/description_list/description_list_title.js +1 -1
  16. package/es/components/expression/expression.js +12 -2
  17. package/es/components/header/header_links/header_link.js +10 -1
  18. package/es/components/header/header_section/header_section_item.js +4 -3
  19. package/es/components/image/image.js +6 -1
  20. package/es/components/image/image_button.styles.js +1 -1
  21. package/es/components/link/link.styles.js +6 -5
  22. package/es/components/notification/notification_event.js +10 -1
  23. package/es/components/page/page_content/page_content.js +1 -2
  24. package/es/components/page/page_content/page_content_body.js +1 -2
  25. package/es/components/page/page_content/page_content_header.js +1 -2
  26. package/es/components/page/page_content/page_content_header_section.js +1 -2
  27. package/es/components/page/page_section/page_section.js +15 -3
  28. package/es/components/page/page_side_bar/page_side_bar.js +1 -2
  29. package/es/components/page/page_sidebar/page_sidebar.js +5 -1
  30. package/es/components/page/page_template.js +3 -1
  31. package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  32. package/es/components/page_template/page_template.js +18 -2
  33. package/es/components/pagination/pagination_button.js +10 -1
  34. package/es/components/progress/progress.js +6 -1
  35. package/es/components/provider/cache/cache_provider.js +3 -9
  36. package/es/components/provider/provider.js +25 -2
  37. package/es/components/resizable_container/resizable_panel.js +6 -1
  38. package/es/components/side_nav/side_nav.js +5 -0
  39. package/es/components/text/text.styles.js +1 -1
  40. package/es/components/toast/global_toast_list.styles.js +2 -2
  41. package/es/global_styling/functions/logicals.js +16 -2
  42. package/es/global_styling/mixins/_helpers.js +11 -4
  43. package/es/global_styling/mixins/_states.js +3 -4
  44. package/es/global_styling/mixins/_typography.js +3 -1
  45. package/es/global_styling/reset/global_styles.js +1 -1
  46. package/es/global_styling/utility/utility.js +10 -2
  47. package/es/services/theme/hooks.js +11 -16
  48. package/eui.d.ts +98 -79
  49. package/i18ntokens.json +8 -8
  50. package/lib/components/basic_table/collapsed_item_actions.js +1 -2
  51. package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  52. package/lib/components/button/button_display/_button_display.js +6 -1
  53. package/lib/components/button/button_empty/button_empty.js +10 -1
  54. package/lib/components/card/card.js +10 -1
  55. package/lib/components/card/card_select.js +10 -1
  56. package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  57. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  58. package/lib/components/description_list/description_list_title.js +1 -1
  59. package/lib/components/expression/expression.js +12 -2
  60. package/lib/components/header/header_links/header_link.js +10 -1
  61. package/lib/components/header/header_section/header_section_item.js +4 -3
  62. package/lib/components/image/image.js +6 -1
  63. package/lib/components/image/image_button.styles.js +1 -1
  64. package/lib/components/link/link.styles.js +6 -5
  65. package/lib/components/notification/notification_event.js +10 -1
  66. package/lib/components/page/page_content/page_content.js +1 -2
  67. package/lib/components/page/page_content/page_content_body.js +1 -2
  68. package/lib/components/page/page_content/page_content_header.js +1 -2
  69. package/lib/components/page/page_content/page_content_header_section.js +1 -2
  70. package/lib/components/page/page_section/page_section.js +15 -3
  71. package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  72. package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  73. package/lib/components/page/page_template.js +3 -1
  74. package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  75. package/lib/components/page_template/page_template.js +18 -2
  76. package/lib/components/progress/progress.js +6 -1
  77. package/lib/components/provider/cache/cache_provider.js +3 -11
  78. package/lib/components/provider/provider.js +31 -6
  79. package/lib/components/resizable_container/resizable_panel.js +6 -1
  80. package/lib/components/side_nav/side_nav.js +5 -0
  81. package/lib/components/text/text.styles.js +1 -1
  82. package/lib/components/toast/global_toast_list.styles.js +1 -1
  83. package/lib/global_styling/functions/logicals.js +21 -4
  84. package/lib/global_styling/mixins/_helpers.js +17 -6
  85. package/lib/global_styling/mixins/_states.js +3 -4
  86. package/lib/global_styling/mixins/_typography.js +4 -1
  87. package/lib/global_styling/reset/global_styles.js +1 -1
  88. package/lib/global_styling/utility/utility.js +16 -3
  89. package/lib/services/theme/hooks.js +10 -15
  90. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
  91. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  92. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
  93. package/optimize/es/components/description_list/description_list_title.js +1 -1
  94. package/optimize/es/components/header/header_section/header_section_item.js +4 -3
  95. package/optimize/es/components/image/image_button.styles.js +1 -1
  96. package/optimize/es/components/link/link.styles.js +6 -5
  97. package/optimize/es/components/page/page_content/page_content.js +1 -2
  98. package/optimize/es/components/page/page_content/page_content_body.js +1 -2
  99. package/optimize/es/components/page/page_content/page_content_header.js +1 -2
  100. package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
  101. package/optimize/es/components/page/page_section/page_section.js +4 -2
  102. package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
  103. package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
  104. package/optimize/es/components/page/page_template.js +3 -1
  105. package/optimize/es/components/provider/cache/cache_provider.js +3 -9
  106. package/optimize/es/components/provider/provider.js +25 -2
  107. package/optimize/es/components/text/text.styles.js +1 -1
  108. package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
  109. package/optimize/es/global_styling/functions/logicals.js +16 -2
  110. package/optimize/es/global_styling/mixins/_helpers.js +11 -4
  111. package/optimize/es/global_styling/mixins/_states.js +3 -4
  112. package/optimize/es/global_styling/mixins/_typography.js +3 -1
  113. package/optimize/es/global_styling/reset/global_styles.js +1 -1
  114. package/optimize/es/global_styling/utility/utility.js +10 -2
  115. package/optimize/es/services/theme/hooks.js +11 -16
  116. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
  117. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  118. package/optimize/lib/components/description_list/description_list_title.js +1 -1
  119. package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
  120. package/optimize/lib/components/image/image_button.styles.js +1 -1
  121. package/optimize/lib/components/link/link.styles.js +6 -5
  122. package/optimize/lib/components/page/page_content/page_content.js +1 -2
  123. package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
  124. package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
  125. package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
  126. package/optimize/lib/components/page/page_section/page_section.js +4 -2
  127. package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  128. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  129. package/optimize/lib/components/page/page_template.js +3 -1
  130. package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
  131. package/optimize/lib/components/provider/provider.js +31 -6
  132. package/optimize/lib/components/text/text.styles.js +1 -1
  133. package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
  134. package/optimize/lib/global_styling/functions/logicals.js +21 -4
  135. package/optimize/lib/global_styling/mixins/_helpers.js +17 -6
  136. package/optimize/lib/global_styling/mixins/_states.js +3 -4
  137. package/optimize/lib/global_styling/mixins/_typography.js +4 -1
  138. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  139. package/optimize/lib/global_styling/utility/utility.js +16 -3
  140. package/optimize/lib/services/theme/hooks.js +10 -15
  141. package/package.json +1 -1
  142. package/src/components/datagrid/_data_grid_data_row.scss +7 -0
  143. package/src/components/header/header_section/_header_section_item.scss +1 -1
  144. package/src/global_styling/mixins/_helpers.scss +9 -0
  145. package/src/global_styling/utility/_utility.scss +0 -127
  146. package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
  147. package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
  148. package/test-env/components/button/button_display/_button_display.js +6 -1
  149. package/test-env/components/button/button_empty/button_empty.js +10 -1
  150. package/test-env/components/card/card.js +10 -1
  151. package/test-env/components/card/card_select.js +10 -1
  152. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  153. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  154. package/test-env/components/description_list/description_list_title.js +1 -1
  155. package/test-env/components/expression/expression.js +12 -2
  156. package/test-env/components/header/header_links/header_link.js +10 -1
  157. package/test-env/components/header/header_section/header_section_item.js +4 -3
  158. package/test-env/components/image/image.js +6 -1
  159. package/test-env/components/image/image_button.styles.js +1 -1
  160. package/test-env/components/link/link.styles.js +6 -5
  161. package/test-env/components/notification/notification_event.js +10 -1
  162. package/test-env/components/page/page_content/page_content.js +1 -2
  163. package/test-env/components/page/page_content/page_content_body.js +1 -2
  164. package/test-env/components/page/page_content/page_content_header.js +1 -2
  165. package/test-env/components/page/page_content/page_content_header_section.js +1 -2
  166. package/test-env/components/page/page_section/page_section.js +15 -3
  167. package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
  168. package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
  169. package/test-env/components/page/page_template.js +3 -1
  170. package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  171. package/test-env/components/page_template/page_template.js +18 -2
  172. package/test-env/components/progress/progress.js +6 -1
  173. package/test-env/components/provider/cache/cache_provider.js +3 -11
  174. package/test-env/components/provider/provider.js +31 -6
  175. package/test-env/components/resizable_container/resizable_panel.js +6 -1
  176. package/test-env/components/side_nav/side_nav.js +5 -0
  177. package/test-env/components/text/text.styles.js +1 -1
  178. package/test-env/components/toast/global_toast_list.styles.js +1 -1
  179. package/test-env/global_styling/functions/logicals.js +21 -4
  180. package/test-env/global_styling/mixins/_helpers.js +17 -6
  181. package/test-env/global_styling/mixins/_states.js +3 -4
  182. package/test-env/global_styling/mixins/_typography.js +4 -1
  183. package/test-env/global_styling/reset/global_styles.js +1 -1
  184. package/test-env/global_styling/utility/utility.js +16 -3
  185. package/test-env/services/theme/hooks.js +10 -15
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = void 0;
6
+ exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
7
7
 
8
8
  var _theme = require("../../services/theme");
9
9
 
10
10
  var _color = require("../../services/color");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -38,7 +40,7 @@ var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
38
40
  // so it's being added to this mixin for allowing support wherever custom scrollbars are
39
41
 
40
42
  var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
41
- return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n width: ").concat(scrollBarSize, ";\n height: ").concat(scrollBarSize, ";\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
43
+ return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat((0, _functions.logicalCSS)('width', scrollBarSize), "\n ").concat((0, _functions.logicalCSS)('height', scrollBarSize), "\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
42
44
  };
43
45
 
44
46
  exports.euiScrollBarStyles = euiScrollBarStyles;
@@ -92,12 +94,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
92
94
  */
93
95
 
94
96
 
95
- // TODO: How do we use Emotion to output the CSS class utilities instead?
96
97
  var euiYScroll = function euiYScroll(euiTheme) {
97
98
  var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
98
99
  height = _ref5.height;
99
100
 
100
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n height: ").concat(height || '100%', ";\n overflow-y: auto;\n overflow-x: hidden;\n &:focus {\n outline: none; /* 1 */\n }\n");
101
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSS)('height', height || '100%'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-y', 'auto'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
101
102
  };
102
103
 
103
104
  exports.euiYScroll = euiYScroll;
@@ -140,7 +141,7 @@ var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
140
141
  exports.useEuiYScrollWithShadows = useEuiYScrollWithShadows;
141
142
 
142
143
  var euiXScroll = function euiXScroll(euiTheme) {
143
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x: auto;\n &:focus {\n outline: none; /* 1 */\n }\n");
144
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
144
145
  };
145
146
 
146
147
  exports.euiXScroll = euiXScroll;
@@ -196,5 +197,15 @@ var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
196
197
  mask: mask
197
198
  });
198
199
  };
200
+ /**
201
+ * For quickly applying a full-height element whether using flex or not
202
+ */
203
+
204
+
205
+ exports.useEuiOverflowScroll = useEuiOverflowScroll;
206
+
207
+ var euiFullHeight = function euiFullHeight() {
208
+ return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
209
+ };
199
210
 
200
- exports.useEuiOverflowScroll = useEuiOverflowScroll;
211
+ exports.euiFullHeight = euiFullHeight;
@@ -23,7 +23,8 @@ var _services = require("../../services");
23
23
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
24
24
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
25
25
  */
26
- var euiFocusRing = function euiFocusRing(euiTheme) {
26
+ var euiFocusRing = function euiFocusRing(_ref) {
27
+ var euiTheme = _ref.euiTheme;
27
28
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
28
29
  var options = arguments.length > 2 ? arguments[2] : undefined;
29
30
  // Width is enforced as a constant at the global theme layer
@@ -51,9 +52,7 @@ var euiFocusRing = function euiFocusRing(euiTheme) {
51
52
  exports.euiFocusRing = euiFocusRing;
52
53
 
53
54
  var useEuiFocusRing = function useEuiFocusRing(offset, color) {
54
- var _useEuiTheme = (0, _services.useEuiTheme)(),
55
- euiTheme = _useEuiTheme.euiTheme;
56
-
55
+ var euiTheme = (0, _services.useEuiTheme)();
57
56
  return euiFocusRing(euiTheme, offset, {
58
57
  color: color
59
58
  });
@@ -9,6 +9,8 @@ var _typography = require("../functions/typography");
9
9
 
10
10
  var _hooks = require("../../services/theme/hooks");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -54,7 +56,8 @@ exports.euiTextBreakWord = euiTextBreakWord;
54
56
 
55
57
  var euiTextTruncate = function euiTextTruncate() {
56
58
  var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
57
- return "\n max-width: ".concat(maxWidth, "; // Ensure that the node has a maximum width after which truncation can occur\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
59
+ return "\n ".concat((0, _functions.logicalCSS)('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
60
+ , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
58
61
  };
59
62
  /**
60
63
  * Fixed-width numbers for tabular data
@@ -55,7 +55,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
55
55
  * Final styles
56
56
  */
57
57
 
58
- var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiTheme), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
58
+ var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiThemeContext), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
59
59
  return (0, _react2.jsx)(_react2.Global, {
60
60
  styles: styles
61
61
  });
@@ -5,14 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.EuiUtilityClasses = void 0;
8
+ exports.globalStyles = exports.EuiUtilityClasses = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _react2 = require("@emotion/react");
13
13
 
14
+ var _hooks = require("../../services/theme/hooks");
15
+
14
16
  var _screen_reader_only = require("../../components/accessibility/screen_reader_only/screen_reader_only.styles");
15
17
 
18
+ var _mixins = require("../mixins");
19
+
20
+ var _functions = require("../functions");
21
+
16
22
  /*
17
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,11 +26,18 @@ var _screen_reader_only = require("../../components/accessibility/screen_reader_
20
26
  * in compliance with, at your election, the Elastic License 2.0 or the Server
21
27
  * Side Public License, v 1.
22
28
  */
23
- var globalStyles = /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";};label:globalStyles;");
29
+ var globalStyles = function globalStyles(euiThemeContext) {
30
+ return /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";}.eui-alignBaseline{vertical-align:baseline!important;}.eui-alignBottom{vertical-align:bottom!important;}.eui-alignMiddle{vertical-align:middle!important;}.eui-alignTop{vertical-align:top!important;}.eui-displayBlock{display:block!important;}.eui-displayInline{display:inline!important;}.eui-displayInlineBlock{display:inline-block!important;}.eui-fullWidth{display:block!important;", (0, _functions.logicalCSS)('width', '100% !important'), ";}.eui-fullHeight{", (0, _mixins.euiFullHeight)(), ";}.eui-textCenter{text-align:center!important;}.eui-textLeft{text-align:start!important;}.eui-textRight{text-align:end!important;}.eui-textNoWrap{white-space:nowrap!important;}.eui-textInheritColor{color:inherit!important;}.eui-textBreakWord{", (0, _mixins.euiTextBreakWord)(), ";}.eui-textBreakAll{overflow-wrap:break-word!important;word-break:break-all!important;}.eui-textBreakNormal{overflow-wrap:normal!important;word-wrap:normal!important;word-break:normal!important;}.eui-textTruncate{", (0, _mixins.euiTextTruncate)(), ";}.eui-textNumber{", (0, _mixins.euiNumberFormat)(euiThemeContext), ";}.eui-scrollBar{", (0, _mixins.euiScrollBarStyles)(euiThemeContext), ";}.eui-yScroll{", (0, _mixins.euiYScroll)(euiThemeContext), ";}.eui-xScroll{", (0, _mixins.euiXScroll)(euiThemeContext), ";}.eui-yScrollWithShadows{", (0, _mixins.euiYScrollWithShadows)(euiThemeContext), ";}.eui-xScrollWithShadows{", (0, _mixins.euiXScrollWithShadows)(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
31
+ return "\n .eui-hideFor--".concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
32
+ }), ";;label:globalStyles;");
33
+ };
34
+
35
+ exports.globalStyles = globalStyles;
24
36
 
25
37
  var EuiUtilityClasses = function EuiUtilityClasses() {
38
+ var euiTheme = (0, _hooks.useEuiTheme)();
26
39
  return (0, _react2.jsx)(_react2.Global, {
27
- styles: globalStyles
40
+ styles: globalStyles(euiTheme)
28
41
  });
29
42
  };
30
43
 
@@ -32,11 +32,14 @@ var useEuiTheme = function useEuiTheme() {
32
32
  var theme = (0, _react.useContext)(_context.EuiThemeContext);
33
33
  var colorMode = (0, _react.useContext)(_context.EuiColorModeContext);
34
34
  var modifications = (0, _react.useContext)(_context.EuiModificationsContext);
35
- return {
36
- euiTheme: theme,
37
- colorMode: colorMode,
38
- modifications: modifications
39
- };
35
+ var assembledTheme = (0, _react.useMemo)(function () {
36
+ return {
37
+ euiTheme: theme,
38
+ colorMode: colorMode,
39
+ modifications: modifications
40
+ };
41
+ }, [theme, colorMode, modifications]);
42
+ return assembledTheme;
40
43
  };
41
44
 
42
45
  exports.useEuiTheme = useEuiTheme;
@@ -47,17 +50,9 @@ var withEuiTheme = function withEuiTheme(Component) {
47
50
  var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
48
51
 
49
52
  var Render = function Render(props, ref) {
50
- var _useEuiTheme = useEuiTheme(),
51
- euiTheme = _useEuiTheme.euiTheme,
52
- colorMode = _useEuiTheme.colorMode,
53
- modifications = _useEuiTheme.modifications;
54
-
53
+ var theme = useEuiTheme();
55
54
  return (0, _react2.jsx)(Component, (0, _extends2.default)({
56
- theme: {
57
- euiTheme: euiTheme,
58
- colorMode: colorMode,
59
- modifications: modifications
60
- },
55
+ theme: theme,
61
56
  ref: ref
62
57
  }, props));
63
58
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "64.0.0",
4
+ "version": "64.0.3",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -104,6 +104,13 @@
104
104
  max-width: 400px !important;
105
105
  max-height: 400px !important;
106
106
  z-index: $euiZDataGridCellPopover !important;
107
+ // Workaround for a Safari CSS bug when using both `overflow: auto` & `filter: drop-shadow`
108
+ // (see https://github.com/elastic/eui/issues/6151)
109
+ // Disables the default EuiPopover filter drop-shadow and uses box-shadow instead,
110
+ // since we don't use the popover arrow in any case for cell popovers
111
+ filter: none;
112
+ // sass-lint:disable-block mixins-before-declarations
113
+ @include euiBottomShadow; // TODO: Convert to euiShadowMedium() in Emotion
107
114
  }
108
115
 
109
116
  .euiDataGridRowCell__expandFlex {
@@ -41,4 +41,4 @@
41
41
  display: none;
42
42
  }
43
43
  }
44
- }
44
+ }
@@ -82,6 +82,15 @@
82
82
  @include euiOverflowShadow('x');
83
83
  }
84
84
 
85
+ /**
86
+ * For quickly applying a full-height element whether using flex or not
87
+ */
88
+ @mixin euiFullHeight {
89
+ height: 100%;
90
+ flex: 1 1 auto;
91
+ overflow: hidden;
92
+ }
93
+
85
94
  // Hiding elements offscreen to only be read by screen reader
86
95
  // See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
87
96
  @mixin euiScreenReaderOnly {
@@ -1,84 +1,6 @@
1
1
  // This file utilizes !importants on purpose
2
2
  // sass-lint:disable no-important
3
3
 
4
- // Vertical alignment
5
- .eui-alignBaseline { vertical-align: baseline !important; }
6
- .eui-alignBottom { vertical-align: bottom !important; }
7
- .eui-alignMiddle { vertical-align: middle !important; }
8
- .eui-alignTop { vertical-align: top !important; }
9
-
10
- // Display
11
- .eui-displayBlock {display: block !important;}
12
- .eui-displayInline {display: inline !important;}
13
- .eui-displayInlineBlock {display: inline-block !important;}
14
-
15
- .eui-fullWidth {
16
- display: block !important;
17
- width: 100% !important;
18
- }
19
-
20
- // Text
21
- .eui-textCenter {text-align: center !important;}
22
- .eui-textLeft {text-align: left !important;}
23
- .eui-textRight {text-align: right !important;}
24
- .eui-textNoWrap {white-space: nowrap !important;}
25
- .eui-textInheritColor {color: inherit !important;}
26
-
27
- .eui-textBreakWord {
28
- @include euiTextBreakWord;
29
- }
30
-
31
- .eui-textBreakAll {
32
- overflow-wrap: break-word !important; // Fixes FF when dashes are involved #2288
33
- word-break: break-all !important;
34
- }
35
-
36
- .eui-textBreakNormal {
37
- overflow-wrap: normal !important;
38
- word-wrap: normal !important;
39
- word-break: normal !important;
40
- }
41
-
42
- .eui-textTruncate {
43
- @include euiTextTruncate;
44
- }
45
-
46
- .eui-textNumber {
47
- @include euiNumberFormat;
48
- }
49
-
50
- /**
51
- * Responsive
52
- *
53
- * 1. Be sure to hide the element initially
54
- */
55
-
56
- [class*='eui-showFor'] {
57
- display: none !important; /* 1 */
58
- }
59
-
60
- @each $size in $euiBreakpointKeys {
61
- .eui-hideFor--#{$size} {
62
- @include euiBreakpoint($size) { display: none !important; }
63
- }
64
-
65
- .eui-showFor--#{$size} {
66
- @include euiBreakpoint($size) { display: inline !important; }
67
- }
68
-
69
- .eui-showFor--#{$size}--block {
70
- @include euiBreakpoint($size) { display: block !important; }
71
- }
72
-
73
- .eui-showFor--#{$size}--inlineBlock {
74
- @include euiBreakpoint($size) { display: inline-block !important; }
75
- }
76
-
77
- .eui-showFor--#{$size}--flex {
78
- @include euiBreakpoint($size) { display: flex !important; }
79
- }
80
- }
81
-
82
4
  /**
83
5
  * IE doesn't properly wrap groups if it is within a flex-item of a flex-group.
84
6
  * Adding the following styles to the flex-item that contains the wrapping group, will fix IE.
@@ -91,52 +13,3 @@
91
13
  flex-basis: 0%;
92
14
  }
93
15
  }
94
-
95
- /**
96
- * Scroll bar only
97
- */
98
- .eui-scrollBar {
99
- @include euiScrollBar;
100
- }
101
-
102
- /**
103
- * Overflow scrolling
104
- */
105
- .eui-yScroll {
106
- @include euiYScroll;
107
- }
108
-
109
- .eui-xScroll {
110
- @include euiXScroll;
111
- }
112
-
113
- /**
114
- * Overflow scrolling with shadows
115
- */
116
- .eui-yScrollWithShadows {
117
- @include euiYScrollWithShadows;
118
- }
119
-
120
- .eui-xScrollWithShadows {
121
- @include euiXScrollWithShadows;
122
- }
123
-
124
- /**
125
- * Forcing focus ring on non-EUI elements
126
- */
127
- .eui-isFocusable:focus {
128
- @include euiFocusRing('large');
129
- }
130
-
131
- /**
132
- * For quickly applying a full-height element whether using flex or not
133
- */
134
- @mixin euiFullHeight {
135
- height: 100%;
136
- flex: 1 1 auto;
137
- overflow: hidden;
138
- }
139
-
140
- .eui-fullHeight {
141
- @include euiFullHeight;
142
- }
@@ -98,8 +98,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
98
98
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
99
99
  if (!_this.popoverDiv) {
100
100
  _this.popoverDiv = popoverDiv;
101
-
102
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
103
102
  }
104
103
  });
105
104
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -55,8 +55,8 @@ var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeCon
55
55
  isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
56
56
  isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
57
57
  // Types
58
- page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiTheme, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiTheme, 'center'), ";};label:page;"),
59
- application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";background-color:", (0, _color.transparentize)(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(euiTheme, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
58
+ page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
59
+ application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";background-color:", (0, _color.transparentize)(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
60
60
  applicationStyles: {
61
61
  onlyChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.m), ",;;label:onlyChild;"),
62
62
  firstChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, " 0 0 ", euiTheme.border.radius.medium, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), ",;;label:firstChild;"),
@@ -106,7 +106,12 @@ EuiButtonDisplay.propTypes = {
106
106
  /**
107
107
  * Object of props passed to the <span/> wrapping the button's content
108
108
  */
109
- contentProps: _propTypes.default.any,
109
+ contentProps: _propTypes.default.shape({
110
+ className: _propTypes.default.string,
111
+ "aria-label": _propTypes.default.string,
112
+ "data-test-subj": _propTypes.default.string,
113
+ css: _propTypes.default.any
114
+ }),
110
115
  style: _propTypes.default.any,
111
116
 
112
117
  /**
@@ -199,7 +199,16 @@ EuiButtonEmpty.propTypes = {
199
199
  /**
200
200
  * Object of props passed to the <span/> wrapping the button's content
201
201
  */
202
- contentProps: _propTypes.default.any,
202
+
203
+ /**
204
+ * Object of props passed to the <span/> wrapping the button's content
205
+ */
206
+ contentProps: _propTypes.default.shape({
207
+ className: _propTypes.default.string,
208
+ "aria-label": _propTypes.default.string,
209
+ "data-test-subj": _propTypes.default.string,
210
+ css: _propTypes.default.any
211
+ }),
203
212
 
204
213
  /**
205
214
  * Any `type` accepted by EuiIcon
@@ -414,7 +414,16 @@ EuiCard.propTypes = {
414
414
  /**
415
415
  * Object of props passed to the <span/> wrapping the button's content
416
416
  */
417
- contentProps: _propTypes.default.any,
417
+
418
+ /**
419
+ * Object of props passed to the <span/> wrapping the button's content
420
+ */
421
+ contentProps: _propTypes.default.shape({
422
+ className: _propTypes.default.string,
423
+ "aria-label": _propTypes.default.string,
424
+ "data-test-subj": _propTypes.default.string,
425
+ css: _propTypes.default.any
426
+ }),
418
427
 
419
428
  /**
420
429
  * Any `type` accepted by EuiIcon
@@ -111,7 +111,16 @@ EuiCardSelect.propTypes = {
111
111
  /**
112
112
  * Object of props passed to the <span/> wrapping the button's content
113
113
  */
114
- contentProps: _propTypes.default.any,
114
+
115
+ /**
116
+ * Object of props passed to the <span/> wrapping the button's content
117
+ */
118
+ contentProps: _propTypes.default.shape({
119
+ className: _propTypes.default.string,
120
+ "aria-label": _propTypes.default.string,
121
+ "data-test-subj": _propTypes.default.string,
122
+ css: _propTypes.default.any
123
+ }),
115
124
 
116
125
  /**
117
126
  * Any `type` accepted by EuiIcon
@@ -212,7 +212,12 @@ EuiAutoRefreshButton.propTypes = {
212
212
  /**
213
213
  * Object of props passed to the <span/> wrapping the button's content
214
214
  */
215
- contentProps: _propTypes.default.any,
215
+ contentProps: _propTypes.default.shape({
216
+ className: _propTypes.default.string,
217
+ "aria-label": _propTypes.default.string,
218
+ "data-test-subj": _propTypes.default.string,
219
+ css: _propTypes.default.any
220
+ }),
216
221
 
217
222
  /**
218
223
  * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
@@ -100,7 +100,12 @@ var EuiDatePopoverButton = function EuiDatePopoverButton(props) {
100
100
  exports.EuiDatePopoverButton = EuiDatePopoverButton;
101
101
  EuiDatePopoverButton.propTypes = {
102
102
  className: _propTypes.default.string,
103
- buttonProps: _propTypes.default.any,
103
+ buttonProps: _propTypes.default.shape({
104
+ className: _propTypes.default.string,
105
+ "aria-label": _propTypes.default.string,
106
+ "data-test-subj": _propTypes.default.string,
107
+ css: _propTypes.default.any
108
+ }),
104
109
  dateFormat: _propTypes.default.string.isRequired,
105
110
  isDisabled: _propTypes.default.bool,
106
111
  isInvalid: _propTypes.default.bool,
@@ -48,7 +48,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
48
48
 
49
49
  var theme = (0, _services.useEuiTheme)();
50
50
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
51
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
51
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
52
52
 
53
53
  switch (type) {
54
54
  case 'inline':
@@ -109,7 +109,12 @@ EuiExpression.propTypes = {
109
109
  * First part of the expression
110
110
  */
111
111
  description: _propTypes.default.node.isRequired,
112
- descriptionProps: _propTypes.default.any,
112
+ descriptionProps: _propTypes.default.shape({
113
+ className: _propTypes.default.string,
114
+ "aria-label": _propTypes.default.string,
115
+ "data-test-subj": _propTypes.default.string,
116
+ css: _propTypes.default.any
117
+ }),
113
118
 
114
119
  /**
115
120
  * Second part of the expression
@@ -119,7 +124,12 @@ EuiExpression.propTypes = {
119
124
  * Second part of the expression
120
125
  */
121
126
  value: _propTypes.default.node,
122
- valueProps: _propTypes.default.any,
127
+ valueProps: _propTypes.default.shape({
128
+ className: _propTypes.default.string,
129
+ "aria-label": _propTypes.default.string,
130
+ "data-test-subj": _propTypes.default.string,
131
+ css: _propTypes.default.any
132
+ }),
123
133
 
124
134
  /**
125
135
  * Color of the `description`
@@ -104,7 +104,16 @@ EuiHeaderLink.propTypes = {
104
104
  /**
105
105
  * Object of props passed to the <span/> wrapping the button's content
106
106
  */
107
- contentProps: _propTypes.default.any,
107
+
108
+ /**
109
+ * Object of props passed to the <span/> wrapping the button's content
110
+ */
111
+ contentProps: _propTypes.default.shape({
112
+ className: _propTypes.default.string,
113
+ "aria-label": _propTypes.default.string,
114
+ "data-test-subj": _propTypes.default.string,
115
+ css: _propTypes.default.any
116
+ }),
108
117
 
109
118
  /**
110
119
  * Any `type` accepted by EuiIcon
@@ -32,10 +32,11 @@ var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
32
32
  children = _ref.children,
33
33
  className = _ref.className,
34
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
35
- var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className);
36
- return (0, _react2.jsx)("div", (0, _extends2.default)({
35
+ var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
36
+
37
+ return children ? (0, _react2.jsx)("div", (0, _extends2.default)({
37
38
  className: classes
38
- }, rest), children);
39
+ }, rest), children) : null;
39
40
  };
40
41
 
41
42
  exports.EuiHeaderSectionItem = EuiHeaderSectionItem;
@@ -174,5 +174,10 @@ EuiImage.propTypes = {
174
174
  /**
175
175
  * Props to add to the wrapping figure element
176
176
  */
177
- wrapperProps: _propTypes.default.any
177
+ wrapperProps: _propTypes.default.shape({
178
+ className: _propTypes.default.string,
179
+ "aria-label": _propTypes.default.string,
180
+ "data-test-subj": _propTypes.default.string,
181
+ css: _propTypes.default.any
182
+ })
178
183
  };
@@ -17,7 +17,7 @@ var euiImageButtonStyles = function euiImageButtonStyles(euiThemeContext) {
17
17
  var euiTheme = euiThemeContext.euiTheme;
18
18
  return {
19
19
  // Base
20
- euiImageButton: /*#__PURE__*/(0, _react.css)("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", _global_styling.euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", (0, _global_styling.euiFocusRing)(euiTheme, 'outset'), ";};label:euiImageButton;"),
20
+ euiImageButton: /*#__PURE__*/(0, _react.css)("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", _global_styling.euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), ";};label:euiImageButton;"),
21
21
  fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
22
22
  shadowHover: /*#__PURE__*/(0, _react.css)("&::before{", (0, _mixins.euiShadow)(euiThemeContext, 's'), ";};label:shadowHover;"),
23
23
  hasShadowHover: /*#__PURE__*/(0, _react.css)("&::before{", (0, _mixins.euiShadow)(euiThemeContext, 'm'), ";};label:hasShadowHover;")
@@ -27,8 +27,9 @@ var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
27
27
 
28
28
  exports.euiLinkFocusCSS = euiLinkFocusCSS;
29
29
 
30
- var euiLinkCSS = function euiLinkCSS(euiTheme) {
31
- return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n text-align: left;\n\n &:hover {\n ").concat(euiLinkHoverCSS(), "\n }\n\n &:focus {\n ").concat((0, _global_styling.euiFocusRing)(euiTheme, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
30
+ var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
31
+ var euiTheme = euiThemeContext.euiTheme;
32
+ return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n text-align: left;\n\n &:hover {\n ").concat(euiLinkHoverCSS(), "\n }\n\n &:focus {\n ").concat((0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
32
33
  };
33
34
 
34
35
  exports.euiLinkCSS = euiLinkCSS;
@@ -42,10 +43,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
42
43
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
43
44
  };
44
45
 
45
- var euiLinkStyles = function euiLinkStyles(_ref2) {
46
- var euiTheme = _ref2.euiTheme;
46
+ var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
47
+ var euiTheme = euiThemeContext.euiTheme;
47
48
  return {
48
- euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(euiTheme), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
49
+ euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
49
50
  disabled: _ref,
50
51
  // Color styles
51
52
  primary: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.primaryText), ";label:primary;"),