@ceed/ads 1.35.1 → 1.37.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.
Files changed (122) 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/FormControl/FormControl.d.ts +1 -0
  23. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  24. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  25. package/dist/components/Grid/Grid.d.ts +1 -0
  26. package/dist/components/IconButton/IconButton.d.ts +3 -2
  27. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  28. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  29. package/dist/components/Input/Input.d.ts +8 -22
  30. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  31. package/dist/components/Markdown/Markdown.d.ts +9 -24
  32. package/dist/components/Menu/Menu.d.ts +2 -1
  33. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  34. package/dist/components/Modal/Modal.d.ts +4 -2
  35. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  36. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  37. package/dist/components/Navigator/Navigator.d.ts +5 -4
  38. package/dist/components/Pagination/Pagination.d.ts +1 -1
  39. package/dist/components/ProfileMenu/ProfileMenu.d.ts +2 -2
  40. package/dist/components/Radio/Radio.d.ts +1 -0
  41. package/dist/components/RadioList/RadioList.d.ts +3 -2
  42. package/dist/components/Select/Select.d.ts +20 -10
  43. package/dist/components/Sheet/Sheet.d.ts +1 -0
  44. package/dist/components/Stack/Stack.d.ts +1 -0
  45. package/dist/components/Stepper/Stepper.d.ts +2 -1
  46. package/dist/components/Switch/Switch.d.ts +1 -0
  47. package/dist/components/Table/Table.d.ts +7 -5
  48. package/dist/components/Tabs/Tabs.d.ts +1 -0
  49. package/dist/components/Textarea/Textarea.d.ts +8 -20
  50. package/dist/components/ThemeProvider/ThemeProvider.d.ts +4 -2
  51. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  52. package/dist/components/Typography/Typography.d.ts +1 -0
  53. package/dist/components/Uploader/Uploader.d.ts +18 -17
  54. package/dist/components/data-display/Avatar.md +60 -72
  55. package/dist/components/data-display/Badge.md +197 -181
  56. package/dist/components/data-display/Chip.md +164 -142
  57. package/dist/components/data-display/DataTable.md +843 -338
  58. package/dist/components/data-display/InfoSign.md +1 -3
  59. package/dist/components/data-display/Markdown.md +93 -125
  60. package/dist/components/data-display/Table.md +1453 -1007
  61. package/dist/components/data-display/Typography.md +101 -104
  62. package/dist/components/feedback/Alert.md +80 -86
  63. package/dist/components/feedback/CircularProgress.md +32 -36
  64. package/dist/components/feedback/Dialog.md +25 -17
  65. package/dist/components/feedback/Modal.md +296 -265
  66. package/dist/components/feedback/Skeleton.md +125 -89
  67. package/dist/components/index.d.ts +60 -1
  68. package/dist/components/inputs/Autocomplete.md +191 -95
  69. package/dist/components/inputs/Button.md +83 -83
  70. package/dist/components/inputs/ButtonGroup.md +195 -185
  71. package/dist/components/inputs/Calendar.md +25 -28
  72. package/dist/components/inputs/Checkbox.md +11 -29
  73. package/dist/components/inputs/CurrencyInput.md +4 -4
  74. package/dist/components/inputs/DatePicker.md +229 -110
  75. package/dist/components/inputs/DateRangePicker.md +248 -137
  76. package/dist/components/inputs/FilterMenu.md +138 -8
  77. package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
  78. package/dist/components/inputs/FormControl.md +75 -69
  79. package/dist/components/inputs/IconButton.md +229 -205
  80. package/dist/components/inputs/Input.md +131 -98
  81. package/dist/components/inputs/MonthPicker.md +186 -84
  82. package/dist/components/inputs/MonthRangePicker.md +73 -49
  83. package/dist/components/inputs/PercentageInput.md +15 -31
  84. package/dist/components/inputs/RadioButton.md +320 -256
  85. package/dist/components/inputs/RadioList.md +66 -50
  86. package/dist/components/inputs/RadioTileGroup.md +287 -170
  87. package/dist/components/inputs/SearchBar.md +82 -60
  88. package/dist/components/inputs/Select.md +181 -115
  89. package/dist/components/inputs/Slider.md +153 -102
  90. package/dist/components/inputs/Switch.md +193 -138
  91. package/dist/components/inputs/Textarea.md +15 -20
  92. package/dist/components/inputs/Uploader/Uploader.md +68 -39
  93. package/dist/components/layout/Box.md +841 -662
  94. package/dist/components/layout/Container.md +3 -11
  95. package/dist/components/layout/Grid.md +480 -394
  96. package/dist/components/layout/Stack.md +739 -566
  97. package/dist/components/navigation/Breadcrumbs.md +182 -116
  98. package/dist/components/navigation/Dropdown.md +732 -391
  99. package/dist/components/navigation/IconMenuButton.md +14 -6
  100. package/dist/components/navigation/InsetDrawer.md +550 -378
  101. package/dist/components/navigation/Link.md +104 -94
  102. package/dist/components/navigation/Menu.md +623 -502
  103. package/dist/components/navigation/MenuButton.md +18 -10
  104. package/dist/components/navigation/NavigationGroup.md +19 -50
  105. package/dist/components/navigation/NavigationItem.md +6 -6
  106. package/dist/components/navigation/Navigator.md +26 -28
  107. package/dist/components/navigation/Pagination.md +86 -75
  108. package/dist/components/navigation/ProfileMenu.md +65 -43
  109. package/dist/components/navigation/Stepper.md +2 -12
  110. package/dist/components/navigation/Tabs.md +209 -183
  111. package/dist/components/surfaces/Accordions.md +89 -172
  112. package/dist/components/surfaces/Card.md +1094 -709
  113. package/dist/components/surfaces/Divider.md +562 -412
  114. package/dist/components/surfaces/Sheet.md +700 -518
  115. package/dist/guides/ThemeProvider.md +65 -40
  116. package/dist/index.browser.js +4 -4
  117. package/dist/index.browser.js.map +4 -4
  118. package/dist/index.cjs +1655 -1548
  119. package/dist/index.d.ts +1 -1
  120. package/dist/index.js +1314 -1199
  121. package/framer/index.js +1 -1
  122. package/package.json +32 -35
