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
New tooltips component (#1746)
Oleg Isonen66aec54e09de
diff --git a/apps/builder/app/builder/features/breakpoints/confirmation-dialog.tsx b/apps/builder/app/builder/features/breakpoints/confirmation-dialog.tsxindex 951365d158..722d47a771 100644--- a/apps/builder/app/builder/features/breakpoints/confirmation-dialog.tsx+++ b/apps/builder/app/builder/features/breakpoints/confirmation-dialog.tsx@@ -1,10 +1,5 @@import type { Breakpoint } from "@webstudio-is/project-build";-import {- theme,- Button,- Flex,- DeprecatedParagraph,-} from "@webstudio-is/design-system";+import { theme, Button, Flex, Text } from "@webstudio-is/design-system";type ConfirmationDialogProps = {onAbort: () => void;@@ -23,11 +18,11 @@ export const ConfirmationDialog = ({direction="column"css={{ px: theme.spacing[11], py: theme.spacing[5], width: 300 }}>- <DeprecatedParagraph>{`Are you sure you want to delete "${breakpoint.label}"?`}</DeprecatedParagraph>- <DeprecatedParagraph>+ <Text>{`Are you sure you want to delete "${breakpoint.label}"?`}</Text>+ <Text>{`Deleting a breakpoint will also delete all styles associated with thisbreakpoint.`}- </DeprecatedParagraph>+ </Text><Flex justify="end" gap="2"><ButtononClick={() => {diff --git a/apps/builder/app/builder/features/inspector/inspector.tsx b/apps/builder/app/builder/features/inspector/inspector.tsxindex 251b4a09f7..1e0c56c52d 100644--- a/apps/builder/app/builder/features/inspector/inspector.tsx+++ b/apps/builder/app/builder/features/inspector/inspector.tsx@@ -106,7 +106,7 @@ export const Inspector = ({ publish, navigatorLayout }: InspectorProps) => {return (<EnhancedTooltipProvider- delayDuration={1600}+ delayDuration={1200}disableHoverableContent={false}skipDelayDuration={0}>diff --git a/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx b/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsxindex d5b517321d..a07670c1cc 100644--- a/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx+++ b/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx@@ -42,7 +42,7 @@ export const CssPreview = () => {return (<CollapsibleSection label="CSS Preview" fullWidth>- <ScrollArea verticalOnly={false} css={{ px: theme.spacing[9] }}>+ <ScrollArea css={{ px: theme.spacing[9] }}><pre tabIndex={0} className={preStyle()}><codeclassName="language-css"diff --git a/apps/builder/app/builder/features/style-panel/controls/text/text-control.tsx b/apps/builder/app/builder/features/style-panel/controls/text/text-control.tsxindex 13b1446301..d833ab2574 100644--- a/apps/builder/app/builder/features/style-panel/controls/text/text-control.tsx+++ b/apps/builder/app/builder/features/style-panel/controls/text/text-control.tsx@@ -5,7 +5,7 @@ import {import type { ControlProps } from "../../style-sections";import type { StyleValue } from "@webstudio-is/css-data";import { useState } from "react";-import { Box, EnhancedTooltip } from "@webstudio-is/design-system";+import { Box } from "@webstudio-is/design-system";import { styleConfigByName } from "../../shared/configs";import { getStyleSource } from "../../shared/style-info";@@ -18,7 +18,7 @@ export const TextControl = ({icon,disabled,}: ControlProps & { icon?: JSX.Element }) => {- const { label, items: defaultItems } = styleConfigByName(property);+ const { items: defaultItems } = styleConfigByName(property);const styleInfo = currentStyle[property];const value = styleInfo?.value;@@ -29,47 +29,45 @@ export const TextControl = ({>();return (- <EnhancedTooltip content={label}>- <Box>- <CssValueInput- disabled={disabled}- styleSource={getStyleSource(styleInfo)}- icon={icon}- property={property}- value={value}- intermediateValue={intermediateValue}- keywords={(items ?? defaultItems).map((item) => ({- type: "keyword",- value: item.name,- }))}- onChange={(styleValue) => {- setIntermediateValue(styleValue);+ <Box>+ <CssValueInput+ disabled={disabled}+ styleSource={getStyleSource(styleInfo)}+ icon={icon}+ property={property}+ value={value}+ intermediateValue={intermediateValue}+ keywords={(items ?? defaultItems).map((item) => ({+ type: "keyword",+ value: item.name,+ }))}+ onChange={(styleValue) => {+ setIntermediateValue(styleValue);- if (styleValue === undefined) {- deleteProperty(property, { isEphemeral: true });- return;- }+ if (styleValue === undefined) {+ deleteProperty(property, { isEphemeral: true });+ return;+ }- if (styleValue.type !== "intermediate") {- setValue(styleValue, { isEphemeral: true });- }- }}- onHighlight={(styleValue) => {- if (styleValue !== undefined) {- setValue(styleValue, { isEphemeral: true });- } else {- deleteProperty(property, { isEphemeral: true });- }- }}- onChangeComplete={({ value }) => {- setValue(value);- setIntermediateValue(undefined);- }}- onAbort={() => {+ if (styleValue.type !== "intermediate") {+ setValue(styleValue, { isEphemeral: true });+ }+ }}+ onHighlight={(styleValue) => {+ if (styleValue !== undefined) {+ setValue(styleValue, { isEphemeral: true });+ } else {deleteProperty(property, { isEphemeral: true });- }}- />- </Box>- </EnhancedTooltip>+ }+ }}+ onChangeComplete={({ value }) => {+ setValue(value);+ setIntermediateValue(undefined);+ }}+ onAbort={() => {+ deleteProperty(property, { isEphemeral: true });+ }}+ />+ </Box>);};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 0ed01cc6e1..01e8577514 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@@ -1,9 +1,9 @@import {styled,Flex,- Tooltip,ToggleGroup,ToggleGroupItem,+ EnhancedTooltip,} from "@webstudio-is/design-system";import type { StyleSource } from "../../shared/style-info";import { theme } from "@webstudio-is/design-system";@@ -36,9 +36,9 @@ export const ToggleGroupControl = ({value={value}source={styleSource}>- <Tooltip content={label} delayDuration={0}>+ <EnhancedTooltip content={label}><Flex>{child}</Flex>- </Tooltip>+ </EnhancedTooltip></ToggleGroupControlItem>);})}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 bc3d85b429..0c167f1199 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@@ -182,7 +182,8 @@ const BackgroundsCollapsibleSection = ({><PropertyNamestyle={currentStyle}- property={layeredBackgroundProps}+ title="Backgrounds"+ properties={layeredBackgroundProps}label={<SectionTitleLabel color={layersStyleSource}>{label}@@ -307,7 +308,8 @@ export const BackgroundsSection = (props: RenderCategoryProps) => {><PropertyNamestyle={currentStyle}- property={"backgroundColor"}+ properties={["backgroundColor"]}+ title={"Background Color"}label={"Color"}onReset={() => deleteProperty("backgroundColor")}/>diff --git a/apps/builder/app/builder/features/style-panel/sections/borders/border-property.tsx b/apps/builder/app/builder/features/style-panel/sections/borders/border-property.tsxindex c2994ac0b0..8560ab1645 100644--- a/apps/builder/app/builder/features/style-panel/sections/borders/border-property.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/borders/border-property.tsx@@ -115,7 +115,7 @@ export const BorderProperty = ({><PropertyNamestyle={currentStyle}- property={borderProperties}+ properties={borderProperties}label={label}onReset={() => deleteBorderProperties(firstPropertyName)}/>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 699080d3a5..ad4b223eb3 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@@ -71,7 +71,7 @@ export const BorderStyle = (><PropertyNamestyle={props.currentStyle}- property={borderStyleProperties}+ properties={borderStyleProperties}label={"Style"}onReset={() => deleteBorderProperties(firstPropertyName)}/>diff --git a/apps/builder/app/builder/features/style-panel/sections/borders/borders.tsx b/apps/builder/app/builder/features/style-panel/sections/borders/borders.tsxindex 5604bb3b6a..002319445c 100644--- a/apps/builder/app/builder/features/style-panel/sections/borders/borders.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/borders/borders.tsx@@ -84,7 +84,7 @@ export const BordersSection = (props: RenderCategoryProps) => {><PropertyNamestyle={currentStyle}- property={borderColorProperty}+ properties={[borderColorProperty]}label={"Color"}onReset={() => deleteAllBorderColorProperties(borderColorProperty)}/>diff --git a/apps/builder/app/builder/features/style-panel/sections/effects/effects.tsx b/apps/builder/app/builder/features/style-panel/sections/effects/effects.tsxindex 04ae822697..f4658aee11 100644--- a/apps/builder/app/builder/features/style-panel/sections/effects/effects.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/effects/effects.tsx@@ -29,7 +29,7 @@ export const EffectsSection = ({><PropertyNamelabel={styleConfigByName("cursor").label}- property="cursor"+ properties={["cursor"]}style={style}onReset={() => deleteProperty("cursor")}/>@@ -42,7 +42,7 @@ export const EffectsSection = ({<PropertyNamelabel={styleConfigByName("opacity").label}- property="opacity"+ properties={["opacity"]}style={style}onReset={() => deleteProperty("opacity")}/>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 d84f326ce5..dc025cd0a8 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@@ -54,7 +54,7 @@ const FlexChildSectionAlign = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property="alignSelf"+ properties={["alignSelf"]}label="Align"onReset={() => deleteProperty("alignSelf")}/>@@ -107,7 +107,7 @@ const FlexChildSectionSizing = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property={["flexGrow", "flexShrink"]}+ properties={["flexGrow", "flexShrink"]}label="Sizing"onReset={() => {setSizing.deleteProperty("flexGrow");@@ -192,7 +192,7 @@ const FlexChildSectionSizingPopover = ({<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="flexBasis"+ properties={["flexBasis"]}label="Basis"onReset={() => deleteProperty("flexBasis")}/>@@ -206,7 +206,7 @@ const FlexChildSectionSizingPopover = ({<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="flexGrow"+ properties={["flexGrow"]}label="Grow"onReset={() => deleteProperty("flexGrow")}/>@@ -220,7 +220,7 @@ const FlexChildSectionSizingPopover = ({<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="flexShrink"+ properties={["flexShrink"]}label="Shrink"onReset={() => deleteProperty("flexShrink")}/>@@ -249,7 +249,7 @@ const FlexChildSectionOrder = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property="order"+ properties={["order"]}label="Order"onReset={() => deleteProperty("order")}/>@@ -303,7 +303,7 @@ const FlexChildSectionOrderPopover = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "4fr 6fr" }}><PropertyNamestyle={currentStyle}- property="order"+ properties={["order"]}label="Order"onReset={() => deleteProperty("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 295c603d39..9a0a6fb38e 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@@ -6,7 +6,6 @@ import {Grid,SmallToggleButton,ToggleButton,- Tooltip,} from "@webstudio-is/design-system";import type { StyleProperty, StyleValue } from "@webstudio-is/css-data";import { toValue } from "@webstudio-is/css-engine";@@ -46,18 +45,14 @@ const GapLinked = ({isLinked: boolean;onChange: (isLinked: boolean) => void;}) => (- <Tooltip- content={isLinked ? "Unlink gap values" : "Link gap values"}- delayDuration={400}- disableHoverableContent={true}- >+ <EnhancedTooltip content={isLinked ? "Unlink gap values" : "Link gap values"}><SmallToggleButtonpressed={isLinked}onPressedChange={onChange}variant="normal"icon={isLinked ? <Link2Icon /> : <Link2UnlinkedIcon />}/>- </Tooltip>+ </EnhancedTooltip>);const GapInput = ({@@ -79,45 +74,43 @@ const GapInput = ({}) => {const { label, items } = styleConfigByName(property);return (- <EnhancedTooltip content={label}>- <Box>- <CssValueInput- styleSource={getStyleSource(style[property])}- icon={icon}- property="columnGap"- value={style[property]?.value}- intermediateValue={intermediateValue}- keywords={items.map((item) => ({- type: "keyword",- value: item.name,- }))}- onChange={(styleValue) => {- onIntermediateChange(styleValue);- if (styleValue === undefined) {- onPreviewChange();- return;- }- if (styleValue.type !== "intermediate") {- onPreviewChange(styleValue);- }- }}- onHighlight={(styleValue) => {- if (styleValue !== undefined) {- onPreviewChange(styleValue);- } else {- onPreviewChange();- }- }}- onChangeComplete={({ value }) => {- onChange(value);- onIntermediateChange(undefined);- }}- onAbort={() => {+ <Box>+ <CssValueInput+ styleSource={getStyleSource(style[property])}+ icon={<EnhancedTooltip content={label}>{icon}</EnhancedTooltip>}+ property="columnGap"+ value={style[property]?.value}+ intermediateValue={intermediateValue}+ keywords={items.map((item) => ({+ type: "keyword",+ value: item.name,+ }))}+ onChange={(styleValue) => {+ onIntermediateChange(styleValue);+ if (styleValue === undefined) {onPreviewChange();- }}- />- </Box>- </EnhancedTooltip>+ return;+ }+ if (styleValue.type !== "intermediate") {+ onPreviewChange(styleValue);+ }+ }}+ onHighlight={(styleValue) => {+ if (styleValue !== undefined) {+ onPreviewChange(styleValue);+ } else {+ onPreviewChange();+ }+ }}+ onChangeComplete={({ value }) => {+ onChange(value);+ onIntermediateChange(undefined);+ }}+ onAbort={() => {+ onPreviewChange();+ }}+ />+ </Box>);};@@ -300,7 +293,7 @@ const Toggle = ({styleValue?.type === "keyword" && styleValue?.value === valueOn;return (- <Tooltip content={label} delayDuration={400} disableHoverableContent={true}>+ <EnhancedTooltip content={label}><ToggleButtononClick={(event) => {if (event.altKey) {@@ -319,7 +312,7 @@ const Toggle = ({>{isPressed ? iconOn : iconOff}</ToggleButton>- </Tooltip>+ </EnhancedTooltip>);};@@ -459,7 +452,7 @@ export const LayoutSection = ({><PropertyNamestyle={currentStyle}- property="display"+ properties={["display"]}label={label}onReset={() => deleteProperty("display")}/>diff --git a/apps/builder/app/builder/features/style-panel/sections/outline/outline-offset.tsx b/apps/builder/app/builder/features/style-panel/sections/outline/outline-offset.tsxindex 8a7d2b221a..2dc31f3529 100644--- a/apps/builder/app/builder/features/style-panel/sections/outline/outline-offset.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/outline/outline-offset.tsx@@ -38,7 +38,7 @@ export const OutlineOffset = (gap={2}><PropertyName- property={property}+ properties={[property]}style={props.currentStyle}label={"Offset"}onReset={() => deleteProperty(property)}diff --git a/apps/builder/app/builder/features/style-panel/sections/outline/outline-style.tsx b/apps/builder/app/builder/features/style-panel/sections/outline/outline-style.tsxindex 06ffa6a2fa..a29adcfe09 100644--- a/apps/builder/app/builder/features/style-panel/sections/outline/outline-style.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/outline/outline-style.tsx@@ -47,7 +47,7 @@ export const OutlineStyle = (gap={2}><PropertyName- property={property}+ properties={[property]}style={props.currentStyle}label={"Style"}onReset={() => deleteProperty(property)}diff --git a/apps/builder/app/builder/features/style-panel/sections/outline/outline-width.tsx b/apps/builder/app/builder/features/style-panel/sections/outline/outline-width.tsxindex ea4525f410..8395ac90f2 100644--- a/apps/builder/app/builder/features/style-panel/sections/outline/outline-width.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/outline/outline-width.tsx@@ -30,7 +30,7 @@ export const OutlineWidth = (gap={2}><PropertyName- property={property}+ properties={[property]}style={props.currentStyle}label={"Width"}onReset={() => deleteProperty(property)}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 853bd4b409..643150fca8 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@@ -40,7 +40,7 @@ export const OutlineSection = (props: RenderCategoryProps) => {><PropertyNamestyle={currentStyle}- property={property}+ properties={[property]}label={"Color"}onReset={() => deleteProperty(property)}/>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 994b3f4ce2..fcf465c66c 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@@ -36,7 +36,7 @@ const SizeField = ({<Grid gap={1}><PropertyNamelabel={label}- property={property}+ properties={[property]}style={style}onReset={() => deleteProperty(property)}/>@@ -116,7 +116,7 @@ export const SizeSection = ({/><PropertyNamelabel={styleConfigByName("aspectRatio").label}- property="aspectRatio"+ properties={["aspectRatio"]}style={style}onReset={() => deleteProperty("aspectRatio")}/>@@ -128,7 +128,7 @@ export const SizeSection = ({/><PropertyNamelabel={styleConfigByName("overflow").label}- property="overflow"+ properties={["overflow"]}style={style}onReset={() => deleteProperty("overflow")}/>@@ -163,7 +163,7 @@ export const SizeSection = ({/><PropertyNamelabel={styleConfigByName("objectFit").label}- property="objectFit"+ properties={["objectFit"]}style={style}onReset={() => deleteProperty("objectFit")}/>@@ -177,7 +177,7 @@ export const SizeSection = ({<Flex justify="between"><PropertyNamelabel={styleConfigByName("objectPosition").label}- property="objectPosition"+ properties={["objectPosition"]}style={style}onReset={() => deleteProperty("objectPosition")}/>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 dbeb80576a..ea2995b99c 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@@ -85,7 +85,8 @@ export const TypographySectionFont = (props: RenderCategoryProps) => {<PropertyNamestyle={currentStyle}label="Font"- property="fontFamily"+ title="Font Family"+ properties={["fontFamily"]}onReset={() => deleteProperty("fontFamily")}/><FontFamilyControl@@ -99,7 +100,8 @@ export const TypographySectionFont = (props: RenderCategoryProps) => {<PropertyNamestyle={currentStyle}label="Weight"- property="fontWeight"+ title="Font Weight"+ properties={["fontWeight"]}onReset={() => deleteProperty("fontWeight")}/><FontWeightControl@@ -113,7 +115,7 @@ export const TypographySectionFont = (props: RenderCategoryProps) => {<PropertyNamestyle={currentStyle}label="Color"- property="color"+ properties={["color"]}onReset={() => deleteProperty("color")}/><ColorControl@@ -140,8 +142,9 @@ export const TypographySectionSizing = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="fontSize"+ properties={["fontSize"]}label="Size"+ title="Font Size"onReset={() => deleteProperty("fontSize")}/><TextControl@@ -154,8 +157,9 @@ export const TypographySectionSizing = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="lineHeight"+ properties={["lineHeight"]}label="Height"+ title="Line Height"onReset={() => deleteProperty("lineHeight")}/><TextControl@@ -168,8 +172,9 @@ export const TypographySectionSizing = (props: RenderCategoryProps) => {<Grid css={{ gridTemplateColumns: "auto", gap: theme.spacing[3] }}><PropertyNamestyle={currentStyle}- property="letterSpacing"+ properties={["letterSpacing"]}label="Spacing"+ title="Letter Spacing"onReset={() => deleteProperty("letterSpacing")}/><TextControl@@ -209,22 +214,22 @@ export const TypographySectionAdvanced = (props: RenderCategoryProps) => {items={[{child: <TextAlignLeftIcon />,- label: "align: left",+ label: "text-align: left",value: "start",},{child: <TextAlignCenterIcon />,- label: "align: center",+ label: "text-align: center",value: "center",},{child: <TextAlignRightIcon />,- label: "align: right",+ label: "text-align: end",value: "end",},{child: <TextAlignJustifyIcon />,- label: "align: justify",+ label: "text-align: justify",value: "justify",},]}@@ -241,12 +246,12 @@ export const TypographySectionAdvanced = (props: RenderCategoryProps) => {},{child: <TextUnderlineIcon />,- label: "Underline",+ label: "text-decoration: underline",value: "underline",},{child: <TextStrikethroughIcon />,- label: "Line through",+ label: "text-decoration: line-through",value: "line-through",},]}@@ -271,17 +276,17 @@ export const TypographySectionAdvanced = (props: RenderCategoryProps) => {},{child: <TextUppercaseIcon />,- label: "Uppercase",+ label: "text-transform: uppercase",value: "uppercase",},{child: <TextCapitalizeIcon />,- label: "Capitalize",+ label: "text-transform: capitalize",value: "capitalize",},{child: <TextLowercaseIcon />,- label: "Lowercase",+ label: "text-transform: lowercase",value: "lowercase",},]}@@ -298,7 +303,7 @@ export const TypographySectionAdvanced = (props: RenderCategoryProps) => {},{child: <TextItalicIcon />,- label: "Italic",+ label: "font-style: italic",value: "italic",},]}@@ -324,7 +329,7 @@ export const TypographySectionAdvancedPopover = (<Grid css={{ gridTemplateColumns: "4fr 6fr" }}><PropertyNamestyle={currentStyle}- property="whiteSpace"+ properties={["whiteSpace"]}label="White Space"onReset={() => deleteProperty("whiteSpace")}/>@@ -338,7 +343,7 @@ export const TypographySectionAdvancedPopover = (<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property="direction"+ properties={["direction"]}label="Direction"onReset={() => deleteProperty("direction")}/>@@ -363,7 +368,7 @@ export const TypographySectionAdvancedPopover = (<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property="hyphens"+ properties={["hyphens"]}label="Hyphens"onReset={() => deleteProperty("hyphens")}/>@@ -388,7 +393,7 @@ export const TypographySectionAdvancedPopover = (<Grid css={{ gridTemplateColumns: "4fr auto" }}><PropertyNamestyle={currentStyle}- property="textOverflow"+ properties={["textOverflow"]}label="Text Overflow"onReset={() => deleteProperty("textOverflow")}/>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 7c7b998f05..88f060d7ba 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@@ -1,270 +1,254 @@import { useState, type ReactElement } from "react";import { useStore } from "@nanostores/react";-import type { StyleProperty } from "@webstudio-is/css-data";-import { toValue } from "@webstudio-is/css-engine";+import type { Style, StyleProperty } from "@webstudio-is/css-data";+import { createCssEngine } from "@webstudio-is/css-engine";import {theme,Button,Flex,- Box,Label,Tooltip,- Separator,- Popover,- PopoverTrigger,- PopoverPortal,- PopoverContent,Text,+ ScrollArea,} from "@webstudio-is/design-system";-import { UndoIcon } from "@webstudio-is/icons";+import { ResetIcon } from "@webstudio-is/icons";import {breakpointsStore,instancesStore,+ selectedInstanceSelectorStore,+ selectedInstanceStore,styleSourcesStore,} from "~/shared/nano-states";-import { type StyleInfo, type StyleSource, getStyleSource } from "./style-info";+import {+ type StyleInfo,+ getStyleSource,+ type StyleValueInfo,+} from "./style-info";+import { humanizeString } from "~/shared/string-utils";+import { useInstanceStyleData } from "./style-info";+import { StyleSourceBadge } from "../style-source";+import type { StyleSources } from "@webstudio-is/project-build";+import { isBaseBreakpoint } from "~/shared/breakpoints";++const getSourceName = (+ styleSources: StyleSources,+ styleValueInfo?: StyleValueInfo+) => {+ if (styleValueInfo === undefined) {+ return;+ }++ if (styleValueInfo.nextSource) {+ const { styleSourceId } = styleValueInfo.nextSource;+ const styleSource = styleSources.get(styleSourceId);+ if (styleSource?.type === "local") {+ return "local";+ }+ if (styleSource?.type === "token") {+ return styleSource.name;+ }+ }++ if (styleValueInfo.previousSource) {+ const { styleSourceId } = styleValueInfo.previousSource;+ const styleSource = styleSources.get(styleSourceId);+ if (styleSource?.type === "local") {+ return "local";+ }+ if (styleSource?.type === "token") {+ return styleSource.name;+ }+ }+};-const PropertyPopoverContent = ({+// @todo consider reusing CssPreview component+const getCssText = (+ properties: readonly StyleProperty[],+ instanceStyle: Style+) => {+ const cssEngine = createCssEngine();+ const style: Style = {};+ let property: StyleProperty;+ for (property in instanceStyle) {+ const value = instanceStyle[property];+ if (value && properties.includes(property)) {+ style[property] = value;+ }+ }+ const rule = cssEngine.addStyleRule("instance", {+ style,+ });+ return rule.styleMap.toString();+};++const TooltipContent = ({+ title,properties,+ description,style,- styleSource,onReset,+ onClose,}: {- properties: StyleProperty[];+ title: string;+ description?: string;+ properties: readonly StyleProperty[];style: StyleInfo;- styleSource: StyleSource;onReset: () => void;+ onClose: () => void;}) => {+ const selectedInstanceSelector = useStore(selectedInstanceSelectorStore);+ const instanceStyle = useInstanceStyleData(selectedInstanceSelector);const breakpoints = useStore(breakpointsStore);const instances = useStore(instancesStore);const styleSources = useStore(styleSourcesStore);+ let instance = useStore(selectedInstanceStore);++ // When we have multiple properties, they must be originating from the same source, so we can just use one.+ const styleValueInfo = style[properties[0]];+ const styleSource = getStyleSource(styleValueInfo);+ const sourceName = getSourceName(styleSources, styleValueInfo);+ const showValueOrigin =+ styleSource === "overwritten" || styleSource === "remote";+ const cssText = getCssText(properties, instanceStyle);+ let breakpointName;++ const breakpointId = styleValueInfo?.cascaded?.breakpointId;+ if (breakpointId) {+ const breakpoint = breakpoints.get(breakpointId);+ if (breakpoint) {+ breakpointName = isBaseBreakpoint(breakpoint)+ ? "Base"+ : breakpoint?.minWidth ?? breakpoint?.maxWidth;+ }+ }+ if (styleValueInfo?.inherited && styleValueInfo.preset === undefined) {+ instance = instances.get(styleValueInfo.inherited.instanceId);+ }- if (styleSource === "local") {- return (- <>+ return (+ <Flex direction="column" gap="2" css={{ maxWidth: theme.spacing[28] }}>+ <Text variant="titles">{title}</Text>+ {cssText && (+ <ScrollArea>+ <Text+ variant="monoBold"+ color="moreSubtle"+ css={{+ whiteSpace: "break-spaces",+ maxHeight: "3em",+ userSelect: "text",+ cursor: "text",+ }}+ >+ {cssText}+ </Text>+ </ScrollArea>+ )}+ {description && <Text>{description}</Text>}+ {showValueOrigin && (<Flex- align="start"- css={{ px: theme.spacing[4], py: theme.spacing[3] }}+ direction="column"+ gap="1"+ css={{ paddingBottom: theme.spacing[5] }}>- <Button onClick={() => onReset()} prefix={<UndoIcon />}>- Reset- </Button>+ <Text color="moreSubtle">Value comes from</Text>+ <Flex gap="1" wrap="wrap">+ {breakpointName && (+ <StyleSourceBadge source="breakpoint" variant="small">+ {breakpointName}+ </StyleSourceBadge>+ )}+ {sourceName && (+ <StyleSourceBadge source="token" variant="small">+ {sourceName}+ </StyleSourceBadge>+ )}+ {instance && (+ <StyleSourceBadge source="instance" variant="small">+ {instance.label || instance.component}+ </StyleSourceBadge>+ )}+ </Flex></Flex>- <Separator />- <Box- css={{- px: theme.spacing[4],- py: theme.spacing[3],- // @todo this info looks undone, limit width as a fast fix for huge text like in backgrounds- maxWidth: theme.spacing[30],+ )}+ {(styleSource === "local" || styleSource === "overwritten") && (+ <Button+ color="dark"+ prefix={<ResetIcon />}+ css={{ flexGrow: 1 }}+ onMouseDown={(event) => {+ // Prevent closing tooltip+ event.preventDefault();+ }}+ onClickCapture={() => {+ onReset();+ onClose();}}>- {properties.map((property) => {- const styleValueInfo = style[property];-- if (styleValueInfo?.nextSource) {- const { value, styleSourceId } = styleValueInfo.nextSource;- const styleSource = styleSources.get(styleSourceId);- let name: undefined | string = undefined;- if (styleSource?.type === "local") {- name = "local style source";- }- if (styleSource?.type === "token") {- name = `"${styleSource.name}" token`;- }- return (- <Text key={property} color="subtle">- The value of {property} is overriden by {toValue(value)} from{" "}- {name}- </Text>- );- }-- if (styleValueInfo?.previousSource) {- const { value, styleSourceId } = styleValueInfo.previousSource;- const styleSource = styleSources.get(styleSourceId);- let name: undefined | string = undefined;- if (styleSource?.type === "local") {- name = "local style source";- }- if (styleSource?.type === "token") {- name = `"${styleSource.name}" token`;- }- return (- <Text key={property} color="subtle">- Resetting will change {property} value to {toValue(value)}{" "}- from {name}- </Text>- );- }-- if (styleValueInfo?.cascaded) {- const { value, breakpointId } = styleValueInfo.cascaded;- const breakpoint = breakpoints.get(breakpointId);- return (- <Text key={property} color="subtle">- Resetting will change {property} to cascaded {toValue(value)}{" "}- from {breakpoint?.label}- </Text>- );- }-- if (- styleValueInfo?.inherited &&- styleValueInfo.preset === undefined- ) {- const { value, instanceId } = styleValueInfo.inherited;- const instance = instances.get(instanceId);- return (- <Text key={property} color="subtle">- Resetting will change {property} to inherited {toValue(value)}{" "}- from {instance?.component}- </Text>- );- }-- return (- <Text key={property} color="subtle">- Resetting will change to initial value- </Text>- );- })}- </Box>- </>- );- }-- return (- <Box css={{ px: theme.spacing[4], py: theme.spacing[3] }}>- {properties.map((property) => {- const styleValueInfo = style[property];- const source =- styleValueInfo?.nextSource ?? styleValueInfo?.previousSource;-- if (source) {- const { styleSourceId } = source;- const styleSource = styleSources.get(styleSourceId);- let name: undefined | string = undefined;- if (styleSource?.type === "local") {- name = "local style source";- }- if (styleSource?.type === "token") {- name = `"${styleSource.name}" token`;- }- return (- <Text key={property} color="subtle">- {property} value is defined in {name}- </Text>- );- }-- if (styleValueInfo?.cascaded) {- const { breakpointId } = styleValueInfo.cascaded;- const breakpoint = breakpoints.get(breakpointId);- return (- <Text key={property} color="subtle">- {property} value is cascaded from {breakpoint?.label}- </Text>- );- }-- if (styleValueInfo?.inherited && styleValueInfo.preset === undefined) {- const { instanceId } = styleValueInfo.inherited;- const instance = instances.get(instanceId);- return (- <Text key={property} color="subtle">- {property} value is inherited from {instance?.component}- </Text>- );- }- })}- </Box>+ Reset value+ </Button>+ )}+ </Flex>);};type PropertyNameProps = {style: StyleInfo;- property: StyleProperty | readonly StyleProperty[];+ properties: readonly StyleProperty[];label: string | ReactElement;+ title?: string;onReset: () => void;};export const PropertyName = ({style,- property,+ title,+ properties,label,onReset,}: PropertyNameProps) => {- const properties = Array.isArray(property) ? property : [property];- const styleSource = getStyleSource(- ...properties.map((property) => style[property])- );const [isOpen, setIsOpen] = useState(false);- const isPopoverEnabled =- styleSource === "local" ||- styleSource === "overwritten" ||- styleSource === "remote";-- const labelElement = (- <Flex shrink gap={1} align="center">- {typeof label === "string" ? (- <Label color={styleSource} truncate>- {label}- </Label>- ) : (- label- )}- </Flex>- );-- if (isPopoverEnabled) {- return (- <Flex align="center">- <Popover modal open={isOpen} onOpenChange={setIsOpen}>- <PopoverTrigger- asChild- aria-label="Show proprety description"- onClick={(event) => {- event.preventDefault();- if (event.altKey) {- onReset();- return;- }- setIsOpen(true);- }}- >- {labelElement}- </PopoverTrigger>- <PopoverPortal>- <PopoverContent align="start" onClick={() => setIsOpen(false)}>- <PropertyPopoverContent- properties={properties}- style={style}- styleSource={styleSource}- onReset={onReset}- />- </PopoverContent>- </PopoverPortal>- </Popover>- </Flex>- );- }+ // When we have multiple properties, they must be originating from the same source, so we can just use one.+ const property = properties[0];return (<Flex align="center">- {typeof label === "string" ? (- <Tooltip- content={label}- delayDuration={600}- disableHoverableContent={true}+ <Tooltip+ open={isOpen}+ onOpenChange={setIsOpen}+ content={+ <TooltipContent+ title={+ title ??+ (typeof label === "string" ? label : humanizeString(property))+ }+ //description="The text will not wrap (break to the next line) if it overflows the container."+ properties={properties}+ style={style}+ onReset={onReset}+ onClose={() => {+ setIsOpen(false);+ }}+ />+ }+ >+ <Flex+ shrink+ gap={1}+ align="center"+ onClick={() => {+ setIsOpen(true);+ }}>- {labelElement}- </Tooltip>- ) : (- // It's on purpose to not wrap labelElement in Tooltip,- // it can be a complex element with its own tooltip or no tooltip at all like SectionTitle- labelElement- )}+ {typeof label === "string" && property ? (+ <Label color={getStyleSource(style[property])} truncate>+ {label}+ </Label>+ ) : (+ label+ )}+ </Flex>+ </Tooltip></Flex>);};diff --git a/apps/builder/app/builder/features/style-panel/style-sections.tsx b/apps/builder/app/builder/features/style-panel/style-sections.tsxindex 428b6162f5..598389378e 100644--- a/apps/builder/app/builder/features/style-panel/style-sections.tsx+++ b/apps/builder/app/builder/features/style-panel/style-sections.tsx@@ -80,7 +80,7 @@ export const renderProperty = ({<Grid key={property} css={{ gridTemplateColumns: "4fr 6fr" }}><PropertyNamestyle={currentStyle}- property={property}+ properties={[property]}label={label}onReset={() => deleteProperty(property)}/>diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-badge.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-badge.tsxindex cd519f2c20..483c5acd82 100644--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-badge.tsx+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-badge.tsx@@ -1,13 +1,18 @@-import { styled, DeprecatedText2 } from "@webstudio-is/design-system";+import { styled, Text } from "@webstudio-is/design-system";import { theme } from "@webstudio-is/design-system";-export const StyleSourceBadge = styled(DeprecatedText2, {+export const StyleSourceBadge = styled(Text, {display: "inline-flex",borderRadius: theme.borderRadius[2],px: theme.spacing[3],height: theme.spacing[9],color: theme.colors.foregroundContrastMain,alignItems: "center",+ maxWidth: "100%",+ whiteSpace: "nowrap",+ overflow: "hidden",+ // @tood doesn't work in tooltips, needs a workaround+ textOverflow: "ellipsis",variants: {source: {token: {@@ -16,6 +21,13 @@ export const StyleSourceBadge = styled(DeprecatedText2, {tag: {backgroundColor: theme.colors.backgroundStyleSourceTag,},+ breakpoint: {+ backgroundColor: theme.colors.backgroundStyleSourceBreakpoint,+ },+ instance: {+ backgroundColor: theme.colors.backgroundNeutralMain,+ color: theme.colors.foregroundMain,+ },},},});diff --git a/packages/design-system/src/components/__DEPRECATED__/paragraph.tsx b/packages/design-system/src/components/__DEPRECATED__/paragraph.tsxdeleted file mode 100644index fe13c5c0b8..0000000000--- a/packages/design-system/src/components/__DEPRECATED__/paragraph.tsx+++ /dev/null@@ -1,26 +0,0 @@-import { type ComponentProps, type ElementRef, forwardRef } from "react";-import { DeprecatedText2 } from "./text2";--const DEFAULT_TAG = "p";--type ParagraphProps = ComponentProps<typeof DEFAULT_TAG> &- ComponentProps<typeof DeprecatedText2>;--export const DeprecatedParagraph = forwardRef<- ElementRef<typeof DEFAULT_TAG>,- ParagraphProps->(({ css, ...props }, forwardedRef) => {- return (- <DeprecatedText2- as={DEFAULT_TAG}- {...props}- ref={forwardedRef}- css={{- lineHeight: 1.3,- ...css,- }}- />- );-});--DeprecatedParagraph.displayName = "DeprecatedParagraph";diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsxindex a7ce17e637..9be5044875 100644--- a/packages/design-system/src/components/button.tsx+++ b/packages/design-system/src/components/button.tsx@@ -123,7 +123,7 @@ const StyledButton = styled("button", {},});-const TextContainer = styled("span", textVariants.labelsTitleCase, {+const TextContainer = styled("span", textVariants.labelsSentenceCase, {padding: `0 ${theme.spacing[2]}`,overflow: "hidden",textOverflow: "ellipsis",diff --git a/packages/design-system/src/components/icon-button-with-menu.tsx b/packages/design-system/src/components/icon-button-with-menu.tsxindex 868e61ac08..7493b3409b 100644--- a/packages/design-system/src/components/icon-button-with-menu.tsx+++ b/packages/design-system/src/components/icon-button-with-menu.tsx@@ -8,10 +8,10 @@ import {DropdownMenuRadioGroup,DropdownMenuRadioItem,} from "./dropdown-menu";-import { Tooltip } from "./tooltip";import { IconButton } from "./icon-button";import { Flex } from "./flex";import { theme } from "../stitches.config";+import { EnhancedTooltip } from "./enhanced-tooltip";export const IconButtonWithMenu = ({variant,@@ -38,11 +38,7 @@ export const IconButtonWithMenu = ({}) => {return (<DropdownMenu modal={false}>- <Tooltip- content={label}- delayDuration={400}- disableHoverableContent={true}- >+ <EnhancedTooltip content={label}><DropdownMenuTrigger asChild><IconButtonvariant={variant}@@ -56,7 +52,7 @@ export const IconButtonWithMenu = ({{icon}</IconButton></DropdownMenuTrigger>- </Tooltip>+ </EnhancedTooltip><DropdownMenuPortal><DropdownMenuContent sideOffset={4} collisionPadding={16} side="bottom"><DropdownMenuRadioGroup value={value} onValueChange={onChange}>diff --git a/packages/design-system/src/components/text.ts b/packages/design-system/src/components/text.tsindex b0ed70f4a3..bc7c449b1f 100644--- a/packages/design-system/src/components/text.ts+++ b/packages/design-system/src/components/text.ts@@ -28,6 +28,7 @@ export const textStyle = css({main: { color: theme.colors.foregroundMain },contrast: { color: theme.colors.foregroundContrastMain },subtle: { color: theme.colors.foregroundSubtle },+ moreSubtle: { color: theme.colors.foregroundTextMoreSubtle },disabled: { color: theme.colors.foregroundDisabled },success: { color: theme.colors.foregroundSuccessText },destructive: {diff --git a/packages/design-system/src/components/tooltip.tsx b/packages/design-system/src/components/tooltip.tsxindex 79c11f56e3..80a18720d4 100644--- a/packages/design-system/src/components/tooltip.tsx+++ b/packages/design-system/src/components/tooltip.tsx@@ -3,7 +3,7 @@ import { Fragment, forwardRef } from "react";import { styled } from "../stitches.config";import * as TooltipPrimitive from "@radix-ui/react-tooltip";import { Box } from "./box";-import { DeprecatedParagraph } from "./__DEPRECATED__/paragraph";+import { Text } from "./text";import type { CSS } from "../stitches.config";import { theme } from "../stitches.config";@@ -19,7 +19,7 @@ export type TooltipProps = ComponentProps<typeof TooltipPrimitive.Root> &const Content = styled(TooltipPrimitive.Content, {backgroundColor: theme.colors.hiContrast,color: theme.colors.loContrast,- borderRadius: theme.borderRadius[4],+ borderRadius: theme.borderRadius[7],padding: theme.spacing[5],zIndex: theme.zIndices[1],position: "relative",@@ -82,7 +82,7 @@ export const Tooltip = forwardRef(sideOffset={5}{...props}>- <DeprecatedParagraph>{content}</DeprecatedParagraph>+ {typeof content === "string" ? <Text>{content}</Text> : content}<Box css={{ color: theme.colors.transparentExtreme }}><Arrow offset={5} width={11} height={5} /></Box>diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.tsindex ec94ace427..5c519c2030 100644--- a/packages/design-system/src/index.ts+++ b/packages/design-system/src/index.ts@@ -94,6 +94,5 @@ export { DeprecatedIconButton } from "./components/__DEPRECATED__/icon-button";export { DeprecatedHeading } from "./components/__DEPRECATED__/heading";export { DeprecatedLabel } from "./components/__DEPRECATED__/label";export * from "./components/__DEPRECATED__/popover";-export * from "./components/__DEPRECATED__/paragraph";export * from "./components/__DEPRECATED__/text-field";export * from "./components/__DEPRECATED__/list";diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.tsindex 4d6a55fe8b..8730e9cee5 100644--- a/packages/design-system/src/stitches.config.ts+++ b/packages/design-system/src/stitches.config.ts@@ -294,10 +294,9 @@ const {4: "4px",5: "5px",6: "6px",+ 7: "8px",round: "50%",pill: "9999px",- // Legacy - don't use unless specified in Figma- 7: "8px",},zIndices: {1: "100",diff --git a/packages/icons/icons/reset.svg b/packages/icons/icons/reset.svgnew file mode 100644index 0000000000..661ec74714--- /dev/null+++ b/packages/icons/icons/reset.svg@@ -0,0 +1,12 @@+<svg+ width="16"+ height="16"+ viewBox="0 0 16 16"+ xmlns="http://www.w3.org/2000/svg"+>+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"+ d="M6.32208 1.77936C6.60824 2.10329 6.57763 2.59786 6.25371 2.88403L4.85054 4.12363H9.30435C11.8977 4.12363 14 6.22595 14 8.81928C14 11.505 11.7991 13.1699 9.30435 13.1699H7.67391C7.24169 13.1699 6.8913 12.8195 6.8913 12.3873C6.8913 11.9551 7.24169 11.6047 7.67391 11.6047H9.30435C11.1318 11.6047 12.4348 10.4558 12.4348 8.81928C12.4348 7.09039 11.0332 5.68885 9.30435 5.68885H4.85058L6.2537 6.92838C6.57763 7.21454 6.60825 7.70911 6.32209 8.03304C6.03593 8.35697 5.54135 8.38759 5.21743 8.10143L2.26447 5.49276C2.09631 5.34421 2 5.13062 2 4.90625C2 4.68187 2.0963 4.46828 2.26446 4.31972L5.21742 1.71099C5.54134 1.42483 6.03592 1.45544 6.32208 1.77936Z"+ />+</svg>diff --git a/packages/icons/src/__generated__/index.ts b/packages/icons/src/__generated__/index.tsindex 1f2d1b9448..d60171c3d9 100644--- a/packages/icons/src/__generated__/index.ts+++ b/packages/icons/src/__generated__/index.ts@@ -106,6 +106,7 @@ export * from "./refresh";export * from "./repeat-column";export * from "./repeat-grid";export * from "./repeat-row";+export * from "./reset";export * from "./scroll";export * from "./section-link";export * from "./shrink";diff --git a/packages/icons/src/__generated__/reset.tsx b/packages/icons/src/__generated__/reset.tsxnew file mode 100644index 0000000000..134349e704--- /dev/null+++ b/packages/icons/src/__generated__/reset.tsx@@ -0,0 +1,15 @@+// Generated from icons/reset.svg++import { forwardRef } from "react";+import type { IconProps } from "../types";++// prettier-ignore+export const ResetIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width={size} height={size} fill={color} {...props} ref={forwardedRef}><path fillRule="evenodd" d="M6.322 1.78a.783.783 0 0 1-.068 1.104L4.85 4.124h4.453A4.696 4.696 0 0 1 14 8.819c0 2.686-2.2 4.35-4.696 4.35h-1.63a.783.783 0 0 1 0-1.564h1.63c1.828 0 3.13-1.15 3.13-2.786a3.13 3.13 0 0 0-3.13-3.13H4.851l1.403 1.24A.783.783 0 1 1 5.217 8.1L2.264 5.493a.783.783 0 0 1 0-1.173L5.217 1.71a.783.783 0 0 1 1.105.068Z" clipRule="evenodd" /></svg>+ );+ }+);++ResetIcon.displayName = "ResetIcon";diff --git a/packages/icons/src/__generated__/svg/index.ts b/packages/icons/src/__generated__/svg/index.tsindex df0d355e82..d751b02e9d 100644--- a/packages/icons/src/__generated__/svg/index.ts+++ b/packages/icons/src/__generated__/svg/index.ts@@ -106,6 +106,7 @@ export { RefreshIcon } from "./refresh";export { RepeatColumnIcon } from "./repeat-column";export { RepeatGridIcon } from "./repeat-grid";export { RepeatRowIcon } from "./repeat-row";+export { ResetIcon } from "./reset";export { ScrollIcon } from "./scroll";export { SectionLinkIcon } from "./section-link";export { ShrinkIcon } from "./shrink";diff --git a/packages/icons/src/__generated__/svg/reset.ts b/packages/icons/src/__generated__/svg/reset.tsnew file mode 100644index 0000000000..f62144e96f--- /dev/null+++ b/packages/icons/src/__generated__/svg/reset.ts@@ -0,0 +1 @@+export const ResetIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M6.322 1.78a.783.783 0 0 1-.068 1.104L4.85 4.124h4.453A4.696 4.696 0 0 1 14 8.819c0 2.686-2.2 4.35-4.696 4.35h-1.63a.783.783 0 0 1 0-1.564h1.63c1.828 0 3.13-1.15 3.13-2.786a3.13 3.13 0 0 0-3.13-3.13H4.851l1.403 1.24A.783.783 0 1 1 5.217 8.1L2.264 5.493a.783.783 0 0 1 0-1.173L5.217 1.71a.783.783 0 0 1 1.105.068Z" clip-rule="evenodd"/></svg>`;