@elastic/eui 66.0.0 → 67.0.0

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 (196) hide show
  1. package/dist/eui_theme_dark.css +0 -247
  2. package/dist/eui_theme_dark.json +0 -6
  3. package/dist/eui_theme_dark.json.d.ts +0 -6
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -247
  6. package/dist/eui_theme_light.json +0 -6
  7. package/dist/eui_theme_light.json.d.ts +0 -6
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/button/button_display/_button_display.js +10 -1
  10. package/es/components/button/button_empty/button_empty.js +10 -1
  11. package/es/components/collapsible_nav/collapsible_nav.js +0 -5
  12. package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  13. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
  14. package/es/components/expression/expression.js +12 -2
  15. package/es/components/header/header_links/header_link.js +10 -1
  16. package/es/components/image/image.js +6 -1
  17. package/es/components/image/image_fullscreen_wrapper.js +2 -3
  18. package/es/components/notification/notification_event.js +24 -5
  19. package/es/components/overlay_mask/overlay_mask.js +27 -65
  20. package/es/components/overlay_mask/overlay_mask.styles.js +28 -0
  21. package/es/components/page/page_content/page_content.js +1 -2
  22. package/es/components/page/page_content/page_content_body.js +1 -2
  23. package/es/components/page/page_content/page_content_header.js +1 -2
  24. package/es/components/page/page_content/page_content_header_section.js +1 -2
  25. package/es/components/page/page_section/page_section.js +15 -3
  26. package/es/components/page/page_side_bar/page_side_bar.js +1 -2
  27. package/es/components/page/page_template.js +3 -1
  28. package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  29. package/es/components/page_template/page_template.js +18 -2
  30. package/es/components/pagination/pagination.js +17 -4
  31. package/es/components/pagination/pagination.styles.js +31 -0
  32. package/es/components/pagination/pagination_button.js +17 -5
  33. package/es/components/pagination/pagination_button.styles.js +30 -0
  34. package/es/components/pagination/pagination_button_arrow.js +5 -0
  35. package/es/components/progress/progress.js +6 -1
  36. package/es/components/provider/cache/cache_provider.js +3 -9
  37. package/es/components/provider/provider.js +25 -2
  38. package/es/components/resizable_container/resizable_panel.js +6 -1
  39. package/es/components/side_nav/side_nav.js +5 -0
  40. package/es/components/suggest/suggest.js +10 -1
  41. package/es/components/tool_tip/tool_tip.js +42 -66
  42. package/es/components/tool_tip/tool_tip.styles.js +107 -0
  43. package/es/components/tool_tip/tool_tip_anchor.js +73 -0
  44. package/es/components/tool_tip/tool_tip_arrow.js +20 -0
  45. package/es/components/tool_tip/tool_tip_popover.js +48 -101
  46. package/es/global_styling/index.js +2 -1
  47. package/es/global_styling/utility/animations.js +13 -0
  48. package/eui.d.ts +128 -51
  49. package/i18ntokens.json +54 -54
  50. package/lib/components/button/button_display/_button_display.js +10 -1
  51. package/lib/components/button/button_empty/button_empty.js +10 -1
  52. package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
  53. package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  54. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  55. package/lib/components/expression/expression.js +12 -2
  56. package/lib/components/header/header_links/header_link.js +10 -1
  57. package/lib/components/image/image.js +6 -1
  58. package/lib/components/image/image_fullscreen_wrapper.js +2 -3
  59. package/lib/components/notification/notification_event.js +27 -8
  60. package/lib/components/overlay_mask/overlay_mask.js +27 -65
  61. package/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
  62. package/lib/components/page/page_content/page_content.js +1 -2
  63. package/lib/components/page/page_content/page_content_body.js +1 -2
  64. package/lib/components/page/page_content/page_content_header.js +1 -2
  65. package/lib/components/page/page_content/page_content_header_section.js +1 -2
  66. package/lib/components/page/page_section/page_section.js +15 -3
  67. package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  68. package/lib/components/page/page_template.js +3 -1
  69. package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  70. package/lib/components/page_template/page_template.js +18 -2
  71. package/lib/components/pagination/pagination.js +18 -3
  72. package/lib/components/pagination/pagination.styles.js +34 -0
  73. package/lib/components/pagination/pagination_button.js +9 -4
  74. package/lib/components/pagination/pagination_button.styles.js +45 -0
  75. package/lib/components/pagination/pagination_button_arrow.js +7 -0
  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/suggest/suggest.js +10 -1
  82. package/lib/components/tool_tip/tool_tip.js +43 -64
  83. package/lib/components/tool_tip/tool_tip.styles.js +123 -0
  84. package/lib/components/tool_tip/tool_tip_anchor.js +87 -0
  85. package/lib/components/tool_tip/tool_tip_arrow.js +28 -0
  86. package/lib/components/tool_tip/tool_tip_popover.js +49 -98
  87. package/lib/global_styling/index.js +13 -0
  88. package/lib/global_styling/utility/animations.js +15 -0
  89. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
  90. package/optimize/es/components/image/image_fullscreen_wrapper.js +2 -3
  91. package/optimize/es/components/notification/notification_event.js +10 -4
  92. package/optimize/es/components/overlay_mask/overlay_mask.js +27 -60
  93. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +28 -0
  94. package/optimize/es/components/page/page_content/page_content.js +1 -2
  95. package/optimize/es/components/page/page_content/page_content_body.js +1 -2
  96. package/optimize/es/components/page/page_content/page_content_header.js +1 -2
  97. package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
  98. package/optimize/es/components/page/page_section/page_section.js +4 -2
  99. package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
  100. package/optimize/es/components/page/page_template.js +3 -1
  101. package/optimize/es/components/pagination/pagination.js +17 -4
  102. package/optimize/es/components/pagination/pagination.styles.js +31 -0
  103. package/optimize/es/components/pagination/pagination_button.js +7 -4
  104. package/optimize/es/components/pagination/pagination_button.styles.js +30 -0
  105. package/optimize/es/components/pagination/pagination_button_arrow.js +5 -0
  106. package/optimize/es/components/provider/cache/cache_provider.js +3 -9
  107. package/optimize/es/components/provider/provider.js +25 -2
  108. package/optimize/es/components/suggest/suggest.js +4 -1
  109. package/optimize/es/components/tool_tip/tool_tip.js +42 -66
  110. package/optimize/es/components/tool_tip/tool_tip.styles.js +107 -0
  111. package/optimize/es/components/tool_tip/tool_tip_anchor.js +60 -0
  112. package/optimize/es/components/tool_tip/tool_tip_arrow.js +20 -0
  113. package/optimize/es/components/tool_tip/tool_tip_popover.js +46 -87
  114. package/optimize/es/global_styling/index.js +2 -1
  115. package/optimize/es/global_styling/utility/animations.js +13 -0
  116. package/optimize/lib/components/image/image_fullscreen_wrapper.js +2 -3
  117. package/optimize/lib/components/notification/notification_event.js +11 -11
  118. package/optimize/lib/components/overlay_mask/overlay_mask.js +27 -59
  119. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
  120. package/optimize/lib/components/page/page_content/page_content.js +1 -2
  121. package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
  122. package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
  123. package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
  124. package/optimize/lib/components/page/page_section/page_section.js +4 -2
  125. package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
  126. package/optimize/lib/components/page/page_template.js +3 -1
  127. package/optimize/lib/components/pagination/pagination.js +18 -3
  128. package/optimize/lib/components/pagination/pagination.styles.js +34 -0
  129. package/optimize/lib/components/pagination/pagination_button.js +9 -4
  130. package/optimize/lib/components/pagination/pagination_button.styles.js +45 -0
  131. package/optimize/lib/components/pagination/pagination_button_arrow.js +7 -0
  132. package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
  133. package/optimize/lib/components/provider/provider.js +31 -6
  134. package/optimize/lib/components/suggest/suggest.js +4 -1
  135. package/optimize/lib/components/tool_tip/tool_tip.js +42 -64
  136. package/optimize/lib/components/tool_tip/tool_tip.styles.js +125 -0
  137. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +75 -0
  138. package/optimize/lib/components/tool_tip/tool_tip_arrow.js +35 -0
  139. package/optimize/lib/components/tool_tip/tool_tip_popover.js +47 -88
  140. package/optimize/lib/global_styling/index.js +13 -0
  141. package/optimize/lib/global_styling/utility/animations.js +17 -0
  142. package/package.json +2 -2
  143. package/src/components/index.scss +0 -4
  144. package/src/global_styling/mixins/_tool_tip.scss +3 -6
  145. package/src/themes/amsterdam/overrides/_index.scss +0 -2
  146. package/test-env/components/button/button_display/_button_display.js +10 -1
  147. package/test-env/components/button/button_empty/button_empty.js +10 -1
  148. package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
  149. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
  150. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
  151. package/test-env/components/expression/expression.js +12 -2
  152. package/test-env/components/header/header_links/header_link.js +10 -1
  153. package/test-env/components/image/image.js +6 -1
  154. package/test-env/components/image/image_fullscreen_wrapper.js +2 -3
  155. package/test-env/components/notification/notification_event.js +24 -15
  156. package/test-env/components/overlay_mask/overlay_mask.js +27 -64
  157. package/test-env/components/overlay_mask/overlay_mask.styles.js +34 -0
  158. package/test-env/components/page/page_content/page_content.js +1 -2
  159. package/test-env/components/page/page_content/page_content_body.js +1 -2
  160. package/test-env/components/page/page_content/page_content_header.js +1 -2
  161. package/test-env/components/page/page_content/page_content_header_section.js +1 -2
  162. package/test-env/components/page/page_section/page_section.js +15 -3
  163. package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
  164. package/test-env/components/page/page_template.js +3 -1
  165. package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
  166. package/test-env/components/page_template/page_template.js +18 -2
  167. package/test-env/components/pagination/pagination.js +18 -3
  168. package/test-env/components/pagination/pagination.styles.js +34 -0
  169. package/test-env/components/pagination/pagination_button.js +9 -4
  170. package/test-env/components/pagination/pagination_button.styles.js +45 -0
  171. package/test-env/components/pagination/pagination_button_arrow.js +7 -0
  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/suggest/suggest.js +10 -1
  178. package/test-env/components/tool_tip/tool_tip.js +42 -64
  179. package/test-env/components/tool_tip/tool_tip.styles.js +125 -0
  180. package/test-env/components/tool_tip/tool_tip_anchor.js +84 -0
  181. package/test-env/components/tool_tip/tool_tip_arrow.js +35 -0
  182. package/test-env/components/tool_tip/tool_tip_popover.js +49 -89
  183. package/test-env/global_styling/index.js +13 -0
  184. package/test-env/global_styling/utility/animations.js +17 -0
  185. package/src/components/call_out/_index.scss +0 -3
  186. package/src/components/call_out/_mixins.scss +0 -23
  187. package/src/components/call_out/_variables.scss +0 -7
  188. package/src/components/overlay_mask/_index.scss +0 -1
  189. package/src/components/overlay_mask/_overlay_mask.scss +0 -33
  190. package/src/components/pagination/_index.scss +0 -2
  191. package/src/components/pagination/_pagination.scss +0 -30
  192. package/src/components/pagination/_pagination_button.scss +0 -37
  193. package/src/components/tool_tip/_index.scss +0 -1
  194. package/src/components/tool_tip/_tool_tip.scss +0 -121
  195. package/src/themes/amsterdam/overrides/_overlay_mask.scss +0 -3
  196. package/src/themes/amsterdam/overrides/_tooltip.scss +0 -7
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiOverlayMaskStyles = exports.euiOverlayMaskBodyStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ var _services = require("../../services");
13
+
14
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
15
+
16
+ var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
17
+ var euiTheme = _ref.euiTheme;
18
+ return {
19
+ euiOverlayMask: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " display:flex;align-items:center;justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', '10vh'), ";animation:", _global_styling.euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", (0, _services.transparentize)(euiTheme.colors.ink, 0.5), ";};label:euiOverlayMask;"),
20
+ aboveHeader: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{z-index:", euiTheme.levels.mask, ";};label:aboveHeader;"),
21
+ belowHeader: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{z-index:", euiTheme.levels.maskBelowHeader, ";", (0, _global_styling.logicalCSS)('top', "".concat(euiTheme.base * 3, "px")), ";};label:belowHeader;")
22
+ };
23
+ };
24
+
25
+ exports.euiOverlayMaskStyles = euiOverlayMaskStyles;
26
+ var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
27
+ name: "131160-euiOverlayMaskBodyStyles",
28
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
29
+ } : {
30
+ name: "131160-euiOverlayMaskBodyStyles",
31
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
32
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
+ };
34
+ exports.euiOverlayMaskBodyStyles = euiOverlayMaskBodyStyles;
@@ -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,
@@ -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
 
