@elastic/eui 59.0.1 → 59.1.0-rc1

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 (265) 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 +2 -136
  4. package/dist/eui_theme_dark.json +0 -6
  5. package/dist/eui_theme_dark.json.d.ts +0 -6
  6. package/dist/eui_theme_dark.min.css +1 -1
  7. package/dist/eui_theme_light.css +2 -136
  8. package/dist/eui_theme_light.json +0 -6
  9. package/dist/eui_theme_light.json.d.ts +0 -6
  10. package/dist/eui_theme_light.min.css +1 -1
  11. package/es/components/accessibility/skip_link/skip_link.js +9 -7
  12. package/es/components/avatar/avatar.js +9 -7
  13. package/es/components/bottom_bar/bottom_bar.js +8 -9
  14. package/es/components/breadcrumbs/breadcrumbs.js +2 -1
  15. package/es/components/button/{button_content.js → _button_content_deprecated.js} +4 -3
  16. package/es/components/button/button.js +16 -10
  17. package/es/components/button/button_display/_button_display.js +141 -0
  18. package/es/components/button/button_display/_button_display.styles.js +53 -0
  19. package/es/components/button/button_display/_button_display_content.js +100 -0
  20. package/es/components/button/button_display/_button_display_content.styles.js +61 -0
  21. package/es/components/button/button_empty/button_empty.js +3 -2
  22. package/es/components/button/button_group/button_group.js +2 -1
  23. package/es/components/button/button_group/button_group_button.js +3 -2
  24. package/es/components/call_out/call_out.js +9 -8
  25. package/es/components/card/card.js +2 -1
  26. package/es/components/card/card_select.js +2 -1
  27. package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -1
  28. package/es/components/expression/expression.js +11 -10
  29. package/es/components/facet/facet_button.js +36 -19
  30. package/es/components/facet/facet_button.styles.js +64 -0
  31. package/es/components/facet/facet_group.js +17 -27
  32. package/es/components/facet/facet_group.styles.js +79 -0
  33. package/es/components/header/header_links/header_link.js +2 -1
  34. package/es/components/health/health.js +7 -6
  35. package/es/components/horizontal_rule/horizontal_rule.js +7 -6
  36. package/es/components/link/link.js +8 -7
  37. package/es/components/loading/loading_chart.js +7 -6
  38. package/es/components/loading/loading_content.js +7 -6
  39. package/es/components/loading/loading_logo.js +7 -6
  40. package/es/components/loading/loading_spinner.js +20 -8
  41. package/es/components/loading/loading_spinner.styles.js +4 -4
  42. package/es/components/mark/mark.js +9 -8
  43. package/es/components/markdown_editor/markdown_format.js +7 -6
  44. package/es/components/notification/notification_event.js +2 -1
  45. package/es/components/pagination/pagination_button.js +2 -1
  46. package/es/components/panel/panel.js +8 -7
  47. package/es/components/provider/cache/cache_context.js +12 -0
  48. package/es/components/provider/cache/cache_provider.js +17 -0
  49. package/es/components/provider/cache/index.js +9 -0
  50. package/es/components/provider/index.js +1 -1
  51. package/es/components/provider/provider.js +39 -5
  52. package/es/components/provider/system/index.js +8 -0
  53. package/es/components/provider/system/system.js +33 -0
  54. package/es/components/spacer/spacer.js +7 -6
  55. package/es/components/text/text.js +7 -6
  56. package/es/components/text/text_color.js +7 -6
  57. package/es/components/timeline/timeline_item.js +7 -6
  58. package/es/components/timeline/timeline_item_icon.js +7 -6
  59. package/es/components/title/title.js +7 -6
  60. package/es/global_styling/utility/utility.js +27 -0
  61. package/es/services/theme/hooks.js +2 -2
  62. package/es/services/theme/provider.js +1 -5
  63. package/eui.d.ts +1030 -357
  64. package/i18ntokens.json +12 -12
  65. package/lib/components/accessibility/skip_link/skip_link.js +13 -10
  66. package/lib/components/avatar/avatar.js +12 -8
  67. package/lib/components/bottom_bar/bottom_bar.js +9 -6
  68. package/lib/components/breadcrumbs/breadcrumbs.js +2 -1
  69. package/lib/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
  70. package/lib/components/button/button.js +19 -13
  71. package/lib/components/button/button_display/_button_display.js +146 -0
  72. package/lib/components/button/button_display/_button_display.styles.js +59 -0
  73. package/lib/components/button/button_display/_button_display_content.js +111 -0
  74. package/lib/components/button/button_display/_button_display_content.styles.js +64 -0
  75. package/lib/components/button/button_empty/button_empty.js +4 -3
  76. package/lib/components/button/button_group/button_group.js +2 -1
  77. package/lib/components/button/button_group/button_group_button.js +3 -2
  78. package/lib/components/call_out/call_out.js +14 -10
  79. package/lib/components/card/card.js +2 -1
  80. package/lib/components/card/card_select.js +2 -1
  81. package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -1
  82. package/lib/components/expression/expression.js +14 -12
  83. package/lib/components/facet/facet_button.js +43 -21
  84. package/lib/components/facet/facet_button.styles.js +79 -0
  85. package/lib/components/facet/facet_group.js +20 -29
  86. package/lib/components/facet/facet_group.styles.js +82 -0
  87. package/lib/components/header/header_links/header_link.js +2 -1
  88. package/lib/components/health/health.js +10 -8
  89. package/lib/components/horizontal_rule/horizontal_rule.js +10 -8
  90. package/lib/components/link/link.js +13 -7
  91. package/lib/components/loading/loading_chart.js +10 -8
  92. package/lib/components/loading/loading_content.js +10 -8
  93. package/lib/components/loading/loading_logo.js +10 -8
  94. package/lib/components/loading/loading_spinner.js +23 -10
  95. package/lib/components/loading/loading_spinner.styles.js +4 -4
  96. package/lib/components/mark/mark.js +12 -10
  97. package/lib/components/markdown_editor/markdown_format.js +10 -8
  98. package/lib/components/notification/notification_event.js +2 -1
  99. package/lib/components/panel/panel.js +11 -9
  100. package/lib/components/provider/cache/cache_context.js +24 -0
  101. package/lib/components/provider/cache/cache_provider.js +29 -0
  102. package/lib/components/provider/cache/index.js +31 -0
  103. package/lib/components/provider/index.js +12 -7
  104. package/lib/components/provider/provider.js +40 -5
  105. package/lib/components/provider/system/index.js +18 -0
  106. package/lib/components/provider/system/system.js +45 -0
  107. package/lib/components/spacer/spacer.js +10 -8
  108. package/lib/components/text/text.js +10 -8
  109. package/lib/components/text/text_color.js +10 -8
  110. package/lib/components/timeline/timeline_item.js +10 -8
  111. package/lib/components/timeline/timeline_item_icon.js +10 -8
  112. package/lib/components/title/title.js +11 -9
  113. package/lib/global_styling/utility/utility.js +31 -0
  114. package/lib/services/theme/hooks.js +2 -2
  115. package/lib/services/theme/provider.js +3 -6
  116. package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
  117. package/optimize/es/components/avatar/avatar.js +7 -5
  118. package/optimize/es/components/bottom_bar/bottom_bar.js +8 -9
  119. package/optimize/es/components/breadcrumbs/breadcrumbs.js +2 -1
  120. package/optimize/es/components/button/{button_content.js → _button_content_deprecated.js} +1 -1
  121. package/optimize/es/components/button/button.js +13 -8
  122. package/optimize/es/components/button/button_display/_button_display.js +73 -0
  123. package/optimize/es/components/button/button_display/_button_display.styles.js +53 -0
  124. package/optimize/es/components/button/button_display/_button_display_content.js +67 -0
  125. package/optimize/es/components/button/button_display/_button_display_content.styles.js +61 -0
  126. package/optimize/es/components/button/button_empty/button_empty.js +1 -1
  127. package/optimize/es/components/button/button_group/button_group_button.js +1 -1
  128. package/optimize/es/components/call_out/call_out.js +8 -7
  129. package/optimize/es/components/expression/expression.js +10 -9
  130. package/optimize/es/components/facet/facet_button.js +35 -18
  131. package/optimize/es/components/facet/facet_button.styles.js +64 -0
  132. package/optimize/es/components/facet/facet_group.js +14 -24
  133. package/optimize/es/components/facet/facet_group.styles.js +79 -0
  134. package/optimize/es/components/health/health.js +6 -5
  135. package/optimize/es/components/horizontal_rule/horizontal_rule.js +6 -5
  136. package/optimize/es/components/link/link.js +7 -6
  137. package/optimize/es/components/loading/loading_chart.js +6 -5
  138. package/optimize/es/components/loading/loading_content.js +6 -5
  139. package/optimize/es/components/loading/loading_logo.js +6 -5
  140. package/optimize/es/components/loading/loading_spinner.js +8 -6
  141. package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
  142. package/optimize/es/components/mark/mark.js +8 -7
  143. package/optimize/es/components/markdown_editor/markdown_format.js +6 -5
  144. package/optimize/es/components/panel/panel.js +7 -6
  145. package/optimize/es/components/provider/cache/cache_context.js +12 -0
  146. package/optimize/es/components/provider/cache/cache_provider.js +17 -0
  147. package/optimize/es/components/provider/cache/index.js +9 -0
  148. package/optimize/es/components/provider/index.js +1 -1
  149. package/optimize/es/components/provider/provider.js +39 -5
  150. package/optimize/es/components/provider/system/index.js +8 -0
  151. package/optimize/es/components/provider/system/system.js +33 -0
  152. package/optimize/es/components/spacer/spacer.js +6 -5
  153. package/optimize/es/components/text/text.js +6 -5
  154. package/optimize/es/components/text/text_color.js +6 -5
  155. package/optimize/es/components/timeline/timeline_item.js +6 -5
  156. package/optimize/es/components/timeline/timeline_item_icon.js +6 -5
  157. package/optimize/es/components/title/title.js +6 -5
  158. package/optimize/es/global_styling/utility/utility.js +27 -0
  159. package/optimize/es/services/theme/hooks.js +2 -2
  160. package/optimize/es/services/theme/provider.js +1 -5
  161. package/optimize/lib/components/accessibility/skip_link/skip_link.js +8 -6
  162. package/optimize/lib/components/avatar/avatar.js +9 -5
  163. package/optimize/lib/components/bottom_bar/bottom_bar.js +9 -6
  164. package/optimize/lib/components/breadcrumbs/breadcrumbs.js +2 -1
  165. package/optimize/lib/components/button/{button_content.js → _button_content_deprecated.js} +3 -3
  166. package/optimize/lib/components/button/button.js +16 -11
  167. package/optimize/lib/components/button/button_display/_button_display.js +79 -0
  168. package/optimize/lib/components/button/button_display/_button_display.styles.js +59 -0
  169. package/optimize/lib/components/button/button_display/_button_display_content.js +78 -0
  170. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +64 -0
  171. package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
  172. package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
  173. package/optimize/lib/components/call_out/call_out.js +13 -9
  174. package/optimize/lib/components/expression/expression.js +11 -9
  175. package/optimize/lib/components/facet/facet_button.js +40 -18
  176. package/optimize/lib/components/facet/facet_button.styles.js +79 -0
  177. package/optimize/lib/components/facet/facet_group.js +15 -24
  178. package/optimize/lib/components/facet/facet_group.styles.js +82 -0
  179. package/optimize/lib/components/health/health.js +7 -5
  180. package/optimize/lib/components/horizontal_rule/horizontal_rule.js +7 -5
  181. package/optimize/lib/components/link/link.js +12 -6
  182. package/optimize/lib/components/loading/loading_chart.js +7 -5
  183. package/optimize/lib/components/loading/loading_content.js +7 -5
  184. package/optimize/lib/components/loading/loading_logo.js +7 -5
  185. package/optimize/lib/components/loading/loading_spinner.js +9 -6
  186. package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
  187. package/optimize/lib/components/mark/mark.js +9 -7
  188. package/optimize/lib/components/markdown_editor/markdown_format.js +7 -5
  189. package/optimize/lib/components/panel/panel.js +8 -6
  190. package/optimize/lib/components/provider/cache/cache_context.js +24 -0
  191. package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
  192. package/optimize/lib/components/provider/cache/index.js +31 -0
  193. package/optimize/lib/components/provider/index.js +12 -7
  194. package/optimize/lib/components/provider/provider.js +40 -5
  195. package/optimize/lib/components/provider/system/index.js +18 -0
  196. package/optimize/lib/components/provider/system/system.js +54 -0
  197. package/optimize/lib/components/spacer/spacer.js +7 -5
  198. package/optimize/lib/components/text/text.js +7 -5
  199. package/optimize/lib/components/text/text_color.js +7 -5
  200. package/optimize/lib/components/timeline/timeline_item.js +7 -5
  201. package/optimize/lib/components/timeline/timeline_item_icon.js +7 -5
  202. package/optimize/lib/components/title/title.js +8 -6
  203. package/optimize/lib/global_styling/utility/utility.js +31 -0
  204. package/optimize/lib/services/theme/hooks.js +2 -2
  205. package/optimize/lib/services/theme/provider.js +3 -6
  206. package/package.json +1 -1
  207. package/src/components/index.scss +0 -1
  208. package/src/components/selectable/selectable_message/_selectable_message.scss +1 -0
  209. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  210. package/test-env/components/accessibility/skip_link/skip_link.js +13 -10
  211. package/test-env/components/avatar/avatar.js +12 -8
  212. package/test-env/components/bottom_bar/bottom_bar.js +9 -6
  213. package/test-env/components/breadcrumbs/breadcrumbs.js +2 -1
  214. package/test-env/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
  215. package/test-env/components/button/button.js +19 -13
  216. package/test-env/components/button/button_display/_button_display.js +143 -0
  217. package/test-env/components/button/button_display/_button_display.styles.js +59 -0
  218. package/test-env/components/button/button_display/_button_display_content.js +108 -0
  219. package/test-env/components/button/button_display/_button_display_content.styles.js +64 -0
  220. package/test-env/components/button/button_empty/button_empty.js +4 -3
  221. package/test-env/components/button/button_group/button_group.js +2 -1
  222. package/test-env/components/button/button_group/button_group_button.js +3 -2
  223. package/test-env/components/call_out/call_out.js +14 -10
  224. package/test-env/components/card/card.js +2 -1
  225. package/test-env/components/card/card_select.js +2 -1
  226. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -1
  227. package/test-env/components/expression/expression.js +14 -12
  228. package/test-env/components/facet/facet_button.js +43 -21
  229. package/test-env/components/facet/facet_button.styles.js +79 -0
  230. package/test-env/components/facet/facet_group.js +20 -29
  231. package/test-env/components/facet/facet_group.styles.js +82 -0
  232. package/test-env/components/header/header_links/header_link.js +2 -1
  233. package/test-env/components/health/health.js +10 -8
  234. package/test-env/components/horizontal_rule/horizontal_rule.js +10 -8
  235. package/test-env/components/link/link.js +13 -7
  236. package/test-env/components/loading/loading_chart.js +10 -8
  237. package/test-env/components/loading/loading_content.js +10 -8
  238. package/test-env/components/loading/loading_logo.js +10 -8
  239. package/test-env/components/loading/loading_spinner.js +23 -10
  240. package/test-env/components/loading/loading_spinner.styles.js +4 -4
  241. package/test-env/components/mark/mark.js +12 -10
  242. package/test-env/components/markdown_editor/markdown_format.js +10 -8
  243. package/test-env/components/notification/notification_event.js +2 -1
  244. package/test-env/components/panel/panel.js +11 -9
  245. package/test-env/components/provider/cache/cache_context.js +24 -0
  246. package/test-env/components/provider/cache/cache_provider.js +29 -0
  247. package/test-env/components/provider/cache/index.js +31 -0
  248. package/test-env/components/provider/index.js +12 -7
  249. package/test-env/components/provider/provider.js +40 -5
  250. package/test-env/components/provider/system/index.js +18 -0
  251. package/test-env/components/provider/system/system.js +54 -0
  252. package/test-env/components/spacer/spacer.js +10 -8
  253. package/test-env/components/text/text.js +10 -8
  254. package/test-env/components/text/text_color.js +10 -8
  255. package/test-env/components/timeline/timeline_item.js +10 -8
  256. package/test-env/components/timeline/timeline_item_icon.js +10 -8
  257. package/test-env/components/title/title.js +11 -9
  258. package/test-env/global_styling/utility/utility.js +31 -0
  259. package/test-env/services/theme/hooks.js +2 -2
  260. package/test-env/services/theme/provider.js +3 -6
  261. package/src/components/facet/_facet_button.scss +0 -69
  262. package/src/components/facet/_facet_group.scss +0 -24
  263. package/src/components/facet/_index.scss +0 -4
  264. package/src/components/facet/_variables.scss +0 -6
  265. package/src/themes/amsterdam/overrides/_facet.scss +0 -10
