@ceed/cds 1.29.0 → 1.30.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.
Files changed (62) hide show
  1. package/dist/Overview.md +5 -5
  2. package/dist/components/Calendar/utils/index.d.ts +1 -0
  3. package/dist/components/DatePicker/DatePicker.d.ts +4 -0
  4. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  5. package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +8 -0
  6. package/dist/components/data-display/Avatar.md +110 -69
  7. package/dist/components/data-display/Badge.md +91 -39
  8. package/dist/components/data-display/Chip.md +49 -20
  9. package/dist/components/data-display/DataTable.md +93 -0
  10. package/dist/components/data-display/InfoSign.md +12 -0
  11. package/dist/components/data-display/Table.md +72 -55
  12. package/dist/components/data-display/Tooltip.md +40 -40
  13. package/dist/components/data-display/Typography.md +53 -70
  14. package/dist/components/feedback/Alert.md +88 -72
  15. package/dist/components/feedback/CircularProgress.md +17 -0
  16. package/dist/components/feedback/Skeleton.md +17 -0
  17. package/dist/components/inputs/Button.md +94 -68
  18. package/dist/components/inputs/ButtonGroup.md +17 -0
  19. package/dist/components/inputs/Calendar.md +118 -457
  20. package/dist/components/inputs/Checkbox.md +185 -430
  21. package/dist/components/inputs/CurrencyInput.md +22 -0
  22. package/dist/components/inputs/DatePicker.md +59 -5
  23. package/dist/components/inputs/DateRangePicker.md +46 -5
  24. package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
  25. package/dist/components/inputs/FormControl.md +32 -2
  26. package/dist/components/inputs/IconButton.md +18 -0
  27. package/dist/components/inputs/Input.md +198 -136
  28. package/dist/components/inputs/MonthPicker.md +59 -5
  29. package/dist/components/inputs/MonthRangePicker.md +44 -5
  30. package/dist/components/inputs/PercentageInput.md +25 -0
  31. package/dist/components/inputs/RadioButton.md +23 -0
  32. package/dist/components/inputs/RadioList.md +20 -1
  33. package/dist/components/inputs/RadioTileGroup.md +37 -3
  34. package/dist/components/inputs/Select.md +56 -0
  35. package/dist/components/inputs/Slider.md +23 -0
  36. package/dist/components/inputs/Switch.md +20 -0
  37. package/dist/components/inputs/Textarea.md +32 -8
  38. package/dist/components/inputs/Uploader/Uploader.md +21 -0
  39. package/dist/components/layout/Box.md +52 -41
  40. package/dist/components/layout/Grid.md +87 -81
  41. package/dist/components/layout/Stack.md +88 -68
  42. package/dist/components/navigation/Breadcrumbs.md +57 -46
  43. package/dist/components/navigation/Drawer.md +17 -0
  44. package/dist/components/navigation/Dropdown.md +13 -0
  45. package/dist/components/navigation/IconMenuButton.md +17 -0
  46. package/dist/components/navigation/InsetDrawer.md +130 -292
  47. package/dist/components/navigation/Link.md +78 -0
  48. package/dist/components/navigation/Menu.md +17 -0
  49. package/dist/components/navigation/MenuButton.md +18 -0
  50. package/dist/components/navigation/Pagination.md +13 -0
  51. package/dist/components/navigation/Stepper.md +15 -0
  52. package/dist/components/navigation/Tabs.md +27 -0
  53. package/dist/components/surfaces/Accordions.md +804 -49
  54. package/dist/components/surfaces/Card.md +173 -97
  55. package/dist/components/surfaces/Divider.md +246 -82
  56. package/dist/components/surfaces/Sheet.md +15 -0
  57. package/dist/index.browser.js +4 -4
  58. package/dist/index.browser.js.map +3 -3
  59. package/dist/index.cjs +99 -39
  60. package/dist/index.js +99 -39
  61. package/framer/index.js +1 -1
  62. package/package.json +1 -1
@@ -2,9 +2,7 @@
2
2
 
3
3
  ## Introduction
4
4
 
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.
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.
8
6
 
