@ceed/cds 1.29.0 → 1.29.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.
Files changed (53) hide show
  1. package/dist/Overview.md +5 -5
  2. package/dist/components/data-display/Avatar.md +110 -69
  3. package/dist/components/data-display/Badge.md +91 -39
  4. package/dist/components/data-display/Chip.md +49 -20
  5. package/dist/components/data-display/DataTable.md +93 -0
  6. package/dist/components/data-display/InfoSign.md +12 -0
  7. package/dist/components/data-display/Table.md +72 -55
  8. package/dist/components/data-display/Tooltip.md +40 -40
  9. package/dist/components/data-display/Typography.md +53 -70
  10. package/dist/components/feedback/Alert.md +88 -72
  11. package/dist/components/feedback/CircularProgress.md +17 -0
  12. package/dist/components/feedback/Skeleton.md +17 -0
  13. package/dist/components/inputs/Button.md +94 -68
  14. package/dist/components/inputs/ButtonGroup.md +17 -0
  15. package/dist/components/inputs/Calendar.md +118 -457
  16. package/dist/components/inputs/Checkbox.md +185 -430
  17. package/dist/components/inputs/CurrencyInput.md +22 -0
  18. package/dist/components/inputs/DatePicker.md +36 -0
  19. package/dist/components/inputs/DateRangePicker.md +26 -0
  20. package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
  21. package/dist/components/inputs/FormControl.md +32 -2
  22. package/dist/components/inputs/IconButton.md +18 -0
  23. package/dist/components/inputs/Input.md +198 -136
  24. package/dist/components/inputs/MonthPicker.md +25 -0
  25. package/dist/components/inputs/MonthRangePicker.md +23 -0
  26. package/dist/components/inputs/PercentageInput.md +25 -0
  27. package/dist/components/inputs/RadioButton.md +23 -0
  28. package/dist/components/inputs/RadioList.md +20 -1
  29. package/dist/components/inputs/RadioTileGroup.md +37 -3
  30. package/dist/components/inputs/Select.md +56 -0
  31. package/dist/components/inputs/Slider.md +23 -0
  32. package/dist/components/inputs/Switch.md +20 -0
  33. package/dist/components/inputs/Textarea.md +32 -8
  34. package/dist/components/inputs/Uploader/Uploader.md +21 -0
  35. package/dist/components/layout/Box.md +52 -41
  36. package/dist/components/layout/Grid.md +87 -81
  37. package/dist/components/layout/Stack.md +88 -68
  38. package/dist/components/navigation/Breadcrumbs.md +57 -46
  39. package/dist/components/navigation/Drawer.md +17 -0
  40. package/dist/components/navigation/Dropdown.md +13 -0
  41. package/dist/components/navigation/IconMenuButton.md +17 -0
  42. package/dist/components/navigation/InsetDrawer.md +130 -292
  43. package/dist/components/navigation/Link.md +78 -0
  44. package/dist/components/navigation/Menu.md +17 -0
  45. package/dist/components/navigation/MenuButton.md +18 -0
  46. package/dist/components/navigation/Pagination.md +13 -0
  47. package/dist/components/navigation/Stepper.md +15 -0
  48. package/dist/components/navigation/Tabs.md +27 -0
  49. package/dist/components/surfaces/Accordions.md +804 -49
  50. package/dist/components/surfaces/Card.md +173 -97
  51. package/dist/components/surfaces/Divider.md +246 -82
  52. package/dist/components/surfaces/Sheet.md +15 -0
  53. package/package.json +1 -1
@@ -2,9 +2,7 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Card is a versatile container component that groups related content and actions into a single, cohesive unit. It provides a structured surface for displaying information such as product listings, user profiles, news articles, and dashboard widgets. Cards help users scan and compare content quickly by presenting it in a consistent, visually bounded format.
6
-
7
- The Card component is composed of several sub-components -- `CardContent`, `CardActions`, `CardCover`, and `CardOverflow` -- that work together to create rich, flexible layouts. It supports multiple variants, colors, and sizes for full visual customization.
5
+ The Card component is a UI element that groups related content and actions within a single container. It helps users scan and understand information more easily by structuring and visually grouping it. It is commonly used for news feeds, product lists, user profiles, dashboard widgets, and more.
8
6
 
