designbase-wp-library 0.5.6 → 0.6.1
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 +368 -252
- package/dist/css/dewp.min.css +1 -1
- package/dist/js/dewp.min.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,128 +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
|
|
|
23
|
+
### NPM
|
|
18
24
|
```bash
|
|
19
25
|
npm install designbase-wp-library
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
###
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
### CDN (권장)
|
|
29
|
+
```html
|
|
30
|
+
<!-- 1. Theme System (필수) -->
|
|
31
|
+
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/theme@latest/dist/css/theme.css">
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
<!-- 2. Icon System (필수) -->
|
|
34
|
+
<link rel="stylesheet" href="https://unpkg.com/@designbasekorea/icons-webfont@latest/dist/webfont/icons.css">
|
|
27
35
|
|
|
28
|
-
|
|
29
|
-
<!-- CSS -->
|
|
36
|
+
<!-- 3. DEWP Library -->
|
|
30
37
|
<link rel="stylesheet" href="https://unpkg.com/designbase-wp-library@latest/dist/css/dewp.min.css">
|
|
31
|
-
|
|
32
|
-
<!-- JavaScript -->
|
|
33
38
|
<script src="https://unpkg.com/designbase-wp-library@latest/dist/js/dewp.min.js"></script>
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- 문서/예제: https://designbasekorea.github.io/designbase-wp-library/
|
|
39
|
-
- npm: `npm i designbase-wp-library@latest`
|
|
40
|
-
- unpkg: `https://unpkg.com/designbase-wp-library@latest/dist/{css|js}/dewp.min.{css|js}`
|
|
41
|
-
- jsDelivr: `https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/dist/{css|js}/dewp.min.{css|js}`
|
|
41
|
+
---
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## 🚀 빠른 시작
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### 기본 사용법
|
|
46
46
|
|
|
47
|
-
#### 브라우저에서 직접 사용
|
|
48
47
|
```html
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
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>
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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>
|
|
57
73
|
```
|
|
58
74
|
|
|
59
|
-
|
|
60
|
-
```javascript
|
|
61
|
-
import { showToast, showModal, showConfirmModal } from 'designbase-wp-library';
|
|
75
|
+
---
|
|
62
76
|
|
|
63
|
-
|
|
64
|
-
showToast('성공!', 'success');
|
|
77
|
+
## 🧩 주요 컴포넌트
|
|
65
78
|
|
|
66
|
-
|
|
67
|
-
|
|
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>
|
|
68
85
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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>
|
|
72
90
|
|
|
73
|
-
|
|
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>
|
|
74
94
|
|
|
75
|
-
|
|
76
|
-
<
|
|
95
|
+
<!-- Outline 스타일 -->
|
|
96
|
+
<button class="dewp-button dewp-button--outline-primary">Outline</button>
|
|
77
97
|
```
|
|
78
98
|
|
|
79
|
-
|
|
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>
|
|
80
107
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// 타입별 토스트 (크기 옵션 포함)
|
|
87
|
-
window.DEWP.showSuccessToast('성공 메시지', 3000, 'lg');
|
|
88
|
-
window.DEWP.showWarningToast('경고 메시지', 5000, 'sm');
|
|
89
|
-
window.DEWP.showErrorToast('오류 메시지', 4000, 'md');
|
|
90
|
-
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>
|
|
91
112
|
```
|
|
92
113
|
|
|
93
|
-
###
|
|
114
|
+
### 3. 모달 (Modal)
|
|
94
115
|
```javascript
|
|
95
116
|
// 기본 모달
|
|
96
|
-
window.DEWP.showModal({
|
|
117
|
+
window.DEWP.showModal({
|
|
118
|
+
title: '모달 제목',
|
|
119
|
+
content: '모달 내용입니다.',
|
|
120
|
+
size: 'md' // sm, md, lg, xl
|
|
121
|
+
});
|
|
97
122
|
|
|
98
123
|
// 확인 모달
|
|
99
|
-
window.DEWP.showConfirmModal({
|
|
124
|
+
window.DEWP.showConfirmModal({
|
|
125
|
+
title: '확인',
|
|
126
|
+
message: '정말 삭제하시겠습니까?',
|
|
127
|
+
confirmText: '삭제',
|
|
128
|
+
cancelText: '취소',
|
|
129
|
+
onConfirm: () => console.log('삭제됨')
|
|
130
|
+
});
|
|
131
|
+
```
|
|
100
132
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
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');
|
|
105
143
|
```
|
|
106
144
|
|
|
107
|
-
###
|
|
145
|
+
### 5. 드롭다운 (Dropdown)
|
|
108
146
|
```html
|
|
109
147
|
<div class="dewp-dropdown">
|
|
110
|
-
<button class="dewp-dropdown-toggle">
|
|
111
|
-
선택하세요
|
|
112
|
-
</button>
|
|
148
|
+
<button class="dewp-dropdown-toggle">선택하세요</button>
|
|
113
149
|
<div class="dewp-dropdown-menu">
|
|
114
|
-
<div class="dewp-dropdown-item" data-value="
|
|
115
|
-
<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>
|
|
116
152
|
</div>
|
|
117
153
|
</div>
|
|
118
154
|
|
|
119
155
|
<script>
|
|
120
|
-
|
|
121
|
-
window.DEWP.autoInitializeDropdowns();
|
|
156
|
+
window.DEWP.autoInitializeDropdowns();
|
|
122
157
|
</script>
|
|
123
158
|
```
|
|
124
159
|
|
|
125
|
-
###
|
|
160
|
+
### 6. 탭 (Tabs)
|
|
126
161
|
```html
|
|
127
162
|
<div class="dewp-tabs">
|
|
128
163
|
<button class="dewp-tab-btn active" data-tab="tab1">탭 1</button>
|
|
@@ -135,250 +170,317 @@ window.DEWP.autoInitializeDropdowns();
|
|
|
135
170
|
</div>
|
|
136
171
|
|
|
137
172
|
<script>
|
|
138
|
-
|
|
139
|
-
window.DEWP.initTabs();
|
|
140
|
-
|
|
141
|
-
// 특정 탭 활성화
|
|
142
|
-
window.DEWP.activateTab('tab2');
|
|
143
|
-
|
|
144
|
-
// 활성 탭 정보 가져오기
|
|
145
|
-
const activeTab = window.DEWP.getActiveTab('.dewp-tabs');
|
|
173
|
+
window.DEWP.initTabs();
|
|
146
174
|
</script>
|
|
147
175
|
```
|
|
148
176
|
|
|
149
|
-
###
|
|
177
|
+
### 7. 아코디언 (Accordion)
|
|
150
178
|
```html
|
|
151
|
-
<div class="dewp-
|
|
152
|
-
<div class="dewp-
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<div class="dewp-header-actions">
|
|
157
|
-
<button class="dewp-header-btn dewp-btn-primary">설정 저장</button>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### 6. 섹션 컴포넌트
|
|
163
|
-
```html
|
|
164
|
-
<div class="dewp-section">
|
|
165
|
-
<div class="dewp-section-header">
|
|
166
|
-
<div class="dewp-section-title-area">
|
|
167
|
-
<h3 class="dewp-section-title">일반 설정</h3>
|
|
168
|
-
<p class="dewp-section-description">플러그인의 기본 동작을 설정합니다.</p>
|
|
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>
|
|
169
184
|
</div>
|
|
170
|
-
<div class="dewp-
|
|
171
|
-
<button class="dewp-section-btn dewp-btn-primary">저장</button>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
<div class="dewp-section-content">
|
|
175
|
-
<!-- 폼 요소들 -->
|
|
185
|
+
<div class="dewp-accordion-content">아코디언 내용 1</div>
|
|
176
186
|
</div>
|
|
177
187
|
</div>
|
|
188
|
+
|
|
189
|
+
<script>
|
|
190
|
+
window.DEWP.initAccordions();
|
|
191
|
+
</script>
|
|
178
192
|
```
|
|
179
193
|
|
|
180
|
-
###
|
|
194
|
+
### 8. Drawer
|
|
181
195
|
```html
|
|
182
|
-
<!-- 기본 Drawer 구조 -->
|
|
183
196
|
<div class="dewp-drawer" id="my-drawer">
|
|
184
197
|
<div class="dewp-drawer-header">
|
|
185
|
-
<h3 class="dewp-drawer-title"
|
|
186
|
-
<button class="dewp-drawer-close">
|
|
187
|
-
<svg viewBox="0 0 24 24">
|
|
188
|
-
<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"/>
|
|
189
|
-
</svg>
|
|
190
|
-
</button>
|
|
198
|
+
<h3 class="dewp-drawer-title">Drawer 제목</h3>
|
|
199
|
+
<button class="dewp-drawer-close">×</button>
|
|
191
200
|
</div>
|
|
192
201
|
<div class="dewp-drawer-content">
|
|
193
|
-
|
|
202
|
+
Drawer 내용
|
|
194
203
|
</div>
|
|
195
204
|
</div>
|
|
196
205
|
|
|
197
206
|
<script>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
window.DEWP.openDrawer(drawerId);
|
|
206
|
-
window.DEWP.closeDrawer(drawerId);
|
|
207
|
-
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);
|
|
208
214
|
</script>
|
|
209
215
|
```
|
|
210
216
|
|
|
211
|
-
###
|
|
212
|
-
```javascript
|
|
213
|
-
// DOM 요소 선택
|
|
214
|
-
const element = window.DEWP.qs('.my-class');
|
|
215
|
-
const elements = window.DEWP.qsa('.my-class');
|
|
216
|
-
|
|
217
|
-
// 클래스 조작
|
|
218
|
-
window.DEWP.addClass(element, 'active');
|
|
219
|
-
window.DEWP.removeClass(element, 'inactive');
|
|
220
|
-
window.DEWP.toggleClass(element, 'visible');
|
|
221
|
-
|
|
222
|
-
// 텍스트 및 HTML 설정
|
|
223
|
-
window.DEWP.setText(element, '새로운 텍스트');
|
|
224
|
-
window.DEWP.setHTML(element, '<strong>HTML</strong>');
|
|
225
|
-
|
|
226
|
-
// 이벤트 처리
|
|
227
|
-
window.DEWP.on(element, 'click', (e) => console.log('클릭됨'));
|
|
228
|
-
window.DEWP.off(element, 'click');
|
|
229
|
-
|
|
230
|
-
// DOM 상태 확인
|
|
231
|
-
if (window.DEWP.isDOMReady()) {
|
|
232
|
-
// DOM이 준비됨
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
window.DEWP.onDOMReady(() => {
|
|
236
|
-
// DOM 로드 완료 후 실행
|
|
237
|
-
});
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
## 🎨 SCSS 컴포넌트
|
|
241
|
-
|
|
242
|
-
### 기본 컴포넌트
|
|
243
|
-
|
|
244
|
-
#### 버튼
|
|
245
|
-
```html
|
|
246
|
-
<button class="dewp-btn dewp-btn-primary">Primary Button</button>
|
|
247
|
-
<button class="dewp-btn dewp-btn-outline-secondary">Outline Button</button>
|
|
248
|
-
<button class="dewp-btn dewp-btn-success dewp-btn-lg">Large Success Button</button>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
#### 배지
|
|
252
|
-
```html
|
|
253
|
-
<span class="dewp-badge dewp-badge-primary">Primary</span>
|
|
254
|
-
<span class="dewp-badge dewp-badge-success dewp-badge-pill">Success</span>
|
|
255
|
-
<span class="dewp-badge dewp-badge-danger dewp-badge-ring">Danger</span>
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
#### 폼
|
|
217
|
+
### 9. 폼 요소 (Forms)
|
|
259
218
|
```html
|
|
219
|
+
<!-- 입력 필드 -->
|
|
260
220
|
<div class="dewp-form-group">
|
|
261
221
|
<label class="dewp-form-label">이름</label>
|
|
262
|
-
<input type="text" class="dewp-form-input" placeholder="
|
|
222
|
+
<input type="text" class="dewp-form-input" placeholder="이름 입력">
|
|
263
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>
|
|
264
243
|
```
|
|
265
244
|
|
|
266
|
-
|
|
245
|
+
### 10. 테이블 (Table)
|
|
267
246
|
```html
|
|
268
247
|
<table class="dewp-table">
|
|
269
248
|
<thead>
|
|
270
249
|
<tr>
|
|
271
250
|
<th>제목</th>
|
|
272
|
-
<th
|
|
251
|
+
<th>작성자</th>
|
|
252
|
+
<th>날짜</th>
|
|
273
253
|
</tr>
|
|
274
254
|
</thead>
|
|
275
255
|
<tbody>
|
|
276
256
|
<tr>
|
|
277
|
-
<td
|
|
278
|
-
<td
|
|
257
|
+
<td>게시글 1</td>
|
|
258
|
+
<td>홍길동</td>
|
|
259
|
+
<td>2025-01-01</td>
|
|
279
260
|
</tr>
|
|
280
261
|
</tbody>
|
|
281
262
|
</table>
|
|
282
263
|
```
|
|
283
264
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
</div>
|
|
296
|
-
</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단계 높이 */
|
|
297
276
|
```
|
|
298
277
|
|
|
299
|
-
####
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
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
|
+
```
|
|
307
286
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
287
|
+
#### Border (테두리)
|
|
288
|
+
```css
|
|
289
|
+
--db-border-base /* 기본 테두리 */
|
|
290
|
+
--db-border-layer-1 /* 1단계 테두리 */
|
|
291
|
+
--db-border-layer-2 /* 2단계 테두리 */
|
|
292
|
+
```
|
|
314
293
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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 /* 정보 */
|
|
320
300
|
```
|
|
321
301
|
|
|
322
|
-
####
|
|
302
|
+
#### Brand (브랜드)
|
|
303
|
+
```css
|
|
304
|
+
--db-brand-primary /* 주요 브랜드 색상 */
|
|
305
|
+
--db-brand-secondary /* 보조 브랜드 색상 */
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### 다크 모드
|
|
309
|
+
|
|
310
|
+
다크 모드는 **자동으로 적용**됩니다:
|
|
311
|
+
|
|
323
312
|
```html
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
313
|
+
<!-- 다크 모드 활성화 -->
|
|
314
|
+
<body data-theme="dark">
|
|
315
|
+
<!-- 모든 컴포넌트가 자동으로 다크 모드로 전환됩니다 -->
|
|
316
|
+
</body>
|
|
327
317
|
|
|
328
|
-
<
|
|
329
|
-
|
|
330
|
-
|
|
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>
|
|
331
326
|
```
|
|
332
327
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<!-- SCSS 커스터마이징 가이드는 문서 사이트로 이관했습니다. -->
|
|
328
|
+
---
|
|
336
329
|
|
|
337
330
|
## 📱 반응형 브레이크포인트
|
|
338
331
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
+
```
|
|
368
|
+
|
|
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
|
+
```
|
|
345
380
|
|
|
346
|
-
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 📂 빌드 출력
|
|
347
384
|
|
|
348
385
|
```
|
|
349
386
|
dist/
|
|
350
387
|
├── css/
|
|
351
|
-
│ └── dewp.min.css
|
|
388
|
+
│ └── dewp.min.css # 압축된 CSS (152.8 kB)
|
|
352
389
|
└── js/
|
|
353
|
-
└── dewp.min.js
|
|
390
|
+
└── dewp.min.js # 압축된 JavaScript (40.7 kB)
|
|
354
391
|
```
|
|
355
392
|
|
|
356
|
-
|
|
393
|
+
---
|
|
357
394
|
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
npm run build:prod
|
|
361
|
-
```
|
|
395
|
+
## 🌐 CDN 링크
|
|
362
396
|
|
|
363
|
-
###
|
|
364
|
-
```bash
|
|
365
|
-
npm run preview
|
|
397
|
+
### unpkg
|
|
366
398
|
```
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
```bash
|
|
370
|
-
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
|
|
371
401
|
```
|
|
372
402
|
|
|
373
|
-
###
|
|
374
|
-
```
|
|
375
|
-
npm
|
|
376
|
-
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
|
|
377
407
|
```
|
|
378
408
|
|
|
379
|
-
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## 📚 문서
|
|
412
|
+
|
|
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
|
|
380
429
|
|
|
381
|
-
|
|
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
|
+
---
|
|
382
484
|
|
|
383
485
|
## 🤝 기여
|
|
384
486
|
|
|
@@ -388,14 +490,28 @@ npm publish
|
|
|
388
490
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
389
491
|
5. Open a Pull Request
|
|
390
492
|
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## 📄 라이선스
|
|
496
|
+
|
|
497
|
+
이 프로젝트는 MIT License를 따릅니다.
|
|
498
|
+
|
|
499
|
+
재배포 시 원저작권 고지와 라이선스 전문을 반드시 포함해 주세요.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
391
503
|
## 📞 지원
|
|
392
504
|
|
|
393
|
-
|
|
505
|
+
- **이메일**: designbasekorea@gmail.com
|
|
506
|
+
- **Issues**: [GitHub Issues](https://github.com/designbasekorea/designbase-wp-library/issues)
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## 🔗 관련 프로젝트
|
|
394
511
|
|
|
395
|
-
-
|
|
512
|
+
- [@designbasekorea/theme](https://www.npmjs.com/package/@designbasekorea/theme) - 디자인 토큰 시스템
|
|
513
|
+
- [@designbasekorea/icons-webfont](https://www.npmjs.com/package/@designbasekorea/icons-webfont) - 아이콘 시스템
|
|
396
514
|
|
|
397
|
-
|
|
515
|
+
---
|
|
398
516
|
|
|
399
|
-
|
|
400
|
-
- [CDN (unpkg)](https://unpkg.com/designbase-wp-library@latest/)
|
|
401
|
-
- [CDN (jsDelivr)](https://cdn.jsdelivr.net/npm/designbase-wp-library@latest/)
|
|
517
|
+
**Made with ❤️ by DesignBase Korea**
|