podo-ui 0.1.29 → 0.1.30
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/package.json +1 -1
- package/readme.md +412 -106
- package/scss/typo/mixin.scss +39 -0
- package/scss/typo/typo.scss +3 -20
- package/.next/app-build-manifest.json +0 -16
- package/.next/build-manifest.json +0 -19
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/config.json +0 -7
- package/.next/cache/webpack/client-development/0.pack.gz +0 -0
- package/.next/cache/webpack/client-development/1.pack.gz +0 -0
- package/.next/cache/webpack/client-development/index.pack.gz +0 -0
- package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-development/0.pack.gz +0 -0
- package/.next/cache/webpack/edge-server-development/index.pack.gz +0 -0
- package/.next/cache/webpack/server-development/0.pack.gz +0 -0
- package/.next/cache/webpack/server-development/index.pack.gz +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/2.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/package.json +0 -1
- package/.next/react-loadable-manifest.json +0 -1
- package/.next/server/app/page.js +0 -5057
- package/.next/server/app/page_client-reference-manifest.js +0 -1
- package/.next/server/app-paths-manifest.json +0 -3
- package/.next/server/edge-runtime-webpack.js +0 -1171
- package/.next/server/middleware-build-manifest.js +0 -1
- package/.next/server/middleware-manifest.json +0 -28
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/next-font-manifest.js +0 -1
- package/.next/server/next-font-manifest.json +0 -1
- package/.next/server/pages-manifest.json +0 -1
- package/.next/server/server-reference-manifest.js +0 -1
- package/.next/server/server-reference-manifest.json +0 -5
- package/.next/server/static/webpack/633457081244afec._.hot-update.json +0 -1
- package/.next/static/chunks/_app-pages-browser_react_atom_editor_tsx.js +0 -692
- package/.next/static/chunks/app/layout.js +0 -72
- package/.next/static/chunks/app/page.js +0 -233
- package/.next/static/chunks/app-pages-internals.js +0 -127
- package/.next/static/chunks/main-app.js +0 -1875
- package/.next/static/chunks/polyfills.js +0 -1
- package/.next/static/chunks/webpack.js +0 -1427
- package/.next/static/css/_app-pages-browser_react_atom_editor_tsx.css +0 -124
- package/.next/static/css/app/layout.css +0 -20357
- package/.next/static/css/app/page.css +0 -4282
- package/.next/static/development/_buildManifest.js +0 -1
- package/.next/static/development/_ssgManifest.js +0 -1
- package/.next/static/media/Pretendard-Black.4aeaaf12.woff2 +0 -0
- package/.next/static/media/Pretendard-Bold.e00e15f4.woff2 +0 -0
- package/.next/static/media/Pretendard-ExtraBold.dd3e76c5.woff2 +0 -0
- package/.next/static/media/Pretendard-ExtraLight.b6885b7a.woff2 +0 -0
- package/.next/static/media/Pretendard-Light.e725ed3d.woff2 +0 -0
- package/.next/static/media/Pretendard-Medium.12f0acdc.woff2 +0 -0
- package/.next/static/media/Pretendard-Regular.119cf01b.woff2 +0 -0
- package/.next/static/media/Pretendard-SemiBold.cfa29e4f.woff2 +0 -0
- package/.next/static/media/Pretendard-Thin.fc2b22d5.woff2 +0 -0
- package/.next/static/media/icon.e529ac0f.woff +0 -0
- package/.next/static/webpack/633457081244afec._.hot-update.json +0 -1
- package/.next/trace +0 -28
- package/.next/types/app/layout.ts +0 -79
- package/.next/types/app/page.ts +0 -79
- package/.next/types/package.json +0 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,199 +1,505 @@
|
|
|
1
|
-
# Podo-
|
|
2
|
-
- SCSS Module 기반 디자인 시스템
|
|
1
|
+
# Podo-UI 사용 가이드
|
|
3
2
|
|
|
3
|
+
> SCSS Module 기반 디자인 시스템
|
|
4
|
+
> 버전: 0.1.29
|
|
5
|
+
> 저장소: https://github.com/hada0127/podo-ui
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
---
|
|
6
8
|
|
|
7
|
-
##
|
|
9
|
+
## 목차
|
|
10
|
+
1. [설치 및 기본 설정](#설치-및-기본-설정)
|
|
11
|
+
2. [컴포넌트](#컴포넌트)
|
|
12
|
+
3. [색상 시스템](#색상-시스템)
|
|
13
|
+
4. [레이아웃](#레이아웃)
|
|
14
|
+
5. [그리드 시스템](#그리드-시스템)
|
|
15
|
+
6. [타이포그래피](#타이포그래피)
|
|
8
16
|
|
|
9
|
-
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 설치 및 기본 설정
|
|
20
|
+
|
|
21
|
+
### 1. Global SCSS 적용
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// main.tsx
|
|
10
25
|
import 'podo-ui/global.scss';
|
|
11
26
|
```
|
|
12
27
|
|
|
13
|
-
### SCSS Module
|
|
14
|
-
|
|
15
|
-
👉 파일의 최상단에 아래 파일 선언
|
|
28
|
+
### 2. SCSS Module에서 변수/함수/믹스인 사용
|
|
16
29
|
|
|
17
30
|
```scss
|
|
31
|
+
// component.module.scss
|
|
18
32
|
@use 'podo-ui/mixin' as *;
|
|
33
|
+
|
|
34
|
+
.myComponent {
|
|
35
|
+
color: color(primary);
|
|
36
|
+
margin: s(4);
|
|
37
|
+
border-radius: r(2);
|
|
38
|
+
}
|
|
19
39
|
```
|
|
20
40
|
|
|
21
|
-
|
|
41
|
+
---
|
|
22
42
|
|
|
23
|
-
|
|
43
|
+
## 컴포넌트
|
|
24
44
|
|
|
25
|
-
|
|
26
|
-
👉 js에서 아래와 같이 설정(warm)
|
|
45
|
+
### React 컴포넌트
|
|
27
46
|
|
|
28
|
-
|
|
29
|
-
// 기본값
|
|
30
|
-
document.documentElement.setAttribute('data-color-tone', '');
|
|
47
|
+
⚠️ **중요: React 컴포넌트는 `podo-ui/react`에서 import해야 합니다!**
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
document.documentElement.setAttribute('data-color-tone', 'warm');
|
|
34
|
-
```
|
|
49
|
+
podo-ui는 주로 CSS 클래스 기반이지만, 몇 가지 React 컴포넌트를 제공합니다:
|
|
35
50
|
|
|
36
|
-
|
|
51
|
+
#### Input
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
```tsx
|
|
54
|
+
import { Input } from 'podo-ui/react'; // ⚠️ 'podo-ui/react' 경로 사용!
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
<Input
|
|
57
|
+
type="text"
|
|
58
|
+
placeholder="입력하세요"
|
|
59
|
+
value={value}
|
|
60
|
+
onChange={handleChange}
|
|
61
|
+
validator={zodSchema} // Zod 스키마로 유효성 검사
|
|
62
|
+
withIcon="icon-search" // 왼쪽 아이콘
|
|
63
|
+
withRightIcon="icon-clear" // 오른쪽 아이콘
|
|
64
|
+
unit="원" // 단위 표시
|
|
65
|
+
/>
|
|
66
|
+
```
|
|
43
67
|
|
|
44
|
-
|
|
45
|
-
|
|
68
|
+
**Props:**
|
|
69
|
+
- `value`: string | number
|
|
70
|
+
- `validator`: Zod 스키마 (선택)
|
|
71
|
+
- `withIcon`: 왼쪽 아이콘 클래스명
|
|
72
|
+
- `withRightIcon`: 오른쪽 아이콘 클래스명
|
|
73
|
+
- `unit`: 단위 문자열
|
|
74
|
+
- 기타 HTML input 속성 전부 지원
|
|
75
|
+
|
|
76
|
+
#### Textarea
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import { Textarea } from 'podo-ui/react'; // ⚠️ 'podo-ui/react' 경로 사용!
|
|
80
|
+
|
|
81
|
+
<Textarea
|
|
82
|
+
placeholder="내용을 입력하세요"
|
|
83
|
+
value={value}
|
|
84
|
+
onChange={handleChange}
|
|
85
|
+
rows={5}
|
|
86
|
+
/>
|
|
87
|
+
```
|
|
46
88
|
|
|
47
|
-
|
|
48
|
-
|
|
89
|
+
#### Editor (WYSIWYG)
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
import { Editor } from 'podo-ui/react'; // ⚠️ 'podo-ui/react' 경로 사용!
|
|
93
|
+
|
|
94
|
+
<Editor
|
|
95
|
+
value={content}
|
|
96
|
+
onChange={handleChange}
|
|
97
|
+
/>
|
|
49
98
|
```
|
|
50
99
|
|
|
51
|
-
|
|
100
|
+
#### Field (Form 그룹)
|
|
52
101
|
|
|
53
|
-
|
|
102
|
+
```tsx
|
|
103
|
+
import { Field, Input } from 'podo-ui/react'; // ⚠️ 'podo-ui/react' 경로 사용!
|
|
54
104
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
105
|
+
<Field
|
|
106
|
+
label="이름"
|
|
107
|
+
required
|
|
108
|
+
error="이름을 입력해주세요"
|
|
109
|
+
>
|
|
110
|
+
<Input type="text" />
|
|
111
|
+
</Field>
|
|
59
112
|
```
|
|
60
113
|
|
|
61
|
-
|
|
114
|
+
---
|
|
62
115
|
|
|
63
|
-
|
|
116
|
+
## 색상 시스템
|
|
64
117
|
|
|
65
|
-
|
|
66
|
-
👉 선택 가능한 색상의 하위 색상으로 색상명-fill과 색상명-reverse가 존재한다.
|
|
67
|
-
👉 위 선택자에 없는 text, border, bg, bg-elevation은 시스템 내 자동 적용한다.
|
|
118
|
+
### 사용 가능한 색상 타입
|
|
68
119
|
|
|
69
|
-
|
|
120
|
+
- `primary` - 주요 색상
|
|
121
|
+
- `default` - 기본 색상
|
|
122
|
+
- `default-deep` - 진한 기본 색상
|
|
123
|
+
- `info` - 정보 색상
|
|
124
|
+
- `link` - 링크 색상
|
|
125
|
+
- `success` - 성공 색상
|
|
126
|
+
- `warning` - 경고 색상
|
|
127
|
+
- `danger` - 위험 색상
|
|
70
128
|
|
|
71
|
-
|
|
129
|
+
### 색상 변형
|
|
130
|
+
|
|
131
|
+
각 색상은 다음 변형을 가집니다:
|
|
132
|
+
- `{color}` - 기본
|
|
133
|
+
- `{color}-hover` - 호버 상태
|
|
134
|
+
- `{color}-pressed` - 눌림 상태
|
|
135
|
+
- `{color}-focus` - 포커스 상태
|
|
136
|
+
- `{color}-fill` - 배경 색상
|
|
137
|
+
- `{color}-reverse` - 반전 색상
|
|
138
|
+
- `{color}-outline` - 아웃라인 색상
|
|
139
|
+
|
|
140
|
+
### CSS 클래스 사용
|
|
72
141
|
|
|
73
142
|
```html
|
|
74
|
-
|
|
75
|
-
<div
|
|
143
|
+
<!-- 텍스트 색상 -->
|
|
144
|
+
<div class="primary">Primary 색상 텍스트</div>
|
|
145
|
+
|
|
146
|
+
<!-- 배경 색상 -->
|
|
147
|
+
<div class="bg-primary">Primary 배경</div>
|
|
148
|
+
|
|
149
|
+
<!-- 테두리 색상 -->
|
|
150
|
+
<div class="border-primary">Primary 테두리</div>
|
|
76
151
|
```
|
|
77
152
|
|
|
78
|
-
### SCSS
|
|
153
|
+
### SCSS 함수 사용
|
|
79
154
|
|
|
80
155
|
```scss
|
|
81
|
-
|
|
82
|
-
color: color(
|
|
156
|
+
.myButton {
|
|
157
|
+
color: color(primary-reverse);
|
|
158
|
+
background-color: color(primary);
|
|
159
|
+
border: 1px solid color(primary);
|
|
160
|
+
|
|
161
|
+
&:hover {
|
|
162
|
+
background-color: color(primary-hover);
|
|
163
|
+
}
|
|
83
164
|
}
|
|
84
165
|
```
|
|
85
166
|
|
|
86
|
-
###
|
|
87
|
-
|
|
88
|
-
👉 아래 형태로 css 변수를 커스텀하여 사용
|
|
167
|
+
### 커스텀 색상 설정 (프로젝트에 이미 적용됨)
|
|
89
168
|
|
|
90
169
|
```scss
|
|
170
|
+
// src/styles/variables.scss
|
|
91
171
|
:root {
|
|
92
|
-
--color-primary: #
|
|
93
|
-
--color-primary-hover: #
|
|
94
|
-
--color-primary-pressed: #
|
|
95
|
-
--color-primary-focus: #
|
|
96
|
-
--color-primary-fill: #
|
|
97
|
-
--color-primary-reverse: #
|
|
172
|
+
--color-primary: #2D6AF6;
|
|
173
|
+
--color-primary-hover: #1F61E6;
|
|
174
|
+
--color-primary-pressed: #004AC3;
|
|
175
|
+
--color-primary-focus: #1F61E6;
|
|
176
|
+
--color-primary-fill: #ECF1FF;
|
|
177
|
+
--color-primary-reverse: #FFFFFF;
|
|
178
|
+
--color-primary-outline: rgba(31, 97, 230, 0.3);
|
|
98
179
|
}
|
|
180
|
+
|
|
99
181
|
html[data-color-mode='dark'] {
|
|
100
|
-
--color-primary: #
|
|
101
|
-
--color-primary-hover: #
|
|
102
|
-
|
|
103
|
-
--color-primary-focus: #ff7564;
|
|
104
|
-
--color-primary-fill: #1c1c20;
|
|
182
|
+
--color-primary: #4D79FF;
|
|
183
|
+
--color-primary-hover: #7393FF;
|
|
184
|
+
// ...
|
|
105
185
|
}
|
|
106
186
|
```
|
|
107
187
|
|
|
108
|
-
|
|
188
|
+
### 다크 모드 설정
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
// Light 모드
|
|
192
|
+
document.documentElement.setAttribute('data-color-mode', 'light');
|
|
193
|
+
|
|
194
|
+
// Dark 모드
|
|
195
|
+
document.documentElement.setAttribute('data-color-mode', 'dark');
|
|
196
|
+
|
|
197
|
+
// 자동 (브라우저 설정 따름)
|
|
198
|
+
document.documentElement.setAttribute('data-color-mode', '');
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 색상 톤 설정
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
// 기본 톤
|
|
205
|
+
document.documentElement.setAttribute('data-color-tone', '');
|
|
206
|
+
|
|
207
|
+
// Warm 톤
|
|
208
|
+
document.documentElement.setAttribute('data-color-tone', 'warm');
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
109
212
|
|
|
110
|
-
|
|
213
|
+
## 버튼
|
|
111
214
|
|
|
112
|
-
|
|
215
|
+
### 기본 버튼
|
|
113
216
|
|
|
114
217
|
```html
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</section>
|
|
218
|
+
<button>기본 버튼</button>
|
|
219
|
+
<button class="primary">Primary 버튼</button>
|
|
220
|
+
<button class="danger">Danger 버튼</button>
|
|
221
|
+
<button disabled>비활성화</button>
|
|
120
222
|
```
|
|
121
223
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
224
|
+
### 버튼 변형
|
|
225
|
+
|
|
226
|
+
```html
|
|
227
|
+
<!-- Fill 스타일 (배경색 연함) -->
|
|
228
|
+
<button class="primary-fill">Primary Fill</button>
|
|
229
|
+
|
|
230
|
+
<!-- Border 스타일 (테두리만) -->
|
|
231
|
+
<button class="primary-border">Primary Border</button>
|
|
127
232
|
|
|
128
|
-
|
|
233
|
+
<!-- Text 스타일 (텍스트만) -->
|
|
234
|
+
<button class="primary-text">Primary Text</button>
|
|
235
|
+
```
|
|
129
236
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
237
|
+
### 버튼 크기 (CSS 직접 지정)
|
|
238
|
+
|
|
239
|
+
```html
|
|
240
|
+
<button class="primary" style="padding: 0.5rem 1rem; font-size: 0.875rem">Small</button>
|
|
241
|
+
<button class="primary" style="padding: 0.75rem 1.5rem; font-size: 1rem">Medium</button>
|
|
242
|
+
<button class="primary" style="padding: 1rem 2rem; font-size: 1.125rem">Large</button>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
135
246
|
|
|
136
247
|
## 레이아웃
|
|
137
248
|
|
|
138
|
-
###
|
|
249
|
+
### 여백 (Spacing)
|
|
139
250
|
|
|
140
|
-
|
|
251
|
+
**클래스 사용:**
|
|
252
|
+
```html
|
|
253
|
+
<div class="spacing-4">여백 4</div>
|
|
254
|
+
<div class="spacing-8">여백 8</div>
|
|
255
|
+
```
|
|
141
256
|
|
|
257
|
+
**SCSS 함수 사용:**
|
|
142
258
|
```scss
|
|
143
|
-
|
|
144
|
-
margin:
|
|
259
|
+
.container {
|
|
260
|
+
margin: s(4);
|
|
261
|
+
padding: s(8);
|
|
262
|
+
gap: s(2);
|
|
145
263
|
}
|
|
146
264
|
```
|
|
147
265
|
|
|
266
|
+
**사용 가능한 값:** 0 ~ 13
|
|
267
|
+
|
|
268
|
+
### 테두리 반경 (Border Radius)
|
|
269
|
+
|
|
270
|
+
**클래스 사용:**
|
|
148
271
|
```html
|
|
149
|
-
<
|
|
272
|
+
<div class="r-2">작은 모서리</div>
|
|
273
|
+
<div class="r-4">중간 모서리</div>
|
|
274
|
+
<div class="r-full">완전한 원</div>
|
|
150
275
|
```
|
|
151
276
|
|
|
152
|
-
|
|
277
|
+
**SCSS 함수 사용:**
|
|
278
|
+
```scss
|
|
279
|
+
.card {
|
|
280
|
+
border-radius: r(4);
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**사용 가능한 값:** 0 ~ 6, 'full'
|
|
153
285
|
|
|
154
|
-
|
|
286
|
+
### 테두리 두께 (Border)
|
|
155
287
|
|
|
288
|
+
**클래스 사용:**
|
|
289
|
+
```html
|
|
290
|
+
<div class="border-1">테두리 1px</div>
|
|
291
|
+
<div class="border-4">테두리 4px</div>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**SCSS 함수 사용:**
|
|
156
295
|
```scss
|
|
157
|
-
|
|
158
|
-
|
|
296
|
+
.box {
|
|
297
|
+
border-width: border(2);
|
|
159
298
|
}
|
|
160
299
|
```
|
|
161
300
|
|
|
301
|
+
**사용 가능한 값:** 0 ~ 4
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## 그리드 시스템
|
|
306
|
+
|
|
307
|
+
### 기본 그리드 (Auto Wrap)
|
|
308
|
+
|
|
309
|
+
```html
|
|
310
|
+
<section class="grid">
|
|
311
|
+
<div class="w-4">4/12 (33.33%)</div>
|
|
312
|
+
<div class="w-4">4/12 (33.33%)</div>
|
|
313
|
+
<div class="w-4">4/12 (33.33%)</div>
|
|
314
|
+
<div class="w-6">6/12 (50%)</div>
|
|
315
|
+
<div class="w-6">6/12 (50%)</div>
|
|
316
|
+
</section>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**특징:**
|
|
320
|
+
- PC: 12 그리드
|
|
321
|
+
- Tablet: 6 그리드
|
|
322
|
+
- Mobile: 4 그리드
|
|
323
|
+
- 자동 줄바꿈
|
|
324
|
+
|
|
325
|
+
**사용 가능한 클래스:** `w-1` ~ `w-12`
|
|
326
|
+
|
|
327
|
+
### 고정 그리드 (Fixed Columns)
|
|
328
|
+
|
|
162
329
|
```html
|
|
163
|
-
|
|
330
|
+
<!-- 4열 고정 그리드 -->
|
|
331
|
+
<section class="grid-fix-4">
|
|
332
|
+
<div class="w-1_4">25%</div>
|
|
333
|
+
<div class="w-2_4">50%</div>
|
|
334
|
+
<div class="w-1_4">25%</div>
|
|
335
|
+
</section>
|
|
336
|
+
|
|
337
|
+
<!-- 6열 고정 그리드 -->
|
|
338
|
+
<section class="grid-fix-6">
|
|
339
|
+
<div class="w-2_6">33.33%</div>
|
|
340
|
+
<div class="w-4_6">66.67%</div>
|
|
341
|
+
</section>
|
|
164
342
|
```
|
|
165
343
|
|
|
166
|
-
|
|
344
|
+
**사용 가능한 그리드:** `grid-fix-2` ~ `grid-fix-6`
|
|
167
345
|
|
|
168
|
-
|
|
346
|
+
---
|
|
169
347
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
348
|
+
## 폼 요소
|
|
349
|
+
|
|
350
|
+
### 입력 필드
|
|
351
|
+
|
|
352
|
+
```html
|
|
353
|
+
<input type="text" placeholder="텍스트 입력">
|
|
354
|
+
<input type="email" placeholder="이메일">
|
|
355
|
+
<input type="password" placeholder="비밀번호">
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Select
|
|
359
|
+
|
|
360
|
+
```html
|
|
361
|
+
<select>
|
|
362
|
+
<option>옵션 1</option>
|
|
363
|
+
<option>옵션 2</option>
|
|
364
|
+
<option>옵션 3</option>
|
|
365
|
+
</select>
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Textarea
|
|
369
|
+
|
|
370
|
+
```html
|
|
371
|
+
<textarea rows="5" placeholder="내용을 입력하세요"></textarea>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Checkbox & Radio
|
|
375
|
+
|
|
376
|
+
```html
|
|
377
|
+
<input type="checkbox" id="check1">
|
|
378
|
+
<label for="check1">체크박스</label>
|
|
379
|
+
|
|
380
|
+
<input type="radio" name="radio" id="radio1">
|
|
381
|
+
<label for="radio1">라디오 1</label>
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Toggle
|
|
385
|
+
|
|
386
|
+
```html
|
|
387
|
+
<input type="checkbox" class="toggle" id="toggle1">
|
|
388
|
+
<label for="toggle1">토글 스위치</label>
|
|
174
389
|
```
|
|
175
390
|
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## 분자 컴포넌트 (Molecule)
|
|
394
|
+
|
|
395
|
+
### Pagination
|
|
396
|
+
|
|
176
397
|
```html
|
|
177
|
-
<
|
|
398
|
+
<nav class="pagination">
|
|
399
|
+
<button class="prev">이전</button>
|
|
400
|
+
<button class="active">1</button>
|
|
401
|
+
<button>2</button>
|
|
402
|
+
<button>3</button>
|
|
403
|
+
<button class="next">다음</button>
|
|
404
|
+
</nav>
|
|
178
405
|
```
|
|
179
406
|
|
|
180
|
-
|
|
407
|
+
### Tab
|
|
181
408
|
|
|
182
|
-
|
|
409
|
+
```html
|
|
410
|
+
<div class="tab">
|
|
411
|
+
<button class="active">탭 1</button>
|
|
412
|
+
<button>탭 2</button>
|
|
413
|
+
<button>탭 3</button>
|
|
414
|
+
</div>
|
|
415
|
+
```
|
|
183
416
|
|
|
184
|
-
|
|
417
|
+
### Table
|
|
185
418
|
|
|
186
419
|
```html
|
|
187
|
-
<
|
|
420
|
+
<table>
|
|
421
|
+
<thead>
|
|
422
|
+
<tr>
|
|
423
|
+
<th>제목 1</th>
|
|
424
|
+
<th>제목 2</th>
|
|
425
|
+
</tr>
|
|
426
|
+
</thead>
|
|
427
|
+
<tbody>
|
|
428
|
+
<tr>
|
|
429
|
+
<td>데이터 1</td>
|
|
430
|
+
<td>데이터 2</td>
|
|
431
|
+
</tr>
|
|
432
|
+
</tbody>
|
|
433
|
+
</table>
|
|
188
434
|
```
|
|
189
435
|
|
|
190
|
-
|
|
436
|
+
---
|
|
191
437
|
|
|
192
|
-
|
|
193
|
-
👉 폰트포지에서 icon.woff 폰트 생성
|
|
194
|
-
👉 /scss/icon/font 경로에 icon.woff 복사
|
|
195
|
-
👉 쉘에서 아래 스크립트 실행
|
|
438
|
+
## 타이포그래피
|
|
196
439
|
|
|
197
|
-
|
|
198
|
-
|
|
440
|
+
### 폰트 패밀리 설정
|
|
441
|
+
|
|
442
|
+
```scss
|
|
443
|
+
:root {
|
|
444
|
+
--base-font-family: 'Pretendard', sans-serif;
|
|
445
|
+
}
|
|
199
446
|
```
|
|
447
|
+
|
|
448
|
+
### 헤딩
|
|
449
|
+
|
|
450
|
+
```html
|
|
451
|
+
<h1>Heading 1</h1>
|
|
452
|
+
<h2>Heading 2</h2>
|
|
453
|
+
<h3>Heading 3</h3>
|
|
454
|
+
<h4>Heading 4</h4>
|
|
455
|
+
<h5>Heading 5</h5>
|
|
456
|
+
<h6>Heading 6</h6>
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## 주의사항
|
|
462
|
+
|
|
463
|
+
1. **⚠️ Import 경로 (매우 중요!)**
|
|
464
|
+
```tsx
|
|
465
|
+
// ✅ 올바른 방법 - React 컴포넌트는 'podo-ui/react'에서
|
|
466
|
+
import { Input, Textarea, Editor, Field } from 'podo-ui/react';
|
|
467
|
+
|
|
468
|
+
// ❌ 잘못된 방법 - 이렇게 하면 오류 발생!
|
|
469
|
+
import { Input } from 'podo-ui';
|
|
470
|
+
|
|
471
|
+
// Global SCSS
|
|
472
|
+
import 'podo-ui/global.scss';
|
|
473
|
+
|
|
474
|
+
// SCSS Module에서 믹스인
|
|
475
|
+
@use 'podo-ui/mixin' as *;
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
2. **CSS 클래스 vs React 컴포넌트**
|
|
479
|
+
- podo-ui는 주로 CSS 클래스 기반 시스템입니다
|
|
480
|
+
- Button, Alert 등은 **컴포넌트가 없습니다** - HTML 요소에 클래스를 적용하여 사용
|
|
481
|
+
- React 컴포넌트는 **Input, Textarea, Editor, Field만** 제공됩니다
|
|
482
|
+
|
|
483
|
+
```tsx
|
|
484
|
+
// ❌ 잘못된 사용 (Button 컴포넌트 없음)
|
|
485
|
+
import { Button } from 'podo-ui/react';
|
|
486
|
+
<Button color="primary">버튼</Button>
|
|
487
|
+
|
|
488
|
+
// ✅ 올바른 사용 (HTML + CSS 클래스)
|
|
489
|
+
<button className="primary">버튼</button>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
3. **색상 시스템**
|
|
493
|
+
- 색상은 CSS 변수로 제공되며 커스터마이징 가능
|
|
494
|
+
- 필요시 `src/styles/variables.scss`에서 추가 커스터마이징 가능
|
|
495
|
+
|
|
496
|
+
4. **반응형**
|
|
497
|
+
- 그리드 시스템은 자동으로 반응형 지원
|
|
498
|
+
- PC(12), Tablet(6), Mobile(4) 그리드로 자동 변경
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
## 참고 링크
|
|
503
|
+
|
|
504
|
+
- GitHub: https://github.com/hada0127/podo-ui
|
|
505
|
+
- Issues: https://github.com/hada0127/podo-ui/issues
|
package/scss/typo/mixin.scss
CHANGED
|
@@ -2,6 +2,45 @@
|
|
|
2
2
|
@use './font-family' as *;
|
|
3
3
|
@use './font-size' as *;
|
|
4
4
|
|
|
5
|
+
/*
|
|
6
|
+
Heading
|
|
7
|
+
*/
|
|
8
|
+
@mixin h1 {
|
|
9
|
+
font-size: $font-size-54;
|
|
10
|
+
line-height: 1.2;
|
|
11
|
+
font-weight: $font-weight-semibold;
|
|
12
|
+
&:not(button) {
|
|
13
|
+
color: var(--color-text-header);
|
|
14
|
+
}
|
|
15
|
+
@include mo {
|
|
16
|
+
font-size: $font-size-24;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin h2 {
|
|
21
|
+
font-size: $font-size-42;
|
|
22
|
+
line-height: 1.2;
|
|
23
|
+
font-weight: $font-weight-semibold;
|
|
24
|
+
&:not(button) {
|
|
25
|
+
color: var(--color-text-header);
|
|
26
|
+
}
|
|
27
|
+
@include mo {
|
|
28
|
+
font-size: $font-size-18;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin h3 {
|
|
33
|
+
font-size: $font-size-32;
|
|
34
|
+
line-height: 1.2;
|
|
35
|
+
font-weight: $font-weight-semibold;
|
|
36
|
+
&:not(button) {
|
|
37
|
+
color: var(--color-text-header);
|
|
38
|
+
}
|
|
39
|
+
@include mo {
|
|
40
|
+
font-size: $font-size-16;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
5
44
|
/*
|
|
6
45
|
Display
|
|
7
46
|
*/
|
package/scss/typo/typo.scss
CHANGED
|
@@ -18,30 +18,13 @@ body {
|
|
|
18
18
|
@include p3;
|
|
19
19
|
& {
|
|
20
20
|
h1 {
|
|
21
|
-
|
|
22
|
-
font-size: $font-size-54;
|
|
23
|
-
line-height: 1.2;
|
|
21
|
+
@include h1;
|
|
24
22
|
}
|
|
25
23
|
h2 {
|
|
26
|
-
|
|
27
|
-
font-size: $font-size-42;
|
|
28
|
-
line-height: 1.2;
|
|
24
|
+
@include h2;
|
|
29
25
|
}
|
|
30
26
|
h3 {
|
|
31
|
-
|
|
32
|
-
font-size: $font-size-32;
|
|
33
|
-
line-height: 1.2;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
@include mo {
|
|
37
|
-
h1 {
|
|
38
|
-
font-size: $font-size-24;
|
|
39
|
-
}
|
|
40
|
-
h2 {
|
|
41
|
-
font-size: $font-size-18;
|
|
42
|
-
}
|
|
43
|
-
h3 {
|
|
44
|
-
font-size: $font-size-16;
|
|
27
|
+
@include h3;
|
|
45
28
|
}
|
|
46
29
|
}
|
|
47
30
|
}
|