@iress-oss/ids-mcp-server 6.0.0-alpha.2 → 6.0.0-alpha.4

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 (80) hide show
  1. package/generated/docs/components_components-alert-docs.md +7 -7
  2. package/generated/docs/components_components-autocomplete-docs.md +18 -18
  3. package/generated/docs/components_components-autocomplete-recipes-docs.md +9 -2
  4. package/generated/docs/components_components-badge-docs.md +4 -4
  5. package/generated/docs/components_components-button-docs.md +16 -14
  6. package/generated/docs/components_components-buttongroup-docs.md +9 -9
  7. package/generated/docs/components_components-card-docs.md +32 -17
  8. package/generated/docs/components_components-checkbox-docs.md +7 -7
  9. package/generated/docs/components_components-checkboxgroup-docs.md +10 -10
  10. package/generated/docs/components_components-checkboxgroup-recipes-docs.md +4 -3
  11. package/generated/docs/components_components-col-docs.md +38 -38
  12. package/generated/docs/components_components-container-docs.md +5 -5
  13. package/generated/docs/components_components-divider-docs.md +5 -5
  14. package/generated/docs/components_components-expander-docs.md +6 -4
  15. package/generated/docs/components_components-field-docs.md +28 -28
  16. package/generated/docs/components_components-filter-docs.md +19 -19
  17. package/generated/docs/components_components-hide-docs.md +9 -9
  18. package/generated/docs/components_components-icon-docs.md +9 -9
  19. package/generated/docs/components_components-image-docs.md +2 -2
  20. package/generated/docs/components_components-inline-docs.md +76 -388
  21. package/generated/docs/components_components-input-docs.md +9 -9
  22. package/generated/docs/components_components-input-recipes-docs.md +4 -4
  23. package/generated/docs/components_components-inputcurrency-docs.md +7 -7
  24. package/generated/docs/components_components-inputcurrency-recipes-docs.md +5 -2
  25. package/generated/docs/components_components-label-docs.md +4 -4
  26. package/generated/docs/components_components-link-docs.md +6 -4
  27. package/generated/docs/components_components-menu-docs.md +13 -13
  28. package/generated/docs/components_components-menu-menuitem-docs.md +12 -12
  29. package/generated/docs/components_components-modal-docs.md +32 -13
  30. package/generated/docs/components_components-panel-docs.md +6 -6
  31. package/generated/docs/components_components-placeholder-docs.md +1 -1
  32. package/generated/docs/components_components-popover-docs.md +11 -9
  33. package/generated/docs/components_components-popover-recipes-docs.md +4 -2
  34. package/generated/docs/components_components-progress-docs.md +1 -1
  35. package/generated/docs/components_components-provider-docs.md +2 -2
  36. package/generated/docs/components_components-radio-docs.md +5 -5
  37. package/generated/docs/components_components-radiogroup-docs.md +8 -8
  38. package/generated/docs/components_components-readonly-docs.md +3 -3
  39. package/generated/docs/components_components-richselect-docs.md +69 -28
  40. package/generated/docs/components_components-row-docs.md +60 -492
  41. package/generated/docs/components_components-select-docs.md +8 -8
  42. package/generated/docs/components_components-skeleton-docs.md +9 -9
  43. package/generated/docs/components_components-skeleton-recipes-docs.md +2 -2
  44. package/generated/docs/components_components-skiplink-docs.md +1 -1
  45. package/generated/docs/components_components-slideout-docs.md +34 -13
  46. package/generated/docs/components_components-slider-docs.md +8 -8
  47. package/generated/docs/components_components-spinner-docs.md +3 -3
  48. package/generated/docs/components_components-stack-docs.md +63 -175
  49. package/generated/docs/components_components-table-docs.md +31 -24
  50. package/generated/docs/components_components-tabset-docs.md +10 -10
  51. package/generated/docs/components_components-tabset-tab-docs.md +4 -4
  52. package/generated/docs/components_components-tag-docs.md +14 -5
  53. package/generated/docs/components_components-text-docs.md +21 -9
  54. package/generated/docs/components_components-toaster-docs.md +12 -12
  55. package/generated/docs/components_components-toggle-docs.md +6 -6
  56. package/generated/docs/components_components-tooltip-docs.md +4 -4
  57. package/generated/docs/components_components-validationmessage-docs.md +5 -5
  58. package/generated/docs/components_foundations-responsive-layout-docs.md +16 -15
  59. package/generated/docs/components_foundations-z-index-stacking-docs.md +1 -1
  60. package/generated/docs/components_introduction-docs.md +1 -1
  61. package/generated/docs/components_patterns-form-docs.md +139 -96
  62. package/generated/docs/components_patterns-form-recipes-docs.md +160 -30
  63. package/generated/docs/components_patterns-loading-docs.md +98 -17
  64. package/generated/docs/components_patterns-shadow-docs.md +2 -2
  65. package/generated/docs/components_sandbox-docs.md +4 -0
  66. package/generated/docs/components_styling-props-colour-docs.md +2 -2
  67. package/generated/docs/components_styling-props-elevation-docs.md +2 -2
  68. package/generated/docs/components_styling-props-radius-docs.md +3 -3
  69. package/generated/docs/components_styling-props-reference-docs.md +3 -3
  70. package/generated/docs/components_styling-props-screen-readers-docs.md +2 -2
  71. package/generated/docs/components_styling-props-sizing-docs.md +3 -3
  72. package/generated/docs/components_styling-props-spacing-docs.md +19 -19
  73. package/generated/docs/components_styling-props-typography-docs.md +2 -2
  74. package/generated/docs/guidelines.md +17 -16
  75. package/generated/docs/tokens_colour-docs.md +72 -0
  76. package/generated/docs/tokens_introduction-docs.md +15 -18
  77. package/generated/docs/tokens_sandbox-docs.md +1 -0
  78. package/generated/docs/tokens_spacing-docs.md +10 -40
  79. package/generated/docs/tokens_typography-docs.md +43 -1
  80. package/package.json +4 -4
