From e2fb648bd05acc99fd9c97167721b8d0f56f7ffe Mon Sep 17 00:00:00 2001 From: Captain Mango Date: Wed, 11 Dec 2024 14:18:18 -0800 Subject: [PATCH 1/4] Add icons from the legacy extension --- src/lib/Icon/iconList.tsx | 277 +++++++++++++++++++++++++++++++++++++- 1 file changed, 273 insertions(+), 4 deletions(-) diff --git a/src/lib/Icon/iconList.tsx b/src/lib/Icon/iconList.tsx index ea077599..7867b2d7 100644 --- a/src/lib/Icon/iconList.tsx +++ b/src/lib/Icon/iconList.tsx @@ -1,6 +1,29 @@ import React, { ReactElement } from "react"; export const icons = (size: string, color: string, className?: string): Record => ({ + "a": + + + + + + + + + + , + "approximate": + + + + + + + + + + + , "arrow-left": @@ -12,6 +35,17 @@ export const icons = (size: string, color: string, className?: string): Record + , + "b": + + + + + + + + + , "bell": @@ -45,6 +79,17 @@ export const icons = (size: string, color: string, className?: string): Record , + "c": + + + + + + + + + + , "c4-logo": @@ -98,6 +143,50 @@ export const icons = (size: string, color: string, className?: string): Record , + "circle-25": + + + + + + + + + + , + "circle-50": + + + + + + + + + + , + "circle-75": + + + + + + + + + + + , + "circle-exclamation": + + + + + + + + + , "clipboard": @@ -150,8 +239,12 @@ export const icons = (size: string, color: string, className?: string): Record , "facebook": - - , + + , + "file" : + + + , "findings": @@ -162,6 +255,31 @@ export const icons = (size: string, color: string, className?: string): Record , + "first": + + + , + "flag": + + + + + + + + + , + "g": + + + + + + + + + + , "grab-vertical": @@ -169,7 +287,18 @@ export const icons = (size: string, color: string, className?: string): Record - , + , + "h": + + + + + + + + + + , "heart": @@ -233,6 +362,17 @@ export const icons = (size: string, color: string, className?: string): Record, "linkedin": + , + "location": + + + + + + + + + , "lock": @@ -273,6 +413,17 @@ export const icons = (size: string, color: string, className?: string): Record , + "m": + + + + + + + + + + , "menu": @@ -282,6 +433,17 @@ export const icons = (size: string, color: string, className?: string): Record , + "minus": + + + + + + + + + + , "moon": @@ -305,11 +467,57 @@ export const icons = (size: string, color: string, className?: string): Record , + "no-clip": + + + + + + + + + , + "no-document": + + + + + + + + + , + "no-target": + + + + + + + + + , "plus": , + "presort": + + + + , + "qa": + + + + + + + + + + , "refresh": @@ -336,6 +544,10 @@ export const icons = (size: string, color: string, className?: string): Record , + "second": + + + , "settings": @@ -350,6 +562,16 @@ export const icons = (size: string, color: string, className?: string): Record , + "stop-x": + + + + + + + + + , "suggestion": @@ -380,14 +602,61 @@ export const icons = (size: string, color: string, className?: string): Record , + "third": + + + , + "thumbs-down": + + + + + + + + + , + "thumbs-up": + + + + + + + + + , "tool": , + "trash": + + + + + + + + + , + "trophy": + + + + + + + + + , "twitter": - , + , + "undo": + + , "user": From 9637facc7fe056f877919dcb1c4deb1846c6fd16 Mon Sep 17 00:00:00 2001 From: Captain Mango Date: Wed, 11 Dec 2024 14:22:28 -0800 Subject: [PATCH 2/4] 4.5.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 859a5f57..9f99f916 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@code4rena/components-library", - "version": "4.3.2", + "version": "4.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@code4rena/components-library", - "version": "4.3.2", + "version": "4.5.0", "license": "ISC", "dependencies": { "clsx": "^1.2.1", diff --git a/package.json b/package.json index 28c7a33f..72090f0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@code4rena/components-library", - "version": "4.4.0", + "version": "4.5.0", "description": "Code4rena's official components library ", "types": "./dist/lib.d.ts", "exports": { From 90599e3d9343c1551322e8567c06b3a114de3430 Mon Sep 17 00:00:00 2001 From: Captain Mango Date: Wed, 11 Dec 2024 14:26:13 -0800 Subject: [PATCH 3/4] Add extra large option for icon size --- src/lib/Icon/Icon.tsx | 3 +++ src/lib/Icon/Icon.types.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/Icon/Icon.tsx b/src/lib/Icon/Icon.tsx index a8bfa834..2162fd4f 100644 --- a/src/lib/Icon/Icon.tsx +++ b/src/lib/Icon/Icon.tsx @@ -35,6 +35,9 @@ export const Icon = ({ case "large": sizeInPx = "32px"; break; + case "extra-large": + sizeInPx = "40px"; + break; default: sizeInPx = "24px"; } diff --git a/src/lib/Icon/Icon.types.ts b/src/lib/Icon/Icon.types.ts index b976e917..cfa7df0b 100644 --- a/src/lib/Icon/Icon.types.ts +++ b/src/lib/Icon/Icon.types.ts @@ -9,4 +9,4 @@ export interface IconProps { className?: string; } -export type IconSize = "small" | "medium" | "large"; \ No newline at end of file +export type IconSize = "small" | "medium" | "large" | "extra-large"; \ No newline at end of file From 199206488fb7570495627bb5305f866ea940a09b Mon Sep 17 00:00:00 2001 From: Captain Mango Date: Thu, 12 Dec 2024 10:51:15 -0800 Subject: [PATCH 4/4] Change SVG attributes to camelCase --- src/lib/Icon/iconList.tsx | 114 +++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/src/lib/Icon/iconList.tsx b/src/lib/Icon/iconList.tsx index 7867b2d7..f7bc7821 100644 --- a/src/lib/Icon/iconList.tsx +++ b/src/lib/Icon/iconList.tsx @@ -2,8 +2,8 @@ import React, { ReactElement } from "react"; export const icons = (size: string, color: string, className?: string): Record => ({ "a": - - + + @@ -13,10 +13,10 @@ export const icons = (size: string, color: string, className?: string): Record , "approximate": - - - - + + + + @@ -37,8 +37,8 @@ export const icons = (size: string, color: string, className?: string): Record , "b": - - + + @@ -80,8 +80,8 @@ export const icons = (size: string, color: string, className?: string): Record , "c": - - + + @@ -144,8 +144,8 @@ export const icons = (size: string, color: string, className?: string): Record , "circle-25": - - + + @@ -155,8 +155,8 @@ export const icons = (size: string, color: string, className?: string): Record , "circle-50": - - + + @@ -166,8 +166,8 @@ export const icons = (size: string, color: string, className?: string): Record , "circle-75": - - + + @@ -178,8 +178,8 @@ export const icons = (size: string, color: string, className?: string): Record , "circle-exclamation": - - + + @@ -242,8 +242,8 @@ export const icons = (size: string, color: string, className?: string): Record , "file" : - - + + , "findings": @@ -256,12 +256,12 @@ export const icons = (size: string, color: string, className?: string): Record , "first": - + , "flag": - - + + @@ -270,8 +270,8 @@ export const icons = (size: string, color: string, className?: string): Record , "g": - - + + @@ -289,8 +289,8 @@ export const icons = (size: string, color: string, className?: string): Record , "h": - - + + @@ -364,9 +364,9 @@ export const icons = (size: string, color: string, className?: string): Record , "location": - - - + + + @@ -414,8 +414,8 @@ export const icons = (size: string, color: string, className?: string): Record , "m": - - + + @@ -434,9 +434,9 @@ export const icons = (size: string, color: string, className?: string): Record , "minus": - - - + + + @@ -468,8 +468,8 @@ export const icons = (size: string, color: string, className?: string): Record , "no-clip": - - + + @@ -478,8 +478,8 @@ export const icons = (size: string, color: string, className?: string): Record , "no-document": - - + + @@ -488,8 +488,8 @@ export const icons = (size: string, color: string, className?: string): Record , "no-target": - - + + @@ -504,12 +504,12 @@ export const icons = (size: string, color: string, className?: string): Record, "presort": - + , "qa": - - + + @@ -545,7 +545,7 @@ export const icons = (size: string, color: string, className?: string): Record , "second": - + , "settings": @@ -563,8 +563,8 @@ export const icons = (size: string, color: string, className?: string): Record , "stop-x": - - + + @@ -603,12 +603,12 @@ export const icons = (size: string, color: string, className?: string): Record , "third": - + , "thumbs-down": - - + + @@ -617,8 +617,8 @@ export const icons = (size: string, color: string, className?: string): Record , "thumbs-up": - - + + @@ -632,8 +632,8 @@ export const icons = (size: string, color: string, className?: string): Record , "trash": - - + + @@ -642,8 +642,8 @@ export const icons = (size: string, color: string, className?: string): Record , "trophy": - - + + @@ -655,7 +655,7 @@ export const icons = (size: string, color: string, className?: string): Record , "undo": - + , "user":