@ceed/cds 1.28.1 → 1.29.0-next.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/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
- package/dist/components/SearchBar/SearchBar.d.ts +21 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/data-display/DataTable.md +1 -1
- package/dist/components/data-display/InfoSign.md +91 -74
- package/dist/components/data-display/Typography.md +94 -411
- package/dist/components/feedback/Dialog.md +62 -76
- package/dist/components/feedback/Modal.md +138 -430
- package/dist/components/feedback/llms.txt +0 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/inputs/Autocomplete.md +107 -356
- package/dist/components/inputs/ButtonGroup.md +104 -115
- package/dist/components/inputs/CurrencyInput.md +5 -183
- package/dist/components/inputs/DatePicker.md +431 -108
- package/dist/components/inputs/DateRangePicker.md +492 -131
- package/dist/components/inputs/FilterableCheckboxGroup.md +19 -145
- package/dist/components/inputs/IconButton.md +88 -137
- package/dist/components/inputs/Input.md +73 -204
- package/dist/components/inputs/MonthPicker.md +422 -95
- package/dist/components/inputs/MonthRangePicker.md +466 -89
- package/dist/components/inputs/PercentageInput.md +16 -185
- package/dist/components/inputs/RadioButton.md +35 -163
- package/dist/components/inputs/SearchBar.md +44 -0
- package/dist/components/inputs/Select.md +326 -222
- package/dist/components/inputs/Switch.md +376 -143
- package/dist/components/inputs/Textarea.md +10 -213
- package/dist/components/inputs/Uploader/Uploader.md +66 -145
- package/dist/components/inputs/llms.txt +1 -4
- package/dist/components/navigation/Breadcrumbs.md +308 -57
- package/dist/components/navigation/Drawer.md +0 -180
- package/dist/components/navigation/Dropdown.md +215 -98
- package/dist/components/navigation/IconMenuButton.md +502 -40
- package/dist/components/navigation/InsetDrawer.md +650 -281
- package/dist/components/navigation/Link.md +348 -31
- package/dist/components/navigation/Menu.md +285 -92
- package/dist/components/navigation/MenuButton.md +448 -55
- package/dist/components/navigation/Pagination.md +338 -47
- package/dist/components/navigation/Stepper.md +28 -160
- package/dist/components/navigation/Tabs.md +316 -57
- package/dist/components/surfaces/Accordions.md +804 -49
- package/dist/components/surfaces/Card.md +157 -97
- package/dist/components/surfaces/Divider.md +234 -83
- package/dist/components/surfaces/Sheet.md +328 -153
- package/dist/index.cjs +411 -574
- package/dist/index.d.ts +1 -1
- package/dist/index.js +400 -507
- package/dist/llms.txt +1 -9
- package/framer/index.js +1 -1
- package/package.json +17 -22
- package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
- package/dist/components/RadioTileGroup/RadioTileGroup.d.ts +0 -56
- package/dist/components/RadioTileGroup/index.d.ts +0 -3
- package/dist/components/feedback/CircularProgress.md +0 -257
- package/dist/components/feedback/Skeleton.md +0 -280
- package/dist/components/inputs/FormControl.md +0 -361
- package/dist/components/inputs/RadioList.md +0 -241
- package/dist/components/inputs/RadioTileGroup.md +0 -507
- package/dist/components/inputs/Slider.md +0 -334
- package/dist/guides/ThemeProvider.md +0 -89
- package/dist/guides/llms.txt +0 -9
- package/dist/index.browser.js +0 -224
- package/dist/index.browser.js.map +0 -7
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Card
|
|
6
|
-
|
|
7
|
-
The Card component is composed of several sub-components -- `CardContent`, `CardActions`, `CardCover`, and `CardOverflow` -- that work together to create rich, flexible layouts. It supports multiple variants, colors, and sizes for full visual customization.
|
|
5
|
+
Card 컴포넌트는 관련된 내용과 액션을 하나의 컨테이너로 묶어서 표시하는 UI 요소입니다. 정보를 구조화하고 시각적으로 그룹화하여 사용자가 쉽게 스캔하고 이해할 수 있도록 도와줍니다. 뉴스피드, 제품 목록, 사용자 프로필, 대시보드 위젯 등 다양한 용도로 사용됩니다.
|
|
8
6
|
|
|
9
7
|
```tsx
|
|
10
8
|
<Card {...args} sx={{
|
|
@@ -26,26 +24,25 @@ The Card component is composed of several sub-components -- `CardContent`, `Card
|
|
|
26
24
|
## Usage
|
|
27
25
|
|
|
28
26
|
```tsx
|
|
29
|
-
import { Card, CardContent, CardActions,
|
|
27
|
+
import { Card, CardContent, CardActions, CardCover, CardOverflow } from '@ceed/cds';
|
|
30
28
|
|
|
31
29
|
function MyComponent() {
|
|
32
30
|
return (
|
|
33
31
|
<Card sx={{ maxWidth: 320 }}>
|
|
34
32
|
<CardContent>
|
|
35
|
-
<Typography level="title-lg"
|
|
36
|
-
<Typography level="body-md"
|
|
33
|
+
<Typography level="title-lg">카드 제목</Typography>
|
|
34
|
+
<Typography level="body-md">카드의 내용이 들어갑니다.</Typography>
|
|
37
35
|
</CardContent>
|
|
38
|
-
<CardActions>
|
|
39
|
-
<Button size="sm">Action</Button>
|
|
40
|
-
</CardActions>
|
|
41
36
|
</Card>
|
|
42
37
|
);
|
|
43
38
|
}
|
|
44
39
|
```
|
|
45
40
|
|
|
46
|
-
##
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
### Basic Usage
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
가장 기본적인 카드 사용법입니다.
|
|
49
46
|
|
|
50
47
|
```tsx
|
|
51
48
|
<div style={{
|
|
@@ -66,9 +63,9 @@ The simplest form of a Card with a title and description inside CardContent.
|
|
|
66
63
|
</div>
|
|
67
64
|
```
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
### Variants
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
다양한 스타일 변형을 제공합니다.
|
|
72
69
|
|
|
73
70
|
```tsx
|
|
74
71
|
<div style={{
|
|
@@ -114,9 +111,9 @@ Four style variants -- `solid`, `soft`, `outlined`, and `plain` -- allow you to
|
|
|
114
111
|
</div>
|
|
115
112
|
```
|
|
116
113
|
|
|
117
|
-
|
|
114
|
+
### Colors
|
|
118
115
|
|
|
119
|
-
|
|
116
|
+
다양한 색상을 적용할 수 있습니다.
|
|
120
117
|
|
|
121
118
|
```tsx
|
|
122
119
|
<div style={{
|
|
@@ -171,9 +168,9 @@ Apply semantic colors to convey meaning: `primary`, `neutral`, `danger`, `succes
|
|
|
171
168
|
</div>
|
|
172
169
|
```
|
|
173
170
|
|
|
174
|
-
|
|
171
|
+
### Sizes
|
|
175
172
|
|
|
176
|
-
|
|
173
|
+
크기를 조절할 수 있습니다.
|
|
177
174
|
|
|
178
175
|
```tsx
|
|
179
176
|
<div style={{
|
|
@@ -211,9 +208,9 @@ Three sizes are available: `sm`, `md`, and `lg`. The size affects internal paddi
|
|
|
211
208
|
</div>
|
|
212
209
|
```
|
|
213
210
|
|
|
214
|
-
|
|
211
|
+
### With Cover
|
|
215
212
|
|
|
216
|
-
|
|
213
|
+
이미지를 배경으로 사용할 수 있는 CardCover 컴포넌트를 활용한 카드입니다.
|
|
217
214
|
|
|
218
215
|
```tsx
|
|
219
216
|
<div style={{
|
|
@@ -257,9 +254,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
|
|
|
257
254
|
</div>
|
|
258
255
|
```
|
|
259
256
|
|
|
260
|
-
|
|
257
|
+
### With Actions
|
|
261
258
|
|
|
262
|
-
|
|
259
|
+
하단에 액션 버튼들을 배치할 수 있습니다.
|
|
263
260
|
|
|
264
261
|
```tsx
|
|
265
262
|
<div style={{
|
|
@@ -308,9 +305,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
|
|
|
308
305
|
</div>
|
|
309
306
|
```
|
|
310
307
|
|
|
311
|
-
|
|
308
|
+
### With Overflow
|
|
312
309
|
|
|
313
|
-
|
|
310
|
+
CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표시할 수 있습니다.
|
|
314
311
|
|
|
315
312
|
```tsx
|
|
316
313
|
<div style={{
|
|
@@ -445,9 +442,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
|
|
|
445
442
|
</div>
|
|
446
443
|
```
|
|
447
444
|
|
|
448
|
-
|
|
445
|
+
### Interactive Cards
|
|
449
446
|
|
|
450
|
-
|
|
447
|
+
클릭 가능하고 호버 효과가 있는 인터랙티브한 카드들입니다.
|
|
451
448
|
|
|
452
449
|
```tsx
|
|
453
450
|
<div style={{
|
|
@@ -485,9 +482,9 @@ Add hover effects and click handlers to create cards that respond to user intera
|
|
|
485
482
|
</div>
|
|
486
483
|
```
|
|
487
484
|
|
|
488
|
-
|
|
485
|
+
### Media Cards
|
|
489
486
|
|
|
490
|
-
|
|
487
|
+
이미지와 함께 사용하는 미디어 카드들입니다.
|
|
491
488
|
|
|
492
489
|
```tsx
|
|
493
490
|
<div style={{
|
|
@@ -562,9 +559,9 @@ Combine `CardOverflow` with `AspectRatio` to create product or media cards with
|
|
|
562
559
|
</div>
|
|
563
560
|
```
|
|
564
561
|
|
|
565
|
-
|
|
562
|
+
### Complex Layout
|
|
566
563
|
|
|
567
|
-
|
|
564
|
+
복잡한 레이아웃을 가진 소셜 미디어 스타일 카드입니다.
|
|
568
565
|
|
|
569
566
|
```tsx
|
|
570
567
|
<div style={{
|
|
@@ -632,95 +629,158 @@ Compose multiple sub-components together to build rich, social-media-style card
|
|
|
632
629
|
</div>
|
|
633
630
|
```
|
|
634
631
|
|
|
635
|
-
##
|
|
632
|
+
## Card Components
|
|
633
|
+
|
|
634
|
+
Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
635
|
+
|
|
636
|
+
### Card
|
|
636
637
|
|
|
637
|
-
|
|
638
|
+
메인 카드 컨테이너입니다.
|
|
638
639
|
|
|
639
640
|
```tsx
|
|
640
|
-
|
|
641
|
+
<Card variant="outlined" color="neutral" size="md">
|
|
642
|
+
{/* 카드 내용 */}
|
|
643
|
+
</Card>
|
|
644
|
+
```
|
|
641
645
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
<Typography level="title-lg">{name}</Typography>
|
|
652
|
-
<Typography level="body-md">{description}</Typography>
|
|
653
|
-
<Typography level="title-lg" color="primary">
|
|
654
|
-
{price}
|
|
655
|
-
</Typography>
|
|
656
|
-
</CardContent>
|
|
657
|
-
<CardActions>
|
|
658
|
-
<Button variant="solid" fullWidth>
|
|
659
|
-
Add to Cart
|
|
660
|
-
</Button>
|
|
661
|
-
</CardActions>
|
|
662
|
-
</Card>
|
|
663
|
-
);
|
|
664
|
-
}
|
|
646
|
+
### CardContent
|
|
647
|
+
|
|
648
|
+
카드의 주요 내용을 담는 영역입니다.
|
|
649
|
+
|
|
650
|
+
```tsx
|
|
651
|
+
<CardContent>
|
|
652
|
+
<Typography level="title-lg">제목</Typography>
|
|
653
|
+
<Typography level="body-md">내용</Typography>
|
|
654
|
+
</CardContent>
|
|
665
655
|
```
|
|
666
656
|
|
|
667
|
-
###
|
|
657
|
+
### CardCover
|
|
658
|
+
|
|
659
|
+
카드 전체를 덮는 배경 이미지나 미디어를 표시합니다.
|
|
668
660
|
|
|
669
661
|
```tsx
|
|
670
|
-
|
|
662
|
+
<CardCover>
|
|
663
|
+
<img src="image.jpg" alt="Cover" />
|
|
664
|
+
</CardCover>
|
|
665
|
+
```
|
|
671
666
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
<Button size="sm" variant="soft">Follow</Button>
|
|
682
|
-
<Button size="sm" variant="solid">Message</Button>
|
|
683
|
-
</CardActions>
|
|
684
|
-
</Card>
|
|
685
|
-
);
|
|
686
|
-
}
|
|
667
|
+
### CardActions
|
|
668
|
+
|
|
669
|
+
액션 버튼들을 배치하는 영역입니다.
|
|
670
|
+
|
|
671
|
+
```tsx
|
|
672
|
+
<CardActions>
|
|
673
|
+
<Button>확인</Button>
|
|
674
|
+
<Button>취소</Button>
|
|
675
|
+
</CardActions>
|
|
687
676
|
```
|
|
688
677
|
|
|
689
|
-
###
|
|
678
|
+
### CardOverflow
|
|
679
|
+
|
|
680
|
+
카드의 패딩을 무시하고 전체 너비를 사용하는 영역입니다.
|
|
690
681
|
|
|
691
682
|
```tsx
|
|
692
|
-
|
|
683
|
+
<CardOverflow>
|
|
684
|
+
<AspectRatio ratio="3/4">
|
|
685
|
+
<img src="full-width-image.jpg" alt="Full width" />
|
|
686
|
+
</AspectRatio>
|
|
687
|
+
</CardOverflow>
|
|
688
|
+
```
|
|
693
689
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
690
|
+
## Common Use Cases
|
|
691
|
+
|
|
692
|
+
### Product Cards
|
|
693
|
+
|
|
694
|
+
```tsx
|
|
695
|
+
<Card sx={{ maxWidth: 320 }}>
|
|
696
|
+
<CardOverflow>
|
|
697
|
+
<AspectRatio ratio="1">
|
|
698
|
+
<img src="product.jpg" alt="Product" />
|
|
699
|
+
</AspectRatio>
|
|
700
|
+
</CardOverflow>
|
|
701
|
+
<CardContent>
|
|
702
|
+
<Typography level="title-lg">제품명</Typography>
|
|
703
|
+
<Typography level="body-md">제품 설명</Typography>
|
|
704
|
+
<Typography level="title-lg" color="primary">
|
|
705
|
+
₩199,000
|
|
706
|
+
</Typography>
|
|
707
|
+
</CardContent>
|
|
708
|
+
<CardActions>
|
|
709
|
+
<Button variant="solid" fullWidth>
|
|
710
|
+
구매하기
|
|
711
|
+
</Button>
|
|
712
|
+
</CardActions>
|
|
713
|
+
</Card>
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### User Profile Cards
|
|
717
|
+
|
|
718
|
+
```tsx
|
|
719
|
+
<Card sx={{ maxWidth: 320 }}>
|
|
720
|
+
<CardContent sx={{ alignItems: 'center', textAlign: 'center' }}>
|
|
721
|
+
<Avatar size="lg" src="profile.jpg" />
|
|
722
|
+
<Typography level="title-lg">사용자 이름</Typography>
|
|
723
|
+
<Typography level="body-sm">직책</Typography>
|
|
724
|
+
</CardContent>
|
|
725
|
+
<CardActions>
|
|
726
|
+
<Button size="sm" variant="soft">
|
|
727
|
+
팔로우
|
|
728
|
+
</Button>
|
|
729
|
+
<Button size="sm" variant="solid">
|
|
730
|
+
메시지
|
|
731
|
+
</Button>
|
|
732
|
+
</CardActions>
|
|
733
|
+
</Card>
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
### News Cards
|
|
737
|
+
|
|
738
|
+
```tsx
|
|
739
|
+
<Card sx={{ maxWidth: 400 }}>
|
|
740
|
+
<CardOverflow>
|
|
741
|
+
<AspectRatio ratio="3/2">
|
|
742
|
+
<img src="news.jpg" alt="News" />
|
|
743
|
+
</AspectRatio>
|
|
744
|
+
</CardOverflow>
|
|
745
|
+
<CardContent>
|
|
746
|
+
<Typography level="body-xs" color="neutral">
|
|
747
|
+
뉴스 · 2시간 전
|
|
748
|
+
</Typography>
|
|
749
|
+
<Typography level="title-md">뉴스 제목</Typography>
|
|
750
|
+
<Typography level="body-sm">뉴스 요약...</Typography>
|
|
751
|
+
</CardContent>
|
|
752
|
+
</Card>
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
### Dashboard Widget Cards
|
|
756
|
+
|
|
757
|
+
```tsx
|
|
758
|
+
<Card variant="soft" color="primary">
|
|
759
|
+
<CardContent>
|
|
760
|
+
<Typography level="body-sm">총 사용자</Typography>
|
|
761
|
+
<Typography level="h2">1,234</Typography>
|
|
762
|
+
<Typography level="body-xs">+12% from last month</Typography>
|
|
763
|
+
</CardContent>
|
|
764
|
+
</Card>
|
|
705
765
|
```
|
|
706
766
|
|
|
707
767
|
## Best Practices
|
|
708
768
|
|
|
709
|
-
|
|
769
|
+
1. **적절한 크기**: 카드의 내용에 맞는 적절한 크기를 설정하세요. 너무 크거나 작으면 가독성이 떨어집니다.
|
|
770
|
+
|
|
771
|
+
2. **일관된 스타일**: 같은 맥락에서 사용되는 카드들은 일관된 variant, color, size를 사용하세요.
|
|
710
772
|
|
|
711
|
-
|
|
773
|
+
3. **명확한 계층구조**: Typography의 level을 활용하여 정보의 중요도에 따른 시각적 계층을 만드세요.
|
|
712
774
|
|
|
713
|
-
|
|
714
|
-
- ✔ `alt="Red running shoes, side view"`
|
|
715
|
-
- ✘ `alt="image"` or missing alt
|
|
775
|
+
4. **적절한 간격**: 여러 카드를 나열할 때는 적절한 간격을 두어 각각을 구분할 수 있게 하세요.
|
|
716
776
|
|
|
717
|
-
|
|
777
|
+
5. **접근성 고려**:
|
|
778
|
+
- 카드가 클릭 가능한 경우 키보드 탐색을 지원하세요
|
|
779
|
+
- 이미지에는 적절한 alt 텍스트를 제공하세요
|
|
780
|
+
- 색상만으로 정보를 전달하지 마세요
|
|
718
781
|
|
|
719
|
-
|
|
782
|
+
6. **반응형 디자인**: 다양한 화면 크기에서 잘 작동하도록 maxWidth나 responsive 속성을 활용하세요.
|
|
720
783
|
|
|
721
|
-
|
|
784
|
+
7. **로딩 상태**: 데이터를 불러오는 동안에는 Skeleton 컴포넌트를 활용하여 로딩 상태를 표시하세요.
|
|
722
785
|
|
|
723
|
-
|
|
724
|
-
- Provide meaningful `alt` text for all images. Decorative images should use `alt=""` to be skipped by screen readers.
|
|
725
|
-
- Use proper heading levels inside cards (`level="title-lg"`, `level="title-md"`) to maintain the document's heading hierarchy.
|
|
726
|
-
- Ensure sufficient color contrast between card backgrounds and text, especially when using `variant="solid"` with colored themes.
|
|
786
|
+
8. **액션 버튼**: CardActions에는 카드와 직접 관련된 주요 액션만 포함하세요. 너무 많은 버튼은 혼란을 야기할 수 있습니다.
|