@cloudscape-design/components 3.0.1155 → 3.0.1157

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 (258) hide show
  1. package/alert/index.js +1 -1
  2. package/alert/interfaces.d.ts +1 -2
  3. package/anchor-navigation/styles.css.js +8 -8
  4. package/anchor-navigation/styles.scoped.css +21 -21
  5. package/anchor-navigation/styles.selectors.js +8 -8
  6. package/app-layout/runtime-drawer/index.d.ts.map +1 -1
  7. package/app-layout/runtime-drawer/index.js +20 -18
  8. package/app-layout/runtime-drawer/index.js.map +1 -1
  9. package/app-layout/visual-refresh/styles.css.js +86 -86
  10. package/app-layout/visual-refresh/styles.scoped.css +164 -163
  11. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  12. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
  13. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +86 -83
  14. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
  15. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
  16. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +1 -1
  17. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
  18. package/attribute-editor/styles.css.js +15 -15
  19. package/attribute-editor/styles.scoped.css +28 -28
  20. package/attribute-editor/styles.selectors.js +15 -15
  21. package/autosuggest/index.js +28 -11
  22. package/autosuggest/interfaces.d.ts +2 -1
  23. package/autosuggest/interfaces.js.map +1 -1
  24. package/badge/index.d.ts +2 -0
  25. package/badge/index.js +14 -13
  26. package/badge/interfaces.d.ts +3 -2
  27. package/box/index.js +18 -13
  28. package/box/interfaces.d.ts +2 -1
  29. package/box/styles.css.js +192 -192
  30. package/box/styles.scoped.css +241 -241
  31. package/box/styles.selectors.js +192 -192
  32. package/breadcrumb-group/item/styles.css.js +7 -7
  33. package/breadcrumb-group/item/styles.scoped.css +28 -28
  34. package/breadcrumb-group/item/styles.selectors.js +7 -7
  35. package/button/index.js +12 -11
  36. package/button/interfaces.d.ts +4 -2
  37. package/button/styles.css.js +22 -22
  38. package/button/styles.scoped.css +78 -78
  39. package/button/styles.selectors.js +22 -22
  40. package/button-dropdown/index.js +27 -11
  41. package/button-dropdown/interfaces.d.ts +6 -2
  42. package/button-dropdown/item-element/styles.css.js +20 -20
  43. package/button-dropdown/item-element/styles.scoped.css +35 -35
  44. package/button-dropdown/item-element/styles.selectors.js +20 -20
  45. package/button-group/index.js +42 -11
  46. package/button-group/interfaces.d.ts +10 -0
  47. package/button-group/interfaces.d.ts.map +1 -1
  48. package/button-group/interfaces.js.map +1 -1
  49. package/cards/styles.css.js +39 -39
  50. package/cards/styles.scoped.css +51 -51
  51. package/cards/styles.selectors.js +39 -39
  52. package/checkbox/index.js +9 -11
  53. package/checkbox/interfaces.d.ts +3 -2
  54. package/code-editor/styles.css.js +33 -33
  55. package/code-editor/styles.scoped.css +139 -139
  56. package/code-editor/styles.selectors.js +33 -33
  57. package/container/index.js +29 -13
  58. package/container/interfaces.d.ts +2 -1
  59. package/date-input/index.js +8 -10
  60. package/drawer/implementation.d.ts +1 -0
  61. package/drawer/implementation.d.ts.map +1 -1
  62. package/drawer/implementation.js +13 -4
  63. package/drawer/implementation.js.map +1 -1
  64. package/drawer/interfaces.d.ts +7 -0
  65. package/drawer/interfaces.d.ts.map +1 -1
  66. package/drawer/interfaces.js.map +1 -1
  67. package/drawer/styles.css.js +12 -8
  68. package/drawer/styles.scoped.css +35 -13
  69. package/drawer/styles.selectors.js +12 -8
  70. package/drawer/use-sticky-footer.d.ts +11 -0
  71. package/drawer/use-sticky-footer.d.ts.map +1 -0
  72. package/drawer/use-sticky-footer.js +35 -0
  73. package/drawer/use-sticky-footer.js.map +1 -0
  74. package/flashbar/index.js +10 -13
  75. package/flashbar/interfaces.d.ts +1 -0
  76. package/help-panel/styles.css.js +6 -6
  77. package/help-panel/styles.scoped.css +75 -75
  78. package/help-panel/styles.selectors.js +6 -6
  79. package/icon/index.js +8 -13
  80. package/icon/interfaces.d.ts +2 -1
  81. package/icon/styles.css.js +39 -39
  82. package/icon/styles.scoped.css +87 -87
  83. package/icon/styles.selectors.js +39 -39
  84. package/icon-provider/index.js +12 -2
  85. package/index.d.ts +4 -1
  86. package/index.js +4 -0
  87. package/input/index.js +53 -12
  88. package/input/interfaces.d.ts +3 -1
  89. package/internal/base-component/styles.scoped.css +62 -50
  90. package/internal/components/button-trigger/styles.css.js +13 -13
  91. package/internal/components/button-trigger/styles.scoped.css +29 -29
  92. package/internal/components/button-trigger/styles.selectors.js +13 -13
  93. package/internal/components/cartesian-chart/styles.css.js +28 -28
  94. package/internal/components/cartesian-chart/styles.scoped.css +33 -33
  95. package/internal/components/cartesian-chart/styles.selectors.js +28 -28
  96. package/internal/components/radio-button/interfaces.d.ts +3 -3
  97. package/internal/components/token-list/styles.css.js +10 -10
  98. package/internal/components/token-list/styles.scoped.css +25 -25
  99. package/internal/components/token-list/styles.selectors.js +10 -10
  100. package/internal/environment.js +3 -3
  101. package/internal/environment.json +3 -3
  102. package/internal/generated/styles/tokens.js +8 -8
  103. package/internal/generated/theming/index.cjs +24 -24
  104. package/internal/generated/theming/index.js +24 -24
  105. package/internal/hooks/use-portal-mode-classes/index.d.ts +3 -1
  106. package/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
  107. package/internal/hooks/use-portal-mode-classes/index.js +2 -2
  108. package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
  109. package/internal/manifest.json +1 -1
  110. package/internal/plugins/controllers/drawers.d.ts +2 -2
  111. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  112. package/internal/plugins/controllers/drawers.js.map +1 -1
  113. package/internal/plugins/widget/interfaces.d.ts +2 -2
  114. package/internal/plugins/widget/interfaces.d.ts.map +1 -1
  115. package/internal/plugins/widget/interfaces.js.map +1 -1
  116. package/key-value-pairs/styles.css.js +8 -8
  117. package/key-value-pairs/styles.scoped.css +10 -10
  118. package/key-value-pairs/styles.selectors.js +8 -8
  119. package/link/index.js +25 -11
  120. package/link/interfaces.d.ts +3 -2
  121. package/link/styles.css.js +20 -20
  122. package/link/styles.scoped.css +91 -91
  123. package/link/styles.selectors.js +20 -20
  124. package/navigable-group/index.js +19 -4
  125. package/package.json +4 -1
  126. package/popover/internal.js +1 -1
  127. package/popover/internal.js.map +1 -1
  128. package/popover/styles.css.js +57 -57
  129. package/popover/styles.scoped.css +87 -87
  130. package/popover/styles.selectors.js +57 -57
  131. package/progress-bar/index.d.ts +1 -0
  132. package/progress-bar/index.js +52 -14
  133. package/progress-bar/interfaces.d.ts +1 -0
  134. package/progress-bar/styles.css.js +19 -19
  135. package/progress-bar/styles.scoped.css +31 -31
  136. package/progress-bar/styles.selectors.js +19 -19
  137. package/prompt-input/index.js +19 -11
  138. package/prompt-input/interfaces.d.ts +4 -3
  139. package/radio-button/index.js +19 -4
  140. package/radio-group/index.js +20 -11
  141. package/radio-group/interfaces.d.ts +1 -1
  142. package/segmented-control/index.js +14 -13
  143. package/segmented-control/interfaces.d.ts +1 -0
  144. package/select/interfaces.d.ts +1 -1
  145. package/select/interfaces.js.map +1 -1
  146. package/side-navigation/styles.css.js +30 -30
  147. package/side-navigation/styles.scoped.css +47 -47
  148. package/side-navigation/styles.selectors.js +30 -30
  149. package/space-between/index.js +10 -13
  150. package/space-between/interfaces.d.ts +2 -1
  151. package/spinner/index.js +10 -13
  152. package/spinner/interfaces.d.ts +2 -1
  153. package/split-panel/icons/styles.css.js +22 -22
  154. package/split-panel/icons/styles.scoped.css +25 -25
  155. package/split-panel/icons/styles.selectors.js +22 -22
  156. package/status-indicator/index.js +10 -13
  157. package/status-indicator/interfaces.d.ts +2 -1
  158. package/steps/index.js +11 -11
  159. package/steps/interfaces.d.ts +6 -2
  160. package/table/header-cell/index.d.ts +1 -1
  161. package/table/header-cell/index.d.ts.map +1 -1
  162. package/table/header-cell/index.js +1 -1
  163. package/table/header-cell/index.js.map +1 -1
  164. package/table/header-cell/th-element.d.ts +1 -1
  165. package/table/header-cell/th-element.d.ts.map +1 -1
  166. package/table/header-cell/th-element.js.map +1 -1
  167. package/table/resizer/index.d.ts +3 -1
  168. package/table/resizer/index.d.ts.map +1 -1
  169. package/table/resizer/index.js +8 -5
  170. package/table/resizer/index.js.map +1 -1
  171. package/table/resizer/styles.css.js +13 -12
  172. package/table/resizer/styles.scoped.css +22 -22
  173. package/table/resizer/styles.selectors.js +13 -12
  174. package/table/thead.d.ts +1 -1
  175. package/table/thead.d.ts.map +1 -1
  176. package/table/thead.js.map +1 -1
  177. package/tag-editor/styles.css.js +3 -3
  178. package/tag-editor/styles.scoped.css +13 -13
  179. package/tag-editor/styles.selectors.js +3 -3
  180. package/test-utils/dom/drawer/index.d.ts +1 -0
  181. package/test-utils/dom/drawer/index.js +3 -0
  182. package/test-utils/dom/drawer/index.js.map +1 -1
  183. package/test-utils/selectors/drawer/index.d.ts +1 -0
  184. package/test-utils/selectors/drawer/index.js +3 -0
  185. package/test-utils/selectors/drawer/index.js.map +1 -1
  186. package/text-content/styles.css.js +1 -1
  187. package/text-content/styles.scoped.css +66 -66
  188. package/text-content/styles.selectors.js +1 -1
  189. package/text-filter/index.js +17 -10
  190. package/text-filter/interfaces.d.ts +1 -0
  191. package/textarea/index.js +65 -12
  192. package/textarea/interfaces.d.ts +3 -2
  193. package/time-input/index.js +15 -11
  194. package/toggle/index.js +6 -10
  195. package/toggle/interfaces.d.ts +3 -2
  196. package/toggle-button/index.js +14 -11
  197. package/token/styles.css.js +14 -14
  198. package/token/styles.scoped.css +29 -29
  199. package/token/styles.selectors.js +14 -14
  200. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  201. package/tutorial-panel/components/tutorial-list/styles.scoped.css +28 -28
  202. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  203. package/wizard/index.js +35 -13
  204. package/wizard/interfaces.d.ts +1 -1
  205. package/autosuggest/internal-do-not-use-core.js +0 -35
  206. package/badge/internal-do-not-use-core.js +0 -19
  207. package/box/internal-do-not-use-core.js +0 -23
  208. package/button/internal-do-not-use-core.js +0 -19
  209. package/button-dropdown/internal-do-not-use-core.js +0 -34
  210. package/button-group/internal-do-not-use-core.js +0 -49
  211. package/checkbox/internal-do-not-use-core.js +0 -16
  212. package/container/internal-do-not-use-core.js +0 -34
  213. package/date-input/internal-do-not-use-core.js +0 -16
  214. package/flashbar/internal-do-not-use-core.js +0 -15
  215. package/icon/internal-do-not-use-core.js +0 -13
  216. package/input/internal-do-not-use-core.js +0 -59
  217. package/link/internal-do-not-use-core.js +0 -32
  218. package/progress-bar/internal-do-not-use-core.js +0 -56
  219. package/prompt-input/internal-do-not-use-core.js +0 -26
  220. package/radio-group/internal-do-not-use-core.js +0 -27
  221. package/segmented-control/internal-do-not-use-core.js +0 -19
  222. package/space-between/internal-do-not-use-core.js +0 -15
  223. package/spinner/internal-do-not-use-core.js +0 -15
  224. package/status-indicator/internal-do-not-use-core.js +0 -15
  225. package/steps/internal-do-not-use-core.js +0 -18
  226. package/text-filter/internal-do-not-use-core.js +0 -25
  227. package/textarea/internal-do-not-use-core.js +0 -71
  228. package/time-input/internal-do-not-use-core.js +0 -22
  229. package/toggle/internal-do-not-use-core.js +0 -14
  230. package/toggle-button/internal-do-not-use-core.js +0 -21
  231. package/wizard/internal-do-not-use-core.js +0 -40
  232. /package/autosuggest/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  233. /package/badge/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  234. /package/box/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  235. /package/button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  236. /package/button-dropdown/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  237. /package/button-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  238. /package/checkbox/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  239. /package/container/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  240. /package/date-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  241. /package/flashbar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  242. /package/icon/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  243. /package/input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  244. /package/link/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  245. /package/progress-bar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  246. /package/prompt-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  247. /package/radio-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  248. /package/segmented-control/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  249. /package/space-between/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  250. /package/spinner/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  251. /package/status-indicator/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  252. /package/steps/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  253. /package/text-filter/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  254. /package/textarea/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  255. /package/time-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  256. /package/toggle/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  257. /package/toggle-button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  258. /package/wizard/{internal-do-not-use-core.js.map → index.js.map} +0 -0
