Skip to content

Commit

Permalink
Drop radix icons (#1350)
Browse files Browse the repository at this point in the history
We have all icons in figma. Here replaced with alternatives or exported
from figma. See diff.
  • Loading branch information
TrySound authored Apr 3, 2023
1 parent 98b92c1 commit c5c90f6
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
DeprecatedIconButton,
} from "@webstudio-is/design-system";
import { toValue } from "@webstudio-is/css-engine";
import { DotFilledIcon } from "@webstudio-is/icons";
import { DotIcon } from "@webstudio-is/icons";
import type { CreateBatchUpdate } from "../../../shared/use-style-data";
import { getStyleSource, type StyleInfo } from "../../../shared/style-info";
import { theme } from "@webstudio-is/design-system";
Expand Down Expand Up @@ -110,7 +110,7 @@ export const FlexGrid = ({
batchUpdate.publish();
}}
>
<DotFilledIcon />
<DotIcon />
</DeprecatedIconButton>
</Flex>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useState } from "react";
import { Flex, Button, Collapsible } from "@webstudio-is/design-system";
import { TriangleDownIcon, TriangleRightIcon } from "@webstudio-is/icons";
import {
ChevronFilledDownIcon,
ChevronFilledRightIcon,
} from "@webstudio-is/icons";

export const ShowMore = ({
styleConfigs,
Expand All @@ -17,7 +20,9 @@ export const ShowMore = ({
<Collapsible.Trigger asChild>
<Button
css={{ width: "100%" }}
prefix={isOpen ? <TriangleDownIcon /> : <TriangleRightIcon />}
prefix={
isOpen ? <ChevronFilledDownIcon /> : <ChevronFilledRightIcon />
}
>
Show more
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "~/builder/shared/assets";
import { useEffect, useMemo, useState } from "react";
import { useMenu } from "./item-menu";
import { CheckIcon } from "@webstudio-is/icons";
import { CheckMarkIcon } from "@webstudio-is/icons";
import {
type Item,
filterIdsByFamily,
Expand Down Expand Up @@ -140,7 +140,7 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {
return (
<ListItem
{...itemProps}
prefix={itemProps.current ? <CheckIcon /> : undefined}
prefix={itemProps.current ? <CheckMarkIcon /> : undefined}
suffix={item.type === "uploaded" ? renderMenu(index) : undefined}
>
{item.label}
Expand Down
8 changes: 4 additions & 4 deletions packages/design-system/src/components/list.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ComponentStory } from "@storybook/react";
import { CheckIcon, MenuIcon } from "@webstudio-is/icons";
import { CheckMarkIcon, MenuIcon } from "@webstudio-is/icons";
import { useState } from "react";
import { List, ListItem, useList } from "./list";

Expand All @@ -13,11 +13,11 @@ export const Declarative: ComponentStory<typeof List> = () => {
<ListItem>Apple</ListItem>
<ListItem state="disabled">Banana</ListItem>
<ListItem state="selected">Orange</ListItem>
<ListItem prefix={<CheckIcon />} suffix={<MenuIcon />}>
<ListItem prefix={<CheckMarkIcon />} suffix={<MenuIcon />}>
Strawberry
</ListItem>
<ListItem
prefix={<CheckIcon />}
prefix={<CheckMarkIcon />}
suffix={<MenuIcon />}
current
state="selected"
Expand Down Expand Up @@ -47,7 +47,7 @@ export const WithHook: ComponentStory<typeof List> = () => {
<ListItem
{...itemProps}
key={index}
prefix={itemProps.current ? <CheckIcon /> : undefined}
prefix={itemProps.current ? <CheckMarkIcon /> : undefined}
>
{item}
</ListItem>
Expand Down
8 changes: 1 addition & 7 deletions packages/design-system/src/components/toast.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import * as ToastPrimitive from "@radix-ui/react-toast";
import toast, { useToaster } from "react-hot-toast/headless";
import { keyframes, styled } from "../stitches.config";
import {
CheckCircledIcon,
CrossCircledIcon,
InfoIcon,
} from "@webstudio-is/icons";
import { InfoIcon } from "@webstudio-is/icons";
import { Box } from "./box";
import { theme } from "../stitches.config";

Expand Down Expand Up @@ -118,8 +114,6 @@ export const Toaster = () => {
},
}}
>
{toast.type === "success" && <CheckCircledIcon />}
{toast.type === "error" && <CrossCircledIcon />}
{toast.type === "blank" && <InfoIcon />}
</Box>
<StyledTitle>{toast.message}</StyledTitle>
Expand Down
7 changes: 5 additions & 2 deletions packages/design-system/src/components/tree/tree-node.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useCallback, useRef, useEffect, useMemo, useState } from "react";
import { TriangleRightIcon, TriangleDownIcon } from "@webstudio-is/icons";
import {
ChevronFilledDownIcon,
ChevronFilledRightIcon,
} from "@webstudio-is/icons";
import { cssVars } from "@webstudio-is/css-vars";
import { Box } from "../box";
import * as Collapsible from "@radix-ui/react-collapsible";
Expand Down Expand Up @@ -366,7 +369,7 @@ export const TreeItemBody = <Data extends { id: string }>({
// We don't want this trigger to be focusable
tabIndex={-1}
>
{isExpanded ? <TriangleDownIcon /> : <TriangleRightIcon />}
{isExpanded ? <ChevronFilledDownIcon /> : <ChevronFilledRightIcon />}
</CollapsibleTrigger>
)}

Expand Down
8 changes: 4 additions & 4 deletions packages/icons/icons/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/icons/icons/external-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"react-dom": "^17.0.2"
},
"dependencies": {
"@radix-ui/react-icons": "^1.1.0",
"@webstudio-is/css-vars": "workspace:^",
"react": "^17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/src/__generated__/alert.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions packages/icons/src/__generated__/external-link.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/icons/src/__generated__/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions packages/icons/src/external-link.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/icons/src/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as icons from "./index";
import * as legacyIcons from "./legacy";

export const Icons = ({ testColor }: { testColor: boolean }) => {
return (
Expand Down Expand Up @@ -45,7 +44,6 @@ export const Icons = ({ testColor }: { testColor: boolean }) => {
}}
>
{name.replace(/Icon$/, "")}
{name in legacyIcons && " (legacy)"}
</div>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion packages/icons/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./legacy";
export * from "./__generated__";
export * from "./list-nested";
export * from "./undo";
Expand Down
13 changes: 0 additions & 13 deletions packages/icons/src/legacy.ts

This file was deleted.

11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5c90f6

Please sign in to comment.