9
7
  ```tsx
10
8
  <Card {...args} sx={{
@@ -26,26 +24,25 @@ The Card component is composed of several sub-components -- `CardContent`, `Card
26
24
  ## Usage
27
25
 
28
26
  ```tsx
29
- import { Card, CardContent, CardActions, Typography, Button } from '@ceed/cds';
27
+ import { Card, CardContent, CardActions, CardCover, CardOverflow } from '@ceed/cds';
30
28
 
31
29
  function MyComponent() {
32
30
  return (
33
31
  <Card sx={{ maxWidth: 320 }}>
34
32
  <CardContent>
35
- <Typography level="title-lg">Card Title</Typography>
36
- <Typography level="body-md">Card description goes here.</Typography>
33
+ <Typography level="title-lg">카드 제목</Typography>
34
+ <Typography level="body-md">카드의 내용이 들어갑니다.</Typography>
37
35
  </CardContent>
38
- <CardActions>
39
- <Button size="sm">Action</Button>
40
- </CardActions>
41
36
  </Card>
42
37
  );
43
38
  }
44
39
  ```
45
40
 
46
- ## Basic
41
+ ## Examples
42
+
43
+ ### Basic Usage
47
44
 
48
- The simplest form of a Card with a title and description inside CardContent.
45
+ The most basic way to use a card.
49
46
 
50
47
  ```tsx
51
48
  <div style={{
@@ -66,9 +63,9 @@ The simplest form of a Card with a title and description inside CardContent.
66
63
  </div>
67
64
  ```
68
65
 
69
- ## Variants
66
+ ### Variants
70
67
 
71
- Four style variants -- `solid`, `soft`, `outlined`, and `plain` -- allow you to control the visual weight of the card.
68
+ Provides various style variants.
72
69
 
73
70
  ```tsx
74
71
  <div style={{
@@ -114,9 +111,9 @@ Four style variants -- `solid`, `soft`, `outlined`, and `plain` -- allow you to
114
111
  </div>
115
112
  ```
116
113
 
117
- ## Colors
114
+ ### Colors
118
115
 
119
- Apply semantic colors to convey meaning: `primary`, `neutral`, `danger`, `success`, or `warning`.
116
+ You can apply various colors.
120
117
 
121
118
  ```tsx
122
119
  <div style={{
@@ -171,9 +168,9 @@ Apply semantic colors to convey meaning: `primary`, `neutral`, `danger`, `succes
171
168
  </div>
172
169
  ```
173
170
 
174
- ## Sizes
171
+ ### Sizes
175
172
 
176
- Three sizes are available: `sm`, `md`, and `lg`. The size affects internal padding and typography scaling.
173
+ You can adjust the size.
177
174
 
178
175
  ```tsx
