Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 2.0.0

- Moved IconWrapper component
- Clear icons directory before generete for update new icons
- Moved dependencies to dev dependencies
- Fixed export name conflict (For example: Rename Stars to AstronomyStars)
946 changes: 611 additions & 335 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solar-icon-set",
"version": "1.0.0",
"version": "2.0.0",
"description": "Solar Icon Set in react",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -184,17 +184,19 @@
"url": "https://github.com/480-Design/Solar-Icon-Set/issues"
},
"homepage": "https://github.com/480-Design/Solar-Icon-Set#readme",
"dependencies": {
"@svgr/core": "^6.5.1",
"@svgr/plugin-jsx": "^6.5.1",
"@svgr/plugin-svgo": "^6.5.1",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"axios": "^1.1.3",
"devDependencies": {
"@svgr/core": "^8.0.0",
"@svgr/plugin-jsx": "^8.0.1",
"@svgr/plugin-svgo": "^8.0.1",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.1.2",
"@types/react": "^18.2.6",
"axios": "^1.4.0",
"dotenv": "^16.0.3",
"figma-api": "^1.11.0",
"fs-extra": "^11.1.1",
"react": "^18.2.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
"typescript": "^5.0.4"
}
}
2 changes: 1 addition & 1 deletion src/icons/IconWrapper.tsx → src/IconWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { IconProps } from "../types";
import { IconProps } from "./types";

