Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Change all text tokens into ‘typography’, ‘body text’ and ‘headings’ #1845

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions proprietary/tokens/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ defaultMode.buildAllPlatforms()

modes.map((mode) => {
const styleDictionary = new StyleDictionary({
log: {
verbosity: 'verbose',
},
platforms: generateSharedConfig(mode),
source: [`./src/**/*.${mode}.tokens.json`],
})
Expand Down
29 changes: 0 additions & 29 deletions proprietary/tokens/src/brand/ams/text.compact.tokens.json

This file was deleted.

41 changes: 0 additions & 41 deletions proprietary/tokens/src/brand/ams/text.tokens.json

This file was deleted.

15 changes: 15 additions & 0 deletions proprietary/tokens/src/brand/ams/typography.compact.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ams": {
"typography": {
"font-size": {
"sm": { "value": "clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem)" },
"md": { "value": "1rem" },
"lg": { "value": "clamp(1.1rem, calc(1.0938rem + 0.0313vw), 1.125rem)" },
"xl": { "value": "clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem)" },
"2xl": { "value": "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)" },
"3xl": { "value": "clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem)" },
"4xl": { "value": "clamp(1.6105rem, calc(1.5626rem + 0.2394vw), 1.802rem)" }
}
}
}
}
37 changes: 37 additions & 0 deletions proprietary/tokens/src/brand/ams/typography.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"ams": {
"typography": {
"font-family": {
"body-text": { "value": "'Amsterdam Sans', Arial, sans-serif" },
"headings": { "value": "'Amsterdam Sans', Arial, sans-serif" },
"monospace": { "value": "monospace" }
},
"font-size": {
"sm": { "value": "clamp(0.9643rem, calc(0.9054rem + 0.2946vw), 1.2rem)" },
"md": { "value": "clamp(1.125rem, calc(1.0313rem + 0.4688vw), 1.5rem)" },
"lg": { "value": "clamp(1.3125rem, calc(1.1719rem + 0.7031vw), 1.875rem)" },
"xl": { "value": "clamp(1.5313rem, calc(1.3281rem + 1.0156vw), 2.3438rem)" },
"2xl": { "value": "clamp(1.7865rem, calc(1.5007rem + 1.429vw), 2.9297rem)" },
"3xl": { "value": "clamp(2.0842rem, calc(1.6897rem + 1.9724vw), 3.6621rem)" },
"4xl": { "value": "clamp(2.4316rem, calc(1.8951rem + 2.6826vw), 4.5776rem)" }
},
"font-weight": {
"light": { "value": 300 },
"normal": { "value": 400 },
"bold": { "value": 700 },
"x-bold": { "value": 800 }
},
"line-height": {
"5xs": { "value": "113.86%" },
"4xs": { "value": "117.54%" },
"3xs": { "value": "121.33%" },
"2xs": { "value": "125.24%" },
"xs": { "value": "129.28%" },
"sm": { "value": "133.45%" },
"md": { "value": "137.76%" },
"2xl": { "value": "151.52%" },
"5xl": { "value": "166.67%" }
}
}
}
}
25 changes: 25 additions & 0 deletions proprietary/tokens/src/common/ams/body-text.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"ams": {
"body-text": {
"font-family": { "value": "{ams.typography.font-family.body-text}" },
"font-size": { "value": "{ams.typography.font-size.md}" },
"font-weight": { "value": "{ams.typography.font-weight.normal}" },
"line-height": { "value": "{ams.typography.line-height.5xl}" },
"sm": {
"font-size": { "value": "{ams.typography.font-size.sm}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"lg": {
"font-size": { "value": "{ams.typography.font-size.lg}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"xl": {
"font-size": { "value": "{ams.typography.font-size.xl}" },
"line-height": { "value": "{ams.typography.line-height.2xl}" }
},
"bold": {
"font-weight": { "value": "{ams.typography.font-weight.bold}" }
}
}
}
}
36 changes: 36 additions & 0 deletions proprietary/tokens/src/common/ams/headings.tokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"ams": {
"headings": {
"font-family": { "value": "{ams.typography.font-family.headings}" },
"font-weight": { "value": "{ams.typography.font-weight.x-bold}" },
"level-0": {
"font-size": { "value": "{ams.typography.font-size.4xl}" },
"line-height": { "value": "{ams.typography.line-height.5xs}" }
},
"level-1": {
"font-size": { "value": "{ams.typography.font-size.3xl}" },
"line-height": { "value": "{ams.typography.line-height.4xs}" }
},
"level-2": {
"font-size": { "value": "{ams.typography.font-size.2xl}" },
"line-height": { "value": "{ams.typography.line-height.3xs}" }
},
"level-3": {
"font-size": { "value": "{ams.typography.font-size.xl}" },
"line-height": { "value": "{ams.typography.line-height.2xs}" }
},
"level-4": {
"font-size": { "value": "{ams.typography.font-size.lg}" },
"line-height": { "value": "{ams.typography.line-height.xs}" }
},
"level-5": {
"font-size": { "value": "{ams.typography.font-size.md}" },
"line-height": { "value": "{ams.typography.line-height.sm}" }
},
"level-6": {
"font-size": { "value": "{ams.typography.font-size.sm}" },
"line-height": { "value": "{ams.typography.line-height.md}" }
}
}
}
}
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/accordion.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"gap": { "value": "{ams.space.md}" },
"button": {
"color": { "value": "{ams.color.interactive.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"font-family": { "value": "{ams.headings.font-family}" },
"font-size": { "value": "{ams.headings.level-5.font-size}" },
"font-weight": { "value": "{ams.headings.font-weight}" },
"gap": { "value": "{ams.space.sm}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.headings.level-5.line-height}" },
"padding-block": { "value": "{ams.space.sm}" },
"padding-inline": { "value": "0" },
"focus": {
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/avatar.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"aspect-ratio": { "value": "{ams.aspect-ratio.square}" },
"background-color": { "value": "{ams.color.highlight.purple}" },
"color": { "value": "{ams.color.text.inverse}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"padding-block": { "value": "{ams.space.xs}" },
"padding-inline": { "value": "{ams.space.xs}" },
"dark-green": {
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/badge.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"badge": {
"background-color": { "value": "{ams.color.highlight.green}" },
"color": { "value": "{ams.color.text.inverse}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.bold.font-weight}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"padding-inline": { "value": "{ams.space.xs}" },
"green": {
"background-color": { "value": "{ams.color.highlight.lime}" },
Expand Down
10 changes: 5 additions & 5 deletions proprietary/tokens/src/components/ams/blockquote.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"blockquote": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.3.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.3.line-height}" },
"inverse-color": { "value": "{ams.color.text.inverse}" }
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.xl.font-size}" },
"font-weight": { "value": "{ams.body-text.bold.font-weight}" },
"inverse-color": { "value": "{ams.color.text.inverse}" },
"line-height": { "value": "{ams.body-text.xl.line-height}" }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"ams": {
"breadcrumb": {
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"separator": {
"background-image": {
"value": "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23000000' fill-rule='evenodd' d='m9.757 32-2.9-2.91L19.937 16 6.857 2.91 9.757 0l16 16z'/></svg>\")"
Expand Down
6 changes: 3 additions & 3 deletions proprietary/tokens/src/components/ams/button.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"ams": {
"button": {
"cursor": { "value": "{ams.action.activate.cursor}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"gap": { "value": "{ams.space.sm}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"padding-block": { "value": "{ams.space.sm}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"ams": {
"character-count": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.6.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.sm.line-height}" },
"error": {
"color": { "value": "{ams.color.feedback.error}" }
}
Expand Down
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/checkbox.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"checkbox": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"gap": { "value": "{ams.space.sm}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"checkmark": {
"border-color": { "value": "{ams.color.interactive.default}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"background-color": { "value": "{ams.color.background}" },
"box-shadow": { "value": "inset 0 0 0 {ams.border.width.sm} {ams.color.interactive.secondary}" },
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"outline-offset": { "value": "{ams.focus.outline-offset}" },
"padding-block": { "value": "{ams.space.sm}" },
"padding-inline": { "value": "{ams.space.md}" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"description-list": {
"color": { "value": "{ams.color.text.default}" },
"column-gap": { "value": "{ams.space.lg}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.font-size}" },
"inverse-color": { "value": "{ams.color.text.inverse}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"line-height": { "value": "{ams.body-text.line-height}" },
"row-gap": { "value": "{ams.space.sm}" },
"term": {
"font-weight": { "value": "{ams.text.font-weight.bold}" }
"font-weight": { "value": "{ams.body-text.bold.font-weight}" }
},
"description": {
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"padding-inline-start": { "value": "{ams.space.lg}" }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"ams": {
"error-message": {
"color": { "value": "{ams.color.feedback.error}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.6.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"font-family": { "value": "{ams.body-text.font-family}" },
"font-size": { "value": "{ams.body-text.sm.font-size}" },
"font-weight": { "value": "{ams.body-text.font-weight}" },
"gap": { "value": "{ams.space.xs}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
"line-height": { "value": "{ams.body-text.sm.line-height}" }
}
}
}
8 changes: 4 additions & 4 deletions proprietary/tokens/src/components/ams/field-set.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
},
"legend": {
"color": { "value": "{ams.color.text.default}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.4.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"line-height": { "value": "{ams.text.level.4.line-height}" },
"font-family": { "value": "{ams.headings.font-family}" },
"font-size": { "value": "{ams.headings.level-4.font-size}" },
"font-weight": { "value": "{ams.headings.font-weight}" },
"line-height": { "value": "{ams.headings.level-4.line-height}" },
"margin-block-end": { "value": "{ams.space.md}" }
}
}
Expand Down
Loading