@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
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _system = require("./system");
7
+ var _shadow = require("./global_styling/mixins/shadow");
8
8
 
9
- Object.keys(_system).forEach(function (key) {
9
+ Object.keys(_shadow).forEach(function (key) {
10
10
  if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _system[key]) return;
11
+ if (key in exports && exports[key] === _shadow[key]) return;
12
12
  Object.defineProperty(exports, key, {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _system[key];
15
+ return _shadow[key];
16
16
  }
17
17
  });
18
18
  });
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ EUI_THEMES: true,
8
+ isDefaultTheme: true,
9
+ AMSTERDAM_NAME_KEY: true,
10
+ EuiThemeAmsterdam: true
11
+ };
6
12
  Object.defineProperty(exports, "AMSTERDAM_NAME_KEY", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -30,4 +36,18 @@ Object.defineProperty(exports, "isDefaultTheme", {
30
36
 
31
37
  var _themes = require("./themes");
32
38
 
33
- var _theme = require("./amsterdam/theme");
39
+ var _theme = require("./amsterdam/theme");
40
+
41
+ var _amsterdam = require("./amsterdam");
42
+
43
+ Object.keys(_amsterdam).forEach(function (key) {
44
+ if (key === "default" || key === "__esModule") return;
45
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
46
+ if (key in exports && exports[key] === _amsterdam[key]) return;
47
+ Object.defineProperty(exports, key, {
48
+ enumerable: true,
49
+ get: function get() {
50
+ return _amsterdam[key];
51
+ }
52
+ });
53
+ });
@@ -1,6 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["destinationId", "tabIndex", "position", "children", "className", "euiTheme"];
4
+ var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
5
+
6
+ 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; }
7
+
8
+ 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) { _defineProperty(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; }
4
9
 
5
10
  /*
6
11
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,22 +16,23 @@ var _excluded = ["destinationId", "tabIndex", "position", "children", "className
11
16
  */
12
17
  import React from 'react';
13
18
  import classNames from 'classnames';
19
+ import { useEuiTheme } from '../../../services';
14
20
  import { EuiButton } from '../../button/button';
15
- import { withEuiSystem } from '../../provider/system';
16
21
  import { EuiScreenReaderOnly } from '../screen_reader_only';
17
22
  import { euiSkipLinkStyles } from './skip_link.styles';
18
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
24
  export var POSITIONS = ['static', 'fixed', 'absolute'];
20
- export var _EuiSkipLink = function _EuiSkipLink(_ref) {
25
+ export var EuiSkipLink = function EuiSkipLink(_ref) {
21
26
  var destinationId = _ref.destinationId,
27
+ overrideLinkBehavior = _ref.overrideLinkBehavior,
22
28
  tabIndex = _ref.tabIndex,
23
29
  _ref$position = _ref.position,
24
30
  position = _ref$position === void 0 ? 'static' : _ref$position,
25
31
  children = _ref.children,
26
32
  className = _ref.className,
27
- euiTheme = _ref.euiTheme,
28
33
  rest = _objectWithoutProperties(_ref, _excluded);
29
34
 
35
+ var euiTheme = useEuiTheme();
30
36
  var styles = euiSkipLinkStyles(euiTheme);
31
37
  var classes = classNames('euiSkipLink', className);
32
38
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
@@ -39,6 +45,22 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
39
45
  };
40
46
  }
41
47
 
48
+ if (overrideLinkBehavior) {
49
+ optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
50
+ onClick: function onClick(e) {
51
+ e.preventDefault();
52
+ var destinationEl = document.getElementById(destinationId);
53
+ if (!destinationEl) return;
54
+ destinationEl.scrollIntoView();
55
+ destinationEl.tabIndex = -1; // Ensure the destination content is focusable
56
+
57
+ destinationEl.focus({
58
+ preventScroll: true
59
+ }); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
60
+ }
61
+ });
62
+ }
63
+
42
64
  return ___EmotionJSX(EuiScreenReaderOnly, {
43
65
  showOnFocus: true
44
66
  }, ___EmotionJSX(EuiButton, _extends({
@@ -48,5 +70,4 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
48
70
  size: "s",
49
71
  fill: true
50
72
  }, optionalProps, rest), children));
