@cloudscape-design/components-themeable 3.0.327 → 3.0.329

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 (215) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/styles.scss +26 -0
  3. package/lib/internal/scss/app-layout/visual-refresh/drawers.scss +17 -13
  4. package/lib/internal/scss/expandable-section/styles.scss +14 -9
  5. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +39 -39
  6. package/lib/internal/scss/split-panel/styles.scss +0 -18
  7. package/lib/internal/scss/table/sticky-scrollbar/styles.scss +26 -0
  8. package/lib/internal/scss/table/styles.scss +0 -22
  9. package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
  10. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +30 -30
  11. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
  12. package/lib/internal/template/app-layout/drawer/interfaces.d.ts +0 -7
  13. package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
  14. package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
  15. package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  16. package/lib/internal/template/app-layout/drawer/resizable-drawer.js +3 -3
  17. package/lib/internal/template/app-layout/drawer/resizable-drawer.js.map +1 -1
  18. package/lib/internal/template/app-layout/index.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout/index.js +19 -2
  20. package/lib/internal/template/app-layout/index.js.map +1 -1
  21. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  22. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  23. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  24. package/lib/internal/template/app-layout/runtime-api.d.ts +8 -0
  25. package/lib/internal/template/app-layout/runtime-api.d.ts.map +1 -0
  26. package/lib/internal/template/app-layout/runtime-api.js +35 -0
  27. package/lib/internal/template/app-layout/runtime-api.js.map +1 -0
  28. package/lib/internal/template/app-layout/styles.css.js +17 -13
  29. package/lib/internal/template/app-layout/styles.scoped.css +44 -13
  30. package/lib/internal/template/app-layout/styles.selectors.js +17 -13
  31. package/lib/internal/template/app-layout/utils/interfaces.d.ts +10 -0
  32. package/lib/internal/template/app-layout/utils/interfaces.d.ts.map +1 -0
  33. package/lib/internal/template/app-layout/utils/interfaces.js +2 -0
  34. package/lib/internal/template/app-layout/utils/interfaces.js.map +1 -0
  35. package/lib/internal/template/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -1
  36. package/lib/internal/template/app-layout/utils/use-drawer-focus-control.js +8 -3
  37. package/lib/internal/template/app-layout/utils/use-drawer-focus-control.js.map +1 -1
  38. package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts +4 -0
  39. package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts.map +1 -0
  40. package/lib/internal/template/{split-panel → app-layout}/utils/use-keyboard-events.js +10 -11
  41. package/lib/internal/template/app-layout/utils/use-keyboard-events.js.map +1 -0
  42. package/lib/internal/template/app-layout/utils/use-pointer-events.d.ts +3 -0
  43. package/lib/internal/template/app-layout/utils/use-pointer-events.d.ts.map +1 -0
  44. package/lib/internal/template/{split-panel → app-layout}/utils/use-pointer-events.js +15 -8
  45. package/lib/internal/template/app-layout/utils/use-pointer-events.js.map +1 -0
  46. package/lib/internal/template/app-layout/utils/use-resize.d.ts +16 -0
  47. package/lib/internal/template/app-layout/utils/use-resize.d.ts.map +1 -0
  48. package/lib/internal/template/app-layout/utils/use-resize.js +84 -0
  49. package/lib/internal/template/app-layout/utils/use-resize.js.map +1 -0
  50. package/lib/internal/template/app-layout/visual-refresh/context.d.ts +11 -6
  51. package/lib/internal/template/app-layout/visual-refresh/context.d.ts.map +1 -1
  52. package/lib/internal/template/app-layout/visual-refresh/context.js +26 -7
  53. package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
  54. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts +1 -33
  55. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  56. package/lib/internal/template/app-layout/visual-refresh/drawers.js +14 -7
  57. package/lib/internal/template/app-layout/visual-refresh/drawers.js.map +1 -1
  58. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +69 -68
  59. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +294 -298
  60. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +69 -68
  61. package/lib/internal/template/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
  62. package/lib/internal/template/app-layout/visual-refresh/trigger-button.js +1 -2
  63. package/lib/internal/template/app-layout/visual-refresh/trigger-button.js.map +1 -1
  64. package/lib/internal/template/area-chart/{model/async-store.d.ts → async-store/index.d.ts} +1 -1
  65. package/lib/internal/template/area-chart/async-store/index.d.ts.map +1 -0
  66. package/lib/internal/template/area-chart/{model/async-store.js → async-store/index.js} +1 -1
  67. package/lib/internal/template/area-chart/async-store/index.js.map +1 -0
  68. package/lib/internal/template/area-chart/elements/area-chart-legend.d.ts.map +1 -1
  69. package/lib/internal/template/area-chart/elements/area-chart-legend.js +1 -1
  70. package/lib/internal/template/area-chart/elements/area-chart-legend.js.map +1 -1
  71. package/lib/internal/template/area-chart/elements/data-series.js +1 -1
  72. package/lib/internal/template/area-chart/elements/data-series.js.map +1 -1
  73. package/lib/internal/template/area-chart/elements/highlighted-point.js +1 -1
  74. package/lib/internal/template/area-chart/elements/highlighted-point.js.map +1 -1
  75. package/lib/internal/template/area-chart/elements/use-highlight-details.d.ts.map +1 -1
  76. package/lib/internal/template/area-chart/elements/use-highlight-details.js +3 -1
  77. package/lib/internal/template/area-chart/elements/use-highlight-details.js.map +1 -1
  78. package/lib/internal/template/area-chart/elements/vertical-marker.js +1 -1
  79. package/lib/internal/template/area-chart/elements/vertical-marker.js.map +1 -1
  80. package/lib/internal/template/area-chart/model/index.d.ts +1 -1
  81. package/lib/internal/template/area-chart/model/index.d.ts.map +1 -1
  82. package/lib/internal/template/area-chart/model/index.js.map +1 -1
  83. package/lib/internal/template/area-chart/model/interactions-store.d.ts +1 -1
  84. package/lib/internal/template/area-chart/model/interactions-store.d.ts.map +1 -1
  85. package/lib/internal/template/area-chart/model/interactions-store.js +1 -1
  86. package/lib/internal/template/area-chart/model/interactions-store.js.map +1 -1
  87. package/lib/internal/template/area-chart/model/use-chart-model.d.ts.map +1 -1
  88. package/lib/internal/template/area-chart/model/use-chart-model.js +1 -1
  89. package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
  90. package/lib/internal/template/attribute-editor/interfaces.d.ts +1 -1
  91. package/lib/internal/template/attribute-editor/interfaces.d.ts.map +1 -1
  92. package/lib/internal/template/attribute-editor/interfaces.js.map +1 -1
  93. package/lib/internal/template/content-layout/styles.css.js +7 -7
  94. package/lib/internal/template/content-layout/styles.scoped.css +13 -13
  95. package/lib/internal/template/content-layout/styles.selectors.js +7 -7
  96. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  97. package/lib/internal/template/expandable-section/expandable-section-header.js +10 -10
  98. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  99. package/lib/internal/template/expandable-section/interfaces.d.ts +1 -1
  100. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  101. package/lib/internal/template/expandable-section/styles.css.js +31 -29
  102. package/lib/internal/template/expandable-section/styles.scoped.css +56 -51
  103. package/lib/internal/template/expandable-section/styles.selectors.js +31 -29
  104. package/lib/internal/template/expandable-section/utils.js +1 -1
  105. package/lib/internal/template/expandable-section/utils.js.map +1 -1
  106. package/lib/internal/template/flashbar/styles.css.js +45 -45
  107. package/lib/internal/template/flashbar/styles.scoped.css +169 -169
  108. package/lib/internal/template/flashbar/styles.selectors.js +45 -45
  109. package/lib/internal/template/internal/environment.js +1 -1
  110. package/lib/internal/template/internal/generated/custom-css-properties/index.js +39 -39
  111. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  112. package/lib/internal/template/internal/plugins/api.d.ts +15 -0
  113. package/lib/internal/template/internal/plugins/api.d.ts.map +1 -0
  114. package/lib/internal/template/internal/plugins/api.js +50 -0
  115. package/lib/internal/template/internal/plugins/api.js.map +1 -0
  116. package/lib/internal/template/internal/plugins/drawers-controller.d.ts +22 -0
  117. package/lib/internal/template/internal/plugins/drawers-controller.d.ts.map +1 -0
  118. package/lib/internal/template/internal/plugins/drawers-controller.js +34 -0
  119. package/lib/internal/template/internal/plugins/drawers-controller.js.map +1 -0
  120. package/lib/internal/template/internal/plugins/index.d.ts +2 -0
  121. package/lib/internal/template/internal/plugins/index.d.ts.map +1 -0
  122. package/lib/internal/template/internal/plugins/index.js +4 -0
  123. package/lib/internal/template/internal/plugins/index.js.map +1 -0
  124. package/lib/internal/template/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  125. package/lib/internal/template/mixed-line-bar-chart/data-series.js +8 -2
  126. package/lib/internal/template/mixed-line-bar-chart/data-series.js.map +1 -1
  127. package/lib/internal/template/split-panel/index.d.ts.map +1 -1
  128. package/lib/internal/template/split-panel/index.js +3 -3
  129. package/lib/internal/template/split-panel/index.js.map +1 -1
  130. package/lib/internal/template/split-panel/interfaces.d.ts +0 -7
  131. package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
  132. package/lib/internal/template/split-panel/interfaces.js.map +1 -1
  133. package/lib/internal/template/split-panel/styles.css.js +56 -59
  134. package/lib/internal/template/split-panel/styles.scoped.css +77 -93
  135. package/lib/internal/template/split-panel/styles.selectors.js +56 -59
  136. package/lib/internal/template/table/body-cell/td-element.d.ts +2 -2
  137. package/lib/internal/template/table/body-cell/td-element.d.ts.map +1 -1
  138. package/lib/internal/template/table/body-cell/td-element.js +2 -2
  139. package/lib/internal/template/table/body-cell/td-element.js.map +1 -1
  140. package/lib/internal/template/table/column-widths-utils.d.ts +3 -0
  141. package/lib/internal/template/table/column-widths-utils.d.ts.map +1 -0
  142. package/lib/internal/template/table/column-widths-utils.js +16 -0
  143. package/lib/internal/template/table/column-widths-utils.js.map +1 -0
  144. package/lib/internal/template/table/header-cell/index.d.ts +3 -3
  145. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  146. package/lib/internal/template/table/header-cell/index.js +2 -2
  147. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  148. package/lib/internal/template/table/internal.d.ts.map +1 -1
  149. package/lib/internal/template/table/internal.js +15 -10
  150. package/lib/internal/template/table/internal.js.map +1 -1
  151. package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
  152. package/lib/internal/template/table/resizer/index.js +2 -2
  153. package/lib/internal/template/table/resizer/index.js.map +1 -1
  154. package/lib/internal/template/table/sticky-columns/index.d.ts +2 -0
  155. package/lib/internal/template/table/sticky-columns/index.d.ts.map +1 -0
  156. package/lib/internal/template/table/sticky-columns/index.js +4 -0
  157. package/lib/internal/template/table/sticky-columns/index.js.map +1 -0
  158. package/lib/internal/template/table/{use-sticky-columns.d.ts → sticky-columns/use-sticky-columns.d.ts} +7 -9
  159. package/lib/internal/template/table/sticky-columns/use-sticky-columns.d.ts.map +1 -0
  160. package/lib/internal/template/table/{use-sticky-columns.js → sticky-columns/use-sticky-columns.js} +3 -4
  161. package/lib/internal/template/table/sticky-columns/use-sticky-columns.js.map +1 -0
  162. package/lib/internal/template/table/sticky-scrollbar/index.d.ts +2 -0
  163. package/lib/internal/template/table/sticky-scrollbar/index.d.ts.map +1 -0
  164. package/lib/internal/template/table/sticky-scrollbar/index.js +4 -0
  165. package/lib/internal/template/table/sticky-scrollbar/index.js.map +1 -0
  166. package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
  167. package/lib/internal/template/table/{sticky-scrollbar.js → sticky-scrollbar/sticky-scrollbar.js} +2 -2
  168. package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
  169. package/lib/internal/template/table/sticky-scrollbar/styles.css.js +9 -0
  170. package/lib/internal/template/table/sticky-scrollbar/styles.scoped.css +22 -0
  171. package/lib/internal/template/table/sticky-scrollbar/styles.selectors.js +10 -0
  172. package/lib/internal/template/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
  173. package/lib/internal/template/table/{use-sticky-scrollbar.js → sticky-scrollbar/use-sticky-scrollbar.js} +3 -3
  174. package/lib/internal/template/table/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
  175. package/lib/internal/template/table/styles.css.js +32 -36
  176. package/lib/internal/template/table/styles.scoped.css +40 -59
  177. package/lib/internal/template/table/styles.selectors.js +32 -36
  178. package/lib/internal/template/table/thead.d.ts +2 -1
  179. package/lib/internal/template/table/thead.d.ts.map +1 -1
  180. package/lib/internal/template/table/thead.js +4 -4
  181. package/lib/internal/template/table/thead.js.map +1 -1
  182. package/lib/internal/template/table/use-column-widths.d.ts +10 -8
  183. package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
  184. package/lib/internal/template/table/use-column-widths.js +30 -47
  185. package/lib/internal/template/table/use-column-widths.js.map +1 -1
  186. package/lib/internal/template/table/utils.d.ts +1 -1
  187. package/lib/internal/template/table/utils.d.ts.map +1 -1
  188. package/lib/internal/template/table/utils.js.map +1 -1
  189. package/lib/internal/template/test-utils/dom/app-layout/index.d.ts +1 -1
  190. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  191. package/lib/internal/template/wizard/styles.css.js +31 -31
  192. package/lib/internal/template/wizard/styles.scoped.css +63 -63
  193. package/lib/internal/template/wizard/styles.selectors.js +31 -31
  194. package/lib/internal/template-tokens/package.json +9 -0
  195. package/lib/theming.d.ts +9 -0
  196. package/lib/theming.d.ts.map +1 -0
  197. package/lib/theming.js +26 -0
  198. package/lib/theming.js.map +1 -0
  199. package/package.json +1 -1
  200. package/lib/internal/template/area-chart/model/async-store.d.ts.map +0 -1
  201. package/lib/internal/template/area-chart/model/async-store.js.map +0 -1
  202. package/lib/internal/template/split-panel/utils/use-keyboard-events.d.ts +0 -4
  203. package/lib/internal/template/split-panel/utils/use-keyboard-events.d.ts.map +0 -1
  204. package/lib/internal/template/split-panel/utils/use-keyboard-events.js.map +0 -1
  205. package/lib/internal/template/split-panel/utils/use-pointer-events.d.ts +0 -3
  206. package/lib/internal/template/split-panel/utils/use-pointer-events.d.ts.map +0 -1
  207. package/lib/internal/template/split-panel/utils/use-pointer-events.js.map +0 -1
  208. package/lib/internal/template/table/sticky-scrollbar.d.ts.map +0 -1
  209. package/lib/internal/template/table/sticky-scrollbar.js.map +0 -1
  210. package/lib/internal/template/table/use-sticky-columns.d.ts.map +0 -1
  211. package/lib/internal/template/table/use-sticky-columns.js.map +0 -1
  212. package/lib/internal/template/table/use-sticky-scrollbar.d.ts.map +0 -1
  213. package/lib/internal/template/table/use-sticky-scrollbar.js.map +0 -1
  214. /package/lib/internal/template/table/{sticky-scrollbar.d.ts → sticky-scrollbar/sticky-scrollbar.d.ts} +0 -0
  215. /package/lib/internal/template/table/{use-sticky-scrollbar.d.ts → sticky-scrollbar/use-sticky-scrollbar.d.ts} +0 -0
