@iress-oss/ids-mcp-server 5.15.0 → 6.0.0-alpha.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 (91) hide show
  1. package/package.json +28 -46
  2. package/generated/docs/components-alert-docs.md +0 -130
  3. package/generated/docs/components-autocomplete-docs.md +0 -754
  4. package/generated/docs/components-autocomplete-recipes-docs.md +0 -104
  5. package/generated/docs/components-badge-docs.md +0 -148
  6. package/generated/docs/components-button-docs.md +0 -362
  7. package/generated/docs/components-button-recipes-docs.md +0 -76
  8. package/generated/docs/components-buttongroup-docs.md +0 -310
  9. package/generated/docs/components-card-docs.md +0 -494
  10. package/generated/docs/components-card-recipes-docs.md +0 -89
  11. package/generated/docs/components-checkbox-docs.md +0 -193
  12. package/generated/docs/components-checkboxgroup-docs.md +0 -692
  13. package/generated/docs/components-checkboxgroup-recipes-docs.md +0 -119
  14. package/generated/docs/components-col-docs.md +0 -466
  15. package/generated/docs/components-combobox-docs.md +0 -1016
  16. package/generated/docs/components-container-docs.md +0 -91
  17. package/generated/docs/components-divider-docs.md +0 -176
  18. package/generated/docs/components-expander-docs.md +0 -215
  19. package/generated/docs/components-field-docs.md +0 -675
  20. package/generated/docs/components-filter-docs.md +0 -1109
  21. package/generated/docs/components-form-docs.md +0 -2410
  22. package/generated/docs/components-form-recipes-docs.md +0 -886
  23. package/generated/docs/components-hide-docs.md +0 -265
  24. package/generated/docs/components-icon-docs.md +0 -553
  25. package/generated/docs/components-inline-docs.md +0 -868
  26. package/generated/docs/components-input-docs.md +0 -335
  27. package/generated/docs/components-input-recipes-docs.md +0 -140
  28. package/generated/docs/components-inputcurrency-docs.md +0 -157
  29. package/generated/docs/components-inputcurrency-recipes-docs.md +0 -116
  30. package/generated/docs/components-label-docs.md +0 -135
  31. package/generated/docs/components-menu-docs.md +0 -704
  32. package/generated/docs/components-menu-menuitem-docs.md +0 -193
  33. package/generated/docs/components-modal-docs.md +0 -587
  34. package/generated/docs/components-navbar-docs.md +0 -291
  35. package/generated/docs/components-navbar-recipes-docs.md +0 -413
  36. package/generated/docs/components-panel-docs.md +0 -380
  37. package/generated/docs/components-placeholder-docs.md +0 -27
  38. package/generated/docs/components-popover-docs.md +0 -464
  39. package/generated/docs/components-popover-recipes-docs.md +0 -245
  40. package/generated/docs/components-progress-docs.md +0 -104
  41. package/generated/docs/components-provider-docs.md +0 -105
  42. package/generated/docs/components-radio-docs.md +0 -107
  43. package/generated/docs/components-radiogroup-docs.md +0 -683
  44. package/generated/docs/components-readonly-docs.md +0 -89
  45. package/generated/docs/components-richselect-docs.md +0 -2433
  46. package/generated/docs/components-row-docs.md +0 -877
  47. package/generated/docs/components-select-docs.md +0 -456
  48. package/generated/docs/components-skeleton-docs.md +0 -214
  49. package/generated/docs/components-skeleton-recipes-docs.md +0 -76
  50. package/generated/docs/components-skiplink-docs.md +0 -66
  51. package/generated/docs/components-slideout-docs.md +0 -538
  52. package/generated/docs/components-slider-docs.md +0 -346
  53. package/generated/docs/components-spinner-docs.md +0 -59
  54. package/generated/docs/components-stack-docs.md +0 -265
  55. package/generated/docs/components-table-ag-grid-docs.md +0 -1074
  56. package/generated/docs/components-table-docs.md +0 -1305
  57. package/generated/docs/components-tabset-docs.md +0 -341
  58. package/generated/docs/components-tabset-tab-docs.md +0 -86
  59. package/generated/docs/components-tag-docs.md +0 -115
  60. package/generated/docs/components-text-docs.md +0 -394
  61. package/generated/docs/components-toaster-docs.md +0 -345
  62. package/generated/docs/components-toaster-toast-docs.md +0 -157
  63. package/generated/docs/components-toggle-docs.md +0 -158
  64. package/generated/docs/components-tooltip-docs.md +0 -311
  65. package/generated/docs/components-validationmessage-docs.md +0 -241
  66. package/generated/docs/contact-us-docs.md +0 -27
  67. package/generated/docs/extensions-editor-docs.md +0 -288
  68. package/generated/docs/extensions-editor-recipes-docs.md +0 -39
  69. package/generated/docs/foundations-accessibility-docs.md +0 -62
  70. package/generated/docs/foundations-colours-docs.md +0 -257
  71. package/generated/docs/foundations-consistency-docs.md +0 -52
  72. package/generated/docs/foundations-content-docs.md +0 -23
  73. package/generated/docs/foundations-introduction-docs.md +0 -17
  74. package/generated/docs/foundations-principles-docs.md +0 -70
  75. package/generated/docs/foundations-typography-docs.md +0 -191
  76. package/generated/docs/foundations-user-experience-docs.md +0 -63
  77. package/generated/docs/foundations-visual-design-docs.md +0 -46
  78. package/generated/docs/frequently-asked-questions-docs.md +0 -53
  79. package/generated/docs/get-started-develop-docs.md +0 -209
  80. package/generated/docs/get-started-using-storybook-docs.md +0 -68
  81. package/generated/docs/guidelines.md +0 -812
  82. package/generated/docs/introduction-docs.md +0 -43
  83. package/generated/docs/patterns-loading-docs.md +0 -1304
  84. package/generated/docs/resources-changelog-docs.md +0 -6
  85. package/generated/docs/resources-code-katas-docs.md +0 -29
  86. package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +0 -437
  87. package/generated/docs/themes-available-themes-docs.md +0 -66
  88. package/generated/docs/themes-introduction-docs.md +0 -121
  89. package/generated/docs/themes-tokens-docs.md +0 -1200
  90. package/generated/docs/versions-docs.md +0 -17
  91. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -1,104 +0,0 @@
