@ceed/cds 1.34.1 → 1.36.0-next.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/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/FilterableCheckboxGroup/FilterableCheckboxGroup.d.ts +1 -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 +2 -2
- 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 +12 -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/ThemeProvider/ThemeProvider.d.ts +15 -0
- 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 +106 -95
- 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 +5 -5
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +1082 -1036
- package/dist/index.d.ts +2 -1
- package/dist/index.js +749 -695
- package/framer/index.js +1 -1
- package/package.json +34 -36
|
@@ -6,10 +6,10 @@ FormControl is a wrapper component that provides context to form elements such a
|
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<FormControl {...args}>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</FormControl>
|
|
9
|
+
<FormLabel>Label</FormLabel>
|
|
10
|
+
<Input placeholder="Enter text…" />
|
|
11
|
+
<FormHelperText>This is helper text.</FormHelperText>
|
|
12
|
+
</FormControl>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
| Field | Description | Default |
|
|
@@ -42,10 +42,10 @@ The most common pattern — wrapping an Input with a label and helper text.
|
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
44
|
<FormControl>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</FormControl>
|
|
45
|
+
<FormLabel>Username</FormLabel>
|
|
46
|
+
<Input placeholder="Enter username" />
|
|
47
|
+
<FormHelperText>Choose a unique username.</FormHelperText>
|
|
48
|
+
</FormControl>
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
## With Textarea
|
|
@@ -54,10 +54,10 @@ FormControl works equally well with Textarea components.
|
|
|
54
54
|
|
|
55
55
|
```tsx
|
|
56
56
|
<FormControl>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</FormControl>
|
|
57
|
+
<FormLabel>Description</FormLabel>
|
|
58
|
+
<Textarea placeholder="Enter description…" minRows={3} />
|
|
59
|
+
<FormHelperText>Provide a detailed description.</FormHelperText>
|
|
60
|
+
</FormControl>
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## With Select
|
|
@@ -66,10 +66,10 @@ Use FormControl with Select for dropdown fields.
|
|
|
66
66
|
|
|
67
67
|
```tsx
|
|
68
68
|
<FormControl>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</FormControl>
|
|
69
|
+
<FormLabel>Role</FormLabel>
|
|
70
|
+
<Select placeholder="Select a role" options={roleOptions} />
|
|
71
|
+
<FormHelperText>Select the user role.</FormHelperText>
|
|
72
|
+
</FormControl>
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Error State
|
|
@@ -78,10 +78,10 @@ Set `error` on FormControl to propagate the error state to all child components.
|
|
|
78
78
|
|
|
79
79
|
```tsx
|
|
80
80
|
<FormControl error>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</FormControl>
|
|
81
|
+
<FormLabel>Email</FormLabel>
|
|
82
|
+
<Input placeholder="email@example.com" defaultValue="invalid-email" />
|
|
83
|
+
<FormHelperText>Please enter a valid email address.</FormHelperText>
|
|
84
|
+
</FormControl>
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
```tsx
|
|
@@ -98,10 +98,10 @@ Set `disabled` to disable all child form elements at once.
|
|
|
98
98
|
|
|
99
99
|
```tsx
|
|
100
100
|
<FormControl disabled>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</FormControl>
|
|
101
|
+
<FormLabel>Name</FormLabel>
|
|
102
|
+
<Input placeholder="Enter name" defaultValue="John Doe" />
|
|
103
|
+
<FormHelperText>This field is disabled.</FormHelperText>
|
|
104
|
+
</FormControl>
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
```tsx
|
|
@@ -118,10 +118,10 @@ Set `required` to add an asterisk (\*) to the label and mark the field as requir
|
|
|
118
118
|
|
|
119
119
|
```tsx
|
|
120
120
|
<FormControl required>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
</FormControl>
|
|
121
|
+
<FormLabel>Full Name</FormLabel>
|
|
122
|
+
<Input placeholder="Enter your full name" />
|
|
123
|
+
<FormHelperText>This field is required.</FormHelperText>
|
|
124
|
+
</FormControl>
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
```tsx
|
|
@@ -137,19 +137,19 @@ FormControl supports `sm`, `md`, and `lg` sizes. The size is inherited by child
|
|
|
137
137
|
|
|
138
138
|
```tsx
|
|
139
139
|
<Stack gap={3}>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
</Stack>
|
|
140
|
+
<FormControl size="sm">
|
|
141
|
+
<FormLabel>Small</FormLabel>
|
|
142
|
+
<Input placeholder="Small input" />
|
|
143
|
+
</FormControl>
|
|
144
|
+
<FormControl size="md">
|
|
145
|
+
<FormLabel>Medium</FormLabel>
|
|
146
|
+
<Input placeholder="Medium input" />
|
|
147
|
+
</FormControl>
|
|
148
|
+
<FormControl size="lg">
|
|
149
|
+
<FormLabel>Large</FormLabel>
|
|
150
|
+
<Input placeholder="Large input" />
|
|
151
|
+
</FormControl>
|
|
152
|
+
</Stack>
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
## Horizontal Layout
|
|
@@ -157,12 +157,15 @@ FormControl supports `sm`, `md`, and `lg` sizes. The size is inherited by child
|
|
|
157
157
|
Use `orientation="horizontal"` for inline form controls, such as Switch or Checkbox toggles.
|
|
158
158
|
|
|
159
159
|
```tsx
|
|
160
|
-
<FormControl
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
<FormControl
|
|
161
|
+
orientation="horizontal"
|
|
162
|
+
sx={{
|
|
163
|
+
gap: 2
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
166
|
+
<FormLabel>Subscribe</FormLabel>
|
|
167
|
+
<Switch />
|
|
168
|
+
</FormControl>
|
|
166
169
|
```
|
|
167
170
|
|
|
168
171
|
```tsx
|
|
@@ -177,28 +180,31 @@ Use `orientation="horizontal"` for inline form controls, such as Switch or Check
|
|
|
177
180
|
A complete form demonstrating FormControl with multiple input types.
|
|
178
181
|
|
|
179
182
|
```tsx
|
|
180
|
-
<Stack
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
</
|
|
201
|
-
|
|
183
|
+
<Stack
|
|
184
|
+
gap={2}
|
|
185
|
+
sx={{
|
|
186
|
+
maxWidth: 400
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
<FormControl required>
|
|
190
|
+
<FormLabel>Name</FormLabel>
|
|
191
|
+
<Input placeholder="Enter your name" />
|
|
192
|
+
</FormControl>
|
|
193
|
+
<FormControl required>
|
|
194
|
+
<FormLabel>Email</FormLabel>
|
|
195
|
+
<Input type="email" placeholder="email@example.com" />
|
|
196
|
+
<FormHelperText>We will never share your email.</FormHelperText>
|
|
197
|
+
</FormControl>
|
|
198
|
+
<FormControl>
|
|
199
|
+
<FormLabel>Role</FormLabel>
|
|
200
|
+
<Select placeholder="Select a role" options={roleOptions} />
|
|
201
|
+
</FormControl>
|
|
202
|
+
<FormControl>
|
|
203
|
+
<FormLabel>Bio</FormLabel>
|
|
204
|
+
<Textarea placeholder="Tell us about yourself…" minRows={3} />
|
|
205
|
+
<FormHelperText>Maximum 500 characters.</FormHelperText>
|
|
206
|
+
</FormControl>
|
|
207
|
+
</Stack>
|
|
202
208
|
```
|
|
203
209
|
|
|
204
210
|
## FormLabel
|