51
- };
52
- export var EuiSkipLink = withEuiSystem(_EuiSkipLink);
73
+ };
@@ -35,6 +35,6 @@ export 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__*/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__*/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
  };
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
5
+ var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
6
6
 
7
7
  /*
8
8
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -14,19 +14,17 @@ var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "init
14
14
  import React from 'react';
15
15
  import classNames from 'classnames';
16
16
  import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
17
- import { withEuiSystem } from '../provider/system';
18
- import { euiPaletteColorBlindBehindText, toInitials } from '../../services';
17
+ import { euiPaletteColorBlindBehindText, toInitials, useEuiTheme } from '../../services';
19
18
  import { EuiIcon } from '../icon';
20
19
  import { euiAvatarStyles } from './avatar.styles';
21
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
21
  export var SIZES = ['s', 'm', 'l', 'xl'];
23
22
  export var TYPES = ['space', 'user'];
24
- export var _EuiAvatar = function _EuiAvatar(_ref) {
23
+ export var EuiAvatar = function EuiAvatar(_ref) {
25
24
  var _classNames;
26
25
 
27
26
  var className = _ref.className,
28
27
  color = _ref.color,
29
- euiTheme = _ref.euiTheme,
30
28
  imageUrl = _ref.imageUrl,
31
29
  initials = _ref.initials,
32
30
  initialsLength = _ref.initialsLength,
@@ -43,6 +41,7 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
43
41
  style = _ref.style,
44
42
  rest = _objectWithoutProperties(_ref, _excluded);
45
43
 
44
+ var euiTheme = useEuiTheme();
46
45
  var styles = euiAvatarStyles(euiTheme);
47
46
  var visColors = euiPaletteColorBlindBehindText();
48
47
  var isPlain = color === 'plain';
@@ -95,8 +94,7 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
95
94
  role: isDisabled ? 'presentation' : 'img',
96
95
  title: name
97
96
  }, rest), content);
98
- };
99
- export var EuiAvatar = withEuiSystem(_EuiAvatar); // TODO: Migrate to a service
97
+ }; // TODO: Migrate to a service
100
98
 
101
99
  export var checkValidColor = function checkValidColor(color) {
102
100
  var validHex = color && isValidHex(color) || color === 'plain' || color === 'subdued';
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style", "euiTheme"];
5
+ var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
6
6
 
7
7
  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; }
8
8
 
@@ -17,14 +17,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  */
18
18
  import classNames from 'classnames';
19
19
  import React, { forwardRef, useEffect, useState } from 'react';
20
- import { useCombinedRefs } from '../../services';
20
+ import { useCombinedRefs, useEuiTheme } from '../../services';
21
21
  import { EuiScreenReaderOnly } from '../accessibility';
22
22
  import { EuiI18n } from '../i18n';
23
23
  import { useResizeObserver } from '../observer/resize_observer';
24
24
  import { EuiPortal } from '../portal';
25
- import { withEuiSystem } from '../provider/system';
26
- import { EuiThemeProvider } from '../../services/theme/provider';
27
25
  import { euiBottomBarStyles } from './bottom_bar.styles';
26
+ import { EuiThemeProvider } from '../../services/theme/provider';
28
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
28
  // Exported for testing
