@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.
Files changed (46) hide show
  1. package/dist/components/data-display/InfoSign.md +74 -91
  2. package/dist/components/data-display/Typography.md +363 -63
  3. package/dist/components/feedback/CircularProgress.md +257 -0
  4. package/dist/components/feedback/Dialog.md +8 -4
  5. package/dist/components/feedback/Modal.md +7 -3
  6. package/dist/components/feedback/Skeleton.md +280 -0
  7. package/dist/components/feedback/llms.txt +2 -0
  8. package/dist/components/inputs/ButtonGroup.md +115 -104
  9. package/dist/components/inputs/CurrencyInput.md +181 -8
  10. package/dist/components/inputs/DatePicker.md +108 -436
  11. package/dist/components/inputs/DateRangePicker.md +130 -496
  12. package/dist/components/inputs/FilterableCheckboxGroup.md +141 -20
  13. package/dist/components/inputs/FormControl.md +368 -0
  14. package/dist/components/inputs/IconButton.md +137 -88
  15. package/dist/components/inputs/Input.md +203 -77
  16. package/dist/components/inputs/MonthPicker.md +95 -427
  17. package/dist/components/inputs/MonthRangePicker.md +89 -471
  18. package/dist/components/inputs/PercentageInput.md +183 -19
  19. package/dist/components/inputs/RadioButton.md +163 -35
  20. package/dist/components/inputs/RadioList.md +241 -0
  21. package/dist/components/inputs/RadioTileGroup.md +146 -62
  22. package/dist/components/inputs/Select.md +219 -328
  23. package/dist/components/inputs/Slider.md +334 -0
  24. package/dist/components/inputs/Switch.md +143 -376
  25. package/dist/components/inputs/Textarea.md +209 -11
  26. package/dist/components/inputs/Uploader/Uploader.md +145 -66
  27. package/dist/components/inputs/llms.txt +3 -0
  28. package/dist/components/navigation/Breadcrumbs.md +57 -308
  29. package/dist/components/navigation/Drawer.md +180 -0
  30. package/dist/components/navigation/Dropdown.md +98 -215
  31. package/dist/components/navigation/IconMenuButton.md +40 -502
  32. package/dist/components/navigation/InsetDrawer.md +281 -650
  33. package/dist/components/navigation/Link.md +31 -348
  34. package/dist/components/navigation/Menu.md +92 -285
  35. package/dist/components/navigation/MenuButton.md +55 -448
  36. package/dist/components/navigation/Pagination.md +47 -338
  37. package/dist/components/navigation/Stepper.md +160 -28
  38. package/dist/components/navigation/Tabs.md +57 -316
  39. package/dist/components/surfaces/Accordions.md +49 -804
  40. package/dist/components/surfaces/Card.md +97 -157
  41. package/dist/components/surfaces/Divider.md +83 -234
  42. package/dist/components/surfaces/Sheet.md +152 -327
  43. package/dist/guides/ThemeProvider.md +89 -0
  44. package/dist/guides/llms.txt +9 -0
  45. package/dist/llms.txt +8 -0
  46. package/package.json +1 -1
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Sheet 콘텐츠를 담는 표면(surface) 컴포넌트입니다. 카드, 패널, 대화상자 다양한 UI 요소를 만드는 기반이 되며, 시각적으로 콘텐츠를 그룹화하고 구분하는 역할을 합니다. 다양한 variant color 조합을 통해 용도에 맞는 스타일을 적용할 있습니다.
5
+ Sheet is a foundational surface component that serves as a container for grouping and visually separating content. It acts as the building block for creating cards, panels, dialogs, and other elevated UI elements. By combining different `variant` and `color` props, you can tailor the Sheet's appearance to match its purpose -- whether it is a subtle content container, an attention-grabbing notification banner, or a structured form wrapper.
6
+
7
+ Sheet is built on top of Joy UI's Sheet component and inherits all of its styling capabilities, including support for the `sx` prop for custom styling, responsive design tokens, and Framer Motion animation props.
6
8
 
