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
Add overwritten values support (#1660)
Bogdan Chadkin32f2deef60ea
diff --git a/apps/builder/app/builder/features/style-panel/controls/toggle/toggle-control.tsx b/apps/builder/app/builder/features/style-panel/controls/toggle/toggle-control.tsxindex 2c9dadd4d3..0ed01cc6e1 100644--- a/apps/builder/app/builder/features/style-panel/controls/toggle/toggle-control.tsx+++ b/apps/builder/app/builder/features/style-panel/controls/toggle/toggle-control.tsx@@ -22,13 +22,6 @@ export const ToggleGroupControl = ({items = [],onValueChange,}: ToggleGroupControlProps) => {- let state: undefined | "set" | "inherited" = undefined;- if (styleSource === "local") {- state = "set";- }- if (styleSource === "remote") {- state = "inherited";- }return (<ToggleGrouptype="single"@@ -38,7 +31,11 @@ export const ToggleGroupControl = ({>{items.map(({ child, label, value }, index) => {return (- <ToggleGroupControlItem key={index} value={value} state={state}>+ <ToggleGroupControlItem+ key={index}+ value={value}+ source={styleSource}+ ><Tooltip content={label} delayDuration={0}><Flex>{child}</Flex></Tooltip>@@ -51,17 +48,25 @@ export const ToggleGroupControl = ({const ToggleGroupControlItem = styled(ToggleGroupItem, {variants: {- state: {- set: {+ source: {+ default: {},+ preset: {},+ local: {"&[data-state=on]": {- color: theme.colors.blue11,- backgroundColor: theme.colors.blue4,+ color: theme.colors.foregroundLocalMain,+ backgroundColor: theme.colors.backgroundLocalMain,},},- inherited: {+ overwritten: {"&[data-state=on]": {- color: theme.colors.orange11,- backgroundColor: theme.colors.orange4,+ color: theme.colors.foregroundOverwrittenMain,+ backgroundColor: theme.colors.backgroundOverwrittenMain,+ },+ },+ remote: {+ "&[data-state=on]": {+ color: theme.colors.foregroundRemoteMain,+ backgroundColor: theme.colors.backgroundRemoteMain,},},},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 8c80630d05..26e88502eb 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@@ -62,6 +62,9 @@ export const FlexGrid = ({if (styleSource === "local") {color = theme.colors.borderLocalFlexUi;}+ if (styleSource === "overwritten") {+ color = theme.colors.borderOverwrittenFlexUi;+ }if (styleSource === "remote") {color = theme.colors.borderRemoteFlexUi;}diff --git a/apps/builder/app/builder/features/style-panel/sections/space/space.tsx b/apps/builder/app/builder/features/style-panel/sections/space/space.tsxindex 861362017e..bda092f3cd 100644--- a/apps/builder/app/builder/features/style-panel/sections/space/space.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/space/space.tsx@@ -40,17 +40,6 @@ const Cell = ({return null;}- let origin: "set" | "inherited" | "preset" | "unset" = "unset";- if (styleSource === "local") {- origin = "set";- }- if (styleSource === "remote") {- origin = "inherited";- }- if (styleSource === "preset") {- origin = "preset";- }-return (<><InputPopover@@ -76,7 +65,7 @@ const Cell = ({}}value={finalValue}isActive={isActive}- origin={origin}+ source={styleSource}onMouseEnter={(event) =>onHover({ property, element: event.currentTarget })}diff --git a/apps/builder/app/builder/features/style-panel/sections/space/value-text.stories.tsx b/apps/builder/app/builder/features/style-panel/sections/space/value-text.stories.tsxindex a2cb600f3f..9ce844343c 100644--- a/apps/builder/app/builder/features/style-panel/sections/space/value-text.stories.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/space/value-text.stories.tsx@@ -7,7 +7,7 @@ import { ValueText as ValueTextComponent } from "./value-text";export const ValueText = (args: Pick<React.ComponentProps<typeof ValueTextComponent>,- "origin" | "value"+ "source" | "value">) => {const [hovered, setHovered] = React.useState<{ property: string }>();@@ -26,7 +26,7 @@ export const ValueText = (};ValueText.args = {- origin: "set",+ source: "local",value: { type: "unit", value: 100, unit: "px" },};@@ -34,9 +34,9 @@ export default {title: "Space/ValueText",component: ValueText,argTypes: {- origin: {+ source: {control: "select",- options: ["set", "preset", "unset", "inherited"],+ options: ["local", "overwritten", "preset", "default", "remote"],},value: {control: "select",diff --git a/apps/builder/app/builder/features/style-panel/sections/space/value-text.tsx b/apps/builder/app/builder/features/style-panel/sections/space/value-text.tsxindex 5f4c0d378d..2ffac59a7a 100644--- a/apps/builder/app/builder/features/style-panel/sections/space/value-text.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/space/value-text.tsx@@ -14,30 +14,35 @@ const Container = styled("span", {borderRadius: theme.borderRadius[3],padding: `0 ${theme.spacing[1]}`,variants: {- origin: {- unset: { color: theme.colors.slate11 },- set: {- color: theme.colors.blue11,- backgroundColor: theme.colors.blue4,- borderColor: theme.colors.blue6,+ source: {+ default: {+ color: theme.colors.foregroundMain,+ },+ local: {+ color: theme.colors.foregroundLocalMain,+ backgroundColor: theme.colors.backgroundLocalMain,+ borderColor: theme.colors.borderLocalMain,+ },+ overwritten: {+ color: theme.colors.foregroundOverwrittenMain,+ backgroundColor: theme.colors.backgroundOverwrittenMain,+ borderColor: theme.colors.borderOverwrittenMain,},preset: {- // as I'm adding this Figma already uses new colors system,- // so I don't know which tokens to use from our legacy system- color: "#11181C", // foreground/main- backgroundColor: "#DFE3E6", // background/preset/main- borderColor: "#C1C8CD", // border/main+ color: theme.colors.foregroundMain,+ backgroundColor: theme.colors.backgroundPresetMain,+ borderColor: theme.colors.borderMain,},- inherited: {- color: theme.colors.orange11,- backgroundColor: theme.colors.orange4,- borderColor: theme.colors.orange6,+ remote: {+ color: theme.colors.foregroundRemoteMain,+ backgroundColor: theme.colors.backgroundRemoteMain,+ borderColor: theme.colors.borderRemoteMain,},},isActive: { true: {} },},compoundVariants: [- { origin: "unset", isActive: true, css: { color: theme.colors.slate12 } },+ { source: "default", isActive: true, css: { color: theme.colors.slate12 } },],});@@ -61,13 +66,13 @@ const Span = styled("span", {export const ValueText = ({value,- origin,+ source,...rest}: { value: StyleValue } & ComponentProps<typeof Container>) => {const children = useMemo(() => {if (value.type === "unit") {- // we want to show "0" rather than "0px" for unset values for cleaner UI- if (origin === "unset" && value.unit === "px" && value.value === 0) {+ // we want to show "0" rather than "0px" for default values for cleaner UI+ if (source === "default" && value.unit === "px" && value.value === 0) {return <Span>{value.value}</Span>;}@@ -94,7 +99,7 @@ export const ValueText = ({}throw new Error(`Unexpected StyleValue type ${value.type}`);- }, [value, origin]);+ }, [value, source]);const ref = useRef<HTMLSpanElement>(null);@@ -124,7 +129,7 @@ export const ValueText = ({}, [children]);return (- <Container origin={origin} {...rest} ref={ref}>+ <Container source={source} {...rest} ref={ref}>{children}</Container>);diff --git a/apps/builder/app/builder/features/style-panel/shared/collapsible-section.tsx b/apps/builder/app/builder/features/style-panel/shared/collapsible-section.tsxindex b8900058e2..068245173f 100644--- a/apps/builder/app/builder/features/style-panel/shared/collapsible-section.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/collapsible-section.tsx@@ -11,11 +11,11 @@ export const getDots = (currentStyle: StyleInfo,properties: ReadonlyArray<StyleProperty>) => {- const dots = new Set<"local" | "remote">();+ const dots = new Set<"local" | "overwritten" | "remote">();for (const property of properties) {const source = getStyleSource(currentStyle[property]);- if (source === "local" || source === "remote") {+ if (source === "local" || source === "overwritten" || source === "remote") {dots.add(source);}}diff --git a/apps/builder/app/builder/features/style-panel/shared/property-name.tsx b/apps/builder/app/builder/features/style-panel/shared/property-name.tsxindex 18a7d144ce..7c7b998f05 100644--- a/apps/builder/app/builder/features/style-panel/shared/property-name.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/property-name.tsx@@ -4,7 +4,6 @@ import type { StyleProperty } from "@webstudio-is/css-data";import { toValue } from "@webstudio-is/css-engine";import {theme,- rawTheme,Button,Flex,Box,@@ -17,7 +16,7 @@ import {PopoverContent,Text,} from "@webstudio-is/design-system";-import { AlertIcon, UndoIcon } from "@webstudio-is/icons";+import { UndoIcon } from "@webstudio-is/icons";import {breakpointsStore,instancesStore,@@ -201,12 +200,10 @@ export const PropertyName = ({...properties.map((property) => style[property]));const [isOpen, setIsOpen] = useState(false);- const isPopoverEnabled = styleSource === "local" || styleSource === "remote";-- const hasStyleSourceConflict = properties.some((property) => {- const info = style[property];- return info?.nextSource && info.local;- });+ const isPopoverEnabled =+ styleSource === "local" ||+ styleSource === "overwritten" ||+ styleSource === "remote";const labelElement = (<Flex shrink gap={1} align="center">@@ -217,9 +214,6 @@ export const PropertyName = ({) : (label)}- {hasStyleSourceConflict && (- <AlertIcon fill={rawTheme.colors.foregroundDestructive} />- )}</Flex>);diff --git a/apps/builder/app/builder/features/style-panel/shared/style-info.ts b/apps/builder/app/builder/features/style-panel/shared/style-info.tsindex 2f714c65d1..852cb93db1 100644--- a/apps/builder/app/builder/features/style-panel/shared/style-info.ts+++ b/apps/builder/app/builder/features/style-panel/shared/style-info.ts@@ -95,13 +95,23 @@ export type StyleInfo = {};};-export type StyleSource = "local" | "remote" | "preset" | "default";+export type StyleSource =+ | "local"+ | "overwritten"+ | "remote"+ | "preset"+ | "default";export const getStyleSource = (...styleValueInfos: (undefined | StyleValueInfo)[]): StyleSource => {// show source to use if at least one of control properties matches// so user could see if something is set or something is inherited+ for (const info of styleValueInfos) {+ if (info?.nextSource && info.local) {+ return "overwritten";+ }+ }for (const info of styleValueInfos) {if (info?.local) {return "local";diff --git a/packages/design-system/src/components/css-value-list-item.stories.tsx b/packages/design-system/src/components/css-value-list-item.stories.tsxindex 4d7a0e4118..7c0b75efac 100644--- a/packages/design-system/src/components/css-value-list-item.stories.tsx+++ b/packages/design-system/src/components/css-value-list-item.stories.tsx@@ -1,6 +1,6 @@import { css, styled, theme } from "../stitches.config";import { CssValueListItem } from "./css-value-list-item";-import { Label } from "./label";+import { Label, labelColors } from "./label";import { SmallToggleButton } from "./small-toggle-button";import {EyeconOpenIcon,@@ -26,7 +26,7 @@ export default {hidden: { control: "boolean" },focused: { control: "boolean" },labelColor: {- options: ["default", "preset", "local", "remote"],+ options: labelColors,type: "inline-radio",},},@@ -49,7 +49,7 @@ const Panel = styled("div", {const ListItem = (props: {hidden: boolean;- labelColor: "default" | "preset" | "local" | "remote";+ labelColor: "default" | "preset" | "local" | "overwritten" | "remote";state: undefined | "open";active: boolean;focused: undefined | boolean;@@ -164,20 +164,18 @@ export const Declarative = (props: {<StorySection title="Overflows"><StoryGrid><ListItemsFocusWrap>- {(["default", "preset", "local", "remote"] as const).map(- (labelColor, index) => (- <ListItem- key={labelColor}- tabIndex={index === 0 ? 0 : -1}- hidden={false}- active={false}- labelColor={labelColor}- state={undefined}- focused={false}- label="Very long text, very long text"- />- )- )}+ {labelColors.map((labelColor, index) => (+ <ListItem+ key={labelColor}+ tabIndex={index === 0 ? 0 : -1}+ hidden={false}+ active={false}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ label="Very long text, very long text"+ />+ ))}</ListItemsFocusWrap></StoryGrid></StorySection>@@ -185,47 +183,41 @@ export const Declarative = (props: {<StorySection title="Variants"><StoryGrid><ListItemsFocusWrap>- {(["default", "preset", "local", "remote"] as const).map(- (labelColor, index) => (- <ListItem- key={labelColor}- tabIndex={index === 0 ? 0 : -1}- hidden={false}- active={false}- labelColor={labelColor}- state={undefined}- focused={false}- />- )- )}+ {labelColors.map((labelColor, index) => (+ <ListItem+ key={labelColor}+ tabIndex={index === 0 ? 0 : -1}+ hidden={false}+ active={false}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ ))}- {(["default", "preset", "local", "remote"] as const).map(- (labelColor) => (- <ListItem- key={labelColor}- tabIndex={-1}- hidden={true}- active={false}- labelColor={labelColor}- state={undefined}- focused={false}- />- )- )}+ {labelColors.map((labelColor) => (+ <ListItem+ key={labelColor}+ tabIndex={-1}+ hidden={true}+ active={false}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ ))}- {(["default", "preset", "local", "remote"] as const).map(- (labelColor) => (- <ListItem- key={labelColor}- tabIndex={-1}- hidden={false}- active={false}- labelColor={labelColor}- state={"open"}- focused={false}- />- )- )}+ {labelColors.map((labelColor) => (+ <ListItem+ key={labelColor}+ tabIndex={-1}+ hidden={false}+ active={false}+ labelColor={labelColor}+ state={"open"}+ focused={false}+ />+ ))}</ListItemsFocusWrap></StoryGrid></StorySection>@@ -233,47 +225,41 @@ export const Declarative = (props: {<StorySection title="Active"><StoryGrid><ListItemsFocusWrap>- {(["default", "preset", "local", "remote"] as const).map(- (labelColor, index) => (- <ListItem- key={labelColor}- tabIndex={index === 0 ? 0 : -1}- hidden={false}- active={true}- labelColor={labelColor}- state={undefined}- focused={false}- />- )- )}+ {labelColors.map((labelColor, index) => (+ <ListItem+ key={labelColor}+ tabIndex={index === 0 ? 0 : -1}+ hidden={false}+ active={true}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ ))}- {(["default", "preset", "local", "remote"] as const).map(- (labelColor, index) => (- <ListItem- key={labelColor}- tabIndex={-1}- hidden={true}- active={true}- labelColor={labelColor}- state={undefined}- focused={false}- />- )- )}+ {labelColors.map((labelColor) => (+ <ListItem+ key={labelColor}+ tabIndex={-1}+ hidden={true}+ active={true}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ ))}- {(["default", "preset", "local", "remote"] as const).map(- (labelColor, index) => (- <ListItem- key={labelColor}- tabIndex={-1}- hidden={false}- active={true}- labelColor={labelColor}- state={"open"}- focused={false}- />- )- )}+ {labelColors.map((labelColor) => (+ <ListItem+ key={labelColor}+ tabIndex={-1}+ hidden={false}+ active={true}+ labelColor={labelColor}+ state={"open"}+ focused={false}+ />+ ))}</ListItemsFocusWrap></StoryGrid></StorySection>diff --git a/packages/design-system/src/components/icon-button-with-menu.tsx b/packages/design-system/src/components/icon-button-with-menu.tsxindex d610c1d7f9..d1532beb2e 100644--- a/packages/design-system/src/components/icon-button-with-menu.tsx+++ b/packages/design-system/src/components/icon-button-with-menu.tsx@@ -22,7 +22,7 @@ export const IconButtonWithMenu = ({onChange,onHover,}: {- variant: "default" | "preset" | "local" | "remote";+ variant: "default" | "preset" | "local" | "overwritten" | "remote";icon?: JSX.Element;label?: string;value: string;diff --git a/packages/design-system/src/components/icon-button.stories.tsx b/packages/design-system/src/components/icon-button.stories.tsxindex b994c60ec5..9ae0d3447e 100644--- a/packages/design-system/src/components/icon-button.stories.tsx+++ b/packages/design-system/src/components/icon-button.stories.tsx@@ -20,6 +20,9 @@ export const Default: ComponentStory<typeof IconButton> = () => {<IconButton variant="local"><CrossIcon fill="currentColor" /></IconButton>+ <IconButton variant="overwritten">+ <CrossIcon fill="currentColor" />+ </IconButton><IconButton variant="remote"><CrossIcon fill="currentColor" /></IconButton>@@ -34,6 +37,9 @@ export const Default: ComponentStory<typeof IconButton> = () => {<IconButton variant="local" disabled={true}><CrossIcon fill="currentColor" /></IconButton>+ <IconButton variant="overwritten" disabled={true}>+ <CrossIcon fill="currentColor" />+ </IconButton><IconButton variant="remote" disabled={true}><CrossIcon fill="currentColor" /></IconButton>@@ -48,6 +54,9 @@ export const Default: ComponentStory<typeof IconButton> = () => {<IconButton variant="local" data-state={"open"}><CrossIcon fill="currentColor" /></IconButton>+ <IconButton variant="overwritten" data-state={"open"}>+ <CrossIcon fill="currentColor" />+ </IconButton><IconButton variant="remote" data-state={"open"}><CrossIcon fill="currentColor" /></IconButton>@@ -62,6 +71,9 @@ export const Default: ComponentStory<typeof IconButton> = () => {<IconButton variant="local" data-focused={true}><CrossIcon fill="currentColor" /></IconButton>+ <IconButton variant="overwritten" data-focused={true}>+ <CrossIcon fill="currentColor" />+ </IconButton><IconButton variant="remote" data-focused={true}><CrossIcon fill="currentColor" /></IconButton>diff --git a/packages/design-system/src/components/icon-button.tsx b/packages/design-system/src/components/icon-button.tsxindex 2c990aac07..21af24f97e 100644--- a/packages/design-system/src/components/icon-button.tsx+++ b/packages/design-system/src/components/icon-button.tsx@@ -95,6 +95,18 @@ export const IconButton = styled("button", {},},+ overwritten: {+ backgroundColor: theme.colors.backgroundOverwrittenMain,+ borderColor: theme.colors.borderOverwrittenMain,+ color: theme.colors.foregroundOverwrittenMain,+ "&:hover": {+ backgroundColor: theme.colors.backgroundOverwrittenHover,+ },+ "&:disabled": {+ color: theme.colors.foregroundDisabled,+ },+ },+remote: {backgroundColor: theme.colors.backgroundRemoteMain,borderColor: theme.colors.borderRemoteMain,diff --git a/packages/design-system/src/components/label.stories.tsx b/packages/design-system/src/components/label.stories.tsxindex b447e1626b..c92c357cf5 100644--- a/packages/design-system/src/components/label.stories.tsx+++ b/packages/design-system/src/components/label.stories.tsx@@ -9,7 +9,7 @@ export default {title: "Library/Label",};-const colors = ["default", "preset", "local", "remote"] as const;+const colors = ["default", "preset", "local", "overwritten", "remote"] as const;const LabelStory: ComponentStory<typeof Label> = ({color,diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsxindex 0434c3f12c..0596ba384f 100644--- a/packages/design-system/src/components/label.tsx+++ b/packages/design-system/src/components/label.tsx@@ -9,7 +9,13 @@ import { textVariants } from "./text";import { styled, theme } from "../stitches.config";import { Label as RadixLabel } from "@radix-ui/react-label";-export const labelColors = ["default", "preset", "local", "remote"] as const;+export const labelColors = [+ "default",+ "preset",+ "local",+ "overwritten",+ "remote",+] as const;const StyledLabel = styled(RadixLabel, {all: "unset", // reset <button>@@ -67,6 +73,15 @@ const StyledLabel = styled(RadixLabel, {backgroundColor: theme.colors.backgroundLocalHover,},},+ overwritten: {+ px: theme.spacing[3],+ backgroundColor: theme.colors.backgroundOverwrittenMain,+ borderColor: theme.colors.borderOverwrittenMain,+ color: theme.colors.foregroundOverwrittenMain,+ "&:hover": {+ backgroundColor: theme.colors.backgroundOverwrittenHover,+ },+ },remote: {px: theme.spacing[3],backgroundColor: theme.colors.backgroundRemoteMain,@@ -107,13 +122,17 @@ type Props = {} & ComponentProps<typeof StyledLabel>;export const isLabelButton = (color: Props["color"]) =>- color === "preset" || color === "local" || color === "remote";+ color === "preset" ||+ color === "local" ||+ color === "overwritten" ||+ color === "remote";export const Label = forwardRef((props: Props, ref: Ref<HTMLLabelElement>) => {const { disabled, children, ...rest } = props;// To enable keyboard accessibility for users who rely on the spacebar to activate the radix- // when using a preset, local, or remote color, we need to wrap the label with a button that has a "label" role.+ // when using a preset, locala, overwritten or remote color, we need to wrap the label with+ // a button that has a "label" role.// (Radix adds role="button" to the label)const isButton = isLabelButton(props.color);diff --git a/packages/design-system/src/components/nested-icon-label.tsx b/packages/design-system/src/components/nested-icon-label.tsxindex d2d4dcaa13..c18892efb7 100644--- a/packages/design-system/src/components/nested-icon-label.tsx+++ b/packages/design-system/src/components/nested-icon-label.tsx@@ -26,6 +26,12 @@ const colors = {backgroundHover: theme.colors.backgroundLocalHover,icon: theme.colors.foregroundLocalMain,},+ overwritten: {+ border: theme.colors.borderOverwrittenMain,+ background: theme.colors.backgroundOverwrittenMain,+ backgroundHover: theme.colors.backgroundOverwrittenHover,+ icon: theme.colors.foregroundOverwrittenMain,+ },remote: {border: theme.colors.borderRemoteMain,background: theme.colors.backgroundRemoteMain,@@ -62,6 +68,7 @@ const style = css({default: perColorStyle("default"),preset: perColorStyle("preset"),local: perColorStyle("local"),+ overwritten: perColorStyle("overwritten"),remote: perColorStyle("remote"),},},diff --git a/packages/design-system/src/components/section-title.tsx b/packages/design-system/src/components/section-title.tsxindex 21682c4a08..50bcdcd06f 100644--- a/packages/design-system/src/components/section-title.tsx+++ b/packages/design-system/src/components/section-title.tsx@@ -85,6 +85,9 @@ const dotStyle = css({variants: {color: {local: { backgroundColor: theme.colors.foregroundLocalFlexUi },+ overwritten: {+ backgroundColor: theme.colors.foregroundOverwrittenFlexUi,+ },remote: { backgroundColor: theme.colors.foregroundRemoteFlexUi },},},@@ -106,7 +109,7 @@ export const SectionTitle = forwardRef(}: ComponentProps<"button"> & {/** https://www.radix-ui.com/docs/primitives/components/collapsible#trigger */"data-state"?: "open" | "closed";- dots?: Array<"local" | "remote">;+ dots?: Array<"local" | "overwritten" | "remote">;css?: CSS;/** Primarily for <SectionTitleButton> */suffix?: ReactNode;diff --git a/packages/design-system/src/components/toggle-button.stories.tsx b/packages/design-system/src/components/toggle-button.stories.tsxindex bd949ca6d2..2b9e21ebfd 100644--- a/packages/design-system/src/components/toggle-button.stories.tsx+++ b/packages/design-system/src/components/toggle-button.stories.tsx@@ -3,7 +3,13 @@ import { BorderRadiusIndividualIcon } from "@webstudio-is/icons";import { ToggleButton } from "./toggle-button";import { StorySection, StoryGrid } from "./storybook";-const toggleButtonVariants = ["default", "preset", "local", "remote"] as const;+const toggleButtonVariants = [+ "default",+ "preset",+ "local",+ "overwritten",+ "remote",+] as const;export const Demo = ({variant,diff --git a/packages/design-system/src/components/toggle-button.tsx b/packages/design-system/src/components/toggle-button.tsxindex cc55c93e60..0d4f6f401a 100644--- a/packages/design-system/src/components/toggle-button.tsx+++ b/packages/design-system/src/components/toggle-button.tsx@@ -9,7 +9,13 @@ import * as TogglePrimitive from "@radix-ui/react-toggle";import { IconButton } from "./icon-button";type Props = {- variant?: "default" | "preset" | "local" | "remote" | undefined;+ variant?:+ | "default"+ | "preset"+ | "local"+ | "overwritten"+ | "remote"+ | undefined;css?: CSS;} & ComponentProps<typeof TogglePrimitive.Root>;