@@ -27,12 +27,7 @@ import { Switch } from '@ceed/ads';
27
27
  function MyComponent() {
28
28
  const [enabled, setEnabled] = useState(false);
29
29
 
30
- return (
31
- <Switch
32
- checked={enabled}
33
- onChange={(e) => setEnabled(e.target.checked)}
34
- />
35
- );
30
+ return <Switch checked={enabled} onChange={(e) => setEnabled(e.target.checked)} />;
36
31
  }
37
32
  ```
38
33
 
@@ -41,24 +36,38 @@ function MyComponent() {
41
36
  Use `FormControl` with `FormLabel` and `FormHelperText` to provide a label and description alongside the switch. The `orientation="horizontal"` layout places the label on the left and the switch on the right.
42
37
 
43
38
  ```tsx
44
- <FormControl orientation="horizontal" sx={{
45
- width: 300,
46
- justifyContent: 'space-between'
47
- }}>
48
- <div>
49
- <FormLabel>Show captions</FormLabel>
50
- <FormHelperText sx={{
51
- mt: 0
52
- }}>All languages available.</FormHelperText>
53
- </div>
54
- <Switch checked={checked} onChange={e => setChecked(e.target.checked)} color={checked ? 'success' : 'neutral'} variant={checked ? 'solid' : 'outlined'} endDecorator={checked ? 'On' : 'Off'} slotProps={{
55
- endDecorator: {
56
- sx: {
57
- minWidth: 24
58
- }
59
- }
60
- }} />
61
- </FormControl>
39
+ <FormControl
40
+ orientation="horizontal"
41
+ sx={{
42
+ width: 300,
43
+ justifyContent: "space-between"
44
+ }}
45
+ >
46
+ <div>
47
+ <FormLabel>Show captions</FormLabel>
48
+ <FormHelperText
49
+ sx={{
50
+ mt: 0
51
+ }}
52
+ >
53
+ All languages available.
54
+ </FormHelperText>
55
+ </div>
56
+ <Switch
57
+ checked={checked}
58
+ onChange={(e) => setChecked(e.target.checked)}
59
+ color={checked ? "success" : "neutral"}
60
+ variant={checked ? "solid" : "outlined"}
61
+ endDecorator={checked ? "On" : "Off"}
62
+ slotProps={{
63
+ endDecorator: {
64
+ sx: {
65
+ minWidth: 24
66
+ }
67
+ }
68
+ }}
69
+ />
70
+ </FormControl>
62
71
  ```
63
72
 
64
73
  ## Inline Labels
@@ -66,11 +75,18 @@ Use `FormControl` with `FormLabel` and `FormHelperText` to provide a label and d
66
75
  For simpler cases, wrap the switch inside a `Typography` component rendered as a `<label>`. This connects the text and switch semantically without requiring a `FormControl`.
67
76
 
68
77
  ```tsx
