@ceed/ads 1.13.4 → 1.15.0-next.2
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/Overview.md +11 -0
- package/dist/components/Menu/Menu.d.ts +2 -5
- package/dist/components/Stepper/Stepper.d.ts +6 -0
- package/dist/components/data-display/Avatar.md +428 -0
- package/dist/components/data-display/Badge.md +315 -0
- package/dist/components/data-display/Chip.md +301 -0
- package/dist/components/data-display/DataTable.md +452 -0
- package/dist/components/data-display/InfoSign.md +160 -0
- package/dist/components/data-display/Markdown.md +17 -0
- package/dist/components/data-display/Table.md +1330 -0
- package/dist/components/data-display/Tooltip.md +444 -0
- package/dist/components/data-display/Typography.md +271 -0
- package/dist/components/data-display/llms.txt +17 -0
- package/dist/components/feedback/Alert.md +663 -0
- package/dist/components/feedback/Dialog.md +33 -0
- package/dist/components/feedback/Modal.md +39 -0
- package/dist/components/feedback/llms.txt +11 -0
- package/dist/components/inputs/Autocomplete.md +103 -0
- package/dist/components/inputs/Button.md +334 -0
- package/dist/components/inputs/ButtonGroup.md +382 -0
- package/dist/components/inputs/Calendar.md +19 -0
- package/dist/components/inputs/Checkbox.md +649 -0
- package/dist/components/inputs/CurrencyInput.md +91 -0
- package/dist/components/inputs/DatePicker.md +67 -0
- package/dist/components/inputs/DateRangePicker.md +55 -0
- package/dist/components/inputs/FilterMenu.md +210 -0
- package/dist/components/inputs/IconButton.md +361 -0
- package/dist/components/inputs/Input.md +283 -0
- package/dist/components/inputs/MonthPicker.md +72 -0
- package/dist/components/inputs/MonthRangePicker.md +70 -0
- package/dist/components/inputs/PercentageInput.md +116 -0
- package/dist/components/inputs/RadioButton.md +350 -0
- package/dist/components/inputs/RadioTileGroup.md +418 -0
- package/dist/components/inputs/Select.md +56 -0
- package/dist/components/inputs/Switch.md +577 -0
- package/dist/components/inputs/Textarea.md +64 -0
- package/dist/components/inputs/Uploader/Uploader.md +238 -0
- package/dist/components/inputs/Uploader/llms.txt +9 -0
- package/dist/components/inputs/llms.txt +31 -0
- package/dist/components/layout/Box.md +997 -0
- package/dist/components/layout/Container.md +23 -0
- package/dist/components/layout/Grid.md +728 -0
- package/dist/components/layout/Stack.md +937 -0
- package/dist/components/layout/llms.txt +12 -0
- package/dist/components/llms.txt +14 -0
- package/dist/components/navigation/Breadcrumbs.md +51 -0
- package/dist/components/navigation/Dropdown.md +768 -0
- package/dist/components/navigation/IconMenuButton.md +35 -0
- package/dist/components/navigation/InsetDrawer.md +133 -0
- package/dist/components/navigation/Link.md +24 -0
- package/dist/components/navigation/Menu.md +957 -0
- package/dist/components/navigation/MenuButton.md +39 -0
- package/dist/components/navigation/NavigationGroup.md +17 -0
- package/dist/components/navigation/NavigationItem.md +17 -0
- package/dist/components/navigation/Navigator.md +17 -0
- package/dist/components/navigation/Pagination.md +17 -0
- package/dist/components/navigation/ProfileMenu.md +34 -0
- package/dist/components/navigation/Stepper.md +108 -0
- package/dist/components/navigation/Tabs.md +34 -0
- package/dist/components/navigation/llms.txt +22 -0
- package/dist/components/surfaces/Accordions.md +96 -0
- package/dist/components/surfaces/Card.md +786 -0
- package/dist/components/surfaces/Divider.md +762 -0
- package/dist/components/surfaces/Sheet.md +900 -0
- package/dist/components/surfaces/llms.txt +12 -0
- package/dist/index.cjs +22 -10
- package/dist/index.js +22 -10
- package/dist/llms.txt +75 -0
- package/framer/index.js +36 -36
- package/package.json +8 -4
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
# Sheet
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
Sheet는 콘텐츠를 담는 표면(surface) 컴포넌트입니다. 카드, 패널, 대화상자 등 다양한 UI 요소를 만드는 기반이 되며, 시각적으로 콘텐츠를 그룹화하고 구분하는 역할을 합니다. 다양한 variant와 color 조합을 통해 용도에 맞는 스타일을 적용할 수 있습니다.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
<Sheet {...args} sx={{
|
|
9
|
+
p: 3,
|
|
10
|
+
maxWidth: 400,
|
|
11
|
+
borderRadius: 'md'
|
|
12
|
+
}}>
|
|
13
|
+
<Typography level="title-md" sx={{
|
|
14
|
+
mb: 2
|
|
15
|
+
}}>
|
|
16
|
+
Sheet 컴포넌트
|
|
17
|
+
</Typography>
|
|
18
|
+
<Typography level="body-md">
|
|
19
|
+
이것은 Sheet 컴포넌트의 기본 예제입니다. 다양한 콘텐츠를 담을 수 있는 표면을 제공합니다.
|
|
20
|
+
</Typography>
|
|
21
|
+
</Sheet>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Field | Description | Default |
|
|
25
|
+
| ------- | ----------- | ---------- |
|
|
26
|
+
| variant | 시트 스타일 변형 | "outlined" |
|
|
27
|
+
| color | 시트 색상 | "neutral" |
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Sheet } from '@ceed/ads';
|
|
33
|
+
|
|
34
|
+
function MyComponent() {
|
|
35
|
+
return (
|
|
36
|
+
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'md' }}>
|
|
37
|
+
<Typography level="title-md">시트 제목</Typography>
|
|
38
|
+
<Typography level="body-md">
|
|
39
|
+
시트 안의 콘텐츠가 들어갑니다.
|
|
40
|
+
</Typography>
|
|
41
|
+
</Sheet>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Basic Usage
|
|
49
|
+
|
|
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
|
+
다양한 스타일 변형을 제공합니다.
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
<div style={{
|
|
92
|
+
display: 'flex',
|
|
93
|
+
gap: '2rem',
|
|
94
|
+
flexWrap: 'wrap'
|
|
95
|
+
}}>
|
|
96
|
+
<Sheet variant="solid" sx={{
|
|
97
|
+
p: 3,
|
|
98
|
+
maxWidth: 250,
|
|
99
|
+
borderRadius: 'md'
|
|
100
|
+
}}>
|
|
101
|
+
<Typography level="title-md" sx={{
|
|
102
|
+
mb: 1,
|
|
103
|
+
color: 'white'
|
|
104
|
+
}}>
|
|
105
|
+
Solid
|
|
106
|
+
</Typography>
|
|
107
|
+
<Typography level="body-sm" sx={{
|
|
108
|
+
color: 'white'
|
|
109
|
+
}}>
|
|
110
|
+
배경이 채워진 스타일
|
|
111
|
+
</Typography>
|
|
112
|
+
</Sheet>
|
|
113
|
+
|
|
114
|
+
<Sheet variant="soft" sx={{
|
|
115
|
+
p: 3,
|
|
116
|
+
maxWidth: 250,
|
|
117
|
+
borderRadius: 'md'
|
|
118
|
+
}}>
|
|
119
|
+
<Typography level="title-md" sx={{
|
|
120
|
+
mb: 1
|
|
121
|
+
}}>
|
|
122
|
+
Soft
|
|
123
|
+
</Typography>
|
|
124
|
+
<Typography level="body-sm">부드러운 배경 스타일</Typography>
|
|
125
|
+
</Sheet>
|
|
126
|
+
|
|
127
|
+
<Sheet variant="outlined" sx={{
|
|
128
|
+
p: 3,
|
|
129
|
+
maxWidth: 250,
|
|
130
|
+
borderRadius: 'md'
|
|
131
|
+
}}>
|
|
132
|
+
<Typography level="title-md" sx={{
|
|
133
|
+
mb: 1
|
|
134
|
+
}}>
|
|
135
|
+
Outlined
|
|
136
|
+
</Typography>
|
|
137
|
+
<Typography level="body-sm">테두리가 있는 스타일</Typography>
|
|
138
|
+
</Sheet>
|
|
139
|
+
|
|
140
|
+
<Sheet variant="plain" sx={{
|
|
141
|
+
p: 3,
|
|
142
|
+
maxWidth: 250,
|
|
143
|
+
borderRadius: 'md'
|
|
144
|
+
}}>
|
|
145
|
+
<Typography level="title-md" sx={{
|
|
146
|
+
mb: 1
|
|
147
|
+
}}>
|
|
148
|
+
Plain
|
|
149
|
+
</Typography>
|
|
150
|
+
<Typography level="body-sm">배경이 없는 평면 스타일</Typography>
|
|
151
|
+
</Sheet>
|
|
152
|
+
</div>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Colors
|
|
156
|
+
|
|
157
|
+
다양한 색상을 적용할 수 있습니다.
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
<div style={{
|
|
161
|
+
display: 'flex',
|
|
162
|
+
gap: '1rem',
|
|
163
|
+
flexWrap: 'wrap'
|
|
164
|
+
}}>
|
|
165
|
+
<Sheet color="primary" variant="soft" sx={{
|
|
166
|
+
p: 2,
|
|
167
|
+
borderRadius: 'md'
|
|
168
|
+
}}>
|
|
169
|
+
<Typography level="title-sm">Primary</Typography>
|
|
170
|
+
</Sheet>
|
|
171
|
+
|
|
172
|
+
<Sheet color="neutral" variant="soft" sx={{
|
|
173
|
+
p: 2,
|
|
174
|
+
borderRadius: 'md'
|
|
175
|
+
}}>
|
|
176
|
+
<Typography level="title-sm">Neutral</Typography>
|
|
177
|
+
</Sheet>
|
|
178
|
+
|
|
179
|
+
<Sheet color="danger" variant="soft" sx={{
|
|
180
|
+
p: 2,
|
|
181
|
+
borderRadius: 'md'
|
|
182
|
+
}}>
|
|
183
|
+
<Typography level="title-sm">Danger</Typography>
|
|
184
|
+
</Sheet>
|
|
185
|
+
|
|
186
|
+
<Sheet color="success" variant="soft" sx={{
|
|
187
|
+
p: 2,
|
|
188
|
+
borderRadius: 'md'
|
|
189
|
+
}}>
|
|
190
|
+
<Typography level="title-sm">Success</Typography>
|
|
191
|
+
</Sheet>
|
|
192
|
+
|
|
193
|
+
<Sheet color="warning" variant="soft" sx={{
|
|
194
|
+
p: 2,
|
|
195
|
+
borderRadius: 'md'
|
|
196
|
+
}}>
|
|
197
|
+
<Typography level="title-sm">Warning</Typography>
|
|
198
|
+
</Sheet>
|
|
199
|
+
</div>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### User Profile Card
|
|
203
|
+
|
|
204
|
+
사용자 프로필을 표시하는 카드 예제입니다.
|
|
205
|
+
|
|
206
|
+
```tsx
|
|
207
|
+
<Sheet variant="outlined" sx={{
|
|
208
|
+
maxWidth: 400,
|
|
209
|
+
borderRadius: 'lg',
|
|
210
|
+
p: 3
|
|
211
|
+
}}>
|
|
212
|
+
<Stack spacing={3}>
|
|
213
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
214
|
+
<Avatar size="lg" src="https://i.pravatar.cc/100?img=1" />
|
|
215
|
+
<Stack spacing={0.5}>
|
|
216
|
+
<Typography level="title-lg">김철수</Typography>
|
|
217
|
+
<Typography level="body-sm" sx={{
|
|
218
|
+
color: 'text.secondary'
|
|
219
|
+
}}>
|
|
220
|
+
프론트엔드 개발자
|
|
221
|
+
</Typography>
|
|
222
|
+
</Stack>
|
|
223
|
+
<Box sx={{
|
|
224
|
+
ml: 'auto'
|
|
225
|
+
}}>
|
|
226
|
+
<IconButton variant="plain" size="sm">
|
|
227
|
+
<SettingsIcon />
|
|
228
|
+
</IconButton>
|
|
229
|
+
</Box>
|
|
230
|
+
</Stack>
|
|
231
|
+
|
|
232
|
+
<Typography level="body-md">
|
|
233
|
+
사용자 경험을 중시하는 프론트엔드 개발자입니다. React와 TypeScript를 주로 사용하며, 깔끔하고 직관적인
|
|
234
|
+
인터페이스 구현에 관심이 많습니다.
|
|
235
|
+
</Typography>
|
|
236
|
+
|
|
237
|
+
<Stack direction="row" spacing={1}>
|
|
238
|
+
<Chip size="sm" variant="soft">
|
|
239
|
+
React
|
|
240
|
+
</Chip>
|
|
241
|
+
<Chip size="sm" variant="soft">
|
|
242
|
+
TypeScript
|
|
243
|
+
</Chip>
|
|
244
|
+
<Chip size="sm" variant="soft">
|
|
245
|
+
Next.js
|
|
246
|
+
</Chip>
|
|
247
|
+
</Stack>
|
|
248
|
+
|
|
249
|
+
<Stack direction="row" spacing={2}>
|
|
250
|
+
<Button variant="outlined" fullWidth>
|
|
251
|
+
팔로우
|
|
252
|
+
</Button>
|
|
253
|
+
<Button fullWidth>메시지 보내기</Button>
|
|
254
|
+
</Stack>
|
|
255
|
+
</Stack>
|
|
256
|
+
</Sheet>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Article Card
|
|
260
|
+
|
|
261
|
+
아티클을 표시하는 복잡한 카드 레이아웃 예제입니다.
|
|
262
|
+
|
|
263
|
+
```tsx
|
|
264
|
+
<Sheet variant="outlined" sx={{
|
|
265
|
+
maxWidth: 500,
|
|
266
|
+
borderRadius: 'lg',
|
|
267
|
+
overflow: 'hidden'
|
|
268
|
+
}}>
|
|
269
|
+
<Box sx={{
|
|
270
|
+
height: 200,
|
|
271
|
+
bgcolor: 'neutral.100',
|
|
272
|
+
backgroundImage: 'url(https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixlib=rb-4.0.3&auto=format&fit=crop&w=500&q=80)',
|
|
273
|
+
backgroundSize: 'cover',
|
|
274
|
+
backgroundPosition: 'center'
|
|
275
|
+
}} />
|
|
276
|
+
|
|
277
|
+
<Stack spacing={2} sx={{
|
|
278
|
+
p: 3
|
|
279
|
+
}}>
|
|
280
|
+
<Stack direction="row" justifyContent="space-between" alignItems="flex-start">
|
|
281
|
+
<Stack spacing={1}>
|
|
282
|
+
<Typography level="title-lg">React 18의 새로운 기능들</Typography>
|
|
283
|
+
<Typography level="body-sm" sx={{
|
|
284
|
+
color: 'text.secondary'
|
|
285
|
+
}}>
|
|
286
|
+
2024년 1월 15일 • 5분 읽기
|
|
287
|
+
</Typography>
|
|
288
|
+
</Stack>
|
|
289
|
+
<IconButton variant="plain" size="sm" sx={{
|
|
290
|
+
color: 'warning.500'
|
|
291
|
+
}}>
|
|
292
|
+
<StarIcon />
|
|
293
|
+
</IconButton>
|
|
294
|
+
</Stack>
|
|
295
|
+
|
|
296
|
+
<Typography level="body-md">
|
|
297
|
+
React 18에서 도입된 Concurrent Features와 새로운 Hooks에 대해 자세히 알아보겠습니다. Suspense, useTransition,
|
|
298
|
+
useDeferredValue 등의 새로운 기능들이 어떻게 사용자 경험을 개선하는지 살펴보겠습니다.
|
|
299
|
+
</Typography>
|
|
300
|
+
|
|
301
|
+
<Stack direction="row" spacing={1}>
|
|
302
|
+
<Chip size="sm" variant="outlined">
|
|
303
|
+
React
|
|
304
|
+
</Chip>
|
|
305
|
+
<Chip size="sm" variant="outlined">
|
|
306
|
+
JavaScript
|
|
307
|
+
</Chip>
|
|
308
|
+
<Chip size="sm" variant="outlined">
|
|
309
|
+
개발
|
|
310
|
+
</Chip>
|
|
311
|
+
</Stack>
|
|
312
|
+
|
|
313
|
+
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
|
314
|
+
<Stack direction="row" spacing={1} alignItems="center">
|
|
315
|
+
<Avatar size="sm" src="https://i.pravatar.cc/32?img=2" />
|
|
316
|
+
<Typography level="body-sm">김개발</Typography>
|
|
317
|
+
</Stack>
|
|
318
|
+
|
|
319
|
+
<Stack direction="row" spacing={1}>
|
|
320
|
+
<Button size="sm" variant="plain" startDecorator={<FavoriteIcon />}>
|
|
321
|
+
24
|
|
322
|
+
</Button>
|
|
323
|
+
<Button size="sm" variant="plain" startDecorator={<ShareIcon />}>
|
|
324
|
+
공유
|
|
325
|
+
</Button>
|
|
326
|
+
</Stack>
|
|
327
|
+
</Stack>
|
|
328
|
+
</Stack>
|
|
329
|
+
</Sheet>
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Notification Panel
|
|
333
|
+
|
|
334
|
+
알림을 표시하는 패널 예제입니다.
|
|
335
|
+
|
|
336
|
+
```tsx
|
|
337
|
+
<Sheet variant="soft" color="primary" sx={{
|
|
338
|
+
maxWidth: 400,
|
|
339
|
+
borderRadius: 'lg',
|
|
340
|
+
p: 3
|
|
341
|
+
}}>
|
|
342
|
+
<Stack direction="row" justifyContent="space-between" alignItems="flex-start" spacing={2}>
|
|
343
|
+
<Stack spacing={1}>
|
|
344
|
+
<Typography level="title-md">새로운 알림이 있습니다</Typography>
|
|
345
|
+
<Typography level="body-sm">프로젝트에 새로운 댓글이 달렸습니다. 확인해보시겠습니까?</Typography>
|
|
346
|
+
</Stack>
|
|
347
|
+
<IconButton variant="plain" size="sm">
|
|
348
|
+
<CloseIcon />
|
|
349
|
+
</IconButton>
|
|
350
|
+
</Stack>
|
|
351
|
+
|
|
352
|
+
<Stack direction="row" spacing={2} sx={{
|
|
353
|
+
mt: 3
|
|
354
|
+
}}>
|
|
355
|
+
<Button size="sm" variant="solid">
|
|
356
|
+
확인하기
|
|
357
|
+
</Button>
|
|
358
|
+
<Button size="sm" variant="outlined">
|
|
359
|
+
나중에
|
|
360
|
+
</Button>
|
|
361
|
+
</Stack>
|
|
362
|
+
</Sheet>
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Stats Cards
|
|
366
|
+
|
|
367
|
+
통계 정보를 표시하는 카드들입니다.
|
|
368
|
+
|
|
369
|
+
```tsx
|
|
370
|
+
<div style={{
|
|
371
|
+
display: 'flex',
|
|
372
|
+
gap: '1rem',
|
|
373
|
+
flexWrap: 'wrap'
|
|
374
|
+
}}>
|
|
375
|
+
<Sheet variant="outlined" sx={{
|
|
376
|
+
minWidth: 200,
|
|
377
|
+
borderRadius: 'lg',
|
|
378
|
+
p: 3
|
|
379
|
+
}}>
|
|
380
|
+
<Stack spacing={1}>
|
|
381
|
+
<Typography level="body-sm" sx={{
|
|
382
|
+
color: 'text.secondary'
|
|
383
|
+
}}>
|
|
384
|
+
총 사용자
|
|
385
|
+
</Typography>
|
|
386
|
+
<Typography level="h2" color="primary">
|
|
387
|
+
1,234
|
|
388
|
+
</Typography>
|
|
389
|
+
<Typography level="body-xs" sx={{
|
|
390
|
+
color: 'success.600'
|
|
391
|
+
}}>
|
|
392
|
+
+12% 증가
|
|
393
|
+
</Typography>
|
|
394
|
+
</Stack>
|
|
395
|
+
</Sheet>
|
|
396
|
+
|
|
397
|
+
<Sheet variant="outlined" sx={{
|
|
398
|
+
minWidth: 200,
|
|
399
|
+
borderRadius: 'lg',
|
|
400
|
+
p: 3
|
|
401
|
+
}}>
|
|
402
|
+
<Stack spacing={1}>
|
|
403
|
+
<Typography level="body-sm" sx={{
|
|
404
|
+
color: 'text.secondary'
|
|
405
|
+
}}>
|
|
406
|
+
매출
|
|
407
|
+
</Typography>
|
|
408
|
+
<Typography level="h2" color="primary">
|
|
409
|
+
₩5.6M
|
|
410
|
+
</Typography>
|
|
411
|
+
<Typography level="body-xs" sx={{
|
|
412
|
+
color: 'success.600'
|
|
413
|
+
}}>
|
|
414
|
+
+8% 증가
|
|
415
|
+
</Typography>
|
|
416
|
+
</Stack>
|
|
417
|
+
</Sheet>
|
|
418
|
+
|
|
419
|
+
<Sheet variant="outlined" sx={{
|
|
420
|
+
minWidth: 200,
|
|
421
|
+
borderRadius: 'lg',
|
|
422
|
+
p: 3
|
|
423
|
+
}}>
|
|
424
|
+
<Stack spacing={1}>
|
|
425
|
+
<Typography level="body-sm" sx={{
|
|
426
|
+
color: 'text.secondary'
|
|
427
|
+
}}>
|
|
428
|
+
주문 수
|
|
429
|
+
</Typography>
|
|
430
|
+
<Typography level="h2" color="primary">
|
|
431
|
+
789
|
|
432
|
+
</Typography>
|
|
433
|
+
<Typography level="body-xs" sx={{
|
|
434
|
+
color: 'danger.600'
|
|
435
|
+
}}>
|
|
436
|
+
-3% 감소
|
|
437
|
+
</Typography>
|
|
438
|
+
</Stack>
|
|
439
|
+
</Sheet>
|
|
440
|
+
</div>
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### Form Sheet
|
|
444
|
+
|
|
445
|
+
폼을 담고 있는 시트 예제입니다.
|
|
446
|
+
|
|
447
|
+
```tsx
|
|
448
|
+
<Sheet variant="outlined" sx={{
|
|
449
|
+
maxWidth: 400,
|
|
450
|
+
borderRadius: 'lg',
|
|
451
|
+
p: 4
|
|
452
|
+
}}>
|
|
453
|
+
<Stack spacing={3}>
|
|
454
|
+
<Stack spacing={1}>
|
|
455
|
+
<Typography level="title-lg">문의하기</Typography>
|
|
456
|
+
<Typography level="body-sm" sx={{
|
|
457
|
+
color: 'text.secondary'
|
|
458
|
+
}}>
|
|
459
|
+
궁금한 점이 있으시면 언제든지 연락해 주세요.
|
|
460
|
+
</Typography>
|
|
461
|
+
</Stack>
|
|
462
|
+
|
|
463
|
+
<Stack spacing={2}>
|
|
464
|
+
<Stack spacing={1}>
|
|
465
|
+
<Typography level="body-sm" fontWeight="500">
|
|
466
|
+
이름
|
|
467
|
+
</Typography>
|
|
468
|
+
<Box sx={{
|
|
469
|
+
p: 2,
|
|
470
|
+
border: '1px solid',
|
|
471
|
+
borderColor: 'divider',
|
|
472
|
+
borderRadius: 'sm',
|
|
473
|
+
bgcolor: 'background.level1'
|
|
474
|
+
}}>
|
|
475
|
+
<Typography level="body-sm" sx={{
|
|
476
|
+
color: 'text.secondary'
|
|
477
|
+
}}>
|
|
478
|
+
이름을 입력하세요
|
|
479
|
+
</Typography>
|
|
480
|
+
</Box>
|
|
481
|
+
</Stack>
|
|
482
|
+
|
|
483
|
+
<Stack spacing={1}>
|
|
484
|
+
<Typography level="body-sm" fontWeight="500">
|
|
485
|
+
이메일
|
|
486
|
+
</Typography>
|
|
487
|
+
<Box sx={{
|
|
488
|
+
p: 2,
|
|
489
|
+
border: '1px solid',
|
|
490
|
+
borderColor: 'divider',
|
|
491
|
+
borderRadius: 'sm',
|
|
492
|
+
bgcolor: 'background.level1'
|
|
493
|
+
}}>
|
|
494
|
+
<Typography level="body-sm" sx={{
|
|
495
|
+
color: 'text.secondary'
|
|
496
|
+
}}>
|
|
497
|
+
이메일을 입력하세요
|
|
498
|
+
</Typography>
|
|
499
|
+
</Box>
|
|
500
|
+
</Stack>
|
|
501
|
+
|
|
502
|
+
<Stack spacing={1}>
|
|
503
|
+
<Typography level="body-sm" fontWeight="500">
|
|
504
|
+
메시지
|
|
505
|
+
</Typography>
|
|
506
|
+
<Box sx={{
|
|
507
|
+
p: 2,
|
|
508
|
+
minHeight: 100,
|
|
509
|
+
border: '1px solid',
|
|
510
|
+
borderColor: 'divider',
|
|
511
|
+
borderRadius: 'sm',
|
|
512
|
+
bgcolor: 'background.level1'
|
|
513
|
+
}}>
|
|
514
|
+
<Typography level="body-sm" sx={{
|
|
515
|
+
color: 'text.secondary'
|
|
516
|
+
}}>
|
|
517
|
+
메시지를 입력하세요
|
|
518
|
+
</Typography>
|
|
519
|
+
</Box>
|
|
520
|
+
</Stack>
|
|
521
|
+
</Stack>
|
|
522
|
+
|
|
523
|
+
<Stack direction="row" spacing={2} justifyContent="flex-end">
|
|
524
|
+
<Button variant="outlined">취소</Button>
|
|
525
|
+
<Button>전송</Button>
|
|
526
|
+
</Stack>
|
|
527
|
+
</Stack>
|
|
528
|
+
</Sheet>
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Nested Sheets
|
|
532
|
+
|
|
533
|
+
시트 안에 다른 시트들을 중첩한 예제입니다.
|
|
534
|
+
|
|
535
|
+
```tsx
|
|
536
|
+
<Sheet variant="outlined" sx={{
|
|
537
|
+
maxWidth: 600,
|
|
538
|
+
borderRadius: 'lg',
|
|
539
|
+
p: 3
|
|
540
|
+
}}>
|
|
541
|
+
<Stack spacing={3}>
|
|
542
|
+
<Typography level="title-lg">대시보드</Typography>
|
|
543
|
+
|
|
544
|
+
<Stack direction="row" spacing={2}>
|
|
545
|
+
<Sheet variant="soft" color="primary" sx={{
|
|
546
|
+
flex: 1,
|
|
547
|
+
p: 2,
|
|
548
|
+
borderRadius: 'md'
|
|
549
|
+
}}>
|
|
550
|
+
<Typography level="body-sm" sx={{
|
|
551
|
+
color: 'primary.700'
|
|
552
|
+
}}>
|
|
553
|
+
활성 사용자
|
|
554
|
+
</Typography>
|
|
555
|
+
<Typography level="h3" sx={{
|
|
556
|
+
color: 'primary.800'
|
|
557
|
+
}}>
|
|
558
|
+
2,345
|
|
559
|
+
</Typography>
|
|
560
|
+
</Sheet>
|
|
561
|
+
|
|
562
|
+
<Sheet variant="soft" color="success" sx={{
|
|
563
|
+
flex: 1,
|
|
564
|
+
p: 2,
|
|
565
|
+
borderRadius: 'md'
|
|
566
|
+
}}>
|
|
567
|
+
<Typography level="body-sm" sx={{
|
|
568
|
+
color: 'success.700'
|
|
569
|
+
}}>
|
|
570
|
+
완료된 작업
|
|
571
|
+
</Typography>
|
|
572
|
+
<Typography level="h3" sx={{
|
|
573
|
+
color: 'success.800'
|
|
574
|
+
}}>
|
|
575
|
+
156
|
|
576
|
+
</Typography>
|
|
577
|
+
</Sheet>
|
|
578
|
+
</Stack>
|
|
579
|
+
|
|
580
|
+
<Sheet variant="soft" sx={{
|
|
581
|
+
p: 3,
|
|
582
|
+
borderRadius: 'md'
|
|
583
|
+
}}>
|
|
584
|
+
<Stack spacing={2}>
|
|
585
|
+
<Typography level="title-md">최근 활동</Typography>
|
|
586
|
+
|
|
587
|
+
<Stack spacing={1}>
|
|
588
|
+
{['새로운 사용자가 가입했습니다', '프로젝트가 완료되었습니다', '댓글이 등록되었습니다'].map((activity, index) => <Box key={index} sx={{
|
|
589
|
+
p: 1.5,
|
|
590
|
+
bgcolor: 'background.body',
|
|
591
|
+
borderRadius: 'sm'
|
|
592
|
+
}}>
|
|
593
|
+
<Typography level="body-sm">{activity}</Typography>
|
|
594
|
+
</Box>)}
|
|
595
|
+
</Stack>
|
|
596
|
+
</Stack>
|
|
597
|
+
</Sheet>
|
|
598
|
+
</Stack>
|
|
599
|
+
</Sheet>
|
|
600
|
+
```
|
|
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
|
+
|
|
665
|
+
## Common Use Cases
|
|
666
|
+
|
|
667
|
+
### Profile Cards
|
|
668
|
+
|
|
669
|
+
```tsx
|
|
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>
|
|
678
|
+
|
|
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>
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### Dashboard Cards
|
|
691
|
+
|
|
692
|
+
```tsx
|
|
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
|
+
```
|
|
705
|
+
|
|
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>
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
### Form Containers
|
|
729
|
+
|
|
730
|
+
```tsx
|
|
731
|
+
<Sheet variant="outlined" sx={{ maxWidth: 500, borderRadius: 'lg', p: 4 }}>
|
|
732
|
+
<Typography level="title-lg" sx={{ mb: 3 }}>
|
|
733
|
+
로그인
|
|
734
|
+
</Typography>
|
|
735
|
+
|
|
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>
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
## Best Practices
|
|
803
|
+
|
|
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
|
|
847
|
+
|
|
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
|
+
```
|
|
862
|
+
|
|
863
|
+
### Interactive States
|
|
864
|
+
|
|
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
|
+
```
|
|
884
|
+
|
|
885
|
+
### With Animation (Framer Motion)
|
|
886
|
+
|
|
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
|
+
```
|
|
899
|
+
|
|
900
|
+
Sheet는 유연하고 강력한 표면 컴포넌트로, 다양한 UI 패턴을 구현하는 기초가 됩니다. 적절한 variant와 색상 조합을 통해 일관성 있고 아름다운 인터페이스를 만들 수 있습니다.
|