@ceed/cds 1.34.1 → 1.36.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.
- package/dist/components/Accordions/Accordions.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +5 -5
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Avatar/Avatar.d.ts +7 -17
- package/dist/components/Box/Box.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
- package/dist/components/Button/Button.d.ts +3 -2
- package/dist/components/Calendar/Calendar.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Chip/Chip.d.ts +1 -0
- package/dist/components/Container/Container.d.ts +6 -1
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
- package/dist/components/DialogActions/DialogActions.d.ts +1 -0
- package/dist/components/DialogContent/DialogContent.d.ts +1 -0
- package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
- package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +28 -1
- package/dist/components/FormControl/FormControl.d.ts +1 -0
- package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
- package/dist/components/FormLabel/FormLabel.d.ts +1 -0
- package/dist/components/Grid/Grid.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -2
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
- package/dist/components/InfoSign/InfoSign.d.ts +3 -2
- package/dist/components/Input/Input.d.ts +8 -22
- package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
- package/dist/components/Markdown/Markdown.d.ts +9 -24
- package/dist/components/Menu/Menu.d.ts +2 -1
- package/dist/components/MenuButton/MenuButton.d.ts +10 -8
- package/dist/components/Modal/Modal.d.ts +4 -2
- package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
- package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
- package/dist/components/Navigator/Navigator.d.ts +5 -4
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -0
- package/dist/components/RadioList/RadioList.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +20 -10
- package/dist/components/Sheet/Sheet.d.ts +1 -0
- package/dist/components/Stack/Stack.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +2 -1
- package/dist/components/Switch/Switch.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +7 -5
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +8 -20
- package/dist/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -0
- package/dist/components/Uploader/Uploader.d.ts +18 -17
- package/dist/components/data-display/Avatar.md +60 -72
- package/dist/components/data-display/Badge.md +197 -181
- package/dist/components/data-display/Chip.md +164 -142
- package/dist/components/data-display/DataTable.md +843 -338
- package/dist/components/data-display/InfoSign.md +1 -3
- package/dist/components/data-display/Markdown.md +93 -125
- package/dist/components/data-display/Table.md +1453 -1007
- package/dist/components/data-display/Typography.md +113 -116
- package/dist/components/feedback/Alert.md +80 -86
- package/dist/components/feedback/CircularProgress.md +32 -36
- package/dist/components/feedback/Dialog.md +25 -17
- package/dist/components/feedback/Modal.md +296 -264
- package/dist/components/feedback/Skeleton.md +125 -89
- package/dist/components/index.d.ts +62 -2
- package/dist/components/inputs/Autocomplete.md +191 -95
- package/dist/components/inputs/Button.md +83 -83
- package/dist/components/inputs/ButtonGroup.md +195 -185
- package/dist/components/inputs/Calendar.md +25 -28
- package/dist/components/inputs/Checkbox.md +11 -29
- package/dist/components/inputs/CurrencyInput.md +4 -4
- package/dist/components/inputs/DatePicker.md +229 -110
- package/dist/components/inputs/DateRangePicker.md +248 -137
- package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
- package/dist/components/inputs/FormControl.md +75 -69
- package/dist/components/inputs/IconButton.md +229 -205
- package/dist/components/inputs/Input.md +131 -98
- package/dist/components/inputs/MonthPicker.md +186 -84
- package/dist/components/inputs/MonthRangePicker.md +73 -49
- package/dist/components/inputs/PercentageInput.md +15 -31
- package/dist/components/inputs/RadioButton.md +320 -256
- package/dist/components/inputs/RadioList.md +66 -50
- package/dist/components/inputs/RadioTileGroup.md +287 -170
- package/dist/components/inputs/SearchBar.md +82 -60
- package/dist/components/inputs/Select.md +184 -120
- package/dist/components/inputs/Slider.md +153 -102
- package/dist/components/inputs/Switch.md +193 -138
- package/dist/components/inputs/Textarea.md +15 -20
- package/dist/components/inputs/Uploader/Uploader.md +68 -39
- package/dist/components/layout/Box.md +841 -662
- package/dist/components/layout/Container.md +3 -11
- package/dist/components/layout/Grid.md +480 -394
- package/dist/components/layout/Stack.md +739 -566
- package/dist/components/navigation/Breadcrumbs.md +4 -4
- package/dist/components/navigation/Drawer.md +34 -25
- package/dist/components/navigation/Dropdown.md +745 -408
- package/dist/components/navigation/IconMenuButton.md +14 -6
- package/dist/components/navigation/InsetDrawer.md +8 -13
- package/dist/components/navigation/Link.md +1 -2
- package/dist/components/navigation/Menu.md +623 -502
- package/dist/components/navigation/MenuButton.md +18 -10
- package/dist/components/navigation/NavigationGroup.md +19 -50
- package/dist/components/navigation/NavigationItem.md +6 -6
- package/dist/components/navigation/Navigator.md +26 -28
- package/dist/components/navigation/Pagination.md +86 -75
- package/dist/components/navigation/Stepper.md +2 -12
- package/dist/components/navigation/Tabs.md +48 -36
- package/dist/components/surfaces/Accordions.md +89 -172
- package/dist/components/surfaces/Card.md +1094 -709
- package/dist/components/surfaces/Divider.md +562 -412
- package/dist/components/surfaces/Sheet.md +700 -518
- package/dist/guides/ThemeProvider.md +8 -8
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +1074 -1033
- package/dist/index.d.ts +2 -1
- package/dist/index.js +720 -671
- package/framer/index.js +1 -1
- package/package.json +32 -35
|
@@ -8,10 +8,10 @@ Badge supports multiple colors, variants, and sizes for flexible visual customiz
|
|
|
8
8
|
|
|
9
9
|
```tsx
|
|
10
10
|
<Badge {...args}>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</Badge>
|
|
11
|
+
<IconButton>
|
|
12
|
+
<NotificationsIcon />
|
|
13
|
+
</IconButton>
|
|
14
|
+
</Badge>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
| Field | Description | Default |
|
|
@@ -46,28 +46,30 @@ function MyComponent() {
|
|
|
46
46
|
Basic Badge usage showing numeric counts, max overflow, and text content.
|
|
47
47
|
|
|
48
48
|
```tsx
|
|
49
|
-
<div
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</
|
|
49
|
+
<div
|
|
50
|
+
style={{
|
|
51
|
+
display: "flex",
|
|
52
|
+
gap: "2rem"
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<Badge badgeContent={4}>
|
|
56
|
+
<IconButton>
|
|
57
|
+
<NotificationsIcon />
|
|
58
|
+
</IconButton>
|
|
59
|
+
</Badge>
|
|
60
|
+
|
|
61
|
+
<Badge badgeContent={100} max={99}>
|
|
62
|
+
<IconButton>
|
|
63
|
+
<EmailIcon />
|
|
64
|
+
</IconButton>
|
|
65
|
+
</Badge>
|
|
66
|
+
|
|
67
|
+
<Badge badgeContent="NEW">
|
|
68
|
+
<IconButton>
|
|
69
|
+
<NotificationsIcon />
|
|
70
|
+
</IconButton>
|
|
71
|
+
</Badge>
|
|
72
|
+
</div>
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
## Colors
|
|
@@ -75,40 +77,42 @@ Basic Badge usage showing numeric counts, max overflow, and text content.
|
|
|
75
77
|
Apply semantic colors to convey the badge's meaning: `primary` for general counts, `danger` for urgent notifications, `success` for online status, and `warning` for attention items.
|
|
76
78
|
|
|
77
79
|
```tsx
|
|
78
|
-
<div
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</
|
|
80
|
+
<div
|
|
81
|
+
style={{
|
|
82
|
+
display: "flex",
|
|
83
|
+
gap: "2rem"
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<Badge badgeContent={4} color="primary">
|
|
87
|
+
<IconButton>
|
|
88
|
+
<NotificationsIcon />
|
|
89
|
+
</IconButton>
|
|
90
|
+
</Badge>
|
|
91
|
+
|
|
92
|
+
<Badge badgeContent={4} color="neutral">
|
|
93
|
+
<IconButton>
|
|
94
|
+
<NotificationsIcon />
|
|
95
|
+
</IconButton>
|
|
96
|
+
</Badge>
|
|
97
|
+
|
|
98
|
+
<Badge badgeContent={4} color="danger">
|
|
99
|
+
<IconButton>
|
|
100
|
+
<NotificationsIcon />
|
|
101
|
+
</IconButton>
|
|
102
|
+
</Badge>
|
|
103
|
+
|
|
104
|
+
<Badge badgeContent={4} color="success">
|
|
105
|
+
<IconButton>
|
|
106
|
+
<NotificationsIcon />
|
|
107
|
+
</IconButton>
|
|
108
|
+
</Badge>
|
|
109
|
+
|
|
110
|
+
<Badge badgeContent={4} color="warning">
|
|
111
|
+
<IconButton>
|
|
112
|
+
<NotificationsIcon />
|
|
113
|
+
</IconButton>
|
|
114
|
+
</Badge>
|
|
115
|
+
</div>
|
|
112
116
|
```
|
|
113
117
|
|
|
114
118
|
## Variants
|
|
@@ -116,34 +120,36 @@ Apply semantic colors to convey the badge's meaning: `primary` for general count
|
|
|
116
120
|
Four style variants are available: `solid` (filled), `soft` (subtle background), `outlined` (border only), and `plain` (minimal).
|
|
117
121
|
|
|
118
122
|
```tsx
|
|
119
|
-
<div
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</
|
|
123
|
+
<div
|
|
124
|
+
style={{
|
|
125
|
+
display: "flex",
|
|
126
|
+
gap: "2rem"
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
<Badge badgeContent={4} variant="solid">
|
|
130
|
+
<IconButton>
|
|
131
|
+
<NotificationsIcon />
|
|
132
|
+
</IconButton>
|
|
133
|
+
</Badge>
|
|
134
|
+
|
|
135
|
+
<Badge badgeContent={4} variant="soft">
|
|
136
|
+
<IconButton>
|
|
137
|
+
<NotificationsIcon />
|
|
138
|
+
</IconButton>
|
|
139
|
+
</Badge>
|
|
140
|
+
|
|
141
|
+
<Badge badgeContent={4} variant="outlined">
|
|
142
|
+
<IconButton>
|
|
143
|
+
<NotificationsIcon />
|
|
144
|
+
</IconButton>
|
|
145
|
+
</Badge>
|
|
146
|
+
|
|
147
|
+
<Badge badgeContent={4} variant="plain">
|
|
148
|
+
<IconButton>
|
|
149
|
+
<NotificationsIcon />
|
|
150
|
+
</IconButton>
|
|
151
|
+
</Badge>
|
|
152
|
+
</div>
|
|
147
153
|
```
|
|
148
154
|
|
|
149
155
|
## Sizes
|
|
@@ -151,29 +157,31 @@ Four style variants are available: `solid` (filled), `soft` (subtle background),
|
|
|
151
157
|
Three sizes -- `sm`, `md`, and `lg` -- allow the badge to scale proportionally with its wrapped element.
|
|
152
158
|
|
|
153
159
|
```tsx
|
|
154
|
-
<div
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
</
|
|
160
|
+
<div
|
|
161
|
+
style={{
|
|
162
|
+
display: "flex",
|
|
163
|
+
gap: "2rem",
|
|
164
|
+
alignItems: "center"
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
<Badge badgeContent={4} size="sm">
|
|
168
|
+
<IconButton size="sm">
|
|
169
|
+
<NotificationsIcon />
|
|
170
|
+
</IconButton>
|
|
171
|
+
</Badge>
|
|
172
|
+
|
|
173
|
+
<Badge badgeContent={4} size="md">
|
|
174
|
+
<IconButton size="md">
|
|
175
|
+
<NotificationsIcon />
|
|
176
|
+
</IconButton>
|
|
177
|
+
</Badge>
|
|
178
|
+
|
|
179
|
+
<Badge badgeContent={4} size="lg">
|
|
180
|
+
<IconButton size="lg">
|
|
181
|
+
<NotificationsIcon />
|
|
182
|
+
</IconButton>
|
|
183
|
+
</Badge>
|
|
184
|
+
</div>
|
|
177
185
|
```
|
|
178
186
|
|
|
179
187
|
## With Avatar
|
|
@@ -181,18 +189,20 @@ Three sizes -- `sm`, `md`, and `lg` -- allow the badge to scale proportionally w
|
|
|
181
189
|
Badge pairs naturally with Avatar to indicate user status (e.g., notification count or online indicator).
|
|
182
190
|
|
|
183
191
|
```tsx
|
|
184
|
-
<div
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
<div
|
|
193
|
+
style={{
|
|
194
|
+
display: "flex",
|
|
195
|
+
gap: "2rem"
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
<Badge badgeContent={4} color="danger">
|
|
199
|
+
<Avatar src="https://i.pravatar.cc/40?img=1" />
|
|
200
|
+
</Badge>
|
|
201
|
+
|
|
202
|
+
<Badge badgeContent="●" color="success">
|
|
203
|
+
<Avatar src="https://i.pravatar.cc/40?img=2" />
|
|
204
|
+
</Badge>
|
|
205
|
+
</div>
|
|
196
206
|
```
|
|
197
207
|
|
|
198
208
|
## Dot Badge
|
|
@@ -200,20 +210,22 @@ Badge pairs naturally with Avatar to indicate user status (e.g., notification co
|
|
|
200
210
|
When no `badgeContent` is provided, Badge renders as a small dot. This is useful for simple presence or status indicators without a specific count.
|
|
201
211
|
|
|
202
212
|
```tsx
|
|
203
|
-
<div
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
<div
|
|
214
|
+
style={{
|
|
215
|
+
display: "flex",
|
|
216
|
+
gap: "2rem"
|
|
217
|
+
}}
|
|
218
|
+
>
|
|
219
|
+
<Badge variant="solid" color="danger">
|
|
220
|
+
<IconButton>
|
|
221
|
+
<NotificationsIcon />
|
|
222
|
+
</IconButton>
|
|
223
|
+
</Badge>
|
|
224
|
+
|
|
225
|
+
<Badge variant="solid" color="success">
|
|
226
|
+
<Avatar src="https://i.pravatar.cc/40?img=3" />
|
|
227
|
+
</Badge>
|
|
228
|
+
</div>
|
|
217
229
|
```
|
|
218
230
|
|
|
219
231
|
## Max Count
|
|
@@ -221,28 +233,30 @@ When no `badgeContent` is provided, Badge renders as a small dot. This is useful
|
|
|
221
233
|
Use the `max` prop to cap the displayed number. When `badgeContent` exceeds `max`, it renders as "max+" (e.g., "99+").
|
|
222
234
|
|
|
223
235
|
```tsx
|
|
224
|
-
<div
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
</
|
|
236
|
+
<div
|
|
237
|
+
style={{
|
|
238
|
+
display: "flex",
|
|
239
|
+
gap: "2rem"
|
|
240
|
+
}}
|
|
241
|
+
>
|
|
242
|
+
<Badge badgeContent={99}>
|
|
243
|
+
<IconButton>
|
|
244
|
+
<NotificationsIcon />
|
|
245
|
+
</IconButton>
|
|
246
|
+
</Badge>
|
|
247
|
+
|
|
248
|
+
<Badge badgeContent={100} max={99}>
|
|
249
|
+
<IconButton>
|
|
250
|
+
<NotificationsIcon />
|
|
251
|
+
</IconButton>
|
|
252
|
+
</Badge>
|
|
253
|
+
|
|
254
|
+
<Badge badgeContent={1000} max={999}>
|
|
255
|
+
<IconButton>
|
|
256
|
+
<NotificationsIcon />
|
|
257
|
+
</IconButton>
|
|
258
|
+
</Badge>
|
|
259
|
+
</div>
|
|
246
260
|
```
|
|
247
261
|
|
|
248
262
|
## Show Zero
|
|
@@ -250,28 +264,30 @@ Use the `max` prop to cap the displayed number. When `badgeContent` exceeds `max
|
|
|
250
264
|
By default, Badge hides when `badgeContent` is `0`. Use the `showZero` prop to force it to remain visible.
|
|
251
265
|
|
|
252
266
|
```tsx
|
|
253
|
-
<div
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
</
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
</
|
|
274
|
-
</
|
|
267
|
+
<div
|
|
268
|
+
style={{
|
|
269
|
+
display: "flex",
|
|
270
|
+
gap: "2rem"
|
|
271
|
+
}}
|
|
272
|
+
>
|
|
273
|
+
<div>
|
|
274
|
+
<p>Default (0 숨김)</p>
|
|
275
|
+
<Badge badgeContent={0}>
|
|
276
|
+
<IconButton>
|
|
277
|
+
<NotificationsIcon />
|
|
278
|
+
</IconButton>
|
|
279
|
+
</Badge>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<div>
|
|
283
|
+
<p>Show zero</p>
|
|
284
|
+
<Badge badgeContent={0} showZero>
|
|
285
|
+
<IconButton>
|
|
286
|
+
<NotificationsIcon />
|
|
287
|
+
</IconButton>
|
|
288
|
+
</Badge>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
275
291
|
```
|
|
276
292
|
|
|
277
293
|
## Common Use Cases
|