@elastic/eui 67.0.0 → 67.1.1

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 (283) hide show
  1. package/dist/eui_theme_dark.css +0 -390
  2. package/dist/eui_theme_dark.json +0 -24
  3. package/dist/eui_theme_dark.json.d.ts +0 -24
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -390
  6. package/dist/eui_theme_light.json +0 -24
  7. package/dist/eui_theme_light.json.d.ts +0 -24
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accordion/accordion.js +5 -4
  10. package/es/components/accordion/accordion.styles.js +1 -1
  11. package/es/components/badge/badge.js +84 -78
  12. package/es/components/badge/badge.styles.js +62 -0
  13. package/es/components/basic_table/in_memory_table.js +8 -0
  14. package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  15. package/es/components/button/button.js +0 -1
  16. package/es/components/button/button_display/_button_display.js +10 -5
  17. package/es/components/button/button_display/_button_display.styles.js +2 -2
  18. package/es/components/button/button_display/_button_display_content.js +5 -3
  19. package/es/components/button/button_display/_button_display_content.styles.js +4 -1
  20. package/es/components/button/button_icon/button_icon.js +11 -7
  21. package/es/components/card/card.js +2 -2
  22. package/es/components/card/card.styles.js +5 -2
  23. package/es/components/collapsible_nav/collapsible_nav.js +8 -0
  24. package/es/components/expression/expression.styles.js +4 -2
  25. package/es/components/flyout/flyout.js +27 -48
  26. package/es/components/flyout/flyout.styles.js +111 -0
  27. package/es/components/flyout/flyout_body.js +14 -6
  28. package/es/components/flyout/flyout_body.styles.js +21 -0
  29. package/es/components/flyout/flyout_footer.js +8 -1
  30. package/es/components/flyout/flyout_footer.styles.js +14 -0
  31. package/es/components/flyout/flyout_header.js +9 -4
  32. package/es/components/flyout/flyout_header.styles.js +28 -0
  33. package/es/components/image/image_wrapper.js +3 -3
  34. package/es/components/markdown_editor/markdown_format.styles.js +11 -6
  35. package/es/components/notification/notification_event.js +1 -1
  36. package/es/components/notification/notification_event_meta.js +1 -1
  37. package/es/components/page/page_header/page_header_content.js +1 -1
  38. package/es/components/page/page_section/page_section.js +3 -4
  39. package/es/components/pagination/pagination_button.styles.js +5 -3
  40. package/es/components/popover/popover_title.js +2 -2
  41. package/es/components/popover/popover_title.styles.js +18 -6
  42. package/es/components/progress/progress.js +2 -2
  43. package/es/components/search_bar/filters/custom_component_filter.js +16 -0
  44. package/es/components/search_bar/filters/filters.js +6 -0
  45. package/es/components/search_bar/query/ast.js +12 -0
  46. package/es/components/search_bar/query/ast_to_es_query_dsl.js +15 -10
  47. package/es/components/search_bar/query/query.js +17 -0
  48. package/es/components/search_bar/search_bar.js +4 -0
  49. package/es/components/search_bar/search_filters.js +4 -0
  50. package/es/components/selectable/selectable_list/selectable_list.js +2 -2
  51. package/es/components/selectable/selectable_list/selectable_list_item.js +2 -2
  52. package/es/components/text/text.styles.js +6 -3
  53. package/es/components/tool_tip/tool_tip.styles.js +7 -6
  54. package/es/components/tour/tour.styles.js +11 -6
  55. package/es/global_styling/functions/index.js +1 -0
  56. package/es/global_styling/functions/math.js +46 -0
  57. package/es/global_styling/mixins/_helpers.js +5 -2
  58. package/es/services/color/contrast.js +2 -0
  59. package/es/services/index.js +1 -1
  60. package/es/services/theme/context.js +2 -1
  61. package/es/services/theme/hooks.js +27 -1
  62. package/es/services/theme/index.js +1 -1
  63. package/es/services/theme/provider.js +15 -1
  64. package/eui.d.ts +199 -35
  65. package/i18ntokens.json +2 -2
  66. package/lib/components/accordion/accordion.js +5 -4
  67. package/lib/components/accordion/accordion.styles.js +1 -1
  68. package/lib/components/badge/badge.js +92 -80
  69. package/lib/components/badge/badge.styles.js +67 -0
  70. package/lib/components/basic_table/in_memory_table.js +8 -0
  71. package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  72. package/lib/components/button/button.js +0 -1
  73. package/lib/components/button/button_display/_button_display.js +10 -5
  74. package/lib/components/button/button_display/_button_display.styles.js +2 -2
  75. package/lib/components/button/button_display/_button_display_content.js +9 -4
  76. package/lib/components/button/button_display/_button_display_content.styles.js +4 -1
  77. package/lib/components/button/button_icon/button_icon.js +11 -7
  78. package/lib/components/card/card.js +2 -2
  79. package/lib/components/card/card.styles.js +5 -2
  80. package/lib/components/collapsible_nav/collapsible_nav.js +8 -0
  81. package/lib/components/expression/expression.styles.js +3 -1
  82. package/lib/components/flyout/flyout.js +27 -47
  83. package/lib/components/flyout/flyout.styles.js +122 -0
  84. package/lib/components/flyout/flyout_body.js +16 -6
  85. package/lib/components/flyout/flyout_body.styles.js +32 -0
  86. package/lib/components/flyout/flyout_footer.js +10 -1
  87. package/lib/components/flyout/flyout_footer.styles.js +24 -0
  88. package/lib/components/flyout/flyout_header.js +11 -4
  89. package/lib/components/flyout/flyout_header.styles.js +31 -0
  90. package/lib/components/image/image_wrapper.js +3 -3
  91. package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  92. package/lib/components/notification/notification_event.js +1 -1
  93. package/lib/components/notification/notification_event_meta.js +1 -1
  94. package/lib/components/page/page_header/page_header_content.js +1 -1
  95. package/lib/components/page/page_section/page_section.js +3 -4
  96. package/lib/components/pagination/pagination_button.styles.js +4 -2
  97. package/lib/components/popover/popover_title.js +2 -2
  98. package/lib/components/popover/popover_title.styles.js +19 -7
  99. package/lib/components/progress/progress.js +2 -2
  100. package/lib/components/search_bar/filters/custom_component_filter.js +29 -0
  101. package/lib/components/search_bar/filters/filters.js +7 -0
  102. package/lib/components/search_bar/query/ast.js +12 -0
  103. package/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  104. package/lib/components/search_bar/query/query.js +17 -0
  105. package/lib/components/search_bar/search_bar.js +4 -0
  106. package/lib/components/search_bar/search_filters.js +4 -0
  107. package/lib/components/selectable/selectable_list/selectable_list.js +2 -2
  108. package/lib/components/selectable/selectable_list/selectable_list_item.js +2 -2
  109. package/lib/components/text/text.styles.js +5 -2
  110. package/lib/components/tool_tip/tool_tip.styles.js +6 -5
  111. package/lib/components/tour/tour.styles.js +10 -5
  112. package/lib/global_styling/functions/index.js +13 -0
  113. package/lib/global_styling/functions/math.js +55 -0
  114. package/lib/global_styling/mixins/_helpers.js +5 -2
  115. package/lib/services/color/contrast.js +6 -1
  116. package/lib/services/index.js +7 -0
  117. package/lib/services/theme/context.js +4 -2
  118. package/lib/services/theme/hooks.js +28 -0
  119. package/lib/services/theme/index.js +12 -0
  120. package/lib/services/theme/provider.js +23 -2
  121. package/optimize/es/components/accordion/accordion.js +5 -4
  122. package/optimize/es/components/accordion/accordion.styles.js +1 -1
  123. package/optimize/es/components/badge/badge.js +82 -76
  124. package/optimize/es/components/badge/badge.styles.js +62 -0
  125. package/optimize/es/components/basic_table/in_memory_table.js +4 -0
  126. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  127. package/optimize/es/components/button/button.js +0 -1
  128. package/optimize/es/components/button/button_display/_button_display.js +8 -3
  129. package/optimize/es/components/button/button_display/_button_display.styles.js +2 -2
  130. package/optimize/es/components/button/button_display/_button_display_content.js +3 -1
  131. package/optimize/es/components/button/button_display/_button_display_content.styles.js +4 -1
  132. package/optimize/es/components/button/button_icon/button_icon.js +11 -7
  133. package/optimize/es/components/card/card.js +2 -2
  134. package/optimize/es/components/card/card.styles.js +5 -2
  135. package/optimize/es/components/expression/expression.styles.js +4 -2
  136. package/optimize/es/components/flyout/flyout.js +27 -48
  137. package/optimize/es/components/flyout/flyout.styles.js +111 -0
  138. package/optimize/es/components/flyout/flyout_body.js +14 -6
  139. package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
  140. package/optimize/es/components/flyout/flyout_footer.js +8 -1
  141. package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
  142. package/optimize/es/components/flyout/flyout_header.js +9 -4
  143. package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
  144. package/optimize/es/components/image/image_wrapper.js +3 -3
  145. package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
  146. package/optimize/es/components/page/page_header/page_header_content.js +1 -1
  147. package/optimize/es/components/page/page_section/page_section.js +3 -4
  148. package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
  149. package/optimize/es/components/popover/popover_title.js +2 -2
  150. package/optimize/es/components/popover/popover_title.styles.js +18 -6
  151. package/optimize/es/components/progress/progress.js +2 -2
  152. package/optimize/es/components/search_bar/filters/custom_component_filter.js +16 -0
  153. package/optimize/es/components/search_bar/filters/filters.js +6 -0
  154. package/optimize/es/components/search_bar/query/ast.js +12 -0
  155. package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +14 -9
  156. package/optimize/es/components/search_bar/query/query.js +17 -0
  157. package/optimize/es/components/text/text.styles.js +6 -3
  158. package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
  159. package/optimize/es/components/tour/tour.styles.js +11 -6
  160. package/optimize/es/global_styling/functions/index.js +1 -0
  161. package/optimize/es/global_styling/functions/math.js +44 -0
  162. package/optimize/es/global_styling/mixins/_helpers.js +5 -2
  163. package/optimize/es/services/color/contrast.js +2 -0
  164. package/optimize/es/services/index.js +1 -1
  165. package/optimize/es/services/theme/context.js +2 -1
  166. package/optimize/es/services/theme/hooks.js +27 -1
  167. package/optimize/es/services/theme/index.js +1 -1
  168. package/optimize/es/services/theme/provider.js +14 -1
  169. package/optimize/lib/components/accordion/accordion.js +5 -4
  170. package/optimize/lib/components/accordion/accordion.styles.js +1 -1
  171. package/optimize/lib/components/badge/badge.js +90 -78
  172. package/optimize/lib/components/badge/badge.styles.js +67 -0
  173. package/optimize/lib/components/basic_table/in_memory_table.js +4 -0
  174. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  175. package/optimize/lib/components/button/button.js +0 -1
  176. package/optimize/lib/components/button/button_display/_button_display.js +8 -3
  177. package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -2
  178. package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
  179. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +4 -1
  180. package/optimize/lib/components/button/button_icon/button_icon.js +11 -7
  181. package/optimize/lib/components/card/card.js +2 -2
  182. package/optimize/lib/components/card/card.styles.js +5 -2
  183. package/optimize/lib/components/expression/expression.styles.js +3 -1
  184. package/optimize/lib/components/flyout/flyout.js +27 -47
  185. package/optimize/lib/components/flyout/flyout.styles.js +124 -0
  186. package/optimize/lib/components/flyout/flyout_body.js +16 -6
  187. package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
  188. package/optimize/lib/components/flyout/flyout_footer.js +10 -1
  189. package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
  190. package/optimize/lib/components/flyout/flyout_header.js +11 -4
  191. package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
  192. package/optimize/lib/components/image/image_wrapper.js +3 -3
  193. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  194. package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
  195. package/optimize/lib/components/page/page_section/page_section.js +3 -4
  196. package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
  197. package/optimize/lib/components/popover/popover_title.js +2 -2
  198. package/optimize/lib/components/popover/popover_title.styles.js +19 -7
  199. package/optimize/lib/components/progress/progress.js +2 -2
  200. package/optimize/lib/components/search_bar/filters/custom_component_filter.js +29 -0
  201. package/optimize/lib/components/search_bar/filters/filters.js +7 -0
  202. package/optimize/lib/components/search_bar/query/ast.js +12 -0
  203. package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  204. package/optimize/lib/components/search_bar/query/query.js +17 -0
  205. package/optimize/lib/components/text/text.styles.js +5 -2
  206. package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
  207. package/optimize/lib/components/tour/tour.styles.js +10 -5
  208. package/optimize/lib/global_styling/functions/index.js +13 -0
  209. package/optimize/lib/global_styling/functions/math.js +57 -0
  210. package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
  211. package/optimize/lib/services/color/contrast.js +5 -1
  212. package/optimize/lib/services/index.js +7 -0
  213. package/optimize/lib/services/theme/context.js +4 -2
  214. package/optimize/lib/services/theme/hooks.js +28 -0
  215. package/optimize/lib/services/theme/index.js +12 -0
  216. package/optimize/lib/services/theme/provider.js +23 -9
  217. package/package.json +5 -5
  218. package/src/components/badge/_index.scss +0 -1
  219. package/src/components/index.scss +0 -1
  220. package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
  221. package/test-env/components/accordion/accordion.js +5 -4
  222. package/test-env/components/accordion/accordion.styles.js +1 -1
  223. package/test-env/components/badge/badge.js +92 -80
  224. package/test-env/components/badge/badge.styles.js +67 -0
  225. package/test-env/components/basic_table/in_memory_table.js +8 -0
  226. package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
  227. package/test-env/components/button/button.js +0 -1
  228. package/test-env/components/button/button_display/_button_display.js +10 -5
  229. package/test-env/components/button/button_display/_button_display.styles.js +2 -2
  230. package/test-env/components/button/button_display/_button_display_content.js +8 -4
  231. package/test-env/components/button/button_display/_button_display_content.styles.js +4 -1
  232. package/test-env/components/button/button_icon/button_icon.js +11 -7
  233. package/test-env/components/card/card.js +2 -2
  234. package/test-env/components/card/card.styles.js +5 -2
  235. package/test-env/components/collapsible_nav/collapsible_nav.js +8 -0
  236. package/test-env/components/expression/expression.styles.js +3 -1
  237. package/test-env/components/flyout/flyout.styles.js +124 -0
  238. package/test-env/components/flyout/flyout_body.js +16 -6
  239. package/test-env/components/flyout/flyout_body.styles.js +32 -0
  240. package/test-env/components/flyout/flyout_footer.js +10 -1
  241. package/test-env/components/flyout/flyout_footer.styles.js +24 -0
  242. package/test-env/components/flyout/flyout_header.js +11 -4
  243. package/test-env/components/flyout/flyout_header.styles.js +31 -0
  244. package/test-env/components/image/image_wrapper.js +3 -3
  245. package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
  246. package/test-env/components/notification/notification_event.js +1 -1
  247. package/test-env/components/notification/notification_event_meta.js +1 -1
  248. package/test-env/components/page/page_header/page_header_content.js +1 -1
  249. package/test-env/components/page/page_section/page_section.js +3 -4
  250. package/test-env/components/pagination/pagination_button.styles.js +4 -2
  251. package/test-env/components/popover/popover_title.js +2 -2
  252. package/test-env/components/popover/popover_title.styles.js +19 -7
  253. package/test-env/components/progress/progress.js +2 -2
  254. package/test-env/components/search_bar/filters/custom_component_filter.js +29 -0
  255. package/test-env/components/search_bar/filters/filters.js +7 -0
  256. package/test-env/components/search_bar/query/ast.js +12 -0
  257. package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  258. package/test-env/components/search_bar/query/query.js +17 -0
  259. package/test-env/components/search_bar/search_bar.js +4 -0
  260. package/test-env/components/search_bar/search_filters.js +4 -0
  261. package/test-env/components/selectable/selectable_list/selectable_list.js +2 -2
  262. package/test-env/components/selectable/selectable_list/selectable_list_item.js +2 -2
  263. package/test-env/components/text/text.styles.js +5 -2
  264. package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
  265. package/test-env/components/tour/tour.styles.js +10 -5
  266. package/test-env/global_styling/functions/index.js +13 -0
  267. package/test-env/global_styling/functions/math.js +57 -0
  268. package/test-env/global_styling/mixins/_helpers.js +5 -2
  269. package/test-env/services/color/contrast.js +5 -1
  270. package/test-env/services/index.js +7 -0
  271. package/test-env/services/theme/context.js +4 -2
  272. package/test-env/services/theme/hooks.js +28 -0
  273. package/test-env/services/theme/index.js +12 -0
  274. package/test-env/services/theme/provider.js +23 -9
  275. package/src/components/badge/_badge.scss +0 -133
  276. package/src/components/flyout/_flyout.scss +0 -196
  277. package/src/components/flyout/_flyout_body.scss +0 -18
  278. package/src/components/flyout/_flyout_footer.scss +0 -4
  279. package/src/components/flyout/_flyout_header.scss +0 -7
  280. package/src/components/flyout/_index.scss +0 -7
  281. package/src/components/flyout/_mixins.scss +0 -18
  282. package/src/components/flyout/_variables.scss +0 -8
  283. package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