7
9
  ```tsx
8
10
  <Sheet {...args} sx={{
@@ -34,56 +36,18 @@ import { Sheet } from '@ceed/cds';
34
36
  function MyComponent() {
35
37
  return (
36
38
  <Sheet variant="outlined" sx={{ p: 3, borderRadius: 'md' }}>
37
- <Typography level="title-md">시트 제목</Typography>
38
- <Typography level="body-md">시트 안의 콘텐츠가 들어갑니다.</Typography>
39
+ <Typography level="title-md">Sheet Title</Typography>
40
+ <Typography level="body-md">
41
+ Content goes inside the sheet.
42
+ </Typography>
39
43
  </Sheet>
40
44
  );
41
45
  }
42
46
  ```
43
47
 
44
- ## Examples
45
-
46
- ### Basic Usage
47
-
48
- 가장 기본적인 Sheet 사용법입니다.
49
-
50
- ```tsx
51
- <div style={{
52
- display: 'flex',
53
- gap: '2rem',
54
- flexWrap: 'wrap'
55
- }}>
56
- <Sheet sx={{
57
- p: 3,
58
- maxWidth: 300,
59
- borderRadius: 'md'
60
- }}>
61
- <Typography level="title-md" sx={{
62
- mb: 1
63
- }}>
64
- 기본 Sheet
65
- </Typography>
66
- <Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
67
- </Sheet>
68
-
69
- <Sheet variant="outlined" sx={{
70
- p: 3,
71
- maxWidth: 300,
72
- borderRadius: 'md'
73
- }}>
74
- <Typography level="title-md" sx={{
75
- mb: 1
76
- }}>
77
- Outlined Sheet
78
- </Typography>
79
- <Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
80
- </Sheet>
81
- </div>
82
- ```
83
-
84
- ### Variants
48
+ ## Variants
85
49
 
86
- 다양한 스타일 변형을 제공합니다.
50
+ Sheet supports four visual variants to convey different levels of emphasis.
87
51
 
88
52
  ```tsx
89
53
  <div style={{
@@ -150,9 +114,9 @@ Plain
150
114
  </div>
151
115
  ```
152
116
 
153
- ### Colors
117
+ ## Colors
154
118
 
155
- 다양한 색상을 적용할 있습니다.
119
+ Apply semantic colors to communicate meaning -- use `danger` for errors, `success` for confirmations, `warning` for alerts, and `primary` for highlighted content.
156
120
 
157
121
  ```tsx
158
122
  <div style={{
@@ -197,9 +161,47 @@ Plain
197
161
  </div>
198
162
  ```
199
163
 
200
- ### User Profile Card
164
+ ## Basic
165
+
166
+ The simplest form of a Sheet with minimal configuration.
167
+
168
+ ```tsx
169
+ <div style={{
170
+ display: 'flex',
171
+ gap: '2rem',
172
+ flexWrap: 'wrap'
173
+ }}>
174
+ <Sheet sx={{
175
+ p: 3,
176
+ maxWidth: 300,
177
+ borderRadius: 'md'
178
+ }}>
179
+ <Typography level="title-md" sx={{
180
+ mb: 1
181
+ }}>
182
+ 기본 Sheet
183
+ </Typography>
184
+ <Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
185
+ </Sheet>
186
+
187
+ <Sheet variant="outlined" sx={{
188
+ p: 3,
189
+ maxWidth: 300,
190
+ borderRadius: 'md'
191
+ }}>
192
+ <Typography level="title-md" sx={{
193
+ mb: 1
194
+ }}>
195
+ Outlined Sheet
196
+ </Typography>
197
+ <Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
198
+ </Sheet>
199
+ </div>
200
+ ```
201
+
202
+ ## User Profile Card
201
203
 
202
- 사용자 프로필을 표시하는 카드 예제입니다.
204
+ Sheet can be composed with other components to create rich profile cards.
203
205
 
204
206
  ```tsx
205
207
  <Sheet variant="outlined" sx={{
@@ -254,9 +256,9 @@ Plain
254
256
  </Sheet>
255
257
  ```
256
258
 
257
- ### Article Card
259
+ ## Article Card
258
260
 
259
- 아티클을 표시하는 복잡한 카드 레이아웃 예제입니다.
261
+ Combine Sheet with images, chips, and actions for article-style layouts.
260
262
 
