@ceed/ads 1.30.0 → 1.30.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/Overview.md +5 -5
- package/dist/components/data-display/Avatar.md +85 -74
- package/dist/components/data-display/Badge.md +23 -5
- package/dist/components/data-display/Chip.md +49 -35
- package/dist/components/data-display/DataTable.md +93 -0
- package/dist/components/data-display/InfoSign.md +15 -5
- package/dist/components/data-display/Markdown.md +22 -26
- package/dist/components/data-display/Table.md +63 -53
- package/dist/components/data-display/Tooltip.md +70 -58
- package/dist/components/data-display/Typography.md +28 -11
- package/dist/components/feedback/Alert.md +86 -74
- package/dist/components/feedback/CircularProgress.md +20 -5
- package/dist/components/feedback/Dialog.md +8 -12
- package/dist/components/feedback/Modal.md +12 -16
- package/dist/components/feedback/Skeleton.md +20 -5
- package/dist/components/inputs/Autocomplete.md +8 -10
- package/dist/components/inputs/Button.md +107 -87
- package/dist/components/inputs/ButtonGroup.md +20 -5
- package/dist/components/inputs/Calendar.md +25 -5
- package/dist/components/inputs/Checkbox.md +171 -450
- package/dist/components/inputs/CurrencyInput.md +25 -5
- package/dist/components/inputs/DatePicker.md +39 -5
- package/dist/components/inputs/DateRangePicker.md +29 -5
- package/dist/components/inputs/FilterMenu.md +85 -9
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -8
- package/dist/components/inputs/FormControl.md +34 -6
- package/dist/components/inputs/IconButton.md +21 -5
- package/dist/components/inputs/Input.md +254 -68
- package/dist/components/inputs/MonthPicker.md +28 -5
- package/dist/components/inputs/MonthRangePicker.md +26 -5
- package/dist/components/inputs/PercentageInput.md +28 -5
- package/dist/components/inputs/RadioButton.md +26 -5
- package/dist/components/inputs/RadioList.md +23 -6
- package/dist/components/inputs/RadioTileGroup.md +40 -8
- package/dist/components/inputs/Select.md +59 -5
- package/dist/components/inputs/Slider.md +26 -5
- package/dist/components/inputs/Switch.md +23 -5
- package/dist/components/inputs/Textarea.md +27 -5
- package/dist/components/inputs/Uploader/Uploader.md +24 -5
- package/dist/components/layout/Box.md +66 -58
- package/dist/components/layout/Container.md +9 -13
- package/dist/components/layout/Grid.md +91 -75
- package/dist/components/layout/Stack.md +85 -70
- package/dist/components/navigation/Breadcrumbs.md +23 -14
- package/dist/components/navigation/Dropdown.md +29 -20
- package/dist/components/navigation/IconMenuButton.md +24 -11
- package/dist/components/navigation/InsetDrawer.md +16 -5
- package/dist/components/navigation/Link.md +30 -14
- package/dist/components/navigation/Menu.md +33 -20
- package/dist/components/navigation/MenuButton.md +26 -12
- package/dist/components/navigation/NavigationGroup.md +7 -11
- package/dist/components/navigation/NavigationItem.md +8 -12
- package/dist/components/navigation/Navigator.md +5 -9
- package/dist/components/navigation/Pagination.md +21 -12
- package/dist/components/navigation/ProfileMenu.md +17 -5
- package/dist/components/navigation/Stepper.md +18 -5
- package/dist/components/navigation/Tabs.md +37 -14
- package/dist/components/surfaces/Accordions.md +12 -16
- package/dist/components/surfaces/Card.md +59 -47
- package/dist/components/surfaces/Divider.md +70 -61
- package/dist/components/surfaces/Sheet.md +18 -5
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Tooltip
|
|
5
|
+
The Tooltip component is an overlay that provides additional information or help when a user hovers over an element. It is based on Joy UI Tooltip and is used to display concise, useful information that improves the user experience. Common use cases include button descriptions, icon meanings, and showing the full content of truncated text.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Tooltip
|
|
@@ -35,11 +35,9 @@ function MyComponent() {
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Basic Usage
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
가장 기본적인 Tooltip 사용법입니다.
|
|
40
|
+
The most basic Tooltip usage.
|
|
43
41
|
|
|
44
42
|
```tsx
|
|
45
43
|
<Tooltip
|
|
@@ -49,9 +47,9 @@ function MyComponent() {
|
|
|
49
47
|
/>
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
## Controlled Tooltip
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
A Tooltip controlled programmatically.
|
|
55
53
|
|
|
56
54
|
```tsx
|
|
57
55
|
<Tooltip
|
|
@@ -62,11 +60,9 @@ function MyComponent() {
|
|
|
62
60
|
/>
|
|
63
61
|
```
|
|
64
62
|
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
### Icon Button Descriptions
|
|
63
|
+
## Tooltip for Icon Buttons
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
Used to explain the meaning of icon buttons.
|
|
70
66
|
|
|
71
67
|
```tsx
|
|
72
68
|
<Stack direction="row" spacing={1}>
|
|
@@ -90,9 +86,9 @@ function MyComponent() {
|
|
|
90
86
|
</Stack>
|
|
91
87
|
```
|
|
92
88
|
|
|
93
|
-
|
|
89
|
+
## Tooltip for Truncated Text
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
Used to display the full content of truncated text.
|
|
96
92
|
|
|
97
93
|
```tsx
|
|
98
94
|
function TruncatedText({ text }: { text: string }) {
|
|
@@ -117,9 +113,9 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
117
113
|
}
|
|
118
114
|
```
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
## Tooltip for Form Field Help
|
|
121
117
|
|
|
122
|
-
|
|
118
|
+
Used to provide additional help for form fields.
|
|
123
119
|
|
|
124
120
|
```tsx
|
|
125
121
|
<Stack spacing={2}>
|
|
@@ -137,9 +133,9 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
137
133
|
</Stack>
|
|
138
134
|
```
|
|
139
135
|
|
|
140
|
-
|
|
136
|
+
## Tooltip for Status Indicators
|
|
141
137
|
|
|
142
|
-
|
|
138
|
+
Used to display status or progress information.
|
|
143
139
|
|
|
144
140
|
```tsx
|
|
145
141
|
<Stack direction="row" spacing={2} alignItems="center">
|
|
@@ -166,9 +162,9 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
166
162
|
</Stack>
|
|
167
163
|
```
|
|
168
164
|
|
|
169
|
-
|
|
165
|
+
## Tooltip for Navigation Hints
|
|
170
166
|
|
|
171
|
-
|
|
167
|
+
Used to provide help text for navigation elements.
|
|
172
168
|
|
|
173
169
|
```tsx
|
|
174
170
|
<Stack direction="row" spacing={2}>
|
|
@@ -194,9 +190,9 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
194
190
|
</Stack>
|
|
195
191
|
```
|
|
196
192
|
|
|
197
|
-
|
|
193
|
+
## Tooltip with Rich Content
|
|
198
194
|
|
|
199
|
-
|
|
195
|
+
A Tooltip with complex content.
|
|
200
196
|
|
|
201
197
|
```tsx
|
|
202
198
|
<Tooltip
|
|
@@ -220,9 +216,9 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
220
216
|
</Tooltip>
|
|
221
217
|
```
|
|
222
218
|
|
|
223
|
-
|
|
219
|
+
## Tooltip with Interactive Elements
|
|
224
220
|
|
|
225
|
-
|
|
221
|
+
Used with interactive elements.
|
|
226
222
|
|
|
227
223
|
```tsx
|
|
228
224
|
<Stack direction="row" spacing={2}>
|
|
@@ -246,17 +242,33 @@ function TruncatedText({ text }: { text: string }) {
|
|
|
246
242
|
|
|
247
243
|
## Props and Customization
|
|
248
244
|
|
|
249
|
-
###
|
|
245
|
+
### Key Props
|
|
246
|
+
|
|
247
|
+
| Prop | Type | Default | Description |
|
|
248
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------- |
|
|
249
|
+
| `title` | `ReactNode` | - | Content displayed inside the tooltip |
|
|
250
|
+
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right' \| 'top-start' \| 'top-end' \| 'bottom-start' \| 'bottom-end' \| ...` | `'bottom'` | Tooltip position relative to the child element |
|
|
251
|
+
| `arrow` | `boolean` | `false` | Show an arrow pointing to the target element |
|
|
252
|
+
| `open` | `boolean` | - | Controls tooltip visibility (controlled mode) |
|
|
253
|
+
| `onClose` | `() => void` | - | Callback when tooltip should close |
|
|
254
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Tooltip color scheme |
|
|
255
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'solid'` | Visual style |
|
|
256
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Tooltip size |
|
|
257
|
+
| `sx` | `SxProps` | - | Custom styles using the MUI system |
|
|
258
|
+
|
|
259
|
+
> **Note**: Tooltip also accepts all Joy UI Tooltip props and Framer Motion props.
|
|
260
|
+
|
|
261
|
+
## Tooltip Title Prop
|
|
250
262
|
|
|
251
|
-
|
|
263
|
+
Specifies the content displayed in the Tooltip.
|
|
252
264
|
|
|
253
265
|
```tsx
|
|
254
|
-
//
|
|
266
|
+
// Simple text
|
|
255
267
|
<Tooltip title="간단한 도움말">
|
|
256
268
|
<Button>버튼</Button>
|
|
257
269
|
</Tooltip>
|
|
258
270
|
|
|
259
|
-
// React
|
|
271
|
+
// React element
|
|
260
272
|
<Tooltip
|
|
261
273
|
title={
|
|
262
274
|
<div>
|
|
@@ -269,9 +281,9 @@ Tooltip에 표시될 내용을 지정합니다.
|
|
|
269
281
|
</Tooltip>
|
|
270
282
|
```
|
|
271
283
|
|
|
272
|
-
|
|
284
|
+
## Tooltip Placement
|
|
273
285
|
|
|
274
|
-
|
|
286
|
+
You can adjust where the Tooltip appears.
|
|
275
287
|
|
|
276
288
|
```tsx
|
|
277
289
|
<Stack direction="row" spacing={2} sx={{ mt: 4 }}>
|
|
@@ -293,9 +305,9 @@ Tooltip이 나타나는 위치를 조정할 수 있습니다.
|
|
|
293
305
|
</Stack>
|
|
294
306
|
```
|
|
295
307
|
|
|
296
|
-
|
|
308
|
+
## Tooltip Colors and Variants
|
|
297
309
|
|
|
298
|
-
|
|
310
|
+
You can apply various colors and variants.
|
|
299
311
|
|
|
300
312
|
```tsx
|
|
301
313
|
<Stack direction="row" spacing={2}>
|
|
@@ -317,9 +329,9 @@ Tooltip이 나타나는 위치를 조정할 수 있습니다.
|
|
|
317
329
|
</Stack>
|
|
318
330
|
```
|
|
319
331
|
|
|
320
|
-
|
|
332
|
+
## Tooltip Arrow
|
|
321
333
|
|
|
322
|
-
|
|
334
|
+
You can show an arrow to make it clear which element the Tooltip points to.
|
|
323
335
|
|
|
324
336
|
```tsx
|
|
325
337
|
<Stack direction="row" spacing={2}>
|
|
@@ -333,9 +345,9 @@ Tooltip이 나타나는 위치를 조정할 수 있습니다.
|
|
|
333
345
|
</Stack>
|
|
334
346
|
```
|
|
335
347
|
|
|
336
|
-
|
|
348
|
+
## Tooltip Controlled Mode
|
|
337
349
|
|
|
338
|
-
|
|
350
|
+
You can control the Tooltip's visibility programmatically.
|
|
339
351
|
|
|
340
352
|
```tsx
|
|
341
353
|
function ControlledTooltip() {
|
|
@@ -355,11 +367,11 @@ function ControlledTooltip() {
|
|
|
355
367
|
|
|
356
368
|
## Accessibility
|
|
357
369
|
|
|
358
|
-
Tooltip
|
|
370
|
+
The Tooltip component provides the following accessibility features:
|
|
359
371
|
|
|
360
|
-
### ARIA
|
|
372
|
+
### ARIA Attributes
|
|
361
373
|
|
|
362
|
-
|
|
374
|
+
Appropriate ARIA attributes are applied automatically.
|
|
363
375
|
|
|
364
376
|
```tsx
|
|
365
377
|
<Tooltip title="저장 버튼">
|
|
@@ -369,16 +381,16 @@ Tooltip 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
|
|
|
369
381
|
</Tooltip>
|
|
370
382
|
```
|
|
371
383
|
|
|
372
|
-
###
|
|
384
|
+
### Keyboard Support
|
|
373
385
|
|
|
374
|
-
|
|
386
|
+
Keyboard users can also use the Tooltip.
|
|
375
387
|
|
|
376
|
-
- **Tab**:
|
|
377
|
-
- **Escape**:
|
|
388
|
+
- **Tab**: Move to a focusable element
|
|
389
|
+
- **Escape**: Close the open Tooltip
|
|
378
390
|
|
|
379
|
-
###
|
|
391
|
+
### Touch Device Support
|
|
380
392
|
|
|
381
|
-
|
|
393
|
+
Supports tap gestures so the Tooltip can also be used on touch devices.
|
|
382
394
|
|
|
383
395
|
```tsx
|
|
384
396
|
<Tooltip title="터치 기기에서도 동작합니다" touchTapDelay={0}>
|
|
@@ -388,30 +400,30 @@ Tooltip 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
|
|
|
388
400
|
|
|
389
401
|
## Best Practices
|
|
390
402
|
|
|
391
|
-
1.
|
|
403
|
+
1. **Concise content**: Keep Tooltip content brief and easy to understand.
|
|
392
404
|
|
|
393
405
|
```tsx
|
|
394
|
-
// ✅
|
|
406
|
+
// ✅ Good example
|
|
395
407
|
<Tooltip title="삭제">
|
|
396
408
|
<IconButton><DeleteIcon /></IconButton>
|
|
397
409
|
</Tooltip>
|
|
398
410
|
|
|
399
|
-
// ❌
|
|
411
|
+
// ❌ Bad example
|
|
400
412
|
<Tooltip title="이 버튼을 클릭하면 선택된 항목이 영구적으로 삭제되며 복구할 수 없습니다">
|
|
401
413
|
<IconButton><DeleteIcon /></IconButton>
|
|
402
414
|
</Tooltip>
|
|
403
415
|
```
|
|
404
416
|
|
|
405
|
-
2.
|
|
417
|
+
2. **Use another channel for critical information**: Do not rely on a Tooltip alone for essential information.
|
|
406
418
|
|
|
407
|
-
3.
|
|
419
|
+
3. **Appropriate timing**: Show it only when the user needs help.
|
|
408
420
|
|
|
409
|
-
4.
|
|
421
|
+
4. **Consistent placement**: Use consistent placement across the application.
|
|
410
422
|
|
|
411
|
-
5.
|
|
423
|
+
5. **Performance considerations**: On pages with many Tooltips, render them only when needed.
|
|
412
424
|
|
|
413
425
|
```tsx
|
|
414
|
-
//
|
|
426
|
+
// Conditional Tooltip
|
|
415
427
|
{
|
|
416
428
|
(needsTooltip && (
|
|
417
429
|
<Tooltip title="도움말">
|
|
@@ -421,15 +433,15 @@ Tooltip 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
|
|
|
421
433
|
}
|
|
422
434
|
```
|
|
423
435
|
|
|
424
|
-
6.
|
|
436
|
+
6. **Mobile considerations**: Consider alternative ways to provide information in mobile environments.
|
|
425
437
|
|
|
426
|
-
7.
|
|
438
|
+
7. **Do not rely on color alone**: Communicate information with text or icons as well.
|
|
427
439
|
|
|
428
440
|
## Performance Considerations
|
|
429
441
|
|
|
430
|
-
1.
|
|
442
|
+
1. **Deferred rendering**: If there are many Tooltips, render them only when needed.
|
|
431
443
|
|
|
432
|
-
2.
|
|
444
|
+
2. **Memoization**: Consider memoizing complex `title` content.
|
|
433
445
|
|
|
434
446
|
```tsx
|
|
435
447
|
const tooltipContent = useMemo(() => <ComplexTooltipContent data={data} />, [data]);
|
|
@@ -439,6 +451,6 @@ const tooltipContent = useMemo(() => <ComplexTooltipContent data={data} />, [dat
|
|
|
439
451
|
</Tooltip>;
|
|
440
452
|
```
|
|
441
453
|
|
|
442
|
-
3.
|
|
454
|
+
3. **Event listener optimization**: Clean up custom event handlers properly.
|
|
443
455
|
|
|
444
|
-
Tooltip
|
|
456
|
+
Tooltip is an important UI component for providing additional context and guidance to users. Used appropriately, it can significantly improve the user experience.
|
|
@@ -352,9 +352,7 @@ You can pass a responsive object to the `level` prop, or use `sx` to set respons
|
|
|
352
352
|
</Typography>
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
##
|
|
356
|
-
|
|
357
|
-
### Page Structure
|
|
355
|
+
## Page Structure
|
|
358
356
|
|
|
359
357
|
```tsx
|
|
360
358
|
function ArticlePage() {
|
|
@@ -385,7 +383,7 @@ function ArticlePage() {
|
|
|
385
383
|
}
|
|
386
384
|
```
|
|
387
385
|
|
|
388
|
-
|
|
386
|
+
## Card Content
|
|
389
387
|
|
|
390
388
|
```tsx
|
|
391
389
|
<Card>
|
|
@@ -409,7 +407,7 @@ function ArticlePage() {
|
|
|
409
407
|
</Card>
|
|
410
408
|
```
|
|
411
409
|
|
|
412
|
-
|
|
410
|
+
## Form Labels and Help Text
|
|
413
411
|
|
|
414
412
|
```tsx
|
|
415
413
|
<Stack spacing={2}>
|
|
@@ -437,14 +435,14 @@ function ArticlePage() {
|
|
|
437
435
|
|
|
438
436
|
> 💡 **Tip: Use built-in form props instead**
|
|
439
437
|
>
|
|
440
|
-
> Input, Select, Textarea, DatePicker
|
|
441
|
-
>
|
|
438
|
+
> Input-family components such as Input, Select, Textarea, and DatePicker support `label` and `helperText` props natively.
|
|
439
|
+
> When building forms, it is recommended to use each component's built-in props rather than creating labels and helper text manually with Typography.
|
|
442
440
|
>
|
|
443
441
|
> ```tsx
|
|
444
|
-
> // ✅ Recommended:
|
|
442
|
+
> // ✅ Recommended: use the component's built-in props
|
|
445
443
|
> <Input label="Username" helperText="Please enter your real name." />
|
|
446
444
|
>
|
|
447
|
-
> // ❌ Not recommended:
|
|
445
|
+
> // ❌ Not recommended: manually composing with Typography
|
|
448
446
|
> <FormControl>
|
|
449
447
|
> <Typography level="title-sm" component="label">Username</Typography>
|
|
450
448
|
> <Input placeholder="Enter your name" />
|
|
@@ -452,7 +450,7 @@ function ArticlePage() {
|
|
|
452
450
|
> </FormControl>
|
|
453
451
|
> ```
|
|
454
452
|
|
|
455
|
-
|
|
453
|
+
## Status and Indicators
|
|
456
454
|
|
|
457
455
|
```tsx
|
|
458
456
|
<Stack spacing={2}>
|
|
@@ -472,7 +470,7 @@ function ArticlePage() {
|
|
|
472
470
|
</Stack>
|
|
473
471
|
```
|
|
474
472
|
|
|
475
|
-
|
|
473
|
+
## List Content
|
|
476
474
|
|
|
477
475
|
```tsx
|
|
478
476
|
<Stack spacing={1}>
|
|
@@ -497,6 +495,25 @@ function ArticlePage() {
|
|
|
497
495
|
</Stack>
|
|
498
496
|
```
|
|
499
497
|
|
|
498
|
+
## Props and Customization
|
|
499
|
+
|
|
500
|
+
### Key Props
|
|
501
|
+
|
|
502
|
+
| Prop | Type | Default | Description |
|
|
503
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------- |
|
|
504
|
+
| `children` | `ReactNode` | - | Text content |
|
|
505
|
+
| `level` | `'h1' \| 'h2' \| 'h3' \| 'h4' \| 'title-lg' \| 'title-md' \| 'title-sm' \| 'body-lg' \| 'body-md' \| 'body-sm' \| 'body-xs'` | `'body-md'` | Typography level (maps to semantic HTML elements) |
|
|
506
|
+
| `component` | `ElementType` | auto | Override the root element type |
|
|
507
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
508
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | - | Visual style (optional) |
|
|
509
|
+
| `noWrap` | `boolean` | `false` | Truncate text with ellipsis |
|
|
510
|
+
| `startDecorator` | `ReactNode` | - | Content before the text |
|
|
511
|
+
| `endDecorator` | `ReactNode` | - | Content after the text |
|
|
512
|
+
| `textColor` | `string` | - | Direct text color override |
|
|
513
|
+
| `sx` | `SxProps` | - | Custom styles |
|
|
514
|
+
|
|
515
|
+
> **Note**: Typography also accepts all Joy UI Typography props.
|
|
516
|
+
|
|
500
517
|
## Best Practices
|
|
501
518
|
|
|
502
519
|
1. **Semantic Structure**: Use heading levels in order (`h1` → `h2` → `h3`) to create a clear document hierarchy.
|