@cloudscape-design/components 3.0.648 → 3.0.649

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 (152) hide show
  1. package/app-layout/drawer/index.js +2 -2
  2. package/app-layout/drawer/index.js.map +1 -1
  3. package/app-layout/mobile-toolbar/index.js +1 -1
  4. package/app-layout/mobile-toolbar/index.js.map +1 -1
  5. package/app-layout/utils/sticky-offsets.d.ts +1 -1
  6. package/app-layout/utils/sticky-offsets.d.ts.map +1 -1
  7. package/app-layout/utils/sticky-offsets.js +2 -2
  8. package/app-layout/utils/sticky-offsets.js.map +1 -1
  9. package/app-layout/visual-refresh/background.d.ts.map +1 -1
  10. package/app-layout/visual-refresh/background.js +2 -5
  11. package/app-layout/visual-refresh/background.js.map +1 -1
  12. package/app-layout/visual-refresh/breadcrumbs.d.ts.map +1 -1
  13. package/app-layout/visual-refresh/breadcrumbs.js +1 -2
  14. package/app-layout/visual-refresh/breadcrumbs.js.map +1 -1
  15. package/app-layout/visual-refresh/context.d.ts +0 -2
  16. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  17. package/app-layout/visual-refresh/context.js +2 -7
  18. package/app-layout/visual-refresh/context.js.map +1 -1
  19. package/app-layout/visual-refresh/drawers.js +2 -2
  20. package/app-layout/visual-refresh/drawers.js.map +1 -1
  21. package/app-layout/visual-refresh/layout.d.ts.map +1 -1
  22. package/app-layout/visual-refresh/layout.js +1 -3
  23. package/app-layout/visual-refresh/layout.js.map +1 -1
  24. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  25. package/app-layout/visual-refresh/main.js +2 -4
  26. package/app-layout/visual-refresh/main.js.map +1 -1
  27. package/app-layout/visual-refresh/navigation.js +2 -2
  28. package/app-layout/visual-refresh/navigation.js.map +1 -1
  29. package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
  30. package/app-layout/visual-refresh/notifications.js +3 -1
  31. package/app-layout/visual-refresh/notifications.js.map +1 -1
  32. package/app-layout/visual-refresh/styles.css.js +82 -83
  33. package/app-layout/visual-refresh/styles.scoped.css +168 -190
  34. package/app-layout/visual-refresh/styles.selectors.js +82 -83
  35. package/app-layout/visual-refresh/tools.js +2 -2
  36. package/app-layout/visual-refresh/tools.js.map +1 -1
  37. package/app-layout/visual-refresh/trigger-button.js +1 -1
  38. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  39. package/app-layout/visual-refresh/use-background-overlap.d.ts +0 -6
  40. package/app-layout/visual-refresh/use-background-overlap.d.ts.map +1 -1
  41. package/app-layout/visual-refresh/use-background-overlap.js +0 -6
  42. package/app-layout/visual-refresh/use-background-overlap.js.map +1 -1
  43. package/button-dropdown/category-elements/category-element.js +1 -1
  44. package/button-dropdown/category-elements/category-element.js.map +1 -1
  45. package/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
  46. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  47. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js +1 -1
  48. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
  49. package/container/internal.d.ts.map +1 -1
  50. package/container/internal.js +7 -25
  51. package/container/internal.js.map +1 -1
  52. package/container/styles.css.js +30 -29
  53. package/container/styles.scoped.css +60 -53
  54. package/container/styles.selectors.js +30 -29
  55. package/container/use-sticky-header.d.ts +3 -2
  56. package/container/use-sticky-header.d.ts.map +1 -1
  57. package/container/use-sticky-header.js +5 -3
  58. package/container/use-sticky-header.js.map +1 -1
  59. package/content-layout/internal.js +2 -2
  60. package/content-layout/internal.js.map +1 -1
  61. package/drawer/implementation.js +2 -2
  62. package/drawer/implementation.js.map +1 -1
  63. package/help-panel/implementation.js +2 -2
  64. package/help-panel/implementation.js.map +1 -1
  65. package/icon/icons.js +1 -1
  66. package/icon/interfaces.d.ts +1 -1
  67. package/icon/interfaces.d.ts.map +1 -1
  68. package/icon/interfaces.js.map +1 -1
  69. package/internal/analytics/index.d.ts +7 -1
  70. package/internal/analytics/index.d.ts.map +1 -1
  71. package/internal/analytics/index.js +10 -0
  72. package/internal/analytics/index.js.map +1 -1
  73. package/internal/analytics/interfaces.d.ts +12 -0
  74. package/internal/analytics/interfaces.d.ts.map +1 -1
  75. package/internal/analytics/interfaces.js.map +1 -1
  76. package/internal/base-component/index.d.ts +5 -3
  77. package/internal/base-component/index.d.ts.map +1 -1
  78. package/internal/base-component/index.js.map +1 -1
  79. package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
  80. package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
  81. package/internal/components/option/highlight-match.d.ts.map +1 -1
  82. package/internal/components/option/highlight-match.js +1 -2
  83. package/internal/components/option/highlight-match.js.map +1 -1
  84. package/internal/components/option/index.js +2 -2
  85. package/internal/components/option/index.js.map +1 -1
  86. package/internal/context/reset-contexts-for-modal.d.ts.map +1 -1
  87. package/internal/context/reset-contexts-for-modal.js +6 -8
  88. package/internal/context/reset-contexts-for-modal.js.map +1 -1
  89. package/internal/context/single-tab-stop-navigation-context.d.ts +16 -2
  90. package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
  91. package/internal/context/single-tab-stop-navigation-context.js +51 -1
  92. package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
  93. package/internal/environment.js +1 -1
  94. package/internal/environment.json +1 -1
  95. package/internal/hooks/use-table-interaction-metrics/index.d.ts +10 -0
  96. package/internal/hooks/use-table-interaction-metrics/index.d.ts.map +1 -0
  97. package/internal/hooks/use-table-interaction-metrics/index.js +47 -0
  98. package/internal/hooks/use-table-interaction-metrics/index.js.map +1 -0
  99. package/internal/manifest.json +1 -1
  100. package/package.json +1 -1
  101. package/popover/index.d.ts +1 -1
  102. package/popover/index.d.ts.map +1 -1
  103. package/popover/index.js +2 -2
  104. package/popover/index.js.map +1 -1
  105. package/popover/interfaces.d.ts +5 -0
  106. package/popover/interfaces.d.ts.map +1 -1
  107. package/popover/interfaces.js.map +1 -1
  108. package/popover/internal.js +2 -2
  109. package/popover/internal.js.map +1 -1
  110. package/popover/styles.css.js +50 -49
  111. package/popover/styles.scoped.css +74 -66
  112. package/popover/styles.selectors.js +50 -49
  113. package/slider/internal.js +1 -1
  114. package/slider/internal.js.map +1 -1
  115. package/slider/slider-labels.js +1 -1
  116. package/slider/slider-labels.js.map +1 -1
  117. package/slider/tick-marks.js +2 -2
  118. package/slider/tick-marks.js.map +1 -1
  119. package/split-panel/side.js +3 -3
  120. package/split-panel/side.js.map +1 -1
  121. package/table/internal.d.ts.map +1 -1
  122. package/table/internal.js +23 -17
  123. package/table/internal.js.map +1 -1
  124. package/table/selection/selection-control.js +1 -1
  125. package/table/selection/selection-control.js.map +1 -1
  126. package/table/table-role/grid-navigation.d.ts.map +1 -1
  127. package/table/table-role/grid-navigation.js +40 -67
  128. package/table/table-role/grid-navigation.js.map +1 -1
  129. package/table/thead.d.ts +1 -0
  130. package/table/thead.d.ts.map +1 -1
  131. package/table/thead.js +5 -2
  132. package/table/thead.js.map +1 -1
  133. package/table/tools-header.d.ts +2 -1
  134. package/table/tools-header.d.ts.map +1 -1
  135. package/table/tools-header.js +4 -4
  136. package/table/tools-header.js.map +1 -1
  137. package/tabs/tab-header-bar.d.ts.map +1 -1
  138. package/tabs/tab-header-bar.js +19 -47
  139. package/tabs/tab-header-bar.js.map +1 -1
  140. package/token-group/dismiss-button.d.ts.map +1 -1
  141. package/token-group/dismiss-button.js +1 -2
  142. package/token-group/dismiss-button.js.map +1 -1
  143. package/wizard/wizard-form-header.js +1 -1
  144. package/wizard/wizard-form-header.js.map +1 -1
  145. package/wizard/wizard-form.js +1 -1
  146. package/wizard/wizard-form.js.map +1 -1
  147. package/wizard/wizard-navigation.js +3 -3
  148. package/wizard/wizard-navigation.js.map +1 -1
  149. package/internal/context/app-layout-context.d.ts +0 -8
  150. package/internal/context/app-layout-context.d.ts.map +0 -1
  151. package/internal/context/app-layout-context.js +0 -9
  152. package/internal/context/app-layout-context.js.map +0 -1