261
263
  ```tsx
262
264
  <Sheet variant="outlined" sx={{
@@ -327,9 +329,9 @@ Plain
327
329
  </Sheet>
328
330
  ```
329
331
 
330
- ### Notification Panel
332
+ ## Notification Panel
331
333
 
332
- 알림을 표시하는 패널 예제입니다.
334
+ Use `variant="soft"` with a semantic color to create attention-grabbing notification banners.
333
335
 
334
336
  ```tsx
335
337
  <Sheet variant="soft" color="primary" sx={{
@@ -360,9 +362,9 @@ Plain
360
362
  </Sheet>
361
363
  ```
362
364
 
363
- ### Stats Cards
365
+ ## Stats Cards
364
366
 
365
- 통계 정보를 표시하는 카드들입니다.
367
+ Multiple Sheet instances arranged side by side make effective dashboard stat widgets.
366
368
 
367
369
  ```tsx
368
370
  <div style={{
@@ -438,9 +440,9 @@ Plain
438
440
  </div>
439
441
  ```
440
442
 
441
- ### Form Sheet
443
+ ## Form Sheet
442
444
 
443
- 폼을 담고 있는 시트 예제입니다.
445
+ Wrap form elements inside a Sheet to create visually contained form sections.
444
446
 
445
447
  ```tsx
446
448
  <Sheet variant="outlined" sx={{
@@ -526,9 +528,9 @@ Plain
526
528
  </Sheet>
527
529
  ```
528
530
 
529
- ### Nested Sheets
531
+ ## Nested Sheets
530
532
 
531
- 시트 안에 다른 시트들을 중첩한 예제입니다.
533
+ Sheets can be nested to create layered dashboard layouts with distinct visual sections.
532
534
 
533
535
  ```tsx
534
536
  <Sheet variant="outlined" sx={{
@@ -597,296 +599,119 @@ Plain
597
599
  </Sheet>
598
600
  ```
599
601
 
600
- ## Variants
601
-
602
- Sheet는 4가지 variant를 지원합니다:
603
-
604
- ### solid
605
-
606
- 배경색이 채워진 스타일입니다. 강조가 필요한 콘텐츠에 사용합니다.
607
-
608
- ```tsx
609
- <Sheet variant="solid" color="primary">
610
- 강조된 콘텐츠
611
- </Sheet>
612
- ```
613
-
614
- ### soft
615
-
616
- 부드러운 배경색을 가진 스타일입니다. 눈에 띄지만 과하지 않은 강조에 사용합니다.
617
-
618
- ```tsx
619
- <Sheet variant="soft" color="success">
620
- 부드러운 강조
621
- </Sheet>
622
- ```
623
-
624
- ### outlined
625
-
626
- 테두리가 있는 스타일입니다. 가장 일반적으로 사용되는 카드 스타일입니다.
627
-
628
- ```tsx
629
- <Sheet variant="outlined">기본 카드 스타일</Sheet>
630
- ```
631
-
632
- ### plain
633
-
634
- 배경이나 테두리가 없는 평면 스타일입니다. 미니멀한 디자인에 사용합니다.
635
-
636
- ```tsx
637
- <Sheet variant="plain">미니멀한 스타일</Sheet>
638
- ```
639
-
640
- ## Colors
641
-
642
- 다양한 색상 테마를 적용할 수 있습니다:
643
-
644
- - **primary**: 주요 작업이나 중요한 정보
645
- - **neutral**: 일반적인 콘텐츠 (기본값)
646
- - **danger**: 오류나 경고 상황
647
- - **success**: 성공이나 긍정적인 결과
648
- - **warning**: 주의사항이나 중요한 알림
649
-
650
- ```tsx
651
- <Sheet color="danger" variant="soft">
652
- 오류 메시지
653
- </Sheet>
654
- <Sheet color="success" variant="soft">
655
- 성공 메시지
656
- </Sheet>
657
- ```
658
-
659
602
  ## Common Use Cases
660
603
 