69
- <Typography component="label" endDecorator={<Switch sx={{
70
- ml: 1
71
- }} />}>
72
- Turn alarm on
73
- </Typography>
78
+ <Typography
79
+ component="label"
80
+ endDecorator={
81
+ <Switch
82
+ sx={{
83
+ ml: 1
84
+ }}
85
+ />
86
+ }
87
+ >
88
+ Turn alarm on
89
+ </Typography>
74
90
  ```
75
91
 
76
92
  ## With Decorators
@@ -78,15 +94,30 @@ Turn alarm on
78
94
  Use `startDecorator` and `endDecorator` to place icons or text around the switch. This is particularly useful for theme toggles or any context where visual cues reinforce the on/off meaning.
79
95
 
80
96
  ```tsx
81
- <Switch color={dark ? 'primary' : 'danger'} slotProps={{
82
- input: {
83
- 'aria-label': 'dark mode'
84
- }
85
- }} startDecorator={<LightModeIcon sx={theme => ({
86
- color: dark ? 'currentColor' : 'var(--ceed-palette-danger-solidBg)'
87
- })} />} endDecorator={<DarkModeIcon sx={theme => ({
88
- color: dark ? 'var(--ceed-palette-primary-solidBg)' : 'currentColor'
89
- })} />} checked={dark} onChange={event => setDark(event.target.checked)} />
97
+ <Switch
98
+ color={dark ? "primary" : "danger"}
99
+ slotProps={{
100
+ input: {
101
+ "aria-label": "dark mode"
102
+ }
103
+ }}
104
+ startDecorator={
105
+ <LightModeIcon
106
+ sx={(theme) => ({
107
+ color: dark ? "currentColor" : "var(--ceed-palette-danger-solidBg)"
108
+ })}
109
+ />
110
+ }
111
+ endDecorator={
112
+ <DarkModeIcon
113
+ sx={(theme) => ({
114
+ color: dark ? "var(--ceed-palette-primary-solidBg)" : "currentColor"
115
+ })}
116
+ />
117
+ }
118
+ checked={dark}
119
+ onChange={(event) => setDark(event.target.checked)}
120
+ />
90
121
  ```
91
122
 
92
123
  ## Track Children
@@ -95,42 +126,62 @@ Display text or symbols inside the switch track using `slotProps.track.children`
95
126
 
96
127
  ```tsx
97
128
  <Stack direction="row" spacing={4}>
