Skip to content

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

TextLegacy > __DEPRECATED__Text

Oleg Isonen2197573ca2bc
diff --git a/apps/designer/app/auth/login.tsx b/apps/designer/app/auth/login.tsx
index a6708df5ad..476776ebf6 100644
--- a/apps/designer/app/auth/login.tsx
+++ b/apps/designer/app/auth/login.tsx
@@ -6,7 +6,7 @@ import {
Card,
Flex,
Heading,
- TextLegacy,
+ __DEPRECATED__Text,
TextField,
} from "@webstudio-is/design-system";
import interStyles from "~/shared/font-faces/inter.css";
@@ -47,9 +47,9 @@ export const Login = ({ errorMessage }: { errorMessage: string }) => {
<Flex direction="column" gap="4" align="center">
<Heading size="2">Login</Heading>
{errorMessage.length ? (
- <TextLegacy css={{ textAlign: "center" }} variant="red">
+ <__DEPRECATED__Text css={{ textAlign: "center" }} variant="red">
{errorMessage}
- </TextLegacy>
+ </__DEPRECATED__Text>
) : null}
<Flex gap="2" direction="column" align="center">
<Form action="/auth/github" method="post">
diff --git a/apps/designer/app/dashboard/components/card.tsx b/apps/designer/app/dashboard/components/card.tsx
index 2637f498c4..aa1ec752f8 100644
--- a/apps/designer/app/dashboard/components/card.tsx
+++ b/apps/designer/app/dashboard/components/card.tsx
@@ -8,7 +8,7 @@ import {
TextField,
Button,
Heading,
- TextLegacy,
+ __DEPRECATED__Text,
} from "@webstudio-is/design-system";
type SelectProjectProjectCardProps = {
@@ -77,9 +77,9 @@ export const SelectProjectCard = ({
</Button>
</Flex>
{errors ? (
- <TextLegacy variant="red" css={{ marginTop: "$1" }}>
+ <__DEPRECATED__Text variant="red" css={{ marginTop: "$1" }}>
{errors}
- </TextLegacy>
+ </__DEPRECATED__Text>
) : null}
</Form>
) : (
diff --git a/apps/designer/app/dashboard/components/header.tsx b/apps/designer/app/dashboard/components/header.tsx
index 4fe4d207f4..4654a215a9 100644
--- a/apps/designer/app/dashboard/components/header.tsx
+++ b/apps/designer/app/dashboard/components/header.tsx
@@ -6,7 +6,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
Button,
- TextLegacy,
+ __DEPRECATED__Text,
Flex,
} from "@webstudio-is/design-system";
import { User } from "@webstudio-is/prisma-client";
@@ -45,7 +45,7 @@ export const DashboardHeader = ({ user }: { user: User }) => {
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem onSelect={() => navigate("/logout")}>
- <TextLegacy>Logout</TextLegacy>
+ <__DEPRECATED__Text>Logout</__DEPRECATED__Text>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx b/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx
index 6f7dbb35a5..7cd7205792 100644
--- a/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx
+++ b/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx
@@ -2,7 +2,7 @@ import { ChevronRightIcon } from "@webstudio-is/icons";
import {
Button,
Flex,
- TextLegacy,
+ __DEPRECATED__Text,
darkTheme,
} from "@webstudio-is/design-system";
import { useSelectedInstancePath } from "../../shared/instance/use-selected-instance-path";
@@ -38,7 +38,9 @@ const Breadcrumb = ({ component, onClick }: BreadcrumbProps) => {
);
};
-const EmptyState = () => <TextLegacy size="1">No instance selected</TextLegacy>;
+const EmptyState = () => (
+ <__DEPRECATED__Text size="1">No instance selected</__DEPRECATED__Text>
+);
type BreadcrumbsProps = {
publish: Publish;
diff --git a/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx b/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx
index cad6e734a6..08c1506b6b 100644
--- a/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx
+++ b/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx
@@ -5,7 +5,7 @@ import {
Button,
TextField,
Flex,
- TextLegacy,
+ __DEPRECATED__Text,
} from "@webstudio-is/design-system";
import { PlusIcon, TrashIcon } from "@webstudio-is/icons";
import ObjectId from "bson-objectid";
@@ -107,7 +107,7 @@ export const BreakpointsEditor = ({
justify="between"
css={{ paddingLeft: "$5", paddingRight: "$3", py: "$1" }}
>
- <TextLegacy>Breakpoints</TextLegacy>
+ <__DEPRECATED__Text>Breakpoints</__DEPRECATED__Text>
<Button
ghost
onClick={() => {
diff --git a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
index 6b16c783f0..cb0e452537 100644
--- a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
+++ b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
@@ -12,7 +12,7 @@ import {
DropdownMenuArrow,
DropdownMenuSeparator,
DropdownMenuCheckboxItem,
- TextLegacy,
+ __DEPRECATED__Text,
Flex,
} from "@webstudio-is/design-system";
import { sort } from "~/shared/breakpoints";
@@ -38,17 +38,17 @@ const BreakpointSelectorItem = ({
}: BreakpointSelectorItemProps) => {
return (
<Flex align="center" justify="between" gap="3" css={{ flexGrow: 1 }}>
- <TextLegacy size="1" css={{ flexGrow: 1, color: "inherit" }}>
+ <__DEPRECATED__Text size="1" css={{ flexGrow: 1, color: "inherit" }}>
{breakpoint.label}
- </TextLegacy>
- <TextLegacy
+ </__DEPRECATED__Text>
+ <__DEPRECATED__Text
size="1"
css={{
color: "inherit",
}}
>
{breakpoint.minWidth}
- </TextLegacy>
+ </__DEPRECATED__Text>
</Flex>
);
};
diff --git a/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx b/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx
index 2b76e154ea..6862c9f491 100644
--- a/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx
+++ b/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx
@@ -1,5 +1,5 @@
import { type Breakpoint } from "@webstudio-is/react-sdk";
-import { Button, Flex, TextLegacy } from "@webstudio-is/design-system";
+import { Button, Flex, __DEPRECATED__Text } from "@webstudio-is/design-system";
type ConfirmationDialogProps = {
onAbort: () => void;
@@ -14,13 +14,13 @@ export const ConfirmationDialog = ({
}: ConfirmationDialogProps) => {
return (
<Flex gap="2" direction="column" css={{ px: "$5", py: "$2", width: 300 }}>
- <TextLegacy size="2" css={{ lineHeight: 1.5 }}>
+ <__DEPRECATED__Text size="2" css={{ lineHeight: 1.5 }}>
{`Are you sure you want to delete "${breakpoint.label}"?`}
- </TextLegacy>
- <TextLegacy size="2" css={{ lineHeight: 1.5 }}>
+ </__DEPRECATED__Text>
+ <__DEPRECATED__Text size="2" css={{ lineHeight: 1.5 }}>
{`Deleting a breakpoint will also delete all styles associated with this
breakpoint.`}
- </TextLegacy>
+ </__DEPRECATED__Text>
<Flex justify="end" gap="2">
<Button
onClick={() => {
diff --git a/apps/designer/app/designer/features/breakpoints/preview.tsx b/apps/designer/app/designer/features/breakpoints/preview.tsx
index 55698ac6ef..f8c7a6ce9e 100644
--- a/apps/designer/app/designer/features/breakpoints/preview.tsx
+++ b/apps/designer/app/designer/features/breakpoints/preview.tsx
@@ -1,5 +1,9 @@
import { type Breakpoint } from "@webstudio-is/react-sdk";
-import { Paragraph, Flex, TextLegacy } from "@webstudio-is/design-system";
+import {
+ Paragraph,
+ Flex,
+ __DEPRECATED__Text,
+} from "@webstudio-is/design-system";
type PreviewProps = {
breakpoint?: Breakpoint;
@@ -8,7 +12,7 @@ type PreviewProps = {
export const Preview = ({ breakpoint }: PreviewProps) => {
return (
<Flex css={{ px: "$5", py: "$1" }} gap="1" direction="column">
- <TextLegacy size="1">CSS Preview</TextLegacy>
+ <__DEPRECATED__Text size="1">CSS Preview</__DEPRECATED__Text>
<Paragraph css={{ fontSize: "$1" }} variant="gray">
{breakpoint === undefined
? "No breakpoint selected"
diff --git a/apps/designer/app/designer/features/breakpoints/trigger-button.tsx b/apps/designer/app/designer/features/breakpoints/trigger-button.tsx
index 633266a287..845d017ddf 100644
--- a/apps/designer/app/designer/features/breakpoints/trigger-button.tsx
+++ b/apps/designer/app/designer/features/breakpoints/trigger-button.tsx
@@ -6,7 +6,7 @@ import {
useSelectedBreakpoint,
} from "~/designer/shared/nano-states";
import { willRender } from "~/designer/shared/breakpoints";
-import { Button, TextLegacy } from "@webstudio-is/design-system";
+import { Button, __DEPRECATED__Text } from "@webstudio-is/design-system";
import {
DesktopIcon,
LaptopIcon,
@@ -49,9 +49,9 @@ export const TriggerButton = forwardRef<
aria-label="Show breakpoints"
>
{renderIcon(breakpoint, variant)}
- <TextLegacy size="1" variant={variant}>
+ <__DEPRECATED__Text size="1" variant={variant}>
{`${breakpoint.label} ${canvasWidth}px / ${zoom}%`}
- </TextLegacy>
+ </__DEPRECATED__Text>
</Button>
);
});
diff --git a/apps/designer/app/designer/features/breakpoints/width-setting.tsx b/apps/designer/app/designer/features/breakpoints/width-setting.tsx
index 39e86f32fe..ac86eddc24 100644
--- a/apps/designer/app/designer/features/breakpoints/width-setting.tsx
+++ b/apps/designer/app/designer/features/breakpoints/width-setting.tsx
@@ -3,7 +3,7 @@ import {
useCanvasWidth,
useSelectedBreakpoint,
} from "~/designer/shared/nano-states";
-import { Slider, TextLegacy, Flex } from "@webstudio-is/design-system";
+import { Slider, __DEPRECATED__Text, Flex } from "@webstudio-is/design-system";
import { sort } from "~/shared/breakpoints";
import { useBreakpoints, useIsPreviewMode } from "~/shared/nano-states";
@@ -51,7 +51,7 @@ export const WidthSetting = () => {
return (
<Flex css={{ px: "$5", py: "$1" }} gap="1" direction="column">
- <TextLegacy size="1">Canvas width</TextLegacy>
+ <__DEPRECATED__Text size="1">Canvas width</__DEPRECATED__Text>
<Flex gap="3" align="center">
<Slider
min={min}
@@ -61,7 +61,7 @@ export const WidthSetting = () => {
setValue(value);
}}
/>
- <TextLegacy size="1">{`${value}px`}</TextLegacy>
+ <__DEPRECATED__Text size="1">{`${value}px`}</__DEPRECATED__Text>
</Flex>
</Flex>
);
diff --git a/apps/designer/app/designer/features/breakpoints/zoom-setting.tsx b/apps/designer/app/designer/features/breakpoints/zoom-setting.tsx
index 9b9f4690f0..2d58df997f 100644
--- a/apps/designer/app/designer/features/breakpoints/zoom-setting.tsx
+++ b/apps/designer/app/designer/features/breakpoints/zoom-setting.tsx
@@ -1,5 +1,5 @@
import { useZoom } from "~/designer/shared/nano-states";
-import { Slider, TextLegacy, Flex } from "@webstudio-is/design-system";
+import { Slider, __DEPRECATED__Text, Flex } from "@webstudio-is/design-system";
export const minZoom = 10;
@@ -7,7 +7,7 @@ export const ZoomSetting = () => {
const [value, setValue] = useZoom();
return (
<Flex css={{ px: "$5", py: "$1" }} gap="1" direction="column">
- <TextLegacy size="1">Zoom</TextLegacy>
+ <__DEPRECATED__Text size="1">Zoom</__DEPRECATED__Text>
<Flex gap="3" align="center">
<Slider
min={minZoom}
@@ -16,7 +16,7 @@ export const ZoomSetting = () => {
setValue(value);
}}
/>
- <TextLegacy size="1">{value}%</TextLegacy>
+ <__DEPRECATED__Text size="1">{value}%</__DEPRECATED__Text>
</Flex>
</Flex>
);
diff --git a/apps/designer/app/designer/features/inspector/inspector.tsx b/apps/designer/app/designer/features/inspector/inspector.tsx
index 951352a409..4eaa2e8ba0 100644
--- a/apps/designer/app/designer/features/inspector/inspector.tsx
+++ b/apps/designer/app/designer/features/inspector/inspector.tsx
@@ -1,6 +1,6 @@
import type { Publish } from "@webstudio-is/react-sdk";
import {
- TextLegacy,
+ __DEPRECATED__Text,
Tabs,
TabsList,
TabsTrigger,
@@ -42,14 +42,14 @@ export const Inspector = ({ publish }: InspectorProps) => {
<Tabs defaultValue="style" css={{ width: "100%" }}>
<TabsList>
<TabsTrigger value="style">
- <TextLegacy>Style</TextLegacy>
+ <__DEPRECATED__Text>Style</__DEPRECATED__Text>
</TabsTrigger>
{/* @note: events would be part of props */}
<TabsTrigger value="props">
- <TextLegacy>Props</TextLegacy>
+ <__DEPRECATED__Text>Props</__DEPRECATED__Text>
</TabsTrigger>
<TabsTrigger value="inspect">
- <TextLegacy>Inspect</TextLegacy>
+ <__DEPRECATED__Text>Inspect</__DEPRECATED__Text>
</TabsTrigger>
</TabsList>
<TabsContent value="style" css={contentStyle}>
diff --git a/apps/designer/app/designer/features/props-panel/control.tsx b/apps/designer/app/designer/features/props-panel/control.tsx
index c6f45e3c01..9f4ccc9128 100644
--- a/apps/designer/app/designer/features/props-panel/control.tsx
+++ b/apps/designer/app/designer/features/props-panel/control.tsx
@@ -8,7 +8,7 @@ import {
Select,
Slider,
Switch,
- TextLegacy,
+ __DEPRECATED__Text,
TextField,
} from "@webstudio-is/design-system";
import { Checkbox } from "@webstudio-is/design-system";
@@ -138,8 +138,8 @@ const RangeControl = ({
step={step}
/>
<Flex direction="row" justify="between">
- <TextLegacy size={1}>{min}</TextLegacy>
- <TextLegacy size={1}>{max}</TextLegacy>
+ <__DEPRECATED__Text size={1}>{min}</__DEPRECATED__Text>
+ <__DEPRECATED__Text size={1}>{max}</__DEPRECATED__Text>
</Flex>
</Flex>
);
diff --git a/apps/designer/app/designer/features/sidebar-left/lib/header.tsx b/apps/designer/app/designer/features/sidebar-left/lib/header.tsx
index d1266ba90f..57ede21374 100644
--- a/apps/designer/app/designer/features/sidebar-left/lib/header.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/lib/header.tsx
@@ -1,4 +1,8 @@
-import { Flex, IconButton, TextLegacy } from "@webstudio-is/design-system";
+import {
+ Flex,
+ IconButton,
+ __DEPRECATED__Text,
+} from "@webstudio-is/design-system";
import { Separator } from "@webstudio-is/design-system";
import { Cross1Icon } from "@webstudio-is/icons";
@@ -16,9 +20,9 @@ export const Header = ({ title, isClosable = true, onClose }: HeaderProps) => {
align="center"
justify="between"
>
- <TextLegacy size="1" css={{ fontWeight: "bold" }}>
+ <__DEPRECATED__Text size="1" css={{ fontWeight: "bold" }}>
{title}
- </TextLegacy>
+ </__DEPRECATED__Text>
{isClosable && (
<IconButton
onClick={() => onClose?.()}
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
index c5446148b7..e289e6be41 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
@@ -1,6 +1,6 @@
import { type Instance, components } from "@webstudio-is/react-sdk";
import { forwardRef, type ElementRef, type ComponentProps } from "react";
-import { Flex, TextLegacy, styled } from "@webstudio-is/design-system";
+import { Flex, __DEPRECATED__Text, styled } from "@webstudio-is/design-system";
const Thumb = styled(Flex, {
px: "$1",
@@ -41,7 +41,7 @@ export const ComponentThumb = forwardRef<
{...rest}
>
<Icon width={30} height={30} />
- <TextLegacy size="1">{label}</TextLegacy>
+ <__DEPRECATED__Text size="1">{label}</__DEPRECATED__Text>
</Thumb>
);
});
diff --git a/apps/designer/app/designer/features/style-panel/render-property.tsx b/apps/designer/app/designer/features/style-panel/render-property.tsx
index 9ed4fc4ed2..3dacb593e2 100644
--- a/apps/designer/app/designer/features/style-panel/render-property.tsx
+++ b/apps/designer/app/designer/features/style-panel/render-property.tsx
@@ -2,7 +2,7 @@ import {
Flex,
Grid,
Label,
- TextLegacy,
+ __DEPRECATED__Text,
Combobox,
ComboboxTextField,
ComboboxPopperContent,
@@ -72,14 +72,14 @@ const PropertyName = ({ property, label }: PropertyProps) => {
const Unit = ({ value }: { value: StyleValue }) => {
if (value.type !== "unit" || value.unit === "number") return null;
return (
- <TextLegacy
+ <__DEPRECATED__Text
css={{
fontSize: "$1",
cursor: "default",
}}
>
{value.unit}
- </TextLegacy>
+ </__DEPRECATED__Text>
);
};
diff --git a/apps/designer/app/designer/features/topbar/menu/shortcut-hint.tsx b/apps/designer/app/designer/features/topbar/menu/shortcut-hint.tsx
index 99177fe8f1..83a3fa79c1 100644
--- a/apps/designer/app/designer/features/topbar/menu/shortcut-hint.tsx
+++ b/apps/designer/app/designer/features/topbar/menu/shortcut-hint.tsx
@@ -1,4 +1,4 @@
-import { TextLegacy } from "@webstudio-is/design-system";
+import { __DEPRECATED__Text } from "@webstudio-is/design-system";
const isMac =
typeof navigator === "object" ? /mac/i.test(navigator.platform) : false;
@@ -32,8 +32,8 @@ const format = (value: ShortcutDefinition) => {
export const ShortcutHint = ({ value }: { value: ShortcutDefinition }) => {
return (
- <TextLegacy size="1" css={{ letterSpacing: 1.5, color: "inherit" }}>
+ <__DEPRECATED__Text size="1" css={{ letterSpacing: 1.5, color: "inherit" }}>
{format(value)}
- </TextLegacy>
+ </__DEPRECATED__Text>
);
};
diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsx
index b508abd532..6ccab30c12 100644
--- a/apps/designer/app/designer/features/topbar/publish.tsx
+++ b/apps/designer/app/designer/features/topbar/publish.tsx
@@ -9,7 +9,7 @@ import {
PopoverContent,
PopoverTrigger,
TextField,
- TextLegacy,
+ __DEPRECATED__Text,
Label,
Link,
useId,
@@ -59,7 +59,7 @@ const Content = ({ project }: PublishButtonProps) => {
gap: "$0",
}}
>
- <TextLegacy
+ <__DEPRECATED__Text
css={{
whiteSpace: "nowrap",
overflow: "hidden",
@@ -67,7 +67,7 @@ const Content = ({ project }: PublishButtonProps) => {
}}
>
{`${domain}.${getHost()}`}{" "}
- </TextLegacy>
+ </__DEPRECATED__Text>
<ExternalLinkIcon />
</Link>
)}
@@ -77,7 +77,9 @@ const Content = ({ project }: PublishButtonProps) => {
<TextField id={id} name="domain" defaultValue={domain} />
</Flex>
{fetcher.data?.errors !== undefined && (
- <TextLegacy variant="red">{fetcher.data?.errors}</TextLegacy>
+ <__DEPRECATED__Text variant="red">
+ {fetcher.data?.errors}
+ </__DEPRECATED__Text>
)}
{fetcher.state === "idle" ? (
<Button variant="blue" type="submit">
@@ -99,7 +101,7 @@ export const PublishButton = ({ project }: PublishButtonProps) => {
<PopoverTrigger asChild aria-label="Publish">
<Button ghost css={{ display: "flex", gap: "$1" }}>
<RocketIcon />
- <TextLegacy size="1">Publish</TextLegacy>
+ <__DEPRECATED__Text size="1">Publish</__DEPRECATED__Text>
</Button>
</PopoverTrigger>
<Content project={project} />
diff --git a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
index 6c7b053e4f..66b042b0b0 100644
--- a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
+++ b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
@@ -2,7 +2,7 @@ import { createValueContainer, useValue } from "react-nano-state";
import {
Box,
Flex,
- TextLegacy,
+ __DEPRECATED__Text,
Collapsible,
} from "@webstudio-is/design-system";
import { ChevronDownIcon, ChevronRightIcon } from "@webstudio-is/icons";
@@ -59,9 +59,12 @@ export const CollapsibleSection = ({
}}
>
{isOpenFinal ? <ChevronDownIcon /> : <ChevronRightIcon />}
- <TextLegacy size="1" css={{ fontWeight: "500", flexGrow: 1 }}>
+ <__DEPRECATED__Text
+ size="1"
+ css={{ fontWeight: "500", flexGrow: 1 }}
+ >
{label}
- </TextLegacy>
+ </__DEPRECATED__Text>
{rightSlot}
</Flex>
</Collapsible.Trigger>
diff --git a/apps/designer/app/designer/shared/inspector/component-info.tsx b/apps/designer/app/designer/shared/inspector/component-info.tsx
index d7d4b6118b..44091b8f8d 100644
--- a/apps/designer/app/designer/shared/inspector/component-info.tsx
+++ b/apps/designer/app/designer/shared/inspector/component-info.tsx
@@ -1,5 +1,5 @@
import { components } from "@webstudio-is/react-sdk";
-import { Flex, TextLegacy } from "@webstudio-is/design-system";
+import { Flex, __DEPRECATED__Text } from "@webstudio-is/design-system";
import type { SelectedInstanceData } from "~/shared/canvas-components";
export const ComponentInfo = ({
@@ -9,7 +9,7 @@ export const ComponentInfo = ({
}) => {
return (
<Flex justify="between" align="center">
- <TextLegacy
+ <__DEPRECATED__Text
css={{
fontSize: "$2",
color: "$colors$slate11",
@@ -17,7 +17,7 @@ export const ComponentInfo = ({
}}
>{`Selected: ${
components[selectedInstanceData.component].label
- }`}</TextLegacy>
+ }`}</__DEPRECATED__Text>
</Flex>
);
};
diff --git a/apps/designer/app/designer/shared/tree/tree.tsx b/apps/designer/app/designer/shared/tree/tree.tsx
index 3257e75353..3764fb8ba0 100644
--- a/apps/designer/app/designer/shared/tree/tree.tsx
+++ b/apps/designer/app/designer/shared/tree/tree.tsx
@@ -2,7 +2,7 @@ import { useState, useMemo, useEffect } from "react";
import { type Instance, components } from "@webstudio-is/react-sdk";
import {
Flex,
- TextLegacy,
+ __DEPRECATED__Text,
Collapsible,
Button,
keyframes,
@@ -123,7 +123,7 @@ export const Tree = ({
}}
>
<Icon />
- <TextLegacy size="1">{label}</TextLegacy>
+ <__DEPRECATED__Text size="1">{label}</__DEPRECATED__Text>
</Button>
</Flex>
{children != null && <CollapsibleContent>{children}</CollapsibleContent>}
diff --git a/packages/design-system/src/components/text-legacy.tsx b/packages/design-system/src/components/deprecated/text.tsx
similarity index 97%
rename from packages/design-system/src/components/text-legacy.tsx
rename to packages/design-system/src/components/deprecated/text.tsx
index da7c8c6607..1bbe6b374b 100644
--- a/packages/design-system/src/components/text-legacy.tsx
+++ b/packages/design-system/src/components/deprecated/text.tsx
@@ -1,6 +1,6 @@
-import { styled } from "../stitches.config";
+import { styled } from "../../stitches.config";
-export const TextLegacy = styled("div", {
+export const __DEPRECATED__Text = styled("div", {
// Reset
lineHeight: "1",
margin: "0",
diff --git a/packages/design-system/src/components/heading.tsx b/packages/design-system/src/components/heading.tsx
index 04f759b806..706f05261e 100644
--- a/packages/design-system/src/components/heading.tsx
+++ b/packages/design-system/src/components/heading.tsx
@@ -1,14 +1,14 @@
import React from "react";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
import { VariantProps, CSS } from "../stitches.config";
import merge from "lodash.merge";
const DEFAULT_TAG = "h1";
-type TextSizeVariants = Pick<VariantProps<typeof TextLegacy>, "size">;
+type TextSizeVariants = Pick<VariantProps<typeof __DEPRECATED__Text>, "size">;
type HeadingSizeVariants = "1" | "2" | "3" | "4";
type HeadingVariants = { size?: HeadingSizeVariants } & Omit<
- VariantProps<typeof Text>,
+ VariantProps<typeof __DEPRECATED__Text>,
"size"
>;
type HeadingProps = React.ComponentProps<typeof DEFAULT_TAG> &
@@ -37,7 +37,7 @@ export const Heading = React.forwardRef<
};
return (
- <TextLegacy
+ <__DEPRECATED__Text
as={DEFAULT_TAG}
{...textProps}
ref={forwardedRef}
diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsx
index c49de66678..f24da5dfa0 100644
--- a/packages/design-system/src/components/label.tsx
+++ b/packages/design-system/src/components/label.tsx
@@ -1,8 +1,8 @@
import { styled } from "../stitches.config";
import * as LabelPrimitive from "@radix-ui/react-label";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
-export const Label = styled(LabelPrimitive.Root, TextLegacy, {
+export const Label = styled(LabelPrimitive.Root, __DEPRECATED__Text, {
display: "inline-block",
verticalAlign: "middle",
cursor: "default",
diff --git a/packages/design-system/src/components/link.tsx b/packages/design-system/src/components/link.tsx
index 625e9f2c38..701a3fc66a 100644
--- a/packages/design-system/src/components/link.tsx
+++ b/packages/design-system/src/components/link.tsx
@@ -1,5 +1,5 @@
import { styled } from "../stitches.config";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
export const Link = styled("a", {
alignItems: "center",
@@ -22,7 +22,7 @@ export const Link = styled("a", {
outlineOffset: "2px",
textDecorationLine: "none",
},
- [`& ${Text}`]: {
+ [`& ${__DEPRECATED__Text}`]: {
color: "inherit",
},
variants: {
diff --git a/packages/design-system/src/components/paragraph.tsx b/packages/design-system/src/components/paragraph.tsx
index e04e4ffaa5..a3882ec811 100644
--- a/packages/design-system/src/components/paragraph.tsx
+++ b/packages/design-system/src/components/paragraph.tsx
@@ -1,14 +1,14 @@
import React from "react";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
import { VariantProps, CSS } from "../stitches.config";
import merge from "lodash.merge";
const DEFAULT_TAG = "p";
-type TextSizeVariants = Pick<VariantProps<typeof TextLegacy>, "size">;
+type TextSizeVariants = Pick<VariantProps<typeof __DEPRECATED__Text>, "size">;
type ParagraphSizeVariants = "1" | "2";
type ParagraphVariants = { size?: ParagraphSizeVariants } & Omit<
- VariantProps<typeof TextLegacy>,
+ VariantProps<typeof __DEPRECATED__Text>,
"size"
>;
type ParagraphProps = React.ComponentProps<typeof DEFAULT_TAG> &
@@ -37,7 +37,7 @@ export const Paragraph = React.forwardRef<
},
};
return (
- <TextLegacy
+ <__DEPRECATED__Text
as={DEFAULT_TAG}
{...textProps}
ref={forwardedRef}
diff --git a/packages/design-system/src/components/tabs.tsx b/packages/design-system/src/components/tabs.tsx
index c6628ba12e..d1794bc1bd 100644
--- a/packages/design-system/src/components/tabs.tsx
+++ b/packages/design-system/src/components/tabs.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { styled, CSS } from "../stitches.config";
import * as TabsPrimitive from "@radix-ui/react-tabs";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
export const Tabs = styled(TabsPrimitive.Root, {
display: "flex",
@@ -28,7 +28,7 @@ export const TabsTrigger = styled(TabsPrimitive.Trigger, {
["&:first-child"]: {
paddingLeft: "$3",
},
- [`& > ${Text}`]: {
+ [`& > ${__DEPRECATED__Text}`]: {
color: "$gray9",
fontSize: "11px",
fontWeight: "600",
@@ -40,7 +40,7 @@ export const TabsTrigger = styled(TabsPrimitive.Trigger, {
},
'&[data-state="active"]': {
- [`& > ${Text}`]: {
+ [`& > ${__DEPRECATED__Text}`]: {
color: "$hiContrast",
},
},
diff --git a/packages/design-system/src/components/tooltip.tsx b/packages/design-system/src/components/tooltip.tsx
index 851b2e0a5c..5f3be0302a 100644
--- a/packages/design-system/src/components/tooltip.tsx
+++ b/packages/design-system/src/components/tooltip.tsx
@@ -2,7 +2,7 @@ import React, { Ref } from "react";
import { styled } from "../stitches.config";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { Box } from "./box";
-import { TextLegacy } from "./text-legacy";
+import { __DEPRECATED__Text } from "./deprecated/text";
import type { CSS } from "@webstudio-is/react-sdk";
type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root> &
@@ -71,7 +71,7 @@ export const Tooltip = React.forwardRef(function TooltipWrapper(
{...props}
multiline={multiline}
>
- <TextLegacy
+ <__DEPRECATED__Text
size="1"
as="p"
css={{
@@ -80,7 +80,7 @@ export const Tooltip = React.forwardRef(function TooltipWrapper(
}}
>
{content}
- </TextLegacy>
+ </__DEPRECATED__Text>
<Box css={{ color: "$transparentExtreme" }}>
<Arrow offset={5} width={11} height={5} />
</Box>
diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.ts
index ce3834398f..52818f5d52 100644
--- a/packages/design-system/src/index.ts
+++ b/packages/design-system/src/index.ts
@@ -62,5 +62,5 @@ export * from "./components/checkbox";
export * from "./components/avatar";
export * from "./components/primitives/dnd";
export * from "./components/separator";
-export * from "./components/text-legacy";
+export * from "./components/deprecated/text";
export * from "./components/text";