@elastic/eui 101.4.0 → 102.0.0-amsterdam.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_amsterdam_dark.json +20 -15
- package/dist/eui_theme_amsterdam_dark.json.d.ts +20 -15
- package/dist/eui_theme_amsterdam_light.json +20 -15
- package/dist/eui_theme_amsterdam_light.json.d.ts +20 -15
- package/dist/eui_theme_borealis_dark.json +20 -15
- package/dist/eui_theme_borealis_dark.json.d.ts +20 -15
- package/dist/eui_theme_borealis_light.json +20 -15
- package/dist/eui_theme_borealis_light.json.d.ts +20 -15
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/badge.styles.js +3 -1
- package/es/components/badge/color_utils.js +2 -0
- package/es/components/datagrid/body/header/column_sorting.js +10 -9
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -2
- package/es/components/empty_prompt/empty_prompt.styles.js +3 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.styles.js +4 -2
- package/es/components/icon/icon.styles.js +5 -3
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/provider/provider.js +2 -2
- package/es/global_styling/mixins/_button.js +2 -2
- package/es/global_styling/mixins/_color.js +1 -1
- package/es/services/color/vis_color_store.js +1 -1
- package/es/services/theme/context.js +2 -2
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +189 -142
- package/es/themes/amsterdam/global_styling/variables/_colors.js +218 -176
- package/es/themes/amsterdam/global_styling/variables/_colors_severity.js +20 -0
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -15
- package/eui.d.ts +386 -348
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/badge.styles.js +3 -1
- package/lib/components/badge/color_utils.js +2 -0
- package/lib/components/datagrid/body/header/column_sorting.js +10 -9
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -2
- package/lib/components/empty_prompt/empty_prompt.styles.js +3 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +4 -2
- package/lib/components/icon/icon.styles.js +5 -3
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/provider/provider.js +2 -2
- package/lib/global_styling/mixins/_button.js +2 -2
- package/lib/global_styling/mixins/_color.js +1 -1
- package/lib/services/color/vis_color_store.js +2 -2
- package/lib/services/theme/context.js +2 -2
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +189 -142
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +218 -176
- package/lib/themes/amsterdam/global_styling/variables/_colors_severity.js +26 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -15
- package/optimize/es/components/badge/badge.js +1 -1
- package/optimize/es/components/badge/badge.styles.js +3 -1
- package/optimize/es/components/badge/color_utils.js +2 -0
- package/optimize/es/components/datagrid/body/header/column_sorting.js +10 -9
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +1 -2
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +3 -1
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.styles.js +4 -2
- package/optimize/es/components/icon/icon.styles.js +5 -3
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/global_styling/mixins/_button.js +2 -2
- package/optimize/es/global_styling/mixins/_color.js +1 -1
- package/optimize/es/services/color/vis_color_store.js +1 -1
- package/optimize/es/services/theme/context.js +2 -2
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +189 -142
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +218 -176
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_severity.js +20 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -15
- package/optimize/lib/components/badge/badge.js +1 -1
- package/optimize/lib/components/badge/badge.styles.js +3 -1
- package/optimize/lib/components/badge/color_utils.js +2 -0
- package/optimize/lib/components/datagrid/body/header/column_sorting.js +10 -9
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +3 -1
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +4 -2
- package/optimize/lib/components/icon/icon.styles.js +5 -3
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/provider/provider.js +2 -2
- package/optimize/lib/global_styling/mixins/_button.js +2 -2
- package/optimize/lib/global_styling/mixins/_color.js +1 -1
- package/optimize/lib/services/color/vis_color_store.js +2 -2
- package/optimize/lib/services/theme/context.js +2 -2
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +189 -142
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +218 -176
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_severity.js +26 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -15
- package/package.json +4 -4
- package/src/themes/amsterdam/_colors_dark.scss +13 -0
- package/src/themes/amsterdam/_colors_light.scss +13 -0
- package/src/themes/amsterdam/global_styling/variables/_colors_severity.scss +9 -0
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/badge.styles.js +3 -1
- package/test-env/components/badge/color_utils.js +2 -0
- package/test-env/components/datagrid/body/header/column_sorting.js +10 -9
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -2
- package/test-env/components/empty_prompt/empty_prompt.styles.js +3 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.styles.js +4 -2
- package/test-env/components/icon/icon.styles.js +5 -3
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/provider/provider.js +2 -2
- package/test-env/global_styling/mixins/_button.js +2 -2
- package/test-env/global_styling/mixins/_color.js +1 -1
- package/test-env/services/color/vis_color_store.js +2 -2
- package/test-env/services/theme/context.js +2 -2
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +189 -142
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +218 -176
- package/test-env/themes/amsterdam/global_styling/variables/_colors_severity.js +26 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -15
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.severityColors = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* These are not actually used, but we map them to ensure token parity.
|
|
17
|
+
* They are mapped to other vis colors
|
|
18
|
+
*/
|
|
19
|
+
var severityColors = exports.severityColors = {
|
|
20
|
+
unknown: '#D3DAE6',
|
|
21
|
+
neutral: '#BECFE3',
|
|
22
|
+
success: '#54B399',
|
|
23
|
+
warning: '#D6BF57',
|
|
24
|
+
risk: '#DA8B45',
|
|
25
|
+
danger: '#E7664C'
|
|
26
|
+
};
|
|
@@ -109,21 +109,6 @@ var colorVis = exports.colorVis = {
|
|
|
109
109
|
euiColorVisDanger0: '#CC5642',
|
|
110
110
|
euiColorVisDanger1: euiPaletteColorBlind.euiColorVis9.graphic,
|
|
111
111
|
euiColorVisNeutral0: '#FFFFFF',
|
|
112
|
-
euiColorSeverity0: '#D3DAE6',
|
|
113
|
-
euiColorSeverity1: '#6092C0',
|
|
114
|
-
euiColorSeverity2: '#78A2C9',
|
|
115
|
-
euiColorSeverity3: '#90B0D1',
|
|
116
|
-
euiColorSeverity4: '#A6C0DA',
|
|
117
|
-
euiColorSeverity5: '#BECFE3',
|
|
118
|
-
euiColorSeverity6: '#DECC79',
|
|
119
|
-
euiColorSeverity7: '#D6BF57',
|
|
120
|
-
euiColorSeverity8: '#E69D8F',
|
|
121
|
-
euiColorSeverity9: '#E2907F',
|
|
122
|
-
euiColorSeverity10: '#E18773',
|
|
123
|
-
euiColorSeverity11: '#DD7B67',
|
|
124
|
-
euiColorSeverity12: '#D66E5C',
|
|
125
|
-
euiColorSeverity13: '#D2634E',
|
|
126
|
-
euiColorSeverity14: '#CC5642',
|
|
127
112
|
euiColorVisGrey0: '#d3dae6',
|
|
128
113
|
euiColorVisGrey1: '#98a2b3',
|
|
129
114
|
euiColorVisGrey2: '#69707d',
|
|
@@ -23,7 +23,7 @@ import { getTextColor, getColorContrast, getIsValidColor } from './color_utils';
|
|
|
23
23
|
import { euiBadgeStyles } from './badge.styles';
|
|
24
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
25
|
export var ICON_SIDES = ['left', 'right'];
|
|
26
|
-
export var COLORS = ['default', 'hollow', 'primary', '
|
|
26
|
+
export var COLORS = ['default', 'hollow', 'primary', 'accent', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
27
27
|
export var EuiBadge = function EuiBadge(_ref) {
|
|
28
28
|
var children = _ref.children,
|
|
29
29
|
_ref$color = _ref.color,
|
|
@@ -38,9 +38,11 @@ export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
|
|
|
38
38
|
hollow: /*#__PURE__*/css(setBadgeColorVars(badgeColors.hollow), " border-color:", badgeColors.hollow.borderColor, ";;label:hollow;"),
|
|
39
39
|
primary: /*#__PURE__*/css(setBadgeColorVars(badgeColors.primary), ";label:primary;"),
|
|
40
40
|
accent: /*#__PURE__*/css(setBadgeColorVars(badgeColors.accent), ";label:accent;"),
|
|
41
|
+
neutral: /*#__PURE__*/css(setBadgeColorVars(badgeColors.neutral), ";label:neutral;"),
|
|
42
|
+
success: /*#__PURE__*/css(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
41
43
|
warning: /*#__PURE__*/css(setBadgeColorVars(badgeColors.warning), ";label:warning;"),
|
|
44
|
+
risk: /*#__PURE__*/css(setBadgeColorVars(badgeColors.risk), ";label:risk;"),
|
|
42
45
|
danger: /*#__PURE__*/css(setBadgeColorVars(badgeColors.danger), ";label:danger;"),
|
|
43
|
-
success: /*#__PURE__*/css(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
44
46
|
disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
|
|
45
47
|
// Content wrapper
|
|
46
48
|
euiBadge__content: /*#__PURE__*/css(logicalCSS(
|
|
@@ -21,8 +21,10 @@ export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
|
|
|
21
21
|
return {
|
|
22
22
|
// Colors shared between buttons and badges
|
|
23
23
|
primary: euiButtonFillColor(euiThemeContext, 'primary'),
|
|
24
|
+
neutral: euiButtonFillColor(euiThemeContext, 'neutral'),
|
|
24
25
|
success: euiButtonFillColor(euiThemeContext, 'success'),
|
|
25
26
|
warning: euiButtonFillColor(euiThemeContext, 'warning'),
|
|
27
|
+
risk: euiButtonFillColor(euiThemeContext, 'risk'),
|
|
26
28
|
danger: euiButtonFillColor(euiThemeContext, 'danger'),
|
|
27
29
|
accent: euiButtonFillColor(euiThemeContext, 'accent'),
|
|
28
30
|
accentSecondary: euiButtonFillColor(euiThemeContext, 'accentSecondary'),
|
|
@@ -19,8 +19,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
19
19
|
export var useColumnSorting = function useColumnSorting(_ref) {
|
|
20
20
|
var _sorting$columns;
|
|
21
21
|
var sorting = _ref.sorting,
|
|
22
|
-
id = _ref.id
|
|
23
|
-
hasColumnActions = _ref.hasColumnActions;
|
|
22
|
+
id = _ref.id;
|
|
24
23
|
var sortedColumn = useMemo(function () {
|
|
25
24
|
return sorting === null || sorting === void 0 ? void 0 : sorting.columns.find(function (col) {
|
|
26
25
|
return col.id === id;
|
|
@@ -42,26 +41,28 @@ export var useColumnSorting = function useColumnSorting(_ref) {
|
|
|
42
41
|
}, [id, isColumnSorted, sortedColumn]);
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
|
-
* aria-sort attribute - should only be used when a single column is being sorted
|
|
44
|
+
* `aria-sort` attribute - should only be used when a single column is being sorted
|
|
46
45
|
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
|
|
47
46
|
* @see https://www.w3.org/WAI/ARIA/apg/example-index/table/sortable-table.html
|
|
48
47
|
* @see https://github.com/w3c/aria/issues/283 for potential future multi-column usage
|
|
49
48
|
*/
|
|
50
|
-
var
|
|
49
|
+
var hasAriaSortOnly = isColumnSorted && hasOnlyOneSort;
|
|
50
|
+
var ariaSort = hasAriaSortOnly ? sorting.columns[0].direction === 'asc' ? 'ascending' : 'descending' : undefined;
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
/**
|
|
53
|
+
* `aria-describedby` ID for when `aria-sort` cannot be used
|
|
54
|
+
*/
|
|
53
55
|
var sortingAriaId = useGeneratedHtmlId({
|
|
54
56
|
prefix: 'euiDataGridCellHeader',
|
|
55
57
|
suffix: 'sorting'
|
|
56
58
|
});
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Screen-reader-only sorting status, an alternative to `aria-sort` for multi-column sorting
|
|
60
62
|
*/
|
|
61
63
|
var sortingScreenReaderText = useMemo(function () {
|
|
62
64
|
var _sorting$columns2;
|
|
63
|
-
if (!isColumnSorted) return null;
|
|
64
|
-
if (!hasColumnActions && hasOnlyOneSort) return null; // in this scenario, the `aria-sort` attribute will be used by screen readers
|
|
65
|
+
if (!isColumnSorted || hasAriaSortOnly) return null;
|
|
65
66
|
return ___EmotionJSX("p", {
|
|
66
67
|
id: sortingAriaId,
|
|
67
68
|
hidden: true
|
|
@@ -124,7 +125,7 @@ export var useColumnSorting = function useColumnSorting(_ref) {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
}), ".");
|
|
127
|
-
}, [isColumnSorted,
|
|
128
|
+
}, [isColumnSorted, hasAriaSortOnly, sortingAriaId, sorting === null || sorting === void 0 ? void 0 : sorting.columns, hasOnlyOneSort]);
|
|
128
129
|
return {
|
|
129
130
|
sortingArrow: sortingArrow,
|
|
130
131
|
ariaSort: ariaSort,
|
|
@@ -57,8 +57,7 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
|
|
|
57
57
|
var actionsButtonRef = useRef(null);
|
|
58
58
|
var _useColumnSorting = useColumnSorting({
|
|
59
59
|
sorting: sorting,
|
|
60
|
-
id: id
|
|
61
|
-
hasColumnActions: hasColumnActions
|
|
60
|
+
id: id
|
|
62
61
|
}),
|
|
63
62
|
sortingArrow = _useColumnSorting.sortingArrow,
|
|
64
63
|
ariaSort = _useColumnSorting.ariaSort,
|
|
@@ -114,8 +114,10 @@ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext)
|
|
|
114
114
|
accent: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
115
115
|
accentSecondary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
116
116
|
danger: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
117
|
+
risk: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('risk')), ";;label:risk;"),
|
|
117
118
|
warning: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
118
|
-
success: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
119
|
+
success: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('success')), ";;label:success;"),
|
|
120
|
+
neutral: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('neutral')), ";;label:neutral;")
|
|
119
121
|
}, generatePaddingStyles())
|
|
120
122
|
};
|
|
121
123
|
};
|
|
@@ -20,6 +20,8 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
20
20
|
};
|
|
21
21
|
export var euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsStyles(euiThemeContext) {
|
|
22
22
|
var _euiFormVariables = euiFormVariables(euiThemeContext),
|
|
23
|
+
controlHeight = _euiFormVariables.controlHeight,
|
|
24
|
+
controlCompressedHeight = _euiFormVariables.controlCompressedHeight,
|
|
23
25
|
controlPadding = _euiFormVariables.controlPadding,
|
|
24
26
|
controlCompressedPadding = _euiFormVariables.controlCompressedPadding,
|
|
25
27
|
controlDisabledColor = _euiFormVariables.controlDisabledColor;
|
|
@@ -27,10 +29,10 @@ export var euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsS
|
|
|
27
29
|
euiFormControlLayoutIcons: _ref,
|
|
28
30
|
uncompressed: "\n gap: ".concat(mathWithUnits(controlPadding, function (x) {
|
|
29
31
|
return x / 2;
|
|
30
|
-
}), ";\n "),
|
|
32
|
+
}), ";\n max-block-size: ").concat(controlHeight, ";\n "),
|
|
31
33
|
compressed: /*#__PURE__*/css("gap:", mathWithUnits(controlCompressedPadding, function (x) {
|
|
32
34
|
return x / 2;
|
|
33
|
-
}), ";;label:compressed;"),
|
|
35
|
+
}), ";max-block-size:", controlCompressedHeight, ";;label:compressed;"),
|
|
34
36
|
disabled: /*#__PURE__*/css("cursor:not-allowed;color:", controlDisabledColor, ";;label:disabled;"),
|
|
35
37
|
position: {
|
|
36
38
|
absolute: {
|
|
@@ -35,15 +35,17 @@ export var euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
35
35
|
// Base
|
|
36
36
|
euiIcon: /*#__PURE__*/css("flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor;transform:translate(0, 0);.euiIcon__fillNegative{fill:", euiTheme.colors.darkestShade, ";};label:euiIcon;"),
|
|
37
37
|
// Colors
|
|
38
|
+
primary: /*#__PURE__*/css("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
38
39
|
accent: /*#__PURE__*/css("color:", euiTheme.colors.textAccent, ";;label:accent;"),
|
|
39
40
|
accentSecondary: /*#__PURE__*/css("color:", euiTheme.colors.textAccentSecondary, ";;label:accentSecondary;"),
|
|
40
|
-
danger: /*#__PURE__*/css("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
41
41
|
ghost: /*#__PURE__*/css("color:", euiTheme.colors.ghost, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:ghost;"),
|
|
42
|
-
primary: /*#__PURE__*/css("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
43
|
-
success: /*#__PURE__*/css("color:", euiTheme.colors.textSuccess, ";;label:success;"),
|
|
44
42
|
subdued: /*#__PURE__*/css("color:", euiTheme.colors.textSubdued, ";;label:subdued;"),
|
|
45
43
|
text: /*#__PURE__*/css("color:", euiTheme.colors.textHeading, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:text;"),
|
|
44
|
+
neutral: /*#__PURE__*/css("color:", euiTheme.colors.textNeutral, ";;label:neutral;"),
|
|
45
|
+
success: /*#__PURE__*/css("color:", euiTheme.colors.textSuccess, ";;label:success;"),
|
|
46
46
|
warning: /*#__PURE__*/css("color:", euiTheme.colors.textWarning, ";;label:warning;"),
|
|
47
|
+
risk: /*#__PURE__*/css("color:", euiTheme.colors.textRisk, ";;label:risk;"),
|
|
48
|
+
danger: /*#__PURE__*/css("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
47
49
|
inherit: _ref2,
|
|
48
50
|
default: /*#__PURE__*/css(";label:default;"),
|
|
49
51
|
customColor: /*#__PURE__*/css(";label:customColor;"),
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export var COLORS = ['default', 'primary', 'success', 'accent', 'accentSecondary', 'warning', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
9
|
+
export var COLORS = ['default', 'primary', 'neutral', 'success', 'accent', 'accentSecondary', 'warning', 'risk', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
10
10
|
export function isNamedColor(name) {
|
|
11
11
|
return COLORS.includes(name);
|
|
12
12
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { EuiThemeAmsterdam } from '../../themes';
|
|
11
11
|
import { EuiThemeProvider } from '../../services';
|
|
12
12
|
import { emitEuiProviderWarning } from '../../services/theme/warning';
|
|
13
13
|
import { cache as fallbackCache } from '../../services/emotion/css';
|
|
@@ -26,7 +26,7 @@ export var EuiProvider = function EuiProvider(_ref) {
|
|
|
26
26
|
var _ref$cache = _ref.cache,
|
|
27
27
|
cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
|
|
28
28
|
_ref$theme = _ref.theme,
|
|
29
|
-
theme = _ref$theme === void 0 ?
|
|
29
|
+
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
30
30
|
_ref$globalStyles = _ref.globalStyles,
|
|
31
31
|
Globals = _ref$globalStyles === void 0 ? EuiGlobalStyles : _ref$globalStyles,
|
|
32
32
|
_ref$utilityClasses = _ref.utilityClasses,
|
|
@@ -14,7 +14,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
import { css, keyframes } from '@emotion/react';
|
|
15
15
|
import { getTokenName, euiCanAnimate } from '@elastic/eui-theme-common';
|
|
16
16
|
import { makeHighContrastColor, useEuiMemoizedStyles } from '../../services';
|
|
17
|
-
export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
17
|
+
export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
18
18
|
export var BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
|
|
19
19
|
/**
|
|
20
20
|
* Creates the `base` version of button styles with proper text contrast.
|
|
@@ -45,7 +45,7 @@ export var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, col
|
|
|
45
45
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
46
46
|
var backgroundTokenName = getTokenName('backgroundFilled', color);
|
|
47
47
|
var textColorTokenName = getTokenName('textColorFilled', color);
|
|
48
|
-
var highContrastForeground =
|
|
48
|
+
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.ink : color === 'disabled' ? euiTheme.components.buttons[textColorTokenName] : euiTheme.colors.textInverse;
|
|
49
49
|
var foreground = highContrastMode ? highContrastForeground : euiTheme.components.buttons[textColorTokenName];
|
|
50
50
|
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
51
51
|
return _objectSpread({
|
|
@@ -12,7 +12,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
import { css } from '@emotion/react';
|
|
13
13
|
import { useEuiMemoizedStyles } from '../../services';
|
|
14
14
|
import { getTokenName } from '@elastic/eui-theme-common';
|
|
15
|
-
export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
15
|
+
export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
16
16
|
/**
|
|
17
17
|
* @deprecated - use background tokens directly
|
|
18
18
|
* @returns A single background color with optional alpha transparency
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { EuiVisColorStore } from '@elastic/eui-theme-common';
|
|
10
|
-
import { colorVis } from '
|
|
10
|
+
import { colorVis } from '../../themes/amsterdam/global_styling/variables/_colors_vis';
|
|
11
11
|
|
|
12
12
|
// initialsetup of Vis color storage with default colors
|
|
13
13
|
export var EUI_VIS_COLOR_STORE = EuiVisColorStore.getInstance(colorVis, true);
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { EuiThemeAmsterdam } from '../../themes/amsterdam/theme';
|
|
11
11
|
import { DEFAULT_COLOR_MODE, getComputed } from './utils';
|
|
12
12
|
export var DEFAULTS = {
|
|
13
|
-
system:
|
|
13
|
+
system: EuiThemeAmsterdam,
|
|
14
14
|
modifications: {},
|
|
15
15
|
colorMode: DEFAULT_COLOR_MODE,
|
|
16
16
|
highContrastMode: false
|