98
- <Switch {...args} slotProps={{
99
- track: {
100
- children: <React.Fragment>
101
- <Typography component="span" level="inherit" sx={{
102
- ml: '10px'
103
- }}>
104
- On
105
- </Typography>
106
- <Typography component="span" level="inherit" sx={{
107
- mr: '8px'
108
- }}>
109
- Off
110
- </Typography>
111
- </React.Fragment>
112
- }
113
- }} sx={{
114
- '--Switch-thumbSize': '27px',
115
- '--Switch-trackWidth': '64px',
116
- '--Switch-trackHeight': '31px'
117
- }} />
118
- <Switch color="success" slotProps={{
119
- track: {
120
- children: <React.Fragment>
121
- <span>I</span>
122
- <span>0</span>
123
- </React.Fragment>,
124
- sx: {
125
- justifyContent: 'space-around'
126
- }
127
- }
128
- }} sx={{
129
- '--Switch-thumbSize': '27px',
130
- '--Switch-trackWidth': '52px',
131
- '--Switch-trackHeight': '31px'
132
- }} />
133
- </Stack>
129
+ <Switch
130
+ {...args}
131
+ slotProps={{
132
+ track: {
133
+ children: (
134
+ <React.Fragment>
135
+ <Typography
136
+ component="span"
137
+ level="inherit"
138
+ sx={{
139
+ ml: "10px"
140
+ }}
141
+ >
142
+ On
143
+ </Typography>
144
+ <Typography
145
+ component="span"
146
+ level="inherit"
147
+ sx={{
148
+ mr: "8px"
149
+ }}
150
+ >
151
+ Off
152
+ </Typography>
153
+ </React.Fragment>
154
+ )
155
+ }
156
+ }}
157
+ sx={{
158
+ "--Switch-thumbSize": "27px",
159
+ "--Switch-trackWidth": "64px",
160
+ "--Switch-trackHeight": "31px"
161
+ }}
162
+ />
163
+ <Switch
164
+ color="success"
165
+ slotProps={{
166
+ track: {
167
+ children: (
168
+ <React.Fragment>
169
+ <span>I</span>
170
+ <span>0</span>
171
+ </React.Fragment>
172
+ ),
173
+ sx: {
174
+ justifyContent: "space-around"
175
+ }
176
+ }
177
+ }}
178
+ sx={{
179
+ "--Switch-thumbSize": "27px",
180
+ "--Switch-trackWidth": "52px",
181
+ "--Switch-trackHeight": "31px"
182
+ }}
183
+ />
184
+ </Stack>
134
185
  ```
135
186
 
136
187
  ## Thumb Children
@@ -138,16 +189,20 @@ Display text or symbols inside the switch track using `slotProps.track.children`
138
189
  Place an icon inside the switch thumb using `slotProps.thumb.children`. This is useful for adding a small visual indicator that moves with the toggle.
139
190
 
140
191
  ```tsx
141
- <Switch size="lg" slotProps={{
142
- input: {
143
- 'aria-label': 'Dark mode'
144
- },
145
- thumb: {
146
- children: <DarkModeIcon fontSize="inherit" />
147
- }
148
- }} sx={{
149
- '--Switch-thumbSize': '16px'
150
- }} />
192
+ <Switch
193
+ size="lg"
194
+ slotProps={{
195
+ input: {
196
+ "aria-label": "Dark mode"
197
+ },
198
+ thumb: {
199
+ children: <DarkModeIcon fontSize="inherit" />
200
+ }
201
+ }}
202
+ sx={{
203
+ "--Switch-thumbSize": "16px"
204
+ }}
205
+ />
151
206
  ```
152
207
 
153
208
  ## All Variants Overview
@@ -156,38 +211,54 @@ A comprehensive view of all color and decoration combinations.
156
211
 
157
212
  ```tsx
158
213
  <Stack direction="row" spacing={4}>
