Skip to content

Commit

Permalink
Alias tokens updates, new component tokens (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
davyd-akamai authored May 1, 2024
1 parent 5d8eaad commit 573667b
Show file tree
Hide file tree
Showing 9 changed files with 648 additions and 27 deletions.
1 change: 1 addition & 0 deletions tokens/$metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"components/button/overflowMenuButton",
"components/button/splitMenuButton",
"components/button/segmentedButton",
"components/button/segmentedStatusButton",
"components/calendar/calendar",
"components/card/card",
"components/checkbox/checkbox",
Expand Down
368 changes: 352 additions & 16 deletions tokens/$themes.json

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions tokens/alias/dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@
"value": "{global.color.neutrals.60}",
"type": "color"
}
},
"secondary": {
"default": {
"value": "{global.color.neutrals.50}",
"type": "color"
},
"disabled": {
"value": "{global.color.neutrals.60}",
"type": "color"
}
}
}
},
Expand Down Expand Up @@ -255,6 +265,26 @@
"value": "{global.color.neutrals.80}",
"type": "color"
}
},
"positive": {
"default": {
"value": "{global.color.green.60}",
"type": "color"
},
"disabled": {
"value": "{global.color.neutrals.80}",
"type": "color"
}
},
"negative": {
"default": {
"value": "{global.color.red.60}",
"type": "color"
},
"disabled": {
"value": "{global.color.neutrals.80}",
"type": "color"
}
}
},
"elevation": {
Expand Down
58 changes: 53 additions & 5 deletions tokens/alias/light.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@
"value": "{global.color.neutrals.50}",
"type": "color"
}
},
"secondary": {
"default": {
"value": "{global.color.neutrals.70}",
"type": "color"
},
"disabled": {
"value": "{global.color.neutrals.50}",
"type": "color"
}
}
}
},
Expand Down Expand Up @@ -234,6 +244,26 @@
"value": "{global.color.brand.40}",
"type": "color"
}
},
"positive": {
"default": {
"value": "{global.color.green.80}",
"type": "color"
},
"disabled": {
"value": "{global.color.green.40}",
"type": "color"
}
},
"negative": {
"default": {
"value": "{global.color.red.80}",
"type": "color"
},
"disabled": {
"value": "{global.color.red.40}",
"type": "color"
}
}
},
"interaction": {
Expand Down Expand Up @@ -414,7 +444,7 @@
"regular": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular}",
"fontWeight": "{global.font.font-weight.regular.normal}",
"fontSize": "{global.font.font-size.xs}",
"lineHeight": "{global.font.line-height.xs}"
},
Expand Down Expand Up @@ -454,13 +484,22 @@
"list": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular}",
"fontWeight": "{global.font.font-weight.regular.normal}",
"fontSize": "{global.font.font-size.xs}",
"lineHeight": "{global.font.line-height.xs}",
"paragraphSpacing": "8"
},
"type": "typography",
"description": "For list items"
},
"italic": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular.italic}",
"fontSize": "{global.font.font-size.xs}",
"lineHeight": "{global.font.line-height.xs}"
},
"type": "typography"
}
},
"label": {
Expand Down Expand Up @@ -532,7 +571,7 @@
"s": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular}",
"fontWeight": "{global.font.font-weight.regular.normal}",
"fontSize": "{global.font.font-size.xs}",
"lineHeight": "{global.font.line-height.xxxs}"
},
Expand All @@ -542,19 +581,28 @@
"xs": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular}",
"fontWeight": "{global.font.font-weight.regular.normal}",
"fontSize": "{global.font.font-size.xxxs}",
"lineHeight": "{global.font.line-height.xxxs}"
},
"type": "typography",
"description": "Optional text, small dropdown item"
},
"placeholder": {
"value": {
"fontFamily": "{global.font.font-family.brand}",
"fontWeight": "{global.font.font-weight.regular.italic}",
"fontSize": "{global.font.font-size.xs}",
"lineHeight": "{global.font.line-height.xxxs}"
},
"type": "typography"
}
}
},
"code": {
"value": {
"fontFamily": "{global.font.font-family.code}",
"fontWeight": "{global.font.font-weight.regular}",
"fontWeight": "{global.font.font-weight.regular.normal}",
"fontSize": "{global.font.font-size.xxs}",
"lineHeight": "{global.font.line-height.xs}"
},
Expand Down
18 changes: 18 additions & 0 deletions tokens/components/button/segmentedButton.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@
}
},
"disabled": {
"background": {
"value": "{alias.action.base}",
"type": "color"
},
"border": {
"value": "{alias.action.secondary.disabled}",
"type": "color"
},
"text": {
"value": "{alias.content.text.link.disabled}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.primary.disabled}",
"type": "color"
}
},
"disabledChecked": {
"background": {
"value": "{alias.action.primary.disabled}",
"type": "color"
Expand Down
144 changes: 144 additions & 0 deletions tokens/components/button/segmentedStatusButton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"component": {
"segmentedStatusButton": {
"default": {
"background": {
"value": "{alias.action.base}",
"type": "color"
},
"border": {
"value": "{alias.action.neutral}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.default}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.default}",
"type": "color"
}
},
"hover": {
"background": {
"value": "{alias.action.secondary.hover}",
"type": "color"
},
"border": {
"value": "{alias.action.neutral}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.default}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.default}",
"type": "color"
}
},
"disabled": {
"background": {
"value": "{alias.action.base}",
"type": "color"
},
"border": {
"value": "{alias.action.secondary.disabled}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.disabled}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.disabled}",
"type": "color"
}
},
"disabledPositive": {
"background": {
"value": "{alias.action.positive.disabled}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.disabled}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.disabled}",
"type": "color"
}
},
"activePositive": {
"background": {
"value": "{alias.action.positive.default}",
"type": "color"
},
"text": {
"value": "{alias.content.text.base}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.base}",
"type": "color"
}
},
"disabledNegative": {
"background": {
"value": "{alias.action.negative.disabled}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.disabled}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.disabled}",
"type": "color"
}
},
"activeNegative": {
"background": {
"value": "{alias.action.negative.default}",
"type": "color"
},
"text": {
"value": "{alias.content.text.base}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.base}",
"type": "color"
}
},
"disabledNeutral": {
"background": {
"value": "{alias.action.secondary.disabled}",
"type": "color"
},
"text": {
"value": "{alias.content.text.secondary.disabled}",
"type": "color"
},
"icon": {
"value": "{alias.content.icon.secondary.disabled}",
"type": "color"
}
},
"activeNeutral": {
"background": {
"value": "{alias.action.neutral}",
"type": "color"
},
"text": {
"value": "{global.color.neutrals.white}",
"type": "color"
},
"icon": {
"value": "{global.color.neutrals.white}",
"type": "color"
}
}
}
}
}
14 changes: 12 additions & 2 deletions tokens/components/dropdown/dropdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
"component": {
"dropdown": {
"icon": {
"value": "{alias.content.icon.primary.default}",
"type": "color"
"default": {
"value": "{alias.content.icon.primary.default}",
"type": "color"
},
"disabled": {
"value": "{alias.content.icon.primary.disabled}",
"type": "color"
}
},
"text": {
"default": {
Expand All @@ -17,6 +23,10 @@
"description": {
"value": "{alias.content.text.secondary.default}",
"type": "color"
},
"disabled": {
"value": "{alias.content.text.primary.disabled}",
"type": "color"
}
},
"background": {
Expand Down
Loading

0 comments on commit 573667b

Please sign in to comment.