@iress-oss/ids-mcp-server 6.0.0-alpha.0 → 6.0.0-alpha.1-canary-20251204014525-3f0dce4
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/dist/searchHandlers.test.js +8 -2
- package/dist/toolHandler.test.js +9 -9
- package/dist/utils.test.js +6 -2
- package/package.json +32 -30
- package/generated/docs/components-alert-docs.md +0 -702
- package/generated/docs/components-autocomplete-docs.md +0 -1433
- package/generated/docs/components-autocomplete-recipes-docs.md +0 -104
- package/generated/docs/components-badge-docs.md +0 -531
- package/generated/docs/components-button-docs.md +0 -1442
- package/generated/docs/components-buttongroup-docs.md +0 -748
- package/generated/docs/components-card-docs.md +0 -944
- package/generated/docs/components-checkbox-docs.md +0 -694
- package/generated/docs/components-checkboxgroup-docs.md +0 -1087
- package/generated/docs/components-checkboxgroup-recipes-docs.md +0 -119
- package/generated/docs/components-col-docs.md +0 -881
- package/generated/docs/components-container-docs.md +0 -123
- package/generated/docs/components-divider-docs.md +0 -576
- package/generated/docs/components-expander-docs.md +0 -594
- package/generated/docs/components-field-docs.md +0 -2007
- package/generated/docs/components-filter-docs.md +0 -1322
- package/generated/docs/components-hide-docs.md +0 -702
- package/generated/docs/components-icon-docs.md +0 -816
- package/generated/docs/components-image-docs.md +0 -493
- package/generated/docs/components-inline-docs.md +0 -2003
- package/generated/docs/components-input-docs.md +0 -867
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -689
- package/generated/docs/components-inputcurrency-recipes-docs.md +0 -115
- package/generated/docs/components-introduction-docs.md +0 -450
- package/generated/docs/components-label-docs.md +0 -562
- package/generated/docs/components-link-docs.md +0 -586
- package/generated/docs/components-menu-docs.md +0 -1146
- package/generated/docs/components-menu-menuitem-docs.md +0 -739
- package/generated/docs/components-modal-docs.md +0 -1346
- package/generated/docs/components-panel-docs.md +0 -600
- package/generated/docs/components-placeholder-docs.md +0 -446
- package/generated/docs/components-popover-docs.md +0 -1529
- package/generated/docs/components-popover-recipes-docs.md +0 -211
- package/generated/docs/components-progress-docs.md +0 -568
- package/generated/docs/components-provider-docs.md +0 -160
- package/generated/docs/components-radio-docs.md +0 -563
- package/generated/docs/components-radiogroup-docs.md +0 -1153
- package/generated/docs/components-readonly-docs.md +0 -535
- package/generated/docs/components-richselect-docs.md +0 -5836
- package/generated/docs/components-row-docs.md +0 -2354
- package/generated/docs/components-select-docs.md +0 -940
- package/generated/docs/components-skeleton-docs.md +0 -597
- package/generated/docs/components-skeleton-recipes-docs.md +0 -76
- package/generated/docs/components-skiplink-docs.md +0 -587
- package/generated/docs/components-slideout-docs.md +0 -1036
- package/generated/docs/components-slider-docs.md +0 -828
- package/generated/docs/components-spinner-docs.md +0 -450
- package/generated/docs/components-stack-docs.md +0 -923
- package/generated/docs/components-table-ag-grid-docs.md +0 -1444
- package/generated/docs/components-table-docs.md +0 -2327
- package/generated/docs/components-tabset-docs.md +0 -768
- package/generated/docs/components-tabset-tab-docs.md +0 -550
- package/generated/docs/components-tag-docs.md +0 -548
- package/generated/docs/components-text-docs.md +0 -585
- package/generated/docs/components-toaster-docs.md +0 -755
- package/generated/docs/components-toggle-docs.md +0 -614
- package/generated/docs/components-tooltip-docs.md +0 -747
- package/generated/docs/components-validationmessage-docs.md +0 -1161
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -1181
- package/generated/docs/extensions-editor-recipes-docs.md +0 -89
- package/generated/docs/foundations-accessibility-docs.md +0 -40
- package/generated/docs/foundations-consistency-docs.md +0 -52
- package/generated/docs/foundations-content-docs.md +0 -23
- package/generated/docs/foundations-grid-docs.md +0 -74
- package/generated/docs/foundations-introduction-docs.md +0 -19
- package/generated/docs/foundations-principles-docs.md +0 -70
- package/generated/docs/foundations-responsive-breakpoints-docs.md +0 -193
- package/generated/docs/foundations-tokens-colour-docs.md +0 -564
- package/generated/docs/foundations-tokens-elevation-docs.md +0 -155
- package/generated/docs/foundations-tokens-introduction-docs.md +0 -190
- package/generated/docs/foundations-tokens-radius-docs.md +0 -71
- package/generated/docs/foundations-tokens-spacing-docs.md +0 -89
- package/generated/docs/foundations-tokens-typography-docs.md +0 -322
- package/generated/docs/foundations-user-experience-docs.md +0 -63
- package/generated/docs/foundations-visual-design-docs.md +0 -46
- package/generated/docs/foundations-z-index-stacking-docs.md +0 -31
- 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 -2054
- package/generated/docs/introduction-docs.md +0 -87
- package/generated/docs/news-version-6-docs.md +0 -93
- package/generated/docs/patterns-form-docs.md +0 -3902
- package/generated/docs/patterns-form-recipes-docs.md +0 -1370
- package/generated/docs/patterns-introduction-docs.md +0 -24
- package/generated/docs/patterns-loading-docs.md +0 -4043
- package/generated/docs/resources-code-katas-docs.md +0 -29
- package/generated/docs/resources-introduction-docs.md +0 -38
- package/generated/docs/resources-mcp-server-docs.md +0 -27
- package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +0 -437
- package/generated/docs/styling-props-colour-docs.md +0 -172
- package/generated/docs/styling-props-elevation-docs.md +0 -88
- package/generated/docs/styling-props-radius-docs.md +0 -86
- package/generated/docs/styling-props-reference-docs.md +0 -160
- package/generated/docs/styling-props-screen-readers-docs.md +0 -71
- package/generated/docs/styling-props-sizing-docs.md +0 -627
- package/generated/docs/styling-props-spacing-docs.md +0 -2282
- package/generated/docs/styling-props-typography-docs.md +0 -121
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/versions-docs.md +0 -17
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,2327 +0,0 @@
|
|
|
1
|
-
[](#table)Table
|
|
2
|
-
===============
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
Data driven component for displaying tabular data.
|
|
8
|
-
|
|
9
|
-
* * *
|
|
10
|
-
|
|
11
|
-
Updated
|
|
12
|
-
|
|
13
|
-
**Recently updated**
|
|
14
|
-
|
|
15
|
-
This component has been recently updated with new props. The props have been marked as beta. Please tell us if there are any issues.
|
|
16
|
-
|
|
17
|
-
My investments
|
|
18
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
19
|
-
| --- | --- | --- | --- |
|
|
20
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
21
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
22
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
23
|
-
|
|
24
|
-
Hide code
|
|
25
|
-
|
|
26
|
-
\[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; }
|
|
27
|
-
|
|
28
|
-
<IressTable
|
|
29
|
-
caption\="My investments"
|
|
30
|
-
rows\={\[
|
|
31
|
-
{
|
|
32
|
-
cost: 23898,
|
|
33
|
-
investmentDate: '2019-09-23',
|
|
34
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
35
|
-
totalPercentage: 24.8
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
cost: 49751.4,
|
|
39
|
-
investmentDate: '2020-06-28',
|
|
40
|
-
investment\_name: 'CASH.CASH',
|
|
41
|
-
totalPercentage: 49
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
cost: 26382.456,
|
|
45
|
-
investmentDate: '2019-02-05',
|
|
46
|
-
investment\_name: 'VODAFONE GRP',
|
|
47
|
-
totalPercentage: 26.2
|
|
48
|
-
}
|
|
49
|
-
\]}
|
|
50
|
-
/>
|
|
51
|
-
|
|
52
|
-
Copy
|
|
53
|
-
|
|
54
|
-
[](#props)Props
|
|
55
|
-
---------------
|
|
56
|
-
|
|
57
|
-
| Name | Description | Default | Control |
|
|
58
|
-
| --- | --- | --- | --- |
|
|
59
|
-
| alternate |
|
|
60
|
-
If set to true, the table will have alternating row colors. This is useful for improving readability in tables with many rows.
|
|
61
|
-
|
|
62
|
-
booleanundefined
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
false
|
|
69
|
-
|
|
70
|
-
| Set object |
|
|
71
|
-
| bg |
|
|
72
|
-
|
|
73
|
-
**`bg`** sets the background color of an element using the `background-color` css property using the color tokens in the design system.
|
|
74
|
-
|
|
75
|
-
We recommend using the following token values for best background contrast:
|
|
76
|
-
|
|
77
|
-
* `colour.primary.fill` for primary backgrounds that need to stand out
|
|
78
|
-
* `colour.primary.surface` for primary backgrounds that need to be less prominent
|
|
79
|
-
* `colour.neutral.10` for the base background color, normally white in light mode or shade of grey in dark mode
|
|
80
|
-
* `colour.neutral.20` for a slightly darker background color, used in neutral state components
|
|
81
|
-
* `colour.system.danger.fill` for error backgrounds that need to stand out
|
|
82
|
-
* `colour.system.danger.surface` for error backgrounds that need to be less prominent
|
|
83
|
-
* `colour.system.success.fill` for success backgrounds that need to stand out
|
|
84
|
-
* `colour.system.success.surface` for success backgrounds that need to be less prominent
|
|
85
|
-
* `colour.system.warning.fill` for warning backgrounds that need to stand out
|
|
86
|
-
* `colour.system.warning.surface` for warning backgrounds that need to be less prominent
|
|
87
|
-
* `colour.system.info.fill` for info backgrounds that need to stand out
|
|
88
|
-
* `colour.system.info.surface` for info backgrounds that need to be less prominent
|
|
89
|
-
|
|
90
|
-
ResponsiveProp<ColorToken> | undefined
|
|
91
|
-
|
|
92
|
-
| \- | Set object |
|
|
93
|
-
| borderRadius |
|
|
94
|
-
|
|
95
|
-
The **`border-radius`** CSS property rounds the corners of an element's outer border edge using the radius tokens in the design system.
|
|
96
|
-
|
|
97
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
98
|
-
| --- | --- | --- | --- | --- |
|
|
99
|
-
| **4** | **4** | **5** | **12** | **9** |
|
|
100
|
-
| 1 _\-x-_ | | 3 _\-x-_ | | |
|
|
101
|
-
|
|
102
|
-
ResponsiveProp<RadiusToken> | undefined
|
|
103
|
-
|
|
104
|
-
| \- | Set object |
|
|
105
|
-
| caption\* |
|
|
106
|
-
|
|
107
|
-
Caption that describes the data in the table, required for accessibility.
|
|
108
|
-
|
|
109
|
-
ReactNode
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| \- |
|
|
114
|
-
|
|
115
|
-
"My investments"
|
|
116
|
-
|
|
117
|
-
|
|
|
118
|
-
| children |
|
|
119
|
-
|
|
120
|
-
\-
|
|
121
|
-
|
|
122
|
-
| \- | \- |
|
|
123
|
-
| color |
|
|
124
|
-
|
|
125
|
-
The **`color`** CSS property sets the foreground color value of an element's text and text decorations using the colour tokens from the design system. It also sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`.
|
|
126
|
-
|
|
127
|
-
We recommend using the following token values for best color contrast:
|
|
128
|
-
|
|
129
|
-
* `colour.primary.onFill` used on top of `colour.primary.fill` for primary text that needs to stand out
|
|
130
|
-
* `colour.primary.text` used on top of `colour.primary.surface` or `colour.neutral.10` for primary text that needs to be less prominent
|
|
131
|
-
* `colour.neutral.70` used on top of `colour.neutral.10` or `colour.neutral.20` for muted text
|
|
132
|
-
* `colour.neutral.80` used on top of `colour.neutral.10` or `colour.neutral.20` for standard text
|
|
133
|
-
* `colour.system.danger.onFill` used on top of `colour.system.danger.fill` for error text that needs to stand out
|
|
134
|
-
* `colour.system.danger.text` used on top of `colour.system.danger.surface` for error text that needs to be less prominent
|
|
135
|
-
* `colour.system.success.onFill` used on top of `colour.system.success.fill` for success text that needs to stand out
|
|
136
|
-
* `colour.system.success.text` used on top of `colour.system.success.surface` for success text that needs to be less prominent
|
|
137
|
-
* `colour.system.warning.onFill` used on top of `colour.system.warning.fill` for warning text that needs to stand out
|
|
138
|
-
* `colour.system.warning.text` used on top of `colour.system.warning.surface` for warning text that needs to be less prominent
|
|
139
|
-
* `colour.system.info.onFill` used on top of `colour.system.info.fill` for informative text that needs to stand out
|
|
140
|
-
* `colour.system.info.text` used on top of `colour.system.info.surface` for informative text that needs to be less prominent
|
|
141
|
-
|
|
142
|
-
ResponsiveProp<ColorToken> | undefined
|
|
143
|
-
|
|
144
|
-
| \- | Set object |
|
|
145
|
-
| columns |
|
|
146
|
-
|
|
147
|
-
A mapping of columns to be displayed in the table. If not provided, it will be automatically regenerated from the row data.
|
|
148
|
-
|
|
149
|
-
TableColumn<TRow, TVal>\[\] | undefined
|
|
150
|
-
|
|
151
|
-
| \- | Set object |
|
|
152
|
-
| compact |
|
|
153
|
-
|
|
154
|
-
Compact view of the table, used for tables with a lot of data.
|
|
155
|
-
|
|
156
|
-
booleanundefined
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
|
161
|
-
|
|
162
|
-
false
|
|
163
|
-
|
|
164
|
-
| Set object |
|
|
165
|
-
| empty |
|
|
166
|
-
|
|
167
|
-
Content to be show when there is no rowData (columns must also be provided).
|
|
168
|
-
|
|
169
|
-
ReactNode
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
| \- | Set object |
|
|
174
|
-
| focusable |
|
|
175
|
-
|
|
176
|
-
The `focusable` prop is used to apply the focus elevation when focused. It can be set to `true` to apply focus styles on focus, or `'within'` to apply focus styles when the element or any of its children are focused.
|
|
177
|
-
|
|
178
|
-
"true""within"undefined
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
| \- | Set object |
|
|
183
|
-
| hiddenCaption |
|
|
184
|
-
|
|
185
|
-
When set to true, the table caption will be visually hidden.
|
|
186
|
-
|
|
187
|
-
booleanundefined
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
| \- | Set object |
|
|
192
|
-
| hiddenHeader |
|
|
193
|
-
|
|
194
|
-
When set to true, the table header (`<thead></thead>`) will be not be rendered. Only use with very simple tables.
|
|
195
|
-
|
|
196
|
-
booleanundefined
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
| \- | Set object |
|
|
201
|
-
| hide |
|
|
202
|
-
|
|
203
|
-
Set **`hide`** to hide an element completely using `display: none`. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
204
|
-
|
|
205
|
-
Hide on all breakpoints: `hide: true` Hide on specific breakpoints: `hide: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
206
|
-
|
|
207
|
-
Notes:
|
|
208
|
-
|
|
209
|
-
* If you need to hide an element but allow it to be visible to screen readers, use the `srOnly` prop instead.
|
|
210
|
-
* Consider if you can conditionally render the element instead of hiding it.
|
|
211
|
-
|
|
212
|
-
ResponsiveProp<boolean> | undefined
|
|
213
|
-
|
|
214
|
-
| \- | Set object |
|
|
215
|
-
| hover |
|
|
216
|
-
|
|
217
|
-
When set to true, hovering over a row will trigger a UI change.
|
|
218
|
-
|
|
219
|
-
booleanundefined
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
| \- | Set object |
|
|
224
|
-
| layerStyle |
|
|
225
|
-
|
|
226
|
-
Elevate a layer by using a **`layerStyle`**. These are connected to the elevation tokens in the design system. They can be combined to create hierarchy and structure.
|
|
227
|
-
|
|
228
|
-
* `elevation.raised`: Raised elevations sit slightly higher than other content. They are reserved for cards that can be moved, such as Jira issue cards and Trello cards. In special circumstances, they can be used for cards as a way to provide additional heirarchy or emphasis.
|
|
229
|
-
* `elevation.floating`: Floating is the highest elevation available. It is reserved for a UI that sits over another UI, such as modals, dialogs, dropdown menus, floating toolbars, and floating single-action buttons.
|
|
230
|
-
* `elevation.overflow`: Overflow is a shadow indicating content has scrolled outside a view. It can be used for vertical or horizontal scroll. An example of overflow shadows is the horizontal scroll in tables on a Confluence page.
|
|
231
|
-
|
|
232
|
-
ResponsiveProp<"elevation.raised" | "elevation.floating" | "elevation.overflow" | "elevation.focus" | "elevation.focusCompact"> | undefined
|
|
233
|
-
|
|
234
|
-
| \- | Set object |
|
|
235
|
-
| m |
|
|
236
|
-
|
|
237
|
-
The **`m`** property is short for `margin`, and sets the margin area on all four sides of an element.
|
|
238
|
-
|
|
239
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
240
|
-
|
|
241
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
242
|
-
| --- | --- | --- | --- | --- |
|
|
243
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
244
|
-
|
|
245
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
246
|
-
|
|
247
|
-
| \- | Set object |
|
|
248
|
-
| maxWidth |
|
|
249
|
-
|
|
250
|
-
The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`.
|
|
251
|
-
|
|
252
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
253
|
-
| --- | --- | --- | --- | --- |
|
|
254
|
-
| **1** | **1** | **1** | **12** | **7** |
|
|
255
|
-
|
|
256
|
-
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
257
|
-
|
|
258
|
-
| \- | Set object |
|
|
259
|
-
| mb |
|
|
260
|
-
|
|
261
|
-
The **`mb`** property is short for `margin-bottom` and sets the margin area on the bottom side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
262
|
-
|
|
263
|
-
It uses the spacing tokens in the design system.
|
|
264
|
-
|
|
265
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
266
|
-
| --- | --- | --- | --- | --- |
|
|
267
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
268
|
-
|
|
269
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
270
|
-
|
|
271
|
-
| \- | Set object |
|
|
272
|
-
| ml |
|
|
273
|
-
|
|
274
|
-
The **`ml`** property is short for `margin-left` and sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
275
|
-
|
|
276
|
-
It uses the spacing tokens in the design system.
|
|
277
|
-
|
|
278
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
279
|
-
| --- | --- | --- | --- | --- |
|
|
280
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
281
|
-
|
|
282
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
283
|
-
|
|
284
|
-
| \- | Set object |
|
|
285
|
-
| mr |
|
|
286
|
-
|
|
287
|
-
The **`mr`** property is short for `margin-right` and sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
288
|
-
|
|
289
|
-
It uses the spacing tokens in the design system.
|
|
290
|
-
|
|
291
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
292
|
-
| --- | --- | --- | --- | --- |
|
|
293
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
294
|
-
|
|
295
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
296
|
-
|
|
297
|
-
| \- | Set object |
|
|
298
|
-
| mt |
|
|
299
|
-
|
|
300
|
-
The **`mt`** property is short for `margin-top` and sets the margin area on the top side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
301
|
-
|
|
302
|
-
It uses the spacing tokens in the design system.
|
|
303
|
-
|
|
304
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
305
|
-
| --- | --- | --- | --- | --- |
|
|
306
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
307
|
-
|
|
308
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
309
|
-
|
|
310
|
-
| \- | Set object |
|
|
311
|
-
| mx |
|
|
312
|
-
|
|
313
|
-
The **`mx`** property is short for `margin-inline`. It is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
314
|
-
|
|
315
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
316
|
-
|
|
317
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
318
|
-
| --- | --- | --- | --- | --- |
|
|
319
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
320
|
-
|
|
321
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
322
|
-
|
|
323
|
-
| \- | Set object |
|
|
324
|
-
| my |
|
|
325
|
-
|
|
326
|
-
The **`my`** property is short for `margin-block`. It defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
327
|
-
|
|
328
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
329
|
-
|
|
330
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
331
|
-
| --- | --- | --- | --- | --- |
|
|
332
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
333
|
-
|
|
334
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
335
|
-
|
|
336
|
-
| \- | Set object |
|
|
337
|
-
| noGutter |
|
|
338
|
-
|
|
339
|
-
The **`noGutter`** property is used to remove the bottom margin from the last child of a component. This is useful when you want to avoid extra spacing at the end of a layout.
|
|
340
|
-
|
|
341
|
-
booleanundefined
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
| \- | Set object |
|
|
346
|
-
| p |
|
|
347
|
-
|
|
348
|
-
The **`p`** property is short for `padding`, and sets the padding area on all four sides of an element at once.
|
|
349
|
-
|
|
350
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
351
|
-
|
|
352
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
353
|
-
| --- | --- | --- | --- | --- |
|
|
354
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
355
|
-
|
|
356
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
357
|
-
|
|
358
|
-
| \- | Set object |
|
|
359
|
-
| pb |
|
|
360
|
-
|
|
361
|
-
The **`pb`** property is short for `padding-bottom` and sets the padding area on the bottom side of an element.
|
|
362
|
-
|
|
363
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
364
|
-
|
|
365
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
366
|
-
| --- | --- | --- | --- | --- |
|
|
367
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
368
|
-
|
|
369
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
370
|
-
|
|
371
|
-
| \- | Set object |
|
|
372
|
-
| pl |
|
|
373
|
-
|
|
374
|
-
The **`pl`** property is short for `padding-left` and sets the padding area on the left side of an element.
|
|
375
|
-
|
|
376
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
377
|
-
|
|
378
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
379
|
-
| --- | --- | --- | --- | --- |
|
|
380
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
381
|
-
|
|
382
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
383
|
-
|
|
384
|
-
| \- | Set object |
|
|
385
|
-
| pr |
|
|
386
|
-
|
|
387
|
-
The **`pr`** property is short for `padding-right` and sets the padding area on the right side of an element.
|
|
388
|
-
|
|
389
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
390
|
-
|
|
391
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
392
|
-
| --- | --- | --- | --- | --- |
|
|
393
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
394
|
-
|
|
395
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
396
|
-
|
|
397
|
-
| \- | Set object |
|
|
398
|
-
| pt |
|
|
399
|
-
|
|
400
|
-
The **`pt`** property is short for `padding-top` and sets the padding area on the top side of an element.
|
|
401
|
-
|
|
402
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
403
|
-
|
|
404
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
405
|
-
| --- | --- | --- | --- | --- |
|
|
406
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
407
|
-
|
|
408
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
409
|
-
|
|
410
|
-
| \- | Set object |
|
|
411
|
-
| px |
|
|
412
|
-
|
|
413
|
-
The **`px`** property is short for `padding-inline`. It is a shorthand property that defines both the logical inline start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
414
|
-
|
|
415
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
416
|
-
|
|
417
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
418
|
-
| --- | --- | --- | --- | --- |
|
|
419
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
420
|
-
|
|
421
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
422
|
-
|
|
423
|
-
| \- | Set object |
|
|
424
|
-
| py |
|
|
425
|
-
|
|
426
|
-
The **`py`** property is short for `padding-block`. It defines the logical block start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
427
|
-
|
|
428
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
429
|
-
|
|
430
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
431
|
-
| --- | --- | --- | --- | --- |
|
|
432
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
433
|
-
|
|
434
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
435
|
-
|
|
436
|
-
| \- | Set object |
|
|
437
|
-
| removeRowBorders |
|
|
438
|
-
|
|
439
|
-
If set to true, the table will not have borders between rows. This is useful for simpler tables where the row borders are not needed.
|
|
440
|
-
|
|
441
|
-
booleanundefined
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
|
446
|
-
|
|
447
|
-
false
|
|
448
|
-
|
|
449
|
-
| Set object |
|
|
450
|
-
| rowGap |
|
|
451
|
-
|
|
452
|
-
The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows.
|
|
453
|
-
|
|
454
|
-
Note: It only has an effect when used as a direct child of a layout component, such as IressRow, IressStack or IressInline.
|
|
455
|
-
|
|
456
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
457
|
-
| --- | --- | --- | --- | --- |
|
|
458
|
-
| **47** | **52** | **10.1** | **16** | No |
|
|
459
|
-
|
|
460
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
461
|
-
|
|
462
|
-
| \- | Set object |
|
|
463
|
-
| rowProps |
|
|
464
|
-
|
|
465
|
-
Add additional props to the row element. Can be a props map or a function that returns an props map. The function is called with the row data.
|
|
466
|
-
|
|
467
|
-
IressStyledProps<"tr"> | ((row: Row<TRow>) => IressStyledProps<"tr">) | undefined
|
|
468
|
-
|
|
469
|
-
| \- | Set object |
|
|
470
|
-
| rows |
|
|
471
|
-
|
|
472
|
-
Each object in the array contains the data for a row.
|
|
473
|
-
|
|
474
|
-
TRow\[\] | undefined
|
|
475
|
-
|
|
476
|
-
| \[\] |
|
|
477
|
-
|
|
478
|
-
RAW
|
|
479
|
-
|
|
480
|
-
rows : \[
|
|
481
|
-
|
|
482
|
-
0 : {...} 4 keys
|
|
483
|
-
|
|
484
|
-
1 : {...} 4 keys
|
|
485
|
-
|
|
486
|
-
2 : {...} 4 keys
|
|
487
|
-
|
|
488
|
-
\]
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
|
495
|
-
| scope |
|
|
496
|
-
|
|
497
|
-
Defaults to 'row' - the first cell in the row is a `<th>`, otherwise it's a `<td>`.
|
|
498
|
-
|
|
499
|
-
"col""row"undefined
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
|
504
|
-
|
|
505
|
-
'row'
|
|
506
|
-
|
|
507
|
-
| Set object |
|
|
508
|
-
| srOnly |
|
|
509
|
-
|
|
510
|
-
Set **`srOnly`** to hide an element visually but still make it accessible to screen readers. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
511
|
-
|
|
512
|
-
Hide on all breakpoints: `srOnly: true` Hide on specific breakpoints: `srOnly: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
513
|
-
|
|
514
|
-
ResponsiveProp<boolean> | undefined
|
|
515
|
-
|
|
516
|
-
| \- | Set object |
|
|
517
|
-
| stretch |
|
|
518
|
-
|
|
519
|
-
The **`stretch`** property is used to stretch an element to fill the available space in its parent container. It sets the `height` property to `100%` and `alignSelf` to `stretch`, allowing the element to expand and contract based on the size of its parent.
|
|
520
|
-
|
|
521
|
-
booleanundefined
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
| \- | Set object |
|
|
526
|
-
| textAlign |
|
|
527
|
-
|
|
528
|
-
The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
|
|
529
|
-
|
|
530
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
531
|
-
| --- | --- | --- | --- | --- |
|
|
532
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
533
|
-
|
|
534
|
-
ResponsiveProp<"center" | "left" | "right" | "inherit" | "justify"> | undefined
|
|
535
|
-
|
|
536
|
-
| \- | Set object |
|
|
537
|
-
| textStyle |
|
|
538
|
-
|
|
539
|
-
Select the typography to be used using the **`textStyle`** prop. These are connected to the typography tokens in the design system.'
|
|
540
|
-
|
|
541
|
-
* `typography.body.sm` - Use for small components such as badges and disclaimers, as well as compact variations of tables and lists.
|
|
542
|
-
* `typography.body.md` - The most commonly used body text size, used for most text content in the product and the default state of all components in the design system.
|
|
543
|
-
* `typography.body.lg` - Use for tag lines, subtitles, and other large text content in the product.
|
|
544
|
-
* `typography.heading.1` - Use for the main page title to establish a clear hierarchy. There is typically only one H1 per screen, emphasising the primary purpose or context of the page.
|
|
545
|
-
* `typography.heading.2` - Use for primary section headings within a page to organise content and guide the user through key areas. Also suitable for large components—such as modals—where space allows and where it pairs well with body.md or body.lg.
|
|
546
|
-
* `typography.heading.3` - Use for sub-sections under H2s to further structure content and maintain a clear visual hierarchy. Ideal for breaking down complex sections into manageable parts.
|
|
547
|
-
* `typography.heading.4` - Use for supporting headings within content blocks or small components where space is limited—such as table headers, cards, or side panels. Provides structure without overwhelming the layout.
|
|
548
|
-
* `typography.heading.5` - Use for minor labels or titles in compact UI elements, such as cards, sidebars, or inline labels. Best used to emphasise supplementary information without drawing too much attention. Works well with body.sm and is ideal for subtle content like fine print. Use sparingly to preserve typographic hierarchy.
|
|
549
|
-
* `typography.code` - Used to display code snippets in the product, such as in the API documentation.
|
|
550
|
-
|
|
551
|
-
ResponsiveProp<"typography.heading.1" | "typography.heading.2" | "typography.heading.3" | "typography.heading.4" | "typography.heading.5" | "typography.body.sm" | "typography.body.sm.regular" | ... 10 more ... | "typography.code"> | undefined
|
|
552
|
-
|
|
553
|
-
| \- | Set object |
|
|
554
|
-
| width |
|
|
555
|
-
|
|
556
|
-
The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area.
|
|
557
|
-
|
|
558
|
-
This prop only allows widths available throughout the component library. To use a custom width, you need to use the `style` prop, or add a custom class to the element and use CSS.
|
|
559
|
-
|
|
560
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
561
|
-
| --- | --- | --- | --- | --- |
|
|
562
|
-
| **1** | **1** | **1** | **12** | **4** |
|
|
563
|
-
|
|
564
|
-
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
565
|
-
|
|
566
|
-
| \- | Set object |
|
|
567
|
-
|
|
568
|
-
[](#usage)Usage
|
|
569
|
-
---------------
|
|
570
|
-
|
|
571
|
-
### [](#automatic-columns)Automatic columns
|
|
572
|
-
|
|
573
|
-
To get started, the `IressTable` component only requires the `caption` and `rows` props to be set.
|
|
574
|
-
|
|
575
|
-
* `caption` a string describing what the table is displaying (required for accessibility, it can be visually hidden by setting the `hiddenCaption` prop).
|
|
576
|
-
* `rows` are an array of objects, each object represents a row in the table. The table will use the key of the first object to determine the columns, automatically made human readable if the key is camel case, snake case or kebab case.
|
|
577
|
-
|
|
578
|
-
My investments
|
|
579
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
580
|
-
| --- | --- | --- | --- |
|
|
581
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
582
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
583
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
584
|
-
|
|
585
|
-
Hide code
|
|
586
|
-
|
|
587
|
-
\[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; }
|
|
588
|
-
|
|
589
|
-
<IressTable
|
|
590
|
-
caption\="My investments"
|
|
591
|
-
rows\={\[
|
|
592
|
-
{
|
|
593
|
-
cost: 23898,
|
|
594
|
-
investmentDate: '2019-09-23',
|
|
595
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
596
|
-
totalPercentage: 24.8
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
cost: 49751.4,
|
|
600
|
-
investmentDate: '2020-06-28',
|
|
601
|
-
investment\_name: 'CASH.CASH',
|
|
602
|
-
totalPercentage: 49
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
cost: 26382.456,
|
|
606
|
-
investmentDate: '2019-02-05',
|
|
607
|
-
investment\_name: 'VODAFONE GRP',
|
|
608
|
-
totalPercentage: 26.2
|
|
609
|
-
}
|
|
610
|
-
\]}
|
|
611
|
-
/>
|
|
612
|
-
|
|
613
|
-
Copy
|
|
614
|
-
|
|
615
|
-
### [](#custom-columns)Custom columns
|
|
616
|
-
|
|
617
|
-
For more control over the columns, the `columns` prop can be used to define the columns. This accepts an array of `TableColumn` objects.
|
|
618
|
-
|
|
619
|
-
Each array item represents a key in the objects in your `rows` prop. If one of the keys in your `rows` prop is not defined in the `columns` prop, it will not be displayed in the table.
|
|
620
|
-
|
|
621
|
-
My investments
|
|
622
|
-
| Investment | Date | Share | Cost |
|
|
623
|
-
| --- | --- | --- | --- |
|
|
624
|
-
| Artemis Fund Managers Limited | 23/09/2019 | 24.8% | $23,898.00 |
|
|
625
|
-
| CASH.CASH | 28/06/2020 | 49% | $49,751.40 |
|
|
626
|
-
| VODAFONE GRP | 05/02/2019 | 26.2% | $26,382.46 |
|
|
627
|
-
|
|
628
|
-
Hide code
|
|
629
|
-
|
|
630
|
-
\[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; }
|
|
631
|
-
|
|
632
|
-
import {
|
|
633
|
-
IressBadge,
|
|
634
|
-
IressTable,
|
|
635
|
-
IressTableFormattedValue,
|
|
636
|
-
IressTableProps,
|
|
637
|
-
} from '@iress-oss/ids-components';
|
|
638
|
-
type Props \= Partial<IressTableProps<object, never\>>;
|
|
639
|
-
const renderColumn \= (value: number) \=> (
|
|
640
|
-
<IressBadge mode\={value \> 30000 ? 'success' : 'danger'}\>
|
|
641
|
-
<IressTableFormattedValue value\={value} format\="currency" />
|
|
642
|
-
</IressBadge\>
|
|
643
|
-
);
|
|
644
|
-
export const TableCustomColumns \= () \=> (
|
|
645
|
-
<IressTable
|
|
646
|
-
caption\="My investments"
|
|
647
|
-
rows\={\[
|
|
648
|
-
{
|
|
649
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
650
|
-
cost: 23898,
|
|
651
|
-
investmentDate: '2019-09-23',
|
|
652
|
-
totalPercentage: 24.8,
|
|
653
|
-
},
|
|
654
|
-
{
|
|
655
|
-
investment\_name: 'CASH.CASH',
|
|
656
|
-
cost: 49751.4,
|
|
657
|
-
investmentDate: '2020-06-28',
|
|
658
|
-
totalPercentage: 49,
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
investment\_name: 'VODAFONE GRP',
|
|
662
|
-
cost: 26382.456,
|
|
663
|
-
investmentDate: '2019-02-05',
|
|
664
|
-
totalPercentage: 26.2,
|
|
665
|
-
},
|
|
666
|
-
\]}
|
|
667
|
-
|
|
668
|
-
columns\={\[
|
|
669
|
-
{
|
|
670
|
-
key: 'investment\_name',
|
|
671
|
-
label: 'Investment',
|
|
672
|
-
divider: true,
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
key: 'investmentDate',
|
|
676
|
-
label: 'Date',
|
|
677
|
-
format: 'date',
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
key: 'totalPercentage',
|
|
681
|
-
label: 'Share',
|
|
682
|
-
format: 'percent',
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
key: 'cost',
|
|
686
|
-
label: 'Cost',
|
|
687
|
-
textAlign: 'right',
|
|
688
|
-
format: renderColumn,
|
|
689
|
-
},
|
|
690
|
-
\]}
|
|
691
|
-
/>
|
|
692
|
-
);
|
|
693
|
-
|
|
694
|
-
Copy
|
|
695
|
-
|
|
696
|
-
### [](#column-api)Column API
|
|
697
|
-
|
|
698
|
-
These are the configuration options available for each column.
|
|
699
|
-
|
|
700
|
-
**Note:** The `id` prop has been removed. The `key` is always used for the id of the table cell, alongside its row index.
|
|
701
|
-
|
|
702
|
-
\[data-radix-scroll-area-viewport\] {
|
|
703
|
-
scrollbar-width: none;
|
|
704
|
-
-ms-overflow-style: none;
|
|
705
|
-
-webkit-overflow-scrolling: touch;
|
|
706
|
-
}
|
|
707
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
708
|
-
display: none;
|
|
709
|
-
}
|
|
710
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
711
|
-
display: flex;
|
|
712
|
-
flex-direction: column;
|
|
713
|
-
align-items: stretch;
|
|
714
|
-
}
|
|
715
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
716
|
-
flex-grow: 1;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
export interface TableColumn<TRow extends object, TVal \= unknown\> {
|
|
720
|
-
/\*\*
|
|
721
|
-
\* Aligns the content of the cell. \* @default left \*/
|
|
722
|
-
align?: TableColumnAligns;
|
|
723
|
-
/\*\*
|
|
724
|
-
\* The currency code to prefix to the value if \`format\` is set to currency. \* @default $ \*/
|
|
725
|
-
currencyCode?: string;
|
|
726
|
-
/\*\*
|
|
727
|
-
\* When set to true, a divider will be rendered after the column. \*/
|
|
728
|
-
divider?: boolean;
|
|
729
|
-
/\*\*
|
|
730
|
-
\* Formats the cell content. \* To use the in-built formatters, set this to: string, number, date, currency, percent. \* Use a custom formatter by passing a function that returns a ReactNode. \*/
|
|
731
|
-
format?: TableCellFormats | ((value: TVal, row?: TRow) \=> ReactNode);
|
|
732
|
-
/\*\*
|
|
733
|
-
\* The unique key for the column. \*/
|
|
734
|
-
key: string;
|
|
735
|
-
/\*\*
|
|
736
|
-
\* The label for the column header. \*/
|
|
737
|
-
label?: ReactNode;
|
|
738
|
-
/\*\*
|
|
739
|
-
\* When set to true, the column will be sortable. \* Setting it to either \`asc\` or \`desc\` will set the initial sort order. \*/
|
|
740
|
-
sort?: boolean | SortDirection;
|
|
741
|
-
/\*\*
|
|
742
|
-
\* Text to be read by a screen reader when a column is sortable (but not currently sorted). \* @default sortable \*/
|
|
743
|
-
sortableText?: string;
|
|
744
|
-
/\*\*
|
|
745
|
-
\* The width of the column. \*/
|
|
746
|
-
width?: string;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
Copy
|
|
750
|
-
|
|
751
|
-
[](#examples)Examples
|
|
752
|
-
---------------------
|
|
753
|
-
|
|
754
|
-
### [](#formats)Formats
|
|
755
|
-
|
|
756
|
-
The table component provides some basic formatting. This is controlled by the `format` property of the `TableColumn` object.
|
|
757
|
-
|
|
758
|
-
* `date`: the value (which can be a Date object, timestamp or a ISO8601 formatted string) will be formatted to render as DD/MM/YYYY.
|
|
759
|
-
* `currency`: the value (which should be a number or a string containing a number) is formatted with the `currencyCode` (also a prop on `TableColumn` which defaults to `$`) prepended to the number (formatted to 2 decimal places). Currency formatted columns are automatically right aligned for readability.
|
|
760
|
-
* `percent`: the value (which should be a number or a string containing a number) is formatted as a percentage (multiplied by 100 and rounded to 2 decimal places).
|
|
761
|
-
* `number`: the number format aligns the number to the right, and converts strings to a number.
|
|
762
|
-
* `shortDate`: the value (which can be a Date object, timestamp or a ISO8601 formatted string) will be formatted to render as DD MMM YYYY.
|
|
763
|
-
* `isoDateTime`: the value (which can be a Date object, timestamp or a ISO8601 formatted string) will be formatted to render as YYYY-MM-DD HH:mm:ss (Timezone)
|
|
764
|
-
* `relativeTime`: the value (which can be a Date object, timestamp or a ISO8601 formatted string) will be formatted to render as a relative time (eg. 2 days ago, 3 hours ago, etc). It will fallback to the `shortDate` format if the date is more than one week in the past.
|
|
765
|
-
|
|
766
|
-
To completely customise it, you can also send in a function that returns a ReactNode. It has two parameters, the original value and the row it is connected to.
|
|
767
|
-
|
|
768
|
-
Available formats
|
|
769
|
-
| String | Number | Date | Short date | ISO Date & Time | Relative time | Currency (AUD) | Percent | Custom |
|
|
770
|
-
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
771
|
-
| Hello, world! | 123456 | 28/06/2020 | 28 Jun 2020 | 2020-06-28 00:00:00 (UTC) | 15 seconds ago | $123,456.78 | 12% | Custom |
|
|
772
|
-
|
|
773
|
-
Hide code
|
|
774
|
-
|
|
775
|
-
\[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; }
|
|
776
|
-
|
|
777
|
-
import { IressBadge, IressTable, IressTableProps } from '@iress-oss/ids-components';
|
|
778
|
-
type Props \= Partial<IressTableProps<object, never\>>;
|
|
779
|
-
const renderColumn \= (value: string) \=> (
|
|
780
|
-
<IressBadge mode\="info"\>{value}</IressBadge\>
|
|
781
|
-
);
|
|
782
|
-
// https://blog.devgenius.io/javascript-date-subtract-seconds-83b3285b7959
|
|
783
|
-
const subtractSeconds \= (date: Date, seconds: number) \=> {
|
|
784
|
-
// make copy with Date() constructor
|
|
785
|
-
const dateCopy \= new Date(date);
|
|
786
|
-
dateCopy.setSeconds(date.getSeconds() \- seconds);
|
|
787
|
-
return dateCopy;
|
|
788
|
-
};
|
|
789
|
-
const tenSecondsAgo \= subtractSeconds(new Date(), 10);
|
|
790
|
-
export const TableFormats \= () \=> (
|
|
791
|
-
<IressTable
|
|
792
|
-
caption\="Available formats"
|
|
793
|
-
rows\={\[
|
|
794
|
-
{
|
|
795
|
-
string: 'Hello, world!',
|
|
796
|
-
number: 123456,
|
|
797
|
-
date: '2020-06-28',
|
|
798
|
-
shortDate: '2020-06-28',
|
|
799
|
-
isoDateTime: '2020-06-28',
|
|
800
|
-
relativeTime: tenSecondsAgo,
|
|
801
|
-
currency: 123456.78,
|
|
802
|
-
percent: 12,
|
|
803
|
-
custom: 'Custom',
|
|
804
|
-
},
|
|
805
|
-
\]}
|
|
806
|
-
|
|
807
|
-
columns\={\[
|
|
808
|
-
{ key: 'string', label: 'String', format: 'string' },
|
|
809
|
-
{ key: 'number', label: 'Number', format: 'number' },
|
|
810
|
-
{ key: 'date', label: 'Date', format: 'date' },
|
|
811
|
-
{ key: 'shortDate', label: 'Short date', format: 'shortDate' },
|
|
812
|
-
{ key: 'isoDateTime', label: 'ISO Date & Time', format: 'isoDateTime' },
|
|
813
|
-
{ key: 'relativeTime', label: 'Relative time', format: 'relativeTime' },
|
|
814
|
-
{
|
|
815
|
-
key: 'currency',
|
|
816
|
-
label: 'Currency (AUD)',
|
|
817
|
-
format: 'currency',
|
|
818
|
-
currencyCode: '',
|
|
819
|
-
},
|
|
820
|
-
{ key: 'percent', label: 'Percent', format: 'percent' },
|
|
821
|
-
{
|
|
822
|
-
key: 'custom',
|
|
823
|
-
label: 'Custom',
|
|
824
|
-
format: renderColumn,
|
|
825
|
-
},
|
|
826
|
-
\]}
|
|
827
|
-
/>
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
Copy
|
|
831
|
-
|
|
832
|
-
### [](#sorting)Sorting
|
|
833
|
-
|
|
834
|
-
Sorting can be enabled on a column by setting the `sort` property of the `TableColumn` to true. It can also be set to `asc` or `desc` if you would like it to initally sort in a certain direction.
|
|
835
|
-
|
|
836
|
-
The sort button has some visually hidden text for screenreaders to signify that the column is sortable. If you need to change this (ie. for translation purposes), it can be done with the `sortableText` column option which defaults to: sortable.
|
|
837
|
-
|
|
838
|
-
My investments
|
|
839
|
-
| Investment | Date | Share | Cost |
|
|
840
|
-
| --- | --- | --- | --- |
|
|
841
|
-
| Artemis Fund Managers Limited | 23/09/2019 | 24.8% | $23,898.00 |
|
|
842
|
-
| CASH.CASH | 28/06/2020 | 49% | $49,751.40 |
|
|
843
|
-
| VODAFONE GRP | 05/02/2019 | 26.2% | $26,382.46 |
|
|
844
|
-
|
|
845
|
-
Hide code
|
|
846
|
-
|
|
847
|
-
\[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; }
|
|
848
|
-
|
|
849
|
-
import {
|
|
850
|
-
IressBadge,
|
|
851
|
-
IressTable,
|
|
852
|
-
IressTableFormattedValue,
|
|
853
|
-
IressTableProps,
|
|
854
|
-
} from '@iress-oss/ids-components';
|
|
855
|
-
type Props \= Partial<IressTableProps<object, never\>>;
|
|
856
|
-
const renderColumn \= (value: number) \=> (
|
|
857
|
-
<IressBadge mode\={value \> 30000 ? 'success' : 'danger'}\>
|
|
858
|
-
<IressTableFormattedValue value\={value} format\="currency" />
|
|
859
|
-
</IressBadge\>
|
|
860
|
-
);
|
|
861
|
-
export const TableSorting \= () \=> (
|
|
862
|
-
<IressTable
|
|
863
|
-
caption\="My investments"
|
|
864
|
-
rows\={\[
|
|
865
|
-
{
|
|
866
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
867
|
-
cost: 23898,
|
|
868
|
-
investmentDate: '2019-09-23',
|
|
869
|
-
totalPercentage: 24.8,
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
investment\_name: 'CASH.CASH',
|
|
873
|
-
cost: 49751.4,
|
|
874
|
-
investmentDate: '2020-06-28',
|
|
875
|
-
totalPercentage: 49,
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
investment\_name: 'VODAFONE GRP',
|
|
879
|
-
cost: 26382.456,
|
|
880
|
-
investmentDate: '2019-02-05',
|
|
881
|
-
totalPercentage: 26.2,
|
|
882
|
-
},
|
|
883
|
-
\]}
|
|
884
|
-
|
|
885
|
-
columns\={\[
|
|
886
|
-
{
|
|
887
|
-
key: 'investment\_name',
|
|
888
|
-
label: 'Investment',
|
|
889
|
-
divider: true,
|
|
890
|
-
sort: 'asc',
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
key: 'investmentDate',
|
|
894
|
-
label: 'Date',
|
|
895
|
-
format: 'date',
|
|
896
|
-
sort: true,
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
key: 'totalPercentage',
|
|
900
|
-
label: 'Share',
|
|
901
|
-
format: 'percent',
|
|
902
|
-
sort: true,
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
key: 'cost',
|
|
906
|
-
label: 'Cost',
|
|
907
|
-
textAlign: 'right',
|
|
908
|
-
sort: true,
|
|
909
|
-
format: renderColumn,
|
|
910
|
-
},
|
|
911
|
-
\]}
|
|
912
|
-
/>
|
|
913
|
-
);
|
|
914
|
-
|
|
915
|
-
Copy
|
|
916
|
-
|
|
917
|
-
### [](#custom-sorting-logic)Custom sorting logic
|
|
918
|
-
|
|
919
|
-
By default, sorting is automatically inferred from the raw column values.
|
|
920
|
-
|
|
921
|
-
If you need to customise the sorting logic, you can use the `sortFn` property of the `TableColumn`. It accepts one of the following values:
|
|
922
|
-
|
|
923
|
-
* A `string` referencing a built-in sort function: `alphanumeric`, `alphanumericCaseSensitive`, `text`, `textCaseSensitive`, `datetime` and `basic`. To understand how they work, visit the [Tanstack Table documentation](https://tanstack.com/table/v8/docs/api/features/sorting/#sorting-functions).
|
|
924
|
-
* A custom sort function that takes two arguments: `a` and `b`, which are the two rows being compared. It should return `-1`, `0` or `1` depending on the comparison.
|
|
925
|
-
|
|
926
|
-
My investments
|
|
927
|
-
| Investment | Date | Share | Cost (sorts by net cost if available) |
|
|
928
|
-
| --- | --- | --- | --- |
|
|
929
|
-
| Artemis Fund Managers Limited | 23/09/2019 | 24.8% | $23,898.00 (net: N/A) |
|
|
930
|
-
| CASH.CASH | 28/06/2020 | 49% | $49,751.40 (net: $20,000.00) |
|
|
931
|
-
| VODAFONE GRP | 05/02/2019 | 26.2% | $26,382.46 (net: N/A) |
|
|
932
|
-
|
|
933
|
-
Hide code
|
|
934
|
-
|
|
935
|
-
\[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; }
|
|
936
|
-
|
|
937
|
-
import {
|
|
938
|
-
IressTable,
|
|
939
|
-
IressTableFormattedValue,
|
|
940
|
-
IressTableProps,
|
|
941
|
-
TableColumn,
|
|
942
|
-
} from '@iress-oss/ids-components';
|
|
943
|
-
type Props \= Partial<IressTableProps<Row, never\>>;
|
|
944
|
-
interface Row {
|
|
945
|
-
investment\_name: string;
|
|
946
|
-
cost: number;
|
|
947
|
-
netCost?: number;
|
|
948
|
-
investmentDate: string;
|
|
949
|
-
totalPercentage: number;
|
|
950
|
-
}
|
|
951
|
-
const columns: TableColumn<Row\>\[\] \= \[
|
|
952
|
-
{
|
|
953
|
-
key: 'investment\_name',
|
|
954
|
-
label: 'Investment',
|
|
955
|
-
divider: true,
|
|
956
|
-
sort: 'asc',
|
|
957
|
-
sortFn: 'textCaseSensitive',
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
key: 'investmentDate',
|
|
961
|
-
label: 'Date',
|
|
962
|
-
format: 'date',
|
|
963
|
-
sort: true,
|
|
964
|
-
sortFn: 'datetime',
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
key: 'totalPercentage',
|
|
968
|
-
label: 'Share',
|
|
969
|
-
format: 'percent',
|
|
970
|
-
sort: true,
|
|
971
|
-
sortFn: 'alphanumeric',
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
key: 'cost',
|
|
975
|
-
label: 'Cost (sorts by net cost if available)',
|
|
976
|
-
textAlign: 'right',
|
|
977
|
-
format: (value: number, row) \=> {
|
|
978
|
-
return (
|
|
979
|
-
<\>
|
|
980
|
-
<IressTableFormattedValue value\={value} format\="currency" /> (net:{' '}
|
|
981
|
-
{row?.netCost ? (
|
|
982
|
-
<IressTableFormattedValue value\={row.netCost} format\="currency" />
|
|
983
|
-
) : (
|
|
984
|
-
'N/A'
|
|
985
|
-
)}
|
|
986
|
-
) </\>
|
|
987
|
-
);
|
|
988
|
-
},
|
|
989
|
-
sortFn: (a, b) \=> {
|
|
990
|
-
const aCost \= a.original.netCost ?? a.original.cost;
|
|
991
|
-
const bCost \= b.original.netCost ?? b.original.cost;
|
|
992
|
-
return aCost \- bCost;
|
|
993
|
-
},
|
|
994
|
-
},
|
|
995
|
-
\];
|
|
996
|
-
export const TableSortingFn \= () \=> (
|
|
997
|
-
<IressTable<Row\>
|
|
998
|
-
caption\="My investments"
|
|
999
|
-
rows\={\[
|
|
1000
|
-
{
|
|
1001
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1002
|
-
cost: 23898,
|
|
1003
|
-
investmentDate: '2019-09-23',
|
|
1004
|
-
totalPercentage: 24.8,
|
|
1005
|
-
},
|
|
1006
|
-
{
|
|
1007
|
-
investment\_name: 'CASH.CASH',
|
|
1008
|
-
cost: 49751.4,
|
|
1009
|
-
netCost: 20000,
|
|
1010
|
-
investmentDate: '2020-06-28',
|
|
1011
|
-
totalPercentage: 49,
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
investment\_name: 'VODAFONE GRP',
|
|
1015
|
-
cost: 26382.456,
|
|
1016
|
-
investmentDate: '2019-02-05',
|
|
1017
|
-
totalPercentage: 26.2,
|
|
1018
|
-
},
|
|
1019
|
-
\]}
|
|
1020
|
-
|
|
1021
|
-
columns\={columns}
|
|
1022
|
-
/\>
|
|
1023
|
-
);
|
|
1024
|
-
|
|
1025
|
-
Copy
|
|
1026
|
-
|
|
1027
|
-
### [](#width)Width
|
|
1028
|
-
|
|
1029
|
-
The width of a column is controlled by the `width` property on the `TableColumn` object. It takes a string so it can be set to a pixel value or a percentage.
|
|
1030
|
-
|
|
1031
|
-
When the table exceeds the width of the container, a horizontal scrollbar is triggered. This makes it possible to view larger tables on mobile devices.
|
|
1032
|
-
|
|
1033
|
-
My investments
|
|
1034
|
-
| Investment | Cost | Investment date | Share |
|
|
1035
|
-
| --- | --- | --- | --- |
|
|
1036
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8% |
|
|
1037
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49% |
|
|
1038
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2% |
|
|
1039
|
-
|
|
1040
|
-
Hide code
|
|
1041
|
-
|
|
1042
|
-
\[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; }
|
|
1043
|
-
|
|
1044
|
-
<IressTable
|
|
1045
|
-
caption\="My investments"
|
|
1046
|
-
rows\={\[
|
|
1047
|
-
{
|
|
1048
|
-
cost: 23898,
|
|
1049
|
-
investmentDate: '2019-09-23',
|
|
1050
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1051
|
-
totalPercentage: 24.8
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
cost: 49751.4,
|
|
1055
|
-
investmentDate: '2020-06-28',
|
|
1056
|
-
investment\_name: 'CASH.CASH',
|
|
1057
|
-
totalPercentage: 49
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
cost: 26382.456,
|
|
1061
|
-
investmentDate: '2019-02-05',
|
|
1062
|
-
investment\_name: 'VODAFONE GRP',
|
|
1063
|
-
totalPercentage: 26.2
|
|
1064
|
-
}
|
|
1065
|
-
\]}
|
|
1066
|
-
columns\={\[
|
|
1067
|
-
{
|
|
1068
|
-
key: 'investment\_name',
|
|
1069
|
-
label: 'Investment',
|
|
1070
|
-
width: '450px'
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
key: 'cost',
|
|
1074
|
-
label: 'Cost',
|
|
1075
|
-
width: '220px'
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
key: 'investmentDate',
|
|
1079
|
-
label: 'Investment date',
|
|
1080
|
-
width: '220px'
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
format: 'percent',
|
|
1084
|
-
key: 'totalPercentage',
|
|
1085
|
-
label: 'Share'
|
|
1086
|
-
}
|
|
1087
|
-
\]}
|
|
1088
|
-
/>
|
|
1089
|
-
|
|
1090
|
-
Copy
|
|
1091
|
-
|
|
1092
|
-
### [](#alignment)Alignment
|
|
1093
|
-
|
|
1094
|
-
Columns can be aligned using the `align` property on the `TableColumn` object. Columns can be aligned to the left, right or center.
|
|
1095
|
-
|
|
1096
|
-
Currency and number formats are automatically right aligned to make the values easier to compare, but this can be overriden by setting the `align` property.
|
|
1097
|
-
|
|
1098
|
-
My investments
|
|
1099
|
-
| Investment (left) | Cost (center) | Date (center) | Share (right) |
|
|
1100
|
-
| --- | --- | --- | --- |
|
|
1101
|
-
| Artemis Fund Managers Limited | $23,898.00 | 23/09/2019 | 24.8% |
|
|
1102
|
-
| CASH.CASH | $49,751.40 | 28/06/2020 | 49% |
|
|
1103
|
-
| VODAFONE GRP | $26,382.46 | 05/02/2019 | 26.2% |
|
|
1104
|
-
|
|
1105
|
-
Hide code
|
|
1106
|
-
|
|
1107
|
-
\[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; }
|
|
1108
|
-
|
|
1109
|
-
<IressTable
|
|
1110
|
-
caption\="My investments"
|
|
1111
|
-
rows\={\[
|
|
1112
|
-
{
|
|
1113
|
-
cost: 23898,
|
|
1114
|
-
investmentDate: '2019-09-23',
|
|
1115
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1116
|
-
totalPercentage: 24.8
|
|
1117
|
-
},
|
|
1118
|
-
{
|
|
1119
|
-
cost: 49751.4,
|
|
1120
|
-
investmentDate: '2020-06-28',
|
|
1121
|
-
investment\_name: 'CASH.CASH',
|
|
1122
|
-
totalPercentage: 49
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
cost: 26382.456,
|
|
1126
|
-
investmentDate: '2019-02-05',
|
|
1127
|
-
investment\_name: 'VODAFONE GRP',
|
|
1128
|
-
totalPercentage: 26.2
|
|
1129
|
-
}
|
|
1130
|
-
\]}
|
|
1131
|
-
columns\={\[
|
|
1132
|
-
{
|
|
1133
|
-
key: 'investment\_name',
|
|
1134
|
-
label: 'Investment (left)',
|
|
1135
|
-
textAlign: 'left'
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
format: 'currency',
|
|
1139
|
-
key: 'cost',
|
|
1140
|
-
label: 'Cost (center)',
|
|
1141
|
-
textAlign: 'center'
|
|
1142
|
-
},
|
|
1143
|
-
{
|
|
1144
|
-
format: 'date',
|
|
1145
|
-
key: 'investmentDate',
|
|
1146
|
-
label: 'Date (center)',
|
|
1147
|
-
textAlign: 'center'
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
format: 'percent',
|
|
1151
|
-
key: 'totalPercentage',
|
|
1152
|
-
label: 'Share (right)',
|
|
1153
|
-
textAlign: 'right'
|
|
1154
|
-
}
|
|
1155
|
-
\]}
|
|
1156
|
-
/>
|
|
1157
|
-
|
|
1158
|
-
Copy
|
|
1159
|
-
|
|
1160
|
-
### [](#dividers)Dividers
|
|
1161
|
-
|
|
1162
|
-
As a general rule we don't add vertical column borders to our tables. Sometimes though, it can be useful to add a vertical divider between columns to help group content and create visual separation.
|
|
1163
|
-
|
|
1164
|
-
To add a vertical divider you can set the `divider` prop in the `TableColumn` to true. This will add a vertical border to the end of the column.
|
|
1165
|
-
|
|
1166
|
-
My investments
|
|
1167
|
-
| Investment | Date | Share | Cost |
|
|
1168
|
-
| --- | --- | --- | --- |
|
|
1169
|
-
| Artemis Fund Managers Limited | 23/09/2019 | 24.8% | $23,898.00 |
|
|
1170
|
-
| CASH.CASH | 28/06/2020 | 49% | $49,751.40 |
|
|
1171
|
-
| VODAFONE GRP | 05/02/2019 | 26.2% | $26,382.46 |
|
|
1172
|
-
|
|
1173
|
-
Hide code
|
|
1174
|
-
|
|
1175
|
-
\[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; }
|
|
1176
|
-
|
|
1177
|
-
<IressTable
|
|
1178
|
-
caption\="My investments"
|
|
1179
|
-
rows\={\[
|
|
1180
|
-
{
|
|
1181
|
-
cost: 23898,
|
|
1182
|
-
investmentDate: '2019-09-23',
|
|
1183
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1184
|
-
totalPercentage: 24.8
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
cost: 49751.4,
|
|
1188
|
-
investmentDate: '2020-06-28',
|
|
1189
|
-
investment\_name: 'CASH.CASH',
|
|
1190
|
-
totalPercentage: 49
|
|
1191
|
-
},
|
|
1192
|
-
{
|
|
1193
|
-
cost: 26382.456,
|
|
1194
|
-
investmentDate: '2019-02-05',
|
|
1195
|
-
investment\_name: 'VODAFONE GRP',
|
|
1196
|
-
totalPercentage: 26.2
|
|
1197
|
-
}
|
|
1198
|
-
\]}
|
|
1199
|
-
columns\={\[
|
|
1200
|
-
{
|
|
1201
|
-
divider: true,
|
|
1202
|
-
key: 'investment\_name',
|
|
1203
|
-
label: 'Investment'
|
|
1204
|
-
},
|
|
1205
|
-
{
|
|
1206
|
-
format: 'date',
|
|
1207
|
-
key: 'investmentDate',
|
|
1208
|
-
label: 'Date'
|
|
1209
|
-
},
|
|
1210
|
-
{
|
|
1211
|
-
format: 'percent',
|
|
1212
|
-
key: 'totalPercentage',
|
|
1213
|
-
label: 'Share'
|
|
1214
|
-
},
|
|
1215
|
-
{
|
|
1216
|
-
format: 'currency',
|
|
1217
|
-
key: 'cost',
|
|
1218
|
-
label: 'Cost'
|
|
1219
|
-
}
|
|
1220
|
-
\]}
|
|
1221
|
-
/>
|
|
1222
|
-
|
|
1223
|
-
Copy
|
|
1224
|
-
|
|
1225
|
-
### [](#highlight-on-hover)Highlight on hover
|
|
1226
|
-
|
|
1227
|
-
This can be enabled by setting the `hover` prop. This will bring attention to the row the user is hovering over, allowing users to focus on the relationship between the columns of a specific row.
|
|
1228
|
-
|
|
1229
|
-
My investments
|
|
1230
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
1231
|
-
| --- | --- | --- | --- |
|
|
1232
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
1233
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
1234
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
1235
|
-
|
|
1236
|
-
Hide code
|
|
1237
|
-
|
|
1238
|
-
\[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; }
|
|
1239
|
-
|
|
1240
|
-
<IressTable
|
|
1241
|
-
caption\="My investments"
|
|
1242
|
-
rows\={\[
|
|
1243
|
-
{
|
|
1244
|
-
cost: 23898,
|
|
1245
|
-
investmentDate: '2019-09-23',
|
|
1246
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1247
|
-
totalPercentage: 24.8
|
|
1248
|
-
},
|
|
1249
|
-
{
|
|
1250
|
-
cost: 49751.4,
|
|
1251
|
-
investmentDate: '2020-06-28',
|
|
1252
|
-
investment\_name: 'CASH.CASH',
|
|
1253
|
-
totalPercentage: 49
|
|
1254
|
-
},
|
|
1255
|
-
{
|
|
1256
|
-
cost: 26382.456,
|
|
1257
|
-
investmentDate: '2019-02-05',
|
|
1258
|
-
investment\_name: 'VODAFONE GRP',
|
|
1259
|
-
totalPercentage: 26.2
|
|
1260
|
-
}
|
|
1261
|
-
\]}
|
|
1262
|
-
hover
|
|
1263
|
-
/>
|
|
1264
|
-
|
|
1265
|
-
Copy
|
|
1266
|
-
|
|
1267
|
-
### [](#scope)Scope
|
|
1268
|
-
|
|
1269
|
-
`scope` defaults to row, which means the first cell in the row will be a `<th>`. When it is set to col the first cell in the row will be a `<td>`.
|
|
1270
|
-
|
|
1271
|
-
My investments
|
|
1272
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
1273
|
-
| --- | --- | --- | --- |
|
|
1274
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
1275
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
1276
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
1277
|
-
|
|
1278
|
-
Hide code
|
|
1279
|
-
|
|
1280
|
-
\[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; }
|
|
1281
|
-
|
|
1282
|
-
<IressTable
|
|
1283
|
-
caption\="My investments"
|
|
1284
|
-
rows\={\[
|
|
1285
|
-
{
|
|
1286
|
-
cost: 23898,
|
|
1287
|
-
investmentDate: '2019-09-23',
|
|
1288
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1289
|
-
totalPercentage: 24.8
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
cost: 49751.4,
|
|
1293
|
-
investmentDate: '2020-06-28',
|
|
1294
|
-
investment\_name: 'CASH.CASH',
|
|
1295
|
-
totalPercentage: 49
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
cost: 26382.456,
|
|
1299
|
-
investmentDate: '2019-02-05',
|
|
1300
|
-
investment\_name: 'VODAFONE GRP',
|
|
1301
|
-
totalPercentage: 26.2
|
|
1302
|
-
}
|
|
1303
|
-
\]}
|
|
1304
|
-
scope\="col"
|
|
1305
|
-
/>
|
|
1306
|
-
|
|
1307
|
-
Copy
|
|
1308
|
-
|
|
1309
|
-
### [](#hidden-header)Hidden header
|
|
1310
|
-
|
|
1311
|
-
For very simple tabular data, you have the option to hide the table header with the `hiddenHeader` prop. When this is set to true, the table header will not be rendered.
|
|
1312
|
-
|
|
1313
|
-
<table class="table__table table__table--compact_false table__table--hover_false table__table--sortButtonNoWrap_false table__table--tableBodyOpen_false table__table--alternate_false table__table--removeRowBorders_false ids-table" id=":rr:"><caption id=":rr:--caption" class="table__caption table__caption--compact_false table__caption--hover_false table__caption--sortButtonNoWrap_false table__caption--tableBodyOpen_false table__caption--alternate_false table__caption--removeRowBorders_false">My investments</caption><tbody><tr id=":rr:--rows--0" class=""><th data-column="investment_name" id=":rr:__0_investment_name" scope="row">Artemis Fund Managers Limited</th><td data-column="cost" headers=":rr:__0_investment_name" id=":rr:__0_cost">23898</td><td data-column="investmentDate" headers=":rr:__0_investment_name" id=":rr:__0_investmentDate">2019-09-23</td><td data-column="totalPercentage" headers=":rr:__0_investment_name" id=":rr:__0_totalPercentage">24.8</td></tr><tr id=":rr:--rows--1" class=""><th data-column="investment_name" id=":rr:__1_investment_name" scope="row">CASH.CASH</th><td data-column="cost" headers=":rr:__1_investment_name" id=":rr:__1_cost">49751.4</td><td data-column="investmentDate" headers=":rr:__1_investment_name" id=":rr:__1_investmentDate">2020-06-28</td><td data-column="totalPercentage" headers=":rr:__1_investment_name" id=":rr:__1_totalPercentage">49</td></tr><tr id=":rr:--rows--2" class=""><th data-column="investment_name" id=":rr:__2_investment_name" scope="row">VODAFONE GRP</th><td data-column="cost" headers=":rr:__2_investment_name" id=":rr:__2_cost">26382.456</td><td data-column="investmentDate" headers=":rr:__2_investment_name" id=":rr:__2_investmentDate">2019-02-05</td><td data-column="totalPercentage" headers=":rr:__2_investment_name" id=":rr:__2_totalPercentage">26.2</td></tr></tbody></table>
|
|
1314
|
-
|
|
1315
|
-
Hide code
|
|
1316
|
-
|
|
1317
|
-
\[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; }
|
|
1318
|
-
|
|
1319
|
-
<IressTable
|
|
1320
|
-
caption\="My investments"
|
|
1321
|
-
rows\={\[
|
|
1322
|
-
{
|
|
1323
|
-
cost: 23898,
|
|
1324
|
-
investmentDate: '2019-09-23',
|
|
1325
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1326
|
-
totalPercentage: 24.8
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
cost: 49751.4,
|
|
1330
|
-
investmentDate: '2020-06-28',
|
|
1331
|
-
investment\_name: 'CASH.CASH',
|
|
1332
|
-
totalPercentage: 49
|
|
1333
|
-
},
|
|
1334
|
-
{
|
|
1335
|
-
cost: 26382.456,
|
|
1336
|
-
investmentDate: '2019-02-05',
|
|
1337
|
-
investment\_name: 'VODAFONE GRP',
|
|
1338
|
-
totalPercentage: 26.2
|
|
1339
|
-
}
|
|
1340
|
-
\]}
|
|
1341
|
-
hiddenHeader
|
|
1342
|
-
/>
|
|
1343
|
-
|
|
1344
|
-
Copy
|
|
1345
|
-
|
|
1346
|
-
### [](#rich-rows-jsx)Rich rows (JSX)
|
|
1347
|
-
|
|
1348
|
-
The `rows` prop allows you to use `ReactNodes` as the value of a cell. This can be useful for adding rich content to a cell, such as links, buttons or icons.
|
|
1349
|
-
|
|
1350
|
-
**Note:** If you are using the `sort` property, the sorting may not work properly with rich content. If this happens, either remove the `sort` property or use the `format` prop on the column to set a custom formatter.
|
|
1351
|
-
|
|
1352
|
-
My rich investments
|
|
1353
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
1354
|
-
| --- | --- | --- | --- |
|
|
1355
|
-
| Artemis Fund Managers Limited | $23,898 | 2019/09/23 | 24.8% |
|
|
1356
|
-
| CASH.CASH | $49,751.40 | 2020/06/28 | 49% |
|
|
1357
|
-
| VODAFONE GRP | $26,382.46 | 2019/02/05 | 26.2% |
|
|
1358
|
-
|
|
1359
|
-
Hide code
|
|
1360
|
-
|
|
1361
|
-
\[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; }
|
|
1362
|
-
|
|
1363
|
-
<IressTable
|
|
1364
|
-
caption\="My rich investments"
|
|
1365
|
-
rows\={\[
|
|
1366
|
-
{
|
|
1367
|
-
cost: '$23,898',
|
|
1368
|
-
investmentDate: '2019/09/23',
|
|
1369
|
-
investment\_name: <IressButton\>Artemis Fund Managers Limited</IressButton\>,
|
|
1370
|
-
totalPercentage: <IressBadge mode\="info"\>24.8%</IressBadge\>
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
cost: '$49,751.40',
|
|
1374
|
-
investmentDate: '2020/06/28',
|
|
1375
|
-
investment\_name: <IressButton\>CASH.CASH</IressButton\>,
|
|
1376
|
-
totalPercentage: <IressBadge mode\="success"\>49%</IressBadge\>
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
cost: '$26,382.46',
|
|
1380
|
-
investmentDate: '2019/02/05',
|
|
1381
|
-
investment\_name: <IressButton\>VODAFONE GRP</IressButton\>,
|
|
1382
|
-
totalPercentage: <IressBadge mode\="info"\>26.2%</IressBadge\>
|
|
1383
|
-
}
|
|
1384
|
-
\]}
|
|
1385
|
-
/>
|
|
1386
|
-
|
|
1387
|
-
Copy
|
|
1388
|
-
|
|
1389
|
-
### [](#empty-state)Empty state
|
|
1390
|
-
|
|
1391
|
-
You can provide the table with some content to display when there is no row data by using the `empty` prop.
|
|
1392
|
-
|
|
1393
|
-
This is reliant on `columns` prop to provide the information for the table header. If `columns` is not provided and there is no row data the table will not render.
|
|
1394
|
-
|
|
1395
|
-
| Investment | Date | Share | Cost |
|
|
1396
|
-
| --- | --- | --- | --- |
|
|
1397
|
-
| This table has no data |
|
|
1398
|
-
|
|
1399
|
-
Hide code
|
|
1400
|
-
|
|
1401
|
-
\[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; }
|
|
1402
|
-
|
|
1403
|
-
<IressTable
|
|
1404
|
-
columns\={\[
|
|
1405
|
-
{
|
|
1406
|
-
divider: true,
|
|
1407
|
-
key: 'investment\_name',
|
|
1408
|
-
label: 'Investment'
|
|
1409
|
-
},
|
|
1410
|
-
{
|
|
1411
|
-
format: 'date',
|
|
1412
|
-
key: 'investmentDate',
|
|
1413
|
-
label: 'Date'
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
format: 'percent',
|
|
1417
|
-
key: 'totalPercentage',
|
|
1418
|
-
label: 'Share'
|
|
1419
|
-
},
|
|
1420
|
-
{
|
|
1421
|
-
format: 'currency',
|
|
1422
|
-
key: 'cost',
|
|
1423
|
-
label: 'Cost',
|
|
1424
|
-
textAlign: 'right'
|
|
1425
|
-
}
|
|
1426
|
-
\]}
|
|
1427
|
-
empty\="This table has no data"
|
|
1428
|
-
rows\={\[\]}
|
|
1429
|
-
/>
|
|
1430
|
-
|
|
1431
|
-
Copy
|
|
1432
|
-
|
|
1433
|
-
### [](#static-table)Static table
|
|
1434
|
-
|
|
1435
|
-
If you don't need all the fancy features of the table component, but would still like a styled table, you can use the `children` prop.
|
|
1436
|
-
|
|
1437
|
-
It accepts any of the table sub-elements. To ensure best display, please make use of the `thead` and `tbody` tags.
|
|
1438
|
-
|
|
1439
|
-
**Note:** Only the `caption`, `hiddenCaption`, `hiddenHeader` and `hover` props are supported when using `children` to render a table.
|
|
1440
|
-
|
|
1441
|
-
My investments
|
|
1442
|
-
| Investment | Cost | Investment date | Share |
|
|
1443
|
-
| --- | --- | --- | --- |
|
|
1444
|
-
| Artemis Fund Managers Limited | $23,898 | 2019/09/23 | 24.8% |
|
|
1445
|
-
| CASH.CASH | $49,751.40 | 2020/06/28 | 49% |
|
|
1446
|
-
| VODAFONE GRP | $26,382.46 | 2019/02/05 | 26.2% |
|
|
1447
|
-
|
|
1448
|
-
Hide code
|
|
1449
|
-
|
|
1450
|
-
\[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; }
|
|
1451
|
-
|
|
1452
|
-
<IressTable caption\="My investments"\>
|
|
1453
|
-
<thead\>
|
|
1454
|
-
<tr\>
|
|
1455
|
-
<th\>
|
|
1456
|
-
Investment </th\>
|
|
1457
|
-
<th\>
|
|
1458
|
-
Cost </th\>
|
|
1459
|
-
<th\>
|
|
1460
|
-
Investment date </th\>
|
|
1461
|
-
<th\>
|
|
1462
|
-
Share </th\>
|
|
1463
|
-
</tr\>
|
|
1464
|
-
</thead\>
|
|
1465
|
-
<tbody\>
|
|
1466
|
-
<tr\>
|
|
1467
|
-
<th\>
|
|
1468
|
-
Artemis Fund Managers Limited </th\>
|
|
1469
|
-
<td\>
|
|
1470
|
-
$23,898 </td\>
|
|
1471
|
-
<td\>
|
|
1472
|
-
2019/09/23 </td\>
|
|
1473
|
-
<td\>
|
|
1474
|
-
24.8% </td\>
|
|
1475
|
-
</tr\>
|
|
1476
|
-
<tr\>
|
|
1477
|
-
<th\>
|
|
1478
|
-
CASH.CASH </th\>
|
|
1479
|
-
<td\>
|
|
1480
|
-
$49,751.40 </td\>
|
|
1481
|
-
<td\>
|
|
1482
|
-
2020/06/28 </td\>
|
|
1483
|
-
<td\>
|
|
1484
|
-
49% </td\>
|
|
1485
|
-
</tr\>
|
|
1486
|
-
<tr\>
|
|
1487
|
-
<th\>
|
|
1488
|
-
VODAFONE GRP </th\>
|
|
1489
|
-
<td\>
|
|
1490
|
-
$26,382.46 </td\>
|
|
1491
|
-
<td\>
|
|
1492
|
-
2019/02/05 </td\>
|
|
1493
|
-
<td\>
|
|
1494
|
-
26.2% </td\>
|
|
1495
|
-
</tr\>
|
|
1496
|
-
</tbody\>
|
|
1497
|
-
</IressTable\>
|
|
1498
|
-
|
|
1499
|
-
Copy
|
|
1500
|
-
|
|
1501
|
-
### [](#row-props)Row props
|
|
1502
|
-
|
|
1503
|
-
You can customise the rows by passing in a `rowProps` object or function. It accepts a map of table row props that can be passed to a `tr` element, or a function that accepts the row data currently being rendered, and returns a map of table props.
|
|
1504
|
-
|
|
1505
|
-
My investments
|
|
1506
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
1507
|
-
| --- | --- | --- | --- |
|
|
1508
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
1509
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
1510
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
1511
|
-
|
|
1512
|
-
Hide code
|
|
1513
|
-
|
|
1514
|
-
\[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; }
|
|
1515
|
-
|
|
1516
|
-
<IressTable
|
|
1517
|
-
caption\="My investments"
|
|
1518
|
-
rows\={\[
|
|
1519
|
-
{
|
|
1520
|
-
cost: 23898,
|
|
1521
|
-
investmentDate: '2019-09-23',
|
|
1522
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1523
|
-
totalPercentage: 24.8
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
cost: 49751.4,
|
|
1527
|
-
investmentDate: '2020-06-28',
|
|
1528
|
-
investment\_name: 'CASH.CASH',
|
|
1529
|
-
totalPercentage: 49
|
|
1530
|
-
},
|
|
1531
|
-
{
|
|
1532
|
-
cost: 26382.456,
|
|
1533
|
-
investmentDate: '2019-02-05',
|
|
1534
|
-
investment\_name: 'VODAFONE GRP',
|
|
1535
|
-
totalPercentage: 26.2
|
|
1536
|
-
}
|
|
1537
|
-
\]}
|
|
1538
|
-
rowProps\={(row) \=> ({
|
|
1539
|
-
bg: row.original.cost && row.original.cost \> 30000 ? "colour.neutral.10" : "colour.system.success.surface"
|
|
1540
|
-
})}
|
|
1541
|
-
/>
|
|
1542
|
-
|
|
1543
|
-
Copy
|
|
1544
|
-
|
|
1545
|
-
### [](#compact)Compact
|
|
1546
|
-
|
|
1547
|
-
The `compact` prop can be used to reduce the padding around the table cells and reduce the font size. This can be useful when you have a lot of data to display and allow users to see as many columns as possible.
|
|
1548
|
-
|
|
1549
|
-
My investments
|
|
1550
|
-
| Investment Name | Cost | Investment Date | Total Percentage |
|
|
1551
|
-
| --- | --- | --- | --- |
|
|
1552
|
-
| Artemis Fund Managers Limited | 23898 | 2019-09-23 | 24.8 |
|
|
1553
|
-
| CASH.CASH | 49751.4 | 2020-06-28 | 49 |
|
|
1554
|
-
| VODAFONE GRP | 26382.456 | 2019-02-05 | 26.2 |
|
|
1555
|
-
|
|
1556
|
-
Hide code
|
|
1557
|
-
|
|
1558
|
-
\[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; }
|
|
1559
|
-
|
|
1560
|
-
<IressTable
|
|
1561
|
-
caption\="My investments"
|
|
1562
|
-
rows\={\[
|
|
1563
|
-
{
|
|
1564
|
-
cost: 23898,
|
|
1565
|
-
investmentDate: '2019-09-23',
|
|
1566
|
-
investment\_name: 'Artemis Fund Managers Limited',
|
|
1567
|
-
totalPercentage: 24.8
|
|
1568
|
-
},
|
|
1569
|
-
{
|
|
1570
|
-
cost: 49751.4,
|
|
1571
|
-
investmentDate: '2020-06-28',
|
|
1572
|
-
investment\_name: 'CASH.CASH',
|
|
1573
|
-
totalPercentage: 49
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
cost: 26382.456,
|
|
1577
|
-
investmentDate: '2019-02-05',
|
|
1578
|
-
investment\_name: 'VODAFONE GRP',
|
|
1579
|
-
totalPercentage: 26.2
|
|
1580
|
-
}
|
|
1581
|
-
\]}
|
|
1582
|
-
compact
|
|
1583
|
-
/>
|
|
1584
|
-
|
|
1585
|
-
Copy
|
|
1586
|
-
|
|
1587
|
-
[](#iresstablebody)`IressTableBody`
|
|
1588
|
-
-----------------------------------
|
|
1589
|
-
|
|
1590
|
-
In some cases you may have a table with multiple groups of rows inside it, however the columns are the same. For these cases, you can use the `IressTableBody` component.
|
|
1591
|
-
|
|
1592
|
-
<table class="table__table table__table--compact_false table__table--hover_false table__table--sortButtonNoWrap_false table__table--tableBodyOpen_false table__table--alternate_false table__table--removeRowBorders_false ids-table" id=":r3:"><caption id=":r3:--caption" class="table__caption table__caption--compact_false table__caption--hover_false table__caption--sortButtonNoWrap_false table__caption--tableBodyOpen_false table__caption--alternate_false table__caption--removeRowBorders_false">My liabilities</caption><tbody aria-labelledby=":r4:--caption" class=""><tr><th aria-expanded="true" colspan="8" class="table__rowGroupHeader table__rowGroupHeader--compact_false table__rowGroupHeader--hover_false table__rowGroupHeader--sortButtonNoWrap_false table__rowGroupHeader--tableBodyOpen_true" id=":r4:--caption" scope="rowgroup" aria-controls=":r4:--header--0 :r4:--rows--0 :r4:--children"><button class="table__activator table__activator--compact_false table__activator--hover_false table__activator--sortButtonNoWrap_false table__activator--tableBodyOpen_true" type="button">Current liabilities</button></th></tr><tr id=":r4:--header--0"><th id=":r4:__owner" headers=":r4:--caption" class="ta_start" style="width: 75px; min-width: 75px;">Owner</th><th id=":r4:__type" headers=":r4:--caption" class="ta_start" style="width: 100px; min-width: 100px;">Type</th><th id=":r4:__provider" headers=":r4:--caption" class="ta_start">Provider</th><th id=":r4:__status" headers=":r4:--caption" class="ta_start bd-e_table">Status</th><th id=":r4:__frequency" headers=":r4:--caption" class="ta_start">Frequency</th><th id=":r4:__outstanding" headers=":r4:--caption" aria-sort="none" class="ta_start [&&]:ta_end"><button type="button" class="table__sortHeader table__sortHeader--compact_false table__sortHeader--hover_false table__sortHeader--sortButtonNoWrap_true table__sortHeader--tableBodyOpen_false">Outstanding (GBP)<span role="img" class="ids-icon fal fa-sort table__sortIcon table__sortIcon--compact_false table__sortIcon--hover_false table__sortIcon--sortButtonNoWrap_true table__sortIcon--tableBodyOpen_false" aria-hidden="false" aria-label="sortable"></span></button></th><th id=":r4:__interestRate" headers=":r4:--caption" aria-sort="none" class="ta_right"><button type="button" class="table__sortHeader table__sortHeader--compact_false table__sortHeader--hover_false table__sortHeader--sortButtonNoWrap_true table__sortHeader--tableBodyOpen_false">Interest rate p.a.<span role="img" class="ids-icon fal fa-sort table__sortIcon table__sortIcon--compact_false table__sortIcon--hover_false table__sortIcon--sortButtonNoWrap_true table__sortIcon--tableBodyOpen_false" aria-hidden="false" aria-label="sortable"></span></button></th><th id=":r4:__repayment" headers=":r4:--caption" aria-sort="none" class="ta_start [&&]:ta_end"><button type="button" class="table__sortHeader table__sortHeader--compact_false table__sortHeader--hover_false table__sortHeader--sortButtonNoWrap_true table__sortHeader--tableBodyOpen_false">Repayment (GBP)<span role="img" class="ids-icon fal fa-sort table__sortIcon table__sortIcon--compact_false table__sortIcon--hover_false table__sortIcon--sortButtonNoWrap_true table__sortIcon--tableBodyOpen_false" aria-hidden="false" aria-label="sortable"></span></button></th></tr><tr id=":r4:--rows--0" class=""><td data-column="owner" headers=":r4:__owner :r4:--caption" id=":r4:__0_owner" class="ta_start" style="width: 75px; min-width: 75px;">Client</td><td data-column="type" headers=":r4:__type :r4:--caption" id=":r4:__0_type" class="ta_start" style="width: 100px; min-width: 100px;">Credit card</td><td data-column="provider" headers=":r4:__provider :r4:--caption" id=":r4:__0_provider" class="ta_start"></td><td data-column="status" headers=":r4:__status :r4:--caption" id=":r4:__0_status" class="ta_start bd-e_table">Current</td><td data-column="frequency" headers=":r4:__frequency :r4:--caption" id=":r4:__0_frequency" class="ta_start">Monthly</td><td data-column="outstanding" headers=":r4:__outstanding :r4:--caption" id=":r4:__0_outstanding" class="ta_start [&&]:ta_end">$5,000.00</td><td data-column="interestRate" headers=":r4:__interestRate :r4:--caption" id=":r4:__0_interestRate" class="ta_right">0%</td><td data-column="repayment" headers=":r4:__repayment :r4:--caption" id=":r4:__0_repayment" class="ta_start [&&]:ta_end">$300.00</td></tr><tr id=":r4:--children"><td colspan="8"><button type="button" class="iress-form-element iress-form-element__inner button__root button__root--inButtonGroup_false button__root--mode_secondary button__root--loading_false button__root--noWrap_false ids-button"><span class="button__prepend button__prepend--inButtonGroup_false button__prepend--mode_secondary button__prepend--loading_false button__prepend--noWrap_false"><span role="img" class="ids-icon fal fa-plus-circle" aria-hidden="true"></span></span>Add current liability</button></td></tr></tbody><tbody aria-labelledby=":r6:--caption" class=""><tr><th aria-expanded="false" colspan="8" class="table__rowGroupHeader table__rowGroupHeader--compact_false table__rowGroupHeader--hover_false table__rowGroupHeader--sortButtonNoWrap_false table__rowGroupHeader--tableBodyOpen_false" id=":r6:--caption" scope="rowgroup"><button class="table__activator table__activator--compact_false table__activator--hover_false table__activator--sortButtonNoWrap_false table__activator--tableBodyOpen_false" type="button">Long term liabilities</button></th></tr></tbody><tbody aria-labelledby=":r7:--caption" class=""><tr><th aria-expanded="false" colspan="8" class="table__rowGroupHeader table__rowGroupHeader--compact_false table__rowGroupHeader--hover_false table__rowGroupHeader--sortButtonNoWrap_false table__rowGroupHeader--tableBodyOpen_false" id=":r7:--caption" scope="rowgroup"><button class="table__activator table__activator--compact_false table__activator--hover_false table__activator--sortButtonNoWrap_false table__activator--tableBodyOpen_false" type="button">Contingent liabilities</button></th></tr></tbody></table>
|
|
1593
|
-
|
|
1594
|
-
Hide code
|
|
1595
|
-
|
|
1596
|
-
\[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; }
|
|
1597
|
-
|
|
1598
|
-
interface Liability {
|
|
1599
|
-
owner: string;
|
|
1600
|
-
type: string;
|
|
1601
|
-
provider?: string;
|
|
1602
|
-
status: string;
|
|
1603
|
-
outstanding: number;
|
|
1604
|
-
interestRate: number;
|
|
1605
|
-
repayment: number;
|
|
1606
|
-
frequency: string;
|
|
1607
|
-
}
|
|
1608
|
-
const currentLiabilities \= \[
|
|
1609
|
-
{
|
|
1610
|
-
owner: 'Client',
|
|
1611
|
-
type: 'Credit card',
|
|
1612
|
-
status: 'Current',
|
|
1613
|
-
outstanding: 5000,
|
|
1614
|
-
interestRate: 0,
|
|
1615
|
-
repayment: 300,
|
|
1616
|
-
frequency: 'Monthly',
|
|
1617
|
-
},
|
|
1618
|
-
\];
|
|
1619
|
-
const longTermLiabilities \= \[
|
|
1620
|
-
{
|
|
1621
|
-
owner: 'Joint',
|
|
1622
|
-
type: 'Primary residence mortgage',
|
|
1623
|
-
provider: 'Other',
|
|
1624
|
-
status: 'Current',
|
|
1625
|
-
outstanding: 1000000,
|
|
1626
|
-
interestRate: 0,
|
|
1627
|
-
repayment: 0,
|
|
1628
|
-
frequency: 'Monthly',
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
owner: 'Joint',
|
|
1632
|
-
type: 'Buy to let mortgage',
|
|
1633
|
-
status: 'Current',
|
|
1634
|
-
outstanding: 1000000,
|
|
1635
|
-
interestRate: 0,
|
|
1636
|
-
repayment: 0,
|
|
1637
|
-
frequency: 'Monthly',
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
owner: 'Joint',
|
|
1641
|
-
type: 'Buy to let mortgage',
|
|
1642
|
-
status: 'Current',
|
|
1643
|
-
outstanding: 5000,
|
|
1644
|
-
interestRate: 0,
|
|
1645
|
-
repayment: 0,
|
|
1646
|
-
frequency: 'Monthly',
|
|
1647
|
-
},
|
|
1648
|
-
\];
|
|
1649
|
-
const contingentLiabilities \= \[
|
|
1650
|
-
{
|
|
1651
|
-
owner: 'Partner',
|
|
1652
|
-
type: 'Limited',
|
|
1653
|
-
status: 'Current',
|
|
1654
|
-
outstanding: 1000,
|
|
1655
|
-
interestRate: 0,
|
|
1656
|
-
repayment: 100,
|
|
1657
|
-
frequency: 'Monthly',
|
|
1658
|
-
},
|
|
1659
|
-
\];
|
|
1660
|
-
const columns: TableColumn<Liability\>\[\] \= \[
|
|
1661
|
-
{
|
|
1662
|
-
key: 'owner',
|
|
1663
|
-
label: 'Owner',
|
|
1664
|
-
width: '75px',
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
key: 'type',
|
|
1668
|
-
label: 'Type',
|
|
1669
|
-
width: '100px',
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
key: 'provider',
|
|
1673
|
-
label: 'Provider',
|
|
1674
|
-
},
|
|
1675
|
-
{
|
|
1676
|
-
key: 'status',
|
|
1677
|
-
label: 'Status',
|
|
1678
|
-
divider: true,
|
|
1679
|
-
},
|
|
1680
|
-
{
|
|
1681
|
-
key: 'frequency',
|
|
1682
|
-
label: 'Frequency',
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
key: 'outstanding',
|
|
1686
|
-
label: 'Outstanding (GBP)',
|
|
1687
|
-
format: 'currency',
|
|
1688
|
-
currencyCode: '',
|
|
1689
|
-
sort: true,
|
|
1690
|
-
},
|
|
1691
|
-
{
|
|
1692
|
-
key: 'interestRate',
|
|
1693
|
-
label: 'Interest rate p.a.',
|
|
1694
|
-
format: 'percent',
|
|
1695
|
-
textAlign: 'right',
|
|
1696
|
-
sort: true,
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
key: 'repayment',
|
|
1700
|
-
label: 'Repayment (GBP)',
|
|
1701
|
-
format: 'currency',
|
|
1702
|
-
currencyCode: '',
|
|
1703
|
-
sort: true,
|
|
1704
|
-
},
|
|
1705
|
-
\];
|
|
1706
|
-
export const TableGroupedRows \= () \=> (
|
|
1707
|
-
<IressTable caption\="My liabilities"\>
|
|
1708
|
-
<IressTableBody
|
|
1709
|
-
rows\={currentLiabilities}
|
|
1710
|
-
columns\={columns}
|
|
1711
|
-
caption\="Current liabilities"
|
|
1712
|
-
scope\="col"
|
|
1713
|
-
open
|
|
1714
|
-
\>
|
|
1715
|
-
<IressButton prepend\={<IressIcon name\="plus-circle" />}\>
|
|
1716
|
-
Add current liability </IressButton\>
|
|
1717
|
-
</IressTableBody\>
|
|
1718
|
-
<IressTableBody
|
|
1719
|
-
rows\={longTermLiabilities}
|
|
1720
|
-
columns\={columns}
|
|
1721
|
-
caption\="Long term liabilities"
|
|
1722
|
-
scope\="col"
|
|
1723
|
-
\>
|
|
1724
|
-
<IressButton prepend\={<IressIcon name\="plus-circle" />}\>
|
|
1725
|
-
Add long term liability </IressButton\>
|
|
1726
|
-
</IressTableBody\>
|
|
1727
|
-
<IressTableBody
|
|
1728
|
-
rows\={contingentLiabilities}
|
|
1729
|
-
columns\={columns}
|
|
1730
|
-
caption\="Contingent liabilities"
|
|
1731
|
-
scope\="col"
|
|
1732
|
-
\>
|
|
1733
|
-
<IressButton prepend\={<IressIcon name\="plus-circle" />}\>
|
|
1734
|
-
Add contingent liability </IressButton\>
|
|
1735
|
-
</IressTableBody\>
|
|
1736
|
-
</IressTable\>
|
|
1737
|
-
);
|
|
1738
|
-
|
|
1739
|
-
Copy
|
|
1740
|
-
|
|
1741
|
-
#### [](#table-body-api)Props
|
|
1742
|
-
|
|
1743
|
-
| Name | Description | Default | Control |
|
|
1744
|
-
| --- | --- | --- | --- |
|
|
1745
|
-
| bg |
|
|
1746
|
-
**`bg`** sets the background color of an element using the `background-color` css property using the color tokens in the design system.
|
|
1747
|
-
|
|
1748
|
-
We recommend using the following token values for best background contrast:
|
|
1749
|
-
|
|
1750
|
-
* `colour.primary.fill` for primary backgrounds that need to stand out
|
|
1751
|
-
* `colour.primary.surface` for primary backgrounds that need to be less prominent
|
|
1752
|
-
* `colour.neutral.10` for the base background color, normally white in light mode or shade of grey in dark mode
|
|
1753
|
-
* `colour.neutral.20` for a slightly darker background color, used in neutral state components
|
|
1754
|
-
* `colour.system.danger.fill` for error backgrounds that need to stand out
|
|
1755
|
-
* `colour.system.danger.surface` for error backgrounds that need to be less prominent
|
|
1756
|
-
* `colour.system.success.fill` for success backgrounds that need to stand out
|
|
1757
|
-
* `colour.system.success.surface` for success backgrounds that need to be less prominent
|
|
1758
|
-
* `colour.system.warning.fill` for warning backgrounds that need to stand out
|
|
1759
|
-
* `colour.system.warning.surface` for warning backgrounds that need to be less prominent
|
|
1760
|
-
* `colour.system.info.fill` for info backgrounds that need to stand out
|
|
1761
|
-
* `colour.system.info.surface` for info backgrounds that need to be less prominent
|
|
1762
|
-
|
|
1763
|
-
ResponsiveProp<ColorToken> | undefined
|
|
1764
|
-
|
|
1765
|
-
| \- | Set object |
|
|
1766
|
-
| borderRadius |
|
|
1767
|
-
|
|
1768
|
-
The **`border-radius`** CSS property rounds the corners of an element's outer border edge using the radius tokens in the design system.
|
|
1769
|
-
|
|
1770
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1771
|
-
| --- | --- | --- | --- | --- |
|
|
1772
|
-
| **4** | **4** | **5** | **12** | **9** |
|
|
1773
|
-
| 1 _\-x-_ | | 3 _\-x-_ | | |
|
|
1774
|
-
|
|
1775
|
-
ResponsiveProp<RadiusToken> | undefined
|
|
1776
|
-
|
|
1777
|
-
| \- | Set object |
|
|
1778
|
-
| caption\* |
|
|
1779
|
-
|
|
1780
|
-
Caption that describes the data in the inner table, required for accessibility. Used to open/close the inner table.
|
|
1781
|
-
|
|
1782
|
-
**Note:** Do not include interactive elements inside the caption.
|
|
1783
|
-
|
|
1784
|
-
ReactNode
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
| \- | Set object |
|
|
1789
|
-
| color |
|
|
1790
|
-
|
|
1791
|
-
The **`color`** CSS property sets the foreground color value of an element's text and text decorations using the colour tokens from the design system. It also sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`.
|
|
1792
|
-
|
|
1793
|
-
We recommend using the following token values for best color contrast:
|
|
1794
|
-
|
|
1795
|
-
* `colour.primary.onFill` used on top of `colour.primary.fill` for primary text that needs to stand out
|
|
1796
|
-
* `colour.primary.text` used on top of `colour.primary.surface` or `colour.neutral.10` for primary text that needs to be less prominent
|
|
1797
|
-
* `colour.neutral.70` used on top of `colour.neutral.10` or `colour.neutral.20` for muted text
|
|
1798
|
-
* `colour.neutral.80` used on top of `colour.neutral.10` or `colour.neutral.20` for standard text
|
|
1799
|
-
* `colour.system.danger.onFill` used on top of `colour.system.danger.fill` for error text that needs to stand out
|
|
1800
|
-
* `colour.system.danger.text` used on top of `colour.system.danger.surface` for error text that needs to be less prominent
|
|
1801
|
-
* `colour.system.success.onFill` used on top of `colour.system.success.fill` for success text that needs to stand out
|
|
1802
|
-
* `colour.system.success.text` used on top of `colour.system.success.surface` for success text that needs to be less prominent
|
|
1803
|
-
* `colour.system.warning.onFill` used on top of `colour.system.warning.fill` for warning text that needs to stand out
|
|
1804
|
-
* `colour.system.warning.text` used on top of `colour.system.warning.surface` for warning text that needs to be less prominent
|
|
1805
|
-
* `colour.system.info.onFill` used on top of `colour.system.info.fill` for informative text that needs to stand out
|
|
1806
|
-
* `colour.system.info.text` used on top of `colour.system.info.surface` for informative text that needs to be less prominent
|
|
1807
|
-
|
|
1808
|
-
ResponsiveProp<ColorToken> | undefined
|
|
1809
|
-
|
|
1810
|
-
| \- | Set object |
|
|
1811
|
-
| columns |
|
|
1812
|
-
|
|
1813
|
-
A mapping of columns to be displayed in the table. If not provided, it will be automatically regenerated from the row data.
|
|
1814
|
-
|
|
1815
|
-
TableColumn<TRow, TVal>\[\] | undefined
|
|
1816
|
-
|
|
1817
|
-
| \- | Set object |
|
|
1818
|
-
| empty |
|
|
1819
|
-
|
|
1820
|
-
Content to be show when there is no rowData (columns must also be provided).
|
|
1821
|
-
|
|
1822
|
-
ReactNode
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
| \- | Set object |
|
|
1827
|
-
| focusable |
|
|
1828
|
-
|
|
1829
|
-
The `focusable` prop is used to apply the focus elevation when focused. It can be set to `true` to apply focus styles on focus, or `'within'` to apply focus styles when the element or any of its children are focused.
|
|
1830
|
-
|
|
1831
|
-
"true""within"undefined
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
| \- | Set object |
|
|
1836
|
-
| hiddenCaption |
|
|
1837
|
-
|
|
1838
|
-
When set to true, the table caption will be visually hidden. If set, the inner table will always be open.
|
|
1839
|
-
|
|
1840
|
-
booleanundefined
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
| \- | Set object |
|
|
1845
|
-
| hiddenHeader |
|
|
1846
|
-
|
|
1847
|
-
When set to true, the table header (`<thead></thead>`) will be not be rendered. Only use with very simple tables.
|
|
1848
|
-
|
|
1849
|
-
booleanundefined
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
| \- | Set object |
|
|
1854
|
-
| hide |
|
|
1855
|
-
|
|
1856
|
-
Set **`hide`** to hide an element completely using `display: none`. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
1857
|
-
|
|
1858
|
-
Hide on all breakpoints: `hide: true` Hide on specific breakpoints: `hide: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
1859
|
-
|
|
1860
|
-
Notes:
|
|
1861
|
-
|
|
1862
|
-
* If you need to hide an element but allow it to be visible to screen readers, use the `srOnly` prop instead.
|
|
1863
|
-
* Consider if you can conditionally render the element instead of hiding it.
|
|
1864
|
-
|
|
1865
|
-
ResponsiveProp<boolean> | undefined
|
|
1866
|
-
|
|
1867
|
-
| \- | Set object |
|
|
1868
|
-
| layerStyle |
|
|
1869
|
-
|
|
1870
|
-
Elevate a layer by using a **`layerStyle`**. These are connected to the elevation tokens in the design system. They can be combined to create hierarchy and structure.
|
|
1871
|
-
|
|
1872
|
-
* `elevation.raised`: Raised elevations sit slightly higher than other content. They are reserved for cards that can be moved, such as Jira issue cards and Trello cards. In special circumstances, they can be used for cards as a way to provide additional heirarchy or emphasis.
|
|
1873
|
-
* `elevation.floating`: Floating is the highest elevation available. It is reserved for a UI that sits over another UI, such as modals, dialogs, dropdown menus, floating toolbars, and floating single-action buttons.
|
|
1874
|
-
* `elevation.overflow`: Overflow is a shadow indicating content has scrolled outside a view. It can be used for vertical or horizontal scroll. An example of overflow shadows is the horizontal scroll in tables on a Confluence page.
|
|
1875
|
-
|
|
1876
|
-
ResponsiveProp<"elevation.raised" | "elevation.floating" | "elevation.overflow" | "elevation.focus" | "elevation.focusCompact"> | undefined
|
|
1877
|
-
|
|
1878
|
-
| \- | Set object |
|
|
1879
|
-
| m |
|
|
1880
|
-
|
|
1881
|
-
The **`m`** property is short for `margin`, and sets the margin area on all four sides of an element.
|
|
1882
|
-
|
|
1883
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
1884
|
-
|
|
1885
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1886
|
-
| --- | --- | --- | --- | --- |
|
|
1887
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1888
|
-
|
|
1889
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1890
|
-
|
|
1891
|
-
| \- | Set object |
|
|
1892
|
-
| maxWidth |
|
|
1893
|
-
|
|
1894
|
-
The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`.
|
|
1895
|
-
|
|
1896
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1897
|
-
| --- | --- | --- | --- | --- |
|
|
1898
|
-
| **1** | **1** | **1** | **12** | **7** |
|
|
1899
|
-
|
|
1900
|
-
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
1901
|
-
|
|
1902
|
-
| \- | Set object |
|
|
1903
|
-
| mb |
|
|
1904
|
-
|
|
1905
|
-
The **`mb`** property is short for `margin-bottom` and sets the margin area on the bottom side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
1906
|
-
|
|
1907
|
-
It uses the spacing tokens in the design system.
|
|
1908
|
-
|
|
1909
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1910
|
-
| --- | --- | --- | --- | --- |
|
|
1911
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1912
|
-
|
|
1913
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1914
|
-
|
|
1915
|
-
| \- | Set object |
|
|
1916
|
-
| ml |
|
|
1917
|
-
|
|
1918
|
-
The **`ml`** property is short for `margin-left` and sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
1919
|
-
|
|
1920
|
-
It uses the spacing tokens in the design system.
|
|
1921
|
-
|
|
1922
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1923
|
-
| --- | --- | --- | --- | --- |
|
|
1924
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1925
|
-
|
|
1926
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1927
|
-
|
|
1928
|
-
| \- | Set object |
|
|
1929
|
-
| mr |
|
|
1930
|
-
|
|
1931
|
-
The **`mr`** property is short for `margin-right` and sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
1932
|
-
|
|
1933
|
-
It uses the spacing tokens in the design system.
|
|
1934
|
-
|
|
1935
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1936
|
-
| --- | --- | --- | --- | --- |
|
|
1937
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1938
|
-
|
|
1939
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1940
|
-
|
|
1941
|
-
| \- | Set object |
|
|
1942
|
-
| mt |
|
|
1943
|
-
|
|
1944
|
-
The **`mt`** property is short for `margin-top` and sets the margin area on the top side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
1945
|
-
|
|
1946
|
-
It uses the spacing tokens in the design system.
|
|
1947
|
-
|
|
1948
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1949
|
-
| --- | --- | --- | --- | --- |
|
|
1950
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1951
|
-
|
|
1952
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1953
|
-
|
|
1954
|
-
| \- | Set object |
|
|
1955
|
-
| mx |
|
|
1956
|
-
|
|
1957
|
-
The **`mx`** property is short for `margin-inline`. It is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
1958
|
-
|
|
1959
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
1960
|
-
|
|
1961
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1962
|
-
| --- | --- | --- | --- | --- |
|
|
1963
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1964
|
-
|
|
1965
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1966
|
-
|
|
1967
|
-
| \- | Set object |
|
|
1968
|
-
| my |
|
|
1969
|
-
|
|
1970
|
-
The **`my`** property is short for `margin-block`. It defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
1971
|
-
|
|
1972
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
1973
|
-
|
|
1974
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
1975
|
-
| --- | --- | --- | --- | --- |
|
|
1976
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
1977
|
-
|
|
1978
|
-
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
1979
|
-
|
|
1980
|
-
| \- | Set object |
|
|
1981
|
-
| noGutter |
|
|
1982
|
-
|
|
1983
|
-
The **`noGutter`** property is used to remove the bottom margin from the last child of a component. This is useful when you want to avoid extra spacing at the end of a layout.
|
|
1984
|
-
|
|
1985
|
-
booleanundefined
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
| \- | Set object |
|
|
1990
|
-
| onClosed |
|
|
1991
|
-
|
|
1992
|
-
Is called when table is closed.
|
|
1993
|
-
|
|
1994
|
-
(() => void) | undefined
|
|
1995
|
-
|
|
1996
|
-
| \- | \- |
|
|
1997
|
-
| onOpened |
|
|
1998
|
-
|
|
1999
|
-
Is called when table is opened.
|
|
2000
|
-
|
|
2001
|
-
(() => void) | undefined
|
|
2002
|
-
|
|
2003
|
-
| \- | \- |
|
|
2004
|
-
| open |
|
|
2005
|
-
|
|
2006
|
-
When true, all rows will be visible, otherwise they are hidden.
|
|
2007
|
-
|
|
2008
|
-
booleanundefined
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
|
2013
|
-
|
|
2014
|
-
false
|
|
2015
|
-
|
|
2016
|
-
| Set object |
|
|
2017
|
-
| p |
|
|
2018
|
-
|
|
2019
|
-
The **`p`** property is short for `padding`, and sets the padding area on all four sides of an element at once.
|
|
2020
|
-
|
|
2021
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2022
|
-
|
|
2023
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2024
|
-
| --- | --- | --- | --- | --- |
|
|
2025
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2026
|
-
|
|
2027
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2028
|
-
|
|
2029
|
-
| \- | Set object |
|
|
2030
|
-
| pb |
|
|
2031
|
-
|
|
2032
|
-
The **`pb`** property is short for `padding-bottom` and sets the padding area on the bottom side of an element.
|
|
2033
|
-
|
|
2034
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2035
|
-
|
|
2036
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2037
|
-
| --- | --- | --- | --- | --- |
|
|
2038
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2039
|
-
|
|
2040
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2041
|
-
|
|
2042
|
-
| \- | Set object |
|
|
2043
|
-
| pl |
|
|
2044
|
-
|
|
2045
|
-
The **`pl`** property is short for `padding-left` and sets the padding area on the left side of an element.
|
|
2046
|
-
|
|
2047
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2048
|
-
|
|
2049
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2050
|
-
| --- | --- | --- | --- | --- |
|
|
2051
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2052
|
-
|
|
2053
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2054
|
-
|
|
2055
|
-
| \- | Set object |
|
|
2056
|
-
| pr |
|
|
2057
|
-
|
|
2058
|
-
The **`pr`** property is short for `padding-right` and sets the padding area on the right side of an element.
|
|
2059
|
-
|
|
2060
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2061
|
-
|
|
2062
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2063
|
-
| --- | --- | --- | --- | --- |
|
|
2064
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2065
|
-
|
|
2066
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2067
|
-
|
|
2068
|
-
| \- | Set object |
|
|
2069
|
-
| pt |
|
|
2070
|
-
|
|
2071
|
-
The **`pt`** property is short for `padding-top` and sets the padding area on the top side of an element.
|
|
2072
|
-
|
|
2073
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2074
|
-
|
|
2075
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2076
|
-
| --- | --- | --- | --- | --- |
|
|
2077
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2078
|
-
|
|
2079
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2080
|
-
|
|
2081
|
-
| \- | Set object |
|
|
2082
|
-
| px |
|
|
2083
|
-
|
|
2084
|
-
The **`px`** property is short for `padding-inline`. It is a shorthand property that defines both the logical inline start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
2085
|
-
|
|
2086
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2087
|
-
|
|
2088
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2089
|
-
| --- | --- | --- | --- | --- |
|
|
2090
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2091
|
-
|
|
2092
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2093
|
-
|
|
2094
|
-
| \- | Set object |
|
|
2095
|
-
| py |
|
|
2096
|
-
|
|
2097
|
-
The **`py`** property is short for `padding-block`. It defines the logical block start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
2098
|
-
|
|
2099
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
2100
|
-
|
|
2101
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2102
|
-
| --- | --- | --- | --- | --- |
|
|
2103
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2104
|
-
|
|
2105
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2106
|
-
|
|
2107
|
-
| \- | Set object |
|
|
2108
|
-
| rowGap |
|
|
2109
|
-
|
|
2110
|
-
The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows.
|
|
2111
|
-
|
|
2112
|
-
Note: It only has an effect when used as a direct child of a layout component, such as IressRow, IressStack or IressInline.
|
|
2113
|
-
|
|
2114
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2115
|
-
| --- | --- | --- | --- | --- |
|
|
2116
|
-
| **47** | **52** | **10.1** | **16** | No |
|
|
2117
|
-
|
|
2118
|
-
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
2119
|
-
|
|
2120
|
-
| \- | Set object |
|
|
2121
|
-
| rowProps |
|
|
2122
|
-
|
|
2123
|
-
Add additional props to the row element. Can be a props map or a function that returns an props map. The function is called with the row data.
|
|
2124
|
-
|
|
2125
|
-
IressStyledProps<"tr"> | ((row: Row<TRow>) => IressStyledProps<"tr">) | undefined
|
|
2126
|
-
|
|
2127
|
-
| \- | Set object |
|
|
2128
|
-
| rows |
|
|
2129
|
-
|
|
2130
|
-
Each object in the array contains the data for a row.
|
|
2131
|
-
|
|
2132
|
-
TRow\[\] | undefined
|
|
2133
|
-
|
|
2134
|
-
| \[\] | Set object |
|
|
2135
|
-
| scope |
|
|
2136
|
-
|
|
2137
|
-
Defaults to 'row' - the first cell in the row is a `<th>`, otherwise it's a `<td>`.
|
|
2138
|
-
|
|
2139
|
-
"col""row"undefined
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
|
2144
|
-
|
|
2145
|
-
'row'
|
|
2146
|
-
|
|
2147
|
-
| Set object |
|
|
2148
|
-
| srOnly |
|
|
2149
|
-
|
|
2150
|
-
Set **`srOnly`** to hide an element visually but still make it accessible to screen readers. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
2151
|
-
|
|
2152
|
-
Hide on all breakpoints: `srOnly: true` Hide on specific breakpoints: `srOnly: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
2153
|
-
|
|
2154
|
-
ResponsiveProp<boolean> | undefined
|
|
2155
|
-
|
|
2156
|
-
| \- | Set object |
|
|
2157
|
-
| stretch |
|
|
2158
|
-
|
|
2159
|
-
The **`stretch`** property is used to stretch an element to fill the available space in its parent container. It sets the `height` property to `100%` and `alignSelf` to `stretch`, allowing the element to expand and contract based on the size of its parent.
|
|
2160
|
-
|
|
2161
|
-
booleanundefined
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
| \- | Set object |
|
|
2166
|
-
| textAlign |
|
|
2167
|
-
|
|
2168
|
-
The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
|
|
2169
|
-
|
|
2170
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2171
|
-
| --- | --- | --- | --- | --- |
|
|
2172
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
2173
|
-
|
|
2174
|
-
ResponsiveProp<"center" | "left" | "right" | "inherit" | "justify"> | undefined
|
|
2175
|
-
|
|
2176
|
-
| \- | Set object |
|
|
2177
|
-
| textStyle |
|
|
2178
|
-
|
|
2179
|
-
Select the typography to be used using the **`textStyle`** prop. These are connected to the typography tokens in the design system.'
|
|
2180
|
-
|
|
2181
|
-
* `typography.body.sm` - Use for small components such as badges and disclaimers, as well as compact variations of tables and lists.
|
|
2182
|
-
* `typography.body.md` - The most commonly used body text size, used for most text content in the product and the default state of all components in the design system.
|
|
2183
|
-
* `typography.body.lg` - Use for tag lines, subtitles, and other large text content in the product.
|
|
2184
|
-
* `typography.heading.1` - Use for the main page title to establish a clear hierarchy. There is typically only one H1 per screen, emphasising the primary purpose or context of the page.
|
|
2185
|
-
* `typography.heading.2` - Use for primary section headings within a page to organise content and guide the user through key areas. Also suitable for large components—such as modals—where space allows and where it pairs well with body.md or body.lg.
|
|
2186
|
-
* `typography.heading.3` - Use for sub-sections under H2s to further structure content and maintain a clear visual hierarchy. Ideal for breaking down complex sections into manageable parts.
|
|
2187
|
-
* `typography.heading.4` - Use for supporting headings within content blocks or small components where space is limited—such as table headers, cards, or side panels. Provides structure without overwhelming the layout.
|
|
2188
|
-
* `typography.heading.5` - Use for minor labels or titles in compact UI elements, such as cards, sidebars, or inline labels. Best used to emphasise supplementary information without drawing too much attention. Works well with body.sm and is ideal for subtle content like fine print. Use sparingly to preserve typographic hierarchy.
|
|
2189
|
-
* `typography.code` - Used to display code snippets in the product, such as in the API documentation.
|
|
2190
|
-
|
|
2191
|
-
ResponsiveProp<"typography.heading.1" | "typography.heading.2" | "typography.heading.3" | "typography.heading.4" | "typography.heading.5" | "typography.body.sm" | "typography.body.sm.regular" | ... 10 more ... | "typography.code"> | undefined
|
|
2192
|
-
|
|
2193
|
-
| \- | Set object |
|
|
2194
|
-
| width |
|
|
2195
|
-
|
|
2196
|
-
The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area.
|
|
2197
|
-
|
|
2198
|
-
This prop only allows widths available throughout the component library. To use a custom width, you need to use the `style` prop, or add a custom class to the element and use CSS.
|
|
2199
|
-
|
|
2200
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
2201
|
-
| --- | --- | --- | --- | --- |
|
|
2202
|
-
| **1** | **1** | **1** | **12** | **4** |
|
|
2203
|
-
|
|
2204
|
-
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
2205
|
-
|
|
2206
|
-
| \- | Set object |
|
|
2207
|
-
|
|
2208
|
-
[](#iresstableformattedvalue)`IressTableFormattedValue`
|
|
2209
|
-
-------------------------------------------------------
|
|
2210
|
-
|
|
2211
|
-
`IressTableFormattedValue` is the component used to format the table columns when the `format` property is not a render function.
|
|
2212
|
-
|
|
2213
|
-
It has been exposed so you can use it in your own components to format values in the same way as the table component.
|
|
2214
|
-
|
|
2215
|
-
IressTableFormattedValue
|
|
2216
|
-
| Mode | Example |
|
|
2217
|
-
| --- | --- |
|
|
2218
|
-
| string | string |
|
|
2219
|
-
| number | 10000 |
|
|
2220
|
-
| date | 14/08/2025 |
|
|
2221
|
-
| shortDate | 14 Aug 2025 |
|
|
2222
|
-
| isoDateTime | 2025-08-14 02:54:29 (UTC) |
|
|
2223
|
-
| relativeTime | now |
|
|
2224
|
-
| currency | $10,000.00 |
|
|
2225
|
-
| percent | 50% |
|
|
2226
|
-
|
|
2227
|
-
Hide code
|
|
2228
|
-
|
|
2229
|
-
\[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; }
|
|
2230
|
-
|
|
2231
|
-
{
|
|
2232
|
-
args: {
|
|
2233
|
-
value: '100'
|
|
2234
|
-
},
|
|
2235
|
-
argTypes: {
|
|
2236
|
-
...disableArgTypes(\['format', 'value'\])
|
|
2237
|
-
},
|
|
2238
|
-
render: () \=> <IressTable caption\="IressTableFormattedValue" rows\={\[{
|
|
2239
|
-
mode: 'string',
|
|
2240
|
-
example: <IressTableFormattedValue value\="string" format\="string" />
|
|
2241
|
-
}, {
|
|
2242
|
-
mode: 'number',
|
|
2243
|
-
example: <IressTableFormattedValue value\="10000" format\="number" />
|
|
2244
|
-
}, {
|
|
2245
|
-
mode: 'date',
|
|
2246
|
-
example: <IressTableFormattedValue value\={new Date()} format\="date" />
|
|
2247
|
-
}, {
|
|
2248
|
-
mode: 'shortDate',
|
|
2249
|
-
example: <IressTableFormattedValue value\={new Date()} format\="shortDate" />
|
|
2250
|
-
}, {
|
|
2251
|
-
mode: 'isoDateTime',
|
|
2252
|
-
example: <IressTableFormattedValue value\={new Date()} format\="isoDateTime" />
|
|
2253
|
-
}, {
|
|
2254
|
-
mode: 'relativeTime',
|
|
2255
|
-
example: <IressTableFormattedValue value\={new Date()} format\="relativeTime" />
|
|
2256
|
-
}, {
|
|
2257
|
-
mode: 'currency',
|
|
2258
|
-
example: <IressTableFormattedValue value\={10000} format\="currency" />
|
|
2259
|
-
}, {
|
|
2260
|
-
mode: 'percent',
|
|
2261
|
-
example: <IressTableFormattedValue value\={50} format\="percent" />
|
|
2262
|
-
}\]} />
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
Copy
|
|
2266
|
-
|
|
2267
|
-
#### [](#table-formatted-value-api)Props
|
|
2268
|
-
|
|
2269
|
-
| Name | Description | Default | Control |
|
|
2270
|
-
| --- | --- | --- | --- |
|
|
2271
|
-
| currencyFormatOptions |
|
|
2272
|
-
The currency code to prefix to the value if `format` is set to currency.
|
|
2273
|
-
|
|
2274
|
-
Omit<CurrencyFormatterProps, "value"> | undefined
|
|
2275
|
-
|
|
2276
|
-
| { locale: 'en-AU', currencyCode: 'AUD' } | \- |
|
|
2277
|
-
| format |
|
|
2278
|
-
|
|
2279
|
-
Formats the cell content. To use the in-built formatters, set this to: string, number, date, currency, percent. Use a custom formatter by passing a function that returns a ReactNode.
|
|
2280
|
-
|
|
2281
|
-
"string" | "number" | "percent" | "date" | "currency" | "shortDate" | "isoDateTime" | "relativeTime" | ((value: TVal, row?: TRow | undefined) => ReactNode) | undefined
|
|
2282
|
-
|
|
2283
|
-
| \- | \- |
|
|
2284
|
-
| row |
|
|
2285
|
-
|
|
2286
|
-
The row data.
|
|
2287
|
-
|
|
2288
|
-
objectundefined
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
| \- | \- |
|
|
2293
|
-
| value\* |
|
|
2294
|
-
|
|
2295
|
-
The value to format.
|
|
2296
|
-
|
|
2297
|
-
TVal
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
| \- | \- |
|
|
2302
|
-
|
|
2303
|
-
On this page
|
|
2304
|
-
|
|
2305
|
-
* [Overview](#overview)
|
|
2306
|
-
* [Props](#props)
|
|
2307
|
-
* [Usage](#usage)
|
|
2308
|
-
* [Automatic columns](#automatic-columns)
|
|
2309
|
-
* [Custom columns](#custom-columns)
|
|
2310
|
-
* [Column API](#column-api)
|
|
2311
|
-
* [Examples](#examples)
|
|
2312
|
-
* [Formats](#formats)
|
|
2313
|
-
* [Sorting](#sorting)
|
|
2314
|
-
* [Custom sorting logic](#custom-sorting-logic)
|
|
2315
|
-
* [Width](#width)
|
|
2316
|
-
* [Alignment](#alignment)
|
|
2317
|
-
* [Dividers](#dividers)
|
|
2318
|
-
* [Highlight on hover](#highlight-on-hover)
|
|
2319
|
-
* [Scope](#scope)
|
|
2320
|
-
* [Hidden header](#hidden-header)
|
|
2321
|
-
* [Rich rows (JSX)](#rich-rows-jsx)
|
|
2322
|
-
* [Empty state](#empty-state)
|
|
2323
|
-
* [Static table](#static-table)
|
|
2324
|
-
* [Row props](#row-props)
|
|
2325
|
-
* [Compact](#compact)
|
|
2326
|
-
* [IressTableBody](#iresstablebody)
|
|
2327
|
-
* [IressTableFormattedValue](#iresstableformattedvalue)
|