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
Css value list item control (#1135)
Ivan Starkov33712741da0c
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.tsxnew file mode 100644index 0000000000..334ae89a07--- /dev/null+++ b/packages/design-system/src/components/css-value-list-item.stories.tsx@@ -0,0 +1,166 @@+import { css, styled, theme } from "../stitches.config";+import { CssValueListItem } from "./css-value-list-item";+import { Label } from "./label";+import { SmallToggleButton } from "./small-toggle-button";+import {+ EyeconOpenIcon,+ EyeconClosedIcon,+ SubtractIcon,+} from "@webstudio-is/icons";+import * as React from "react";+import { SmallIconButton } from "./small-icon-button";+import {+ FloatingPanelPopover,+ FloatingPanelPopoverContent,+ FloatingPanelPopoverTrigger,+} from "./floating-panel-popover";+import { StorySection, StoryGrid } from "./storybook";++export default {+ component: CssValueListItem,+ args: { hidden: false, labelColor: "default", focused: false },+ argTypes: {+ hidden: { control: "boolean" },+ focused: { control: "boolean" },+ labelColor: {+ options: ["default", "preset", "local", "remote"],+ type: "inline-radio",+ },+ },+ title: "Library/CSS Value List Item",+};++const Thumbnail = styled("div", {+ width: theme.spacing[10],+ height: theme.spacing[10],+ backgroundImage: "linear-gradient(yellow, red)",+});++const ListItem = (props: {+ hidden: boolean;+ labelColor: "default" | "preset" | "local" | "remote";+ state: undefined | "open";+ focused: undefined | boolean;+}) => {+ const [pressed, onPressedChange] = React.useState(false);++ return (+ <CssValueListItem+ label={+ <Label disabled={props.hidden} color={props.labelColor}>+ Image+ </Label>+ }+ thumbnail={<Thumbnail />}+ hidden={props.hidden}+ state={props.state}+ focused={props.focused}+ buttons={+ <>+ <SmallToggleButton+ pressed={pressed}+ onPressedChange={onPressedChange}+ variant="normal"+ tabIndex={0}+ icon={pressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />}+ />++ <SmallIconButton+ variant="destructive"+ tabIndex={0}+ icon={<SubtractIcon />}+ />+ </>+ }+ />+ );+};++export const Declarative = (props: {+ hidden: boolean;+ focused: boolean;+ labelColor: "default";+}) => {+ const [pressed, onPressedChange] = React.useState(false);++ return (+ <>+ <StorySection title="Configurable">+ <FloatingPanelPopover>+ <FloatingPanelPopoverTrigger asChild>+ <CssValueListItem+ label={+ <Label disabled={props.hidden} color={props.labelColor}>+ Image+ </Label>+ }+ thumbnail={<Thumbnail />}+ hidden={props.hidden}+ focused={props.focused}+ buttons={+ <>+ <SmallToggleButton+ pressed={pressed}+ onPressedChange={onPressedChange}+ variant="normal"+ tabIndex={0}+ icon={pressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />}+ />++ <SmallIconButton+ variant="destructive"+ tabIndex={0}+ icon={<SubtractIcon />}+ />+ </>+ }+ />+ </FloatingPanelPopoverTrigger>+ <FloatingPanelPopoverContent>+ <div className={css({ p: theme.spacing[10] })()}>Content</div>+ </FloatingPanelPopoverContent>+ </FloatingPanelPopover>+ </StorySection>++ <StorySection title="Variants">+ <StoryGrid>+ {(["default", "preset", "local", "remote"] as const).map(+ (labelColor) => (+ <ListItem+ key={labelColor}+ hidden={false}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ )+ )}++ {(["default", "preset", "local", "remote"] as const).map(+ (labelColor) => (+ <ListItem+ key={labelColor}+ hidden={true}+ labelColor={labelColor}+ state={undefined}+ focused={false}+ />+ )+ )}++ {(["default", "preset", "local", "remote"] as const).map(+ (labelColor) => (+ <ListItem+ key={labelColor}+ hidden={false}+ labelColor={labelColor}+ state={"open"}+ focused={false}+ />+ )+ )}+ </StoryGrid>+ </StorySection>+ </>+ );+};diff --git a/packages/design-system/src/components/css-value-list-item.tsx b/packages/design-system/src/components/css-value-list-item.tsxnew file mode 100644index 0000000000..7d6b433507--- /dev/null+++ b/packages/design-system/src/components/css-value-list-item.tsx@@ -0,0 +1,116 @@+import { type ComponentProps, forwardRef, Ref } from "react";+import { styled } from "../stitches.config";+import { Flex } from "./flex";+import { theme } from "../stitches.config";+import { DragHandleIcon } from "@webstudio-is/icons";++const DragHandleIconStyled = styled(DragHandleIcon, {+ visibility: "hidden",+ cursor: "grab",+ color: theme.colors.foregroundSubtle,+});++const ThumbHolder = styled("div", {+ width: theme.spacing[10],+ height: theme.spacing[10],+});++const Item = styled(Flex, {+ userSelect: "none",+ backgroundColor: theme.colors.backgroundPanel,+ paddingRight: theme.spacing[9],+ height: theme.spacing[13],+ width: theme.spacing[30],+ position: "relative",++ "&:focus-visible, &[data-focused=true], &[data-state=open]": {+ "&:after": {+ borderRadius: theme.borderRadius[3],+ outline: `2px solid ${theme.colors.borderFocus}`,+ outlineOffset: "-2px",+ position: "absolute",+ content: '""',+ inset: "0 2px",+ pointerEvents: "none",+ },++ backgroundColor: theme.colors.backgroundHover,+ },+ "&:hover": {+ backgroundColor: theme.colors.backgroundHover,++ [`& ${DragHandleIconStyled}`]: {+ visibility: "visible",+ },+ },+ variants: {+ hidden: {+ true: {+ [`& ${ThumbHolder}`]: {+ opacity: 0.2,+ },+ },+ },+ },+});++type Props = ComponentProps<typeof Item> & {+ hidden?: boolean;+ label: React.ReactElement;+ thumbnail: React.ReactElement;+ buttons?: React.ReactElement;+ // to support Radix trigger asChild+ "data-state"?: "open";+ // for Storybook purposes+ focused?: boolean;+ state?: "open";+};++export const CssValueListItem = forwardRef(+ (+ {+ label,+ thumbnail,+ buttons,+ focused,+ state,+ "data-state": dataState,+ ...rest+ }: Props,+ ref: Ref<HTMLDivElement>+ ) => (+ <Item+ ref={ref}+ align="center"+ data-focused={focused}+ data-state={state ?? dataState}+ {...rest}+ tabIndex={0}+ >+ <DragHandleIconStyled />++ <Flex gap={2}>+ <ThumbHolder>{thumbnail}</ThumbHolder>+ {label}+ </Flex>++ <Flex grow={true} />++ <Flex+ gap={2}+ onClick={(event) => {+ if (event.target !== event.currentTarget) {+ // Having that CSSValueListItem is a button itself, prevent propagate click events+ // from descendants of button wrapper.+ // e.target === e.currentTarget means that click was between buttons in a gap+ event.stopPropagation();+ }+ }}+ >+ {buttons}+ </Flex>+ </Item>+ )+);++CssValueListItem.displayName = "CssValueListItem";diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsxindex c6a3552228..fc409173b7 100644--- a/packages/design-system/src/components/label.tsx+++ b/packages/design-system/src/components/label.tsx@@ -19,13 +19,14 @@ const StyledLabel = styled("label", textVariants.labelsSentenceCase, {outline: `2px solid ${theme.colors.blue10}`,},+ "&[aria-disabled=true]": {+ color: theme.colors.foregroundDisabled,+ },+variants: {color: {default: {color: theme.colors.foregroundMain,- "&[aria-disabled=true]": {- color: theme.colors.foregroundDisabled,- },},preset: {px: theme.spacing[3],diff --git a/packages/design-system/src/components/primitives/small-button.tsx b/packages/design-system/src/components/primitives/small-button.tsxnew file mode 100644index 0000000000..d49ea8a774--- /dev/null+++ b/packages/design-system/src/components/primitives/small-button.tsx@@ -0,0 +1,98 @@+import {+ forwardRef,+ type Ref,+ type ComponentProps,+ type ReactNode,+} from "react";+import { css, theme, type CSS } from "../../stitches.config";++export const smallButtonVariants = [+ "normal",+ "contrast",+ "destructive",+] as const;++/**+ * data-state from Radix, might be set when <SmallButton> is asChild+ * https://www.radix-ui.com/docs/primitives/components/popover#trigger+ **/+const smallButtonStates = ["open"] as const;++const defaultColors = {+ normal: theme.colors.foregroundSubtle,+ destructive: theme.colors.foregroundSubtle,+ contrast: theme.colors.foregroundContrastMain,+};++const hoverColors = {+ normal: theme.colors.foregroundMain,+ destructive: theme.colors.foregroundDestructive,+ contrast: theme.colors.foregroundContrastMain,+};++const focusColors = {+ normal: theme.colors.borderFocus,+ destructive: theme.colors.borderFocus,+ contrast: theme.colors.borderContrast,+};++const perVariantStyle = (variant: (typeof smallButtonVariants)[number]) => ({+ color: defaultColors[variant],++ "&:hover, &[data-state=open]": {+ color: hoverColors[variant],++ "&:disabled, &[data-disabled]": {+ color: theme.colors.foregroundDisabled,+ },+ },+ "&[data-focused=true], &:focus-visible": {+ borderRadius: theme.borderRadius[3],+ outline: `2px solid ${focusColors[variant]}`,+ "&:disabled, &[data-disabled]": {+ outline: "none",+ },+ },+});++const styles = css({+ all: "unset",+ width: theme.spacing[9],+ height: theme.spacing[9],+ "&:disabled, &[data-disabled]": {+ color: theme.colors.foregroundDisabled,+ },+ variants: {+ variant: {+ normal: perVariantStyle("normal"),+ contrast: perVariantStyle("contrast"),+ destructive: perVariantStyle("destructive"),+ },+ },+});++type Props = {+ children: ReactNode;+ variant?: (typeof smallButtonVariants)[number];+ "data-state"?: (typeof smallButtonStates)[number];+ "data-focused"?: boolean;+ css?: CSS;+} & Omit<ComponentProps<"button">, "children">;++export const SmallButton = forwardRef(+ (+ { variant, children, css, className, ...restProps }: Props,+ ref: Ref<HTMLButtonElement>+ ) => {+ return (+ <button+ {...restProps}+ className={styles({ css, className, variant })}+ ref={ref}+ >+ {children}+ </button>+ );+ }+);+SmallButton.displayName = "SmallButton";diff --git a/packages/design-system/src/components/small-icon-button.stories.tsx b/packages/design-system/src/components/small-icon-button.stories.tsxindex f66be22957..7a35a733c4 100644--- a/packages/design-system/src/components/small-icon-button.stories.tsx+++ b/packages/design-system/src/components/small-icon-button.stories.tsx@@ -13,6 +13,8 @@ const iconsMap = {"<TrashIcon>": <TrashIcon />,} as const;+const states = [undefined, ...smallIconButtonStates];+export const Demo = ({icon,...rest@@ -28,7 +30,7 @@ export const Demo = ({<StoryGrid>{smallIconButtonVariants.map((variant) => (<StoryGrid horizontal key={variant}>- {smallIconButtonStates.map((state) => (+ {states.map((state) => (<SmallIconButtonkey={state}title={`${variant} ${state}`}@@ -46,7 +48,7 @@ export const Demo = ({<StoryGrid>{smallIconButtonVariants.map((variant) => (<StoryGrid horizontal key={variant}>- {smallIconButtonStates.map((state) => (+ {states.map((state) => (<SmallIconButtonkey={state}title={`${variant} ${state}`}@@ -73,8 +75,11 @@ Demo.argTypes = {control: { type: "inline-radio", options: smallIconButtonVariants },},state: {- defaultValue: "auto",- control: { type: "inline-radio", options: smallIconButtonStates },+ defaultValue: undefined,+ control: {+ type: "inline-radio",+ options: states,+ },},focused: {defaultValue: false,diff --git a/packages/design-system/src/components/small-icon-button.tsx b/packages/design-system/src/components/small-icon-button.tsxindex 282ddcc75e..7939ac5ffb 100644--- a/packages/design-system/src/components/small-icon-button.tsx+++ b/packages/design-system/src/components/small-icon-button.tsx@@ -9,104 +9,43 @@ import {type ComponentProps,type ReactNode,} from "react";-import { css, theme, type CSS } from "../stitches.config";+import type { CSS } from "../stitches.config";-export const smallIconButtonVariants = [- "normal",- "contrast",- "destructive",-] as const;+import { SmallButton, smallButtonVariants } from "./primitives/small-button";-export const smallIconButtonStates = ["auto", "default", "hover"] as const;+export const smallIconButtonVariants = smallButtonVariants;-const defaultColors = {- normal: theme.colors.foregroundSubtle,- destructive: theme.colors.foregroundSubtle,- contrast: theme.colors.foregroundContrastMain,-};--const hoverColors = {- normal: theme.colors.foregroundMain,- destructive: theme.colors.foregroundDestructive,- contrast: theme.colors.foregroundContrastMain,-};--const focusColors = {- normal: theme.colors.borderFocus,- destructive: theme.colors.borderFocus,- contrast: theme.colors.borderContrast,-};--const perVariantStyle = (variant: typeof smallIconButtonVariants[number]) => ({- "&[data-state=auto], &[data-state=default]": {- color: defaultColors[variant],- },- "&[data-state=auto]:hover, &[data-state=hover]": {- color: hoverColors[variant],- },- "&[data-focused=true], &:focus-visible": {- borderRadius: theme.borderRadius[3],- outline: `2px solid ${focusColors[variant]}`,- },-});--const styles = css({- all: "unset",- width: theme.spacing[9],- height: theme.spacing[9],- variants: {- variant: {- normal: perVariantStyle("normal"),- contrast: perVariantStyle("contrast"),- destructive: perVariantStyle("destructive"),- },- },-});+/**+ * data-state from Radix, might be set when <SmallIconButton> is asChild+ * https://www.radix-ui.com/docs/primitives/components/popover#trigger+ * we don't mind about "closed" state considering it as no-state+ **/+export const smallIconButtonStates = ["open"] as const;type Props = {icon: ReactNode;- variant?: typeof smallIconButtonVariants[number];- state?: typeof smallIconButtonStates[number];+ variant?: (typeof smallIconButtonVariants)[number];+ state?: (typeof smallIconButtonStates)[number];focused?: boolean;css?: CSS;-// might be set when <SmallIconButton> is asChild- "data-state"?: string;+ "data-state"?: (typeof smallIconButtonStates)[number];} & Omit<ComponentProps<"button">, "children">;export const SmallIconButton = forwardRef((- {- state,- focused,- variant,- icon,- css,- className,- "data-state": dataState,- ...restProps- }: Props,+ { state, "data-state": dataState, focused, icon, ...restProps }: Props,ref: Ref<HTMLButtonElement>) => {- // when button is used as a trigger for something that opens- // <SomeTrigger asChild><SmallIconButton /></SomeTrigger>- let finalState = dataState === "open" ? "hover" : undefined;-- // "state" wins over "data-state"- if (state !== undefined) {- finalState = state;- }-return (- <button+ <SmallButton{...restProps}- className={styles({ css, className, variant })}- data-state={finalState ?? "auto"}+ data-state={state ?? dataState}data-focused={focused}ref={ref}>{icon}- </button>+ </SmallButton>);});diff --git a/packages/design-system/src/components/small-toggle-button.stories.tsx b/packages/design-system/src/components/small-toggle-button.stories.tsxnew file mode 100644index 0000000000..87e47f3112--- /dev/null+++ b/packages/design-system/src/components/small-toggle-button.stories.tsx@@ -0,0 +1,144 @@+import type { ComponentProps } from "react";+import { EyeconOpenIcon, EyeconClosedIcon } from "@webstudio-is/icons";+import {+ SmallToggleButton,+ smallToggleButtonVariants,+} from "./small-toggle-button";+import { StorySection, StoryGrid } from "./storybook";+import { theme } from "../stitches.config";++export const Demo = ({+ pressed,+ ...rest+}: Omit<ComponentProps<typeof SmallToggleButton>, "icon">) => (+ <>+ <StorySection title="Configurable">+ <SmallToggleButton+ icon={pressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />}+ {...rest}+ />+ </StorySection>++ <StorySection title="Variants & States">+ <StoryGrid>+ {smallToggleButtonVariants.map((variant) => (+ <StoryGrid+ css={+ variant === "contrast"+ ? {+ backgroundColor: theme.colors.backgroundActive,+ padding: theme.spacing[5],+ }+ : {+ padding: theme.spacing[5],+ }+ }+ horizontal+ key={variant}+ >+ {[false, true].map((defaultPressed) => (+ <SmallToggleButton+ key={defaultPressed ? "pressed" : "unpressed"}+ title={`${variant} ${defaultPressed}`}+ icon={+ defaultPressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />+ }+ defaultPressed={defaultPressed}+ variant={variant}+ />+ ))}++ {[false, true].map((defaultPressed) => (+ <SmallToggleButton+ key={defaultPressed ? "pressed" : "unpressed"}+ title={`${variant} ${defaultPressed}`}+ icon={+ defaultPressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />+ }+ defaultPressed={defaultPressed}+ variant={variant}+ disabled+ />+ ))}+ </StoryGrid>+ ))}+ </StoryGrid>+ </StorySection>++ <StorySection title="Focus">+ <StoryGrid>+ {smallToggleButtonVariants.map((variant) => (+ <StoryGrid+ css={+ variant === "contrast"+ ? {+ backgroundColor: theme.colors.backgroundActive,+ padding: theme.spacing[5],+ }+ : {+ padding: theme.spacing[5],+ }+ }+ horizontal+ key={variant}+ >+ {[false, true].map((defaultPressed) => (+ <SmallToggleButton+ key={defaultPressed ? "pressed" : "unpressed"}+ title={`${variant} ${defaultPressed}`}+ icon={+ defaultPressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />+ }+ defaultPressed={defaultPressed}+ variant={variant}+ focused+ />+ ))}+ {[false, true].map((defaultPressed) => (+ <SmallToggleButton+ key={defaultPressed ? "pressed" : "unpressed"}+ title={`${variant} ${defaultPressed}`}+ icon={+ defaultPressed ? <EyeconClosedIcon /> : <EyeconOpenIcon />+ }+ defaultPressed={defaultPressed}+ variant={variant}+ focused+ disabled+ />+ ))}+ </StoryGrid>+ ))}+ </StoryGrid>+ </StorySection>+ </>+);++Demo.argTypes = {+ variant: {+ defaultValue: "normal",+ control: { type: "inline-radio", options: smallToggleButtonVariants },+ },+ pressed: {+ defaultValue: false,+ control: { type: "boolean" },+ },+ disabled: {+ defaultValue: false,+ control: { type: "boolean" },+ },+ focused: {+ defaultValue: false,+ control: { type: "boolean" },+ },+};++Demo.storyName = "Small Toggle Button";++export default {+ title: "Library/Small Toggle Button",+ parameters: {+ // to make the variant=contrast visible+ backgrounds: { default: "Panel" },+ },+};diff --git a/packages/design-system/src/components/small-toggle-button.tsx b/packages/design-system/src/components/small-toggle-button.tsxnew file mode 100644index 0000000000..e1bfe09145--- /dev/null+++ b/packages/design-system/src/components/small-toggle-button.tsx@@ -0,0 +1,33 @@+/**+ * Implementation of the "Small Toggle Button" component from:+ * https://www.figma.com/file/sfCE7iLS0k25qCxiifQNLE/%F0%9F%93%9A-Webstudio-Library?node-id=4%3A3236&t=Nn8L5VPCruHNv1no-0+ */++import { forwardRef, type ComponentProps, type ReactNode } from "react";+import type { CSS } from "../stitches.config";+import * as TogglePrimitive from "@radix-ui/react-toggle";+import { SmallButton } from "./primitives/small-button";++export const smallToggleButtonVariants = ["normal", "contrast"] as const;++type Props = {+ icon: ReactNode;+ variant?: (typeof smallToggleButtonVariants)[number];+ focused?: boolean;+ pressed?: boolean;+ defaultPressed?: boolean;+ disabled?: boolean;+ onPressedChange?(pressed: boolean): void;+ css?: CSS;+} & Omit<ComponentProps<typeof TogglePrimitive.Root>, "children">;++export const SmallToggleButton = forwardRef<HTMLButtonElement, Props>(+ ({ focused, icon, ...restProps }, ref) => {+ return (+ <TogglePrimitive.Root asChild ref={ref} {...restProps}>+ <SmallButton data-focused={focused}>{icon}</SmallButton>+ </TogglePrimitive.Root>+ );+ }+);+SmallToggleButton.displayName = "SmallToggleButton";diff --git a/packages/design-system/src/components/storybook.tsx b/packages/design-system/src/components/storybook.tsxindex 29a7bd3064..a8388badb0 100644--- a/packages/design-system/src/components/storybook.tsx+++ b/packages/design-system/src/components/storybook.tsx@@ -3,7 +3,7 @@*/import type { ReactNode } from "react";-import { theme, css } from "../stitches.config";+import { theme, css, type CSS } from "../stitches.config";import { textVariants } from "./text";const sectionStyle = css({@@ -48,7 +48,9 @@ const gridStyle = css({export const StoryGrid = ({children,horizontal,+ css,}: {children: ReactNode;horizontal?: boolean;-}) => <div className={gridStyle({ horizontal })}>{children}</div>;+ css?: CSS;+}) => <div className={gridStyle({ horizontal, css })}>{children}</div>;diff --git a/packages/icons/icons/drag-handle.svg b/packages/icons/icons/drag-handle.svgnew file mode 100644index 0000000000..7a772c7cd6--- /dev/null+++ b/packages/icons/icons/drag-handle.svg@@ -0,0 +1,6 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <rect y="3" x="5" width="6" height="1" rx="0.5" />+ <rect y="6" x="5" width="6" height="1" rx="0.5" />+ <rect y="9" x="5" width="6" height="1" rx="0.5" />+ <rect y="12" x="5" width="6" height="1" rx="0.5" />+</svg>diff --git a/packages/icons/icons/subtract.svg b/packages/icons/icons/subtract.svgnew file mode 100644index 0000000000..aa04e38465--- /dev/null+++ b/packages/icons/icons/subtract.svg@@ -0,0 +1,3 @@+<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="M14 8C14 8.41421 13.6642 8.75 13.25 8.75H2.75C2.33579 8.75 2 8.41421 2 8V8C2 7.58579 2.33579 7.25 2.75 7.25H13.25C13.6642 7.25 14 7.58579 14 8V8Z"/>+</svg>diff --git a/packages/icons/src/__generated__/drag-handle.tsx b/packages/icons/src/__generated__/drag-handle.tsxnew file mode 100644index 0000000000..b7a940d6ba--- /dev/null+++ b/packages/icons/src/__generated__/drag-handle.tsx@@ -0,0 +1,15 @@+// Generated from icons/drag-handle.svg++import { forwardRef } from "react";+import type { IconProps } from "../types";++// prettier-ignore+export const DragHandleIcon = 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}><rect width="6" height="1" x="5" y="3" rx=".5" /><rect width="6" height="1" x="5" y="6" rx=".5" /><rect width="6" height="1" x="5" y="9" rx=".5" /><rect width="6" height="1" x="5" y="12" rx=".5" /></svg>+ );+ }+);++DragHandleIcon.displayName = "DragHandleIcon";diff --git a/packages/icons/src/__generated__/index.ts b/packages/icons/src/__generated__/index.tsindex 0cbef4b641..47b8ebd6e7 100644--- a/packages/icons/src/__generated__/index.ts+++ b/packages/icons/src/__generated__/index.ts@@ -14,6 +14,7 @@ export * from "./chevron-filled-up";export * from "./code";export * from "./dash";export * from "./dot";+export * from "./drag-handle";export * from "./eyecon-closed";export * from "./eyecon-open";export * from "./hamburger-menu";@@ -27,6 +28,7 @@ export * from "./radio-checked";export * from "./radio-unchecked";export * from "./scroll";export * from "./subscript";+export * from "./subtract";export * from "./superscript";export * from "./unlinked";export * from "./webstudio";diff --git a/packages/icons/src/__generated__/subtract.tsx b/packages/icons/src/__generated__/subtract.tsxnew file mode 100644index 0000000000..9c7cf5fc02--- /dev/null+++ b/packages/icons/src/__generated__/subtract.tsx@@ -0,0 +1,15 @@+// Generated from icons/subtract.svg++import { forwardRef } from "react";+import type { IconProps } from "../types";++// prettier-ignore+export const SubtractIcon = 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="M14 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 0 1 0-1.5h10.5A.75.75 0 0 1 14 8Z" clipRule="evenodd" /></svg>+ );+ }+);++SubtractIcon.displayName = "SubtractIcon";