@@ -528,6 +528,18 @@ export var _AST = /*#__PURE__*/function () {
528
528
  return !Is.isInstance(clause) || clause.flag !== flag;
529
529
  }));
530
530
  }
531
+ }, {
532
+ key: "removeIsClauses",
533
+ value: function removeIsClauses() {
534
+ return new _AST(this._clauses.filter(function (clause) {
535
+ return !Is.isInstance(clause);
536
+ }));
537
+ }
538
+ }, {
539
+ key: "removeAllClauses",
540
+ value: function removeAllClauses() {
541
+ return new _AST();
542
+ }
531
543
  }, {
532
544
  key: "getGroupClauses",
533
545
  value: function getGroupClauses() {
@@ -1,5 +1,5 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
 
4
4
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
5
5
 
@@ -14,11 +14,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
14
14
  * in compliance with, at your election, the Elastic License 2.0 or the Server
15
15
  * Side Public License, v 1.
16
16
  */
17
- import { printIso8601 } from './date_format';
18
- import { isDateValue, dateValue } from './date_value';
19
- import { AST } from './ast';
20
17
  import { isArray, isDateLike, isString } from '../../../services/predicate';
21
18
  import { keysOf } from '../../common';
19
+ import { AST } from './ast';
20
+ import { printIso8601 } from './date_format';
21
+ import { dateValue, isDateValue } from './date_value';
22
22
 
23
23
  var processDateOperation = function processDateOperation(value, operator) {
24
24
  var granularity = value.granularity,
@@ -108,12 +108,17 @@ export var _fieldValuesToQuery = function _fieldValuesToQuery(field, operations,
108
108
  }
109
109
  });
110
110
 
111
- if (_terms.length > 0) {
111
+ if (_terms.length > 1) {
112
+ queries.push({
113
+ bool: _defineProperty({}, andOr === 'and' ? 'must' : 'should', _toConsumableArray(_terms.map(function (value) {
114
+ return {
115
+ match: _defineProperty({}, field, value)
116
+ };
117
+ })))
118
+ });
119
+ } else if (_terms.length === 1) {
112
120
  queries.push({
113
- match: _defineProperty({}, field, {
114
- query: _terms.join(' '),
115
- operator: andOr
116
- })
121
+ match: _defineProperty({}, field, _terms[0])
117
122
  });
118
123
  }
119
124
 
@@ -40,6 +40,11 @@ export var Query = /*#__PURE__*/function () {
40
40
  }
41
41
 
42
42
  _createClass(Query, [{
43
+ key: "hasClauses",
44
+ value: function hasClauses() {
45
+ return this.ast.clauses.length > 0;
46
+ }
47
+ }, {
43
48
  key: "hasSimpleFieldClause",
44
49
  value: function hasSimpleFieldClause(field, value) {
45
50
  return this.ast.hasSimpleFieldClause(field, value);
@@ -99,6 +104,12 @@ export var Query = /*#__PURE__*/function () {
99
104
  var ast = this.ast.removeOrFieldClauses(field);
100
105
  return new Query(ast, this.syntax);
101
106
  }
107
+ }, {
108
+ key: "removeAllClauses",
109
+ value: function removeAllClauses() {
110
+ var ast = this.ast.removeAllClauses();
111
+ return new Query(ast, this.syntax);
112
+ }
102
113
  }, {
103
114
  key: "hasIsClause",
104
115
  value: function hasIsClause(flag) {
@@ -127,6 +138,12 @@ export var Query = /*#__PURE__*/function () {
127
138
  var ast = this.ast.removeIsClause(flag);
128
139
  return new Query(ast, this.syntax);
129
140
  }
141
+ }, {
142
+ key: "removeIsClauses",
143
+ value: function removeIsClauses() {
144
+ var ast = this.ast.removeIsClauses();
145
+ return new Query(ast, this.syntax);
146
+ }
130
147
  /**
131
148
  * Executes this query over the given iterable item and returns
132
149
  * an new array of all items that matched this query. Options:
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor } from '../../global_styling';
9
+ import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
10
10
  import { euiLinkCSS } from '../link/link.styles';
11
11
  import { euiTitle } from '../title/title.styles';
12
12
  /**
@@ -45,8 +45,11 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
45
45
  }; // Generate margins for headings based on customScale (not on heading level)
46
46
 
47
47
  var customScale = _customScale === 'xxxs' ? 'xxs' : _customScale || 'm';
48
- var headingMarginTop = "".concat(parseFloat(euiTheme.size[customScale]) * 2, "px");
49
- var headingMarginBottom = euiTheme.size[customScale];
48
+ var marginSize = euiTheme.size[customScale];
49
+ var headingMarginTop = mathWithUnits(marginSize, function (x) {
50
+ return x * 2;
51
+ });
52
+ var headingMarginBottom = marginSize;
50
53
  return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n padding: ").concat(lineHeightSize, ";\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
51
54
  _customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n // ensures when only one character the shape looks like a square\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
52
55
  };
@@ -12,7 +12,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
12
12
  * Side Public License, v 1.
13
13
  */
14
14
  import { css, keyframes } from '@emotion/react';
15
- import { logicalCSS, logicalSizeCSS, euiFontSize } from '../../global_styling';
15
+ import { logicalCSS, logicalSizeCSS, euiFontSize, mathWithUnits } from '../../global_styling';
16
16
  import { COLOR_MODES_STANDARD, tint, shade } from '../../services';
17
17
  import { euiShadow } from '../../themes/amsterdam';
18
18
  export var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
@@ -39,12 +39,13 @@ export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
39
39
  */
40
40
 
41
41
  var arrowSize = euiTheme.size.m;
42
- var arrowSizeInt = parseInt(arrowSize, 10);
43
- var arrowPlusSize = "".concat((arrowSizeInt / 2 + 1) * -1, "px");
44
- /* 1 */
42
+ var arrowPlusSize = mathWithUnits(arrowSize, function (x) {
43
+ return (x / 2 + 1) * -1;
44
+ }); // 1.
45
45
 
46
- var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px");
47
- /* 1 */
46
+ var arrowMinusSize = mathWithUnits(arrowSize, function (x) {
47
+ return (x / 2 - 1) * -1;
48
+ }); // 1.
48
49
 
49
50
  return {
50
51
  // Base
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { css } from '@emotion/react';
9
9
  import { shade, tint, COLOR_MODES_STANDARD } from '../../services';
10
- import { logicalCSS } from '../../global_styling';
10
+ import { logicalCSS, mathWithUnits } from '../../global_styling';
11
11
  import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles';
12
12
  import { popoverArrowSize } from '../popover/popover_arrow/_popover_arrow.styles';
13
13
 
@@ -26,15 +26,20 @@ export var euiTourStyles = function euiTourStyles(_ref) {
26
26
  export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
27
27
  var euiTheme = _ref2.euiTheme;
28
28
  var arrowSize = euiTheme.size[popoverArrowSize];
29
- var arrowSizeInt = parseInt(arrowSize, 10);
29
+ var arrowHalfSize = mathWithUnits(arrowSize, function (x) {
30
+ return x / 2;
31
+ });
32
+ var arrowOffset = mathWithUnits(arrowSize, function (x) {
33
+ return x * -2;
34
+ });
30
35
  return {
31
36
  // Base
32
37
  euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";;label:euiTourBeacon;"),
33
38
  // Positions
34
- right: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt / 2, "px")), ";", logicalCSS('left', "".concat(arrowSizeInt * -2, "px")), ";;label:right;"),
35
- left: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt / 2, "px")), ";", logicalCSS('left', arrowSize), ";;label:left;"),
36
- top: /*#__PURE__*/css(logicalCSS('top', arrowSize), ";", logicalCSS('left', "".concat(arrowSizeInt / 2, "px")), ";;label:top;"),
37
- bottom: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt * -2, "px")), ";", logicalCSS('left', "".concat(arrowSizeInt / 2, "px")), ";;label:bottom;")
39
+ right: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowOffset), ";;label:right;"),
40
+ left: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowSize), ";;label:left;"),
41
+ top: /*#__PURE__*/css(logicalCSS('top', arrowSize), ";", logicalCSS('left', arrowHalfSize), ";;label:top;"),
42
+ bottom: /*#__PURE__*/css(logicalCSS('top', arrowOffset), ";", logicalCSS('left', arrowHalfSize), ";;label:bottom;")
38
43
  };