@@ -2,88 +2,87 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "background": "awsui_background_hyvsj_5tvh0_99",
6
- "scrolling-background": "awsui_scrolling-background_hyvsj_5tvh0_102",
7
- "sticky-background": "awsui_sticky-background_hyvsj_5tvh0_108",
8
- "has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_5tvh0_116",
9
- "breadcrumbs": "awsui_breadcrumbs_hyvsj_5tvh0_129",
10
- "has-sticky-background": "awsui_has-sticky-background_hyvsj_5tvh0_139",
11
- "drawers-container": "awsui_drawers-container_hyvsj_5tvh0_151",
12
- "has-open-drawer": "awsui_has-open-drawer_hyvsj_5tvh0_162",
13
- "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_5tvh0_185",
14
- "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_5tvh0_190",
15
- "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_5tvh0_231",
16
- "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_5tvh0_241",
17
- "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_5tvh0_245",
18
- "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_5tvh0_259",
19
- "drawers-trigger": "awsui_drawers-trigger_hyvsj_5tvh0_245",
20
- "drawer": "awsui_drawer_hyvsj_5tvh0_151",
21
- "drawer-content-container": "awsui_drawer-content-container_hyvsj_5tvh0_290",
22
- "drawer-close-button": "awsui_drawer-close-button_hyvsj_5tvh0_299",
23
- "drawer-content": "awsui_drawer-content_hyvsj_5tvh0_290",
24
- "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_5tvh0_307",
25
- "drawer-slider": "awsui_drawer-slider_hyvsj_5tvh0_310",
26
- "is-drawer-open": "awsui_is-drawer-open_hyvsj_5tvh0_317",
27
- "content": "awsui_content_hyvsj_5tvh0_343",
28
- "layout": "awsui_layout_hyvsj_5tvh0_364",
29
- "has-max-content-width": "awsui_has-max-content-width_hyvsj_5tvh0_437",
30
- "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_5tvh0_452",
31
- "content-type-table": "awsui_content-type-table_hyvsj_5tvh0_466",
32
- "content-type-cards": "awsui_content-type-cards_hyvsj_5tvh0_466",
33
- "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_5tvh0_472",
34
- "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_5tvh0_475",
35
- "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_5tvh0_489",
36
- "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_5tvh0_492",
37
- "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_5tvh0_502",
38
- "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_5tvh0_505",
39
- "content-first-child-header": "awsui_content-first-child-header_hyvsj_5tvh0_508",
40
- "has-header": "awsui_has-header_hyvsj_5tvh0_508",
41
- "content-first-child-main": "awsui_content-first-child-main_hyvsj_5tvh0_523",
42
- "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_5tvh0_523",
43
- "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_5tvh0_546",
44
- "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_5tvh0_549",
45
- "has-split-panel": "awsui_has-split-panel_hyvsj_5tvh0_569",
46
- "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_5tvh0_569",
47
- "block-body-scroll": "awsui_block-body-scroll_hyvsj_5tvh0_577",
48
- "unfocusable": "awsui_unfocusable_hyvsj_5tvh0_582",
49
- "container": "awsui_container_hyvsj_5tvh0_592",
50
- "is-navigation-open": "awsui_is-navigation-open_hyvsj_5tvh0_618",
51
- "is-tools-open": "awsui_is-tools-open_hyvsj_5tvh0_621",
52
- "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_5tvh0_621",
53
- "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_5tvh0_621",
54
- "has-active-drawer": "awsui_has-active-drawer_hyvsj_5tvh0_621",
55
- "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_5tvh0_630",
56
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_5tvh0_647",
57
- "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_5tvh0_651",
58
- "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_5tvh0_655",
59
- "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_5tvh0_659",
60
- "navigation-container": "awsui_navigation-container_hyvsj_5tvh0_668",
61
- "show-navigation": "awsui_show-navigation_hyvsj_5tvh0_706",
62
- "animating": "awsui_animating_hyvsj_5tvh0_729",
63
- "showButtons": "awsui_showButtons_hyvsj_5tvh0_1",
64
- "navigation": "awsui_navigation_hyvsj_5tvh0_668",
65
- "openNavigation": "awsui_openNavigation_hyvsj_5tvh0_1",
66
- "animated-content": "awsui_animated-content_hyvsj_5tvh0_791",
67
- "hide-navigation": "awsui_hide-navigation_hyvsj_5tvh0_800",
68
- "notifications": "awsui_notifications_hyvsj_5tvh0_810",
69
- "sticky-notifications": "awsui_sticky-notifications_hyvsj_5tvh0_816",
70
- "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_5tvh0_833",
71
- "position-bottom": "awsui_position-bottom_hyvsj_5tvh0_880",
72
- "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_5tvh0_1",
73
- "split-panel-side": "awsui_split-panel-side_hyvsj_5tvh0_909",
74
- "position-side": "awsui_position-side_hyvsj_5tvh0_922",
75
- "tools-container": "awsui_tools-container_hyvsj_5tvh0_944",
76
- "tools": "awsui_tools_hyvsj_5tvh0_944",
77
- "openTools": "awsui_openTools_hyvsj_5tvh0_1",
78
- "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_5tvh0_1035",
79
- "hide-tools": "awsui_hide-tools_hyvsj_5tvh0_1045",
80
- "show-tools": "awsui_show-tools_hyvsj_5tvh0_1057",
81
- "has-tools-form": "awsui_has-tools-form_hyvsj_5tvh0_1035",
82
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_5tvh0_1140",
83
- "trigger": "awsui_trigger_hyvsj_5tvh0_1140",
84
- "selected": "awsui_selected_hyvsj_5tvh0_1217",
85
- "badge": "awsui_badge_hyvsj_5tvh0_1237",
86
- "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_5tvh0_1241",
87
- "dot": "awsui_dot_hyvsj_5tvh0_1252"
5
+ "background": "awsui_background_hyvsj_14xql_99",
6
+ "scrolling-background": "awsui_scrolling-background_hyvsj_14xql_102",
7
+ "breadcrumbs": "awsui_breadcrumbs_hyvsj_14xql_113",
8
+ "drawers-container": "awsui_drawers-container_hyvsj_14xql_126",
9
+ "has-open-drawer": "awsui_has-open-drawer_hyvsj_14xql_137",
10
+ "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_14xql_160",
11
+ "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_14xql_165",
12
+ "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_14xql_206",
13
+ "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_14xql_216",
14
+ "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_14xql_220",
15
+ "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_14xql_234",
16
+ "drawers-trigger": "awsui_drawers-trigger_hyvsj_14xql_220",
17
+ "drawer": "awsui_drawer_hyvsj_14xql_126",
18
+ "drawer-content-container": "awsui_drawer-content-container_hyvsj_14xql_265",
19
+ "drawer-close-button": "awsui_drawer-close-button_hyvsj_14xql_274",
20
+ "drawer-content": "awsui_drawer-content_hyvsj_14xql_265",
21
+ "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_14xql_282",
22
+ "drawer-slider": "awsui_drawer-slider_hyvsj_14xql_285",
23
+ "is-drawer-open": "awsui_is-drawer-open_hyvsj_14xql_292",
24
+ "content": "awsui_content_hyvsj_14xql_318",
25
+ "layout": "awsui_layout_hyvsj_14xql_339",
26
+ "has-max-content-width": "awsui_has-max-content-width_hyvsj_14xql_412",
27
+ "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_14xql_427",
28
+ "content-type-table": "awsui_content-type-table_hyvsj_14xql_441",
29
+ "content-type-cards": "awsui_content-type-cards_hyvsj_14xql_441",
30
+ "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_14xql_447",
31
+ "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_14xql_450",
32
+ "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_14xql_464",
33
+ "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_14xql_467",
34
+ "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_14xql_477",
35
+ "content-first-child-header": "awsui_content-first-child-header_hyvsj_14xql_480",
36
+ "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_14xql_480",
37
+ "has-header": "awsui_has-header_hyvsj_14xql_480",
38
+ "content-first-child-main": "awsui_content-first-child-main_hyvsj_14xql_495",
39
+ "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_14xql_495",
40
+ "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_14xql_515",
41
+ "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_14xql_518",
42
+ "has-split-panel": "awsui_has-split-panel_hyvsj_14xql_538",
43
+ "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_14xql_538",
44
+ "block-body-scroll": "awsui_block-body-scroll_hyvsj_14xql_546",
45
+ "unfocusable": "awsui_unfocusable_hyvsj_14xql_551",
46
+ "container": "awsui_container_hyvsj_14xql_561",
47
+ "is-navigation-open": "awsui_is-navigation-open_hyvsj_14xql_587",
48
+ "is-tools-open": "awsui_is-tools-open_hyvsj_14xql_590",
49
+ "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_14xql_590",
50
+ "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_14xql_590",
51
+ "has-active-drawer": "awsui_has-active-drawer_hyvsj_14xql_590",
52
+ "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_14xql_599",
53
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_14xql_616",
54
+ "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_14xql_620",
55
+ "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_14xql_624",
56
+ "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_14xql_628",
57
+ "navigation-container": "awsui_navigation-container_hyvsj_14xql_637",
58
+ "show-navigation": "awsui_show-navigation_hyvsj_14xql_675",
59
+ "animating": "awsui_animating_hyvsj_14xql_698",
60
+ "showButtons": "awsui_showButtons_hyvsj_14xql_1",
61
+ "navigation": "awsui_navigation_hyvsj_14xql_637",
62
+ "openNavigation": "awsui_openNavigation_hyvsj_14xql_1",
63
+ "animated-content": "awsui_animated-content_hyvsj_14xql_760",
64
+ "hide-navigation": "awsui_hide-navigation_hyvsj_14xql_769",
65
+ "notifications": "awsui_notifications_hyvsj_14xql_779",
66
+ "has-notification-content": "awsui_has-notification-content_hyvsj_14xql_784",
67
+ "sticky-notifications": "awsui_sticky-notifications_hyvsj_14xql_788",
68
+ "high-contrast": "awsui_high-contrast_hyvsj_14xql_793",
69
+ "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_14xql_811",
70
+ "position-bottom": "awsui_position-bottom_hyvsj_14xql_858",
71
+ "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_14xql_1",
72
+ "split-panel-side": "awsui_split-panel-side_hyvsj_14xql_887",
73
+ "position-side": "awsui_position-side_hyvsj_14xql_900",
74
+ "tools-container": "awsui_tools-container_hyvsj_14xql_922",
75
+ "tools": "awsui_tools_hyvsj_14xql_922",
76
+ "openTools": "awsui_openTools_hyvsj_14xql_1",
77
+ "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_14xql_1013",
78
+ "hide-tools": "awsui_hide-tools_hyvsj_14xql_1023",
79
+ "show-tools": "awsui_show-tools_hyvsj_14xql_1035",
80
+ "has-tools-form": "awsui_has-tools-form_hyvsj_14xql_1013",
81
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_14xql_1118",
82
+ "trigger": "awsui_trigger_hyvsj_14xql_1118",
83
+ "selected": "awsui_selected_hyvsj_14xql_1195",
84
+ "badge": "awsui_badge_hyvsj_14xql_1215",
85
+ "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_14xql_1219",
86
+ "dot": "awsui_dot_hyvsj_14xql_1230"
88
87
  };
