@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
package/i18ntokens.json CHANGED
@@ -181,11 +181,11 @@
181
181
  "highlighting": "string",
182
182
  "loc": {
183
183
  "start": {
184
- "line": 181,
184
+ "line": 182,
185
185
  "column": 8
186
186
  },
187
187
  "end": {
188
- "line": 184,
188
+ "line": 185,
189
189
  "column": 9
190
190
  }
191
191
  },
@@ -197,11 +197,11 @@
197
197
  "highlighting": "string",
198
198
  "loc": {
199
199
  "start": {
200
- "line": 211,
200
+ "line": 212,
201
201
  "column": 14
202
202
  },
203
203
  "end": {
204
- "line": 215,
204
+ "line": 216,
205
205
  "column": 16
206
206
  }
207
207
  },
@@ -213,11 +213,11 @@
213
213
  "highlighting": "string",
214
214
  "loc": {
215
215
  "start": {
216
- "line": 217,
216
+ "line": 218,
217
217
  "column": 14
218
218
  },
219
219
  "end": {
220
- "line": 220,
220
+ "line": 221,
221
221
  "column": 16
222
222
  }
223
223
  },
@@ -3749,11 +3749,11 @@
3749
3749
  "highlighting": "string",
3750
3750
  "loc": {
3751
3751
  "start": {
3752
- "line": 107,
3752
+ "line": 111,
3753
3753
  "column": 10
3754
3754
  },
3755
3755
  "end": {
3756
- "line": 110,
3756
+ "line": 114,
3757
3757
  "column": 12
3758
3758
  }
3759
3759
  },
@@ -3765,11 +3765,11 @@
3765
3765
  "highlighting": "string",
3766
3766
  "loc": {
3767
3767
  "start": {
3768
- "line": 117,
3768
+ "line": 121,
3769
3769
  "column": 20
3770
3770
  },
3771
3771
  "end": {
3772
- "line": 117,
3772
+ "line": 121,
3773
3773
  "column": 77
3774
3774
  }
3775
3775
  },
@@ -3829,11 +3829,11 @@
3829
3829
  "highlighting": "string",
3830
3830
  "loc": {
3831
3831
  "start": {
3832
- "line": 37,
3832
+ "line": 40,
3833
3833
  "column": 27
3834
3834
  },
3835
3835
  "end": {
3836
- "line": 37,
3836
+ "line": 40,
3837
3837
  "column": 77
3838
3838
  }
3839
3839
  },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.POSITIONS = exports.EuiSkipLink = void 0;
6
+ exports._EuiSkipLink = exports.POSITIONS = exports.EuiSkipLink = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -11,17 +11,17 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _services = require("../../../services");
15
-
16
14
  var _button = require("../../button/button");
17
15
 
16
+ var _system = require("../../provider/system");
17
+
18
18
  var _screen_reader_only = require("../screen_reader_only");
19
19
 
20
20
  var _skip_link = require("./skip_link.styles");
21
21
 
22
22
  var _react2 = require("@emotion/react");
23
23
 
24
- var _excluded = ["destinationId", "tabIndex", "position", "children", "className"];
24
+ var _excluded = ["destinationId", "tabIndex", "position", "children", "className", "euiTheme"];
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
@@ -34,16 +34,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
34
34
  var POSITIONS = ['static', 'fixed', 'absolute'];
35
35
  exports.POSITIONS = POSITIONS;
36
36
 
37
- var EuiSkipLink = function EuiSkipLink(_ref) {
37
+ var _EuiSkipLink = function _EuiSkipLink(_ref) {
38
38
  var destinationId = _ref.destinationId,
39
39
  tabIndex = _ref.tabIndex,
40
40
  _ref$position = _ref.position,
41
41
  position = _ref$position === void 0 ? 'static' : _ref$position,
42
42
  children = _ref.children,
43
43
  className = _ref.className,
44
+ euiTheme = _ref.euiTheme,
44
45
  rest = _objectWithoutProperties(_ref, _excluded);
45
46
 
46
- var euiTheme = (0, _services.useEuiTheme)();
47
47
  var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
48
48
  var classes = (0, _classnames.default)('euiSkipLink', className);
49
49
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
@@ -67,8 +67,8 @@ var EuiSkipLink = function EuiSkipLink(_ref) {
67
67
  }, optionalProps, rest), children));
