designbase-wp-library 0.6.0 → 0.7.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 +365 -317
- package/dist/css/dewp.min.css +1 -1
- package/dist/js/dewp.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,196 +1,163 @@
|
|
|
1
1
|
# DesignBase WordPress Library (DEWP)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/designbase-wp-library)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
워드프레스 플러그인 개발을 위한 재사용 가능한 프론트엔드 UI 라이브러리입니다.
|
|
7
|
+
|
|
8
|
+
> **DEWP** = **D**esignBase W**o**rdPress Library
|
|
6
9
|
|
|
7
10
|
## ✨ 특징
|
|
8
11
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- **접근성
|
|
13
|
-
- **TypeScript
|
|
14
|
-
- **
|
|
12
|
+
- 🎨 **THEME_GUIDE.md v0.1.16 기준** - 최신 디자인 토큰 시스템
|
|
13
|
+
- 🌙 **자동 다크모드** - theme.css와 완벽 통합
|
|
14
|
+
- 📱 **완전 반응형** - 모바일 우선 설계
|
|
15
|
+
- ♿ **접근성 준수** - WCAG 가이드라인 적용
|
|
16
|
+
- 🔧 **TypeScript 지원** - 완전한 타입 정의
|
|
17
|
+
- 🚀 **CDN 지원** - unpkg, jsDelivr
|
|
18
|
+
|
|
19
|
+
---
|
|
15
20
|
|
|
16
21
|
## 📦 설치
|
|
17
22
|
|
|
18
|
-
###
|
|
23
|
+
### NPM
|
|
19
24
|
```bash
|
|
20
25
|
npm install designbase-wp-library
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
###
|
|
24
|
-
|
|
25
|
-
#### npm 설치 방식
|
|
26
|
-
```bash
|
|
27
|
-
# 아이콘 시스템 사용시
|
|
28
|
-
npm install @designbasekorea/icons-webfont
|
|
29
|
-
|
|
30
|
-
# 테마 시스템 사용시
|
|
31
|
-
npm install @designbasekorea/theme
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
#### CDN 방식 (권장)
|
|
28
|
+
### CDN (권장)
|
|
35
29
|
```html
|
|
36
|
-
<!--
|
|
37
|
-
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/icons-webfont@latest/dist/webfont/icons.css">
|
|
38
|
-
|
|
39
|
-
<!-- 테마 시스템 -->
|
|
30
|
+
<!-- 1. Theme System (필수) -->
|
|
40
31
|
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/theme@latest/dist/css/theme.css">
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
> **💡 팁**: CDN 방식을 사용하면 자동으로 최신 버전이 적용되며, 별도 설치나 업데이트가 필요 없습니다!
|
|
44
|
-
|
|
45
|
-
### 문서/데모 사이트
|
|
46
|
-
|
|
47
|
-
- 최신 문서와 라이브 데모: [DEWP Docs & Examples](https://designbasekorea.github.io/designbase-wp-library/)
|
|
48
|
-
|
|
49
|
-
### 로컬 테스트
|
|
50
|
-
|
|
51
|
-
로컬에서 라이브러리를 테스트하려면:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# 1. 라이브러리 빌드
|
|
55
|
-
npm run build
|
|
56
|
-
|
|
57
|
-
# 2. 로컬 서버 실행
|
|
58
|
-
python3 -m http.server 8000
|
|
59
|
-
|
|
60
|
-
# 3. 브라우저에서 테스트
|
|
61
|
-
# http://localhost:8000/test/local-test.html
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
> **💡 팁**: `test/` 폴더는 `.gitignore`에 포함되어 있어 Git에 커밋되지 않습니다.
|
|
65
|
-
|
|
66
|
-
> **🔒 보안**: `src/` 폴더(소스 코드)도 `.gitignore`에 포함되어 있어 핵심 코드가 공개되지 않습니다.
|
|
67
32
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#### 기본 DEWP 라이브러리
|
|
71
|
-
```html
|
|
72
|
-
<!-- CSS -->
|
|
73
|
-
<link rel="stylesheet" href="https://unpkg.com/designbase-wp-library@latest/dist/css/dewp.min.css">
|
|
74
|
-
|
|
75
|
-
<!-- JavaScript -->
|
|
76
|
-
<script src="https://unpkg.com/designbase-wp-library@latest/dist/js/dewp.min.js"></script>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
#### 아이콘 시스템 (선택사항)
|
|
80
|
-
```html
|
|
81
|
-
<!-- 아이콘 CSS -->
|
|
33
|
+
<!-- 2. Icon System (필수) -->
|
|
82
34
|
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/icons-webfont@latest/dist/webfont/icons.css">
|
|
83
|
-
```
|
|
84
35
|
|
|
85
|
-
|
|
86
|
-
```html
|
|
87
|
-
<!-- 테마 CSS -->
|
|
88
|
-
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/theme@latest/dist/css/theme.css">
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### 전체 패키지 (권장)
|
|
92
|
-
```html
|
|
93
|
-
<!-- 테마 시스템 -->
|
|
94
|
-
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/theme@latest/dist/css/theme.css">
|
|
95
|
-
|
|
96
|
-
<!-- 아이콘 시스템 -->
|
|
97
|
-
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/icons-webfont@latest/dist/webfont/icons.css">
|
|
98
|
-
|
|
99
|
-
<!-- DEWP 라이브러리 -->
|
|
36
|
+
<!-- 3. DEWP Library -->
|
|
100
37
|
<link rel="stylesheet" href="https://unpkg.com/designbase-wp-library@latest/dist/css/dewp.min.css">
|
|
101
38
|
<script src="https://unpkg.com/designbase-wp-library@latest/dist/js/dewp.min.js"></script>
|
|
102
39
|
```
|
|
103
40
|
|
|
104
|
-
|
|
41
|
+
---
|
|
105
42
|
|
|
106
|
-
|
|
107
|
-
- npm: `npm i designbase-wp-library@latest`
|
|
108
|
-
- unpkg: `https://unpkg.com/designbase-wp-library@latest/dist/{css|js}/dewp.min.{css|js}`
|
|
109
|
-
- jsDelivr: `https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/dist/{css|js}/dewp.min.{css|js}`
|
|
43
|
+
## 🚀 빠른 시작
|
|
110
44
|
|
|
111
|
-
|
|
45
|
+
### 기본 사용법
|
|
112
46
|
|
|
113
|
-
### JavaScript 사용
|
|
114
|
-
|
|
115
|
-
#### 브라우저에서 직접 사용
|
|
116
47
|
```html
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
48
|
+
<!DOCTYPE html>
|
|
49
|
+
<html lang="ko">
|
|
50
|
+
<head>
|
|
51
|
+
<meta charset="UTF-8">
|
|
52
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
53
|
+
<title>DEWP 라이브러리</title>
|
|
121
54
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
55
|
+
<!-- CDN -->
|
|
56
|
+
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/theme@latest/dist/css/theme.css">
|
|
57
|
+
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/icons-webfont@latest/dist/webfont/icons.css">
|
|
58
|
+
<link rel="stylesheet" href="https://unpkg.com/designbase-wp-library@latest/dist/css/dewp.min.css">
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<!-- 버튼 -->
|
|
62
|
+
<button class="dewp-button dewp-button--primary">Primary Button</button>
|
|
63
|
+
|
|
64
|
+
<!-- 카드 -->
|
|
65
|
+
<div class="dewp-card">
|
|
66
|
+
<div class="dewp-card-header">카드 제목</div>
|
|
67
|
+
<div class="dewp-card-body">카드 내용</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<script src="https://unpkg.com/designbase-wp-library@latest/dist/js/dewp.min.js"></script>
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
|
125
73
|
```
|
|
126
74
|
|
|
127
|
-
|
|
128
|
-
```javascript
|
|
129
|
-
import { showToast, showModal, showConfirmModal } from 'designbase-wp-library';
|
|
75
|
+
---
|
|
130
76
|
|
|
131
|
-
|
|
132
|
-
showToast('성공!', 'success');
|
|
77
|
+
## 🧩 주요 컴포넌트
|
|
133
78
|
|
|
134
|
-
|
|
135
|
-
|
|
79
|
+
### 1. 버튼 (Button)
|
|
80
|
+
```html
|
|
81
|
+
<!-- 기본 버튼 -->
|
|
82
|
+
<button class="dewp-button dewp-button--primary">Primary</button>
|
|
83
|
+
<button class="dewp-button dewp-button--secondary">Secondary</button>
|
|
84
|
+
<button class="dewp-button dewp-button--tertiary">Tertiary</button>
|
|
136
85
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
86
|
+
<!-- 상태별 버튼 -->
|
|
87
|
+
<button class="dewp-button dewp-button--success">Success</button>
|
|
88
|
+
<button class="dewp-button dewp-button--warning">Warning</button>
|
|
89
|
+
<button class="dewp-button dewp-button--danger">Danger</button>
|
|
140
90
|
|
|
141
|
-
|
|
91
|
+
<!-- 크기 변형 -->
|
|
92
|
+
<button class="dewp-button dewp-button--primary dewp-button--sm">Small</button>
|
|
93
|
+
<button class="dewp-button dewp-button--primary dewp-button--lg">Large</button>
|
|
142
94
|
|
|
143
|
-
|
|
144
|
-
<
|
|
95
|
+
<!-- Outline 스타일 -->
|
|
96
|
+
<button class="dewp-button dewp-button--outline-primary">Outline</button>
|
|
145
97
|
```
|
|
146
98
|
|
|
147
|
-
|
|
99
|
+
### 2. 카드 (Card)
|
|
100
|
+
```html
|
|
101
|
+
<!-- 기본 카드 -->
|
|
102
|
+
<div class="dewp-card">
|
|
103
|
+
<div class="dewp-card-header">카드 제목</div>
|
|
104
|
+
<div class="dewp-card-body">카드 내용입니다.</div>
|
|
105
|
+
<div class="dewp-card-footer">푸터 영역</div>
|
|
106
|
+
</div>
|
|
148
107
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// 타입별 토스트 (크기 옵션 포함)
|
|
155
|
-
window.DEWP.showSuccessToast('성공 메시지', 3000, 'lg');
|
|
156
|
-
window.DEWP.showWarningToast('경고 메시지', 5000, 'sm');
|
|
157
|
-
window.DEWP.showErrorToast('오류 메시지', 4000, 'md');
|
|
158
|
-
window.DEWP.showInfoToast('정보 메시지', 3000, 'sm');
|
|
108
|
+
<!-- 카드 변형 -->
|
|
109
|
+
<div class="dewp-card dewp-card--outlined">Outlined</div>
|
|
110
|
+
<div class="dewp-card dewp-card--elevated">Elevated</div>
|
|
111
|
+
<div class="dewp-card dewp-card--hover">Hover Effect</div>
|
|
159
112
|
```
|
|
160
113
|
|
|
161
|
-
###
|
|
114
|
+
### 3. 모달 (Modal)
|
|
162
115
|
```javascript
|
|
163
116
|
// 기본 모달
|
|
164
|
-
window.DEWP.showModal({
|
|
117
|
+
window.DEWP.showModal({
|
|
118
|
+
title: '모달 제목',
|
|
119
|
+
content: '모달 내용입니다.',
|
|
120
|
+
size: 'md' // sm, md, lg, xl
|
|
121
|
+
});
|
|
165
122
|
|
|
166
123
|
// 확인 모달
|
|
167
|
-
window.DEWP.showConfirmModal({
|
|
124
|
+
window.DEWP.showConfirmModal({
|
|
125
|
+
title: '확인',
|
|
126
|
+
message: '정말 삭제하시겠습니까?',
|
|
127
|
+
confirmText: '삭제',
|
|
128
|
+
cancelText: '취소',
|
|
129
|
+
onConfirm: () => console.log('삭제됨')
|
|
130
|
+
});
|
|
131
|
+
```
|
|
168
132
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
window.DEWP.
|
|
133
|
+
### 4. 토스트 (Toast)
|
|
134
|
+
```javascript
|
|
135
|
+
// 타입별 토스트
|
|
136
|
+
window.DEWP.showSuccessToast('성공 메시지', 3000);
|
|
137
|
+
window.DEWP.showErrorToast('오류 메시지', 3000);
|
|
138
|
+
window.DEWP.showWarningToast('경고 메시지', 3000);
|
|
139
|
+
window.DEWP.showInfoToast('정보 메시지', 3000);
|
|
140
|
+
|
|
141
|
+
// 커스텀 토스트
|
|
142
|
+
window.DEWP.showToast('메시지', 'success', 3000, 'lg');
|
|
173
143
|
```
|
|
174
144
|
|
|
175
|
-
###
|
|
145
|
+
### 5. 드롭다운 (Dropdown)
|
|
176
146
|
```html
|
|
177
147
|
<div class="dewp-dropdown">
|
|
178
|
-
<button class="dewp-dropdown-toggle">
|
|
179
|
-
선택하세요
|
|
180
|
-
</button>
|
|
148
|
+
<button class="dewp-dropdown-toggle">선택하세요</button>
|
|
181
149
|
<div class="dewp-dropdown-menu">
|
|
182
|
-
<div class="dewp-dropdown-item" data-value="
|
|
183
|
-
<div class="dewp-dropdown-item" data-value="
|
|
150
|
+
<div class="dewp-dropdown-item" data-value="1">옵션 1</div>
|
|
151
|
+
<div class="dewp-dropdown-item" data-value="2">옵션 2</div>
|
|
184
152
|
</div>
|
|
185
153
|
</div>
|
|
186
154
|
|
|
187
155
|
<script>
|
|
188
|
-
|
|
189
|
-
window.DEWP.autoInitializeDropdowns();
|
|
156
|
+
window.DEWP.autoInitializeDropdowns();
|
|
190
157
|
</script>
|
|
191
158
|
```
|
|
192
159
|
|
|
193
|
-
###
|
|
160
|
+
### 6. 탭 (Tabs)
|
|
194
161
|
```html
|
|
195
162
|
<div class="dewp-tabs">
|
|
196
163
|
<button class="dewp-tab-btn active" data-tab="tab1">탭 1</button>
|
|
@@ -203,250 +170,317 @@ window.DEWP.autoInitializeDropdowns();
|
|
|
203
170
|
</div>
|
|
204
171
|
|
|
205
172
|
<script>
|
|
206
|
-
|
|
207
|
-
window.DEWP.initTabs();
|
|
208
|
-
|
|
209
|
-
// 특정 탭 활성화
|
|
210
|
-
window.DEWP.activateTab('tab2');
|
|
211
|
-
|
|
212
|
-
// 활성 탭 정보 가져오기
|
|
213
|
-
const activeTab = window.DEWP.getActiveTab('.dewp-tabs');
|
|
173
|
+
window.DEWP.initTabs();
|
|
214
174
|
</script>
|
|
215
175
|
```
|
|
216
176
|
|
|
217
|
-
###
|
|
218
|
-
```html
|
|
219
|
-
<div class="dewp-header">
|
|
220
|
-
<div class="dewp-header-content">
|
|
221
|
-
<h1 class="dewp-header-title">플러그인 설정</h1>
|
|
222
|
-
<p class="dewp-header-description">플러그인의 기본 설정을 관리할 수 있습니다.</p>
|
|
223
|
-
</div>
|
|
224
|
-
<div class="dewp-header-actions">
|
|
225
|
-
<button class="dewp-header-btn dewp-btn-primary">설정 저장</button>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### 6. 섹션 컴포넌트
|
|
177
|
+
### 7. 아코디언 (Accordion)
|
|
231
178
|
```html
|
|
232
|
-
<div class="dewp-
|
|
233
|
-
<div class="dewp-
|
|
234
|
-
<div class="dewp-
|
|
235
|
-
<
|
|
236
|
-
<
|
|
237
|
-
</div>
|
|
238
|
-
<div class="dewp-section-actions">
|
|
239
|
-
<button class="dewp-section-btn dewp-btn-primary">저장</button>
|
|
179
|
+
<div class="dewp-accordion">
|
|
180
|
+
<div class="dewp-accordion-item">
|
|
181
|
+
<div class="dewp-accordion-header">
|
|
182
|
+
<span class="dewp-accordion-title">아코디언 제목 1</span>
|
|
183
|
+
<span class="dewp-accordion-icon">▼</span>
|
|
240
184
|
</div>
|
|
241
|
-
|
|
242
|
-
<div class="dewp-section-content">
|
|
243
|
-
<!-- 폼 요소들 -->
|
|
185
|
+
<div class="dewp-accordion-content">아코디언 내용 1</div>
|
|
244
186
|
</div>
|
|
245
187
|
</div>
|
|
188
|
+
|
|
189
|
+
<script>
|
|
190
|
+
window.DEWP.initAccordions();
|
|
191
|
+
</script>
|
|
246
192
|
```
|
|
247
193
|
|
|
248
|
-
###
|
|
194
|
+
### 8. Drawer
|
|
249
195
|
```html
|
|
250
|
-
<!-- 기본 Drawer 구조 -->
|
|
251
196
|
<div class="dewp-drawer" id="my-drawer">
|
|
252
197
|
<div class="dewp-drawer-header">
|
|
253
|
-
<h3 class="dewp-drawer-title"
|
|
254
|
-
<button class="dewp-drawer-close">
|
|
255
|
-
<svg viewBox="0 0 24 24">
|
|
256
|
-
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
|
|
257
|
-
</svg>
|
|
258
|
-
</button>
|
|
198
|
+
<h3 class="dewp-drawer-title">Drawer 제목</h3>
|
|
199
|
+
<button class="dewp-drawer-close">×</button>
|
|
259
200
|
</div>
|
|
260
201
|
<div class="dewp-drawer-content">
|
|
261
|
-
|
|
202
|
+
Drawer 내용
|
|
262
203
|
</div>
|
|
263
204
|
</div>
|
|
264
205
|
|
|
265
206
|
<script>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
window.DEWP.openDrawer(drawerId);
|
|
274
|
-
window.DEWP.closeDrawer(drawerId);
|
|
275
|
-
window.DEWP.toggleDrawer(drawerId);
|
|
207
|
+
const drawer = window.DEWP.createDrawer({
|
|
208
|
+
target: '#my-drawer',
|
|
209
|
+
overlay: true,
|
|
210
|
+
closeOnEscape: true
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
window.DEWP.openDrawer(drawer);
|
|
276
214
|
</script>
|
|
277
215
|
```
|
|
278
216
|
|
|
279
|
-
###
|
|
280
|
-
```javascript
|
|
281
|
-
// DOM 요소 선택
|
|
282
|
-
const element = window.DEWP.qs('.my-class');
|
|
283
|
-
const elements = window.DEWP.qsa('.my-class');
|
|
284
|
-
|
|
285
|
-
// 클래스 조작
|
|
286
|
-
window.DEWP.addClass(element, 'active');
|
|
287
|
-
window.DEWP.removeClass(element, 'inactive');
|
|
288
|
-
window.DEWP.toggleClass(element, 'visible');
|
|
289
|
-
|
|
290
|
-
// 텍스트 및 HTML 설정
|
|
291
|
-
window.DEWP.setText(element, '새로운 텍스트');
|
|
292
|
-
window.DEWP.setHTML(element, '<strong>HTML</strong>');
|
|
293
|
-
|
|
294
|
-
// 이벤트 처리
|
|
295
|
-
window.DEWP.on(element, 'click', (e) => console.log('클릭됨'));
|
|
296
|
-
window.DEWP.off(element, 'click');
|
|
297
|
-
|
|
298
|
-
// DOM 상태 확인
|
|
299
|
-
if (window.DEWP.isDOMReady()) {
|
|
300
|
-
// DOM이 준비됨
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
window.DEWP.onDOMReady(() => {
|
|
304
|
-
// DOM 로드 완료 후 실행
|
|
305
|
-
});
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
## 🎨 SCSS 컴포넌트
|
|
309
|
-
|
|
310
|
-
### 기본 컴포넌트
|
|
311
|
-
|
|
312
|
-
#### 버튼
|
|
313
|
-
```html
|
|
314
|
-
<button class="dewp-btn dewp-btn-primary">Primary Button</button>
|
|
315
|
-
<button class="dewp-btn dewp-btn-outline-secondary">Outline Button</button>
|
|
316
|
-
<button class="dewp-btn dewp-btn-success dewp-btn-lg">Large Success Button</button>
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
#### 배지
|
|
320
|
-
```html
|
|
321
|
-
<span class="dewp-badge dewp-badge-primary">Primary</span>
|
|
322
|
-
<span class="dewp-badge dewp-badge-success dewp-badge-pill">Success</span>
|
|
323
|
-
<span class="dewp-badge dewp-badge-danger dewp-badge-ring">Danger</span>
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
#### 폼
|
|
217
|
+
### 9. 폼 요소 (Forms)
|
|
327
218
|
```html
|
|
219
|
+
<!-- 입력 필드 -->
|
|
328
220
|
<div class="dewp-form-group">
|
|
329
221
|
<label class="dewp-form-label">이름</label>
|
|
330
|
-
<input type="text" class="dewp-form-input" placeholder="
|
|
222
|
+
<input type="text" class="dewp-form-input" placeholder="이름 입력">
|
|
331
223
|
</div>
|
|
224
|
+
|
|
225
|
+
<!-- 체크박스 -->
|
|
226
|
+
<div class="dewp-form-check dewp-form-checkbox">
|
|
227
|
+
<input type="checkbox" class="dewp-form-check-input" id="check1">
|
|
228
|
+
<label class="dewp-form-check-label" for="check1">동의합니다</label>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<!-- 라디오 버튼 -->
|
|
232
|
+
<div class="dewp-form-check dewp-form-radio">
|
|
233
|
+
<input type="radio" class="dewp-form-check-input" name="radio" id="radio1">
|
|
234
|
+
<label class="dewp-form-check-label" for="radio1">옵션 1</label>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<!-- 토글 스위치 -->
|
|
238
|
+
<label class="dewp-toggle-label">
|
|
239
|
+
<input type="checkbox" class="dewp-toggle-input">
|
|
240
|
+
<span class="dewp-toggle-slider"></span>
|
|
241
|
+
<span class="dewp-toggle-text">알림 받기</span>
|
|
242
|
+
</label>
|
|
332
243
|
```
|
|
333
244
|
|
|
334
|
-
|
|
245
|
+
### 10. 테이블 (Table)
|
|
335
246
|
```html
|
|
336
247
|
<table class="dewp-table">
|
|
337
248
|
<thead>
|
|
338
249
|
<tr>
|
|
339
250
|
<th>제목</th>
|
|
340
|
-
<th
|
|
251
|
+
<th>작성자</th>
|
|
252
|
+
<th>날짜</th>
|
|
341
253
|
</tr>
|
|
342
254
|
</thead>
|
|
343
255
|
<tbody>
|
|
344
256
|
<tr>
|
|
345
|
-
<td
|
|
346
|
-
<td
|
|
257
|
+
<td>게시글 1</td>
|
|
258
|
+
<td>홍길동</td>
|
|
259
|
+
<td>2025-01-01</td>
|
|
347
260
|
</tr>
|
|
348
261
|
</tbody>
|
|
349
262
|
</table>
|
|
350
263
|
```
|
|
351
264
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
</div>
|
|
364
|
-
</div>
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 🎨 디자인 시스템
|
|
268
|
+
|
|
269
|
+
### CSS 변수 (THEME_GUIDE.md v0.1.16 기준)
|
|
270
|
+
|
|
271
|
+
#### Surface (배경)
|
|
272
|
+
```css
|
|
273
|
+
--db-surface-base /* 기본 배경 */
|
|
274
|
+
--db-surface-layer-1 /* 1단계 높이 */
|
|
275
|
+
--db-surface-layer-2 /* 2단계 높이 */
|
|
365
276
|
```
|
|
366
277
|
|
|
367
|
-
####
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
278
|
+
#### Text (텍스트)
|
|
279
|
+
```css
|
|
280
|
+
--db-text-primary /* 주요 텍스트 */
|
|
281
|
+
--db-text-secondary /* 보조 텍스트 */
|
|
282
|
+
--db-text-tertiary /* 부가 텍스트 */
|
|
283
|
+
--db-text-link /* 링크 텍스트 */
|
|
284
|
+
--db-text-inverse-primary /* 반전 텍스트 */
|
|
285
|
+
```
|
|
375
286
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
287
|
+
#### Border (테두리)
|
|
288
|
+
```css
|
|
289
|
+
--db-border-base /* 기본 테두리 */
|
|
290
|
+
--db-border-layer-1 /* 1단계 테두리 */
|
|
291
|
+
--db-border-layer-2 /* 2단계 테두리 */
|
|
292
|
+
```
|
|
382
293
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
294
|
+
#### Feedback (상태)
|
|
295
|
+
```css
|
|
296
|
+
--db-feedback-success-fg/bg /* 성공 */
|
|
297
|
+
--db-feedback-warning-fg/bg /* 경고 */
|
|
298
|
+
--db-feedback-error-fg/bg /* 에러 */
|
|
299
|
+
--db-feedback-info-fg/bg /* 정보 */
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
#### Brand (브랜드)
|
|
303
|
+
```css
|
|
304
|
+
--db-brand-primary /* 주요 브랜드 색상 */
|
|
305
|
+
--db-brand-secondary /* 보조 브랜드 색상 */
|
|
388
306
|
```
|
|
389
307
|
|
|
390
|
-
|
|
308
|
+
### 다크 모드
|
|
309
|
+
|
|
310
|
+
다크 모드는 **자동으로 적용**됩니다:
|
|
311
|
+
|
|
391
312
|
```html
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
313
|
+
<!-- 다크 모드 활성화 -->
|
|
314
|
+
<body data-theme="dark">
|
|
315
|
+
<!-- 모든 컴포넌트가 자동으로 다크 모드로 전환됩니다 -->
|
|
316
|
+
</body>
|
|
395
317
|
|
|
396
|
-
<
|
|
397
|
-
|
|
398
|
-
|
|
318
|
+
<script>
|
|
319
|
+
// JavaScript로 다크 모드 토글
|
|
320
|
+
const toggleDarkMode = () => {
|
|
321
|
+
const currentTheme = document.body.getAttribute('data-theme');
|
|
322
|
+
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
|
323
|
+
document.body.setAttribute('data-theme', newTheme);
|
|
324
|
+
};
|
|
325
|
+
</script>
|
|
399
326
|
```
|
|
400
327
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
<!-- SCSS 커스터마이징 가이드는 문서 사이트로 이관했습니다. -->
|
|
328
|
+
---
|
|
404
329
|
|
|
405
330
|
## 📱 반응형 브레이크포인트
|
|
406
331
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
332
|
+
| 사이즈 | 최소 너비 |
|
|
333
|
+
|--------|-----------|
|
|
334
|
+
| xs | 0px |
|
|
335
|
+
| sm | 576px |
|
|
336
|
+
| md | 768px |
|
|
337
|
+
| lg | 992px |
|
|
338
|
+
| xl | 1200px |
|
|
339
|
+
| xxl | 1400px |
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 🔧 개발
|
|
344
|
+
|
|
345
|
+
### 빌드
|
|
346
|
+
```bash
|
|
347
|
+
# CSS + JS 빌드
|
|
348
|
+
npm run build
|
|
349
|
+
|
|
350
|
+
# CSS만 빌드
|
|
351
|
+
npm run build:css
|
|
352
|
+
|
|
353
|
+
# JS만 빌드
|
|
354
|
+
npm run build:js
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### 개발 모드 (Watch)
|
|
358
|
+
```bash
|
|
359
|
+
# CSS + JS 동시 감시
|
|
360
|
+
npm run dev
|
|
361
|
+
|
|
362
|
+
# CSS만 감시
|
|
363
|
+
npm run dev:css
|
|
364
|
+
|
|
365
|
+
# JS만 감시
|
|
366
|
+
npm run dev:js
|
|
367
|
+
```
|
|
413
368
|
|
|
414
|
-
|
|
369
|
+
### 로컬 테스트
|
|
370
|
+
```bash
|
|
371
|
+
# 1. 빌드
|
|
372
|
+
npm run build
|
|
373
|
+
|
|
374
|
+
# 2. 서버 실행 (프로젝트 루트에서)
|
|
375
|
+
python3 -m http.server 8001
|
|
376
|
+
|
|
377
|
+
# 3. 브라우저에서 접속
|
|
378
|
+
# http://localhost:8001/test/local-test.html
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 📂 빌드 출력
|
|
415
384
|
|
|
416
385
|
```
|
|
417
386
|
dist/
|
|
418
387
|
├── css/
|
|
419
|
-
│ └── dewp.min.css
|
|
388
|
+
│ └── dewp.min.css # 압축된 CSS (152.8 kB)
|
|
420
389
|
└── js/
|
|
421
|
-
└── dewp.min.js
|
|
390
|
+
└── dewp.min.js # 압축된 JavaScript (40.7 kB)
|
|
422
391
|
```
|
|
423
392
|
|
|
424
|
-
|
|
393
|
+
---
|
|
425
394
|
|
|
426
|
-
|
|
427
|
-
```bash
|
|
428
|
-
npm run build:prod
|
|
429
|
-
```
|
|
395
|
+
## 🌐 CDN 링크
|
|
430
396
|
|
|
431
|
-
###
|
|
432
|
-
```bash
|
|
433
|
-
npm run preview
|
|
397
|
+
### unpkg
|
|
434
398
|
```
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
```bash
|
|
438
|
-
npm run release
|
|
399
|
+
https://unpkg.com/designbase-wp-library@latest/dist/css/dewp.min.css
|
|
400
|
+
https://unpkg.com/designbase-wp-library@latest/dist/js/dewp.min.js
|
|
439
401
|
```
|
|
440
402
|
|
|
441
|
-
###
|
|
442
|
-
```
|
|
443
|
-
npm
|
|
444
|
-
npm
|
|
403
|
+
### jsDelivr
|
|
404
|
+
```
|
|
405
|
+
https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/dist/css/dewp.min.css
|
|
406
|
+
https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/dist/js/dewp.min.js
|
|
445
407
|
```
|
|
446
408
|
|
|
447
|
-
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## 📚 문서
|
|
448
412
|
|
|
449
|
-
|
|
413
|
+
자세한 사용법과 예제는 다음 링크에서 확인하세요:
|
|
414
|
+
|
|
415
|
+
- 📖 **공식 문서**: https://designbasekorea.github.io/designbase-wp-library/
|
|
416
|
+
- 🎨 **라이브 데모**: https://designbasekorea.github.io/designbase-wp-library/
|
|
417
|
+
- 📦 **NPM**: https://www.npmjs.com/package/designbase-wp-library
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## 🎯 전체 컴포넌트 목록
|
|
422
|
+
|
|
423
|
+
### Layout
|
|
424
|
+
- Header
|
|
425
|
+
- Section
|
|
426
|
+
- Sidebar
|
|
427
|
+
- Card
|
|
428
|
+
- List
|
|
429
|
+
|
|
430
|
+
### Navigation
|
|
431
|
+
- Tabs
|
|
432
|
+
- Breadcrumb
|
|
433
|
+
- Pagination
|
|
434
|
+
- Dropdown
|
|
435
|
+
|
|
436
|
+
### Forms
|
|
437
|
+
- Input
|
|
438
|
+
- Textarea
|
|
439
|
+
- Select
|
|
440
|
+
- Checkbox
|
|
441
|
+
- Radio
|
|
442
|
+
- Toggle
|
|
443
|
+
- Stepper
|
|
444
|
+
- Range Slider
|
|
445
|
+
|
|
446
|
+
### Feedback
|
|
447
|
+
- Toast
|
|
448
|
+
- Modal
|
|
449
|
+
- Notice
|
|
450
|
+
- Badge
|
|
451
|
+
- Spinner
|
|
452
|
+
- Progress
|
|
453
|
+
- Progress Step
|
|
454
|
+
- Empty State
|
|
455
|
+
|
|
456
|
+
### Interactive
|
|
457
|
+
- Accordion
|
|
458
|
+
- Drawer
|
|
459
|
+
- Popover
|
|
460
|
+
- Tooltip
|
|
461
|
+
|
|
462
|
+
### Display
|
|
463
|
+
- Table
|
|
464
|
+
- Stat
|
|
465
|
+
- Chip
|
|
466
|
+
- Divider
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
## 🔄 버전 히스토리
|
|
471
|
+
|
|
472
|
+
### v0.6.0 (최신)
|
|
473
|
+
- 🎨 THEME_GUIDE.md v0.1.16 기준 전체 변수 시스템 통일
|
|
474
|
+
- ✨ 새로운 변수 시스템 적용 (Surface, Border, Feedback, Interactive, Brand)
|
|
475
|
+
- 🗑️ 하드코딩된 색상 및 수동 다크모드 제거
|
|
476
|
+
- ♿ 접근성 개선
|
|
477
|
+
|
|
478
|
+
### v0.5.6
|
|
479
|
+
- 이전 안정 버전
|
|
480
|
+
|
|
481
|
+
전체 변경 이력은 [CHANGELOG.md](./CHANGELOG.md)를 참조하세요.
|
|
482
|
+
|
|
483
|
+
---
|
|
450
484
|
|
|
451
485
|
## 🤝 기여
|
|
452
486
|
|
|
@@ -456,14 +490,28 @@ npm publish
|
|
|
456
490
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
457
491
|
5. Open a Pull Request
|
|
458
492
|
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## 📄 라이선스
|
|
496
|
+
|
|
497
|
+
이 프로젝트는 MIT License를 따릅니다.
|
|
498
|
+
|
|
499
|
+
재배포 시 원저작권 고지와 라이선스 전문을 반드시 포함해 주세요.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
459
503
|
## 📞 지원
|
|
460
504
|
|
|
461
|
-
|
|
505
|
+
- **이메일**: designbasekorea@gmail.com
|
|
506
|
+
- **Issues**: [GitHub Issues](https://github.com/designbasekorea/designbase-wp-library/issues)
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## 🔗 관련 프로젝트
|
|
462
511
|
|
|
463
|
-
-
|
|
512
|
+
- [@designbasekorea/theme](https://www.npmjs.com/package/@designbasekorea/theme) - 디자인 토큰 시스템
|
|
513
|
+
- [@designbasekorea/icons-webfont](https://www.npmjs.com/package/@designbasekorea/icons-webfont) - 아이콘 시스템
|
|
464
514
|
|
|
465
|
-
|
|
515
|
+
---
|
|
466
516
|
|
|
467
|
-
|
|
468
|
-
- [CDN (unpkg)](https://unpkg.com/designbase-wp-library@latest/)
|
|
469
|
-
- [CDN (jsDelivr)](https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/)
|
|
517
|
+
**Made with ❤️ by DesignBase Korea**
|