@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -8,10 +9,11 @@ exports.EuiBeacon = exports.COLORS = void 0;
|
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
var
|
|
14
|
+
var _global_styling = require("../../global_styling");
|
|
14
15
|
var _services = require("../../services");
|
|
16
|
+
var _beacon = require("./beacon.styles");
|
|
15
17
|
var _react2 = require("@emotion/react");
|
|
16
18
|
var _excluded = ["className", "size", "color", "style"];
|
|
17
19
|
/*
|
|
@@ -21,6 +23,8 @@ var _excluded = ["className", "size", "color", "style"];
|
|
|
21
23
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
24
|
* Side Public License, v 1.
|
|
23
25
|
*/
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
29
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
30
|
var COLORS = ['subdued', 'primary', 'success', 'accent', 'danger', 'warning'];
|
|
@@ -37,10 +41,12 @@ var EuiBeacon = function EuiBeacon(_ref) {
|
|
|
37
41
|
var classes = (0, _classnames.default)('euiBeacon', className);
|
|
38
42
|
var styles = (0, _beacon.euiBeaconStyles)(euiTheme);
|
|
39
43
|
var cssStyles = [styles.euiBeacon, styles[color]];
|
|
40
|
-
var beaconStyle =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
var beaconStyle = (0, _react.useMemo)(function () {
|
|
45
|
+
return (0, _global_styling.logicalStyles)(_objectSpread(_objectSpread({}, style), {}, {
|
|
46
|
+
height: size,
|
|
47
|
+
width: size
|
|
48
|
+
}));
|
|
49
|
+
}, [style, size]);
|
|
44
50
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
45
51
|
className: classes,
|
|
46
52
|
css: cssStyles,
|
|
@@ -13,6 +13,7 @@ var _refractor = require("refractor");
|
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _utils = require("./utils");
|
|
15
15
|
var _services = require("../../services");
|
|
16
|
+
var _code_syntax = require("./code_syntax.styles");
|
|
16
17
|
var _code = require("./code.styles");
|
|
17
18
|
var _react2 = require("@emotion/react");
|
|
18
19
|
var _excluded = ["transparentBackground", "language", "children", "className"];
|
|
@@ -46,8 +47,7 @@ var EuiCode = function EuiCode(_ref) {
|
|
|
46
47
|
return (0, _utils.getHtmlContent)(data, children);
|
|
47
48
|
}, [data, children]);
|
|
48
49
|
var classes = (0, _classnames.default)('euiCode', className);
|
|
49
|
-
var
|
|
50
|
-
var styles = (0, _code.euiCodeStyles)(euiTheme);
|
|
50
|
+
var styles = (0, _code.euiCodeStyles)((0, _services.useEuiTheme)(), (0, _code_syntax.useEuiCodeSyntaxVariables)());
|
|
51
51
|
var cssStyles = [styles.euiCode, transparentBackground && styles.transparentBackground];
|
|
52
52
|
return (0, _react2.jsx)("code", (0, _extends2.default)({
|
|
53
53
|
className: classes,
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiCodeStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _code_syntax = require("./code_syntax.styles");
|
|
10
9
|
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)."; } /*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -22,14 +21,13 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
22
21
|
styles: "background:transparent;label:transparentBackground;",
|
|
23
22
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
23
|
};
|
|
25
|
-
var euiCodeStyles = function euiCodeStyles(euiThemeContext) {
|
|
24
|
+
var euiCodeStyles = function euiCodeStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
26
25
|
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
-
var euiCodeSyntax = (0, _code_syntax.euiCodeSyntaxColors)(euiThemeContext);
|
|
28
26
|
return {
|
|
29
27
|
/*
|
|
30
28
|
* 1. Size the code against the text its embedded within.
|
|
31
29
|
*/
|
|
32
|
-
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.logicalShorthandCSS)('padding', '0.2em 0.5em'), "background:",
|
|
30
|
+
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.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;"),
|
|
33
31
|
transparentBackground: _ref
|
|
34
32
|
};
|
|
35
33
|
};
|
|
@@ -21,6 +21,7 @@ var _code_block_full_screen = require("./code_block_full_screen");
|
|
|
21
21
|
var _code_block_controls = require("./code_block_controls");
|
|
22
22
|
var _code_block_virtualized = require("./code_block_virtualized");
|
|
23
23
|
var _code_block = require("./code_block.styles");
|
|
24
|
+
var _code_syntax = require("./code_syntax.styles");
|
|
24
25
|
var _react2 = require("@emotion/react");
|
|
25
26
|
var _excluded = ["language", "transparentBackground", "paddingSize", "fontSize", "isCopyable", "whiteSpace", "children", "className", "overflowHeight", "isVirtualized", "lineNumbers"];
|
|
26
27
|
/*
|
|
@@ -67,6 +68,7 @@ var EuiCodeBlock = function EuiCodeBlock(_ref) {
|
|
|
67
68
|
lineNumbers = _ref$lineNumbers === void 0 ? false : _ref$lineNumbers,
|
|
68
69
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
69
70
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
71
|
+
var euiCodeSyntaxVariables = (0, _code_syntax.useEuiCodeSyntaxVariables)();
|
|
70
72
|
var language = (0, _react.useMemo)(function () {
|
|
71
73
|
return (0, _utils.checkSupportedLanguage)(_language);
|
|
72
74
|
}, [_language]);
|
|
@@ -118,7 +120,7 @@ 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 = (0, _code_block.euiCodeBlockStyles)(euiTheme);
|
|
123
|
+
var styles = (0, _code_block.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 = (0, _react.useMemo)(function () {
|
|
124
126
|
var isWhiteSpacePre = whiteSpace === 'pre' || isVirtualized;
|
|
@@ -143,14 +145,14 @@ var EuiCodeBlock = function EuiCodeBlock(_ref) {
|
|
|
143
145
|
preProps = _useMemo2[0],
|
|
144
146
|
preFullscreenProps = _useMemo2[1];
|
|
145
147
|
var codeProps = (0, _react.useMemo)(function () {
|
|
146
|
-
var styles = (0, _code_block.euiCodeBlockCodeStyles)(euiTheme);
|
|
148
|
+
var styles = (0, _code_block.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 (0, _react2.jsx)("div", {
|
|
155
157
|
css: cssStyles,
|
|
156
158
|
className: (0, _classnames.default)('euiCodeBlock', className),
|
|
@@ -8,7 +8,6 @@ exports.euiCodeBlockStyles = exports.euiCodeBlockPreStyles = exports.euiCodeBloc
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _global_styling = require("../../global_styling");
|
|
11
|
-
var _code_syntax = require("./code_syntax.styles");
|
|
12
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
13
|
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)."; } /*
|
|
@@ -40,11 +39,10 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
|
40
39
|
styles: "background:transparent;label:transparentBackground;",
|
|
41
40
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
42
41
|
};
|
|
43
|
-
var euiCodeBlockStyles = function euiCodeBlockStyles(euiThemeContext) {
|
|
42
|
+
var euiCodeBlockStyles = function euiCodeBlockStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
44
43
|
var euiTheme = euiThemeContext.euiTheme;
|
|
45
|
-
var euiCodeSyntax = (0, _code_syntax.euiCodeSyntaxColors)(euiThemeContext);
|
|
46
44
|
return {
|
|
47
|
-
euiCodeBlock: /*#__PURE__*/(0, _react.css)("max-inline-size:100%;display:block;position:relative;background:",
|
|
45
|
+
euiCodeBlock: /*#__PURE__*/(0, _react.css)("max-inline-size:100%;display:block;position:relative;background:", euiCodeSyntaxVariables.backgroundColor, ";", euiCodeSyntaxVariables.tokensCss, ";;label:euiCodeBlock;"),
|
|
48
46
|
// Font size
|
|
49
47
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:s;"),
|
|
50
48
|
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:m;"),
|
|
@@ -118,11 +116,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
118
116
|
styles: "position:relative;label:isVirtualized;",
|
|
119
117
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
120
118
|
};
|
|
121
|
-
var euiCodeBlockCodeStyles = function euiCodeBlockCodeStyles(euiThemeContext) {
|
|
119
|
+
var euiCodeBlockCodeStyles = function euiCodeBlockCodeStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
122
120
|
var euiTheme = euiThemeContext.euiTheme;
|
|
123
|
-
var euiCodeSyntax = (0, _code_syntax.euiCodeSyntaxColors)(euiThemeContext);
|
|
124
121
|
return {
|
|
125
|
-
euiCodeBlock__code: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:inherit;color:",
|
|
122
|
+
euiCodeBlock__code: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:inherit;color:", euiCodeSyntaxVariables.color, ";display:block;;label:euiCodeBlock__code;"),
|
|
126
123
|
isVirtualized: _ref
|
|
127
124
|
};
|
|
128
125
|
};
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.EuiCodeBlockControls = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _services = require("../../services");
|
|
10
|
+
var _code_syntax = require("./code_syntax.styles");
|
|
10
11
|
var _code_block_controls = require("./code_block_controls.styles");
|
|
11
12
|
var _react2 = require("@emotion/react");
|
|
12
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -22,8 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
22
23
|
var EuiCodeBlockControls = function EuiCodeBlockControls(_ref) {
|
|
23
24
|
var paddingSize = _ref.paddingSize,
|
|
24
25
|
controls = _ref.controls;
|
|
25
|
-
var
|
|
26
|
-
var styles = (0, _code_block_controls.euiCodeBlockControlsStyles)(euiTheme);
|
|
26
|
+
var styles = (0, _code_block_controls.euiCodeBlockControlsStyles)((0, _services.useEuiTheme)(), (0, _code_syntax.useEuiCodeSyntaxVariables)());
|
|
27
27
|
var cssStyles = [styles.euiCodeBlock__controls, styles.offset[paddingSize]];
|
|
28
28
|
var hasControls = controls.some(function (control) {
|
|
29
29
|
return !!control;
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiCodeBlockControlsStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _code_syntax = require("./code_syntax.styles");
|
|
10
9
|
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)."; } /*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -28,11 +27,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28
27
|
styles: "inset-block-start:0;inset-inline-end:0;label:none;",
|
|
29
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
29
|
};
|
|
31
|
-
var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext) {
|
|
30
|
+
var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext, euiCodeSyntaxVariables) {
|
|
32
31
|
var euiTheme = euiThemeContext.euiTheme;
|
|
33
|
-
var euiCodeSyntax = (0, _code_syntax.euiCodeSyntaxColors)(euiThemeContext);
|
|
34
32
|
return {
|
|
35
|
-
euiCodeBlock__controls: /*#__PURE__*/(0, _react.css)("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:",
|
|
33
|
+
euiCodeBlock__controls: /*#__PURE__*/(0, _react.css)("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:", euiCodeSyntaxVariables.backgroundColor, ";;label:euiCodeBlock__controls;"),
|
|
36
34
|
offset: {
|
|
37
35
|
none: _ref,
|
|
38
36
|
s: /*#__PURE__*/(0, _react.css)("inset-block-start:", (0, _global_styling.euiPaddingSize)(euiThemeContext, 's'), ";inset-inline-end:", (0, _global_styling.euiPaddingSize)(euiThemeContext, 's'), ";;label:s;"),
|
|
@@ -13,6 +13,7 @@ var _i18n = require("../i18n");
|
|
|
13
13
|
var _button = require("../button");
|
|
14
14
|
var _focus_trap = require("../focus_trap");
|
|
15
15
|
var _overlay_mask = require("../overlay_mask");
|
|
16
|
+
var _code_syntax = require("./code_syntax.styles");
|
|
16
17
|
var _code_block = require("./code_block.styles");
|
|
17
18
|
var _react2 = require("@emotion/react");
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -78,8 +79,7 @@ var useFullScreen = function useFullScreen(_ref) {
|
|
|
78
79
|
exports.useFullScreen = useFullScreen;
|
|
79
80
|
var EuiCodeBlockFullScreenWrapper = function EuiCodeBlockFullScreenWrapper(_ref2) {
|
|
80
81
|
var children = _ref2.children;
|
|
81
|
-
var
|
|
82
|
-
var styles = (0, _code_block.euiCodeBlockStyles)(euiThemeContext);
|
|
82
|
+
var styles = (0, _code_block.euiCodeBlockStyles)((0, _services.useEuiTheme)(), (0, _code_syntax.useEuiCodeSyntaxVariables)());
|
|
83
83
|
var cssStyles = [styles.euiCodeBlock, styles.l,
|
|
84
84
|
// Force fullscreen to use large font
|
|
85
85
|
styles.isFullScreen];
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useEuiCodeSyntaxVariables = void 0;
|
|
7
|
+
var _react = require("react");
|
|
7
8
|
var _services = require("../../services");
|
|
8
9
|
/*
|
|
9
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,39 +15,42 @@ var _services = require("../../services");
|
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
var visColors = (0, _services.euiPaletteColorBlind)();
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
18
|
+
|
|
19
|
+
// These variables are computationally expensive, so it needs
|
|
20
|
+
// to be a hook in order to memoize it per theme
|
|
21
|
+
var useEuiCodeSyntaxVariables = function useEuiCodeSyntaxVariables() {
|
|
22
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
23
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
24
|
+
return (0, _react.useMemo)(function () {
|
|
25
|
+
var backgroundColor = euiTheme.colors.lightestShade;
|
|
26
|
+
return {
|
|
27
|
+
backgroundColor: backgroundColor,
|
|
28
|
+
color: (0, _services.makeHighContrastColor)(euiTheme.colors.text)(backgroundColor),
|
|
29
|
+
inlineCodeColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor),
|
|
30
|
+
selectedBackgroundColor: 'inherit',
|
|
31
|
+
commentColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
|
|
32
|
+
selectorTagColor: 'inherit',
|
|
33
|
+
stringColor: (0, _services.makeHighContrastColor)(visColors[2])(backgroundColor),
|
|
34
|
+
tagColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
|
|
35
|
+
nameColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
|
|
36
|
+
numberColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor),
|
|
37
|
+
keywordColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor),
|
|
38
|
+
functionTitleColor: 'inherit',
|
|
39
|
+
typeColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
|
|
40
|
+
attributeColor: 'inherit',
|
|
41
|
+
symbolColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor),
|
|
42
|
+
paramsColor: 'inherit',
|
|
43
|
+
metaColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
|
|
44
|
+
titleColor: (0, _services.makeHighContrastColor)(visColors[7])(backgroundColor),
|
|
45
|
+
sectionColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor),
|
|
46
|
+
additionColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor),
|
|
47
|
+
deletionColor: (0, _services.makeHighContrastColor)(euiTheme.colors.danger)(backgroundColor),
|
|
48
|
+
selectorClassColor: 'inherit',
|
|
49
|
+
selectorIdColor: 'inherit',
|
|
50
|
+
get tokensCss() {
|
|
51
|
+
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 }");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, [euiTheme]);
|
|
51
55
|
};
|
|
52
|
-
exports.
|
|
56
|
+
exports.useEuiCodeSyntaxVariables = useEuiCodeSyntaxVariables;
|
|
@@ -9,6 +9,7 @@ exports.EuiCommentEvent = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _services = require("../../services");
|
|
12
|
+
var _global_styling = require("../../global_styling");
|
|
12
13
|
var _panel = require("../panel");
|
|
13
14
|
var _avatar = require("../avatar");
|
|
14
15
|
var _comment_event = require("./comment_event.styles");
|
|
@@ -73,7 +74,7 @@ var EuiCommentEvent = function EuiCommentEvent(_ref) {
|
|
|
73
74
|
* Styles
|
|
74
75
|
*/
|
|
75
76
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
76
|
-
var borderStyles = (0,
|
|
77
|
+
var borderStyles = (0, _global_styling.useEuiBorderColorCSS)();
|
|
77
78
|
var styles = (0, _comment_event.euiCommentEventStyles)(euiTheme);
|
|
78
79
|
var cssStyles = [styles.euiCommentEvent, showEventBorders && styles.border, showEventBorders && borderStyles[eventColor]];
|
|
79
80
|
var headerStyles = (0, _comment_event.euiCommentEventHeaderStyles)(euiTheme);
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.euiCommentEventStyles = exports.euiCommentEventHeaderStyles = exports.
|
|
6
|
+
exports.euiCommentEventStyles = exports.euiCommentEventHeaderStyles = exports.euiCommentEventBodyStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
8
|
var _global_styling = require("../../global_styling");
|
|
10
9
|
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)."; } /*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,22 +13,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
14
|
* Side Public License, v 1.
|
|
16
15
|
*/
|
|
17
|
-
var euiCommentEventBorderColors = function euiCommentEventBorderColors(_ref3) {
|
|
18
|
-
var euiTheme = _ref3.euiTheme,
|
|
19
|
-
colorMode = _ref3.colorMode;
|
|
20
|
-
var ratio = 0.6;
|
|
21
|
-
return {
|
|
22
|
-
warning: /*#__PURE__*/(0, _react.css)("border-color:", (0, _services.tintOrShade)(euiTheme.colors.warning, 0.4, colorMode), ";;label:warning;"),
|
|
23
|
-
accent: /*#__PURE__*/(0, _react.css)("border-color:", (0, _services.tintOrShade)(euiTheme.colors.accent, ratio, colorMode), ";;label:accent;"),
|
|
24
|
-
primary: /*#__PURE__*/(0, _react.css)("border-color:", (0, _services.tintOrShade)(euiTheme.colors.primary, ratio, colorMode), ";;label:primary;"),
|
|
25
|
-
success: /*#__PURE__*/(0, _react.css)("border-color:", (0, _services.tintOrShade)(euiTheme.colors.success, ratio, colorMode), ";;label:success;"),
|
|
26
|
-
danger: /*#__PURE__*/(0, _react.css)("border-color:", (0, _services.tintOrShade)(euiTheme.colors.danger, ratio, colorMode), ";;label:danger;"),
|
|
27
|
-
subdued: /*#__PURE__*/(0, _react.css)("border-color:", euiTheme.border.color, ";;label:subdued;"),
|
|
28
|
-
transparent: /*#__PURE__*/(0, _react.css)("border-color:", euiTheme.border.color, ";;label:transparent;"),
|
|
29
|
-
plain: /*#__PURE__*/(0, _react.css)("border-color:", euiTheme.border.color, ";;label:plain;")
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.euiCommentEventBorderColors = euiCommentEventBorderColors;
|
|
33
16
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
34
17
|
name: "yoyozp-euiCommentEvent",
|
|
35
18
|
styles: "overflow:hidden;label:euiCommentEvent;"
|
|
@@ -69,8 +52,8 @@ var euiCommentEventHeaderStyles = function euiCommentEventHeaderStyles(euiThemeC
|
|
|
69
52
|
};
|
|
70
53
|
};
|
|
71
54
|
exports.euiCommentEventHeaderStyles = euiCommentEventHeaderStyles;
|
|
72
|
-
var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(
|
|
73
|
-
var euiTheme =
|
|
55
|
+
var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(_ref3) {
|
|
56
|
+
var euiTheme = _ref3.euiTheme;
|
|
74
57
|
return {
|
|
75
58
|
euiCommentEvent__body: /*#__PURE__*/(0, _react.css)(";label:euiCommentEvent__body;"),
|
|
76
59
|
// types
|
|
@@ -24,7 +24,7 @@ var _context_menu_item = require("./context_menu_item");
|
|
|
24
24
|
var _context_menu = require("./context_menu.styles");
|
|
25
25
|
var _react2 = require("@emotion/react");
|
|
26
26
|
var _excluded = ["isSeparator", "key"],
|
|
27
|
-
_excluded2 = ["panel", "name", "key", "icon", "onClick"
|
|
27
|
+
_excluded2 = ["panel", "name", "key", "icon", "onClick"],
|
|
28
28
|
_excluded3 = ["theme", "panels", "onPanelChange", "className", "initialPanelId", "size"];
|
|
29
29
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -220,8 +220,6 @@ var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
|
|
|
220
220
|
key = item.key,
|
|
221
221
|
icon = item.icon,
|
|
222
222
|
onClick = item.onClick,
|
|
223
|
-
toolTipTitle = item.toolTipTitle,
|
|
224
|
-
toolTipContent = item.toolTipContent,
|
|
225
223
|
rest = (0, _objectWithoutProperties2.default)(item, _excluded2);
|
|
226
224
|
var onClickHandler = panel ? function (event) {
|
|
227
225
|
if (onClick && event) {
|
|
@@ -240,9 +238,7 @@ var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
|
|
|
240
238
|
key: key || (typeof name === 'string' ? name : undefined) || index,
|
|
241
239
|
icon: icon,
|
|
242
240
|
onClick: onClickHandler,
|
|
243
|
-
hasPanel: Boolean(panel)
|
|
244
|
-
toolTipTitle: toolTipTitle,
|
|
245
|
-
toolTipContent: toolTipContent
|
|
241
|
+
hasPanel: Boolean(panel)
|
|
246
242
|
}, rest), name);
|
|
247
243
|
});
|
|
248
244
|
}
|
|
@@ -16,7 +16,7 @@ var _icon = require("../icon");
|
|
|
16
16
|
var _tool_tip = require("../tool_tip");
|
|
17
17
|
var _context_menu_item = require("./context_menu_item.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
|
-
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "
|
|
19
|
+
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size"];
|
|
20
20
|
/*
|
|
21
21
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
22
22
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -42,10 +42,7 @@ var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
|
|
|
42
42
|
_disabled = _ref.disabled,
|
|
43
43
|
_ref$layoutAlign = _ref.layoutAlign,
|
|
44
44
|
layoutAlign = _ref$layoutAlign === void 0 ? 'center' : _ref$layoutAlign,
|
|
45
|
-
toolTipTitle = _ref.toolTipTitle,
|
|
46
45
|
toolTipContent = _ref.toolTipContent,
|
|
47
|
-
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
48
|
-
toolTipPosition = _ref$toolTipPosition === void 0 ? 'right' : _ref$toolTipPosition,
|
|
49
46
|
toolTipProps = _ref.toolTipProps,
|
|
50
47
|
href = _ref.href,
|
|
51
48
|
target = _ref.target,
|
|
@@ -116,8 +113,7 @@ var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
|
|
|
116
113
|
if (toolTipContent) {
|
|
117
114
|
var anchorClasses = (0, _classnames.default)('eui-displayBlock', toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorClassName);
|
|
118
115
|
return (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
|
|
119
|
-
|
|
120
|
-
position: toolTipPosition
|
|
116
|
+
position: "right"
|
|
121
117
|
}, toolTipProps, {
|
|
122
118
|
anchorClassName: anchorClasses,
|
|
123
119
|
content: toolTipContent
|