@cloudscape-design/components 3.0.154 → 3.0.156
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/button/internal.d.ts +0 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -2
- package/button/internal.js.map +1 -1
- package/cards/index.d.ts.map +1 -1
- package/cards/index.js +6 -1
- package/cards/index.js.map +1 -1
- package/form-field/interfaces.d.ts +0 -10
- package/form-field/interfaces.d.ts.map +1 -1
- package/form-field/interfaces.js.map +1 -1
- package/form-field/internal.d.ts +1 -1
- package/form-field/internal.d.ts.map +1 -1
- package/form-field/internal.js +4 -5
- package/form-field/internal.js.map +1 -1
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +4 -16
- package/input/internal.js.map +1 -1
- package/internal/context/form-field-context.d.ts +2 -6
- package/internal/context/form-field-context.d.ts.map +1 -1
- package/internal/context/form-field-context.js +1 -7
- package/internal/context/form-field-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/{table → internal/hooks}/use-mouse-down-target.d.ts +0 -0
- package/internal/hooks/use-mouse-down-target.d.ts.map +1 -0
- package/{table → internal/hooks}/use-mouse-down-target.js +1 -1
- package/internal/hooks/use-mouse-down-target.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/internal/types.d.ts +0 -9
- package/internal/types.d.ts.map +1 -1
- package/internal/types.js +2 -0
- package/internal/types.js.map +1 -1
- package/package.json +1 -1
- package/select/parts/styles.css.js +9 -9
- package/select/parts/styles.scoped.css +9 -27
- package/select/parts/styles.selectors.js +9 -9
- package/table/body-cell/index.d.ts +20 -11
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +9 -48
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/styles.css.js +12 -18
- package/table/body-cell/styles.scoped.css +46 -229
- package/table/body-cell/styles.selectors.js +12 -18
- package/table/header-cell/index.d.ts +7 -8
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +2 -6
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +18 -19
- package/table/header-cell/styles.scoped.css +35 -40
- package/table/header-cell/styles.selectors.js +18 -19
- package/table/header-cell/utils.d.ts +1 -1
- package/table/header-cell/utils.d.ts.map +1 -1
- package/table/interfaces.d.ts +10 -85
- 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 +19 -69
- package/table/internal.js.map +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +1 -1
- package/table/thead.js.map +1 -1
- package/table/utils.d.ts +1 -1
- package/table/utils.d.ts.map +1 -1
- package/test-utils/dom/table/index.d.ts +0 -4
- package/test-utils/dom/table/index.js +5 -21
- package/test-utils/dom/table/index.js.map +1 -1
- package/test-utils/selectors/table/index.d.ts +0 -4
- package/test-utils/selectors/table/index.js +5 -21
- package/test-utils/selectors/table/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/table/body-cell/click-away.d.ts +0 -9
- package/table/body-cell/click-away.d.ts.map +0 -1
- package/table/body-cell/click-away.js +0 -38
- package/table/body-cell/click-away.js.map +0 -1
- package/table/body-cell/inline-editor.d.ts +0 -12
- package/table/body-cell/inline-editor.d.ts.map +0 -1
- package/table/body-cell/inline-editor.js +0 -88
- package/table/body-cell/inline-editor.js.map +0 -1
- package/table/body-cell/td-element.d.ts +0 -21
- package/table/body-cell/td-element.d.ts.map +0 -1
- package/table/body-cell/td-element.js +0 -11
- package/table/body-cell/td-element.js.map +0 -1
- package/table/body-cell/use-stable-scroll-position.d.ts +0 -17
- package/table/body-cell/use-stable-scroll-position.d.ts.map +0 -1
- package/table/body-cell/use-stable-scroll-position.js +0 -48
- package/table/body-cell/use-stable-scroll-position.js.map +0 -1
- package/table/use-mouse-down-target.d.ts.map +0 -1
- package/table/use-mouse-down-target.js.map +0 -1
- package/table/use-table-focus-navigation.d.ts +0 -16
- package/table/use-table-focus-navigation.d.ts.map +0 -1
- package/table/use-table-focus-navigation.js +0 -131
- package/table/use-table-focus-navigation.js.map +0 -1
|
@@ -6,91 +6,7 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
-
SPDX-License-Identifier: Apache-2.0
|
|
12
|
-
*/
|
|
13
|
-
/*
|
|
14
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
-
SPDX-License-Identifier: Apache-2.0
|
|
16
|
-
*/
|
|
17
|
-
/*
|
|
18
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
-
SPDX-License-Identifier: Apache-2.0
|
|
20
|
-
*/
|
|
21
|
-
/*
|
|
22
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
-
SPDX-License-Identifier: Apache-2.0
|
|
24
|
-
*/
|
|
25
|
-
/*
|
|
26
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
-
SPDX-License-Identifier: Apache-2.0
|
|
28
|
-
*/
|
|
29
|
-
/*
|
|
30
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
-
SPDX-License-Identifier: Apache-2.0
|
|
32
|
-
*/
|
|
33
|
-
/*
|
|
34
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
-
SPDX-License-Identifier: Apache-2.0
|
|
36
|
-
*/
|
|
37
|
-
/*
|
|
38
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
-
SPDX-License-Identifier: Apache-2.0
|
|
40
|
-
*/
|
|
41
|
-
/*
|
|
42
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
-
SPDX-License-Identifier: Apache-2.0
|
|
44
|
-
*/
|
|
45
|
-
/*
|
|
46
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
-
SPDX-License-Identifier: Apache-2.0
|
|
48
|
-
*/
|
|
49
|
-
/*
|
|
50
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
-
SPDX-License-Identifier: Apache-2.0
|
|
52
|
-
*/
|
|
53
|
-
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
54
|
-
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
55
|
-
/*
|
|
56
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
57
|
-
SPDX-License-Identifier: Apache-2.0
|
|
58
|
-
*/
|
|
59
|
-
/*
|
|
60
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
61
|
-
SPDX-License-Identifier: Apache-2.0
|
|
62
|
-
*/
|
|
63
|
-
/*
|
|
64
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
65
|
-
SPDX-License-Identifier: Apache-2.0
|
|
66
|
-
*/
|
|
67
|
-
/*
|
|
68
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
|
-
SPDX-License-Identifier: Apache-2.0
|
|
70
|
-
*/
|
|
71
|
-
/*
|
|
72
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73
|
-
SPDX-License-Identifier: Apache-2.0
|
|
74
|
-
*/
|
|
75
|
-
/*
|
|
76
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
-
SPDX-License-Identifier: Apache-2.0
|
|
78
|
-
*/
|
|
79
|
-
/*
|
|
80
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
81
|
-
SPDX-License-Identifier: Apache-2.0
|
|
82
|
-
*/
|
|
83
|
-
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
84
|
-
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
85
|
-
/*
|
|
86
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
-
SPDX-License-Identifier: Apache-2.0
|
|
88
|
-
*/
|
|
89
|
-
/*
|
|
90
|
-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
-
SPDX-License-Identifier: Apache-2.0
|
|
92
|
-
*/
|
|
93
|
-
.awsui_body-cell_c6tup_17cg6_93:not(#\9) {
|
|
9
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9) {
|
|
94
10
|
box-sizing: border-box;
|
|
95
11
|
padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
|
|
96
12
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
@@ -99,207 +15,108 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
99
15
|
word-wrap: break-word;
|
|
100
16
|
border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
101
17
|
}
|
|
102
|
-
.awsui_body-
|
|
18
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_body-cell-wrap_c6tup_9o7yk_18) {
|
|
103
19
|
white-space: nowrap;
|
|
104
20
|
overflow: hidden;
|
|
105
21
|
text-overflow: ellipsis;
|
|
106
22
|
}
|
|
107
|
-
.awsui_body-
|
|
23
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9):first-child {
|
|
108
24
|
border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
109
25
|
}
|
|
110
|
-
.awsui_body-
|
|
26
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9):last-child {
|
|
111
27
|
border-right: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
112
28
|
padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
113
29
|
}
|
|
114
|
-
.awsui_body-
|
|
115
|
-
/*
|
|
116
|
-
Striped rows requires additional left padding because the
|
|
117
|
-
shaded background makes the child content appear too close
|
|
118
|
-
to the table edge.
|
|
119
|
-
*/
|
|
120
|
-
/*
|
|
121
|
-
Remove the placeholder border if the row is not selectable.
|
|
122
|
-
Rows that are not selectable will reserve the horizontal space
|
|
123
|
-
that the placeholder border would consume.
|
|
124
|
-
*/
|
|
125
|
-
}
|
|
126
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) {
|
|
127
|
-
padding-left: var(--space-xxxs-k2w98v, 2px);
|
|
128
|
-
}
|
|
129
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126):not(.awsui_body-cell-edit-active_c6tup_17cg6_129).awsui_body-cell-editable_c6tup_17cg6_129:hover {
|
|
130
|
-
padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
|
|
131
|
-
}
|
|
132
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_17cg6_126 {
|
|
133
|
-
padding-left: var(--space-xxs-ynfts5, 4px);
|
|
134
|
-
}
|
|
135
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_17cg6_135):not(.awsui_body-cell-editable_c6tup_17cg6_129) {
|
|
136
|
-
border-left: none;
|
|
137
|
-
}
|
|
138
|
-
.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_17cg6_114) {
|
|
139
|
-
padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
140
|
-
}
|
|
141
|
-
.awsui_body-cell-first-row_c6tup_17cg6_141:not(#\9) {
|
|
30
|
+
.awsui_body-cell-first-row_c6tup_9o7yk_30:not(#\9) {
|
|
142
31
|
border-top: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
143
32
|
}
|
|
144
|
-
.awsui_body-cell-last-
|
|
33
|
+
.awsui_body-cell-last-row_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33):not(.awsui_has-footer_c6tup_9o7yk_33) {
|
|
145
34
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid transparent;
|
|
146
35
|
}
|
|
147
|
-
.awsui_body-cell-last-
|
|
36
|
+
.awsui_body-cell-last-row_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33).awsui_has-footer_c6tup_9o7yk_33 {
|
|
148
37
|
/*
|
|
149
|
-
Add a bottom border to the body cells of the last row as a separator between the
|
|
38
|
+
Add a bottom border to the body cells of the last row as a separator between the
|
|
150
39
|
table and the footer
|
|
151
40
|
*/
|
|
152
41
|
border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
153
42
|
}
|
|
154
|
-
.awsui_body-cell-
|
|
43
|
+
.awsui_body-cell-shaded_c6tup_9o7yk_43:not(#\9) {
|
|
155
44
|
background: var(--color-background-cell-shaded-26ubfj, #f8f8f8);
|
|
156
45
|
}
|
|
157
|
-
.awsui_body-cell-
|
|
46
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9) {
|
|
158
47
|
background-color: var(--color-background-item-selected-ebt4bi, #f2f8fd);
|
|
159
48
|
border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
160
49
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
161
50
|
padding-bottom: var(--space-scaled-xs-6859qs, 8px);
|
|
162
51
|
}
|
|
163
|
-
.awsui_body-cell-
|
|
52
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):first-child {
|
|
164
53
|
border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
165
54
|
border-radius: var(--border-radius-item-u2ibpi, 8px) 0 0 var(--border-radius-item-u2ibpi, 8px);
|
|
166
55
|
}
|
|
167
|
-
.awsui_body-cell-
|
|
56
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):last-child {
|
|
168
57
|
border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
|
|
169
58
|
border-radius: 0 var(--border-radius-item-u2ibpi, 8px) var(--border-radius-item-u2ibpi, 8px) 0;
|
|
170
59
|
}
|
|
171
|
-
.awsui_body-cell-
|
|
60
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):not(:first-child) {
|
|
172
61
|
padding-top: calc(
|
|
173
62
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
174
63
|
);
|
|
175
64
|
}
|
|
176
|
-
.awsui_body-
|
|
65
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33).awsui_body-cell-next-selected_c6tup_9o7yk_65 {
|
|
177
66
|
border-bottom: 0;
|
|
178
67
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
|
|
179
68
|
}
|
|
180
|
-
.awsui_body-cell-
|
|
69
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9) {
|
|
181
70
|
padding-top: calc(
|
|
182
71
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
|
|
183
72
|
);
|
|
184
73
|
border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-jgzhnb, #0972d3);
|
|
185
74
|
}
|
|
186
|
-
.awsui_body-cell-
|
|
75
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9) {
|
|
187
76
|
border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
|
|
188
77
|
}
|
|
189
|
-
.awsui_body-cell-
|
|
78
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9):first-child {
|
|
190
79
|
border-bottom-left-radius: 0;
|
|
191
80
|
}
|
|
192
|
-
.awsui_body-cell-
|
|
81
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9):last-child {
|
|
193
82
|
border-bottom-right-radius: 0;
|
|
194
83
|
}
|
|
195
|
-
.awsui_body-cell-
|
|
84
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9):first-child {
|
|
196
85
|
border-top-left-radius: 0;
|
|
197
86
|
}
|
|
198
|
-
.awsui_body-cell-
|
|
87
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9):last-child {
|
|
199
88
|
border-top-right-radius: 0;
|
|
200
89
|
}
|
|
201
|
-
.awsui_body-cell-
|
|
90
|
+
.awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_9o7yk_69) {
|
|
202
91
|
padding-top: var(--space-scaled-xs-6859qs, 8px);
|
|
203
92
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
justify-content: flex-end;
|
|
212
|
-
padding-right: var(--space-xs-rsr2qu, 8px);
|
|
213
|
-
}
|
|
214
|
-
.awsui_body-cell-editor-form_c6tup_17cg6_214:not(#\9) {
|
|
215
|
-
margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
|
|
216
|
-
}
|
|
217
|
-
.awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_17cg6_126 > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
|
|
218
|
-
margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
|
|
219
|
-
}
|
|
220
|
-
.awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
|
|
221
|
-
margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
|
|
222
|
-
}
|
|
223
|
-
.awsui_body-cell-editor-row_c6tup_17cg6_223:not(#\9) {
|
|
224
|
-
display: flex;
|
|
225
|
-
flex-flow: row nowrap;
|
|
226
|
-
align-items: center;
|
|
227
|
-
justify-content: space-between;
|
|
228
|
-
column-gap: var(--space-xxs-ynfts5, 4px);
|
|
229
|
-
}
|
|
230
|
-
.awsui_body-cell-editor-row_c6tup_17cg6_223 > :not(#\9):not(:last-child) {
|
|
231
|
-
flex-grow: 1;
|
|
232
|
-
}
|
|
233
|
-
.awsui_body-cell-editor-controls_c6tup_17cg6_233:not(#\9) {
|
|
234
|
-
flex-shrink: 0;
|
|
235
|
-
}
|
|
236
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9) {
|
|
237
|
-
position: relative;
|
|
238
|
-
cursor: pointer;
|
|
239
|
-
}
|
|
240
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129.awsui_body-cell-edit-active_c6tup_17cg6_129:not(#\9) {
|
|
241
|
-
overflow: visible;
|
|
242
|
-
}
|
|
243
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129) > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
244
|
-
opacity: 0;
|
|
245
|
-
}
|
|
246
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover {
|
|
247
|
-
position: relative;
|
|
248
|
-
background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
|
|
249
|
-
border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-m3lmsh, #7d8998);
|
|
250
|
-
left: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
|
|
251
|
-
right: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
|
|
252
|
-
}
|
|
253
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
254
|
-
padding-right: calc(var(--space-xs-rsr2qu, 8px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
|
|
255
|
-
}
|
|
256
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144.awsui_body-cell-selected_c6tup_17cg6_144, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-next-selected_c6tup_17cg6_176 {
|
|
257
|
-
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
258
|
-
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
|
|
259
|
-
}
|
|
260
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
|
|
261
|
-
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
262
|
-
}
|
|
263
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-first-row_c6tup_17cg6_141:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
|
|
264
|
-
padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
265
|
-
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
|
|
266
|
-
}
|
|
267
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within {
|
|
268
|
-
padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
|
|
269
|
-
}
|
|
270
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within > .awsui_body-cell-editor_c6tup_17cg6_204 {
|
|
271
|
-
opacity: 1;
|
|
272
|
-
}
|
|
273
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:first-child {
|
|
274
|
-
left: 0;
|
|
275
|
-
right: 0;
|
|
276
|
-
}
|
|
277
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
|
|
278
|
-
position: relative;
|
|
279
|
-
}
|
|
280
|
-
.awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
|
|
281
|
-
outline: 2px dotted transparent;
|
|
282
|
-
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)) - 1px);
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
In Visual Refresh the first cell of each row should align with the
|
|
96
|
+
left edge of the table as closely as possible.
|
|
97
|
+
*/
|
|
98
|
+
.awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_is-visual-refresh_c6tup_9o7yk_98):first-child {
|
|
99
|
+
padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
|
|
283
100
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
101
|
+
|
|
102
|
+
.awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9) {
|
|
103
|
+
/*
|
|
104
|
+
Remove the placeholder border if the row is not selectable.
|
|
105
|
+
Rows that are not selectable will reserve the horizontal space
|
|
106
|
+
that the placeholder border would consume.
|
|
107
|
+
*/
|
|
108
|
+
/*
|
|
109
|
+
Striped rows requires additional left padding because the
|
|
110
|
+
shaded background makes the child content appear too close
|
|
111
|
+
to the table edge.
|
|
112
|
+
*/
|
|
294
113
|
}
|
|
295
|
-
.awsui_body-
|
|
296
|
-
border-
|
|
297
|
-
border-bottom-left-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
114
|
+
.awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child:not(.awsui_has-selection_c6tup_9o7yk_114) {
|
|
115
|
+
border-left: none;
|
|
298
116
|
}
|
|
299
|
-
.awsui_body-
|
|
300
|
-
|
|
301
|
-
border-bottom-right-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
117
|
+
.awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_9o7yk_117) {
|
|
118
|
+
padding-left: var(--space-xxxs-k2w98v, 2px);
|
|
302
119
|
}
|
|
303
|
-
.awsui_body-
|
|
304
|
-
padding-
|
|
120
|
+
.awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child.awsui_has-striped-rows_c6tup_9o7yk_117 {
|
|
121
|
+
padding-left: var(--space-xxs-ynfts5, 4px);
|
|
305
122
|
}
|
|
@@ -2,23 +2,17 @@
|
|
|
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
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"body-cell-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"body-cell-
|
|
13
|
-
"body-cell-
|
|
14
|
-
"
|
|
15
|
-
"has-
|
|
16
|
-
"
|
|
17
|
-
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_17cg6_176",
|
|
18
|
-
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_17cg6_180",
|
|
19
|
-
"body-cell-editor": "awsui_body-cell-editor_c6tup_17cg6_204",
|
|
20
|
-
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_17cg6_214",
|
|
21
|
-
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_17cg6_223",
|
|
22
|
-
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_17cg6_233"
|
|
5
|
+
"body-cell": "awsui_body-cell_c6tup_9o7yk_9",
|
|
6
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_9o7yk_18",
|
|
7
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_9o7yk_30",
|
|
8
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_9o7yk_33",
|
|
9
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_9o7yk_33",
|
|
10
|
+
"has-footer": "awsui_has-footer_c6tup_9o7yk_33",
|
|
11
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_9o7yk_43",
|
|
12
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_9o7yk_65",
|
|
13
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_9o7yk_69",
|
|
14
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_9o7yk_98",
|
|
15
|
+
"has-selection": "awsui_has-selection_c6tup_9o7yk_114",
|
|
16
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_9o7yk_117"
|
|
23
17
|
};
|
|
24
18
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from '../interfaces';
|
|
3
|
-
interface TableHeaderCellProps
|
|
3
|
+
interface TableHeaderCellProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
tabIndex: number;
|
|
7
|
-
column: TableProps.ColumnDefinition<
|
|
8
|
-
activeSortingColumn
|
|
9
|
-
sortingDescending
|
|
10
|
-
sortingDisabled
|
|
11
|
-
wrapLines
|
|
7
|
+
column: TableProps.ColumnDefinition<any>;
|
|
8
|
+
activeSortingColumn: TableProps.SortingColumn<any> | undefined;
|
|
9
|
+
sortingDescending: boolean | undefined;
|
|
10
|
+
sortingDisabled: boolean | undefined;
|
|
11
|
+
wrapLines: boolean | undefined;
|
|
12
12
|
showFocusRing: boolean;
|
|
13
13
|
hidden?: boolean;
|
|
14
14
|
onClick(detail: TableProps.SortingState<any>): void;
|
|
@@ -18,8 +18,7 @@ interface TableHeaderCellProps<ItemType, ValueType> {
|
|
|
18
18
|
onFocus?: () => void;
|
|
19
19
|
onBlur?: () => void;
|
|
20
20
|
resizableColumns?: boolean;
|
|
21
|
-
isEditable?: boolean;
|
|
22
21
|
}
|
|
23
|
-
export declare function TableHeaderCell
|
|
22
|
+
export declare function TableHeaderCell({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, }: TableHeaderCellProps): JSX.Element;
|
|
24
23
|
export {};
|
|
25
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OA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b,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACf,EAAE,oBAAoB,eAqFtB"}
|
|
@@ -12,8 +12,7 @@ import { Resizer } from '../resizer';
|
|
|
12
12
|
import { useUniqueId } from '../../internal/hooks/use-unique-id';
|
|
13
13
|
export function TableHeaderCell(_a) {
|
|
14
14
|
var _b, _c, _d;
|
|
15
|
-
var
|
|
16
|
-
var className = _a.className, style = _a.style, tabIndex = _a.tabIndex, column = _a.column, activeSortingColumn = _a.activeSortingColumn, sortingDescending = _a.sortingDescending, sortingDisabled = _a.sortingDisabled, wrapLines = _a.wrapLines, showFocusRing = _a.showFocusRing, hidden = _a.hidden, onClick = _a.onClick, colIndex = _a.colIndex, onFocus = _a.onFocus, onBlur = _a.onBlur, updateColumn = _a.updateColumn, resizableColumns = _a.resizableColumns, onResizeFinish = _a.onResizeFinish, isEditable = _a.isEditable;
|
|
15
|
+
var className = _a.className, style = _a.style, tabIndex = _a.tabIndex, column = _a.column, activeSortingColumn = _a.activeSortingColumn, sortingDescending = _a.sortingDescending, sortingDisabled = _a.sortingDisabled, wrapLines = _a.wrapLines, showFocusRing = _a.showFocusRing, hidden = _a.hidden, onClick = _a.onClick, colIndex = _a.colIndex, onFocus = _a.onFocus, onBlur = _a.onBlur, updateColumn = _a.updateColumn, resizableColumns = _a.resizableColumns, onResizeFinish = _a.onResizeFinish;
|
|
17
16
|
var focusVisible = useFocusVisible();
|
|
18
17
|
var sortable = !!column.sortingComparator || !!column.sortingField;
|
|
19
18
|
var sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);
|
|
@@ -55,10 +54,7 @@ export function TableHeaderCell(_a) {
|
|
|
55
54
|
})
|
|
56
55
|
: undefined }, (sortingDisabled || !sortingStatus
|
|
57
56
|
? (_d = {}, _d['aria-disabled'] = 'true', _d) : __assign(__assign({ onKeyPress: handleKeyPress, tabIndex: tabIndex, role: 'button' }, focusVisible), { onClick: handleClick, onFocus: onFocus, onBlur: onBlur }))),
|
|
58
|
-
React.createElement("div", { className: clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap']), id: headerId },
|
|
59
|
-
column.header,
|
|
60
|
-
isEditable ? (React.createElement("span", { className: styles['edit-icon'], role: "img", "aria-label": (_e = column.editConfig) === null || _e === void 0 ? void 0 : _e.editIconAriaLabel },
|
|
61
|
-
React.createElement(InternalIcon, { name: "edit" }))) : null),
|
|
57
|
+
React.createElement("div", { className: clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap']), id: headerId }, column.header),
|
|
62
58
|
sortingStatus && (React.createElement("span", { className: styles['sorting-icon'] },
|
|
63
59
|
React.createElement(InternalIcon, { name: getSortingIconName(sortingStatus) })))),
|
|
64
60
|
resizableColumns && (React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,O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EAAE,MAAM;oBACd,UAAU,EAAE,MAAM,IAAI,CAAC,CAAC,iBAAiB;oBACzC,QAAQ,EAAE,CAAC,CAAC,eAAe;iBAC5B,CAAC;gBACJ,CAAC,CAAC,SAAS,IAEX,CAAC,eAAe,IAAI,CAAC,aAAa;YACpC,CAAC,WAAG,GAAC,eAAe,IAAG,MAAM,MAC7B,CAAC,qBACG,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,IACX,YAAY,KACf,OAAO,EAAE,WAAW,EACpB,OAAO,SAAA,EACP,MAAM,QAAA,GACP,CAAC;YAEN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,SAAS,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,IACzG,MAAM,CAAC,MAAM,CACV;YACL,aAAa,IAAI,CAChB,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;gBACrC,oBAAC,YAAY,IAAC,IAAI,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAI,CACpD,CACR,CACG;QACL,gBAAgB,IAAI,CACnB;YACE,oBAAC,OAAO,IACN,UAAU,EAAE,UAAA,QAAQ,IAAI,OAAA,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAhC,CAAgC,EACxD,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,QAAQ,EACxB,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAC3F,CACD,CACJ,CACE,CACN,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport InternalIcon from '../../icon/internal';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { KeyCode } from '../../internal/keycode';\nimport { TableProps } from '../interfaces';\nimport { getAriaSort, getSortingIconName, getSortingStatus, isSorted } from './utils';\nimport styles from './styles.css.js';\nimport { Resizer } from '../resizer';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\n\ninterface TableHeaderCellProps {\n className?: string;\n style?: React.CSSProperties;\n tabIndex: number;\n column: TableProps.ColumnDefinition<any>;\n activeSortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n wrapLines: boolean | undefined;\n showFocusRing: boolean;\n hidden?: boolean;\n onClick(detail: TableProps.SortingState<any>): void;\n onResizeFinish: () => void;\n colIndex: number;\n updateColumn: (colIndex: number, newWidth: number) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n resizableColumns?: boolean;\n}\n\nexport function TableHeaderCell({\n className,\n style,\n tabIndex,\n column,\n activeSortingColumn,\n sortingDescending,\n sortingDisabled,\n wrapLines,\n showFocusRing,\n hidden,\n onClick,\n colIndex,\n onFocus,\n onBlur,\n updateColumn,\n resizableColumns,\n onResizeFinish,\n}: TableHeaderCellProps) {\n const focusVisible = useFocusVisible();\n const sortable = !!column.sortingComparator || !!column.sortingField;\n const sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);\n const sortingStatus = getSortingStatus(sortable, sorted, !!sortingDescending, !!sortingDisabled);\n const handleClick = () =>\n onClick({\n sortingColumn: column,\n isDescending: sorted ? !sortingDescending : false,\n });\n\n // Elements with role=\"button\" do not have the default behavior of <button>, where pressing\n // Enter or Space will trigger a click event. Therefore we need to add this ourselves.\n // The native <button> element cannot be used due to a misaligned implementation in Firefox:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=843003\n const handleKeyPress = ({ nativeEvent: e }: React.KeyboardEvent) => {\n if (e.keyCode === KeyCode.enter || e.keyCode === KeyCode.space) {\n e.preventDefault();\n handleClick();\n }\n };\n\n const headerId = useUniqueId('table-header-');\n\n return (\n <th\n className={clsx(className, {\n [styles['header-cell-resizable']]: !!resizableColumns,\n [styles['header-cell-sortable']]: sortingStatus,\n [styles['header-cell-sorted']]: sortingStatus === 'ascending' || sortingStatus === 'descending',\n [styles['header-cell-disabled']]: sortingDisabled,\n [styles['header-cell-ascending']]: sortingStatus === 'ascending',\n [styles['header-cell-descending']]: sortingStatus === 'descending',\n [styles['header-cell-hidden']]: hidden,\n })}\n aria-sort={sortingStatus && getAriaSort(sortingStatus)}\n style={style}\n scope=\"col\"\n >\n <div\n className={clsx(styles['header-cell-content'], {\n [styles['header-cell-fake-focus']]: showFocusRing && focusVisible['data-awsui-focus-visible'],\n })}\n aria-label={\n column.ariaLabel\n ? column.ariaLabel({\n sorted: sorted,\n descending: sorted && !!sortingDescending,\n disabled: !!sortingDisabled,\n })\n : undefined\n }\n {...(sortingDisabled || !sortingStatus\n ? { ['aria-disabled']: 'true' }\n : {\n onKeyPress: handleKeyPress,\n tabIndex: tabIndex,\n role: 'button',\n ...focusVisible,\n onClick: handleClick,\n onFocus,\n onBlur,\n })}\n >\n <div className={clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap'])} id={headerId}>\n {column.header}\n </div>\n {sortingStatus && (\n <span className={styles['sorting-icon']}>\n <InternalIcon name={getSortingIconName(sortingStatus)} />\n </span>\n )}\n </div>\n {resizableColumns && (\n <>\n <Resizer\n onDragMove={newWidth => updateColumn(colIndex, newWidth)}\n onFinish={onResizeFinish}\n ariaLabelledby={headerId}\n minWidth={typeof column.minWidth === 'string' ? parseInt(column.minWidth) : column.minWidth}\n />\n </>\n )}\n </th>\n );\n}\n"]}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"header-cell": "awsui_header-
|
|
5
|
-
"header-cell-sticky": "awsui_header-cell-
|
|
6
|
-
"header-cell-stuck": "awsui_header-cell-
|
|
7
|
-
"header-cell-variant-full-page": "awsui_header-cell-variant-full-
|
|
8
|
-
"header-cell-hidden": "awsui_header-cell-
|
|
9
|
-
"header-cell-sortable": "awsui_header-cell-
|
|
10
|
-
"header-cell-resizable": "awsui_header-cell-
|
|
11
|
-
"sorting-icon": "awsui_sorting-
|
|
12
|
-
"
|
|
13
|
-
"header-cell-
|
|
14
|
-
"header-cell-
|
|
15
|
-
"header-cell-
|
|
16
|
-
"header-cell-
|
|
17
|
-
"header-cell-text": "awsui_header-cell-
|
|
18
|
-
"header-cell-
|
|
19
|
-
"header-cell-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"has-striped-rows": "awsui_has-striped-rows_1spae_lzlsa_232"
|
|
4
|
+
"header-cell": "awsui_header-cell_1spae_1d6sg_93",
|
|
5
|
+
"header-cell-sticky": "awsui_header-cell-sticky_1spae_1d6sg_105",
|
|
6
|
+
"header-cell-stuck": "awsui_header-cell-stuck_1spae_1d6sg_108",
|
|
7
|
+
"header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1d6sg_108",
|
|
8
|
+
"header-cell-hidden": "awsui_header-cell-hidden_1spae_1d6sg_111",
|
|
9
|
+
"header-cell-sortable": "awsui_header-cell-sortable_1spae_1d6sg_114",
|
|
10
|
+
"header-cell-resizable": "awsui_header-cell-resizable_1spae_1d6sg_126",
|
|
11
|
+
"sorting-icon": "awsui_sorting-icon_1spae_1d6sg_130",
|
|
12
|
+
"header-cell-disabled": "awsui_header-cell-disabled_1spae_1d6sg_137",
|
|
13
|
+
"header-cell-sorted": "awsui_header-cell-sorted_1spae_1d6sg_137",
|
|
14
|
+
"header-cell-content": "awsui_header-cell-content_1spae_1d6sg_137",
|
|
15
|
+
"header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1d6sg_170",
|
|
16
|
+
"header-cell-text": "awsui_header-cell-text_1spae_1d6sg_199",
|
|
17
|
+
"header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1d6sg_199",
|
|
18
|
+
"header-cell-ascending": "awsui_header-cell-ascending_1spae_1d6sg_205",
|
|
19
|
+
"header-cell-descending": "awsui_header-cell-descending_1spae_1d6sg_206",
|
|
20
|
+
"is-visual-refresh": "awsui_is-visual-refresh_1spae_1d6sg_216",
|
|
21
|
+
"has-striped-rows": "awsui_has-striped-rows_1spae_1d6sg_227"
|
|
23
22
|
};
|
|
24
23
|
|