@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
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef"];
|
|
11
|
-
|
|
12
|
-
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); }; }
|
|
13
|
-
|
|
14
|
-
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; } }
|
|
3
|
+
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef", "calculatedPosition"];
|
|
15
4
|
|
|
16
5
|
/*
|
|
17
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -20,85 +9,55 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
9
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
10
|
* Side Public License, v 1.
|
|
22
11
|
*/
|
|
23
|
-
import React, {
|
|
12
|
+
import React, { useEffect, useRef, useCallback } from 'react';
|
|
24
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiToolTipStyles, euiToolTipPopoverStyles } from './tool_tip.styles';
|
|
25
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
-
export var EuiToolTipPopover =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
requestAnimationFrame(function () {
|
|
46
|
-
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
47
|
-
if (_this.popover) {
|
|
48
|
-
_this.props.positionToolTip();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
54
|
-
_this.popover = ref;
|
|
55
|
-
|
|
56
|
-
if (_this.props.popoverRef) {
|
|
57
|
-
_this.props.popoverRef(ref);
|
|
17
|
+
export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
title = _ref.title,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
positionToolTip = _ref.positionToolTip,
|
|
22
|
+
popoverRef = _ref.popoverRef,
|
|
23
|
+
calculatedPosition = _ref.calculatedPosition,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
|
|
26
|
+
var popover = useRef();
|
|
27
|
+
var euiTheme = useEuiTheme();
|
|
28
|
+
var toolTipCss = euiToolTipStyles(euiTheme);
|
|
29
|
+
var popoverStyles = euiToolTipPopoverStyles(euiTheme);
|
|
30
|
+
var titleCss = [popoverStyles.euiToolTip__title];
|
|
31
|
+
var updateDimensions = useCallback(function () {
|
|
32
|
+
requestAnimationFrame(function () {
|
|
33
|
+
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
34
|
+
if (popover.current) {
|
|
35
|
+
positionToolTip();
|
|
58
36
|
}
|
|
59
37
|
});
|
|
38
|
+
}, [positionToolTip]);
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_createClass(EuiToolTipPopover, [{
|
|
65
|
-
key: "componentDidMount",
|
|
66
|
-
value: function componentDidMount() {
|
|
67
|
-
document.body.classList.add('euiBody-hasPortalContent');
|
|
68
|
-
window.addEventListener('resize', this.updateDimensions);
|
|
40
|
+
var setPopoverRef = function setPopoverRef(ref) {
|
|
41
|
+
if (popoverRef) {
|
|
42
|
+
popoverRef(ref);
|
|
69
43
|
}
|
|
70
|
-
}
|
|
71
|
-
key: "componentWillUnmount",
|
|
72
|
-
value: function componentWillUnmount() {
|
|
73
|
-
document.body.classList.remove('euiBody-hasPortalContent');
|
|
74
|
-
window.removeEventListener('resize', this.updateDimensions);
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "render",
|
|
78
|
-
value: function render() {
|
|
79
|
-
var _this$props = this.props,
|
|
80
|
-
children = _this$props.children,
|
|
81
|
-
title = _this$props.title,
|
|
82
|
-
className = _this$props.className,
|
|
83
|
-
positionToolTip = _this$props.positionToolTip,
|
|
84
|
-
popoverRef = _this$props.popoverRef,
|
|
85
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
86
|
-
|
|
87
|
-
var classes = classNames('euiToolTipPopover', className);
|
|
88
|
-
var optionalTitle;
|
|
44
|
+
};
|
|
89
45
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
document.body.classList.add('euiBody-hasPortalContent');
|
|
48
|
+
window.addEventListener('resize', updateDimensions);
|
|
49
|
+
return function () {
|
|
50
|
+
document.body.classList.remove('euiBody-hasPortalContent');
|
|
51
|
+
window.removeEventListener('resize', updateDimensions);
|
|
52
|
+
};
|
|
53
|
+
}, [updateDimensions]);
|
|
54
|
+
var classes = classNames('euiToolTipPopover', className);
|
|
55
|
+
return ___EmotionJSX("div", _extends({
|
|
56
|
+
css: [toolTipCss.euiToolTip, calculatedPosition && toolTipCss[calculatedPosition], ";label:EuiToolTipPopover;"],
|
|
57
|
+
className: classes,
|
|
58
|
+
ref: setPopoverRef
|
|
59
|
+
}, rest), title && ___EmotionJSX("div", {
|
|
60
|
+
css: titleCss,
|
|
61
|
+
className: "euiToolTip__title"
|
|
62
|
+
}, title), children);
|
|
63
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import { keyframes } from '@emotion/react';
|
|
13
|
+
export var euiAnimFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
|
|
@@ -76,10 +76,9 @@ var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref) {
|
|
|
76
76
|
var iconStyles = (0, _image_button2.euiImageButtonIconStyles)(euiTheme);
|
|
77
77
|
var cssIconStyles = [iconStyles.euiImageButton__icon, iconStyles.closeFullScreen];
|
|
78
78
|
return (0, _react2.jsx)(_overlay_mask.EuiOverlayMask, {
|
|
79
|
-
"data-test-subj": "fullScreenOverlayMask"
|
|
80
|
-
onClick: closeFullScreen
|
|
79
|
+
"data-test-subj": "fullScreenOverlayMask"
|
|
81
80
|
}, (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
|
|
82
|
-
|
|
81
|
+
onClickOutside: closeFullScreen
|
|
83
82
|
}, (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("figure", (0, _extends2.default)({
|
|
84
83
|
"aria-label": optionalCaptionText
|
|
85
84
|
}, wrapperProps, {
|
|
@@ -11,6 +11,8 @@ exports.EuiNotificationEvent = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
14
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
17
|
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -31,17 +33,12 @@ var _notification_event_read_icon = require("./notification_event_read_icon");
|
|
|
31
33
|
|
|
32
34
|
var _react2 = require("@emotion/react");
|
|
33
35
|
|
|
36
|
+
var _excluded = ["id", "type", "severity", "badgeColor", "iconType", "iconAriaLabel", "time", "title", "isRead", "primaryAction", "primaryActionProps", "messages", "onRead", "onOpenContextMenu", "onClickTitle", "onClickPrimaryAction", "headingLevel", "className"];
|
|
37
|
+
|
|
34
38
|
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); }
|
|
35
39
|
|
|
36
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
41
|
|
|
38
|
-
/*
|
|
39
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
40
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
41
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
42
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
43
|
-
* Side Public License, v 1.
|
|
44
|
-
*/
|
|
45
42
|
var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
46
43
|
var id = _ref.id,
|
|
47
44
|
type = _ref.type,
|
|
@@ -60,9 +57,12 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
60
57
|
onClickTitle = _ref.onClickTitle,
|
|
61
58
|
onClickPrimaryAction = _ref.onClickPrimaryAction,
|
|
62
59
|
_ref$headingLevel = _ref.headingLevel,
|
|
63
|
-
headingLevel = _ref$headingLevel === void 0 ? 'h2' : _ref$headingLevel
|
|
60
|
+
headingLevel = _ref$headingLevel === void 0 ? 'h2' : _ref$headingLevel,
|
|
61
|
+
className = _ref.className,
|
|
62
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
64
63
|
var classes = (0, _classnames.default)('euiNotificationEvent', {
|
|
65
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
64
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean',
|
|
65
|
+
className: className
|
|
66
66
|
});
|
|
67
67
|
var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
|
|
68
68
|
'euiNotificationEvent__title--isRead': isRead
|
|
@@ -73,11 +73,11 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
73
73
|
className: classesTitle,
|
|
74
74
|
'data-test-subj': "".concat(id, "-notificationEventTitle")
|
|
75
75
|
};
|
|
76
|
-
return (0, _react2.jsx)("article", {
|
|
76
|
+
return (0, _react2.jsx)("article", (0, _extends2.default)({
|
|
77
77
|
"aria-labelledby": randomHeadingId,
|
|
78
78
|
className: classes,
|
|
79
79
|
key: id
|
|
80
|
-
}, typeof isRead === 'boolean' && (0, _react2.jsx)("div", {
|
|
80
|
+
}, rest), typeof isRead === 'boolean' && (0, _react2.jsx)("div", {
|
|
81
81
|
className: "euiNotificationEvent__readButton"
|
|
82
82
|
}, !!onRead ? (0, _react2.jsx)(_notification_event_read_button.EuiNotificationEventReadButton, {
|
|
83
83
|
isRead: isRead,
|
|
@@ -15,17 +15,19 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var _reactDom = require("react-dom");
|
|
19
|
-
|
|
20
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
19
|
|
|
20
|
+
var _react2 = require("@emotion/react");
|
|
21
|
+
|
|
22
22
|
var _common = require("../common");
|
|
23
23
|
|
|
24
24
|
var _services = require("../../services");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _portal = require("../portal");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _overlay_mask = require("./overlay_mask.styles");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
|
|
29
31
|
|
|
30
32
|
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); }
|
|
31
33
|
|
|
@@ -34,79 +36,45 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
34
36
|
var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
35
37
|
var className = _ref.className,
|
|
36
38
|
children = _ref.children,
|
|
37
|
-
onClick = _ref.onClick,
|
|
38
39
|
_ref$headerZindexLoca = _ref.headerZindexLocation,
|
|
39
40
|
headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
|
|
40
41
|
maskRef = _ref.maskRef,
|
|
41
42
|
css = _ref.css,
|
|
42
43
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
|
-
var overlayMaskNode = (0, _react.useRef)();
|
|
44
|
-
var combinedMaskRef = (0, _services.useCombinedRefs)([overlayMaskNode, maskRef]);
|
|
45
44
|
|
|
46
|
-
var _useState = (0, _react.useState)(
|
|
45
|
+
var _useState = (0, _react.useState)(null),
|
|
47
46
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
(0, _react.useEffect)(function () {
|
|
52
|
-
document.body.classList.add('euiBody-hasOverlayMask');
|
|
53
|
-
return function () {
|
|
54
|
-
document.body.classList.remove('euiBody-hasOverlayMask');
|
|
55
|
-
};
|
|
56
|
-
}, []);
|
|
57
|
-
(0, _react.useEffect)(function () {
|
|
58
|
-
if (typeof document !== 'undefined') {
|
|
59
|
-
combinedMaskRef(document.createElement('div'));
|
|
60
|
-
}
|
|
61
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
47
|
+
overlayMaskNode = _useState2[0],
|
|
48
|
+
setOverlayMaskNode = _useState2[1];
|
|
62
49
|
|
|
50
|
+
var combinedMaskRef = (0, _services.useCombinedRefs)([setOverlayMaskNode, maskRef]);
|
|
51
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
52
|
+
var styles = (0, _overlay_mask.euiOverlayMaskStyles)(euiTheme);
|
|
53
|
+
var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
|
|
63
54
|
(0, _react.useEffect)(function () {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (portalTarget) {
|
|
67
|
-
document.body.appendChild(portalTarget);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
setIsPortalTargetReady(true);
|
|
71
|
-
return function () {
|
|
72
|
-
if (portalTarget) {
|
|
73
|
-
document.body.removeChild(portalTarget);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}, []);
|
|
77
|
-
(0, _react.useEffect)(function () {
|
|
78
|
-
if (!overlayMaskNode.current) return;
|
|
55
|
+
if (!overlayMaskNode) return;
|
|
79
56
|
(0, _common.keysOf)(rest).forEach(function (key) {
|
|
80
57
|
if (typeof rest[key] !== 'string') {
|
|
81
58
|
throw new Error("Unhandled property type. EuiOverlayMask property ".concat(key, " is not a string."));
|
|
82
59
|
}
|
|
83
60
|
|
|
84
|
-
if (overlayMaskNode
|
|
85
|
-
overlayMaskNode.
|
|
61
|
+
if (overlayMaskNode) {
|
|
62
|
+
overlayMaskNode.setAttribute(key, rest[key]);
|
|
86
63
|
}
|
|
87
64
|
});
|
|
88
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
65
|
+
}, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
89
66
|
|
|
90
67
|
(0, _react.useEffect)(function () {
|
|
91
|
-
if (!overlayMaskNode
|
|
92
|
-
overlayMaskNode.
|
|
93
|
-
}, [
|
|
94
|
-
(0,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
portalTarget.addEventListener('click', listener);
|
|
105
|
-
return function () {
|
|
106
|
-
portalTarget.removeEventListener('click', listener);
|
|
107
|
-
};
|
|
108
|
-
}, [onClick]);
|
|
109
|
-
return isPortalTargetReady ? (0, _react2.jsx)(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(children, overlayMaskNode.current)) : null;
|
|
68
|
+
if (!overlayMaskNode) return;
|
|
69
|
+
overlayMaskNode.className = (0, _classnames.default)('euiOverlayMask', className);
|
|
70
|
+
}, [overlayMaskNode, className]);
|
|
71
|
+
return (0, _react2.jsx)(_portal.EuiPortal, {
|
|
72
|
+
portalRef: combinedMaskRef
|
|
73
|
+
}, (0, _react2.jsx)(_react2.Global, {
|
|
74
|
+
styles: _overlay_mask.euiOverlayMaskBodyStyles
|
|
75
|
+
}), (0, _react2.jsx)(_react2.Global, {
|
|
76
|
+
styles: cssStyles
|
|
77
|
+
}), children);
|
|
110
78
|
};
|
|
111
79
|
|
|
112
80
|
exports.EuiOverlayMask = EuiOverlayMask;
|
|
@@ -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;
|
|
@@ -28,8 +28,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* Use EuiPageSection instead
|
|
31
|
+
* @deprecated Use EuiPageSection instead
|
|
33
32
|
*/
|
|
34
33
|
var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
35
34
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -34,8 +34,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
34
34
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* Use EuiPageSection instead
|
|
37
|
+
* @deprecated Use EuiPageSection instead
|
|
39
38
|
*/
|
|
40
39
|
var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
41
40
|
var children = _ref.children,
|
|
@@ -20,8 +20,7 @@ var _react2 = require("@emotion/react");
|
|
|
20
20
|
var _excluded = ["children", "className", "responsive"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* Use EuiPageHeader instead
|
|
23
|
+
* @deprecated Use EuiPageHeader instead
|
|
25
24
|
*/
|
|
26
25
|
var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
27
26
|
var children = _ref.children,
|
|
@@ -20,8 +20,7 @@ var _react2 = require("@emotion/react");
|
|
|
20
20
|
var _excluded = ["children", "className"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* Use EuiPageHeader instead
|
|
23
|
+
* @deprecated Use EuiPageHeader instead
|
|
25
24
|
*/
|
|
26
25
|
var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
27
26
|
var children = _ref.children,
|
|
@@ -23,7 +23,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
23
23
|
|
|
24
24
|
var _react2 = require("@emotion/react");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
26
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
27
27
|
|
|
28
28
|
var EuiPageSection = function EuiPageSection(_ref) {
|
|
29
29
|
var children = _ref.children,
|
|
@@ -39,6 +39,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
39
39
|
_ref$grow = _ref.grow,
|
|
40
40
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
41
41
|
contentProps = _ref.contentProps,
|
|
42
|
+
_ref$component = _ref.component,
|
|
43
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
42
44
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
// Set max-width as a style prop
|
|
44
46
|
var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, contentProps === null || contentProps === void 0 ? void 0 : contentProps.style);
|
|
@@ -50,7 +52,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
50
52
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
51
53
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
52
54
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
53
|
-
return (0, _react2.jsx)(
|
|
55
|
+
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
54
56
|
css: cssStyles
|
|
55
57
|
}, rest), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
56
58
|
css: cssContentStyles
|
|
@@ -30,8 +30,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
30
30
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Use the new EuiPageSidebar instead
|
|
33
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
35
34
|
*/
|
|
36
35
|
var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
37
36
|
var children = _ref.children,
|
|
@@ -49,7 +49,9 @@ exports.TEMPLATES = TEMPLATES;
|
|
|
49
49
|
/**
|
|
50
50
|
* This component has been deprecated in favor of the new
|
|
51
51
|
* namespaced version. You can still import this component
|
|
52
|
-
*
|
|
52
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
53
55
|
*/
|
|
54
56
|
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
55
57
|
var _pageBodyProps2;
|
|
@@ -29,6 +29,10 @@ var _services = require("../../services");
|
|
|
29
29
|
|
|
30
30
|
var _accessibility = require("../accessibility");
|
|
31
31
|
|
|
32
|
+
var _pagination = require("./pagination.styles");
|
|
33
|
+
|
|
34
|
+
var _pagination_button2 = require("./pagination_button.styles");
|
|
35
|
+
|
|
32
36
|
var _react2 = require("@emotion/react");
|
|
33
37
|
|
|
34
38
|
var _excluded = ["className", "pageCount", "activePage", "onPageClick", "compressed", "aria-controls", "responsive"];
|
|
@@ -53,7 +57,13 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
53
57
|
_ref$responsive = _ref.responsive,
|
|
54
58
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
55
59
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
56
|
-
var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive);
|
|
60
|
+
var isResponsive = (0, _services.useIsWithinBreakpoints)(responsive, !!responsive);
|
|
61
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
62
|
+
var paginationStyles = (0, _pagination.euiPaginationStyles)(euiTheme);
|
|
63
|
+
|
|
64
|
+
var _euiPaginationButtonS = (0, _pagination_button2.euiPaginationButtonStyles)(euiTheme),
|
|
65
|
+
isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
|
|
66
|
+
|
|
57
67
|
|
|
58
68
|
var compressed = _compressed || isResponsive;
|
|
59
69
|
|
|
@@ -117,6 +127,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
117
127
|
if (compressed) {
|
|
118
128
|
centerPageCount = (0, _react2.jsx)(_text.EuiText, {
|
|
119
129
|
size: "s",
|
|
130
|
+
css: paginationStyles.euiPagination__compressedText,
|
|
120
131
|
className: "euiPagination__compressedText"
|
|
121
132
|
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
122
133
|
token: "euiPagination.pageOfTotalCompressed",
|
|
@@ -157,7 +168,8 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
157
168
|
}, function (firstRangeAriaLabel) {
|
|
158
169
|
return (0, _react2.jsx)("li", {
|
|
159
170
|
"aria-label": firstRangeAriaLabel,
|
|
160
|
-
className: "
|
|
171
|
+
className: "euiPagination__item",
|
|
172
|
+
css: isPlaceholder
|
|
161
173
|
}, "\u2026");
|
|
162
174
|
}));
|
|
163
175
|
} else if (firstPageInRange === 2) {
|
|
@@ -188,7 +200,8 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
188
200
|
}, function (lastRangeAriaLabel) {
|
|
189
201
|
return (0, _react2.jsx)("li", {
|
|
190
202
|
"aria-label": lastRangeAriaLabel,
|
|
191
|
-
className: "
|
|
203
|
+
className: "euiPagination__item",
|
|
204
|
+
css: isPlaceholder
|
|
192
205
|
}, "\u2026");
|
|
193
206
|
}));
|
|
194
207
|
}
|
|
@@ -208,6 +221,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
208
221
|
});
|
|
209
222
|
|
|
210
223
|
centerPageCount = (0, _react2.jsx)("ul", (0, _extends2.default)({}, accessibleName, {
|
|
224
|
+
css: paginationStyles.euiPagination__list,
|
|
211
225
|
className: "euiPagination__list"
|
|
212
226
|
}), firstPageButtons, selectablePages, lastPageButtons);
|
|
213
227
|
}
|
|
@@ -232,6 +246,7 @@ var EuiPagination = function EuiPagination(_ref) {
|
|
|
232
246
|
|
|
233
247
|
var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
|
|
234
248
|
return (0, _react2.jsx)("nav", (0, _extends2.default)({
|
|
249
|
+
css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
|
|
235
250
|
className: classes
|
|
236
251
|
}, rest), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", {
|
|
237
252
|
"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;
|
|
@@ -21,6 +21,10 @@ var _button = require("../button");
|
|
|
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
|
var _excluded = ["className", "isActive", "isPlaceholder", "pageIndex", "totalPages"];
|
|
@@ -36,12 +40,13 @@ var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
|
36
40
|
pageIndex = _ref.pageIndex,
|
|
37
41
|
totalPages = _ref.totalPages,
|
|
38
42
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
44
|
+
var styles = (0, _pagination_button.euiPaginationButtonStyles)(euiTheme);
|
|
45
|
+
var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
|
|
46
|
+
var classes = (0, _classnames.default)('euiPaginationButton', className);
|
|
43
47
|
|
|
44
48
|
var props = _objectSpread(_objectSpread(_objectSpread({
|
|
49
|
+
css: paginationButtonCss,
|
|
45
50
|
className: classes,
|
|
46
51
|
size: 's',
|
|
47
52
|
color: 'text',
|