From d606fc9e7a5bf9c32fafcddc41929fcb9b5e7b3b Mon Sep 17 00:00:00 2001 From: Samus <26967164+SamusElderg@users.noreply.github.com> Date: Thu, 22 May 2025 23:32:27 +0800 Subject: [PATCH 1/3] [icons] fix bookmark icons - the bookmark icons were a bit off-centre, went ahead and trimmed most of their padding and made them centered - made it so the solid version can also be used dynamically as the outlined version by targeting id="fill" with css and hiding it - kept the outlined version in the library anyway in case we ever want to use it non-dynamically - also ran prettier formatting on the file as it was hard to read --- src/lib/Icon/iconList.tsx | 3164 ++++++++++++++++++++++++++++--------- 1 file changed, 2460 insertions(+), 704 deletions(-) diff --git a/src/lib/Icon/iconList.tsx b/src/lib/Icon/iconList.tsx index 5553d771..0d2e2c16 100644 --- a/src/lib/Icon/iconList.tsx +++ b/src/lib/Icon/iconList.tsx @@ -1,712 +1,2468 @@ import React, { ReactElement } from "react"; -export const icons = (size: string, color: string, className?: string): Record => ({ - "a": - - - - - - - - - - , - "approximate": - - - - - - - - - - - , - "arrow-left": - - - - - - , - "arrow-right": - - - - , - "b": - - - - - - - - - - , - "bell": - - - , - "book": - - - - , - "bookmark": - - - - , - "bookmark-solid": - - - - - +export const icons = ( + size: string, + color: string, + className?: string +): Record => ({ + a: ( + + + + + + + + + + + + ), + approximate: ( + + + + + + + + + + + + + ), + "arrow-left": ( + + + + + + + + ), + "arrow-right": ( + + + + + + ), + b: ( + + + + + + + + + + + + ), + bell: ( + + + + + ), + book: ( + + + + + + ), + bookmark: ( + + + + + + ), + "bookmark-solid": ( + + + + + + + + + ), + briefcase: ( + + + + + + ), + bug: ( + + + + + + ), + c: ( + + + + + + + + + + + + ), + "c4-logo": ( + + + + + + ), + calendar: ( + + + + + + ), + "chat-bubble": ( + + + + ), + check: ( + + + + + + ), + "check-circle": ( + + + + + + + ), + "chevron-down": ( + + + + + + ), + "chevron-left": ( + + + + + + ), + "chevron-right": ( + + + + + + ), + "chevron-up": ( + + + + + + + + ), + "chevrons-left": ( + + + + + + ), + "chevrons-right": ( + + + + + + ), + "circle-25": ( + + + + + + + + + + + + ), + "circle-50": ( + + + + + + + + + + + + ), + "circle-75": ( + + + + + + + + + + + + + ), + "circle-exclamation": ( + + + + + + + + + + + ), + clipboard: ( + + + + + + + + ), + copy: ( + + + + + ), + discussion: ( + + + + + + + ), + dot: ( + + + + ), + download: ( + + + + + + + + + ), + email: ( + + + + + + ), + "external-link": ( + + + + + + + + ), + "eye-closed": ( + + + + + + + ), + "eye-open": ( + + + + + + ), + facebook: ( + + + + ), + file: ( + + + + + ), + findings: ( + + + + + + + + + + + ), + first: ( + + + + + ), + flag: ( + + + + + + + + + + + ), + g: ( + + + + + + + + + + + + ), + "grab-vertical": ( + + + + + + + + + ), + h: ( + + + + + + + + + + + + ), + heart: ( + + + + + + ), + hexagon: ( + + + + + + ), + home: ( + + + + + + ), + "how-it-works": ( + + + + + + + + + + ), + image: ( + + + + + + ), + inbox: ( + + + + + + ), + info: ( + + + + + + + + + + ), + issue: ( + + + + + + ), + layout: ( + + + + + + ), + link: ( + + + + + + + + + ), + linkedin: ( + + + + ), + location: ( + + + + + + + + + + + + ), + lock: ( + + + + + + + + ), + "lock-slash": ( + + + + + + + + ), + "log-out": ( + + + + + + ), + "logo-blast": ( + + + + ), + "logo-ethereum": ( + + + + ), + "logo-solana": ( + + + + + + ), + "logo-polkadot": ( + + + + + + + + + ), + "logo-polygon": ( + + + + ), + "logo-x": ( + + + + + + ), + m: ( + + + + + + + + + + + + ), + menu: ( + + + + + + + + + + ), + minus: ( + + + + + + + + + + + + ), + moon: ( + + + + + + ), + "more-horizontal": ( + + + + + + + + + + ), + "more-vertical": ( + + + + + + + + + + ), + "no-clip": ( + + + + + + + + + + + ), + "no-document": ( + + + + + + + + + + + ), + "no-target": ( + + + + + + + + + + + ), + plus: ( + + + + + + ), + presort: ( + + + + + + ), + qa: ( + + + + + + + + + + + + ), + refresh: ( + + + + + + ), + robot: ( + + + + + + + + - , - "briefcase": - - - - , - "bug": - - - - , - "c": - - - - - - - - - - , - "c4-logo": - - - - , - "calendar": - - - - , - "chat-bubble": - - , - "check": - - - - , - "check-circle": - - - - - , - "chevron-down": - - - - , - "chevron-left": - - - - , - "chevron-right": - - - - , - "chevron-up": - - - - - - , - "chevrons-left": - - - - , - "chevrons-right": - - - - , - "circle-25": - - - - - - - - - - , - "circle-50": - - - - - - - - - - , - "circle-75": - - - - - - - - - - - , - "circle-exclamation": - - - - - - - - - , - "clipboard": - - - - - - , - "copy": - - - , - "discussion": + + + + ), + search: ( + + + - - + - , - "dot": - - , - "download": + + + + ), + second: ( + + + + + ), + settings: ( + + + - - - - - - , - "email": - - - - , - "external-link": - - - - - - , - "eye-closed": - - - - - , - "eye-open": - - - - , - "facebook": - - , - "file" : - - - , - "findings": - - - - - - - - - , - "first": - - - , - "flag": - - - - - - - - - , - "g": - - - - - - - - - - , - "grab-vertical": - - - - - - - , - "h": - - - - - - - - - - , - "heart": - - - - , - "hexagon": - - - - , - "home": - - - - , - "how-it-works": - - - - - - - - , - "image": - - - - , - "inbox": - - - - , - "info": - - - - - - - - , - "issue": - - - - , - "layout": - - - - , - "link": - - - - - - - , - "linkedin": - - , - "location": - - - - - - - - - - , - "lock": - - - - - - , - "lock-slash": - - - - - - , - "log-out": - - - - , - "logo-blast": - - , - "logo-ethereum": - - , - "logo-solana": - - - - , - "logo-polkadot": - - - - - - - , - "logo-polygon": - - , - "logo-x": - - + - , - "m": - - - - - - - - - - , - "menu": - - - - - - - - , - "minus": - - - - - - - - - - , - "moon": - - - - , - "more-horizontal": - - - - - - - - , - "more-vertical": - - - - - - - - , - "no-clip": - - - - - - - - - , - "no-document": - - - - - - - - - , - "no-target": - - - - - - - - - , - "plus": - - - - , - "presort": - - - - , - "qa": - - - - - - - - - - , - "refresh": - - - - , - "robot": - - - - - - - - - - - , - "search": - - - - - - - - , - "second": - - - , - "settings": - - - - - - - - , - "signal": - - - - - - , - "star": - - - - , - "stop-x": - - - - - - - - - , - "suggestion": - - - , - "sun": - - - - - - - - - - - - - - - - , - "support-chat": - - - - - - - - , - "third": - - - , - "thumbs-down": - - - - - - - - - , - "thumbs-up": - - - - - - - - - , - "tool": - - - - , - "trash": - - - - - - - - - , - "trophy": - - - - - - - - - , - "twitter": - - , - "undo": - - , - "user": - - - - - - , - "users": - - - - - - , - "warning": - - - - - - - - , - "warning-square": + + + + ), + signal: ( + + + + + + + + ), + star: ( + + + + + + ), + "stop-x": ( + + + + + + + + + + + ), + suggestion: ( + + + + + ), + sun: ( + + + - - - - - , - "x": - - - - , -}) \ No newline at end of file + + + + + + + + + + + + + + ), + "support-chat": ( + + + + + + + + + + ), + third: ( + + + + + ), + "thumbs-down": ( + + + + + + + + + + + ), + "thumbs-up": ( + + + + + + + + + + + ), + tool: ( + + + + + + ), + trash: ( + + + + + + + + + + + ), + trophy: ( + + + + + + + + + + + ), + twitter: ( + + + + ), + undo: ( + + + + ), + user: ( + + + + + + + + ), + users: ( + + + + + + + + ), + warning: ( + + + + + + + + + + ), + "warning-square": ( + + + + + + + + ), + x: ( + + + + + + ), +}); From 42637cbb6ea9277590a4bac24c998272984711c7 Mon Sep 17 00:00:00 2001 From: Samus <26967164+SamusElderg@users.noreply.github.com> Date: Thu, 22 May 2025 23:35:33 +0800 Subject: [PATCH 2/3] [avatar] add deprecation note --- src/lib/Avatar/Avatar.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/lib/Avatar/Avatar.tsx b/src/lib/Avatar/Avatar.tsx index d3628f10..2a5980b1 100644 --- a/src/lib/Avatar/Avatar.tsx +++ b/src/lib/Avatar/Avatar.tsx @@ -49,16 +49,7 @@ const generateColor = (str: string) => { return pastelColors[index]; }; -/** - * A stylized Avatar component for displaying user avatars. - * This component supports displaying an image avatar or a fallback avatar with initials. - * The fallback avatar is a colored circle with the user's initials. - * - * @param imgElement - An optional image element to use as the avatar. - * @param name - The name of the user. Used to generate initials for the fallback avatar. - * @param size - The size of the avatar in pixels. - * @param round - The border-radius of the avatar in pixels. Use this to make the avatar round. - */ +/** @deprecated */ export const Avatar = ({ imgElement, name, From 672b403bc61419a8f1ce0da6fd45211afc9545d6 Mon Sep 17 00:00:00 2001 From: Samus <26967164+SamusElderg@users.noreply.github.com> Date: Thu, 22 May 2025 23:33:46 +0800 Subject: [PATCH 3/3] bump v4.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2ac6f96..7b03d6f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@code4rena/components-library", - "version": "4.6.0", + "version": "4.6.1", "description": "Code4rena's official components library ", "types": "./dist/lib.d.ts", "exports": {