@iress-oss/ids-mcp-server 5.14.2 → 5.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/docs/components_components-alert-docs.md +492 -0
- package/generated/docs/components_components-autocomplete-docs.md +3485 -0
- package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +32 -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 +2276 -0
- package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +131 -14
- package/generated/docs/components_components-checkbox-docs.md +1054 -0
- package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1000 -81
- package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +101 -11
- package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
- package/generated/docs/components_components-combobox-docs.md +3767 -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} +264 -33
- package/generated/docs/{components-field-docs.md → components_components-field-docs.md} +814 -120
- package/generated/docs/components_components-filter-docs.md +4080 -0
- package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1488 -358
- package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +174 -64
- package/generated/docs/components_components-hide-docs.md +293 -0
- 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} +110 -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} +1625 -232
- package/generated/docs/components_components-navbar-docs.md +1847 -0
- package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +697 -39
- 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 +1641 -0
- package/generated/docs/{components-popover-recipes-docs.md → components_components-popover-recipes-docs.md} +347 -17
- package/generated/docs/components_components-progress-docs.md +115 -0
- package/generated/docs/components_components-provider-docs.md +114 -0
- package/generated/docs/components_components-radio-docs.md +491 -0
- package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +943 -75
- package/generated/docs/components_components-readonly-docs.md +263 -0
- package/generated/docs/components_components-richselect-docs.md +6497 -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} +50 -10
- package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
- package/generated/docs/components_components-slideout-docs.md +2262 -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 +3651 -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 +259 -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} +224 -71
- 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} +711 -143
- 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/{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-filter-docs.md +0 -1109
- package/generated/docs/components-hide-docs.md +0 -265
- 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-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 -2666
- 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 -48
- 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
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
[](#input)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
|
-
Hide code
|
|
10
|
-
|
|
11
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
12
|
-
|
|
13
|
-
<IressInput
|
|
14
|
-
append\=""
|
|
15
|
-
placeholder\="Enter your name"
|
|
16
|
-
prepend\=""
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
Copy
|
|
20
|
-
|
|
21
|
-
[](#examples)Examples
|
|
22
|
-
---------------------
|
|
23
|
-
|
|
24
|
-
### [](#types)Types
|
|
25
|
-
|
|
26
|
-
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`.
|
|
27
|
-
|
|
28
|
-
For more information about each type, please see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types).
|
|
29
|
-
|
|
30
|
-
Hide code
|
|
31
|
-
|
|
32
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
33
|
-
|
|
34
|
-
<IressStack gutter\="md"\>
|
|
35
|
-
<IressInput
|
|
36
|
-
placeholder\="Text input"
|
|
37
|
-
type\="text"
|
|
38
|
-
/>
|
|
39
|
-
<IressInput
|
|
40
|
-
placeholder\="Color input"
|
|
41
|
-
type\="color"
|
|
42
|
-
/>
|
|
43
|
-
<IressInput
|
|
44
|
-
placeholder\="Date input"
|
|
45
|
-
type\="date"
|
|
46
|
-
/>
|
|
47
|
-
<IressInput
|
|
48
|
-
placeholder\="Datetime-local input"
|
|
49
|
-
type\="datetime-local"
|
|
50
|
-
/>
|
|
51
|
-
<IressInput
|
|
52
|
-
placeholder\="Email input"
|
|
53
|
-
type\="email"
|
|
54
|
-
/>
|
|
55
|
-
<IressInput
|
|
56
|
-
placeholder\="File input"
|
|
57
|
-
type\="file"
|
|
58
|
-
/>
|
|
59
|
-
<IressInput
|
|
60
|
-
placeholder\="Month input"
|
|
61
|
-
type\="month"
|
|
62
|
-
/>
|
|
63
|
-
<IressInput
|
|
64
|
-
placeholder\="Number input"
|
|
65
|
-
type\="number"
|
|
66
|
-
/>
|
|
67
|
-
<IressInput
|
|
68
|
-
placeholder\="Password input"
|
|
69
|
-
type\="password"
|
|
70
|
-
/>
|
|
71
|
-
<IressInput
|
|
72
|
-
placeholder\="Search input"
|
|
73
|
-
type\="search"
|
|
74
|
-
/>
|
|
75
|
-
<IressInput
|
|
76
|
-
placeholder\="Tel input"
|
|
77
|
-
type\="tel"
|
|
78
|
-
/>
|
|
79
|
-
<IressInput
|
|
80
|
-
placeholder\="Time input"
|
|
81
|
-
type\="time"
|
|
82
|
-
/>
|
|
83
|
-
<IressInput
|
|
84
|
-
placeholder\="Url input"
|
|
85
|
-
type\="url"
|
|
86
|
-
/>
|
|
87
|
-
<IressInput
|
|
88
|
-
placeholder\="Week input"
|
|
89
|
-
type\="week"
|
|
90
|
-
/>
|
|
91
|
-
</IressStack\>
|
|
92
|
-
|
|
93
|
-
Copy
|
|
94
|
-
|
|
95
|
-
Hidden inputs
|
|
96
|
-
-------------
|
|
97
|
-
|
|
98
|
-
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.
|
|
99
|
-
|
|
100
|
-
### [](#input-modes)Input modes
|
|
101
|
-
|
|
102
|
-
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.
|
|
103
|
-
|
|
104
|
-
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).
|
|
105
|
-
|
|
106
|
-
Hide code
|
|
107
|
-
|
|
108
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
109
|
-
|
|
110
|
-
<IressStack gutter\="md"\>
|
|
111
|
-
<IressInput
|
|
112
|
-
inputMode\="text"
|
|
113
|
-
placeholder\="Text mode, usually best used when type="text" "
|
|
114
|
-
/>
|
|
115
|
-
<IressInput
|
|
116
|
-
inputMode\="tel"
|
|
117
|
-
placeholder\="Tel mode, usually best used when type="tel" "
|
|
118
|
-
/>
|
|
119
|
-
<IressInput
|
|
120
|
-
inputMode\="url"
|
|
121
|
-
placeholder\="Url mode, usually best used when type="url" "
|
|
122
|
-
/>
|
|
123
|
-
<IressInput
|
|
124
|
-
inputMode\="email"
|
|
125
|
-
placeholder\="Email mode, usually best used when type="email" "
|
|
126
|
-
/>
|
|
127
|
-
<IressInput
|
|
128
|
-
inputMode\="numeric"
|
|
129
|
-
placeholder\="Numeric mode, usually best used when type="numeric" "
|
|
130
|
-
/>
|
|
131
|
-
<IressInput
|
|
132
|
-
inputMode\="decimal"
|
|
133
|
-
placeholder\="Decimal mode, usually best used when type="decimal" "
|
|
134
|
-
/>
|
|
135
|
-
<IressInput
|
|
136
|
-
inputMode\="search"
|
|
137
|
-
placeholder\="Search mode, usually best used when type="search" "
|
|
138
|
-
/>
|
|
139
|
-
</IressStack\>
|
|
140
|
-
|
|
141
|
-
Copy
|
|
142
|
-
|
|
143
|
-
### [](#clearable)Clearable
|
|
144
|
-
|
|
145
|
-
By setting the `clearable` prop to `true` a clear button will appear when the user has entered a value into the input.
|
|
146
|
-
|
|
147
|
-
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.
|
|
148
|
-
|
|
149
|
-
Hide code
|
|
150
|
-
|
|
151
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
152
|
-
|
|
153
|
-
<IressInput
|
|
154
|
-
clearable
|
|
155
|
-
placeholder\="Search"
|
|
156
|
-
prepend\={<IressIcon name\="search" />}
|
|
157
|
-
/>
|
|
158
|
-
|
|
159
|
-
Copy
|
|
160
|
-
|
|
161
|
-
### [](#sizing)Sizing
|
|
162
|
-
|
|
163
|
-
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.
|
|
164
|
-
|
|
165
|
-
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.
|
|
166
|
-
|
|
167
|
-
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.
|
|
168
|
-
|
|
169
|
-
Hide code
|
|
170
|
-
|
|
171
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
172
|
-
|
|
173
|
-
<IressStack gutter\="md"\>
|
|
174
|
-
<IressInput
|
|
175
|
-
placeholder\="2"
|
|
176
|
-
width\="2"
|
|
177
|
-
/>
|
|
178
|
-
<IressInput
|
|
179
|
-
placeholder\="4"
|
|
180
|
-
width\="4"
|
|
181
|
-
/>
|
|
182
|
-
<IressInput
|
|
183
|
-
placeholder\="6"
|
|
184
|
-
width\="6"
|
|
185
|
-
/>
|
|
186
|
-
<IressInput
|
|
187
|
-
placeholder\="8"
|
|
188
|
-
width\="8"
|
|
189
|
-
/>
|
|
190
|
-
<IressInput
|
|
191
|
-
placeholder\="10"
|
|
192
|
-
width\="10"
|
|
193
|
-
/>
|
|
194
|
-
<IressInput
|
|
195
|
-
placeholder\="12"
|
|
196
|
-
width\="12"
|
|
197
|
-
/>
|
|
198
|
-
<IressInput
|
|
199
|
-
placeholder\="16"
|
|
200
|
-
width\="16"
|
|
201
|
-
/>
|
|
202
|
-
<IressInput
|
|
203
|
-
placeholder\="25perc"
|
|
204
|
-
width\="25perc"
|
|
205
|
-
/>
|
|
206
|
-
<IressInput
|
|
207
|
-
placeholder\="50perc"
|
|
208
|
-
width\="50perc"
|
|
209
|
-
/>
|
|
210
|
-
<IressInput
|
|
211
|
-
placeholder\="75perc"
|
|
212
|
-
width\="75perc"
|
|
213
|
-
/>
|
|
214
|
-
<IressInput
|
|
215
|
-
placeholder\="100perc"
|
|
216
|
-
width\="100perc"
|
|
217
|
-
/>
|
|
218
|
-
</IressStack\>
|
|
219
|
-
|
|
220
|
-
Copy
|
|
221
|
-
|
|
222
|
-
### [](#textareas)Textareas
|
|
223
|
-
|
|
224
|
-
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.
|
|
225
|
-
|
|
226
|
-
Hide code
|
|
227
|
-
|
|
228
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
229
|
-
|
|
230
|
-
<IressInput rows\={5} />
|
|
231
|
-
|
|
232
|
-
Copy
|
|
233
|
-
|
|
234
|
-
### [](#slot-props)Slot props
|
|
235
|
-
|
|
236
|
-
Content (typically icons) can be added to slots (`append` and `prepend`) within the `IressInput` component.
|
|
237
|
-
|
|
238
|
-
* **Prepend**: appears before the input
|
|
239
|
-
* **Append**: appears after the input
|
|
240
|
-
|
|
241
|
-
By setting the watermark prop to true the add ons will render in a different style, which is set in the theme.
|
|
242
|
-
|
|
243
|
-
Hide code
|
|
244
|
-
|
|
245
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
246
|
-
|
|
247
|
-
<IressStack gutter\="md"\>
|
|
248
|
-
<IressInput
|
|
249
|
-
placeholder\="Prepend slot"
|
|
250
|
-
prepend\={<IressIcon name\="search" />}
|
|
251
|
-
/>
|
|
252
|
-
<IressInput
|
|
253
|
-
append\={<IressIcon name\="search" />}
|
|
254
|
-
placeholder\="Append slot"
|
|
255
|
-
/>
|
|
256
|
-
<IressInput
|
|
257
|
-
placeholder\="Watermark prepend slot"
|
|
258
|
-
prepend\={<IressIcon name\="search" />}
|
|
259
|
-
watermark
|
|
260
|
-
/>
|
|
261
|
-
<IressInput
|
|
262
|
-
append\={<IressIcon name\="search" />}
|
|
263
|
-
placeholder\="Watermark append slot"
|
|
264
|
-
watermark
|
|
265
|
-
/>
|
|
266
|
-
</IressStack\>
|
|
267
|
-
|
|
268
|
-
Copy
|
|
269
|
-
|
|
270
|
-
### [](#readonly)Readonly
|
|
271
|
-
|
|
272
|
-
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.
|
|
273
|
-
|
|
274
|
-
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).
|
|
275
|
-
|
|
276
|
-
Value
|
|
277
|
-
|
|
278
|
-
Hide code
|
|
279
|
-
|
|
280
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
281
|
-
|
|
282
|
-
<IressInput
|
|
283
|
-
append\=""
|
|
284
|
-
placeholder\="Enter your name"
|
|
285
|
-
prepend\=""
|
|
286
|
-
readOnly
|
|
287
|
-
value\="Value"
|
|
288
|
-
/>
|
|
289
|
-
|
|
290
|
-
Copy
|
|
291
|
-
|
|
292
|
-
### [](#formatter)Formatter
|
|
293
|
-
|
|
294
|
-
`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.
|
|
295
|
-
|
|
296
|
-
This prop powers the `IressInputCurrency` component to allow friendly and consistent currency display in Iress products.
|
|
297
|
-
|
|
298
|
-
**Notes:**
|
|
299
|
-
|
|
300
|
-
* 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.
|
|
301
|
-
* 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.
|
|
302
|
-
|
|
303
|
-
The example below changes the value entered to uppercase when the input is not focused.
|
|
304
|
-
|
|
305
|
-
Hide code
|
|
306
|
-
|
|
307
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
308
|
-
|
|
309
|
-
<IressInput
|
|
310
|
-
append\=""
|
|
311
|
-
formatter\={(value) \=> value ? value.toString().toUpperCase() : ""}
|
|
312
|
-
placeholder\="Enter a string and it will show in UPPERCASE when not focused, and show the raw value on focus"
|
|
313
|
-
prepend\=""
|
|
314
|
-
/>
|
|
315
|
-
|
|
316
|
-
Copy
|
|
317
|
-
|
|
318
|
-
### [](#onchange-and-oninput)`onChange` and `onInput`
|
|
319
|
-
|
|
320
|
-
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`.
|
|
321
|
-
|
|
322
|
-
On this page
|
|
323
|
-
|
|
324
|
-
* [Overview](#overview)
|
|
325
|
-
* [Props](#props)
|
|
326
|
-
* [Examples](#examples)
|
|
327
|
-
* [Types](#types)
|
|
328
|
-
* [Input modes](#input-modes)
|
|
329
|
-
* [Clearable](#clearable)
|
|
330
|
-
* [Sizing](#sizing)
|
|
331
|
-
* [Textareas](#textareas)
|
|
332
|
-
* [Slot props](#slot-props)
|
|
333
|
-
* [Readonly](#readonly)
|
|
334
|
-
* [Formatter](#formatter)
|
|
335
|
-
* [onChange and onInput](#onchange-and-oninput)
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
[](#recipes)Recipes
|
|
2
|
-
===================
|
|
3
|
-
|
|
4
|
-
[](#percentage-formatting)Percentage formatting
|
|
5
|
-
-----------------------------------------------
|
|
6
|
-
|
|
7
|
-
You can use `IressInput` to display percentage formatting. When the field is focused, it can display the raw value, and when blurred, it can display the formatted percentage value.
|
|
8
|
-
|
|
9
|
-
Feedback
|
|
10
|
-
|
|
11
|
-
Hide code
|
|
12
|
-
|
|
13
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
14
|
-
|
|
15
|
-
import { IressInput } from '@iress-oss/ids-components';
|
|
16
|
-
export const InputPercentage \= () \=> (
|
|
17
|
-
<IressInput<number | string\>
|
|
18
|
-
defaultValue\="0.5"
|
|
19
|
-
formatter\={(value \= '') \=> {
|
|
20
|
-
if (value \=== '') return '';
|
|
21
|
-
const numericValue \= Number(value);
|
|
22
|
-
if (Number.isNaN(numericValue)) {
|
|
23
|
-
return String(value) ?? '';
|
|
24
|
-
}
|
|
25
|
-
return new Intl.NumberFormat('en-AU', {
|
|
26
|
-
style: 'percent',
|
|
27
|
-
}).format(numericValue);
|
|
28
|
-
}}
|
|
29
|
-
type\="number"
|
|
30
|
-
/\>
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
Copy
|
|
34
|
-
|
|
35
|
-
[](#using-with-react-hook-forms)Using with React Hook Forms
|
|
36
|
-
-----------------------------------------------------------
|
|
37
|
-
|
|
38
|
-
You can use `IressInput` with React Hook Forms quite easily. The recommended way is to use the [`Controller` component from react-hook-forms](https://www.react-hook-form.com/get-started/#IntegratingwithUIlibraries). However, you can use the `register` method directly, with a few customisations to cater for custom `ref` as seen in the code example here.
|
|
39
|
-
|
|
40
|
-
Where possible, please use `IressFormField` within an [`IressForm` component](./?path=/docs/components-form--docs).
|
|
41
|
-
|
|
42
|
-
Although you can use `IressInput` directly with React Hook Forms, we recommend using `IressFormField` within `IressForm` for a more integrated experience.
|
|
43
|
-
|
|
44
|
-
Input using `{ Controller } from 'react-hook-forms'`
|
|
45
|
-
|
|
46
|
-
Input using `{ register } = useForm()`
|
|
47
|
-
|
|
48
|
-
Submit
|
|
49
|
-
|
|
50
|
-
Hide code
|
|
51
|
-
|
|
52
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
53
|
-
|
|
54
|
-
import {
|
|
55
|
-
InputRef,
|
|
56
|
-
IressAlert,
|
|
57
|
-
IressButton,
|
|
58
|
-
IressInline,
|
|
59
|
-
IressInput,
|
|
60
|
-
IressLabel,
|
|
61
|
-
IressModal,
|
|
62
|
-
IressStack,
|
|
63
|
-
IressTable,
|
|
64
|
-
} from '@iress-oss/ids-components';
|
|
65
|
-
import { useState } from 'react';
|
|
66
|
-
import { Controller, UseFormRegisterReturn, useForm } from 'react-hook-form';
|
|
67
|
-
const registerInnerElement \= (register: UseFormRegisterReturn) \=> {
|
|
68
|
-
return {
|
|
69
|
-
...register,
|
|
70
|
-
onClear: register.onChange,
|
|
71
|
-
ref: (ref: InputRef | null) \=> {
|
|
72
|
-
if (ref) {
|
|
73
|
-
register.ref(ref.input);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export const ReactHookFormsInput \= () \=> {
|
|
79
|
-
const { register, handleSubmit, control } \= useForm();
|
|
80
|
-
const \[data, setData\] \= useState<Record<string, string\> | undefined\>();
|
|
81
|
-
return (
|
|
82
|
-
// eslint-disable-next-line sonarjs/void-use -- This is a mock form submission
|
|
83
|
-
<form onSubmit\={void handleSubmit(setData)}\>
|
|
84
|
-
<IressStack gutter\="md"\>
|
|
85
|
-
<IressAlert status\="info"\>
|
|
86
|
-
Although you can use <code\>IressInput</code\> directly with React Hook Forms, we recommend using <code\>IressFormField</code\> within{' '}
|
|
87
|
-
<code\>IressForm</code\> for a more integrated experience. </IressAlert\>
|
|
88
|
-
<IressInline gutter\="md" verticalAlign\="middle"\>
|
|
89
|
-
<IressLabel htmlFor\="Controller"\>
|
|
90
|
-
Input using <code\>{\`{ Controller } from 'react-hook-forms'\`}</code\>
|
|
91
|
-
</IressLabel\>
|
|
92
|
-
<Controller
|
|
93
|
-
name\="Controller"
|
|
94
|
-
control\={control}
|
|
95
|
-
render\={({ field }) \=> (
|
|
96
|
-
<IressInput
|
|
97
|
-
{...field}
|
|
98
|
-
clearable
|
|
99
|
-
onClear\={field.onChange}
|
|
100
|
-
id\="firstName"
|
|
101
|
-
/>
|
|
102
|
-
)}
|
|
103
|
-
/>
|
|
104
|
-
</IressInline\>
|
|
105
|
-
<IressInline gutter\="md" verticalAlign\="middle"\>
|
|
106
|
-
<IressLabel htmlFor\="register"\>
|
|
107
|
-
Input using <code\>{\`{ register } = useForm()\`}</code\>
|
|
108
|
-
</IressLabel\>
|
|
109
|
-
<IressInput
|
|
110
|
-
{...registerInnerElement(register('register'))}
|
|
111
|
-
clearable
|
|
112
|
-
id\="register"
|
|
113
|
-
/>
|
|
114
|
-
</IressInline\>
|
|
115
|
-
<IressButton type\="submit"\>Submit</IressButton\>
|
|
116
|
-
</IressStack\>
|
|
117
|
-
{data && (
|
|
118
|
-
<IressModal
|
|
119
|
-
show\={!!data}
|
|
120
|
-
onShowChange\={(show) \=> !show && setData(undefined)}
|
|
121
|
-
\>
|
|
122
|
-
<IressTable
|
|
123
|
-
caption\="Submitted details"
|
|
124
|
-
rows\={Object.entries(data ?? {}).map((entry) \=> ({
|
|
125
|
-
name: entry\[0\],
|
|
126
|
-
value: JSON.stringify(entry\[1\], null, 2),
|
|
127
|
-
}))}
|
|
128
|
-
/>
|
|
129
|
-
</IressModal\>
|
|
130
|
-
)}
|
|
131
|
-
</form\>
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
Copy
|
|
136
|
-
|
|
137
|
-
On this page
|
|
138
|
-
|
|
139
|
-
* [Percentage formatting](#percentage-formatting)
|
|
140
|
-
* [Using with React Hook Forms](#using-with-react-hook-forms)
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
[](#inputcurrency)InputCurrency
|
|
2
|
-
===============================
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
InputCurrency allows a user to input and interact with currency number. It works just like `IressInput`, with new props `locale` and `currencyCode`. This component meets [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) standard
|
|
8
|
-
|
|
9
|
-
AUD
|
|
10
|
-
|
|
11
|
-
Hide code
|
|
12
|
-
|
|
13
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
14
|
-
|
|
15
|
-
<IressInputCurrency
|
|
16
|
-
currencyCode\="AUD"
|
|
17
|
-
defaultValue\={12345.678}
|
|
18
|
-
locale\="en-AU"
|
|
19
|
-
placeholder\="Enter amount and dispay currency currency separator on blur"
|
|
20
|
-
/>
|
|
21
|
-
|
|
22
|
-
Copy
|
|
23
|
-
|
|
24
|
-
[](#examples)Examples
|
|
25
|
-
---------------------
|
|
26
|
-
|
|
27
|
-
### [](#different-locale-and-currencycode)Different Locale and CurrencyCode
|
|
28
|
-
|
|
29
|
-
Display the GBP with `locale="en-GB"` and `currencyCode="GBP"` props (must pass both together)
|
|
30
|
-
|
|
31
|
-
GBP
|
|
32
|
-
|
|
33
|
-
Hide code
|
|
34
|
-
|
|
35
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
36
|
-
|
|
37
|
-
<IressInputCurrency
|
|
38
|
-
currencyCode\="GBP"
|
|
39
|
-
defaultValue\={12345.678}
|
|
40
|
-
locale\="en-GB"
|
|
41
|
-
placeholder\="Enter amount and dispay currency currency separator on blur"
|
|
42
|
-
/>
|
|
43
|
-
|
|
44
|
-
Copy
|
|
45
|
-
|
|
46
|
-
Display the JPY with `locale="ja-JPY"` and `currencyCode="JPY"` props (must pass both together)
|
|
47
|
-
|
|
48
|
-
JPY
|
|
49
|
-
|
|
50
|
-
Hide code
|
|
51
|
-
|
|
52
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
53
|
-
|
|
54
|
-
<IressInputCurrency
|
|
55
|
-
currencyCode\="JPY"
|
|
56
|
-
defaultValue\={12345678}
|
|
57
|
-
locale\="ja-JP"
|
|
58
|
-
placeholder\="Enter amount and dispay currency currency separator on blur"
|
|
59
|
-
/>
|
|
60
|
-
|
|
61
|
-
Copy
|
|
62
|
-
|
|
63
|
-
### [](#with-symbol)With Symbol
|
|
64
|
-
|
|
65
|
-
Display the currency symbol with `withSymbol` props
|
|
66
|
-
|
|
67
|
-
AUD
|
|
68
|
-
|
|
69
|
-
Hide code
|
|
70
|
-
|
|
71
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
72
|
-
|
|
73
|
-
<IressInputCurrency
|
|
74
|
-
currencyCode\="AUD"
|
|
75
|
-
defaultValue\={12345.678}
|
|
76
|
-
locale\="en-AU"
|
|
77
|
-
placeholder\="Enter amount and dispay currency symbol on blur"
|
|
78
|
-
withSymbol
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
Copy
|
|
82
|
-
|
|
83
|
-
### [](#more-format-options)More Format Options
|
|
84
|
-
|
|
85
|
-
Pass more format options with `formatOptions` props. More format options in [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat)
|
|
86
|
-
|
|
87
|
-
AUD
|
|
88
|
-
|
|
89
|
-
Hide code
|
|
90
|
-
|
|
91
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
92
|
-
|
|
93
|
-
<IressInputCurrency
|
|
94
|
-
currencyCode\="AUD"
|
|
95
|
-
defaultValue\={12345.678}
|
|
96
|
-
formatOptions\={{
|
|
97
|
-
maximumFractionDigits: 4,
|
|
98
|
-
minimumFractionDigits: 2
|
|
99
|
-
}}
|
|
100
|
-
locale\="en-AU"
|
|
101
|
-
placeholder\="Pass and play around with other native Intl.NumberFormat options to the code sandbox"
|
|
102
|
-
/>
|
|
103
|
-
|
|
104
|
-
Copy
|
|
105
|
-
|
|
106
|
-
### [](#read-only)Read Only
|
|
107
|
-
|
|
108
|
-
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. If you want to make the number align to right, please pass `alignRight` together.
|
|
109
|
-
|
|
110
|
-
$12,345.68
|
|
111
|
-
|
|
112
|
-
AUD
|
|
113
|
-
|
|
114
|
-
Hide code
|
|
115
|
-
|
|
116
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
117
|
-
|
|
118
|
-
<IressInputCurrency
|
|
119
|
-
alignRight
|
|
120
|
-
currencyCode\="AUD"
|
|
121
|
-
defaultValue\={12345.678}
|
|
122
|
-
locale\="en-AU"
|
|
123
|
-
readOnly
|
|
124
|
-
withSymbol
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
Copy
|
|
128
|
-
|
|
129
|
-
### [](#align-right)Align Right
|
|
130
|
-
|
|
131
|
-
Set the input content align to right with `alignRight` prop, which is more friendly for number input.
|
|
132
|
-
|
|
133
|
-
AUD
|
|
134
|
-
|
|
135
|
-
Hide code
|
|
136
|
-
|
|
137
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
138
|
-
|
|
139
|
-
<IressInputCurrency
|
|
140
|
-
alignRight
|
|
141
|
-
currencyCode\="AUD"
|
|
142
|
-
defaultValue\={12345.678}
|
|
143
|
-
locale\="en-AU"
|
|
144
|
-
/>
|
|
145
|
-
|
|
146
|
-
Copy
|
|
147
|
-
|
|
148
|
-
On this page
|
|
149
|
-
|
|
150
|
-
* [Overview](#overview)
|
|
151
|
-
* [Props](#props)
|
|
152
|
-
* [Examples](#examples)
|
|
153
|
-
* [Different Locale and CurrencyCode](#different-locale-and-currencycode)
|
|
154
|
-
* [With Symbol](#with-symbol)
|
|
155
|
-
* [More Format Options](#more-format-options)
|
|
156
|
-
* [Read Only](#read-only)
|
|
157
|
-
* [Align Right](#align-right)
|