@nextlevel_korea/design-system 1.1.6 → 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 CHANGED
@@ -1,627 +1,199 @@
1
- # @nextlevel/design-system
1
+ # NextLevel Design System
2
2
 
3
- TypeScript와 Tailwind CSS로 구축된 현대적인 React 디자인 시스템으로, 포괄적인 Storybook 문서화를 제공합니다.
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
- #### 1. 스타일 import 확인
24
+ - Node.js 18+
25
+ - npm or yarn
74
26
 
75
- 가장 일반적인 문제는 스타일을 import하지 않는 것입니다:
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
- #### 3. CSS 우선순위 문제
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
- npm uninstall @nextlevel_korea/design-system
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
- #### 오류: "Module not found"
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
- 그런 다음 브라우저에서 [http://localhost:6006](http://localhost:6006) 열어보세요.
48
+ 4. Open [http://localhost:3000](http://localhost:3000) in your browser.
228
49
 
229
- ### Storybook에서 찾을 수 있는 것들
50
+ ### Available Scripts
230
51
 
231
- 우리 Storybook에는 다음이 포함됩니다:
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
- ### Header
243
-
244
- 커스터마이징 가능한 로고가 있는 유연한 헤더 컴포넌트입니다. 모든 화면 크기에서 최적화된 반응형 디자인을 제공합니다.
63
+ A responsive navigation header with dropdown menus and mobile sidebar.
245
64
 
246
65
  ```tsx
247
- import { Header } from '@nextlevel_korea/design-system';
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
- <Header logo="https://example.com/logo.png" />
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
- <Header title="My Application" />
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
- **Props:**
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
- ```bash
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
- src/
316
- ├── components/ # React 컴포넌트
317
- │ ├── Header.tsx # Header 컴포넌트
318
- │ └── Header.stories.tsx # Header Storybook 스토리
319
- ├── utils/ # 유틸리티 함수
320
- ├── index.ts # 메인 export 파일
321
- └── index.css # 전역 스타일
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
- 1. **컴포넌트 생성** `src/components/`에
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
- // src/components/Button.tsx
335
- export interface ButtonProps {
336
- variant?: 'primary' | 'secondary';
337
- children: React.ReactNode;
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
- ```tsx
346
- // src/components/Button.stories.tsx
347
- import type { Meta, StoryObj } from '@storybook/react';
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
- export default meta;
362
- type Story = StoryObj<typeof meta>;
137
+ // Accent colors
138
+ primary: 'bg-blue-500',
139
+ primaryDark: 'bg-blue-600',
363
140
 
364
- export const Primary: Story = {
365
- args: {
366
- variant: 'primary',
367
- children: 'Primary Button',
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
- <header
410
- className="
411
- px-4 py-3 // 기본 패딩
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
- ```tsx
442
- // 숨김/표시
443
- <div className="hidden sm:block">태블릿 이상에서만 표시</div>
444
- <div className="block sm:hidden">모바일에서만 표시</div>
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
- ## 📚 Storybook 애드온
166
+ Then open [http://localhost:6006](http://localhost:6006)
508
167
 
509
- 우리 Storybook은 다음으로 구성되어 있습니다:
168
+ ## 🔧 Migration from Vite
510
169
 
511
- - **@storybook/addon-docs** - 자동 문서 생성
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
- 1. 저장소를 포크하세요
519
- 2. 기능 브랜치를 만드세요
520
- 3. Storybook 스토리와 함께 컴포넌트를 추가하세요
521
- 4. Storybook에서 테스트하세요
522
- 5. 풀 리퀘스트를 제출하세요
178
+ ## 📄 License
523
179
 
524
- ### Storybook 가이드라인
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
- MIT 라이선스 - 자세한 내용은 [LICENSE](LICENSE) 파일을 참조하세요.
190
+ ## 📞 Support
535
191
 
536
- ## 🔗 링크
192
+ For support and questions, please contact:
537
193
 
538
- - [Storybook 문서](https://storybook.js.org/)
539
- - [Tailwind CSS](https://tailwindcss.com/)
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
- NextLevel 팀이 ❤️로 만들었습니다
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
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,cAAc,EAAE,MAAM,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK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F,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@nextlevel_korea/design-system",
3
- "version": "1.1.6",
4
- "type": "module",
3
+ "version": "2.0.0",
5
4
  "description": "A modern React design system built with TypeScript and Tailwind CSS - The NextLevel Design System",
6
5
  "keywords": [
7
6
  "nextlevel"
@@ -28,11 +27,12 @@
28
27
  "README.md"
29
28
  ],
30
29
  "scripts": {
31
- "dev": "vite",
32
- "build": "tsc -b && vite build",
33
- "build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json --emitDeclarationOnly",
34
- "lint": "eslint .",
35
- "preview": "vite preview",
30
+ "dev": "next dev",
31
+ "build": "next build",
32
+ "build:lib": "tsc -p tsconfig.lib.json --emitDeclarationOnly && next build",
33
+ "start": "next start",
34
+ "lint": "next lint",
35
+ "export": "next build && next export",
36
36
  "tw:init": "tailwindcss init -p",
37
37
  "prepublishOnly": "npm run build:lib",
38
38
  "storybook": "storybook dev -p 6006",
@@ -44,6 +44,9 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "clsx": "^2.1.1",
47
+ "next": "^15.4.2",
48
+ "react": "^18.0.0 || ^19.0.0",
49
+ "react-dom": "^18.0.0 || ^19.0.0",
47
50
  "tailwind-merge": "^3.3.1"
48
51
  },
49
52
  "devDependencies": {
@@ -53,23 +56,21 @@
53
56
  "@storybook/react-vite": "^9.0.18",
54
57
  "@tailwindcss/forms": "^0.5.7",
55
58
  "@tailwindcss/typography": "^0.5.9",
59
+ "@types/node": "^22.0.0",
56
60
  "@types/react": "^19.1.8",
57
61
  "@types/react-dom": "^19.1.6",
58
- "@vitejs/plugin-react": "^4.6.0",
59
62
  "autoprefixer": "^10.4.14",
60
63
  "eslint": "^9.30.1",
64
+ "eslint-config-next": "^15.0.0",
61
65
  "eslint-plugin-react-hooks": "^5.2.0",
62
66
  "eslint-plugin-react-refresh": "^0.4.20",
63
67
  "eslint-plugin-storybook": "^9.0.18",
64
68
  "globals": "^16.3.0",
65
69
  "postcss": "^8.4.38",
66
- "react": "^19.1.0",
67
- "react-dom": "^19.1.0",
68
70
  "storybook": "^9.0.18",
69
71
  "tailwindcss": "^3.4.3",
70
72
  "ts-node": "^10.9.2",
71
73
  "typescript": "~5.8.3",
72
- "typescript-eslint": "^8.35.1",
73
- "vite": "^5.4.19"
74
+ "typescript-eslint": "^8.35.1"
74
75
  }
75
76
  }