From 8d92438f2a9f1705d0e451f086e3e291cc482101 Mon Sep 17 00:00:00 2001 From: JinJu Date: Mon, 18 Nov 2024 11:05:40 +0900 Subject: [PATCH] DESIGN-10 Avatar Component --- README.md | 2 +- package.json | 1 + src/constants/theme.ts | 24 +- src/core/components/Avatar/Avatar.stories.tsx | 68 + .../Avatar/AvatarPopoverPortal/index.tsx | 23 + .../Avatar/AvatarPopoverPortal/types/index.ts | 7 + src/core/components/Avatar/constants/index.ts | 13 + src/core/components/Avatar/index.tsx | 127 + src/core/components/Avatar/types/index.ts | 18 + .../components/Avatar/utils/getFirstLetter.ts | 3 + .../AvatarGroup/AvatarGroup.stories.tsx | 87 + .../components/AvatarGroup/constants/index.ts | 7 + src/core/components/AvatarGroup/index.tsx | 55 + .../components/AvatarGroup/types/index.ts | 20 + .../BottomSheet/BottomSheet.stories.tsx | 2 +- src/core/components/BottomSheet/index.tsx | 2 +- src/core/components/Drawer/Drawer.stories.tsx | 2 +- .../InputDatePicker.stories.tsx | 4 +- .../Modal/ModalBase/ModalBase.stories.tsx | 4 +- src/core/components/Modal/ModalBase/index.tsx | 8 +- .../components/Modal/ModalBase/types/index.ts | 4 +- .../Modal/ModalPopUp/ModalPopUp.stories.tsx | 4 +- .../components/Modal/ModalPopUp/index.tsx | 2 +- .../components/Modal/ModalPortal/index.tsx | 19 - src/core/components/Portal/index.tsx | 15 + src/core/components/Portal/types/index.ts | 3 + src/index.ts | 4 +- src/utilities/getColorTheme.ts | 20 + src/utilities/getPortalPosition.ts | 17 + yarn.lock | 4184 +++++++++-------- 30 files changed, 2702 insertions(+), 2047 deletions(-) create mode 100644 src/core/components/Avatar/Avatar.stories.tsx create mode 100644 src/core/components/Avatar/AvatarPopoverPortal/index.tsx create mode 100644 src/core/components/Avatar/AvatarPopoverPortal/types/index.ts create mode 100644 src/core/components/Avatar/constants/index.ts create mode 100644 src/core/components/Avatar/index.tsx create mode 100644 src/core/components/Avatar/types/index.ts create mode 100644 src/core/components/Avatar/utils/getFirstLetter.ts create mode 100644 src/core/components/AvatarGroup/AvatarGroup.stories.tsx create mode 100644 src/core/components/AvatarGroup/constants/index.ts create mode 100644 src/core/components/AvatarGroup/index.tsx create mode 100644 src/core/components/AvatarGroup/types/index.ts delete mode 100644 src/core/components/Modal/ModalPortal/index.tsx create mode 100644 src/core/components/Portal/index.tsx create mode 100644 src/core/components/Portal/types/index.ts create mode 100644 src/utilities/getColorTheme.ts create mode 100644 src/utilities/getPortalPosition.ts diff --git a/README.md b/README.md index 37c49a5..13f83a7 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ export default function Home() { return ( <> -