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