@ceed/ads 1.30.0 → 1.31.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/Overview.md +5 -5
- package/dist/components/Calendar/utils/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +8 -0
- 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 +59 -5
- package/dist/components/inputs/DateRangePicker.md +46 -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 +59 -5
- package/dist/components/inputs/MonthRangePicker.md +44 -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/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +99 -39
- package/dist/index.js +99 -39
- package/framer/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Divider
|
|
5
|
+
The Divider component draws a line that visually separates content. It is based on Joy UI's Divider component and adds Framer Motion animation support. You can use it to separate list items, card sections, form areas, and more to improve content readability.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Box sx={{
|
|
@@ -40,11 +40,9 @@ function MyComponent() {
|
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Divider Basic Usage
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
가장 기본적인 Divider 사용법입니다.
|
|
45
|
+
The most basic way to use Divider.
|
|
48
46
|
|
|
49
47
|
```tsx
|
|
50
48
|
<Stack spacing={3}>
|
|
@@ -81,9 +79,9 @@ function MyComponent() {
|
|
|
81
79
|
</Stack>
|
|
82
80
|
```
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
## Divider Orientations
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
You can set the direction of the divider.
|
|
87
85
|
|
|
88
86
|
```tsx
|
|
89
87
|
<Stack spacing={4}>
|
|
@@ -118,9 +116,9 @@ Vertical
|
|
|
118
116
|
</Stack>
|
|
119
117
|
```
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
## Divider Colors
|
|
122
120
|
|
|
123
|
-
|
|
121
|
+
You can apply various colors.
|
|
124
122
|
|
|
125
123
|
```tsx
|
|
126
124
|
<Stack spacing={3}>
|
|
@@ -140,9 +138,9 @@ Vertical
|
|
|
140
138
|
</Stack>
|
|
141
139
|
```
|
|
142
140
|
|
|
143
|
-
|
|
141
|
+
## Divider With Text
|
|
144
142
|
|
|
145
|
-
|
|
143
|
+
You can place text in the center of the divider.
|
|
146
144
|
|
|
147
145
|
```tsx
|
|
148
146
|
<Stack spacing={3}>
|
|
@@ -172,9 +170,9 @@ Vertical
|
|
|
172
170
|
</Stack>
|
|
173
171
|
```
|
|
174
172
|
|
|
175
|
-
|
|
173
|
+
## Divider In Cards
|
|
176
174
|
|
|
177
|
-
|
|
175
|
+
You can use it to separate sections inside cards or panels.
|
|
178
176
|
|
|
179
177
|
```tsx
|
|
180
178
|
<Stack direction="row" spacing={3}>
|
|
@@ -272,9 +270,9 @@ Vertical
|
|
|
272
270
|
</Stack>
|
|
273
271
|
```
|
|
274
272
|
|
|
275
|
-
|
|
273
|
+
## Divider List Separators
|
|
276
274
|
|
|
277
|
-
|
|
275
|
+
You can use it as a separator between list items.
|
|
278
276
|
|
|
279
277
|
```tsx
|
|
280
278
|
<Sheet variant="outlined" sx={{
|
|
@@ -316,9 +314,9 @@ Vertical
|
|
|
316
314
|
</Sheet>
|
|
317
315
|
```
|
|
318
316
|
|
|
319
|
-
|
|
317
|
+
## Divider Responsive Orientation
|
|
320
318
|
|
|
321
|
-
|
|
319
|
+
You can change the orientation based on screen size.
|
|
322
320
|
|
|
323
321
|
```tsx
|
|
324
322
|
<Stack spacing={3}>
|
|
@@ -369,9 +367,9 @@ Vertical
|
|
|
369
367
|
</Stack>
|
|
370
368
|
```
|
|
371
369
|
|
|
372
|
-
|
|
370
|
+
## Divider With Motion
|
|
373
371
|
|
|
374
|
-
|
|
372
|
+
You can apply Framer Motion animations.
|
|
375
373
|
|
|
376
374
|
```tsx
|
|
377
375
|
<Stack spacing={3}>
|
|
@@ -438,9 +436,9 @@ Framer Motion 애니메이션을 적용할 수 있습니다.
|
|
|
438
436
|
</Stack>
|
|
439
437
|
```
|
|
440
438
|
|
|
441
|
-
|
|
439
|
+
## Divider Custom Styling
|
|
442
440
|
|
|
443
|
-
|
|
441
|
+
You can customize the divider with CSS styles.
|
|
444
442
|
|
|
445
443
|
```tsx
|
|
446
444
|
<Stack spacing={4}>
|
|
@@ -519,41 +517,39 @@ borderRadius: '1px'
|
|
|
519
517
|
|
|
520
518
|
### orientation
|
|
521
519
|
|
|
522
|
-
|
|
520
|
+
Sets the divider orientation.
|
|
523
521
|
|
|
524
522
|
```tsx
|
|
525
|
-
<Divider orientation="horizontal" /> {/*
|
|
523
|
+
<Divider orientation="horizontal" /> {/* default */}
|
|
526
524
|
<Divider orientation="vertical" />
|
|
527
525
|
|
|
528
|
-
{/*
|
|
526
|
+
{/* responsive orientation */}
|
|
529
527
|
<Divider orientation={{ xs: 'horizontal', sm: 'vertical' }} />
|
|
530
528
|
```
|
|
531
529
|
|
|
532
530
|
### variant
|
|
533
531
|
|
|
534
|
-
|
|
532
|
+
Sets the divider style.
|
|
535
533
|
|
|
536
534
|
```tsx
|
|
537
|
-
<Divider variant="solid" /> {/*
|
|
538
|
-
<Divider variant="plain" /> {/*
|
|
539
|
-
<Divider variant="soft" /> {/*
|
|
535
|
+
<Divider variant="solid" /> {/* default - solid line */}
|
|
536
|
+
<Divider variant="plain" /> {/* plain style */}
|
|
537
|
+
<Divider variant="soft" /> {/* soft style */}
|
|
540
538
|
```
|
|
541
539
|
|
|
542
540
|
### color
|
|
543
541
|
|
|
544
|
-
|
|
542
|
+
Sets the divider color.
|
|
545
543
|
|
|
546
544
|
```tsx
|
|
547
|
-
<Divider color="neutral" /> {/*
|
|
545
|
+
<Divider color="neutral" /> {/* default */}
|
|
548
546
|
<Divider color="primary" />
|
|
549
547
|
<Divider color="danger" />
|
|
550
548
|
<Divider color="success" />
|
|
551
549
|
<Divider color="warning" />
|
|
552
550
|
```
|
|
553
551
|
|
|
554
|
-
##
|
|
555
|
-
|
|
556
|
-
### Navigation Sections
|
|
552
|
+
## Divider Navigation Sections
|
|
557
553
|
|
|
558
554
|
```tsx
|
|
559
555
|
<nav>
|
|
@@ -567,7 +563,7 @@ borderRadius: '1px'
|
|
|
567
563
|
</nav>
|
|
568
564
|
```
|
|
569
565
|
|
|
570
|
-
|
|
566
|
+
## Divider Form Sections
|
|
571
567
|
|
|
572
568
|
```tsx
|
|
573
569
|
<form>
|
|
@@ -592,7 +588,7 @@ borderRadius: '1px'
|
|
|
592
588
|
</form>
|
|
593
589
|
```
|
|
594
590
|
|
|
595
|
-
|
|
591
|
+
## Divider Card Content Separation
|
|
596
592
|
|
|
597
593
|
```tsx
|
|
598
594
|
<Card>
|
|
@@ -612,7 +608,7 @@ borderRadius: '1px'
|
|
|
612
608
|
</Card>
|
|
613
609
|
```
|
|
614
610
|
|
|
615
|
-
|
|
611
|
+
## Divider List Items
|
|
616
612
|
|
|
617
613
|
```tsx
|
|
618
614
|
<Stack>
|
|
@@ -628,7 +624,7 @@ borderRadius: '1px'
|
|
|
628
624
|
</Stack>
|
|
629
625
|
```
|
|
630
626
|
|
|
631
|
-
|
|
627
|
+
## Divider Dashboard Sections
|
|
632
628
|
|
|
633
629
|
```tsx
|
|
634
630
|
<Sheet variant="outlined" sx={{ p: 3 }}>
|
|
@@ -648,11 +644,11 @@ borderRadius: '1px'
|
|
|
648
644
|
<Divider sx={{ my: 2 }} />
|
|
649
645
|
|
|
650
646
|
<Typography level="title-md">최근 활동</Typography>
|
|
651
|
-
{/*
|
|
647
|
+
{/* activity list */}
|
|
652
648
|
</Sheet>
|
|
653
649
|
```
|
|
654
650
|
|
|
655
|
-
|
|
651
|
+
## Divider Modal Content
|
|
656
652
|
|
|
657
653
|
```tsx
|
|
658
654
|
<Modal open={open}>
|
|
@@ -688,27 +684,40 @@ borderRadius: '1px'
|
|
|
688
684
|
</Modal>
|
|
689
685
|
```
|
|
690
686
|
|
|
687
|
+
## Props and Customization
|
|
688
|
+
|
|
689
|
+
### Key Props
|
|
690
|
+
|
|
691
|
+
| Prop | Type | Default | Description |
|
|
692
|
+
| ------------- | ---------------------------- | -------------- | ------------------------------------------------------ |
|
|
693
|
+
| `children` | `ReactNode` | - | Optional content rendered in the center of the divider |
|
|
694
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Divider direction |
|
|
695
|
+
| `component` | `ElementType` | `'hr'` | Root element type |
|
|
696
|
+
| `sx` | `SxProps` | - | Custom styles |
|
|
697
|
+
|
|
698
|
+
> **Note**: Divider also accepts all Joy UI Divider props.
|
|
699
|
+
|
|
691
700
|
## Best Practices
|
|
692
701
|
|
|
693
|
-
1.
|
|
702
|
+
1. **Use appropriate spacing**: Leave enough space above and below the divider so content is clearly separated.
|
|
694
703
|
|
|
695
|
-
2.
|
|
704
|
+
2. **Separate content meaningfully**: Group logically related content together and use dividers to split sections.
|
|
696
705
|
|
|
697
|
-
3.
|
|
706
|
+
3. **Avoid overuse**: Too many dividers can make the interface feel cluttered.
|
|
698
707
|
|
|
699
|
-
4.
|
|
708
|
+
4. **Using vertical dividers**: When using a vertical divider, explicitly define the height of the parent container.
|
|
700
709
|
|
|
701
|
-
5.
|
|
710
|
+
5. **Consider responsive behavior**: On mobile, a vertical divider may need to switch to horizontal.
|
|
702
711
|
|
|
703
|
-
6.
|
|
712
|
+
6. **Keep colors consistent**: Use consistent divider colors and styles throughout the project.
|
|
704
713
|
|
|
705
|
-
7.
|
|
706
|
-
-
|
|
707
|
-
-
|
|
714
|
+
7. **Consider accessibility**:
|
|
715
|
+
- Dividers are purely visual separators, so screen readers typically ignore them
|
|
716
|
+
- If a semantic separation is needed, use appropriate HTML sectioning elements as well
|
|
708
717
|
|
|
709
718
|
## Responsive Behavior
|
|
710
719
|
|
|
711
|
-
Divider
|
|
720
|
+
Divider supports responsive values for all props:
|
|
712
721
|
|
|
713
722
|
```tsx
|
|
714
723
|
<Divider
|
|
@@ -724,7 +733,7 @@ Divider는 모든 props에서 반응형 값을 지원합니다:
|
|
|
724
733
|
|
|
725
734
|
## Motion Support
|
|
726
735
|
|
|
727
|
-
Divider
|
|
736
|
+
Divider supports Framer Motion:
|
|
728
737
|
|
|
729
738
|
```tsx
|
|
730
739
|
<Divider
|
|
@@ -745,18 +754,18 @@ Divider는 Framer Motion을 지원합니다:
|
|
|
745
754
|
|
|
746
755
|
## When to Use Divider
|
|
747
756
|
|
|
748
|
-
### ✅
|
|
757
|
+
### ✅ Good Use Cases
|
|
749
758
|
|
|
750
|
-
-
|
|
751
|
-
-
|
|
752
|
-
-
|
|
753
|
-
-
|
|
754
|
-
-
|
|
759
|
+
- **Separate list items**: When you need to clearly divide items in a long list
|
|
760
|
+
- **Separate form sections**: When grouping related fields into sections
|
|
761
|
+
- **Separate content inside cards**: When distinguishing different kinds of information within a card
|
|
762
|
+
- **Navigation menus**: When visually separating menu groups
|
|
763
|
+
- **Dashboard sections**: When dividing widgets or sections in a dashboard
|
|
755
764
|
|
|
756
|
-
### ❌
|
|
765
|
+
### ❌ Cases Where It May Not Be Appropriate
|
|
757
766
|
|
|
758
|
-
-
|
|
759
|
-
-
|
|
760
|
-
-
|
|
767
|
+
- **When simple spacing is enough**: Avoid using dividers excessively
|
|
768
|
+
- **When other separators already exist**: If content is already separated by color, background, borders, or similar cues, a divider may be unnecessary
|
|
769
|
+
- **For very short content**: A divider can feel excessive for content that is only one or two lines long
|
|
761
770
|
|
|
762
|
-
Divider
|
|
771
|
+
Divider is a useful tool for clarifying content structure and improving readability. When used appropriately, it helps create interfaces that make information easier to understand.
|
|
@@ -599,9 +599,7 @@ Sheets can be nested to create layered dashboard layouts with distinct visual se
|
|
|
599
599
|
</Sheet>
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
-
##
|
|
603
|
-
|
|
604
|
-
### Dashboard Stat Widget
|
|
602
|
+
## Dashboard Stat Widget
|
|
605
603
|
|
|
606
604
|
```tsx
|
|
607
605
|
import { Sheet, Typography, Stack } from '@ceed/ads';
|
|
@@ -628,7 +626,7 @@ function StatWidget({ label, value, change }) {
|
|
|
628
626
|
}
|
|
629
627
|
```
|
|
630
628
|
|
|
631
|
-
|
|
629
|
+
## Alert Banner
|
|
632
630
|
|
|
633
631
|
```tsx
|
|
634
632
|
import { Sheet, Typography, Stack, Button } from '@ceed/ads';
|
|
@@ -655,7 +653,7 @@ function AlertBanner({ message, onDismiss }) {
|
|
|
655
653
|
}
|
|
656
654
|
```
|
|
657
655
|
|
|
658
|
-
|
|
656
|
+
## Content Card with Hover Effect
|
|
659
657
|
|
|
660
658
|
```tsx
|
|
661
659
|
import { Sheet, Typography, Stack } from '@ceed/ads';
|
|
@@ -685,6 +683,21 @@ function ClickableCard({ title, description, onClick }) {
|
|
|
685
683
|
}
|
|
686
684
|
```
|
|
687
685
|
|
|
686
|
+
## Props and Customization
|
|
687
|
+
|
|
688
|
+
### Key Props
|
|
689
|
+
|
|
690
|
+
| Prop | Type | Default | Description |
|
|
691
|
+
| ---------------- | -------------------------------------------------------------- | ----------- | ----------------------------- |
|
|
692
|
+
| `children` | `ReactNode` | - | Sheet content |
|
|
693
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Visual style |
|
|
694
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
695
|
+
| `invertedColors` | `boolean` | `false` | Invert child component colors |
|
|
696
|
+
| `component` | `ElementType` | `'div'` | Root element type |
|
|
697
|
+
| `sx` | `SxProps` | - | Custom styles |
|
|
698
|
+
|
|
699
|
+
> **Note**: Sheet also accepts all Joy UI Sheet props.
|
|
700
|
+
|
|
688
701
|
## Best Practices
|
|
689
702
|
|
|
690
703
|
- **Choose the right variant for the context.**
|