@cloudscape-design/components 3.0.262 → 3.0.264
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/THIRD-PARTY-LICENSES +31 -0
- package/autosuggest/options-controller.d.ts +1 -1
- package/autosuggest/options-controller.d.ts.map +1 -1
- package/autosuggest/options-controller.js +22 -23
- package/autosuggest/options-controller.js.map +1 -1
- package/autosuggest/options-list.d.ts.map +1 -1
- package/autosuggest/options-list.js +1 -2
- package/autosuggest/options-list.js.map +1 -1
- package/button/internal.d.ts +0 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +1 -3
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +18 -20
- package/button/styles.scoped.css +136 -298
- package/button/styles.selectors.js +18 -20
- package/collection-preferences/content-display/index.d.ts +9 -0
- package/collection-preferences/content-display/index.d.ts.map +1 -0
- package/collection-preferences/content-display/index.js +55 -0
- package/collection-preferences/content-display/index.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts +3 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.js +9 -0
- package/collection-preferences/content-display/keyboard-sensor/defaults.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts +19 -0
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/index.js +126 -0
- package/collection-preferences/content-display/keyboard-sensor/index.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts +11 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js +14 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts +8 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js +17 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts +30 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js +95 -0
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/collection-preferences/content-display/sortable-item.d.ts +9 -0
- package/collection-preferences/content-display/sortable-item.d.ts.map +1 -0
- package/collection-preferences/content-display/sortable-item.js +52 -0
- package/collection-preferences/content-display/sortable-item.js.map +1 -0
- package/collection-preferences/content-display/styles.css.js +20 -0
- package/collection-preferences/content-display/styles.scoped.css +303 -0
- package/collection-preferences/content-display/styles.selectors.js +21 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts +14 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js +144 -0
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js.map +1 -0
- package/collection-preferences/content-display/use-live-announcements.d.ts +12 -0
- package/collection-preferences/content-display/use-live-announcements.d.ts.map +1 -0
- package/collection-preferences/content-display/use-live-announcements.js +40 -0
- package/collection-preferences/content-display/use-live-announcements.js.map +1 -0
- package/collection-preferences/content-display/utils.d.ts +9 -0
- package/collection-preferences/content-display/utils.d.ts.map +1 -0
- package/collection-preferences/content-display/utils.js +7 -0
- package/collection-preferences/content-display/utils.js.map +1 -0
- package/collection-preferences/index.d.ts +1 -1
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +15 -9
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/interfaces.d.ts +47 -1
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/collection-preferences/styles.css.js +36 -21
- package/collection-preferences/styles.scoped.css +326 -22
- package/collection-preferences/styles.selectors.js +36 -21
- package/collection-preferences/utils.d.ts +1 -1
- package/collection-preferences/utils.d.ts.map +1 -1
- package/collection-preferences/utils.js +20 -9
- package/collection-preferences/utils.js.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +24 -23
- package/expandable-section/styles.scoped.css +66 -44
- package/expandable-section/styles.selectors.js +24 -23
- package/file-upload/file-input/index.d.ts.map +1 -1
- package/file-upload/file-input/index.js +2 -1
- package/file-upload/file-input/index.js.map +1 -1
- package/file-upload/file-input/styles.css.js +4 -3
- package/file-upload/file-input/styles.scoped.css +107 -4
- package/file-upload/file-input/styles.selectors.js +4 -3
- package/internal/components/autosuggest-input/index.js +1 -1
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/options-list/utils/test-indexes.d.ts +1 -1
- package/internal/components/options-list/utils/test-indexes.d.ts.map +1 -1
- package/internal/components/options-list/utils/test-indexes.js.map +1 -1
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +22 -21
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/drag-handle/index.d.ts +9 -0
- package/internal/drag-handle/index.d.ts.map +1 -0
- package/internal/drag-handle/index.js +13 -0
- package/internal/drag-handle/index.js.map +1 -0
- package/internal/drag-handle/styles.css.js +6 -0
- package/internal/drag-handle/styles.scoped.css +13 -0
- package/internal/drag-handle/styles.selectors.js +7 -0
- package/internal/environment.js +1 -1
- package/internal/handle/index.d.ts +3 -0
- package/internal/handle/index.d.ts.map +1 -0
- package/internal/handle/index.js +14 -0
- package/internal/handle/index.js.map +1 -0
- package/internal/handle/styles.css.js +7 -0
- package/internal/handle/styles.scoped.css +125 -0
- package/internal/handle/styles.selectors.js +8 -0
- package/internal/manifest.json +1 -1
- package/package.json +4 -1
- package/table/body-cell/styles.css.js +23 -23
- package/table/body-cell/styles.scoped.css +59 -59
- package/table/body-cell/styles.selectors.js +23 -23
- package/table/interfaces.d.ts +16 -3
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +7 -5
- package/table/internal.js.map +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +3 -6
- package/table/thead.js.map +1 -1
- package/table/utils.d.ts +5 -0
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +23 -0
- package/table/utils.js.map +1 -1
- package/test-utils/dom/collection-preferences/content-display-preference.d.ts +37 -0
- package/test-utils/dom/collection-preferences/content-display-preference.js +62 -0
- package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -0
- package/test-utils/dom/collection-preferences/index.d.ts +2 -0
- package/test-utils/dom/collection-preferences/index.js +4 -0
- package/test-utils/dom/collection-preferences/index.js.map +1 -1
- package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +37 -0
- package/test-utils/selectors/collection-preferences/content-display-preference.js +62 -0
- package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -0
- package/test-utils/selectors/collection-preferences/index.d.ts +2 -0
- package/test-utils/selectors/collection-preferences/index.js +4 -0
- package/test-utils/selectors/collection-preferences/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +5 -4
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.awsui_body-
|
|
93
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9) {
|
|
94
94
|
box-sizing: border-box;
|
|
95
95
|
padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
|
|
96
96
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
@@ -99,19 +99,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
99
99
|
word-wrap: break-word;
|
|
100
100
|
border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
101
101
|
}
|
|
102
|
-
.awsui_body-
|
|
102
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_3yrbc_102) {
|
|
103
103
|
white-space: nowrap;
|
|
104
104
|
overflow: hidden;
|
|
105
105
|
text-overflow: ellipsis;
|
|
106
106
|
}
|
|
107
|
-
.awsui_body-
|
|
107
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child {
|
|
108
108
|
border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
109
109
|
}
|
|
110
|
-
.awsui_body-
|
|
110
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9):last-child {
|
|
111
111
|
border-right: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
112
112
|
padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
113
113
|
}
|
|
114
|
-
.awsui_body-
|
|
114
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child {
|
|
115
115
|
/*
|
|
116
116
|
Striped rows requires additional left padding because the
|
|
117
117
|
shaded background makes the child content appear too close
|
|
@@ -123,85 +123,85 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
123
123
|
that the placeholder border would consume.
|
|
124
124
|
*/
|
|
125
125
|
}
|
|
126
|
-
.awsui_body-
|
|
126
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) {
|
|
127
127
|
padding-left: var(--space-xxxs-k2w98v, 2px);
|
|
128
128
|
}
|
|
129
|
-
.awsui_body-
|
|
129
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129).awsui_body-cell-editable_c6tup_3yrbc_129:hover {
|
|
130
130
|
padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
|
|
131
131
|
}
|
|
132
|
-
.awsui_body-
|
|
132
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_3yrbc_126 {
|
|
133
133
|
padding-left: var(--space-xxs-ynfts5, 4px);
|
|
134
134
|
}
|
|
135
|
-
.awsui_body-
|
|
135
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_3yrbc_135):not(.awsui_body-cell-editable_c6tup_3yrbc_129) {
|
|
136
136
|
border-left: none;
|
|
137
137
|
}
|
|
138
|
-
.awsui_body-
|
|
138
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_3yrbc_114) {
|
|
139
139
|
padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
140
140
|
}
|
|
141
|
-
.awsui_body-cell-first-
|
|
141
|
+
.awsui_body-cell-first-row_c6tup_3yrbc_141:not(#\9) {
|
|
142
142
|
border-top: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
143
143
|
}
|
|
144
|
-
.awsui_body-cell-last-
|
|
144
|
+
.awsui_body-cell-last-row_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144):not(.awsui_has-footer_c6tup_3yrbc_144) {
|
|
145
145
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
146
146
|
}
|
|
147
|
-
.awsui_body-cell-last-
|
|
147
|
+
.awsui_body-cell-last-row_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144).awsui_has-footer_c6tup_3yrbc_144 {
|
|
148
148
|
/*
|
|
149
149
|
Add a bottom border to the body cells of the last row as a separator between the
|
|
150
150
|
table and the footer
|
|
151
151
|
*/
|
|
152
152
|
border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
153
153
|
}
|
|
154
|
-
.awsui_body-cell-
|
|
154
|
+
.awsui_body-cell-shaded_c6tup_3yrbc_154:not(#\9) {
|
|
155
155
|
background: var(--color-background-cell-shaded-26ubfj, #f8f8f8);
|
|
156
156
|
}
|
|
157
|
-
.awsui_body-cell-
|
|
157
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9) {
|
|
158
158
|
background-color: var(--color-background-item-selected-ebt4bi, #f2f8fd);
|
|
159
159
|
border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
160
160
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
161
161
|
padding-bottom: var(--space-scaled-xs-6859qs, 8px);
|
|
162
162
|
}
|
|
163
|
-
.awsui_body-cell-
|
|
163
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):first-child {
|
|
164
164
|
border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
165
165
|
border-radius: var(--border-radius-item-u2ibpi, 8px) 0 0 var(--border-radius-item-u2ibpi, 8px);
|
|
166
166
|
}
|
|
167
|
-
.awsui_body-cell-
|
|
167
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):last-child {
|
|
168
168
|
border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
169
169
|
border-radius: 0 var(--border-radius-item-u2ibpi, 8px) var(--border-radius-item-u2ibpi, 8px) 0;
|
|
170
170
|
}
|
|
171
|
-
.awsui_body-cell-
|
|
171
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):not(:first-child) {
|
|
172
172
|
padding-top: calc(
|
|
173
173
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
174
174
|
);
|
|
175
175
|
}
|
|
176
|
-
.awsui_body-
|
|
176
|
+
.awsui_body-cell_c6tup_3yrbc_93:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144).awsui_body-cell-next-selected_c6tup_3yrbc_176 {
|
|
177
177
|
border-bottom: 0;
|
|
178
178
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
|
|
179
179
|
}
|
|
180
|
-
.awsui_body-cell-
|
|
180
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9) {
|
|
181
181
|
padding-top: calc(
|
|
182
182
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
183
183
|
);
|
|
184
184
|
border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-jgzhnb, #0972d3);
|
|
185
185
|
}
|
|
186
|
-
.awsui_body-cell-
|
|
186
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9) {
|
|
187
187
|
border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
|
|
188
188
|
}
|
|
189
|
-
.awsui_body-cell-
|
|
189
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9):first-child {
|
|
190
190
|
border-bottom-left-radius: 0;
|
|
191
191
|
}
|
|
192
|
-
.awsui_body-cell-
|
|
192
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9):last-child {
|
|
193
193
|
border-bottom-right-radius: 0;
|
|
194
194
|
}
|
|
195
|
-
.awsui_body-cell-
|
|
195
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9):first-child {
|
|
196
196
|
border-top-left-radius: 0;
|
|
197
197
|
}
|
|
198
|
-
.awsui_body-cell-
|
|
198
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9):last-child {
|
|
199
199
|
border-top-right-radius: 0;
|
|
200
200
|
}
|
|
201
|
-
.awsui_body-cell-
|
|
201
|
+
.awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_3yrbc_180) {
|
|
202
202
|
padding-top: var(--space-scaled-xs-6859qs, 8px);
|
|
203
203
|
}
|
|
204
|
-
.awsui_body-cell-
|
|
204
|
+
.awsui_body-cell-success_c6tup_3yrbc_204:not(#\9), .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9) {
|
|
205
205
|
top: 0;
|
|
206
206
|
right: 0;
|
|
207
207
|
bottom: 0;
|
|
@@ -217,62 +217,62 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
217
217
|
padding-right: calc(var(--space-xs-rsr2qu, 8px) + var(--space-xxs-ynfts5, 4px));
|
|
218
218
|
color: var(--color-text-button-normal-default-u8647m, #0972d3);
|
|
219
219
|
}
|
|
220
|
-
.awsui_body-cell-
|
|
220
|
+
.awsui_body-cell-success_c6tup_3yrbc_204:not(#\9):hover, .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9):hover {
|
|
221
221
|
color: var(--color-text-button-normal-hover-kxmvcc, #033160);
|
|
222
222
|
}
|
|
223
|
-
.awsui_body-cell-
|
|
223
|
+
.awsui_body-cell-success_c6tup_3yrbc_204:not(#\9):active, .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9):active {
|
|
224
224
|
color: var(--color-text-button-normal-active-6obrzh, #033160);
|
|
225
225
|
}
|
|
226
|
-
.awsui_body-cell-success-
|
|
226
|
+
.awsui_body-cell-success-form_c6tup_3yrbc_226:not(#\9), .awsui_body-cell-editor-form_c6tup_3yrbc_226:not(#\9) {
|
|
227
227
|
margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
|
|
228
228
|
}
|
|
229
|
-
.awsui_is-visual-
|
|
229
|
+
.awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_3yrbc_126 > .awsui_body-cell-success-form_c6tup_3yrbc_226, .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_3yrbc_126 > .awsui_body-cell-editor-form_c6tup_3yrbc_226 {
|
|
230
230
|
margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
|
|
231
231
|
}
|
|
232
|
-
.awsui_is-visual-
|
|
232
|
+
.awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) > .awsui_body-cell-success-form_c6tup_3yrbc_226, .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) > .awsui_body-cell-editor-form_c6tup_3yrbc_226 {
|
|
233
233
|
margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
|
|
234
234
|
}
|
|
235
|
-
.awsui_body-cell-success-
|
|
235
|
+
.awsui_body-cell-success-row_c6tup_3yrbc_235:not(#\9), .awsui_body-cell-editor-row_c6tup_3yrbc_235:not(#\9) {
|
|
236
236
|
display: flex;
|
|
237
237
|
flex-flow: row nowrap;
|
|
238
238
|
align-items: center;
|
|
239
239
|
justify-content: space-between;
|
|
240
240
|
column-gap: var(--space-xxs-ynfts5, 4px);
|
|
241
241
|
}
|
|
242
|
-
.awsui_body-cell-success-
|
|
242
|
+
.awsui_body-cell-success-row_c6tup_3yrbc_235 > :not(#\9):not(:last-child), .awsui_body-cell-editor-row_c6tup_3yrbc_235 > :not(#\9):not(:last-child) {
|
|
243
243
|
flex-grow: 1;
|
|
244
244
|
}
|
|
245
|
-
.awsui_body-cell-success-
|
|
245
|
+
.awsui_body-cell-success-controls_c6tup_3yrbc_245:not(#\9), .awsui_body-cell-editor-controls_c6tup_3yrbc_245:not(#\9) {
|
|
246
246
|
flex-shrink: 0;
|
|
247
247
|
}
|
|
248
|
-
.awsui_body-
|
|
248
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9) {
|
|
249
249
|
position: relative;
|
|
250
250
|
cursor: pointer;
|
|
251
251
|
}
|
|
252
|
-
.awsui_body-
|
|
252
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129.awsui_body-cell-edit-active_c6tup_3yrbc_129:not(#\9) {
|
|
253
253
|
overflow: visible;
|
|
254
254
|
}
|
|
255
|
-
.awsui_body-
|
|
255
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129) > .awsui_body-cell-editor_c6tup_3yrbc_204 {
|
|
256
256
|
opacity: 0;
|
|
257
257
|
}
|
|
258
|
-
.awsui_body-
|
|
258
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129).awsui_body-cell-has-success_c6tup_3yrbc_258 {
|
|
259
259
|
padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
|
|
260
260
|
}
|
|
261
|
-
.awsui_body-
|
|
261
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within {
|
|
262
262
|
padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
|
|
263
263
|
position: relative;
|
|
264
264
|
}
|
|
265
|
-
.awsui_body-
|
|
265
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within > .awsui_body-cell-editor_c6tup_3yrbc_204 {
|
|
266
266
|
opacity: 1;
|
|
267
267
|
}
|
|
268
|
-
.awsui_body-
|
|
268
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within > .awsui_body-cell-success_c6tup_3yrbc_204 {
|
|
269
269
|
opacity: 0;
|
|
270
270
|
}
|
|
271
|
-
.awsui_body-
|
|
271
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within {
|
|
272
272
|
outline: 2px dotted transparent;
|
|
273
273
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)) - 1px);
|
|
274
274
|
}
|
|
275
|
-
.awsui_body-
|
|
275
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within::before {
|
|
276
276
|
content: " ";
|
|
277
277
|
display: block;
|
|
278
278
|
position: absolute;
|
|
@@ -283,7 +283,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
283
283
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
284
284
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
285
285
|
}
|
|
286
|
-
.awsui_body-
|
|
286
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover {
|
|
287
287
|
position: relative;
|
|
288
288
|
background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
|
|
289
289
|
border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-m3lmsh, #7d8998);
|
|
@@ -291,38 +291,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
291
291
|
right: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
|
|
292
292
|
padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
|
|
293
293
|
}
|
|
294
|
-
.awsui_body-
|
|
294
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-editor_c6tup_3yrbc_204 {
|
|
295
295
|
opacity: 1;
|
|
296
296
|
}
|
|
297
|
-
.awsui_body-
|
|
297
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-success_c6tup_3yrbc_204 {
|
|
298
298
|
opacity: 0;
|
|
299
299
|
}
|
|
300
|
-
.awsui_body-
|
|
300
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:first-child {
|
|
301
301
|
left: 0;
|
|
302
302
|
right: 0;
|
|
303
303
|
}
|
|
304
|
-
.awsui_body-
|
|
304
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-editor_c6tup_3yrbc_204 {
|
|
305
305
|
padding-right: calc(var(--space-xs-rsr2qu, 8px) + var(--space-xxs-ynfts5, 4px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
|
|
306
306
|
}
|
|
307
|
-
.awsui_body-
|
|
307
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-last-row_c6tup_3yrbc_144.awsui_body-cell-selected_c6tup_3yrbc_144, .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-next-selected_c6tup_3yrbc_176 {
|
|
308
308
|
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
309
309
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
310
310
|
}
|
|
311
|
-
.awsui_body-
|
|
311
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-last-row_c6tup_3yrbc_144:not(.awsui_body-cell-selected_c6tup_3yrbc_144) {
|
|
312
312
|
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
313
313
|
}
|
|
314
|
-
.awsui_body-
|
|
314
|
+
.awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-first-row_c6tup_3yrbc_141:not(.awsui_body-cell-selected_c6tup_3yrbc_144) {
|
|
315
315
|
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
316
316
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
317
317
|
}
|
|
318
|
-
.awsui_body-cell-
|
|
319
|
-
border-top-left-radius: var(--border-radius-
|
|
320
|
-
border-bottom-left-radius: var(--border-radius-
|
|
318
|
+
.awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:first-child {
|
|
319
|
+
border-top-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
320
|
+
border-bottom-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
321
321
|
}
|
|
322
|
-
.awsui_body-cell-
|
|
323
|
-
border-top-right-radius: var(--border-radius-
|
|
324
|
-
border-bottom-right-radius: var(--border-radius-
|
|
322
|
+
.awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:last-child {
|
|
323
|
+
border-top-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
324
|
+
border-bottom-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
325
325
|
}
|
|
326
|
-
.awsui_body-cell-
|
|
326
|
+
.awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-first-row_c6tup_3yrbc_141 > .awsui_body-cell-editor_c6tup_3yrbc_204 {
|
|
327
327
|
padding-top: var(--border-divider-list-width-hacikr, 1px);
|
|
328
328
|
}
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"body-cell": "awsui_body-
|
|
6
|
-
"body-cell-wrap": "awsui_body-cell-
|
|
7
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
8
|
-
"has-striped-rows": "awsui_has-striped-
|
|
9
|
-
"body-cell-edit-active": "awsui_body-cell-edit-
|
|
10
|
-
"body-cell-editable": "awsui_body-cell-
|
|
11
|
-
"has-selection": "awsui_has-
|
|
12
|
-
"body-cell-first-row": "awsui_body-cell-first-
|
|
13
|
-
"body-cell-last-row": "awsui_body-cell-last-
|
|
14
|
-
"body-cell-selected": "awsui_body-cell-
|
|
15
|
-
"has-footer": "awsui_has-
|
|
16
|
-
"body-cell-shaded": "awsui_body-cell-
|
|
17
|
-
"body-cell-next-selected": "awsui_body-cell-next-
|
|
18
|
-
"body-cell-prev-selected": "awsui_body-cell-prev-
|
|
19
|
-
"body-cell-success": "awsui_body-cell-
|
|
20
|
-
"body-cell-editor": "awsui_body-cell-
|
|
21
|
-
"body-cell-success-form": "awsui_body-cell-success-
|
|
22
|
-
"body-cell-editor-form": "awsui_body-cell-editor-
|
|
23
|
-
"body-cell-success-row": "awsui_body-cell-success-
|
|
24
|
-
"body-cell-editor-row": "awsui_body-cell-editor-
|
|
25
|
-
"body-cell-success-controls": "awsui_body-cell-success-
|
|
26
|
-
"body-cell-editor-controls": "awsui_body-cell-editor-
|
|
27
|
-
"body-cell-has-success": "awsui_body-cell-has-
|
|
5
|
+
"body-cell": "awsui_body-cell_c6tup_3yrbc_93",
|
|
6
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_3yrbc_102",
|
|
7
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_3yrbc_114",
|
|
8
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_3yrbc_126",
|
|
9
|
+
"body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_3yrbc_129",
|
|
10
|
+
"body-cell-editable": "awsui_body-cell-editable_c6tup_3yrbc_129",
|
|
11
|
+
"has-selection": "awsui_has-selection_c6tup_3yrbc_135",
|
|
12
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_3yrbc_141",
|
|
13
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_3yrbc_144",
|
|
14
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_3yrbc_144",
|
|
15
|
+
"has-footer": "awsui_has-footer_c6tup_3yrbc_144",
|
|
16
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_3yrbc_154",
|
|
17
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_3yrbc_176",
|
|
18
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_3yrbc_180",
|
|
19
|
+
"body-cell-success": "awsui_body-cell-success_c6tup_3yrbc_204",
|
|
20
|
+
"body-cell-editor": "awsui_body-cell-editor_c6tup_3yrbc_204",
|
|
21
|
+
"body-cell-success-form": "awsui_body-cell-success-form_c6tup_3yrbc_226",
|
|
22
|
+
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_3yrbc_226",
|
|
23
|
+
"body-cell-success-row": "awsui_body-cell-success-row_c6tup_3yrbc_235",
|
|
24
|
+
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_3yrbc_235",
|
|
25
|
+
"body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_3yrbc_245",
|
|
26
|
+
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_3yrbc_245",
|
|
27
|
+
"body-cell-has-success": "awsui_body-cell-has-success_c6tup_3yrbc_258"
|
|
28
28
|
};
|
|
29
29
|
|
package/table/interfaces.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BaseComponentProps } from '../internal/base-component';
|
|
3
3
|
import { NonCancelableEventHandler, CancelableEventHandler } from '../internal/events';
|
|
4
4
|
import { Optional } from '../internal/types';
|
|
5
|
+
import ColumnDisplayProperties = TableProps.ColumnDisplayProperties;
|
|
5
6
|
export interface TableForwardRefType {
|
|
6
7
|
<T>(props: TableProps<T> & {
|
|
7
8
|
ref?: React.Ref<TableProps.Ref>;
|
|
@@ -44,7 +45,7 @@ export interface TableProps<T = any> extends BaseComponentProps {
|
|
|
44
45
|
/**
|
|
45
46
|
* The columns configuration object
|
|
46
47
|
* * `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,
|
|
47
|
-
* and 2) to match entries in the `
|
|
48
|
+
* and 2) to match entries in the `columnDisplay` property, if defined.
|
|
48
49
|
* * `header` (ReactNode) - Determines the display of the column header.
|
|
49
50
|
* * `cell` ((item) => ReactNode) - Determines the display of a cell's content. You receive the current table row
|
|
50
51
|
* item as an argument.
|
|
@@ -164,13 +165,21 @@ export interface TableProps<T = any> extends BaseComponentProps {
|
|
|
164
165
|
* to prevent the user from sorting before items are fully loaded.
|
|
165
166
|
*/
|
|
166
167
|
sortingDisabled?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Specifies an array that represents the table columns in the order in which they will be displayed, together with their visibility.
|
|
170
|
+
*
|
|
171
|
+
* If not set, all columns are displayed and the order is dictated by the `columnDefinitions` property.
|
|
172
|
+
*
|
|
173
|
+
* Use it in conjunction with the content display preference of the [collection preferences](/components/collection-preferences/) component.
|
|
174
|
+
*/
|
|
175
|
+
columnDisplay?: ReadonlyArray<ColumnDisplayProperties>;
|
|
167
176
|
/**
|
|
168
177
|
* Specifies an array containing the `id`s of visible columns. If not set, all columns are displayed.
|
|
169
178
|
*
|
|
170
179
|
* Use it in conjunction with the visible content preference of the [collection preferences](/components/collection-preferences/) component.
|
|
171
180
|
*
|
|
172
|
-
* The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property
|
|
173
|
-
*/
|
|
181
|
+
* The order of ids doesn't influence the order in which columns are displayed - this is dictated by the `columnDefinitions` property.
|
|
182
|
+
* */
|
|
174
183
|
visibleColumns?: ReadonlyArray<string>;
|
|
175
184
|
/**
|
|
176
185
|
* Fired when the user resizes a table column. The event detail contains an array of column widths in pixels,
|
|
@@ -362,5 +371,9 @@ export declare namespace TableProps {
|
|
|
362
371
|
cancelEdit?(): void;
|
|
363
372
|
}
|
|
364
373
|
type SubmitEditFunction<ItemType, ValueType = unknown> = (item: ItemType, column: ColumnDefinition<ItemType>, newValue: ValueType) => Promise<void> | void;
|
|
374
|
+
interface ColumnDisplayProperties {
|
|
375
|
+
id: string;
|
|
376
|
+
visible: boolean;
|
|
377
|
+
}
|
|
365
378
|
}
|
|
366
379
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["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;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["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,EA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KACjB;IAED,UAAiB,wBAAwB;QACvC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KAC/B;IAED,UAAiB,gBAAgB;QAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,GAAG;QAClB;;;WAGG;QACH,WAAW,IAAI,IAAI,CAAC;QAEpB;;WAEG;QACH,UAAU,CAAC,IAAI,IAAI,CAAC;KACrB;IAED,KAAY,kBAAkB,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,IAAI,CAC9D,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAClC,QAAQ,EAAE,SAAS,KAChB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE1B,UAAiB,uBAAuB;QACtC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,OAAO,CAAC;KAClB;CACF"}
|
package/table/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["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';\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` 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 `visibleColumns` 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.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 */\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 * * `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 * 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 *\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 */\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 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 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 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 * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\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 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 * If the table has no pagination, leave this property undefined. */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * Requires the properties firstIndex and totalItemsCount to be set correctly.\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\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 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 cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | '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 // 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 }\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 totalItemsCount?: number;\n firstIndex: number;\n lastIndex: 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"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["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` 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.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 */\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 * * `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 * 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 *\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 */\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 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 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 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 * * `embedded` - Use this variant within a parent container (such as a modal, expandable\n * section, container or split panel).\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 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 * If the table has no pagination, leave this property undefined. */\n firstIndex?: number;\n /**\n * Use this function to announce page changes to screen reader users.\n * Requires the properties firstIndex and totalItemsCount to be set correctly.\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\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 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 cell(item: ItemType): React.ReactNode;\n } & SortingColumn<ItemType>;\n\n export type SelectionType = 'single' | 'multi';\n export type Variant = 'container' | 'embedded' | '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 // 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 }\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 totalItemsCount?: number;\n firstIndex: number;\n lastIndex: 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"]}
|
package/table/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AAkC/D,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AAkC/D,QAAA,MAAM,aAAa,qBAgZK,CAAC;AAEzB,eAAe,aAAa,CAAC"}
|
package/table/internal.js
CHANGED
|
@@ -13,7 +13,7 @@ import InternalStatusIndicator from '../status-indicator/internal';
|
|
|
13
13
|
import { useContainerQuery } from '../internal/hooks/container-queries';
|
|
14
14
|
import { supportsStickyPosition } from '../internal/utils/dom';
|
|
15
15
|
import SelectionControl from './selection-control';
|
|
16
|
-
import { checkSortingState, getColumnKey, getItemKey, toContainerVariant } from './utils';
|
|
16
|
+
import { checkSortingState, getColumnKey, getItemKey, getVisibleColumnDefinitions, toContainerVariant } from './utils';
|
|
17
17
|
import { useRowEvents } from './use-row-events';
|
|
18
18
|
import { focusMarkers, useFocusMove, useSelection } from './use-selection';
|
|
19
19
|
import { fireCancelableEvent, fireNonCancelableEvent } from '../internal/events';
|
|
@@ -32,7 +32,7 @@ import LiveRegion from '../internal/components/live-region';
|
|
|
32
32
|
import useTableFocusNavigation from './use-table-focus-navigation';
|
|
33
33
|
import { TableTdElement } from './body-cell/td-element';
|
|
34
34
|
const InternalTable = React.forwardRef((_a, ref) => {
|
|
35
|
-
var { header, footer, empty, filter, pagination, preferences, items, columnDefinitions, trackBy, loading, loadingText, selectionType, selectedItems, isItemDisabled, ariaLabels, onSelectionChange, onSortingChange, sortingColumn, sortingDescending, sortingDisabled, visibleColumns, stickyHeader, stickyHeaderVerticalOffset, onRowClick, onRowContextMenu, wrapLines, stripedRows, contentDensity, submitEdit, onEditCancel, resizableColumns, onColumnWidthsChange, variant, __internalRootRef, totalItemsCount, firstIndex, renderAriaLive } = _a, rest = __rest(_a, ["header", "footer", "empty", "filter", "pagination", "preferences", "items", "columnDefinitions", "trackBy", "loading", "loadingText", "selectionType", "selectedItems", "isItemDisabled", "ariaLabels", "onSelectionChange", "onSortingChange", "sortingColumn", "sortingDescending", "sortingDisabled", "visibleColumns", "stickyHeader", "stickyHeaderVerticalOffset", "onRowClick", "onRowContextMenu", "wrapLines", "stripedRows", "contentDensity", "submitEdit", "onEditCancel", "resizableColumns", "onColumnWidthsChange", "variant", "__internalRootRef", "totalItemsCount", "firstIndex", "renderAriaLive"]);
|
|
35
|
+
var { header, footer, empty, filter, pagination, preferences, items, columnDefinitions, trackBy, loading, loadingText, selectionType, selectedItems, isItemDisabled, ariaLabels, onSelectionChange, onSortingChange, sortingColumn, sortingDescending, sortingDisabled, visibleColumns, stickyHeader, stickyHeaderVerticalOffset, onRowClick, onRowContextMenu, wrapLines, stripedRows, contentDensity, submitEdit, onEditCancel, resizableColumns, onColumnWidthsChange, variant, __internalRootRef, totalItemsCount, firstIndex, renderAriaLive, columnDisplay } = _a, rest = __rest(_a, ["header", "footer", "empty", "filter", "pagination", "preferences", "items", "columnDefinitions", "trackBy", "loading", "loadingText", "selectionType", "selectedItems", "isItemDisabled", "ariaLabels", "onSelectionChange", "onSortingChange", "sortingColumn", "sortingDescending", "sortingDisabled", "visibleColumns", "stickyHeader", "stickyHeaderVerticalOffset", "onRowClick", "onRowContextMenu", "wrapLines", "stripedRows", "contentDensity", "submitEdit", "onEditCancel", "resizableColumns", "onColumnWidthsChange", "variant", "__internalRootRef", "totalItemsCount", "firstIndex", "renderAriaLive", "columnDisplay"]);
|
|
36
36
|
const baseProps = getBaseProps(rest);
|
|
37
37
|
stickyHeader = stickyHeader && supportsStickyPosition();
|
|
38
38
|
const [containerWidth, wrapperMeasureRef] = useContainerQuery(({ width }) => width);
|
|
@@ -58,9 +58,11 @@ const InternalTable = React.forwardRef((_a, ref) => {
|
|
|
58
58
|
const handleScroll = useScrollSync([wrapperRefObject, scrollbarRef, secondaryWrapperRef], !supportsStickyPosition());
|
|
59
59
|
const { moveFocusDown, moveFocusUp, moveFocus } = useFocusMove(selectionType, items.length);
|
|
60
60
|
const { onRowClickHandler, onRowContextMenuHandler } = useRowEvents({ onRowClick, onRowContextMenu });
|
|
61
|
-
const visibleColumnDefinitions =
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
const visibleColumnDefinitions = getVisibleColumnDefinitions({
|
|
62
|
+
columnDefinitions,
|
|
63
|
+
columnDisplay,
|
|
64
|
+
visibleColumns,
|
|
65
|
+
});
|
|
64
66
|
const { isItemSelected, getSelectAllProps, getItemSelectionProps, updateShiftToggle } = useSelection({
|
|
65
67
|
items,
|
|
66
68
|
trackBy,
|