@elastic/eui 101.1.0 → 101.2.0-classic.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/es/components/badge/badge.styles.js +2 -2
- package/es/components/badge/color_utils.js +16 -6
- package/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/es/components/basic_table/basic_table.js +11 -0
- package/es/components/basic_table/in_memory_table.js +11 -0
- package/es/components/code/code.styles.js +4 -2
- package/es/components/code/code_syntax.styles.js +6 -3
- package/es/components/color_picker/color_picker_swatch.js +85 -3
- package/es/components/color_picker/color_picker_swatch.styles.js +11 -1
- package/es/components/header/header.styles.js +4 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/provider/provider.js +2 -2
- package/es/components/table/table_header_cell.js +9 -0
- package/es/components/toast/toast.styles.js +3 -3
- package/es/components/tool_tip/icon_tip.js +9 -0
- package/es/components/tool_tip/tool_tip.js +18 -4
- package/es/components/tool_tip/tool_tip_anchor.js +1 -1
- package/es/global_styling/mixins/_button.js +3 -2
- package/es/services/color/vis_color_store.js +1 -1
- package/es/services/theme/context.js +2 -2
- package/eui.d.ts +366 -327
- package/lib/components/badge/badge.styles.js +2 -2
- package/lib/components/badge/color_utils.js +16 -6
- package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/lib/components/basic_table/basic_table.js +11 -0
- package/lib/components/basic_table/in_memory_table.js +11 -0
- package/lib/components/code/code.styles.js +3 -1
- package/lib/components/code/code_syntax.styles.js +6 -3
- package/lib/components/color_picker/color_picker_swatch.js +85 -3
- package/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/lib/components/header/header.styles.js +4 -1
- package/lib/components/icon/svgs/aggregate.svg +0 -0
- package/lib/components/icon/svgs/color.svg +0 -0
- package/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/lib/components/icon/svgs/documentation.svg +0 -0
- package/lib/components/icon/svgs/eraser.svg +0 -0
- package/lib/components/icon/svgs/folder_check.svg +0 -0
- package/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/lib/components/icon/svgs/folder_open.svg +0 -0
- package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/lib/components/icon/svgs/function.svg +0 -0
- package/lib/components/icon/svgs/layers.svg +0 -0
- package/lib/components/icon/svgs/menu.svg +0 -0
- package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/lib/components/icon/svgs/percent.svg +0 -0
- package/lib/components/icon/svgs/push.svg +0 -0
- package/lib/components/icon/svgs/quote.svg +0 -0
- package/lib/components/icon/svgs/reporter.svg +0 -0
- package/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/lib/components/icon/svgs/timeline.svg +0 -0
- package/lib/components/icon/svgs/users.svg +0 -0
- package/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/provider/provider.js +2 -2
- package/lib/components/table/table_header_cell.js +9 -0
- package/lib/components/toast/toast.styles.js +3 -3
- package/lib/components/tool_tip/icon_tip.js +9 -0
- package/lib/components/tool_tip/tool_tip.js +18 -4
- package/lib/components/tool_tip/tool_tip_anchor.js +1 -1
- package/lib/global_styling/mixins/_button.js +3 -2
- package/lib/services/color/vis_color_store.js +2 -2
- package/lib/services/theme/context.js +2 -2
- package/optimize/es/components/badge/badge.styles.js +2 -2
- package/optimize/es/components/badge/color_utils.js +16 -6
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/es/components/code/code.styles.js +4 -2
- package/optimize/es/components/code/code_syntax.styles.js +6 -3
- package/optimize/es/components/color_picker/color_picker_swatch.js +18 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +11 -1
- package/optimize/es/components/header/header.styles.js +4 -1
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/components/toast/toast.styles.js +3 -3
- package/optimize/es/components/tool_tip/tool_tip.js +9 -4
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +1 -1
- package/optimize/es/global_styling/mixins/_button.js +3 -2
- package/optimize/es/services/color/vis_color_store.js +1 -1
- package/optimize/es/services/theme/context.js +2 -2
- package/optimize/lib/components/badge/badge.styles.js +2 -2
- package/optimize/lib/components/badge/color_utils.js +16 -6
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/lib/components/code/code.styles.js +3 -1
- package/optimize/lib/components/code/code_syntax.styles.js +6 -3
- package/optimize/lib/components/color_picker/color_picker_swatch.js +18 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/optimize/lib/components/header/header.styles.js +4 -1
- package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
- package/optimize/lib/components/icon/svgs/color.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
- package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
- package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/optimize/lib/components/icon/svgs/function.svg +0 -0
- package/optimize/lib/components/icon/svgs/layers.svg +0 -0
- package/optimize/lib/components/icon/svgs/menu.svg +0 -0
- package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/percent.svg +0 -0
- package/optimize/lib/components/icon/svgs/push.svg +0 -0
- package/optimize/lib/components/icon/svgs/quote.svg +0 -0
- package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
- package/optimize/lib/components/icon/svgs/users.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/provider/provider.js +2 -2
- package/optimize/lib/components/toast/toast.styles.js +3 -3
- package/optimize/lib/components/tool_tip/tool_tip.js +9 -4
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +1 -1
- package/optimize/lib/global_styling/mixins/_button.js +3 -2
- package/optimize/lib/services/color/vis_color_store.js +2 -2
- package/optimize/lib/services/theme/context.js +2 -2
- package/package.json +4 -4
- package/test-env/components/badge/badge.styles.js +2 -2
- package/test-env/components/badge/color_utils.js +16 -6
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/test-env/components/basic_table/basic_table.js +11 -0
- package/test-env/components/basic_table/in_memory_table.js +11 -0
- package/test-env/components/code/code.styles.js +3 -1
- package/test-env/components/code/code_syntax.styles.js +6 -3
- package/test-env/components/color_picker/color_picker_swatch.js +85 -3
- package/test-env/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/test-env/components/header/header.styles.js +4 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/provider/provider.js +2 -2
- package/test-env/components/table/table_header_cell.js +9 -0
- package/test-env/components/toast/toast.styles.js +3 -3
- package/test-env/components/tool_tip/icon_tip.js +9 -0
- package/test-env/components/tool_tip/tool_tip.js +18 -4
- package/test-env/components/tool_tip/tool_tip_anchor.js +1 -1
- package/test-env/global_styling/mixins/_button.js +3 -2
- package/test-env/services/color/vis_color_store.js +2 -2
- package/test-env/services/theme/context.js +2 -2
- package/CHANGELOG.md +0 -5
|
@@ -8,14 +8,21 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _services = require("../../services");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
10
|
var _high_contrast = require("../../global_styling/functions/high_contrast");
|
|
11
|
-
/*
|
|
11
|
+
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)."; } /*
|
|
12
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
14
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "164u3xw-tooltip",
|
|
20
|
+
styles: "display:inline-flex;label:tooltip;"
|
|
21
|
+
} : {
|
|
22
|
+
name: "164u3xw-tooltip",
|
|
23
|
+
styles: "display:inline-flex;label:tooltip;",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
};
|
|
19
26
|
var euiColorPickerSwatchStyles = exports.euiColorPickerSwatchStyles = function euiColorPickerSwatchStyles(euiThemeContext) {
|
|
20
27
|
var euiTheme = euiThemeContext.euiTheme;
|
|
21
28
|
return {
|
|
@@ -25,6 +32,7 @@ var euiColorPickerSwatchStyles = exports.euiColorPickerSwatchStyles = function e
|
|
|
25
32
|
none: "\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFormsColorSwatch, ";\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, "\n ").concat((0, _services.transparentize)(euiTheme.colors.emptyShade, 0.05), ";\n "),
|
|
26
33
|
preferred: "border: ".concat(euiTheme.border.thin, ";"),
|
|
27
34
|
forced: (0, _high_contrast.preventForcedColors)(euiThemeContext)
|
|
28
|
-
}), " cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
|
|
35
|
+
}), " cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;"),
|
|
36
|
+
tooltip: _ref
|
|
29
37
|
};
|
|
30
38
|
};
|
|
@@ -64,5 +64,8 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
|
64
64
|
borderColor: euiTheme.components.headerDarkSearchBorderColor,
|
|
65
65
|
placeholderColor: (0, _services.makeHighContrastColor)(controlPlaceholderText, 8)(backgroundColor)
|
|
66
66
|
};
|
|
67
|
-
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
|
|
67
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
|
|
68
|
+
// the header is in a faux dark mode, we can't rely on color
|
|
69
|
+
// switch tokens as they'd be in the wrong color mode
|
|
70
|
+
highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
|
|
68
71
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -27,7 +27,7 @@ var euiPanelBorderStyles = exports.euiPanelBorderStyles = function euiPanelBorde
|
|
|
27
27
|
euiTheme.colors.borderBaseFloating is enough then */
|
|
28
28
|
var hasVisibleBorder = hasFloatingBorder && colorMode === 'DARK';
|
|
29
29
|
return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
30
|
-
none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::
|
|
30
|
+
none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::after {\n content: '';\n position: absolute;\n /* ensure to keep on top of flush content */\n z-index: 0;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat((borderColor !== null && borderColor !== void 0 ? borderColor : hasVisibleBorder) ? euiTheme.border.color : euiTheme.colors.borderBaseFloating, ";\n border-radius: inherit;\n pointer-events: none;\n }\n "),
|
|
31
31
|
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
32
32
|
});
|
|
33
33
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.EuiProvider = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _themes = require("../../themes");
|
|
10
10
|
var _services = require("../../services");
|
|
11
11
|
var _warning = require("../../services/theme/warning");
|
|
12
12
|
var _css = require("../../services/emotion/css");
|
|
@@ -33,7 +33,7 @@ var EuiProvider = exports.EuiProvider = function EuiProvider(_ref) {
|
|
|
33
33
|
var _ref$cache = _ref.cache,
|
|
34
34
|
cache = _ref$cache === void 0 ? _css.cache : _ref$cache,
|
|
35
35
|
_ref$theme = _ref.theme,
|
|
36
|
-
theme = _ref$theme === void 0 ?
|
|
36
|
+
theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
|
|
37
37
|
_ref$globalStyles = _ref.globalStyles,
|
|
38
38
|
Globals = _ref$globalStyles === void 0 ? _global_styles.EuiGlobalStyles : _ref$globalStyles,
|
|
39
39
|
_ref$utilityClasses = _ref.utilityClasses,
|
|
@@ -22,7 +22,7 @@ var euiToastStyles = exports.euiToastStyles = function euiToastStyles(euiThemeCo
|
|
|
22
22
|
var euiTheme = euiThemeContext.euiTheme,
|
|
23
23
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
24
24
|
var highlightStyles = function highlightStyles(color, width) {
|
|
25
|
-
return "\n &:
|
|
25
|
+
return "\n &:before {\n content: '';\n position: absolute;\n /* ensure highlight border is on top of panel border */\n z-index: 1;\n inset: 0;\n border-radius: inherit;\n ".concat((0, _global_styling.logicalCSS)('border-top', "".concat(width, " solid ").concat(color)), "\n pointer-events: none;\n }\n ");
|
|
26
26
|
};
|
|
27
27
|
return {
|
|
28
28
|
// Base
|
|
@@ -42,11 +42,11 @@ var euiToastStyles = exports.euiToastStyles = function euiToastStyles(euiThemeCo
|
|
|
42
42
|
}) : euiTheme.border.width.thick;
|
|
43
43
|
return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
44
44
|
none: highlightStyles(color, borderWidth),
|
|
45
|
-
preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::
|
|
45
|
+
preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::before {\n ").concat((0, _global_styling.logicalCSS)('width', "calc(100% + ".concat((0, _euiThemeCommon.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
46
46
|
return x * 2;
|
|
47
47
|
}), ")")), "\n ").concat((0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), "\n ").concat((0, _global_styling.logicalCSS)('margin-left', "-".concat(euiTheme.border.width.thin)), "\n }\n "),
|
|
48
48
|
// Windows high contrast mode ignores/overrides border colors, which have semantic meaning here. To get around this, we'll use a pseudo element that ignores forced colors
|
|
49
|
-
forced: "\n overflow: hidden;\n\n &::
|
|
49
|
+
forced: "\n overflow: hidden;\n\n &::before {\n content: '';\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('top', 0), "\n ").concat((0, _global_styling.logicalCSS)('horizontal', 0), "\n ").concat((0, _global_styling.logicalCSS)('height', borderWidth), "\n background-color: ").concat(color, ";\n ").concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n pointer-events: none;\n }\n ")
|
|
50
50
|
});
|
|
51
51
|
},
|
|
52
52
|
get primary() {
|
|
@@ -25,7 +25,7 @@ var _tool_tip_anchor = require("./tool_tip_anchor");
|
|
|
25
25
|
var _tool_tip_arrow = require("./tool_tip_arrow");
|
|
26
26
|
var _tool_tip_manager = require("./tool_tip_manager");
|
|
27
27
|
var _react3 = require("@emotion/react");
|
|
28
|
-
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll"];
|
|
28
|
+
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll", "disableScreenReaderOutput"];
|
|
29
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
30
30
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
31
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -245,6 +245,8 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
245
245
|
delay = _this$props.delay,
|
|
246
246
|
display = _this$props.display,
|
|
247
247
|
repositionOnScroll = _this$props.repositionOnScroll,
|
|
248
|
+
_this$props$disableSc = _this$props.disableScreenReaderOutput,
|
|
249
|
+
disableScreenReaderOutput = _this$props$disableSc === void 0 ? false : _this$props$disableSc,
|
|
248
250
|
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
249
251
|
var _this$state = this.state,
|
|
250
252
|
arrowStyles = _this$state.arrowStyles,
|
|
@@ -260,8 +262,10 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
260
262
|
onFocus: this.onFocus,
|
|
261
263
|
onKeyDown: this.onEscapeKey,
|
|
262
264
|
onMouseOver: this.showToolTip,
|
|
263
|
-
onMouseOut: this.onMouseOut
|
|
264
|
-
id
|
|
265
|
+
onMouseOut: this.onMouseOut
|
|
266
|
+
// `id` defines if the trigger and tooltip are automatically linked via `aria-describedby`.
|
|
267
|
+
,
|
|
268
|
+
id: !disableScreenReaderOutput ? id : undefined,
|
|
265
269
|
className: anchorClasses,
|
|
266
270
|
display: display,
|
|
267
271
|
isVisible: visible
|
|
@@ -291,5 +295,6 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
291
295
|
(0, _defineProperty2.default)(EuiToolTip, "defaultProps", {
|
|
292
296
|
position: 'top',
|
|
293
297
|
delay: 'regular',
|
|
294
|
-
display: 'inlineBlock'
|
|
298
|
+
display: 'inlineBlock',
|
|
299
|
+
disableScreenReaderOutput: false
|
|
295
300
|
});
|
|
@@ -54,7 +54,7 @@ var EuiToolTipAnchor = exports.EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwar
|
|
|
54
54
|
_onBlur();
|
|
55
55
|
children.props.onBlur && children.props.onBlur(e);
|
|
56
56
|
},
|
|
57
|
-
'aria-describedby': isVisible ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
|
|
57
|
+
'aria-describedby': isVisible && id ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
|
|
58
58
|
}))
|
|
59
59
|
);
|
|
60
60
|
});
|
|
@@ -46,10 +46,11 @@ var euiButtonColor = exports.euiButtonColor = function euiButtonColor(euiThemeCo
|
|
|
46
46
|
* @returns Style object `{ backgroundColor, color }`
|
|
47
47
|
*/
|
|
48
48
|
var euiButtonFillColor = exports.euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
49
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
49
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
50
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
50
51
|
var backgroundTokenName = (0, _euiThemeCommon.getTokenName)('backgroundFilled', color);
|
|
51
52
|
var textColorTokenName = (0, _euiThemeCommon.getTokenName)('textColorFilled', color);
|
|
52
|
-
var foreground = euiTheme.components.buttons[textColorTokenName];
|
|
53
|
+
var foreground = highContrastMode ? color === 'warning' ? euiTheme.colors.ink : euiTheme.colors.textInverse : euiTheme.components.buttons[textColorTokenName];
|
|
53
54
|
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
54
55
|
return _objectSpread({
|
|
55
56
|
color: foreground,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.EUI_VIS_COLOR_STORE = void 0;
|
|
7
7
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
8
|
-
var
|
|
8
|
+
var _colors_vis = require("../../themes/amsterdam/global_styling/variables/_colors_vis");
|
|
9
9
|
/*
|
|
10
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -15,4 +15,4 @@ var _euiThemeBorealis = require("@elastic/eui-theme-borealis");
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
// initialsetup of Vis color storage with default colors
|
|
18
|
-
var EUI_VIS_COLOR_STORE = exports.EUI_VIS_COLOR_STORE = _euiThemeCommon.EuiVisColorStore.getInstance(
|
|
18
|
+
var EUI_VIS_COLOR_STORE = exports.EUI_VIS_COLOR_STORE = _euiThemeCommon.EuiVisColorStore.getInstance(_colors_vis.colorVis, true);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultComputedTheme = exports.EuiThemeContext = exports.EuiSystemContext = exports.EuiNestedThemeContext = exports.EuiModificationsContext = exports.EuiHighContrastModeContext = exports.EuiColorModeContext = exports.DEFAULTS = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _theme = require("../../themes/amsterdam/theme");
|
|
9
9
|
var _utils = require("./utils");
|
|
10
10
|
/*
|
|
11
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -16,7 +16,7 @@ var _utils = require("./utils");
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
var DEFAULTS = exports.DEFAULTS = {
|
|
19
|
-
system:
|
|
19
|
+
system: _theme.EuiThemeAmsterdam,
|
|
20
20
|
modifications: {},
|
|
21
21
|
colorMode: _utils.DEFAULT_COLOR_MODE,
|
|
22
22
|
highContrastMode: false
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "101.
|
|
4
|
+
"version": "101.2.0-classic.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"url": "https://github.com/elastic/eui.git"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elastic/eui-theme-common": "
|
|
55
|
+
"@elastic/eui-theme-common": "workspace:*",
|
|
56
56
|
"@elastic/prismjs-esql": "^1.0.0",
|
|
57
57
|
"@hello-pangea/dnd": "^16.6.0",
|
|
58
58
|
"@types/lodash": "^4.14.202",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@cypress/webpack-dev-server": "^1.7.0",
|
|
107
107
|
"@elastic/charts": "^64.1.0",
|
|
108
108
|
"@elastic/datemath": "^5.0.3",
|
|
109
|
-
"@elastic/eui-theme-borealis": "
|
|
109
|
+
"@elastic/eui-theme-borealis": "workspace:*",
|
|
110
110
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
111
111
|
"@emotion/cache": "^11.11.0",
|
|
112
112
|
"@emotion/css": "^11.11.0",
|
|
@@ -284,4 +284,4 @@
|
|
|
284
284
|
"installConfig": {
|
|
285
285
|
"hoistingLimits": "workspaces"
|
|
286
286
|
}
|
|
287
|
-
}
|
|
287
|
+
}
|
|
@@ -38,14 +38,14 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
38
38
|
}), ";", (0, _global_styling.logicalTextAlignCSS)('left'), "color:var(--euiBadgeTextColor, ", badgeColors.default.color, ");background-color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );*::selection{color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );background-color:var(\n --euiBadgeTextColor,\n ", badgeColors.default.color, "\n );}&:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
|
|
39
39
|
clickable: /*#__PURE__*/(0, _react.css)("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
|
|
40
40
|
// Colors
|
|
41
|
-
default: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.default), "
|
|
41
|
+
default: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.default), " border-color:", badgeColors.default.borderColor, ";;label:default;"),
|
|
42
42
|
hollow: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.hollow), " border-color:", badgeColors.hollow.borderColor, ";;label:hollow;"),
|
|
43
43
|
primary: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.primary), ";label:primary;"),
|
|
44
44
|
accent: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.accent), ";label:accent;"),
|
|
45
45
|
warning: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.warning), ";label:warning;"),
|
|
46
46
|
danger: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.danger), ";label:danger;"),
|
|
47
47
|
success: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
48
|
-
disabled: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.disabled), "
|
|
48
|
+
disabled: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
|
|
49
49
|
// Content wrapper
|
|
50
50
|
euiBadge__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)(
|
|
51
51
|
// Ensure proper height in case of just displaying an icon
|
|
@@ -20,7 +20,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
20
20
|
* Side Public License, v 1.
|
|
21
21
|
*/
|
|
22
22
|
var euiBadgeColors = exports.euiBadgeColors = function euiBadgeColors(euiThemeContext) {
|
|
23
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
24
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
25
|
+
var badgeColorsAccentText = getBadgeColors(euiThemeContext, euiTheme.colors.textAccent);
|
|
24
26
|
return {
|
|
25
27
|
// Colors shared between buttons and badges
|
|
26
28
|
primary: (0, _button.euiButtonFillColor)(euiThemeContext, 'primary'),
|
|
@@ -29,16 +31,24 @@ var euiBadgeColors = exports.euiBadgeColors = function euiBadgeColors(euiThemeCo
|
|
|
29
31
|
danger: (0, _button.euiButtonFillColor)(euiThemeContext, 'danger'),
|
|
30
32
|
accent: (0, _button.euiButtonFillColor)(euiThemeContext, 'accent'),
|
|
31
33
|
accentSecondary: (0, _button.euiButtonFillColor)(euiThemeContext, 'accentSecondary'),
|
|
32
|
-
disabled: (0, _button.euiButtonColor)(euiThemeContext, 'disabled'),
|
|
34
|
+
disabled: _objectSpread(_objectSpread({}, (0, _button.euiButtonColor)(euiThemeContext, 'disabled')), {}, {
|
|
35
|
+
borderColor: highContrastMode ? euiTheme.colors.textDisabled : ''
|
|
36
|
+
}),
|
|
33
37
|
// Colors unique to badges
|
|
34
|
-
default: getBadgeColors(euiThemeContext, euiTheme.components.badgeBackground),
|
|
38
|
+
default: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.components.badgeBackground)), {}, {
|
|
39
|
+
borderColor: highContrastMode ? euiTheme.border.color : ''
|
|
40
|
+
}),
|
|
35
41
|
// Hollow has a border and is used for autocompleters and beta badges
|
|
36
42
|
hollow: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.colors.emptyShade)), {}, {
|
|
37
|
-
borderColor: euiTheme.components.badgeBorderColorHollow
|
|
43
|
+
borderColor: highContrastMode ? euiTheme.border.color : euiTheme.components.badgeBorderColorHollow
|
|
38
44
|
}),
|
|
39
45
|
// Colors used by beta and notification badges
|
|
40
|
-
subdued: getBadgeColors(euiThemeContext, euiTheme.components.badgeBackgroundSubdued),
|
|
41
|
-
|
|
46
|
+
subdued: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.components.badgeBackgroundSubdued)), {}, {
|
|
47
|
+
borderColor: highContrastMode ? euiTheme.border.color : ''
|
|
48
|
+
}),
|
|
49
|
+
accentText: _objectSpread(_objectSpread({}, badgeColorsAccentText), {}, {
|
|
50
|
+
borderColor: highContrastMode ? badgeColorsAccentText.backgroundColor : ''
|
|
51
|
+
}),
|
|
42
52
|
accentSecondaryText: getBadgeColors(euiThemeContext, euiTheme.colors.textAccentSecondary)
|
|
43
53
|
};
|
|
44
54
|
};
|
|
@@ -21,7 +21,7 @@ var euiNotificationBadgeStyles = exports.euiNotificationBadgeStyles = function e
|
|
|
21
21
|
var badgeColors = (0, _color_utils.euiBadgeColors)(euiThemeContext);
|
|
22
22
|
return {
|
|
23
23
|
euiNotificationBadge: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " border-radius:", euiTheme.border.radius.small, ";", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
24
|
-
|
|
24
|
+
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n overflow: hidden; /* Fix text clipping */\n ")
|
|
25
25
|
}), " cursor:default;font-size:", (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme), ";font-weight:", euiTheme.font.weight.medium, ";", (0, _global_styling.euiNumberFormat)(euiThemeContext), " text-align:center;", _global_styling.euiCanAnimate, "{transition:all ", euiTheme.animation.fast, " ease-in;};label:euiNotificationBadge;"),
|
|
26
26
|
// Sizes
|
|
27
27
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('min-width', euiTheme.size.base), ";;label:s;"),
|
|
@@ -1115,6 +1115,15 @@ EuiBasicTable.propTypes = {
|
|
|
1115
1115
|
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
1116
1116
|
*/
|
|
1117
1117
|
repositionOnScroll: _propTypes.default.bool,
|
|
1118
|
+
/**
|
|
1119
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
1120
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
1121
|
+
* information (action & additional information).
|
|
1122
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
1123
|
+
* the tooltip content and would result in repetitive output.
|
|
1124
|
+
* @default false
|
|
1125
|
+
*/
|
|
1126
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
1118
1127
|
/**
|
|
1119
1128
|
* If supplied, called when mouse movement causes the tool tip to be
|
|
1120
1129
|
* hidden.
|
|
@@ -1230,6 +1239,7 @@ EuiBasicTable.propTypes = {
|
|
|
1230
1239
|
title: _propTypes.default.node,
|
|
1231
1240
|
id: _propTypes.default.string,
|
|
1232
1241
|
repositionOnScroll: _propTypes.default.bool,
|
|
1242
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
1233
1243
|
onMouseOut: _propTypes.default.func,
|
|
1234
1244
|
"aria-label": _propTypes.default.string,
|
|
1235
1245
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -1370,6 +1380,7 @@ EuiBasicTable.propTypes = {
|
|
|
1370
1380
|
title: _propTypes.default.node,
|
|
1371
1381
|
id: _propTypes.default.string,
|
|
1372
1382
|
repositionOnScroll: _propTypes.default.bool,
|
|
1383
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
1373
1384
|
onMouseOut: _propTypes.default.func,
|
|
1374
1385
|
"aria-label": _propTypes.default.string,
|
|
1375
1386
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -616,6 +616,15 @@ EuiInMemoryTable.propTypes = {
|
|
|
616
616
|
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
617
617
|
*/
|
|
618
618
|
repositionOnScroll: _propTypes.default.bool,
|
|
619
|
+
/**
|
|
620
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
621
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
622
|
+
* information (action & additional information).
|
|
623
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
624
|
+
* the tooltip content and would result in repetitive output.
|
|
625
|
+
* @default false
|
|
626
|
+
*/
|
|
627
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
619
628
|
/**
|
|
620
629
|
* If supplied, called when mouse movement causes the tool tip to be
|
|
621
630
|
* hidden.
|
|
@@ -731,6 +740,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
731
740
|
title: _propTypes.default.node,
|
|
732
741
|
id: _propTypes.default.string,
|
|
733
742
|
repositionOnScroll: _propTypes.default.bool,
|
|
743
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
734
744
|
onMouseOut: _propTypes.default.func,
|
|
735
745
|
"aria-label": _propTypes.default.string,
|
|
736
746
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -871,6 +881,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
871
881
|
title: _propTypes.default.node,
|
|
872
882
|
id: _propTypes.default.string,
|
|
873
883
|
repositionOnScroll: _propTypes.default.bool,
|
|
884
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
874
885
|
onMouseOut: _propTypes.default.func,
|
|
875
886
|
"aria-label": _propTypes.default.string,
|
|
876
887
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -29,7 +29,9 @@ var euiCodeStyles = exports.euiCodeStyles = function euiCodeStyles(euiThemeConte
|
|
|
29
29
|
/*
|
|
30
30
|
* 1. Size the code against the text its embedded within.
|
|
31
31
|
*/
|
|
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:", codeSyntaxVariables.backgroundColor, ";
|
|
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-color:", codeSyntaxVariables.backgroundColor, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
33
|
+
forced: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
34
|
+
}), " border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", codeSyntaxVariables.inlineCodeColor, ";", codeSyntaxVariables.tokensCss, " .token.atrule .token.rule,.token.keyword{color:", codeSyntaxVariables.inlineCodeKeywordColor, ";};label:euiCode;"),
|
|
33
35
|
transparentBackground: _ref
|
|
34
36
|
};
|
|
35
37
|
};
|
|
@@ -20,9 +20,12 @@ var euiCodeTextColors = exports.euiCodeTextColors = function euiCodeTextColors(_
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* These variables are computationally expensive - do not call them outside `useEuiMemoizedStyles`
|
|
25
|
+
*/
|
|
24
26
|
var euiCodeSyntaxVariables = exports.euiCodeSyntaxVariables = function euiCodeSyntaxVariables(euiThemeContext) {
|
|
25
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
27
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
28
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
26
29
|
var _euiCodeTextColors = euiCodeTextColors(euiThemeContext),
|
|
27
30
|
backgroundColor = _euiCodeTextColors.backgroundColor,
|
|
28
31
|
color = _euiCodeTextColors.color;
|
|
@@ -52,7 +55,7 @@ var euiCodeSyntaxVariables = exports.euiCodeSyntaxVariables = function euiCodeSy
|
|
|
52
55
|
selectorClassColor: euiTheme.components.codeSelectorClassColor,
|
|
53
56
|
selectorIdColor: euiTheme.components.codeSelectorIdColor,
|
|
54
57
|
get tokensCss() {
|
|
55
|
-
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 }");
|
|
58
|
+
return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: ".concat(highContrastMode ? '1' : '.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 }");
|
|
56
59
|
}
|
|
57
60
|
};
|
|
58
61
|
};
|