@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
|
@@ -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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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;
|
package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -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
|
-
|
|
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", "
|
|
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,
|
|
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
|
|
34
|
-
var combinedMaskRef = useCombinedRefs([overlayMaskNode, maskRef]);
|
|
35
|
-
|
|
36
|
-
var _useState = useState(false),
|
|
34
|
+
var _useState = useState(null),
|
|
37
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
57
|
-
|
|
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
|
|
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
|
|
75
|
-
overlayMaskNode.
|
|
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
|
|
82
|
-
overlayMaskNode.
|
|
83
|
-
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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(
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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);
|
|
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: "
|
|
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: "
|
|
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
|
|
31
|
-
|
|
32
|
-
|
|
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',
|