661
- ### Profile Cards
662
-
663
- ```tsx
664
- <Sheet variant="outlined" sx={{ maxWidth: 400, borderRadius: 'lg', p: 3 }}>
665
- <Stack direction="row" spacing={2} alignItems="center">
666
- <Avatar size="lg" src="/profile.jpg" />
667
- <Stack>
668
- <Typography level="title-lg">사용자 이름</Typography>
669
- <Typography level="body-sm" color="neutral">
670
- 직책
671
- </Typography>
672
- </Stack>
673
- </Stack>
674
-
675
- <Typography level="body-md" sx={{ mt: 2 }}>
676
- 사용자 소개 텍스트...
677
- </Typography>
678
-
679
- <Stack direction="row" spacing={2} sx={{ mt: 3 }}>
680
- <Button variant="outlined" fullWidth>
681
- 팔로우
682
- </Button>
683
- <Button fullWidth>메시지</Button>
684
- </Stack>
685
- </Sheet>
686
- ```
687
-
688
- ### Dashboard Cards
604
+ ### Dashboard Stat Widget
689
605
 
690
606
  ```tsx
691
- <Sheet variant="outlined" sx={{ p: 3, borderRadius: 'lg' }}>
692
- <Typography level="body-sm" color="neutral">
693
- 총 매출
694
- </Typography>
695
- <Typography level="h2" color="primary">
696
- ₩1,234,567
697
- </Typography>
698
- <Typography level="body-xs" color="success">
699
- +12% 증가
700
- </Typography>
701
- </Sheet>
702
- ```
703
-
704
- ### Content Cards
705
-
706
- ```tsx
707
- <Sheet variant="outlined" sx={{ borderRadius: 'lg', overflow: 'hidden' }}>
708
- <Box sx={{ height: 200, bgcolor: 'primary.100' }}>{/* 이미지나 미디어 콘텐츠 */}</Box>
709
-
710
- <Stack spacing={2} sx={{ p: 3 }}>
711
- <Typography level="title-lg">콘텐츠 제목</Typography>
712
- <Typography level="body-md">콘텐츠 설명...</Typography>
607
+ import { Sheet, Typography, Stack } from '@ceed/cds';
713
608
 
714
- <Stack direction="row" justifyContent="space-between">
715
- <Typography level="body-sm" color="neutral">
716
- 2024.01.15
717
- </Typography>
718
- <Button size="sm">더 보기</Button>
719
- </Stack>
720
- </Stack>
721
- </Sheet>
609
+ function StatWidget({ label, value, change }) {
610
+ return (
611
+ <Sheet variant="outlined" sx={{ p: 3, borderRadius: 'lg', minWidth: 200 }}>
612
+ <Stack spacing={1}>
613
+ <Typography level="body-sm" sx={{ color: 'text.secondary' }}>
614
+ {label}
615
+ </Typography>
616
+ <Typography level="h2" color="primary">
617
+ {value}
618
+ </Typography>
619
+ <Typography
620
+ level="body-xs"
621
+ sx={{ color: change > 0 ? 'success.600' : 'danger.600' }}
622
+ >
623
+ {change > 0 ? '+' : ''}{change}% from last month
624
+ </Typography>
625
+ </Stack>
626
+ </Sheet>
627
+ );
628
+ }
722
629
  ```
723
630
 
724
- ### Form Containers
631
+ ### Alert Banner
725
632
 
726
633
  ```tsx
727
- <Sheet variant="outlined" sx={{ maxWidth: 500, borderRadius: 'lg', p: 4 }}>
728
- <Typography level="title-lg" sx={{ mb: 3 }}>
729
- 로그인
730
- </Typography>
634
+ import { Sheet, Typography, Stack, Button } from '@ceed/cds';
635
+ import WarningIcon from '@mui/icons-material/Warning';
731
636
 
732
- <Stack spacing={2}>
733
- <FormControl>
734
- <FormLabel>이메일</FormLabel>
735
- <Input type="email" />
736
- </FormControl>
737
-
738
- <FormControl>
739
- <FormLabel>비밀번호</FormLabel>
740
- <Input type="password" />
741
- </FormControl>
742
-
743
- <Button fullWidth>로그인</Button>
744
- </Stack>
745
- </Sheet>
637
+ function AlertBanner({ message, onDismiss }) {
638
+ return (
639
+ <Sheet
640
+ variant="soft"
641
+ color="warning"
642
+ sx={{ borderRadius: 'md', p: 2 }}
643
+ >
644
+ <Stack direction="row" alignItems="center" spacing={2}>
645
+ <WarningIcon />
646
+ <Typography level="body-md" sx={{ flex: 1 }}>
647
+ {message}
648
+ </Typography>
649
+ <Button size="sm" variant="plain" onClick={onDismiss}>
650
+ Dismiss
651
+ </Button>
652
+ </Stack>
653
+ </Sheet>
654
+ );
655
+ }
746
656
  ```
