@cloudscape-design/components 3.0.318 → 3.0.320

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 (174) hide show
  1. package/annotation-context/annotation/styles.css.js +24 -24
  2. package/annotation-context/annotation/styles.scoped.css +30 -30
  3. package/annotation-context/annotation/styles.selectors.js +24 -24
  4. package/app-layout/drawer/interfaces.d.ts +0 -7
  5. package/app-layout/drawer/interfaces.d.ts.map +1 -1
  6. package/app-layout/drawer/interfaces.js.map +1 -1
  7. package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  8. package/app-layout/drawer/resizable-drawer.js +3 -3
  9. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  10. package/app-layout/notifications/styles.css.js +3 -3
  11. package/app-layout/notifications/styles.scoped.css +7 -7
  12. package/app-layout/notifications/styles.selectors.js +3 -3
  13. package/app-layout/runtime-api.d.ts.map +1 -1
  14. package/app-layout/runtime-api.js +5 -2
  15. package/app-layout/runtime-api.js.map +1 -1
  16. package/app-layout/styles.css.js +17 -13
  17. package/app-layout/styles.scoped.css +44 -13
  18. package/app-layout/styles.selectors.js +17 -13
  19. package/app-layout/utils/interfaces.d.ts +10 -0
  20. package/app-layout/utils/interfaces.d.ts.map +1 -0
  21. package/app-layout/utils/interfaces.js +2 -0
  22. package/app-layout/utils/interfaces.js.map +1 -0
  23. package/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -1
  24. package/app-layout/utils/use-drawer-focus-control.js +8 -3
  25. package/app-layout/utils/use-drawer-focus-control.js.map +1 -1
  26. package/app-layout/utils/use-keyboard-events.d.ts +4 -0
  27. package/app-layout/utils/use-keyboard-events.d.ts.map +1 -0
  28. package/{split-panel → app-layout}/utils/use-keyboard-events.js +10 -11
  29. package/app-layout/utils/use-keyboard-events.js.map +1 -0
  30. package/app-layout/utils/use-pointer-events.d.ts +3 -0
  31. package/app-layout/utils/use-pointer-events.d.ts.map +1 -0
  32. package/{split-panel → app-layout}/utils/use-pointer-events.js +15 -8
  33. package/app-layout/utils/use-pointer-events.js.map +1 -0
  34. package/app-layout/utils/use-resize.d.ts +16 -0
  35. package/app-layout/utils/use-resize.d.ts.map +1 -0
  36. package/app-layout/utils/use-resize.js +84 -0
  37. package/app-layout/utils/use-resize.js.map +1 -0
  38. package/app-layout/visual-refresh/context.d.ts +11 -6
  39. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  40. package/app-layout/visual-refresh/context.js +26 -7
  41. package/app-layout/visual-refresh/context.js.map +1 -1
  42. package/app-layout/visual-refresh/drawers.d.ts +1 -33
  43. package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  44. package/app-layout/visual-refresh/drawers.js +14 -7
  45. package/app-layout/visual-refresh/drawers.js.map +1 -1
  46. package/app-layout/visual-refresh/styles.css.js +69 -68
  47. package/app-layout/visual-refresh/styles.scoped.css +294 -298
  48. package/app-layout/visual-refresh/styles.selectors.js +69 -68
  49. package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
  50. package/app-layout/visual-refresh/trigger-button.js +1 -2
  51. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  52. package/area-chart/{model/async-store.d.ts → async-store/index.d.ts} +1 -1
  53. package/area-chart/async-store/index.d.ts.map +1 -0
  54. package/area-chart/{model/async-store.js → async-store/index.js} +1 -1
  55. package/area-chart/async-store/index.js.map +1 -0
  56. package/area-chart/elements/area-chart-legend.d.ts.map +1 -1
  57. package/area-chart/elements/area-chart-legend.js +1 -1
  58. package/area-chart/elements/area-chart-legend.js.map +1 -1
  59. package/area-chart/elements/data-series.js +1 -1
  60. package/area-chart/elements/data-series.js.map +1 -1
  61. package/area-chart/elements/highlighted-point.js +1 -1
  62. package/area-chart/elements/highlighted-point.js.map +1 -1
  63. package/area-chart/elements/use-highlight-details.d.ts.map +1 -1
  64. package/area-chart/elements/use-highlight-details.js +3 -1
  65. package/area-chart/elements/use-highlight-details.js.map +1 -1
  66. package/area-chart/elements/vertical-marker.js +1 -1
  67. package/area-chart/elements/vertical-marker.js.map +1 -1
  68. package/area-chart/model/index.d.ts +1 -1
  69. package/area-chart/model/index.d.ts.map +1 -1
  70. package/area-chart/model/index.js.map +1 -1
  71. package/area-chart/model/interactions-store.d.ts +1 -1
  72. package/area-chart/model/interactions-store.d.ts.map +1 -1
  73. package/area-chart/model/interactions-store.js +1 -1
  74. package/area-chart/model/interactions-store.js.map +1 -1
  75. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  76. package/area-chart/model/use-chart-model.js +1 -1
  77. package/area-chart/model/use-chart-model.js.map +1 -1
  78. package/attribute-editor/interfaces.d.ts +1 -1
  79. package/attribute-editor/interfaces.d.ts.map +1 -1
  80. package/attribute-editor/interfaces.js.map +1 -1
  81. package/content-layout/styles.css.js +7 -7
  82. package/content-layout/styles.scoped.css +13 -13
  83. package/content-layout/styles.selectors.js +7 -7
  84. package/expandable-section/expandable-section-container.js +2 -2
  85. package/expandable-section/expandable-section-container.js.map +1 -1
  86. package/expandable-section/interfaces.d.ts +3 -1
  87. package/expandable-section/interfaces.d.ts.map +1 -1
  88. package/expandable-section/interfaces.js.map +1 -1
  89. package/expandable-section/internal.d.ts.map +1 -1
  90. package/expandable-section/internal.js +4 -2
  91. package/expandable-section/internal.js.map +1 -1
  92. package/flashbar/styles.css.js +45 -45
  93. package/flashbar/styles.scoped.css +169 -169
  94. package/flashbar/styles.selectors.js +45 -45
  95. package/internal/environment.js +1 -1
  96. package/internal/generated/custom-css-properties/index.js +39 -39
  97. package/internal/generated/custom-css-properties/index.js.map +1 -1
  98. package/internal/manifest.json +1 -1
  99. package/internal/plugins/drawers-controller.d.ts +5 -0
  100. package/internal/plugins/drawers-controller.d.ts.map +1 -1
  101. package/internal/plugins/drawers-controller.js.map +1 -1
  102. package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  103. package/mixed-line-bar-chart/data-series.js +8 -2
  104. package/mixed-line-bar-chart/data-series.js.map +1 -1
  105. package/package.json +1 -1
  106. package/split-panel/index.d.ts.map +1 -1
  107. package/split-panel/index.js +3 -3
  108. package/split-panel/index.js.map +1 -1
  109. package/split-panel/interfaces.d.ts +0 -7
  110. package/split-panel/interfaces.d.ts.map +1 -1
  111. package/split-panel/interfaces.js.map +1 -1
  112. package/split-panel/styles.css.js +56 -59
  113. package/split-panel/styles.scoped.css +77 -93
  114. package/split-panel/styles.selectors.js +56 -59
  115. package/table/body-cell/td-element.d.ts +1 -1
  116. package/table/body-cell/td-element.d.ts.map +1 -1
  117. package/table/body-cell/td-element.js +1 -1
  118. package/table/body-cell/td-element.js.map +1 -1
  119. package/table/header-cell/index.d.ts +1 -1
  120. package/table/header-cell/index.d.ts.map +1 -1
  121. package/table/header-cell/index.js +1 -1
  122. package/table/header-cell/index.js.map +1 -1
  123. package/table/internal.js +2 -2
  124. package/table/internal.js.map +1 -1
  125. package/table/sticky-columns/index.d.ts +2 -0
  126. package/table/sticky-columns/index.d.ts.map +1 -0
  127. package/table/sticky-columns/index.js +4 -0
  128. package/table/sticky-columns/index.js.map +1 -0
  129. package/table/{use-sticky-columns.d.ts → sticky-columns/use-sticky-columns.d.ts} +1 -1
  130. package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -0
  131. package/table/{use-sticky-columns.js → sticky-columns/use-sticky-columns.js} +3 -3
  132. package/table/sticky-columns/use-sticky-columns.js.map +1 -0
  133. package/table/sticky-scrollbar/index.d.ts +2 -0
  134. package/table/sticky-scrollbar/index.d.ts.map +1 -0
  135. package/table/sticky-scrollbar/index.js +4 -0
  136. package/table/sticky-scrollbar/index.js.map +1 -0
  137. package/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
  138. package/table/{sticky-scrollbar.js → sticky-scrollbar/sticky-scrollbar.js} +2 -2
  139. package/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
  140. package/table/sticky-scrollbar/styles.css.js +9 -0
  141. package/table/sticky-scrollbar/styles.scoped.css +22 -0
  142. package/table/sticky-scrollbar/styles.selectors.js +10 -0
  143. package/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
  144. package/table/{use-sticky-scrollbar.js → sticky-scrollbar/use-sticky-scrollbar.js} +3 -3
  145. package/table/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
  146. package/table/styles.css.js +32 -36
  147. package/table/styles.scoped.css +40 -59
  148. package/table/styles.selectors.js +32 -36
  149. package/table/thead.d.ts +1 -1
  150. package/table/thead.d.ts.map +1 -1
  151. package/table/thead.js +1 -1
  152. package/table/thead.js.map +1 -1
  153. package/table/utils.d.ts +1 -1
  154. package/table/utils.d.ts.map +1 -1
  155. package/table/utils.js.map +1 -1
  156. package/wizard/styles.css.js +31 -31
  157. package/wizard/styles.scoped.css +63 -63
  158. package/wizard/styles.selectors.js +31 -31
  159. package/area-chart/model/async-store.d.ts.map +0 -1
  160. package/area-chart/model/async-store.js.map +0 -1
  161. package/split-panel/utils/use-keyboard-events.d.ts +0 -4
  162. package/split-panel/utils/use-keyboard-events.d.ts.map +0 -1
  163. package/split-panel/utils/use-keyboard-events.js.map +0 -1
  164. package/split-panel/utils/use-pointer-events.d.ts +0 -3
  165. package/split-panel/utils/use-pointer-events.d.ts.map +0 -1
  166. package/split-panel/utils/use-pointer-events.js.map +0 -1
  167. package/table/sticky-scrollbar.d.ts.map +0 -1
  168. package/table/sticky-scrollbar.js.map +0 -1
  169. package/table/use-sticky-columns.d.ts.map +0 -1
  170. package/table/use-sticky-columns.js.map +0 -1
  171. package/table/use-sticky-scrollbar.d.ts.map +0 -1
  172. package/table/use-sticky-scrollbar.js.map +0 -1
  173. /package/table/{sticky-scrollbar.d.ts → sticky-scrollbar/sticky-scrollbar.d.ts} +0 -0
  174. /package/table/{use-sticky-scrollbar.d.ts → sticky-scrollbar/use-sticky-scrollbar.d.ts} +0 -0
