@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
@@ -42,16 +42,23 @@ function MyComponent() {
42
42
  A simple radio list with three options and a default selection.
43
43
 
44
44
  ```tsx
45
- <RadioList items={[{
46
- label: 'Small',
47
- value: 'sm'
48
- }, {
49
- label: 'Medium',
50
- value: 'md'
51
- }, {
52
- label: 'Large',
53
- value: 'lg'
54
- }]} defaultValue="md" />
45
+ <RadioList
46
+ items={[
47
+ {
48
+ label: "Small",
49
+ value: "sm"
50
+ },
51
+ {
52
+ label: "Medium",
53
+ value: "md"
54
+ },
55
+ {
56
+ label: "Large",
57
+ value: "lg"
58
+ }
59
+ ]}
60
+ defaultValue="md"
61
+ />
55
62
  ```
56
63
 
57
64
  ## Controlled
@@ -60,21 +67,19 @@ Use `value` and `onChange` for controlled state management.
60
67
 
61
68
  ```tsx
62
69
  <Stack gap={2}>
63
- <Typography level="body-sm">Selected: {value}</Typography>
64
- <RadioList items={defaultItems} value={value} onChange={e => setValue((e.target as HTMLInputElement).value)} />
65
- </Stack>
70
+ <Typography level="body-sm">Selected: {value}</Typography>
71
+ <RadioList
72
+ items={defaultItems}
73
+ value={value}
74
+ onChange={(e) => setValue((e.target as HTMLInputElement).value)}
75
+ />
76
+ </Stack>
66
77
  ```
67
78
 
68
79
  ```tsx
69
80
  function ControlledExample() {
70
81
  const [value, setValue] = React.useState('option1');
71
- return (
72
- <RadioList
73
- items={items}
74
- value={value}
75
- onChange={(e) => setValue((e.target as HTMLInputElement).value)}
76
- />
77
- );
82
+ return <RadioList items={items} value={value} onChange={(e) => setValue((e.target as HTMLInputElement).value)} />;
78
83
  }
79
84
  ```
80
85
 
@@ -103,11 +108,7 @@ Set `orientation="horizontal"` to display options in a row.
103
108
  ```
104
109
 
105
110
  ```tsx
106
- <RadioList
107
- items={items}
108
- defaultValue="option1"
109
- orientation="horizontal"
110
- />
111
+ <RadioList items={items} defaultValue="option1" orientation="horizontal" />
111
112
  ```
112
113
 
113
114
  ## Sizes
@@ -116,25 +117,40 @@ RadioList supports `sm`, `md` (default), and `lg` sizes. The size is applied to
116
117
 
117
118
  ```tsx
118
119
  <Stack gap={3}>
119
- <Box>
120
- <Typography level="body-sm" sx={{
121
- mb: 1
122
- }}>Small</Typography>
123
- <RadioList items={defaultItems} defaultValue="option1" size="sm" />
124
- </Box>
125
- <Box>
126
- <Typography level="body-sm" sx={{
127
- mb: 1
128
- }}>Medium</Typography>
129
- <RadioList items={defaultItems} defaultValue="option1" size="md" />
130
- </Box>
131
- <Box>
132
- <Typography level="body-sm" sx={{
133
- mb: 1
134
- }}>Large</Typography>
135
- <RadioList items={defaultItems} defaultValue="option1" size="lg" />
136
- </Box>
137
- </Stack>
120
+ <Box>
121
+ <Typography
122
+ level="body-sm"
123
+ sx={{
124
+ mb: 1
125
+ }}
126
+ >
127
+ Small
128
+ </Typography>
129
+ <RadioList items={defaultItems} defaultValue="option1" size="sm" />
130
+ </Box>
131
+ <Box>
132
+ <Typography
133
+ level="body-sm"
134
+ sx={{
135
+ mb: 1
136
+ }}
137
+ >
138
+ Medium
139
+ </Typography>
140
+ <RadioList items={defaultItems} defaultValue="option1" size="md" />
141
+ </Box>
142
+ <Box>
143
+ <Typography
144
+ level="body-sm"
145
+ sx={{
146
+ mb: 1
147
+ }}
148
+ >
149
+ Large
150
+ </Typography>
151
+ <RadioList items={defaultItems} defaultValue="option1" size="lg" />
152
+ </Box>
153
+ </Stack>
138
154
  ```
139
155
 
140
156
  ## Colors
@@ -143,12 +159,12 @@ Five semantic colors are available via the `color` prop.
143
159
 
144
160
  ```tsx
145
161
  <Stack gap={3}>
146
- <RadioList items={defaultItems} defaultValue="option1" color="primary" />
147
- <RadioList items={defaultItems} defaultValue="option1" color="neutral" />
148
- <RadioList items={defaultItems} defaultValue="option1" color="danger" />
149
- <RadioList items={defaultItems} defaultValue="option1" color="success" />
150
- <RadioList items={defaultItems} defaultValue="option1" color="warning" />
151
- </Stack>
162
+ <RadioList items={defaultItems} defaultValue="option1" color="primary" />
163
+ <RadioList items={defaultItems} defaultValue="option1" color="neutral" />
164
+ <RadioList items={defaultItems} defaultValue="option1" color="danger" />
165
+ <RadioList items={defaultItems} defaultValue="option1" color="success" />
166
+ <RadioList items={defaultItems} defaultValue="option1" color="warning" />
167
+ </Stack>
152
168
  ```
153
169
 
154
170
  ## Settings Selection
@@ -118,17 +118,32 @@ Use the `columns` prop to arrange tiles in a specific number of columns using a
118
118
  Combine `flex` and `columns` to create a grid where each tile stretches to fill its column width evenly.
119
119
 
120
120
  ```tsx
121
- <Box sx={{
122
- width: '100%',
123
- maxWidth: 700
124
- }}>
125
- <Typography level="body-md" sx={{
126
- mb: 2
127
- }}>
128
- Flex with Columns
129
- </Typography>
130
- <RadioTileGroup options={optionsWithIcons} onChange={handleChange} value={selectedValue} flex={true} columns={3} size="md" useIndicator={true} label="Flex with Columns Example" helperText="Items stretch to fill available space and are arranged in 3 columns" />
131
- </Box>
121
+ <Box
122
+ sx={{
123
+ width: "100%",
124
+ maxWidth: 700
125
+ }}
126
+ >
127
+ <Typography
128
+ level="body-md"
129
+ sx={{
130
+ mb: 2
131
+ }}
132
+ >
133
+ Flex with Columns
134
+ </Typography>
135
+ <RadioTileGroup
136
+ options={optionsWithIcons}
137
+ onChange={handleChange}
138
+ value={selectedValue}
139
+ flex={true}
140
+ columns={3}
141
+ size="md"
142
+ useIndicator={true}
143
+ label="Flex with Columns Example"
144
+ helperText="Items stretch to fill available space and are arranged in 3 columns"
145
+ />
146
+ </Box>
132
147
  ```
133
148
 
134
149
  ### Vertical Layout
@@ -136,17 +151,31 @@ Flex with Columns
136
151
  Set `columns={1}` to stack tiles vertically. This layout is well-suited for list-style selections like pricing plans or step-by-step options.
137
152
 
138
153
  ```tsx
139
- <Box sx={{
140
- width: '100%',
141
- maxWidth: 400
142
- }}>
143
- <Typography level="body-md" sx={{
144
- mb: 2
145
- }}>
146
- Vertical Layout (columns: 1)
147
- </Typography>
148
- <RadioTileGroup options={pricingOptions} onChange={handleChange} value={selectedValue} columns={1} size="md" useIndicator={true} label="Subscription Plans" helperText="Select your preferred subscription plan" />
149
- </Box>
154
+ <Box
155
+ sx={{
156
+ width: "100%",
157
+ maxWidth: 400
158
+ }}
159
+ >
160
+ <Typography
161
+ level="body-md"
162
+ sx={{
163
+ mb: 2
164
+ }}
165
+ >
166
+ Vertical Layout (columns: 1)
167
+ </Typography>
168
+ <RadioTileGroup
169
+ options={pricingOptions}
170
+ onChange={handleChange}
171
+ value={selectedValue}
172
+ columns={1}
173
+ size="md"
174
+ useIndicator={true}
175
+ label="Subscription Plans"
176
+ helperText="Select your preferred subscription plan"
177
+ />
178
+ </Box>
150
179
  ```
151
180
 
152
181
  ## Text Alignment
@@ -154,30 +183,38 @@ Vertical Layout (columns: 1)
154
183
  The `textAlign` prop controls the alignment of content inside each tile. The default is `center`. Set it to `start` for left-aligned content.
155
184
 
156
185
  ```tsx
157
- <Box sx={{
158
- display: 'flex',
159
- flexDirection: 'column',
160
- gap: 4,
161
- width: '100%',
162
- maxWidth: 700
163
- }}>
164
- <Box>
165
- <Typography level="body-md" sx={{
166
- mb: 2
167
- }}>
168
- Center Alignment (default)
169
- </Typography>
170
- <RadioTileGroup options={simpleOptions} textAlign="center" useIndicator={true} />
171
- </Box>
172
- <Box>
173
- <Typography level="body-md" sx={{
174
- mb: 2
175
- }}>
176
- Start Alignment
177
- </Typography>
178
- <RadioTileGroup options={simpleOptions} textAlign="start" useIndicator={true} />
179
- </Box>
180
- </Box>
186
+ <Box
187
+ sx={{
188
+ display: "flex",
189
+ flexDirection: "column",
190
+ gap: 4,
191
+ width: "100%",
192
+ maxWidth: 700
193
+ }}
194
+ >
195
+ <Box>
196
+ <Typography
197
+ level="body-md"
198
+ sx={{
199
+ mb: 2
200
+ }}
201
+ >
202
+ Center Alignment (default)
203
+ </Typography>
204
+ <RadioTileGroup options={simpleOptions} textAlign="center" useIndicator={true} />
205
+ </Box>
206
+ <Box>
207
+ <Typography
208
+ level="body-md"
209
+ sx={{
210
+ mb: 2
211
+ }}
212
+ >
213
+ Start Alignment
214
+ </Typography>
215
+ <RadioTileGroup options={simpleOptions} textAlign="start" useIndicator={true} />
216
+ </Box>
217
+ </Box>
181
218
  ```
182
219
 
183
220
  ## Sizes
@@ -185,38 +222,49 @@ The `textAlign` prop controls the alignment of content inside each tile. The def
185
222
  RadioTileGroup supports three sizes: `sm` (default), `md`, and `lg`. Choose the size that best fits the density of your layout.
186
223
 
187
224
  ```tsx
188
- <Box sx={{
189
- display: 'flex',
190
- flexDirection: 'column',
191
- gap: 4,
192
- width: '100%',
193
- maxWidth: 700
194
- }}>
195
- <Box>
196
- <Typography level="body-md" sx={{
197
- mb: 2
198
- }}>
199
- Size: sm (default)
200
- </Typography>
201
- <RadioTileGroup options={simpleOptions} size="sm" useIndicator={true} />
202
- </Box>
203
- <Box>
204
- <Typography level="body-md" sx={{
205
- mb: 2
206
- }}>
207
- Size: md
208
- </Typography>
209
- <RadioTileGroup options={simpleOptions} size="md" useIndicator={true} />
210
- </Box>
211
- <Box>
212
- <Typography level="body-md" sx={{
213
- mb: 2
214
- }}>
215
- Size: lg
216
- </Typography>
217
- <RadioTileGroup options={simpleOptions} size="lg" useIndicator={true} />
218
- </Box>
219
- </Box>
225
+ <Box
226
+ sx={{
227
+ display: "flex",
228
+ flexDirection: "column",
229
+ gap: 4,
230
+ width: "100%",
231
+ maxWidth: 700
232
+ }}
233
+ >
234
+ <Box>
235
+ <Typography
236
+ level="body-md"
237
+ sx={{
238
+ mb: 2
239
+ }}
240
+ >
241
+ Size: sm (default)
242
+ </Typography>
243
+ <RadioTileGroup options={simpleOptions} size="sm" useIndicator={true} />
244
+ </Box>
245
+ <Box>
246
+ <Typography
247
+ level="body-md"
248
+ sx={{
249
+ mb: 2
250
+ }}
251
+ >
252
+ Size: md
253
+ </Typography>
254
+ <RadioTileGroup options={simpleOptions} size="md" useIndicator={true} />
255
+ </Box>
256
+ <Box>
257
+ <Typography
258
+ level="body-md"
259
+ sx={{
260
+ mb: 2
261
+ }}
262
+ >
263
+ Size: lg
264
+ </Typography>
265
+ <RadioTileGroup options={simpleOptions} size="lg" useIndicator={true} />
266
+ </Box>
267
+ </Box>
220
268
  ```
221
269
 
222
270
  ## Icons
@@ -249,17 +297,22 @@ Add icons to tiles using the `startDecorator` property on each option. Icons hel
249
297
  Pass `value` and `onChange` to fully control the selected state from the parent component. This is recommended when the selection participates in form state or triggers side effects.
250
298
 
251
299
  ```tsx
252
- <Box sx={{
253
- width: '100%',
254
- maxWidth: 500
255
- }}>
256
- <Typography level="body-md" sx={{
257
- mb: 1
258
- }}>
259
- Selected value: {selectedValue}
260
- </Typography>
261
- <RadioTileGroup options={simpleOptions} value={selectedValue} onChange={handleChange} />
262
- </Box>
300
+ <Box
301
+ sx={{
302
+ width: "100%",
303
+ maxWidth: 500
304
+ }}
305
+ >
306
+ <Typography
307
+ level="body-md"
308
+ sx={{
309
+ mb: 1
310
+ }}
311
+ >
312
+ Selected value: {selectedValue}
313
+ </Typography>
314
+ <RadioTileGroup options={simpleOptions} value={selectedValue} onChange={handleChange} />
315
+ </Box>
263
316
  ```
264
317
 
265
318
  ### Uncontrolled
@@ -267,34 +320,56 @@ Selected value: {selectedValue}
267
320
  Use `defaultValue` to set an initial selection without managing state externally. The component tracks its own selection internally.
268
321
 
269
322
  ```tsx
270
- <Box sx={{
271
- display: 'flex',
272
- flexDirection: 'column',
273
- gap: 4
274
- }}>
275
- <Box sx={{
276
- width: '100%',
277
- maxWidth: 500
278
- }}>
279
- <Typography level="body-md" sx={{
280
- mb: 2
281
- }}>
282
- Uncontrolled Example (with Indicator)
283
- </Typography>
284
- <RadioTileGroup options={simpleOptions} defaultValue="option2" useIndicator={true} onChange={event => console.log(`Selected value: ${event.target.value}`)} />
285
- </Box>
286
- <Box sx={{
287
- width: '100%',
288
- maxWidth: 500
289
- }}>
290
- <Typography level="body-md" sx={{
291
- mb: 2
292
- }}>
293
- Uncontrolled Example (without Indicator)
294
- </Typography>
295
- <RadioTileGroup options={simpleOptions} defaultValue="option3" useIndicator={false} onChange={event => console.log(`Selected value: ${event.target.value}`)} />
296
- </Box>
297
- </Box>
323
+ <Box
324
+ sx={{
325
+ display: "flex",
326
+ flexDirection: "column",
327
+ gap: 4
328
+ }}
329
+ >
330
+ <Box
331
+ sx={{
332
+ width: "100%",
333
+ maxWidth: 500
334
+ }}
335
+ >
336
+ <Typography
337
+ level="body-md"
338
+ sx={{
339
+ mb: 2
340
+ }}
341
+ >
342
+ Uncontrolled Example (with Indicator)
343
+ </Typography>
344
+ <RadioTileGroup
345
+ options={simpleOptions}
346
+ defaultValue="option2"
347
+ useIndicator={true}
348
+ onChange={(event) => console.log(`Selected value: ${event.target.value}`)}
349
+ />
350
+ </Box>
351
+ <Box
352
+ sx={{
353
+ width: "100%",
354
+ maxWidth: 500
355
+ }}
356
+ >
357
+ <Typography
358
+ level="body-md"
359
+ sx={{
360
+ mb: 2
361
+ }}
362
+ >
363
+ Uncontrolled Example (without Indicator)
364
+ </Typography>
365
+ <RadioTileGroup
366
+ options={simpleOptions}
367
+ defaultValue="option3"
368
+ useIndicator={false}
369
+ onChange={(event) => console.log(`Selected value: ${event.target.value}`)}
370
+ />
371
+ </Box>
372
+ </Box>
298
373
  ```
299
374
 
300
375
  ## Disabled State
@@ -349,18 +424,32 @@ Use the `error` prop to indicate validation errors. Pair it with `helperText` to
349
424
  Combine `required`, `error`, and `helperText` to build a complete form validation flow. The example below validates that the user has made a selection before submitting.
350
425
 
351
426
  ```tsx
352
- <Stack spacing={2} sx={{
353
- width: '100%',
354
- maxWidth: 500
355
- }}>
356
- <RadioTileGroup options={simpleOptions} value={selectedValue} onChange={handleChange} label="Choose your preferred option" helperText={error ? 'Please select an option' : 'This selection is required'} error={error} useIndicator={true} required={true} />
357
- <Box sx={{
358
- display: 'flex',
359
- justifyContent: 'flex-end'
360
- }}>
361
- <Button onClick={handleSubmit}>Submit</Button>
362
- </Box>
363
- </Stack>
427
+ <Stack
428
+ spacing={2}
429
+ sx={{
430
+ width: "100%",
431
+ maxWidth: 500
432
+ }}
433
+ >
434
+ <RadioTileGroup
435
+ options={simpleOptions}
436
+ value={selectedValue}
437
+ onChange={handleChange}
438
+ label="Choose your preferred option"
439
+ helperText={error ? "Please select an option" : "This selection is required"}
440
+ error={error}
441
+ useIndicator={true}
442
+ required={true}
443
+ />
444
+ <Box
445
+ sx={{
446
+ display: "flex",
447
+ justifyContent: "flex-end"
448
+ }}
449
+ >
450
+ <Button onClick={handleSubmit}>Submit</Button>
451
+ </Box>
452
+ </Stack>
364
453
  ```
365
454
 
366
455
  ## Shipping Method Selection
@@ -385,28 +474,42 @@ import BusinessIcon from '@mui/icons-material/Business';
385
474
  onChange={(e) => setSelected(e.target.value)}
386
475
  size="md"
387
476
  useIndicator
388
- />
477
+ />;
389
478
  ```
390
479
 
391
480
  ```tsx
392
- <Box sx={{
393
- width: '100%',
394
- maxWidth: 700
395
- }}>
396
- <RadioTileGroup label="배송 방법 선택" helperText="배송 방법에 따라 배송비가 달라질 수 있습니다." options={[{
397
- value: 'standard',
398
- label: '일반 배송',
399
- startDecorator: <HomeIcon />
400
- }, {
401
- value: 'express',
402
- label: '빠른 배송',
403
- startDecorator: <LocalShippingIcon />
404
- }, {
405
- value: 'business',
406
- label: '기업 배송',
407
- startDecorator: <BusinessIcon />
408
- }]} onChange={handleChange} value={selectedValue} size="md" useIndicator={true} />
409
- </Box>
481
+ <Box
482
+ sx={{
483
+ width: "100%",
484
+ maxWidth: 700
485
+ }}
486
+ >
487
+ <RadioTileGroup
488
+ label="배송 방법 선택"
489
+ helperText="배송 방법에 따라 배송비가 달라질 수 있습니다."
490
+ options={[
491
+ {
492
+ value: "standard",
493
+ label: "일반 배송",
494
+ startDecorator: <HomeIcon />
495
+ },
496
+ {
497
+ value: "express",
498
+ label: "빠른 배송",
499
+ startDecorator: <LocalShippingIcon />
500
+ },
501
+ {
502
+ value: "business",
503
+ label: "기업 배송",
504
+ startDecorator: <BusinessIcon />
505
+ }
506
+ ]}
507
+ onChange={handleChange}
508
+ value={selectedValue}
509
+ size="md"
510
+ useIndicator={true}
511
+ />
512
+ </Box>
410
513
  ```
411
514
 
412
515
  ## Survey / Preference Selection
@@ -430,28 +533,42 @@ Present survey options with icons in a multi-column grid for a clear, scannable
430
533
  ```
431
534
 
432
535
  ```tsx
433
- <Box sx={{
434
- width: '100%',
435
- maxWidth: 700
436
- }}>
437
- <RadioTileGroup label="선호하는 운동 유형을 선택해주세요" options={[{
438
- value: 'cardio',
439
- label: '유산소 운동',
440
- startDecorator: <DirectionsRunIcon />
441
- }, {
442
- value: 'strength',
443
- label: '근력 운동',
444
- startDecorator: <FitnessCenterIcon />
445
- }, {
446
- value: 'flexibility',
447
- label: '유연성 운동',
448
- startDecorator: <SelfImprovementIcon />
449
- }, {
450
- value: 'balance',
451
- label: '균형 운동',
452
- startDecorator: <BalanceIcon />
453
- }]} onChange={handleChange} value={selectedValue} columns={2} size="md" />
454
- </Box>
536
+ <Box
537
+ sx={{
538
+ width: "100%",
539
+ maxWidth: 700
540
+ }}
541
+ >
542
+ <RadioTileGroup
543
+ label="선호하는 운동 유형을 선택해주세요"
544
+ options={[
545
+ {
546
+ value: "cardio",
547
+ label: "유산소 운동",
548
+ startDecorator: <DirectionsRunIcon />
549
+ },
550
+ {
551
+ value: "strength",
552
+ label: "근력 운동",
553
+ startDecorator: <FitnessCenterIcon />
554
+ },
555
+ {
556
+ value: "flexibility",
557
+ label: "유연성 운동",
558
+ startDecorator: <SelfImprovementIcon />
559
+ },
560
+ {
561
+ value: "balance",
562
+ label: "균형 운동",
563
+ startDecorator: <BalanceIcon />
564
+ }
565
+ ]}
566
+ onChange={handleChange}
567
+ value={selectedValue}
568
+ columns={2}
569
+ size="md"
570
+ />
571
+ </Box>
455
572
  ```
456
573
 
457
574
  ## Pricing Plan Picker