@bigtablet/design-system 1.1.3 → 1.2.2

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 CHANGED
@@ -31,8 +31,10 @@ src/
31
31
  │ ├── overlay/ # Modal
32
32
  │ ├── display/ # Card
33
33
  │ ├── general/ # Button, Select
34
+ │ ├── skeleton/ # SkeletonCard, SkeletonList
34
35
  │ └── styles/ # variables, typography 등 글로벌 스타일
35
- └── index.ts # 컴포넌트 export 집약
36
+ ├── index.ts # Pure React 컴포넌트 export
37
+ └── next.ts # Next.js 전용 컴포넌트 export (Sidebar)
36
38
  ```
37
39
 
38
40
  ---
@@ -97,7 +99,137 @@ pnpm build
97
99
  ```
98
100
 
99
101
  - 결과물: dist/
100
- - ESM + CJS + Type Definitions + CSS 포함
102
+ - ESM + Type Definitions + CSS 포함
103
+
104
+ ---
105
+
106
+ ## 📦 사용 방법
107
+
108
+ ### 설치
109
+
110
+ ```bash
111
+ npm install @bigtablet/design-system
112
+ # or
113
+ pnpm add @bigtablet/design-system
114
+ # or
115
+ yarn add @bigtablet/design-system
116
+ ```
117
+
118
+ ### Pure React 프로젝트에서 사용
119
+
120
+ 순수 React 프로젝트 (Create React App, Vite 등)에서는 메인 export를 사용하세요:
121
+
122
+ ```tsx
123
+ // 스타일 import (필수)
124
+ import "@bigtablet/design-system/styles.css";
125
+
126
+ // 컴포넌트 import
127
+ import {
128
+ Button,
129
+ Card,
130
+ Alert,
131
+ Loading,
132
+ Modal,
133
+ TextField,
134
+ Checkbox,
135
+ Radio,
136
+ Switch,
137
+ Select,
138
+ Pagination,
139
+ ToastProvider,
140
+ useToast
141
+ } from "@bigtablet/design-system";
142
+
143
+ function App() {
144
+ const toast = useToast();
145
+
146
+ return (
147
+ <>
148
+ <Button onClick={() => toast.success("Success!")}>
149
+ Click me
150
+ </Button>
151
+ <ToastProvider />
152
+ </>
153
+ );
154
+ }
155
+ ```
156
+
157
+ ### Next.js 프로젝트에서 사용
158
+
159
+ Next.js에서는 Sidebar를 포함한 모든 컴포넌트를 사용할 수 있습니다.
160
+
161
+ #### App Router (Next.js 13+)
162
+
163
+ **✅ Server Component 호환**: Button, Card, Loading, Radio, SkeletonCard, SkeletonList
164
+ **⚡ Client Component 필요**: Alert, Checkbox, FileInput, MarkdownEditor, Modal, Pagination, Select, Switch, TextField, ToastProvider, Sidebar
165
+
166
+ 자세한 내용은 [Next.js 호환성 가이드](NEXTJS_COMPATIBILITY.md)를 참고하세요.
167
+
168
+ ```tsx
169
+ // Pure React 컴포넌트
170
+ import { Button, Card, Alert } from "@bigtablet/design-system";
171
+ import "@bigtablet/design-system/styles.css";
172
+
173
+ // Next.js 전용 컴포넌트 (next/link, next/image 사용)
174
+ import { Sidebar } from "@bigtablet/design-system/next";
175
+
176
+ export default function Layout({ children }) {
177
+ return (
178
+ <div style={{ display: "flex" }}>
179
+ <Sidebar
180
+ items={[
181
+ { href: "/dashboard", label: "Dashboard", icon: HomeIcon },
182
+ { href: "/settings", label: "Settings", icon: SettingsIcon }
183
+ ]}
184
+ activePath="/dashboard"
185
+ />
186
+ <main>{children}</main>
187
+ </div>
188
+ );
189
+ }
190
+ ```
191
+
192
+ ### 컴포넌트 구조
193
+
194
+ #### 📦 메인 번들 (`@bigtablet/design-system`)
195
+ **순수 React 컴포넌트 - 프레임워크 독립적**
196
+
197
+ - **Display**: Card
198
+ - **Feedback**: Alert, Loading, ToastProvider, useToast
199
+ - **Form**: Button, Checkbox, FileInput, MarkdownEditor, Radio, Select, Switch, TextField
200
+ - **Navigation**: Pagination
201
+ - **Overlay**: Modal
202
+ - **Skeleton**: SkeletonCard, SkeletonList
203
+
204
+ #### ⚡ Next.js 번들 (`@bigtablet/design-system/next`)
205
+ **Next.js 전용 컴포넌트 - next/link, next/image 의존**
206
+
207
+ - **Navigation**: Sidebar
208
+
209
+ ---
210
+
211
+ ## ⚙️ 의존성
212
+
213
+ ### Peer Dependencies (필수)
214
+ 프로젝트에 반드시 설치되어 있어야 합니다:
215
+
216
+ ```json
217
+ {
218
+ "react": "^19",
219
+ "react-dom": "^19",
220
+ "lucide-react": ">=0.552.0",
221
+ "react-toastify": ">=11.0.5"
222
+ }
223
+ ```
224
+
225
+ ### Optional Peer Dependencies
226
+ Next.js 컴포넌트를 사용할 경우에만 필요합니다:
227
+
228
+ ```json
229
+ {
230
+ "next": ">=14.0.0"
231
+ }
232
+ ```
101
233
 
102
234
  ## 주로 발생하는 에러
103
235