@elastic/eui 59.1.0-rc1 → 60.0.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 (236) 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 +0 -48
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -48
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/accessibility/skip_link/skip_link.js +42 -7
  8. package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
  9. package/es/components/avatar/avatar.js +7 -9
  10. package/es/components/bottom_bar/bottom_bar.js +9 -8
  11. package/es/components/breadcrumbs/breadcrumbs.js +1 -2
  12. package/es/components/call_out/call_out.js +8 -9
  13. package/es/components/combo_box/matching_options.js +3 -2
  14. package/es/components/expression/expression.js +10 -11
  15. package/es/components/facet/facet_button.js +8 -9
  16. package/es/components/facet/facet_group.js +7 -8
  17. package/es/components/health/health.js +6 -7
  18. package/es/components/horizontal_rule/horizontal_rule.js +6 -7
  19. package/es/components/link/link.js +7 -8
  20. package/es/components/loading/loading_chart.js +6 -7
  21. package/es/components/loading/loading_content.js +6 -7
  22. package/es/components/loading/loading_logo.js +6 -7
  23. package/es/components/loading/loading_spinner.js +6 -7
  24. package/es/components/mark/mark.js +8 -9
  25. package/es/components/markdown_editor/markdown_format.js +6 -7
  26. package/es/components/panel/panel.js +7 -8
  27. package/es/components/provider/cache/index.js +0 -1
  28. package/es/components/provider/index.js +1 -1
  29. package/es/components/provider/provider.js +3 -7
  30. package/es/components/selectable/selectable.js +39 -22
  31. package/es/components/spacer/spacer.js +6 -7
  32. package/es/components/stat/stat.js +28 -35
  33. package/es/components/stat/stat.styles.js +38 -0
  34. package/es/components/text/text.js +6 -7
  35. package/es/components/text/text_color.js +6 -7
  36. package/es/components/timeline/timeline.js +15 -8
  37. package/es/components/timeline/timeline.styles.js +29 -0
  38. package/es/components/timeline/timeline_item.js +7 -20
  39. package/es/components/timeline/timeline_item.styles.js +18 -3
  40. package/es/components/timeline/timeline_item_icon.js +6 -7
  41. package/es/components/timeline/timeline_item_icon.styles.js +14 -4
  42. package/es/components/title/title.js +6 -7
  43. package/es/global_styling/functions/logicals.js +2 -2
  44. package/es/global_styling/utility/utility.js +1 -13
  45. package/es/test/emotion-prefix.js +29 -0
  46. package/es/test/index.d.ts +5 -0
  47. package/es/test/index.js +2 -1
  48. package/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
  49. package/es/themes/index.js +2 -1
  50. package/eui.d.ts +507 -941
  51. package/i18ntokens.json +28 -28
  52. package/lib/components/accessibility/skip_link/skip_link.js +45 -11
  53. package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
  54. package/lib/components/avatar/avatar.js +8 -12
  55. package/lib/components/bottom_bar/bottom_bar.js +6 -9
  56. package/lib/components/breadcrumbs/breadcrumbs.js +1 -2
  57. package/lib/components/call_out/call_out.js +10 -14
  58. package/lib/components/combo_box/matching_options.js +3 -2
  59. package/lib/components/expression/expression.js +12 -14
  60. package/lib/components/facet/facet_button.js +10 -12
  61. package/lib/components/facet/facet_group.js +9 -11
  62. package/lib/components/health/health.js +8 -10
  63. package/lib/components/horizontal_rule/horizontal_rule.js +8 -10
  64. package/lib/components/link/link.js +7 -13
  65. package/lib/components/loading/loading_chart.js +8 -10
  66. package/lib/components/loading/loading_content.js +8 -10
  67. package/lib/components/loading/loading_logo.js +8 -10
  68. package/lib/components/loading/loading_spinner.js +8 -10
  69. package/lib/components/mark/mark.js +10 -12
  70. package/lib/components/markdown_editor/markdown_format.js +8 -10
  71. package/lib/components/panel/panel.js +9 -11
  72. package/lib/components/provider/cache/index.js +0 -13
  73. package/lib/components/provider/index.js +7 -12
  74. package/lib/components/provider/provider.js +2 -6
  75. package/lib/components/selectable/selectable.js +39 -22
  76. package/lib/components/spacer/spacer.js +8 -10
  77. package/lib/components/stat/stat.js +30 -40
  78. package/lib/components/stat/stat.styles.js +45 -0
  79. package/lib/components/text/text.js +8 -10
  80. package/lib/components/text/text_color.js +8 -10
  81. package/lib/components/timeline/timeline.js +20 -9
  82. package/lib/components/timeline/timeline.styles.js +39 -0
  83. package/lib/components/timeline/timeline_item.js +9 -24
  84. package/lib/components/timeline/timeline_item.styles.js +17 -10
  85. package/lib/components/timeline/timeline_item_icon.js +8 -10
  86. package/lib/components/timeline/timeline_item_icon.styles.js +15 -4
  87. package/lib/components/title/title.js +9 -11
  88. package/lib/global_styling/functions/logicals.js +2 -2
  89. package/lib/global_styling/utility/utility.js +8 -12
  90. package/lib/test/emotion-prefix.js +38 -0
  91. package/lib/test/index.d.ts +5 -0
  92. package/lib/test/index.js +23 -1
  93. package/lib/{components/provider/system → themes/amsterdam}/index.js +4 -4
  94. package/lib/themes/index.js +21 -1
  95. package/optimize/es/components/accessibility/skip_link/skip_link.js +27 -6
  96. package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
  97. package/optimize/es/components/avatar/avatar.js +5 -7
  98. package/optimize/es/components/bottom_bar/bottom_bar.js +9 -8
  99. package/optimize/es/components/breadcrumbs/breadcrumbs.js +1 -2
  100. package/optimize/es/components/call_out/call_out.js +7 -8
  101. package/optimize/es/components/combo_box/matching_options.js +3 -2
  102. package/optimize/es/components/expression/expression.js +9 -10
  103. package/optimize/es/components/facet/facet_button.js +7 -8
  104. package/optimize/es/components/facet/facet_group.js +6 -7
  105. package/optimize/es/components/health/health.js +5 -6
  106. package/optimize/es/components/horizontal_rule/horizontal_rule.js +5 -6
  107. package/optimize/es/components/link/link.js +6 -7
  108. package/optimize/es/components/loading/loading_chart.js +5 -6
  109. package/optimize/es/components/loading/loading_content.js +5 -6
  110. package/optimize/es/components/loading/loading_logo.js +5 -6
  111. package/optimize/es/components/loading/loading_spinner.js +5 -6
  112. package/optimize/es/components/mark/mark.js +7 -8
  113. package/optimize/es/components/markdown_editor/markdown_format.js +5 -6
  114. package/optimize/es/components/panel/panel.js +6 -7
  115. package/optimize/es/components/provider/cache/index.js +0 -1
  116. package/optimize/es/components/provider/index.js +1 -1
  117. package/optimize/es/components/provider/provider.js +3 -7
  118. package/optimize/es/components/selectable/selectable.js +33 -22
  119. package/optimize/es/components/spacer/spacer.js +5 -6
  120. package/optimize/es/components/stat/stat.js +25 -33
  121. package/optimize/es/components/stat/stat.styles.js +38 -0
  122. package/optimize/es/components/text/text.js +5 -6
  123. package/optimize/es/components/text/text_color.js +5 -6
  124. package/optimize/es/components/timeline/timeline.js +10 -1
  125. package/optimize/es/components/timeline/timeline.styles.js +29 -0
  126. package/optimize/es/components/timeline/timeline_item.js +6 -12
  127. package/optimize/es/components/timeline/timeline_item.styles.js +18 -3
  128. package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
  129. package/optimize/es/components/timeline/timeline_item_icon.styles.js +14 -4
  130. package/optimize/es/components/title/title.js +5 -6
  131. package/optimize/es/global_styling/functions/logicals.js +2 -2
  132. package/optimize/es/global_styling/utility/utility.js +1 -13
  133. package/optimize/es/test/emotion-prefix.js +27 -0
  134. package/optimize/es/test/index.d.ts +5 -0
  135. package/optimize/es/test/index.js +2 -1
  136. package/optimize/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
  137. package/optimize/es/themes/index.js +2 -1
  138. package/optimize/lib/components/accessibility/skip_link/skip_link.js +30 -8
  139. package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
  140. package/optimize/lib/components/avatar/avatar.js +5 -9
  141. package/optimize/lib/components/bottom_bar/bottom_bar.js +6 -9
  142. package/optimize/lib/components/breadcrumbs/breadcrumbs.js +1 -2
  143. package/optimize/lib/components/call_out/call_out.js +9 -13
  144. package/optimize/lib/components/combo_box/matching_options.js +3 -2
  145. package/optimize/lib/components/expression/expression.js +9 -11
  146. package/optimize/lib/components/facet/facet_button.js +7 -9
  147. package/optimize/lib/components/facet/facet_group.js +6 -8
  148. package/optimize/lib/components/health/health.js +5 -7
  149. package/optimize/lib/components/horizontal_rule/horizontal_rule.js +5 -7
  150. package/optimize/lib/components/link/link.js +6 -12
  151. package/optimize/lib/components/loading/loading_chart.js +5 -7
  152. package/optimize/lib/components/loading/loading_content.js +5 -7
  153. package/optimize/lib/components/loading/loading_logo.js +5 -7
  154. package/optimize/lib/components/loading/loading_spinner.js +5 -7
  155. package/optimize/lib/components/mark/mark.js +7 -9
  156. package/optimize/lib/components/markdown_editor/markdown_format.js +5 -7
  157. package/optimize/lib/components/panel/panel.js +6 -8
  158. package/optimize/lib/components/provider/cache/index.js +0 -13
  159. package/optimize/lib/components/provider/index.js +7 -12
  160. package/optimize/lib/components/provider/provider.js +2 -6
  161. package/optimize/lib/components/selectable/selectable.js +33 -22
  162. package/optimize/lib/components/spacer/spacer.js +5 -7
  163. package/optimize/lib/components/stat/stat.js +27 -37
  164. package/optimize/lib/components/stat/stat.styles.js +47 -0
  165. package/optimize/lib/components/text/text.js +5 -7
  166. package/optimize/lib/components/text/text_color.js +5 -7
  167. package/optimize/lib/components/timeline/timeline.js +14 -2
  168. package/optimize/lib/components/timeline/timeline.styles.js +39 -0
  169. package/optimize/lib/components/timeline/timeline_item.js +6 -14
  170. package/optimize/lib/components/timeline/timeline_item.styles.js +17 -10
  171. package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
  172. package/optimize/lib/components/timeline/timeline_item_icon.styles.js +15 -4
  173. package/optimize/lib/components/title/title.js +6 -8
  174. package/optimize/lib/global_styling/functions/logicals.js +2 -2
  175. package/optimize/lib/global_styling/utility/utility.js +8 -12
  176. package/optimize/lib/test/emotion-prefix.js +40 -0
  177. package/optimize/lib/test/index.d.ts +5 -0
  178. package/optimize/lib/test/index.js +23 -1
  179. package/{test-env/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
  180. package/optimize/lib/themes/index.js +21 -1
  181. package/package.json +2 -2
  182. package/src/components/index.scss +0 -1
  183. package/test-env/components/accessibility/skip_link/skip_link.js +46 -11
  184. package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
  185. package/test-env/components/avatar/avatar.js +8 -12
  186. package/test-env/components/bottom_bar/bottom_bar.js +6 -9
  187. package/test-env/components/breadcrumbs/breadcrumbs.js +1 -2
  188. package/test-env/components/call_out/call_out.js +10 -14
  189. package/test-env/components/combo_box/matching_options.js +3 -2
  190. package/test-env/components/expression/expression.js +12 -14
  191. package/test-env/components/facet/facet_button.js +10 -12
  192. package/test-env/components/facet/facet_group.js +9 -11
  193. package/test-env/components/health/health.js +8 -10
  194. package/test-env/components/horizontal_rule/horizontal_rule.js +8 -10
  195. package/test-env/components/link/link.js +7 -13
  196. package/test-env/components/loading/loading_chart.js +8 -10
  197. package/test-env/components/loading/loading_content.js +8 -10
  198. package/test-env/components/loading/loading_logo.js +8 -10
  199. package/test-env/components/loading/loading_spinner.js +8 -10
  200. package/test-env/components/mark/mark.js +10 -12
  201. package/test-env/components/markdown_editor/markdown_format.js +8 -10
  202. package/test-env/components/panel/panel.js +9 -11
  203. package/test-env/components/provider/cache/index.js +0 -13
  204. package/test-env/components/provider/index.js +7 -12
  205. package/test-env/components/provider/provider.js +2 -6
  206. package/test-env/components/selectable/selectable.js +39 -22
  207. package/test-env/components/spacer/spacer.js +8 -10
  208. package/test-env/components/stat/stat.js +29 -39
  209. package/test-env/components/stat/stat.styles.js +47 -0
  210. package/test-env/components/text/text.js +8 -10
  211. package/test-env/components/text/text_color.js +8 -10
  212. package/test-env/components/timeline/timeline.js +19 -9
  213. package/test-env/components/timeline/timeline.styles.js +39 -0
  214. package/test-env/components/timeline/timeline_item.js +9 -24
  215. package/test-env/components/timeline/timeline_item.styles.js +17 -10
  216. package/test-env/components/timeline/timeline_item_icon.js +8 -10
  217. package/test-env/components/timeline/timeline_item_icon.styles.js +15 -4
  218. package/test-env/components/title/title.js +9 -11
  219. package/test-env/global_styling/functions/logicals.js +2 -2
  220. package/test-env/global_styling/utility/utility.js +8 -12
  221. package/test-env/test/emotion-prefix.js +40 -0
  222. package/test-env/test/index.js +23 -1
  223. package/{optimize/lib/components/provider/system → test-env/themes/amsterdam}/index.js +4 -4
  224. package/test-env/themes/index.js +21 -1
  225. package/es/components/provider/cache/cache_context.js +0 -12
  226. package/es/components/provider/system/system.js +0 -33
  227. package/lib/components/provider/cache/cache_context.js +0 -24
  228. package/lib/components/provider/system/system.js +0 -45
  229. package/optimize/es/components/provider/cache/cache_context.js +0 -12
  230. package/optimize/es/components/provider/system/system.js +0 -33
  231. package/optimize/lib/components/provider/cache/cache_context.js +0 -24
  232. package/optimize/lib/components/provider/system/system.js +0 -54
  233. package/src/components/stat/_index.scss +0 -1
  234. package/src/components/stat/_stat.scss +0 -50
  235. package/test-env/components/provider/cache/cache_context.js +0 -24
  236. package/test-env/components/provider/system/system.js +0 -54
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "color", "component", "cloneElement", "style", "euiTheme"];
3
+ var _excluded = ["children", "color", "component", "cloneElement", "style"];
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -15,11 +15,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
  */
