@ceed/ads 1.29.1 → 1.30.0-next.1
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/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +21 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/data-display/Badge.md +39 -71
- package/dist/components/data-display/DataTable.md +1 -1
- package/dist/components/data-display/InfoSign.md +98 -74
- package/dist/components/data-display/Typography.md +97 -363
- package/dist/components/feedback/Dialog.md +62 -76
- package/dist/components/feedback/Modal.md +44 -259
- package/dist/components/feedback/llms.txt +0 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/inputs/Autocomplete.md +107 -356
- package/dist/components/inputs/ButtonGroup.md +106 -115
- package/dist/components/inputs/Calendar.md +459 -98
- package/dist/components/inputs/CurrencyInput.md +5 -183
- package/dist/components/inputs/DatePicker.md +431 -108
- package/dist/components/inputs/DateRangePicker.md +492 -131
- package/dist/components/inputs/FilterMenu.md +19 -169
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -123
- package/dist/components/inputs/IconButton.md +88 -137
- package/dist/components/inputs/Input.md +0 -5
- package/dist/components/inputs/MonthPicker.md +422 -95
- package/dist/components/inputs/MonthRangePicker.md +466 -89
- package/dist/components/inputs/PercentageInput.md +16 -185
- package/dist/components/inputs/RadioButton.md +35 -163
- package/dist/components/inputs/RadioTileGroup.md +61 -150
- package/dist/components/inputs/SearchBar.md +44 -0
- package/dist/components/inputs/Select.md +326 -222
- package/dist/components/inputs/Switch.md +376 -136
- package/dist/components/inputs/Textarea.md +10 -213
- package/dist/components/inputs/Uploader/Uploader.md +66 -145
- package/dist/components/inputs/llms.txt +1 -3
- package/dist/components/navigation/Breadcrumbs.md +322 -80
- package/dist/components/navigation/Dropdown.md +221 -92
- package/dist/components/navigation/IconMenuButton.md +502 -40
- package/dist/components/navigation/InsetDrawer.md +738 -68
- package/dist/components/navigation/Link.md +298 -39
- package/dist/components/navigation/Menu.md +285 -92
- package/dist/components/navigation/MenuButton.md +448 -55
- package/dist/components/navigation/Pagination.md +338 -47
- package/dist/components/navigation/ProfileMenu.md +268 -45
- package/dist/components/navigation/Stepper.md +28 -160
- package/dist/components/navigation/Tabs.md +316 -57
- package/dist/components/surfaces/Sheet.md +334 -151
- package/dist/index.browser.js +15 -13
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +289 -288
- package/dist/index.d.ts +1 -1
- package/dist/index.js +426 -369
- package/dist/llms.txt +1 -8
- package/framer/index.js +1 -1
- package/package.json +16 -15
- package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
- package/dist/components/feedback/CircularProgress.md +0 -257
- package/dist/components/feedback/Skeleton.md +0 -280
- package/dist/components/inputs/FormControl.md +0 -361
- package/dist/components/inputs/RadioList.md +0 -241
- package/dist/components/inputs/Slider.md +0 -334
- package/dist/guides/ThemeProvider.md +0 -116
- package/dist/guides/llms.txt +0 -9
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Typography 컴포넌트는 텍스트를 표시하기 위한 핵심 컴포넌트입니다. Joy UI의 Typography를 기반으로 하며, 다양한 텍스트 레벨과 스타일을 제공합니다. 제목, 본문, 라벨 등 모든 텍스트 요소에 일관된 타이포그래피를 적용할 수 있습니다.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Typography children="Typography" />
|
|
@@ -21,10 +21,10 @@ import { Typography } from '@ceed/ads';
|
|
|
21
21
|
function MyComponent() {
|
|
22
22
|
return (
|
|
23
23
|
<div>
|
|
24
|
-
<Typography level="h1"
|
|
25
|
-
<Typography level="body-md"
|
|
24
|
+
<Typography level="h1">메인 제목</Typography>
|
|
25
|
+
<Typography level="body-md">본문 텍스트입니다.</Typography>
|
|
26
26
|
<Typography level="body-sm" color="neutral">
|
|
27
|
-
|
|
27
|
+
보조 설명 텍스트입니다.
|
|
28
28
|
</Typography>
|
|
29
29
|
</div>
|
|
30
30
|
);
|
|
@@ -33,110 +33,20 @@ function MyComponent() {
|
|
|
33
33
|
|
|
34
34
|
## Typography Levels
|
|
35
35
|
|
|
36
|
-
### Overview
|
|
37
|
-
|
|
38
|
-
Typography levels are divided into three groups: **Headings**, **Titles**, and **Body**. The default level is `body-md`.
|
|
39
|
-
|
|
40
|
-
- **Headings** (`h1`–`h4`): Used for page and section headings. Uses the display font family (Inter).
|
|
41
|
-
- **Titles** (`title-lg`, `title-md`, `title-sm`): Used for UI labels, card titles, and emphasized text. Uses the body font family (Inter).
|
|
42
|
-
- **Body** (`body-lg`, `body-md`, `body-sm`, `body-xs`): Used for readable content and descriptions. Uses the body font family (Inter).
|
|
43
|
-
|
|
44
|
-
```tsx
|
|
45
|
-
<>
|
|
46
|
-
<Stack direction="row" spacing={2}>
|
|
47
|
-
<Typography level="h1">h1</Typography>
|
|
48
|
-
<Typography {...args} level="h1" />
|
|
49
|
-
</Stack>
|
|
50
|
-
<Stack direction="row" spacing={2}>
|
|
51
|
-
<Typography level="h2">h2</Typography>
|
|
52
|
-
<Typography {...args} level="h2" />
|
|
53
|
-
</Stack>
|
|
54
|
-
<Stack direction="row" spacing={2}>
|
|
55
|
-
<Typography level="h3">h3</Typography>
|
|
56
|
-
<Typography {...args} level="h3" />
|
|
57
|
-
</Stack>
|
|
58
|
-
<Stack direction="row" spacing={2}>
|
|
59
|
-
<Typography level="h4">h4</Typography>
|
|
60
|
-
<Typography {...args} level="h4" />
|
|
61
|
-
</Stack>
|
|
62
|
-
<Stack direction="row" spacing={2}>
|
|
63
|
-
<Typography level="title-lg">title-lg</Typography>
|
|
64
|
-
<Typography {...args} level="title-lg" />
|
|
65
|
-
</Stack>
|
|
66
|
-
<Stack direction="row" spacing={2}>
|
|
67
|
-
<Typography level="title-md">title-md</Typography>
|
|
68
|
-
<Typography {...args} level="title-md" />
|
|
69
|
-
</Stack>
|
|
70
|
-
<Stack direction="row" spacing={2}>
|
|
71
|
-
<Typography level="title-sm">title-sm</Typography>
|
|
72
|
-
<Typography {...args} level="title-sm" />
|
|
73
|
-
</Stack>
|
|
74
|
-
<Stack direction="row" spacing={2}>
|
|
75
|
-
<Typography level="body-lg">body-lg</Typography>
|
|
76
|
-
<Typography {...args} level="body-lg" />
|
|
77
|
-
</Stack>
|
|
78
|
-
<Stack direction="row" spacing={2}>
|
|
79
|
-
<Typography level="body-md">body-md</Typography>
|
|
80
|
-
<Typography {...args} level="body-md" />
|
|
81
|
-
</Stack>
|
|
82
|
-
<Stack direction="row" spacing={2}>
|
|
83
|
-
<Typography level="body-sm">body-sm</Typography>
|
|
84
|
-
<Typography {...args} level="body-sm" />
|
|
85
|
-
</Stack>
|
|
86
|
-
<Stack direction="row" spacing={2}>
|
|
87
|
-
<Typography level="body-xs">body-xs</Typography>
|
|
88
|
-
<Typography {...args} level="body-xs" />
|
|
89
|
-
</Stack>
|
|
90
|
-
</>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Style Reference
|
|
94
|
-
|
|
95
|
-
| Level | Font Family | Font Size | Font Weight | Line Height | Letter Spacing | Default Color | HTML Tag |
|
|
96
|
-
| -------- | --------------- | --------------- | -------------- | ----------- | -------------- | -------------- | -------- |
|
|
97
|
-
| h1 | display (Inter) | 2.25rem (36px) | 700 (Bold) | 1.333 | -0.025em | text.primary | `<h1>` |
|
|
98
|
-
| h2 | display (Inter) | 1.875rem (30px) | 700 (Bold) | 1.333 | -0.025em | text.primary | `<h2>` |
|
|
99
|
-
| h3 | display (Inter) | 1.5rem (24px) | 600 (SemiBold) | 1.333 | -0.025em | text.primary | `<h3>` |
|
|
100
|
-
| h4 | display (Inter) | 1.25rem (20px) | 600 (SemiBold) | 1.5 | -0.025em | text.primary | `<h4>` |
|
|
101
|
-
| title-lg | body (Inter) | 1.125rem (18px) | 600 (SemiBold) | 1.333 | - | text.primary | `<p>` |
|
|
102
|
-
| title-md | body (Inter) | 1rem (16px) | 500 (Medium) | 1.5 | - | text.primary | `<p>` |
|
|
103
|
-
| title-sm | body (Inter) | 0.875rem (14px) | 500 (Medium) | 1.429 | - | text.primary | `<p>` |
|
|
104
|
-
| body-lg | body (Inter) | 1.125rem (18px) | inherit | 1.5 | - | text.secondary | `<p>` |
|
|
105
|
-
| body-md | body (Inter) | 1rem (16px) | inherit | 1.5 | - | text.secondary | `<p>` |
|
|
106
|
-
| body-sm | body (Inter) | 0.875rem (14px) | inherit | 1.5 | - | text.tertiary | `<p>` |
|
|
107
|
-
| body-xs | body (Inter) | 0.75rem (12px) | 500 (Medium) | 1.5 | - | text.tertiary | `<span>` |
|
|
108
|
-
|
|
109
36
|
### Headings
|
|
110
37
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```tsx
|
|
114
|
-
<>
|
|
115
|
-
<Typography level="h1">h1 - Main page heading</Typography>
|
|
116
|
-
<Typography level="h2">h2 - Section heading</Typography>
|
|
117
|
-
<Typography level="h3">h3 - Subsection heading</Typography>
|
|
118
|
-
<Typography level="h4">h4 - Detail heading</Typography>
|
|
119
|
-
</>
|
|
120
|
-
```
|
|
38
|
+
제목을 위한 레벨들입니다. 페이지 구조를 명확하게 나타내는 데 사용됩니다.
|
|
121
39
|
|
|
122
40
|
```tsx
|
|
123
|
-
<Typography level="h1">H1 -
|
|
124
|
-
<Typography level="h2">H2 -
|
|
125
|
-
<Typography level="h3">H3 -
|
|
126
|
-
<Typography level="h4">H4 -
|
|
41
|
+
<Typography level="h1">H1 - 페이지 메인 제목</Typography>
|
|
42
|
+
<Typography level="h2">H2 - 섹션 제목</Typography>
|
|
43
|
+
<Typography level="h3">H3 - 하위 섹션 제목</Typography>
|
|
44
|
+
<Typography level="h4">H4 - 세부 제목</Typography>
|
|
127
45
|
```
|
|
128
46
|
|
|
129
47
|
### Titles
|
|
130
48
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```tsx
|
|
134
|
-
<>
|
|
135
|
-
<Typography level="title-lg">title-lg - Large title</Typography>
|
|
136
|
-
<Typography level="title-md">title-md - Medium title</Typography>
|
|
137
|
-
<Typography level="title-sm">title-sm - Small title</Typography>
|
|
138
|
-
</>
|
|
139
|
-
```
|
|
49
|
+
중요한 제목이나 강조할 텍스트에 사용됩니다.
|
|
140
50
|
|
|
141
51
|
```tsx
|
|
142
52
|
<Typography level="title-lg">Large Title</Typography>
|
|
@@ -146,210 +56,13 @@ Title levels are used for UI labels, card titles, and other emphasized text that
|
|
|
146
56
|
|
|
147
57
|
### Body Text
|
|
148
58
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
```tsx
|
|
152
|
-
<>
|
|
153
|
-
<Typography level="body-lg">body-lg - Large body text</Typography>
|
|
154
|
-
<Typography level="body-md">body-md - Regular body text</Typography>
|
|
155
|
-
<Typography level="body-sm">body-sm - Small body text</Typography>
|
|
156
|
-
<Typography level="body-xs">body-xs - Extra small text</Typography>
|
|
157
|
-
</>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
```tsx
|
|
161
|
-
<Typography level="body-lg">Large body text</Typography>
|
|
162
|
-
<Typography level="body-md">Regular body text</Typography>
|
|
163
|
-
<Typography level="body-sm">Small body text</Typography>
|
|
164
|
-
<Typography level="body-xs">Extra small text</Typography>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## Design Token Reference
|
|
168
|
-
|
|
169
|
-
### Font Size Scale
|
|
170
|
-
|
|
171
|
-
| Token | Value |
|
|
172
|
-
| ----- | --------------- |
|
|
173
|
-
| xs | 0.75rem (12px) |
|
|
174
|
-
| sm | 0.875rem (14px) |
|
|
175
|
-
| md | 1rem (16px) |
|
|
176
|
-
| lg | 1.125rem (18px) |
|
|
177
|
-
| xl | 1.25rem (20px) |
|
|
178
|
-
| xl2 | 1.5rem (24px) |
|
|
179
|
-
| xl3 | 1.875rem (30px) |
|
|
180
|
-
| xl4 | 2.25rem (36px) |
|
|
181
|
-
|
|
182
|
-
### Font Weight Scale
|
|
183
|
-
|
|
184
|
-
| Token | Value |
|
|
185
|
-
| ----- | -------------- |
|
|
186
|
-
| sm | 300 (Light) |
|
|
187
|
-
| md | 500 (Medium) |
|
|
188
|
-
| lg | 600 (SemiBold) |
|
|
189
|
-
| xl | 700 (Bold) |
|
|
190
|
-
|
|
191
|
-
### Line Height Scale
|
|
192
|
-
|
|
193
|
-
| Token | Value |
|
|
194
|
-
| ----- | ----- |
|
|
195
|
-
| xs | 1.333 |
|
|
196
|
-
| sm | 1.429 |
|
|
197
|
-
| md | 1.5 |
|
|
198
|
-
| lg | 1.556 |
|
|
199
|
-
| xl | 1.667 |
|
|
200
|
-
|
|
201
|
-
### Font Families
|
|
202
|
-
|
|
203
|
-
- **body**: `"Inter"`, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
|
|
204
|
-
- **display**: `"Inter"`, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
|
|
205
|
-
- **code**: `"Source Code Pro"`, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace
|
|
206
|
-
|
|
207
|
-
## Colors
|
|
208
|
-
|
|
209
|
-
Typography supports five semantic colors via the `color` prop. Use `textColor` to apply any palette color directly.
|
|
210
|
-
|
|
211
|
-
```tsx
|
|
212
|
-
<>
|
|
213
|
-
<Typography color="primary">Primary color</Typography>
|
|
214
|
-
<Typography color="neutral">Neutral color</Typography>
|
|
215
|
-
<Typography color="danger">Danger color</Typography>
|
|
216
|
-
<Typography color="success">Success color</Typography>
|
|
217
|
-
<Typography color="warning">Warning color</Typography>
|
|
218
|
-
</>
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
```tsx
|
|
222
|
-
<Typography color="primary">Primary color</Typography>
|
|
223
|
-
<Typography color="neutral">Neutral color</Typography>
|
|
224
|
-
<Typography color="danger">Danger color</Typography>
|
|
225
|
-
<Typography color="success">Success color</Typography>
|
|
226
|
-
<Typography color="warning">Warning color</Typography>
|
|
227
|
-
|
|
228
|
-
{/* Use textColor for specific palette values */}
|
|
229
|
-
<Typography textColor="neutral.600">Custom palette color</Typography>
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Component Prop
|
|
233
|
-
|
|
234
|
-
Use the `component` prop to render Typography as a different HTML element or React component. Each level has a default HTML tag mapping shown below.
|
|
235
|
-
|
|
236
|
-
```tsx
|
|
237
|
-
<>
|
|
238
|
-
<Typography level="h1" component="h2">
|
|
239
|
-
h1 style rendered as h2 tag
|
|
240
|
-
</Typography>
|
|
241
|
-
<Typography level="body-md" component="span">
|
|
242
|
-
body-md rendered as span
|
|
243
|
-
</Typography>
|
|
244
|
-
<Typography level="title-md" component="label">
|
|
245
|
-
title-md rendered as label
|
|
246
|
-
</Typography>
|
|
247
|
-
</>
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
```tsx
|
|
251
|
-
<Typography level="h1" component="h2">
|
|
252
|
-
h1 style rendered as an h2 tag
|
|
253
|
-
</Typography>
|
|
254
|
-
|
|
255
|
-
<Typography level="body-md" component="span">
|
|
256
|
-
Inline text
|
|
257
|
-
</Typography>
|
|
258
|
-
|
|
259
|
-
<Typography level="title-md" component="label">
|
|
260
|
-
Rendered as a label element
|
|
261
|
-
</Typography>
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
**Default HTML tag mapping:**
|
|
265
|
-
|
|
266
|
-
| Level | Default HTML Tag |
|
|
267
|
-
| -------- | ---------------- |
|
|
268
|
-
| h1 | `<h1>` |
|
|
269
|
-
| h2 | `<h2>` |
|
|
270
|
-
| h3 | `<h3>` |
|
|
271
|
-
| h4 | `<h4>` |
|
|
272
|
-
| title-lg | `<p>` |
|
|
273
|
-
| title-md | `<p>` |
|
|
274
|
-
| title-sm | `<p>` |
|
|
275
|
-
| body-lg | `<p>` |
|
|
276
|
-
| body-md | `<p>` |
|
|
277
|
-
| body-sm | `<p>` |
|
|
278
|
-
| body-xs | `<span>` |
|
|
279
|
-
|
|
280
|
-
## Decorators
|
|
281
|
-
|
|
282
|
-
Use `startDecorator` and `endDecorator` to add icons or other elements before or after the text.
|
|
283
|
-
|
|
284
|
-
```tsx
|
|
285
|
-
<>
|
|
286
|
-
<Typography startDecorator={<InfoOutlined />}>
|
|
287
|
-
Text with start decorator
|
|
288
|
-
</Typography>
|
|
289
|
-
<Typography endDecorator={<ArrowForward />}>
|
|
290
|
-
Text with end decorator
|
|
291
|
-
</Typography>
|
|
292
|
-
<Typography startDecorator={<InfoOutlined />} endDecorator={<ArrowForward />}>
|
|
293
|
-
Text with both decorators
|
|
294
|
-
</Typography>
|
|
295
|
-
</>
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
```tsx
|
|
299
|
-
import InfoOutlined from '@mui/icons-material/InfoOutlined';
|
|
300
|
-
import ArrowForward from '@mui/icons-material/ArrowForward';
|
|
301
|
-
|
|
302
|
-
<Typography startDecorator={<InfoOutlined />}>
|
|
303
|
-
Text with start decorator
|
|
304
|
-
</Typography>
|
|
305
|
-
|
|
306
|
-
<Typography endDecorator={<ArrowForward />}>
|
|
307
|
-
Text with end decorator
|
|
308
|
-
</Typography>
|
|
309
|
-
|
|
310
|
-
<Typography startDecorator={<InfoOutlined />} endDecorator={<ArrowForward />}>
|
|
311
|
-
Text with both decorators
|
|
312
|
-
</Typography>
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
## Text Overflow (noWrap)
|
|
316
|
-
|
|
317
|
-
Use the `noWrap` prop to truncate overflowing text with an ellipsis. Pair it with a `maxWidth` to constrain the text width.
|
|
318
|
-
|
|
319
|
-
```tsx
|
|
320
|
-
<Typography noWrap sx={{
|
|
321
|
-
maxWidth: 200
|
|
322
|
-
}}>
|
|
323
|
-
This is a long text that will be truncated with an ellipsis when it
|
|
324
|
-
exceeds the maximum width of the container.
|
|
325
|
-
</Typography>
|
|
326
|
-
```
|
|
59
|
+
본문 텍스트를 위한 레벨들입니다. 대부분의 읽기 내용에 사용됩니다.
|
|
327
60
|
|
|
328
61
|
```tsx
|
|
329
|
-
<Typography
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
## Responsive Typography
|
|
336
|
-
|
|
337
|
-
You can pass a responsive object to the `level` prop, or use `sx` to set responsive font sizes.
|
|
338
|
-
|
|
339
|
-
```tsx
|
|
340
|
-
{/* Responsive level */}
|
|
341
|
-
<Typography level={{ xs: 'h3', sm: 'h2', md: 'h1' }}>
|
|
342
|
-
Responsive Heading
|
|
343
|
-
</Typography>
|
|
344
|
-
|
|
345
|
-
{/* Responsive font size via sx */}
|
|
346
|
-
<Typography
|
|
347
|
-
sx={{
|
|
348
|
-
fontSize: { xs: '1rem', sm: '1.25rem', md: '1.5rem' },
|
|
349
|
-
}}
|
|
350
|
-
>
|
|
351
|
-
Responsive text
|
|
352
|
-
</Typography>
|
|
62
|
+
<Typography level="body-lg">큰 본문 텍스트</Typography>
|
|
63
|
+
<Typography level="body-md">일반 본문 텍스트</Typography>
|
|
64
|
+
<Typography level="body-sm">작은 본문 텍스트</Typography>
|
|
65
|
+
<Typography level="body-xs">매우 작은 텍스트</Typography>
|
|
353
66
|
```
|
|
354
67
|
|
|
355
68
|
## Common Use Cases
|
|
@@ -361,24 +74,24 @@ function ArticlePage() {
|
|
|
361
74
|
return (
|
|
362
75
|
<article>
|
|
363
76
|
<Typography level="h1" sx={{ mb: 2 }}>
|
|
364
|
-
|
|
77
|
+
기사 제목
|
|
365
78
|
</Typography>
|
|
366
79
|
|
|
367
80
|
<Typography level="body-sm" color="neutral" sx={{ mb: 3 }}>
|
|
368
|
-
|
|
81
|
+
2024년 1월 15일 · 김철수 작성
|
|
369
82
|
</Typography>
|
|
370
83
|
|
|
371
84
|
<Typography level="body-md" sx={{ mb: 2 }}>
|
|
372
|
-
|
|
373
|
-
|
|
85
|
+
기사의 본문 내용이 여기에 들어갑니다. 이 텍스트는 읽기 쉬운
|
|
86
|
+
크기와 줄 간격을 가지고 있습니다.
|
|
374
87
|
</Typography>
|
|
375
88
|
|
|
376
89
|
<Typography level="h2" sx={{ mt: 4, mb: 2 }}>
|
|
377
|
-
|
|
90
|
+
섹션 제목
|
|
378
91
|
</Typography>
|
|
379
92
|
|
|
380
93
|
<Typography level="body-md">
|
|
381
|
-
|
|
94
|
+
섹션의 내용이 계속됩니다.
|
|
382
95
|
</Typography>
|
|
383
96
|
</article>
|
|
384
97
|
);
|
|
@@ -391,15 +104,15 @@ function ArticlePage() {
|
|
|
391
104
|
<Card>
|
|
392
105
|
<CardContent>
|
|
393
106
|
<Typography level="title-md" sx={{ mb: 1 }}>
|
|
394
|
-
|
|
107
|
+
제품명
|
|
395
108
|
</Typography>
|
|
396
109
|
|
|
397
110
|
<Typography level="body-sm" color="neutral" sx={{ mb: 2 }}>
|
|
398
|
-
|
|
111
|
+
카테고리: 전자제품
|
|
399
112
|
</Typography>
|
|
400
113
|
|
|
401
114
|
<Typography level="body-md" sx={{ mb: 2 }}>
|
|
402
|
-
|
|
115
|
+
제품에 대한 상세 설명이 여기에 들어갑니다.
|
|
403
116
|
</Typography>
|
|
404
117
|
|
|
405
118
|
<Typography level="title-lg" color="primary">
|
|
@@ -415,58 +128,41 @@ function ArticlePage() {
|
|
|
415
128
|
<Stack spacing={2}>
|
|
416
129
|
<FormControl>
|
|
417
130
|
<Typography level="title-sm" component="label">
|
|
418
|
-
|
|
131
|
+
사용자 이름
|
|
419
132
|
</Typography>
|
|
420
|
-
<Input placeholder="
|
|
133
|
+
<Input placeholder="이름을 입력하세요" />
|
|
421
134
|
<Typography level="body-xs" color="neutral">
|
|
422
|
-
|
|
135
|
+
실명으로 입력해 주세요.
|
|
423
136
|
</Typography>
|
|
424
137
|
</FormControl>
|
|
425
138
|
|
|
426
139
|
<FormControl error>
|
|
427
140
|
<Typography level="title-sm" component="label">
|
|
428
|
-
|
|
141
|
+
이메일 주소
|
|
429
142
|
</Typography>
|
|
430
143
|
<Input placeholder="email@example.com" />
|
|
431
144
|
<Typography level="body-xs" color="danger">
|
|
432
|
-
|
|
145
|
+
올바른 이메일 형식이 아닙니다.
|
|
433
146
|
</Typography>
|
|
434
147
|
</FormControl>
|
|
435
148
|
</Stack>
|
|
436
149
|
```
|
|
437
150
|
|
|
438
|
-
> 💡 **Tip: Use built-in form props instead**
|
|
439
|
-
>
|
|
440
|
-
> Input, Select, Textarea, DatePicker 등 Input 계열 컴포넌트는 `label`, `helperText` prop을 자체적으로 지원합니다.
|
|
441
|
-
> Form을 구성할 때는 Typography로 직접 label/helperText를 만드는 것보다 각 컴포넌트의 내장 prop을 사용하는 것이 권장됩니다.
|
|
442
|
-
>
|
|
443
|
-
> ```tsx
|
|
444
|
-
> // ✅ Recommended: 컴포넌트 내장 prop 사용
|
|
445
|
-
> <Input label="Username" helperText="Please enter your real name." />
|
|
446
|
-
>
|
|
447
|
-
> // ❌ Not recommended: Typography로 직접 구성
|
|
448
|
-
> <FormControl>
|
|
449
|
-
> <Typography level="title-sm" component="label">Username</Typography>
|
|
450
|
-
> <Input placeholder="Enter your name" />
|
|
451
|
-
> <Typography level="body-xs" color="neutral">Please enter your real name.</Typography>
|
|
452
|
-
> </FormControl>
|
|
453
|
-
> ```
|
|
454
|
-
|
|
455
151
|
### Status and Indicators
|
|
456
152
|
|
|
457
153
|
```tsx
|
|
458
154
|
<Stack spacing={2}>
|
|
459
155
|
<Box>
|
|
460
|
-
<Typography level="body-md"
|
|
156
|
+
<Typography level="body-md">서버 상태:</Typography>
|
|
461
157
|
<Typography level="body-md" color="success">
|
|
462
|
-
|
|
158
|
+
정상 운영 중
|
|
463
159
|
</Typography>
|
|
464
160
|
</Box>
|
|
465
161
|
|
|
466
162
|
<Box>
|
|
467
|
-
<Typography level="body-md"
|
|
163
|
+
<Typography level="body-md">마지막 업데이트:</Typography>
|
|
468
164
|
<Typography level="body-sm" color="neutral">
|
|
469
|
-
2
|
|
165
|
+
2분 전
|
|
470
166
|
</Typography>
|
|
471
167
|
</Box>
|
|
472
168
|
</Stack>
|
|
@@ -476,7 +172,7 @@ function ArticlePage() {
|
|
|
476
172
|
|
|
477
173
|
```tsx
|
|
478
174
|
<Stack spacing={1}>
|
|
479
|
-
<Typography level="title-md"
|
|
175
|
+
<Typography level="title-md">할 일 목록</Typography>
|
|
480
176
|
|
|
481
177
|
{todoItems.map((item) => (
|
|
482
178
|
<Box key={item.id} sx={{ pl: 2 }}>
|
|
@@ -484,7 +180,7 @@ function ArticlePage() {
|
|
|
484
180
|
level="body-md"
|
|
485
181
|
sx={{
|
|
486
182
|
textDecoration: item.completed ? 'line-through' : 'none',
|
|
487
|
-
color: item.completed ? 'neutral.500' : 'text.primary'
|
|
183
|
+
color: item.completed ? 'neutral.500' : 'text.primary'
|
|
488
184
|
}}
|
|
489
185
|
>
|
|
490
186
|
{item.text}
|
|
@@ -497,41 +193,79 @@ function ArticlePage() {
|
|
|
497
193
|
</Stack>
|
|
498
194
|
```
|
|
499
195
|
|
|
500
|
-
##
|
|
196
|
+
## Colors
|
|
501
197
|
|
|
502
|
-
|
|
198
|
+
Typography는 다양한 색상을 지원합니다:
|
|
503
199
|
|
|
504
200
|
```tsx
|
|
505
|
-
|
|
506
|
-
<Typography
|
|
507
|
-
<Typography
|
|
508
|
-
<Typography
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
<Typography level="h3">Section heading</Typography>
|
|
201
|
+
<Stack spacing={1}>
|
|
202
|
+
<Typography color="primary">Primary 색상</Typography>
|
|
203
|
+
<Typography color="neutral">Neutral 색상</Typography>
|
|
204
|
+
<Typography color="danger">Danger 색상</Typography>
|
|
205
|
+
<Typography color="success">Success 색상</Typography>
|
|
206
|
+
<Typography color="warning">Warning 색상</Typography>
|
|
207
|
+
</Stack>
|
|
513
208
|
```
|
|
514
209
|
|
|
515
|
-
|
|
210
|
+
## Component Prop
|
|
516
211
|
|
|
517
|
-
|
|
212
|
+
다른 HTML 요소나 React 컴포넌트로 렌더링할 수 있습니다:
|
|
518
213
|
|
|
519
|
-
|
|
214
|
+
```tsx
|
|
215
|
+
<Typography level="h1" component="h2">
|
|
216
|
+
h2 태그로 렌더링되는 h1 스타일
|
|
217
|
+
</Typography>
|
|
520
218
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
- **Body** (`body-lg/md/sm/xs`): Use for content, descriptions, and supporting text.
|
|
219
|
+
<Typography level="body-md" component="span">
|
|
220
|
+
인라인 텍스트
|
|
221
|
+
</Typography>
|
|
525
222
|
|
|
526
|
-
|
|
223
|
+
<Typography level="title-md" component={Link} href="/page">
|
|
224
|
+
링크 컴포넌트로 렌더링
|
|
225
|
+
</Typography>
|
|
226
|
+
```
|
|
527
227
|
|
|
528
|
-
|
|
228
|
+
## Responsive Typography
|
|
529
229
|
|
|
530
|
-
|
|
230
|
+
반응형 레벨을 사용할 수 있습니다:
|
|
231
|
+
|
|
232
|
+
```tsx
|
|
233
|
+
<Typography
|
|
234
|
+
level={{ xs: 'h3', sm: 'h2', md: 'h1' }}
|
|
235
|
+
sx={{
|
|
236
|
+
fontSize: { xs: '1.5rem', sm: '2rem', md: '2.5rem' }
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
반응형 제목
|
|
240
|
+
</Typography>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Best Practices
|
|
244
|
+
|
|
245
|
+
1. **의미적 구조**: 제목 레벨을 순서대로 사용하여 명확한 문서 구조를 만드세요.
|
|
246
|
+
|
|
247
|
+
```tsx
|
|
248
|
+
// ✅ 올바른 순서
|
|
249
|
+
<Typography level="h1">메인 제목</Typography>
|
|
250
|
+
<Typography level="h2">섹션 제목</Typography>
|
|
251
|
+
<Typography level="h3">하위 섹션</Typography>
|
|
252
|
+
|
|
253
|
+
// ❌ 잘못된 순서
|
|
254
|
+
<Typography level="h1">메인 제목</Typography>
|
|
255
|
+
<Typography level="h3">섹션 제목</Typography>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
2. **일관성**: 같은 용도의 텍스트에는 같은 레벨을 사용하세요.
|
|
259
|
+
|
|
260
|
+
3. **가독성**: 본문 텍스트에는 적절한 줄 간격과 문단 구분을 제공하세요.
|
|
261
|
+
|
|
262
|
+
4. **색상 대비**: 충분한 색상 대비를 유지하여 접근성을 보장하세요.
|
|
531
263
|
|
|
532
264
|
## Accessibility
|
|
533
265
|
|
|
534
|
-
-
|
|
535
|
-
-
|
|
536
|
-
-
|
|
537
|
-
-
|
|
266
|
+
- 적절한 HTML 시맨틱 태그 사용
|
|
267
|
+
- 스크린 리더 지원
|
|
268
|
+
- 키보드 탐색 가능 (링크나 버튼으로 사용될 때)
|
|
269
|
+
- 충분한 색상 대비
|
|
270
|
+
|
|
271
|
+
Typography는 사용자 인터페이스에서 정보를 효과적으로 전달하고 시각적 계층 구조를 만드는 데 핵심적인 역할을 합니다. 적절한 레벨과 스타일을 선택하여 읽기 쉽고 접근 가능한 콘텐츠를 만들 수 있습니다.
|