@@ -2,50 +2,50 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "flash-with-motion": "awsui_flash-with-motion_1q84n_3wtis_93",
6
- "enter": "awsui_enter_1q84n_3wtis_93",
7
- "flash-body": "awsui_flash-body_1q84n_3wtis_107",
8
- "flash-message": "awsui_flash-message_1q84n_3wtis_107",
9
- "flash-header": "awsui_flash-header_1q84n_3wtis_107",
10
- "flash-content": "awsui_flash-content_1q84n_3wtis_108",
11
- "action-button-wrapper": "awsui_action-button-wrapper_1q84n_3wtis_109",
12
- "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_3wtis_110",
13
- "flash-icon": "awsui_flash-icon_1q84n_3wtis_133",
14
- "entering": "awsui_entering_1q84n_3wtis_146",
15
- "entered": "awsui_entered_1q84n_3wtis_167",
16
- "exiting": "awsui_exiting_1q84n_3wtis_272",
17
- "stack": "awsui_stack_1q84n_3wtis_294",
18
- "animation-running": "awsui_animation-running_1q84n_3wtis_294",
19
- "item": "awsui_item_1q84n_3wtis_294",
20
- "flash-list-item": "awsui_flash-list-item_1q84n_3wtis_295",
21
- "notification-bar": "awsui_notification-bar_1q84n_3wtis_296",
22
- "collapsed": "awsui_collapsed_1q84n_3wtis_316",
23
- "animation-ready": "awsui_animation-ready_1q84n_3wtis_316",
24
- "expanded-only": "awsui_expanded-only_1q84n_3wtis_316",
25
- "expanded": "awsui_expanded_1q84n_3wtis_316",
26
- "flash": "awsui_flash_1q84n_3wtis_93",
27
- "collapsible": "awsui_collapsible_1q84n_3wtis_380",
28
- "short-list": "awsui_short-list_1q84n_3wtis_386",
29
- "visual-refresh": "awsui_visual-refresh_1q84n_3wtis_386",
30
- "status": "awsui_status_1q84n_3wtis_603",
31
- "header": "awsui_header_1q84n_3wtis_603",
32
- "item-count": "awsui_item-count_1q84n_3wtis_604",
33
- "button": "awsui_button_1q84n_3wtis_605",
34
- "type-count": "awsui_type-count_1q84n_3wtis_640",
35
- "count-number": "awsui_count-number_1q84n_3wtis_640",
36
- "icon": "awsui_icon_1q84n_3wtis_674",
37
- "floating": "awsui_floating_1q84n_3wtis_712",
38
- "flashbar": "awsui_flashbar_1q84n_3wtis_720",
39
- "flash-refresh": "awsui_flash-refresh_1q84n_3wtis_766",
40
- "flash-list": "awsui_flash-list_1q84n_3wtis_295",
41
- "flash-focus-container": "awsui_flash-focus-container_1q84n_3wtis_785",
42
- "flash-text": "awsui_flash-text_1q84n_3wtis_812",
43
- "dismiss-button": "awsui_dismiss-button_1q84n_3wtis_110",
44
- "breakpoint-default": "awsui_breakpoint-default_1q84n_3wtis_853",
45
- "action-button": "awsui_action-button_1q84n_3wtis_109",
46
- "flash-type-success": "awsui_flash-type-success_1q84n_3wtis_866",
47
- "flash-type-error": "awsui_flash-type-error_1q84n_3wtis_870",
48
- "flash-type-warning": "awsui_flash-type-warning_1q84n_3wtis_874",
49
- "flash-type-info": "awsui_flash-type-info_1q84n_3wtis_878"
5
+ "flash-with-motion": "awsui_flash-with-motion_1q84n_cyh2o_93",
6
+ "enter": "awsui_enter_1q84n_cyh2o_93",
7
+ "flash-body": "awsui_flash-body_1q84n_cyh2o_107",
8
+ "flash-message": "awsui_flash-message_1q84n_cyh2o_107",
9
+ "flash-header": "awsui_flash-header_1q84n_cyh2o_107",
10
+ "flash-content": "awsui_flash-content_1q84n_cyh2o_108",
11
+ "action-button-wrapper": "awsui_action-button-wrapper_1q84n_cyh2o_109",
12
+ "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_cyh2o_110",
13
+ "flash-icon": "awsui_flash-icon_1q84n_cyh2o_133",
14
+ "entering": "awsui_entering_1q84n_cyh2o_146",
15
+ "entered": "awsui_entered_1q84n_cyh2o_167",
16
+ "exiting": "awsui_exiting_1q84n_cyh2o_272",
17
+ "stack": "awsui_stack_1q84n_cyh2o_294",
18
+ "animation-running": "awsui_animation-running_1q84n_cyh2o_294",
19
+ "item": "awsui_item_1q84n_cyh2o_294",
20
+ "flash-list-item": "awsui_flash-list-item_1q84n_cyh2o_295",
21
+ "notification-bar": "awsui_notification-bar_1q84n_cyh2o_296",
22
+ "collapsed": "awsui_collapsed_1q84n_cyh2o_316",
23
+ "animation-ready": "awsui_animation-ready_1q84n_cyh2o_316",
24
+ "expanded-only": "awsui_expanded-only_1q84n_cyh2o_316",
25
+ "expanded": "awsui_expanded_1q84n_cyh2o_316",
26
+ "flash": "awsui_flash_1q84n_cyh2o_93",
27
+ "collapsible": "awsui_collapsible_1q84n_cyh2o_380",
28
+ "short-list": "awsui_short-list_1q84n_cyh2o_386",
29
+ "visual-refresh": "awsui_visual-refresh_1q84n_cyh2o_386",
30
+ "status": "awsui_status_1q84n_cyh2o_603",
31
+ "header": "awsui_header_1q84n_cyh2o_603",
32
+ "item-count": "awsui_item-count_1q84n_cyh2o_604",
33
+ "button": "awsui_button_1q84n_cyh2o_605",
34
+ "type-count": "awsui_type-count_1q84n_cyh2o_640",
35
+ "count-number": "awsui_count-number_1q84n_cyh2o_640",
36
+ "icon": "awsui_icon_1q84n_cyh2o_674",
37
+ "floating": "awsui_floating_1q84n_cyh2o_712",
38
+ "flashbar": "awsui_flashbar_1q84n_cyh2o_720",
39
+ "flash-refresh": "awsui_flash-refresh_1q84n_cyh2o_766",
40
+ "flash-list": "awsui_flash-list_1q84n_cyh2o_295",
41
+ "flash-focus-container": "awsui_flash-focus-container_1q84n_cyh2o_785",
42
+ "flash-text": "awsui_flash-text_1q84n_cyh2o_812",
43
+ "dismiss-button": "awsui_dismiss-button_1q84n_cyh2o_110",
44
+ "breakpoint-default": "awsui_breakpoint-default_1q84n_cyh2o_853",
45
+ "action-button": "awsui_action-button_1q84n_cyh2o_109",
46
+ "flash-type-success": "awsui_flash-type-success_1q84n_cyh2o_866",
47
+ "flash-type-error": "awsui_flash-type-error_1q84n_cyh2o_870",
48
+ "flash-type-warning": "awsui_flash-type-warning_1q84n_cyh2o_874",
49
+ "flash-type-info": "awsui_flash-type-info_1q84n_cyh2o_878"
50
50
  };
