@cloudscape-design/components 3.0.1124 → 3.0.1125
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/runtime-drawer/index.d.ts +3 -0
- package/app-layout/runtime-drawer/index.d.ts.map +1 -1
- package/app-layout/runtime-drawer/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.js +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.js +1 -1
- package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/index.js +1 -1
- package/app-layout/visual-refresh-toolbar/state/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts +6 -0
- package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +9 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +6 -0
- package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +35 -34
- package/expandable-section/styles.scoped.css +68 -65
- package/expandable-section/styles.selectors.js +35 -34
- package/header/styles.css.js +34 -34
- package/header/styles.scoped.css +68 -50
- package/header/styles.selectors.js +34 -34
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/chart-popover/index.d.ts.map +1 -1
- package/internal/components/chart-popover/index.js +20 -14
- package/internal/components/chart-popover/index.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/hooks/forward-focus/radio-group.js +1 -9
- package/internal/hooks/forward-focus/radio-group.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/widget/interfaces.d.ts +3 -0
- package/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/internal/plugins/widget/interfaces.js.map +1 -1
- package/internal/utils/dom.d.ts +2 -1
- package/internal/utils/dom.d.ts.map +1 -1
- package/internal/utils/dom.js +3 -0
- package/internal/utils/dom.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +2 -3
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/domain.d.ts.map +1 -1
- package/mixed-line-bar-chart/domain.js +4 -32
- package/mixed-line-bar-chart/domain.js.map +1 -1
- package/package.json +1 -1
- package/popover/internal.js +1 -1
- package/popover/internal.js.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.js +1 -1
- package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
- package/tag-editor/index.js +2 -2
- package/tag-editor/index.js.map +1 -1
- package/tag-editor/utils.d.ts +0 -4
- package/tag-editor/utils.d.ts.map +1 -1
- package/tag-editor/utils.js +0 -11
- package/tag-editor/utils.js.map +1 -1
- package/textarea/index.d.ts.map +1 -1
- package/textarea/index.js +1 -1
- package/textarea/interfaces.d.ts +48 -0
- package/textarea/interfaces.d.ts.map +1 -1
- package/textarea/interfaces.js.map +1 -1
- package/textarea/internal-do-not-use-core.js +3 -2
- package/textarea/internal-do-not-use-core.js.map +1 -1
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.d.ts +2 -0
- package/textarea/styles.d.ts.map +1 -0
- package/textarea/styles.js +42 -0
- package/textarea/styles.js.map +1 -0
- package/textarea/styles.scoped.css +42 -29
- package/textarea/styles.selectors.js +5 -5
package/header/styles.css.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"refresh": "
|
|
6
|
-
"root-no-actions": "awsui_root-no-
|
|
7
|
-
"root-variant-h2": "awsui_root-variant-
|
|
8
|
-
"root-variant-h3": "awsui_root-variant-
|
|
9
|
-
"root-has-description": "awsui_root-has-
|
|
10
|
-
"root-variant-h1": "awsui_root-variant-
|
|
11
|
-
"main": "
|
|
12
|
-
"no-wrap": "awsui_no-
|
|
13
|
-
"main-variant-h1": "awsui_main-variant-
|
|
14
|
-
"actions": "
|
|
15
|
-
"actions-centered": "awsui_actions-
|
|
16
|
-
"actions-variant-h1": "awsui_actions-variant-
|
|
17
|
-
"actions-variant-h2": "awsui_actions-variant-
|
|
18
|
-
"actions-variant-h3": "awsui_actions-variant-
|
|
19
|
-
"title": "
|
|
20
|
-
"title-variant-h1": "awsui_title-variant-
|
|
21
|
-
"title-variant-h2": "awsui_title-variant-
|
|
22
|
-
"title-variant-h3": "awsui_title-variant-
|
|
23
|
-
"virtual-space": "awsui_virtual-
|
|
24
|
-
"info": "
|
|
25
|
-
"description": "
|
|
26
|
-
"description-variant-h1": "awsui_description-variant-
|
|
27
|
-
"description-variant-h2": "awsui_description-variant-
|
|
28
|
-
"description-variant-h3": "awsui_description-variant-
|
|
29
|
-
"heading": "
|
|
30
|
-
"heading-variant-h1": "awsui_heading-variant-
|
|
31
|
-
"heading-variant-h2": "awsui_heading-variant-
|
|
32
|
-
"heading-variant-h3": "awsui_heading-variant-
|
|
33
|
-
"heading-text": "awsui_heading-
|
|
34
|
-
"heading-text-variant-h1": "awsui_heading-text-variant-
|
|
35
|
-
"heading-text-variant-h2": "awsui_heading-text-variant-
|
|
36
|
-
"heading-text-variant-h3": "awsui_heading-text-variant-
|
|
37
|
-
"counter": "
|
|
4
|
+
"root": "awsui_root_2qdw9_1rr34_185",
|
|
5
|
+
"refresh": "awsui_refresh_2qdw9_1rr34_221",
|
|
6
|
+
"root-no-actions": "awsui_root-no-actions_2qdw9_1rr34_221",
|
|
7
|
+
"root-variant-h2": "awsui_root-variant-h2_2qdw9_1rr34_224",
|
|
8
|
+
"root-variant-h3": "awsui_root-variant-h3_2qdw9_1rr34_224",
|
|
9
|
+
"root-has-description": "awsui_root-has-description_2qdw9_1rr34_224",
|
|
10
|
+
"root-variant-h1": "awsui_root-variant-h1_2qdw9_1rr34_233",
|
|
11
|
+
"main": "awsui_main_2qdw9_1rr34_243",
|
|
12
|
+
"no-wrap": "awsui_no-wrap_2qdw9_1rr34_253",
|
|
13
|
+
"main-variant-h1": "awsui_main-variant-h1_2qdw9_1rr34_259",
|
|
14
|
+
"actions": "awsui_actions_2qdw9_1rr34_267",
|
|
15
|
+
"actions-centered": "awsui_actions-centered_2qdw9_1rr34_272",
|
|
16
|
+
"actions-variant-h1": "awsui_actions-variant-h1_2qdw9_1rr34_275",
|
|
17
|
+
"actions-variant-h2": "awsui_actions-variant-h2_2qdw9_1rr34_279",
|
|
18
|
+
"actions-variant-h3": "awsui_actions-variant-h3_2qdw9_1rr34_283",
|
|
19
|
+
"title": "awsui_title_2qdw9_1rr34_299",
|
|
20
|
+
"title-variant-h1": "awsui_title-variant-h1_2qdw9_1rr34_304",
|
|
21
|
+
"title-variant-h2": "awsui_title-variant-h2_2qdw9_1rr34_311",
|
|
22
|
+
"title-variant-h3": "awsui_title-variant-h3_2qdw9_1rr34_317",
|
|
23
|
+
"virtual-space": "awsui_virtual-space_2qdw9_1rr34_338",
|
|
24
|
+
"info": "awsui_info_2qdw9_1rr34_344",
|
|
25
|
+
"description": "awsui_description_2qdw9_1rr34_348",
|
|
26
|
+
"description-variant-h1": "awsui_description-variant-h1_2qdw9_1rr34_355",
|
|
27
|
+
"description-variant-h2": "awsui_description-variant-h2_2qdw9_1rr34_359",
|
|
28
|
+
"description-variant-h3": "awsui_description-variant-h3_2qdw9_1rr34_366",
|
|
29
|
+
"heading": "awsui_heading_2qdw9_1rr34_377",
|
|
30
|
+
"heading-variant-h1": "awsui_heading-variant-h1_2qdw9_1rr34_402",
|
|
31
|
+
"heading-variant-h2": "awsui_heading-variant-h2_2qdw9_1rr34_407",
|
|
32
|
+
"heading-variant-h3": "awsui_heading-variant-h3_2qdw9_1rr34_412",
|
|
33
|
+
"heading-text": "awsui_heading-text_2qdw9_1rr34_418",
|
|
34
|
+
"heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_1rr34_421",
|
|
35
|
+
"heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_1rr34_429",
|
|
36
|
+
"heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_1rr34_437",
|
|
37
|
+
"counter": "awsui_counter_2qdw9_1rr34_446"
|
|
38
38
|
};
|
|
39
39
|
|
package/header/styles.scoped.css
CHANGED
|
@@ -178,7 +178,11 @@
|
|
|
178
178
|
*/
|
|
179
179
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
180
180
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
181
|
-
|
|
181
|
+
/*
|
|
182
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
183
|
+
SPDX-License-Identifier: Apache-2.0
|
|
184
|
+
*/
|
|
185
|
+
.awsui_root_2qdw9_1rr34_185:not(#\9) {
|
|
182
186
|
border-collapse: separate;
|
|
183
187
|
border-spacing: 0;
|
|
184
188
|
box-sizing: border-box;
|
|
@@ -214,29 +218,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
214
218
|
flex-wrap: wrap;
|
|
215
219
|
justify-content: space-between;
|
|
216
220
|
}
|
|
217
|
-
.
|
|
221
|
+
.awsui_root_2qdw9_1rr34_185.awsui_refresh_2qdw9_1rr34_221:not(#\9), .awsui_root_2qdw9_1rr34_185:not(#\9):not(.awsui_root-no-actions_2qdw9_1rr34_221) {
|
|
218
222
|
row-gap: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
219
223
|
}
|
|
220
|
-
.awsui_root-no-
|
|
224
|
+
.awsui_root-no-actions_2qdw9_1rr34_221.awsui_root-variant-h2_2qdw9_1rr34_224:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221), .awsui_root-no-actions_2qdw9_1rr34_221.awsui_root-variant-h3_2qdw9_1rr34_224:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221), .awsui_root-has-description_2qdw9_1rr34_224.awsui_root-variant-h2_2qdw9_1rr34_224:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221), .awsui_root-has-description_2qdw9_1rr34_224.awsui_root-variant-h3_2qdw9_1rr34_224:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
221
225
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
222
226
|
}
|
|
223
|
-
.awsui_root-no-
|
|
227
|
+
.awsui_root-no-actions_2qdw9_1rr34_221:not(#\9):not(.awsui_root-has-description_2qdw9_1rr34_224):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
224
228
|
padding-block-end: calc(var(--space-scaled-xs-xwoogq, 8px) + var(--space-xxxs-pajhad, 2px));
|
|
225
229
|
}
|
|
226
|
-
.awsui_root-no-
|
|
230
|
+
.awsui_root-no-actions_2qdw9_1rr34_221.awsui_refresh_2qdw9_1rr34_221.awsui_root-variant-h2_2qdw9_1rr34_224:not(#\9), .awsui_root-no-actions_2qdw9_1rr34_221.awsui_refresh_2qdw9_1rr34_221.awsui_root-variant-h3_2qdw9_1rr34_224:not(#\9) {
|
|
227
231
|
row-gap: var(--space-scaled-xxxs-oo06c7, 2px);
|
|
228
232
|
}
|
|
229
|
-
.
|
|
233
|
+
.awsui_root_2qdw9_1rr34_185.awsui_root-variant-h1_2qdw9_1rr34_233:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
230
234
|
row-gap: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
231
235
|
}
|
|
232
|
-
.awsui_root-no-
|
|
236
|
+
.awsui_root-no-actions_2qdw9_1rr34_221:not(#\9):not(.awsui_root-has-description_2qdw9_1rr34_224).awsui_refresh_2qdw9_1rr34_221.awsui_root-variant-h3_2qdw9_1rr34_224 {
|
|
233
237
|
padding-block-end: var(--space-scaled-xs-xwoogq, 8px);
|
|
234
238
|
}
|
|
235
|
-
.
|
|
239
|
+
.awsui_root_2qdw9_1rr34_185.awsui_root-variant-h1_2qdw9_1rr34_233.awsui_root-has-description_2qdw9_1rr34_224:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
236
240
|
padding-block-end: var(--space-scaled-2x-xxs-e79hr1, 4px);
|
|
237
241
|
}
|
|
238
242
|
|
|
239
|
-
.
|
|
243
|
+
.awsui_main_2qdw9_1rr34_243:not(#\9) {
|
|
240
244
|
word-wrap: break-word;
|
|
241
245
|
max-inline-size: 100%;
|
|
242
246
|
display: flex;
|
|
@@ -246,161 +250,175 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
246
250
|
column-gap: var(--space-xs-ymlm0b, 8px);
|
|
247
251
|
row-gap: calc(var(--space-scaled-xxs-pfm1nx, 4px) + var(--space-scaled-xxxs-oo06c7, 2px));
|
|
248
252
|
}
|
|
249
|
-
.
|
|
253
|
+
.awsui_main_2qdw9_1rr34_243.awsui_no-wrap_2qdw9_1rr34_253:not(#\9) {
|
|
250
254
|
flex-wrap: nowrap;
|
|
251
255
|
}
|
|
252
|
-
.
|
|
256
|
+
.awsui_main_2qdw9_1rr34_243.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
253
257
|
row-gap: var(--space-xxs-hwfkai, 4px);
|
|
254
258
|
}
|
|
255
|
-
.awsui_main-variant-
|
|
259
|
+
.awsui_main-variant-h1_2qdw9_1rr34_259:not(#\9) {
|
|
256
260
|
row-gap: var(--space-scaled-2x-xxs-e79hr1, 4px);
|
|
257
261
|
}
|
|
258
262
|
|
|
259
|
-
.awsui_root-has-
|
|
263
|
+
.awsui_root-has-description_2qdw9_1rr34_224 > .awsui_main_2qdw9_1rr34_243:not(#\9) {
|
|
260
264
|
row-gap: var(--space-scaled-2x-xxs-e79hr1, 4px);
|
|
261
265
|
}
|
|
262
266
|
|
|
263
|
-
.
|
|
267
|
+
.awsui_actions_2qdw9_1rr34_267:not(#\9) {
|
|
264
268
|
display: flex;
|
|
265
269
|
align-items: flex-start;
|
|
266
270
|
min-block-size: var(--size-vertical-input-p1d7xx, 32px);
|
|
267
271
|
}
|
|
268
|
-
.awsui_actions-
|
|
272
|
+
.awsui_actions-centered_2qdw9_1rr34_272:not(#\9) {
|
|
269
273
|
align-items: center;
|
|
270
274
|
}
|
|
271
|
-
.awsui_actions-variant-
|
|
275
|
+
.awsui_actions-variant-h1_2qdw9_1rr34_275.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
272
276
|
padding-block: calc((var(--line-height-heading-xl-hko6p0, 30px) - var(--size-vertical-input-p1d7xx, 32px)) / 2);
|
|
273
277
|
padding-inline: 0;
|
|
274
278
|
}
|
|
275
|
-
.awsui_actions-variant-
|
|
279
|
+
.awsui_actions-variant-h2_2qdw9_1rr34_279.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
276
280
|
padding-block: calc((var(--line-height-heading-l-mg5bx6, 24px) - var(--size-vertical-input-p1d7xx, 32px)) / 2);
|
|
277
281
|
padding-inline: 0;
|
|
278
282
|
}
|
|
279
|
-
.awsui_actions-variant-
|
|
283
|
+
.awsui_actions-variant-h3_2qdw9_1rr34_283.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
280
284
|
padding-block: calc((var(--line-height-heading-m-uoaqdh, 22px) - var(--size-vertical-input-p1d7xx, 32px)) / 2);
|
|
281
285
|
padding-inline: 0;
|
|
282
286
|
}
|
|
283
|
-
.awsui_actions-variant-
|
|
287
|
+
.awsui_actions-variant-h1_2qdw9_1rr34_275:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
284
288
|
padding-block: var(--space-scaled-xs-xwoogq, 8px);
|
|
285
289
|
padding-inline: 0;
|
|
286
290
|
}
|
|
287
|
-
.awsui_actions-variant-
|
|
291
|
+
.awsui_actions-variant-h2_2qdw9_1rr34_279:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221), .awsui_actions-variant-h3_2qdw9_1rr34_283:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
288
292
|
padding-block: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
289
293
|
padding-inline: 0;
|
|
290
294
|
}
|
|
291
|
-
.awsui_root-has-
|
|
295
|
+
.awsui_root-has-description_2qdw9_1rr34_224 > .awsui_main_2qdw9_1rr34_243 > .awsui_actions_2qdw9_1rr34_267:not(#\9) {
|
|
292
296
|
padding-block-end: 0;
|
|
293
297
|
}
|
|
294
298
|
|
|
295
|
-
.
|
|
299
|
+
.awsui_title_2qdw9_1rr34_299:not(#\9) {
|
|
296
300
|
min-inline-size: 0;
|
|
297
301
|
word-break: break-word;
|
|
298
302
|
color: var(--color-text-heading-default-izpp46, #0f141a);
|
|
299
303
|
}
|
|
300
|
-
.awsui_title-variant-
|
|
304
|
+
.awsui_title-variant-h1_2qdw9_1rr34_304:not(#\9) {
|
|
301
305
|
font-size: var(--font-size-heading-xl-wvkbur, 24px);
|
|
302
306
|
padding-block-start: var(--space-scaled-2x-xxs-e79hr1, 4px);
|
|
303
307
|
}
|
|
304
|
-
.awsui_title-variant-
|
|
308
|
+
.awsui_title-variant-h1_2qdw9_1rr34_304.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
305
309
|
padding-block-start: calc((var(--size-vertical-input-p1d7xx, 32px) - var(--line-height-heading-xl-hko6p0, 30px)) / 2);
|
|
306
310
|
}
|
|
307
|
-
.awsui_title-variant-
|
|
311
|
+
.awsui_title-variant-h2_2qdw9_1rr34_311:not(#\9) {
|
|
308
312
|
font-size: var(--font-size-heading-l-vnacx6, 20px);
|
|
309
313
|
}
|
|
310
|
-
.awsui_title-variant-
|
|
314
|
+
.awsui_title-variant-h2_2qdw9_1rr34_311.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
311
315
|
padding-block-start: calc((var(--size-vertical-input-p1d7xx, 32px) - var(--line-height-heading-l-mg5bx6, 24px)) / 2);
|
|
312
316
|
}
|
|
313
|
-
.awsui_title-variant-
|
|
317
|
+
.awsui_title-variant-h3_2qdw9_1rr34_317:not(#\9) {
|
|
314
318
|
font-size: var(--font-size-heading-m-170yiy, 18px);
|
|
315
319
|
}
|
|
316
|
-
.awsui_title-variant-
|
|
320
|
+
.awsui_title-variant-h3_2qdw9_1rr34_317.awsui_refresh_2qdw9_1rr34_221:not(#\9) {
|
|
317
321
|
padding-block-start: calc((var(--size-vertical-input-p1d7xx, 32px) - var(--line-height-heading-m-uoaqdh, 22px)) / 2);
|
|
318
322
|
}
|
|
319
|
-
.awsui_title-variant-
|
|
323
|
+
.awsui_title-variant-h2_2qdw9_1rr34_311:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221), .awsui_title-variant-h3_2qdw9_1rr34_317:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
320
324
|
padding-block-start: var(--space-scaled-xs-xwoogq, 8px);
|
|
321
325
|
}
|
|
322
|
-
.awsui_no-
|
|
326
|
+
.awsui_no-wrap_2qdw9_1rr34_253 > .awsui_title_2qdw9_1rr34_299:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
323
327
|
padding-block-end: calc(var(--space-scaled-xxs-pfm1nx, 4px) + var(--space-scaled-xxxs-oo06c7, 2px));
|
|
324
328
|
}
|
|
325
329
|
|
|
326
|
-
.awsui_root-no-
|
|
330
|
+
.awsui_root-no-actions_2qdw9_1rr34_221.awsui_root-has-description_2qdw9_1rr34_224 > .awsui_main_2qdw9_1rr34_243 > :not(#\9):not(.awsui_refresh_2qdw9_1rr34_221).awsui_title-variant-h2_2qdw9_1rr34_311, .awsui_root-no-actions_2qdw9_1rr34_221.awsui_root-has-description_2qdw9_1rr34_224 > .awsui_main_2qdw9_1rr34_243 > :not(#\9):not(.awsui_refresh_2qdw9_1rr34_221).awsui_title-variant-h3_2qdw9_1rr34_317 {
|
|
327
331
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
328
332
|
}
|
|
329
333
|
|
|
330
|
-
.awsui_root-variant-
|
|
334
|
+
.awsui_root-variant-h1_2qdw9_1rr34_233.awsui_root-no-actions_2qdw9_1rr34_221:not(#\9):not(.awsui_root-has-description_2qdw9_1rr34_224):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
331
335
|
padding-block-end: var(--space-scaled-2x-xxs-e79hr1, 4px);
|
|
332
336
|
}
|
|
333
337
|
|
|
334
|
-
.awsui_virtual-
|
|
338
|
+
.awsui_virtual-space_2qdw9_1rr34_338:not(#\9) {
|
|
335
339
|
position: absolute !important;
|
|
336
340
|
inset-block-start: -9999px !important;
|
|
337
341
|
inset-inline-start: -9999px !important;
|
|
338
342
|
}
|
|
339
343
|
|
|
340
|
-
.
|
|
344
|
+
.awsui_info_2qdw9_1rr34_344:not(#\9) {
|
|
341
345
|
padding-inline-end: var(--space-s-tvghoh, 12px);
|
|
342
346
|
}
|
|
343
347
|
|
|
344
|
-
.
|
|
348
|
+
.awsui_description_2qdw9_1rr34_348:not(#\9) {
|
|
345
349
|
margin-block: 0;
|
|
346
350
|
margin-inline: 0;
|
|
347
351
|
padding-block: 0;
|
|
348
352
|
padding-inline: 0;
|
|
349
353
|
color: var(--color-text-heading-secondary-iwtvf6, #424650);
|
|
350
354
|
}
|
|
351
|
-
.awsui_description-variant-
|
|
355
|
+
.awsui_description-variant-h1_2qdw9_1rr34_355:not(#\9) {
|
|
352
356
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
353
357
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
354
358
|
}
|
|
355
|
-
.awsui_description-variant-
|
|
359
|
+
.awsui_description-variant-h2_2qdw9_1rr34_359:not(#\9) {
|
|
356
360
|
font-size: var(--font-header-h2-description-size-g2wws3, 14px);
|
|
357
361
|
line-height: var(--font-header-h2-description-line-height-ts2s6o, 20px);
|
|
358
362
|
}
|
|
359
|
-
.awsui_description-variant-
|
|
363
|
+
.awsui_description-variant-h2_2qdw9_1rr34_359:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
360
364
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
361
365
|
}
|
|
362
|
-
.awsui_description-variant-
|
|
366
|
+
.awsui_description-variant-h3_2qdw9_1rr34_366:not(#\9) {
|
|
363
367
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
364
368
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
365
369
|
}
|
|
366
|
-
.awsui_description-variant-
|
|
370
|
+
.awsui_description-variant-h3_2qdw9_1rr34_366:not(#\9):not(.awsui_refresh_2qdw9_1rr34_221) {
|
|
367
371
|
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
368
372
|
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
369
373
|
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
370
374
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
371
375
|
}
|
|
372
376
|
|
|
373
|
-
.
|
|
377
|
+
.awsui_heading_2qdw9_1rr34_377:not(#\9) {
|
|
374
378
|
margin-block: 0;
|
|
375
379
|
margin-inline: 0;
|
|
376
380
|
display: inline;
|
|
377
381
|
font-size: inherit;
|
|
378
382
|
margin-inline-end: var(--space-xs-ymlm0b, 8px);
|
|
379
383
|
}
|
|
380
|
-
.
|
|
384
|
+
.awsui_heading_2qdw9_1rr34_377:not(#\9):only-child {
|
|
381
385
|
margin-block: 0;
|
|
382
386
|
margin-inline: 0;
|
|
383
387
|
}
|
|
384
|
-
.
|
|
388
|
+
.awsui_heading_2qdw9_1rr34_377:not(#\9):focus {
|
|
389
|
+
outline: none;
|
|
390
|
+
}
|
|
391
|
+
body[data-awsui-focus-visible=true] .awsui_heading_2qdw9_1rr34_377:not(#\9):focus {
|
|
392
|
+
outline: thin dotted;
|
|
393
|
+
outline: var(--border-link-focus-ring-outline-1p0hnu, 0);
|
|
394
|
+
outline-offset: 2px;
|
|
395
|
+
outline-color: var(--color-border-item-focused-uk47pl, #006ce0);
|
|
396
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
397
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
398
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
399
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
400
|
+
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-39uvxr, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
401
|
+
}
|
|
402
|
+
.awsui_heading-variant-h1_2qdw9_1rr34_402:not(#\9) {
|
|
385
403
|
font-size: var(--font-size-heading-xl-wvkbur, 24px);
|
|
386
404
|
line-height: var(--line-height-heading-xl-hko6p0, 30px);
|
|
387
405
|
letter-spacing: var(--letter-spacing-heading-xl-ckkb6u, -0.02em);
|
|
388
406
|
}
|
|
389
|
-
.awsui_heading-variant-
|
|
407
|
+
.awsui_heading-variant-h2_2qdw9_1rr34_407:not(#\9) {
|
|
390
408
|
font-size: var(--font-size-heading-l-vnacx6, 20px);
|
|
391
409
|
line-height: var(--line-height-heading-l-mg5bx6, 24px);
|
|
392
410
|
letter-spacing: var(--letter-spacing-heading-l-5v6ibv, -0.015em);
|
|
393
411
|
}
|
|
394
|
-
.awsui_heading-variant-
|
|
412
|
+
.awsui_heading-variant-h3_2qdw9_1rr34_412:not(#\9) {
|
|
395
413
|
font-size: var(--font-size-heading-m-170yiy, 18px);
|
|
396
414
|
line-height: var(--line-height-heading-m-uoaqdh, 22px);
|
|
397
415
|
letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
|
|
398
416
|
}
|
|
399
417
|
|
|
400
|
-
.awsui_heading-
|
|
418
|
+
.awsui_heading-text_2qdw9_1rr34_418:not(#\9) {
|
|
401
419
|
/* used in test-utils */
|
|
402
420
|
}
|
|
403
|
-
.awsui_heading-text-variant-
|
|
421
|
+
.awsui_heading-text-variant-h1_2qdw9_1rr34_421:not(#\9) {
|
|
404
422
|
font-size: var(--font-size-heading-xl-wvkbur, 24px);
|
|
405
423
|
line-height: var(--line-height-heading-xl-hko6p0, 30px);
|
|
406
424
|
letter-spacing: var(--letter-spacing-heading-xl-ckkb6u, -0.02em);
|
|
@@ -408,7 +426,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
408
426
|
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
409
427
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
410
428
|
}
|
|
411
|
-
.awsui_heading-text-variant-
|
|
429
|
+
.awsui_heading-text-variant-h2_2qdw9_1rr34_429:not(#\9) {
|
|
412
430
|
font-size: var(--font-size-heading-l-vnacx6, 20px);
|
|
413
431
|
line-height: var(--line-height-heading-l-mg5bx6, 24px);
|
|
414
432
|
letter-spacing: var(--letter-spacing-heading-l-5v6ibv, -0.015em);
|
|
@@ -416,7 +434,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
416
434
|
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
417
435
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
418
436
|
}
|
|
419
|
-
.awsui_heading-text-variant-
|
|
437
|
+
.awsui_heading-text-variant-h3_2qdw9_1rr34_437:not(#\9) {
|
|
420
438
|
font-size: var(--font-size-heading-m-170yiy, 18px);
|
|
421
439
|
line-height: var(--line-height-heading-m-uoaqdh, 22px);
|
|
422
440
|
letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
|
|
@@ -425,7 +443,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
425
443
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
426
444
|
}
|
|
427
445
|
|
|
428
|
-
.
|
|
446
|
+
.awsui_counter_2qdw9_1rr34_446:not(#\9) {
|
|
429
447
|
color: var(--color-text-counter-bywf75, #656871);
|
|
430
448
|
font-weight: 400;
|
|
431
449
|
}
|
|
@@ -2,39 +2,39 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"refresh": "
|
|
7
|
-
"root-no-actions": "awsui_root-no-
|
|
8
|
-
"root-variant-h2": "awsui_root-variant-
|
|
9
|
-
"root-variant-h3": "awsui_root-variant-
|
|
10
|
-
"root-has-description": "awsui_root-has-
|
|
11
|
-
"root-variant-h1": "awsui_root-variant-
|
|
12
|
-
"main": "
|
|
13
|
-
"no-wrap": "awsui_no-
|
|
14
|
-
"main-variant-h1": "awsui_main-variant-
|
|
15
|
-
"actions": "
|
|
16
|
-
"actions-centered": "awsui_actions-
|
|
17
|
-
"actions-variant-h1": "awsui_actions-variant-
|
|
18
|
-
"actions-variant-h2": "awsui_actions-variant-
|
|
19
|
-
"actions-variant-h3": "awsui_actions-variant-
|
|
20
|
-
"title": "
|
|
21
|
-
"title-variant-h1": "awsui_title-variant-
|
|
22
|
-
"title-variant-h2": "awsui_title-variant-
|
|
23
|
-
"title-variant-h3": "awsui_title-variant-
|
|
24
|
-
"virtual-space": "awsui_virtual-
|
|
25
|
-
"info": "
|
|
26
|
-
"description": "
|
|
27
|
-
"description-variant-h1": "awsui_description-variant-
|
|
28
|
-
"description-variant-h2": "awsui_description-variant-
|
|
29
|
-
"description-variant-h3": "awsui_description-variant-
|
|
30
|
-
"heading": "
|
|
31
|
-
"heading-variant-h1": "awsui_heading-variant-
|
|
32
|
-
"heading-variant-h2": "awsui_heading-variant-
|
|
33
|
-
"heading-variant-h3": "awsui_heading-variant-
|
|
34
|
-
"heading-text": "awsui_heading-
|
|
35
|
-
"heading-text-variant-h1": "awsui_heading-text-variant-
|
|
36
|
-
"heading-text-variant-h2": "awsui_heading-text-variant-
|
|
37
|
-
"heading-text-variant-h3": "awsui_heading-text-variant-
|
|
38
|
-
"counter": "
|
|
5
|
+
"root": "awsui_root_2qdw9_1rr34_185",
|
|
6
|
+
"refresh": "awsui_refresh_2qdw9_1rr34_221",
|
|
7
|
+
"root-no-actions": "awsui_root-no-actions_2qdw9_1rr34_221",
|
|
8
|
+
"root-variant-h2": "awsui_root-variant-h2_2qdw9_1rr34_224",
|
|
9
|
+
"root-variant-h3": "awsui_root-variant-h3_2qdw9_1rr34_224",
|
|
10
|
+
"root-has-description": "awsui_root-has-description_2qdw9_1rr34_224",
|
|
11
|
+
"root-variant-h1": "awsui_root-variant-h1_2qdw9_1rr34_233",
|
|
12
|
+
"main": "awsui_main_2qdw9_1rr34_243",
|
|
13
|
+
"no-wrap": "awsui_no-wrap_2qdw9_1rr34_253",
|
|
14
|
+
"main-variant-h1": "awsui_main-variant-h1_2qdw9_1rr34_259",
|
|
15
|
+
"actions": "awsui_actions_2qdw9_1rr34_267",
|
|
16
|
+
"actions-centered": "awsui_actions-centered_2qdw9_1rr34_272",
|
|
17
|
+
"actions-variant-h1": "awsui_actions-variant-h1_2qdw9_1rr34_275",
|
|
18
|
+
"actions-variant-h2": "awsui_actions-variant-h2_2qdw9_1rr34_279",
|
|
19
|
+
"actions-variant-h3": "awsui_actions-variant-h3_2qdw9_1rr34_283",
|
|
20
|
+
"title": "awsui_title_2qdw9_1rr34_299",
|
|
21
|
+
"title-variant-h1": "awsui_title-variant-h1_2qdw9_1rr34_304",
|
|
22
|
+
"title-variant-h2": "awsui_title-variant-h2_2qdw9_1rr34_311",
|
|
23
|
+
"title-variant-h3": "awsui_title-variant-h3_2qdw9_1rr34_317",
|
|
24
|
+
"virtual-space": "awsui_virtual-space_2qdw9_1rr34_338",
|
|
25
|
+
"info": "awsui_info_2qdw9_1rr34_344",
|
|
26
|
+
"description": "awsui_description_2qdw9_1rr34_348",
|
|
27
|
+
"description-variant-h1": "awsui_description-variant-h1_2qdw9_1rr34_355",
|
|
28
|
+
"description-variant-h2": "awsui_description-variant-h2_2qdw9_1rr34_359",
|
|
29
|
+
"description-variant-h3": "awsui_description-variant-h3_2qdw9_1rr34_366",
|
|
30
|
+
"heading": "awsui_heading_2qdw9_1rr34_377",
|
|
31
|
+
"heading-variant-h1": "awsui_heading-variant-h1_2qdw9_1rr34_402",
|
|
32
|
+
"heading-variant-h2": "awsui_heading-variant-h2_2qdw9_1rr34_407",
|
|
33
|
+
"heading-variant-h3": "awsui_heading-variant-h3_2qdw9_1rr34_412",
|
|
34
|
+
"heading-text": "awsui_heading-text_2qdw9_1rr34_418",
|
|
35
|
+
"heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_1rr34_421",
|
|
36
|
+
"heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_1rr34_429",
|
|
37
|
+
"heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_1rr34_437",
|
|
38
|
+
"counter": "awsui_counter_2qdw9_1rr34_446"
|
|
39
39
|
};
|
|
40
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAO3D,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,2BAA2B;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC;IACjD;;;;;;;;MAQE;IACF,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,+FAA+F;IAC/F,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,wDAAwD;IACxD,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;;AAED,wBAA8C"}
|
|
@@ -8,7 +8,6 @@ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
|
|
|
8
8
|
import PopoverBody from '../../../popover/body';
|
|
9
9
|
import PopoverContainer from '../../../popover/container';
|
|
10
10
|
import { getBaseProps } from '../../base-component';
|
|
11
|
-
import { nodeBelongs } from '../../utils/node-belongs';
|
|
12
11
|
import popoverStyles from '../../../popover/styles.css.js';
|
|
13
12
|
import styles from './styles.css.js';
|
|
14
13
|
import testClasses from './test-classes/styles.css.js';
|
|
@@ -18,23 +17,30 @@ function ChartPopover(_a, ref) {
|
|
|
18
17
|
const baseProps = getBaseProps(restProps);
|
|
19
18
|
const popoverObjectRef = useRef(null);
|
|
20
19
|
const popoverRef = useMergeRefs(popoverObjectRef, ref);
|
|
20
|
+
const clickFrameId = useRef(null);
|
|
21
|
+
const onMouseDown = () => {
|
|
22
|
+
// Indicate there was a click inside popover recently.
|
|
23
|
+
clickFrameId.current = requestAnimationFrame(() => (clickFrameId.current = null));
|
|
24
|
+
};
|
|
21
25
|
useEffect(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
if (popoverObjectRef.current) {
|
|
27
|
+
const document = popoverObjectRef.current.ownerDocument;
|
|
28
|
+
const onDocumentClick = (event) => {
|
|
29
|
+
// Dismiss popover unless there was a click inside within the last animation frame.
|
|
30
|
+
// Ignore clicks inside the chart as those are handled separately.
|
|
31
|
+
if (clickFrameId.current === null && !nodeContains(container, event.target)) {
|
|
32
|
+
onDismiss(true);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
document.addEventListener('mousedown', onDocumentClick);
|
|
36
|
+
return () => {
|
|
37
|
+
document.removeEventListener('mousedown', onDocumentClick);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
34
40
|
}, [container, onDismiss]);
|
|
35
41
|
// In chart popovers, dismiss button is present when they are pinned, so both values are equivalent.
|
|
36
42
|
const isPinned = dismissButton;
|
|
37
|
-
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(popoverStyles.root, styles.root, baseProps.className), ref: popoverRef, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onBlur: onBlur,
|
|
43
|
+
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(popoverStyles.root, styles.root, baseProps.className), ref: popoverRef, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onBlur: onBlur,
|
|
38
44
|
// The tabIndex makes it so that clicking inside popover assigns this element as blur target.
|
|
39
45
|
// That is necessary in charts to ensure the blur target is within the chart and no cleanup is needed.
|
|
40
46
|
tabIndex: -1 }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport PopoverBody from '../../../popover/body';\nimport PopoverContainer from '../../../popover/container';\nimport { PopoverProps } from '../../../popover/interfaces';\nimport { getBaseProps } from '../../base-component';\n\nimport popoverStyles from '../../../popover/styles.css.js';\nimport styles from './styles.css.js';\nimport testClasses from './test-classes/styles.css.js';\n\nexport interface ChartPopoverProps extends PopoverProps {\n /** Title of the popover */\n title?: React.ReactNode;\n\n /** References the element the container is positioned against. */\n trackRef?: React.RefObject<HTMLElement | SVGElement>;\n getTrack?: () => null | HTMLElement | SVGElement;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n minVisibleBlockSize?: number;\n\n /** Optional container element that prevents any clicks in there from dismissing the popover */\n container: Element | null;\n\n /** Event that is fired when the popover is dismissed */\n onDismiss: (outsideClick?: boolean) => void;\n\n /** Fired when the pointer enters the hoverable area around the popover */\n onMouseEnter?: (event: React.MouseEvent) => void;\n\n /** Fired when the pointer leaves the hoverable area around the popover */\n onMouseLeave?: (event: React.MouseEvent) => void;\n\n onBlur?: (event: React.FocusEvent) => void;\n\n /** Popover content */\n children?: React.ReactNode;\n\n /** Popover footer */\n footer?: React.ReactNode;\n}\n\nexport default React.forwardRef(ChartPopover);\n\nfunction ChartPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n dismissButton = false,\n dismissAriaLabel,\n\n children,\n footer,\n\n title,\n trackRef,\n getTrack,\n trackKey,\n onDismiss,\n container,\n minVisibleBlockSize,\n\n onMouseEnter,\n onMouseLeave,\n onBlur,\n\n ...restProps\n }: ChartPopoverProps,\n ref: React.Ref<HTMLElement>\n) {\n const baseProps = getBaseProps(restProps);\n const popoverObjectRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useMergeRefs(popoverObjectRef, ref);\n\n const clickFrameId = useRef<number | null>(null);\n const onMouseDown = () => {\n // Indicate there was a click inside popover recently.\n clickFrameId.current = requestAnimationFrame(() => (clickFrameId.current = null));\n };\n\n useEffect(() => {\n if (popoverObjectRef.current) {\n const document = popoverObjectRef.current.ownerDocument;\n const onDocumentClick = (event: MouseEvent) => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n // Ignore clicks inside the chart as those are handled separately.\n if (clickFrameId.current === null && !nodeContains(container, event.target as Element)) {\n onDismiss(true);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }\n }, [container, onDismiss]);\n\n // In chart popovers, dismiss button is present when they are pinned, so both values are equivalent.\n const isPinned = dismissButton;\n\n return (\n <div\n {...baseProps}\n className={clsx(popoverStyles.root, styles.root, baseProps.className)}\n ref={popoverRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n // The tabIndex makes it so that clicking inside popover assigns this element as blur target.\n // That is necessary in charts to ensure the blur target is within the chart and no cleanup is needed.\n tabIndex={-1}\n >\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={trackRef}\n getTrack={getTrack}\n trackKey={trackKey}\n minVisibleBlockSize={minVisibleBlockSize}\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n keepPosition={true}\n allowVerticalOverflow={true}\n allowScrollToFit={isPinned}\n hoverArea={true}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={<span className={testClasses.header}>{title}</span>}\n onDismiss={onDismiss}\n overflowVisible=\"content\"\n className={styles['popover-body']}\n variant=\"chart\"\n >\n <div className={testClasses.body}>{children}</div>\n {footer && <div className={clsx(testClasses.footer, styles.footer)}>{footer}</div>}\n </PopoverBody>\n </PopoverContainer>\n </div>\n );\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (58547d10)";
|
|
3
|
+
export var GIT_SHA = "58547d10";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -7,7 +7,7 @@ import { useImperativeHandle, useRef } from 'react';
|
|
|
7
7
|
*/
|
|
8
8
|
export default function useRadioGroupForwardFocus(forwardedRef, items, value) {
|
|
9
9
|
const itemRef = useRef(null);
|
|
10
|
-
const itemIndex = items && findIndex(
|
|
10
|
+
const itemIndex = items && items.findIndex(item => item.value === value);
|
|
11
11
|
useImperativeHandle(forwardedRef, () => ({
|
|
12
12
|
focus() {
|
|
13
13
|
var _a;
|
|
@@ -16,12 +16,4 @@ export default function useRadioGroupForwardFocus(forwardedRef, items, value) {
|
|
|
16
16
|
}));
|
|
17
17
|
return [itemRef, itemIndex !== undefined && itemIndex !== -1 ? itemIndex : 0];
|
|
18
18
|
}
|
|
19
|
-
function findIndex(items, predicate) {
|
|
20
|
-
for (let i = 0; i < items.length; i++) {
|
|
21
|
-
if (predicate(items[i])) {
|
|
22
|
-
return i;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return -1;
|
|
26
|
-
}
|
|
27
19
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/forward-focus/radio-group.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAM3D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,YAAwC,EACxC,KAAmD,EACnD,KAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/forward-focus/radio-group.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAM3D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,YAAwC,EACxC,KAAmD,EACnD,KAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IACzE,mBAAmB,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;QACvC,KAAK;;YACH,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC,CAAC;IAEJ,OAAO,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useImperativeHandle, useRef } from 'react';\n\ninterface ForwardFocusRef {\n focus(): void;\n}\n\n/**\n * Focus forwarding helper for radio groups where only the first selected\n * child element should be focused.\n */\nexport default function useRadioGroupForwardFocus(\n forwardedRef: React.Ref<ForwardFocusRef>,\n items: ReadonlyArray<{ value: string }> | undefined,\n value: string | null\n): [React.Ref<HTMLInputElement>, number] {\n const itemRef = useRef<HTMLInputElement | null>(null);\n const itemIndex = items && items.findIndex(item => item.value === value);\n useImperativeHandle(forwardedRef, () => ({\n focus() {\n itemRef.current?.focus();\n },\n }));\n\n return [itemRef, itemIndex !== undefined && itemIndex !== -1 ? itemIndex : 0];\n}\n"]}
|