Skip to content

Commit

Permalink
chore(dashboard,icons): Update icons and switch icon in CategoryTree (m…
Browse files Browse the repository at this point in the history
…edusajs#10961)

Co-authored-by: Oli Juhl <[email protected]>
  • Loading branch information
kasperkristensen and olivermrbl authored Jan 15, 2025
1 parent d845adc commit 2a25b4d
Show file tree
Hide file tree
Showing 15 changed files with 293 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .changeset/weak-poems-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/icons": patch
"@medusajs/dashboard": patch
---

chore(icons,dashboard): Pull latest icons and update branch icon in category tree
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DotsSix,
FolderIllustration,
FolderOpenIllustration,
Swatch,
TagIllustration,
TriangleRightMini,
} from "@medusajs/icons"
import { Badge, clx, IconButton } from "@medusajs/ui"
Expand Down Expand Up @@ -136,7 +136,7 @@ const Icon = ({ childrenCount, collapsed, clone }: IconProps) => {
<FolderIllustration />
)
) : (
<Swatch className="text-ui-fg-muted" />
<TagIllustration />
)}
</div>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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(<HouseStar data-testid="icon" />)


const svgElement = screen.getByTestId("icon")

expect(svgElement).toBeInTheDocument()

cleanup()
})
})
Original file line number Diff line number Diff line change
@@ -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(<ShieldCheck data-testid="icon" />)


const svgElement = screen.getByTestId("icon")

expect(svgElement).toBeInTheDocument()

cleanup()
})
})
Original file line number Diff line number Diff line change
@@ -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(<TagIllustration data-testid="icon" />)


const svgElement = screen.getByTestId("icon")

expect(svgElement).toBeInTheDocument()

cleanup()
})
})
33 changes: 33 additions & 0 deletions packages/design-system/icons/src/components/house-star.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import * as React from "react"
import type { IconProps } from "../types"
const HouseStar = React.forwardRef<SVGSVGElement, IconProps>(
({ color = "currentColor", ...props }, ref) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={15}
height={15}
fill="none"
ref={ref}
{...props}
>
<path
stroke={color}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M13.056 7.008v-1.29c0-.277-.13-.539-.351-.707L8.038 1.465a.89.89 0 0 0-1.076 0L2.296 5.01a.89.89 0 0 0-.352.708v6.448c0 .981.796 1.777 1.778 1.777H6.42"
/>
<path
stroke={color}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="m10.903 8.708.892 1.808 1.997.29-1.445 1.408.341 1.989-1.785-.939-1.786.939.341-1.989-1.444-1.408 1.996-.29z"
/>
</svg>
)
}
)
HouseStar.displayName = "HouseStar"
export default HouseStar
3 changes: 3 additions & 0 deletions packages/design-system/icons/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
23 changes: 23 additions & 0 deletions packages/design-system/icons/src/components/shield-check.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as React from "react"
import type { IconProps } from "../types"
const ShieldCheck = React.forwardRef<SVGSVGElement, IconProps>(
({ color = "currentColor", ...props }, ref) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={15}
height={15}
fill="none"
ref={ref}
{...props}
>
<path
fill={color}
d="M12.64 2 7.974.507c-.31-.1-.638-.099-.948 0L2.36 2a1.55 1.55 0 0 0-1.081 1.482v5.796c0 3.118 4.396 4.781 5.742 5.217a1.56 1.56 0 0 0 .958 0c1.348-.435 5.744-2.098 5.744-5.216V3.482c0-.68-.434-1.275-1.082-1.482m-2.383 3.902-3.02 4a.67.67 0 0 1-.986.086l-1.43-1.333a.667.667 0 0 1 .908-.976l.89.829 2.574-3.41a.667.667 0 0 1 1.064.804"
/>
</svg>
)
}
)
ShieldCheck.displayName = "ShieldCheck"
export default ShieldCheck
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquareBlueSolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#60A5FA" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquareGreenSolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#10B981" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquareGreySolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#A1A1AA" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquareOrangeSolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#F97316" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquarePurpleSolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#A78BFA" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
13 changes: 7 additions & 6 deletions packages/design-system/icons/src/components/square-red-solid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const SquareRedSolid = React.forwardRef<SVGSVGElement, IconProps>(
>
<rect width={8} height={8} x={3.5} y={3.5} fill="#F43F5E" rx={2} />
<rect
width={7}
height={7}
x={4}
y={4}
width={7.5}
height={7.5}
x={3.75}
y={3.75}
stroke={color}
strokeOpacity={0.12}
rx={1.5}
strokeOpacity={0.24}
strokeWidth={0.5}
rx={1.75}
/>
</svg>
)
Expand Down
Loading

0 comments on commit 2a25b4d

Please sign in to comment.