@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,1330 @@
|
|
|
1
|
+
# Table
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
> **참고**: 대용량의 데이터를 보여주기 위한 경우 DataTable 컴포넌트가 더 알맞을 수 있으니 참고하세요. Table 컴포넌트는 양이 적지만 커스터마이징이 자유롭고 복잡한 형태의 UI를 Cell에 표현할 때 알맞습니다. rowSpan, colSpan 등 셀 병합이나 단순하지 않은 형태의 테이블도 Table 컴포넌트를 조합하여 구현하는 것을 권장합니다.
|
|
6
|
+
|
|
7
|
+
Table 컴포넌트는 구조화된 데이터를 표 형태로 표시하는 기본적인 테이블 컴포넌트입니다. Joy UI의 Table을 기반으로 하며, 유연한 커스터마이징과 복잡한 레이아웃을 지원합니다. 간단한 데이터 표시부터 복잡한 셀 병합, 사용자 정의 콘텐츠까지 다양한 용도로 활용할 수 있습니다.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<Table aria-label="basic table" {...args}>
|
|
11
|
+
<TableHead headCells={headCells} />
|
|
12
|
+
<TableBody rows={rows} rowOptions={{
|
|
13
|
+
calories: {
|
|
14
|
+
numeric: true
|
|
15
|
+
},
|
|
16
|
+
fat: {
|
|
17
|
+
numeric: true
|
|
18
|
+
},
|
|
19
|
+
carbs: {
|
|
20
|
+
numeric: true
|
|
21
|
+
},
|
|
22
|
+
protein: {
|
|
23
|
+
numeric: true
|
|
24
|
+
}
|
|
25
|
+
}} cellOrder={['dessert', 'calories', 'fat', 'carbs', 'protein']} />
|
|
26
|
+
</Table>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Field | Description | Default |
|
|
30
|
+
| ---------------------------- | ----------- | ------- |
|
|
31
|
+
| Controls resolved at runtime | — | — |
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { Table, TableHead, TableBody } from '@ceed/ads';
|
|
37
|
+
|
|
38
|
+
function MyComponent() {
|
|
39
|
+
const headCells = [
|
|
40
|
+
{ label: '이름', width: '30%' },
|
|
41
|
+
{ label: '이메일', width: '40%' },
|
|
42
|
+
{ label: '역할', numeric: false },
|
|
43
|
+
{ label: '가입일', numeric: false },
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const rows = [
|
|
47
|
+
{ name: '김철수', email: 'kim@example.com', role: '관리자', joinDate: '2024-01-15' },
|
|
48
|
+
{ name: '이영희', email: 'lee@example.com', role: '사용자', joinDate: '2024-02-01' },
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Table>
|
|
53
|
+
<TableHead headCells={headCells} />
|
|
54
|
+
<TableBody
|
|
55
|
+
rows={rows}
|
|
56
|
+
cellOrder={['name', 'email', 'role', 'joinDate']}
|
|
57
|
+
/>
|
|
58
|
+
</Table>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
### Basic Examples
|
|
66
|
+
|
|
67
|
+
가장 기본적인 Table 사용법들입니다.
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
<Table aria-label="basic table" {...args}>
|
|
71
|
+
<TableHead headCells={headCells} />
|
|
72
|
+
<TableBody rows={rows} rowOptions={{
|
|
73
|
+
calories: {
|
|
74
|
+
numeric: true
|
|
75
|
+
},
|
|
76
|
+
fat: {
|
|
77
|
+
numeric: true
|
|
78
|
+
},
|
|
79
|
+
carbs: {
|
|
80
|
+
numeric: true
|
|
81
|
+
},
|
|
82
|
+
protein: {
|
|
83
|
+
numeric: true
|
|
84
|
+
}
|
|
85
|
+
}} cellOrder={['dessert', 'calories', 'fat', 'carbs', 'protein']} />
|
|
86
|
+
</Table>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### With Hover Effect
|
|
90
|
+
|
|
91
|
+
행에 마우스 오버시 하이라이트 효과를 적용할 수 있습니다.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<Table
|
|
95
|
+
children="Table"
|
|
96
|
+
hoverRow
|
|
97
|
+
/>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### With Checkbox Selection
|
|
101
|
+
|
|
102
|
+
체크박스를 포함한 선택 가능한 테이블입니다.
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
<Table aria-label="checkbox table" hoverRow {...args}>
|
|
106
|
+
<TableHead showCheckbox headCells={headCells} />
|
|
107
|
+
<TableBody showCheckbox rows={rows} rowOptions={{
|
|
108
|
+
calories: {
|
|
109
|
+
numeric: true
|
|
110
|
+
},
|
|
111
|
+
fat: {
|
|
112
|
+
numeric: true
|
|
113
|
+
},
|
|
114
|
+
carbs: {
|
|
115
|
+
numeric: true
|
|
116
|
+
},
|
|
117
|
+
protein: {
|
|
118
|
+
numeric: true
|
|
119
|
+
}
|
|
120
|
+
}} cellOrder={['dessert', 'calories', 'fat', 'carbs', 'protein']} />
|
|
121
|
+
</Table>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Common Use Cases
|
|
125
|
+
|
|
126
|
+
### User Management Table
|
|
127
|
+
|
|
128
|
+
사용자 관리에 활용할 수 있는 테이블입니다. 아바타, 역할 표시, 상태 인디케이터, 액션 버튼이 포함되어 있습니다.
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
<Table aria-label="user management table" hoverRow>
|
|
132
|
+
<thead>
|
|
133
|
+
<tr>
|
|
134
|
+
<th style={{
|
|
135
|
+
width: '30%'
|
|
136
|
+
}}>사용자</th>
|
|
137
|
+
<th style={{
|
|
138
|
+
width: '25%'
|
|
139
|
+
}}>이메일</th>
|
|
140
|
+
<th style={{
|
|
141
|
+
width: '15%'
|
|
142
|
+
}}>역할</th>
|
|
143
|
+
<th style={{
|
|
144
|
+
width: '15%'
|
|
145
|
+
}}>상태</th>
|
|
146
|
+
<th style={{
|
|
147
|
+
width: '15%'
|
|
148
|
+
}}>작업</th>
|
|
149
|
+
</tr>
|
|
150
|
+
</thead>
|
|
151
|
+
<tbody>
|
|
152
|
+
<tr>
|
|
153
|
+
<td>
|
|
154
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
155
|
+
<Avatar size="sm" variant="soft" color="primary">
|
|
156
|
+
김
|
|
157
|
+
</Avatar>
|
|
158
|
+
<Stack spacing={0}>
|
|
159
|
+
<Typography level="title-sm">김철수</Typography>
|
|
160
|
+
<Typography level="body-xs" color="neutral">
|
|
161
|
+
kim@example.com
|
|
162
|
+
</Typography>
|
|
163
|
+
</Stack>
|
|
164
|
+
</Stack>
|
|
165
|
+
</td>
|
|
166
|
+
<td>kim@example.com</td>
|
|
167
|
+
<td>
|
|
168
|
+
<Chip size="sm" variant="soft" color="primary">
|
|
169
|
+
관리자
|
|
170
|
+
</Chip>
|
|
171
|
+
</td>
|
|
172
|
+
<td>
|
|
173
|
+
<Chip size="sm" variant="soft" color="success">
|
|
174
|
+
활성
|
|
175
|
+
</Chip>
|
|
176
|
+
</td>
|
|
177
|
+
<td>
|
|
178
|
+
<Stack direction="row" spacing={1}>
|
|
179
|
+
<IconButton size="sm" variant="plain">
|
|
180
|
+
<EditIcon />
|
|
181
|
+
</IconButton>
|
|
182
|
+
<IconButton size="sm" variant="plain" color="danger">
|
|
183
|
+
<DeleteIcon />
|
|
184
|
+
</IconButton>
|
|
185
|
+
<Dropdown>
|
|
186
|
+
<MenuButton variant="plain" size="sm" sx={{
|
|
187
|
+
minHeight: 'auto',
|
|
188
|
+
p: 1
|
|
189
|
+
}}>
|
|
190
|
+
<MoreVertIcon />
|
|
191
|
+
</MenuButton>
|
|
192
|
+
<Menu placement="bottom-end">
|
|
193
|
+
<MenuItem>상세 보기</MenuItem>
|
|
194
|
+
<MenuItem>권한 변경</MenuItem>
|
|
195
|
+
<MenuItem color="danger">계정 비활성화</MenuItem>
|
|
196
|
+
</Menu>
|
|
197
|
+
</Dropdown>
|
|
198
|
+
</Stack>
|
|
199
|
+
</td>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<td>
|
|
203
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
204
|
+
<Avatar size="sm" variant="soft" color="primary">
|
|
205
|
+
이
|
|
206
|
+
</Avatar>
|
|
207
|
+
<Stack spacing={0}>
|
|
208
|
+
<Typography level="title-sm">이영희</Typography>
|
|
209
|
+
<Typography level="body-xs" color="neutral">
|
|
210
|
+
lee@example.com
|
|
211
|
+
</Typography>
|
|
212
|
+
</Stack>
|
|
213
|
+
</Stack>
|
|
214
|
+
</td>
|
|
215
|
+
<td>lee@example.com</td>
|
|
216
|
+
<td>
|
|
217
|
+
<Chip size="sm" variant="soft" color="neutral">
|
|
218
|
+
사용자
|
|
219
|
+
</Chip>
|
|
220
|
+
</td>
|
|
221
|
+
<td>
|
|
222
|
+
<Chip size="sm" variant="soft" color="neutral">
|
|
223
|
+
비활성
|
|
224
|
+
</Chip>
|
|
225
|
+
</td>
|
|
226
|
+
<td>
|
|
227
|
+
<Stack direction="row" spacing={1}>
|
|
228
|
+
<IconButton size="sm" variant="plain">
|
|
229
|
+
<EditIcon />
|
|
230
|
+
</IconButton>
|
|
231
|
+
<IconButton size="sm" variant="plain" color="danger">
|
|
232
|
+
<DeleteIcon />
|
|
233
|
+
</IconButton>
|
|
234
|
+
<Dropdown>
|
|
235
|
+
<MenuButton variant="plain" size="sm" sx={{
|
|
236
|
+
minHeight: 'auto',
|
|
237
|
+
p: 1
|
|
238
|
+
}}>
|
|
239
|
+
<MoreVertIcon />
|
|
240
|
+
</MenuButton>
|
|
241
|
+
<Menu placement="bottom-end">
|
|
242
|
+
<MenuItem>상세 보기</MenuItem>
|
|
243
|
+
<MenuItem>권한 변경</MenuItem>
|
|
244
|
+
<MenuItem color="danger">계정 비활성화</MenuItem>
|
|
245
|
+
</Menu>
|
|
246
|
+
</Dropdown>
|
|
247
|
+
</Stack>
|
|
248
|
+
</td>
|
|
249
|
+
</tr>
|
|
250
|
+
<tr>
|
|
251
|
+
<td>
|
|
252
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
253
|
+
<Avatar size="sm" variant="soft" color="primary">
|
|
254
|
+
박
|
|
255
|
+
</Avatar>
|
|
256
|
+
<Stack spacing={0}>
|
|
257
|
+
<Typography level="title-sm">박민수</Typography>
|
|
258
|
+
<Typography level="body-xs" color="neutral">
|
|
259
|
+
park@example.com
|
|
260
|
+
</Typography>
|
|
261
|
+
</Stack>
|
|
262
|
+
</Stack>
|
|
263
|
+
</td>
|
|
264
|
+
<td>park@example.com</td>
|
|
265
|
+
<td>
|
|
266
|
+
<Chip size="sm" variant="soft" color="warning">
|
|
267
|
+
편집자
|
|
268
|
+
</Chip>
|
|
269
|
+
</td>
|
|
270
|
+
<td>
|
|
271
|
+
<Chip size="sm" variant="soft" color="success">
|
|
272
|
+
활성
|
|
273
|
+
</Chip>
|
|
274
|
+
</td>
|
|
275
|
+
<td>
|
|
276
|
+
<Stack direction="row" spacing={1}>
|
|
277
|
+
<IconButton size="sm" variant="plain">
|
|
278
|
+
<EditIcon />
|
|
279
|
+
</IconButton>
|
|
280
|
+
<IconButton size="sm" variant="plain" color="danger">
|
|
281
|
+
<DeleteIcon />
|
|
282
|
+
</IconButton>
|
|
283
|
+
<Dropdown>
|
|
284
|
+
<MenuButton variant="plain" size="sm" sx={{
|
|
285
|
+
minHeight: 'auto',
|
|
286
|
+
p: 1
|
|
287
|
+
}}>
|
|
288
|
+
<MoreVertIcon />
|
|
289
|
+
</MenuButton>
|
|
290
|
+
<Menu placement="bottom-end">
|
|
291
|
+
<MenuItem>상세 보기</MenuItem>
|
|
292
|
+
<MenuItem>권한 변경</MenuItem>
|
|
293
|
+
<MenuItem color="danger">계정 비활성화</MenuItem>
|
|
294
|
+
</Menu>
|
|
295
|
+
</Dropdown>
|
|
296
|
+
</Stack>
|
|
297
|
+
</td>
|
|
298
|
+
</tr>
|
|
299
|
+
</tbody>
|
|
300
|
+
</Table>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Product Inventory Table
|
|
304
|
+
|
|
305
|
+
제품 재고 관리를 위한 테이블입니다. 재고 상태, 가격 표시, 진행률 바 등을 포함합니다.
|
|
306
|
+
|
|
307
|
+
```tsx
|
|
308
|
+
<Table aria-label="product inventory table" hoverRow>
|
|
309
|
+
<thead>
|
|
310
|
+
<tr>
|
|
311
|
+
<th style={{
|
|
312
|
+
width: '25%'
|
|
313
|
+
}}>제품명</th>
|
|
314
|
+
<th style={{
|
|
315
|
+
width: '15%'
|
|
316
|
+
}}>카테고리</th>
|
|
317
|
+
<th style={{
|
|
318
|
+
width: '10%',
|
|
319
|
+
textAlign: 'right'
|
|
320
|
+
}}>재고</th>
|
|
321
|
+
<th style={{
|
|
322
|
+
width: '15%',
|
|
323
|
+
textAlign: 'right'
|
|
324
|
+
}}>가격</th>
|
|
325
|
+
<th style={{
|
|
326
|
+
width: '15%'
|
|
327
|
+
}}>상태</th>
|
|
328
|
+
<th style={{
|
|
329
|
+
width: '20%'
|
|
330
|
+
}}>진행률</th>
|
|
331
|
+
</tr>
|
|
332
|
+
</thead>
|
|
333
|
+
<tbody>
|
|
334
|
+
<tr>
|
|
335
|
+
<td>MacBook Pro 16"</td>
|
|
336
|
+
<td>노트북</td>
|
|
337
|
+
<td style={{
|
|
338
|
+
textAlign: 'right'
|
|
339
|
+
}}>25</td>
|
|
340
|
+
<td style={{
|
|
341
|
+
textAlign: 'right'
|
|
342
|
+
}}>₩2,590,000</td>
|
|
343
|
+
<td>
|
|
344
|
+
<Chip size="sm" variant="soft" color="success">
|
|
345
|
+
재고 있음
|
|
346
|
+
</Chip>
|
|
347
|
+
</td>
|
|
348
|
+
<td>
|
|
349
|
+
<Box sx={{
|
|
350
|
+
display: 'flex',
|
|
351
|
+
alignItems: 'center',
|
|
352
|
+
gap: 2,
|
|
353
|
+
minWidth: 120
|
|
354
|
+
}}>
|
|
355
|
+
<LinearProgress determinate value={85} sx={{
|
|
356
|
+
flex: 1
|
|
357
|
+
}} color="success" />
|
|
358
|
+
<Typography level="body-xs">85%</Typography>
|
|
359
|
+
</Box>
|
|
360
|
+
</td>
|
|
361
|
+
</tr>
|
|
362
|
+
<tr>
|
|
363
|
+
<td>iPhone 15 Pro</td>
|
|
364
|
+
<td>스마트폰</td>
|
|
365
|
+
<td style={{
|
|
366
|
+
textAlign: 'right'
|
|
367
|
+
}}>3</td>
|
|
368
|
+
<td style={{
|
|
369
|
+
textAlign: 'right'
|
|
370
|
+
}}>₩1,550,000</td>
|
|
371
|
+
<td>
|
|
372
|
+
<Chip size="sm" variant="soft" color="warning">
|
|
373
|
+
재고 부족
|
|
374
|
+
</Chip>
|
|
375
|
+
</td>
|
|
376
|
+
<td>
|
|
377
|
+
<Box sx={{
|
|
378
|
+
display: 'flex',
|
|
379
|
+
alignItems: 'center',
|
|
380
|
+
gap: 2,
|
|
381
|
+
minWidth: 120
|
|
382
|
+
}}>
|
|
383
|
+
<LinearProgress determinate value={15} sx={{
|
|
384
|
+
flex: 1
|
|
385
|
+
}} color="danger" />
|
|
386
|
+
<Typography level="body-xs">15%</Typography>
|
|
387
|
+
</Box>
|
|
388
|
+
</td>
|
|
389
|
+
</tr>
|
|
390
|
+
<tr>
|
|
391
|
+
<td>iPad Air</td>
|
|
392
|
+
<td>태블릿</td>
|
|
393
|
+
<td style={{
|
|
394
|
+
textAlign: 'right'
|
|
395
|
+
}}>0</td>
|
|
396
|
+
<td style={{
|
|
397
|
+
textAlign: 'right'
|
|
398
|
+
}}>₩899,000</td>
|
|
399
|
+
<td>
|
|
400
|
+
<Chip size="sm" variant="soft" color="danger">
|
|
401
|
+
품절
|
|
402
|
+
</Chip>
|
|
403
|
+
</td>
|
|
404
|
+
<td>
|
|
405
|
+
<Box sx={{
|
|
406
|
+
display: 'flex',
|
|
407
|
+
alignItems: 'center',
|
|
408
|
+
gap: 2,
|
|
409
|
+
minWidth: 120
|
|
410
|
+
}}>
|
|
411
|
+
<LinearProgress determinate value={0} sx={{
|
|
412
|
+
flex: 1
|
|
413
|
+
}} color="danger" />
|
|
414
|
+
<Typography level="body-xs">0%</Typography>
|
|
415
|
+
</Box>
|
|
416
|
+
</td>
|
|
417
|
+
</tr>
|
|
418
|
+
</tbody>
|
|
419
|
+
</Table>
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Task Management Table
|
|
423
|
+
|
|
424
|
+
프로젝트의 작업 관리를 위한 테이블입니다. 담당자, 우선순위, 진행률, 마감일 등을 표시합니다.
|
|
425
|
+
|
|
426
|
+
```tsx
|
|
427
|
+
<Table aria-label="task management table" hoverRow>
|
|
428
|
+
<thead>
|
|
429
|
+
<tr>
|
|
430
|
+
<th style={{
|
|
431
|
+
width: '30%'
|
|
432
|
+
}}>작업</th>
|
|
433
|
+
<th style={{
|
|
434
|
+
width: '20%'
|
|
435
|
+
}}>담당자</th>
|
|
436
|
+
<th style={{
|
|
437
|
+
width: '15%'
|
|
438
|
+
}}>우선순위</th>
|
|
439
|
+
<th style={{
|
|
440
|
+
width: '20%'
|
|
441
|
+
}}>진행률</th>
|
|
442
|
+
<th style={{
|
|
443
|
+
width: '15%'
|
|
444
|
+
}}>마감일</th>
|
|
445
|
+
</tr>
|
|
446
|
+
</thead>
|
|
447
|
+
<tbody>
|
|
448
|
+
<tr>
|
|
449
|
+
<td>
|
|
450
|
+
<Stack spacing={0.5}>
|
|
451
|
+
<Typography level="title-sm">UI 컴포넌트 개발</Typography>
|
|
452
|
+
<Typography level="body-xs" color="neutral">
|
|
453
|
+
새로운 테이블 컴포넌트 구현
|
|
454
|
+
</Typography>
|
|
455
|
+
</Stack>
|
|
456
|
+
</td>
|
|
457
|
+
<td>
|
|
458
|
+
<Stack direction="row" spacing={1} alignItems="center">
|
|
459
|
+
<Avatar size="sm" variant="soft">
|
|
460
|
+
김
|
|
461
|
+
</Avatar>
|
|
462
|
+
<Typography level="body-sm">김개발</Typography>
|
|
463
|
+
</Stack>
|
|
464
|
+
</td>
|
|
465
|
+
<td>
|
|
466
|
+
<Chip size="sm" variant="soft" color="danger">
|
|
467
|
+
높음
|
|
468
|
+
</Chip>
|
|
469
|
+
</td>
|
|
470
|
+
<td>
|
|
471
|
+
<Box sx={{
|
|
472
|
+
display: 'flex',
|
|
473
|
+
alignItems: 'center',
|
|
474
|
+
gap: 2
|
|
475
|
+
}}>
|
|
476
|
+
<LinearProgress determinate value={75} sx={{
|
|
477
|
+
flex: 1,
|
|
478
|
+
minWidth: 80
|
|
479
|
+
}} color="success" />
|
|
480
|
+
<Typography level="body-xs">75%</Typography>
|
|
481
|
+
</Box>
|
|
482
|
+
</td>
|
|
483
|
+
<td>
|
|
484
|
+
<Typography level="body-sm" color="neutral">
|
|
485
|
+
2024-01-20
|
|
486
|
+
</Typography>
|
|
487
|
+
</td>
|
|
488
|
+
</tr>
|
|
489
|
+
<tr>
|
|
490
|
+
<td>
|
|
491
|
+
<Stack spacing={0.5}>
|
|
492
|
+
<Typography level="title-sm">API 연동</Typography>
|
|
493
|
+
<Typography level="body-xs" color="neutral">
|
|
494
|
+
사용자 관리 API 연동 작업
|
|
495
|
+
</Typography>
|
|
496
|
+
</Stack>
|
|
497
|
+
</td>
|
|
498
|
+
<td>
|
|
499
|
+
<Stack direction="row" spacing={1} alignItems="center">
|
|
500
|
+
<Avatar size="sm" variant="soft">
|
|
501
|
+
이
|
|
502
|
+
</Avatar>
|
|
503
|
+
<Typography level="body-sm">이백엔드</Typography>
|
|
504
|
+
</Stack>
|
|
505
|
+
</td>
|
|
506
|
+
<td>
|
|
507
|
+
<Chip size="sm" variant="soft" color="warning">
|
|
508
|
+
중간
|
|
509
|
+
</Chip>
|
|
510
|
+
</td>
|
|
511
|
+
<td>
|
|
512
|
+
<Box sx={{
|
|
513
|
+
display: 'flex',
|
|
514
|
+
alignItems: 'center',
|
|
515
|
+
gap: 2
|
|
516
|
+
}}>
|
|
517
|
+
<LinearProgress determinate value={50} sx={{
|
|
518
|
+
flex: 1,
|
|
519
|
+
minWidth: 80
|
|
520
|
+
}} color="warning" />
|
|
521
|
+
<Typography level="body-xs">50%</Typography>
|
|
522
|
+
</Box>
|
|
523
|
+
</td>
|
|
524
|
+
<td>
|
|
525
|
+
<Typography level="body-sm" color="neutral">
|
|
526
|
+
2024-01-25
|
|
527
|
+
</Typography>
|
|
528
|
+
</td>
|
|
529
|
+
</tr>
|
|
530
|
+
<tr>
|
|
531
|
+
<td>
|
|
532
|
+
<Stack spacing={0.5}>
|
|
533
|
+
<Typography level="title-sm">테스트 작성</Typography>
|
|
534
|
+
<Typography level="body-xs" color="neutral">
|
|
535
|
+
단위 테스트 및 통합 테스트
|
|
536
|
+
</Typography>
|
|
537
|
+
</Stack>
|
|
538
|
+
</td>
|
|
539
|
+
<td>
|
|
540
|
+
<Stack direction="row" spacing={1} alignItems="center">
|
|
541
|
+
<Avatar size="sm" variant="soft">
|
|
542
|
+
박
|
|
543
|
+
</Avatar>
|
|
544
|
+
<Typography level="body-sm">박테스터</Typography>
|
|
545
|
+
</Stack>
|
|
546
|
+
</td>
|
|
547
|
+
<td>
|
|
548
|
+
<Chip size="sm" variant="soft" color="success">
|
|
549
|
+
낮음
|
|
550
|
+
</Chip>
|
|
551
|
+
</td>
|
|
552
|
+
<td>
|
|
553
|
+
<Box sx={{
|
|
554
|
+
display: 'flex',
|
|
555
|
+
alignItems: 'center',
|
|
556
|
+
gap: 2
|
|
557
|
+
}}>
|
|
558
|
+
<LinearProgress determinate value={25} sx={{
|
|
559
|
+
flex: 1,
|
|
560
|
+
minWidth: 80
|
|
561
|
+
}} color="primary" />
|
|
562
|
+
<Typography level="body-xs">25%</Typography>
|
|
563
|
+
</Box>
|
|
564
|
+
</td>
|
|
565
|
+
<td>
|
|
566
|
+
<Typography level="body-sm" color="neutral">
|
|
567
|
+
2024-01-30
|
|
568
|
+
</Typography>
|
|
569
|
+
</td>
|
|
570
|
+
</tr>
|
|
571
|
+
</tbody>
|
|
572
|
+
</Table>
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### Sales Report with Cell Merging
|
|
576
|
+
|
|
577
|
+
복잡한 셀 병합을 사용한 매출 보고서 테이블입니다. rowSpan과 colSpan을 활용한 예제입니다.
|
|
578
|
+
|
|
579
|
+
```tsx
|
|
580
|
+
<Table aria-label="sales report table with merged cells">
|
|
581
|
+
<thead>
|
|
582
|
+
<tr>
|
|
583
|
+
<th rowSpan={2} style={{
|
|
584
|
+
textAlign: 'center',
|
|
585
|
+
verticalAlign: 'middle',
|
|
586
|
+
backgroundColor: '#f8f9fa',
|
|
587
|
+
fontWeight: 600
|
|
588
|
+
}}>
|
|
589
|
+
지역
|
|
590
|
+
</th>
|
|
591
|
+
<th colSpan={2} style={{
|
|
592
|
+
textAlign: 'center',
|
|
593
|
+
backgroundColor: '#f8f9fa',
|
|
594
|
+
fontWeight: 600
|
|
595
|
+
}}>
|
|
596
|
+
2024년 1분기
|
|
597
|
+
</th>
|
|
598
|
+
<th colSpan={2} style={{
|
|
599
|
+
textAlign: 'center',
|
|
600
|
+
backgroundColor: '#f8f9fa',
|
|
601
|
+
fontWeight: 600
|
|
602
|
+
}}>
|
|
603
|
+
2024년 2분기
|
|
604
|
+
</th>
|
|
605
|
+
<th rowSpan={2} style={{
|
|
606
|
+
textAlign: 'center',
|
|
607
|
+
verticalAlign: 'middle',
|
|
608
|
+
backgroundColor: '#f8f9fa',
|
|
609
|
+
fontWeight: 600
|
|
610
|
+
}}>
|
|
611
|
+
증감률
|
|
612
|
+
</th>
|
|
613
|
+
</tr>
|
|
614
|
+
<tr>
|
|
615
|
+
<th style={{
|
|
616
|
+
textAlign: 'center',
|
|
617
|
+
backgroundColor: '#f0f0f0',
|
|
618
|
+
fontWeight: 500
|
|
619
|
+
}}>매출</th>
|
|
620
|
+
<th style={{
|
|
621
|
+
textAlign: 'center',
|
|
622
|
+
backgroundColor: '#f0f0f0',
|
|
623
|
+
fontWeight: 500
|
|
624
|
+
}}>목표대비</th>
|
|
625
|
+
<th style={{
|
|
626
|
+
textAlign: 'center',
|
|
627
|
+
backgroundColor: '#f0f0f0',
|
|
628
|
+
fontWeight: 500
|
|
629
|
+
}}>매출</th>
|
|
630
|
+
<th style={{
|
|
631
|
+
textAlign: 'center',
|
|
632
|
+
backgroundColor: '#f0f0f0',
|
|
633
|
+
fontWeight: 500
|
|
634
|
+
}}>목표대비</th>
|
|
635
|
+
</tr>
|
|
636
|
+
</thead>
|
|
637
|
+
<tbody>
|
|
638
|
+
<tr>
|
|
639
|
+
<td style={{
|
|
640
|
+
fontWeight: 600
|
|
641
|
+
}}>서울</td>
|
|
642
|
+
<td style={{
|
|
643
|
+
textAlign: 'right'
|
|
644
|
+
}}>₩15,000만</td>
|
|
645
|
+
<td style={{
|
|
646
|
+
textAlign: 'center'
|
|
647
|
+
}}>
|
|
648
|
+
<Chip size="sm" variant="soft" color="success">
|
|
649
|
+
105%
|
|
650
|
+
</Chip>
|
|
651
|
+
</td>
|
|
652
|
+
<td style={{
|
|
653
|
+
textAlign: 'right'
|
|
654
|
+
}}>₩18,000만</td>
|
|
655
|
+
<td style={{
|
|
656
|
+
textAlign: 'center'
|
|
657
|
+
}}>
|
|
658
|
+
<Chip size="sm" variant="soft" color="success">
|
|
659
|
+
120%
|
|
660
|
+
</Chip>
|
|
661
|
+
</td>
|
|
662
|
+
<td style={{
|
|
663
|
+
textAlign: 'center'
|
|
664
|
+
}}>
|
|
665
|
+
<Chip size="sm" variant="soft" color="success">
|
|
666
|
+
+20%
|
|
667
|
+
</Chip>
|
|
668
|
+
</td>
|
|
669
|
+
</tr>
|
|
670
|
+
<tr>
|
|
671
|
+
<td style={{
|
|
672
|
+
fontWeight: 600
|
|
673
|
+
}}>부산</td>
|
|
674
|
+
<td style={{
|
|
675
|
+
textAlign: 'right'
|
|
676
|
+
}}>₩8,500만</td>
|
|
677
|
+
<td style={{
|
|
678
|
+
textAlign: 'center'
|
|
679
|
+
}}>
|
|
680
|
+
<Chip size="sm" variant="soft" color="warning">
|
|
681
|
+
95%
|
|
682
|
+
</Chip>
|
|
683
|
+
</td>
|
|
684
|
+
<td style={{
|
|
685
|
+
textAlign: 'right'
|
|
686
|
+
}}>₩9,200만</td>
|
|
687
|
+
<td style={{
|
|
688
|
+
textAlign: 'center'
|
|
689
|
+
}}>
|
|
690
|
+
<Chip size="sm" variant="soft" color="success">
|
|
691
|
+
102%
|
|
692
|
+
</Chip>
|
|
693
|
+
</td>
|
|
694
|
+
<td style={{
|
|
695
|
+
textAlign: 'center'
|
|
696
|
+
}}>
|
|
697
|
+
<Chip size="sm" variant="soft" color="success">
|
|
698
|
+
+8%
|
|
699
|
+
</Chip>
|
|
700
|
+
</td>
|
|
701
|
+
</tr>
|
|
702
|
+
<tr>
|
|
703
|
+
<td style={{
|
|
704
|
+
fontWeight: 600
|
|
705
|
+
}}>대구</td>
|
|
706
|
+
<td style={{
|
|
707
|
+
textAlign: 'right'
|
|
708
|
+
}}>₩6,200만</td>
|
|
709
|
+
<td style={{
|
|
710
|
+
textAlign: 'center'
|
|
711
|
+
}}>
|
|
712
|
+
<Chip size="sm" variant="soft" color="danger">
|
|
713
|
+
88%
|
|
714
|
+
</Chip>
|
|
715
|
+
</td>
|
|
716
|
+
<td style={{
|
|
717
|
+
textAlign: 'right'
|
|
718
|
+
}}>₩7,100만</td>
|
|
719
|
+
<td style={{
|
|
720
|
+
textAlign: 'center'
|
|
721
|
+
}}>
|
|
722
|
+
<Chip size="sm" variant="soft" color="success">
|
|
723
|
+
110%
|
|
724
|
+
</Chip>
|
|
725
|
+
</td>
|
|
726
|
+
<td style={{
|
|
727
|
+
textAlign: 'center'
|
|
728
|
+
}}>
|
|
729
|
+
<Chip size="sm" variant="soft" color="success">
|
|
730
|
+
+15%
|
|
731
|
+
</Chip>
|
|
732
|
+
</td>
|
|
733
|
+
</tr>
|
|
734
|
+
<tr style={{
|
|
735
|
+
backgroundColor: '#f8f9fa',
|
|
736
|
+
fontWeight: 600
|
|
737
|
+
}}>
|
|
738
|
+
<td>합계</td>
|
|
739
|
+
<td style={{
|
|
740
|
+
textAlign: 'right'
|
|
741
|
+
}}>₩29,700만</td>
|
|
742
|
+
<td style={{
|
|
743
|
+
textAlign: 'center'
|
|
744
|
+
}}>
|
|
745
|
+
<Chip size="sm" variant="solid" color="primary">
|
|
746
|
+
99%
|
|
747
|
+
</Chip>
|
|
748
|
+
</td>
|
|
749
|
+
<td style={{
|
|
750
|
+
textAlign: 'right'
|
|
751
|
+
}}>₩34,300만</td>
|
|
752
|
+
<td style={{
|
|
753
|
+
textAlign: 'center'
|
|
754
|
+
}}>
|
|
755
|
+
<Chip size="sm" variant="solid" color="primary">
|
|
756
|
+
112%
|
|
757
|
+
</Chip>
|
|
758
|
+
</td>
|
|
759
|
+
<td style={{
|
|
760
|
+
textAlign: 'center'
|
|
761
|
+
}}>
|
|
762
|
+
<Chip size="sm" variant="solid" color="success">
|
|
763
|
+
+15%
|
|
764
|
+
</Chip>
|
|
765
|
+
</td>
|
|
766
|
+
</tr>
|
|
767
|
+
</tbody>
|
|
768
|
+
</Table>
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
### Comparison Table
|
|
772
|
+
|
|
773
|
+
플랜이나 제품을 비교하는 테이블입니다. 불린 값을 시각적으로 표현합니다.
|
|
774
|
+
|
|
775
|
+
```tsx
|
|
776
|
+
<Table aria-label="plan comparison table">
|
|
777
|
+
<thead>
|
|
778
|
+
<tr>
|
|
779
|
+
<th style={{
|
|
780
|
+
width: '25%'
|
|
781
|
+
}}>기능</th>
|
|
782
|
+
<th style={{
|
|
783
|
+
width: '25%'
|
|
784
|
+
}}>Basic 플랜</th>
|
|
785
|
+
<th style={{
|
|
786
|
+
width: '25%'
|
|
787
|
+
}}>Pro 플랜</th>
|
|
788
|
+
<th style={{
|
|
789
|
+
width: '25%'
|
|
790
|
+
}}>Enterprise 플랜</th>
|
|
791
|
+
</tr>
|
|
792
|
+
</thead>
|
|
793
|
+
<tbody>
|
|
794
|
+
<tr>
|
|
795
|
+
<td>
|
|
796
|
+
<Typography level="title-sm" sx={{
|
|
797
|
+
fontWeight: 600
|
|
798
|
+
}}>
|
|
799
|
+
사용자 수
|
|
800
|
+
</Typography>
|
|
801
|
+
</td>
|
|
802
|
+
<td style={{
|
|
803
|
+
textAlign: 'center'
|
|
804
|
+
}}>최대 5명</td>
|
|
805
|
+
<td style={{
|
|
806
|
+
textAlign: 'center'
|
|
807
|
+
}}>최대 50명</td>
|
|
808
|
+
<td style={{
|
|
809
|
+
textAlign: 'center'
|
|
810
|
+
}}>무제한</td>
|
|
811
|
+
</tr>
|
|
812
|
+
<tr>
|
|
813
|
+
<td>
|
|
814
|
+
<Typography level="title-sm" sx={{
|
|
815
|
+
fontWeight: 600
|
|
816
|
+
}}>
|
|
817
|
+
저장공간
|
|
818
|
+
</Typography>
|
|
819
|
+
</td>
|
|
820
|
+
<td style={{
|
|
821
|
+
textAlign: 'center'
|
|
822
|
+
}}>10GB</td>
|
|
823
|
+
<td style={{
|
|
824
|
+
textAlign: 'center'
|
|
825
|
+
}}>100GB</td>
|
|
826
|
+
<td style={{
|
|
827
|
+
textAlign: 'center'
|
|
828
|
+
}}>1TB</td>
|
|
829
|
+
</tr>
|
|
830
|
+
<tr>
|
|
831
|
+
<td>
|
|
832
|
+
<Typography level="title-sm" sx={{
|
|
833
|
+
fontWeight: 600
|
|
834
|
+
}}>
|
|
835
|
+
API 호출
|
|
836
|
+
</Typography>
|
|
837
|
+
</td>
|
|
838
|
+
<td style={{
|
|
839
|
+
textAlign: 'center'
|
|
840
|
+
}}>1,000/월</td>
|
|
841
|
+
<td style={{
|
|
842
|
+
textAlign: 'center'
|
|
843
|
+
}}>10,000/월</td>
|
|
844
|
+
<td style={{
|
|
845
|
+
textAlign: 'center'
|
|
846
|
+
}}>무제한</td>
|
|
847
|
+
</tr>
|
|
848
|
+
<tr>
|
|
849
|
+
<td>
|
|
850
|
+
<Typography level="title-sm" sx={{
|
|
851
|
+
fontWeight: 600
|
|
852
|
+
}}>
|
|
853
|
+
고급 분석
|
|
854
|
+
</Typography>
|
|
855
|
+
</td>
|
|
856
|
+
<td style={{
|
|
857
|
+
textAlign: 'center'
|
|
858
|
+
}}>
|
|
859
|
+
<Chip size="sm" variant="soft" color="neutral">
|
|
860
|
+
✗ 미포함
|
|
861
|
+
</Chip>
|
|
862
|
+
</td>
|
|
863
|
+
<td style={{
|
|
864
|
+
textAlign: 'center'
|
|
865
|
+
}}>
|
|
866
|
+
<Chip size="sm" variant="soft" color="success">
|
|
867
|
+
✓ 포함
|
|
868
|
+
</Chip>
|
|
869
|
+
</td>
|
|
870
|
+
<td style={{
|
|
871
|
+
textAlign: 'center'
|
|
872
|
+
}}>
|
|
873
|
+
<Chip size="sm" variant="soft" color="success">
|
|
874
|
+
✓ 포함
|
|
875
|
+
</Chip>
|
|
876
|
+
</td>
|
|
877
|
+
</tr>
|
|
878
|
+
<tr>
|
|
879
|
+
<td>
|
|
880
|
+
<Typography level="title-sm" sx={{
|
|
881
|
+
fontWeight: 600
|
|
882
|
+
}}>
|
|
883
|
+
24/7 지원
|
|
884
|
+
</Typography>
|
|
885
|
+
</td>
|
|
886
|
+
<td style={{
|
|
887
|
+
textAlign: 'center'
|
|
888
|
+
}}>
|
|
889
|
+
<Chip size="sm" variant="soft" color="neutral">
|
|
890
|
+
✗ 미포함
|
|
891
|
+
</Chip>
|
|
892
|
+
</td>
|
|
893
|
+
<td style={{
|
|
894
|
+
textAlign: 'center'
|
|
895
|
+
}}>
|
|
896
|
+
<Chip size="sm" variant="soft" color="neutral">
|
|
897
|
+
✗ 미포함
|
|
898
|
+
</Chip>
|
|
899
|
+
</td>
|
|
900
|
+
<td style={{
|
|
901
|
+
textAlign: 'center'
|
|
902
|
+
}}>
|
|
903
|
+
<Chip size="sm" variant="soft" color="success">
|
|
904
|
+
✓ 포함
|
|
905
|
+
</Chip>
|
|
906
|
+
</td>
|
|
907
|
+
</tr>
|
|
908
|
+
<tr>
|
|
909
|
+
<td>
|
|
910
|
+
<Typography level="title-sm" sx={{
|
|
911
|
+
fontWeight: 600
|
|
912
|
+
}}>
|
|
913
|
+
가격
|
|
914
|
+
</Typography>
|
|
915
|
+
</td>
|
|
916
|
+
<td style={{
|
|
917
|
+
textAlign: 'center'
|
|
918
|
+
}}>무료</td>
|
|
919
|
+
<td style={{
|
|
920
|
+
textAlign: 'center'
|
|
921
|
+
}}>₩29,000/월</td>
|
|
922
|
+
<td style={{
|
|
923
|
+
textAlign: 'center'
|
|
924
|
+
}}>문의</td>
|
|
925
|
+
</tr>
|
|
926
|
+
</tbody>
|
|
927
|
+
</Table>
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
### Empty State Table
|
|
931
|
+
|
|
932
|
+
데이터가 없을 때의 상태를 표시하는 테이블입니다.
|
|
933
|
+
|
|
934
|
+
```tsx
|
|
935
|
+
<Stack spacing={2}>
|
|
936
|
+
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
|
937
|
+
<Typography level="title-lg">사용자 목록</Typography>
|
|
938
|
+
<Button startDecorator={<AddIcon />} size="sm">
|
|
939
|
+
새 사용자 추가
|
|
940
|
+
</Button>
|
|
941
|
+
</Stack>
|
|
942
|
+
|
|
943
|
+
<Table aria-label="empty state table">
|
|
944
|
+
<thead>
|
|
945
|
+
<tr>
|
|
946
|
+
<th style={{
|
|
947
|
+
width: '25%'
|
|
948
|
+
}}>이름</th>
|
|
949
|
+
<th style={{
|
|
950
|
+
width: '30%'
|
|
951
|
+
}}>이메일</th>
|
|
952
|
+
<th style={{
|
|
953
|
+
width: '20%'
|
|
954
|
+
}}>역할</th>
|
|
955
|
+
<th style={{
|
|
956
|
+
width: '15%'
|
|
957
|
+
}}>상태</th>
|
|
958
|
+
<th style={{
|
|
959
|
+
width: '10%'
|
|
960
|
+
}}>작업</th>
|
|
961
|
+
</tr>
|
|
962
|
+
</thead>
|
|
963
|
+
<tbody>
|
|
964
|
+
<tr>
|
|
965
|
+
<td colSpan={5}>
|
|
966
|
+
<Box sx={{
|
|
967
|
+
display: 'flex',
|
|
968
|
+
flexDirection: 'column',
|
|
969
|
+
alignItems: 'center',
|
|
970
|
+
justifyContent: 'center',
|
|
971
|
+
py: 8,
|
|
972
|
+
gap: 2
|
|
973
|
+
}}>
|
|
974
|
+
<SearchIcon sx={{
|
|
975
|
+
fontSize: 48,
|
|
976
|
+
color: 'neutral.400'
|
|
977
|
+
}} />
|
|
978
|
+
<Stack spacing={1} alignItems="center">
|
|
979
|
+
<Typography level="title-md" color="neutral">
|
|
980
|
+
사용자가 없습니다
|
|
981
|
+
</Typography>
|
|
982
|
+
<Typography level="body-sm" color="neutral">
|
|
983
|
+
새 사용자를 추가하여 시작해보세요.
|
|
984
|
+
</Typography>
|
|
985
|
+
</Stack>
|
|
986
|
+
<Button variant="soft" startDecorator={<AddIcon />} size="sm">
|
|
987
|
+
사용자 추가하기
|
|
988
|
+
</Button>
|
|
989
|
+
</Box>
|
|
990
|
+
</td>
|
|
991
|
+
</tr>
|
|
992
|
+
</tbody>
|
|
993
|
+
</Table>
|
|
994
|
+
</Stack>
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
### Advanced Features Table
|
|
998
|
+
|
|
999
|
+
고급 기능들(고정 헤더, 스크롤, 반응형)을 포함한 테이블입니다.
|
|
1000
|
+
|
|
1001
|
+
```tsx
|
|
1002
|
+
<Box sx={{
|
|
1003
|
+
maxHeight: 400,
|
|
1004
|
+
overflow: 'auto'
|
|
1005
|
+
}}>
|
|
1006
|
+
<Table aria-label="advanced features table" hoverRow stickyHeader sx={{
|
|
1007
|
+
'& th': {
|
|
1008
|
+
position: 'sticky',
|
|
1009
|
+
top: 0,
|
|
1010
|
+
backgroundColor: 'background.surface',
|
|
1011
|
+
zIndex: 1
|
|
1012
|
+
}
|
|
1013
|
+
}}>
|
|
1014
|
+
<thead>
|
|
1015
|
+
<tr>
|
|
1016
|
+
<th style={{
|
|
1017
|
+
width: '8%',
|
|
1018
|
+
textAlign: 'right'
|
|
1019
|
+
}}>ID</th>
|
|
1020
|
+
<th style={{
|
|
1021
|
+
width: '20%'
|
|
1022
|
+
}}>제품명</th>
|
|
1023
|
+
<th style={{
|
|
1024
|
+
width: '30%'
|
|
1025
|
+
}}>설명</th>
|
|
1026
|
+
<th style={{
|
|
1027
|
+
width: '12%'
|
|
1028
|
+
}}>카테고리</th>
|
|
1029
|
+
<th style={{
|
|
1030
|
+
width: '12%',
|
|
1031
|
+
textAlign: 'right'
|
|
1032
|
+
}}>가격</th>
|
|
1033
|
+
<th style={{
|
|
1034
|
+
width: '8%',
|
|
1035
|
+
textAlign: 'right'
|
|
1036
|
+
}}>재고</th>
|
|
1037
|
+
<th style={{
|
|
1038
|
+
width: '10%'
|
|
1039
|
+
}}>등록일</th>
|
|
1040
|
+
</tr>
|
|
1041
|
+
</thead>
|
|
1042
|
+
<tbody>
|
|
1043
|
+
{advancedRows.map(row => <tr key={row.id}>
|
|
1044
|
+
<td style={{
|
|
1045
|
+
textAlign: 'right'
|
|
1046
|
+
}}>{row.id}</td>
|
|
1047
|
+
<td>{row.name}</td>
|
|
1048
|
+
<td>
|
|
1049
|
+
<Typography level="body-sm" sx={{
|
|
1050
|
+
maxWidth: 200,
|
|
1051
|
+
overflow: 'hidden',
|
|
1052
|
+
textOverflow: 'ellipsis',
|
|
1053
|
+
whiteSpace: 'nowrap'
|
|
1054
|
+
}}>
|
|
1055
|
+
{row.description}
|
|
1056
|
+
</Typography>
|
|
1057
|
+
</td>
|
|
1058
|
+
<td>{row.category}</td>
|
|
1059
|
+
<td style={{
|
|
1060
|
+
textAlign: 'right'
|
|
1061
|
+
}}>₩{Number(row.price).toLocaleString()}</td>
|
|
1062
|
+
<td style={{
|
|
1063
|
+
textAlign: 'right'
|
|
1064
|
+
}}>
|
|
1065
|
+
<Chip size="sm" variant="soft" color={row.stock > 50 ? 'success' : row.stock > 10 ? 'warning' : 'danger'}>
|
|
1066
|
+
{row.stock}
|
|
1067
|
+
</Chip>
|
|
1068
|
+
</td>
|
|
1069
|
+
<td>{row.createdAt}</td>
|
|
1070
|
+
</tr>)}
|
|
1071
|
+
</tbody>
|
|
1072
|
+
</Table>
|
|
1073
|
+
</Box>
|
|
1074
|
+
```
|
|
1075
|
+
|
|
1076
|
+
### Drag and Drop Headers Table
|
|
1077
|
+
|
|
1078
|
+
@atlaskit/pragmatic-drag-and-drop을 사용하여 헤더를 드래그해서 컬럼 순서를 변경할 수 있는 테이블입니다.
|
|
1079
|
+
|
|
1080
|
+
```tsx
|
|
1081
|
+
<Stack spacing={3}>
|
|
1082
|
+
<Stack spacing={1}>
|
|
1083
|
+
<Typography level="title-lg">드래그 앤 드롭 헤더 재정렬 테이블</Typography>
|
|
1084
|
+
<Typography level="body-sm" color="neutral">
|
|
1085
|
+
헤더를 드래그하여 컬럼 순서를 변경할 수 있습니다. 드래그 아이콘을 클릭하고 드래그하세요.
|
|
1086
|
+
</Typography>
|
|
1087
|
+
</Stack>
|
|
1088
|
+
|
|
1089
|
+
<Table aria-label="drag and drop headers table" hoverRow>
|
|
1090
|
+
<thead>
|
|
1091
|
+
<tr>
|
|
1092
|
+
{columns.map((column, index) => <DraggableHeader key={column.key} columnKey={column.key} index={index} onReorder={handleReorder}>
|
|
1093
|
+
<Typography level="title-sm" fontWeight="lg">
|
|
1094
|
+
{column.label}
|
|
1095
|
+
</Typography>
|
|
1096
|
+
</DraggableHeader>)}
|
|
1097
|
+
</tr>
|
|
1098
|
+
</thead>
|
|
1099
|
+
<tbody>
|
|
1100
|
+
{sampleData.map(row => <tr key={`${row.name}-${row.email}`}>
|
|
1101
|
+
{columns.map(column => <td key={column.key} style={{
|
|
1102
|
+
width: column.width
|
|
1103
|
+
}}>
|
|
1104
|
+
{renderCellContent(column.key, row)}
|
|
1105
|
+
</td>)}
|
|
1106
|
+
</tr>)}
|
|
1107
|
+
</tbody>
|
|
1108
|
+
</Table>
|
|
1109
|
+
|
|
1110
|
+
<Box sx={{
|
|
1111
|
+
mt: 2,
|
|
1112
|
+
p: 2,
|
|
1113
|
+
bgcolor: 'background.level1',
|
|
1114
|
+
borderRadius: 'sm'
|
|
1115
|
+
}}>
|
|
1116
|
+
<Typography level="body-sm" fontWeight="lg" sx={{
|
|
1117
|
+
mb: 1
|
|
1118
|
+
}}>
|
|
1119
|
+
현재 컬럼 순서:
|
|
1120
|
+
</Typography>
|
|
1121
|
+
<Typography level="body-sm" color="neutral">
|
|
1122
|
+
{columns.map(col => col.label).join(' → ')}
|
|
1123
|
+
</Typography>
|
|
1124
|
+
</Box>
|
|
1125
|
+
</Stack>
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
## Detailed Code Examples
|
|
1129
|
+
|
|
1130
|
+
### Implementation Guidelines
|
|
1131
|
+
|
|
1132
|
+
위에서 보여준 Canvas 예제들은 실제 동작하는 컴포넌트들입니다. Table 컴포넌트는 두 가지 방식으로 사용할 수 있습니다:
|
|
1133
|
+
|
|
1134
|
+
#### 1. TableHead와 TableBody 사용 (간단한 데이터)
|
|
1135
|
+
|
|
1136
|
+
```tsx
|
|
1137
|
+
import { Table, TableHead, TableBody } from '@ceed/ads';
|
|
1138
|
+
|
|
1139
|
+
function SimpleTable() {
|
|
1140
|
+
const headCells = [
|
|
1141
|
+
{ label: '이름', width: '30%' },
|
|
1142
|
+
{ label: '이메일', width: '40%' },
|
|
1143
|
+
{ label: '역할', numeric: false },
|
|
1144
|
+
];
|
|
1145
|
+
|
|
1146
|
+
const rows = [
|
|
1147
|
+
{ name: '김철수', email: 'kim@example.com', role: '관리자' },
|
|
1148
|
+
{ name: '이영희', email: 'lee@example.com', role: '사용자' },
|
|
1149
|
+
];
|
|
1150
|
+
|
|
1151
|
+
return (
|
|
1152
|
+
<Table aria-label="simple table" hoverRow>
|
|
1153
|
+
<TableHead headCells={headCells} />
|
|
1154
|
+
<TableBody
|
|
1155
|
+
rows={rows}
|
|
1156
|
+
cellOrder={['name', 'email', 'role']}
|
|
1157
|
+
/>
|
|
1158
|
+
</Table>
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1161
|
+
```
|
|
1162
|
+
|
|
1163
|
+
#### 2. HTML 테이블 구조 사용 (복잡한 UI)
|
|
1164
|
+
|
|
1165
|
+
복잡한 UI 컴포넌트를 셀에 표현할 때는 HTML 테이블 구조를 직접 사용합니다:
|
|
1166
|
+
|
|
1167
|
+
```tsx
|
|
1168
|
+
import { Table, Stack, Avatar, Typography, Chip, IconButton } from '@ceed/ads';
|
|
1169
|
+
import EditIcon from '@mui/icons-material/Edit';
|
|
1170
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
1171
|
+
|
|
1172
|
+
function ComplexTable() {
|
|
1173
|
+
return (
|
|
1174
|
+
<Table aria-label="complex table" hoverRow>
|
|
1175
|
+
<thead>
|
|
1176
|
+
<tr>
|
|
1177
|
+
<th style={{ width: '30%' }}>사용자</th>
|
|
1178
|
+
<th style={{ width: '25%' }}>상태</th>
|
|
1179
|
+
<th style={{ width: '25%' }}>역할</th>
|
|
1180
|
+
<th style={{ width: '20%' }}>액션</th>
|
|
1181
|
+
</tr>
|
|
1182
|
+
</thead>
|
|
1183
|
+
<tbody>
|
|
1184
|
+
<tr>
|
|
1185
|
+
<td>
|
|
1186
|
+
<Stack direction="row" spacing={2} alignItems="center">
|
|
1187
|
+
<Avatar size="sm" variant="soft" color="primary">김</Avatar>
|
|
1188
|
+
<Stack spacing={0}>
|
|
1189
|
+
<Typography level="title-sm">김철수</Typography>
|
|
1190
|
+
<Typography level="body-xs" color="neutral">
|
|
1191
|
+
kim@example.com
|
|
1192
|
+
</Typography>
|
|
1193
|
+
</Stack>
|
|
1194
|
+
</Stack>
|
|
1195
|
+
</td>
|
|
1196
|
+
<td>
|
|
1197
|
+
<Chip size="sm" variant="soft" color="success">
|
|
1198
|
+
활성
|
|
1199
|
+
</Chip>
|
|
1200
|
+
</td>
|
|
1201
|
+
<td>관리자</td>
|
|
1202
|
+
<td>
|
|
1203
|
+
<Stack direction="row" spacing={0.5}>
|
|
1204
|
+
<IconButton size="sm" variant="plain">
|
|
1205
|
+
<EditIcon />
|
|
1206
|
+
</IconButton>
|
|
1207
|
+
<IconButton size="sm" variant="plain" color="danger">
|
|
1208
|
+
<DeleteIcon />
|
|
1209
|
+
</IconButton>
|
|
1210
|
+
</Stack>
|
|
1211
|
+
</td>
|
|
1212
|
+
</tr>
|
|
1213
|
+
</tbody>
|
|
1214
|
+
</Table>
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
```
|
|
1218
|
+
|
|
1219
|
+
#### Cell Merging with rowSpan and colSpan
|
|
1220
|
+
|
|
1221
|
+
복잡한 테이블 레이아웃을 위해 직접 HTML 테이블 구조를 사용할 수 있습니다:
|
|
1222
|
+
|
|
1223
|
+
```tsx
|
|
1224
|
+
<Table>
|
|
1225
|
+
<thead>
|
|
1226
|
+
<tr>
|
|
1227
|
+
<th rowSpan={2}>지역</th>
|
|
1228
|
+
<th colSpan={2}>2024년 1분기</th>
|
|
1229
|
+
<th colSpan={2}>2024년 2분기</th>
|
|
1230
|
+
</tr>
|
|
1231
|
+
<tr>
|
|
1232
|
+
<th>매출</th>
|
|
1233
|
+
<th>목표대비</th>
|
|
1234
|
+
<th>매출</th>
|
|
1235
|
+
<th>목표대비</th>
|
|
1236
|
+
</tr>
|
|
1237
|
+
</thead>
|
|
1238
|
+
{/* tbody content */}
|
|
1239
|
+
</Table>
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1242
|
+
## Advanced Features
|
|
1243
|
+
|
|
1244
|
+
Table 컴포넌트는 다양한 고급 기능을 지원합니다:
|
|
1245
|
+
|
|
1246
|
+
### Sticky Headers
|
|
1247
|
+
|
|
1248
|
+
스크롤 시 헤더가 고정되는 기능:
|
|
1249
|
+
|
|
1250
|
+
```tsx
|
|
1251
|
+
<Table stickyHeader sx={{
|
|
1252
|
+
'& th': {
|
|
1253
|
+
position: 'sticky',
|
|
1254
|
+
top: 0,
|
|
1255
|
+
backgroundColor: 'background.surface',
|
|
1256
|
+
zIndex: 1,
|
|
1257
|
+
}
|
|
1258
|
+
}}>
|
|
1259
|
+
{/* Table content */}
|
|
1260
|
+
</Table>
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
### Empty States
|
|
1264
|
+
|
|
1265
|
+
데이터가 없을 때의 적절한 빈 상태 표시:
|
|
1266
|
+
|
|
1267
|
+
```tsx
|
|
1268
|
+
<tbody>
|
|
1269
|
+
<tr>
|
|
1270
|
+
<td colSpan={numberOfColumns}>
|
|
1271
|
+
<Box sx={{ py: 8, textAlign: 'center' }}>
|
|
1272
|
+
<Typography level="title-md">데이터가 없습니다</Typography>
|
|
1273
|
+
<Typography level="body-sm" color="neutral">
|
|
1274
|
+
새 항목을 추가하여 시작해보세요.
|
|
1275
|
+
</Typography>
|
|
1276
|
+
</Box>
|
|
1277
|
+
</td>
|
|
1278
|
+
</tr>
|
|
1279
|
+
</tbody>
|
|
1280
|
+
```
|
|
1281
|
+
|
|
1282
|
+
### Responsive Design
|
|
1283
|
+
|
|
1284
|
+
반응형 디자인을 위한 가이드:
|
|
1285
|
+
|
|
1286
|
+
```tsx
|
|
1287
|
+
<Table sx={{
|
|
1288
|
+
'@media (max-width: 768px)': {
|
|
1289
|
+
'& td, & th': {
|
|
1290
|
+
fontSize: 'sm',
|
|
1291
|
+
px: 1,
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}}>
|
|
1295
|
+
{/* Table content */}
|
|
1296
|
+
</Table>
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
## Best Practices
|
|
1300
|
+
|
|
1301
|
+
1. **적절한 컴포넌트 선택**: 대용량 데이터는 DataTable, 복잡한 레이아웃은 Table을 사용하세요.
|
|
1302
|
+
|
|
1303
|
+
2. **접근성 고려**: 적절한 table 태그와 ARIA 속성을 사용하세요.
|
|
1304
|
+
|
|
1305
|
+
```tsx
|
|
1306
|
+
<Table aria-label="사용자 목록">
|
|
1307
|
+
<thead>
|
|
1308
|
+
<tr>
|
|
1309
|
+
<th scope="col">이름</th>
|
|
1310
|
+
<th scope="col">이메일</th>
|
|
1311
|
+
</tr>
|
|
1312
|
+
</thead>
|
|
1313
|
+
<tbody>
|
|
1314
|
+
<tr>
|
|
1315
|
+
<th scope="row">김철수</th>
|
|
1316
|
+
<td>kim@example.com</td>
|
|
1317
|
+
</tr>
|
|
1318
|
+
</tbody>
|
|
1319
|
+
</Table>
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
3. **일관된 정렬**: 숫자 데이터는 우측 정렬, 텍스트는 좌측 정렬을 유지하세요.
|
|
1323
|
+
|
|
1324
|
+
4. **적절한 행 높이**: 콘텐츠에 따라 적절한 행 높이를 설정하세요.
|
|
1325
|
+
|
|
1326
|
+
5. **반응형 고려**: 모바일에서는 중요한 컬럼만 표시하거나 카드 형태로 변환하는 것을 고려하세요.
|
|
1327
|
+
|
|
1328
|
+
6. **성능 최적화**: 긴 목록의 경우 가상화나 페이지네이션을 고려하세요.
|
|
1329
|
+
|
|
1330
|
+
Table 컴포넌트는 구조화된 데이터를 표현하고 복잡한 레이아웃을 구현하는 데 매우 유용한 도구입니다. 적절한 사용법과 커스터마이징을 통해 다양한 요구사항을 충족할 수 있습니다.
|