@elastic/eui 92.2.0 → 93.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 -200
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -200
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +0 -9
- package/es/components/basic_table/in_memory_table.js +0 -10
- package/es/components/beacon/beacon.js +9 -6
- package/es/components/breadcrumbs/breadcrumb.js +0 -10
- package/es/components/breadcrumbs/breadcrumbs.js +0 -10
- package/es/components/code/code.js +2 -2
- package/es/components/code/code.styles.js +2 -4
- package/es/components/code/code_block.js +5 -3
- package/es/components/code/code_block.styles.js +4 -7
- package/es/components/code/code_block_controls.js +2 -2
- package/es/components/code/code_block_controls.styles.js +2 -4
- package/es/components/code/code_block_full_screen.js +2 -2
- package/es/components/code/code_syntax.styles.js +39 -34
- package/es/components/comment_list/comment_event.js +3 -2
- package/es/components/comment_list/comment_event.styles.js +2 -18
- package/es/components/context_menu/context_menu.js +2 -6
- package/es/components/context_menu/context_menu_item.js +2 -14
- package/es/components/empty_prompt/empty_prompt.js +62 -65
- package/es/components/empty_prompt/empty_prompt.styles.js +115 -0
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +0 -10
- package/es/components/header/header_links/header_links.js +0 -10
- package/es/components/page/page_header/page_header_content.js +0 -10
- package/es/components/popover/popover.js +3 -15
- package/es/components/search_bar/search_bar.js +36 -32
- package/es/components/search_bar/search_bar.styles.js +22 -0
- package/es/components/text_truncate/text_truncate.js +4 -1
- package/es/components/tour/_tour_footer.js +97 -0
- package/es/components/tour/_tour_footer.styles.js +23 -0
- package/es/components/tour/_tour_header.js +37 -0
- package/es/components/tour/_tour_header.styles.js +20 -0
- package/es/components/tour/tour.styles.js +5 -28
- package/es/components/tour/tour_step.js +45 -130
- package/es/global_styling/mixins/_color.js +46 -13
- package/eui.d.ts +125 -66
- package/i18ntokens.json +94 -148
- package/lib/components/basic_table/basic_table.js +0 -9
- package/lib/components/basic_table/in_memory_table.js +0 -10
- package/lib/components/beacon/beacon.js +11 -6
- package/lib/components/breadcrumbs/breadcrumb.js +0 -10
- package/lib/components/code/code.js +2 -2
- package/lib/components/code/code.styles.js +2 -4
- package/lib/components/code/code_block.js +5 -3
- package/lib/components/code/code_block.styles.js +4 -7
- package/lib/components/code/code_block_controls.js +2 -2
- package/lib/components/code/code_block_controls.styles.js +2 -4
- package/lib/components/code/code_block_full_screen.js +2 -2
- package/lib/components/code/code_syntax.styles.js +40 -36
- package/lib/components/comment_list/comment_event.js +2 -1
- package/lib/components/comment_list/comment_event.styles.js +3 -20
- package/lib/components/context_menu/context_menu.js +2 -6
- package/lib/components/context_menu/context_menu_item.js +2 -14
- package/lib/components/empty_prompt/empty_prompt.js +64 -64
- package/lib/components/empty_prompt/empty_prompt.styles.js +120 -0
- package/lib/components/popover/popover.js +3 -15
- package/lib/components/search_bar/search_bar.js +37 -33
- package/lib/components/search_bar/search_bar.styles.js +30 -0
- package/lib/components/text_truncate/text_truncate.js +4 -1
- package/lib/components/tour/_tour_footer.js +105 -0
- package/lib/components/tour/_tour_footer.styles.js +31 -0
- package/lib/components/tour/_tour_header.js +48 -0
- package/lib/components/tour/_tour_header.styles.js +27 -0
- package/lib/components/tour/tour.styles.js +7 -32
- package/lib/components/tour/tour_step.js +42 -117
- package/lib/global_styling/mixins/_color.js +50 -15
- package/optimize/es/components/basic_table/basic_table.js +0 -9
- package/optimize/es/components/basic_table/in_memory_table.js +0 -10
- package/optimize/es/components/beacon/beacon.js +9 -6
- package/optimize/es/components/code/code.js +2 -2
- package/optimize/es/components/code/code.styles.js +2 -4
- package/optimize/es/components/code/code_block.js +5 -3
- package/optimize/es/components/code/code_block.styles.js +4 -7
- package/optimize/es/components/code/code_block_controls.js +2 -2
- package/optimize/es/components/code/code_block_controls.styles.js +2 -4
- package/optimize/es/components/code/code_block_full_screen.js +2 -2
- package/optimize/es/components/code/code_syntax.styles.js +39 -34
- package/optimize/es/components/comment_list/comment_event.js +3 -2
- package/optimize/es/components/comment_list/comment_event.styles.js +2 -18
- package/optimize/es/components/context_menu/context_menu.js +2 -6
- package/optimize/es/components/context_menu/context_menu_item.js +2 -6
- package/optimize/es/components/empty_prompt/empty_prompt.js +62 -62
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +112 -0
- package/optimize/es/components/popover/popover.js +3 -5
- package/optimize/es/components/search_bar/search_bar.js +36 -32
- package/optimize/es/components/search_bar/search_bar.styles.js +22 -0
- package/optimize/es/components/text_truncate/text_truncate.js +4 -1
- package/optimize/es/components/tour/_tour_footer.js +89 -0
- package/optimize/es/components/tour/_tour_footer.styles.js +23 -0
- package/optimize/es/components/tour/_tour_header.js +33 -0
- package/optimize/es/components/tour/_tour_header.styles.js +20 -0
- package/optimize/es/components/tour/tour.styles.js +5 -28
- package/optimize/es/components/tour/tour_step.js +45 -113
- package/optimize/es/global_styling/mixins/_color.js +46 -13
- package/optimize/lib/components/basic_table/basic_table.js +0 -9
- package/optimize/lib/components/basic_table/in_memory_table.js +0 -10
- package/optimize/lib/components/beacon/beacon.js +12 -6
- package/optimize/lib/components/code/code.js +2 -2
- package/optimize/lib/components/code/code.styles.js +2 -4
- package/optimize/lib/components/code/code_block.js +5 -3
- package/optimize/lib/components/code/code_block.styles.js +4 -7
- package/optimize/lib/components/code/code_block_controls.js +2 -2
- package/optimize/lib/components/code/code_block_controls.styles.js +2 -4
- package/optimize/lib/components/code/code_block_full_screen.js +2 -2
- package/optimize/lib/components/code/code_syntax.styles.js +40 -36
- package/optimize/lib/components/comment_list/comment_event.js +2 -1
- package/optimize/lib/components/comment_list/comment_event.styles.js +3 -20
- package/optimize/lib/components/context_menu/context_menu.js +2 -6
- package/optimize/lib/components/context_menu/context_menu_item.js +2 -6
- package/optimize/lib/components/empty_prompt/empty_prompt.js +65 -62
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +118 -0
- package/optimize/lib/components/popover/popover.js +3 -5
- package/optimize/lib/components/search_bar/search_bar.js +37 -33
- package/optimize/lib/components/search_bar/search_bar.styles.js +30 -0
- package/optimize/lib/components/text_truncate/text_truncate.js +4 -1
- package/optimize/lib/components/tour/_tour_footer.js +100 -0
- package/optimize/lib/components/tour/_tour_footer.styles.js +31 -0
- package/optimize/lib/components/tour/_tour_header.js +43 -0
- package/optimize/lib/components/tour/_tour_header.styles.js +27 -0
- package/optimize/lib/components/tour/tour.styles.js +7 -32
- package/optimize/lib/components/tour/tour_step.js +42 -110
- package/optimize/lib/global_styling/mixins/_color.js +50 -15
- package/package.json +1 -1
- package/src/components/index.scss +0 -2
- package/test-env/components/basic_table/basic_table.js +0 -9
- package/test-env/components/basic_table/in_memory_table.js +0 -10
- package/test-env/components/beacon/beacon.js +12 -6
- package/test-env/components/breadcrumbs/breadcrumb.js +0 -10
- package/test-env/components/code/code.styles.js +2 -4
- package/test-env/components/code/code_block.styles.js +4 -7
- package/test-env/components/code/code_block_controls.js +2 -2
- package/test-env/components/code/code_block_controls.styles.js +2 -4
- package/test-env/components/code/code_block_full_screen.js +2 -2
- package/test-env/components/code/code_syntax.styles.js +40 -36
- package/test-env/components/comment_list/comment_event.js +2 -1
- package/test-env/components/comment_list/comment_event.styles.js +3 -20
- package/test-env/components/context_menu/context_menu.js +2 -6
- package/test-env/components/context_menu/context_menu_item.js +2 -14
- package/test-env/components/empty_prompt/empty_prompt.js +65 -62
- package/test-env/components/empty_prompt/empty_prompt.styles.js +118 -0
- package/test-env/components/popover/popover.js +3 -15
- package/test-env/components/search_bar/search_bar.js +37 -33
- package/test-env/components/search_bar/search_bar.styles.js +30 -0
- package/test-env/components/text_truncate/text_truncate.js +4 -1
- package/test-env/components/tour/_tour_footer.js +100 -0
- package/test-env/components/tour/_tour_footer.styles.js +31 -0
- package/test-env/components/tour/_tour_header.js +48 -0
- package/test-env/components/tour/_tour_header.styles.js +27 -0
- package/test-env/components/tour/tour.styles.js +7 -32
- package/test-env/components/tour/tour_step.js +42 -114
- package/test-env/global_styling/mixins/_color.js +50 -15
- package/src/components/empty_prompt/_empty_prompt.scss +0 -128
- package/src/components/empty_prompt/_index.scss +0 -1
- package/src/components/search_bar/_index.scss +0 -1
- package/src/components/search_bar/_search_bar.scss +0 -10
|
@@ -6,25 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.EuiTourStep = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _global_styling = require("../../global_styling");
|
|
17
17
|
var _beacon = require("../beacon");
|
|
18
|
-
var _button = require("../button");
|
|
19
|
-
var _flex = require("../flex");
|
|
20
|
-
var _i18n = require("../i18n");
|
|
21
18
|
var _popover = require("../popover");
|
|
22
|
-
var _title = require("../title");
|
|
23
|
-
var _tour_step_indicator = require("./tour_step_indicator");
|
|
24
19
|
var _services = require("../../services");
|
|
20
|
+
var _tour_header = require("./_tour_header");
|
|
21
|
+
var _tour_footer = require("./_tour_footer");
|
|
25
22
|
var _tour = require("./tour.styles");
|
|
26
23
|
var _react2 = require("@emotion/react");
|
|
27
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "
|
|
24
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "footerAction", "panelProps", "panelClassName"];
|
|
28
25
|
/*
|
|
29
26
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
30
27
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -56,17 +53,17 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
56
53
|
_ref$step = _ref.step,
|
|
57
54
|
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
58
55
|
stepsTotal = _ref.stepsTotal,
|
|
59
|
-
style = _ref.style,
|
|
60
56
|
subtitle = _ref.subtitle,
|
|
61
57
|
title = _ref.title,
|
|
62
58
|
_ref$decoration = _ref.decoration,
|
|
63
59
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
64
60
|
footerAction = _ref.footerAction,
|
|
65
61
|
panelProps = _ref.panelProps,
|
|
62
|
+
panelClassName = _ref.panelClassName,
|
|
66
63
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
67
64
|
var titleId = (0, _services.useGeneratedHtmlId)();
|
|
68
65
|
if (step === 0) {
|
|
69
|
-
console.warn('EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.');
|
|
66
|
+
console.warn('EuiTourStep `step` should use 1-based indexing. Please update to eliminate 0 indexes.');
|
|
70
67
|
}
|
|
71
68
|
var _useState = (0, _react.useState)(null),
|
|
72
69
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -76,11 +73,10 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
76
73
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
77
74
|
popoverPosition = _useState4[0],
|
|
78
75
|
setPopoverPosition = _useState4[1];
|
|
79
|
-
var onPositionChange = function
|
|
76
|
+
var onPositionChange = (0, _react.useCallback)(function (position) {
|
|
80
77
|
setPopoverPosition(position);
|
|
81
|
-
};
|
|
78
|
+
}, []);
|
|
82
79
|
(0, _react.useEffect)(function () {
|
|
83
|
-
var timeout;
|
|
84
80
|
if (anchor) {
|
|
85
81
|
// Wait until next tick to find anchor node in case it's not already
|
|
86
82
|
// in DOM requestAnimationFrame isn't used here because we don't need to
|
|
@@ -88,126 +84,62 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
88
84
|
// needs to go through a react DOM rerender which may take more than
|
|
89
85
|
// 1 frame (16ms) of time.
|
|
90
86
|
// TODO: It would be ideal to have some kind of intersection observer here instead
|
|
91
|
-
timeout = window.setTimeout(function () {
|
|
87
|
+
var timeout = window.setTimeout(function () {
|
|
92
88
|
setAnchorNode((0, _services.findElementBySelectorOrRef)(anchor));
|
|
93
89
|
});
|
|
90
|
+
return function () {
|
|
91
|
+
return window.clearTimeout(timeout);
|
|
92
|
+
};
|
|
94
93
|
}
|
|
95
|
-
return function () {
|
|
96
|
-
timeout && window.clearTimeout(timeout);
|
|
97
|
-
};
|
|
98
94
|
}, [anchor]);
|
|
99
|
-
var
|
|
95
|
+
var anchorClasses = (0, _classnames.default)('euiTourAnchor', className);
|
|
96
|
+
var popoverClasses = (0, _classnames.default)('euiTour', panelClassName);
|
|
100
97
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
101
98
|
var tourStyles = (0, _tour.euiTourStyles)(euiTheme);
|
|
102
|
-
var headerStyles = (0, _tour.euiTourHeaderStyles)(euiTheme);
|
|
103
|
-
var footerStyles = (0, _tour.euiTourFooterStyles)(euiTheme);
|
|
104
99
|
var beaconStyles = (0, _tour.euiTourBeaconStyles)(euiTheme);
|
|
105
100
|
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
106
|
-
var finishButtonProps = {
|
|
107
|
-
color: 'text',
|
|
108
|
-
flush: 'right',
|
|
109
|
-
size: 'xs'
|
|
110
|
-
};
|
|
111
|
-
var optionalFooterAction = Array.isArray(footerAction) ? (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
112
|
-
gutterSize: "s",
|
|
113
|
-
alignItems: "center",
|
|
114
|
-
justifyContent: "flexEnd",
|
|
115
|
-
responsive: false,
|
|
116
|
-
wrap: true
|
|
117
|
-
}, footerAction.map(function (action, index) {
|
|
118
|
-
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
119
|
-
key: index,
|
|
120
|
-
grow: false
|
|
121
|
-
}, action);
|
|
122
|
-
})) : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
123
|
-
grow: false
|
|
124
|
-
}, footerAction);
|
|
125
|
-
var footer = (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
126
|
-
responsive: false,
|
|
127
|
-
justifyContent: stepsTotal > 1 ? 'spaceBetween' : 'flexEnd',
|
|
128
|
-
alignItems: "center"
|
|
129
|
-
}, stepsTotal > 1 && (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
130
|
-
grow: false
|
|
131
|
-
}, (0, _react2.jsx)("ul", {
|
|
132
|
-
className: "euiTourFooter__stepList"
|
|
133
|
-
}, (0, _toConsumableArray2.default)(Array(stepsTotal).keys()).map(function (_, i) {
|
|
134
|
-
var status = 'complete';
|
|
135
|
-
if (step === i + 1) {
|
|
136
|
-
status = 'active';
|
|
137
|
-
} else if (step <= i) {
|
|
138
|
-
status = 'incomplete';
|
|
139
|
-
}
|
|
140
|
-
return (0, _react2.jsx)(_tour_step_indicator.EuiTourStepIndicator, {
|
|
141
|
-
key: i,
|
|
142
|
-
number: i + 1,
|
|
143
|
-
status: status
|
|
144
|
-
});
|
|
145
|
-
}))), footerAction ? optionalFooterAction : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
146
|
-
grow: false
|
|
147
|
-
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
148
|
-
tokens: ['euiTourStep.endTour', 'euiTourStep.skipTour', 'euiTourStep.closeTour'],
|
|
149
|
-
defaults: ['End tour', 'Skip tour', 'Close tour']
|
|
150
|
-
}, function (_ref2) {
|
|
151
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 3),
|
|
152
|
-
endTour = _ref3[0],
|
|
153
|
-
skipTour = _ref3[1],
|
|
154
|
-
closeTour = _ref3[2];
|
|
155
|
-
var content = closeTour;
|
|
156
|
-
if (stepsTotal > 1) {
|
|
157
|
-
content = stepsTotal === step ? endTour : skipTour;
|
|
158
|
-
}
|
|
159
|
-
return (0, _react2.jsx)(_button.EuiButtonEmpty, (0, _extends2.default)({
|
|
160
|
-
onClick: onFinish
|
|
161
|
-
}, finishButtonProps), content);
|
|
162
|
-
})));
|
|
163
101
|
var hasBeacon = decoration === 'beacon';
|
|
164
|
-
var
|
|
102
|
+
var widthStyles = (0, _react.useMemo)(function () {
|
|
103
|
+
return (0, _global_styling.logicalStyles)({
|
|
104
|
+
minWidth: minWidth,
|
|
105
|
+
maxWidth: maxWidth
|
|
106
|
+
});
|
|
107
|
+
}, [minWidth, maxWidth]);
|
|
108
|
+
var noAnchor = !anchor && children;
|
|
109
|
+
var PopoverComponent = noAnchor ? _popover.EuiPopover : _popover.EuiWrappingPopover;
|
|
110
|
+
var button = noAnchor ? children : anchorNode;
|
|
111
|
+
return button ? (0, _react2.jsx)(PopoverComponent, (0, _extends2.default)({
|
|
112
|
+
button: button,
|
|
113
|
+
className: anchorClasses,
|
|
165
114
|
anchorPosition: anchorPosition,
|
|
166
115
|
closePopover: closePopover,
|
|
167
116
|
isOpen: isStepOpen,
|
|
168
117
|
ownFocus: false,
|
|
169
|
-
panelClassName:
|
|
170
|
-
panelStyle: style,
|
|
118
|
+
panelClassName: popoverClasses,
|
|
171
119
|
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
172
120
|
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
173
121
|
}),
|
|
174
122
|
offset: hasBeacon ? 10 : 0,
|
|
175
|
-
|
|
123
|
+
"aria-labelledby": titleId,
|
|
176
124
|
arrowChildren: hasBeacon && (0, _react2.jsx)(_beacon.EuiBeacon, {
|
|
177
125
|
css: beaconCss,
|
|
178
126
|
className: "euiTour__beacon"
|
|
179
127
|
}),
|
|
180
128
|
onPositionChange: onPositionChange
|
|
181
|
-
}, rest)
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}, (0, _react2.jsx)(
|
|
188
|
-
css: headerStyles.euiTourHeader,
|
|
189
|
-
className: "euiTourHeader",
|
|
190
|
-
id: titleId
|
|
191
|
-
}, subtitle && (0, _react2.jsx)(_title.EuiTitle, {
|
|
192
|
-
css: headerStyles.euiTourHeader__subtitle,
|
|
193
|
-
size: "xxxs"
|
|
194
|
-
}, (0, _react2.jsx)("h2", null, subtitle)), (0, _react2.jsx)(_title.EuiTitle, {
|
|
195
|
-
css: headerStyles.euiTourHeader__title,
|
|
196
|
-
size: "xxs"
|
|
197
|
-
}, subtitle ? (0, _react2.jsx)("h3", null, title) : (0, _react2.jsx)("h2", null, title))), (0, _react2.jsx)("div", {
|
|
129
|
+
}, rest), (0, _react2.jsx)("div", {
|
|
130
|
+
style: widthStyles
|
|
131
|
+
}, (0, _react2.jsx)(_tour_header.EuiTourHeader, {
|
|
132
|
+
id: titleId,
|
|
133
|
+
title: title,
|
|
134
|
+
subtitle: subtitle
|
|
135
|
+
}), (0, _react2.jsx)("div", {
|
|
198
136
|
className: "euiTour__content"
|
|
199
|
-
}, content), (0, _react2.jsx)(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
button: children
|
|
206
|
-
}, popoverProps), layout);
|
|
207
|
-
}
|
|
208
|
-
return anchorNode ? (0, _react2.jsx)(_popover.EuiWrappingPopover, (0, _extends2.default)({
|
|
209
|
-
button: anchorNode
|
|
210
|
-
}, popoverProps), layout) : null;
|
|
137
|
+
}, content), (0, _react2.jsx)(_tour_footer.EuiTourFooter, {
|
|
138
|
+
footerAction: footerAction,
|
|
139
|
+
step: step,
|
|
140
|
+
stepsTotal: stepsTotal,
|
|
141
|
+
onFinish: onFinish
|
|
142
|
+
}))) : null;
|
|
211
143
|
};
|
|
212
144
|
exports.EuiTourStep = EuiTourStep;
|
|
213
145
|
EuiTourStep.propTypes = {
|
|
@@ -248,10 +180,6 @@ EuiTourStep.propTypes = {
|
|
|
248
180
|
* The total number of steps in the tour
|
|
249
181
|
*/
|
|
250
182
|
stepsTotal: _propTypes.default.number.isRequired,
|
|
251
|
-
/**
|
|
252
|
-
* Optional, standard DOM `style` attribute. Passed to the EuiPopover panel.
|
|
253
|
-
*/
|
|
254
|
-
style: _propTypes.default.any,
|
|
255
183
|
/**
|
|
256
184
|
* Smaller title text that appears atop each step in the tour. The subtitle gets wrapped in the appropriate heading level.
|
|
257
185
|
*/
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiBackgroundColorCSS = exports.useEuiBackgroundColor = exports.euiBackgroundColor = exports.BACKGROUND_COLORS = void 0;
|
|
7
|
-
var _react = require("
|
|
6
|
+
exports.useEuiBorderColorCSS = exports.useEuiBackgroundColorCSS = exports.useEuiBackgroundColor = exports.euiBorderColor = exports.euiBackgroundColor = exports.BACKGROUND_COLORS = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@emotion/react");
|
|
8
9
|
var _services = require("../../services");
|
|
9
10
|
/*
|
|
10
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -31,7 +32,7 @@ var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
|
|
|
31
32
|
return (0, _services.transparentize)(euiTheme.colors[color], 0.1);
|
|
32
33
|
}
|
|
33
34
|
} else {
|
|
34
|
-
var
|
|
35
|
+
var _tintOrShade = function _tintOrShade(color) {
|
|
35
36
|
return colorMode === 'DARK' ? (0, _services.shade)(color, 0.8) : (0, _services.tint)(color, 0.9);
|
|
36
37
|
};
|
|
37
38
|
switch (color) {
|
|
@@ -40,7 +41,7 @@ var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
|
|
|
40
41
|
case 'subdued':
|
|
41
42
|
return euiTheme.colors.body;
|
|
42
43
|
default:
|
|
43
|
-
return
|
|
44
|
+
return _tintOrShade(euiTheme.colors[color]);
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
};
|
|
@@ -55,15 +56,49 @@ var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
|
|
|
55
56
|
};
|
|
56
57
|
exports.useEuiBackgroundColor = useEuiBackgroundColor;
|
|
57
58
|
var useEuiBackgroundColorCSS = function useEuiBackgroundColorCSS() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
60
|
+
return (0, _react.useMemo)(function () {
|
|
61
|
+
return {
|
|
62
|
+
transparent: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'transparent'), ";;label:transparent;"),
|
|
63
|
+
plain: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'plain'), ";;label:plain;"),
|
|
64
|
+
subdued: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'subdued'), ";;label:subdued;"),
|
|
65
|
+
accent: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'accent'), ";;label:accent;"),
|
|
66
|
+
primary: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'primary'), ";;label:primary;"),
|
|
67
|
+
success: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'success'), ";;label:success;"),
|
|
68
|
+
warning: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'warning'), ";;label:warning;"),
|
|
69
|
+
danger: /*#__PURE__*/(0, _react2.css)("background-color:", euiBackgroundColor(euiThemeContext, 'danger'), ";;label:danger;")
|
|
70
|
+
};
|
|
71
|
+
}, [euiThemeContext]);
|
|
72
|
+
};
|
|
73
|
+
exports.useEuiBackgroundColorCSS = useEuiBackgroundColorCSS;
|
|
74
|
+
var euiBorderColor = function euiBorderColor(_ref4, color) {
|
|
75
|
+
var euiTheme = _ref4.euiTheme,
|
|
76
|
+
colorMode = _ref4.colorMode;
|
|
77
|
+
switch (color) {
|
|
78
|
+
case 'transparent':
|
|
79
|
+
case 'plain':
|
|
80
|
+
case 'subdued':
|
|
81
|
+
return euiTheme.border.color;
|
|
82
|
+
case 'warning':
|
|
83
|
+
return (0, _services.tintOrShade)(euiTheme.colors.warning, 0.4, colorMode);
|
|
84
|
+
default:
|
|
85
|
+
return (0, _services.tintOrShade)(euiTheme.colors[color], 0.6, colorMode);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.euiBorderColor = euiBorderColor;
|
|
89
|
+
var useEuiBorderColorCSS = function useEuiBorderColorCSS() {
|
|
90
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
91
|
+
return (0, _react.useMemo)(function () {
|
|
92
|
+
return {
|
|
93
|
+
transparent: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'transparent'), ";;label:transparent;"),
|
|
94
|
+
plain: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'plain'), ";;label:plain;"),
|
|
95
|
+
subdued: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'subdued'), ";;label:subdued;"),
|
|
96
|
+
accent: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'accent'), ";;label:accent;"),
|
|
97
|
+
primary: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'primary'), ";;label:primary;"),
|
|
98
|
+
success: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'success'), ";;label:success;"),
|
|
99
|
+
warning: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'warning'), ";;label:warning;"),
|
|
100
|
+
danger: /*#__PURE__*/(0, _react2.css)("border-color:", euiBorderColor(euiThemeContext, 'danger'), ";;label:danger;")
|
|
101
|
+
};
|
|
102
|
+
}, [euiThemeContext]);
|
|
68
103
|
};
|
|
69
|
-
exports.
|
|
104
|
+
exports.useEuiBorderColorCSS = useEuiBorderColorCSS;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
.euiEmptyPrompt {
|
|
2
|
-
text-align: center;
|
|
3
|
-
margin: auto;
|
|
4
|
-
|
|
5
|
-
@include euiBreakpoint('l', 'xl') {
|
|
6
|
-
max-width: max-content; // the width becomes as wide as necessary to contain all of its contents
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.euiEmptyPrompt__icon {
|
|
10
|
-
// Consumers should use an EuiImage (recommended) with the horizontal layout
|
|
11
|
-
// But they can use for example an img or other react node
|
|
12
|
-
> * {
|
|
13
|
-
flex-shrink: 1;
|
|
14
|
-
max-width: convertToRem(360px);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Footer background colors
|
|
19
|
-
@each $modifier, $color in $euiPanelBackgroundColorModifiers {
|
|
20
|
-
@if ($modifier == 'transparent') {
|
|
21
|
-
&.euiPanel--#{$modifier} {
|
|
22
|
-
.euiEmptyPrompt__footer {
|
|
23
|
-
background-color: $euiPageBackgroundColor;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:not(.euiPanel--hasBorder) .euiEmptyPrompt__footer {
|
|
27
|
-
border-radius: $euiBorderRadius;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.euiPanel--hasBorder .euiEmptyPrompt__footer {
|
|
31
|
-
border-radius: 0 0 $euiBorderRadius $euiBorderRadius;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
} @else if ($modifier == 'plain') {
|
|
35
|
-
&.euiPanel--#{$modifier} .euiEmptyPrompt__footer {
|
|
36
|
-
background-color: $euiPageBackgroundColor;
|
|
37
|
-
border-radius: 0 0 $euiBorderRadius $euiBorderRadius;
|
|
38
|
-
}
|
|
39
|
-
} @else if ($modifier == 'subdued') {
|
|
40
|
-
&.euiPanel--#{$modifier} .euiEmptyPrompt__footer {
|
|
41
|
-
border-top: $euiBorderThin;
|
|
42
|
-
border-radius: 0 0 $euiBorderRadius $euiBorderRadius;
|
|
43
|
-
}
|
|
44
|
-
} @else {
|
|
45
|
-
&.euiPanel--#{$modifier} .euiEmptyPrompt__footer {
|
|
46
|
-
border-top: 1px solid lightOrDarkTheme(darken($color, 10%), lighten($color, 6%));
|
|
47
|
-
border-radius: 0 0 $euiBorderRadius $euiBorderRadius;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
$euiEmptyPromptContentMaxWidth: 36em;
|
|
54
|
-
|
|
55
|
-
.euiEmptyPrompt--vertical {
|
|
56
|
-
.euiEmptyPrompt__main {
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.euiEmptyPrompt__contentInner {
|
|
63
|
-
max-width: $euiEmptyPromptContentMaxWidth;
|
|
64
|
-
margin: auto;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.euiEmptyPrompt__icon {
|
|
68
|
-
margin-bottom: $euiSize;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.euiEmptyPrompt--horizontal {
|
|
73
|
-
@include euiBreakpoint('l', 'xl') {
|
|
74
|
-
justify-content: flex-start;
|
|
75
|
-
text-align: left;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.euiEmptyPrompt__main {
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
align-items: center;
|
|
82
|
-
|
|
83
|
-
@include euiBreakpoint('l', 'xl') {
|
|
84
|
-
flex-direction: row-reverse;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.euiEmptyPrompt__icon {
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
|
|
93
|
-
@include euiBreakpoint('l', 'xl') {
|
|
94
|
-
min-width: 40%;
|
|
95
|
-
max-width: 50%;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.euiEmptyPrompt__content {
|
|
100
|
-
max-width: $euiEmptyPromptContentMaxWidth;
|
|
101
|
-
|
|
102
|
-
@include euiBreakpoint('l', 'xl') {
|
|
103
|
-
padding: $euiSizeL 0;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.euiEmptyPrompt__actions {
|
|
108
|
-
@include euiBreakpoint('l', 'xl') {
|
|
109
|
-
justify-content: flex-start;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Padding
|
|
115
|
-
@each $modifier, $amount in $euiPanelPaddingModifiers {
|
|
116
|
-
.euiEmptyPrompt--#{$modifier} {
|
|
117
|
-
.euiEmptyPrompt__main,
|
|
118
|
-
.euiEmptyPrompt__footer {
|
|
119
|
-
padding: $amount;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&.euiEmptyPrompt--horizontal {
|
|
123
|
-
.euiEmptyPrompt__main {
|
|
124
|
-
gap: $amount;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import 'empty_prompt';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import './search_bar';
|