Skip to content

Commit

Permalink
Feat(tokens): applied tokenchanges from v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianHoffmannS2 committed Feb 26, 2024
1 parent 360be5d commit f56d5fc
Show file tree
Hide file tree
Showing 60 changed files with 12,364 additions and 11,845 deletions.
61 changes: 6 additions & 55 deletions packages/figma-design-tokens/config/style-dictionary.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,7 @@ const themes = require('./themes.cjs');
const { registerTransforms } = sdTransforms;
registerTransforms(StyleDictionaryPackage);

const semanticTypes = [
// sizes variants
'XS',
'SM',
'MD',
'LG',
'XL',

// elevation variants
'Lvl_1',
'Lvl_2',

// emphasis variants
'CTA',
'Primary',
'Secondary',
'Silent',
'Destructive',
'Encourage',

// feedback variants
'Neutral',
'Warning',
'Error',

// componentElements
'Caption',
'CaptionSlot',
'Label',
'LabelSlot',
'Legend',
'UserInput',
'Placeholder',
'Input',
'InputSlot',
'InputField',
'InputIcon',
'PrefixSuffix',
'FocusBorder',

// tokenTypes
'BorderRadius',
'BorderWidth',
'SurfaceFill',
'InputBorderRadius',
'Fill',
'Background',

// semantic
'Focus',
'Feedback',
];
const semanticTypes = ['buttons', 'selectables', 'forms', 'global', 'ui'];

const componentTypes = [
'ButtonGroup',
Expand All @@ -73,6 +22,7 @@ const componentTypes = [
'Icon',
'IconButton',
'IconDropdown',
'InputIcon',
'Loader',
'RadioGroup',
'NumberInput',
Expand Down Expand Up @@ -115,10 +65,11 @@ StyleDictionaryPackage.registerFormat({
const getStyleDictionaryConfig = (theme) => {
return {
source: [
`input/tokens/intermediary/${theme}.json`,
'input/tokens/core/*.json',
'input/tokens/CMP/*.json',
'input/tokens/SEM/*.json',
`input/tokens/sys/${theme}.json`,
'input/tokens/sys/sizes.json',
'input/tokens/sem/*.json',
'input/tokens/cmp/*.json',
],
platforms: {
/*
Expand Down
27 changes: 18 additions & 9 deletions packages/figma-design-tokens/input/tokens/$metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
{
"tokenSetOrder": [
"core/COR",
"intermediary/Light",
"intermediary/Dark",
"SEM/color",
"SEM/sizes",
"SEM/sizeVariants",
"CMP/color",
"CMP/sizes",
"CMP/sizeVariants"
"core/color",
"core/sizes",
"core/typography",
"sys/light",
"sys/dark",
"sys/sizes",
"sem/colors",
"sem/sizes",
"sem/borders",
"sem/shadows",
"sem/typography",
"sem/sizeVariants",
"cmp/color",
"cmp/sizes",
"cmp/borders",
"cmp/shadows",
"cmp/typography",
"cmp/sizeVariants"
]
}
5,312 changes: 2,308 additions & 3,004 deletions packages/figma-design-tokens/input/tokens/$themes.json

Large diffs are not rendered by default.

Loading

0 comments on commit f56d5fc

Please sign in to comment.