16
16
  import React, { isValidElement } from 'react';
17
17
  import { cloneElementWithCss } from '../../services/theme/clone_element';
18
- import { withEuiSystem } from '../provider/system';
18
+ import { useEuiTheme } from '../../services';
19
19
  import { euiTextColorStyles } from './text_color.styles';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
21
21
  export var COLORS = ['default', 'subdued', 'success', 'accent', 'danger', 'warning', 'ghost', 'inherit'];
22
- export var _EuiTextColor = function _EuiTextColor(_ref) {
22
+ export var EuiTextColor = function EuiTextColor(_ref) {
23
23
  var children = _ref.children,
24
24
  _ref$color = _ref.color,
25
25
  color = _ref$color === void 0 ? 'default' : _ref$color,
@@ -28,10 +28,10 @@ export var _EuiTextColor = function _EuiTextColor(_ref) {
28
28
  _ref$cloneElement = _ref.cloneElement,
29
29
  cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
30
30
  style = _ref.style,
31
- euiTheme = _ref.euiTheme,
32
31
  rest = _objectWithoutProperties(_ref, _excluded);
33
32
 
34
33
  var isNamedColor = COLORS.includes(color);
34
+ var euiTheme = useEuiTheme();
35
35
  var styles = euiTextColorStyles(euiTheme);
36
36
  var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor]; // We're checking if is a custom color.
37
37
  // If it is a custom color we set the `color` of the `.euiTextColor` div to that custom color.
@@ -56,5 +56,4 @@ export var _EuiTextColor = function _EuiTextColor(_ref) {
56
56
  var Component = component;
57
57
  return ___EmotionJSX(Component, props, children);
58
58
  }
59
- };
60
- export var EuiTextColor = withEuiSystem(_EuiTextColor);
59
+ };
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "items", "children"];
3
+ var _excluded = ["className", "items", "children", "gutterSize"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,19 +11,28 @@ var _excluded = ["className", "items", "children"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
+ import { useEuiTheme } from '../../services';
14
15
  import { EuiTimelineItem } from './timeline_item';
16
+ import { euiTimelineStyles } from './timeline.styles';
15
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
+ export var GUTTER_SIZES = ['m', 'l', 'xl'];
16
19
  export var EuiTimeline = function EuiTimeline(_ref) {
17
20
  var className = _ref.className,
18
21
  _ref$items = _ref.items,
19
22
  items = _ref$items === void 0 ? [] : _ref$items,
20
23
  children = _ref.children,
24
+ _ref$gutterSize = _ref.gutterSize,
25
+ gutterSize = _ref$gutterSize === void 0 ? 'xl' : _ref$gutterSize,
21
26
  rest = _objectWithoutProperties(_ref, _excluded);
22
27
 
23
28
  var classes = classNames('euiTimeline', className);
29
+ var euiTheme = useEuiTheme();
30
+ var styles = euiTimelineStyles(euiTheme);
31
+ var cssStyles = [styles.euiTimeline, styles[gutterSize]];
24
32
  return (// eslint-disable-next-line jsx-a11y/no-redundant-roles
25
33
  ___EmotionJSX("ol", _extends({
26
34
  className: classes,
35
+ css: cssStyles,
27
36
  role: "list"
28
37
  }, rest), items.map(function (item, index) {
29
38
  return ___EmotionJSX(EuiTimelineItem, _extends({
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ import { css } from '@emotion/react';
9
+ import { logicalCSS } from '../../global_styling';
10
+
11
+ var _gutterSizeAdjustment = function _gutterSizeAdjustment(gutterSize) {
12
+ return "\n gap: ".concat(gutterSize, ";\n\n // The vertical line height needs to be adjusted with the gutter size\n [class*='euiTimelineItem-']:not(:last-child) > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('height', "calc(100% + ".concat(gutterSize, ")")), ";\n }\n ");
13
+ }; // The vertical line should only appear when the EuiTimelineItem's
14
+ // are wrapped in a EuiTimeline. That's why these styles live here.
15
+
16
+
17
+ var timelineVerticalLine = function timelineVerticalLine(euiTheme) {
18
+ return " \n [class*='euiTimelineItem-'] > [class*='euiTimelineItemIcon-']::before {\n content: '';\n position: absolute;\n ".concat(logicalCSS('top', 0), ";\n ").concat(logicalCSS('width', euiTheme.size.xxs), ";\n background-color: ").concat(euiTheme.colors.lightShade, ";\n }\n\n > [class*='euiTimelineItem-center']:first-child > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('top', '50%'), ";\n }\n \n > [class*='euiTimelineItem-center']:last-child:not(:only-child) > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('height', '50%'), ";\n }\n ");
19
+ };
20
+
21
+ export var euiTimelineStyles = function euiTimelineStyles(_ref) {
22
+ var euiTheme = _ref.euiTheme;
23
+ return {
24
+ euiTimeline: /*#__PURE__*/css("display:flex;flex-direction:column;", timelineVerticalLine(euiTheme), ";;label:euiTimeline;"),
25
+ m: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.base), ";label:m;"),
26
+ l: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.l), ";label:l;"),
27
+ xl: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.xl), ";label:xl;")
28
+ };
29
+ };
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className", "component", "euiTheme"];
3
+ var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -10,28 +10,23 @@ var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "classNam
10
10
  * Side Public License, v 1.
11
11
  */
12
12
  import React from 'react';
13
- import { withEuiSystem } from '../provider/system';
14
13
  import { EuiTimelineItemEvent } from './timeline_item_event';
15
14
  import { EuiTimelineItemIcon } from './timeline_item_icon';
16
15
  import { euiTimelineItemStyles } from './timeline_item.styles';
17
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
17
  export var VERTICAL_ALIGN = ['top', 'center'];
19
- export var _EuiTimelineItem = function _EuiTimelineItem(_ref) {
18
+ export var EuiTimelineItem = function EuiTimelineItem(_ref) {
20
19
  var children = _ref.children,
21
20
  _ref$verticalAlign = _ref.verticalAlign,
22
21
  verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
23
22
  icon = _ref.icon,
24
23
  iconAriaLabel = _ref.iconAriaLabel,
25
24
  className = _ref.className,
26
- _ref$component = _ref.component,
27
- component = _ref$component === void 0 ? 'li' : _ref$component,
28
- euiTheme = _ref.euiTheme,
29
25
  rest = _objectWithoutProperties(_ref, _excluded);
30
26
 
31
- var styles = euiTimelineItemStyles(euiTheme);
32
- var cssStyles = [styles.euiTimelineItem];
33
- var Element = component;
34
- return ___EmotionJSX(Element, _extends({
27
+ var styles = euiTimelineItemStyles();
28
+ var cssStyles = [styles.euiTimelineItem, styles[verticalAlign]];
29
+ return ___EmotionJSX("li", _extends({
35
30
  css: cssStyles
36
31
  }, rest), ___EmotionJSX(EuiTimelineItemIcon, {
37
32
  icon: icon,
@@ -40,5 +35,4 @@ export var _EuiTimelineItem = function _EuiTimelineItem(_ref) {
40
35
  }), ___EmotionJSX(EuiTimelineItemEvent, {
41
36
  verticalAlign: verticalAlign
42
37
  }, children));
43
- };
44
- export var EuiTimelineItem = withEuiSystem(_EuiTimelineItem);
38
+ };
@@ -1,3 +1,5 @@
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)."; }
2
+
1
3
  /*
2
4
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
5
  * or more contributor license agreements. Licensed under the Elastic License
@@ -6,9 +8,22 @@
6
8
  * Side Public License, v 1.
7
9
  */
8
10
  import { css } from '@emotion/react';
9
- export var euiTimelineItemStyles = function euiTimelineItemStyles(_ref) {
10
- var euiTheme = _ref.euiTheme;
11
+
12
+ var _ref = process.env.NODE_ENV === "production" ? {
13
+ name: "5bggde-euiTimelineItem",
14
+ styles: "display:flex;position:relative;label:euiTimelineItem;"
15
+ } : {
16
+ name: "5bggde-euiTimelineItem",
17
+ styles: "display:flex;position:relative;label:euiTimelineItem;",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ };
20
+
21
+ export var euiTimelineItemStyles = function euiTimelineItemStyles() {
11
22
  return {
12
- euiTimelineItem: /*#__PURE__*/css("display:flex;&:not(:last-of-type){padding-bottom:", euiTheme.size.xl, ";}&:first-of-type{>[class*='euiTimelineItemIcon-center']::before{top:50%;height:calc(50% + ", euiTheme.size.xl, ");}}&:last-of-type{>[class*='euiTimelineItemIcon']::before{display:none;}&:not(:only-child)>[class*='euiTimelineItemIcon-center']::before{top:0;height:50%;}};label:euiTimelineItem;")
23
+ euiTimelineItem: _ref,
24
+ // Vertical alignments
25
+ // These classes are being targeted in timeline.styles.ts
26
+ top: /*#__PURE__*/css(";label:top;"),
27
+ center: /*#__PURE__*/css(";label:center;")
13
28
  };
14
29
  };
@@ -7,15 +7,15 @@
7
7
  */
8
8
  import React from 'react';
9
9
  import { EuiAvatar } from '../avatar';
10
- import { withEuiSystem } from '../provider/system';
10
+ import { useEuiTheme } from '../../services';
11
11
  import { euiTimelineItemIconStyles } from './timeline_item_icon.styles';
12
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
13
- export var _EuiTimelineItemIcon = function _EuiTimelineItemIcon(_ref) {
13
+ export var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
14
14
  var icon = _ref.icon,
15
15
  _ref$verticalAlign = _ref.verticalAlign,
16
16
  verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
17
- iconAriaLabel = _ref.iconAriaLabel,
18
- euiTheme = _ref.euiTheme;
17
+ iconAriaLabel = _ref.iconAriaLabel;
18
+ var euiTheme = useEuiTheme();
19
19
  var styles = euiTimelineItemIconStyles(euiTheme);
20
20
  var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
21
21
  var cssContentStyles = styles.euiTimelineItemIcon__content;
@@ -30,5 +30,4 @@ export var _EuiTimelineItemIcon = function _EuiTimelineItemIcon(_ref) {
30
30
  }, ___EmotionJSX("div", {
31
31
  css: cssContentStyles
32
32
  }, iconRender));
33
- };
34
- export var EuiTimelineItemIcon = withEuiSystem(_EuiTimelineItemIcon);
33
+ };
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  * Side Public License, v 1.
9
9
  */
10
10
  import { css } from '@emotion/react';
11
+ import { logicalCSS } from '../../global_styling';
11
12
 
12
13
  var _ref = process.env.NODE_ENV === "production" ? {
13
14
  name: "8391db-center",
@@ -27,11 +28,20 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
27
28
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
29
  };
29
30
 
30
- export var euiTimelineItemIconStyles = function euiTimelineItemIconStyles(_ref3) {
31
- var euiTheme = _ref3.euiTheme;
31
+ var _ref3 = process.env.NODE_ENV === "production" ? {
32
+ name: "kuz8oa-euiTimelineItemIcon__content",
33
+ styles: "display:flex;justify-content:center;align-items:center;position:relative;label:euiTimelineItemIcon__content;"
34
+ } : {
35
+ name: "kuz8oa-euiTimelineItemIcon__content",
36
+ styles: "display:flex;justify-content:center;align-items:center;position:relative;label:euiTimelineItemIcon__content;",
37
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
+ };
39
+
40
+ export var euiTimelineItemIconStyles = function euiTimelineItemIconStyles(_ref4) {
41
+ var euiTheme = _ref4.euiTheme;
32
42
  return {
33
- euiTimelineItemIcon: /*#__PURE__*/css("display:flex;position:relative;flex-grow:0;margin-right:", euiTheme.size.base, ";&::before{content:'';position:absolute;top:0;left:calc(", euiTheme.size.xxl, " / 2);width:calc(", euiTheme.size.xs, " / 2);height:calc(100% + ", euiTheme.size.xl, ");background-color:", euiTheme.colors.lightShade, ";};label:euiTimelineItemIcon;"),
34
- euiTimelineItemIcon__content: /*#__PURE__*/css("min-width:", euiTheme.size.xxl, ";display:flex;justify-content:center;align-items:center;position:relative;;label:euiTimelineItemIcon__content;"),
43
+ euiTimelineItemIcon: /*#__PURE__*/css("display:flex;position:relative;flex-grow:0;justify-content:center;", logicalCSS('margin-right', euiTheme.size.base), ";;label:euiTimelineItemIcon;"),
44
+ euiTimelineItemIcon__content: _ref3,
35
45
  // Vertical alignments
36
46
  top: _ref2,
37
47
  center: _ref
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["size", "children", "className", "textTransform", "euiTheme"];
3
+ var _excluded = ["size", "children", "className", "textTransform"];
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -14,20 +14,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
14
14
  * Side Public License, v 1.
15
15
  */
16
16
  import classNames from 'classnames';
17
+ import { useEuiTheme } from '../../services';
17
18
  import { cloneElementWithCss } from '../../services/theme/clone_element';
18
19
  import { euiTitleStyles } from './title.styles';
19
- import { withEuiSystem } from '../provider/system';
20
20
  export var TITLE_SIZES = ['xxxs', 'xxs', 'xs', 's', 'm', 'l'];
21
21
  export var TEXT_TRANSFORM = ['uppercase'];
22
- export var _EuiTitle = function _EuiTitle(_ref) {
22
+ export var EuiTitle = function EuiTitle(_ref) {
23
23
  var _ref$size = _ref.size,
24
24
  size = _ref$size === void 0 ? 'm' : _ref$size,
25
25
  children = _ref.children,
26
26
  className = _ref.className,
27
27
  textTransform = _ref.textTransform,
28
- euiTheme = _ref.euiTheme,
29
28
  rest = _objectWithoutProperties(_ref, _excluded);
30
29
 
30
+ var euiTheme = useEuiTheme();
31
31
  var styles = euiTitleStyles(euiTheme);
32
32
  var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
33
33
  var classes = classNames('euiTitle', className, children.props.className);
@@ -38,5 +38,4 @@ export var _EuiTitle = function _EuiTitle(_ref) {
38
38
  }, rest);
39
39
 
40
40
  return cloneElementWithCss(children, props);
41
- };
42
- export var EuiTitle = withEuiSystem(_EuiTitle);
41
+ };
@@ -46,9 +46,9 @@ var logicalPaddings = {
46
46
  };
47
47
  var logicalPosition = {
48
48
  top: 'inset-block-start',
49
- right: 'inset-inline-start',
49
+ right: 'inset-inline-end',
50
50
  bottom: 'inset-block-end',
51
- left: 'inset-inline-end',
51
+ left: 'inset-inline-start',
52
52
  horizontal: 'inset-block',
53
53
  vertical: 'inset-inline',
54
54
  inset: 'inset'
@@ -1,5 +1,3 @@
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)."; }
2
-
3
1
  /*
4
2
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
3
  * or more contributor license agreements. Licensed under the Elastic License
@@ -10,18 +8,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
8
  import React from 'react';
11
9
  import { Global, css } from '@emotion/react';
12
10
  import { jsx as ___EmotionJSX } from "@emotion/react";
13
-
14
- var _ref = process.env.NODE_ENV === "production" ? {
15
- name: "bd8dxy-EuiUtilityClasses",
16
- styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
17
- } : {
18
- name: "bd8dxy-EuiUtilityClasses",
19
- styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
20
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
- };
22
-
23
11
  export var EuiUtilityClasses = function EuiUtilityClasses() {
24
12
  return ___EmotionJSX(Global, {
25
- styles: _ref
13
+ styles: /*#__PURE__*/css(";label:EuiUtilityClasses;")
26
14
  });
27
15
  };
@@ -0,0 +1,27 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
2
+ import _inherits from "@babel/runtime/helpers/inherits";
3
+ import _setPrototypeOf from "@babel/runtime/helpers/setPrototypeOf";
4
+
5
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
6
+
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+ export var replaceEmotionPrefix = function replaceEmotionPrefix(selector) {
15
+ var _euiMatch$groups;
16
+
17
+ // Matches the Emotion className pattern + the EUI variant naming convention.
18
+ // Starts with `css-[hash]-`.
19
+ // Contains `eui[ComponentName] or `Eui[ComponentName]`.
20
+ // Capture the component name (from above) and all variant additions until the end of the string.
21
+ var euiMatch = selector.match( /*#__PURE__*/_wrapRegExp(/css\x2D[0-9A-Z_a-z]{6,}\x2D([Ee]ui[A-Z][\x2D0-9A-Z_a-z]*$)/, {
22
+ euiComponent: 1
23
+ })); // Use the captured group (`euiComponent`) if available and prepend with `emotion-`,
24
+ // otherwise use the full selector.
25
+
26
+ return euiMatch !== null && euiMatch !== void 0 && (_euiMatch$groups = euiMatch.groups) !== null && _euiMatch$groups !== void 0 && _euiMatch$groups.euiComponent ? "emotion-".concat(euiMatch.groups.euiComponent) : selector;
27
+ };
@@ -36,6 +36,10 @@ declare module '@elastic/eui/optimize/es/test/react_warnings' {
36
36
  declare module '@elastic/eui/optimize/es/test/sleep' {
37
37
  export function sleep(ms?: number): Promise<unknown>;
38
38
 
39
+ }
40
+ declare module '@elastic/eui/optimize/es/test/emotion-prefix' {
41
+ export const replaceEmotionPrefix: (selector: string) => string;
42
+
39
43
  }
40
44
  declare module '@elastic/eui/optimize/es/test' {
41
45
  export { requiredProps } from '@elastic/eui/optimize/es/test/required_props';
@@ -43,5 +47,6 @@ declare module '@elastic/eui/optimize/es/test' {
43
47
  export { findTestSubject } from '@elastic/eui/optimize/es/test/find_test_subject';
44
48
  export { startThrowingReactWarnings, stopThrowingReactWarnings, } from '@elastic/eui/optimize/es/test/react_warnings';
45
49
  export { sleep } from '@elastic/eui/optimize/es/test/sleep';
50
+ export * from '@elastic/eui/optimize/es/test/emotion-prefix';
46
51
 
47
52
  }
@@ -9,4 +9,5 @@ export { requiredProps } from './required_props';
9
9
  export { takeMountedSnapshot } from './take_mounted_snapshot';
10
10
  export { findTestSubject } from './find_test_subject';
11
11
  export { startThrowingReactWarnings, stopThrowingReactWarnings } from './react_warnings';
12
- export { sleep } from './sleep';
12
+ export { sleep } from './sleep';
13
+ export * from './emotion-prefix';
@@ -5,4 +5,5 @@
5
5
  * in compliance with, at your election, the Elastic License 2.0 or the Server
6
6
  * Side Public License, v 1.
7
7
  */
8
- export * from './system';
8
+ // Only globally export the mixins we allow consumers to re-use
9
+ export * from './global_styling/mixins/shadow';
@@ -6,4 +6,5 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  export { EUI_THEMES, isDefaultTheme } from './themes';
9
- export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme';
9
+ export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme';
10
+ export * from './amsterdam';
@@ -5,19 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports._EuiSkipLink = exports.POSITIONS = exports.EuiSkipLink = void 0;
8
+ exports.POSITIONS = exports.EuiSkipLink = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
12
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
15
 
14
16
  var _react = _interopRequireDefault(require("react"));
15
17
 
16
18
  var _classnames = _interopRequireDefault(require("classnames"));
17
19
 
18
- var _button = require("../../button/button");
20
+ var _services = require("../../../services");
19
21
 
20
- var _system = require("../../provider/system");
22
+ var _button = require("../../button/button");
21
23
 
22
24
  var _screen_reader_only = require("../screen_reader_only");
23
25
 
@@ -25,19 +27,25 @@ var _skip_link = require("./skip_link.styles");
25
27
 
26
28
  var _react2 = require("@emotion/react");
27
29
 
28
- var _excluded = ["destinationId", "tabIndex", "position", "children", "className", "euiTheme"];
30
+ var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
31
+
32
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
33
+
34
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
35
+
29
36
  var POSITIONS = ['static', 'fixed', 'absolute'];
30
37
  exports.POSITIONS = POSITIONS;
31
38
 
32
- var _EuiSkipLink = function _EuiSkipLink(_ref) {
39
+ var EuiSkipLink = function EuiSkipLink(_ref) {
33
40
  var destinationId = _ref.destinationId,
41
+ overrideLinkBehavior = _ref.overrideLinkBehavior,
34
42
  tabIndex = _ref.tabIndex,
35
43
  _ref$position = _ref.position,
36
44
  position = _ref$position === void 0 ? 'static' : _ref$position,
37
45
  children = _ref.children,
38
46
  className = _ref.className,
39
- euiTheme = _ref.euiTheme,
40
47
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
48
+ var euiTheme = (0, _services.useEuiTheme)();
41
49
  var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
42
50
  var classes = (0, _classnames.default)('euiSkipLink', className);
43
51
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
@@ -50,6 +58,22 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
50
58
  };
51
59
  }
52
60
 
61
+ if (overrideLinkBehavior) {
62
+ optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
63
+ onClick: function onClick(e) {
64
+ e.preventDefault();
65
+ var destinationEl = document.getElementById(destinationId);
66
+ if (!destinationEl) return;
67
+ destinationEl.scrollIntoView();
68
+ destinationEl.tabIndex = -1; // Ensure the destination content is focusable
69
+
70
+ destinationEl.focus({
71
+ preventScroll: true
72
+ }); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
73
+ }
74
+ });
75
+ }
76
+
53
77
  return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, {
54
78
  showOnFocus: true
55
79
  }, (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
@@ -61,6 +85,4 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
61
85
  }, optionalProps, rest), children));
62
86
  };