747
657
 
748
- ### Modal Content
658
+ ### Content Card with Hover Effect
749
659
 
750
660
  ```tsx
751
- <Sheet
752
- variant="outlined"
753
- sx={{
754
- position: 'fixed',
755
- top: '50%',
756
- left: '50%',
757
- transform: 'translate(-50%, -50%)',
758
- borderRadius: 'lg',
759
- p: 4,
760
- maxWidth: 400,
761
- boxShadow: 'lg',
762
- }}
763
- >
764
- <Typography level="title-lg" sx={{ mb: 2 }}>
765
- 확인 필요
766
- </Typography>
767
- <Typography level="body-md" sx={{ mb: 3 }}>
768
- 정말로 이 작업을 수행하시겠습니까?
769
- </Typography>
770
-
771
- <Stack direction="row" spacing={2} justifyContent="flex-end">
772
- <Button variant="outlined">취소</Button>
773
- <Button color="danger">삭제</Button>
774
- </Stack>
775
- </Sheet>
776
- ```
777
-
778
- ### Notification Banners
661
+ import { Sheet, Typography, Stack } from '@ceed/cds';
779
662
 
780
- ```tsx
781
- <Sheet variant="soft" color="warning" sx={{ borderRadius: 'md', p: 2 }}>
782
- <Stack direction="row" alignItems="center" spacing={2}>
783
- <WarningIcon />
784
- <Typography level="body-md">시스템 점검이 예정되어 있습니다.</Typography>
785
- <Button size="sm" variant="plain">
786
- 자세히 보기
787
- </Button>
788
- </Stack>
789
- </Sheet>
663
+ function ClickableCard({ title, description, onClick }) {
664
+ return (
665
+ <Sheet
666
+ variant="outlined"
667
+ sx={{
668
+ p: 3,
669
+ borderRadius: 'lg',
670
+ cursor: 'pointer',
671
+ transition: 'all 0.2s',
672
+ '&:hover': {
673
+ boxShadow: 'md',
674
+ transform: 'translateY(-2px)',
675
+ },
676
+ }}
677
+ onClick={onClick}
678
+ >
679
+ <Stack spacing={1}>
680
+ <Typography level="title-lg">{title}</Typography>
681
+ <Typography level="body-md">{description}</Typography>
682
+ </Stack>
683
+ </Sheet>
684
+ );
685
+ }
790
686
  ```
791
687
 
792
688
  ## Best Practices
793
689
 
794
- 1. **적절한 패딩**: 콘텐츠 양에 따라 적절한 패딩을 설정하세요.
795
-
796
- ```tsx
797
- <Sheet sx={{ p: { xs: 2, sm: 3, md: 4 } }}>
798
- ```
799
-
800
- 2. **의미있는 변형 선택**:
801
- - `outlined`: 일반적인 카드나 패널
802
- - `soft`: 부드러운 강조나 구분
803
- - `solid`: 강한 강조나 액션
804
- - `plain`: 미니멀하거나 중첩된 콘텐츠
805
-
806
- 3. **색상의 의미 활용**:
807
- - `danger`: 오류, 삭제 등 위험한 작업
808
- - `success`: 성공 메시지, 완료 상태
809
- - `warning`: 주의사항, 중요 알림
810
- - `primary`: 주요 액션, 강조 콘텐츠
811
- - `neutral`: 일반 콘텐츠
812
-
813
- 4. **반응형 고려**:
814
-
815
- ```tsx
816
- <Sheet sx={{
817
- maxWidth: { xs: '100%', sm: 400 },
818
- borderRadius: { xs: 0, sm: 'lg' },
819
- p: { xs: 2, sm: 3 }
820
- }}>
821
- ```
822
-
823
- 5. **접근성**:
824
- - 적절한 시맨틱 태그와 함께 사용하세요
825
- - 충분한 색상 대비를 유지하세요
826
- - 키보드 탐색을 고려하세요
827
-
828
- 6. **성능**:
829
- - 그림자나 복잡한 스타일은 필요할 때만 사용하세요
830
- - 많은 카드가 있을 때는 가상화를 고려하세요
831
-
832
- 7. **일관성**:
833
- - 프로젝트 전반에서 일관된 borderRadius와 spacing을 사용하세요
834
- - 비슷한 콘텐츠에는 동일한 variant를 사용하세요
690
+ - **Choose the right variant for the context.**
691
+ - `outlined` for general-purpose cards and panels
692
+ - `soft` for subtle emphasis or notification banners
693
+ - `solid` for high-emphasis content that demands attention
694
+ - `plain` for minimal or nested containers
835
695
 