1
- [](#recipes)Recipes
2
- ===================
3
-
4
- Experimental
5
- ------------
6
-
7
- This API is experimental. It may change in the future based on usage. The team is testing if these use cases exist and see if its worth maintaining this API. If you have any questions, concerns or feedback, please reach out to the design system team.
8
-
9
- [](#useautocompletesearch)`useAutocompleteSearch`
10
- -------------------------------------------------
11
-
12
- `IressAutocomplete` uses the `useAutocompleteSearch` hook to provide search functionality. If provided an array of `LabelValueMeta`, it will search options based on the `label` property. To fully customise how to search the objects, pass a function instead.
13
-
14
- It has been exposed in case you need it in your application to provide custom search functionality.
15
-
16
- ### [](#use-cases)Use cases
17
-
18
- 1. You want to provide filtering in a certain area of the application (eg. a table).
19
-
20
- | Name | Gender |
21
- | --- | --- |
22
- | Person 1 | Male |
23
- | Person 2 | Female |
24
- | Person 3 | Male |
25
- | Person 4 | Female |
26
- | Person 5 | Male |
27
-
28
- Hide code
29
-
30
- \[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; }
31
-
32
- const ALL\_ROWS \= \[...Array(5).keys()\].map((number) \=> ({
33
- label: \`Person ${number + 1}\`,
34
- gender: number % 2 ? 'Female' : 'Male',
35
- }));
36
- export const AutocompleteSearchTable \= () \=> {
37
- const \[query, setQuery\] \= useState('');
38
- const { debouncedQuery, loading, results } \= useAutocompleteSearch({
39
- initialOptions: ALL\_ROWS,
40
- options: ALL\_ROWS,
41
- query,
42
- });
43
- const caption \= useMemo(() \=> {
44
- if (debouncedQuery && !loading) {
45
- return \`Results matching ${debouncedQuery}\`;
46
- }
47
- return loading ? 'Searching...' : '';
48
- }, \[debouncedQuery, loading\]);
49
- const columns \= useMemo(() \=> {
50
- const labelKey \= debouncedQuery ? 'formattedLabel' : 'label';
51
- return \[
52
- { key: labelKey, label: 'Name' },
53
- { key: 'gender', label: 'Gender' },
54
- \];
55
- }, \[debouncedQuery\]);
56
- return (
57
- <IressStack gutter\="md"\>
58
- <IressInput
59
- value\={query}
60
- onChange\={(e) \=> setQuery(e.target.value)}
61
- placeholder\="Search by name"
62
- />
63
- <IressTable
64
- caption\={caption}
65
- columns\={columns}
66
- rows\={loading ? \[\] : results}
67
- empty\={loading ? 'Loading...' : 'No results found'}
68
- scope\="col"
69
- />
70
- </IressStack\>
71
- );
72
- };
73
-
74
- Copy
75
-
76
- ### [](#parameters)Parameters
77
-
78
- | Name | Description | Default | Control |
79
- | --- | --- | --- | --- |
80
- | debounceThreshold |
81
- \-
82
-
83
- | \- | \- |
84
- | initialOptions |
85
-
86
- \-
87
-
88
- | \- | \- |
89
- | options |
90
-
91
- \-
92
-
93
- | \- | \- |
94
- | query |
95
-
96
- \-
97
-
98
- | \- | \- |
99
-
100
- On this page
101
-
102
- * [useAutocompleteSearch](#useautocompletesearch)
103
- * [Use cases](#use-cases)
104
- * [Parameters](#parameters)
@@ -1,148 +0,0 @@
1
- [](#badge)Badge
2
- ===============
3
-
4
- Overview
5
- --------
6
-
7
- Badges are used to highlight an item's status for quick recognition
8
-
9
- badge
10
-
11
- Hide code
12
-
13
- \[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
14
-
15
- <IressBadge mode\="background-default"\>
16
- badge
17
- </IressBadge\>
18
-
19
- Copy
20
-
21
- [](#examples)Examples
22
- ---------------------
23
-
24
- ### [](#mode)Mode
25
-
26
- The `mode` prop controls the colour scheme of the badge. There are a range of options, including system and brand colours.
27
-
28
- successwarningdangerinfopositivenegativebackground-altbackground-default
29
-
30
- Hide code
31
-
32
- \[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
33
-
34
- <IressInline gutter\="sm"\>
35
- <IressBadge mode\="success"\>
36
- success </IressBadge\>
37
- <IressBadge mode\="warning"\>
38
- warning </IressBadge\>
39
- <IressBadge mode\="danger"\>
40
- danger </IressBadge\>
41
- <IressBadge mode\="info"\>
42
- info </IressBadge\>
43
- <IressBadge mode\="positive"\>
44
- positive </IressBadge\>
45
- <IressBadge mode\="negative"\>
46
- negative </IressBadge\>
47
- <IressBadge mode\="background-alt"\>
48
- background-alt </IressBadge\>
49
- <IressBadge mode\="background-default"\>
50
- background-default </IressBadge\>
51
- </IressInline\>
52
-
53
- Copy
54
-
55
- ### [](#pill)Pill
56
-
57
- Setting the `pill` prop will render the badge with rounded corners. Often used for displaying numbers.
58
-
59
- successwarningdangerinfopositivenegativebackground-altbackground-default
60
-
61
- Hide code
62
-
63
- \[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; }
64
-
65
- <IressInline gutter\="sm"\>
66
- <IressBadge
67
- mode\="success"
68
- pill
69
- \>
70
- success </IressBadge\>
71
- <IressBadge
72
- mode\="warning"
73
- pill
74
- \>
75
- warning </IressBadge\>
76
- <IressBadge
77
- mode\="danger"
78
- pill
79
- \>
80
- danger </IressBadge\>
81
- <IressBadge
82
- mode\="info"
83
- pill
84
- \>
85
- info </IressBadge\>
86
- <IressBadge
87
- mode\="positive"
88
- pill
89
- \>
90
- positive </IressBadge\>
91
- <IressBadge
92
- mode\="negative"
93
- pill
94
- \>
95
- negative </IressBadge\>
96
- <IressBadge
97
- mode\="background-alt"
98
- pill
99
- \>
100
- background-alt </IressBadge\>
101
- <IressBadge
102
- mode\="background-default"
103
- pill
104
- \>
105
- background-default </IressBadge\>
106
- </IressInline\>
107
-
108
- Copy
109
-
110
- ### [](#host)Host
111
-
112
- You can attach a badge to the top right of any component by passing the component into the badge's `host` prop.
113
-
114
- **Note:** This is for very simple use cases (eg. with a button or tab). For more complex use cases (eg. with a panel), it will be better if you position the badge yourself using CSS.
115
-
116
- Host button3
117
-
118
- Host tab99+
119
-
120
- Hide code
121
-
122
- \[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; }
123
-
124
- <IressInline gutter\="lg"\>
125
- <IressBadge
126
- host\={<IressButton\>Host button</IressButton\>}
127
- mode\="success"
128
- pill
129
- \>
130
- 3 </IressBadge\>
131
- <IressBadge
132
- host\={<IressTab active label\="Host tab"/>}
133
- mode\="success"
134
- pill
135
- \>
136
- 99+ </IressBadge\>
137
- </IressInline\>
138
-
139
- Copy
140
-
141
- On this page
142
-
143
- * [Overview](#overview)
144
- * [Props](#props)
145
- * [Examples](#examples)
146
- * [Mode](#mode)
147
- * [Pill](#pill)
148
- * [Host](#host)
@@ -1,362 +0,0 @@
1
- [](#button)Button
2
- =================
3
-
4
- Overview
5
- --------
6
-
7
- A button is a clickable item used to perform an action.
8
-
9
- Button
10
-
11
- Hide code
12
-
13
- \[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
14
-
15
- <IressButton\>
16
- Button
17
- </IressButton\>
18
-
19
- Copy
20
-
21
- [](#examples)Examples
22
- ---------------------
23
-
24
- ### [](#modes)Modes
25
-
26
- The `mode` prop controls the visual appearance and priority of the button.
27
-
28
- * **Primary:** Use for the main call to action. Limit to one per view.
29
- * **Secondary:** Use for secondary calls to action.
30
- * **Tertiary:** Use when you need extra affordance between your secondary actions.
31
- * **Link:** Use when you need a button to appear like a link.
32
- * **Danger:** Use for added affordance on destructive actions, such as deleting data.
33
- * **Positive:** Use for buy/purchase actions.
34
- * **Negative:** Use for sell actions.
35
-
36
- **Note:** Avoid setting `mode` to `link` when the only child of the button is an icon, as icons inside link buttons do not have an underline, and will have no visual indication that they are clickable.
37
-
38
- Primary buttonSecondary buttonTertiary buttonLink buttonDanger buttonPositive buttonNegative button
39
-
40
- Hide code
41
-
42
- \[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; }
43
-
44
- <div
45
- className\="iress-u-inline iress--gutter--md"
46
- style\={{
47
- rowGap: 'var(--iress-g-spacing-md'
48
- }}
49
- \>
50
- <IressButton mode\="primary"\>
51
- Primary button </IressButton\>
52
- <IressButton mode\="secondary"\>
53
- Secondary button </IressButton\>
54
- <IressButton mode\="tertiary"\>
55
- Tertiary button </IressButton\>
56
- <IressButton mode\="link"\>
57
- Link button </IressButton\>
58
- <IressButton mode\="danger"\>
59
- Danger button </IressButton\>
60
- <IressButton mode\="positive"\>
61
- Positive button </IressButton\>
62
- <IressButton mode\="negative"\>
63
- Negative button </IressButton\>
64
- </div\>
65
-
66
- Copy
67
-
68
- ### [](#types)Types
69
-
70
- The `type` property controls the behaviour of the button. It defaults to `button`, which is the best option for most situations, but can also be set to `submit` or `reset`. `submit` should be used for buttons that submit forms, and `reset` should be used if the button clears form data and resets the form to its original state.
71
-
72
- **Please note:** this differs from a standard HTML button element, where the `type` defaults to submit.
73
-
74
- Button buttonReset buttonSubmit button
75
-
76
- Hide code
77
-
78
- \[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; }
79
-
80
- <div className\="iress-u-inline iress--gutter--md"\>
81
- <IressButton type\="button"\>
82
- Button button </IressButton\>
83
- <IressButton type\="reset"\>
84
- Reset button </IressButton\>
85
- <IressButton type\="submit"\>
86
- Submit button </IressButton\>
87
- </div\>
88
-
89
- Copy
90
-
91
- ### [](#loading)Loading
92
-
93
- Loading buttons give the user an indication something is happening (eg. a form submission or extra content being loaded) after they have been triggered.
94
-
95
- The loading state can be activated by setting the `loading` prop to `true` and providing some `loadingText` for screenreaders to announce when in loading state (which defaults to Loading...).
96
-
97
- When the loading state is activated, any click events on the button are disabled.
98
-
99
- Button text
100
-
101
- Hide code
102
-
103
- \[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; }
104
-
105
- <div className\="iress-u-inline iress--gutter--md"\>
106
- <IressButton loading\>
107
- Button text </IressButton\>
108
- <IressButton loading />
109
- </div\>
110
-
111
- Copy
112
-
113
- ### [](#buttons-as-links)Buttons as links
114
-
115
- The `href` prop allows you to create a link that looks like a button. When set, the component will render an HTML anchor element instead of an HTML button element. This can be useful when you want to increase the target area and visual weight of a link, without changing the markup.
116
-
117
- A good example of this is the Next and Previous links in a wizard layout. These should be HTML links (to tells the user that navigation will occur when clicked) but styling them as buttons makes them more prominent.
118
-
119
- You can also use the link specific props `target` and `rel`.
120
-
121
- If you need to use custom routing, take a look at the custom route slot documentation below.
122
-
123
- [This is a link (anchor tag)](https://www.iress.com/)
124
-
125
- Hide code
126
-
127
- \[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; }
128
-
129
- <IressButton
130
- href\="https://www.iress.com/"
131
- rel\="opener noreferrer"
132
- target\="\_blank"
133
- \>
134
- This is a link (anchor tag)
135
- </IressButton\>
136
-
137
- Copy
138
-
139
- ### [](#delete-confirmation)Delete confirmation
140
-
141
- Make sure that the user understands the consequences of clicking the button
142
- ---------------------------------------------------------------------------
143
-
144
- You may want to add a confirmation step to prevent accidental data loss if the action is irreversible.
145
-
146
- The confirmation step should be a modal with a simple message, as with the example below. Use a delete button for the modal's primary call to action, and use a secondary button for the cancel action.
147
-
148
- If you're using a heading, ensure that it has an appropriate heading level to match the document structure. You should use a danger variant of the `IressText` element, with the element prop set to the appropriate heading level.
149
-
150
- Delete button with confirm
151
-
152
- Hide code
153
-
154
- \[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; }
155
-
156
- <IressButton
157
- mode\="danger"
158
- onClick\={() \=> {}}
159
- \>
160
- Delete button with confirm
161
- </IressButton\>
162
-
163
- Copy
164
-
165
- ### [](#fluid)Fluid
166
-
167
- If the `fluid` prop is set to true, the button will expand to be 100% of the width of its container.
168
-
169
- The `fluid` prop can also be set to a breakpoint size, which means the button will be fluid up until its breakpoint is passed.
170
-
171
- Please resize your screen to see how the fluid value changes. Current breakpoint: **xl** (1200px and above).
172
-
173
- Fluid: trueFluid: xsFluid: smFluid: mdFluid: lgFluid: xlFluid: xxl
174
-
175
- Hide code
176
-
177
- \[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; }
178
-
179
- <div
180
- className\="iress-u-inline iress--gutter--md"
181
- style\={{
182
- rowGap: 'var(--iress-g-spacing-md'
183
- }}
184
- \>
185
- <IressText element\="p"\>
186
- Please resize your screen to see how the fluid value changes. Current breakpoint:{' '}
187
- <CurrentBreakpoint renderLabel\="and-above" />
188
- . </IressText\>
189
- <IressButton fluid\>
190
- Fluid: true </IressButton\>
191
- <IressButton fluid\="xs"\>
192
- Fluid: xs </IressButton\>
193
- <IressButton fluid\="sm"\>
194
- Fluid: sm </IressButton\>
195
- <IressButton fluid\="md"\>
196
- Fluid: md </IressButton\>
197
- <IressButton fluid\="lg"\>
198
- Fluid: lg </IressButton\>
199
- <IressButton fluid\="xl"\>
200
- Fluid: xl </IressButton\>
201
- <IressButton fluid\="xxl"\>
202
- Fluid: xxl </IressButton\>
203
- </div\>
204
-
205
- Copy
206
-
207
- ### [](#wrapping-text)Wrapping text
208
-
209
- Button text will wrap on to a new line if there's not enough space for the text to sit on a single line. If you want to prevent the text from wrapping, you can set the `noWrap` prop to `true`.
210
-
211
- If your button contains a lot of text, the text may wrap on to more than one line. You can manage this on a case by case basis by setting a minimum width on your button via CSS if you need to.
212
-
213
- Button with lots of text content that will wrap (default behaviour)
214
-
215
- Button with lots of text content and a minimum width set via CSS
216
-
217
- Button with lots of text content with the noWrap prop set to true
218
-
219
- Hide code
220
-
221
- \[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; }
222
-
223
- <div
224
- style\={{
225
- width: 250
226
- }}
227
- \>
228
- <p\>
229
- <IressButton\>
230
- Button with lots of text content that will wrap (default behaviour) </IressButton\>
231
- </p\>
232
- <p\>
233
- <IressButton
234
- style\={{
235
- minWidth: 300
236
- }}
237
- \>
238
- Button with lots of text content and a minimum width set via CSS </IressButton\>
239
- </p\>
240
- <p\>
241
- <IressButton noWrap\>
242
- Button with lots of text content with the noWrap prop set to true </IressButton\>
243
- </p\>
244
- </div\>
245
-
246
- Copy
247
-
248
- ### [](#slot-props)Slot props
249
-
250
- Use the slots to correctly position icons or badges inside buttons.
251
-
252
- * **Prepend** - Places the element before the text
253
- * **Append** - Places the element after the text
254
-
255
- The iconOnly slot from previous versions of IDS has been deprecated. Please use the default slot instead.
256
-
257
- Prepend iconNewPrepend badge
258
-
259
- Append iconAppend badge+999
260
-
261
- Hide code
262
-
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
- <\>
266
- <p className\="iress-u-inline iress--gutter--md"\>
267
- <IressButton prepend\={<IressIcon name\="home" />}\>
268
- Prepend icon </IressButton\>
269
- <IressButton prepend\={<IressBadge mode\="info"\>New</IressBadge\>}\>
270
- Prepend badge </IressButton\>
271
- </p\>
272
- <p className\="iress-u-inline iress--gutter--md"\>
273
- <IressButton append\={<IressIcon name\="home" />}\>
274
- Append icon </IressButton\>
275
- <IressButton append\={<IressBadge mode\="info"\>+999</IressBadge\>}\>
276
- Append badge </IressButton\>
277
- </p\>
278
- <p className\="iress-u-inline iress--gutter--md"\>
279
- <IressButton\>
280
- <IressIcon name\="home" />
281
- </IressButton\>
282
- </p\>
283
- </\>
284
-
285
- Copy
286
-
287
- ### [](#other-attributes)Other attributes
288
-
289
- Any other attributes you pass to the component will be spread to the underlying HTML button or anchor element.
290
-
291
- This allows you to add your own aria attributes, or data attributes for analytics, as an example.
292
-
293
- **Note:** The `attrs` prop has been deprecated, and will be removed in a future version. Please pass the attributes directly to the component instead.
294
-
295
- Button text
296
-
297
- Hide code
298
-
299
- \[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; }
300
-
301
- <IressButton data-analytics-id\="test"\>
302
- Button text
303
- </IressButton\>
304
-
305
- Copy
306
-
307
- ### [](#download-button)Download button
308
-
309
- Whilst `IressButton` does not have a `download` property, it can be configured quite easily.
310
-
311
- Please see the example below. The use of an icon is optional.
312
-
313
- [Download logo](assets/iress-logo.png)
314
-
315
- Hide code
316
-
317
- \[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; }
318
-
319
- <IressButton
320
- download
321
- href\="assets/iress-logo.png"
322
- prepend\={<IressIcon name\="download" />}
323
- \>
324
- Download logo
325
- </IressButton\>
326
-
327
- Copy
328
-
329
- [](#iressclosebutton)`IressCloseButton`
330
- ---------------------------------------
331
-
332
- `IressCloseButton` is a special variant of `IressButton` that is used to execute a close action. It is used in modals, slideouts, and other components that require a close button.
333
-
334
- It has one additional prop, `screenReaderText`, which is used to provide a screen reader only label for the close button.
335
-
336
- Hide code
337
-
338
- \[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; }
339
-
340
- <IressCloseButton
341
- append\=""
342
- prepend\=""
343
- />
344
-
345
- Copy
346
-
347
- On this page
348
-
349
- * [Overview](#overview)
350
- * [Props](#props)
351
- * [Examples](#examples)
352
- * [Modes](#modes)
353
- * [Types](#types)
354
- * [Loading](#loading)
355
- * [Buttons as links](#buttons-as-links)
356
- * [Delete confirmation](#delete-confirmation)
357
- * [Fluid](#fluid)
358
- * [Wrapping text](#wrapping-text)
359
- * [Slot props](#slot-props)
360
- * [Other attributes](#other-attributes)
361
- * [Download button](#download-button)
362
- * [IressCloseButton](#iressclosebutton)
@@ -1,76 +0,0 @@
1
- [](#recipes)Recipes
2
- ===================
3
-
4
- [](#using-with-react-router)Using with React Router
5
- ---------------------------------------------------
6
-
7
- To use the `IressButton` component with React Router, you can use the `useHref` hook to get the `href` prop to pass to the `IressButton` component.
8
-
9
- Learn more about the `useHref` hook in the [React Router documentation](https://reactrouter.com/docs/en/v6/api#usehref).
10
-
11
- \[data-radix-scroll-area-viewport\] {
12
- scrollbar-width: none;
13
- -ms-overflow-style: none;
14
- -webkit-overflow-scrolling: touch;
15
- }
16
- \[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
17
- display: none;
18
- }
19
- :where(\[data-radix-scroll-area-viewport\]) {
20
- display: flex;
21
- flex-direction: column;
22
- align-items: stretch;
23
- }
24
- :where(\[data-radix-scroll-area-content\]) {
25
- flex-grow: 1;
26
- }
27
-
28
- import { IressButton } from '@iress/components';
29
- import { useHref } from 'react-router-dom';
30
- const ReactRouterButton \= () \=> {
31
- const href \= useHref('/path/to/page');
32
- return <IressButton href\={href}\>Go to page</IressButton\>;
33
- };
34
-
35
- Copy
36
-
37
- [](#using-with-nextjs)Using with Next.js
38
- ----------------------------------------
39
-
40
- To use the `IressButton` component with Next.js, you can use the `legacyBehavior` and `passHref` props to pass the `href` prop to the `IressButton` component.
41
-
42
- Learn more about the `Link` component in the [Next.js documentation](https://nextjs.org/docs/pages/api-reference/components/link#nesting-a-functional-component).
43
-
44
- \[data-radix-scroll-area-viewport\] {
45
- scrollbar-width: none;
46
- -ms-overflow-style: none;
47
- -webkit-overflow-scrolling: touch;
48
- }
49
- \[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
50
- display: none;
51
- }
52
- :where(\[data-radix-scroll-area-viewport\]) {
53
- display: flex;
54
- flex-direction: column;
55
- align-items: stretch;
56
- }
57
- :where(\[data-radix-scroll-area-content\]) {
58
- flex-grow: 1;
59
- }
60
-
61
- import { IressButton } from '@iress/components';
62
- import Link from 'next/link';
63
- const NextButton \= () \=> {
64
- return (
65
- <Link href\="/path/to/page" legacyBehavior passHref\>
66
- <IressButton\>Go to page</IressButton\>
67
- </Link\>
68
- );
69
- };
70
-
71
- Copy
72
-
73
- On this page
74
-
75
- * [Using with React Router](#using-with-react-router)
76
- * [Using with Next.js](#using-with-nextjs)