63
87
 
64
- exports._EuiSkipLink = _EuiSkipLink;
65
- var EuiSkipLink = (0, _system.withEuiSystem)(_EuiSkipLink);
66
88
  exports.EuiSkipLink = EuiSkipLink;
@@ -35,7 +35,7 @@ var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
35
35
  // Set positions on focus only as to not override screenReaderOnly position
36
36
  // When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
37
37
  absolute: _ref,
38
- fixed: /*#__PURE__*/(0, _react.css)("&:focus{position:fixed;inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
38
+ fixed: /*#__PURE__*/(0, _react.css)("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
39
39
  };
40
40
  };
41
41
 
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.checkValidColor = exports._EuiAvatar = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
8
+ exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
@@ -21,8 +21,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
21
21
 
22
22
  var _color = require("../../services/color");
23
23
 
24
- var _system = require("../provider/system");
25
-
26
24
  var _services = require("../../services");
27
25
 
28
26
  var _icon = require("../icon");
@@ -31,18 +29,17 @@ var _avatar = require("./avatar.styles");
31
29
 
32
30
  var _react2 = require("@emotion/react");
33
31
 
34
- var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
32
+ var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
35
33
  var SIZES = ['s', 'm', 'l', 'xl'];
36
34
  exports.SIZES = SIZES;
