@elastic/eui 64.0.0 → 64.0.3

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 (185) 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 +7 -313
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +7 -313
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/basic_table/collapsed_item_actions.js +1 -2
  8. package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  9. package/es/components/button/button_display/_button_display.js +6 -1
  10. package/es/components/button/button_empty/button_empty.js +10 -1
  11. package/es/components/card/card.js +10 -1
  12. package/es/components/card/card_select.js +10 -1
  13. package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  14. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
  15. package/es/components/description_list/description_list_title.js +1 -1
  16. package/es/components/expression/expression.js +12 -2
  17. package/es/components/header/header_links/header_link.js +10 -1
  18. package/es/components/header/header_section/header_section_item.js +4 -3
  19. package/es/components/image/image.js +6 -1
  20. package/es/components/image/image_button.styles.js +1 -1
  21. package/es/components/link/link.styles.js +6 -5
  22. package/es/components/notification/notification_event.js +10 -1
  23. package/es/components/page/page_content/page_content.js +1 -2
  24. package/es/components/page/page_content/page_content_body.js +1 -2
  25. package/es/components/page/page_content/page_content_header.js +1 -2
  26. package/es/components/page/page_content/page_content_header_section.js +1 -2
  27. package/es/components/page/page_section/page_section.js +15 -3
  28. package/es/components/page/page_side_bar/page_side_bar.js +1 -2
  29. package/es/components/page/page_sidebar/page_sidebar.js +5 -1
  30. package/es/components/page/page_template.js +3 -1
  31. package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  32. package/es/components/page_template/page_template.js +18 -2
  33. package/es/components/pagination/pagination_button.js +10 -1
  34. package/es/components/progress/progress.js +6 -1
  35. package/es/components/provider/cache/cache_provider.js +3 -9
  36. package/es/components/provider/provider.js +25 -2
  37. package/es/components/resizable_container/resizable_panel.js +6 -1
  38. package/es/components/side_nav/side_nav.js +5 -0
  39. package/es/components/text/text.styles.js +1 -1
  40. package/es/components/toast/global_toast_list.styles.js +2 -2
  41. package/es/global_styling/functions/logicals.js +16 -2
  42. package/es/global_styling/mixins/_helpers.js +11 -4
  43. package/es/global_styling/mixins/_states.js +3 -4
  44. package/es/global_styling/mixins/_typography.js +3 -1
  45. package/es/global_styling/reset/global_styles.js +1 -1
  46. package/es/global_styling/utility/utility.js +10 -2
  47. package/es/services/theme/hooks.js +11 -16
  48. package/eui.d.ts +98 -79
  49. package/i18ntokens.json +8 -8
  50. package/lib/components/basic_table/collapsed_item_actions.js +1 -2
  51. package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  52. package/lib/components/button/button_display/_button_display.js +6 -1
  53. package/lib/components/button/button_empty/button_empty.js +10 -1
  54. package/lib/components/card/card.js +10 -1
  55. package/lib/components/card/card_select.js +10 -1
  56. package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  57. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  58. package/lib/components/description_list/description_list_title.js +1 -1
  59. package/lib/components/expression/expression.js +12 -2
  60. package/lib/components/header/header_links/header_link.js +10 -1
  61. package/lib/components/header/header_section/header_section_item.js +4 -3
  62. package/lib/components/image/image.js +6 -1
  63. package/lib/components/image/image_button.styles.js +1 -1
  64. package/lib/components/link/link.styles.js +6 -5
  65. package/lib/components/notification/notification_event.js +10 -1
  66. package/lib/components/page/page_content/page_content.js +1 -2
  67. package/lib/components/page/page_content/page_content_body.js +1 -2
  68. package/lib/components/page/page_content/page_content_header.js +1 -2
  69. package/lib/components/page/page_content/page_content_header_section.js +1 -2
  70. package/lib/components/page/page_section/page_section.js +15 -3
  71. package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  72. package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  73. package/lib/components/page/page_template.js +3 -1
  74. package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  75. package/lib/components/page_template/page_template.js +18 -2
  76. package/lib/components/progress/progress.js +6 -1
  77. package/lib/components/provider/cache/cache_provider.js +3 -11
  78. package/lib/components/provider/provider.js +31 -6
  79. package/lib/components/resizable_container/resizable_panel.js +6 -1
  80. package/lib/components/side_nav/side_nav.js +5 -0
  81. package/lib/components/text/text.styles.js +1 -1
  82. package/lib/components/toast/global_toast_list.styles.js +1 -1
  83. package/lib/global_styling/functions/logicals.js +21 -4
  84. package/lib/global_styling/mixins/_helpers.js +17 -6
  85. package/lib/global_styling/mixins/_states.js +3 -4
  86. package/lib/global_styling/mixins/_typography.js +4 -1
  87. package/lib/global_styling/reset/global_styles.js +1 -1
  88. package/lib/global_styling/utility/utility.js +16 -3
  89. package/lib/services/theme/hooks.js +10 -15
  90. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
  91. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  92. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
  93. package/optimize/es/components/description_list/description_list_title.js +1 -1
  94. package/optimize/es/components/header/header_section/header_section_item.js +4 -3
  95. package/optimize/es/components/image/image_button.styles.js +1 -1
  96. package/optimize/es/components/link/link.styles.js +6 -5
  97. package/optimize/es/components/page/page_content/page_content.js +1 -2
  98. package/optimize/es/components/page/page_content/page_content_body.js +1 -2
  99. package/optimize/es/components/page/page_content/page_content_header.js +1 -2
  100. package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
  101. package/optimize/es/components/page/page_section/page_section.js +4 -2
  102. package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
  103. package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
  104. package/optimize/es/components/page/page_template.js +3 -1
  105. package/optimize/es/components/provider/cache/cache_provider.js +3 -9
  106. package/optimize/es/components/provider/provider.js +25 -2
  107. package/optimize/es/components/text/text.styles.js +1 -1
  108. package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
  109. package/optimize/es/global_styling/functions/logicals.js +16 -2
  110. package/optimize/es/global_styling/mixins/_helpers.js +11 -4
  111. package/optimize/es/global_styling/mixins/_states.js +3 -4
  112. package/optimize/es/global_styling/mixins/_typography.js +3 -1
  113. package/optimize/es/global_styling/reset/global_styles.js +1 -1
  114. package/optimize/es/global_styling/utility/utility.js +10 -2
  115. package/optimize/es/services/theme/hooks.js +11 -16
  116. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
  117. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  118. package/optimize/lib/components/description_list/description_list_title.js +1 -1
  119. package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
  120. package/optimize/lib/components/image/image_button.styles.js +1 -1
  121. package/optimize/lib/components/link/link.styles.js +6 -5
  122. package/optimize/lib/components/page/page_content/page_content.js +1 -2
  123. package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
  124. package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
  125. package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
  126. package/optimize/lib/components/page/page_section/page_section.js +4 -2
  127. package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  128. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  129. package/optimize/lib/components/page/page_template.js +3 -1
  130. package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
  131. package/optimize/lib/components/provider/provider.js +31 -6
  132. package/optimize/lib/components/text/text.styles.js +1 -1
  133. package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
  134. package/optimize/lib/global_styling/functions/logicals.js +21 -4
  135. package/optimize/lib/global_styling/mixins/_helpers.js +17 -6
  136. package/optimize/lib/global_styling/mixins/_states.js +3 -4
  137. package/optimize/lib/global_styling/mixins/_typography.js +4 -1
  138. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  139. package/optimize/lib/global_styling/utility/utility.js +16 -3
  140. package/optimize/lib/services/theme/hooks.js +10 -15
  141. package/package.json +1 -1
  142. package/src/components/datagrid/_data_grid_data_row.scss +7 -0
  143. package/src/components/header/header_section/_header_section_item.scss +1 -1
  144. package/src/global_styling/mixins/_helpers.scss +9 -0
  145. package/src/global_styling/utility/_utility.scss +0 -127
  146. package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
  147. package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
  148. package/test-env/components/button/button_display/_button_display.js +6 -1
  149. package/test-env/components/button/button_empty/button_empty.js +10 -1
  150. package/test-env/components/card/card.js +10 -1
  151. package/test-env/components/card/card_select.js +10 -1
  152. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  153. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  154. package/test-env/components/description_list/description_list_title.js +1 -1
  155. package/test-env/components/expression/expression.js +12 -2
  156. package/test-env/components/header/header_links/header_link.js +10 -1
  157. package/test-env/components/header/header_section/header_section_item.js +4 -3
  158. package/test-env/components/image/image.js +6 -1
  159. package/test-env/components/image/image_button.styles.js +1 -1
  160. package/test-env/components/link/link.styles.js +6 -5
  161. package/test-env/components/notification/notification_event.js +10 -1
  162. package/test-env/components/page/page_content/page_content.js +1 -2
  163. package/test-env/components/page/page_content/page_content_body.js +1 -2
  164. package/test-env/components/page/page_content/page_content_header.js +1 -2
  165. package/test-env/components/page/page_content/page_content_header_section.js +1 -2
  166. package/test-env/components/page/page_section/page_section.js +15 -3
  167. package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
  168. package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
  169. package/test-env/components/page/page_template.js +3 -1
  170. package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  171. package/test-env/components/page_template/page_template.js +18 -2
  172. package/test-env/components/progress/progress.js +6 -1
  173. package/test-env/components/provider/cache/cache_provider.js +3 -11
  174. package/test-env/components/provider/provider.js +31 -6
  175. package/test-env/components/resizable_container/resizable_panel.js +6 -1
  176. package/test-env/components/side_nav/side_nav.js +5 -0
  177. package/test-env/components/text/text.styles.js +1 -1
  178. package/test-env/components/toast/global_toast_list.styles.js +1 -1
  179. package/test-env/global_styling/functions/logicals.js +21 -4
  180. package/test-env/global_styling/mixins/_helpers.js +17 -6
  181. package/test-env/global_styling/mixins/_states.js +3 -4
  182. package/test-env/global_styling/mixins/_typography.js +4 -1
  183. package/test-env/global_styling/reset/global_styles.js +1 -1
  184. package/test-env/global_styling/utility/utility.js +16 -3
  185. package/test-env/services/theme/hooks.js +10 -15
