@elastic/eui 101.4.0-amsterdam.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/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
|
@@ -641,7 +641,7 @@ declare module '@elastic/eui/src/services/color/eui_palettes_hooks' {
|
|
|
641
641
|
declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
642
642
|
import { SerializedStyles } from '@emotion/react';
|
|
643
643
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
644
|
-
export const BACKGROUND_COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
644
|
+
export const BACKGROUND_COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
645
645
|
export type _EuiBackgroundColor = (typeof BACKGROUND_COLORS)[number];
|
|
646
646
|
export interface _EuiBackgroundColorOptions {
|
|
647
647
|
/**
|
|
@@ -664,7 +664,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
|
664
664
|
* @returns An object map of color keys to CSS,
|
|
665
665
|
* e.g. { danger: css``, success: css``, ... }
|
|
666
666
|
*/
|
|
667
|
-
export const useEuiBackgroundColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
667
|
+
export const useEuiBackgroundColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
668
668
|
/**
|
|
669
669
|
* Border colors
|
|
670
670
|
* @deprecated - use border tokens directly or use
|
|
@@ -676,7 +676,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
|
676
676
|
* @returns An object map of color keys to CSS,
|
|
677
677
|
* e.g. { danger: css``, success: css``, ... }
|
|
678
678
|
*/
|
|
679
|
-
export const useEuiBorderColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
679
|
+
export const useEuiBorderColorCSS: () => Record<"primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk" | "transparent" | "plain" | "subdued" | "highlighted", SerializedStyles>;
|
|
680
680
|
|
|
681
681
|
}
|
|
682
682
|
declare module '@elastic/eui/src/global_styling/functions/high_contrast' {
|
|
@@ -724,7 +724,7 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
|
724
724
|
horizontal: string;
|
|
725
725
|
vertical: string;
|
|
726
726
|
};
|
|
727
|
-
export const LOGICAL_SIDES: ("left" | "right" | "
|
|
727
|
+
export const LOGICAL_SIDES: ("left" | "right" | "top" | "bottom" | "horizontal" | "vertical")[];
|
|
728
728
|
export type LogicalSides = (typeof LOGICAL_SIDES)[number];
|
|
729
729
|
export const logicals: {
|
|
730
730
|
height: string;
|
|
@@ -783,7 +783,7 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
|
783
783
|
"border-bottom-right-radius": string;
|
|
784
784
|
_shorthands: string[];
|
|
785
785
|
};
|
|
786
|
-
export const LOGICAL_PROPERTIES: ("left" | "right" | "width" | "
|
|
786
|
+
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")[];
|
|
787
787
|
export type LogicalProperties = (typeof LOGICAL_PROPERTIES)[number];
|
|
788
788
|
/**
|
|
789
789
|
*
|
|
@@ -1024,7 +1024,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_padding' {
|
|
|
1024
1024
|
*/
|
|
1025
1025
|
export const euiPaddingSize: ({ euiTheme }: UseEuiTheme, size: EuiPaddingSize) => string | null;
|
|
1026
1026
|
export const useEuiPaddingSize: (size: EuiPaddingSize) => string;
|
|
1027
|
-
export const useEuiPaddingCSS: (side?: "left" | "right" | "
|
|
1027
|
+
export const useEuiPaddingCSS: (side?: "left" | "right" | "top" | "bottom" | "horizontal" | "vertical" | undefined) => Record<"s" | "none" | "xs" | "m" | "l" | "xl", SerializedStyles>;
|
|
1028
1028
|
|
|
1029
1029
|
}
|
|
1030
1030
|
declare module '@elastic/eui/src/global_styling/mixins/_states' {
|
|
@@ -1162,7 +1162,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_responsive' {
|
|
|
1162
1162
|
declare module '@elastic/eui/src/global_styling/mixins/_button' {
|
|
1163
1163
|
import { type SerializedStyles } from '@emotion/react';
|
|
1164
1164
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1165
|
-
export const BUTTON_COLORS: readonly ["text", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
1165
|
+
export const BUTTON_COLORS: readonly ["text", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
1166
1166
|
export type _EuiButtonColor = (typeof BUTTON_COLORS)[number];
|
|
1167
1167
|
export const BUTTON_DISPLAYS: readonly ["base", "fill", "empty"];
|
|
1168
1168
|
export type _EuiButtonDisplay = (typeof BUTTON_DISPLAYS)[number];
|
|
@@ -1214,7 +1214,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_button' {
|
|
|
1214
1214
|
* @param options Button display type
|
|
1215
1215
|
* @returns An object of `_EuiButtonColor` keys including `disabled`
|
|
1216
1216
|
*/
|
|
1217
|
-
export const useEuiButtonColorCSS: (options?: _EuiButtonOptions) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled", SerializedStyles>;
|
|
1217
|
+
export const useEuiButtonColorCSS: (options?: _EuiButtonOptions) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled" | "neutral" | "risk", SerializedStyles>;
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Creates the translate animation when button is in focus.
|
|
1220
1220
|
* @returns string
|
|
@@ -2828,7 +2828,7 @@ declare module '@elastic/eui/src/services/react' {
|
|
|
2828
2828
|
|
|
2829
2829
|
}
|
|
2830
2830
|
declare module '@elastic/eui/src/components/icon/named_colors' {
|
|
2831
|
-
export const COLORS: readonly ["default", "primary", "success", "accent", "accentSecondary", "warning", "danger", "text", "subdued", "ghost", "inherit"];
|
|
2831
|
+
export const COLORS: readonly ["default", "primary", "neutral", "success", "accent", "accentSecondary", "warning", "risk", "danger", "text", "subdued", "ghost", "inherit"];
|
|
2832
2832
|
export type NamedColor = (typeof COLORS)[number];
|
|
2833
2833
|
export function isNamedColor(name: string): boolean;
|
|
2834
2834
|
|
|
@@ -2838,15 +2838,17 @@ declare module '@elastic/eui/src/components/icon/icon.styles' {
|
|
|
2838
2838
|
export const iconLoadingOpacity = 0.05;
|
|
2839
2839
|
export const euiIconStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
2840
2840
|
euiIcon: import("@emotion/react").SerializedStyles;
|
|
2841
|
+
primary: import("@emotion/react").SerializedStyles;
|
|
2841
2842
|
accent: import("@emotion/react").SerializedStyles;
|
|
2842
2843
|
accentSecondary: import("@emotion/react").SerializedStyles;
|
|
2843
|
-
danger: import("@emotion/react").SerializedStyles;
|
|
2844
2844
|
ghost: import("@emotion/react").SerializedStyles;
|
|
2845
|
-
primary: import("@emotion/react").SerializedStyles;
|
|
2846
|
-
success: import("@emotion/react").SerializedStyles;
|
|
2847
2845
|
subdued: import("@emotion/react").SerializedStyles;
|
|
2848
2846
|
text: import("@emotion/react").SerializedStyles;
|
|
2847
|
+
neutral: import("@emotion/react").SerializedStyles;
|
|
2848
|
+
success: import("@emotion/react").SerializedStyles;
|
|
2849
2849
|
warning: import("@emotion/react").SerializedStyles;
|
|
2850
|
+
risk: import("@emotion/react").SerializedStyles;
|
|
2851
|
+
danger: import("@emotion/react").SerializedStyles;
|
|
2850
2852
|
inherit: import("@emotion/react").SerializedStyles;
|
|
2851
2853
|
default: import("@emotion/react").SerializedStyles;
|
|
2852
2854
|
customColor: import("@emotion/react").SerializedStyles;
|
|
@@ -3675,7 +3677,7 @@ declare module '@elastic/eui/src/components/button/button' {
|
|
|
3675
3677
|
import { CommonProps, ExclusiveUnion, PropsForAnchor, PropsForButton } from '@elastic/eui/src/components/common';
|
|
3676
3678
|
import { _EuiButtonColor } from '@elastic/eui/src/global_styling/mixins/_button';
|
|
3677
3679
|
import { EuiButtonDisplayCommonProps } from '@elastic/eui/src/components/button/button_display/_button_display';
|
|
3678
|
-
export const COLORS: readonly ["text", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
3680
|
+
export const COLORS: readonly ["text", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
3679
3681
|
export type EuiButtonColor = _EuiButtonColor;
|
|
3680
3682
|
export const SIZES: readonly ["s", "m"];
|
|
3681
3683
|
export type EuiButtonSize = (typeof SIZES)[number];
|
|
@@ -3797,7 +3799,7 @@ declare module '@elastic/eui/src/components/button/button_icon/button_icon.style
|
|
|
3797
3799
|
s: SerializedStyles;
|
|
3798
3800
|
m: SerializedStyles;
|
|
3799
3801
|
};
|
|
3800
|
-
export const _emptyHoverStyles: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger", SerializedStyles>;
|
|
3802
|
+
export const _emptyHoverStyles: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "neutral" | "risk", SerializedStyles>;
|
|
3801
3803
|
|
|
3802
3804
|
}
|
|
3803
3805
|
declare module '@elastic/eui/src/components/button/button_icon/button_icon' {
|
|
@@ -4000,7 +4002,7 @@ declare module '@elastic/eui/src/components/button/button_group/button_group_but
|
|
|
4000
4002
|
euiButtonGroupButton__iconOnly: SerializedStyles;
|
|
4001
4003
|
};
|
|
4002
4004
|
};
|
|
4003
|
-
export const _compressedButtonFocusColors: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled", SerializedStyles>;
|
|
4005
|
+
export const _compressedButtonFocusColors: (euiThemeContext: UseEuiTheme) => Record<"text" | "primary" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | "disabled" | "neutral" | "risk", SerializedStyles>;
|
|
4004
4006
|
|
|
4005
4007
|
}
|
|
4006
4008
|
declare module '@elastic/eui/src/components/button/button_group/button_group_button' {
|
|
@@ -5690,7 +5692,7 @@ declare module '@elastic/eui/src/components/panel/panel' {
|
|
|
5690
5692
|
export type PanelPaddingSize = (typeof _SIZES)[number];
|
|
5691
5693
|
export const BORDER_RADII: readonly ["none", "m"];
|
|
5692
5694
|
export type PanelBorderRadius = (typeof BORDER_RADII)[number];
|
|
5693
|
-
export const COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "success", "warning", "danger"];
|
|
5695
|
+
export const COLORS: readonly ["transparent", "plain", "subdued", "highlighted", "accent", "accentSecondary", "primary", "neutral", "success", "warning", "risk", "danger"];
|
|
5694
5696
|
export type PanelColor = _EuiBackgroundColor | 'highlighted';
|
|
5695
5697
|
export interface _EuiPanelProps extends CommonProps {
|
|
5696
5698
|
/**
|
|
@@ -6948,6 +6950,21 @@ declare module '@elastic/eui/src/services/color/manipulation' {
|
|
|
6948
6950
|
*/
|
|
6949
6951
|
export const brighten: (color: string, amount: number) => string;
|
|
6950
6952
|
|
|
6953
|
+
}
|
|
6954
|
+
declare module '@elastic/eui/src/themes/amsterdam/global_styling/variables/_colors_severity' {
|
|
6955
|
+
/**
|
|
6956
|
+
* These are not actually used, but we map them to ensure token parity.
|
|
6957
|
+
* They are mapped to other vis colors
|
|
6958
|
+
*/
|
|
6959
|
+
export const severityColors: {
|
|
6960
|
+
unknown: string;
|
|
6961
|
+
neutral: string;
|
|
6962
|
+
success: string;
|
|
6963
|
+
warning: string;
|
|
6964
|
+
risk: string;
|
|
6965
|
+
danger: string;
|
|
6966
|
+
};
|
|
6967
|
+
|
|
6951
6968
|
}
|
|
6952
6969
|
declare module '@elastic/eui/src/themes/amsterdam/global_styling/variables/_colors' {
|
|
6953
6970
|
import { _EuiThemeColors, _EuiThemeBrandColors, _EuiThemeBrandTextColors, _EuiThemeShadeColors, _EuiThemeSpecialColors, _EuiThemeTextColors, _EuiThemeColorsMode, _EuiThemeBackgroundColors, _EuiThemeBorderColors, _EuiThemeTransparentBackgroundColors } from '@elastic/eui-theme-common';
|
|
@@ -8108,6 +8125,15 @@ declare module '@elastic/eui/src/components/badge/color_utils' {
|
|
|
8108
8125
|
color: string;
|
|
8109
8126
|
backgroundColor: string;
|
|
8110
8127
|
};
|
|
8128
|
+
neutral: {
|
|
8129
|
+
border: string;
|
|
8130
|
+
color: string;
|
|
8131
|
+
backgroundColor: string;
|
|
8132
|
+
} | {
|
|
8133
|
+
border?: undefined;
|
|
8134
|
+
color: string;
|
|
8135
|
+
backgroundColor: string;
|
|
8136
|
+
};
|
|
8111
8137
|
success: {
|
|
8112
8138
|
border: string;
|
|
8113
8139
|
color: string;
|
|
@@ -8126,6 +8152,15 @@ declare module '@elastic/eui/src/components/badge/color_utils' {
|
|
|
8126
8152
|
color: string;
|
|
8127
8153
|
backgroundColor: string;
|
|
8128
8154
|
};
|
|
8155
|
+
risk: {
|
|
8156
|
+
border: string;
|
|
8157
|
+
color: string;
|
|
8158
|
+
backgroundColor: string;
|
|
8159
|
+
} | {
|
|
8160
|
+
border?: undefined;
|
|
8161
|
+
color: string;
|
|
8162
|
+
backgroundColor: string;
|
|
8163
|
+
};
|
|
8129
8164
|
danger: {
|
|
8130
8165
|
border: string;
|
|
8131
8166
|
color: string;
|
|
@@ -8207,9 +8242,11 @@ declare module '@elastic/eui/src/components/badge/badge.styles' {
|
|
|
8207
8242
|
hollow: import("@emotion/react").SerializedStyles;
|
|
8208
8243
|
primary: import("@emotion/react").SerializedStyles;
|
|
8209
8244
|
accent: import("@emotion/react").SerializedStyles;
|
|
8245
|
+
neutral: import("@emotion/react").SerializedStyles;
|
|
8246
|
+
success: import("@emotion/react").SerializedStyles;
|
|
8210
8247
|
warning: import("@emotion/react").SerializedStyles;
|
|
8248
|
+
risk: import("@emotion/react").SerializedStyles;
|
|
8211
8249
|
danger: import("@emotion/react").SerializedStyles;
|
|
8212
|
-
success: import("@emotion/react").SerializedStyles;
|
|
8213
8250
|
disabled: import("@emotion/react").SerializedStyles;
|
|
8214
8251
|
euiBadge__content: import("@emotion/react").SerializedStyles;
|
|
8215
8252
|
text: {
|
|
@@ -8235,7 +8272,7 @@ declare module '@elastic/eui/src/components/badge/badge' {
|
|
|
8235
8272
|
import { CommonProps, ExclusiveUnion, PropsOf } from '@elastic/eui/src/components/common';
|
|
8236
8273
|
import { EuiIcon, IconType } from '@elastic/eui/src/components/icon';
|
|
8237
8274
|
export const ICON_SIDES: readonly ["left", "right"]; type IconSide = (typeof ICON_SIDES)[number];
|
|
8238
|
-
export const COLORS: readonly ["default", "hollow", "primary", "
|
|
8275
|
+
export const COLORS: readonly ["default", "hollow", "primary", "accent", "neutral", "success", "warning", "risk", "danger"]; type BadgeColor = (typeof COLORS)[number]; type WithButtonProps = {
|
|
8239
8276
|
/**
|
|
8240
8277
|
* Will apply an onclick to the badge itself
|
|
8241
8278
|
*/
|
|
@@ -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
|