39
44
  };
40
45
  export var euiTourHeaderStyles = function euiTourHeaderStyles(_ref3) {
@@ -6,5 +6,6 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  export * from './logicals';
9
+ export * from './math';
9
10
  export * from './size';
10
11
  export * from './typography';
@@ -0,0 +1,44 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
2
+ import _inherits from "@babel/runtime/helpers/inherits";
3
+ import _setPrototypeOf from "@babel/runtime/helpers/setPrototypeOf";
4
+
5
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
6
+
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ /**
16
+ * Utility for performing math callbacks on a string with CSS units
17
+ * and returning a string with its unit preserved.
18
+ *
19
+ * Example usage:
20
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
21
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
22
+ */
23
+ export var mathWithUnits = function mathWithUnits(value, callback) {
24
+ var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
25
+
26
+ if (typeof value === 'string') {
27
+ var _matches$groups;
28
+
29
+ var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
30
+ value: 1,
31
+ unit: 2
32
+ });
33
+
34
+ var matches = regex.exec(value);
35
+ if (!(matches !== null && matches !== void 0 && (_matches$groups = matches.groups) !== null && _matches$groups !== void 0 && _matches$groups.value)) return value;
36
+ var numericValue = Number(matches.groups.value);
37
+ var passedUnit = matches.groups.unit || unit;
38
+ return "".concat(callback(numericValue)).concat(passedUnit);
39
+ } else if (typeof value === 'number') {
40
+ return "".concat(callback(value)).concat(unit);
41
+ } else {
42
+ return value;
43
+ }
44
+ };
@@ -100,12 +100,15 @@ export var useEuiYScroll = function useEuiYScroll() {
100
100
  };
