Skip to content

Commit

Permalink
Merge pull request #32 from nebula-aac/add-svg-icons
Browse files Browse the repository at this point in the history
[svg] Added 9 icons from `meshmap`
  • Loading branch information
nebula-aac authored Aug 25, 2023
2 parents 02e216f + ef45ff0 commit 9e972fe
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/svg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
"build": "tsup --splitting true src/index.ts --format esm,cjs --dts --external react",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react",
"test": "jest",
"coverage": "jest --coverage"
Expand Down
19 changes: 19 additions & 0 deletions packages/svg/src/icons/CopyLinkIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { FC } from "react"
import { IconProps } from "./types"

export const CopyLinkIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 18 18"
{...props}
>
<path d="M6.354 5.5H4a3 3 0 0 0 0 6h3a3 3 0 0 0 2.83-4H9c-.086 0-.17.01-.25.031A2 2 0 0 1 7 10.5H4a2 2 0 1 1 0-4h1.535c.218-.376.495-.714.82-1z" />
<path d="M9 5.5a3 3 0 0 0-2.83 4h1.098A2 2 0 0 1 9 6.5h3a2 2 0 1 1 0 4h-1.535a4.02 4.02 0 0 1-.82 1H12a3 3 0 1 0 0-6H9z" />
</svg>
)
}

export default CopyLinkIcon
18 changes: 18 additions & 0 deletions packages/svg/src/icons/DataObjectIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from "react"
import { IconProps } from "./types"

export const DataObjectIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256"
{...props}
>
<path d="M54.79785,119.48535A34.95033,34.95033,0,0,1,49.05078,128a34.95033,34.95033,0,0,1,5.74707,8.51465C60,147.24414,60,159.8291,60,172c0,25.93652,1.84424,32,20,32a12,12,0,0,1,0,24c-19.14453,0-32.19775-6.90234-38.79785-20.51465C36,196.75586,36,184.1709,36,172c0-25.93652-1.84424-32-20-32a12,12,0,0,1,0-24c18.15576,0,20-6.06348,20-32,0-12.1709,0-24.75586,5.20215-35.48535C47.80225,34.90234,60.85547,28,80,28a12,12,0,0,1,0,24c-18.15576,0-20,6.06348-20,32C60,96.1709,60,108.75586,54.79785,119.48535ZM240,116c-18.15576,0-20-6.06348-20-32,0-12.1709,0-24.75586-5.20215-35.48535C208.19775,34.90234,195.14453,28,176,28a12,12,0,0,0,0,24c18.15576,0,20,6.06348,20,32,0,12.1709,0,24.75586,5.20215,35.48535A34.95033,34.95033,0,0,0,206.94922,128a34.95033,34.95033,0,0,0-5.74707,8.51465C196,147.24414,196,159.8291,196,172c0,25.93652-1.84424,32-20,32a12,12,0,0,0,0,24c19.14453,0,32.19775-6.90234,38.79785-20.51465C220,196.75586,220,184.1709,220,172c0-25.93652,1.84424-32,20-32a12,12,0,0,0,0-24Z" />
</svg>
)
}

export default DataObjectIcon
19 changes: 19 additions & 0 deletions packages/svg/src/icons/DeleteIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { FC } from "react"
import { IconProps } from "./types"

export const DeleteIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
{...props}
>
<path d="M0 0h24v24H0z" fill="none" />
<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" />
</svg>
)
}

export default DeleteIcon
20 changes: 20 additions & 0 deletions packages/svg/src/icons/DesignerBottomRightIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { FC } from "react"
import { IconProps } from "./types"

export const DesignerBottomRightIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 147 218"
{...props}
>
<path d="M0,123.3L70.2,0v93.4c-7.9,1.6-13.9,8.6-13.9,17c0,9.6,7.8,17.3,17.3,17.3s17.3-7.8,17.3-17.3 c0-8.5-6.2-15.6-14.3-17.1V0l70,123.5c-23,14.9-34.9,35.1-35.6,60.7H34.7C33.7,157.4,21.4,137.5,0,123.3z" />
<path d="M73.6,121.4c6,0,10.9-4.9,10.9-10.9c0-6-4.9-10.9-10.9-10.9s-10.9,4.9-10.9,10.9 C62.7,116.6,67.6,121.4,73.6,121.4z" />
<rect x="12.7" y="199.6" width="121.3" height="18.4" />
</svg>
)
}

export default DesignerBottomRightIcon
18 changes: 18 additions & 0 deletions packages/svg/src/icons/DoubleChevron.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from "react"
import { IconProps } from "./types"

