Skip to content

Commit 146df70

Browse files
authored
fix: sync color tokens with design (#1929)
- add in -icon- tokens (matching -text- equivalents) - annotate files where they can be used - update snapshots
1 parent 189b154 commit 146df70

File tree

22 files changed

+381
-43
lines changed

22 files changed

+381
-43
lines changed

.storybook/data/tokens.json

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
"eds-theme-color-background-utility-default-low-emphasis": "#F9F3F1",
199199
"eds-theme-color-background-utility-default-low-emphasis-hover": "#EEE7E4",
200200
"eds-theme-color-background-utility-default-low-emphasis-active": "#DFD9D6",
201+
"eds-theme-color-background-utility-default-medium-emphasis": "#6C6967",
202+
"eds-theme-color-background-utility-default-medium-emphasis-hover": "#565352",
203+
"eds-theme-color-background-utility-default-medium-emphasis-active": "#3F3E3D",
201204
"eds-theme-color-background-utility-default-high-emphasis": "#0F2163",
202205
"eds-theme-color-background-utility-default-high-emphasis-hover": "#0A164C",
203206
"eds-theme-color-background-utility-default-high-emphasis-active": "#060E30",
@@ -272,9 +275,9 @@
272275
"eds-theme-color-border-utility-default-low-emphasis": "#CFC9C7",
273276
"eds-theme-color-border-utility-default-low-emphasis-hover": "#BEB8B6",
274277
"eds-theme-color-border-utility-default-low-emphasis-active": "#A09C9A",
275-
"eds-theme-color-border-utility-default-medium-emphasis": "#868281",
276-
"eds-theme-color-border-utility-default-medium-emphasis-hover": "#6C6967",
277-
"eds-theme-color-border-utility-default-medium-emphasis-active": "#565352",
278+
"eds-theme-color-border-utility-default-medium-emphasis": "#6C6967",
279+
"eds-theme-color-border-utility-default-medium-emphasis-hover": "#565352",
280+
"eds-theme-color-border-utility-default-medium-emphasis-active": "#3F3E3D",
278281
"eds-theme-color-border-utility-default-high-emphasis": "#0F2163",
279282
"eds-theme-color-border-utility-default-high-emphasis-hover": "#0A164C",
280283
"eds-theme-color-border-utility-default-high-emphasis-active": "#060E30",
@@ -471,10 +474,38 @@
471474
"eds-theme-color-icon-link-default-hover": "#5751D2",
472475
"eds-theme-color-icon-brand-primary": "#8984E8",
473476
"eds-theme-color-icon-brand-primary-hover": "#6B65E2",
477+
"eds-theme-color-icon-utility-default-primary": "#0F2163",
478+
"eds-theme-color-icon-utility-default-primary-hover": "#0A164C",
479+
"eds-theme-color-icon-utility-default-primary-active": "#060E30",
480+
"eds-theme-color-icon-utility-default-secondary": "#6C6967",
481+
"eds-theme-color-icon-utility-default-secondary-hover": "#565352",
482+
"eds-theme-color-icon-utility-default-secondary-active": "#3F3E3D",
483+
"eds-theme-color-icon-utility-interactive-primary": "#0F2163",
484+
"eds-theme-color-icon-utility-interactive-primary-hover": "#0A164C",
485+
"eds-theme-color-icon-utility-interactive-primary-active": "#060E30",
486+
"eds-theme-color-icon-utility-interactive-secondary": "#3165D2",
487+
"eds-theme-color-icon-utility-interactive-secondary-hover": "#254EAC",
488+
"eds-theme-color-icon-utility-interactive-secondary-active": "#1B3889",
489+
"eds-theme-color-icon-utility-interactive-visited": "#8A50A7",
490+
"eds-theme-color-icon-utility-critical": "#A51115",
491+
"eds-theme-color-icon-utility-critical-hover": "#7D0A16",
492+
"eds-theme-color-icon-utility-critical-active": "#660517",
493+
"eds-theme-color-icon-utility-favorable": "#367759",
494+
"eds-theme-color-icon-utility-favorable-hover": "#225E43",
495+
"eds-theme-color-icon-utility-favorable-active": "#13462F",
496+
"eds-theme-color-icon-utility-warning": "#876701",
497+
"eds-theme-color-icon-utility-warning-hover": "#695001",
498+
"eds-theme-color-icon-utility-warning-active": "#4D3A01",
499+
"eds-theme-color-icon-utility-informational": "#3165D2",
500+
"eds-theme-color-icon-utility-informational-hover": "#254EAC",
501+
"eds-theme-color-icon-utility-informational-active": "#1B3889",
502+
"eds-theme-color-icon-utility-disabled-primary": "#A09C9A",
503+
"eds-theme-color-icon-utility-disabled-secondary": "#CFC9C7",
504+
"eds-theme-color-icon-utility-inverse": "#FFFFFF",
505+
"eds-theme-color-icon-utility-inverse-disabled": "255 255 255",
506+
"eds-theme-color-icon-utility-placeholder": "#6C6967",
474507
"eds-theme-color-icon-utility-success": "#00A56A",
475508
"eds-theme-color-icon-utility-success-hover": "#008656",
476-
"eds-theme-color-icon-utility-warning": "#E06B00",
477-
"eds-theme-color-icon-utility-warning-hover": "#C64600",
478509
"eds-theme-color-icon-utility-error": "#F1497B",
479510
"eds-theme-color-icon-utility-error-hover": "#D41E52",
480511
"eds-theme-color-icon-grade-complete": "#00A56A",

src/components/Accordion/Accordion-v2.module.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/*------------------------------------*\
44
# ACCORDION
55
\*------------------------------------*/
6-
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
9+
710
/**
811
* Accordion Panel that expands and collapses.
912
* Reveals itself below the associated Accordion Button.
@@ -100,7 +103,7 @@
100103
}
101104

102105
.accordion-button__leading-icon {
103-
color: var(--eds-theme-color-text-utility-default-primary);
106+
color: var(--eds-theme-color-icon-utility-default-primary);
104107
}
105108

106109
.accordion-button__title {

src/components/BannerNotification/BannerNotification.module.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/*------------------------------------*\
44
# BANNER NOTIFICATION
55
\*------------------------------------*/
6-
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
9+
710
/**
811
* Message of information, success, caution, or warning to the user.
912
*/

src/components/Button/Button-v2.module.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/*------------------------------------*\
44
# BUTTON
55
\*------------------------------------*/
6-
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
9+
710
.button {
811
position: relative;
912
border-radius: calc(var(--eds-border-radius-full) * 1px);

src/components/Card/Card-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/*------------------------------------*\
22
    # CARD
33
\*------------------------------------*/
4+
/**
5+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
6+
*/
47

58
/**
69
* A card is a block that typically contains a title, image, text, and/or calls to action.

src/components/FieldNote/FieldNote-v2.module.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/*------------------------------------*\
44
# FIELD NOTE
55
\*------------------------------------*/
6-
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
9+
710
/**
811
* Fieldnote
912
*/
@@ -44,6 +47,6 @@
4447
color: var(--eds-theme-color-text-utility-warning);
4548

4649
& > .field-note__icon {
47-
color: var(--eds-theme-color-text-utility-warning);
50+
color: var(--eds-theme-color-icon-utility-warning);
4851
}
4952
}

src/components/Icon/__snapshots__/Icon.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ exports[`<Icon /> IconGrid story renders snapshot 1`] = `
25002500
>
25012501
<path
25022502
d="M1.72497 18C1.54164 18 1.37497 17.9542 1.22497 17.8625C1.07497 17.7708 0.958306 17.65 0.874973 17.5C0.791639 17.35 0.745806 17.1875 0.737473 17.0125C0.729139 16.8375 0.774973 16.6667 0.874973 16.5L10.125 0.5C10.225 0.333333 10.3541 0.208333 10.5125 0.125C10.6708 0.0416667 10.8333 0 11 0C11.1666 0 11.3291 0.0416667 11.4875 0.125C11.6458 0.208333 11.775 0.333333 11.875 0.5L21.125 16.5C21.225 16.6667 21.2708 16.8375 21.2625 17.0125C21.2541 17.1875 21.2083 17.35 21.125 17.5C21.0416 17.65 20.925 17.7708 20.775 17.8625C20.625 17.9542 20.4583 18 20.275 18H1.72497Z"
2503-
fill="var(--eds-theme-color-icon-utility-warning-hover)"
2503+
fill="#C64600"
25042504
/>
25052505
<path
25062506
d="M11 15C11.2833 15 11.5208 14.9042 11.7125 14.7125C11.9041 14.5208 12 14.2833 12 14C12 13.7167 11.9041 13.4792 11.7125 13.2875C11.5208 13.0958 11.2833 13 11 13C10.7166 13 10.4791 13.0958 10.2875 13.2875C10.0958 13.4792 9.99997 13.7167 9.99997 14C9.99997 14.2833 10.0958 14.5208 10.2875 14.7125C10.4791 14.9042 10.7166 15 11 15Z"

src/components/InlineNotification/InlineNotification-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# INLINE NOTIFICATION
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
/**
811
* A messaging element that is used inline.

src/components/InputField/InputField-v2.module.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/*------------------------------------*\
22
# INPUT FIELD
33
\*------------------------------------*/
4-
4+
/**
5+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
6+
*/
7+
58
/**
69
* Wraps the Label and the optional/required hint.
710
* TODO: match/share the overline styles between Select and InputField
@@ -43,7 +46,7 @@
4346
align-items: center;
4447
justify-content: center;
4548

46-
color: var(--eds-theme-color-text-utility-default-secondary);
49+
color: var(--eds-theme-color-icon-utility-default-secondary);
4750
}
4851

4952
/**

src/components/Link/Link-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# LINK
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
.link {
811
color: var(--eds-theme-color-text-utility-default-primary);

src/components/Modal/Modal-v2.module.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# MODAL
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
/**
811
* The modal wrapper and overlay which takes up the entire screen.
@@ -144,7 +147,7 @@
144147

145148
z-index: 1;
146149

147-
color: var(--eds-theme-color-text-utility-default-secondary);
150+
color: var(--eds-theme-color-icon-utility-default-secondary);
148151
}
149152

150153
/**

src/components/PopoverListItem/PopoverListItem-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/*------------------------------------*\
22
# POPOVER LIST ITEM
33
\*------------------------------------*/
4+
/**
5+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
6+
*/
47

58
/**
69
* PopoverListItem

src/components/Select/Select-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# SELECT
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
/**
811
* Select field used to select one option from a list of options.

src/components/TabGroup/TabGroup.module.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/*------------------------------------*\
44
    #TABGROUP
55
\*------------------------------------*/
6-
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
9+
710
/**
811
* List of of links where each link toggles open associated information
912
*/

src/components/TextareaField/TextareaField-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# TEXTAREA FIELD
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
/**
811
* Default input styles

src/components/Toast/Toast-v2.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/*------------------------------------*\
44
# TOAST
55
\*------------------------------------*/
6+
/**
7+
* TODO: Icon inherits color from the surrounding text, but should use the matching -icon- tokens from below
8+
*/
69

710
.toast {
811
width: 100%;

src/design-tokens/mixins.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180

181181
@define-mixin messagingWarning {
182182
--messaging-border-color: var(--eds-theme-color-border-utility-warning-subtle);
183-
--messaging-icon-color: var(--eds-theme-color-icon-utility-warning);
183+
/* TODO-AH: remove hard-coded value to bridge to the new styles eds.color.other.orange.500 */
184+
--messaging-icon-color: #E06B00;
184185

185186
background: var(--eds-theme-color-background-utility-warning);
186187
color: var(--eds-theme-color-text-utility-warning);

0 commit comments

Comments
 (0)