@@ -16,7 +16,7 @@ This component has been recently updated with new props. The props have been mar
16
16
 
17
17
  [](./iframe.html?id=components-input--default)
18
18
 
19
- ```
19
+ Hide codedrawOpen in CodeSandbox
20
20
 
21
21
  <IressInput
22
22
  append\=""
@@ -159,7 +159,7 @@ For more information about each type, please see the [MDN documentation](https:/
159
159
 
160
160
  [](./iframe.html?id=components-input--types)
161
161
 
162
- ```
162
+ Hide codedrawOpen in CodeSandbox
163
163
 
164
164
  <IressStack gap\="md"\>
165
165
  <IressInput
@@ -346,7 +346,7 @@ For more information about each mode (and their expected user experience), pleas
346
346
 
347
347
  [](./iframe.html?id=components-input--input-modes)
348
348
 
349
- ```
349
+ Hide codedrawOpen in CodeSandbox
350
350
 
351
351
  <IressStack gap\="md"\>
352
352
  <IressInput
@@ -500,7 +500,7 @@ Clearing will set the focus on the input and trigger the `onClear` handler. Use
500
500
 
501
501
  [](./iframe.html?id=components-input--clearable)
502
502
 
503
- ```
503
+ Hide codedrawOpen in CodeSandbox
504
504
 
505
505
  <IressInput
506
506
  clearable
@@ -662,7 +662,7 @@ Widths can also be set as a percentage, allowing the input to take up a proporti
662
662
 
663
663
  [](./iframe.html?id=components-input--sizing)
664
664
 
665
- ```
665
+ Hide codedrawOpen in CodeSandbox
666
666
 
667
667
  <IressStack gap\="md"\>
668
668
  <IressInput
@@ -825,7 +825,7 @@ You can also use `IressInput` to render a `textarea` instead of an `input`. Simp
825
825
 
826
826
  [](./iframe.html?id=components-input--text-areas)
827
827
 
828
- ```
828
+ Hide codedrawOpen in CodeSandbox
829
829
 
830
830
  <IressInput rows\={5} />
831
831
 
@@ -953,7 +953,7 @@ Content (typically icons) can be added to slots (`append` and `prepend`) within
953
953
 
954
954
  [](./iframe.html?id=components-input--slots)
955
955
 
956
- ```
956
+ Hide codedrawOpen in CodeSandbox
957
957
 
958
958
  <IressStack gap\="md"\>
959
959
  <IressInput
@@ -1092,7 +1092,7 @@ If you need more control over the read-only state (for example, rendering a styl
1092
1092
 
1093
1093
  Value
1094
1094
 
1095
- ```
1095
+ Hide codedrawOpen in CodeSandbox
1096
1096
 
