@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.
Files changed (134) hide show
  1. package/generated/docs/components_components-alert-docs.md +496 -0
  2. package/generated/docs/components_components-autocomplete-docs.md +3429 -0
  3. package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +39 -14
  4. package/generated/docs/{components-badge-docs.md → components_components-badge-docs.md} +222 -30
  5. package/generated/docs/components_components-button-docs.md +2078 -0
  6. package/generated/docs/components_components-button-recipes-docs.md +37 -0
  7. package/generated/docs/components_components-buttongroup-docs.md +1045 -0
  8. package/generated/docs/components_components-card-docs.md +2290 -0
  9. package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +132 -15
  10. package/generated/docs/components_components-checkbox-docs.md +1040 -0
  11. package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1001 -82
  12. package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +102 -12
  13. package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
  14. package/generated/docs/components_components-combobox-docs.md +3735 -0
  15. package/generated/docs/{components-container-docs.md → components_components-container-docs.md} +61 -24
  16. package/generated/docs/{components-divider-docs.md → components_components-divider-docs.md} +83 -24
  17. package/generated/docs/{components-expander-docs.md → components_components-expander-docs.md} +266 -33
  18. package/generated/docs/components_components-field-docs.md +1369 -0
  19. package/generated/docs/components_components-filter-docs.md +4080 -0
  20. package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1556 -360
  21. package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +277 -60
  22. package/generated/docs/{components-hide-docs.md → components_components-hide-docs.md} +195 -124
  23. package/generated/docs/components_components-icon-docs.md +1337 -0
  24. package/generated/docs/{components-inline-docs.md → components_components-inline-docs.md} +462 -42
  25. package/generated/docs/components_components-input-docs.md +1468 -0
  26. package/generated/docs/components_components-input-recipes-docs.md +367 -0
  27. package/generated/docs/components_components-inputcurrency-docs.md +432 -0
  28. package/generated/docs/{components-inputcurrency-recipes-docs.md → components_components-inputcurrency-recipes-docs.md} +113 -17
  29. package/generated/docs/components_components-label-docs.md +323 -0
  30. package/generated/docs/components_components-menu-docs.md +2345 -0
  31. package/generated/docs/components_components-menu-menuitem-docs.md +633 -0
  32. package/generated/docs/{components-modal-docs.md → components_components-modal-docs.md} +1640 -231
  33. package/generated/docs/components_components-navbar-docs.md +1847 -0
  34. package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +721 -40
  35. package/generated/docs/{components-panel-docs.md → components_components-panel-docs.md} +754 -57
  36. package/generated/docs/components_components-placeholder-docs.md +92 -0
  37. package/generated/docs/components_components-popover-docs.md +1643 -0
  38. package/generated/docs/components_components-popover-recipes-docs.md +491 -0
  39. package/generated/docs/components_components-progress-docs.md +115 -0
  40. package/generated/docs/{components-provider-docs.md → components_components-provider-docs.md} +42 -33
  41. package/generated/docs/components_components-radio-docs.md +491 -0
  42. package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +927 -75
  43. package/generated/docs/components_components-readonly-docs.md +263 -0
  44. package/generated/docs/components_components-richselect-docs.md +6521 -0
  45. package/generated/docs/{components-row-docs.md → components_components-row-docs.md} +353 -43
  46. package/generated/docs/{components-select-docs.md → components_components-select-docs.md} +719 -61
  47. package/generated/docs/components_components-skeleton-docs.md +480 -0
  48. package/generated/docs/{components-skeleton-recipes-docs.md → components_components-skeleton-recipes-docs.md} +51 -11
  49. package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
  50. package/generated/docs/components_components-slideout-docs.md +2293 -0
  51. package/generated/docs/components_components-slider-docs.md +1276 -0
  52. package/generated/docs/components_components-spinner-docs.md +82 -0
  53. package/generated/docs/{components-stack-docs.md → components_components-stack-docs.md} +223 -40
  54. package/generated/docs/components_components-table-docs.md +3658 -0
  55. package/generated/docs/components_components-tabset-docs.md +772 -0
  56. package/generated/docs/components_components-tabset-tab-docs.md +262 -0
  57. package/generated/docs/components_components-tag-docs.md +257 -0
  58. package/generated/docs/{components-text-docs.md → components_components-text-docs.md} +491 -51
  59. package/generated/docs/{components-toaster-docs.md → components_components-toaster-docs.md} +187 -85
  60. package/generated/docs/components_components-toaster-toast-docs.md +634 -0
  61. package/generated/docs/components_components-toggle-docs.md +461 -0
  62. package/generated/docs/{components-tooltip-docs.md → components_components-tooltip-docs.md} +286 -41
  63. package/generated/docs/{components-validationmessage-docs.md → components_components-validationmessage-docs.md} +230 -61
  64. package/generated/docs/components_contact-us-docs.md +12 -0
  65. package/generated/docs/{foundations-accessibility-docs.md → components_foundations-accessibility-docs.md} +11 -21
  66. package/generated/docs/{foundations-colours-docs.md → components_foundations-colour-030-colours.md} +8 -15
  67. package/generated/docs/{foundations-consistency-docs.md → components_foundations-consistency-docs.md} +12 -20
  68. package/generated/docs/{foundations-content-docs.md → components_foundations-content-docs.md} +6 -11
  69. package/generated/docs/components_foundations-introduction-docs.md +15 -0
  70. package/generated/docs/{foundations-principles-docs.md → components_foundations-principles-docs.md} +14 -24
  71. package/generated/docs/components_foundations-typography-docs.md +608 -0
  72. package/generated/docs/{foundations-user-experience-docs.md → components_foundations-user-experience-docs.md} +16 -26
  73. package/generated/docs/{foundations-visual-design-docs.md → components_foundations-visual-design-docs.md} +10 -17
  74. package/generated/docs/{frequently-asked-questions-docs.md → components_frequently-asked-questions-docs.md} +14 -23
  75. package/generated/docs/components_get-started-develop-docs.md +84 -0
  76. package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
  77. package/generated/docs/components_introduction-docs.md +15 -0
  78. package/generated/docs/{patterns-loading-docs.md → components_patterns-loading-docs.md} +798 -153
  79. package/generated/docs/components_resources-changelog-docs.md +4 -0
  80. package/generated/docs/{resources-code-katas-docs.md → components_resources-code-katas-docs.md} +5 -9
  81. package/generated/docs/{resources-migration-guides-from-v4-to-v5-docs.md → components_resources-migration-guides-from-v4-to-v5-docs.md} +54 -239
  82. package/generated/docs/components_sandbox-docs.md +4 -0
  83. package/generated/docs/{versions-docs.md → components_versions-docs.md} +5 -8
  84. package/generated/docs/guidelines.md +484 -200
  85. package/generated/docs/introduction-docs.md +19 -30
  86. package/package.json +41 -45
  87. package/generated/docs/components-alert-docs.md +0 -130
  88. package/generated/docs/components-autocomplete-docs.md +0 -754
  89. package/generated/docs/components-button-docs.md +0 -362
  90. package/generated/docs/components-button-recipes-docs.md +0 -76
  91. package/generated/docs/components-buttongroup-docs.md +0 -310
  92. package/generated/docs/components-card-docs.md +0 -494
  93. package/generated/docs/components-checkbox-docs.md +0 -193
  94. package/generated/docs/components-combobox-docs.md +0 -1016
  95. package/generated/docs/components-field-docs.md +0 -675
  96. package/generated/docs/components-filter-docs.md +0 -1109
  97. package/generated/docs/components-icon-docs.md +0 -553
  98. package/generated/docs/components-input-docs.md +0 -335
  99. package/generated/docs/components-input-recipes-docs.md +0 -140
  100. package/generated/docs/components-inputcurrency-docs.md +0 -157
  101. package/generated/docs/components-label-docs.md +0 -135
  102. package/generated/docs/components-menu-docs.md +0 -704
  103. package/generated/docs/components-menu-menuitem-docs.md +0 -193
  104. package/generated/docs/components-navbar-docs.md +0 -291
  105. package/generated/docs/components-placeholder-docs.md +0 -27
  106. package/generated/docs/components-popover-docs.md +0 -464
  107. package/generated/docs/components-popover-recipes-docs.md +0 -245
  108. package/generated/docs/components-progress-docs.md +0 -104
  109. package/generated/docs/components-radio-docs.md +0 -107
  110. package/generated/docs/components-readonly-docs.md +0 -89
  111. package/generated/docs/components-richselect-docs.md +0 -2433
  112. package/generated/docs/components-skeleton-docs.md +0 -214
  113. package/generated/docs/components-slideout-docs.md +0 -538
  114. package/generated/docs/components-slider-docs.md +0 -346
  115. package/generated/docs/components-spinner-docs.md +0 -59
  116. package/generated/docs/components-table-ag-grid-docs.md +0 -1074
  117. package/generated/docs/components-table-docs.md +0 -1305
  118. package/generated/docs/components-tabset-docs.md +0 -341
  119. package/generated/docs/components-tabset-tab-docs.md +0 -86
  120. package/generated/docs/components-tag-docs.md +0 -115
  121. package/generated/docs/components-toaster-toast-docs.md +0 -157
  122. package/generated/docs/components-toggle-docs.md +0 -158
  123. package/generated/docs/contact-us-docs.md +0 -27
  124. package/generated/docs/extensions-editor-docs.md +0 -288
  125. package/generated/docs/extensions-editor-recipes-docs.md +0 -39
  126. package/generated/docs/foundations-introduction-docs.md +0 -17
  127. package/generated/docs/foundations-typography-docs.md +0 -191
  128. package/generated/docs/get-started-develop-docs.md +0 -209
  129. package/generated/docs/get-started-using-storybook-docs.md +0 -68
  130. package/generated/docs/resources-changelog-docs.md +0 -6
  131. package/generated/docs/themes-available-themes-docs.md +0 -66
  132. package/generated/docs/themes-introduction-docs.md +0 -121
  133. package/generated/docs/themes-tokens-docs.md +0 -1200
  134. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -0,0 +1,1468 @@