89
88
 
@@ -51,8 +51,8 @@ export default function Tools({ children }) {
51
51
  [styles['has-tools-form-persistence']]: hasToolsFormPersistence,
52
52
  [styles['is-tools-open']]: isToolsOpen,
53
53
  }, testutilStyles.tools), ref: state !== 'exiting' ? transitionEventsRef : undefined },
54
- React.createElement("div", { className: clsx(styles['animated-content']) },
55
- React.createElement("div", { className: clsx(styles['hide-tools']) },
54
+ React.createElement("div", { className: styles['animated-content'] },
55
+ React.createElement("div", { className: styles['hide-tools'] },
56
56
  React.createElement(InternalButton, { ariaLabel: (_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.toolsClose) !== null && _b !== void 0 ? _b : undefined, iconName: isMobile ? 'close' : 'angle-right', onClick: () => handleToolsClick(false), variant: "icon", formAction: "none", className: testutilStyles['tools-close'], ref: toolsRefs.close })),
57
57
  tools))),
58
58
  !isMobile && (React.createElement("aside", { "aria-hidden": !hasToolsForm ? true : false, "aria-label": (_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.tools) !== null && _c !== void 0 ? _c : undefined, className: clsx(styles['show-tools'], {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/tools.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;A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ACrB;QAED,6BAA6B;QAC7B,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE;YAChD,YAAY,GAAG,IAAI,CAAC;SACrB;KACF;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAC9B,aAAsB,EACtB,gBAA0B,EAC1B,WAAqB,EACrB,SAAmB;IAEnB,IAAI,uBAAuB,GAAG,KAAK,CAAC;IAEpC,2DAA2D;IAC3D,IAAI,aAAa,IAAI,CAAC,SAAS,IAAI,CAAC,gBAAgB,IAAI,WAAW,CAAC,EAAE;QACpE,uBAAuB,GAAG,IAAI,CAAC;KAChC;IAED,OAAO,uBAAuB,CAAC;AACjC,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';\nimport { InternalButton } from '../../button/internal';\nimport { useAppLayoutInternals } from './context';\nimport TriggerButton from './trigger-button';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport splitPanelTestUtilStyles from '../../split-panel/test-classes/styles.css.js';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\ninterface ToolsProps {\n children: React.ReactNode;\n}\n\n/**\n * The Tools component consists of the following elements:\n * the container, or root element, that sits as a direct child to the Layout grid definition;\n * the split panel, which exists only if there is a split panel in side position;\n * the tools, or drawer, that contains the hide tools form and the children passed through the API;\n * the show tools form that contains the triggers for both the drawer and the\n * split panel in large viewports;\n */\nexport default function Tools({ children }: ToolsProps) {\n const {\n ariaLabels,\n disableBodyScroll,\n drawers,\n handleSplitPanelClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n loseToolsFocus,\n splitPanel,\n splitPanelControlId,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n tools,\n toolsControlId,\n toolsHide,\n toolsRefs,\n toolsWidth,\n headerVariant,\n } = useAppLayoutInternals();\n\n const hasSplitPanel = !!splitPanel && splitPanelPosition === 'side';\n const hasToolsForm = getToolsFormStatus(\n hasSplitPanel && splitPanelDisplayed,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n toolsHide\n );\n const hasToolsFormPersistence = getToolsFormPersistence(hasSplitPanel, isSplitPanelOpen, isToolsOpen, toolsHide);\n const isUnfocusable = hasDrawerViewportOverlay && !isToolsOpen;\n\n /**\n * If the drawers property is defined the SplitPanel will be mounted and rendered\n * by the Drawers component.\n */\n if ((toolsHide && !hasSplitPanel) || drawers) {\n return null;\n }\n\n return (\n <Transition in={isToolsOpen ?? false}>\n {(state, transitionEventsRef) => (\n <div\n className={clsx(styles['tools-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['drawer-closed']]: !isToolsOpen,\n })}\n style={{\n [customCssProps.toolsAnimationStartingOpacity]: `${hasSplitPanel && isSplitPanelOpen ? 1 : 0}`,\n [customCssProps.toolsWidth]: `${toolsWidth}px`,\n }}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseToolsFocus();\n }\n }}\n >\n {children}\n\n {!toolsHide && (\n <aside\n id={toolsControlId}\n aria-hidden={!isToolsOpen ? true : false}\n aria-label={ariaLabels?.tools ?? undefined}\n className={clsx(\n styles.tools,\n {\n [styles.animating]: state === 'entering',\n [styles['has-tools-form-persistence']]: hasToolsFormPersistence,\n [styles['is-tools-open']]: isToolsOpen,\n },\n testutilStyles.tools\n )}\n ref={state !== 'exiting' ? transitionEventsRef : undefined}\n >\n <div className={clsx(styles['animated-content'])}>\n <div className={clsx(styles['hide-tools'])}>\n <InternalButton\n ariaLabel={ariaLabels?.toolsClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => handleToolsClick(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['tools-close']}\n ref={toolsRefs.close}\n />\n </div>\n\n {tools}\n </div>\n </aside>\n )}\n\n {!isMobile && (\n <aside\n aria-hidden={!hasToolsForm ? true : false}\n aria-label={ariaLabels?.tools ?? undefined}\n className={clsx(styles['show-tools'], {\n [styles.animating]: state === 'exiting',\n [styles['has-tools-form']]: hasToolsForm,\n [styles['has-tools-form-persistence']]: hasToolsFormPersistence,\n })}\n ref={state === 'exiting' ? transitionEventsRef : undefined}\n data-testid=\"side-split-panel-drawer\"\n >\n {!toolsHide && (\n <TriggerButton\n ariaLabel={ariaLabels?.toolsToggle}\n ariaControls={toolsControlId}\n ariaExpanded={isToolsOpen}\n iconName=\"status-info\"\n onClick={() => handleToolsClick(!isToolsOpen)}\n selected={hasSplitPanel && isToolsOpen}\n className={testutilStyles['tools-toggle']}\n ref={toolsRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n ariaControls={splitPanelControlId}\n ariaExpanded={!!isSplitPanelOpen}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n className={splitPanelTestUtilStyles['open-button']}\n ref={splitPanelRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n </aside>\n )}\n </div>\n )}\n </Transition>\n );\n}\n\n/**\n * By default the Tools form is styled as display: none; This behavior should\n * be unchanged in mobile viewports where the Tools form is always suppressed.\n * In large viewports, however the Tools form and its corresponding buttons\n * should be present in the UI under the below circumstances.\n */\nfunction getToolsFormStatus(\n hasSplitPanel: boolean,\n isMobile: boolean,\n isSplitPanelOpen?: boolean,\n isToolsOpen?: boolean,\n toolsHide?: boolean\n) {\n let hasToolsForm = false;\n\n if (!isMobile) {\n // Both the Split Panel and Tools button are needed\n if (hasSplitPanel && !toolsHide) {\n hasToolsForm = true;\n }\n\n // The Split Panel button is needed\n if (hasSplitPanel && !isSplitPanelOpen && toolsHide) {\n hasToolsForm = true;\n }\n\n // The Tools button is needed\n if (!hasSplitPanel && !toolsHide && !isToolsOpen) {\n hasToolsForm = true;\n }\n }\n\n return hasToolsForm;\n}\n\n/**\n * Under two scenarios the Tools form that contains the triggers\n * for the Tools content and the Split Panel may be persistent\n * in the UI (as opposed to disappearing when one of the drawers\n * is open). This will also add a white background as opposed to the\n * default transparent background. The buttons will present and in a\n * selected / not selected state.\n */\nfunction getToolsFormPersistence(\n hasSplitPanel: boolean,\n isSplitPanelOpen?: boolean,\n isToolsOpen?: boolean,\n toolsHide?: boolean\n) {\n let hasToolsFormPersistence = false;\n\n // Both Tools and Split Panel exist and one or both is open\n if (hasSplitPanel && !toolsHide && (isSplitPanelOpen || isToolsOpen)) {\n hasToolsFormPersistence = true;\n }\n\n return hasToolsFormPersistence;\n}\n"]}
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/tools.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,wBAAwB,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAM5E;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAc;IACpD,MAAM,EACJ,UAAU,EACV,iBAAiB,EACjB,O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C,gBAAgB,EAChC,QAAQ,EAAC,eAAe,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE,EACtC,QAAQ,EAAE,aAAa,IAAI,gBAAgB,EAC3C,SAAS,EAAE,wBAAwB,CAAC,aAAa,CAAC,EAClD,GAAG,EAAE,cAAc,CAAC,MAAM,EAC1B,kBAAkB,EAAE,aAAa,KAAK,eAAe,GACrD,CACH,CACK,CACT,CACG,CACP,CAAA;KAAA,CACU,CACd,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAS,kBAAkB,CACzB,aAAsB,EACtB,QAAiB,EACjB,gBAA0B,EAC1B,WAAqB,EACrB,SAAmB;IAEnB,IAAI,YAAY,GAAG,KAAK,CAAC;IAEzB,IAAI,CAAC,QAAQ,EAAE;QACb,mDAAmD;QACnD,IAAI,aAAa,IAAI,CAAC,SAAS,EAAE;YAC/B,YAAY,GAAG,IAAI,CAAC;SACrB;QAED,mCAAmC;QACnC,IAAI,aAAa,IAAI,CAAC,gBAAgB,IAAI,SAAS,EAAE;YACnD,YAAY,GAAG,IAAI,CAAC;SACrB;QAED,6BAA6B;QAC7B,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE;YAChD,YAAY,GAAG,IAAI,CAAC;SACrB;KACF;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAC9B,aAAsB,EACtB,gBAA0B,EAC1B,WAAqB,EACrB,SAAmB;IAEnB,IAAI,uBAAuB,GAAG,KAAK,CAAC;IAEpC,2DAA2D;IAC3D,IAAI,aAAa,IAAI,CAAC,SAAS,IAAI,CAAC,gBAAgB,IAAI,WAAW,CAAC,EAAE;QACpE,uBAAuB,GAAG,IAAI,CAAC;KAChC;IAED,OAAO,uBAAuB,CAAC;AACjC,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';\nimport { InternalButton } from '../../button/internal';\nimport { useAppLayoutInternals } from './context';\nimport TriggerButton from './trigger-button';\nimport styles from './styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport splitPanelTestUtilStyles from '../../split-panel/test-classes/styles.css.js';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\ninterface ToolsProps {\n children: React.ReactNode;\n}\n\n/**\n * The Tools component consists of the following elements:\n * the container, or root element, that sits as a direct child to the Layout grid definition;\n * the split panel, which exists only if there is a split panel in side position;\n * the tools, or drawer, that contains the hide tools form and the children passed through the API;\n * the show tools form that contains the triggers for both the drawer and the\n * split panel in large viewports;\n */\nexport default function Tools({ children }: ToolsProps) {\n const {\n ariaLabels,\n disableBodyScroll,\n drawers,\n handleSplitPanelClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n loseToolsFocus,\n splitPanel,\n splitPanelControlId,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n tools,\n toolsControlId,\n toolsHide,\n toolsRefs,\n toolsWidth,\n headerVariant,\n } = useAppLayoutInternals();\n\n const hasSplitPanel = !!splitPanel && splitPanelPosition === 'side';\n const hasToolsForm = getToolsFormStatus(\n hasSplitPanel && splitPanelDisplayed,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n toolsHide\n );\n const hasToolsFormPersistence = getToolsFormPersistence(hasSplitPanel, isSplitPanelOpen, isToolsOpen, toolsHide);\n const isUnfocusable = hasDrawerViewportOverlay && !isToolsOpen;\n\n /**\n * If the drawers property is defined the SplitPanel will be mounted and rendered\n * by the Drawers component.\n */\n if ((toolsHide && !hasSplitPanel) || drawers) {\n return null;\n }\n\n return (\n <Transition in={isToolsOpen ?? false}>\n {(state, transitionEventsRef) => (\n <div\n className={clsx(styles['tools-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['drawer-closed']]: !isToolsOpen,\n })}\n style={{\n [customCssProps.toolsAnimationStartingOpacity]: `${hasSplitPanel && isSplitPanelOpen ? 1 : 0}`,\n [customCssProps.toolsWidth]: `${toolsWidth}px`,\n }}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseToolsFocus();\n }\n }}\n >\n {children}\n\n {!toolsHide && (\n <aside\n id={toolsControlId}\n aria-hidden={!isToolsOpen ? true : false}\n aria-label={ariaLabels?.tools ?? undefined}\n className={clsx(\n styles.tools,\n {\n [styles.animating]: state === 'entering',\n [styles['has-tools-form-persistence']]: hasToolsFormPersistence,\n [styles['is-tools-open']]: isToolsOpen,\n },\n testutilStyles.tools\n )}\n ref={state !== 'exiting' ? transitionEventsRef : undefined}\n >\n <div className={styles['animated-content']}>\n <div className={styles['hide-tools']}>\n <InternalButton\n ariaLabel={ariaLabels?.toolsClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => handleToolsClick(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['tools-close']}\n ref={toolsRefs.close}\n />\n </div>\n\n {tools}\n </div>\n </aside>\n )}\n\n {!isMobile && (\n <aside\n aria-hidden={!hasToolsForm ? true : false}\n aria-label={ariaLabels?.tools ?? undefined}\n className={clsx(styles['show-tools'], {\n [styles.animating]: state === 'exiting',\n [styles['has-tools-form']]: hasToolsForm,\n [styles['has-tools-form-persistence']]: hasToolsFormPersistence,\n })}\n ref={state === 'exiting' ? transitionEventsRef : undefined}\n data-testid=\"side-split-panel-drawer\"\n >\n {!toolsHide && (\n <TriggerButton\n ariaLabel={ariaLabels?.toolsToggle}\n ariaControls={toolsControlId}\n ariaExpanded={isToolsOpen}\n iconName=\"status-info\"\n onClick={() => handleToolsClick(!isToolsOpen)}\n selected={hasSplitPanel && isToolsOpen}\n className={testutilStyles['tools-toggle']}\n ref={toolsRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n ariaControls={splitPanelControlId}\n ariaExpanded={!!isSplitPanelOpen}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n className={splitPanelTestUtilStyles['open-button']}\n ref={splitPanelRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n </aside>\n )}\n </div>\n )}\n </Transition>\n );\n}\n\n/**\n * By default the Tools form is styled as display: none; This behavior should\n * be unchanged in mobile viewports where the Tools form is always suppressed.\n * In large viewports, however the Tools form and its corresponding buttons\n * should be present in the UI under the below circumstances.\n */\nfunction getToolsFormStatus(\n hasSplitPanel: boolean,\n isMobile: boolean,\n isSplitPanelOpen?: boolean,\n isToolsOpen?: boolean,\n toolsHide?: boolean\n) {\n let hasToolsForm = false;\n\n if (!isMobile) {\n // Both the Split Panel and Tools button are needed\n if (hasSplitPanel && !toolsHide) {\n hasToolsForm = true;\n }\n\n // The Split Panel button is needed\n if (hasSplitPanel && !isSplitPanelOpen && toolsHide) {\n hasToolsForm = true;\n }\n\n // The Tools button is needed\n if (!hasSplitPanel && !toolsHide && !isToolsOpen) {\n hasToolsForm = true;\n }\n }\n\n return hasToolsForm;\n}\n\n/**\n * Under two scenarios the Tools form that contains the triggers\n * for the Tools content and the Split Panel may be persistent\n * in the UI (as opposed to disappearing when one of the drawers\n * is open). This will also add a white background as opposed to the\n * default transparent background. The buttons will present and in a\n * selected / not selected state.\n */\nfunction getToolsFormPersistence(\n hasSplitPanel: boolean,\n isSplitPanelOpen?: boolean,\n isToolsOpen?: boolean,\n toolsHide?: boolean\n) {\n let hasToolsFormPersistence = false;\n\n // Both Tools and Split Panel exist and one or both is open\n if (hasSplitPanel && !toolsHide && (isSplitPanelOpen || isToolsOpen)) {\n hasToolsFormPersistence = true;\n }\n\n return hasToolsFormPersistence;\n}\n"]}
@@ -12,7 +12,7 @@ function TriggerButton({ ariaLabel, className, iconName, iconSvg, ariaExpanded,
12
12
  }, className), onClick: onClick, ref: ref, type: "button", "data-testid": testId },
13
13
  React.createElement("span", { className: clsx(badge && styles['trigger-badge-wrapper']) },
14
14
  React.createElement(Icon, { name: iconName, svg: iconSvg }))),
15
- badge && React.createElement("div", { className: clsx(styles.dot) })));
15
+ badge && React.createElement("div", { className: styles.dot })));
16
16
  }
17
17
  export default React.forwardRef(TriggerButton);
18
18
  //# sourceMappingURL=trigger-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger-button.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAkBrC,SAAS,aAAa,CACpB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,kBAAkB,GACC,EACrB,GAA+B;IAE/B,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC,kBAAkB,IAAI,MAAM,CAAC,6BAA6B,CAAC,CAAC;QAC3G,iDACiB,YAAY,mBACZ,YAAY,mBACZ,IAAI,gBACP,SAAS,EACrB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK;aACtB,EACD,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAmC,EACxC,IAAI,EAAC,QAAQ,iBACA,MAAM;YAEnB,8BAAM,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CACjC,CACA;QACR,KAAK,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAI,CAC1C,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,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';\nimport Icon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n testId?: string;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n selected?: boolean;\n badge?: boolean;\n highContrastHeader?: boolean;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n badge,\n selected = false,\n highContrastHeader,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n return (\n <div className={clsx(styles['trigger-wrapper'], !highContrastHeader && styles['remove-high-contrast-header'])}>\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n className={clsx(\n styles.trigger,\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n },\n className\n )}\n onClick={onClick}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n >\n <span className={clsx(badge && styles['trigger-badge-wrapper'])}>\n <Icon name={iconName} svg={iconSvg} />\n </span>\n </button>\n {badge && <div className={clsx(styles.dot)} />}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
1
+ {"version":3,"file":"trigger-button.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAkBrC,SAAS,aAAa,CACpB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,kBAAkB,GACC,EACrB,GAA+B;IAE/B,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC,kBAAkB,IAAI,MAAM,CAAC,6BAA6B,CAAC,CAAC;QAC3G,iDACiB,YAAY,mBACZ,YAAY,mBACZ,IAAI,gBACP,SAAS,EACrB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK;aACtB,EACD,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAmC,EACxC,IAAI,EAAC,QAAQ,iBACA,MAAM;YAEnB,8BAAM,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CACjC,CACA;QACR,KAAK,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG,GAAI,CACpC,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,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';\nimport Icon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n testId?: string;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n selected?: boolean;\n badge?: boolean;\n highContrastHeader?: boolean;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n badge,\n selected = false,\n highContrastHeader,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n return (\n <div className={clsx(styles['trigger-wrapper'], !highContrastHeader && styles['remove-high-contrast-header'])}>\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n className={clsx(\n styles.trigger,\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n },\n className\n )}\n onClick={onClick}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n >\n <span className={clsx(badge && styles['trigger-badge-wrapper'])}>\n <Icon name={iconName} svg={iconSvg} />\n </span>\n </button>\n {badge && <div className={styles.dot} />}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
@@ -1,10 +1,4 @@
1
1
  import React from 'react';
2
- /**
3
- * The overlap height has a default set in CSS but can also be dynamically overridden
4
- * for content types (such as Table and Wizard) that have variable size content in the overlap.
5
- * If a child component utilizes a sticky header the hasStickyBackground property will determine
6
- * if the background remains in the same vertical position.
7
- */
8
2
  export default function useBackgroundOverlap({ contentHeader, disableContentHeaderOverlap, layoutElement, }: {
9
3
  contentHeader: React.ReactNode;
10
4
  disableContentHeaderOverlap?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-background-overlap.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/use-background-overlap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,aAAa,EACb,2BAA2B,EAC3B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CACvC;;4CAMY,MAAM;EA6BlB"}
1
+ {"version":3,"file":"use-background-overlap.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/use-background-overlap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,aAAa,EACb,2BAA2B,EAC3B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CACvC;;4CAMY,MAAM;EA6BlB"}
@@ -2,12 +2,6 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { useCallback, useState } from 'react';
4
4
  import customCssProps from '../../internal/generated/custom-css-properties';
5
- /**
6
- * The overlap height has a default set in CSS but can also be dynamically overridden
7
- * for content types (such as Table and Wizard) that have variable size content in the overlap.
8
- * If a child component utilizes a sticky header the hasStickyBackground property will determine
9
- * if the background remains in the same vertical position.
10
- */
11
5
  export default function useBackgroundOverlap({ contentHeader, disableContentHeaderOverlap, layoutElement, }) {
12
6
  const hasContentHeader = !!contentHeader;
13
7
  const [hasBackgroundOverlap, setHasBackgroundOverlap] = useState(hasContentHeader);
@@ -1 +1 @@
1
- {"version":3,"file":"use-background-overlap.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/use-background-overlap.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,aAAa,EACb,2BAA2B,EAC3B,aAAa,GAKd;IACC,MAAM,gBAAgB,GAAG,CAAC,CAAC,aAAa,CAAC;IAEzC,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAEnF,MAAM,6BAA6B,GAAG,WAAW,CAC/C,CAAC,MAAc,EAAE,EAAE;QACjB,MAAM,UAAU,GAAG,gBAAgB,IAAI,MAAM,GAAG,CAAC,CAAC;QAClD,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAEpC;;;;;;WAMG;QACH,iEAAiE;QACjE,MAAM,OAAO,GAAG,OAAO,aAAa,KAAK,UAAU,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAA,CAAC;QAC9E,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QACD,IAAI,2BAA2B,IAAI,CAAC,UAAU,IAAI,MAAM,IAAI,CAAC,EAAE;YAC7D,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;SAC5D;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,aAAa,EAAE,GAAG,MAAM,IAAI,CAAC,CAAC;SACxE;IACH,CAAC,EACD,CAAC,gBAAgB,EAAE,aAAa,EAAE,2BAA2B,CAAC,CAC/D,CAAC;IAEF,OAAO;QACL,oBAAoB;QACpB,6BAA6B;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState } from 'react';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\n/**\n * The overlap height has a default set in CSS but can also be dynamically overridden\n * for content types (such as Table and Wizard) that have variable size content in the overlap.\n * If a child component utilizes a sticky header the hasStickyBackground property will determine\n * if the background remains in the same vertical position.\n */\nexport default function useBackgroundOverlap({\n contentHeader,\n disableContentHeaderOverlap,\n layoutElement,\n}: {\n contentHeader: React.ReactNode;\n disableContentHeaderOverlap?: boolean;\n layoutElement: React.Ref<HTMLElement>;\n}) {\n const hasContentHeader = !!contentHeader;\n\n const [hasBackgroundOverlap, setHasBackgroundOverlap] = useState(hasContentHeader);\n\n const updateBackgroundOverlapHeight = useCallback(\n (height: number) => {\n const hasOverlap = hasContentHeader || height > 0;\n setHasBackgroundOverlap(hasOverlap);\n\n /**\n * React 18 will trigger a paint before the state is correctly updated\n * (see https://github.com/facebook/react/issues/24331).\n * To work around this, we bypass React state updates and imperatively update the custom property on the DOM.\n * An alternative would be to use `queueMicrotask` and `flushSync` in the ResizeObserver callback,\n * but that would have some performance impact as it would delay the render.\n */\n // Layout component uses RefObject, we don't expect a RefCallback\n const element = typeof layoutElement !== 'function' && layoutElement?.current;\n if (!element) {\n return;\n }\n if (disableContentHeaderOverlap || !hasOverlap || height <= 0) {\n element.style.removeProperty(customCssProps.overlapHeight);\n } else {\n element.style.setProperty(customCssProps.overlapHeight, `${height}px`);\n }\n },\n [hasContentHeader, layoutElement, disableContentHeaderOverlap]\n );\n\n return {\n hasBackgroundOverlap,\n updateBackgroundOverlapHeight,\n };\n}\n"]}
1
+ {"version":3,"file":"use-background-overlap.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/use-background-overlap.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,aAAa,EACb,2BAA2B,EAC3B,aAAa,GAKd;IACC,MAAM,gBAAgB,GAAG,CAAC,CAAC,aAAa,CAAC;IAEzC,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAEnF,MAAM,6BAA6B,GAAG,WAAW,CAC/C,CAAC,MAAc,EAAE,EAAE;QACjB,MAAM,UAAU,GAAG,gBAAgB,IAAI,MAAM,GAAG,CAAC,CAAC;QAClD,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAEpC;;;;;;WAMG;QACH,iEAAiE;QACjE,MAAM,OAAO,GAAG,OAAO,aAAa,KAAK,UAAU,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAA,CAAC;QAC9E,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QACD,IAAI,2BAA2B,IAAI,CAAC,UAAU,IAAI,MAAM,IAAI,CAAC,EAAE;YAC7D,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;SAC5D;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,aAAa,EAAE,GAAG,MAAM,IAAI,CAAC,CAAC;SACxE;IACH,CAAC,EACD,CAAC,gBAAgB,EAAE,aAAa,EAAE,2BAA2B,CAAC,CAC/D,CAAC;IAEF,OAAO;QACL,oBAAoB;QACpB,6BAA6B;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState } from 'react';\nimport customCssProps from '../../internal/generated/custom-css-properties';\n\nexport default function useBackgroundOverlap({\n contentHeader,\n disableContentHeaderOverlap,\n layoutElement,\n}: {\n contentHeader: React.ReactNode;\n disableContentHeaderOverlap?: boolean;\n layoutElement: React.Ref<HTMLElement>;\n}) {\n const hasContentHeader = !!contentHeader;\n\n const [hasBackgroundOverlap, setHasBackgroundOverlap] = useState(hasContentHeader);\n\n const updateBackgroundOverlapHeight = useCallback(\n (height: number) => {\n const hasOverlap = hasContentHeader || height > 0;\n setHasBackgroundOverlap(hasOverlap);\n\n /**\n * React 18 will trigger a paint before the state is correctly updated\n * (see https://github.com/facebook/react/issues/24331).\n * To work around this, we bypass React state updates and imperatively update the custom property on the DOM.\n * An alternative would be to use `queueMicrotask` and `flushSync` in the ResizeObserver callback,\n * but that would have some performance impact as it would delay the render.\n */\n // Layout component uses RefObject, we don't expect a RefCallback\n const element = typeof layoutElement !== 'function' && layoutElement?.current;\n if (!element) {\n return;\n }\n if (disableContentHeaderOverlap || !hasOverlap || height <= 0) {\n element.style.removeProperty(customCssProps.overlapHeight);\n } else {\n element.style.setProperty(customCssProps.overlapHeight, `${height}px`);\n }\n },\n [hasContentHeader, layoutElement, disableContentHeaderOverlap]\n );\n\n return {\n hasBackgroundOverlap,\n updateBackgroundOverlapHeight,\n };\n}\n"]}
@@ -7,7 +7,7 @@ const CategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHi
7
7
  // provided as an ARIA label.
8
8
  return (React.createElement("li", { className: clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled), role: "presentation", "aria-disabled": disabled ? 'true' : undefined },
9
9
  item.text && (React.createElement("p", { className: clsx(styles.header, { [styles.disabled]: disabled }), "aria-hidden": "true" }, item.text)),
10
- React.createElement("ul", { className: clsx(styles['items-list-container']), role: "group", "aria-label": item.text }, item.items && (React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, lastInDropdown: lastInDropdown, highlightItem: highlightItem, categoryDisabled: disabled, hasCategoryHeader: !!item.text, variant: variant })))));
10
+ React.createElement("ul", { className: styles['items-list-container'], role: "group", "aria-label": item.text }, item.items && (React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, lastInDropdown: lastInDropdown, highlightItem: highlightItem, categoryDisabled: disabled, hasCategoryHeader: !!item.text, variant: variant })))));
11
11
  };