9
7
  ```tsx
10
8
  <Box sx={{
@@ -34,17 +32,19 @@ import { Divider } from '@ceed/cds';
34
32
  function MyComponent() {
35
33
  return (
36
34
  <div>
37
- <p>First section</p>
35
+ <p>첫 번째 콘텐츠</p>
38
36
  <Divider />
39
- <p>Second section</p>
37
+ <p>두 번째 콘텐츠</p>
40
38
  </div>
41
39
  );
42
40
  }
43
41
  ```
44
42
 
45
- ## Basic
43
+ ## Examples
44
+
45
+ ### Basic Usage
46
46
 
47
- The simplest usage of Divider in both horizontal and vertical orientations.
47
+ The most basic way to use Divider.
48
48
 
49
49
  ```tsx
50
50
  <Stack spacing={3}>
@@ -81,9 +81,9 @@ The simplest usage of Divider in both horizontal and vertical orientations.
81
81
  </Stack>
82
82
  ```
83
83
 
84
- ## Orientations
84
+ ### Orientations
85
85
 
86
- Divider supports `horizontal` (default) and `vertical` orientations. Vertical dividers are useful for separating inline or row-based content.
86
+ You can set the direction of the divider.
87
87
 
88
88
  ```tsx
89
89
  <Stack spacing={4}>
@@ -118,9 +118,9 @@ Vertical
118
118
  </Stack>
119
119
  ```
120
120
 
121
- ## Colors
121
+ ### Colors
122
122
 
123
- Apply semantic colors to dividers for emphasis or to match the surrounding context.
123
+ You can apply various colors.
124
124
 
125
125
  ```tsx
126
126
  <Stack spacing={3}>
@@ -140,9 +140,9 @@ Apply semantic colors to dividers for emphasis or to match the surrounding conte
140
140
  </Stack>
141
141
  ```
142
142
 
143
- ## With Text
143
+ ### With Text
144
144
 
145
- Place text or other elements inside a Divider to create labeled section breaks (e.g., "OR" between login options).
145
+ You can place text in the center of the divider.
146
146
 
147
147
  ```tsx
148
148
  <Stack spacing={3}>
@@ -172,9 +172,9 @@ Place text or other elements inside a Divider to create labeled section breaks (
172
172
  </Stack>
173
173
  ```
174
174
 
175
- ## In Cards
175
+ ### In Cards
176
176
 
177
- Use Dividers within cards and panels to separate distinct content sections.
177
+ You can use it to separate sections inside cards or panels.
178
178
 
179
179
  ```tsx
180
180
  <Stack direction="row" spacing={3}>
@@ -272,9 +272,9 @@ Use Dividers within cards and panels to separate distinct content sections.
272
272
  </Stack>
273
273
  ```
274
274
 
275
- ## List Separators
275
+ ### List Separators
276
276
 
277
- Dividers work naturally as separators between list items.
277
+ You can use it as a separator between list items.
278
278
 
279
279
  ```tsx
280
280
  <Sheet variant="outlined" sx={{
@@ -316,9 +316,9 @@ Dividers work naturally as separators between list items.
316
316
  </Sheet>
317
317
  ```
318
318
 
319
- ## Responsive Orientation
319
+ ### Responsive Orientation
320
320
 
321
- Divider orientation can change based on screen size using responsive values, switching from horizontal on mobile to vertical on larger screens.
321
+ You can change the orientation based on screen size.
322
322
 
323
323
  ```tsx
324
324
  <Stack spacing={3}>
@@ -369,9 +369,9 @@ Divider orientation can change based on screen size using responsive values, swi
369
369
  </Stack>
370
370
  ```
371
371
 
372
- ## With Motion
372
+ ### With Motion
373
373
 
374
- Framer Motion animation props can be applied directly to Divider for animated reveal effects.
374
+ You can apply Framer Motion animations.
375
375
 
376
376
  ```tsx
377
377
  <Stack spacing={3}>
@@ -438,9 +438,9 @@ Framer Motion animation props can be applied directly to Divider for animated re
438
438
  </Stack>
439
439
  ```
440
440
 
441
- ## Custom Styling
441
+ ### Custom Styling
442
442
 
443
- Advanced styling techniques including rounded corners, gradients (using Box), and shadow effects.
443
+ You can customize the divider with CSS styles.
444
444
 
445
445
  ```tsx
446
446
  <Stack spacing={4}>
@@ -515,97 +515,261 @@ borderRadius: '1px'
515
515
  </Stack>
516
516
  ```
