@likelion-design/ui 0.1.0 → 0.1.1
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 +90 -22
- package/package.json +17 -1
package/README.md
CHANGED
|
@@ -1,40 +1,108 @@
|
|
|
1
|
-
|
|
1
|
+
# @likelion-design/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React UI 컴포넌트 라이브러리
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 설치
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
8
|
+
npm install @likelion-design/ui
|
|
9
9
|
# or
|
|
10
|
-
yarn
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
yarn add @likelion-design/ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 사용법
|
|
14
|
+
|
|
15
|
+
### 1. CSS 스타일 import (필수)
|
|
16
|
+
|
|
17
|
+
컴포넌트를 사용하기 전에 반드시 CSS 파일을 import해야 합니다:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
// App.tsx 또는 최상위 파일
|
|
21
|
+
import "@likelion-design/ui/styles.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. 컴포넌트 사용
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { ActionButton, IconButton } from "@likelion-design/ui";
|
|
28
|
+
|
|
29
|
+
function App() {
|
|
30
|
+
return (
|
|
31
|
+
<div>
|
|
32
|
+
<ActionButton
|
|
33
|
+
size="medium"
|
|
34
|
+
variant="primary"
|
|
35
|
+
onClick={() => console.log("clicked")}
|
|
36
|
+
>
|
|
37
|
+
Click me
|
|
38
|
+
</ActionButton>
|
|
39
|
+
|
|
40
|
+
<IconButton
|
|
41
|
+
size="large"
|
|
42
|
+
variant="primary"
|
|
43
|
+
icon={<YourIcon />}
|
|
44
|
+
aria-label="좋아요"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
15
49
|
```
|
|
16
50
|
|
|
17
|
-
|
|
51
|
+
## 컴포넌트
|
|
18
52
|
|
|
19
|
-
|
|
53
|
+
### ActionButton
|
|
20
54
|
|
|
21
|
-
|
|
55
|
+
액션 버튼 컴포넌트 - 사용자가 액션을 트리거하거나 이벤트를 실행할 때 사용
|
|
22
56
|
|
|
23
|
-
|
|
57
|
+
**Props:**
|
|
24
58
|
|
|
25
|
-
|
|
59
|
+
- `size`: `"xlarge" | "large" | "medium" | "small"`
|
|
60
|
+
- `variant`: `"primary" | "neutral" | "secondary"`
|
|
61
|
+
- `shape`: `"solid" | "outline" | "ghost"`
|
|
62
|
+
- `state`: `"enabled" | "hovered" | "loading" | "disabled"`
|
|
63
|
+
- `prefixIcon`: 앞쪽 아이콘
|
|
64
|
+
- `suffixIcon`: 뒤쪽 아이콘
|
|
65
|
+
- `loading`: 로딩 상태
|
|
26
66
|
|
|
27
|
-
|
|
67
|
+
### IconButton
|
|
28
68
|
|
|
29
|
-
|
|
69
|
+
아이콘 버튼 컴포넌트 - 텍스트 레이블 없이 아이콘만으로 액션을 전달
|
|
30
70
|
|
|
31
|
-
|
|
32
|
-
- [Learn Next.js](https://nextjs.org/learn-pages-router) - an interactive Next.js tutorial.
|
|
71
|
+
**Props:**
|
|
33
72
|
|
|
34
|
-
|
|
73
|
+
- `size`: `"xlarge" | "large" | "medium" | "small"`
|
|
74
|
+
- `variant`: `"primary" | "neutral"`
|
|
75
|
+
- `iconType`: `"solid" | "outline" | "weak"`
|
|
76
|
+
- `state`: `"enabled" | "hovered" | "disabled"`
|
|
77
|
+
- `icon`: React 아이콘 컴포넌트
|
|
78
|
+
- `aria-label`: 접근성 라벨 (필수)
|
|
35
79
|
|
|
36
|
-
|
|
80
|
+
### Button
|
|
81
|
+
|
|
82
|
+
레거시 버튼 컴포넌트 (하위 호환성)
|
|
83
|
+
|
|
84
|
+
### Header
|
|
85
|
+
|
|
86
|
+
헤더 컴포넌트
|
|
87
|
+
|
|
88
|
+
### Page
|
|
89
|
+
|
|
90
|
+
페이지 컴포넌트
|
|
91
|
+
|
|
92
|
+
## TypeScript 지원
|
|
93
|
+
|
|
94
|
+
모든 컴포넌트는 완전한 TypeScript 타입 정의를 제공합니다.
|
|
95
|
+
|
|
96
|
+
## 개발
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Storybook 실행
|
|
100
|
+
npm run storybook
|
|
101
|
+
|
|
102
|
+
# 패키지 빌드
|
|
103
|
+
npm run build
|
|
104
|
+
```
|
|
37
105
|
|
|
38
|
-
|
|
106
|
+
## 라이선스
|
|
39
107
|
|
|
40
|
-
|
|
108
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likelion-design/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./styles.css": "./dist/index.css"
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": [
|
|
22
|
+
"**/*.css"
|
|
23
|
+
],
|
|
8
24
|
"files": [
|
|
9
25
|
"dist",
|
|
10
26
|
"README.md"
|