From 2a25b4d95f2b7a4d53138718c94124f47f041b36 Mon Sep 17 00:00:00 2001 From: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:57:43 +0100 Subject: [PATCH] chore(dashboard,icons): Update icons and switch icon in CategoryTree (#10961) Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> --- .changeset/weak-poems-run.md | 6 + .../common/sortable-tree/tree-item.tsx | 4 +- .../components/__tests__/house-star.spec.tsx | 17 +++ .../__tests__/shield-check.spec.tsx | 17 +++ .../__tests__/tag-illustration.spec.tsx | 17 +++ .../icons/src/components/house-star.tsx | 33 +++++ .../icons/src/components/index.ts | 3 + .../icons/src/components/shield-check.tsx | 23 +++ .../src/components/square-blue-solid.tsx | 13 +- .../src/components/square-green-solid.tsx | 13 +- .../src/components/square-grey-solid.tsx | 13 +- .../src/components/square-orange-solid.tsx | 13 +- .../src/components/square-purple-solid.tsx | 13 +- .../icons/src/components/square-red-solid.tsx | 13 +- .../icons/src/components/tag-illustration.tsx | 133 ++++++++++++++++++ 15 files changed, 293 insertions(+), 38 deletions(-) create mode 100644 .changeset/weak-poems-run.md create mode 100644 packages/design-system/icons/src/components/__tests__/house-star.spec.tsx create mode 100644 packages/design-system/icons/src/components/__tests__/shield-check.spec.tsx create mode 100644 packages/design-system/icons/src/components/__tests__/tag-illustration.spec.tsx create mode 100644 packages/design-system/icons/src/components/house-star.tsx create mode 100644 packages/design-system/icons/src/components/shield-check.tsx create mode 100644 packages/design-system/icons/src/components/tag-illustration.tsx diff --git a/.changeset/weak-poems-run.md b/.changeset/weak-poems-run.md new file mode 100644 index 0000000000..40ca7dbabe --- /dev/null +++ b/.changeset/weak-poems-run.md @@ -0,0 +1,6 @@ +--- +"@medusajs/icons": patch +"@medusajs/dashboard": patch +--- + +chore(icons,dashboard): Pull latest icons and update branch icon in category tree diff --git a/packages/admin/dashboard/src/components/common/sortable-tree/tree-item.tsx b/packages/admin/dashboard/src/components/common/sortable-tree/tree-item.tsx index 1e455df246..1516e68a42 100644 --- a/packages/admin/dashboard/src/components/common/sortable-tree/tree-item.tsx +++ b/packages/admin/dashboard/src/components/common/sortable-tree/tree-item.tsx @@ -4,7 +4,7 @@ import { DotsSix, FolderIllustration, FolderOpenIllustration, - Swatch, + TagIllustration, TriangleRightMini, } from "@medusajs/icons" import { Badge, clx, IconButton } from "@medusajs/ui" @@ -136,7 +136,7 @@ const Icon = ({ childrenCount, collapsed, clone }: IconProps) => { ) ) : ( - + )} ) diff --git a/packages/design-system/icons/src/components/__tests__/house-star.spec.tsx b/packages/design-system/icons/src/components/__tests__/house-star.spec.tsx new file mode 100644 index 0000000000..79114305d8 --- /dev/null +++ b/packages/design-system/icons/src/components/__tests__/house-star.spec.tsx @@ -0,0 +1,17 @@ + import * as React from "react" + import { cleanup, render, screen } from "@testing-library/react" + + import HouseStar from "../house-star" + + describe("HouseStar", () => { + it("should render the icon without errors", async () => { + render() + + + const svgElement = screen.getByTestId("icon") + + expect(svgElement).toBeInTheDocument() + + cleanup() + }) + }) \ No newline at end of file diff --git a/packages/design-system/icons/src/components/__tests__/shield-check.spec.tsx b/packages/design-system/icons/src/components/__tests__/shield-check.spec.tsx new file mode 100644 index 0000000000..defb50cfd9 --- /dev/null +++ b/packages/design-system/icons/src/components/__tests__/shield-check.spec.tsx @@ -0,0 +1,17 @@ + import * as React from "react" + import { cleanup, render, screen } from "@testing-library/react" + + import ShieldCheck from "../shield-check" + + describe("ShieldCheck", () => { + it("should render the icon without errors", async () => { + render() + + + const svgElement = screen.getByTestId("icon") + + expect(svgElement).toBeInTheDocument() + + cleanup() + }) + }) \ No newline at end of file diff --git a/packages/design-system/icons/src/components/__tests__/tag-illustration.spec.tsx b/packages/design-system/icons/src/components/__tests__/tag-illustration.spec.tsx new file mode 100644 index 0000000000..842b222e16 --- /dev/null +++ b/packages/design-system/icons/src/components/__tests__/tag-illustration.spec.tsx @@ -0,0 +1,17 @@ + import * as React from "react" + import { cleanup, render, screen } from "@testing-library/react" + + import TagIllustration from "../tag-illustration" + + describe("TagIllustration", () => { + it("should render the icon without errors", async () => { + render() + + + const svgElement = screen.getByTestId("icon") + + expect(svgElement).toBeInTheDocument() + + cleanup() + }) + }) \ No newline at end of file diff --git a/packages/design-system/icons/src/components/house-star.tsx b/packages/design-system/icons/src/components/house-star.tsx new file mode 100644 index 0000000000..97c8b81ac9 --- /dev/null +++ b/packages/design-system/icons/src/components/house-star.tsx @@ -0,0 +1,33 @@ +import * as React from "react" +import type { IconProps } from "../types" +const HouseStar = React.forwardRef( + ({ color = "currentColor", ...props }, ref) => { + return ( + + + + + ) + } +) +HouseStar.displayName = "HouseStar" +export default HouseStar diff --git a/packages/design-system/icons/src/components/index.ts b/packages/design-system/icons/src/components/index.ts index a56759909d..33c5637ada 100644 --- a/packages/design-system/icons/src/components/index.ts +++ b/packages/design-system/icons/src/components/index.ts @@ -177,6 +177,7 @@ export { default as Hashtag } from "./hashtag" export { default as HeartBroken } from "./heart-broken" export { default as Heart } from "./heart" export { default as History } from "./history" +export { default as HouseStar } from "./house-star" export { default as House } from "./house" export { default as InboxSolid } from "./inbox-solid" export { default as InformationCircleSolid } from "./information-circle-solid" @@ -253,6 +254,7 @@ export { default as ServerStackSolid } from "./server-stack-solid" export { default as ServerStack } from "./server-stack" export { default as Server } from "./server" export { default as Share } from "./share" +export { default as ShieldCheck } from "./shield-check" export { default as Shipbob } from "./shipbob" export { default as ShoppingBag } from "./shopping-bag" export { default as ShoppingCartSolid } from "./shopping-cart-solid" @@ -287,6 +289,7 @@ export { default as SunSolid } from "./sun-solid" export { default as Sun } from "./sun" export { default as SwatchSolid } from "./swatch-solid" export { default as Swatch } from "./swatch" +export { default as TagIllustration } from "./tag-illustration" export { default as TagSolid } from "./tag-solid" export { default as Tag } from "./tag" export { default as Tailwind } from "./tailwind" diff --git a/packages/design-system/icons/src/components/shield-check.tsx b/packages/design-system/icons/src/components/shield-check.tsx new file mode 100644 index 0000000000..123f753f59 --- /dev/null +++ b/packages/design-system/icons/src/components/shield-check.tsx @@ -0,0 +1,23 @@ +import * as React from "react" +import type { IconProps } from "../types" +const ShieldCheck = React.forwardRef( + ({ color = "currentColor", ...props }, ref) => { + return ( + + + + ) + } +) +ShieldCheck.displayName = "ShieldCheck" +export default ShieldCheck diff --git a/packages/design-system/icons/src/components/square-blue-solid.tsx b/packages/design-system/icons/src/components/square-blue-solid.tsx index 76698731f3..d03e862473 100644 --- a/packages/design-system/icons/src/components/square-blue-solid.tsx +++ b/packages/design-system/icons/src/components/square-blue-solid.tsx @@ -13,13 +13,14 @@ const SquareBlueSolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/square-green-solid.tsx b/packages/design-system/icons/src/components/square-green-solid.tsx index 43ac6e4dc5..2dd1884067 100644 --- a/packages/design-system/icons/src/components/square-green-solid.tsx +++ b/packages/design-system/icons/src/components/square-green-solid.tsx @@ -13,13 +13,14 @@ const SquareGreenSolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/square-grey-solid.tsx b/packages/design-system/icons/src/components/square-grey-solid.tsx index 44d73db761..57447ddb2c 100644 --- a/packages/design-system/icons/src/components/square-grey-solid.tsx +++ b/packages/design-system/icons/src/components/square-grey-solid.tsx @@ -13,13 +13,14 @@ const SquareGreySolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/square-orange-solid.tsx b/packages/design-system/icons/src/components/square-orange-solid.tsx index f2cec51cdc..65dbc7360d 100644 --- a/packages/design-system/icons/src/components/square-orange-solid.tsx +++ b/packages/design-system/icons/src/components/square-orange-solid.tsx @@ -13,13 +13,14 @@ const SquareOrangeSolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/square-purple-solid.tsx b/packages/design-system/icons/src/components/square-purple-solid.tsx index 8bc3bc4aa3..8ded5ff77a 100644 --- a/packages/design-system/icons/src/components/square-purple-solid.tsx +++ b/packages/design-system/icons/src/components/square-purple-solid.tsx @@ -13,13 +13,14 @@ const SquarePurpleSolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/square-red-solid.tsx b/packages/design-system/icons/src/components/square-red-solid.tsx index df33a4c63f..9bdf2bd233 100644 --- a/packages/design-system/icons/src/components/square-red-solid.tsx +++ b/packages/design-system/icons/src/components/square-red-solid.tsx @@ -13,13 +13,14 @@ const SquareRedSolid = React.forwardRef( > ) diff --git a/packages/design-system/icons/src/components/tag-illustration.tsx b/packages/design-system/icons/src/components/tag-illustration.tsx new file mode 100644 index 0000000000..73e97da437 --- /dev/null +++ b/packages/design-system/icons/src/components/tag-illustration.tsx @@ -0,0 +1,133 @@ +import * as React from "react" +import type { IconProps } from "../types" +const TagIllustration = React.forwardRef( + ({ color = "currentColor", ...props }, ref) => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) + } +) +TagIllustration.displayName = "TagIllustration" +export default TagIllustration