12
12
  export default CategoryElement;
13
13
  //# sourceMappingURL=category-element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-element.js","sourceRoot":"","sources":["../../../../src/button-dropdown/category-elements/category-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,aAAa,EACb,QAAQ,EACR,OAAO,GACO,EAAE,EAAE;IAClB,yEAAyE;IACzE,6BAA6B;IAC7B,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,IAAI,EAAC,cAAc,mBACJ,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAE3C,IAAI,CAAC,IAAI,IAAI,CACZ,2BAAG,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,iBAAc,MAAM,IACnF,IAAI,CAAC,IAAI,CACR,CACL;QACD,4BAAI,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,IAAI,EAAC,OAAO,gBAAa,IAAI,CAAC,IAAI,IACpF,IAAI,CAAC,KAAK,IAAI,CACb,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,QAAQ,EAC1B,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAC9B,OAAO,EAAE,OAAO,GAChB,CACH,CACE,CACF,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CategoryProps } from '../interfaces';\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport ItemsList from '../items-list';\n\nconst CategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n // Hide the category title element from screen readers because it will be\n // provided as an ARIA label.\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled)}\n role=\"presentation\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n {item.text && (\n <p className={clsx(styles.header, { [styles.disabled]: disabled })} aria-hidden=\"true\">\n {item.text}\n </p>\n )}\n <ul className={clsx(styles['items-list-container'])} role=\"group\" aria-label={item.text}>\n {item.items && (\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n categoryDisabled={disabled}\n hasCategoryHeader={!!item.text}\n variant={variant}\n />\n )}\n </ul>\n </li>\n );\n};\n\nexport default CategoryElement;\n"]}
