@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.
Files changed (118) hide show
  1. package/dist/components/Accordions/Accordions.d.ts +1 -0
  2. package/dist/components/Alert/Alert.d.ts +5 -5
  3. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  4. package/dist/components/Avatar/Avatar.d.ts +7 -17
  5. package/dist/components/Box/Box.d.ts +1 -0
  6. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
  7. package/dist/components/Button/Button.d.ts +3 -2
  8. package/dist/components/Calendar/Calendar.d.ts +1 -0
  9. package/dist/components/Card/Card.d.ts +1 -0
  10. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  11. package/dist/components/Chip/Chip.d.ts +1 -0
  12. package/dist/components/Container/Container.d.ts +6 -1
  13. package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -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/Drawer/Drawer.d.ts +1 -0
  20. package/dist/components/Dropdown/Dropdown.d.ts +28 -1
  21. package/dist/components/FormControl/FormControl.d.ts +1 -0
  22. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  23. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  24. package/dist/components/Grid/Grid.d.ts +1 -0
  25. package/dist/components/IconButton/IconButton.d.ts +3 -2
  26. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  27. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  28. package/dist/components/Input/Input.d.ts +8 -22
  29. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  30. package/dist/components/Markdown/Markdown.d.ts +9 -24
  31. package/dist/components/Menu/Menu.d.ts +2 -1
  32. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  33. package/dist/components/Modal/Modal.d.ts +4 -2
  34. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  35. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  36. package/dist/components/Navigator/Navigator.d.ts +5 -4
  37. package/dist/components/Pagination/Pagination.d.ts +1 -1
  38. package/dist/components/Radio/Radio.d.ts +1 -0
  39. package/dist/components/RadioList/RadioList.d.ts +3 -2
  40. package/dist/components/Select/Select.d.ts +20 -10
  41. package/dist/components/Sheet/Sheet.d.ts +1 -0
  42. package/dist/components/Stack/Stack.d.ts +1 -0
  43. package/dist/components/Stepper/Stepper.d.ts +2 -1
  44. package/dist/components/Switch/Switch.d.ts +1 -0
  45. package/dist/components/Table/Table.d.ts +7 -5
  46. package/dist/components/Tabs/Tabs.d.ts +1 -0
  47. package/dist/components/Textarea/Textarea.d.ts +8 -20
  48. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  49. package/dist/components/Typography/Typography.d.ts +1 -0
  50. package/dist/components/Uploader/Uploader.d.ts +18 -17
  51. package/dist/components/data-display/Avatar.md +60 -72
  52. package/dist/components/data-display/Badge.md +197 -181
  53. package/dist/components/data-display/Chip.md +164 -142
  54. package/dist/components/data-display/DataTable.md +843 -338
  55. package/dist/components/data-display/InfoSign.md +1 -3
  56. package/dist/components/data-display/Markdown.md +93 -125
  57. package/dist/components/data-display/Table.md +1453 -1007
  58. package/dist/components/data-display/Typography.md +113 -116
  59. package/dist/components/feedback/Alert.md +80 -86
  60. package/dist/components/feedback/CircularProgress.md +32 -36
  61. package/dist/components/feedback/Dialog.md +25 -17
  62. package/dist/components/feedback/Modal.md +296 -264
  63. package/dist/components/feedback/Skeleton.md +125 -89
  64. package/dist/components/index.d.ts +62 -2
  65. package/dist/components/inputs/Autocomplete.md +191 -95
  66. package/dist/components/inputs/Button.md +83 -83
  67. package/dist/components/inputs/ButtonGroup.md +195 -185
  68. package/dist/components/inputs/Calendar.md +25 -28
  69. package/dist/components/inputs/Checkbox.md +11 -29
  70. package/dist/components/inputs/CurrencyInput.md +4 -4
  71. package/dist/components/inputs/DatePicker.md +229 -110
  72. package/dist/components/inputs/DateRangePicker.md +248 -137
  73. package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
  74. package/dist/components/inputs/FormControl.md +75 -69
  75. package/dist/components/inputs/IconButton.md +229 -205
  76. package/dist/components/inputs/Input.md +131 -98
  77. package/dist/components/inputs/MonthPicker.md +186 -84
  78. package/dist/components/inputs/MonthRangePicker.md +73 -49
  79. package/dist/components/inputs/PercentageInput.md +15 -31
  80. package/dist/components/inputs/RadioButton.md +320 -256
  81. package/dist/components/inputs/RadioList.md +66 -50
  82. package/dist/components/inputs/RadioTileGroup.md +287 -170
  83. package/dist/components/inputs/SearchBar.md +82 -60
  84. package/dist/components/inputs/Select.md +184 -120
  85. package/dist/components/inputs/Slider.md +153 -102
  86. package/dist/components/inputs/Switch.md +193 -138
  87. package/dist/components/inputs/Textarea.md +15 -20
  88. package/dist/components/inputs/Uploader/Uploader.md +68 -39
  89. package/dist/components/layout/Box.md +841 -662
  90. package/dist/components/layout/Container.md +3 -11
  91. package/dist/components/layout/Grid.md +480 -394
  92. package/dist/components/layout/Stack.md +739 -566
  93. package/dist/components/navigation/Breadcrumbs.md +4 -4
  94. package/dist/components/navigation/Drawer.md +34 -25
  95. package/dist/components/navigation/Dropdown.md +745 -408
  96. package/dist/components/navigation/IconMenuButton.md +14 -6
  97. package/dist/components/navigation/InsetDrawer.md +8 -13
  98. package/dist/components/navigation/Link.md +1 -2
  99. package/dist/components/navigation/Menu.md +623 -502
  100. package/dist/components/navigation/MenuButton.md +18 -10
  101. package/dist/components/navigation/NavigationGroup.md +19 -50
  102. package/dist/components/navigation/NavigationItem.md +6 -6
  103. package/dist/components/navigation/Navigator.md +26 -28
  104. package/dist/components/navigation/Pagination.md +86 -75
  105. package/dist/components/navigation/Stepper.md +2 -12
  106. package/dist/components/navigation/Tabs.md +48 -36
  107. package/dist/components/surfaces/Accordions.md +89 -172
  108. package/dist/components/surfaces/Card.md +1094 -709
  109. package/dist/components/surfaces/Divider.md +562 -412
  110. package/dist/components/surfaces/Sheet.md +700 -518
  111. package/dist/guides/ThemeProvider.md +8 -8
  112. package/dist/index.browser.js +4 -4
  113. package/dist/index.browser.js.map +4 -4
  114. package/dist/index.cjs +1074 -1033
  115. package/dist/index.d.ts +2 -1
  116. package/dist/index.js +720 -671
  117. package/framer/index.js +1 -1
  118. 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
  ## Common Use Cases