836
- ## Advanced Usage
696
+ - **Use semantic colors intentionally.**
697
+ - `danger` for error states and destructive actions
698
+ - `success` for confirmation messages and positive outcomes
699
+ - `warning` for caution alerts and important notices
700
+ - `primary` for highlighted or brand-related content
701
+ - `neutral` for general, non-semantic content
837
702
 
838
- ### Custom Styling
703
+ - **Maintain consistent spacing.**
704
+ - Use the `sx` prop with design tokens (`p: 3`, `borderRadius: 'lg'`) rather than arbitrary pixel values to keep layouts consistent across the application.
839
705
 
840
- ```tsx
841
- <Sheet
842
- sx={{
843
- background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
844
- border: 0,
845
- borderRadius: 3,
846
- boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
847
- color: 'white',
848
- p: 3,
849
- }}
850
- >
851
- 커스텀 스타일링
852
- </Sheet>
853
- ```
706
+ - **Avoid deeply nested Sheets.**
707
+ - While nesting is supported, more than two levels of nesting can make the visual hierarchy confusing. Consider flattening the structure or using Divider components instead.
854
708
 
855
- ### Interactive States
709
+ - **Prefer composition over complexity.**
710
+ - Sheet is intentionally a low-level primitive. Compose it with Typography, Stack, Button, and other components rather than overloading the Sheet with custom styling.
856
711
 
857
- ```tsx
858
- <Sheet
859
- variant="outlined"
860
- sx={{
861
- cursor: 'pointer',
862
- transition: 'all 0.2s',
863
- '&:hover': {
864
- boxShadow: 'md',
865
- transform: 'translateY(-2px)',
866
- },
867
- '&:active': {
868
- transform: 'translateY(0)',
869
- },
870
- }}
871
- onClick={() => console.log('clicked')}
872
- >
873
- 클릭 가능한 카드
874
- </Sheet>
875
- ```
876
-
877
- ### With Animation (Framer Motion)
878
-
879
- ```tsx
880
- <Sheet
881
- initial={{ opacity: 0, y: 20 }}
882
- animate={{ opacity: 1, y: 0 }}
883
- transition={{ duration: 0.3 }}
884
- whileHover={{ scale: 1.02 }}
885
- variant="outlined"
886
- sx={{ p: 3 }}
887
- >
888
- 애니메이션 카드
889
- </Sheet>
890
- ```
712
+ ## Accessibility
891
713
 
