@ceed/ads 1.29.1 → 1.30.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/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +21 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/data-display/Badge.md +39 -71
- package/dist/components/data-display/DataTable.md +1 -1
- package/dist/components/data-display/InfoSign.md +98 -74
- package/dist/components/data-display/Typography.md +97 -363
- package/dist/components/feedback/Dialog.md +62 -76
- package/dist/components/feedback/Modal.md +44 -259
- package/dist/components/feedback/llms.txt +0 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/inputs/Autocomplete.md +107 -356
- package/dist/components/inputs/ButtonGroup.md +106 -115
- package/dist/components/inputs/Calendar.md +459 -98
- 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/FilterMenu.md +19 -169
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -123
- package/dist/components/inputs/IconButton.md +88 -137
- package/dist/components/inputs/Input.md +0 -5
- 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/RadioTileGroup.md +61 -150
- package/dist/components/inputs/SearchBar.md +44 -0
- package/dist/components/inputs/Select.md +326 -222
- package/dist/components/inputs/Switch.md +376 -136
- package/dist/components/inputs/Textarea.md +10 -213
- package/dist/components/inputs/Uploader/Uploader.md +66 -145
- package/dist/components/inputs/llms.txt +1 -3
- package/dist/components/navigation/Breadcrumbs.md +322 -80
- package/dist/components/navigation/Dropdown.md +221 -92
- package/dist/components/navigation/IconMenuButton.md +502 -40
- package/dist/components/navigation/InsetDrawer.md +738 -68
- package/dist/components/navigation/Link.md +298 -39
- 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/ProfileMenu.md +268 -45
- package/dist/components/navigation/Stepper.md +28 -160
- package/dist/components/navigation/Tabs.md +316 -57
- package/dist/components/surfaces/Sheet.md +334 -151
- package/dist/index.browser.js +15 -13
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +289 -288
- package/dist/index.d.ts +1 -1
- package/dist/index.js +426 -369
- package/dist/llms.txt +1 -8
- package/framer/index.js +1 -1
- package/package.json +16 -15
- package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
- 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/Slider.md +0 -334
- package/dist/guides/ThemeProvider.md +0 -116
- package/dist/guides/llms.txt +0 -9
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Sheet
|
|
6
|
-
|
|
7
|
-
Sheet is built on top of Joy UI's Sheet component and inherits all of its styling capabilities, including support for the `sx` prop for custom styling, responsive design tokens, and Framer Motion animation props.
|
|
5
|
+
Sheet는 콘텐츠를 담는 표면(surface) 컴포넌트입니다. 카드, 패널, 대화상자 등 다양한 UI 요소를 만드는 기반이 되며, 시각적으로 콘텐츠를 그룹화하고 구분하는 역할을 합니다. 다양한 variant와 color 조합을 통해 용도에 맞는 스타일을 적용할 수 있습니다.
|
|
8
6
|
|
|
9
7
|
```tsx
|
|
10
8
|
<Sheet {...args} sx={{
|
|
@@ -36,18 +34,58 @@ import { Sheet } from '@ceed/ads';
|
|
|
36
34
|
function MyComponent() {
|
|
37
35
|
return (
|
|
38
36
|
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'md' }}>
|
|
39
|
-
<Typography level="title-md"
|
|
37
|
+
<Typography level="title-md">시트 제목</Typography>
|
|
40
38
|
<Typography level="body-md">
|
|
41
|
-
|
|
39
|
+
시트 안의 콘텐츠가 들어갑니다.
|
|
42
40
|
</Typography>
|
|
43
41
|
</Sheet>
|
|
44
42
|
);
|
|
45
43
|
}
|
|
46
44
|
```
|
|
47
45
|
|
|
48
|
-
##
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Basic Usage
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
가장 기본적인 Sheet 사용법입니다.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<div style={{
|
|
54
|
+
display: 'flex',
|
|
55
|
+
gap: '2rem',
|
|
56
|
+
flexWrap: 'wrap'
|
|
57
|
+
}}>
|
|
58
|
+
<Sheet sx={{
|
|
59
|
+
p: 3,
|
|
60
|
+
maxWidth: 300,
|
|
61
|
+
borderRadius: 'md'
|
|
62
|
+
}}>
|
|
63
|
+
<Typography level="title-md" sx={{
|
|
64
|
+
mb: 1
|
|
65
|
+
}}>
|
|
66
|
+
기본 Sheet
|
|
67
|
+
</Typography>
|
|
68
|
+
<Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
|
|
69
|
+
</Sheet>
|
|
70
|
+
|
|
71
|
+
<Sheet variant="outlined" sx={{
|
|
72
|
+
p: 3,
|
|
73
|
+
maxWidth: 300,
|
|
74
|
+
borderRadius: 'md'
|
|
75
|
+
}}>
|
|
76
|
+
<Typography level="title-md" sx={{
|
|
77
|
+
mb: 1
|
|
78
|
+
}}>
|
|
79
|
+
Outlined Sheet
|
|
80
|
+
</Typography>
|
|
81
|
+
<Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
|
|
82
|
+
</Sheet>
|
|
83
|
+
</div>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Variants
|
|
87
|
+
|
|
88
|
+
다양한 스타일 변형을 제공합니다.
|
|
51
89
|
|
|
52
90
|
```tsx
|
|
53
91
|
<div style={{
|
|
@@ -114,9 +152,9 @@ Plain
|
|
|
114
152
|
</div>
|
|
115
153
|
```
|
|
116
154
|
|
|
117
|
-
|
|
155
|
+
### Colors
|
|
118
156
|
|
|
119
|
-
|
|
157
|
+
다양한 색상을 적용할 수 있습니다.
|
|
120
158
|
|
|
121
159
|
```tsx
|
|
122
160
|
<div style={{
|
|
@@ -161,47 +199,9 @@ Apply semantic colors to communicate meaning -- use `danger` for errors, `succes
|
|
|
161
199
|
</div>
|
|
162
200
|
```
|
|
163
201
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
The simplest form of a Sheet with minimal configuration.
|
|
167
|
-
|
|
168
|
-
```tsx
|
|
169
|
-
<div style={{
|
|
170
|
-
display: 'flex',
|
|
171
|
-
gap: '2rem',
|
|
172
|
-
flexWrap: 'wrap'
|
|
173
|
-
}}>
|
|
174
|
-
<Sheet sx={{
|
|
175
|
-
p: 3,
|
|
176
|
-
maxWidth: 300,
|
|
177
|
-
borderRadius: 'md'
|
|
178
|
-
}}>
|
|
179
|
-
<Typography level="title-md" sx={{
|
|
180
|
-
mb: 1
|
|
181
|
-
}}>
|
|
182
|
-
기본 Sheet
|
|
183
|
-
</Typography>
|
|
184
|
-
<Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
|
|
185
|
-
</Sheet>
|
|
186
|
-
|
|
187
|
-
<Sheet variant="outlined" sx={{
|
|
188
|
-
p: 3,
|
|
189
|
-
maxWidth: 300,
|
|
190
|
-
borderRadius: 'md'
|
|
191
|
-
}}>
|
|
192
|
-
<Typography level="title-md" sx={{
|
|
193
|
-
mb: 1
|
|
194
|
-
}}>
|
|
195
|
-
Outlined Sheet
|
|
196
|
-
</Typography>
|
|
197
|
-
<Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
|
|
198
|
-
</Sheet>
|
|
199
|
-
</div>
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## User Profile Card
|
|
202
|
+
### User Profile Card
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
사용자 프로필을 표시하는 카드 예제입니다.
|
|
205
205
|
|
|
206
206
|
```tsx
|
|
207
207
|
<Sheet variant="outlined" sx={{
|
|
@@ -256,9 +256,9 @@ Sheet can be composed with other components to create rich profile cards.
|
|
|
256
256
|
</Sheet>
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
### Article Card
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
아티클을 표시하는 복잡한 카드 레이아웃 예제입니다.
|
|
262
262
|
|
|
263
263
|
```tsx
|
|
264
264
|
<Sheet variant="outlined" sx={{
|
|
@@ -329,9 +329,9 @@ Combine Sheet with images, chips, and actions for article-style layouts.
|
|
|
329
329
|
</Sheet>
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
|
|
332
|
+
### Notification Panel
|
|
333
333
|
|
|
334
|
-
|
|
334
|
+
알림을 표시하는 패널 예제입니다.
|
|
335
335
|
|
|
336
336
|
```tsx
|
|
337
337
|
<Sheet variant="soft" color="primary" sx={{
|
|
@@ -362,9 +362,9 @@ Use `variant="soft"` with a semantic color to create attention-grabbing notifica
|
|
|
362
362
|
</Sheet>
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
### Stats Cards
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
통계 정보를 표시하는 카드들입니다.
|
|
368
368
|
|
|
369
369
|
```tsx
|
|
370
370
|
<div style={{
|
|
@@ -440,9 +440,9 @@ Multiple Sheet instances arranged side by side make effective dashboard stat wid
|
|
|
440
440
|
</div>
|
|
441
441
|
```
|
|
442
442
|
|
|
443
|
-
|
|
443
|
+
### Form Sheet
|
|
444
444
|
|
|
445
|
-
|
|
445
|
+
폼을 담고 있는 시트 예제입니다.
|
|
446
446
|
|
|
447
447
|
```tsx
|
|
448
448
|
<Sheet variant="outlined" sx={{
|
|
@@ -528,9 +528,9 @@ Wrap form elements inside a Sheet to create visually contained form sections.
|
|
|
528
528
|
</Sheet>
|
|
529
529
|
```
|
|
530
530
|
|
|
531
|
-
|
|
531
|
+
### Nested Sheets
|
|
532
532
|
|
|
533
|
-
|
|
533
|
+
시트 안에 다른 시트들을 중첩한 예제입니다.
|
|
534
534
|
|
|
535
535
|
```tsx
|
|
536
536
|
<Sheet variant="outlined" sx={{
|
|
@@ -585,7 +585,7 @@ Sheets can be nested to create layered dashboard layouts with distinct visual se
|
|
|
585
585
|
<Typography level="title-md">최근 활동</Typography>
|
|
586
586
|
|
|
587
587
|
<Stack spacing={1}>
|
|
588
|
-
{['새로운 사용자가 가입했습니다', '프로젝트가 완료되었습니다', '댓글이 등록되었습니다'].map(activity => <Box key={
|
|
588
|
+
{['새로운 사용자가 가입했습니다', '프로젝트가 완료되었습니다', '댓글이 등록되었습니다'].map((activity, index) => <Box key={index} sx={{
|
|
589
589
|
p: 1.5,
|
|
590
590
|
bgcolor: 'background.body',
|
|
591
591
|
borderRadius: 'sm'
|
|
@@ -599,119 +599,302 @@ Sheets can be nested to create layered dashboard layouts with distinct visual se
|
|
|
599
599
|
</Sheet>
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
+
## Variants
|
|
603
|
+
|
|
604
|
+
Sheet는 4가지 variant를 지원합니다:
|
|
605
|
+
|
|
606
|
+
### solid
|
|
607
|
+
|
|
608
|
+
배경색이 채워진 스타일입니다. 강조가 필요한 콘텐츠에 사용합니다.
|
|
609
|
+
|
|
610
|
+
```tsx
|
|
611
|
+
<Sheet variant="solid" color="primary">
|
|
612
|
+
강조된 콘텐츠
|
|
613
|
+
</Sheet>
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
### soft
|
|
617
|
+
|
|
618
|
+
부드러운 배경색을 가진 스타일입니다. 눈에 띄지만 과하지 않은 강조에 사용합니다.
|
|
619
|
+
|
|
620
|
+
```tsx
|
|
621
|
+
<Sheet variant="soft" color="success">
|
|
622
|
+
부드러운 강조
|
|
623
|
+
</Sheet>
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### outlined
|
|
627
|
+
|
|
628
|
+
테두리가 있는 스타일입니다. 가장 일반적으로 사용되는 카드 스타일입니다.
|
|
629
|
+
|
|
630
|
+
```tsx
|
|
631
|
+
<Sheet variant="outlined">
|
|
632
|
+
기본 카드 스타일
|
|
633
|
+
</Sheet>
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
### plain
|
|
637
|
+
|
|
638
|
+
배경이나 테두리가 없는 평면 스타일입니다. 미니멀한 디자인에 사용합니다.
|
|
639
|
+
|
|
640
|
+
```tsx
|
|
641
|
+
<Sheet variant="plain">
|
|
642
|
+
미니멀한 스타일
|
|
643
|
+
</Sheet>
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
## Colors
|
|
647
|
+
|
|
648
|
+
다양한 색상 테마를 적용할 수 있습니다:
|
|
649
|
+
|
|
650
|
+
- **primary**: 주요 작업이나 중요한 정보
|
|
651
|
+
- **neutral**: 일반적인 콘텐츠 (기본값)
|
|
652
|
+
- **danger**: 오류나 경고 상황
|
|
653
|
+
- **success**: 성공이나 긍정적인 결과
|
|
654
|
+
- **warning**: 주의사항이나 중요한 알림
|
|
655
|
+
|
|
656
|
+
```tsx
|
|
657
|
+
<Sheet color="danger" variant="soft">
|
|
658
|
+
오류 메시지
|
|
659
|
+
</Sheet>
|
|
660
|
+
<Sheet color="success" variant="soft">
|
|
661
|
+
성공 메시지
|
|
662
|
+
</Sheet>
|
|
663
|
+
```
|
|
664
|
+
|
|
602
665
|
## Common Use Cases
|
|
603
666
|
|
|
604
|
-
###
|
|
667
|
+
### Profile Cards
|
|
605
668
|
|
|
606
669
|
```tsx
|
|
607
|
-
|
|
670
|
+
<Sheet variant="outlined" sx={{ maxWidth: 400, borderRadius: 'lg', p: 3 }}>
|
|
671
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
672
|
+
<Avatar size="lg" src="/profile.jpg" />
|
|
673
|
+
<Stack>
|
|
674
|
+
<Typography level="title-lg">사용자 이름</Typography>
|
|
675
|
+
<Typography level="body-sm" color="neutral">직책</Typography>
|
|
676
|
+
</Stack>
|
|
677
|
+
</Stack>
|
|
608
678
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
</Typography>
|
|
619
|
-
<Typography
|
|
620
|
-
level="body-xs"
|
|
621
|
-
sx={{ color: change > 0 ? 'success.600' : 'danger.600' }}
|
|
622
|
-
>
|
|
623
|
-
{change > 0 ? '+' : ''}{change}% from last month
|
|
624
|
-
</Typography>
|
|
625
|
-
</Stack>
|
|
626
|
-
</Sheet>
|
|
627
|
-
);
|
|
628
|
-
}
|
|
679
|
+
<Typography level="body-md" sx={{ mt: 2 }}>
|
|
680
|
+
사용자 소개 텍스트...
|
|
681
|
+
</Typography>
|
|
682
|
+
|
|
683
|
+
<Stack direction="row" spacing={2} sx={{ mt: 3 }}>
|
|
684
|
+
<Button variant="outlined" fullWidth>팔로우</Button>
|
|
685
|
+
<Button fullWidth>메시지</Button>
|
|
686
|
+
</Stack>
|
|
687
|
+
</Sheet>
|
|
629
688
|
```
|
|
630
689
|
|
|
631
|
-
###
|
|
690
|
+
### Dashboard Cards
|
|
632
691
|
|
|
633
692
|
```tsx
|
|
634
|
-
|
|
635
|
-
|
|
693
|
+
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'lg' }}>
|
|
694
|
+
<Typography level="body-sm" color="neutral">
|
|
695
|
+
총 매출
|
|
696
|
+
</Typography>
|
|
697
|
+
<Typography level="h2" color="primary">
|
|
698
|
+
₩1,234,567
|
|
699
|
+
</Typography>
|
|
700
|
+
<Typography level="body-xs" color="success">
|
|
701
|
+
+12% 증가
|
|
702
|
+
</Typography>
|
|
703
|
+
</Sheet>
|
|
704
|
+
```
|
|
636
705
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
</
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
706
|
+
### Content Cards
|
|
707
|
+
|
|
708
|
+
```tsx
|
|
709
|
+
<Sheet variant="outlined" sx={{ borderRadius: 'lg', overflow: 'hidden' }}>
|
|
710
|
+
<Box sx={{ height: 200, bgcolor: 'primary.100' }}>
|
|
711
|
+
{/* 이미지나 미디어 콘텐츠 */}
|
|
712
|
+
</Box>
|
|
713
|
+
|
|
714
|
+
<Stack spacing={2} sx={{ p: 3 }}>
|
|
715
|
+
<Typography level="title-lg">콘텐츠 제목</Typography>
|
|
716
|
+
<Typography level="body-md">콘텐츠 설명...</Typography>
|
|
717
|
+
|
|
718
|
+
<Stack direction="row" justifyContent="space-between">
|
|
719
|
+
<Typography level="body-sm" color="neutral">
|
|
720
|
+
2024.01.15
|
|
721
|
+
</Typography>
|
|
722
|
+
<Button size="sm">더 보기</Button>
|
|
723
|
+
</Stack>
|
|
724
|
+
</Stack>
|
|
725
|
+
</Sheet>
|
|
656
726
|
```
|
|
657
727
|
|
|
658
|
-
###
|
|
728
|
+
### Form Containers
|
|
659
729
|
|
|
660
730
|
```tsx
|
|
661
|
-
|
|
731
|
+
<Sheet variant="outlined" sx={{ maxWidth: 500, borderRadius: 'lg', p: 4 }}>
|
|
732
|
+
<Typography level="title-lg" sx={{ mb: 3 }}>
|
|
733
|
+
로그인
|
|
734
|
+
</Typography>
|
|
662
735
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
736
|
+
<Stack spacing={2}>
|
|
737
|
+
<FormControl>
|
|
738
|
+
<FormLabel>이메일</FormLabel>
|
|
739
|
+
<Input type="email" />
|
|
740
|
+
</FormControl>
|
|
741
|
+
|
|
742
|
+
<FormControl>
|
|
743
|
+
<FormLabel>비밀번호</FormLabel>
|
|
744
|
+
<Input type="password" />
|
|
745
|
+
</FormControl>
|
|
746
|
+
|
|
747
|
+
<Button fullWidth>로그인</Button>
|
|
748
|
+
</Stack>
|
|
749
|
+
</Sheet>
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
### Modal Content
|
|
753
|
+
|
|
754
|
+
```tsx
|
|
755
|
+
<Sheet
|
|
756
|
+
variant="outlined"
|
|
757
|
+
sx={{
|
|
758
|
+
position: 'fixed',
|
|
759
|
+
top: '50%',
|
|
760
|
+
left: '50%',
|
|
761
|
+
transform: 'translate(-50%, -50%)',
|
|
762
|
+
borderRadius: 'lg',
|
|
763
|
+
p: 4,
|
|
764
|
+
maxWidth: 400,
|
|
765
|
+
boxShadow: 'lg',
|
|
766
|
+
}}
|
|
767
|
+
>
|
|
768
|
+
<Typography level="title-lg" sx={{ mb: 2 }}>
|
|
769
|
+
확인 필요
|
|
770
|
+
</Typography>
|
|
771
|
+
<Typography level="body-md" sx={{ mb: 3 }}>
|
|
772
|
+
정말로 이 작업을 수행하시겠습니까?
|
|
773
|
+
</Typography>
|
|
774
|
+
|
|
775
|
+
<Stack direction="row" spacing={2} justifyContent="flex-end">
|
|
776
|
+
<Button variant="outlined">취소</Button>
|
|
777
|
+
<Button color="danger">삭제</Button>
|
|
778
|
+
</Stack>
|
|
779
|
+
</Sheet>
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
### Notification Banners
|
|
783
|
+
|
|
784
|
+
```tsx
|
|
785
|
+
<Sheet
|
|
786
|
+
variant="soft"
|
|
787
|
+
color="warning"
|
|
788
|
+
sx={{ borderRadius: 'md', p: 2 }}
|
|
789
|
+
>
|
|
790
|
+
<Stack direction="row" alignItems="center" spacing={2}>
|
|
791
|
+
<WarningIcon />
|
|
792
|
+
<Typography level="body-md">
|
|
793
|
+
시스템 점검이 예정되어 있습니다.
|
|
794
|
+
</Typography>
|
|
795
|
+
<Button size="sm" variant="plain">
|
|
796
|
+
자세히 보기
|
|
797
|
+
</Button>
|
|
798
|
+
</Stack>
|
|
799
|
+
</Sheet>
|
|
686
800
|
```
|
|
687
801
|
|
|
688
802
|
## Best Practices
|
|
689
803
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
804
|
+
1. **적절한 패딩**: 콘텐츠 양에 따라 적절한 패딩을 설정하세요.
|
|
805
|
+
```tsx
|
|
806
|
+
<Sheet sx={{ p: { xs: 2, sm: 3, md: 4 } }}>
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
2. **의미있는 변형 선택**:
|
|
810
|
+
- `outlined`: 일반적인 카드나 패널
|
|
811
|
+
- `soft`: 부드러운 강조나 구분
|
|
812
|
+
- `solid`: 강한 강조나 액션
|
|
813
|
+
- `plain`: 미니멀하거나 중첩된 콘텐츠
|
|
814
|
+
|
|
815
|
+
3. **색상의 의미 활용**:
|
|
816
|
+
- `danger`: 오류, 삭제 등 위험한 작업
|
|
817
|
+
- `success`: 성공 메시지, 완료 상태
|
|
818
|
+
- `warning`: 주의사항, 중요 알림
|
|
819
|
+
- `primary`: 주요 액션, 강조 콘텐츠
|
|
820
|
+
- `neutral`: 일반 콘텐츠
|
|
821
|
+
|
|
822
|
+
4. **반응형 고려**:
|
|
823
|
+
```tsx
|
|
824
|
+
<Sheet sx={{
|
|
825
|
+
maxWidth: { xs: '100%', sm: 400 },
|
|
826
|
+
borderRadius: { xs: 0, sm: 'lg' },
|
|
827
|
+
p: { xs: 2, sm: 3 }
|
|
828
|
+
}}>
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
5. **접근성**:
|
|
832
|
+
- 적절한 시맨틱 태그와 함께 사용하세요
|
|
833
|
+
- 충분한 색상 대비를 유지하세요
|
|
834
|
+
- 키보드 탐색을 고려하세요
|
|
835
|
+
|
|
836
|
+
6. **성능**:
|
|
837
|
+
- 그림자나 복잡한 스타일은 필요할 때만 사용하세요
|
|
838
|
+
- 많은 카드가 있을 때는 가상화를 고려하세요
|
|
839
|
+
|
|
840
|
+
7. **일관성**:
|
|
841
|
+
- 프로젝트 전반에서 일관된 borderRadius와 spacing을 사용하세요
|
|
842
|
+
- 비슷한 콘텐츠에는 동일한 variant를 사용하세요
|
|
843
|
+
|
|
844
|
+
## Advanced Usage
|
|
845
|
+
|
|
846
|
+
### Custom Styling
|
|
695
847
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
848
|
+
```tsx
|
|
849
|
+
<Sheet
|
|
850
|
+
sx={{
|
|
851
|
+
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
|
|
852
|
+
border: 0,
|
|
853
|
+
borderRadius: 3,
|
|
854
|
+
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
|
|
855
|
+
color: 'white',
|
|
856
|
+
p: 3,
|
|
857
|
+
}}
|
|
858
|
+
>
|
|
859
|
+
커스텀 스타일링
|
|
860
|
+
</Sheet>
|
|
861
|
+
```
|
|
702
862
|
|
|
703
|
-
|
|
704
|
-
- Use the `sx` prop with design tokens (`p: 3`, `borderRadius: 'lg'`) rather than arbitrary pixel values to keep layouts consistent across the application.
|
|
863
|
+
### Interactive States
|
|
705
864
|
|
|
706
|
-
|
|
707
|
-
|
|
865
|
+
```tsx
|
|
866
|
+
<Sheet
|
|
867
|
+
variant="outlined"
|
|
868
|
+
sx={{
|
|
869
|
+
cursor: 'pointer',
|
|
870
|
+
transition: 'all 0.2s',
|
|
871
|
+
'&:hover': {
|
|
872
|
+
boxShadow: 'md',
|
|
873
|
+
transform: 'translateY(-2px)',
|
|
874
|
+
},
|
|
875
|
+
'&:active': {
|
|
876
|
+
transform: 'translateY(0)',
|
|
877
|
+
},
|
|
878
|
+
}}
|
|
879
|
+
onClick={() => console.log('clicked')}
|
|
880
|
+
>
|
|
881
|
+
클릭 가능한 카드
|
|
882
|
+
</Sheet>
|
|
883
|
+
```
|
|
708
884
|
|
|
709
|
-
|
|
710
|
-
- Sheet is intentionally a low-level primitive. Compose it with Typography, Stack, Button, and other components rather than overloading the Sheet with custom styling.
|
|
885
|
+
### With Animation (Framer Motion)
|
|
711
886
|
|
|
712
|
-
|
|
887
|
+
```tsx
|
|
888
|
+
<Sheet
|
|
889
|
+
initial={{ opacity: 0, y: 20 }}
|
|
890
|
+
animate={{ opacity: 1, y: 0 }}
|
|
891
|
+
transition={{ duration: 0.3 }}
|
|
892
|
+
whileHover={{ scale: 1.02 }}
|
|
893
|
+
variant="outlined"
|
|
894
|
+
sx={{ p: 3 }}
|
|
895
|
+
>
|
|
896
|
+
애니메이션 카드
|
|
897
|
+
</Sheet>
|
|
898
|
+
```
|
|
713
899
|
|
|
714
|
-
|
|
715
|
-
- When a Sheet is interactive (clickable), ensure it has a proper `role` attribute (e.g., `role="button"`) and supports keyboard interaction via `tabIndex` and `onKeyDown`.
|
|
716
|
-
- Maintain sufficient color contrast between the Sheet background and its text content, especially when using `variant="solid"` with colored backgrounds.
|
|
717
|
-
- Avoid relying solely on color to convey information. Pair color indicators with icons or text labels for users with color vision deficiencies.
|
|
900
|
+
Sheet는 유연하고 강력한 표면 컴포넌트로, 다양한 UI 패턴을 구현하는 기초가 됩니다. 적절한 variant와 색상 조합을 통해 일관성 있고 아름다운 인터페이스를 만들 수 있습니다.
|