@@ -31,6 +31,10 @@ var _services = require("../../services");
31
31
 
32
32
  var _accessibility = require("../accessibility");
33
33
 
34
+ var _pagination = require("./pagination.styles");
35
+
36
+ var _pagination_button2 = require("./pagination_button.styles");
37
+
34
38
  var _react2 = require("@emotion/react");
35
39
 
36
40
  var _excluded = ["className", "pageCount", "activePage", "onPageClick", "compressed", "aria-controls", "responsive"];
@@ -55,7 +59,13 @@ var EuiPagination = function EuiPagination(_ref) {
55
59
  _ref$responsive = _ref.responsive,
56
60
  responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
57
61
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
58
- var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive); // Force to `compressed` version if specified or within the responsive breakpoints
62
+ var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive);
63
+ var euiTheme = (0, _services.useEuiTheme)();
64
+ var paginationStyles = (0, _pagination.euiPaginationStyles)(euiTheme);
65
+
66
+ var _euiPaginationButtonS = (0, _pagination_button2.euiPaginationButtonStyles)(euiTheme),
67
+ isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
68
+
59
69
 
60
70
  var compressed = _compressed || isResponsive;
61
71
 
@@ -119,6 +129,7 @@ var EuiPagination = function EuiPagination(_ref) {
119
129
  if (compressed) {
120
130
  centerPageCount = (0, _react2.jsx)(_text.EuiText, {
121
131
  size: "s",
132
+ css: paginationStyles.euiPagination__compressedText,
122
133
  className: "euiPagination__compressedText"
123
134
  }, (0, _react2.jsx)(_i18n.EuiI18n, {
124
135
  token: "euiPagination.pageOfTotalCompressed",
@@ -159,7 +170,8 @@ var EuiPagination = function EuiPagination(_ref) {
159
170
  }, function (firstRangeAriaLabel) {
160
171
  return (0, _react2.jsx)("li", {
161
172
  "aria-label": firstRangeAriaLabel,
162
- className: "euiPaginationButton-isPlaceholder euiPagination__item"
173
+ className: "euiPagination__item",
174
+ css: isPlaceholder
163
175
  }, "\u2026");
164
176
  }));
165
177
  } else if (firstPageInRange === 2) {
@@ -190,7 +202,8 @@ var EuiPagination = function EuiPagination(_ref) {
190
202
  }, function (lastRangeAriaLabel) {
191
203
  return (0, _react2.jsx)("li", {
192
204
  "aria-label": lastRangeAriaLabel,
193
- className: "euiPaginationButton-isPlaceholder euiPagination__item"
205
+ className: "euiPagination__item",
206
+ css: isPlaceholder
194
207
  }, "\u2026");
195
208
  }));
196
209
  }
