Merged in feat/update-tokens (pull request #1611)

feat(SW-2027): update variables.json

* feat(SW-2027): update variables.json

* fix(SW-2027). replace old tokens

* fix(SW-2027): remove uppercase check


Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
This commit is contained in:
Matilda Landström
2025-03-28 16:15:57 +00:00
parent 650dd79c26
commit adde77eaa9
22 changed files with 2478 additions and 1340 deletions

View File

@@ -62,14 +62,22 @@ json.collections.forEach((collection) => {
switch (variable.type) {
case 'boolean':
if (typeof variable.value === 'boolean') {
// Handle text transform UPPERCASE
if (/upper(\s+)?case|text transform/i.test(variable.name)) {
// Handle text transform
if (/text transform/i.test(variable.name)) {
token = variable.name.replace(
/upper(\s+)?case|text transform/i,
/text transform/i,
'Text-Transform'
)
value = variable.value ? 'uppercase' : 'unset'
}
// Handle text decoration
else if (/text decoration/i.test(variable.name)) {
token = variable.name.replace(
/text decoration/i,
'Text-Decoration'
)
value = variable.value ? 'underline' : 'unset'
}
} else {
throw new Error(
`Bad variable value input type. Expected 'boolean' got '${variable.type}'`

File diff suppressed because it is too large Load Diff