51
51
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  export var PACKAGE_SOURCE = 'components';
3
- export var PACKAGE_VERSION = '3.0.0 (f9029ce)';
3
+ export var PACKAGE_VERSION = '3.0.0 (5c24b8b)';
4
4
  export var THEME = 'open-source-visual-refresh';
5
5
  export var ALWAYS_VISUAL_REFRESH = true;
6
6
 
@@ -1,43 +1,43 @@
1
1
  const customCSSPropertiesMap = {
2
- activeDrawerWidth: '--awsui-active-drawer-width-8nglyc',
3
- breadcrumbsGap: '--awsui-breadcrumbs-gap-8nglyc',
4
- contentGapLeft: '--awsui-content-gap-left-8nglyc',
5
- contentGapRight: '--awsui-content-gap-right-8nglyc',
6
- contentHeight: '--awsui-content-height-8nglyc',
7
- containerFirstGap: '--awsui-container-first-gap-8nglyc',
8
- containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-8nglyc',
9
- defaultMaxContentWidth: '--awsui-default-max-content-width-8nglyc',
10
- defaultMinContentWidth: '--awsui-default-min-content-width-8nglyc',
11
- footerHeight: '--awsui-footer-height-8nglyc',
12
- headerGap: '--awsui-header-gap-8nglyc',
13
- headerHeight: '--awsui-header-height-8nglyc',
14
- layoutWidth: '--awsui-layout-width-8nglyc',
15
- mainGap: '--awsui-main-gap-8nglyc',
16
- mainOffsetLeft: '--awsui-main-offset-left-8nglyc',
17
- mainTemplateRows: '--awsui-main-template-rows-8nglyc',
18
- maxContentWidth: '--awsui-max-content-width-8nglyc',
19
- minContentWidth: '--awsui-min-content-width-8nglyc',
20
- mobileBarHeight: '--awsui-mobile-bar-height-8nglyc',
21
- notificationsGap: '--awsui-notifications-gap-8nglyc',
22
- notificationsHeight: '--awsui-notifications-height-8nglyc',
23
- offsetTop: '--awsui-offset-top-8nglyc',
24
- offsetTopWithNotifications: '--awsui-offset-top-with-notifications-8nglyc',
25
- overlapHeight: '--awsui-overlap-height-8nglyc',
26
- navigationWidth: '--awsui-navigation-width-8nglyc',
27
- splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-8nglyc',
28
- splitPanelReportedSize: '--awsui-split-panel-reported-size-8nglyc',
29
- splitPanelHeight: '--awsui-split-panel-height-8nglyc',
30
- splitPanelMinWidth: '--awsui-split-panel-min-width-8nglyc',
31
- splitPanelMaxWidth: '--awsui-split-panel-max-width-8nglyc',
32
- toolsMaxWidth: '--awsui-tools-max-width-8nglyc',
33
- toolsWidth: '--awsui-tools-width-8nglyc',
34
- toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-8nglyc',
35
- contentScrollMargin: '--awsui-content-scroll-margin-8nglyc',
36
- flashbarStackDepth: '--awsui-flashbar-stack-depth-8nglyc',
37
- flashbarStackIndex: '--awsui-flashbar-stack-index-8nglyc',
38
- flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-8nglyc',
39
- stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-8nglyc',
40
- stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-8nglyc',
2
+ breadcrumbsGap: '--awsui-breadcrumbs-gap-zw2xxa',
3
+ contentGapLeft: '--awsui-content-gap-left-zw2xxa',
4
+ contentGapRight: '--awsui-content-gap-right-zw2xxa',
5
+ contentHeight: '--awsui-content-height-zw2xxa',
6
+ containerFirstGap: '--awsui-container-first-gap-zw2xxa',
7
+ containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-zw2xxa',
8
+ defaultMaxContentWidth: '--awsui-default-max-content-width-zw2xxa',
9
+ defaultMinContentWidth: '--awsui-default-min-content-width-zw2xxa',
10
+ drawerSize: '--awsui-drawer-size-zw2xxa',
11
+ footerHeight: '--awsui-footer-height-zw2xxa',
12
+ headerGap: '--awsui-header-gap-zw2xxa',
13
+ headerHeight: '--awsui-header-height-zw2xxa',
14
+ layoutWidth: '--awsui-layout-width-zw2xxa',
15
+ mainGap: '--awsui-main-gap-zw2xxa',
16
+ mainOffsetLeft: '--awsui-main-offset-left-zw2xxa',
17
+ mainTemplateRows: '--awsui-main-template-rows-zw2xxa',
18
+ maxContentWidth: '--awsui-max-content-width-zw2xxa',
19
+ minContentWidth: '--awsui-min-content-width-zw2xxa',
20
+ mobileBarHeight: '--awsui-mobile-bar-height-zw2xxa',
21
+ notificationsGap: '--awsui-notifications-gap-zw2xxa',
22
+ notificationsHeight: '--awsui-notifications-height-zw2xxa',
23
+ offsetTop: '--awsui-offset-top-zw2xxa',
24
+ offsetTopWithNotifications: '--awsui-offset-top-with-notifications-zw2xxa',
25
+ overlapHeight: '--awsui-overlap-height-zw2xxa',
26
+ navigationWidth: '--awsui-navigation-width-zw2xxa',
27
+ splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-zw2xxa',
28
+ splitPanelReportedSize: '--awsui-split-panel-reported-size-zw2xxa',
29
+ splitPanelHeight: '--awsui-split-panel-height-zw2xxa',
30
+ splitPanelMinWidth: '--awsui-split-panel-min-width-zw2xxa',
31
+ splitPanelMaxWidth: '--awsui-split-panel-max-width-zw2xxa',
32
+ toolsMaxWidth: '--awsui-tools-max-width-zw2xxa',
33
+ toolsWidth: '--awsui-tools-width-zw2xxa',
34
+ toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-zw2xxa',
35
+ contentScrollMargin: '--awsui-content-scroll-margin-zw2xxa',
36
+ flashbarStackDepth: '--awsui-flashbar-stack-depth-zw2xxa',
37
+ flashbarStackIndex: '--awsui-flashbar-stack-index-zw2xxa',
38
+ flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-zw2xxa',
39
+ stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-zw2xxa',
40
+ stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-zw2xxa',
41
41
  };