68
68
  };
69
69
 
70
- exports.EuiSkipLink = EuiSkipLink;
71
- EuiSkipLink.propTypes = {
70
+ exports._EuiSkipLink = _EuiSkipLink;
71
+ _EuiSkipLink.propTypes = {
72
72
  href: _propTypes.default.string,
73
73
  onClick: _propTypes.default.func,
74
74
 
@@ -162,7 +162,8 @@ EuiSkipLink.propTypes = {
162
162
  iconSide: _propTypes.default.oneOf(["left", "right"]),
163
163
 
164
164
  /**
165
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
165
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
166
+ * It doesn't apply to the icon.
166
167
  */
167
168
  textProps: _propTypes.default.shape({
168
169
  className: _propTypes.default.string,
@@ -176,4 +177,6 @@ EuiSkipLink.propTypes = {
176
177
  "aria-label": _propTypes.default.string,
177
178
  "data-test-subj": _propTypes.default.string,
178
179
  buttonRef: _propTypes.default.any
179
- };
180
+ };
181
+ var EuiSkipLink = (0, _system.withEuiSystem)(_EuiSkipLink);
182
+ exports.EuiSkipLink = EuiSkipLink;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
6
+ exports.checkValidColor = exports._EuiAvatar = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _color = require("../../services/color");
15
15
 
16
+ var _system = require("../provider/system");
17
+
16
18
  var _services = require("../../services");
17
19
 
18
20
  var _icon = require("../icon");
@@ -21,7 +23,7 @@ var _avatar = require("./avatar.styles");
21
23
 
22
24
  var _react2 = require("@emotion/react");
23
25
 
24
- var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
26
+ var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
25
27
 
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
@@ -50,11 +52,12 @@ exports.SIZES = SIZES;
50
52
  var TYPES = ['space', 'user'];
51
53
  exports.TYPES = TYPES;
52
54
 
53
- var EuiAvatar = function EuiAvatar(_ref) {
55
+ var _EuiAvatar = function _EuiAvatar(_ref) {
54
56
  var _classNames;
55
57
 
56
58
  var className = _ref.className,
57
59
  color = _ref.color,
60
+ euiTheme = _ref.euiTheme,
58
61
  imageUrl = _ref.imageUrl,
59
62
  initials = _ref.initials,
60
63
  initialsLength = _ref.initialsLength,
@@ -71,7 +74,6 @@ var EuiAvatar = function EuiAvatar(_ref) {
71
74
  style = _ref.style,
72
75
  rest = _objectWithoutProperties(_ref, _excluded);
73
76
 
74
- var euiTheme = (0, _services.useEuiTheme)();
75
77
  var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
76
78
  var visColors = (0, _services.euiPaletteColorBlindBehindText)();
77
79
  var isPlain = color === 'plain';
@@ -124,11 +126,10 @@ var EuiAvatar = function EuiAvatar(_ref) {
124
126
  role: isDisabled ? 'presentation' : 'img',
125
127
  title: name
126
128
  }, rest), content);
127
- }; // TODO: Migrate to a service
128
-
129
+ };
129
130
 
130
- exports.EuiAvatar = EuiAvatar;
131
- EuiAvatar.propTypes = {
131
+ exports._EuiAvatar = _EuiAvatar;
132
+ _EuiAvatar.propTypes = {
132
133
  className: _propTypes.default.string,
133
134
  "aria-label": _propTypes.default.string,
134
135
  "data-test-subj": _propTypes.default.string,
@@ -189,6 +190,9 @@ EuiAvatar.propTypes = {
189
190
  */
190
191
  isDisabled: _propTypes.default.bool
191
192
  };
193
+ var EuiAvatar = (0, _system.withEuiSystem)(_EuiAvatar); // TODO: Migrate to a service
194
+
195
+ exports.EuiAvatar = EuiAvatar;
192
196
 
193
197
  var checkValidColor = function checkValidColor(color) {
194
198
  var validHex = color && (0, _color.isValidHex)(color) || color === 'plain' || color === 'subdued';
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.paddingSizeToClassNameMap = exports.POSITIONS = exports.EuiBottomBar = void 0;
8
+ exports.paddingSizeToClassNameMap = exports._EuiBottomBar = exports.POSITIONS = exports.EuiBottomBar = void 0;
9
9
 
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
@@ -23,13 +23,15 @@ var _resize_observer = require("../observer/resize_observer");
23
23
 
24
24
  var _portal = require("../portal");
25
25
 
26
- var _bottom_bar = require("./bottom_bar.styles");
26
+ var _system = require("../provider/system");
27
27
 
28
28
  var _provider = require("../../services/theme/provider");
29
29
 
30
+ var _bottom_bar = require("./bottom_bar.styles");
31
+
30
32
  var _react2 = require("@emotion/react");
31
33
 
32
- var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
34
+ var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style", "euiTheme"];
33
35
 
34
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
37
 
@@ -93,9 +95,9 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
93
95
  bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
94
96
  top = _ref.top,
95
97
  style = _ref.style,
98
+ euiTheme = _ref.euiTheme,
96
99
  rest = _objectWithoutProperties(_ref, _excluded);
97
100
 
98
- var euiTheme = (0, _services.useEuiTheme)();
99
101
  var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
100
102
 
101
103
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -169,6 +171,7 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
169
171
  return usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, bar) : bar;
170
172
  });
171
173
 
174
+ exports._EuiBottomBar = _EuiBottomBar;
172
175
  _EuiBottomBar.propTypes = {
173
176
  className: _propTypes.default.string,
174
177
  "aria-label": _propTypes.default.string,
@@ -233,9 +236,9 @@ _EuiBottomBar.propTypes = {
233
236
  left: _propTypes.default.any
234
237
  };
235
238
  var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
236
- var BottomBar = _EuiBottomBar;
239
+ var BottomBar = (0, _system.withEuiSystem)(_EuiBottomBar);
237
240
  return (0, _react2.jsx)(_provider.EuiThemeProvider, {
238
- colorMode: 'dark'
241
+ colorMode: "dark"
239
242
  }, (0, _react2.jsx)(BottomBar, _extends({
240
243
  ref: ref
241
244
  }, props)));
@@ -197,7 +197,8 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
197
197
  }, linkProps, breadcrumbRest), text);
198
198
  }