159
- {([undefined, 'primary', 'warning', 'success', 'danger', 'neutral'] as const).map(color => <Stack key={color} spacing={2}>
160
- <Switch color={color} />
161
- <Switch color={color} checked />
162
- <Switch color={color} startDecorator={<LightModeIcon />} endDecorator={<DarkModeIcon />} />
163
- <Switch color={color} slotProps={{
164
- input: {
165
- 'aria-label': 'Dark mode'
166
- },
167
- thumb: {
168
- children: <DarkModeIcon fontSize="inherit" />
169
- },
170
- track: {
171
- children: <React.Fragment>
172
- <span>I</span>
173
- <span>0</span>
174
- </React.Fragment>,
175
- sx: {
176
- justifyContent: 'space-around'
177
- }
178
- }
179
- }} sx={{
180
- '--Switch-thumbSize': '27px',
181
- '--Switch-trackWidth': '52px',
182
- '--Switch-trackHeight': '31px'
183
- }} />
184
- <Typography component="label" startDecorator={<Switch sx={{
185
- ml: 1
186
- }} color={color} />}>
187
- Label
188
- </Typography>
189
- </Stack>)}
190
- </Stack>
214
+ {([undefined, "primary", "warning", "success", "danger", "neutral"] as const).map((color) => (
215
+ <Stack key={color} spacing={2}>
216
+ <Switch color={color} />
217
+ <Switch color={color} checked />
218
+ <Switch color={color} startDecorator={<LightModeIcon />} endDecorator={<DarkModeIcon />} />
219
+ <Switch
220
+ color={color}
221
+ slotProps={{
222
+ input: {
223
+ "aria-label": "Dark mode"
224
+ },
225
+ thumb: {
226
+ children: <DarkModeIcon fontSize="inherit" />
227
+ },
228
+ track: {
229
+ children: (
230
+ <React.Fragment>
231
+ <span>I</span>
232
+ <span>0</span>
233
+ </React.Fragment>
234
+ ),
235
+ sx: {
236
+ justifyContent: "space-around"
237
+ }
238
+ }
239
+ }}
240
+ sx={{
241
+ "--Switch-thumbSize": "27px",
242
+ "--Switch-trackWidth": "52px",
243
+ "--Switch-trackHeight": "31px"
244
+ }}
245
+ />
246
+ <Typography
247
+ component="label"
248
+ startDecorator={
249
+ <Switch
250
+ sx={{
251
+ ml: 1
252
+ }}
253
+ color={color}
254
+ />
255
+ }
256
+ >
257
+ Label
258
+ </Typography>
259
+ </Stack>
260
+ ))}
261
+ </Stack>
191
262
  ```
192
263
 
193
264
  ## Settings Panel
@@ -199,15 +270,10 @@ function SettingsPanel() {
199
270
 
200
271
  return (
201
272
  <Stack spacing={3}>
202
- <FormControl
203
- orientation="horizontal"
204
- sx={{ width: 400, justifyContent: 'space-between' }}
205
- >
273
+ <FormControl orientation="horizontal" sx={{ width: 400, justifyContent: 'space-between' }}>
206
274
  <div>
207
275
  <FormLabel>Notifications</FormLabel>
208
- <FormHelperText sx={{ mt: 0 }}>
209
- Receive alerts when new messages arrive.
210
- </FormHelperText>
276
+ <FormHelperText sx={{ mt: 0 }}>Receive alerts when new messages arrive.</FormHelperText>
211
277
  </div>
212
278
  <Switch
213
279
  checked={notifications}
@@ -216,20 +282,12 @@ function SettingsPanel() {
216
282
  />
217
283
  </FormControl>
218
284
 
219
- <FormControl
220
- orientation="horizontal"
221
- sx={{ width: 400, justifyContent: 'space-between' }}
222
- >
285
+ <FormControl orientation="horizontal" sx={{ width: 400, justifyContent: 'space-between' }}>
223
286
  <div>
224
287
  <FormLabel>Auto Save</FormLabel>
225
- <FormHelperText sx={{ mt: 0 }}>
226
- Automatically save your work every 30 seconds.
227
- </FormHelperText>
288
+ <FormHelperText sx={{ mt: 0 }}>Automatically save your work every 30 seconds.</FormHelperText>
228
289
  </div>
229
- <Switch
230
- checked={autoSave}
231
- onChange={(e) => setAutoSave(e.target.checked)}
232
- />
290
+ <Switch checked={autoSave} onChange={(e) => setAutoSave(e.target.checked)} />
233
291
  </FormControl>
234
292
  </Stack>
235
293
  );
@@ -264,10 +322,7 @@ function FeatureToggle() {
264
322
  const [betaEnabled, setBetaEnabled] = useState(false);
265
323
 
266
324
  return (
267
- <FormControl
268
- orientation="horizontal"
269
- sx={{ justifyContent: 'space-between' }}
270
- >
325
+ <FormControl orientation="horizontal" sx={{ justifyContent: 'space-between' }}>
271
326
  <FormLabel>Enable Beta Features</FormLabel>
272
327
  <Switch
273
328
  checked={betaEnabled}
@@ -56,11 +56,11 @@ Textarea supports four visual variants: `solid`, `soft`, `outlined`, and `plain`
56
56
 
57
57
  ```tsx
58
58
  <>
59
- <Textarea name="Solid" placeholder="Type in here…" variant="solid" />
60
- <Textarea name="Soft" placeholder="Type in here…" variant="soft" />
61
- <Textarea name="Outlined" placeholder="Type in here…" variant="outlined" />
62
- <Textarea name="Plain" placeholder="Type in here…" variant="plain" />
63
- </>
59
+ <Textarea name="Solid" placeholder="Type in here…" variant="solid" />
60
+ <Textarea name="Soft" placeholder="Type in here…" variant="soft" />
61
+ <Textarea name="Outlined" placeholder="Type in here…" variant="outlined" />
62
+ <Textarea name="Plain" placeholder="Type in here…" variant="plain" />
63
+ </>
64
64
  ```
65
65
 
66
66
  ```tsx