42
42
  export default customCSSPropertiesMap;
43
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,iBAAiB,EAAE,oCAAoC;IACvD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;CACtG,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n activeDrawerWidth: '--awsui-active-drawer-width-8nglyc',\n breadcrumbsGap: '--awsui-breadcrumbs-gap-8nglyc',\n contentGapLeft: '--awsui-content-gap-left-8nglyc',\n contentGapRight: '--awsui-content-gap-right-8nglyc',\n contentHeight: '--awsui-content-height-8nglyc',\n containerFirstGap: '--awsui-container-first-gap-8nglyc',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-8nglyc',\n defaultMaxContentWidth: '--awsui-default-max-content-width-8nglyc',\n defaultMinContentWidth: '--awsui-default-min-content-width-8nglyc',\n footerHeight: '--awsui-footer-height-8nglyc',\n headerGap: '--awsui-header-gap-8nglyc',\n headerHeight: '--awsui-header-height-8nglyc',\n layoutWidth: '--awsui-layout-width-8nglyc',\n mainGap: '--awsui-main-gap-8nglyc',\n mainOffsetLeft: '--awsui-main-offset-left-8nglyc',\n mainTemplateRows: '--awsui-main-template-rows-8nglyc',\n maxContentWidth: '--awsui-max-content-width-8nglyc',\n minContentWidth: '--awsui-min-content-width-8nglyc',\n mobileBarHeight: '--awsui-mobile-bar-height-8nglyc',\n notificationsGap: '--awsui-notifications-gap-8nglyc',\n notificationsHeight: '--awsui-notifications-height-8nglyc',\n offsetTop: '--awsui-offset-top-8nglyc',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-8nglyc',\n overlapHeight: '--awsui-overlap-height-8nglyc',\n navigationWidth: '--awsui-navigation-width-8nglyc',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-8nglyc',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-8nglyc',\n splitPanelHeight: '--awsui-split-panel-height-8nglyc',\n splitPanelMinWidth: '--awsui-split-panel-min-width-8nglyc',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-8nglyc',\n toolsMaxWidth: '--awsui-tools-max-width-8nglyc',\n toolsWidth: '--awsui-tools-width-8nglyc',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-8nglyc',\n contentScrollMargin: '--awsui-content-scroll-margin-8nglyc',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-8nglyc',\n flashbarStackIndex: '--awsui-flashbar-stack-index-8nglyc',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-8nglyc',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-8nglyc',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-8nglyc',\n};\nexport default customCSSPropertiesMap;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;CACtG,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n breadcrumbsGap: '--awsui-breadcrumbs-gap-zw2xxa',\n contentGapLeft: '--awsui-content-gap-left-zw2xxa',\n contentGapRight: '--awsui-content-gap-right-zw2xxa',\n contentHeight: '--awsui-content-height-zw2xxa',\n containerFirstGap: '--awsui-container-first-gap-zw2xxa',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-zw2xxa',\n defaultMaxContentWidth: '--awsui-default-max-content-width-zw2xxa',\n defaultMinContentWidth: '--awsui-default-min-content-width-zw2xxa',\n drawerSize: '--awsui-drawer-size-zw2xxa',\n footerHeight: '--awsui-footer-height-zw2xxa',\n headerGap: '--awsui-header-gap-zw2xxa',\n headerHeight: '--awsui-header-height-zw2xxa',\n layoutWidth: '--awsui-layout-width-zw2xxa',\n mainGap: '--awsui-main-gap-zw2xxa',\n mainOffsetLeft: '--awsui-main-offset-left-zw2xxa',\n mainTemplateRows: '--awsui-main-template-rows-zw2xxa',\n maxContentWidth: '--awsui-max-content-width-zw2xxa',\n minContentWidth: '--awsui-min-content-width-zw2xxa',\n mobileBarHeight: '--awsui-mobile-bar-height-zw2xxa',\n notificationsGap: '--awsui-notifications-gap-zw2xxa',\n notificationsHeight: '--awsui-notifications-height-zw2xxa',\n offsetTop: '--awsui-offset-top-zw2xxa',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-zw2xxa',\n overlapHeight: '--awsui-overlap-height-zw2xxa',\n navigationWidth: '--awsui-navigation-width-zw2xxa',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-zw2xxa',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-zw2xxa',\n splitPanelHeight: '--awsui-split-panel-height-zw2xxa',\n splitPanelMinWidth: '--awsui-split-panel-min-width-zw2xxa',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-zw2xxa',\n toolsMaxWidth: '--awsui-tools-max-width-zw2xxa',\n toolsWidth: '--awsui-tools-width-zw2xxa',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-zw2xxa',\n contentScrollMargin: '--awsui-content-scroll-margin-zw2xxa',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-zw2xxa',\n flashbarStackIndex: '--awsui-flashbar-stack-index-zw2xxa',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-zw2xxa',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-zw2xxa',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-zw2xxa',\n};\nexport default customCSSPropertiesMap;\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "f9029ce3e6cc9c6b859b2cbbece2c21c3bd1e4d1"
2
+ "commit": "5c24b8b548a58eccbdbcc60459660de166edadca"
3
3
  }