@@ -0,0 +1,61 @@
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
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS } from '../../../global_styling';
12
+
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "ske5nx-isDisabled",
15
+ styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
16
+ } : {
17
+ name: "ske5nx-isDisabled",
18
+ styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+
22
+ var _ref2 = process.env.NODE_ENV === "production" ? {
23
+ name: "gtg6j-euiButtonDisplayContent__icon",
24
+ styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
25
+ } : {
26
+ name: "gtg6j-euiButtonDisplayContent__icon",
27
+ styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;",
28
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
+ };
30
+
31
+ var _ref3 = process.env.NODE_ENV === "production" ? {
32
+ name: "10wlo76-euiButtonDisplayContent__spinner",
33
+ styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
34
+ } : {
35
+ name: "10wlo76-euiButtonDisplayContent__spinner",
36
+ styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
37
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
+ };
39
+
40
+ var _ref4 = process.env.NODE_ENV === "production" ? {
41
+ name: "qfl6yj-right",
42
+ styles: "flex-direction:row-reverse;label:right;"
43
+ } : {
44
+ name: "qfl6yj-right",
45
+ styles: "flex-direction:row-reverse;label:right;",
46
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
47
+ };
48
+
49
+ export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref5) {
50
+ var euiTheme = _ref5.euiTheme;
51
+ return {
52
+ // Base
53
+ euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), ";", logicalCSS('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
54
+ // Icon side
55
+ left: /*#__PURE__*/css(";label:left;"),
56
+ right: _ref4,
57
+ euiButtonDisplayContent__spinner: _ref3,
58
+ euiButtonDisplayContent__icon: _ref2,
59
+ isDisabled: _ref
60
+ };
61
+ };
@@ -24,7 +24,7 @@ import PropTypes from "prop-types";
24
24
  import classNames from 'classnames';
