From 8f05a06717ba1ecde024476c746bf8baa63deb9d Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Thu, 19 Dec 2024 20:15:30 +0100 Subject: [PATCH 1/2] feat: add behindText vis color JS tokens --- .../src/variables/colors/_colors_vis.ts | 11 ++++++++++ .../src/global_styling/variables/colors.ts | 21 +++++++++++++++++++ .../global_styling/variables/_colors_vis.ts | 11 ++++++++++ 3 files changed, 43 insertions(+) diff --git a/packages/eui-theme-borealis/src/variables/colors/_colors_vis.ts b/packages/eui-theme-borealis/src/variables/colors/_colors_vis.ts index 21d8e4f15a3..c2d7d03df47 100644 --- a/packages/eui-theme-borealis/src/variables/colors/_colors_vis.ts +++ b/packages/eui-theme-borealis/src/variables/colors/_colors_vis.ts @@ -59,6 +59,17 @@ export const colorVis: _EuiThemeVisColors = { euiColorVis8: euiPaletteColorBlind.euiColorVis8.graphic, euiColorVis9: euiPaletteColorBlind.euiColorVis9.graphic, + euiColorVisBehindText0: euiPaletteColorBlind.euiColorVis0.graphic, + euiColorVisBehindText1: euiPaletteColorBlind.euiColorVis1.graphic, + euiColorVisBehindText2: euiPaletteColorBlind.euiColorVis2.graphic, + euiColorVisBehindText3: euiPaletteColorBlind.euiColorVis3.graphic, + euiColorVisBehindText4: euiPaletteColorBlind.euiColorVis4.graphic, + euiColorVisBehindText5: euiPaletteColorBlind.euiColorVis5.graphic, + euiColorVisBehindText6: euiPaletteColorBlind.euiColorVis6.graphic, + euiColorVisBehindText7: euiPaletteColorBlind.euiColorVis7.graphic, + euiColorVisBehindText8: euiPaletteColorBlind.euiColorVis8.graphic, + euiColorVisBehindText9: euiPaletteColorBlind.euiColorVis9.graphic, + euiColorVisAsTextLight0: SEMANTIC_COLORS.accentSecondary100, euiColorVisAsTextLight1: SEMANTIC_COLORS.primary100, euiColorVisAsTextLight2: SEMANTIC_COLORS.accent100, diff --git a/packages/eui-theme-common/src/global_styling/variables/colors.ts b/packages/eui-theme-common/src/global_styling/variables/colors.ts index 7470135820a..8eb4468be54 100644 --- a/packages/eui-theme-common/src/global_styling/variables/colors.ts +++ b/packages/eui-theme-common/src/global_styling/variables/colors.ts @@ -266,6 +266,27 @@ export type _EuiThemeVisColors = { euiColorVis8: string; euiColorVis9: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText0: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText1: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText2: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText3: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText4: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText5: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText6: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText7: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText8: string; + /* deprecated - temp token; used only during theme migration */ + euiColorVisBehindText9: string; + euiColorVisAsTextLight0: string; euiColorVisAsTextLight1: string; euiColorVisAsTextLight2: string; diff --git a/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts b/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts index f3a76170c93..190fce78a81 100644 --- a/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts +++ b/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts @@ -62,6 +62,17 @@ export const colorVis: _EuiThemeVisColors = { euiColorVis8: euiPaletteColorBlind.euiColorVis8.graphic, euiColorVis9: euiPaletteColorBlind.euiColorVis9.graphic, + euiColorVisBehindText0: '#6dccb1', + euiColorVisBehindText1: '#79aad9', + euiColorVisBehindText2: '#ee789d', + euiColorVisBehindText3: '#a987d1', + euiColorVisBehindText4: '#e4a6c7', + euiColorVisBehindText5: '#f1d86f', + euiColorVisBehindText6: '#d2c0a0', + euiColorVisBehindText7: '#f5a35c', + euiColorVisBehindText8: '#c47c6c', + euiColorVisBehindText9: '#ff7e62', + euiColorVisAsTextLight0: '#006BB4', euiColorVisAsTextLight1: '#017D73', euiColorVisAsTextLight2: '#F5A700', From e1109c1552ccb47648159e97e8037687b1e5ea83 Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Mon, 6 Jan 2025 10:03:30 +0100 Subject: [PATCH 2/2] refactor: move behindText definitions to euiPaletteColorBlind map -updates comments --- .../src/global_styling/variables/colors.ts | 20 +++++------ .../global_styling/variables/_colors_vis.ts | 34 +++++++++++++------ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/packages/eui-theme-common/src/global_styling/variables/colors.ts b/packages/eui-theme-common/src/global_styling/variables/colors.ts index 8eb4468be54..7ec08680a5a 100644 --- a/packages/eui-theme-common/src/global_styling/variables/colors.ts +++ b/packages/eui-theme-common/src/global_styling/variables/colors.ts @@ -266,25 +266,25 @@ export type _EuiThemeVisColors = { euiColorVis8: string; euiColorVis9: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText0: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText1: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText2: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText3: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText4: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText5: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText6: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText7: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText8: string; - /* deprecated - temp token; used only during theme migration */ + /** @deprecated - temp token; used only during theme migration */ euiColorVisBehindText9: string; euiColorVisAsTextLight0: string; diff --git a/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts b/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts index 190fce78a81..539bf8d7103 100644 --- a/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts +++ b/packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis.ts @@ -20,33 +20,43 @@ import { _EuiThemeVisColors } from '@elastic/eui-theme-common'; const euiPaletteColorBlind = { euiColorVis0: { graphic: '#54B399', + behindText: '#6DCCB1', }, euiColorVis1: { graphic: '#6092C0', + behindText: '#79AAD9', }, euiColorVis2: { graphic: '#D36086', + behindText: '#EE789D', }, euiColorVis3: { graphic: '#9170B8', + behindText: '#A987D1', }, euiColorVis4: { graphic: '#CA8EAE', + behindText: '#E4A6C7', }, euiColorVis5: { graphic: '#D6BF57', + behindText: '#F1D86F', }, euiColorVis6: { graphic: '#B9A888', + behindText: '#D2C0A0', }, euiColorVis7: { graphic: '#DA8B45', + behindText: '#F5A35C', }, euiColorVis8: { graphic: '#AA6556', + behindText: '#C47C6C', }, euiColorVis9: { graphic: '#E7664C', + behindText: '#FF7E62', }, }; @@ -62,16 +72,20 @@ export const colorVis: _EuiThemeVisColors = { euiColorVis8: euiPaletteColorBlind.euiColorVis8.graphic, euiColorVis9: euiPaletteColorBlind.euiColorVis9.graphic, - euiColorVisBehindText0: '#6dccb1', - euiColorVisBehindText1: '#79aad9', - euiColorVisBehindText2: '#ee789d', - euiColorVisBehindText3: '#a987d1', - euiColorVisBehindText4: '#e4a6c7', - euiColorVisBehindText5: '#f1d86f', - euiColorVisBehindText6: '#d2c0a0', - euiColorVisBehindText7: '#f5a35c', - euiColorVisBehindText8: '#c47c6c', - euiColorVisBehindText9: '#ff7e62', + /** + * behindText variables are temp tokens; used only during theme migration. + * TODO: remove once Amsterdam is fully migrated + */ + euiColorVisBehindText0: euiPaletteColorBlind.euiColorVis0.behindText, + euiColorVisBehindText1: euiPaletteColorBlind.euiColorVis1.behindText, + euiColorVisBehindText2: euiPaletteColorBlind.euiColorVis2.behindText, + euiColorVisBehindText3: euiPaletteColorBlind.euiColorVis3.behindText, + euiColorVisBehindText4: euiPaletteColorBlind.euiColorVis4.behindText, + euiColorVisBehindText5: euiPaletteColorBlind.euiColorVis5.behindText, + euiColorVisBehindText6: euiPaletteColorBlind.euiColorVis6.behindText, + euiColorVisBehindText7: euiPaletteColorBlind.euiColorVis7.behindText, + euiColorVisBehindText8: euiPaletteColorBlind.euiColorVis8.behindText, + euiColorVisBehindText9: euiPaletteColorBlind.euiColorVis9.behindText, euiColorVisAsTextLight0: '#006BB4', euiColorVisAsTextLight1: '#017D73',