@iress-oss/ids-mcp-server 5.15.0 → 5.20.2
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/generated/docs/components_components-alert-docs.md +496 -0
- package/generated/docs/components_components-autocomplete-docs.md +3429 -0
- package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +39 -14
- package/generated/docs/{components-badge-docs.md → components_components-badge-docs.md} +222 -30
- package/generated/docs/components_components-button-docs.md +2078 -0
- package/generated/docs/components_components-button-recipes-docs.md +37 -0
- package/generated/docs/components_components-buttongroup-docs.md +1045 -0
- package/generated/docs/components_components-card-docs.md +2290 -0
- package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +132 -15
- package/generated/docs/components_components-checkbox-docs.md +1040 -0
- package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1001 -82
- package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +102 -12
- package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
- package/generated/docs/components_components-combobox-docs.md +3735 -0
- package/generated/docs/{components-container-docs.md → components_components-container-docs.md} +61 -24
- package/generated/docs/{components-divider-docs.md → components_components-divider-docs.md} +83 -24
- package/generated/docs/{components-expander-docs.md → components_components-expander-docs.md} +266 -33
- package/generated/docs/components_components-field-docs.md +1369 -0
- package/generated/docs/components_components-filter-docs.md +4080 -0
- package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1556 -360
- package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +277 -60
- package/generated/docs/{components-hide-docs.md → components_components-hide-docs.md} +195 -124
- package/generated/docs/components_components-icon-docs.md +1337 -0
- package/generated/docs/{components-inline-docs.md → components_components-inline-docs.md} +462 -42
- package/generated/docs/components_components-input-docs.md +1468 -0
- package/generated/docs/components_components-input-recipes-docs.md +367 -0
- package/generated/docs/components_components-inputcurrency-docs.md +432 -0
- package/generated/docs/{components-inputcurrency-recipes-docs.md → components_components-inputcurrency-recipes-docs.md} +113 -17
- package/generated/docs/components_components-label-docs.md +323 -0
- package/generated/docs/components_components-menu-docs.md +2345 -0
- package/generated/docs/components_components-menu-menuitem-docs.md +633 -0
- package/generated/docs/{components-modal-docs.md → components_components-modal-docs.md} +1640 -231
- package/generated/docs/components_components-navbar-docs.md +1847 -0
- package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +721 -40
- package/generated/docs/{components-panel-docs.md → components_components-panel-docs.md} +754 -57
- package/generated/docs/components_components-placeholder-docs.md +92 -0
- package/generated/docs/components_components-popover-docs.md +1643 -0
- package/generated/docs/components_components-popover-recipes-docs.md +491 -0
- package/generated/docs/components_components-progress-docs.md +115 -0
- package/generated/docs/{components-provider-docs.md → components_components-provider-docs.md} +42 -33
- package/generated/docs/components_components-radio-docs.md +491 -0
- package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +927 -75
- package/generated/docs/components_components-readonly-docs.md +263 -0
- package/generated/docs/components_components-richselect-docs.md +6521 -0
- package/generated/docs/{components-row-docs.md → components_components-row-docs.md} +353 -43
- package/generated/docs/{components-select-docs.md → components_components-select-docs.md} +719 -61
- package/generated/docs/components_components-skeleton-docs.md +480 -0
- package/generated/docs/{components-skeleton-recipes-docs.md → components_components-skeleton-recipes-docs.md} +51 -11
- package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
- package/generated/docs/components_components-slideout-docs.md +2293 -0
- package/generated/docs/components_components-slider-docs.md +1276 -0
- package/generated/docs/components_components-spinner-docs.md +82 -0
- package/generated/docs/{components-stack-docs.md → components_components-stack-docs.md} +223 -40
- package/generated/docs/components_components-table-docs.md +3658 -0
- package/generated/docs/components_components-tabset-docs.md +772 -0
- package/generated/docs/components_components-tabset-tab-docs.md +262 -0
- package/generated/docs/components_components-tag-docs.md +257 -0
- package/generated/docs/{components-text-docs.md → components_components-text-docs.md} +491 -51
- package/generated/docs/{components-toaster-docs.md → components_components-toaster-docs.md} +187 -85
- package/generated/docs/components_components-toaster-toast-docs.md +634 -0
- package/generated/docs/components_components-toggle-docs.md +461 -0
- package/generated/docs/{components-tooltip-docs.md → components_components-tooltip-docs.md} +286 -41
- package/generated/docs/{components-validationmessage-docs.md → components_components-validationmessage-docs.md} +230 -61
- package/generated/docs/components_contact-us-docs.md +12 -0
- package/generated/docs/{foundations-accessibility-docs.md → components_foundations-accessibility-docs.md} +11 -21
- package/generated/docs/{foundations-colours-docs.md → components_foundations-colour-030-colours.md} +8 -15
- package/generated/docs/{foundations-consistency-docs.md → components_foundations-consistency-docs.md} +12 -20
- package/generated/docs/{foundations-content-docs.md → components_foundations-content-docs.md} +6 -11
- package/generated/docs/components_foundations-introduction-docs.md +15 -0
- package/generated/docs/{foundations-principles-docs.md → components_foundations-principles-docs.md} +14 -24
- package/generated/docs/components_foundations-typography-docs.md +608 -0
- package/generated/docs/{foundations-user-experience-docs.md → components_foundations-user-experience-docs.md} +16 -26
- package/generated/docs/{foundations-visual-design-docs.md → components_foundations-visual-design-docs.md} +10 -17
- package/generated/docs/{frequently-asked-questions-docs.md → components_frequently-asked-questions-docs.md} +14 -23
- package/generated/docs/components_get-started-develop-docs.md +84 -0
- package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
- package/generated/docs/components_introduction-docs.md +15 -0
- package/generated/docs/{patterns-loading-docs.md → components_patterns-loading-docs.md} +798 -153
- package/generated/docs/components_resources-changelog-docs.md +4 -0
- package/generated/docs/{resources-code-katas-docs.md → components_resources-code-katas-docs.md} +5 -9
- package/generated/docs/{resources-migration-guides-from-v4-to-v5-docs.md → components_resources-migration-guides-from-v4-to-v5-docs.md} +54 -239
- package/generated/docs/components_sandbox-docs.md +4 -0
- package/generated/docs/{versions-docs.md → components_versions-docs.md} +5 -8
- package/generated/docs/guidelines.md +484 -200
- package/generated/docs/introduction-docs.md +19 -30
- package/package.json +41 -45
- package/generated/docs/components-alert-docs.md +0 -130
- package/generated/docs/components-autocomplete-docs.md +0 -754
- 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-checkbox-docs.md +0 -193
- package/generated/docs/components-combobox-docs.md +0 -1016
- package/generated/docs/components-field-docs.md +0 -675
- package/generated/docs/components-filter-docs.md +0 -1109
- package/generated/docs/components-icon-docs.md +0 -553
- 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-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-navbar-docs.md +0 -291
- 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-radio-docs.md +0 -107
- package/generated/docs/components-readonly-docs.md +0 -89
- package/generated/docs/components-richselect-docs.md +0 -2433
- package/generated/docs/components-skeleton-docs.md +0 -214
- 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-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-toaster-toast-docs.md +0 -157
- package/generated/docs/components-toggle-docs.md +0 -158
- 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-introduction-docs.md +0 -17
- package/generated/docs/foundations-typography-docs.md +0 -191
- package/generated/docs/get-started-develop-docs.md +0 -209
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/resources-changelog-docs.md +0 -6
- 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/{LICENSE.txt → LICENSE} +0 -0
|
@@ -0,0 +1,1369 @@
|
|
|
1
|
+
Field
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
The field component is used to place label, hint and error information around form controls.
|
|
8
|
+
|
|
9
|
+
[](./iframe.html?id=components-field--default)
|
|
10
|
+
|
|
11
|
+
First name
|
|
12
|
+
|
|
13
|
+
Hide codedrawOpen in CodeSandbox
|
|
14
|
+
|
|
15
|
+
<IressField label\="First name"\>
|
|
16
|
+
<ForwardedInput
|
|
17
|
+
id\="name"
|
|
18
|
+
name\="input1"
|
|
19
|
+
required
|
|
20
|
+
type\="text"
|
|
21
|
+
/>
|
|
22
|
+
</IressField\>
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Props
|
|
27
|
+
-----
|
|
28
|
+
|
|
29
|
+
| Name | Description | Default | Control |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| children |
|
|
32
|
+
The form control this field is related to.
|
|
33
|
+
|
|
34
|
+
ReactReactNode
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
| \- | \- |
|
|
39
|
+
| label\* |
|
|
40
|
+
|
|
41
|
+
Text to be displayed in the label.
|
|
42
|
+
|
|
43
|
+
ReactNode
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
| \- |
|
|
48
|
+
|
|
49
|
+
"First name"
|
|
50
|
+
|
|
51
|
+
|
|
|
52
|
+
| readOnly |
|
|
53
|
+
|
|
54
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
55
|
+
|
|
56
|
+
boolean
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| \- | Set boolean |
|
|
61
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
62
|
+
|
|
63
|
+
Examples
|
|
64
|
+
--------
|
|
65
|
+
|
|
66
|
+
### Label
|
|
67
|
+
|
|
68
|
+
The `label` prop is required to describe the field.
|
|
69
|
+
|
|
70
|
+
[](./iframe.html?id=components-field--label)
|
|
71
|
+
|
|
72
|
+
Find your address
|
|
73
|
+
|
|
74
|
+
Hide codedrawOpen in CodeSandbox
|
|
75
|
+
|
|
76
|
+
<IressField label\={<span\><IressIcon name\="home" />{' '}Find your address</span\>}\>
|
|
77
|
+
<ForwardedInput
|
|
78
|
+
id\="name"
|
|
79
|
+
name\="input1"
|
|
80
|
+
required
|
|
81
|
+
type\="text"
|
|
82
|
+
/>
|
|
83
|
+
</IressField\>
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### Props
|
|
88
|
+
|
|
89
|
+
| Name | Description | Default | Control |
|
|
90
|
+
| --- | --- | --- | --- |
|
|
91
|
+
| children |
|
|
92
|
+
The form control this field is related to.
|
|
93
|
+
|
|
94
|
+
ReactReactNode
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
| \- | \- |
|
|
99
|
+
| label\* |
|
|
100
|
+
|
|
101
|
+
Text to be displayed in the label.
|
|
102
|
+
|
|
103
|
+
ReactNode
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
| \- | \- |
|
|
108
|
+
| readOnly |
|
|
109
|
+
|
|
110
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
111
|
+
|
|
112
|
+
boolean
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
| \- | Set boolean |
|
|
117
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
118
|
+
|
|
119
|
+
### Hint
|
|
120
|
+
|
|
121
|
+
Extra information on the field can be provided using the `hint` prop. It can accept any React node, so you can add your own custom mark up (eg. external links) to the hint text.
|
|
122
|
+
|
|
123
|
+
[](./iframe.html?id=components-field--hint)
|
|
124
|
+
|
|
125
|
+
Email address
|
|
126
|
+
|
|
127
|
+
For us to be able to contact you in the future
|
|
128
|
+
|
|
129
|
+
Hide codedrawOpen in CodeSandbox
|
|
130
|
+
|
|
131
|
+
<IressField
|
|
132
|
+
hint\="For us to be able to contact you in the future"
|
|
133
|
+
label\="Email address"
|
|
134
|
+
\>
|
|
135
|
+
<ForwardedInput
|
|
136
|
+
id\="email"
|
|
137
|
+
name\="email"
|
|
138
|
+
required
|
|
139
|
+
type\="email"
|
|
140
|
+
/>
|
|
141
|
+
</IressField\>
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Props
|
|
146
|
+
|
|
147
|
+
| Name | Description | Default | Control |
|
|
148
|
+
| --- | --- | --- | --- |
|
|
149
|
+
| children |
|
|
150
|
+
The form control this field is related to.
|
|
151
|
+
|
|
152
|
+
ReactReactNode
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
| \- | \- |
|
|
157
|
+
| hint |
|
|
158
|
+
|
|
159
|
+
string
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
| \- | For us to be able to contact you in the future |
|
|
164
|
+
| label\* |
|
|
165
|
+
|
|
166
|
+
Text to be displayed in the label.
|
|
167
|
+
|
|
168
|
+
ReactNode
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
| \- |
|
|
173
|
+
|
|
174
|
+
"Email address"
|
|
175
|
+
|
|
176
|
+
|
|
|
177
|
+
| readOnly |
|
|
178
|
+
|
|
179
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
180
|
+
|
|
181
|
+
boolean
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
| \- | Set boolean |
|
|
186
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
187
|
+
|
|
188
|
+
### Error message
|
|
189
|
+
|
|
190
|
+
To display error messages associated with the field, you can use the `errorMessages` prop. This prop accepts an array of `ValidationMessageObj`, and will display each error message in a separate paragraph.
|
|
191
|
+
|
|
192
|
+
**Note:** `IressField` requires validation to be handled by the consumer. If you want out-of-the-box validation, use [`IressFormField` alongside `IressForm` instead](/docs/components-form--docs#fields).
|
|
193
|
+
|
|
194
|
+
[](./iframe.html?id=components-field--error-message)
|
|
195
|
+
|
|
196
|
+
Error message
|
|
197
|
+
|
|
198
|
+
* Error:
|
|
199
|
+
|
|
200
|
+
This field is required
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
Hide codedrawOpen in CodeSandbox
|
|
204
|
+
|
|
205
|
+
<IressField
|
|
206
|
+
errorMessages\={\[
|
|
207
|
+
{
|
|
208
|
+
message: 'This field is required'
|
|
209
|
+
}
|
|
210
|
+
\]}
|
|
211
|
+
label\="Error message"
|
|
212
|
+
\>
|
|
213
|
+
<ForwardedInput append={<IressButton data-testid\="show-password-icon" mode\="tertiary" prepend\={<IressIcon name\="fal fa-light fa-eye" screenreaderText\="Show" size\="sm" style\={{width: '18px'}}/>}/>}
|
|
214
|
+
id="name" name="name" required />
|
|
215
|
+
</IressField\>
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
#### Props
|
|
220
|
+
|
|
221
|
+
| Name | Description | Default | Control |
|
|
222
|
+
| --- | --- | --- | --- |
|
|
223
|
+
| children |
|
|
224
|
+
The form control this field is related to.
|
|
225
|
+
|
|
226
|
+
ReactReactNode
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
| \- | \- |
|
|
231
|
+
| errorMessages |
|
|
232
|
+
|
|
233
|
+
array
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
| \- |
|
|
238
|
+
|
|
239
|
+
Edit JSON
|
|
240
|
+
|
|
241
|
+
* errorMessages :
|
|
242
|
+
|
|
243
|
+
\[
|
|
244
|
+
|
|
245
|
+
* 0 :
|
|
246
|
+
|
|
247
|
+
{...} 1 key
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
\]
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
|
256
|
+
| label\* |
|
|
257
|
+
|
|
258
|
+
Text to be displayed in the label.
|
|
259
|
+
|
|
260
|
+
ReactNode
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
| \- |
|
|
265
|
+
|
|
266
|
+
"Error message"
|
|
267
|
+
|
|
268
|
+
|
|
|
269
|
+
| readOnly |
|
|
270
|
+
|
|
271
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
272
|
+
|
|
273
|
+
boolean
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
| \- | Set boolean |
|
|
278
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
279
|
+
|
|
280
|
+
### Custom error
|
|
281
|
+
|
|
282
|
+
For more control over the formatting of the error, you can use the `error` prop. This prop accepts any React node, so you can add your own custom mark up (eg. icons) to the error message.
|
|
283
|
+
|
|
284
|
+
**Note:** `IressField` requires validation to be handled by the consumer. If you want out-of-the-box validation, use [`IressFormField` alongside `IressForm` instead](/docs/components-form--docs#fields).
|
|
285
|
+
|
|
286
|
+
[](./iframe.html?id=components-field--custom-error)
|
|
287
|
+
|
|
288
|
+
Custom error
|
|
289
|
+
|
|
290
|
+
Error:
|
|
291
|
+
|
|
292
|
+
This is a custom error message
|
|
293
|
+
|
|
294
|
+
Hide codedrawOpen in CodeSandbox
|
|
295
|
+
|
|
296
|
+
<IressField
|
|
297
|
+
error\={<IressValidationMessage\>This is a custom error message</IressValidationMessage\>}
|
|
298
|
+
label\="Custom error"
|
|
299
|
+
\>
|
|
300
|
+
<ForwardedInput
|
|
301
|
+
id\="name"
|
|
302
|
+
name\="name"
|
|
303
|
+
required
|
|
304
|
+
/>
|
|
305
|
+
</IressField\>
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
#### Props
|
|
310
|
+
|
|
311
|
+
| Name | Description | Default | Control |
|
|
312
|
+
| --- | --- | --- | --- |
|
|
313
|
+
| children |
|
|
314
|
+
The form control this field is related to.
|
|
315
|
+
|
|
316
|
+
ReactReactNode
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
| \- | \- |
|
|
321
|
+
| error |
|
|
322
|
+
|
|
323
|
+
object
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
| \- |
|
|
328
|
+
|
|
329
|
+
Edit JSON
|
|
330
|
+
|
|
331
|
+
error :
|
|
332
|
+
|
|
333
|
+
{
|
|
334
|
+
|
|
335
|
+
* $$typeof : Symbol(react.transitional.element)
|
|
336
|
+
* type : (props) => /\* @\_\_PURE\_\_ \*/ jsxDEV(ValidationBase, { ...props, as: "div" }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/ValidationMessage/ValidationMessage.tsx", lineNumber: 10, columnNumber: 1 }, this)
|
|
337
|
+
* key : null
|
|
338
|
+
* props :
|
|
339
|
+
|
|
340
|
+
{...} 1 key
|
|
341
|
+
|
|
342
|
+
* \_owner : null
|
|
343
|
+
* \_store :
|
|
344
|
+
|
|
345
|
+
{...} 0 keys
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
|
357
|
+
| label\* |
|
|
358
|
+
|
|
359
|
+
Text to be displayed in the label.
|
|
360
|
+
|
|
361
|
+
ReactNode
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
| \- |
|
|
366
|
+
|
|
367
|
+
"Custom error"
|
|
368
|
+
|
|
369
|
+
|
|
|
370
|
+
| readOnly |
|
|
371
|
+
|
|
372
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
373
|
+
|
|
374
|
+
boolean
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
| \- | Set boolean |
|
|
379
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
380
|
+
|
|
381
|
+
### Hidden label
|
|
382
|
+
|
|
383
|
+
There may be certain situations where you might want to (accessibly) hide the field label (in a search field for instance). This can be done by setting the `hiddenLabel` prop.
|
|
384
|
+
|
|
385
|
+
[](./iframe.html?id=components-field--hidden-label)
|
|
386
|
+
|
|
387
|
+
This label is hidden
|
|
388
|
+
|
|
389
|
+
This hint text is hidden
|
|
390
|
+
|
|
391
|
+
Hide codedrawOpen in CodeSandbox
|
|
392
|
+
|
|
393
|
+
<IressField
|
|
394
|
+
hiddenLabel
|
|
395
|
+
hint\="This hint text is hidden"
|
|
396
|
+
label\="This label is hidden"
|
|
397
|
+
\>
|
|
398
|
+
<ForwardedInput
|
|
399
|
+
id\="name"
|
|
400
|
+
name\="input1"
|
|
401
|
+
required
|
|
402
|
+
type\="text"
|
|
403
|
+
/>
|
|
404
|
+
</IressField\>
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Props
|
|
409
|
+
|
|
410
|
+
| Name | Description | Default | Control |
|
|
411
|
+
| --- | --- | --- | --- |
|
|
412
|
+
| children |
|
|
413
|
+
The form control this field is related to.
|
|
414
|
+
|
|
415
|
+
ReactReactNode
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
| \- | \- |
|
|
420
|
+
| hiddenLabel |
|
|
421
|
+
|
|
422
|
+
boolean
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
| \- | FalseTrue |
|
|
427
|
+
| hint |
|
|
428
|
+
|
|
429
|
+
string
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
| \- | This hint text is hidden |
|
|
434
|
+
| label\* |
|
|
435
|
+
|
|
436
|
+
Text to be displayed in the label.
|
|
437
|
+
|
|
438
|
+
ReactNode
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
| \- |
|
|
443
|
+
|
|
444
|
+
"This label is hidden"
|
|
445
|
+
|
|
446
|
+
|
|
|
447
|
+
| readOnly |
|
|
448
|
+
|
|
449
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
450
|
+
|
|
451
|
+
boolean
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
| \- | Set boolean |
|
|
456
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
457
|
+
|
|
458
|
+
[](./iframe.html?id=components-field--hidden-label-with-error)
|
|
459
|
+
|
|
460
|
+
This label is hidden
|
|
461
|
+
|
|
462
|
+
This hint text is hidden
|
|
463
|
+
|
|
464
|
+
Error:
|
|
465
|
+
|
|
466
|
+
Even fields with hidden labels will show their validation message
|
|
467
|
+
|
|
468
|
+
Hide codedrawOpen in CodeSandbox
|
|
469
|
+
|
|
470
|
+
<IressField
|
|
471
|
+
error\={<IressValidationMessage\>Even fields with hidden labels will show their validation message</IressValidationMessage\>}
|
|
472
|
+
hiddenLabel
|
|
473
|
+
hint\="This hint text is hidden"
|
|
474
|
+
label\="This label is hidden"
|
|
475
|
+
\>
|
|
476
|
+
<ForwardedInput
|
|
477
|
+
id\="name"
|
|
478
|
+
name\="input1"
|
|
479
|
+
required
|
|
480
|
+
type\="text"
|
|
481
|
+
/>
|
|
482
|
+
</IressField\>
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Props
|
|
487
|
+
|
|
488
|
+
| Name | Description | Default | Control |
|
|
489
|
+
| --- | --- | --- | --- |
|
|
490
|
+
| children |
|
|
491
|
+
The form control this field is related to.
|
|
492
|
+
|
|
493
|
+
ReactReactNode
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
| \- | \- |
|
|
498
|
+
| error |
|
|
499
|
+
|
|
500
|
+
object
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
| \- |
|
|
505
|
+
|
|
506
|
+
Edit JSON
|
|
507
|
+
|
|
508
|
+
error :
|
|
509
|
+
|
|
510
|
+
{
|
|
511
|
+
|
|
512
|
+
* $$typeof : Symbol(react.transitional.element)
|
|
513
|
+
* type : (props) => /\* @\_\_PURE\_\_ \*/ jsxDEV(ValidationBase, { ...props, as: "div" }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/ValidationMessage/ValidationMessage.tsx", lineNumber: 10, columnNumber: 1 }, this)
|
|
514
|
+
* key : null
|
|
515
|
+
* props :
|
|
516
|
+
|
|
517
|
+
{...} 1 key
|
|
518
|
+
|
|
519
|
+
* \_owner : null
|
|
520
|
+
* \_store :
|
|
521
|
+
|
|
522
|
+
{...} 0 keys
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
|
534
|
+
| hiddenLabel |
|
|
535
|
+
|
|
536
|
+
boolean
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
| \- | FalseTrue |
|
|
541
|
+
| hint |
|
|
542
|
+
|
|
543
|
+
string
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
| \- | This hint text is hidden |
|
|
548
|
+
| label\* |
|
|
549
|
+
|
|
550
|
+
Text to be displayed in the label.
|
|
551
|
+
|
|
552
|
+
ReactNode
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
| \- |
|
|
557
|
+
|
|
558
|
+
"This label is hidden"
|
|
559
|
+
|
|
560
|
+
|
|
|
561
|
+
| readOnly |
|
|
562
|
+
|
|
563
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
564
|
+
|
|
565
|
+
boolean
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
| \- | Set boolean |
|
|
570
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
571
|
+
|
|
572
|
+
### Required
|
|
573
|
+
|
|
574
|
+
Fields marked as `required` will have an asterisk prepended to the label.
|
|
575
|
+
|
|
576
|
+
[](./iframe.html?id=components-field--required)
|
|
577
|
+
|
|
578
|
+
\*Required This field is required
|
|
579
|
+
|
|
580
|
+
Hide codedrawOpen in CodeSandbox
|
|
581
|
+
|
|
582
|
+
<IressField
|
|
583
|
+
label\="This field is required"
|
|
584
|
+
required
|
|
585
|
+
\>
|
|
586
|
+
<ForwardedInput
|
|
587
|
+
id\="name"
|
|
588
|
+
name\="input1"
|
|
589
|
+
required
|
|
590
|
+
type\="text"
|
|
591
|
+
/>
|
|
592
|
+
</IressField\>
|
|
593
|
+
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
#### Props
|
|
597
|
+
|
|
598
|
+
| Name | Description | Default | Control |
|
|
599
|
+
| --- | --- | --- | --- |
|
|
600
|
+
| children |
|
|
601
|
+
The form control this field is related to.
|
|
602
|
+
|
|
603
|
+
ReactReactNode
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
| \- | \- |
|
|
608
|
+
| label\* |
|
|
609
|
+
|
|
610
|
+
Text to be displayed in the label.
|
|
611
|
+
|
|
612
|
+
ReactNode
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
| \- |
|
|
617
|
+
|
|
618
|
+
"This field is required"
|
|
619
|
+
|
|
620
|
+
|
|
|
621
|
+
| readOnly |
|
|
622
|
+
|
|
623
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
624
|
+
|
|
625
|
+
boolean
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
| \- | Set boolean |
|
|
630
|
+
| required |
|
|
631
|
+
|
|
632
|
+
boolean
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
| \- | FalseTrue |
|
|
637
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
638
|
+
|
|
639
|
+
### Optional
|
|
640
|
+
|
|
641
|
+
Fields marked as `optional` will have optional text appended to the label. This is used in cases where the majority of the fields are required, and you only want to highlight the optional fields and not overwhelm the user.
|
|
642
|
+
|
|
643
|
+
You can set `optional` to a string to customise the optional text.
|
|
644
|
+
|
|
645
|
+
[](./iframe.html?id=components-field--optional)
|
|
646
|
+
|
|
647
|
+
This field is optional(optional)
|
|
648
|
+
|
|
649
|
+
Hide codedrawOpen in CodeSandbox
|
|
650
|
+
|
|
651
|
+
<IressField
|
|
652
|
+
label\="This field is optional"
|
|
653
|
+
optional
|
|
654
|
+
\>
|
|
655
|
+
<ForwardedInput
|
|
656
|
+
id\="name"
|
|
657
|
+
name\="input1"
|
|
658
|
+
required
|
|
659
|
+
type\="text"
|
|
660
|
+
/>
|
|
661
|
+
</IressField\>
|
|
662
|
+
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
#### Props
|
|
666
|
+
|
|
667
|
+
| Name | Description | Default | Control |
|
|
668
|
+
| --- | --- | --- | --- |
|
|
669
|
+
| children |
|
|
670
|
+
The form control this field is related to.
|
|
671
|
+
|
|
672
|
+
ReactReactNode
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
| \- | \- |
|
|
677
|
+
| label\* |
|
|
678
|
+
|
|
679
|
+
Text to be displayed in the label.
|
|
680
|
+
|
|
681
|
+
ReactNode
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
| \- |
|
|
686
|
+
|
|
687
|
+
"This field is optional"
|
|
688
|
+
|
|
689
|
+
|
|
|
690
|
+
| optional |
|
|
691
|
+
|
|
692
|
+
boolean
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
| \- | FalseTrue |
|
|
697
|
+
| readOnly |
|
|
698
|
+
|
|
699
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
700
|
+
|
|
701
|
+
boolean
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
| \- | Set boolean |
|
|
706
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
707
|
+
|
|
708
|
+
### Readonly data
|
|
709
|
+
|
|
710
|
+
Fields can be used to display read-only data. This is useful when you want to display data that the user can't change, but you still want to display it in a form-like layout.
|
|
711
|
+
|
|
712
|
+
You can also pass `readOnly` prop to remove the asterisk symbol (\*) even when the field is `required`.
|
|
713
|
+
|
|
714
|
+
[](./iframe.html?id=components-field--readonly-data)
|
|
715
|
+
|
|
716
|
+
First name
|
|
717
|
+
|
|
718
|
+
This field is readonly
|
|
719
|
+
|
|
720
|
+
Luke Skywalker
|
|
721
|
+
|
|
722
|
+
Hide codedrawOpen in CodeSandbox
|
|
723
|
+
|
|
724
|
+
<IressField
|
|
725
|
+
hint\="This field is readonly"
|
|
726
|
+
label\="First name"
|
|
727
|
+
readOnly
|
|
728
|
+
required
|
|
729
|
+
\>
|
|
730
|
+
<IressReadonly
|
|
731
|
+
id\="name"
|
|
732
|
+
name\="input1"
|
|
733
|
+
required
|
|
734
|
+
type\="text"
|
|
735
|
+
value\="Luke Skywalker"
|
|
736
|
+
/>
|
|
737
|
+
</IressField\>
|
|
738
|
+
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
#### Props
|
|
742
|
+
|
|
743
|
+
| Name | Description | Default | Control |
|
|
744
|
+
| --- | --- | --- | --- |
|
|
745
|
+
| children |
|
|
746
|
+
The form control this field is related to.
|
|
747
|
+
|
|
748
|
+
ReactReactNode
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
| \- | \- |
|
|
753
|
+
| hint |
|
|
754
|
+
|
|
755
|
+
string
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
| \- | This field is readonly |
|
|
760
|
+
| label\* |
|
|
761
|
+
|
|
762
|
+
Text to be displayed in the label.
|
|
763
|
+
|
|
764
|
+
ReactNode
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
| \- |
|
|
769
|
+
|
|
770
|
+
"First name"
|
|
771
|
+
|
|
772
|
+
|
|
|
773
|
+
| readOnly |
|
|
774
|
+
|
|
775
|
+
Renders the group in a read-only state (no asterisk symbol).
|
|
776
|
+
|
|
777
|
+
boolean
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
| \- | FalseTrue |
|
|
782
|
+
| required |
|
|
783
|
+
|
|
784
|
+
boolean
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
| \- | FalseTrue |
|
|
789
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
790
|
+
|
|
791
|
+
`IressFieldGroup`
|
|
792
|
+
-----------------
|
|
793
|
+
|
|
794
|
+
The `IressFieldGroup` component is used to group multiple `Field` components together. This is useful when you have multiple fields that are related to each other, and you want to display them together.
|
|
795
|
+
|
|
796
|
+
Under the hood it uses a `fieldset` and `legend` element to group the fields together, improving the semantics of your form if you use multiple inputs (eg. in the case of a checkbox group) and making it more accessible.
|
|
797
|
+
|
|
798
|
+
[](./iframe.html?id=components-field-fieldgroup--default)
|
|
799
|
+
|
|
800
|
+
Full name
|
|
801
|
+
|
|
802
|
+
Title
|
|
803
|
+
|
|
804
|
+
\*Required First name
|
|
805
|
+
|
|
806
|
+
\*Required Last name
|
|
807
|
+
|
|
808
|
+
Hide codedrawOpen in CodeSandbox
|
|
809
|
+
|
|
810
|
+
<IressFieldGroup label\="Full name"\>
|
|
811
|
+
<IressField
|
|
812
|
+
htmlFor\="title"
|
|
813
|
+
label\="Title"
|
|
814
|
+
\>
|
|
815
|
+
<ForwardedInput
|
|
816
|
+
id\="title"
|
|
817
|
+
name\="title"
|
|
818
|
+
type\="text"
|
|
819
|
+
width\="2"
|
|
820
|
+
/>
|
|
821
|
+
</IressField\>
|
|
822
|
+
<IressField
|
|
823
|
+
htmlFor\="firstName"
|
|
824
|
+
label\="First name"
|
|
825
|
+
required
|
|
826
|
+
\>
|
|
827
|
+
<ForwardedInput
|
|
828
|
+
id\="firstName"
|
|
829
|
+
name\="firstName"
|
|
830
|
+
required
|
|
831
|
+
type\="text"
|
|
832
|
+
/>
|
|
833
|
+
</IressField\>
|
|
834
|
+
<IressField
|
|
835
|
+
htmlFor\="lastName"
|
|
836
|
+
label\="Last name"
|
|
837
|
+
required
|
|
838
|
+
\>
|
|
839
|
+
<ForwardedInput
|
|
840
|
+
id\="lastName"
|
|
841
|
+
name\="lastName"
|
|
842
|
+
required
|
|
843
|
+
type\="text"
|
|
844
|
+
/>
|
|
845
|
+
</IressField\>
|
|
846
|
+
</IressFieldGroup\>
|
|
847
|
+
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
#### Props
|
|
851
|
+
|
|
852
|
+
| Name | Description | Default | Control |
|
|
853
|
+
| --- | --- | --- | --- |
|
|
854
|
+
| children |
|
|
855
|
+
Should contain multiple `IressField`, or other elements supported in field group such as `IressButton`.
|
|
856
|
+
|
|
857
|
+
ReactReactNode
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
| \- | \- |
|
|
862
|
+
| inline |
|
|
863
|
+
|
|
864
|
+
Displays multiple children inline rather than stacked, with a small gap.
|
|
865
|
+
|
|
866
|
+
boolean
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
| \- | Set boolean |
|
|
871
|
+
| join |
|
|
872
|
+
|
|
873
|
+
Displays multiple children inline and removes column gap.
|
|
874
|
+
|
|
875
|
+
boolean
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
| \- | Set boolean |
|
|
880
|
+
| label |
|
|
881
|
+
|
|
882
|
+
string
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
| \- | Full name |
|
|
887
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
888
|
+
|
|
889
|
+
### Inline
|
|
890
|
+
|
|
891
|
+
Multiple fields can be displayed inline using the `inline` prop. On smaller screens, inline elements will wrap on to a new line if there's not enough space for everything on one line.
|
|
892
|
+
|
|
893
|
+
[](./iframe.html?id=components-field-fieldgroup--inline)
|
|
894
|
+
|
|
895
|
+
Full name
|
|
896
|
+
|
|
897
|
+
Title
|
|
898
|
+
|
|
899
|
+
\*Required First name
|
|
900
|
+
|
|
901
|
+
\*Required Last name
|
|
902
|
+
|
|
903
|
+
Hide codedrawOpen in CodeSandbox
|
|
904
|
+
|
|
905
|
+
<IressFieldGroup
|
|
906
|
+
inline
|
|
907
|
+
label\="Full name"
|
|
908
|
+
\>
|
|
909
|
+
<IressField
|
|
910
|
+
htmlFor\="title"
|
|
911
|
+
label\="Title"
|
|
912
|
+
\>
|
|
913
|
+
<ForwardedInput
|
|
914
|
+
id\="title"
|
|
915
|
+
name\="title"
|
|
916
|
+
type\="text"
|
|
917
|
+
width\="2"
|
|
918
|
+
/>
|
|
919
|
+
</IressField\>
|
|
920
|
+
<IressField
|
|
921
|
+
htmlFor\="firstName"
|
|
922
|
+
label\="First name"
|
|
923
|
+
required
|
|
924
|
+
\>
|
|
925
|
+
<ForwardedInput
|
|
926
|
+
id\="firstName"
|
|
927
|
+
name\="firstName"
|
|
928
|
+
required
|
|
929
|
+
type\="text"
|
|
930
|
+
/>
|
|
931
|
+
</IressField\>
|
|
932
|
+
<IressField
|
|
933
|
+
htmlFor\="lastName"
|
|
934
|
+
label\="Last name"
|
|
935
|
+
required
|
|
936
|
+
\>
|
|
937
|
+
<ForwardedInput
|
|
938
|
+
id\="lastName"
|
|
939
|
+
name\="lastName"
|
|
940
|
+
required
|
|
941
|
+
type\="text"
|
|
942
|
+
/>
|
|
943
|
+
</IressField\>
|
|
944
|
+
</IressFieldGroup\>
|
|
945
|
+
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
#### Props
|
|
949
|
+
|
|
950
|
+
| Name | Description | Default | Control |
|
|
951
|
+
| --- | --- | --- | --- |
|
|
952
|
+
| children |
|
|
953
|
+
Should contain multiple `IressField`, or other elements supported in field group such as `IressButton`.
|
|
954
|
+
|
|
955
|
+
ReactReactNode
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
| \- | \- |
|
|
960
|
+
| inline |
|
|
961
|
+
|
|
962
|
+
Displays multiple children inline rather than stacked, with a small gap.
|
|
963
|
+
|
|
964
|
+
boolean
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
| \- | FalseTrue |
|
|
969
|
+
| join |
|
|
970
|
+
|
|
971
|
+
Displays multiple children inline and removes column gap.
|
|
972
|
+
|
|
973
|
+
boolean
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
| \- | Set boolean |
|
|
978
|
+
| label |
|
|
979
|
+
|
|
980
|
+
string
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
| \- | Full name |
|
|
985
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
986
|
+
|
|
987
|
+
[](./iframe.html?id=components-field-fieldgroup--inline-sink)
|
|
988
|
+
|
|
989
|
+
Full name
|
|
990
|
+
|
|
991
|
+
Emoji
|
|
992
|
+
|
|
993
|
+
Title
|
|
994
|
+
|
|
995
|
+
MrMrsMiss
|
|
996
|
+
|
|
997
|
+
\*Required First name
|
|
998
|
+
|
|
999
|
+
\*Required Last name
|
|
1000
|
+
|
|
1001
|
+
Submit
|
|
1002
|
+
|
|
1003
|
+
Settings goes here
|
|
1004
|
+
|
|
1005
|
+
Hide codedrawOpen in CodeSandbox
|
|
1006
|
+
|
|
1007
|
+
<form\>
|
|
1008
|
+
<IressFieldGroup
|
|
1009
|
+
inline
|
|
1010
|
+
label\="Full name"
|
|
1011
|
+
\>
|
|
1012
|
+
<IressField
|
|
1013
|
+
htmlFor\="emoji"
|
|
1014
|
+
label\="Emoji"
|
|
1015
|
+
\>
|
|
1016
|
+
<IressRichSelect
|
|
1017
|
+
container\={document.body}
|
|
1018
|
+
id\="emoji"
|
|
1019
|
+
options\={\[
|
|
1020
|
+
{
|
|
1021
|
+
label: '🐶',
|
|
1022
|
+
value: 'dog'
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
label: '🐱',
|
|
1026
|
+
value: 'cat'
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
label: '🐭',
|
|
1030
|
+
value: 'mouse'
|
|
1031
|
+
}
|
|
1032
|
+
\]}
|
|
1033
|
+
width\="2"
|
|
1034
|
+
/>
|
|
1035
|
+
</IressField\>
|
|
1036
|
+
<IressField
|
|
1037
|
+
htmlFor\="title"
|
|
1038
|
+
label\="Title"
|
|
1039
|
+
\>
|
|
1040
|
+
<IressSelect
|
|
1041
|
+
id\="title"
|
|
1042
|
+
width\="2"
|
|
1043
|
+
\>
|
|
1044
|
+
<option value\="mr"\>
|
|
1045
|
+
Mr </option\>
|
|
1046
|
+
<option value\="mrs"\>
|
|
1047
|
+
Mrs </option\>
|
|
1048
|
+
<option value\="miss"\>
|
|
1049
|
+
Miss </option\>
|
|
1050
|
+
</IressSelect\>
|
|
1051
|
+
</IressField\>
|
|
1052
|
+
<IressField
|
|
1053
|
+
htmlFor\="firstName"
|
|
1054
|
+
label\="First name"
|
|
1055
|
+
required
|
|
1056
|
+
\>
|
|
1057
|
+
<ForwardedInput
|
|
1058
|
+
id\="firstName"
|
|
1059
|
+
required
|
|
1060
|
+
/>
|
|
1061
|
+
</IressField\>
|
|
1062
|
+
<IressField
|
|
1063
|
+
htmlFor\="lastName"
|
|
1064
|
+
label\="Last name"
|
|
1065
|
+
required
|
|
1066
|
+
\>
|
|
1067
|
+
<ForwardedInput
|
|
1068
|
+
id\="lastName"
|
|
1069
|
+
required
|
|
1070
|
+
/>
|
|
1071
|
+
</IressField\>
|
|
1072
|
+
<IressButton type\="submit"\>
|
|
1073
|
+
Submit </IressButton\>
|
|
1074
|
+
<IressPopover activator\={<IressButton\><IressIcon name\="cog" /></IressButton\>}\>
|
|
1075
|
+
<IressPanel\>
|
|
1076
|
+
Settings goes here </IressPanel\>
|
|
1077
|
+
</IressPopover\>
|
|
1078
|
+
</IressFieldGroup\>
|
|
1079
|
+
</form\>
|
|
1080
|
+
|
|
1081
|
+
```
|
|
1082
|
+
|
|
1083
|
+
#### Props
|
|
1084
|
+
|
|
1085
|
+
| Name | Description | Default | Control |
|
|
1086
|
+
| --- | --- | --- | --- |
|
|
1087
|
+
| children |
|
|
1088
|
+
Should contain multiple `IressField`, or other elements supported in field group such as `IressButton`.
|
|
1089
|
+
|
|
1090
|
+
ReactReactNode
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
| \- | \- |
|
|
1095
|
+
| inline |
|
|
1096
|
+
|
|
1097
|
+
Displays multiple children inline rather than stacked, with a small gap.
|
|
1098
|
+
|
|
1099
|
+
boolean
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
| \- | FalseTrue |
|
|
1104
|
+
| join |
|
|
1105
|
+
|
|
1106
|
+
Displays multiple children inline and removes column gap.
|
|
1107
|
+
|
|
1108
|
+
boolean
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
| \- | Set boolean |
|
|
1113
|
+
| label |
|
|
1114
|
+
|
|
1115
|
+
string
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
| \- | Full name |
|
|
1120
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
1121
|
+
|
|
1122
|
+
### Join
|
|
1123
|
+
|
|
1124
|
+
Elements can also be joined together using the `join` prop. Joined elements won't wrap on to a new line, so make sure you test your designs on small screens; depending on the use case, you may be better off with a standard inline layout (or two separate fields!).
|
|
1125
|
+
|
|
1126
|
+
**Note:** The `join` prop works out of the box with IDS components. To enable your custom components to work with the `join` prop, you need to ensure the direct child of `IressFieldGroup` has the class `GlobalCSSClass.FormElement`. If the direct child is not the element with the border, add the class `GlobalCSSClass.FormElementInner` to the element with the border.
|
|
1127
|
+
|
|
1128
|
+
[](./iframe.html?id=components-field-fieldgroup--join)
|
|
1129
|
+
|
|
1130
|
+
Full name
|
|
1131
|
+
|
|
1132
|
+
Title
|
|
1133
|
+
|
|
1134
|
+
\*Required First name
|
|
1135
|
+
|
|
1136
|
+
\*Required Last name
|
|
1137
|
+
|
|
1138
|
+
Hide codedrawOpen in CodeSandbox
|
|
1139
|
+
|
|
1140
|
+
<IressFieldGroup
|
|
1141
|
+
join
|
|
1142
|
+
label\="Full name"
|
|
1143
|
+
\>
|
|
1144
|
+
<IressField
|
|
1145
|
+
htmlFor\="title"
|
|
1146
|
+
label\="Title"
|
|
1147
|
+
\>
|
|
1148
|
+
<ForwardedInput
|
|
1149
|
+
id\="title"
|
|
1150
|
+
name\="title"
|
|
1151
|
+
type\="text"
|
|
1152
|
+
width\="2"
|
|
1153
|
+
/>
|
|
1154
|
+
</IressField\>
|
|
1155
|
+
<IressField
|
|
1156
|
+
htmlFor\="firstName"
|
|
1157
|
+
label\="First name"
|
|
1158
|
+
required
|
|
1159
|
+
\>
|
|
1160
|
+
<ForwardedInput
|
|
1161
|
+
id\="firstName"
|
|
1162
|
+
name\="firstName"
|
|
1163
|
+
required
|
|
1164
|
+
type\="text"
|
|
1165
|
+
/>
|
|
1166
|
+
</IressField\>
|
|
1167
|
+
<IressField
|
|
1168
|
+
htmlFor\="lastName"
|
|
1169
|
+
label\="Last name"
|
|
1170
|
+
required
|
|
1171
|
+
\>
|
|
1172
|
+
<ForwardedInput
|
|
1173
|
+
id\="lastName"
|
|
1174
|
+
name\="lastName"
|
|
1175
|
+
required
|
|
1176
|
+
type\="text"
|
|
1177
|
+
/>
|
|
1178
|
+
</IressField\>
|
|
1179
|
+
</IressFieldGroup\>
|
|
1180
|
+
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
#### Props
|
|
1184
|
+
|
|
1185
|
+
| Name | Description | Default | Control |
|
|
1186
|
+
| --- | --- | --- | --- |
|
|
1187
|
+
| children |
|
|
1188
|
+
Should contain multiple `IressField`, or other elements supported in field group such as `IressButton`.
|
|
1189
|
+
|
|
1190
|
+
ReactReactNode
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
| \- | \- |
|
|
1195
|
+
| inline |
|
|
1196
|
+
|
|
1197
|
+
Displays multiple children inline rather than stacked, with a small gap.
|
|
1198
|
+
|
|
1199
|
+
boolean
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
| \- | Set boolean |
|
|
1204
|
+
| join |
|
|
1205
|
+
|
|
1206
|
+
Displays multiple children inline and removes column gap.
|
|
1207
|
+
|
|
1208
|
+
boolean
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
| \- | FalseTrue |
|
|
1213
|
+
| label |
|
|
1214
|
+
|
|
1215
|
+
string
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
| \- | Full name |
|
|
1220
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
1221
|
+
|
|
1222
|
+
[](./iframe.html?id=components-field-fieldgroup--join-sink)
|
|
1223
|
+
|
|
1224
|
+
Full name
|
|
1225
|
+
|
|
1226
|
+
Emoji
|
|
1227
|
+
|
|
1228
|
+
Title
|
|
1229
|
+
|
|
1230
|
+
MrMrsMiss
|
|
1231
|
+
|
|
1232
|
+
\*Required First name
|
|
1233
|
+
|
|
1234
|
+
\*Required Last name
|
|
1235
|
+
|
|
1236
|
+
Submit
|
|
1237
|
+
|
|
1238
|
+
Settings goes here
|
|
1239
|
+
|
|
1240
|
+
Hide codedrawOpen in CodeSandbox
|
|
1241
|
+
|
|
1242
|
+
<form\>
|
|
1243
|
+
<IressFieldGroup
|
|
1244
|
+
inline
|
|
1245
|
+
join
|
|
1246
|
+
label\="Full name"
|
|
1247
|
+
\>
|
|
1248
|
+
<IressField
|
|
1249
|
+
htmlFor\="emoji"
|
|
1250
|
+
label\="Emoji"
|
|
1251
|
+
\>
|
|
1252
|
+
<IressRichSelect
|
|
1253
|
+
container\={document.body}
|
|
1254
|
+
id\="emoji"
|
|
1255
|
+
options\={\[
|
|
1256
|
+
{
|
|
1257
|
+
label: '🐶',
|
|
1258
|
+
value: 'dog'
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
label: '🐱',
|
|
1262
|
+
value: 'cat'
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
label: '🐭',
|
|
1266
|
+
value: 'mouse'
|
|
1267
|
+
}
|
|
1268
|
+
\]}
|
|
1269
|
+
width\="2"
|
|
1270
|
+
/>
|
|
1271
|
+
</IressField\>
|
|
1272
|
+
<IressField
|
|
1273
|
+
htmlFor\="title"
|
|
1274
|
+
label\="Title"
|
|
1275
|
+
\>
|
|
1276
|
+
<IressSelect
|
|
1277
|
+
id\="title"
|
|
1278
|
+
width\="2"
|
|
1279
|
+
\>
|
|
1280
|
+
<option value\="mr"\>
|
|
1281
|
+
Mr </option\>
|
|
1282
|
+
<option value\="mrs"\>
|
|
1283
|
+
Mrs </option\>
|
|
1284
|
+
<option value\="miss"\>
|
|
1285
|
+
Miss </option\>
|
|
1286
|
+
</IressSelect\>
|
|
1287
|
+
</IressField\>
|
|
1288
|
+
<IressField
|
|
1289
|
+
htmlFor\="firstName"
|
|
1290
|
+
label\="First name"
|
|
1291
|
+
required
|
|
1292
|
+
\>
|
|
1293
|
+
<ForwardedInput
|
|
1294
|
+
id\="firstName"
|
|
1295
|
+
required
|
|
1296
|
+
/>
|
|
1297
|
+
</IressField\>
|
|
1298
|
+
<IressField
|
|
1299
|
+
htmlFor\="lastName"
|
|
1300
|
+
label\="Last name"
|
|
1301
|
+
required
|
|
1302
|
+
\>
|
|
1303
|
+
<ForwardedInput
|
|
1304
|
+
id\="lastName"
|
|
1305
|
+
required
|
|
1306
|
+
/>
|
|
1307
|
+
</IressField\>
|
|
1308
|
+
<IressButton type\="submit"\>
|
|
1309
|
+
Submit </IressButton\>
|
|
1310
|
+
<IressPopover activator\={<IressButton\><IressIcon name\="cog" /></IressButton\>}\>
|
|
1311
|
+
<IressPanel\>
|
|
1312
|
+
Settings goes here </IressPanel\>
|
|
1313
|
+
</IressPopover\>
|
|
1314
|
+
</IressFieldGroup\>
|
|
1315
|
+
</form\>
|
|
1316
|
+
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
#### Props
|
|
1320
|
+
|
|
1321
|
+
| Name | Description | Default | Control |
|
|
1322
|
+
| --- | --- | --- | --- |
|
|
1323
|
+
| children |
|
|
1324
|
+
Should contain multiple `IressField`, or other elements supported in field group such as `IressButton`.
|
|
1325
|
+
|
|
1326
|
+
ReactReactNode
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
| \- | \- |
|
|
1331
|
+
| inline |
|
|
1332
|
+
|
|
1333
|
+
Displays multiple children inline rather than stacked, with a small gap.
|
|
1334
|
+
|
|
1335
|
+
boolean
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
| \- | FalseTrue |
|
|
1340
|
+
| join |
|
|
1341
|
+
|
|
1342
|
+
Displays multiple children inline and removes column gap.
|
|
1343
|
+
|
|
1344
|
+
boolean
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
| \- | FalseTrue |
|
|
1349
|
+
| label |
|
|
1350
|
+
|
|
1351
|
+
string
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
| \- | Full name |
|
|
1356
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
1357
|
+
|
|
1358
|
+
`IressForm` integration
|
|
1359
|
+
-----------------------
|
|
1360
|
+
|
|
1361
|
+
As of version 5, `IressField` is a standalone component and does not handle validation.
|
|
1362
|
+
|
|
1363
|
+
If you want out-of-the-box validation, use the `IressFormField` inside an `IressForm`. This will handle validation for you, and provide a consistent way to handle form state.
|
|
1364
|
+
|
|
1365
|
+
[
|
|
1366
|
+
|
|
1367
|
+
View forms documentation for fields
|
|
1368
|
+
|
|
1369
|
+
](/?path=/docs/components-form--docs#fields)
|