@ceed/ads 1.35.1 → 1.37.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.
Files changed (124) hide show
  1. package/README.md +85 -95
  2. package/dist/components/Accordions/Accordions.d.ts +1 -0
  3. package/dist/components/Alert/Alert.d.ts +5 -5
  4. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/components/Avatar/Avatar.d.ts +7 -17
  6. package/dist/components/Box/Box.d.ts +1 -0
  7. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
  8. package/dist/components/Button/Button.d.ts +3 -2
  9. package/dist/components/Calendar/Calendar.d.ts +1 -0
  10. package/dist/components/Card/Card.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  12. package/dist/components/Chip/Chip.d.ts +1 -0
  13. package/dist/components/Container/Container.d.ts +6 -1
  14. package/dist/components/DialogActions/DialogActions.d.ts +1 -0
  15. package/dist/components/DialogContent/DialogContent.d.ts +1 -0
  16. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  17. package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
  18. package/dist/components/Divider/Divider.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +28 -1
  20. package/dist/components/FilterMenu/components/MonthRange.d.ts +11 -0
  21. package/dist/components/FilterMenu/types.d.ts +5 -1
  22. package/dist/components/FilterableCheckboxGroup/FilterableCheckboxGroup.d.ts +1 -1
  23. package/dist/components/FormControl/FormControl.d.ts +1 -0
  24. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  25. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  26. package/dist/components/Grid/Grid.d.ts +1 -0
  27. package/dist/components/IconButton/IconButton.d.ts +3 -2
  28. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  29. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  30. package/dist/components/Input/Input.d.ts +8 -22
  31. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  32. package/dist/components/Markdown/Markdown.d.ts +9 -24
  33. package/dist/components/Menu/Menu.d.ts +2 -1
  34. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  35. package/dist/components/Modal/Modal.d.ts +4 -2
  36. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  37. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  38. package/dist/components/Navigator/Navigator.d.ts +5 -4
  39. package/dist/components/Pagination/Pagination.d.ts +2 -2
  40. package/dist/components/ProfileMenu/ProfileMenu.d.ts +3 -3
  41. package/dist/components/Radio/Radio.d.ts +1 -0
  42. package/dist/components/RadioList/RadioList.d.ts +3 -2
  43. package/dist/components/Select/Select.d.ts +12 -10
  44. package/dist/components/Sheet/Sheet.d.ts +1 -0
  45. package/dist/components/Stack/Stack.d.ts +1 -0
  46. package/dist/components/Stepper/Stepper.d.ts +2 -1
  47. package/dist/components/Switch/Switch.d.ts +1 -0
  48. package/dist/components/Table/Table.d.ts +7 -5
  49. package/dist/components/Tabs/Tabs.d.ts +1 -0
  50. package/dist/components/Textarea/Textarea.d.ts +8 -20
  51. package/dist/components/ThemeProvider/ThemeProvider.d.ts +24 -2
  52. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  53. package/dist/components/Typography/Typography.d.ts +1 -0
  54. package/dist/components/Uploader/Uploader.d.ts +18 -17
  55. package/dist/components/data-display/Avatar.md +61 -73
  56. package/dist/components/data-display/Badge.md +198 -182
  57. package/dist/components/data-display/Chip.md +165 -143
  58. package/dist/components/data-display/DataTable.md +843 -338
  59. package/dist/components/data-display/InfoSign.md +1 -3
  60. package/dist/components/data-display/Markdown.md +93 -125
  61. package/dist/components/data-display/Table.md +1454 -1008
  62. package/dist/components/data-display/Tooltip.md +1 -1
  63. package/dist/components/data-display/Typography.md +101 -104
  64. package/dist/components/feedback/Alert.md +81 -87
  65. package/dist/components/feedback/CircularProgress.md +34 -38
  66. package/dist/components/feedback/Dialog.md +25 -17
  67. package/dist/components/feedback/Modal.md +297 -266
  68. package/dist/components/feedback/Skeleton.md +125 -89
  69. package/dist/components/index.d.ts +60 -1
  70. package/dist/components/inputs/Autocomplete.md +192 -96
  71. package/dist/components/inputs/Button.md +85 -85
  72. package/dist/components/inputs/ButtonGroup.md +197 -187
  73. package/dist/components/inputs/Calendar.md +25 -28
  74. package/dist/components/inputs/Checkbox.md +13 -31
  75. package/dist/components/inputs/CurrencyInput.md +6 -6
  76. package/dist/components/inputs/DatePicker.md +229 -110
  77. package/dist/components/inputs/DateRangePicker.md +248 -137
  78. package/dist/components/inputs/FilterMenu.md +138 -8
  79. package/dist/components/inputs/FilterableCheckboxGroup.md +116 -56
  80. package/dist/components/inputs/FormControl.md +76 -70
  81. package/dist/components/inputs/IconButton.md +231 -207
  82. package/dist/components/inputs/Input.md +133 -100
  83. package/dist/components/inputs/MonthPicker.md +186 -84
  84. package/dist/components/inputs/MonthRangePicker.md +73 -49
  85. package/dist/components/inputs/PercentageInput.md +17 -33
  86. package/dist/components/inputs/RadioButton.md +322 -258
  87. package/dist/components/inputs/RadioList.md +68 -52
  88. package/dist/components/inputs/RadioTileGroup.md +287 -170
  89. package/dist/components/inputs/SearchBar.md +82 -60
  90. package/dist/components/inputs/Select.md +108 -97
  91. package/dist/components/inputs/Slider.md +155 -104
  92. package/dist/components/inputs/Switch.md +194 -139
  93. package/dist/components/inputs/Textarea.md +17 -22
  94. package/dist/components/inputs/Uploader/Uploader.md +69 -40
  95. package/dist/components/layout/Box.md +841 -662
  96. package/dist/components/layout/Container.md +3 -11
  97. package/dist/components/layout/Grid.md +480 -394
  98. package/dist/components/layout/Stack.md +739 -566
  99. package/dist/components/navigation/Breadcrumbs.md +182 -116
  100. package/dist/components/navigation/Dropdown.md +732 -391
  101. package/dist/components/navigation/IconMenuButton.md +15 -7
  102. package/dist/components/navigation/InsetDrawer.md +550 -378
  103. package/dist/components/navigation/Link.md +104 -94
  104. package/dist/components/navigation/Menu.md +624 -503
  105. package/dist/components/navigation/MenuButton.md +19 -11
  106. package/dist/components/navigation/NavigationGroup.md +19 -50
  107. package/dist/components/navigation/NavigationItem.md +6 -6
  108. package/dist/components/navigation/Navigator.md +26 -28
  109. package/dist/components/navigation/Pagination.md +87 -76
  110. package/dist/components/navigation/ProfileMenu.md +67 -45
  111. package/dist/components/navigation/Stepper.md +2 -12
  112. package/dist/components/navigation/Tabs.md +210 -184
  113. package/dist/components/surfaces/Accordions.md +90 -173
  114. package/dist/components/surfaces/Card.md +1096 -711
  115. package/dist/components/surfaces/Divider.md +562 -412
  116. package/dist/components/surfaces/Sheet.md +700 -518
  117. package/dist/guides/ThemeProvider.md +65 -40
  118. package/dist/index.browser.js +5 -5
  119. package/dist/index.browser.js.map +4 -4
  120. package/dist/index.cjs +1906 -1690
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.js +1404 -1180
  123. package/framer/index.js +1 -1
  124. package/package.json +34 -36