25
25
  import { keysOf } from '../../common';
26
26
  import { getSecureRelForTarget } from '../../../services';
27
- import { EuiButtonContent } from '../button_content';
27
+ import { EuiButtonContentDeprecated as EuiButtonContent } from '../_button_content_deprecated';
28
28
  import { validateHref } from '../../../services/security/href_validator';
29
29
  import { jsx as ___EmotionJSX } from "@emotion/react";
30
30
  var colorToClassNameMap = {
@@ -201,7 +201,8 @@ EuiButtonEmpty.propTypes = {
201
201
  iconSide: PropTypes.oneOf(["left", "right"]),
202
202
 
203
203
  /**
204
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
204
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
205
+ * It doesn't apply to the icon.
205
206
  */
206
207
  textProps: PropTypes.shape({
207
208
  className: PropTypes.string,
@@ -170,7 +170,8 @@ EuiButtonGroup.propTypes = {
170
170
  isLoading: PropTypes.bool,
171
171
 
172
172
  /**
173
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
173
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
174
+ * It doesn't apply to the icon.
174
175
  */
175
176
  textProps: PropTypes.shape({
176
177
  className: PropTypes.string,
@@ -34,7 +34,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
34
34
  import classNames from 'classnames';
35
35
  import PropTypes from "prop-types";
36
36
  import React from 'react';
37
- import { EuiButtonDisplay } from '../button';
37
+ import { EuiButtonDisplayDeprecated as EuiButtonDisplay } from '../button';
38
38
  import { useInnerText } from '../../inner_text';
39
39
  import { useGeneratedHtmlId } from '../../../services';
40
40
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -159,7 +159,8 @@ EuiButtonGroupButton.propTypes = {
159
159
  isLoading: PropTypes.bool,
160
160
 
161
161
  /**
162
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
162
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
163
+ * It doesn't apply to the icon.
163
164
  */
164
165
  textProps: PropTypes.shape({
165
166
  className: PropTypes.string,
@@ -1,4 +1,4 @@
1
- var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
1
+ var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "euiTheme"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -20,14 +20,14 @@ import PropTypes from "prop-types";
20
20
  import classNames from 'classnames';
21
21
  import { EuiIcon } from '../icon';
22
22
  import { EuiText } from '../text';
23
- import { useEuiTheme } from '../../services';
23
+ import { withEuiSystem } from '../provider/system';
24
24
  import { EuiPanel } from '../panel';
25
25
  import { EuiTitle } from '../title';
26
26
  import { euiCallOutStyles, euiCallOutHeadingStyles } from './call_out.styles';
27
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
28
28
  export var COLORS = ['primary', 'success', 'warning', 'danger'];
29
29
  export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
30
- export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
30
+ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
31
31
  var title = _ref.title,
32
32
  _ref$color = _ref.color,
33
33
  color = _ref$color === void 0 ? 'primary' : _ref$color,
@@ -38,14 +38,14 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
38
  className = _ref.className,
39
39
  _ref$heading = _ref.heading,
40
40
  heading = _ref$heading === void 0 ? 'p' : _ref$heading,
41
+ euiTheme = _ref.euiTheme,
41
42
  rest = _objectWithoutProperties(_ref, _excluded);
42
43
 
43
- var theme = useEuiTheme();
44
- var styles = euiCallOutStyles(theme);
44
+ var styles = euiCallOutStyles(euiTheme);
45
45
  var cssStyles = [styles.euiCallOut];
46
46
  var cssIconStyle = [styles.euiCallOut__icon];
47
47
  var cssDescriptionStyle = [styles.euiCallOut__description];
48
- var headerStyles = euiCallOutHeadingStyles(theme);
48
+ var headerStyles = euiCallOutHeadingStyles(euiTheme);
49
49
  var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
50
50
  var classes = classNames('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
51
51
  var headerIcon;
@@ -93,7 +93,7 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
93
93
  grow: false
94
94
  }, rest), header, optionalChildren);
95
95
  });
96
- EuiCallOut.propTypes = {
96
+ _EuiCallOut.propTypes = {
97
97
  className: PropTypes.string,
98
98
  "aria-label": PropTypes.string,
99
99
  "data-test-subj": PropTypes.string,
@@ -103,4 +103,5 @@ EuiCallOut.propTypes = {
103
103
  size: PropTypes.oneOf(["s", "m"]),
104
104
  heading: PropTypes.any
105
105
  };
106
- EuiCallOut.displayName = 'EuiCallOut';
106
+ _EuiCallOut.displayName = 'EuiCallOut';
107
+ export var EuiCallOut = withEuiSystem(_EuiCallOut);
@@ -404,7 +404,8 @@ EuiCard.propTypes = {
404
404
  iconSide: PropTypes.oneOf(["left", "right"]),
405
405
 
406
406
  /**
407
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
407
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
408
+ * It doesn't apply to the icon.
408
409
  */
409
410
  textProps: PropTypes.shape({
410
411
  className: PropTypes.string,
@@ -116,7 +116,8 @@ EuiCardSelect.propTypes = {
116
116
  iconSide: PropTypes.oneOf(["left", "right"]),
117
117
 
118
118
  /**
119
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
119
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
120
+ * It doesn't apply to the icon.
120
121
  */
121
122
  textProps: PropTypes.shape({
122
123
  className: PropTypes.string,
@@ -205,7 +205,8 @@ EuiAutoRefreshButton.propTypes = {
205
205
  contentProps: PropTypes.any,
206
206
 
207
207
  /**
208
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
208
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
209
+ * It doesn't apply to the icon.
209
210
  */
210
211
  textProps: PropTypes.shape({
211
212
  className: PropTypes.string,
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
1
+ var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap", "euiTheme"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -23,11 +23,11 @@ import React from 'react';
23
23
  import PropTypes from "prop-types";
24
24
  import classNames from 'classnames';
25
25
  import { EuiIcon } from '../icon';
26
- import { useEuiTheme } from '../../services';
26
+ import { withEuiSystem } from '../provider/system';
27
27
  import { euiExpressionStyles, euiExpressionDescriptionStyles, euiExpressionValueStyles, euiExpressionIconStyles } from './expression.styles';
28
28
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
29
  export var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
30
- export var EuiExpression = function EuiExpression(_ref) {
30
+ export var _EuiExpression = function _EuiExpression(_ref) {
31
31
  var className = _ref.className,
32
32
  description = _ref.description,
33
33
  descriptionProps = _ref.descriptionProps,
@@ -48,17 +48,17 @@ export var EuiExpression = function EuiExpression(_ref) {
48
48
  isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
49
49
  _ref$textWrap = _ref.textWrap,
50
50
  textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
51
+ euiTheme = _ref.euiTheme,
51
52
  rest = _objectWithoutProperties(_ref, _excluded);
52
53
 
53
54
  var calculatedColor = isInvalid ? 'danger' : color;
54
- var theme = useEuiTheme();
55
- var styles = euiExpressionStyles(theme);
55
+ var styles = euiExpressionStyles(euiTheme);
56
56
  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];
57
- var descriptionStyles = euiExpressionDescriptionStyles(theme);
57
+ var descriptionStyles = euiExpressionDescriptionStyles(euiTheme);
58
58
  var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
59
- var valueStyles = euiExpressionValueStyles(theme);
59
+ var valueStyles = euiExpressionValueStyles(euiTheme);
60
60
  var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
61
- var iconStyles = euiExpressionIconStyles(theme);
61
+ var iconStyles = euiExpressionIconStyles(euiTheme);
62
62
  var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
63
63
  var classes = classNames('euiExpression', className);
64
64
  var Component = onClick ? 'button' : 'span';
@@ -85,7 +85,7 @@ export var EuiExpression = function EuiExpression(_ref) {
85
85
  css: cssValueStyles
86
86
  }, valueProps), value), invalidIcon);
87
87
  };
88
- EuiExpression.propTypes = {
88
+ _EuiExpression.propTypes = {
89
89
  className: PropTypes.string,
90
90
  "aria-label": PropTypes.string,
91
91
  "data-test-subj": PropTypes.string,
@@ -187,4 +187,5 @@ EuiExpression.propTypes = {
187
187
  * Sets how to handle the wrapping of long text.
188
188
  */
189
189
  textWrap: PropTypes.oneOf(["break-word", "truncate"])
190
- };
190
+ };
191
+ export var EuiExpression = withEuiSystem(_EuiExpression);
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"];
1
+ var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef", "euiTheme"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -19,8 +19,12 @@ import classNames from 'classnames';
19
19
  import { EuiNotificationBadge } from '../badge';
20
20
  import { EuiLoadingSpinner } from '../loading';
21
21
  import { EuiInnerText } from '../inner_text';
22
+ import { cloneElementWithCss } from '../../services/theme/clone_element';
23
+ import { withEuiSystem } from '../provider/system';
24
+ import { euiFacetButtonStyles, euiFacetButtonTextStyles, euiFacetButtonIconStyles, euiFacetButtonQuantityStyles, euiFacetButtonLoadingSpinnerStyles } from './facet_button.styles';
25
+ import { EuiButtonDisplay } from '../button/button_display/_button_display';
22
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
- export var EuiFacetButton = function EuiFacetButton(_ref) {
27
+ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
24
28
  var children = _ref.children,
25
29
  className = _ref.className,
26
30
  icon = _ref.icon,
@@ -32,24 +36,34 @@ export var EuiFacetButton = function EuiFacetButton(_ref) {
32
36
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
33
37
  quantity = _ref.quantity,
34
38
  buttonRef = _ref.buttonRef,
39
+ euiTheme = _ref.euiTheme,
35
40
  rest = _objectWithoutProperties(_ref, _excluded);
36
41
 
37
42
  // If in the loading state, force disabled to true
38
43
  isDisabled = isLoading ? true : isDisabled;
39
- var classes = classNames('euiFacetButton', {
40
- 'euiFacetButton--isSelected': isSelected,
41
- 'euiFacetButton--unSelected': !isSelected
42
- }, className); // Add quantity number if provided or loading indicator
44
+ var selection = isSelected ? 'isSelected' : 'unSelected';
45
+ var classes = classNames('euiFacetButton', className);
46
+ var styles = euiFacetButtonStyles(euiTheme);
47
+ var cssStyles = [styles.euiFacetButton];
48
+ var textStyles = euiFacetButtonTextStyles(euiTheme);
49
+ var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
50
+ var quantityStyles = euiFacetButtonQuantityStyles();
51
+ var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
52
+ var iconStyles = euiFacetButtonIconStyles();
53
+ var cssIconStyles = [iconStyles.euiFacetButton__icon, isDisabled && quantityStyles.isDisabled];
54
+ var loadingSpinnerStyles = euiFacetButtonLoadingSpinnerStyles();
55
+ var cssLoadingSpinnerStyles = [loadingSpinnerStyles.euiFacetButton__loadingSpinner]; // Add quantity number if provided or loading indicator
43
56
 
44
57
  var buttonQuantity;
45
58
 
46
59
  if (isLoading) {
47
60
  buttonQuantity = ___EmotionJSX(EuiLoadingSpinner, {
48
- className: "euiFacetButton__spinner",
61
+ css: cssLoadingSpinnerStyles,
49
62
  size: "m"
50
63
  });
51
64
  } else if (typeof quantity === 'number') {
52
65
  buttonQuantity = ___EmotionJSX(EuiNotificationBadge, {
66
+ css: cssQuantityStyles,
53
67
  className: "euiFacetButton__quantity",
54
68
  size: "m",
55
69
  color: !isSelected || isDisabled ? 'subdued' : 'accent'
@@ -60,28 +74,30 @@ export var EuiFacetButton = function EuiFacetButton(_ref) {
60
74
  var buttonIcon;
61
75
 
62
76
  if ( /*#__PURE__*/React.isValidElement(icon)) {
63
- buttonIcon = /*#__PURE__*/React.cloneElement(icon, {
64
- className: classNames(icon.props.className, 'euiFacetButton__icon')
77
+ buttonIcon = cloneElementWithCss(icon, {
78
+ css: cssIconStyles,
79
+ className: 'euiFacetButton__icon'
65
80
  });
66
81
  }
67
82
 
68
83
  return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
69
- return ___EmotionJSX("button", _extends({
84
+ return ___EmotionJSX(EuiButtonDisplay, _extends({
70
85
  className: classes,
71
- disabled: isDisabled,
72
- type: "button",
86
+ css: cssStyles,
87
+ element: "button",
88
+ isDisabled: isDisabled,
73
89
  ref: buttonRef,
74
- title: rest['aria-label'] || innerText
75
- }, rest), ___EmotionJSX("span", {
76
- className: "euiFacetButton__content"
77
- }, buttonIcon, ___EmotionJSX("span", {
90
+ title: rest['aria-label'] || innerText,
91
+ size: "s"
92
+ }, rest), buttonIcon, ___EmotionJSX("span", {
93
+ css: cssTextStyles,
78
94
  className: "euiFacetButton__text",
79
95
  "data-text": innerText,
80
96
  ref: ref
81
- }, children), buttonQuantity));
97
+ }, children), buttonQuantity);
82
98
  });
83
99
  };
84
- EuiFacetButton.propTypes = {
100
+ _EuiFacetButton.propTypes = {
85
101
  buttonRef: PropTypes.any,
86
102
 
87
103
  /**
@@ -113,4 +129,5 @@ EuiFacetButton.propTypes = {
113
129
  className: PropTypes.string,
114
130
  "aria-label": PropTypes.string,
115
131
  "data-test-subj": PropTypes.string
116
- };
132
+ };
133
+ export var EuiFacetButton = withEuiSystem(_EuiFacetButton);
@@ -0,0 +1,64 @@
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
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { euiTextTruncate, euiTextShift, logicalTextAlignCSS } from '../../global_styling';
12
+ import { euiLinkFocusCSS } from '../link/link.styles';
13
+ export var euiFacetButtonStyles = function euiFacetButtonStyles(_ref3) {
14
+ var euiTheme = _ref3.euiTheme;
15
+ return {
16
+ // Base
17
+ euiFacetButton: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";&:hover,&:focus{&:not(:disabled) [class*='euiFacetButton__text']{text-decoration:underline;}}&:focus:not(:disabled) [class*='euiFacetButton__text']{", euiLinkFocusCSS(euiTheme), ";}&:disabled{color:", euiTheme.colors.disabledText, ";pointer-events:none;&:hover,&:focus{text-decoration:none;}};label:euiFacetButton;")
18
+ };
19
+ };
20
+ export var euiFacetButtonTextStyles = function euiFacetButtonTextStyles(_ref4) {
21
+ var euiTheme = _ref4.euiTheme;
22
+ return {
23
+ euiFacetButton__text: /*#__PURE__*/css(euiTextShift('bold', 'data-text', euiTheme), " ", euiTextTruncate(), " flex-grow:1;;label:euiFacetButton__text;"),
24
+ isSelected: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";;label:isSelected;"),
25
+ unSelected: /*#__PURE__*/css(";label:unSelected;")
26
+ };
27
+ };
28
+
29
+ var _ref2 = process.env.NODE_ENV === "production" ? {
30
+ name: "mpq8zy-isDisabled",
31
+ styles: "opacity:0.5;label:isDisabled;"
32
+ } : {
33
+ name: "mpq8zy-isDisabled",
34
+ styles: "opacity:0.5;label:isDisabled;",
35
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
+ };
37
+
38
+ export var euiFacetButtonIconStyles = function euiFacetButtonIconStyles() {
39
+ return {
40
+ euiFacetButton__icon: /*#__PURE__*/css(";label:euiFacetButton__icon;"),
41
+ isDisabled: _ref2
42
+ };
43
+ };
44
+ export var euiFacetButtonLoadingSpinnerStyles = function euiFacetButtonLoadingSpinnerStyles() {
45
+ return {
46
+ euiFacetButton__loadingSpinner: /*#__PURE__*/css(";label:euiFacetButton__loadingSpinner;")
47
+ };
48
+ };
49
+
50
+ var _ref = process.env.NODE_ENV === "production" ? {
51
+ name: "mpq8zy-isDisabled",
52
+ styles: "opacity:0.5;label:isDisabled;"
53
+ } : {
54
+ name: "mpq8zy-isDisabled",
55
+ styles: "opacity:0.5;label:isDisabled;",
56
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
57
+ };
58
+
59
+ export var euiFacetButtonQuantityStyles = function euiFacetButtonQuantityStyles() {
60
+ return {
61
+ euiFacetButton__quantity: /*#__PURE__*/css(";label:euiFacetButton__quantity;"),
62
+ isDisabled: _ref
63
+ };
64
+ };
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "layout", "gutterSize"];
1
+ var _excluded = ["children", "className", "layout", "gutterSize", "euiTheme"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -16,41 +16,30 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
- import { keysOf } from '../common';
20
- import { EuiFlexGroup } from '../flex';
19
+ import { withEuiSystem } from '../provider/system';
20
+ import { euiFacetGroupStyles } from './facet_group.styles';
21
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
- var layoutToClassNameMap = {
23
- vertical: 'euiFacetGroup--vertical',
24
- horizontal: 'euiFacetGroup--horizontal'
25
- };
26
- export var LAYOUTS = keysOf(layoutToClassNameMap);
27
- var gutterSizeToClassNameMap = {
28
- none: 'euiFacetGroup--gutterNone',
29
- s: 'euiFacetGroup--gutterSmall',
30
- m: 'euiFacetGroup--gutterMedium',
31
- l: 'euiFacetGroup--gutterLarge'
32
- };
33
- export var GUTTER_SIZES = keysOf(gutterSizeToClassNameMap);
34
- export var EuiFacetGroup = function EuiFacetGroup(_ref) {
22
+ export var LAYOUTS = ['vertical', 'horizontal'];
23
+ export var GUTTER_SIZES = ['none', 's', 'm', 'l'];
24
+ export var _EuiFacetGroup = function _EuiFacetGroup(_ref) {
35
25
  var children = _ref.children,
36
26
  className = _ref.className,
37
27
  _ref$layout = _ref.layout,
38
28
  layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
39
29
  _ref$gutterSize = _ref.gutterSize,
40
30
  gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
31
+ euiTheme = _ref.euiTheme,
41
32
  rest = _objectWithoutProperties(_ref, _excluded);
42
33
 
43
- var classes = classNames('euiFacetGroup', layoutToClassNameMap[layout], gutterSizeToClassNameMap[gutterSize], className);
44
- var direction = layout === 'vertical' ? 'column' : 'row';
45
- var wrap = layout === 'vertical' ? false : true;
46
- return ___EmotionJSX(EuiFlexGroup, _extends({
34
+ var styles = euiFacetGroupStyles(euiTheme, layout);
35
+ var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
36
+ var classes = classNames('euiFacetGroup', className);
37
+ return ___EmotionJSX("div", _extends({
47
38
  className: classes,
48
- direction: direction,
49
- wrap: wrap,
50
- gutterSize: "none"
39
+ css: cssStyles
51
40
  }, rest), children);
52
41
  };
53
- EuiFacetGroup.propTypes = {
42
+ _EuiFacetGroup.propTypes = {
54
43
  className: PropTypes.string,
55
44
  "aria-label": PropTypes.string,
56
45
  "data-test-subj": PropTypes.string,
@@ -58,11 +47,12 @@ EuiFacetGroup.propTypes = {
58
47
  /**
59
48
  * Vertically in a column, or horizontally in one wrapping line
60
49
  */
61
- layout: PropTypes.oneOf(["vertical", "horizontal"]),
50
+ layout: PropTypes.any,
62
51
 
63
52
  /**
64
53
  * Distance between facet buttons.
65
54
  * Horizontal layout always adds more distance horizontally between buttons.
66
55
  */
67
- gutterSize: PropTypes.oneOf(["none", "s", "m", "l"])
68
- };
56
+ gutterSize: PropTypes.any
57
+ };
58
+ export var EuiFacetGroup = withEuiSystem(_EuiFacetGroup);
@@ -0,0 +1,79 @@
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
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { useEuiTheme } from '../../services';
12
+
13
+ var _facetGroupGutterSize = function _facetGroupGutterSize(_ref4) {
14
+ var gutterSize = _ref4.gutterSize,
15
+ layout = _ref4.layout;
16
+
17
+ var _useEuiTheme = useEuiTheme(),
18
+ euiTheme = _useEuiTheme.euiTheme;
19
+
20
+ var isHorizontalLayout = layout === 'horizontal';
21
+ var gutterHorizontal = "calc(".concat(euiTheme.size.m, " + ").concat(gutterSize, ")");
22
+ var gutterVertical = gutterSize;
23
+ return isHorizontalLayout ? "gap: ".concat(gutterVertical, " ").concat(gutterHorizontal, ";") : "gap: ".concat(gutterVertical, " 0;");
24
+ };
25
+
26
+ var _ref = process.env.NODE_ENV === "production" ? {
27
+ name: "omnk2l-vertical",
28
+ styles: "flex-direction:column;label:vertical;"
29
+ } : {
30
+ name: "omnk2l-vertical",
31
+ styles: "flex-direction:column;label:vertical;",
32
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
+ };
34
+
35
+ var _ref2 = process.env.NODE_ENV === "production" ? {
36
+ name: "envaaw-horizontal",
37
+ styles: "flex-direction:row;flex-wrap:wrap;label:horizontal;"
38
+ } : {
39
+ name: "envaaw-horizontal",
40
+ styles: "flex-direction:row;flex-wrap:wrap;label:horizontal;",
41
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
42
+ };
43
+
44
+ var _ref3 = process.env.NODE_ENV === "production" ? {
45
+ name: "1g68sie-euiFacetGroup",
46
+ styles: "display:flex;flex-grow:1;label:euiFacetGroup;"
47
+ } : {
48
+ name: "1g68sie-euiFacetGroup",
49
+ styles: "display:flex;flex-grow:1;label:euiFacetGroup;",
50
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
51
+ };
52
+
53
+ export var euiFacetGroupStyles = function euiFacetGroupStyles(_ref5, layout) {
54
+ var euiTheme = _ref5.euiTheme;
55
+ return {
56
+ // Base
57
+ euiFacetGroup: _ref3,
58
+ // Gutter sizes
59
+ none: /*#__PURE__*/css(_facetGroupGutterSize({
60
+ gutterSize: '0',
61
+ layout: layout
62
+ }), ";label:none;"),
63
+ s: /*#__PURE__*/css(_facetGroupGutterSize({
64
+ gutterSize: euiTheme.size.xs,
65
+ layout: layout
66
+ }), ";label:s;"),
67
+ m: /*#__PURE__*/css(_facetGroupGutterSize({
68
+ gutterSize: euiTheme.size.s,
69
+ layout: layout
70
+ }), ";label:m;"),
71
+ l: /*#__PURE__*/css(_facetGroupGutterSize({
72
+ gutterSize: euiTheme.size.m,
73
+ layout: layout
74
+ }), ";label:l;"),
75
+ // layouts
76
+ horizontal: _ref2,
77
+ vertical: _ref
78
+ };
79
+ };
@@ -111,7 +111,8 @@ EuiHeaderLink.propTypes = {
111
111
  iconSide: PropTypes.oneOf(["left", "right"]),
112
112
 
113
113
  /**
114
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
114
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
115
+ * It doesn't apply to the icon.
115
116
  */
116
117
  textProps: PropTypes.shape({
117
118
  className: PropTypes.string,
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "color", "textSize"];
1
+ var _excluded = ["children", "className", "color", "euiTheme", "textSize"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -16,21 +16,21 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
- import { useEuiTheme } from '../../services';
19
+ import { withEuiSystem } from '../provider/system';
20
20
  import { euiHealthStyles } from './health.styles';
21
21
  import { EuiIcon } from '../icon';
22
22
  import { EuiFlexGroup, EuiFlexItem } from '../flex';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  export var TEXT_SIZES = ['xs', 's', 'm', 'inherit'];
25
- export var EuiHealth = function EuiHealth(_ref) {
25
+ export var _EuiHealth = function _EuiHealth(_ref) {
26
26
  var children = _ref.children,
27
27
  className = _ref.className,
28
28
  color = _ref.color,
29
+ euiTheme = _ref.euiTheme,
29
30
  _ref$textSize = _ref.textSize,
30
31
  textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
31
32
  rest = _objectWithoutProperties(_ref, _excluded);
32
33
 
33
- var euiTheme = useEuiTheme();
34
34
  var styles = euiHealthStyles(euiTheme);
35
35
  var cssStyles = [styles.euiHealth, styles[textSize]];
36
36
  var classes = classNames('euiHealth', className);
@@ -50,7 +50,7 @@ export var EuiHealth = function EuiHealth(_ref) {
50
50
  grow: false
51
51
  }, children)));
52
52
  };
53
- EuiHealth.propTypes = {
53
+ _EuiHealth.propTypes = {
54
54
  className: PropTypes.string,
55
55
  "aria-label": PropTypes.string,
56
56
  "data-test-subj": PropTypes.string,
@@ -67,4 +67,5 @@ EuiHealth.propTypes = {
67
67
  * The `inherit` style will get its font size from the parent element
68
68
  */
69
69
  textSize: PropTypes.any
70
- };
70
+ };
71
+ export var EuiHealth = withEuiSystem(_EuiHealth);