@@ -210,6 +223,7 @@ var EuiPagination = function EuiPagination(_ref) {
210
223
  });
211
224
 
212
225
  centerPageCount = (0, _react2.jsx)("ul", (0, _extends2.default)({}, accessibleName, {
226
+ css: paginationStyles.euiPagination__list,
213
227
  className: "euiPagination__list"
214
228
  }), firstPageButtons, selectablePages, lastPageButtons);
215
229
  }
@@ -234,6 +248,7 @@ var EuiPagination = function EuiPagination(_ref) {
234
248
 
235
249
  var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
236
250
  return (0, _react2.jsx)("nav", (0, _extends2.default)({
251
+ css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
237
252
  className: classes
238
253
  }, rest), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", {
239
254
  "aria-atomic": "true",
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiPaginationStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
13
+
14
+ var _ref = process.env.NODE_ENV === "production" ? {
15
+ name: "1dbd2rc-euiPagination__list",
16
+ styles: "display:flex;align-items:baseline;label:euiPagination__list;"
17
+ } : {
18
+ name: "1dbd2rc-euiPagination__list",
19
+ styles: "display:flex;align-items:baseline;label:euiPagination__list;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
22
+
23
+ var euiPaginationStyles = function euiPaginationStyles(euiThemeContext) {
24
+ var euiTheme = euiThemeContext.euiTheme;
25
+ return {
26
+ // Base
27
+ euiPagination: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), ";display:flex;align-items:center;", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-x', 'auto'), ";;label:euiPagination;"),
28
+ // Elements
29
+ euiPagination__compressedText: /*#__PURE__*/(0, _react.css)("display:inline-flex;align-items:center;line-height:1!important;>span{", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.s), ";font-weight:", euiTheme.font.weight.semiBold, ";&:first-of-type{color:", euiTheme.colors.primaryText, ";}};label:euiPagination__compressedText;"),
30
+ euiPagination__list: _ref
31
+ };
32
+ };
33
+
34
+ exports.euiPaginationStyles = euiPaginationStyles;
@@ -23,6 +23,10 @@ var _button = require("../button");
23
23
 
24
24
  var _i18n = require("../i18n");
25
25
 
26
+ var _services = require("../../services");
27
+
28
+ var _pagination_button = require("./pagination_button.styles");
29
+
26
30
  var _react2 = require("@emotion/react");
27
31
 
28
32
  var _excluded = ["className", "isActive", "isPlaceholder", "pageIndex", "totalPages"];
@@ -38,12 +42,13 @@ var EuiPaginationButton = function EuiPaginationButton(_ref) {
38
42
  pageIndex = _ref.pageIndex,
39
43
  totalPages = _ref.totalPages,
40
44
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
41
- var classes = (0, _classnames.default)('euiPaginationButton', className, {
42
- 'euiPaginationButton-isActive': isActive,
43
- 'euiPaginationButton-isPlaceholder': isPlaceholder
44
- });
45
+ var euiTheme = (0, _services.useEuiTheme)();
46
+ var styles = (0, _pagination_button.euiPaginationButtonStyles)(euiTheme);
47
+ var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
48
+ var classes = (0, _classnames.default)('euiPaginationButton', className);
45
49
 
46
50
  var props = _objectSpread(_objectSpread(_objectSpread({
51
+ css: paginationButtonCss,
47
52
  className: classes,
48
53
  size: 's',
49
54
  color: 'text',
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiPaginationButtonStyles = exports.euiPaginationButtonArrowStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
13
+
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
+ var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
22
+ var euiTheme = euiThemeContext.euiTheme;
23
+ var fontSizeS = (0, _global_styling.euiFontSize)(euiThemeContext, 's');
24
+ var halfSizeM = parseInt(euiTheme.size.m.replace('px', '')) / 2;
25
+ var disabled = (0, _mixins.euiButtonEmptyColor)(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
26
+
27
+ return {
28
+ // Base
29
+ euiPaginationButton: /*#__PURE__*/(0, _react.css)("&&{", fontSizeS, ";padding:0;", (0, _global_styling.logicalTextAlignCSS)('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
30
+ // States
31
+ isActive: /*#__PURE__*/(0, _react.css)("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
32
+ isPlaceholder: /*#__PURE__*/(0, _react.css)("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", (0, _global_styling.logicalCSS)('padding-top', "".concat(halfSizeM, "px")), ";", (0, _global_styling.logicalCSS)('padding-bottom', 0), ";", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), ";", (0, _global_styling.logicalCSS)('height', euiTheme.size.l), ";};label:isPlaceholder;")
33
+ };
34
+ };
35
+
36
+ exports.euiPaginationButtonStyles = euiPaginationButtonStyles;
37
+
38
+ var euiPaginationButtonArrowStyles = function euiPaginationButtonArrowStyles(_ref) {
39
+ var euiTheme = _ref.euiTheme;
40
+ return {
41
+ euiPaginationArrowButton: /*#__PURE__*/(0, _react.css)("outline-offset:-", euiTheme.focus.width, ";;label:euiPaginationArrowButton;")
42
+ };
43
+ };
44
+
45
+ exports.euiPaginationButtonArrowStyles = euiPaginationButtonArrowStyles;
@@ -21,6 +21,10 @@ var _common = require("../common");
21
21
 
22
22
  var _i18n = require("../i18n");
23
23
 
24
+ var _services = require("../../services");
25
+
26
+ var _pagination_button = require("./pagination_button.styles");
27
+
24
28
  var _react2 = require("@emotion/react");
25
29
 
26
30
  /*
@@ -45,6 +49,8 @@ var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
45
49
  disabled = _ref.disabled,
46
50
  ariaControls = _ref.ariaControls,
47
51
  onClick = _ref.onClick;
52
+ var euiTheme = (0, _services.useEuiTheme)();
53
+ var styles = (0, _pagination_button.euiPaginationButtonArrowStyles)(euiTheme);
48
54
  var labels = {
49
55
  first: (0, _i18n.useEuiI18n)('euiPaginationButtonArrow.firstPage', 'First page'),
50
56
  previous: (0, _i18n.useEuiI18n)('euiPaginationButtonArrow.previousPage', 'Previous page'),
@@ -59,6 +65,7 @@ var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
59
65
  }
60
66
 
61
67
  return (0, _react2.jsx)(_button_icon.EuiButtonIcon, (0, _extends2.default)({
68
+ css: styles.euiPaginationArrowButton,
62
69
  className: (0, _classnames.default)('euiPaginationArrowButton', className),
63
70
  color: "text",
64
71
  "aria-label": labels[type],
@@ -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`
@@ -39,7 +39,7 @@ var _suggest_item = require("./suggest_item");
39
39
 
40
40
  var _react2 = require("@emotion/react");
41
41
 
42
- var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isVirtualized", "fullWidth", "maxHeight"];
42
+ var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isPreFiltered", "isVirtualized", "fullWidth", "maxHeight"];
43
43
 
44
44
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
45
 
@@ -81,6 +81,8 @@ var EuiSuggest = function EuiSuggest(_ref) {
81
81
  id = _ref.id,
82
82
  ariaLabel = _ref['aria-label'],
83
83
  labelId = _ref['aria-labelledby'],
84
+ _ref$isPreFiltered = _ref.isPreFiltered,
85
+ isPreFiltered = _ref$isPreFiltered === void 0 ? false : _ref$isPreFiltered,
84
86
  _ref$isVirtualized = _ref.isVirtualized,
85
87
  isVirtualized = _ref$isVirtualized === void 0 ? false : _ref$isVirtualized,
86
88
  _ref$fullWidth = _ref.fullWidth,
@@ -245,6 +247,7 @@ var EuiSuggest = function EuiSuggest(_ref) {
245
247
  isVirtualized: isVirtualized
246
248
  },
247
249
  searchable: true,
250
+ isPreFiltered: isPreFiltered,
248
251
  searchProps: _objectSpread({
249
252
  id: id,
250
253
  append: appendArray.length ? appendArray : undefined,
@@ -372,5 +375,11 @@ EuiSuggest.propTypes = {
372
375
  * Default is `60vh`
373
376
  */
374
377
  maxHeight: _propTypes.default.any,
378
+
379
+ /**
380
+ * Control whether or not options get filtered internally or if consumer will filter.
381
+ * Default `false`
382
+ */
383
+ isPreFiltered: _propTypes.default.bool,
375
384
  "aria-labelledby": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string.isRequired])
376
385
  };