30
29
  export var paddingSizeToClassNameMap = {
@@ -34,7 +33,8 @@ export var paddingSizeToClassNameMap = {
34
33
  l: 'euiBottomBar--paddingLarge'
35
34
  };
36
35
  export var POSITIONS = ['static', 'fixed', 'sticky'];
37
- export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
36
+
37
+ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
38
  var _ref$position = _ref.position,
39
39
  position = _ref$position === void 0 ? 'fixed' : _ref$position,
40
40
  _ref$paddingSize = _ref.paddingSize,
@@ -55,9 +55,9 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
55
55
  bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
56
56
  top = _ref.top,
57
57
  style = _ref.style,
58
- euiTheme = _ref.euiTheme,
59
58
  rest = _objectWithoutProperties(_ref, _excluded);
60
59
 
60
+ var euiTheme = useEuiTheme();
61
61
  var styles = euiBottomBarStyles(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
62
62
 
63
63
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -131,10 +131,11 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
131
131
 
132
132
  return usePortal ? ___EmotionJSX(EuiPortal, null, bar) : bar;
133
133
  });
134
+
134
135
  export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
135
- var BottomBar = withEuiSystem(_EuiBottomBar);
136
+ var BottomBar = _EuiBottomBar;
136
137
  return ___EmotionJSX(EuiThemeProvider, {
137
- colorMode: "dark"
138
+ colorMode: 'dark'
138
139
  }, ___EmotionJSX(BottomBar, _extends({
139
140
  ref: ref
140
141
  }, props)));
@@ -166,8 +166,7 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
166
166
  }, linkProps, breadcrumbRest), text);
167
167
  }
168
168
 
