@nextlevel_korea/design-system 1.1.5 → 2.0.0
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 +128 -556
- package/dist/components/Footer/Footer.d.ts +0 -5
- package/dist/components/Footer/Footer.d.ts.map +1 -1
- package/dist/components/Footer/Footer.stories.d.ts.map +1 -1
- package/dist/components/Header/Header.d.ts +5 -0
- package/dist/components/Header/Header.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +173 -193
- package/package.json +13 -12
package/README.md
CHANGED
@@ -1,627 +1,199 @@
|
|
1
|
-
#
|
1
|
+
# NextLevel Design System
|
2
2
|
|
3
|
-
|
3
|
+
A modern React design system built with TypeScript and Tailwind CSS, now powered by Next.js.
|
4
4
|
|
5
|
-
## 🚀
|
5
|
+
## 🚀 Features
|
6
6
|
|
7
|
-
|
7
|
+
- **Next.js 15**: Latest Next.js with App Router
|
8
|
+
- **TypeScript**: Full type safety
|
9
|
+
- **Tailwind CSS**: Utility-first CSS framework
|
10
|
+
- **Responsive Design**: Mobile-first approach
|
11
|
+
- **Customizable Components**: Full color and styling customization
|
12
|
+
- **Storybook**: Component documentation and testing
|
13
|
+
|
14
|
+
## 📦 Installation
|
8
15
|
|
9
16
|
```bash
|
10
17
|
npm install @nextlevel_korea/design-system
|
11
18
|
```
|
12
19
|
|
13
|
-
|
14
|
-
|
15
|
-
```tsx
|
16
|
-
import { Header } from '@nextlevel_korea/design-system';
|
17
|
-
import '@nextlevel_korea/design-system/styles';
|
18
|
-
|
19
|
-
function App() {
|
20
|
-
return (
|
21
|
-
<div>
|
22
|
-
<Header logo="https://your-logo-url.com/logo.png" />
|
23
|
-
</div>
|
24
|
-
);
|
25
|
-
}
|
26
|
-
```
|
27
|
-
|
28
|
-
## ⚠️ 중요: 스타일 적용 방법
|
29
|
-
|
30
|
-
이 라이브러리를 사용할 때 **반드시 스타일을 import**해야 합니다:
|
31
|
-
|
32
|
-
### 방법 1: CSS 파일 직접 import (권장)
|
33
|
-
|
34
|
-
```tsx
|
35
|
-
import { Header } from '@nextlevel_korea/design-system';
|
36
|
-
import '@nextlevel_korea/design-system/styles'; // 이 줄이 필수입니다!
|
37
|
-
|
38
|
-
function App() {
|
39
|
-
return <Header logo="https://example.com/logo.png" />;
|
40
|
-
}
|
41
|
-
```
|
42
|
-
|
43
|
-
### 방법 2: 전역 CSS 파일에서 import
|
44
|
-
|
45
|
-
```css
|
46
|
-
/* styles.css */
|
47
|
-
@import '@nextlevel_korea/design-system/styles';
|
48
|
-
```
|
49
|
-
|
50
|
-
### 방법 3: Next.js에서 사용
|
51
|
-
|
52
|
-
```tsx
|
53
|
-
// pages/_app.tsx 또는 app/layout.tsx
|
54
|
-
import '@nextlevel_korea/design-system/styles';
|
55
|
-
|
56
|
-
export default function App({ Component, pageProps }) {
|
57
|
-
return <Component {...pageProps} />;
|
58
|
-
}
|
59
|
-
```
|
60
|
-
|
61
|
-
### 방법 4: Vite에서 사용
|
62
|
-
|
63
|
-
```tsx
|
64
|
-
// main.tsx
|
65
|
-
import '@nextlevel_korea/design-system/styles';
|
66
|
-
import { Header } from '@nextlevel_korea/design-system';
|
67
|
-
```
|
68
|
-
|
69
|
-
## 🔧 문제 해결
|
20
|
+
## 🛠️ Development
|
70
21
|
|
71
|
-
###
|
22
|
+
### Prerequisites
|
72
23
|
|
73
|
-
|
24
|
+
- Node.js 18+
|
25
|
+
- npm or yarn
|
74
26
|
|
75
|
-
|
76
|
-
|
77
|
-
```tsx
|
78
|
-
// ❌ 잘못된 사용법
|
79
|
-
import { Header } from '@nextlevel_korea/design-system';
|
80
|
-
// 스타일 import가 없음!
|
81
|
-
|
82
|
-
// ✅ 올바른 사용법
|
83
|
-
import { Header } from '@nextlevel_korea/design-system';
|
84
|
-
import '@nextlevel_korea/design-system/styles'; // 필수!
|
85
|
-
```
|
86
|
-
|
87
|
-
#### 2. Tailwind CSS 충돌 해결
|
88
|
-
|
89
|
-
프로젝트에 Tailwind CSS가 이미 설치되어 있는 경우:
|
90
|
-
|
91
|
-
```js
|
92
|
-
// tailwind.config.js
|
93
|
-
module.exports = {
|
94
|
-
content: [
|
95
|
-
'./src/**/*.{js,ts,jsx,tsx}',
|
96
|
-
'./node_modules/@nextlevel_korea/design-system/dist/**/*.js', // 이 줄 추가
|
97
|
-
],
|
98
|
-
// 라이브러리의 커스텀 색상을 추가
|
99
|
-
theme: {
|
100
|
-
extend: {
|
101
|
-
colors: {
|
102
|
-
success: '#22c55e',
|
103
|
-
warning: '#eab308',
|
104
|
-
danger: '#ef4444',
|
105
|
-
info: '#0ea5e9',
|
106
|
-
muted: '#6b7280',
|
107
|
-
},
|
108
|
-
},
|
109
|
-
},
|
110
|
-
};
|
111
|
-
```
|
27
|
+
### Setup
|
112
28
|
|
113
|
-
|
114
|
-
|
115
|
-
다른 CSS가 라이브러리 스타일을 덮어쓰는 경우:
|
116
|
-
|
117
|
-
```css
|
118
|
-
/* styles.css */
|
119
|
-
/* 라이브러리 스타일을 먼저 import */
|
120
|
-
@import '@nextlevel_korea/design-system/styles';
|
121
|
-
|
122
|
-
/* 그 다음에 프로젝트 스타일 */
|
123
|
-
@import './your-styles.css';
|
124
|
-
```
|
125
|
-
|
126
|
-
#### 4. 번들러 설정 확인
|
127
|
-
|
128
|
-
**Vite에서 사용 시:**
|
129
|
-
|
130
|
-
```ts
|
131
|
-
// vite.config.ts
|
132
|
-
export default defineConfig({
|
133
|
-
optimizeDeps: {
|
134
|
-
include: ['@nextlevel_korea/design-system'],
|
135
|
-
},
|
136
|
-
});
|
137
|
-
```
|
138
|
-
|
139
|
-
**Webpack에서 사용 시:**
|
140
|
-
|
141
|
-
```js
|
142
|
-
// webpack.config.js
|
143
|
-
module.exports = {
|
144
|
-
resolve: {
|
145
|
-
alias: {
|
146
|
-
'@nextlevel_korea/design-system': require.resolve(
|
147
|
-
'@nextlevel_korea/design-system'
|
148
|
-
),
|
149
|
-
},
|
150
|
-
},
|
151
|
-
};
|
152
|
-
```
|
153
|
-
|
154
|
-
#### 5. TypeScript 설정 확인
|
155
|
-
|
156
|
-
```json
|
157
|
-
// tsconfig.json
|
158
|
-
{
|
159
|
-
"compilerOptions": {
|
160
|
-
"moduleResolution": "node",
|
161
|
-
"esModuleInterop": true,
|
162
|
-
"allowSyntheticDefaultImports": true
|
163
|
-
}
|
164
|
-
}
|
165
|
-
```
|
166
|
-
|
167
|
-
### 일반적인 오류와 해결책
|
168
|
-
|
169
|
-
#### 오류: "Cannot resolve module '@nextlevel_korea/design-system/styles'"
|
29
|
+
1. Clone the repository:
|
170
30
|
|
171
31
|
```bash
|
172
|
-
|
173
|
-
|
174
|
-
npm install @nextlevel_korea/design-system
|
32
|
+
git clone https://github.com/NextLevel-KR/design-system.git
|
33
|
+
cd design-system
|
175
34
|
```
|
176
35
|
|
177
|
-
|
36
|
+
2. Install dependencies:
|
178
37
|
|
179
38
|
```bash
|
180
|
-
# node_modules 삭제 후 재설치
|
181
|
-
rm -rf node_modules package-lock.json
|
182
39
|
npm install
|
183
40
|
```
|
184
41
|
|
185
|
-
|
186
|
-
|
187
|
-
Tailwind CSS의 purge 설정을 확인하세요:
|
188
|
-
|
189
|
-
```js
|
190
|
-
// tailwind.config.js
|
191
|
-
module.exports = {
|
192
|
-
content: [
|
193
|
-
'./src/**/*.{js,ts,jsx,tsx}',
|
194
|
-
'./node_modules/@nextlevel_korea/design-system/dist/**/*.js',
|
195
|
-
],
|
196
|
-
// safelist 추가 (필요한 경우)
|
197
|
-
safelist: [
|
198
|
-
'text-success',
|
199
|
-
'text-warning',
|
200
|
-
'text-danger',
|
201
|
-
'text-info',
|
202
|
-
'text-muted',
|
203
|
-
],
|
204
|
-
};
|
205
|
-
```
|
206
|
-
|
207
|
-
## 📖 Storybook 문서
|
208
|
-
|
209
|
-
우리 디자인 시스템을 탐색하고 이해하는 가장 좋은 방법은 인터랙티브 Storybook 문서를 통하는 것입니다.
|
210
|
-
|
211
|
-
### 로컬에서 Storybook 실행하기
|
212
|
-
|
213
|
-
컴포넌트를 탐색하기 위해 로컬에서 Storybook을 실행하려면:
|
42
|
+
3. Start development server:
|
214
43
|
|
215
44
|
```bash
|
216
|
-
|
217
|
-
git clone https://github.com/NextLevel-KR/design-system.git
|
218
|
-
cd design-system
|
219
|
-
|
220
|
-
# 의존성 설치
|
221
|
-
npm install
|
222
|
-
|
223
|
-
# Storybook 시작
|
224
|
-
npm run storybook
|
45
|
+
npm run dev
|
225
46
|
```
|
226
47
|
|
227
|
-
|
48
|
+
4. Open [http://localhost:3000](http://localhost:3000) in your browser.
|
228
49
|
|
229
|
-
###
|
50
|
+
### Available Scripts
|
230
51
|
|
231
|
-
|
52
|
+
- `npm run dev` - Start development server
|
53
|
+
- `npm run build` - Build for production
|
54
|
+
- `npm run start` - Start production server
|
55
|
+
- `npm run lint` - Run ESLint
|
56
|
+
- `npm run storybook` - Start Storybook
|
57
|
+
- `npm run build-storybook` - Build Storybook
|
232
58
|
|
233
|
-
|
234
|
-
- **🎛️ 컨트롤 패널** - 실시간으로 컴포넌트 props 수정
|
235
|
-
- **📱 반응형 테스트** - 다양한 화면 크기에서 컴포넌트 테스트
|
236
|
-
- **🌙 다크/라이트 모드** - 테마 간 전환
|
237
|
-
- **♿ 접근성 테스트** - 내장된 a11y 검사
|
238
|
-
- **📋 코드 예제** - 복사-붙여넣기 가능한 코드 스니펫
|
59
|
+
## 🎨 Components
|
239
60
|
|
240
|
-
|
61
|
+
### Header Component
|
241
62
|
|
242
|
-
|
243
|
-
|
244
|
-
커스터마이징 가능한 로고가 있는 유연한 헤더 컴포넌트입니다. 모든 화면 크기에서 최적화된 반응형 디자인을 제공합니다.
|
63
|
+
A responsive navigation header with dropdown menus and mobile sidebar.
|
245
64
|
|
246
65
|
```tsx
|
247
|
-
import
|
248
|
-
import '@nextlevel_korea/design-system/styles'; // 필수!
|
249
|
-
|
250
|
-
// 기본 사용법
|
251
|
-
<Header logo="https://example.com/logo.png" title="My App" />
|
66
|
+
import Header from '@nextlevel_korea/design-system/components/Header/Header'
|
252
67
|
|
253
|
-
|
254
|
-
|
68
|
+
const navList = [
|
69
|
+
{
|
70
|
+
idx: 1,
|
71
|
+
name: 'Home',
|
72
|
+
path: '/',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
idx: 2,
|
76
|
+
name: 'Products',
|
77
|
+
path: '/products',
|
78
|
+
sub: [
|
79
|
+
{ idx: 1, name: 'Category 1', path: '/products/category1' },
|
80
|
+
{ idx: 2, name: 'Category 2', path: '/products/category2' },
|
81
|
+
],
|
82
|
+
},
|
83
|
+
]
|
255
84
|
|
256
|
-
|
257
|
-
|
85
|
+
<Header
|
86
|
+
logo="/logo.png"
|
87
|
+
navList={navList}
|
88
|
+
eventButton={{
|
89
|
+
text: 'Get Started',
|
90
|
+
onClick: () => console.log('Button clicked!'),
|
91
|
+
className: 'bg-blue-500 text-white hover:bg-blue-600',
|
92
|
+
}}
|
93
|
+
colors={{
|
94
|
+
headerBg: 'bg-white',
|
95
|
+
navText: 'text-gray-600',
|
96
|
+
navTextHover: 'hover:text-blue-500',
|
97
|
+
}}
|
98
|
+
/>
|
258
99
|
```
|
259
100
|
|
260
|
-
|
261
|
-
|
262
|
-
- `logo` (string, optional) - 로고 이미지 URL
|
263
|
-
- `title` (string, optional) - 헤더 제목
|
264
|
-
|
265
|
-
**반응형 스타일 클래스:**
|
266
|
-
|
267
|
-
- **레이아웃**: `flex items-center justify-between`
|
268
|
-
- **패딩**: `px-4 py-3 sm:px-6 lg:px-8` (화면 크기에 따라 패딩 증가)
|
269
|
-
- **로고**: `h-6 sm:h-8 md:h-10 lg:h-12` (화면 크기에 따라 높이 증가)
|
270
|
-
- **제목**: `text-lg sm:text-xl md:text-2xl lg:text-3xl` (화면 크기에 따라 폰트 크기 증가)
|
271
|
-
- **제목 색상**: `text-success font-bold`
|
272
|
-
|
273
|
-
**반응형 동작:**
|
274
|
-
|
275
|
-
- **모바일 (320px-639px)**: 컴팩트한 레이아웃, 작은 로고와 텍스트
|
276
|
-
- **태블릿 (640px-1023px)**: 중간 크기 로고와 텍스트, 우측 텍스트 표시
|
277
|
-
- **데스크톱 (1024px+)**: 큰 로고와 텍스트, 넓은 패딩
|
278
|
-
|
279
|
-
**Storybook 예제:**
|
280
|
-
|
281
|
-
- 플레이스홀더 로고가 있는 기본 헤더
|
282
|
-
- 커스텀 브랜드 헤더
|
283
|
-
- 작은 컴팩트 헤더
|
284
|
-
- 반응형 테스트 (다양한 화면 크기)
|
285
|
-
|
286
|
-
## 🛠️ 개발
|
287
|
-
|
288
|
-
### 사전 요구사항
|
289
|
-
|
290
|
-
- Node.js 22+
|
291
|
-
- npm 또는 yarn
|
101
|
+
### Footer Component
|
292
102
|
|
293
|
-
|
103
|
+
A flexible footer with sections, social links, and custom styling.
|
294
104
|
|
295
|
-
```
|
296
|
-
|
297
|
-
npm install
|
298
|
-
|
299
|
-
# 개발 서버 시작
|
300
|
-
npm run dev
|
301
|
-
|
302
|
-
# Storybook 시작
|
303
|
-
npm run storybook
|
304
|
-
|
305
|
-
# 라이브러리 빌드
|
306
|
-
npm run build:lib
|
307
|
-
|
308
|
-
# Storybook 빌드
|
309
|
-
npm run build-storybook
|
310
|
-
```
|
311
|
-
|
312
|
-
### 프로젝트 구조
|
105
|
+
```tsx
|
106
|
+
import Footer from '@nextlevel_korea/design-system/components/Footer/Footer';
|
313
107
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
108
|
+
<Footer
|
109
|
+
logo="/logo.png"
|
110
|
+
companyInfo={{
|
111
|
+
name: 'NextLevel',
|
112
|
+
ceo: 'John Doe',
|
113
|
+
businessNumber: '123-45-67890',
|
114
|
+
phone: '010-1234-5678',
|
115
|
+
email: 'contact@nextlevel.com',
|
116
|
+
address: '123 Main St, City, Country',
|
117
|
+
}}
|
118
|
+
/>;
|
322
119
|
```
|
323
120
|
|
324
|
-
|
121
|
+
## 🎨 Customization
|
325
122
|
|
326
|
-
|
327
|
-
2. **Storybook 스토리 추가** 같은 이름 + `.stories.tsx`
|
328
|
-
3. **컴포넌트 export** `src/index.ts`에서
|
329
|
-
4. **Storybook에서 문서화** 예제와 컨트롤 포함
|
123
|
+
All components support extensive customization through props:
|
330
124
|
|
331
|
-
|
125
|
+
### Color Customization
|
332
126
|
|
333
127
|
```tsx
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
}
|
339
|
-
|
340
|
-
export const Button = ({ variant = 'primary', children }: ButtonProps) => {
|
341
|
-
return <button className={`btn btn-${variant}`}>{children}</button>;
|
342
|
-
};
|
343
|
-
```
|
128
|
+
const customColors = {
|
129
|
+
// Background colors
|
130
|
+
headerBg: 'bg-white',
|
131
|
+
sidebarBg: 'bg-gray-50',
|
344
132
|
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
import { Button } from './Button';
|
349
|
-
|
350
|
-
const meta: Meta<typeof Button> = {
|
351
|
-
title: 'Components/Button',
|
352
|
-
component: Button,
|
353
|
-
argTypes: {
|
354
|
-
variant: {
|
355
|
-
control: 'select',
|
356
|
-
options: ['primary', 'secondary'],
|
357
|
-
},
|
358
|
-
},
|
359
|
-
};
|
133
|
+
// Text colors
|
134
|
+
navText: 'text-gray-600',
|
135
|
+
navTextHover: 'hover:text-blue-500',
|
360
136
|
|
361
|
-
|
362
|
-
|
137
|
+
// Accent colors
|
138
|
+
primary: 'bg-blue-500',
|
139
|
+
primaryDark: 'bg-blue-600',
|
363
140
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
141
|
+
// Border colors
|
142
|
+
border: 'border-gray-200',
|
143
|
+
|
144
|
+
// Shadow
|
145
|
+
shadow: 'shadow-lg',
|
369
146
|
};
|
370
147
|
```
|
371
148
|
|
372
|
-
|
373
|
-
|
374
|
-
- **TypeScript 우선** - 완전한 타입 안전성과 IntelliSense 지원
|
375
|
-
- **Tailwind CSS** - 유틸리티 우선 CSS 프레임워크
|
376
|
-
- **반응형 디자인** - 모바일 우선 접근법
|
377
|
-
- **접근성** - WCAG 2.1 준수 컴포넌트
|
378
|
-
- **커스터마이징 가능** - 쉬운 테마링과 커스터마이징
|
379
|
-
|
380
|
-
## 📱 반응형 브레이크포인트
|
381
|
-
|
382
|
-
이 디자인 시스템은 다음과 같은 반응형 브레이크포인트를 지원합니다:
|
383
|
-
|
384
|
-
### 기본 브레이크포인트
|
385
|
-
|
386
|
-
- `xs`: 475px (초소형 모바일)
|
387
|
-
- `sm`: 640px (소형 모바일)
|
388
|
-
- `md`: 768px (태블릿)
|
389
|
-
- `lg`: 1024px (노트북)
|
390
|
-
- `xl`: 1280px (데스크톱)
|
391
|
-
- `2xl`: 1536px (대형 데스크톱)
|
392
|
-
- `3xl`: 1920px (초대형 화면)
|
393
|
-
- `4xl`: 2560px (울트라 와이드)
|
394
|
-
- `5xl`: 3840px (4K 이상)
|
395
|
-
|
396
|
-
### 의미적 브레이크포인트
|
397
|
-
|
398
|
-
- `mobile`: 320px (모바일)
|
399
|
-
- `tablet`: 768px (태블릿)
|
400
|
-
- `laptop`: 1024px (노트북)
|
401
|
-
- `desktop`: 1280px (데스크톱)
|
402
|
-
- `wide`: 1536px (와이드 스크린)
|
403
|
-
- `ultra-wide`: 1920px (울트라 와이드)
|
404
|
-
|
405
|
-
### 사용 예제
|
149
|
+
### Sidebar Position
|
406
150
|
|
407
151
|
```tsx
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
sm:px-6 // 640px 이상에서 패딩 증가
|
413
|
-
lg:px-8 // 1024px 이상에서 패딩 더 증가
|
414
|
-
"
|
415
|
-
>
|
416
|
-
<img
|
417
|
-
className="
|
418
|
-
h-6 // 기본 높이
|
419
|
-
sm:h-8 // 640px 이상에서 높이 증가
|
420
|
-
md:h-10 // 768px 이상에서 높이 증가
|
421
|
-
lg:h-12 // 1024px 이상에서 높이 증가
|
422
|
-
"
|
423
|
-
src="/logo.png"
|
424
|
-
alt="Logo"
|
425
|
-
/>
|
426
|
-
<h1
|
427
|
-
className="
|
428
|
-
text-lg // 기본 폰트 크기
|
429
|
-
sm:text-xl // 640px 이상에서 폰트 크기 증가
|
430
|
-
md:text-2xl // 768px 이상에서 폰트 크기 증가
|
431
|
-
lg:text-3xl // 1024px 이상에서 폰트 크기 증가
|
432
|
-
"
|
433
|
-
>
|
434
|
-
제목
|
435
|
-
</h1>
|
436
|
-
</header>
|
152
|
+
<Header
|
153
|
+
sidebarPosition="right" // 'left' | 'right'
|
154
|
+
// ... other props
|
155
|
+
/>
|
437
156
|
```
|
438
157
|
|
439
|
-
|
158
|
+
## 📚 Storybook
|
440
159
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
// 그리드 시스템
|
447
|
-
<div className="
|
448
|
-
grid
|
449
|
-
grid-cols-1 // 모바일: 1열
|
450
|
-
sm:grid-cols-2 // 태블릿: 2열
|
451
|
-
md:grid-cols-3 // 노트북: 3열
|
452
|
-
lg:grid-cols-4 // 데스크톱: 4열
|
453
|
-
xl:grid-cols-5 // 대형 화면: 5열
|
454
|
-
gap-4
|
455
|
-
">
|
456
|
-
{/* 그리드 아이템들 */}
|
457
|
-
</div>
|
458
|
-
|
459
|
-
// 텍스트 크기
|
460
|
-
<p className="
|
461
|
-
text-sm // 기본: 작은 텍스트
|
462
|
-
sm:text-base // 태블릿: 기본 텍스트
|
463
|
-
md:text-lg // 노트북: 큰 텍스트
|
464
|
-
lg:text-xl // 데스크톱: 더 큰 텍스트
|
465
|
-
">
|
466
|
-
반응형 텍스트
|
467
|
-
</p>
|
468
|
-
|
469
|
-
// 최대 너비 (Max Width)
|
470
|
-
<div className="
|
471
|
-
w-full // 전체 너비
|
472
|
-
max-w-xs // 320px
|
473
|
-
max-w-sm // 384px
|
474
|
-
max-w-md // 448px
|
475
|
-
max-w-lg // 512px
|
476
|
-
max-w-xl // 576px
|
477
|
-
max-w-2xl // 672px
|
478
|
-
max-w-3xl // 768px
|
479
|
-
max-w-4xl // 896px
|
480
|
-
max-w-5xl // 1024px
|
481
|
-
max-w-6xl // 1152px
|
482
|
-
max-w-7xl // 1280px
|
483
|
-
max-w-full // 100%
|
484
|
-
max-w-screen-sm // 640px
|
485
|
-
max-w-screen-md // 768px
|
486
|
-
max-w-screen-lg // 1024px
|
487
|
-
max-w-screen-xl // 1280px
|
488
|
-
max-w-screen-2xl // 1536px
|
489
|
-
">
|
490
|
-
컨테이너
|
491
|
-
</div>
|
492
|
-
|
493
|
-
// 반응형 최대 너비
|
494
|
-
<div className="
|
495
|
-
w-full
|
496
|
-
max-w-xs // 모바일: 320px
|
497
|
-
sm:max-w-md // 태블릿: 448px
|
498
|
-
md:max-w-lg // 노트북: 512px
|
499
|
-
lg:max-w-xl // 데스크톱: 576px
|
500
|
-
xl:max-w-2xl // 대형 화면: 672px
|
501
|
-
mx-auto // 중앙 정렬
|
502
|
-
">
|
503
|
-
반응형 컨테이너
|
504
|
-
</div>
|
160
|
+
View all components and their variations in Storybook:
|
161
|
+
|
162
|
+
```bash
|
163
|
+
npm run storybook
|
505
164
|
```
|
506
165
|
|
507
|
-
|
166
|
+
Then open [http://localhost:6006](http://localhost:6006)
|
508
167
|
|
509
|
-
|
168
|
+
## 🔧 Migration from Vite
|
510
169
|
|
511
|
-
|
512
|
-
- **@storybook/addon-controls** - 인터랙티브 prop 컨트롤
|
513
|
-
- **@storybook/addon-backgrounds** - 배경 전환
|
514
|
-
- **@storybook/addon-viewport** - 반응형 테스트
|
170
|
+
This project has been migrated from Vite to Next.js for better compatibility and performance. Key changes:
|
515
171
|
|
516
|
-
|
172
|
+
- **App Router**: Using Next.js 13+ App Router
|
173
|
+
- **Server Components**: Support for React Server Components
|
174
|
+
- **Built-in Optimization**: Automatic code splitting and optimization
|
175
|
+
- **Better TypeScript Support**: Enhanced TypeScript integration
|
176
|
+
- **Improved Development Experience**: Faster refresh and better error handling
|
517
177
|
|
518
|
-
|
519
|
-
2. 기능 브랜치를 만드세요
|
520
|
-
3. Storybook 스토리와 함께 컴포넌트를 추가하세요
|
521
|
-
4. Storybook에서 테스트하세요
|
522
|
-
5. 풀 리퀘스트를 제출하세요
|
178
|
+
## 📄 License
|
523
179
|
|
524
|
-
|
180
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
525
181
|
|
526
|
-
|
527
|
-
- 여러 변형과 상태를 포함하세요
|
528
|
-
- 모든 props에 적절한 argTypes를 추가하세요
|
529
|
-
- 접근성 테스트를 포함하세요
|
530
|
-
- 명확한 문서를 제공하세요
|
182
|
+
## 🤝 Contributing
|
531
183
|
|
532
|
-
|
184
|
+
1. Fork the repository
|
185
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
186
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
187
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
188
|
+
5. Open a Pull Request
|
533
189
|
|
534
|
-
|
190
|
+
## 📞 Support
|
535
191
|
|
536
|
-
|
192
|
+
For support and questions, please contact:
|
537
193
|
|
538
|
-
-
|
539
|
-
-
|
540
|
-
- [React](https://reactjs.org/)
|
541
|
-
- [TypeScript](https://www.typescriptlang.org/)
|
194
|
+
- Email: support@nextlevel.com
|
195
|
+
- Website: https://nextlevel.com
|
542
196
|
|
543
197
|
---
|
544
198
|
|
545
|
-
|
546
|
-
|
547
|
-
## 📝 완전한 사용 예제
|
548
|
-
|
549
|
-
### React + Vite 프로젝트
|
550
|
-
|
551
|
-
```tsx
|
552
|
-
// src/App.tsx
|
553
|
-
import { Header } from '@nextlevel_korea/design-system';
|
554
|
-
import '@nextlevel_korea/design-system/styles';
|
555
|
-
|
556
|
-
function App() {
|
557
|
-
return (
|
558
|
-
<div className="min-h-screen bg-gray-50">
|
559
|
-
<Header
|
560
|
-
logo="https://via.placeholder.com/150x50/2563eb/ffffff?text=LOGO"
|
561
|
-
title="My Awesome App"
|
562
|
-
/>
|
563
|
-
<main className="container mx-auto px-4 py-8">
|
564
|
-
<h1 className="text-3xl font-bold text-gray-900">Welcome to My App</h1>
|
565
|
-
</main>
|
566
|
-
</div>
|
567
|
-
);
|
568
|
-
}
|
569
|
-
|
570
|
-
export default App;
|
571
|
-
```
|
572
|
-
|
573
|
-
### Next.js 프로젝트
|
574
|
-
|
575
|
-
```tsx
|
576
|
-
// app/layout.tsx
|
577
|
-
import '@nextlevel_korea/design-system/styles';
|
578
|
-
|
579
|
-
export default function RootLayout({
|
580
|
-
children,
|
581
|
-
}: {
|
582
|
-
children: React.ReactNode;
|
583
|
-
}) {
|
584
|
-
return (
|
585
|
-
<html lang="en">
|
586
|
-
<body>{children}</body>
|
587
|
-
</html>
|
588
|
-
);
|
589
|
-
}
|
590
|
-
```
|
591
|
-
|
592
|
-
```tsx
|
593
|
-
// app/page.tsx
|
594
|
-
import { Header } from '@nextlevel_korea/design-system';
|
595
|
-
|
596
|
-
export default function Home() {
|
597
|
-
return (
|
598
|
-
<div>
|
599
|
-
<Header logo="/logo.png" title="Next.js App" />
|
600
|
-
<main>
|
601
|
-
<h1>Welcome to Next.js!</h1>
|
602
|
-
</main>
|
603
|
-
</div>
|
604
|
-
);
|
605
|
-
}
|
606
|
-
```
|
607
|
-
|
608
|
-
### Create React App
|
609
|
-
|
610
|
-
```tsx
|
611
|
-
// src/App.js
|
612
|
-
import { Header } from '@nextlevel_korea/design-system';
|
613
|
-
import '@nextlevel_korea/design-system/styles';
|
614
|
-
|
615
|
-
function App() {
|
616
|
-
return (
|
617
|
-
<div className="App">
|
618
|
-
<Header logo="https://example.com/logo.png" title="React App" />
|
619
|
-
<header className="App-header">
|
620
|
-
<p>Edit src/App.js and save to reload.</p>
|
621
|
-
</header>
|
622
|
-
</div>
|
623
|
-
);
|
624
|
-
}
|
625
|
-
|
626
|
-
export default App;
|
627
|
-
```
|
199
|
+
Built with ❤️ by NextLevel Team
|