package/alert/index.js CHANGED
@@ -9,7 +9,7 @@ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
9
9
 
10
10
 
11
11
  const Alert = React.forwardRef((props, ref) => {
12
- validateProps('Alert', props, ["style"], {}, 'console');
12
+ validateProps('Alert', props, ["persistenceConfig"], {}, 'core');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
@@ -128,7 +128,7 @@ export interface AlertProps extends BaseComponentProps {
128
128
  /**
129
129
  * @awsuiSystem core
130
130
  */
131
-
131
+ style?: AlertProps.Style;
132
132
  /**
133
133
  * Config to persist dismiss state for dismissable Alert
134
134
  * persistenceConfig contains:
@@ -136,5 +136,4 @@ export interface AlertProps extends BaseComponentProps {
136
136
  * * `crossServicePersistence` (boolean) - (Optional) If true, the persistence state will be shared across AWS services.
137
137
  * @awsuiSystem console
138
138
  */
139
- persistenceConfig?: AlertProps.PersistenceConfig;
140
139
  }
@@ -1,13 +1,13 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_swimc_bhjn1_189",
5
- "anchor-list": "awsui_anchor-list_swimc_bhjn1_221",
6
- "anchor-item": "awsui_anchor-item_swimc_bhjn1_244",
7
- "anchor-item--active": "awsui_anchor-item--active_swimc_bhjn1_264",
8
- "anchor-link": "awsui_anchor-link_swimc_bhjn1_281",
9
- "anchor-link--active": "awsui_anchor-link--active_swimc_bhjn1_323",
10
- "anchor-link-text": "awsui_anchor-link-text_swimc_bhjn1_330",
11
- "anchor-link-info": "awsui_anchor-link-info_swimc_bhjn1_334"
4
+ "root": "awsui_root_swimc_1c22e_189",
5
+ "anchor-list": "awsui_anchor-list_swimc_1c22e_221",
6
+ "anchor-item": "awsui_anchor-item_swimc_1c22e_244",
7
+ "anchor-item--active": "awsui_anchor-item--active_swimc_1c22e_264",
8
+ "anchor-link": "awsui_anchor-link_swimc_1c22e_281",
9
+ "anchor-link--active": "awsui_anchor-link--active_swimc_1c22e_323",
10
+ "anchor-link-text": "awsui_anchor-link-text_swimc_1c22e_330",
11
+ "anchor-link-info": "awsui_anchor-link-info_swimc_1c22e_334"
12
12
  };
13
13
 
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
187
187
  SPDX-License-Identifier: Apache-2.0
188
188
  */
189
- .awsui_root_swimc_bhjn1_189:not(#\9) {
189
+ .awsui_root_swimc_1c22e_189:not(#\9) {
190
190
  border-collapse: separate;
191
191
  border-spacing: 0;
192
192
  box-sizing: border-box;
@@ -218,7 +218,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
218
218
  -moz-osx-font-smoothing: auto;
219
219
  }
220
220
 
221
- .awsui_anchor-list_swimc_bhjn1_221:not(#\9) {
221
+ .awsui_anchor-list_swimc_1c22e_221:not(#\9) {
222
222
  list-style: none;
223
223
  margin-block: 0;
224
224
  margin-inline: 0;
@@ -227,7 +227,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
227
227
  position: relative;
228
228
  text-indent: 0;
229
229
  }
230
- .awsui_anchor-list_swimc_bhjn1_221:not(#\9)::before {
230
+ .awsui_anchor-list_swimc_1c22e_221:not(#\9)::before {
231
231
  content: "";
232
232
  background-color: var(--color-border-divider-default-nr68jt, #c6c6cd);
233
233
  border-start-start-radius: var(--border-radius-tabs-focus-ring-o4qku1, 20px);
@@ -241,10 +241,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
241
241
  inline-size: 2px;
242
242
  }
243
243
 
244
- .awsui_anchor-item_swimc_bhjn1_244:not(#\9) {
244
+ .awsui_anchor-item_swimc_1c22e_244:not(#\9) {
245
245
  font-size: var(--font-size-body-m-a7nh2n, 14px);
246
246
  line-height: var(--line-height-body-m-2mh3ke, 20px);
247
- color: var(--color-text-body-secondary-bcbgoi, #424650);
247
+ color: var(--color-text-body-secondary-yna5sb, #424650);
248
248
  font-weight: 400;
249
249
  margin-block: var(--space-scaled-xxs-pfm1nx, 4px);
250
250
  margin-inline: 0;
@@ -252,19 +252,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
252
252
  transition-property: all;
253
253
  }
254
254
  @media (prefers-reduced-motion: reduce) {
255
- .awsui_anchor-item_swimc_bhjn1_244:not(#\9) {
255
+ .awsui_anchor-item_swimc_1c22e_244:not(#\9) {
256
256
  animation: none;
257
257
  transition: none;
258
258
  }
259
259
  }
260
- .awsui-motion-disabled .awsui_anchor-item_swimc_bhjn1_244:not(#\9), .awsui-mode-entering .awsui_anchor-item_swimc_bhjn1_244:not(#\9) {
260
+ .awsui-motion-disabled .awsui_anchor-item_swimc_1c22e_244:not(#\9), .awsui-mode-entering .awsui_anchor-item_swimc_1c22e_244:not(#\9) {
261
261
  animation: none;
262
262
  transition: none;
263
263
  }
264
- .awsui_anchor-item--active_swimc_bhjn1_264:not(#\9) {
264
+ .awsui_anchor-item--active_swimc_1c22e_264:not(#\9) {
265
265
  position: relative;
266
266
  }
267
- .awsui_anchor-item--active_swimc_bhjn1_264:not(#\9)::before {
267
+ .awsui_anchor-item--active_swimc_1c22e_264:not(#\9)::before {
268
268
  content: "";
269
269
  background-color: var(--color-text-accent-n1kmht, #006ce0);
270
270
  border-start-start-radius: var(--border-radius-tabs-focus-ring-o4qku1, 20px);
@@ -278,11 +278,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
278
278
  inline-size: 2px;
279
279
  }
280
280
 
281
- .awsui_anchor-link_swimc_bhjn1_281:not(#\9) {
281
+ .awsui_anchor-link_swimc_1c22e_281:not(#\9) {
282
282
  font-size: var(--font-size-body-m-a7nh2n, 14px);
283
283
  line-height: var(--line-height-body-m-2mh3ke, 20px);
284
284
  align-items: baseline;
285
- color: var(--color-text-body-secondary-bcbgoi, #424650);
285
+ color: var(--color-text-body-secondary-yna5sb, #424650);
286
286
  display: flex;
287
287
  flex-direction: row;
288
288
  font-weight: 400;
@@ -291,16 +291,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
291
291
  transition-property: all;
292
292
  }
293
293
  @media (prefers-reduced-motion: reduce) {
294
- .awsui_anchor-link_swimc_bhjn1_281:not(#\9) {
294
+ .awsui_anchor-link_swimc_1c22e_281:not(#\9) {
295
295
  animation: none;
296
296
  transition: none;
297
297
  }
298
298
  }
299
- .awsui-motion-disabled .awsui_anchor-link_swimc_bhjn1_281:not(#\9), .awsui-mode-entering .awsui_anchor-link_swimc_bhjn1_281:not(#\9) {
299
+ .awsui-motion-disabled .awsui_anchor-link_swimc_1c22e_281:not(#\9), .awsui-mode-entering .awsui_anchor-link_swimc_1c22e_281:not(#\9) {
300
300
  animation: none;
301
301
  transition: none;
302
302
  }
303
- body[data-awsui-focus-visible=true] .awsui_anchor-link_swimc_bhjn1_281:not(#\9):focus {
303
+ body[data-awsui-focus-visible=true] .awsui_anchor-link_swimc_1c22e_281:not(#\9):focus {
304
304
  outline: thin dotted;
305
305
  outline: var(--border-link-focus-ring-outline-1p0hnu, 0);
306
306
  outline-offset: 2px;
@@ -311,27 +311,27 @@ body[data-awsui-focus-visible=true] .awsui_anchor-link_swimc_bhjn1_281:not(#\9):
311
311
  border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
312
312
  box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-39uvxr, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
313
313
  }
314
- .awsui_anchor-link_swimc_bhjn1_281:not(#\9):hover {
314
+ .awsui_anchor-link_swimc_1c22e_281:not(#\9):hover {
315
315
  color: var(--color-text-accent-n1kmht, #006ce0);
316
316
  }
317
- .awsui_anchor-link_swimc_bhjn1_281:not(#\9):focus {
317
+ .awsui_anchor-link_swimc_1c22e_281:not(#\9):focus {
318
318
  outline: none;
319
319
  }
320
- .awsui_anchor-link_swimc_bhjn1_281:not(#\9):hover, .awsui_anchor-link_swimc_bhjn1_281:not(#\9):focus {
320
+ .awsui_anchor-link_swimc_1c22e_281:not(#\9):hover, .awsui_anchor-link_swimc_1c22e_281:not(#\9):focus {
321
321
  text-decoration: none;
322
322
  }
323
- .awsui_anchor-link--active_swimc_bhjn1_323:not(#\9) {
323
+ .awsui_anchor-link--active_swimc_1c22e_323:not(#\9) {
324
324
  font-weight: var(--font-wayfinding-link-active-weight-ny4hup, 700);
325
325
  -webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
326
326
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
327
327
  color: var(--color-text-accent-n1kmht, #006ce0);
328
328
  }
329
329
 
330
- .awsui_anchor-link-text_swimc_bhjn1_330:not(#\9) {
330
+ .awsui_anchor-link-text_swimc_1c22e_330:not(#\9) {
331
331
  display: block;
332
332
  }
333
333
 
334
- .awsui_anchor-link-info_swimc_bhjn1_334:not(#\9) {
334
+ .awsui_anchor-link-info_swimc_1c22e_334:not(#\9) {
335
335
  margin-inline-start: var(--space-xs-ymlm0b, 8px);
336
336
  font-size: var(--font-size-body-s-smc8cv, 12px);
337
337
  line-height: var(--line-height-body-s-nu5hx1, 16px);
@@ -340,5 +340,5 @@ body[data-awsui-focus-visible=true] .awsui_anchor-link_swimc_bhjn1_281:not(#\9):
340
340
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
341
341
  font-weight: 700;
342
342
  letter-spacing: 0.005em;
343
- color: var(--color-text-link-default-1dmm7z, #006ce0);
343
+ color: var(--color-text-link-default-hude44, #006ce0);
344
344
  }
@@ -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
- "root": "awsui_root_swimc_bhjn1_189",
6
- "anchor-list": "awsui_anchor-list_swimc_bhjn1_221",
7
- "anchor-item": "awsui_anchor-item_swimc_bhjn1_244",
8
- "anchor-item--active": "awsui_anchor-item--active_swimc_bhjn1_264",
9
- "anchor-link": "awsui_anchor-link_swimc_bhjn1_281",
10
- "anchor-link--active": "awsui_anchor-link--active_swimc_bhjn1_323",
11
- "anchor-link-text": "awsui_anchor-link-text_swimc_bhjn1_330",
12
- "anchor-link-info": "awsui_anchor-link-info_swimc_bhjn1_334"
5
+ "root": "awsui_root_swimc_1c22e_189",
6
+ "anchor-list": "awsui_anchor-list_swimc_1c22e_221",
7
+ "anchor-item": "awsui_anchor-item_swimc_1c22e_244",
8
+ "anchor-item--active": "awsui_anchor-item--active_swimc_1c22e_264",
9
+ "anchor-link": "awsui_anchor-link_swimc_1c22e_281",
10
+ "anchor-link--active": "awsui_anchor-link--active_swimc_1c22e_323",
11
+ "anchor-link-text": "awsui_anchor-link-text_swimc_1c22e_330",
12
+ "anchor-link-info": "awsui_anchor-link-info_swimc_1c22e_334"
13
13
  };
14
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/runtime-drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAA0B,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,uBAAuB,EACxB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAK/C,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,MAAM;IAC1D,QAAQ,CAAC,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC7B,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAClC,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAClC;AAkFD,eAAO,MAAM,wBAAwB,GACnC,eAAe,mBAAmB,KACjC,cAAc,CAAC,MAAM,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;IAC9D,aAAa,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;CA2BtD,CAAC;A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Aa,CAAC,CAAC;IAClC,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAClC;AAmFD,eAAO,MAAM,wBAAwB,GACnC,eAAe,mBAAmB,KACjC,cAAc,CAAC,MAAM,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;IAC9D,aAAa,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;CA6BtD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,eAAe,qBAAqB,KACnC,cAAc,CAAC,MAAM,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;IAC9D,aAAa,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACrD,uBAAuB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1C,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAsCxE,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,KAAK,CAAC,mBAAmB,CAAC,EACxC,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAAC,GACxC,aAAa,CAQf"}
@@ -1,7 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { useContext, useEffect, useRef } from 'react';
4
- import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
5
4
  import { fireNonCancelableEvent } from '../../internal/events';
6
5
  import { sortByPriority } from '../../internal/plugins/helpers/utils';
7
6
  import { ActiveDrawersContext } from '../utils/visibility-context';
@@ -42,21 +41,20 @@ function RuntimeDrawerHeader({ mountHeader, unmountHeader }) {
42
41
  }, []);
43
42
  return React.createElement("div", { className: styles['runtime-header-wrapper'], ref: ref });
44
43
  }
45
- function checkForUnsupportedProps(headerActions) {
46
- const unsupportedProps = new Set([
47
- 'iconSvg',
48
- 'popoverFeedback',
49
- 'pressedIconSvg',
50
- 'popoverFeedback',
51
- 'pressedPopoverFeedback',
52
- ]);
53
- for (const item of headerActions) {
54
- const unsupported = Object.keys(item).filter(key => unsupportedProps.has(key));
55
- if (unsupported.length > 0) {
56
- warnOnce('AppLayout', `The headerActions properties are not supported for runtime api: ${unsupported.join(' ')}`);
57
- }
58
- }
59
- return headerActions;
44
+ function mapRuntimeHeaderActionsToHeaderActions(runtimeHeaderActions) {
45
+ return runtimeHeaderActions.map(runtimeHeaderAction => {
46
+ return {
47
+ ...runtimeHeaderAction,
48
+ ...('iconSvg' in runtimeHeaderAction &&
49
+ runtimeHeaderAction.iconSvg && {
50
+ iconSvg: convertRuntimeTriggerToReactNode(runtimeHeaderAction.iconSvg),
51
+ }),
52
+ ...('pressedIconSvg' in runtimeHeaderAction &&
53
+ runtimeHeaderAction.pressedIconSvg && {
54
+ iconSvg: convertRuntimeTriggerToReactNode(runtimeHeaderAction.pressedIconSvg),
55
+ }),
56
+ };
57
+ });
60
58
  }
61
59
  const convertRuntimeTriggerToReactNode = (runtimeTrigger) => {
62
60
  if (!runtimeTrigger) {
@@ -82,7 +80,9 @@ export const mapRuntimeConfigToDrawer = (runtimeConfig) => {
82
80
  onResize: event => {
83
81
  fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });
84
82
  },
85
- headerActions: runtimeDrawer.headerActions ? checkForUnsupportedProps(runtimeDrawer.headerActions) : undefined,
83
+ headerActions: runtimeDrawer.headerActions
84
+ ? mapRuntimeHeaderActionsToHeaderActions(runtimeDrawer.headerActions)
85
+ : undefined,
86
86
  };
87
87
  };
88
88
  export const mapRuntimeConfigToAiDrawer = (runtimeConfig) => {
@@ -109,7 +109,9 @@ export const mapRuntimeConfigToAiDrawer = (runtimeConfig) => {
109
109
  onResize: event => {
110
110
  fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });
111
111
  },
112
- headerActions: runtimeDrawer.headerActions ? checkForUnsupportedProps(runtimeDrawer.headerActions) : undefined,
112
+ headerActions: runtimeDrawer.headerActions
113
+ ? mapRuntimeHeaderActionsToHeaderActions(runtimeDrawer.headerActions)
114
+ : undefined,
113
115
  };
114
116
  };
115
117
  export function convertRuntimeDrawers(localDrawers, globalDrawers) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/runtime-drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,uBAAuB,CAAC;AAK1F,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,SAAS,oBAAoB,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,EAA8B;IAC5F,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,wBAAwB,GAAG,MAAM,CAA4B,IAAI,CAAC,CAAC;IACzE,MAAM,gBAAgB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,GAAG,CAAC,OAAQ,CAAC;QAC/B,YAAY,CAAC,SAAS,EAAE;YACtB,kBAAkB,EAAE,EAAE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rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonGroupProps } from '../../button-group/interfaces';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../internal/events';\nimport {\n DrawerConfig as RuntimeDrawerConfig,\n DrawerStateChangeParams,\n} from '../../internal/plugins/controllers/drawers';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { DrawerPayload as RuntimeAiDrawerConfig } from '../../internal/plugins/widget/interfaces';\nimport { AppLayoutProps } from '../interfaces';\nimport { ActiveDrawersContext } from '../utils/visibility-context';\n\nimport styles from './styles.css.js';\n\nexport interface RuntimeDrawer extends AppLayoutProps.Drawer {\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n position?: 'side' | 'bottom';\n}\n\nexport interface DrawersLayout {\n global: Array<RuntimeDrawer>;\n localBefore: Array<RuntimeDrawer>;\n localAfter: Array<RuntimeDrawer>;\n}\n\ntype VisibilityCallback = (isVisible: boolean) => void;\n\ninterface RuntimeContentWrapperProps {\n id?: string;\n mountContent: RuntimeDrawerConfig['mountContent'];\n unmountContent: RuntimeDrawerConfig['unmountContent'];\n}\n\nfunction RuntimeDrawerWrapper({ mountContent, unmountContent, id }: RuntimeContentWrapperProps) {\n const ref = useRef<HTMLDivElement>(null);\n const visibilityChangeCallback = useRef<VisibilityCallback | null>(null);\n const activeDrawersIds = useContext(ActiveDrawersContext);\n const isVisible = !!id && activeDrawersIds.includes(id);\n\n useEffect(() => {\n const container = ref.current!;\n mountContent(container, {\n onVisibilityChange: cb => {\n visibilityChangeCallback.current = cb;\n },\n });\n return () => {\n unmountContent(container);\n visibilityChangeCallback.current = null;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n visibilityChangeCallback.current?.(isVisible);\n }, [isVisible]);\n\n return <div ref={ref} className={styles['runtime-content-wrapper']} data-awsui-runtime-drawer-root-id={id}></div>;\n}\n\ninterface RuntimeContentHeaderProps {\n mountHeader: (container: HTMLElement) => void;\n unmountHeader?: (container: HTMLElement) => void;\n}\n\nfunction RuntimeDrawerHeader({ mountHeader, unmountHeader }: RuntimeContentHeaderProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const container = ref.current!;\n mountHeader?.(container);\n return () => {\n unmountHeader?.(container);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return <div className={styles['runtime-header-wrapper']} ref={ref} />;\n}\n\nfunction checkForUnsupportedProps(headerActions: ReadonlyArray<ButtonGroupProps.Item>) {\n const unsupportedProps = new Set([\n 'iconSvg',\n 'popoverFeedback',\n 'pressedIconSvg',\n 'popoverFeedback',\n 'pressedPopoverFeedback',\n ]);\n for (const item of headerActions) {\n const unsupported = Object.keys(item).filter(key => unsupportedProps.has(key));\n if (unsupported.length > 0) {\n warnOnce('AppLayout', `The headerActions properties are not supported for runtime api: ${unsupported.join(' ')}`);\n }\n }\n return headerActions;\n}\n\nconst convertRuntimeTriggerToReactNode = (runtimeTrigger?: string) => {\n if (!runtimeTrigger) {\n return undefined;\n }\n // eslint-disable-next-line react/no-danger\n return <span style={{ lineHeight: 0 }} dangerouslySetInnerHTML={{ __html: runtimeTrigger }} />;\n};\n\nexport const mapRuntimeConfigToDrawer = (\n runtimeConfig: RuntimeDrawerConfig\n): AppLayoutProps.Drawer & {\n orderPriority?: number;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n headerActions?: ReadonlyArray<ButtonGroupProps.Item>;\n} => {\n const { mountContent, unmountContent, trigger, ...runtimeDrawer } = runtimeConfig;\n\n return {\n ...runtimeDrawer,\n ariaLabels: { drawerName: runtimeDrawer.ariaLabels.content ?? '', ...runtimeDrawer.ariaLabels },\n trigger: trigger\n ? {\n ...(trigger.iconSvg && {\n iconSvg: convertRuntimeTriggerToReactNode(trigger.iconSvg),\n }),\n }\n : undefined,\n content: (\n <RuntimeDrawerWrapper\n key={runtimeDrawer.id}\n mountContent={mountContent}\n unmountContent={unmountContent}\n id={runtimeDrawer.id}\n />\n ),\n onResize: event => {\n fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });\n },\n headerActions: runtimeDrawer.headerActions ? checkForUnsupportedProps(runtimeDrawer.headerActions) : undefined,\n };\n};\n\nexport const mapRuntimeConfigToAiDrawer = (\n runtimeConfig: RuntimeAiDrawerConfig\n): AppLayoutProps.Drawer & {\n orderPriority?: number;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n headerActions?: ReadonlyArray<ButtonGroupProps.Item>;\n exitExpandedModeTrigger?: React.ReactNode;\n onToggleFocusMode?: NonCancelableEventHandler<{ isExpanded: boolean }>;\n} => {\n const { mountContent, unmountContent, trigger, exitExpandedModeTrigger, ...runtimeDrawer } = runtimeConfig;\n\n return {\n ...runtimeDrawer,\n ariaLabels: { drawerName: runtimeDrawer.ariaLabels.content ?? '', ...runtimeDrawer.ariaLabels },\n ...(trigger && {\n trigger: {\n customIcon: convertRuntimeTriggerToReactNode(trigger?.customIcon),\n iconSvg: convertRuntimeTriggerToReactNode(trigger?.iconSvg),\n },\n }),\n exitExpandedModeTrigger: exitExpandedModeTrigger\n ? {\n customIcon: convertRuntimeTriggerToReactNode(exitExpandedModeTrigger?.customIcon),\n }\n : undefined,\n content: (\n <RuntimeDrawerWrapper\n key={runtimeDrawer.id}\n mountContent={mountContent}\n unmountContent={unmountContent}\n id={runtimeDrawer.id}\n />\n ),\n ...(runtimeDrawer.mountHeader && {\n header: (\n <RuntimeDrawerHeader mountHeader={runtimeDrawer.mountHeader} unmountHeader={runtimeDrawer.unmountHeader} />\n ),\n }),\n onResize: event => {\n fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });\n },\n headerActions: runtimeDrawer.headerActions ? checkForUnsupportedProps(runtimeDrawer.headerActions) : undefined,\n };\n};\n\nexport function convertRuntimeDrawers(\n localDrawers: Array<RuntimeDrawerConfig>,\n globalDrawers: Array<RuntimeDrawerConfig>\n): DrawersLayout {\n const converted = localDrawers.map(mapRuntimeConfigToDrawer);\n const sorted = sortByPriority(converted);\n return {\n global: sortByPriority(globalDrawers.map(mapRuntimeConfigToDrawer)),\n localBefore: sorted.filter(item => (item.orderPriority ?? 0) > 0),\n localAfter: sorted.filter(item => (item.orderPriority ?? 0) <= 0),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/runtime-drawer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAA6B,MAAM,uBAAuB,CAAC;AAK1F,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,SAAS,oBAAoB,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,EAA8B;IAC5F,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,wBAAwB,GAAG,MAAM,CAA4B,IAAI,CAAC,CAAC;IACzE,MAAM,gBAAgB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,GAAG,CAAC,OAAQ,CAAC;QAC/B,YAAY,CAAC,SAAS,EAAE;YACtB,kBAAkB,EAAE,EAAE,CAAC,EAAE;gBACvB,wBAAwB,CAAC,OAAO,GAAG,EAAE,CAAC;YACxC,CAAC;SACF,CAAC,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,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,aAAa,GAAI,CAC5G;SACF,CAAC;QACF,QAAQ,EAAE,KAAK,CAAC,EAAE;YAChB,sBAAsB,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;QACpG,CAAC;QACD,aAAa,EAAE,aAAa,CAAC,aAAa;YACxC,CAAC,CAAC,sCAAsC,CAAC,aAAa,CAAC,aAAa,CAAC;YACrE,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,YAAwC,EACxC,aAAyC;IAEzC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO;QACL,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACnE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAC,OAAA,CAAC,MAAA,IAAI,CAAC,aAAa,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAA,EAAA,CAAC;QACjE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAC,OAAA,CAAC,MAAA,IAAI,CAAC,aAAa,mCAAI,CAAC,CAAC,IAAI,CAAC,CAAA,EAAA,CAAC;KAClE,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef } from 'react';\n\nimport { ButtonGroupProps, ItemRuntime } from '../../button-group/interfaces';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../internal/events';\nimport {\n DrawerConfig as RuntimeDrawerConfig,\n DrawerStateChangeParams,\n} from '../../internal/plugins/controllers/drawers';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { DrawerPayload as RuntimeAiDrawerConfig } from '../../internal/plugins/widget/interfaces';\nimport { AppLayoutProps } from '../interfaces';\nimport { ActiveDrawersContext } from '../utils/visibility-context';\n\nimport styles from './styles.css.js';\n\nexport interface RuntimeDrawer extends AppLayoutProps.Drawer {\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n position?: 'side' | 'bottom';\n}\n\nexport interface DrawersLayout {\n global: Array<RuntimeDrawer>;\n localBefore: Array<RuntimeDrawer>;\n localAfter: Array<RuntimeDrawer>;\n}\n\ntype VisibilityCallback = (isVisible: boolean) => void;\n\ninterface RuntimeContentWrapperProps {\n id?: string;\n mountContent: RuntimeDrawerConfig['mountContent'];\n unmountContent: RuntimeDrawerConfig['unmountContent'];\n}\n\nfunction RuntimeDrawerWrapper({ mountContent, unmountContent, id }: RuntimeContentWrapperProps) {\n const ref = useRef<HTMLDivElement>(null);\n const visibilityChangeCallback = useRef<VisibilityCallback | null>(null);\n const activeDrawersIds = useContext(ActiveDrawersContext);\n const isVisible = !!id && activeDrawersIds.includes(id);\n\n useEffect(() => {\n const container = ref.current!;\n mountContent(container, {\n onVisibilityChange: cb => {\n visibilityChangeCallback.current = cb;\n },\n });\n return () => {\n unmountContent(container);\n visibilityChangeCallback.current = null;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n visibilityChangeCallback.current?.(isVisible);\n }, [isVisible]);\n\n return <div ref={ref} className={styles['runtime-content-wrapper']} data-awsui-runtime-drawer-root-id={id}></div>;\n}\n\ninterface RuntimeContentHeaderProps {\n mountHeader: (container: HTMLElement) => void;\n unmountHeader?: (container: HTMLElement) => void;\n}\n\nfunction RuntimeDrawerHeader({ mountHeader, unmountHeader }: RuntimeContentHeaderProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const container = ref.current!;\n mountHeader?.(container);\n return () => {\n unmountHeader?.(container);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return <div className={styles['runtime-header-wrapper']} ref={ref} />;\n}\n\nfunction mapRuntimeHeaderActionsToHeaderActions(\n runtimeHeaderActions: ReadonlyArray<ItemRuntime>\n): ReadonlyArray<ButtonGroupProps.Item> {\n return runtimeHeaderActions.map(runtimeHeaderAction => {\n return {\n ...runtimeHeaderAction,\n ...('iconSvg' in runtimeHeaderAction &&\n runtimeHeaderAction.iconSvg && {\n iconSvg: convertRuntimeTriggerToReactNode(runtimeHeaderAction.iconSvg),\n }),\n ...('pressedIconSvg' in runtimeHeaderAction &&\n runtimeHeaderAction.pressedIconSvg && {\n iconSvg: convertRuntimeTriggerToReactNode(runtimeHeaderAction.pressedIconSvg),\n }),\n };\n });\n}\n\nconst convertRuntimeTriggerToReactNode = (runtimeTrigger?: string) => {\n if (!runtimeTrigger) {\n return undefined;\n }\n // eslint-disable-next-line react/no-danger\n return <span style={{ lineHeight: 0 }} dangerouslySetInnerHTML={{ __html: runtimeTrigger }} />;\n};\n\nexport const mapRuntimeConfigToDrawer = (\n runtimeConfig: RuntimeDrawerConfig\n): AppLayoutProps.Drawer & {\n orderPriority?: number;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n headerActions?: ReadonlyArray<ButtonGroupProps.Item>;\n} => {\n const { mountContent, unmountContent, trigger, ...runtimeDrawer } = runtimeConfig;\n\n return {\n ...runtimeDrawer,\n ariaLabels: { drawerName: runtimeDrawer.ariaLabels.content ?? '', ...runtimeDrawer.ariaLabels },\n trigger: trigger\n ? {\n ...(trigger.iconSvg && {\n iconSvg: convertRuntimeTriggerToReactNode(trigger.iconSvg),\n }),\n }\n : undefined,\n content: (\n <RuntimeDrawerWrapper\n key={runtimeDrawer.id}\n mountContent={mountContent}\n unmountContent={unmountContent}\n id={runtimeDrawer.id}\n />\n ),\n onResize: event => {\n fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });\n },\n headerActions: runtimeDrawer.headerActions\n ? mapRuntimeHeaderActionsToHeaderActions(runtimeDrawer.headerActions)\n : undefined,\n };\n};\n\nexport const mapRuntimeConfigToAiDrawer = (\n runtimeConfig: RuntimeAiDrawerConfig\n): AppLayoutProps.Drawer & {\n orderPriority?: number;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n headerActions?: ReadonlyArray<ButtonGroupProps.Item>;\n exitExpandedModeTrigger?: React.ReactNode;\n onToggleFocusMode?: NonCancelableEventHandler<{ isExpanded: boolean }>;\n} => {\n const { mountContent, unmountContent, trigger, exitExpandedModeTrigger, ...runtimeDrawer } = runtimeConfig;\n\n return {\n ...runtimeDrawer,\n ariaLabels: { drawerName: runtimeDrawer.ariaLabels.content ?? '', ...runtimeDrawer.ariaLabels },\n ...(trigger && {\n trigger: {\n customIcon: convertRuntimeTriggerToReactNode(trigger?.customIcon),\n iconSvg: convertRuntimeTriggerToReactNode(trigger?.iconSvg),\n },\n }),\n exitExpandedModeTrigger: exitExpandedModeTrigger\n ? {\n customIcon: convertRuntimeTriggerToReactNode(exitExpandedModeTrigger?.customIcon),\n }\n : undefined,\n content: (\n <RuntimeDrawerWrapper\n key={runtimeDrawer.id}\n mountContent={mountContent}\n unmountContent={unmountContent}\n id={runtimeDrawer.id}\n />\n ),\n ...(runtimeDrawer.mountHeader && {\n header: (\n <RuntimeDrawerHeader mountHeader={runtimeDrawer.mountHeader} unmountHeader={runtimeDrawer.unmountHeader} />\n ),\n }),\n onResize: event => {\n fireNonCancelableEvent(runtimeDrawer.onResize, { size: event.detail.size, id: runtimeDrawer.id });\n },\n headerActions: runtimeDrawer.headerActions\n ? mapRuntimeHeaderActionsToHeaderActions(runtimeDrawer.headerActions)\n : undefined,\n };\n};\n\nexport function convertRuntimeDrawers(\n localDrawers: Array<RuntimeDrawerConfig>,\n globalDrawers: Array<RuntimeDrawerConfig>\n): DrawersLayout {\n const converted = localDrawers.map(mapRuntimeConfigToDrawer);\n const sorted = sortByPriority(converted);\n return {\n global: sortByPriority(globalDrawers.map(mapRuntimeConfigToDrawer)),\n localBefore: sorted.filter(item => (item.orderPriority ?? 0) > 0),\n localAfter: sorted.filter(item => (item.orderPriority ?? 0) <= 0),\n };\n}\n"]}
@@ -1,91 +1,91 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "background": "awsui_background_hyvsj_1c54p_149",
5
- "scrolling-background": "awsui_scrolling-background_hyvsj_1c54p_152",
6
- "breadcrumbs": "awsui_breadcrumbs_hyvsj_1c54p_163",
7
- "drawers-container": "awsui_drawers-container_hyvsj_1c54p_176",
8
- "has-open-drawer": "awsui_has-open-drawer_hyvsj_1c54p_187",
9
- "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_1c54p_208",
10
- "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_1c54p_213",
11
- "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_1c54p_251",
12
- "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_1c54p_261",
13
- "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_1c54p_266",
14
- "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_1c54p_280",
15
- "drawers-trigger": "awsui_drawers-trigger_hyvsj_1c54p_266",
16
- "drawer": "awsui_drawer_hyvsj_1c54p_176",
17
- "drawer-content-container": "awsui_drawer-content-container_hyvsj_1c54p_311",
18
- "drawer-close-button": "awsui_drawer-close-button_hyvsj_1c54p_320",
19
- "drawer-content": "awsui_drawer-content_hyvsj_1c54p_311",
20
- "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_1c54p_329",
21
- "drawer-slider": "awsui_drawer-slider_hyvsj_1c54p_332",
22
- "is-drawer-open": "awsui_is-drawer-open_hyvsj_1c54p_339",
23
- "content": "awsui_content_hyvsj_1c54p_365",
24
- "layout": "awsui_layout_hyvsj_1c54p_390",
25
- "has-max-content-width": "awsui_has-max-content-width_hyvsj_1c54p_462",
26
- "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_1c54p_477",
27
- "content-type-table": "awsui_content-type-table_hyvsj_1c54p_491",
28
- "content-type-cards": "awsui_content-type-cards_hyvsj_1c54p_491",
29
- "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_1c54p_497",
30
- "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_1c54p_500",
31
- "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_1c54p_514",
32
- "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_1c54p_517",
33
- "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_1c54p_527",
34
- "content-first-child-header": "awsui_content-first-child-header_hyvsj_1c54p_530",
35
- "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_1c54p_530",
36
- "has-header": "awsui_has-header_hyvsj_1c54p_530",
37
- "content-first-child-main": "awsui_content-first-child-main_hyvsj_1c54p_545",
38
- "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_1c54p_545",
39
- "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_1c54p_565",
40
- "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_1c54p_568",
41
- "has-split-panel": "awsui_has-split-panel_hyvsj_1c54p_588",
42
- "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_1c54p_588",
43
- "block-body-scroll": "awsui_block-body-scroll_hyvsj_1c54p_596",
44
- "unfocusable": "awsui_unfocusable_hyvsj_1c54p_601",
45
- "container": "awsui_container_hyvsj_1c54p_611",
46
- "is-navigation-open": "awsui_is-navigation-open_hyvsj_1c54p_637",
47
- "is-tools-open": "awsui_is-tools-open_hyvsj_1c54p_640",
48
- "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_1c54p_640",
49
- "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_1c54p_640",
50
- "has-active-drawer": "awsui_has-active-drawer_hyvsj_1c54p_640",
51
- "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_1c54p_653",
52
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_1c54p_670",
53
- "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_1c54p_674",
54
- "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_1c54p_678",
55
- "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_1c54p_682",
56
- "navigation-container": "awsui_navigation-container_hyvsj_1c54p_691",
57
- "show-navigation": "awsui_show-navigation_hyvsj_1c54p_729",
58
- "animating": "awsui_animating_hyvsj_1c54p_752",
59
- "showButtons": "awsui_showButtons_hyvsj_1c54p_1",
60
- "navigation": "awsui_navigation_hyvsj_1c54p_691",
61
- "openNavigation": "awsui_openNavigation_hyvsj_1c54p_1",
62
- "animated-content": "awsui_animated-content_hyvsj_1c54p_816",
63
- "content-container": "awsui_content-container_hyvsj_1c54p_819",
64
- "hide-navigation": "awsui_hide-navigation_hyvsj_1c54p_828",
65
- "notifications": "awsui_notifications_hyvsj_1c54p_838",
66
- "has-notification-content": "awsui_has-notification-content_hyvsj_1c54p_843",
67
- "sticky-notifications": "awsui_sticky-notifications_hyvsj_1c54p_847",
68
- "high-contrast": "awsui_high-contrast_hyvsj_1c54p_852",
69
- "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_1c54p_870",
70
- "position-bottom": "awsui_position-bottom_hyvsj_1c54p_917",
71
- "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_1c54p_1",
72
- "split-panel-side": "awsui_split-panel-side_hyvsj_1c54p_946",
73
- "position-side": "awsui_position-side_hyvsj_1c54p_959",
74
- "tools-container": "awsui_tools-container_hyvsj_1c54p_981",
75
- "tools": "awsui_tools_hyvsj_1c54p_981",
76
- "openTools": "awsui_openTools_hyvsj_1c54p_1",
77
- "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_1c54p_1070",
78
- "hide-tools": "awsui_hide-tools_hyvsj_1c54p_1080",
79
- "show-tools": "awsui_show-tools_hyvsj_1c54p_1092",
80
- "has-tools-form": "awsui_has-tools-form_hyvsj_1c54p_1070",
81
- "trigger-button-styles": "awsui_trigger-button-styles_hyvsj_1c54p_1172",
82
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_1c54p_1188",
83
- "trigger": "awsui_trigger_hyvsj_1c54p_1172",
84
- "selected": "awsui_selected_hyvsj_1c54p_1240",
85
- "badge": "awsui_badge_hyvsj_1c54p_1260",
86
- "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_1c54p_1264",
87
- "trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-visible_hyvsj_1c54p_1275",
88
- "dot": "awsui_dot_hyvsj_1c54p_1279",
89
- "trigger-tooltip": "awsui_trigger-tooltip_hyvsj_1c54p_1292"
4
+ "background": "awsui_background_hyvsj_1xiee_149",
5
+ "scrolling-background": "awsui_scrolling-background_hyvsj_1xiee_152",
6
+ "breadcrumbs": "awsui_breadcrumbs_hyvsj_1xiee_163",
7
+ "drawers-container": "awsui_drawers-container_hyvsj_1xiee_176",
8
+ "has-open-drawer": "awsui_has-open-drawer_hyvsj_1xiee_187",
9
+ "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_1xiee_208",
10
+ "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_1xiee_213",
11
+ "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_1xiee_251",
12
+ "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_1xiee_261",
13
+ "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_1xiee_266",
14
+ "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_1xiee_280",
15
+ "drawers-trigger": "awsui_drawers-trigger_hyvsj_1xiee_266",
16
+ "drawer": "awsui_drawer_hyvsj_1xiee_176",
17
+ "drawer-content-container": "awsui_drawer-content-container_hyvsj_1xiee_311",
18
+ "drawer-close-button": "awsui_drawer-close-button_hyvsj_1xiee_320",
19
+ "drawer-content": "awsui_drawer-content_hyvsj_1xiee_311",
20
+ "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_1xiee_329",
21
+ "drawer-slider": "awsui_drawer-slider_hyvsj_1xiee_332",
22
+ "is-drawer-open": "awsui_is-drawer-open_hyvsj_1xiee_340",
23
+ "content": "awsui_content_hyvsj_1xiee_366",
24
+ "layout": "awsui_layout_hyvsj_1xiee_391",
25
+ "has-max-content-width": "awsui_has-max-content-width_hyvsj_1xiee_463",
26
+ "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_1xiee_478",
27
+ "content-type-table": "awsui_content-type-table_hyvsj_1xiee_492",
28
+ "content-type-cards": "awsui_content-type-cards_hyvsj_1xiee_492",
29
+ "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_1xiee_498",
30
+ "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_1xiee_501",
31
+ "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_1xiee_515",
32
+ "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_1xiee_518",
33
+ "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_1xiee_528",
34
+ "content-first-child-header": "awsui_content-first-child-header_hyvsj_1xiee_531",
35
+ "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_1xiee_531",
36
+ "has-header": "awsui_has-header_hyvsj_1xiee_531",
37
+ "content-first-child-main": "awsui_content-first-child-main_hyvsj_1xiee_546",
38
+ "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_1xiee_546",
39
+ "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_1xiee_566",
40
+ "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_1xiee_569",
41
+ "has-split-panel": "awsui_has-split-panel_hyvsj_1xiee_589",
42
+ "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_1xiee_589",
43
+ "block-body-scroll": "awsui_block-body-scroll_hyvsj_1xiee_597",
44
+ "unfocusable": "awsui_unfocusable_hyvsj_1xiee_602",
45
+ "container": "awsui_container_hyvsj_1xiee_612",
46
+ "is-navigation-open": "awsui_is-navigation-open_hyvsj_1xiee_638",
47
+ "is-tools-open": "awsui_is-tools-open_hyvsj_1xiee_641",
48
+ "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_1xiee_641",
49
+ "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_1xiee_641",
50
+ "has-active-drawer": "awsui_has-active-drawer_hyvsj_1xiee_641",
51
+ "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_1xiee_654",
52
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_1xiee_671",
53
+ "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_1xiee_675",
54
+ "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_1xiee_679",
55
+ "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_1xiee_683",
56
+ "navigation-container": "awsui_navigation-container_hyvsj_1xiee_692",
57
+ "show-navigation": "awsui_show-navigation_hyvsj_1xiee_730",
58
+ "animating": "awsui_animating_hyvsj_1xiee_753",
59
+ "showButtons": "awsui_showButtons_hyvsj_1xiee_1",
60
+ "navigation": "awsui_navigation_hyvsj_1xiee_692",
61
+ "openNavigation": "awsui_openNavigation_hyvsj_1xiee_1",
62
+ "animated-content": "awsui_animated-content_hyvsj_1xiee_817",
63
+ "content-container": "awsui_content-container_hyvsj_1xiee_820",
64
+ "hide-navigation": "awsui_hide-navigation_hyvsj_1xiee_829",
65
+ "notifications": "awsui_notifications_hyvsj_1xiee_839",
66
+ "has-notification-content": "awsui_has-notification-content_hyvsj_1xiee_844",
67
+ "sticky-notifications": "awsui_sticky-notifications_hyvsj_1xiee_848",
68
+ "high-contrast": "awsui_high-contrast_hyvsj_1xiee_853",
69
+ "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_1xiee_871",
70
+ "position-bottom": "awsui_position-bottom_hyvsj_1xiee_918",
71
+ "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_1xiee_1",
72
+ "split-panel-side": "awsui_split-panel-side_hyvsj_1xiee_947",
73
+ "position-side": "awsui_position-side_hyvsj_1xiee_960",
74
+ "tools-container": "awsui_tools-container_hyvsj_1xiee_982",
75
+ "tools": "awsui_tools_hyvsj_1xiee_982",
76
+ "openTools": "awsui_openTools_hyvsj_1xiee_1",
77
+ "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_1xiee_1071",
78
+ "hide-tools": "awsui_hide-tools_hyvsj_1xiee_1081",
79
+ "show-tools": "awsui_show-tools_hyvsj_1xiee_1093",
80
+ "has-tools-form": "awsui_has-tools-form_hyvsj_1xiee_1071",
81
+ "trigger-button-styles": "awsui_trigger-button-styles_hyvsj_1xiee_1173",
82
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_1xiee_1189",
83
+ "trigger": "awsui_trigger_hyvsj_1xiee_1173",
84
+ "selected": "awsui_selected_hyvsj_1xiee_1241",
85
+ "badge": "awsui_badge_hyvsj_1xiee_1261",
86
+ "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_1xiee_1265",
87
+ "trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-visible_hyvsj_1xiee_1276",
88
+ "dot": "awsui_dot_hyvsj_1xiee_1280",
89
+ "trigger-tooltip": "awsui_trigger-tooltip_hyvsj_1xiee_1293"
90
90
  };
91
91