@@ -63,10 +63,10 @@ Three sizes are available: `sm`, `md`, and `lg`. The size affects the search inp
63
63
 
64
64
  ```tsx
65
65
  <Stack spacing={3}>
66
- <FilterableCheckboxGroup {...args} size="lg" label="Large" />
67
- <FilterableCheckboxGroup {...args} size="md" label="Medium" />
68
- <FilterableCheckboxGroup {...args} size="sm" label="Small" />
69
- </Stack>
66
+ <FilterableCheckboxGroup {...args} size="lg" label="Large" />
67
+ <FilterableCheckboxGroup {...args} size="md" label="Medium" />
68
+ <FilterableCheckboxGroup {...args} size="sm" label="Small" />
69
+ </Stack>
70
70
  ```
71
71
 
72
72
  ## Label and Helper Text
@@ -116,9 +116,18 @@ Control the visible height of the options list with the `maxHeight` prop (defaul
116
116
 
117
117
  ```tsx
118
118
  <Stack spacing={3}>
119
- <FilterableCheckboxGroup label="Custom Height (150px)" placeholder="Search..." options={defaultOptions} maxHeight={150} />
120
- <FilterableCheckboxGroup label="Default Height (300px)" placeholder="Search..." options={defaultOptions} />
121
- </Stack>
119
+ <FilterableCheckboxGroup
120
+ label="Custom Height (150px)"
121
+ placeholder="Search..."
122
+ options={defaultOptions}
123
+ maxHeight={150}
124
+ />
125
+ <FilterableCheckboxGroup
126
+ label="Default Height (300px)"
127
+ placeholder="Search..."
128
+ options={defaultOptions}
129
+ />
130
+ </Stack>
122
131
  ```
123
132
 
124
133
  ## Long List with Virtual Scrolling
@@ -154,12 +163,20 @@ Pass `value` and `onChange` to manage the selection state externally. This is th
154
163
 
155
164
  ```tsx
156
165
  <Stack spacing={2}>
157
- <FilterableCheckboxGroup label="Select Fruits" placeholder="Search fruits..." options={defaultOptions} value={value} onChange={setValue} />
158
- <Typography level="body-sm">
159
- Selected:{' '}
160
- {value.length > 0 ? value.map(v => defaultOptions.find(o => o.value === v)?.label).join(', ') : 'None'}
161
- </Typography>
162
- </Stack>
166
+ <FilterableCheckboxGroup
167
+ label="Select Fruits"
168
+ placeholder="Search fruits..."
169
+ options={defaultOptions}
170
+ value={value}
171
+ onChange={setValue}
172
+ />
173
+ <Typography level="body-sm">
174
+ Selected:{" "}
175
+ {value.length > 0
176
+ ? value.map((v) => defaultOptions.find((o) => o.value === v)?.label).join(", ")
177
+ : "None"}
178
+ </Typography>
179
+ </Stack>
163
180
  ```
164
181
 
165
182
  ## Sorting Behavior
@@ -168,34 +185,56 @@ The component automatically sorts options on initial render: selected items appe
168
185
 
169
186
  ```tsx
170
187
  <Stack spacing={2}>
171
- <Stack direction="row" spacing={1}>
172
- <button type="button" onClick={() => {
173
- setOptions([...options, {
174
- value: `new-${Date.now()}`,
175
- label: `New Item ${options.length - 11}`
176
- }]);
177
- }} style={{
178
- padding: '4px 12px',
179
- cursor: 'pointer'
180
- }}>
181
- Add New Option
182
- </button>
183
- <button type="button" onClick={() => {
184
- setKey(prev => prev + 1);
185
- }} style={{
186
- padding: '4px 12px',
187
- cursor: 'pointer'
188
- }}>
189
- Force Re-render
190
- </button>
191
- </Stack>
192
- <FilterableCheckboxGroup key={key} label="Sorting Demo" placeholder="Search..." helperText="Click 'Add New Option' to test sorting when options change" options={options} value={value} onChange={setValue} />
193
- <Typography level="body-sm" sx={{
194
- whiteSpace: 'pre-line'
195
- }}>
196
- {`Selected: ${value.length > 0 ? value.join(', ') : 'None'}\n\nOptions count: ${options.length}\n\n- Add New Option: Add new item to test sorting when options change\n- Force Re-render: Remount component to test initial sorting\n\nAlphabet items (A-Z) appear first, then numbers (1-9).`}
197
- </Typography>
198
- </Stack>
188
+ <Stack direction="row" spacing={1}>
189
+ <button
190
+ type="button"
191
+ onClick={() => {
192
+ setOptions([
193
+ ...options,
194
+ {
195
+ value: `new-${Date.now()}`,
196
+ label: `New Item ${options.length - 11}`
197
+ }
198
+ ]);
199
+ }}
200
+ style={{
201
+ padding: "4px 12px",
202
+ cursor: "pointer"
203
+ }}
204
+ >
205
+ Add New Option
206
+ </button>
207
+ <button
208
+ type="button"
209
+ onClick={() => {
210
+ setKey((prev) => prev + 1);
211
+ }}
212
+ style={{
213
+ padding: "4px 12px",
214
+ cursor: "pointer"
215
+ }}
216
+ >
217
+ Force Re-render
218
+ </button>
219
+ </Stack>
220
+ <FilterableCheckboxGroup
221
+ key={key}
222
+ label="Sorting Demo"
223
+ placeholder="Search..."
224
+ helperText="Click 'Add New Option' to test sorting when options change"
225
+ options={options}
226
+ value={value}
227
+ onChange={setValue}
228
+ />
229
+ <Typography
230
+ level="body-sm"
231
+ sx={{
232
+ whiteSpace: "pre-line"
233
+ }}
234
+ >
235
+ {`Selected: ${value.length > 0 ? value.join(", ") : "None"}\n\nOptions count: ${options.length}\n\n- Add New Option: Add new item to test sorting when options change\n- Force Re-render: Remount component to test initial sorting\n\nAlphabet items (A-Z) appear first, then numbers (1-9).`}
236
+ </Typography>
237
+ </Stack>
199
238
  ```
200
239
 
201
240
  ## Disabled State
@@ -208,20 +247,41 @@ The component supports both full and partial disabling.
208
247
 
209
248
  ```tsx
210
249
  <Stack spacing={3}>
211
- <FilterableCheckboxGroup label="Entirely Disabled" placeholder="Search..." helperText="All inputs are disabled" options={defaultOptions.slice(0, 5)} disabled />
212
- <FilterableCheckboxGroup label="Partially Disabled Options" placeholder="Search..." helperText="Some options are disabled" options={disabledOptions} />
213
- <Stack spacing={2}>
214
- <FilterableCheckboxGroup label="Controlled + Partially Disabled" placeholder="Search..." helperText="Disabled options (Banana, Date) maintain their selected state" options={disabledOptions} value={controlledValue} onChange={setControlledValue} />
215
- <Typography level="body-sm">
216
- Selected: {controlledValue.length > 0 ? controlledValue.join(', ') : 'None'}
217
- </Typography>
218
- <Typography level="body-sm" sx={{
219
- color: 'text.secondary'
220
- }}>
221
- Try "Select all" - it will only affect enabled options (Apple, Cherry, Elderberry)
222
- </Typography>
223
- </Stack>
224
- </Stack>
250
+ <FilterableCheckboxGroup
251
+ label="Entirely Disabled"
252
+ placeholder="Search..."
253
+ helperText="All inputs are disabled"
254
+ options={defaultOptions.slice(0, 5)}
255
+ disabled
256
+ />
257
+ <FilterableCheckboxGroup
258
+ label="Partially Disabled Options"
259
+ placeholder="Search..."
260
+ helperText="Some options are disabled"
261
+ options={disabledOptions}
262
+ />
263
+ <Stack spacing={2}>
264
+ <FilterableCheckboxGroup
265
+ label="Controlled + Partially Disabled"
266
+ placeholder="Search..."
267
+ helperText="Disabled options (Banana, Date) maintain their selected state"
268
+ options={disabledOptions}
269
+ value={controlledValue}
270
+ onChange={setControlledValue}
271
+ />
272
+ <Typography level="body-sm">
273
+ Selected: {controlledValue.length > 0 ? controlledValue.join(", ") : "None"}
274
+ </Typography>
275
+ <Typography
276
+ level="body-sm"
277
+ sx={{
278
+ color: "text.secondary"
279
+ }}
280
+ >
281
+ Try "Select all" - it will only affect enabled options (Apple, Cherry, Elderberry)
282
+ </Typography>
283
+ </Stack>
284
+ </Stack>
225
285
  ```
226
286
 
227
287
  ## Filter Panel
@@ -322,7 +382,7 @@ When dealing with a large set of options like countries, the search filter and v
322
382
  | `placeholder` | `string` | - | Placeholder text for the search input |
323
383
  | `required` | `boolean` | `false` | Marks the field as required |
324
384
  | `disabled` | `boolean` | `false` | Disables all checkboxes |
325
- | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Component size |
385
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Component size |
326
386
  | `maxHeight` | `string \| number` | `300` | Maximum height of the options list before scrolling |
327
387
 
328
388
  ## Accessibility
@@ -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
- <FormLabel>Label</FormLabel>
10
- <Input placeholder="Enter text…" />
11
- <FormHelperText>This is helper text.</FormHelperText>
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
- <FormLabel>Username</FormLabel>
46
- <Input placeholder="Enter username" />
47
- <FormHelperText>Choose a unique username.</FormHelperText>
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
- <FormLabel>Description</FormLabel>
58
- <Textarea placeholder="Enter description…" minRows={3} />
59
- <FormHelperText>Provide a detailed description.</FormHelperText>
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
- <FormLabel>Role</FormLabel>
70
- <Select placeholder="Select a role" options={roleOptions} />
71
- <FormHelperText>Select the user role.</FormHelperText>
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
- <FormLabel>Email</FormLabel>
82
- <Input placeholder="email@example.com" defaultValue="invalid-email" />
83
- <FormHelperText>Please enter a valid email address.</FormHelperText>
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
- <FormLabel>Name</FormLabel>
102
- <Input placeholder="Enter name" defaultValue="John Doe" />
103
- <FormHelperText>This field is disabled.</FormHelperText>
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
- <FormLabel>Full Name</FormLabel>
122
- <Input placeholder="Enter your full name" />
123
- <FormHelperText>This field is required.</FormHelperText>
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
- <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>
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 orientation="horizontal" sx={{
161
- gap: 2
162
- }}>
163
- <FormLabel>Subscribe</FormLabel>
164
- <Switch />
165
- </FormControl>
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 gap={2} sx={{
181
- maxWidth: 400
182
- }}>
183
- <FormControl required>
184
- <FormLabel>Name</FormLabel>
185
- <Input placeholder="Enter your name" />
186
- </FormControl>
187
- <FormControl required>
188
- <FormLabel>Email</FormLabel>
189
- <Input type="email" placeholder="email@example.com" />
190
- <FormHelperText>We will never share your email.</FormHelperText>
191
- </FormControl>
192
- <FormControl>
193
- <FormLabel>Role</FormLabel>
194
- <Select placeholder="Select a role" options={roleOptions} />
195
- </FormControl>
196
- <FormControl>
197
- <FormLabel>Bio</FormLabel>
198
- <Textarea placeholder="Tell us about yourself…" minRows={3} />
199
- <FormHelperText>Maximum 500 characters.</FormHelperText>
200
- </FormControl>
201
- </Stack>
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
@@ -360,7 +366,7 @@ function SettingsForm() {
360
366
  | `error` | `boolean` | `false` | Applies error styling to child components |
361
367
  | `disabled` | `boolean` | `false` | Disables all child form elements |
362
368
  | `required` | `boolean` | `false` | Adds required indicator to FormLabel and `aria-required` to input |
363
- | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size applied to child components |
369
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Size applied to child components |
364
370
  | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
365
371
  | `orientation` | `'horizontal' \| 'vertical'` | `'vertical'` | Layout direction |
366
372
  | `sx` | `SxProps` | - | Custom styles using the MUI system |