diff --git a/package.json b/package.json index 9d961775db3ca..d0b1679936765 100644 --- a/package.json +++ b/package.json @@ -117,8 +117,8 @@ "@elastic/ecs": "^8.11.5", "@elastic/elasticsearch": "^8.17.0", "@elastic/ems-client": "8.6.3", - "@elastic/eui": "99.0.0-borealis.1", - "@elastic/eui-theme-borealis": "0.0.8", + "@elastic/eui": "99.1.0-borealis.0", + "@elastic/eui-theme-borealis": "0.0.9", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "^1.2.3", "@elastic/numeral": "^2.5.1", diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index c0bf364bd4f28..cfe33e30e8705 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -87,8 +87,8 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.6.3': ['Elastic License 2.0'], - '@elastic/eui@99.0.0-borealis.1': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], - '@elastic/eui-theme-borealis@0.0.8': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], + '@elastic/eui@99.1.0-borealis.0': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], + '@elastic/eui-theme-borealis@0.0.9': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/platform/packages/shared/kbn-coloring/src/palettes/types.ts b/src/platform/packages/shared/kbn-coloring/src/palettes/types.ts index 5a43c65097960..841c5d4ff4b4e 100644 --- a/src/platform/packages/shared/kbn-coloring/src/palettes/types.ts +++ b/src/platform/packages/shared/kbn-coloring/src/palettes/types.ts @@ -87,6 +87,10 @@ export interface PaletteDefinition { * User facing title (should be i18n-ized) */ title: string; + /** + * User facing tag (should be i18n-ized) + */ + tag?: string; /** * Flag indicating whether users should be able to pick this palette manually. */ diff --git a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/components/palette_selector/palette_selector.tsx b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/components/palette_selector/palette_selector.tsx index 54c6d05bbed18..c0c80f012a54f 100644 --- a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/components/palette_selector/palette_selector.tsx +++ b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/components/palette_selector/palette_selector.tsx @@ -12,7 +12,7 @@ import { useSelector, useDispatch } from 'react-redux'; import { EuiColorPalettePicker, EuiConfirmModal, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { KbnPalettes } from '@kbn/palettes'; +import { KbnPalettes, getAppendedTag } from '@kbn/palettes'; import { RootState, updatePalette } from '../../state/color_mapping'; import { updateAssignmentsPalette, updateColorModePalette } from '../../config/assignments'; @@ -100,6 +100,7 @@ export function PaletteSelector({ palettes }: { palettes: KbnPalettes }) { 'data-test-subj': `kbnColoring_ColorMapping_Palette-${palette.id}`, value: palette.id, title: palette.name, + append: getAppendedTag(palette.tag), palette: Array.from({ length: palette.colorCount }, (_, i) => { return palette.getColor(i); }), diff --git a/src/platform/packages/shared/kbn-palettes/classes/palette.ts b/src/platform/packages/shared/kbn-palettes/classes/palette.ts index 8c707b1c3b7da..664d7e118c18b 100644 --- a/src/platform/packages/shared/kbn-palettes/classes/palette.ts +++ b/src/platform/packages/shared/kbn-palettes/classes/palette.ts @@ -11,7 +11,7 @@ import { Optional } from 'utility-types'; import { IKbnPalette, KbnPaletteType } from './types'; export type KbnBasePaletteConfig = Optional< - Pick, + Pick, 'legacy' | 'aliases' >; @@ -20,6 +20,7 @@ export abstract class KbnBasePalette implements IKbnPalette { public readonly id: string; public readonly name: string; + public readonly tag?: string; public readonly colorCount: number; public readonly legacy: boolean; public readonly standalone: boolean; @@ -28,6 +29,7 @@ export abstract class KbnBasePalette implements IKbnPalette { constructor({ id, name, + tag, colorCount, aliases = [], legacy = false, @@ -35,6 +37,7 @@ export abstract class KbnBasePalette implements IKbnPalette { }: KbnBasePaletteConfig) { this.id = id; this.name = name; + this.tag = tag; this.colorCount = colorCount; this.legacy = legacy; this.standalone = standalone; diff --git a/src/platform/packages/shared/kbn-palettes/classes/types.ts b/src/platform/packages/shared/kbn-palettes/classes/types.ts index 345978a409a51..bb7b7dc0a4d30 100644 --- a/src/platform/packages/shared/kbn-palettes/classes/types.ts +++ b/src/platform/packages/shared/kbn-palettes/classes/types.ts @@ -21,6 +21,10 @@ export interface IKbnPalette { * Display name of this palette. */ name: string; + /** + * A tag for the palette displayed opposite of the `name`. + */ + tag?: string; /** * Type of pallette */ diff --git a/src/platform/packages/shared/kbn-palettes/components/index.tsx b/src/platform/packages/shared/kbn-palettes/components/index.tsx new file mode 100644 index 0000000000000..aeb671792b473 --- /dev/null +++ b/src/platform/packages/shared/kbn-palettes/components/index.tsx @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import React from 'react'; +import { EuiText } from '@elastic/eui'; +import { css } from '@emotion/react'; + +/** + * Text wrapper to remove text-decoration from `EuiText` + */ +export const getAppendedTag = (label?: string) => + label && ( + + + {label} + + + ); diff --git a/src/platform/packages/shared/kbn-palettes/index.ts b/src/platform/packages/shared/kbn-palettes/index.ts index 361273837f9c9..cda165c570f46 100644 --- a/src/platform/packages/shared/kbn-palettes/index.ts +++ b/src/platform/packages/shared/kbn-palettes/index.ts @@ -9,6 +9,7 @@ export * from './palettes'; export * from './classes'; +export * from './components'; export { DEFAULT_FALLBACK_PALETTE, KbnPalette } from './constants'; export * from './hooks'; diff --git a/src/platform/packages/shared/kbn-palettes/palettes/categorical/elastic.ts b/src/platform/packages/shared/kbn-palettes/palettes/categorical/elastic.ts index 239b1c009d5de..0ed2d26d1b939 100644 --- a/src/platform/packages/shared/kbn-palettes/palettes/categorical/elastic.ts +++ b/src/platform/packages/shared/kbn-palettes/palettes/categorical/elastic.ts @@ -26,7 +26,10 @@ export const elasticPalette = new KbnColorFnPalette({ colorCount: 10, defaultNumberOfColors: 30, name: i18n.translate('palettes.elastic.name', { - defaultMessage: 'Elastic (default)', + defaultMessage: 'Elastic', + }), + tag: i18n.translate('palettes.elastic.tag', { + defaultMessage: 'Default', }), // Return exact colors requested given enough rotations colorFn: (n) => euiPaletteColorBlind({ rotations: Math.ceil(n / 10) }).slice(0, n), diff --git a/src/platform/packages/shared/kbn-palettes/palettes/index.ts b/src/platform/packages/shared/kbn-palettes/palettes/index.ts index 5f70cafaa6b2c..5650220f8658a 100644 --- a/src/platform/packages/shared/kbn-palettes/palettes/index.ts +++ b/src/platform/packages/shared/kbn-palettes/palettes/index.ts @@ -46,7 +46,7 @@ const lightKbnPalettes = new KbnPalettes( elasticPalette, kibana7Palette, kibana4Palette, - getNeutralPalette(true), + getNeutralPalette(false), complementaryPalette, coolPalette, grayPalette, diff --git a/src/platform/packages/shared/kbn-palettes/tsconfig.json b/src/platform/packages/shared/kbn-palettes/tsconfig.json index 38f95e7b77093..607dc8ec87164 100644 --- a/src/platform/packages/shared/kbn-palettes/tsconfig.json +++ b/src/platform/packages/shared/kbn-palettes/tsconfig.json @@ -5,7 +5,7 @@ "types": [ "jest", "node", - "react" + "@emotion/react/types/css-prop" ] }, "include": [ diff --git a/src/platform/plugins/private/vis_default_editor/public/components/controls/palette_picker.tsx b/src/platform/plugins/private/vis_default_editor/public/components/controls/palette_picker.tsx index 25a8d32536707..a194c1eced653 100644 --- a/src/platform/plugins/private/vis_default_editor/public/components/controls/palette_picker.tsx +++ b/src/platform/plugins/private/vis_default_editor/public/components/controls/palette_picker.tsx @@ -13,6 +13,7 @@ import { getActivePaletteName } from '@kbn/coloring'; import { EuiColorPalettePicker, EuiColorPalettePickerPaletteProps } from '@elastic/eui'; import { EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { getAppendedTag } from '@kbn/palettes'; const DEFAULT_PALETTE = 'default'; @@ -34,11 +35,12 @@ export function PalettePicker({ const palettesList: EuiColorPalettePickerPaletteProps[] = palettes .getAll() .filter(({ internal }) => !internal) - .map(({ id, title, getCategoricalColors }) => { + .map(({ id, title, tag, getCategoricalColors }) => { return { value: id, title, type: 'fixed', + append: getAppendedTag(tag), palette: getCategoricalColors(10, id === paletteName ? activePalette?.params : undefined), }; }); diff --git a/src/platform/plugins/private/vis_default_editor/tsconfig.json b/src/platform/plugins/private/vis_default_editor/tsconfig.json index df31f0b196ab6..04b134a346104 100644 --- a/src/platform/plugins/private/vis_default_editor/tsconfig.json +++ b/src/platform/plugins/private/vis_default_editor/tsconfig.json @@ -29,6 +29,7 @@ "@kbn/saved-search-plugin", "@kbn/code-editor", "@kbn/react-kibana-context-render", + "@kbn/palettes", ], "exclude": [ "target/**/*", diff --git a/src/platform/plugins/shared/charts/public/services/palettes/palettes.tsx b/src/platform/plugins/shared/charts/public/services/palettes/palettes.tsx index 4858bf0547d46..901e3a7fae282 100644 --- a/src/platform/plugins/shared/charts/public/services/palettes/palettes.tsx +++ b/src/platform/plugins/shared/charts/public/services/palettes/palettes.tsx @@ -215,6 +215,7 @@ export const buildPalettes = (theme: CoreTheme): Record !internal) - .map(({ id, title, getCategoricalColors }) => { + .map(({ id, title, tag, getCategoricalColors }) => { return { value: id, title, + append: getAppendedTag(tag), type: 'fixed' as const, palette: getCategoricalColors(10), }; diff --git a/src/platform/plugins/shared/vis_types/timeseries/tsconfig.json b/src/platform/plugins/shared/vis_types/timeseries/tsconfig.json index 4b621bfa1b89b..b7638892ff995 100644 --- a/src/platform/plugins/shared/vis_types/timeseries/tsconfig.json +++ b/src/platform/plugins/shared/vis_types/timeseries/tsconfig.json @@ -48,6 +48,7 @@ "@kbn/code-editor", "@kbn/shared-ux-markdown", "@kbn/react-kibana-context-render", + "@kbn/palettes", ], "exclude": [ "target/**/*", diff --git a/x-pack/platform/plugins/shared/lens/public/shared_components/palette_picker.tsx b/x-pack/platform/plugins/shared/lens/public/shared_components/palette_picker.tsx index 24c6b05e6b6e1..5fd45e37f8aaa 100644 --- a/x-pack/platform/plugins/shared/lens/public/shared_components/palette_picker.tsx +++ b/x-pack/platform/plugins/shared/lens/public/shared_components/palette_picker.tsx @@ -11,6 +11,7 @@ import { getActivePaletteName } from '@kbn/coloring'; import { EuiColorPalettePicker, EuiColorPalettePickerPaletteProps } from '@elastic/eui'; import { EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { getAppendedTag } from '@kbn/palettes'; interface PalettePickerProps { palettes: PaletteRegistry; @@ -23,10 +24,11 @@ export function PalettePicker({ palettes, activePalette, setPalette }: Palett const palettesToShow: EuiColorPalettePickerPaletteProps[] = palettes .getAll() .filter(({ internal }) => !internal) - .map(({ id, title, getCategoricalColors }) => { + .map(({ id, title, tag, getCategoricalColors }) => { return { value: id, title, + append: getAppendedTag(tag), type: 'fixed', palette: getCategoricalColors(10, id === paletteName ? activePalette?.params : undefined), }; diff --git a/x-pack/platform/plugins/shared/maps/public/classes/styles/color_palettes.ts b/x-pack/platform/plugins/shared/maps/public/classes/styles/color_palettes.ts index 232728cc72f00..c1e4e76f17567 100644 --- a/x-pack/platform/plugins/shared/maps/public/classes/styles/color_palettes.ts +++ b/x-pack/platform/plugins/shared/maps/public/classes/styles/color_palettes.ts @@ -49,6 +49,9 @@ function getColorBlindPalette(steps: number) { const COLOR_PALETTES: COLOR_PALETTE[] = [ { + // TODO remove all empty `title` props below after + // https://github.com/elastic/eui/pull/8289 is released + title: '', value: 'Blues', getPalette: (steps: number) => { return euiPaletteCool(steps); @@ -57,6 +60,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Greens', getPalette: (steps: number) => { return euiPaletteGreen(steps); @@ -65,6 +69,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Greys', getPalette: (steps: number) => { return euiPaletteGray(steps); @@ -73,6 +78,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Reds', getPalette: (steps: number) => { return euiPaletteRed(steps); @@ -81,6 +87,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Yellow to Red', getPalette: (steps: number) => { return euiPaletteWarm(steps); @@ -89,6 +96,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Green to Red', getPalette: (steps: number) => { return euiPaletteForStatus(steps); @@ -97,6 +105,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'Blue to Red', getPalette: (steps: number) => { return euiPaletteForTemperature(steps); @@ -105,6 +114,7 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: DEFAULT_HEATMAP_COLOR_RAMP_NAME, getPalette: (steps: number) => { return colorPaletteGenerator(HEATMAP_PALETTE, steps, true, true); @@ -113,18 +123,21 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ type: 'gradient', }, { + title: '', value: 'palette_0', getPalette: getColorBlindPalette, palette: euiPaletteColorBlind(), type: 'fixed', }, { + title: '', value: 'palette_20', getPalette: getColorBlindPalette, palette: euiPaletteColorBlind({ rotations: 2 }), type: 'fixed', }, { + title: '', value: 'palette_30', getPalette: getColorBlindPalette, palette: euiPaletteColorBlind({ rotations: 3 }), diff --git a/x-pack/platform/plugins/shared/maps/public/classes/styles/heatmap/components/__snapshots__/heatmap_style_editor.test.tsx.snap b/x-pack/platform/plugins/shared/maps/public/classes/styles/heatmap/components/__snapshots__/heatmap_style_editor.test.tsx.snap index 5414d6f9ac16b..85de0cc0f7e30 100644 --- a/x-pack/platform/plugins/shared/maps/public/classes/styles/heatmap/components/__snapshots__/heatmap_style_editor.test.tsx.snap +++ b/x-pack/platform/plugins/shared/maps/public/classes/styles/heatmap/components/__snapshots__/heatmap_style_editor.test.tsx.snap @@ -22,6 +22,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#769fc8", "#6092c0", ], + "title": "", "type": "gradient", "value": "Blues", }, @@ -37,6 +38,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#47a08f", "#209280", ], + "title": "", "type": "gradient", "value": "Greens", }, @@ -52,6 +54,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#494d58", "#343741", ], + "title": "", "type": "gradient", "value": "Greys", }, @@ -67,6 +70,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#d66c58", "#cc5642", ], + "title": "", "type": "gradient", "value": "Reds", }, @@ -82,6 +86,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#e58053", "#e7664c", ], + "title": "", "type": "gradient", "value": "Yellow to Red", }, @@ -97,6 +102,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#da5e47", "#cc5642", ], + "title": "", "type": "gradient", "value": "Green to Red", }, @@ -112,6 +118,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "#eb8f69", "#e7664c", ], + "title": "", "type": "gradient", "value": "Blue to Red", }, @@ -124,6 +131,7 @@ exports[`HeatmapStyleEditor is rendered 1`] = ` "rgb(256, 256, 0)", "rgb(256, 0, 0)", ], + "title": "", "type": "gradient", "value": "theclassic", }, diff --git a/x-pack/platform/plugins/shared/security/server/__snapshots__/prompt_page.test.tsx.snap b/x-pack/platform/plugins/shared/security/server/__snapshots__/prompt_page.test.tsx.snap index 447fe4b5c92a1..f59b9c5a4c7ca 100644 --- a/x-pack/platform/plugins/shared/security/server/__snapshots__/prompt_page.test.tsx.snap +++ b/x-pack/platform/plugins/shared/security/server/__snapshots__/prompt_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; -exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; diff --git a/x-pack/platform/plugins/shared/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap b/x-pack/platform/plugins/shared/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap index 8ca838fa1ce60..cac755dbefa00 100644 --- a/x-pack/platform/plugins/shared/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap +++ b/x-pack/platform/plugins/shared/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; -exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; diff --git a/x-pack/platform/plugins/shared/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/platform/plugins/shared/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index 18a3568c092c4..7d6b24e6ba2e7 100644 --- a/x-pack/platform/plugins/shared/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/platform/plugins/shared/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; -exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/utils/risk_color_palette.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/common/utils/risk_color_palette.test.tsx index 136153d2a760c..6bf67174ed70f 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/utils/risk_color_palette.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/common/utils/risk_color_palette.test.tsx @@ -14,9 +14,9 @@ jest.mock('@elastic/eui', () => ({ })); const EXPECTED_SEVERITY_COLOR_AMSTERDAM = { - low: '#54b399', - medium: '#f1d86f', - high: '#ff7e62', + low: '#54B399', + medium: '#F1D86F', + high: '#FF7E62', critical: '#bd271e', }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts index d7974ac8f4a51..e13a5ecf66c5e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts @@ -24,15 +24,15 @@ describe('getFillColor', () => { const expectedColorPalette = getRiskSeverityColors(euiTheme); it('returns the expected fill color', () => { - expect(getFillColor({ riskScore: 50, colorPalette })).toEqual('#f1d86f'); + expect(getFillColor({ riskScore: 50, colorPalette })).toEqual('#F1D86F'); }); it('returns the expected fill color when risk score is zero', () => { - expect(getFillColor({ riskScore: 0, colorPalette })).toEqual('#54b399'); + expect(getFillColor({ riskScore: 0, colorPalette })).toEqual('#54B399'); }); it('returns the expected fill color when risk score is less than zero', () => { - expect(getFillColor({ riskScore: -1, colorPalette })).toEqual('#54b399'); + expect(getFillColor({ riskScore: -1, colorPalette })).toEqual('#54B399'); }); it('returns the expected fill color when risk score is 100', () => { diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts index 24f40ee94067f..14ac924287d43 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts @@ -80,7 +80,7 @@ describe('layers', () => { const dataName = 'this does not exist'; expect( getLayersOneDimension({ colorPalette, maxRiskSubAggregations })[0].shape.fillColor(dataName) - ).toEqual('#54b399'); + ).toEqual('#54B399'); }); }); @@ -192,7 +192,7 @@ describe('layers', () => { { index: 0, value: 'nope' }, ], }) - ).toEqual('#54b399'); + ).toEqual('#54B399'); }); }); }); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts index 0702b3b98b738..107018011b91b 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts @@ -25,25 +25,25 @@ describe('getFlattenedLegendItems', () => { value: 'matches everything', }, { - color: '#54b399', + color: '#54B399', count: 12, field: 'host.name', value: 'Host-k8iyfzraq9', }, { - color: '#54b399', + color: '#54B399', count: 10, field: 'host.name', value: 'Host-ao1a4wu7vn', }, { - color: '#54b399', + color: '#54B399', count: 7, field: 'host.name', value: 'Host-3fbljiq8rj', }, { - color: '#54b399', + color: '#54B399', count: 5, field: 'host.name', value: 'Host-r4y6xi92ob', @@ -54,25 +54,25 @@ describe('getFlattenedLegendItems', () => { value: 'EQL process sequence', }, { - color: '#ff7e62', + color: '#FF7E62', count: 10, field: 'host.name', value: 'Host-k8iyfzraq9', }, { - color: '#ff7e62', + color: '#FF7E62', count: 7, field: 'host.name', value: 'Host-ao1a4wu7vn', }, { - color: '#ff7e62', + color: '#FF7E62', count: 5, field: 'host.name', value: 'Host-3fbljiq8rj', }, { - color: '#ff7e62', + color: '#FF7E62', count: 3, field: 'host.name', value: 'Host-r4y6xi92ob', @@ -83,25 +83,25 @@ describe('getFlattenedLegendItems', () => { value: 'Endpoint Security', }, { - color: '#f1d86f', + color: '#F1D86F', count: 11, field: 'host.name', value: 'Host-ao1a4wu7vn', }, { - color: '#f1d86f', + color: '#F1D86F', count: 6, field: 'host.name', value: 'Host-3fbljiq8rj', }, { - color: '#f1d86f', + color: '#F1D86F', count: 1, field: 'host.name', value: 'Host-k8iyfzraq9', }, { - color: '#f1d86f', + color: '#F1D86F', count: 1, field: 'host.name', value: 'Host-r4y6xi92ob', diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts index deeff81b97d2a..1504ff5f6e7da 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts @@ -60,7 +60,7 @@ describe('legend', () => { showColor: true, stackByField0: 'kibana.alert.rule.name', }).color - ).toEqual('#54b399'); + ).toEqual('#54B399'); }); it('returns the expected count', () => { @@ -170,7 +170,7 @@ describe('legend', () => { }) ) ).toEqual({ - color: '#54b399', + color: '#54B399', count: 12, field: 'host.name', value: 'Host-k8iyfzraq9', @@ -216,21 +216,21 @@ describe('legend', () => { }).map((x) => omit(['render', 'dataProviderId'], x)) ).toEqual([ { - color: '#54b399', + color: '#54B399', count: 34, field: 'kibana.alert.rule.name', value: 'matches everything', scopeId: TableId.alertsOnAlertsPage, }, { - color: '#ff7e62', + color: '#FF7E62', count: 28, field: 'kibana.alert.rule.name', value: 'EQL process sequence', scopeId: TableId.alertsOnAlertsPage, }, { - color: '#f1d86f', + color: '#F1D86F', count: 19, field: 'kibana.alert.rule.name', value: 'Endpoint Security', diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/severity_level_panel/helpers.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/severity_level_panel/helpers.test.tsx index f0ed436159ec0..bf2ac86f8f5d7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/severity_level_panel/helpers.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis/severity_level_panel/helpers.test.tsx @@ -31,9 +31,9 @@ describe('parse severity data', () => { describe.each([ { severity: 'critical', colorToken: '#bd271e', themeName: 'Amsterdam' }, - { severity: 'high', colorToken: '#ff7e62', themeName: 'Amsterdam' }, - { severity: 'medium', colorToken: '#f1d86f', themeName: 'Amsterdam' }, - { severity: 'low', colorToken: '#54b399', themeName: 'Amsterdam' }, + { severity: 'high', colorToken: '#FF7E62', themeName: 'Amsterdam' }, + { severity: 'medium', colorToken: '#F1D86F', themeName: 'Amsterdam' }, + { severity: 'low', colorToken: '#54B399', themeName: 'Amsterdam' }, { severity: 'critical', colorToken: '#E7664C', themeName: 'Borealis' }, { severity: 'high', colorToken: '#DA8B45', themeName: 'Borealis' }, { severity: 'medium', colorToken: '#D6BF57', themeName: 'Borealis' }, diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.test.tsx index 7fa3cbe7a2dd6..023715e2680a1 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.test.tsx @@ -151,9 +151,9 @@ describe('getFormattedAlertStats', () => { it('should return alert stats', () => { const alertStats = getFormattedAlertStats(mockAlertData, euiTheme); expect(alertStats).toEqual([ - { key: 'High', count: 2, color: '#ff7e62' }, - { key: 'Low', count: 2, color: '#54b399' }, - { key: 'Medium', count: 2, color: '#f1d86f' }, + { key: 'High', count: 2, color: '#FF7E62' }, + { key: 'Low', count: 2, color: '#54B399' }, + { key: 'Medium', count: 2, color: '#F1D86F' }, { key: 'Critical', count: 2, color: '#bd271e' }, ]); }); diff --git a/yarn.lock b/yarn.lock index 9be8a1faccd07..004b68adb0e8e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2332,25 +2332,25 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui-theme-borealis@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-0.0.8.tgz#b3a9e59449dfcc6e085ab43d447d95c1d9ee5e91" - integrity sha512-o/4Fvd3odZN8SSjok03vLJOif/vVb1oQW4zGCYhCrwyolccd6deAvcy84w5l8GVr61J6bTM9g/8vydqPudw6Ug== +"@elastic/eui-theme-borealis@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-0.0.9.tgz#6aea79b15091e84235555236726f1bb1fc0da2bf" + integrity sha512-56tzAX5Go4RuSD1fuKvHiLPumGll1NYK1dG4E9OPe7xfLXBGdLjhdXabkJfUlc5OVX2xK9RI3TOmUiimqm8SJg== -"@elastic/eui-theme-common@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-0.0.8.tgz#f5c88d2af39dfef412df73f35d16d584e1e64374" - integrity sha512-rzYFRPegUoGjp9eJj90LTsKF9SiKOgcOtAHDMl99yEbNXIV9jMfs54tRf7zMQq0/w+FZXJbOqhnUc4rdKUhVWw== +"@elastic/eui-theme-common@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-0.0.9.tgz#42d4f15b6d8dd9f8976eb3f2d46fd59af3f37a9c" + integrity sha512-nmeqi+gZruBQtDOirPIGgZh0QejrlmeZixKaaM/iQca5rQiTNHAE29sSpGFk20+//yfiDPQMFee7PQU/A4R4Ow== dependencies: "@types/lodash" "^4.14.202" lodash "^4.17.21" -"@elastic/eui@99.0.0-borealis.1": - version "99.0.0-borealis.1" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-99.0.0-borealis.1.tgz#1df3e18a50883f73855bb33c7a6fc044e68eecb1" - integrity sha512-6OuX+8jurohZRdq8I+KGYvmU0ajNrBhGCzRziDQNtofQv5fk2C60U5BQnPbX7Qp9gPkxApNlmAarYqMs/TfMSA== +"@elastic/eui@99.1.0-borealis.0": + version "99.1.0-borealis.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-99.1.0-borealis.0.tgz#b5b34c749ac56b8ecd290fb715f56ba2e5f255ab" + integrity sha512-akDYl5ScBNwBm1sIsPHQVPq5rJpkgjg5Qtb2F1T36eWFp9ux5EVAqoFylsLBIaUnXiwVDkDAVH604IOrR46COg== dependencies: - "@elastic/eui-theme-common" "0.0.8" + "@elastic/eui-theme-common" "0.0.9" "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202" "@types/numeral" "^2.0.5"