@cloudscape-design/components 3.0.162 → 3.0.163
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/app-layout/visual-refresh/styles.css.js +60 -60
- package/app-layout/visual-refresh/styles.scoped.css +147 -147
- package/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/button/internal.d.ts +1 -0
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -2
- package/button/internal.js.map +1 -1
- package/code-editor/index.d.ts.map +1 -1
- package/code-editor/index.js +5 -8
- package/code-editor/index.js.map +1 -1
- package/code-editor/pane.d.ts.map +1 -1
- package/code-editor/pane.js +4 -4
- package/code-editor/pane.js.map +1 -1
- package/code-editor/resizable-box/index.d.ts +9 -0
- package/code-editor/resizable-box/index.d.ts.map +1 -0
- package/code-editor/resizable-box/index.js +44 -0
- package/code-editor/resizable-box/index.js.map +1 -0
- package/code-editor/resizable-box/styles.css.js +8 -0
- package/code-editor/resizable-box/styles.scoped.css +50 -0
- package/code-editor/resizable-box/styles.selectors.js +9 -0
- package/code-editor/styles.css.js +32 -33
- package/code-editor/styles.scoped.css +109 -139
- package/code-editor/styles.selectors.js +32 -33
- package/flashbar/styles.css.js +33 -33
- package/flashbar/styles.scoped.css +115 -115
- package/flashbar/styles.selectors.js +33 -33
- package/form-field/interfaces.d.ts +10 -0
- 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 +5 -4
- package/form-field/internal.js.map +1 -1
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +16 -4
- package/input/internal.js.map +1 -1
- package/internal/components/live-region/index.d.ts +1 -1
- package/internal/components/live-region/index.d.ts.map +1 -1
- package/internal/components/live-region/index.js +29 -6
- package/internal/components/live-region/index.js.map +1 -1
- package/internal/context/form-field-context.d.ts +6 -2
- package/internal/context/form-field-context.d.ts.map +1 -1
- package/internal/context/form-field-context.js +7 -1
- package/internal/context/form-field-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/manifest.json +1 -1
- package/internal/types.d.ts +9 -0
- package/internal/types.d.ts.map +1 -1
- package/internal/types.js +0 -2
- package/internal/types.js.map +1 -1
- package/mixed-line-bar-chart/styles.css.js +19 -19
- package/mixed-line-bar-chart/styles.scoped.css +26 -26
- package/mixed-line-bar-chart/styles.selectors.js +19 -19
- package/package.json +30 -34
- package/progress-bar/index.d.ts.map +1 -1
- package/progress-bar/index.js +14 -3
- package/progress-bar/index.js.map +1 -1
- package/select/parts/styles.css.js +9 -9
- package/select/parts/styles.scoped.css +27 -9
- package/select/parts/styles.selectors.js +9 -9
- package/table/body-cell/click-away.d.ts +9 -0
- package/table/body-cell/click-away.d.ts.map +1 -0
- package/table/body-cell/click-away.js +38 -0
- package/table/body-cell/click-away.js.map +1 -0
- package/table/body-cell/index.d.ts +10 -19
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +49 -9
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/inline-editor.d.ts +12 -0
- package/table/body-cell/inline-editor.d.ts.map +1 -0
- package/table/body-cell/inline-editor.js +88 -0
- package/table/body-cell/inline-editor.js.map +1 -0
- package/table/body-cell/styles.css.js +18 -12
- package/table/body-cell/styles.scoped.css +229 -46
- package/table/body-cell/styles.selectors.js +18 -12
- package/table/body-cell/td-element.d.ts +21 -0
- package/table/body-cell/td-element.d.ts.map +1 -0
- package/table/body-cell/td-element.js +11 -0
- package/table/body-cell/td-element.js.map +1 -0
- package/table/body-cell/use-stable-scroll-position.d.ts +17 -0
- package/table/body-cell/use-stable-scroll-position.d.ts.map +1 -0
- package/table/body-cell/use-stable-scroll-position.js +48 -0
- package/table/body-cell/use-stable-scroll-position.js.map +1 -0
- package/table/header-cell/index.d.ts +8 -7
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +6 -2
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +19 -18
- package/table/header-cell/styles.scoped.css +40 -35
- package/table/header-cell/styles.selectors.js +19 -18
- package/table/interfaces.d.ts +73 -6
- 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 +68 -18
- 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/use-table-focus-navigation.d.ts +16 -0
- package/table/use-table-focus-navigation.d.ts.map +1 -0
- package/table/use-table-focus-navigation.js +131 -0
- package/table/use-table-focus-navigation.js.map +1 -0
- package/tabs/index.d.ts +1 -1
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +2 -2
- package/tabs/index.js.map +1 -1
- package/tabs/interfaces.d.ts +14 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tabs/tab-header-bar.d.ts +2 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +3 -7
- package/tabs/tab-header-bar.js.map +1 -1
- package/test-utils/dom/table/index.d.ts +4 -0
- package/test-utils/dom/table/index.js +21 -5
- package/test-utils/dom/table/index.js.map +1 -1
- package/test-utils/selectors/table/index.d.ts +4 -0
- package/test-utils/selectors/table/index.js +21 -5
- package/test-utils/selectors/table/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/code-editor/resize-handler.d.ts +0 -3
- package/code-editor/resize-handler.d.ts.map +0 -1
- package/code-editor/resize-handler.js +0 -7
- package/code-editor/resize-handler.js.map +0 -1
- package/internal/components/dynamic-aria-live/index.d.ts +0 -28
- package/internal/components/dynamic-aria-live/index.d.ts.map +0 -1
- package/internal/components/dynamic-aria-live/index.js +0 -38
- package/internal/components/dynamic-aria-live/index.js.map +0 -1
- package/internal/components/live-region/aria-liva-tag.d.ts +0 -13
- package/internal/components/live-region/aria-liva-tag.d.ts.map +0 -1
- package/internal/components/live-region/aria-liva-tag.js +0 -18
- package/internal/components/live-region/aria-liva-tag.js.map +0 -1
- package/internal/components/live-region/utils.d.ts +0 -8
- package/internal/components/live-region/utils.d.ts.map +0 -1
- package/internal/components/live-region/utils.js +0 -24
- package/internal/components/live-region/utils.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"series": "
|
|
5
|
-
"series--bar": "awsui_series--
|
|
6
|
-
"series__rect": "
|
|
7
|
-
"exiting": "
|
|
8
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
9
|
-
"root": "
|
|
10
|
-
"filter-container": "awsui_filter-
|
|
11
|
-
"has-default-filter": "awsui_has-default-
|
|
12
|
-
"chart-container": "awsui_chart-
|
|
13
|
-
"chart-container__vertical": "awsui_chart-
|
|
14
|
-
"chart-container__horizontal": "awsui_chart-
|
|
15
|
-
"content": "
|
|
16
|
-
"content--reserve-filter": "awsui_content--reserve-
|
|
17
|
-
"content--reserve-legend": "awsui_content--reserve-
|
|
18
|
-
"series--highlighted": "awsui_series--
|
|
19
|
-
"series__bar--highlighted": "awsui_series__bar--
|
|
20
|
-
"series--dimmed": "awsui_series--
|
|
21
|
-
"series--threshold": "awsui_series--
|
|
22
|
-
"bar-group": "awsui_bar-
|
|
4
|
+
"series": "awsui_series_1yz9c_1y8is_93",
|
|
5
|
+
"series--bar": "awsui_series--bar_1yz9c_1y8is_94",
|
|
6
|
+
"series__rect": "awsui_series__rect_1yz9c_1y8is_94",
|
|
7
|
+
"exiting": "awsui_exiting_1yz9c_1y8is_111",
|
|
8
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_1yz9c_1y8is_1",
|
|
9
|
+
"root": "awsui_root_1yz9c_1y8is_137",
|
|
10
|
+
"filter-container": "awsui_filter-container_1yz9c_1y8is_150",
|
|
11
|
+
"has-default-filter": "awsui_has-default-filter_1yz9c_1y8is_154",
|
|
12
|
+
"chart-container": "awsui_chart-container_1yz9c_1y8is_158",
|
|
13
|
+
"chart-container__vertical": "awsui_chart-container__vertical_1yz9c_1y8is_164",
|
|
14
|
+
"chart-container__horizontal": "awsui_chart-container__horizontal_1yz9c_1y8is_170",
|
|
15
|
+
"content": "awsui_content_1yz9c_1y8is_174",
|
|
16
|
+
"content--reserve-filter": "awsui_content--reserve-filter_1yz9c_1y8is_181",
|
|
17
|
+
"content--reserve-legend": "awsui_content--reserve-legend_1yz9c_1y8is_185",
|
|
18
|
+
"series--highlighted": "awsui_series--highlighted_1yz9c_1y8is_198",
|
|
19
|
+
"series__bar--highlighted": "awsui_series__bar--highlighted_1yz9c_1y8is_199",
|
|
20
|
+
"series--dimmed": "awsui_series--dimmed_1yz9c_1y8is_203",
|
|
21
|
+
"series--threshold": "awsui_series--threshold_1yz9c_1y8is_212",
|
|
22
|
+
"bar-group": "awsui_bar-group_1yz9c_1y8is_217"
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -90,26 +90,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
94
|
-
.awsui_series--
|
|
93
|
+
.awsui_series_1yz9c_1y8is_93:not(#\9),
|
|
94
|
+
.awsui_series--bar_1yz9c_1y8is_94 > .awsui_series__rect_1yz9c_1y8is_94:not(#\9) {
|
|
95
95
|
transition: opacity var(--motion-duration-transition-quick-x85tae, 90ms) var(--motion-easing-transition-quick-lukbd8, linear);
|
|
96
96
|
}
|
|
97
97
|
@media (prefers-reduced-motion: reduce) {
|
|
98
|
-
.
|
|
99
|
-
.awsui_series--
|
|
98
|
+
.awsui_series_1yz9c_1y8is_93:not(#\9),
|
|
99
|
+
.awsui_series--bar_1yz9c_1y8is_94 > .awsui_series__rect_1yz9c_1y8is_94:not(#\9) {
|
|
100
100
|
animation: none;
|
|
101
101
|
transition: none;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
.awsui-motion-disabled .
|
|
104
|
+
.awsui-motion-disabled .awsui_series_1yz9c_1y8is_93:not(#\9), .awsui-mode-entering .awsui_series_1yz9c_1y8is_93:not(#\9), .awsui-motion-disabled .awsui_series--bar_1yz9c_1y8is_94 > .awsui_series__rect_1yz9c_1y8is_94:not(#\9), .awsui-mode-entering .awsui_series--bar_1yz9c_1y8is_94 > .awsui_series__rect_1yz9c_1y8is_94:not(#\9) {
|
|
105
105
|
animation: none;
|
|
106
106
|
transition: none;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
110
|
-
animation: awsui_awsui-motion-fade-out-
|
|
109
|
+
.awsui_exiting_1yz9c_1y8is_111:not(#\9) {
|
|
110
|
+
animation: awsui_awsui-motion-fade-out-0_1yz9c_1y8is_1 var(--motion-duration-refresh-only-fast-addxjd, 115ms) var(--motion-easing-refresh-only-b-nspng9, cubic-bezier(1, 0, 0.83, 1));
|
|
111
111
|
}
|
|
112
|
-
@keyframes awsui_awsui-motion-fade-out-
|
|
112
|
+
@keyframes awsui_awsui-motion-fade-out-0_1yz9c_1y8is_1 {
|
|
113
113
|
from {
|
|
114
114
|
opacity: 1;
|
|
115
115
|
}
|
|
@@ -118,12 +118,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
@media (prefers-reduced-motion: reduce) {
|
|
121
|
-
.
|
|
121
|
+
.awsui_exiting_1yz9c_1y8is_111:not(#\9) {
|
|
122
122
|
animation: none;
|
|
123
123
|
transition: none;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
.awsui-motion-disabled .
|
|
126
|
+
.awsui-motion-disabled .awsui_exiting_1yz9c_1y8is_111:not(#\9), .awsui-mode-entering .awsui_exiting_1yz9c_1y8is_111:not(#\9) {
|
|
127
127
|
animation: none;
|
|
128
128
|
transition: none;
|
|
129
129
|
}
|
|
@@ -132,7 +132,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
132
132
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
133
133
|
SPDX-License-Identifier: Apache-2.0
|
|
134
134
|
*/
|
|
135
|
-
.
|
|
135
|
+
.awsui_root_1yz9c_1y8is_137:not(#\9) {
|
|
136
136
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
137
137
|
border-collapse: separate;
|
|
138
138
|
border-spacing: 0;
|
|
@@ -171,46 +171,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
171
171
|
display: block;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
.awsui_filter-
|
|
174
|
+
.awsui_filter-container_1yz9c_1y8is_150:not(#\9) {
|
|
175
175
|
/* used in test-utils */
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.awsui_has-default-
|
|
178
|
+
.awsui_has-default-filter_1yz9c_1y8is_154 > :not(#\9):first-child {
|
|
179
179
|
flex: 280px 0 1;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
.awsui_chart-
|
|
182
|
+
.awsui_chart-container_1yz9c_1y8is_158:not(#\9) {
|
|
183
183
|
display: flex;
|
|
184
184
|
width: 100%;
|
|
185
185
|
flex-direction: column;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
.awsui_chart-
|
|
188
|
+
.awsui_chart-container__vertical_1yz9c_1y8is_164:not(#\9) {
|
|
189
189
|
display: flex;
|
|
190
190
|
flex-direction: column;
|
|
191
191
|
width: 100%;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.awsui_chart-
|
|
194
|
+
.awsui_chart-container__horizontal_1yz9c_1y8is_170:not(#\9) {
|
|
195
195
|
display: flex;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.
|
|
198
|
+
.awsui_content_1yz9c_1y8is_174:not(#\9) {
|
|
199
199
|
display: flex;
|
|
200
200
|
position: relative;
|
|
201
201
|
justify-content: center;
|
|
202
202
|
align-items: center;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
.awsui_content--reserve-
|
|
205
|
+
.awsui_content--reserve-filter_1yz9c_1y8is_181:not(#\9) {
|
|
206
206
|
margin-top: calc(2 * var(--font-body-m-line-height-i7xxvv, 22px));
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.awsui_content--reserve-
|
|
209
|
+
.awsui_content--reserve-legend_1yz9c_1y8is_185:not(#\9) {
|
|
210
210
|
margin-bottom: calc(2 * var(--font-body-m-line-height-i7xxvv, 22px));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.
|
|
213
|
+
.awsui_series_1yz9c_1y8is_93:not(#\9) {
|
|
214
214
|
display: block;
|
|
215
215
|
stroke-width: var(--border-line-chart-width-nj0hc5, 2px);
|
|
216
216
|
fill: none;
|
|
@@ -219,25 +219,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
219
219
|
pointer-events: none;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.awsui_series--
|
|
223
|
-
.awsui_series__bar--
|
|
222
|
+
.awsui_series--highlighted_1yz9c_1y8is_198:not(#\9),
|
|
223
|
+
.awsui_series__bar--highlighted_1yz9c_1y8is_199:not(#\9) {
|
|
224
224
|
/* used in dom query */
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.awsui_series--
|
|
227
|
+
.awsui_series--dimmed_1yz9c_1y8is_203:not(#\9) {
|
|
228
228
|
opacity: 0.3;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.awsui_series--
|
|
231
|
+
.awsui_series--bar_1yz9c_1y8is_94 > .awsui_series__rect_1yz9c_1y8is_94:not(#\9) {
|
|
232
232
|
stroke: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
233
233
|
stroke-width: 2px;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
.awsui_series--
|
|
236
|
+
.awsui_series--threshold_1yz9c_1y8is_212:not(#\9) {
|
|
237
237
|
stroke-dasharray: var(--border-line-chart-dash-array-4wa4ab, 3 5);
|
|
238
238
|
stroke-width: var(--border-line-chart-width-nj0hc5, 2px);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
.awsui_bar-
|
|
241
|
+
.awsui_bar-group_1yz9c_1y8is_217:not(#\9) {
|
|
242
242
|
/* used in dom query */
|
|
243
243
|
}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"series": "
|
|
6
|
-
"series--bar": "awsui_series--
|
|
7
|
-
"series__rect": "
|
|
8
|
-
"exiting": "
|
|
9
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
10
|
-
"root": "
|
|
11
|
-
"filter-container": "awsui_filter-
|
|
12
|
-
"has-default-filter": "awsui_has-default-
|
|
13
|
-
"chart-container": "awsui_chart-
|
|
14
|
-
"chart-container__vertical": "awsui_chart-
|
|
15
|
-
"chart-container__horizontal": "awsui_chart-
|
|
16
|
-
"content": "
|
|
17
|
-
"content--reserve-filter": "awsui_content--reserve-
|
|
18
|
-
"content--reserve-legend": "awsui_content--reserve-
|
|
19
|
-
"series--highlighted": "awsui_series--
|
|
20
|
-
"series__bar--highlighted": "awsui_series__bar--
|
|
21
|
-
"series--dimmed": "awsui_series--
|
|
22
|
-
"series--threshold": "awsui_series--
|
|
23
|
-
"bar-group": "awsui_bar-
|
|
5
|
+
"series": "awsui_series_1yz9c_1y8is_93",
|
|
6
|
+
"series--bar": "awsui_series--bar_1yz9c_1y8is_94",
|
|
7
|
+
"series__rect": "awsui_series__rect_1yz9c_1y8is_94",
|
|
8
|
+
"exiting": "awsui_exiting_1yz9c_1y8is_111",
|
|
9
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_1yz9c_1y8is_1",
|
|
10
|
+
"root": "awsui_root_1yz9c_1y8is_137",
|
|
11
|
+
"filter-container": "awsui_filter-container_1yz9c_1y8is_150",
|
|
12
|
+
"has-default-filter": "awsui_has-default-filter_1yz9c_1y8is_154",
|
|
13
|
+
"chart-container": "awsui_chart-container_1yz9c_1y8is_158",
|
|
14
|
+
"chart-container__vertical": "awsui_chart-container__vertical_1yz9c_1y8is_164",
|
|
15
|
+
"chart-container__horizontal": "awsui_chart-container__horizontal_1yz9c_1y8is_170",
|
|
16
|
+
"content": "awsui_content_1yz9c_1y8is_174",
|
|
17
|
+
"content--reserve-filter": "awsui_content--reserve-filter_1yz9c_1y8is_181",
|
|
18
|
+
"content--reserve-legend": "awsui_content--reserve-legend_1yz9c_1y8is_185",
|
|
19
|
+
"series--highlighted": "awsui_series--highlighted_1yz9c_1y8is_198",
|
|
20
|
+
"series__bar--highlighted": "awsui_series__bar--highlighted_1yz9c_1y8is_199",
|
|
21
|
+
"series--dimmed": "awsui_series--dimmed_1yz9c_1y8is_203",
|
|
22
|
+
"series--threshold": "awsui_series--threshold_1yz9c_1y8is_212",
|
|
23
|
+
"bar-group": "awsui_bar-group_1yz9c_1y8is_217"
|
|
24
24
|
};
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
},
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"@cloudscape-design/collection-hooks": "^1.0.0",
|
|
7
|
-
"@cloudscape-design/test-utils-core": "^1.0.0",
|
|
8
|
-
"@cloudscape-design/theming-runtime": "^1.0.0",
|
|
9
|
-
"@juggle/resize-observer": "^3.3.1",
|
|
10
|
-
"ace-builds": "^1.4.13",
|
|
11
|
-
"balanced-match": "^1.0.2",
|
|
12
|
-
"clsx": "^1.1.0",
|
|
13
|
-
"d3-shape": "^1.3.7",
|
|
14
|
-
"date-fns": "^2.25.0",
|
|
15
|
-
"mnth": "^2.0.0",
|
|
16
|
-
"react-focus-lock": "~2.8.1",
|
|
17
|
-
"react-keyed-flatten-children": "^1.3.0",
|
|
18
|
-
"react-resizable": "^1.11.1",
|
|
19
|
-
"react-transition-group": "^4.4.2",
|
|
20
|
-
"react-virtual": "^2.8.2",
|
|
21
|
-
"tslib": "^2.4.0",
|
|
22
|
-
"weekstart": "^1.1.0"
|
|
23
|
-
},
|
|
2
|
+
"name": "@cloudscape-design/components",
|
|
3
|
+
"main": "./index.js",
|
|
24
4
|
"exports": {
|
|
25
5
|
".": "./index.js",
|
|
26
6
|
"./package.json": "./package.json",
|
|
@@ -96,22 +76,38 @@
|
|
|
96
76
|
"./wizard": "./wizard/index.js",
|
|
97
77
|
"./top-navigation/1.0-beta": "./top-navigation/1.0-beta/index.js"
|
|
98
78
|
},
|
|
99
|
-
"homepage": "https://cloudscape.design",
|
|
100
|
-
"main": "./index.js",
|
|
101
|
-
"name": "@cloudscape-design/components",
|
|
102
|
-
"peerDependencies": {
|
|
103
|
-
"react": "^16.8 || ^17 || ^18",
|
|
104
|
-
"react-dom": "^16.8 || ^17 || ^18"
|
|
105
|
-
},
|
|
106
|
-
"repository": {
|
|
107
|
-
"type": "git",
|
|
108
|
-
"url": "git+https://github.com/cloudscape-design/components.git"
|
|
109
|
-
},
|
|
110
79
|
"sideEffects": [
|
|
111
80
|
"*.css",
|
|
112
81
|
"./internal/base-component/index.js",
|
|
113
82
|
"./internal/base-component/styles.css.js"
|
|
114
83
|
],
|
|
115
|
-
"version": "3.0.
|
|
84
|
+
"version": "3.0.163",
|
|
85
|
+
"repository": {
|
|
86
|
+
"type": "git",
|
|
87
|
+
"url": "https://github.com/cloudscape-design/components.git"
|
|
88
|
+
},
|
|
89
|
+
"homepage": "https://cloudscape.design",
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@cloudscape-design/collection-hooks": "^1.0.0",
|
|
92
|
+
"@cloudscape-design/test-utils-core": "^1.0.0",
|
|
93
|
+
"@cloudscape-design/theming-runtime": "^1.0.0",
|
|
94
|
+
"@juggle/resize-observer": "^3.3.1",
|
|
95
|
+
"ace-builds": "^1.4.13",
|
|
96
|
+
"balanced-match": "^1.0.2",
|
|
97
|
+
"clsx": "^1.1.0",
|
|
98
|
+
"d3-shape": "^1.3.7",
|
|
99
|
+
"date-fns": "^2.25.0",
|
|
100
|
+
"mnth": "^2.0.0",
|
|
101
|
+
"react-focus-lock": "~2.8.1",
|
|
102
|
+
"react-keyed-flatten-children": "^1.3.0",
|
|
103
|
+
"react-transition-group": "^4.4.2",
|
|
104
|
+
"react-virtual": "^2.8.2",
|
|
105
|
+
"tslib": "^2.4.0",
|
|
106
|
+
"weekstart": "^1.1.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"react": "^16.8 || ^17 || ^18",
|
|
110
|
+
"react-dom": "^16.8 || ^17 || ^18"
|
|
111
|
+
},
|
|
116
112
|
"license": "Apache-2.0"
|
|
117
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAS,EACT,MAAsB,EACtB,OAAsB,EACtB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,GAAG,IAAI,EACR,EAAE,gBAAgB,eA4DlB"}
|
package/progress-bar/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import { getBaseProps } from '../internal/base-component';
|
|
@@ -11,7 +11,9 @@ import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
|
11
11
|
import { Progress, ResultState, SmallText } from './internal';
|
|
12
12
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
13
13
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
14
|
-
import
|
|
14
|
+
import { throttle } from '../internal/utils/throttle';
|
|
15
|
+
import LiveRegion from '../internal/components/live-region';
|
|
16
|
+
var ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements
|
|
15
17
|
export default function ProgressBar(_a) {
|
|
16
18
|
var _b = _a.value, value = _b === void 0 ? 0 : _b, _c = _a.status, status = _c === void 0 ? 'in-progress' : _c, _d = _a.variant, variant = _d === void 0 ? 'standalone' : _d, resultButtonText = _a.resultButtonText, label = _a.label, description = _a.description, additionalInfo = _a.additionalInfo, resultText = _a.resultText, onResultButtonClick = _a.onResultButtonClick, rest = __rest(_a, ["value", "status", "variant", "resultButtonText", "label", "description", "additionalInfo", "resultText", "onResultButtonClick"]);
|
|
17
19
|
var __internalRootRef = useBaseComponent('ProgressBar').__internalRootRef;
|
|
@@ -20,6 +22,15 @@ export default function ProgressBar(_a) {
|
|
|
20
22
|
var labelId = "".concat(generatedName, "-label");
|
|
21
23
|
var isInFlash = variant === 'flash';
|
|
22
24
|
var isInProgressState = status === 'in-progress';
|
|
25
|
+
var _e = useState(''), assertion = _e[0], setAssertion = _e[1];
|
|
26
|
+
var throttledAssertion = useMemo(function () {
|
|
27
|
+
return throttle(function (value) {
|
|
28
|
+
setAssertion("".concat(label !== null && label !== void 0 ? label : '', ": ").concat(value, "%"));
|
|
29
|
+
}, ASSERTION_FREQUENCY);
|
|
30
|
+
}, [label]);
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
throttledAssertion(value);
|
|
33
|
+
}, [throttledAssertion, value]);
|
|
23
34
|
if (isInFlash && resultButtonText) {
|
|
24
35
|
warnOnce('ProgressBar', 'The `resultButtonText` is ignored if you set `variant="flash"`, and the result button is not displayed. Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item in which the progress bar component is embedded.');
|
|
25
36
|
}
|
|
@@ -29,7 +40,7 @@ export default function ProgressBar(_a) {
|
|
|
29
40
|
description && React.createElement(SmallText, { color: isInFlash ? 'inherit' : undefined }, description),
|
|
30
41
|
React.createElement("div", null, isInProgressState ? (React.createElement(React.Fragment, null,
|
|
31
42
|
React.createElement(Progress, { value: value, labelId: labelId, isInFlash: isInFlash }),
|
|
32
|
-
React.createElement(
|
|
43
|
+
React.createElement(LiveRegion, { delay: 0 }, assertion))) : (React.createElement(ResultState, { resultText: resultText, isInFlash: isInFlash, resultButtonText: resultButtonText, status: status, onClick: function () {
|
|
33
44
|
fireNonCancelableEvent(onResultButtonClick);
|
|
34
45
|
} })))),
|
|
35
46
|
additionalInfo && React.createElement(SmallText, { color: isInFlash ? 'inherit' : undefined }, additionalInfo)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/progress-bar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/progress-bar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,IAAI,MAA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,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAI;gBAClE,oBAAC,UAAU,IAAC,KAAK,EAAE,CAAC,IAAG,SAAS,CAAc,CAC7C,CACJ,CAAC,CAAC,CAAC,CACF,oBAAC,WAAW,IACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;oBACP,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;gBAC9C,CAAC,GACD,CACH,CACG,CACF;QACL,cAAc,IAAI,oBAAC,SAAS,IAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAG,cAAc,CAAa,CAChG,CACP,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { warnOnce } from '../internal/logging';\nimport { ProgressBarProps } from './interfaces';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { Progress, ResultState, SmallText } from './internal';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { throttle } from '../internal/utils/throttle';\nimport LiveRegion from '../internal/components/live-region';\n\nconst ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements\n\nexport { ProgressBarProps };\n\nexport default function ProgressBar({\n value = 0,\n status = 'in-progress',\n variant = 'standalone',\n resultButtonText,\n label,\n description,\n additionalInfo,\n resultText,\n onResultButtonClick,\n ...rest\n}: ProgressBarProps) {\n const { __internalRootRef } = useBaseComponent('ProgressBar');\n const baseProps = getBaseProps(rest);\n const generatedName = useUniqueId('awsui-progress-bar-');\n\n const labelId = `${generatedName}-label`;\n const isInFlash = variant === 'flash';\n const isInProgressState = status === 'in-progress';\n\n const [assertion, setAssertion] = useState('');\n const throttledAssertion = useMemo(() => {\n return throttle((value: ProgressBarProps['value']) => {\n setAssertion(`${label ?? ''}: ${value}%`);\n }, ASSERTION_FREQUENCY);\n }, [label]);\n\n useEffect(() => {\n throttledAssertion(value);\n }, [throttledAssertion, value]);\n\n if (isInFlash && resultButtonText) {\n warnOnce(\n 'ProgressBar',\n 'The `resultButtonText` is ignored if you set `variant=\"flash\"`, and the result button is not displayed. Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item in which the progress bar component is embedded.'\n );\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root, variant && styles[variant])}\n ref={__internalRootRef}\n >\n <div className={isInFlash ? styles['flash-container'] : undefined}>\n <div className={clsx(styles['word-wrap'], styles[`label-${variant}`])} id={labelId}>\n {label}\n </div>\n {description && <SmallText color={isInFlash ? 'inherit' : undefined}>{description}</SmallText>}\n <div>\n {isInProgressState ? (\n <>\n <Progress value={value} labelId={labelId} isInFlash={isInFlash} />\n <LiveRegion delay={0}>{assertion}</LiveRegion>\n </>\n ) : (\n <ResultState\n resultText={resultText}\n isInFlash={isInFlash}\n resultButtonText={resultButtonText}\n status={status}\n onClick={() => {\n fireNonCancelableEvent(onResultButtonClick);\n }}\n />\n )}\n </div>\n </div>\n {additionalInfo && <SmallText color={isInFlash ? 'inherit' : undefined}>{additionalInfo}</SmallText>}\n </div>\n );\n}\n\napplyDisplayName(ProgressBar, 'ProgressBar');\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"placeholder": "
|
|
5
|
-
"item": "
|
|
6
|
-
"checkbox": "
|
|
7
|
-
"filter": "
|
|
8
|
-
"trigger": "
|
|
9
|
-
"layout-strut": "awsui_layout-
|
|
10
|
-
"list-bottom": "awsui_list-
|
|
11
|
-
"selected-icon": "awsui_selected-
|
|
12
|
-
"show-label-tag": "awsui_show-label-
|
|
4
|
+
"placeholder": "awsui_placeholder_dwuol_1dl3j_93",
|
|
5
|
+
"item": "awsui_item_dwuol_1dl3j_98",
|
|
6
|
+
"checkbox": "awsui_checkbox_dwuol_1dl3j_102",
|
|
7
|
+
"filter": "awsui_filter_dwuol_1dl3j_111",
|
|
8
|
+
"trigger": "awsui_trigger_dwuol_1dl3j_116",
|
|
9
|
+
"layout-strut": "awsui_layout-strut_dwuol_1dl3j_140",
|
|
10
|
+
"list-bottom": "awsui_list-bottom_dwuol_1dl3j_146",
|
|
11
|
+
"selected-icon": "awsui_selected-icon_dwuol_1dl3j_150",
|
|
12
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_1dl3j_154"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -90,16 +90,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_placeholder_dwuol_1dl3j_93:not(#\9) {
|
|
94
94
|
color: var(--color-text-input-placeholder-j53j3c, #5f6b7a);
|
|
95
95
|
font-style: italic;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
98
|
+
.awsui_item_dwuol_1dl3j_98:not(#\9) {
|
|
99
99
|
display: flex;
|
|
100
100
|
align-items: center;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.awsui_item_dwuol_1dl3j_98 > .awsui_checkbox_dwuol_1dl3j_102:not(#\9) {
|
|
103
103
|
position: relative;
|
|
104
104
|
min-height: var(--size-control-n9i4yo, 16px);
|
|
105
105
|
min-width: var(--size-control-n9i4yo, 16px);
|
|
@@ -108,31 +108,49 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
108
108
|
margin-right: var(--space-field-horizontal-89h2yr, 12px);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.
|
|
111
|
+
.awsui_filter_dwuol_1dl3j_111:not(#\9) {
|
|
112
112
|
z-index: 4;
|
|
113
113
|
flex-shrink: 0;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.
|
|
116
|
+
.awsui_trigger_dwuol_1dl3j_116:not(#\9) {
|
|
117
117
|
white-space: nowrap;
|
|
118
118
|
overflow: hidden;
|
|
119
119
|
text-overflow: ellipsis;
|
|
120
120
|
}
|
|
121
|
+
.awsui_trigger_dwuol_1dl3j_116[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
.awsui_trigger_dwuol_1dl3j_116[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
125
|
+
outline: 2px dotted transparent;
|
|
126
|
+
outline-offset: calc(calc(-1 * var(--space-scaled-xs-6859qs, 8px)) - 1px);
|
|
127
|
+
}
|
|
128
|
+
.awsui_trigger_dwuol_1dl3j_116[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
129
|
+
content: " ";
|
|
130
|
+
display: block;
|
|
131
|
+
position: absolute;
|
|
132
|
+
left: calc(-1 * calc(-1 * var(--space-scaled-xs-6859qs, 8px)));
|
|
133
|
+
top: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
134
|
+
width: calc(100% + 2 * calc(-1 * var(--space-scaled-xs-6859qs, 8px)));
|
|
135
|
+
height: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
|
|
136
|
+
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
137
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
138
|
+
}
|
|
121
139
|
|
|
122
|
-
.awsui_layout-
|
|
140
|
+
.awsui_layout-strut_dwuol_1dl3j_140:not(#\9) {
|
|
123
141
|
width: 100%;
|
|
124
142
|
position: relative;
|
|
125
143
|
transform: translate3d(0, 0, 0);
|
|
126
144
|
}
|
|
127
145
|
|
|
128
|
-
.awsui_list-
|
|
146
|
+
.awsui_list-bottom_dwuol_1dl3j_146:not(#\9) {
|
|
129
147
|
/* used in unit-tests */
|
|
130
148
|
}
|
|
131
149
|
|
|
132
|
-
.awsui_selected-
|
|
150
|
+
.awsui_selected-icon_dwuol_1dl3j_150:not(#\9) {
|
|
133
151
|
color: var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
134
152
|
}
|
|
135
153
|
|
|
136
|
-
.awsui_show-label-
|
|
154
|
+
.awsui_show-label-tag_dwuol_1dl3j_154 > .awsui_selected-icon_dwuol_1dl3j_150:not(#\9) {
|
|
137
155
|
padding-left: var(--space-scaled-s-cu1hzn, 12px);
|
|
138
156
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"placeholder": "
|
|
6
|
-
"item": "
|
|
7
|
-
"checkbox": "
|
|
8
|
-
"filter": "
|
|
9
|
-
"trigger": "
|
|
10
|
-
"layout-strut": "awsui_layout-
|
|
11
|
-
"list-bottom": "awsui_list-
|
|
12
|
-
"selected-icon": "awsui_selected-
|
|
13
|
-
"show-label-tag": "awsui_show-label-
|
|
5
|
+
"placeholder": "awsui_placeholder_dwuol_1dl3j_93",
|
|
6
|
+
"item": "awsui_item_dwuol_1dl3j_98",
|
|
7
|
+
"checkbox": "awsui_checkbox_dwuol_1dl3j_102",
|
|
8
|
+
"filter": "awsui_filter_dwuol_1dl3j_111",
|
|
9
|
+
"trigger": "awsui_trigger_dwuol_1dl3j_116",
|
|
10
|
+
"layout-strut": "awsui_layout-strut_dwuol_1dl3j_140",
|
|
11
|
+
"list-bottom": "awsui_list-bottom_dwuol_1dl3j_146",
|
|
12
|
+
"selected-icon": "awsui_selected-icon_dwuol_1dl3j_150",
|
|
13
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_1dl3j_154"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function useClickAway(onClick: () => void): React.MutableRefObject<any>;
|
|
3
|
+
interface ClickAwayActive {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function ClickAway({ onClick, children }: ClickAwayActive): JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=click-away.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"click-away.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/click-away.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,IAAI,+BAgB/C;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,eAa/D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
4
|
+
import { containsOrEqual } from '../../internal/utils/dom';
|
|
5
|
+
import { useStableEventHandler } from '../../internal/hooks/use-stable-event-handler';
|
|
6
|
+
export function useClickAway(onClick) {
|
|
7
|
+
var awayRef = useRef(null);
|
|
8
|
+
var onClickStable = useStableEventHandler(onClick);
|
|
9
|
+
useEffect(function () {
|
|
10
|
+
function handleClick(event) {
|
|
11
|
+
if (!containsOrEqual(awayRef.current, event.target)) {
|
|
12
|
+
onClickStable();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// contains returns wrong result if the next render would remove the element
|
|
16
|
+
// but capture phase happens before the render, so returns correct result
|
|
17
|
+
// Ref: https://github.com/facebook/react/issues/20325
|
|
18
|
+
document.addEventListener('click', handleClick, { capture: true });
|
|
19
|
+
return function () { return document.removeEventListener('click', handleClick, { capture: true }); };
|
|
20
|
+
}, [onClickStable]);
|
|
21
|
+
return awayRef;
|
|
22
|
+
}
|
|
23
|
+
export function ClickAway(_a) {
|
|
24
|
+
var onClick = _a.onClick, children = _a.children;
|
|
25
|
+
var onClickStable = useStableEventHandler(onClick);
|
|
26
|
+
var ref = useRef(null);
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
function handleClick(event) {
|
|
29
|
+
if (!containsOrEqual(ref.current, event.target)) {
|
|
30
|
+
onClickStable();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
document.addEventListener('click', handleClick, true);
|
|
34
|
+
return function () { return document.removeEventListener('click', handleClick, true); };
|
|
35
|
+
}, [onClickStable]);
|
|
36
|
+
return React.createElement("span", { ref: ref }, children);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=click-away.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"click-away.js","sourceRoot":"","sources":["../../../../src/table/body-cell/click-away.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,MAAM,UAAU,YAAY,CAAC,OAAmB;IAC9C,IAAM,OAAO,GAAG,MAAM,CAAM,IAAI,CAAC,CAAC;IAClC,IAAM,aAAa,GAAG,qBAAqB,CAAC,OAAO,C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Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { containsOrEqual } from '../../internal/utils/dom';\nimport { useStableEventHandler } from '../../internal/hooks/use-stable-event-handler';\n\nexport function useClickAway(onClick: () => void) {\n const awayRef = useRef<any>(null);\n const onClickStable = useStableEventHandler(onClick);\n useEffect(() => {\n function handleClick(event: Event) {\n if (!containsOrEqual(awayRef.current, event.target as Node)) {\n onClickStable();\n }\n }\n // contains returns wrong result if the next render would remove the element\n // but capture phase happens before the render, so returns correct result\n // Ref: https://github.com/facebook/react/issues/20325\n document.addEventListener('click', handleClick, { capture: true });\n return () => document.removeEventListener('click', handleClick, { capture: true });\n }, [onClickStable]);\n return awayRef;\n}\n\ninterface ClickAwayActive {\n onClick: () => void;\n children: React.ReactNode;\n}\nexport function ClickAway({ onClick, children }: ClickAwayActive) {\n const onClickStable = useStableEventHandler(onClick);\n const ref = useRef<HTMLSpanElement>(null);\n useEffect(() => {\n function handleClick(event: Event) {\n if (!containsOrEqual(ref.current, event.target as Node)) {\n onClickStable();\n }\n }\n document.addEventListener('click', handleClick, true);\n return () => document.removeEventListener('click', handleClick, true);\n }, [onClickStable]);\n return <span ref={ref}>{children}</span>;\n}\n"]}
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TableProps } from '../interfaces';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
wrapLines: boolean | undefined;
|
|
7
|
-
isFirstRow: boolean;
|
|
8
|
-
isLastRow: boolean;
|
|
9
|
-
isEvenRow?: boolean;
|
|
10
|
-
stripedRows?: boolean;
|
|
11
|
-
isSelected: boolean;
|
|
12
|
-
isNextSelected: boolean;
|
|
13
|
-
isPrevSelected: boolean;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
hasSelection?: boolean;
|
|
16
|
-
hasFooter?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function TableBodyCell({ className, style, children, wrapLines, isFirstRow, isLastRow, isSelected, isNextSelected, isPrevSelected, isEvenRow, stripedRows, hasSelection, hasFooter, }: TableBodyCellProps): JSX.Element;
|
|
19
|
-
interface TableBodyCellContentProps<ItemType> extends TableBodyCellProps {
|
|
2
|
+
import { TableTdElementProps } from './td-element';
|
|
3
|
+
interface TableBodyCellProps<ItemType> extends TableTdElementProps {
|
|
20
4
|
column: TableProps.ColumnDefinition<ItemType>;
|
|
21
5
|
item: ItemType;
|
|
6
|
+
isEditing: boolean;
|
|
7
|
+
onEditStart: () => void;
|
|
8
|
+
onEditEnd: () => void;
|
|
9
|
+
submitEdit?: TableProps.SubmitEditFunction<ItemType>;
|
|
10
|
+
ariaLabels: TableProps['ariaLabels'];
|
|
22
11
|
}
|
|
23
|
-
export declare function
|
|
12
|
+
export declare function TableBodyCell<ItemType>({ isEditable, ...rest }: TableBodyCellProps<ItemType> & {
|
|
13
|
+
isEditable: boolean;
|
|
14
|
+
}): JSX.Element;
|
|
24
15
|
export {};
|
|
25
16
|
//# sourceMappingURL=index.d.ts.map
|