1097
1097
  <IressInput
1098
1098
  append\=""
@@ -1251,7 +1251,7 @@ The example below changes the value entered to uppercase when the input is not f
1251
1251
 
1252
1252
  [](./iframe.html?id=components-input--formatter)
1253
1253
 
1254
- ```
1254
+ Hide codedrawOpen in CodeSandbox
1255
1255
 
1256
1256
  <IressInput
1257
1257
  append\=""
@@ -8,9 +8,9 @@ You can use `IressInput` to display percentage formatting. When the field is foc
8
8
 
9
9
  [](./iframe.html?id=components-input-recipes--percentage)
10
10
 
11
- ```
11
+ Hide codedrawOpen in CodeSandbox
12
12
 
13
- import { IressInput } from '@iress-oss/ids-components';
13
+ import { IressInput } from '@/main';
14
14
  export const InputPercentage \= () \=> (
15
15
  <IressInput<string | number\>
16
16
  defaultValue\="0.5"
@@ -153,7 +153,7 @@ Input using `{ register } = useForm()`
153
153
 
154
154
  Submit
155
155
 
156
- ```
156
+ Hide codedrawOpen in CodeSandbox
157
157
 
158
158
  import {
159
159
  type InputRef,
@@ -165,7 +165,7 @@ import {
165
165
  IressModal,
166
166
  IressStack,
167
167
  IressTable,
168
- } from '@iress-oss/ids-components';
168
+ } from '@/main';
169
169
  import { useState } from 'react';
170
170
  import {
171
171
  Controller,
@@ -18,7 +18,7 @@ This component has been recently updated with new props. The props have been mar
18
18
 
19
19
  AUD
20
20
 
21
- ```
21
+ Hide codedrawOpen in CodeSandbox
22
22
 
23
23
  <IressInputCurrency
24
24
  currencyCode\="AUD"
@@ -108,7 +108,7 @@ Display the GBP with `locale="en-GB"` and `currencyCode="GBP"` props (must pass
108
108
 
109
109
  GBP
110
110
 
111
- ```
111
+ Hide codedrawOpen in CodeSandbox
112
112
 
113
113
  <IressInputCurrency
114
114
  currencyCode\="GBP"
@@ -192,7 +192,7 @@ Display the JPY with `locale="ja-JPY"` and `currencyCode="JPY"` props (must pass
192
192
 
193
193
  JPY
194
194
 
195
- ```
195
+ Hide codedrawOpen in CodeSandbox
196
196
 
197
197
  <IressInputCurrency
198
198
  currencyCode\="JPY"
@@ -278,7 +278,7 @@ Display the currency symbol with `withSymbol` props
278
278
 
279
279
  AUD
280
280
 
281
- ```
281
+ Hide codedrawOpen in CodeSandbox
282
282
 
283
283
  <IressInputCurrency
284
284
  currencyCode\="AUD"
@@ -365,7 +365,7 @@ Pass more format options with `formatOptions` props. More format options in [her
365
365
 
366
366
  AUD
367
367
 
368
- ```
368
+ Hide codedrawOpen in CodeSandbox
369
369
 
370
370
  <IressInputCurrency
371
371
  currencyCode\="AUD"
@@ -476,7 +476,7 @@ $12,345.68
476
476
 
477
477
  AUD
478
478
 
479
- ```
479
+ Hide codedrawOpen in CodeSandbox
480
480
 
481
481
  <IressInputCurrency
482
482
  alignRight
@@ -564,7 +564,7 @@ Set the input content align to right with `alignRight` prop, which is more frien
564
564
 
565
565
  AUD
566
566
 
567
- ```
567
+ Hide codedrawOpen in CodeSandbox
568
568
 
569
569
  <IressInputCurrency
570
570
  alignRight
@@ -16,8 +16,9 @@ My investments
16
16
  | AU Stocks | 05/02/2019 | 26.2% | $9,342.16 |
17
17
  | UK Stocks | 28/06/2020 | 49% | $49,751.40 |
18
18
 
19
- ```
19
+ Hide codedrawOpen in CodeSandbox
20
20
 
21
+ import { IressTable } from '@/main';
21
22
  export const CurrencyInTable \= () \=> {
22
23
  return (
23
24
  <IressTable
@@ -139,8 +140,10 @@ Only able to input valid value when use `IressInputCurrency`. In this example, o
139
140
 
140
141
  AUD
141
142
 
142
- ```
143
+ Hide codedrawOpen in CodeSandbox
143
144
 
145
+ import { IressInputCurrency } from '@/main';
146
+ import { useState } from 'react';
144
147
  export const ValidValueOnChage \= () \=> {
145
148
  const \[value, setValue\] \= useState('');
146
149
  return (
@@ -18,7 +18,7 @@ This component has been recently updated with new props. The props have been mar
18
18
 
19
19
  **This is a label**
20
20
 
21
- ```
21
+ Hide codedrawOpen in CodeSandbox
22
22
 
23
23
  <IressLabel\>
24
24
  This is a label
@@ -66,7 +66,7 @@ To indicate that an input is required, you may use the `required` prop to distin
66
66
 
67
67
  **\*RequiredThis is a label for a required input**
68
68
 
69
- ```
69
+ Hide codedrawOpen in CodeSandbox
70
70
 
71
71
  <IressLabel required\>
72
72
  This is a label for a required input
@@ -117,7 +117,7 @@ Sometimes you may wish to have an input with no visible label, but to still wrap
117
117
 
118
118
  **This text is visible to screen readers only**
119
119
 
120
- ```
120
+ Hide codedrawOpen in CodeSandbox
121
121
 
122
122
  <IressLabel hiddenLabel\>
123
123
  This text is visible to screen readers only
@@ -172,7 +172,7 @@ Home settings
172
172
 
173
173
  **
174
174
 
175
- ```
175
+ Hide codedrawOpen in CodeSandbox
176
176
 
177
177
  <IressLabel\>
178
178
  <IressInline
@@ -18,7 +18,7 @@ This component has been recently updated with new props. The props have been mar
18
18
 
19
19
  Hello, I am a paragraph with an [IressLink](//iress.com) inside.
20
20
 
21
- ```
21
+ Hide codedrawOpen in CodeSandbox
22
22
 
23
23
  <IressPanel\>
24
24
  Hello, I am a paragraph with an{' '}
@@ -146,7 +146,7 @@ When the loading state is activated, any click events on the link are disabled.
146
146
 
147
147
  Link text
148
148
 
149
- ```
149
+ Hide codedrawOpen in CodeSandbox
150
150
 
151
151
  <IressLink loading\>
152
152
  Link text
@@ -253,7 +253,7 @@ Use the slots to correctly position icons or badges inside buttons.
253
253
 
254
254
  Prepend iconAppend icon
255
255
 
256
- ```
256
+ Hide codedrawOpen in CodeSandbox
257
257
 
258
258
  <IressInline gap\="md"\>
259
259
  <IressLink prepend\={<IressIcon name\="home" />}\>
@@ -352,8 +352,10 @@ You can use the `element` prop to render a custom component as the link. This is
352
352
 
353
353
  [Iress](https://iress.com)
354
354
 
355
- ```
355
+ Hide codedrawOpen in CodeSandbox
356
356
 
357
+ import { IressLink } from '@/main';
358
+ import { type HTMLAttributes, forwardRef } from 'react';
357
359
  /\*\*
358
360
  \* This could be the \`Link\` component from \`react-router-dom\` or any other routing library. \*/
359
361
  const Link \= forwardRef<
@@ -25,7 +25,7 @@ Menu item (button)
25
25
 
26
26
  [Menu item (link)](https://iress.com)Menu item (selected)
27
27
 
28
- ```
28
+ Hide codedrawOpen in CodeSandbox
29
29
 
30
30
  <IressMenu defaultSelected\="5"\>
31
31
  <IressMenuHeading\>
@@ -191,7 +191,7 @@ Menu item (button)
191
191
 
192
192
  [Menu item (link)](https://iress.com)Menu item (selected)
193
193
 
194
- ```
194
+ Hide codedrawOpen in CodeSandbox
195
195
 
196
196
  <IressMenu defaultSelected\="5"\>
197
197
  <IressMenuHeading\>
@@ -354,7 +354,7 @@ Button with append and prepend
354
354
 
355
355
  Button with append[A link with a very long name that wraps based on the menu's `noWrap` prop](https://iress.com)
356
356
 
357
- ```
357
+ Hide codedrawOpen in CodeSandbox
358
358
 
359
359
  <IressMenu maxWidth\="input.25perc"\>
360
360
  <IressMenuHeading prepend\={<IressIcon fixedWidth name\="smile"/>}\>
@@ -535,7 +535,7 @@ When rendering a set of links for navigation purposes (as a secondary nav in thi
535
535
 
536
536
  [Financial advice](https://www.iress.com/software/financial-advice/)[Trading and market data](https://www.iress.com/software/trading-and-market-data/)[Investment management](https://www.iress.com/software/investment-management/)[Mortgages](https://www.iress.com/software/mortgages/)[Life and pensions](https://www.iress.com/software/life-and-pensions/)
537
537
 
538
- ```
538
+ Hide codedrawOpen in CodeSandbox
539
539
 
540
540
  <nav aria-label\="Secondary"\>
541
541
  <IressMenu\>
@@ -688,7 +688,7 @@ Menu item 1
688
688
 
689
689
  Menu item 2
690
690
 
691
- ```
691
+ Hide codedrawOpen in CodeSandbox
692
692
 
693
693
  <IressMenu\>
694
694
  <IressMenuHeading element\="h4"\>
@@ -844,7 +844,7 @@ Menu item 3Menu item 4
844
844
 
845
845
  Menu item 5
846
846
 
847
- ```
847
+ Hide codedrawOpen in CodeSandbox
848
848
 
849
849
  <IressMenu\>
850
850
  <IressMenuHeading
@@ -1001,7 +1001,7 @@ Menu item (button)
1001
1001
 
1002
1002
  [Menu item (link)](https://iress.com)Menu item (selected)
1003
1003
 
1004
- ```
1004
+ Hide codedrawOpen in CodeSandbox
1005
1005
 
1006
1006
  <IressMenu
1007
1007
  defaultSelected\="5"
@@ -1187,7 +1187,7 @@ Menu item (button)
1187
1187
 
1188
1188
  [Menu item (link)](https://iress.com)Menu item (selected)
1189
1189
 
1190
- ```
1190
+ Hide codedrawOpen in CodeSandbox
1191
1191
 
1192
1192
  <IressStack gap\="lg"\>
1193
1193
  <IressText\>
@@ -1384,7 +1384,7 @@ Menu item with some text that wraps
1384
1384
 
1385
1385
  Non wrapping menu item with some text
1386
1386
 
1387
- ```
1387
+ Hide codedrawOpen in CodeSandbox
1388
1388
 
1389
1389
  <IressInline\>
1390
1390
  <IressMenu
@@ -1543,7 +1543,7 @@ New fileSave file as
1543
1543
 
1544
1544
  [Visit the Iress website](https://www.iress.com)[Visit Google8+](https://google.com)
1545
1545
 
1546
- ```
1546
+ Hide codedrawOpen in CodeSandbox
1547
1547
 
1548
1548
  <IressMenu role\="menu"\>
1549
1549
  <IressMenuHeading
@@ -1732,7 +1732,7 @@ Keyboard interaction
1732
1732
  * Menu items cannot be navigated using the arrow keys
1733
1733
  * Menu items are navigated using the `tab` key
1734
1734
 
1735
- ```
1735
+ Hide codedrawOpen in CodeSandbox
1736
1736
 
1737
1737
  <IressMenu defaultSelected\={5}\>
1738
1738
  <IressMenuHeading\>
@@ -1897,7 +1897,7 @@ Keyboard interaction
1897
1897
  * In inline layouts, pressing the `right` arrow key on the last item will focus the first item
1898
1898
  * Pressing the `tab` key when focused on any item in the menu will focus to next focusable item outside of the menu
1899
1899
 
1900
- ```
1900
+ Hide codedrawOpen in CodeSandbox
1901
1901
 
1902
1902
  <IressMenu
1903
1903
  defaultSelected\={5}
@@ -2071,7 +2071,7 @@ Keyboard interaction
2071
2071
  * In inline layouts, pressing the `left` arrow key on the first item will **not** focus the last item
2072
2072
  * Pressing the `tab` key when focused on any item in the menu will focus to next focusable item outside of the menu
2073
2073
 
2074
- ```
2074
+ Hide codedrawOpen in CodeSandbox
2075
2075
 
2076
2076
  <IressMenu
2077
2077
  aria-label\="Selectable listbox"
@@ -18,7 +18,7 @@ This component has been recently updated with new props. The props have been mar
18
18
 
19
19
  Menu item
20
20
 
21
- ```
21
+ Hide codedrawOpen in CodeSandbox
22
22
 
23
23
  <IressMenuItem\>
24
24
  Menu item
@@ -174,7 +174,7 @@ The `IressMenuItem` can be set to selected using the `selected` prop.
174
174
 
175
175
  Menu item
176
176
 
177
- ```
177
+ Hide codedrawOpen in CodeSandbox
178
178
 
179
179
  <IressMenuItem selected\>
180
180
  Menu item
@@ -324,7 +324,7 @@ A menu item can have a unique value set to it, used to determine its selected st
324
324
 
325
325
  Menu item with value
326
326
 
327
- ```
327
+ Hide codedrawOpen in CodeSandbox
328
328
 
329
329
  <IressMenu role\="listbox"\>
330
330
  <IressMenuItem value\={9}\>
@@ -479,7 +479,7 @@ When `canToggle` is set to true, the menu item can be toggled between selected a
479
479
 
480
480
  Menu item with value
481
481
 
482
- ```
482
+ Hide codedrawOpen in CodeSandbox
483
483
 
484
484
  <IressMenu role\="listbox"\>
485
485
  <IressMenuItem
@@ -637,7 +637,7 @@ You can prepend and append content to a menu item using the `prepend` and `appen
637
637
 
638
638
  Menu itemNew
639
639
 
640
- ```
640
+ Hide codedrawOpen in CodeSandbox
641
641
 
642
642
  <IressMenuItem
643
643
  append\={<IressBadge mode\="success"\>New</IressBadge\>}
@@ -848,7 +848,7 @@ Inside a `IressMenu` with a `role` of `listbox` and the `multiSelect` prop set t
848
848
 
849
849
  Menu item with valueMenu item with value
850
850
 
851
- ```
851
+ Hide codedrawOpen in CodeSandbox
852
852
 
853
853
  <IressMenu
854
854
  multiSelect
@@ -1008,9 +1008,9 @@ You can use the `element` prop to render a custom component inside the menu item
1008
1008
 
1009
1009
  [Iress](https://iress.com)[Google](https://google.com)
1010
1010
 
1011
- ```
1011
+ Hide codedrawOpen in CodeSandbox
1012
1012
 
1013
- import { IressMenu, IressMenuItem } from '@iress-oss/ids-components';
1013
+ import { IressMenu, IressMenuItem } from '@/main';
1014
1014
  import { type HTMLAttributes } from 'react';
1015
1015
  /\*\*
1016
1016
  \* This could be the \`Link\` component from \`react-router-dom\` or any other routing library. \*/
@@ -1173,7 +1173,7 @@ Menu item with divider
1173
1173
 
1174
1174
  * * *
1175
1175
 
1176
- ```
1176
+ Hide codedrawOpen in CodeSandbox
1177
1177
 
1178
1178
  <IressMenuItem divider\>
1179
1179
  Menu item with divider
@@ -1321,7 +1321,7 @@ However, it is recommended to use the `IressMenuDivider` component instead.
1321
1321
 
1322
1322
  * * *
1323
1323
 
1324
- ```
1324
+ Hide codedrawOpen in CodeSandbox
1325
1325
 
1326
1326
  <IressMenuDivider />
1327
1327
 
@@ -1338,7 +1338,7 @@ You can use the `IressMenuHeading` to render headings within a menu. This adds s
1338
1338
  Menu text
1339
1339
  ---------
1340
1340
 
1341
- ```
1341
+ Hide codedrawOpen in CodeSandbox
1342
1342
 
1343
1343
  <IressMenu\>
1344
1344
  <IressMenuHeading\>
@@ -1407,7 +1407,7 @@ You can use the `IressMenuText` to render other text within a menu. This adds st
1407
1407
 
1408
1408
  Menu text
1409
1409
 
1410
- ```
1410
+ Hide codedrawOpen in CodeSandbox
1411
1411
 
1412
1412
  <IressMenu\>
1413
1413
  <IressMenuText\>
@@ -33,7 +33,7 @@ Read more
33
33
 
34
34
  Show modal
35
35
 
36
- ```
36
+ Hide codedrawOpen in CodeSandbox
37
37
 
38
38
  const Story \= () \=> {
39
39
  const { showModal } \= useModal();
@@ -235,9 +235,9 @@ You can use state to control the modal by setting the `show` property to `true`
235
235
 
236
236
  Show modal using state
237
237
 
238
- ```
238
+ Hide codedrawOpen in CodeSandbox
239
239
 
240
- import { IressButton, IressModal, type IressModalProps } from '@iress-oss/ids-components';
240
+ import { IressButton, IressModal, type IressModalProps } from '@/main';
241
241
  import { useState } from 'react';
242
242
  export const ModalUsingState \= () \=> {
243
243
  const \[show, setShow\] \= useState(false);
@@ -417,7 +417,7 @@ To use, wrap your `<App/>` or the component that you want to use the `useModal`
417
417
 
418
418
  Show modal using provider
419
419
 
420
- ```
420
+ Hide codedrawOpen in CodeSandbox
421
421
 
422
422
  import {
423
423
  IressButton,
@@ -425,7 +425,7 @@ import {
425
425
  type IressModalProps,
426
426
  IressModalProvider,
427
427
  useModal,
428
- } from '@iress-oss/ids-components';
428
+ } from '@/main';
429
429
  const MODAL\_ID \= 'storybook-modal';
430
430
  export const App \= (modalProps: IressModalProps) \=> (
431
431
  <IressModalProvider\>
@@ -496,7 +496,7 @@ Content to appear underneath the main content. Usually used for extra controls l
496
496
 
497
497
  Footer slot modal
498
498
 
499
- ```
499
+ Hide codedrawOpen in CodeSandbox
500
500
 
501
501
  const Story \= () \=> {
502
502
  const { showModal } \= useModal();
@@ -697,7 +697,7 @@ The fixed footer variant of IressModal prevents content from overflowing the mod
697
697
 
698
698
  Fixed footer modal
699
699
 
700
- ```
700
+ Hide codedrawOpen in CodeSandbox
701
701
 
702
702
  const Story \= () \=> {
703
703
  const { showModal } \= useModal();
@@ -937,8 +937,27 @@ Large modals facilitate sub-flows within a primary flow, allowing users to focus
937
937
 
938
938
  View large modal example
939
939
 
940
- ```
940
+ Hide codedrawOpen in CodeSandbox
941
941
 
942
+ import {
943
+ IressButton,
944
+ IressCard,
945
+ IressCheckbox,
946
+ IressCol,
947
+ IressDivider,
948
+ IressExpander,
949
+ IressField,
950
+ IressInline,
951
+ IressInput,
952
+ IressModal,
953
+ IressProgress,
954
+ IressRichSelect,
955
+ IressRow,
956
+ IressStack,
957
+ IressTable,
958
+ } from '@/main';
959
+ import { useState } from 'react';
960
+ import modalIsDone from './modal-is-done.svg';
942
961
  const SmallModal \= () \=> {
943
962
  const \[show, setShow\] \= useState(false);
944
963
  return (
@@ -1166,7 +1185,7 @@ const LargeModal \= () \=> {
1166
1185
  );
1167
1186
  };
1168
1187
  export const ModalSizes \= () \=> (
1169
- <IressRow gutter\="spacing.700" verticalAlign\="stretch"\>
1188
+ <IressRow gutter\="spacing.7" verticalAlign\="stretch"\>
1170
1189
  <IressCol\>
1171
1190
  <SmallModal />
1172
1191
  </IressCol\>
@@ -1360,7 +1379,7 @@ You can override this behaviour by specifying a value for `xs` in your size obje
1360
1379
 
1361
1380
  Responsive modal
1362
1381
 
1363
- ```
1382
+ Hide codedrawOpen in CodeSandbox
1364
1383
 
1365
1384
  const Story \= () \=> {
1366
1385
  const { showModal } \= useModal();
@@ -1382,7 +1401,7 @@ return (
1382
1401
  xxl: 'overlay.lg'
1383
1402
  }}
1384
1403
  \>
1385
- <kn />
1404
+ <Ln />
1386
1405
  </IressModal\>
1387
1406
  </\>
1388
1407
  );
@@ -1589,7 +1608,7 @@ For instances where you require the user's full attention and you want to ensure
1589
1608
 
1590
1609
  Disable backdrop clickNo close button (please provide one, if you decide to hide the close button)Both (If you hide the close button, ensure you provide another way to close the modal)
1591
1610
 
1592
- ```
1611
+ Hide codedrawOpen in CodeSandbox
1593
1612
 
1594
1613
  const Story \= () \=> {
1595
1614
  const { showModal } \= useModal();
@@ -1833,7 +1852,7 @@ New
1833
1852
 
1834
1853
  <table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { render, waitFor, screen } from '@testing-library/react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { idsFireEvent, componentLoad } from '@iress/ids-react-test-utils';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { userEvent } from '@testing-library/user-event';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> </pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">test('opening and closing a modal', async () =&gt; {</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> await componentLoad([</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const trigger = screen.getByRole('button', { name: /open modal/i });</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> 'modal-trigger',</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> 'modal',</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> // activate modal</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> ]);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> await userEvent.click(trigger);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const modal = await screen.findByRole('dialog');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const trigger = screen.getByTestId('modal-trigger');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const modal = screen.getByTestId('modal');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> // In version 5, you can only interact with the modal once it has been loaded here.</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> // In version 4, you can already interact with the modal here as its in the DOM at this stage.</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> </pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> // activate modal</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> idsFireEvent.click(trigger);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> await waitFor(() =&gt; expect(modal).toBeVisible());</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> </pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> // close modal</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const closeButton = screen.getByTestId('modal__close-button');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const closeButton = screen.getByRole('button', { name: /close/i });</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> idsFireEvent.click(closeButton);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> await userEvent.click(closeButton);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> await waitFor(() =&gt; expect(modal).not.toBeVisible());</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> await waitForElementToBeRemoved(modal);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">});</pre></td></tr></tbody></table>
1835
1854
 
1836
- ```
1855
+ Hide codedrawOpen in CodeSandbox
1837
1856
 
1838
1857
  {
1839
1858
  render: () \=> <DiffViewer allowModeChange oldValue\={\`import { render, waitFor, screen } from '@testing-library/react';
@@ -18,7 +18,7 @@ This component has been recently updated with new props. The props have been mar
18
18
 
19
19
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
20
20
 
21
- ```
21
+ Hide codedrawOpen in CodeSandbox
22
22
 
23
23
  <IressPanel\>
24
24
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
@@ -75,10 +75,10 @@ Transparent `bg`
75
75
 
76
76
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
77
77
 
78
- ```
78
+ Hide codedrawOpen in CodeSandbox
79
79
 
80
80
  <IressContainer\>
81
- <IressRow gutter\="spacing.400"\>
81
+ <IressRow gutter\="spacing.4"\>
82
82
  <IressCol\>
83
83
  <IressPanel\>
84
84
  <IressText element\="h2"\>
@@ -188,7 +188,7 @@ justify
188
188
 
189
189
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
190
190
 
191
- ```
191
+ Hide codedrawOpen in CodeSandbox
192
192
 
193
193
  <IressStack gap\="md"\>
194
194
  <IressPanel textAlign\="center"\>
@@ -254,7 +254,7 @@ Panel can be set to fill its available container height by setting the `stretch`
254
254
 
255
255
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
256
256
 
257
- ```
257
+ Hide codedrawOpen in CodeSandbox
258
258
 
259
259
  <IressStack
260
260
  style\={{
@@ -304,7 +304,7 @@ Panels can inherit the theme's border radius which may result in an undesirable
304
304
 
305
305
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.
306
306
 
307
- ```
307
+ Hide codedrawOpen in CodeSandbox
308
308
 
309
309
  <IressPanel borderRadius\="none"\>
310
310
  His head is gone, it is like it is been erased... Erased from existence. That was the day I invented time travel. I remember it vividly. I was standing on the edge of my toilet hanging a clock, the porces was wet, I slipped, hit my head on the edge of the sink. And when I came to I had a revelation, a picture, a picture in my head, a picture of this. This is what makes time travel possible. The flux capacitor.