Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
libertymayc committed May 17, 2024
1 parent 95122e2 commit 14590b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 52 deletions.
3 changes: 0 additions & 3 deletions packages/theme/json/parsers/colorFormatSwap.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ module.exports = function colorFormatSwap(swapTo, color) {
a = ((a * 255) | (1 << 8)).toString(16).slice(1).trim();
return rgbToHex(r, g, b) + a;
} else {
if (color.includes("var(")) {
const cssVar = extractVar(color);
}
const [r, g, b] = color
.replace("rgb(", "")
.replace(")", "")
Expand Down
66 changes: 17 additions & 49 deletions packages/theme/json/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,17 @@
},
"palette-error-border": {
"$value": {
"$dark": "{foundations.color.color-red-400}",
"$dark": "{foundations.color.color-red-500}",
"$light": "{foundations.color.color-red-500}"
},
"$type": "color"
},
"palette-error-foreground-decorative": {
"palette-error-foreground": {
"$value": {
"$dark": "{foundations.color.color-red-400}",
"$dark": "{foundations.color.color-red-500}",
"$light": "{foundations.color.color-red-500}"
},
"$type": "color"
},
"palette-error-foreground-informative": {
"$value": {
"$dark": "{foundations.color.color-red-200}",
"$light": "{foundations.color.color-red-600}"
},
"$type": "color"
}
},
"foreground": {
Expand Down Expand Up @@ -780,19 +773,12 @@
},
"$type": "color"
},
"palette-success-foreground-decorative": {
"palette-success-foreground": {
"$value": {
"$dark": "{foundations.color.color-green-400}",
"$light": "{foundations.color.color-green-500}"
},
"$type": "color"
},
"palette-success-foreground-informative": {
"$value": {
"$dark": "{foundations.color.color-green-200}",
"$light": "{foundations.color.color-green-600}"
},
"$type": "color"
}
},
"warning": {
Expand Down Expand Up @@ -840,20 +826,6 @@
"$value": "{foundations.opacity.opacity-15}",
"$type": "number"
}
},
"text": {
"palette-text-fontFamily": {
"$value": "{foundations.typography.typography-fontFamily-openSans}",
"$type": "fontFamily"
},
"palette-text-fontFamily-heading": {
"$value": "{foundations.typography.typography-fontFamily-openSans}",
"$type": "fontFamily"
},
"palette-text-fontFamily-code": {
"$value": "{foundations.typography.typography-fontFamily-ptMono}",
"$type": "fontFamily"
}
}
},
"foundations": {
Expand Down Expand Up @@ -1924,15 +1896,11 @@
}
},
"typography": {
"typography-fontFamily-openSans": {
"typography-fontFamily": {
"$value": "\"Open Sans\"",
"$type": "fontFamily"
},
"typography-fontFamily-amplitude": {
"$value": "\"Amplitude\"",
"$type": "fontFamily"
},
"typography-fontFamily-ptMono": {
"typography-fontFamily-code": {
"$value": "\"PT Mono\"",
"$type": "fontFamily"
},
Expand Down Expand Up @@ -2186,7 +2154,7 @@
"$type": "fontWeight"
},
"text-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-fontWeight": {
Expand All @@ -2202,7 +2170,7 @@
"$type": "fontWeight"
},
"text-notation-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-notation-fontWeight": {
Expand All @@ -2218,7 +2186,7 @@
"$type": "fontWeight"
},
"text-h1-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-h1-fontWeight": {
Expand All @@ -2234,7 +2202,7 @@
"$type": "fontWeight"
},
"text-h2-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-h2-fontWeight": {
Expand All @@ -2250,7 +2218,7 @@
"$type": "fontWeight"
},
"text-h3-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-h3-fontWeight": {
Expand All @@ -2266,7 +2234,7 @@
"$type": "fontWeight"
},
"text-h4-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-h4-fontWeight": {
Expand All @@ -2282,7 +2250,7 @@
"$type": "fontWeight"
},
"text-label-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-label-fontWeight": {
Expand All @@ -2298,7 +2266,7 @@
"$type": "fontWeight"
},
"text-display1-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-display1-fontWeight": {
Expand All @@ -2314,7 +2282,7 @@
"$type": "fontWeight"
},
"text-display2-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-display2-fontWeight": {
Expand All @@ -2330,7 +2298,7 @@
"$type": "fontWeight"
},
"text-display3-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-heading}",
"$value": "{foundations.typography.typography-fontFamily}",
"$type": "fontFamily"
},
"text-display3-fontWeight": {
Expand All @@ -2346,7 +2314,7 @@
"$type": "fontWeight"
},
"text-code-fontFamily": {
"$value": "{palette.text.palette-text-fontFamily-code}",
"$value": "{foundations.typography.typography-fontFamily-code}",
"$type": "fontFamily"
}
},
Expand Down

0 comments on commit 14590b0

Please sign in to comment.