@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
@@ -10,7 +10,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
10
10
  * Side Public License, v 1.
11
11
  */
12
12
  import { css, keyframes } from '@emotion/react';
13
- import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalSizeCSS } from '../../global_styling';
13
+ import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalCSSWithFallback, logicalSizeCSS } from '../../global_styling';
14
14
  export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext) {
15
15
  var euiTheme = euiThemeContext.euiTheme;
16
16
  var euiToastWidth = euiTheme.base * 20;
@@ -20,7 +20,7 @@ export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiTheme
20
20
  * 2. Allow some padding for shadow
21
21
  */
22
22
  // Base
23
- euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";overflow-y:auto;", logicalCSS('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", logicalSizeCSS(0, 0), ";}&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";", logicalCSS('padding-right', euiTheme.size.base), ";", logicalCSS('padding-vertical', euiTheme.size.base), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('width', '100%'), ";}};label:euiGlobalToastList;"),
23
+ euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";", logicalCSSWithFallback('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", logicalSizeCSS(0, 0), ";}&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";", logicalCSS('padding-right', euiTheme.size.base), ";", logicalCSS('padding-vertical', euiTheme.size.base), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('width', '100%'), ";}};label:euiGlobalToastList;"),
24
24
  // Variants
25
25
  right: /*#__PURE__*/css("&:not(:empty){", logicalCSS('right', 0), ";", logicalCSS('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";}};label:right;"),
26
26
  left: /*#__PURE__*/css("&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-right', euiTheme.size.base), ";}};label:left;")
@@ -62,8 +62,8 @@ var logicalSize = {
62
62
  'min-width': 'min-inline-size'
63
63
  };
64
64
  var logicalOverflow = {
65
- 'overflow-x': 'overflow-block',
66
- 'overflow-y': 'overflow-inline'
65
+ 'overflow-x': 'overflow-inline',
66
+ 'overflow-y': 'overflow-block'
67
67
  };
68
68
  var logicalBorders = {
69
69
  'border-horizontal': 'border-inline',
@@ -107,6 +107,20 @@ export var LOGICAL_PROPERTIES = keysOf(logicals);
107
107
  export var logicalCSS = function logicalCSS(property, value) {
108
108
  return "".concat(logicals[property], ": ").concat(value, ";");
109
109
  };
110
+ /**
111
+ * Some logical properties are not yet fully supported by all browsers.
112
+ * For those cases, we should use the old property as a fallback for
113
+ * browsers missing support, while allowing supporting browsers to use
114
+ * the logical properties.
115
+ *
116
+ * Examples:
117
+ * https://caniuse.com/?search=overflow-block
118
+ * https://caniuse.com/mdn-css_properties_float_flow_relative_values
119
+ */
120
+
121
+ export var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
122
+ return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
123
+ };
110
124
  /**
111
125
  *
112
126
  * @param property A string that is a valid CSS logical property
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { useEuiTheme } from '../../services/theme';
9
9
  import { transparentize } from '../../services/color';
10
+ import { logicalCSS, logicalCSSWithFallback } from '../functions';
10
11
  /**
11
12
  * Set scroll bar appearance on Chrome (and firefox).
12
13
  * All parameters are optional and default to specific global settings.
@@ -34,7 +35,7 @@ export var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
34
35
  // so it's being added to this mixin for allowing support wherever custom scrollbars are
35
36
 
36
37
  var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
37
- 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 ");
38
+ return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat(logicalCSS('width', scrollBarSize), "\n ").concat(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 ");
38
39
  };
39
40
  export var useEuiScrollBar = function useEuiScrollBar(options) {
40
41
  var euiTheme = useEuiTheme();
@@ -82,12 +83,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
82
83
  */
83
84
 
84
85
 
85
- // TODO: How do we use Emotion to output the CSS class utilities instead?
86
86
  export var euiYScroll = function euiYScroll(euiTheme) {
87
87
  var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
88
88
  height = _ref5.height;
89
89
 
90
- 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");
90
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat(logicalCSS('height', height || '100%'), "\n ").concat(logicalCSSWithFallback('overflow-y', 'auto'), "\n ").concat(logicalCSSWithFallback('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
91
91
  };
92
92
  export var useEuiYScroll = function useEuiYScroll() {
93
93
  var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
@@ -118,7 +118,7 @@ export var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
118
118
  });
119
119
  };
120
120
  export var euiXScroll = function euiXScroll(euiTheme) {
121
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x: auto;\n &:focus {\n outline: none; /* 1 */\n }\n");
121
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat(logicalCSSWithFallback('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
122
122
  };
123
123
  export var useEuiXScroll = function useEuiXScroll() {
124
124
  var euiTheme = useEuiTheme();
@@ -158,4 +158,11 @@ export var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
158
158
  direction: direction,
159
159
  mask: mask
160
160
  });
161
+ };
162
+ /**
163
+ * For quickly applying a full-height element whether using flex or not
164
+ */
165
+
166
+ export var euiFullHeight = function euiFullHeight() {
167
+ return "\n ".concat(logicalCSS('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
161
168
  };
@@ -15,7 +15,8 @@ import { useEuiTheme } from '../../services';
15
15
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
16
16
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
17
17
  */
18
- export var euiFocusRing = function euiFocusRing(euiTheme) {
18
+ export var euiFocusRing = function euiFocusRing(_ref) {
19
+ var euiTheme = _ref.euiTheme;
19
20
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
20
21
  var options = arguments.length > 2 ? arguments[2] : undefined;
21
22
  // Width is enforced as a constant at the global theme layer
@@ -40,9 +41,7 @@ export var euiFocusRing = function euiFocusRing(euiTheme) {
40
41
  return "\n outline: ".concat(outlineWidth, " solid ").concat(outlineColor, ";\n outline-offset: ").concat(outlineOffset, ";\n\n // \uD83D\uDC40 Chrome respects :focus-visible and allows coloring the `auto` style\n &:focus-visible {\n outline-style: auto;\n }\n\n // \uD83D\uDE45\u200D\u2640\uFE0F But Chrome also needs to have the outline forcefully removed from regular `:focus` state\n &:not(:focus-visible) {\n outline: none;\n }\n ");
41
42
  };
42
43
  export var useEuiFocusRing = function useEuiFocusRing(offset, color) {
43
- var _useEuiTheme = useEuiTheme(),
44
- euiTheme = _useEuiTheme.euiTheme;
45
-
44
+ var euiTheme = useEuiTheme();
46
45
  return euiFocusRing(euiTheme, offset, {
47
46
  color: color
48
47
  });
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { euiLineHeightFromBaseline, euiFontSizeFromScale } from '../functions/typography';
9
9
  import { useEuiTheme } from '../../services/theme/hooks';
10
+ import { logicalCSS } from '../functions';
10
11
 
11
12
  /**
12
13
  * Returns font-size and line-height
@@ -36,7 +37,8 @@ export var euiTextBreakWord = function euiTextBreakWord() {
36
37
 
37
38
  export var euiTextTruncate = function euiTextTruncate() {
38
39
  var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
39
- 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");
40
+ return "\n ".concat(logicalCSS('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
41
+ , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
40
42
  };
41
43
  /**
42
44
  * Fixed-width numbers for tabular data
@@ -42,7 +42,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
42
42
  * Final styles
43
43
  */
44
44
 
45
- var styles = /*#__PURE__*/css(reset, " 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{", euiFocusRing(euiTheme), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
45
+ var styles = /*#__PURE__*/css(reset, " 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{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
46
46
  return ___EmotionJSX(Global, {
47
47
  styles: styles
48
48
  });
@@ -7,11 +7,19 @@
7
7
  */
8
8
  import React from 'react';
9
9
  import { Global, css } from '@emotion/react';
10
+ import { useEuiTheme } from '../../services/theme/hooks';
10
11
  import { euiScreenReaderOnly } from '../../components/accessibility/screen_reader_only/screen_reader_only.styles';
12
+ import { euiFullHeight, euiTextBreakWord, euiTextTruncate, euiNumberFormat, euiScrollBarStyles, euiYScroll, euiXScroll, euiYScrollWithShadows, euiXScrollWithShadows, euiBreakpoint } from '../mixins';
13
+ import { logicalCSS } from '../functions';
11
14
  import { jsx as ___EmotionJSX } from "@emotion/react";
12
- var globalStyles = /*#__PURE__*/css(".euiScreenReaderOnly{", euiScreenReaderOnly(), ";};label:globalStyles;");
15
+ export var globalStyles = function globalStyles(euiThemeContext) {
16
+ return /*#__PURE__*/css(".euiScreenReaderOnly{", 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;", logicalCSS('width', '100% !important'), ";}.eui-fullHeight{", 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{", 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{", euiTextTruncate(), ";}.eui-textNumber{", euiNumberFormat(euiThemeContext), ";}.eui-scrollBar{", euiScrollBarStyles(euiThemeContext), ";}.eui-yScroll{", euiYScroll(euiThemeContext), ";}.eui-xScroll{", euiXScroll(euiThemeContext), ";}.eui-yScrollWithShadows{", euiYScrollWithShadows(euiThemeContext), ";}.eui-xScrollWithShadows{", euiXScrollWithShadows(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
17
+ return "\n .eui-hideFor--".concat(size, " {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
18
+ }), ";;label:globalStyles;");
19
+ };
13
20
  export var EuiUtilityClasses = function EuiUtilityClasses() {
21
+ var euiTheme = useEuiTheme();
14
22
  return ___EmotionJSX(Global, {
15
- styles: globalStyles
23
+ styles: globalStyles(euiTheme)
16
24
  });
17
25
  };
@@ -7,18 +7,21 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
7
7
  * in compliance with, at your election, the Elastic License 2.0 or the Server
8
8
  * Side Public License, v 1.
9
9
  */
10
- import React, { forwardRef, useContext } from 'react';
10
+ import React, { forwardRef, useContext, useMemo } from 'react';
11
11
  import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
12
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
13
13
  export var useEuiTheme = function useEuiTheme() {
14
14
  var theme = useContext(EuiThemeContext);
15
15
  var colorMode = useContext(EuiColorModeContext);
16
16
  var modifications = useContext(EuiModificationsContext);
17
- return {
18
- euiTheme: theme,
19
- colorMode: colorMode,
20
- modifications: modifications
21
- };
17
+ var assembledTheme = useMemo(function () {
18
+ return {
19
+ euiTheme: theme,
20
+ colorMode: colorMode,
21
+ modifications: modifications
22
+ };
23
+ }, [theme, colorMode, modifications]);
24
+ return assembledTheme;
22
25
  };
23
26
  // Provide the component props interface as the generic to allow the docs props table to populate.
24
27
  // e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
@@ -26,17 +29,9 @@ export var withEuiTheme = function withEuiTheme(Component) {
26
29
  var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
27
30
 
28
31
  var Render = function Render(props, ref) {
29
- var _useEuiTheme = useEuiTheme(),
30
- euiTheme = _useEuiTheme.euiTheme,
31
- colorMode = _useEuiTheme.colorMode,
32
- modifications = _useEuiTheme.modifications;
33
-
32
+ var theme = useEuiTheme();
34
33
  return ___EmotionJSX(Component, _extends({
35
- theme: {
36
- euiTheme: euiTheme,
37
- colorMode: colorMode,
38
- modifications: modifications
39
- },
34
+ theme: theme,
40
35
  ref: ref
41
36
  }, props));
42
37
  };
package/eui.d.ts CHANGED
@@ -1500,57 +1500,6 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
1500
1500
  danger: import("@emotion/utils").SerializedStyles;
1501
1501
  };
1502
1502
 
1503
- }
1504
- declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
1505
- import { CSSProperties } from 'react';
1506
- import { UseEuiTheme } from '@elastic/eui/src/services/theme';
1507
- /**
1508
- * Set scroll bar appearance on Chrome (and firefox).
1509
- * All parameters are optional and default to specific global settings.
1510
- */
1511
- export interface EuiScrollBarStyles {
1512
- thumbColor?: CSSProperties['backgroundColor'];
1513
- trackColor?: CSSProperties['backgroundColor'];
1514
- /**
1515
- * Defaults to `thin`. Use `auto` only for large page scrollbars
1516
- */
1517
- width?: CSSProperties['scrollbarWidth'];
1518
- /**
1519
- * Overall width (height for horizontal scrollbars)
1520
- */
1521
- size?: CSSProperties['width'];
1522
- /**
1523
- * Corner sizes are usually determined by `width` and
1524
- * are used as an inset border and therefore a smaller corner size means a larger thumb
1525
- */
1526
- corner?: CSSProperties['borderWidth'];
1527
- }
1528
- export const euiScrollBarStyles: ({ euiTheme: { colors, size } }: UseEuiTheme, { thumbColor: _thumbColor, trackColor, width, size: _size, corner: _corner, }?: EuiScrollBarStyles) => string;
1529
- export const useEuiScrollBar: (options?: EuiScrollBarStyles | undefined) => string;
1530
- /**
1531
- * 1. Focus rings shouldn't be visible on scrollable regions, but a11y requires them to be focusable.
1532
- * Browser's supporting `:focus-visible` will still show outline on keyboard focus only.
1533
- * Others like Safari, won't show anything at all.
1534
- */
1535
- interface _EuiYScroll {
1536
- height?: CSSProperties['height'];
1537
- }
1538
- export const euiYScroll: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
1539
- export const useEuiYScroll: ({ height }?: _EuiYScroll) => string;
1540
- export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
1541
- export const useEuiYScrollWithShadows: ({ height }?: _EuiYScroll) => string;
1542
- export const euiXScroll: (euiTheme: UseEuiTheme) => string;
1543
- export const useEuiXScroll: () => string;
1544
- export const euiXScrollWithShadows: (euiTheme: UseEuiTheme) => string;
1545
- export const useEuiXScrollWithShadows: () => string;
1546
- interface EuiScrollOverflowStyles {
1547
- direction?: 'y' | 'x';
1548
- mask?: boolean;
1549
- }
1550
- export const euiOverflowScroll: (euiTheme: UseEuiTheme, { direction, mask }?: EuiScrollOverflowStyles) => string;
1551
- export const useEuiOverflowScroll: (direction: EuiScrollOverflowStyles['direction'], mask?: EuiScrollOverflowStyles['mask']) => string;
1552
- export {};
1553
-
1554
1503
  }
1555
1504
  declare module '@elastic/eui/src/global_styling/functions/logicals' {
1556
1505
  /**
@@ -1635,6 +1584,17 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
1635
1584
  * @returns `string` Returns the logical CSS property version for the given `property: value` pair
1636
1585
  */
1637
1586
  export const logicalCSS: (property: LogicalProperties, value?: any) => string;
1587
+ /**
1588
+ * Some logical properties are not yet fully supported by all browsers.
1589
+ * For those cases, we should use the old property as a fallback for
1590
+ * browsers missing support, while allowing supporting browsers to use
1591
+ * the logical properties.
1592
+ *
1593
+ * Examples:
1594
+ * https://caniuse.com/?search=overflow-block
1595
+ * https://caniuse.com/mdn-css_properties_float_flow_relative_values
1596
+ */
1597
+ export const logicalCSSWithFallback: (property: LogicalProperties, value?: any) => string;
1638
1598
  /**
1639
1599
  *
1640
1600
  * @param property A string that is a valid CSS logical property
@@ -1767,6 +1727,61 @@ declare module '@elastic/eui/src/global_styling/functions' {
1767
1727
  export * from '@elastic/eui/src/global_styling/functions/size';
1768
1728
  export * from '@elastic/eui/src/global_styling/functions/typography';
1769
1729
 
1730
+ }
1731
+ declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
1732
+ import { CSSProperties } from 'react';
1733
+ import { UseEuiTheme } from '@elastic/eui/src/services/theme';
1734
+ /**
1735
+ * Set scroll bar appearance on Chrome (and firefox).
1736
+ * All parameters are optional and default to specific global settings.
1737
+ */
1738
+ export interface EuiScrollBarStyles {
1739
+ thumbColor?: CSSProperties['backgroundColor'];
1740
+ trackColor?: CSSProperties['backgroundColor'];
1741
+ /**
1742
+ * Defaults to `thin`. Use `auto` only for large page scrollbars
1743
+ */
1744
+ width?: CSSProperties['scrollbarWidth'];
1745
+ /**
1746
+ * Overall width (height for horizontal scrollbars)
1747
+ */
1748
+ size?: CSSProperties['width'];
1749
+ /**
1750
+ * Corner sizes are usually determined by `width` and
1751
+ * are used as an inset border and therefore a smaller corner size means a larger thumb
1752
+ */
1753
+ corner?: CSSProperties['borderWidth'];
1754
+ }
1755
+ export const euiScrollBarStyles: ({ euiTheme: { colors, size } }: UseEuiTheme, { thumbColor: _thumbColor, trackColor, width, size: _size, corner: _corner, }?: EuiScrollBarStyles) => string;
1756
+ export const useEuiScrollBar: (options?: EuiScrollBarStyles | undefined) => string;
1757
+ /**
1758
+ * 1. Focus rings shouldn't be visible on scrollable regions, but a11y requires them to be focusable.
1759
+ * Browser's supporting `:focus-visible` will still show outline on keyboard focus only.
1760
+ * Others like Safari, won't show anything at all.
1761
+ */
1762
+ interface _EuiYScroll {
1763
+ height?: CSSProperties['height'];
1764
+ }
1765
+ export const euiYScroll: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
1766
+ export const useEuiYScroll: ({ height }?: _EuiYScroll) => string;
1767
+ export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
1768
+ export const useEuiYScrollWithShadows: ({ height }?: _EuiYScroll) => string;
1769
+ export const euiXScroll: (euiTheme: UseEuiTheme) => string;
1770
+ export const useEuiXScroll: () => string;
1771
+ export const euiXScrollWithShadows: (euiTheme: UseEuiTheme) => string;
1772
+ export const useEuiXScrollWithShadows: () => string;
1773
+ interface EuiScrollOverflowStyles {
1774
+ direction?: 'y' | 'x';
1775
+ mask?: boolean;
1776
+ }
1777
+ export const euiOverflowScroll: (euiTheme: UseEuiTheme, { direction, mask }?: EuiScrollOverflowStyles) => string;
1778
+ export const useEuiOverflowScroll: (direction: EuiScrollOverflowStyles['direction'], mask?: EuiScrollOverflowStyles['mask']) => string;
1779
+ /**
1780
+ * For quickly applying a full-height element whether using flex or not
1781
+ */
1782
+ export const euiFullHeight: () => string;
1783
+ export {};
1784
+
1770
1785
  }
1771
1786
  declare module '@elastic/eui/src/global_styling/mixins/_padding' {
1772
1787
  import { UseEuiTheme } from '@elastic/eui/src/services/theme';
@@ -1796,7 +1811,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_states' {
1796
1811
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
1797
1812
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
1798
1813
  */
1799
- export const euiFocusRing: (euiTheme: UseEuiTheme['euiTheme'], offset?: _EuiFocusRingOffset, options?: {
1814
+ export const euiFocusRing: ({ euiTheme }: UseEuiTheme, offset?: _EuiFocusRingOffset, options?: {
1800
1815
  color?: CSSProperties['outlineColor'];
1801
1816
  } | undefined) => string;
1802
1817
  export const useEuiFocusRing: (offset?: _EuiFocusRingOffset, color?: CSSProperties['outlineColor']) => string;
@@ -2478,7 +2493,7 @@ declare module '@elastic/eui/src/components/button/button_empty/button_empty' {
2478
2493
  /**
2479
2494
  * Object of props passed to the <span/> wrapping the button's content
2480
2495
  */
2481
- contentProps?: EuiButtonContentType;
2496
+ contentProps?: CommonProps & EuiButtonContentType;
2482
2497
  } type EuiButtonEmptyPropsForAnchor = PropsForAnchor<CommonEuiButtonEmptyProps>; type EuiButtonEmptyPropsForButton = PropsForButton<CommonEuiButtonEmptyProps>;
2483
2498
  export type EuiButtonEmptyProps = ExclusiveUnion<EuiButtonEmptyPropsForAnchor, EuiButtonEmptyPropsForButton>;
2484
2499
  export const EuiButtonEmpty: FunctionComponent<EuiButtonEmptyProps>;
@@ -2918,8 +2933,8 @@ declare module '@elastic/eui/src/components/link/link.styles' {
2918
2933
  import { UseEuiTheme } from '@elastic/eui/src/services';
2919
2934
  export const euiLinkHoverCSS: () => string;
2920
2935
  export const euiLinkFocusCSS: (euiTheme: UseEuiTheme['euiTheme']) => string;
2921
- export const euiLinkCSS: (euiTheme: UseEuiTheme['euiTheme']) => string;
2922
- export const euiLinkStyles: ({ euiTheme }: UseEuiTheme) => {
2936
+ export const euiLinkCSS: (euiThemeContext: UseEuiTheme) => string;
2937
+ export const euiLinkStyles: (euiThemeContext: UseEuiTheme) => {
2923
2938
  euiLink: import("@emotion/utils").SerializedStyles;
2924
2939
  disabled: import("@emotion/utils").SerializedStyles;
2925
2940
  primary: import("@emotion/utils").SerializedStyles;
@@ -3737,7 +3752,7 @@ declare module '@elastic/eui/src/components/progress/progress' {
3737
3752
  /**
3738
3753
  * Object of props passed to the <span/> wrapping the determinate progress's label
3739
3754
  */
3740
- labelProps?: HTMLAttributes<HTMLSpanElement>;
3755
+ labelProps?: CommonProps & HTMLAttributes<HTMLSpanElement>;
3741
3756
  };
3742
3757
  export const EuiProgress: FunctionComponent<ExclusiveUnion<Determinate, Indeterminate>>;
3743
3758
  export {};
@@ -12289,12 +12304,13 @@ declare module '@elastic/eui/src/components/date_picker/super_date_picker/pretty
12289
12304
  declare module '@elastic/eui/src/components/date_picker/super_date_picker/date_popover/date_popover_button' {
12290
12305
  import { FunctionComponent, ButtonHTMLAttributes, MouseEventHandler } from 'react';
12291
12306
  import { LocaleSpecifier } from 'moment';
12307
+ import { CommonProps } from '@elastic/eui/src/components/common';
12292
12308
  import { EuiPopoverProps } from '@elastic/eui/src/components/popover';
12293
12309
  import { TimeOptions } from '@elastic/eui/src/components/date_picker/super_date_picker/time_options';
12294
12310
  import { EuiDatePopoverContentProps } from '@elastic/eui/src/components/date_picker/super_date_picker/date_popover/date_popover_content';
12295
12311
  export interface EuiDatePopoverButtonProps {
12296
12312
  className?: string;
12297
- buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
12313
+ buttonProps?: CommonProps & ButtonHTMLAttributes<HTMLButtonElement>;
12298
12314
  dateFormat: string;
12299
12315
  isDisabled?: boolean;
12300
12316
  isInvalid?: boolean;
@@ -13220,12 +13236,12 @@ declare module '@elastic/eui/src/components/expression/expression' {
13220
13236
  * First part of the expression
13221
13237
  */
13222
13238
  description: ReactNode;
13223
- descriptionProps?: HTMLAttributes<HTMLSpanElement>;
13239
+ descriptionProps?: CommonProps & HTMLAttributes<HTMLSpanElement>;
13224
13240
  /**
13225
13241
  * Second part of the expression
13226
13242
  */
13227
13243
  value?: ReactNode;
13228
- valueProps?: HTMLAttributes<HTMLSpanElement>;
13244
+ valueProps?: CommonProps & HTMLAttributes<HTMLSpanElement>;
13229
13245
  /**
13230
13246
  * Color of the `description`
13231
13247
  */
@@ -13385,7 +13401,7 @@ declare module '@elastic/eui/src/components/button/button_display/_button_displa
13385
13401
  /**
13386
13402
  * Object of props passed to the <span/> wrapping the button's content
13387
13403
  */
13388
- contentProps?: EuiButtonDisplayContentType;
13404
+ contentProps?: CommonProps & EuiButtonDisplayContentType;
13389
13405
  style?: CSSProperties;
13390
13406
  }
13391
13407
  export type EuiButtonDisplayPropsForAnchor = PropsForAnchor<EuiButtonDisplayCommonProps, {
@@ -13814,7 +13830,7 @@ declare module '@elastic/eui/src/components/image/image_types' {
13814
13830
  /**
13815
13831
  * Props to add to the wrapping figure element
13816
13832
  */
13817
- wrapperProps?: HTMLAttributes<HTMLDivElement>;
13833
+ wrapperProps?: CommonProps & HTMLAttributes<HTMLDivElement>;
13818
13834
  };
13819
13835
  export type EuiImageWrapperProps = Pick<EuiImageProps, 'alt' | 'caption' | 'float' | 'margin' | 'hasShadow' | 'wrapperProps' | 'fullScreenIconColor' | 'allowFullScreen'> & {
13820
13836
  isFullWidth: boolean;
@@ -14987,8 +15003,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content' {
14987
15003
  role?: HTMLAttributes['role'] | null;
14988
15004
  };
14989
15005
  /**
14990
- * **DEPRECATED**
14991
- * Use EuiPageSection instead
15006
+ * @deprecated Use EuiPageSection instead
14992
15007
  */
14993
15008
  export const EuiPageContent_Deprecated: FunctionComponent<EuiPageContentProps>;
14994
15009
 
@@ -15006,8 +15021,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_body'
15006
15021
  paddingSize?: typeof PADDING_SIZES[number];
15007
15022
  }
15008
15023
  /**
15009
- * **DEPRECATED**
15010
- * Use EuiPageSection instead
15024
+ * @deprecated Use EuiPageSection instead
15011
15025
  */
15012
15026
  export const EuiPageContentBody_Deprecated: FunctionComponent<EuiPageContentBodyProps>;
15013
15027
 
@@ -15023,8 +15037,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_heade
15023
15037
  responsive?: boolean;
15024
15038
  }
15025
15039
  /**
15026
- * **DEPRECATED**
15027
- * Use EuiPageHeader instead
15040
+ * @deprecated Use EuiPageHeader instead
15028
15041
  */
15029
15042
  export const EuiPageContentHeader_Deprecated: FunctionComponent<EuiPageContentHeaderProps>;
15030
15043
 
@@ -15035,8 +15048,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_heade
15035
15048
  export interface EuiPageContentHeaderSectionProps extends CommonProps, HTMLAttributes<HTMLDivElement> {
15036
15049
  }
15037
15050
  /**
15038
- * **DEPRECATED**
15039
- * Use EuiPageHeader instead
15051
+ * @deprecated Use EuiPageHeader instead
15040
15052
  */
15041
15053
  export const EuiPageContentHeaderSection_Deprecated: FunctionComponent<EuiPageContentHeaderSectionProps>;
15042
15054
 
@@ -15246,7 +15258,7 @@ declare module '@elastic/eui/src/components/page/page_section/page_section.style
15246
15258
 
15247
15259
  }
15248
15260
  declare module '@elastic/eui/src/components/page/page_section/page_section' {
15249
- import { FunctionComponent, HTMLAttributes } from 'react';
15261
+ import { FunctionComponent, ComponentType, HTMLAttributes } from 'react';
15250
15262
  import { CommonProps } from '@elastic/eui/src/components/common';
15251
15263
  import { _EuiPageRestrictWidth } from '@elastic/eui/src/components/page/_restrict_width';
15252
15264
  import { _EuiPageBottomBorder } from '@elastic/eui/src/components/page/_bottom_border';
@@ -15273,8 +15285,12 @@ declare module '@elastic/eui/src/components/page/page_section/page_section' {
15273
15285
  /**
15274
15286
  * Passed down to the div wrapper of the section contents
15275
15287
  */
15276
- contentProps?: HTMLAttributes<HTMLDivElement>;
15277
- } & Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
15288
+ contentProps?: CommonProps & HTMLAttributes<HTMLDivElement>;
15289
+ /**
15290
+ * Sets which HTML element to render.
15291
+ */
15292
+ component?: keyof JSX.IntrinsicElements | ComponentType;
15293
+ } & Omit<HTMLAttributes<Element>, 'color'>;
15278
15294
  export const EuiPageSection: FunctionComponent<EuiPageSectionProps>;
15279
15295
 
15280
15296
  }
@@ -15298,8 +15314,7 @@ declare module '@elastic/eui/src/components/page/page_side_bar/page_side_bar' {
15298
15314
  paddingSize?: typeof PADDING_SIZES[number];
15299
15315
  }
15300
15316
  /**
15301
- * **DEPRECATED**
15302
- * Use the new EuiPageSidebar instead
15317
+ * @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
15303
15318
  */
15304
15319
  export const EuiPageSideBar_Deprecated: FunctionComponent<EuiPageSideBarProps>;
15305
15320
 
@@ -15427,7 +15442,9 @@ declare module '@elastic/eui/src/components/page/page_template' {
15427
15442
  /**
15428
15443
  * This component has been deprecated in favor of the new
15429
15444
  * namespaced version. You can still import this component
15430
- * for a period of time by importing `as EuiPageTemplate`.
15445
+ * until August 2023 by importing `as EuiPageTemplate`.
15446
+ *
15447
+ * @deprecated use EuiPageTemplate from page_template/page_template instead
15431
15448
  */
15432
15449
  export const EuiPageTemplate_Deprecated: FunctionComponent<EuiPageTemplateProps_Deprecated>;
15433
15450
 
@@ -15619,6 +15636,8 @@ declare module '@elastic/eui/src/components/page_template' {
15619
15636
  }
15620
15637
  declare module '@elastic/eui/src/global_styling/utility/utility' {
15621
15638
 
15639
+ import { UseEuiTheme } from '@elastic/eui/src/services/theme/hooks';
15640
+ export const globalStyles: (euiThemeContext: UseEuiTheme) => import("@emotion/utils").SerializedStyles;
15622
15641
  export const EuiUtilityClasses: () => JSX.Element;
15623
15642
 
15624
15643
  }
@@ -15648,7 +15667,7 @@ declare module '@elastic/eui/src/components/provider/cache/cache_provider' {
15648
15667
  import { PropsWithChildren } from 'react';
15649
15668
  import { EmotionCache } from '@emotion/cache';
15650
15669
  export interface EuiCacheProviderProps {
15651
- cache?: EmotionCache;
15670
+ cache?: false | EmotionCache;
15652
15671
  }
15653
15672
  export const EuiCacheProvider: ({ cache, children, }: PropsWithChildren<EuiCacheProviderProps>) => JSX.Element;
15654
15673
 
@@ -17304,7 +17323,7 @@ declare module '@elastic/eui/src/components/side_nav/side_nav' {
17304
17323
  /**
17305
17324
  * Adds a couple extra #EuiSideNavHeading props and extends the props of EuiTitle that wraps the `heading`
17306
17325
  */
17307
- headingProps?: EuiSideNavHeadingProps;
17326
+ headingProps?: CommonProps & EuiSideNavHeadingProps;
17308
17327
  /**
17309
17328
  * When called, toggles visibility of the navigation menu at mobile responsive widths. The callback should set the `isOpenOnMobile` prop to actually toggle navigation visibility.
17310
17329
  */
@@ -18506,7 +18525,7 @@ declare module '@elastic/eui/src/components/basic_table/collapsed_item_actions'
18506
18525
  togglePopover: () => void;
18507
18526
  closePopover: () => void;
18508
18527
  onPopoverBlur: () => void;
18509
- registerPopoverDiv: (popoverDiv: HTMLDivElement) => void;
18528
+ registerPopoverDiv: (popoverDiv: HTMLDivElement | null) => void;
18510
18529
  componentWillUnmount(): void;
18511
18530
  onClickItem: (onClickAction: (() => void) | undefined) => void;
18512
18531
  render(): JSX.Element;
@@ -19293,7 +19312,7 @@ declare module '@elastic/eui/src/components/resizable_container/resizable_panel'
19293
19312
  /**
19294
19313
  * Props to add to the wrapping `.euiResizablePanel` div
19295
19314
  */
19296
- wrapperProps?: HTMLAttributes<HTMLDivElement>;
19315
+ wrapperProps?: CommonProps & HTMLAttributes<HTMLDivElement>;
19297
19316
  /**
19298
19317
  * Padding to add directly to the wrapping `.euiResizablePanel` div
19299
19318
  * Gives space around the actual panel.
package/i18ntokens.json CHANGED
@@ -149,11 +149,11 @@
149
149
  "highlighting": "string",
150
150
  "loc": {
151
151
  "start": {
152
- "line": 169,
152
+ "line": 170,
153
153
  "column": 6
154
154
  },
155
155
  "end": {
156
- "line": 169,
156
+ "line": 170,
157
157
  "column": 80
158
158
  }
159
159
  },
@@ -165,11 +165,11 @@
165
165
  "highlighting": "string",
166
166
  "loc": {
167
167
  "start": {
168
- "line": 186,
168
+ "line": 187,
169
169
  "column": 6
170
170
  },
171
171
  "end": {
172
- "line": 186,
172
+ "line": 187,
173
173
  "column": 80
174
174
  }
175
175
  },
@@ -1941,11 +1941,11 @@
1941
1941
  "highlighting": "string",
1942
1942
  "loc": {
1943
1943
  "start": {
1944
- "line": 92,
1944
+ "line": 93,
1945
1945
  "column": 23
1946
1946
  },
1947
1947
  "end": {
1948
- "line": 96,
1948
+ "line": 97,
1949
1949
  "column": 3
1950
1950
  }
1951
1951
  },
@@ -1957,11 +1957,11 @@
1957
1957
  "highlighting": "string",
1958
1958
  "loc": {
1959
1959
  "start": {
1960
- "line": 97,
1960
+ "line": 98,
1961
1961
  "column": 24
1962
1962
  },
1963
1963
  "end": {
1964
- "line": 101,
1964
+ "line": 102,
1965
1965
  "column": 3
1966
1966
  }
1967
1967
  },
@@ -108,8 +108,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
108
108
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
109
109
  if (!_this.popoverDiv) {
110
110
  _this.popoverDiv = popoverDiv;
111
-
112
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
111
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
113
112
  }
114
113
  });
115
114