export const DoubleChevronIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 17 20.6"
{...props}
>
<path d="M8.5,0L17,8.4l-2.2,2.2L8.4,4.3l-6.3,6.3L0,8.5L8.5,0z M8.5,10l8.5,8.5l-2.2,2.1l-6.4-6.3l-6.3,6.3L0,18.5L8.5,10z" />
</svg>
)
}

export default DoubleChevronIcon
18 changes: 18 additions & 0 deletions packages/svg/src/icons/FavoriteIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from "react"
import { IconProps } from "./types"

export const FavoriteIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
<path d="M0 0h24v24H0z" fill="none" />
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
</svg>
)
}

export default FavoriteIcon
18 changes: 18 additions & 0 deletions packages/svg/src/icons/TriangleIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from "react"
import { IconProps } from "./types"

export const TriangleIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 32 28.364"
{...props}
>
<path d="m18.603 2.181 11.967 20.727c1.12 1.939 -0.279 4.364 -2.519 4.364H4.116c-2.239 0 -3.638 -2.425 -2.519 -4.364L13.564 2.181c1.12 -1.939 3.919 -1.939 5.039 0Z" strokeWidth="1.4549333333333334" />
</svg>
)
}

export default TriangleIcon
19 changes: 19 additions & 0 deletions packages/svg/src/icons/VisibilityOffIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { FC } from "react"
import { IconProps } from "./types"

export const VisibilityOffIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
{...props}>
<svg>
<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"></path>
</svg>
</svg>
)
}

export default VisibilityOffIcon
20 changes: 20 additions & 0 deletions packages/svg/src/icons/VisibilityOnIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { FC } from "react"
import { IconProps } from "./types"

export const VisibilityOnIcon: FC<IconProps> = ({ width, height, ...props }) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
{...props}
>
<svg>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path>
</svg>
</svg>
)
}

export default VisibilityOnIcon
17 changes: 13 additions & 4 deletions packages/svg/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ export { default as CloudSavedIcon } from "./CloudSavedIcon";
export { default as CloudSavingIcon } from "./CloudSavingIcon";
export { default as ComponentIcon } from "./ComponentIcon";
export { default as CreateNewIcon } from "./CreateNewIcon";
export { default as CopyLinkIcon } from "./CopyLinkIcon";
export { default as DataObjectIcon } from "./DataObjectIcon";
export { default as DeleteIcon } from "./DeleteIcon";
export { default as DesignerBottomRightIcon } from "./DesignerBottomRightIcon";
export { default as DoubleChevron } from "./DoubleChevron";
export { default as DeployIcon } from "./DeployIcon";
export { default as DetailIcon } from "./DetailIcon";
export { default as DetailsIcon } from "./DetailsIcon";
export { default as FavoriteIcon } from "./FavoriteIcon";
export { default as FilterIcon } from "./FilterIcon";
export { default as FullScreenIconExit } from "./FullScreenExitIcon";
export { default as FullScreenIcon } from "./FullScreenIcon";
Expand All @@ -33,15 +39,18 @@ export { default as SaveAsIcon } from "./SaveAsIcon";
export { default as ScreenshotIcon } from "./ScreenshotIcon";
export { default as SettingsIcon } from "./SettingsIcon";
export { default as Star } from "./Star";
export * from "./FilledRectangleIcon";
export * from "./OutlinedRectangleIcon";
export * from "./FilledTallRoundedRectangleIcon";
export * from "./OutlinedTallRoundedRectangleIcon";
export { default as FilledRectangleIcon } from "./FilledRectangleIcon";
export { default as OutlinedRectangleIcon } from "./OutlinedRectangleIcon";
export { default as FilledTallRoundedRectangleIcon } from "./FilledTallRoundedRectangleIcon";
export { default as OutlinedTallRoundedRectangleIcon } from "./OutlinedTallRoundedRectangleIcon";
export { default as ToolkitIcon } from "./ToolkitIcon";
export { default as TriangleIcon } from "./TriangleIcon";
export { default as TouchAppIcon } from "./TouchAppIcon";
export { default as UndeployIcon } from "./UndeployIcon";
export { default as UndoIcon } from "./UndoIcon";
export { default as ValidateIcon } from "./ValidateIcon";
export { default as VisibilityOnIcon } from "./VisibilityOnIcon";
export { default as VisibilityOffIcon } from "./VisibilityOffIcon";
export { default as VisualizerSwitcherIcon } from "./VisualizerSwitcherIcon";
export { default as ZoomInIcon } from "./ZoomInIcon";
export { default as ZoomOutIcon } from "./ZoomOutIcon";

0 comments on commit 9e972fe

Please sign in to comment.