@ceed/cds 1.34.1 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordions/Accordions.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +5 -5
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Avatar/Avatar.d.ts +7 -17
- package/dist/components/Box/Box.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
- package/dist/components/Button/Button.d.ts +3 -2
- package/dist/components/Calendar/Calendar.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Chip/Chip.d.ts +1 -0
- package/dist/components/Container/Container.d.ts +6 -1
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/DialogActions/DialogActions.d.ts +1 -0
- package/dist/components/DialogContent/DialogContent.d.ts +1 -0
- package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
- package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +28 -1
- package/dist/components/FormControl/FormControl.d.ts +1 -0
- package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
- package/dist/components/FormLabel/FormLabel.d.ts +1 -0
- package/dist/components/Grid/Grid.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -2
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
- package/dist/components/InfoSign/InfoSign.d.ts +3 -2
- package/dist/components/Input/Input.d.ts +8 -22
- package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
- package/dist/components/Markdown/Markdown.d.ts +9 -24
- package/dist/components/Menu/Menu.d.ts +2 -1
- package/dist/components/MenuButton/MenuButton.d.ts +10 -8
- package/dist/components/Modal/Modal.d.ts +4 -2
- package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
- package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
- package/dist/components/Navigator/Navigator.d.ts +5 -4
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -0
- package/dist/components/RadioList/RadioList.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +20 -10
- package/dist/components/Sheet/Sheet.d.ts +1 -0
- package/dist/components/Stack/Stack.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +2 -1
- package/dist/components/Switch/Switch.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +7 -5
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +8 -20
- package/dist/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -0
- package/dist/components/Uploader/Uploader.d.ts +18 -17
- package/dist/components/data-display/Avatar.md +60 -72
- package/dist/components/data-display/Badge.md +197 -181
- package/dist/components/data-display/Chip.md +164 -142
- package/dist/components/data-display/DataTable.md +843 -338
- package/dist/components/data-display/InfoSign.md +1 -3
- package/dist/components/data-display/Markdown.md +93 -125
- package/dist/components/data-display/Table.md +1453 -1007
- package/dist/components/data-display/Typography.md +113 -116
- package/dist/components/feedback/Alert.md +80 -86
- package/dist/components/feedback/CircularProgress.md +32 -36
- package/dist/components/feedback/Dialog.md +25 -17
- package/dist/components/feedback/Modal.md +296 -264
- package/dist/components/feedback/Skeleton.md +125 -89
- package/dist/components/index.d.ts +62 -2
- package/dist/components/inputs/Autocomplete.md +191 -95
- package/dist/components/inputs/Button.md +83 -83
- package/dist/components/inputs/ButtonGroup.md +195 -185
- package/dist/components/inputs/Calendar.md +25 -28
- package/dist/components/inputs/Checkbox.md +11 -29
- package/dist/components/inputs/CurrencyInput.md +4 -4
- package/dist/components/inputs/DatePicker.md +229 -110
- package/dist/components/inputs/DateRangePicker.md +248 -137
- package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
- package/dist/components/inputs/FormControl.md +75 -69
- package/dist/components/inputs/IconButton.md +229 -205
- package/dist/components/inputs/Input.md +131 -98
- package/dist/components/inputs/MonthPicker.md +186 -84
- package/dist/components/inputs/MonthRangePicker.md +73 -49
- package/dist/components/inputs/PercentageInput.md +15 -31
- package/dist/components/inputs/RadioButton.md +320 -256
- package/dist/components/inputs/RadioList.md +66 -50
- package/dist/components/inputs/RadioTileGroup.md +287 -170
- package/dist/components/inputs/SearchBar.md +82 -60
- package/dist/components/inputs/Select.md +184 -120
- package/dist/components/inputs/Slider.md +153 -102
- package/dist/components/inputs/Switch.md +193 -138
- package/dist/components/inputs/Textarea.md +15 -20
- package/dist/components/inputs/Uploader/Uploader.md +68 -39
- package/dist/components/layout/Box.md +841 -662
- package/dist/components/layout/Container.md +3 -11
- package/dist/components/layout/Grid.md +480 -394
- package/dist/components/layout/Stack.md +739 -566
- package/dist/components/navigation/Breadcrumbs.md +4 -4
- package/dist/components/navigation/Drawer.md +34 -25
- package/dist/components/navigation/Dropdown.md +745 -408
- package/dist/components/navigation/IconMenuButton.md +14 -6
- package/dist/components/navigation/InsetDrawer.md +8 -13
- package/dist/components/navigation/Link.md +1 -2
- package/dist/components/navigation/Menu.md +623 -502
- package/dist/components/navigation/MenuButton.md +18 -10
- package/dist/components/navigation/NavigationGroup.md +19 -50
- package/dist/components/navigation/NavigationItem.md +6 -6
- package/dist/components/navigation/Navigator.md +26 -28
- package/dist/components/navigation/Pagination.md +86 -75
- package/dist/components/navigation/Stepper.md +2 -12
- package/dist/components/navigation/Tabs.md +48 -36
- package/dist/components/surfaces/Accordions.md +89 -172
- package/dist/components/surfaces/Card.md +1094 -709
- package/dist/components/surfaces/Divider.md +562 -412
- package/dist/components/surfaces/Sheet.md +700 -518
- package/dist/guides/ThemeProvider.md +8 -8
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +1074 -1033
- package/dist/index.d.ts +2 -1
- package/dist/index.js +720 -671
- package/framer/index.js +1 -1
- package/package.json +32 -35
|
@@ -6,19 +6,19 @@ The Grid component is a powerful layout system built on CSS Grid. It uses a 12-c
|
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Grid container spacing={args.spacing}>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</Grid>
|
|
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
22
|
```
|
|
23
23
|
|
|
24
24
|
| Field | Description | Default |
|
|
@@ -60,31 +60,36 @@ function MyComponent() {
|
|
|
60
60
|
The basic usage of the 12-column grid system.
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
|
-
<div
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
</
|
|
86
|
-
</
|
|
87
|
-
</
|
|
63
|
+
<div
|
|
64
|
+
style={{
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexDirection: "column",
|
|
67
|
+
gap: "2rem"
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<div>
|
|
71
|
+
<Typography
|
|
72
|
+
level="title-md"
|
|
73
|
+
sx={{
|
|
74
|
+
mb: 2
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
12열 그리드 시스템
|
|
78
|
+
</Typography>
|
|
79
|
+
<Grid container spacing={2}>
|
|
80
|
+
<GridItem xs={12}>xs=12</GridItem>
|
|
81
|
+
<GridItem xs={6}>xs=6</GridItem>
|
|
82
|
+
<GridItem xs={6}>xs=6</GridItem>
|
|
83
|
+
<GridItem xs={4}>xs=4</GridItem>
|
|
84
|
+
<GridItem xs={4}>xs=4</GridItem>
|
|
85
|
+
<GridItem xs={4}>xs=4</GridItem>
|
|
86
|
+
<GridItem xs={3}>xs=3</GridItem>
|
|
87
|
+
<GridItem xs={3}>xs=3</GridItem>
|
|
88
|
+
<GridItem xs={3}>xs=3</GridItem>
|
|
89
|
+
<GridItem xs={3}>xs=3</GridItem>
|
|
90
|
+
</Grid>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
88
93
|
```
|
|
89
94
|
|
|
90
95
|
### Responsive Grid
|
|
@@ -93,46 +98,49 @@ A responsive grid that applies different layouts across different screen sizes.
|
|
|
93
98
|
|
|
94
99
|
```tsx
|
|
95
100
|
<div>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</
|
|
135
|
-
</div>
|
|
101
|
+
<Typography
|
|
102
|
+
level="title-md"
|
|
103
|
+
sx={{
|
|
104
|
+
mb: 2
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
반응형 그리드 (브라우저 크기를 조절해보세요)
|
|
108
|
+
</Typography>
|
|
109
|
+
<Grid container spacing={2}>
|
|
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
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
135
|
+
<div>
|
|
136
|
+
<Typography level="body-xs">xs=12</Typography>
|
|
137
|
+
<Typography level="body-xs">sm=6</Typography>
|
|
138
|
+
<Typography level="body-xs">md=4</Typography>
|
|
139
|
+
<Typography level="body-xs">lg=3</Typography>
|
|
140
|
+
</div>
|
|
141
|
+
</GridItem>
|
|
142
|
+
</Grid>
|
|
143
|
+
</div>
|
|
136
144
|
```
|
|
137
145
|
|
|
138
146
|
### Different Spacing
|
|
@@ -140,63 +148,77 @@ A responsive grid that applies different layouts across different screen sizes.
|
|
|
140
148
|
Grid layouts with different spacing values.
|
|
141
149
|
|
|
142
150
|
```tsx
|
|
143
|
-
<div
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</
|
|
159
|
-
|
|
151
|
+
<div
|
|
152
|
+
style={{
|
|
153
|
+
display: "flex",
|
|
154
|
+
flexDirection: "column",
|
|
155
|
+
gap: "3rem"
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<div>
|
|
159
|
+
<Typography
|
|
160
|
+
level="title-sm"
|
|
161
|
+
sx={{
|
|
162
|
+
mb: 1
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
간격 없음 (spacing=0)
|
|
166
|
+
</Typography>
|
|
167
|
+
<Grid container spacing={0}>
|
|
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>
|
|
160
173
|
|
|
161
|
-
<div>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
</
|
|
172
|
-
</
|
|
174
|
+
<div>
|
|
175
|
+
<Typography
|
|
176
|
+
level="title-sm"
|
|
177
|
+
sx={{
|
|
178
|
+
mb: 1
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
작은 간격 (spacing=1)
|
|
182
|
+
</Typography>
|
|
183
|
+
<Grid container spacing={1}>
|
|
184
|
+
<GridItem xs={4}>Item 1</GridItem>
|
|
185
|
+
<GridItem xs={4}>Item 2</GridItem>
|
|
186
|
+
<GridItem xs={4}>Item 3</GridItem>
|
|
187
|
+
</Grid>
|
|
188
|
+
</div>
|
|
173
189
|
|
|
174
|
-
<div>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</
|
|
185
|
-
</
|
|
190
|
+
<div>
|
|
191
|
+
<Typography
|
|
192
|
+
level="title-sm"
|
|
193
|
+
sx={{
|
|
194
|
+
mb: 1
|
|
195
|
+
}}
|
|
196
|
+
>
|
|
197
|
+
중간 간격 (spacing=2)
|
|
198
|
+
</Typography>
|
|
199
|
+
<Grid container spacing={2}>
|
|
200
|
+
<GridItem xs={4}>Item 1</GridItem>
|
|
201
|
+
<GridItem xs={4}>Item 2</GridItem>
|
|
202
|
+
<GridItem xs={4}>Item 3</GridItem>
|
|
203
|
+
</Grid>
|
|
204
|
+
</div>
|
|
186
205
|
|
|
187
|
-
<div>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</
|
|
198
|
-
</
|
|
199
|
-
</
|
|
206
|
+
<div>
|
|
207
|
+
<Typography
|
|
208
|
+
level="title-sm"
|
|
209
|
+
sx={{
|
|
210
|
+
mb: 1
|
|
211
|
+
}}
|
|
212
|
+
>
|
|
213
|
+
큰 간격 (spacing=4)
|
|
214
|
+
</Typography>
|
|
215
|
+
<Grid container spacing={4}>
|
|
216
|
+
<GridItem xs={4}>Item 1</GridItem>
|
|
217
|
+
<GridItem xs={4}>Item 2</GridItem>
|
|
218
|
+
<GridItem xs={4}>Item 3</GridItem>
|
|
219
|
+
</Grid>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
200
222
|
```
|
|
201
223
|
|
|
202
224
|
### Nested Grid
|
|
@@ -205,62 +227,75 @@ You can nest one grid inside another.
|
|
|
205
227
|
|
|
206
228
|
```tsx
|
|
207
229
|
<div>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
</
|
|
238
|
-
|
|
230
|
+
<Typography
|
|
231
|
+
level="title-md"
|
|
232
|
+
sx={{
|
|
233
|
+
mb: 2
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
중첩된 그리드
|
|
237
|
+
</Typography>
|
|
238
|
+
<Grid container spacing={2}>
|
|
239
|
+
<Grid xs={12} md={8}>
|
|
240
|
+
<Box
|
|
241
|
+
sx={{
|
|
242
|
+
p: 2,
|
|
243
|
+
bgcolor: "success.50",
|
|
244
|
+
borderRadius: "md",
|
|
245
|
+
minHeight: 200
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
<Typography
|
|
249
|
+
level="title-sm"
|
|
250
|
+
sx={{
|
|
251
|
+
mb: 2
|
|
252
|
+
}}
|
|
253
|
+
>
|
|
254
|
+
메인 콘텐츠 영역
|
|
255
|
+
</Typography>
|
|
256
|
+
<Grid container spacing={1}>
|
|
257
|
+
<GridItem xs={6}>
|
|
258
|
+
<Typography level="body-xs">중첩 아이템 1</Typography>
|
|
259
|
+
</GridItem>
|
|
260
|
+
<GridItem xs={6}>
|
|
261
|
+
<Typography level="body-xs">중첩 아이템 2</Typography>
|
|
262
|
+
</GridItem>
|
|
263
|
+
<GridItem xs={12}>
|
|
264
|
+
<Typography level="body-xs">중첩 아이템 3</Typography>
|
|
265
|
+
</GridItem>
|
|
266
|
+
</Grid>
|
|
267
|
+
</Box>
|
|
268
|
+
</Grid>
|
|
239
269
|
|
|
240
|
-
<Grid xs={12} md={4}>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
</
|
|
260
|
-
</
|
|
261
|
-
|
|
262
|
-
</
|
|
263
|
-
</
|
|
270
|
+
<Grid xs={12} md={4}>
|
|
271
|
+
<Box
|
|
272
|
+
sx={{
|
|
273
|
+
p: 2,
|
|
274
|
+
bgcolor: "warning.50",
|
|
275
|
+
borderRadius: "md",
|
|
276
|
+
minHeight: 200
|
|
277
|
+
}}
|
|
278
|
+
>
|
|
279
|
+
<Typography
|
|
280
|
+
level="title-sm"
|
|
281
|
+
sx={{
|
|
282
|
+
mb: 2
|
|
283
|
+
}}
|
|
284
|
+
>
|
|
285
|
+
사이드바
|
|
286
|
+
</Typography>
|
|
287
|
+
<Grid container spacing={1}>
|
|
288
|
+
<GridItem xs={12}>
|
|
289
|
+
<Typography level="body-xs">사이드바 아이템 1</Typography>
|
|
290
|
+
</GridItem>
|
|
291
|
+
<GridItem xs={12}>
|
|
292
|
+
<Typography level="body-xs">사이드바 아이템 2</Typography>
|
|
293
|
+
</GridItem>
|
|
294
|
+
</Grid>
|
|
295
|
+
</Box>
|
|
296
|
+
</Grid>
|
|
297
|
+
</Grid>
|
|
298
|
+
</div>
|
|
264
299
|
```
|
|
265
300
|
|
|
266
301
|
### Auto Layout
|
|
@@ -268,43 +303,51 @@ You can nest one grid inside another.
|
|
|
268
303
|
A grid using auto layout.
|
|
269
304
|
|
|
270
305
|
```tsx
|
|
271
|
-
<div
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
</
|
|
287
|
-
|
|
306
|
+
<div
|
|
307
|
+
style={{
|
|
308
|
+
display: "flex",
|
|
309
|
+
flexDirection: "column",
|
|
310
|
+
gap: "2rem"
|
|
311
|
+
}}
|
|
312
|
+
>
|
|
313
|
+
<div>
|
|
314
|
+
<Typography
|
|
315
|
+
level="title-sm"
|
|
316
|
+
sx={{
|
|
317
|
+
mb: 1
|
|
318
|
+
}}
|
|
319
|
+
>
|
|
320
|
+
자동 레이아웃 - 동일한 너비
|
|
321
|
+
</Typography>
|
|
322
|
+
<Grid container spacing={2}>
|
|
323
|
+
<GridItem xs>자동 너비 1</GridItem>
|
|
324
|
+
<GridItem xs>자동 너비 2</GridItem>
|
|
325
|
+
<GridItem xs>자동 너비 3</GridItem>
|
|
326
|
+
</Grid>
|
|
327
|
+
</div>
|
|
288
328
|
|
|
289
|
-
<div>
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
</
|
|
329
|
+
<div>
|
|
330
|
+
<Typography
|
|
331
|
+
level="title-sm"
|
|
332
|
+
sx={{
|
|
333
|
+
mb: 1
|
|
334
|
+
}}
|
|
335
|
+
>
|
|
336
|
+
자동 레이아웃 - 내용에 따른 너비
|
|
337
|
+
</Typography>
|
|
338
|
+
<Grid container spacing={2}>
|
|
339
|
+
<GridItem xs="auto">
|
|
340
|
+
<Typography>짧은 내용</Typography>
|
|
341
|
+
</GridItem>
|
|
342
|
+
<GridItem xs>
|
|
343
|
+
<Typography>남은 공간을 모두 차지하는 긴 내용</Typography>
|
|
344
|
+
</GridItem>
|
|
345
|
+
<GridItem xs="auto">
|
|
346
|
+
<Typography>또 다른 짧은 내용</Typography>
|
|
347
|
+
</GridItem>
|
|
348
|
+
</Grid>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
308
351
|
```
|
|
309
352
|
|
|
310
353
|
### Complex Layouts
|
|
@@ -312,125 +355,148 @@ A grid using auto layout.
|
|
|
312
355
|
Complex layout examples based on real use cases.
|
|
313
356
|
|
|
314
357
|
```tsx
|
|
315
|
-
<div
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
358
|
+
<div
|
|
359
|
+
style={{
|
|
360
|
+
display: "flex",
|
|
361
|
+
flexDirection: "column",
|
|
362
|
+
gap: "3rem"
|
|
363
|
+
}}
|
|
364
|
+
>
|
|
365
|
+
{/* Dashboard Layout */}
|
|
366
|
+
<div>
|
|
367
|
+
<Typography
|
|
368
|
+
level="title-md"
|
|
369
|
+
sx={{
|
|
370
|
+
mb: 2
|
|
371
|
+
}}
|
|
372
|
+
>
|
|
373
|
+
대시보드 레이아웃
|
|
374
|
+
</Typography>
|
|
375
|
+
<Grid container spacing={2}>
|
|
376
|
+
{/* Header */}
|
|
377
|
+
<Grid xs={12}>
|
|
378
|
+
<Box
|
|
379
|
+
sx={{
|
|
380
|
+
p: 3,
|
|
381
|
+
bgcolor: "primary.100",
|
|
382
|
+
borderRadius: "md",
|
|
383
|
+
textAlign: "center"
|
|
384
|
+
}}
|
|
385
|
+
>
|
|
386
|
+
<Typography level="title-lg">대시보드 헤더</Typography>
|
|
387
|
+
</Box>
|
|
388
|
+
</Grid>
|
|
389
|
+
|
|
390
|
+
{/* Stats Cards */}
|
|
391
|
+
<GridItem xs={12} sm={6} lg={3}>
|
|
392
|
+
<div>
|
|
393
|
+
<Typography level="title-sm">총 사용자</Typography>
|
|
394
|
+
<Typography level="h2">1,234</Typography>
|
|
395
|
+
</div>
|
|
396
|
+
</GridItem>
|
|
397
|
+
<GridItem xs={12} sm={6} lg={3}>
|
|
398
|
+
<div>
|
|
399
|
+
<Typography level="title-sm">매출</Typography>
|
|
400
|
+
<Typography level="h2">₩5.6M</Typography>
|
|
401
|
+
</div>
|
|
402
|
+
</GridItem>
|
|
403
|
+
<GridItem xs={12} sm={6} lg={3}>
|
|
404
|
+
<div>
|
|
405
|
+
<Typography level="title-sm">주문</Typography>
|
|
406
|
+
<Typography level="h2">789</Typography>
|
|
407
|
+
</div>
|
|
408
|
+
</GridItem>
|
|
409
|
+
<GridItem xs={12} sm={6} lg={3}>
|
|
410
|
+
<div>
|
|
411
|
+
<Typography level="title-sm">전환율</Typography>
|
|
412
|
+
<Typography level="h2">3.2%</Typography>
|
|
413
|
+
</div>
|
|
414
|
+
</GridItem>
|
|
415
|
+
|
|
416
|
+
{/* Main Content */}
|
|
417
|
+
<Grid xs={12} lg={8}>
|
|
418
|
+
<Box
|
|
419
|
+
sx={{
|
|
420
|
+
p: 3,
|
|
421
|
+
bgcolor: "neutral.50",
|
|
422
|
+
borderRadius: "md",
|
|
423
|
+
minHeight: 300
|
|
424
|
+
}}
|
|
425
|
+
>
|
|
426
|
+
<Typography level="title-md">차트 영역</Typography>
|
|
427
|
+
<Typography level="body-sm">여기에 차트가 들어갑니다</Typography>
|
|
428
|
+
</Box>
|
|
429
|
+
</Grid>
|
|
430
|
+
|
|
431
|
+
{/* Sidebar */}
|
|
432
|
+
<Grid xs={12} lg={4}>
|
|
433
|
+
<Box
|
|
434
|
+
sx={{
|
|
435
|
+
p: 3,
|
|
436
|
+
bgcolor: "success.50",
|
|
437
|
+
borderRadius: "md",
|
|
438
|
+
minHeight: 300
|
|
439
|
+
}}
|
|
440
|
+
>
|
|
441
|
+
<Typography level="title-md">최근 활동</Typography>
|
|
442
|
+
<Typography level="body-sm">활동 목록이 여기 표시됩니다</Typography>
|
|
443
|
+
</Box>
|
|
444
|
+
</Grid>
|
|
445
|
+
</Grid>
|
|
446
|
+
</div>
|
|
339
447
|
|
|
340
|
-
{/*
|
|
341
|
-
<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
448
|
+
{/* Product Grid */}
|
|
449
|
+
<div>
|
|
450
|
+
<Typography
|
|
451
|
+
level="title-md"
|
|
452
|
+
sx={{
|
|
453
|
+
mb: 2
|
|
454
|
+
}}
|
|
455
|
+
>
|
|
456
|
+
제품 그리드
|
|
457
|
+
</Typography>
|
|
458
|
+
<Grid container spacing={2}>
|
|
459
|
+
{[1, 2, 3, 4, 5, 6].map((item) => (
|
|
460
|
+
<Grid key={item} xs={12} sm={6} md={4} lg={2}>
|
|
461
|
+
<Box
|
|
462
|
+
sx={{
|
|
463
|
+
p: 2,
|
|
464
|
+
bgcolor: "background.body",
|
|
465
|
+
border: "1px solid",
|
|
466
|
+
borderColor: "divider",
|
|
467
|
+
borderRadius: "md",
|
|
468
|
+
textAlign: "center"
|
|
469
|
+
}}
|
|
470
|
+
>
|
|
471
|
+
<Box
|
|
472
|
+
sx={{
|
|
473
|
+
width: "100%",
|
|
474
|
+
height: 80,
|
|
475
|
+
bgcolor: "neutral.100",
|
|
476
|
+
borderRadius: "sm",
|
|
477
|
+
mb: 1,
|
|
478
|
+
display: "flex",
|
|
479
|
+
alignItems: "center",
|
|
480
|
+
justifyContent: "center"
|
|
481
|
+
}}
|
|
482
|
+
>
|
|
483
|
+
<Typography level="body-xs">제품 {item}</Typography>
|
|
484
|
+
</Box>
|
|
485
|
+
<Typography level="body-sm">제품명</Typography>
|
|
486
|
+
<Typography
|
|
487
|
+
level="body-xs"
|
|
488
|
+
sx={{
|
|
489
|
+
color: "text.secondary"
|
|
490
|
+
}}
|
|
491
|
+
>
|
|
492
|
+
₩10,000
|
|
493
|
+
</Typography>
|
|
494
|
+
</Box>
|
|
495
|
+
</Grid>
|
|
496
|
+
))}
|
|
497
|
+
</Grid>
|
|
498
|
+
</div>
|
|
363
499
|
</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
500
|
```
|
|
435
501
|
|
|
436
502
|
### Breakpoint Demo
|
|
@@ -439,54 +505,60 @@ An example showing how Grid behaves at each breakpoint.
|
|
|
439
505
|
|
|
440
506
|
```tsx
|
|
441
507
|
<div>
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
<
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
508
|
+
<Typography
|
|
509
|
+
level="title-md"
|
|
510
|
+
sx={{
|
|
511
|
+
mb: 2
|
|
512
|
+
}}
|
|
513
|
+
>
|
|
514
|
+
브레이크포인트 데모 - 각 화면 크기에서 다른 레이아웃
|
|
515
|
+
</Typography>
|
|
516
|
+
|
|
517
|
+
<Box
|
|
518
|
+
sx={{
|
|
519
|
+
mb: 2
|
|
520
|
+
}}
|
|
521
|
+
>
|
|
522
|
+
<Typography
|
|
523
|
+
level="body-sm"
|
|
524
|
+
sx={{
|
|
525
|
+
color: "text.secondary"
|
|
526
|
+
}}
|
|
527
|
+
>
|
|
528
|
+
• xs (0px+): 모든 아이템이 한 줄로
|
|
529
|
+
<br />• sm (600px+): 2개씩 배치
|
|
530
|
+
<br />• md (900px+): 3개씩 배치
|
|
531
|
+
<br />• lg (1200px+): 4개씩 배치
|
|
532
|
+
</Typography>
|
|
533
|
+
</Box>
|
|
462
534
|
|
|
463
|
-
<Grid container spacing={2}>
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
</Grid>
|
|
489
|
-
</div>
|
|
535
|
+
<Grid container spacing={2}>
|
|
536
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
537
|
+
<Typography level="body-sm">첫 번째 아이템</Typography>
|
|
538
|
+
</GridItem>
|
|
539
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
540
|
+
<Typography level="body-sm">두 번째 아이템</Typography>
|
|
541
|
+
</GridItem>
|
|
542
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
543
|
+
<Typography level="body-sm">세 번째 아이템</Typography>
|
|
544
|
+
</GridItem>
|
|
545
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
546
|
+
<Typography level="body-sm">네 번째 아이템</Typography>
|
|
547
|
+
</GridItem>
|
|
548
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
549
|
+
<Typography level="body-sm">다섯 번째 아이템</Typography>
|
|
550
|
+
</GridItem>
|
|
551
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
552
|
+
<Typography level="body-sm">여섯 번째 아이템</Typography>
|
|
553
|
+
</GridItem>
|
|
554
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
555
|
+
<Typography level="body-sm">일곱 번째 아이템</Typography>
|
|
556
|
+
</GridItem>
|
|
557
|
+
<GridItem xs={12} sm={6} md={4} lg={3}>
|
|
558
|
+
<Typography level="body-sm">여덟 번째 아이템</Typography>
|
|
559
|
+
</GridItem>
|
|
560
|
+
</Grid>
|
|
561
|
+
</div>
|
|
490
562
|
```
|
|
491
563
|
|
|
492
564
|
## Grid System
|
|
@@ -497,12 +569,24 @@ Grid is based on a 12-column system. Each item can span 1 to 12 columns.
|
|
|
497
569
|
|
|
498
570
|
```tsx
|
|
499
571
|
<Grid container spacing={2}>
|
|
500
|
-
<Grid item xs={12}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
<Grid item xs={
|
|
504
|
-
|
|
505
|
-
|
|
572
|
+
<Grid item xs={12}>
|
|
573
|
+
전체 너비 (12/12)
|
|
574
|
+
</Grid>
|
|
575
|
+
<Grid item xs={6}>
|
|
576
|
+
절반 너비 (6/12)
|
|
577
|
+
</Grid>
|
|
578
|
+
<Grid item xs={6}>
|
|
579
|
+
절반 너비 (6/12)
|
|
580
|
+
</Grid>
|
|
581
|
+
<Grid item xs={4}>
|
|
582
|
+
3분의 1 너비 (4/12)
|
|
583
|
+
</Grid>
|
|
584
|
+
<Grid item xs={4}>
|
|
585
|
+
3분의 1 너비 (4/12)
|
|
586
|
+
</Grid>
|
|
587
|
+
<Grid item xs={4}>
|
|
588
|
+
3분의 1 너비 (4/12)
|
|
589
|
+
</Grid>
|
|
506
590
|
</Grid>
|
|
507
591
|
```
|
|
508
592
|
|
|
@@ -652,7 +736,9 @@ You can let items size and position automatically without explicitly defining th
|
|
|
652
736
|
</Grid>
|
|
653
737
|
|
|
654
738
|
<Grid item xs={12}>
|
|
655
|
-
<Button type="submit" fullWidth>
|
|
739
|
+
<Button type="submit" fullWidth>
|
|
740
|
+
Submit
|
|
741
|
+
</Button>
|
|
656
742
|
</Grid>
|
|
657
743
|
</Grid>
|
|
658
744
|
```
|