@@ -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
  ## Common Use Cases
@@ -387,28 +476,42 @@ import BusinessIcon from '@mui/icons-material/Business';
387
476
  onChange={(e) => setSelected(e.target.value)}
388
477
  size="md"
389
478
  useIndicator
390
- />
479
+ />;
391
480
  ```
392
481
 
393
482
  ```tsx
394
- <Box sx={{
395
- width: '100%',
396
- maxWidth: 700
397
- }}>
398
- <RadioTileGroup label="배송 방법 선택" helperText="배송 방법에 따라 배송비가 달라질 수 있습니다." options={[{
399
- value: 'standard',
400
- label: '일반 배송',
401
- startDecorator: <HomeIcon />
402
- }, {
403
- value: 'express',
404
- label: '빠른 배송',
405
- startDecorator: <LocalShippingIcon />
406
- }, {
407
- value: 'business',
408
- label: '기업 배송',
409
- startDecorator: <BusinessIcon />
410
- }]} onChange={handleChange} value={selectedValue} size="md" useIndicator={true} />
411
- </Box>
483
+ <Box
484
+ sx={{
485
+ width: "100%",
486
+ maxWidth: 700
487
+ }}
488
+ >
489
+ <RadioTileGroup
490
+ label="배송 방법 선택"
491
+ helperText="배송 방법에 따라 배송비가 달라질 수 있습니다."
492
+ options={[
493
+ {
494
+ value: "standard",
495
+ label: "일반 배송",
496
+ startDecorator: <HomeIcon />
497
+ },
498
+ {
499
+ value: "express",
500
+ label: "빠른 배송",
501
+ startDecorator: <LocalShippingIcon />
502
+ },
503
+ {
504
+ value: "business",
505
+ label: "기업 배송",
506
+ startDecorator: <BusinessIcon />
507
+ }
508
+ ]}
509
+ onChange={handleChange}
510
+ value={selectedValue}
511
+ size="md"
512
+ useIndicator={true}
513
+ />
514
+ </Box>
412
515
  ```
413
516
 
414
517
  ### Survey / Preference Selection
@@ -432,28 +535,42 @@ Present survey options with icons in a multi-column grid for a clear, scannable
432
535
  ```
433
536
 
434
537
  ```tsx
435
- <Box sx={{
436
- width: '100%',
437
- maxWidth: 700
438
- }}>
439
- <RadioTileGroup label="선호하는 운동 유형을 선택해주세요" options={[{
440
- value: 'cardio',
441
- label: '유산소 운동',
442
- startDecorator: <DirectionsRunIcon />
443
- }, {
444
- value: 'strength',
445
- label: '근력 운동',
446
- startDecorator: <FitnessCenterIcon />
447
- }, {
448
- value: 'flexibility',
449
- label: '유연성 운동',
450
- startDecorator: <SelfImprovementIcon />
451
- }, {
452
- value: 'balance',
453
- label: '균형 운동',
454
- startDecorator: <BalanceIcon />
455
- }]} onChange={handleChange} value={selectedValue} columns={2} size="md" />
456
- </Box>
538
+ <Box
539
+ sx={{
540
+ width: "100%",
541
+ maxWidth: 700
542
+ }}
543
+ >
544
+ <RadioTileGroup
545
+ label="선호하는 운동 유형을 선택해주세요"
546
+ options={[
547
+ {
548
+ value: "cardio",
549
+ label: "유산소 운동",
550
+ startDecorator: <DirectionsRunIcon />
551
+ },
552
+ {
553
+ value: "strength",
554
+ label: "근력 운동",
555
+ startDecorator: <FitnessCenterIcon />
556
+ },
557
+ {
558
+ value: "flexibility",
559
+ label: "유연성 운동",
560
+ startDecorator: <SelfImprovementIcon />
561
+ },
562
+ {
563
+ value: "balance",
564
+ label: "균형 운동",
565
+ startDecorator: <BalanceIcon />
566
+ }
567
+ ]}
568
+ onChange={handleChange}
569
+ value={selectedValue}
570
+ columns={2}
571
+ size="md"
572
+ />
573
+ </Box>
457
574
  ```
458
575
 
459
576
  ### Pricing Plan Picker