@@ -94,61 +94,92 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_root_lm6vo_qamh8_97:not(#\9),
98
- .awsui_layout-wrapper_lm6vo_qamh8_98:not(#\9) {
97
+ /* stylelint-disable selector-combinator-disallowed-list, selector-max-type, selector-max-universal */
98
+ .awsui_resize-active_lm6vo_1v63j_98 *:not(#\9) {
99
+ -webkit-user-select: none;
100
+ user-select: none;
101
+ }
102
+ .awsui_resize-active_lm6vo_1v63j_98 iframe:not(#\9) {
103
+ pointer-events: none;
104
+ }
105
+ .awsui_resize-side_lm6vo_1v63j_104 *:not(#\9) {
106
+ cursor: ew-resize;
107
+ }
108
+ .awsui_resize-bottom_lm6vo_1v63j_107 *:not(#\9) {
109
+ cursor: ns-resize;
110
+ }
111
+
112
+ /* stylelint-enable selector-combinator-disallowed-list, selector-max-type, selector-max-universal */
113
+ .awsui_with-motion_lm6vo_1v63j_112:not(#\9) {
114
+ transition: var(--motion-duration-refresh-only-fast-osz7cj, 115ms);
115
+ transition-property: border-color, opacity, width;
116
+ }
117
+ @media (prefers-reduced-motion: reduce) {
118
+ .awsui_with-motion_lm6vo_1v63j_112:not(#\9) {
119
+ animation: none;
120
+ transition: none;
121
+ }
122
+ }
123
+ .awsui-motion-disabled .awsui_with-motion_lm6vo_1v63j_112:not(#\9), .awsui-mode-entering .awsui_with-motion_lm6vo_1v63j_112:not(#\9) {
124
+ animation: none;
125
+ transition: none;
126
+ }
127
+
128
+ .awsui_root_lm6vo_1v63j_127:not(#\9),
129
+ .awsui_layout-wrapper_lm6vo_1v63j_128:not(#\9) {
99
130
  display: flex;
100
131
  flex-direction: column;
101
132
  position: relative;
102
133
  color: var(--color-text-body-default-fckvk9, #16191f);
103
134
  }
104
135
 
105
- .awsui_root-no-scroll_lm6vo_qamh8_105:not(#\9) {
136
+ .awsui_root-no-scroll_lm6vo_1v63j_135:not(#\9) {
106
137
  position: relative;
107
138
  z-index: 1;
108
139
  }
109
140
 
110
- .awsui_layout_lm6vo_qamh8_98:not(#\9) {
141
+ .awsui_layout_lm6vo_1v63j_128:not(#\9) {
111
142
  flex: 1 1 auto;
112
143
  display: flex;
113
144
  align-items: stretch;
114
145
  background-color: var(--color-background-layout-main-nd5gs3, #f2f3f3);
115
146
  }
116
- .awsui_layout-no-scroll_lm6vo_qamh8_116:not(#\9) {
147
+ .awsui_layout-no-scroll_lm6vo_1v63j_146:not(#\9) {
117
148
  overflow: hidden;
118
149
  }
119
150
 
120
- .awsui_layout-main_lm6vo_qamh8_120:not(#\9) {
151
+ .awsui_layout-main_lm6vo_1v63j_150:not(#\9) {
121
152
  flex: 1;
122
153
  min-width: 0;
123
154
  background-color: var(--color-background-layout-main-nd5gs3, #f2f3f3);
124
155
  position: relative;
125
156
  }
126
- .awsui_layout-main-scrollable_lm6vo_qamh8_126:not(#\9) {
157
+ .awsui_layout-main-scrollable_lm6vo_1v63j_156:not(#\9) {
127
158
  overflow: auto;
128
159
  }
129
160
 
130
161
  /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
131
- .awsui_unfocusable_lm6vo_qamh8_131 *:not(#\9) {
162
+ .awsui_unfocusable_lm6vo_1v63j_161 *:not(#\9) {
132
163
  visibility: hidden;
133
164
  }
134
165
 
135
- .awsui_breadcrumbs-desktop_lm6vo_qamh8_135:not(#\9) {
166
+ .awsui_breadcrumbs-desktop_lm6vo_1v63j_165:not(#\9) {
136
167
  padding-top: var(--space-scaled-m-5caa5e, 16px);
137
168
  padding-bottom: var(--space-scaled-s-73r995, 12px);
138
169
  }
139
170
 
140
- .awsui_content-header-wrapper_lm6vo_qamh8_140:not(#\9) {
171
+ .awsui_content-header-wrapper_lm6vo_1v63j_170:not(#\9) {
141
172
  padding-bottom: var(--space-content-header-padding-bottom-v55qlt, 16px);
142
173
  }
143
174
 
144
- .awsui_content-wrapper_lm6vo_qamh8_144:not(#\9) {
175
+ .awsui_content-wrapper_lm6vo_1v63j_174:not(#\9) {
145
176
  padding-bottom: var(--space-layout-content-bottom-zu47sf, 20px);
146
177
  }
147
178
 
148
- .awsui_content-overlapped_lm6vo_qamh8_148:not(#\9) {
179
+ .awsui_content-overlapped_lm6vo_1v63j_178:not(#\9) {
149
180
  margin-top: calc(-1 * var(--space-dark-header-overlap-distance-g5z45b, 0px));
150
181
  }
151
182
 
152
- .awsui_content-extra-top-padding_lm6vo_qamh8_152:not(#\9) {
183
+ .awsui_content-extra-top-padding_lm6vo_1v63j_182:not(#\9) {
153
184
  padding-top: var(--space-scaled-m-5caa5e, 16px);
154
185
  }
@@ -2,18 +2,22 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_lm6vo_qamh8_97",
6
- "layout-wrapper": "awsui_layout-wrapper_lm6vo_qamh8_98",
7
- "root-no-scroll": "awsui_root-no-scroll_lm6vo_qamh8_105",
8
- "layout": "awsui_layout_lm6vo_qamh8_98",
9
- "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_qamh8_116",
10
- "layout-main": "awsui_layout-main_lm6vo_qamh8_120",
11
- "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_qamh8_126",
12
- "unfocusable": "awsui_unfocusable_lm6vo_qamh8_131",
13
- "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_qamh8_135",
14
- "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_qamh8_140",
15
- "content-wrapper": "awsui_content-wrapper_lm6vo_qamh8_144",
16
- "content-overlapped": "awsui_content-overlapped_lm6vo_qamh8_148",
17
- "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_qamh8_152"
5
+ "resize-active": "awsui_resize-active_lm6vo_1v63j_98",
6
+ "resize-side": "awsui_resize-side_lm6vo_1v63j_104",
7
+ "resize-bottom": "awsui_resize-bottom_lm6vo_1v63j_107",
8
+ "with-motion": "awsui_with-motion_lm6vo_1v63j_112",
9
+ "root": "awsui_root_lm6vo_1v63j_127",
10
+ "layout-wrapper": "awsui_layout-wrapper_lm6vo_1v63j_128",
11
+ "root-no-scroll": "awsui_root-no-scroll_lm6vo_1v63j_135",
12
+ "layout": "awsui_layout_lm6vo_1v63j_128",
13
+ "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_1v63j_146",
14
+ "layout-main": "awsui_layout-main_lm6vo_1v63j_150",
15
+ "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_1v63j_156",
16
+ "unfocusable": "awsui_unfocusable_lm6vo_1v63j_161",
17
+ "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_1v63j_165",
18
+ "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_1v63j_170",
19
+ "content-wrapper": "awsui_content-wrapper_lm6vo_1v63j_174",
20
+ "content-overlapped": "awsui_content-overlapped_lm6vo_1v63j_178",
21
+ "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_1v63j_182"
18
22
  };
19
23
 
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface SizeControlProps {
3
+ position: 'side' | 'bottom';
4
+ panelRef?: React.RefObject<HTMLDivElement>;
5
+ handleRef?: React.RefObject<HTMLDivElement>;
6
+ setSidePanelWidth: (width: number) => void;
7
+ setBottomPanelHeight: (height: number) => void;
8
+ hasTransitions?: boolean;
9
+ }
10
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["app-layout/utils/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';\n\nexport interface SizeControlProps {\n position: 'side' | 'bottom';\n panelRef?: React.RefObject<HTMLDivElement>;\n handleRef?: React.RefObject<HTMLDivElement>;\n setSidePanelWidth: (width: number) => void;\n setBottomPanelHeight: (height: number) => void;\n hasTransitions?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-drawer-focus-control.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawer-focus-control.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACnC;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,kBAAkB,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClE;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAC5B,MAAM,EAAE,OAAO,EACf,YAAY,UAAQ,GACnB,iBAAiB,CA6DnB"}
1
+ {"version":3,"file":"use-drawer-focus-control.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawer-focus-control.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACnC;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,kBAAkB,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClE;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAC5B,MAAM,EAAE,OAAO,EACf,YAAY,UAAQ,GACnB,iBAAiB,CAiEnB"}
@@ -11,13 +11,18 @@ export function useDrawerFocusControl(dependencies, isOpen, restoreFocus = false
11
11
  const shouldFocus = useRef(false);
12
12
  const lastInteraction = useRef(null);
13
13
  useEffect(() => {
14
- var _a, _b, _c;
14
+ var _a, _b, _c, _d;
15
15
  switch ((_a = lastInteraction.current) === null || _a === void 0 ? void 0 : _a.type) {
16
16
  case 'open':
17
- (_b = refs.slider.current) === null || _b === void 0 ? void 0 : _b.focus();
17
+ if (refs.slider.current) {
18
+ (_b = refs.slider.current) === null || _b === void 0 ? void 0 : _b.focus();
19
+ }
20
+ else {
21
+ (_c = refs.close.current) === null || _c === void 0 ? void 0 : _c.focus();
22
+ }
18
23
  break;
19
24
  case 'close':
20
- (_c = refs.toggle.current) === null || _c === void 0 ? void 0 : _c.focus();
25
+ (_d = refs.toggle.current) === null || _d === void 0 ? void 0 : _d.focus();
21
26
  break;
22
27
  }
23
28
  lastInteraction.current = null;
@@ -1 +1 @@
1
- {"version":3,"file":"use-drawer-focus-control.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawer-focus-control.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCA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AAsB,CAAC,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;gBACvG,sBAAsB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gBACvC,sBAAsB,CAAC,OAAO,GAAG,SAAS,CAAC;aAC5C;iBAAM;gBACL,MAAA,IAAI,CAAC,MAAM,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;aAC9B;SACF;QACD,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAC;IAEF,kEAAkE;IAClE,uDAAuD;IACvD,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,sBAAsB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,QAAQ,EAAE,KAAK,CAAC,EAAE;YAChB,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;YAC3B,IAAI,KAAK,IAAI,MAAM,EAAE;gBACnB,OAAO,EAAE,CAAC;aACX;QACH,CAAC;QACD,SAAS;QACT,kBAAkB,EAAE,CAAC,WAAkC,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,OAAO,GAAG,WAAW,CAAC;KACpG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DependencyList, RefObject, useEffect, useRef, useCallback } from 'react';\nimport { ButtonProps } from '../../button/interfaces';\n\nexport type DrawerLastInteraction = { type: 'open' } | { type: 'close' };\n\nexport interface DrawerFocusControlRefs {\n toggle: RefObject<ButtonProps.Ref>;\n close: RefObject<ButtonProps.Ref>;\n slider: RefObject<HTMLDivElement>;\n}\n\ninterface FocusControlState {\n refs: DrawerFocusControlRefs;\n setFocus: (force?: boolean) => void;\n loseFocus: () => void;\n setLastInteraction: (interaction: DrawerLastInteraction) => void;\n}\n\nexport function useDrawerFocusControl(\n dependencies: DependencyList,\n isOpen: boolean,\n restoreFocus = false\n): FocusControlState {\n const refs = {\n toggle: useRef<ButtonProps.Ref>(null),\n close: useRef<ButtonProps.Ref>(null),\n slider: useRef<HTMLDivElement>(null),\n };\n const previousFocusedElement = useRef<HTMLElement>();\n const shouldFocus = useRef(false);\n const lastInteraction = useRef<DrawerLastInteraction | null>(null);\n\n useEffect(() => {\n switch (lastInteraction.current?.type) {\n case 'open':\n refs.slider.current?.focus();\n break;\n case 'close':\n refs.toggle.current?.focus();\n break;\n }\n lastInteraction.current = null;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n\n const doFocus = () => {\n if (!shouldFocus.current) {\n return;\n }\n if (isOpen) {\n previousFocusedElement.current =\n document.activeElement !== document.body ? (document.activeElement as HTMLElement) : undefined;\n refs.close.current?.focus();\n } else {\n if (restoreFocus && previousFocusedElement.current && document.contains(previousFocusedElement.current)) {\n previousFocusedElement.current.focus();\n previousFocusedElement.current = undefined;\n } else {\n refs.toggle.current?.focus();\n }\n }\n shouldFocus.current = false;\n };\n\n // We explictly want this effect to run when only `isOpen` changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(doFocus, [isOpen]);\n\n const loseFocus = useCallback(() => {\n previousFocusedElement.current = undefined;\n }, []);\n\n return {\n refs,\n setFocus: force => {\n shouldFocus.current = true;\n if (force && isOpen) {\n doFocus();\n }\n },\n loseFocus,\n setLastInteraction: (interaction: DrawerLastInteraction) => (lastInteraction.current = interaction),\n };\n}\n"]}
1
+ {"version":3,"file":"use-drawer-focus-control.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawer-focus-control.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAA6B,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAkBlF,MAAM,UAAU,qBAAqB,CACnC,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YACL,IAAI,YAAY,IAAI,sBAAsB,CAAC,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;gBACvG,sBAAsB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gBACvC,sBAAsB,CAAC,OAAO,GAAG,SAAS,CAAC;aAC5C;iBAAM;gBACL,MAAA,IAAI,CAAC,MAAM,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;aAC9B;SACF;QACD,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAC;IAEF,kEAAkE;IAClE,uDAAuD;IACvD,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,sBAAsB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,QAAQ,EAAE,KAAK,CAAC,EAAE;YAChB,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;YAC3B,IAAI,KAAK,IAAI,MAAM,EAAE;gBACnB,OAAO,EAAE,CAAC;aACX;QACH,CAAC;QACD,SAAS;QACT,kBAAkB,EAAE,CAAC,WAAkC,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,OAAO,GAAG,WAAW,CAAC;KACpG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DependencyList, RefObject, useEffect, useRef, useCallback } from 'react';\nimport { ButtonProps } from '../../button/interfaces';\n\nexport type DrawerLastInteraction = { type: 'open' } | { type: 'close' };\n\nexport interface DrawerFocusControlRefs {\n toggle: RefObject<ButtonProps.Ref>;\n close: RefObject<ButtonProps.Ref>;\n slider: RefObject<HTMLDivElement>;\n}\n\ninterface FocusControlState {\n refs: DrawerFocusControlRefs;\n setFocus: (force?: boolean) => void;\n loseFocus: () => void;\n setLastInteraction: (interaction: DrawerLastInteraction) => void;\n}\n\nexport function useDrawerFocusControl(\n dependencies: DependencyList,\n isOpen: boolean,\n restoreFocus = false\n): FocusControlState {\n const refs = {\n toggle: useRef<ButtonProps.Ref>(null),\n close: useRef<ButtonProps.Ref>(null),\n slider: useRef<HTMLDivElement>(null),\n };\n const previousFocusedElement = useRef<HTMLElement>();\n const shouldFocus = useRef(false);\n const lastInteraction = useRef<DrawerLastInteraction | null>(null);\n\n useEffect(() => {\n switch (lastInteraction.current?.type) {\n case 'open':\n if (refs.slider.current) {\n refs.slider.current?.focus();\n } else {\n refs.close.current?.focus();\n }\n break;\n case 'close':\n refs.toggle.current?.focus();\n break;\n }\n lastInteraction.current = null;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n\n const doFocus = () => {\n if (!shouldFocus.current) {\n return;\n }\n if (isOpen) {\n previousFocusedElement.current =\n document.activeElement !== document.body ? (document.activeElement as HTMLElement) : undefined;\n refs.close.current?.focus();\n } else {\n if (restoreFocus && previousFocusedElement.current && document.contains(previousFocusedElement.current)) {\n previousFocusedElement.current.focus();\n previousFocusedElement.current = undefined;\n } else {\n refs.toggle.current?.focus();\n }\n }\n shouldFocus.current = false;\n };\n\n // We explictly want this effect to run when only `isOpen` changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(doFocus, [isOpen]);\n\n const loseFocus = useCallback(() => {\n previousFocusedElement.current = undefined;\n }, []);\n\n return {\n refs,\n setFocus: force => {\n shouldFocus.current = true;\n if (force && isOpen) {\n doFocus();\n }\n },\n loseFocus,\n setLastInteraction: (interaction: DrawerLastInteraction) => (lastInteraction.current = interaction),\n };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SizeControlProps } from './interfaces';
3
+ export declare const useKeyboardEvents: ({ position, setSidePanelWidth, setBottomPanelHeight, panelRef, }: SizeControlProps) => (event: React.KeyboardEvent) => void;
4
+ //# sourceMappingURL=use-keyboard-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-keyboard-events.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-keyboard-events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAmBhD,eAAO,MAAM,iBAAiB,qEAK3B,gBAAgB,aACF,mBAAmB,SAwDnC,CAAC"}
@@ -1,34 +1,33 @@
1
1
  import { KeyCode } from '../../internal/keycode';
2
2
  const KEYBOARD_SINGLE_STEP_SIZE = 10;
3
3
  const KEYBOARD_MULTIPLE_STEPS_SIZE = 60;
4
- const getCurrentSize = (splitPanelRef) => {
5
- if (!splitPanelRef || !splitPanelRef.current) {
4
+ const getCurrentSize = (panelRef) => {
5
+ if (!panelRef || !panelRef.current) {
6
6
  return {
7
- splitPanelHeight: 0,
8
- splitPanelWidth: 0,
7
+ panelHeight: 0,
8
+ panelWidth: 0,
9
9
  };
10
10
  }
11
- const safeParseFloat = (size = '') => parseFloat(size) || 0;
12
11
  return {
13
- splitPanelHeight: safeParseFloat(splitPanelRef.current.style.height),
14
- splitPanelWidth: safeParseFloat(splitPanelRef.current.style.width),
12
+ panelHeight: panelRef.current.clientHeight,
13
+ panelWidth: panelRef.current.clientWidth,
15
14
  };
16
15
  };
17
- export const useKeyboardEvents = ({ position, setSidePanelWidth, setBottomPanelHeight, splitPanelRef, }) => {
16
+ export const useKeyboardEvents = ({ position, setSidePanelWidth, setBottomPanelHeight, panelRef, }) => {
18
17
  return (event) => {
19
18
  let setSizeFunction;
20
19
  let currentSize;
21
20
  let maxSize;
22
- const { splitPanelHeight, splitPanelWidth } = getCurrentSize(splitPanelRef);
21
+ const { panelHeight, panelWidth } = getCurrentSize(panelRef);
23
22
  if (position === 'side') {
24
23
  setSizeFunction = setSidePanelWidth;
25
- currentSize = splitPanelWidth;
24
+ currentSize = panelWidth;
26
25
  // don't need the exact max size as it's constrained in the set size function
27
26
  maxSize = window.innerWidth;
28
27
  }
29
28
  else {
30
29
  setSizeFunction = setBottomPanelHeight;
31
- currentSize = splitPanelHeight;
30
+ currentSize = panelHeight;
32
31
  // don't need the exact max size as it's constrained in the set size function
33
32
  maxSize = window.innerHeight;
34
33
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-keyboard-events.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-keyboard-events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGjD,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAExC,MAAM,cAAc,GAAG,CAAC,QAA0C,EAAE,EAAE;IACpE,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;QAClC,OAAO;YACL,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,CAAC;SACd,CAAC;KACH;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,YAAY;QAC1C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW;KACzC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,GACS,EAAE,EAAE;IACrB,OAAO,CAAC,KAA0B,EAAE,EAAE;QACpC,IAAI,eAAe,CAAC;QACpB,IAAI,WAAW,CAAC;QAChB,IAAI,OAAO,CAAC;QAEZ,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;QAE7D,IAAI,QAAQ,KAAK,MAAM,EAAE;YACvB,eAAe,GAAG,iBAAiB,CAAC;YACpC,WAAW,GAAG,UAAU,CAAC;YACzB,6EAA6E;YAC7E,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;SAC7B;aAAM;YACL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AC,CAAC;gBACnB,MAAM;YACR;gBACE,cAAc,GAAG,KAAK,CAAC;SAC1B;QAED,IAAI,cAAc,EAAE;YAClB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;SACzB;IACH,CAAC,CAAC;AACJ,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 { KeyCode } from '../../internal/keycode';\nimport { SizeControlProps } from './interfaces';\n\nconst KEYBOARD_SINGLE_STEP_SIZE = 10;\nconst KEYBOARD_MULTIPLE_STEPS_SIZE = 60;\n\nconst getCurrentSize = (panelRef?: React.RefObject<HTMLDivElement>) => {\n if (!panelRef || !panelRef.current) {\n return {\n panelHeight: 0,\n panelWidth: 0,\n };\n }\n\n return {\n panelHeight: panelRef.current.clientHeight,\n panelWidth: panelRef.current.clientWidth,\n };\n};\n\nexport const useKeyboardEvents = ({\n position,\n setSidePanelWidth,\n setBottomPanelHeight,\n panelRef,\n}: SizeControlProps) => {\n return (event: React.KeyboardEvent) => {\n let setSizeFunction;\n let currentSize;\n let maxSize;\n\n const { panelHeight, panelWidth } = getCurrentSize(panelRef);\n\n if (position === 'side') {\n setSizeFunction = setSidePanelWidth;\n currentSize = panelWidth;\n // don't need the exact max size as it's constrained in the set size function\n maxSize = window.innerWidth;\n } else {\n setSizeFunction = setBottomPanelHeight;\n currentSize = panelHeight;\n // don't need the exact max size as it's constrained in the set size function\n maxSize = window.innerHeight;\n }\n\n const primaryGrowKey = position === 'bottom' ? KeyCode.up : KeyCode.left;\n const primaryShrinkKey = position === 'bottom' ? KeyCode.down : KeyCode.right;\n const altGrowKey = position === 'bottom' ? KeyCode.right : KeyCode.down;\n const altShrinkKey = position === 'bottom' ? KeyCode.left : KeyCode.up;\n\n let isEventHandled = true;\n switch (event.keyCode) {\n case primaryGrowKey:\n case altGrowKey:\n setSizeFunction(currentSize + KEYBOARD_SINGLE_STEP_SIZE);\n\n break;\n case primaryShrinkKey:\n case altShrinkKey:\n setSizeFunction(currentSize - KEYBOARD_SINGLE_STEP_SIZE);\n break;\n case KeyCode.pageUp:\n setSizeFunction(currentSize + KEYBOARD_MULTIPLE_STEPS_SIZE);\n break;\n case KeyCode.pageDown:\n setSizeFunction(currentSize - KEYBOARD_MULTIPLE_STEPS_SIZE);\n break;\n case KeyCode.home:\n setSizeFunction(maxSize);\n break;\n case KeyCode.end:\n setSizeFunction(0);\n break;\n default:\n isEventHandled = false;\n }\n\n if (isEventHandled) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { SizeControlProps } from './interfaces';
2
+ export declare const usePointerEvents: ({ position, panelRef, handleRef, setSidePanelWidth, setBottomPanelHeight, hasTransitions, }: SizeControlProps) => () => void;
3
+ //# sourceMappingURL=use-pointer-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pointer-events.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-pointer-events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAO,MAAM,gBAAgB,gGAO1B,gBAAgB,eAoDlB,CAAC"}
@@ -2,32 +2,39 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { useCallback } from 'react';
4
4
  import styles from '../styles.css.js';
5
- export const usePointerEvents = ({ position, splitPanelRef, handleRef, setSidePanelWidth, setBottomPanelHeight, }) => {
5
+ export const usePointerEvents = ({ position, panelRef, handleRef, setSidePanelWidth, setBottomPanelHeight, hasTransitions = false, }) => {
6
6
  const onDocumentPointerMove = useCallback((event) => {
7
- if (!splitPanelRef || !splitPanelRef.current || !handleRef || !handleRef.current) {
7
+ if (!panelRef || !panelRef.current || !handleRef || !handleRef.current) {
8
8
  return;
9
9
  }
10
+ panelRef.current.classList.remove(styles['with-motion']);
10
11
  if (position === 'side') {
11
- const mouseClientX = event.clientX;
12
+ const mouseClientX = event.clientX || 0;
12
13
  // The handle offset aligns the cursor with the middle of the resize handle.
13
14
  const handleOffset = handleRef.current.getBoundingClientRect().width / 2;
14
- const width = splitPanelRef.current.getBoundingClientRect().right - mouseClientX + handleOffset;
15
+ const width = panelRef.current.getBoundingClientRect().right - mouseClientX + handleOffset;
15
16
  setSidePanelWidth(width);
16
17
  }
17
18
  else {
18
- const mouseClientY = event.clientY;
19
+ const mouseClientY = event.clientY || 0;
19
20
  // The handle offset aligns the cursor with the middle of the resize handle.
20
21
  const handleOffset = handleRef.current.getBoundingClientRect().height / 2;
21
- const height = splitPanelRef.current.getBoundingClientRect().bottom - mouseClientY + handleOffset;
22
+ const height = panelRef.current.getBoundingClientRect().bottom - mouseClientY + handleOffset;
22
23
  setBottomPanelHeight(height);
23
24
  }
24
- }, [position, splitPanelRef, handleRef, setSidePanelWidth, setBottomPanelHeight]);
25
+ }, [position, panelRef, handleRef, setSidePanelWidth, setBottomPanelHeight]);
25
26
  const onDocumentPointerUp = useCallback(() => {
27
+ if (!panelRef || !panelRef.current) {
28
+ return;
29
+ }
30
+ if (hasTransitions) {
31
+ panelRef.current.classList.add(styles['with-motion']);
32
+ }
26
33
  document.body.classList.remove(styles['resize-active']);
27
34
  document.body.classList.remove(styles[`resize-${position}`]);
28
35
  document.removeEventListener('pointerup', onDocumentPointerUp);
29
36
  document.removeEventListener('pointermove', onDocumentPointerMove);
30
- }, [onDocumentPointerMove, position]);
37
+ }, [panelRef, onDocumentPointerMove, position, hasTransitions]);
31
38
  const onSliderPointerDown = useCallback(() => {
32
39
  document.body.classList.add(styles['resize-active']);
33
40
  document.body.classList.add(styles[`resize-${position}`]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pointer-events.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-pointer-events.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;A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c. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useCallback } from 'react';\nimport styles from '../styles.css.js';\nimport { SizeControlProps } from './interfaces';\n\nexport const usePointerEvents = ({\n position,\n panelRef,\n handleRef,\n setSidePanelWidth,\n setBottomPanelHeight,\n hasTransitions = false,\n}: SizeControlProps) => {\n const onDocumentPointerMove = useCallback(\n (event: PointerEvent) => {\n if (!panelRef || !panelRef.current || !handleRef || !handleRef.current) {\n return;\n }\n\n panelRef.current.classList.remove(styles['with-motion']);\n\n if (position === 'side') {\n const mouseClientX = event.clientX || 0;\n\n // The handle offset aligns the cursor with the middle of the resize handle.\n const handleOffset = handleRef.current.getBoundingClientRect().width / 2;\n const width = panelRef.current.getBoundingClientRect().right - mouseClientX + handleOffset;\n\n setSidePanelWidth(width);\n } else {\n const mouseClientY = event.clientY || 0;\n\n // The handle offset aligns the cursor with the middle of the resize handle.\n const handleOffset = handleRef.current.getBoundingClientRect().height / 2;\n const height = panelRef.current.getBoundingClientRect().bottom - mouseClientY + handleOffset;\n\n setBottomPanelHeight(height);\n }\n },\n [position, panelRef, handleRef, setSidePanelWidth, setBottomPanelHeight]\n );\n\n const onDocumentPointerUp = useCallback(() => {\n if (!panelRef || !panelRef.current) {\n return;\n }\n\n if (hasTransitions) {\n panelRef.current.classList.add(styles['with-motion']);\n }\n document.body.classList.remove(styles['resize-active']);\n document.body.classList.remove(styles[`resize-${position}`]);\n document.removeEventListener('pointerup', onDocumentPointerUp);\n document.removeEventListener('pointermove', onDocumentPointerMove);\n }, [panelRef, onDocumentPointerMove, position, hasTransitions]);\n\n const onSliderPointerDown = useCallback(() => {\n document.body.classList.add(styles['resize-active']);\n document.body.classList.add(styles[`resize-${position}`]);\n document.addEventListener('pointerup', onDocumentPointerUp);\n document.addEventListener('pointermove', onDocumentPointerMove);\n }, [onDocumentPointerMove, onDocumentPointerUp, position]);\n\n return onSliderPointerDown;\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { InternalDrawerProps } from '../drawer/interfaces';
3
+ import { DrawerFocusControlRefs } from './use-drawer-focus-control';
4
+ export interface DrawerResizeProps {
5
+ activeDrawerId?: string | null;
6
+ drawers: InternalDrawerProps['drawers'];
7
+ drawersRefs: DrawerFocusControlRefs;
8
+ isToolsOpen: boolean;
9
+ drawersMaxWidth: number;
10
+ }
11
+ declare function useResize(drawerRefObject: React.RefObject<HTMLDivElement>, drawerResizeProps: DrawerResizeProps): {
12
+ resizeHandle: JSX.Element;
13
+ drawerSize: number;
14
+ };
15
+ export default useResize;
16
+ //# sourceMappingURL=use-resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resize.d.ts","sourceRoot":"lib/default/","sources":["app-layout/utils/use-resize.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,WAAW,EAAE,sBAAsB,CAAC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,iBAAS,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,iBAAiB;;;EAgGxG;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,84 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React, { useState, useEffect, useMemo, useCallback } from 'react';
4
+ import { fireNonCancelableEvent } from '../../internal/events';
5
+ import clsx from 'clsx';
6
+ import ResizeHandler from '../../split-panel/icons/resize-handler';
7
+ import { getLimitedValue } from '../../split-panel/utils/size-utils';
8
+ import { usePointerEvents } from './use-pointer-events';
9
+ import { useKeyboardEvents } from './use-keyboard-events';
10
+ import splitPanelStyles from '../../split-panel/styles.css.js';
11
+ import testutilStyles from '../test-classes/styles.css.js';
12
+ import styles from '../visual-refresh/styles.css.js';
13
+ function useResize(drawerRefObject, drawerResizeProps) {
14
+ var _a, _b;
15
+ const { activeDrawerId, drawers, drawersRefs, isToolsOpen, drawersMaxWidth } = drawerResizeProps;
16
+ const activeDrawer = (_a = drawers === null || drawers === void 0 ? void 0 : drawers.items.find(item => item.id === activeDrawerId)) !== null && _a !== void 0 ? _a : null;
17
+ const drawerItems = useMemo(() => (drawers === null || drawers === void 0 ? void 0 : drawers.items) || [], [drawers === null || drawers === void 0 ? void 0 : drawers.items]);
18
+ const toolsWidth = 290;
19
+ const MIN_WIDTH = (activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.defaultSize) && activeDrawer.defaultSize < 290 ? activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.defaultSize : 290;
20
+ const [relativeSize, setRelativeSize] = useState(0);
21
+ const getDrawerItemSizes = useCallback(() => {
22
+ const sizes = {};
23
+ if (!drawerItems) {
24
+ return {};
25
+ }
26
+ for (const item of drawerItems) {
27
+ if (item.defaultSize) {
28
+ sizes[item.id] = item.defaultSize;
29
+ }
30
+ }
31
+ return sizes;
32
+ }, [drawerItems]);
33
+ const [drawerItemSizes, setDrawerItemSizes] = useState(() => getDrawerItemSizes());
34
+ const drawerSize = !activeDrawerId && !isToolsOpen
35
+ ? 0
36
+ : activeDrawerId && drawerItemSizes[activeDrawerId]
37
+ ? drawerItemSizes[activeDrawerId]
38
+ : toolsWidth;
39
+ useEffect(() => {
40
+ // Ensure we only set new drawer items by performing a shallow merge
41
+ // of the latest drawer item sizes, and previous drawer item sizes.
42
+ setDrawerItemSizes(prev => (Object.assign(Object.assign({}, getDrawerItemSizes()), prev)));
43
+ }, [getDrawerItemSizes]);
44
+ useEffect(() => {
45
+ // effects are called inside out in the components tree
46
+ // wait one frame to allow app-layout to complete its calculations
47
+ const handle = requestAnimationFrame(() => {
48
+ const maxSize = drawersMaxWidth;
49
+ setRelativeSize(((drawerSize - MIN_WIDTH) / (maxSize - MIN_WIDTH)) * 100);
50
+ });
51
+ return () => cancelAnimationFrame(handle);
52
+ }, [drawerSize, drawersMaxWidth, MIN_WIDTH]);
53
+ const drawerResize = (resizeDetail) => {
54
+ const drawerItem = drawers === null || drawers === void 0 ? void 0 : drawers.items.find(item => item.id === resizeDetail.id);
55
+ fireNonCancelableEvent(drawerItem === null || drawerItem === void 0 ? void 0 : drawerItem.onResize, resizeDetail);
56
+ fireNonCancelableEvent(drawers === null || drawers === void 0 ? void 0 : drawers.onResize, resizeDetail);
57
+ setDrawerItemSizes(Object.assign(Object.assign({}, drawerItemSizes), { [resizeDetail.id]: resizeDetail.size }));
58
+ };
59
+ const setSidePanelWidth = (width) => {
60
+ const maxWidth = drawersMaxWidth;
61
+ const size = getLimitedValue(MIN_WIDTH, width, maxWidth);
62
+ const id = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.id;
63
+ if (id && maxWidth >= MIN_WIDTH) {
64
+ drawerResize({ size, id });
65
+ }
66
+ };
67
+ const position = 'side';
68
+ const setBottomPanelHeight = () => { };
69
+ const sizeControlProps = {
70
+ position,
71
+ panelRef: drawerRefObject,
72
+ handleRef: drawersRefs.slider,
73
+ setSidePanelWidth,
74
+ setBottomPanelHeight,
75
+ hasTransitions: true,
76
+ };
77
+ const onSliderPointerDown = usePointerEvents(sizeControlProps);
78
+ const onKeyDown = useKeyboardEvents(sizeControlProps);
79
+ const resizeHandle = (React.createElement("div", { ref: drawersRefs.slider, role: "slider", tabIndex: 0, "aria-label": (_b = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _b === void 0 ? void 0 : _b.resizeHandle, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": relativeSize, className: clsx(splitPanelStyles.slider, splitPanelStyles[`slider-side`], testutilStyles['drawers-slider']), onKeyDown: onKeyDown, onPointerDown: onSliderPointerDown },
80
+ React.createElement(ResizeHandler, { className: clsx(splitPanelStyles['slider-icon'], splitPanelStyles[`slider-icon-side`]) })));
81
+ return { resizeHandle: React.createElement("div", { className: styles['drawer-slider'] }, resizeHandle), drawerSize };
82
+ }
83
+ export default useResize;
84
+ //# sourceMappingURL=use-resize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resize.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-resize.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,MAAM,MAAM,iCAAiC,CAAC;AAYrD,SAAS,SAAS,CAAC,eAAgD,EAAE,iBAAoC;;IACvG,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,iBAAiB,CAAC;IAEjG,MAAM,YAAY,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,cAAc,CAAC,mCAAI,IAAI,CAAC;IACrF,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MAAM,CAAC,eAAe,CAAC,IAAG,YAAY,CAAO,EAAE,UAAU,EAAE,CAAC;AACrG,CAAC;AAED,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useEffect, useMemo, useCallback } from 'react';\n\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport clsx from 'clsx';\n\nimport ResizeHandler from '../../split-panel/icons/resize-handler';\nimport { getLimitedValue } from '../../split-panel/utils/size-utils';\nimport { usePointerEvents } from './use-pointer-events';\nimport { useKeyboardEvents } from './use-keyboard-events';\nimport { InternalDrawerProps } from '../drawer/interfaces';\n\nimport splitPanelStyles from '../../split-panel/styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\nimport styles from '../visual-refresh/styles.css.js';\nimport { DrawerFocusControlRefs } from './use-drawer-focus-control';\nimport { SizeControlProps } from './interfaces';\n\nexport interface DrawerResizeProps {\n activeDrawerId?: string | null;\n drawers: InternalDrawerProps['drawers'];\n drawersRefs: DrawerFocusControlRefs;\n isToolsOpen: boolean;\n drawersMaxWidth: number;\n}\n\nfunction useResize(drawerRefObject: React.RefObject<HTMLDivElement>, drawerResizeProps: DrawerResizeProps) {\n const { activeDrawerId, drawers, drawersRefs, isToolsOpen, drawersMaxWidth } = drawerResizeProps;\n\n const activeDrawer = drawers?.items.find(item => item.id === activeDrawerId) ?? null;\n const drawerItems = useMemo(() => drawers?.items || [], [drawers?.items]);\n const toolsWidth = 290;\n const MIN_WIDTH = activeDrawer?.defaultSize && activeDrawer.defaultSize < 290 ? activeDrawer?.defaultSize : 290;\n const [relativeSize, setRelativeSize] = useState(0);\n const getDrawerItemSizes = useCallback(() => {\n const sizes: { [id: string]: number } = {};\n if (!drawerItems) {\n return {};\n }\n\n for (const item of drawerItems) {\n if (item.defaultSize) {\n sizes[item.id] = item.defaultSize;\n }\n }\n return sizes;\n }, [drawerItems]);\n const [drawerItemSizes, setDrawerItemSizes] = useState(() => getDrawerItemSizes());\n\n const drawerSize =\n !activeDrawerId && !isToolsOpen\n ? 0\n : activeDrawerId && drawerItemSizes[activeDrawerId]\n ? drawerItemSizes[activeDrawerId]\n : toolsWidth;\n\n useEffect(() => {\n // Ensure we only set new drawer items by performing a shallow merge\n // of the latest drawer item sizes, and previous drawer item sizes.\n setDrawerItemSizes(prev => ({ ...getDrawerItemSizes(), ...prev }));\n }, [getDrawerItemSizes]);\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 = drawersMaxWidth;\n setRelativeSize(((drawerSize - MIN_WIDTH) / (maxSize - MIN_WIDTH)) * 100);\n });\n return () => cancelAnimationFrame(handle);\n }, [drawerSize, drawersMaxWidth, MIN_WIDTH]);\n\n const drawerResize = (resizeDetail: { size: number; id: string }) => {\n const drawerItem = drawers?.items.find(item => item.id === resizeDetail.id);\n fireNonCancelableEvent(drawerItem?.onResize, resizeDetail);\n fireNonCancelableEvent(drawers?.onResize, resizeDetail);\n setDrawerItemSizes({ ...drawerItemSizes, [resizeDetail.id]: resizeDetail.size });\n };\n\n const setSidePanelWidth = (width: number) => {\n const maxWidth = drawersMaxWidth;\n const size = getLimitedValue(MIN_WIDTH, width, maxWidth);\n const id = activeDrawer?.id;\n\n if (id && maxWidth >= MIN_WIDTH) {\n drawerResize({ size, id });\n }\n };\n\n const position = 'side';\n const setBottomPanelHeight = () => {};\n\n const sizeControlProps: SizeControlProps = {\n position,\n panelRef: drawerRefObject,\n handleRef: drawersRefs.slider,\n setSidePanelWidth,\n setBottomPanelHeight,\n hasTransitions: true,\n };\n\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const resizeHandle = (\n <div\n ref={drawersRefs.slider}\n role=\"slider\"\n tabIndex={0}\n aria-label={activeDrawer?.ariaLabels?.resizeHandle}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={relativeSize}\n className={clsx(splitPanelStyles.slider, splitPanelStyles[`slider-side`], testutilStyles['drawers-slider'])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n >\n <ResizeHandler className={clsx(splitPanelStyles['slider-icon'], splitPanelStyles[`slider-icon-side`])} />\n </div>\n );\n\n return { resizeHandle: <div className={styles['drawer-slider']}>{resizeHandle}</div>, drawerSize };\n}\n\nexport default useResize;\n"]}
@@ -1,14 +1,18 @@
1
1
  import React from 'react';
2
2
  import { AppLayoutProps } from '../interfaces';
3
- import { DrawersProps } from './drawers';
4
3
  import { FocusControlRefs } from '../utils/use-focus-control';
4
+ import { DrawerFocusControlRefs } from '../utils/use-drawer-focus-control';
5
5
  import { SplitPanelFocusControlRefs } from '../utils/use-split-panel-focus-control';
6
6
  import { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';
7
+ import { InternalDrawerProps } from '../drawer/interfaces';
7
8
  interface AppLayoutInternals extends AppLayoutProps {
8
- activeDrawerId: string | null;
9
- activeDrawerWidth: number;
10
- drawers: DrawersProps;
11
- drawersRefs: FocusControlRefs;
9
+ activeDrawerId?: string | null;
10
+ drawers?: InternalDrawerProps['drawers'];
11
+ drawersRefs: DrawerFocusControlRefs;
12
+ drawerSize: number;
13
+ drawersMaxWidth: number;
14
+ drawerRef: React.Ref<HTMLElement>;
15
+ resizeHandle: React.ReactElement;
12
16
  drawersTriggerCount: number;
13
17
  dynamicOverlapHeight: number;
14
18
  handleDrawersClick: (activeDrawerId: string | null, skipFocusControl?: boolean) => void;
@@ -22,7 +26,7 @@ interface AppLayoutInternals extends AppLayoutProps {
22
26
  hasDefaultToolsWidth: boolean;
23
27
  hasDrawerViewportOverlay: boolean;
24
28
  hasNotificationsContent: boolean;
25
- hasOpenDrawer: boolean;
29
+ hasOpenDrawer?: boolean;
26
30
  hasStickyBackground: boolean;
27
31
  isMobile: boolean;
28
32
  isNavigationOpen: boolean;
@@ -32,6 +36,7 @@ interface AppLayoutInternals extends AppLayoutProps {
32
36
  layoutElement: React.Ref<HTMLElement>;
33
37
  layoutWidth: number;
34
38
  loseToolsFocus: () => void;
39
+ loseDrawersFocus: () => void;
35
40
  mainElement: React.Ref<HTMLDivElement>;
36
41
  mainOffsetLeft: number;
37
42
  navigationRefs: FocusControlRefs;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KASN,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,4BAA4B,CAAC;AAM/E,OAAO,EAAE,0BAA0B,EAA6B,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAMvF,UAAU,kBAAmB,SAAQ,cAAc;IACjD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxF,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,iCAAiC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,qBAAqB,KAAK,IAAI,CAAC;IAC1F,sBAAsB,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3D,gBAAgB,EAAE,CAAC,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