@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,494 +0,0 @@
|
|
|
1
|
-
[](#card)Card
|
|
2
|
-
=============
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
Cards are used to group small, related pieces of information into one digestible unit.
|
|
8
|
-
|
|
9
|
-
Read more
|
|
10
|
-
|
|
11
|
-
A single card will typically include a few different types of media, such as an image, a title, a synopsis, a call-to-action button or sub actions buttons - all associated with the same concept.
|
|
12
|
-
|
|
13
|
-
Cards can be configured in a variety of ways. You can use the render props (slots) if you want to create a structured layout, or you can create a custom card with your own markup if you need more flexibility.
|
|
14
|
-
|
|
15
|
-
I'm a card
|
|
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
|
-
<IressCard\>
|
|
22
|
-
I'm a card
|
|
23
|
-
</IressCard\>
|
|
24
|
-
|
|
25
|
-
Copy
|
|
26
|
-
|
|
27
|
-
[](#examples)Examples
|
|
28
|
-
---------------------
|
|
29
|
-
|
|
30
|
-
### [](#simple-cards)Simple cards
|
|
31
|
-
|
|
32
|
-
All slots and props for card are optional. You can create a simple card by adding some content to the default slot.
|
|
33
|
-
|
|
34
|
-
I'm a simple card
|
|
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
|
-
<IressCard\>
|
|
41
|
-
I'm a simple card
|
|
42
|
-
</IressCard\>
|
|
43
|
-
|
|
44
|
-
Copy
|
|
45
|
-
|
|
46
|
-
### [](#padding)Padding
|
|
47
|
-
|
|
48
|
-
Padding can be controlled using the `padding` prop. It can be set to `none`, `sm`, `md` or `lg`. It defaults to `md`.
|
|
49
|
-
|
|
50
|
-
I’m a card with none padding
|
|
51
|
-
|
|
52
|
-
I’m a card with sm padding
|
|
53
|
-
|
|
54
|
-
I’m a card with md padding
|
|
55
|
-
|
|
56
|
-
I’m a card with lg padding
|
|
57
|
-
|
|
58
|
-
Hide code
|
|
59
|
-
|
|
60
|
-
\[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; }
|
|
61
|
-
|
|
62
|
-
<div className\="iress-u-stack iress--gutter--md"\>
|
|
63
|
-
<IressCard padding\="none"\>
|
|
64
|
-
I’m a card with none padding </IressCard\>
|
|
65
|
-
<IressCard padding\="sm"\>
|
|
66
|
-
I’m a card with sm padding </IressCard\>
|
|
67
|
-
<IressCard padding\="md"\>
|
|
68
|
-
I’m a card with md padding </IressCard\>
|
|
69
|
-
<IressCard padding\="lg"\>
|
|
70
|
-
I’m a card with lg padding </IressCard\>
|
|
71
|
-
</div\>
|
|
72
|
-
|
|
73
|
-
Copy
|
|
74
|
-
|
|
75
|
-
### [](#stretch)Stretch
|
|
76
|
-
|
|
77
|
-
The `stretch` prop can be used to stretch the card to fill its container.
|
|
78
|
-
|
|
79
|
-
I’m a stretched card
|
|
80
|
-
|
|
81
|
-
I’m a card with lots of content. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
|
|
82
|
-
|
|
83
|
-
Hide code
|
|
84
|
-
|
|
85
|
-
\[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; }
|
|
86
|
-
|
|
87
|
-
<IressRow
|
|
88
|
-
gutter\="md"
|
|
89
|
-
verticalAlign\="stretch"
|
|
90
|
-
\>
|
|
91
|
-
<IressCol\>
|
|
92
|
-
<IressCard stretch\>
|
|
93
|
-
I’m a stretched card </IressCard\>
|
|
94
|
-
</IressCol\>
|
|
95
|
-
<IressCol\>
|
|
96
|
-
<IressCard\>
|
|
97
|
-
I’m a card with lots of content. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. </IressCard\>
|
|
98
|
-
</IressCol\>
|
|
99
|
-
</IressRow\>
|
|
100
|
-
|
|
101
|
-
Copy
|
|
102
|
-
|
|
103
|
-
### [](#selected)Selected
|
|
104
|
-
|
|
105
|
-
Setting the `selected` prop highlights the card, usually to allow selection in a list.
|
|
106
|
-
|
|
107
|
-
I'm a selected card
|
|
108
|
-
|
|
109
|
-
Hide code
|
|
110
|
-
|
|
111
|
-
\[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; }
|
|
112
|
-
|
|
113
|
-
<IressCard selected\>
|
|
114
|
-
I'm a selected card
|
|
115
|
-
</IressCard\>
|
|
116
|
-
|
|
117
|
-
Copy
|
|
118
|
-
|
|
119
|
-
[](#render-props-slots)Render props (slots)
|
|
120
|
-
-------------------------------------------
|
|
121
|
-
|
|
122
|
-
If you're coming from v4 or earlier, you might be used to slots. In v5, we've replaced slots with render props which align with the React API. Render props allow you to create a structured layout for your card, while still having the flexibility to add custom content. They are simply functions that return JSX, so you can pass any component you like.
|
|
123
|
-
|
|
124
|
-
However, please be diligent as the component you use may not fit withing the confines of the `IressCard` layout.
|
|
125
|
-
|
|
126
|
-
### [](#prepend)Prepend
|
|
127
|
-
|
|
128
|
-
Use the `prepend` prop to add content to the left side of the card.
|
|
129
|
-
|
|
130
|
-
I'm a card using the prepend render prop
|
|
131
|
-
|
|
132
|
-
Hide code
|
|
133
|
-
|
|
134
|
-
\[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; }
|
|
135
|
-
|
|
136
|
-
<IressCard prepend\={<IressIcon name\="star" />}\>
|
|
137
|
-
I'm a card using the prepend render prop
|
|
138
|
-
</IressCard\>
|
|
139
|
-
|
|
140
|
-
Copy
|
|
141
|
-
|
|
142
|
-
### [](#top-right)Top Right
|
|
143
|
-
|
|
144
|
-
Use the `topRight` prop to add content to the top right of the card. This is useful for adding a badge, icon, or an actions menu.
|
|
145
|
-
|
|
146
|
-
More actions in here
|
|
147
|
-
|
|
148
|
-
I'm a card using the topRight render prop
|
|
149
|
-
|
|
150
|
-
Hide code
|
|
151
|
-
|
|
152
|
-
\[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; }
|
|
153
|
-
|
|
154
|
-
<IressCard topRight\={<IressPopover activator\={<IressButton\><IressIcon name\="ellipsis-v" size\="lg"/></IressButton\>} align\="bottom-end"\><IressPanel\>More actions in here</IressPanel\></IressPopover\>}\>
|
|
155
|
-
I'm a card using the topRight render prop
|
|
156
|
-
</IressCard\>
|
|
157
|
-
|
|
158
|
-
Copy
|
|
159
|
-
|
|
160
|
-
### [](#heading)Heading
|
|
161
|
-
|
|
162
|
-
Use the `heading` prop to add a header to the card. The header can be any component you like, but it is designed to support a simple heading element, optionally wrapped with a link.
|
|
163
|
-
|
|
164
|
-
**Note:** `headingText` and `headingLevel` props have been replaced with the `heading` render prop to give you more control over the heading element and its content. To use the previous behaviour, you can pass a string which will automatically create a `h2` element, or pass a `h*` element with the text as a child.
|
|
165
|
-
|
|
166
|
-
### Welcome to Iress!
|
|
167
|
-
|
|
168
|
-
I'm a card using the heading render prop
|
|
169
|
-
|
|
170
|
-
Hide code
|
|
171
|
-
|
|
172
|
-
\[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; }
|
|
173
|
-
|
|
174
|
-
<IressCard heading\={<h3\>Welcome to Iress!</h3\>}\>
|
|
175
|
-
I'm a card using the heading render prop
|
|
176
|
-
</IressCard\>
|
|
177
|
-
|
|
178
|
-
Copy
|
|
179
|
-
|
|
180
|
-
### [](#media)Media
|
|
181
|
-
|
|
182
|
-
Use the `media` prop to add media to the card. The media can be any component you like, but it is designed to support an image or video.
|
|
183
|
-
|
|
184
|
-

|
|
185
|
-
|
|
186
|
-
I'm a card using the media render prop
|
|
187
|
-
|
|
188
|
-
Hide code
|
|
189
|
-
|
|
190
|
-
\[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; }
|
|
191
|
-
|
|
192
|
-
<IressCard media\={<img alt\="A man in an Iress branded t-shirt smiles at the camera while two female colleagues have a discussion in the foreground" src\="https://www.iress.com/media/images/media-contact.width-600.png" width\="250"/>}\>
|
|
193
|
-
I'm a card using the media render prop
|
|
194
|
-
</IressCard\>
|
|
195
|
-
|
|
196
|
-
Copy
|
|
197
|
-
|
|
198
|
-
### [](#content)Content
|
|
199
|
-
|
|
200
|
-
Use the `content` prop to add content to the card. The content can be any component you like, but it is designed to support simple text based elements.
|
|
201
|
-
|
|
202
|
-
Find out all the onboarding material you need
|
|
203
|
-
[with this easy guide](https://iress.com).
|
|
204
|
-
|
|
205
|
-
Hide code
|
|
206
|
-
|
|
207
|
-
\[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; }
|
|
208
|
-
|
|
209
|
-
<IressCard\>
|
|
210
|
-
<IressText\>
|
|
211
|
-
Find out all the onboarding material you need{' '}
|
|
212
|
-
<br />
|
|
213
|
-
<a href\="https://iress.com"\>
|
|
214
|
-
with this easy guide </a\>
|
|
215
|
-
. </IressText\>
|
|
216
|
-
</IressCard\>
|
|
217
|
-
|
|
218
|
-
Copy
|
|
219
|
-
|
|
220
|
-
### [](#footer)Footer
|
|
221
|
-
|
|
222
|
-
Use the `footer` prop to add a footer to the card. The footer can be any component you like, but it is designed to support buttons.
|
|
223
|
-
|
|
224
|
-
I'm a card using the footer render prop
|
|
225
|
-
|
|
226
|
-
#new-starter#first-day
|
|
227
|
-
|
|
228
|
-
NEW
|
|
229
|
-
|
|
230
|
-
Hide code
|
|
231
|
-
|
|
232
|
-
\[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; }
|
|
233
|
-
|
|
234
|
-
<IressCard footer\={<IressInline gutter\="sm" horizontalAlign\="between"\><IressInline gutter\="sm"\><IressBadge mode\="background-default" pill\>#new-starter</IressBadge\><IressBadge mode\="background-default" pill\>#first-day</IressBadge\></IressInline\><IressBadge mode\="positive"\>NEW</IressBadge\></IressInline\>}\>
|
|
235
|
-
I'm a card using the footer render prop
|
|
236
|
-
</IressCard\>
|
|
237
|
-
|
|
238
|
-
Copy
|
|
239
|
-
|
|
240
|
-
### [](#all-slots)All slots
|
|
241
|
-
|
|
242
|
-
You can use all the slots together to create a custom card layout.
|
|
243
|
-
|
|
244
|
-
prepend
|
|
245
|
-
|
|
246
|
-
media
|
|
247
|
-
|
|
248
|
-
heading
|
|
249
|
-
|
|
250
|
-
topRight
|
|
251
|
-
|
|
252
|
-
children
|
|
253
|
-
|
|
254
|
-
footer
|
|
255
|
-
|
|
256
|
-
* * *
|
|
257
|
-
|
|
258
|
-
More actions in here
|
|
259
|
-
|
|
260
|
-

|
|
261
|
-
|
|
262
|
-
### Welcome to Iress!
|
|
263
|
-
|
|
264
|
-
Find out all the onboarding material you need
|
|
265
|
-
[with this easy guide](https://iress.com).
|
|
266
|
-
|
|
267
|
-
#new-starter#first-day
|
|
268
|
-
|
|
269
|
-
NEW
|
|
270
|
-
|
|
271
|
-
More actions in here
|
|
272
|
-
|
|
273
|
-

|
|
274
|
-
|
|
275
|
-
### Welcome to Iress!
|
|
276
|
-
|
|
277
|
-
Find out all the onboarding material you need
|
|
278
|
-
[with this easy guide](https://iress.com).
|
|
279
|
-
|
|
280
|
-
#new-starter#first-day
|
|
281
|
-
|
|
282
|
-
NEW
|
|
283
|
-
|
|
284
|
-
More actions in here
|
|
285
|
-
|
|
286
|
-

|
|
287
|
-
|
|
288
|
-
### Welcome to Iress!
|
|
289
|
-
|
|
290
|
-
Find out all the onboarding material you need
|
|
291
|
-
[with this easy guide](https://iress.com).
|
|
292
|
-
|
|
293
|
-
#new-starter#first-day
|
|
294
|
-
|
|
295
|
-
NEW
|
|
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
|
-
const supportedCardSlots \= {
|
|
302
|
-
prepend: <IressIcon name\="star" />,
|
|
303
|
-
media: (
|
|
304
|
-
<img
|
|
305
|
-
src\="https://www.iress.com/media/images/media-contact.width-600.png"
|
|
306
|
-
width\="250"
|
|
307
|
-
alt\="A man in an Iress branded t-shirt smiles at the camera while two female colleagues have a discussion in the foreground"
|
|
308
|
-
/>
|
|
309
|
-
),
|
|
310
|
-
heading: <h3\>Welcome to Iress!</h3\>,
|
|
311
|
-
topRight: (
|
|
312
|
-
<IressPopover
|
|
313
|
-
align\="bottom-end"
|
|
314
|
-
activator\={
|
|
315
|
-
<IressButton\>
|
|
316
|
-
<IressIcon name\="ellipsis-v" size\="lg" />
|
|
317
|
-
</IressButton\>
|
|
318
|
-
}
|
|
319
|
-
\>
|
|
320
|
-
<IressPanel\>More actions in here</IressPanel\>
|
|
321
|
-
</IressPopover\>
|
|
322
|
-
),
|
|
323
|
-
children: (
|
|
324
|
-
<IressText\>
|
|
325
|
-
Find out all the onboarding material you need <br />
|
|
326
|
-
<a href\="https://iress.com"\>with this easy guide</a\>.
|
|
327
|
-
</IressText\>
|
|
328
|
-
),
|
|
329
|
-
footer: (
|
|
330
|
-
<IressInline gutter\="sm" horizontalAlign\="between"\>
|
|
331
|
-
<IressInline gutter\="sm"\>
|
|
332
|
-
<IressBadge pill mode\="background-default"\>
|
|
333
|
-
#new-starter </IressBadge\>
|
|
334
|
-
<IressBadge pill mode\="background-default"\>
|
|
335
|
-
#first-day </IressBadge\>
|
|
336
|
-
</IressInline\>
|
|
337
|
-
<IressBadge mode\="positive"\>NEW</IressBadge\>
|
|
338
|
-
</IressInline\>
|
|
339
|
-
),
|
|
340
|
-
};
|
|
341
|
-
const SUPPORTED\_CARD\_SLOTS \= Object.keys(supportedCardSlots);
|
|
342
|
-
type SupportedCardSlots \= keyof typeof supportedCardSlots;
|
|
343
|
-
|
|
344
|
-
export const CardAllSlots \= () \=> {
|
|
345
|
-
const \[show, setShow\] \= useState({
|
|
346
|
-
children: true,
|
|
347
|
-
prepend: false,
|
|
348
|
-
media: true,
|
|
349
|
-
heading: true,
|
|
350
|
-
topRight: true,
|
|
351
|
-
footer: true,
|
|
352
|
-
});
|
|
353
|
-
const filteredArgs \= Object.fromEntries(
|
|
354
|
-
Object.entries(supportedCardSlots).filter(
|
|
355
|
-
(\[key\]) \=> show\[key as SupportedCardSlots\] || !(key in show),
|
|
356
|
-
),
|
|
357
|
-
);
|
|
358
|
-
return (
|
|
359
|
-
<IressContainer\>
|
|
360
|
-
<IressInline gutter\="md"\>
|
|
361
|
-
{SUPPORTED\_CARD\_SLOTS.map((slot) \=> (
|
|
362
|
-
<IressToggle
|
|
363
|
-
key\={slot}
|
|
364
|
-
checked\={show\[slot as never\]}
|
|
365
|
-
onChange\={(checked) \=> {
|
|
366
|
-
setShow({ ...show, \[slot\]: checked });
|
|
367
|
-
}}
|
|
368
|
-
\>
|
|
369
|
-
{slot}
|
|
370
|
-
</IressToggle\>
|
|
371
|
-
))}
|
|
372
|
-
</IressInline\>
|
|
373
|
-
<hr />
|
|
374
|
-
<IressRow gutter\="md"\>
|
|
375
|
-
<IressCol\>
|
|
376
|
-
<IressCard {...filteredArgs} />
|
|
377
|
-
</IressCol\>
|
|
378
|
-
<IressCol\>
|
|
379
|
-
<IressCard {...filteredArgs} />
|
|
380
|
-
</IressCol\>
|
|
381
|
-
<IressCol\>
|
|
382
|
-
<IressCard {...filteredArgs} />
|
|
383
|
-
</IressCol\>
|
|
384
|
-
</IressRow\>
|
|
385
|
-
</IressContainer\>
|
|
386
|
-
);
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
Copy
|
|
390
|
-
|
|
391
|
-
[](#clickable-cards)Clickable cards
|
|
392
|
-
-----------------------------------
|
|
393
|
-
|
|
394
|
-
Note: The `clickable` prop has been deprecated in favour of using component variations, or the `onClick` prop.
|
|
395
|
-
|
|
396
|
-
### [](#heading-only)Heading only
|
|
397
|
-
|
|
398
|
-
Since the `heading` prop now renders the component you give it, you have full control over the content of the `heading`. This means you can add pass it a heading with a link.
|
|
399
|
-
|
|
400
|
-
[Clickable heading](https://iress.com)
|
|
401
|
-
--------------------------------------
|
|
402
|
-
|
|
403
|
-
I'm a card with a clickable heading. NEVER use me when the whole card is clickable.
|
|
404
|
-
|
|
405
|
-
Hide code
|
|
406
|
-
|
|
407
|
-
\[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; }
|
|
408
|
-
|
|
409
|
-
<IressCard heading\={<h2\><a href\="https://iress.com"\>Clickable heading</a\></h2\>}\>
|
|
410
|
-
I'm a card with a clickable heading. NEVER use me when the whole card is clickable.
|
|
411
|
-
</IressCard\>
|
|
412
|
-
|
|
413
|
-
Copy
|
|
414
|
-
|
|
415
|
-
### [](#whole-card)Whole card
|
|
416
|
-
|
|
417
|
-
The whole card can be made clickable by passing an `onClick` prop. All the appropriate styling will be added as well.
|
|
418
|
-
|
|
419
|
-
It's recommended to add `role="button"` and `tabindex="0"` to the card to make it clear to screen readers that the card is clickable.
|
|
420
|
-
|
|
421
|
-
I am a card with an onClick handler. Click me to see what happens.
|
|
422
|
-
|
|
423
|
-
Hide code
|
|
424
|
-
|
|
425
|
-
\[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; }
|
|
426
|
-
|
|
427
|
-
<IressCard
|
|
428
|
-
onClick\={() \=> alert("Card clicked")}
|
|
429
|
-
onKeyDown\={() \=> alert("Key down on card (for keyboard users)")}
|
|
430
|
-
role\="button"
|
|
431
|
-
tabIndex\={0}
|
|
432
|
-
\>
|
|
433
|
-
I am a card with an onClick handler. Click me to see what happens.
|
|
434
|
-
</IressCard\>
|
|
435
|
-
|
|
436
|
-
Copy
|
|
437
|
-
|
|
438
|
-
### [](#links-and-buttons)Links and Buttons
|
|
439
|
-
|
|
440
|
-
To simplify the process of making the whole card clickable, you can use the `IressLinkCard` and `IressButtonCard` components. These components look exactly the same as the `IressCard` component, however their base tags are different, allowing you to use them exactly like you would a html link and button.
|
|
441
|
-
|
|
442
|
-
**Note:** These components replace the `button`, `clickable` and `href` props. You no longer need `button` and `clickable`, as these are automatically inferred. To mimic the `href` prop, simply change the component you are using to `IressLinkCard`.
|
|
443
|
-
|
|
444
|
-
I am a card with a button element
|
|
445
|
-
|
|
446
|
-
Hide code
|
|
447
|
-
|
|
448
|
-
\[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; }
|
|
449
|
-
|
|
450
|
-
<IressButtonCard
|
|
451
|
-
onClick\={() \=> alert("Card clicked")}
|
|
452
|
-
type\="button"
|
|
453
|
-
\>
|
|
454
|
-
I am a card with a button element
|
|
455
|
-
</IressButtonCard\>
|
|
456
|
-
|
|
457
|
-
Copy
|
|
458
|
-
|
|
459
|
-
[I am a card with an anchor element](https://iress.com)
|
|
460
|
-
|
|
461
|
-
Hide code
|
|
462
|
-
|
|
463
|
-
\[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; }
|
|
464
|
-
|
|
465
|
-
<IressLinkCard
|
|
466
|
-
href\="https://iress.com"
|
|
467
|
-
target\="\_blank"
|
|
468
|
-
\>
|
|
469
|
-
I am a card with an anchor element
|
|
470
|
-
</IressLinkCard\>
|
|
471
|
-
|
|
472
|
-
Copy
|
|
473
|
-
|
|
474
|
-
On this page
|
|
475
|
-
|
|
476
|
-
* [Overview](#overview)
|
|
477
|
-
* [Props](#props)
|
|
478
|
-
* [Examples](#examples)
|
|
479
|
-
* [Simple cards](#simple-cards)
|
|
480
|
-
* [Padding](#padding)
|
|
481
|
-
* [Stretch](#stretch)
|
|
482
|
-
* [Selected](#selected)
|
|
483
|
-
* [Render props (slots)](#render-props-slots)
|
|
484
|
-
* [Prepend](#prepend)
|
|
485
|
-
* [Top Right](#top-right)
|
|
486
|
-
* [Heading](#heading)
|
|
487
|
-
* [Media](#media)
|
|
488
|
-
* [Content](#content)
|
|
489
|
-
* [Footer](#footer)
|
|
490
|
-
* [All slots](#all-slots)
|
|
491
|
-
* [Clickable cards](#clickable-cards)
|
|
492
|
-
* [Heading only](#heading-only)
|
|
493
|
-
* [Whole card](#whole-card)
|
|
494
|
-
* [Links and Buttons](#links-and-buttons)
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
[](#recipes)Recipes
|
|
2
|
-
===================
|
|
3
|
-
|
|
4
|
-
Under construction
|
|
5
|
-
------------------
|
|
6
|
-
|
|
7
|
-
This documentation is still under construction. If you have any questions, please reach out to the design system team.
|
|
8
|
-
|
|
9
|
-
[](#compose-functions)Compose functions
|
|
10
|
-
---------------------------------------
|
|
11
|
-
|
|
12
|
-
Beneath the surface, the `IressCard` component uses a compose helper to manage its styling. These helpers are exposed as `composeIDSCard` and `composeIDSCardSlots` and can be used to create custom cards.
|
|
13
|
-
|
|
14
|
-
They accept a subset of `IressCardProps`. They also accept an optional second argument if you want to override the default styles with your own CSS module, or other `style` object (eg. CSS-in-JS).
|
|
15
|
-
|
|
16
|
-
### [](#use-cases)Use cases
|
|
17
|
-
|
|
18
|
-
1. You are using a third-party routing library with its own `Link` component and want to use it as a clickable card. This is similar to `IressButtonCard` and `IressLinkCard`.
|
|
19
|
-
2. You need a different base component to meet your requirements, such as `<article />` when displaying on a news page.
|
|
20
|
-
3. You need to add some additional styling to the internals of the card, such as a custom footer or a custom image.
|
|
21
|
-
|
|
22
|
-
Article mark-up, with custom classes for border
|
|
23
|
-
-----------------------------------------------
|
|
24
|
-
|
|
25
|
-
Prepend
|
|
26
|
-
|
|
27
|
-
TopRight
|
|
28
|
-
|
|
29
|
-
Media
|
|
30
|
-
|
|
31
|
-
Heading
|
|
32
|
-
-------
|
|
33
|
-
|
|
34
|
-
Children (default slot)
|
|
35
|
-
|
|
36
|
-
Footer
|
|
37
|
-
|
|
38
|
-
Hide code
|
|
39
|
-
|
|
40
|
-
\[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; }
|
|
41
|
-
|
|
42
|
-
import {
|
|
43
|
-
CardSlotClass,
|
|
44
|
-
composeIDSCard,
|
|
45
|
-
composeIDSCardSlots,
|
|
46
|
-
IressCardProps,
|
|
47
|
-
IressStack,
|
|
48
|
-
IressText,
|
|
49
|
-
} from '@iress-oss/ids-components';
|
|
50
|
-
import styles from '@iress-storybook/styles.module.scss';
|
|
51
|
-
export const CardUsingHook \= () \=> {
|
|
52
|
-
const cardProps \= composeIDSCard({
|
|
53
|
-
prepend: 'Prepend',
|
|
54
|
-
heading: 'Heading',
|
|
55
|
-
topRight: 'TopRight',
|
|
56
|
-
media: 'Media',
|
|
57
|
-
children: 'Children (default slot)',
|
|
58
|
-
footer: 'Footer',
|
|
59
|
-
});
|
|
60
|
-
const cardChildren \= composeIDSCardSlots({
|
|
61
|
-
prepend: 'Prepend',
|
|
62
|
-
heading: 'Heading',
|
|
63
|
-
topRight: 'TopRight',
|
|
64
|
-
media: 'Media',
|
|
65
|
-
children: 'Children (default slot)',
|
|
66
|
-
footer: 'Footer',
|
|
67
|
-
}, {
|
|
68
|
-
...Object.fromEntries(
|
|
69
|
-
Object.entries(CardSlotClass).map((\[key, value\]) \=> \[
|
|
70
|
-
key,
|
|
71
|
-
\`${value} ${styles.addBorder}\`,
|
|
72
|
-
\]),
|
|
73
|
-
),
|
|
74
|
-
});
|
|
75
|
-
return (
|
|
76
|
-
<IressStack gutter\="md"\>
|
|
77
|
-
<IressText element\="h2"\>
|
|
78
|
-
Article mark-up, with custom classes for border </IressText\>
|
|
79
|
-
<article {...cardProps}\>{cardChildren}</article\>
|
|
80
|
-
</IressStack\>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
Copy
|
|
85
|
-
|
|
86
|
-
On this page
|
|
87
|
-
|
|
88
|
-
* [Compose functions](#compose-functions)
|
|
89
|
-
* [Use cases](#use-cases)
|