@1d1s/design-system 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/package.json +3 -2
- package/dist/DefaultProfile.png +0 -0
- package/dist/EmotionHappy.png +0 -0
- package/dist/EmotionSad.png +0 -0
- package/dist/EmotionSoso.png +0 -0
- package/dist/components/Accordion/Accordion.d.ts +0 -47
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -8
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/BackButton/BackButton.d.ts +0 -1
- package/dist/components/BackButton/BackButton.stories.d.ts +0 -6
- package/dist/components/BackButton/index.d.ts +0 -1
- package/dist/components/Button/Button.d.ts +0 -21
- package/dist/components/Button/Button.stories.d.ts +0 -11
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Calendar/Calendar.d.ts +0 -4
- package/dist/components/Calendar/Calendar.stories.d.ts +0 -6
- package/dist/components/Calendar/index.d.ts +0 -1
- package/dist/components/ChallengeCard/ChallengeCard.d.ts +0 -38
- package/dist/components/ChallengeCard/ChallengeCard.stories.d.ts +0 -7
- package/dist/components/ChallengeCard/index.d.ts +0 -1
- package/dist/components/ChallengeListItem/ChallengeListItem.d.ts +0 -12
- package/dist/components/ChallengeListItem/ChallengeListItem.stories.d.ts +0 -6
- package/dist/components/ChallengeListItem/index.d.ts +0 -1
- package/dist/components/CheckList/CheckList.d.ts +0 -35
- package/dist/components/CheckList/CheckList.stories.d.ts +0 -8
- package/dist/components/CheckList/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -14
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -10
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/CircleAvatar/CircleAvatar.d.ts +0 -8
- package/dist/components/CircleAvatar/CircleAvatar.stories.d.ts +0 -7
- package/dist/components/CircleAvatar/index.d.ts +0 -1
- package/dist/components/CircularProgress/CircularProgress.d.ts +0 -30
- package/dist/components/CircularProgress/CircularProgress.stories.d.ts +0 -8
- package/dist/components/CircularProgress/index.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -25
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -6
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -9
- package/dist/components/Dialog/index.d.ts +0 -1
- package/dist/components/DiaryCard/DiaryCard.d.ts +0 -17
- package/dist/components/DiaryCard/DiaryCard.stories.d.ts +0 -6
- package/dist/components/DiaryCard/index.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +0 -53
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -6
- package/dist/components/Dropdown/index.d.ts +0 -1
- package/dist/components/Footer/Footer.d.ts +0 -8
- package/dist/components/Footer/Footer.stories.d.ts +0 -6
- package/dist/components/Footer/index.d.ts +0 -1
- package/dist/components/GlobalChrome/GlobalChrome.d.ts +0 -3
- package/dist/components/GlobalChrome/GlobalChrome.stories.d.ts +0 -9
- package/dist/components/GlobalChrome/index.d.ts +0 -1
- package/dist/components/Icons/AddCircle.d.ts +0 -2
- package/dist/components/Icons/Calendar.d.ts +0 -2
- package/dist/components/Icons/Check.d.ts +0 -2
- package/dist/components/Icons/Chevron.d.ts +0 -2
- package/dist/components/Icons/ChevronDown.d.ts +0 -2
- package/dist/components/Icons/ChevronLeft.d.ts +0 -2
- package/dist/components/Icons/ChevronRight.d.ts +0 -2
- package/dist/components/Icons/ChevronUp.d.ts +0 -2
- package/dist/components/Icons/Close.d.ts +0 -2
- package/dist/components/Icons/Endless.d.ts +0 -2
- package/dist/components/Icons/Eye.d.ts +0 -2
- package/dist/components/Icons/EyeOff.d.ts +0 -2
- package/dist/components/Icons/HamburgerMenu.d.ts +0 -2
- package/dist/components/Icons/Heart.d.ts +0 -2
- package/dist/components/Icons/HeartFilled.d.ts +0 -2
- package/dist/components/Icons/Icons.stories.d.ts +0 -9
- package/dist/components/Icons/Logo.d.ts +0 -2
- package/dist/components/Icons/Minus.d.ts +0 -2
- package/dist/components/Icons/People.d.ts +0 -2
- package/dist/components/Icons/Person.d.ts +0 -2
- package/dist/components/Icons/Pin.d.ts +0 -2
- package/dist/components/Icons/Plus.d.ts +0 -2
- package/dist/components/Icons/Search.d.ts +0 -2
- package/dist/components/Icons/index.d.ts +0 -22
- package/dist/components/ImagePicker/ImagePicker.d.ts +0 -12
- package/dist/components/ImagePicker/ImagePicker.stories.d.ts +0 -6
- package/dist/components/ImagePicker/index.d.ts +0 -1
- package/dist/components/ImagePlaceholder/ImagePlaceholder.d.ts +0 -11
- package/dist/components/ImagePlaceholder/index.d.ts +0 -1
- package/dist/components/InfoButton/InfoButton.d.ts +0 -20
- package/dist/components/InfoButton/InfoButton.stories.d.ts +0 -6
- package/dist/components/InfoButton/index.d.ts +0 -1
- package/dist/components/Menu/Menu.d.ts +0 -2
- package/dist/components/Menu/Menu.stories.d.ts +0 -6
- package/dist/components/Menu/index.d.ts +0 -1
- package/dist/components/PageBackground/PageBackground.d.ts +0 -15
- package/dist/components/PageBackground/PageBackground.stories.d.ts +0 -6
- package/dist/components/PageBackground/index.d.ts +0 -1
- package/dist/components/PageTitle/PageTitle.d.ts +0 -29
- package/dist/components/PageTitle/PageTitle.stories.d.ts +0 -7
- package/dist/components/PageTitle/index.d.ts +0 -1
- package/dist/components/PageWatermark/PageWatermark.d.ts +0 -1
- package/dist/components/PageWatermark/PageWatermark.stories.d.ts +0 -6
- package/dist/components/PageWatermark/index.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -14
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -9
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/ProfileCard/ProfileCard.d.ts +0 -6
- package/dist/components/ProfileCard/ProfileCard.stories.d.ts +0 -7
- package/dist/components/ProfileCard/index.d.ts +0 -1
- package/dist/components/Spacing/Spacing.d.ts +0 -12
- package/dist/components/Spacing/Spacing.stories.d.ts +0 -6
- package/dist/components/Spacing/index.d.ts +0 -1
- package/dist/components/Streak/Streak.d.ts +0 -21
- package/dist/components/Streak/Streak.stories.d.ts +0 -8
- package/dist/components/Streak/index.d.ts +0 -1
- package/dist/components/Tag/Tag.d.ts +0 -25
- package/dist/components/Tag/Tag.stories.d.ts +0 -8
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/Text/Text.d.ts +0 -27
- package/dist/components/Text/Text.stories.d.ts +0 -9
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/TextField/TextField.d.ts +0 -49
- package/dist/components/TextField/TextField.stories.d.ts +0 -9
- package/dist/components/TextField/index.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -19
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -7
- package/dist/components/Toggle/index.d.ts +0 -1
- package/dist/components/ToggleCheck/ToggleCheck.d.ts +0 -15
- package/dist/components/ToggleCheck/ToggleCheck.stories.d.ts +0 -7
- package/dist/components/ToggleCheck/index.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -33
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -7
- package/dist/components/ToggleGroup/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -7
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/Ui/Button.d.ts +0 -11
- package/dist/components/UserListItem/UserListItem.d.ts +0 -10
- package/dist/components/UserListItem/UserListItem.stories.d.ts +0 -7
- package/dist/components/UserListItem/index.d.ts +0 -1
- package/dist/components/index.d.ts +0 -35
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +0 -12582
- package/dist/index.umd.js +0 -45
- package/dist/lib/utils.d.ts +0 -2
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# @1d1s/design-system
|
|
2
|
+
|
|
3
|
+
1D1S 프로젝트를 위한 React 디자인 시스템입니다. Tailwind CSS와 Radix UI를 기반으로 구축되었으며, 모바일 퍼스트 사용자 경험에 최적화되어 있습니다.
|
|
4
|
+
|
|
5
|
+
[Storybook 배포 링크](https://your-storybook-url.vercel.app) 👈 (배포 후 URL을 수정해주세요)
|
|
6
|
+
|
|
7
|
+
## ✨ 특징
|
|
8
|
+
|
|
9
|
+
- **Mobile First:** 모바일 환경에 최적화된 UI 컴포넌트 제공
|
|
10
|
+
- **Tailwind CSS:** 유틸리티 클래스 기반의 유연한 스타일링
|
|
11
|
+
- **Radix UI:** 웹 접근성(A11y)이 준수된 Headless UI 기반
|
|
12
|
+
- **TypeScript:** 완전한 타입 지원
|
|
13
|
+
|
|
14
|
+
## 📦 설치
|
|
15
|
+
|
|
16
|
+
패키지 매니저를 사용하여 설치합니다.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm add @1d1s/design-system
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 🚀 설정
|
|
23
|
+
|
|
24
|
+
### 1. 스타일 시트 가져오기
|
|
25
|
+
|
|
26
|
+
프로젝트의 최상위 진입점(예: `layout.tsx`, `App.tsx`, `index.tsx`)에서 디자인 시스템의 글로벌 스타일을 임포트해야 합니다. 이 파일에는 CSS 변수(색상, 폰트 등)와 Tailwind 설정이 포함되어 있습니다.
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import '@1d1s/design-system/styles/globals.css';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. 폰트 설정 (권장)
|
|
33
|
+
|
|
34
|
+
이 디자인 시스템은 기본적으로 시스템 폰트를 사용하지만, `Pretendard` 등의 웹 폰트와 함께 사용할 것을 권장합니다.
|
|
35
|
+
|
|
36
|
+
## 💻 사용법
|
|
37
|
+
|
|
38
|
+
컴포넌트를 임포트하여 바로 사용할 수 있습니다.
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Button, Checkbox, Text } from '@1d1s/design-system';
|
|
42
|
+
|
|
43
|
+
function App() {
|
|
44
|
+
return (
|
|
45
|
+
<div className="p-4 flex flex-col gap-4">
|
|
46
|
+
<Text size="heading1" weight="bold">Hello Design System</Text>
|
|
47
|
+
|
|
48
|
+
<Button variant="default" onClick={() => console.log('Clicked')}>
|
|
49
|
+
Click Me
|
|
50
|
+
</Button>
|
|
51
|
+
|
|
52
|
+
<Checkbox label="동의합니다" />
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 🧩 컴포넌트 목록
|
|
59
|
+
|
|
60
|
+
### Layout & Navigation
|
|
61
|
+
- **GlobalChrome:** 앱의 전체적인 레이아웃(헤더, 네비게이션, 모바일 시뮬레이션)을 담당합니다.
|
|
62
|
+
- **Menu:** 햄버거 메뉴 및 사이드바 네비게이션.
|
|
63
|
+
- **Footer:** 페이지 하단 푸터.
|
|
64
|
+
- **BackButton:** 뒤로가기 버튼.
|
|
65
|
+
- **PageTitle:** 페이지 제목 섹션.
|
|
66
|
+
- **PageBackground:** 페이지 배경 컨테이너.
|
|
67
|
+
|
|
68
|
+
### Inputs & Controls
|
|
69
|
+
- **Button:** 다양한 변형(Default, Outline, Ghost 등)을 지원하는 버튼.
|
|
70
|
+
- **TextField:** 텍스트 입력 필드 (단일/멀티라인).
|
|
71
|
+
- **Checkbox:** 라벨을 지원하는 표준 체크박스.
|
|
72
|
+
- **Toggle:** 텍스트/아이콘 토글 버튼.
|
|
73
|
+
- **ToggleCheck:** 체크 아이콘이 포함된 토글 버튼.
|
|
74
|
+
- **ToggleGroup:** 여러 토글 버튼 그룹.
|
|
75
|
+
- **CheckList:** 다중 선택이 가능한 체크 리스트.
|
|
76
|
+
- **DatePicker:** 캘린더 기반 날짜 선택기.
|
|
77
|
+
- **ImagePicker:** 이미지 업로드 및 미리보기.
|
|
78
|
+
- **Dropdown:** 선택 메뉴 (Select).
|
|
79
|
+
|
|
80
|
+
### Data Display
|
|
81
|
+
- **Text:** 타이포그래피 스타일을 적용하는 텍스트 컴포넌트.
|
|
82
|
+
- **Tag:** 상태나 카테고리를 표시하는 태그.
|
|
83
|
+
- **Accordion:** 접고 펼칠 수 있는 컨텐츠 영역.
|
|
84
|
+
- **CircleAvatar:** 사용자 프로필 이미지.
|
|
85
|
+
- **ProfileCard:** 사용자 프로필 요약 카드.
|
|
86
|
+
- **Streak:** 깃허브 잔디 스타일의 활동 기록 그래프.
|
|
87
|
+
- **Pagination:** 페이지 이동 네비게이션.
|
|
88
|
+
- **Calendar:** 월별 달력 뷰.
|
|
89
|
+
|
|
90
|
+
### Feedback
|
|
91
|
+
- **Dialog:** 모달 대화상자.
|
|
92
|
+
- **Tooltip:** 마우스 호버 시 나타나는 도움말.
|
|
93
|
+
- **CircularProgress:** 원형 진행률 표시기.
|
|
94
|
+
|
|
95
|
+
### Domain Specific (1D1S)
|
|
96
|
+
- **ChallengeCard:** 챌린지 정보를 보여주는 카드.
|
|
97
|
+
- **ChallengeListItem:** 챌린지 목록 아이템.
|
|
98
|
+
- **DiaryCard:** 일기/기록을 보여주는 카드.
|
|
99
|
+
- **UserListItem:** 사용자 목록 아이템.
|
|
100
|
+
|
|
101
|
+
## 🛠️ 개발 및 기여
|
|
102
|
+
|
|
103
|
+
### 로컬 실행 (Storybook)
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# 의존성 설치
|
|
107
|
+
pnpm install
|
|
108
|
+
|
|
109
|
+
# 스토리북 실행 (http://localhost:6006)
|
|
110
|
+
pnpm storybook
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 빌드
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# 스토리북 빌드 (Vercel 배포용)
|
|
117
|
+
pnpm build
|
|
118
|
+
|
|
119
|
+
# 라이브러리 빌드 (npm 배포용)
|
|
120
|
+
pnpm build:lib
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 📄 라이선스
|
|
124
|
+
|
|
125
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1d1s/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"main": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"lint": "eslint .",
|
|
28
28
|
"type-check": "tsc --noEmit",
|
|
29
|
-
"build": "
|
|
29
|
+
"build": "storybook build",
|
|
30
|
+
"build:lib": "vite build",
|
|
30
31
|
"storybook": "storybook dev -p 6006",
|
|
31
32
|
"build-storybook": "storybook build",
|
|
32
33
|
"release": "standard-version"
|
package/dist/DefaultProfile.png
DELETED
|
Binary file
|
package/dist/EmotionHappy.png
DELETED
|
Binary file
|
package/dist/EmotionSad.png
DELETED
|
Binary file
|
package/dist/EmotionSoso.png
DELETED
|
Binary file
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
/**
|
|
4
|
-
* Accordion
|
|
5
|
-
* 아코디언 컴포넌트 - 접을 수 있는 콘텐츠 섹션을 제공합니다.
|
|
6
|
-
*
|
|
7
|
-
* @example 단일 아코디언
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <Accordion type="single" collapsible>
|
|
10
|
-
* <AccordionItem value="item-1">
|
|
11
|
-
* <AccordionTrigger>제목</AccordionTrigger>
|
|
12
|
-
* <AccordionContent>내용</AccordionContent>
|
|
13
|
-
* </AccordionItem>
|
|
14
|
-
* </Accordion>
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @example 다중 아코디언
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <Accordion type="multiple">
|
|
20
|
-
* <AccordionItem value="item-1">
|
|
21
|
-
* <AccordionTrigger>제목 1</AccordionTrigger>
|
|
22
|
-
* <AccordionContent>내용 1</AccordionContent>
|
|
23
|
-
* </AccordionItem>
|
|
24
|
-
* <AccordionItem value="item-2">
|
|
25
|
-
* <AccordionTrigger>제목 2</AccordionTrigger>
|
|
26
|
-
* <AccordionContent>내용 2</AccordionContent>
|
|
27
|
-
* </AccordionItem>
|
|
28
|
-
* </Accordion>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
/**
|
|
33
|
-
* AccordionItem
|
|
34
|
-
* 각 아코디언 항목을 감싸는 컨테이너
|
|
35
|
-
*/
|
|
36
|
-
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.ReactElement;
|
|
37
|
-
/**
|
|
38
|
-
* AccordionTrigger
|
|
39
|
-
* 아코디언을 열고 닫는 트리거 버튼
|
|
40
|
-
*/
|
|
41
|
-
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.ReactElement;
|
|
42
|
-
/**
|
|
43
|
-
* AccordionContent
|
|
44
|
-
* 아코디언의 접히는 콘텐츠 영역
|
|
45
|
-
*/
|
|
46
|
-
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.ReactElement;
|
|
47
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Accordion } from './Accordion';
|
|
3
|
-
declare const meta: Meta<typeof Accordion>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Accordion>;
|
|
6
|
-
export declare const Single: Story;
|
|
7
|
-
export declare const Multiple: Story;
|
|
8
|
-
export declare const DefaultOpen: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Accordion';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function BackButton(): React.ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BackButton';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const customButtonVariants: (props?: ({
|
|
3
|
-
variant?: "input" | "disabled" | "default" | "warning" | "loading" | "outline" | null | undefined;
|
|
4
|
-
size?: "lg" | "md" | "sm" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
export interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof customButtonVariants> {
|
|
7
|
-
asChild?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Button
|
|
11
|
-
* 커스텀 버튼 컴포넌트
|
|
12
|
-
* @param variant 버튼스타일 : default, disabled, warning, loading, outline, input
|
|
13
|
-
* @param size 버튼 크기 : lg, md, sm
|
|
14
|
-
*
|
|
15
|
-
* @example 기본 버튼
|
|
16
|
-
* ```tsx
|
|
17
|
-
* <Button variant="default" size="lg">Large Button</Button>
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function Button({ className, variant, size, asChild, disabled, ...props }: ButtonProps): React.ReactElement;
|
|
21
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Button } from './Button';
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Button>;
|
|
6
|
-
export declare const Large: Story;
|
|
7
|
-
export declare const Medium: Story;
|
|
8
|
-
export declare const Small: Story;
|
|
9
|
-
export declare const Outline: Story;
|
|
10
|
-
export declare const Warning: Story;
|
|
11
|
-
export declare const Disabled: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Calendar';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
interface ChallengeProps {
|
|
2
|
-
challengeTitle: string;
|
|
3
|
-
challengeType: string;
|
|
4
|
-
currentUserCount: number;
|
|
5
|
-
maxUserCount: number;
|
|
6
|
-
startDate: string;
|
|
7
|
-
endDate: string;
|
|
8
|
-
isOngoing: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
onClick?(): void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* ChallengeCard
|
|
14
|
-
* 챌린지 카드 컴포넌트 - 제목, 유형, 참여자 수, 기간, 상태(진행중/모집중) 표시
|
|
15
|
-
*
|
|
16
|
-
* @param challengeTitle 챌린지 이름
|
|
17
|
-
* @param challengeType 챌린지 유형
|
|
18
|
-
* @param currentUserCount 현재 참여자 수
|
|
19
|
-
* @param maxUserCount 최대 참여자 수
|
|
20
|
-
* @param startDate 시작일 (YYYY-MM-DD)
|
|
21
|
-
* @param endDate 종료일 (YYYY-MM-DD)
|
|
22
|
-
* @param isOngoing 챌린지 진행 상태 (true: 진행중, false: 모집중)
|
|
23
|
-
*
|
|
24
|
-
* @example 기본 사용 예
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <ChallengeCard
|
|
27
|
-
* challengeTitle="챌린지 제목"
|
|
28
|
-
* challengeType="고정목표형"
|
|
29
|
-
* currentUserCount={12}
|
|
30
|
-
* maxUserCount={20}
|
|
31
|
-
* startDate="2023-10-01"
|
|
32
|
-
* endDate="2023-10-31"
|
|
33
|
-
* isOngoing={true}
|
|
34
|
-
* />
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare function ChallengeCard({ challengeTitle, challengeType, currentUserCount, maxUserCount, startDate, endDate, isOngoing, className, onClick, }: ChallengeProps): React.ReactElement;
|
|
38
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ChallengeCard } from './ChallengeCard';
|
|
3
|
-
declare const meta: Meta<typeof ChallengeCard>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ChallengeCard>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Recruiting: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ChallengeCard';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface ChallengeListItemProps {
|
|
2
|
-
challengeName: string;
|
|
3
|
-
challengeImageUrl?: string;
|
|
4
|
-
startDate: string;
|
|
5
|
-
endDate: string;
|
|
6
|
-
maxParticipants: number;
|
|
7
|
-
currentParticipants: number;
|
|
8
|
-
onClick?(): void;
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function ChallengeListItem({ challengeName, challengeImageUrl, startDate, endDate, maxParticipants, currentParticipants, onClick, className, }: ChallengeListItemProps): React.ReactElement;
|
|
12
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ChallengeListItem } from './ChallengeListItem';
|
|
3
|
-
declare const meta: Meta<typeof ChallengeListItem>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ChallengeListItem>;
|
|
6
|
-
export declare const Default: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ChallengeListItem';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface CheckListOption {
|
|
3
|
-
id: string;
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface CheckListProps {
|
|
8
|
-
/** 체크박스 옵션 목록 */
|
|
9
|
-
options: CheckListOption[];
|
|
10
|
-
/** 선택된 옵션의 ID 목록 */
|
|
11
|
-
value: string[];
|
|
12
|
-
/** 선택 변경 시 호출되는 콜백 */
|
|
13
|
-
onValueChange: (value: string[]) => void;
|
|
14
|
-
/** 추가 클래스 */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** 전체 비활성화 여부 */
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* CheckList
|
|
21
|
-
* 여러 개의 ToggleCheck를 리스트 형태로 보여주고 다중 선택을 관리하는 컴포넌트
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <CheckList
|
|
26
|
-
* options={[
|
|
27
|
-
* { id: '1', label: '옵션 1' },
|
|
28
|
-
* { id: '2', label: '옵션 2' }
|
|
29
|
-
* ]}
|
|
30
|
-
* value={selectedIds}
|
|
31
|
-
* onValueChange={setSelectedIds}
|
|
32
|
-
* />
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare function CheckList({ options, value, onValueChange, className, disabled, }: CheckListProps): React.ReactElement;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CheckList } from './CheckList';
|
|
3
|
-
declare const meta: Meta<typeof CheckList>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CheckList>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Empty: Story;
|
|
8
|
-
export declare const Disabled: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CheckList';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
-
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
4
|
-
label?: string;
|
|
5
|
-
readOnly?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Checkbox
|
|
9
|
-
* 왼쪽의 네모 박스 안에 체크 표시가 들어가는 전형적인 체크박스 컴포넌트
|
|
10
|
-
*
|
|
11
|
-
* @param label 선택적 텍스트 라벨
|
|
12
|
-
* @param readOnly 읽기 전용 여부 (클릭 불가, 시각적 변경 없음)
|
|
13
|
-
*/
|
|
14
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Checkbox } from './Checkbox';
|
|
3
|
-
declare const meta: Meta<typeof Checkbox>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Checkbox>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithoutLabel: Story;
|
|
8
|
-
export declare const Disabled: Story;
|
|
9
|
-
export declare const ReadOnly: Story;
|
|
10
|
-
export declare const List: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Checkbox';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface CircleAvatarProps {
|
|
3
|
-
imageUrl?: string;
|
|
4
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function CircleAvatar({ imageUrl, size, className, }: CircleAvatarProps): React.ReactElement;
|
|
8
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CircleAvatar } from './CircleAvatar';
|
|
3
|
-
declare const meta: Meta<typeof CircleAvatar>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CircleAvatar>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithImage: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CircleAvatar';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const circularProgressVariants: (props?: ({
|
|
4
|
-
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
5
|
-
strokeWidthVariant?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export type CircularProgressVariants = VariantProps<typeof circularProgressVariants>;
|
|
8
|
-
interface CircularProgressProps extends CircularProgressVariants {
|
|
9
|
-
value: number;
|
|
10
|
-
color?: 'blue' | 'green' | 'red';
|
|
11
|
-
showPercentage?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* CircularProgress
|
|
16
|
-
* 원형 진행률 표시 컴포넌트
|
|
17
|
-
*
|
|
18
|
-
* @param value 진행률 (0~100)
|
|
19
|
-
* @param size 크기 (sm, md, lg, xl)
|
|
20
|
-
* @param color 색상 (red, blue, green)
|
|
21
|
-
* @param showPercentage 퍼센트 표시 여부
|
|
22
|
-
* @param className 추가 클래스 이름
|
|
23
|
-
*
|
|
24
|
-
* @example 기본 사용
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <CircularProgress value={75} size="md" color="red" showPercentage />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare function CircularProgress({ value, size, color, showPercentage, className, }: CircularProgressProps): React.ReactElement;
|
|
30
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CircularProgress } from './CircularProgress';
|
|
3
|
-
declare const meta: Meta<typeof CircularProgress>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CircularProgress>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Blue: Story;
|
|
8
|
-
export declare const Green: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CircularProgress';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DatePicker
|
|
3
|
-
* 챌린지 카드 컴포넌트 - 제목, 유형, 참여자 수, 기간, 상태(진행중/모집중) 표시
|
|
4
|
-
*
|
|
5
|
-
* @param value hook에서 관리하는 날짜 값
|
|
6
|
-
* @param onChange 날짜 선택 변경 핸들러
|
|
7
|
-
*
|
|
8
|
-
* @example 기본 사용 예
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <FormItem>
|
|
11
|
-
* <FormField
|
|
12
|
-
* control={control}
|
|
13
|
-
* name="startDate"
|
|
14
|
-
* render={({ field }) => (
|
|
15
|
-
* <DatePicker value={field.value} onChange={field.onChange} />
|
|
16
|
-
* )}
|
|
17
|
-
* />
|
|
18
|
-
* </FormItem>
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare function DatePicker({ value, onChange, disableClickPropagation, }: {
|
|
22
|
-
value: Date | undefined;
|
|
23
|
-
onChange(date: Date | undefined): void;
|
|
24
|
-
disableClickPropagation?: boolean;
|
|
25
|
-
}): React.ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePicker';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.ReactElement;
|
|
8
|
-
declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.ReactElement;
|
|
9
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
10
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
11
|
-
declare function DialogTitle({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.ReactElement;
|
|
12
|
-
declare function DialogDescription({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.ReactElement;
|
|
13
|
-
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Dialog } from './Dialog';
|
|
3
|
-
declare const meta: Meta<typeof Dialog>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Dialog>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithForm: Story;
|
|
8
|
-
export declare const Confirmation: Story;
|
|
9
|
-
export declare const SimpleAlert: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './Dialog';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
type Emotion = "happy" | "soso" | "sad";
|
|
3
|
-
export interface DiaryCardProps {
|
|
4
|
-
imageUrl?: string;
|
|
5
|
-
percent: number;
|
|
6
|
-
likes: number;
|
|
7
|
-
title: string;
|
|
8
|
-
user: string;
|
|
9
|
-
userImage?: string;
|
|
10
|
-
challengeLabel: string;
|
|
11
|
-
challengeUrl: string;
|
|
12
|
-
date: string;
|
|
13
|
-
emotion: Emotion;
|
|
14
|
-
onClick?(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare function DiaryCard({ imageUrl, percent, likes, title, user, userImage, challengeLabel, challengeUrl, date, emotion, onClick, }: DiaryCardProps): React.ReactElement;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DiaryCard';
|