@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,53 @@
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 { euiFontSize, logicalCSS, logicalTextAlignStyle } from '../../../global_styling'; // Provides a solid reset and base for handling sizing layout
12
+ // Does not include any visual styles
13
+
14
+ export var euiButtonBaseCSS = function euiButtonBaseCSS() {
15
+ return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat(logicalTextAlignStyle('center'), ";\n white-space: nowrap;\n ").concat(logicalCSS('max-width', '100%'), ";\n vertical-align: middle;\n ");
16
+ };
17
+
18
+ var _buttonSize = function _buttonSize(size) {
19
+ return "\n ".concat(logicalCSS('height', size), ";\n // prevents descenders from getting cut off\n line-height: ").concat(size, ";\n ");
20
+ };
21
+
22
+ var _ref = process.env.NODE_ENV === "production" ? {
23
+ name: "15xpz7k-fullWidth",
24
+ styles: "display:block;width:100%;label:fullWidth;"
25
+ } : {
26
+ name: "15xpz7k-fullWidth",
27
+ styles: "display:block;width:100%;label:fullWidth;",
28
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
+ };
30
+
31
+ var _ref2 = process.env.NODE_ENV === "production" ? {
32
+ name: "8595p9-isDisabled",
33
+ styles: "cursor:not-allowed;label:isDisabled;"
34
+ } : {
35
+ name: "8595p9-isDisabled",
36
+ styles: "cursor:not-allowed;label:isDisabled;",
37
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
+ };
39
+
40
+ export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, minWidth) {
41
+ var euiTheme = euiThemeContext.euiTheme;
42
+ return {
43
+ // Base
44
+ euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";", minWidth && logicalCSS('min-width', minWidth), ";;label:euiButtonDisplay;"),
45
+ // States
46
+ isDisabled: _ref2,
47
+ fullWidth: _ref,
48
+ // Sizes
49
+ xs: /*#__PURE__*/css(_buttonSize(euiTheme.size.l), euiFontSize(euiThemeContext, 'xs'), ";label:xs;"),
50
+ s: /*#__PURE__*/css(_buttonSize(euiTheme.size.xl), euiFontSize(euiThemeContext, 's'), ";label:s;"),
51
+ m: /*#__PURE__*/css(_buttonSize(euiTheme.size.xxl), euiFontSize(euiThemeContext, 's'), ";label:m;")
52
+ };
53
+ };
@@ -0,0 +1,67 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ import React from 'react';
13
+ import { useEuiTheme } from '../../../services';
14
+ import { EuiLoadingSpinner } from '../../loading';
15
+ import { EuiIcon } from '../../icon';
16
+ import { euiButtonDisplayContentStyles } from './_button_display_content.styles';
17
+ import { jsx as ___EmotionJSX } from "@emotion/react";
18
+ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
19
+ var children = _ref.children,
20
+ textProps = _ref.textProps,
21
+ _ref$isLoading = _ref.isLoading,
22
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
23
+ _ref$isDisabled = _ref.isDisabled,
24
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
25
+ iconType = _ref.iconType,
26
+ _ref$iconSize = _ref.iconSize,
27
+ iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
28
+ iconSide = _ref.iconSide,
29
+ contentProps = _objectWithoutProperties(_ref, _excluded);
30
+
31
+ var theme = useEuiTheme();
32
+ var styles = euiButtonDisplayContentStyles(theme);
33
+ var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide], isDisabled && styles.isDisabled];
34
+ var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
35
+ var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
36
+
37
+ var icon; // When the button is disabled the text gets gray
38
+ // and in some buttons the background gets a light gray
39
+ // for better contrast we want to change the border of the spinner
40
+ // to have the same color of the text. This way we ensure the borders
41
+ // are always visible. The default spinner color could be very light.
42
+
43
+ var loadingSpinnerColor = isDisabled ? {
44
+ border: 'currentColor'
45
+ } : undefined;
46
+
47
+ if (isLoading) {
48
+ icon = ___EmotionJSX(EuiLoadingSpinner, {
49
+ css: cssSpinnerStyles,
50
+ size: iconSize,
51
+ color: loadingSpinnerColor
52
+ });
53
+ } else if (iconType) {
54
+ icon = ___EmotionJSX(EuiIcon, {
55
+ css: cssIconStyles,
56
+ type: iconType,
57
+ size: iconSize,
58
+ color: "inherit" // forces the icon to inherit its parent color
59
+
60
+ });
61
+ }
62
+
63
+ var isText = typeof children === 'string';
64
+ return ___EmotionJSX("span", _extends({}, contentProps, {
65
+ css: cssStyles
66
+ }), icon, isText ? ___EmotionJSX("span", textProps, children) : children);
67
+ };
@@ -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
+ };
@@ -18,7 +18,7 @@ import React from 'react';
18
18
  import classNames from 'classnames';
