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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
feat: improve vertical space usage (#4307)
Oleg Isonen02551fa0c027
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsxindex d5c23fedfe..cb6ab55aad 100644--- a/.storybook/preview.tsx+++ b/.storybook/preview.tsx@@ -40,8 +40,7 @@ const WaitForFonts = ({ children }) => {const globalStyles = globalCss({body: {- backgroundColor: theme.colors.background,- color: theme.colors.hiContrast,+ color: theme.colors.foregroundMain,fontFamily: theme.fonts.sans,},});diff --git a/apps/builder/app/builder/features/breakpoints/breakpoints-editor.tsx b/apps/builder/app/builder/features/breakpoints/breakpoints-editor.tsxindex 01437b2cc3..31a91905bf 100644--- a/apps/builder/app/builder/features/breakpoints/breakpoints-editor.tsx+++ b/apps/builder/app/builder/features/breakpoints/breakpoints-editor.tsx@@ -186,7 +186,7 @@ export const BreakpointsEditor = ({ onDelete }: BreakpointsEditorProps) => {return (<Flex direction="column"><PanelTitle- css={{ px: theme.spacing[9] }}+ css={{ paddingInline: theme.panel.paddingInline }}suffix={<IconButtononClick={() => {@@ -209,7 +209,7 @@ export const BreakpointsEditor = ({ onDelete }: BreakpointsEditorProps) => {{allBreakpoints.map((breakpoint, index, all) => {return (<Fragment key={breakpoint.id}>- <Box css={{ px: theme.spacing[7], py: theme.spacing[5] }}>+ <Box css={{ p: theme.panel.padding }}><BreakpointEditorItembreakpoint={breakpoint}onChangeComplete={handleChangeComplete}diff --git a/apps/builder/app/builder/features/breakpoints/breakpoints-popover.tsx b/apps/builder/app/builder/features/breakpoints/breakpoints-popover.tsxindex b28ba5c080..cd6d5b89e3 100644--- a/apps/builder/app/builder/features/breakpoints/breakpoints-popover.tsx+++ b/apps/builder/app/builder/features/breakpoints/breakpoints-popover.tsx@@ -113,7 +113,7 @@ export const BreakpointsPopover = () => {)}{view === "initial" && (<>- <Flex css={{ px: theme.spacing[7], py: theme.spacing[5] }} gap="3">+ <Flex css={{ p: theme.panel.padding }} gap="3"><WidthInput min={minCanvasWidth} /><Flex align="center" gap="2"><Label>Scale</Label>diff --git a/apps/builder/app/builder/features/footer/footer.tsx b/apps/builder/app/builder/features/footer/footer.tsxindex a8c8996b18..409373fa17 100644--- a/apps/builder/app/builder/features/footer/footer.tsx+++ b/apps/builder/app/builder/features/footer/footer.tsx@@ -11,7 +11,6 @@ export const Footer = () => {height: theme.spacing[11],background: theme.colors.backgroundTopbar,color: theme.colors.foregroundContrastMain,- boxShadow: `inset 0 1px 0 0 ${theme.colors.panelOutline}`,}}><Breadcrumbs />diff --git a/apps/builder/app/builder/features/inspector/inspector.tsx b/apps/builder/app/builder/features/inspector/inspector.tsxindex 9b7ae61964..c32484b1a1 100644--- a/apps/builder/app/builder/features/inspector/inspector.tsx+++ b/apps/builder/app/builder/features/inspector/inspector.tsx@@ -11,7 +11,6 @@ import {PanelTabsContent,Card,Text,- Box,EnhancedTooltipProvider,Flex,ScrollArea,@@ -48,9 +47,8 @@ const InstanceInfo = ({ instance }: { instance: Instance }) => {gap="1"align="center"css={{- px: theme.spacing[9],- my: theme.spacing[3],- height: theme.spacing[13],+ p: theme.panel.padding,+ pb: 0,color: theme.colors.foregroundSubtle,}}>@@ -88,14 +86,12 @@ export const Inspector = ({ navigatorLayout }: InspectorProps) => {if (selectedInstance === undefined) {return (- <Box css={{ p: theme.spacing[5], flexBasis: "100%" }}>+ <Flex css={{ p: theme.spacing[9] }}>{/* @todo: use this space for something more usefull: a-la figma's no instance selected sate, maybe create an issue with a more specific proposal? */}- <Card- css={{ p: theme.spacing[9], mt: theme.spacing[9], width: "100%" }}- >+ <Card css={{ p: theme.spacing[9], width: "100%" }}><Text>Select an instance on the canvas</Text></Card>- </Box>+ </Flex>);}@@ -183,9 +179,8 @@ export const Inspector = ({ navigatorLayout }: InspectorProps) => {<ScrollArea><InstanceInfo instance={selectedInstance} /><SettingsPanelContainer- key={- selectedInstance.id /* Re-render when instance changes */- }+ // Re-render when instance changes+ key={selectedInstance.id}selectedInstance={selectedInstance}/></ScrollArea>diff --git a/apps/builder/app/builder/features/project-settings/project-settings.tsx b/apps/builder/app/builder/features/project-settings/project-settings.tsxindex 21fa34a465..d637bbf3cb 100644--- a/apps/builder/app/builder/features/project-settings/project-settings.tsx+++ b/apps/builder/app/builder/features/project-settings/project-settings.tsx@@ -71,7 +71,7 @@ export const ProjectSettingsView = ({css={{position: "relative",height: theme.spacing[13],- px: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,outline: "none","&:focus-visible, &:hover": {background: theme.colors.backgroundHover,@@ -93,7 +93,7 @@ export const ProjectSettingsView = ({</Flex></List><ScrollArea>- <Grid gap={2} css={{ my: theme.spacing[5] }}>+ <Grid gap={2} css={{ py: theme.spacing[5] }}>{currentSection === "general" && <SectionGeneral />}{currentSection === "redirects" && <SectionRedirects />}{currentSection === "publish" && <SectionPublish />}diff --git a/apps/builder/app/builder/features/project-settings/utils.ts b/apps/builder/app/builder/features/project-settings/utils.tsindex 7149402502..34fbcf80af 100644--- a/apps/builder/app/builder/features/project-settings/utils.ts+++ b/apps/builder/app/builder/features/project-settings/utils.ts@@ -3,6 +3,5 @@ import { theme, type CSS } from "@webstudio-is/design-system";export const leftPanelWidth = theme.spacing[26];export const rightPanelWidth = theme.spacing[35];export const sectionSpacing: CSS = {- mx: theme.spacing[5],- px: theme.spacing[5],+ paddingInline: theme.panel.paddingInline,};diff --git a/apps/builder/app/builder/features/settings-panel/settings-panel.tsx b/apps/builder/app/builder/features/settings-panel/settings-panel.tsxindex 27967bf382..b57b8622fa 100644--- a/apps/builder/app/builder/features/settings-panel/settings-panel.tsx+++ b/apps/builder/app/builder/features/settings-panel/settings-panel.tsx@@ -3,11 +3,13 @@ import { SettingsSection } from "./settings-section";import { PropsSectionContainer } from "./props-section/props-section";import { VariablesSection } from "./variables-section";import {+ Box,Flex,Link,PanelBanner,Text,rawTheme,+ theme,} from "@webstudio-is/design-system";import { UpgradeIcon } from "@webstudio-is/icons";import { useStore } from "@nanostores/react";@@ -21,7 +23,7 @@ export const SettingsPanelContainer = ({}) => {const { allowDynamicData } = useStore($userPlanFeatures);return (- <>+ <Box css={{ pt: theme.spacing[5] }}><SettingsSection /><PropsSectionContainer selectedInstance={selectedInstance} /><VariablesSection />@@ -50,6 +52,6 @@ export const SettingsPanelContainer = ({</Flex></PanelBanner>)}- </>+ </Box>);};diff --git a/apps/builder/app/builder/features/settings-panel/settings-section.tsx b/apps/builder/app/builder/features/settings-panel/settings-section.tsxindex d4728d28db..622cd16eaf 100644--- a/apps/builder/app/builder/features/settings-panel/settings-section.tsx+++ b/apps/builder/app/builder/features/settings-panel/settings-section.tsx@@ -30,12 +30,12 @@ export const SettingsSection = () => {});if (selectedInstance === undefined) {- return null;+ return;}const meta = metas.get(selectedInstance.component);if (meta === undefined) {- return null;+ return;}const placeholder = getInstanceLabel(selectedInstance, meta);diff --git a/apps/builder/app/builder/features/settings-panel/shared.tsx b/apps/builder/app/builder/features/settings-panel/shared.tsxindex f033f1392a..631b15b795 100644--- a/apps/builder/app/builder/features/settings-panel/shared.tsx+++ b/apps/builder/app/builder/features/settings-panel/shared.tsx@@ -266,7 +266,7 @@ export const HorizontalLayout = ({gridTemplateColumns: deletable? `${theme.spacing[19]} 1fr max-content`: `${theme.spacing[19]} 1fr`,- minHeight: theme.spacing[13],+ minHeight: theme.spacing[12],}}align="center"gap="2"@@ -303,7 +303,10 @@ export const Row = ({children,css,}: Pick<ComponentProps<typeof Flex>, "css" | "children">) => (- <Flex css={{ px: theme.spacing[9], ...css }} direction="column">+ <Flex+ css={{ paddingInline: theme.panel.paddingInline, ...css }}+ direction="column"+ >{children}</Flex>);diff --git a/apps/builder/app/builder/features/settings-panel/variable-popover.tsx b/apps/builder/app/builder/features/settings-panel/variable-popover.tsxindex 08f580131c..244d7ceda7 100644--- a/apps/builder/app/builder/features/settings-panel/variable-popover.tsx+++ b/apps/builder/app/builder/features/settings-panel/variable-popover.tsx@@ -674,8 +674,8 @@ export const VariablePopoverTrigger = forwardRef<direction="column"css={{overflow: "hidden",- gap: theme.spacing[9],- p: theme.spacing[9],+ gap: theme.spacing[7],+ p: theme.panel.padding,}}>{requiresUpgrade && (diff --git a/apps/builder/app/builder/features/settings-panel/variables-section.tsx b/apps/builder/app/builder/features/settings-panel/variables-section.tsxindex 60c71c593f..ac8186efa4 100644--- a/apps/builder/app/builder/features/settings-panel/variables-section.tsx+++ b/apps/builder/app/builder/features/settings-panel/variables-section.tsx@@ -162,14 +162,14 @@ const deleteVariable = (variableId: DataSource["id"]) => {const EmptyVariables = () => {return (- <Flex direction="column" css={{ gap: theme.spacing[5] }}>- <Flex justify="center" align="center" css={{ height: theme.spacing[13] }}>+ <Flex direction="column" gap="2">+ <Flex justify="center" align="center"><Text variant="labelsSentenceCase" align="center">No data variables created<br /> on this instance</Text></Flex>- <Flex justify="center" align="center" css={{ height: theme.spacing[13] }}>+ <Flex justify="center" align="center"><VariablePopoverTrigger><Button prefix={<PlusIcon />}>Create data variable</Button></VariablePopoverTrigger>diff --git a/apps/builder/app/builder/features/sidebar-left/panels/components/components.tsx b/apps/builder/app/builder/features/sidebar-left/panels/components/components.tsxindex fae44d56ed..255161704d 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/components/components.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/components/components.tsx@@ -18,6 +18,7 @@ import {Text,Box,Kbd,+ Grid,} from "@webstudio-is/design-system";import { PlusIcon } from "@webstudio-is/icons";import { CollapsibleSection } from "~/builder/shared/collapsible-section";@@ -231,7 +232,7 @@ export const TabContent = ({ publish, onSetActiveTab }: TabContentProps) => {title="Components"suffix={<CloseButton onClick={() => onSetActiveTab("none")} />}/>- <Box css={{ padding: theme.spacing[9] }}>+ <Box css={{ padding: theme.panel.padding }}><SearchField{...searchFieldProps}autoFocus@@ -249,10 +250,13 @@ export const TabContent = ({ publish, onSetActiveTab }: TabContentProps) => {fullWidth><List asChild>- <Flex- gap="2"- wrap="wrap"- css={{ px: theme.spacing[9], overflow: "auto" }}+ <Grid+ gap="1"+ columns="3"+ css={{+ paddingInline: theme.panel.paddingInline,+ overflow: "auto",+ }}>{group.metas.map((meta: WsComponentMeta, index) => {const component = componentNamesByMeta.get(meta);@@ -293,7 +297,7 @@ export const TabContent = ({ publish, onSetActiveTab }: TabContentProps) => {<Text>No matching component</Text></Flex>)}- </Flex>+ </Grid></List></CollapsibleSection>))}diff --git a/apps/builder/app/builder/features/sidebar-left/panels/components/use-draggable.tsx b/apps/builder/app/builder/features/sidebar-left/panels/components/use-draggable.tsxindex c6fdbfc1b4..db6eb6ebfd 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/components/use-draggable.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/components/use-draggable.tsx@@ -9,6 +9,7 @@ import {useDrag,ComponentCard,useDisableCanvasPointerEvents,+ rawTheme,} from "@webstudio-is/design-system";import { $registeredComponentMetas } from "~/shared/nano-states";import { useSubscribe, type Publish } from "~/shared/pubsub";@@ -44,6 +45,8 @@ const DragLayer = ({icon={<MetaIcon size="auto" icon={meta.icon} />}style={{transform: `translate3d(${point.x}px, ${point.y}px, 0)`,+ width: rawTheme.spacing[20],+ height: rawTheme.spacing[20],}}/></Flex>,diff --git a/apps/builder/app/builder/features/sidebar-left/panels/marketplace/card.tsx b/apps/builder/app/builder/features/sidebar-left/panels/marketplace/card.tsxindex 4385064843..65a9bccd18 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/marketplace/card.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/marketplace/card.tsx@@ -112,8 +112,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(direction="column"data-state={state}css={{- px: theme.spacing[9],- py: theme.spacing[5],+ padding: theme.panel.padding,position: "relative",overflow: "hidden",outline: "none",diff --git a/apps/builder/app/builder/features/sidebar-left/panels/marketplace/templates.tsx b/apps/builder/app/builder/features/sidebar-left/panels/marketplace/templates.tsxindex 9a4f687484..0295dd137f 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/marketplace/templates.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/marketplace/templates.tsx@@ -133,7 +133,7 @@ export const Templates = ({align="center"shrink="false"justify="between"- css={{ px: theme.spacing[9], py: theme.spacing[5] }}+ css={{ padding: theme.panel.padding }}gap="3"><Buttondiff --git a/apps/builder/app/builder/features/sidebar-left/panels/navigator/css-preview.tsx b/apps/builder/app/builder/features/sidebar-left/panels/navigator/css-preview.tsxindex 86f66af8bf..1cd99f8193 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/navigator/css-preview.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/navigator/css-preview.tsx@@ -104,7 +104,7 @@ export const CssPreview = () => {return (<CollapsibleSection label="CSS Preview" fullWidth>- <ScrollArea css={{ px: theme.spacing[9] }}>+ <ScrollArea css={{ padding: theme.panel.padding }}><pre tabIndex={0} className={preStyle()}><divclassName="language-css"diff --git a/apps/builder/app/builder/features/sidebar-left/panels/navigator/navigator-tree.tsx b/apps/builder/app/builder/features/sidebar-left/panels/navigator/navigator-tree.tsxindex 4eed08c82d..e6281874d1 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/navigator/navigator-tree.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/navigator/navigator-tree.tsx@@ -294,7 +294,7 @@ const EditableTreeNodeLabel = styled("div", {background: theme.colors.backgroundControls,padding: theme.spacing[3],borderRadius: theme.spacing[3],- color: theme.colors.hiContrast,+ color: theme.colors.foregroundMain,outline: "none",cursor: "auto",textOverflow: "clip",diff --git a/apps/builder/app/builder/features/sidebar-left/panels/pages/folder-settings.tsx b/apps/builder/app/builder/features/sidebar-left/panels/pages/folder-settings.tsxindex 6486103a50..991d31d4ea 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/pages/folder-settings.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/pages/folder-settings.tsx@@ -143,7 +143,7 @@ const FormFields = ({return (<Grid css={{ height: "100%" }}><ScrollArea>- <Grid gap={3} css={{ my: theme.spacing[5], mx: theme.spacing[8] }}>+ <Grid gap={3} css={{ padding: theme.panel.padding }}><Grid gap={1}><Label htmlFor={fieldIds.name}>Folder Name</Label><InputErrorsTooltip errors={errors.name}>@@ -542,7 +542,7 @@ const DeleteConfirmationDialog = ({}}><DialogContent>- <Flex gap="3" direction="column" css={{ padding: theme.spacing[9] }}>+ <Flex gap="3" direction="column" css={{ padding: theme.panel.padding }}><Text>{`Delete folder "${folder.name}" including all of its pages?`}</Text><Flex direction="rowReverse" gap="2"><DialogClose asChild>diff --git a/apps/builder/app/builder/features/sidebar-left/panels/pages/page-settings.tsx b/apps/builder/app/builder/features/sidebar-left/panels/pages/page-settings.tsxindex 648fbec1e4..81016cbd21 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/pages/page-settings.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/pages/page-settings.tsx@@ -613,7 +613,7 @@ const MarketplaceSection = ({const thumbnailAsset = assets.get(values.marketplaceThumbnailAssetId);const thumnailFallbackAsset = assets.get(values.socialImageAssetId);return (- <Grid gap={2} css={{ py: theme.spacing[5], px: theme.spacing[8] }}>+ <Grid gap={2} css={{ padding: theme.panel.padding }}><Label text="title">Marketplace</Label><Gridflow="column"@@ -735,7 +735,7 @@ const FormFields = ({{/*** ----------------------========<<<Page props>>>>========----------------------*/}- <Grid gap={2} css={{ my: theme.spacing[5], mx: theme.spacing[8] }}>+ <Grid gap={2} css={{ padding: theme.panel.padding }}><Grid gap={1}><Label htmlFor={fieldIds.name}>Page Name</Label><InputErrorsTooltip errors={errors.name}>diff --git a/apps/builder/app/builder/features/sidebar-left/shared/extended-panel.tsx b/apps/builder/app/builder/features/sidebar-left/shared/extended-panel.tsxindex 6e5f633363..4f3257c4ea 100644--- a/apps/builder/app/builder/features/sidebar-left/shared/extended-panel.tsx+++ b/apps/builder/app/builder/features/sidebar-left/shared/extended-panel.tsx@@ -39,7 +39,7 @@ export const ExtendedPanel = ({height: "100%",width: theme.spacing[35],background: theme.colors.backgroundPanel,- borderRight: `1px solid ${theme.colors.slate7}`,+ borderRight: `1px solid ${theme.colors.borderMain}`,}}><BindingPopoverProviderdiff --git a/apps/builder/app/builder/features/style-panel/controls/toggle-group/toggle-group-control.tsx b/apps/builder/app/builder/features/style-panel/controls/toggle-group/toggle-group-control.tsxindex 657e5e4ff7..26bfd53b67 100644--- a/apps/builder/app/builder/features/style-panel/controls/toggle-group/toggle-group-control.tsx+++ b/apps/builder/app/builder/features/style-panel/controls/toggle-group/toggle-group-control.tsx@@ -135,7 +135,6 @@ export const ToggleGroupControl = ({}batch.publish();}}- css={{ width: "fit-content" }}>{items.map((item) => (<ToggleGroupTooltipdiff --git a/apps/builder/app/builder/features/style-panel/sections/advanced/advanced.tsx b/apps/builder/app/builder/features/style-panel/sections/advanced/advanced.tsxindex 89ecbb2613..86bae276c8 100644--- a/apps/builder/app/builder/features/style-panel/sections/advanced/advanced.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/advanced/advanced.tsx@@ -324,13 +324,11 @@ const AdvancedPropertyValue = ({<CssValueInputContainerinputRef={inputRef}variant="chromeless"- size="2"text="mono"fieldSizing="content"prefix={isColor && (<ColorPopover- size={1}value={styleDecl.usedValue}onChange={(styleValue) => {const options = { isEphemeral: true, listed: true };diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-content.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-content.tsxindex 9cdc0d4ad2..f615578f0d 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-content.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-content.tsx@@ -52,10 +52,7 @@ const isImageOrGradient = (value: string): value is "image" | "gradient" => {return value === "image" || value === "gradient";};-const BackgroundSection = styled("div", {- mx: theme.spacing[9],- my: theme.spacing[6],-});+const BackgroundSection = styled("div", { padding: theme.panel.padding });const Spacer = styled("div", {height: theme.spacing[5],diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-gradient.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-gradient.tsxindex 3ab4eb7552..838e79a9e1 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-gradient.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-gradient.tsx@@ -110,9 +110,8 @@ export const BackgroundGradient = ({ index }: { index: number }) => {direction="column"css={{gridColumn: "span 2",- px: theme.spacing[9],- paddingTop: theme.spacing[5],- paddingBottom: theme.spacing[9],+ px: theme.spacing[5],+ py: theme.spacing[5],gap: theme.spacing[3],}}>diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-image.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-image.tsxindex b01626f07e..daea425a68 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-image.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-image.tsx@@ -166,9 +166,7 @@ export const BackgroundImage = ({ index }: { index: number }) => {direction="column"css={{gridColumn: "span 2",- px: theme.spacing[9],- paddingTop: theme.spacing[5],- paddingBottom: theme.spacing[9],+ padding: theme.panel.padding,gap: theme.spacing[3],}}>diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-thumbnail.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-thumbnail.tsxindex ce87eff7eb..22f4e2d055 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-thumbnail.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-thumbnail.tsx@@ -25,11 +25,13 @@ export const repeatedProperties = ["backgroundBlendMode",] satisfies [StyleProperty, ...StyleProperty[]];+const thumbSize = theme.spacing[9];+const Thumbnail = styled("div", {borderRadius: 2,borderWidth: 0,- width: theme.spacing[10],- height: theme.spacing[10],+ width: thumbSize,+ height: thumbSize,});const NoneThumbnail = styled(Thumbnail, {@@ -39,8 +41,8 @@ const NoneThumbnail = styled(Thumbnail, {const StyledWebstudioImage = styled(WebstudioImage, {position: "relative",- width: theme.spacing[10],- height: theme.spacing[10],+ width: thumbSize,+ height: thumbSize,objectFit: "contain",// This is shown only if an image was not loaded and broken@@ -131,7 +133,7 @@ export const BackgroundThumbnail = ({ index }: { index: number }) => {key={asset.id}loader={imageLoader}src={asset.name}- width={theme.spacing[10]}+ width={thumbSize}optimize={true}/>);@@ -146,7 +148,7 @@ export const BackgroundThumbnail = ({ index }: { index: number }) => {key={backgroundImageValue.value.url}loader={imageLoader}src={backgroundImageValue.value.url}- width={theme.spacing[10]}+ width={thumbSize}optimize={true}/>);diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx b/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsxindex 3f8ed8fc80..5055d648d4 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/backgrounds.tsx@@ -49,7 +49,7 @@ export const Section = () => {/><Gridcss={{- px: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,gridTemplateColumns: `1fr ${theme.spacing[23]}`,}}>diff --git a/apps/builder/app/builder/features/style-panel/sections/borders/border-style.tsx b/apps/builder/app/builder/features/style-panel/sections/borders/border-style.tsxindex 2c303305bb..dd2e0e8f12 100644--- a/apps/builder/app/builder/features/style-panel/sections/borders/border-style.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/borders/border-style.tsx@@ -29,7 +29,7 @@ export const BorderStyle = () => {description={propertyDescriptions.borderBlockStyle}properties={properties}/>- <Box css={{ gridColumn: `span 2`, justifySelf: "end" }}>+ <Box css={{ gridColumn: `span 2` }}><ToggleGroupControllabel="Style"properties={properties}diff --git a/apps/builder/app/builder/features/style-panel/sections/borders/utils.ts b/apps/builder/app/builder/features/style-panel/sections/borders/utils.tsindex c4e2b4c8d0..1ef99743c7 100644--- a/apps/builder/app/builder/features/style-panel/sections/borders/utils.ts+++ b/apps/builder/app/builder/features/style-panel/sections/borders/utils.ts@@ -4,6 +4,6 @@ export const rowCss: CSS = {// Our aim is to maintain consistent styling throughout the property and align// the input fields on the left-hand side// See ./border-property.tsx for more details- gridTemplateColumns: `1fr ${theme.spacing[20]} ${theme.spacing[12]}`,- gap: theme.spacing[5],+ gridTemplateColumns: `1fr ${theme.spacing[21]} ${theme.spacing[10]}`,+ gap: theme.spacing[3],};diff --git a/apps/builder/app/builder/features/style-panel/sections/flex-child/flex-child.tsx b/apps/builder/app/builder/features/style-panel/sections/flex-child/flex-child.tsxindex 1d361b09ce..5b432bafb0 100644--- a/apps/builder/app/builder/features/style-panel/sections/flex-child/flex-child.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/flex-child/flex-child.tsx@@ -253,10 +253,10 @@ const FlexChildSectionSizingPopover = () => {title="Sizing"content={<Grid+ gap="3"css={{gridTemplateColumns: "1fr 1fr 1.5fr",- gap: theme.spacing[9],- padding: theme.spacing[9],+ padding: theme.panel.padding,}}><Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}>@@ -390,7 +390,7 @@ const FlexChildSectionOrderPopover = () => {<FloatingPaneltitle="Order"content={- <Grid css={{ padding: theme.spacing[9] }}>+ <Grid css={{ padding: theme.panel.padding }}><Grid css={{ gridTemplateColumns: "4fr 6fr" }} gap={2}><PropertyLabellabel="Order"diff --git a/apps/builder/app/builder/features/style-panel/sections/layout/layout.tsx b/apps/builder/app/builder/features/style-panel/sections/layout/layout.tsxindex 6fa5a94b97..05a8021b4f 100644--- a/apps/builder/app/builder/features/style-panel/sections/layout/layout.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/layout/layout.tsx@@ -214,7 +214,6 @@ const FlexGap = () => {"columnGap linked rowGap"`,alignItems: "center",- height: theme.spacing[13],}}><Box css={{ gridArea: "columnGap" }}>@@ -490,7 +489,6 @@ export const Section = () => {<Gridcss={{gridTemplateColumns: `1fr ${theme.spacing[24]}`,- height: theme.spacing[13],alignItems: "center",}}>diff --git a/apps/builder/app/builder/features/style-panel/sections/layout/shared/flex-grid.tsx b/apps/builder/app/builder/features/style-panel/sections/layout/shared/flex-grid.tsxindex f2720fc502..40ac287438 100644--- a/apps/builder/app/builder/features/style-panel/sections/layout/shared/flex-grid.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/layout/shared/flex-grid.tsx@@ -49,14 +49,19 @@ export const FlexGrid = () => {flexDirectionValue === "column" || flexDirectionValue === "column-reverse";let color = theme.colors.foregroundFlexUiMain;+ let borderColor = theme.colors.foregroundFlexUiMain;+if (styleValueSourceColor === "local") {- color = theme.colors.borderLocalFlexUi;+ borderColor = theme.colors.borderLocalMain;+ color = theme.colors.foregroundLocalFlexUi;}if (styleValueSourceColor === "overwritten") {- color = theme.colors.borderOverwrittenFlexUi;+ borderColor = theme.colors.borderOverwrittenFlexUi;+ color = theme.colors.foregroundOverwrittenFlexUi;}if (styleValueSourceColor === "remote") {- color = theme.colors.borderRemoteFlexUi;+ borderColor = theme.colors.borderRemoteFlexUi;+ color = theme.colors.foregroundRemoteFlexUi;}const addjustLinesPadding = (padding: number | undefined) => {@@ -72,12 +77,9 @@ export const FlexGrid = () => {<GridtabIndex={0}css={{- width: 72,- height: 72,- padding: theme.spacing[4],+ padding: theme.spacing[2],borderRadius: theme.borderRadius[4],- outline: "none",- border: `1px solid ${color}`,+ outline: `1px solid ${borderColor}`,background: theme.colors.backgroundControls,alignItems: "center",gap: 0,@@ -85,7 +87,7 @@ export const FlexGrid = () => {gridTemplateRows: "repeat(3, 1fr)",color,"&:focus-within": {- borderColor: theme.colors.borderLocalFlexUi,+ outlineColor: theme.colors.borderLocalFlexUi,},}}>@@ -113,12 +115,12 @@ export const FlexGrid = () => {<IconButtontabIndex={-1}css={{- width: "100%",- height: "100%",+ width: "90%",+ height: "90%",color: theme.colors.foregroundFlexUiMain,"&:hover": {// @todo not clear which token to use here- background: theme.colors.slate4,+ background: theme.colors.backgroundHover,},"&:focus": {background: "none",@@ -174,15 +176,15 @@ export const FlexGrid = () => {),}}>- {[11, 16, 9].map((size) => (+ {[7, 12, 5].map((size) => (<Boxkey={size}css={{borderRadius: theme.borderRadius[1],backgroundColor: "currentColor",...(isFlexDirectionColumn- ? { minWidth: size, minHeight: 4 }- : { minWidth: 4, minHeight: size }),+ ? { minWidth: size, minHeight: 3 }+ : { minWidth: 3, minHeight: size }),}}/>))}diff --git a/apps/builder/app/builder/features/style-panel/sections/outline/outline.tsx b/apps/builder/app/builder/features/style-panel/sections/outline/outline.tsxindex 6c2e43d4b8..6725051654 100644--- a/apps/builder/app/builder/features/style-panel/sections/outline/outline.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/outline/outline.tsx@@ -1,4 +1,4 @@-import { theme, Grid, Box } from "@webstudio-is/design-system";+import { Grid, theme } from "@webstudio-is/design-system";import {DashBorderIcon,DashedBorderIcon,@@ -28,8 +28,7 @@ export const Section = () => {<StyleSection label="Outline" properties={properties}><Gridcss={{- // label gap (input gap expand)- gridTemplateColumns: `1fr calc(${theme.spacing[20]} + ${theme.spacing[5]} + ${theme.spacing[12]})`,+ gridTemplateColumns: `1fr ${theme.spacing[22]}`,}}gap={2}>@@ -38,18 +37,16 @@ export const Section = () => {description={propertyDescriptions.outlineStyle}properties={["outlineStyle"]}/>- <Box css={{ justifySelf: "end" }}>- <ToggleGroupControl- label="Style"- properties={["outlineStyle"]}- items={[- { child: <SmallXIcon />, value: "none" },- { child: <DashBorderIcon />, value: "solid" },- { child: <DashedBorderIcon />, value: "dashed" },- { child: <DottedBorderIcon />, value: "dotted" },- ]}- />- </Box>+ <ToggleGroupControl+ label="Style"+ properties={["outlineStyle"]}+ items={[+ { child: <SmallXIcon />, value: "none" },+ { child: <DashBorderIcon />, value: "solid" },+ { child: <DashedBorderIcon />, value: "dashed" },+ { child: <DottedBorderIcon />, value: "dotted" },+ ]}+ />{outlineStyleValue !== "none" && (<>diff --git a/apps/builder/app/builder/features/style-panel/sections/position/inset-control.tsx b/apps/builder/app/builder/features/style-panel/sections/position/inset-control.tsxindex 722f9c6efd..505ec0e3b7 100644--- a/apps/builder/app/builder/features/style-panel/sections/position/inset-control.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/position/inset-control.tsx@@ -127,7 +127,7 @@ export const InsetControl = () => {height: theme.spacing[18],"&:focus-visible": {borderRadius: theme.borderRadius[3],- outline: `1px solid ${theme.colors.blue10}`,+ outline: `1px solid ${theme.colors.backgroundPrimary}`,outlineOffset: -1,},}}diff --git a/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx b/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsxindex 9c41d3fc78..49525f0c49 100644--- a/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx@@ -107,9 +107,9 @@ const PopoverContentStyled = styled(PopoverContent, {minWidth: 0,minHeight: 0,width: theme.spacing[20],- border: `1px solid ${theme.colors.slate8}`,+ border: `1px solid ${theme.colors.borderMain}`,borderRadius: theme.borderRadius[7],- background: theme.colors.gray2,+ background: theme.colors.backgroundPanel,padding: theme.spacing[5],boxShadow: theme.shadows.menuDropShadow,animationDuration: "200ms",diff --git a/apps/builder/app/builder/features/style-panel/sections/shared/value-text.tsx b/apps/builder/app/builder/features/style-panel/sections/shared/value-text.tsxindex 7d83df2efa..783909db06 100644--- a/apps/builder/app/builder/features/style-panel/sections/shared/value-text.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/shared/value-text.tsx@@ -45,7 +45,7 @@ const Container = styled("button", {},},compoundVariants: [- { source: "default", css: { color: theme.colors.slate12 } },+ { source: "default", css: { color: theme.colors.foregroundTextSubtle } },],});diff --git a/apps/builder/app/builder/features/style-panel/sections/size/size.tsx b/apps/builder/app/builder/features/style-panel/sections/size/size.tsxindex c480f01bb9..ba944b5e1c 100644--- a/apps/builder/app/builder/features/style-panel/sections/size/size.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/size/size.tsx@@ -46,7 +46,7 @@ const ObjectPosition = () => {<FloatingPaneltitle="Object Position"content={- <Flex css={{ px: theme.spacing[9], py: theme.spacing[5] }}>+ <Flex css={{ padding: theme.panel.padding }}><PositionControl property="objectPosition" styleDecl={styleDecl} /></Flex>}@@ -84,7 +84,7 @@ export const properties = [const SectionLayout = styled(Grid, {columnGap: theme.spacing[5],rowGap: theme.spacing[5],- px: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,});export const Section = () => {diff --git a/apps/builder/app/builder/features/style-panel/sections/space/layout.tsx b/apps/builder/app/builder/features/style-panel/sections/space/layout.tsxindex 3fe6ffb296..3d29d2a613 100644--- a/apps/builder/app/builder/features/style-panel/sections/space/layout.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/space/layout.tsx@@ -5,7 +5,7 @@ import type { HoverTarget, SpaceStyleProperty } from "./types";import { spaceProperties } from "./properties";import { theme } from "@webstudio-is/design-system";-const VALUE_WIDTH = 34;+const VALUE_WIDTH = 36;const VALUE_HEIGHT = 24;const BORDER = 1;@@ -41,15 +41,21 @@ const emulateInnerStroke = ({});const ValueArea = styled("path", {- fill: theme.colors.slate2,+ fill: theme.colors.backgroundPanel,variants: {side: {top: { cursor: "n-resize" },bottom: { cursor: "s-resize" },- right: { cursor: "e-resize", fill: theme.colors.slate3 },- left: { cursor: "w-resize", fill: theme.colors.slate3 },+ right: {+ cursor: "e-resize",+ fill: theme.colors.backgroundSpacingLeftRight,+ },+ left: {+ cursor: "w-resize",+ fill: theme.colors.backgroundSpacingLeftRight,+ },},- isActive: { true: { fill: theme.colors.slate5 } },+ isActive: { true: { fill: theme.colors.backgroundSpacingHover } },},});@@ -66,7 +72,7 @@ const OuterRect = styled({...props}/>),- { stroke: theme.colors.slate8 }+ { stroke: theme.colors.borderMain });const InnerOuterRect = styled(@@ -86,7 +92,7 @@ const InnerOuterRect = styled(/>);},- { stroke: theme.colors.slate8, fill: theme.colors.loContrast }+ { stroke: theme.colors.borderMain, fill: theme.colors.backgroundControls });const InnerRect = styled(@@ -102,7 +108,7 @@ const InnerRect = styled({...props}/>),- { stroke: theme.colors.slate8 }+ { stroke: theme.colors.borderMain });const MostInnerRect = styled(@@ -120,7 +126,7 @@ const MostInnerRect = styled(/>);},- { stroke: theme.colors.slate8, fill: theme.colors.loContrast }+ { stroke: theme.colors.borderMain, fill: theme.colors.backgroundControls });const gap = `${INNER_MARGIN + BORDER}px`;@@ -176,7 +182,7 @@ const Cell = styled("div", {});const Label = styled("div", {- color: theme.colors.slate11,+ color: theme.colors.foregroundTextSubtle,textTransform: "uppercase",fontSize: theme.deprecatedFontSize[1],lineHeight: 1,diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsxindex 9f9ea06367..7945012fc2 100644--- a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsx@@ -207,7 +207,7 @@ export const ScalePanelContent = () => {</Flex><Flexdirection="column"- css={{ paddingLeft: theme.spacing[5], marginTop: theme.spacing[3] }}+ css={{ paddingLeft: theme.spacing[3], width: theme.spacing[11] }}><Box css={{ rotate: "90deg" }}><BorderRadiusIcon size="12" />diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsxindex 950cb3ae3e..6aee10cf8e 100644--- a/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsx@@ -110,13 +110,7 @@ const TransformAdvancedPopover = () => {<FloatingPaneltitle="Advanced Transform"content={- <Grid- css={{- p: theme.spacing[9],- gap: theme.spacing[6],- width: theme.spacing[30],- }}- >+ <Grid gap="2" css={{ padding: theme.panel.padding }}><Grid css={{ gridTemplateColumns: `2fr 1fr` }}><PropertyLabellabel="Backface Visibility"@@ -164,7 +158,7 @@ export const Section = () => {<SectionTitledots={getDots(styles)}suffix={- <Flex gap={1}>+ <Flex gap="1" align="center"><TransformAdvancedPopover /><DropdownMenu><DropdownMenuTrigger asChild>@@ -250,7 +244,7 @@ const TransformSection = ({<FloatingPaneltitle={humanizeString(panel)}content={- <Flex direction="column" css={{ p: theme.spacing[9] }}>+ <Flex direction="column" css={{ padding: theme.panel.padding }}>{panel === "translate" && <TranslatePanelContent />}{panel === "scale" && <ScalePanelContent />}{panel === "rotate" && <RotatePanelContent />}diff --git a/apps/builder/app/builder/features/style-panel/sections/transitions/transition-content.tsx b/apps/builder/app/builder/features/style-panel/sections/transitions/transition-content.tsxindex 8956e8c760..792dea6bca 100644--- a/apps/builder/app/builder/features/style-panel/sections/transitions/transition-content.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/transitions/transition-content.tsx@@ -113,8 +113,7 @@ export const TransitionContent = ({ index }: { index: number }) => {<Gridgap="2"css={{- px: theme.spacing[9],- py: theme.spacing[5],+ padding: theme.panel.padding,gridTemplateColumns: `1fr ${theme.spacing[23]}`,gridTemplateRows: theme.spacing[13],}}@@ -226,9 +225,7 @@ export const TransitionContent = ({ index }: { index: number }) => {<Flexdirection="column"css={{- px: theme.spacing[9],- paddingTop: theme.spacing[5],- paddingBottom: theme.spacing[9],+ padding: theme.panel.padding,gap: theme.spacing[3],minWidth: theme.spacing[30],}}diff --git a/apps/builder/app/builder/features/style-panel/sections/typography/typography.tsx b/apps/builder/app/builder/features/style-panel/sections/typography/typography.tsxindex d526709819..09047200a8 100644--- a/apps/builder/app/builder/features/style-panel/sections/typography/typography.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/typography/typography.tsx@@ -137,7 +137,7 @@ const TypographySectionSizing = () => {const TypographySectionAdvanced = () => {return (- <Grid gap="2" columns="2" align="end">+ <Grid gap="2" columns="2"><ToggleGroupControlproperties={["textAlign"]}items={[@@ -281,7 +281,7 @@ const TypographySectionAdvancedPopover = () => {content={<Gridcss={{- padding: theme.spacing[9],+ padding: theme.panel.padding,gap: theme.spacing[9],width: theme.spacing[30],}}diff --git a/apps/builder/app/builder/features/style-panel/shared/color-picker.tsx b/apps/builder/app/builder/features/style-panel/shared/color-picker.tsxindex ec86391fcb..8503fb6564 100644--- a/apps/builder/app/builder/features/style-panel/shared/color-picker.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/color-picker.tsx@@ -178,12 +178,10 @@ type ColorPickerProps = {};export const ColorPopover = ({- size,value,onChange,onChangeComplete,}: {- size?: 1 | 2;value: StyleValue;onChange: (value: undefined | StyleValue) => void;onChangeComplete: (value: StyleValue) => void;@@ -215,7 +213,6 @@ export const ColorPopover = ({><ColorThumbcolor={styleValueToRgbaColor(value)}- size={size}css={{ margin: theme.spacing[2] }}tabIndex={-1}/>diff --git a/apps/builder/app/builder/features/style-panel/shared/color-thumb.tsx b/apps/builder/app/builder/features/style-panel/shared/color-thumb.tsxindex 711efac02f..a62866abcf 100644--- a/apps/builder/app/builder/features/style-panel/shared/color-thumb.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/color-thumb.tsx@@ -1,11 +1,6 @@import { rawTheme, theme, css, type CSS } from "@webstudio-is/design-system";import { colord, type RgbaColor } from "colord";-import {- forwardRef,- type ElementRef,- type ComponentProps,- type CSSProperties,-} from "react";+import { forwardRef, type ElementRef, type ComponentProps } from "react";import { clamp } from "~/shared/math-utils";const whiteColor: RgbaColor = { r: 255, g: 255, b: 255, a: 1 };@@ -49,12 +44,10 @@ const lerpColor = (a: RgbaColor, b: RgbaColor, t: number) => {};};-const colorThumbSize = "--color-thumb-size";-const thumbStyle = css({display: "block",- width: `var(${colorThumbSize}, 20px)`,- height: `var(${colorThumbSize}, 20px)`,+ width: theme.spacing[9],+ height: theme.spacing[9],backgroundBlendMode: "difference",borderRadius: theme.borderRadius[2],borderWidth: 0,@@ -68,11 +61,10 @@ const thumbStyle = css({type Props = Omit<ComponentProps<"button">, "color"> & {color?: RgbaColor;css?: CSS;- size?: 1 | 2;};export const ColorThumb = forwardRef<ElementRef<"button">, Props>(- ({ color = transparentColor, size = 2, css, ...rest }, ref) => {+ ({ color = transparentColor, css, ...rest }, ref) => {const background =color === undefined || color.a < 1? // Chessboard pattern 5x5@@ -89,7 +81,6 @@ export const ColorThumb = forwardRef<ElementRef<"button">, Props>(borderColor: borderColor.toRgbString(),// Border becomes visible when color is close to white so that the thumb is visible in the white input.borderWidth: borderColor.alpha() === 0 ? 0 : 1,- [colorThumbSize as keyof CSSProperties]: size === 1 ? "16px" : "20px",}}className={thumbStyle({ css })}/>diff --git a/apps/builder/app/builder/features/style-panel/shared/constants.ts b/apps/builder/app/builder/features/style-panel/shared/constants.tsdeleted file mode 100644index 6ed1460460..0000000000--- a/apps/builder/app/builder/features/style-panel/shared/constants.ts+++ /dev/null@@ -1,3 +0,0 @@-import { theme } from "@webstudio-is/design-system";-// When a style value is defined on a selected breakpoint, we want to highlight the property name with this color.-export const propertyNameColorForSelectedBreakpoint = theme.colors.blue11;diff --git a/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx b/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsxindex 8dafaf9fb1..72806cb6fb 100644--- a/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx@@ -253,7 +253,6 @@ type CssValueInputProps = Pick<| "prefix"| "inputRef"> & {- size?: "1" | "2";styleSource: StyleSource;property: StyleProperty;value: StyleValue | undefined;@@ -334,7 +333,6 @@ export const CssValueInput = ({["aria-disabled"]: ariaDisabled,fieldSizing,variant,- size,text,...props}: CssValueInputProps) => {@@ -429,7 +427,6 @@ export const CssValueInput = ({const inputProps = getInputProps();const [isUnitsOpen, unitSelectElement] = useUnitSelect({- size: size === "2" ? "1" : "2",property,value,onChange: (unitOrKeyword) => {@@ -583,7 +580,6 @@ export const CssValueInput = ({{...getToggleButtonProps()}data-state={isOpen ? "open" : "closed"}tabIndex={-1}- size={size === "2" ? "1" : "2"}/>);@@ -705,7 +701,6 @@ export const CssValueInput = ({<Box {...getComboboxProps()}><ComboboxAnchor asChild><InputField- size={size}variant={variant}disabled={disabled}aria-disabled={ariaDisabled}diff --git a/apps/builder/app/builder/features/style-panel/shared/css-value-input/unit-select.tsx b/apps/builder/app/builder/features/style-panel/shared/css-value-input/unit-select.tsxindex d56e2e2f91..998615162f 100644--- a/apps/builder/app/builder/features/style-panel/shared/css-value-input/unit-select.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/css-value-input/unit-select.tsx@@ -1,4 +1,4 @@-import { useState, useMemo, type ComponentProps } from "react";+import { useState, useMemo } from "react";import * as SelectPrimitive from "@radix-ui/react-select";import type { Unit } from "@webstudio-is/css-engine";import {@@ -25,7 +25,6 @@ export type UnitOption =type UseUnitSelectType = {property: string;value: CssValueInputValue;- size: ComponentProps<typeof NestedInputButton>["size"];onChange: (value: { type: "unit"; value: Unit } | { type: "keyword"; value: string }) => void;@@ -35,7 +34,6 @@ type UseUnitSelectType = {export const useUnitSelect = ({property,value,- size,onChange,onCloseAutoFocus,}: UseUnitSelectType): [boolean, JSX.Element | null] => {@@ -60,7 +58,6 @@ export const useUnitSelect = ({const select = (<UnitSelect- size={size}value={unitOrKeyword}label={unit ?? nestedSelectButtonUnitless}options={options}@@ -89,7 +86,6 @@ type UnitSelectProps = {onOpenChange: (open: boolean) => void;onCloseAutoFocus: (event: Event) => void;open: boolean;- size: UseUnitSelectType["size"];};const UnitSelect = ({@@ -100,7 +96,6 @@ const UnitSelect = ({onOpenChange,onCloseAutoFocus,open,- size,}: UnitSelectProps) => {return (<SelectPrimitive.Root@@ -116,7 +111,7 @@ const UnitSelect = ({open={open}><SelectPrimitive.SelectTrigger asChild>- <NestedInputButton tabIndex={-1} size={size}>+ <NestedInputButton tabIndex={-1}><SelectPrimitive.Value>{value === "number" ? nestedSelectButtonUnitless : label}</SelectPrimitive.Value>diff --git a/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx b/apps/builder/app/builder/features/style-panel/shared/filter-content.tsxindex a211ae393d..b6f5238d5e 100644--- a/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx@@ -164,12 +164,10 @@ export const FilterSectionContent = ({return (<Flex direction="column">- <Flex direction="column" css={{ px: theme.spacing[9] }}>+ <Flex direction="column" gap="2" css={{ padding: theme.panel.padding }}><Gridgap="2"css={{- marginTop: theme.spacing[5],- paddingBottom: theme.spacing[5],gridTemplateColumns: "1fr 3fr",alignItems: "center",}}@@ -189,8 +187,6 @@ export const FilterSectionContent = ({<Gridgap="2"css={{- marginTop: theme.spacing[5],- paddingBottom: theme.spacing[5],gridTemplateColumns: "1fr 3fr",alignItems: "center",}}@@ -242,9 +238,7 @@ export const FilterSectionContent = ({<Flexdirection="column"css={{- px: theme.spacing[9],- paddingTop: theme.spacing[5],- paddingBottom: theme.spacing[9],+ padding: theme.panel.padding,gap: theme.spacing[3],minWidth: theme.spacing[30],}}diff --git a/apps/builder/app/builder/features/style-panel/shared/shadow-content.tsx b/apps/builder/app/builder/features/style-panel/shared/shadow-content.tsxindex 18387cef41..d6c80c20e0 100644--- a/apps/builder/app/builder/features/style-panel/shared/shadow-content.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/shadow-content.tsx@@ -202,8 +202,7 @@ export const ShadowContent = ({<Gridgap="2"css={{- px: theme.spacing[9],- marginTop: theme.spacing[5],+ padding: theme.panel.padding,gridTemplateColumns:property === "boxShadow" ? "1fr 1fr" : "1fr 1fr 1fr",}}@@ -310,9 +309,7 @@ export const ShadowContent = ({<Gridgap="2"css={{- px: theme.spacing[9],- marginTop: theme.spacing[5],- paddingBottom: theme.spacing[5],+ padding: theme.panel.padding,...(property === "boxShadow" && { gridTemplateColumns: "3fr 1fr" }),}}>@@ -381,9 +378,7 @@ export const ShadowContent = ({<Flexdirection="column"css={{- px: theme.spacing[9],- paddingTop: theme.spacing[5],- paddingBottom: theme.spacing[9],+ padding: theme.panel.padding,gap: theme.spacing[3],minWidth: theme.spacing[30],}}diff --git a/apps/builder/app/builder/features/style-panel/style-panel.tsx b/apps/builder/app/builder/features/style-panel/style-panel.tsxindex 153be69397..6a10178d83 100644--- a/apps/builder/app/builder/features/style-panel/style-panel.tsx+++ b/apps/builder/app/builder/features/style-panel/style-panel.tsx@@ -87,8 +87,8 @@ export const StylePanel = () => {return (<>- <Box css={{ px: theme.spacing[9], pb: theme.spacing[9] }}>- <Text css={{ py: theme.spacing[7] }} variant="titles">+ <Box css={{ padding: theme.panel.padding }}>+ <Text variant="titles" css={{ paddingBlock: theme.panel.paddingBlock }}>Style Sources</Text><StyleSourcesSection />diff --git a/apps/builder/app/builder/features/style-panel/style-source-section.tsx b/apps/builder/app/builder/features/style-panel/style-source-section.tsxindex 9ed450e9d4..c95eccc5b6 100644--- a/apps/builder/app/builder/features/style-panel/style-source-section.tsx+++ b/apps/builder/app/builder/features/style-panel/style-source-section.tsx@@ -611,7 +611,7 @@ const DeleteConfirmationDialog = ({}}><DialogContent>- <Flex gap="3" direction="column" css={{ padding: theme.spacing[9] }}>+ <Flex gap="3" direction="column" css={{ padding: theme.panel.padding }}><Text>{`Delete "${token}" token from the project including all of its styles?`}</Text><Flex direction="rowReverse" gap="2"><DialogClose asChild>diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsxindex 0323440c2d..fd640991a8 100644--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx@@ -79,8 +79,8 @@ const TextFieldContainer = styled("div", {flexWrap: "wrap",alignItems: "center",backgroundColor: theme.colors.backgroundControls,- gap: theme.spacing[3],- p: theme.spacing[3],+ gap: theme.spacing[2],+ p: theme.spacing[2],borderRadius: theme.borderRadius[4],minWidth: 0,border: `1px solid ${theme.colors.borderMain}`,diff --git a/apps/builder/app/builder/features/topbar/add-domain.tsx b/apps/builder/app/builder/features/topbar/add-domain.tsxindex 269c547e3c..124b6edb09 100644--- a/apps/builder/app/builder/features/topbar/add-domain.tsx+++ b/apps/builder/app/builder/features/topbar/add-domain.tsx@@ -67,11 +67,6 @@ export const AddDomain = ({return (<><Flex- css={{- padding: theme.spacing[9],- paddingTop: isOpen ? theme.spacing[5] : theme.spacing[9],- paddingBottom: isOpen ? theme.spacing[9] : 0,- }}gap={2}shrink={false}direction={"column"}diff --git a/apps/builder/app/builder/features/topbar/collapsible-domain-section.tsx b/apps/builder/app/builder/features/topbar/collapsible-domain-section.tsxindex 717d85d6cf..0ca07c5686 100644--- a/apps/builder/app/builder/features/topbar/collapsible-domain-section.tsx+++ b/apps/builder/app/builder/features/topbar/collapsible-domain-section.tsx@@ -65,7 +65,7 @@ export const CollapsibleDomainSection = ({><Flexcss={{- mx: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,overflowWrap: "anywhere",}}gap={2}diff --git a/apps/builder/app/builder/features/topbar/publish.tsx b/apps/builder/app/builder/features/topbar/publish.tsxindex 5f68fbf050..f3c543ad66 100644--- a/apps/builder/app/builder/features/topbar/publish.tsx+++ b/apps/builder/app/builder/features/topbar/publish.tsx@@ -328,17 +328,7 @@ const Publish = ({const isPublishInProgress = isPublishing || hasPendingState;return (- <Flex- css={{- paddingLeft: theme.spacing[9],- paddingRight: theme.spacing[9],- paddingBottom: theme.spacing[9],- paddingTop: theme.spacing[5],- }}- gap={2}- shrink={false}- direction={"column"}- >+ <Flex gap={2} shrink={false} direction={"column"}>{publishError && <Text color="destructive">{publishError}</Text>}<Tooltip@@ -616,19 +606,19 @@ const Content = (props: {<Flex direction="column" justify="end" css={{ height: 0 }}><Separator /></Flex>-- <AddDomain- projectId={props.projectId}- refresh={refreshProject}- onCreate={(domain) => {- setNewDomains((prev) => {- return new Set([...prev, domain]);- });- }}- onExportClick={props.onExportClick}- />-- <Publish project={project} refresh={refreshProject} />+ <Flex direction="column" gap="2" css={{ padding: theme.panel.padding }}>+ <AddDomain+ projectId={props.projectId}+ refresh={refreshProject}+ onCreate={(domain) => {+ setNewDomains((prev) => {+ return new Set([...prev, domain]);+ });+ }}+ onExportClick={props.onExportClick}+ />+ <Publish project={project} refresh={refreshProject} />+ </Flex></form>);};@@ -668,14 +658,7 @@ const ExportContent = (props: { projectId: Project["id"] }) => {const [deployTarget, setDeployTarget] = useState<DeployTargets>("vanilla");return (- <Grid- columns={1}- gap={3}- css={{- margin: theme.spacing[9],- marginTop: theme.spacing[5],- }}- >+ <Grid columns={1} gap={3} css={{ padding: theme.panel.padding }}><Grid columns={1} gap={2}><div /><Grid columns={2} gap={2} align={"center"}>diff --git a/apps/builder/app/builder/features/topbar/topbar.tsx b/apps/builder/app/builder/features/topbar/topbar.tsxindex 4557283b83..79b4ed780d 100644--- a/apps/builder/app/builder/features/topbar/topbar.tsx+++ b/apps/builder/app/builder/features/topbar/topbar.tsx@@ -45,7 +45,7 @@ const PagesButton = () => {><ToolbarButtoncss={{- px: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,maxWidth: theme.spacing[24],}}aria-label="Toggle Pages"@@ -66,8 +66,7 @@ const topbarContainerStyle = css({display: "flex",background: theme.colors.backgroundTopbar,height: theme.spacing[15],- boxShadow: `inset 0 -1px 0 0 ${theme.colors.panelOutline}`,- paddingRight: theme.spacing[9],+ paddingRight: theme.panel.paddingInline,color: theme.colors.foregroundContrastMain,});diff --git a/apps/builder/app/builder/features/topbar/view-mode.tsx b/apps/builder/app/builder/features/topbar/view-mode.tsxindex 1e7088dff5..fef5e4b707 100644--- a/apps/builder/app/builder/features/topbar/view-mode.tsx+++ b/apps/builder/app/builder/features/topbar/view-mode.tsx@@ -18,7 +18,7 @@ export const ViewMode = () => {css={{ height: theme.spacing["15"] }}><CloudIcon- color={rawTheme.colors.yellow10}+ color={rawTheme.colors.backgroundAlertMain}aria-label="View mode. Your changes will not be saved"/></Flex>diff --git a/apps/builder/app/builder/features/workspace/canvas-tools/text-toolbar.tsx b/apps/builder/app/builder/features/workspace/canvas-tools/text-toolbar.tsxindex f1117e6463..a4c015f67e 100644--- a/apps/builder/app/builder/features/workspace/canvas-tools/text-toolbar.tsx+++ b/apps/builder/app/builder/features/workspace/canvas-tools/text-toolbar.tsx@@ -113,7 +113,7 @@ const Toolbar = ({ state, scale }: ToolbarProps) => {background: theme.colors.backgroundPanel,padding: theme.spacing[3],borderRadius: theme.borderRadius[6],- border: `1px solid ${theme.colors.slate8}`,+ border: `1px solid ${theme.colors.borderMain}`,filter:"drop-shadow(0px 2px 7px rgba(0, 0, 0, 0.1)) drop-shadow(0px 5px 17px rgba(0, 0, 0, 0.15))",}}diff --git a/apps/builder/app/builder/shared/assets/assets-shell.tsx b/apps/builder/app/builder/shared/assets/assets-shell.tsxindex d3d1cf8d43..59e2b00556 100644--- a/apps/builder/app/builder/shared/assets/assets-shell.tsx+++ b/apps/builder/app/builder/shared/assets/assets-shell.tsx@@ -153,13 +153,13 @@ export const AssetsShell = ({direction="column"css={{overflow: "hidden",- py: theme.spacing[5],+ paddingBlock: theme.panel.paddingBlock,flex: 1,position: "relative",}}><Flex- css={{ py: theme.spacing[5], px: theme.spacing[9] }}+ css={{ padding: theme.panel.padding }}gap="2"direction="column"shrink={false}@@ -177,7 +177,7 @@ export const AssetsShell = ({position: "absolute",inset: 0,display: dragState !== IDLE ? "flex" : "none",- backgroundColor: theme.colors.background,+ backgroundColor: theme.colors.backgroundPanel,opacity: 0.85,color:dragState === OVERdiff --git a/apps/builder/app/builder/shared/binding-popover.tsx b/apps/builder/app/builder/shared/binding-popover.tsxindex 12d544b631..513caf5df9 100644--- a/apps/builder/app/builder/shared/binding-popover.tsx+++ b/apps/builder/app/builder/shared/binding-popover.tsx@@ -110,7 +110,7 @@ const BindingPanel = ({}}><Box css={{ paddingBottom: theme.spacing[5] }}>- <Flex gap="1" css={{ px: theme.spacing[9], py: theme.spacing[5] }}>+ <Flex gap="1" css={{ padding: theme.panel.padding }}><Text variant="labelsSentenceCase">Variables</Text><Tooltipvariant="wrapped"@@ -158,7 +158,7 @@ const BindingPanel = ({})}</CssValueListArrowFocus></Box>- <Flex gap="1" css={{ px: theme.spacing[9], py: theme.spacing[5] }}>+ <Flex gap="1" css={{ padding: theme.panel.padding }}><Text variant="labelsSentenceCase">Expression Editor</Text><Tooltipvariant="wrapped"@@ -175,7 +175,7 @@ const BindingPanel = ({<InfoCircleIcon tabIndex={0} /></Tooltip></Flex>- <Box css={{ padding: `0 ${theme.spacing[9]} ${theme.spacing[9]}` }}>+ <Box css={{ padding: theme.panel.padding, pt: 0 }}><ExpressionEditoreditorApiRef={editorApiRef}scope={scope}diff --git a/apps/builder/app/builder/shared/code-editor-base.tsx b/apps/builder/app/builder/shared/code-editor-base.tsxindex 8eaab8f509..31c8911bd4 100644--- a/apps/builder/app/builder/shared/code-editor-base.tsx+++ b/apps/builder/app/builder/shared/code-editor-base.tsx@@ -192,7 +192,7 @@ const autocompletionTooltipTheme = EditorView.theme({overflow: "hidden",textOverflow: "ellipsis",fontStyle: "normal",- color: rawTheme.colors.hint,+ color: rawTheme.colors.foregroundSubtle,},});@@ -393,7 +393,7 @@ export const EditorDialog = ({<Gridalign="stretch"css={{- padding: theme.spacing[7],+ padding: theme.panel.padding,height: "100%",overflow: "hidden",boxSizing: "content-box",diff --git a/apps/builder/app/builder/shared/collapsible-section.tsx b/apps/builder/app/builder/shared/collapsible-section.tsxindex 54186d34ec..a357b0ee98 100644--- a/apps/builder/app/builder/shared/collapsible-section.tsx+++ b/apps/builder/app/builder/shared/collapsible-section.tsx@@ -67,8 +67,8 @@ export const CollapsibleSectionRoot = ({gap="2"direction="column"css={{- pb: theme.spacing[9],- px: fullWidth ? 0 : theme.spacing[9],+ pb: theme.panel.paddingBlock,+ px: fullWidth ? 0 : theme.panel.paddingInline,paddingTop: 0,"&:empty": { display: "none" },}}diff --git a/apps/builder/app/builder/shared/expression-editor.tsx b/apps/builder/app/builder/shared/expression-editor.tsxindex 0a6e25c2fa..03c1e11ea0 100644--- a/apps/builder/app/builder/shared/expression-editor.tsx+++ b/apps/builder/app/builder/shared/expression-editor.tsx@@ -400,8 +400,8 @@ const linterTooltipTheme = EditorView.theme({pointerEvents: "none",},".cm-tooltip-lint": {- backgroundColor: rawTheme.colors.hiContrast,- color: rawTheme.colors.loContrast,+ backgroundColor: rawTheme.colors.backgroundTooltipMain,+ color: rawTheme.colors.foregroundContrastMain,borderRadius: rawTheme.borderRadius[7],padding: rawTheme.spacing[5],},diff --git a/apps/builder/app/builder/shared/fonts-manager/fonts-manager.tsx b/apps/builder/app/builder/shared/fonts-manager/fonts-manager.tsxindex 66a941e72f..b8f7e32aef 100644--- a/apps/builder/app/builder/shared/fonts-manager/fonts-manager.tsx+++ b/apps/builder/app/builder/shared/fonts-manager/fonts-manager.tsx@@ -196,9 +196,7 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {{uploadedItems.map(renderItem)}{systemItems.length !== 0 && (<>- {uploadedItems.length !== 0 && (- <Separator css={{ mx: theme.spacing[9] }} />- )}+ {uploadedItems.length !== 0 && <Separator />}<DeprecatedListItemstate="disabled"suffix={diff --git a/apps/builder/app/builder/shared/fonts-manager/item-menu.tsx b/apps/builder/app/builder/shared/fonts-manager/item-menu.tsxindex 025c290f42..4871db251b 100644--- a/apps/builder/app/builder/shared/fonts-manager/item-menu.tsx+++ b/apps/builder/app/builder/shared/fonts-manager/item-menu.tsx@@ -16,9 +16,8 @@ import { theme } from "@webstudio-is/design-system";import { $authPermit } from "~/shared/nano-states";const MenuButton = styled(SmallIconButton, {- color: theme.colors.hint,"&:hover, &:focus-visible": {- color: theme.colors.hiContrast,+ color: theme.colors.foregroundMain,},});diff --git a/apps/builder/app/builder/shared/image-manager/image-info-tigger.tsx b/apps/builder/app/builder/shared/image-manager/image-info-tigger.tsxindex 603b008b1f..83fc86d864 100644--- a/apps/builder/app/builder/shared/image-manager/image-info-tigger.tsx+++ b/apps/builder/app/builder/shared/image-manager/image-info-tigger.tsx@@ -31,18 +31,19 @@ export const ImageInfoTrigger = ({<SmallIconButtontitle="Options"onClick={() => setInfoOpen(true)}+ tabIndex={-1}css={{visibility: `var(${triggerVisibilityVar}, hidden)`,position: "absolute",- color: theme.colors.slate11,+ color: theme.colors.foregroundSubtle,top: theme.spacing[3],right: theme.spacing[3],cursor: "pointer",transition: "opacity 100ms ease","&:hover": {- color: theme.colors.hiContrast,+ color: theme.colors.foregroundMain,},- ...gearIconCssVars({ fill: theme.colors.loContrast }),+ ...gearIconCssVars({ fill: "transparent" }),}}icon={<GearIcon />}/>diff --git a/apps/builder/app/builder/shared/image-manager/image-info.tsx b/apps/builder/app/builder/shared/image-manager/image-info.tsxindex 309d842a1f..3228d54eea 100644--- a/apps/builder/app/builder/shared/image-manager/image-info.tsx+++ b/apps/builder/app/builder/shared/image-manager/image-info.tsx@@ -36,7 +36,7 @@ export const ImageInfo = ({ asset, onDelete }: ImageInfoProps) => {return (<>- <Box css={{ p: `${theme.spacing[5]} ${theme.spacing[9]}` }}>+ <Box css={{ padding: theme.panel.padding }}><Grid columns={2} align="center" gap={2}><Box css={{ width: 100 }}><Filename variant="labelsSentenceCase">{name}</Filename>@@ -48,7 +48,7 @@ export const ImageInfo = ({ asset, onDelete }: ImageInfoProps) => {</Grid></Box>{"width" in meta && "height" in meta ? (- <Box css={{ p: `${theme.spacing[5]} ${theme.spacing[9]}` }}>+ <Box css={{ padding: theme.panel.padding }}><Grid columns={2} gap={2} align="center"><Flex align="center" css={{ gap: theme.spacing[3] }}><SizeIcon />@@ -65,7 +65,7 @@ export const ImageInfo = ({ asset, onDelete }: ImageInfoProps) => {</Grid></Box>) : null}- <Box css={{ p: `${theme.spacing[5]} ${theme.spacing[9]}` }}>+ <Box css={{ padding: theme.panel.padding }}><Tooltip side="bottom" content={tooltipContent}><Buttoncolor="destructive"diff --git a/apps/builder/app/builder/shared/image-manager/image-manager.tsx b/apps/builder/app/builder/shared/image-manager/image-manager.tsxindex eead6ccbc6..669c32e117 100644--- a/apps/builder/app/builder/shared/image-manager/image-manager.tsx+++ b/apps/builder/app/builder/shared/image-manager/image-manager.tsx@@ -106,7 +106,11 @@ export const ImageManager = ({ accept, onChange }: ImageManagerProps) => {type="image"accept={accept}>- <Grid columns={3} gap={2} css={{ px: theme.spacing[9] }}>+ <Grid+ columns={3}+ gap="2"+ css={{ paddingInline: theme.panel.paddingInline }}+ >{filteredItems.map((assetContainer, index) => (<ImageThumbnailkey={assetContainer.asset.id}diff --git a/apps/builder/app/builder/shared/image-manager/image-thumbnail.tsx b/apps/builder/app/builder/shared/image-manager/image-thumbnail.tsxindex 4d10e080f2..9d6d18ab15 100644--- a/apps/builder/app/builder/shared/image-manager/image-thumbnail.tsx+++ b/apps/builder/app/builder/shared/image-manager/image-thumbnail.tsx@@ -40,14 +40,15 @@ const ThumbnailContainer = styled(Box, {justifyContent: "center",alignItems: "center",flexDirection: "column",- margin: theme.spacing[2],- border: "2px solid transparent",borderRadius: theme.borderRadius[4],- outline: 0,+ outline: "none",gap: theme.spacing[3],overflow: "hidden",- backgroundColor: theme.colors.slate4,- "&:hover": imageInfoTriggerCssVars({ show: true }),+ padding: 2,+ "&:hover": {+ ...imageInfoTriggerCssVars({ show: true }),+ backgroundColor: theme.colors.backgroundAssetcardHover,+ },variants: {status: {uploading: {},@@ -57,6 +58,9 @@ const ThumbnailContainer = styled(Box, {state: {selected: {outline: `1px solid ${theme.colors.borderFocus}`,+ outlineOffset: -1,+ backgroundColor: theme.colors.backgroundAssetcardHover,+ ...imageInfoTriggerCssVars({ show: true }),},},},diff --git a/apps/builder/app/dashboard/projects/project-dialogs.tsx b/apps/builder/app/dashboard/projects/project-dialogs.tsxindex 2c5442f98f..7d7773b704 100644--- a/apps/builder/app/dashboard/projects/project-dialogs.tsx+++ b/apps/builder/app/dashboard/projects/project-dialogs.tsx@@ -81,7 +81,7 @@ const DialogContent = ({<Flexdirection="column"css={{- px: theme.spacing["9"],+ px: theme.spacing["7"],paddingTop: theme.spacing["5"],width,}}diff --git a/apps/builder/app/dashboard/shared/card.tsx b/apps/builder/app/dashboard/shared/card.tsxindex d9f31da468..2744ba2bd7 100644--- a/apps/builder/app/dashboard/shared/card.tsx+++ b/apps/builder/app/dashboard/shared/card.tsx@@ -59,6 +59,5 @@ export const CardFooter = styled(Flex, {flexGap: theme.spacing[3],background: theme.colors.brandBackgroundProjectCardTextArea,height: theme.spacing[17],- py: theme.spacing[5],- px: theme.spacing[7],+ padding: theme.panel.padding,});diff --git a/apps/builder/app/shared/clone-project.tsx b/apps/builder/app/shared/clone-project.tsxindex 708303cf3a..d4cb382f20 100644--- a/apps/builder/app/shared/clone-project.tsx+++ b/apps/builder/app/shared/clone-project.tsx@@ -97,7 +97,7 @@ const CloneProjectView = ({<Flexdirection="column"css={{- px: theme.spacing["9"],+ px: theme.spacing["7"],paddingTop: theme.spacing["5"],}}gap="1"diff --git a/apps/builder/app/shared/share-project/share-project.tsx b/apps/builder/app/shared/share-project/share-project.tsxindex 7a64f8f87a..5fdc21d4a0 100644--- a/apps/builder/app/shared/share-project/share-project.tsx+++ b/apps/builder/app/shared/share-project/share-project.tsx@@ -36,7 +36,7 @@ import { CopyToClipboard } from "~/builder/shared/copy-to-clipboard";const Item = (props: ComponentProps<typeof Flex>) => (<Flexdirection="column"- css={{ px: theme.spacing[7], py: theme.spacing[5] }}+ css={{ padding: theme.panel.padding }}gap="1"{...props}/>@@ -283,8 +283,7 @@ const itemStyle = css({display: "flex",alignItems: "center",gap: theme.spacing[3],- py: theme.spacing[5],- px: theme.spacing[9],+ padding: theme.panel.padding,backgroundColor: theme.colors.backgroundPanel,});@@ -400,12 +399,12 @@ export const ShareProject = ({));const create = (- <Box className={itemStyle({ css: { py: theme.spacing["9"] } })}>+ <Box className={itemStyle({ css: { py: theme.spacing["7"] } })}><Buttoncolor="neutral"state={isPending ? "pending" : undefined}prefix={- isPending ? <Flex css={{ width: theme.spacing[9] }} /> : <PlusIcon />+ isPending ? <Flex css={{ width: theme.spacing[7] }} /> : <PlusIcon />}onClick={() => {onCreate();diff --git a/packages/design-system/src/components/ai-command-bar/command-bar.tsx b/packages/design-system/src/components/ai-command-bar/command-bar.tsxindex d3d5265d89..635c220760 100644--- a/packages/design-system/src/components/ai-command-bar/command-bar.tsx+++ b/packages/design-system/src/components/ai-command-bar/command-bar.tsx@@ -75,13 +75,7 @@ export const CommandBarTrigger = forwardRef<CommandBarTrigger.displayName = "CommandBarTrigger";export const CommandBarContentSection = (props: { children: ReactNode }) => (- <Grid- css={{- margin: theme.spacing[9],- }}- gap={2}- {...props}- />+ <Grid css={{ padding: theme.panel.padding }} gap={2} {...props} />);export const CommandBarContentSeparator = styled(Separator.Root, {diff --git a/packages/design-system/src/components/avatar.tsx b/packages/design-system/src/components/avatar.tsxindex f88c03e2c6..86363c913e 100644--- a/packages/design-system/src/components/avatar.tsx+++ b/packages/design-system/src/components/avatar.tsx@@ -25,7 +25,6 @@ const StyledAvatar = styled(AvatarPrimitive.Root, {outline: "none",padding: "0",fontWeight: "500",- color: theme.colors.hiContrast,width: 22,height: 22,backgroundColor: theme.colors.foregroundSubtle,diff --git a/packages/design-system/src/components/button.stories.tsx b/packages/design-system/src/components/button.stories.tsxindex 616fc61079..27bf4ee9ea 100644--- a/packages/design-system/src/components/button.stories.tsx+++ b/packages/design-system/src/components/button.stories.tsx@@ -115,7 +115,7 @@ export const Button = ({<PopoverTrigger asChild><ButtonComponent prefix={<TrashIcon />}>Open</ButtonComponent></PopoverTrigger>- <PopoverContent css={{ padding: theme.spacing[7] }}>+ <PopoverContent css={{ padding: theme.panel.padding }}><Text>Some content</Text></PopoverContent></Popover>diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsxindex f6738a6a4b..a0125991c2 100644--- a/packages/design-system/src/components/button.tsx+++ b/packages/design-system/src/components/button.tsx@@ -117,7 +117,7 @@ export const buttonStyle = css({justifyContent: "center",gap: theme.spacing[2],padding: `0 ${theme.spacing[4]}`,- height: theme.spacing[12],+ height: theme.spacing[11],borderRadius: theme.borderRadius[4],whiteSpace: "nowrap",diff --git a/packages/design-system/src/components/card.tsx b/packages/design-system/src/components/card.tsxindex 83f10f938f..bce4d5d5bf 100644--- a/packages/design-system/src/components/card.tsx+++ b/packages/design-system/src/components/card.tsx@@ -11,7 +11,7 @@ export const Card = styled("div", {textAlign: "inherit",verticalAlign: "middle",WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",- backgroundColor: theme.colors.panel,+ backgroundColor: "white",display: "block",textDecoration: "none",color: "inherit",@@ -38,71 +38,6 @@ export const Card = styled("div", {width: theme.spacing[30],padding: theme.spacing[11],},- 2: {- width: theme.spacing[34],- padding: theme.spacing[17],- },- },- variant: {- interactive: {- "@hover": {- "&:hover": {- "&::before": {- boxShadow: "inset 0 0 0 1px rgba(0,0,0,.2)",- },- },- },- "&:focus": {- "&::before": {- boxShadow: `inset 0 0 0 1px ${theme.colors.blue8}, 0 0 0 1px ${theme.colors.blue8}`,- },- },- },- ghost: {- backgroundColor: "transparent",- transition:- "transform 200ms cubic-bezier(0.22, 1, 0.36, 1), background-color 25ms linear",- willChange: "transform",- "&::before": {- boxShadow:- "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",- opacity: "0",- transition: "all 200ms cubic-bezier(0.22, 1, 0.36, 1)",- },- "@hover": {- "&:hover": {- backgroundColor: theme.colors.panel,- transform: `translateY(-${theme.spacing[2]})`,- "&::before": {- opacity: "1",- },- },- },- "&:active": {- transform: "translateY(0)",- transition: "none",- "&::before": {- boxShadow:- "0px 5px 16px -5px rgba(22, 23, 24, 0.35), 0px 5px 10px -7px rgba(22, 23, 24, 0.2)",- opacity: "1",- },- },- "&:focus": {- boxShadow: `inset 0 0 0 1px ${theme.colors.blue8}, 0 0 0 1px ${theme.colors.blue8}`,- },- },- active: {- transform: "translateY(0)",- transition: "none",- "&::before": {- boxShadow:- "0px 5px 16px -5px rgba(22, 23, 24, 0.35), 0px 5px 10px -7px rgba(22, 23, 24, 0.2)",- opacity: "1",- },- "&:focus": {- boxShadow: `inset 0 0 0 1px ${theme.colors.blue8}, 0 0 0 1px ${theme.colors.blue8}`,- },- },},},defaultVariants: {diff --git a/packages/design-system/src/components/component-card.stories.tsx b/packages/design-system/src/components/component-card.stories.tsxindex be184eacd1..12245567fc 100644--- a/packages/design-system/src/components/component-card.stories.tsx+++ b/packages/design-system/src/components/component-card.stories.tsx@@ -1,7 +1,8 @@import { BoxIcon } from "@webstudio-is/icons";-import { StoryGrid, StorySection } from "./storybook";+import { StorySection } from "./storybook";import { ComponentCard } from "./component-card";import { TooltipProvider } from "./tooltip";+import { Grid } from "./grid";export default {title: "Library/Component Card",@@ -11,7 +12,7 @@ export const Demo = () => {return (<TooltipProvider><StorySection title="States">- <StoryGrid horizontal>+ <Grid css={{ gridTemplateColumns: "repeat(3, 70px)" }} gap="2"><ComponentCard icon={<BoxIcon />} label="Box" tabIndex={1} /><ComponentCardicon={<BoxIcon />}@@ -31,10 +32,10 @@ export const Demo = () => {state="disabled"tabIndex={1}/>- </StoryGrid>+ </Grid></StorySection><StorySection title="Labels">- <StoryGrid horizontal>+ <Grid gap="2" css={{ gridTemplateColumns: "repeat(3, 70px)" }}><ComponentCard icon={<BoxIcon />} label="Single" tabIndex={1} /><ComponentCardicon={<BoxIcon />}@@ -51,7 +52,7 @@ export const Demo = () => {label="Truncatedlongword"tabIndex={1}/>- </StoryGrid>+ </Grid></StorySection></TooltipProvider>);diff --git a/packages/design-system/src/components/component-card.tsx b/packages/design-system/src/components/component-card.tsxindex c49df9be13..208fc2b905 100644--- a/packages/design-system/src/components/component-card.tsx+++ b/packages/design-system/src/components/component-card.tsx@@ -14,9 +14,8 @@ const cardStyle = css({flexDirection: "column",alignItems: "center",textAlign: "center",- px: theme.spacing[3],- width: theme.spacing[19],- height: theme.spacing[19],+ padding: theme.spacing[3],+ aspectRatio: "1",border: `1px solid`,borderColor: theme.colors.borderMain,borderRadius: theme.borderRadius[2],diff --git a/packages/design-system/src/components/css-value-list-item.tsx b/packages/design-system/src/components/css-value-list-item.tsxindex 4b35dbaafe..54728f82ca 100644--- a/packages/design-system/src/components/css-value-list-item.tsx+++ b/packages/design-system/src/components/css-value-list-item.tsx@@ -17,6 +17,7 @@ const listItemAttribute = "data-list-item";const listItemAttributes = { [listItemAttribute]: true };const DragHandleIconStyled = styled(DragHandleIcon, {+ width: theme.spacing[7],visibility: "hidden",cursor: "grab",color: theme.colors.foregroundSubtle,@@ -24,15 +25,13 @@ const DragHandleIconStyled = styled(DragHandleIcon, {});const ThumbHolder = styled("div", {- width: theme.spacing[10],- height: theme.spacing[10],flexShrink: 0,});/*** We draw button above rela button positions, therefore we need to have same padding*/-const sharedPaddingRight = theme.spacing[9];+const sharedPaddingRight = theme.spacing[7];const IconButtonsWrapper = styled(Flex, {position: "absolute",@@ -64,7 +63,7 @@ const ItemButton = styled("button", {paddingRight: sharedPaddingRight,- height: theme.spacing[13],+ height: theme.spacing[11],position: "relative","&:focus-visible, &[data-focused=true], &[data-state=open]": {@@ -185,7 +184,7 @@ export const CssValueListItem = forwardRef(><DragHandleIconStyled />- <Flex gap={2} shrink>+ <Flex shrink align="center">{thumbnail ? <ThumbHolder>{thumbnail}</ThumbHolder> : null}{label}</Flex>diff --git a/packages/design-system/src/components/dialog.tsx b/packages/design-system/src/components/dialog.tsxindex 8e138197bb..a5d5b2eb26 100644--- a/packages/design-system/src/components/dialog.tsx+++ b/packages/design-system/src/components/dialog.tsx@@ -200,8 +200,7 @@ export const DialogActions = ({ children }: { children: ReactNode }) => {<Flexgap="1"css={{- padding: theme.spacing["9"],- paddingTop: theme.spacing["5"],+ padding: theme.panel.padding,// Making sure the tab order is the last item first.flexFlow: "row-reverse",}}diff --git a/packages/design-system/src/components/icon-button.tsx b/packages/design-system/src/components/icon-button.tsxindex 8ec47299c4..53786515f3 100644--- a/packages/design-system/src/components/icon-button.tsx+++ b/packages/design-system/src/components/icon-button.tsx@@ -33,8 +33,8 @@ export const IconButton = styled("button", {alignItems: "center",// prevent shrinking inside flex boxflexShrink: 0,- width: theme.spacing[12],- height: theme.spacing[12],+ width: theme.spacing[11],+ height: theme.spacing[11],borderRadius: theme.borderRadius[3],minWidth: 0,outline: "none",diff --git a/packages/design-system/src/components/input-field.tsx b/packages/design-system/src/components/input-field.tsxindex 7d1dacaa19..68a4350324 100644--- a/packages/design-system/src/components/input-field.tsx+++ b/packages/design-system/src/components/input-field.tsx@@ -114,13 +114,10 @@ const containerStyle = css({2: {height: theme.spacing[11],},- 3: {- height: theme.spacing[12],- },},},defaultVariants: {- size: 3,+ size: 2,},});@@ -210,7 +207,7 @@ type InputFieldProps = {containerRef?: Ref<HTMLDivElement>;inputRef?: Ref<HTMLInputElement>;variant?: "chromeless";- size?: "1" | "2" | "3";+ size?: "1" | "2";type?: (typeof inputFieldTypes)[number];color?: (typeof inputFieldColors)[number];css?: CSS;diff --git a/packages/design-system/src/components/nested-icon-label.tsx b/packages/design-system/src/components/nested-icon-label.tsxindex 3058392f7f..11e5bd4858 100644--- a/packages/design-system/src/components/nested-icon-label.tsx+++ b/packages/design-system/src/components/nested-icon-label.tsx@@ -62,8 +62,8 @@ const perColorStyle = (color: (typeof labelColors)[number]) => ({const style = css({display: "flex",- width: theme.spacing[11],- height: theme.spacing[11],+ width: theme.spacing[10],+ height: theme.spacing[10],boxSizing: "border-box",alignItems: "center",justifyContent: "center",diff --git a/packages/design-system/src/components/nested-input-button.tsx b/packages/design-system/src/components/nested-input-button.tsxindex ff0344a0c2..9e557dafd9 100644--- a/packages/design-system/src/components/nested-input-button.tsx+++ b/packages/design-system/src/components/nested-input-button.tsx@@ -21,6 +21,7 @@ const style = css({alignItems: "center",justifyContent: "center",whiteSpace: "pre", // to make nestedSelectButtonUnitless work as expected+ height: theme.spacing[10],"&:not(:has(svg))": {paddingLeft: theme.spacing[2],paddingRight: theme.spacing[2],@@ -48,16 +49,7 @@ const style = css({},},},- size: {- 1: {- height: theme.spacing[10],- },- 2: {- height: theme.spacing[11],- },- },},- defaultVariants: { size: 2 },});export const NestedInputButton = forwardRef(@@ -66,9 +58,8 @@ export const NestedInputButton = forwardRef(css,className,children,- size,...props- }: ComponentProps<"button"> & { css?: CSS; size?: "1" | "2" },+ }: ComponentProps<"button"> & { css?: CSS },ref: Ref<HTMLButtonElement>) => {return (@@ -77,7 +68,6 @@ export const NestedInputButton = forwardRef(css,className,hasChildren: children !== undefined,- size,})}{...props}ref={ref}diff --git a/packages/design-system/src/components/panel-banner.tsx b/packages/design-system/src/components/panel-banner.tsxindex c287e107a4..cc5ffe87cb 100644--- a/packages/design-system/src/components/panel-banner.tsx+++ b/packages/design-system/src/components/panel-banner.tsx@@ -6,5 +6,5 @@ export const PanelBanner = styled(Box, {gap: theme.spacing[7],flexDirection: "column",backgroundColor: theme.colors.backgroundInfoNotification,- padding: theme.spacing[9],+ padding: theme.panel.padding,});diff --git a/packages/design-system/src/components/panel-title.tsx b/packages/design-system/src/components/panel-title.tsxindex bb13a0fb77..c14a1dadf3 100644--- a/packages/design-system/src/components/panel-title.tsx+++ b/packages/design-system/src/components/panel-title.tsx@@ -25,7 +25,7 @@ const Container = styled("div", textVariants.titles, {flexShrink: 0,justifyContent: "space-between",height: theme.spacing[15],- paddingLeft: theme.spacing[9],+ paddingInline: theme.panel.paddingInline,paddingRight: theme.spacing[5],color: theme.colors.foregroundMain,});diff --git a/packages/design-system/src/components/panel.tsx b/packages/design-system/src/components/panel.tsxdeleted file mode 100644index daa7210f12..0000000000--- a/packages/design-system/src/components/panel.tsx+++ /dev/null@@ -1,11 +0,0 @@-import { css, styled } from "../stitches.config";-import { theme } from "../stitches.config";--export const panelStyle = css({- overflow: "auto",- backgroundColor: theme.colors.slate4,- borderRadius: theme.borderRadius[4],- boxShadow: `0px 2px 7px rgba(0, 0, 0, 0.1), 0px 5px 17px rgba(0, 0, 0, 0.15), inset 0 0 1px 1px ${theme.colors.slate1}, 0 0 0 1px ${theme.colors.slate7}`,-});--export const Panel = styled("div", panelStyle);diff --git a/packages/design-system/src/components/primitives/dnd/canvas.stories.tsx b/packages/design-system/src/components/primitives/dnd/canvas.stories.tsxindex cc0ae94eca..27b1a4a0e6 100644--- a/packages/design-system/src/components/primitives/dnd/canvas.stories.tsx+++ b/packages/design-system/src/components/primitives/dnd/canvas.stories.tsx@@ -35,8 +35,8 @@ const Item = ({minHeight: 100,margin: 10,padding: 10,- background: theme.colors.mint5,- border: `1px solid ${theme.colors.mint9}`,+ background: theme.colors.backgroundCanvas,+ border: `1px solid ${theme.colors.borderContrast}`,}}style={data.style}data-id={data.id}diff --git a/packages/design-system/src/components/primitives/dnd/placement-indicator.tsx b/packages/design-system/src/components/primitives/dnd/placement-indicator.tsxindex 795fea6619..0d2be6f445 100644--- a/packages/design-system/src/components/primitives/dnd/placement-indicator.tsx+++ b/packages/design-system/src/components/primitives/dnd/placement-indicator.tsx@@ -13,7 +13,7 @@ import { defaultGetValidChildren, type DropTarget } from "./use-drop";const placementStyle = css({boxSizing: "content-box",position: "absolute",- background: theme.colors.blue10,+ background: theme.colors.backgroundPrimary,pointerEvents: "none",});diff --git a/packages/design-system/src/components/primitives/dnd/sortable-list.stories.tsx b/packages/design-system/src/components/primitives/dnd/sortable-list.stories.tsxindex 0a440ec716..537febbc0e 100644--- a/packages/design-system/src/components/primitives/dnd/sortable-list.stories.tsx+++ b/packages/design-system/src/components/primitives/dnd/sortable-list.stories.tsx@@ -17,7 +17,7 @@ type ItemData = { id: string; text: string };const ListItem = styled("li", {display: "block",margin: 10,- background: theme.colors.mint5,+ background: theme.colors.foregroundMoreSubtle,padding: 10,userSelect: "none",});diff --git a/packages/design-system/src/components/search-field.tsx b/packages/design-system/src/components/search-field.tsxindex 35467c6990..19c1218c0d 100644--- a/packages/design-system/src/components/search-field.tsx+++ b/packages/design-system/src/components/search-field.tsx@@ -21,7 +21,7 @@ import { Flex } from "./flex";const SearchIcon = styled(MagnifyingGlassIcon, {// need to center icon verticallydisplay: "block",- color: theme.colors.hint,+ color: theme.colors.foregroundSubtle,padding: theme.spacing[3],});diff --git a/packages/design-system/src/components/section-title.tsx b/packages/design-system/src/components/section-title.tsxindex 864ef5d195..ef297d2a54 100644--- a/packages/design-system/src/components/section-title.tsx+++ b/packages/design-system/src/components/section-title.tsx@@ -29,7 +29,7 @@ const StyledButton = styled(Button, {});const containerStyle = css({position: "relative",- height: theme.spacing[15],+ height: theme.spacing[14],[buttonContentColor]: theme.colors.foregroundIconMain,[labelTextColor]: theme.colors.foregroundMain,"&:hover": {@@ -45,8 +45,7 @@ const titleButtonLayoutStyle = css({width: "100%",height: "100%",boxSizing: "border-box",- paddingLeft: theme.spacing[9],- paddingRight: theme.spacing[6],+ paddingInline: theme.panel.paddingInline,});const labelContainerStyle = css({@@ -61,7 +60,7 @@ const titleButtonStyle = css(titleButtonLayoutStyle, {const suffixSlotStyle = css({position: "absolute",- right: theme.spacing[6],+ right: theme.spacing[4],top: theme.spacing[4],});@@ -70,8 +69,9 @@ const invisibleSuffixStyle = css({});const chevronStyle = css({+ width: theme.spacing[7],opacity: `var(${chevronOpacity}, 0)`,- marginLeft: `-${theme.spacing[8]}`,+ marginLeft: `-${theme.spacing[6]}`,transition: "transform 150ms, opacity 200ms",color: theme.colors.backgroundIconSubtle,variants: {diff --git a/packages/design-system/src/components/select-button.tsx b/packages/design-system/src/components/select-button.tsxindex b4cc08688c..6124086644 100644--- a/packages/design-system/src/components/select-button.tsx+++ b/packages/design-system/src/components/select-button.tsx@@ -22,7 +22,7 @@ const chevronStyle = css({ color: `var(${chevronColor})` });const style = css({all: "unset", // reset <button>minWidth: 0,- height: theme.spacing[12],+ height: theme.spacing[11],boxSizing: "border-box",display: "flex",alignItems: "center",diff --git a/packages/design-system/src/components/select.tsx b/packages/design-system/src/components/select.tsxindex bc752fa0b2..b069833161 100644--- a/packages/design-system/src/components/select.tsx+++ b/packages/design-system/src/components/select.tsx@@ -48,7 +48,7 @@ const scrollButtonStyles = {alignItems: "center",justifyContent: "center",height: 25,- color: theme.colors.hiContrast,+ color: theme.colors.foregroundMain,cursor: "default",};diff --git a/packages/design-system/src/components/status.tsx b/packages/design-system/src/components/status.tsxdeleted file mode 100644index 2f033fc6fe..0000000000--- a/packages/design-system/src/components/status.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { styled } from "../stitches.config";-import { theme } from "../stitches.config";--export const Status = styled("div", {- borderRadius: "50%",- flexShrink: 0,-- variants: {- size: {- "1": {- width: 5,- height: 5,- },- "2": {- width: 9,- height: 9,- },- },- variant: {- gray: {- backgroundColor: theme.colors.slate7,- },- blue: {- backgroundColor: theme.colors.blue9,- },- green: {- backgroundColor: theme.colors.green9,- },- yellow: {- backgroundColor: theme.colors.yellow9,- },- red: {- backgroundColor: theme.colors.red9,- },- },- },- defaultVariants: {- size: "2",- variant: "gray",- },-});diff --git a/packages/design-system/src/components/text-area.tsx b/packages/design-system/src/components/text-area.tsxindex 914ccb77c8..013780dac7 100644--- a/packages/design-system/src/components/text-area.tsx+++ b/packages/design-system/src/components/text-area.tsx@@ -10,18 +10,17 @@ import { Grid } from "./grid";import { useControllableState } from "@radix-ui/react-use-controllable-state";import { ScrollArea } from "./scroll-area";-const LINE_HEIGHT = 16;-const PADDING_TOP = 6;-const PADDING_BOTTOM = 4;-const BORDER = 1;+const lineHeight = 16;+const paddingY = 3;+const borderWidth = 1;const gridStyle = css({color: theme.colors.foregroundMain,borderRadius: theme.borderRadius[4],- border: `${BORDER}px solid ${theme.colors.borderMain}`,+ border: `${borderWidth}px solid ${theme.colors.borderMain}`,background: theme.colors.backgroundControls,- paddingTop: PADDING_TOP,- paddingBottom: PADDING_BOTTOM,+ paddingTop: paddingY,+ paddingBottom: paddingY,boxSizing: "border-box",resize: "vertical",overflow: "auto",@@ -131,13 +130,12 @@ export const TextArea = forwardRef(// We could use `box-sizing:content-box` to avoid dealing with paddings and border here// But then, the user of the component will not be able to set `width` reliably- const minHeight =- rows * LINE_HEIGHT + PADDING_TOP + PADDING_BOTTOM + BORDER * 2;+ const minHeight = rows * lineHeight + paddingY + paddingY + borderWidth * 2;const height = autoGrow || grow ? undefined : minHeight;const maxHeight = maxRows- ? maxRows * LINE_HEIGHT + PADDING_TOP + PADDING_BOTTOM + BORDER * 2+ ? maxRows * lineHeight + paddingY + paddingY + borderWidth * 2: undefined;return (@@ -160,7 +158,7 @@ export const TextArea = forwardRef(<ScrollAreacss={{height: "100%",- maxHeight: maxRows ? maxRows * LINE_HEIGHT : undefined,+ maxHeight: maxRows ? maxRows * lineHeight : undefined,// Overwrite hack from scroll-area.tsx"& [data-radix-scroll-area-viewport] > div": {display: "grid!important",diff --git a/packages/design-system/src/components/toast.tsx b/packages/design-system/src/components/toast.tsxindex 5151795cc3..5178047ed5 100644--- a/packages/design-system/src/components/toast.tsx+++ b/packages/design-system/src/components/toast.tsx@@ -142,7 +142,7 @@ const InternalToast = ({align={"center"}css={{backgroundColor: cssVar(backgroundColor),- padding: theme.spacing[9],+ padding: theme.panel.padding,gridTemplateColumns: icon ? "auto 1fr auto" : "1fr auto",borderBottomRightRadius: theme.borderRadius[5],borderTopRightRadius: theme.borderRadius[5],diff --git a/packages/design-system/src/components/toggle-group.stories.tsx b/packages/design-system/src/components/toggle-group.stories.tsxindex 7e0d85d925..78095fc2f4 100644--- a/packages/design-system/src/components/toggle-group.stories.tsx+++ b/packages/design-system/src/components/toggle-group.stories.tsx@@ -91,7 +91,7 @@ export const Demo = ({</StorySection><StorySection title="With text">- <StoryGrid css={{ alignItems: "flex-start" }}>+ <StoryGrid css={{ alignItems: "flex-start", flexGrow: 1 }}><EnhancedTooltipProvider><ToggleGroup color={color} type="single" defaultValue="one"><EnhancedTooltip content="One">diff --git a/packages/design-system/src/components/toggle-group.tsx b/packages/design-system/src/components/toggle-group.tsxindex d713381c0d..7506bfab13 100644--- a/packages/design-system/src/components/toggle-group.tsx+++ b/packages/design-system/src/components/toggle-group.tsx@@ -65,7 +65,11 @@ const IconButtonStyled = styled(IconButton, {"&[data-focused=true], &:focus-visible": {// To not overlap focus-ring by the next buttonzIndex: 0,+ outline: `1px solid ${theme.colors.borderFocus}`,+ outlineOffset: -1,},+ borderWidth: 0,+ flexGrow: 1,});const BaseToggleGroupButton = forwardRef<@@ -87,9 +91,8 @@ const BaseToggleGroupButton = forwardRef<: "default"}css={{- width: "auto",- height: theme.spacing[11],- minWidth: theme.spacing[11],+ height: theme.spacing[10],+ minWidth: "fit-content",borderRadius: theme.borderRadius[2],...textVariants.labelsTitleCase,}}diff --git a/packages/design-system/src/components/tooltip.tsx b/packages/design-system/src/components/tooltip.tsxindex 7f1e72e6c5..8a8a266937 100644--- a/packages/design-system/src/components/tooltip.tsx+++ b/packages/design-system/src/components/tooltip.tsx@@ -26,10 +26,10 @@ export type TooltipProps = ComponentProps<typeof TooltipPrimitive.Root> &};const Content = styled(TooltipPrimitive.Content, {- backgroundColor: theme.colors.hiContrast,- color: theme.colors.loContrast,+ backgroundColor: theme.colors.backgroundTooltipMain,+ color: theme.colors.foregroundContrastMain,borderRadius: theme.borderRadius[7],- padding: theme.spacing[5],+ padding: theme.panel.padding,position: "relative",variants: {@@ -39,14 +39,13 @@ const Content = styled(TooltipPrimitive.Content, {},large: {maxWidth: theme.spacing["32"],- padding: theme.spacing[9],},},},});const Arrow = styled(TooltipPrimitive.Arrow, {- fill: theme.colors.hiContrast,+ fill: theme.colors.backgroundTooltipMain,marginTop: -0.5,});@@ -120,7 +119,7 @@ export const Tooltip = forwardRef(onMouseLeave={handleMouseEnterComposed}>{typeof content === "string" ? <Text>{content}</Text> : content}- <Box css={{ color: theme.colors.transparentExtreme }}>+ <Box css={{ color: "transparent" }}><Arrow offset={5} width={11} height={5} /></Box></Content>diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.tsindex ac27cc1810..49cba04920 100644--- a/packages/design-system/src/stitches.config.ts+++ b/packages/design-system/src/stitches.config.ts@@ -1,67 +1,51 @@import { createStitches } from "@stitches/react";-import {- blue,- gray,- green,- red,- slate,- slateA,- yellow,- mint,-} from "@radix-ui/colors";import type * as Stitches from "@stitches/react";export type { VariantProps } from "@stitches/react";import * as figma from "./__generated__/figma-design-tokens";+const spacing = {+ 0: "0px",+ 1: "1px",+ 2: "2px",+ 3: "4px",+ 4: "6px",+ 5: "8px",+ 6: "10px",+ 7: "12px",+ 8: "14px",+ 9: "16px",+ 10: "20px",+ 11: "24px",+ 12: "28px",+ 13: "32px",+ 14: "36px",+ 15: "40px",+ 16: "44px",+ 17: "48px",+ 18: "56px",+ 19: "64px",+ 20: "80px",+ 21: "96px",+ 22: "112px",+ 23: "128px",+ 24: "144px",+ 25: "160px",+ 26: "176px",+ 27: "192px",+ 28: "208px",+ 29: "224px",+ 30: "240px",+ 31: "256px",+ 32: "288px",+ 33: "320px",+ 34: "384px",+ 35: "448px",+};+const { styled, css, getCssText, globalCss, keyframes, config, reset } =createStitches({theme: {- colors: {- slate1: slate.slate1,- slate2: slate.slate2,- slate3: slate.slate3,- slate4: slate.slate4,- slate5: slate.slate5,- slate7: slate.slate7,- slate8: slate.slate8,- slate11: slate.slate11,- slate12: slate.slate12,- slateA7: slateA.slateA7,- slateA8: slateA.slateA8,- gray2: gray.gray2,- blue8: blue.blue8,- blue9: blue.blue9,- blue10: blue.blue10,- blue11: blue.blue11,- red4: red.red4,- red9: red.red9,- red11: red.red11,- green3: green.green3,- green4: green.green4,- green9: green.green9,- green11: green.green11,- yellow9: yellow.yellow9,- yellow10: yellow.yellow10,- mint5: mint.mint5,- mint9: mint.mint9,- // Semantic colors- hiContrast: slate.slate12,- loContrast: slate.slate1,- hint: slate.slate9,- muted: slate.slate6,- primary: blue.blue10,- canvas: "hsl(0 0% 93%)",- panel: "white",- panelOutline: "hsl(0deg 0% 0% / 10%)",- transparentPanel: "hsl(0 0% 0% / 97%)",- shadowLight: "hsl(206 22% 7% / 35%)",- shadowDark: "hsl(206 22% 7% / 20%)",- background: slate.slate1,- text: slate.slate12,- transparentExtreme: "transparent",-- ...figma.color,- },+ colors: figma.color,fonts: {...figma.fontFamilies,sans: figma.fontFamilies.inter,@@ -71,44 +55,7 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =opacity: {1: "0.4",},- spacing: {- 0: "0px",- 1: "1px",- 2: "2px",- 3: "4px",- 4: "6px",- 5: "8px",- 6: "10px",- 7: "12px",- 8: "14px",- 9: "16px",- 10: "20px",- 11: "24px",- 12: "28px",- 13: "32px",- 14: "36px",- 15: "40px",- 16: "44px",- 17: "48px",- 18: "56px",- 19: "64px",- 20: "80px",- 21: "96px",- 22: "112px",- 23: "128px",- 24: "144px",- 25: "160px",- 26: "176px",- 27: "192px",- 28: "208px",- 29: "224px",- 30: "240px",- 31: "256px",- 32: "288px",- 33: "320px",- 34: "384px",- 35: "448px",- },+ spacing,/*** Use instead: textVariants / textStyles / <Text />@@ -138,10 +85,6 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =pill: "9999px",},zIndices: {- 1: "100",- 2: "200",- 3: "300",- 4: "400",max: "999",},easing: {@@ -149,15 +92,17 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =easeOut: "cubic-bezier(0.16, 1, 0.3, 1)",},shadows: figma.boxShadow,++ // Semantic values+ panel: {+ padding: `${spacing[5]} ${spacing[7]}`,+ paddingInline: spacing[7],+ paddingBlock: spacing[5],+ },},media: {tablet: "(min-width: 768px)",- laptop: "(min-width: 1024px)",- desktop: "(min-width: 1280px)",- motion: "(prefers-reduced-motion)",hover: "(any-hover: hover)",- dark: "(prefers-color-scheme: dark)",- light: "(prefers-color-scheme: light)",},utils: {p: (value: Stitches.PropertyValue<"padding">) => ({@@ -176,12 +121,10 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =paddingLeft: value,}),px: (value: Stitches.PropertyValue<"paddingLeft">) => ({- paddingLeft: value,- paddingRight: value,+ paddingInline: value,}),py: (value: Stitches.PropertyValue<"paddingTop">) => ({- paddingTop: value,- paddingBottom: value,+ paddingBlock: value,}),m: (value: Stitches.PropertyValue<"margin">) => ({@@ -226,15 +169,6 @@ const { styled, css, getCssText, globalCss, keyframes, config, reset } =WebkitBackgroundClip: value,backgroundClip: value,}),-- // LEGACY, please don't use them- as: (value: Stitches.PropertyValue<"alignSelf">) => ({- alignSelf: value,- }),- fg: (value: Stitches.PropertyValue<"flexGrow">) => ({ flexGrow: value }),- bc: (value: Stitches.PropertyValue<"backgroundColor">) => ({- backgroundColor: value,- }),},});