169
- return ___EmotionJSX(EuiLink // @ts-expect-error Ref forwarding type mismatch
170
- , _extends({
169
+ return ___EmotionJSX(EuiLink, _extends({
171
170
  ref: ref,
172
171
  color: isLastBreadcrumb ? 'text' : 'subdued',
173
172
  onClick: onClick,
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "euiTheme"];
4
+ var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
5
5
 
6
6
  /*
7
7
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -14,14 +14,14 @@ import React, { forwardRef } from 'react';
14
14
  import classNames from 'classnames';
15
15
  import { EuiIcon } from '../icon';
16
16
  import { EuiText } from '../text';
17
- import { withEuiSystem } from '../provider/system';
17
+ import { useEuiTheme } from '../../services';
18
18
  import { EuiPanel } from '../panel';
19
19
  import { EuiTitle } from '../title';
20
20
  import { euiCallOutStyles, euiCallOutHeadingStyles } from './call_out.styles';
21
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
22
  export var COLORS = ['primary', 'success', 'warning', 'danger'];
23
23
  export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
24
- export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
24
+ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
25
  var title = _ref.title,
26
26
  _ref$color = _ref.color,
27
27
  color = _ref$color === void 0 ? 'primary' : _ref$color,
@@ -32,14 +32,14 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
32
  className = _ref.className,
33
33
  _ref$heading = _ref.heading,
34
34
  heading = _ref$heading === void 0 ? 'p' : _ref$heading,
35
- euiTheme = _ref.euiTheme,
36
35
  rest = _objectWithoutProperties(_ref, _excluded);
37
36
 
38
- var styles = euiCallOutStyles(euiTheme);
37
+ var theme = useEuiTheme();
38
+ var styles = euiCallOutStyles(theme);
39
39
  var cssStyles = [styles.euiCallOut];
40
40
  var cssIconStyle = [styles.euiCallOut__icon];
41
41
  var cssDescriptionStyle = [styles.euiCallOut__description];
42
- var headerStyles = euiCallOutHeadingStyles(euiTheme);
42
+ var headerStyles = euiCallOutHeadingStyles(theme);
43
43
  var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
44
44
  var classes = classNames('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
45
45
  var headerIcon;
@@ -87,5 +87,4 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
87
87
  grow: false
88
88
  }, rest), header, optionalChildren);
89
89
  });
90
- _EuiCallOut.displayName = 'EuiCallOut';
91
- export var EuiCallOut = withEuiSystem(_EuiCallOut);
90
+ EuiCallOut.displayName = 'EuiCallOut';
@@ -10,7 +10,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
10
10
  export var flattenOptionGroups = function flattenOptionGroups(optionsOrGroups) {
11
11
  return optionsOrGroups.reduce(function (options, optionOrGroup) {
12
12
  if (optionOrGroup.options) {
13
- options.push.apply(options, _toConsumableArray(optionOrGroup.options));
13
+ options = options.concat(optionOrGroup.options);
14
14
  } else {
15
15
  options.push(optionOrGroup);
16
16
  }
@@ -68,8 +68,9 @@ export var getMatchingOptions = function getMatchingOptions(options, selectedOpt
68
68
  label: option.label,
69
69
  isGroupLabelOption: true
70
70
  }); // Add matching options for group
71
+ // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
71
72
 
72
- matchingOptions.push.apply(matchingOptions, matchingOptionsForGroup);
73
+ matchingOptions = matchingOptions.concat(matchingOptionsForGroup);
73
74
  }
74
75
  } else {
75
76
  collectMatchingOption(matchingOptions, option, selectedOptions, normalizedSearchValue, isPreFiltered, showPrevSelected);
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap", "euiTheme"];
4
+ var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
5
5
 
6
6
  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; }
7
7
 
@@ -17,11 +17,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  import React from 'react';
18
18
  import classNames from 'classnames';
19
19
  import { EuiIcon } from '../icon';
20
- import { withEuiSystem } from '../provider/system';
20
+ import { useEuiTheme } from '../../services';
21
21
  import { euiExpressionStyles, euiExpressionDescriptionStyles, euiExpressionValueStyles, euiExpressionIconStyles } from './expression.styles';
22
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
24
- export var _EuiExpression = function _EuiExpression(_ref) {
24
+ export var EuiExpression = function EuiExpression(_ref) {
25
25
  var className = _ref.className,
26
26
  description = _ref.description,
27
27
  descriptionProps = _ref.descriptionProps,
@@ -42,17 +42,17 @@ export var _EuiExpression = function _EuiExpression(_ref) {
42
42
  isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
43
43
  _ref$textWrap = _ref.textWrap,
44
44
  textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
45
- euiTheme = _ref.euiTheme,
46
45
  rest = _objectWithoutProperties(_ref, _excluded);
47
46
 
48
47
  var calculatedColor = isInvalid ? 'danger' : color;
49
- var styles = euiExpressionStyles(euiTheme);
48
+ var theme = useEuiTheme();
49
+ var styles = euiExpressionStyles(theme);
50
50
  var cssStyles = [styles.euiExpression, onClick && styles.isClickable, styles[color], isActive && styles.isActive.base, isActive && styles.isActive[color], display === 'columns' && styles.columns, textWrap === 'truncate' && styles.truncate];
51
- var descriptionStyles = euiExpressionDescriptionStyles(euiTheme);
51
+ var descriptionStyles = euiExpressionDescriptionStyles(theme);
52
52
  var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
53
- var valueStyles = euiExpressionValueStyles(euiTheme);
53
+ var valueStyles = euiExpressionValueStyles(theme);
54
54
  var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
55
- var iconStyles = euiExpressionIconStyles(euiTheme);
55
+ var iconStyles = euiExpressionIconStyles(theme);
56
56
  var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
57
57
  var classes = classNames('euiExpression', className);
58
58
  var Component = onClick ? 'button' : 'span';
@@ -78,5 +78,4 @@ export var _EuiExpression = function _EuiExpression(_ref) {
78
78
  className: "euiExpression__value",
79
79
  css: cssValueStyles
80
80
  }, valueProps), value), invalidIcon);
81
- };
82
- export var EuiExpression = withEuiSystem(_EuiExpression);
81
+ };
@@ -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", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef", "euiTheme"];
3
+ var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -15,11 +15,11 @@ import { EuiNotificationBadge } from '../badge';
15
15
  import { EuiLoadingSpinner } from '../loading';
16
16
  import { EuiInnerText } from '../inner_text';
17
17
  import { cloneElementWithCss } from '../../services/theme/clone_element';
18
- import { withEuiSystem } from '../provider/system';
18
+ import { useEuiTheme } from '../../services';
19
19
  import { euiFacetButtonStyles, euiFacetButtonTextStyles, euiFacetButtonIconStyles, euiFacetButtonQuantityStyles, euiFacetButtonLoadingSpinnerStyles } from './facet_button.styles';
20
20
  import { EuiButtonDisplay } from '../button/button_display/_button_display';
21
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
- export var _EuiFacetButton = function _EuiFacetButton(_ref) {
22
+ export var EuiFacetButton = function EuiFacetButton(_ref) {
23
23
  var children = _ref.children,
24
24
  className = _ref.className,
25
25
  icon = _ref.icon,
@@ -31,16 +31,16 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
31
31
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
32
32
  quantity = _ref.quantity,
33
33
  buttonRef = _ref.buttonRef,
34
- euiTheme = _ref.euiTheme,
35
34
  rest = _objectWithoutProperties(_ref, _excluded);
36
35
 
37
36
  // If in the loading state, force disabled to true
38
37
  isDisabled = isLoading ? true : isDisabled;
39
38
  var selection = isSelected ? 'isSelected' : 'unSelected';
40
39
  var classes = classNames('euiFacetButton', className);
41
- var styles = euiFacetButtonStyles(euiTheme);
40
+ var theme = useEuiTheme();
41
+ var styles = euiFacetButtonStyles(theme);
42
42
  var cssStyles = [styles.euiFacetButton];
43
- var textStyles = euiFacetButtonTextStyles(euiTheme);
43
+ var textStyles = euiFacetButtonTextStyles(theme);
44
44
  var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
45
45
  var quantityStyles = euiFacetButtonQuantityStyles();
46
46
  var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
@@ -91,5 +91,4 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
91
91
  ref: ref
92
92
  }, children), buttonQuantity);
93
93
  });
94
- };
95
- export var EuiFacetButton = withEuiSystem(_EuiFacetButton);
94
+ };
@@ -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", "className", "layout", "gutterSize", "euiTheme"];
3
+ var _excluded = ["children", "className", "layout", "gutterSize"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,27 +11,26 @@ var _excluded = ["children", "className", "layout", "gutterSize", "euiTheme"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { withEuiSystem } from '../provider/system';
14
+ import { useEuiTheme } from '../../services';
15
15
  import { euiFacetGroupStyles } from './facet_group.styles';
16
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
17
  export var LAYOUTS = ['vertical', 'horizontal'];
18
18
  export var GUTTER_SIZES = ['none', 's', 'm', 'l'];
19
- export var _EuiFacetGroup = function _EuiFacetGroup(_ref) {
19
+ export var EuiFacetGroup = function EuiFacetGroup(_ref) {
20
20
  var children = _ref.children,
21
21
  className = _ref.className,
22
22
  _ref$layout = _ref.layout,
23
23
  layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
24
24
  _ref$gutterSize = _ref.gutterSize,
25
25
  gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
26
- euiTheme = _ref.euiTheme,
27
26
  rest = _objectWithoutProperties(_ref, _excluded);
28
27
 
29
- var styles = euiFacetGroupStyles(euiTheme, layout);
28
+ var theme = useEuiTheme();
29
+ var styles = euiFacetGroupStyles(theme, layout);
30
30
  var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
31
31
  var classes = classNames('euiFacetGroup', className);
32
32
  return ___EmotionJSX("div", _extends({
33
33
  className: classes,
34
34
  css: cssStyles
35
35
  }, rest), children);
36
- };
37
- export var EuiFacetGroup = withEuiSystem(_EuiFacetGroup);
36
+ };
@@ -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", "className", "color", "euiTheme", "textSize"];
3
+ var _excluded = ["children", "className", "color", "textSize"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,21 +11,21 @@ var _excluded = ["children", "className", "color", "euiTheme", "textSize"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { withEuiSystem } from '../provider/system';
14
+ import { useEuiTheme } from '../../services';
15
15
  import { euiHealthStyles } from './health.styles';
16
16
  import { EuiIcon } from '../icon';
17
17
  import { EuiFlexGroup, EuiFlexItem } from '../flex';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var TEXT_SIZES = ['xs', 's', 'm', 'inherit'];
20
- export var _EuiHealth = function _EuiHealth(_ref) {
20
+ export var EuiHealth = function EuiHealth(_ref) {
21
21
  var children = _ref.children,
22
22
  className = _ref.className,
23
23
  color = _ref.color,
24
- euiTheme = _ref.euiTheme,
25
24
  _ref$textSize = _ref.textSize,
26
25
  textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
27
26
  rest = _objectWithoutProperties(_ref, _excluded);
28
27
 
28
+ var euiTheme = useEuiTheme();
29
29
  var styles = euiHealthStyles(euiTheme);
30
30
  var cssStyles = [styles.euiHealth, styles[textSize]];
31
31
  var classes = classNames('euiHealth', className);
@@ -44,5 +44,4 @@ export var _EuiHealth = function _EuiHealth(_ref) {
44
44
  })), ___EmotionJSX(EuiFlexItem, {
45
45
  grow: false
46
46
  }, children)));
47
- };
48
- export var EuiHealth = withEuiSystem(_EuiHealth);
47
+ };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["className", "euiTheme", "size", "margin"];
4
+ var _excluded = ["className", "size", "margin"];
5
5
 
6
6
  /*
7
7
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -12,7 +12,7 @@ var _excluded = ["className", "euiTheme", "size", "margin"];
12
12
  */
13
13
  import React from 'react';
14
14
  import classNames from 'classnames';
15
- import { withEuiSystem } from '../provider/system';
15
+ import { useEuiTheme } from '../../services';
16
16
  import { euiHorizontalRuleStyles } from './horizontal_rule.styles';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export var SIZES = ['full', 'half', 'quarter'];
@@ -26,17 +26,17 @@ var marginToClassNameMap = {
26
26
  xl: 'marginXLarge',
27
27
  xxl: 'marginXXLarge'
28
28
  };
29
- export var _EuiHorizontalRule = function _EuiHorizontalRule(_ref) {
29
+ export var EuiHorizontalRule = function EuiHorizontalRule(_ref) {
30
30
  var _classNames;
31
31
 
32
32
  var className = _ref.className,
33
- euiTheme = _ref.euiTheme,
34
33
  _ref$size = _ref.size,
35
34
  size = _ref$size === void 0 ? 'full' : _ref$size,
36
35
  _ref$margin = _ref.margin,
37
36
  margin = _ref$margin === void 0 ? 'l' : _ref$margin,
38
37
  rest = _objectWithoutProperties(_ref, _excluded);
39
38
 
39
+ var euiTheme = useEuiTheme();
40
40
  var styles = euiHorizontalRuleStyles(euiTheme);
41
41
  var classes = classNames('euiHorizontalRule', (_classNames = {}, _defineProperty(_classNames, "euiHorizontalRule--".concat(size), size), _defineProperty(_classNames, "euiHorizontalRule--".concat(marginToClassNameMap[margin]), margin && margin !== 'none'), _classNames), className);
42
42
  var cssStyles = [styles.euiHorizontalRule, styles[size], styles[margin]];
@@ -44,5 +44,4 @@ export var _EuiHorizontalRule = function _EuiHorizontalRule(_ref) {
44
44
  css: cssStyles,
45
45
  className: classes
46
46
  }, rest));
47
- };
48
- export var EuiHorizontalRule = withEuiSystem(_EuiHorizontalRule);
47
+ };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled", "euiTheme"];
4
+ var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled"];
5
5
 
6
6
  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; }
7
7
 
@@ -16,8 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
16
  */
17
17
  import React, { forwardRef } from 'react';
18
18
  import classNames from 'classnames';
19
- import { getSecureRelForTarget } from '../../services';
20
- import { withEuiSystem } from '../provider/system';
19
+ import { getSecureRelForTarget, useEuiTheme } from '../../services';
21
20
  import { euiLinkStyles } from './link.styles';
22
21
  import { EuiIcon } from '../icon';
23
22
  import { EuiI18n, useEuiI18n } from '../i18n';
@@ -25,7 +24,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
25
24
  import { validateHref } from '../../services/security/href_validator';
26
25
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
26
  export var COLORS = ['primary', 'subdued', 'success', 'accent', 'danger', 'warning', 'text', 'ghost'];
28
- export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
27
+ var EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
28
  var children = _ref.children,
30
29
  _ref$color = _ref.color,
31
30
  color = _ref$color === void 0 ? 'primary' : _ref$color,
@@ -38,9 +37,9 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
37
  type = _ref$type === void 0 ? 'button' : _ref$type,
39
38
  onClick = _ref.onClick,
40
39
  _disabled = _ref.disabled,
41
- euiTheme = _ref.euiTheme,
42
40
  rest = _objectWithoutProperties(_ref, _excluded);
43
41
 
42
+ var euiTheme = useEuiTheme();
44
43
  var styles = euiLinkStyles(euiTheme);
45
44
  var cssStyles = [styles.euiLink];
46
45
  var cssScreenReaderTextStyles = [styles.euiLink__screenReaderText];
@@ -96,5 +95,5 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
96
95
  ref: ref
97
96
  }, anchorProps), children, showExternalLinkIcon && externalLinkIcon, target === '_blank' && newTargetScreenreaderText);
