@ceed/ads 1.30.0 → 1.30.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.
- package/dist/Overview.md +5 -5
- 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 +39 -5
- package/dist/components/inputs/DateRangePicker.md +29 -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 +28 -5
- package/dist/components/inputs/MonthRangePicker.md +26 -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/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Box
|
|
5
|
+
Box is the most fundamental and essential layout component. It acts as a general-purpose container that wraps other components, and you can apply styles directly through CSS-in-JS. It also includes built-in Framer Motion support, making it easy to add animations. It is also a polymorphic component that can render as any HTML element.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Box {...args} sx={{
|
|
@@ -44,11 +44,9 @@ function MyComponent() {
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## Box Basic Usage
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
가장 기본적인 Box 사용법입니다.
|
|
49
|
+
The most basic way to use Box.
|
|
52
50
|
|
|
53
51
|
```tsx
|
|
54
52
|
<div style={{
|
|
@@ -84,9 +82,9 @@ function MyComponent() {
|
|
|
84
82
|
</div>
|
|
85
83
|
```
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
## Box Colors
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
You can apply various background colors.
|
|
90
88
|
|
|
91
89
|
```tsx
|
|
92
90
|
<div style={{
|
|
@@ -136,9 +134,9 @@ function MyComponent() {
|
|
|
136
134
|
</div>
|
|
137
135
|
```
|
|
138
136
|
|
|
139
|
-
|
|
137
|
+
## Box Spacing
|
|
140
138
|
|
|
141
|
-
|
|
139
|
+
You can adjust padding and margin.
|
|
142
140
|
|
|
143
141
|
```tsx
|
|
144
142
|
<div style={{
|
|
@@ -213,9 +211,9 @@ function MyComponent() {
|
|
|
213
211
|
</div>
|
|
214
212
|
```
|
|
215
213
|
|
|
216
|
-
|
|
214
|
+
## Box Border Radius
|
|
217
215
|
|
|
218
|
-
|
|
216
|
+
You can configure different corner radius values.
|
|
219
217
|
|
|
220
218
|
```tsx
|
|
221
219
|
<div style={{
|
|
@@ -297,9 +295,9 @@ function MyComponent() {
|
|
|
297
295
|
</div>
|
|
298
296
|
```
|
|
299
297
|
|
|
300
|
-
|
|
298
|
+
## Box Shadows
|
|
301
299
|
|
|
302
|
-
|
|
300
|
+
You can add shadow effects.
|
|
303
301
|
|
|
304
302
|
```tsx
|
|
305
303
|
<div style={{
|
|
@@ -388,9 +386,9 @@ function MyComponent() {
|
|
|
388
386
|
</div>
|
|
389
387
|
```
|
|
390
388
|
|
|
391
|
-
|
|
389
|
+
## Box Flex Layouts
|
|
392
390
|
|
|
393
|
-
|
|
391
|
+
You can easily build layouts using Flexbox.
|
|
394
392
|
|
|
395
393
|
```tsx
|
|
396
394
|
<div style={{
|
|
@@ -497,9 +495,9 @@ Flexbox를 사용한 레이아웃을 쉽게 만들 수 있습니다.
|
|
|
497
495
|
</div>
|
|
498
496
|
```
|
|
499
497
|
|
|
500
|
-
|
|
498
|
+
## Box Responsive Layout
|
|
501
499
|
|
|
502
|
-
|
|
500
|
+
You can create responsive layouts.
|
|
503
501
|
|
|
504
502
|
```tsx
|
|
505
503
|
<div style={{
|
|
@@ -549,9 +547,9 @@ Flexbox를 사용한 레이아웃을 쉽게 만들 수 있습니다.
|
|
|
549
547
|
</div>
|
|
550
548
|
```
|
|
551
549
|
|
|
552
|
-
|
|
550
|
+
## Box Polymorphic Components
|
|
553
551
|
|
|
554
|
-
|
|
552
|
+
You can render it as different HTML elements using the `component` prop.
|
|
555
553
|
|
|
556
554
|
```tsx
|
|
557
555
|
<div style={{
|
|
@@ -601,9 +599,9 @@ component prop을 사용하여 다양한 HTML 요소로 렌더링할 수 있습
|
|
|
601
599
|
</div>
|
|
602
600
|
```
|
|
603
601
|
|
|
604
|
-
|
|
602
|
+
## Box Motion Animations
|
|
605
603
|
|
|
606
|
-
|
|
604
|
+
Animation effects using built-in Framer Motion.
|
|
607
605
|
|
|
608
606
|
```tsx
|
|
609
607
|
<div style={{
|
|
@@ -653,9 +651,9 @@ component prop을 사용하여 다양한 HTML 요소로 렌더링할 수 있습
|
|
|
653
651
|
</div>
|
|
654
652
|
```
|
|
655
653
|
|
|
656
|
-
|
|
654
|
+
## Box Complex Layouts
|
|
657
655
|
|
|
658
|
-
Box
|
|
656
|
+
You can combine Box components to build complex layouts.
|
|
659
657
|
|
|
660
658
|
```tsx
|
|
661
659
|
<div style={{
|
|
@@ -790,16 +788,16 @@ Box를 조합하여 복잡한 레이아웃을 만들 수 있습니다.
|
|
|
790
788
|
|
|
791
789
|
### SX Prop
|
|
792
790
|
|
|
793
|
-
Box
|
|
791
|
+
The most powerful feature of Box is the `sx` prop. It allows you to apply CSS styles directly as an object.
|
|
794
792
|
|
|
795
793
|
```tsx
|
|
796
794
|
<Box
|
|
797
795
|
sx={{
|
|
798
796
|
p: 2, // padding: 16px
|
|
799
|
-
m: { xs: 1, md: 2 }, //
|
|
800
|
-
bgcolor: 'primary.50', //
|
|
801
|
-
borderRadius: 'md', //
|
|
802
|
-
'&:hover': { // hover
|
|
797
|
+
m: { xs: 1, md: 2 }, // responsive margin
|
|
798
|
+
bgcolor: 'primary.50', // theme color
|
|
799
|
+
borderRadius: 'md', // theme border-radius
|
|
800
|
+
'&:hover': { // hover state
|
|
803
801
|
bgcolor: 'primary.100',
|
|
804
802
|
},
|
|
805
803
|
}}
|
|
@@ -810,7 +808,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
810
808
|
|
|
811
809
|
### Responsive Design
|
|
812
810
|
|
|
813
|
-
|
|
811
|
+
You can define styles per breakpoint using object syntax.
|
|
814
812
|
|
|
815
813
|
```tsx
|
|
816
814
|
<Box
|
|
@@ -826,7 +824,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
826
824
|
|
|
827
825
|
### Theme Integration
|
|
828
826
|
|
|
829
|
-
|
|
827
|
+
You can use design system tokens directly.
|
|
830
828
|
|
|
831
829
|
```tsx
|
|
832
830
|
<Box
|
|
@@ -843,7 +841,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
843
841
|
|
|
844
842
|
### Framer Motion
|
|
845
843
|
|
|
846
|
-
|
|
844
|
+
You can use animation props directly.
|
|
847
845
|
|
|
848
846
|
```tsx
|
|
849
847
|
<Box
|
|
@@ -856,9 +854,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
856
854
|
</Box>
|
|
857
855
|
```
|
|
858
856
|
|
|
859
|
-
##
|
|
860
|
-
|
|
861
|
-
### Layout Container
|
|
857
|
+
## Box Layout Container
|
|
862
858
|
|
|
863
859
|
```tsx
|
|
864
860
|
<Box sx={{ maxWidth: 1200, mx: 'auto', p: 3 }}>
|
|
@@ -867,7 +863,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
867
863
|
</Box>
|
|
868
864
|
```
|
|
869
865
|
|
|
870
|
-
|
|
866
|
+
## Box Card-like Components
|
|
871
867
|
|
|
872
868
|
```tsx
|
|
873
869
|
<Box
|
|
@@ -885,7 +881,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
885
881
|
</Box>
|
|
886
882
|
```
|
|
887
883
|
|
|
888
|
-
|
|
884
|
+
## Box Flexbox Layouts
|
|
889
885
|
|
|
890
886
|
```tsx
|
|
891
887
|
<Box sx={{ display: 'flex', gap: 2, alignItems: 'center' }}>
|
|
@@ -897,7 +893,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
897
893
|
</Box>
|
|
898
894
|
```
|
|
899
895
|
|
|
900
|
-
|
|
896
|
+
## Box Grid Layouts
|
|
901
897
|
|
|
902
898
|
```tsx
|
|
903
899
|
<Box
|
|
@@ -915,7 +911,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
915
911
|
</Box>
|
|
916
912
|
```
|
|
917
913
|
|
|
918
|
-
|
|
914
|
+
## Box Centered Content
|
|
919
915
|
|
|
920
916
|
```tsx
|
|
921
917
|
<Box
|
|
@@ -930,7 +926,7 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
930
926
|
</Box>
|
|
931
927
|
```
|
|
932
928
|
|
|
933
|
-
|
|
929
|
+
## Box Sticky and Fixed Positioning
|
|
934
930
|
|
|
935
931
|
```tsx
|
|
936
932
|
<Box
|
|
@@ -947,34 +943,46 @@ Box의 가장 강력한 기능은 `sx` prop입니다. 이를 통해 CSS 스타
|
|
|
947
943
|
</Box>
|
|
948
944
|
```
|
|
949
945
|
|
|
946
|
+
## Props and Customization
|
|
947
|
+
|
|
948
|
+
### Key Props
|
|
949
|
+
|
|
950
|
+
| Prop | Type | Default | Description |
|
|
951
|
+
| ----------- | ------------- | ------- | ---------------------------------- |
|
|
952
|
+
| `children` | `ReactNode` | - | Content inside the box |
|
|
953
|
+
| `component` | `ElementType` | `'div'` | Root element type |
|
|
954
|
+
| `sx` | `SxProps` | - | Custom styles using the MUI system |
|
|
955
|
+
|
|
956
|
+
Box is a general-purpose container that renders as a `<div>` by default. It accepts all standard HTML attributes and Joy UI's `sx` prop for responsive styling.
|
|
957
|
+
|
|
950
958
|
## Best Practices
|
|
951
959
|
|
|
952
|
-
1.
|
|
960
|
+
1. **Use meaningful HTML elements**: Use the `component` prop to choose semantically appropriate HTML elements.
|
|
953
961
|
|
|
954
|
-
2.
|
|
962
|
+
2. **Use theme tokens**: Use theme spacing, color, border-radius, and similar values instead of hardcoded values.
|
|
955
963
|
|
|
956
|
-
3.
|
|
964
|
+
3. **Design responsively**: Use responsive values so the component works well across different screen sizes.
|
|
957
965
|
|
|
958
|
-
4.
|
|
959
|
-
-
|
|
960
|
-
-
|
|
966
|
+
4. **Optimize performance**:
|
|
967
|
+
- Avoid creating inline objects repeatedly, and memoize them when possible
|
|
968
|
+
- Use complex animations only when necessary
|
|
961
969
|
|
|
962
|
-
5.
|
|
963
|
-
-
|
|
964
|
-
-
|
|
965
|
-
-
|
|
970
|
+
5. **Consider accessibility**:
|
|
971
|
+
- Choose appropriate semantic HTML elements
|
|
972
|
+
- Add ARIA attributes when needed
|
|
973
|
+
- Maintain sufficient color contrast
|
|
966
974
|
|
|
967
|
-
6.
|
|
968
|
-
-
|
|
969
|
-
-
|
|
975
|
+
6. **Promote reusability**:
|
|
976
|
+
- Extract frequently used style combinations into separate components
|
|
977
|
+
- Define shared styles in the theme
|
|
970
978
|
|
|
971
|
-
7.
|
|
972
|
-
-
|
|
973
|
-
-
|
|
979
|
+
7. **Maintain consistency**:
|
|
980
|
+
- Use consistent spacing and naming conventions across the team
|
|
981
|
+
- Follow the design system guidelines
|
|
974
982
|
|
|
975
983
|
## Spacing Scale
|
|
976
984
|
|
|
977
|
-
|
|
985
|
+
Spacing values available in Box:
|
|
978
986
|
|
|
979
987
|
- `0.5` = 4px
|
|
980
988
|
- `1` = 8px
|
|
@@ -987,11 +995,11 @@ Box에서 사용할 수 있는 spacing 값들:
|
|
|
987
995
|
|
|
988
996
|
## Color Tokens
|
|
989
997
|
|
|
990
|
-
|
|
998
|
+
Primary color tokens:
|
|
991
999
|
|
|
992
1000
|
- **Background**: `background.body`, `background.surface`, `background.level1`
|
|
993
1001
|
- **Primary**: `primary.50`, `primary.100`, `primary.500`, `primary.main`
|
|
994
1002
|
- **Neutral**: `neutral.50`, `neutral.100`, `neutral.500`, `neutral.main`
|
|
995
1003
|
- **Text**: `text.primary`, `text.secondary`, `text.tertiary`
|
|
996
1004
|
|
|
997
|
-
Box
|
|
1005
|
+
Box is the foundational component for all layout and styling in ADS. Its powerful `sx` prop and built-in animation support make it flexible enough to satisfy a wide range of UI requirements.
|
|
@@ -33,9 +33,7 @@ function PageLayout() {
|
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
### Desktop
|
|
36
|
+
## Container Desktop
|
|
39
37
|
|
|
40
38
|
Maximum width optimized for desktop screens (widest setting).
|
|
41
39
|
|
|
@@ -49,7 +47,7 @@ Maximum width optimized for desktop screens (widest setting).
|
|
|
49
47
|
/>
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
## Container Laptop
|
|
53
51
|
|
|
54
52
|
Medium maximum width suitable for laptop screens.
|
|
55
53
|
|
|
@@ -63,7 +61,7 @@ Medium maximum width suitable for laptop screens.
|
|
|
63
61
|
/>
|
|
64
62
|
```
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
## Container Tablet
|
|
67
65
|
|
|
68
66
|
Narrower maximum width for tablet-optimized layouts.
|
|
69
67
|
|
|
@@ -96,9 +94,7 @@ Narrower maximum width for tablet-optimized layouts.
|
|
|
96
94
|
- **Navigation bars**: Usually span full width
|
|
97
95
|
- **Background elements**: Elements that should fill the screen
|
|
98
96
|
|
|
99
|
-
##
|
|
100
|
-
|
|
101
|
-
### Page Layout with Header
|
|
97
|
+
## Container for Page Layout
|
|
102
98
|
|
|
103
99
|
```tsx
|
|
104
100
|
function PageWithHeader() {
|
|
@@ -123,7 +119,7 @@ function PageWithHeader() {
|
|
|
123
119
|
}
|
|
124
120
|
```
|
|
125
121
|
|
|
126
|
-
|
|
122
|
+
## Container for Centered Form
|
|
127
123
|
|
|
128
124
|
```tsx
|
|
129
125
|
function CenteredForm() {
|
|
@@ -154,7 +150,7 @@ function CenteredForm() {
|
|
|
154
150
|
}
|
|
155
151
|
```
|
|
156
152
|
|
|
157
|
-
|
|
153
|
+
## Container for Article/Blog Layout
|
|
158
154
|
|
|
159
155
|
```tsx
|
|
160
156
|
function ArticlePage({ article }) {
|
|
@@ -180,7 +176,7 @@ function ArticlePage({ article }) {
|
|
|
180
176
|
}
|
|
181
177
|
```
|
|
182
178
|
|
|
183
|
-
|
|
179
|
+
## Container for Dashboard Layout
|
|
184
180
|
|
|
185
181
|
```tsx
|
|
186
182
|
function Dashboard() {
|
|
@@ -237,7 +233,7 @@ function Dashboard() {
|
|
|
237
233
|
}
|
|
238
234
|
```
|
|
239
235
|
|
|
240
|
-
|
|
236
|
+
## Container Responsive Selection
|
|
241
237
|
|
|
242
238
|
```tsx
|
|
243
239
|
function ResponsiveLayout({ children }) {
|
|
@@ -255,7 +251,7 @@ function ResponsiveLayout({ children }) {
|
|
|
255
251
|
}
|
|
256
252
|
```
|
|
257
253
|
|
|
258
|
-
|
|
254
|
+
## Nested Containers
|
|
259
255
|
|
|
260
256
|
```tsx
|
|
261
257
|
function PageWithSections() {
|