199
199
 
200
- return (0, _react2.jsx)(_link.EuiLink, _extends({
200
+ return (0, _react2.jsx)(_link.EuiLink // @ts-expect-error Ref forwarding type mismatch
201
+ , _extends({
201
202
  ref: ref,
202
203
  color: isLastBreadcrumb ? 'text' : 'subdued',
203
204
  onClick: onClick,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ICON_SIDES = exports.EuiButtonContent = void 0;
6
+ exports.ICON_SIDES = exports.EuiButtonContentDeprecated = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -36,7 +36,7 @@ var iconSideToClassNameMap = {
36
36
  var ICON_SIDES = (0, _common.keysOf)(iconSideToClassNameMap);
37
37
  exports.ICON_SIDES = ICON_SIDES;
38
38
 
39
- var EuiButtonContent = function EuiButtonContent(_ref) {
39
+ var EuiButtonContentDeprecated = function EuiButtonContentDeprecated(_ref) {
40
40
  var children = _ref.children,
41
41
  textProps = _ref.textProps,
42
42
  _ref$isLoading = _ref.isLoading,
@@ -72,8 +72,8 @@ var EuiButtonContent = function EuiButtonContent(_ref) {
72
72
  }), buttonIcon, (0, _react2.jsx)("span", textProps, children));
73
73
  };
74
74
 
75
- exports.EuiButtonContent = EuiButtonContent;
76
- EuiButtonContent.propTypes = {
75
+ exports.EuiButtonContentDeprecated = EuiButtonContentDeprecated;
76
+ EuiButtonContentDeprecated.propTypes = {
77
77
  /**
78
78
  * Any `type` accepted by EuiIcon
79
79
  */
@@ -86,7 +86,8 @@ EuiButtonContent.propTypes = {
86
86
  isLoading: _propTypes.default.bool,
87
87
 
88
88
  /**
89
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
89
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
90
+ * It doesn't apply to the icon.
90
91
  */
91
92
  textProps: _propTypes.default.shape({
92
93
  className: _propTypes.default.string,
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.EuiButtonDisplay = exports.EuiButton = exports.COLORS = void 0;
8
+ exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.EuiButtonDisplayDeprecated = exports.EuiButton = exports.COLORS = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
@@ -17,7 +17,7 @@ var _common = require("../common");
17
17
 
18
18
  var _services = require("../../services");
19
19
 
20
- var _button_content = require("./button_content");
20
+ var _button_content_deprecated = require("./_button_content_deprecated");
21
21
 
22
22
  var _href_validator = require("../../services/security/href_validator");
23
23
 
@@ -115,11 +115,13 @@ var EuiButton = function EuiButton(_ref) {
115
115
  relObj.type = type;
116
116
  }
117
117
 
118
- return (0, _react2.jsx)(EuiButtonDisplay, _extends({
119
- element: element,
120
- baseClassName: "euiButton",
121
- ref: buttonRef
122
- }, elementProps, relObj, rest));
118
+ return (// eslint-disable-next-line react/jsx-pascal-case
119
+ (0, _react2.jsx)(EuiButtonDisplayDeprecated, _extends({
120
+ element: element,
121
+ baseClassName: "euiButton",
122
+ ref: buttonRef
123
+ }, elementProps, relObj, rest))
124
+ );
123
125
  };
124
126
 
125
127
  exports.EuiButton = EuiButton;
@@ -219,7 +221,8 @@ EuiButton.propTypes = {
219
221
  iconSide: _propTypes.default.oneOf(["left", "right"]),
220
222
 
221
223
  /**
222
- * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
224
+ * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
225
+ * It doesn't apply to the icon.
223
226
  */
224
227
  textProps: _propTypes.default.shape({
225
228
  className: _propTypes.default.string,
@@ -237,13 +240,16 @@ EuiButton.propTypes = {
237
240
  EuiButton.displayName = 'EuiButton';
238
241
 
239
242
  /**
243
+ * *DEPRECATED*
240
244
  * EuiButtonDisplay is an internal-only component used for displaying
241
245
  * any element as a button.
242
246
  * NOTE: This component *must* be below EuiButton in the file and
243
247
  * EuiButton must also set a displayName for react-docgen-typescript
244
248
  * to correctly set EuiButton's docgenInfo and display a props table.
249
+ * This component has been deprecated in favor of the new EuiButtonDisplay
250
+ * that can be found in `src/components/button/button_display/_button_display.tsx`
245
251
  */
246
- var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
252
+ var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
247
253
  var _ref2$element = _ref2.element,
248
254
  element = _ref2$element === void 0 ? 'button' : _ref2$element,
249
255
  baseClassName = _ref2.baseClassName,
@@ -277,7 +283,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
277
283
 
278
284
  var contentClassNames = (0, _classnames.default)('euiButton__content', contentProps && contentProps.className);
279
285
  var textClassNames = (0, _classnames.default)('euiButton__text', textProps && textProps.className);
280
- var innerNode = (0, _react2.jsx)(_button_content.EuiButtonContent, _extends({
286
+ var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, _extends({
281
287
  isLoading: isLoading,
282
288
  iconType: iconType,
283
289
  iconSide: iconSide,
@@ -304,8 +310,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
304
310
  ref: ref
305
311
  }, rest), innerNode);
306
312
  });
307
- exports.EuiButtonDisplay = EuiButtonDisplay;
308
- EuiButtonDisplay.propTypes = {
313
+ exports.EuiButtonDisplayDeprecated = EuiButtonDisplayDeprecated;
314
+ EuiButtonDisplayDeprecated.propTypes = {
309
315
  children: _propTypes.default.node,
310
316
 
311
317
  /**
@@ -378,4 +384,4 @@ EuiButtonDisplay.propTypes = {
378
384
  */
379
385
  baseClassName: _propTypes.default.string.isRequired
380
386
  };
381
- EuiButtonDisplay.displayName = 'EuiButtonDisplay';
387
+ EuiButtonDisplayDeprecated.displayName = 'EuiButtonDisplay';
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.EuiButtonDisplay = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
+ var _react2 = require("@emotion/react");
15
+
16
+ var _services = require("../../../services");
17
+
18
+ var _button_display = require("./_button_display.styles");
19
+
20
+ var _button_display_content = require("./_button_display_content");
21
+
22
+ var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ 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); }
31
+
32
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
33
+
34
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
35
+
36
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
+
38
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39
+
40
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
41
+
42
+ /**
43
+ * EuiButtonDisplay is an internal-only component used for displaying
44
+ * any element as a button.
45
+ */
46
+ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
47
+ var _ref$element = _ref.element,
48
+ element = _ref$element === void 0 ? 'button' : _ref$element,
49
+ children = _ref.children,
50
+ iconType = _ref.iconType,
51
+ iconSide = _ref.iconSide,
52
+ _ref$size = _ref.size,
53
+ size = _ref$size === void 0 ? 'm' : _ref$size,
54
+ _ref$isDisabled = _ref.isDisabled,
55
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
56
+ isLoading = _ref.isLoading,
57
+ isSelected = _ref.isSelected,
58
+ fullWidth = _ref.fullWidth,
59
+ minWidth = _ref.minWidth,
60
+ contentProps = _ref.contentProps,
61
+ textProps = _ref.textProps,
62
+ rest = _objectWithoutProperties(_ref, _excluded);
63
+
64
+ var buttonIsDisabled = isLoading || isDisabled;
65
+ var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
66
+ var theme = (0, _services.useEuiTheme)();
67
+ var styles = (0, _button_display.euiButtonDisplayStyles)(theme, minWidthPx);
68
+ var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
69
+ var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, _extends({
70
+ isLoading: isLoading,
71
+ isDisabled: buttonIsDisabled,
72
+ iconType: iconType,
73
+ iconSide: iconSide,
74
+ textProps: _objectSpread({}, textProps)
75
+ }, contentProps), children);
76
+ return (0, _react2.createElement)(element, _objectSpread({
77
+ css: cssStyles,
78
+ disabled: element === 'button' && buttonIsDisabled,
79
+ 'aria-pressed': element === 'button' ? isSelected : undefined,
80
+ ref: ref
81
+ }, rest), innerNode);
82
+ });
83
+ exports.EuiButtonDisplay = EuiButtonDisplay;
84
+ EuiButtonDisplay.propTypes = {
85
+ children: _propTypes.default.node,
86
+ size: _propTypes.default.oneOf(["xs", "s", "m"]),
87
+
88
+ /**
89
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
90
+ * *Only use when the readable text does not change between states.*
91
+ */
92
+ isSelected: _propTypes.default.bool,
93
+
94
+ /**
95
+ * Extends the button to 100% width
96
+ */
97
+ fullWidth: _propTypes.default.bool,
98
+
99
+ /**
100
+ * Override the default minimum width
101
+ */
102
+ minWidth: _propTypes.default.any,
103
+
104
+ /**
105
+ * Force disables the button and changes the icon to a loading spinner
106
+ */
107
+ isLoading: _propTypes.default.bool,
108
+
109
+ /**
110
+ * Object of props passed to the <span/> wrapping the button's content
111
+ */
112
+ contentProps: _propTypes.default.any,
113
+ style: _propTypes.default.any,
114
+
115
+ /**
116
+ * Any `type` accepted by EuiIcon
117
+ */
118
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "codeApp", "color", "compute", "console", "consoleApp", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboardShortcut", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenClass", "tokenProperty", "tokenEnum", "tokenVariable", "tokenMethod", "tokenAnnotation", "tokenException", "tokenInterface", "tokenParameter", "tokenField", "tokenElement", "tokenFunction", "tokenBoolean", "tokenString", "tokenArray", "tokenNumber", "tokenConstant", "tokenObject", "tokenEvent", "tokenKey", "tokenNull", "tokenStruct", "tokenPackage", "tokenOperator", "tokenEnumMember", "tokenRepo", "tokenSymbol", "tokenFile", "tokenModule", "tokenNamespace", "tokenDate", "tokenIP", "tokenNested", "tokenAlias", "tokenShape", "tokenGeo", "tokenRange", "tokenBinary", "tokenJoin", "tokenPercolator", "tokenFlattened", "tokenRankFeature", "tokenRankFeatures", "tokenKeyword", "tokenTag", "tokenCompletionSuggester", "tokenDenseVector", "tokenText", "tokenTokenCount", "tokenSearchType", "tokenHistogram"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
119
+
120
+ /**
121
+ * Can only be one side `left` or `right`
122
+ */
123
+ iconSide: _propTypes.default.oneOf(["left", "right", undefined]),
124
+
125
+ /**
126
+ * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
127
+ */
128
+ textProps: _propTypes.default.shape({
129
+ className: _propTypes.default.string,
130
+ "aria-label": _propTypes.default.string,
131
+ "data-test-subj": _propTypes.default.string,
132
+ ref: _propTypes.default.any,
133
+ "data-text": _propTypes.default.string
134
+ }),
135
+ iconSize: _propTypes.default.oneOf(["s", "m"]),
136
+ isDisabled: _propTypes.default.bool.isRequired,
137
+ className: _propTypes.default.string,
138
+ "aria-label": _propTypes.default.string,
139
+ "data-test-subj": _propTypes.default.string,
140
+
141
+ /**
142
+ * Provide a valid element to render the element as
143
+ */
144
+ element: _propTypes.default.oneOf(["a", "button", "span", "label"])
145
+ };
146
+ EuiButtonDisplay.displayName = 'EuiButtonDisplay';
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiButtonDisplayStyles = exports.euiButtonBaseCSS = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../../global_styling");
11
+
12
+ 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)."; }
13
+
14
+ // Provides a solid reset and base for handling sizing layout
15
+ // Does not include any visual styles
16
+ var euiButtonBaseCSS = function euiButtonBaseCSS() {
17
+ return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat((0, _global_styling.logicalTextAlignStyle)('center'), ";\n white-space: nowrap;\n ").concat((0, _global_styling.logicalCSS)('max-width', '100%'), ";\n vertical-align: middle;\n ");
18
+ };
19
+
20
+ exports.euiButtonBaseCSS = euiButtonBaseCSS;
21
+
22
+ var _buttonSize = function _buttonSize(size) {
23
+ return "\n ".concat((0, _global_styling.logicalCSS)('height', size), ";\n // prevents descenders from getting cut off\n line-height: ").concat(size, ";\n ");
24
+ };
25
+
26
+ var _ref = process.env.NODE_ENV === "production" ? {
27
+ name: "15xpz7k-fullWidth",
28
+ styles: "display:block;width:100%;label:fullWidth;"
29
+ } : {
30
+ name: "15xpz7k-fullWidth",
31
+ styles: "display:block;width:100%;label:fullWidth;",
32
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
+ };
34
+
35
+ var _ref2 = process.env.NODE_ENV === "production" ? {
36
+ name: "8595p9-isDisabled",
37
+ styles: "cursor:not-allowed;label:isDisabled;"
38
+ } : {
39
+ name: "8595p9-isDisabled",
40
+ styles: "cursor:not-allowed;label:isDisabled;",
41
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
42
+ };
43
+
44
+ var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, minWidth) {
45
+ var euiTheme = euiThemeContext.euiTheme;
46
+ return {
47
+ // Base
48
+ euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";;label:euiButtonDisplay;"),
49
+ // States
50
+ isDisabled: _ref2,
51
+ fullWidth: _ref,
52
+ // Sizes
53
+ xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
54
+ s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
55
+ m: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xxl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:m;")
56
+ };
57
+ };
58
+
59
+ exports.euiButtonDisplayStyles = euiButtonDisplayStyles;