517
517
 
518
+ ## Key Props
519
+
520
+ ### orientation
521
+
522
+ Sets the divider orientation.
523
+
524
+ ```tsx
525
+ <Divider orientation="horizontal" /> {/* default */}
526
+ <Divider orientation="vertical" />
527
+
528
+ {/* responsive orientation */}
529
+ <Divider orientation={{ xs: 'horizontal', sm: 'vertical' }} />
530
+ ```
531
+
532
+ ### variant
533
+
534
+ Sets the divider style.
535
+
536
+ ```tsx
537
+ <Divider variant="solid" /> {/* default - solid line */}
538
+ <Divider variant="plain" /> {/* plain style */}
539
+ <Divider variant="soft" /> {/* soft style */}
540
+ ```
541
+
542
+ ### color
543
+
544
+ Sets the divider color.
545
+
546
+ ```tsx
547
+ <Divider color="neutral" /> {/* default */}
548
+ <Divider color="primary" />
549
+ <Divider color="danger" />
550
+ <Divider color="success" />
551
+ <Divider color="warning" />
552
+ ```
553
+
518
554
  ## Common Use Cases
519
555
 
520
- ### Form Section Break
556
+ ### Navigation Sections
521
557
 
522
558
  ```tsx
523
- import { Divider, Stack, FormControl, FormLabel, Input, Typography } from '@ceed/cds';
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
571
+
572
+ ```tsx
573
+ <form>
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
+ {/* activity list */}
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 }} />
524
663
 
525
- function SectionedForm() {
526
- return (
527
664
  <Stack spacing={2}>
528
- <Typography level="title-md">Personal Info</Typography>
529
665
  <FormControl>
530
- <FormLabel>Name</FormLabel>
531
- <Input />
666
+ <FormLabel>알림 설정</FormLabel>
667
+ <Switch />
532
668
  </FormControl>
669
+
533
670
  <FormControl>
534
- <FormLabel>Email</FormLabel>
535
- <Input type="email" />
671
+ <FormLabel>테마 설정</FormLabel>
672
+ <Select defaultValue="light">
673
+ <Option value="light">Light</Option>
674
+ <Option value="dark">Dark</Option>
675
+ </Select>
536
676
  </FormControl>
677
+ </Stack>
537
678
 
538
- <Divider sx={{ my: 3 }}>Additional Info</Divider>
679
+ <Divider sx={{ my: 3 }} />
539
680
 
540
- <FormControl>
541
- <FormLabel>Company</FormLabel>
542
- <Input />
543
- </FormControl>
681
+ <Stack direction="row" spacing={2} justifyContent="flex-end">
682
+ <Button variant="outlined" onClick={handleClose}>
683
+ 취소
684
+ </Button>
685
+ <Button onClick={handleSave}>저장</Button>
544
686
  </Stack>
545
- );
546
- }
687
+ </Sheet>
688
+ </Modal>
547
689
  ```
548
690
 
549
- ### Login Separator
691
+ ## Props and Customization
550
692
 
551
- ```tsx
552
- import { Divider, Stack, Button, Typography } from '@ceed/cds';
693
+ ### Key Props
553
694
 
