Skip to content

Commit

Permalink
Added new tokens for Link to fix Toggletip (#16510)
Browse files Browse the repository at this point in the history
* fix: added new tokens for toggletip

* test: updated snapshots
  • Loading branch information
guidari authored May 21, 2024
1 parent 111db86 commit f3f5720
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ Array [
"linkInverse",
"linkInverseActive",
"linkInverseHover",
"linkInverseVisited",
"linkPrimary",
"linkPrimaryHover",
"linkSecondary",
Expand Down
1 change: 1 addition & 0 deletions packages/styles/scss/__tests__/theme-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ describe('@carbon/styles/scss/theme', () => {
"link-primary",
"link-primary-hover",
"link-secondary",
"link-inverse-visited",
"link-visited",
"link-inverse",
"link-inverse-active",
Expand Down
4 changes: 2 additions & 2 deletions packages/styles/scss/components/toggletip/_toggletip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
);
@include custom-property.declaration(
'link-hover-text-color',
theme.$link-inverse
theme.$link-inverse-hover
);
@include custom-property.declaration(
'link-visited-text-color',
theme.$link-inverse
theme.$link-inverse-visited
);
@include custom-property.declaration(
'link-focus-text-color',
Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/g10.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
red50,
red60,
purple60,
purple40,

// Constants
black,
Expand Down Expand Up @@ -163,6 +164,7 @@ export const linkPrimaryHover = blue70;
export const linkSecondary = blue70;
export const linkInverse = blue40;
export const linkVisited = purple60;
export const linkInverseVisited = purple40;
export const linkInverseActive = gray10;
export const linkInverseHover = blue30;

Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/g100.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
red60,
purple40,
purple50,
purple60,

// Constants
white,
Expand Down Expand Up @@ -166,6 +167,7 @@ export const linkPrimaryHover = blue30;
export const linkSecondary = blue30;
export const linkInverse = blue60;
export const linkVisited = purple40;
export const linkInverseVisited = purple60;
export const linkInverseActive = gray100;
export const linkInverseHover = blue70;

Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/g90.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
red60,
purple40,
purple50,
purple60,

// Constants
white,
Expand Down Expand Up @@ -166,6 +167,7 @@ export const linkPrimaryHover = blue30;
export const linkSecondary = blue30;
export const linkInverse = blue60;
export const linkVisited = purple40;
export const linkInverseVisited = purple60;
export const linkInverseActive = gray100;
export const linkInverseHover = blue70;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Array [
"link-primary",
"link-primary-hover",
"link-secondary",
"link-inverse-visited",
"link-visited",
"link-inverse",
"link-inverse-active",
Expand Down Expand Up @@ -216,6 +217,7 @@ Array [
"link-primary",
"link-primary-hover",
"link-secondary",
"link-inverse-visited",
"link-visited",
"link-inverse",
"link-inverse-active",
Expand Down
4 changes: 4 additions & 0 deletions packages/themes/src/tokens/__tests__/metadata-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,10 @@ test('metadata', () => {
"name": "link-secondary",
"type": "color",
},
Object {
"name": "link-inverse-visited",
"type": "color",
},
Object {
"name": "link-visited",
"type": "color",
Expand Down
3 changes: 2 additions & 1 deletion packages/themes/src/tokens/v11TokenGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ export const link = TokenGroup.create({
'link-secondary',
{
state: 'visited',
name: 'link-visited',
name: 'link-inverse-visited',
},
'link-visited',
'link-inverse',
'link-inverse-active',
'link-inverse-hover',
Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/white.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
red50,
red60,
purple60,
purple40,

// Constants
black,
Expand Down Expand Up @@ -163,6 +164,7 @@ export const linkPrimaryHover = blue70;
export const linkSecondary = blue70;
export const linkInverse = blue40;
export const linkVisited = purple60;
export const linkInverseVisited = purple40;
export const linkInverseActive = gray10;
export const linkInverseHover = blue30;

Expand Down

0 comments on commit f3f5720

Please sign in to comment.