37
35
  var TYPES = ['space', 'user'];
38
36
  exports.TYPES = TYPES;
39
37
 
40
- var _EuiAvatar = function _EuiAvatar(_ref) {
38
+ var EuiAvatar = function EuiAvatar(_ref) {
41
39
  var _classNames;
42
40
 
43
41
  var className = _ref.className,
44
42
  color = _ref.color,
45
- euiTheme = _ref.euiTheme,
46
43
  imageUrl = _ref.imageUrl,
47
44
  initials = _ref.initials,
48
45
  initialsLength = _ref.initialsLength,
@@ -58,6 +55,7 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
58
55
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
59
56
  style = _ref.style,
60
57
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
58
+ var euiTheme = (0, _services.useEuiTheme)();
61
59
  var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
62
60
  var visColors = (0, _services.euiPaletteColorBlindBehindText)();
63
61
  var isPlain = color === 'plain';
@@ -110,10 +108,8 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
110
108
  role: isDisabled ? 'presentation' : 'img',
111
109
  title: name
112
110
  }, rest), content);
113
- };
111
+ }; // TODO: Migrate to a service
114
112
 
115
- exports._EuiAvatar = _EuiAvatar;
116
- var EuiAvatar = (0, _system.withEuiSystem)(_EuiAvatar); // TODO: Migrate to a service
117
113
 
