@elastic/eui 101.4.0 → 102.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_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/global_styling/mixins/_button.js +2 -2
- package/es/global_styling/mixins/_color.js +1 -1
- 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 +58 -20
- 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/global_styling/mixins/_button.js +2 -2
- package/lib/global_styling/mixins/_color.js +1 -1
- 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/global_styling/mixins/_button.js +2 -2
- package/optimize/es/global_styling/mixins/_color.js +1 -1
- 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/global_styling/mixins/_button.js +2 -2
- package/optimize/lib/global_styling/mixins/_color.js +1 -1
- 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/global_styling/mixins/_button.js +2 -2
- package/test-env/global_styling/mixins/_color.js +1 -1
- 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
|
@@ -103,21 +103,6 @@ export var colorVis = {
|
|
|
103
103
|
euiColorVisDanger0: '#CC5642',
|
|
104
104
|
euiColorVisDanger1: euiPaletteColorBlind.euiColorVis9.graphic,
|
|
105
105
|
euiColorVisNeutral0: '#FFFFFF',
|
|
106
|
-
euiColorSeverity0: '#D3DAE6',
|
|
107
|
-
euiColorSeverity1: '#6092C0',
|
|
108
|
-
euiColorSeverity2: '#78A2C9',
|
|
109
|
-
euiColorSeverity3: '#90B0D1',
|
|
110
|
-
euiColorSeverity4: '#A6C0DA',
|
|
111
|
-
euiColorSeverity5: '#BECFE3',
|
|
112
|
-
euiColorSeverity6: '#DECC79',
|
|
113
|
-
euiColorSeverity7: '#D6BF57',
|
|
114
|
-
euiColorSeverity8: '#E69D8F',
|
|
115
|
-
euiColorSeverity9: '#E2907F',
|
|
116
|
-
euiColorSeverity10: '#E18773',
|
|
117
|
-
euiColorSeverity11: '#DD7B67',
|
|
118
|
-
euiColorSeverity12: '#D66E5C',
|
|
119
|
-
euiColorSeverity13: '#D2634E',
|
|
120
|
-
euiColorSeverity14: '#CC5642',
|
|
121
106
|
euiColorVisGrey0: '#d3dae6',
|
|
122
107
|
euiColorVisGrey1: '#98a2b3',
|
|
123
108
|
euiColorVisGrey2: '#69707d',
|
package/eui.d.ts
CHANGED
|
@@ -728,7 +728,7 @@ declare module '@elastic/eui/src/services/color/eui_palettes_hooks' {
|
|
|
728
728
|
declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
729
729
|
import { SerializedStyles } from '@emotion/react';
|
|
730
730
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
731
|
-
export const BACKGROUND_COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
731
|
+
export const BACKGROUND_COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
732
732
|
export type _EuiBackgroundColor = (typeof BACKGROUND_COLORS)[number];
|
|
733
733
|
export interface _EuiBackgroundColorOptions {
|
|
734
734
|
/**
|
|
@@ -751,7 +751,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
|
751
751
|
* @returns An object map of color keys to CSS,
|
|
752
752
|
* e.g. { danger: css``, success: css``, ... }
|
|
753
753
|
*/
|
|
754
|
-
export const useEuiBackgroundColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
754
|
+
export const useEuiBackgroundColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
755
755
|
/**
|
|
756
756
|
* Border colors
|
|
757
757
|
* @deprecated - use border tokens directly or use
|
|
@@ -763,7 +763,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
|
763
763
|
* @returns An object map of color keys to CSS,
|
|
764
764
|
* e.g. { danger: css``, success: css``, ... }
|
|
765
765
|
*/
|
|
766
|
-
export const useEuiBorderColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
766
|
+
export const useEuiBorderColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
767
767
|
|
|
768
768
|
}
|
|
769
769
|
declare module '@elastic/eui/src/global_styling/functions/high_contrast' {
|
|
@@ -811,7 +811,7 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
|
811
811
|
horizontal: string;
|
|
812
812
|
vertical: string;
|
|
813
813
|
};
|
|
814
|
-
export const LOGICAL_SIDES: ("left" | "right" | "
|
|
814
|
+
export const LOGICAL_SIDES: ("left" | "right" | "top" | "bottom" | "horizontal" | "vertical")[];
|
|
815
815
|
export type LogicalSides = (typeof LOGICAL_SIDES)[number];
|
|
816
816
|
export const logicals: {
|
|
817
817
|
height: string;
|
|
@@ -870,7 +870,7 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
|
870
870
|
"border-bottom-right-radius": string;
|
|
871
871
|
_shorthands: string[];
|
|
872
872
|
};
|
|
873
|
-
export const LOGICAL_PROPERTIES: ("left" | "right" | "width" | "
|
|
873
|
+
export const LOGICAL_PROPERTIES: ("left" | "right" | "width" | "top" | "bottom" | "horizontal" | "vertical" | "height" | "max-height" | "max-width" | "min-height" | "min-width" | "margin-left" | "margin-right" | "margin-top" | "margin-bottom" | "margin-horizontal" | "margin-vertical" | "padding-left" | "padding-right" | "padding-top" | "padding-bottom" | "padding-horizontal" | "padding-vertical" | "overflow-x" | "overflow-y" | "border-horizontal" | "border-horizontal-color" | "border-horizontal-width" | "border-horizontal-style" | "border-vertical" | "border-vertical-color" | "border-vertical-width" | "border-vertical-style" | "border-bottom" | "border-bottom-color" | "border-bottom-style" | "border-bottom-width" | "border-top" | "border-top-color" | "border-top-style" | "border-top-width" | "border-right" | "border-right-color" | "border-right-style" | "border-right-width" | "border-left" | "border-left-color" | "border-left-style" | "border-left-width" | "border-top-left-radius" | "border-top-right-radius" | "border-bottom-left-radius" | "border-bottom-right-radius")[];
|
|
874
874
|
export type LogicalProperties = (typeof LOGICAL_PROPERTIES)[number];
|
|
875
875
|
/**
|
|
876
876
|
*
|
|
@@ -1111,7 +1111,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_padding' {
|
|
|
1111
1111
|
*/
|
|
1112
1112
|
export const euiPaddingSize: ({ euiTheme }: UseEuiTheme, size: EuiPaddingSize) => string | null;
|
|
1113
1113
|
export const useEuiPaddingSize: (size: EuiPaddingSize) => string;
|
|
1114
|
-
export const useEuiPaddingCSS: (side?: "left" | "right" | "
|
|
1114
|
+
export const useEuiPaddingCSS: (side?: "left" | "right" | "top" | "bottom" | "horizontal" | "vertical" | undefined) => Record<"s" | "xs" | "m" | "l" | "xl" | "none", SerializedStyles>;
|
|
1115
1115
|
|
|
1116
1116
|
}
|
|
1117
1117
|
declare module '@elastic/eui/src/global_styling/mixins/_states' {
|
|
@@ -1243,7 +1243,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_responsive' {
|
|
|
1243
1243
|
declare module '@elastic/eui/src/global_styling/mixins/_button' {
|
|
1244
1244
|
import { type SerializedStyles } from '@emotion/react';
|
|
1245
1245
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1246
|
-
export const BUTTON_COLORS: readonly ["text", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
1246
|
+
export const BUTTON_COLORS: readonly ["text", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
1247
1247
|
export type _EuiButtonColor = (typeof BUTTON_COLORS)[number];
|
|
1248
1248
|
export const BUTTON_DISPLAYS: readonly ["base", "fill", "empty"];
|
|
1249
1249
|
export type _EuiButtonDisplay = (typeof BUTTON_DISPLAYS)[number];
|
|
@@ -1295,7 +1295,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_button' {
|
|
|
1295
1295
|
* @param options Button display type
|
|
1296
1296
|
* @returns An object of `_EuiButtonColor` keys including `disabled`
|
|
1297
1297
|
*/
|
|
1298
|
-
export const useEuiButtonColorCSS: (options?: _EuiButtonOptions) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled", SerializedStyles>;
|
|
1298
|
+
export const useEuiButtonColorCSS: (options?: _EuiButtonOptions) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled" | "neutral" | "risk", SerializedStyles>;
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Creates the translate animation when button is in focus.
|
|
1301
1301
|
* @returns string
|
|
@@ -2909,7 +2909,7 @@ declare module '@elastic/eui/src/services/react' {
|
|
|
2909
2909
|
|
|
2910
2910
|
}
|
|
2911
2911
|
declare module '@elastic/eui/src/components/icon/named_colors' {
|
|
2912
|
-
export const COLORS: readonly ["default", "primary", "success", "accent", "accentSecondary", "warning", "danger", "text", "subdued", "ghost", "inherit"];
|
|
2912
|
+
export const COLORS: readonly ["default", "primary", "neutral", "success", "accent", "accentSecondary", "warning", "risk", "danger", "text", "subdued", "ghost", "inherit"];
|
|
2913
2913
|
export type NamedColor = (typeof COLORS)[number];
|
|
2914
2914
|
export function isNamedColor(name: string): boolean;
|
|
2915
2915
|
|
|
@@ -2919,15 +2919,17 @@ declare module '@elastic/eui/src/components/icon/icon.styles' {
|
|
|
2919
2919
|
export const iconLoadingOpacity = 0.05;
|
|
2920
2920
|
export const euiIconStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
2921
2921
|
euiIcon: import("@emotion/react").SerializedStyles;
|
|
2922
|
+
primary: import("@emotion/react").SerializedStyles;
|
|
2922
2923
|
accent: import("@emotion/react").SerializedStyles;
|
|
2923
2924
|
accentSecondary: import("@emotion/react").SerializedStyles;
|
|
2924
|
-
danger: import("@emotion/react").SerializedStyles;
|
|
2925
2925
|
ghost: import("@emotion/react").SerializedStyles;
|
|
2926
|
-
primary: import("@emotion/react").SerializedStyles;
|
|
2927
|
-
success: import("@emotion/react").SerializedStyles;
|
|
2928
2926
|
subdued: import("@emotion/react").SerializedStyles;
|
|
2929
2927
|
text: import("@emotion/react").SerializedStyles;
|
|
2928
|
+
neutral: import("@emotion/react").SerializedStyles;
|
|
2929
|
+
success: import("@emotion/react").SerializedStyles;
|
|
2930
2930
|
warning: import("@emotion/react").SerializedStyles;
|
|
2931
|
+
risk: import("@emotion/react").SerializedStyles;
|
|
2932
|
+
danger: import("@emotion/react").SerializedStyles;
|
|
2931
2933
|
inherit: import("@emotion/react").SerializedStyles;
|
|
2932
2934
|
default: import("@emotion/react").SerializedStyles;
|
|
2933
2935
|
customColor: import("@emotion/react").SerializedStyles;
|
|
@@ -3756,7 +3758,7 @@ declare module '@elastic/eui/src/components/button/button' {
|
|
|
3756
3758
|
import { CommonProps, ExclusiveUnion, PropsForAnchor, PropsForButton } from '@elastic/eui/src/components/common';
|
|
3757
3759
|
import { _EuiButtonColor } from '@elastic/eui/src/global_styling/mixins/_button';
|
|
3758
3760
|
import { EuiButtonDisplayCommonProps } from '@elastic/eui/src/components/button/button_display/_button_display';
|
|
3759
|
-
export const COLORS: readonly ["text", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
3761
|
+
export const COLORS: readonly ["text", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
3760
3762
|
export type EuiButtonColor = _EuiButtonColor;
|
|
3761
3763
|
export const SIZES: readonly ["s", "m"];
|
|
3762
3764
|
export type EuiButtonSize = (typeof SIZES)[number];
|
|
@@ -3878,7 +3880,7 @@ declare module '@elastic/eui/src/components/button/button_icon/button_icon.style
|
|
|
3878
3880
|
s: SerializedStyles;
|
|
3879
3881
|
m: SerializedStyles;
|
|
3880
3882
|
};
|
|
3881
|
-
export const _emptyHoverStyles: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger", SerializedStyles>;
|
|
3883
|
+
export const _emptyHoverStyles: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk", SerializedStyles>;
|
|
3882
3884
|
|
|
3883
3885
|
}
|
|
3884
3886
|
declare module '@elastic/eui/src/components/button/button_icon/button_icon' {
|
|
@@ -4081,7 +4083,7 @@ declare module '@elastic/eui/src/components/button/button_group/button_group_but
|
|
|
4081
4083
|
euiButtonGroupButton__iconOnly: SerializedStyles;
|
|
4082
4084
|
};
|
|
4083
4085
|
};
|
|
4084
|
-
export const _compressedButtonFocusColors: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled", SerializedStyles>;
|
|
4086
|
+
export const _compressedButtonFocusColors: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled" | "neutral" | "risk", SerializedStyles>;
|
|
4085
4087
|
|
|
4086
4088
|
}
|
|
4087
4089
|
declare module '@elastic/eui/src/components/button/button_group/button_group_button' {
|
|
@@ -5771,7 +5773,7 @@ declare module '@elastic/eui/src/components/panel/panel' {
|
|
|
5771
5773
|
export type PanelPaddingSize = (typeof _SIZES)[number];
|
|
5772
5774
|
export const BORDER_RADII: readonly ["none", "m"];
|
|
5773
5775
|
export type PanelBorderRadius = (typeof BORDER_RADII)[number];
|
|
5774
|
-
export const COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
5776
|
+
export const COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
5775
5777
|
export type PanelColor = _EuiBackgroundColor | 'highlighted';
|
|
5776
5778
|
export interface _EuiPanelProps extends CommonProps {
|
|
5777
5779
|
/**
|
|
@@ -7981,6 +7983,15 @@ declare module '@elastic/eui/src/components/badge/color_utils' {
|
|
|
7981
7983
|
color: string;
|
|
7982
7984
|
backgroundColor: string;
|
|
7983
7985
|
};
|
|
7986
|
+
neutral: {
|
|
7987
|
+
border: string;
|
|
7988
|
+
color: string;
|
|
7989
|
+
backgroundColor: string;
|
|
7990
|
+
} | {
|
|
7991
|
+
border?: undefined;
|
|
7992
|
+
color: string;
|
|
7993
|
+
backgroundColor: string;
|
|
7994
|
+
};
|
|
7984
7995
|
success: {
|
|
7985
7996
|
border: string;
|
|
7986
7997
|
color: string;
|
|
@@ -7999,6 +8010,15 @@ declare module '@elastic/eui/src/components/badge/color_utils' {
|
|
|
7999
8010
|
color: string;
|
|
8000
8011
|
backgroundColor: string;
|
|
8001
8012
|
};
|
|
8013
|
+
risk: {
|
|
8014
|
+
border: string;
|
|
8015
|
+
color: string;
|
|
8016
|
+
backgroundColor: string;
|
|
8017
|
+
} | {
|
|
8018
|
+
border?: undefined;
|
|
8019
|
+
color: string;
|
|
8020
|
+
backgroundColor: string;
|
|
8021
|
+
};
|
|
8002
8022
|
danger: {
|
|
8003
8023
|
border: string;
|
|
8004
8024
|
color: string;
|
|
@@ -8080,9 +8100,11 @@ declare module '@elastic/eui/src/components/badge/badge.styles' {
|
|
|
8080
8100
|
hollow: import("@emotion/react").SerializedStyles;
|
|
8081
8101
|
primary: import("@emotion/react").SerializedStyles;
|
|
8082
8102
|
accent: import("@emotion/react").SerializedStyles;
|
|
8103
|
+
neutral: import("@emotion/react").SerializedStyles;
|
|
8104
|
+
success: import("@emotion/react").SerializedStyles;
|
|
8083
8105
|
warning: import("@emotion/react").SerializedStyles;
|
|
8106
|
+
risk: import("@emotion/react").SerializedStyles;
|
|
8084
8107
|
danger: import("@emotion/react").SerializedStyles;
|
|
8085
|
-
success: import("@emotion/react").SerializedStyles;
|
|
8086
8108
|
disabled: import("@emotion/react").SerializedStyles;
|
|
8087
8109
|
euiBadge__content: import("@emotion/react").SerializedStyles;
|
|
8088
8110
|
text: {
|
|
@@ -8108,7 +8130,7 @@ declare module '@elastic/eui/src/components/badge/badge' {
|
|
|
8108
8130
|
import { CommonProps, ExclusiveUnion, PropsOf } from '@elastic/eui/src/components/common';
|
|
8109
8131
|
import { EuiIcon, IconType } from '@elastic/eui/src/components/icon';
|
|
8110
8132
|
export const ICON_SIDES: readonly ["left", "right"]; type IconSide = (typeof ICON_SIDES)[number];
|
|
8111
|
-
export const COLORS: readonly ["default", "hollow", "primary", "
|
|
8133
|
+
export const COLORS: readonly ["default", "hollow", "primary", "accent", "neutral", "success", "warning", "risk", "danger"]; type BadgeColor = (typeof COLORS)[number]; type WithButtonProps = {
|
|
8112
8134
|
/**
|
|
8113
8135
|
* Will apply an onclick to the badge itself
|
|
8114
8136
|
*/
|
|
@@ -12422,6 +12444,21 @@ declare module '@elastic/eui/src/themes/themes' {
|
|
|
12422
12444
|
provider?: EuiThemeSystem;
|
|
12423
12445
|
}
|
|
12424
12446
|
|
|
12447
|
+
}
|
|
12448
|
+
declare module '@elastic/eui/src/themes/amsterdam/global_styling/variables/_colors_severity' {
|
|
12449
|
+
/**
|
|
12450
|
+
* These are not actually used, but we map them to ensure token parity.
|
|
12451
|
+
* They are mapped to other vis colors
|
|
12452
|
+
*/
|
|
12453
|
+
export const severityColors: {
|
|
12454
|
+
unknown: string;
|
|
12455
|
+
neutral: string;
|
|
12456
|
+
success: string;
|
|
12457
|
+
warning: string;
|
|
12458
|
+
risk: string;
|
|
12459
|
+
danger: string;
|
|
12460
|
+
};
|
|
12461
|
+
|
|
12425
12462
|
}
|
|
12426
12463
|
declare module '@elastic/eui/src/themes/amsterdam/global_styling/variables/_colors' {
|
|
12427
12464
|
import { _EuiThemeColors, _EuiThemeBrandColors, _EuiThemeBrandTextColors, _EuiThemeShadeColors, _EuiThemeSpecialColors, _EuiThemeTextColors, _EuiThemeColorsMode, _EuiThemeBackgroundColors, _EuiThemeBorderColors, _EuiThemeTransparentBackgroundColors } from '@elastic/eui-theme-common';
|
|
@@ -16186,10 +16223,9 @@ declare module '@elastic/eui/src/components/datagrid/body/header/column_sorting'
|
|
|
16186
16223
|
/**
|
|
16187
16224
|
* Column sorting utility helpers
|
|
16188
16225
|
*/
|
|
16189
|
-
export const useColumnSorting: ({ sorting, id,
|
|
16226
|
+
export const useColumnSorting: ({ sorting, id, }: {
|
|
16190
16227
|
sorting?: EuiDataGridSorting | undefined;
|
|
16191
16228
|
id: string;
|
|
16192
|
-
hasColumnActions: boolean;
|
|
16193
16229
|
}) => {
|
|
16194
16230
|
sortingArrow: React.JSX.Element | null;
|
|
16195
16231
|
ariaSort: "ascending" | "descending" | undefined;
|
|
@@ -18627,8 +18663,10 @@ declare module '@elastic/eui/src/components/empty_prompt/empty_prompt.styles' {
|
|
|
18627
18663
|
accent: import("@emotion/react").SerializedStyles;
|
|
18628
18664
|
accentSecondary: import("@emotion/react").SerializedStyles;
|
|
18629
18665
|
danger: import("@emotion/react").SerializedStyles;
|
|
18666
|
+
risk: import("@emotion/react").SerializedStyles;
|
|
18630
18667
|
warning: import("@emotion/react").SerializedStyles;
|
|
18631
18668
|
success: import("@emotion/react").SerializedStyles;
|
|
18669
|
+
neutral: import("@emotion/react").SerializedStyles;
|
|
18632
18670
|
};
|
|
18633
18671
|
};
|
|
18634
18672
|
|
|
@@ -41,7 +41,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
41
41
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
42
42
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
43
43
|
var ICON_SIDES = exports.ICON_SIDES = ['left', 'right'];
|
|
44
|
-
var COLORS = exports.COLORS = ['default', 'hollow', 'primary', '
|
|
44
|
+
var COLORS = exports.COLORS = ['default', 'hollow', 'primary', 'accent', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
45
45
|
var EuiBadge = exports.EuiBadge = function EuiBadge(_ref) {
|
|
46
46
|
var children = _ref.children,
|
|
47
47
|
_ref$color = _ref.color,
|
|
@@ -42,9 +42,11 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
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
|
+
neutral: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.neutral), ";label:neutral;"),
|
|
46
|
+
success: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
45
47
|
warning: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.warning), ";label:warning;"),
|
|
48
|
+
risk: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.risk), ";label:risk;"),
|
|
46
49
|
danger: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.danger), ";label:danger;"),
|
|
47
|
-
success: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
48
50
|
disabled: /*#__PURE__*/(0, _react.css)(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
|
|
49
51
|
// Content wrapper
|
|
50
52
|
euiBadge__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)(
|
|
@@ -34,8 +34,10 @@ var euiBadgeColors = exports.euiBadgeColors = function euiBadgeColors(euiThemeCo
|
|
|
34
34
|
return {
|
|
35
35
|
// Colors shared between buttons and badges
|
|
36
36
|
primary: (0, _button.euiButtonFillColor)(euiThemeContext, 'primary'),
|
|
37
|
+
neutral: (0, _button.euiButtonFillColor)(euiThemeContext, 'neutral'),
|
|
37
38
|
success: (0, _button.euiButtonFillColor)(euiThemeContext, 'success'),
|
|
38
39
|
warning: (0, _button.euiButtonFillColor)(euiThemeContext, 'warning'),
|
|
40
|
+
risk: (0, _button.euiButtonFillColor)(euiThemeContext, 'risk'),
|
|
39
41
|
danger: (0, _button.euiButtonFillColor)(euiThemeContext, 'danger'),
|
|
40
42
|
accent: (0, _button.euiButtonFillColor)(euiThemeContext, 'accent'),
|
|
41
43
|
accentSecondary: (0, _button.euiButtonFillColor)(euiThemeContext, 'accentSecondary'),
|
|
@@ -29,8 +29,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
29
29
|
var useColumnSorting = exports.useColumnSorting = function useColumnSorting(_ref) {
|
|
30
30
|
var _sorting$columns;
|
|
31
31
|
var sorting = _ref.sorting,
|
|
32
|
-
id = _ref.id
|
|
33
|
-
hasColumnActions = _ref.hasColumnActions;
|
|
32
|
+
id = _ref.id;
|
|
34
33
|
var sortedColumn = (0, _react.useMemo)(function () {
|
|
35
34
|
return sorting === null || sorting === void 0 ? void 0 : sorting.columns.find(function (col) {
|
|
36
35
|
return col.id === id;
|
|
@@ -52,26 +51,28 @@ var useColumnSorting = exports.useColumnSorting = function useColumnSorting(_ref
|
|
|
52
51
|
}, [id, isColumnSorted, sortedColumn]);
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
|
-
* aria-sort attribute - should only be used when a single column is being sorted
|
|
54
|
+
* `aria-sort` attribute - should only be used when a single column is being sorted
|
|
56
55
|
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
|
|
57
56
|
* @see https://www.w3.org/WAI/ARIA/apg/example-index/table/sortable-table.html
|
|
58
57
|
* @see https://github.com/w3c/aria/issues/283 for potential future multi-column usage
|
|
59
58
|
*/
|
|
60
|
-
var
|
|
59
|
+
var hasAriaSortOnly = isColumnSorted && hasOnlyOneSort;
|
|
60
|
+
var ariaSort = hasAriaSortOnly ? sorting.columns[0].direction === 'asc' ? 'ascending' : 'descending' : undefined;
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* `aria-describedby` ID for when `aria-sort` cannot be used
|
|
64
|
+
*/
|
|
63
65
|
var sortingAriaId = (0, _services.useGeneratedHtmlId)({
|
|
64
66
|
prefix: 'euiDataGridCellHeader',
|
|
65
67
|
suffix: 'sorting'
|
|
66
68
|
});
|
|
67
69
|
|
|
68
70
|
/**
|
|
69
|
-
*
|
|
71
|
+
* Screen-reader-only sorting status, an alternative to `aria-sort` for multi-column sorting
|
|
70
72
|
*/
|
|
71
73
|
var sortingScreenReaderText = (0, _react.useMemo)(function () {
|
|
72
74
|
var _sorting$columns2;
|
|
73
|
-
if (!isColumnSorted) return null;
|
|
74
|
-
if (!hasColumnActions && hasOnlyOneSort) return null; // in this scenario, the `aria-sort` attribute will be used by screen readers
|
|
75
|
+
if (!isColumnSorted || hasAriaSortOnly) return null;
|
|
75
76
|
return (0, _react2.jsx)("p", {
|
|
76
77
|
id: sortingAriaId,
|
|
77
78
|
hidden: true
|
|
@@ -134,7 +135,7 @@ var useColumnSorting = exports.useColumnSorting = function useColumnSorting(_ref
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
}), ".");
|
|
137
|
-
}, [isColumnSorted,
|
|
138
|
+
}, [isColumnSorted, hasAriaSortOnly, sortingAriaId, sorting === null || sorting === void 0 ? void 0 : sorting.columns, hasOnlyOneSort]);
|
|
138
139
|
return {
|
|
139
140
|
sortingArrow: sortingArrow,
|
|
140
141
|
ariaSort: ariaSort,
|
|
@@ -73,8 +73,7 @@ var EuiDataGridHeaderCell = exports.EuiDataGridHeaderCell = /*#__PURE__*/(0, _re
|
|
|
73
73
|
var actionsButtonRef = (0, _react.useRef)(null);
|
|
74
74
|
var _useColumnSorting = (0, _column_sorting.useColumnSorting)({
|
|
75
75
|
sorting: sorting,
|
|
76
|
-
id: id
|
|
77
|
-
hasColumnActions: hasColumnActions
|
|
76
|
+
id: id
|
|
78
77
|
}),
|
|
79
78
|
sortingArrow = _useColumnSorting.sortingArrow,
|
|
80
79
|
ariaSort = _useColumnSorting.ariaSort,
|
|
@@ -121,8 +121,10 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
121
121
|
accent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
122
122
|
accentSecondary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
123
123
|
danger: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
124
|
+
risk: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('risk')), ";;label:risk;"),
|
|
124
125
|
warning: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
125
|
-
success: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
126
|
+
success: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('success')), ";;label:success;"),
|
|
127
|
+
neutral: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('neutral')), ";;label:neutral;")
|
|
126
128
|
}, generatePaddingStyles())
|
|
127
129
|
};
|
|
128
130
|
};
|
|
@@ -24,6 +24,8 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
24
24
|
};
|
|
25
25
|
var euiFormControlLayoutIconsStyles = exports.euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsStyles(euiThemeContext) {
|
|
26
26
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
27
|
+
controlHeight = _euiFormVariables.controlHeight,
|
|
28
|
+
controlCompressedHeight = _euiFormVariables.controlCompressedHeight,
|
|
27
29
|
controlPadding = _euiFormVariables.controlPadding,
|
|
28
30
|
controlCompressedPadding = _euiFormVariables.controlCompressedPadding,
|
|
29
31
|
controlDisabledColor = _euiFormVariables.controlDisabledColor;
|
|
@@ -31,10 +33,10 @@ var euiFormControlLayoutIconsStyles = exports.euiFormControlLayoutIconsStyles =
|
|
|
31
33
|
euiFormControlLayoutIcons: _ref,
|
|
32
34
|
uncompressed: "\n gap: ".concat((0, _global_styling.mathWithUnits)(controlPadding, function (x) {
|
|
33
35
|
return x / 2;
|
|
34
|
-
}), ";\n "),
|
|
36
|
+
}), ";\n max-block-size: ").concat(controlHeight, ";\n "),
|
|
35
37
|
compressed: /*#__PURE__*/(0, _react.css)("gap:", (0, _global_styling.mathWithUnits)(controlCompressedPadding, function (x) {
|
|
36
38
|
return x / 2;
|
|
37
|
-
}), ";;label:compressed;"),
|
|
39
|
+
}), ";max-block-size:", controlCompressedHeight, ";;label:compressed;"),
|
|
38
40
|
disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;color:", controlDisabledColor, ";;label:disabled;"),
|
|
39
41
|
position: {
|
|
40
42
|
absolute: {
|
|
@@ -39,15 +39,17 @@ var euiIconStyles = exports.euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
39
39
|
// Base
|
|
40
40
|
euiIcon: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor;transform:translate(0, 0);.euiIcon__fillNegative{fill:", euiTheme.colors.darkestShade, ";};label:euiIcon;"),
|
|
41
41
|
// Colors
|
|
42
|
+
primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
42
43
|
accent: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textAccent, ";;label:accent;"),
|
|
43
44
|
accentSecondary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textAccentSecondary, ";;label:accentSecondary;"),
|
|
44
|
-
danger: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
45
45
|
ghost: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.ghost, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:ghost;"),
|
|
46
|
-
primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
47
|
-
success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSuccess, ";;label:success;"),
|
|
48
46
|
subdued: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSubdued, ";;label:subdued;"),
|
|
49
47
|
text: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textHeading, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:text;"),
|
|
48
|
+
neutral: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textNeutral, ";;label:neutral;"),
|
|
49
|
+
success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSuccess, ";;label:success;"),
|
|
50
50
|
warning: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textWarning, ";;label:warning;"),
|
|
51
|
+
risk: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textRisk, ";;label:risk;"),
|
|
52
|
+
danger: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
51
53
|
inherit: _ref2,
|
|
52
54
|
default: /*#__PURE__*/(0, _react.css)(";label:default;"),
|
|
53
55
|
customColor: /*#__PURE__*/(0, _react.css)(";label:customColor;"),
|
|
@@ -13,7 +13,7 @@ exports.isNamedColor = isNamedColor;
|
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
var COLORS = exports.COLORS = ['default', 'primary', 'success', 'accent', 'accentSecondary', 'warning', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
16
|
+
var COLORS = exports.COLORS = ['default', 'primary', 'neutral', 'success', 'accent', 'accentSecondary', 'warning', 'risk', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
17
17
|
function isNamedColor(name) {
|
|
18
18
|
return COLORS.includes(name);
|
|
19
19
|
}
|
|
@@ -21,7 +21,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
21
21
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
22
|
* Side Public License, v 1.
|
|
23
23
|
*/
|
|
24
|
-
var BUTTON_COLORS = exports.BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
24
|
+
var BUTTON_COLORS = exports.BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
25
25
|
var BUTTON_DISPLAYS = exports.BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
|
|
26
26
|
/**
|
|
27
27
|
* Creates the `base` version of button styles with proper text contrast.
|
|
@@ -52,7 +52,7 @@ var euiButtonFillColor = exports.euiButtonFillColor = function euiButtonFillColo
|
|
|
52
52
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
53
53
|
var backgroundTokenName = (0, _euiThemeCommon.getTokenName)('backgroundFilled', color);
|
|
54
54
|
var textColorTokenName = (0, _euiThemeCommon.getTokenName)('textColorFilled', color);
|
|
55
|
-
var highContrastForeground =
|
|
55
|
+
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.ink : color === 'disabled' ? euiTheme.components.buttons[textColorTokenName] : euiTheme.colors.textInverse;
|
|
56
56
|
var foreground = highContrastMode ? highContrastForeground : euiTheme.components.buttons[textColorTokenName];
|
|
57
57
|
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
58
58
|
return _objectSpread({
|
|
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
19
19
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
20
|
* Side Public License, v 1.
|
|
21
21
|
*/
|
|
22
|
-
var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
22
|
+
var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated - use background tokens directly
|
|
25
25
|
* @returns A single background color with optional alpha transparency
|