@jbpark/ui-kit 1.1.3
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.ko.md +267 -0
- package/README.md +269 -0
- package/dist/Menu-Du6xCBZw.mjs +235 -0
- package/dist/Menu.d.mts +2 -0
- package/dist/Menu.mjs +5 -0
- package/dist/Reveals-BC-bFyOg.mjs +89 -0
- package/dist/Reveals.d.mts +2 -0
- package/dist/Reveals.mjs +3 -0
- package/dist/Typography-waEo2g0S.mjs +72 -0
- package/dist/Typography.d.mts +2 -0
- package/dist/Typography.mjs +3 -0
- package/dist/enums.d.mts +4 -0
- package/dist/enums.mjs +12 -0
- package/dist/index-03IpZ7BA.d.mts +83 -0
- package/dist/index-Bis4UfFa.d.mts +59 -0
- package/dist/index-BkkNNoK0.d.mts +97 -0
- package/dist/index.css +187 -0
- package/dist/index.d.mts +564 -0
- package/dist/index.mjs +4967 -0
- package/dist/output.css +2097 -0
- package/dist/utils.d.mts +6 -0
- package/dist/utils.mjs +10 -0
- package/package.json +94 -0
package/README.ko.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# @jbpark/ui-kit
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | **한글**
|
|
4
|
+
|
|
5
|
+
TypeScript와 Tailwind CSS를 기반으로 구축된 현대적이고 재사용 가능한 React UI 컴포넌트 라이브러리입니다. Atomic Design 패턴을 따라 체계적으로 조직되어 있으며 확장성을 고려하여 설계되었습니다.
|
|
6
|
+
|
|
7
|
+
## 📦 패키지 정보
|
|
8
|
+
|
|
9
|
+
- **패키지명**: `@jbpark/ui-kit`
|
|
10
|
+
- **라이선스**: MIT
|
|
11
|
+
- **패키지 매니저**: pnpm
|
|
12
|
+
- **Node.js 요구사항**: >= 18
|
|
13
|
+
- **React 요구사항**: ^18.0.0 || ^19.0.0
|
|
14
|
+
|
|
15
|
+
## 🏗 아키텍처
|
|
16
|
+
|
|
17
|
+
### Atomic Design 패턴
|
|
18
|
+
|
|
19
|
+
이 라이브러리는 Atomic Design 방법론을 따라 컴포넌트를 계층적으로 구성합니다:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
src/
|
|
23
|
+
├── components/
|
|
24
|
+
│ ├── atoms/ # 🧬 원자 - 기본 UI 구성 요소
|
|
25
|
+
│ ├── molecules/ # 🔬 분자 - 원자들의 조합
|
|
26
|
+
│ ├── organisms/ # 🦠 유기체 - 복잡한 UI 블록
|
|
27
|
+
│ └── templates/ # 📄 템플릿 - 페이지 레이아웃
|
|
28
|
+
├── core/ # ⚙️ 핵심 UI 로직 (Radix UI 기반)
|
|
29
|
+
├── lib/
|
|
30
|
+
│ ├── enums/ # 📋 열거형 타입
|
|
31
|
+
│ ├── hooks/ # 🎣 커스텀 훅
|
|
32
|
+
│ └── utils/ # 🛠 유틸리티 함수
|
|
33
|
+
├── globals.css # 🎨 전역 스타일
|
|
34
|
+
└── index.ts # 📥 패키지 진입점
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 🧬 Atoms (원자)
|
|
38
|
+
|
|
39
|
+
기본적인 UI 구성 요소들
|
|
40
|
+
|
|
41
|
+
| 컴포넌트 | 설명 | 하위 컴포넌트 |
|
|
42
|
+
| --------------- | ------------------------- | ------------------------------------ |
|
|
43
|
+
| **Button** | 다양한 스타일의 버튼 | - |
|
|
44
|
+
| **Checkbox** | 체크박스 및 그룹 체크박스 | `Group` |
|
|
45
|
+
| **FloatButton** | 플로팅 버튼 | `BackTop` |
|
|
46
|
+
| **Input** | 입력 필드 컴포넌트 | `Search`, `TextArea` |
|
|
47
|
+
| **Progress** | 진행률 표시 컴포넌트 | - |
|
|
48
|
+
| **Skeleton** | 로딩 스켈레톤 | `Button`, `Node` |
|
|
49
|
+
| **Spin** | 로딩 스피너 | - |
|
|
50
|
+
| **Switch** | 토글 스위치 | - |
|
|
51
|
+
| **Typography** | 텍스트 컴포넌트 | `Link`, `Paragraph`, `Text`, `Title` |
|
|
52
|
+
|
|
53
|
+
## 🔬 Molecules (분자)
|
|
54
|
+
|
|
55
|
+
여러 원자들이 결합된 복합 컴포넌트들
|
|
56
|
+
|
|
57
|
+
| 컴포넌트 | 설명 | 하위 컴포넌트 |
|
|
58
|
+
| ------------ | ------------------------ | ------------- |
|
|
59
|
+
| **Collapse** | 접을 수 있는 컨텐츠 영역 | - |
|
|
60
|
+
| **Dropdown** | 드롭다운 메뉴 | - |
|
|
61
|
+
| **Marquees** | 무한 스크롤 마키 | `Item` |
|
|
62
|
+
| **Menu** | 네비게이션 메뉴 | - |
|
|
63
|
+
| **Reveals** | 애니메이션 리빌 | `Item` |
|
|
64
|
+
| **Space** | 간격 조정 컴포넌트 | - |
|
|
65
|
+
|
|
66
|
+
## 🦠 Organisms (유기체)
|
|
67
|
+
|
|
68
|
+
복잡한 UI 섹션들
|
|
69
|
+
|
|
70
|
+
| 컴포넌트 | 설명 | 하위 컴포넌트 |
|
|
71
|
+
| ---------- | ------------------------ | ------------- |
|
|
72
|
+
| **Drawer** | 사이드 드로어 | - |
|
|
73
|
+
| **List** | 리스트 및 리스트 아이템 | `Item` |
|
|
74
|
+
| **Modal** | 모달 다이얼로그 | - |
|
|
75
|
+
| **Swiper** | 슬라이더/캐러셀 컴포넌트 | `Slide` |
|
|
76
|
+
|
|
77
|
+
## 📄 Templates (템플릿)
|
|
78
|
+
|
|
79
|
+
페이지 레이아웃 템플릿
|
|
80
|
+
|
|
81
|
+
| 컴포넌트 | 설명 | 하위 컴포넌트 |
|
|
82
|
+
| ---------- | -------------------- | -------------------------------------- |
|
|
83
|
+
| **Layout** | 전체 페이지 레이아웃 | `Header`, `Sider`, `Content`, `Footer` |
|
|
84
|
+
|
|
85
|
+
## 🛠 핵심 기능
|
|
86
|
+
|
|
87
|
+
### Core 모듈
|
|
88
|
+
|
|
89
|
+
Radix UI 기반의 접근성 우선 핵심 컴포넌트들:
|
|
90
|
+
|
|
91
|
+
- `accordion.tsx` - 아코디언 컴포넌트 (Radix UI 기반)
|
|
92
|
+
- `button.tsx` - 버튼 컴포넌트 (class-variance-authority로 variants 관리)
|
|
93
|
+
- `dialog.tsx` - 다이얼로그 컴포넌트 (Radix UI 기반)
|
|
94
|
+
- `drawer.tsx` - 드로어 컴포넌트 (Vaul 기반)
|
|
95
|
+
- `progress.tsx` - 진행률 컴포넌트 (Radix UI 기반)
|
|
96
|
+
- `skeleton.tsx` - 스켈레톤 컴포넌트
|
|
97
|
+
- `switch.tsx` - 스위치 컴포넌트 (Radix UI 기반)
|
|
98
|
+
|
|
99
|
+
### 유틸리티
|
|
100
|
+
|
|
101
|
+
- **`cn()`** - 클래스명 병합 유틸리티 (clsx + tailwind-merge)
|
|
102
|
+
- **`TEXT_LEVELS`** - 타이포그래피 레벨 상수
|
|
103
|
+
|
|
104
|
+
## 🚀 설치 및 사용법
|
|
105
|
+
|
|
106
|
+
### 설치
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# npm
|
|
110
|
+
npm install @jbpark/ui-kit
|
|
111
|
+
|
|
112
|
+
# yarn
|
|
113
|
+
yarn add @jbpark/ui-kit
|
|
114
|
+
|
|
115
|
+
# pnpm
|
|
116
|
+
pnpm add @jbpark/ui-kit
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 기본 사용법
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { Button, Layout, Typography } from '@jbpark/ui-kit';
|
|
123
|
+
|
|
124
|
+
import '@jbpark/ui-kit/style.css';
|
|
125
|
+
|
|
126
|
+
function App() {
|
|
127
|
+
return (
|
|
128
|
+
<Layout>
|
|
129
|
+
<Typography.Title>안녕하세요!</Typography.Title>
|
|
130
|
+
<Button variant="primary">클릭하세요</Button>
|
|
131
|
+
</Layout>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 개별 컴포넌트 import
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
// Typography 컴포넌트
|
|
140
|
+
// Menu 컴포넌트
|
|
141
|
+
import { Menu } from '@jbpark/ui-kit/Menu';
|
|
142
|
+
// Reveals 컴포넌트
|
|
143
|
+
import { Reveals } from '@jbpark/ui-kit/Reveals';
|
|
144
|
+
import { Typography } from '@jbpark/ui-kit/Typography';
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 유틸리티 및 열거형 import
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
// 유틸리티 함수
|
|
151
|
+
// 열거형 상수
|
|
152
|
+
import { TEXT_LEVELS } from '@jbpark/ui-kit/enums';
|
|
153
|
+
import { cn } from '@jbpark/ui-kit/utils';
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 스타일 import
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
// 전역 스타일 (필수)
|
|
160
|
+
import '@jbpark/ui-kit/style.css';
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 🎨 스타일링
|
|
164
|
+
|
|
165
|
+
### Tailwind CSS
|
|
166
|
+
|
|
167
|
+
- **Tailwind CSS 4** 기반
|
|
168
|
+
- **PostCSS** 처리
|
|
169
|
+
- **class-variance-authority**로 컴포넌트 variants 관리
|
|
170
|
+
- **tailwind-merge**로 클래스 충돌 해결
|
|
171
|
+
|
|
172
|
+
### 커스터마이징
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
// 전역 스타일 import (필수)
|
|
176
|
+
import '@jbpark/ui-kit/style.css';
|
|
177
|
+
|
|
178
|
+
// tailwind.config.js에서 테마 커스터마이징
|
|
179
|
+
// Tailwind CSS 4를 사용하는 경우 PostCSS 설정 필요
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 📚 주요 의존성
|
|
183
|
+
|
|
184
|
+
### 핵심 라이브러리
|
|
185
|
+
|
|
186
|
+
- **React 19.1.0** - UI 라이브러리
|
|
187
|
+
- **TypeScript 5.9.2** - 정적 타입 체크
|
|
188
|
+
- **Tailwind CSS 4.1.12** - 유틸리티 CSS 프레임워크
|
|
189
|
+
|
|
190
|
+
### UI 라이브러리
|
|
191
|
+
|
|
192
|
+
- **Radix UI** - 접근성 우선 헤드리스 UI 컴포넌트
|
|
193
|
+
- `@radix-ui/react-accordion` (1.2.12)
|
|
194
|
+
- `@radix-ui/react-dialog` (1.1.15)
|
|
195
|
+
- `@radix-ui/react-progress` (1.1.7)
|
|
196
|
+
- `@radix-ui/react-slot` (1.2.3)
|
|
197
|
+
- `@radix-ui/react-switch` (1.2.6)
|
|
198
|
+
- **Lucide React 0.542.0** - 아이콘 라이브러리
|
|
199
|
+
- **Motion 12.23.12** - 애니메이션 라이브러리
|
|
200
|
+
- **Swiper 11.2.10** - 터치 슬라이더
|
|
201
|
+
- **Vaul 1.1.2** - 드로어 컴포넌트
|
|
202
|
+
|
|
203
|
+
### 유틸리티
|
|
204
|
+
|
|
205
|
+
- **class-variance-authority 0.7.1** - 컴포넌트 variants 관리
|
|
206
|
+
- **clsx 2.1.1** - 조건부 클래스명
|
|
207
|
+
- **tailwind-merge 3.3.1** - Tailwind 클래스 병합
|
|
208
|
+
- **react-use 17.6.0** - React 훅 모음
|
|
209
|
+
- **@uidotdev/usehooks 2.4.1** - 추가 React 훅
|
|
210
|
+
- **uuid 11.1.0** - 고유 ID 생성
|
|
211
|
+
- **@gsap/react 2.1.2** - GSAP 애니메이션
|
|
212
|
+
- **tw-animate-css 1.3.7** - Tailwind 애니메이션
|
|
213
|
+
|
|
214
|
+
## 🔧 개발
|
|
215
|
+
|
|
216
|
+
이 패키지는 모노레포(pnpm 워크스페이스) 환경에서 개발됩니다.
|
|
217
|
+
|
|
218
|
+
### 타입 체크
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
pnpm run check-types
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 린팅
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
pnpm run lint
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 빌드
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
pnpm run build
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### 컴포넌트 생성
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
pnpm run generate:component
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## 📦 패키지 Exports
|
|
243
|
+
|
|
244
|
+
이 패키지는 다음과 같은 모듈들을 export합니다:
|
|
245
|
+
|
|
246
|
+
- `@jbpark/ui-kit` - 메인 패키지 (모든 컴포넌트)
|
|
247
|
+
- `@jbpark/ui-kit/Typography` - Typography 컴포넌트
|
|
248
|
+
- `@jbpark/ui-kit/Menu` - Menu 컴포넌트
|
|
249
|
+
- `@jbpark/ui-kit/Reveals` - Reveals 컴포넌트
|
|
250
|
+
- `@jbpark/ui-kit/utils` - 유틸리티 함수 (`cn` 등)
|
|
251
|
+
- `@jbpark/ui-kit/enums` - 열거형 상수 (`TEXT_LEVELS` 등)
|
|
252
|
+
- `@jbpark/ui-kit/style.css` - 전역 스타일 (필수)
|
|
253
|
+
|
|
254
|
+
## 🤝 기여하기
|
|
255
|
+
|
|
256
|
+
1. 이 저장소를 포크합니다
|
|
257
|
+
2. 새로운 기능 브랜치를 생성합니다 (`git checkout -b feature/amazing-component`)
|
|
258
|
+
3. 컴포넌트를 Atomic Design 패턴에 따라 적절한 폴더에 배치합니다
|
|
259
|
+
4. TypeScript 타입을 정의합니다
|
|
260
|
+
5. Storybook 스토리를 작성합니다
|
|
261
|
+
6. 변경사항을 커밋합니다 (`git commit -m 'Add amazing component'`)
|
|
262
|
+
7. 브랜치에 푸시합니다 (`git push origin feature/amazing-component`)
|
|
263
|
+
8. Pull Request를 생성합니다
|
|
264
|
+
|
|
265
|
+
## 📄 라이선스
|
|
266
|
+
|
|
267
|
+
MIT 라이선스 하에 있습니다.
|
package/README.md
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# @jbpark/ui-kit
|
|
2
|
+
|
|
3
|
+
[한글](./README.ko.md) | **English**
|
|
4
|
+
|
|
5
|
+
A modern and reusable React UI component library built with TypeScript and Tailwind CSS, following the Atomic Design pattern for systematic organization and scalability.
|
|
6
|
+
|
|
7
|
+
## 📦 Package Information
|
|
8
|
+
|
|
9
|
+
- **Package Name**: `@jbpark/ui-kit`
|
|
10
|
+
- **License**: MIT
|
|
11
|
+
- **Package Manager**: pnpm
|
|
12
|
+
- **Node.js Requirement**: >= 18
|
|
13
|
+
- **React Requirement**: ^18.0.0 || ^19.0.0
|
|
14
|
+
|
|
15
|
+
## 🏗 Architecture
|
|
16
|
+
|
|
17
|
+
### Atomic Design Pattern
|
|
18
|
+
|
|
19
|
+
This library organizes components hierarchically following the Atomic Design methodology:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
src/
|
|
23
|
+
├── components/
|
|
24
|
+
│ ├── atoms/ # 🧬 Atoms - Basic UI elements
|
|
25
|
+
│ ├── molecules/ # 🔬 Molecules - Combinations of atoms
|
|
26
|
+
│ ├── organisms/ # 🦠 Organisms - Complex UI blocks
|
|
27
|
+
│ └── templates/ # 📄 Templates - Page layouts
|
|
28
|
+
├── core/ # ⚙️ Core UI logic (Radix UI based)
|
|
29
|
+
├── lib/
|
|
30
|
+
│ ├── enums/ # 📋 Enumeration types
|
|
31
|
+
│ ├── hooks/ # 🎣 Custom hooks
|
|
32
|
+
│ └── utils/ # 🛠 Utility functions
|
|
33
|
+
├── globals.css # 🎨 Global styles
|
|
34
|
+
└── index.ts # 📥 Package entry point
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 🧬 Atoms
|
|
38
|
+
|
|
39
|
+
Basic UI building blocks
|
|
40
|
+
|
|
41
|
+
| Component | Description | Sub-components |
|
|
42
|
+
| --------------- | ---------------------------- | ------------------------------------ |
|
|
43
|
+
| **Button** | Various button styles | - |
|
|
44
|
+
| **Checkbox** | Checkbox and checkbox groups | `Group` |
|
|
45
|
+
| **FloatButton** | Floating action button | `BackTop` |
|
|
46
|
+
| **Input** | Input field component | `Search`, `TextArea` |
|
|
47
|
+
| **Progress** | Progress indicator component | - |
|
|
48
|
+
| **Skeleton** | Loading skeleton | `Button`, `Node` |
|
|
49
|
+
| **Spin** | Loading spinner | - |
|
|
50
|
+
| **Switch** | Toggle switch component | - |
|
|
51
|
+
| **Typography** | Text components | `Link`, `Paragraph`, `Text`, `Title` |
|
|
52
|
+
|
|
53
|
+
## 🔬 Molecules
|
|
54
|
+
|
|
55
|
+
Composite components combining multiple atoms
|
|
56
|
+
|
|
57
|
+
| Component | Description | Sub-components |
|
|
58
|
+
| ------------ | -------------------------- | -------------- |
|
|
59
|
+
| **Collapse** | Collapsible content area | - |
|
|
60
|
+
| **Dropdown** | Dropdown menu | - |
|
|
61
|
+
| **Marquees** | Infinite scrolling marquee | `Item` |
|
|
62
|
+
| **Menu** | Navigation menu | - |
|
|
63
|
+
| **Reveals** | Animation reveal component | `Item` |
|
|
64
|
+
| **Space** | Spacing adjustment | - |
|
|
65
|
+
|
|
66
|
+
## 🦠 Organisms
|
|
67
|
+
|
|
68
|
+
Complex UI sections
|
|
69
|
+
|
|
70
|
+
| Component | Description | Sub-components |
|
|
71
|
+
| ---------- | ------------------------- | -------------- |
|
|
72
|
+
| **Drawer** | Side drawer panel | - |
|
|
73
|
+
| **List** | List and list items | `Item` |
|
|
74
|
+
| **Modal** | Modal dialog | - |
|
|
75
|
+
| **Swiper** | Slider/carousel component | `Slide` |
|
|
76
|
+
|
|
77
|
+
## 📄 Templates
|
|
78
|
+
|
|
79
|
+
Page layout templates
|
|
80
|
+
|
|
81
|
+
| Component | Description | Sub-components |
|
|
82
|
+
| ---------- | ---------------- | -------------------------------------- |
|
|
83
|
+
| **Layout** | Full page layout | `Header`, `Sider`, `Content`, `Footer` |
|
|
84
|
+
|
|
85
|
+
## 🛠 Core Features
|
|
86
|
+
|
|
87
|
+
### Core Module
|
|
88
|
+
|
|
89
|
+
Accessibility-first core components based on Radix UI:
|
|
90
|
+
|
|
91
|
+
- `accordion.tsx` - Accordion component (Radix UI based)
|
|
92
|
+
- `button.tsx` - Button component (variants managed with class-variance-authority)
|
|
93
|
+
- `dialog.tsx` - Dialog component (Radix UI based)
|
|
94
|
+
- `drawer.tsx` - Drawer component (Vaul based)
|
|
95
|
+
- `progress.tsx` - Progress component (Radix UI based)
|
|
96
|
+
- `skeleton.tsx` - Skeleton component
|
|
97
|
+
- `switch.tsx` - Switch component (Radix UI based)
|
|
98
|
+
|
|
99
|
+
### Utilities
|
|
100
|
+
|
|
101
|
+
- **`cn()`** - Class name merging utility (clsx + tailwind-merge)
|
|
102
|
+
- **`TEXT_LEVELS`** - Typography level constants
|
|
103
|
+
|
|
104
|
+
## 🚀 Installation & Usage
|
|
105
|
+
|
|
106
|
+
### Installation
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# npm
|
|
110
|
+
npm install @jbpark/ui-kit
|
|
111
|
+
|
|
112
|
+
# yarn
|
|
113
|
+
yarn add @jbpark/ui-kit
|
|
114
|
+
|
|
115
|
+
# pnpm
|
|
116
|
+
pnpm add @jbpark/ui-kit
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Basic Usage
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { Button, Layout, Typography } from '@jbpark/ui-kit';
|
|
123
|
+
|
|
124
|
+
import '@jbpark/ui-kit/style.css';
|
|
125
|
+
|
|
126
|
+
function App() {
|
|
127
|
+
return (
|
|
128
|
+
<Layout>
|
|
129
|
+
<Typography.Title>Hello!</Typography.Title>
|
|
130
|
+
<Button variant="primary">Click me</Button>
|
|
131
|
+
</Layout>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Import Individual Components
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
// Typography component
|
|
140
|
+
// Menu component
|
|
141
|
+
import { Menu } from '@jbpark/ui-kit/Menu';
|
|
142
|
+
// Reveals component
|
|
143
|
+
import { Reveals } from '@jbpark/ui-kit/Reveals';
|
|
144
|
+
import { Typography } from '@jbpark/ui-kit/Typography';
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Import Utilities and Enums
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
// Utility functions
|
|
151
|
+
// Enumeration constants
|
|
152
|
+
import { TEXT_LEVELS } from '@jbpark/ui-kit/enums';
|
|
153
|
+
import { cn } from '@jbpark/ui-kit/utils';
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Import Styles
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
// Global styles (required)
|
|
160
|
+
import '@jbpark/ui-kit/style.css';
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 🎨 Styling
|
|
164
|
+
|
|
165
|
+
### Tailwind CSS
|
|
166
|
+
|
|
167
|
+
- **Tailwind CSS 4** based
|
|
168
|
+
- **PostCSS** processing
|
|
169
|
+
- **class-variance-authority** for component variants management
|
|
170
|
+
- **tailwind-merge** for resolving class conflicts
|
|
171
|
+
|
|
172
|
+
### Customization
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
// Import global styles (required)
|
|
176
|
+
import '@jbpark/ui-kit/style.css';
|
|
177
|
+
|
|
178
|
+
// Customize theme in tailwind.config.js
|
|
179
|
+
// PostCSS configuration needed for Tailwind CSS 4
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 📚 Key Dependencies
|
|
183
|
+
|
|
184
|
+
### Core Libraries
|
|
185
|
+
|
|
186
|
+
- **React 19.1.0** - UI library
|
|
187
|
+
- **TypeScript 5.9.2** - Static type checking
|
|
188
|
+
- **Tailwind CSS 4.1.12** - Utility-first CSS framework
|
|
189
|
+
|
|
190
|
+
### UI Libraries
|
|
191
|
+
|
|
192
|
+
- **Radix UI** - Accessible headless UI components
|
|
193
|
+
- `@radix-ui/react-accordion` (1.2.12)
|
|
194
|
+
- `@radix-ui/react-dialog` (1.1.15)
|
|
195
|
+
- `@radix-ui/react-progress` (1.1.7)
|
|
196
|
+
- `@radix-ui/react-slot` (1.2.3)
|
|
197
|
+
- `@radix-ui/react-switch` (1.2.6)
|
|
198
|
+
- **Lucide React 0.542.0** - Icon library
|
|
199
|
+
- **Motion 12.23.12** - Animation library
|
|
200
|
+
- **Swiper 11.2.10** - Touch slider
|
|
201
|
+
- **Vaul 1.1.2** - Drawer component
|
|
202
|
+
|
|
203
|
+
### Utilities
|
|
204
|
+
|
|
205
|
+
- **class-variance-authority 0.7.1** - Component variants management
|
|
206
|
+
- **clsx 2.1.1** - Conditional class names
|
|
207
|
+
- **tailwind-merge 3.3.1** - Tailwind class merging
|
|
208
|
+
- **react-use 17.6.0** - React hooks collection
|
|
209
|
+
- **@uidotdev/usehooks 2.4.1** - Additional React hooks
|
|
210
|
+
- **uuid 11.1.0** - Unique ID generation
|
|
211
|
+
- **@gsap/react 2.1.2** - GSAP animation
|
|
212
|
+
- **tw-animate-css 1.3.7** - Tailwind animations
|
|
213
|
+
|
|
214
|
+
## 🔧 Development
|
|
215
|
+
|
|
216
|
+
This package is developed in a monorepo environment (pnpm workspaces).
|
|
217
|
+
|
|
218
|
+
### Type Checking
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
pnpm run check-types
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Linting
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
pnpm run lint
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Build
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
pnpm run build
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Generate Component
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
pnpm run generate:component
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## 📦 Package Exports
|
|
243
|
+
|
|
244
|
+
This package exports the following modules:
|
|
245
|
+
|
|
246
|
+
- `@jbpark/ui-kit` - Main package (all components)
|
|
247
|
+
- `@jbpark/ui-kit/Typography` - Typography component
|
|
248
|
+
- `@jbpark/ui-kit/Menu` - Menu component
|
|
249
|
+
- `@jbpark/ui-kit/Reveals` - Reveals component
|
|
250
|
+
- `@jbpark/ui-kit/utils` - Utility functions (`cn` etc)
|
|
251
|
+
- `@jbpark/ui-kit/enums` - Enumeration constants (`TEXT_LEVELS` etc)
|
|
252
|
+
- `@jbpark/ui-kit/style.css` - Global styles (required)
|
|
253
|
+
|
|
254
|
+
## 🤝 Contributing
|
|
255
|
+
|
|
256
|
+
1. Fork this repository
|
|
257
|
+
2. Create a feature branch (`git checkout -b feature/amazing-component`)
|
|
258
|
+
3. Place your component in the appropriate folder following Atomic Design
|
|
259
|
+
4. Define TypeScript types
|
|
260
|
+
5. Write Storybook stories
|
|
261
|
+
6. Commit your changes (`git commit -m 'Add amazing component'`)
|
|
262
|
+
7. Push to the branch (`git push origin feature/amazing-component`)
|
|
263
|
+
8. Create a Pull Request
|
|
264
|
+
|
|
265
|
+
## 📄 License
|
|
266
|
+
|
|
267
|
+
Licensed under the MIT License.
|
|
268
|
+
|
|
269
|
+
---
|