@cloudscape-design/components 3.0.310 → 3.0.312

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 (205) hide show
  1. package/button/internal.d.ts +6 -0
  2. package/button/internal.d.ts.map +1 -1
  3. package/button/internal.js +6 -8
  4. package/button/internal.js.map +1 -1
  5. package/code-editor/resizable-box/styles.css.js +3 -3
  6. package/code-editor/resizable-box/styles.scoped.css +10 -8
  7. package/code-editor/resizable-box/styles.selectors.js +3 -3
  8. package/code-editor/styles.css.js +32 -32
  9. package/code-editor/styles.scoped.css +189 -157
  10. package/code-editor/styles.selectors.js +32 -32
  11. package/collection-preferences/content-display/index.js +1 -1
  12. package/collection-preferences/content-display/index.js.map +1 -1
  13. package/container/interfaces.d.ts +50 -0
  14. package/container/interfaces.d.ts.map +1 -1
  15. package/container/interfaces.js.map +1 -1
  16. package/container/internal.d.ts +1 -1
  17. package/container/internal.d.ts.map +1 -1
  18. package/container/internal.js +24 -18
  19. package/container/internal.js.map +1 -1
  20. package/container/styles.css.js +28 -18
  21. package/container/styles.scoped.css +93 -36
  22. package/container/styles.selectors.js +28 -18
  23. package/date-range-picker/calendar/header/index.d.ts.map +1 -1
  24. package/date-range-picker/calendar/header/index.js +4 -2
  25. package/date-range-picker/calendar/header/index.js.map +1 -1
  26. package/date-range-picker/calendar/index.js +1 -1
  27. package/date-range-picker/calendar/index.js.map +1 -1
  28. package/expandable-section/expandable-section-header.d.ts +2 -1
  29. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  30. package/expandable-section/expandable-section-header.js +6 -16
  31. package/expandable-section/expandable-section-header.js.map +1 -1
  32. package/expandable-section/internal.d.ts.map +1 -1
  33. package/expandable-section/internal.js +3 -2
  34. package/expandable-section/internal.js.map +1 -1
  35. package/form/index.d.ts.map +1 -1
  36. package/form/index.js +14 -1
  37. package/form/index.js.map +1 -1
  38. package/form/internal.d.ts.map +1 -1
  39. package/form/internal.js +3 -4
  40. package/form/internal.js.map +1 -1
  41. package/form-field/internal.js +2 -3
  42. package/form-field/internal.js.map +1 -1
  43. package/help-panel/styles.css.js +4 -4
  44. package/help-panel/styles.scoped.css +135 -95
  45. package/help-panel/styles.selectors.js +4 -4
  46. package/i18n/context.d.ts +14 -7
  47. package/i18n/context.d.ts.map +1 -1
  48. package/i18n/context.js.map +1 -1
  49. package/i18n/messages/all.all.js +3692 -538
  50. package/i18n/messages/all.all.json +3756 -577
  51. package/i18n/messages/all.de.js +317 -22
  52. package/i18n/messages/all.de.json +324 -27
  53. package/i18n/messages/all.en-GB.js +306 -21
  54. package/i18n/messages/all.en-GB.json +309 -24
  55. package/i18n/messages/all.en.js +11 -11
  56. package/i18n/messages/all.en.json +11 -11
  57. package/i18n/messages/all.es.js +311 -22
  58. package/i18n/messages/all.es.json +318 -25
  59. package/i18n/messages/all.fr.js +335 -27
  60. package/i18n/messages/all.fr.json +343 -30
  61. package/i18n/messages/all.id.js +319 -28
  62. package/i18n/messages/all.id.json +322 -31
  63. package/i18n/messages/all.it.js +320 -27
  64. package/i18n/messages/all.it.json +326 -30
  65. package/i18n/messages/all.ja.js +312 -28
  66. package/i18n/messages/all.ja.json +315 -30
  67. package/i18n/messages/all.ko.js +304 -24
  68. package/i18n/messages/all.ko.json +312 -25
  69. package/i18n/messages/all.pt-BR.js +313 -28
  70. package/i18n/messages/all.pt-BR.json +325 -31
  71. package/i18n/messages/all.zh-CN.js +301 -29
  72. package/i18n/messages/all.zh-CN.json +300 -31
  73. package/i18n/messages/all.zh-TW.js +295 -23
  74. package/i18n/messages/all.zh-TW.json +294 -25
  75. package/i18n/messages-types.d.ts +435 -0
  76. package/i18n/messages-types.d.ts.map +1 -0
  77. package/i18n/messages-types.js +5 -0
  78. package/i18n/messages-types.js.map +1 -0
  79. package/i18n/provider.d.ts.map +1 -1
  80. package/i18n/provider.js +2 -0
  81. package/i18n/provider.js.map +1 -1
  82. package/internal/analytics/components/analytics-funnel.d.ts +2 -1
  83. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  84. package/internal/analytics/components/analytics-funnel.js +6 -4
  85. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  86. package/internal/analytics/context/analytics-context.d.ts +2 -0
  87. package/internal/analytics/context/analytics-context.d.ts.map +1 -1
  88. package/internal/analytics/context/analytics-context.js +2 -0
  89. package/internal/analytics/context/analytics-context.js.map +1 -1
  90. package/internal/analytics/hooks/use-funnel.d.ts +3 -7
  91. package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  92. package/internal/analytics/hooks/use-funnel.js +2 -7
  93. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  94. package/internal/base-component/styles.scoped.css +382 -379
  95. package/internal/components/cartesian-chart/bottom-labels.js +1 -1
  96. package/internal/components/cartesian-chart/bottom-labels.js.map +1 -1
  97. package/internal/components/cartesian-chart/left-labels.js +1 -1
  98. package/internal/components/cartesian-chart/left-labels.js.map +1 -1
  99. package/internal/components/focus-lock/index.js +20 -19
  100. package/internal/components/focus-lock/index.js.map +1 -1
  101. package/internal/context/button-context.d.ts +10 -0
  102. package/internal/context/button-context.d.ts.map +1 -0
  103. package/internal/context/button-context.js +10 -0
  104. package/internal/context/button-context.js.map +1 -0
  105. package/internal/environment.js +1 -1
  106. package/internal/generated/theming/index.cjs +2 -1
  107. package/internal/generated/theming/index.js +2 -1
  108. package/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
  109. package/internal/hooks/use-visual-mode/index.js +3 -0
  110. package/internal/hooks/use-visual-mode/index.js.map +1 -1
  111. package/internal/i18n/messages/all.all.js +3692 -538
  112. package/internal/i18n/messages/all.all.json +3756 -577
  113. package/internal/i18n/messages/all.de.js +317 -22
  114. package/internal/i18n/messages/all.de.json +324 -27
  115. package/internal/i18n/messages/all.en-GB.js +306 -21
  116. package/internal/i18n/messages/all.en-GB.json +309 -24
  117. package/internal/i18n/messages/all.en.js +11 -11
  118. package/internal/i18n/messages/all.en.json +11 -11
  119. package/internal/i18n/messages/all.es.js +311 -22
  120. package/internal/i18n/messages/all.es.json +318 -25
  121. package/internal/i18n/messages/all.fr.js +335 -27
  122. package/internal/i18n/messages/all.fr.json +343 -30
  123. package/internal/i18n/messages/all.id.js +319 -28
  124. package/internal/i18n/messages/all.id.json +322 -31
  125. package/internal/i18n/messages/all.it.js +320 -27
  126. package/internal/i18n/messages/all.it.json +326 -30
  127. package/internal/i18n/messages/all.ja.js +312 -28
  128. package/internal/i18n/messages/all.ja.json +315 -30
  129. package/internal/i18n/messages/all.ko.js +304 -24
  130. package/internal/i18n/messages/all.ko.json +312 -25
  131. package/internal/i18n/messages/all.pt-BR.js +313 -28
  132. package/internal/i18n/messages/all.pt-BR.json +325 -31
  133. package/internal/i18n/messages/all.zh-CN.js +301 -29
  134. package/internal/i18n/messages/all.zh-CN.json +300 -31
  135. package/internal/i18n/messages/all.zh-TW.js +295 -23
  136. package/internal/i18n/messages/all.zh-TW.json +294 -25
  137. package/internal/manifest.json +1 -1
  138. package/package.json +1 -2
  139. package/pagination/internal.d.ts.map +1 -1
  140. package/pagination/internal.js +4 -4
  141. package/pagination/internal.js.map +1 -1
  142. package/pie-chart/utils.d.ts +1 -1
  143. package/pie-chart/utils.d.ts.map +1 -1
  144. package/pie-chart/utils.js.map +1 -1
  145. package/property-filter/index.d.ts.map +1 -1
  146. package/property-filter/index.js +1 -1
  147. package/property-filter/index.js.map +1 -1
  148. package/s3-resource-selector/interfaces.d.ts +3 -0
  149. package/s3-resource-selector/interfaces.d.ts.map +1 -1
  150. package/s3-resource-selector/interfaces.js.map +1 -1
  151. package/s3-resource-selector/s3-in-context/index.js +1 -1
  152. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  153. package/s3-resource-selector/s3-in-context/validation.d.ts +1 -1
  154. package/s3-resource-selector/s3-in-context/validation.d.ts.map +1 -1
  155. package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
  156. package/s3-resource-selector/s3-modal/basic-table.d.ts +3 -1
  157. package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
  158. package/s3-resource-selector/s3-modal/basic-table.js +2 -1
  159. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  160. package/s3-resource-selector/s3-modal/index.js +1 -1
  161. package/s3-resource-selector/s3-modal/index.js.map +1 -1
  162. package/s3-resource-selector/s3-modal/table-utils.d.ts +1 -1
  163. package/s3-resource-selector/s3-modal/table-utils.d.ts.map +1 -1
  164. package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
  165. package/select/parts/filter.d.ts +1 -1
  166. package/space-between/interfaces.d.ts +5 -0
  167. package/space-between/interfaces.d.ts.map +1 -1
  168. package/space-between/interfaces.js.map +1 -1
  169. package/space-between/internal.d.ts +1 -1
  170. package/space-between/internal.d.ts.map +1 -1
  171. package/space-between/internal.js +2 -2
  172. package/space-between/internal.js.map +1 -1
  173. package/space-between/styles.css.js +21 -20
  174. package/space-between/styles.scoped.css +25 -21
  175. package/space-between/styles.selectors.js +21 -20
  176. package/tag-editor/interfaces.d.ts +1 -0
  177. package/tag-editor/interfaces.d.ts.map +1 -1
  178. package/tag-editor/interfaces.js.map +1 -1
  179. package/tag-editor/validation.d.ts +1 -1
  180. package/tag-editor/validation.d.ts.map +1 -1
  181. package/tag-editor/validation.js.map +1 -1
  182. package/test-utils/dom/container/index.d.ts +1 -0
  183. package/test-utils/dom/container/index.js +3 -0
  184. package/test-utils/dom/container/index.js.map +1 -1
  185. package/test-utils/dom/expandable-section/index.js +1 -1
  186. package/test-utils/dom/expandable-section/index.js.map +1 -1
  187. package/test-utils/selectors/container/index.d.ts +1 -0
  188. package/test-utils/selectors/container/index.js +3 -0
  189. package/test-utils/selectors/container/index.js.map +1 -1
  190. package/test-utils/selectors/expandable-section/index.js +1 -1
  191. package/test-utils/selectors/expandable-section/index.js.map +1 -1
  192. package/test-utils/tsconfig.tsbuildinfo +1 -1
  193. package/text-content/styles.css.js +1 -1
  194. package/text-content/styles.scoped.css +65 -64
  195. package/text-content/styles.selectors.js +1 -1
  196. package/top-navigation/parts/overflow-menu/views/submenu.js +2 -2
  197. package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
  198. package/top-navigation/parts/overflow-menu/views/utilities.js +2 -2
  199. package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
  200. package/wizard/internal.d.ts.map +1 -1
  201. package/wizard/internal.js +4 -2
  202. package/wizard/internal.js.map +1 -1
  203. package/wizard/wizard-form.d.ts.map +1 -1
  204. package/wizard/wizard-form.js +1 -2
  205. package/wizard/wizard-form.js.map +1 -1