19
19
  import { keysOf } from '../../common';
20
20
  import { getSecureRelForTarget } from '../../../services';
21
- import { EuiButtonContent } from '../button_content';
21
+ import { EuiButtonContentDeprecated as EuiButtonContent } from '../_button_content_deprecated';
22
22
  import { validateHref } from '../../../services/security/href_validator';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  var colorToClassNameMap = {
@@ -17,7 +17,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  */
18
18
  import classNames from 'classnames';
19
19
  import React from 'react';
20
- import { EuiButtonDisplay } from '../button';
20
+ import { EuiButtonDisplayDeprecated as EuiButtonDisplay } from '../button';
21
21
  import { useInnerText } from '../../inner_text';
22
22
  import { useGeneratedHtmlId } from '../../../services';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -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"];
4
+ var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "euiTheme"];
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 { useEuiTheme } from '../../services';
17
+ import { withEuiSystem } from '../provider/system';
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,
35
36
  rest = _objectWithoutProperties(_ref, _excluded);
36
37
 
37
- var theme = useEuiTheme();
38
- var styles = euiCallOutStyles(theme);
38
+ var styles = euiCallOutStyles(euiTheme);
39
39
  var cssStyles = [styles.euiCallOut];
40
40
  var cssIconStyle = [styles.euiCallOut__icon];
41
41
  var cssDescriptionStyle = [styles.euiCallOut__description];
42
- var headerStyles = euiCallOutHeadingStyles(theme);
42
+ var headerStyles = euiCallOutHeadingStyles(euiTheme);
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,4 +87,5 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
87
87
  grow: false
88
88
  }, rest), header, optionalChildren);
89
89
  });
90
- EuiCallOut.displayName = 'EuiCallOut';
90
+ _EuiCallOut.displayName = 'EuiCallOut';
91
+ export var EuiCallOut = withEuiSystem(_EuiCallOut);
@@ -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"];
4
+ var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap", "euiTheme"];
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 { useEuiTheme } from '../../services';
20
+ import { withEuiSystem } from '../provider/system';
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,
45
46
  rest = _objectWithoutProperties(_ref, _excluded);
46
47
 
47
48
  var calculatedColor = isInvalid ? 'danger' : color;
48
- var theme = useEuiTheme();
49
- var styles = euiExpressionStyles(theme);
49
+ var styles = euiExpressionStyles(euiTheme);
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(theme);
51
+ var descriptionStyles = euiExpressionDescriptionStyles(euiTheme);
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(theme);
53
+ var valueStyles = euiExpressionValueStyles(euiTheme);
54
54
  var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
55
- var iconStyles = euiExpressionIconStyles(theme);
55
+ var iconStyles = euiExpressionIconStyles(euiTheme);
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,4 +78,5 @@ export var EuiExpression = function EuiExpression(_ref) {
78
78
  className: "euiExpression__value",
79
79
  css: cssValueStyles
80
80
  }, valueProps), value), invalidIcon);
81
- };
81
+ };
82
+ export var EuiExpression = withEuiSystem(_EuiExpression);
@@ -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"];
3
+ var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef", "euiTheme"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -14,8 +14,12 @@ import classNames from 'classnames';
14
14
  import { EuiNotificationBadge } from '../badge';
