@x-plat/design-system 0.5.51 → 0.5.52
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
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# @x-plat/design-system
|
|
2
|
+
|
|
3
|
+
XPLAT UI 디자인 시스템. React 컴포넌트, 레이아웃, 토큰 시스템 제공.
|
|
4
|
+
|
|
5
|
+
`@x-plat/tokens-default` 를 기본 브랜드로 사용하며, 다른 브랜드 토큰 패키지(cbio / daibee-ir / haetbitgil 등) 와 조합 가능.
|
|
6
|
+
|
|
7
|
+
## 요구 사항
|
|
8
|
+
|
|
9
|
+
| 항목 | 버전 |
|
|
10
|
+
|------|------|
|
|
11
|
+
| Node.js | 18+ |
|
|
12
|
+
| React | 18+ |
|
|
13
|
+
|
|
14
|
+
## 설치
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @x-plat/design-system
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 사용법
|
|
21
|
+
|
|
22
|
+
### 1. 스타일 로드 (필수)
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import "@x-plat/design-system/style.css";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> `style.css` 는 **컴포넌트 스타일 + tokens-default 의 토큰 값** 을 함께 포함한다.
|
|
29
|
+
|
|
30
|
+
### 2. 컴포넌트 사용
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Button, Modal, ToastProvider } from "@x-plat/design-system/components";
|
|
34
|
+
|
|
35
|
+
<ToastProvider position="top-right">
|
|
36
|
+
<Layout
|
|
37
|
+
header={<Header logo={<img src="/logo.svg" />} />}
|
|
38
|
+
sideBar={<SideBar>...</SideBar>}
|
|
39
|
+
>
|
|
40
|
+
<FullGrid>
|
|
41
|
+
<GridItem column={{ default: 6, tablet: 4, mobile: 4 }}>
|
|
42
|
+
<Button type="primary">저장</Button>
|
|
43
|
+
</GridItem>
|
|
44
|
+
</FullGrid>
|
|
45
|
+
</Layout>
|
|
46
|
+
</ToastProvider>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 3. 다른 브랜드 적용 (cbio / haetbitgil / daibee-ir)
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import "@x-plat/design-system/style.css"; // 1) 컴포넌트 + default 토큰
|
|
53
|
+
import "@x-plat/tokens-haetbitgil/tokens.css"; // 2) 햇빛길 토큰으로 override (CSS 카스케이드)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> 순서가 중요. design-system 을 먼저, 브랜드 토큰을 뒤에 import.
|
|
57
|
+
|
|
58
|
+
## Import 패턴
|
|
59
|
+
|
|
60
|
+
| 방식 | 예시 |
|
|
61
|
+
|------|------|
|
|
62
|
+
| 루트 barrel | `import { Button } from "@x-plat/design-system";` |
|
|
63
|
+
| 서브패스 barrel | `import { Button } from "@x-plat/design-system/components";` |
|
|
64
|
+
| Deep import | `import Button from "@x-plat/design-system/components/Button";` |
|
|
65
|
+
|
|
66
|
+
## 컴포넌트 목록
|
|
67
|
+
|
|
68
|
+
| 카테고리 | 컴포넌트 |
|
|
69
|
+
|---|---|
|
|
70
|
+
| 입력 | Button, Input, PasswordInput, TextArea, Select, CheckBox, Radio, Switch, DatePicker, Calendar, **Editor** |
|
|
71
|
+
| 표시 | Table, Card, Tag, Chip, Avatar, Badge, Skeleton, Spinner, Divider, EmptyState, Progress |
|
|
72
|
+
| 오버레이 | Modal, Drawer, PopOver, Tooltip, Alert, Toast (ToastProvider 필요) |
|
|
73
|
+
| 네비 | Tab, CardTab, Breadcrumb, Pagination, Steps, Dropdown |
|
|
74
|
+
| 미디어 | Video, FileUpload, ImageSelector, Swiper |
|
|
75
|
+
| 기타 | Accordion, Chart, HtmlTypeWriter |
|
|
76
|
+
| Layout | Layout, Header, SideBar, FullGrid, FullScreen, GapGrid, GridItem |
|
|
77
|
+
|
|
78
|
+
## AI 에이전트로 작업하기 (Figma Make / Claude / Cursor)
|
|
79
|
+
|
|
80
|
+
AI 에이전트 셋업용 종합 가이드:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
https://unpkg.com/@x-plat/design-system/guidelines/AGENT_PROMPT.md
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
위 내용 전체를 복사해서 에이전트 컨텍스트에 붙여넣으면, 절대 규칙 / 레이아웃 / 컴포넌트 카탈로그 / 토큰 사용법 / 흔히 누락되는 케이스 등이 함께 적용된다.
|
|
87
|
+
|
|
88
|
+
## 핵심 규칙
|
|
89
|
+
|
|
90
|
+
1. 컴포넌트에 `color` / `className` / `style` prop 없음
|
|
91
|
+
2. 컴포넌트는 `width: 100%` → 반드시 GridItem 또는 wrapper 로 너비 제어
|
|
92
|
+
3. CSS 로 DS 컴포넌트 오버라이드 금지
|
|
93
|
+
4. 색상·간격·타이포는 semantic 토큰만 사용
|
|
94
|
+
|
|
95
|
+
## 가이드라인 문서
|
|
96
|
+
|
|
97
|
+
- `guidelines/Guidelines.md` — 전체 진입 + 읽기 순서
|
|
98
|
+
- `guidelines/setup.md` — 설치 + Layout / Toast / 브랜드 전환
|
|
99
|
+
- `guidelines/AGENT_PROMPT.md` — AI 에이전트 셋업 프롬프트
|
|
100
|
+
- `guidelines/foundations/{color,spacing,typography,icons}.md`
|
|
101
|
+
- `guidelines/components/{name}.md` — 컴포넌트별 가이드
|
|
102
|
+
- `guidelines/composition/{grid,layout}.md`
|
|
103
|
+
|
|
104
|
+
unpkg 로 접근:
|
|
105
|
+
```
|
|
106
|
+
https://unpkg.com/@x-plat/design-system/guidelines/{경로}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 라이선스
|
|
110
|
+
|
|
111
|
+
Private. XPLAT WOONG.
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
.lib-xplat-modal.modal-box {
|
|
204
204
|
border-radius: var(--spacing-radius-lg);
|
|
205
|
-
background-color:
|
|
205
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
206
206
|
padding: var(--spacing-space-6);
|
|
207
207
|
min-width: min-content;
|
|
208
208
|
max-width: calc(100vw - 32px);
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
height: 12px;
|
|
196
196
|
margin-top: -4px;
|
|
197
197
|
border-radius: 50%;
|
|
198
|
-
background:
|
|
198
|
+
background: var(--semantic-icon-inverse);
|
|
199
199
|
border: none;
|
|
200
200
|
cursor: pointer;
|
|
201
201
|
}
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
width: 12px;
|
|
205
205
|
height: 12px;
|
|
206
206
|
border-radius: 50%;
|
|
207
|
-
background:
|
|
207
|
+
background: var(--semantic-icon-inverse);
|
|
208
208
|
border: none;
|
|
209
209
|
cursor: pointer;
|
|
210
210
|
}
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
background:
|
|
245
245
|
linear-gradient(
|
|
246
246
|
to right,
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
var(--semantic-icon-inverse) 0%,
|
|
248
|
+
var(--semantic-icon-inverse) var(--volume, 0%),
|
|
249
249
|
rgba(255, 255, 255, 0.3) var(--volume, 0%),
|
|
250
250
|
rgba(255, 255, 255, 0.3) 100%);
|
|
251
251
|
}
|
|
@@ -257,5 +257,5 @@
|
|
|
257
257
|
.lib-xplat-video .volume-slider::-moz-range-progress {
|
|
258
258
|
height: 4px;
|
|
259
259
|
border-radius: 2px;
|
|
260
|
-
background:
|
|
260
|
+
background: var(--semantic-icon-inverse);
|
|
261
261
|
}
|
|
@@ -2938,7 +2938,7 @@
|
|
|
2938
2938
|
}
|
|
2939
2939
|
.lib-xplat-modal.modal-box {
|
|
2940
2940
|
border-radius: var(--spacing-radius-lg);
|
|
2941
|
-
background-color:
|
|
2941
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
2942
2942
|
padding: var(--spacing-space-6);
|
|
2943
2943
|
min-width: min-content;
|
|
2944
2944
|
max-width: calc(100vw - 32px);
|
|
@@ -5465,7 +5465,7 @@
|
|
|
5465
5465
|
height: 12px;
|
|
5466
5466
|
margin-top: -4px;
|
|
5467
5467
|
border-radius: 50%;
|
|
5468
|
-
background:
|
|
5468
|
+
background: var(--semantic-icon-inverse);
|
|
5469
5469
|
border: none;
|
|
5470
5470
|
cursor: pointer;
|
|
5471
5471
|
}
|
|
@@ -5474,7 +5474,7 @@
|
|
|
5474
5474
|
width: 12px;
|
|
5475
5475
|
height: 12px;
|
|
5476
5476
|
border-radius: 50%;
|
|
5477
|
-
background:
|
|
5477
|
+
background: var(--semantic-icon-inverse);
|
|
5478
5478
|
border: none;
|
|
5479
5479
|
cursor: pointer;
|
|
5480
5480
|
}
|
|
@@ -5514,8 +5514,8 @@
|
|
|
5514
5514
|
background:
|
|
5515
5515
|
linear-gradient(
|
|
5516
5516
|
to right,
|
|
5517
|
-
|
|
5518
|
-
|
|
5517
|
+
var(--semantic-icon-inverse) 0%,
|
|
5518
|
+
var(--semantic-icon-inverse) var(--volume, 0%),
|
|
5519
5519
|
rgba(255, 255, 255, 0.3) var(--volume, 0%),
|
|
5520
5520
|
rgba(255, 255, 255, 0.3) 100%);
|
|
5521
5521
|
}
|
|
@@ -5527,5 +5527,5 @@
|
|
|
5527
5527
|
.lib-xplat-video .volume-slider::-moz-range-progress {
|
|
5528
5528
|
height: 4px;
|
|
5529
5529
|
border-radius: 2px;
|
|
5530
|
-
background:
|
|
5530
|
+
background: var(--semantic-icon-inverse);
|
|
5531
5531
|
}
|
package/dist/index.css
CHANGED
|
@@ -2938,7 +2938,7 @@
|
|
|
2938
2938
|
}
|
|
2939
2939
|
.lib-xplat-modal.modal-box {
|
|
2940
2940
|
border-radius: var(--spacing-radius-lg);
|
|
2941
|
-
background-color:
|
|
2941
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
2942
2942
|
padding: var(--spacing-space-6);
|
|
2943
2943
|
min-width: min-content;
|
|
2944
2944
|
max-width: calc(100vw - 32px);
|
|
@@ -5465,7 +5465,7 @@
|
|
|
5465
5465
|
height: 12px;
|
|
5466
5466
|
margin-top: -4px;
|
|
5467
5467
|
border-radius: 50%;
|
|
5468
|
-
background:
|
|
5468
|
+
background: var(--semantic-icon-inverse);
|
|
5469
5469
|
border: none;
|
|
5470
5470
|
cursor: pointer;
|
|
5471
5471
|
}
|
|
@@ -5474,7 +5474,7 @@
|
|
|
5474
5474
|
width: 12px;
|
|
5475
5475
|
height: 12px;
|
|
5476
5476
|
border-radius: 50%;
|
|
5477
|
-
background:
|
|
5477
|
+
background: var(--semantic-icon-inverse);
|
|
5478
5478
|
border: none;
|
|
5479
5479
|
cursor: pointer;
|
|
5480
5480
|
}
|
|
@@ -5514,8 +5514,8 @@
|
|
|
5514
5514
|
background:
|
|
5515
5515
|
linear-gradient(
|
|
5516
5516
|
to right,
|
|
5517
|
-
|
|
5518
|
-
|
|
5517
|
+
var(--semantic-icon-inverse) 0%,
|
|
5518
|
+
var(--semantic-icon-inverse) var(--volume, 0%),
|
|
5519
5519
|
rgba(255, 255, 255, 0.3) var(--volume, 0%),
|
|
5520
5520
|
rgba(255, 255, 255, 0.3) 100%);
|
|
5521
5521
|
}
|
|
@@ -5527,7 +5527,7 @@
|
|
|
5527
5527
|
.lib-xplat-video .volume-slider::-moz-range-progress {
|
|
5528
5528
|
height: 4px;
|
|
5529
5529
|
border-radius: 2px;
|
|
5530
|
-
background:
|
|
5530
|
+
background: var(--semantic-icon-inverse);
|
|
5531
5531
|
}
|
|
5532
5532
|
|
|
5533
5533
|
/* src/layout/Grid/FullGrid/fullgrid.scss */
|