@iress-oss/ids-mcp-server 0.0.1-dev.4 → 0.0.1-dev.6

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.
@@ -156,7 +156,7 @@ Hide code
156
156
  }
157
157
  \]}
158
158
  popoverProps\={{
159
- container: document.body
159
+ container: {}
160
160
  }}
161
161
  />
162
162
 
@@ -203,6 +203,50 @@ export const AutocompleteUsingAsync \= () \=> (
203
203
 
204
204
  Copy
205
205
 
206
+ #### [](#minimum-search-length-for-async-options)Minimum search length for async options
207
+
208
+ When using asynchronous options, you can set a minimum number of characters required before triggering the search using the `minSearchLength` prop. This prevents unnecessary API calls and loading states for very short queries.
209
+
210
+ By default, async searches are triggered after 1 character. Setting a higher value (e.g., 3) means no search request will be made and no loading spinner will appear until the user types at least that many characters.
211
+
212
+ Hide code
213
+
214
+ \[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; }
215
+
216
+ import { IressAutocomplete, IressAutocompleteProps } from '@iress-oss/ids-components';
217
+ interface StarWarsCharacter {
218
+ name: string;
219
+ gender: string;
220
+ }
221
+ interface StarWarsCharacterApi {
222
+ results: StarWarsCharacter\[\];
223
+ }
224
+ export const AutocompleteUsingAsync \= () \=> (
225
+ <IressAutocomplete
226
+ {...{
227
+ popoverProps: {
228
+ container: document.body,
229
+ },
230
+ minSearchLength: 3,
231
+ }}
232
+ options\={async (query: string) \=> {
233
+ if (query \=== 'error') {
234
+ throw new Error('This is an error');
235
+ }
236
+ const data \= await fetch(
237
+ \`https://swapi.py4e.com/api/people/?search=${query}\`,
238
+ ).then((response) \=> response.json() as Promise<StarWarsCharacterApi\>);
239
+ return data.results.map((character: StarWarsCharacter) \=> ({
240
+ label: character.name,
241
+ value: character.name,
242
+ meta: character.gender,
243
+ }));
244
+ }}
245
+ />
246
+ );
247
+
248
+ Copy
249
+
206
250
  #### [](#initialoptions)`initialOptions`
207
251
 
208
252
  If you want to provide initial options to the user, you can use the `initialOptions` prop. This is useful when you want to provide a list of options to the user before they start typing (eg. recommended search terms).
@@ -450,7 +494,7 @@ Hide code
450
494
  \]}
451
495
  placeholder\="Instant search!"
452
496
  popoverProps\={{
453
- container: document.body
497
+ container: {}
454
498
  }}
455
499
  />
456
500
 
@@ -592,7 +636,7 @@ Hide code
592
636
  }
593
637
  \]}
594
638
  popoverProps\={{
595
- container: {}
639
+ container: document.body
596
640
  }}
597
641
  readOnly
598
642
  />
@@ -197,22 +197,22 @@ Hide code
197
197
  stack </h3\>
198
198
  <IressCheckboxGroup layout\="stack"\>
199
199
  <IressCheckbox
200
- className\="ids-styles--add-border-to-label-v5150"
200
+ className\="ids-styles--add-border-to-label-v5200"
201
201
  value\="google"
202
202
  \>
203
203
  Google </IressCheckbox\>
204
204
  <IressCheckbox
205
- className\="ids-styles--add-border-to-label-v5150"
205
+ className\="ids-styles--add-border-to-label-v5200"
206
206
  value\="newspaper"
207
207
  \>
208
208
  Newspaper </IressCheckbox\>
209
209
  <IressCheckbox
210
- className\="ids-styles--add-border-to-label-v5150"
210
+ className\="ids-styles--add-border-to-label-v5200"
211
211
  value\="friend"
212
212
  \>
213
213
  Friend </IressCheckbox\>
214
214
  <IressCheckbox
215
- className\="ids-styles--add-border-to-label-v5150"
215
+ className\="ids-styles--add-border-to-label-v5200"
216
216
  value\="other"
217
217
  \>
218
218
  Other </IressCheckbox\>
@@ -223,22 +223,22 @@ Hide code
223
223
  block </h3\>
224
224
  <IressCheckboxGroup layout\="block"\>
225
225
  <IressCheckbox
226
- className\="ids-styles--add-border-to-label-v5150"
226
+ className\="ids-styles--add-border-to-label-v5200"
227
227
  value\="google"
228
228
  \>
229
229
  Google </IressCheckbox\>
230
230
  <IressCheckbox
231
- className\="ids-styles--add-border-to-label-v5150"
231
+ className\="ids-styles--add-border-to-label-v5200"
232
232
  value\="newspaper"
233
233
  \>
234
234
  Newspaper </IressCheckbox\>
235
235
  <IressCheckbox
236
- className\="ids-styles--add-border-to-label-v5150"
236
+ className\="ids-styles--add-border-to-label-v5200"
237
237
  value\="friend"
238
238
  \>
239
239
  Friend </IressCheckbox\>
240
240
  <IressCheckbox
241
- className\="ids-styles--add-border-to-label-v5150"
241
+ className\="ids-styles--add-border-to-label-v5200"
242
242
  value\="other"
243
243
  \>
244
244
  Other </IressCheckbox\>
@@ -249,22 +249,22 @@ Hide code
249
249
  inline </h3\>
250
250
  <IressCheckboxGroup layout\="inline"\>
251
251
  <IressCheckbox
252
- className\="ids-styles--add-border-to-label-v5150"
252
+ className\="ids-styles--add-border-to-label-v5200"
253
253
  value\="google"
254
254
  \>
255
255
  Google </IressCheckbox\>
256
256
  <IressCheckbox
257
- className\="ids-styles--add-border-to-label-v5150"
257
+ className\="ids-styles--add-border-to-label-v5200"
258
258
  value\="newspaper"
259
259
  \>
260
260
  Newspaper </IressCheckbox\>
261
261
  <IressCheckbox
262
- className\="ids-styles--add-border-to-label-v5150"
262
+ className\="ids-styles--add-border-to-label-v5200"
263
263
  value\="friend"
264
264
  \>
265
265
  Friend </IressCheckbox\>
266
266
  <IressCheckbox
267
- className\="ids-styles--add-border-to-label-v5150"
267
+ className\="ids-styles--add-border-to-label-v5200"
268
268
  value\="other"
269
269
  \>
270
270
  Other </IressCheckbox\>
@@ -275,22 +275,22 @@ Hide code
275
275
  full </h3\>
276
276
  <IressCheckboxGroup layout\="full"\>
277
277
  <IressCheckbox
278
- className\="ids-styles--add-border-to-label-v5150"
278
+ className\="ids-styles--add-border-to-label-v5200"
279
279
  value\="google"
280
280
  \>
281
281
  Google </IressCheckbox\>
282
282
  <IressCheckbox
283
- className\="ids-styles--add-border-to-label-v5150"
283
+ className\="ids-styles--add-border-to-label-v5200"
284
284
  value\="newspaper"
285
285
  \>
286
286
  Newspaper </IressCheckbox\>
287
287
  <IressCheckbox
288
- className\="ids-styles--add-border-to-label-v5150"
288
+ className\="ids-styles--add-border-to-label-v5200"
289
289
  value\="friend"
290
290
  \>
291
291
  Friend </IressCheckbox\>
292
292
  <IressCheckbox
293
- className\="ids-styles--add-border-to-label-v5150"
293
+ className\="ids-styles--add-border-to-label-v5200"
294
294
  value\="other"
295
295
  \>
296
296
  Other </IressCheckbox\>
@@ -445,7 +445,7 @@ Hide code
445
445
  }}
446
446
  \>
447
447
  <div
448
- className\="ids-styles--resizable-v5150"
448
+ className\="ids-styles--resizable-v5200"
449
449
  style\={{
450
450
  display: 'grid',
451
451
  gridAutoRows: '1fr',
@@ -429,7 +429,7 @@ Hide code
429
429
 
430
430
  <IressContainer\>
431
431
  <IressRow
432
- className\="ids-styles--set-height-v5150"
432
+ className\="ids-styles--set-height-v5200"
433
433
  gutter\="md"
434
434
  \>
435
435
  <IressCol alignSelf\="start"\>
@@ -285,7 +285,7 @@ Hide code
285
285
  }
286
286
  \]}
287
287
  popoverProps\={{
288
- container: {}
288
+ container: document.body
289
289
  }}
290
290
  />
291
291
 
@@ -685,7 +685,7 @@ Hide code
685
685
  }
686
686
  \]}
687
687
  popoverProps\={{
688
- container: document.body
688
+ container: {}
689
689
  }}
690
690
  readOnly
691
691
  />
@@ -205,6 +205,8 @@ Salad
205
205
 
206
206
  Type to copy an existing character's name
207
207
 
208
+ Type at least 1 character to search
209
+
208
210
  \*Required Your star wars sidekick
209
211
 
210
212
  None selected
@@ -434,42 +436,7 @@ Enter a maximum length of 5 characters
434
436
 
435
437
  Validate
436
438
 
437
- Hide code
438
-
439
- \[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; }
440
-
441
- <IressForm\>
442
- <IressStack gutter\="lg"\>
443
- <IressFormField
444
- hint\="Enter a maximum length of 5 characters"
445
- label\="Default message"
446
- name\="IressInput-default"
447
- render\={(controlledProps) \=> <IressInput {...controlledProps} />}
448
- rules\={{
449
- maxLength: 5
450
- }}
451
- />
452
- <IressFormField
453
- hint\="Enter a maximum length of 5 characters"
454
- label\="Custom message"
455
- name\="IressInput-custom"
456
- render\={(controlledProps) \=> <IressInput {...controlledProps} />}
457
- rules\={{
458
- maxLength: {
459
- message: 'Please enter a max length of 5 characters!',
460
- value: 5
461
- }
462
- }}
463
- />
464
- <IressButton
465
- mode\="primary"
466
- type\="submit"
467
- \>
468
- Validate </IressButton\>
469
- </IressStack\>
470
- </IressForm\>
471
-
472
- Copy
439
+ Show code
473
440
 
474
441
  #### [](#minlength)`minLength`
475
442
 
@@ -715,7 +682,7 @@ Hide code
715
682
  name\="IressInputDate-default"
716
683
  render\={(controlledProps) \=> <IressInput {...controlledProps} />}
717
684
  rules\={{
718
- minDate: new Date('2025-06-27T03:58:57.380Z')
685
+ minDate: new Date('2025-09-08T00:08:13.831Z')
719
686
  }}
720
687
  />
721
688
  <IressFormField
@@ -726,7 +693,7 @@ Hide code
726
693
  rules\={{
727
694
  minDate: {
728
695
  message: 'Please enter a date after today!',
729
- value: new Date('2025-06-27T03:58:57.380Z')
696
+ value: new Date('2025-09-08T00:08:13.831Z')
730
697
  }
731
698
  }}
732
699
  />
@@ -768,7 +735,7 @@ Hide code
768
735
  name\="IressInputDate-default"
769
736
  render\={(controlledProps) \=> <IressInput {...controlledProps} />}
770
737
  rules\={{
771
- maxDate: new Date('2025-06-27T03:58:57.380Z')
738
+ maxDate: new Date('2025-09-08T00:08:13.831Z')
772
739
  }}
773
740
  />
774
741
  <IressFormField
@@ -779,7 +746,7 @@ Hide code
779
746
  rules\={{
780
747
  maxDate: {
781
748
  message: 'Please enter a date before today!',
782
- value: new Date('2025-06-27T03:58:57.380Z')
749
+ value: new Date('2025-09-08T00:08:13.831Z')
783
750
  }
784
751
  }}
785
752
  />
@@ -467,13 +467,13 @@ Hide code
467
467
  \>
468
468
  Default width </IressText\>
469
469
  <IressIcon
470
- className\="ids-styles--alt-background-v5150"
470
+ className\="ids-styles--alt-background-v5200"
471
471
  name\="space-shuttle"
472
472
  size\="3x"
473
473
  />
474
474
  <br />
475
475
  <IressIcon
476
- className\="ids-styles--alt-background-v5150"
476
+ className\="ids-styles--alt-background-v5200"
477
477
  name\="wine-glass-alt"
478
478
  size\="3x"
479
479
  />
@@ -485,14 +485,14 @@ Hide code
485
485
  \>
486
486
  Fixed width </IressText\>
487
487
  <IressIcon
488
- className\="ids-styles--alt-background-v5150"
488
+ className\="ids-styles--alt-background-v5200"
489
489
  fixedWidth
490
490
  name\="space-shuttle"
491
491
  size\="3x"
492
492
  />
493
493
  <br />
494
494
  <IressIcon
495
- className\="ids-styles--alt-background-v5150"
495
+ className\="ids-styles--alt-background-v5200"
496
496
  fixedWidth
497
497
  name\="wine-glass-alt"
498
498
  size\="3x"
@@ -15,7 +15,6 @@ Hide code
15
15
  <IressInputCurrency
16
16
  currencyCode\="AUD"
17
17
  defaultValue\={12345.678}
18
- locale\="en-AU"
19
18
  placeholder\="Enter amount and dispay currency currency separator on blur"
20
19
  />
21
20
 
@@ -24,9 +23,9 @@ Copy
24
23
  [](#examples)Examples
25
24
  ---------------------
26
25
 
27
- ### [](#different-locale-and-currencycode)Different Locale and CurrencyCode
26
+ ### [](#different-currency-code)Different Currency Code
28
27
 
29
- Display the GBP with `locale="en-GB"` and `currencyCode="GBP"` props (must pass both together)
28
+ Display GBP currency using the `currencyCode="GBP"` prop.
30
29
 
31
30
  GBP
32
31
 
@@ -37,49 +36,11 @@ Hide code
37
36
  <IressInputCurrency
38
37
  currencyCode\="GBP"
39
38
  defaultValue\={12345.678}
40
- locale\="en-GB"
41
39
  placeholder\="Enter amount and dispay currency currency separator on blur"
42
40
  />
43
41
 
44
42
  Copy
45
43
 
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
44
  ### [](#more-format-options)More Format Options
84
45
 
85
46
  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)
@@ -97,7 +58,6 @@ Hide code
97
58
  maximumFractionDigits: 4,
98
59
  minimumFractionDigits: 2
99
60
  }}
100
- locale\="en-AU"
101
61
  placeholder\="Pass and play around with other native Intl.NumberFormat options to the code sandbox"
102
62
  />
103
63
 
@@ -107,7 +67,7 @@ Copy
107
67
 
108
68
  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
69
 
110
- $12,345.68
70
+ A$12,345.68
111
71
 
112
72
  AUD
113
73
 
@@ -119,7 +79,6 @@ Hide code
119
79
  alignRight
120
80
  currencyCode\="AUD"
121
81
  defaultValue\={12345.678}
122
- locale\="en-AU"
123
82
  readOnly
124
83
  withSymbol
125
84
  />
@@ -140,7 +99,6 @@ Hide code
140
99
  alignRight
141
100
  currencyCode\="AUD"
142
101
  defaultValue\={12345.678}
143
- locale\="en-AU"
144
102
  />
145
103
 
146
104
  Copy
@@ -150,8 +108,7 @@ On this page
150
108
  * [Overview](#overview)
151
109
  * [Props](#props)
152
110
  * [Examples](#examples)
153
- * [Different Locale and CurrencyCode](#different-locale-and-currencycode)
154
- * [With Symbol](#with-symbol)
111
+ * [Different Currency Code](#different-currency-code)
155
112
  * [More Format Options](#more-format-options)
156
113
  * [Read Only](#read-only)
157
114
  * [Align Right](#align-right)
@@ -171,22 +171,22 @@ Hide code
171
171
  stack </h3\>
172
172
  <IressRadioGroup layout\="stack"\>
173
173
  <IressRadio
174
- className\="ids-styles--add-border-v5150"
174
+ className\="ids-styles--add-border-v5200"
175
175
  value\="google"
176
176
  \>
177
177
  Google </IressRadio\>
178
178
  <IressRadio
179
- className\="ids-styles--add-border-v5150"
179
+ className\="ids-styles--add-border-v5200"
180
180
  value\="newspaper"
181
181
  \>
182
182
  Newspaper </IressRadio\>
183
183
  <IressRadio
184
- className\="ids-styles--add-border-v5150"
184
+ className\="ids-styles--add-border-v5200"
185
185
  value\="friend"
186
186
  \>
187
187
  Friend </IressRadio\>
188
188
  <IressRadio
189
- className\="ids-styles--add-border-v5150"
189
+ className\="ids-styles--add-border-v5200"
190
190
  value\="other"
191
191
  \>
192
192
  Other </IressRadio\>
@@ -197,22 +197,22 @@ Hide code
197
197
  block </h3\>
198
198
  <IressRadioGroup layout\="block"\>
199
199
  <IressRadio
200
- className\="ids-styles--add-border-v5150"
200
+ className\="ids-styles--add-border-v5200"
201
201
  value\="google"
202
202
  \>
203
203
  Google </IressRadio\>
204
204
  <IressRadio
205
- className\="ids-styles--add-border-v5150"
205
+ className\="ids-styles--add-border-v5200"
206
206
  value\="newspaper"
207
207
  \>
208
208
  Newspaper </IressRadio\>
209
209
  <IressRadio
210
- className\="ids-styles--add-border-v5150"
210
+ className\="ids-styles--add-border-v5200"
211
211
  value\="friend"
212
212
  \>
213
213
  Friend </IressRadio\>
214
214
  <IressRadio
215
- className\="ids-styles--add-border-v5150"
215
+ className\="ids-styles--add-border-v5200"
216
216
  value\="other"
217
217
  \>
218
218
  Other </IressRadio\>
@@ -223,22 +223,22 @@ Hide code
223
223
  inline </h3\>
224
224
  <IressRadioGroup layout\="inline"\>
225
225
  <IressRadio
226
- className\="ids-styles--add-border-v5150"
226
+ className\="ids-styles--add-border-v5200"
227
227
  value\="google"
228
228
  \>
229
229
  Google </IressRadio\>
230
230
  <IressRadio
231
- className\="ids-styles--add-border-v5150"
231
+ className\="ids-styles--add-border-v5200"
232
232
  value\="newspaper"
233
233
  \>
234
234
  Newspaper </IressRadio\>
235
235
  <IressRadio
236
- className\="ids-styles--add-border-v5150"
236
+ className\="ids-styles--add-border-v5200"
237
237
  value\="friend"
238
238
  \>
239
239
  Friend </IressRadio\>
240
240
  <IressRadio
241
- className\="ids-styles--add-border-v5150"
241
+ className\="ids-styles--add-border-v5200"
242
242
  value\="other"
243
243
  \>
244
244
  Other </IressRadio\>
@@ -249,22 +249,22 @@ Hide code
249
249
  inlineFlex </h3\>
250
250
  <IressRadioGroup layout\="inlineFlex"\>
251
251
  <IressRadio
252
- className\="ids-styles--add-border-v5150"
252
+ className\="ids-styles--add-border-v5200"
253
253
  value\="google"
254
254
  \>
255
255
  Google </IressRadio\>
256
256
  <IressRadio
257
- className\="ids-styles--add-border-v5150"
257
+ className\="ids-styles--add-border-v5200"
258
258
  value\="newspaper"
259
259
  \>
260
260
  Newspaper </IressRadio\>
261
261
  <IressRadio
262
- className\="ids-styles--add-border-v5150"
262
+ className\="ids-styles--add-border-v5200"
263
263
  value\="friend"
264
264
  \>
265
265
  Friend </IressRadio\>
266
266
  <IressRadio
267
- className\="ids-styles--add-border-v5150"
267
+ className\="ids-styles--add-border-v5200"
268
268
  value\="other"
269
269
  \>
270
270
  Other </IressRadio\>
@@ -275,22 +275,22 @@ Hide code
275
275
  inlineEqualWidth </h3\>
276
276
  <IressRadioGroup layout\="inlineEqualWidth"\>
277
277
  <IressRadio
278
- className\="ids-styles--add-border-v5150"
278
+ className\="ids-styles--add-border-v5200"
279
279
  value\="google"
280
280
  \>
281
281
  Google </IressRadio\>
282
282
  <IressRadio
283
- className\="ids-styles--add-border-v5150"
283
+ className\="ids-styles--add-border-v5200"
284
284
  value\="newspaper"
285
285
  \>
286
286
  Newspaper </IressRadio\>
287
287
  <IressRadio
288
- className\="ids-styles--add-border-v5150"
288
+ className\="ids-styles--add-border-v5200"
289
289
  value\="friend"
290
290
  \>
291
291
  Friend </IressRadio\>
292
292
  <IressRadio
293
- className\="ids-styles--add-border-v5150"
293
+ className\="ids-styles--add-border-v5200"
294
294
  value\="other"
295
295
  \>
296
296
  Other </IressRadio\>
@@ -441,7 +441,7 @@ Hide code
441
441
  }}
442
442
  \>
443
443
  <div
444
- className\="ids-styles--resizable-v5150"
444
+ className\="ids-styles--resizable-v5200"
445
445
  style\={{
446
446
  display: 'grid',
447
447
  gridAutoRows: '1fr',