15
15
  import { EuiLoadingSpinner } from '../loading';
16
16
  import { EuiInnerText } from '../inner_text';
17
+ import { cloneElementWithCss } from '../../services/theme/clone_element';
18
+ import { withEuiSystem } from '../provider/system';
19
+ import { euiFacetButtonStyles, euiFacetButtonTextStyles, euiFacetButtonIconStyles, euiFacetButtonQuantityStyles, euiFacetButtonLoadingSpinnerStyles } from './facet_button.styles';
20
+ import { EuiButtonDisplay } from '../button/button_display/_button_display';
17
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
- export var EuiFacetButton = function EuiFacetButton(_ref) {
22
+ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
19
23
  var children = _ref.children,
20
24
  className = _ref.className,
21
25
  icon = _ref.icon,
@@ -27,24 +31,34 @@ export var EuiFacetButton = function EuiFacetButton(_ref) {
27
31
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
28
32
  quantity = _ref.quantity,
29
33
  buttonRef = _ref.buttonRef,
34
+ euiTheme = _ref.euiTheme,
30
35
  rest = _objectWithoutProperties(_ref, _excluded);
31
36
 
32
37
  // If in the loading state, force disabled to true
33
38
  isDisabled = isLoading ? true : isDisabled;
34
- var classes = classNames('euiFacetButton', {
35
- 'euiFacetButton--isSelected': isSelected,
36
- 'euiFacetButton--unSelected': !isSelected
37
- }, className); // Add quantity number if provided or loading indicator
39
+ var selection = isSelected ? 'isSelected' : 'unSelected';
40
+ var classes = classNames('euiFacetButton', className);
41
+ var styles = euiFacetButtonStyles(euiTheme);
42
+ var cssStyles = [styles.euiFacetButton];
43
+ var textStyles = euiFacetButtonTextStyles(euiTheme);
44
+ var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
45
+ var quantityStyles = euiFacetButtonQuantityStyles();
46
+ var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
47
+ var iconStyles = euiFacetButtonIconStyles();
48
+ var cssIconStyles = [iconStyles.euiFacetButton__icon, isDisabled && quantityStyles.isDisabled];
49
+ var loadingSpinnerStyles = euiFacetButtonLoadingSpinnerStyles();
50
+ var cssLoadingSpinnerStyles = [loadingSpinnerStyles.euiFacetButton__loadingSpinner]; // Add quantity number if provided or loading indicator
38
51
 
39
52
  var buttonQuantity;
40
53
 
41
54
  if (isLoading) {
42
55
  buttonQuantity = ___EmotionJSX(EuiLoadingSpinner, {
43
- className: "euiFacetButton__spinner",
56
+ css: cssLoadingSpinnerStyles,
44
57
  size: "m"
45
58
  });
46
59
  } else if (typeof quantity === 'number') {
47
60
  buttonQuantity = ___EmotionJSX(EuiNotificationBadge, {
61
+ css: cssQuantityStyles,
48
62
  className: "euiFacetButton__quantity",
49
63
  size: "m",
50
64
  color: !isSelected || isDisabled ? 'subdued' : 'accent'
@@ -55,24 +69,27 @@ export var EuiFacetButton = function EuiFacetButton(_ref) {
55
69
  var buttonIcon;
56
70
 
57
71
  if ( /*#__PURE__*/React.isValidElement(icon)) {
58
- buttonIcon = /*#__PURE__*/React.cloneElement(icon, {
59
- className: classNames(icon.props.className, 'euiFacetButton__icon')
72
+ buttonIcon = cloneElementWithCss(icon, {
73
+ css: cssIconStyles,
74
+ className: 'euiFacetButton__icon'
60
75
  });
61
76
  }
62
77
 
63
78
  return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
64
- return ___EmotionJSX("button", _extends({
79
+ return ___EmotionJSX(EuiButtonDisplay, _extends({
65
80
  className: classes,
66
- disabled: isDisabled,
67
- type: "button",
81
+ css: cssStyles,
82
+ element: "button",
83
+ isDisabled: isDisabled,
68
84
  ref: buttonRef,
69
- title: rest['aria-label'] || innerText
70
- }, rest), ___EmotionJSX("span", {
71
- className: "euiFacetButton__content"
72
- }, buttonIcon, ___EmotionJSX("span", {
85
+ title: rest['aria-label'] || innerText,
86
+ size: "s"
87
+ }, rest), buttonIcon, ___EmotionJSX("span", {
88
+ css: cssTextStyles,
73
89
  className: "euiFacetButton__text",
74
90
  "data-text": innerText,
75
91
  ref: ref
76
- }, children), buttonQuantity));
92
+ }, children), buttonQuantity);
77
93
  });
78
- };
94
+ };
95
+ 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,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"];
3
+ var _excluded = ["children", "className", "layout", "gutterSize", "euiTheme"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -11,37 +11,27 @@ var _excluded = ["children", "className", "layout", "gutterSize"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { keysOf } from '../common';
15
- import { EuiFlexGroup } from '../flex';
14
+ import { withEuiSystem } from '../provider/system';
15
+ import { euiFacetGroupStyles } from './facet_group.styles';
16
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
- var layoutToClassNameMap = {
18
- vertical: 'euiFacetGroup--vertical',
19
- horizontal: 'euiFacetGroup--horizontal'
20
- };
21
- export var LAYOUTS = keysOf(layoutToClassNameMap);
22
- var gutterSizeToClassNameMap = {
23
- none: 'euiFacetGroup--gutterNone',
24
- s: 'euiFacetGroup--gutterSmall',
25
- m: 'euiFacetGroup--gutterMedium',
26
- l: 'euiFacetGroup--gutterLarge'
27
- };
28
- export var GUTTER_SIZES = keysOf(gutterSizeToClassNameMap);
29
- export var EuiFacetGroup = function EuiFacetGroup(_ref) {
17
+ export var LAYOUTS = ['vertical', 'horizontal'];
18
+ export var GUTTER_SIZES = ['none', 's', 'm', 'l'];
19
+ export var _EuiFacetGroup = function _EuiFacetGroup(_ref) {
30
20
  var children = _ref.children,
31
21
  className = _ref.className,
32
22
  _ref$layout = _ref.layout,
33
23
  layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
34
24
  _ref$gutterSize = _ref.gutterSize,
35
25
  gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
26
+ euiTheme = _ref.euiTheme,
36
27
  rest = _objectWithoutProperties(_ref, _excluded);
37
28
 
38
- var classes = classNames('euiFacetGroup', layoutToClassNameMap[layout], gutterSizeToClassNameMap[gutterSize], className);
39
- var direction = layout === 'vertical' ? 'column' : 'row';
40
- var wrap = layout === 'vertical' ? false : true;
41
- return ___EmotionJSX(EuiFlexGroup, _extends({
29
+ var styles = euiFacetGroupStyles(euiTheme, layout);
30
+ var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
31
+ var classes = classNames('euiFacetGroup', className);
32
+ return ___EmotionJSX("div", _extends({
42
33
  className: classes,
43
- direction: direction,
44
- wrap: wrap,
45
- gutterSize: "none"
34
+ css: cssStyles
46
35
  }, rest), children);
47
- };
36
+ };
37
+ 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
+ };
@@ -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", "textSize"];
3
+ var _excluded = ["children", "className", "color", "euiTheme", "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", "textSize"];
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { useEuiTheme } from '../../services';
14
+ import { withEuiSystem } from '../provider/system';
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,
24
25
  _ref$textSize = _ref.textSize,
25
26
  textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
26
27
  rest = _objectWithoutProperties(_ref, _excluded);
27
28
 
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,4 +44,5 @@ export var EuiHealth = function EuiHealth(_ref) {
44
44
  })), ___EmotionJSX(EuiFlexItem, {
45
45
  grow: false
46
46
  }, children)));
47
- };
47
+ };
48
+ export var EuiHealth = withEuiSystem(_EuiHealth);