179
176
  <div style={{
@@ -211,9 +208,9 @@ Three sizes are available: `sm`, `md`, and `lg`. The size affects internal paddi
211
208
  </div>
212
209
  ```
213
210
 
214
- ## With Cover
211
+ ### With Cover
215
212
 
216
- Use `CardCover` to place a full-bleed background image behind the card content, creating visually striking hero-style cards.
213
+ A card that uses the `CardCover` component to display an image as the background.
217
214
 
218
215
  ```tsx
219
216
  <div style={{
@@ -257,9 +254,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
257
254
  </div>
258
255
  ```
259
256
 
260
- ## With Actions
257
+ ### With Actions
261
258
 
262
- `CardActions` provides a dedicated area at the bottom of the card for buttons and interactive elements. Use the `buttonFlex` prop for equal-width buttons.
259
+ You can place action buttons at the bottom.
263
260
 
264
261
  ```tsx
265
262
  <div style={{
@@ -308,9 +305,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
308
305
  </div>
309
306
  ```
310
307
 
311
- ## With Overflow
308
+ ### With Overflow
312
309
 
313
- `CardOverflow` allows content to extend beyond the card's default padding, enabling full-bleed images, colored footers, and edge-to-edge elements.
310
+ Use `CardOverflow` to display content that extends beyond the card's padded boundary.
314
311
 
315
312
  ```tsx
316
313
  <div style={{
@@ -445,9 +442,9 @@ Use `CardCover` to place a full-bleed background image behind the card content,
445
442
  </div>
446
443
  ```
447
444
 
448
- ## Interactive Cards
445
+ ### Interactive Cards
449
446
 
450
- Add hover effects and click handlers to create cards that respond to user interaction.
447
+ Interactive cards with click behavior and hover effects.
451
448
 
452
449
  ```tsx
453
450
  <div style={{
@@ -485,9 +482,9 @@ Add hover effects and click handlers to create cards that respond to user intera
485
482
  </div>
486
483
  ```
487
484
 
488
- ## Media Cards
485
+ ### Media Cards
489
486
 
490
- Combine `CardOverflow` with `AspectRatio` to create product or media cards with consistent image proportions.
487
+ Media cards used with images.
491
488
 
492
489
  ```tsx
493
490
  <div style={{
@@ -562,9 +559,9 @@ Combine `CardOverflow` with `AspectRatio` to create product or media cards with
562
559
  </div>
563
560
  ```
564
561
 
565
- ## Complex Layout
562
+ ### Complex Layout
566
563
 
567
- Compose multiple sub-components together to build rich, social-media-style card layouts with avatars, images, and action bars.
564
+ A social-media-style card with a complex layout.
568
565
 
569
566
  ```tsx
570
567
  <div style={{
@@ -632,95 +629,174 @@ Compose multiple sub-components together to build rich, social-media-style card
632
629
  </div>
633
630
  ```
634
631
 
635
- ## Common Use Cases
632
+ ## Card Components
633
+
634
+ Card is composed of several subcomponents:
635
+
636
+ ### Card
636
637
 
637
- ### Product Card
638
+ The main card container.
638
639
 
639
640
  ```tsx
640
- import { Card, CardContent, CardActions, CardOverflow, AspectRatio, Typography, Button } from '@ceed/cds';
641
+ <Card variant="outlined" color="neutral" size="md">
642
+ {/* card content */}
643
+ </Card>
644
+ ```
641
645
 
642
- function ProductCard({ name, description, price, imageUrl }) {
643
- return (
644
- <Card sx={{ maxWidth: 320 }}>
645
- <CardOverflow>
646
- <AspectRatio ratio="1">
647
- <img src={imageUrl} alt={name} loading="lazy" />
648
- </AspectRatio>
649
- </CardOverflow>
650
- <CardContent>
651
- <Typography level="title-lg">{name}</Typography>
652
- <Typography level="body-md">{description}</Typography>
653
- <Typography level="title-lg" color="primary">
654
- {price}
655
- </Typography>
656
- </CardContent>
657
- <CardActions>
658
- <Button variant="solid" fullWidth>
659
- Add to Cart
660
- </Button>
661
- </CardActions>
662
- </Card>
663
- );
664
- }
646
+ ### CardContent
647
+
648
+ The area that contains the card's primary content.
649
+
650
+ ```tsx
651
+ <CardContent>
652
+ <Typography level="title-lg">제목</Typography>
653
+ <Typography level="body-md">내용</Typography>
654
+ </CardContent>
665
655
  ```
666
656
 
667
- ### Profile Card
657
+ ### CardCover
658
+
659
+ Displays background media or an image that covers the entire card.
668
660
 
669
661
  ```tsx
670
- import { Card, CardContent, CardActions, Typography, Avatar, Button } from '@ceed/cds';
662
+ <CardCover>
663
+ <img src="image.jpg" alt="Cover" />
664
+ </CardCover>
665
+ ```
671
666
 
672
- function ProfileCard({ name, role, avatarUrl }) {
673
- return (
674
- <Card sx={{ maxWidth: 320 }}>
675
- <CardContent sx={{ alignItems: 'center', textAlign: 'center' }}>
676
- <Avatar size="lg" src={avatarUrl} />
677
- <Typography level="title-lg">{name}</Typography>
678
- <Typography level="body-sm">{role}</Typography>
679
- </CardContent>
680
- <CardActions>
681
- <Button size="sm" variant="soft">Follow</Button>
682
- <Button size="sm" variant="solid">Message</Button>
683
- </CardActions>
684
- </Card>
685
- );
686
- }
667
+ ### CardActions
668
+
669
+ The area used to place action buttons.
670
+
671
+ ```tsx
672
+ <CardActions>
673
+ <Button>확인</Button>
674
+ <Button>취소</Button>
675
+ </CardActions>
687
676
  ```
688
677
 
689
- ### Dashboard Widget
678
+ ### CardOverflow
679
+
680
+ An area that ignores the card's padding and uses the full width.
690
681
 
691
682
  ```tsx
692
- import { Card, CardContent, Typography } from '@ceed/cds';
683
+ <CardOverflow>
684
+ <AspectRatio ratio="3/4">
685
+ <img src="full-width-image.jpg" alt="Full width" />
686
+ </AspectRatio>
687
+ </CardOverflow>
688
+ ```
693
689
 
694
- function DashboardWidget({ label, value, trend }) {
695
- return (
696
- <Card variant="soft" color="primary">
697
- <CardContent>
698
- <Typography level="body-sm">{label}</Typography>
699
- <Typography level="h2">{value}</Typography>
700
- <Typography level="body-xs">{trend}</Typography>
701
- </CardContent>
702
- </Card>
703
- );
704
- }
690
+ ## Common Use Cases
691
+
692
+ ### Product Cards
693
+
694
+ ```tsx
695
+ <Card sx={{ maxWidth: 320 }}>
696
+ <CardOverflow>
697
+ <AspectRatio ratio="1">
698
+ <img src="product.jpg" alt="Product" />
699
+ </AspectRatio>
700
+ </CardOverflow>
701
+ <CardContent>
702
+ <Typography level="title-lg">제품명</Typography>
703
+ <Typography level="body-md">제품 설명</Typography>
704
+ <Typography level="title-lg" color="primary">
705
+ ₩199,000
706
+ </Typography>
707
+ </CardContent>
708
+ <CardActions>
709
+ <Button variant="solid" fullWidth>
710
+ 구매하기
711
+ </Button>
712
+ </CardActions>
713
+ </Card>
714
+ ```
715
+
716
+ ### User Profile Cards
717
+
718
+ ```tsx
719
+ <Card sx={{ maxWidth: 320 }}>
720
+ <CardContent sx={{ alignItems: 'center', textAlign: 'center' }}>
721
+ <Avatar size="lg" src="profile.jpg" />
722
+ <Typography level="title-lg">사용자 이름</Typography>
723
+ <Typography level="body-sm">직책</Typography>
724
+ </CardContent>
725
+ <CardActions>
726
+ <Button size="sm" variant="soft">
727
+ 팔로우
728
+ </Button>
729
+ <Button size="sm" variant="solid">
730
+ 메시지
731
+ </Button>
732
+ </CardActions>
733
+ </Card>
734
+ ```
735
+
736
+ ### News Cards
737
+
738
+ ```tsx
739
+ <Card sx={{ maxWidth: 400 }}>
740
+ <CardOverflow>
741
+ <AspectRatio ratio="3/2">
742
+ <img src="news.jpg" alt="News" />
743
+ </AspectRatio>
744
+ </CardOverflow>
745
+ <CardContent>
746
+ <Typography level="body-xs" color="neutral">
747
+ 뉴스 · 2시간 전
748
+ </Typography>
749
+ <Typography level="title-md">뉴스 제목</Typography>
750
+ <Typography level="body-sm">뉴스 요약...</Typography>
751
+ </CardContent>
752
+ </Card>
753
+ ```
754
+
755
+ ### Dashboard Widget Cards
756
+
757
+ ```tsx
758
+ <Card variant="soft" color="primary">
759
+ <CardContent>
760
+ <Typography level="body-sm">총 사용자</Typography>
761
+ <Typography level="h2">1,234</Typography>
762
+ <Typography level="body-xs">+12% from last month</Typography>
763
+ </CardContent>
764
+ </Card>
705
765
  ```
706
766
 
767
+ ## Props and Customization
768
+
769
+ ### Key Props
770
+
771
+ | Prop | Type | Default | Description |
772
+ | ---------------- | -------------------------------------------------------------- | ------------ | -------------------------------------------------------- |
773
+ | `children` | `ReactNode` | - | Card content (CardContent, CardCover, CardActions, etc.) |
774
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'outlined'` | Visual style |
775
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Card size (affects padding) |
776
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
777
+ | `orientation` | `'horizontal' \| 'vertical'` | `'vertical'` | Card layout direction |
778
+ | `invertedColors` | `boolean` | `false` | Invert child component colors |
779
+ | `sx` | `SxProps` | - | Custom styles |
780
+
781
+ > **Note**: Card also accepts all Joy UI Card props and Framer Motion props.
782
+
707
783
  ## Best Practices
708
784
 
709
- - **Use consistent card sizing.** When displaying cards in a grid or list, ensure they share the same `maxWidth`, variant, and size to create a uniform appearance.
785
+ 1. **Use an appropriate size**: Set a size that fits the card content. If it is too large or too small, readability suffers.
786
+
787
+ 2. **Keep styles consistent**: Cards used in the same context should share consistent `variant`, `color`, and `size` values.
710
788
 
711
- - **Limit actions per card.** Place only the most relevant actions (1-3 buttons) in `CardActions`. Too many options overwhelm users and dilute the card's purpose.
789
+ 3. **Create clear hierarchy**: Use Typography levels to build a visual hierarchy based on the importance of the information.
712
790
 
713
- - **Provide image alt text.** Always include descriptive `alt` attributes on images inside `CardCover` and `CardOverflow` for screen readers.
714
- - ✔ `alt="Red running shoes, side view"`
715
- - ✘ `alt="image"` or missing alt
791
+ 4. **Use proper spacing**: When listing multiple cards, keep enough space between them so each one is clearly distinguishable.
716
792
 
717
- - **Use CardOverflow for full-bleed content.** Instead of negative margins or workarounds, use `CardOverflow` to extend images and colored sections to the card edges.
793
+ 5. **Consider accessibility**:
794
+ - Support keyboard navigation when cards are clickable
795
+ - Provide appropriate `alt` text for images
796
+ - Do not rely on color alone to communicate information
718
797
 
719
- - **Choose the right variant for the context.** Use `outlined` for general content cards, `soft` for dashboard widgets, and `plain` for minimal or embedded layouts.
798
+ 6. **Use responsive design**: Use `maxWidth` or responsive props so cards work well across different screen sizes.
720
799
 
721
- ## Accessibility
800
+ 7. **Handle loading states**: Use Skeleton components to represent loading states while data is being fetched.
722
801
 
723
- - When a card is clickable, wrap the primary action in a link or button element rather than making the entire card a click target. This ensures keyboard and screen reader users can identify the interactive element.
724
- - Provide meaningful `alt` text for all images. Decorative images should use `alt=""` to be skipped by screen readers.
725
- - Use proper heading levels inside cards (`level="title-lg"`, `level="title-md"`) to maintain the document's heading hierarchy.
726
- - Ensure sufficient color contrast between card backgrounds and text, especially when using `variant="solid"` with colored themes.
802
+ 8. **Limit action buttons**: Include only primary actions directly related to the card in `CardActions`. Too many buttons can create confusion.