@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
@@ -13,9 +13,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
+ var _services = require("../../services");
17
+
18
+ var _tool_tip = require("./tool_tip.styles");
19
+
16
20
  var _react2 = require("@emotion/react");
17
21
 
18
- var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef"];
22
+ var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef", "calculatedPosition"];
19
23
 
20
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
25
 
@@ -29,107 +33,53 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
29
33
 
30
34
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
31
35
 
32
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
33
-
34
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
35
-
36
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
37
-
38
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
39
-
40
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
-
42
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
43
-
44
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
45
-
46
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
47
-
48
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
49
-
50
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
51
-
52
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
53
-
54
- var EuiToolTipPopover = /*#__PURE__*/function (_Component) {
55
- _inherits(EuiToolTipPopover, _Component);
56
-
57
- var _super = _createSuper(EuiToolTipPopover);
58
-
59
- function EuiToolTipPopover() {
60
- var _this;
61
-
62
- _classCallCheck(this, EuiToolTipPopover);
63
-
64
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
65
- args[_key] = arguments[_key];
66
- }
67
-
68
- _this = _super.call.apply(_super, [this].concat(args));
69
-
70
- _defineProperty(_assertThisInitialized(_this), "popover", void 0);
71
-
72
- _defineProperty(_assertThisInitialized(_this), "updateDimensions", function () {
73
- requestAnimationFrame(function () {
74
- // Because of this delay, sometimes `positionToolTip` becomes unavailable.
75
- if (_this.popover) {
76
- _this.props.positionToolTip();
77
- }
78
- });
79
- });
80
-
81
- _defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
82
- _this.popover = ref;
83
-
84
- if (_this.props.popoverRef) {
85
- _this.props.popoverRef(ref);
36
+ var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
37
+ var children = _ref.children,
38
+ title = _ref.title,
39
+ className = _ref.className,
40
+ positionToolTip = _ref.positionToolTip,
41
+ popoverRef = _ref.popoverRef,
42
+ calculatedPosition = _ref.calculatedPosition,
43
+ rest = _objectWithoutProperties(_ref, _excluded);
44
+
45
+ var popover = (0, _react.useRef)();
46
+ var euiTheme = (0, _services.useEuiTheme)();
47
+ var toolTipCss = (0, _tool_tip.euiToolTipStyles)(euiTheme);
48
+ var popoverStyles = (0, _tool_tip.euiToolTipPopoverStyles)(euiTheme);
49
+ var titleCss = [popoverStyles.euiToolTip__title];
50
+ var updateDimensions = (0, _react.useCallback)(function () {
51
+ requestAnimationFrame(function () {
52
+ // Because of this delay, sometimes `positionToolTip` becomes unavailable.
53
+ if (popover.current) {
54
+ positionToolTip();
86
55
  }
87
56
  });
57
+ }, [positionToolTip]);
88
58
 
89
- return _this;
90
- }
91
-
92
- _createClass(EuiToolTipPopover, [{
93
- key: "componentDidMount",
94
- value: function componentDidMount() {
95
- document.body.classList.add('euiBody-hasPortalContent');
96
- window.addEventListener('resize', this.updateDimensions);
97
- }
98
- }, {
99
- key: "componentWillUnmount",
100
- value: function componentWillUnmount() {
101
- document.body.classList.remove('euiBody-hasPortalContent');
102
- window.removeEventListener('resize', this.updateDimensions);
59
+ var setPopoverRef = function setPopoverRef(ref) {
60
+ if (popoverRef) {
61
+ popoverRef(ref);
103
62
  }
104
- }, {
105
- key: "render",
106
- value: function render() {
107
- var _this$props = this.props,
108
- children = _this$props.children,
109
- title = _this$props.title,
110
- className = _this$props.className,
111
- positionToolTip = _this$props.positionToolTip,
112
- popoverRef = _this$props.popoverRef,
113
- rest = _objectWithoutProperties(_this$props, _excluded);
114
-
115
- var classes = (0, _classnames.default)('euiToolTipPopover', className);
116
- var optionalTitle;
117
-
118
- if (title) {
119
- optionalTitle = (0, _react2.jsx)("div", {
120
- className: "euiToolTip__title"
121
- }, title);
122
- }
63
+ };
123
64
 
124
- return (0, _react2.jsx)("div", _extends({
125
- className: classes,
126
- ref: this.setPopoverRef
127
- }, rest), optionalTitle, children);
128
- }
129
- }]);
130
-
131
- return EuiToolTipPopover;
132
- }(_react.Component);
65
+ (0, _react.useEffect)(function () {
66
+ document.body.classList.add('euiBody-hasPortalContent');
67
+ window.addEventListener('resize', updateDimensions);
68
+ return function () {
69
+ document.body.classList.remove('euiBody-hasPortalContent');
70
+ window.removeEventListener('resize', updateDimensions);
71
+ };
72
+ }, [updateDimensions]);
73
+ var classes = (0, _classnames.default)('euiToolTipPopover', className);
74
+ return (0, _react2.jsx)("div", _extends({
75
+ css: [toolTipCss.euiToolTip, calculatedPosition && toolTipCss[calculatedPosition], ";label:EuiToolTipPopover;"],
76
+ className: classes,
77
+ ref: setPopoverRef
78
+ }, rest), title && (0, _react2.jsx)("div", {
79
+ css: titleCss,
80
+ className: "euiToolTip__title"
81
+ }, title), children);
82
+ };
133
83
 
