Skip to content

Commit

Permalink
feat(icons): update (#124)
Browse files Browse the repository at this point in the history
- build(scripts): remove id & data-name props in generated icons
- feat(icons): update
  • Loading branch information
ivangabriele authored Dec 14, 2022
1 parent e6b03ce commit 81f3287
Show file tree
Hide file tree
Showing 68 changed files with 312 additions and 1,046 deletions.
5 changes: 4 additions & 1 deletion scripts/icons/generateIcons.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ async function generateIcon({ count, index, svgIconPath, template }) {

const svgIconSource = await fs.readFile(svgIconPath, 'utf-8')
const svgIconWithCurrentColor = svgIconSource.replace(/#707785/g, 'currentColor')
const svgIconSourceWithoutExtraneousProps = svgIconWithCurrentColor.replace(/ (xlink|xmlns)[^ ]+"/g, '')
const svgIconSourceWithoutExtraneousProps = svgIconWithCurrentColor
.replace(/ (xlink|xmlns)[^ ]+"/g, '')
.replace(/ data-name="[^"]*"/g, '')
.replace(/ id="[^"]*"/g, '')
const svgIconSourceWithProps = svgIconSourceWithoutExtraneousProps.replace(/>/, ` {...nativeProps}>`)
const tsxIconSource = template
.replace(/\/\*ICON_NAME\*\//g, iconName)
Expand Down
10 changes: 10 additions & 0 deletions src/assets/icons/FilterBis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 4 additions & 17 deletions src/icons/ActivityFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ export function ActivityFeed({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Activity_feed" transform="translate(40 -41)">
<g data-name="Groupe 4181" id="Groupe_4181">
<g transform="translate(40 -41)">
<g>
<g
data-name="Rectangle 6156"
fill="none"
id="Rectangle_6156"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
Expand All @@ -21,9 +19,7 @@ export function ActivityFeed({ color, size, ...nativeProps }: IconProps) {
<rect fill="none" height="9" x="1" y="1" />
</g>
<g
data-name="Rectangle 6157"
fill="none"
id="Rectangle_6157"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
Expand All @@ -33,9 +29,7 @@ export function ActivityFeed({ color, size, ...nativeProps }: IconProps) {
<rect fill="none" height="6" x="1" y="1" />
</g>
<g
data-name="Rectangle 6158"
fill="none"
id="Rectangle_6158"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
Expand All @@ -44,7 +38,7 @@ export function ActivityFeed({ color, size, ...nativeProps }: IconProps) {
<rect height="10" stroke="none" width="2" />
<rect fill="none" height="8" x="1" y="1" />
</g>
<g data-name="Tracé 1406" fill="none" id="Tracé_1406" strokeMiterlimit="10">
<g fill="none" strokeMiterlimit="10">
<path
d="M-34,51a1.994,1.994,0,0,0-1-1.723V46.723A1.994,1.994,0,0,0-34,45a2,2,0,0,0-2-2,2,2,0,0,0-2,2,1.994,1.994,0,0,0,1,1.723v2.554A1.994,1.994,0,0,0-38,51a1.994,1.994,0,0,0,1,1.723v2.554A1.994,1.994,0,0,0-38,57a2,2,0,0,0,2,2,2,2,0,0,0,2-2,1.994,1.994,0,0,0-1-1.723V52.723A1.994,1.994,0,0,0-34,51Z"
stroke="none"
Expand All @@ -56,14 +50,7 @@ export function ActivityFeed({ color, size, ...nativeProps }: IconProps) {
/>
</g>
</g>
<rect
data-name="Rectangle 6159"
fill="none"
height="20"
id="Rectangle_6159"
transform="translate(-40 41)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-40 41)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
13 changes: 2 additions & 11 deletions src/icons/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ export function Alert({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Alert" transform="translate(-220 -208)">
<g transform="translate(-220 -208)">
<path
d="M295,13V8a5,5,0,0,0-4-4.9V1h-2V3.1A5,5,0,0,0,285,8v5l-2,2v2h4.5a2.5,2.5,0,0,0,5,0H297V15Zm-5,5a1,1,0,0,1-1-1h2A1,1,0,0,1,290,18Zm1.486-3H285l2-2V8a3,3,0,0,1,6,0v5l2,2Z"
data-name="Tracé 1348"
fill="currentColor"
id="Tracé_1348"
transform="translate(-60 208)"
/>
<rect
data-name="Rectangle 6090"
fill="none"
height="20"
id="Rectangle_6090"
transform="translate(220 208)"
width="20"
/>
<rect fill="none" height="20" transform="translate(220 208)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
6 changes: 2 additions & 4 deletions src/icons/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import type { IconProps } from '../types'
export function Anchor({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" id="Anchor" viewBox="0 0 20 20" width="20" {...nativeProps}>
<rect data-name="Rectangle 6300" fill="none" height="20" id="Rectangle_6300" width="20" />
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<rect fill="none" height="20" width="20" />
<path
d="M14.6,12.7l1.395,1.4A7.258,7.258,0,0,1,11,17.128V10h3V8H11V6.816a3,3,0,1,0-2,0V8H6v2H9v7.087A7.2,7.2,0,0,1,4.2,14.1L5.6,12.7,2,10v2.7C2,16.192,6.428,19,10.1,19s8.1-2.808,8.1-6.3V10ZM10,3A1,1,0,1,1,9,4,1,1,0,0,1,10,3Z"
data-name="Tracé 1464"
fill="currentColor"
id="Tracé_1464"
/>
</svg>
</IconBox>
Expand Down
28 changes: 4 additions & 24 deletions src/icons/Archive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,13 @@ export function Archive({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Archive" transform="translate(-120)">
<path
d="M138,2H122V8h1V18h14V8h1ZM124,4h12V6H124Zm11,12H125V8h10Z"
data-name="Tracé 1343"
fill="currentColor"
id="Tracé_1343"
/>
<g
data-name="Rectangle 6082"
fill="none"
id="Rectangle_6082"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
transform="translate(128 10)"
>
<g transform="translate(-120)">
<path d="M138,2H122V8h1V18h14V8h1ZM124,4h12V6H124Zm11,12H125V8h10Z" fill="currentColor" />
<g fill="none" stroke="currentColor" strokeMiterlimit="10" strokeWidth="2" transform="translate(128 10)">
<rect height="2" stroke="none" width="4" />
<rect fill="none" width="2" x="1" y="1" />
</g>
<rect
data-name="Rectangle 6083"
fill="none"
height="20"
id="Rectangle_6083"
transform="translate(120)"
width="20"
/>
<rect fill="none" height="20" transform="translate(120)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
19 changes: 4 additions & 15 deletions src/icons/Attention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export function Attention({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Attention" transform="translate(200 -82)">
<g data-name="Groupe 4155" id="Groupe_4155">
<g data-name="Tracé 1376" fill="none" id="Tracé_1376" strokeMiterlimit="10">
<g transform="translate(200 -82)">
<g>
<g fill="none" strokeMiterlimit="10">
<path
d="M-190,83a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-190,83Zm0,16a7,7,0,0,1-7-7,7,7,0,0,1,7-7,7,7,0,0,1,7,7A7,7,0,0,1-190,99Z"
stroke="none"
Expand All @@ -20,9 +20,7 @@ export function Attention({ color, size, ...nativeProps }: IconProps) {
/>
</g>
<g
data-name="Rectangle 6126"
fill="none"
id="Rectangle_6126"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
Expand All @@ -32,9 +30,7 @@ export function Attention({ color, size, ...nativeProps }: IconProps) {
<rect fill="none" height="3" x="1" y="1" />
</g>
<g
data-name="Rectangle 6127"
fill="none"
id="Rectangle_6127"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
Expand All @@ -44,14 +40,7 @@ export function Attention({ color, size, ...nativeProps }: IconProps) {
<rect fill="none" x="1" y="1" />
</g>
</g>
<rect
data-name="Rectangle 6128"
fill="none"
height="20"
id="Rectangle_6128"
transform="translate(-200 82)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-200 82)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
25 changes: 5 additions & 20 deletions src/icons/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,22 @@ export function Calendar({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Calendar" transform="translate(280 -41)">
<g data-name="Groupe 4137" id="Groupe_4137">
<g data-name="Tracé 1365" fill="none" id="Tracé_1365" strokeMiterlimit="10">
<g transform="translate(280 -41)">
<g>
<g fill="none" strokeMiterlimit="10">
<path d="M-266,44V42h-2v2h-4V42h-2v2h-4V59h16V44Zm2,13h-12V50h12Zm0-9h-12V46h12Z" stroke="none" />
<path
d="M -274 42 L -272 42 L -272 44 L -268 44 L -268 42 L -266 42 L -266 44 L -262 44 L -262 59 L -278 59 L -278 44 L -274 44 L -274 42 Z M -264 48 L -264 46 L -276 46 L -276 48 L -264 48 Z M -264 57 L -264 50 L -276 50 L -276 57 L -264 57 Z"
fill="currentColor"
stroke="none"
/>
</g>
<g
data-name="Rectangle 6103"
fill="none"
id="Rectangle_6103"
stroke="currentColor"
strokeMiterlimit="10"
strokeWidth="2"
transform="translate(-274 52)"
>
<g fill="none" stroke="currentColor" strokeMiterlimit="10" strokeWidth="2" transform="translate(-274 52)">
<rect height="3" stroke="none" width="4" />
<rect fill="none" height="1" width="2" x="1" y="1" />
</g>
</g>
<rect
data-name="Rectangle 6104"
fill="none"
height="20"
id="Rectangle_6104"
transform="translate(-280 41)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-280 41)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
13 changes: 3 additions & 10 deletions src/icons/Check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export function Check({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Check" transform="translate(40 -82)">
<g data-name="Tracé 1379" fill="none" id="Tracé_1379" strokeMiterlimit="10">
<g transform="translate(40 -82)">
<g fill="none" strokeMiterlimit="10">
<path
d="M-23.99,86.7l-7.778,7.778-4.243-4.243-1.414,1.414,4.243,4.243,1.414,1.414,9.192-9.192Z"
stroke="none"
Expand All @@ -18,14 +18,7 @@ export function Check({ color, size, ...nativeProps }: IconProps) {
stroke="none"
/>
</g>
<rect
data-name="Rectangle 6133"
fill="none"
height="20"
id="Rectangle_6133"
transform="translate(-40 82)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-40 82)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
13 changes: 3 additions & 10 deletions src/icons/Chevron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export function Chevron({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Chevron" transform="translate(0 -82)">
<g data-name="Tracé 1380" fill="none" id="Tracé_1380" strokeMiterlimit="10">
<g transform="translate(0 -82)">
<g fill="none" strokeMiterlimit="10">
<path
d="M16.585,87.293,10,93.878,3.415,87.293,2,88.707l6.585,6.585L10,96.707l1.415-1.415L18,88.707Z"
stroke="none"
Expand All @@ -18,14 +18,7 @@ export function Chevron({ color, size, ...nativeProps }: IconProps) {
stroke="none"
/>
</g>
<rect
data-name="Rectangle 6134"
fill="none"
height="20"
id="Rectangle_6134"
transform="translate(0 82)"
width="20"
/>
<rect fill="none" height="20" transform="translate(0 82)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
17 changes: 5 additions & 12 deletions src/icons/Clock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export function Clock({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Clock" transform="translate(240 -41)">
<g data-name="Groupe 4139" id="Groupe_4139">
<g data-name="Tracé 1366" fill="none" id="Tracé_1366" strokeMiterlimit="10">
<g transform="translate(240 -41)">
<g>
<g fill="none" strokeMiterlimit="10">
<path
d="M-230,42a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-230,42Zm0,16a7,7,0,0,1-7-7,7,7,0,0,1,7-7,7,7,0,0,1,7,7A7,7,0,0,1-230,58Z"
stroke="none"
Expand All @@ -19,7 +19,7 @@ export function Clock({ color, size, ...nativeProps }: IconProps) {
stroke="none"
/>
</g>
<g data-name="Tracé 1367" fill="none" id="Tracé_1367" strokeMiterlimit="10">
<g fill="none" strokeMiterlimit="10">
<path d="M-229,50V46h-2v6h6V50Z" stroke="none" />
<path
d="M -225 52 L -231 52 L -231 46 L -229 46 L -229 50 L -225 50 L -225 52 Z"
Expand All @@ -28,14 +28,7 @@ export function Clock({ color, size, ...nativeProps }: IconProps) {
/>
</g>
</g>
<rect
data-name="Rectangle 6105"
fill="none"
height="20"
id="Rectangle_6105"
transform="translate(-240 41)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-240 41)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
13 changes: 3 additions & 10 deletions src/icons/Close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export function Close({ color, size, ...nativeProps }: IconProps) {
return (
<IconBox $size={size} color={color}>
<svg height="20" viewBox="0 0 20 20" width="20" {...nativeProps}>
<g id="Close" transform="translate(160 -82)">
<g data-name="Tracé 1377" fill="none" id="Tracé_1377" strokeMiterlimit="10">
<g transform="translate(160 -82)">
<g fill="none" strokeMiterlimit="10">
<path
d="M-142,85.415-143.415,84-150,90.585-156.585,84-158,85.415-151.415,92-158,98.585l1.415,1.415L-150,93.415l6.585,6.585L-142,98.585-148.585,92Z"
stroke="none"
Expand All @@ -18,14 +18,7 @@ export function Close({ color, size, ...nativeProps }: IconProps) {
stroke="none"
/>
</g>
<rect
data-name="Rectangle 6129"
fill="none"
height="20"
id="Rectangle_6129"
transform="translate(-160 82)"
width="20"
/>
<rect fill="none" height="20" transform="translate(-160 82)" width="20" />
</g>
</svg>
</IconBox>
Expand Down
Loading

0 comments on commit 81f3287

Please sign in to comment.