1
+ {"version":3,"file":"category-element.js","sourceRoot":"","sources":["../../../../src/button-dropdown/category-elements/category-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,aAAa,EACb,QAAQ,EACR,OAAO,GACO,EAAE,EAAE;IAClB,yEAAyE;IACzE,6BAA6B;IAC7B,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,IAAI,EAAC,cAAc,mBACJ,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAE3C,IAAI,CAAC,IAAI,IAAI,CACZ,2BAAG,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,iBAAc,MAAM,IACnF,IAAI,CAAC,IAAI,CACR,CACL;QACD,4BAAI,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAAE,IAAI,EAAC,OAAO,gBAAa,IAAI,CAAC,IAAI,IAC9E,IAAI,CAAC,KAAK,IAAI,CACb,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,QAAQ,EAC1B,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAC9B,OAAO,EAAE,OAAO,GAChB,CACH,CACE,CACF,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CategoryProps } from '../interfaces';\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport ItemsList from '../items-list';\n\nconst CategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n // Hide the category title element from screen readers because it will be\n // provided as an ARIA label.\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled)}\n role=\"presentation\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n {item.text && (\n <p className={clsx(styles.header, { [styles.disabled]: disabled })} aria-hidden=\"true\">\n {item.text}\n </p>\n )}\n <ul className={styles['items-list-container']} role=\"group\" aria-label={item.text}>\n {item.items && (\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n categoryDisabled={disabled}\n hasCategoryHeader={!!item.text}\n variant={variant}\n />\n )}\n </ul>\n </li>\n );\n};\n\nexport default CategoryElement;\n"]}
@@ -55,7 +55,7 @@ const MobileExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle,
55
55
  content = trigger;
