@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.
Files changed (70) hide show
  1. package/dist/Overview.md +11 -0
  2. package/dist/components/Menu/Menu.d.ts +2 -5
  3. package/dist/components/Stepper/Stepper.d.ts +6 -0
  4. package/dist/components/data-display/Avatar.md +428 -0
  5. package/dist/components/data-display/Badge.md +315 -0
  6. package/dist/components/data-display/Chip.md +301 -0
  7. package/dist/components/data-display/DataTable.md +452 -0
  8. package/dist/components/data-display/InfoSign.md +160 -0
  9. package/dist/components/data-display/Markdown.md +17 -0
  10. package/dist/components/data-display/Table.md +1330 -0
  11. package/dist/components/data-display/Tooltip.md +444 -0
  12. package/dist/components/data-display/Typography.md +271 -0
  13. package/dist/components/data-display/llms.txt +17 -0
  14. package/dist/components/feedback/Alert.md +663 -0
  15. package/dist/components/feedback/Dialog.md +33 -0
  16. package/dist/components/feedback/Modal.md +39 -0
  17. package/dist/components/feedback/llms.txt +11 -0
  18. package/dist/components/inputs/Autocomplete.md +103 -0
  19. package/dist/components/inputs/Button.md +334 -0
  20. package/dist/components/inputs/ButtonGroup.md +382 -0
  21. package/dist/components/inputs/Calendar.md +19 -0
  22. package/dist/components/inputs/Checkbox.md +649 -0
  23. package/dist/components/inputs/CurrencyInput.md +91 -0
  24. package/dist/components/inputs/DatePicker.md +67 -0
  25. package/dist/components/inputs/DateRangePicker.md +55 -0
  26. package/dist/components/inputs/FilterMenu.md +210 -0
  27. package/dist/components/inputs/IconButton.md +361 -0
  28. package/dist/components/inputs/Input.md +283 -0
  29. package/dist/components/inputs/MonthPicker.md +72 -0
  30. package/dist/components/inputs/MonthRangePicker.md +70 -0
  31. package/dist/components/inputs/PercentageInput.md +116 -0
  32. package/dist/components/inputs/RadioButton.md +350 -0
  33. package/dist/components/inputs/RadioTileGroup.md +418 -0
  34. package/dist/components/inputs/Select.md +56 -0
  35. package/dist/components/inputs/Switch.md +577 -0
  36. package/dist/components/inputs/Textarea.md +64 -0
  37. package/dist/components/inputs/Uploader/Uploader.md +238 -0
  38. package/dist/components/inputs/Uploader/llms.txt +9 -0
  39. package/dist/components/inputs/llms.txt +31 -0
  40. package/dist/components/layout/Box.md +997 -0
  41. package/dist/components/layout/Container.md +23 -0
  42. package/dist/components/layout/Grid.md +728 -0
  43. package/dist/components/layout/Stack.md +937 -0
  44. package/dist/components/layout/llms.txt +12 -0
  45. package/dist/components/llms.txt +14 -0
  46. package/dist/components/navigation/Breadcrumbs.md +51 -0
  47. package/dist/components/navigation/Dropdown.md +768 -0
  48. package/dist/components/navigation/IconMenuButton.md +35 -0
  49. package/dist/components/navigation/InsetDrawer.md +133 -0
  50. package/dist/components/navigation/Link.md +24 -0
  51. package/dist/components/navigation/Menu.md +957 -0
  52. package/dist/components/navigation/MenuButton.md +39 -0
  53. package/dist/components/navigation/NavigationGroup.md +17 -0
  54. package/dist/components/navigation/NavigationItem.md +17 -0
  55. package/dist/components/navigation/Navigator.md +17 -0
  56. package/dist/components/navigation/Pagination.md +17 -0
  57. package/dist/components/navigation/ProfileMenu.md +34 -0
  58. package/dist/components/navigation/Stepper.md +108 -0
  59. package/dist/components/navigation/Tabs.md +34 -0
  60. package/dist/components/navigation/llms.txt +22 -0
  61. package/dist/components/surfaces/Accordions.md +96 -0
  62. package/dist/components/surfaces/Card.md +786 -0
  63. package/dist/components/surfaces/Divider.md +762 -0
  64. package/dist/components/surfaces/Sheet.md +900 -0
  65. package/dist/components/surfaces/llms.txt +12 -0
  66. package/dist/index.cjs +22 -10
  67. package/dist/index.js +22 -10
  68. package/dist/llms.txt +75 -0
  69. package/framer/index.js +36 -36
  70. package/package.json +8 -4