1
+ Input
2
+ =====
3
+
4
+ Overview
5
+ --------
6
+
7
+ Inputs allow a user to input and interact with data. This component should be used as a child of the `IressField` component to ensure the correct placement of elements like label, error & hint text.
8
+
9
+ [](./iframe.html?id=components-input--default)
10
+
11
+ Hide codedrawOpen in CodeSandbox
12
+
13
+ <ForwardedInput
14
+ append\=""
15
+ placeholder\="Enter your name"
16
+ prepend\=""
17
+ />
18
+
19
+ ```
20
+
21
+ Props
22
+ -----
23
+
24
+ | Name | Description | Default | Control |
25
+ | --- | --- | --- | --- |
26
+ | alignRight |
27
+ Set input content align to right.
28
+
29
+ boolean
30
+
31
+
32
+
33
+ | \- | Set boolean |
34
+ | append |
35
+
36
+ Content to append to the input field, usually a button or icon.
37
+
38
+ ReactReactNode
39
+
40
+
41
+
42
+ | \- |
43
+
44
+ ""
45
+
46
+ |
47
+ | clearable |
48
+
49
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
50
+
51
+ boolean
52
+
53
+
54
+
55
+ | \- | Set boolean |
56
+ | defaultValue |
57
+
58
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
59
+
60
+ T
61
+
62
+
63
+
64
+ | \- | Set object |
65
+ | formatter |
66
+
67
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
68
+
69
+ (value?: T) => string | number
70
+
71
+ | \- | \- |
72
+ | inline |
73
+
74
+ Make prepend/append element closer to the input content.
75
+
76
+ boolean
77
+
78
+
79
+
80
+ | \- | Set boolean |
81
+ | loading |
82
+
83
+ The loading states of the input field. If provided a string, will use that text as the loading message.
84
+
85
+ union
86
+
87
+
88
+
89
+ | \- | Set object |
90
+ | onChange |
91
+
92
+ Emitted when the input value changes with the new changed value.
93
+
94
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
95
+
96
+ | \- | \- |
97
+ | onClear |
98
+
99
+ Emitted when the input is manually cleared.
100
+
101
+ (e: React.ChangeEvent<InputBaseElement>) => void
102
+
103
+ | \- | \- |
104
+ | placeholder |
105
+
106
+ string
107
+
108
+
109
+
110
+ | \- | Enter your name |
111
+ | prepend |
112
+
113
+ Content to prepended to the input field, usually an icon.
114
+
115
+ ReactReactNode
116
+
117
+
118
+
119
+ | \- |
120
+
121
+ ""
122
+
123
+ |
124
+ | value |
125
+
126
+ The value of the input. Can be a string or a number. Use for controlled inputs.
127
+
128
+ T
129
+
130
+
131
+
132
+ | \- | Set object |
133
+ | watermark |
134
+
135
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
136
+
137
+ boolean
138
+
139
+
140
+
141
+ | \- | Set boolean |
142
+ | width |
143
+
144
+ The width of the input.
145
+
146
+ union
147
+
148
+
149
+
150
+ | \- | Set object |
151
+
152
+ Examples
153
+ --------
154
+
155
+ ### Types
156
+
157
+ The input component's `type` can be set to one of the following value: `text` (default), `date`, `email`, `number`, `password`, `search`, `tel`, `url`, `time`, `color` and `file`.
158
+
159
+ For more information about each type, please see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types).
160
+
161
+ [](./iframe.html?id=components-input--types)
162
+
163
+ Hide codedrawOpen in CodeSandbox
164
+
165
+ <IressStack gutter\="md"\>
166
+ <ForwardedInput
167
+ placeholder\="Text input"
168
+ type\="text"
169
+ />
170
+ <ForwardedInput
171
+ placeholder\="Color input"
172
+ type\="color"
173
+ />
174
+ <ForwardedInput
175
+ placeholder\="Date input"
176
+ type\="date"
177
+ />
178
+ <ForwardedInput
179
+ placeholder\="Datetime-local input"
180
+ type\="datetime-local"
181
+ />
182
+ <ForwardedInput
183
+ placeholder\="Email input"
184
+ type\="email"
185
+ />
186
+ <ForwardedInput
187
+ placeholder\="File input"
188
+ type\="file"
189
+ />
190
+ <ForwardedInput
191
+ placeholder\="Month input"
192
+ type\="month"
193
+ />
194
+ <ForwardedInput
195
+ placeholder\="Number input"
196
+ type\="number"
197
+ />
198
+ <ForwardedInput
199
+ placeholder\="Password input"
200
+ type\="password"
201
+ />
202
+ <ForwardedInput
203
+ placeholder\="Search input"
204
+ type\="search"
205
+ />
206
+ <ForwardedInput
207
+ placeholder\="Tel input"
208
+ type\="tel"
209
+ />
210
+ <ForwardedInput
211
+ placeholder\="Time input"
212
+ type\="time"
213
+ />
214
+ <ForwardedInput
215
+ placeholder\="Url input"
216
+ type\="url"
217
+ />
218
+ <ForwardedInput
219
+ placeholder\="Week input"
220
+ type\="week"
221
+ />
222
+ </IressStack\>
223
+
224
+ ```
225
+
226
+ #### Props
227
+
228
+ | Name | Description | Default | Control |
229
+ | --- | --- | --- | --- |
230
+ | alignRight |
231
+ Set input content align to right.
232
+
233
+ boolean
234
+
235
+
236
+
237
+ | \- | Set boolean |
238
+ | append |
239
+
240
+ Content to append to the input field, usually a button or icon.
241
+
242
+ ReactReactNode
243
+
244
+
245
+
246
+ | \- | Set object |
247
+ | clearable |
248
+
249
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
250
+
251
+ boolean
252
+
253
+
254
+
255
+ | \- | Set boolean |
256
+ | defaultValue |
257
+
258
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
259
+
260
+ T
261
+
262
+
263
+
264
+ | \- | Set object |
265
+ | formatter |
266
+
267
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
268
+
269
+ (value?: T) => string | number
270
+
271
+ | \- | \- |
272
+ | inline |
273
+
274
+ Make prepend/append element closer to the input content.
275
+
276
+ boolean
277
+
278
+
279
+
280
+ | \- | Set boolean |
281
+ | loading |
282
+
283
+ The loading states of the input field. If provided a string, will use that text as the loading message.
284
+
285
+ union
286
+
287
+
288
+
289
+ | \- | Set object |
290
+ | onChange |
291
+
292
+ Emitted when the input value changes with the new changed value.
293
+
294
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
295
+
296
+ | \- | \- |
297
+ | onClear |
298
+
299
+ Emitted when the input is manually cleared.
300
+
301
+ (e: React.ChangeEvent<InputBaseElement>) => void
302
+
303
+ | \- | \- |
304
+ | prepend |
305
+
306
+ Content to prepended to the input field, usually an icon.
307
+
308
+ ReactReactNode
309
+
310
+
311
+
312
+ | \- | Set object |
313
+ | type |
314
+
315
+ \-
316
+
317
+ | \- | \- |
318
+ | value |
319
+
320
+ The value of the input. Can be a string or a number. Use for controlled inputs.
321
+
322
+ T
323
+
324
+
325
+
326
+ | \- | Set object |
327
+ | watermark |
328
+
329
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
330
+
331
+ boolean
332
+
333
+
334
+
335
+ | \- | Set boolean |
336
+ | width |
337
+
338
+ The width of the input.
339
+
340
+ union
341
+
342
+
343
+
344
+ | \- | Set object |
345
+
346
+ Hidden inputs
347
+ -------------
348
+
349
+ If you need to use a hidden input in a form, you can use a native Input element with its `type` set to `hidden`. Remember to set the `name` attribute so it can be included in form submissions.
350
+
351
+ ### Input modes
352
+
353
+ The `inputmode` attribute provides a hint to browsers for devices with onscreen keyboards (usually mobile devices) to help them decide which keyboard to display when a user has selected any input or textarea element.
354
+
355
+ For more information about each mode (and their expected user experience), please see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode).
356
+
357
+ [](./iframe.html?id=components-input--input-modes)
358
+
359
+ Hide codedrawOpen in CodeSandbox
360
+
361
+ <IressStack gutter\="md"\>
362
+ <ForwardedInput
363
+ inputMode\="text"
364
+ placeholder\="Text mode, usually best used when type=&quot;text&quot; "
365
+ />
366
+ <ForwardedInput
367
+ inputMode\="tel"
368
+ placeholder\="Tel mode, usually best used when type=&quot;tel&quot; "
369
+ />
370
+ <ForwardedInput
371
+ inputMode\="url"
372
+ placeholder\="Url mode, usually best used when type=&quot;url&quot; "
373
+ />
374
+ <ForwardedInput
375
+ inputMode\="email"
376
+ placeholder\="Email mode, usually best used when type=&quot;email&quot; "
377
+ />
378
+ <ForwardedInput
379
+ inputMode\="numeric"
380
+ placeholder\="Numeric mode, usually best used when type=&quot;numeric&quot; "
381
+ />
382
+ <ForwardedInput
383
+ inputMode\="decimal"
384
+ placeholder\="Decimal mode, usually best used when type=&quot;decimal&quot; "
385
+ />
386
+ <ForwardedInput
387
+ inputMode\="search"
388
+ placeholder\="Search mode, usually best used when type=&quot;search&quot; "
389
+ />
390
+ </IressStack\>
391
+
392
+ ```
393
+
394
+ #### Props
395
+
396
+ | Name | Description | Default | Control |
397
+ | --- | --- | --- | --- |
398
+ | alignRight |
399
+ Set input content align to right.
400
+
401
+ boolean
402
+
403
+
404
+
405
+ | \- | Set boolean |
406
+ | append |
407
+
408
+ Content to append to the input field, usually a button or icon.
409
+
410
+ ReactReactNode
411
+
412
+
413
+
414
+ | \- | Set object |
415
+ | clearable |
416
+
417
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
418
+
419
+ boolean
420
+
421
+
422
+
423
+ | \- | Set boolean |
424
+ | defaultValue |
425
+
426
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
427
+
428
+ T
429
+
430
+
431
+
432
+ | \- | Set object |
433
+ | formatter |
434
+
435
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
436
+
437
+ (value?: T) => string | number
438
+
439
+ | \- | \- |
440
+ | inline |
441
+
442
+ Make prepend/append element closer to the input content.
443
+
444
+ boolean
445
+
446
+
447
+
448
+ | \- | Set boolean |
449
+ | inputMode |
450
+
451
+ \-
452
+
453
+ | \- | \- |
454
+ | loading |
455
+
456
+ The loading states of the input field. If provided a string, will use that text as the loading message.
457
+
458
+ union
459
+
460
+
461
+
462
+ | \- | Set object |
463
+ | onChange |
464
+
465
+ Emitted when the input value changes with the new changed value.
466
+
467
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
468
+
469
+ | \- | \- |
470
+ | onClear |
471
+
472
+ Emitted when the input is manually cleared.
473
+
474
+ (e: React.ChangeEvent<InputBaseElement>) => void
475
+
476
+ | \- | \- |
477
+ | prepend |
478
+
479
+ Content to prepended to the input field, usually an icon.
480
+
481
+ ReactReactNode
482
+
483
+
484
+
485
+ | \- | Set object |
486
+ | value |
487
+
488
+ The value of the input. Can be a string or a number. Use for controlled inputs.
489
+
490
+ T
491
+
492
+
493
+
494
+ | \- | Set object |
495
+ | watermark |
496
+
497
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
498
+
499
+ boolean
500
+
501
+
502
+
503
+ | \- | Set boolean |
504
+ | width |
505
+
506
+ The width of the input.
507
+
508
+ union
509
+
510
+
511
+
512
+ | \- | Set object |
513
+
514
+ ### Clearable
515
+
516
+ By setting the `clearable` prop to `true` a clear button will appear when the user has entered a value into the input.
517
+
518
+ Clearing will set the focus on the input and trigger the `onClear` handler. Use this handler to clear the input value if your input is controlled.
519
+
520
+ [](./iframe.html?id=components-input--clearable)
521
+
522
+ Hide codedrawOpen in CodeSandbox
523
+
524
+ <ForwardedInput
525
+ clearable
526
+ placeholder\="Search"
527
+ prepend\={<IressIcon name\="search" />}
528
+ />
529
+
530
+ ```
531
+
532
+ #### Props
533
+
534
+ | Name | Description | Default | Control |
535
+ | --- | --- | --- | --- |
536
+ | alignRight |
537
+ Set input content align to right.
538
+
539
+ boolean
540
+
541
+
542
+
543
+ | \- | Set boolean |
544
+ | append |
545
+
546
+ Content to append to the input field, usually a button or icon.
547
+
548
+ ReactReactNode
549
+
550
+
551
+
552
+ | \- | Set object |
553
+ | clearable |
554
+
555
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
556
+
557
+ boolean
558
+
559
+
560
+
561
+ | \- | FalseTrue |
562
+ | defaultValue |
563
+
564
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
565
+
566
+ T
567
+
568
+
569
+
570
+ | \- | Set object |
571
+ | formatter |
572
+
573
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
574
+
575
+ (value?: T) => string | number
576
+
577
+ | \- | \- |
578
+ | inline |
579
+
580
+ Make prepend/append element closer to the input content.
581
+
582
+ boolean
583
+
584
+
585
+
586
+ | \- | Set boolean |
587
+ | loading |
588
+
589
+ The loading states of the input field. If provided a string, will use that text as the loading message.
590
+
591
+ union
592
+
593
+
594
+
595
+ | \- | Set object |
596
+ | onChange |
597
+
598
+ Emitted when the input value changes with the new changed value.
599
+
600
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
601
+
602
+ | \- | \- |
603
+ | onClear |
604
+
605
+ Emitted when the input is manually cleared.
606
+
607
+ (e: React.ChangeEvent<InputBaseElement>) => void
608
+
609
+ | \- | \- |
610
+ | placeholder |
611
+
612
+ string
613
+
614
+
615
+
616
+ | \- | Search |
617
+ | prepend |
618
+
619
+ Content to prepended to the input field, usually an icon.
620
+
621
+ ReactReactNode
622
+
623
+
624
+
625
+ | \- |
626
+
627
+ Edit JSON
628
+
629
+ prepend :
630
+
631
+ {
632
+
633
+ * $$typeof : Symbol(react.transitional.element)
634
+ * type :
635
+
636
+ {...} 9 keys
637
+
638
+ * key : null
639
+ * props :
640
+
641
+ {...} 1 key
642
+
643
+ * \_owner : null
644
+ * \_store :
645
+
646
+ {...} 0 keys
647
+
648
+
649
+ }
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+ |
658
+ | value |
659
+
660
+ The value of the input. Can be a string or a number. Use for controlled inputs.
661
+
662
+ T
663
+
664
+
665
+
666
+ | \- | Set object |
667
+ | watermark |
668
+
669
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
670
+
671
+ boolean
672
+
673
+
674
+
675
+ | \- | Set boolean |
676
+ | width |
677
+
678
+ The width of the input.
679
+
680
+ union
681
+
682
+
683
+
684
+ | \- | Set object |
685
+
686
+ ### Sizing
687
+
688
+ Inputs can be resized to suit a specific number of characters. This sets an expectation of what data a user has to enter; for example using the `Sixteen` width for a credit card number.
689
+
690
+ The width in this case refers to the actual input and ensures that it is wide enough for a set number of characters. If you add any appended or prepended content, the overall size of the `IressInput` will increase.
691
+
692
+ Widths can also be set as a percentage, allowing the input to take up a proportion of the width of its container. In this case, the width of the actual input decreases if you add appended or prepended content.
693
+
694
+ [](./iframe.html?id=components-input--sizing)
695
+
696
+ Hide codedrawOpen in CodeSandbox
697
+
698
+ <IressStack gutter\="md"\>
699
+ <ForwardedInput
700
+ placeholder\="2"
701
+ width\="2"
702
+ />
703
+ <ForwardedInput
704
+ placeholder\="4"
705
+ width\="4"
706
+ />
707
+ <ForwardedInput
708
+ placeholder\="6"
709
+ width\="6"
710
+ />
711
+ <ForwardedInput
712
+ placeholder\="8"
713
+ width\="8"
714
+ />
715
+ <ForwardedInput
716
+ placeholder\="10"
717
+ width\="10"
718
+ />
719
+ <ForwardedInput
720
+ placeholder\="12"
721
+ width\="12"
722
+ />
723
+ <ForwardedInput
724
+ placeholder\="16"
725
+ width\="16"
726
+ />
727
+ <ForwardedInput
728
+ placeholder\="25perc"
729
+ width\="25perc"
730
+ />
731
+ <ForwardedInput
732
+ placeholder\="50perc"
733
+ width\="50perc"
734
+ />
735
+ <ForwardedInput
736
+ placeholder\="75perc"
737
+ width\="75perc"
738
+ />
739
+ <ForwardedInput
740
+ placeholder\="100perc"
741
+ width\="100perc"
742
+ />
743
+ </IressStack\>
744
+
745
+ ```
746
+
747
+ #### Props
748
+
749
+ | Name | Description | Default | Control |
750
+ | --- | --- | --- | --- |
751
+ | alignRight |
752
+ Set input content align to right.
753
+
754
+ boolean
755
+
756
+
757
+
758
+ | \- | Set boolean |
759
+ | append |
760
+
761
+ Content to append to the input field, usually a button or icon.
762
+
763
+ ReactReactNode
764
+
765
+
766
+
767
+ | \- | Set object |
768
+ | clearable |
769
+
770
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
771
+
772
+ boolean
773
+
774
+
775
+
776
+ | \- | Set boolean |
777
+ | defaultValue |
778
+
779
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
780
+
781
+ T
782
+
783
+
784
+
785
+ | \- | Set object |
786
+ | formatter |
787
+
788
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
789
+
790
+ (value?: T) => string | number
791
+
792
+ | \- | \- |
793
+ | inline |
794
+
795
+ Make prepend/append element closer to the input content.
796
+
797
+ boolean
798
+
799
+
800
+
801
+ | \- | Set boolean |
802
+ | loading |
803
+
804
+ The loading states of the input field. If provided a string, will use that text as the loading message.
805
+
806
+ union
807
+
808
+
809
+
810
+ | \- | Set object |
811
+ | onChange |
812
+
813
+ Emitted when the input value changes with the new changed value.
814
+
815
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
816
+
817
+ | \- | \- |
818
+ | onClear |
819
+
820
+ Emitted when the input is manually cleared.
821
+
822
+ (e: React.ChangeEvent<InputBaseElement>) => void
823
+
824
+ | \- | \- |
825
+ | prepend |
826
+
827
+ Content to prepended to the input field, usually an icon.
828
+
829
+ ReactReactNode
830
+
831
+
832
+
833
+ | \- | Set object |
834
+ | value |
835
+
836
+ The value of the input. Can be a string or a number. Use for controlled inputs.
837
+
838
+ T
839
+
840
+
841
+
842
+ | \- | Set object |
843
+ | watermark |
844
+
845
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
846
+
847
+ boolean
848
+
849
+
850
+
851
+ | \- | Set boolean |
852
+ | width |
853
+
854
+ The width of the input.
855
+
856
+ union
857
+
858
+
859
+
860
+ | \- | \- |
861
+
862
+ ### Textareas
863
+
864
+ You can also use `IressInput` to render a `textarea` instead of an `input`. Simply set the rows prop to the number of lines of text you'd like to display. This will set the height of the `textarea`; if a user enters more lines of text than the number of rows, a scrollbar will be displayed.
865
+
866
+ [](./iframe.html?id=components-input--text-areas)
867
+
868
+ Hide codedrawOpen in CodeSandbox
869
+
870
+ <ForwardedInput rows\={5} />
871
+
872
+ ```
873
+
874
+ #### Props
875
+
876
+ | Name | Description | Default | Control |
877
+ | --- | --- | --- | --- |
878
+ | alignRight |
879
+ Set input content align to right.
880
+
881
+ boolean
882
+
883
+
884
+
885
+ | \- | Set boolean |
886
+ | append |
887
+
888
+ Content to append to the input field, usually a button or icon.
889
+
890
+ ReactReactNode
891
+
892
+
893
+
894
+ | \- | Set object |
895
+ | clearable |
896
+
897
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
898
+
899
+ boolean
900
+
901
+
902
+
903
+ | \- | Set boolean |
904
+ | defaultValue |
905
+
906
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
907
+
908
+ T
909
+
910
+
911
+
912
+ | \- | Set object |
913
+ | formatter |
914
+
915
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
916
+
917
+ (value?: T) => string | number
918
+
919
+ | \- | \- |
920
+ | inline |
921
+
922
+ Make prepend/append element closer to the input content.
923
+
924
+ boolean
925
+
926
+
927
+
928
+ | \- | Set boolean |
929
+ | loading |
930
+
931
+ The loading states of the input field. If provided a string, will use that text as the loading message.
932
+
933
+ union
934
+
935
+
936
+
937
+ | \- | Set object |
938
+ | onChange |
939
+
940
+ Emitted when the input value changes with the new changed value.
941
+
942
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
943
+
944
+ | \- | \- |
945
+ | onClear |
946
+
947
+ Emitted when the input is manually cleared.
948
+
949
+ (e: React.ChangeEvent<InputBaseElement>) => void
950
+
951
+ | \- | \- |
952
+ | prepend |
953
+
954
+ Content to prepended to the input field, usually an icon.
955
+
956
+ ReactReactNode
957
+
958
+
959
+
960
+ | \- | Set object |
961
+ | rows |
962
+
963
+ number
964
+
965
+
966
+
967
+ | \- | |
968
+ | value |
969
+
970
+ The value of the input. Can be a string or a number. Use for controlled inputs.
971
+
972
+ T
973
+
974
+
975
+
976
+ | \- | Set object |
977
+ | watermark |
978
+
979
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
980
+
981
+ boolean
982
+
983
+
984
+
985
+ | \- | Set boolean |
986
+ | width |
987
+
988
+ The width of the input.
989
+
990
+ union
991
+
992
+
993
+
994
+ | \- | Set object |
995
+
996
+ ### Slot props
997
+
998
+ Content (typically icons) can be added to slots (`append` and `prepend`) within the `IressInput` component.
999
+
1000
+ * **Prepend**: appears before the input
1001
+ * **Append**: appears after the input
1002
+
1003
+ By setting the watermark prop to true the add ons will render in a different style, which is set in the theme.
1004
+
1005
+ [](./iframe.html?id=components-input--slots)
1006
+
1007
+ Hide codedrawOpen in CodeSandbox
1008
+
1009
+ <IressStack gutter\="md"\>
1010
+ <ForwardedInput
1011
+ placeholder\="Prepend slot"
1012
+ prepend\={<IressIcon name\="search" />}
1013
+ />
1014
+ <ForwardedInput
1015
+ append\={<IressIcon name\="search" />}
1016
+ placeholder\="Append slot"
1017
+ />
1018
+ <ForwardedInput
1019
+ placeholder\="Watermark prepend slot"
1020
+ prepend\={<IressIcon name\="search" />}
1021
+ watermark
1022
+ />
1023
+ <ForwardedInput
1024
+ append\={<IressIcon name\="search" />}
1025
+ placeholder\="Watermark append slot"
1026
+ watermark
1027
+ />
1028
+ </IressStack\>
1029
+
1030
+ ```
1031
+
1032
+ #### Props
1033
+
1034
+ | Name | Description | Default | Control |
1035
+ | --- | --- | --- | --- |
1036
+ | alignRight |
1037
+ Set input content align to right.
1038
+
1039
+ boolean
1040
+
1041
+
1042
+
1043
+ | \- | Set boolean |
1044
+ | append |
1045
+
1046
+ Content to append to the input field, usually a button or icon.
1047
+
1048
+ ReactReactNode
1049
+
1050
+
1051
+
1052
+ | \- | Set object |
1053
+ | clearable |
1054
+
1055
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
1056
+
1057
+ boolean
1058
+
1059
+
1060
+
1061
+ | \- | Set boolean |
1062
+ | defaultValue |
1063
+
1064
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
1065
+
1066
+ T
1067
+
1068
+
1069
+
1070
+ | \- | Set object |
1071
+ | formatter |
1072
+
1073
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
1074
+
1075
+ (value?: T) => string | number
1076
+
1077
+ | \- | \- |
1078
+ | inline |
1079
+
1080
+ Make prepend/append element closer to the input content.
1081
+
1082
+ boolean
1083
+
1084
+
1085
+
1086
+ | \- | Set boolean |
1087
+ | loading |
1088
+
1089
+ The loading states of the input field. If provided a string, will use that text as the loading message.
1090
+
1091
+ union
1092
+
1093
+
1094
+
1095
+ | \- | Set object |
1096
+ | onChange |
1097
+
1098
+ Emitted when the input value changes with the new changed value.
1099
+
1100
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
1101
+
1102
+ | \- | \- |
1103
+ | onClear |
1104
+
1105
+ Emitted when the input is manually cleared.
1106
+
1107
+ (e: React.ChangeEvent<InputBaseElement>) => void
1108
+
1109
+ | \- | \- |
1110
+ | prepend |
1111
+
1112
+ Content to prepended to the input field, usually an icon.
1113
+
1114
+ ReactReactNode
1115
+
1116
+
1117
+
1118
+ | \- | Set object |
1119
+ | value |
1120
+
1121
+ The value of the input. Can be a string or a number. Use for controlled inputs.
1122
+
1123
+ T
1124
+
1125
+
1126
+
1127
+ | \- | Set object |
1128
+ | watermark |
1129
+
1130
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
1131
+
1132
+ boolean
1133
+
1134
+
1135
+
1136
+ | \- | \- |
1137
+ | width |
1138
+
1139
+ The width of the input.
1140
+
1141
+ union
1142
+
1143
+
1144
+
1145
+ | \- | Set object |
1146
+
1147
+ ### Readonly
1148
+
1149
+ The `readOnly` prop can be set to prevent the user from changing the value of the input. This will change the input to a custom read-only style and the user will not be able to interact with the input.
1150
+
1151
+ If you need more control over the read-only state (for example, rendering a stylised version of the value), you can use the [`IressReadonly` component](?path=/docs/components-readonly--docs).
1152
+
1153
+ [](./iframe.html?id=components-input--readonly)
1154
+
1155
+ Value
1156
+
1157
+ Hide codedrawOpen in CodeSandbox
1158
+
1159
+ <ForwardedInput
1160
+ append\=""
1161
+ placeholder\="Enter your name"
1162
+ prepend\=""
1163
+ readOnly
1164
+ value\="Value"
1165
+ />
1166
+
1167
+ ```
1168
+
1169
+ #### Props
1170
+
1171
+ | Name | Description | Default | Control |
1172
+ | --- | --- | --- | --- |
1173
+ | alignRight |
1174
+ Set input content align to right.
1175
+
1176
+ boolean
1177
+
1178
+
1179
+
1180
+ | \- | Set boolean |
1181
+ | append |
1182
+
1183
+ Content to append to the input field, usually a button or icon.
1184
+
1185
+ ReactReactNode
1186
+
1187
+
1188
+
1189
+ | \- |
1190
+
1191
+ ""
1192
+
1193
+ |
1194
+ | clearable |
1195
+
1196
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
1197
+
1198
+ boolean
1199
+
1200
+
1201
+
1202
+ | \- | Set boolean |
1203
+ | defaultValue |
1204
+
1205
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
1206
+
1207
+ T
1208
+
1209
+
1210
+
1211
+ | \- | Set object |
1212
+ | formatter |
1213
+
1214
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
1215
+
1216
+ (value?: T) => string | number
1217
+
1218
+ | \- | \- |
1219
+ | inline |
1220
+
1221
+ Make prepend/append element closer to the input content.
1222
+
1223
+ boolean
1224
+
1225
+
1226
+
1227
+ | \- | Set boolean |
1228
+ | loading |
1229
+
1230
+ The loading states of the input field. If provided a string, will use that text as the loading message.
1231
+
1232
+ union
1233
+
1234
+
1235
+
1236
+ | \- | Set object |
1237
+ | onChange |
1238
+
1239
+ Emitted when the input value changes with the new changed value.
1240
+
1241
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
1242
+
1243
+ | \- | \- |
1244
+ | onClear |
1245
+
1246
+ Emitted when the input is manually cleared.
1247
+
1248
+ (e: React.ChangeEvent<InputBaseElement>) => void
1249
+
1250
+ | \- | \- |
1251
+ | placeholder |
1252
+
1253
+ string
1254
+
1255
+
1256
+
1257
+ | \- | Enter your name |
1258
+ | prepend |
1259
+
1260
+ Content to prepended to the input field, usually an icon.
1261
+
1262
+ ReactReactNode
1263
+
1264
+
1265
+
1266
+ | \- |
1267
+
1268
+ ""
1269
+
1270
+ |
1271
+ | readOnly |
1272
+
1273
+ boolean
1274
+
1275
+
1276
+
1277
+ | \- | FalseTrue |
1278
+ | value |
1279
+
1280
+ The value of the input. Can be a string or a number. Use for controlled inputs.
1281
+
1282
+ T
1283
+
1284
+
1285
+
1286
+ | \- |
1287
+
1288
+ "Value"
1289
+
1290
+ |
1291
+ | watermark |
1292
+
1293
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
1294
+
1295
+ boolean
1296
+
1297
+
1298
+
1299
+ | \- | Set boolean |
1300
+ | width |
1301
+
1302
+ The width of the input.
1303
+
1304
+ union
1305
+
1306
+
1307
+
1308
+ | \- | Set object |
1309
+
1310
+ ### Formatter
1311
+
1312
+ `formatter` allows you to display the value in a different format when the input is not focused. A typical use case is to format a string with currency symbols and commas.
1313
+
1314
+ This prop powers the `IressInputCurrency` component to allow friendly and consistent currency display in Iress products.
1315
+
1316
+ **Notes:**
1317
+
1318
+ * When `formatter` is set, the `type` of the input is changed to `text` when not in focus. Keep this in mind when you are testing the component. If you have set the `type` to number and have set a `formatter`, the role of the input will be `textbox` when not in focus, but `spinbutton` when in focus.
1319
+ * The value of the native input will be the formatted value, not the raw value. If you need the raw value, you can use the `onChange` prop to capture the raw value.
1320
+
1321
+ The example below changes the value entered to uppercase when the input is not focused.
1322
+
1323
+ [](./iframe.html?id=components-input--formatter)
1324
+
1325
+ Hide codedrawOpen in CodeSandbox
1326
+
1327
+ <ForwardedInput
1328
+ append\=""
1329
+ formatter\={(value) \=> value ? value.toString().toUpperCase() : ""}
1330
+ placeholder\="Enter a string and it will show in UPPERCASE when not focused, and show the raw value on focus"
1331
+ prepend\=""
1332
+ />
1333
+
1334
+ ```
1335
+
1336
+ #### Props
1337
+
1338
+ | Name | Description | Default | Control |
1339
+ | --- | --- | --- | --- |
1340
+ | alignRight |
1341
+ Set input content align to right.
1342
+
1343
+ boolean
1344
+
1345
+
1346
+
1347
+ | \- | Set boolean |
1348
+ | append |
1349
+
1350
+ Content to append to the input field, usually a button or icon.
1351
+
1352
+ ReactReactNode
1353
+
1354
+
1355
+
1356
+ | \- |
1357
+
1358
+ ""
1359
+
1360
+ |
1361
+ | clearable |
1362
+
1363
+ If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
1364
+
1365
+ boolean
1366
+
1367
+
1368
+
1369
+ | \- | Set boolean |
1370
+ | defaultValue |
1371
+
1372
+ The value of the input. Can be a string or a number. Use for uncontrolled inputs.
1373
+
1374
+ T
1375
+
1376
+
1377
+
1378
+ | \- | Set object |
1379
+ | formatter |
1380
+
1381
+ Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
1382
+
1383
+ (value?: T) => string | number
1384
+
1385
+ | \- | \- |
1386
+ | inline |
1387
+
1388
+ Make prepend/append element closer to the input content.
1389
+
1390
+ boolean
1391
+
1392
+
1393
+
1394
+ | \- | Set boolean |
1395
+ | loading |
1396
+
1397
+ The loading states of the input field. If provided a string, will use that text as the loading message.
1398
+
1399
+ union
1400
+
1401
+
1402
+
1403
+ | \- | Set object |
1404
+ | onChange |
1405
+
1406
+ Emitted when the input value changes with the new changed value.
1407
+
1408
+ (e: React.ChangeEvent<InputBaseElement>, value: T) => void
1409
+
1410
+ | \- | \- |
1411
+ | onClear |
1412
+
1413
+ Emitted when the input is manually cleared.
1414
+
1415
+ (e: React.ChangeEvent<InputBaseElement>) => void
1416
+
1417
+ | \- | \- |
1418
+ | placeholder |
1419
+
1420
+ string
1421
+
1422
+
1423
+
1424
+ | \- | Enter a string and it will show in UPPERCASE when not focused, and show the raw value on focus |
1425
+ | prepend |
1426
+
1427
+ Content to prepended to the input field, usually an icon.
1428
+
1429
+ ReactReactNode
1430
+
1431
+
1432
+
1433
+ | \- |
1434
+
1435
+ ""
1436
+
1437
+ |
1438
+ | value |
1439
+
1440
+ The value of the input. Can be a string or a number. Use for controlled inputs.
1441
+
1442
+ T
1443
+
1444
+
1445
+
1446
+ | \- | Set object |
1447
+ | watermark |
1448
+
1449
+ When set to `true` add ons will render with a different style. Will be ignored if `prepend` or `append` props are not being used.
1450
+
1451
+ boolean
1452
+
1453
+
1454
+
1455
+ | \- | Set boolean |
1456
+ | width |
1457
+
1458
+ The width of the input.
1459
+
1460
+ union
1461
+
1462
+
1463
+
1464
+ | \- | Set object |
1465
+
1466
+ ### `onChange` and `onInput`
1467
+
1468
+ As of version 5, the `onChange` and `onInput` events are now consistent with how React handles the events. This means that the `onChange` event will fire at the same time as `onInput`.