@@ -1,6 +1,11 @@
1
1
  import { DrawerItem } from '../../app-layout/drawer/interfaces';
2
+ import { IconProps } from '../../icon/interfaces';
2
3
  export type DrawerConfig = Omit<DrawerItem, 'content'> & {
3
4
  orderPriority?: number;
5
+ trigger: {
6
+ iconName?: IconProps.Name;
7
+ iconSvg?: string;
8
+ };
4
9
  mountContent: (container: HTMLElement) => void;
5
10
  unmountContent: (container: HTMLElement) => void;
6
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drawers-controller.d.ts","sourceRoot":"lib/default/","sources":["internal/plugins/drawers-controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,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2B,gBAS1D;IAEF,sBAAsB,aAEpB;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"drawers-controller.js","sourceRoot":"lib/default/","sources":["internal/plugins/drawers-controller.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,iBAAiB;IAA9B;QACU,YAAO,GAAwB,EAAE,CAAC;QAClC,gCAA2B,GAAuC,IAAI,CAAC;QACvE,kBAAa,GAAyC,IAAI,CAAC;QAWnE,mBAAc,GAAG,CAAC,MAAoB,EAAE,EAAE;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC;QAEF,wBAAmB,GAAG,CAAC,QAAqC,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,2BAA2B,KAAK,IAAI,EAAE;gBAC7C,OAAO,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;aAClF;YACD,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CAAC;YAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;YAC1C,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,2BAAsB,GAAG,GAAG,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC;IA5BS,cAAc;QACpB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAClC;QACD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;;YACnC,MAAA,IAAI,CAAC,2BAA2B,qDAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;CAqBF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DrawerItem } from '../../app-layout/drawer/interfaces';\n\nexport type DrawerConfig = Omit<DrawerItem, 'content'> & {\n orderPriority?: number;\n mountContent: (container: HTMLElement) => void;\n unmountContent: (container: HTMLElement) => void;\n};\nexport type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private updateTimeout: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleUpdate() {\n if (this.updateTimeout) {\n clearTimeout(this.updateTimeout);\n }\n this.updateTimeout = setTimeout(() => {\n this.drawersRegistrationListener?.(this.drawers);\n });\n }\n\n registerDrawer = (config: DrawerConfig) => {\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n console.warn('[AwsUi] [runtime plugins] multiple app layout instances detected');\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n}\n"]}
1
+ {"version":3,"file":"drawers-controller.js","sourceRoot":"lib/default/","sources":["internal/plugins/drawers-controller.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,iBAAiB;IAA9B;QACU,YAAO,GAAwB,EAAE,CAAC;QAClC,gCAA2B,GAAuC,IAAI,CAAC;QACvE,kBAAa,GAAyC,IAAI,CAAC;QAWnE,mBAAc,GAAG,CAAC,MAAoB,EAAE,EAAE;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC;QAEF,wBAAmB,GAAG,CAAC,QAAqC,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,2BAA2B,KAAK,IAAI,EAAE;gBAC7C,OAAO,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;aAClF;YACD,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CAAC;YAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;YAC1C,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,2BAAsB,GAAG,GAAG,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC;IA5BS,cAAc;QACpB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAClC;QACD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;;YACnC,MAAA,IAAI,CAAC,2BAA2B,qDAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;CAqBF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DrawerItem } from '../../app-layout/drawer/interfaces';\nimport { IconProps } from '../../icon/interfaces';\n\nexport type DrawerConfig = Omit<DrawerItem, 'content'> & {\n orderPriority?: number;\n trigger: {\n iconName?: IconProps.Name;\n iconSvg?: string;\n };\n mountContent: (container: HTMLElement) => void;\n unmountContent: (container: HTMLElement) => void;\n};\nexport type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private updateTimeout: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleUpdate() {\n if (this.updateTimeout) {\n clearTimeout(this.updateTimeout);\n }\n this.updateTimeout = setTimeout(() => {\n this.drawersRegistrationListener?.(this.drawers);\n });\n }\n\n registerDrawer = (config: DrawerConfig) => {\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n console.warn('[AwsUi] [runtime plugins] multiple app layout instances detected');\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"data-series.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAG9F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAK3F,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAEhB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAElB,iBAAiB,EAAE,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAChE,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAE3B,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,cAAc,EAAE,EAC3D,IAAI,EACJ,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,MAAM,GACP,EAAE,eAAe,CAAC,CAAC,CAAC,eA8EpB"}
1
+ {"version":3,"file":"data-series.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAG9F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQ3F,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAEhB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAElB,iBAAiB,EAAE,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAChE,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAE3B,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,cAAc,EAAE,EAC3D,IAAI,EACJ,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,MAAM,GACP,EAAE,eAAe,CAAC,CAAC,CAAC,eAoFpB"}
@@ -7,8 +7,12 @@ import LineSeries from './line-series';
7
7
  import BarSeries from './bar-series';
8
8
  import styles from './styles.css.js';
9
9
  import { calculateOffsetMaps } from './utils';
10
+ // Should have the same value as the `border-line-chart-width` token.
11
+ const STROKE_WIDTH = 2;
10
12
  export default function DataSeries({ axis, plotHeight, plotWidth, highlightedGroupIndex, highlightedSeries, stackedBars, isGroupNavigation, visibleSeries, xScale, yScale, }) {
11
13
  const chartAreaClipPath = useUniqueId('awsui-mixed-line-bar-chart__chart-area-');
14
+ // Lines get a small extra space at the top and bottom to account for the strokes when they are at the edge of the graph.
15
+ const lineAreaClipPath = useUniqueId('awsui-line-chart__chart-area-');
12
16
  const stackedBarOffsetMaps = useMemo(() => {
13
17
  if (!stackedBars) {
14
18
  return [];
@@ -24,7 +28,9 @@ export default function DataSeries({ axis, plotHeight, plotWidth, highlightedGro
24
28
  return (React.createElement(React.Fragment, null,
25
29
  React.createElement("defs", { "aria-hidden": "true" },
26
30
  React.createElement("clipPath", { id: chartAreaClipPath },
27
- React.createElement("rect", { x: 0, y: 0, width: plotWidth, height: plotHeight }))),
31
+ React.createElement("rect", { x: 0, y: 0, width: plotWidth, height: plotHeight })),
32
+ React.createElement("clipPath", { id: lineAreaClipPath },
33
+ React.createElement("rect", { x: 0, y: -STROKE_WIDTH / 2, width: plotWidth, height: plotHeight + STROKE_WIDTH }))),
28
34
  React.createElement("g", { "aria-hidden": isGroupNavigation ? true : undefined, role: "group" }, visibleSeries.map(({ series, color }, index) => {
29
35
  const isHighlighted = series === highlightedSeries;
30
36
  const isDimmed = !!highlightedSeries && !isHighlighted;
@@ -35,7 +41,7 @@ export default function DataSeries({ axis, plotHeight, plotWidth, highlightedGro
35
41
  [styles['series--highlighted']]: isHighlighted,
36
42
  [styles['series--dimmed']]: isDimmed,
37
43
  }) },
38
- React.createElement(LineSeries, { axis: axis, series: series, color: color, xScale: xScale, yScale: yScale, chartAreaClipPath: chartAreaClipPath })));
44
+ React.createElement(LineSeries, { axis: axis, series: series, color: color, xScale: xScale, yScale: yScale, chartAreaClipPath: lineAreaClipPath })));
39
45
  }
40
46
  case 'bar':
41
47
  return (React.createElement(BarSeries, { key: index, axis: axis, series: series, color: color, totalSeriesCount: visibleSeries.filter(s => s.series.type === 'bar').length, seriesIndex: index, xScale: xScale, yScale: yScale, plotSize: axis === 'y' ? plotWidth : plotHeight, highlighted: isHighlighted, dimmed: isDimmed, chartAreaClipPath: chartAreaClipPath, stackedBarOffsets: stackedBarOffsetMaps[index], highlightedGroupIndex: highlightedGroupIndex }));
@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MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,MAAM,EAC3E,WAAW,EAAE,KAAK,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAC/C,WAAW,EAAE,aAAa,EAC1B,MAAM,EAAE,QAAQ,EAChB,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAC9C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC;aACL;QACH,CAAC,CAAC,CACA,CACH,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport LineSeries from './line-series';\nimport BarSeries from './bar-series';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { calculateOffsetMaps, StackedOffsets } from './utils';\n\nexport interface DataSeriesProps<T> {\n axis: 'x' | 'y';\n\n plotHeight: number;\n plotWidth: number;\n\n highlightedSeries: MixedLineBarChartProps.ChartSeries<T> | null;\n highlightedGroupIndex: number | null;\n\n stackedBars: boolean;\n isGroupNavigation: boolean;\n\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n xScale: ChartScale;\n yScale: NumericChartScale;\n}\n\nexport default function DataSeries<T extends ChartDataTypes>({\n axis,\n plotHeight,\n plotWidth,\n highlightedGroupIndex,\n highlightedSeries,\n stackedBars,\n isGroupNavigation,\n visibleSeries,\n xScale,\n yScale,\n}: DataSeriesProps<T>) {\n const chartAreaClipPath = useUniqueId('awsui-mixed-line-bar-chart__chart-area-');\n\n const stackedBarOffsetMaps: StackedOffsets[] = useMemo(() => {\n if (!stackedBars) {\n return [];\n }\n\n const barData: Array<readonly MixedLineBarChartProps.Datum<ChartDataTypes>[]> = [];\n visibleSeries.forEach(({ series }) => {\n if (series.type === 'bar') {\n barData.push(series.data);\n }\n });\n return calculateOffsetMaps(barData);\n }, [visibleSeries, stackedBars]);\n\n return (\n <>\n <defs aria-hidden=\"true\">\n <clipPath id={chartAreaClipPath}>\n <rect x={0} y={0} width={plotWidth} height={plotHeight} />\n </clipPath>\n </defs>\n <g aria-hidden={isGroupNavigation ? true : undefined} role=\"group\">\n {visibleSeries.map(({ series, color }, index) => {\n const isHighlighted = series === highlightedSeries;\n const isDimmed = !!highlightedSeries && !isHighlighted;\n\n switch (series.type) {\n case 'line':\n case 'threshold': {\n return (\n <g\n key={index}\n role=\"group\"\n aria-label={series.title}\n className={clsx(styles.series, styles[`series--${series.type}`], {\n [styles['series--highlighted']]: isHighlighted,\n [styles['series--dimmed']]: isDimmed,\n })}\n >\n <LineSeries\n axis={axis}\n series={series}\n color={color}\n xScale={xScale}\n yScale={yScale}\n chartAreaClipPath={chartAreaClipPath}\n />\n </g>\n );\n }\n\n case 'bar':\n return (\n <BarSeries\n key={index}\n axis={axis}\n series={series}\n color={color}\n totalSeriesCount={visibleSeries.filter(s => s.series.type === 'bar').length}\n seriesIndex={index}\n xScale={xScale}\n yScale={yScale}\n plotSize={axis === 'y' ? plotWidth : plotHeight}\n highlighted={isHighlighted}\n dimmed={isDimmed}\n chartAreaClipPath={chartAreaClipPath}\n stackedBarOffsets={stackedBarOffsetMaps[index]}\n highlightedGroupIndex={highlightedGroupIndex}\n />\n );\n }\n })}\n </g>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"data-series.js","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,O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AAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,MAAM,EAC3E,WAAW,EAAE,KAAK,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAC/C,WAAW,EAAE,aAAa,EAC1B,MAAM,EAAE,QAAQ,EAChB,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAC9C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC;aACL;QACH,CAAC,CAAC,CACA,CACH,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport LineSeries from './line-series';\nimport BarSeries from './bar-series';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { calculateOffsetMaps, StackedOffsets } from './utils';\n\n// Should have the same value as the `border-line-chart-width` token.\nconst STROKE_WIDTH = 2;\n\nexport interface DataSeriesProps<T> {\n axis: 'x' | 'y';\n\n plotHeight: number;\n plotWidth: number;\n\n highlightedSeries: MixedLineBarChartProps.ChartSeries<T> | null;\n highlightedGroupIndex: number | null;\n\n stackedBars: boolean;\n isGroupNavigation: boolean;\n\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n xScale: ChartScale;\n yScale: NumericChartScale;\n}\n\nexport default function DataSeries<T extends ChartDataTypes>({\n axis,\n plotHeight,\n plotWidth,\n highlightedGroupIndex,\n highlightedSeries,\n stackedBars,\n isGroupNavigation,\n visibleSeries,\n xScale,\n yScale,\n}: DataSeriesProps<T>) {\n const chartAreaClipPath = useUniqueId('awsui-mixed-line-bar-chart__chart-area-');\n\n // Lines get a small extra space at the top and bottom to account for the strokes when they are at the edge of the graph.\n const lineAreaClipPath = useUniqueId('awsui-line-chart__chart-area-');\n\n const stackedBarOffsetMaps: StackedOffsets[] = useMemo(() => {\n if (!stackedBars) {\n return [];\n }\n\n const barData: Array<readonly MixedLineBarChartProps.Datum<ChartDataTypes>[]> = [];\n visibleSeries.forEach(({ series }) => {\n if (series.type === 'bar') {\n barData.push(series.data);\n }\n });\n return calculateOffsetMaps(barData);\n }, [visibleSeries, stackedBars]);\n\n return (\n <>\n <defs aria-hidden=\"true\">\n <clipPath id={chartAreaClipPath}>\n <rect x={0} y={0} width={plotWidth} height={plotHeight} />\n </clipPath>\n <clipPath id={lineAreaClipPath}>\n <rect x={0} y={-STROKE_WIDTH / 2} width={plotWidth} height={plotHeight + STROKE_WIDTH} />\n </clipPath>\n </defs>\n <g aria-hidden={isGroupNavigation ? true : undefined} role=\"group\">\n {visibleSeries.map(({ series, color }, index) => {\n const isHighlighted = series === highlightedSeries;\n const isDimmed = !!highlightedSeries && !isHighlighted;\n\n switch (series.type) {\n case 'line':\n case 'threshold': {\n return (\n <g\n key={index}\n role=\"group\"\n aria-label={series.title}\n className={clsx(styles.series, styles[`series--${series.type}`], {\n [styles['series--highlighted']]: isHighlighted,\n [styles['series--dimmed']]: isDimmed,\n })}\n >\n <LineSeries\n axis={axis}\n series={series}\n color={color}\n xScale={xScale}\n yScale={yScale}\n chartAreaClipPath={lineAreaClipPath}\n />\n </g>\n );\n }\n\n case 'bar':\n return (\n <BarSeries\n key={index}\n axis={axis}\n series={series}\n color={color}\n totalSeriesCount={visibleSeries.filter(s => s.series.type === 'bar').length}\n seriesIndex={index}\n xScale={xScale}\n yScale={yScale}\n plotSize={axis === 'y' ? plotWidth : plotHeight}\n highlighted={isHighlighted}\n dimmed={isDimmed}\n chartAreaClipPath={chartAreaClipPath}\n stackedBarOffsets={stackedBarOffsetMaps[index]}\n highlightedGroupIndex={highlightedGroupIndex}\n />\n );\n }\n })}\n </g>\n </>\n );\n}\n"]}
package/package.json CHANGED
@@ -136,7 +136,7 @@
136
136
  "./internal/base-component/index.js",
137
137
  "./internal/base-component/styles.css.js"
138
138
  ],
139
- "version": "3.0.318",
139
+ "version": "3.0.320",
140
140
  "repository": {
141
141
  "type": "git",
142
142
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["split-panel/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AAkBjE,OAAO,EAAE,eAAe,EAAE,CAAC;AAK3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,qBAA6B,EAC7B,aAA0B,EAC1B,WAAW,EACX,GAAG,SAAS,EACb,EAAE,eAAe,eAqRjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["split-panel/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAK3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,qBAA6B,EAC7B,aAA0B,EAC1B,WAAW,EACX,GAAG,SAAS,EACb,EAAE,eAAe,eAqRjB"}
@@ -9,8 +9,8 @@ import { useSplitPanelContext } from '../internal/context/split-panel-context';
9
9
  import { applyDisplayName } from '../internal/utils/apply-display-name';
10
10
  import ResizeHandler from './icons/resize-handler';
11
11
  import PreferencesModal from './preferences-modal';
12
- import { usePointerEvents } from './utils/use-pointer-events';
13
- import { useKeyboardEvents } from './utils/use-keyboard-events';
12
+ import { usePointerEvents } from '../app-layout/utils/use-pointer-events';
13
+ import { useKeyboardEvents } from '../app-layout/utils/use-keyboard-events';
14
14
  import styles from './styles.css.js';
15
15
  import useBaseComponent from '../internal/hooks/use-base-component';
16
16
  import { useMergeRefs } from '../internal/hooks/use-merge-refs';
@@ -76,7 +76,7 @@ export default function SplitPanel(_a) {
76
76
  const splitPanelRefObject = useRef(null);
77
77
  const sizeControlProps = {
78
78
  position,
79
- splitPanelRef: splitPanelRefObject,
79
+ panelRef: splitPanelRefObject,
80
80
  handleRef: refs.slider,
81
81
  setSidePanelWidth,
82
82
  setBottomPanelHeight,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["split-panel/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe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AC5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,8BAA8B,CAC5C;gBACD,cAAc,EAAE,IAAI,CAAC,uCAAuC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,CAAC;gBACrG,YAAY,EAAE,IAAI,CAAC,qCAAqC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,CAAC;aAChG,EACD,SAAS,EAAE,WAAW,CAAC,EAAE;gBACvB,mBAAmB,mBAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CACU,CACd,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\n\nimport { SplitPanelProps, SizeControlProps } from './interfaces';\nimport ResizeHandler from './icons/resize-handler';\nimport PreferencesModal from './preferences-modal';\nimport { usePointerEvents } from './utils/use-pointer-events';\nimport { useKeyboardEvents } from './utils/use-keyboard-events';\n\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { getLimitedValue } from './utils/size-utils';\nimport { Transition } from '../internal/components/transition';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { SplitPanelContentSide } from './side';\nimport { SplitPanelContentBottom } from './bottom';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const isRefresh = useVisualRefresh();\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setSplitPanelToggle,\n refs,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('split-panel');\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n const [relativeSize, setRelativeSize] = useState(0);\n const [maxSize, setMaxSize] = useState(size);\n const minSize = position === 'bottom' ? MIN_HEIGHT : MIN_WIDTH;\n const cappedSize = getLimitedValue(minSize, size, maxSize);\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel);\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n useEffect(() => {\n // effects are called inside out in the components tree\n // wait one frame to allow app-layout to complete its calculations\n const handle = requestAnimationFrame(() => {\n const maxSize = position === 'bottom' ? getMaxHeight() : getMaxWidth();\n setRelativeSize(((size - minSize) / (maxSize - minSize)) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, minSize, position, getMaxHeight, getMaxWidth]);\n\n useEffect(() => {\n reportSize(cappedSize);\n }, [reportSize, cappedSize]);\n\n useEffect(() => {\n const handler = () => setMaxSize(position === 'bottom' ? getMaxHeight() : getMaxWidth());\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [position, getMaxWidth, getMaxHeight]);\n\n const setSidePanelWidth = (width: number) => {\n const maxWidth = getMaxWidth();\n const size = getLimitedValue(MIN_WIDTH, width, maxWidth);\n\n if (isOpen && maxWidth >= MIN_WIDTH) {\n onResize({ size });\n }\n };\n\n const setBottomPanelHeight = (height: number) => {\n const maxHeight = getMaxHeight();\n const size = getLimitedValue(MIN_HEIGHT, height, maxHeight);\n\n if (isOpen && maxHeight >= MIN_HEIGHT) {\n onResize({ size });\n }\n };\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n splitPanelRef: splitPanelRefObject,\n handleRef: refs.slider,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const wrappedChildren = (\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop: topOffset,\n stickyOffsetBottom: bottomOffset,\n }}\n >\n {children}\n </AppLayoutContext.Provider>\n );\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={styles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle)}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel)}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' ? null : (\n <InternalButton\n className={styles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <div\n ref={refs.slider}\n role=\"slider\"\n tabIndex={0}\n aria-label={i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel)}\n aria-valuemax={100}\n aria-valuemin={0}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n aria-valuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n className={clsx(styles.slider, styles[`slider-${position}`])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles[`slider-icon-${position}`])} />\n </div>\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = __internalRootRef.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n openButtonAriaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n >\n {wrappedChildren}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n state={state}\n transitioningElementRef={transitioningElementRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n >\n {wrappedChildren}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n confirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n cancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n positionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n positionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n positionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings?.preferencesPositionBottom),\n positionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n )}\n </Transition>\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["split-panel/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,e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AmB,mBAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CACU,CACd,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\n\nimport { SplitPanelProps } from './interfaces';\nimport ResizeHandler from './icons/resize-handler';\nimport PreferencesModal from './preferences-modal';\nimport { usePointerEvents } from '../app-layout/utils/use-pointer-events';\nimport { useKeyboardEvents } from '../app-layout/utils/use-keyboard-events';\nimport { SizeControlProps } from '../app-layout/utils/interfaces';\n\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { getLimitedValue } from './utils/size-utils';\nimport { Transition } from '../internal/components/transition';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { SplitPanelContentSide } from './side';\nimport { SplitPanelContentBottom } from './bottom';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const isRefresh = useVisualRefresh();\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setSplitPanelToggle,\n refs,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('split-panel');\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n const [relativeSize, setRelativeSize] = useState(0);\n const [maxSize, setMaxSize] = useState(size);\n const minSize = position === 'bottom' ? MIN_HEIGHT : MIN_WIDTH;\n const cappedSize = getLimitedValue(minSize, size, maxSize);\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel);\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n useEffect(() => {\n // effects are called inside out in the components tree\n // wait one frame to allow app-layout to complete its calculations\n const handle = requestAnimationFrame(() => {\n const maxSize = position === 'bottom' ? getMaxHeight() : getMaxWidth();\n setRelativeSize(((size - minSize) / (maxSize - minSize)) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, minSize, position, getMaxHeight, getMaxWidth]);\n\n useEffect(() => {\n reportSize(cappedSize);\n }, [reportSize, cappedSize]);\n\n useEffect(() => {\n const handler = () => setMaxSize(position === 'bottom' ? getMaxHeight() : getMaxWidth());\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [position, getMaxWidth, getMaxHeight]);\n\n const setSidePanelWidth = (width: number) => {\n const maxWidth = getMaxWidth();\n const size = getLimitedValue(MIN_WIDTH, width, maxWidth);\n\n if (isOpen && maxWidth >= MIN_WIDTH) {\n onResize({ size });\n }\n };\n\n const setBottomPanelHeight = (height: number) => {\n const maxHeight = getMaxHeight();\n const size = getLimitedValue(MIN_HEIGHT, height, maxHeight);\n\n if (isOpen && maxHeight >= MIN_HEIGHT) {\n onResize({ size });\n }\n };\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n panelRef: splitPanelRefObject,\n handleRef: refs.slider,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const wrappedChildren = (\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop: topOffset,\n stickyOffsetBottom: bottomOffset,\n }}\n >\n {children}\n </AppLayoutContext.Provider>\n );\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={styles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle)}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel)}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' ? null : (\n <InternalButton\n className={styles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <div\n ref={refs.slider}\n role=\"slider\"\n tabIndex={0}\n aria-label={i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel)}\n aria-valuemax={100}\n aria-valuemin={0}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n aria-valuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n className={clsx(styles.slider, styles[`slider-${position}`])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles[`slider-icon-${position}`])} />\n </div>\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = __internalRootRef.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n openButtonAriaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n >\n {wrappedChildren}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n state={state}\n transitioningElementRef={transitioningElementRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n >\n {wrappedChildren}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n confirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n cancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n positionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n positionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n positionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings?.preferencesPositionBottom),\n positionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n )}\n </Transition>\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
@@ -44,13 +44,6 @@ export declare namespace SplitPanelProps {
44
44
  resizeHandleAriaLabel?: string;
45
45
  }
46
46
  }
47
- export interface SizeControlProps {
48
- position: 'side' | 'bottom';
49
- splitPanelRef?: React.RefObject<HTMLDivElement>;
50
- handleRef?: React.RefObject<HTMLDivElement>;
51
- setSidePanelWidth: (width: number) => void;
52
- setBottomPanelHeight: (height: number) => void;
53
- }
54
47
  export interface SplitPanelContentProps {
55
48
  baseProps: BaseComponentProps;
56
49
  isOpen?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC;CAC3C;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,WAAW;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAChD,SA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MAAM,CAAC;QAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n }\n}\n\nexport interface SizeControlProps {\n position: 'side' | 'bottom';\n splitPanelRef?: React.RefObject<HTMLDivElement>;\n handleRef?: React.RefObject<HTMLDivElement>;\n setSidePanelWidth: (width: number) => void;\n setBottomPanelHeight: (height: number) => void;\n}\n\nexport interface SplitPanelContentProps {\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n cappedSize: number;\n panelHeaderId: string;\n resizeHandle: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onToggle: () => void;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n }\n}\n\nexport interface SplitPanelContentProps {\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n cappedSize: number;\n panelHeaderId: string;\n resizeHandle: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onToggle: () => void;\n}\n"]}