@iress-oss/ids-mcp-server 0.0.1-dev.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.
- package/LICENSE.txt +201 -0
- package/README.md +93 -0
- package/dist/componentHandlers.js +241 -0
- package/dist/componentHandlers.test.js +380 -0
- package/dist/config.js +16 -0
- package/dist/index.js +53 -0
- package/dist/iressHandlers.js +144 -0
- package/dist/iressHandlers.test.js +316 -0
- package/dist/resourceHandlers.js +67 -0
- package/dist/resourceHandlers.test.js +352 -0
- package/dist/searchHandlers.js +287 -0
- package/dist/searchHandlers.test.js +524 -0
- package/dist/toolHandler.js +31 -0
- package/dist/toolHandler.test.js +369 -0
- package/dist/tools.js +165 -0
- package/dist/types.js +4 -0
- package/dist/utils.js +59 -0
- package/dist/utils.test.js +286 -0
- package/generated/docs/components-alert-docs.md +130 -0
- package/generated/docs/components-autocomplete-docs.md +754 -0
- package/generated/docs/components-autocomplete-recipes-docs.md +104 -0
- package/generated/docs/components-badge-docs.md +148 -0
- package/generated/docs/components-button-docs.md +362 -0
- package/generated/docs/components-button-recipes-docs.md +76 -0
- package/generated/docs/components-buttongroup-docs.md +310 -0
- package/generated/docs/components-card-docs.md +494 -0
- package/generated/docs/components-card-recipes-docs.md +89 -0
- package/generated/docs/components-checkbox-docs.md +193 -0
- package/generated/docs/components-checkboxgroup-docs.md +692 -0
- package/generated/docs/components-checkboxgroup-recipes-docs.md +119 -0
- package/generated/docs/components-col-docs.md +466 -0
- package/generated/docs/components-combobox-docs.md +1016 -0
- package/generated/docs/components-container-docs.md +91 -0
- package/generated/docs/components-divider-docs.md +176 -0
- package/generated/docs/components-expander-docs.md +215 -0
- package/generated/docs/components-field-docs.md +675 -0
- package/generated/docs/components-filter-docs.md +1109 -0
- package/generated/docs/components-form-docs.md +2442 -0
- package/generated/docs/components-form-recipes-docs.md +892 -0
- package/generated/docs/components-hide-docs.md +265 -0
- package/generated/docs/components-icon-docs.md +553 -0
- package/generated/docs/components-inline-docs.md +868 -0
- package/generated/docs/components-input-docs.md +335 -0
- package/generated/docs/components-input-recipes-docs.md +140 -0
- package/generated/docs/components-inputcurrency-docs.md +157 -0
- package/generated/docs/components-inputcurrency-recipes-docs.md +116 -0
- package/generated/docs/components-label-docs.md +135 -0
- package/generated/docs/components-menu-docs.md +704 -0
- package/generated/docs/components-menu-menuitem-docs.md +193 -0
- package/generated/docs/components-modal-docs.md +587 -0
- package/generated/docs/components-navbar-docs.md +291 -0
- package/generated/docs/components-navbar-recipes-docs.md +413 -0
- package/generated/docs/components-panel-docs.md +380 -0
- package/generated/docs/components-placeholder-docs.md +27 -0
- package/generated/docs/components-popover-docs.md +464 -0
- package/generated/docs/components-popover-recipes-docs.md +245 -0
- package/generated/docs/components-progress-docs.md +104 -0
- package/generated/docs/components-radio-docs.md +107 -0
- package/generated/docs/components-radiogroup-docs.md +683 -0
- package/generated/docs/components-readonly-docs.md +89 -0
- package/generated/docs/components-richselect-docs.md +2433 -0
- package/generated/docs/components-row-docs.md +877 -0
- package/generated/docs/components-select-docs.md +456 -0
- package/generated/docs/components-skeleton-docs.md +214 -0
- package/generated/docs/components-skeleton-recipes-docs.md +76 -0
- package/generated/docs/components-skiplink-docs.md +66 -0
- package/generated/docs/components-slideout-docs.md +538 -0
- package/generated/docs/components-slider-docs.md +346 -0
- package/generated/docs/components-spinner-docs.md +59 -0
- package/generated/docs/components-stack-docs.md +265 -0
- package/generated/docs/components-table-ag-grid-docs.md +2666 -0
- package/generated/docs/components-table-docs.md +1305 -0
- package/generated/docs/components-tabset-docs.md +341 -0
- package/generated/docs/components-tabset-tab-docs.md +86 -0
- package/generated/docs/components-tag-docs.md +115 -0
- package/generated/docs/components-text-docs.md +394 -0
- package/generated/docs/components-toaster-docs.md +294 -0
- package/generated/docs/components-toaster-toast-docs.md +157 -0
- package/generated/docs/components-toggle-docs.md +158 -0
- package/generated/docs/components-tooltip-docs.md +311 -0
- package/generated/docs/components-validationmessage-docs.md +241 -0
- package/generated/docs/contact-us-docs.md +27 -0
- package/generated/docs/extensions-editor-docs.md +288 -0
- package/generated/docs/extensions-editor-recipes-docs.md +39 -0
- package/generated/docs/foundations-accessibility-docs.md +62 -0
- package/generated/docs/foundations-colours-docs.md +257 -0
- package/generated/docs/foundations-consistency-docs.md +52 -0
- package/generated/docs/foundations-content-docs.md +23 -0
- package/generated/docs/foundations-introduction-docs.md +17 -0
- package/generated/docs/foundations-principles-docs.md +70 -0
- package/generated/docs/foundations-typography-docs.md +191 -0
- package/generated/docs/foundations-user-experience-docs.md +63 -0
- package/generated/docs/foundations-visual-design-docs.md +46 -0
- package/generated/docs/frequently-asked-questions-docs.md +53 -0
- package/generated/docs/get-started-develop-docs.md +48 -0
- package/generated/docs/get-started-using-storybook-docs.md +68 -0
- package/generated/docs/guidelines.md +812 -0
- package/generated/docs/introduction-docs.md +43 -0
- package/generated/docs/patterns-loading-docs.md +1304 -0
- package/generated/docs/resources-changelog-docs.md +6 -0
- package/generated/docs/resources-code-katas-docs.md +29 -0
- package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +437 -0
- package/generated/docs/themes-available-themes-docs.md +66 -0
- package/generated/docs/themes-introduction-docs.md +121 -0
- package/generated/docs/themes-tokens-docs.md +1200 -0
- package/generated/docs/versions-docs.md +17 -0
- package/package.json +81 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
[](#radiogroup)RadioGroup
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
A radio group is a group of radio buttons that allows the user to select one option from multiple options, where all options are visible.
|
|
8
|
+
|
|
9
|
+
Google
|
|
10
|
+
|
|
11
|
+
Newspaper
|
|
12
|
+
|
|
13
|
+
Friend
|
|
14
|
+
|
|
15
|
+
Other
|
|
16
|
+
|
|
17
|
+
Hide code
|
|
18
|
+
|
|
19
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
20
|
+
|
|
21
|
+
<IressRadioGroup\>
|
|
22
|
+
<IressRadio value\="google"\>
|
|
23
|
+
Google </IressRadio\>
|
|
24
|
+
<IressRadio value\="newspaper"\>
|
|
25
|
+
Newspaper </IressRadio\>
|
|
26
|
+
<IressRadio value\="friend"\>
|
|
27
|
+
Friend </IressRadio\>
|
|
28
|
+
<IressRadio value\="other"\>
|
|
29
|
+
Other </IressRadio\>
|
|
30
|
+
</IressRadioGroup\>
|
|
31
|
+
|
|
32
|
+
Copy
|
|
33
|
+
|
|
34
|
+
[](#examples)Examples
|
|
35
|
+
---------------------
|
|
36
|
+
|
|
37
|
+
### [](#radio-children)Radio children
|
|
38
|
+
|
|
39
|
+
Individual radio buttons can be passed directly into `IressRadioGroup`.
|
|
40
|
+
|
|
41
|
+
**Note:** The `mapRadioGroupOptions` helper function, originally used to map options to `IressRadio` components, is now deprecated. Instead, you can use `array.map` to map the options to `IressRadio` components.
|
|
42
|
+
|
|
43
|
+
Google
|
|
44
|
+
|
|
45
|
+
Newspaper
|
|
46
|
+
|
|
47
|
+
Friend
|
|
48
|
+
|
|
49
|
+
Other
|
|
50
|
+
|
|
51
|
+
Hide code
|
|
52
|
+
|
|
53
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
54
|
+
|
|
55
|
+
<IressRadioGroup\>
|
|
56
|
+
<IressRadio value\="google"\>
|
|
57
|
+
Google </IressRadio\>
|
|
58
|
+
<IressRadio value\="newspaper"\>
|
|
59
|
+
Newspaper </IressRadio\>
|
|
60
|
+
<IressRadio value\="friend"\>
|
|
61
|
+
Friend </IressRadio\>
|
|
62
|
+
<IressRadio value\="other"\>
|
|
63
|
+
Other </IressRadio\>
|
|
64
|
+
</IressRadioGroup\>
|
|
65
|
+
|
|
66
|
+
Copy
|
|
67
|
+
|
|
68
|
+
### [](#radio-selection)Radio selection
|
|
69
|
+
|
|
70
|
+
The default checked state of the radio children should always be set using the `value` prop. Sometimes you may wish to use the `IressRadioGroup` as an "uncontrolled" component - for example, because you are using a third party form library that requires it. In this case, simply use `defaultValue` instead of `value`.
|
|
71
|
+
|
|
72
|
+
**Note:** The `value` prop on the `IressRadioGroup` component will always override the `checked` state of the `IressRadio` children.
|
|
73
|
+
|
|
74
|
+
Google
|
|
75
|
+
|
|
76
|
+
Newspaper
|
|
77
|
+
|
|
78
|
+
Friend
|
|
79
|
+
|
|
80
|
+
Other
|
|
81
|
+
|
|
82
|
+
Hide code
|
|
83
|
+
|
|
84
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
85
|
+
|
|
86
|
+
<IressRadioGroup defaultValue\="newspaper"\>
|
|
87
|
+
<IressRadio value\="google"\>
|
|
88
|
+
Google </IressRadio\>
|
|
89
|
+
<IressRadio value\="newspaper"\>
|
|
90
|
+
Newspaper </IressRadio\>
|
|
91
|
+
<IressRadio value\="friend"\>
|
|
92
|
+
Friend </IressRadio\>
|
|
93
|
+
<IressRadio value\="other"\>
|
|
94
|
+
Other </IressRadio\>
|
|
95
|
+
</IressRadioGroup\>
|
|
96
|
+
|
|
97
|
+
Copy
|
|
98
|
+
|
|
99
|
+
### [](#layout)Layout
|
|
100
|
+
|
|
101
|
+
The layout prop controls how the radio group is displayed and can have three basic layouts:
|
|
102
|
+
|
|
103
|
+
* **stack (Default):** Radio buttons are laid out vertically. Labels are only as wide as their text.
|
|
104
|
+
* **block:** Same as Stack, but labels take up the full width of the container.
|
|
105
|
+
* **inline:** Radio buttons are laid out horizontally. Labels are only as wide as their text.
|
|
106
|
+
* **inlineFlex:** Radio buttons are laid out horizontally. The container is only as wide as its contents.
|
|
107
|
+
* **inlineEqualWidth:** Radio buttons are laid out horizontally. Labels take up an equal amount of space in the container.
|
|
108
|
+
|
|
109
|
+
Note:
|
|
110
|
+
-----
|
|
111
|
+
|
|
112
|
+
If using any of the inline\* props within a `Field` component, the `Field` also needs the inline prop to be set for the inline layouts to take effect.
|
|
113
|
+
|
|
114
|
+
### stack
|
|
115
|
+
|
|
116
|
+
Google
|
|
117
|
+
|
|
118
|
+
Newspaper
|
|
119
|
+
|
|
120
|
+
Friend
|
|
121
|
+
|
|
122
|
+
Other
|
|
123
|
+
|
|
124
|
+
### block
|
|
125
|
+
|
|
126
|
+
Google
|
|
127
|
+
|
|
128
|
+
Newspaper
|
|
129
|
+
|
|
130
|
+
Friend
|
|
131
|
+
|
|
132
|
+
Other
|
|
133
|
+
|
|
134
|
+
### inline
|
|
135
|
+
|
|
136
|
+
Google
|
|
137
|
+
|
|
138
|
+
Newspaper
|
|
139
|
+
|
|
140
|
+
Friend
|
|
141
|
+
|
|
142
|
+
Other
|
|
143
|
+
|
|
144
|
+
### inlineFlex
|
|
145
|
+
|
|
146
|
+
Google
|
|
147
|
+
|
|
148
|
+
Newspaper
|
|
149
|
+
|
|
150
|
+
Friend
|
|
151
|
+
|
|
152
|
+
Other
|
|
153
|
+
|
|
154
|
+
### inlineEqualWidth
|
|
155
|
+
|
|
156
|
+
Google
|
|
157
|
+
|
|
158
|
+
Newspaper
|
|
159
|
+
|
|
160
|
+
Friend
|
|
161
|
+
|
|
162
|
+
Other
|
|
163
|
+
|
|
164
|
+
Hide code
|
|
165
|
+
|
|
166
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
167
|
+
|
|
168
|
+
<IressText className\="iress-u-stack iress--gutter--lg"\>
|
|
169
|
+
<div\>
|
|
170
|
+
<h3\>
|
|
171
|
+
stack </h3\>
|
|
172
|
+
<IressRadioGroup layout\="stack"\>
|
|
173
|
+
<IressRadio
|
|
174
|
+
className\="ids-styles--add-border-v5142"
|
|
175
|
+
value\="google"
|
|
176
|
+
\>
|
|
177
|
+
Google </IressRadio\>
|
|
178
|
+
<IressRadio
|
|
179
|
+
className\="ids-styles--add-border-v5142"
|
|
180
|
+
value\="newspaper"
|
|
181
|
+
\>
|
|
182
|
+
Newspaper </IressRadio\>
|
|
183
|
+
<IressRadio
|
|
184
|
+
className\="ids-styles--add-border-v5142"
|
|
185
|
+
value\="friend"
|
|
186
|
+
\>
|
|
187
|
+
Friend </IressRadio\>
|
|
188
|
+
<IressRadio
|
|
189
|
+
className\="ids-styles--add-border-v5142"
|
|
190
|
+
value\="other"
|
|
191
|
+
\>
|
|
192
|
+
Other </IressRadio\>
|
|
193
|
+
</IressRadioGroup\>
|
|
194
|
+
</div\>
|
|
195
|
+
<div\>
|
|
196
|
+
<h3\>
|
|
197
|
+
block </h3\>
|
|
198
|
+
<IressRadioGroup layout\="block"\>
|
|
199
|
+
<IressRadio
|
|
200
|
+
className\="ids-styles--add-border-v5142"
|
|
201
|
+
value\="google"
|
|
202
|
+
\>
|
|
203
|
+
Google </IressRadio\>
|
|
204
|
+
<IressRadio
|
|
205
|
+
className\="ids-styles--add-border-v5142"
|
|
206
|
+
value\="newspaper"
|
|
207
|
+
\>
|
|
208
|
+
Newspaper </IressRadio\>
|
|
209
|
+
<IressRadio
|
|
210
|
+
className\="ids-styles--add-border-v5142"
|
|
211
|
+
value\="friend"
|
|
212
|
+
\>
|
|
213
|
+
Friend </IressRadio\>
|
|
214
|
+
<IressRadio
|
|
215
|
+
className\="ids-styles--add-border-v5142"
|
|
216
|
+
value\="other"
|
|
217
|
+
\>
|
|
218
|
+
Other </IressRadio\>
|
|
219
|
+
</IressRadioGroup\>
|
|
220
|
+
</div\>
|
|
221
|
+
<div\>
|
|
222
|
+
<h3\>
|
|
223
|
+
inline </h3\>
|
|
224
|
+
<IressRadioGroup layout\="inline"\>
|
|
225
|
+
<IressRadio
|
|
226
|
+
className\="ids-styles--add-border-v5142"
|
|
227
|
+
value\="google"
|
|
228
|
+
\>
|
|
229
|
+
Google </IressRadio\>
|
|
230
|
+
<IressRadio
|
|
231
|
+
className\="ids-styles--add-border-v5142"
|
|
232
|
+
value\="newspaper"
|
|
233
|
+
\>
|
|
234
|
+
Newspaper </IressRadio\>
|
|
235
|
+
<IressRadio
|
|
236
|
+
className\="ids-styles--add-border-v5142"
|
|
237
|
+
value\="friend"
|
|
238
|
+
\>
|
|
239
|
+
Friend </IressRadio\>
|
|
240
|
+
<IressRadio
|
|
241
|
+
className\="ids-styles--add-border-v5142"
|
|
242
|
+
value\="other"
|
|
243
|
+
\>
|
|
244
|
+
Other </IressRadio\>
|
|
245
|
+
</IressRadioGroup\>
|
|
246
|
+
</div\>
|
|
247
|
+
<div\>
|
|
248
|
+
<h3\>
|
|
249
|
+
inlineFlex </h3\>
|
|
250
|
+
<IressRadioGroup layout\="inlineFlex"\>
|
|
251
|
+
<IressRadio
|
|
252
|
+
className\="ids-styles--add-border-v5142"
|
|
253
|
+
value\="google"
|
|
254
|
+
\>
|
|
255
|
+
Google </IressRadio\>
|
|
256
|
+
<IressRadio
|
|
257
|
+
className\="ids-styles--add-border-v5142"
|
|
258
|
+
value\="newspaper"
|
|
259
|
+
\>
|
|
260
|
+
Newspaper </IressRadio\>
|
|
261
|
+
<IressRadio
|
|
262
|
+
className\="ids-styles--add-border-v5142"
|
|
263
|
+
value\="friend"
|
|
264
|
+
\>
|
|
265
|
+
Friend </IressRadio\>
|
|
266
|
+
<IressRadio
|
|
267
|
+
className\="ids-styles--add-border-v5142"
|
|
268
|
+
value\="other"
|
|
269
|
+
\>
|
|
270
|
+
Other </IressRadio\>
|
|
271
|
+
</IressRadioGroup\>
|
|
272
|
+
</div\>
|
|
273
|
+
<div\>
|
|
274
|
+
<h3\>
|
|
275
|
+
inlineEqualWidth </h3\>
|
|
276
|
+
<IressRadioGroup layout\="inlineEqualWidth"\>
|
|
277
|
+
<IressRadio
|
|
278
|
+
className\="ids-styles--add-border-v5142"
|
|
279
|
+
value\="google"
|
|
280
|
+
\>
|
|
281
|
+
Google </IressRadio\>
|
|
282
|
+
<IressRadio
|
|
283
|
+
className\="ids-styles--add-border-v5142"
|
|
284
|
+
value\="newspaper"
|
|
285
|
+
\>
|
|
286
|
+
Newspaper </IressRadio\>
|
|
287
|
+
<IressRadio
|
|
288
|
+
className\="ids-styles--add-border-v5142"
|
|
289
|
+
value\="friend"
|
|
290
|
+
\>
|
|
291
|
+
Friend </IressRadio\>
|
|
292
|
+
<IressRadio
|
|
293
|
+
className\="ids-styles--add-border-v5142"
|
|
294
|
+
value\="other"
|
|
295
|
+
\>
|
|
296
|
+
Other </IressRadio\>
|
|
297
|
+
</IressRadioGroup\>
|
|
298
|
+
</div\>
|
|
299
|
+
</IressText\>
|
|
300
|
+
|
|
301
|
+
Copy
|
|
302
|
+
|
|
303
|
+
### [](#hidden-radio-buttons)Hidden radio buttons
|
|
304
|
+
|
|
305
|
+
You can use the `hiddenRadio` prop to create custom radio buttons. When enabled, the actual radio button will be visually hidden, allowing you to create more interesting controls. The checked state will be shown by the label's border, which is thicker when the radio button is checked.
|
|
306
|
+
|
|
307
|
+
When `hiddenRadio` is enabled, the label will have no padding. Padding can be added by using a Panel or utility classes.
|
|
308
|
+
|
|
309
|
+
**I'd like to discuss the following in my financial review:
|
|
310
|
+
|
|
311
|
+
Select one option
|
|
312
|
+
|
|
313
|
+
**
|
|
314
|
+
|
|
315
|
+
Buying my first home
|
|
316
|
+
|
|
317
|
+
Saving for a holiday
|
|
318
|
+
|
|
319
|
+
Reducing my debt
|
|
320
|
+
|
|
321
|
+
Hide code
|
|
322
|
+
|
|
323
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
324
|
+
|
|
325
|
+
<IressField
|
|
326
|
+
hint\="Select one option"
|
|
327
|
+
label\="I'd like to discuss the following in my financial review:"
|
|
328
|
+
\>
|
|
329
|
+
<IressRadioGroup
|
|
330
|
+
defaultValue\="home"
|
|
331
|
+
hiddenRadio
|
|
332
|
+
layout\="inline"
|
|
333
|
+
required
|
|
334
|
+
\>
|
|
335
|
+
<IressRadio value\="home"\>
|
|
336
|
+
<IressPanel
|
|
337
|
+
background\="transparent"
|
|
338
|
+
padding\="lg"
|
|
339
|
+
textAlign\="center"
|
|
340
|
+
\>
|
|
341
|
+
<IressStack gutter\="md"\>
|
|
342
|
+
<IressIcon
|
|
343
|
+
name\="house"
|
|
344
|
+
size\="3x"
|
|
345
|
+
/>
|
|
346
|
+
<IressText
|
|
347
|
+
noGutter
|
|
348
|
+
variant\="h4"
|
|
349
|
+
\>
|
|
350
|
+
Buying my first home </IressText\>
|
|
351
|
+
</IressStack\>
|
|
352
|
+
</IressPanel\>
|
|
353
|
+
</IressRadio\>
|
|
354
|
+
<IressRadio value\="holiday"\>
|
|
355
|
+
<IressPanel
|
|
356
|
+
background\="transparent"
|
|
357
|
+
padding\="lg"
|
|
358
|
+
textAlign\="center"
|
|
359
|
+
\>
|
|
360
|
+
<IressStack gutter\="md"\>
|
|
361
|
+
<IressIcon
|
|
362
|
+
name\="mountain"
|
|
363
|
+
size\="3x"
|
|
364
|
+
/>
|
|
365
|
+
<IressText
|
|
366
|
+
noGutter
|
|
367
|
+
variant\="h4"
|
|
368
|
+
\>
|
|
369
|
+
Saving for a holiday </IressText\>
|
|
370
|
+
</IressStack\>
|
|
371
|
+
</IressPanel\>
|
|
372
|
+
</IressRadio\>
|
|
373
|
+
<IressRadio value\="debt"\>
|
|
374
|
+
<IressPanel
|
|
375
|
+
background\="transparent"
|
|
376
|
+
padding\="lg"
|
|
377
|
+
textAlign\="center"
|
|
378
|
+
\>
|
|
379
|
+
<IressStack gutter\="md"\>
|
|
380
|
+
<IressIcon
|
|
381
|
+
name\="credit-card"
|
|
382
|
+
size\="3x"
|
|
383
|
+
/>
|
|
384
|
+
<IressText
|
|
385
|
+
noGutter
|
|
386
|
+
variant\="h4"
|
|
387
|
+
\>
|
|
388
|
+
Reducing my debt </IressText\>
|
|
389
|
+
</IressStack\>
|
|
390
|
+
</IressPanel\>
|
|
391
|
+
</IressRadio\>
|
|
392
|
+
</IressRadioGroup\>
|
|
393
|
+
</IressField\>
|
|
394
|
+
|
|
395
|
+
Copy
|
|
396
|
+
|
|
397
|
+
### [](#laying-out-custom-radio-buttons)Laying out custom radio buttons
|
|
398
|
+
|
|
399
|
+
The radio group's `layout` prop gives you some default options to help control the layout of your controls. But sometimes you need more granular control, which you can achieve with a bit of custom CSS.
|
|
400
|
+
|
|
401
|
+
The example below uses CSS grid to give us evenly spaced / sized radio buttons, which will wrap on to new lines as the screen size reduces. The grid wrapper element is a div that wraps around the `<IressRadio />` elements, as shown by the dashed border. Use the grab handle in the bottom right-hand corner of the grid wrapper to see how the controls change size to respond to the container's width.
|
|
402
|
+
|
|
403
|
+
**I'd like to discuss the following in my financial review:
|
|
404
|
+
|
|
405
|
+
Select one option
|
|
406
|
+
|
|
407
|
+
**
|
|
408
|
+
|
|
409
|
+
Retirement
|
|
410
|
+
|
|
411
|
+
Buying my first home
|
|
412
|
+
|
|
413
|
+
Saving for a holiday
|
|
414
|
+
|
|
415
|
+
Saving for my child's education
|
|
416
|
+
|
|
417
|
+
Saving for emergency
|
|
418
|
+
|
|
419
|
+
Spending more time on my hobbies
|
|
420
|
+
|
|
421
|
+
Reducing my debt
|
|
422
|
+
|
|
423
|
+
Starting a business
|
|
424
|
+
|
|
425
|
+
Hide code
|
|
426
|
+
|
|
427
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
428
|
+
|
|
429
|
+
<IressField
|
|
430
|
+
hint\="Select one option"
|
|
431
|
+
label\="I'd like to discuss the following in my financial review:"
|
|
432
|
+
\>
|
|
433
|
+
<IressRadioGroup
|
|
434
|
+
hiddenRadio
|
|
435
|
+
layout\="block"
|
|
436
|
+
name\="financial-review"
|
|
437
|
+
required
|
|
438
|
+
style\={{
|
|
439
|
+
'--iress-inline-spacing-x': 0,
|
|
440
|
+
'--iress-margin-bottom': 0
|
|
441
|
+
}}
|
|
442
|
+
\>
|
|
443
|
+
<div
|
|
444
|
+
className\="ids-styles--resizable-v5142"
|
|
445
|
+
style\={{
|
|
446
|
+
display: 'grid',
|
|
447
|
+
gridAutoRows: '1fr',
|
|
448
|
+
gridGap: 'var(--iress-g-spacing-sm, 0.75rem)',
|
|
449
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))',
|
|
450
|
+
padding: '0.5rem',
|
|
451
|
+
width: '100%'
|
|
452
|
+
}}
|
|
453
|
+
\>
|
|
454
|
+
<IressRadio value\="retirement"\>
|
|
455
|
+
<IressPanel
|
|
456
|
+
background\="transparent"
|
|
457
|
+
padding\="lg"
|
|
458
|
+
textAlign\="center"
|
|
459
|
+
\>
|
|
460
|
+
<IressStack gutter\="md"\>
|
|
461
|
+
<IressIcon
|
|
462
|
+
name\="tree-palm"
|
|
463
|
+
size\="3x"
|
|
464
|
+
/>
|
|
465
|
+
<IressText
|
|
466
|
+
noGutter
|
|
467
|
+
variant\="h4"
|
|
468
|
+
\>
|
|
469
|
+
Retirement </IressText\>
|
|
470
|
+
</IressStack\>
|
|
471
|
+
</IressPanel\>
|
|
472
|
+
</IressRadio\>
|
|
473
|
+
<IressRadio value\="home"\>
|
|
474
|
+
<IressPanel
|
|
475
|
+
background\="transparent"
|
|
476
|
+
padding\="lg"
|
|
477
|
+
textAlign\="center"
|
|
478
|
+
\>
|
|
479
|
+
<IressStack gutter\="md"\>
|
|
480
|
+
<IressIcon
|
|
481
|
+
name\="house"
|
|
482
|
+
size\="3x"
|
|
483
|
+
/>
|
|
484
|
+
<IressText
|
|
485
|
+
noGutter
|
|
486
|
+
variant\="h4"
|
|
487
|
+
\>
|
|
488
|
+
Buying my first home </IressText\>
|
|
489
|
+
</IressStack\>
|
|
490
|
+
</IressPanel\>
|
|
491
|
+
</IressRadio\>
|
|
492
|
+
<IressRadio value\="holiday"\>
|
|
493
|
+
<IressPanel
|
|
494
|
+
background\="transparent"
|
|
495
|
+
padding\="lg"
|
|
496
|
+
textAlign\="center"
|
|
497
|
+
\>
|
|
498
|
+
<IressStack gutter\="md"\>
|
|
499
|
+
<IressIcon
|
|
500
|
+
name\="mountain"
|
|
501
|
+
size\="3x"
|
|
502
|
+
/>
|
|
503
|
+
<IressText
|
|
504
|
+
noGutter
|
|
505
|
+
variant\="h4"
|
|
506
|
+
\>
|
|
507
|
+
Saving for a holiday </IressText\>
|
|
508
|
+
</IressStack\>
|
|
509
|
+
</IressPanel\>
|
|
510
|
+
</IressRadio\>
|
|
511
|
+
<IressRadio value\="education"\>
|
|
512
|
+
<IressPanel
|
|
513
|
+
background\="transparent"
|
|
514
|
+
padding\="lg"
|
|
515
|
+
textAlign\="center"
|
|
516
|
+
\>
|
|
517
|
+
<IressStack gutter\="md"\>
|
|
518
|
+
<IressIcon
|
|
519
|
+
name\="graduation-cap"
|
|
520
|
+
size\="3x"
|
|
521
|
+
/>
|
|
522
|
+
<IressText
|
|
523
|
+
noGutter
|
|
524
|
+
variant\="h4"
|
|
525
|
+
\>
|
|
526
|
+
Saving for my child's education </IressText\>
|
|
527
|
+
</IressStack\>
|
|
528
|
+
</IressPanel\>
|
|
529
|
+
</IressRadio\>
|
|
530
|
+
<IressRadio value\="emergency"\>
|
|
531
|
+
<IressPanel
|
|
532
|
+
background\="transparent"
|
|
533
|
+
padding\="lg"
|
|
534
|
+
textAlign\="center"
|
|
535
|
+
\>
|
|
536
|
+
<IressStack gutter\="md"\>
|
|
537
|
+
<IressIcon
|
|
538
|
+
name\="medkit"
|
|
539
|
+
size\="3x"
|
|
540
|
+
/>
|
|
541
|
+
<IressText
|
|
542
|
+
noGutter
|
|
543
|
+
variant\="h4"
|
|
544
|
+
\>
|
|
545
|
+
Saving for emergency </IressText\>
|
|
546
|
+
</IressStack\>
|
|
547
|
+
</IressPanel\>
|
|
548
|
+
</IressRadio\>
|
|
549
|
+
<IressRadio value\="hobby"\>
|
|
550
|
+
<IressPanel
|
|
551
|
+
background\="transparent"
|
|
552
|
+
padding\="lg"
|
|
553
|
+
textAlign\="center"
|
|
554
|
+
\>
|
|
555
|
+
<IressStack gutter\="md"\>
|
|
556
|
+
<IressIcon
|
|
557
|
+
name\="bicycle"
|
|
558
|
+
size\="3x"
|
|
559
|
+
/>
|
|
560
|
+
<IressText
|
|
561
|
+
noGutter
|
|
562
|
+
variant\="h4"
|
|
563
|
+
\>
|
|
564
|
+
Spending more time on my hobbies </IressText\>
|
|
565
|
+
</IressStack\>
|
|
566
|
+
</IressPanel\>
|
|
567
|
+
</IressRadio\>
|
|
568
|
+
<IressRadio value\="debt"\>
|
|
569
|
+
<IressPanel
|
|
570
|
+
background\="transparent"
|
|
571
|
+
padding\="lg"
|
|
572
|
+
textAlign\="center"
|
|
573
|
+
\>
|
|
574
|
+
<IressStack gutter\="md"\>
|
|
575
|
+
<IressIcon
|
|
576
|
+
name\="chart-line-down"
|
|
577
|
+
size\="3x"
|
|
578
|
+
/>
|
|
579
|
+
<IressText
|
|
580
|
+
noGutter
|
|
581
|
+
variant\="h4"
|
|
582
|
+
\>
|
|
583
|
+
Reducing my debt </IressText\>
|
|
584
|
+
</IressStack\>
|
|
585
|
+
</IressPanel\>
|
|
586
|
+
</IressRadio\>
|
|
587
|
+
<IressRadio value\="business"\>
|
|
588
|
+
<IressPanel
|
|
589
|
+
background\="transparent"
|
|
590
|
+
padding\="lg"
|
|
591
|
+
textAlign\="center"
|
|
592
|
+
\>
|
|
593
|
+
<IressStack gutter\="md"\>
|
|
594
|
+
<IressIcon
|
|
595
|
+
name\="user-tie"
|
|
596
|
+
size\="3x"
|
|
597
|
+
/>
|
|
598
|
+
<IressText
|
|
599
|
+
noGutter
|
|
600
|
+
variant\="h4"
|
|
601
|
+
\>
|
|
602
|
+
Starting a business </IressText\>
|
|
603
|
+
</IressStack\>
|
|
604
|
+
</IressPanel\>
|
|
605
|
+
</IressRadio\>
|
|
606
|
+
</div\>
|
|
607
|
+
</IressRadioGroup\>
|
|
608
|
+
</IressField\>
|
|
609
|
+
|
|
610
|
+
Copy
|
|
611
|
+
|
|
612
|
+
### [](#readonly)Readonly
|
|
613
|
+
|
|
614
|
+
The `readonly` prop changes how the radio group is rendered. It will only render if the children radio that is checked (alongside a hidden input that contains the `value` if it was set), otherwise it will not be rendered.
|
|
615
|
+
|
|
616
|
+
It is understandable that this may not be the desired behavior for all use cases. If you need a radio group that is not editable, but still visible, simply do not set the `readonly` prop and set the `value` prop instead.
|
|
617
|
+
|
|
618
|
+
Newspaper
|
|
619
|
+
|
|
620
|
+
Hide code
|
|
621
|
+
|
|
622
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
623
|
+
|
|
624
|
+
<IressRadioGroup
|
|
625
|
+
defaultValue\="newspaper"
|
|
626
|
+
readonly
|
|
627
|
+
\>
|
|
628
|
+
<IressRadio value\="google"\>
|
|
629
|
+
Google </IressRadio\>
|
|
630
|
+
<IressRadio value\="newspaper"\>
|
|
631
|
+
Newspaper </IressRadio\>
|
|
632
|
+
<IressRadio value\="friend"\>
|
|
633
|
+
Friend </IressRadio\>
|
|
634
|
+
<IressRadio value\="other"\>
|
|
635
|
+
Other </IressRadio\>
|
|
636
|
+
</IressRadioGroup\>
|
|
637
|
+
|
|
638
|
+
Copy
|
|
639
|
+
|
|
640
|
+
### [](#touch)Touch
|
|
641
|
+
|
|
642
|
+
The `touch` prop adds the button-like border and padding to radio.
|
|
643
|
+
|
|
644
|
+
Google
|
|
645
|
+
|
|
646
|
+
Newspaper
|
|
647
|
+
|
|
648
|
+
Friend
|
|
649
|
+
|
|
650
|
+
Other
|
|
651
|
+
|
|
652
|
+
Hide code
|
|
653
|
+
|
|
654
|
+
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
655
|
+
|
|
656
|
+
<IressRadioGroup
|
|
657
|
+
defaultValue\="newspaper"
|
|
658
|
+
touch
|
|
659
|
+
\>
|
|
660
|
+
<IressRadio value\="google"\>
|
|
661
|
+
Google </IressRadio\>
|
|
662
|
+
<IressRadio value\="newspaper"\>
|
|
663
|
+
Newspaper </IressRadio\>
|
|
664
|
+
<IressRadio value\="friend"\>
|
|
665
|
+
Friend </IressRadio\>
|
|
666
|
+
<IressRadio value\="other"\>
|
|
667
|
+
Other </IressRadio\>
|
|
668
|
+
</IressRadioGroup\>
|
|
669
|
+
|
|
670
|
+
Copy
|
|
671
|
+
|
|
672
|
+
On this page
|
|
673
|
+
|
|
674
|
+
* [Overview](#overview)
|
|
675
|
+
* [Props](#props)
|
|
676
|
+
* [Examples](#examples)
|
|
677
|
+
* [Radio children](#radio-children)
|
|
678
|
+
* [Radio selection](#radio-selection)
|
|
679
|
+
* [Layout](#layout)
|
|
680
|
+
* [Hidden radio buttons](#hidden-radio-buttons)
|
|
681
|
+
* [Laying out custom radio buttons](#laying-out-custom-radio-buttons)
|
|
682
|
+
* [Readonly](#readonly)
|
|
683
|
+
* [Touch](#touch)
|