@x-plat/design-system 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/dist/components/Accordion/index.css +10 -3
- package/dist/components/Alert/index.css +7 -0
- package/dist/components/AutoResizeTextArea/index.css +3 -0
- package/dist/components/Avatar/index.css +13 -1
- package/dist/components/Badge/index.css +13 -2
- package/dist/components/Box/index.css +8 -5
- package/dist/components/Breadcrumb/index.css +5 -1
- package/dist/components/Button/index.css +10 -1
- package/dist/components/Calendar/index.cjs +1 -1
- package/dist/components/Calendar/index.css +10 -6
- package/dist/components/Calendar/index.js +1 -1
- package/dist/components/CardTab/index.css +14 -2
- package/dist/components/Chart/index.css +32 -11
- package/dist/components/ChatInput/index.css +6 -0
- package/dist/components/CheckBox/index.css +10 -1
- package/dist/components/Chip/index.css +12 -0
- package/dist/components/DatePicker/index.css +51 -12
- package/dist/components/Drawer/index.css +14 -7
- package/dist/components/Dropdown/index.css +5 -1
- package/dist/components/Editor/index.css +49 -10
- package/dist/components/EmptyState/index.css +9 -2
- package/dist/components/FileUpload/index.css +9 -2
- package/dist/components/HtmlTypeWriter/index.cjs +2 -0
- package/dist/components/HtmlTypeWriter/index.css +13 -1
- package/dist/components/HtmlTypeWriter/index.d.cts +3 -3
- package/dist/components/HtmlTypeWriter/index.d.ts +3 -3
- package/dist/components/HtmlTypeWriter/index.js +1 -0
- package/dist/components/ImageSelector/index.css +8 -0
- package/dist/components/Input/index.css +12 -0
- package/dist/components/Modal/index.css +1 -1
- package/dist/components/Pagination/index.css +25 -1
- package/dist/components/PopOver/index.css +1 -1
- package/dist/components/Progress/index.css +5 -2
- package/dist/components/Radio/index.css +9 -0
- package/dist/components/Select/index.css +20 -3
- package/dist/components/Skeleton/index.cjs +6 -6
- package/dist/components/Skeleton/index.js +6 -6
- package/dist/components/Steps/index.css +14 -4
- package/dist/components/Switch/index.css +1 -1
- package/dist/components/Tab/index.css +16 -1
- package/dist/components/Table/index.cjs +4 -1
- package/dist/components/Table/index.css +12 -0
- package/dist/components/Table/index.d.cts +2 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +4 -1
- package/dist/components/Tag/index.css +12 -0
- package/dist/components/TextArea/index.css +9 -0
- package/dist/components/Toast/index.css +8 -1
- package/dist/components/Tooltip/index.css +8 -4
- package/dist/components/Video/index.css +31 -20
- package/dist/components/index.cjs +253 -248
- package/dist/components/index.css +532 -147
- package/dist/components/index.d.cts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +226 -222
- package/dist/index.cjs +253 -248
- package/dist/index.css +535 -150
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +226 -222
- package/dist/layout/Header/index.css +2 -2
- package/dist/layout/Layout/index.css +1 -1
- package/dist/layout/index.css +43 -3
- package/guidelines/components/accordion.md +1 -1
- package/guidelines/components/avatar.md +1 -1
- package/guidelines/components/card.md +1 -1
- package/guidelines/components/chart.md +1 -1
- package/guidelines/components/data-display.md +4 -4
- package/guidelines/components/dropdown.md +1 -1
- package/guidelines/components/file-media.md +3 -3
- package/guidelines/components/html-typewriter.md +1 -1
- package/guidelines/components/navigation.md +144 -20
- package/guidelines/components/swiper.md +2 -2
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: space-between;
|
|
6
6
|
padding: 16px;
|
|
7
|
-
border-bottom: 1px solid var(--
|
|
8
|
-
background-color: var(--
|
|
7
|
+
border-bottom: 1px solid var(--semantic-border-primary);
|
|
8
|
+
background-color: var(--semantic-surface-neutral-primary);
|
|
9
9
|
width: 100%;
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
gap: 12px;
|
package/dist/layout/index.css
CHANGED
|
@@ -266,6 +266,7 @@
|
|
|
266
266
|
--semantic-interaction-overlay-25: var(--brand-base-overlay-25);
|
|
267
267
|
--semantic-interaction-overlay-50: var(--brand-base-overlay-50);
|
|
268
268
|
--semantic-interaction-overlay-75: var(--brand-base-overlay-75);
|
|
269
|
+
--semantic-interaction-overlay-85: var(--brand-base-overlay-85);
|
|
269
270
|
--semantic-interaction-focus-ring: var(--brand-primary-700);
|
|
270
271
|
}
|
|
271
272
|
:root {
|
|
@@ -511,11 +512,26 @@
|
|
|
511
512
|
--semantic-typo-caption-1-sb-lh: var(--typo-lh-caption-1);
|
|
512
513
|
--semantic-typo-caption-1-sb-weight: var(--typo-weight-semibold);
|
|
513
514
|
--semantic-typo-caption-1-sb-ls: var(--typo-ls-wide);
|
|
515
|
+
--semantic-typo-caption-1-m-font: var(--typo-font-family-default);
|
|
516
|
+
--semantic-typo-caption-1-m-size: var(--typo-size-caption-1);
|
|
517
|
+
--semantic-typo-caption-1-m-lh: var(--typo-lh-caption-1);
|
|
518
|
+
--semantic-typo-caption-1-m-weight: var(--typo-weight-medium);
|
|
519
|
+
--semantic-typo-caption-1-m-ls: var(--typo-ls-wide);
|
|
514
520
|
--semantic-typo-caption-1-r-font: var(--typo-font-family-default);
|
|
515
521
|
--semantic-typo-caption-1-r-size: var(--typo-size-caption-1);
|
|
516
522
|
--semantic-typo-caption-1-r-lh: var(--typo-lh-caption-1);
|
|
517
523
|
--semantic-typo-caption-1-r-weight: var(--typo-weight-regular);
|
|
518
524
|
--semantic-typo-caption-1-r-ls: var(--typo-ls-wide);
|
|
525
|
+
--semantic-typo-caption-2-sb-font: var(--typo-font-family-default);
|
|
526
|
+
--semantic-typo-caption-2-sb-size: var(--typo-size-caption-2);
|
|
527
|
+
--semantic-typo-caption-2-sb-lh: var(--typo-lh-caption-2);
|
|
528
|
+
--semantic-typo-caption-2-sb-weight: var(--typo-weight-semibold);
|
|
529
|
+
--semantic-typo-caption-2-sb-ls: var(--typo-ls-wide);
|
|
530
|
+
--semantic-typo-caption-2-m-font: var(--typo-font-family-default);
|
|
531
|
+
--semantic-typo-caption-2-m-size: var(--typo-size-caption-2);
|
|
532
|
+
--semantic-typo-caption-2-m-lh: var(--typo-lh-caption-2);
|
|
533
|
+
--semantic-typo-caption-2-m-weight: var(--typo-weight-medium);
|
|
534
|
+
--semantic-typo-caption-2-m-ls: var(--typo-ls-wide);
|
|
519
535
|
--semantic-typo-caption-2-r-font: var(--typo-font-family-default);
|
|
520
536
|
--semantic-typo-caption-2-r-size: var(--typo-size-caption-2);
|
|
521
537
|
--semantic-typo-caption-2-r-lh: var(--typo-lh-caption-2);
|
|
@@ -669,6 +685,13 @@
|
|
|
669
685
|
font-weight: var(--semantic-typo-caption-1-sb-weight);
|
|
670
686
|
letter-spacing: var(--semantic-typo-caption-1-sb-ls);
|
|
671
687
|
}
|
|
688
|
+
.typo-caption-1-m {
|
|
689
|
+
font-family: var(--semantic-typo-caption-1-m-font);
|
|
690
|
+
font-size: var(--semantic-typo-caption-1-m-size);
|
|
691
|
+
line-height: var(--semantic-typo-caption-1-m-lh);
|
|
692
|
+
font-weight: var(--semantic-typo-caption-1-m-weight);
|
|
693
|
+
letter-spacing: var(--semantic-typo-caption-1-m-ls);
|
|
694
|
+
}
|
|
672
695
|
.typo-caption-1-r {
|
|
673
696
|
font-family: var(--semantic-typo-caption-1-r-font);
|
|
674
697
|
font-size: var(--semantic-typo-caption-1-r-size);
|
|
@@ -676,6 +699,20 @@
|
|
|
676
699
|
font-weight: var(--semantic-typo-caption-1-r-weight);
|
|
677
700
|
letter-spacing: var(--semantic-typo-caption-1-r-ls);
|
|
678
701
|
}
|
|
702
|
+
.typo-caption-2-sb {
|
|
703
|
+
font-family: var(--semantic-typo-caption-2-sb-font);
|
|
704
|
+
font-size: var(--semantic-typo-caption-2-sb-size);
|
|
705
|
+
line-height: var(--semantic-typo-caption-2-sb-lh);
|
|
706
|
+
font-weight: var(--semantic-typo-caption-2-sb-weight);
|
|
707
|
+
letter-spacing: var(--semantic-typo-caption-2-sb-ls);
|
|
708
|
+
}
|
|
709
|
+
.typo-caption-2-m {
|
|
710
|
+
font-family: var(--semantic-typo-caption-2-m-font);
|
|
711
|
+
font-size: var(--semantic-typo-caption-2-m-size);
|
|
712
|
+
line-height: var(--semantic-typo-caption-2-m-lh);
|
|
713
|
+
font-weight: var(--semantic-typo-caption-2-m-weight);
|
|
714
|
+
letter-spacing: var(--semantic-typo-caption-2-m-ls);
|
|
715
|
+
}
|
|
679
716
|
.typo-caption-2-r {
|
|
680
717
|
font-family: var(--semantic-typo-caption-2-r-font);
|
|
681
718
|
font-size: var(--semantic-typo-caption-2-r-size);
|
|
@@ -869,6 +906,9 @@
|
|
|
869
906
|
.semantic-interaction-overlay-75 {
|
|
870
907
|
--ds-color: var(--semantic-interaction-overlay-75);
|
|
871
908
|
}
|
|
909
|
+
.semantic-interaction-overlay-85 {
|
|
910
|
+
--ds-color: var(--semantic-interaction-overlay-85);
|
|
911
|
+
}
|
|
872
912
|
.semantic-interaction-focus-ring {
|
|
873
913
|
--ds-color: var(--semantic-interaction-focus-ring);
|
|
874
914
|
}
|
|
@@ -1332,8 +1372,8 @@
|
|
|
1332
1372
|
align-items: center;
|
|
1333
1373
|
justify-content: space-between;
|
|
1334
1374
|
padding: 16px;
|
|
1335
|
-
border-bottom: 1px solid var(--
|
|
1336
|
-
background-color: var(--
|
|
1375
|
+
border-bottom: 1px solid var(--semantic-border-primary);
|
|
1376
|
+
background-color: var(--semantic-surface-neutral-primary);
|
|
1337
1377
|
width: 100%;
|
|
1338
1378
|
box-sizing: border-box;
|
|
1339
1379
|
gap: 12px;
|
|
@@ -1354,7 +1394,7 @@
|
|
|
1354
1394
|
width: 100vw;
|
|
1355
1395
|
height: 100vh;
|
|
1356
1396
|
overflow: hidden;
|
|
1357
|
-
background-color: var(--
|
|
1397
|
+
background-color: var(--semantic-surface-neutral-secondary);
|
|
1358
1398
|
}
|
|
1359
1399
|
.lib-xplat-layout > .lib-xplat-layout-content-wrapper {
|
|
1360
1400
|
display: flex;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
구분선을 표시한다.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { Divider } from "@
|
|
8
|
+
import { Divider } from "@x-plat/design-system";
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -24,7 +24,7 @@ import { Divider } from "@xplat/design-system";
|
|
|
24
24
|
빈 상태 안내를 표시한다.
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
|
-
import { EmptyState } from "@
|
|
27
|
+
import { EmptyState } from "@x-plat/design-system";
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -49,7 +49,7 @@ import { EmptyState } from "@xplat/design-system";
|
|
|
49
49
|
로딩 플레이스홀더를 표시한다.
|
|
50
50
|
|
|
51
51
|
```tsx
|
|
52
|
-
import { Skeleton } from "@
|
|
52
|
+
import { Skeleton } from "@x-plat/design-system";
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -71,7 +71,7 @@ import { Skeleton } from "@xplat/design-system";
|
|
|
71
71
|
로딩 인디케이터를 표시한다.
|
|
72
72
|
|
|
73
73
|
```tsx
|
|
74
|
-
import { Spinner } from "@
|
|
74
|
+
import { Spinner } from "@x-plat/design-system";
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
파일 업로드 영역을 표시한다. 드래그 앤 드롭과 클릭 업로드를 모두 지원한다.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { FileUpload } from "@
|
|
8
|
+
import { FileUpload } from "@x-plat/design-system";
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -34,7 +34,7 @@ import { FileUpload } from "@xplat/design-system";
|
|
|
34
34
|
단일 이미지를 선택/미리보기하는 컨트롤이다. controlled 방식으로 동작한다.
|
|
35
35
|
|
|
36
36
|
```tsx
|
|
37
|
-
import { ImageSelector } from "@
|
|
37
|
+
import { ImageSelector } from "@x-plat/design-system";
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -56,7 +56,7 @@ const [image, setImage] = useState<File | undefined>();
|
|
|
56
56
|
비디오 플레이어를 표시한다. `controls={false}`이면 커스텀 재생/일시정지 오버레이를 표시한다. `ref`를 지원한다.
|
|
57
57
|
|
|
58
58
|
```tsx
|
|
59
|
-
import { Video } from "@
|
|
59
|
+
import { Video } from "@x-plat/design-system";
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
| Prop | 타입 | 기본값 | 설명 |
|
|
@@ -1,46 +1,120 @@
|
|
|
1
1
|
# 내비게이션: Tab / CardTab / Breadcrumb / Pagination / Steps
|
|
2
2
|
|
|
3
|
+
> 각 컴포넌트는 **배리언트가 여러 개다.** 첫 번째 예시만 보고 고르지 말고,
|
|
4
|
+
> 아래 "배리언트" 표를 먼저 확인한 뒤 화면 맥락에 맞는 값을 고를 것.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
3
8
|
## Tab
|
|
4
9
|
|
|
5
|
-
인덱스 기반 탭이다. 탭 영역만
|
|
10
|
+
인덱스 기반 탭이다. 탭 영역만 렌더링하고 패널 콘텐츠는 직접 관리한다.
|
|
11
|
+
|
|
12
|
+
**children 을 받지 않는다. `tabs` 배열로 전달한다.**
|
|
6
13
|
|
|
7
14
|
```tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
16
|
+
|
|
17
|
+
<Tab
|
|
18
|
+
type="default"
|
|
19
|
+
activeIndex={activeIndex}
|
|
20
|
+
tabs={[
|
|
21
|
+
{ value: "all", title: "전체" },
|
|
22
|
+
{ value: "active", title: "진행중" },
|
|
23
|
+
]}
|
|
24
|
+
onChange={(tab, idx) => setActiveIndex(idx)}
|
|
25
|
+
/>
|
|
12
26
|
```
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
28
|
+
<!-- props:Tab -->
|
|
29
|
+
| Prop | 타입 | 기본값 | 설명 |
|
|
30
|
+
|------|------|--------|------|
|
|
31
|
+
| activeIndex * | `number` | - | |
|
|
32
|
+
| tabs * | `{ value: string \| number; title: string }[]` | - | |
|
|
33
|
+
| onChange * | `(value: { value: string \| number; title: string }, index: number) => void` | - | |
|
|
34
|
+
| type * | `"default" \| "toggle"` | - | |
|
|
35
|
+
| size | `"sm" \| "md" \| "lg"` | `"md"` | |
|
|
36
|
+
|
|
37
|
+
`*` = 필수
|
|
38
|
+
<!-- /props:Tab -->
|
|
39
|
+
|
|
40
|
+
### 배리언트 — type (필수, 기본값 없음)
|
|
41
|
+
|
|
42
|
+
| 값 | 생김새 | 쓰는 곳 |
|
|
43
|
+
|----|--------|---------|
|
|
44
|
+
| `default` | 밑줄 없는 평면 탭 | 페이지 상단 주 내비게이션 |
|
|
45
|
+
| `toggle` | 활성 탭 아래로 인디케이터가 슬라이드 | 콘텐츠 전환 토글, 세그먼트 컨트롤 |
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
// toggle — 인디케이터가 따라 움직인다
|
|
49
|
+
<Tab
|
|
50
|
+
type="toggle"
|
|
51
|
+
activeIndex={activeIndex}
|
|
52
|
+
tabs={[{ value: 1, title: "목록" }, { value: 2, title: "지도" }]}
|
|
53
|
+
onChange={(tab, idx) => setActiveIndex(idx)}
|
|
54
|
+
/>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- `onChange` 에 `setActiveIndex` 를 **그대로 넘기면 안 된다.** 첫 인자가 탭 객체라 상태가 깨진다.
|
|
58
|
+
반드시 `(tab, idx) => setActiveIndex(idx)` 형태로 감쌀 것.
|
|
18
59
|
|
|
19
60
|
---
|
|
20
61
|
|
|
21
62
|
## CardTab
|
|
22
63
|
|
|
23
|
-
값 기반 탭이다.
|
|
64
|
+
값 기반 탭이다. 탭 + 패널 콘텐츠를 함께 제공한다. **`CardTab.Panel` 만 children 으로 허용한다.**
|
|
24
65
|
|
|
25
66
|
```tsx
|
|
26
|
-
<CardTab
|
|
67
|
+
<CardTab
|
|
68
|
+
size="md"
|
|
69
|
+
tabs={[{ value: "tab1", title: "탭1" }, { value: "tab2", title: "탭2" }]}
|
|
70
|
+
onChange={(tab) => console.log(tab.value)}
|
|
71
|
+
>
|
|
27
72
|
<CardTab.Panel value="tab1">탭1 내용</CardTab.Panel>
|
|
28
73
|
<CardTab.Panel value="tab2">탭2 내용</CardTab.Panel>
|
|
29
74
|
</CardTab>
|
|
30
75
|
```
|
|
31
76
|
|
|
77
|
+
<!-- props:CardTab -->
|
|
78
|
+
| Prop | 타입 | 기본값 | 설명 |
|
|
79
|
+
|------|------|--------|------|
|
|
80
|
+
| tabs * | `{ value: string \| number; title: string }[]` | - | |
|
|
81
|
+
| children * | `ReactElement< CardTabPanelProps, typeof CardTabPanel > \| ReactElement< CardTabPanelProps, typeof CardTabPanel >[]` | - | CardTab.Panel 만 허용 |
|
|
82
|
+
| activeValue | `string \| number` | - | controlled: 외부에서 활성 탭 제어 |
|
|
83
|
+
| onChange | `(tab: { value: string \| number; title: string }) => void` | - | 탭 변경 콜백 |
|
|
84
|
+
| size | `"sm" \| "md" \| "lg"` | `"md"` | |
|
|
85
|
+
|
|
86
|
+
`*` = 필수
|
|
87
|
+
<!-- /props:CardTab -->
|
|
88
|
+
|
|
89
|
+
- `activeValue` 를 **생략하면 컴포넌트가 스스로 상태를 관리한다.** 단순 탭 전환이면 생략하는 쪽이 낫다.
|
|
90
|
+
|
|
32
91
|
---
|
|
33
92
|
|
|
34
93
|
## Breadcrumb
|
|
35
94
|
|
|
36
|
-
경로를 표시한다.
|
|
95
|
+
경로를 표시한다. 마지막 항목은 자동으로 현재 위치로 렌더링된다 (`href` 를 줘도 링크가 아니다).
|
|
37
96
|
|
|
38
97
|
```tsx
|
|
39
|
-
<Breadcrumb
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
98
|
+
<Breadcrumb
|
|
99
|
+
items={[
|
|
100
|
+
{ label: "홈", href: "/" },
|
|
101
|
+
{ label: "설정", href: "/settings" },
|
|
102
|
+
{ label: "프로필" },
|
|
103
|
+
]}
|
|
104
|
+
/>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<!-- props:Breadcrumb -->
|
|
108
|
+
| Prop | 타입 | 기본값 | 설명 |
|
|
109
|
+
|------|------|--------|------|
|
|
110
|
+
| items * | `{ label: string; href?: string; onClick?: () => void }[]` | - | |
|
|
111
|
+
| separator | `ReactNode` | `"/"` | |
|
|
112
|
+
|
|
113
|
+
`*` = 필수
|
|
114
|
+
<!-- /props:Breadcrumb -->
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
<Breadcrumb separator={<ChevronRightIcon />} items={...} />
|
|
44
118
|
```
|
|
45
119
|
|
|
46
120
|
---
|
|
@@ -53,6 +127,28 @@
|
|
|
53
127
|
<Pagination current={page} total={100} onChange={setPage} />
|
|
54
128
|
```
|
|
55
129
|
|
|
130
|
+
<!-- props:Pagination -->
|
|
131
|
+
| Prop | 타입 | 기본값 | 설명 |
|
|
132
|
+
|------|------|--------|------|
|
|
133
|
+
| current * | `number` | - | |
|
|
134
|
+
| total * | `number` | - | |
|
|
135
|
+
| pageSize | `number` | `10` | |
|
|
136
|
+
| siblingCount | `number` | `1` | |
|
|
137
|
+
| onChange | `(page: number) => void` | - | |
|
|
138
|
+
| size | `"sm" \| "md" \| "lg"` | `"md"` | |
|
|
139
|
+
| type | `"brand" \| "success" \| "error" \| "warning" \| "info"` | `"brand"` | |
|
|
140
|
+
|
|
141
|
+
`*` = 필수
|
|
142
|
+
<!-- /props:Pagination -->
|
|
143
|
+
|
|
144
|
+
### 배리언트 — type (5종)
|
|
145
|
+
|
|
146
|
+
`brand` 가 기본이다. 나머지는 페이지네이션이 상태를 가진 목록(오류 목록, 경고 목록 등)에 붙을 때 그 맥락 색을 따라간다.
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
<Pagination current={page} total={240} pageSize={20} type="error" size="sm" onChange={setPage} />
|
|
150
|
+
```
|
|
151
|
+
|
|
56
152
|
---
|
|
57
153
|
|
|
58
154
|
## Steps
|
|
@@ -62,7 +158,7 @@
|
|
|
62
158
|
```tsx
|
|
63
159
|
<Steps
|
|
64
160
|
items={[
|
|
65
|
-
{ title: "정보 입력" },
|
|
161
|
+
{ title: "정보 입력", description: "기본 정보를 입력한다" },
|
|
66
162
|
{ title: "확인" },
|
|
67
163
|
{ title: "완료" },
|
|
68
164
|
]}
|
|
@@ -70,11 +166,39 @@
|
|
|
70
166
|
/>
|
|
71
167
|
```
|
|
72
168
|
|
|
169
|
+
<!-- props:Steps -->
|
|
170
|
+
| Prop | 타입 | 기본값 | 설명 |
|
|
171
|
+
|------|------|--------|------|
|
|
172
|
+
| items * | `{ title: string; description?: string }[]` | - | |
|
|
173
|
+
| current * | `number` | - | |
|
|
174
|
+
| type | `"brand" \| "success" \| "error" \| "warning" \| "info"` | `"brand"` | |
|
|
175
|
+
|
|
176
|
+
`*` = 필수
|
|
177
|
+
<!-- /props:Steps -->
|
|
178
|
+
|
|
179
|
+
### 배리언트 — type (5종)
|
|
180
|
+
|
|
181
|
+
| 값 | 쓰는 곳 |
|
|
182
|
+
|----|---------|
|
|
183
|
+
| `brand` | 일반 진행 플로우 (기본) |
|
|
184
|
+
| `success` | 완료된 프로세스 회고 표시 |
|
|
185
|
+
| `error` | 실패 지점이 있는 플로우 |
|
|
186
|
+
| `warning` | 주의가 필요한 단계가 포함된 플로우 |
|
|
187
|
+
| `info` | 안내성 플로우 |
|
|
188
|
+
|
|
189
|
+
- `current` 보다 앞 = 완료, 같으면 = 진행 중, 뒤 = 대기. 상태를 직접 넘기지 않는다.
|
|
190
|
+
|
|
73
191
|
---
|
|
74
192
|
|
|
75
193
|
## 의사결정
|
|
76
194
|
|
|
77
195
|
| 상황 | 사용할 것 |
|
|
78
196
|
|------|----------|
|
|
79
|
-
| 탭 영역만 (콘텐츠는 직접 관리) | Tab |
|
|
80
|
-
| 탭 + 패널 콘텐츠 | CardTab |
|
|
197
|
+
| 탭 영역만 (콘텐츠는 직접 관리) | `Tab` |
|
|
198
|
+
| 탭 + 패널 콘텐츠 | `CardTab` |
|
|
199
|
+
| 탭 상태를 외부에서 제어해야 함 | `Tab` (controlled 전용) 또는 `CardTab` + `activeValue` |
|
|
200
|
+
| 탭 상태를 신경쓰고 싶지 않음 | `CardTab` (`activeValue` 생략) |
|
|
201
|
+
| 세그먼트 컨트롤 느낌 | `Tab` + `type="toggle"` |
|
|
202
|
+
| 현재 위치 경로 | `Breadcrumb` |
|
|
203
|
+
| 페이지 이동 | `Pagination` |
|
|
204
|
+
| 순차 진행 단계 | `Steps` |
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
슬라이더/캐러셀을 표시한다. 드래그, 자동 재생, 루프를 지원하며 controlled/uncontrolled 모두 가능하다.
|
|
4
4
|
|
|
5
5
|
```tsx
|
|
6
|
-
import { Swiper } from "@
|
|
7
|
-
import type { SwiperHandle } from "@
|
|
6
|
+
import { Swiper } from "@x-plat/design-system";
|
|
7
|
+
import type { SwiperHandle } from "@x-plat/design-system";
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
## Props
|