@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.
- package/dist/eui_theme_dark.css +0 -247
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -247
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/button/button_display/_button_display.js +10 -1
- package/es/components/button/button_empty/button_empty.js +10 -1
- package/es/components/collapsible_nav/collapsible_nav.js +0 -5
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/es/components/expression/expression.js +12 -2
- package/es/components/header/header_links/header_link.js +10 -1
- package/es/components/image/image.js +6 -1
- package/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/es/components/notification/notification_event.js +24 -5
- package/es/components/overlay_mask/overlay_mask.js +27 -65
- package/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/es/components/page/page_content/page_content.js +1 -2
- package/es/components/page/page_content/page_content_body.js +1 -2
- package/es/components/page/page_content/page_content_header.js +1 -2
- package/es/components/page/page_content/page_content_header_section.js +1 -2
- package/es/components/page/page_section/page_section.js +15 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/es/components/page_template/page_template.js +18 -2
- package/es/components/pagination/pagination.js +17 -4
- package/es/components/pagination/pagination.styles.js +31 -0
- package/es/components/pagination/pagination_button.js +17 -5
- package/es/components/pagination/pagination_button.styles.js +30 -0
- package/es/components/pagination/pagination_button_arrow.js +5 -0
- package/es/components/progress/progress.js +6 -1
- package/es/components/provider/cache/cache_provider.js +3 -9
- package/es/components/provider/provider.js +25 -2
- package/es/components/resizable_container/resizable_panel.js +6 -1
- package/es/components/side_nav/side_nav.js +5 -0
- package/es/components/suggest/suggest.js +10 -1
- package/es/components/tool_tip/tool_tip.js +42 -66
- package/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/es/components/tool_tip/tool_tip_anchor.js +73 -0
- package/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/es/components/tool_tip/tool_tip_popover.js +48 -101
- package/es/global_styling/index.js +2 -1
- package/es/global_styling/utility/animations.js +13 -0
- package/eui.d.ts +128 -51
- package/i18ntokens.json +54 -54
- package/lib/components/button/button_display/_button_display.js +10 -1
- package/lib/components/button/button_empty/button_empty.js +10 -1
- package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/lib/components/expression/expression.js +12 -2
- package/lib/components/header/header_links/header_link.js +10 -1
- package/lib/components/image/image.js +6 -1
- package/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/lib/components/notification/notification_event.js +27 -8
- package/lib/components/overlay_mask/overlay_mask.js +27 -65
- package/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/lib/components/page/page_content/page_content.js +1 -2
- package/lib/components/page/page_content/page_content_body.js +1 -2
- package/lib/components/page/page_content/page_content_header.js +1 -2
- package/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/lib/components/page/page_section/page_section.js +15 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/lib/components/page_template/page_template.js +18 -2
- package/lib/components/pagination/pagination.js +18 -3
- package/lib/components/pagination/pagination.styles.js +34 -0
- package/lib/components/pagination/pagination_button.js +9 -4
- package/lib/components/pagination/pagination_button.styles.js +45 -0
- package/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/lib/components/progress/progress.js +6 -1
- package/lib/components/provider/cache/cache_provider.js +3 -11
- package/lib/components/provider/provider.js +31 -6
- package/lib/components/resizable_container/resizable_panel.js +6 -1
- package/lib/components/side_nav/side_nav.js +5 -0
- package/lib/components/suggest/suggest.js +10 -1
- package/lib/components/tool_tip/tool_tip.js +43 -64
- package/lib/components/tool_tip/tool_tip.styles.js +123 -0
- package/lib/components/tool_tip/tool_tip_anchor.js +87 -0
- package/lib/components/tool_tip/tool_tip_arrow.js +28 -0
- package/lib/components/tool_tip/tool_tip_popover.js +49 -98
- package/lib/global_styling/index.js +13 -0
- package/lib/global_styling/utility/animations.js +15 -0
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
- package/optimize/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/es/components/notification/notification_event.js +10 -4
- package/optimize/es/components/overlay_mask/overlay_mask.js +27 -60
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/optimize/es/components/page/page_content/page_content.js +1 -2
- package/optimize/es/components/page/page_content/page_content_body.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/es/components/page/page_section/page_section.js +4 -2
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/pagination/pagination.js +17 -4
- package/optimize/es/components/pagination/pagination.styles.js +31 -0
- package/optimize/es/components/pagination/pagination_button.js +7 -4
- package/optimize/es/components/pagination/pagination_button.styles.js +30 -0
- package/optimize/es/components/pagination/pagination_button_arrow.js +5 -0
- package/optimize/es/components/provider/cache/cache_provider.js +3 -9
- package/optimize/es/components/provider/provider.js +25 -2
- package/optimize/es/components/suggest/suggest.js +4 -1
- package/optimize/es/components/tool_tip/tool_tip.js +42 -66
- package/optimize/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +60 -0
- package/optimize/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/optimize/es/components/tool_tip/tool_tip_popover.js +46 -87
- package/optimize/es/global_styling/index.js +2 -1
- package/optimize/es/global_styling/utility/animations.js +13 -0
- package/optimize/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/lib/components/notification/notification_event.js +11 -11
- package/optimize/lib/components/overlay_mask/overlay_mask.js +27 -59
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/optimize/lib/components/page/page_content/page_content.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/lib/components/page/page_section/page_section.js +4 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/pagination/pagination.js +18 -3
- package/optimize/lib/components/pagination/pagination.styles.js +34 -0
- package/optimize/lib/components/pagination/pagination_button.js +9 -4
- package/optimize/lib/components/pagination/pagination_button.styles.js +45 -0
- package/optimize/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
- package/optimize/lib/components/provider/provider.js +31 -6
- package/optimize/lib/components/suggest/suggest.js +4 -1
- package/optimize/lib/components/tool_tip/tool_tip.js +42 -64
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +125 -0
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +75 -0
- package/optimize/lib/components/tool_tip/tool_tip_arrow.js +35 -0
- package/optimize/lib/components/tool_tip/tool_tip_popover.js +47 -88
- package/optimize/lib/global_styling/index.js +13 -0
- package/optimize/lib/global_styling/utility/animations.js +17 -0
- package/package.json +2 -2
- package/src/components/index.scss +0 -4
- package/src/global_styling/mixins/_tool_tip.scss +3 -6
- package/src/themes/amsterdam/overrides/_index.scss +0 -2
- package/test-env/components/button/button_display/_button_display.js +10 -1
- package/test-env/components/button/button_empty/button_empty.js +10 -1
- package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/test-env/components/expression/expression.js +12 -2
- package/test-env/components/header/header_links/header_link.js +10 -1
- package/test-env/components/image/image.js +6 -1
- package/test-env/components/image/image_fullscreen_wrapper.js +2 -3
- package/test-env/components/notification/notification_event.js +24 -15
- package/test-env/components/overlay_mask/overlay_mask.js +27 -64
- package/test-env/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/test-env/components/page/page_content/page_content.js +1 -2
- package/test-env/components/page/page_content/page_content_body.js +1 -2
- package/test-env/components/page/page_content/page_content_header.js +1 -2
- package/test-env/components/page/page_content/page_content_header_section.js +1 -2
- package/test-env/components/page/page_section/page_section.js +15 -3
- package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/test-env/components/page_template/page_template.js +18 -2
- package/test-env/components/pagination/pagination.js +18 -3
- package/test-env/components/pagination/pagination.styles.js +34 -0
- package/test-env/components/pagination/pagination_button.js +9 -4
- package/test-env/components/pagination/pagination_button.styles.js +45 -0
- package/test-env/components/pagination/pagination_button_arrow.js +7 -0
- package/test-env/components/progress/progress.js +6 -1
- package/test-env/components/provider/cache/cache_provider.js +3 -11
- package/test-env/components/provider/provider.js +31 -6
- package/test-env/components/resizable_container/resizable_panel.js +6 -1
- package/test-env/components/side_nav/side_nav.js +5 -0
- package/test-env/components/suggest/suggest.js +10 -1
- package/test-env/components/tool_tip/tool_tip.js +42 -64
- package/test-env/components/tool_tip/tool_tip.styles.js +125 -0
- package/test-env/components/tool_tip/tool_tip_anchor.js +84 -0
- package/test-env/components/tool_tip/tool_tip_arrow.js +35 -0
- package/test-env/components/tool_tip/tool_tip_popover.js +49 -89
- package/test-env/global_styling/index.js +13 -0
- package/test-env/global_styling/utility/animations.js +17 -0
- package/src/components/call_out/_index.scss +0 -3
- package/src/components/call_out/_mixins.scss +0 -23
- package/src/components/call_out/_variables.scss +0 -7
- package/src/components/overlay_mask/_index.scss +0 -1
- package/src/components/overlay_mask/_overlay_mask.scss +0 -33
- package/src/components/pagination/_index.scss +0 -2
- package/src/components/pagination/_pagination.scss +0 -30
- package/src/components/pagination/_pagination_button.scss +0 -37
- package/src/components/tool_tip/_index.scss +0 -1
- package/src/components/tool_tip/_tool_tip.scss +0 -121
- package/src/themes/amsterdam/overrides/_overlay_mask.scss +0 -3
- package/src/themes/amsterdam/overrides/_tooltip.scss +0 -7
|
@@ -11,17 +11,19 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
-
var _reactDom = require("react-dom");
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
16
|
+
var _react2 = require("@emotion/react");
|
|
17
|
+
|
|
18
18
|
var _common = require("../common");
|
|
19
19
|
|
|
20
20
|
var _services = require("../../services");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _portal = require("../portal");
|
|
23
|
+
|
|
24
|
+
var _overlay_mask = require("./overlay_mask.styles");
|
|
23
25
|
|
|
24
|
-
var _excluded = ["className", "children", "
|
|
26
|
+
var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
@@ -48,80 +50,45 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
48
50
|
var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
49
51
|
var className = _ref.className,
|
|
50
52
|
children = _ref.children,
|
|
51
|
-
onClick = _ref.onClick,
|
|
52
53
|
_ref$headerZindexLoca = _ref.headerZindexLocation,
|
|
53
54
|
headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
|
|
54
55
|
maskRef = _ref.maskRef,
|
|
55
56
|
css = _ref.css,
|
|
56
57
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
57
58
|
|
|
58
|
-
var
|
|
59
|
-
var combinedMaskRef = (0, _services.useCombinedRefs)([overlayMaskNode, maskRef]);
|
|
60
|
-
|
|
61
|
-
var _useState = (0, _react.useState)(false),
|
|
59
|
+
var _useState = (0, _react.useState)(null),
|
|
62
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
overlayMaskNode = _useState2[0],
|
|
62
|
+
setOverlayMaskNode = _useState2[1];
|
|
65
63
|
|
|
64
|
+
var combinedMaskRef = (0, _services.useCombinedRefs)([setOverlayMaskNode, maskRef]);
|
|
65
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
66
|
+
var styles = (0, _overlay_mask.euiOverlayMaskStyles)(euiTheme);
|
|
67
|
+
var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
|
|
66
68
|
(0, _react.useEffect)(function () {
|
|
67
|
-
|
|
68
|
-
return function () {
|
|
69
|
-
document.body.classList.remove('euiBody-hasOverlayMask');
|
|
70
|
-
};
|
|
71
|
-
}, []);
|
|
72
|
-
(0, _react.useEffect)(function () {
|
|
73
|
-
if (typeof document !== 'undefined') {
|
|
74
|
-
combinedMaskRef(document.createElement('div'));
|
|
75
|
-
}
|
|
76
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
77
|
-
|
|
78
|
-
(0, _react.useEffect)(function () {
|
|
79
|
-
var portalTarget = overlayMaskNode.current;
|
|
80
|
-
|
|
81
|
-
if (portalTarget) {
|
|
82
|
-
document.body.appendChild(portalTarget);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
setIsPortalTargetReady(true);
|
|
86
|
-
return function () {
|
|
87
|
-
if (portalTarget) {
|
|
88
|
-
document.body.removeChild(portalTarget);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}, []);
|
|
92
|
-
(0, _react.useEffect)(function () {
|
|
93
|
-
if (!overlayMaskNode.current) return;
|
|
69
|
+
if (!overlayMaskNode) return;
|
|
94
70
|
(0, _common.keysOf)(rest).forEach(function (key) {
|
|
95
71
|
if (typeof rest[key] !== 'string') {
|
|
96
72
|
throw new Error("Unhandled property type. EuiOverlayMask property ".concat(key, " is not a string."));
|
|
97
73
|
}
|
|
98
74
|
|
|
99
|
-
if (overlayMaskNode
|
|
100
|
-
overlayMaskNode.
|
|
75
|
+
if (overlayMaskNode) {
|
|
76
|
+
overlayMaskNode.setAttribute(key, rest[key]);
|
|
101
77
|
}
|
|
102
78
|
});
|
|
103
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
79
|
+
}, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
104
80
|
|
|
105
81
|
(0, _react.useEffect)(function () {
|
|
106
|
-
if (!overlayMaskNode
|
|
107
|
-
overlayMaskNode.
|
|
108
|
-
}, [
|
|
109
|
-
(0,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
portalTarget.addEventListener('click', listener);
|
|
120
|
-
return function () {
|
|
121
|
-
portalTarget.removeEventListener('click', listener);
|
|
122
|
-
};
|
|
123
|
-
}, [onClick]);
|
|
124
|
-
return isPortalTargetReady ? (0, _react2.jsx)(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(children, overlayMaskNode.current)) : null;
|
|
82
|
+
if (!overlayMaskNode) return;
|
|
83
|
+
overlayMaskNode.className = (0, _classnames.default)('euiOverlayMask', className);
|
|
84
|
+
}, [overlayMaskNode, className]);
|
|
85
|
+
return (0, _react2.jsx)(_portal.EuiPortal, {
|
|
86
|
+
portalRef: combinedMaskRef
|
|
87
|
+
}, (0, _react2.jsx)(_react2.Global, {
|
|
88
|
+
styles: _overlay_mask.euiOverlayMaskBodyStyles
|
|
89
|
+
}), (0, _react2.jsx)(_react2.Global, {
|
|
90
|
+
styles: cssStyles
|
|
91
|
+
}), children);
|
|
125
92
|
};
|
|
126
93
|
|
|
127
94
|
exports.EuiOverlayMask = EuiOverlayMask;
|
|
@@ -131,11 +98,6 @@ EuiOverlayMask.propTypes = {
|
|
|
131
98
|
"data-test-subj": _propTypes.default.string,
|
|
132
99
|
css: _propTypes.default.any,
|
|
133
100
|
|
|
134
|
-
/**
|
|
135
|
-
* Function that applies to clicking the mask itself and not the children
|
|
136
|
-
*/
|
|
137
|
-
onClick: _propTypes.default.func,
|
|
138
|
-
|
|
139
101
|
/**
|
|
140
102
|
* ReactNode to render as this component's content
|
|
141
103
|
*/
|
|
@@ -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;
|
|
@@ -33,8 +33,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Use EuiPageSection instead
|
|
36
|
+
* @deprecated Use EuiPageSection instead
|
|
38
37
|
*/
|
|
39
38
|
var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
40
39
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -39,8 +39,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
39
39
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* Use EuiPageSection instead
|
|
42
|
+
* @deprecated Use EuiPageSection instead
|
|
44
43
|
*/
|
|
45
44
|
var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
46
45
|
var children = _ref.children,
|
|
@@ -24,8 +24,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageHeader instead
|
|
27
|
+
* @deprecated Use EuiPageHeader instead
|
|
29
28
|
*/
|
|
30
29
|
var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -24,8 +24,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageHeader instead
|
|
27
|
+
* @deprecated Use EuiPageHeader instead
|
|
29
28
|
*/
|
|
30
29
|
var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -19,7 +19,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
22
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -43,6 +43,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
43
43
|
_ref$grow = _ref.grow,
|
|
44
44
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
45
45
|
contentProps = _ref.contentProps,
|
|
46
|
+
_ref$component = _ref.component,
|
|
47
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
46
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
49
|
|
|
48
50
|
// Set max-width as a style prop
|
|
@@ -55,7 +57,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
55
57
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
56
58
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
57
59
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
58
|
-
return (0, _react2.jsx)(
|
|
60
|
+
return (0, _react2.jsx)(Component, _extends({
|
|
59
61
|
css: cssStyles
|
|
60
62
|
}, rest), (0, _react2.jsx)("div", _extends({
|
|
61
63
|
css: cssContentStyles
|
|
@@ -110,5 +112,15 @@ EuiPageSection.propTypes = {
|
|
|
110
112
|
/**
|
|
111
113
|
* Passed down to the div wrapper of the section contents
|
|
112
114
|
*/
|
|
113
|
-
contentProps: _propTypes.default.
|
|
115
|
+
contentProps: _propTypes.default.shape({
|
|
116
|
+
className: _propTypes.default.string,
|
|
117
|
+
"aria-label": _propTypes.default.string,
|
|
118
|
+
"data-test-subj": _propTypes.default.string,
|
|
119
|
+
css: _propTypes.default.any
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Sets which HTML element to render.
|
|
124
|
+
*/
|
|
125
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
114
126
|
};
|
|
@@ -35,8 +35,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
35
35
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
* Use the new EuiPageSidebar instead
|
|
38
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
40
39
|
*/
|
|
41
40
|
var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
42
41
|
var children = _ref.children,
|
|
@@ -53,7 +53,9 @@ exports.TEMPLATES = TEMPLATES;
|
|
|
53
53
|
/**
|
|
54
54
|
* This component has been deprecated in favor of the new
|
|
55
55
|
* namespaced version. You can still import this component
|
|
56
|
-
*
|
|
56
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
57
59
|
*/
|
|
58
60
|
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
59
61
|
var _pageBodyProps2;
|
|
@@ -112,6 +112,16 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
112
112
|
/**
|
|
113
113
|
* Passed down to the div wrapper of the section contents
|
|
114
114
|
*/
|
|
115
|
-
contentProps: _propTypes.default.
|
|
115
|
+
contentProps: _propTypes.default.shape({
|
|
116
|
+
className: _propTypes.default.string,
|
|
117
|
+
"aria-label": _propTypes.default.string,
|
|
118
|
+
"data-test-subj": _propTypes.default.string,
|
|
119
|
+
css: _propTypes.default.any
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Sets which HTML element to render.
|
|
124
|
+
*/
|
|
125
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
116
126
|
panelled: _propTypes.default.bool
|
|
117
127
|
};
|
|
@@ -321,7 +321,17 @@ _EuiPageSection.propTypes = {
|
|
|
321
321
|
/**
|
|
322
322
|
* Passed down to the div wrapper of the section contents
|
|
323
323
|
*/
|
|
324
|
-
contentProps: _propTypes.default.
|
|
324
|
+
contentProps: _propTypes.default.shape({
|
|
325
|
+
className: _propTypes.default.string,
|
|
326
|
+
"aria-label": _propTypes.default.string,
|
|
327
|
+
"data-test-subj": _propTypes.default.string,
|
|
328
|
+
css: _propTypes.default.any
|
|
329
|
+
}),
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Sets which HTML element to render.
|
|
333
|
+
*/
|
|
334
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
325
335
|
};
|
|
326
336
|
|
|
327
337
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -370,7 +380,13 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
370
380
|
paddingSize: _propTypes.default.any,
|
|
371
381
|
alignment: _propTypes.default.any,
|
|
372
382
|
grow: _propTypes.default.bool,
|
|
373
|
-
contentProps: _propTypes.default.
|
|
383
|
+
contentProps: _propTypes.default.shape({
|
|
384
|
+
className: _propTypes.default.string,
|
|
385
|
+
"aria-label": _propTypes.default.string,
|
|
386
|
+
"data-test-subj": _propTypes.default.string,
|
|
387
|
+
css: _propTypes.default.any
|
|
388
|
+
}),
|
|
389
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
374
390
|
panelled: _propTypes.default.bool
|
|
375
391
|
};
|
|
376
392
|
|
|
@@ -23,6 +23,10 @@ var _services = require("../../services");
|
|
|
23
23
|
|
|
24
24
|
var _accessibility = require("../accessibility");
|
|
25
25
|
|
|
26
|
+
var _pagination = require("./pagination.styles");
|
|
27
|
+
|
|
28
|
+
var _pagination_button2 = require("./pagination_button.styles");
|
|
29
|
+
|
|
26
30
|
var _react2 = require("@emotion/react");
|
|
27
31
|
|
|
28
32
|
var _excluded = ["className", "pageCount", "activePage", "onPageClick", "compressed", "aria-controls", "responsive"];
|
|
@@ -58,7 +62,13 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
58
62
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
59
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
64
|
|
|
61
|
-
var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive);
|
|
65
|
+
var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive);
|
|
66
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
67
|
+
var paginationStyles = (0, _pagination.euiPaginationStyles)(euiTheme);
|
|
68
|
+
|
|
69
|
+
var _euiPaginationButtonS = (0, _pagination_button2.euiPaginationButtonStyles)(euiTheme),
|
|
70
|
+
isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
|
|
71
|
+
|
|
62
72
|
|
|
63
73
|
var compressed = _compressed || isResponsive;
|
|
64
74
|
|
|
@@ -122,6 +132,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
122
132
|
if (compressed) {
|
|
123
133
|
centerPageCount = (0, _react2.jsx)(_text.EuiText, {
|
|
124
134
|
size: "s",
|
|
135
|
+
css: paginationStyles.euiPagination__compressedText,
|
|
125
136
|
className: "euiPagination__compressedText"
|
|
126
137
|
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
127
138
|
token: "euiPagination.pageOfTotalCompressed",
|
|
@@ -162,7 +173,8 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
162
173
|
}, function (firstRangeAriaLabel) {
|
|
163
174
|
return (0, _react2.jsx)("li", {
|
|
164
175
|
"aria-label": firstRangeAriaLabel,
|
|
165
|
-
className: "
|
|
176
|
+
className: "euiPagination__item",
|
|
177
|
+
css: isPlaceholder
|
|
166
178
|
}, "\u2026");
|
|
167
179
|
}));
|
|
168
180
|
} else if (firstPageInRange === 2) {
|
|
@@ -193,7 +205,8 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
193
205
|
}, function (lastRangeAriaLabel) {
|
|
194
206
|
return (0, _react2.jsx)("li", {
|
|
195
207
|
"aria-label": lastRangeAriaLabel,
|
|
196
|
-
className: "
|
|
208
|
+
className: "euiPagination__item",
|
|
209
|
+
css: isPlaceholder
|
|
197
210
|
}, "\u2026");
|
|
198
211
|
}));
|
|
199
212
|
}
|
|
@@ -213,6 +226,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
213
226
|
});
|
|
214
227
|
|
|
215
228
|
centerPageCount = (0, _react2.jsx)("ul", _extends({}, accessibleName, {
|
|
229
|
+
css: paginationStyles.euiPagination__list,
|
|
216
230
|
className: "euiPagination__list"
|
|
217
231
|
}), firstPageButtons, selectablePages, lastPageButtons);
|
|
218
232
|
}
|
|
@@ -237,6 +251,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
237
251
|
|
|
238
252
|
var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
|
|
239
253
|
return (0, _react2.jsx)("nav", _extends({
|
|
254
|
+
css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
|
|
240
255
|
className: classes
|
|
241
256
|
}, rest), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", {
|
|
242
257
|
"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;
|
|
@@ -15,6 +15,10 @@ var _button = require("../button");
|
|
|
15
15
|
|
|
16
16
|
var _i18n = require("../i18n");
|
|
17
17
|
|
|
18
|
+
var _services = require("../../services");
|
|
19
|
+
|
|
20
|
+
var _pagination_button = require("./pagination_button.styles");
|
|
21
|
+
|
|
18
22
|
var _react2 = require("@emotion/react");
|
|
19
23
|
|
|
20
24
|
var _excluded = ["className", "isActive", "isPlaceholder", "pageIndex", "totalPages"];
|
|
@@ -41,12 +45,13 @@ var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
|
41
45
|
totalPages = _ref.totalPages,
|
|
42
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
47
|
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
49
|
+
var styles = (0, _pagination_button.euiPaginationButtonStyles)(euiTheme);
|
|
50
|
+
var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
|
|
51
|
+
var classes = (0, _classnames.default)('euiPaginationButton', className);
|
|
48
52
|
|
|
49
53
|
var props = _objectSpread(_objectSpread(_objectSpread({
|
|
54
|
+
css: paginationButtonCss,
|
|
50
55
|
className: classes,
|
|
51
56
|
size: 's',
|
|
52
57
|
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;
|
|
@@ -17,6 +17,10 @@ var _common = require("../common");
|
|
|
17
17
|
|
|
18
18
|
var _i18n = require("../i18n");
|
|
19
19
|
|
|
20
|
+
var _services = require("../../services");
|
|
21
|
+
|
|
22
|
+
var _pagination_button = require("./pagination_button.styles");
|
|
23
|
+
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -38,6 +42,8 @@ var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
38
42
|
disabled = _ref.disabled,
|
|
39
43
|
ariaControls = _ref.ariaControls,
|
|
40
44
|
onClick = _ref.onClick;
|
|
45
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
46
|
+
var styles = (0, _pagination_button.euiPaginationButtonArrowStyles)(euiTheme);
|
|
41
47
|
var labels = {
|
|
42
48
|
first: (0, _i18n.useEuiI18n)('euiPaginationButtonArrow.firstPage', 'First page'),
|
|
43
49
|
previous: (0, _i18n.useEuiI18n)('euiPaginationButtonArrow.previousPage', 'Previous page'),
|
|
@@ -52,6 +58,7 @@ var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
return (0, _react2.jsx)(_button_icon.EuiButtonIcon, _extends({
|
|
61
|
+
css: styles.euiPaginationArrowButton,
|
|
55
62
|
className: (0, _classnames.default)('euiPaginationArrowButton', className),
|
|
56
63
|
color: "text",
|
|
57
64
|
"aria-label": labels[type],
|
|
@@ -163,5 +163,10 @@ EuiProgress.propTypes = {
|
|
|
163
163
|
/**
|
|
164
164
|
* Object of props passed to the <span/> wrapping the determinate progress's label
|
|
165
165
|
*/
|
|
166
|
-
labelProps: _propTypes.default.
|
|
166
|
+
labelProps: _propTypes.default.shape({
|
|
167
|
+
className: _propTypes.default.string,
|
|
168
|
+
"aria-label": _propTypes.default.string,
|
|
169
|
+
"data-test-subj": _propTypes.default.string,
|
|
170
|
+
css: _propTypes.default.any
|
|
171
|
+
})
|
|
167
172
|
};
|
|
@@ -7,8 +7,6 @@ exports.EuiCacheProvider = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _cache = _interopRequireDefault(require("@emotion/cache"));
|
|
11
|
-
|
|
12
10
|
var _react2 = require("@emotion/react");
|
|
13
11
|
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -20,18 +18,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
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
|
|
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;
|