@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,728 @@
1
+ # Grid
2
+
3
+ ## Introduction
4
+
5
+ Grid 컴포넌트는 CSS Grid를 기반으로 한 강력한 레이아웃 시스템입니다. 12열 그리드 시스템을 사용하여 반응형 레이아웃을 쉽게 구현할 수 있으며, 다양한 브레이크포인트에서 다른 레이아웃을 적용할 수 있습니다. 복잡한 대시보드, 제품 카탈로그, 카드 레이아웃 등 다양한 용도로 활용할 수 있습니다.
6
+
7
+ ```tsx
8
+ <Grid container spacing={args.spacing}>
9
+ <GridItem xs={6}>
10
+ <Typography>Item 1 (xs=6)</Typography>
11
+ </GridItem>
12
+ <GridItem xs={6}>
13
+ <Typography>Item 2 (xs=6)</Typography>
14
+ </GridItem>
15
+ <GridItem xs={4}>
16
+ <Typography>Item 3 (xs=4)</Typography>
17
+ </GridItem>
18
+ <GridItem xs={8}>
19
+ <Typography>Item 4 (xs=8)</Typography>
20
+ </GridItem>
21
+ </Grid>
22
+ ```
23
+
24
+ | Field | Description | Default |
25
+ | --------- | ----------------- | ------- |
26
+ | container | Grid 컨테이너 여부 | true |
27
+ | spacing | 그리드 간격 | 2 |
28
+ | xs | xs 브레이크포인트에서의 열 수 | — |
29
+ | sm | sm 브레이크포인트에서의 열 수 | — |
30
+ | md | md 브레이크포인트에서의 열 수 | — |
31
+ | lg | lg 브레이크포인트에서의 열 수 | — |
32
+ | xl | xl 브레이크포인트에서의 열 수 | — |
33
+
34
+ ## Usage
35
+
36
+ ```tsx
37
+ import { Grid } from '@ceed/ads';
38
+
39
+ function MyComponent() {
40
+ return (
41
+ <Grid container spacing={2}>
42
+ <Grid item xs={12} sm={6} md={4}>
43
+ 첫 번째 아이템
44
+ </Grid>
45
+ <Grid item xs={12} sm={6} md={4}>
46
+ 두 번째 아이템
47
+ </Grid>
48
+ <Grid item xs={12} sm={6} md={4}>
49
+ 세 번째 아이템
50
+ </Grid>
51
+ </Grid>
52
+ );
53
+ }
54
+ ```
55
+
56
+ ## Examples
57
+
58
+ ### Basic Usage
59
+
60
+ 12열 그리드 시스템의 기본 사용법입니다.
61
+
62
+ ```tsx
63
+ <div style={{
64
+ display: 'flex',
65
+ flexDirection: 'column',
66
+ gap: '2rem'
67
+ }}>
68
+ <div>
69
+ <Typography level="title-md" sx={{
70
+ mb: 2
71
+ }}>
72
+ 12열 그리드 시스템
73
+ </Typography>
74
+ <Grid container spacing={2}>
75
+ <GridItem xs={12}>xs=12</GridItem>
76
+ <GridItem xs={6}>xs=6</GridItem>
77
+ <GridItem xs={6}>xs=6</GridItem>
78
+ <GridItem xs={4}>xs=4</GridItem>
79
+ <GridItem xs={4}>xs=4</GridItem>
80
+ <GridItem xs={4}>xs=4</GridItem>
81
+ <GridItem xs={3}>xs=3</GridItem>
82
+ <GridItem xs={3}>xs=3</GridItem>
83
+ <GridItem xs={3}>xs=3</GridItem>
84
+ <GridItem xs={3}>xs=3</GridItem>
85
+ </Grid>
86
+ </div>
87
+ </div>
88
+ ```
89
+
90
+ ### Responsive Grid
91
+
92
+ 다양한 화면 크기에서 다른 레이아웃을 적용하는 반응형 그리드입니다.
93
+
94
+ ```tsx
95
+ <div>
96
+ <Typography level="title-md" sx={{
97
+ mb: 2
98
+ }}>
99
+ 반응형 그리드 (브라우저 크기를 조절해보세요)
100
+ </Typography>
101
+ <Grid container spacing={2}>
102
+ <GridItem xs={12} sm={6} md={4} lg={3}>
103
+ <div>
104
+ <Typography level="body-xs">xs=12</Typography>
105
+ <Typography level="body-xs">sm=6</Typography>
106
+ <Typography level="body-xs">md=4</Typography>
107
+ <Typography level="body-xs">lg=3</Typography>
108
+ </div>
109
+ </GridItem>
110
+ <GridItem xs={12} sm={6} md={4} lg={3}>
111
+ <div>
112
+ <Typography level="body-xs">xs=12</Typography>
113
+ <Typography level="body-xs">sm=6</Typography>
114
+ <Typography level="body-xs">md=4</Typography>
115
+ <Typography level="body-xs">lg=3</Typography>
116
+ </div>
117
+ </GridItem>
118
+ <GridItem xs={12} sm={6} md={4} lg={3}>
119
+ <div>
120
+ <Typography level="body-xs">xs=12</Typography>
121
+ <Typography level="body-xs">sm=6</Typography>
122
+ <Typography level="body-xs">md=4</Typography>
123
+ <Typography level="body-xs">lg=3</Typography>
124
+ </div>
125
+ </GridItem>
126
+ <GridItem xs={12} sm={6} md={4} lg={3}>
127
+ <div>
128
+ <Typography level="body-xs">xs=12</Typography>
129
+ <Typography level="body-xs">sm=6</Typography>
130
+ <Typography level="body-xs">md=4</Typography>
131
+ <Typography level="body-xs">lg=3</Typography>
132
+ </div>
133
+ </GridItem>
134
+ </Grid>
135
+ </div>
136
+ ```
137
+
138
+ ### Different Spacing
139
+
140
+ 다양한 간격을 적용한 그리드 레이아웃입니다.
141
+
142
+ ```tsx
143
+ <div style={{
144
+ display: 'flex',
145
+ flexDirection: 'column',
146
+ gap: '3rem'
147
+ }}>
148
+ <div>
149
+ <Typography level="title-sm" sx={{
150
+ mb: 1
151
+ }}>
152
+ 간격 없음 (spacing=0)
153
+ </Typography>
154
+ <Grid container spacing={0}>
155
+ <GridItem xs={4}>Item 1</GridItem>
156
+ <GridItem xs={4}>Item 2</GridItem>
157
+ <GridItem xs={4}>Item 3</GridItem>
158
+ </Grid>
159
+ </div>
160
+
161
+ <div>
162
+ <Typography level="title-sm" sx={{
163
+ mb: 1
164
+ }}>
165
+ 작은 간격 (spacing=1)
166
+ </Typography>
167
+ <Grid container spacing={1}>
168
+ <GridItem xs={4}>Item 1</GridItem>
169
+ <GridItem xs={4}>Item 2</GridItem>
170
+ <GridItem xs={4}>Item 3</GridItem>
171
+ </Grid>
172
+ </div>
173
+
174
+ <div>
175
+ <Typography level="title-sm" sx={{
176
+ mb: 1
177
+ }}>
178
+ 중간 간격 (spacing=2)
179
+ </Typography>
180
+ <Grid container spacing={2}>
181
+ <GridItem xs={4}>Item 1</GridItem>
182
+ <GridItem xs={4}>Item 2</GridItem>
183
+ <GridItem xs={4}>Item 3</GridItem>
184
+ </Grid>
185
+ </div>
186
+
187
+ <div>
188
+ <Typography level="title-sm" sx={{
189
+ mb: 1
190
+ }}>
191
+ 큰 간격 (spacing=4)
192
+ </Typography>
193
+ <Grid container spacing={4}>
194
+ <GridItem xs={4}>Item 1</GridItem>
195
+ <GridItem xs={4}>Item 2</GridItem>
196
+ <GridItem xs={4}>Item 3</GridItem>
197
+ </Grid>
198
+ </div>
199
+ </div>
200
+ ```
201
+
202
+ ### Nested Grid
203
+
204
+ 그리드 안에 또 다른 그리드를 중첩하여 사용할 수 있습니다.
205
+
206
+ ```tsx
207
+ <div>
208
+ <Typography level="title-md" sx={{
209
+ mb: 2
210
+ }}>
211
+ 중첩된 그리드
212
+ </Typography>
213
+ <Grid container spacing={2}>
214
+ <Grid xs={12} md={8}>
215
+ <Box sx={{
216
+ p: 2,
217
+ bgcolor: 'success.50',
218
+ borderRadius: 'md',
219
+ minHeight: 200
220
+ }}>
221
+ <Typography level="title-sm" sx={{
222
+ mb: 2
223
+ }}>
224
+ 메인 콘텐츠 영역
225
+ </Typography>
226
+ <Grid container spacing={1}>
227
+ <GridItem xs={6}>
228
+ <Typography level="body-xs">중첩 아이템 1</Typography>
229
+ </GridItem>
230
+ <GridItem xs={6}>
231
+ <Typography level="body-xs">중첩 아이템 2</Typography>
232
+ </GridItem>
233
+ <GridItem xs={12}>
234
+ <Typography level="body-xs">중첩 아이템 3</Typography>
235
+ </GridItem>
236
+ </Grid>
237
+ </Box>
238
+ </Grid>
239
+
240
+ <Grid xs={12} md={4}>
241
+ <Box sx={{
242
+ p: 2,
243
+ bgcolor: 'warning.50',
244
+ borderRadius: 'md',
245
+ minHeight: 200
246
+ }}>
247
+ <Typography level="title-sm" sx={{
248
+ mb: 2
249
+ }}>
250
+ 사이드바
251
+ </Typography>
252
+ <Grid container spacing={1}>
253
+ <GridItem xs={12}>
254
+ <Typography level="body-xs">사이드바 아이템 1</Typography>
255
+ </GridItem>
256
+ <GridItem xs={12}>
257
+ <Typography level="body-xs">사이드바 아이템 2</Typography>
258
+ </GridItem>
259
+ </Grid>
260
+ </Box>
261
+ </Grid>
262
+ </Grid>
263
+ </div>
264
+ ```
265
+
266
+ ### Auto Layout
267
+
268
+ 자동 레이아웃을 사용한 그리드입니다.
269
+
270
+ ```tsx
271
+ <div style={{
272
+ display: 'flex',
273
+ flexDirection: 'column',
274
+ gap: '2rem'
275
+ }}>
276
+ <div>
277
+ <Typography level="title-sm" sx={{
278
+ mb: 1
279
+ }}>
280
+ 자동 레이아웃 - 동일한 너비
281
+ </Typography>
282
+ <Grid container spacing={2}>
283
+ <GridItem xs>자동 너비 1</GridItem>
284
+ <GridItem xs>자동 너비 2</GridItem>
285
+ <GridItem xs>자동 너비 3</GridItem>
286
+ </Grid>
287
+ </div>
288
+
289
+ <div>
290
+ <Typography level="title-sm" sx={{
291
+ mb: 1
292
+ }}>
293
+ 자동 레이아웃 - 내용에 따른 너비
294
+ </Typography>
295
+ <Grid container spacing={2}>
296
+ <GridItem xs="auto">
297
+ <Typography>짧은 내용</Typography>
298
+ </GridItem>
299
+ <GridItem xs>
300
+ <Typography>남은 공간을 모두 차지하는 긴 내용</Typography>
301
+ </GridItem>
302
+ <GridItem xs="auto">
303
+ <Typography>또 다른 짧은 내용</Typography>
304
+ </GridItem>
305
+ </Grid>
306
+ </div>
307
+ </div>
308
+ ```
309
+
310
+ ### Complex Layouts
311
+
312
+ 실제 사용 사례를 보여주는 복잡한 레이아웃 예제입니다.
313
+
314
+ ```tsx
315
+ <div style={{
316
+ display: 'flex',
317
+ flexDirection: 'column',
318
+ gap: '3rem'
319
+ }}>
320
+ {/* Dashboard Layout */}
321
+ <div>
322
+ <Typography level="title-md" sx={{
323
+ mb: 2
324
+ }}>
325
+ 대시보드 레이아웃
326
+ </Typography>
327
+ <Grid container spacing={2}>
328
+ {/* Header */}
329
+ <Grid xs={12}>
330
+ <Box sx={{
331
+ p: 3,
332
+ bgcolor: 'primary.100',
333
+ borderRadius: 'md',
334
+ textAlign: 'center'
335
+ }}>
336
+ <Typography level="title-lg">대시보드 헤더</Typography>
337
+ </Box>
338
+ </Grid>
339
+
340
+ {/* Stats Cards */}
341
+ <GridItem xs={12} sm={6} lg={3}>
342
+ <div>
343
+ <Typography level="title-sm">총 사용자</Typography>
344
+ <Typography level="h2">1,234</Typography>
345
+ </div>
346
+ </GridItem>
347
+ <GridItem xs={12} sm={6} lg={3}>
348
+ <div>
349
+ <Typography level="title-sm">매출</Typography>
350
+ <Typography level="h2">₩5.6M</Typography>
351
+ </div>
352
+ </GridItem>
353
+ <GridItem xs={12} sm={6} lg={3}>
354
+ <div>
355
+ <Typography level="title-sm">주문</Typography>
356
+ <Typography level="h2">789</Typography>
357
+ </div>
358
+ </GridItem>
359
+ <GridItem xs={12} sm={6} lg={3}>
360
+ <div>
361
+ <Typography level="title-sm">전환율</Typography>
362
+ <Typography level="h2">3.2%</Typography>
363
+ </div>
364
+ </GridItem>
365
+
366
+ {/* Main Content */}
367
+ <Grid xs={12} lg={8}>
368
+ <Box sx={{
369
+ p: 3,
370
+ bgcolor: 'neutral.50',
371
+ borderRadius: 'md',
372
+ minHeight: 300
373
+ }}>
374
+ <Typography level="title-md">차트 영역</Typography>
375
+ <Typography level="body-sm">여기에 차트가 들어갑니다</Typography>
376
+ </Box>
377
+ </Grid>
378
+
379
+ {/* Sidebar */}
380
+ <Grid xs={12} lg={4}>
381
+ <Box sx={{
382
+ p: 3,
383
+ bgcolor: 'success.50',
384
+ borderRadius: 'md',
385
+ minHeight: 300
386
+ }}>
387
+ <Typography level="title-md">최근 활동</Typography>
388
+ <Typography level="body-sm">활동 목록이 여기 표시됩니다</Typography>
389
+ </Box>
390
+ </Grid>
391
+ </Grid>
392
+ </div>
393
+
394
+ {/* Product Grid */}
395
+ <div>
396
+ <Typography level="title-md" sx={{
397
+ mb: 2
398
+ }}>
399
+ 제품 그리드
400
+ </Typography>
401
+ <Grid container spacing={2}>
402
+ {[1, 2, 3, 4, 5, 6].map(item => <Grid key={item} xs={12} sm={6} md={4} lg={2}>
403
+ <Box sx={{
404
+ p: 2,
405
+ bgcolor: 'background.body',
406
+ border: '1px solid',
407
+ borderColor: 'divider',
408
+ borderRadius: 'md',
409
+ textAlign: 'center'
410
+ }}>
411
+ <Box sx={{
412
+ width: '100%',
413
+ height: 80,
414
+ bgcolor: 'neutral.100',
415
+ borderRadius: 'sm',
416
+ mb: 1,
417
+ display: 'flex',
418
+ alignItems: 'center',
419
+ justifyContent: 'center'
420
+ }}>
421
+ <Typography level="body-xs">제품 {item}</Typography>
422
+ </Box>
423
+ <Typography level="body-sm">제품명</Typography>
424
+ <Typography level="body-xs" sx={{
425
+ color: 'text.secondary'
426
+ }}>
427
+ ₩10,000
428
+ </Typography>
429
+ </Box>
430
+ </Grid>)}
431
+ </Grid>
432
+ </div>
433
+ </div>
434
+ ```
435
+
436
+ ### Breakpoint Demo
437
+
438
+ 각 브레이크포인트에서 어떻게 동작하는지 보여주는 예제입니다.
439
+
440
+ ```tsx
441
+ <div>
442
+ <Typography level="title-md" sx={{
443
+ mb: 2
444
+ }}>
445
+ 브레이크포인트 데모 - 각 화면 크기에서 다른 레이아웃
446
+ </Typography>
447
+
448
+ <Box sx={{
449
+ mb: 2
450
+ }}>
451
+ <Typography level="body-sm" sx={{
452
+ color: 'text.secondary'
453
+ }}>
454
+ • xs (0px+): 모든 아이템이 한 줄로
455
+ <br />
456
+ • sm (600px+): 2개씩 배치
457
+ <br />
458
+ • md (900px+): 3개씩 배치
459
+ <br />• lg (1200px+): 4개씩 배치
460
+ </Typography>
461
+ </Box>
462
+
463
+ <Grid container spacing={2}>
464
+ <GridItem xs={12} sm={6} md={4} lg={3}>
465
+ <Typography level="body-sm">첫 번째 아이템</Typography>
466
+ </GridItem>
467
+ <GridItem xs={12} sm={6} md={4} lg={3}>
468
+ <Typography level="body-sm">두 번째 아이템</Typography>
469
+ </GridItem>
470
+ <GridItem xs={12} sm={6} md={4} lg={3}>
471
+ <Typography level="body-sm">세 번째 아이템</Typography>
472
+ </GridItem>
473
+ <GridItem xs={12} sm={6} md={4} lg={3}>
474
+ <Typography level="body-sm">네 번째 아이템</Typography>
475
+ </GridItem>
476
+ <GridItem xs={12} sm={6} md={4} lg={3}>
477
+ <Typography level="body-sm">다섯 번째 아이템</Typography>
478
+ </GridItem>
479
+ <GridItem xs={12} sm={6} md={4} lg={3}>
480
+ <Typography level="body-sm">여섯 번째 아이템</Typography>
481
+ </GridItem>
482
+ <GridItem xs={12} sm={6} md={4} lg={3}>
483
+ <Typography level="body-sm">일곱 번째 아이템</Typography>
484
+ </GridItem>
485
+ <GridItem xs={12} sm={6} md={4} lg={3}>
486
+ <Typography level="body-sm">여덟 번째 아이템</Typography>
487
+ </GridItem>
488
+ </Grid>
489
+ </div>
490
+ ```
491
+
492
+ ## Grid System
493
+
494
+ ### 12열 시스템
495
+
496
+ Grid는 12열 시스템을 기반으로 합니다. 각 아이템은 1-12열을 차지할 수 있습니다.
497
+
498
+ ```tsx
499
+ <Grid container spacing={2}>
500
+ <Grid item xs={12}>전체 너비 (12/12)</Grid>
501
+ <Grid item xs={6}>절반 너비 (6/12)</Grid>
502
+ <Grid item xs={6}>절반 너비 (6/12)</Grid>
503
+ <Grid item xs={4}>3분의 1 너비 (4/12)</Grid>
504
+ <Grid item xs={4}>3분의 1 너비 (4/12)</Grid>
505
+ <Grid item xs={4}>3분의 1 너비 (4/12)</Grid>
506
+ </Grid>
507
+ ```
508
+
509
+ ### Container & Item
510
+
511
+ - `container`: Grid 컨테이너를 만들 때 사용
512
+ - `item`: Grid 아이템을 만들 때 사용
513
+ - 한 컴포넌트가 동시에 container와 item이 될 수 있습니다 (중첩 그리드)
514
+
515
+ ## Breakpoints
516
+
517
+ Grid는 다음 브레이크포인트를 지원합니다:
518
+
519
+ | 브레이크포인트 | 크기 | 설명 |
520
+ | ------- | ------- | ----------------- |
521
+ | `xs` | 0px+ | 모바일 (세로) |
522
+ | `sm` | 600px+ | 모바일 (가로) / 작은 태블릿 |
523
+ | `md` | 900px+ | 태블릿 |
524
+ | `lg` | 1200px+ | 데스크톱 |
525
+ | `xl` | 1536px+ | 큰 데스크톱 |
526
+
527
+ ### 반응형 사용법
528
+
529
+ ```tsx
530
+ <Grid container spacing={2}>
531
+ <Grid item xs={12} sm={6} md={4} lg={3}>
532
+ {/*
533
+ xs: 100% (12/12) - 모바일에서 전체 너비
534
+ sm: 50% (6/12) - 작은 화면에서 절반 너비
535
+ md: 33% (4/12) - 태블릿에서 3분의 1 너비
536
+ lg: 25% (3/12) - 데스크톱에서 4분의 1 너비
537
+ */}
538
+ 반응형 아이템
539
+ </Grid>
540
+ </Grid>
541
+ ```
542
+
543
+ ## Spacing
544
+
545
+ `spacing` prop을 사용하여 그리드 아이템 간의 간격을 조절할 수 있습니다.
546
+
547
+ | 값 | 크기 | 설명 |
548
+ | --- | ---- | ----------- |
549
+ | `0` | 0px | 간격 없음 |
550
+ | `1` | 8px | 아주 작은 간격 |
551
+ | `2` | 16px | 작은 간격 (기본값) |
552
+ | `3` | 24px | 중간 간격 |
553
+ | `4` | 32px | 큰 간격 |
554
+ | `5` | 40px | 아주 큰 간격 |
555
+ | `6` | 48px | 최대 간격 |
556
+
557
+ ## Auto Layout
558
+
559
+ 열 수를 명시하지 않고 자동으로 배치되도록 할 수 있습니다:
560
+
561
+ ```tsx
562
+ <Grid container spacing={2}>
563
+ <Grid item xs>자동 너비 1</Grid>
564
+ <Grid item xs>자동 너비 2</Grid>
565
+ <Grid item xs>자동 너비 3</Grid>
566
+ </Grid>
567
+
568
+ <Grid container spacing={2}>
569
+ <Grid item xs="auto">내용에 맞춰 자동 크기</Grid>
570
+ <Grid item xs>남은 공간 모두 차지</Grid>
571
+ <Grid item xs="auto">내용에 맞춰 자동 크기</Grid>
572
+ </Grid>
573
+ ```
574
+
575
+ ## Common Use Cases
576
+
577
+ ### Card Layout
578
+
579
+ ```tsx
580
+ <Grid container spacing={3}>
581
+ {products.map((product) => (
582
+ <Grid key={product.id} item xs={12} sm={6} md={4} lg={3}>
583
+ <Card>
584
+ <CardContent>
585
+ <Typography level="title-md">{product.name}</Typography>
586
+ <Typography level="body-sm">{product.price}</Typography>
587
+ </CardContent>
588
+ </Card>
589
+ </Grid>
590
+ ))}
591
+ </Grid>
592
+ ```
593
+
594
+ ### Dashboard Layout
595
+
596
+ ```tsx
597
+ <Grid container spacing={2}>
598
+ {/* Header */}
599
+ <Grid item xs={12}>
600
+ <Paper sx={{ p: 2 }}>Dashboard Header</Paper>
601
+ </Grid>
602
+
603
+ {/* Stats */}
604
+ <Grid item xs={12} sm={6} md={3}>
605
+ <StatCard title="Users" value="1,234" />
606
+ </Grid>
607
+ <Grid item xs={12} sm={6} md={3}>
608
+ <StatCard title="Revenue" value="$5.6M" />
609
+ </Grid>
610
+ <Grid item xs={12} sm={6} md={3}>
611
+ <StatCard title="Orders" value="789" />
612
+ </Grid>
613
+ <Grid item xs={12} sm={6} md={3}>
614
+ <StatCard title="Growth" value="+12%" />
615
+ </Grid>
616
+
617
+ {/* Main Content */}
618
+ <Grid item xs={12} lg={8}>
619
+ <Paper sx={{ p: 2, minHeight: 400 }}>Chart Area</Paper>
620
+ </Grid>
621
+
622
+ {/* Sidebar */}
623
+ <Grid item xs={12} lg={4}>
624
+ <Paper sx={{ p: 2, minHeight: 400 }}>Recent Activity</Paper>
625
+ </Grid>
626
+ </Grid>
627
+ ```
628
+
629
+ ### Form Layout
630
+
631
+ ```tsx
632
+ <Grid container spacing={2}>
633
+ <Grid item xs={12} md={6}>
634
+ <FormControl fullWidth>
635
+ <FormLabel>First Name</FormLabel>
636
+ <Input placeholder="Enter first name" />
637
+ </FormControl>
638
+ </Grid>
639
+
640
+ <Grid item xs={12} md={6}>
641
+ <FormControl fullWidth>
642
+ <FormLabel>Last Name</FormLabel>
643
+ <Input placeholder="Enter last name" />
644
+ </FormControl>
645
+ </Grid>
646
+
647
+ <Grid item xs={12}>
648
+ <FormControl fullWidth>
649
+ <FormLabel>Email</FormLabel>
650
+ <Input type="email" placeholder="Enter email" />
651
+ </FormControl>
652
+ </Grid>
653
+
654
+ <Grid item xs={12}>
655
+ <Button type="submit" fullWidth>Submit</Button>
656
+ </Grid>
657
+ </Grid>
658
+ ```
659
+
660
+ ### Image Gallery
661
+
662
+ ```tsx
663
+ <Grid container spacing={1}>
664
+ {images.map((image, index) => (
665
+ <Grid key={index} item xs={6} sm={4} md={3} lg={2}>
666
+ <Box
667
+ sx={{
668
+ position: 'relative',
669
+ paddingTop: '100%', // 1:1 비율 유지
670
+ overflow: 'hidden',
671
+ borderRadius: 'sm',
672
+ }}
673
+ >
674
+ <img
675
+ src={image.src}
676
+ alt={image.alt}
677
+ style={{
678
+ position: 'absolute',
679
+ top: 0,
680
+ left: 0,
681
+ width: '100%',
682
+ height: '100%',
683
+ objectFit: 'cover',
684
+ }}
685
+ />
686
+ </Box>
687
+ </Grid>
688
+ ))}
689
+ </Grid>
690
+ ```
691
+
692
+ ## Best Practices
693
+
694
+ 1. **의미 있는 구조**: Grid를 사용할 때 HTML의 의미구조를 고려하여 적절한 요소를 선택하세요.
695
+
696
+ 2. **반응형 우선 설계**: 모바일부터 시작하여 큰 화면으로 확장하는 방식으로 설계하세요.
697
+
698
+ 3. **일관된 간격**: 프로젝트 전반에서 일관된 spacing 값을 사용하세요.
699
+
700
+ 4. **성능 최적화**:
701
+ - 불필요하게 깊은 중첩은 피하세요
702
+ - 많은 아이템이 있을 때는 가상화를 고려하세요
703
+
704
+ 5. **접근성**:
705
+ - 적절한 시맨틱 태그를 사용하세요
706
+ - 키보드 탐색이 논리적으로 이뤄지도록 배치하세요
707
+
708
+ 6. **콘텐츠 우선**: 그리드가 콘텐츠를 억지로 맞추는 것이 아니라 콘텐츠에 맞춰 조정되도록 하세요.
709
+
710
+ 7. **디버깅**: 개발 중에는 Grid 아이템에 배경색을 적용해 레이아웃을 쉽게 확인하세요.
711
+
712
+ ## Troubleshooting
713
+
714
+ ### 흔한 문제들
715
+
716
+ 1. **아이템이 예상과 다르게 배치됨**
717
+ - 12를 넘지 않도록 열 수를 확인하세요
718
+ - container와 item props가 올바르게 설정되었는지 확인하세요
719
+
720
+ 2. **간격이 적용되지 않음**
721
+ - container에 spacing prop이 설정되었는지 확인하세요
722
+ - 자식 요소들이 Grid item으로 감싸져 있는지 확인하세요
723
+
724
+ 3. **반응형이 동작하지 않음**
725
+ - 브레이크포인트 값이 올바른지 확인하세요
726
+ - 각 브레이크포인트에서 의도한 합계가 12 이하인지 확인하세요
727
+
728
+ Grid는 복잡한 레이아웃을 구현하는 강력한 도구입니다. 반응형 디자인과 일관된 간격을 통해 사용자 경험을 향상시킬 수 있습니다.