98
97
  });
99
- _EuiLink.displayName = 'EuiLink';
100
- export var EuiLink = withEuiSystem(_EuiLink);
98
+ EuiLink.displayName = 'EuiLink';
99
+ export { EuiLink };
@@ -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 = ["size", "mono", "className", "aria-label", "euiTheme"];
3
+ var _excluded = ["size", "mono", "className", "aria-label"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,22 +11,22 @@ var _excluded = ["size", "mono", "className", "aria-label", "euiTheme"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { withEuiSystem } from '../provider/system';
14
+ import { useEuiTheme } from '../../services';
15
15
  import { euiLoadingChartStyles, euiLoadingChartBarStyles, _barIndex } from './loading_chart.styles';
16
16
  import { useEuiI18n } from '../i18n';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export var SIZES = ['m', 'l', 'xl'];
19
- export var _EuiLoadingChart = function _EuiLoadingChart(_ref) {
19
+ export var EuiLoadingChart = function EuiLoadingChart(_ref) {
20
20
  var _ref$size = _ref.size,
21
21
  size = _ref$size === void 0 ? 'm' : _ref$size,
22
22
  _ref$mono = _ref.mono,
23
23
  mono = _ref$mono === void 0 ? false : _ref$mono,
24
24
  className = _ref.className,
25
25
  ariaLabel = _ref['aria-label'],
26
- euiTheme = _ref.euiTheme,
27
26
  rest = _objectWithoutProperties(_ref, _excluded);
28
27
 
29
28
  var defaultAriaLabel = useEuiI18n('euiLoadingChart.ariaLabel', 'Loading');
29
+ var euiTheme = useEuiTheme();
30
30
  var styles = euiLoadingChartStyles(euiTheme);
31
31
  var barStyles = euiLoadingChartBarStyles(euiTheme);
32
32
  var classes = classNames('euiLoadingChart', {
@@ -53,5 +53,4 @@ export var _EuiLoadingChart = function _EuiLoadingChart(_ref) {
53
53
  role: "progressbar",
54
54
  "aria-label": ariaLabel || defaultAriaLabel
55
55
  }, rest), bars);
56
- };
57
- export var EuiLoadingChart = withEuiSystem(_EuiLoadingChart);
56
+ };