@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.
- package/package.json +28 -46
- package/generated/docs/components-alert-docs.md +0 -130
- package/generated/docs/components-autocomplete-docs.md +0 -754
- package/generated/docs/components-autocomplete-recipes-docs.md +0 -104
- package/generated/docs/components-badge-docs.md +0 -148
- package/generated/docs/components-button-docs.md +0 -362
- package/generated/docs/components-button-recipes-docs.md +0 -76
- package/generated/docs/components-buttongroup-docs.md +0 -310
- package/generated/docs/components-card-docs.md +0 -494
- package/generated/docs/components-card-recipes-docs.md +0 -89
- package/generated/docs/components-checkbox-docs.md +0 -193
- package/generated/docs/components-checkboxgroup-docs.md +0 -692
- package/generated/docs/components-checkboxgroup-recipes-docs.md +0 -119
- package/generated/docs/components-col-docs.md +0 -466
- package/generated/docs/components-combobox-docs.md +0 -1016
- package/generated/docs/components-container-docs.md +0 -91
- package/generated/docs/components-divider-docs.md +0 -176
- package/generated/docs/components-expander-docs.md +0 -215
- package/generated/docs/components-field-docs.md +0 -675
- package/generated/docs/components-filter-docs.md +0 -1109
- package/generated/docs/components-form-docs.md +0 -2410
- package/generated/docs/components-form-recipes-docs.md +0 -886
- package/generated/docs/components-hide-docs.md +0 -265
- package/generated/docs/components-icon-docs.md +0 -553
- package/generated/docs/components-inline-docs.md +0 -868
- package/generated/docs/components-input-docs.md +0 -335
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -157
- package/generated/docs/components-inputcurrency-recipes-docs.md +0 -116
- package/generated/docs/components-label-docs.md +0 -135
- package/generated/docs/components-menu-docs.md +0 -704
- package/generated/docs/components-menu-menuitem-docs.md +0 -193
- package/generated/docs/components-modal-docs.md +0 -587
- package/generated/docs/components-navbar-docs.md +0 -291
- package/generated/docs/components-navbar-recipes-docs.md +0 -413
- package/generated/docs/components-panel-docs.md +0 -380
- package/generated/docs/components-placeholder-docs.md +0 -27
- package/generated/docs/components-popover-docs.md +0 -464
- package/generated/docs/components-popover-recipes-docs.md +0 -245
- package/generated/docs/components-progress-docs.md +0 -104
- package/generated/docs/components-provider-docs.md +0 -105
- package/generated/docs/components-radio-docs.md +0 -107
- package/generated/docs/components-radiogroup-docs.md +0 -683
- package/generated/docs/components-readonly-docs.md +0 -89
- package/generated/docs/components-richselect-docs.md +0 -2433
- package/generated/docs/components-row-docs.md +0 -877
- package/generated/docs/components-select-docs.md +0 -456
- package/generated/docs/components-skeleton-docs.md +0 -214
- package/generated/docs/components-skeleton-recipes-docs.md +0 -76
- package/generated/docs/components-skiplink-docs.md +0 -66
- package/generated/docs/components-slideout-docs.md +0 -538
- package/generated/docs/components-slider-docs.md +0 -346
- package/generated/docs/components-spinner-docs.md +0 -59
- package/generated/docs/components-stack-docs.md +0 -265
- package/generated/docs/components-table-ag-grid-docs.md +0 -1074
- package/generated/docs/components-table-docs.md +0 -1305
- package/generated/docs/components-tabset-docs.md +0 -341
- package/generated/docs/components-tabset-tab-docs.md +0 -86
- package/generated/docs/components-tag-docs.md +0 -115
- package/generated/docs/components-text-docs.md +0 -394
- package/generated/docs/components-toaster-docs.md +0 -345
- package/generated/docs/components-toaster-toast-docs.md +0 -157
- package/generated/docs/components-toggle-docs.md +0 -158
- package/generated/docs/components-tooltip-docs.md +0 -311
- package/generated/docs/components-validationmessage-docs.md +0 -241
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -288
- package/generated/docs/extensions-editor-recipes-docs.md +0 -39
- package/generated/docs/foundations-accessibility-docs.md +0 -62
- package/generated/docs/foundations-colours-docs.md +0 -257
- package/generated/docs/foundations-consistency-docs.md +0 -52
- package/generated/docs/foundations-content-docs.md +0 -23
- package/generated/docs/foundations-introduction-docs.md +0 -17
- package/generated/docs/foundations-principles-docs.md +0 -70
- package/generated/docs/foundations-typography-docs.md +0 -191
- package/generated/docs/foundations-user-experience-docs.md +0 -63
- package/generated/docs/foundations-visual-design-docs.md +0 -46
- package/generated/docs/frequently-asked-questions-docs.md +0 -53
- package/generated/docs/get-started-develop-docs.md +0 -209
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/guidelines.md +0 -812
- package/generated/docs/introduction-docs.md +0 -43
- package/generated/docs/patterns-loading-docs.md +0 -1304
- package/generated/docs/resources-changelog-docs.md +0 -6
- package/generated/docs/resources-code-katas-docs.md +0 -29
- package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +0 -437
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/themes-tokens-docs.md +0 -1200
- package/generated/docs/versions-docs.md +0 -17
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
[](#tab-set)Tab Set
|
|
2
|
-
===================
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
Tabs are used to display modular pieces of related data that do not need to be compared or accessed simultaneously.
|
|
8
|
-
|
|
9
|
-
Address
|
|
10
|
-
|
|
11
|
-
Employment
|
|
12
|
-
|
|
13
|
-
History
|
|
14
|
-
|
|
15
|
-
Address information goes here
|
|
16
|
-
|
|
17
|
-
Hide code
|
|
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; }
|
|
20
|
-
|
|
21
|
-
<IressTabSet\>
|
|
22
|
-
<IressTab label\="Address"\>
|
|
23
|
-
Address information goes here </IressTab\>
|
|
24
|
-
<IressTab label\="Employment"\>
|
|
25
|
-
Employment information goes here </IressTab\>
|
|
26
|
-
<IressTab label\="History"\>
|
|
27
|
-
Medical history goes here </IressTab\>
|
|
28
|
-
</IressTabSet\>
|
|
29
|
-
|
|
30
|
-
Copy
|
|
31
|
-
|
|
32
|
-
[](#usage)Usage
|
|
33
|
-
---------------
|
|
34
|
-
|
|
35
|
-
The `IressTabSet` is a wrapper for `IressTab` components to make a up a set of tabs.
|
|
36
|
-
|
|
37
|
-
**Note:** The `mapTabs` helper function, originally used to map tabs to its sub-components, is now deprecated. Instead, you can use `array.map` to map the tabs to `IressTab`.
|
|
38
|
-
|
|
39
|
-
### [](#navigation)Navigation
|
|
40
|
-
|
|
41
|
-
You can use the `IressTabSet` component to create tab navigation to control an area of the page, or even navigate between different pages.
|
|
42
|
-
|
|
43
|
-
Address
|
|
44
|
-
|
|
45
|
-
Employment
|
|
46
|
-
|
|
47
|
-
History
|
|
48
|
-
|
|
49
|
-
Hide code
|
|
50
|
-
|
|
51
|
-
\[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; }
|
|
52
|
-
|
|
53
|
-
<IressTabSet\>
|
|
54
|
-
<IressTab label\="Address" />
|
|
55
|
-
<IressTab label\="Employment" />
|
|
56
|
-
<IressTab label\="History" />
|
|
57
|
-
</IressTabSet\>
|
|
58
|
-
|
|
59
|
-
Copy
|
|
60
|
-
|
|
61
|
-
### [](#with-children-prop)With `children` prop
|
|
62
|
-
|
|
63
|
-
Using the `children` prop will automatically inject the content as a tab panel when active, along with appropriate attributes for accessibility, ensuring the tab and its associated panel can be navigated by screenreaders.
|
|
64
|
-
|
|
65
|
-
Address
|
|
66
|
-
|
|
67
|
-
Employment
|
|
68
|
-
|
|
69
|
-
History
|
|
70
|
-
|
|
71
|
-
Address information goes here
|
|
72
|
-
|
|
73
|
-
Hide code
|
|
74
|
-
|
|
75
|
-
\[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; }
|
|
76
|
-
|
|
77
|
-
<IressTabSet\>
|
|
78
|
-
<IressTab label\="Address"\>
|
|
79
|
-
Address information goes here </IressTab\>
|
|
80
|
-
<IressTab label\="Employment"\>
|
|
81
|
-
Employment information goes here </IressTab\>
|
|
82
|
-
<IressTab label\="History"\>
|
|
83
|
-
Medical history goes here </IressTab\>
|
|
84
|
-
</IressTabSet\>
|
|
85
|
-
|
|
86
|
-
Copy
|
|
87
|
-
|
|
88
|
-
[](#examples)Examples
|
|
89
|
-
---------------------
|
|
90
|
-
|
|
91
|
-
### [](#default-selected)Default selected
|
|
92
|
-
|
|
93
|
-
If you would like to set a tab by default, use the `defaultSelected` prop.
|
|
94
|
-
|
|
95
|
-
Address
|
|
96
|
-
|
|
97
|
-
Employment
|
|
98
|
-
|
|
99
|
-
History
|
|
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
|
-
<IressTabSet defaultSelected\={2}\>
|
|
106
|
-
<IressTab label\="Address" />
|
|
107
|
-
<IressTab label\="Employment" />
|
|
108
|
-
<IressTab label\="History" />
|
|
109
|
-
</IressTabSet\>
|
|
110
|
-
|
|
111
|
-
Copy
|
|
112
|
-
|
|
113
|
-
### [](#controlled)Controlled
|
|
114
|
-
|
|
115
|
-
You can use state to control the active tab by setting the `selected` property to which tab you would like to select. This should be the `value` of the tab you would like to select, or if you do not use the `value` prop, it's index.
|
|
116
|
-
|
|
117
|
-
Change to last tab
|
|
118
|
-
|
|
119
|
-
Address
|
|
120
|
-
|
|
121
|
-
Employment
|
|
122
|
-
|
|
123
|
-
History
|
|
124
|
-
|
|
125
|
-
Address information goes here
|
|
126
|
-
|
|
127
|
-
Hide code
|
|
128
|
-
|
|
129
|
-
\[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; }
|
|
130
|
-
|
|
131
|
-
import {
|
|
132
|
-
IressButton,
|
|
133
|
-
IressStack,
|
|
134
|
-
IressTab,
|
|
135
|
-
IressTabSet,
|
|
136
|
-
IressTabSetProps,
|
|
137
|
-
} from '@iress-oss/ids-components';
|
|
138
|
-
import { useState } from 'react';
|
|
139
|
-
export const TabsUsingState \= () \=> {
|
|
140
|
-
const \[selected, setSelected\] \= useState<number\>();
|
|
141
|
-
return (
|
|
142
|
-
<IressStack gutter\={IressStack.Gutter.Md}\>
|
|
143
|
-
<IressButton onClick\={() \=> setSelected(selected \=== 2 ? 0 : 2)}\>
|
|
144
|
-
{selected \=== 2 ? \`Back to first tab\` : \`Change to last tab\`}
|
|
145
|
-
</IressButton\>
|
|
146
|
-
<IressTabSet
|
|
147
|
-
|
|
148
|
-
selected\={selected}
|
|
149
|
-
onChange\={({ index }) \=> setSelected(index)}
|
|
150
|
-
\>
|
|
151
|
-
<IressTab label\="Address"\>Address information goes here</IressTab\>
|
|
152
|
-
<IressTab label\="Employment"\>Employment information goes here</IressTab\>
|
|
153
|
-
<IressTab label\="History"\>Medical history goes here</IressTab\>
|
|
154
|
-
</IressTabSet\>
|
|
155
|
-
</IressStack\>
|
|
156
|
-
);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
Copy
|
|
160
|
-
|
|
161
|
-
### [](#layout)Layout
|
|
162
|
-
|
|
163
|
-
`IressTabSet` controls the layout of the tab buttons. These will always appear at the top of the tab container, and can be aligned to the left (default), centrally or to the right via the `layout` prop.
|
|
164
|
-
|
|
165
|
-
top-left
|
|
166
|
-
--------
|
|
167
|
-
|
|
168
|
-
Address
|
|
169
|
-
|
|
170
|
-
Employment
|
|
171
|
-
|
|
172
|
-
History
|
|
173
|
-
|
|
174
|
-
Address information goes here
|
|
175
|
-
|
|
176
|
-
top-center
|
|
177
|
-
----------
|
|
178
|
-
|
|
179
|
-
Address
|
|
180
|
-
|
|
181
|
-
Employment
|
|
182
|
-
|
|
183
|
-
History
|
|
184
|
-
|
|
185
|
-
Address information goes here
|
|
186
|
-
|
|
187
|
-
top-right
|
|
188
|
-
---------
|
|
189
|
-
|
|
190
|
-
Address
|
|
191
|
-
|
|
192
|
-
Employment
|
|
193
|
-
|
|
194
|
-
History
|
|
195
|
-
|
|
196
|
-
Address information goes here
|
|
197
|
-
|
|
198
|
-
Hide code
|
|
199
|
-
|
|
200
|
-
\[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; }
|
|
201
|
-
|
|
202
|
-
<IressStack gutter\="md"\>
|
|
203
|
-
<IressPanel\>
|
|
204
|
-
<IressText element\="h2"\>
|
|
205
|
-
top-left </IressText\>
|
|
206
|
-
<IressTabSet layout\="top-left"\>
|
|
207
|
-
<IressTab label\="Address"\>
|
|
208
|
-
Address information goes here </IressTab\>
|
|
209
|
-
<IressTab label\="Employment"\>
|
|
210
|
-
Employment information goes here </IressTab\>
|
|
211
|
-
<IressTab label\="History"\>
|
|
212
|
-
Medical history goes here </IressTab\>
|
|
213
|
-
</IressTabSet\>
|
|
214
|
-
</IressPanel\>
|
|
215
|
-
<IressPanel\>
|
|
216
|
-
<IressText element\="h2"\>
|
|
217
|
-
top-center </IressText\>
|
|
218
|
-
<IressTabSet layout\="top-center"\>
|
|
219
|
-
<IressTab label\="Address"\>
|
|
220
|
-
Address information goes here </IressTab\>
|
|
221
|
-
<IressTab label\="Employment"\>
|
|
222
|
-
Employment information goes here </IressTab\>
|
|
223
|
-
<IressTab label\="History"\>
|
|
224
|
-
Medical history goes here </IressTab\>
|
|
225
|
-
</IressTabSet\>
|
|
226
|
-
</IressPanel\>
|
|
227
|
-
<IressPanel\>
|
|
228
|
-
<IressText element\="h2"\>
|
|
229
|
-
top-right </IressText\>
|
|
230
|
-
<IressTabSet layout\="top-right"\>
|
|
231
|
-
<IressTab label\="Address"\>
|
|
232
|
-
Address information goes here </IressTab\>
|
|
233
|
-
<IressTab label\="Employment"\>
|
|
234
|
-
Employment information goes here </IressTab\>
|
|
235
|
-
<IressTab label\="History"\>
|
|
236
|
-
Medical history goes here </IressTab\>
|
|
237
|
-
</IressTabSet\>
|
|
238
|
-
</IressPanel\>
|
|
239
|
-
</IressStack\>
|
|
240
|
-
|
|
241
|
-
Copy
|
|
242
|
-
|
|
243
|
-
### [](#lazy-loading)Lazy Loading
|
|
244
|
-
|
|
245
|
-
As of version 5, tabs can be lazy loaded. However, to ensure they work correctly you will need to set the `value` prop on each `IressTab`, as shown in this example.
|
|
246
|
-
|
|
247
|
-
Toggle tabs
|
|
248
|
-
|
|
249
|
-
Hide code
|
|
250
|
-
|
|
251
|
-
\[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; }
|
|
252
|
-
|
|
253
|
-
import {
|
|
254
|
-
IressButton,
|
|
255
|
-
IressStack,
|
|
256
|
-
IressTab,
|
|
257
|
-
IressTabSet,
|
|
258
|
-
IressTabSetProps,
|
|
259
|
-
} from '@iress-oss/ids-components';
|
|
260
|
-
import { useState } from 'react';
|
|
261
|
-
export const TabsLazyLoading \= () \=> {
|
|
262
|
-
const \[loadTabs, setLoadTabs\] \= useState<boolean\>();
|
|
263
|
-
return (
|
|
264
|
-
<IressStack gutter\="md"\>
|
|
265
|
-
<IressButton onClick\={() \=> setLoadTabs(!loadTabs)}\>
|
|
266
|
-
Toggle tabs </IressButton\>
|
|
267
|
-
<IressTabSet {...{
|
|
268
|
-
defaultSelected: 'medical',
|
|
269
|
-
}}\>
|
|
270
|
-
{loadTabs && (
|
|
271
|
-
<\>
|
|
272
|
-
<IressTab label\="Address" value\="address"\>
|
|
273
|
-
Address information goes here </IressTab\>
|
|
274
|
-
<IressTab label\="Employment" value\="employment"\>
|
|
275
|
-
Employment information goes here </IressTab\>
|
|
276
|
-
<IressTab label\="Medical history" value\="medical"\>
|
|
277
|
-
Medical history goes here </IressTab\>
|
|
278
|
-
</\>
|
|
279
|
-
)}
|
|
280
|
-
</IressTabSet\>
|
|
281
|
-
</IressStack\>
|
|
282
|
-
);
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
Copy
|
|
286
|
-
|
|
287
|
-
### [](#badges-and-icons)Badges and icons
|
|
288
|
-
|
|
289
|
-
You can add rich content into the `label` of the `IressTab` to customise the tab further.
|
|
290
|
-
|
|
291
|
-
Some common examples include:
|
|
292
|
-
|
|
293
|
-
* Adding a badge to the tab button.
|
|
294
|
-
* Adding icons to the tab button.
|
|
295
|
-
|
|
296
|
-
Notes:
|
|
297
|
-
|
|
298
|
-
* For best accessibility, the `IressTab` component will find the first focusable element inside the custom label to add the tab role.
|
|
299
|
-
|
|
300
|
-
Address
|
|
301
|
-
|
|
302
|
-
3
|
|
303
|
-
|
|
304
|
-
Employment
|
|
305
|
-
|
|
306
|
-
History
|
|
307
|
-
|
|
308
|
-
Address information goes here
|
|
309
|
-
|
|
310
|
-
Hide code
|
|
311
|
-
|
|
312
|
-
\[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; }
|
|
313
|
-
|
|
314
|
-
<IressTabSet\>
|
|
315
|
-
<IressBadge
|
|
316
|
-
host\={<IressTab label\="Address"\>Address information goes here</IressTab\>}
|
|
317
|
-
mode\="info"
|
|
318
|
-
pill
|
|
319
|
-
\>
|
|
320
|
-
3 </IressBadge\>
|
|
321
|
-
<IressTab label\={<IressInline gutter\="sm"\><IressIcon name\="user" />{' '}Employment</IressInline\>}\>
|
|
322
|
-
Employment information goes here </IressTab\>
|
|
323
|
-
<IressTab label\="History"\>
|
|
324
|
-
Medical history goes here </IressTab\>
|
|
325
|
-
</IressTabSet\>
|
|
326
|
-
|
|
327
|
-
Copy
|
|
328
|
-
|
|
329
|
-
On this page
|
|
330
|
-
|
|
331
|
-
* [Overview](#overview)
|
|
332
|
-
* [Props](#props)
|
|
333
|
-
* [Usage](#usage)
|
|
334
|
-
* [Navigation](#navigation)
|
|
335
|
-
* [With children prop](#with-children-prop)
|
|
336
|
-
* [Examples](#examples)
|
|
337
|
-
* [Default selected](#default-selected)
|
|
338
|
-
* [Controlled](#controlled)
|
|
339
|
-
* [Layout](#layout)
|
|
340
|
-
* [Lazy Loading](#lazy-loading)
|
|
341
|
-
* [Badges and icons](#badges-and-icons)
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
[](#tab)Tab
|
|
2
|
-
===========
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
A tab is an interactive element that controls the display of other content, usually a panel
|
|
8
|
-
|
|
9
|
-
Tab
|
|
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
|
-
<IressTab label\="Tab" />
|
|
16
|
-
|
|
17
|
-
Copy
|
|
18
|
-
|
|
19
|
-
[](#examples)Examples
|
|
20
|
-
---------------------
|
|
21
|
-
|
|
22
|
-
### [](#active)Active
|
|
23
|
-
|
|
24
|
-
The tab can be set to active using the `active` prop.
|
|
25
|
-
|
|
26
|
-
**Note:** If you are using `IressTabSet`, you should use the `selected` prop on the `IressTabSet` to set the active state of its `<IressTab />` children, as the `active` prop will be ignored.
|
|
27
|
-
|
|
28
|
-
Tab
|
|
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
|
-
<IressTab
|
|
35
|
-
active
|
|
36
|
-
label\="Tab"
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
Copy
|
|
40
|
-
|
|
41
|
-
### [](#value)Value
|
|
42
|
-
|
|
43
|
-
A tab can have a unique value set to it, used to determine its active state in a `IressTabSet` component. The value is not visible to end users.
|
|
44
|
-
|
|
45
|
-
Tab with value
|
|
46
|
-
|
|
47
|
-
Hide code
|
|
48
|
-
|
|
49
|
-
\[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; }
|
|
50
|
-
|
|
51
|
-
<IressTabSet\>
|
|
52
|
-
<IressTab
|
|
53
|
-
label\="Tab with value"
|
|
54
|
-
value\="some-tab-name"
|
|
55
|
-
/>
|
|
56
|
-
</IressTabSet\>
|
|
57
|
-
|
|
58
|
-
Copy
|
|
59
|
-
|
|
60
|
-
### [](#panel)Panel
|
|
61
|
-
|
|
62
|
-
A tab can set its `children` when used inside an `IressTabSet` component, and it will render as its panel. If the tab is not used inside an `IressTabSet` component, `children` will not render.
|
|
63
|
-
|
|
64
|
-
Tab
|
|
65
|
-
|
|
66
|
-
Some content for this tab
|
|
67
|
-
|
|
68
|
-
Hide code
|
|
69
|
-
|
|
70
|
-
\[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; }
|
|
71
|
-
|
|
72
|
-
<IressTabSet\>
|
|
73
|
-
<IressTab label\="Tab"\>
|
|
74
|
-
Some content for this tab </IressTab\>
|
|
75
|
-
</IressTabSet\>
|
|
76
|
-
|
|
77
|
-
Copy
|
|
78
|
-
|
|
79
|
-
On this page
|
|
80
|
-
|
|
81
|
-
* [Overview](#overview)
|
|
82
|
-
* [Props](#props)
|
|
83
|
-
* [Examples](#examples)
|
|
84
|
-
* [Active](#active)
|
|
85
|
-
* [Value](#value)
|
|
86
|
-
* [Panel](#panel)
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
[](#tag)Tag
|
|
2
|
-
===========
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
Tags represent individual units in a group of selected items.
|
|
8
|
-
|
|
9
|
-
Tag
|
|
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
|
-
<IressTag\>
|
|
16
|
-
Tag
|
|
17
|
-
</IressTag\>
|
|
18
|
-
|
|
19
|
-
Copy
|
|
20
|
-
|
|
21
|
-
[](#usage)Usage
|
|
22
|
-
---------------
|
|
23
|
-
|
|
24
|
-
### [](#deleting-tags)Deleting tags
|
|
25
|
-
|
|
26
|
-
The delete button will not automatically remove the tag from the screen. Instead it will trigger the `onDelete` event. Use this event within your app to handle the display of tags.
|
|
27
|
-
|
|
28
|
-
The text a screen reader will announce defaults to "Delete" but can be changed using the `deleteButtonText` prop.
|
|
29
|
-
|
|
30
|
-
Tag 1
|
|
31
|
-
|
|
32
|
-
Tag 2
|
|
33
|
-
|
|
34
|
-
Tag 3
|
|
35
|
-
|
|
36
|
-
Hide code
|
|
37
|
-
|
|
38
|
-
\[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; }
|
|
39
|
-
|
|
40
|
-
import {
|
|
41
|
-
IressButton,
|
|
42
|
-
IressButtonProps,
|
|
43
|
-
IressIcon,
|
|
44
|
-
IressInline,
|
|
45
|
-
IressTag,
|
|
46
|
-
IressTagProps,
|
|
47
|
-
} from '@iress-oss/ids-components';
|
|
48
|
-
import { useState } from 'react';
|
|
49
|
-
export const TagDeletion \= (args: IressTagProps) \=> {
|
|
50
|
-
const \[tags, setTags\] \= useState(\['Tag 1', 'Tag 2', 'Tag 3'\]);
|
|
51
|
-
const handleAdd: IressButtonProps\['onClick'\] \= () \=> {
|
|
52
|
-
setTags(\[...tags, \`Tag ${tags.length + 1}\`\]);
|
|
53
|
-
};
|
|
54
|
-
const handleDelete: IressTagProps\['onDelete'\] \= (tag) \=> {
|
|
55
|
-
setTags((existingTags) \=>
|
|
56
|
-
existingTags.filter((existingTag) \=> existingTag !== tag),
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
return (
|
|
60
|
-
<IressInline gutter\="sm" verticalAlign\="middle"\>
|
|
61
|
-
{tags.map((tag) \=> (
|
|
62
|
-
<IressTag
|
|
63
|
-
{...args}
|
|
64
|
-
key\={tag}
|
|
65
|
-
deleteButtonText\={args.deleteButtonText ?? \`Delete ${tag}\`}
|
|
66
|
-
onDelete\={handleDelete}
|
|
67
|
-
\>
|
|
68
|
-
{tag}
|
|
69
|
-
</IressTag\>
|
|
70
|
-
))}
|
|
71
|
-
<IressButton onClick\={handleAdd}\>
|
|
72
|
-
<IressIcon name\="plus" />
|
|
73
|
-
</IressButton\>
|
|
74
|
-
</IressInline\>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
Copy
|
|
79
|
-
|
|
80
|
-
[](#iresstaginput)IressTagInput
|
|
81
|
-
-------------------------------
|
|
82
|
-
|
|
83
|
-
* * *
|
|
84
|
-
|
|
85
|
-
Beta
|
|
86
|
-
|
|
87
|
-
New component
|
|
88
|
-
|
|
89
|
-
This component is new, please provide feedback to the IDS team if you encounter any issues.
|
|
90
|
-
|
|
91
|
-
`IressTagInput` allows you to manage multiple tags, and is often used for managing email addresses, domains or other simple metadata that does not have to be selected from a list.
|
|
92
|
-
|
|
93
|
-
If you need to manage tags that are selected from a existing list, use `IressRichSelect` with the `multiple` prop.
|
|
94
|
-
|
|
95
|
-
Tag
|
|
96
|
-
|
|
97
|
-
Hide code
|
|
98
|
-
|
|
99
|
-
\[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; }
|
|
100
|
-
|
|
101
|
-
<IressTagInput
|
|
102
|
-
defaultValue\={\[
|
|
103
|
-
'Tag'
|
|
104
|
-
\]}
|
|
105
|
-
/>
|
|
106
|
-
|
|
107
|
-
Copy
|
|
108
|
-
|
|
109
|
-
On this page
|
|
110
|
-
|
|
111
|
-
* [Overview](#overview)
|
|
112
|
-
* [Props](#props)
|
|
113
|
-
* [Usage](#usage)
|
|
114
|
-
* [Deleting tags](#deleting-tags)
|
|
115
|
-
* [IressTagInput](#iresstaginput)
|