101
101
  export var euiYScrollWithShadows = function euiYScrollWithShadows(euiTheme) {
102
102
  var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
103
- height = _ref7.height;
103
+ height = _ref7.height,
104
+ _ref7$side = _ref7.side,
105
+ side = _ref7$side === void 0 ? 'both' : _ref7$side;
104
106
 
105
107
  return "\n ".concat(euiYScroll(euiTheme, {
106
108
  height: height
107
109
  }), "\n ").concat(euiOverflowShadowStyles(euiTheme, {
108
- direction: 'y'
110
+ direction: 'y',
111
+ side: side
109
112
  }), "\n");
110
113
  };
111
114
  export var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
@@ -10,6 +10,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
10
10
  import chroma from 'chroma-js';
11
11
  import { shade, tint, lightness as getLightness } from './manipulation';
12
12
  import { getOn } from '../theme/utils';
13
+ export var wcagContrastMin = 4.5; // WCAG AA minimum contrast ratio for normal (non-large) text
14
+
13
15
  /**
14
16
  * Creates a new color that meets or exceeds WCAG level AA
15
17
  * @param foreground - Color to manipulate
@@ -11,7 +11,7 @@ export { keys };
11
11
  export { accessibleClickKeys, cascadingMenuKeys, comboBoxKeys, htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
12
12
  export { LEFT_ALIGNMENT, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from './alignment';
13
13
  export { useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint, CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint } from './breakpoint';
14
- export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, makeHighContrastColor, makeDisabledContrastColor } from './color';
14
+ export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, makeHighContrastColor, makeDisabledContrastColor, wcagContrastMin } from './color';
15
15
  export { useColorPickerState, useColorStopsState } from './color_picker';
16
16
  export * from './console';
17
17
  export { copyToClipboard } from './copy_to_clipboard';
@@ -11,4 +11,5 @@ import { DEFAULT_COLOR_MODE, getComputed } from './utils';
11
11
  export var EuiSystemContext = /*#__PURE__*/createContext(EuiThemeAmsterdam);
