@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
|
@@ -247,15 +247,6 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* @deprecated Use `selection.selected` instead to declaratively control table selection
|
|
253
|
-
*/
|
|
254
|
-
}, {
|
|
255
|
-
key: "setSelection",
|
|
256
|
-
value: function setSelection(newSelection) {
|
|
257
|
-
this.changeSelection(newSelection);
|
|
258
|
-
}
|
|
259
250
|
}, {
|
|
260
251
|
key: "buildCriteria",
|
|
261
252
|
value: function buildCriteria(props) {
|
|
@@ -125,7 +125,6 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
125
125
|
var _this;
|
|
126
126
|
_classCallCheck(this, EuiInMemoryTable);
|
|
127
127
|
_this = _super.call(this, props);
|
|
128
|
-
_defineProperty(_assertThisInitialized(_this), "tableRef", void 0);
|
|
129
128
|
_defineProperty(_assertThisInitialized(_this), "onTableChange", function (_ref4) {
|
|
130
129
|
var page = _ref4.page,
|
|
131
130
|
sort = _ref4.sort;
|
|
@@ -258,17 +257,9 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
258
257
|
allowNeutralSort: allowNeutralSort !== false,
|
|
259
258
|
showPerPageOptions: showPerPageOptions
|
|
260
259
|
};
|
|
261
|
-
_this.tableRef = /*#__PURE__*/React.createRef();
|
|
262
260
|
return _this;
|
|
263
261
|
}
|
|
264
262
|
_createClass(EuiInMemoryTable, [{
|
|
265
|
-
key: "setSelection",
|
|
266
|
-
value: function setSelection(newSelection) {
|
|
267
|
-
if (this.tableRef.current) {
|
|
268
|
-
this.tableRef.current.setSelection(newSelection);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}, {
|
|
272
263
|
key: "renderSearchBar",
|
|
273
264
|
value: function renderSearchBar() {
|
|
274
265
|
var _this$props = this.props,
|
|
@@ -437,7 +428,6 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
437
428
|
var table =
|
|
438
429
|
// @ts-ignore complex relationship between pagination's existence and criteria, the code logic ensures this is correctly maintained
|
|
439
430
|
___EmotionJSX(EuiBasicTable, _extends({
|
|
440
|
-
ref: this.tableRef,
|
|
441
431
|
items: items,
|
|
442
432
|
itemId: itemId,
|
|
443
433
|
rowProps: rowProps,
|
|
@@ -16,11 +16,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import React from 'react';
|
|
19
|
+
import React, { useMemo } from 'react';
|
|
20
20
|
import PropTypes from "prop-types";
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
-
import {
|
|
22
|
+
import { logicalStyles } from '../../global_styling';
|
|
23
23
|
import { useEuiTheme } from '../../services';
|
|
24
|
+
import { euiBeaconStyles } from './beacon.styles';
|
|
24
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
26
|
export var COLORS = ['subdued', 'primary', 'success', 'accent', 'danger', 'warning'];
|
|
26
27
|
export var EuiBeacon = function EuiBeacon(_ref) {
|
|
@@ -35,10 +36,12 @@ export var EuiBeacon = function EuiBeacon(_ref) {
|
|
|
35
36
|
var classes = classNames('euiBeacon', className);
|
|
36
37
|
var styles = euiBeaconStyles(euiTheme);
|
|
37
38
|
var cssStyles = [styles.euiBeacon, styles[color]];
|
|
38
|
-
var beaconStyle =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
var beaconStyle = useMemo(function () {
|
|
40
|
+
return logicalStyles(_objectSpread(_objectSpread({}, style), {}, {
|
|
41
|
+
height: size,
|
|
42
|
+
width: size
|
|
43
|
+
}));
|
|
44
|
+
}, [style, size]);
|
|
42
45
|
return ___EmotionJSX("div", _extends({
|
|
43
46
|
className: classes,
|
|
44
47
|
css: cssStyles,
|
|
@@ -180,12 +180,6 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
180
180
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
181
181
|
*/
|
|
182
182
|
popoverProps: PropTypes.shape({
|
|
183
|
-
/**
|
|
184
|
-
* Class name passed to the direct parent of the button
|
|
185
|
-
*
|
|
186
|
-
* @deprecated Use `className` instead
|
|
187
|
-
*/
|
|
188
|
-
anchorClassName: PropTypes.string,
|
|
189
183
|
/**
|
|
190
184
|
* Alignment of the popover and arrow relative to the button
|
|
191
185
|
*/
|
|
@@ -195,10 +189,6 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
195
189
|
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
196
190
|
*/
|
|
197
191
|
attachToAnchor: PropTypes.bool,
|
|
198
|
-
/**
|
|
199
|
-
* @deprecated Use `popoverRef` instead
|
|
200
|
-
*/
|
|
201
|
-
buttonRef: PropTypes.any,
|
|
202
192
|
/**
|
|
203
193
|
* Restrict the popover's position within this element
|
|
204
194
|
*/
|
|
@@ -151,12 +151,6 @@ EuiBreadcrumbs.propTypes = {
|
|
|
151
151
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
152
152
|
*/
|
|
153
153
|
popoverProps: PropTypes.shape({
|
|
154
|
-
/**
|
|
155
|
-
* Class name passed to the direct parent of the button
|
|
156
|
-
*
|
|
157
|
-
* @deprecated Use `className` instead
|
|
158
|
-
*/
|
|
159
|
-
anchorClassName: PropTypes.string,
|
|
160
154
|
/**
|
|
161
155
|
* Alignment of the popover and arrow relative to the button
|
|
162
156
|
*/
|
|
@@ -166,10 +160,6 @@ EuiBreadcrumbs.propTypes = {
|
|
|
166
160
|
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
167
161
|
*/
|
|
168
162
|
attachToAnchor: PropTypes.bool,
|
|
169
|
-
/**
|
|
170
|
-
* @deprecated Use `popoverRef` instead
|
|
171
|
-
*/
|
|
172
|
-
buttonRef: PropTypes.any,
|
|
173
163
|
/**
|
|
174
164
|
* Restrict the popover's position within this element
|
|
175
165
|
*/
|
|
@@ -16,6 +16,7 @@ import { highlight } from 'refractor';
|
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import { DEFAULT_LANGUAGE, checkSupportedLanguage, getHtmlContent } from './utils';
|
|
18
18
|
import { useEuiTheme } from '../../services';
|
|
19
|
+
import { useEuiCodeSyntaxVariables } from './code_syntax.styles';
|
|
19
20
|
import { euiCodeStyles } from './code.styles';
|
|
20
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
22
|
export var EuiCode = function EuiCode(_ref) {
|
|
@@ -39,8 +40,7 @@ export var EuiCode = function EuiCode(_ref) {
|
|
|
39
40
|
return getHtmlContent(data, children);
|
|
40
41
|
}, [data, children]);
|
|
41
42
|
var classes = classNames('euiCode', className);
|
|
42
|
-
var
|
|
43
|
-
var styles = euiCodeStyles(euiTheme);
|
|
43
|
+
var styles = euiCodeStyles(useEuiTheme(), useEuiCodeSyntaxVariables());
|
|
44
44
|
var cssStyles = [styles.euiCode, transparentBackground && styles.transparentBackground];
|
|
45
45
|
return ___EmotionJSX("code", _extends({
|
|
46
46
|
className: classes,
|
|
@@ -9,7 +9,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { logicalShorthandCSS } from '../../global_styling';
|
|
12
|
-
import { euiCodeSyntaxColors, euiCodeSyntaxTokens } from './code_syntax.styles';
|
|
13
12
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
13
|
name: "gfiv3z-transparentBackground",
|
|
15
14
|
styles: "background:transparent;label:transparentBackground;"
|
|
@@ -18,14 +17,13 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
18
17
|
styles: "background:transparent;label:transparentBackground;",
|
|
19
18
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
19
|
};
|
|
21
|
-
export var euiCodeStyles = function euiCodeStyles(euiThemeContext) {
|
|
20
|
+
export var euiCodeStyles = function euiCodeStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
22
21
|
var euiTheme = euiThemeContext.euiTheme;
|
|
23
|
-
var euiCodeSyntax = euiCodeSyntaxColors(euiThemeContext);
|
|
24
22
|
return {
|
|
25
23
|
/*
|
|
26
24
|
* 1. Size the code against the text its embedded within.
|
|
27
25
|
*/
|
|
28
|
-
euiCode: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", logicalShorthandCSS('padding', '0.2em 0.5em'), "background:",
|
|
26
|
+
euiCode: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", logicalShorthandCSS('padding', '0.2em 0.5em'), "background:", euiCodeSyntaxVariables.backgroundColor, ";border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", euiCodeSyntaxVariables.inlineCodeColor, ";", euiCodeSyntaxVariables.tokensCss, ";;label:euiCode;"),
|
|
29
27
|
transparentBackground: _ref
|
|
30
28
|
};
|
|
31
29
|
};
|
|
@@ -33,6 +33,7 @@ import { useFullScreen, EuiCodeBlockFullScreenWrapper } from './code_block_full_
|
|
|
33
33
|
import { EuiCodeBlockControls } from './code_block_controls';
|
|
34
34
|
import { EuiCodeBlockVirtualized } from './code_block_virtualized';
|
|
35
35
|
import { euiCodeBlockStyles, euiCodeBlockPreStyles, euiCodeBlockCodeStyles } from './code_block.styles';
|
|
36
|
+
import { useEuiCodeSyntaxVariables } from './code_syntax.styles';
|
|
36
37
|
|
|
37
38
|
// Based on observed line height for non-virtualized code blocks
|
|
38
39
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -67,6 +68,7 @@ export var EuiCodeBlock = function EuiCodeBlock(_ref) {
|
|
|
67
68
|
lineNumbers = _ref$lineNumbers === void 0 ? false : _ref$lineNumbers,
|
|
68
69
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
69
70
|
var euiTheme = useEuiTheme();
|
|
71
|
+
var euiCodeSyntaxVariables = useEuiCodeSyntaxVariables();
|
|
70
72
|
var language = useMemo(function () {
|
|
71
73
|
return checkSupportedLanguage(_language);
|
|
72
74
|
}, [_language]);
|
|
@@ -118,7 +120,7 @@ export var EuiCodeBlock = function EuiCodeBlock(_ref) {
|
|
|
118
120
|
onKeyDown = _useFullScreen.onKeyDown;
|
|
119
121
|
var hasControls = !!(copyButton || fullScreenButton);
|
|
120
122
|
var hasBothControls = !!(copyButton && fullScreenButton);
|
|
121
|
-
var styles = euiCodeBlockStyles(euiTheme);
|
|
123
|
+
var styles = euiCodeBlockStyles(euiTheme, euiCodeSyntaxVariables);
|
|
122
124
|
var cssStyles = [styles.euiCodeBlock, styles[fontSize], transparentBackground && styles.transparentBackground, hasControls && (hasBothControls ? styles.hasBothControls[paddingSize] : styles.hasControls[paddingSize])];
|
|
123
125
|
var _useMemo = useMemo(function () {
|
|
124
126
|
var isWhiteSpacePre = whiteSpace === 'pre' || isVirtualized;
|
|
@@ -143,14 +145,14 @@ export var EuiCodeBlock = function EuiCodeBlock(_ref) {
|
|
|
143
145
|
preProps = _useMemo2[0],
|
|
144
146
|
preFullscreenProps = _useMemo2[1];
|
|
145
147
|
var codeProps = useMemo(function () {
|
|
146
|
-
var styles = euiCodeBlockCodeStyles(euiTheme);
|
|
148
|
+
var styles = euiCodeBlockCodeStyles(euiTheme, euiCodeSyntaxVariables);
|
|
147
149
|
var cssStyles = [styles.euiCodeBlock__code, isVirtualized && styles.isVirtualized];
|
|
148
150
|
return _objectSpread({
|
|
149
151
|
className: 'euiCodeBlock__code',
|
|
150
152
|
css: cssStyles,
|
|
151
153
|
'data-code-language': language
|
|
152
154
|
}, rest);
|
|
153
|
-
}, [language, euiTheme, isVirtualized, rest]);
|
|
155
|
+
}, [language, euiTheme, euiCodeSyntaxVariables, isVirtualized, rest]);
|
|
154
156
|
return ___EmotionJSX("div", {
|
|
155
157
|
css: cssStyles,
|
|
156
158
|
className: classNames('euiCodeBlock', className),
|
|
@@ -22,7 +22,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
22
22
|
|
|
23
23
|
import { css } from '@emotion/react';
|
|
24
24
|
import { euiPaddingSize, euiFontSize, euiScrollBarStyles, mathWithUnits } from '../../global_styling';
|
|
25
|
-
import { euiCodeSyntaxColors, euiCodeSyntaxTokens } from './code_syntax.styles';
|
|
26
25
|
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
27
26
|
name: "i92zwx-isFullScreen",
|
|
28
27
|
styles: "position:fixed;inset:0;label:isFullScreen;"
|
|
@@ -39,11 +38,10 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
|
39
38
|
styles: "background:transparent;label:transparentBackground;",
|
|
40
39
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
41
40
|
};
|
|
42
|
-
export var euiCodeBlockStyles = function euiCodeBlockStyles(euiThemeContext) {
|
|
41
|
+
export var euiCodeBlockStyles = function euiCodeBlockStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
43
42
|
var euiTheme = euiThemeContext.euiTheme;
|
|
44
|
-
var euiCodeSyntax = euiCodeSyntaxColors(euiThemeContext);
|
|
45
43
|
return {
|
|
46
|
-
euiCodeBlock: /*#__PURE__*/css("max-inline-size:100%;display:block;position:relative;background:",
|
|
44
|
+
euiCodeBlock: /*#__PURE__*/css("max-inline-size:100%;display:block;position:relative;background:", euiCodeSyntaxVariables.backgroundColor, ";", euiCodeSyntaxVariables.tokensCss, ";;label:euiCodeBlock;"),
|
|
47
45
|
// Font size
|
|
48
46
|
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:s;"),
|
|
49
47
|
m: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";;label:m;"),
|
|
@@ -115,11 +113,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
115
113
|
styles: "position:relative;label:isVirtualized;",
|
|
116
114
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
117
115
|
};
|
|
118
|
-
export var euiCodeBlockCodeStyles = function euiCodeBlockCodeStyles(euiThemeContext) {
|
|
116
|
+
export var euiCodeBlockCodeStyles = function euiCodeBlockCodeStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
119
117
|
var euiTheme = euiThemeContext.euiTheme;
|
|
120
|
-
var euiCodeSyntax = euiCodeSyntaxColors(euiThemeContext);
|
|
121
118
|
return {
|
|
122
|
-
euiCodeBlock__code: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:inherit;color:",
|
|
119
|
+
euiCodeBlock__code: /*#__PURE__*/css("font-family:", euiTheme.font.familyCode, ";font-size:inherit;color:", euiCodeSyntaxVariables.color, ";display:block;;label:euiCodeBlock__code;"),
|
|
123
120
|
isVirtualized: _ref
|
|
124
121
|
};
|
|
125
122
|
};
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
import React, { Fragment } from 'react';
|
|
10
10
|
import { useEuiTheme } from '../../services';
|
|
11
|
+
import { useEuiCodeSyntaxVariables } from './code_syntax.styles';
|
|
11
12
|
import { euiCodeBlockControlsStyles } from './code_block_controls.styles';
|
|
12
13
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
14
|
export var EuiCodeBlockControls = function EuiCodeBlockControls(_ref) {
|
|
14
15
|
var paddingSize = _ref.paddingSize,
|
|
15
16
|
controls = _ref.controls;
|
|
16
|
-
var
|
|
17
|
-
var styles = euiCodeBlockControlsStyles(euiTheme);
|
|
17
|
+
var styles = euiCodeBlockControlsStyles(useEuiTheme(), useEuiCodeSyntaxVariables());
|
|
18
18
|
var cssStyles = [styles.euiCodeBlock__controls, styles.offset[paddingSize]];
|
|
19
19
|
var hasControls = controls.some(function (control) {
|
|
20
20
|
return !!control;
|
|
@@ -16,7 +16,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
16
16
|
|
|
17
17
|
import { css } from '@emotion/react';
|
|
18
18
|
import { euiPaddingSize } from '../../global_styling';
|
|
19
|
-
import { euiCodeSyntaxColors } from './code_syntax.styles';
|
|
20
19
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
21
20
|
name: "to86kv-none",
|
|
22
21
|
styles: "inset-block-start:0;inset-inline-end:0;label:none;"
|
|
@@ -25,11 +24,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
25
24
|
styles: "inset-block-start:0;inset-inline-end:0;label:none;",
|
|
26
25
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
26
|
};
|
|
28
|
-
export var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext) {
|
|
27
|
+
export var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
29
28
|
var euiTheme = euiThemeContext.euiTheme;
|
|
30
|
-
var euiCodeSyntax = euiCodeSyntaxColors(euiThemeContext);
|
|
31
29
|
return {
|
|
32
|
-
euiCodeBlock__controls: /*#__PURE__*/css("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:",
|
|
30
|
+
euiCodeBlock__controls: /*#__PURE__*/css("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:", euiCodeSyntaxVariables.backgroundColor, ";;label:euiCodeBlock__controls;"),
|
|
33
31
|
offset: {
|
|
34
32
|
none: _ref,
|
|
35
33
|
s: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 's'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
|
|
@@ -18,6 +18,7 @@ import { useEuiI18n } from '../i18n';
|
|
|
18
18
|
import { EuiButtonIcon } from '../button';
|
|
19
19
|
import { EuiFocusTrap } from '../focus_trap';
|
|
20
20
|
import { EuiOverlayMask } from '../overlay_mask';
|
|
21
|
+
import { useEuiCodeSyntaxVariables } from './code_syntax.styles';
|
|
21
22
|
import { euiCodeBlockStyles } from './code_block.styles';
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -73,8 +74,7 @@ export var useFullScreen = function useFullScreen(_ref) {
|
|
|
73
74
|
*/
|
|
74
75
|
export var EuiCodeBlockFullScreenWrapper = function EuiCodeBlockFullScreenWrapper(_ref2) {
|
|
75
76
|
var children = _ref2.children;
|
|
76
|
-
var
|
|
77
|
-
var styles = euiCodeBlockStyles(euiThemeContext);
|
|
77
|
+
var styles = euiCodeBlockStyles(useEuiTheme(), useEuiCodeSyntaxVariables());
|
|
78
78
|
var cssStyles = [styles.euiCodeBlock, styles.l,
|
|
79
79
|
// Force fullscreen to use large font
|
|
80
80
|
styles.isFullScreen];
|
|
@@ -6,39 +6,44 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import { useEuiTheme, makeHighContrastColor, euiPaletteColorBlind } from '../../services';
|
|
10
11
|
var visColors = euiPaletteColorBlind();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
12
|
+
|
|
13
|
+
// These variables are computationally expensive, so it needs
|
|
14
|
+
// to be a hook in order to memoize it per theme
|
|
15
|
+
export var useEuiCodeSyntaxVariables = function useEuiCodeSyntaxVariables() {
|
|
16
|
+
var _useEuiTheme = useEuiTheme(),
|
|
17
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
18
|
+
return useMemo(function () {
|
|
19
|
+
var backgroundColor = euiTheme.colors.lightestShade;
|
|
20
|
+
return {
|
|
21
|
+
backgroundColor: backgroundColor,
|
|
22
|
+
color: makeHighContrastColor(euiTheme.colors.text)(backgroundColor),
|
|
23
|
+
inlineCodeColor: makeHighContrastColor(visColors[3])(backgroundColor),
|
|
24
|
+
selectedBackgroundColor: 'inherit',
|
|
25
|
+
commentColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
26
|
+
selectorTagColor: 'inherit',
|
|
27
|
+
stringColor: makeHighContrastColor(visColors[2])(backgroundColor),
|
|
28
|
+
tagColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
29
|
+
nameColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
30
|
+
numberColor: makeHighContrastColor(visColors[0])(backgroundColor),
|
|
31
|
+
keywordColor: makeHighContrastColor(visColors[3])(backgroundColor),
|
|
32
|
+
functionTitleColor: 'inherit',
|
|
33
|
+
typeColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
34
|
+
attributeColor: 'inherit',
|
|
35
|
+
symbolColor: makeHighContrastColor(visColors[9])(backgroundColor),
|
|
36
|
+
paramsColor: 'inherit',
|
|
37
|
+
metaColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
38
|
+
titleColor: makeHighContrastColor(visColors[7])(backgroundColor),
|
|
39
|
+
sectionColor: makeHighContrastColor(visColors[9])(backgroundColor),
|
|
40
|
+
additionColor: makeHighContrastColor(visColors[0])(backgroundColor),
|
|
41
|
+
deletionColor: makeHighContrastColor(euiTheme.colors.danger)(backgroundColor),
|
|
42
|
+
selectorClassColor: 'inherit',
|
|
43
|
+
selectorIdColor: 'inherit',
|
|
44
|
+
get tokensCss() {
|
|
45
|
+
return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(this.commentColor, ";\n font-style: italic;\n }\n\n .token.selector {\n color: ").concat(this.selectorTagColor, ";\n }\n\n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(this.stringColor, ";\n }\n\n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(this.numberColor, ";\n }\n\n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(this.keywordColor, ";\n }\n\n .token.function {\n color: ").concat(this.functionTitleColor, ";\n }\n\n .token.tag {\n color: ").concat(this.tagColor, ";\n }\n\n .token.class-name {\n color: ").concat(this.typeColor, ";\n }\n\n .token.property {\n color: ").concat(this.attributeColor, ";\n }\n\n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(this.symbolColor, ";\n }\n\n .token.paramater {\n color: ").concat(this.paramsColor, ";\n }\n\n .token.meta,\n .token.important {\n color: ").concat(this.metaColor, ";\n }\n\n .token.title {\n color: ").concat(this.titleColor, ";\n }\n\n .token.section {\n color: ").concat(this.sectionColor, ";\n }\n\n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n\n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.additionColor, ";\n color: ").concat(this.additionColor, ";\n }\n\n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.deletionColor, ";\n color: ").concat(this.deletionColor, ";\n }\n\n .token.selector .token.class {\n color: ").concat(this.selectorClassColor, ";\n }\n\n .token.selector .token.id {\n color: ").concat(this.selectorIdColor, ";\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n\n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n\n .token.entity {\n cursor: help;\n }");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}, [euiTheme]);
|
|
44
49
|
};
|
|
@@ -10,9 +10,10 @@ import React, { useMemo } from 'react';
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import { useEuiTheme } from '../../services';
|
|
13
|
+
import { useEuiBorderColorCSS } from '../../global_styling';
|
|
13
14
|
import { EuiPanel } from '../panel';
|
|
14
15
|
import { EuiAvatar } from '../avatar';
|
|
15
|
-
import {
|
|
16
|
+
import { euiCommentEventStyles, euiCommentEventHeaderStyles, euiCommentEventBodyStyles } from './comment_event.styles';
|
|
16
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
18
|
export var EuiCommentEvent = function EuiCommentEvent(_ref) {
|
|
18
19
|
var children = _ref.children,
|
|
@@ -64,7 +65,7 @@ export var EuiCommentEvent = function EuiCommentEvent(_ref) {
|
|
|
64
65
|
* Styles
|
|
65
66
|
*/
|
|
66
67
|
var euiTheme = useEuiTheme();
|
|
67
|
-
var borderStyles =
|
|
68
|
+
var borderStyles = useEuiBorderColorCSS();
|
|
68
69
|
var styles = euiCommentEventStyles(euiTheme);
|
|
69
70
|
var cssStyles = [styles.euiCommentEvent, showEventBorders && styles.border, showEventBorders && borderStyles[eventColor]];
|
|
70
71
|
var headerStyles = euiCommentEventHeaderStyles(euiTheme);
|
|
@@ -8,23 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { tintOrShade } from '../../services';
|
|
12
11
|
import { logicalCSS } from '../../global_styling';
|
|
13
|
-
export var euiCommentEventBorderColors = function euiCommentEventBorderColors(_ref3) {
|
|
14
|
-
var euiTheme = _ref3.euiTheme,
|
|
15
|
-
colorMode = _ref3.colorMode;
|
|
16
|
-
var ratio = 0.6;
|
|
17
|
-
return {
|
|
18
|
-
warning: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.warning, 0.4, colorMode), ";;label:warning;"),
|
|
19
|
-
accent: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.accent, ratio, colorMode), ";;label:accent;"),
|
|
20
|
-
primary: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.primary, ratio, colorMode), ";;label:primary;"),
|
|
21
|
-
success: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.success, ratio, colorMode), ";;label:success;"),
|
|
22
|
-
danger: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.danger, ratio, colorMode), ";;label:danger;"),
|
|
23
|
-
subdued: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:subdued;"),
|
|
24
|
-
transparent: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:transparent;"),
|
|
25
|
-
plain: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:plain;")
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
12
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
29
13
|
name: "yoyozp-euiCommentEvent",
|
|
30
14
|
styles: "overflow:hidden;label:euiCommentEvent;"
|
|
@@ -62,8 +46,8 @@ export var euiCommentEventHeaderStyles = function euiCommentEventHeaderStyles(eu
|
|
|
62
46
|
euiCommentEvent__headerActions: /*#__PURE__*/css("display:flex;flex-wrap:wrap;gap:", euiTheme.size.xs, ";;label:euiCommentEvent__headerActions;")
|
|
63
47
|
};
|
|
64
48
|
};
|
|
65
|
-
export var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(
|
|
66
|
-
var euiTheme =
|
|
49
|
+
export var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(_ref3) {
|
|
50
|
+
var euiTheme = _ref3.euiTheme;
|
|
67
51
|
return {
|
|
68
52
|
euiCommentEvent__body: /*#__PURE__*/css(";label:euiCommentEvent__body;"),
|
|
69
53
|
// types
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["isSeparator", "key"],
|
|
2
|
-
_excluded2 = ["panel", "name", "key", "icon", "onClick"
|
|
2
|
+
_excluded2 = ["panel", "name", "key", "icon", "onClick"],
|
|
3
3
|
_excluded3 = ["theme", "panels", "onPanelChange", "className", "initialPanelId", "size"];
|
|
4
4
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -218,8 +218,6 @@ export var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
|
|
|
218
218
|
key = item.key,
|
|
219
219
|
icon = item.icon,
|
|
220
220
|
onClick = item.onClick,
|
|
221
|
-
toolTipTitle = item.toolTipTitle,
|
|
222
|
-
toolTipContent = item.toolTipContent,
|
|
223
221
|
rest = _objectWithoutProperties(item, _excluded2);
|
|
224
222
|
var onClickHandler = panel ? function (event) {
|
|
225
223
|
if (onClick && event) {
|
|
@@ -238,9 +236,7 @@ export var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
|
|
|
238
236
|
key: key || (typeof name === 'string' ? name : undefined) || index,
|
|
239
237
|
icon: icon,
|
|
240
238
|
onClick: onClickHandler,
|
|
241
|
-
hasPanel: Boolean(panel)
|
|
242
|
-
toolTipTitle: toolTipTitle,
|
|
243
|
-
toolTipContent: toolTipContent
|
|
239
|
+
hasPanel: Boolean(panel)
|
|
244
240
|
}, rest), name);
|
|
245
241
|
});
|
|
246
242
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "
|
|
1
|
+
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
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; }
|
|
@@ -36,10 +36,7 @@ export var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
|
|
|
36
36
|
_disabled = _ref.disabled,
|
|
37
37
|
_ref$layoutAlign = _ref.layoutAlign,
|
|
38
38
|
layoutAlign = _ref$layoutAlign === void 0 ? 'center' : _ref$layoutAlign,
|
|
39
|
-
toolTipTitle = _ref.toolTipTitle,
|
|
40
39
|
toolTipContent = _ref.toolTipContent,
|
|
41
|
-
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
42
|
-
toolTipPosition = _ref$toolTipPosition === void 0 ? 'right' : _ref$toolTipPosition,
|
|
43
40
|
toolTipProps = _ref.toolTipProps,
|
|
44
41
|
href = _ref.href,
|
|
45
42
|
target = _ref.target,
|
|
@@ -110,8 +107,7 @@ export var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
|
|
|
110
107
|
if (toolTipContent) {
|
|
111
108
|
var anchorClasses = classNames('eui-displayBlock', toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorClassName);
|
|
112
109
|
return ___EmotionJSX(EuiToolTip, _extends({
|
|
113
|
-
|
|
114
|
-
position: toolTipPosition
|
|
110
|
+
position: "right"
|
|
115
111
|
}, toolTipProps, {
|
|
116
112
|
anchorClassName: anchorClasses,
|
|
117
113
|
content: toolTipContent
|
|
@@ -139,14 +135,6 @@ EuiContextMenuItem.propTypes = {
|
|
|
139
135
|
* Accepts any prop that EuiToolTip does, except for `content` and `children`.
|
|
140
136
|
*/
|
|
141
137
|
toolTipProps: PropTypes.any,
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated Use toolTipProps.title instead
|
|
144
|
-
*/
|
|
145
|
-
toolTipTitle: PropTypes.node,
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated Use tooltipProps.position instead
|
|
148
|
-
*/
|
|
149
|
-
toolTipPosition: PropTypes.oneOf(["top", "right", "bottom", "left"]),
|
|
150
138
|
href: PropTypes.string,
|
|
151
139
|
target: PropTypes.string,
|
|
152
140
|
rel: PropTypes.string,
|