@cloudscape-design/components 3.0.457 → 3.0.459

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 (255) hide show
  1. package/alert/styles.css.js +25 -25
  2. package/alert/styles.scoped.css +53 -59
  3. package/alert/styles.selectors.js +25 -25
  4. package/anchor-navigation/styles.css.js +8 -8
  5. package/anchor-navigation/styles.scoped.css +30 -39
  6. package/anchor-navigation/styles.selectors.js +8 -8
  7. package/annotation-context/annotation/styles.css.js +24 -24
  8. package/annotation-context/annotation/styles.scoped.css +48 -55
  9. package/annotation-context/annotation/styles.selectors.js +24 -24
  10. package/app-layout/content-wrapper/styles.css.js +3 -3
  11. package/app-layout/content-wrapper/styles.scoped.css +15 -15
  12. package/app-layout/content-wrapper/styles.selectors.js +3 -3
  13. package/app-layout/drawer/styles.css.js +12 -12
  14. package/app-layout/drawer/styles.scoped.css +30 -29
  15. package/app-layout/drawer/styles.selectors.js +12 -12
  16. package/app-layout/interfaces.d.ts +4 -3
  17. package/app-layout/interfaces.d.ts.map +1 -1
  18. package/app-layout/interfaces.js.map +1 -1
  19. package/app-layout/mobile-toolbar/styles.css.js +8 -8
  20. package/app-layout/mobile-toolbar/styles.scoped.css +17 -18
  21. package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  22. package/app-layout/notifications/styles.css.js +3 -3
  23. package/app-layout/notifications/styles.scoped.css +6 -6
  24. package/app-layout/notifications/styles.selectors.js +3 -3
  25. package/app-layout/split-panel/styles.css.js +2 -2
  26. package/app-layout/split-panel/styles.scoped.css +3 -3
  27. package/app-layout/split-panel/styles.selectors.js +2 -2
  28. package/app-layout/styles.css.js +16 -16
  29. package/app-layout/styles.scoped.css +26 -26
  30. package/app-layout/styles.selectors.js +16 -16
  31. package/app-layout/toggles/styles.css.js +2 -2
  32. package/app-layout/toggles/styles.scoped.css +9 -10
  33. package/app-layout/toggles/styles.selectors.js +2 -2
  34. package/app-layout/utils/use-drawers.js.map +1 -1
  35. package/app-layout/visual-refresh/context.js +1 -1
  36. package/app-layout/visual-refresh/context.js.map +1 -1
  37. package/app-layout/visual-refresh/styles.css.js +80 -80
  38. package/app-layout/visual-refresh/styles.scoped.css +251 -268
  39. package/app-layout/visual-refresh/styles.selectors.js +80 -80
  40. package/area-chart/styles.css.js +6 -6
  41. package/area-chart/styles.scoped.css +11 -12
  42. package/area-chart/styles.selectors.js +6 -6
  43. package/attribute-editor/styles.css.js +14 -14
  44. package/attribute-editor/styles.scoped.css +29 -30
  45. package/attribute-editor/styles.selectors.js +14 -14
  46. package/autosuggest/styles.css.js +3 -3
  47. package/autosuggest/styles.scoped.css +5 -5
  48. package/autosuggest/styles.selectors.js +3 -3
  49. package/badge/styles.css.js +5 -5
  50. package/badge/styles.scoped.css +7 -11
  51. package/badge/styles.selectors.js +5 -5
  52. package/bar-chart/index.d.ts +1 -1
  53. package/bar-chart/index.d.ts.map +1 -1
  54. package/bar-chart/index.js +2 -2
  55. package/bar-chart/index.js.map +1 -1
  56. package/bar-chart/interfaces.d.ts +3 -8
  57. package/bar-chart/interfaces.d.ts.map +1 -1
  58. package/bar-chart/interfaces.js.map +1 -1
  59. package/box/styles.css.js +190 -190
  60. package/box/styles.scoped.css +240 -244
  61. package/box/styles.selectors.js +190 -190
  62. package/breadcrumb-group/item/styles.css.js +9 -9
  63. package/breadcrumb-group/item/styles.scoped.css +19 -20
  64. package/breadcrumb-group/item/styles.selectors.js +9 -9
  65. package/breadcrumb-group/styles.css.js +7 -7
  66. package/breadcrumb-group/styles.scoped.css +21 -28
  67. package/breadcrumb-group/styles.selectors.js +7 -7
  68. package/button/styles.css.js +20 -20
  69. package/button/styles.scoped.css +153 -155
  70. package/button/styles.selectors.js +20 -20
  71. package/button-dropdown/category-elements/styles.css.js +13 -13
  72. package/button-dropdown/category-elements/styles.scoped.css +50 -60
  73. package/button-dropdown/category-elements/styles.selectors.js +13 -13
  74. package/button-dropdown/item-element/styles.css.js +15 -15
  75. package/button-dropdown/item-element/styles.scoped.css +33 -38
  76. package/button-dropdown/item-element/styles.selectors.js +15 -15
  77. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  78. package/button-dropdown/mobile-expandable-group/styles.scoped.css +8 -8
  79. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  80. package/button-dropdown/styles.css.js +15 -15
  81. package/button-dropdown/styles.scoped.css +36 -39
  82. package/button-dropdown/styles.selectors.js +15 -15
  83. package/calendar/styles.css.js +18 -18
  84. package/calendar/styles.scoped.css +59 -75
  85. package/calendar/styles.selectors.js +18 -18
  86. package/cards/styles.css.js +38 -38
  87. package/cards/styles.scoped.css +94 -110
  88. package/cards/styles.selectors.js +38 -38
  89. package/code-editor/resizable-box/styles.css.js +3 -3
  90. package/code-editor/resizable-box/styles.scoped.css +10 -10
  91. package/code-editor/resizable-box/styles.selectors.js +3 -3
  92. package/code-editor/styles.css.js +32 -32
  93. package/code-editor/styles.scoped.css +198 -210
  94. package/code-editor/styles.selectors.js +32 -32
  95. package/collection-preferences/content-display/styles.css.js +11 -11
  96. package/collection-preferences/content-display/styles.scoped.css +30 -40
  97. package/collection-preferences/content-display/styles.selectors.js +11 -11
  98. package/collection-preferences/styles.css.js +37 -37
  99. package/collection-preferences/styles.scoped.css +66 -79
  100. package/collection-preferences/styles.selectors.js +37 -37
  101. package/column-layout/flexible-column-layout/styles.css.js +5 -5
  102. package/column-layout/flexible-column-layout/styles.scoped.css +9 -8
  103. package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
  104. package/column-layout/styles.css.js +13 -13
  105. package/column-layout/styles.scoped.css +64 -70
  106. package/column-layout/styles.selectors.js +13 -13
  107. package/container/styles.css.js +28 -28
  108. package/container/styles.scoped.css +98 -106
  109. package/container/styles.selectors.js +28 -28
  110. package/content-layout/styles.css.js +7 -7
  111. package/content-layout/styles.scoped.css +15 -15
  112. package/content-layout/styles.selectors.js +7 -7
  113. package/date-picker/styles.css.js +7 -7
  114. package/date-picker/styles.scoped.css +12 -12
  115. package/date-picker/styles.selectors.js +7 -7
  116. package/date-range-picker/calendar/grids/styles.css.js +25 -25
  117. package/date-range-picker/calendar/grids/styles.scoped.css +60 -71
  118. package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  119. package/date-range-picker/relative-range/styles.css.js +9 -9
  120. package/date-range-picker/relative-range/styles.scoped.css +21 -21
  121. package/date-range-picker/relative-range/styles.selectors.js +9 -9
  122. package/date-range-picker/styles.css.js +38 -38
  123. package/date-range-picker/styles.scoped.css +68 -73
  124. package/date-range-picker/styles.selectors.js +38 -38
  125. package/drawer/styles.css.js +3 -3
  126. package/drawer/styles.scoped.css +18 -21
  127. package/drawer/styles.selectors.js +3 -3
  128. package/expandable-section/expandable-section-container.d.ts +2 -2
  129. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  130. package/expandable-section/expandable-section-container.js.map +1 -1
  131. package/expandable-section/expandable-section-header.d.ts +2 -3
  132. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  133. package/expandable-section/expandable-section-header.js +11 -7
  134. package/expandable-section/expandable-section-header.js.map +1 -1
  135. package/expandable-section/interfaces.d.ts +1 -0
  136. package/expandable-section/interfaces.d.ts.map +1 -1
  137. package/expandable-section/interfaces.js.map +1 -1
  138. package/expandable-section/internal.d.ts +4 -2
  139. package/expandable-section/internal.d.ts.map +1 -1
  140. package/expandable-section/internal.js.map +1 -1
  141. package/expandable-section/styles.css.js +32 -29
  142. package/expandable-section/styles.scoped.css +106 -99
  143. package/expandable-section/styles.selectors.js +32 -29
  144. package/expandable-section/utils.d.ts +3 -2
  145. package/expandable-section/utils.d.ts.map +1 -1
  146. package/expandable-section/utils.js +4 -1
  147. package/expandable-section/utils.js.map +1 -1
  148. package/file-upload/dropzone/styles.css.js +2 -2
  149. package/file-upload/dropzone/styles.scoped.css +4 -8
  150. package/file-upload/dropzone/styles.selectors.js +2 -2
  151. package/file-upload/file-option/styles.css.js +7 -7
  152. package/file-upload/file-option/styles.scoped.css +15 -15
  153. package/file-upload/file-option/styles.selectors.js +7 -7
  154. package/file-upload/styles.css.js +2 -2
  155. package/file-upload/styles.scoped.css +4 -4
  156. package/file-upload/styles.selectors.js +2 -2
  157. package/flashbar/styles.css.js +47 -47
  158. package/flashbar/styles.scoped.css +215 -220
  159. package/flashbar/styles.selectors.js +47 -47
  160. package/form/styles.css.js +9 -9
  161. package/form/styles.scoped.css +18 -18
  162. package/form/styles.selectors.js +9 -9
  163. package/form-field/styles.css.js +19 -19
  164. package/form-field/styles.scoped.css +34 -34
  165. package/form-field/styles.selectors.js +19 -19
  166. package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  167. package/internal/components/cartesian-chart/interfaces.js.map +1 -1
  168. package/internal/components/chart-plot/index.d.ts +1 -1
  169. package/internal/components/chart-plot/index.d.ts.map +1 -1
  170. package/internal/components/chart-plot/index.js.map +1 -1
  171. package/internal/components/chart-series-details/index.d.ts +12 -4
  172. package/internal/components/chart-series-details/index.d.ts.map +1 -1
  173. package/internal/components/chart-series-details/index.js +46 -10
  174. package/internal/components/chart-series-details/index.js.map +1 -1
  175. package/internal/components/chart-series-details/series-details-text.d.ts +2 -0
  176. package/internal/components/chart-series-details/series-details-text.d.ts.map +1 -0
  177. package/internal/components/chart-series-details/series-details-text.js +17 -0
  178. package/internal/components/chart-series-details/series-details-text.js.map +1 -0
  179. package/internal/components/chart-series-details/styles.css.js +19 -5
  180. package/internal/components/chart-series-details/styles.scoped.css +141 -15
  181. package/internal/components/chart-series-details/styles.selectors.js +19 -5
  182. package/internal/environment.js +1 -1
  183. package/internal/environment.json +1 -1
  184. package/internal/manifest.json +1 -1
  185. package/line-chart/interfaces.d.ts +2 -8
  186. package/line-chart/interfaces.d.ts.map +1 -1
  187. package/line-chart/interfaces.js.map +1 -1
  188. package/mixed-line-bar-chart/chart-container.d.ts +2 -1
  189. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  190. package/mixed-line-bar-chart/chart-container.js +17 -8
  191. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  192. package/mixed-line-bar-chart/chart-popover.d.ts +1 -0
  193. package/mixed-line-bar-chart/chart-popover.d.ts.map +1 -1
  194. package/mixed-line-bar-chart/chart-popover.js +13 -3
  195. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  196. package/mixed-line-bar-chart/format-highlighted.d.ts +7 -2
  197. package/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  198. package/mixed-line-bar-chart/format-highlighted.js +25 -5
  199. package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  200. package/mixed-line-bar-chart/interfaces.d.ts +38 -6
  201. package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  202. package/mixed-line-bar-chart/interfaces.js.map +1 -1
  203. package/mixed-line-bar-chart/internal.d.ts +1 -1
  204. package/mixed-line-bar-chart/internal.d.ts.map +1 -1
  205. package/mixed-line-bar-chart/internal.js +2 -2
  206. package/mixed-line-bar-chart/internal.js.map +1 -1
  207. package/modal/styles.css.js +23 -23
  208. package/modal/styles.scoped.css +39 -39
  209. package/modal/styles.selectors.js +23 -23
  210. package/package.json +1 -1
  211. package/pie-chart/interfaces.d.ts +5 -5
  212. package/pie-chart/interfaces.d.ts.map +1 -1
  213. package/pie-chart/interfaces.js.map +1 -1
  214. package/pie-chart/pie-chart.d.ts +1 -1
  215. package/pie-chart/pie-chart.d.ts.map +1 -1
  216. package/pie-chart/pie-chart.js +21 -18
  217. package/pie-chart/pie-chart.js.map +1 -1
  218. package/table/column-widths-utils.d.ts +1 -0
  219. package/table/column-widths-utils.d.ts.map +1 -1
  220. package/table/column-widths-utils.js +18 -0
  221. package/table/column-widths-utils.js.map +1 -1
  222. package/table/internal.d.ts.map +1 -1
  223. package/table/internal.js +7 -6
  224. package/table/internal.js.map +1 -1
  225. package/table/no-data-cell.d.ts +13 -0
  226. package/table/no-data-cell.d.ts.map +1 -0
  227. package/table/no-data-cell.js +24 -0
  228. package/table/no-data-cell.js.map +1 -0
  229. package/table/sticky-columns/use-sticky-columns.js +1 -1
  230. package/table/sticky-columns/use-sticky-columns.js.map +1 -1
  231. package/table/thead.d.ts +0 -1
  232. package/table/thead.d.ts.map +1 -1
  233. package/table/thead.js +3 -18
  234. package/table/thead.js.map +1 -1
  235. package/table/use-column-widths.d.ts +5 -3
  236. package/table/use-column-widths.d.ts.map +1 -1
  237. package/table/use-column-widths.js +61 -11
  238. package/table/use-column-widths.js.map +1 -1
  239. package/table/use-sticky-header.d.ts.map +1 -1
  240. package/table/use-sticky-header.js +0 -13
  241. package/table/use-sticky-header.js.map +1 -1
  242. package/test-utils/dom/internal/chart-popover.d.ts +8 -0
  243. package/test-utils/dom/internal/chart-popover.js +23 -0
  244. package/test-utils/dom/internal/chart-popover.js.map +1 -1
  245. package/test-utils/selectors/internal/chart-popover.d.ts +8 -0
  246. package/test-utils/selectors/internal/chart-popover.js +22 -0
  247. package/test-utils/selectors/internal/chart-popover.js.map +1 -1
  248. package/test-utils/tsconfig.tsbuildinfo +1 -1
  249. package/tiles/styles.css.js +29 -29
  250. package/tiles/styles.scoped.css +91 -97
  251. package/tiles/styles.selectors.js +29 -29
  252. package/table/node-data-cell.d.ts +0 -15
  253. package/table/node-data-cell.d.ts.map +0 -1
  254. package/table/node-data-cell.js +0 -25
  255. package/table/node-data-cell.js.map +0 -1
