@cloudscape-design/components 3.0.871 → 3.0.872
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/container/styles.css.js +32 -31
- package/container/styles.scoped.css +57 -54
- package/container/styles.selectors.js +32 -31
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +6 -0
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/dom.d.ts +1 -0
- package/internal/utils/dom.d.ts.map +1 -1
- package/internal/utils/dom.js +8 -0
- package/internal/utils/dom.js.map +1 -1
- package/package.json +1 -1
- package/table/header-cell/styles.css.js +28 -26
- package/table/header-cell/styles.scoped.css +68 -65
- package/table/header-cell/styles.selectors.js +28 -26
package/container/styles.css.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"fit-height": "awsui_fit-
|
|
6
|
-
"with-side-media": "awsui_with-side-
|
|
7
|
-
"variant-default": "awsui_variant-
|
|
8
|
-
"variant-stacked": "awsui_variant-
|
|
9
|
-
"refresh": "
|
|
10
|
-
"sticky-enabled": "awsui_sticky-
|
|
11
|
-
"with-top-media": "awsui_with-top-
|
|
12
|
-
"content-wrapper": "awsui_content-
|
|
13
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
14
|
-
"media": "
|
|
15
|
-
"media-top": "awsui_media-
|
|
16
|
-
"media-side": "awsui_media-
|
|
17
|
-
"header": "
|
|
18
|
-
"header-full-page": "awsui_header-full-
|
|
19
|
-
"header-
|
|
20
|
-
"header-sticky-
|
|
21
|
-
"header-
|
|
22
|
-
"header-
|
|
23
|
-
"header-
|
|
24
|
-
"header-
|
|
25
|
-
"
|
|
26
|
-
"with-
|
|
27
|
-
"
|
|
28
|
-
"header-
|
|
29
|
-
"
|
|
30
|
-
"content
|
|
31
|
-
"content-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
4
|
+
"root": "awsui_root_14iqq_96qba_189",
|
|
5
|
+
"fit-height": "awsui_fit-height_14iqq_96qba_222",
|
|
6
|
+
"with-side-media": "awsui_with-side-media_14iqq_96qba_227",
|
|
7
|
+
"variant-default": "awsui_variant-default_14iqq_96qba_230",
|
|
8
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
|
|
9
|
+
"refresh": "awsui_refresh_14iqq_96qba_238",
|
|
10
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
|
|
11
|
+
"with-top-media": "awsui_with-top-media_14iqq_96qba_300",
|
|
12
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
|
|
13
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
|
|
14
|
+
"media": "awsui_media_14iqq_96qba_317",
|
|
15
|
+
"media-top": "awsui_media-top_14iqq_96qba_335",
|
|
16
|
+
"media-side": "awsui_media-side_14iqq_96qba_340",
|
|
17
|
+
"header": "awsui_header_14iqq_96qba_346",
|
|
18
|
+
"header-full-page": "awsui_header-full-page_14iqq_96qba_351",
|
|
19
|
+
"header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
|
|
20
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
|
|
21
|
+
"header-with-media": "awsui_header-with-media_14iqq_96qba_357",
|
|
22
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
|
|
23
|
+
"header-stuck": "awsui_header-stuck_14iqq_96qba_373",
|
|
24
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
|
|
25
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
|
|
26
|
+
"with-paddings": "awsui_with-paddings_14iqq_96qba_392",
|
|
27
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
|
|
28
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
|
|
29
|
+
"header-cover": "awsui_header-cover_14iqq_96qba_462",
|
|
30
|
+
"content": "awsui_content_14iqq_96qba_305",
|
|
31
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
|
|
32
|
+
"content-inner": "awsui_content-inner_14iqq_96qba_496",
|
|
33
|
+
"with-header": "awsui_with-header_14iqq_96qba_503",
|
|
34
|
+
"footer": "awsui_footer_14iqq_96qba_507",
|
|
35
|
+
"with-divider": "awsui_with-divider_14iqq_96qba_511"
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_root_14iqq_96qba_189:not(#\9) {
|
|
190
190
|
border-collapse: separate;
|
|
191
191
|
border-spacing: 0;
|
|
192
192
|
box-sizing: border-box;
|
|
@@ -220,15 +220,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
220
220
|
word-wrap: break-word;
|
|
221
221
|
position: relative;
|
|
222
222
|
}
|
|
223
|
-
.
|
|
223
|
+
.awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222:not(#\9) {
|
|
224
224
|
display: flex;
|
|
225
225
|
flex-direction: column;
|
|
226
226
|
block-size: 100%;
|
|
227
227
|
}
|
|
228
|
-
.
|
|
228
|
+
.awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222.awsui_with-side-media_14iqq_96qba_227:not(#\9) {
|
|
229
229
|
flex-direction: row;
|
|
230
230
|
}
|
|
231
|
-
.
|
|
231
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9) {
|
|
232
232
|
background-color: var(--color-background-container-content-z79u4u, #ffffff);
|
|
233
233
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
234
234
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
@@ -236,11 +236,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
236
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
237
237
|
box-sizing: border-box;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
239
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9) {
|
|
240
240
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
241
241
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
242
242
|
}
|
|
243
|
-
.
|
|
243
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
244
244
|
content: "";
|
|
245
245
|
position: absolute;
|
|
246
246
|
inset-inline-start: 0px;
|
|
@@ -258,7 +258,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
258
258
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
259
259
|
z-index: 1;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
|
|
262
262
|
content: "";
|
|
263
263
|
position: absolute;
|
|
264
264
|
inset-inline-start: 0px;
|
|
@@ -274,144 +274,147 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
274
274
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
275
275
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
276
276
|
}
|
|
277
|
-
.
|
|
277
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::after {
|
|
278
278
|
border-end-end-radius: 0;
|
|
279
279
|
border-end-start-radius: 0;
|
|
280
280
|
border-block-end-width: 0;
|
|
281
281
|
}
|
|
282
|
-
.
|
|
282
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::after {
|
|
283
283
|
border-start-start-radius: 0;
|
|
284
284
|
border-start-end-radius: 0;
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
287
287
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
.awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
290
290
|
inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
|
|
291
291
|
}
|
|
292
|
-
.
|
|
292
|
+
.awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238).awsui_variant-stacked_14iqq_96qba_230::before {
|
|
293
293
|
inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_with-side-
|
|
296
|
+
.awsui_with-side-media_14iqq_96qba_227:not(#\9) {
|
|
297
297
|
display: flex;
|
|
298
298
|
flex-direction: row;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
.awsui_with-top-
|
|
301
|
+
.awsui_with-top-media_14iqq_96qba_300:not(#\9) {
|
|
302
302
|
display: flex;
|
|
303
303
|
flex-direction: column;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_content-
|
|
306
|
+
.awsui_content-wrapper_14iqq_96qba_305:not(#\9) {
|
|
307
307
|
display: flex;
|
|
308
308
|
flex-direction: column;
|
|
309
309
|
inline-size: 100%;
|
|
310
310
|
}
|
|
311
|
-
.awsui_content-wrapper-fit-
|
|
311
|
+
.awsui_content-wrapper-fit-height_14iqq_96qba_310:not(#\9) {
|
|
312
312
|
block-size: 100%;
|
|
313
313
|
overflow: hidden;
|
|
314
314
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
315
315
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.
|
|
318
|
+
.awsui_media_14iqq_96qba_317:not(#\9) {
|
|
319
319
|
overflow: hidden;
|
|
320
320
|
flex-shrink: 0;
|
|
321
321
|
}
|
|
322
|
-
.
|
|
323
|
-
.
|
|
324
|
-
.
|
|
322
|
+
.awsui_media_14iqq_96qba_317 img:not(#\9),
|
|
323
|
+
.awsui_media_14iqq_96qba_317 video:not(#\9),
|
|
324
|
+
.awsui_media_14iqq_96qba_317 picture:not(#\9) {
|
|
325
325
|
inline-size: 100%;
|
|
326
326
|
block-size: 100%;
|
|
327
327
|
object-fit: cover;
|
|
328
328
|
object-position: center;
|
|
329
329
|
}
|
|
330
|
-
.
|
|
330
|
+
.awsui_media_14iqq_96qba_317 iframe:not(#\9) {
|
|
331
331
|
inline-size: 100%;
|
|
332
332
|
block-size: 100%;
|
|
333
333
|
border-block: 0;
|
|
334
334
|
border-inline: 0;
|
|
335
335
|
}
|
|
336
|
-
.awsui_media-
|
|
336
|
+
.awsui_media-top_14iqq_96qba_335:not(#\9) {
|
|
337
337
|
max-block-size: 66%;
|
|
338
338
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
339
339
|
border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
340
340
|
}
|
|
341
|
-
.awsui_media-
|
|
341
|
+
.awsui_media-side_14iqq_96qba_340:not(#\9) {
|
|
342
342
|
max-inline-size: 66%;
|
|
343
343
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
344
344
|
border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.
|
|
347
|
+
.awsui_header_14iqq_96qba_346:not(#\9) {
|
|
348
348
|
background-color: var(--color-background-container-header-clzg6q, #ffffff);
|
|
349
349
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
350
350
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
351
351
|
}
|
|
352
|
-
.
|
|
352
|
+
.awsui_header_14iqq_96qba_346.awsui_header-full-page_14iqq_96qba_351:not(#\9) {
|
|
353
353
|
background-color: var(--color-background-layout-main-nqw91u, #ffffff);
|
|
354
354
|
}
|
|
355
|
-
.
|
|
355
|
+
.awsui_header-variant-embedded_14iqq_96qba_354.awsui_refresh_14iqq_96qba_238:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
|
|
356
|
+
background-color: transparent;
|
|
357
|
+
}
|
|
358
|
+
.awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9) {
|
|
356
359
|
background: none;
|
|
357
360
|
}
|
|
358
|
-
.
|
|
361
|
+
.awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9):not(:empty) {
|
|
359
362
|
border-block-end: none;
|
|
360
363
|
}
|
|
361
|
-
.awsui_header-sticky-
|
|
364
|
+
.awsui_header-sticky-disabled_14iqq_96qba_363:not(#\9) {
|
|
362
365
|
position: relative;
|
|
363
366
|
z-index: 1;
|
|
364
367
|
}
|
|
365
|
-
.awsui_header-sticky-
|
|
368
|
+
.awsui_header-sticky-enabled_14iqq_96qba_354:not(#\9) {
|
|
366
369
|
inset-block-start: 0;
|
|
367
370
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
368
371
|
position: sticky;
|
|
369
372
|
z-index: 800;
|
|
370
373
|
}
|
|
371
|
-
.awsui_header-
|
|
374
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
372
375
|
border-start-start-radius: 0;
|
|
373
376
|
border-start-end-radius: 0;
|
|
374
377
|
border-end-start-radius: 0;
|
|
375
378
|
border-end-end-radius: 0;
|
|
376
379
|
}
|
|
377
|
-
.awsui_header-
|
|
380
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
378
381
|
border-block: 0;
|
|
379
382
|
border-inline: 0;
|
|
380
383
|
}
|
|
381
|
-
.awsui_header-
|
|
384
|
+
.awsui_header-stuck_14iqq_96qba_373:not(#\9):not(.awsui_header-variant-cards_14iqq_96qba_383) {
|
|
382
385
|
box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
383
386
|
}
|
|
384
|
-
.awsui_header-dynamic-
|
|
387
|
+
.awsui_header-dynamic-height_14iqq_96qba_386.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
385
388
|
margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
|
|
386
389
|
}
|
|
387
|
-
.
|
|
390
|
+
.awsui_header_14iqq_96qba_346:not(#\9):not(:empty) {
|
|
388
391
|
border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
|
|
389
392
|
}
|
|
390
|
-
.
|
|
393
|
+
.awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
391
394
|
padding-block-start: var(--space-container-header-top-5qav00, 12px);
|
|
392
395
|
padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
|
|
393
396
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
394
397
|
}
|
|
395
|
-
.
|
|
398
|
+
.awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392.awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
|
|
396
399
|
padding-block: var(--space-container-header-top-5qav00, 12px);
|
|
397
400
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
398
401
|
}
|
|
399
|
-
.
|
|
402
|
+
.awsui_header_14iqq_96qba_346.awsui_with-hidden-content_14iqq_96qba_401:not(#\9) {
|
|
400
403
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
401
404
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
402
405
|
}
|
|
403
|
-
.awsui_header-variant-
|
|
406
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
|
|
404
407
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
405
408
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
406
409
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
407
410
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
408
411
|
box-sizing: border-box;
|
|
409
412
|
}
|
|
410
|
-
.awsui_header-variant-
|
|
413
|
+
.awsui_header-variant-cards_14iqq_96qba_383.awsui_refresh_14iqq_96qba_238:not(#\9) {
|
|
411
414
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
412
415
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
413
416
|
}
|
|
414
|
-
.awsui_header-variant-
|
|
417
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
|
|
415
418
|
content: "";
|
|
416
419
|
position: absolute;
|
|
417
420
|
inset-inline-start: 0px;
|
|
@@ -429,7 +432,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
429
432
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
430
433
|
z-index: 1;
|
|
431
434
|
}
|
|
432
|
-
.awsui_header-variant-
|
|
435
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
|
|
433
436
|
content: "";
|
|
434
437
|
position: absolute;
|
|
435
438
|
inset-inline-start: 0px;
|
|
@@ -445,26 +448,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
445
448
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
446
449
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
447
450
|
}
|
|
448
|
-
.awsui_header-variant-
|
|
451
|
+
.awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
|
|
449
452
|
position: relative;
|
|
450
453
|
}
|
|
451
|
-
.awsui_header-variant-
|
|
454
|
+
.awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after, .awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
452
455
|
border-block: 0;
|
|
453
456
|
border-inline: 0;
|
|
454
457
|
border-start-start-radius: 0;
|
|
455
458
|
border-start-end-radius: 0;
|
|
456
459
|
}
|
|
457
|
-
.awsui_header-variant-full-
|
|
460
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
|
|
458
461
|
box-shadow: none;
|
|
459
462
|
}
|
|
460
|
-
.awsui_header-variant-full-
|
|
463
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373 > .awsui_header-cover_14iqq_96qba_462:not(#\9) {
|
|
461
464
|
background-color: var(--color-background-layout-main-nqw91u, #ffffff);
|
|
462
465
|
inline-size: 100%;
|
|
463
466
|
position: absolute;
|
|
464
467
|
block-size: var(--space-scaled-s-aqzyko, 12px);
|
|
465
468
|
inset-block-start: calc(-1 * var(--space-scaled-s-aqzyko, 12px));
|
|
466
469
|
}
|
|
467
|
-
.awsui_header-variant-full-
|
|
470
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
|
|
468
471
|
content: "";
|
|
469
472
|
position: absolute;
|
|
470
473
|
pointer-events: none;
|
|
@@ -474,7 +477,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
474
477
|
inset-block-start: 0;
|
|
475
478
|
border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
476
479
|
}
|
|
477
|
-
.awsui_header-variant-full-
|
|
480
|
+
.awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after {
|
|
478
481
|
content: "";
|
|
479
482
|
position: absolute;
|
|
480
483
|
inset: 0;
|
|
@@ -482,30 +485,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
482
485
|
clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
|
|
483
486
|
}
|
|
484
487
|
|
|
485
|
-
.
|
|
488
|
+
.awsui_content_14iqq_96qba_305:not(#\9) {
|
|
486
489
|
flex: 1;
|
|
487
490
|
}
|
|
488
|
-
.awsui_content-fit-
|
|
491
|
+
.awsui_content-fit-height_14iqq_96qba_490:not(#\9) {
|
|
489
492
|
overflow: auto;
|
|
490
493
|
display: flex;
|
|
491
494
|
flex-direction: column;
|
|
492
495
|
}
|
|
493
496
|
|
|
494
|
-
.awsui_content-
|
|
497
|
+
.awsui_content-inner_14iqq_96qba_496:not(#\9) {
|
|
495
498
|
flex: 1;
|
|
496
499
|
}
|
|
497
|
-
.awsui_content-
|
|
500
|
+
.awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
498
501
|
padding-block: var(--space-scaled-l-0hpmd7, 20px);
|
|
499
502
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
500
503
|
}
|
|
501
|
-
.awsui_content-
|
|
504
|
+
.awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392.awsui_with-header_14iqq_96qba_503:not(#\9) {
|
|
502
505
|
padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
|
|
503
506
|
}
|
|
504
507
|
|
|
505
|
-
.
|
|
508
|
+
.awsui_footer_14iqq_96qba_507.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
|
|
506
509
|
padding-block: var(--space-scaled-s-aqzyko, 12px);
|
|
507
510
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
508
511
|
}
|
|
509
|
-
.
|
|
512
|
+
.awsui_footer_14iqq_96qba_507.awsui_with-divider_14iqq_96qba_511:not(#\9) {
|
|
510
513
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
511
514
|
}
|
|
@@ -2,36 +2,37 @@
|
|
|
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
|
-
"fit-height": "awsui_fit-
|
|
7
|
-
"with-side-media": "awsui_with-side-
|
|
8
|
-
"variant-default": "awsui_variant-
|
|
9
|
-
"variant-stacked": "awsui_variant-
|
|
10
|
-
"refresh": "
|
|
11
|
-
"sticky-enabled": "awsui_sticky-
|
|
12
|
-
"with-top-media": "awsui_with-top-
|
|
13
|
-
"content-wrapper": "awsui_content-
|
|
14
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
15
|
-
"media": "
|
|
16
|
-
"media-top": "awsui_media-
|
|
17
|
-
"media-side": "awsui_media-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-full-page": "awsui_header-full-
|
|
20
|
-
"header-
|
|
21
|
-
"header-sticky-
|
|
22
|
-
"header-
|
|
23
|
-
"header-
|
|
24
|
-
"header-
|
|
25
|
-
"header-
|
|
26
|
-
"
|
|
27
|
-
"with-
|
|
28
|
-
"
|
|
29
|
-
"header-
|
|
30
|
-
"
|
|
31
|
-
"content
|
|
32
|
-
"content-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_96qba_189",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_96qba_222",
|
|
7
|
+
"with-side-media": "awsui_with-side-media_14iqq_96qba_227",
|
|
8
|
+
"variant-default": "awsui_variant-default_14iqq_96qba_230",
|
|
9
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
|
|
10
|
+
"refresh": "awsui_refresh_14iqq_96qba_238",
|
|
11
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
|
|
12
|
+
"with-top-media": "awsui_with-top-media_14iqq_96qba_300",
|
|
13
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
|
|
14
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
|
|
15
|
+
"media": "awsui_media_14iqq_96qba_317",
|
|
16
|
+
"media-top": "awsui_media-top_14iqq_96qba_335",
|
|
17
|
+
"media-side": "awsui_media-side_14iqq_96qba_340",
|
|
18
|
+
"header": "awsui_header_14iqq_96qba_346",
|
|
19
|
+
"header-full-page": "awsui_header-full-page_14iqq_96qba_351",
|
|
20
|
+
"header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
|
|
21
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
|
|
22
|
+
"header-with-media": "awsui_header-with-media_14iqq_96qba_357",
|
|
23
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
|
|
24
|
+
"header-stuck": "awsui_header-stuck_14iqq_96qba_373",
|
|
25
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
|
|
26
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
|
|
27
|
+
"with-paddings": "awsui_with-paddings_14iqq_96qba_392",
|
|
28
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
|
|
29
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
|
|
30
|
+
"header-cover": "awsui_header-cover_14iqq_96qba_462",
|
|
31
|
+
"content": "awsui_content_14iqq_96qba_305",
|
|
32
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
|
|
33
|
+
"content-inner": "awsui_content-inner_14iqq_96qba_496",
|
|
34
|
+
"with-header": "awsui_with-header_14iqq_96qba_503",
|
|
35
|
+
"footer": "awsui_footer_14iqq_96qba_507",
|
|
36
|
+
"with-divider": "awsui_with-divider_14iqq_96qba_511"
|
|
36
37
|
};
|
|
37
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,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
|
@@ -8,6 +8,7 @@ import { getBaseProps } from '../../base-component';
|
|
|
8
8
|
import { useFormFieldContext } from '../../context/form-field-context';
|
|
9
9
|
import { fireCancelableEvent, fireNonCancelableEvent } from '../../events';
|
|
10
10
|
import { KeyCode } from '../../keycode';
|
|
11
|
+
import { documentHasFocus } from '../../utils/dom';
|
|
11
12
|
import { nodeBelongs } from '../../utils/node-belongs';
|
|
12
13
|
import Dropdown from '../dropdown';
|
|
13
14
|
import styles from './styles.css.js';
|
|
@@ -42,6 +43,11 @@ const AutosuggestInput = React.forwardRef((_a, ref) => {
|
|
|
42
43
|
close: closeDropdown,
|
|
43
44
|
}));
|
|
44
45
|
const handleBlur = () => {
|
|
46
|
+
// When the document in not in focus it means the focus moved outside the page. In that case the dropdown shall stay open
|
|
47
|
+
// so that when the user comes back it does not re-open unexpectedly when the focus is restored by the browser.
|
|
48
|
+
if (!documentHasFocus()) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
45
51
|
if (!preventCloseOnBlurRef.current) {
|
|
46
52
|
closeDropdown();
|
|
47
53
|
fireNonCancelableEvent(onBlur, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,OAAO,aAAqC,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AAErH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;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,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,cAAc,CAAC,EACrD,MAAM,EACJ,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,IAC9D,cAAc,CACX,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IAEnB,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACzB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n} from '../../../input/interfaces';\nimport InternalInput, { InternalInputProps } from '../../../input/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport Dropdown from '../dropdown';\nimport { ExpandToViewport } from '../dropdown/interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n if (open) {\n event.stopPropagation();\n closeDropdown();\n } else if (value) {\n event.stopPropagation();\n fireNonCancelableEvent(onChange, { value: '' });\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: InternalInputProps['__nativeAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n stretchBeyondTriggerWidth={true}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n __nativeAttributes={nativeAttributes}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']}>\n {dropdownFooter}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,OAAO,aAAqC,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AAErH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,QAAQ,MAAM,aAAa,CAAC;AAGnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqCrC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EAiCwB,EACxB,GAA6B,EAC7B,EAAE;QAnCF,EACE,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,yBAAyB,GAAG,KAAK,EACjC,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,gBAAgB,GAAG,IAAI,EACvB,kBAAkB,EAClB,wBA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AAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n} from '../../../input/interfaces';\nimport InternalInput, { InternalInputProps } from '../../../input/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport { documentHasFocus } from '../../utils/dom';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport Dropdown from '../dropdown';\nimport { ExpandToViewport } from '../dropdown/interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n // When the document in not in focus it means the focus moved outside the page. In that case the dropdown shall stay open\n // so that when the user comes back it does not re-open unexpectedly when the focus is restored by the browser.\n if (!documentHasFocus()) {\n return;\n }\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n if (open) {\n event.stopPropagation();\n closeDropdown();\n } else if (value) {\n event.stopPropagation();\n fireNonCancelableEvent(onChange, { value: '' });\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: InternalInputProps['__nativeAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n stretchBeyondTriggerWidth={true}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n __nativeAttributes={nativeAttributes}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']}>\n {dropdownFooter}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/internal/utils/dom.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ export declare function parseCssVariable(value: string): string;
|
|
|
18
18
|
export declare function isNode(target: unknown): target is Node;
|
|
19
19
|
export declare function isHTMLElement(target: unknown): target is HTMLElement;
|
|
20
20
|
export declare function isSVGElement(target: unknown): target is SVGElement;
|
|
21
|
+
export declare function documentHasFocus(): boolean;
|
|
21
22
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAMhF;AAOD,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,KAAK,GACN,EAAE;IACD,YAAY,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC;CACrD,+BAmBA;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAqB7C;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,IAAI,CAYtD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,WAAW,CAUpE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,UAAU,CAQlE"}
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAMhF;AAOD,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,KAAK,GACN,EAAE;IACD,YAAY,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC;CACrD,+BAmBA;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAqB7C;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,IAAI,CAYtD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,WAAW,CAUpE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,UAAU,CAQlE;AAED,wBAAgB,gBAAgB,YAM/B"}
|
package/internal/utils/dom.js
CHANGED
|
@@ -99,4 +99,12 @@ export function isSVGElement(target) {
|
|
|
99
99
|
'ownerSVGElement' in target &&
|
|
100
100
|
typeof target.ownerSVGElement === 'object'));
|
|
101
101
|
}
|
|
102
|
+
export function documentHasFocus() {
|
|
103
|
+
var _a;
|
|
104
|
+
// In JSDOM the hasFocus() always returns false which differs from the in-browser experience, see: https://github.com/jsdom/jsdom/issues/3794.
|
|
105
|
+
// Thus, when detecting JSDOM environment we return true here explicitly for the tests to work expectedly.
|
|
106
|
+
// The detection depends on the default userAgent set in JSDOM, see: https://github.com/jsdom/jsdom?tab=readme-ov-file#advanced-configuration.
|
|
107
|
+
const isJSDOM = typeof navigator !== 'undefined' && ((_a = navigator.userAgent) === null || _a === void 0 ? void 0 : _a.includes('jsdom'));
|
|
108
|
+
return isJSDOM || (typeof document !== undefined && document.hasFocus());
|
|
109
|
+
}
|
|
102
110
|
//# sourceMappingURL=dom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,QAAQ,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;AAE1D,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,OAAO,CACL,MAAM,YAAY,IAAI;QACtB,CAAC,MAAM,KAAK,IAAI;YACd,OAAO,MAAM,KAAK,QAAQ;YAC1B,UAAU,IAAI,MAAM;YACpB,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ;YACnC,UAAU,IAAI,MAAM;YACpB,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ;YACnC,YAAY,IAAI,MAAM;YACtB,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,CAAC,CACzC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAe;IAC3C,OAAO,CACL,MAAM,YAAY,WAAW;QAC7B,CAAC,MAAM,CAAC,MAAM,CAAC;YACb,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;YACrC,OAAO,IAAI,MAAM;YACjB,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;YAChC,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;YACxC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CACzB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,OAAO,CACL,MAAM,YAAY,UAAU;QAC5B,CAAC,MAAM,CAAC,MAAM,CAAC;YACb,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;YACrC,iBAAiB,IAAI,MAAM;YAC3B,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,CAAC,CAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport balanced from 'balanced-match';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nexport function isContainingBlock(element: HTMLElement): boolean {\n const computedStyle = getComputedStyle(element);\n return (\n (!!computedStyle.transform && computedStyle.transform !== 'none') ||\n (!!computedStyle.perspective && computedStyle.perspective !== 'none') ||\n (!!computedStyle.containerType && computedStyle.containerType !== 'normal') ||\n computedStyle.contain?.split(' ').some(s => ['layout', 'paint', 'strict', 'content'].includes(s))\n );\n}\n\n/**\n * Returns an element that is used to position the given element.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block\n */\nexport function getContainingBlock(startElement: HTMLElement): HTMLElement | null {\n if (!startElement.parentElement) {\n return null;\n }\n\n return findUpUntil(startElement.parentElement, isContainingBlock) as HTMLElement;\n}\n\n/*\n * Allows to find multiple elements in the page each according to a specific test function,\n * but traversing the DOM only once.\n */\n\nexport function findUpUntilMultiple({\n startElement,\n tests,\n}: {\n startElement: HTMLElement;\n tests: Record<string, (el: HTMLElement) => boolean>;\n}) {\n const keys = Object.keys(tests);\n const elements: Record<string, HTMLElement> = {};\n let current: HTMLElement | null = startElement;\n while (current && Object.keys(elements).length < keys.length) {\n current = current.parentElement;\n // If a component is used within an svg (i.e. as foreignObject), then it will\n // have some ancestor nodes that are SVGElement. We want to skip those,\n // as they have very different properties to HTMLElements.\n while (current && !isHTMLElement(current)) {\n current = (current as Element).parentElement;\n }\n for (const key of keys) {\n if (!elements[key] && current && tests[key](current)) {\n elements[key] = current;\n }\n }\n }\n return elements;\n}\n\nconst cssVariableExpression = /--.+?\\s*,\\s*(.+)/;\n\n/**\n * Parses a CSS color value that might contain CSS Custom Properties\n * and returns a value that will be understood by the browser, no matter of support level.\n * If the browser support CSS Custom Properties, the value will be return as is. Otherwise,\n * the fallback value will be extracted and returned instead.\n */\nexport function parseCssVariable(value: string) {\n if (typeof window === 'undefined') {\n return value;\n }\n\n if (window.CSS?.supports?.('color', 'var(--dummy, #000)') ?? false) {\n return value;\n }\n\n const varIndex = value.lastIndexOf('var(');\n if (varIndex === -1) {\n return value;\n }\n\n const expr = balanced('(', ')', value.substr(varIndex));\n if (!expr) {\n return value;\n }\n\n const match = expr.body.match(cssVariableExpression);\n return match ? match[1] : value;\n}\n\n// The instanceof Node/HTMLElement/SVGElement checks can fail if the target element\n// belongs to a different window than the respective type.\n\nexport function isNode(target: unknown): target is Node {\n return (\n target instanceof Node ||\n (target !== null &&\n typeof target === 'object' &&\n 'nodeType' in target &&\n typeof target.nodeType === 'number' &&\n 'nodeName' in target &&\n typeof target.nodeName === 'string' &&\n 'parentNode' in target &&\n typeof target.parentNode === 'object')\n );\n}\n\nexport function isHTMLElement(target: unknown): target is HTMLElement {\n return (\n target instanceof HTMLElement ||\n (isNode(target) &&\n target.nodeType === Node.ELEMENT_NODE &&\n 'style' in target &&\n typeof target.style === 'object' &&\n typeof target.ownerDocument === 'object' &&\n !isSVGElement(target))\n );\n}\n\nexport function isSVGElement(target: unknown): target is SVGElement {\n return (\n target instanceof SVGElement ||\n (isNode(target) &&\n target.nodeType === Node.ELEMENT_NODE &&\n 'ownerSVGElement' in target &&\n typeof target.ownerSVGElement === 'object')\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,UAAU,iBAAiB,CAAC,OAAoB;;IACpD,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,CACL,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,KAAK,MAAM,CAAC;QACjE,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,IAAI,aAAa,CAAC,WAAW,KAAK,MAAM,CAAC;QACrE,CAAC,CAAC,CAAC,aAAa,CAAC,aAAa,IAAI,aAAa,CAAC,aAAa,KAAK,QAAQ,CAAC;SAC3E,MAAA,aAAa,CAAC,OAAO,0CAAE,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,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O,MAAM,CAAC,KAAK,KAAK,QAAQ;YAChC,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;YACxC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CACzB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,OAAO,CACL,MAAM,YAAY,UAAU;QAC5B,CAAC,MAAM,CAAC,MAAM,CAAC;YACb,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;YACrC,iBAAiB,IAAI,MAAM;YAC3B,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,CAAC,CAC9C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB;;IAC9B,8IAA8I;IAC9I,0GAA0G;IAC1G,8IAA8I;IAC9I,MAAM,OAAO,GAAG,OAAO,SAAS,KAAK,WAAW,KAAI,MAAA,SAAS,CAAC,SAAS,0CAAE,QAAQ,CAAC,OAAO,CAAC,CAAA,CAAC;IAC3F,OAAO,OAAO,IAAI,CAAC,OAAO,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport balanced from 'balanced-match';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nexport function isContainingBlock(element: HTMLElement): boolean {\n const computedStyle = getComputedStyle(element);\n return (\n (!!computedStyle.transform && computedStyle.transform !== 'none') ||\n (!!computedStyle.perspective && computedStyle.perspective !== 'none') ||\n (!!computedStyle.containerType && computedStyle.containerType !== 'normal') ||\n computedStyle.contain?.split(' ').some(s => ['layout', 'paint', 'strict', 'content'].includes(s))\n );\n}\n\n/**\n * Returns an element that is used to position the given element.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block\n */\nexport function getContainingBlock(startElement: HTMLElement): HTMLElement | null {\n if (!startElement.parentElement) {\n return null;\n }\n\n return findUpUntil(startElement.parentElement, isContainingBlock) as HTMLElement;\n}\n\n/*\n * Allows to find multiple elements in the page each according to a specific test function,\n * but traversing the DOM only once.\n */\n\nexport function findUpUntilMultiple({\n startElement,\n tests,\n}: {\n startElement: HTMLElement;\n tests: Record<string, (el: HTMLElement) => boolean>;\n}) {\n const keys = Object.keys(tests);\n const elements: Record<string, HTMLElement> = {};\n let current: HTMLElement | null = startElement;\n while (current && Object.keys(elements).length < keys.length) {\n current = current.parentElement;\n // If a component is used within an svg (i.e. as foreignObject), then it will\n // have some ancestor nodes that are SVGElement. We want to skip those,\n // as they have very different properties to HTMLElements.\n while (current && !isHTMLElement(current)) {\n current = (current as Element).parentElement;\n }\n for (const key of keys) {\n if (!elements[key] && current && tests[key](current)) {\n elements[key] = current;\n }\n }\n }\n return elements;\n}\n\nconst cssVariableExpression = /--.+?\\s*,\\s*(.+)/;\n\n/**\n * Parses a CSS color value that might contain CSS Custom Properties\n * and returns a value that will be understood by the browser, no matter of support level.\n * If the browser support CSS Custom Properties, the value will be return as is. Otherwise,\n * the fallback value will be extracted and returned instead.\n */\nexport function parseCssVariable(value: string) {\n if (typeof window === 'undefined') {\n return value;\n }\n\n if (window.CSS?.supports?.('color', 'var(--dummy, #000)') ?? false) {\n return value;\n }\n\n const varIndex = value.lastIndexOf('var(');\n if (varIndex === -1) {\n return value;\n }\n\n const expr = balanced('(', ')', value.substr(varIndex));\n if (!expr) {\n return value;\n }\n\n const match = expr.body.match(cssVariableExpression);\n return match ? match[1] : value;\n}\n\n// The instanceof Node/HTMLElement/SVGElement checks can fail if the target element\n// belongs to a different window than the respective type.\n\nexport function isNode(target: unknown): target is Node {\n return (\n target instanceof Node ||\n (target !== null &&\n typeof target === 'object' &&\n 'nodeType' in target &&\n typeof target.nodeType === 'number' &&\n 'nodeName' in target &&\n typeof target.nodeName === 'string' &&\n 'parentNode' in target &&\n typeof target.parentNode === 'object')\n );\n}\n\nexport function isHTMLElement(target: unknown): target is HTMLElement {\n return (\n target instanceof HTMLElement ||\n (isNode(target) &&\n target.nodeType === Node.ELEMENT_NODE &&\n 'style' in target &&\n typeof target.style === 'object' &&\n typeof target.ownerDocument === 'object' &&\n !isSVGElement(target))\n );\n}\n\nexport function isSVGElement(target: unknown): target is SVGElement {\n return (\n target instanceof SVGElement ||\n (isNode(target) &&\n target.nodeType === Node.ELEMENT_NODE &&\n 'ownerSVGElement' in target &&\n typeof target.ownerSVGElement === 'object')\n );\n}\n\nexport function documentHasFocus() {\n // In JSDOM the hasFocus() always returns false which differs from the in-browser experience, see: https://github.com/jsdom/jsdom/issues/3794.\n // Thus, when detecting JSDOM environment we return true here explicitly for the tests to work expectedly.\n // The detection depends on the default userAgent set in JSDOM, see: https://github.com/jsdom/jsdom?tab=readme-ov-file#advanced-configuration.\n const isJSDOM = typeof navigator !== 'undefined' && navigator.userAgent?.includes('jsdom');\n return isJSDOM || (typeof document !== undefined && document.hasFocus());\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"header-cell": "awsui_header-
|
|
5
|
-
"header-cell-fake-focus": "awsui_header-cell-fake-
|
|
6
|
-
"header-cell-sticky": "awsui_header-cell-
|
|
7
|
-
"header-cell-stuck": "awsui_header-cell-
|
|
8
|
-
"header-cell-variant-full-page": "awsui_header-cell-variant-full-
|
|
9
|
-
"header-cell-hidden": "awsui_header-cell-
|
|
10
|
-
"header-cell-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"sticky-cell
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"header-cell-
|
|
23
|
-
"header-cell-
|
|
24
|
-
"header-cell-
|
|
25
|
-
"header-cell-
|
|
26
|
-
"header-cell-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
4
|
+
"header-cell": "awsui_header-cell_1spae_1c23e_149",
|
|
5
|
+
"header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1c23e_183",
|
|
6
|
+
"header-cell-sticky": "awsui_header-cell-sticky_1spae_1c23e_204",
|
|
7
|
+
"header-cell-stuck": "awsui_header-cell-stuck_1spae_1c23e_207",
|
|
8
|
+
"header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1c23e_207",
|
|
9
|
+
"header-cell-hidden": "awsui_header-cell-hidden_1spae_1c23e_213",
|
|
10
|
+
"header-cell-variant-embedded": "awsui_header-cell-variant-embedded_1spae_1c23e_216",
|
|
11
|
+
"is-visual-refresh": "awsui_is-visual-refresh_1spae_1c23e_216",
|
|
12
|
+
"header-cell-variant-borderless": "awsui_header-cell-variant-borderless_1spae_1c23e_216",
|
|
13
|
+
"header-cell-sortable": "awsui_header-cell-sortable_1spae_1c23e_219",
|
|
14
|
+
"sticky-cell": "awsui_sticky-cell_1spae_1c23e_222",
|
|
15
|
+
"sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_1c23e_240",
|
|
16
|
+
"has-selection": "awsui_has-selection_1spae_1c23e_240",
|
|
17
|
+
"sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-start_1spae_1c23e_243",
|
|
18
|
+
"resize-divider": "awsui_resize-divider_1spae_1c23e_248",
|
|
19
|
+
"sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-end_1spae_1c23e_255",
|
|
20
|
+
"sorting-icon": "awsui_sorting-icon_1spae_1c23e_265",
|
|
21
|
+
"edit-icon": "awsui_edit-icon_1spae_1c23e_273",
|
|
22
|
+
"header-cell-content": "awsui_header-cell-content_1spae_1c23e_279",
|
|
23
|
+
"header-cell-content-expandable": "awsui_header-cell-content-expandable_1spae_1c23e_285",
|
|
24
|
+
"header-cell-disabled": "awsui_header-cell-disabled_1spae_1c23e_337",
|
|
25
|
+
"header-cell-sorted": "awsui_header-cell-sorted_1spae_1c23e_337",
|
|
26
|
+
"header-cell-text": "awsui_header-cell-text_1spae_1c23e_351",
|
|
27
|
+
"header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1c23e_355",
|
|
28
|
+
"header-cell-ascending": "awsui_header-cell-ascending_1spae_1c23e_361",
|
|
29
|
+
"header-cell-descending": "awsui_header-cell-descending_1spae_1c23e_362",
|
|
30
|
+
"has-striped-rows": "awsui_has-striped-rows_1spae_1c23e_476",
|
|
31
|
+
"sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-start_1spae_1c23e_476"
|
|
30
32
|
};
|
|
31
33
|
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
*/
|
|
147
147
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
148
148
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
149
|
-
.awsui_header-
|
|
149
|
+
.awsui_header-cell_1spae_1c23e_149:not(#\9) {
|
|
150
150
|
position: relative;
|
|
151
151
|
text-align: start;
|
|
152
152
|
box-sizing: border-box;
|
|
@@ -159,14 +159,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
159
159
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
160
160
|
padding-inline: var(--space-scaled-xs-26e2du, 8px);
|
|
161
161
|
}
|
|
162
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
162
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149:not(#\9):focus {
|
|
163
163
|
position: relative;
|
|
164
164
|
}
|
|
165
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
165
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149:not(#\9):focus {
|
|
166
166
|
outline: 2px dotted transparent;
|
|
167
167
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
168
168
|
}
|
|
169
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
169
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149:not(#\9):focus::before {
|
|
170
170
|
content: " ";
|
|
171
171
|
display: block;
|
|
172
172
|
position: absolute;
|
|
@@ -180,14 +180,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149:not(#\9):
|
|
|
180
180
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
181
181
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
182
182
|
}
|
|
183
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
183
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9) {
|
|
184
184
|
position: relative;
|
|
185
185
|
}
|
|
186
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
186
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9) {
|
|
187
187
|
outline: 2px dotted transparent;
|
|
188
188
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
189
189
|
}
|
|
190
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
190
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9)::before {
|
|
191
191
|
content: " ";
|
|
192
192
|
display: block;
|
|
193
193
|
position: absolute;
|
|
@@ -201,22 +201,25 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_hea
|
|
|
201
201
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
202
202
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
203
203
|
}
|
|
204
|
-
.awsui_header-cell-
|
|
204
|
+
.awsui_header-cell-sticky_1spae_1c23e_204:not(#\9) {
|
|
205
205
|
border-block-end: var(--border-table-sticky-width-87kf12, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
206
206
|
}
|
|
207
|
-
.awsui_header-cell-
|
|
207
|
+
.awsui_header-cell-stuck_1spae_1c23e_207:not(#\9):not(.awsui_header-cell-variant-full-page_1spae_1c23e_207) {
|
|
208
208
|
border-block-end-color: transparent;
|
|
209
209
|
}
|
|
210
|
-
.awsui_header-cell-variant-full-
|
|
210
|
+
.awsui_header-cell-variant-full-page_1spae_1c23e_207:not(#\9) {
|
|
211
211
|
background: var(--color-background-layout-main-nqw91u, #ffffff);
|
|
212
212
|
}
|
|
213
|
-
.awsui_header-cell-variant-full-
|
|
213
|
+
.awsui_header-cell-variant-full-page_1spae_1c23e_207.awsui_header-cell-hidden_1spae_1c23e_213:not(#\9) {
|
|
214
214
|
border-block-end-color: transparent;
|
|
215
215
|
}
|
|
216
|
-
.awsui_header-
|
|
216
|
+
.awsui_header-cell-variant-embedded_1spae_1c23e_216.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):not(.awsui_header-cell-sticky_1spae_1c23e_204), .awsui_header-cell-variant-borderless_1spae_1c23e_216.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):not(.awsui_header-cell-sticky_1spae_1c23e_204) {
|
|
217
|
+
background: none;
|
|
218
|
+
}
|
|
219
|
+
.awsui_header-cell_1spae_1c23e_149:not(#\9):last-child, .awsui_header-cell_1spae_1c23e_149.awsui_header-cell-sortable_1spae_1c23e_219:not(#\9) {
|
|
217
220
|
padding-inline-end: var(--space-xs-zb16t3, 8px);
|
|
218
221
|
}
|
|
219
|
-
.awsui_header-
|
|
222
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell_1spae_1c23e_222:not(#\9) {
|
|
220
223
|
position: sticky;
|
|
221
224
|
background: var(--color-background-table-header-inc72b, #ffffff);
|
|
222
225
|
z-index: 798;
|
|
@@ -225,41 +228,41 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_hea
|
|
|
225
228
|
transition-timing-function: var(--motion-easing-sticky-56u8cd, cubic-bezier(1, 0, 0.83, 1));
|
|
226
229
|
}
|
|
227
230
|
@media (prefers-reduced-motion: reduce) {
|
|
228
|
-
.awsui_header-
|
|
231
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell_1spae_1c23e_222:not(#\9) {
|
|
229
232
|
animation: none;
|
|
230
233
|
transition: none;
|
|
231
234
|
}
|
|
232
235
|
}
|
|
233
|
-
.awsui-motion-disabled .awsui_header-
|
|
236
|
+
.awsui-motion-disabled .awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell_1spae_1c23e_222:not(#\9), .awsui-mode-entering .awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell_1spae_1c23e_222:not(#\9) {
|
|
234
237
|
animation: none;
|
|
235
238
|
transition: none;
|
|
236
239
|
}
|
|
237
|
-
.awsui_header-
|
|
240
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-pad-left_1spae_1c23e_240:not(#\9):not(.awsui_has-selection_1spae_1c23e_240) {
|
|
238
241
|
padding-inline-start: var(--space-table-horizontal-8davlm, 20px);
|
|
239
242
|
}
|
|
240
|
-
.awsui_header-
|
|
243
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-last-inline-start_1spae_1c23e_243:not(#\9) {
|
|
241
244
|
box-shadow: var(--shadow-sticky-column-first-039dqs, 4px 0px 8px 1px rgba(0, 7, 22, 0.1));
|
|
242
245
|
clip-path: inset(0px -24px 0px 0px);
|
|
243
246
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
244
247
|
}
|
|
245
|
-
.awsui_header-
|
|
248
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-last-inline-start_1spae_1c23e_243 > .awsui_resize-divider_1spae_1c23e_248:not(#\9) {
|
|
246
249
|
display: none;
|
|
247
250
|
}
|
|
248
|
-
.awsui_header-
|
|
251
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-last-inline-start_1spae_1c23e_243:not(#\9):dir(rtl) {
|
|
249
252
|
box-shadow: var(--shadow-sticky-column-last-n170vw, -4px 0 8px 1px rgba(0, 28, 36, 0.1));
|
|
250
253
|
clip-path: inset(0 0 0 -24px);
|
|
251
254
|
}
|
|
252
|
-
.awsui_header-
|
|
255
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-last-inline-end_1spae_1c23e_255:not(#\9) {
|
|
253
256
|
box-shadow: var(--shadow-sticky-column-last-n170vw, -4px 0 8px 1px rgba(0, 28, 36, 0.1));
|
|
254
257
|
clip-path: inset(0 0 0 -24px);
|
|
255
258
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
256
259
|
}
|
|
257
|
-
.awsui_header-
|
|
260
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_sticky-cell-last-inline-end_1spae_1c23e_255:not(#\9):dir(rtl) {
|
|
258
261
|
box-shadow: var(--shadow-sticky-column-first-039dqs, 4px 0px 8px 1px rgba(0, 7, 22, 0.1));
|
|
259
262
|
clip-path: inset(0 -24px 0 0);
|
|
260
263
|
}
|
|
261
264
|
|
|
262
|
-
.awsui_sorting-
|
|
265
|
+
.awsui_sorting-icon_1spae_1c23e_265:not(#\9) {
|
|
263
266
|
position: absolute;
|
|
264
267
|
inset-block-start: 50%;
|
|
265
268
|
transform: translateY(-50%);
|
|
@@ -267,36 +270,36 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_hea
|
|
|
267
270
|
color: var(--color-text-column-sorting-icon-4y2if8, #424650);
|
|
268
271
|
}
|
|
269
272
|
|
|
270
|
-
.awsui_edit-
|
|
273
|
+
.awsui_edit-icon_1spae_1c23e_273:not(#\9) {
|
|
271
274
|
margin-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
272
275
|
margin-block-start: var(--space-scaled-xxs-7597g1, 4px);
|
|
273
276
|
color: inherit;
|
|
274
277
|
}
|
|
275
278
|
|
|
276
|
-
.awsui_header-cell-
|
|
279
|
+
.awsui_header-cell-content_1spae_1c23e_279:not(#\9) {
|
|
277
280
|
position: relative;
|
|
278
281
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
279
282
|
padding-inline-end: var(--space-s-34lx8l, 12px);
|
|
280
283
|
padding-inline-start: var(--space-s-34lx8l, 12px);
|
|
281
284
|
}
|
|
282
|
-
.awsui_header-cell-
|
|
285
|
+
.awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-content-expandable_1spae_1c23e_285:not(#\9) {
|
|
283
286
|
padding-inline-start: calc(var(--space-s-34lx8l, 12px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
284
287
|
}
|
|
285
|
-
.awsui_header-cell-
|
|
288
|
+
.awsui_header-cell-sortable_1spae_1c23e_219 > .awsui_header-cell-content_1spae_1c23e_279:not(#\9) {
|
|
286
289
|
padding-inline-end: calc(var(--space-xl-lmui9r, 24px) + var(--space-xxs-p8yyaw, 4px));
|
|
287
290
|
}
|
|
288
|
-
.awsui_header-cell-
|
|
291
|
+
.awsui_header-cell-content_1spae_1c23e_279:not(#\9):focus {
|
|
289
292
|
outline: none;
|
|
290
293
|
text-decoration: none;
|
|
291
294
|
}
|
|
292
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
295
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279:not(#\9):focus {
|
|
293
296
|
position: relative;
|
|
294
297
|
}
|
|
295
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
298
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279:not(#\9):focus {
|
|
296
299
|
outline: 2px dotted transparent;
|
|
297
300
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px)) - 1px);
|
|
298
301
|
}
|
|
299
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
302
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279:not(#\9):focus::before {
|
|
300
303
|
content: " ";
|
|
301
304
|
display: block;
|
|
302
305
|
position: absolute;
|
|
@@ -310,14 +313,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_15zfd_276:n
|
|
|
310
313
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
311
314
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
312
315
|
}
|
|
313
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
316
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9) {
|
|
314
317
|
position: relative;
|
|
315
318
|
}
|
|
316
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
319
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9) {
|
|
317
320
|
outline: 2px dotted transparent;
|
|
318
321
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px)) - 1px);
|
|
319
322
|
}
|
|
320
|
-
body[data-awsui-focus-visible=true] .awsui_header-cell-
|
|
323
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183:not(#\9)::before {
|
|
321
324
|
content: " ";
|
|
322
325
|
display: block;
|
|
323
326
|
position: absolute;
|
|
@@ -331,32 +334,32 @@ body[data-awsui-focus-visible=true] .awsui_header-cell-content_1spae_15zfd_276.a
|
|
|
331
334
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
332
335
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
333
336
|
}
|
|
334
|
-
.awsui_header-cell-
|
|
337
|
+
.awsui_header-cell-disabled_1spae_1c23e_337.awsui_header-cell-sorted_1spae_1c23e_337 > .awsui_header-cell-content_1spae_1c23e_279 > .awsui_sorting-icon_1spae_1c23e_265:not(#\9) {
|
|
335
338
|
color: var(--color-text-interactive-disabled-f5b4z5, #b4b4bb);
|
|
336
339
|
}
|
|
337
340
|
|
|
338
|
-
.awsui_header-cell-
|
|
341
|
+
.awsui_header-cell-sortable_1spae_1c23e_219:not(#\9):not(.awsui_header-cell-disabled_1spae_1c23e_337) > .awsui_header-cell-content_1spae_1c23e_279 {
|
|
339
342
|
cursor: pointer;
|
|
340
343
|
}
|
|
341
|
-
.awsui_header-cell-
|
|
344
|
+
.awsui_header-cell-sortable_1spae_1c23e_219:not(#\9):not(.awsui_header-cell-disabled_1spae_1c23e_337) > .awsui_header-cell-content_1spae_1c23e_279:hover, .awsui_header-cell-sortable_1spae_1c23e_219:not(#\9):not(.awsui_header-cell-disabled_1spae_1c23e_337).awsui_header-cell-sorted_1spae_1c23e_337 > .awsui_header-cell-content_1spae_1c23e_279 {
|
|
342
345
|
color: var(--color-text-interactive-active-j6vw94, #0f141a);
|
|
343
346
|
}
|
|
344
|
-
.awsui_header-cell-
|
|
347
|
+
.awsui_header-cell-sortable_1spae_1c23e_219:not(#\9):not(.awsui_header-cell-disabled_1spae_1c23e_337) > .awsui_header-cell-content_1spae_1c23e_279:hover > .awsui_sorting-icon_1spae_1c23e_265, .awsui_header-cell-sortable_1spae_1c23e_219:not(#\9):not(.awsui_header-cell-disabled_1spae_1c23e_337).awsui_header-cell-sorted_1spae_1c23e_337 > .awsui_header-cell-content_1spae_1c23e_279 > .awsui_sorting-icon_1spae_1c23e_265 {
|
|
345
348
|
color: var(--color-text-interactive-active-j6vw94, #0f141a);
|
|
346
349
|
}
|
|
347
350
|
|
|
348
|
-
.awsui_header-cell-
|
|
351
|
+
.awsui_header-cell-text_1spae_1c23e_351:not(#\9) {
|
|
349
352
|
line-height: var(--line-height-heading-xs-aeleja, 18px);
|
|
350
353
|
padding-block: calc(var(--space-xxxs-zbmxqb, 2px) / 2);
|
|
351
354
|
}
|
|
352
|
-
.awsui_header-cell-
|
|
355
|
+
.awsui_header-cell-text_1spae_1c23e_351:not(#\9):not(.awsui_header-cell-text-wrap_1spae_1c23e_355) {
|
|
353
356
|
white-space: nowrap;
|
|
354
357
|
overflow: hidden;
|
|
355
358
|
text-overflow: ellipsis;
|
|
356
359
|
}
|
|
357
360
|
|
|
358
|
-
.awsui_header-cell-
|
|
359
|
-
.awsui_header-cell-
|
|
361
|
+
.awsui_header-cell-ascending_1spae_1c23e_361:not(#\9),
|
|
362
|
+
.awsui_header-cell-descending_1spae_1c23e_362:not(#\9) {
|
|
360
363
|
/* used in test-utils */
|
|
361
364
|
}
|
|
362
365
|
|
|
@@ -366,28 +369,28 @@ with the left edge of the table as closely as possible. If the
|
|
|
366
369
|
last header cell is sortable the sort icon should align with the
|
|
367
370
|
settings icon in the pagination slot.
|
|
368
371
|
*/
|
|
369
|
-
.awsui_header-
|
|
372
|
+
.awsui_header-cell_1spae_1c23e_149:not(#\9):not(.awsui_is-visual-refresh_1spae_1c23e_216):first-child {
|
|
370
373
|
padding-inline-start: var(--space-xs-zb16t3, 8px);
|
|
371
374
|
}
|
|
372
|
-
.awsui_header-
|
|
375
|
+
.awsui_header-cell_1spae_1c23e_149:not(#\9):not(.awsui_is-visual-refresh_1spae_1c23e_216):first-child.awsui_header-cell-content-expandable_1spae_1c23e_285 {
|
|
373
376
|
padding-inline-start: calc(var(--space-xs-zb16t3, 8px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
374
377
|
}
|
|
375
378
|
|
|
376
|
-
.awsui_header-
|
|
379
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9) {
|
|
377
380
|
/*
|
|
378
381
|
Striped rows requires additional left padding because the
|
|
379
382
|
shaded background makes the child content appear too close
|
|
380
383
|
to the table edge.
|
|
381
384
|
*/
|
|
382
385
|
}
|
|
383
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
386
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child:focus {
|
|
384
387
|
position: relative;
|
|
385
388
|
}
|
|
386
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
389
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child:focus {
|
|
387
390
|
outline: 2px dotted transparent;
|
|
388
391
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
389
392
|
}
|
|
390
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
393
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child:focus::before {
|
|
391
394
|
content: " ";
|
|
392
395
|
display: block;
|
|
393
396
|
position: absolute;
|
|
@@ -401,14 +404,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_is-
|
|
|
401
404
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
402
405
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
403
406
|
}
|
|
404
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
407
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_1c23e_183 {
|
|
405
408
|
position: relative;
|
|
406
409
|
}
|
|
407
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
410
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_1c23e_183 {
|
|
408
411
|
outline: 2px dotted transparent;
|
|
409
412
|
outline-offset: calc(calc(-1 * var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
410
413
|
}
|
|
411
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
414
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child.awsui_header-cell-fake-focus_1spae_1c23e_183::before {
|
|
412
415
|
content: " ";
|
|
413
416
|
display: block;
|
|
414
417
|
position: absolute;
|
|
@@ -422,20 +425,20 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_is-
|
|
|
422
425
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
423
426
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
424
427
|
}
|
|
425
|
-
.awsui_header-
|
|
428
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279 {
|
|
426
429
|
padding-inline-start: 0px;
|
|
427
430
|
}
|
|
428
|
-
.awsui_header-
|
|
431
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-content-expandable_1spae_1c23e_285 {
|
|
429
432
|
padding-inline-start: calc(0px + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
430
433
|
}
|
|
431
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
434
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279:focus {
|
|
432
435
|
position: relative;
|
|
433
436
|
}
|
|
434
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
437
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279:focus {
|
|
435
438
|
outline: 2px dotted transparent;
|
|
436
439
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
437
440
|
}
|
|
438
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
441
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279:focus::before {
|
|
439
442
|
content: " ";
|
|
440
443
|
display: block;
|
|
441
444
|
position: absolute;
|
|
@@ -449,14 +452,14 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_is-
|
|
|
449
452
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
450
453
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
451
454
|
}
|
|
452
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
455
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183 {
|
|
453
456
|
position: relative;
|
|
454
457
|
}
|
|
455
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
458
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183 {
|
|
456
459
|
outline: 2px dotted transparent;
|
|
457
460
|
outline-offset: calc(calc(-1 * var(--space-table-header-focus-outline-gutter-7js4en, 0px) + var(--space-scaled-xxs-7597g1, 4px)) - 1px);
|
|
458
461
|
}
|
|
459
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
462
|
+
body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1c23e_279.awsui_header-cell-fake-focus_1spae_1c23e_183::before {
|
|
460
463
|
content: " ";
|
|
461
464
|
display: block;
|
|
462
465
|
position: absolute;
|
|
@@ -470,24 +473,24 @@ body[data-awsui-focus-visible=true] .awsui_header-cell_1spae_15zfd_149.awsui_is-
|
|
|
470
473
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
471
474
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
472
475
|
}
|
|
473
|
-
.awsui_header-
|
|
476
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_1c23e_476):not(.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476) {
|
|
474
477
|
padding-inline-start: var(--space-xxxs-zbmxqb, 2px);
|
|
475
478
|
}
|
|
476
|
-
.awsui_header-
|
|
479
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_1c23e_476):not(.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476).awsui_header-cell-content-expandable_1spae_1c23e_285 {
|
|
477
480
|
padding-inline-start: calc(var(--space-xxxs-zbmxqb, 2px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
478
481
|
}
|
|
479
|
-
.awsui_header-
|
|
482
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child.awsui_has-striped-rows_1spae_1c23e_476:not(.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476) {
|
|
480
483
|
padding-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
481
484
|
}
|
|
482
|
-
.awsui_header-
|
|
485
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):first-child.awsui_has-striped-rows_1spae_1c23e_476:not(.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476).awsui_header-cell-content-expandable_1spae_1c23e_285 {
|
|
483
486
|
padding-inline-start: calc(var(--space-xxs-p8yyaw, 4px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
484
487
|
}
|
|
485
|
-
.awsui_header-
|
|
488
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216:not(#\9):last-child.awsui_header-cell-sortable_1spae_1c23e_219 {
|
|
486
489
|
padding-inline-end: var(--space-xxxs-zbmxqb, 2px);
|
|
487
490
|
}
|
|
488
|
-
.awsui_header-
|
|
491
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476:not(#\9) {
|
|
489
492
|
padding-inline-start: var(--space-scaled-l-0hpmd7, 20px);
|
|
490
493
|
}
|
|
491
|
-
.awsui_header-
|
|
494
|
+
.awsui_header-cell_1spae_1c23e_149.awsui_is-visual-refresh_1spae_1c23e_216.awsui_sticky-cell-pad-inline-start_1spae_1c23e_476.awsui_header-cell-content-expandable_1spae_1c23e_285:not(#\9) {
|
|
492
495
|
padding-inline-start: calc(var(--space-scaled-l-0hpmd7, 20px) + var(--space-m-udix3p, 16px) + var(--space-xs-zb16t3, 8px));
|
|
493
496
|
}
|
|
@@ -2,31 +2,33 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"header-cell": "awsui_header-
|
|
6
|
-
"header-cell-fake-focus": "awsui_header-cell-fake-
|
|
7
|
-
"header-cell-sticky": "awsui_header-cell-
|
|
8
|
-
"header-cell-stuck": "awsui_header-cell-
|
|
9
|
-
"header-cell-variant-full-page": "awsui_header-cell-variant-full-
|
|
10
|
-
"header-cell-hidden": "awsui_header-cell-
|
|
11
|
-
"header-cell-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"sticky-cell
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"header-cell-
|
|
24
|
-
"header-cell-
|
|
25
|
-
"header-cell-
|
|
26
|
-
"header-cell-
|
|
27
|
-
"header-cell-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
5
|
+
"header-cell": "awsui_header-cell_1spae_1c23e_149",
|
|
6
|
+
"header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1c23e_183",
|
|
7
|
+
"header-cell-sticky": "awsui_header-cell-sticky_1spae_1c23e_204",
|
|
8
|
+
"header-cell-stuck": "awsui_header-cell-stuck_1spae_1c23e_207",
|
|
9
|
+
"header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1c23e_207",
|
|
10
|
+
"header-cell-hidden": "awsui_header-cell-hidden_1spae_1c23e_213",
|
|
11
|
+
"header-cell-variant-embedded": "awsui_header-cell-variant-embedded_1spae_1c23e_216",
|
|
12
|
+
"is-visual-refresh": "awsui_is-visual-refresh_1spae_1c23e_216",
|
|
13
|
+
"header-cell-variant-borderless": "awsui_header-cell-variant-borderless_1spae_1c23e_216",
|
|
14
|
+
"header-cell-sortable": "awsui_header-cell-sortable_1spae_1c23e_219",
|
|
15
|
+
"sticky-cell": "awsui_sticky-cell_1spae_1c23e_222",
|
|
16
|
+
"sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_1c23e_240",
|
|
17
|
+
"has-selection": "awsui_has-selection_1spae_1c23e_240",
|
|
18
|
+
"sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-start_1spae_1c23e_243",
|
|
19
|
+
"resize-divider": "awsui_resize-divider_1spae_1c23e_248",
|
|
20
|
+
"sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-end_1spae_1c23e_255",
|
|
21
|
+
"sorting-icon": "awsui_sorting-icon_1spae_1c23e_265",
|
|
22
|
+
"edit-icon": "awsui_edit-icon_1spae_1c23e_273",
|
|
23
|
+
"header-cell-content": "awsui_header-cell-content_1spae_1c23e_279",
|
|
24
|
+
"header-cell-content-expandable": "awsui_header-cell-content-expandable_1spae_1c23e_285",
|
|
25
|
+
"header-cell-disabled": "awsui_header-cell-disabled_1spae_1c23e_337",
|
|
26
|
+
"header-cell-sorted": "awsui_header-cell-sorted_1spae_1c23e_337",
|
|
27
|
+
"header-cell-text": "awsui_header-cell-text_1spae_1c23e_351",
|
|
28
|
+
"header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1c23e_355",
|
|
29
|
+
"header-cell-ascending": "awsui_header-cell-ascending_1spae_1c23e_361",
|
|
30
|
+
"header-cell-descending": "awsui_header-cell-descending_1spae_1c23e_362",
|
|
31
|
+
"has-striped-rows": "awsui_has-striped-rows_1spae_1c23e_476",
|
|
32
|
+
"sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-start_1spae_1c23e_476"
|
|
31
33
|
};
|
|
32
34
|
|