@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.
Files changed (132) hide show
  1. package/generated/docs/components_components-alert-docs.md +492 -0
  2. package/generated/docs/components_components-autocomplete-docs.md +3485 -0
  3. package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +32 -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 +2276 -0
  9. package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +131 -14
  10. package/generated/docs/components_components-checkbox-docs.md +1054 -0
  11. package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1000 -81
  12. package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +101 -11
  13. package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
  14. package/generated/docs/components_components-combobox-docs.md +3767 -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} +264 -33
  18. package/generated/docs/{components-field-docs.md → components_components-field-docs.md} +814 -120
  19. package/generated/docs/components_components-filter-docs.md +4080 -0
  20. package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1488 -358
  21. package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +174 -64
  22. package/generated/docs/components_components-hide-docs.md +293 -0
  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} +110 -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} +1625 -232
  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} +697 -39
  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 +1641 -0
  38. package/generated/docs/{components-popover-recipes-docs.md → components_components-popover-recipes-docs.md} +347 -17
  39. package/generated/docs/components_components-progress-docs.md +115 -0
  40. package/generated/docs/components_components-provider-docs.md +114 -0
  41. package/generated/docs/components_components-radio-docs.md +491 -0
  42. package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +943 -75
  43. package/generated/docs/components_components-readonly-docs.md +263 -0
  44. package/generated/docs/components_components-richselect-docs.md +6497 -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} +50 -10
  49. package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
  50. package/generated/docs/components_components-slideout-docs.md +2262 -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 +3651 -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 +259 -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} +224 -71
  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} +711 -143
  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/{versions-docs.md → components_versions-docs.md} +5 -8
  83. package/generated/docs/guidelines.md +484 -200
  84. package/generated/docs/introduction-docs.md +19 -30
  85. package/package.json +41 -45
  86. package/generated/docs/components-alert-docs.md +0 -130
  87. package/generated/docs/components-autocomplete-docs.md +0 -754
  88. package/generated/docs/components-button-docs.md +0 -362
  89. package/generated/docs/components-button-recipes-docs.md +0 -76
  90. package/generated/docs/components-buttongroup-docs.md +0 -310
  91. package/generated/docs/components-card-docs.md +0 -494
  92. package/generated/docs/components-checkbox-docs.md +0 -193
  93. package/generated/docs/components-combobox-docs.md +0 -1016
  94. package/generated/docs/components-filter-docs.md +0 -1109
  95. package/generated/docs/components-hide-docs.md +0 -265
  96. package/generated/docs/components-icon-docs.md +0 -553
  97. package/generated/docs/components-input-docs.md +0 -335
  98. package/generated/docs/components-input-recipes-docs.md +0 -140
  99. package/generated/docs/components-inputcurrency-docs.md +0 -157
  100. package/generated/docs/components-label-docs.md +0 -135
  101. package/generated/docs/components-menu-docs.md +0 -704
  102. package/generated/docs/components-menu-menuitem-docs.md +0 -193
  103. package/generated/docs/components-navbar-docs.md +0 -291
  104. package/generated/docs/components-placeholder-docs.md +0 -27
  105. package/generated/docs/components-popover-docs.md +0 -464
  106. package/generated/docs/components-progress-docs.md +0 -104
  107. package/generated/docs/components-radio-docs.md +0 -107
  108. package/generated/docs/components-readonly-docs.md +0 -89
  109. package/generated/docs/components-richselect-docs.md +0 -2433
  110. package/generated/docs/components-skeleton-docs.md +0 -214
  111. package/generated/docs/components-slideout-docs.md +0 -538
  112. package/generated/docs/components-slider-docs.md +0 -346
  113. package/generated/docs/components-spinner-docs.md +0 -59
  114. package/generated/docs/components-table-ag-grid-docs.md +0 -2666
  115. package/generated/docs/components-table-docs.md +0 -1305
  116. package/generated/docs/components-tabset-docs.md +0 -341
  117. package/generated/docs/components-tabset-tab-docs.md +0 -86
  118. package/generated/docs/components-tag-docs.md +0 -115
  119. package/generated/docs/components-toaster-toast-docs.md +0 -157
  120. package/generated/docs/components-toggle-docs.md +0 -158
  121. package/generated/docs/contact-us-docs.md +0 -27
  122. package/generated/docs/extensions-editor-docs.md +0 -288
  123. package/generated/docs/extensions-editor-recipes-docs.md +0 -39
  124. package/generated/docs/foundations-introduction-docs.md +0 -17
  125. package/generated/docs/foundations-typography-docs.md +0 -191
  126. package/generated/docs/get-started-develop-docs.md +0 -48
  127. package/generated/docs/get-started-using-storybook-docs.md +0 -68
  128. package/generated/docs/resources-changelog-docs.md +0 -6
  129. package/generated/docs/themes-available-themes-docs.md +0 -66
  130. package/generated/docs/themes-introduction-docs.md +0 -121
  131. package/generated/docs/themes-tokens-docs.md +0 -1200
  132. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -1,5 +1,5 @@