@@ -94,50 +94,49 @@ 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_block-body-scroll_19d8l_pb92y_97:not(#\9) {
97
+ .awsui_block-body-scroll_19d8l_dwyor_97:not(#\9) {
98
98
  overflow: hidden;
99
99
  }
100
100
 
101
- .awsui_mobile-bar_19d8l_pb92y_101:not(#\9) {
101
+ .awsui_mobile-bar_19d8l_dwyor_101:not(#\9) {
102
102
  position: sticky;
103
103
  display: flex;
104
104
  align-items: center;
105
105
  flex-shrink: 0;
106
106
  z-index: 1000;
107
- inline-size: 100%;
107
+ width: 100%;
108
108
  box-sizing: border-box;
109
109
  background-color: var(--color-background-layout-mobile-panel-0ussje, #000716);
110
110
  box-shadow: var(--shadow-panel-ezyqp4, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1));
111
- block-size: calc(2 * var(--space-m-udix3p, 16px) + var(--space-scaled-xs-26e2du, 8px));
111
+ height: calc(2 * var(--space-m-udix3p, 16px) + var(--space-scaled-xs-26e2du, 8px));
112
112
  }
113
113
 
114
- .awsui_mobile-bar-breadcrumbs_19d8l_pb92y_114:not(#\9) {
115
- min-inline-size: 0;
114
+ .awsui_mobile-bar-breadcrumbs_19d8l_dwyor_114:not(#\9) {
115
+ min-width: 0;
116
116
  flex: 1;
117
- margin-inline-start: var(--space-m-udix3p, 16px);
118
- margin-inline-end: var(--space-m-udix3p, 16px);
117
+ margin-left: var(--space-m-udix3p, 16px);
118
+ margin-right: var(--space-m-udix3p, 16px);
119
119
  }
120
120
 
121
- .awsui_mobile-toggle_19d8l_pb92y_121:not(#\9) {
121
+ .awsui_mobile-toggle_19d8l_dwyor_121:not(#\9) {
122
122
  box-sizing: border-box;
123
123
  cursor: pointer;
124
124
  z-index: 1;
125
- padding-block: var(--space-xxs-p8yyaw, 4px);
126
- padding-inline: 7px;
127
- inline-size: 40px;
125
+ padding: var(--space-xxs-p8yyaw, 4px) 7px;
126
+ width: 40px;
128
127
  color: var(--color-text-interactive-default-lnx6lk, #414d5c);
129
128
  }
130
- .awsui_mobile-toggle-type-navigation_19d8l_pb92y_130:not(#\9) {
131
- border-inline-end: 1px solid var(--color-border-layout-ownedw, #d1d5db);
129
+ .awsui_mobile-toggle-type-navigation_19d8l_dwyor_129:not(#\9) {
130
+ border-right: 1px solid var(--color-border-layout-ownedw, #d1d5db);
132
131
  }
133
- .awsui_mobile-toggle-type-tools_19d8l_pb92y_133:not(#\9), .awsui_mobile-toggle-type-drawer_19d8l_pb92y_133:not(#\9) {
134
- border-inline-start: 1px solid var(--color-border-layout-ownedw, #d1d5db);
132
+ .awsui_mobile-toggle-type-tools_19d8l_dwyor_132:not(#\9), .awsui_mobile-toggle-type-drawer_19d8l_dwyor_132:not(#\9) {
133
+ border-left: 1px solid var(--color-border-layout-ownedw, #d1d5db);
135
134
  }
136
- .awsui_mobile-toggle_19d8l_pb92y_121:not(#\9):hover {
135
+ .awsui_mobile-toggle_19d8l_dwyor_121:not(#\9):hover {
137
136
  background: var(--color-background-layout-panel-hover-n9apd3, #e9ebed);
138
137
  }
139
138
 
140
- .awsui_drawers-container_19d8l_pb92y_140:not(#\9) {
139
+ .awsui_drawers-container_19d8l_dwyor_139:not(#\9) {
141
140
  display: flex;
142
141
  align-items: stretch;
143
142
  }
@@ -2,13 +2,13 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "block-body-scroll": "awsui_block-body-scroll_19d8l_pb92y_97",
6
- "mobile-bar": "awsui_mobile-bar_19d8l_pb92y_101",
7
- "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_pb92y_114",
8
- "mobile-toggle": "awsui_mobile-toggle_19d8l_pb92y_121",
9
- "mobile-toggle-type-navigation": "awsui_mobile-toggle-type-navigation_19d8l_pb92y_130",
10
- "mobile-toggle-type-tools": "awsui_mobile-toggle-type-tools_19d8l_pb92y_133",
11
- "mobile-toggle-type-drawer": "awsui_mobile-toggle-type-drawer_19d8l_pb92y_133",
12
- "drawers-container": "awsui_drawers-container_19d8l_pb92y_140"
5
+ "block-body-scroll": "awsui_block-body-scroll_19d8l_dwyor_97",
6
+ "mobile-bar": "awsui_mobile-bar_19d8l_dwyor_101",
7
+ "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_dwyor_114",
8
+ "mobile-toggle": "awsui_mobile-toggle_19d8l_dwyor_121",
9
+ "mobile-toggle-type-navigation": "awsui_mobile-toggle-type-navigation_19d8l_dwyor_129",
10
+ "mobile-toggle-type-tools": "awsui_mobile-toggle-type-tools_19d8l_dwyor_132",
11
+ "mobile-toggle-type-drawer": "awsui_mobile-toggle-type-drawer_19d8l_dwyor_132",
12
+ "drawers-container": "awsui_drawers-container_19d8l_dwyor_139"
13
13
  };
14
14
 
@@ -1,8 +1,8 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "notifications": "awsui_notifications_1hmm4_1c5i2_9",
5
- "notifications-sticky": "awsui_notifications-sticky_1hmm4_1c5i2_10",
6
- "no-content-paddings": "awsui_no-content-paddings_1hmm4_1c5i2_25"
4
+ "notifications": "awsui_notifications_1hmm4_u4j31_9",
5
+ "notifications-sticky": "awsui_notifications-sticky_1hmm4_u4j31_10",
6
+ "no-content-paddings": "awsui_no-content-paddings_1hmm4_u4j31_25"
7
7
  };
8
8
 
@@ -6,23 +6,23 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- .awsui_notifications_1hmm4_1c5i2_9:not(#\9),
10
- .awsui_notifications-sticky_1hmm4_1c5i2_10:not(#\9) {
9
+ .awsui_notifications_1hmm4_u4j31_9:not(#\9),
10
+ .awsui_notifications-sticky_1hmm4_u4j31_10:not(#\9) {
11
11
  z-index: 850;
12
12
  }
13
13
 
14
- .awsui_notifications_1hmm4_1c5i2_9:not(#\9) {
14
+ .awsui_notifications_1hmm4_u4j31_9:not(#\9) {
15
15
  /* This is necessary for the z-index to have effect */
16
16
  position: relative;
17
17
  }
18
18
 
19
- .awsui_notifications-sticky_1hmm4_1c5i2_10:not(#\9) {
20
- inset-block-start: 0;
19
+ .awsui_notifications-sticky_1hmm4_u4j31_10:not(#\9) {
20
+ top: 0;
21
21
  position: sticky;
22
22
  --awsui-flashbar-sticky-bottom-margin-y98gph: var(--space-xxl-cu2m1r, 32px);
23
23
  }
24
24
 
25
- .awsui_no-content-paddings_1hmm4_1c5i2_25:not(#\9) {
25
+ .awsui_no-content-paddings_1hmm4_u4j31_25:not(#\9) {
26
26
  /*
27
27
  When using the disableContentPaddings option, the Flashbar will use this custom property to add additional space
28
28
  when the notification bar is rendered, to prevent it from overlapping the content.
@@ -2,8 +2,8 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "notifications": "awsui_notifications_1hmm4_1c5i2_9",
6
- "notifications-sticky": "awsui_notifications-sticky_1hmm4_1c5i2_10",
7
- "no-content-paddings": "awsui_no-content-paddings_1hmm4_1c5i2_25"
5
+ "notifications": "awsui_notifications_1hmm4_u4j31_9",
6
+ "notifications-sticky": "awsui_notifications-sticky_1hmm4_u4j31_10",
7
+ "no-content-paddings": "awsui_no-content-paddings_1hmm4_u4j31_25"
8
8
  };
9
9
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "drawer-displayed": "awsui_drawer-displayed_1lh3u_ogmrn_97",
5
- "drawer-content": "awsui_drawer-content_1lh3u_ogmrn_101"
4
+ "drawer-displayed": "awsui_drawer-displayed_1lh3u_475ep_97",
5
+ "drawer-content": "awsui_drawer-content_1lh3u_475ep_101"
6
6
  };
7
7
 
@@ -94,10 +94,10 @@ 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_drawer-displayed_1lh3u_ogmrn_97:not(#\9) {
98
- min-inline-size: 40px;
97
+ .awsui_drawer-displayed_1lh3u_475ep_97:not(#\9) {
98
+ min-width: 40px;
99
99
  }
100
100
 
101
- .awsui_drawer-content_1lh3u_ogmrn_101:not(#\9) {
101
+ .awsui_drawer-content_1lh3u_475ep_101:not(#\9) {
102
102
  position: fixed;
103
103
  }
@@ -2,7 +2,7 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "drawer-displayed": "awsui_drawer-displayed_1lh3u_ogmrn_97",
6
- "drawer-content": "awsui_drawer-content_1lh3u_ogmrn_101"
5
+ "drawer-displayed": "awsui_drawer-displayed_1lh3u_475ep_97",
6
+ "drawer-content": "awsui_drawer-content_1lh3u_475ep_101"
7
7
  };
8
8
 
@@ -1,21 +1,21 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "resize-active": "awsui_resize-active_lm6vo_1fppq_98",
5
- "resize-side": "awsui_resize-side_lm6vo_1fppq_104",
6
- "resize-bottom": "awsui_resize-bottom_lm6vo_1fppq_107",
7
- "with-motion": "awsui_with-motion_lm6vo_1fppq_112",
8
- "root": "awsui_root_lm6vo_1fppq_127",
9
- "root-no-scroll": "awsui_root-no-scroll_lm6vo_1fppq_134",
10
- "layout": "awsui_layout_lm6vo_1fppq_139",
11
- "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_1fppq_145",
12
- "layout-main": "awsui_layout-main_lm6vo_1fppq_149",
13
- "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_1fppq_155",
14
- "unfocusable": "awsui_unfocusable_lm6vo_1fppq_160",
15
- "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_1fppq_164",
16
- "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_1fppq_169",
17
- "content-wrapper": "awsui_content-wrapper_lm6vo_1fppq_173",
18
- "content-overlapped": "awsui_content-overlapped_lm6vo_1fppq_177",
19
- "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_1fppq_181"
4
+ "resize-active": "awsui_resize-active_lm6vo_14yfe_98",
5
+ "resize-side": "awsui_resize-side_lm6vo_14yfe_104",
6
+ "resize-bottom": "awsui_resize-bottom_lm6vo_14yfe_107",
7
+ "with-motion": "awsui_with-motion_lm6vo_14yfe_112",
8
+ "root": "awsui_root_lm6vo_14yfe_127",
9
+ "root-no-scroll": "awsui_root-no-scroll_lm6vo_14yfe_134",
10
+ "layout": "awsui_layout_lm6vo_14yfe_139",
11
+ "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_14yfe_145",
12
+ "layout-main": "awsui_layout-main_lm6vo_14yfe_149",
13
+ "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_14yfe_155",
14
+ "unfocusable": "awsui_unfocusable_lm6vo_14yfe_160",
15
+ "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_14yfe_164",
16
+ "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_14yfe_169",
17
+ "content-wrapper": "awsui_content-wrapper_lm6vo_14yfe_173",
18
+ "content-overlapped": "awsui_content-overlapped_lm6vo_14yfe_177",
19
+ "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_14yfe_181"
20
20
  };
21
21
 
@@ -95,90 +95,90 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
97
  /* stylelint-disable selector-combinator-disallowed-list, selector-max-type, selector-max-universal */
98
- .awsui_resize-active_lm6vo_1fppq_98 *:not(#\9) {
98
+ .awsui_resize-active_lm6vo_14yfe_98 *:not(#\9) {
99
99
  -webkit-user-select: none;
100
100
  user-select: none;
101
101
  }
102
- .awsui_resize-active_lm6vo_1fppq_98 iframe:not(#\9) {
102
+ .awsui_resize-active_lm6vo_14yfe_98 iframe:not(#\9) {
103
103
  pointer-events: none;
104
104
  }
105
- .awsui_resize-side_lm6vo_1fppq_104 *:not(#\9) {
105
+ .awsui_resize-side_lm6vo_14yfe_104 *:not(#\9) {
106
106
  cursor: ew-resize;
107
107
  }
108
- .awsui_resize-bottom_lm6vo_1fppq_107 *:not(#\9) {
108
+ .awsui_resize-bottom_lm6vo_14yfe_107 *:not(#\9) {
109
109
  cursor: ns-resize;
110
110
  }
111
111
 
112
112
  /* stylelint-enable selector-combinator-disallowed-list, selector-max-type, selector-max-universal */
113
- .awsui_with-motion_lm6vo_1fppq_112:not(#\9) {
113
+ .awsui_with-motion_lm6vo_14yfe_112:not(#\9) {
114
114
  transition: var(--motion-duration-refresh-only-fast-4jn2d7, 115ms);
115
115
  transition-property: border-color, opacity, width;
116
116
  }
117
117
  @media (prefers-reduced-motion: reduce) {
118
- .awsui_with-motion_lm6vo_1fppq_112:not(#\9) {
118
+ .awsui_with-motion_lm6vo_14yfe_112:not(#\9) {
119
119
  animation: none;
120
120
  transition: none;
121
121
  }
122
122
  }
123
- .awsui-motion-disabled .awsui_with-motion_lm6vo_1fppq_112:not(#\9), .awsui-mode-entering .awsui_with-motion_lm6vo_1fppq_112:not(#\9) {
123
+ .awsui-motion-disabled .awsui_with-motion_lm6vo_14yfe_112:not(#\9), .awsui-mode-entering .awsui_with-motion_lm6vo_14yfe_112:not(#\9) {
124
124
  animation: none;
125
125
  transition: none;
126
126
  }
127
127
 
128
- .awsui_root_lm6vo_1fppq_127:not(#\9) {
128
+ .awsui_root_lm6vo_14yfe_127:not(#\9) {
129
129
  display: flex;
130
130
  flex-direction: column;
131
131
  position: relative;
132
132
  color: var(--color-text-body-default-2sxhhn, #000716);
133
133
  }
134
134
 
135
- .awsui_root-no-scroll_lm6vo_1fppq_134:not(#\9) {
135
+ .awsui_root-no-scroll_lm6vo_14yfe_134:not(#\9) {
136
136
  position: relative;
137
137
  z-index: 1;
138
138
  }
139
139
 
140
- .awsui_layout_lm6vo_1fppq_139:not(#\9) {
140
+ .awsui_layout_lm6vo_14yfe_139:not(#\9) {
141
141
  flex: 1 1 auto;
142
142
  display: flex;
143
143
  align-items: stretch;
144
144
  background-color: var(--color-background-layout-main-nx09lr, #ffffff);
145
145
  }
146
- .awsui_layout-no-scroll_lm6vo_1fppq_145:not(#\9) {
146
+ .awsui_layout-no-scroll_lm6vo_14yfe_145:not(#\9) {
147
147
  overflow: hidden;
148
148
  }
149
149
 
150
- .awsui_layout-main_lm6vo_1fppq_149:not(#\9) {
150
+ .awsui_layout-main_lm6vo_14yfe_149:not(#\9) {
151
151
  flex: 1;
152
- min-inline-size: 0;
152
+ min-width: 0;
153
153
  background-color: var(--color-background-layout-main-nx09lr, #ffffff);
154
154
  position: relative;
155
155
  }
156
- .awsui_layout-main-scrollable_lm6vo_1fppq_155:not(#\9) {
156
+ .awsui_layout-main-scrollable_lm6vo_14yfe_155:not(#\9) {
157
157
  overflow: auto;
158
158
  }
159
159
 
160
160
  /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
161
- .awsui_unfocusable_lm6vo_1fppq_160 *:not(#\9) {
161
+ .awsui_unfocusable_lm6vo_14yfe_160 *:not(#\9) {
162
162
  visibility: hidden;
163
163
  }
164
164
 
165
- .awsui_breadcrumbs-desktop_lm6vo_1fppq_164:not(#\9) {
166
- padding-block-start: var(--space-scaled-m-mo5yse, 16px);
167
- padding-block-end: var(--space-scaled-s-aqzyko, 12px);
165
+ .awsui_breadcrumbs-desktop_lm6vo_14yfe_164:not(#\9) {
166
+ padding-top: var(--space-scaled-m-mo5yse, 16px);
167
+ padding-bottom: var(--space-scaled-s-aqzyko, 12px);
168
168
  }
169
169
 
170
- .awsui_content-header-wrapper_lm6vo_1fppq_169:not(#\9) {
171
- padding-block-end: var(--space-content-header-padding-bottom-y2enua, 16px);
170
+ .awsui_content-header-wrapper_lm6vo_14yfe_169:not(#\9) {
171
+ padding-bottom: var(--space-content-header-padding-bottom-y2enua, 16px);
172
172
  }
173
173
 
174
- .awsui_content-wrapper_lm6vo_1fppq_173:not(#\9) {
175
- padding-block-end: var(--space-layout-content-bottom-noqzmw, 40px);
174
+ .awsui_content-wrapper_lm6vo_14yfe_173:not(#\9) {
175
+ padding-bottom: var(--space-layout-content-bottom-noqzmw, 40px);
176
176
  }
177
177
 
178
- .awsui_content-overlapped_lm6vo_1fppq_177:not(#\9) {
179
- margin-block-start: calc(-1 * var(--space-dark-header-overlap-distance-lxpp0s, 36px));
178
+ .awsui_content-overlapped_lm6vo_14yfe_177:not(#\9) {
179
+ margin-top: calc(-1 * var(--space-dark-header-overlap-distance-lxpp0s, 36px));
180
180
  }
181
181
 
182
- .awsui_content-extra-top-padding_lm6vo_1fppq_181:not(#\9) {
183
- padding-block-start: var(--space-scaled-m-mo5yse, 16px);
182
+ .awsui_content-extra-top-padding_lm6vo_14yfe_181:not(#\9) {
183
+ padding-top: var(--space-scaled-m-mo5yse, 16px);
184
184
  }
@@ -2,21 +2,21 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "resize-active": "awsui_resize-active_lm6vo_1fppq_98",
6
- "resize-side": "awsui_resize-side_lm6vo_1fppq_104",
7
- "resize-bottom": "awsui_resize-bottom_lm6vo_1fppq_107",
8
- "with-motion": "awsui_with-motion_lm6vo_1fppq_112",
9
- "root": "awsui_root_lm6vo_1fppq_127",
10
- "root-no-scroll": "awsui_root-no-scroll_lm6vo_1fppq_134",
11
- "layout": "awsui_layout_lm6vo_1fppq_139",
12
- "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_1fppq_145",
13
- "layout-main": "awsui_layout-main_lm6vo_1fppq_149",
14
- "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_1fppq_155",
15
- "unfocusable": "awsui_unfocusable_lm6vo_1fppq_160",
16
- "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_1fppq_164",
17
- "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_1fppq_169",
18
- "content-wrapper": "awsui_content-wrapper_lm6vo_1fppq_173",
19
- "content-overlapped": "awsui_content-overlapped_lm6vo_1fppq_177",
20
- "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_1fppq_181"
5
+ "resize-active": "awsui_resize-active_lm6vo_14yfe_98",
6
+ "resize-side": "awsui_resize-side_lm6vo_14yfe_104",
7
+ "resize-bottom": "awsui_resize-bottom_lm6vo_14yfe_107",
8
+ "with-motion": "awsui_with-motion_lm6vo_14yfe_112",
9
+ "root": "awsui_root_lm6vo_14yfe_127",
10
+ "root-no-scroll": "awsui_root-no-scroll_lm6vo_14yfe_134",
11
+ "layout": "awsui_layout_lm6vo_14yfe_139",
12
+ "layout-no-scroll": "awsui_layout-no-scroll_lm6vo_14yfe_145",
13
+ "layout-main": "awsui_layout-main_lm6vo_14yfe_149",
14
+ "layout-main-scrollable": "awsui_layout-main-scrollable_lm6vo_14yfe_155",
15
+ "unfocusable": "awsui_unfocusable_lm6vo_14yfe_160",
16
+ "breadcrumbs-desktop": "awsui_breadcrumbs-desktop_lm6vo_14yfe_164",
17
+ "content-header-wrapper": "awsui_content-header-wrapper_lm6vo_14yfe_169",
18
+ "content-wrapper": "awsui_content-wrapper_lm6vo_14yfe_173",
19
+ "content-overlapped": "awsui_content-overlapped_lm6vo_14yfe_177",
20
+ "content-extra-top-padding": "awsui_content-extra-top-padding_lm6vo_14yfe_181"
21
21
  };
22
22
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "toggle-button": "awsui_toggle-button_16w0h_homtu_93",
5
- "close-button": "awsui_close-button_16w0h_homtu_124"
4
+ "toggle-button": "awsui_toggle-button_16w0h_13xq1_93",
5
+ "close-button": "awsui_close-button_16w0h_13xq1_123"
6
6
  };
7
7
 
@@ -90,26 +90,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_toggle-button_16w0h_homtu_93:not(#\9) {
93
+ .awsui_toggle-button_16w0h_13xq1_93:not(#\9) {
94
94
  cursor: pointer;
95
95
  border: 0;
96
- padding-block: calc(var(--space-scaled-xxs-7597g1, 4px) + 1px);
97
- padding-inline: calc(var(--space-xxs-p8yyaw, 4px) + 1px);
96
+ padding: calc(var(--space-scaled-xxs-7597g1, 4px) + 1px) calc(var(--space-xxs-p8yyaw, 4px) + 1px);
98
97
  background: transparent;
99
98
  color: currentColor;
100
99
  }
101
- .awsui_toggle-button_16w0h_homtu_93:not(#\9):focus {
100
+ .awsui_toggle-button_16w0h_13xq1_93:not(#\9):focus {
102
101
  outline: none;
103
102
  text-decoration: none;
104
103
  }
105
- body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_homtu_93:not(#\9):focus {
104
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_13xq1_93:not(#\9):focus {
106
105
  position: relative;
107
106
  }
108
- body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_homtu_93:not(#\9):focus {
107
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_13xq1_93:not(#\9):focus {
109
108
  outline: 2px dotted transparent;
110
109
  outline-offset: calc(var(--space-button-inline-icon-focus-outline-gutter-vk4r2v, 0px) - 1px);
111
110
  }
112
- body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_homtu_93:not(#\9):focus::before {
111
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_13xq1_93:not(#\9):focus::before {
113
112
  content: " ";
114
113
  display: block;
115
114
  position: absolute;
@@ -121,10 +120,10 @@ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_homtu_93:not(#\9)
121
120
  box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
122
121
  }
123
122
 
124
- .awsui_close-button_16w0h_homtu_124:not(#\9) {
123
+ .awsui_close-button_16w0h_13xq1_123:not(#\9) {
125
124
  position: absolute;
126
125
  outline: none;
127
- inset-inline-end: var(--space-m-udix3p, 16px);
128
- inset-block-start: var(--size-vertical-panel-icon-offset-wy8j08, 15px);
126
+ right: var(--space-m-udix3p, 16px);
127
+ top: var(--size-vertical-panel-icon-offset-wy8j08, 15px);
129
128
  z-index: 1;
130
129
  }
@@ -2,7 +2,7 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "toggle-button": "awsui_toggle-button_16w0h_homtu_93",
6
- "close-button": "awsui_close-button_16w0h_homtu_124"
5
+ "toggle-button": "awsui_toggle-button_16w0h_13xq1_93",
6
+ "close-button": "awsui_close-button_16w0h_13xq1_123"
7
7
  };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"use-drawers.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAA4B,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAiB,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAWtD,SAAS,kBAAkB,CAAC,KAAiB;IAC3C,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC;IACpD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACzE,OAAO;QACL,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,KAAK,CAAC,KAAK;QACpB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE;YACV,aAAa,EAAE,SAAS;YACxB,WAAW,EAAE,UAAU;YACvB,UAAU,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EA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CAAC;IAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,mCAAI,GAAG,EAAE,GAAG,CAAC,CAAC;IAEtE,OAAO;QACL,qBAAqB,EAAE,UAAU;QACjC,OAAO,EAAE,eAAe,IAAI,SAAS;QACrC,YAAY;QACZ,cAAc,EAAE,sBAAsB;QACtC,gBAAgB;QAChB,aAAa;QACb,oBAAoB;QACpB,oBAAoB;KACrB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { BetaDrawersProps } from '../drawer/interfaces';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { fireNonCancelableEvent, NonCancelableCustomEvent } from '../../internal/events';\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { convertRuntimeDrawers, DrawersLayout } from '../runtime-api';\nimport { AppLayoutProps } from '../interfaces';\nimport { togglesConfig } from '../toggles';\n\nexport const TOOLS_DRAWER_ID = 'awsui-internal-tools';\n\ninterface ToolsProps {\n toolsHide: boolean | undefined;\n toolsOpen: boolean | undefined;\n toolsWidth: number;\n tools: React.ReactNode | undefined;\n onToolsToggle: (newOpen: boolean) => void;\n ariaLabels: AppLayoutProps.Labels | undefined;\n}\n\nfunction getToolsDrawerItem(props: ToolsProps): AppLayoutProps.Drawer | null {\n if (props.toolsHide) {\n return null;\n }\n const { iconName, getLabels } = togglesConfig.tools;\n const { mainLabel, closeLabel, openLabel } = getLabels(props.ariaLabels);\n return {\n id: TOOLS_DRAWER_ID,\n content: props.tools,\n resizable: false,\n ariaLabels: {\n triggerButton: openLabel,\n closeButton: closeLabel,\n drawerName: mainLabel ?? '',\n },\n trigger: {\n iconName: iconName,\n },\n };\n}\n\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null) => void\n) {\n const [runtimeDrawers, setRuntimeDrawers] = useState<DrawersLayout>({ before: [], after: [] });\n const onActiveDrawerChangeStable = useStableCallback(onActiveDrawerChange);\n\n const drawerWasOpenRef = useRef(false);\n drawerWasOpenRef.current = drawerWasOpenRef.current || !!activeDrawerId;\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers => {\n setRuntimeDrawers(convertRuntimeDrawers(drawers));\n if (!drawerWasOpenRef.current) {\n const defaultActiveDrawer = sortByPriority(drawers).find(drawer => drawer.defaultActive);\n if (defaultActiveDrawer) {\n onActiveDrawerChangeStable(defaultActiveDrawer.id);\n }\n }\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ before: [], after: [] });\n };\n }, [disableRuntimeDrawers, onActiveDrawerChangeStable]);\n\n return runtimeDrawers;\n}\n\nfunction isBetaDrawers(drawers: unknown): drawers is BetaDrawersProps {\n return typeof drawers === 'object' && !!drawers && !Array.isArray(drawers) && 'items' in drawers;\n}\n\nfunction convertBetaApi(drawers: BetaDrawersProps, ariaLabels: AppLayoutProps['ariaLabels']) {\n return {\n drawers: drawers.items.map(\n (betaDrawer): AppLayoutProps.Drawer => ({\n ...betaDrawer,\n ariaLabels: { drawerName: betaDrawer.ariaLabels?.content ?? '', ...betaDrawer.ariaLabels },\n onResize: event => {\n fireNonCancelableEvent(betaDrawer.onResize, { size: event.detail.size, id: betaDrawer.id });\n fireNonCancelableEvent(drawers.onResize, { size: event.detail.size, id: betaDrawer.id });\n },\n })\n ),\n controlledActiveDrawerId: drawers.activeDrawerId,\n onDrawerChange: (event: NonCancelableCustomEvent<{ activeDrawerId: string | null }>) =>\n fireNonCancelableEvent(drawers.onChange, event.detail.activeDrawerId),\n ariaLabels: {\n ...ariaLabels,\n drawers: drawers.ariaLabel,\n drawersOverflow: drawers.overflowAriaLabel,\n drawersOverflowWithBadge: drawers.overflowWithBadgeAriaLabel,\n },\n };\n}\n\nfunction applyToolsDrawer(toolsProps: ToolsProps, runtimeDrawers: DrawersLayout) {\n const drawers = [...runtimeDrawers.before, ...runtimeDrawers.after];\n if (drawers.length === 0) {\n return null;\n }\n const toolsItem = getToolsDrawerItem(toolsProps);\n if (toolsItem) {\n drawers.unshift(toolsItem);\n }\n\n return drawers;\n}\n\ntype UseDrawersProps = Pick<AppLayoutProps, 'drawers' | 'activeDrawerId' | 'onDrawerChange'> & {\n __disableRuntimeDrawers?: boolean;\n};\n\nexport function useDrawers(\n {\n drawers,\n activeDrawerId: controlledActiveDrawerId,\n onDrawerChange,\n __disableRuntimeDrawers: disableRuntimeDrawers,\n }: UseDrawersProps,\n ariaLabels: AppLayoutProps['ariaLabels'],\n toolsProps: ToolsProps\n) {\n if (isBetaDrawers(drawers)) {\n ({ drawers, controlledActiveDrawerId, onDrawerChange, ariaLabels } = convertBetaApi(drawers, ariaLabels));\n }\n\n const [activeDrawerId = null, setActiveDrawerId] = useControllable(controlledActiveDrawerId, onDrawerChange, null, {\n componentName: 'AppLayout',\n controlledProp: 'activeDrawerId',\n changeHandler: 'onChange',\n });\n const [drawerSizes, setDrawerSizes] = useState<Record<string, number>>({});\n\n function onActiveDrawerResize({ id, size }: { id: string; size: number }) {\n setDrawerSizes(oldSizes => ({ ...oldSizes, [id]: size }));\n fireNonCancelableEvent(activeDrawer?.onResize, { id, size });\n }\n\n function onActiveDrawerChange(newDrawerId: string | null) {\n setActiveDrawerId(newDrawerId);\n if (hasOwnDrawers) {\n fireNonCancelableEvent(onDrawerChange, { activeDrawerId: newDrawerId });\n } else if (!toolsProps.toolsHide) {\n toolsProps.onToolsToggle(newDrawerId === TOOLS_DRAWER_ID);\n }\n }\n\n const hasOwnDrawers = !!drawers;\n const runtimeDrawers = useRuntimeDrawers(disableRuntimeDrawers, activeDrawerId, onActiveDrawerChange);\n const combinedDrawers = drawers\n ? [...runtimeDrawers.before, ...drawers, ...runtimeDrawers.after]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\n // support toolsOpen in runtime-drawers-only mode\n let activeDrawerIdResolved = toolsProps?.toolsOpen && !hasOwnDrawers ? TOOLS_DRAWER_ID : activeDrawerId;\n const activeDrawer = combinedDrawers?.find(drawer => drawer.id === activeDrawerIdResolved);\n // ensure that id is only defined when the drawer exists\n activeDrawerIdResolved = activeDrawer?.id ?? null;\n\n const activeDrawerSize = activeDrawerIdResolved\n ? drawerSizes[activeDrawerIdResolved] ?? activeDrawer?.defaultSize ?? toolsProps.toolsWidth\n : toolsProps.toolsWidth;\n const minDrawerSize = Math.min(activeDrawer?.defaultSize ?? 290, 290);\n\n return {\n ariaLabelsWithDrawers: ariaLabels,\n drawers: combinedDrawers || undefined,\n activeDrawer,\n activeDrawerId: activeDrawerIdResolved,\n activeDrawerSize,\n minDrawerSize,\n onActiveDrawerChange,\n onActiveDrawerResize,\n };\n}\n"]}
1
+ {"version":3,"file":"use-drawers.js","sourceRoot":"lib/default/","sources":["app-layout/utils/use-drawers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAA4B,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAiB,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,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,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC;IACxG,MAAM,YAAY,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,sBAAsB,CAAC,CAAC;IAC3F,wDAAwD;IACxD,sBAAsB,GAAG,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,EAAE,mCAAI,IAAI,CAAC;IAElD,MAAM,gBAAgB,GAAG,sBAAsB;QAC7C,CAAC,CAAC,MAAA,MAAA,WAAW,CAAC,sBAAsB,CAAC,mCAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,mCAAI,UAAU,CAAC,UAAU;QAC3F,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,mCAAI,GAAG,EAAE,GAAG,CAAC,CAAC;IAEtE,OAAO;QACL,qBAAqB,EAAE,UAAU;QACjC,OAAO,EAAE,eAAe,IAAI,SAAS;QACrC,YAAY;QACZ,cAAc,EAAE,sBAAsB;QACtC,gBAAgB;QAChB,aAAa;QACb,oBAAoB;QACpB,oBAAoB;KACrB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { BetaDrawersProps } from '../drawer/interfaces';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { fireNonCancelableEvent, NonCancelableCustomEvent } from '../../internal/events';\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { convertRuntimeDrawers, DrawersLayout } from '../runtime-api';\nimport { AppLayoutProps } from '../interfaces';\nimport { togglesConfig } from '../toggles';\n\nexport const TOOLS_DRAWER_ID = 'awsui-internal-tools';\n\ninterface ToolsProps {\n toolsHide: boolean | undefined;\n toolsOpen: boolean | undefined;\n toolsWidth: number;\n tools: React.ReactNode | undefined;\n onToolsToggle: (newOpen: boolean) => void;\n ariaLabels: AppLayoutProps.Labels | undefined;\n}\n\nfunction getToolsDrawerItem(props: ToolsProps): AppLayoutProps.Drawer | null {\n if (props.toolsHide) {\n return null;\n }\n const { iconName, getLabels } = togglesConfig.tools;\n const { mainLabel, closeLabel, openLabel } = getLabels(props.ariaLabels);\n return {\n id: TOOLS_DRAWER_ID,\n content: props.tools,\n resizable: false,\n ariaLabels: {\n triggerButton: openLabel,\n closeButton: closeLabel,\n drawerName: mainLabel ?? '',\n },\n trigger: {\n iconName: iconName,\n },\n };\n}\n\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null) => void\n) {\n const [runtimeDrawers, setRuntimeDrawers] = useState<DrawersLayout>({ before: [], after: [] });\n const onActiveDrawerChangeStable = useStableCallback(onActiveDrawerChange);\n\n const drawerWasOpenRef = useRef(false);\n drawerWasOpenRef.current = drawerWasOpenRef.current || !!activeDrawerId;\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers => {\n setRuntimeDrawers(convertRuntimeDrawers(drawers));\n if (!drawerWasOpenRef.current) {\n const defaultActiveDrawer = sortByPriority(drawers).find(drawer => drawer.defaultActive);\n if (defaultActiveDrawer) {\n onActiveDrawerChangeStable(defaultActiveDrawer.id);\n }\n }\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ before: [], after: [] });\n };\n }, [disableRuntimeDrawers, onActiveDrawerChangeStable]);\n\n return runtimeDrawers;\n}\n\nfunction isBetaDrawers(drawers: unknown): drawers is BetaDrawersProps {\n return typeof drawers === 'object' && !!drawers && !Array.isArray(drawers) && 'items' in drawers;\n}\n\nfunction convertBetaApi(drawers: BetaDrawersProps, ariaLabels: AppLayoutProps['ariaLabels']) {\n return {\n drawers: drawers.items.map(\n (betaDrawer): AppLayoutProps.Drawer => ({\n ...betaDrawer,\n ariaLabels: { drawerName: betaDrawer.ariaLabels?.content ?? '', ...betaDrawer.ariaLabels },\n onResize: event => {\n fireNonCancelableEvent(betaDrawer.onResize, { size: event.detail.size, id: betaDrawer.id });\n fireNonCancelableEvent(drawers.onResize, { size: event.detail.size, id: betaDrawer.id });\n },\n })\n ),\n controlledActiveDrawerId: drawers.activeDrawerId,\n onDrawerChange: (event: NonCancelableCustomEvent<AppLayoutProps.DrawerChangeDetail>) =>\n fireNonCancelableEvent(drawers.onChange, event.detail.activeDrawerId),\n ariaLabels: {\n ...ariaLabels,\n drawers: drawers.ariaLabel,\n drawersOverflow: drawers.overflowAriaLabel,\n drawersOverflowWithBadge: drawers.overflowWithBadgeAriaLabel,\n },\n };\n}\n\nfunction applyToolsDrawer(toolsProps: ToolsProps, runtimeDrawers: DrawersLayout) {\n const drawers = [...runtimeDrawers.before, ...runtimeDrawers.after];\n if (drawers.length === 0) {\n return null;\n }\n const toolsItem = getToolsDrawerItem(toolsProps);\n if (toolsItem) {\n drawers.unshift(toolsItem);\n }\n\n return drawers;\n}\n\ntype UseDrawersProps = Pick<AppLayoutProps, 'drawers' | 'activeDrawerId' | 'onDrawerChange'> & {\n __disableRuntimeDrawers?: boolean;\n};\n\nexport function useDrawers(\n {\n drawers,\n activeDrawerId: controlledActiveDrawerId,\n onDrawerChange,\n __disableRuntimeDrawers: disableRuntimeDrawers,\n }: UseDrawersProps,\n ariaLabels: AppLayoutProps['ariaLabels'],\n toolsProps: ToolsProps\n) {\n if (isBetaDrawers(drawers)) {\n ({ drawers, controlledActiveDrawerId, onDrawerChange, ariaLabels } = convertBetaApi(drawers, ariaLabels));\n }\n\n const [activeDrawerId = null, setActiveDrawerId] = useControllable(controlledActiveDrawerId, onDrawerChange, null, {\n componentName: 'AppLayout',\n controlledProp: 'activeDrawerId',\n changeHandler: 'onChange',\n });\n const [drawerSizes, setDrawerSizes] = useState<Record<string, number>>({});\n\n function onActiveDrawerResize({ id, size }: { id: string; size: number }) {\n setDrawerSizes(oldSizes => ({ ...oldSizes, [id]: size }));\n fireNonCancelableEvent(activeDrawer?.onResize, { id, size });\n }\n\n function onActiveDrawerChange(newDrawerId: string | null) {\n setActiveDrawerId(newDrawerId);\n if (hasOwnDrawers) {\n fireNonCancelableEvent(onDrawerChange, { activeDrawerId: newDrawerId });\n } else if (!toolsProps.toolsHide) {\n toolsProps.onToolsToggle(newDrawerId === TOOLS_DRAWER_ID);\n }\n }\n\n const hasOwnDrawers = !!drawers;\n const runtimeDrawers = useRuntimeDrawers(disableRuntimeDrawers, activeDrawerId, onActiveDrawerChange);\n const combinedDrawers = drawers\n ? [...runtimeDrawers.before, ...drawers, ...runtimeDrawers.after]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\n // support toolsOpen in runtime-drawers-only mode\n let activeDrawerIdResolved = toolsProps?.toolsOpen && !hasOwnDrawers ? TOOLS_DRAWER_ID : activeDrawerId;\n const activeDrawer = combinedDrawers?.find(drawer => drawer.id === activeDrawerIdResolved);\n // ensure that id is only defined when the drawer exists\n activeDrawerIdResolved = activeDrawer?.id ?? null;\n\n const activeDrawerSize = activeDrawerIdResolved\n ? drawerSizes[activeDrawerIdResolved] ?? activeDrawer?.defaultSize ?? toolsProps.toolsWidth\n : toolsProps.toolsWidth;\n const minDrawerSize = Math.min(activeDrawer?.defaultSize ?? 290, 290);\n\n return {\n ariaLabelsWithDrawers: ariaLabels,\n drawers: combinedDrawers || undefined,\n activeDrawer,\n activeDrawerId: activeDrawerIdResolved,\n activeDrawerSize,\n minDrawerSize,\n onActiveDrawerChange,\n onActiveDrawerResize,\n };\n}\n"]}
@@ -188,7 +188,7 @@ export const AppLayoutInternalsProvider = React.forwardRef((_a, forwardRef) => {
188
188
  displayed: false,
189
189
  ariaLabel: undefined,
190
190
  });
191
- const splitPanelDisplayed = !!(splitPanelToggle.displayed || isSplitPanelOpen);
191
+ const splitPanelDisplayed = !!(splitPanelToggle.displayed || (isSplitPanelOpen && !!splitPanel));
192
192
  const splitPanelControlId = useUniqueId('split-panel-');
193
193
  const toolsControlId = useUniqueId('tools-');
194
194
  const [splitPanelSize, setSplitPanelSize] = useControllable(props.splitPanelSize, props.onSplitPanelResize, getSplitPanelDefaultSize(splitPanelPosition), { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' });