554
- function LoginOptions() {
555
- return (
556
- <Stack spacing={2} sx={{ maxWidth: 400 }}>
557
- <Button fullWidth>Sign in with Email</Button>
695
+ | Prop | Type | Default | Description |
696
+ | ------------- | ---------------------------- | -------------- | ------------------------------------------------------ |
697
+ | `children` | `ReactNode` | - | Optional content rendered in the center of the divider |
698
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Divider direction |
699
+ | `component` | `ElementType` | `'hr'` | Root element type |
700
+ | `sx` | `SxProps` | - | Custom styles |
558
701
 
559
- <Divider>or</Divider>
702
+ > **Note**: Divider also accepts all Joy UI Divider props.
560
703
 
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
- ```
704
+ ## Best Practices
567
705
 
568
- ### Dashboard Section Separator
706
+ 1. **Use appropriate spacing**: Leave enough space above and below the divider so content is clearly separated.
569
707
 
570
- ```tsx
571
- import { Divider, Sheet, Typography, Stack } from '@ceed/cds';
708
+ 2. **Separate content meaningfully**: Group logically related content together and use dividers to split sections.
572
709
 
573
- function Dashboard() {
574
- return (
575
- <Sheet variant="outlined" sx={{ p: 3 }}>
576
- <Typography level="title-lg">Dashboard</Typography>
710
+ 3. **Avoid overuse**: Too many dividers can make the interface feel cluttered.
577
711
 
578
- <Divider sx={{ my: 2 }} />
712
+ 4. **Using vertical dividers**: When using a vertical divider, explicitly define the height of the parent container.
579
713
 
580
- <Typography level="title-md">Recent Activity</Typography>
581
- {/* Activity list */}
714
+ 5. **Consider responsive behavior**: On mobile, a vertical divider may need to switch to horizontal.
582
715
 
583
- <Divider sx={{ my: 2 }} />
716
+ 6. **Keep colors consistent**: Use consistent divider colors and styles throughout the project.
584
717
 
585
- <Typography level="title-md">Statistics</Typography>
586
- {/* Stats content */}
587
- </Sheet>
588
- );
589
- }
718
+ 7. **Consider accessibility**:
719
+ - Dividers are purely visual separators, so screen readers typically ignore them
720
+ - If a semantic separation is needed, use appropriate HTML sectioning elements as well
721
+
722
+ ## Responsive Behavior
723
+
724
+ Divider supports responsive values for all props:
725
+
726
+ ```tsx
727
+ <Divider
728
+ orientation={{ xs: 'horizontal', md: 'vertical' }}
729
+ sx={{
730
+ width: { xs: '100%', md: 'auto' },
731
+ height: { xs: 'auto', md: 50 },
732
+ my: { xs: 2, md: 0 },
733
+ mx: { xs: 0, md: 2 },
734
+ }}
735
+ />
590
736
  ```
591
737
 
592
- ## Best Practices
738
+ ## Motion Support
739
+
740
+ Divider supports Framer Motion:
593
741
 
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.
742
+ ```tsx
743
+ <Divider
744
+ initial={{ scaleX: 0 }}
745
+ animate={{ scaleX: 1 }}
746
+ transition={{ duration: 0.5 }}
747
+ sx={{ transformOrigin: 'left' }}
748
+ />
749
+
750
+ <Divider
751
+ orientation="vertical"
752
+ initial={{ scaleY: 0 }}
753
+ animate={{ scaleY: 1 }}
754
+ whileHover={{ scaleY: 1.1 }}
755
+ transition={{ duration: 0.3 }}
756
+ />
757
+ ```
595
758
 
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
759
+ ## When to Use Divider
599
760
 
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.
761
+ ### Good Use Cases
601
762
 
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.
763
+ - **Separate list items**: When you need to clearly divide items in a long list
764
+ - **Separate form sections**: When grouping related fields into sections
765
+ - **Separate content inside cards**: When distinguishing different kinds of information within a card
766
+ - **Navigation menus**: When visually separating menu groups
767
+ - **Dashboard sections**: When dividing widgets or sections in a dashboard
603
768
 
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.
769
+ ### Cases Where It May Not Be Appropriate
605
770
 
606
- ## Accessibility
771
+ - **When simple spacing is enough**: Avoid using dividers excessively
772
+ - **When other separators already exist**: If content is already separated by color, background, borders, or similar cues, a divider may be unnecessary
773
+ - **For very short content**: A divider can feel excessive for content that is only one or two lines long
607
774
 
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.
775
+ 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.
@@ -685,6 +685,21 @@ function ClickableCard({ title, description, onClick }) {
685
685
  }
686
686
  ```
687
687
 
688
+ ## Props and Customization
689
+
690
+ ### Key Props
691
+
692
+ | Prop | Type | Default | Description |
693
+ | ---------------- | -------------------------------------------------------------- | ----------- | ----------------------------- |
694
+ | `children` | `ReactNode` | - | Sheet content |
695
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Visual style |
696
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
697
+ | `invertedColors` | `boolean` | `false` | Invert child component colors |
698
+ | `component` | `ElementType` | `'div'` | Root element type |
699
+ | `sx` | `SxProps` | - | Custom styles |
700
+
701
+ > **Note**: Sheet also accepts all Joy UI Sheet props.
702
+
688
703
  ## Best Practices
689
704
 
690
705
  - **Choose the right variant for the context.**