@ceed/cds 1.22.2 → 1.22.4
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/data-display/InfoSign.md +74 -91
- package/dist/components/data-display/Typography.md +363 -63
- package/dist/components/feedback/CircularProgress.md +257 -0
- package/dist/components/feedback/Dialog.md +8 -4
- package/dist/components/feedback/Modal.md +7 -3
- package/dist/components/feedback/Skeleton.md +280 -0
- package/dist/components/feedback/llms.txt +2 -0
- package/dist/components/inputs/ButtonGroup.md +115 -104
- package/dist/components/inputs/CurrencyInput.md +181 -8
- package/dist/components/inputs/DatePicker.md +108 -436
- package/dist/components/inputs/DateRangePicker.md +130 -496
- package/dist/components/inputs/FilterableCheckboxGroup.md +141 -20
- package/dist/components/inputs/FormControl.md +368 -0
- package/dist/components/inputs/IconButton.md +137 -88
- package/dist/components/inputs/Input.md +203 -77
- package/dist/components/inputs/MonthPicker.md +95 -427
- package/dist/components/inputs/MonthRangePicker.md +89 -471
- package/dist/components/inputs/PercentageInput.md +183 -19
- package/dist/components/inputs/RadioButton.md +163 -35
- package/dist/components/inputs/RadioList.md +241 -0
- package/dist/components/inputs/RadioTileGroup.md +146 -62
- package/dist/components/inputs/Select.md +219 -328
- package/dist/components/inputs/Slider.md +334 -0
- package/dist/components/inputs/Switch.md +143 -376
- package/dist/components/inputs/Textarea.md +209 -11
- package/dist/components/inputs/Uploader/Uploader.md +145 -66
- package/dist/components/inputs/llms.txt +3 -0
- package/dist/components/navigation/Breadcrumbs.md +57 -308
- package/dist/components/navigation/Drawer.md +180 -0
- package/dist/components/navigation/Dropdown.md +98 -215
- package/dist/components/navigation/IconMenuButton.md +40 -502
- package/dist/components/navigation/InsetDrawer.md +281 -650
- package/dist/components/navigation/Link.md +31 -348
- package/dist/components/navigation/Menu.md +92 -285
- package/dist/components/navigation/MenuButton.md +55 -448
- package/dist/components/navigation/Pagination.md +47 -338
- package/dist/components/navigation/Stepper.md +160 -28
- package/dist/components/navigation/Tabs.md +57 -316
- package/dist/components/surfaces/Accordions.md +49 -804
- package/dist/components/surfaces/Card.md +97 -157
- package/dist/components/surfaces/Divider.md +83 -234
- package/dist/components/surfaces/Sheet.md +152 -327
- package/dist/guides/ThemeProvider.md +89 -0
- package/dist/guides/llms.txt +9 -0
- package/dist/llms.txt +8 -0
- package/package.json +1 -1
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Divider
|
|
5
|
+
Divider is a visual separator component that draws a thin line between content sections. It helps organize layouts by creating clear visual boundaries between groups of related content. Built on Joy UI's Divider component, it supports horizontal and vertical orientations, multiple color options, and Framer Motion animation props for animated transitions.
|
|
6
|
+
|
|
7
|
+
Dividers are commonly used to separate list items, form sections, card content areas, navigation groups, and dashboard panels. They can optionally contain centered text to label the sections they divide.
|
|
6
8
|
|
|
7
9
|
```tsx
|
|
8
10
|
<Box sx={{
|
|
@@ -32,19 +34,17 @@ import { Divider } from '@ceed/cds';
|
|
|
32
34
|
function MyComponent() {
|
|
33
35
|
return (
|
|
34
36
|
<div>
|
|
35
|
-
<p
|
|
37
|
+
<p>First section</p>
|
|
36
38
|
<Divider />
|
|
37
|
-
<p
|
|
39
|
+
<p>Second section</p>
|
|
38
40
|
</div>
|
|
39
41
|
);
|
|
40
42
|
}
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
### Basic Usage
|
|
45
|
+
## Basic
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
The simplest usage of Divider in both horizontal and vertical orientations.
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
50
|
<Stack spacing={3}>
|
|
@@ -81,9 +81,9 @@ function MyComponent() {
|
|
|
81
81
|
</Stack>
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
## Orientations
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Divider supports `horizontal` (default) and `vertical` orientations. Vertical dividers are useful for separating inline or row-based content.
|
|
87
87
|
|
|
88
88
|
```tsx
|
|
89
89
|
<Stack spacing={4}>
|
|
@@ -118,9 +118,9 @@ Vertical
|
|
|
118
118
|
</Stack>
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
## Colors
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
Apply semantic colors to dividers for emphasis or to match the surrounding context.
|
|
124
124
|
|
|
125
125
|
```tsx
|
|
126
126
|
<Stack spacing={3}>
|
|
@@ -140,9 +140,9 @@ Vertical
|
|
|
140
140
|
</Stack>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
## With Text
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Place text or other elements inside a Divider to create labeled section breaks (e.g., "OR" between login options).
|
|
146
146
|
|
|
147
147
|
```tsx
|
|
148
148
|
<Stack spacing={3}>
|
|
@@ -172,9 +172,9 @@ Vertical
|
|
|
172
172
|
</Stack>
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
## In Cards
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
Use Dividers within cards and panels to separate distinct content sections.
|
|
178
178
|
|
|
179
179
|
```tsx
|
|
180
180
|
<Stack direction="row" spacing={3}>
|
|
@@ -272,9 +272,9 @@ Vertical
|
|
|
272
272
|
</Stack>
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
|
|
275
|
+
## List Separators
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
Dividers work naturally as separators between list items.
|
|
278
278
|
|
|
279
279
|
```tsx
|
|
280
280
|
<Sheet variant="outlined" sx={{
|
|
@@ -316,9 +316,9 @@ Vertical
|
|
|
316
316
|
</Sheet>
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
## Responsive Orientation
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
Divider orientation can change based on screen size using responsive values, switching from horizontal on mobile to vertical on larger screens.
|
|
322
322
|
|
|
323
323
|
```tsx
|
|
324
324
|
<Stack spacing={3}>
|
|
@@ -369,9 +369,9 @@ Vertical
|
|
|
369
369
|
</Stack>
|
|
370
370
|
```
|
|
371
371
|
|
|
372
|
-
|
|
372
|
+
## With Motion
|
|
373
373
|
|
|
374
|
-
Framer Motion
|
|
374
|
+
Framer Motion animation props can be applied directly to Divider for animated reveal effects.
|
|
375
375
|
|
|
376
376
|
```tsx
|
|
377
377
|
<Stack spacing={3}>
|
|
@@ -438,9 +438,9 @@ Framer Motion 애니메이션을 적용할 수 있습니다.
|
|
|
438
438
|
</Stack>
|
|
439
439
|
```
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
## Custom Styling
|
|
442
442
|
|
|
443
|
-
|
|
443
|
+
Advanced styling techniques including rounded corners, gradients (using Box), and shadow effects.
|
|
444
444
|
|
|
445
445
|
```tsx
|
|
446
446
|
<Stack spacing={4}>
|
|
@@ -515,248 +515,97 @@ borderRadius: '1px'
|
|
|
515
515
|
</Stack>
|
|
516
516
|
```
|
|
517
517
|
|
|
518
|
-
## Key Props
|
|
519
|
-
|
|
520
|
-
### orientation
|
|
521
|
-
|
|
522
|
-
구분선의 방향을 설정합니다.
|
|
523
|
-
|
|
524
|
-
```tsx
|
|
525
|
-
<Divider orientation="horizontal" /> {/* 기본값 */}
|
|
526
|
-
<Divider orientation="vertical" />
|
|
527
|
-
|
|
528
|
-
{/* 반응형 방향 */}
|
|
529
|
-
<Divider orientation={{ xs: 'horizontal', sm: 'vertical' }} />
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
### variant
|
|
533
|
-
|
|
534
|
-
구분선의 스타일을 설정합니다.
|
|
535
|
-
|
|
536
|
-
```tsx
|
|
537
|
-
<Divider variant="solid" /> {/* 기본값 - 실선 */}
|
|
538
|
-
<Divider variant="plain" /> {/* 평면 스타일 */}
|
|
539
|
-
<Divider variant="soft" /> {/* 부드러운 스타일 */}
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
### color
|
|
543
|
-
|
|
544
|
-
구분선의 색상을 설정합니다.
|
|
545
|
-
|
|
546
|
-
```tsx
|
|
547
|
-
<Divider color="neutral" /> {/* 기본값 */}
|
|
548
|
-
<Divider color="primary" />
|
|
549
|
-
<Divider color="danger" />
|
|
550
|
-
<Divider color="success" />
|
|
551
|
-
<Divider color="warning" />
|
|
552
|
-
```
|
|
553
|
-
|
|
554
518
|
## Common Use Cases
|
|
555
519
|
|
|
556
|
-
###
|
|
557
|
-
|
|
558
|
-
```tsx
|
|
559
|
-
<nav>
|
|
560
|
-
<Link href="/home">Home</Link>
|
|
561
|
-
<Link href="/about">About</Link>
|
|
562
|
-
|
|
563
|
-
<Divider sx={{ my: 1 }} />
|
|
564
|
-
|
|
565
|
-
<Link href="/login">Login</Link>
|
|
566
|
-
<Link href="/signup">Sign Up</Link>
|
|
567
|
-
</nav>
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
### Form Sections
|
|
520
|
+
### Form Section Break
|
|
571
521
|
|
|
572
522
|
```tsx
|
|
573
|
-
|
|
574
|
-
<Stack spacing={2}>
|
|
575
|
-
<Typography level="title-md">개인 정보</Typography>
|
|
576
|
-
<FormControl>
|
|
577
|
-
<FormLabel>이름</FormLabel>
|
|
578
|
-
<Input />
|
|
579
|
-
</FormControl>
|
|
580
|
-
<FormControl>
|
|
581
|
-
<FormLabel>이메일</FormLabel>
|
|
582
|
-
<Input type="email" />
|
|
583
|
-
</FormControl>
|
|
584
|
-
|
|
585
|
-
<Divider sx={{ my: 3 }}>추가 정보</Divider>
|
|
586
|
-
|
|
587
|
-
<FormControl>
|
|
588
|
-
<FormLabel>회사명</FormLabel>
|
|
589
|
-
<Input />
|
|
590
|
-
</FormControl>
|
|
591
|
-
</Stack>
|
|
592
|
-
</form>
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
### Card Content Separation
|
|
596
|
-
|
|
597
|
-
```tsx
|
|
598
|
-
<Card>
|
|
599
|
-
<CardContent>
|
|
600
|
-
<Typography level="title-lg">제품명</Typography>
|
|
601
|
-
<Typography level="body-md">제품 설명...</Typography>
|
|
602
|
-
|
|
603
|
-
<Divider sx={{ my: 2 }} />
|
|
604
|
-
|
|
605
|
-
<Stack direction="row" justifyContent="space-between">
|
|
606
|
-
<Typography level="title-lg" color="primary">
|
|
607
|
-
₩99,000
|
|
608
|
-
</Typography>
|
|
609
|
-
<Button>장바구니</Button>
|
|
610
|
-
</Stack>
|
|
611
|
-
</CardContent>
|
|
612
|
-
</Card>
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
### List Items
|
|
616
|
-
|
|
617
|
-
```tsx
|
|
618
|
-
<Stack>
|
|
619
|
-
{items.map((item, index) => (
|
|
620
|
-
<React.Fragment key={item.id}>
|
|
621
|
-
<Box sx={{ p: 2 }}>
|
|
622
|
-
<Typography level="title-sm">{item.title}</Typography>
|
|
623
|
-
<Typography level="body-sm">{item.description}</Typography>
|
|
624
|
-
</Box>
|
|
625
|
-
{index < items.length - 1 && <Divider />}
|
|
626
|
-
</React.Fragment>
|
|
627
|
-
))}
|
|
628
|
-
</Stack>
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
### Dashboard Sections
|
|
632
|
-
|
|
633
|
-
```tsx
|
|
634
|
-
<Sheet variant="outlined" sx={{ p: 3 }}>
|
|
635
|
-
<Typography level="title-lg">대시보드</Typography>
|
|
636
|
-
|
|
637
|
-
<Divider sx={{ my: 2 }} />
|
|
638
|
-
|
|
639
|
-
<Grid container spacing={2}>
|
|
640
|
-
<Grid item xs={12} sm={6}>
|
|
641
|
-
<StatCard title="사용자" value="1,234" />
|
|
642
|
-
</Grid>
|
|
643
|
-
<Grid item xs={12} sm={6}>
|
|
644
|
-
<StatCard title="매출" value="₩5.6M" />
|
|
645
|
-
</Grid>
|
|
646
|
-
</Grid>
|
|
647
|
-
|
|
648
|
-
<Divider sx={{ my: 2 }} />
|
|
649
|
-
|
|
650
|
-
<Typography level="title-md">최근 활동</Typography>
|
|
651
|
-
{/* 활동 목록 */}
|
|
652
|
-
</Sheet>
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
### Modal Content
|
|
656
|
-
|
|
657
|
-
```tsx
|
|
658
|
-
<Modal open={open}>
|
|
659
|
-
<Sheet variant="outlined" sx={{ p: 4, borderRadius: 'md' }}>
|
|
660
|
-
<Typography level="title-lg">설정</Typography>
|
|
661
|
-
|
|
662
|
-
<Divider sx={{ my: 2 }} />
|
|
523
|
+
import { Divider, Stack, FormControl, FormLabel, Input, Typography } from '@ceed/cds';
|
|
663
524
|
|
|
525
|
+
function SectionedForm() {
|
|
526
|
+
return (
|
|
664
527
|
<Stack spacing={2}>
|
|
528
|
+
<Typography level="title-md">Personal Info</Typography>
|
|
665
529
|
<FormControl>
|
|
666
|
-
<FormLabel
|
|
667
|
-
<
|
|
530
|
+
<FormLabel>Name</FormLabel>
|
|
531
|
+
<Input />
|
|
668
532
|
</FormControl>
|
|
669
|
-
|
|
670
533
|
<FormControl>
|
|
671
|
-
<FormLabel
|
|
672
|
-
<
|
|
673
|
-
<Option value="light">Light</Option>
|
|
674
|
-
<Option value="dark">Dark</Option>
|
|
675
|
-
</Select>
|
|
534
|
+
<FormLabel>Email</FormLabel>
|
|
535
|
+
<Input type="email" />
|
|
676
536
|
</FormControl>
|
|
677
|
-
</Stack>
|
|
678
537
|
|
|
679
|
-
|
|
538
|
+
<Divider sx={{ my: 3 }}>Additional Info</Divider>
|
|
680
539
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
</
|
|
685
|
-
<Button onClick={handleSave}>저장</Button>
|
|
540
|
+
<FormControl>
|
|
541
|
+
<FormLabel>Company</FormLabel>
|
|
542
|
+
<Input />
|
|
543
|
+
</FormControl>
|
|
686
544
|
</Stack>
|
|
687
|
-
|
|
688
|
-
|
|
545
|
+
);
|
|
546
|
+
}
|
|
689
547
|
```
|
|
690
548
|
|
|
691
|
-
|
|
549
|
+
### Login Separator
|
|
692
550
|
|
|
693
|
-
|
|
551
|
+
```tsx
|
|
552
|
+
import { Divider, Stack, Button, Typography } from '@ceed/cds';
|
|
553
|
+
|
|
554
|
+
function LoginOptions() {
|
|
555
|
+
return (
|
|
556
|
+
<Stack spacing={2} sx={{ maxWidth: 400 }}>
|
|
557
|
+
<Button fullWidth>Sign in with Email</Button>
|
|
694
558
|
|
|
695
|
-
|
|
559
|
+
<Divider>or</Divider>
|
|
696
560
|
|
|
697
|
-
|
|
561
|
+
<Button fullWidth variant="outlined">Sign in with Google</Button>
|
|
562
|
+
<Button fullWidth variant="outlined">Sign in with GitHub</Button>
|
|
563
|
+
</Stack>
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
```
|
|
698
567
|
|
|
699
|
-
|
|
568
|
+
### Dashboard Section Separator
|
|
700
569
|
|
|
701
|
-
|
|
570
|
+
```tsx
|
|
571
|
+
import { Divider, Sheet, Typography, Stack } from '@ceed/cds';
|
|
702
572
|
|
|
703
|
-
|
|
573
|
+
function Dashboard() {
|
|
574
|
+
return (
|
|
575
|
+
<Sheet variant="outlined" sx={{ p: 3 }}>
|
|
576
|
+
<Typography level="title-lg">Dashboard</Typography>
|
|
704
577
|
|
|
705
|
-
|
|
706
|
-
- 구분선은 단순히 시각적 구분을 위한 것이므로 스크린 리더에서는 무시됩니다
|
|
707
|
-
- 의미적 구분이 필요한 경우 적절한 HTML 섹션 태그를 함께 사용하세요
|
|
578
|
+
<Divider sx={{ my: 2 }} />
|
|
708
579
|
|
|
709
|
-
|
|
580
|
+
<Typography level="title-md">Recent Activity</Typography>
|
|
581
|
+
{/* Activity list */}
|
|
710
582
|
|
|
711
|
-
Divider
|
|
583
|
+
<Divider sx={{ my: 2 }} />
|
|
712
584
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
height: { xs: 'auto', md: 50 },
|
|
719
|
-
my: { xs: 2, md: 0 },
|
|
720
|
-
mx: { xs: 0, md: 2 },
|
|
721
|
-
}}
|
|
722
|
-
/>
|
|
585
|
+
<Typography level="title-md">Statistics</Typography>
|
|
586
|
+
{/* Stats content */}
|
|
587
|
+
</Sheet>
|
|
588
|
+
);
|
|
589
|
+
}
|
|
723
590
|
```
|
|
724
591
|
|
|
725
|
-
##
|
|
726
|
-
|
|
727
|
-
Divider는 Framer Motion을 지원합니다:
|
|
592
|
+
## Best Practices
|
|
728
593
|
|
|
729
|
-
|
|
730
|
-
<Divider
|
|
731
|
-
initial={{ scaleX: 0 }}
|
|
732
|
-
animate={{ scaleX: 1 }}
|
|
733
|
-
transition={{ duration: 0.5 }}
|
|
734
|
-
sx={{ transformOrigin: 'left' }}
|
|
735
|
-
/>
|
|
736
|
-
|
|
737
|
-
<Divider
|
|
738
|
-
orientation="vertical"
|
|
739
|
-
initial={{ scaleY: 0 }}
|
|
740
|
-
animate={{ scaleY: 1 }}
|
|
741
|
-
whileHover={{ scaleY: 1.1 }}
|
|
742
|
-
transition={{ duration: 0.3 }}
|
|
743
|
-
/>
|
|
744
|
-
```
|
|
594
|
+
- **Use adequate margin around dividers.** Apply `my` (vertical margin) for horizontal dividers and `mx` (horizontal margin) for vertical dividers to give surrounding content breathing room.
|
|
745
595
|
|
|
746
|
-
|
|
596
|
+
- **Do not overuse dividers.** If content sections are already visually distinct through background colors, spacing, or card boundaries, adding a divider is redundant.
|
|
597
|
+
- ✔ Use a Divider between items in a flat list
|
|
598
|
+
- ✘ Add a Divider between cards that already have borders
|
|
747
599
|
|
|
748
|
-
|
|
600
|
+
- **Set explicit height for vertical dividers.** Vertical dividers require a parent with a defined height, or an explicit `height` value via `sx`, to render correctly.
|
|
749
601
|
|
|
750
|
-
-
|
|
751
|
-
- **폼 섹션 구분**: 관련 필드들을 그룹으로 나눌 때
|
|
752
|
-
- **카드 내 콘텐츠 구분**: 카드 내에서 다른 성격의 정보를 구분할 때
|
|
753
|
-
- **네비게이션 메뉴**: 메뉴 그룹을 시각적으로 구분할 때
|
|
754
|
-
- **대시보드 섹션**: 대시보드의 위젯이나 섹션을 구분할 때
|
|
602
|
+
- **Use responsive orientation for adaptive layouts.** When a row layout collapses to a column on mobile, switch the divider orientation accordingly using responsive values.
|
|
755
603
|
|
|
756
|
-
|
|
604
|
+
- **Reserve text-bearing dividers for clear context switches.** Only use dividers with text (e.g., "OR", "Section 2") when the label genuinely helps users understand the content transition.
|
|
757
605
|
|
|
758
|
-
|
|
759
|
-
- **이미 다른 구분 요소가 있는 경우**: 색상, 배경, 테두리 등으로 이미 구분되어 있다면 불필요
|
|
760
|
-
- **너무 짧은 콘텐츠**: 한두 줄 정도의 짧은 콘텐츠에는 구분선이 과할 수 있습니다
|
|
606
|
+
## Accessibility
|
|
761
607
|
|
|
762
|
-
Divider
|
|
608
|
+
- Divider renders with `role="separator"` by default, which screen readers recognize as a visual boundary. No additional ARIA attributes are needed for purely decorative dividers.
|
|
609
|
+
- When a Divider contains text (e.g., `<Divider>or</Divider>`), the text is readable by screen readers and provides semantic context for the content transition.
|
|
610
|
+
- Dividers are non-interactive and non-focusable, so they do not interfere with keyboard navigation.
|
|
611
|
+
- If you need a semantic section break rather than a visual one, use appropriate HTML elements (`<section>`, `<hr>`) alongside or instead of Divider.
|