@cloudscape-design/components-themeable 3.0.166 → 3.0.168
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/code-editor/resizable-box/styles.scss +37 -0
- package/lib/internal/scss/code-editor/styles.scss +1 -29
- package/lib/internal/scss/select/parts/styles.scss +9 -0
- package/lib/internal/scss/table/body-cell/styles.scss +131 -29
- package/lib/internal/scss/table/header-cell/styles.scss +15 -7
- package/lib/internal/template/attribute-editor/additional-info.d.ts +2 -1
- package/lib/internal/template/attribute-editor/additional-info.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/additional-info.js +4 -2
- package/lib/internal/template/attribute-editor/additional-info.js.map +1 -1
- package/lib/internal/template/attribute-editor/internal.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/internal.js +5 -2
- package/lib/internal/template/attribute-editor/internal.js.map +1 -1
- package/lib/internal/template/button/internal.d.ts +1 -0
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +2 -2
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/code-editor/index.d.ts.map +1 -1
- package/lib/internal/template/code-editor/index.js +5 -8
- package/lib/internal/template/code-editor/index.js.map +1 -1
- package/lib/internal/template/code-editor/pane.d.ts.map +1 -1
- package/lib/internal/template/code-editor/pane.js +4 -4
- package/lib/internal/template/code-editor/pane.js.map +1 -1
- package/lib/internal/template/code-editor/resizable-box/index.d.ts +9 -0
- package/lib/internal/template/code-editor/resizable-box/index.d.ts.map +1 -0
- package/lib/internal/template/code-editor/resizable-box/index.js +44 -0
- package/lib/internal/template/code-editor/resizable-box/index.js.map +1 -0
- package/lib/internal/template/code-editor/resizable-box/styles.css.js +8 -0
- package/lib/internal/template/code-editor/resizable-box/styles.scoped.css +62 -0
- package/lib/internal/template/code-editor/resizable-box/styles.selectors.js +9 -0
- package/lib/internal/template/code-editor/styles.css.js +32 -33
- package/lib/internal/template/code-editor/styles.scoped.css +157 -199
- package/lib/internal/template/code-editor/styles.selectors.js +32 -33
- package/lib/internal/template/form-field/interfaces.d.ts +10 -0
- package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form-field/interfaces.js.map +1 -1
- package/lib/internal/template/form-field/internal.d.ts +1 -1
- package/lib/internal/template/form-field/internal.d.ts.map +1 -1
- package/lib/internal/template/form-field/internal.js +5 -4
- package/lib/internal/template/form-field/internal.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +16 -4
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/internal/components/live-region/index.d.ts +2 -1
- package/lib/internal/template/internal/components/live-region/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/live-region/index.js +29 -6
- package/lib/internal/template/internal/components/live-region/index.js.map +1 -1
- package/lib/internal/template/internal/context/form-field-context.d.ts +6 -2
- package/lib/internal/template/internal/context/form-field-context.d.ts.map +1 -1
- package/lib/internal/template/internal/context/form-field-context.js +7 -1
- package/lib/internal/template/internal/context/form-field-context.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/types.d.ts +9 -0
- package/lib/internal/template/internal/types.d.ts.map +1 -1
- package/lib/internal/template/internal/types.js +0 -2
- package/lib/internal/template/internal/types.js.map +1 -1
- package/lib/internal/template/package.json +0 -1
- package/lib/internal/template/progress-bar/index.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/index.js +14 -3
- package/lib/internal/template/progress-bar/index.js.map +1 -1
- package/lib/internal/template/select/parts/styles.css.js +9 -9
- package/lib/internal/template/select/parts/styles.scoped.css +27 -9
- package/lib/internal/template/select/parts/styles.selectors.js +9 -9
- package/lib/internal/template/table/body-cell/click-away.d.ts +9 -0
- package/lib/internal/template/table/body-cell/click-away.d.ts.map +1 -0
- package/lib/internal/template/table/body-cell/click-away.js +38 -0
- package/lib/internal/template/table/body-cell/click-away.js.map +1 -0
- package/lib/internal/template/table/body-cell/index.d.ts +10 -19
- package/lib/internal/template/table/body-cell/index.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/index.js +49 -9
- package/lib/internal/template/table/body-cell/index.js.map +1 -1
- package/lib/internal/template/table/body-cell/inline-editor.d.ts +12 -0
- package/lib/internal/template/table/body-cell/inline-editor.d.ts.map +1 -0
- package/lib/internal/template/table/body-cell/inline-editor.js +88 -0
- package/lib/internal/template/table/body-cell/inline-editor.js.map +1 -0
- package/lib/internal/template/table/body-cell/styles.css.js +18 -12
- package/lib/internal/template/table/body-cell/styles.scoped.css +229 -46
- package/lib/internal/template/table/body-cell/styles.selectors.js +18 -12
- package/lib/internal/template/table/body-cell/td-element.d.ts +21 -0
- package/lib/internal/template/table/body-cell/td-element.d.ts.map +1 -0
- package/lib/internal/template/table/body-cell/td-element.js +11 -0
- package/lib/internal/template/table/body-cell/td-element.js.map +1 -0
- package/lib/internal/template/table/body-cell/use-stable-scroll-position.d.ts +17 -0
- package/lib/internal/template/table/body-cell/use-stable-scroll-position.d.ts.map +1 -0
- package/lib/internal/template/table/body-cell/use-stable-scroll-position.js +48 -0
- package/lib/internal/template/table/body-cell/use-stable-scroll-position.js.map +1 -0
- package/lib/internal/template/table/header-cell/index.d.ts +8 -7
- package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/index.js +6 -2
- package/lib/internal/template/table/header-cell/index.js.map +1 -1
- package/lib/internal/template/table/header-cell/styles.css.js +19 -18
- package/lib/internal/template/table/header-cell/styles.scoped.css +40 -35
- package/lib/internal/template/table/header-cell/styles.selectors.js +19 -18
- package/lib/internal/template/table/interfaces.d.ts +73 -6
- package/lib/internal/template/table/interfaces.d.ts.map +1 -1
- package/lib/internal/template/table/interfaces.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +68 -18
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table/thead.d.ts.map +1 -1
- package/lib/internal/template/table/thead.js +1 -1
- package/lib/internal/template/table/thead.js.map +1 -1
- package/lib/internal/template/table/use-table-focus-navigation.d.ts +16 -0
- package/lib/internal/template/table/use-table-focus-navigation.d.ts.map +1 -0
- package/lib/internal/template/table/use-table-focus-navigation.js +131 -0
- package/lib/internal/template/table/use-table-focus-navigation.js.map +1 -0
- package/lib/internal/template/tabs/index.d.ts +1 -1
- package/lib/internal/template/tabs/index.d.ts.map +1 -1
- package/lib/internal/template/tabs/index.js +2 -2
- package/lib/internal/template/tabs/index.js.map +1 -1
- package/lib/internal/template/tabs/interfaces.d.ts +14 -0
- package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tabs/interfaces.js.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.d.ts +2 -1
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +3 -7
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/tag-editor/index.d.ts.map +1 -1
- package/lib/internal/template/tag-editor/index.js +1 -1
- package/lib/internal/template/tag-editor/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/table/index.d.ts +4 -0
- package/lib/internal/template/test-utils/dom/table/index.js +21 -5
- package/lib/internal/template/test-utils/dom/table/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/table/index.d.ts +4 -0
- package/lib/internal/template/test-utils/selectors/table/index.js +21 -5
- package/lib/internal/template/test-utils/selectors/table/index.js.map +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/internal/template/code-editor/resize-handler.d.ts +0 -3
- package/lib/internal/template/code-editor/resize-handler.d.ts.map +0 -1
- package/lib/internal/template/code-editor/resize-handler.js +0 -7
- package/lib/internal/template/code-editor/resize-handler.js.map +0 -1
- package/lib/internal/template/internal/components/dynamic-aria-live/index.d.ts +0 -28
- package/lib/internal/template/internal/components/dynamic-aria-live/index.d.ts.map +0 -1
- package/lib/internal/template/internal/components/dynamic-aria-live/index.js +0 -38
- package/lib/internal/template/internal/components/dynamic-aria-live/index.js.map +0 -1
- package/lib/internal/template/internal/components/live-region/aria-liva-tag.d.ts +0 -13
- package/lib/internal/template/internal/components/live-region/aria-liva-tag.d.ts.map +0 -1
- package/lib/internal/template/internal/components/live-region/aria-liva-tag.js +0 -18
- package/lib/internal/template/internal/components/live-region/aria-liva-tag.js.map +0 -1
- package/lib/internal/template/internal/components/live-region/utils.d.ts +0 -8
- package/lib/internal/template/internal/components/live-region/utils.d.ts.map +0 -1
- package/lib/internal/template/internal/components/live-region/utils.js +0 -24
- package/lib/internal/template/internal/components/live-region/utils.js.map +0 -1
|
@@ -6,7 +6,91 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
|
|
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_164cf_93:not(#\9) {
|
|
10
94
|
box-sizing: border-box;
|
|
11
95
|
padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
|
|
12
96
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-yvnixs, 1px) - var(--border-divider-list-width-hacikr, 1px))
|
|
@@ -15,108 +99,207 @@
|
|
|
15
99
|
word-wrap: break-word;
|
|
16
100
|
border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-k96bks, #eaeded);
|
|
17
101
|
}
|
|
18
|
-
.awsui_body-
|
|
102
|
+
.awsui_body-cell_c6tup_164cf_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_164cf_102) {
|
|
19
103
|
white-space: nowrap;
|
|
20
104
|
overflow: hidden;
|
|
21
105
|
text-overflow: ellipsis;
|
|
22
106
|
}
|
|
23
|
-
.awsui_body-
|
|
107
|
+
.awsui_body-cell_c6tup_164cf_93:not(#\9):first-child {
|
|
24
108
|
border-left: var(--border-item-width-yvnixs, 1px) solid transparent;
|
|
25
109
|
}
|
|
26
|
-
.awsui_body-
|
|
110
|
+
.awsui_body-cell_c6tup_164cf_93:not(#\9):last-child {
|
|
27
111
|
border-right: var(--border-item-width-yvnixs, 1px) solid transparent;
|
|
28
112
|
padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-yvnixs, 1px));
|
|
29
113
|
}
|
|
30
|
-
.awsui_body-
|
|
114
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):first-child {
|
|
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_164cf_93.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_164cf_126) {
|
|
127
|
+
padding-left: var(--space-xxxs-k2w98v, 2px);
|
|
128
|
+
}
|
|
129
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_164cf_126):not(.awsui_body-cell-edit-active_c6tup_164cf_129).awsui_body-cell-editable_c6tup_164cf_129:hover {
|
|
130
|
+
padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
|
|
131
|
+
}
|
|
132
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_164cf_126 {
|
|
133
|
+
padding-left: var(--space-xxs-ynfts5, 4px);
|
|
134
|
+
}
|
|
135
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_164cf_135):not(.awsui_body-cell-editable_c6tup_164cf_129) {
|
|
136
|
+
border-left: none;
|
|
137
|
+
}
|
|
138
|
+
.awsui_body-cell_c6tup_164cf_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_164cf_114) {
|
|
139
|
+
padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-yvnixs, 1px));
|
|
140
|
+
}
|
|
141
|
+
.awsui_body-cell-first-row_c6tup_164cf_141:not(#\9) {
|
|
31
142
|
border-top: var(--border-item-width-yvnixs, 1px) solid transparent;
|
|
32
143
|
}
|
|
33
|
-
.awsui_body-cell-last-
|
|
144
|
+
.awsui_body-cell-last-row_c6tup_164cf_144:not(#\9):not(.awsui_body-cell-selected_c6tup_164cf_144):not(.awsui_has-footer_c6tup_164cf_144) {
|
|
34
145
|
border-bottom: var(--border-item-width-yvnixs, 1px) solid transparent;
|
|
35
146
|
}
|
|
36
|
-
.awsui_body-cell-last-
|
|
147
|
+
.awsui_body-cell-last-row_c6tup_164cf_144:not(#\9):not(.awsui_body-cell-selected_c6tup_164cf_144).awsui_has-footer_c6tup_164cf_144 {
|
|
37
148
|
/*
|
|
38
|
-
Add a bottom border to the body cells of the last row as a separator between the
|
|
149
|
+
Add a bottom border to the body cells of the last row as a separator between the
|
|
39
150
|
table and the footer
|
|
40
151
|
*/
|
|
41
152
|
border-bottom: var(--border-divider-section-width-5a4cv1, 1px) solid var(--color-border-divider-default-k96bks, #eaeded);
|
|
42
153
|
}
|
|
43
|
-
.awsui_body-cell-
|
|
154
|
+
.awsui_body-cell-shaded_c6tup_164cf_154:not(#\9) {
|
|
44
155
|
background: var(--color-background-cell-shaded-y6pwcp, #f2f3f3);
|
|
45
156
|
}
|
|
46
|
-
.awsui_body-cell-
|
|
157
|
+
.awsui_body-cell-selected_c6tup_164cf_144:not(#\9) {
|
|
47
158
|
background-color: var(--color-background-item-selected-fva7ca, #f1faff);
|
|
48
159
|
border-top: var(--border-item-width-yvnixs, 1px) solid var(--color-border-item-selected-pr9yuf, #00a1c9);
|
|
49
160
|
border-bottom: var(--border-item-width-yvnixs, 1px) solid var(--color-border-item-selected-pr9yuf, #00a1c9);
|
|
50
161
|
padding-bottom: var(--space-scaled-xs-6859qs, 8px);
|
|
51
162
|
}
|
|
52
|
-
.awsui_body-cell-
|
|
163
|
+
.awsui_body-cell-selected_c6tup_164cf_144:not(#\9):first-child {
|
|
53
164
|
border-left: var(--border-item-width-yvnixs, 1px) solid var(--color-border-item-selected-pr9yuf, #00a1c9);
|
|
54
165
|
border-radius: var(--border-radius-item-wjpc1f, 0px) 0 0 var(--border-radius-item-wjpc1f, 0px);
|
|
55
166
|
}
|
|
56
|
-
.awsui_body-cell-
|
|
167
|
+
.awsui_body-cell-selected_c6tup_164cf_144:not(#\9):last-child {
|
|
57
168
|
border-right: var(--border-item-width-yvnixs, 1px) solid var(--color-border-item-selected-pr9yuf, #00a1c9);
|
|
58
169
|
border-radius: 0 var(--border-radius-item-wjpc1f, 0px) var(--border-radius-item-wjpc1f, 0px) 0;
|
|
59
170
|
}
|
|
60
|
-
.awsui_body-cell-
|
|
171
|
+
.awsui_body-cell-selected_c6tup_164cf_144:not(#\9):not(:first-child) {
|
|
61
172
|
padding-top: calc(
|
|
62
173
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-yvnixs, 1px) - var(--border-divider-list-width-hacikr, 1px))
|
|
63
174
|
);
|
|
64
175
|
}
|
|
65
|
-
.awsui_body-
|
|
176
|
+
.awsui_body-cell_c6tup_164cf_93:not(#\9):not(.awsui_body-cell-selected_c6tup_164cf_144).awsui_body-cell-next-selected_c6tup_164cf_176 {
|
|
66
177
|
border-bottom: 0;
|
|
67
178
|
padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
|
|
68
179
|
}
|
|
69
|
-
.awsui_body-cell-
|
|
180
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-prev-selected_c6tup_164cf_180:not(#\9) {
|
|
70
181
|
padding-top: calc(
|
|
71
182
|
var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-yvnixs, 1px) - var(--border-divider-list-width-hacikr, 1px))
|
|
72
183
|
);
|
|
73
184
|
border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-wtgwev, transparent);
|
|
74
185
|
}
|
|
75
|
-
.awsui_body-cell-
|
|
186
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-next-selected_c6tup_164cf_176:not(#\9) {
|
|
76
187
|
border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
|
|
77
188
|
}
|
|
78
|
-
.awsui_body-cell-
|
|
189
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-next-selected_c6tup_164cf_176:not(#\9):first-child {
|
|
79
190
|
border-bottom-left-radius: 0;
|
|
80
191
|
}
|
|
81
|
-
.awsui_body-cell-
|
|
192
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-next-selected_c6tup_164cf_176:not(#\9):last-child {
|
|
82
193
|
border-bottom-right-radius: 0;
|
|
83
194
|
}
|
|
84
|
-
.awsui_body-cell-
|
|
195
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-prev-selected_c6tup_164cf_180:not(#\9):first-child {
|
|
85
196
|
border-top-left-radius: 0;
|
|
86
197
|
}
|
|
87
|
-
.awsui_body-cell-
|
|
198
|
+
.awsui_body-cell-selected_c6tup_164cf_144.awsui_body-cell-prev-selected_c6tup_164cf_180:not(#\9):last-child {
|
|
88
199
|
border-top-right-radius: 0;
|
|
89
200
|
}
|
|
90
|
-
.awsui_body-cell-
|
|
201
|
+
.awsui_body-cell-selected_c6tup_164cf_144:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_164cf_180) {
|
|
91
202
|
padding-top: var(--space-scaled-xs-6859qs, 8px);
|
|
92
203
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
204
|
+
.awsui_body-cell-editor_c6tup_164cf_204:not(#\9) {
|
|
205
|
+
top: 0;
|
|
206
|
+
right: 0;
|
|
207
|
+
bottom: 0;
|
|
208
|
+
position: absolute;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: flex-end;
|
|
212
|
+
padding-right: var(--space-xs-rsr2qu, 8px);
|
|
100
213
|
}
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
*/
|
|
214
|
+
.awsui_body-cell-editor-form_c6tup_164cf_214:not(#\9) {
|
|
215
|
+
margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
|
|
113
216
|
}
|
|
114
|
-
.
|
|
115
|
-
|
|
217
|
+
.awsui_is-visual-refresh_c6tup_164cf_114.awsui_body-cell_c6tup_164cf_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_164cf_126 > .awsui_body-cell-editor-form_c6tup_164cf_214 {
|
|
218
|
+
margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
|
|
116
219
|
}
|
|
117
|
-
.
|
|
118
|
-
|
|
220
|
+
.awsui_is-visual-refresh_c6tup_164cf_114.awsui_body-cell_c6tup_164cf_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_164cf_126) > .awsui_body-cell-editor-form_c6tup_164cf_214 {
|
|
221
|
+
margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
|
|
119
222
|
}
|
|
120
|
-
.awsui_body-
|
|
121
|
-
|
|
223
|
+
.awsui_body-cell-editor-row_c6tup_164cf_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_164cf_223 > :not(#\9):not(:last-child) {
|
|
231
|
+
flex-grow: 1;
|
|
232
|
+
}
|
|
233
|
+
.awsui_body-cell-editor-controls_c6tup_164cf_233:not(#\9) {
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
}
|
|
236
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9) {
|
|
237
|
+
position: relative;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129.awsui_body-cell-edit-active_c6tup_164cf_129:not(#\9) {
|
|
241
|
+
overflow: visible;
|
|
242
|
+
}
|
|
243
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129) > .awsui_body-cell-editor_c6tup_164cf_204 {
|
|
244
|
+
opacity: 0;
|
|
245
|
+
}
|
|
246
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover {
|
|
247
|
+
position: relative;
|
|
248
|
+
background-color: var(--color-background-dropdown-item-hover-hgdj8r, #f2f3f3);
|
|
249
|
+
border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-bwkbmv, #879596);
|
|
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_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover > .awsui_body-cell-editor_c6tup_164cf_204 {
|
|
254
|
+
padding-right: calc(var(--space-xs-rsr2qu, 8px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
|
|
255
|
+
}
|
|
256
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover.awsui_body-cell-last-row_c6tup_164cf_144.awsui_body-cell-selected_c6tup_164cf_144, .awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover.awsui_body-cell-next-selected_c6tup_164cf_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_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover.awsui_body-cell-last-row_c6tup_164cf_144:not(.awsui_body-cell-selected_c6tup_164cf_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_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover.awsui_body-cell-first-row_c6tup_164cf_141:not(.awsui_body-cell-selected_c6tup_164cf_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_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover, .awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_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_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover > .awsui_body-cell-editor_c6tup_164cf_204, .awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129)[data-awsui-focus-visible=true]:focus-within > .awsui_body-cell-editor_c6tup_164cf_204 {
|
|
271
|
+
opacity: 1;
|
|
272
|
+
}
|
|
273
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover:first-child {
|
|
274
|
+
left: 0;
|
|
275
|
+
right: 0;
|
|
276
|
+
}
|
|
277
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
|
|
278
|
+
position: relative;
|
|
279
|
+
}
|
|
280
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_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);
|
|
283
|
+
}
|
|
284
|
+
.awsui_body-cell_c6tup_164cf_93.awsui_body-cell-editable_c6tup_164cf_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129)[data-awsui-focus-visible=true]:not(:hover):focus-within::before {
|
|
285
|
+
content: " ";
|
|
286
|
+
display: block;
|
|
287
|
+
position: absolute;
|
|
288
|
+
left: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
289
|
+
top: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
290
|
+
width: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
291
|
+
height: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
292
|
+
border-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
293
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-n5kd8g, #0073bb);
|
|
294
|
+
}
|
|
295
|
+
.awsui_body-cell-editable_c6tup_164cf_129.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover:first-child {
|
|
296
|
+
border-top-left-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
297
|
+
border-bottom-left-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
298
|
+
}
|
|
299
|
+
.awsui_body-cell-editable_c6tup_164cf_129.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover:last-child {
|
|
300
|
+
border-top-right-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
301
|
+
border-bottom-right-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
302
|
+
}
|
|
303
|
+
.awsui_body-cell-editable_c6tup_164cf_129.awsui_is-visual-refresh_c6tup_164cf_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_164cf_129):hover.awsui_body-cell-first-row_c6tup_164cf_141 > .awsui_body-cell-editor_c6tup_164cf_204 {
|
|
304
|
+
padding-top: var(--border-divider-list-width-hacikr, 1px);
|
|
122
305
|
}
|
|
@@ -2,17 +2,23 @@
|
|
|
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
|
-
"
|
|
5
|
+
"body-cell": "awsui_body-cell_c6tup_164cf_93",
|
|
6
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_164cf_102",
|
|
7
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_164cf_114",
|
|
8
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_164cf_126",
|
|
9
|
+
"body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_164cf_129",
|
|
10
|
+
"body-cell-editable": "awsui_body-cell-editable_c6tup_164cf_129",
|
|
11
|
+
"has-selection": "awsui_has-selection_c6tup_164cf_135",
|
|
12
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_164cf_141",
|
|
13
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_164cf_144",
|
|
14
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_164cf_144",
|
|
15
|
+
"has-footer": "awsui_has-footer_c6tup_164cf_144",
|
|
16
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_164cf_154",
|
|
17
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_164cf_176",
|
|
18
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_164cf_180",
|
|
19
|
+
"body-cell-editor": "awsui_body-cell-editor_c6tup_164cf_204",
|
|
20
|
+
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_164cf_214",
|
|
21
|
+
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_164cf_223",
|
|
22
|
+
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_164cf_233"
|
|
17
23
|
};
|
|
18
24
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TableTdElementProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
wrapLines: boolean | undefined;
|
|
6
|
+
isFirstRow: boolean;
|
|
7
|
+
isLastRow: boolean;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
isNextSelected: boolean;
|
|
10
|
+
isPrevSelected: boolean;
|
|
11
|
+
nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
isEvenRow?: boolean;
|
|
15
|
+
stripedRows?: boolean;
|
|
16
|
+
hasSelection?: boolean;
|
|
17
|
+
hasFooter?: boolean;
|
|
18
|
+
isVisualRefresh?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const TableTdElement: React.ForwardRefExoticComponent<TableTdElementProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
21
|
+
//# sourceMappingURL=td-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"td-element.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;IACvG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,kGAgD1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import styles from './styles.css.js';
|
|
7
|
+
export var TableTdElement = React.forwardRef(function (_a, ref) {
|
|
8
|
+
var className = _a.className, style = _a.style, children = _a.children, wrapLines = _a.wrapLines, isFirstRow = _a.isFirstRow, isLastRow = _a.isLastRow, isSelected = _a.isSelected, isNextSelected = _a.isNextSelected, isPrevSelected = _a.isPrevSelected, nativeAttributes = _a.nativeAttributes, onClick = _a.onClick, isEvenRow = _a.isEvenRow, stripedRows = _a.stripedRows, isVisualRefresh = _a.isVisualRefresh, hasSelection = _a.hasSelection, hasFooter = _a.hasFooter;
|
|
9
|
+
return (React.createElement("td", __assign({ style: style, className: clsx(className, styles['body-cell'], wrapLines && styles['body-cell-wrap'], isFirstRow && styles['body-cell-first-row'], isLastRow && styles['body-cell-last-row'], isSelected && styles['body-cell-selected'], isNextSelected && styles['body-cell-next-selected'], isPrevSelected && styles['body-cell-prev-selected'], !isEvenRow && stripedRows && styles['body-cell-shaded'], stripedRows && styles['has-striped-rows'], isVisualRefresh && styles['is-visual-refresh'], hasSelection && styles['has-selection'], hasFooter && styles['has-footer']), onClick: onClick, ref: ref }, nativeAttributes), children));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=td-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"td-element.js","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,CAAC,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,UACE,EAiBC,EACD,GAAG;QAjBD,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,OAAO,aAAA,EACP,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,eAAe,qBAAA,EACf,YAAY,kBAAA,EACZ,SAAS,eAAA;IAIX,OAAO,CACL,qCACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,WAAW,CAAC,EACnB,SAAS,IAAI,MAAM,CAAC,gBAAgB,CAAC,EACrC,UAAU,IAAI,MAAM,CAAC,qBAAqB,CAAC,EAC3C,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,UAAU,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC1C,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,CAAC,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACvD,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACzC,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,EAC9C,YAAY,IAAI,MAAM,CAAC,eAAe,CAAC,EACvC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAClC,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,IACJ,gBAAgB,GAEnB,QAAQ,CACN,CACN,CAAC;AACJ,CAAC,CACF,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 styles from './styles.css.js';\n\nexport interface TableTdElementProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isFirstRow: boolean;\n isLastRow: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;\n onClick?: () => void;\n children?: React.ReactNode;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n hasSelection?: boolean;\n hasFooter?: boolean;\n isVisualRefresh?: boolean;\n}\n\nexport const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElementProps>(\n (\n {\n className,\n style,\n children,\n wrapLines,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n nativeAttributes,\n onClick,\n isEvenRow,\n stripedRows,\n isVisualRefresh,\n hasSelection,\n hasFooter,\n },\n ref\n ) => {\n return (\n <td\n style={style}\n className={clsx(\n className,\n styles['body-cell'],\n wrapLines && styles['body-cell-wrap'],\n isFirstRow && styles['body-cell-first-row'],\n isLastRow && styles['body-cell-last-row'],\n isSelected && styles['body-cell-selected'],\n isNextSelected && styles['body-cell-next-selected'],\n isPrevSelected && styles['body-cell-prev-selected'],\n !isEvenRow && stripedRows && styles['body-cell-shaded'],\n stripedRows && styles['has-striped-rows'],\n isVisualRefresh && styles['is-visual-refresh'],\n hasSelection && styles['has-selection'],\n hasFooter && styles['has-footer']\n )}\n onClick={onClick}\n ref={ref}\n {...nativeAttributes}\n >\n {children}\n </td>\n );\n }\n);\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function isScrollable(ele: HTMLElement): boolean;
|
|
3
|
+
export declare function getScrollableParent(ele: HTMLElement | null): HTMLElement;
|
|
4
|
+
export interface UseStableScrollPositionResult {
|
|
5
|
+
/** Stores the current scroll position of the nearest scrollable container. */
|
|
6
|
+
storeScrollPosition: () => void;
|
|
7
|
+
/** Restores the scroll position of the nearest scrollable container to the last stored position. */
|
|
8
|
+
restoreScrollPosition: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This hook stores the scroll position of the nearest scrollable parent of the
|
|
12
|
+
* `activeElementRef` when `storeScrollPosition` is called, and restores it when
|
|
13
|
+
* `restoreScrollPosition` is called.
|
|
14
|
+
* @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useStableScrollPosition<T extends HTMLElement>(activeElementRef: React.RefObject<T>): UseStableScrollPositionResult;
|
|
17
|
+
//# sourceMappingURL=use-stable-scroll-position.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-stable-scroll-position.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,WAK5C;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAMxE;AAED,MAAM,WAAW,6BAA6B;IAC5C,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,WAAW,EAC3D,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GACnC,6BAA6B,CAsB/B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { useCallback, useRef } from 'react';
|
|
4
|
+
export function isScrollable(ele) {
|
|
5
|
+
var overflowXStyle = window.getComputedStyle(ele).overflowX;
|
|
6
|
+
var isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;
|
|
7
|
+
return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;
|
|
8
|
+
}
|
|
9
|
+
export function getScrollableParent(ele) {
|
|
10
|
+
return !ele || ele === document.body
|
|
11
|
+
? document.body
|
|
12
|
+
: isScrollable(ele)
|
|
13
|
+
? ele
|
|
14
|
+
: getScrollableParent(ele.parentElement);
|
|
15
|
+
}
|
|
16
|
+
var shouldScroll = function (_a, _b) {
|
|
17
|
+
var cx = _a[0], cy = _a[1];
|
|
18
|
+
var px = _b[0], py = _b[1];
|
|
19
|
+
return cx - px > 5 || cy - py > 5;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* This hook stores the scroll position of the nearest scrollable parent of the
|
|
23
|
+
* `activeElementRef` when `storeScrollPosition` is called, and restores it when
|
|
24
|
+
* `restoreScrollPosition` is called.
|
|
25
|
+
* @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
|
|
26
|
+
*/
|
|
27
|
+
export function useStableScrollPosition(activeElementRef) {
|
|
28
|
+
var scrollRef = useRef();
|
|
29
|
+
var storeScrollPosition = useCallback(function () {
|
|
30
|
+
var _a;
|
|
31
|
+
var scrollableParent = getScrollableParent((_a = activeElementRef.current) !== null && _a !== void 0 ? _a : document.body);
|
|
32
|
+
if (scrollableParent) {
|
|
33
|
+
scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];
|
|
34
|
+
}
|
|
35
|
+
}, [activeElementRef]);
|
|
36
|
+
var restoreScrollPosition = useCallback(function () {
|
|
37
|
+
var _a;
|
|
38
|
+
var _b;
|
|
39
|
+
var scrollableParent = getScrollableParent((_b = activeElementRef.current) !== null && _b !== void 0 ? _b : document.body);
|
|
40
|
+
if (scrollRef.current &&
|
|
41
|
+
scrollRef.current.toString() !== '0,0' &&
|
|
42
|
+
shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])) {
|
|
43
|
+
_a = scrollRef.current, scrollableParent.scrollLeft = _a[0], scrollableParent.scrollTop = _a[1];
|
|
44
|
+
}
|
|
45
|
+
}, [activeElementRef]);
|
|
46
|
+
return { storeScrollPosition: storeScrollPosition, restoreScrollPosition: restoreScrollPosition };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=use-stable-scroll-position.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-stable-scroll-position.js","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,UAAU,YAAY,CAAC,GAAgB;IAC3C,IAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9D,IAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjE,OAAO,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,CAAC,gBAAgB,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAuB;IACzD,OAAO,CAAC,GAAG,IAAI,GAAG,KAAK,QAAQ,CAAC,IAAI;QAClC,CAAC,CAAC,QAAQ,CAAC,IAAI;QACf,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC;YACnB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC;AASD,IAAM,YAAY,GAAG,UAAC,EAA0B,EAAE,EAA0B;QAArD,EAAE,QAAA,EAAE,EAAE,QAAA;QAAsB,EAAE,QAAA,EAAE,EAAE,QAAA;IACvD,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,gBAAoC;IAEpC,IAAM,SAAS,GAAG,MAAM,EAAyC,CAAC;IAElE,IAAM,mBAAmB,GAAG,WAAW,CAAC;;QACtC,IAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAA,gBAAgB,CAAC,OAAO,mCAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,IAAI,gBAAgB,EAAE;YACpB,SAAS,CAAC,OAAO,GAAG,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;SAC/E;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,IAAM,qBAAqB,GAAG,WAAW,CAAC;;;QACxC,IAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAA,gBAAgB,CAAC,OAAO,mCAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxF,IACE,SAAS,CAAC,OAAO;YACjB,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,KAAK;YACtC,YAAY,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAC1F;YACA,KAA4D,SAAS,CAAC,OAAO,EAA5E,gBAAgB,CAAC,UAAU,QAAA,EAAE,gBAAgB,CAAC,SAAS,QAAA,CAAsB;SAC/E;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,mBAAmB,qBAAA,EAAE,qBAAqB,uBAAA,EAAE,CAAC;AACxD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useRef } from 'react';\n\nexport function isScrollable(ele: HTMLElement) {\n const overflowXStyle = window.getComputedStyle(ele).overflowX;\n const isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;\n\n return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;\n}\n\nexport function getScrollableParent(ele: HTMLElement | null): HTMLElement {\n return !ele || ele === document.body\n ? document.body\n : isScrollable(ele)\n ? ele\n : getScrollableParent(ele.parentElement);\n}\n\nexport interface UseStableScrollPositionResult {\n /** Stores the current scroll position of the nearest scrollable container. */\n storeScrollPosition: () => void;\n /** Restores the scroll position of the nearest scrollable container to the last stored position. */\n restoreScrollPosition: () => void;\n}\n\nconst shouldScroll = ([cx, cy]: [number, number], [px, py]: [number, number]) => {\n return cx - px > 5 || cy - py > 5;\n};\n\n/**\n * This hook stores the scroll position of the nearest scrollable parent of the\n * `activeElementRef` when `storeScrollPosition` is called, and restores it when\n * `restoreScrollPosition` is called.\n * @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.\n */\nexport function useStableScrollPosition<T extends HTMLElement>(\n activeElementRef: React.RefObject<T>\n): UseStableScrollPositionResult {\n const scrollRef = useRef<Parameters<HTMLBodyElement['scroll']>>();\n\n const storeScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (scrollableParent) {\n scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];\n }\n }, [activeElementRef]);\n\n const restoreScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (\n scrollRef.current &&\n scrollRef.current.toString() !== '0,0' &&\n shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])\n ) {\n [scrollableParent.scrollLeft, scrollableParent.scrollTop] = scrollRef.current;\n }\n }, [activeElementRef]);\n\n return { storeScrollPosition, restoreScrollPosition };\n}\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from '../interfaces';
|
|
3
|
-
interface TableHeaderCellProps {
|
|
3
|
+
interface TableHeaderCellProps<ItemType> {
|
|
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<ItemType>;
|
|
8
|
+
activeSortingColumn?: TableProps.SortingColumn<ItemType>;
|
|
9
|
+
sortingDescending?: boolean;
|
|
10
|
+
sortingDisabled?: boolean;
|
|
11
|
+
wrapLines?: boolean;
|
|
12
12
|
showFocusRing: boolean;
|
|
13
13
|
hidden?: boolean;
|
|
14
14
|
onClick(detail: TableProps.SortingState<any>): void;
|
|
@@ -18,7 +18,8 @@ interface TableHeaderCellProps {
|
|
|
18
18
|
onFocus?: () => void;
|
|
19
19
|
onBlur?: () => void;
|
|
20
20
|
resizableColumns?: boolean;
|
|
21
|
+
isEditable?: boolean;
|
|
21
22
|
}
|
|
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;
|
|
23
|
+
export declare function TableHeaderCell<ItemType>({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, isEditable, }: TableHeaderCellProps<ItemType>): JSX.Element;
|
|
23
24
|
export {};
|
|
24
25
|
//# 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,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,UAAU,oBAAoB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,UAAU,oBAAoB,CAAC,QAAQ;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACpD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,EACxC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eA0FhC"}
|
|
@@ -12,7 +12,8 @@ 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
|
|
15
|
+
var _e;
|
|
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;
|
|
16
17
|
var focusVisible = useFocusVisible();
|
|
17
18
|
var sortable = !!column.sortingComparator || !!column.sortingField;
|
|
18
19
|
var sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);
|
|
@@ -54,7 +55,10 @@ export function TableHeaderCell(_a) {
|
|
|
54
55
|
})
|
|
55
56
|
: undefined }, (sortingDisabled || !sortingStatus
|
|
56
57
|
? (_d = {}, _d['aria-disabled'] = 'true', _d) : __assign(__assign({ onKeyPress: handleKeyPress, tabIndex: tabIndex, role: 'button' }, focusVisible), { onClick: handleClick, onFocus: onFocus, onBlur: onBlur }))),
|
|
57
|
-
React.createElement("div", { className: clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap']), id: headerId },
|
|
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),
|
|
58
62
|
sortingStatus && (React.createElement("span", { className: styles['sorting-icon'] },
|
|
59
63
|
React.createElement(InternalIcon, { name: getSortingIconName(sortingStatus) })))),
|
|
60
64
|
resizableColumns && (React.createElement(React.Fragment, null,
|