From 86e3f6c642a1e7be5079e828f20d5352be1d42de Mon Sep 17 00:00:00 2001 From: Jordan Jones Date: Tue, 13 Dec 2022 12:22:24 -0800 Subject: [PATCH] fix(tokens): re-import deprecated dark tokens #91 --- src/color/alert.json | 32 ++++++++++++++++ src/color/border.json | 48 +++++++++++++++++++++++ src/color/icon.json | 32 ++++++++++++++++ src/color/text.json | 88 ++++++++++++++++++++++++++++++++++++++----- src/color/tier.json | 16 ++++++++ src/color/ui.json | 39 +++++++++++++++++++ 6 files changed, 245 insertions(+), 10 deletions(-) diff --git a/src/color/alert.json b/src/color/alert.json index 8c9bc15..bf1a5f3 100644 --- a/src/color/alert.json +++ b/src/color/alert.json @@ -9,6 +9,14 @@ "usage": "Notification color on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300.value}", + "public": true, + "onDark": true, + "usage": "Notification color on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, "warning": { @@ -19,6 +27,14 @@ "usage": "Warning color on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.state.error.100.value}", + "public": true, + "onDark": true, + "usage": "Error color on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, "error": { @@ -39,6 +55,14 @@ "usage": "Success color on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.state.success.100.value}", + "public": true, + "onDark": true, + "usage": "Success color on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, "advisory": { @@ -49,6 +73,14 @@ "usage": "Travel advisory or system maintenance color on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.goldcoast.100.value}", + "public": true, + "onDark": true, + "usage": "Travel advisory or system maintenance color on dark backgrounds", + "wcag": "AAA", + "deprecated": true } } } diff --git a/src/color/border.json b/src/color/border.json index 92b2ea8..4e36e11 100644 --- a/src/color/border.json +++ b/src/color/border.json @@ -9,6 +9,14 @@ "usage": "Primary border color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.neutral.400.value}", + "public": true, + "onDark": true, + "usage": "Primary border color on dark background", + "wcag": "n/a", + "deprecated": true } }, "active": { @@ -19,6 +27,14 @@ "usage": "Active border color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300.value}", + "public": true, + "onDark": true, + "usage": "Active border color on dark backgrounds", + "wcag": "n/a", + "deprecated": true } }, "error": { @@ -29,6 +45,14 @@ "usage": "Error states border color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.state.error.100.value}", + "public": true, + "onDark": true, + "usage": "Error states border color on dark background", + "wcag": "n/a", + "deprecated": true } }, "disabled": { @@ -39,6 +63,14 @@ "usage": "Disabled border color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.base.gray.200.value}", + "public": true, + "onDark": true, + "usage": "Disabled border color on dark background", + "wcag": "n/a", + "deprecated": true } }, "Focus": { @@ -49,6 +81,14 @@ "usage": "Focus border color for light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.base.white.value}", + "public": true, + "onDark": true, + "usage": "Focus border color for dark backgrounds", + "wcag": "n/a", + "deprecated": true } }, "divider": { @@ -59,6 +99,14 @@ "usage": "Strict use as divider between elements on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.base.white.value}", + "public": true, + "onDark": true, + "usage": "Strict use as divider between elements on dark backgrounds", + "wcag": "n/a", + "deprecated": true } } } diff --git a/src/color/icon.json b/src/color/icon.json index 426c4c1..84cb56b 100644 --- a/src/color/icon.json +++ b/src/color/icon.json @@ -9,6 +9,14 @@ "usage": "Primary color for icons on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.base.neutral.400.value}", + "public": true, + "onDark": true, + "usage": "Primary color for icons on dark backgrounds", + "wcag": "AAA", + "deprecated": false } }, "emphasis": { @@ -19,6 +27,14 @@ "usage": "Emphasis or darkest icon color on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.base.white.value}", + "public": true, + "onDark": true, + "usage": "Emphasis or lightest icon color on dark backgrounds", + "wcag": "AAA", + "deprecated": false } }, "accent": { @@ -29,6 +45,14 @@ "usage": "Accent color for icon color on light backgrounds", "wcag": "AA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300.value}", + "public": true, + "onDark": true, + "usage": "Accent color for icon color on dark backgrounds", + "wcag": "AA", + "deprecated": false } }, "disabled": { @@ -39,6 +63,14 @@ "usage": "Disabled icon color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.base.white-opacity-40.value}", + "public": true, + "onDark": true, + "usage": "Disabled icon color on dark backgrounds", + "wcag": "n/a", + "deprecated": false } } } diff --git a/src/color/text.json b/src/color/text.json index 426c4c1..92d3c45 100644 --- a/src/color/text.json +++ b/src/color/text.json @@ -1,44 +1,112 @@ { "color": { - "icon": { + "text": { "primary": { "onLight": { - "value": "{color.base.neutral.500.value}", + "value": "{color.base.gray.500.value}", "public": true, "onLight": true, - "usage": "Primary color for icons on light backgrounds", + "usage": "Primary color for body and header text on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.base.white.value}", + "public": true, + "onDark": true, + "usage": "Primary color for body and header text on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, - "emphasis": { + "secondary": { "onLight": { - "value": "{color.base.gray.500.value}", + "value": "{color.base.neutral.500.value}", "public": true, "onLight": true, - "usage": "Emphasis or darkest icon color on light backgrounds", + "usage": "Secondary color for body text on light backgrounds", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.base.neutral.400.value}", + "public": true, + "onDark": true, + "usage": "Secondary color for body text on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, - "accent": { + "link": { "onLight": { "value": "{color.brand.atlas.400.value}", "public": true, "onLight": true, - "usage": "Accent color for icon color on light backgrounds", + "usage": "Link text color on light backgrounds", + "wcag": "AA", + "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300.value}", + "public": true, + "onDark": true, + "usage": "Link text color on light backgrounds", + "wcag": "AA", + "deprecated": true + } + }, + "error": { + "onLight": { + "value": "{color.state.error.500.value}", + "public": true, + "onLight": true, + "usage": "Error text color on light backgrounds", "wcag": "AA", "deprecated": false + }, + "onDark": { + "value": "{color.state.error.100.value}", + "public": true, + "onDark": true, + "usage": "Error text color on dark backgrounds", + "wcag": "AA", + "deprecated": true } }, "disabled": { "onLight": { - "value": "{color.base.black-opacity-15.value}", + "value": "{color.base.gray.200.value}", + "public": true, + "onLight": true, + "usage": "Disabled text color on light backgrounds", + "wcag": "n/a", + "deprecated": false + }, + "onDark": { + "value": "{color.base.gray.200.value}", + "public": true, + "onDark": true, + "usage": "Disabled text color on dark backgrounds", + "wcag": "n/a", + "deprecated": true + } + }, + "emphasis": { + "onLight": { + "value": "{color.brand.midnight.400.value}", "public": true, "onLight": true, - "usage": "Disabled icon color on light backgrounds", + "usage": "Emphasized text color on light backgrounds", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.midnight.100.value}", + "public": true, + "onDark": true, + "usage": "Emphasized text color on dark backgrounds", + "wcag": "n/a", + "deprecated": true } } } diff --git a/src/color/tier.json b/src/color/tier.json index c8f609e..62512ed 100644 --- a/src/color/tier.json +++ b/src/color/tier.json @@ -10,6 +10,14 @@ "usage": "MVP tier color for Alaska Airlines", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.goldgray.100.value}", + "public": true, + "onDark": true, + "usage": "MVP tier color for Alaska Airlines", + "wcag": "n/a", + "deprecated": true } }, "mvpgold": { @@ -20,6 +28,14 @@ "usage": "MVP Gold tier color for Alaska Airlines", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.gold.100.value}", + "public": true, + "onDark": true, + "usage": "MVP Gold tier color for Alaska Airlines", + "wcag": "n/a", + "deprecated": true } } }, diff --git a/src/color/ui.json b/src/color/ui.json index 86caf40..dd43817 100644 --- a/src/color/ui.json +++ b/src/color/ui.json @@ -9,6 +9,14 @@ "usage": "Default interaction color affordance", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300.value}", + "public": true, + "onDark": true, + "usage": "OnDark interaction color affordance", + "wcag": "AAA", + "deprecated": true } }, "hover": { @@ -19,6 +27,14 @@ "usage": "Default hover color affordance", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.200.value}", + "public": true, + "onDark": true, + "usage": "Hover interaction color on dark backgrounds", + "wcag": "AAA", + "deprecated": true } }, "active": { @@ -29,6 +45,14 @@ "usage": "Active state color affordance", "wcag": "AAA", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.200.value}", + "public": true, + "onDark": true, + "usage": "OnDark active state color affordance", + "wcag": "AAA", + "deprecated": true } }, "disabled": { @@ -39,10 +63,25 @@ "usage": "Disabled state color affordance", "wcag": "n/a", "deprecated": false + }, + "onDark": { + "value": "{color.brand.breeze.300-opacity-30.value}", + "public": true, + "onDark": true, + "usage": "OnDark disabled state color affordance", + "wcag": "n/a", + "deprecated": true } }, "bkg": { "hover": { + "onDark": { + "value": "5de3f71a", + "public": true, + "onDark": true, + "usage": "Default hover affordance for background colors onDark", + "deprecated": true + }, "onLight": { "value": "0000000f", "public": true,