@cloudscape-design/components 3.0.673 → 3.0.675
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/cards/interfaces.d.ts +1 -2
- package/cards/interfaces.d.ts.map +1 -1
- package/cards/interfaces.js.map +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +1 -0
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +31 -30
- package/container/styles.scoped.css +57 -54
- package/container/styles.selectors.js +31 -30
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/scrollable-containers.js +3 -2
- package/internal/utils/scrollable-containers.js.map +1 -1
- package/package.json +1 -1
- package/popover/use-popover-position.js +3 -2
- package/popover/use-popover-position.js.map +1 -1
- package/table/header-cell/styles.css.js +26 -26
- package/table/header-cell/styles.scoped.css +67 -64
- package/table/header-cell/styles.selectors.js +26 -26
- package/table/interfaces.d.ts +1 -2
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/styles.css.js +34 -34
- package/table/styles.scoped.css +42 -39
- package/table/styles.selectors.js +34 -34
|
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.awsui_header-
|
|
97
|
+
.awsui_header-cell_1spae_geicw_97:not(#\9) {
|
|
98
98
|
position: relative;
|
|
99
99
|
text-align: start;
|
|
100
100
|
box-sizing: border-box;
|
|
@@ -107,14 +107,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
107
107
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
108
108
|
padding-inline: var(--space-scaled-xs-26e2du, 8px);
|
|
109
109
|
}
|
|
110
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
110
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97:not(#\9):focus {
|
|
111
111
|
position: relative;
|
|
112
112
|
}
|
|
113
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
113
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97:not(#\9):focus {
|
|
114
114
|
outline: 2px dotted transparent;
|
|
115
115
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
116
116
|
}
|
|
117
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
117
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97:not(#\9):focus::before {
|
|
118
118
|
content: " ";
|
|
119
119
|
display: block;
|
|
120
120
|
position: absolute;
|
|
@@ -128,14 +128,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97:not(#\9):f
|
|
|
128
128
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
129
129
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
130
130
|
}
|
|
131
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
131
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9) {
|
|
132
132
|
position: relative;
|
|
133
133
|
}
|
|
134
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
134
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9) {
|
|
135
135
|
outline: 2px dotted transparent;
|
|
136
136
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
137
137
|
}
|
|
138
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
138
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9)::before {
|
|
139
139
|
content: " ";
|
|
140
140
|
display: block;
|
|
141
141
|
position: absolute;
|
|
@@ -149,19 +149,22 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_head
|
|
|
149
149
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
150
150
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
151
151
|
}
|
|
152
|
-
.awsui_header-cell-
|
|
152
|
+
.awsui_header-cell-sticky_1spae_geicw_152:not(#\9) {
|
|
153
153
|
border-block-end: var(--border-table-sticky-width-87kf12, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
154
154
|
}
|
|
155
|
-
.awsui_header-cell-
|
|
155
|
+
.awsui_header-cell-stuck_1spae_geicw_155:not(#\9):not(.awsui_header-cell-variant-full-page_1spae_geicw_155) {
|
|
156
156
|
border-block-end-color: transparent;
|
|
157
157
|
}
|
|
158
|
-
.awsui_header-cell-variant-full-
|
|
158
|
+
.awsui_header-cell-variant-full-page_1spae_geicw_155:not(#\9) {
|
|
159
|
+
background: var(--color-background-layout-main-nx09lr, #ffffff);
|
|
160
|
+
}
|
|
161
|
+
.awsui_header-cell-variant-full-page_1spae_geicw_155.awsui_header-cell-hidden_1spae_geicw_161:not(#\9) {
|
|
159
162
|
border-block-end-color: transparent;
|
|
160
163
|
}
|
|
161
|
-
.awsui_header-
|
|
164
|
+
.awsui_header-cell_1spae_geicw_97:not(#\9):last-child, .awsui_header-cell_1spae_geicw_97.awsui_header-cell-sortable_1spae_geicw_164:not(#\9) {
|
|
162
165
|
padding-inline-end: var(--space-xs-zb16t3, 8px);
|
|
163
166
|
}
|
|
164
|
-
.awsui_header-
|
|
167
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell_1spae_geicw_167:not(#\9) {
|
|
165
168
|
position: sticky;
|
|
166
169
|
background: var(--color-background-table-header-82ew8p, #ffffff);
|
|
167
170
|
z-index: 798;
|
|
@@ -169,42 +172,42 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_head
|
|
|
169
172
|
transition-duration: var(--motion-duration-transition-show-quick-osg026, 90ms);
|
|
170
173
|
transition-timing-function: var(--motion-easing-sticky-56u8cd, cubic-bezier(1, 0, 0.83, 1));
|
|
171
174
|
}
|
|
172
|
-
.awsui_header-
|
|
175
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-pad-left_1spae_geicw_175:not(#\9):not(.awsui_has-selection_1spae_geicw_175) {
|
|
173
176
|
padding-inline-start: var(--space-table-horizontal-8davlm, 20px);
|
|
174
177
|
}
|
|
175
|
-
.awsui_header-
|
|
178
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-last-inline-start_1spae_geicw_178:not(#\9) {
|
|
176
179
|
box-shadow: var(--shadow-sticky-column-first-039dqs, 4px 0px 8px 1px rgba(0, 7, 22, 0.1));
|
|
177
180
|
clip-path: inset(0px -24px 0px 0px);
|
|
178
181
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
179
182
|
}
|
|
180
|
-
.awsui_header-
|
|
183
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-last-inline-start_1spae_geicw_178 > .awsui_resize-divider_1spae_geicw_183:not(#\9) {
|
|
181
184
|
display: none;
|
|
182
185
|
}
|
|
183
|
-
.awsui_header-
|
|
186
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-last-inline-start_1spae_geicw_178:not(#\9):dir(rtl) {
|
|
184
187
|
box-shadow: var(--shadow-sticky-column-last-n170vw, -4px 0 8px 1px rgba(0, 28, 36, 0.1));
|
|
185
188
|
clip-path: inset(0 0 0 -24px);
|
|
186
189
|
}
|
|
187
|
-
.awsui_header-
|
|
190
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-last-inline-end_1spae_geicw_190:not(#\9) {
|
|
188
191
|
box-shadow: var(--shadow-sticky-column-last-n170vw, -4px 0 8px 1px rgba(0, 28, 36, 0.1));
|
|
189
192
|
clip-path: inset(0 0 0 -24px);
|
|
190
193
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
191
194
|
}
|
|
192
|
-
.awsui_header-
|
|
195
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell-last-inline-end_1spae_geicw_190:not(#\9):dir(rtl) {
|
|
193
196
|
box-shadow: var(--shadow-sticky-column-first-039dqs, 4px 0px 8px 1px rgba(0, 7, 22, 0.1));
|
|
194
197
|
clip-path: inset(0 -24px 0 0);
|
|
195
198
|
}
|
|
196
199
|
@media (prefers-reduced-motion: reduce) {
|
|
197
|
-
.awsui_header-
|
|
200
|
+
.awsui_header-cell_1spae_geicw_97.awsui_sticky-cell_1spae_geicw_167:not(#\9) {
|
|
198
201
|
animation: none;
|
|
199
202
|
transition: none;
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
|
-
.awsui-motion-disabled .awsui_header-
|
|
205
|
+
.awsui-motion-disabled .awsui_header-cell_1spae_geicw_97.awsui_sticky-cell_1spae_geicw_167:not(#\9), .awsui-mode-entering .awsui_header-cell_1spae_geicw_97.awsui_sticky-cell_1spae_geicw_167:not(#\9) {
|
|
203
206
|
animation: none;
|
|
204
207
|
transition: none;
|
|
205
208
|
}
|
|
206
209
|
|
|
207
|
-
.awsui_sorting-
|
|
210
|
+
.awsui_sorting-icon_1spae_geicw_210:not(#\9) {
|
|
208
211
|
position: absolute;
|
|
209
212
|
inset-block-start: 50%;
|
|
210
213
|
transform: translateY(-50%);
|
|
@@ -212,36 +215,36 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_head
|
|
|
212
215
|
color: var(--color-text-column-sorting-icon-8or30j, #414d5c);
|
|
213
216
|
}
|
|
214
217
|
|
|
215
|
-
.awsui_edit-
|
|
218
|
+
.awsui_edit-icon_1spae_geicw_218:not(#\9) {
|
|
216
219
|
margin-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
217
220
|
margin-block-start: var(--space-scaled-xxs-7597g1, 4px);
|
|
218
221
|
color: inherit;
|
|
219
222
|
}
|
|
220
223
|
|
|
221
|
-
.awsui_header-cell-
|
|
224
|
+
.awsui_header-cell-content_1spae_geicw_224:not(#\9) {
|
|
222
225
|
position: relative;
|
|
223
226
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
224
227
|
padding-inline-start: var(--space-s-34lx8l, 12px);
|
|
225
228
|
padding-inline-end: var(--space-s-34lx8l, 12px);
|
|
226
229
|
}
|
|
227
|
-
.awsui_header-cell-
|
|
230
|
+
.awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-content-expandable_1spae_geicw_230:not(#\9) {
|
|
228
231
|
padding-inline-start: calc(var(--space-s-34lx8l, 12px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
229
232
|
}
|
|
230
|
-
.awsui_header-cell-
|
|
233
|
+
.awsui_header-cell-sortable_1spae_geicw_164 > .awsui_header-cell-content_1spae_geicw_224:not(#\9) {
|
|
231
234
|
padding-inline-end: calc(var(--space-xl-lmui9r, 24px) + var(--space-xxs-p8yyaw, 4px));
|
|
232
235
|
}
|
|
233
|
-
.awsui_header-cell-
|
|
236
|
+
.awsui_header-cell-content_1spae_geicw_224:not(#\9):focus {
|
|
234
237
|
outline: none;
|
|
235
238
|
text-decoration: none;
|
|
236
239
|
}
|
|
237
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
240
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224:not(#\9):focus {
|
|
238
241
|
position: relative;
|
|
239
242
|
}
|
|
240
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
243
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224:not(#\9):focus {
|
|
241
244
|
outline: 2px dotted transparent;
|
|
242
245
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px)) - 1px);
|
|
243
246
|
}
|
|
244
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
247
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224:not(#\9):focus::before {
|
|
245
248
|
content: " ";
|
|
246
249
|
display: block;
|
|
247
250
|
position: absolute;
|
|
@@ -255,14 +258,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_ga51i_221:n
|
|
|
255
258
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
256
259
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
257
260
|
}
|
|
258
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
261
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9) {
|
|
259
262
|
position: relative;
|
|
260
263
|
}
|
|
261
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
264
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9) {
|
|
262
265
|
outline: 2px dotted transparent;
|
|
263
266
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px)) - 1px);
|
|
264
267
|
}
|
|
265
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
268
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131:not(#\9)::before {
|
|
266
269
|
content: " ";
|
|
267
270
|
display: block;
|
|
268
271
|
position: absolute;
|
|
@@ -276,32 +279,32 @@ body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_ga51i_221.a
|
|
|
276
279
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
277
280
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
278
281
|
}
|
|
279
|
-
.awsui_header-cell-
|
|
282
|
+
.awsui_header-cell-disabled_1spae_geicw_282.awsui_header-cell-sorted_1spae_geicw_282 > .awsui_header-cell-content_1spae_geicw_224 > .awsui_sorting-icon_1spae_geicw_210:not(#\9) {
|
|
280
283
|
color: var(--color-text-interactive-disabled-z7a3t4, #9ba7b6);
|
|
281
284
|
}
|
|
282
285
|
|
|
283
|
-
.awsui_header-cell-
|
|
286
|
+
.awsui_header-cell-sortable_1spae_geicw_164:not(#\9):not(.awsui_header-cell-disabled_1spae_geicw_282) > .awsui_header-cell-content_1spae_geicw_224 {
|
|
284
287
|
cursor: pointer;
|
|
285
288
|
}
|
|
286
|
-
.awsui_header-cell-
|
|
289
|
+
.awsui_header-cell-sortable_1spae_geicw_164:not(#\9):not(.awsui_header-cell-disabled_1spae_geicw_282) > .awsui_header-cell-content_1spae_geicw_224:hover, .awsui_header-cell-sortable_1spae_geicw_164:not(#\9):not(.awsui_header-cell-disabled_1spae_geicw_282).awsui_header-cell-sorted_1spae_geicw_282 > .awsui_header-cell-content_1spae_geicw_224 {
|
|
287
290
|
color: var(--color-text-interactive-active-ox3ozh, #000716);
|
|
288
291
|
}
|
|
289
|
-
.awsui_header-cell-
|
|
292
|
+
.awsui_header-cell-sortable_1spae_geicw_164:not(#\9):not(.awsui_header-cell-disabled_1spae_geicw_282) > .awsui_header-cell-content_1spae_geicw_224:hover > .awsui_sorting-icon_1spae_geicw_210, .awsui_header-cell-sortable_1spae_geicw_164:not(#\9):not(.awsui_header-cell-disabled_1spae_geicw_282).awsui_header-cell-sorted_1spae_geicw_282 > .awsui_header-cell-content_1spae_geicw_224 > .awsui_sorting-icon_1spae_geicw_210 {
|
|
290
293
|
color: var(--color-text-interactive-active-ox3ozh, #000716);
|
|
291
294
|
}
|
|
292
295
|
|
|
293
|
-
.awsui_header-cell-
|
|
296
|
+
.awsui_header-cell-text_1spae_geicw_296:not(#\9) {
|
|
294
297
|
line-height: var(--line-height-heading-xs-aeleja, 18px);
|
|
295
298
|
padding-block: calc(var(--space-xxxs-zbmxqb, 2px) / 2);
|
|
296
299
|
}
|
|
297
|
-
.awsui_header-cell-
|
|
300
|
+
.awsui_header-cell-text_1spae_geicw_296:not(#\9):not(.awsui_header-cell-text-wrap_1spae_geicw_300) {
|
|
298
301
|
white-space: nowrap;
|
|
299
302
|
overflow: hidden;
|
|
300
303
|
text-overflow: ellipsis;
|
|
301
304
|
}
|
|
302
305
|
|
|
303
|
-
.awsui_header-cell-
|
|
304
|
-
.awsui_header-cell-
|
|
306
|
+
.awsui_header-cell-ascending_1spae_geicw_306:not(#\9),
|
|
307
|
+
.awsui_header-cell-descending_1spae_geicw_307:not(#\9) {
|
|
305
308
|
/* used in test-utils */
|
|
306
309
|
}
|
|
307
310
|
|
|
@@ -311,28 +314,28 @@ with the left edge of the table as closely as possible. If the
|
|
|
311
314
|
last header cell is sortable the sort icon should align with the
|
|
312
315
|
settings icon in the pagination slot.
|
|
313
316
|
*/
|
|
314
|
-
.awsui_header-
|
|
317
|
+
.awsui_header-cell_1spae_geicw_97:not(#\9):not(.awsui_is-visual-refresh_1spae_geicw_317):first-child {
|
|
315
318
|
padding-inline-start: var(--space-xs-zb16t3, 8px);
|
|
316
319
|
}
|
|
317
|
-
.awsui_header-
|
|
320
|
+
.awsui_header-cell_1spae_geicw_97:not(#\9):not(.awsui_is-visual-refresh_1spae_geicw_317):first-child.awsui_header-cell-content-expandable_1spae_geicw_230 {
|
|
318
321
|
padding-inline-start: calc(var(--space-xs-zb16t3, 8px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
319
322
|
}
|
|
320
323
|
|
|
321
|
-
.awsui_header-
|
|
324
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9) {
|
|
322
325
|
/*
|
|
323
326
|
Striped rows requires additional left padding because the
|
|
324
327
|
shaded background makes the child content appear too close
|
|
325
328
|
to the table edge.
|
|
326
329
|
*/
|
|
327
330
|
}
|
|
328
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
331
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:focus {
|
|
329
332
|
position: relative;
|
|
330
333
|
}
|
|
331
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
334
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:focus {
|
|
332
335
|
outline: 2px dotted transparent;
|
|
333
336
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
334
337
|
}
|
|
335
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
338
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:focus::before {
|
|
336
339
|
content: " ";
|
|
337
340
|
display: block;
|
|
338
341
|
position: absolute;
|
|
@@ -346,14 +349,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_is-v
|
|
|
346
349
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
347
350
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
348
351
|
}
|
|
349
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
352
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_geicw_131 {
|
|
350
353
|
position: relative;
|
|
351
354
|
}
|
|
352
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
355
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_geicw_131 {
|
|
353
356
|
outline: 2px dotted transparent;
|
|
354
357
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
355
358
|
}
|
|
356
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
359
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_geicw_131::before {
|
|
357
360
|
content: " ";
|
|
358
361
|
display: block;
|
|
359
362
|
position: absolute;
|
|
@@ -367,20 +370,20 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_is-v
|
|
|
367
370
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
368
371
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
369
372
|
}
|
|
370
|
-
.awsui_header-
|
|
373
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224 {
|
|
371
374
|
padding-inline-start: 0px;
|
|
372
375
|
}
|
|
373
|
-
.awsui_header-
|
|
376
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-content-expandable_1spae_geicw_230 {
|
|
374
377
|
padding-inline-start: calc(0px + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
375
378
|
}
|
|
376
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
379
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224:focus {
|
|
377
380
|
position: relative;
|
|
378
381
|
}
|
|
379
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
382
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224:focus {
|
|
380
383
|
outline: 2px dotted transparent;
|
|
381
384
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
382
385
|
}
|
|
383
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
386
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224:focus::before {
|
|
384
387
|
content: " ";
|
|
385
388
|
display: block;
|
|
386
389
|
position: absolute;
|
|
@@ -394,14 +397,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_is-v
|
|
|
394
397
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
395
398
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
396
399
|
}
|
|
397
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
400
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131 {
|
|
398
401
|
position: relative;
|
|
399
402
|
}
|
|
400
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
403
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131 {
|
|
401
404
|
outline: 2px dotted transparent;
|
|
402
405
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
403
406
|
}
|
|
404
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
407
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child > .awsui_header-cell-content_1spae_geicw_224.awsui_header-cell-fake-focus_1spae_geicw_131::before {
|
|
405
408
|
content: " ";
|
|
406
409
|
display: block;
|
|
407
410
|
position: absolute;
|
|
@@ -415,24 +418,24 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_ga51i_97.awsui_is-v
|
|
|
415
418
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
416
419
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
417
420
|
}
|
|
418
|
-
.awsui_header-
|
|
421
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_geicw_421) {
|
|
419
422
|
padding-inline-start: var(--space-xxxs-zbmxqb, 2px);
|
|
420
423
|
}
|
|
421
|
-
.awsui_header-
|
|
424
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_geicw_421).awsui_header-cell-content-expandable_1spae_geicw_230 {
|
|
422
425
|
padding-inline-start: calc(var(--space-xxxs-zbmxqb, 2px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
423
426
|
}
|
|
424
|
-
.awsui_header-
|
|
427
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_geicw_421).awsui_sticky-cell-pad-inline-start_1spae_geicw_427 {
|
|
425
428
|
padding-inline-start: var(--space-table-horizontal-8davlm, 20px);
|
|
426
429
|
}
|
|
427
|
-
.awsui_header-
|
|
430
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_geicw_421).awsui_sticky-cell-pad-inline-start_1spae_geicw_427.awsui_header-cell-content-expandable_1spae_geicw_230 {
|
|
428
431
|
padding-inline-start: calc(var(--space-table-horizontal-8davlm, 20px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
429
432
|
}
|
|
430
|
-
.awsui_header-
|
|
433
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child.awsui_has-striped-rows_1spae_geicw_421 {
|
|
431
434
|
padding-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
432
435
|
}
|
|
433
|
-
.awsui_header-
|
|
436
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):first-child.awsui_has-striped-rows_1spae_geicw_421.awsui_header-cell-content-expandable_1spae_geicw_230 {
|
|
434
437
|
padding-inline-start: calc(var(--space-xxs-p8yyaw, 4px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
435
438
|
}
|
|
436
|
-
.awsui_header-
|
|
439
|
+
.awsui_header-cell_1spae_geicw_97.awsui_is-visual-refresh_1spae_geicw_317:not(#\9):last-child.awsui_header-cell-sortable_1spae_geicw_164 {
|
|
437
440
|
padding-inline-end: var(--space-xxxs-zbmxqb, 2px);
|
|
438
441
|
}
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"header-cell": "awsui_header-
|
|
6
|
-
"header-cell-fake-focus": "awsui_header-cell-fake-
|
|
7
|
-
"header-cell-sticky": "awsui_header-cell-
|
|
8
|
-
"header-cell-stuck": "awsui_header-cell-
|
|
9
|
-
"header-cell-variant-full-page": "awsui_header-cell-variant-full-
|
|
10
|
-
"header-cell-hidden": "awsui_header-cell-
|
|
11
|
-
"header-cell-sortable": "awsui_header-cell-
|
|
12
|
-
"sticky-cell": "awsui_sticky-
|
|
13
|
-
"sticky-cell-pad-left": "awsui_sticky-cell-pad-
|
|
14
|
-
"has-selection": "awsui_has-
|
|
15
|
-
"sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-
|
|
16
|
-
"resize-divider": "awsui_resize-
|
|
17
|
-
"sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-
|
|
18
|
-
"sorting-icon": "awsui_sorting-
|
|
19
|
-
"edit-icon": "awsui_edit-
|
|
20
|
-
"header-cell-content": "awsui_header-cell-
|
|
21
|
-
"header-cell-content-expandable": "awsui_header-cell-content-
|
|
22
|
-
"header-cell-disabled": "awsui_header-cell-
|
|
23
|
-
"header-cell-sorted": "awsui_header-cell-
|
|
24
|
-
"header-cell-text": "awsui_header-cell-
|
|
25
|
-
"header-cell-text-wrap": "awsui_header-cell-text-
|
|
26
|
-
"header-cell-ascending": "awsui_header-cell-
|
|
27
|
-
"header-cell-descending": "awsui_header-cell-
|
|
28
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
29
|
-
"has-striped-rows": "awsui_has-striped-
|
|
30
|
-
"sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-
|
|
5
|
+
"header-cell": "awsui_header-cell_1spae_geicw_97",
|
|
6
|
+
"header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_geicw_131",
|
|
7
|
+
"header-cell-sticky": "awsui_header-cell-sticky_1spae_geicw_152",
|
|
8
|
+
"header-cell-stuck": "awsui_header-cell-stuck_1spae_geicw_155",
|
|
9
|
+
"header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_geicw_155",
|
|
10
|
+
"header-cell-hidden": "awsui_header-cell-hidden_1spae_geicw_161",
|
|
11
|
+
"header-cell-sortable": "awsui_header-cell-sortable_1spae_geicw_164",
|
|
12
|
+
"sticky-cell": "awsui_sticky-cell_1spae_geicw_167",
|
|
13
|
+
"sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_geicw_175",
|
|
14
|
+
"has-selection": "awsui_has-selection_1spae_geicw_175",
|
|
15
|
+
"sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-start_1spae_geicw_178",
|
|
16
|
+
"resize-divider": "awsui_resize-divider_1spae_geicw_183",
|
|
17
|
+
"sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-end_1spae_geicw_190",
|
|
18
|
+
"sorting-icon": "awsui_sorting-icon_1spae_geicw_210",
|
|
19
|
+
"edit-icon": "awsui_edit-icon_1spae_geicw_218",
|
|
20
|
+
"header-cell-content": "awsui_header-cell-content_1spae_geicw_224",
|
|
21
|
+
"header-cell-content-expandable": "awsui_header-cell-content-expandable_1spae_geicw_230",
|
|
22
|
+
"header-cell-disabled": "awsui_header-cell-disabled_1spae_geicw_282",
|
|
23
|
+
"header-cell-sorted": "awsui_header-cell-sorted_1spae_geicw_282",
|
|
24
|
+
"header-cell-text": "awsui_header-cell-text_1spae_geicw_296",
|
|
25
|
+
"header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_geicw_300",
|
|
26
|
+
"header-cell-ascending": "awsui_header-cell-ascending_1spae_geicw_306",
|
|
27
|
+
"header-cell-descending": "awsui_header-cell-descending_1spae_geicw_307",
|
|
28
|
+
"is-visual-refresh": "awsui_is-visual-refresh_1spae_geicw_317",
|
|
29
|
+
"has-striped-rows": "awsui_has-striped-rows_1spae_geicw_421",
|
|
30
|
+
"sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-start_1spae_geicw_427"
|
|
31
31
|
};
|
|
32
32
|
|
package/table/interfaces.d.ts
CHANGED
|
@@ -252,8 +252,7 @@ export interface TableProps<T = any> extends BaseComponentProps {
|
|
|
252
252
|
* **Deprecated**, replaced by `borderless` and `container`.
|
|
253
253
|
* * `stacked` - Use this variant adjacent to other stacked containers (such as a container,
|
|
254
254
|
* table).
|
|
255
|
-
* * `full-page` – Use this variant when the table is the entire content of a page.
|
|
256
|
-
* implement the high contrast header and content behavior automatically.
|
|
255
|
+
* * `full-page` – Use this variant when the table is the entire content of a page.
|
|
257
256
|
* @visualrefresh `embedded`, `stacked`, and `full-page` variants
|
|
258
257
|
*/
|
|
259
258
|
variant?: TableProps.Variant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;AAYpE,MAAM,WAAW,mBAAmB;IAClC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;KAAE,GAAG,GAAG,CAAC,OAAO,CAAC;CAC9E;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,kBAAkB;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB;;;OAGG;IACH,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;I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AM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd"}
|
package/table/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler, CancelableEventHandler } from '../internal/events';\nimport { Optional } from '../internal/types';\nimport ColumnDisplayProperties = TableProps.ColumnDisplayProperties;\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface TableForwardRefType {\n <T>(props: TableProps<T> & { ref?: React.Ref<TableProps.Ref> }): JSX.Element;\n}\n\nexport interface TableProps<T = any> extends BaseComponentProps {\n /**\n * Heading element of the table container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Footer of the table container.\n */\n footer?: React.ReactNode;\n\n /**\n * Displayed when the `items` property is an empty array. Use it to render an empty or no-match state.\n */\n empty?: React.ReactNode;\n\n /**\n * Specifies the data that's displayed in the table rows. Each item contains the data for one row. The display of a row is handled\n * by the `cell` property of each column definition in the `columnDefinitions` property.\n */\n items: ReadonlyArray<T>;\n\n /**\n * Renders the table in a loading state. We recommend that you also set a `loadingText`.\n */\n loading?: boolean;\n\n /**\n * Specifies the text that's displayed when the table is in a loading state.\n */\n loadingText?: string;\n\n /**\n * Specifies a property that uniquely identifies an individual item.\n * When it's set, it's used to provide [keys for React](https://reactjs.org/docs/lists-and-keys.html#keys)\n * for performance optimizations.\n *\n * It's also used to connect `items` and `selectedItems` or `expandableRows.expandedItems` values when they reference different objects.\n */\n trackBy?: TableProps.TrackBy<T>;\n\n /**\n * The columns configuration object\n * * `id` (string) - Specifies a unique column identifier. The property is used 1) as a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering,\n * and 2) to match entries in the `columnDisplay` property, if defined.\n * * `header` (ReactNode) - Determines the display of the column header.\n * * `cell` ((item) => ReactNode) - Determines the display of a cell's content. You receive the current table row\n * item as an argument.\n * * `width` (string | number) - Specifies the column width. Corresponds to the `width` css-property. If the width is not set,\n * the browser automatically adjusts the column width based on the content. When `resizableColumns` property is\n * set to `true`, additional constraints apply: 1) string values are not allowed, and 2) the last visible column always\n * fills the remaining space of the table so the specified width is ignored.\n * * `minWidth` (string | number) - Specifies the minimum column width. Corresponds to the `min-width` css-property. When\n * `resizableColumns` property is set to `true`, additional constraints apply: 1) string values are not allowed,\n * and 2) the column can't resize below than the specified width (defaults to \"120px\"). We recommend that you set a minimum width\n * of at least 176px for columns that are editable.\n * * `maxWidth` (string | number) - Specifies the maximum column width. Corresponds to the `max-width` css-property.\n * Note that when the `resizableColumns` property is set to `true` this property is ignored.\n * * `ariaLabel` (LabelData => string) - An optional function that's called to provide an `aria-label` for the cell header.\n * It receives the current sorting state of this column, the direction it's sorted in, and an indication of\n * whether the sorting is disabled, as three Boolean values: `sorted`, `descending` and `disabled`.\n * We recommend that you use this for sortable columns to provide more meaningful labels based on the\n * current sorting direction.\n * * `sortingField` (string) - Enables default column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. Provide the name of the property within each item that should be used for sorting by this column.\n * For more complex sorting use `sortingComparator` instead.\n * * `sortingComparator` ((T, T) => number) - Enables custom column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. This property accepts a custom comparator that is used to compare two items.\n * The comparator must implement ascending ordering, and the output is inverted automatically in case of descending order.\n * If present, the `sortingField` property is ignored.\n * * `editConfig` (EditConfig) - Enables inline editing in column when present. The value is used to configure the editing behavior.\n * * `editConfig.ariaLabel` (string) - Specifies a label for the edit control. Visually hidden but read by screen readers.\n * * `editConfig.errorIconAriaLabel` (string) - Specifies an ariaLabel for the error icon that is displayed when the validation fails.\n * * `editConfig.editIconAriaLabel` (string) - Specifies an alternate text for the edit icon used in column header.\n * * `editConfig.constraintText` (string) - Constraint text that is displayed below the edit control.\n * * `editConfig.disabledReason` ((item) => string | undefined) - A function that determines whether inline edit for certain items is disabled, and provides a reason why.\n * Return a string from the function to disable inline edit with a reason. Return `undefined` (or no return) from the function allow inline edit.\n * * `editConfig.validation` ((item, value) => string) - A function that allows you to validate the value of the edit control.\n * Return a string from the function to display an error message. Return `undefined` (or no return) from the function to indicate that the value is valid.\n * * `editConfig.editingCell` ((item, cellContext) => ReactNode) - Determines the display of a cell's content when inline editing is active on a cell;\n * You receive the current table row `item` and a `cellContext` object as arguments.\n * The `cellContext` object contains the following properties:\n * * `cellContext.currentValue` - State to keep track of a value in input fields while editing.\n * * `cellContext.setValue` - Function to update `currentValue`. This should be called when the value in input field changes.\n * * `isRowHeader` (boolean) - Specifies that cells in this column should be used as row headers.\n */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\n /**\n * Specifies the selection type (`'single' | 'multi'`).\n */\n selectionType?: TableProps.SelectionType;\n /**\n * List of selected items.\n */\n selectedItems?: ReadonlyArray<T>;\n\n /**\n * Use this slot to add filtering controls to the table.\n */\n filter?: React.ReactNode;\n\n /**\n * Use this slot to add the [pagination component](/components/pagination/) to the table.\n */\n pagination?: React.ReactNode;\n\n /**\n * Use this slot to add [collection preferences](/components/collection-preferences/) to the table.\n */\n preferences?: React.ReactNode;\n\n /**\n * Determines whether a given item is disabled. If an item is disabled, the user can't select it.\n */\n isItemDisabled?: TableProps.IsItemDisabled<T>;\n\n /**\n * Specifies if text wraps within table cells. If set to `true`, long text within cells may wrap onto\n * multiple lines instead of being truncated with an ellipsis.\n */\n wrapLines?: boolean;\n\n /**\n * Specifies if table rows alternate being shaded and unshaded. If set to `true`, every other row will be shaded.\n */\n stripedRows?: boolean;\n\n /**\n * Toggles the content density of the table. Defaults to `'comfortable'`.\n */\n contentDensity?: 'comfortable' | 'compact';\n\n /**\n * Specifies if columns can be resized. If set to `true`, users can resize the columns in the table.\n */\n resizableColumns?: boolean;\n\n /**\n * Specifies alternative text for the selection components (checkboxes and radio buttons) as follows:\n * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for an item.\n * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.\n * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.\n * It is prefixed to `itemSelectionLabel` and `allItemsSelectionLabel` when they are set.\n * You can use the first argument of type `SelectionState` to access the current selection\n * state of the component (for example, the `selectedItems` list). The `itemSelectionLabel` for individual\n * items also receives the corresponding `Item` object. You can use the `selectionGroupLabel` to\n * add a meaningful description to the whole selection.\n * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string\n * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.\n * * `resizerRoleDescription` (string) - Provides role description for table column resizer buttons.\n * * `activateEditLabel` (EditableColumnDefinition, Item) => string -\n * Specifies an alternative text for the edit button in editable cells.\n * * `cancelEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the cancel button in editable cells.\n * * `submitEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the submit button in editable cells.\n * * `successfulEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the success icon in editable cells. This text is also announced to screen readers.\n * * `submittingEditText` (EditableColumnDefinition) => string -\n * Specifies a text that is announced to screen readers when a cell edit operation is submitted.\n * * `expandButtonLabel` (Item) => string - Specifies an alternative text for row expand button.\n * * `collapseButtonLabel` (Item) => string - Specifies an alternative text for row collapse button.\n * @i18n\n */\n ariaLabels?: TableProps.AriaLabels<T>;\n\n /**\n * Specifies the definition object of the currently sorted column. Make sure you pass an object that's\n * present in the `columnDefinitions` array.\n */\n sortingColumn?: TableProps.SortingColumn<T>;\n /**\n * Specifies whether to use a descending sort order.\n */\n sortingDescending?: boolean;\n /**\n * Specifies if sorting buttons are disabled. For example, use this property\n * to prevent the user from sorting before items are fully loaded.\n */\n sortingDisabled?: boolean;\n\n /**\n * Specifies the number of first and/or last columns that should be sticky.\n *\n * If the available scrollable space is less than a certain threshold, the feature is deactivated.\n *\n * Use it in conjunction with the sticky columns preference of the\n * [collection preferences](/components/collection-preferences/) component.\n *\n */\n stickyColumns?: TableProps.StickyColumns;\n\n /**\n * Specifies an array that represents the table columns in the order in which they will be displayed, together with their visibility.\n *\n * If not set, all columns are displayed and the order is dictated by the `columnDefinitions` property.\n *\n * Use it in conjunction with the content display preference of the [collection preferences](/components/collection-preferences/) component.\n */\n columnDisplay?: ReadonlyArray<ColumnDisplayProperties>;\n\n /**\n * Specifies an array containing the `id`s of visible columns. If not set, all columns are displayed.\n *\n * Use it in conjunction with the visible content preference of the [collection preferences](/components/collection-preferences/) component.\n *\n * The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property.\n *\n * @deprecated Replaced by `columnDisplay`.\n */\n visibleColumns?: ReadonlyArray<string>;\n\n /**\n * Fired when the user resizes a table column. The event detail contains an array of column widths in pixels,\n * including the hidden via preferences columns. Use this event to persist the column widths.\n */\n onColumnWidthsChange?: NonCancelableEventHandler<TableProps.ColumnWidthsChangeDetail>;\n\n /**\n * Called when either the column to sort by or the direction of sorting changes upon user interaction.\n * The event detail contains the current sortingColumn and isDescending.\n */\n onSortingChange?: NonCancelableEventHandler<TableProps.SortingState<T>>;\n\n /**\n * Fired when a user interaction triggers a change in the list of selected items.\n * The event `detail` contains the current list of `selectedItems`.\n */\n onSelectionChange?: NonCancelableEventHandler<TableProps.SelectionChangeDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row. The event detail contains the index of the\n * clicked row and the row object itself. Use this event to define a row click behavior.\n */\n onRowClick?: NonCancelableEventHandler<TableProps.OnRowClickDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row with the right mouse click. The event detail\n * contains the index of the clicked row and the row object itself. Use this event to override\n * the default browser context menu behavior.\n */\n onRowContextMenu?: CancelableEventHandler<TableProps.OnRowContextMenuDetail<T>>;\n\n /**\n * If set to `true`, the table header remains visible when the user scrolls down.\n *\n * Do not use `stickyHeader` conditionally. Instead, keep its value constant during the component lifecycle.\n */\n stickyHeader?: boolean;\n\n /**\n * Specifies a vertical offset (in pixels) for the sticky header. For example, use this if you\n * need to position the sticky header below other fixed position elements on the page.\n */\n stickyHeaderVerticalOffset?: number;\n\n /**\n * Specify a table variant with one of the following:\n * * `container` - Use this variant to have the table displayed within a container.\n * * `borderless` - Use this variant when the table should have no outer borders or shadow\n * (such as in a dashboard item container).\n * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\n * **Deprecated**, replaced by `borderless` and `container`.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * * `full-page` – Use this variant when the table is the entire content of a page. Full page variants\n * implement the high contrast header and content behavior automatically.\n * @visualrefresh `embedded`, `stacked`, and `full-page` variants\n */\n variant?: TableProps.Variant;\n\n /**\n * Use this property to inform screen readers how many items there are in a table.\n * It specifies the total count of all items in a table.\n * If there is an unknown total of items in a table, leave this property undefined.\n */\n totalItemsCount?: number;\n /**\n * Use this property to inform screen readers which range of items is currently displayed in the table.\n * It specifies the index (1-based) of the first item in the table.\n */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * The function argument takes the following properties:\n * * `firstIndex` (number) - The provided `firstIndex` property which defaults to 1 when not defined.\n * * `lastIndex` (number) - The index of the last visible item of the table.\n * * `visibleItemsCount` (number) - The number of rendered table items.\n * * `totalItemsCount` (optional, number) - The provided `totalItemsCount` property.\n * Important: in tables with expandable rows the `firstIndex`, `lastIndex`, and `totalItemsCount` reflect the top-level items only.\n */\n renderAriaLive?: (data: TableProps.LiveAnnouncement) => string;\n /**\n * Specifies a function that will be called after user submits an inline edit.\n * Return a promise to keep loading state while the submit request is in progress.\n */\n submitEdit?: TableProps.SubmitEditFunction<T>;\n\n /**\n * Called whenever user cancels an inline edit. Use this function to reset any\n * validation states, or show warning for unsaved changes.\n */\n onEditCancel?: CancelableEventHandler;\n\n /**\n * Use this property to activate advanced keyboard navigation and focusing behaviors.\n * When set to `true`, table cells become navigable with arrow keys, and the entire table has a single tab stop.\n *\n * By default, the keyboard navigation is active for tables with expandable rows.\n */\n enableKeyboardNavigation?: boolean;\n\n /**\n * Use this property to define expandable table rows. The expandableRows configuration object consists of:\n * * `getItemChildren` ((Item) => Item[]) - Use it to define nested data that are shown when an item gets expanded.\n * * `isItemExpandable` ((Item) => boolean) - Use it for items that can be expanded to show nested data.\n * * `expandedItems` (Item[]) - Use it to represent the expanded state of items.\n * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<T>) - Called when an item's expand toggle is clicked.\n */\n expandableRows?: TableProps.ExpandableRows<T>;\n\n /**\n * A function that specifies the current status of loading more items. It is called once for the entire\n * table with `item=null` and then for each expanded item. The function result is one of the four possible states:\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that loading has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch.\n **/\n getLoadingStatus?: TableProps.GetLoadingStatus<T>;\n /**\n * Defines loader properties for pending state.\n */\n renderLoaderPending?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Defines loader properties for loading state.\n */\n renderLoaderLoading?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Defines loader properties for error state.\n */\n renderLoaderError?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n}\n\nexport namespace TableProps {\n export type TrackBy<T> = string | ((item: T) => string);\n\n export interface CellContext<V> {\n currentValue: Optional<V>;\n setValue: (value: V | undefined) => void;\n }\n\n export interface EditConfig<T, V = any> {\n /**\n * Specifies a label for the edit control. Visually hidden but read\n * by screen readers.\n */\n ariaLabel?: string;\n /**\n * Specifies an ariaLabel for the error icon that is displayed when\n * the validation fails.\n */\n errorIconAriaLabel?: string;\n /**\n * Specifies an alternate text for the edit icon used in column header.\n */\n editIconAriaLabel?: string;\n /**\n * Constraint text that is displayed below the edit control.\n */\n constraintText?: string;\n /**\n * A function that allows you to validate the value of the edit control. Return\n * a string from the function to display an error message. Return\n * `undefined` (or no return) from the function to indicate that the value is valid.\n * @param item - The item that is being edited.\n * @param value - The current value of the edit control.\n */\n validation?: (item: T, value: Optional<V>) => Optional<string>;\n\n /**\n * Determines the display of a cell's content when inline edit is active.\n */\n editingCell(item: T, ctx: TableProps.CellContext<any>): React.ReactNode;\n\n /**\n * Determines whether inline edit for certain items is disabled, and provides a reason why.\n */\n disabledReason?: (item: T) => string | undefined;\n }\n\n export type ColumnDefinition<ItemType> = {\n id?: string;\n header: React.ReactNode;\n ariaLabel?(data: LabelData): string;\n width?: number | string;\n minWidth?: number | string;\n maxWidth?: number | string;\n editConfig?: EditConfig<ItemType>;\n isRowHeader?: boolean;\n cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | 'borderless' | 'stacked' | 'full-page';\n export interface SelectionState<T> {\n selectedItems: ReadonlyArray<T>;\n }\n export interface SelectionChangeDetail<T> {\n selectedItems: T[];\n }\n export type IsItemDisabled<T> = (item: T) => boolean;\n export interface AriaLabels<T> {\n allItemsSelectionLabel?: (data: TableProps.SelectionState<T>) => string;\n itemSelectionLabel?: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel?: string;\n tableLabel?: string;\n resizerRoleDescription?: string;\n // do not use <T> to prevent overly strict validation on consumer end\n // it works, practically, we are only interested in `id` and `header` properties only\n activateEditLabel?: (column: ColumnDefinition<any>, item: T) => string;\n cancelEditLabel?: (column: ColumnDefinition<any>) => string;\n submitEditLabel?: (column: ColumnDefinition<any>) => string;\n submittingEditText?: (column: ColumnDefinition<any>) => string;\n successfulEditLabel?: (column: ColumnDefinition<any>) => string;\n expandButtonLabel?: (item: T) => string;\n collapseButtonLabel?: (item: T) => string;\n }\n export interface SortingState<T> {\n isDescending?: boolean;\n sortingColumn: SortingColumn<T>;\n }\n export interface SortingColumn<T> {\n sortingField?: string;\n sortingComparator?: (a: T, b: T) => number;\n }\n export interface LabelData {\n sorted: boolean;\n descending: boolean;\n disabled: boolean;\n }\n export interface OnRowClickDetail<T> {\n rowIndex: number;\n item: T;\n }\n export interface OnRowContextMenuDetail<T> {\n rowIndex: number;\n item: T;\n clientX: number;\n clientY: number;\n }\n\n export interface ColumnWidthsChangeDetail {\n widths: ReadonlyArray<number>;\n }\n\n export interface LiveAnnouncement {\n firstIndex: number;\n lastIndex: number;\n visibleItemsCount: number;\n totalItemsCount?: number;\n }\n\n export interface Ref {\n /**\n * When the sticky header is enabled and you call this function, the table\n * scroll parent scrolls to reveal the first row of the table.\n */\n scrollToTop(): void;\n\n /**\n * Dismiss an inline edit if currently active.\n */\n cancelEdit?(): void;\n }\n\n export type SubmitEditFunction<ItemType, ValueType = unknown> = (\n item: ItemType,\n column: ColumnDefinition<ItemType>,\n newValue: ValueType\n ) => Promise<void> | void;\n\n export interface ColumnDisplayProperties {\n id: string;\n visible: boolean;\n }\n\n export interface ExpandableRows<T> {\n getItemChildren: (item: T) => readonly T[];\n isItemExpandable: (item: T) => boolean;\n expandedItems: ReadonlyArray<T>;\n onExpandableItemToggle: TableProps.OnExpandableItemToggle<T>;\n }\n\n export type OnExpandableItemToggle<T> = NonCancelableEventHandler<TableProps.ExpandableItemToggleDetail<T>>;\n\n export interface ExpandableItemToggleDetail<T> {\n item: T;\n expanded: boolean;\n }\n\n export type GetLoadingStatus<T> = (item: null | T) => TableProps.LoadingStatus;\n\n export type LoadingStatus = 'pending' | 'loading' | 'error' | 'finished';\n\n export interface RenderLoaderDetail<T> {\n item: null | T;\n }\n}\n\nexport type TableRow<T> = TableDataRow<T> | TableLoaderRow<T>;\n\nexport interface TableDataRow<T> {\n type: 'data';\n item: T;\n}\n\nexport interface TableLoaderRow<T> {\n type: 'loader';\n item: null | T;\n level: number;\n status: TableProps.LoadingStatus;\n from: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/table/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler, CancelableEventHandler } from '../internal/events';\nimport { Optional } from '../internal/types';\nimport ColumnDisplayProperties = TableProps.ColumnDisplayProperties;\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface TableForwardRefType {\n <T>(props: TableProps<T> & { ref?: React.Ref<TableProps.Ref> }): JSX.Element;\n}\n\nexport interface TableProps<T = any> extends BaseComponentProps {\n /**\n * Heading element of the table container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Footer of the table container.\n */\n footer?: React.ReactNode;\n\n /**\n * Displayed when the `items` property is an empty array. Use it to render an empty or no-match state.\n */\n empty?: React.ReactNode;\n\n /**\n * Specifies the data that's displayed in the table rows. Each item contains the data for one row. The display of a row is handled\n * by the `cell` property of each column definition in the `columnDefinitions` property.\n */\n items: ReadonlyArray<T>;\n\n /**\n * Renders the table in a loading state. We recommend that you also set a `loadingText`.\n */\n loading?: boolean;\n\n /**\n * Specifies the text that's displayed when the table is in a loading state.\n */\n loadingText?: string;\n\n /**\n * Specifies a property that uniquely identifies an individual item.\n * When it's set, it's used to provide [keys for React](https://reactjs.org/docs/lists-and-keys.html#keys)\n * for performance optimizations.\n *\n * It's also used to connect `items` and `selectedItems` or `expandableRows.expandedItems` values when they reference different objects.\n */\n trackBy?: TableProps.TrackBy<T>;\n\n /**\n * The columns configuration object\n * * `id` (string) - Specifies a unique column identifier. The property is used 1) as a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering,\n * and 2) to match entries in the `columnDisplay` property, if defined.\n * * `header` (ReactNode) - Determines the display of the column header.\n * * `cell` ((item) => ReactNode) - Determines the display of a cell's content. You receive the current table row\n * item as an argument.\n * * `width` (string | number) - Specifies the column width. Corresponds to the `width` css-property. If the width is not set,\n * the browser automatically adjusts the column width based on the content. When `resizableColumns` property is\n * set to `true`, additional constraints apply: 1) string values are not allowed, and 2) the last visible column always\n * fills the remaining space of the table so the specified width is ignored.\n * * `minWidth` (string | number) - Specifies the minimum column width. Corresponds to the `min-width` css-property. When\n * `resizableColumns` property is set to `true`, additional constraints apply: 1) string values are not allowed,\n * and 2) the column can't resize below than the specified width (defaults to \"120px\"). We recommend that you set a minimum width\n * of at least 176px for columns that are editable.\n * * `maxWidth` (string | number) - Specifies the maximum column width. Corresponds to the `max-width` css-property.\n * Note that when the `resizableColumns` property is set to `true` this property is ignored.\n * * `ariaLabel` (LabelData => string) - An optional function that's called to provide an `aria-label` for the cell header.\n * It receives the current sorting state of this column, the direction it's sorted in, and an indication of\n * whether the sorting is disabled, as three Boolean values: `sorted`, `descending` and `disabled`.\n * We recommend that you use this for sortable columns to provide more meaningful labels based on the\n * current sorting direction.\n * * `sortingField` (string) - Enables default column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. Provide the name of the property within each item that should be used for sorting by this column.\n * For more complex sorting use `sortingComparator` instead.\n * * `sortingComparator` ((T, T) => number) - Enables custom column sorting. The value is used in [collection hooks](/get-started/dev-guides/collection-hooks/)\n * to reorder the items. This property accepts a custom comparator that is used to compare two items.\n * The comparator must implement ascending ordering, and the output is inverted automatically in case of descending order.\n * If present, the `sortingField` property is ignored.\n * * `editConfig` (EditConfig) - Enables inline editing in column when present. The value is used to configure the editing behavior.\n * * `editConfig.ariaLabel` (string) - Specifies a label for the edit control. Visually hidden but read by screen readers.\n * * `editConfig.errorIconAriaLabel` (string) - Specifies an ariaLabel for the error icon that is displayed when the validation fails.\n * * `editConfig.editIconAriaLabel` (string) - Specifies an alternate text for the edit icon used in column header.\n * * `editConfig.constraintText` (string) - Constraint text that is displayed below the edit control.\n * * `editConfig.disabledReason` ((item) => string | undefined) - A function that determines whether inline edit for certain items is disabled, and provides a reason why.\n * Return a string from the function to disable inline edit with a reason. Return `undefined` (or no return) from the function allow inline edit.\n * * `editConfig.validation` ((item, value) => string) - A function that allows you to validate the value of the edit control.\n * Return a string from the function to display an error message. Return `undefined` (or no return) from the function to indicate that the value is valid.\n * * `editConfig.editingCell` ((item, cellContext) => ReactNode) - Determines the display of a cell's content when inline editing is active on a cell;\n * You receive the current table row `item` and a `cellContext` object as arguments.\n * The `cellContext` object contains the following properties:\n * * `cellContext.currentValue` - State to keep track of a value in input fields while editing.\n * * `cellContext.setValue` - Function to update `currentValue`. This should be called when the value in input field changes.\n * * `isRowHeader` (boolean) - Specifies that cells in this column should be used as row headers.\n */\n columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;\n /**\n * Specifies the selection type (`'single' | 'multi'`).\n */\n selectionType?: TableProps.SelectionType;\n /**\n * List of selected items.\n */\n selectedItems?: ReadonlyArray<T>;\n\n /**\n * Use this slot to add filtering controls to the table.\n */\n filter?: React.ReactNode;\n\n /**\n * Use this slot to add the [pagination component](/components/pagination/) to the table.\n */\n pagination?: React.ReactNode;\n\n /**\n * Use this slot to add [collection preferences](/components/collection-preferences/) to the table.\n */\n preferences?: React.ReactNode;\n\n /**\n * Determines whether a given item is disabled. If an item is disabled, the user can't select it.\n */\n isItemDisabled?: TableProps.IsItemDisabled<T>;\n\n /**\n * Specifies if text wraps within table cells. If set to `true`, long text within cells may wrap onto\n * multiple lines instead of being truncated with an ellipsis.\n */\n wrapLines?: boolean;\n\n /**\n * Specifies if table rows alternate being shaded and unshaded. If set to `true`, every other row will be shaded.\n */\n stripedRows?: boolean;\n\n /**\n * Toggles the content density of the table. Defaults to `'comfortable'`.\n */\n contentDensity?: 'comfortable' | 'compact';\n\n /**\n * Specifies if columns can be resized. If set to `true`, users can resize the columns in the table.\n */\n resizableColumns?: boolean;\n\n /**\n * Specifies alternative text for the selection components (checkboxes and radio buttons) as follows:\n * * `itemSelectionLabel` ((SelectionState, Item) => string) - Specifies the alternative text for an item.\n * * `allItemsSelectionLabel` ((SelectionState) => string) - Specifies the alternative text for multi-selection column header.\n * * `selectionGroupLabel` (string) - Specifies the alternative text for the whole selection and single-selection column header.\n * It is prefixed to `itemSelectionLabel` and `allItemsSelectionLabel` when they are set.\n * You can use the first argument of type `SelectionState` to access the current selection\n * state of the component (for example, the `selectedItems` list). The `itemSelectionLabel` for individual\n * items also receives the corresponding `Item` object. You can use the `selectionGroupLabel` to\n * add a meaningful description to the whole selection.\n * * `tableLabel` (string) - Provides an alternative text for the table. If you use a header for this table, you may reuse the string\n * to provide a caption-like description. For example, tableLabel=Instances will be announced as 'Instances table'.\n * * `resizerRoleDescription` (string) - Provides role description for table column resizer buttons.\n * * `activateEditLabel` (EditableColumnDefinition, Item) => string -\n * Specifies an alternative text for the edit button in editable cells.\n * * `cancelEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the cancel button in editable cells.\n * * `submitEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the submit button in editable cells.\n * * `successfulEditLabel` (EditableColumnDefinition) => string -\n * Specifies an alternative text for the success icon in editable cells. This text is also announced to screen readers.\n * * `submittingEditText` (EditableColumnDefinition) => string -\n * Specifies a text that is announced to screen readers when a cell edit operation is submitted.\n * * `expandButtonLabel` (Item) => string - Specifies an alternative text for row expand button.\n * * `collapseButtonLabel` (Item) => string - Specifies an alternative text for row collapse button.\n * @i18n\n */\n ariaLabels?: TableProps.AriaLabels<T>;\n\n /**\n * Specifies the definition object of the currently sorted column. Make sure you pass an object that's\n * present in the `columnDefinitions` array.\n */\n sortingColumn?: TableProps.SortingColumn<T>;\n /**\n * Specifies whether to use a descending sort order.\n */\n sortingDescending?: boolean;\n /**\n * Specifies if sorting buttons are disabled. For example, use this property\n * to prevent the user from sorting before items are fully loaded.\n */\n sortingDisabled?: boolean;\n\n /**\n * Specifies the number of first and/or last columns that should be sticky.\n *\n * If the available scrollable space is less than a certain threshold, the feature is deactivated.\n *\n * Use it in conjunction with the sticky columns preference of the\n * [collection preferences](/components/collection-preferences/) component.\n *\n */\n stickyColumns?: TableProps.StickyColumns;\n\n /**\n * Specifies an array that represents the table columns in the order in which they will be displayed, together with their visibility.\n *\n * If not set, all columns are displayed and the order is dictated by the `columnDefinitions` property.\n *\n * Use it in conjunction with the content display preference of the [collection preferences](/components/collection-preferences/) component.\n */\n columnDisplay?: ReadonlyArray<ColumnDisplayProperties>;\n\n /**\n * Specifies an array containing the `id`s of visible columns. If not set, all columns are displayed.\n *\n * Use it in conjunction with the visible content preference of the [collection preferences](/components/collection-preferences/) component.\n *\n * The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property.\n *\n * @deprecated Replaced by `columnDisplay`.\n */\n visibleColumns?: ReadonlyArray<string>;\n\n /**\n * Fired when the user resizes a table column. The event detail contains an array of column widths in pixels,\n * including the hidden via preferences columns. Use this event to persist the column widths.\n */\n onColumnWidthsChange?: NonCancelableEventHandler<TableProps.ColumnWidthsChangeDetail>;\n\n /**\n * Called when either the column to sort by or the direction of sorting changes upon user interaction.\n * The event detail contains the current sortingColumn and isDescending.\n */\n onSortingChange?: NonCancelableEventHandler<TableProps.SortingState<T>>;\n\n /**\n * Fired when a user interaction triggers a change in the list of selected items.\n * The event `detail` contains the current list of `selectedItems`.\n */\n onSelectionChange?: NonCancelableEventHandler<TableProps.SelectionChangeDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row. The event detail contains the index of the\n * clicked row and the row object itself. Use this event to define a row click behavior.\n */\n onRowClick?: NonCancelableEventHandler<TableProps.OnRowClickDetail<T>>;\n\n /**\n * Note: This feature is provided for backwards compatibility. Its use is not recommended,\n * and it may be deprecated in the future.\n *\n * Called when the user clicked at a table row with the right mouse click. The event detail\n * contains the index of the clicked row and the row object itself. Use this event to override\n * the default browser context menu behavior.\n */\n onRowContextMenu?: CancelableEventHandler<TableProps.OnRowContextMenuDetail<T>>;\n\n /**\n * If set to `true`, the table header remains visible when the user scrolls down.\n *\n * Do not use `stickyHeader` conditionally. Instead, keep its value constant during the component lifecycle.\n */\n stickyHeader?: boolean;\n\n /**\n * Specifies a vertical offset (in pixels) for the sticky header. For example, use this if you\n * need to position the sticky header below other fixed position elements on the page.\n */\n stickyHeaderVerticalOffset?: number;\n\n /**\n * Specify a table variant with one of the following:\n * * `container` - Use this variant to have the table displayed within a container.\n * * `borderless` - Use this variant when the table should have no outer borders or shadow\n * (such as in a dashboard item container).\n * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\n * **Deprecated**, replaced by `borderless` and `container`.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * * `full-page` – Use this variant when the table is the entire content of a page.\n * @visualrefresh `embedded`, `stacked`, and `full-page` variants\n */\n variant?: TableProps.Variant;\n\n /**\n * Use this property to inform screen readers how many items there are in a table.\n * It specifies the total count of all items in a table.\n * If there is an unknown total of items in a table, leave this property undefined.\n */\n totalItemsCount?: number;\n /**\n * Use this property to inform screen readers which range of items is currently displayed in the table.\n * It specifies the index (1-based) of the first item in the table.\n */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * The function argument takes the following properties:\n * * `firstIndex` (number) - The provided `firstIndex` property which defaults to 1 when not defined.\n * * `lastIndex` (number) - The index of the last visible item of the table.\n * * `visibleItemsCount` (number) - The number of rendered table items.\n * * `totalItemsCount` (optional, number) - The provided `totalItemsCount` property.\n * Important: in tables with expandable rows the `firstIndex`, `lastIndex`, and `totalItemsCount` reflect the top-level items only.\n */\n renderAriaLive?: (data: TableProps.LiveAnnouncement) => string;\n /**\n * Specifies a function that will be called after user submits an inline edit.\n * Return a promise to keep loading state while the submit request is in progress.\n */\n submitEdit?: TableProps.SubmitEditFunction<T>;\n\n /**\n * Called whenever user cancels an inline edit. Use this function to reset any\n * validation states, or show warning for unsaved changes.\n */\n onEditCancel?: CancelableEventHandler;\n\n /**\n * Use this property to activate advanced keyboard navigation and focusing behaviors.\n * When set to `true`, table cells become navigable with arrow keys, and the entire table has a single tab stop.\n *\n * By default, the keyboard navigation is active for tables with expandable rows.\n */\n enableKeyboardNavigation?: boolean;\n\n /**\n * Use this property to define expandable table rows. The expandableRows configuration object consists of:\n * * `getItemChildren` ((Item) => Item[]) - Use it to define nested data that are shown when an item gets expanded.\n * * `isItemExpandable` ((Item) => boolean) - Use it for items that can be expanded to show nested data.\n * * `expandedItems` (Item[]) - Use it to represent the expanded state of items.\n * * `onExpandableItemToggle` (TableProps.OnExpandableItemToggle<T>) - Called when an item's expand toggle is clicked.\n */\n expandableRows?: TableProps.ExpandableRows<T>;\n\n /**\n * A function that specifies the current status of loading more items. It is called once for the entire\n * table with `item=null` and then for each expanded item. The function result is one of the four possible states:\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that loading has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch.\n **/\n getLoadingStatus?: TableProps.GetLoadingStatus<T>;\n /**\n * Defines loader properties for pending state.\n */\n renderLoaderPending?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Defines loader properties for loading state.\n */\n renderLoaderLoading?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n /**\n * Defines loader properties for error state.\n */\n renderLoaderError?: (detail: TableProps.RenderLoaderDetail<T>) => React.ReactNode;\n}\n\nexport namespace TableProps {\n export type TrackBy<T> = string | ((item: T) => string);\n\n export interface CellContext<V> {\n currentValue: Optional<V>;\n setValue: (value: V | undefined) => void;\n }\n\n export interface EditConfig<T, V = any> {\n /**\n * Specifies a label for the edit control. Visually hidden but read\n * by screen readers.\n */\n ariaLabel?: string;\n /**\n * Specifies an ariaLabel for the error icon that is displayed when\n * the validation fails.\n */\n errorIconAriaLabel?: string;\n /**\n * Specifies an alternate text for the edit icon used in column header.\n */\n editIconAriaLabel?: string;\n /**\n * Constraint text that is displayed below the edit control.\n */\n constraintText?: string;\n /**\n * A function that allows you to validate the value of the edit control. Return\n * a string from the function to display an error message. Return\n * `undefined` (or no return) from the function to indicate that the value is valid.\n * @param item - The item that is being edited.\n * @param value - The current value of the edit control.\n */\n validation?: (item: T, value: Optional<V>) => Optional<string>;\n\n /**\n * Determines the display of a cell's content when inline edit is active.\n */\n editingCell(item: T, ctx: TableProps.CellContext<any>): React.ReactNode;\n\n /**\n * Determines whether inline edit for certain items is disabled, and provides a reason why.\n */\n disabledReason?: (item: T) => string | undefined;\n }\n\n export type ColumnDefinition<ItemType> = {\n id?: string;\n header: React.ReactNode;\n ariaLabel?(data: LabelData): string;\n width?: number | string;\n minWidth?: number | string;\n maxWidth?: number | string;\n editConfig?: EditConfig<ItemType>;\n isRowHeader?: boolean;\n cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | 'borderless' | 'stacked' | 'full-page';\n export interface SelectionState<T> {\n selectedItems: ReadonlyArray<T>;\n }\n export interface SelectionChangeDetail<T> {\n selectedItems: T[];\n }\n export type IsItemDisabled<T> = (item: T) => boolean;\n export interface AriaLabels<T> {\n allItemsSelectionLabel?: (data: TableProps.SelectionState<T>) => string;\n itemSelectionLabel?: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel?: string;\n tableLabel?: string;\n resizerRoleDescription?: string;\n // do not use <T> to prevent overly strict validation on consumer end\n // it works, practically, we are only interested in `id` and `header` properties only\n activateEditLabel?: (column: ColumnDefinition<any>, item: T) => string;\n cancelEditLabel?: (column: ColumnDefinition<any>) => string;\n submitEditLabel?: (column: ColumnDefinition<any>) => string;\n submittingEditText?: (column: ColumnDefinition<any>) => string;\n successfulEditLabel?: (column: ColumnDefinition<any>) => string;\n expandButtonLabel?: (item: T) => string;\n collapseButtonLabel?: (item: T) => string;\n }\n export interface SortingState<T> {\n isDescending?: boolean;\n sortingColumn: SortingColumn<T>;\n }\n export interface SortingColumn<T> {\n sortingField?: string;\n sortingComparator?: (a: T, b: T) => number;\n }\n export interface LabelData {\n sorted: boolean;\n descending: boolean;\n disabled: boolean;\n }\n export interface OnRowClickDetail<T> {\n rowIndex: number;\n item: T;\n }\n export interface OnRowContextMenuDetail<T> {\n rowIndex: number;\n item: T;\n clientX: number;\n clientY: number;\n }\n\n export interface ColumnWidthsChangeDetail {\n widths: ReadonlyArray<number>;\n }\n\n export interface LiveAnnouncement {\n firstIndex: number;\n lastIndex: number;\n visibleItemsCount: number;\n totalItemsCount?: number;\n }\n\n export interface Ref {\n /**\n * When the sticky header is enabled and you call this function, the table\n * scroll parent scrolls to reveal the first row of the table.\n */\n scrollToTop(): void;\n\n /**\n * Dismiss an inline edit if currently active.\n */\n cancelEdit?(): void;\n }\n\n export type SubmitEditFunction<ItemType, ValueType = unknown> = (\n item: ItemType,\n column: ColumnDefinition<ItemType>,\n newValue: ValueType\n ) => Promise<void> | void;\n\n export interface ColumnDisplayProperties {\n id: string;\n visible: boolean;\n }\n\n export interface ExpandableRows<T> {\n getItemChildren: (item: T) => readonly T[];\n isItemExpandable: (item: T) => boolean;\n expandedItems: ReadonlyArray<T>;\n onExpandableItemToggle: TableProps.OnExpandableItemToggle<T>;\n }\n\n export type OnExpandableItemToggle<T> = NonCancelableEventHandler<TableProps.ExpandableItemToggleDetail<T>>;\n\n export interface ExpandableItemToggleDetail<T> {\n item: T;\n expanded: boolean;\n }\n\n export type GetLoadingStatus<T> = (item: null | T) => TableProps.LoadingStatus;\n\n export type LoadingStatus = 'pending' | 'loading' | 'error' | 'finished';\n\n export interface RenderLoaderDetail<T> {\n item: null | T;\n }\n}\n\nexport type TableRow<T> = TableDataRow<T> | TableLoaderRow<T>;\n\nexport interface TableDataRow<T> {\n type: 'data';\n item: T;\n}\n\nexport interface TableLoaderRow<T> {\n type: 'loader';\n item: null | T;\n level: number;\n status: TableProps.LoadingStatus;\n from: number;\n}\n"]}
|