@@ -0,0 +1,17 @@
1
+ # data-display
2
+
3
+ ## Documentation
4
+
5
+ - [Avatar](./Avatar.md)
6
+ - [Badge](./Badge.md)
7
+ - [Chip](./Chip.md)
8
+ - [DataTable](./DataTable.md)
9
+ - [InfoSign](./InfoSign.md)
10
+ - [Markdown](./Markdown.md)
11
+ - [Table](./Table.md)
12
+ - [Tooltip](./Tooltip.md)
13
+ - [Typography](./Typography.md)
14
+
15
+ ## Parent
16
+
17
+ - [Parent](../llms.txt)
@@ -0,0 +1,663 @@
1
+ # Alert
2
+
3
+ ## Introduction
4
+
5
+ Alert 컴포넌트는 사용자에게 중요한 정보, 성공 메시지, 경고, 오류 등을 전달하는 피드백 컴포넌트입니다. Joy UI의 Alert를 기반으로 하며, 다양한 색상과 변형을 통해 메시지의 중요도와 성격을 시각적으로 구분할 수 있습니다. 시스템 알림, 폼 검증 결과, 작업 완료 상태 등을 사용자에게 명확하게 전달하는 데 사용됩니다.
6
+
7
+ ```tsx
8
+ <Alert
9
+ content="Alert Content"
10
+ variant="solid"
11
+ />
12
+ ```
13
+
14
+ | Field | Description | Default |
15
+ | -------------- | ----------- | --------------- |
16
+ | title | — | — |
17
+ | content | — | "Alert Content" |
18
+ | variant | — | "solid" |
19
+ | color | — | — |
20
+ | size | — | — |
21
+ | invertedColors | — | — |
22
+ | startDecorator | — | — |
23
+ | actions | — | — |
24
+
25
+ ## Usage
26
+
27
+ ```tsx
28
+ import { Alert } from '@ceed/ads';
29
+
30
+ function MyComponent() {
31
+ return (
32
+ <div>
33
+ {/* 기본 알림 */}
34
+ <Alert content="이것은 기본 알림입니다." />
35
+
36
+ {/* 성공 메시지 */}
37
+ <Alert
38
+ color="success"
39
+ title="저장 완료"
40
+ content="문서가 성공적으로 저장되었습니다."
41
+ startDecorator={<CheckCircleIcon />}
42
+ />
43
+
44
+ {/* 오류 메시지 */}
45
+ <Alert
46
+ color="danger"
47
+ title="오류 발생"
48
+ content="파일 업로드에 실패했습니다. 다시 시도해주세요."
49
+ startDecorator={<ErrorIcon />}
50
+ actions={<Button size="sm">다시 시도</Button>}
51
+ />
52
+ </div>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ## Examples
58
+
59
+ ### Basic Usage
60
+
61
+ 가장 기본적인 Alert 사용법입니다.
62
+
63
+ ```tsx
64
+ <Alert
65
+ content="Alert Content"
66
+ variant="solid"
67
+ />
68
+ ```
69
+
70
+ ### Colors
71
+
72
+ 다양한 색상을 통해 메시지의 성격을 구분할 수 있습니다.
73
+
74
+ ```tsx
75
+ <div style={{
76
+ display: 'flex',
77
+ flexDirection: 'column',
78
+ gap: '5px'
79
+ }}>
80
+ <div style={{
81
+ display: 'flex',
82
+ flexDirection: 'column',
83
+ gap: '5px'
84
+ }}>
85
+ <Alert {...props} color="primary" variant="plain" />
86
+ <Alert {...props} color="neutral" variant="plain" />
87
+ <Alert {...props} color="danger" variant="plain" />
88
+ <Alert {...props} color="success" variant="plain" />
89
+ <Alert {...props} color="warning" variant="plain" />
90
+ </div>
91
+ <div style={{
92
+ display: 'flex',
93
+ flexDirection: 'column',
94
+ gap: '5px'
95
+ }}>
96
+ <Alert {...props} color="primary" variant="soft" />
97
+ <Alert {...props} color="neutral" variant="soft" />
98
+ <Alert {...props} color="danger" variant="soft" />
99
+ <Alert {...props} color="success" variant="soft" />
100
+ <Alert {...props} color="warning" variant="soft" />
101
+ </div>
102
+ <div style={{
103
+ display: 'flex',
104
+ flexDirection: 'column',
105
+ gap: '5px'
106
+ }}>
107
+ <Alert {...props} color="primary" variant="solid" />
108
+ <Alert {...props} color="neutral" variant="solid" />
109
+ <Alert {...props} color="danger" variant="solid" />
110
+ <Alert {...props} color="success" variant="solid" />
111
+ <Alert {...props} color="warning" variant="solid" />
112
+ </div>
113
+ <div style={{
114
+ display: 'flex',
115
+ flexDirection: 'column',
116
+ gap: '5px'
117
+ }}>
118
+ <Alert {...props} color="primary" variant="outlined" />
119
+ <Alert {...props} color="neutral" variant="outlined" />
120
+ <Alert {...props} color="danger" variant="outlined" />
121
+ <Alert {...props} color="success" variant="outlined" />
122
+ <Alert {...props} color="warning" variant="outlined" />
123
+ </div>
124
+ </div>
125
+ ```
126
+
127
+ - **primary**: 일반적인 정보 메시지
128
+ - **success**: 성공, 완료 메시지
129
+ - **warning**: 주의, 경고 메시지
130
+ - **danger**: 오류, 위험 메시지
131
+ - **neutral**: 중립적인 메시지
132
+
133
+ ### With Start Decorator
134
+
135
+ 아이콘이나 다른 요소를 메시지 앞에 추가할 수 있습니다.
136
+
137
+ ```tsx
138
+ <Alert
139
+ content="Alert Content"
140
+ variant="solid"
141
+ startDecorator={<AccountCircle />}
142
+ />
143
+ ```
144
+
145
+ ### With Title
146
+
147
+ 제목을 추가하여 메시지를 구조화할 수 있습니다.
148
+
149
+ ```tsx
150
+ <Alert
151
+ content="Alert Content"
152
+ variant="solid"
153
+ title="Alert Title"
154
+ />
155
+ ```
156
+
157
+ ### With Actions
158
+
159
+ 사용자가 수행할 수 있는 액션을 추가할 수 있습니다.
160
+
161
+ ```tsx
162
+ <Alert
163
+ content="Alert Content"
164
+ variant="solid"
165
+ actions={<Button>Action</Button>}
166
+ />
167
+ ```
168
+
169
+ ### Complete Alert
170
+
171
+ 모든 요소를 포함한 완전한 Alert입니다.
172
+
173
+ ```tsx
174
+ <Alert
175
+ content="Alert Content"
176
+ variant="solid"
177
+ startDecorator={<AccountCircle />}
178
+ title="Alert Title"
179
+ actions={<Button>Action</Button>}
180
+ />
181
+ ```
182
+
183
+ ## Common Use Cases
184
+
185
+ ### Form Validation
186
+
187
+ 폼 검증 결과를 표시할 때 사용합니다.
188
+
189
+ ```tsx
190
+ function LoginForm() {
191
+ const [error, setError] = useState('');
192
+ const [success, setSuccess] = useState(false);
193
+
194
+ const handleSubmit = async (formData) => {
195
+ try {
196
+ await login(formData);
197
+ setSuccess(true);
198
+ setError('');
199
+ } catch (err) {
200
+ setError(err.message);
201
+ setSuccess(false);
202
+ }
203
+ };
204
+
205
+ return (
206
+ <Stack spacing={3}>
207
+ {error && (
208
+ <Alert
209
+ color="danger"
210
+ title="로그인 실패"
211
+ content={error}
212
+ startDecorator={<ErrorIcon />}
213
+ actions={
214
+ <Button size="sm" variant="plain" onClick={() => setError('')}>
215
+ 닫기
216
+ </Button>
217
+ }
218
+ />
219
+ )}
220
+
221
+ {success && (
222
+ <Alert
223
+ color="success"
224
+ content="로그인이 완료되었습니다."
225
+ startDecorator={<CheckCircleIcon />}
226
+ />
227
+ )}
228
+
229
+ <form onSubmit={handleSubmit}>
230
+ {/* 폼 필드들 */}
231
+ </form>
232
+ </Stack>
233
+ );
234
+ }
235
+ ```
236
+
237
+ ### System Notifications
238
+
239
+ 시스템 상태나 알림을 표시할 때 사용합니다.
240
+
241
+ ```tsx
242
+ function SystemStatus() {
243
+ return (
244
+ <Stack spacing={2}>
245
+ <Alert
246
+ color="success"
247
+ title="시스템 정상"
248
+ content="모든 서비스가 정상적으로 작동하고 있습니다."
249
+ startDecorator={<CheckCircleIcon />}
250
+ />
251
+
252
+ <Alert
253
+ color="warning"
254
+ title="예정된 점검"
255
+ content="오늘 밤 12시부터 2시까지 시스템 점검이 예정되어 있습니다."
256
+ startDecorator={<WarningIcon />}
257
+ actions={
258
+ <Button size="sm" variant="plain">
259
+ 자세히 보기
260
+ </Button>
261
+ }
262
+ />
263
+
264
+ <Alert
265
+ color="danger"
266
+ title="서비스 장애"
267
+ content="결제 서비스에 일시적인 장애가 발생했습니다."
268
+ startDecorator={<ErrorIcon />}
269
+ actions={
270
+ <Stack direction="row" spacing={1}>
271
+ <Button size="sm" variant="plain">
272
+ 새로고침
273
+ </Button>
274
+ <Button size="sm" variant="solid" color="danger">
275
+ 고객센터
276
+ </Button>
277
+ </Stack>
278
+ }
279
+ />
280
+ </Stack>
281
+ );
282
+ }
283
+ ```
284
+
285
+ ### Data Processing Status
286
+
287
+ 데이터 처리 상태를 보여줄 때 사용합니다.
288
+
289
+ ```tsx
290
+ function DataProcessingStatus({ status, progress, onCancel, onRetry }) {
291
+ const getAlertProps = () => {
292
+ switch (status) {
293
+ case 'processing':
294
+ return {
295
+ color: 'primary',
296
+ title: '데이터 처리 중',
297
+ content: `진행률: ${progress}%`,
298
+ startDecorator: <CircularProgress size="sm" />,
299
+ actions: <Button size="sm" onClick={onCancel}>취소</Button>
300
+ };
301
+ case 'completed':
302
+ return {
303
+ color: 'success',
304
+ title: '처리 완료',
305
+ content: '모든 데이터가 성공적으로 처리되었습니다.',
306
+ startDecorator: <CheckCircleIcon />
307
+ };
308
+ case 'failed':
309
+ return {
310
+ color: 'danger',
311
+ title: '처리 실패',
312
+ content: '데이터 처리 중 오류가 발생했습니다.',
313
+ startDecorator: <ErrorIcon />,
314
+ actions: <Button size="sm" onClick={onRetry}>다시 시도</Button>
315
+ };
316
+ default:
317
+ return null;
318
+ }
319
+ };
320
+
321
+ const alertProps = getAlertProps();
322
+
323
+ return alertProps ? <Alert {...alertProps} /> : null;
324
+ }
325
+ ```
326
+
327
+ ### Feature Announcements
328
+
329
+ 새로운 기능 소개나 중요한 공지사항을 표시할 때 사용합니다.
330
+
331
+ ```tsx
332
+ function FeatureAnnouncement() {
333
+ const [dismissed, setDismissed] = useState(false);
334
+
335
+ if (dismissed) return null;
336
+
337
+ return (
338
+ <Alert
339
+ color="primary"
340
+ title="🎉 새로운 기능 출시"
341
+ content="이제 문서를 팀원들과 실시간으로 공동 편집할 수 있습니다!"
342
+ startDecorator={<NewReleasesIcon />}
343
+ actions={
344
+ <Stack direction="row" spacing={1}>
345
+ <Button size="sm" variant="soft">
346
+ 자세히 보기
347
+ </Button>
348
+ <Button size="sm" variant="plain" onClick={() => setDismissed(true)}>
349
+ 닫기
350
+ </Button>
351
+ </Stack>
352
+ }
353
+ />
354
+ );
355
+ }
356
+ ```
357
+
358
+ ### Permission Requests
359
+
360
+ 권한 요청이나 설정 변경을 안내할 때 사용합니다.
361
+
362
+ ```tsx
363
+ function PermissionAlert() {
364
+ return (
365
+ <Stack spacing={2}>
366
+ <Alert
367
+ color="warning"
368
+ title="알림 권한 필요"
369
+ content="중요한 업데이트를 놓치지 않으려면 브라우저 알림을 허용해주세요."
370
+ startDecorator={<NotificationsIcon />}
371
+ actions={
372
+ <Stack direction="row" spacing={1}>
373
+ <Button size="sm" variant="solid" color="warning">
374
+ 허용
375
+ </Button>
376
+ <Button size="sm" variant="plain">
377
+ 나중에
378
+ </Button>
379
+ </Stack>
380
+ }
381
+ />
382
+
383
+ <Alert
384
+ color="neutral"
385
+ title="쿠키 사용 안내"
386
+ content="이 웹사이트는 사용자 경험 개선을 위해 쿠키를 사용합니다."
387
+ startDecorator={<InfoIcon />}
388
+ actions={
389
+ <Button size="sm" variant="outlined">
390
+ 설정
391
+ </Button>
392
+ }
393
+ />
394
+ </Stack>
395
+ );
396
+ }
397
+ ```
398
+
399
+ ### Inline Messages
400
+
401
+ 폼 필드나 특정 섹션에 인라인으로 표시하는 메시지입니다.
402
+
403
+ ```tsx
404
+ function InlineMessages() {
405
+ return (
406
+ <Stack spacing={3}>
407
+ <FormControl>
408
+ <FormLabel>비밀번호</FormLabel>
409
+ <Input type="password" />
410
+ <Alert
411
+ size="sm"
412
+ color="warning"
413
+ content="비밀번호는 최소 8자 이상이어야 합니다."
414
+ startDecorator={<WarningIcon />}
415
+ variant="soft"
416
+ />
417
+ </FormControl>
418
+
419
+ <FormControl>
420
+ <FormLabel>이메일 주소</FormLabel>
421
+ <Input type="email" />
422
+ <Alert
423
+ size="sm"
424
+ color="success"
425
+ content="사용 가능한 이메일 주소입니다."
426
+ startDecorator={<CheckIcon />}
427
+ variant="soft"
428
+ />
429
+ </FormControl>
430
+ </Stack>
431
+ );
432
+ }
433
+ ```
434
+
435
+ ### Dismissible Alerts
436
+
437
+ 사용자가 닫을 수 있는 Alert 구현 예제입니다.
438
+
439
+ ```tsx
440
+ function DismissibleAlerts() {
441
+ const [alerts, setAlerts] = useState([
442
+ { id: 1, type: 'info', message: '새로운 메시지가 도착했습니다.' },
443
+ { id: 2, type: 'warning', message: '계정 보안을 위해 비밀번호를 변경해주세요.' },
444
+ { id: 3, type: 'success', message: '프로필이 성공적으로 업데이트되었습니다.' },
445
+ ]);
446
+
447
+ const dismissAlert = (id) => {
448
+ setAlerts(prev => prev.filter(alert => alert.id !== id));
449
+ };
450
+
451
+ return (
452
+ <Stack spacing={2}>
453
+ {alerts.map(alert => (
454
+ <Alert
455
+ key={alert.id}
456
+ color={getAlertColor(alert.type)}
457
+ content={alert.message}
458
+ startDecorator={getAlertIcon(alert.type)}
459
+ actions={
460
+ <IconButton
461
+ size="sm"
462
+ variant="plain"
463
+ onClick={() => dismissAlert(alert.id)}
464
+ >
465
+ <CloseIcon />
466
+ </IconButton>
467
+ }
468
+ />
469
+ ))}
470
+ </Stack>
471
+ );
472
+ }
473
+ ```
474
+
475
+ ## Props and Customization
476
+
477
+ ### Content Types
478
+
479
+ Alert는 다양한 형태의 콘텐츠를 지원합니다.
480
+
481
+ ```tsx
482
+ // 단순 텍스트
483
+ <Alert content="간단한 메시지" />
484
+
485
+ // React 요소
486
+ <Alert
487
+ content={
488
+ <div>
489
+ <strong>중요:</strong> 이 작업은 되돌릴 수 없습니다.
490
+ <Link href="/help">도움말 보기</Link>
491
+ </div>
492
+ }
493
+ />
494
+
495
+ // 제목과 내용 분리
496
+ <Alert
497
+ title="업데이트 완료"
498
+ content="애플리케이션이 최신 버전으로 업데이트되었습니다."
499
+ />
500
+ ```
501
+
502
+ ### Variants
503
+
504
+ 다양한 시각적 스타일을 제공합니다.
505
+
506
+ ```tsx
507
+ <Stack spacing={2}>
508
+ <Alert variant="solid" color="primary" content="Solid 변형" />
509
+ <Alert variant="soft" color="primary" content="Soft 변형" />
510
+ <Alert variant="outlined" color="primary" content="Outlined 변형" />
511
+ <Alert variant="plain" color="primary" content="Plain 변형" />
512
+ </Stack>
513
+ ```
514
+
515
+ ### Sizes
516
+
517
+ Alert의 크기를 조절할 수 있습니다.
518
+
519
+ ```tsx
520
+ <Stack spacing={2}>
521
+ <Alert size="sm" content="Small Alert" />
522
+ <Alert size="md" content="Medium Alert (기본값)" />
523
+ <Alert size="lg" content="Large Alert" />
524
+ </Stack>
525
+ ```
526
+
527
+ ### Custom Styling
528
+
529
+ sx prop을 사용해 커스텀 스타일을 적용할 수 있습니다.
530
+
531
+ ```tsx
532
+ <Alert
533
+ content="커스텀 스타일 Alert"
534
+ sx={{
535
+ borderRadius: 'xl',
536
+ boxShadow: 'lg',
537
+ '&:hover': {
538
+ transform: 'translateY(-2px)',
539
+ transition: 'transform 0.2s ease',
540
+ },
541
+ }}
542
+ />
543
+ ```
544
+
545
+ ## Accessibility
546
+
547
+ Alert 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
548
+
549
+ ### ARIA 속성
550
+
551
+ 자동으로 적절한 ARIA 속성이 적용됩니다.
552
+
553
+ - `role="alert"`: 즉시 사용자에게 알려야 하는 중요한 메시지
554
+ - `aria-live="polite"`: 덜 긴급한 메시지의 경우
555
+
556
+ ### 키보드 탐색
557
+
558
+ Alert 내의 액션 버튼들은 키보드로 탐색 가능합니다.
559
+
560
+ ### 스크린 리더 지원
561
+
562
+ 제목과 내용이 적절히 구조화되어 스크린 리더가 읽을 수 있습니다.
563
+
564
+ ```tsx
565
+ <Alert
566
+ title="오류 발생"
567
+ content="입력하신 정보를 다시 확인해주세요."
568
+ startDecorator={<ErrorIcon aria-hidden="true" />}
569
+ actions={
570
+ <Button aria-label="오류 메시지 닫기">
571
+ 닫기
572
+ </Button>
573
+ }
574
+ />
575
+ ```
576
+
577
+ ## Best Practices
578
+
579
+ 1. **적절한 색상 사용**: 메시지의 성격에 맞는 색상을 사용하세요.
580
+
581
+ ```tsx
582
+ // ✅ 좋은 예
583
+ <Alert color="success" content="저장 완료" />
584
+ <Alert color="danger" content="오류 발생" />
585
+ <Alert color="warning" content="주의 필요" />
586
+
587
+ // ❌ 나쁜 예
588
+ <Alert color="success" content="오류 발생" /> // 잘못된 색상
589
+ ```
590
+
591
+ 2. **명확한 메시지**: 사용자가 이해하기 쉬운 명확한 메시지를 작성하세요.
592
+
593
+ ```tsx
594
+ // ✅ 명확한 메시지
595
+ <Alert
596
+ color="danger"
597
+ title="업로드 실패"
598
+ content="파일이 너무 큽니다. 10MB 이하의 파일을 선택해주세요."
599
+ />
600
+
601
+ // ❌ 모호한 메시지
602
+ <Alert content="오류가 발생했습니다." />
603
+ ```
604
+
605
+ 3. **적절한 액션**: 사용자가 취할 수 있는 다음 단계를 제공하세요.
606
+
607
+ ```tsx
608
+ <Alert
609
+ color="warning"
610
+ content="세션이 곧 만료됩니다."
611
+ actions={
612
+ <Button size="sm" onClick={extendSession}>
613
+ 연장
614
+ </Button>
615
+ }
616
+ />
617
+ ```
618
+
619
+ 4. **과도한 사용 금지**: 너무 많은 Alert가 동시에 표시되지 않도록 하세요.
620
+
621
+ 5. **자동 해제**: 일시적인 메시지는 자동으로 해제되도록 구현하세요.
622
+
623
+ ```tsx
624
+ function AutoDismissAlert() {
625
+ const [visible, setVisible] = useState(true);
626
+
627
+ useEffect(() => {
628
+ const timer = setTimeout(() => {
629
+ setVisible(false);
630
+ }, 5000);
631
+
632
+ return () => clearTimeout(timer);
633
+ }, []);
634
+
635
+ if (!visible) return null;
636
+
637
+ return (
638
+ <Alert
639
+ color="success"
640
+ content="저장이 완료되었습니다."
641
+ startDecorator={<CheckIcon />}
642
+ />
643
+ );
644
+ }
645
+ ```
646
+
647
+ ## Performance Considerations
648
+
649
+ 1. **조건부 렌더링**: 필요할 때만 Alert를 렌더링하세요.
650
+
651
+ 2. **메모이제이션**: 복잡한 Alert 내용은 메모이제이션을 고려하세요.
652
+
653
+ ```tsx
654
+ const alertContent = useMemo(() => (
655
+ <ComplexAlertContent data={data} />
656
+ ), [data]);
657
+
658
+ <Alert content={alertContent} />
659
+ ```
660
+
661
+ 3. **배치 처리**: 여러 Alert를 효율적으로 관리하세요.
662
+
663
+ Alert는 사용자와의 커뮤니케이션에서 핵심적인 역할을 하는 컴포넌트입니다. 적절한 색상, 명확한 메시지, 유용한 액션을 통해 우수한 사용자 경험을 제공할 수 있습니다.
@@ -0,0 +1,33 @@
1
+ # Dialog
2
+
3
+ ## Introduction
4
+
5
+ ```tsx
6
+ <DialogFrame
7
+ title="Dialog Title"
8
+ children="Dialog Content"
9
+ actions={actions}
10
+ />
11
+ ```
12
+
13
+ | Field | Description | Default |
14
+ | ---------- | ----------- | ---------------- |
15
+ | title | — | "Dialog Title" |
16
+ | children | — | "Dialog Content" |
17
+ | fullscreen | — | — |
18
+ | actions | — | actions |
19
+
20
+ ## Fullscreen
21
+
22
+ ```tsx
23
+ import { Dialog } from '@ceed/ads';
24
+ ```
25
+
26
+ ```tsx
27
+ <DialogFrame
28
+ title="Dialog Title"
29
+ children={<Stack>Fullscreen</Stack>}
30
+ actions={actions}
31
+ fullscreen
32
+ />
33
+ ```