892
- Sheet 유연하고 강력한 표면 컴포넌트로, 다양한 UI 패턴을 구현하는 기초가 됩니다. 적절한 variant와 색상 조합을 통해 일관성 있고 아름다운 인터페이스를 만들 있습니다.
714
+ - Sheet renders as a `<div>` by default. When the content has a semantic meaning (e.g., a section or article), use the `component` prop to render an appropriate HTML element such as `<section>` or `<article>`.
715
+ - When a Sheet is interactive (clickable), ensure it has a proper `role` attribute (e.g., `role="button"`) and supports keyboard interaction via `tabIndex` and `onKeyDown`.
716
+ - Maintain sufficient color contrast between the Sheet background and its text content, especially when using `variant="solid"` with colored backgrounds.
717
+ - Avoid relying solely on color to convey information. Pair color indicators with icons or text labels for users with color vision deficiencies.
@@ -0,0 +1,89 @@
1
+ # ThemeProvider
2
+
3
+ ## Introduction
4
+
5
+ `ThemeProvider` is the root provider that supplies theme tokens across CDS components.
6
+ Internally, it applies Joy UI `CssVarsProvider` and `CssBaseline`, and also enables CDS-specific typography levels (`marketing-lg`, `marketing-md`, `marketing-sm`) consistently.
7
+ Because this is an internal design system with pre-defined brand identity, changing tokens via `CustomTheme` is considered an anti-pattern.
8
+
9
+ ```tsx
10
+ <ThemeProvider>
11
+ <DemoContent />
12
+ </ThemeProvider>
13
+ ```
14
+
15
+ | Field | Description | Default |
16
+ | ---------------------------- | ----------- | ------- |
17
+ | Controls resolved at runtime | — | — |
18
+
19
+ ## Usage
20
+
21
+ ```tsx
22
+ import { ThemeProvider } from '@ceed/cds';
23
+
24
+ function App() {
25
+ return (
26
+ <ThemeProvider>
27
+ <YourRoutes />
28
+ </ThemeProvider>
29
+ );
30
+ }
31
+ ```
32
+
33
+ ## CDS-specific Typography
34
+
35
+ CDS extends `marketing-*` levels for landing and promotional UI typography.
36
+
37
+ ```tsx
38
+ <ThemeProvider>
39
+ <Stack spacing={1}>
40
+ <Typography level="marketing-lg">Marketing Large</Typography>
41
+ <Typography level="marketing-md">Marketing Medium</Typography>
42
+ <Typography level="marketing-sm">Marketing Small</Typography>
43
+ </Stack>
44
+ </ThemeProvider>
45
+ ```
46
+
47
+ ```tsx
48
+ <Typography level="marketing-lg">Hero title</Typography>
49
+ <Typography level="marketing-md">Section title</Typography>
50
+ <Typography level="marketing-sm">Card title</Typography>
51
+ ```
52
+
53
+ ## Common Use Cases
54
+
55
+ ### App Root
56
+
57
+ ```tsx
58
+ import { ThemeProvider } from '@ceed/cds';
59
+
60
+ createRoot(document.getElementById('root')!).render(
61
+ <ThemeProvider>
62
+ <App />
63
+ </ThemeProvider>,
64
+ );
65
+ ```
66
+
67
+ ### Storybook/Test Wrapper
68
+
69
+ ```tsx
70
+ import { ThemeProvider } from '@ceed/cds';
71
+
72
+ const renderWithTheme = (ui: React.ReactElement) => {
73
+ return render(<ThemeProvider>{ui}</ThemeProvider>);
74
+ };
75
+ ```
76
+
77
+ ## Best Practices
78
+
79
+ 1. **Use a single provider at the app root**: multiple nested providers can cause unexpected token conflicts.
80
+ 2. **Do not create custom themes**: CDS is a standardized internal system with built-in brand identity, and `CustomTheme` usage is an anti-pattern.
81
+ 3. **Do not omit the provider**: CDS style consistency, including `marketing-*` levels, can break.
82
+ 4. **Keep package usage consistent**: use only `@ceed/cds` ThemeProvider in CDS applications.
83
+
84
+ ## Accessibility
85
+
86
+ 1. **Check brand color contrast**: ensure text contrast remains accessible even with default tokens.
87
+ 2. **Do not rely on color alone for state**: combine color with text, icons, or labels.
88
+ 3. **Maintain typography hierarchy**: use marketing levels for emphasis and keep body text at body levels for readability.
89
+ 4. **Keep focus indicators visible**: verify keyboard focus visibility is preserved.
@@ -0,0 +1,9 @@
1
+ # guides
2
+
3
+ ## Documentation
4
+
5
+ - [ThemeProvider](./ThemeProvider.md)
6
+
7
+ ## Parent
8
+
9
+ - [Parent](../llms.txt)