118
114
  exports.EuiAvatar = EuiAvatar;
119
115
 
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.paddingSizeToClassNameMap = exports._EuiBottomBar = exports.POSITIONS = exports.EuiBottomBar = void 0;
10
+ exports.paddingSizeToClassNameMap = exports.POSITIONS = exports.EuiBottomBar = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -31,15 +31,13 @@ var _resize_observer = require("../observer/resize_observer");
31
31
 
32
32
  var _portal = require("../portal");
33
33
 
34
- var _system = require("../provider/system");
34
+ var _bottom_bar = require("./bottom_bar.styles");
35
35
 
36
36
  var _provider = require("../../services/theme/provider");
37
37
 
38
- var _bottom_bar = require("./bottom_bar.styles");
39
-
40
38
  var _react2 = require("@emotion/react");
41
39
 
42
- var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style", "euiTheme"];
40
+ var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
43
41
 
44
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
43
 
@@ -81,8 +79,8 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
81
79
  bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
82
80
  top = _ref.top,
83
81
  style = _ref.style,
84
- euiTheme = _ref.euiTheme,
85
82
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
83
+ var euiTheme = (0, _services.useEuiTheme)();
86
84
  var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
87
85
 
88
86
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -156,11 +154,10 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
156
154
  return usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, bar) : bar;
157
155
  });
158
156
 
159
- exports._EuiBottomBar = _EuiBottomBar;
160
157
  var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
161
- var BottomBar = (0, _system.withEuiSystem)(_EuiBottomBar);
158
+ var BottomBar = _EuiBottomBar;
162
159
  return (0, _react2.jsx)(_provider.EuiThemeProvider, {
163
- colorMode: "dark"
160
+ colorMode: 'dark'
164
161
  }, (0, _react2.jsx)(BottomBar, (0, _extends2.default)({
165
162
  ref: ref
166
163
  }, props)));
@@ -183,8 +183,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
183
183
  }, linkProps, breadcrumbRest), text);
184
184
  }
185
185
 
186
- return (0, _react2.jsx)(_link.EuiLink // @ts-expect-error Ref forwarding type mismatch
187
- , (0, _extends2.default)({
186
+ return (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({
188
187
  ref: ref,
189
188
  color: isLastBreadcrumb ? 'text' : 'subdued',
190
189
  onClick: onClick,