@@ -91,7 +91,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
93
  /* stylelint-disable @cloudscape-design/no-implicit-descendant, selector-max-type */
94
- .awsui_text-content_6absk_1k965_94:not(#\9) {
94
+ .awsui_text-content_6absk_uifas_94:not(#\9) {
95
95
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
96
96
  border-collapse: separate;
97
97
  border-spacing: 0;
@@ -131,26 +131,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
131
131
  /* stylelint-disable no-descending-specificity */
132
132
  /* stylelint-enable no-descending-specificity */
133
133
  }
134
- .awsui_text-content_6absk_1k965_94 h1:not(#\9),
135
- .awsui_text-content_6absk_1k965_94 h2:not(#\9),
136
- .awsui_text-content_6absk_1k965_94 h3:not(#\9),
137
- .awsui_text-content_6absk_1k965_94 h4:not(#\9),
138
- .awsui_text-content_6absk_1k965_94 h5:not(#\9),
139
- .awsui_text-content_6absk_1k965_94 p:not(#\9) {
134
+ .awsui_text-content_6absk_uifas_94 h1:not(#\9),
135
+ .awsui_text-content_6absk_uifas_94 h2:not(#\9),
136
+ .awsui_text-content_6absk_uifas_94 h3:not(#\9),
137
+ .awsui_text-content_6absk_uifas_94 h4:not(#\9),
138
+ .awsui_text-content_6absk_uifas_94 h5:not(#\9),
139
+ .awsui_text-content_6absk_uifas_94 p:not(#\9) {
140
140
  font-family: inherit;
141
141
  font-weight: normal;
142
142
  text-decoration: none;
143
143
  margin: 0;
144
144
  padding: var(--space-xxs-ja5cp8, 4px) 0;
145
145
  }
146
- .awsui_text-content_6absk_1k965_94 h1:not(#\9),
147
- .awsui_text-content_6absk_1k965_94 h2:not(#\9),
148
- .awsui_text-content_6absk_1k965_94 h3:not(#\9),
149
- .awsui_text-content_6absk_1k965_94 h4:not(#\9),
150
- .awsui_text-content_6absk_1k965_94 h5:not(#\9) {
146
+ .awsui_text-content_6absk_uifas_94 h1:not(#\9),
147
+ .awsui_text-content_6absk_uifas_94 h2:not(#\9),
148
+ .awsui_text-content_6absk_uifas_94 h3:not(#\9),
149
+ .awsui_text-content_6absk_uifas_94 h4:not(#\9),
150
+ .awsui_text-content_6absk_uifas_94 h5:not(#\9) {
151
151
  color: var(--color-text-heading-default-18iw0k, #000716);
152
152
  }
153
- .awsui_text-content_6absk_1k965_94 h1:not(#\9) {
153
+ .awsui_text-content_6absk_uifas_94 h1:not(#\9) {
154
154
  font-size: var(--font-heading-xl-size-qxqrag, 32px);
155
155
  line-height: var(--font-heading-xl-line-height-4s70cu, 40px);
156
156
  letter-spacing: var(--font-heading-xl-letter-spacing-zxoemo, -0.02em);
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
159
159
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
160
160
  }
161
- .awsui_text-content_6absk_1k965_94 h2:not(#\9) {
161
+ .awsui_text-content_6absk_uifas_94 h2:not(#\9) {
162
162
  font-size: var(--font-heading-l-size-hcsmf8, 24px);
163
163
  line-height: var(--font-heading-l-line-height-l1pmir, 30px);
164
164
  letter-spacing: var(--font-heading-l-letter-spacing-usq225, -0.015em);
@@ -166,7 +166,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
166
166
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
167
167
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
168
168
  }
169
- .awsui_text-content_6absk_1k965_94 h3:not(#\9) {
169
+ .awsui_text-content_6absk_uifas_94 h3:not(#\9) {
170
170
  font-size: var(--font-heading-m-size-hbn9yp, 20px);
171
171
  line-height: var(--font-heading-m-line-height-ozfvgp, 24px);
172
172
  letter-spacing: var(--font-heading-m-letter-spacing-rsatez, -0.01em);
@@ -174,7 +174,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
174
174
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
175
175
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
176
176
  }
177
- .awsui_text-content_6absk_1k965_94 h4:not(#\9) {
177
+ .awsui_text-content_6absk_uifas_94 h4:not(#\9) {
178
178
  font-size: var(--font-heading-s-size-ep2ts9, 16px);
179
179
  line-height: var(--font-heading-s-line-height-uruujc, 20px);
180
180
  letter-spacing: var(--font-heading-s-letter-spacing-j4vcrt, -0.005em);
@@ -182,30 +182,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
182
182
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
183
183
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
184
184
  }
185
- .awsui_text-content_6absk_1k965_94 h5:not(#\9) {
185
+ .awsui_text-content_6absk_uifas_94 h5:not(#\9) {
186
186
  font-size: var(--font-heading-xs-size-2ai9la, 14px);
187
187
  line-height: var(--font-heading-xs-line-height-yt5y4b, 18px);
188
188
  font-weight: var(--font-heading-xs-weight-dxq16u, 800);
189
189
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
190
190
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
191
191
  }
192
- .awsui_text-content_6absk_1k965_94 b:not(#\9),
193
- .awsui_text-content_6absk_1k965_94 strong:not(#\9) {
192
+ .awsui_text-content_6absk_uifas_94 b:not(#\9),
193
+ .awsui_text-content_6absk_uifas_94 strong:not(#\9) {
194
194
  font-weight: 700;
195
195
  }
196
- .awsui_text-content_6absk_1k965_94 p:not(#\9) {
196
+ .awsui_text-content_6absk_uifas_94 p:not(#\9) {
197
197
  font-size: var(--font-body-m-size-7dign1, 14px);
198
198
  line-height: var(--font-body-m-line-height-rfgrp9, 22px);
199
199
  color: inherit;
200
200
  }
201
- .awsui_text-content_6absk_1k965_94 small:not(#\9) {
201
+ .awsui_text-content_6absk_uifas_94 small:not(#\9) {
202
202
  display: inline-block;
203
203
  font-size: var(--font-body-s-size-6jmxer, 12px);
204
204
  line-height: var(--font-body-s-line-height-ga8tt7, 16px);
205
205
  letter-spacing: var(--font-body-s-letter-spacing-v8bwhi, 0.005em);
206
206
  color: var(--color-text-small-l0u24v, #5f6b7a);
207
207
  }
208
- .awsui_text-content_6absk_1k965_94 small a:not(#\9) {
208
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9) {
209
209
  font-size: inherit;
210
210
  color: var(--color-text-link-default-gthbx2, #0972d3);
211
211
  font-weight: var(--font-link-primary-weight-tj5hoh, "inherit");
@@ -220,79 +220,80 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
220
220
  transition-duration: var(--motion-duration-refresh-only-medium-wkp575, 165ms);
221
221
  }
222
222
  @media (prefers-reduced-motion: reduce) {
223
- .awsui_text-content_6absk_1k965_94 small a:not(#\9) {
223
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9) {
224
224
  animation: none;
225
225
  transition: none;
226
226
  }
227
227
  }
228
- .awsui-motion-disabled .awsui_text-content_6absk_1k965_94 small a:not(#\9), .awsui-mode-entering .awsui_text-content_6absk_1k965_94 small a:not(#\9) {
228
+ .awsui-motion-disabled .awsui_text-content_6absk_uifas_94 small a:not(#\9), .awsui-mode-entering .awsui_text-content_6absk_uifas_94 small a:not(#\9) {
229
229
  animation: none;
230
230
  transition: none;
231
231
  }
232
- .awsui_text-content_6absk_1k965_94 small a:not(#\9):hover {
232
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9):hover {
233
233
  cursor: pointer;
234
234
  color: var(--color-text-link-hover-h1b9eu, #033160);
235
235
  }
236
- .awsui_text-content_6absk_1k965_94 small a:not(#\9):focus {
236
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9):focus {
237
237
  outline: none;
238
238
  }
239
- .awsui_text-content_6absk_1k965_94 small a:not(#\9):active {
239
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9):active {
240
240
  color: var(--color-text-link-hover-h1b9eu, #033160);
241
241
  }
242
- .awsui_text-content_6absk_1k965_94 small a:not(#\9):active, .awsui_text-content_6absk_1k965_94 small a:not(#\9):focus, .awsui_text-content_6absk_1k965_94 small a:not(#\9):hover {
242
+ .awsui_text-content_6absk_uifas_94 small a:not(#\9):active, .awsui_text-content_6absk_uifas_94 small a:not(#\9):focus, .awsui_text-content_6absk_uifas_94 small a:not(#\9):hover {
243
243
  text-decoration: underline;
244
244
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
245
245
  text-decoration-color: currentColor;
246
246
  }
247
- .awsui_text-content_6absk_1k965_94 code:not(#\9),
248
- .awsui_text-content_6absk_1k965_94 pre:not(#\9),
249
- .awsui_text-content_6absk_1k965_94 samp:not(#\9) {
247
+ .awsui_text-content_6absk_uifas_94 code:not(#\9),
248
+ .awsui_text-content_6absk_uifas_94 pre:not(#\9),
249
+ .awsui_text-content_6absk_uifas_94 samp:not(#\9) {
250
250
  font-family: var(--font-family-monospace-froq9j, Monaco, Menlo, Consolas, "Courier Prime", Courier, "Courier New", monospace);
251
251
  background: transparent;
252
252
  }
253
- .awsui_text-content_6absk_1k965_94 code:not(#\9) {
253
+ .awsui_text-content_6absk_uifas_94 code:not(#\9) {
254
254
  font-size: var(--font-body-s-size-6jmxer, 12px);
255
255
  line-height: var(--font-body-s-line-height-ga8tt7, 16px);
256
256
  letter-spacing: var(--font-body-s-letter-spacing-v8bwhi, 0.005em);
257
257
  }
258
- .awsui_text-content_6absk_1k965_94 a:not(#\9) {
258
+ .awsui_text-content_6absk_uifas_94 a:not(#\9) {
259
259
  color: var(--color-text-link-default-gthbx2, #0972d3);
260
- font-weight: inherit;
261
- letter-spacing: normal;
262
- text-decoration: none;
260
+ font-weight: var(--font-link-primary-weight-tj5hoh, "inherit");
261
+ letter-spacing: var(--font-link-primary-letter-spacing-zpfgrc, "inherit");
262
+ -webkit-text-decoration: var(--font-link-primary-decoration-gru46w, underline);
263
+ text-decoration: var(--font-link-primary-decoration-gru46w, underline);
263
264
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
264
- text-decoration-color: transparent;
265
+ text-decoration-color: var(--color-text-link-primary-underline-tnqzzx, #0972d3);
265
266
  transition-property: color, -webkit-text-decoration;
266
267
  transition-property: color, text-decoration;
267
268
  transition-property: color, text-decoration, -webkit-text-decoration;
268
269
  transition-duration: var(--motion-duration-refresh-only-medium-wkp575, 165ms);
269
270
  }
270
271
  @media (prefers-reduced-motion: reduce) {
271
- .awsui_text-content_6absk_1k965_94 a:not(#\9) {
272
+ .awsui_text-content_6absk_uifas_94 a:not(#\9) {
272
273
  animation: none;
273
274
  transition: none;
274
275
  }
275
276
  }
276
- .awsui-motion-disabled .awsui_text-content_6absk_1k965_94 a:not(#\9), .awsui-mode-entering .awsui_text-content_6absk_1k965_94 a:not(#\9) {
277
+ .awsui-motion-disabled .awsui_text-content_6absk_uifas_94 a:not(#\9), .awsui-mode-entering .awsui_text-content_6absk_uifas_94 a:not(#\9) {
277
278
  animation: none;
278
279
  transition: none;
279
280
  }
280
- .awsui_text-content_6absk_1k965_94 a:not(#\9):hover {
281
+ .awsui_text-content_6absk_uifas_94 a:not(#\9):hover {
281
282
  cursor: pointer;
282
283
  color: var(--color-text-link-hover-h1b9eu, #033160);
283
284
  }
284
- .awsui_text-content_6absk_1k965_94 a:not(#\9):focus {
285
+ .awsui_text-content_6absk_uifas_94 a:not(#\9):focus {
285
286
  outline: none;
286
287
  }
287
- .awsui_text-content_6absk_1k965_94 a:not(#\9):active {
288
+ .awsui_text-content_6absk_uifas_94 a:not(#\9):active {
288
289
  color: var(--color-text-link-hover-h1b9eu, #033160);
289
290
  }
290
- .awsui_text-content_6absk_1k965_94 a:not(#\9):active, .awsui_text-content_6absk_1k965_94 a:not(#\9):focus, .awsui_text-content_6absk_1k965_94 a:not(#\9):hover {
291
+ .awsui_text-content_6absk_uifas_94 a:not(#\9):active, .awsui_text-content_6absk_uifas_94 a:not(#\9):focus, .awsui_text-content_6absk_uifas_94 a:not(#\9):hover {
291
292
  text-decoration: underline;
292
293
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
293
294
  text-decoration-color: currentColor;
294
295
  }
295
- .awsui_text-content_6absk_1k965_94 a:not(#\9):focus {
296
+ .awsui_text-content_6absk_uifas_94 a:not(#\9):focus {
296
297
  outline: thin dotted;
297
298
  outline: var(--border-link-focus-ring-outline-pwlekd, 0);
298
299
  outline-offset: 2px;
@@ -300,31 +301,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
300
301
  border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
301
302
  box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-z7lixz, 2px) var(--color-border-item-focused-4t19h5, #0972d3);
302
303
  }
303
- .awsui_text-content_6absk_1k965_94 ul:not(#\9),
304
- .awsui_text-content_6absk_1k965_94 ol:not(#\9) {
304
+ .awsui_text-content_6absk_uifas_94 ul:not(#\9),
305
+ .awsui_text-content_6absk_uifas_94 ol:not(#\9) {
305
306
  padding-left: var(--space-l-f4l5gr, 20px);
306
307
  margin: var(--space-xxs-ja5cp8, 4px) 0;
307
308
  list-style-position: outside;
308
309
  }
309
- .awsui_text-content_6absk_1k965_94 ul + ul:not(#\9),
310
- .awsui_text-content_6absk_1k965_94 ul + ol:not(#\9),
311
- .awsui_text-content_6absk_1k965_94 ul > li + ul:not(#\9),
312
- .awsui_text-content_6absk_1k965_94 ul > li + li:not(#\9),
313
- .awsui_text-content_6absk_1k965_94 ul > li + ol:not(#\9),
314
- .awsui_text-content_6absk_1k965_94 ul > li > ul:not(#\9),
315
- .awsui_text-content_6absk_1k965_94 ul > li > ol:not(#\9),
316
- .awsui_text-content_6absk_1k965_94 ol + ul:not(#\9),
317
- .awsui_text-content_6absk_1k965_94 ol + ol:not(#\9),
318
- .awsui_text-content_6absk_1k965_94 ol > li + ul:not(#\9),
319
- .awsui_text-content_6absk_1k965_94 ol > li + li:not(#\9),
320
- .awsui_text-content_6absk_1k965_94 ol > li + ol:not(#\9),
321
- .awsui_text-content_6absk_1k965_94 ol > li > ul:not(#\9),
322
- .awsui_text-content_6absk_1k965_94 ol > li > ol:not(#\9) {
310
+ .awsui_text-content_6absk_uifas_94 ul + ul:not(#\9),
311
+ .awsui_text-content_6absk_uifas_94 ul + ol:not(#\9),
312
+ .awsui_text-content_6absk_uifas_94 ul > li + ul:not(#\9),
313
+ .awsui_text-content_6absk_uifas_94 ul > li + li:not(#\9),
314
+ .awsui_text-content_6absk_uifas_94 ul > li + ol:not(#\9),
315
+ .awsui_text-content_6absk_uifas_94 ul > li > ul:not(#\9),
316
+ .awsui_text-content_6absk_uifas_94 ul > li > ol:not(#\9),
317
+ .awsui_text-content_6absk_uifas_94 ol + ul:not(#\9),
318
+ .awsui_text-content_6absk_uifas_94 ol + ol:not(#\9),
319
+ .awsui_text-content_6absk_uifas_94 ol > li + ul:not(#\9),
320
+ .awsui_text-content_6absk_uifas_94 ol > li + li:not(#\9),
321
+ .awsui_text-content_6absk_uifas_94 ol > li + ol:not(#\9),
322
+ .awsui_text-content_6absk_uifas_94 ol > li > ul:not(#\9),
323
+ .awsui_text-content_6absk_uifas_94 ol > li > ol:not(#\9) {
323
324
  padding-top: var(--space-xxs-ja5cp8, 4px);
324
325
  }
325
- .awsui_text-content_6absk_1k965_94 ul > li > ul:not(#\9),
326
- .awsui_text-content_6absk_1k965_94 ul > li > ol:not(#\9),
327
- .awsui_text-content_6absk_1k965_94 ol > li > ul:not(#\9),
328
- .awsui_text-content_6absk_1k965_94 ol > li > ol:not(#\9) {
326
+ .awsui_text-content_6absk_uifas_94 ul > li > ul:not(#\9),
327
+ .awsui_text-content_6absk_uifas_94 ul > li > ol:not(#\9),
328
+ .awsui_text-content_6absk_uifas_94 ol > li > ul:not(#\9),
329
+ .awsui_text-content_6absk_uifas_94 ol > li > ol:not(#\9) {
329
330
  margin: 0;
330
331
  }
@@ -2,6 +2,6 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "text-content": "awsui_text-content_6absk_1k965_94"
5
+ "text-content": "awsui_text-content_6absk_uifas_94"
6
6
  };
7
7
 
@@ -2,17 +2,17 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React from 'react';
4
4
  import clsx from 'clsx';
5
- import FocusLock from 'react-focus-lock';
6
5
  import { useNavigate } from '../router';
7
6
  import Header from '../header';
8
7
  import { SubmenuItem } from '../menu-item';
9
8
  import { useUniqueId } from '../../../../internal/hooks/use-unique-id';
9
+ import FocusLock from '../../../../internal/components/focus-lock';
10
10
  import styles from '../../../styles.css.js';
11
11
  import { fireCancelableEvent, isPlainLeftClick } from '../../../../internal/events';
12
12
  const SubmenuView = ({ onClose, utilityIndex, headerText, headerSecondaryText, dismissIconAriaLabel, backIconAriaLabel, definition, }) => {
13
13
  const navigate = useNavigate();
14
14
  const headerId = useUniqueId('overflow-menu-header');
15
- return (React.createElement(FocusLock, { returnFocus: true },
15
+ return (React.createElement(FocusLock, { autoFocus: true },
16
16
  React.createElement(Header, { secondaryText: headerSecondaryText, dismissIconAriaLabel: dismissIconAriaLabel, backIconAriaLabel: backIconAriaLabel, onClose: onClose, onBack: () => navigate('utilities', { utilityIndex }) },
17
17
  React.createElement("span", { id: headerId }, headerText)),
18
18
  React.createElement("ul", { className: clsx(styles['overflow-menu-list'], styles['overflow-menu-list-submenu']), "aria-labelledby": headerId }, definition.items.map((item, index) => (React.createElement(SubmenuItem, Object.assign({ key: index }, item, { onClick: (event, item) => {
@@ -1 +1 @@
1
- {"version":3,"file":"submenu.js","sourceRoot":"lib/default/","sources":["top-navigation/parts/overflow-menu/views/submenu.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAKvE,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAOpF,MAAM,WAAW,GAAG,CAAC,EACnB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,GACO,EAAE,EAAE;IACrB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAErD,OAAO,CACL,oBAAC,SAAS,IAAC,WAAW,EAAE,IAAI;QAC1B,oBAAC,MAAM,IACL,aAAa,EAAE,mBAAmB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,CAAC;YAErD,8BAAM,EAAE,EAAE,QAAQ,IAAG,UAAU,CAAQ,CAChC;QACT,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,4BAA4B,CAAC,CAAC,qBAClE,QAAQ,IAEvB,UAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACjF,oBAAC,WAAW,kBACV,GAAG,EAAE,KAAK,IACN,IAAI,IACR,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gBACvB,IAAI,IAAI,CAAC,IAAI,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;oBACxC,mBAAmB,CACjB,UAAU,CAAC,YAAY,EACvB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EACzD,KAAK,CACN,CAAC;iBACH;gBAED,mBAAmB,CACjB,UAAU,CAAC,WAAW,EACtB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EACzD,KAAK,CACN,CAAC;gBACF,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,CAAC;YACd,CAAC,IACD,CACH,CAAC,CACC,CACK,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport FocusLock from 'react-focus-lock';\n\nimport { useNavigate } from '../router';\nimport Header from '../header';\nimport { SubmenuItem } from '../menu-item';\nimport { useUniqueId } from '../../../../internal/hooks/use-unique-id';\n\nimport { TopNavigationProps } from '../../../interfaces';\n\nimport { View } from '..';\nimport styles from '../../../styles.css.js';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../../../internal/events';\n\ninterface SubmenuViewProps extends View {\n definition: TopNavigationProps.MenuDropdownUtility;\n utilityIndex?: number;\n}\n\nconst SubmenuView = ({\n onClose,\n utilityIndex,\n headerText,\n headerSecondaryText,\n dismissIconAriaLabel,\n backIconAriaLabel,\n definition,\n}: SubmenuViewProps) => {\n const navigate = useNavigate();\n const headerId = useUniqueId('overflow-menu-header');\n\n return (\n <FocusLock returnFocus={true}>\n <Header\n secondaryText={headerSecondaryText}\n dismissIconAriaLabel={dismissIconAriaLabel}\n backIconAriaLabel={backIconAriaLabel}\n onClose={onClose}\n onBack={() => navigate('utilities', { utilityIndex })}\n >\n <span id={headerId}>{headerText}</span>\n </Header>\n <ul\n className={clsx(styles['overflow-menu-list'], styles['overflow-menu-list-submenu'])}\n aria-labelledby={headerId}\n >\n {(definition as TopNavigationProps.MenuDropdownUtility).items.map((item, index) => (\n <SubmenuItem\n key={index}\n {...item}\n onClick={(event, item) => {\n if (item.href && isPlainLeftClick(event)) {\n fireCancelableEvent(\n definition.onItemFollow,\n { id: item.id, href: item.href, external: item.external },\n event\n );\n }\n\n fireCancelableEvent(\n definition.onItemClick,\n { id: item.id, href: item.href, external: item.external },\n event\n );\n onClose?.();\n }}\n />\n ))}\n </ul>\n </FocusLock>\n );\n};\n\nexport default SubmenuView;\n"]}
1
+ {"version":3,"file":"submenu.js","sourceRoot":"lib/default/","sources":["top-navigation/parts/overflow-menu/views/submenu.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAA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AQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EACzD,KAAK,CACN,CAAC;iBACH;gBAED,mBAAmB,CACjB,UAAU,CAAC,WAAW,EACtB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EACzD,KAAK,CACN,CAAC;gBACF,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,CAAC;YACd,CAAC,IACD,CACH,CAAC,CACC,CACK,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useNavigate } from '../router';\nimport Header from '../header';\nimport { SubmenuItem } from '../menu-item';\nimport { useUniqueId } from '../../../../internal/hooks/use-unique-id';\nimport FocusLock from '../../../../internal/components/focus-lock';\n\nimport { TopNavigationProps } from '../../../interfaces';\n\nimport { View } from '..';\nimport styles from '../../../styles.css.js';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../../../internal/events';\n\ninterface SubmenuViewProps extends View {\n definition: TopNavigationProps.MenuDropdownUtility;\n utilityIndex?: number;\n}\n\nconst SubmenuView = ({\n onClose,\n utilityIndex,\n headerText,\n headerSecondaryText,\n dismissIconAriaLabel,\n backIconAriaLabel,\n definition,\n}: SubmenuViewProps) => {\n const navigate = useNavigate();\n const headerId = useUniqueId('overflow-menu-header');\n\n return (\n <FocusLock autoFocus={true}>\n <Header\n secondaryText={headerSecondaryText}\n dismissIconAriaLabel={dismissIconAriaLabel}\n backIconAriaLabel={backIconAriaLabel}\n onClose={onClose}\n onBack={() => navigate('utilities', { utilityIndex })}\n >\n <span id={headerId}>{headerText}</span>\n </Header>\n <ul\n className={clsx(styles['overflow-menu-list'], styles['overflow-menu-list-submenu'])}\n aria-labelledby={headerId}\n >\n {(definition as TopNavigationProps.MenuDropdownUtility).items.map((item, index) => (\n <SubmenuItem\n key={index}\n {...item}\n onClick={(event, item) => {\n if (item.href && isPlainLeftClick(event)) {\n fireCancelableEvent(\n definition.onItemFollow,\n { id: item.id, href: item.href, external: item.external },\n event\n );\n }\n\n fireCancelableEvent(\n definition.onItemClick,\n { id: item.id, href: item.href, external: item.external },\n event\n );\n onClose?.();\n }}\n />\n ))}\n </ul>\n </FocusLock>\n );\n};\n\nexport default SubmenuView;\n"]}
@@ -1,7 +1,7 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { useEffect, useRef } from 'react';
4
- import FocusLock from 'react-focus-lock';
4
+ import FocusLock from '../../../../internal/components/focus-lock';
5
5
  import Header from '../header';
6
6
  import { UtilityMenuItem } from '../menu-item';
7
7
  import styles from '../../../styles.css.js';
@@ -17,7 +17,7 @@ const UtilitiesView = ({ headerText, dismissIconAriaLabel, onClose, items = [],
17
17
  (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
18
18
  }
19
19
  }, [focusIndex]);
20
- return (React.createElement(FocusLock, { returnFocus: true },
20
+ return (React.createElement(FocusLock, { autoFocus: true },
21
21
  React.createElement(Header, { dismissIconAriaLabel: dismissIconAriaLabel, onClose: onClose },
22
22
  React.createElement("span", { id: headerId }, headerText)),
23
23
  React.createElement("ul", { className: styles['overflow-menu-list'], "aria-labelledby": headerId }, items.map((utility, index) => (React.createElement(UtilityMenuItem, Object.assign({ key: index, index: index, ref: index === focusIndex ? ref : undefined, onClose: onClose }, utility)))))));
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.js","sourceRoot":"lib/default/","sources":["top-navigation/parts/overflow-menu/views/utilities.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,k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C","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport FocusLock from 'react-focus-lock';\n\nimport Header from '../header';\nimport { UtilityMenuItem } from '../menu-item';\n\nimport { TopNavigationProps } from '../../../interfaces';\n\nimport { View } from '..';\nimport styles from '../../../styles.css.js';\nimport { useUniqueId } from '../../../../internal/hooks/use-unique-id';\n\ninterface UtilitiesViewProps extends View {\n items: TopNavigationProps['utilities'];\n focusIndex?: number;\n}\n\nconst UtilitiesView = ({ headerText, dismissIconAriaLabel, onClose, items = [], focusIndex }: UtilitiesViewProps) => {\n const headerId = useUniqueId('overflow-menu-header');\n const ref = useRef<HTMLAnchorElement & HTMLButtonElement>(null);\n\n useEffect(() => {\n // A focus index is used to set the focus back to the submenu trigger\n // returning from a submenu.\n if (typeof focusIndex === 'number') {\n ref.current?.focus();\n }\n }, [focusIndex]);\n\n return (\n <FocusLock returnFocus={true}>\n <Header dismissIconAriaLabel={dismissIconAriaLabel} onClose={onClose}>\n <span id={headerId}>{headerText}</span>\n </Header>\n <ul className={styles['overflow-menu-list']} aria-labelledby={headerId}>\n {items.map((utility, index) => (\n <UtilityMenuItem\n key={index}\n index={index}\n ref={index === focusIndex ? ref : undefined}\n onClose={onClose}\n {...utility}\n />\n ))}\n </ul>\n </FocusLock>\n );\n};\n\nexport default UtilitiesView;\n"]}
1
+ {"version":3,"file":"utilities.js","sourceRoot":"lib/default/","sources":["top-navigation/parts/overflow-menu/views/utilities.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAOvE,MAAM,aAAa,GAAG,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,GAAG,EAAE,EAAE,UAAU,EAAsB,EAAE,EAAE;IAClH,MAAM,QAAQ,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,MAAM,CAAwC,IAAI,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE;;QACb,qEAAqE;QACrE,4BAA4B;QAC5B,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YAClC,MAAA,GAAG,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;SACtB;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,oBAAC,SAAS,IAAC,SAAS,EAAE,IAAI;QACxB,oBAAC,MAAM,IAAC,oBAAoB,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO;YAClE,8BAAM,EAAE,EAAE,QAAQ,IAAG,UAAU,CAAQ,CAChC;QACT,4BAAI,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,qBAAmB,QAAQ,IACnE,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,oBAAC,eAAe,kBACd,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAC3C,OAAO,EAAE,OAAO,IACZ,OAAO,EACX,CACH,CAAC,CACC,CACK,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport FocusLock from '../../../../internal/components/focus-lock';\n\nimport Header from '../header';\nimport { UtilityMenuItem } from '../menu-item';\n\nimport { TopNavigationProps } from '../../../interfaces';\n\nimport { View } from '..';\nimport styles from '../../../styles.css.js';\nimport { useUniqueId } from '../../../../internal/hooks/use-unique-id';\n\ninterface UtilitiesViewProps extends View {\n items: TopNavigationProps['utilities'];\n focusIndex?: number;\n}\n\nconst UtilitiesView = ({ headerText, dismissIconAriaLabel, onClose, items = [], focusIndex }: UtilitiesViewProps) => {\n const headerId = useUniqueId('overflow-menu-header');\n const ref = useRef<HTMLAnchorElement & HTMLButtonElement>(null);\n\n useEffect(() => {\n // A focus index is used to set the focus back to the submenu trigger\n // returning from a submenu.\n if (typeof focusIndex === 'number') {\n ref.current?.focus();\n }\n }, [focusIndex]);\n\n return (\n <FocusLock autoFocus={true}>\n <Header dismissIconAriaLabel={dismissIconAriaLabel} onClose={onClose}>\n <span id={headerId}>{headerText}</span>\n </Header>\n <ul className={styles['overflow-menu-list']} aria-labelledby={headerId}>\n {items.map((utility, index) => (\n <UtilityMenuItem\n key={index}\n index={index}\n ref={index === focusIndex ? ref : undefined}\n onClose={onClose}\n {...utility}\n />\n ))}\n </ul>\n </FocusLock>\n );\n};\n\nexport default UtilitiesView;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,KAAK,mBAAmB,GAAG,WAAW,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,iBAAyB,EACzB,WAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAuHrB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,KAAK,mBAAmB,GAAG,WAAW,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,iBAAyB,EACzB,WAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAsIrB"}
@@ -18,6 +18,7 @@ import WizardForm from './wizard-form';
18
18
  import WizardNavigation from './wizard-navigation';
19
19
  import styles from './styles.css.js';
20
20
  export default function InternalWizard(_a) {
21
+ var _b, _c;
21
22
  var { steps, activeStepIndex: controlledActiveStepIndex, isLoadingNextStep = false, allowSkipTo = false, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef } = _a, rest = __rest(_a, ["steps", "activeStepIndex", "isLoadingNextStep", "allowSkipTo", "secondaryActions", "onCancel", "onSubmit", "onNavigate", "__internalRootRef"]);
22
23
  const baseProps = getBaseProps(rest);
23
24
  const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);
@@ -65,11 +66,12 @@ export default function InternalWizard(_a) {
65
66
  }
66
67
  };
67
68
  const i18n = useInternalI18n('wizard');
68
- const i18nStrings = Object.assign(Object.assign({}, rest.i18nStrings), { stepNumberLabel: i18n('i18nStrings.stepNumberLabel', rest.i18nStrings.stepNumberLabel), collapsedStepsLabel: i18n('i18nStrings.collapsedStepsLabel', rest.i18nStrings.collapsedStepsLabel), cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings.cancelButton), previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings.previousButton), nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings.nextButton), optional: i18n('i18nStrings.optional', rest.i18nStrings.optional) });
69
+ const skipToButtonLabel = i18n('i18nStrings.skipToButtonLabel', rest.i18nStrings.skipToButtonLabel, format => task => format({ task__title: task.title }));
70
+ const i18nStrings = Object.assign(Object.assign({}, rest.i18nStrings), { skipToButtonLabel, stepNumberLabel: i18n('i18nStrings.stepNumberLabel', (_b = rest.i18nStrings) === null || _b === void 0 ? void 0 : _b.stepNumberLabel, format => stepNumber => format({ stepNumber })), collapsedStepsLabel: i18n('i18nStrings.collapsedStepsLabel', (_c = rest.i18nStrings) === null || _c === void 0 ? void 0 : _c.collapsedStepsLabel, format => (stepNumber, stepsCount) => format({ stepNumber, stepsCount })), cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings.cancelButton), previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings.previousButton), nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings.nextButton), optional: i18n('i18nStrings.optional', rest.i18nStrings.optional) });
69
71
  if (activeStepIndex && activeStepIndex >= steps.length) {
70
72
  warnOnce('Wizard', `You have set \`activeStepIndex\` to ${activeStepIndex} but you have provided only ${steps.length} steps. Its value is ignored and the component uses ${steps.length - 1} instead.`);
71
73
  }
72
- if (allowSkipTo && !i18nStrings.skipToButtonLabel) {
74
+ if (allowSkipTo && !skipToButtonLabel) {
73
75
  warnOnce('Wizard', `You have set \`allowSkipTo\` but you have not provided \`i18nStrings.skipToButtonLabel\`. The skip-to button will not be rendered.`);
74
76
  }
75
77
  return (React.createElement("div", Object.assign({}, baseProps, funnelProps, { ref: ref, className: clsx(styles.root, baseProps.className) }),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,E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AAiB,EACnC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B,CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnce } from '../internal/logging';\n\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n isLoadingNextStep = false,\n allowSkipTo = false,\n secondaryActions,\n onCancel,\n onSubmit,\n onNavigate,\n __internalRootRef,\n ...rest\n}: InternalWizardProps) {\n const baseProps = getBaseProps(rest);\n\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n const ref = useMergeRefs(breakpointsRef, __internalRootRef);\n\n const smallContainer = breakpoint === 'default';\n\n const [activeStepIndex, setActiveStepIndex] = useControllable(controlledActiveStepIndex, onNavigate, 0, {\n componentName: 'Wizard',\n controlledProp: 'activeStepIndex',\n changeHandler: 'onNavigate',\n });\n const { funnelInteractionId, funnelSubmit, funnelCancel, funnelProps } = useFunnel();\n const actualActiveStepIndex = activeStepIndex ? Math.min(activeStepIndex, steps.length - 1) : 0;\n\n const farthestStepIndex = useRef<number>(actualActiveStepIndex);\n farthestStepIndex.current = Math.max(farthestStepIndex.current, actualActiveStepIndex);\n\n const isVisualRefresh = useVisualRefresh();\n const isLastStep = actualActiveStepIndex >= steps.length - 1;\n\n const navigationEvent = (requestedStepIndex: number, reason: WizardProps.NavigationReason) => {\n if (funnelInteractionId) {\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepNameSelector: `.${styles['form-header-component-wrapper']}`,\n destinationStepNumber: requestedStepIndex + 1,\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n setActiveStepIndex(requestedStepIndex);\n fireNonCancelableEvent(onNavigate, { requestedStepIndex, reason });\n };\n const onStepClick = (stepIndex: number) => navigationEvent(stepIndex, 'step');\n const onSkipToClick = (stepIndex: number) => navigationEvent(stepIndex, 'skip');\n const onCancelClick = () => {\n funnelCancel();\n fireNonCancelableEvent(onCancel);\n };\n const onPreviousClick = () => navigationEvent(actualActiveStepIndex - 1, 'previous');\n const onPrimaryClick = () => {\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n const i18n = useInternalI18n('wizard');\n const i18nStrings: WizardProps.I18nStrings = {\n ...rest.i18nStrings,\n stepNumberLabel: i18n('i18nStrings.stepNumberLabel', rest.i18nStrings.stepNumberLabel),\n collapsedStepsLabel: i18n('i18nStrings.collapsedStepsLabel', rest.i18nStrings.collapsedStepsLabel),\n cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings.cancelButton),\n previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings.previousButton),\n nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings.nextButton),\n optional: i18n('i18nStrings.optional', rest.i18nStrings.optional),\n };\n\n if (activeStepIndex && activeStepIndex >= steps.length) {\n warnOnce(\n 'Wizard',\n `You have set \\`activeStepIndex\\` to ${activeStepIndex} but you have provided only ${\n steps.length\n } steps. Its value is ignored and the component uses ${steps.length - 1} instead.`\n );\n }\n\n if (allowSkipTo && !i18nStrings.skipToButtonLabel) {\n warnOnce(\n 'Wizard',\n `You have set \\`allowSkipTo\\` but you have not provided \\`i18nStrings.skipToButtonLabel\\`. The skip-to button will not be rendered.`\n );\n }\n\n return (\n <div {...baseProps} {...funnelProps} ref={ref} className={clsx(styles.root, baseProps.className)}>\n <div\n className={clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n <WizardNavigation\n activeStepIndex={actualActiveStepIndex}\n farthestStepIndex={farthestStepIndex.current}\n allowSkipTo={allowSkipTo}\n hidden={smallContainer}\n i18nStrings={i18nStrings}\n isVisualRefresh={isVisualRefresh}\n isLoadingNextStep={isLoadingNextStep}\n onStepClick={onStepClick}\n onSkipToClick={onSkipToClick}\n steps={steps}\n />\n <div\n className={clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n {isVisualRefresh && <div className={clsx(styles.background, 'awsui-context-content-header')} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n activeStepIndex={actualActiveStepIndex}\n isPrimaryLoading={isLoadingNextStep}\n allowSkipTo={allowSkipTo}\n secondaryActions={secondaryActions}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onSkipToClick={onSkipToClick}\n onPrimaryClick={onPrimaryClick}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,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xB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,GACZ;YACF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,IAAI,MAAM,CAAC,OAAO,EAAE,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;gBAE3G,eAAe,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,8BAA8B,CAAC,GAAI;gBAC/F,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,cAAc,EAClC,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,qBAAqB,EACtC,gBAAgB,EAAE,iBAAiB,EACnC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B,CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnce } from '../internal/logging';\n\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n isLoadingNextStep = false,\n allowSkipTo = false,\n secondaryActions,\n onCancel,\n onSubmit,\n onNavigate,\n __internalRootRef,\n ...rest\n}: InternalWizardProps) {\n const baseProps = getBaseProps(rest);\n\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n const ref = useMergeRefs(breakpointsRef, __internalRootRef);\n\n const smallContainer = breakpoint === 'default';\n\n const [activeStepIndex, setActiveStepIndex] = useControllable(controlledActiveStepIndex, onNavigate, 0, {\n componentName: 'Wizard',\n controlledProp: 'activeStepIndex',\n changeHandler: 'onNavigate',\n });\n const { funnelInteractionId, funnelSubmit, funnelCancel, funnelProps } = useFunnel();\n const actualActiveStepIndex = activeStepIndex ? Math.min(activeStepIndex, steps.length - 1) : 0;\n\n const farthestStepIndex = useRef<number>(actualActiveStepIndex);\n farthestStepIndex.current = Math.max(farthestStepIndex.current, actualActiveStepIndex);\n\n const isVisualRefresh = useVisualRefresh();\n const isLastStep = actualActiveStepIndex >= steps.length - 1;\n\n const navigationEvent = (requestedStepIndex: number, reason: WizardProps.NavigationReason) => {\n if (funnelInteractionId) {\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepNameSelector: `.${styles['form-header-component-wrapper']}`,\n destinationStepNumber: requestedStepIndex + 1,\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n setActiveStepIndex(requestedStepIndex);\n fireNonCancelableEvent(onNavigate, { requestedStepIndex, reason });\n };\n const onStepClick = (stepIndex: number) => navigationEvent(stepIndex, 'step');\n const onSkipToClick = (stepIndex: number) => navigationEvent(stepIndex, 'skip');\n const onCancelClick = () => {\n funnelCancel();\n fireNonCancelableEvent(onCancel);\n };\n const onPreviousClick = () => navigationEvent(actualActiveStepIndex - 1, 'previous');\n const onPrimaryClick = () => {\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n const i18n = useInternalI18n('wizard');\n const skipToButtonLabel = i18n(\n 'i18nStrings.skipToButtonLabel',\n rest.i18nStrings.skipToButtonLabel,\n format => task => format({ task__title: task.title })\n );\n\n const i18nStrings: WizardProps.I18nStrings = {\n ...rest.i18nStrings,\n skipToButtonLabel,\n stepNumberLabel: i18n(\n 'i18nStrings.stepNumberLabel',\n rest.i18nStrings?.stepNumberLabel,\n format => stepNumber => format({ stepNumber })\n ),\n collapsedStepsLabel: i18n(\n 'i18nStrings.collapsedStepsLabel',\n rest.i18nStrings?.collapsedStepsLabel,\n format => (stepNumber, stepsCount) => format({ stepNumber, stepsCount })\n ),\n cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings.cancelButton),\n previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings.previousButton),\n nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings.nextButton),\n optional: i18n('i18nStrings.optional', rest.i18nStrings.optional),\n };\n\n if (activeStepIndex && activeStepIndex >= steps.length) {\n warnOnce(\n 'Wizard',\n `You have set \\`activeStepIndex\\` to ${activeStepIndex} but you have provided only ${\n steps.length\n } steps. Its value is ignored and the component uses ${steps.length - 1} instead.`\n );\n }\n\n if (allowSkipTo && !skipToButtonLabel) {\n warnOnce(\n 'Wizard',\n `You have set \\`allowSkipTo\\` but you have not provided \\`i18nStrings.skipToButtonLabel\\`. The skip-to button will not be rendered.`\n );\n }\n\n return (\n <div {...baseProps} {...funnelProps} ref={ref} className={clsx(styles.root, baseProps.className)}>\n <div\n className={clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n <WizardNavigation\n activeStepIndex={actualActiveStepIndex}\n farthestStepIndex={farthestStepIndex.current}\n allowSkipTo={allowSkipTo}\n hidden={smallContainer}\n i18nStrings={i18nStrings}\n isVisualRefresh={isVisualRefresh}\n isLoadingNextStep={isLoadingNextStep}\n onStepClick={onStepClick}\n onSkipToClick={onSkipToClick}\n steps={steps}\n />\n <div\n className={clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n {isVisualRefresh && <div className={clsx(styles.background, 'awsui-context-content-header')} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n activeStepIndex={actualActiveStepIndex}\n isPrimaryLoading={isLoadingNextStep}\n allowSkipTo={allowSkipTo}\n secondaryActions={secondaryActions}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onSkipToClick={onSkipToClick}\n onPrimaryClick={onPrimaryClick}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"wizard-form.d.ts","sourceRoot":"lib/default/","sources":["wizard/wizard-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,GACd,EAAE,eAAe,eAiEjB"}
1
+ {"version":3,"file":"wizard-form.d.ts","sourceRoot":"lib/default/","sources":["wizard/wizard-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,GACd,EAAE,eAAe,eAoEjB"}
@@ -34,8 +34,7 @@ export default function WizardForm({ steps, activeStepIndex, isVisualRefresh, sh
34
34
  React.createElement("span", { className: styles['form-header-component-wrapper'], tabIndex: -1, ref: stepHeaderRef },
35
35
  title,
36
36
  isOptional && React.createElement("i", null, ` - ${i18nStrings.optional}`)))),
37
- React.createElement(AnalyticsFunnelStep, { stepNameSelector: `.${styles['form-header-component-wrapper']}`, stepNumber: activeStepIndex + 1 },
38
- React.createElement(InternalForm, { className: clsx(styles['form-component']), actions: React.createElement(WizardActions, { cancelButtonText: i18nStrings.cancelButton, primaryButtonText: isLastStep ? i18nStrings.submitButton : i18nStrings.nextButton, primaryButtonLoadingText: isLastStep ? i18nStrings.submitButtonLoadingAnnouncement : i18nStrings.nextButtonLoadingAnnouncement, previousButtonText: i18nStrings.previousButton, onCancelClick: onCancelClick, onPreviousClick: onPreviousClick, onPrimaryClick: onPrimaryClick, onSkipToClick: () => onSkipToClick(skipToTargetIndex), showPrevious: activeStepIndex !== 0, isPrimaryLoading: isPrimaryLoading, showSkipTo: showSkipTo, skipToButtonText: skipToButtonText }), secondaryActions: secondaryActions, errorText: errorText, errorIconAriaLabel: i18nStrings.errorIconAriaLabel }, content))));
37
+ React.createElement(AnalyticsFunnelStep, { stepNameSelector: `.${styles['form-header-component-wrapper']}`, stepNumber: activeStepIndex + 1 }, ({ funnelStepProps }) => (React.createElement(InternalForm, Object.assign({ className: clsx(styles['form-component']), actions: React.createElement(WizardActions, { cancelButtonText: i18nStrings.cancelButton, primaryButtonText: isLastStep ? i18nStrings.submitButton : i18nStrings.nextButton, primaryButtonLoadingText: isLastStep ? i18nStrings.submitButtonLoadingAnnouncement : i18nStrings.nextButtonLoadingAnnouncement, previousButtonText: i18nStrings.previousButton, onCancelClick: onCancelClick, onPreviousClick: onPreviousClick, onPrimaryClick: onPrimaryClick, onSkipToClick: () => onSkipToClick(skipToTargetIndex), showPrevious: activeStepIndex !== 0, isPrimaryLoading: isPrimaryLoading, showSkipTo: showSkipTo, skipToButtonText: skipToButtonText }), secondaryActions: secondaryActions, errorText: errorText, errorIconAriaLabel: i18nStrings.errorIconAriaLabel }, funnelStepProps), content)))));
39
38
  }
40
39
  function findSkipToTargetIndex(steps, activeStepIndex) {
41
40
  let nextRequiredStepIndex = activeStepIndex;
@@ -1 +1 @@
1
- {"version":3,"file":"wizard-form.js","sourceRoot":"lib/default/","sources":["wizard/wizard-form.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAiBxF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,GACG;;IAChB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAClG,MAAM,UAAU,GAAG,eAAe,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACvD,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,MAAM,aAAa,GAAG,MAAM,CAAwB,IAAI,CAAC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.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport InternalForm from '../form/internal';\nimport InternalHeader from '../header/internal';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport WizardActions from './wizard-actions';\nimport { WizardProps } from './interfaces';\nimport WizardFormHeader from './wizard-form-header';\nimport styles from './styles.css.js';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { AnalyticsFunnelStep } from '../internal/analytics/components/analytics-funnel';\n\ninterface WizardFormProps {\n steps: ReadonlyArray<WizardProps.Step>;\n activeStepIndex: number;\n isVisualRefresh: boolean;\n showCollapsedSteps: boolean;\n i18nStrings: WizardProps.I18nStrings;\n isPrimaryLoading: boolean;\n allowSkipTo: boolean;\n secondaryActions?: React.ReactNode;\n onCancelClick: () => void;\n onPreviousClick: () => void;\n onPrimaryClick: () => void;\n onSkipToClick: (stepIndex: number) => void;\n}\n\nexport default function WizardForm({\n steps,\n activeStepIndex,\n isVisualRefresh,\n showCollapsedSteps,\n i18nStrings,\n isPrimaryLoading,\n allowSkipTo,\n secondaryActions,\n onCancelClick,\n onPreviousClick,\n onPrimaryClick,\n onSkipToClick,\n}: WizardFormProps) {\n const { title, info, description, content, errorText, isOptional } = steps[activeStepIndex] || {};\n const isLastStep = activeStepIndex >= steps.length - 1;\n const skipToTargetIndex = findSkipToTargetIndex(steps, activeStepIndex);\n const isMobile = useMobile();\n const stepHeaderRef = useRef<HTMLDivElement | null>(null);\n\n useEffectOnUpdate(() => {\n if (stepHeaderRef && stepHeaderRef.current) {\n stepHeaderRef.current?.focus();\n }\n }, [activeStepIndex]);\n\n const showSkipTo = allowSkipTo && skipToTargetIndex !== -1;\n const skipToButtonText =\n skipToTargetIndex !== -1 && i18nStrings.skipToButtonLabel\n ? i18nStrings.skipToButtonLabel(steps[skipToTargetIndex], skipToTargetIndex + 1)\n : undefined;\n\n return (\n <>\n <WizardFormHeader isMobile={isMobile || showCollapsedSteps} isVisualRefresh={isVisualRefresh}>\n <div className={clsx(styles['collapsed-steps'], !showCollapsedSteps && styles['collapsed-steps-hidden'])}>\n {i18nStrings.collapsedStepsLabel?.(activeStepIndex + 1, steps.length)}\n </div>\n <InternalHeader className={styles['form-header-component']} variant=\"h1\" description={description} info={info}>\n <span className={styles['form-header-component-wrapper']} tabIndex={-1} ref={stepHeaderRef}>\n {title}\n {isOptional && <i>{` - ${i18nStrings.optional}`}</i>}\n </span>\n </InternalHeader>\n </WizardFormHeader>\n <AnalyticsFunnelStep\n stepNameSelector={`.${styles['form-header-component-wrapper']}`}\n stepNumber={activeStepIndex + 1}\n >\n <InternalForm\n className={clsx(styles['form-component'])}\n actions={\n <WizardActions\n cancelButtonText={i18nStrings.cancelButton}\n primaryButtonText={isLastStep ? i18nStrings.submitButton : i18nStrings.nextButton}\n primaryButtonLoadingText={\n isLastStep ? i18nStrings.submitButtonLoadingAnnouncement : i18nStrings.nextButtonLoadingAnnouncement\n }\n previousButtonText={i18nStrings.previousButton}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onPrimaryClick={onPrimaryClick}\n onSkipToClick={() => onSkipToClick(skipToTargetIndex)}\n showPrevious={activeStepIndex !== 0}\n isPrimaryLoading={isPrimaryLoading}\n showSkipTo={showSkipTo}\n skipToButtonText={skipToButtonText}\n />\n }\n secondaryActions={secondaryActions}\n errorText={errorText}\n errorIconAriaLabel={i18nStrings.errorIconAriaLabel}\n >\n {content}\n </InternalForm>\n </AnalyticsFunnelStep>\n </>\n );\n}\n\nfunction findSkipToTargetIndex(steps: ReadonlyArray<WizardProps.Step>, activeStepIndex: number): number {\n let nextRequiredStepIndex = activeStepIndex;\n do {\n nextRequiredStepIndex++;\n } while (nextRequiredStepIndex < steps.length - 1 && steps[nextRequiredStepIndex].isOptional);\n\n return nextRequiredStepIndex > activeStepIndex + 1 ? nextRequiredStepIndex : -1;\n}\n"]}
1
+ {"version":3,"file":"wizard-form.js","sourceRoot":"lib/default/","sources":["wizard/wizard-form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,OAAO,EACL,oBAAC,aAAa,IACZ,gBAAgB,EAAE,WAAW,CAAC,YAAY,EAC1C,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,EACjF,wBAAwB,EACtB,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC,CAAC,WAAW,CAAC,6BAA6B,EAEtG,kBAAkB,EAAE,WAAW,CAAC,cAAc,EAC9C,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,EACrD,YAAY,EAAE,eAAe,KAAK,CAAC,EACnC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,GAClC,EAEJ,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,IAC9C,eAAe,GAElB,OAAO,CACK,CAChB,CACmB,CACrB,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsC,EAAE,eAAuB;IAC5F,IAAI,qBAAqB,GAAG,eAAe,CAAC;IAC5C,GAAG;QACD,qBAAqB,EAAE,CAAC;KACzB,QAAQ,qBAAqB,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,UAAU,EAAE;IAE9F,OAAO,qBAAqB,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport InternalForm from '../form/internal';\nimport InternalHeader from '../header/internal';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport WizardActions from './wizard-actions';\nimport { WizardProps } from './interfaces';\nimport WizardFormHeader from './wizard-form-header';\nimport styles from './styles.css.js';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { AnalyticsFunnelStep } from '../internal/analytics/components/analytics-funnel';\n\ninterface WizardFormProps {\n steps: ReadonlyArray<WizardProps.Step>;\n activeStepIndex: number;\n isVisualRefresh: boolean;\n showCollapsedSteps: boolean;\n i18nStrings: WizardProps.I18nStrings;\n isPrimaryLoading: boolean;\n allowSkipTo: boolean;\n secondaryActions?: React.ReactNode;\n onCancelClick: () => void;\n onPreviousClick: () => void;\n onPrimaryClick: () => void;\n onSkipToClick: (stepIndex: number) => void;\n}\n\nexport default function WizardForm({\n steps,\n activeStepIndex,\n isVisualRefresh,\n showCollapsedSteps,\n i18nStrings,\n isPrimaryLoading,\n allowSkipTo,\n secondaryActions,\n onCancelClick,\n onPreviousClick,\n onPrimaryClick,\n onSkipToClick,\n}: WizardFormProps) {\n const { title, info, description, content, errorText, isOptional } = steps[activeStepIndex] || {};\n const isLastStep = activeStepIndex >= steps.length - 1;\n const skipToTargetIndex = findSkipToTargetIndex(steps, activeStepIndex);\n const isMobile = useMobile();\n const stepHeaderRef = useRef<HTMLDivElement | null>(null);\n\n useEffectOnUpdate(() => {\n if (stepHeaderRef && stepHeaderRef.current) {\n stepHeaderRef.current?.focus();\n }\n }, [activeStepIndex]);\n\n const showSkipTo = allowSkipTo && skipToTargetIndex !== -1;\n const skipToButtonText =\n skipToTargetIndex !== -1 && i18nStrings.skipToButtonLabel\n ? i18nStrings.skipToButtonLabel(steps[skipToTargetIndex], skipToTargetIndex + 1)\n : undefined;\n\n return (\n <>\n <WizardFormHeader isMobile={isMobile || showCollapsedSteps} isVisualRefresh={isVisualRefresh}>\n <div className={clsx(styles['collapsed-steps'], !showCollapsedSteps && styles['collapsed-steps-hidden'])}>\n {i18nStrings.collapsedStepsLabel?.(activeStepIndex + 1, steps.length)}\n </div>\n <InternalHeader className={styles['form-header-component']} variant=\"h1\" description={description} info={info}>\n <span className={styles['form-header-component-wrapper']} tabIndex={-1} ref={stepHeaderRef}>\n {title}\n {isOptional && <i>{` - ${i18nStrings.optional}`}</i>}\n </span>\n </InternalHeader>\n </WizardFormHeader>\n <AnalyticsFunnelStep\n stepNameSelector={`.${styles['form-header-component-wrapper']}`}\n stepNumber={activeStepIndex + 1}\n >\n {({ funnelStepProps }) => (\n <InternalForm\n className={clsx(styles['form-component'])}\n actions={\n <WizardActions\n cancelButtonText={i18nStrings.cancelButton}\n primaryButtonText={isLastStep ? i18nStrings.submitButton : i18nStrings.nextButton}\n primaryButtonLoadingText={\n isLastStep ? i18nStrings.submitButtonLoadingAnnouncement : i18nStrings.nextButtonLoadingAnnouncement\n }\n previousButtonText={i18nStrings.previousButton}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onPrimaryClick={onPrimaryClick}\n onSkipToClick={() => onSkipToClick(skipToTargetIndex)}\n showPrevious={activeStepIndex !== 0}\n isPrimaryLoading={isPrimaryLoading}\n showSkipTo={showSkipTo}\n skipToButtonText={skipToButtonText}\n />\n }\n secondaryActions={secondaryActions}\n errorText={errorText}\n errorIconAriaLabel={i18nStrings.errorIconAriaLabel}\n {...funnelStepProps}\n >\n {content}\n </InternalForm>\n )}\n </AnalyticsFunnelStep>\n </>\n );\n}\n\nfunction findSkipToTargetIndex(steps: ReadonlyArray<WizardProps.Step>, activeStepIndex: number): number {\n let nextRequiredStepIndex = activeStepIndex;\n do {\n nextRequiredStepIndex++;\n } while (nextRequiredStepIndex < steps.length - 1 && steps[nextRequiredStepIndex].isOptional);\n\n return nextRequiredStepIndex > activeStepIndex + 1 ? nextRequiredStepIndex : -1;\n}\n"]}