1
- [](#loading)Loading
2
- ===================
1
+ Loading
2
+ =======
3
3
 
4
4
  Overview
5
5
  --------
@@ -10,13 +10,13 @@ The loading pattern is used to indicate that content is being loaded or processe
10
10
 
11
11
  Beta
12
12
 
13
- New component
13
+ **New component**
14
14
 
15
- This component is new, please provide feedback to the IDS team if you encounter any issues.
15
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
16
16
 
17
- Hide codeRefresh
17
+ [](./iframe.html?id=patterns-loading--wizard)
18
18
 
19
- \[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; }
19
+ Hide codeRefresh
20
20
 
21
21
  interface PageProps {
22
22
  setPage: (page: number) \=> void;
@@ -163,10 +163,13 @@ export const LoadingWizard \= () \=> {
163
163
  );
164
164
  };
165
165
 
166
- Copy
166
+ ```
167
+
168
+ Props
169
+ -----
167
170
 
168
- [](#usage)Usage
169
- ---------------
171
+ Usage
172
+ -----
170
173
 
171
174
  The main prop for the `IressLoading` component is the `pattern` prop. This prop determines the type of loading pattern to be used. The available options are:
172
175
 
@@ -194,19 +197,19 @@ The main prop for the `IressLoading` component is the `pattern` prop. This prop
194
197
 
195
198
  It is **recommended** to read the Patterns section of the documentation to understand how to use the loading patterns effectively.
196
199
 
197
- ### [](#be-consistent)Be consistent
200
+ ### Be consistent
198
201
 
199
202
  Apart from using the `IressLoading` component, there are a few things you need to do to ensure you are using the loading patterns correctly to ensure consistency across Iress products.
200
203
 
201
204
  * Consider the difference between what the system is doing and what the user is doing. For example, when a user is submitting a form, the system may be calling different APIs and you may be tempted to use the different loading patterns for each API. However, the user is only submitting the form once, so you should only use one loading pattern for the entire form submission process. In most cases, it will be the `page` loading pattern.
202
205
  * When switch between different applications, consider using the same loading pattern. This will help mask the loading time and improve the user experience.
203
206
 
204
- [](#behaviour)Behaviour
205
- -----------------------
207
+ Behaviour
208
+ ---------
206
209
 
207
210
  The `IressLoading` component is designed to create a seamless experience for users when loading content. They have been designed to meet best practices and improve user perception of loading times.
208
211
 
209
- ![Wait times less than 1 second, no loading indicator. Short wait times (1-3 seconds), use a loading indicator. Long wait times (3-10 seconds), use a loading indicator and provide feedback. Wait times longer than 10 seconds should be a background process.](/@fs/Users/mellisa.hankins/projects/design-system/packages/components/src/patterns/Loading/assets/ux-collective-loading-time-matrix.webp)
212
+ ![Wait times less than 1 second, no loading indicator. Short wait times (1-3 seconds), use a loading indicator. Long wait times (3-10 seconds), use a loading indicator and provide feedback. Wait times longer than 10 seconds should be a background process.](/src/patterns/Loading/assets/ux-collective-loading-time-matrix.webp)
210
213
 
211
214
  Image © [UX Collective](https://uxdesign.cc/loading-progress-indicators-ui-components-series-f4b1fc35339a)
212
215
 
@@ -228,21 +231,21 @@ In future releases, we will be adding support for the following:
228
231
 
229
232
  The `IressLoading` patterns have been built using `IressSkeleton`, `IressSpinner` and `IressProgressBar` and other components, reducing the need to create custom loading components.
230
233
 
231
- [](#patterns)Patterns
232
- ---------------------
234
+ Patterns
235
+ --------
233
236
 
234
- ### [](#component)`component`
237
+ ### `component`
235
238
 
236
239
  The `component` loading pattern is used to indicate that a specific component is loading. It is typically used when the there is a slower component on the page that requires its own loading state. You would usually use this pattern when loading data visualisations such as charts and tables.
237
240
 
238
- #### [](#behavior)Behavior
241
+ #### Behavior
239
242
 
240
243
  1. When `loaded` is false, a skeleton will be displayed immediately (configured using `timeout.skeleton`). This skeleton can be customised using the `template` prop.
241
244
  2. When `loaded` is true, the skeleton will be removed and the `children` will be displayed.
242
245
  3. When `updated` is true, the `children` will be faded out to indicate the component is loading.
243
246
  4. After 1000ms (configured using `timeout.update`), the `Updating...` message will be fade in. This message can be customised using the `updated` prop.
244
247
 
245
- #### [](#custom-skeletons)Custom skeletons
248
+ #### Custom skeletons
246
249
 
247
250
  The skeleton representing the component should be as simple as possible, it does not need to be a perfect representation of the component. In most cases a simple rectangle is sufficient that takes up the approximate same space as the component that is loading.
248
251
 
@@ -250,18 +253,18 @@ The skeleton representing the component should be as simple as possible, it does
250
253
 
251
254
  Beta
252
255
 
253
- New component
256
+ **New component**
257
+
258
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
254
259
 
255
- This component is new, please provide feedback to the IDS team if you encounter any issues.
260
+ [](./iframe.html?id=patterns-loading-patterns-component--component)
256
261
 
257
- ![](/@fs/Users/mellisa.hankins/projects/design-system/packages/components/src/patterns/Loading/mocks/retirement-graph.png)
262
+ ![](/src/patterns/Loading/mocks/retirement-graph.png)
258
263
 
259
264
  Update
260
265
 
261
266
  Hide codeRefresh
262
267
 
263
- \[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; }
264
-
265
268
  const API \= {
266
269
  chart: async () \=>
267
270
  new Promise<boolean\>((resolve) \=> {
@@ -320,15 +323,91 @@ export const LoadingGraph \= () \=> {
320
323
  );
321
324
  };
322
325
 
323
- Copy
326
+ ```
327
+
328
+ #### Props
329
+
330
+ | Name | Description | Default | Control |
331
+ | --- | --- | --- | --- |
332
+ | children\* |
333
+ The chart that is being loaded for the first time or being refreshed/updated.
334
+
335
+ ReactNode
336
+
337
+
338
+
339
+ | \- | \- |
340
+ | loaded |
341
+
342
+ If set to `true`, will hide the skeleton and display the chart.
343
+
344
+ boolean
345
+
346
+
347
+
348
+ | \- | \- |
349
+ | pattern |
350
+
351
+ Use `pattern="component"` for the following use cases:
352
+
353
+ * Component that is expected to be slow to load, such as a chart, table or large graphic.
354
+ * Component that can be refreshed/updated with new data.
355
+
356
+ literal
357
+
358
+
359
+
360
+ | \- | \- |
361
+ | screenReaderText |
362
+
363
+ Only screen readers will see this message, it is changed to the `message` after the delay.
364
+
365
+ ReactNode
366
+
367
+
368
+
369
+ |
370
+
371
+ 'Loading...'
372
+
373
+ | \- |
374
+ | template |
375
+
376
+ Which template to use as the skeleton, or you can use a ReactNode to customise the skeleton completely.
377
+
378
+ union
379
+
380
+
381
+
382
+ |
383
+
384
+ 'chart'
385
+
386
+ | \- |
387
+ | timeout |
388
+
389
+ Set the timeouts for showing the skeleton and update messages.
390
+
391
+ { /\*\* \* The time in milliseconds before the skeleton is displayed. \* @default 0 \*/ skeleton?: number; /\*\* \* The time in milliseconds before the update message is displayed. \* @default 1000 \*/ update?: number; }
392
+
393
+ | \- | \- |
394
+ | update |
395
+
396
+ Set the chart to be updated. If a `ReactNode` is provided, it will be displayed as the message. If set to `true`, will display the default message `Updating...`.
397
+
398
+ ReactNode
399
+
400
+
401
+
402
+ | \- | \- |
324
403
 
325
- ### [](#default)`default`
404
+ ### `default`
326
405
 
327
406
  The `default` loading pattern is used when no other pattern matches a scenario, and will only indicate loading if something is taking a long time to load. It is used when long loading times are not expected.
328
407
 
329
408
  This pattern is used when the user is navigating between different pages or sections of the application.
330
409
 
331
- #### [](#behavior-1)Behavior
410
+ #### Behavior
332
411
 
333
412
  1. Displays nothing by default
334
413
 
@@ -339,27 +418,88 @@ This pattern is used when the user is navigating between different pages or sect
339
418
 
340
419
  Beta
341
420
 
342
- New component
421
+ **New component**
343
422
 
344
- This component is new, please provide feedback to the IDS team if you encounter any issues.
423
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
424
+
425
+ [](./iframe.html?id=patterns-loading-patterns-default--default)
345
426
 
346
427
  This is taking longer than expected...
347
428
 
348
429
  Hide codeRefresh
349
430
 
350
- \[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; }
351
-
352
431
  <IressLoading pattern\="default" />
353
432
 
354
- Copy
433
+ ```
434
+
435
+ #### Props
436
+
437
+ | Name | Description | Default | Control |
438
+ | --- | --- | --- | --- |
439
+ | children |
440
+ Message to display when the loading time is longer than expected.
441
+
442
+ ReactNode
443
+
444
+
445
+
446
+ |
447
+
448
+ <IressInline />
449
+
450
+
451
+
452
+ | Set object |
453
+ | pattern |
454
+
455
+ Do not set the `pattern` prop when no other pattern can be applied. It will only show the loading message after a delay, and is intended for use when loading is not expected to take a long time. Example use cases:
456
+
457
+ * Navigating between different routes
458
+ * Calling an API within the page that does not require a loading state
459
+
460
+ literal
461
+
462
+
463
+
464
+ | \- |
465
+
466
+ "default"
467
+
468
+ |
469
+ | screenReaderText |
470
+
471
+ Only screen readers will see this message, it is changed to the `children` message after the delay.
472
+
473
+ ReactNode
355
474
 
356
- ### [](#long)`long`
475
+
476
+
477
+ |
478
+
479
+ 'Loading...'
480
+
481
+ | Set object |
482
+ | timeout |
483
+
484
+ Delay in milliseconds before the message is displayed.
485
+
486
+ number
487
+
488
+
489
+
490
+ |
491
+
492
+ 3000
493
+
494
+ | Set number |
495
+
496
+ ### `long`
357
497
 
358
498
  The `long` loading pattern is used to indicate an expected long loading time, usually longer than 10 seconds to complete. It is typically used when calling multiple third-party APIs, AI generation and other long running tasks.
359
499
 
360
500
  It has a required prop, `messageList`, which is an object map where the key is the time you want the message to be marked as completed and the value is the message to display. The messages will be completed (checked off) as the time elapses.
361
501
 
362
- #### [](#behavior-2)Behavior
502
+ #### Behavior
363
503
 
364
504
  1. When `loaded` is false, a progress bar and check list will be displayed after 500ms (configured using `timeout.message`). This progress bar can be customised using the `renderProgress` prop.
365
505
  2. The messages will rotate until the `loaded` prop is set to true.
@@ -368,7 +508,7 @@ It has a required prop, `messageList`, which is an object map where the key is t
368
508
  3. When `loaded` is true, all items in the checklist are completed and the progress bar and message will begin fading out. To see the fade out, you will need to use the `IressLoading.shouldRender` hook.
369
509
  4. When `error` is true, the error message will be displayed, overriding the progress bar and checklist. This message can be customised using the `error` prop. The error message will be displayed with a red background.
370
510
 
371
- #### [](#adjusting-the-progress-bar)Adjusting the progress bar
511
+ #### Adjusting the progress bar
372
512
 
373
513
  The `long` loading pattern uses a progress bar to indicate that the application is loading alongside an `estimatedFinishTime` prop. This prop is used to indicate the estimated time until the application is fully loaded, and is used to help the user understand how long they will need to wait and assure them something is happening. The progress bar will animate based on the estimated time.
374
514
 
@@ -380,9 +520,11 @@ Once the `loaded` prop is set to true, the progress bar will always be set to 10
380
520
 
381
521
  Beta
382
522
 
383
- New component
523
+ **New component**
524
+
525
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
384
526
 
385
- This component is new, please provide feedback to the IDS team if you encounter any issues.
527
+ [](./iframe.html?id=patterns-loading-patterns-long--long)
386
528
 
387
529
  * Finished: Processing transcript
388
530
  * Finished: Noting key information
@@ -390,8 +532,6 @@ This component is new, please provide feedback to the IDS team if you encounter
390
532
 
391
533
  Hide codeRefresh
392
534
 
393
- \[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; }
394
-
395
535
  <IressLoading
396
536
  messageList\={{
397
537
  '3000': 'Processing transcript',
@@ -401,19 +541,130 @@ Hide codeRefresh
401
541
  pattern\="long"
402
542
  />
403
543
 
404
- Copy
544
+ ```
545
+
546
+ #### Props
547
+
548
+ | Name | Description | Default | Control |
549
+ | --- | --- | --- | --- |
550
+ | children |
551
+ The children are displayed while loading. This will be displayed above the progress bar and checklist.
552
+
553
+ ReactNode
554
+
555
+
556
+
557
+ | \- | Set object |
558
+ | error |
559
+
560
+ An error to display if the loading fails. This will override the `messageList` and show an error message instead.
561
+
562
+ ReactNode
405
563
 
406
- ### [](#page)`page`
564
+
565
+
566
+ | \- | Set object |
567
+ | estimatedFinishTime |
568
+
569
+ Estimated time in milliseconds for the loading to finish.
570
+
571
+ number
572
+
573
+
574
+
575
+ |
576
+
577
+ 10000
578
+
579
+ | Set number |
580
+ | loaded |
581
+
582
+ If set to `true`, will start hiding the loading indicator. It is recommended to use this prop if you are using the `IressLoading.shouldRender` hook to achieve a smooth loading experience.
583
+
584
+ boolean
585
+
586
+
587
+
588
+ | \- | Set boolean |
589
+ | messageList |
590
+
591
+ A checklist to display while loading. The key is the time when you want the item to be checked.
592
+
593
+ Record<number, ReactNode>
594
+
595
+ | { } |
596
+
597
+ RAW
598
+
599
+ messageList :
600
+
601
+ {
602
+
603
+ * 3000 : "Processing transcript"
604
+ * 5000 : "Noting key information"
605
+ * 7000 : "Generating summary"
606
+
607
+ }
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+ |
616
+ | pattern |
617
+
618
+ The long loading pattern will display a checklist of items that are being loaded.
619
+
620
+ Use `pattern="long"` for the following use cases:
621
+
622
+ * Calling multiple slow APIs to load data
623
+ * Loading results from AI
624
+ * Processing a large amount of data as a queue (eg. bulk uploading or large media file uploads)
625
+
626
+ literal
627
+
628
+
629
+
630
+ | \- |
631
+
632
+ "long"
633
+
634
+ |
635
+ | progress |
636
+
637
+ If provided, will use this to set the `value` of the progress bar. If not provided, will use the `estimatedFinishTime` to calculate the progress.
638
+
639
+ IressProgressProps\['value'\]
640
+
641
+ | \- | Set object |
642
+ | renderProgress |
643
+
644
+ This is a render prop that allows you to override the default progress rendering. This is useful if you want to use a different progress component or if you want to add additional props to the progress bar.
645
+
646
+ ( props: Pick< IressProgressProps, 'className' | 'min' | 'max' | 'sectionTitle' | 'value' >, ) => ReactNode
647
+
648
+ | (props) => <IressProgress {...props} /> | \- |
649
+ | timeout |
650
+
651
+ Set the timeouts for showing the progress bar and message.
652
+
653
+ { /\*\* \* The time in milliseconds before this component begins to fade out (if \`loaded\` is set to \`true\`). \* @default 1300 \*/ loaded?: number; /\*\* \* The time in milliseconds before the checklist is displayed. \* @default 500 \*/ message?: number; }
654
+
655
+ | \- | Set object |
656
+
657
+ ### `page`
407
658
 
408
659
  The `page` loading pattern is used to indicate that a page is loading. It is the most common loading pattern, allowing the users to see the entire content at once where possible.
409
660
 
410
- #### [](#behavior-3)Behavior
661
+ #### Behavior
411
662
 
412
663
  1. When `loaded` is false, a skeleton will be displayed after 500ms (configured using `timeout`). This skeleton can be customised using the `template` prop.
413
664
  2. If `critical` is set whilst `loaded` is false, the critical content will be displayed immediately. This is useful for showing critical content while the rest of the page is loading.
414
665
  3. When `loaded` is true, the skeleton will begin fading out. To see the fade out, you will need to use the `IressLoading.shouldRender` hook.
415
666
 
416
- #### [](#custom-skeletons-1)Custom skeletons
667
+ #### Custom skeletons
417
668
 
418
669
  The skeleton does not need to be a perfect representation of the page. It is recommended to follow the guidelines below when creating custom `template` skeletons:
419
670
 
@@ -423,7 +674,7 @@ The skeleton does not need to be a perfect representation of the page. It is rec
423
674
 
424
675
  For your convenience, we have provided a few templates that you can use in the `template` prop, including: `page`, `form` and `dashboard`.
425
676
 
426
- #### [](#critical-content)Critical content
677
+ #### Critical content
427
678
 
428
679
  In some cases it may be useful to show critical content while the rest of the page is loading. This gives the user a preview of what to expect. The example below shows a loading page with critical content by using the `critical` prop.
429
680
 
@@ -431,9 +682,11 @@ In some cases it may be useful to show critical content while the rest of the pa
431
682
 
432
683
  Beta
433
684
 
434
- New component
685
+ **New component**
686
+
687
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
435
688
 
436
- This component is new, please provide feedback to the IDS team if you encounter any issues.
689
+ [](./iframe.html?id=patterns-loading-patterns-page--page)
437
690
 
438
691
  Dashboard
439
692
  =========
@@ -450,8 +703,6 @@ Loading...
450
703
 
451
704
  Hide codeRefresh
452
705
 
453
- \[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; }
454
-
455
706
  const API \= {
456
707
  criticalContent: async () \=>
457
708
  new Promise<ReactNode\>((resolve) \=> {
@@ -517,20 +768,94 @@ export const LoadingDashboard \= () \=> {
517
768
  );
518
769
  };
519
770
 
520
- Copy
771
+ ```
772
+
773
+ #### Props
774
+
775
+ | Name | Description | Default | Control |
776
+ | --- | --- | --- | --- |
777
+ | critical |
778
+ If provided, will switch the skeleton to this template. Use when you have critical content that can be displayed while loading to allow the user to see some content while the rest is loading.
779
+
780
+ ReactNode
781
+
782
+
783
+
784
+ | \- | \- |
785
+ | loaded |
786
+
787
+ If set to `true`, will start hiding the loading indicator. It is recommended to use this prop if you are using the `IressLoading.shouldRender` hook to achieve a smooth loading experience.
788
+
789
+ boolean
790
+
791
+
792
+
793
+ | \- | \- |
794
+ | pattern |
795
+
796
+ Use `pattern="page"` for the following use cases:
797
+
798
+ * Detail page for a record
799
+ * Form page
800
+ * Article page
801
+
802
+ literal
803
+
804
+
805
+
806
+ | \- | \- |
807
+ | screenReaderText |
808
+
809
+ Only screen readers will see this message.
810
+
811
+ ReactNode
812
+
813
+
814
+
815
+ |
816
+
817
+ 'Loading...'
818
+
819
+ | \- |
820
+ | template |
821
+
822
+ Which template to use as the skeleton, or you can use a ReactNode to customise the skeleton completely.
823
+
824
+ union
825
+
826
+
827
+
828
+ |
829
+
830
+ 'page'
831
+
832
+ | \- |
833
+ | timeout |
834
+
835
+ Delay in milliseconds before the skeleton is displayed.
836
+
837
+ number
838
+
839
+
840
+
841
+ |
842
+
843
+ 500
521
844
 
522
- ### [](#start-up)`start-up`
845
+ | \- |
846
+
847
+ ### `start-up`
523
848
 
524
849
  The `start-up` loading pattern is used to indicate that the application is loading. It is typically used when the application is first launched. This pattern is used when the application is first launched or when switching from a different application to a new application. It is also used when switching from a client's website to an Iress application or switching themes.
525
850
 
526
- #### [](#behavior-4)Behavior
851
+ #### Behavior
527
852
 
528
853
  1. When `loaded` is false, a progress bar will be displayed after 500ms (configured using `timeout.progress`). This progress bar can be customised using the `renderProgress` prop.
529
854
  2. When `loaded` is false after 2.5 seconds (configured using `timeout.message`), the message will be displayed. This message can be customised using the `children` or `messageList` prop.
530
855
  3. If using `messageList`, the messages will rotate until the `loaded` prop is set to true.
531
856
  4. When `loaded` is true, the progress bar and message will begin fading out. To see the fade out, you will need to use the `IressLoading.shouldRender` hook.
532
857
 
533
- #### [](#adjusting-the-progress-bar-1)Adjusting the progress bar
858
+ #### Adjusting the progress bar
534
859
 
535
860
  The `start-up` loading pattern uses a progress bar to indicate that the application is loading alongside an `estimatedFinishTime` prop. This prop is used to indicate the estimated time until the application is fully loaded, and is used to help the user understand how long they will need to wait and assure them something is happening. The progress bar will animate based on the estimated time.
536
861
 
@@ -538,7 +863,7 @@ If your application is capable of calculating real progress, you can pass the `p
538
863
 
539
864
  Once the `loaded` prop is set to true, the progress bar will always be set to 100% and the loading pattern will fade out.
540
865
 
541
- #### [](#rotating-messages)Rotating messages
866
+ #### Rotating messages
542
867
 
543
868
  The start-up process is often used initialise the application and load any necessary data. This can include loading user preferences, settings, and any other data that is required to make using the application quicker and easier, however this may add burden to the loading time.
544
869
 
@@ -548,13 +873,13 @@ To compensate for this, you can pass multiple messages to the pattern using the
548
873
 
549
874
  Beta
550
875
 
551
- New component
876
+ **New component**
552
877
 
553
- This component is new, please provide feedback to the IDS team if you encounter any issues.
878
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
554
879
 
555
- Hide codeRefresh
880
+ [](./iframe.html?id=patterns-loading-patterns-startup--start-up)
556
881
 
557
- \[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; }
882
+ Hide codeRefresh
558
883
 
559
884
  <IressLoading
560
885
  messageList\={{
@@ -564,19 +889,144 @@ Hide codeRefresh
564
889
  pattern\="start-up"
565
890
  />
566
891
 
567
- Copy
892
+ ```
893
+
894
+ #### Props
895
+
896
+ | Name | Description | Default | Control |
897
+ | --- | --- | --- | --- |
898
+ | children |
899
+ Message to display when the loading time is longer than expected.
900
+
901
+ ReactNode
902
+
903
+
904
+
905
+ |
906
+
907
+ <IressText />
908
+
909
+
910
+
911
+ | Set object |
912
+ | estimatedFinishTime |
913
+
914
+ Estimated time in milliseconds for the loading to finish.
915
+
916
+ number
917
+
918
+
919
+
920
+ |
921
+
922
+ 3000
923
+
924
+ | Set number |
925
+ | loaded |
926
+
927
+ If set to `true`, will start hiding the loading indicator. It is recommended to use this prop if you are using the `IressLoading.shouldRender` hook to achieve a smooth loading experience.
928
+
929
+ boolean
930
+
931
+
932
+
933
+ | \- | Set boolean |
934
+ | messageList |
935
+
936
+ A message list to display while loading. The key is the time when you want the message to change to this message. If using a message list, the `children` will not be displayed.
937
+
938
+ Record<number, ReactNode>
939
+
940
+ | \- |
941
+
942
+ RAW
943
+
944
+ messageList :
945
+
946
+ {
947
+
948
+ * 0 :
949
+
950
+ {...} 6 keys
951
+
952
+ * 4500 :
953
+
954
+ {...} 6 keys
955
+
956
+
957
+ }
958
+
959
+
960
+
961
+
962
+
963
+
568
964
 
569
- ### [](#validate)`validate`
965
+ |
966
+ | pattern |
967
+
968
+ Use `pattern="start-up"` for the following use cases:
969
+
970
+ * Loading an application for the first time
971
+ * Switching from a different application to a new application
972
+ * Switching from a client's website to an Iress application
973
+ * Switching themes
974
+
975
+ literal
976
+
977
+
978
+
979
+ | \- |
980
+
981
+ "start-up"
982
+
983
+ |
984
+ | progress |
985
+
986
+ If provided, will use this to set the `value` of the progress bar. If not provided, will use the `estimatedFinishTime` to calculate the progress.
987
+
988
+ IressProgressProps\['value'\]
989
+
990
+ | \- | Set object |
991
+ | renderProgress |
992
+
993
+ This is a render prop that allows you to override the default progress rendering. This is useful if you want to use a different progress component or if you want to add additional props to the progress bar.
994
+
995
+ ( props: Pick< IressProgressProps, 'className' | 'min' | 'max' | 'sectionTitle' | 'value' >, ) => ReactNode
996
+
997
+ | (props) => <IressProgress {...props} /> | \- |
998
+ | screenReaderText |
999
+
1000
+ Only screen readers will see this message, it is changed to the `children` message after the delay.
1001
+
1002
+ ReactNode
1003
+
1004
+
1005
+
1006
+ |
1007
+
1008
+ 'Loading...'
1009
+
1010
+ | Set object |
1011
+ | timeout |
1012
+
1013
+ Set the timeouts for showing the progress bar and message.
1014
+
1015
+ { /\*\* \* The time in milliseconds before this component begins to fade out (if \`loaded\` is set to \`true\`). \* @default 200 \*/ loaded?: number; /\*\* \* The time in milliseconds before the message message is displayed. \* @default 2500 \*/ message?: number; /\*\* \* The time in milliseconds before the progress bar is displayed. \* @default 500 \*/ progress?: number; }
1016
+
1017
+ | \- | Set object |
1018
+
1019
+ ### `validate`
570
1020
 
571
1021
  The `validate` loading pattern is used to indicate that a server-side validation is in progress. It is typically used when the user is submitting a form or performing an action that requires validation and the user is not expected to leave the page.
572
1022
 
573
- #### [](#behavior-5)Behavior
1023
+ #### Behavior
574
1024
 
575
1025
  1. When `loading` is false, the button will be displayed immediately (customised using the `renderButton` prop, or the `children` prop if you do not mind passing in the `loading` prop twice).
576
1026
  2. When `loading` is true, the button will be disabled and a spinner will be displayed.
577
1027
  3. When `loading` is true after 2.5 seconds (configured using `timeout`), the message will be displayed. This message can be customised using the `message` prop. Its placement can be adjusted using the `position` prop.
578
1028
 
579
- #### [](#message-position)Message position
1029
+ #### Message position
580
1030
 
581
1031
  Forms come in all shapes and sizes, and the `IressLoading` component is designed to be flexible enough to work with any form. The `position` prop allows you to adjust the placement of the loading message. The available options are:
582
1032
 
@@ -588,9 +1038,11 @@ Forms come in all shapes and sizes, and the `IressLoading` component is designed
588
1038
 
589
1039
  Beta
590
1040
 
591
- New component
1041
+ **New component**
592
1042
 
593
- This component is new, please provide feedback to the IDS team if you encounter any issues.
1043
+ This component is new, please provide feedback to the Frontend Enablement team if you encounter any issues.
1044
+
1045
+ [](./iframe.html?id=patterns-loading-patterns-validate--validate)
594
1046
 
595
1047
  Submit
596
1048
 
@@ -598,17 +1050,108 @@ This is taking longer than expected...
598
1050
 
599
1051
  Hide codeRefresh
600
1052
 
601
- \[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; }
602
-
603
1053
  <IressLoading
604
1054
  loading
605
1055
  pattern\="validate"
606
1056
  />
607
1057
 
608
- Copy
1058
+ ```
1059
+
1060
+ #### Props
1061
+
1062
+ | Name | Description | Default | Control |
1063
+ | --- | --- | --- | --- |
1064
+ | loading |
1065
+ When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
1066
+
1067
+ IressButtonProps\['loading'\]
1068
+
1069
+ |
1070
+
1071
+ false
1072
+
1073
+ |
1074
+
1075
+ true
1076
+
1077
+ |
1078
+ | message |
1079
+
1080
+ Set the message to be displayed when the button is in the loading state.
1081
+
1082
+ ReactNode
1083
+
1084
+
1085
+
1086
+ |
1087
+
1088
+ 'This is taking longer than expected...'
1089
+
1090
+ | Set object |
1091
+ | pattern |
1092
+
1093
+ Use `pattern="validate"` for the following use cases:
1094
+
1095
+ * Submitting a form
1096
+ * Saving a record
609
1097
 
610
- [](#suspense)Suspense
611
- ---------------------
1098
+ literal
1099
+
1100
+
1101
+
1102
+ |
1103
+
1104
+ 'validate'
1105
+
1106
+ |
1107
+
1108
+ "validate"
1109
+
1110
+ |
1111
+ | position |
1112
+
1113
+ This sets where the loading message will be displayed.
1114
+
1115
+ * `bottom` - The loading message will be displayed below the button. It will be absolute positioned.
1116
+ * `top` - The loading message will be displayed above the button. It will be absolute positioned.
1117
+ * `right` - The loading message will be displayed to the right of the button. It will be inline positioned.
1118
+
1119
+ union
1120
+
1121
+
1122
+
1123
+ |
1124
+
1125
+ 'bottom'
1126
+
1127
+ |
1128
+
1129
+ bottomtopright
1130
+
1131
+ |
1132
+ | renderButton |
1133
+
1134
+ This is a render prop that allows you to override the default button rendering. This is useful if you want to use a different button component or if you want to add additional props to the button.
1135
+
1136
+ ( props: Pick<IressButtonProps, 'className' | 'loading'>, ) => ReactNode
1137
+
1138
+ | (props: Pick<IressButtonProps, 'className' | 'loading'>) => ( <IressButton {...props} type="submit"> Submit </IressButton> ) | \- |
1139
+ | timeout |
1140
+
1141
+ The time in milliseconds before the loading message is displayed.
1142
+
1143
+ number
1144
+
1145
+
1146
+
1147
+ |
1148
+
1149
+ 2500
1150
+
1151
+ | Set number |
1152
+
1153
+ Suspense
1154
+ --------
612
1155
 
613
1156
  Since React 18, React has introduced a new way to handle loading states using `Suspense`, allowing you to lazy load components in an efficient manner.
614
1157
 
@@ -621,9 +1164,9 @@ The wizard example can be translated to use `IressLoadingSuspense` as follows (i
621
1164
  * The `IressLoadingSuspense` component will automatically handle the loading state for you, so you do not need to pass the `loaded` prop or use the `IressLoading.shouldRender` hook.
622
1165
  * Nested suspense components will be handled by the highest `IressLoadingSuspense` component. This means that if you have multiple nested `IressLoadingSuspense` components, only the top most one will display a loading state. You can see this in the example when you click the Next button, you no longer see the component loading pattern due to it being nested under the page loading pattern.
623
1166
 
624
- Hide codeRefresh
1167
+ [](./iframe.html?id=patterns-loading-suspense--suspense)
625
1168
 
626
- \[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; }
1169
+ Hide codeRefresh
627
1170
 
628
1171
  interface PageProps {
629
1172
  setPage: (page: number) \=> void;
@@ -756,11 +1299,49 @@ export const LoadingSuspenseWizard \= () \=> (
756
1299
  </IressLoadingSuspense\>
757
1300
  );
758
1301
 
759
- Copy
1302
+ ```
760
1303
 
761
- Hide codeRefresh
1304
+ #### Props
1305
+
1306
+ | Name | Description | Default | Control |
1307
+ | --- | --- | --- | --- |
1308
+ | children |
1309
+ The content that will be rendered inside the Suspense boundary. Typically includes lazy-loaded components and components that use the `use` or `IressLoadingSuspense.use` hook.
1310
+
1311
+ ReactNode
1312
+
1313
+
1314
+
1315
+ | \- | \- |
1316
+ | delay |
1317
+
1318
+ Duration (in milliseconds) to delay unmounting the fallback to allow the fade-out animation to complete. By default it uses the default delay of the pattern.
1319
+
1320
+ number
1321
+
1322
+
1323
+
1324
+ | \- | \- |
1325
+ | onLoaded |
1326
+
1327
+ By default it uses the default delay of the pattern.
1328
+
1329
+ () => void
762
1330
 
763
- \[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; }
1331
+ | \- | \- |
1332
+ | startFrom |
1333
+
1334
+ Duration (in milliseconds) before showing the loading pattern. Default is 500ms, meaning a user will not even see the loading indicator if the page loads before this time.
1335
+
1336
+ number
1337
+
1338
+
1339
+
1340
+ | \- | \- |
1341
+
1342
+ [](./iframe.html?id=patterns-loading-suspense--fast-suspense)
1343
+
1344
+ Hide codeRefresh
764
1345
 
765
1346
  interface PageProps {
766
1347
  setPage: (page: number) \=> void;
@@ -888,43 +1469,64 @@ export const LoadingSuspenseWizardFast \= () \=> (
888
1469
  </IressLoadingSuspense\>
889
1470
  );
890
1471
 
891
- Copy
1472
+ ```
1473
+
1474
+ #### Props
1475
+
1476
+ | Name | Description | Default | Control |
1477
+ | --- | --- | --- | --- |
1478
+ | children |
1479
+ The content that will be rendered inside the Suspense boundary. Typically includes lazy-loaded components and components that use the `use` or `IressLoadingSuspense.use` hook.
1480
+
1481
+ ReactNode
1482
+
1483
+
1484
+
1485
+ | \- | \- |
1486
+ | delay |
1487
+
1488
+ Duration (in milliseconds) to delay unmounting the fallback to allow the fade-out animation to complete. By default it uses the default delay of the pattern.
1489
+
1490
+ number
1491
+
1492
+
1493
+
1494
+ | \- | \- |
1495
+ | onLoaded |
1496
+
1497
+ By default it uses the default delay of the pattern.
1498
+
1499
+ () => void
1500
+
1501
+ | \- | \- |
1502
+ | startFrom |
892
1503
 
893
- [](#hooks)Hooks
894
- ---------------
1504
+ Duration (in milliseconds) before showing the loading pattern. Default is 500ms, meaning a user will not even see the loading indicator if the page loads before this time.
895
1505
 
896
- ### [](#iressloadingshouldrender)`IressLoading.shouldRender`
1506
+ number
1507
+
1508
+
1509
+
1510
+ | \- | \- |
1511
+
1512
+ Hooks
1513
+ -----
1514
+
1515
+ ### `IressLoading.shouldRender`
897
1516
 
898
1517
  The `IressLoading.shouldRender` hook is used to determine whether the loading pattern should be displayed or not. It is used to control the visibility of the loading pattern based on the `loaded` prop.
899
1518
 
900
1519
  Its main function is to delay the un-mounting of the loading pattern when the `loaded` prop is set to true to allow for a fade out animation.
901
1520
 
902
- \[data-radix-scroll-area-viewport\] {
903
- scrollbar-width: none;
904
- -ms-overflow-style: none;
905
- -webkit-overflow-scrolling: touch;
906
- }
907
- \[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
908
- display: none;
909
- }
910
- :where(\[data-radix-scroll-area-viewport\]) {
911
- display: flex;
912
- flex-direction: column;
913
- align-items: stretch;
914
- }
915
- :where(\[data-radix-scroll-area-content\]) {
916
- flex-grow: 1;
917
- }
918
-
919
1521
  const \[loaded, setLoaded\] \= useState(false);
920
1522
  const renderLoading \= IressLoading.shouldRender(loaded);
921
1523
  // Use renderLoading instead of !loaded for the smooth transition.
922
1524
  if (renderLoading) return <IressLoading pattern\="page" loaded\={loaded} />;
923
1525
  else return <IressText\>Content is loaded</IressText\>;
924
1526
 
925
- Copy
1527
+ ```
926
1528
 
927
- ### [](#iressloadingsuspenseuse)`IressLoadingSuspense.use`
1529
+ ### `IressLoadingSuspense.use`
928
1530
 
929
1531
  The `IressLoadingSuspense.use` hook is a polyfill for the React 19 `use` hook, allowing you to have similar functionality in React 18. It is used to handle loading states when using `IressLoadingSuspense`.
930
1532
 
@@ -935,23 +1537,6 @@ Avoid in React 19
935
1537
 
936
1538
  If you are using React 19, it is recommended to use the built-in `use` hook instead of this one. In future releases, this hook will be deprecated and removed from the library.
937
1539
 
938
- \[data-radix-scroll-area-viewport\] {
939
- scrollbar-width: none;
940
- -ms-overflow-style: none;
941
- -webkit-overflow-scrolling: touch;
942
- }
943
- \[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
944
- display: none;
945
- }
946
- :where(\[data-radix-scroll-area-viewport\]) {
947
- display: flex;
948
- flex-direction: column;
949
- align-items: stretch;
950
- }
951
- :where(\[data-radix-scroll-area-content\]) {
952
- flex-grow: 1;
953
- }
954
-
955
1540
  const HomePage \= () \=> {
956
1541
  const pageData \= IressLoadingSuspense.use(API.fetchPage('home'));
957
1542
  return (
@@ -967,20 +1552,20 @@ export const App \= () \=> (
967
1552
  </IressLoadingSuspense\>
968
1553
  );
969
1554
 
970
- Copy
1555
+ ```
971
1556
 
972
- [](#examples)Examples
973
- ---------------------
1557
+ Examples
1558
+ --------
974
1559
 
975
1560
  Below are some examples of how to use the `IressLoading` component in different scenarios.
976
1561
 
977
- ### [](#wizard)Wizard
1562
+ ### Wizard
978
1563
 
979
1564
  Here you can see how a wizard can use the `IressLoading` component at different stages of the application. The first example shows a `slow` wizard, and the second example shows how the same code looks when the requests are fast. The main difference is you see minimal loading inidicators in the second example, improving the perception that the system is fast.
980
1565
 
981
- Hide codeRefresh
1566
+ [](./iframe.html?id=patterns-loading--wizard)
982
1567
 
983
- \[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; }
1568
+ Hide codeRefresh
984
1569
 
985
1570
  interface PageProps {
986
1571
  setPage: (page: number) \=> void;
@@ -1127,11 +1712,13 @@ export const LoadingWizard \= () \=> {
1127
1712
  );
1128
1713
  };
1129
1714
 
1130
- Copy
1715
+ ```
1131
1716
 
1132
- Hide codeRefresh
1717
+ #### Props
1133
1718
 
1134
- \[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; }
1719
+ [](./iframe.html?id=patterns-loading--fast-wizard)
1720
+
1721
+ Hide codeRefresh
1135
1722
 
1136
1723
  interface PageProps {
1137
1724
  setPage: (page: number) \=> void;
@@ -1280,25 +1867,6 @@ export const LoadingWizardFast \= () \=> {
1280
1867
  );
1281
1868
  };
1282
1869
 
1283
- Copy
1284
-
1285
- On this page
1286
-
1287
- * [Overview](#overview)
1288
- * [Props](#props)
1289
- * [Usage](#usage)
1290
- * [Be consistent](#be-consistent)
1291
- * [Behaviour](#behaviour)
1292
- * [Patterns](#patterns)
1293
- * [component](#component)
1294
- * [default](#default)
1295
- * [long](#long)
1296
- * [page](#page)
1297
- * [start-up](#start-up)
1298
- * [validate](#validate)
1299
- * [Suspense](#suspense)
1300
- * [Hooks](#hooks)
1301
- * [IressLoading.shouldRender](#iressloadingshouldrender)
1302
- * [IressLoadingSuspense.use](#iressloadingsuspenseuse)
1303
- * [Examples](#examples)
1304
- * [Wizard](#wizard)
1870
+ ```
1871
+
1872
+ #### Props