12
12
  export var EuiModificationsContext = /*#__PURE__*/createContext({});
13
13
  export var EuiColorModeContext = /*#__PURE__*/createContext(DEFAULT_COLOR_MODE);
14
- export var EuiThemeContext = /*#__PURE__*/createContext(getComputed(EuiThemeAmsterdam, {}, DEFAULT_COLOR_MODE));
14
+ export var defaultComputedTheme = getComputed(EuiThemeAmsterdam, {}, DEFAULT_COLOR_MODE);
15
+ export var EuiThemeContext = /*#__PURE__*/createContext(defaultComputedTheme);
@@ -8,12 +8,38 @@ import _extends from "@babel/runtime/helpers/extends";
8
8
  * Side Public License, v 1.
9
9
  */
10
10
  import React, { forwardRef, useContext, useMemo } from 'react';
11
- import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
11
+ import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext, defaultComputedTheme } from './context';
12
+ import { getEuiDevProviderWarning } from './provider';
12
13
  import { jsx as ___EmotionJSX } from "@emotion/react";
14
+ var providerMessage = "`EuiProvider` is missing which can result in negative effects.\nWrap your component in `EuiProvider`: https://ela.st/euiprovider.";
13
15
  export var useEuiTheme = function useEuiTheme() {
14
16
  var theme = useContext(EuiThemeContext);
15
17
  var colorMode = useContext(EuiColorModeContext);
16
18
  var modifications = useContext(EuiModificationsContext);
19
+
20
+ if (process.env.NODE_ENV !== 'production') {
21
+ var isFallback = theme === defaultComputedTheme;
22
+ var warningLevel = getEuiDevProviderWarning();
23
+
24
+ if (isFallback && typeof warningLevel !== 'undefined') {
25
+ switch (warningLevel) {
26
+ case 'log':
27
+ console.log(providerMessage);
28
+ break;
29
+
30
+ case 'warn':
31
+ console.warn(providerMessage);
32
+ break;
33
+
34
+ case 'error':
35
+ throw new Error(providerMessage);
36
+
37
+ default:
38
+ break;
39
+ }
40
+ }
41
+ }
42
+
17
43
  var assembledTheme = useMemo(function () {
18
44
  return {
19
45
  euiTheme: theme,
@@ -7,6 +7,6 @@
7
7
  */
8
8
  export { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
9
9
  export { useEuiTheme, withEuiTheme } from './hooks';
10
- export { EuiThemeProvider } from './provider';
10
+ export { EuiThemeProvider, getEuiDevProviderWarning, setEuiDevProviderWarning } from './provider';
11
11
  export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed } from './utils';
12
12
  export { COLOR_MODES_STANDARD } from './types';
@@ -1,5 +1,10 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
 
4
+ 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; }
5
+
6
+ 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; }
7
+
3
8
  /*
4
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
10
  * or more contributor license agreements. Licensed under the Elastic License
@@ -12,6 +17,13 @@ import isEqual from 'lodash/isEqual';
12
17
  import { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
13
18
  import { buildTheme, getColorMode, getComputed, mergeDeep } from './utils';
14
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
+ var providerWarning = undefined;
21
+ export var setEuiDevProviderWarning = function setEuiDevProviderWarning(level) {
22
+ return providerWarning = level;
23
+ };
24
+ export var getEuiDevProviderWarning = function getEuiDevProviderWarning() {
25
+ return providerWarning;
26
+ };
15
27
  export var EuiThemeProvider = function EuiThemeProvider(_ref) {
16
28
  var _system = _ref.theme,
17
29
  _colorMode = _ref.colorMode,
@@ -44,7 +56,8 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
44
56
  var prevColorMode = useRef(colorMode);
45
57
  var isParentTheme = useRef(prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && isEqual(parentModifications, modifications));
46
58
 
47
- var _useState7 = useState(isParentTheme.current && Object.keys(parentTheme).length ? parentTheme : getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode)),
59
+ var _useState7 = useState(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
60
+ : getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode)),
48
61
  _useState8 = _slicedToArray(_useState7, 2),
49
62
  theme = _useState8[0],
50
63
  setTheme = _useState8[1];
@@ -211,10 +211,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
211
211
 
212
212
  if (_arrowDisplay !== 'none') {
213
213
  iconButton = (0, _react2.jsx)(_button.EuiButtonIcon, (0, _extends2.default)({
214
- color: "text"
214
+ color: "text",
215
+ css: cssIconButtonStyles
215
216
  }, arrowProps, {
216
217
  className: iconButtonClasses,
217
- css: cssIconButtonStyles,
218
218
  iconType: "arrowRight",
219
219
  onClick: this.onToggle,
220
220
  "aria-controls": id,
@@ -250,10 +250,11 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
250
250
  childrenContent = children;
251
251
  }
252
252
 
253
- var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({}, buttonProps, {
253
+ var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({
254
+ css: cssButtonStyles
255
+ }, buttonProps, {
254
256
  id: buttonId,
255
257
  className: buttonClasses,
256
- css: cssButtonStyles,
257
258
  "aria-controls": id,
258
259
  "aria-expanded": isOpen,
259
260
  onClick: isDisabled ? undefined : this.onToggle,
@@ -50,7 +50,7 @@ exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
50
50
  var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
51
51
  var euiTheme = _ref6.euiTheme;
52
52
  return {
53
- euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", _global_styling.logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
53
+ euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
54
54
  isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
55
55
  };
56
56
  };