@@ -270,7 +270,16 @@ EuiNotificationEvent.propTypes = {
270
270
  /**
271
271
  * Object of props passed to the <span/> wrapping the button's content
272
272
  */
273
- contentProps: _propTypes.default.any,
273
+
274
+ /**
275
+ * Object of props passed to the <span/> wrapping the button's content
276
+ */
277
+ contentProps: _propTypes.default.shape({
278
+ className: _propTypes.default.string,
279
+ "aria-label": _propTypes.default.string,
280
+ "data-test-subj": _propTypes.default.string,
281
+ css: _propTypes.default.any
282
+ }),
274
283
 
275
284
  /**
276
285
  * Any `type` accepted by EuiIcon
@@ -30,8 +30,7 @@ var horizontalPositionToClassNameMap = {
30
30
  };
31
31
 
32
32
  /**
33
- * **DEPRECATED**
34
- * Use EuiPageSection instead
33
+ * @deprecated Use EuiPageSection instead
35
34
  */
36
35
  var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
37
36
  var verticalPosition = _ref.verticalPosition,
@@ -36,8 +36,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
36
36
  exports.PADDING_SIZES = PADDING_SIZES;
37
37
 
38
38
  /**
39
- * **DEPRECATED**
40
- * Use EuiPageSection instead
39
+ * @deprecated Use EuiPageSection instead
41
40
  */
42
41
  var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
43
42
  var children = _ref.children,
@@ -22,8 +22,7 @@ var _react2 = require("@emotion/react");
22
22
  var _excluded = ["children", "className", "responsive"];
23
23
 
24
24
  /**
25
- * **DEPRECATED**
26
- * Use EuiPageHeader instead
25
+ * @deprecated Use EuiPageHeader instead
27
26
  */
28
27
  var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
29
28
  var children = _ref.children,
@@ -22,8 +22,7 @@ var _react2 = require("@emotion/react");
22
22
  var _excluded = ["children", "className"];
23
23
 
24
24
  /**
25
- * **DEPRECATED**
26
- * Use EuiPageHeader instead
25
+ * @deprecated Use EuiPageHeader instead
27
26
  */
28
27
  var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
29
28
  var children = _ref.children,
@@ -25,7 +25,7 @@ var _global_styling = require("../../../global_styling");
25
25
 
26
26
  var _react2 = require("@emotion/react");
27
27
 
28
- var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
28
+ var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
29
29
 
30
30
  var EuiPageSection = function EuiPageSection(_ref) {
31
31
  var children = _ref.children,
@@ -41,6 +41,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
41
41
  _ref$grow = _ref.grow,
42
42
  grow = _ref$grow === void 0 ? false : _ref$grow,
43
43
  contentProps = _ref.contentProps,
44
+ _ref$component = _ref.component,
45
+ Component = _ref$component === void 0 ? 'section' : _ref$component,
44
46
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
45
47
  // Set max-width as a style prop
46
48
  var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, contentProps === null || contentProps === void 0 ? void 0 : contentProps.style);
@@ -52,7 +54,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
52
54
  var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
53
55
  var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
54
56
  var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
55
- return (0, _react2.jsx)("div", (0, _extends2.default)({
57
+ return (0, _react2.jsx)(Component, (0, _extends2.default)({
56
58
  css: cssStyles
57
59
  }, rest), (0, _react2.jsx)("div", (0, _extends2.default)({
58
60
  css: cssContentStyles
@@ -107,5 +109,15 @@ EuiPageSection.propTypes = {
107
109
  /**
108
110
  * Passed down to the div wrapper of the section contents
109
111
  */
110
- contentProps: _propTypes.default.any
112
+ contentProps: _propTypes.default.shape({
113
+ className: _propTypes.default.string,
114
+ "aria-label": _propTypes.default.string,
115
+ "data-test-subj": _propTypes.default.string,
116
+ css: _propTypes.default.any
117
+ }),
118
+
119
+ /**
120
+ * Sets which HTML element to render.
121
+ */
122
+ component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
111
123
  };
@@ -32,8 +32,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
32
32
  exports.PADDING_SIZES = PADDING_SIZES;
33
33
 
34
34
  /**
35
- * **DEPRECATED**
36
- * Use the new EuiPageSidebar instead
35
+ * @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
37
36
  */
38
37
  var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
39
38
  var children = _ref.children,
@@ -65,13 +65,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
65
65
  setInlineStyles = _useState2[1];
66
66
 
67
67
  (0, _react.useEffect)(function () {
68
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
69
+
68
70
  if (sticky) {
69
71
  var _document$body$datase;
70
72
 
71
73
  var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
72
74
  var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
73
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth)), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)"))));
75
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
74
76
  }
77
+
78
+ setInlineStyles(updatedStyles);
75
79
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
76
80
  return (0, _react2.jsx)("div", (0, _extends2.default)({
77
81
  className: className,
@@ -51,7 +51,9 @@ exports.TEMPLATES = TEMPLATES;
51
51
  /**
52
52
  * This component has been deprecated in favor of the new
53
53
  * namespaced version. You can still import this component
54
- * for a period of time by importing `as EuiPageTemplate`.
54
+ * until August 2023 by importing `as EuiPageTemplate`.
55
+ *
56
+ * @deprecated use EuiPageTemplate from page_template/page_template instead
55
57
  */
56
58
  var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
57
59
  var _pageBodyProps2;
@@ -110,6 +110,16 @@ _EuiPageEmptyPrompt.propTypes = {
110
110
  /**
111
111
  * Passed down to the div wrapper of the section contents
112
112
  */
113
- contentProps: _propTypes.default.any,
113
+ contentProps: _propTypes.default.shape({
114
+ className: _propTypes.default.string,
115
+ "aria-label": _propTypes.default.string,
116
+ "data-test-subj": _propTypes.default.string,
117
+ css: _propTypes.default.any
118
+ }),
119
+
120
+ /**
121
+ * Sets which HTML element to render.
122
+ */
123
+ component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
114
124
  panelled: _propTypes.default.bool
115
125
  };
@@ -309,7 +309,17 @@ _EuiPageSection.propTypes = {
309
309
  /**
310
310
  * Passed down to the div wrapper of the section contents
311
311
  */
312
- contentProps: _propTypes.default.any
312
+ contentProps: _propTypes.default.shape({
313
+ className: _propTypes.default.string,
314
+ "aria-label": _propTypes.default.string,
315
+ "data-test-subj": _propTypes.default.string,
316
+ css: _propTypes.default.any
317
+ }),
318
+
319
+ /**
320
+ * Sets which HTML element to render.
321
+ */
322
+ component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
313
323
  };
314
324
 
315
325
  var _EuiPageHeader = function _EuiPageHeader(props) {
@@ -358,7 +368,13 @@ _EuiPageEmptyPrompt.propTypes = {
358
368
  paddingSize: _propTypes.default.any,
359
369
  alignment: _propTypes.default.any,
360
370
  grow: _propTypes.default.bool,
361
- contentProps: _propTypes.default.any,
371
+ contentProps: _propTypes.default.shape({
372
+ className: _propTypes.default.string,
373
+ "aria-label": _propTypes.default.string,
374
+ "data-test-subj": _propTypes.default.string,
375
+ css: _propTypes.default.any
376
+ }),
377
+ component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
362
378
  panelled: _propTypes.default.bool
363
379
  };
364
380
 
@@ -160,5 +160,10 @@ EuiProgress.propTypes = {
160
160
  /**
161
161
  * Object of props passed to the <span/> wrapping the determinate progress's label
162
162
  */
163
- labelProps: _propTypes.default.any
163
+ labelProps: _propTypes.default.shape({
164
+ className: _propTypes.default.string,
165
+ "aria-label": _propTypes.default.string,
166
+ "data-test-subj": _propTypes.default.string,
167
+ css: _propTypes.default.any
168
+ })
164
169
  };
@@ -9,8 +9,6 @@ exports.EuiCacheProvider = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _cache = _interopRequireDefault(require("@emotion/cache"));
13
-
14
12
  var _react2 = require("@emotion/react");
15
13
 
16
14
  /*
@@ -20,18 +18,12 @@ var _react2 = require("@emotion/react");
20
18
  * in compliance with, at your election, the Elastic License 2.0 or the Server
21
19
  * Side Public License, v 1.
22
20
  */
23
- var defaultCache = (0, _cache.default)({
24
- key: 'css'
25
- });
26
- defaultCache.compat = true;
27
-
28
21
  var EuiCacheProvider = function EuiCacheProvider(_ref) {
29
- var _ref$cache = _ref.cache,
30
- cache = _ref$cache === void 0 ? defaultCache : _ref$cache,
22
+ var cache = _ref.cache,
31
23
  children = _ref.children;
32
- return (0, _react2.jsx)(_react2.CacheProvider, {
24
+ return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
33
25
  value: cache
34
- }, children);
26
+ }, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
35
27
  };
36
28
 
37
29
  exports.EuiCacheProvider = EuiCacheProvider;
@@ -9,6 +9,8 @@ exports.EuiProvider = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
+ var _cache = _interopRequireDefault(require("@emotion/cache"));
13
+
12
14
  var _global_styles = require("../../global_styling/reset/global_styles");
13
15
 
14
16
  var _utility = require("../../global_styling/utility/utility");
@@ -17,7 +19,7 @@ var _services = require("../../services");
17
19
 
18
20
  var _themes = require("../../themes");
19
21
 
20
- var _cache = require("./cache");
22
+ var _cache2 = require("./cache");
21
23
 
22
24
  var _react2 = require("@emotion/react");
23
25
 
@@ -32,8 +34,16 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
32
34
  return obj.hasOwnProperty('key');
33
35
  };
34
36
 
37
+ var fallbackCache = (0, _cache.default)({
38
+ key: 'css'
39
+ });
40
+ fallbackCache.compat = true;
41
+
35
42
  var EuiProvider = function EuiProvider(_ref) {
36
- var cache = _ref.cache,
43
+ var _defaultCache;
44
+
45
+ var _ref$cache = _ref.cache,
46
+ cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
37
47
  _ref$theme = _ref.theme,
38
48
  theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
39
49
  _ref$globalStyles = _ref.globalStyles,
@@ -49,24 +59,39 @@ var EuiProvider = function EuiProvider(_ref) {
49
59
 
50
60
  if (cache) {
51
61
  if (isEmotionCacheObject(cache)) {
62
+ cache.compat = true;
52
63
  defaultCache = cache;
53
64
  } else {
65
+ if (cache.default) {
66
+ cache.default.compat = true;
67
+ }
68
+
54
69
  defaultCache = cache.default;
70
+
71
+ if (cache.global) {
72
+ cache.global.compat = true;
73
+ }
74
+
55
75
  globalCache = cache.global;
76
+
77
+ if (cache.utility) {
78
+ cache.utility.compat = true;
79
+ }
80
+
56
81
  utilityCache = cache.utility;
57
82
  }
58
83
  }
59
84
 
60
- return (0, _react2.jsx)(_cache.EuiCacheProvider, {
61
- cache: defaultCache
85
+ return (0, _react2.jsx)(_cache2.EuiCacheProvider, {
86
+ cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
62
87
  }, (0, _react2.jsx)(_services.EuiThemeProvider, {
63
88
  theme: theme !== null && theme !== void 0 ? theme : undefined,
64
89
  colorMode: colorMode,
65
90
  modify: modify
66
- }, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache.EuiCacheProvider, {
91
+ }, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache2.EuiCacheProvider, {
67
92
  cache: globalCache,
68
93
  children: Globals && (0, _react2.jsx)(Globals, null)
69
- }), (0, _react2.jsx)(_cache.EuiCacheProvider, {
94
+ }), (0, _react2.jsx)(_cache2.EuiCacheProvider, {
70
95
  cache: utilityCache,
71
96
  children: Utilities && (0, _react2.jsx)(Utilities, null)
72
97
  })), (0, _react2.jsx)(_services.CurrentEuiBreakpointProvider, null, children)));
@@ -355,7 +355,12 @@ EuiResizablePanel.propTypes = {
355
355
  /**
356
356
  * Props to add to the wrapping `.euiResizablePanel` div
357
357
  */
358
- wrapperProps: _propTypes.default.any,
358
+ wrapperProps: _propTypes.default.shape({
359
+ className: _propTypes.default.string,
360
+ "aria-label": _propTypes.default.string,
361
+ "data-test-subj": _propTypes.default.string,
362
+ css: _propTypes.default.any
363
+ }),
359
364
 
360
365
  /**
361
366
  * Padding to add directly to the wrapping `.euiResizablePanel` div
@@ -255,6 +255,11 @@ EuiSideNav.propTypes = {
255
255
  * Adds a couple extra #EuiSideNavHeading props and extends the props of EuiTitle that wraps the `heading`
256
256
  */
257
257
  headingProps: _propTypes.default.shape({
258
+ className: _propTypes.default.string,
259
+ "aria-label": _propTypes.default.string,
260
+ "data-test-subj": _propTypes.default.string,
261
+ css: _propTypes.default.any,
262
+
258
263
  /**
259
264
  * The actual HTML heading element to wrap the `heading`.
260
265
  * Default is `h2`
@@ -74,7 +74,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
74
74
  var euiTextStyles = function euiTextStyles(euiThemeContext) {
75
75
  var euiTheme = euiThemeContext.euiTheme;
76
76
  return {
77
- euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), ";clear:both;a:not([class]){", (0, _link.euiLinkCSS)(euiTheme), ";}img{display:block;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", (0, _global_styling.logicalTextAlignCSS)('center'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", (0, _global_styling.logicalCSS)('height', euiTheme.border.width.thick), " ", (0, _global_styling.logicalCSS)('width', '50%'), " ", (0, _global_styling.logicalCSS)('left', '25%'), " ", (0, _global_styling.logicalCSS)('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", (0, _global_styling.logicalCSS)('top', '0'), ";}&:after{", (0, _global_styling.logicalCSS)('bottom', '0'), ";}}h1{", (0, _title.euiTitle)(euiThemeContext, 'l'), ";}h2{", (0, _title.euiTitle)(euiThemeContext, 'm'), ";}h3{", (0, _title.euiTitle)(euiThemeContext, 's'), ";}h4,dt{", (0, _title.euiTitle)(euiThemeContext, 'xs'), ";}h5{", (0, _title.euiTitle)(euiThemeContext, 'xxs'), ";}h6{", (0, _title.euiTitle)(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:calc(", euiTheme.border.radius.small, " / 2);};label:euiText;"),
77
+ euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), ";clear:both;a:not([class]){", (0, _link.euiLinkCSS)(euiThemeContext), ";}img{display:block;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", (0, _global_styling.logicalTextAlignCSS)('center'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", (0, _global_styling.logicalCSS)('height', euiTheme.border.width.thick), " ", (0, _global_styling.logicalCSS)('width', '50%'), " ", (0, _global_styling.logicalCSS)('left', '25%'), " ", (0, _global_styling.logicalCSS)('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", (0, _global_styling.logicalCSS)('top', '0'), ";}&:after{", (0, _global_styling.logicalCSS)('bottom', '0'), ";}}h1{", (0, _title.euiTitle)(euiThemeContext, 'l'), ";}h2{", (0, _title.euiTitle)(euiThemeContext, 'm'), ";}h3{", (0, _title.euiTitle)(euiThemeContext, 's'), ";}h4,dt{", (0, _title.euiTitle)(euiThemeContext, 'xs'), ";}h5{", (0, _title.euiTitle)(euiThemeContext, 'xxs'), ";}h6{", (0, _title.euiTitle)(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:calc(", euiTheme.border.radius.small, " / 2);};label:euiText;"),
78
78
  constrainedWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
79
79
  // Sizes
80
80
  m: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
@@ -24,7 +24,7 @@ var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext
24
24
  * 2. Allow some padding for shadow
25
25
  */
26
26
  // Base
27
- euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";overflow-y:auto;", (0, _global_styling.logicalCSS)('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", (0, _global_styling.logicalSizeCSS)(0, 0), ";}&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiGlobalToastList;"),
27
+ euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", (0, _global_styling.logicalSizeCSS)(0, 0), ";}&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiGlobalToastList;"),
28
28
  // Variants
29
29
  right: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('right', 0), ";", (0, _global_styling.logicalCSS)('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";}};label:right;"),
30
30
  left: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";}};label:left;")
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
8
+ exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSSWithFallback = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -66,8 +66,8 @@ var logicalSize = {
66
66
  'min-width': 'min-inline-size'
67
67
  };
68
68
  var logicalOverflow = {
69
- 'overflow-x': 'overflow-block',
70
- 'overflow-y': 'overflow-inline'
69
+ 'overflow-x': 'overflow-inline',
70
+ 'overflow-y': 'overflow-block'
71
71
  };
72
72
  var logicalBorders = {
73
73
  'border-horizontal': 'border-inline',
@@ -115,6 +115,23 @@ exports.LOGICAL_PROPERTIES = LOGICAL_PROPERTIES;
115
115
  var logicalCSS = function logicalCSS(property, value) {
116
116
  return "".concat(logicals[property], ": ").concat(value, ";");
117
117
  };
118
+ /**
119
+ * Some logical properties are not yet fully supported by all browsers.
120
+ * For those cases, we should use the old property as a fallback for
121
+ * browsers missing support, while allowing supporting browsers to use
122
+ * the logical properties.
123
+ *
124
+ * Examples:
125
+ * https://caniuse.com/?search=overflow-block
126
+ * https://caniuse.com/mdn-css_properties_float_flow_relative_values
127
+ */
128
+
129
+
130
+ exports.logicalCSS = logicalCSS;
131
+
132
+ var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
133
+ return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
134
+ };
118
135
  /**
119
136
  *
120
137
  * @param property A string that is a valid CSS logical property
@@ -123,7 +140,7 @@ var logicalCSS = function logicalCSS(property, value) {
123
140
  */
124
141
 
125
142
 
126
- exports.logicalCSS = logicalCSS;
143
+ exports.logicalCSSWithFallback = logicalCSSWithFallback;
127
144
 
128
145
  var logicalStyle = function logicalStyle(property, value) {
129
146
  // Strip hyphens and camelCase the CSS logical property so React doesn't throw errors
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = void 0;
6
+ exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
7
7
 
8
8
  var _theme = require("../../services/theme");
9
9
 
10
10
  var _color = require("../../services/color");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -38,7 +40,7 @@ var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
38
40
  // so it's being added to this mixin for allowing support wherever custom scrollbars are
39
41
 
40
42
  var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
41
- return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n width: ").concat(scrollBarSize, ";\n height: ").concat(scrollBarSize, ";\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
43
+ return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat((0, _functions.logicalCSS)('width', scrollBarSize), "\n ").concat((0, _functions.logicalCSS)('height', scrollBarSize), "\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
42
44
  };
43
45
 
44
46
  exports.euiScrollBarStyles = euiScrollBarStyles;
@@ -92,12 +94,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
92
94
  */
93
95
 
94
96
 
95
- // TODO: How do we use Emotion to output the CSS class utilities instead?
96
97
  var euiYScroll = function euiYScroll(euiTheme) {
97
98
  var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
98
99
  height = _ref5.height;
99
100
 
100
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n height: ").concat(height || '100%', ";\n overflow-y: auto;\n overflow-x: hidden;\n &:focus {\n outline: none; /* 1 */\n }\n");
101
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSS)('height', height || '100%'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-y', 'auto'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
101
102
  };
102
103
 
103
104
  exports.euiYScroll = euiYScroll;
@@ -140,7 +141,7 @@ var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
140
141
  exports.useEuiYScrollWithShadows = useEuiYScrollWithShadows;
141
142
 
142
143
  var euiXScroll = function euiXScroll(euiTheme) {
143
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x: auto;\n &:focus {\n outline: none; /* 1 */\n }\n");
144
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
144
145
  };
145
146
 
146
147
  exports.euiXScroll = euiXScroll;
@@ -196,5 +197,15 @@ var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
196
197
  mask: mask
197
198
  });
198
199
  };
200
+ /**
201
+ * For quickly applying a full-height element whether using flex or not
202
+ */
203
+
204
+
205
+ exports.useEuiOverflowScroll = useEuiOverflowScroll;
206
+
207
+ var euiFullHeight = function euiFullHeight() {
208
+ return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
209
+ };
199
210
 
200
- exports.useEuiOverflowScroll = useEuiOverflowScroll;
211
+ exports.euiFullHeight = euiFullHeight;
@@ -23,7 +23,8 @@ var _services = require("../../services");
23
23
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
24
24
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
25
25
  */
26
- var euiFocusRing = function euiFocusRing(euiTheme) {
26
+ var euiFocusRing = function euiFocusRing(_ref) {
27
+ var euiTheme = _ref.euiTheme;
27
28
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
28
29
  var options = arguments.length > 2 ? arguments[2] : undefined;
29
30
  // Width is enforced as a constant at the global theme layer
@@ -51,9 +52,7 @@ var euiFocusRing = function euiFocusRing(euiTheme) {
51
52
  exports.euiFocusRing = euiFocusRing;
52
53
 
53
54
  var useEuiFocusRing = function useEuiFocusRing(offset, color) {
54
- var _useEuiTheme = (0, _services.useEuiTheme)(),
55
- euiTheme = _useEuiTheme.euiTheme;
56
-
55
+ var euiTheme = (0, _services.useEuiTheme)();
57
56
  return euiFocusRing(euiTheme, offset, {
58
57
  color: color
59
58
  });
@@ -9,6 +9,8 @@ var _typography = require("../functions/typography");
9
9
 
10
10
  var _hooks = require("../../services/theme/hooks");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -54,7 +56,8 @@ exports.euiTextBreakWord = euiTextBreakWord;
54
56
 
55
57
  var euiTextTruncate = function euiTextTruncate() {
56
58
  var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
57
- return "\n max-width: ".concat(maxWidth, "; // Ensure that the node has a maximum width after which truncation can occur\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
59
+ return "\n ".concat((0, _functions.logicalCSS)('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
60
+ , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
58
61
  };
59
62
  /**
60
63
  * Fixed-width numbers for tabular data
@@ -55,7 +55,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
55
55
  * Final styles
56
56
  */
57
57
 
58
- var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiTheme), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
58
+ var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiThemeContext), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
59
59
  return (0, _react2.jsx)(_react2.Global, {
60
60
  styles: styles
61
61
  });
@@ -5,14 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.EuiUtilityClasses = void 0;
8
+ exports.globalStyles = exports.EuiUtilityClasses = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _react2 = require("@emotion/react");
13
13
 
14
+ var _hooks = require("../../services/theme/hooks");
15
+
14
16
  var _screen_reader_only = require("../../components/accessibility/screen_reader_only/screen_reader_only.styles");
15
17
 
18
+ var _mixins = require("../mixins");
19
+
20
+ var _functions = require("../functions");
21
+
16
22
  /*
17
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,11 +26,18 @@ var _screen_reader_only = require("../../components/accessibility/screen_reader_
20
26
  * in compliance with, at your election, the Elastic License 2.0 or the Server
21
27
  * Side Public License, v 1.
22
28
  */
23
- var globalStyles = /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";};label:globalStyles;");
29
+ var globalStyles = function globalStyles(euiThemeContext) {
30
+ return /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";}.eui-alignBaseline{vertical-align:baseline!important;}.eui-alignBottom{vertical-align:bottom!important;}.eui-alignMiddle{vertical-align:middle!important;}.eui-alignTop{vertical-align:top!important;}.eui-displayBlock{display:block!important;}.eui-displayInline{display:inline!important;}.eui-displayInlineBlock{display:inline-block!important;}.eui-fullWidth{display:block!important;", (0, _functions.logicalCSS)('width', '100% !important'), ";}.eui-fullHeight{", (0, _mixins.euiFullHeight)(), ";}.eui-textCenter{text-align:center!important;}.eui-textLeft{text-align:start!important;}.eui-textRight{text-align:end!important;}.eui-textNoWrap{white-space:nowrap!important;}.eui-textInheritColor{color:inherit!important;}.eui-textBreakWord{", (0, _mixins.euiTextBreakWord)(), ";}.eui-textBreakAll{overflow-wrap:break-word!important;word-break:break-all!important;}.eui-textBreakNormal{overflow-wrap:normal!important;word-wrap:normal!important;word-break:normal!important;}.eui-textTruncate{", (0, _mixins.euiTextTruncate)(), ";}.eui-textNumber{", (0, _mixins.euiNumberFormat)(euiThemeContext), ";}.eui-scrollBar{", (0, _mixins.euiScrollBarStyles)(euiThemeContext), ";}.eui-yScroll{", (0, _mixins.euiYScroll)(euiThemeContext), ";}.eui-xScroll{", (0, _mixins.euiXScroll)(euiThemeContext), ";}.eui-yScrollWithShadows{", (0, _mixins.euiYScrollWithShadows)(euiThemeContext), ";}.eui-xScrollWithShadows{", (0, _mixins.euiXScrollWithShadows)(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
31
+ return "\n .eui-hideFor--".concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
32
+ }), ";;label:globalStyles;");
33
+ };
34
+
35
+ exports.globalStyles = globalStyles;
24
36
 
25
37
  var EuiUtilityClasses = function EuiUtilityClasses() {
38
+ var euiTheme = (0, _hooks.useEuiTheme)();
26
39
  return (0, _react2.jsx)(_react2.Global, {
27
- styles: globalStyles
40
+ styles: globalStyles(euiTheme)
28
41
  });
29
42
  };
30
43