export const IconWrapper: React.FC<{ icon: React.ReactNode } & IconProps> = ({
icon,
Expand Down
6 changes: 5 additions & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import os from "os";
import * as Figma from "figma-api";
import axios from "axios";
import { transform } from "@svgr/core";
import * as fs from "fs-extra";

const icoDir = resolve(__dirname, "./icons");
//clear dir before
fs.emptyDirSync(icoDir);

dotenv.config();
const { token, fileId } = process.env;

Expand Down Expand Up @@ -137,7 +141,7 @@ const createIndex = ({
icons[c][n];
writeFileSync(
resolve(dir, `${n}.tsx`),
`import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../IconWrapper'; const ${n} = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: ${Broken}, LineDuotone: ${LineDuotone}, Linear: ${Linear}, Outline: ${Outline}, Bold: ${Bold}, BoldDuotone: ${BoldDuotone} }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default ${n}`
`import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../../IconWrapper'; const ${n} = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: ${Broken}, LineDuotone: ${LineDuotone}, Linear: ${Linear}, Outline: ${Outline}, Bold: ${Bold}, BoldDuotone: ${BoldDuotone} }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default ${n}`
);
});
createIndex({ dir, indexFileName: "index.tsx" });
Expand Down
2 changes: 1 addition & 1 deletion src/icons/Arrows/AltArrowDown.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../IconWrapper'; const AltArrowDown = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m12 15 .488.57a.75.75 0 0 1-.976 0L12 15Zm6.512-6.57a.75.75 0 1 1 .976 1.14l-.976-1.14Zm-14 1.14a.75.75 0 1 1 .976-1.14l-.976 1.14Zm3.31.86a.75.75 0 1 1-.977 1.14l.976-1.14Zm1.94 3.64a.75.75 0 1 1 .976-1.14l-.976 1.14Zm1.75.36 7-6 .976 1.14-7 6-.976-1.14Zm-6.024-6 2.333 2-.976 1.14-2.333-2 .976-1.14Zm5.25 4.5 1.75 1.5-.976 1.14-1.75-1.5.976-1.14Z" fill="currentColor" /></svg>, LineDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M19.488 9.57a.75.75 0 1 0-.976-1.14l.976 1.14ZM12 15l-.488.57c.28.24.695.24.976 0L12 15ZM5.488 8.43a.75.75 0 1 0-.976 1.14l.976-1.14Zm13.024 0-7 6 .976 1.14 7-6-.976-1.14Zm-6.024 6-7-6-.976 1.14 7 6 .976-1.14Z" fill="currentColor" /></svg>, Linear: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M19.488 9.57a.75.75 0 1 0-.976-1.14l.976 1.14ZM12 15l-.488.57c.28.24.695.24.976 0L12 15ZM5.488 8.43a.75.75 0 1 0-.976 1.14l.976-1.14Zm13.024 0-7 6 .976 1.14 7-6-.976-1.14Zm-6.024 6-7-6-.976 1.14 7 6 .976-1.14Z" fill="currentColor" /></svg>, Outline: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path fillRule="evenodd" clipRule="evenodd" d="M4.43 8.512a.75.75 0 0 1 1.058-.081L12 14.012l6.512-5.581a.75.75 0 0 1 .976 1.138l-7 6a.75.75 0 0 1-.976 0l-7-6a.75.75 0 0 1-.081-1.057Z" fill="currentColor" /></svg>, Bold: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m12.37 15.835 6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" fill="currentColor" /></svg>, BoldDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m8.303 12.404 3.327 3.431c.213.22.527.22.74 0l6.43-6.63C19.201 8.79 18.958 8 18.43 8h-5.723l-4.404 4.404Z" fill="currentColor" /><path opacity={0.5} d="M11.293 8H5.57c-.528 0-.771.79-.37 1.205l2.406 2.481L11.293 8Z" fill="currentColor" /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowDown
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../../IconWrapper'; const AltArrowDown = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m19 9-7 6-1.75-1.5M5 9l2.333 2" /></svg>, LineDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m19 9-7 6-7-6" /></svg>, Linear: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m19 9-7 6-7-6" /></svg>, Outline: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" fillRule="evenodd" d="M4.43 8.512a.75.75 0 0 1 1.058-.081L12 14.012l6.512-5.581a.75.75 0 0 1 .976 1.138l-7 6a.75.75 0 0 1-.976 0l-7-6a.75.75 0 0 1-.081-1.057Z" clipRule="evenodd" /></svg>, Bold: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="m12.37 15.835 6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" /></svg>, BoldDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="m8.303 12.404 3.327 3.431c.213.22.527.22.74 0l6.43-6.63C19.201 8.79 18.958 8 18.43 8h-5.723l-4.404 4.404Z" /><path fill="currentColor" d="M11.293 8H5.57c-.528 0-.771.79-.37 1.205l2.406 2.481L11.293 8Z" opacity={0.5} /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowDown
2 changes: 1 addition & 1 deletion src/icons/Arrows/AltArrowLeft.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../IconWrapper'; const AltArrowLeft = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m9 12-.57-.488a.75.75 0 0 0 0 .976L9 12Zm5.43 7.488a.75.75 0 1 0 1.14-.976l-1.14.976Zm1.14-14a.75.75 0 1 0-1.14-.976l1.14.976Zm-3.14 1.357a.75.75 0 1 0 1.14.976l-1.14-.976Zm-1.36 3.893a.75.75 0 1 0-1.14-.976l1.14.976Zm-2.64 1.75 6 7 1.14-.976-6-7-1.14.976Zm6-7.976-2 2.333 1.14.976 2-2.333-1.14-.976Zm-4.5 5.25-1.5 1.75 1.14.976 1.5-1.75-1.14-.976Z" fill="currentColor" /></svg>, LineDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M15.57 5.488a.75.75 0 1 0-1.14-.976l1.14.976ZM9 12l-.57-.488a.75.75 0 0 0 0 .976L9 12Zm5.43 7.488a.75.75 0 1 0 1.14-.976l-1.14.976Zm0-14.976-6 7 1.14.976 6-7-1.14-.976Zm-6 7.976 6 7 1.14-.976-6-7-1.14.976Z" fill="currentColor" /></svg>, Linear: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M15.57 5.488a.75.75 0 1 0-1.14-.976l1.14.976ZM9 12l-.57-.488a.75.75 0 0 0 0 .976L9 12Zm5.43 7.488a.75.75 0 1 0 1.14-.976l-1.14.976Zm0-14.976-6 7 1.14.976 6-7-1.14-.976Zm-6 7.976 6 7 1.14-.976-6-7-1.14.976Z" fill="currentColor" /></svg>, Outline: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path fillRule="evenodd" clipRule="evenodd" d="M15.488 4.43a.75.75 0 0 1 .081 1.058L9.988 12l5.581 6.512a.75.75 0 1 1-1.138.976l-6-7a.75.75 0 0 1 0-.976l6-7a.75.75 0 0 1 1.057-.081Z" fill="currentColor" /></svg>, Bold: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m8.165 11.63 6.63-6.43C15.21 4.799 16 5.042 16 5.57v12.86c0 .528-.79.771-1.205.37l-6.63-6.43a.499.499 0 0 1 0-.74Z" fill="currentColor" /></svg>, BoldDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M11.596 8.303 8.165 11.63a.499.499 0 0 0 0 .74l6.63 6.43c.414.401 1.205.158 1.205-.37v-5.723l-4.404-4.404Z" fill="currentColor" /><path opacity={0.5} d="M16 11.293V5.57c0-.528-.791-.771-1.205-.37l-2.482 2.406L16 11.293Z" fill="currentColor" /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowLeft
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../../IconWrapper'; const AltArrowLeft = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m15 19-6-7 1.5-1.75M15 5l-2 2.333" /></svg>, LineDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m15 5-6 7 6 7" /></svg>, Linear: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m15 5-6 7 6 7" /></svg>, Outline: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" fillRule="evenodd" d="M15.488 4.43a.75.75 0 0 1 .081 1.058L9.988 12l5.581 6.512a.75.75 0 1 1-1.138.976l-6-7a.75.75 0 0 1 0-.976l6-7a.75.75 0 0 1 1.057-.081Z" clipRule="evenodd" /></svg>, Bold: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="m8.165 11.63 6.63-6.43C15.21 4.799 16 5.042 16 5.57v12.86c0 .528-.79.771-1.205.37l-6.63-6.43a.499.499 0 0 1 0-.74Z" /></svg>, BoldDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="M11.596 8.303 8.165 11.63a.499.499 0 0 0 0 .74l6.63 6.43c.414.401 1.205.158 1.205-.37v-5.723l-4.404-4.404Z" /><path fill="currentColor" d="M16 11.293V5.57c0-.528-.791-.771-1.205-.37l-2.482 2.406L16 11.293Z" opacity={0.5} /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowLeft
2 changes: 1 addition & 1 deletion src/icons/Arrows/AltArrowRight.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../IconWrapper'; const AltArrowRight = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M9.57 4.512a.75.75 0 1 0-1.14.976l1.14-.976ZM15 12l.57.488a.75.75 0 0 0 0-.976L15 12Zm-6.57 6.512a.75.75 0 1 0 1.14.976l-1.14-.976Zm2-10.69a.75.75 0 1 0 1.14-.977l-1.14.976Zm3.64 1.94a.75.75 0 1 0-1.14.976l1.14-.976Zm.36 1.75-6 7 1.14.976 6-7-1.14-.976Zm-6-6.024 2 2.333 1.14-.976-2-2.333-1.14.976Zm4.5 5.25 1.5 1.75 1.14-.976-1.5-1.75-1.14.976Z" fill="currentColor" /></svg>, LineDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M9.57 4.512a.75.75 0 1 0-1.14.976l1.14-.976ZM15 12l.57.488a.75.75 0 0 0 0-.976L15 12Zm-6.57 6.512a.75.75 0 1 0 1.14.976l-1.14-.976Zm0-13.024 6 7 1.14-.976-6-7-1.14.976Zm6 6.024-6 7 1.14.976 6-7-1.14-.976Z" fill="currentColor" /></svg>, Linear: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M9.57 4.512a.75.75 0 1 0-1.14.976l1.14-.976ZM15 12l.57.488a.75.75 0 0 0 0-.976L15 12Zm-6.57 6.512a.75.75 0 1 0 1.14.976l-1.14-.976Zm0-13.024 6 7 1.14-.976-6-7-1.14.976Zm6 6.024-6 7 1.14.976 6-7-1.14-.976Z" fill="currentColor" /></svg>, Outline: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path fillRule="evenodd" clipRule="evenodd" d="M8.512 4.43a.75.75 0 0 1 1.057.082l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.138-.976L14.012 12 8.431 5.488a.75.75 0 0 1 .08-1.057Z" fill="currentColor" /></svg>, Bold: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M15.835 11.63 9.205 5.2C8.79 4.799 8 5.042 8 5.57v12.86c0 .528.79.771 1.205.37l6.63-6.43a.498.498 0 0 0 0-.74Z" fill="currentColor" /></svg>, BoldDuotone: <svg width="inherit" height="inherit" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="m12.404 8.303 3.431 3.327c.22.213.22.527 0 .74l-6.63 6.43C8.79 19.201 8 18.958 8 18.43v-5.723l4.404-4.404Z" fill="currentColor" /><path opacity={0.5} d="M8 11.293V5.57c0-.528.79-.771 1.205-.37l2.481 2.406L8 11.293Z" fill="currentColor" /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowRight
import * as React from 'react'; import { IconProps } from '../../types'; import { IconWrapper } from '../../IconWrapper'; const AltArrowRight = (allProps: IconProps) => { const { svgProps: props, iconStyle, ...restProps } = allProps; const styles: { [style: string]: React.ReactNode } = { Broken: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m9 5 2 2.333M9 19l6-7-1.5-1.75" /></svg>, LineDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m9 5 6 7-6 7" /></svg>, Linear: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="m9 5 6 7-6 7" /></svg>, Outline: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" fillRule="evenodd" d="M8.512 4.43a.75.75 0 0 1 1.057.082l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.138-.976L14.012 12 8.431 5.488a.75.75 0 0 1 .08-1.057Z" clipRule="evenodd" /></svg>, Bold: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="M15.835 11.63 9.205 5.2C8.79 4.799 8 5.042 8 5.57v12.86c0 .528.79.771 1.205.37l6.63-6.43a.498.498 0 0 0 0-.74Z" /></svg>, BoldDuotone: <svg xmlns="http://www.w3.org/2000/svg" width="inherit" height="inherit" fill="none" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="m12.404 8.303 3.431 3.327c.22.213.22.527 0 .74l-6.63 6.43C8.79 19.201 8 18.958 8 18.43v-5.723l4.404-4.404Z" /><path fill="currentColor" d="M8 11.293V5.57c0-.528.79-.771 1.205-.37l2.481 2.406L8 11.293Z" opacity={0.5} /></svg> }; return <IconWrapper icon={styles[iconStyle || 'Linear']} {...restProps} /> }; export default AltArrowRight
Loading