@cloudscape-design/components-themeable 3.0.877 → 3.0.879

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.
Files changed (97) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/collection-preferences/content-display/content-display-option.scss +4 -0
  3. package/lib/internal/scss/internal/components/drag-handle/styles.scss +51 -18
  4. package/lib/internal/scss/internal/components/panel-resize-handle/styles.scss +3 -42
  5. package/lib/internal/scss/tabs/tab-header-bar.scss +1 -0
  6. package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  7. package/lib/internal/template/app-layout/drawer/resizable-drawer.js +3 -2
  8. package/lib/internal/template/app-layout/drawer/resizable-drawer.js.map +1 -1
  9. package/lib/internal/template/app-layout/utils/use-focus-control.d.ts +2 -1
  10. package/lib/internal/template/app-layout/utils/use-focus-control.d.ts.map +1 -1
  11. package/lib/internal/template/app-layout/utils/use-focus-control.js +2 -0
  12. package/lib/internal/template/app-layout/utils/use-focus-control.js.map +1 -1
  13. package/lib/internal/template/app-layout/utils/use-resize.d.ts.map +1 -1
  14. package/lib/internal/template/app-layout/utils/use-resize.js +3 -2
  15. package/lib/internal/template/app-layout/utils/use-resize.js.map +1 -1
  16. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.d.ts +2 -1
  17. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  18. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js +1 -0
  19. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +3 -2
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +3 -2
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  26. package/lib/internal/template/attribute-editor/interfaces.d.ts +7 -0
  27. package/lib/internal/template/attribute-editor/interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/attribute-editor/interfaces.js.map +1 -1
  29. package/lib/internal/template/attribute-editor/internal.d.ts.map +1 -1
  30. package/lib/internal/template/attribute-editor/internal.js +2 -2
  31. package/lib/internal/template/attribute-editor/internal.js.map +1 -1
  32. package/lib/internal/template/button/internal.js +1 -1
  33. package/lib/internal/template/button/internal.js.map +1 -1
  34. package/lib/internal/template/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  35. package/lib/internal/template/collection-preferences/content-display/content-display-option.js +2 -1
  36. package/lib/internal/template/collection-preferences/content-display/content-display-option.js.map +1 -1
  37. package/lib/internal/template/collection-preferences/content-display/styles.css.js +11 -10
  38. package/lib/internal/template/collection-preferences/content-display/styles.scoped.css +14 -10
  39. package/lib/internal/template/collection-preferences/content-display/styles.selectors.js +11 -10
  40. package/lib/internal/template/collection-preferences/index.d.ts.map +1 -1
  41. package/lib/internal/template/collection-preferences/index.js +1 -1
  42. package/lib/internal/template/collection-preferences/index.js.map +1 -1
  43. package/lib/internal/template/collection-preferences/styles.css.js +38 -37
  44. package/lib/internal/template/collection-preferences/styles.scoped.css +42 -38
  45. package/lib/internal/template/collection-preferences/styles.selectors.js +38 -37
  46. package/lib/internal/template/internal/components/drag-handle/index.d.ts +4 -8
  47. package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
  48. package/lib/internal/template/internal/components/drag-handle/index.js +23 -5
  49. package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
  50. package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +25 -0
  51. package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -0
  52. package/lib/internal/template/internal/components/drag-handle/interfaces.js +4 -0
  53. package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -0
  54. package/lib/internal/template/internal/components/drag-handle/resize-icon.d.ts +7 -0
  55. package/lib/internal/template/internal/components/drag-handle/resize-icon.d.ts.map +1 -0
  56. package/lib/internal/template/internal/components/{panel-resize-handle/icon.js → drag-handle/resize-icon.js} +5 -3
  57. package/lib/internal/template/internal/components/drag-handle/resize-icon.js.map +1 -0
  58. package/lib/internal/template/internal/components/drag-handle/styles.css.js +12 -3
  59. package/lib/internal/template/internal/components/drag-handle/styles.scoped.css +50 -20
  60. package/lib/internal/template/internal/components/drag-handle/styles.selectors.js +12 -3
  61. package/lib/internal/template/internal/components/options-list/index.js +1 -1
  62. package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
  63. package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts +4 -2
  64. package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts.map +1 -1
  65. package/lib/internal/template/internal/components/panel-resize-handle/index.js +8 -5
  66. package/lib/internal/template/internal/components/panel-resize-handle/index.js.map +1 -1
  67. package/lib/internal/template/internal/components/panel-resize-handle/styles.css.js +2 -5
  68. package/lib/internal/template/internal/components/panel-resize-handle/styles.scoped.css +3 -191
  69. package/lib/internal/template/internal/components/panel-resize-handle/styles.selectors.js +2 -5
  70. package/lib/internal/template/internal/components/portal/index.d.ts.map +1 -1
  71. package/lib/internal/template/internal/components/portal/index.js.map +1 -1
  72. package/lib/internal/template/internal/environment.js +1 -1
  73. package/lib/internal/template/internal/environment.json +1 -1
  74. package/lib/internal/template/internal/events/index.d.ts +1 -1
  75. package/lib/internal/template/internal/events/index.d.ts.map +1 -1
  76. package/lib/internal/template/internal/events/index.js.map +1 -1
  77. package/lib/internal/template/internal/hooks/use-performance-marks/index.d.ts +1 -1
  78. package/lib/internal/template/internal/hooks/use-performance-marks/index.d.ts.map +1 -1
  79. package/lib/internal/template/internal/hooks/use-performance-marks/index.js +2 -2
  80. package/lib/internal/template/internal/hooks/use-performance-marks/index.js.map +1 -1
  81. package/lib/internal/template/popover/internal.js +5 -4
  82. package/lib/internal/template/popover/internal.js.map +1 -1
  83. package/lib/internal/template/prompt-input/internal.d.ts.map +1 -1
  84. package/lib/internal/template/prompt-input/internal.js +1 -3
  85. package/lib/internal/template/prompt-input/internal.js.map +1 -1
  86. package/lib/internal/template/split-panel/implementation.d.ts.map +1 -1
  87. package/lib/internal/template/split-panel/implementation.js +7 -6
  88. package/lib/internal/template/split-panel/implementation.js.map +1 -1
  89. package/lib/internal/template/table/internal.js +1 -1
  90. package/lib/internal/template/table/internal.js.map +1 -1
  91. package/lib/internal/template/tabs/styles.css.js +28 -28
  92. package/lib/internal/template/tabs/styles.scoped.css +50 -49
  93. package/lib/internal/template/tabs/styles.selectors.js +28 -28
  94. package/package.json +1 -1
  95. package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts +0 -5
  96. package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts.map +0 -1
  97. package/lib/internal/template/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-content_tc96w_15whw_289:not(#\9),
290
- .awsui_visible-content-toggle_tc96w_15whw_290:not(#\9),
291
- .awsui_visible-content-groups_tc96w_15whw_291:not(#\9),
292
- .awsui_visible-content-group_tc96w_15whw_291:not(#\9) {
289
+ .awsui_visible-content_tc96w_bosuj_289:not(#\9),
290
+ .awsui_visible-content-toggle_tc96w_bosuj_290:not(#\9),
291
+ .awsui_visible-content-groups_tc96w_bosuj_291:not(#\9),
292
+ .awsui_visible-content-group_tc96w_bosuj_291:not(#\9) {
293
293
  /* used in test-utils */
294
294
  }
295
295
 
296
- .awsui_visible-content-title_tc96w_15whw_296:not(#\9) {
296
+ .awsui_visible-content-title_tc96w_bosuj_296:not(#\9) {
297
297
  font-size: var(--font-size-body-m-6wxxs5, 14px);
298
298
  line-height: var(--line-height-body-m-gw0130, 22px);
299
299
  font-weight: var(--font-display-label-weight-5p8eav, 400);
@@ -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-label_tc96w_15whw_306:not(#\9) {
306
+ .awsui_visible-content-group-label_tc96w_bosuj_306:not(#\9) {
307
307
  color: var(--color-text-group-label-eorpbe, #545b64);
308
308
  padding-block-end: var(--space-xs-6dgkww, 8px);
309
309
  border-block-end: var(--border-divider-list-width-x6rz7e, 1px) solid var(--color-border-divider-secondary-1xu6lb, #eaeded);
310
310
  }
311
311
 
312
- .awsui_visible-content-option_tc96w_15whw_312:not(#\9) {
312
+ .awsui_visible-content-option_tc96w_bosuj_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-x6rz7e, 1px) solid var(--color-border-divider-secondary-1xu6lb, #eaeded);
320
320
  }
321
- .awsui_visible-content-option_tc96w_15whw_312:not(#\9):last-child {
321
+ .awsui_visible-content-option_tc96w_bosuj_312:not(#\9):last-child {
322
322
  border-block-end: none;
323
323
  }
324
324
 
325
- .awsui_visible-content-option-label_tc96w_15whw_325:not(#\9) {
325
+ .awsui_visible-content-option-label_tc96w_bosuj_325:not(#\9) {
326
326
  overflow: hidden;
327
327
  text-overflow: ellipsis;
328
328
  padding-inline-end: var(--space-l-eenfqd, 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-toggle_tc96w_15whw_620:not(#\9) {
620
+ .awsui_content-display-option-toggle_tc96w_bosuj_620:not(#\9) {
621
621
  /* used in test-utils */
622
622
  }
623
623
 
624
- .awsui_content-display-option-content_tc96w_15whw_624:not(#\9) {
624
+ .awsui_content-display-option-content_tc96w_bosuj_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-q4wr0w, 0px);
665
665
  }
666
666
 
667
- .awsui_content-display-option_tc96w_15whw_620:not(#\9) {
667
+ .awsui_content-display-option_tc96w_bosuj_620:not(#\9) {
668
668
  list-style: none;
669
669
  position: relative;
670
670
  border-block-start: var(--border-divider-list-width-x6rz7e, 1px) solid var(--color-border-divider-secondary-1xu6lb, #eaeded);
671
671
  }
672
672
 
673
- .awsui_content-display-option-label_tc96w_15whw_672:not(#\9) {
673
+ .awsui_content-display-option-label_tc96w_bosuj_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-eenfqd, 20px);
678
678
  }
679
679
 
680
- .awsui_content-display_tc96w_15whw_620:not(#\9),
681
- .awsui_content-display-text-filter_tc96w_15whw_680:not(#\9),
682
- .awsui_content-display-no-match_tc96w_15whw_681:not(#\9) {
680
+ .awsui_drag-handle-wrapper_tc96w_bosuj_679:not(#\9) {
681
+ margin-inline: var(--space-scaled-xxs-krq5fq, 4px);
682
+ }
683
+
684
+ .awsui_content-display_tc96w_bosuj_620:not(#\9),
685
+ .awsui_content-display-text-filter_tc96w_bosuj_684:not(#\9),
686
+ .awsui_content-display-no-match_tc96w_bosuj_685:not(#\9) {
683
687
  /* used in test-utils */
684
688
  }
685
689
 
686
- .awsui_content-display-title_tc96w_15whw_685:not(#\9) {
690
+ .awsui_content-display-title_tc96w_bosuj_689:not(#\9) {
687
691
  font-size: var(--font-size-body-m-6wxxs5, 14px);
688
692
  line-height: var(--line-height-body-m-gw0130, 22px);
689
693
  font-weight: var(--font-display-label-weight-5p8eav, 400);
@@ -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-description_tc96w_15whw_694:not(#\9) {
699
+ .awsui_content-display-description_tc96w_bosuj_698:not(#\9) {
696
700
  color: var(--color-text-form-secondary-5q4khe, #687078);
697
701
  font-size: var(--font-size-body-s-4dzx5q, 12px);
698
702
  line-height: var(--line-height-body-s-egzl4q, 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-6vyqo7, 2px);
701
705
  }
702
706
 
703
- .awsui_content-display-option-list_tc96w_15whw_702:not(#\9) {
707
+ .awsui_content-display-option-list_tc96w_bosuj_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
- .awsui_root_tc96w_15whw_709:not(#\9),
711
- .awsui_modal-root_tc96w_15whw_710:not(#\9),
712
- .awsui_trigger-button_tc96w_15whw_711:not(#\9),
713
- .awsui_cancel-button_tc96w_15whw_712:not(#\9),
714
- .awsui_confirm-button_tc96w_15whw_713:not(#\9),
715
- .awsui_custom_tc96w_15whw_714:not(#\9),
716
- .awsui_content-before_tc96w_15whw_715:not(#\9) {
714
+ .awsui_root_tc96w_bosuj_713:not(#\9),
715
+ .awsui_modal-root_tc96w_bosuj_714:not(#\9),
716
+ .awsui_trigger-button_tc96w_bosuj_715:not(#\9),
717
+ .awsui_cancel-button_tc96w_bosuj_716:not(#\9),
718
+ .awsui_confirm-button_tc96w_bosuj_717:not(#\9),
719
+ .awsui_custom_tc96w_bosuj_718:not(#\9),
720
+ .awsui_content-before_tc96w_bosuj_719:not(#\9) {
717
721
  /* used in test-utils */
718
722
  }
719
723
 
720
- .awsui_second-column-small_tc96w_15whw_719:not(#\9) {
724
+ .awsui_second-column-small_tc96w_bosuj_723:not(#\9) {
721
725
  padding-block-start: calc(2 * var(--space-scaled-l-7e51pg, 20px));
722
726
  }
723
727
 
724
- .awsui_wrap-lines_tc96w_15whw_723:not(#\9),
725
- .awsui_striped-rows_tc96w_15whw_724:not(#\9),
726
- .awsui_content-density_tc96w_15whw_725:not(#\9),
727
- .awsui_page-size_tc96w_15whw_726:not(#\9),
728
- .awsui_page-size-form-field_tc96w_15whw_727:not(#\9),
729
- .awsui_page-size-radio-group_tc96w_15whw_728:not(#\9),
730
- .awsui_sticky-columns_tc96w_15whw_729:not(#\9),
731
- .awsui_sticky-columns-form-field_tc96w_15whw_730:not(#\9),
732
- .awsui_sticky-columns-radio-group_tc96w_15whw_731:not(#\9),
733
- .awsui_sticky-columns-first_tc96w_15whw_732:not(#\9),
734
- .awsui_sticky-columns-last_tc96w_15whw_733:not(#\9) {
728
+ .awsui_wrap-lines_tc96w_bosuj_727:not(#\9),
729
+ .awsui_striped-rows_tc96w_bosuj_728:not(#\9),
730
+ .awsui_content-density_tc96w_bosuj_729:not(#\9),
731
+ .awsui_page-size_tc96w_bosuj_730:not(#\9),
732
+ .awsui_page-size-form-field_tc96w_bosuj_731:not(#\9),
733
+ .awsui_page-size-radio-group_tc96w_bosuj_732:not(#\9),
734
+ .awsui_sticky-columns_tc96w_bosuj_733:not(#\9),
735
+ .awsui_sticky-columns-form-field_tc96w_bosuj_734:not(#\9),
736
+ .awsui_sticky-columns-radio-group_tc96w_bosuj_735:not(#\9),
737
+ .awsui_sticky-columns-first_tc96w_bosuj_736:not(#\9),
738
+ .awsui_sticky-columns-last_tc96w_bosuj_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-content_tc96w_15whw_289",
6
- "visible-content-toggle": "awsui_visible-content-toggle_tc96w_15whw_290",
7
- "visible-content-groups": "awsui_visible-content-groups_tc96w_15whw_291",
8
- "visible-content-group": "awsui_visible-content-group_tc96w_15whw_291",
9
- "visible-content-title": "awsui_visible-content-title_tc96w_15whw_296",
10
- "visible-content-group-label": "awsui_visible-content-group-label_tc96w_15whw_306",
11
- "visible-content-option": "awsui_visible-content-option_tc96w_15whw_312",
12
- "visible-content-option-label": "awsui_visible-content-option-label_tc96w_15whw_325",
13
- "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_15whw_620",
14
- "content-display-option-content": "awsui_content-display-option-content_tc96w_15whw_624",
15
- "content-display-option": "awsui_content-display-option_tc96w_15whw_620",
16
- "content-display-option-label": "awsui_content-display-option-label_tc96w_15whw_672",
17
- "content-display": "awsui_content-display_tc96w_15whw_620",
18
- "content-display-text-filter": "awsui_content-display-text-filter_tc96w_15whw_680",
19
- "content-display-no-match": "awsui_content-display-no-match_tc96w_15whw_681",
20
- "content-display-title": "awsui_content-display-title_tc96w_15whw_685",
21
- "content-display-description": "awsui_content-display-description_tc96w_15whw_694",
22
- "content-display-option-list": "awsui_content-display-option-list_tc96w_15whw_702",
23
- "root": "awsui_root_tc96w_15whw_709",
24
- "modal-root": "awsui_modal-root_tc96w_15whw_710",
25
- "trigger-button": "awsui_trigger-button_tc96w_15whw_711",
26
- "cancel-button": "awsui_cancel-button_tc96w_15whw_712",
27
- "confirm-button": "awsui_confirm-button_tc96w_15whw_713",
28
- "custom": "awsui_custom_tc96w_15whw_714",
29
- "content-before": "awsui_content-before_tc96w_15whw_715",
30
- "second-column-small": "awsui_second-column-small_tc96w_15whw_719",
31
- "wrap-lines": "awsui_wrap-lines_tc96w_15whw_723",
32
- "striped-rows": "awsui_striped-rows_tc96w_15whw_724",
33
- "content-density": "awsui_content-density_tc96w_15whw_725",
34
- "page-size": "awsui_page-size_tc96w_15whw_726",
35
- "page-size-form-field": "awsui_page-size-form-field_tc96w_15whw_727",
36
- "page-size-radio-group": "awsui_page-size-radio-group_tc96w_15whw_728",
37
- "sticky-columns": "awsui_sticky-columns_tc96w_15whw_729",
38
- "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_15whw_730",
39
- "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_15whw_731",
40
- "sticky-columns-first": "awsui_sticky-columns-first_tc96w_15whw_732",
41
- "sticky-columns-last": "awsui_sticky-columns-last_tc96w_15whw_733"
5
+ "visible-content": "awsui_visible-content_tc96w_bosuj_289",
6
+ "visible-content-toggle": "awsui_visible-content-toggle_tc96w_bosuj_290",
7
+ "visible-content-groups": "awsui_visible-content-groups_tc96w_bosuj_291",
8
+ "visible-content-group": "awsui_visible-content-group_tc96w_bosuj_291",
9
+ "visible-content-title": "awsui_visible-content-title_tc96w_bosuj_296",
10
+ "visible-content-group-label": "awsui_visible-content-group-label_tc96w_bosuj_306",
11
+ "visible-content-option": "awsui_visible-content-option_tc96w_bosuj_312",
12
+ "visible-content-option-label": "awsui_visible-content-option-label_tc96w_bosuj_325",
13
+ "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_bosuj_620",
14
+ "content-display-option-content": "awsui_content-display-option-content_tc96w_bosuj_624",
15
+ "content-display-option": "awsui_content-display-option_tc96w_bosuj_620",
16
+ "content-display-option-label": "awsui_content-display-option-label_tc96w_bosuj_672",
17
+ "drag-handle-wrapper": "awsui_drag-handle-wrapper_tc96w_bosuj_679",
18
+ "content-display": "awsui_content-display_tc96w_bosuj_620",
19
+ "content-display-text-filter": "awsui_content-display-text-filter_tc96w_bosuj_684",
20
+ "content-display-no-match": "awsui_content-display-no-match_tc96w_bosuj_685",
21
+ "content-display-title": "awsui_content-display-title_tc96w_bosuj_689",
22
+ "content-display-description": "awsui_content-display-description_tc96w_bosuj_698",
23
+ "content-display-option-list": "awsui_content-display-option-list_tc96w_bosuj_706",
24
+ "root": "awsui_root_tc96w_bosuj_713",
25
+ "modal-root": "awsui_modal-root_tc96w_bosuj_714",
26
+ "trigger-button": "awsui_trigger-button_tc96w_bosuj_715",
27
+ "cancel-button": "awsui_cancel-button_tc96w_bosuj_716",
28
+ "confirm-button": "awsui_confirm-button_tc96w_bosuj_717",
29
+ "custom": "awsui_custom_tc96w_bosuj_718",
30
+ "content-before": "awsui_content-before_tc96w_bosuj_719",
31
+ "second-column-small": "awsui_second-column-small_tc96w_bosuj_723",
32
+ "wrap-lines": "awsui_wrap-lines_tc96w_bosuj_727",
33
+ "striped-rows": "awsui_striped-rows_tc96w_bosuj_728",
34
+ "content-density": "awsui_content-density_tc96w_bosuj_729",
35
+ "page-size": "awsui_page-size_tc96w_bosuj_730",
36
+ "page-size-form-field": "awsui_page-size-form-field_tc96w_bosuj_731",
37
+ "page-size-radio-group": "awsui_page-size-radio-group_tc96w_bosuj_732",
38
+ "sticky-columns": "awsui_sticky-columns_tc96w_bosuj_733",
39
+ "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_bosuj_734",
40
+ "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_bosuj_735",
41
+ "sticky-columns-first": "awsui_sticky-columns-first_tc96w_bosuj_736",
42
+ "sticky-columns-last": "awsui_sticky-columns-last_tc96w_bosuj_737"
42
43
  };
43
44
 
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- export interface DragHandleProps {
3
- ariaLabel: string;
4
- ariaDescribedby?: string;
5
- disabled?: boolean;
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,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IAC1C,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,SAAS,GACV,EAAE,eAAe,eAoBjB"}
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
- export default function DragHandle({ ariaLabel, ariaDescribedby, disabled, onPointerDown, onKeyDown, }) {
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: "button", tabIndex: 0, className: clsx(styles.handle, disabled && styles['handle-disabled']), "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-disabled": disabled, onPointerDown: onPointerDown, onKeyDown: onKeyDown },
15
- React.createElement(InternalIcon, { variant: disabled ? 'disabled' : undefined, name: "drag-indicator" })));
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;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAUrC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,SAAS,GACO;IAChB,OAAO;IACL,4DAA4D;IAC5D,oDAAoD;IACpD,sDAAsD;IACtD,4EAA4E;IAC5E,4BAA4B;IAC5B,6BACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC,gBACzD,SAAS,sBACH,eAAe,mBAClB,QAAQ,EACvB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS;QAEpB,oBAAC,YAAY,IAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAC,gBAAgB,GAAG,CAC9E,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport InternalIcon from '../../../icon/internal';\n\nimport styles from './styles.css.js';\n\nexport interface DragHandleProps {\n ariaLabel: string;\n ariaDescribedby?: string;\n disabled?: boolean;\n onPointerDown?: React.PointerEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nexport default function DragHandle({\n ariaLabel,\n ariaDescribedby,\n disabled,\n onPointerDown,\n onKeyDown,\n}: DragHandleProps) {\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 role=\"button\"\n tabIndex={0}\n className={clsx(styles.handle, disabled && styles['handle-disabled'])}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-disabled={disabled}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <InternalIcon variant={disabled ? 'disabled' : undefined} name=\"drag-indicator\" />\n </div>\n );\n}\n"]}
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,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,UAAU,GAAG,UAAU,CAC3B,CACE,EACE,OAAO,GAAG,gBAAgB,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,SAAS,GACO,EAClB,GAAmC,EACnC,EAAE;IACF,MAAM,mBAAmB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzD,eAAe,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAc,CAAC,GAAG,EAAE;QACjC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAE,UAAoB,CAAC,CAAC,CAAC,SAAS,EAA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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,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export {};
4
+ //# sourceMappingURL=interfaces.js.map
@@ -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,7 @@
1
+ /// <reference types="react" />
2
+ interface ResizeIconProps {
3
+ variant: 'horizontal' | 'vertical';
4
+ }
5
+ export declare function ResizeIcon({ variant }: ResizeIconProps): JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=resize-icon.d.ts.map
@@ -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
- export default function ResizeHandleIcon({ className }) {
5
- return (React.createElement("svg", { focusable: false, className: className, xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": true },
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": "awsui_handle_sdha6_1hmok_145",
5
- "hide-focus": "awsui_hide-focus_sdha6_1hmok_162",
6
- "handle-disabled": "awsui_handle-disabled_sdha6_1hmok_191"
4
+ "handle": "awsui_handle_sdha6_1j71g_145",
5
+ "handle-size-normal": "awsui_handle-size-normal_sdha6_1j71g_153",
6
+ "handle-size-small": "awsui_handle-size-small_sdha6_1j71g_157",
7
+ "handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_1j71g_160",
8
+ "handle-resize-area": "awsui_handle-resize-area_sdha6_1j71g_166",
9
+ "handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_1j71g_173",
10
+ "handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_1j71g_176",
11
+ "handle-disabled": "awsui_handle-disabled_sdha6_1j71g_179",
12
+ "hide-focus": "awsui_hide-focus_sdha6_1j71g_189",
13
+ "resize-icon": "awsui_resize-icon_sdha6_1j71g_211",
14
+ "resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_1j71g_217",
15
+ "resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_1j71g_221"
7
16
  };
8
17
 
@@ -142,32 +142,59 @@
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
- .awsui_handle_sdha6_1hmok_145:not(#\9) {
145
+ .awsui_handle_sdha6_1j71g_145:not(#\9) {
146
146
  -webkit-appearance: none;
147
147
  appearance: none;
148
+ color: var(--color-text-interactive-default-t1snbz, #545b64);
148
149
  background: transparent;
149
- border-block: none;
150
- border-inline: none;
151
- padding-block: 0;
150
+ inline-size: fit-content;
151
+ /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
152
+ touch-action: none;
153
+ }
154
+ .awsui_handle-size-normal_sdha6_1j71g_153:not(#\9) {
155
+ block-size: var(--line-height-body-m-gw0130, 22px);
152
156
  padding-inline: var(--space-scaled-xxxs-6vyqo7, 2px);
153
- margin-block: 0;
154
- margin-inline: var(--space-scaled-xxs-krq5fq, 4px);
155
- color: var(--color-text-interactive-default-t1snbz, #545b64);
157
+ }
158
+ .awsui_handle-size-small_sdha6_1j71g_157:not(#\9) {
159
+ block-size: var(--line-height-body-s-egzl4q, 16px);
160
+ }
161
+ .awsui_handle-drag-indicator_sdha6_1j71g_160:not(#\9) {
156
162
  cursor: grab;
163
+ }
164
+ .awsui_handle-drag-indicator_sdha6_1j71g_160:not(#\9):active {
165
+ cursor: grabbing;
166
+ }
167
+ .awsui_handle-resize-area_sdha6_1j71g_166:not(#\9) {
168
+ cursor: nwse-resize;
157
169
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
158
- touch-action: none;
159
170
  }
160
- .awsui_handle_sdha6_1hmok_145:not(#\9):hover {
171
+ .awsui_handle-resize-area_sdha6_1j71g_166:not(#\9):dir(rtl) {
172
+ cursor: nesw-resize;
173
+ }
174
+ .awsui_handle-resize-horizontal_sdha6_1j71g_173:not(#\9) {
175
+ cursor: ew-resize;
176
+ }
177
+ .awsui_handle-resize-vertical_sdha6_1j71g_176:not(#\9) {
178
+ cursor: ns-resize;
179
+ }
180
+ .awsui_handle-disabled_sdha6_1j71g_179:not(#\9) {
181
+ cursor: default;
182
+ }
183
+ .awsui_handle_sdha6_1j71g_145:not(#\9):hover {
161
184
  color: var(--color-text-interactive-hover-kxltdh, #16191f);
162
185
  }
163
- body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1hmok_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1hmok_162) {
186
+ .awsui_handle_sdha6_1j71g_145:not(#\9):focus {
187
+ outline: none;
188
+ text-decoration: none;
189
+ }
190
+ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1j71g_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1j71g_189) {
164
191
  position: relative;
165
192
  }
166
- body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1hmok_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1hmok_162) {
193
+ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1j71g_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1j71g_189) {
167
194
  outline: 2px dotted transparent;
168
195
  outline-offset: calc(0px - 1px);
169
196
  }
170
- body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1hmok_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1hmok_162)::before {
197
+ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1j71g_145:not(#\9):focus:not(.awsui_hide-focus_sdha6_1j71g_189)::before {
171
198
  content: " ";
172
199
  display: block;
173
200
  position: absolute;
@@ -181,14 +208,17 @@ body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1hmok_145:not(#\9):focus
181
208
  border-end-end-radius: var(--border-radius-control-default-focus-ring-vy2hlh, 2px);
182
209
  box-shadow: 0 0 0 2px var(--color-border-item-focused-q68bgg, #0073bb);
183
210
  }
184
- body[data-awsui-focus-visible=true] .awsui_handle_sdha6_1hmok_145:not(#\9):focus.awsui_hide-focus_sdha6_1hmok_162 {
185
- outline: none;
186
- }
187
211
 
188
- .awsui_handle_sdha6_1hmok_145:not(#\9):active {
189
- cursor: grabbing;
212
+ .awsui_resize-icon_sdha6_1j71g_211:not(#\9) {
213
+ stroke: var(--color-text-interactive-default-t1snbz, #545b64);
190
214
  }
191
-
192
- .awsui_handle-disabled_sdha6_1hmok_191:not(#\9) {
193
- cursor: default;
215
+ .awsui_resize-icon_sdha6_1j71g_211:not(#\9):hover {
216
+ stroke: var(--color-text-interactive-hover-kxltdh, #16191f);
217
+ }
218
+ .awsui_resize-icon-vertical_sdha6_1j71g_217:not(#\9) {
219
+ margin-block: auto;
220
+ margin-inline: auto;
221
+ }
222
+ .awsui_resize-icon-horizontal_sdha6_1j71g_221:not(#\9) {
223
+ transform: rotate(90deg);
194
224
  }
@@ -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": "awsui_handle_sdha6_1hmok_145",
6
- "hide-focus": "awsui_hide-focus_sdha6_1hmok_162",
7
- "handle-disabled": "awsui_handle-disabled_sdha6_1hmok_191"
5
+ "handle": "awsui_handle_sdha6_1j71g_145",
6
+ "handle-size-normal": "awsui_handle-size-normal_sdha6_1j71g_153",
7
+ "handle-size-small": "awsui_handle-size-small_sdha6_1j71g_157",
8
+ "handle-drag-indicator": "awsui_handle-drag-indicator_sdha6_1j71g_160",
9
+ "handle-resize-area": "awsui_handle-resize-area_sdha6_1j71g_166",
10
+ "handle-resize-horizontal": "awsui_handle-resize-horizontal_sdha6_1j71g_173",
11
+ "handle-resize-vertical": "awsui_handle-resize-vertical_sdha6_1j71g_176",
12
+ "handle-disabled": "awsui_handle-disabled_sdha6_1j71g_179",
13
+ "hide-focus": "awsui_hide-focus_sdha6_1j71g_189",
14
+ "resize-icon": "awsui_resize-icon_sdha6_1j71g_211",
15
+ "resize-icon-vertical": "awsui_resize-icon-vertical_sdha6_1j71g_217",
16
+ "resize-icon-horizontal": "awsui_resize-icon-horizontal_sdha6_1j71g_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 => onKeyDown && 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));
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,CAAC;AACxE,OAAO,EAGL,iBAAiB,EACjB,sBAAsB,GAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA4BrC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,YAAY,GAAG,CAAC,YAA0C,EAAE,KAAuB,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,CAAC,MAAqB,EAC3B,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAC7E,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,WAAW,CAAC;IAChD,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC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AC,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,SAAS,IAAI,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,EACpE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EACjE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,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 => onKeyDown && 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"]}
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,CAAC;AACxE,OAAO,EAGL,iBAA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AAE,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"]}