Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Figma tokens (#1068)

Taylor Nowotny4f0d46d7f05c
diff --git a/.lostpixel/baseline/components-text--text.png b/.lostpixel/baseline/components-text--text.png
index 73e89e1367..0c514c382c 100644
Binary files a/.lostpixel/baseline/components-text--text.png and b/.lostpixel/baseline/components-text--text.png differ
diff --git a/.lostpixel/baseline/library-button--button.png b/.lostpixel/baseline/library-button--button.png
index 341e1cb751..b7f0e85cee 100644
Binary files a/.lostpixel/baseline/library-button--button.png and b/.lostpixel/baseline/library-button--button.png differ
diff --git a/.lostpixel/baseline/library-label--label.png b/.lostpixel/baseline/library-label--label.png
index 1e6524ce42..14ce8541d2 100644
Binary files a/.lostpixel/baseline/library-label--label.png and b/.lostpixel/baseline/library-label--label.png differ
diff --git a/.lostpixel/baseline/library-menu-menu-item--menu-menu-item.png b/.lostpixel/baseline/library-menu-menu-item--menu-menu-item.png
index 8f3dbbb136..ac7c77aef2 100644
Binary files a/.lostpixel/baseline/library-menu-menu-item--menu-menu-item.png and b/.lostpixel/baseline/library-menu-menu-item--menu-menu-item.png differ
diff --git a/.lostpixel/baseline/library-switch--switch.png b/.lostpixel/baseline/library-switch--switch.png
index dd54e7bbb5..569000048f 100644
Binary files a/.lostpixel/baseline/library-switch--switch.png and b/.lostpixel/baseline/library-switch--switch.png differ
diff --git a/.lostpixel/baseline/library-title--title.png b/.lostpixel/baseline/library-title--title.png
index 96d1c384ff..523b3ef3c4 100644
Binary files a/.lostpixel/baseline/library-title--title.png and b/.lostpixel/baseline/library-title--title.png differ
diff --git a/apps/builder/app/builder/features/topbar/topbar.tsx b/apps/builder/app/builder/features/topbar/topbar.tsx
index bec39c1113..3e0463f76c 100644
--- a/apps/builder/app/builder/features/topbar/topbar.tsx
+++ b/apps/builder/app/builder/features/topbar/topbar.tsx
@@ -47,7 +47,7 @@ export const Topbar = ({ gridArea, project, page, publish }: TopbarProps) => {
</Flex>
<Flex css={{ width: theme.spacing[30], px: theme.spacing[9] }}>
<Text
- variant="labelTitleCase"
+ variant="labelsTitleCase"
color="contrast"
css={{ minWidth: theme.spacing[15], maxWidth: "80%" }}
truncate
diff --git a/apps/builder/app/dashboard/projects/project-card.tsx b/apps/builder/app/dashboard/projects/project-card.tsx
index 29284d4135..2478b76a3b 100644
--- a/apps/builder/app/dashboard/projects/project-card.tsx
+++ b/apps/builder/app/dashboard/projects/project-card.tsx
@@ -200,7 +200,7 @@ export const ProjectCard = ({
className={footerStyle()}
>
<Flex direction="column" justify="around">
- <Text variant="title" truncate>
+ <Text variant="titles" truncate>
{title}
</Text>
{isPublished ? (
diff --git a/apps/builder/app/dashboard/projects/project-dialogs.tsx b/apps/builder/app/dashboard/projects/project-dialogs.tsx
index 9b8643798f..7fd8967fe3 100644
--- a/apps/builder/app/dashboard/projects/project-dialogs.tsx
+++ b/apps/builder/app/dashboard/projects/project-dialogs.tsx
@@ -294,7 +294,7 @@ export const DeleteProjectDialog = ({
label={
<>
Confirm by typing{" "}
- <Text as="span" color="destructive" variant="labelSentenceCase">
+ <Text as="span" color="destructive" variant="labelsSentenceCase">
{title}
</Text>{" "}
below
diff --git a/packages/design-system/bin/transform-figma-tokens.ts b/packages/design-system/bin/transform-figma-tokens.ts
index b96fb1d2c2..b0876c9dfb 100644
--- a/packages/design-system/bin/transform-figma-tokens.ts
+++ b/packages/design-system/bin/transform-figma-tokens.ts
@@ -260,6 +260,27 @@ const pathToName = (path: string[], type: string) => {
return camelCase(withoutType, { locale: false });
};
+const detectBrokenLinks = (data: unknown) => {
+ const brokenLinks: string[] = [];
+ const testForBrokenLink = (path: string[], type: string, value: unknown) => {
+ if (typeof value === "string" && /^{.+}$/.test(value)) {
+ brokenLinks.push([type, ...path].join(" > "));
+ }
+ };
+ traverse(data, [], (path, type, value) => {
+ if (typeof value === "object" && value !== null) {
+ for (const [key, val] of Object.entries(value)) {
+ testForBrokenLink([...path, key], type, val);
+ }
+ } else {
+ testForBrokenLink(path, type, value);
+ }
+ });
+ if (brokenLinks.length > 0) {
+ throw new Error(`Broken links found:\n${brokenLinks.join("\n")}`);
+ }
+};
+
const main = () => {
execSync(`token-transformer ${SOURCE_FILE} ${TMP_OUTPUT_FILE}`, {
stdio: "inherit",
@@ -267,6 +288,8 @@ const main = () => {
const data = JSON.parse(readFileSync(TMP_OUTPUT_FILE, "utf-8"));
+ detectBrokenLinks(data);
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const byType = new Map<string, Record<string, any>>();
diff --git a/packages/design-system/src/__generated__/figma-design-tokens.json b/packages/design-system/src/__generated__/figma-design-tokens.json
index cca68dfc92..20dfd08195 100644
--- a/packages/design-system/src/__generated__/figma-design-tokens.json
+++ b/packages/design-system/src/__generated__/figma-design-tokens.json
@@ -5,18 +5,18 @@
{
"color": "#00000026",
"type": "dropShadow",
- "x": "0",
- "y": "5",
- "blur": "17",
- "spread": "0"
+ "x": 0,
+ "y": 5,
+ "blur": 17,
+ "spread": 0
},
{
"color": "#0000001a",
"type": "dropShadow",
- "x": "0",
- "y": "2",
- "blur": "7",
- "spread": "0"
+ "x": 0,
+ "y": 2,
+ "blur": 7,
+ "spread": 0
}
],
"type": "boxShadow"
@@ -37,27 +37,27 @@
},
"lineHeights": {
"0": {
- "value": "8",
+ "value": "16",
"type": "lineHeights"
},
"1": {
- "value": "10",
+ "value": "8",
"type": "lineHeights"
},
"2": {
- "value": "11",
+ "value": "12",
"type": "lineHeights"
},
"3": {
- "value": "12",
+ "value": "10",
"type": "lineHeights"
},
"4": {
- "value": "16",
+ "value": "39",
"type": "lineHeights"
},
"5": {
- "value": "22",
+ "value": "11",
"type": "lineHeights"
},
"6": {
@@ -65,11 +65,11 @@
"type": "lineHeights"
},
"7": {
- "value": "39",
+ "value": "58",
"type": "lineHeights"
},
"8": {
- "value": "58",
+ "value": "22",
"type": "lineHeights"
},
"9": {
@@ -87,7 +87,7 @@
"type": "fontWeights"
},
"inter-2": {
- "value": "Semi Bold",
+ "value": "Bold",
"type": "fontWeights"
},
"inter-3": {
@@ -99,7 +99,7 @@
"type": "fontWeights"
},
"manrope-5": {
- "value": "ExtraLight",
+ "value": "Bold",
"type": "fontWeights"
},
"manrope-6": {
@@ -107,12 +107,24 @@
"type": "fontWeights"
},
"manrope-7": {
- "value": "Bold",
+ "value": "SemiBold",
"type": "fontWeights"
},
"manrope-8": {
+ "value": "ExtraLight",
+ "type": "fontWeights"
+ },
+ "manrope-9": {
"value": "ExtraBold",
"type": "fontWeights"
+ },
+ "roboto-mono-3": {
+ "value": "Regular",
+ "type": "fontWeights"
+ },
+ "inter-4": {
+ "value": "Semi Bold",
+ "type": "fontWeights"
}
},
"fontSizes": {
@@ -151,11 +163,11 @@
},
"letterSpacing": {
"0": {
- "value": "-5%",
+ "value": "0.5%",
"type": "letterSpacing"
},
"1": {
- "value": "-2%",
+ "value": "1%",
"type": "letterSpacing"
},
"2": {
@@ -163,11 +175,11 @@
"type": "letterSpacing"
},
"3": {
- "value": "0.5%",
+ "value": "-2%",
"type": "letterSpacing"
},
"4": {
- "value": "1%",
+ "value": "-5%",
"type": "letterSpacing"
}
},
@@ -181,9 +193,9 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-0}",
- "lineHeight": "{lineHeights.4}",
- "fontSize": "{fontSizes.2}",
- "letterSpacing": "{letterSpacing.3}",
+ "lineHeight": "{lineHeights.0}",
+ "fontSize": "{fontSize.2}",
+ "letterSpacing": "{letterSpacing.0}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -191,13 +203,13 @@
},
"type": "typography"
},
- "Label - Title Case": {
+ "Labels - Title Case": {
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.4}",
- "fontSize": "{fontSizes.2}",
- "letterSpacing": "{letterSpacing.3}",
+ "lineHeight": "{lineHeights.0}",
+ "fontSize": "{fontSize.2}",
+ "letterSpacing": "{letterSpacing.0}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.capitalize}",
@@ -205,13 +217,13 @@
},
"type": "typography"
},
- "Label - Sentence case": {
+ "Labels - Sentence case": {
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.4}",
- "fontSize": "{fontSizes.2}",
- "letterSpacing": "{letterSpacing.3}",
+ "lineHeight": "{lineHeights.0}",
+ "fontSize": "{fontSize.2}",
+ "letterSpacing": "{letterSpacing.0}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -219,16 +231,16 @@
},
"type": "typography"
},
- "Title": {
+ "Titles": {
"value": {
"fontFamily": "{fontFamilies.inter}",
- "fontWeight": "{fontWeights.inter-3}",
- "lineHeight": "{lineHeights.4}",
- "fontSize": "{fontSizes.2}",
- "letterSpacing": "{letterSpacing.4}",
+ "fontWeight": "{fontWeights.inter-2}",
+ "lineHeight": "{lineHeights.0}",
+ "fontSize": "{fontSize.2}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
- "textCase": "{textCase.none}",
+ "textCase": "{textCase.capitalize}",
"textDecoration": "{textDecoration.none}"
},
"type": "typography"
@@ -237,9 +249,9 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-0}",
- "lineHeight": "{lineHeights.2}",
- "fontSize": "{fontSizes.1}",
- "letterSpacing": "{letterSpacing.4}",
+ "lineHeight": "{lineHeights.5}",
+ "fontSize": "{fontSize.1}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -252,9 +264,9 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.0}",
- "fontSize": "{fontSizes.0}",
- "letterSpacing": "{letterSpacing.4}",
+ "lineHeight": "{lineHeights.1}",
+ "fontSize": "{fontSize.0}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -266,8 +278,8 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.3}",
- "fontSize": "{fontSizes.1}",
+ "lineHeight": "{lineHeights.2}",
+ "fontSize": "{fontSize.1}",
"letterSpacing": "{letterSpacing.2}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
@@ -279,10 +291,10 @@
"Mono": {
"value": {
"fontFamily": "{fontFamilies.roboto-mono}",
- "fontWeight": "{fontWeights.roboto-mono-4}",
- "lineHeight": "{lineHeights.4}",
- "fontSize": "{fontSizes.2}",
- "letterSpacing": "{letterSpacing.4}",
+ "fontWeight": "{fontWeights.roboto-mono-3}",
+ "lineHeight": "{lineHeights.0}",
+ "fontSize": "{fontSize.2}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -294,9 +306,9 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.7}",
- "fontSize": "{fontSizes.5}",
- "letterSpacing": "{letterSpacing.3}",
+ "lineHeight": "{lineHeights.4}",
+ "fontSize": "{fontSize.5}",
+ "letterSpacing": "{letterSpacing.0}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -307,10 +319,10 @@
"Space Section Unit Text": {
"value": {
"fontFamily": "{fontFamilies.inter}",
- "fontWeight": "{fontWeights.inter-2}",
- "lineHeight": "{lineHeights.0}",
- "fontSize": "{fontSizes.0}",
- "letterSpacing": "{letterSpacing.4}",
+ "fontWeight": "{fontWeights.inter-4}",
+ "lineHeight": "{lineHeights.1}",
+ "fontSize": "{fontSize.0}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.uppercase}",
@@ -322,9 +334,9 @@
"value": {
"fontFamily": "{fontFamilies.inter}",
"fontWeight": "{fontWeights.inter-1}",
- "lineHeight": "{lineHeights.1}",
- "fontSize": "{fontSizes.1}",
- "letterSpacing": "{letterSpacing.4}",
+ "lineHeight": "{lineHeights.3}",
+ "fontSize": "{fontSize.1}",
+ "letterSpacing": "{letterSpacing.1}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -376,6 +388,22 @@
"5": {
"value": "6px",
"type": "borderRadius"
+ },
+ "6": {
+ "value": "8px",
+ "type": "borderRadius"
+ },
+ "7": {
+ "value": "9px",
+ "type": "borderRadius"
+ },
+ "8": {
+ "value": "16px",
+ "type": "borderRadius"
+ },
+ "9": {
+ "value": "17px",
+ "type": "borderRadius"
}
},
"white": {
@@ -450,8 +478,9 @@
"description": "used for destructive button and accent color on destructive toast"
},
"notification": {
- "value": "#d53f45",
- "type": "color"
+ "value": "#ffefef",
+ "type": "color",
+ "description": "background for destructive toast"
}
},
"success": {
@@ -529,6 +558,11 @@
"value": "#f8f8f8",
"type": "color",
"description": "background for disabled text fields"
+ },
+ "highlight": {
+ "value": "#b7d9f8",
+ "type": "color",
+ "description": "background color for highlighted/selected text"
}
},
"button": {
@@ -578,6 +612,10 @@
"builder": {
"value": "#ffffff",
"type": "color"
+ },
+ "designer": {
+ "value": "#ffffff",
+ "type": "color"
}
},
"spacing": {
@@ -644,6 +682,23 @@
"value": "#2d2d2d",
"type": "color",
"description": "For the Builder UI top bar background color."
+ },
+ "gradient": {
+ "primary": {
+ "value": "linear-gradient(135deg, #1774ff 0%, #bd2fdb 100%)",
+ "type": "color",
+ "description": "For buttons and other larger UI elements that use a brand gradient. (experimental)"
+ },
+ "vertical": {
+ "value": "linear-gradient(180deg, #096cff 0%, #096cff 0.01%, #bd2fdb 100%)",
+ "type": "color",
+ "description": "For vertically-oriented elements in the Builder UI that use a brand gradient background. "
+ },
+ "horizontal": {
+ "value": "linear-gradient(90deg, #4a4efa 0%, #bd2fdb 100%)",
+ "type": "color",
+ "description": "For horizontally-oriented elements in the Builder UI that use a brand gradient background. "
+ }
}
},
"brand": {
@@ -678,6 +733,14 @@
"dashboard": {
"value": "#ededed",
"type": "color"
+ },
+ "regular-button-selected": {
+ "value": "linear-gradient(180deg, #bffeec 0%, #fbfff6 100%)",
+ "type": "color"
+ },
+ "cta-button": {
+ "value": "linear-gradient(135deg, #4a4efa 0%, #bd2fdb 100%)",
+ "type": "color"
}
},
"foreground": {
@@ -690,6 +753,14 @@
"published": {
"value": "#ebfffc",
"type": "color"
+ },
+ "full-gradient": {
+ "value": "linear-gradient(135deg, #92fddc 0%, #7d7ffb 31.94%, #ed72fe 64.24%, #fdd791 100%)",
+ "type": "color"
+ },
+ "navbar": {
+ "value": "linear-gradient(90deg, #39fbbb00 0%, #39fbbb 20%, #4a4efa 40.03%, #e63cfe 60.02%, #ffae3c 80.04%, #ffae3c00 100%, #ffae3c00 100%)",
+ "type": "color"
}
}
},
@@ -820,9 +891,9 @@
"description": "destructive foreground color. Used in input field, text field, search area, & toast"
},
"success": {
- "value": "#00894a",
+ "value": "#00b661",
"type": "color",
- "description": "success foreground color. Used in toast"
+ "description": "A brighter success color for use with icons and text against a dark bg. Not for use with text against light bg."
},
"info": {
"value": "#096cff",
@@ -895,6 +966,27 @@
"primary": {
"value": "#096cff",
"type": "color"
+ },
+ "success-text": {
+ "value": "#00894a",
+ "type": "color",
+ "description": "Success color that is dark enough for text. Same color as background/success"
+ },
+ "grid-controls": {
+ "dot": {
+ "value": "#c7c7c7",
+ "type": "color",
+ "description": "color for flex control ui elements"
+ },
+ "dot-hover": {
+ "value": "#707375",
+ "type": "color"
+ },
+ "flex-hover": {
+ "value": "#96c7f2",
+ "type": "color",
+ "description": "color for hovered state of flex control ui elements"
+ }
}
},
"Brand": {
@@ -902,10 +994,10 @@
"value": {
"color": "#1717171a",
"type": "dropShadow",
- "x": "0",
- "y": "4",
- "blur": "4",
- "spread": "0"
+ "x": 0,
+ "y": 4,
+ "blur": 4,
+ "spread": 0
},
"type": "boxShadow",
"description": "elevation for small things within the dashboard"
@@ -914,10 +1006,10 @@
"value": {
"color": "#1717171a",
"type": "dropShadow",
- "x": "0",
- "y": "8",
- "blur": "16",
- "spread": "0"
+ "x": 0,
+ "y": 8,
+ "blur": 16,
+ "spread": 0
},
"type": "boxShadow",
"description": "elevation for big things within the dashboard"
@@ -925,9 +1017,9 @@
"Section Title": {
"value": {
"fontFamily": "{fontFamilies.manrope}",
- "fontWeight": "{fontWeights.manrope-7}",
+ "fontWeight": "{fontWeights.manrope-5}",
"lineHeight": "{lineHeights.6}",
- "fontSize": "{fontSizes.4}",
+ "fontSize": "{fontSize.4}",
"letterSpacing": "{letterSpacing.2}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
@@ -939,10 +1031,10 @@
"Large Title": {
"value": {
"fontFamily": "{fontFamilies.manrope}",
- "fontWeight": "{fontWeights.manrope-7}",
- "lineHeight": "{lineHeights.8}",
- "fontSize": "{fontSizes.6}",
- "letterSpacing": "{letterSpacing.1}",
+ "fontWeight": "{fontWeights.manrope-5}",
+ "lineHeight": "{lineHeights.7}",
+ "fontSize": "{fontSize.6}",
+ "letterSpacing": "{letterSpacing.3}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -954,8 +1046,8 @@
"value": {
"fontFamily": "{fontFamilies.manrope}",
"fontWeight": "{fontWeights.manrope-6}",
- "lineHeight": "{lineHeights.5}",
- "fontSize": "{fontSizes.3}",
+ "lineHeight": "{lineHeights.8}",
+ "fontSize": "{fontSize.3}",
"letterSpacing": "{letterSpacing.2}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
@@ -968,10 +1060,10 @@
"Default": {
"value": {
"fontFamily": "{fontFamilies.manrope}",
- "fontWeight": "{fontWeights.manrope-5}",
+ "fontWeight": "{fontWeights.manrope-8}",
"lineHeight": "{lineHeights.9}",
- "fontSize": "{fontSizes.7}",
- "letterSpacing": "{letterSpacing.0}",
+ "fontSize": "{fontSize.7}",
+ "letterSpacing": "{letterSpacing.4}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -982,10 +1074,10 @@
"Hover": {
"value": {
"fontFamily": "{fontFamilies.manrope}",
- "fontWeight": "{fontWeights.manrope-8}",
+ "fontWeight": "{fontWeights.manrope-9}",
"lineHeight": "{lineHeights.9}",
- "fontSize": "{fontSizes.7}",
- "letterSpacing": "{letterSpacing.0}",
+ "fontSize": "{fontSize.7}",
+ "letterSpacing": "{letterSpacing.4}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -999,9 +1091,9 @@
"value": {
"fontFamily": "{fontFamilies.manrope}",
"fontWeight": "{fontWeights.manrope-6}",
- "lineHeight": "{lineHeights.8}",
- "fontSize": "{fontSizes.6}",
- "letterSpacing": "{letterSpacing.1}",
+ "lineHeight": "{lineHeights.7}",
+ "fontSize": "{fontSize.6}",
+ "letterSpacing": "{letterSpacing.3}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -1012,10 +1104,40 @@
"Hover": {
"value": {
"fontFamily": "{fontFamilies.manrope}",
- "fontWeight": "{fontWeights.manrope-8}",
+ "fontWeight": "{fontWeights.manrope-9}",
+ "lineHeight": "{lineHeights.7}",
+ "fontSize": "{fontSize.6}",
+ "letterSpacing": "{letterSpacing.3}",
+ "paragraphSpacing": "{paragraphSpacing.0}",
+ "paragraphIndent": "{paragraphIndent.0}",
+ "textCase": "{textCase.none}",
+ "textDecoration": "{textDecoration.none}"
+ },
+ "type": "typography"
+ }
+ },
+ "button": {
+ "regular": {
+ "value": {
+ "fontFamily": "{fontFamilies.manrope}",
+ "fontWeight": "{fontWeights.manrope-7}",
"lineHeight": "{lineHeights.8}",
- "fontSize": "{fontSizes.6}",
- "letterSpacing": "{letterSpacing.1}",
+ "fontSize": "{fontSize.3}",
+ "letterSpacing": "{letterSpacing.2}",
+ "paragraphSpacing": "{paragraphSpacing.0}",
+ "paragraphIndent": "{paragraphIndent.0}",
+ "textCase": "{textCase.none}",
+ "textDecoration": "{textDecoration.none}"
+ },
+ "type": "typography"
+ },
+ "cta": {
+ "value": {
+ "fontFamily": "{fontFamilies.manrope}",
+ "fontWeight": "{fontWeights.manrope-5}",
+ "lineHeight": "{lineHeights.4}",
+ "fontSize": "{fontSize.5}",
+ "letterSpacing": "{letterSpacing.3}",
"paragraphSpacing": "{paragraphSpacing.0}",
"paragraphIndent": "{paragraphIndent.0}",
"textCase": "{textCase.none}",
@@ -1060,10 +1182,53 @@
"value": "0px",
"type": "dimension"
}
+ },
+ "backgrond": {
+ "menu-hint": {
+ "value": "#dedede",
+ "type": "color",
+ "description": "For the background of the hint menu item."
+ }
+ },
+ "fontSize": {
+ "0": {
+ "value": "8",
+ "type": "fontSizes"
+ },
+ "1": {
+ "value": "10",
+ "type": "fontSizes"
+ },
+ "2": {
+ "value": "12",
+ "type": "fontSizes"
+ },
+ "3": {
+ "value": "16",
+ "type": "fontSizes"
+ },
+ "4": {
+ "value": "20",
+ "type": "fontSizes"
+ },
+ "5": {
+ "value": "32",
+ "type": "fontSizes"
+ },
+ "6": {
+ "value": "48",
+ "type": "fontSizes"
+ },
+ "7": {
+ "value": "360",
+ "type": "fontSizes"
+ }
}
},
"$themes": [],
"$metadata": {
- "tokenSetOrder": ["global"]
+ "tokenSetOrder": [
+ "global"
+ ]
}
-}
+}
\ No newline at end of file
diff --git a/packages/design-system/src/__generated__/figma-design-tokens.ts b/packages/design-system/src/__generated__/figma-design-tokens.ts
index 515d50f0f7..bbe9699072 100644
--- a/packages/design-system/src/__generated__/figma-design-tokens.ts
+++ b/packages/design-system/src/__generated__/figma-design-tokens.ts
@@ -14,28 +14,31 @@ export const fontFamilies = {
} as const;
export const lineHeights = {
- "0": "8px",
- "1": "10px",
- "2": "11px",
- "3": "12px",
- "4": "16px",
- "5": "22px",
+ "0": "16px",
+ "1": "8px",
+ "2": "12px",
+ "3": "10px",
+ "4": "39px",
+ "5": "11px",
"6": "27px",
- "7": "39px",
- "8": "58px",
+ "7": "58px",
+ "8": "22px",
"9": "360px",
} as const;
export const fontWeights = {
inter0: 400,
inter1: 500,
- inter2: 600,
+ inter2: 700,
inter3: 700,
robotoMono4: 400,
- manrope5: 200,
+ manrope5: 700,
manrope6: 400,
- manrope7: 700,
- manrope8: 800,
+ manrope7: 600,
+ manrope8: 200,
+ manrope9: 800,
+ robotoMono3: 400,
+ inter4: 600,
} as const;
export const fontSizes = {
@@ -47,14 +50,22 @@ export const fontSizes = {
"5": "32px",
"6": "48px",
"7": "360px",
+ fontSize0: "8px",
+ fontSize1: "10px",
+ fontSize2: "12px",
+ fontSize3: "16px",
+ fontSize4: "20px",
+ fontSize5: "32px",
+ fontSize6: "48px",
+ fontSize7: "360px",
} as const;
export const letterSpacing = {
- "0": "-0.05em",
- "1": "-0.02em",
+ "0": "0.005em",
+ "1": "0.01em",
"2": "0em",
- "3": "0.005em",
- "4": "0.01em",
+ "3": "-0.02em",
+ "4": "-0.05em",
} as const;
export const paragraphSpacing = { "0": 0 } as const;
@@ -71,7 +82,7 @@ export const typography = {
textDecoration: "none",
textIndent: "0px",
},
- labelTitleCase: {
+ labelsTitleCase: {
fontFamily:
"Inter Variable, InterVariable, Inter, -apple-system, system-ui, sans-serif",
fontWeight: 500,
@@ -82,7 +93,7 @@ export const typography = {
textDecoration: "none",
textIndent: "0px",
},
- labelSentenceCase: {
+ labelsSentenceCase: {
fontFamily:
"Inter Variable, InterVariable, Inter, -apple-system, system-ui, sans-serif",
fontWeight: 500,
@@ -93,14 +104,14 @@ export const typography = {
textDecoration: "none",
textIndent: "0px",
},
- title: {
+ titles: {
fontFamily:
"Inter Variable, InterVariable, Inter, -apple-system, system-ui, sans-serif",
fontWeight: 700,
fontSize: "12px",
lineHeight: "16px",
letterSpacing: "0.01em",
- textTransform: "none",
+ textTransform: "capitalize",
textDecoration: "none",
textIndent: "0px",
},
@@ -250,6 +261,26 @@ export const typography = {
textDecoration: "none",
textIndent: "0px",
},
+ brandButtonRegular: {
+ fontFamily: "Manrope Variable, ManropeVariable, Manrope, sans-serif",
+ fontWeight: 600,
+ fontSize: "16px",
+ lineHeight: "22px",
+ letterSpacing: "0em",
+ textTransform: "none",
+ textDecoration: "none",
+ textIndent: "0px",
+ },
+ brandButtonCta: {
+ fontFamily: "Manrope Variable, ManropeVariable, Manrope, sans-serif",
+ fontWeight: 700,
+ fontSize: "32px",
+ lineHeight: "39px",
+ letterSpacing: "-0.02em",
+ textTransform: "none",
+ textDecoration: "none",
+ textIndent: "0px",
+ },
} as const;
export const textCase = {
@@ -267,6 +298,10 @@ export const borderRadius = {
"3": "4px",
"4": "5px",
"5": "6px",
+ "6": "8px",
+ "7": "9px",
+ "8": "16px",
+ "9": "17px",
} as const;
export const color = {
@@ -284,7 +319,7 @@ export const color = {
backgroundNeutralNotification: "#ffffff",
backgroundNeutralDark: "#7e868c",
backgroundDestructiveMain: "#de3339",
- backgroundDestructiveNotification: "#d53f45",
+ backgroundDestructiveNotification: "#ffefef",
backgroundSuccessMain: "#00894a",
backgroundSuccessNotification: "#e9f9ee",
backgroundAlertMain: "#f5d90a",
@@ -299,6 +334,7 @@ export const color = {
backgroundInheritedHover: "#ffdcc3",
backgroundInputSelected: "#b7d9f8",
backgroundInputDisabled: "#f8f8f8",
+ backgroundInputHighlight: "#b7d9f8",
backgroundButtonHover: "#ffffff17",
backgroundButtonPressed: "#0000001c",
backgroundButtonDisabled: "#dfe3e6",
@@ -308,6 +344,7 @@ export const color = {
backgroundItemMenuItemHover: "#d3d3d3",
backgroundTooltipMain: "#11181c",
backgroundTooltipBuilder: "#ffffff",
+ backgroundTooltipDesigner: "#ffffff",
backgroundSpacingTopBottom: "#f1f3f5",
backgroundSpacingLeftRight: "#eceef0",
backgroundSpacingHover: "#d7dbdf",
@@ -324,6 +361,12 @@ export const color = {
"linear-gradient(90deg, #00894a00 0%, #00894a 31.87%)",
backgroundCanvas: "#c7c7c7",
backgroundTopbar: "#2d2d2d",
+ backgroundGradientPrimary:
+ "linear-gradient(135deg, #1774ff 0%, #bd2fdb 100%)",
+ backgroundGradientVertical:
+ "linear-gradient(180deg, #096cff 0%, #096cff 0.01%, #bd2fdb 100%)",
+ backgroundGradientHorizontal:
+ "linear-gradient(90deg, #4a4efa 0%, #bd2fdb 100%)",
brandBackgroundProjectCardFront:
"linear-gradient(0deg, #fbf8ff 0%, #e2e2e2 100%)",
brandBackgroundProjectCardBack:
@@ -333,8 +376,15 @@ export const color = {
brandBackgroundGradient: "linear-gradient(180deg, #e63cfe 0%, #ffae3c 100%)",
brandBackgroundPublishedContrast: "#ebfffc",
brandBackgroundDashboard: "#ededed",
+ brandBackgroundRegularButtonSelected:
+ "linear-gradient(180deg, #bffeec 0%, #fbfff6 100%)",
+ brandBackgroundCtaButton: "linear-gradient(135deg, #4a4efa 0%, #bd2fdb 100%)",
brandForegroundPublished: "#00894a",
brandBorderPublished: "#ebfffc",
+ brandBorderFullGradient:
+ "linear-gradient(135deg, #92fddc 0%, #7d7ffb 31.94%, #ed72fe 64.24%, #fdd791 100%)",
+ brandBorderNavbar:
+ "linear-gradient(90deg, #39fbbb00 0%, #39fbbb 20%, #4a4efa 40.03%, #e63cfe 60.02%, #ffae3c 80.04%, #ffae3c00 100%, #ffae3c00 100%)",
borderMain: "#c1c8cd",
borderFocus: "#096cff",
borderMenuInner: "#fcfcfc",
@@ -358,7 +408,7 @@ export const color = {
foregroundCategoryLabel: "#889096",
foregroundTextSubtle: "#687076",
foregroundDestructive: "#de3339",
- foregroundSuccess: "#00894a",
+ foregroundSuccess: "#00b661",
foregroundInfo: "#096cff",
foregroundDisabled: "#c1c8cd",
foregroundHiddenItem: "#7e868c",
@@ -372,10 +422,15 @@ export const color = {
foregroundInheritedFlexUi: "#fa934e",
foregroundTextMoreSubtle: "#889096",
foregroundPrimary: "#096cff",
+ foregroundSuccessText: "#00894a",
+ foregroundGridControlsDot: "#c7c7c7",
+ foregroundGridControlsDotHover: "#707375",
+ foregroundGridControlsFlexHover: "#96c7f2",
maintenanceLight: "#ededed",
maintenanceMedium: "#c7c7c7",
maintenanceDark: "#858585",
maintenanceSpacerViz: "#f9c6c6",
+ backgrondMenuHint: "#dedede",
} as const;
export const borderWidth = { "0": 1, "1": 2 } as const;
diff --git a/packages/design-system/src/components/__DEPRECATED__/heading.tsx b/packages/design-system/src/components/__DEPRECATED__/heading.tsx
index 7ef156a997..97a19d94bb 100644
--- a/packages/design-system/src/components/__DEPRECATED__/heading.tsx
+++ b/packages/design-system/src/components/__DEPRECATED__/heading.tsx
@@ -2,7 +2,6 @@ import React from "react";
import { DeprecatedText } from "./text";
import type { VariantProps, CSS } from "../../stitches.config";
import merge from "lodash.merge";
-import { theme } from "../../stitches.config";
const DEFAULT_TAG = "h1";
@@ -33,7 +32,7 @@ export const DeprecatedHeading = React.forwardRef<
const textCss: Record<HeadingSizeVariants, CSS> = {
1: {
fontWeight: 500,
- lineHeight: theme.lineHeight[4],
+ lineHeight: "16px",
"@laptop": { lineHeight: "23px" },
},
2: {
diff --git a/packages/design-system/src/components/avatar.tsx b/packages/design-system/src/components/avatar.tsx
index 5530375c37..64df8d67b8 100644
--- a/packages/design-system/src/components/avatar.tsx
+++ b/packages/design-system/src/components/avatar.tsx
@@ -203,7 +203,7 @@ const StyledAvatarFallback = styled(AvatarPrimitive.Fallback, {
size: {
"1": {
fontSize: theme.deprecatedFontSize[2],
- lineHeight: theme.lineHeight[3],
+ lineHeight: theme.deprecatedLineHeight[3],
},
"2": {
fontSize: theme.deprecatedFontSize[4],
diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsx
index 8c502fea2c..e3d7a18434 100644
--- a/packages/design-system/src/components/button.tsx
+++ b/packages/design-system/src/components/button.tsx
@@ -109,7 +109,7 @@ const StyledButton = styled("button", {
},
});
-const TextContainer = styled("span", textVariants.labelTitleCase, {
+const TextContainer = styled("span", textVariants.labelsTitleCase, {
padding: `0 ${theme.spacing[2]}`,
});
diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsx
index 11eec19ce4..7acf494b1c 100644
--- a/packages/design-system/src/components/label.tsx
+++ b/packages/design-system/src/components/label.tsx
@@ -8,7 +8,7 @@ import { forwardRef } from "react";
import { textVariants } from "./text";
import { styled, theme } from "../stitches.config";
-const StyledLabel = styled("label", textVariants.labelSentenceCase, {
+const StyledLabel = styled("label", textVariants.labelsSentenceCase, {
boxSizing: "border-box",
flexShrink: 0,
py: theme.spacing[2],
diff --git a/packages/design-system/src/components/menu.tsx b/packages/design-system/src/components/menu.tsx
index 7f6d43e6ff..bf2257861f 100644
--- a/packages/design-system/src/components/menu.tsx
+++ b/packages/design-system/src/components/menu.tsx
@@ -25,7 +25,7 @@ import {
import { CheckMarkIcon, DotIcon } from "@webstudio-is/icons";
import type { ComponentProps } from "react";
-export const labelCss = css(textVariants.title, {
+export const labelCss = css(textVariants.titles, {
color: theme.colors.foregroundMain,
mx: theme.spacing[3],
padding: theme.spacing[3],
@@ -43,7 +43,7 @@ export const itemIndicatorCss = css({
});
const itemMargin = theme.spacing[3];
-export const itemCss = css(textVariants.labelTitleCase, {
+export const itemCss = css(textVariants.labelsTitleCase, {
outline: "none",
cursor: "default",
position: "relative",
diff --git a/packages/design-system/src/components/storybook.tsx b/packages/design-system/src/components/storybook.tsx
index 0dea1fb826..29a7bd3064 100644
--- a/packages/design-system/src/components/storybook.tsx
+++ b/packages/design-system/src/components/storybook.tsx
@@ -18,7 +18,7 @@ const sectionStyle = css({
},
},
});
-const titleStyle = css(textVariants.title, {
+const titleStyle = css(textVariants.titles, {
marginTop: 0,
marginBottom: theme.spacing[5],
color: theme.colors.foregroundMain,
diff --git a/packages/design-system/src/components/text-area.tsx b/packages/design-system/src/components/text-area.tsx
index d9e5abbf2d..52ede611ec 100644
--- a/packages/design-system/src/components/text-area.tsx
+++ b/packages/design-system/src/components/text-area.tsx
@@ -47,13 +47,13 @@ export const TextArea = styled("textarea", {
"1": {
borderRadius: theme.borderRadius[4],
fontSize: theme.deprecatedFontSize[3],
- lineHeight: theme.lineHeight[3],
+ lineHeight: theme.deprecatedLineHeight[3],
px: theme.spacing[3],
},
"2": {
borderRadius: theme.borderRadius[4],
fontSize: theme.deprecatedFontSize[3],
- lineHeight: theme.lineHeight[4],
+ lineHeight: theme.deprecatedLineHeight[4],
px: theme.spacing[3],
},
"3": {
diff --git a/packages/design-system/src/components/title.tsx b/packages/design-system/src/components/title.tsx
index ee80642e6a..92f6547053 100644
--- a/packages/design-system/src/components/title.tsx
+++ b/packages/design-system/src/components/title.tsx
@@ -14,7 +14,7 @@ type TitleProps = {
css?: CSS;
};
-const Container = styled("div", textVariants.title, {
+const Container = styled("div", textVariants.titles, {
display: "flex",
alignItems: "center",
justifyContent: "space-between",
diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.ts
index ceac24bda7..ad43987bc5 100644
--- a/packages/design-system/src/stitches.config.ts
+++ b/packages/design-system/src/stitches.config.ts
@@ -254,10 +254,12 @@ const {
sans: figma.fontFamilies.inter,
mono: figma.fontFamilies.robotoMono,
},
- fontSize: figma.fontSizes,
- lineHeight: figma.lineHeights,
- fontWeight: figma.fontWeights,
- letterSpacing: figma.letterSpacing,
+
+ // @todo: should we use these tokens?
+ // fontSize: figma.fontSizes,
+ // lineHeight: figma.lineHeights,
+ // fontWeight: figma.fontWeights,
+ // letterSpacing: figma.letterSpacing,
opacity: {
1: "0.4",