@@ -76,10 +76,10 @@ Textarea comes in three sizes: `sm`, `md`, and `lg`. The default size is `md`.
76
76
 
77
77
  ```tsx
78
78
  <>
79
- <Textarea size="sm" name="Size" placeholder="Small" />
80
- <Textarea size="md" name="Size" placeholder="Medium" />
81
- <Textarea size="lg" name="Size" placeholder="Large" />
82
- </>
79
+ <Textarea size="sm" name="Size" placeholder="Small" />
80
+ <Textarea size="md" name="Size" placeholder="Medium" />
81
+ <Textarea size="lg" name="Size" placeholder="Large" />
82
+ </>
83
83
  ```
84
84
 
85
85
  ```tsx
@@ -94,11 +94,11 @@ Textarea supports semantic colors via the `color` prop: `primary`, `neutral`, `d
94
94
 
95
95
  ```tsx
96
96
  <>
97
- <Textarea name="Primary" placeholder="Type in here…" variant="outlined" color="primary" />
98
- <Textarea name="Neutral" placeholder="Type in here…" variant="outlined" color="neutral" />
99
- <Textarea name="Danger" placeholder="Type in here…" variant="outlined" color="danger" />
100
- <Textarea name="Warning" placeholder="Type in here…" variant="outlined" color="warning" />
101
- </>
97
+ <Textarea name="Primary" placeholder="Type in here…" variant="outlined" color="primary" />
98
+ <Textarea name="Neutral" placeholder="Type in here…" variant="outlined" color="neutral" />
99
+ <Textarea name="Danger" placeholder="Type in here…" variant="outlined" color="danger" />
100
+ <Textarea name="Warning" placeholder="Type in here…" variant="outlined" color="warning" />
101
+ </>
102
102
  ```
103
103
 
104
104
  ```tsx
@@ -123,12 +123,7 @@ Use the `required`, `label`, and `helperText` props together to build complete f
123
123
  ```
124
124
 
125
125
  ```tsx
126
- <Textarea
127
- label="Label"
128
- helperText="I'm helper text"
129
- placeholder="Type in here..."
130
- required
131
- />
126
+ <Textarea label="Label" helperText="I'm helper text" placeholder="Type in here..." required />
132
127
  ```
133
128
 
134
129
  ## Feedback Form
@@ -75,15 +75,15 @@ Two sizes are available: `sm` and `md`. Use the smaller size for compact form la
75
75
 
76
76
  ```tsx
77
77
  <Stack gap={4}>
78
- <Stack gap={2}>
79
- <Typography level="title-sm">SM</Typography>
80
- <Uploader {...args} size="sm" />
78
+ <Stack gap={2}>
79
+ <Typography level="title-sm">SM</Typography>
80
+ <Uploader {...args} size="sm" />
81
+ </Stack>
82
+ <Stack gap={2}>
83
+ <Typography level="title-sm">MD</Typography>
84
+ <Uploader {...args} size="md" />
85
+ </Stack>
81
86
  </Stack>
82
- <Stack gap={2}>
83
- <Typography level="title-sm">MD</Typography>
84
- <Uploader {...args} size="md" />
85
- </Stack>
86
- </Stack>
87
87
  ```
88
88
 
89
89
  ## File Type Restriction (Accepts)
@@ -103,16 +103,18 @@ The `minCount` prop sets a minimum number of required files. Validation triggers
103
103
 
104
104
  ```tsx
105
105
  <>
106
- <form onSubmit={e => {
107
- e.preventDefault();
108
- console.log('Submitted');
109
- }}>
110
- <Stack gap={2}>
111
- <Uploader {...args} />
112
- <Button type="submit">Submit</Button>
113
- </Stack>
114
- </form>
115
- </>
106
+ <form
107
+ onSubmit={(e) => {
108
+ e.preventDefault();
109
+ console.log("Submitted");
110
+ }}
111
+ >
112
+ <Stack gap={2}>
113
+ <Uploader {...args} />
114
+ <Button type="submit">Submit</Button>
115
+ </Stack>
116
+ </form>
117
+ </>
116
118
  ```
117
119
 
118
120
  ## With Uploaded Files