134
84
  exports.EuiToolTipPopover = EuiToolTipPopover;
135
85
  EuiToolTipPopover.propTypes = {
@@ -140,5 +90,6 @@ EuiToolTipPopover.propTypes = {
140
90
  positionToolTip: _propTypes.default.func.isRequired,
141
91
  children: _propTypes.default.node,
142
92
  title: _propTypes.default.node,
143
- popoverRef: _propTypes.default.func
93
+ popoverRef: _propTypes.default.func,
94
+ calculatedPosition: _propTypes.default.oneOf(["top", "right", "bottom", "left"])
144
95
  };
@@ -54,4 +54,17 @@ Object.keys(_mixins).forEach(function (key) {
54
54
  return _mixins[key];
55
55
  }
56
56
  });
57
+ });
58
+
59
+ var _animations = require("./utility/animations");
60
+
61
+ Object.keys(_animations).forEach(function (key) {
62
+ if (key === "default" || key === "__esModule") return;
63
+ if (key in exports && exports[key] === _animations[key]) return;
64
+ Object.defineProperty(exports, key, {
65
+ enumerable: true,
66
+ get: function get() {
67
+ return _animations[key];
68
+ }
69
+ });
57
70
  });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiAnimFadeIn = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _templateObject;
11
+
12
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
+
14
+ var euiAnimFadeIn = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
15
+ exports.euiAnimFadeIn = euiAnimFadeIn;
@@ -11,7 +11,6 @@ var _excluded = ["position", "isDisabled", "isInvalid", "needsUpdating", "value"
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- // eslint-disable-line import/named
15
14
  import { useEuiI18n } from '../../../i18n';
16
15
  import { EuiPopover } from '../../../popover';
17
16
  import { useFormatTimeString } from '../pretty_duration';
@@ -54,10 +54,9 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
54
54
  var iconStyles = euiImageButtonIconStyles(euiTheme);
55
55
  var cssIconStyles = [iconStyles.euiImageButton__icon, iconStyles.closeFullScreen];
56
56
  return ___EmotionJSX(EuiOverlayMask, {
57
- "data-test-subj": "fullScreenOverlayMask",
58
- onClick: closeFullScreen
57
+ "data-test-subj": "fullScreenOverlayMask"
59
58
  }, ___EmotionJSX(EuiFocusTrap, {
60
- clickOutsideDisables: true
59
+ onClickOutside: closeFullScreen
61
60
  }, ___EmotionJSX(React.Fragment, null, ___EmotionJSX("figure", _extends({
62
61
  "aria-label": optionalCaptionText
63
62
  }, wrapperProps, {
@@ -1,4 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["id", "type", "severity", "badgeColor", "iconType", "iconAriaLabel", "time", "title", "isRead", "primaryAction", "primaryActionProps", "messages", "onRead", "onOpenContextMenu", "onClickTitle", "onClickPrimaryAction", "headingLevel", "className"];
2
4
 
3
5
  /*
4
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -35,9 +37,13 @@ export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
35
37
  onClickTitle = _ref.onClickTitle,
36
38
  onClickPrimaryAction = _ref.onClickPrimaryAction,
37
39
  _ref$headingLevel = _ref.headingLevel,
38
- headingLevel = _ref$headingLevel === void 0 ? 'h2' : _ref$headingLevel;
40
+ headingLevel = _ref$headingLevel === void 0 ? 'h2' : _ref$headingLevel,
41
+ className = _ref.className,
42
+ rest = _objectWithoutProperties(_ref, _excluded);
43
+
39
44
  var classes = classNames('euiNotificationEvent', {
40
- 'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
45
+ 'euiNotificationEvent--withReadState': typeof isRead === 'boolean',
46
+ className: className
41
47
  });
42
48
  var classesTitle = classNames('euiNotificationEvent__title', {
43
49
  'euiNotificationEvent__title--isRead': isRead
@@ -48,11 +54,11 @@ export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
48
54
  className: classesTitle,
49
55
  'data-test-subj': "".concat(id, "-notificationEventTitle")
50
56
  };
51
- return ___EmotionJSX("article", {
57
+ return ___EmotionJSX("article", _extends({
52
58
  "aria-labelledby": randomHeadingId,
53
59
  className: classes,
54
60
  key: id
55
- }, typeof isRead === 'boolean' && ___EmotionJSX("div", {
61
+ }, rest), typeof isRead === 'boolean' && ___EmotionJSX("div", {
56
62
  className: "euiNotificationEvent__readButton"
57
63
  }, !!onRead ? ___EmotionJSX(EuiNotificationEventReadButton, {
58
64
  isRead: isRead,
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "children", "onClick", "headerZindexLocation", "maskRef", "css"];
3
+ var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -14,87 +14,54 @@ var _excluded = ["className", "children", "onClick", "headerZindexLocation", "ma
14
14
  * NOTE: We can't test this component because Enzyme doesn't support rendering
15
15
  * into portals.
16
16
  */
17
- import React, { useEffect, useRef, useState } from 'react';
18
- import { createPortal } from 'react-dom';
17
+ import React, { useEffect, useState } from 'react';
19
18
  import classNames from 'classnames';
19
+ import { Global } from '@emotion/react';
20
20
  import { keysOf } from '../common';
21
- import { useCombinedRefs } from '../../services';
21
+ import { useCombinedRefs, useEuiTheme } from '../../services';
22
+ import { EuiPortal } from '../portal';
23
+ import { euiOverlayMaskStyles, euiOverlayMaskBodyStyles } from './overlay_mask.styles';
22
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
25
  export var EuiOverlayMask = function EuiOverlayMask(_ref) {
24
26
  var className = _ref.className,
25
27
  children = _ref.children,
26
- onClick = _ref.onClick,
27
28
  _ref$headerZindexLoca = _ref.headerZindexLocation,
28
29
  headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
29
30
  maskRef = _ref.maskRef,
30
31
  css = _ref.css,
31
32
  rest = _objectWithoutProperties(_ref, _excluded);
32
33
 
33
- var overlayMaskNode = useRef();
34
- var combinedMaskRef = useCombinedRefs([overlayMaskNode, maskRef]);
35
-
36
- var _useState = useState(false),
34
+ var _useState = useState(null),
37
35
  _useState2 = _slicedToArray(_useState, 2),
38
- isPortalTargetReady = _useState2[0],
39
- setIsPortalTargetReady = _useState2[1];
40
-
41
- useEffect(function () {
42
- document.body.classList.add('euiBody-hasOverlayMask');
43
- return function () {
44
- document.body.classList.remove('euiBody-hasOverlayMask');
45
- };
46
- }, []);
47
- useEffect(function () {
48
- if (typeof document !== 'undefined') {
49
- combinedMaskRef(document.createElement('div'));
50
- }
51
- }, []); // eslint-disable-line react-hooks/exhaustive-deps
52
-
53
- useEffect(function () {
54
- var portalTarget = overlayMaskNode.current;
36
+ overlayMaskNode = _useState2[0],
37
+ setOverlayMaskNode = _useState2[1];
55
38
 
56
- if (portalTarget) {
57
- document.body.appendChild(portalTarget);
58
- }
59
-
60
- setIsPortalTargetReady(true);
61
- return function () {
62
- if (portalTarget) {
63
- document.body.removeChild(portalTarget);
64
- }
65
- };
66
- }, []);
39
+ var combinedMaskRef = useCombinedRefs([setOverlayMaskNode, maskRef]);
40
+ var euiTheme = useEuiTheme();
41
+ var styles = euiOverlayMaskStyles(euiTheme);
42
+ var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
67
43
  useEffect(function () {
68
- if (!overlayMaskNode.current) return;
44
+ if (!overlayMaskNode) return;
69
45
  keysOf(rest).forEach(function (key) {
70
46
  if (typeof rest[key] !== 'string') {
71
47
  throw new Error("Unhandled property type. EuiOverlayMask property ".concat(key, " is not a string."));
72
48
  }
73
49
 
74
- if (overlayMaskNode.current) {
75
- overlayMaskNode.current.setAttribute(key, rest[key]);
50
+ if (overlayMaskNode) {
51
+ overlayMaskNode.setAttribute(key, rest[key]);
76
52
  }
77
53
  });
78
- }, []); // eslint-disable-line react-hooks/exhaustive-deps
54
+ }, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
79
55
 
80
56
  useEffect(function () {
81
- if (!overlayMaskNode.current) return;
82
- overlayMaskNode.current.className = classNames('euiOverlayMask', "euiOverlayMask--".concat(headerZindexLocation, "Header"), className);
83
- }, [className, headerZindexLocation]);
84
- useEffect(function () {
85
- var portalTarget = overlayMaskNode.current;
86
- if (!portalTarget || !onClick) return;
87
-
88
- var listener = function listener(e) {
89
- if (e.target === portalTarget) {
90
- onClick();
91
- }
92
- };
93
-
94
- portalTarget.addEventListener('click', listener);
95
- return function () {
96
- portalTarget.removeEventListener('click', listener);
97
- };
98
- }, [onClick]);
99
- return isPortalTargetReady ? ___EmotionJSX(React.Fragment, null, /*#__PURE__*/createPortal(children, overlayMaskNode.current)) : null;
57
+ if (!overlayMaskNode) return;
58
+ overlayMaskNode.className = classNames('euiOverlayMask', className);
59
+ }, [overlayMaskNode, className]);
60
+ return ___EmotionJSX(EuiPortal, {
61
+ portalRef: combinedMaskRef
62
+ }, ___EmotionJSX(Global, {
63
+ styles: euiOverlayMaskBodyStyles
64
+ }), ___EmotionJSX(Global, {
65
+ styles: cssStyles
66
+ }), children);
100
67
  };
@@ -0,0 +1,28 @@
1
+ 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)."; }
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS, euiAnimFadeIn } from '../../global_styling';
12
+ import { transparentize } from '../../services';
13
+ export var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
14
+ var euiTheme = _ref.euiTheme;
15
+ return {
16
+ euiOverlayMask: /*#__PURE__*/css(".euiOverlayMask{position:fixed;", logicalCSS('top', 0), " ", logicalCSS('left', 0), " ", logicalCSS('right', 0), " ", logicalCSS('bottom', 0), " display:flex;align-items:center;justify-content:center;", logicalCSS('padding-bottom', '10vh'), ";animation:", euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", transparentize(euiTheme.colors.ink, 0.5), ";};label:euiOverlayMask;"),
17
+ aboveHeader: /*#__PURE__*/css(".euiOverlayMask{z-index:", euiTheme.levels.mask, ";};label:aboveHeader;"),
18
+ belowHeader: /*#__PURE__*/css(".euiOverlayMask{z-index:", euiTheme.levels.maskBelowHeader, ";", logicalCSS('top', "".concat(euiTheme.base * 3, "px")), ";};label:belowHeader;")
19
+ };
20
+ };
21
+ export var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
22
+ name: "131160-euiOverlayMaskBodyStyles",
23
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
24
+ } : {
25
+ name: "131160-euiOverlayMaskBodyStyles",
26
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
27
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
+ };
@@ -21,8 +21,7 @@ var horizontalPositionToClassNameMap = {
21
21
  };
22
22
 
23
23
  /**
24
- * **DEPRECATED**
25
- * Use EuiPageSection instead
24
+ * @deprecated Use EuiPageSection instead
26
25
  */
27
26
  export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
28
27
  var verticalPosition = _ref.verticalPosition,
@@ -24,8 +24,7 @@ var paddingSizeToClassNameMap = {
24
24
  export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
25
25
 
26
26
  /**
27
- * **DEPRECATED**
28
- * Use EuiPageSection instead
27
+ * @deprecated Use EuiPageSection instead
29
28
  */
30
29
  export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
31
30
  var children = _ref.children,
@@ -14,8 +14,7 @@ import classNames from 'classnames';
14
14
  import { jsx as ___EmotionJSX } from "@emotion/react";
15
15
 
16
16
  /**
17
- * **DEPRECATED**
18
- * Use EuiPageHeader instead
17
+ * @deprecated Use EuiPageHeader instead
19
18
  */
20
19
  export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
21
20
  var children = _ref.children,
@@ -14,8 +14,7 @@ import classNames from 'classnames';
14
14
  import { jsx as ___EmotionJSX } from "@emotion/react";
15
15
 
16
16
  /**
17
- * **DEPRECATED**
18
- * Use EuiPageHeader instead
17
+ * @deprecated Use EuiPageHeader instead
19
18
  */
20
19
  export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
21
20
  var children = _ref.children,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
3
+ var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
4
4
 
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -29,6 +29,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
29
29
  _ref$grow = _ref.grow,
30
30
  grow = _ref$grow === void 0 ? false : _ref$grow,
31
31
  contentProps = _ref.contentProps,
32
+ _ref$component = _ref.component,
33
+ Component = _ref$component === void 0 ? 'section' : _ref$component,
32
34
  rest = _objectWithoutProperties(_ref, _excluded);
33
35
 
34
36
  // Set max-width as a style prop
@@ -41,7 +43,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
41
43
  var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
42
44
  var contentStyles = euiPageSectionContentStyles();
43
45
  var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
44
- return ___EmotionJSX("div", _extends({
46
+ return ___EmotionJSX(Component, _extends({
45
47
  css: cssStyles
46
48
  }, rest), ___EmotionJSX("div", _extends({
47
49
  css: cssContentStyles
@@ -22,8 +22,7 @@ var paddingSizeToClassNameMap = {
22
22
  export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
23
23
 
24
24
  /**
25
- * **DEPRECATED**
26
- * Use the new EuiPageSidebar instead
25
+ * @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
27
26
  */
28
27
  export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
29
28
  var children = _ref.children,
@@ -32,7 +32,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
32
32
  /**
33
33
  * This component has been deprecated in favor of the new
34
34
  * namespaced version. You can still import this component
35
- * for a period of time by importing `as EuiPageTemplate`.
35
+ * until August 2023 by importing `as EuiPageTemplate`.
36
+ *
37
+ * @deprecated use EuiPageTemplate from page_template/page_template instead
36
38
  */
37
39
  export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
38
40
  var _pageBodyProps2;
@@ -20,8 +20,10 @@ import { EuiPaginationButton } from './pagination_button';
20
20
  import { EuiI18n, useEuiI18n } from '../i18n';
21
21
  import { EuiText } from '../text';
22
22
  import { EuiPaginationButtonArrow } from './pagination_button_arrow';
23
- import { useIsWithinBreakpoints } from '../../services';
23
+ import { useIsWithinBreakpoints, useEuiTheme } from '../../services';
24
24
  import { EuiScreenReaderOnly } from '../accessibility';
25
+ import { euiPaginationStyles } from './pagination.styles';
26
+ import { euiPaginationButtonStyles } from './pagination_button.styles';
25
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
26
28
  var MAX_VISIBLE_PAGES = 5;
27
29
  var NUMBER_SURROUNDING_PAGES = Math.floor(MAX_VISIBLE_PAGES * 0.5);
@@ -39,7 +41,13 @@ export var EuiPagination = function EuiPagination(_ref) {
39
41
  responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
40
42
  rest = _objectWithoutProperties(_ref, _excluded);
41
43
 
42
- var isResponsive = useIsWithinBreakpoints(responsive, !!responsive); // Force to `compressed` version if specified or within the responsive breakpoints
44
+ var isResponsive = useIsWithinBreakpoints(responsive, !!responsive);
45
+ var euiTheme = useEuiTheme();
46
+ var paginationStyles = euiPaginationStyles(euiTheme);
47
+
48
+ var _euiPaginationButtonS = euiPaginationButtonStyles(euiTheme),
49
+ isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
50
+
43
51
 
44
52
  var compressed = _compressed || isResponsive;
45
53
 
@@ -108,6 +116,7 @@ export var EuiPagination = function EuiPagination(_ref) {
108
116
  if (compressed) {
109
117
  centerPageCount = ___EmotionJSX(EuiText, {
110
118
  size: "s",
119
+ css: paginationStyles.euiPagination__compressedText,
111
120
  className: "euiPagination__compressedText"
112
121
  }, ___EmotionJSX(EuiI18n, {
113
122
  token: "euiPagination.pageOfTotalCompressed",
@@ -148,7 +157,8 @@ export var EuiPagination = function EuiPagination(_ref) {
148
157
  }, function (firstRangeAriaLabel) {
149
158
  return ___EmotionJSX("li", {
150
159
  "aria-label": firstRangeAriaLabel,
151
- className: "euiPaginationButton-isPlaceholder euiPagination__item"
160
+ className: "euiPagination__item",
161
+ css: isPlaceholder
152
162
  }, "\u2026");
153
163
  }));
154
164
  } else if (firstPageInRange === 2) {
@@ -179,7 +189,8 @@ export var EuiPagination = function EuiPagination(_ref) {
179
189
  }, function (lastRangeAriaLabel) {
180
190
  return ___EmotionJSX("li", {
181
191
  "aria-label": lastRangeAriaLabel,
182
- className: "euiPaginationButton-isPlaceholder euiPagination__item"
192
+ className: "euiPagination__item",
193
+ css: isPlaceholder
183
194
  }, "\u2026");
184
195
  }));
185
196
  }
@@ -199,6 +210,7 @@ export var EuiPagination = function EuiPagination(_ref) {
199
210
  });
200
211
 
201
212
  centerPageCount = ___EmotionJSX("ul", _extends({}, accessibleName, {
213
+ css: paginationStyles.euiPagination__list,
202
214
  className: "euiPagination__list"
203
215
  }), firstPageButtons, selectablePages, lastPageButtons);
204
216
  }
@@ -223,6 +235,7 @@ export var EuiPagination = function EuiPagination(_ref) {
223
235
 
224
236
  var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
225
237
  return ___EmotionJSX("nav", _extends({
238
+ css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
226
239
  className: classes
227
240
  }, rest), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
228
241
  "aria-atomic": "true",
@@ -0,0 +1,31 @@
1
+ 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)."; }
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS, logicalCSSWithFallback, euiScrollBarStyles } from '../../global_styling';
12
+
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "1dbd2rc-euiPagination__list",
15
+ styles: "display:flex;align-items:baseline;label:euiPagination__list;"
16
+ } : {
17
+ name: "1dbd2rc-euiPagination__list",
18
+ styles: "display:flex;align-items:baseline;label:euiPagination__list;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+
22
+ export var euiPaginationStyles = function euiPaginationStyles(euiThemeContext) {
23
+ var euiTheme = euiThemeContext.euiTheme;
24
+ return {
25
+ // Base
26
+ euiPagination: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), ";display:flex;align-items:center;", logicalCSSWithFallback('overflow-y', 'hidden'), ";", logicalCSSWithFallback('overflow-x', 'auto'), ";;label:euiPagination;"),
27
+ // Elements
28
+ euiPagination__compressedText: /*#__PURE__*/css("display:inline-flex;align-items:center;line-height:1!important;>span{", logicalCSS('margin-horizontal', euiTheme.size.s), ";font-weight:", euiTheme.font.weight.semiBold, ";&:first-of-type{color:", euiTheme.colors.primaryText, ";}};label:euiPagination__compressedText;"),
29
+ euiPagination__list: _ref
30
+ };
31
+ };
@@ -18,6 +18,8 @@ import React from 'react';
18
18
  import classNames from 'classnames';
19
19
  import { EuiButtonEmpty } from '../button';
20
20
  import { EuiI18n } from '../i18n';
21
+ import { useEuiTheme } from '../../services';
22
+ import { euiPaginationButtonStyles } from './pagination_button.styles';
21
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
22
24
  export var EuiPaginationButton = function EuiPaginationButton(_ref) {
23
25
  var className = _ref.className,
@@ -27,12 +29,13 @@ export var EuiPaginationButton = function EuiPaginationButton(_ref) {
27
29
  totalPages = _ref.totalPages,
28
30
  rest = _objectWithoutProperties(_ref, _excluded);
29
31
 
30
- var classes = classNames('euiPaginationButton', className, {
31
- 'euiPaginationButton-isActive': isActive,
32
- 'euiPaginationButton-isPlaceholder': isPlaceholder
33
- });
32
+ var euiTheme = useEuiTheme();
33
+ var styles = euiPaginationButtonStyles(euiTheme);
34
+ var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
35
+ var classes = classNames('euiPaginationButton', className);
34
36
 
35
37
  var props = _objectSpread(_objectSpread(_objectSpread({
38
+ css: paginationButtonCss,
36
39
  className: classes,
37
40
  size: 's',
38
41
  color: 'text',