56
56
  }
57
57
  else {
58
- content = (React.createElement(MobileExpandableGroup, { open: expanded, trigger: trigger }, item.items && expanded && (React.createElement("ul", { role: "menu", "aria-label": item.text, className: clsx(styles['items-list-container']) },
58
+ content = (React.createElement(MobileExpandableGroup, { open: expanded, trigger: trigger }, item.items && expanded && (React.createElement("ul", { role: "menu", "aria-label": item.text, className: styles['items-list-container'] },
59
59
  React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, lastInDropdown: lastInDropdown, highlightItem: highlightItem, hasCategoryHeader: true, variant: variant })))));
60
60
  }
61
61
  return (React.createElement("li", { className: clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-expandable-category-element.js","sourceRoot":"","sources":["../../../../src/button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AAEvF,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,oBAAoB,MAAM,oCAAoC,C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AAI,CACzB,4BAAI,IAAI,EAAC,MAAM,gBAAa,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACpF,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,OAAO,GAChB,CACC,CACN,CACqB,CACzB,CAAC;KACH;IAED,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE;YAChF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW,IAAI,QAAQ;YAC7C,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI;SAC1B,CAAC,EACF,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,iBACR,IAAI,CAAC,EAAE,IAEnB,OAAO,CACL,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport { CategoryProps } from '../interfaces';\nimport Tooltip from '../tooltip.js';\nimport useHiddenDescription from '../utils/use-hidden-description.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nconst MobileExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick = (e: React.MouseEvent) => {\n if (!disabled) {\n e.preventDefault();\n onGroupToggle(item, e);\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.highlighted]: highlighted,\n [styles['rolled-down']]: expanded,\n [styles.disabled]: disabled,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, disabled, expanded })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span\n className={clsx(styles['expand-icon'], {\n [styles['expand-icon-up']]: expanded,\n })}\n >\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n\n if (isDisabledWithReason) {\n content = (\n <>\n {descriptionEl}\n <Tooltip content={item.disabledReason}>{trigger}</Tooltip>\n </>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <MobileExpandableGroup open={expanded} trigger={trigger}>\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={clsx(styles['items-list-container'])}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n />\n </ul>\n )}\n </MobileExpandableGroup>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted || expanded,\n [styles.expandable]: true,\n })}\n role=\"presentation\"\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n data-testid={item.id}\n >\n {content}\n </li>\n );\n};\n\nexport default MobileExpandableCategoryElement;\n"]}
1
+ {"version":3,"file":"mobile-expandable-category-element.js","sourceRoot":"","sources":["../../../../src/button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AAEvF,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,+BAA+B,GAAG,CAAC,EACvC,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,E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AAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,OAAO,GAChB,CACC,CACN,CACqB,CACzB,CAAC;KACH;IAED,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE;YAChF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW,IAAI,QAAQ;YAC7C,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI;SAC1B,CAAC,EACF,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,iBACR,IAAI,CAAC,EAAE,IAEnB,OAAO,CACL,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport { CategoryProps } from '../interfaces';\nimport Tooltip from '../tooltip.js';\nimport useHiddenDescription from '../utils/use-hidden-description.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nconst MobileExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick = (e: React.MouseEvent) => {\n if (!disabled) {\n e.preventDefault();\n onGroupToggle(item, e);\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.highlighted]: highlighted,\n [styles['rolled-down']]: expanded,\n [styles.disabled]: disabled,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, disabled, expanded })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span\n className={clsx(styles['expand-icon'], {\n [styles['expand-icon-up']]: expanded,\n })}\n >\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n\n if (isDisabledWithReason) {\n content = (\n <>\n {descriptionEl}\n <Tooltip content={item.disabledReason}>{trigger}</Tooltip>\n </>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <MobileExpandableGroup open={expanded} trigger={trigger}>\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={styles['items-list-container']}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n />\n </ul>\n )}\n </MobileExpandableGroup>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted || expanded,\n [styles.expandable]: true,\n })}\n role=\"presentation\"\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n data-testid={item.id}\n >\n {content}\n </li>\n );\n};\n\nexport default MobileExpandableCategoryElement;\n"]}
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import clsx from 'clsx';
5
5
  import styles from './styles.css.js';
6
6
  const MobileExpandableGroup = ({ children, trigger, open }) => {
7
- return (React.createElement("div", { className: clsx(styles.root) },
7
+ return (React.createElement("div", { className: styles.root },
8
8
  React.createElement("div", { className: styles.trigger }, trigger),
9
9
  React.createElement("div", { className: clsx(styles.dropdown, { [styles.open]: open }), "data-open": open }, children)));
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-expandable-group.js","sourceRoot":"","sources":["../../../../src/button-dropdown/mobile-expandable-group/mobile-expandable-group.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,MAAM,qBAAqB,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAA8B,EAAE,EAAE;IACxF,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;QAC/C,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,eAAa,IAAI,IAC5E,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,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';\nimport styles from './styles.css.js';\n\nexport interface MobileExpandableGroupProps {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * mobile expandable groups content elements.\n */\n children?: React.ReactNode;\n /**\n * Open state of the mobile expandable groups.\n */\n open?: boolean;\n}\n\nconst MobileExpandableGroup = ({ children, trigger, open }: MobileExpandableGroupProps) => {\n return (\n <div className={clsx(styles.root)}>\n <div className={styles.trigger}>{trigger}</div>\n <div className={clsx(styles.dropdown, { [styles.open]: open })} data-open={open}>\n {children}\n </div>\n </div>\n );\n};\n\nexport default MobileExpandableGroup;\n"]}
1
+ {"version":3,"file":"mobile-expandable-group.js","sourceRoot":"","sources":["../../../../src/button-dropdown/mobile-expandable-group/mobile-expandable-group.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,MAAM,qBAAqB,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAA8B,EAAE,EAAE;IACxF,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,CAAO;QAC/C,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,eAAa,IAAI,IAC5E,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,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';\nimport styles from './styles.css.js';\n\nexport interface MobileExpandableGroupProps {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * mobile expandable groups content elements.\n */\n children?: React.ReactNode;\n /**\n * Open state of the mobile expandable groups.\n */\n open?: boolean;\n}\n\nconst MobileExpandableGroup = ({ children, trigger, open }: MobileExpandableGroupProps) => {\n return (\n <div className={styles.root}>\n <div className={styles.trigger}>{trigger}</div>\n <div className={clsx(styles.dropdown, { [styles.open]: open })} data-open={open}>\n {children}\n </div>\n </div>\n );\n};\n\nexport default MobileExpandableGroup;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAOlF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAM1E,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACzG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cA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MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAEzE,oBAAoB,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,oBAAoB,CAAC,CAAC;IACjF,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;CAClE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,sBAAsB,eAWvE;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,SAAS,EACT,KAAK,EACL,cAAc,EACd,oBAAoB,EACpB,cAAsB,EACtB,iBAAwB,EACxB,sBAA8B,EAC9B,uBAA+B,EAC/B,eAAuB,EACvB,WAAW,EACX,UAAkB,EAClB,qBAA4B,EAC5B,oBAAoB,EACpB,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,sBAAsB,eAoGxB"}
@@ -2,11 +2,9 @@ import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import clsx from 'clsx';
5
- import React, { useEffect, useRef } from 'react';
5
+ import React, { useRef } from 'react';
6
6
  import { getBaseProps } from '../internal/base-component';
7
- import { useAppLayoutContext } from '../internal/context/app-layout-context';
8
7
  import { StickyHeaderContext, useStickyHeader } from './use-sticky-header';
9
- import { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';
10
8
  import { useMergeRefs } from '../internal/hooks/use-merge-refs';
11
9
  import { useMobile } from '../internal/hooks/use-mobile';
12
10
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
@@ -25,33 +23,15 @@ export default function InternalContainer(_a) {
25
23
  var _b;
26
24
  var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight, media, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __disableFooterPaddings = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__disableFooterPaddings", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
27
25
  const isMobile = useMobile();
26
+ const isRefresh = useVisualRefresh();
28
27
  const baseProps = getBaseProps(restProps);
29
28
  const rootRef = useRef(null);
30
29
  const headerRef = useRef(null);
31
- const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset, __mobileStickyOffset, __disableStickyMobile);
30
+ const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset, __mobileStickyOffset, __disableStickyMobile, __fullPage && isRefresh && !isMobile);
32
31
  const contentId = useUniqueId();
33
- const { setHasStickyBackground } = useAppLayoutContext();
34
- const isRefresh = useVisualRefresh();
35
32
  const hasDynamicHeight = isRefresh && variant === 'full-page';
36
- const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__fullPage });
37
33
  const mergedRef = useMergeRefs(rootRef, __internalRootRef);
38
- const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);
39
- /**
40
- * The visual refresh AppLayout component needs to know if a child component
41
- * has a high contrast sticky header. This is to make sure the background element
42
- * stays in the same vertical position as the header content.
43
- */
44
- useEffect(() => {
45
- const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;
46
- if (shouldUpdateStickyBackground) {
47
- setHasStickyBackground(true);
48
- }
49
- return () => {
50
- if (shouldUpdateStickyBackground) {
51
- setHasStickyBackground(false);
52
- }
53
- };
54
- }, [isSticky, setHasStickyBackground, variant]);
34
+ const headerMergedRef = useMergeRefs(headerRef, __headerRef);
55
35
  // The container is only sticky on mobile if it is the header for the table.
56
36
  // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.
57
37
  const shouldHaveStickyStyles = isSticky && !isMobile;
@@ -72,7 +52,9 @@ export default function InternalContainer(_a) {
72
52
  [styles['with-toolbar']]: hasToolbar,
73
53
  [styles['with-hidden-content']]: !children || __hiddenContent,
74
54
  [styles['header-with-media']]: hasMedia,
75
- }) }, stickyStyles, { ref: headerMergedRef }), header)))),
55
+ }) }, stickyStyles, { ref: headerMergedRef }),
56
+ isStuck && !isMobile && isRefresh && __fullPage && React.createElement("div", { className: styles['header-cover'] }),
57
+ header)))),
76
58
  React.createElement("div", { className: clsx(styles.content, fitHeight && styles['content-fit-height'], {
77
59
  [styles['with-paddings']]: !disableContentPaddings,
78
60
  }) }, children),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MA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,IAChB,GAAG,EAAE,eAAe,KAEnB,MAAM,CACH,CACuB,CACA,CAClC;YACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAAE;oBACzE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;iBACnD,CAAC,IAED,QAAQ,CACL;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,uBAAuB;iBACpD,CAAC,IAED,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { getGlobalFlag } from '../internal/utils/global-flags';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile\n );\n const contentId = useUniqueId();\n const { setHasStickyBackground } = useAppLayoutContext();\n const isRefresh = useVisualRefresh();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__fullPage });\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);\n\n /**\n * The visual refresh AppLayout component needs to know if a child component\n * has a high contrast sticky header. This is to make sure the background element\n * stays in the same vertical position as the header content.\n */\n useEffect(() => {\n const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(true);\n }\n\n return () => {\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(false);\n }\n };\n }, [isSticky, setHasStickyBackground, variant]);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const hasToolbar = getGlobalFlag('appLayoutWidget');\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(isRefresh && styles.refresh, styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-toolbar']]: hasToolbar,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n })}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div\n className={clsx(styles.content, fitHeight && styles['content-fit-height'], {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,a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qB;4BACjD,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,UAAU;4BACpC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,QAAQ,IAAI,eAAe;4BAC7D,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ;yBACxC,CAAC,IACE,YAAY,IAChB,GAAG,EAAE,eAAe;wBAEnB,OAAO,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,UAAU,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,GAAQ;wBACjG,MAAM,CACH,CACuB,CACA,CAClC;YACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAAE;oBACzE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;iBACnD,CAAC,IAED,QAAQ,CACL;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,uBAAuB;iBACpD,CAAC,IAED,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { getGlobalFlag } from '../internal/utils/global-flags';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const hasToolbar = getGlobalFlag('appLayoutWidget');\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(isRefresh && styles.refresh, styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-toolbar']]: hasToolbar,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n })}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div\n className={clsx(styles.content, fitHeight && styles['content-fit-height'], {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}