@@ -184,15 +186,17 @@ Demonstrates automatic validation error messages for various rule violations (fi
184
186
 
185
187
  ```tsx
186
188
  <Stack gap={4}>
187
- <Stack gap={2}>
188
- <Typography level="title-sm">Try uploading files that violate validation rules:</Typography>
189
- <Typography level="body-sm">• Upload a file larger than 500KB (individual file size limit)</Typography>
190
- <Typography level="body-sm">• Upload multiple files exceeding 1MB total</Typography>
191
- <Typography level="body-sm">• Upload more than 2 files</Typography>
192
- <Typography level="body-sm">• Upload non-PNG/JPG files</Typography>
189
+ <Stack gap={2}>
190
+ <Typography level="title-sm">Try uploading files that violate validation rules:</Typography>
191
+ <Typography level="body-sm">
192
+ Upload a file larger than 500KB (individual file size limit)
193
+ </Typography>
194
+ <Typography level="body-sm">• Upload multiple files exceeding 1MB total</Typography>
195
+ <Typography level="body-sm">• Upload more than 2 files</Typography>
196
+ <Typography level="body-sm">• Upload non-PNG/JPG files</Typography>
197
+ </Stack>
198
+ <Uploader {...args} />
193
199
  </Stack>
194
- <Uploader {...args} />
195
- </Stack>
196
200
  ```
197
201
 
198
202
  ## Helper Text Variations
@@ -201,19 +205,40 @@ Comparison of auto-generated helper text, custom helper text, and error-state he
201
205
 
202
206
  ```tsx
203
207
  <Stack gap={4}>
204
- <Stack gap={2}>
205
- <Typography level="title-sm">Default Helper Text (Generated)</Typography>
206
- <Uploader {...args} label="Default helper text" accept=".png,.jpg,.pdf" maxFileTotalSize={5 * 1024 * 1024} maxCount={3} />
207
- </Stack>
208
- <Stack gap={2}>
209
- <Typography level="title-sm">Custom Helper Text</Typography>
210
- <Uploader {...args} label="Custom helper text" accept=".png,.jpg,.pdf" maxFileTotalSize={5 * 1024 * 1024} maxCount={3} helperText="Please upload your profile documents (PNG, JPG, or PDF only)" />
211
- </Stack>
212
- <Stack gap={2}>
213
- <Typography level="title-sm">Error State with Custom Helper Text</Typography>
214
- <Uploader {...args} label="Error state" accept=".png,.jpg,.pdf" maxFileTotalSize={5 * 1024 * 1024} maxCount={3} error={true} helperText="There was an error processing your files. Please try again." />
208
+ <Stack gap={2}>
209
+ <Typography level="title-sm">Default Helper Text (Generated)</Typography>
210
+ <Uploader
211
+ {...args}
212
+ label="Default helper text"
213
+ accept=".png,.jpg,.pdf"
214
+ maxFileTotalSize={5 * 1024 * 1024}
215
+ maxCount={3}
216
+ />
217
+ </Stack>
218
+ <Stack gap={2}>
219
+ <Typography level="title-sm">Custom Helper Text</Typography>
220
+ <Uploader
221
+ {...args}
222
+ label="Custom helper text"
223
+ accept=".png,.jpg,.pdf"
224
+ maxFileTotalSize={5 * 1024 * 1024}
225
+ maxCount={3}
226
+ helperText="Please upload your profile documents (PNG, JPG, or PDF only)"
227
+ />
228
+ </Stack>
229
+ <Stack gap={2}>
230
+ <Typography level="title-sm">Error State with Custom Helper Text</Typography>
231
+ <Uploader
232
+ {...args}
233
+ label="Error state"
234
+ accept=".png,.jpg,.pdf"
235
+ maxFileTotalSize={5 * 1024 * 1024}
236
+ maxCount={3}
237
+ error={true}
238
+ helperText="There was an error processing your files. Please try again."
239
+ />
240
+ </Stack>
215
241
  </Stack>
216
- </Stack>
217
242
  ```
218
243
 
219
244
  ## Disabled State
@@ -255,7 +280,11 @@ import { Uploader, Stack, Button } from '@ceed/ads';
255
280
 
256
281
  function DocumentForm() {
257
282
  return (
258
- <form onSubmit={(e) => { e.preventDefault(); }}>
283
+ <form
284
+ onSubmit={(e) => {
285
+ e.preventDefault();
286
+ }}
287
+ >
259
288
  <Stack gap={3}>
260
289
  <Uploader
261
290
  label="Supporting Documents"