@cloudscape-design/components 3.0.865 → 3.0.867
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/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +3 -2
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/utils/use-focus-control.d.ts +2 -1
- package/app-layout/utils/use-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-focus-control.js +2 -0
- package/app-layout/utils/use-focus-control.js.map +1 -1
- package/app-layout/utils/use-resize.d.ts.map +1 -1
- package/app-layout/utils/use-resize.js +3 -2
- package/app-layout/utils/use-resize.js.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts +2 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.js +1 -0
- package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +3 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +3 -2
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +7 -0
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +2 -2
- package/attribute-editor/internal.js.map +1 -1
- package/button/internal.js +1 -1
- package/button/internal.js.map +1 -1
- package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
- package/collection-preferences/content-display/content-display-option.js +2 -1
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/styles.css.js +11 -10
- package/collection-preferences/content-display/styles.scoped.css +14 -10
- package/collection-preferences/content-display/styles.selectors.js +11 -10
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +1 -1
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/styles.css.js +38 -37
- package/collection-preferences/styles.scoped.css +42 -38
- package/collection-preferences/styles.selectors.js +38 -37
- package/internal/components/drag-handle/index.d.ts +4 -8
- package/internal/components/drag-handle/index.d.ts.map +1 -1
- package/internal/components/drag-handle/index.js +23 -5
- package/internal/components/drag-handle/index.js.map +1 -1
- package/internal/components/drag-handle/interfaces.d.ts +25 -0
- package/internal/components/drag-handle/interfaces.d.ts.map +1 -0
- package/internal/components/drag-handle/interfaces.js +4 -0
- package/internal/components/drag-handle/interfaces.js.map +1 -0
- package/internal/components/drag-handle/resize-icon.d.ts +7 -0
- package/internal/components/drag-handle/resize-icon.d.ts.map +1 -0
- package/internal/components/{panel-resize-handle/icon.js → drag-handle/resize-icon.js} +5 -3
- package/internal/components/drag-handle/resize-icon.js.map +1 -0
- package/internal/components/drag-handle/styles.css.js +12 -3
- package/internal/components/drag-handle/styles.scoped.css +51 -20
- package/internal/components/drag-handle/styles.selectors.js +12 -3
- package/internal/components/options-list/index.js +1 -1
- package/internal/components/options-list/index.js.map +1 -1
- package/internal/components/panel-resize-handle/index.d.ts +4 -2
- package/internal/components/panel-resize-handle/index.d.ts.map +1 -1
- package/internal/components/panel-resize-handle/index.js +8 -5
- package/internal/components/panel-resize-handle/index.js.map +1 -1
- package/internal/components/panel-resize-handle/styles.css.js +2 -5
- package/internal/components/panel-resize-handle/styles.scoped.css +3 -191
- package/internal/components/panel-resize-handle/styles.selectors.js +2 -5
- package/internal/components/portal/index.d.ts.map +1 -1
- package/internal/components/portal/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/events/index.d.ts +1 -1
- package/internal/events/index.d.ts.map +1 -1
- package/internal/events/index.js.map +1 -1
- package/internal/hooks/use-performance-marks/index.d.ts +1 -1
- package/internal/hooks/use-performance-marks/index.d.ts.map +1 -1
- package/internal/hooks/use-performance-marks/index.js +2 -2
- package/internal/hooks/use-performance-marks/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/internal.js +5 -4
- package/popover/internal.js.map +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +1 -3
- package/prompt-input/internal.js.map +1 -1
- package/split-panel/implementation.d.ts.map +1 -1
- package/split-panel/implementation.js +7 -6
- package/split-panel/implementation.js.map +1 -1
- package/table/internal.js +1 -1
- package/table/internal.js.map +1 -1
- package/tabs/styles.css.js +28 -28
- package/tabs/styles.scoped.css +50 -49
- package/tabs/styles.selectors.js +28 -28
- package/internal/components/panel-resize-handle/icon.d.ts +0 -5
- package/internal/components/panel-resize-handle/icon.d.ts.map +0 -1
- package/internal/components/panel-resize-handle/icon.js.map +0 -1
|
@@ -286,14 +286,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
286
286
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
287
287
|
SPDX-License-Identifier: Apache-2.0
|
|
288
288
|
*/
|
|
289
|
-
.awsui_visible-
|
|
290
|
-
.awsui_visible-content-
|
|
291
|
-
.awsui_visible-content-
|
|
292
|
-
.awsui_visible-content-
|
|
289
|
+
.awsui_visible-content_tc96w_dqnby_289:not(#\9),
|
|
290
|
+
.awsui_visible-content-toggle_tc96w_dqnby_290:not(#\9),
|
|
291
|
+
.awsui_visible-content-groups_tc96w_dqnby_291:not(#\9),
|
|
292
|
+
.awsui_visible-content-group_tc96w_dqnby_291:not(#\9) {
|
|
293
293
|
/* used in test-utils */
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_visible-content-
|
|
296
|
+
.awsui_visible-content-title_tc96w_dqnby_296:not(#\9) {
|
|
297
297
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
298
298
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
299
299
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -303,13 +303,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
303
303
|
margin-inline: 0;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_visible-content-group-
|
|
306
|
+
.awsui_visible-content-group-label_tc96w_dqnby_306:not(#\9) {
|
|
307
307
|
color: var(--color-text-group-label-8pk3es, #424650);
|
|
308
308
|
padding-block-end: var(--space-xs-zb16t3, 8px);
|
|
309
309
|
border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
.awsui_visible-content-
|
|
312
|
+
.awsui_visible-content-option_tc96w_dqnby_312:not(#\9) {
|
|
313
313
|
display: flex;
|
|
314
314
|
flex-wrap: nowrap;
|
|
315
315
|
justify-content: space-between;
|
|
@@ -318,11 +318,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
318
318
|
padding-inline-end: 0px;
|
|
319
319
|
border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
320
320
|
}
|
|
321
|
-
.awsui_visible-content-
|
|
321
|
+
.awsui_visible-content-option_tc96w_dqnby_312:not(#\9):last-child {
|
|
322
322
|
border-block-end: none;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
.awsui_visible-content-option-
|
|
325
|
+
.awsui_visible-content-option-label_tc96w_dqnby_325:not(#\9) {
|
|
326
326
|
overflow: hidden;
|
|
327
327
|
text-overflow: ellipsis;
|
|
328
328
|
padding-inline-end: var(--space-l-t419sm, 20px);
|
|
@@ -617,11 +617,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
617
617
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
618
618
|
SPDX-License-Identifier: Apache-2.0
|
|
619
619
|
*/
|
|
620
|
-
.awsui_content-display-option-
|
|
620
|
+
.awsui_content-display-option-toggle_tc96w_dqnby_620:not(#\9) {
|
|
621
621
|
/* used in test-utils */
|
|
622
622
|
}
|
|
623
623
|
|
|
624
|
-
.awsui_content-display-option-
|
|
624
|
+
.awsui_content-display-option-content_tc96w_dqnby_624:not(#\9) {
|
|
625
625
|
border-collapse: separate;
|
|
626
626
|
border-spacing: 0;
|
|
627
627
|
box-sizing: border-box;
|
|
@@ -664,26 +664,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
664
664
|
border-end-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
.awsui_content-display-
|
|
667
|
+
.awsui_content-display-option_tc96w_dqnby_620:not(#\9) {
|
|
668
668
|
list-style: none;
|
|
669
669
|
position: relative;
|
|
670
670
|
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
-
.awsui_content-display-option-
|
|
673
|
+
.awsui_content-display-option-label_tc96w_dqnby_672:not(#\9) {
|
|
674
674
|
flex-grow: 1;
|
|
675
675
|
min-inline-size: 0;
|
|
676
676
|
word-break: break-word;
|
|
677
677
|
padding-inline-end: var(--space-l-t419sm, 20px);
|
|
678
678
|
}
|
|
679
679
|
|
|
680
|
-
.
|
|
681
|
-
|
|
682
|
-
|
|
680
|
+
.awsui_drag-handle-wrapper_tc96w_dqnby_679:not(#\9) {
|
|
681
|
+
margin-inline: var(--space-scaled-xxs-7597g1, 4px);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.awsui_content-display_tc96w_dqnby_620:not(#\9),
|
|
685
|
+
.awsui_content-display-text-filter_tc96w_dqnby_684:not(#\9),
|
|
686
|
+
.awsui_content-display-no-match_tc96w_dqnby_685:not(#\9) {
|
|
683
687
|
/* used in test-utils */
|
|
684
688
|
}
|
|
685
689
|
|
|
686
|
-
.awsui_content-display-
|
|
690
|
+
.awsui_content-display-title_tc96w_dqnby_689:not(#\9) {
|
|
687
691
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
688
692
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
689
693
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -692,7 +696,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
692
696
|
margin-inline: 0;
|
|
693
697
|
}
|
|
694
698
|
|
|
695
|
-
.awsui_content-display-
|
|
699
|
+
.awsui_content-display-description_tc96w_dqnby_698:not(#\9) {
|
|
696
700
|
color: var(--color-text-form-secondary-54emib, #656871);
|
|
697
701
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
698
702
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
@@ -700,37 +704,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
700
704
|
margin-block-start: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
701
705
|
}
|
|
702
706
|
|
|
703
|
-
.awsui_content-display-option-
|
|
707
|
+
.awsui_content-display-option-list_tc96w_dqnby_706:not(#\9) {
|
|
704
708
|
position: relative;
|
|
705
709
|
list-style: none;
|
|
706
710
|
padding-block: 0;
|
|
707
711
|
padding-inline: 0;
|
|
708
712
|
}
|
|
709
713
|
|
|
710
|
-
.
|
|
711
|
-
.awsui_modal-
|
|
712
|
-
.awsui_trigger-
|
|
713
|
-
.awsui_cancel-
|
|
714
|
-
.awsui_confirm-
|
|
715
|
-
.
|
|
716
|
-
.awsui_content-
|
|
714
|
+
.awsui_root_tc96w_dqnby_713:not(#\9),
|
|
715
|
+
.awsui_modal-root_tc96w_dqnby_714:not(#\9),
|
|
716
|
+
.awsui_trigger-button_tc96w_dqnby_715:not(#\9),
|
|
717
|
+
.awsui_cancel-button_tc96w_dqnby_716:not(#\9),
|
|
718
|
+
.awsui_confirm-button_tc96w_dqnby_717:not(#\9),
|
|
719
|
+
.awsui_custom_tc96w_dqnby_718:not(#\9),
|
|
720
|
+
.awsui_content-before_tc96w_dqnby_719:not(#\9) {
|
|
717
721
|
/* used in test-utils */
|
|
718
722
|
}
|
|
719
723
|
|
|
720
|
-
.awsui_second-column-
|
|
724
|
+
.awsui_second-column-small_tc96w_dqnby_723:not(#\9) {
|
|
721
725
|
padding-block-start: calc(2 * var(--space-scaled-l-0hpmd7, 20px));
|
|
722
726
|
}
|
|
723
727
|
|
|
724
|
-
.awsui_wrap-
|
|
725
|
-
.awsui_striped-
|
|
726
|
-
.awsui_content-
|
|
727
|
-
.awsui_page-
|
|
728
|
-
.awsui_page-size-form-
|
|
729
|
-
.awsui_page-size-radio-
|
|
730
|
-
.awsui_sticky-
|
|
731
|
-
.awsui_sticky-columns-form-
|
|
732
|
-
.awsui_sticky-columns-radio-
|
|
733
|
-
.awsui_sticky-columns-
|
|
734
|
-
.awsui_sticky-columns-
|
|
728
|
+
.awsui_wrap-lines_tc96w_dqnby_727:not(#\9),
|
|
729
|
+
.awsui_striped-rows_tc96w_dqnby_728:not(#\9),
|
|
730
|
+
.awsui_content-density_tc96w_dqnby_729:not(#\9),
|
|
731
|
+
.awsui_page-size_tc96w_dqnby_730:not(#\9),
|
|
732
|
+
.awsui_page-size-form-field_tc96w_dqnby_731:not(#\9),
|
|
733
|
+
.awsui_page-size-radio-group_tc96w_dqnby_732:not(#\9),
|
|
734
|
+
.awsui_sticky-columns_tc96w_dqnby_733:not(#\9),
|
|
735
|
+
.awsui_sticky-columns-form-field_tc96w_dqnby_734:not(#\9),
|
|
736
|
+
.awsui_sticky-columns-radio-group_tc96w_dqnby_735:not(#\9),
|
|
737
|
+
.awsui_sticky-columns-first_tc96w_dqnby_736:not(#\9),
|
|
738
|
+
.awsui_sticky-columns-last_tc96w_dqnby_737:not(#\9) {
|
|
735
739
|
/* used in test-utils */
|
|
736
740
|
}
|
|
@@ -2,42 +2,43 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"visible-content": "awsui_visible-
|
|
6
|
-
"visible-content-toggle": "awsui_visible-content-
|
|
7
|
-
"visible-content-groups": "awsui_visible-content-
|
|
8
|
-
"visible-content-group": "awsui_visible-content-
|
|
9
|
-
"visible-content-title": "awsui_visible-content-
|
|
10
|
-
"visible-content-group-label": "awsui_visible-content-group-
|
|
11
|
-
"visible-content-option": "awsui_visible-content-
|
|
12
|
-
"visible-content-option-label": "awsui_visible-content-option-
|
|
13
|
-
"content-display-option-toggle": "awsui_content-display-option-
|
|
14
|
-
"content-display-option-content": "awsui_content-display-option-
|
|
15
|
-
"content-display-option": "awsui_content-display-
|
|
16
|
-
"content-display-option-label": "awsui_content-display-option-
|
|
17
|
-
"
|
|
18
|
-
"content-display
|
|
19
|
-
"content-display-
|
|
20
|
-
"content-display-
|
|
21
|
-
"content-display-
|
|
22
|
-
"content-display-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"page-size
|
|
36
|
-
"page-size-
|
|
37
|
-
"
|
|
38
|
-
"sticky-columns
|
|
39
|
-
"sticky-columns-
|
|
40
|
-
"sticky-columns-
|
|
41
|
-
"sticky-columns-
|
|
5
|
+
"visible-content": "awsui_visible-content_tc96w_dqnby_289",
|
|
6
|
+
"visible-content-toggle": "awsui_visible-content-toggle_tc96w_dqnby_290",
|
|
7
|
+
"visible-content-groups": "awsui_visible-content-groups_tc96w_dqnby_291",
|
|
8
|
+
"visible-content-group": "awsui_visible-content-group_tc96w_dqnby_291",
|
|
9
|
+
"visible-content-title": "awsui_visible-content-title_tc96w_dqnby_296",
|
|
10
|
+
"visible-content-group-label": "awsui_visible-content-group-label_tc96w_dqnby_306",
|
|
11
|
+
"visible-content-option": "awsui_visible-content-option_tc96w_dqnby_312",
|
|
12
|
+
"visible-content-option-label": "awsui_visible-content-option-label_tc96w_dqnby_325",
|
|
13
|
+
"content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_dqnby_620",
|
|
14
|
+
"content-display-option-content": "awsui_content-display-option-content_tc96w_dqnby_624",
|
|
15
|
+
"content-display-option": "awsui_content-display-option_tc96w_dqnby_620",
|
|
16
|
+
"content-display-option-label": "awsui_content-display-option-label_tc96w_dqnby_672",
|
|
17
|
+
"drag-handle-wrapper": "awsui_drag-handle-wrapper_tc96w_dqnby_679",
|
|
18
|
+
"content-display": "awsui_content-display_tc96w_dqnby_620",
|
|
19
|
+
"content-display-text-filter": "awsui_content-display-text-filter_tc96w_dqnby_684",
|
|
20
|
+
"content-display-no-match": "awsui_content-display-no-match_tc96w_dqnby_685",
|
|
21
|
+
"content-display-title": "awsui_content-display-title_tc96w_dqnby_689",
|
|
22
|
+
"content-display-description": "awsui_content-display-description_tc96w_dqnby_698",
|
|
23
|
+
"content-display-option-list": "awsui_content-display-option-list_tc96w_dqnby_706",
|
|
24
|
+
"root": "awsui_root_tc96w_dqnby_713",
|
|
25
|
+
"modal-root": "awsui_modal-root_tc96w_dqnby_714",
|
|
26
|
+
"trigger-button": "awsui_trigger-button_tc96w_dqnby_715",
|
|
27
|
+
"cancel-button": "awsui_cancel-button_tc96w_dqnby_716",
|
|
28
|
+
"confirm-button": "awsui_confirm-button_tc96w_dqnby_717",
|
|
29
|
+
"custom": "awsui_custom_tc96w_dqnby_718",
|
|
30
|
+
"content-before": "awsui_content-before_tc96w_dqnby_719",
|
|
31
|
+
"second-column-small": "awsui_second-column-small_tc96w_dqnby_723",
|
|
32
|
+
"wrap-lines": "awsui_wrap-lines_tc96w_dqnby_727",
|
|
33
|
+
"striped-rows": "awsui_striped-rows_tc96w_dqnby_728",
|
|
34
|
+
"content-density": "awsui_content-density_tc96w_dqnby_729",
|
|
35
|
+
"page-size": "awsui_page-size_tc96w_dqnby_730",
|
|
36
|
+
"page-size-form-field": "awsui_page-size-form-field_tc96w_dqnby_731",
|
|
37
|
+
"page-size-radio-group": "awsui_page-size-radio-group_tc96w_dqnby_732",
|
|
38
|
+
"sticky-columns": "awsui_sticky-columns_tc96w_dqnby_733",
|
|
39
|
+
"sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_dqnby_734",
|
|
40
|
+
"sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_dqnby_735",
|
|
41
|
+
"sticky-columns-first": "awsui_sticky-columns-first_tc96w_dqnby_736",
|
|
42
|
+
"sticky-columns-last": "awsui_sticky-columns-last_tc96w_dqnby_737"
|
|
42
43
|
};
|
|
43
44
|
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onPointerDown?: React.PointerEventHandler;
|
|
7
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
8
|
-
}
|
|
9
|
-
export default function DragHandle({ ariaLabel, ariaDescribedby, disabled, onPointerDown, onKeyDown, }: DragHandleProps): JSX.Element;
|
|
2
|
+
import { DragHandleProps } from './interfaces';
|
|
3
|
+
export { DragHandleProps };
|
|
4
|
+
declare const DragHandle: React.ForwardRefExoticComponent<DragHandleProps & React.RefAttributes<DragHandleProps.Ref>>;
|
|
5
|
+
export default DragHandle;
|
|
10
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/index.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,6FA+Df,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { forwardRef, useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import InternalIcon from '../../../icon/internal';
|
|
6
|
+
import useForwardFocus from '../../hooks/forward-focus';
|
|
7
|
+
import { ResizeIcon } from './resize-icon';
|
|
6
8
|
import styles from './styles.css.js';
|
|
7
|
-
|
|
9
|
+
const DragHandle = forwardRef(({ variant = 'drag-indicator', size = 'normal', ariaLabel, ariaDescribedby, ariaValue, disabled, onPointerDown, onKeyDown, className, }, ref) => {
|
|
10
|
+
const dragHandleRefObject = useRef(null);
|
|
11
|
+
useForwardFocus(ref, dragHandleRefObject);
|
|
12
|
+
const iconProps = (() => {
|
|
13
|
+
const shared = { variant: disabled ? 'disabled' : undefined, size };
|
|
14
|
+
switch (variant) {
|
|
15
|
+
case 'drag-indicator':
|
|
16
|
+
return Object.assign(Object.assign({}, shared), { name: 'drag-indicator' });
|
|
17
|
+
case 'resize-area':
|
|
18
|
+
return Object.assign(Object.assign({}, shared), { name: 'resize-area' });
|
|
19
|
+
case 'resize-horizontal':
|
|
20
|
+
return Object.assign(Object.assign({}, shared), { svg: React.createElement(ResizeIcon, { variant: "horizontal" }) });
|
|
21
|
+
case 'resize-vertical':
|
|
22
|
+
return Object.assign(Object.assign({}, shared), { svg: React.createElement(ResizeIcon, { variant: "vertical" }) });
|
|
23
|
+
}
|
|
24
|
+
})();
|
|
8
25
|
return (
|
|
9
26
|
// We need to use a div with button role instead of a button
|
|
10
27
|
// so that Safari will focus on it when clicking it.
|
|
11
28
|
// (See https://bugs.webkit.org/show_bug.cgi?id=22261)
|
|
12
29
|
// Otherwise, we can't reliably catch keyboard events coming from the handle
|
|
13
30
|
// when it is being dragged.
|
|
14
|
-
React.createElement("div", { role:
|
|
15
|
-
React.createElement(InternalIcon, {
|
|
16
|
-
}
|
|
31
|
+
React.createElement("div", { ref: dragHandleRefObject, role: ariaValue ? 'slider' : 'button', tabIndex: 0, className: clsx(className, styles.handle, styles[`handle-${variant}`], styles[`handle-size-${size}`], disabled && styles['handle-disabled']), "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-disabled": disabled, "aria-valuemax": ariaValue === null || ariaValue === void 0 ? void 0 : ariaValue.valueMax, "aria-valuemin": ariaValue === null || ariaValue === void 0 ? void 0 : ariaValue.valueMin, "aria-valuenow": ariaValue === null || ariaValue === void 0 ? void 0 : ariaValue.valueNow, onPointerDown: onPointerDown, onKeyDown: onKeyDown },
|
|
32
|
+
React.createElement(InternalIcon, Object.assign({}, iconProps))));
|
|
33
|
+
});
|
|
34
|
+
export default DragHandle;
|
|
17
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,eAAe,MAAM,2BAA2B,CAA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b,SAAS,EACT,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,UAAU,OAAO,EAAE,CAAC,EAC3B,MAAM,CAAC,eAAe,IAAI,EAAE,CAAC,EAC7B,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC,CACtC,gBACW,SAAS,sBACH,eAAe,mBAClB,QAAQ,mBACR,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,mBACnB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,mBACnB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,EAClC,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS;QAEpB,oBAAC,YAAY,oBAAK,SAAS,EAAI,CAC3B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { IconProps } from '../../../icon/interfaces';\nimport InternalIcon from '../../../icon/internal';\nimport useForwardFocus from '../../hooks/forward-focus';\nimport { DragHandleProps } from './interfaces';\nimport { ResizeIcon } from './resize-icon';\n\nimport styles from './styles.css.js';\n\nexport { DragHandleProps };\n\nconst DragHandle = forwardRef(\n (\n {\n variant = 'drag-indicator',\n size = 'normal',\n ariaLabel,\n ariaDescribedby,\n ariaValue,\n disabled,\n onPointerDown,\n onKeyDown,\n className,\n }: DragHandleProps,\n ref: React.Ref<DragHandleProps.Ref>\n ) => {\n const dragHandleRefObject = useRef<HTMLDivElement>(null);\n\n useForwardFocus(ref, dragHandleRefObject);\n\n const iconProps: IconProps = (() => {\n const shared = { variant: disabled ? ('disabled' as const) : undefined, size };\n switch (variant) {\n case 'drag-indicator':\n return { ...shared, name: 'drag-indicator' };\n case 'resize-area':\n return { ...shared, name: 'resize-area' };\n case 'resize-horizontal':\n return { ...shared, svg: <ResizeIcon variant=\"horizontal\" /> };\n case 'resize-vertical':\n return { ...shared, svg: <ResizeIcon variant=\"vertical\" /> };\n }\n })();\n\n return (\n // We need to use a div with button role instead of a button\n // so that Safari will focus on it when clicking it.\n // (See https://bugs.webkit.org/show_bug.cgi?id=22261)\n // Otherwise, we can't reliably catch keyboard events coming from the handle\n // when it is being dragged.\n <div\n ref={dragHandleRefObject}\n role={ariaValue ? 'slider' : 'button'}\n tabIndex={0}\n className={clsx(\n className,\n styles.handle,\n styles[`handle-${variant}`],\n styles[`handle-size-${size}`],\n disabled && styles['handle-disabled']\n )}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-disabled={disabled}\n aria-valuemax={ariaValue?.valueMax}\n aria-valuemin={ariaValue?.valueMin}\n aria-valuenow={ariaValue?.valueNow}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <InternalIcon {...iconProps} />\n </div>\n );\n }\n);\n\nexport default DragHandle;\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DragHandleProps {
|
|
3
|
+
variant?: DragHandleProps.Variant;
|
|
4
|
+
size?: DragHandleProps.Size;
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
ariaDescribedby?: string;
|
|
7
|
+
ariaValue?: DragHandleProps.AriaValue;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onPointerDown?: React.PointerEventHandler;
|
|
10
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace DragHandleProps {
|
|
14
|
+
type Variant = 'drag-indicator' | 'resize-area' | 'resize-horizontal' | 'resize-vertical';
|
|
15
|
+
type Size = 'small' | 'normal';
|
|
16
|
+
interface AriaValue {
|
|
17
|
+
valueMin: number;
|
|
18
|
+
valueMax: number;
|
|
19
|
+
valueNow: number;
|
|
20
|
+
}
|
|
21
|
+
interface Ref {
|
|
22
|
+
focus(options?: FocusOptions): void;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/interfaces.ts"],"names":[],"mappings":";AAGA,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC;IAClC,IAAI,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IAC1C,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yBAAiB,eAAe,CAAC;IAC/B,KAAY,OAAO,GAAG,gBAAgB,GAAG,aAAa,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IAEjG,KAAY,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;IAEtC,UAAiB,SAAS;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB;IAED,UAAiB,GAAG;QAClB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;KACrC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport interface DragHandleProps {\n variant?: DragHandleProps.Variant;\n size?: DragHandleProps.Size;\n ariaLabel: string;\n ariaDescribedby?: string;\n ariaValue?: DragHandleProps.AriaValue;\n disabled?: boolean;\n onPointerDown?: React.PointerEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n className?: string;\n}\n\nexport namespace DragHandleProps {\n export type Variant = 'drag-indicator' | 'resize-area' | 'resize-horizontal' | 'resize-vertical';\n\n export type Size = 'small' | 'normal';\n\n export interface AriaValue {\n valueMin: number;\n valueMax: number;\n valueNow: number;\n }\n\n export interface Ref {\n focus(options?: FocusOptions): void;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-icon.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/resize-icon.tsx"],"names":[],"mappings":";AAQA,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC;CACpC;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,eAAe,eAetD"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import styles from './styles.css.js';
|
|
6
|
+
export function ResizeIcon({ variant }) {
|
|
7
|
+
return (React.createElement("svg", { focusable: false, className: clsx(styles['resize-icon'], styles[`resize-icon-${variant}`]), xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": true },
|
|
6
8
|
React.createElement("line", { strokeWidth: "2", x1: "2", y1: "5", x2: "14", y2: "5" }),
|
|
7
9
|
React.createElement("line", { strokeWidth: "2", x1: "14", y1: "10", x2: "2", y2: "10" })));
|
|
8
10
|
}
|
|
9
|
-
//# sourceMappingURL=icon.js.map
|
|
11
|
+
//# sourceMappingURL=resize-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-icon.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/resize-icon.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAmB;IACrD,OAAO,CACL,6BACE,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,eAAe,OAAO,EAAE,CAAC,CAAC,EACxE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,iBACN,IAAI;QAEjB,8BAAM,WAAW,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,GAAG;QACrD,8BAAM,WAAW,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,GAAG,CACnD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\n\ninterface ResizeIconProps {\n variant: 'horizontal' | 'vertical';\n}\n\nexport function ResizeIcon({ variant }: ResizeIconProps) {\n return (\n <svg\n focusable={false}\n className={clsx(styles['resize-icon'], styles[`resize-icon-${variant}`])}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden={true}\n >\n <line strokeWidth=\"2\" x1=\"2\" y1=\"5\" x2=\"14\" y2=\"5\" />\n <line strokeWidth=\"2\" x1=\"14\" y1=\"10\" x2=\"2\" y2=\"10\" />\n </svg>\n );\n}\n"]}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"handle": "
|
|
5
|
-
"
|
|
6
|
-
"handle-
|
|
4
|
+
"handle": "awsui_handle_sdha6_1q7hk_145",
|
|
5
|
+
"handle-size-normal": "awsui_handle-size-normal_sdha6_1q7hk_153",
|
|
6
|
+
"handle-size-small": "awsui_handle-size-small_sdha6_1q7hk_157",
|
|
7
|
+
"handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_1q7hk_160",
|
|
8
|
+
"handle-resize-area": "awsui_handle-resize-area_sdha6_1q7hk_166",
|
|
9
|
+
"handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_1q7hk_173",
|
|
10
|
+
"handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_1q7hk_176",
|
|
11
|
+
"handle-disabled": "awsui_handle-disabled_sdha6_1q7hk_179",
|
|
12
|
+
"hide-focus": "awsui_hide-focus_sdha6_1q7hk_189",
|
|
13
|
+
"resize-icon": "awsui_resize-icon_sdha6_1q7hk_211",
|
|
14
|
+
"resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_1q7hk_217",
|
|
15
|
+
"resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_1q7hk_221"
|
|
7
16
|
};
|
|
8
17
|
|
|
@@ -142,32 +142,60 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_handle_sdha6_1q7hk_145:not(#\9) {
|
|
146
146
|
-webkit-appearance: none;
|
|
147
147
|
appearance: none;
|
|
148
|
+
color: var(--color-text-interactive-default-tkx8fe, #424650);
|
|
148
149
|
background: transparent;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
inline-size: -moz-fit-content;
|
|
151
|
+
inline-size: fit-content;
|
|
152
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
153
|
+
touch-action: none;
|
|
154
|
+
}
|
|
155
|
+
.awsui_handle-size-normal_sdha6_1q7hk_153:not(#\9) {
|
|
156
|
+
block-size: var(--line-height-body-m-30ar75, 20px);
|
|
152
157
|
padding-inline: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
}
|
|
159
|
+
.awsui_handle-size-small_sdha6_1q7hk_157:not(#\9) {
|
|
160
|
+
block-size: var(--line-height-body-s-7zv1j5, 16px);
|
|
161
|
+
}
|
|
162
|
+
.awsui_handle-drag-indicator_sdha6_1q7hk_160:not(#\9) {
|
|
156
163
|
cursor: grab;
|
|
164
|
+
}
|
|
165
|
+
.awsui_handle-drag-indicator_sdha6_1q7hk_160:not(#\9):active {
|
|
166
|
+
cursor: grabbing;
|
|
167
|
+
}
|
|
168
|
+
.awsui_handle-resize-area_sdha6_1q7hk_166:not(#\9) {
|
|
169
|
+
cursor: nwse-resize;
|
|
157
170
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
158
|
-
touch-action: none;
|
|
159
171
|
}
|
|
160
|
-
.
|
|
172
|
+
.awsui_handle-resize-area_sdha6_1q7hk_166:not(#\9):dir(rtl) {
|
|
173
|
+
cursor: nesw-resize;
|
|
174
|
+
}
|
|
175
|
+
.awsui_handle-resize-horizontal_sdha6_1q7hk_173:not(#\9) {
|
|
176
|
+
cursor: ew-resize;
|
|
177
|
+
}
|
|
178
|
+
.awsui_handle-resize-vertical_sdha6_1q7hk_176:not(#\9) {
|
|
179
|
+
cursor: ns-resize;
|
|
180
|
+
}
|
|
181
|
+
.awsui_handle-disabled_sdha6_1q7hk_179:not(#\9) {
|
|
182
|
+
cursor: default;
|
|
183
|
+
}
|
|
184
|
+
.awsui_handle_sdha6_1q7hk_145:not(#\9):hover {
|
|
161
185
|
color: var(--color-text-interactive-hover-f9gqs8, #0f141a);
|
|
162
186
|
}
|
|
163
|
-
|
|
187
|
+
.awsui_handle_sdha6_1q7hk_145:not(#\9):focus {
|
|
188
|
+
outline: none;
|
|
189
|
+
text-decoration: none;
|
|
190
|
+
}
|
|
191
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1q7hk_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1q7hk_189) {
|
|
164
192
|
position: relative;
|
|
165
193
|
}
|
|
166
|
-
body[data-awsui-focus-visible=true] .
|
|
194
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1q7hk_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1q7hk_189) {
|
|
167
195
|
outline: 2px dotted transparent;
|
|
168
196
|
outline-offset: calc(0px - 1px);
|
|
169
197
|
}
|
|
170
|
-
body[data-awsui-focus-visible=true] .
|
|
198
|
+
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1q7hk_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1q7hk_189)::before {
|
|
171
199
|
content: " ";
|
|
172
200
|
display: block;
|
|
173
201
|
position: absolute;
|
|
@@ -181,14 +209,17 @@ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_yy78y_145:not(#\9):focus
|
|
|
181
209
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
182
210
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
183
211
|
}
|
|
184
|
-
body[data-awsui-focus-visible=true] .awsui_handle_sdha6_yy78y_145:not(#\9):focus.awsui_hide-focus_sdha6_yy78y_162 {
|
|
185
|
-
outline: none;
|
|
186
|
-
}
|
|
187
212
|
|
|
188
|
-
.
|
|
189
|
-
|
|
213
|
+
.awsui_resize-icon_sdha6_1q7hk_211:not(#\9) {
|
|
214
|
+
stroke: var(--color-text-interactive-default-tkx8fe, #424650);
|
|
190
215
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
216
|
+
.awsui_resize-icon_sdha6_1q7hk_211:not(#\9):hover {
|
|
217
|
+
stroke: var(--color-text-interactive-hover-f9gqs8, #0f141a);
|
|
218
|
+
}
|
|
219
|
+
.awsui_resize-icon-vertical_sdha6_1q7hk_217:not(#\9) {
|
|
220
|
+
margin-block: auto;
|
|
221
|
+
margin-inline: auto;
|
|
222
|
+
}
|
|
223
|
+
.awsui_resize-icon-horizontal_sdha6_1q7hk_221:not(#\9) {
|
|
224
|
+
transform: rotate(90deg);
|
|
194
225
|
}
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"handle": "
|
|
6
|
-
"
|
|
7
|
-
"handle-
|
|
5
|
+
"handle": "awsui_handle_sdha6_1q7hk_145",
|
|
6
|
+
"handle-size-normal": "awsui_handle-size-normal_sdha6_1q7hk_153",
|
|
7
|
+
"handle-size-small": "awsui_handle-size-small_sdha6_1q7hk_157",
|
|
8
|
+
"handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_1q7hk_160",
|
|
9
|
+
"handle-resize-area": "awsui_handle-resize-area_sdha6_1q7hk_166",
|
|
10
|
+
"handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_1q7hk_173",
|
|
11
|
+
"handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_1q7hk_176",
|
|
12
|
+
"handle-disabled": "awsui_handle-disabled_sdha6_1q7hk_179",
|
|
13
|
+
"hide-focus": "awsui_hide-focus_sdha6_1q7hk_189",
|
|
14
|
+
"resize-icon": "awsui_resize-icon_sdha6_1q7hk_211",
|
|
15
|
+
"resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_1q7hk_217",
|
|
16
|
+
"resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_1q7hk_221"
|
|
8
17
|
};
|
|
9
18
|
|
|
@@ -39,7 +39,7 @@ const OptionsList = (_a, ref) => {
|
|
|
39
39
|
[styles['options-list-embedded']]: embedded,
|
|
40
40
|
});
|
|
41
41
|
const mergedRef = useMergeRefs(ref, menuRef);
|
|
42
|
-
return (React.createElement("ul", Object.assign({}, baseProps, nativeAttributes, { className: className, ref: mergedRef, style: { position }, role: role, onScroll: handleScroll, onKeyDown: event =>
|
|
42
|
+
return (React.createElement("ul", Object.assign({}, baseProps, nativeAttributes, { className: className, ref: mergedRef, style: { position }, role: role, onScroll: handleScroll, onKeyDown: event => fireKeyboardEvent(onKeyDown, event), onMouseMove: event => onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(getItemIndex(menuRef, event)), onMouseUp: event => onMouseUp === null || onMouseUp === void 0 ? void 0 : onMouseUp(getItemIndex(menuRef, event)), onBlur: event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }), onFocus: () => fireNonCancelableEvent(onFocus), tabIndex: embedded ? 0 : -1, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }), open && children));
|
|
43
43
|
};
|
|
44
44
|
export default React.forwardRef(OptionsList);
|
|
45
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/options-list/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,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CA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;QACzC,IAAI,eAAe,EAAE;YACnB,MAAM,kBAAkB,GAAG,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC;YACpF,MAAM,qBAAqB,GAAG,eAAe,CAAC,YAAY,GAAG,kBAAkB,CAAC;YAChF,IAAI,qBAAqB,GAAG,qBAAqB,EAAE;gBACjD,sBAAsB,CAAC,UAAU,CAAC,CAAC;aACpC;SACF;IACH,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE;YACpC,YAAY,EAAE,CAAC;SAChB;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAErC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAC7C,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,mBAAmB;QACtD,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,QAAQ;KAC5C,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAE7C,OAAO,CACL,4CACM,SAAS,EACT,gBAAgB,IACpB,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,QAAQ,EAAE,EACnB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/options-list/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,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,E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C,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAC7D,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,EACvF,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAC9C,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,KAEhC,IAAI,IAAI,QAAQ,CACd,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC","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 { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport {\n BaseKeyDetail,\n CancelableEventHandler,\n fireKeyboardEvent,\n fireNonCancelableEvent,\n NonCancelableEventHandler,\n} from '../../events';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport { DropdownStatusProps } from '../dropdown-status';\n\nimport styles from './styles.css.js';\n\nexport interface OptionsListProps extends BaseComponentProps {\n open?: boolean;\n statusType: DropdownStatusProps.StatusType;\n /**\n * Options list\n */\n children: React.ReactNode;\n nativeAttributes?: Record<string, any>;\n /**\n * Called when more items need to be loaded.\n */\n onLoadMore?: NonCancelableEventHandler;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onBlur?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n onFocus?: NonCancelableEventHandler;\n onMouseUp?: (itemIndex: number) => void;\n onMouseMove?: (itemIndex: number) => void;\n position?: React.CSSProperties['position'];\n role?: 'listbox' | 'list' | 'menu';\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n decreaseBlockMargin?: boolean;\n embedded?: boolean;\n}\n\nconst BOTTOM_TRIGGER_OFFSET = 80;\n\nconst getItemIndex = (containerRef: React.RefObject<HTMLElement>, event: React.MouseEvent) => {\n const target = findUpUntil(\n event.target as HTMLElement,\n element => element === containerRef.current || !!element.dataset.mouseTarget\n );\n const mouseTarget = target?.dataset.mouseTarget;\n return mouseTarget ? parseInt(mouseTarget) : -1;\n};\n\nconst OptionsList = (\n {\n open,\n statusType,\n children,\n nativeAttributes = {},\n onKeyDown,\n onBlur,\n onFocus,\n onLoadMore,\n onMouseUp,\n onMouseMove,\n position = 'relative',\n role = 'listbox',\n decreaseBlockMargin = false,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n embedded,\n ...restProps\n }: OptionsListProps,\n ref: React.Ref<HTMLUListElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const menuRef = useRef<HTMLUListElement>(null);\n\n const handleScroll = useStableCallback(() => {\n const scrollContainer = menuRef?.current;\n if (scrollContainer) {\n const bottomEdgePosition = scrollContainer.scrollTop + scrollContainer.clientHeight;\n const remainingScrollHeight = scrollContainer.scrollHeight - bottomEdgePosition;\n if (remainingScrollHeight < BOTTOM_TRIGGER_OFFSET) {\n fireNonCancelableEvent(onLoadMore);\n }\n }\n });\n\n useEffect(() => {\n if (open && statusType === 'pending') {\n handleScroll();\n }\n }, [open, statusType, handleScroll]);\n\n const className = clsx(styles['options-list'], {\n [styles['decrease-block-margin']]: decreaseBlockMargin,\n [styles['options-list-embedded']]: embedded,\n });\n\n const mergedRef = useMergeRefs(ref, menuRef);\n\n return (\n <ul\n {...baseProps}\n {...nativeAttributes}\n className={className}\n ref={mergedRef}\n style={{ position }}\n role={role}\n onScroll={handleScroll}\n onKeyDown={event => fireKeyboardEvent(onKeyDown, event)}\n onMouseMove={event => onMouseMove?.(getItemIndex(menuRef, event))}\n onMouseUp={event => onMouseUp?.(getItemIndex(menuRef, event))}\n onBlur={event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget })}\n onFocus={() => fireNonCancelableEvent(onFocus)}\n tabIndex={embedded ? 0 : -1}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {open && children}\n </ul>\n );\n};\n\nexport default React.forwardRef(OptionsList);\n"]}
|