@cloudscape-design/components 3.0.499 → 3.0.500
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.
- package/app-layout/visual-refresh/mobile-toolbar.d.ts.map +1 -1
- package/app-layout/visual-refresh/mobile-toolbar.js +2 -1
- package/app-layout/visual-refresh/mobile-toolbar.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +81 -80
- package/app-layout/visual-refresh/styles.scoped.css +177 -171
- package/app-layout/visual-refresh/styles.selectors.js +81 -80
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +2 -1
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/cards/index.d.ts.map +1 -1
- package/cards/index.js +3 -2
- package/cards/index.js.map +1 -1
- package/cards/styles.css.js +40 -39
- package/cards/styles.scoped.css +52 -49
- package/cards/styles.selectors.js +40 -39
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +3 -2
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +30 -29
- package/container/styles.scoped.css +65 -52
- package/container/styles.selectors.js +30 -29
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/content-header-utils.d.ts +1 -0
- package/internal/utils/content-header-utils.d.ts.map +1 -1
- package/internal/utils/content-header-utils.js +2 -3
- package/internal/utils/content-header-utils.js.map +1 -1
- package/package.json +1 -1
- package/wizard/internal.d.ts.map +1 -1
- package/wizard/internal.js +3 -2
- package/wizard/internal.js.map +1 -1
- package/wizard/styles.css.js +32 -31
- package/wizard/styles.scoped.css +76 -65
- package/wizard/styles.selectors.js +32 -31
- package/wizard/wizard-form-header.d.ts.map +1 -1
- package/wizard/wizard-form-header.js +2 -1
- package/wizard/wizard-form-header.js.map +1 -1
- package/wizard/wizard-navigation.d.ts.map +1 -1
- package/wizard/wizard-navigation.js +3 -2
- package/wizard/wizard-navigation.js.map +1 -1
|
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
97
|
+
.awsui_root_14iqq_993w1_97:not(#\9) {
|
|
98
98
|
border-collapse: separate;
|
|
99
99
|
border-spacing: 0;
|
|
100
100
|
box-sizing: border-box;
|
|
@@ -131,23 +131,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
131
131
|
word-wrap: break-word;
|
|
132
132
|
position: relative;
|
|
133
133
|
}
|
|
134
|
-
.
|
|
134
|
+
.awsui_root_14iqq_993w1_97.awsui_fit-height_14iqq_993w1_133:not(#\9) {
|
|
135
135
|
display: flex;
|
|
136
136
|
flex-direction: column;
|
|
137
137
|
height: 100%;
|
|
138
138
|
}
|
|
139
|
-
.
|
|
139
|
+
.awsui_root_14iqq_993w1_97.awsui_fit-height_14iqq_993w1_133.awsui_with-side-media_14iqq_993w1_138:not(#\9) {
|
|
140
140
|
flex-direction: row;
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-default_14iqq_993w1_141:not(#\9), .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9) {
|
|
143
143
|
background-color: var(--color-background-container-content-4un1ap, #ffffff);
|
|
144
144
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
145
145
|
box-sizing: border-box;
|
|
146
146
|
}
|
|
147
|
-
.
|
|
147
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-default_14iqq_993w1_141.awsui_refresh_14iqq_993w1_146:not(#\9), .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141.awsui_refresh_14iqq_993w1_146:not(#\9) {
|
|
148
148
|
border: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
149
149
|
}
|
|
150
|
-
.
|
|
150
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-default_14iqq_993w1_141:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::before, .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::before {
|
|
151
151
|
content: "";
|
|
152
152
|
position: absolute;
|
|
153
153
|
left: 0px;
|
|
@@ -162,7 +162,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
162
162
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
163
163
|
z-index: 1;
|
|
164
164
|
}
|
|
165
|
-
.
|
|
165
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-default_14iqq_993w1_141:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::after, .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::after {
|
|
166
166
|
content: "";
|
|
167
167
|
position: absolute;
|
|
168
168
|
left: 0px;
|
|
@@ -175,127 +175,127 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
176
176
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
177
177
|
}
|
|
178
|
-
.
|
|
178
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(:last-child), .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(:last-child)::before, .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(:last-child)::after {
|
|
179
179
|
border-bottom-right-radius: 0;
|
|
180
180
|
border-bottom-left-radius: 0;
|
|
181
181
|
border-bottom-width: 0;
|
|
182
182
|
}
|
|
183
|
-
.
|
|
183
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141 + .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9), .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141 + .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9)::before, .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141 + .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9)::after {
|
|
184
184
|
border-top-left-radius: 0;
|
|
185
185
|
border-top-right-radius: 0;
|
|
186
186
|
}
|
|
187
|
-
.
|
|
187
|
+
.awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141 + .awsui_root_14iqq_993w1_97.awsui_variant-stacked_14iqq_993w1_141:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::before {
|
|
188
188
|
border-top: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_root_14iqq_993w1_97.awsui_sticky-enabled_14iqq_993w1_189:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::before {
|
|
191
191
|
top: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
|
|
192
192
|
}
|
|
193
|
-
.
|
|
193
|
+
.awsui_root_14iqq_993w1_97.awsui_sticky-enabled_14iqq_993w1_189:not(#\9):not(.awsui_refresh_14iqq_993w1_146).awsui_variant-stacked_14iqq_993w1_141::before {
|
|
194
194
|
top: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
.awsui_with-side-
|
|
197
|
+
.awsui_with-side-media_14iqq_993w1_138:not(#\9) {
|
|
198
198
|
display: flex;
|
|
199
199
|
flex-direction: row;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
.awsui_with-top-
|
|
202
|
+
.awsui_with-top-media_14iqq_993w1_201:not(#\9) {
|
|
203
203
|
display: flex;
|
|
204
204
|
flex-direction: column;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.awsui_content-
|
|
207
|
+
.awsui_content-wrapper_14iqq_993w1_206:not(#\9) {
|
|
208
208
|
display: flex;
|
|
209
209
|
flex-direction: column;
|
|
210
210
|
width: 100%;
|
|
211
211
|
}
|
|
212
|
-
.awsui_content-wrapper-fit-
|
|
212
|
+
.awsui_content-wrapper-fit-height_14iqq_993w1_211:not(#\9) {
|
|
213
213
|
height: 100%;
|
|
214
214
|
overflow: hidden;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
.
|
|
217
|
+
.awsui_media_14iqq_993w1_216:not(#\9) {
|
|
218
218
|
overflow: hidden;
|
|
219
219
|
flex-shrink: 0;
|
|
220
220
|
}
|
|
221
|
-
.
|
|
222
|
-
.
|
|
223
|
-
.
|
|
221
|
+
.awsui_media_14iqq_993w1_216 img:not(#\9),
|
|
222
|
+
.awsui_media_14iqq_993w1_216 video:not(#\9),
|
|
223
|
+
.awsui_media_14iqq_993w1_216 picture:not(#\9) {
|
|
224
224
|
width: 100%;
|
|
225
225
|
height: 100%;
|
|
226
226
|
object-fit: cover;
|
|
227
227
|
object-position: center;
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
.awsui_media_14iqq_993w1_216 iframe:not(#\9) {
|
|
230
230
|
width: 100%;
|
|
231
231
|
height: 100%;
|
|
232
232
|
border: 0;
|
|
233
233
|
}
|
|
234
|
-
.awsui_media-
|
|
234
|
+
.awsui_media-top_14iqq_993w1_233:not(#\9) {
|
|
235
235
|
max-height: 66%;
|
|
236
236
|
border-top-left-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
237
237
|
border-top-right-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
238
238
|
}
|
|
239
|
-
.awsui_media-
|
|
239
|
+
.awsui_media-side_14iqq_993w1_238:not(#\9) {
|
|
240
240
|
max-width: 66%;
|
|
241
241
|
border-top-left-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
242
242
|
border-bottom-left-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
.
|
|
245
|
+
.awsui_header_14iqq_993w1_244:not(#\9) {
|
|
246
246
|
background-color: var(--color-background-container-header-8b9fgi, #ffffff);
|
|
247
247
|
border-top-left-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
248
248
|
border-top-right-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
249
249
|
}
|
|
250
|
-
.
|
|
250
|
+
.awsui_header_14iqq_993w1_244.awsui_header-with-media_14iqq_993w1_249:not(#\9) {
|
|
251
251
|
background: none;
|
|
252
252
|
}
|
|
253
|
-
.
|
|
253
|
+
.awsui_header_14iqq_993w1_244.awsui_header-with-media_14iqq_993w1_249:not(#\9):not(:empty) {
|
|
254
254
|
border-bottom: none;
|
|
255
255
|
}
|
|
256
|
-
.awsui_header-sticky-
|
|
256
|
+
.awsui_header-sticky-disabled_14iqq_993w1_255:not(#\9) {
|
|
257
257
|
position: relative;
|
|
258
258
|
z-index: 1;
|
|
259
259
|
}
|
|
260
|
-
.awsui_header-sticky-
|
|
260
|
+
.awsui_header-sticky-enabled_14iqq_993w1_259:not(#\9) {
|
|
261
261
|
top: 0;
|
|
262
262
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
263
263
|
position: sticky;
|
|
264
264
|
z-index: 800;
|
|
265
265
|
}
|
|
266
|
-
.awsui_header-
|
|
266
|
+
.awsui_header-stuck_14iqq_993w1_265:not(#\9) {
|
|
267
267
|
border-radius: 0;
|
|
268
268
|
}
|
|
269
|
-
.awsui_header-
|
|
269
|
+
.awsui_header-stuck_14iqq_993w1_265:not(#\9)::before {
|
|
270
270
|
border: 0;
|
|
271
271
|
}
|
|
272
|
-
.awsui_header-
|
|
272
|
+
.awsui_header-stuck_14iqq_993w1_265:not(#\9):not(.awsui_header-variant-cards_14iqq_993w1_271) {
|
|
273
273
|
box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
274
274
|
}
|
|
275
|
-
.awsui_header-dynamic-
|
|
275
|
+
.awsui_header-dynamic-height_14iqq_993w1_274.awsui_header-stuck_14iqq_993w1_265:not(#\9) {
|
|
276
276
|
margin-bottom: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
|
|
277
277
|
}
|
|
278
|
-
.
|
|
278
|
+
.awsui_header_14iqq_993w1_244:not(#\9):not(:empty) {
|
|
279
279
|
border-bottom: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
|
|
280
280
|
}
|
|
281
|
-
.
|
|
281
|
+
.awsui_header_14iqq_993w1_244.awsui_with-paddings_14iqq_993w1_280:not(#\9) {
|
|
282
282
|
padding: var(--space-container-header-top-5qav00, 12px) var(--space-container-horizontal-wfukh3, 20px) var(--space-container-header-bottom-vj01hn, 8px);
|
|
283
283
|
}
|
|
284
|
-
.
|
|
284
|
+
.awsui_header_14iqq_993w1_244.awsui_with-paddings_14iqq_993w1_280.awsui_header-variant-cards_14iqq_993w1_271:not(#\9) {
|
|
285
285
|
padding: var(--space-container-header-top-5qav00, 12px) var(--space-container-horizontal-wfukh3, 20px);
|
|
286
286
|
}
|
|
287
|
-
.
|
|
287
|
+
.awsui_header_14iqq_993w1_244.awsui_with-hidden-content_14iqq_993w1_286:not(#\9) {
|
|
288
288
|
border-bottom-left-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
289
289
|
border-bottom-right-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
290
290
|
}
|
|
291
|
-
.awsui_header-variant-
|
|
291
|
+
.awsui_header-variant-cards_14iqq_993w1_271:not(#\9) {
|
|
292
292
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
293
293
|
box-sizing: border-box;
|
|
294
294
|
}
|
|
295
|
-
.awsui_header-variant-
|
|
295
|
+
.awsui_header-variant-cards_14iqq_993w1_271.awsui_refresh_14iqq_993w1_146:not(#\9) {
|
|
296
296
|
border: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
297
297
|
}
|
|
298
|
-
.awsui_header-variant-
|
|
298
|
+
.awsui_header-variant-cards_14iqq_993w1_271:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::before {
|
|
299
299
|
content: "";
|
|
300
300
|
position: absolute;
|
|
301
301
|
left: 0px;
|
|
@@ -310,7 +310,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
310
310
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
311
311
|
z-index: 1;
|
|
312
312
|
}
|
|
313
|
-
.awsui_header-variant-
|
|
313
|
+
.awsui_header-variant-cards_14iqq_993w1_271:not(#\9):not(.awsui_refresh_14iqq_993w1_146)::after {
|
|
314
314
|
content: "";
|
|
315
315
|
position: absolute;
|
|
316
316
|
left: 0px;
|
|
@@ -323,18 +323,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
323
323
|
border-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
324
324
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
325
325
|
}
|
|
326
|
-
.awsui_header-variant-
|
|
326
|
+
.awsui_header-variant-cards_14iqq_993w1_271:not(#\9):not(.awsui_header-sticky-enabled_14iqq_993w1_259) {
|
|
327
327
|
position: relative;
|
|
328
328
|
}
|
|
329
|
-
.awsui_header-variant-
|
|
329
|
+
.awsui_header-variant-cards_14iqq_993w1_271.awsui_header-stuck_14iqq_993w1_265:not(#\9)::after, .awsui_header-variant-cards_14iqq_993w1_271.awsui_header-stuck_14iqq_993w1_265:not(#\9)::before {
|
|
330
330
|
border: 0;
|
|
331
331
|
border-top-left-radius: 0;
|
|
332
332
|
border-top-right-radius: 0;
|
|
333
333
|
}
|
|
334
|
-
.awsui_header-variant-full-
|
|
334
|
+
.awsui_header-variant-full-page_14iqq_993w1_333.awsui_header-stuck_14iqq_993w1_265:not(#\9) {
|
|
335
335
|
box-shadow: none;
|
|
336
336
|
}
|
|
337
|
-
.awsui_header-variant-full-
|
|
337
|
+
.awsui_header-variant-full-page_14iqq_993w1_333.awsui_header-stuck_14iqq_993w1_265:not(#\9)::before {
|
|
338
|
+
content: "";
|
|
339
|
+
position: absolute;
|
|
340
|
+
right: 0;
|
|
341
|
+
left: 0;
|
|
342
|
+
bottom: 0;
|
|
343
|
+
top: 0;
|
|
344
|
+
border-bottom: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
345
|
+
}
|
|
346
|
+
.awsui_header-variant-full-page_14iqq_993w1_333.awsui_header-stuck_14iqq_993w1_265:not(#\9)::after {
|
|
338
347
|
content: "";
|
|
339
348
|
position: absolute;
|
|
340
349
|
right: 0;
|
|
@@ -344,35 +353,39 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
344
353
|
box-shadow: var(--shadow-sticky-blixp9, 0px 4px 8px 1px rgba(0, 7, 22, 0.1));
|
|
345
354
|
clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
|
|
346
355
|
}
|
|
356
|
+
.awsui_header-variant-full-page_14iqq_993w1_333.awsui_header-stuck_14iqq_993w1_265:not(#\9):not(.awsui_remove-high-contrast-header_14iqq_993w1_355)::before {
|
|
357
|
+
content: "";
|
|
358
|
+
border-bottom: none;
|
|
359
|
+
}
|
|
347
360
|
|
|
348
361
|
/*
|
|
349
362
|
The dynamic height dark header needs a background that will cover
|
|
350
363
|
the default white background of the container component.
|
|
351
364
|
*/
|
|
352
|
-
.awsui_dark-
|
|
365
|
+
.awsui_dark-header_14iqq_993w1_364:not(#\9) {
|
|
353
366
|
background-color: var(--color-background-layout-main-nx09lr, #ffffff);
|
|
354
367
|
color: var(--color-text-body-default-at06ol, #000716);
|
|
355
368
|
}
|
|
356
369
|
|
|
357
|
-
.
|
|
370
|
+
.awsui_content_14iqq_993w1_206:not(#\9) {
|
|
358
371
|
flex: 1;
|
|
359
372
|
}
|
|
360
|
-
.awsui_content-fit-
|
|
373
|
+
.awsui_content-fit-height_14iqq_993w1_372:not(#\9) {
|
|
361
374
|
overflow: auto;
|
|
362
375
|
}
|
|
363
|
-
.
|
|
376
|
+
.awsui_content_14iqq_993w1_206.awsui_with-paddings_14iqq_993w1_280:not(#\9) {
|
|
364
377
|
padding: var(--space-scaled-l-0hpmd7, 20px) var(--space-container-horizontal-wfukh3, 20px);
|
|
365
378
|
}
|
|
366
|
-
.
|
|
379
|
+
.awsui_header_14iqq_993w1_244 + .awsui_content_14iqq_993w1_206.awsui_with-paddings_14iqq_993w1_280:not(#\9) {
|
|
367
380
|
padding-top: var(--space-container-content-top-1ae0r3, 4px);
|
|
368
381
|
}
|
|
369
|
-
.
|
|
382
|
+
.awsui_header_14iqq_993w1_244 + .awsui_content_14iqq_993w1_206.awsui_with-paddings_14iqq_993w1_280.awsui_content-with-media_14iqq_993w1_381:not(#\9) {
|
|
370
383
|
padding-top: 0;
|
|
371
384
|
}
|
|
372
385
|
|
|
373
|
-
.
|
|
386
|
+
.awsui_footer_14iqq_993w1_385.awsui_with-paddings_14iqq_993w1_280:not(#\9) {
|
|
374
387
|
padding: var(--space-scaled-s-aqzyko, 12px) var(--space-container-horizontal-wfukh3, 20px);
|
|
375
388
|
}
|
|
376
|
-
.
|
|
389
|
+
.awsui_footer_14iqq_993w1_385.awsui_with-divider_14iqq_993w1_388:not(#\9) {
|
|
377
390
|
border-top: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
378
391
|
}
|
|
@@ -2,34 +2,35 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"fit-height": "awsui_fit-
|
|
7
|
-
"with-side-media": "awsui_with-side-
|
|
8
|
-
"variant-default": "awsui_variant-
|
|
9
|
-
"variant-stacked": "awsui_variant-
|
|
10
|
-
"refresh": "
|
|
11
|
-
"sticky-enabled": "awsui_sticky-
|
|
12
|
-
"with-top-media": "awsui_with-top-
|
|
13
|
-
"content-wrapper": "awsui_content-
|
|
14
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
15
|
-
"media": "
|
|
16
|
-
"media-top": "awsui_media-
|
|
17
|
-
"media-side": "awsui_media-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-with-media": "awsui_header-with-
|
|
20
|
-
"header-sticky-disabled": "awsui_header-sticky-
|
|
21
|
-
"header-sticky-enabled": "awsui_header-sticky-
|
|
22
|
-
"header-stuck": "awsui_header-
|
|
23
|
-
"header-variant-cards": "awsui_header-variant-
|
|
24
|
-
"header-dynamic-height": "awsui_header-dynamic-
|
|
25
|
-
"with-paddings": "awsui_with-
|
|
26
|
-
"with-hidden-content": "awsui_with-hidden-
|
|
27
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"content
|
|
31
|
-
"content-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_993w1_97",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_993w1_133",
|
|
7
|
+
"with-side-media": "awsui_with-side-media_14iqq_993w1_138",
|
|
8
|
+
"variant-default": "awsui_variant-default_14iqq_993w1_141",
|
|
9
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_993w1_141",
|
|
10
|
+
"refresh": "awsui_refresh_14iqq_993w1_146",
|
|
11
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_993w1_189",
|
|
12
|
+
"with-top-media": "awsui_with-top-media_14iqq_993w1_201",
|
|
13
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_993w1_206",
|
|
14
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_993w1_211",
|
|
15
|
+
"media": "awsui_media_14iqq_993w1_216",
|
|
16
|
+
"media-top": "awsui_media-top_14iqq_993w1_233",
|
|
17
|
+
"media-side": "awsui_media-side_14iqq_993w1_238",
|
|
18
|
+
"header": "awsui_header_14iqq_993w1_244",
|
|
19
|
+
"header-with-media": "awsui_header-with-media_14iqq_993w1_249",
|
|
20
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_993w1_255",
|
|
21
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_993w1_259",
|
|
22
|
+
"header-stuck": "awsui_header-stuck_14iqq_993w1_265",
|
|
23
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_993w1_271",
|
|
24
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_993w1_274",
|
|
25
|
+
"with-paddings": "awsui_with-paddings_14iqq_993w1_280",
|
|
26
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_993w1_286",
|
|
27
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_993w1_333",
|
|
28
|
+
"remove-high-contrast-header": "awsui_remove-high-contrast-header_14iqq_993w1_355",
|
|
29
|
+
"dark-header": "awsui_dark-header_14iqq_993w1_364",
|
|
30
|
+
"content": "awsui_content_14iqq_993w1_206",
|
|
31
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_993w1_372",
|
|
32
|
+
"content-with-media": "awsui_content-with-media_14iqq_993w1_381",
|
|
33
|
+
"footer": "awsui_footer_14iqq_993w1_385",
|
|
34
|
+
"with-divider": "awsui_with-divider_14iqq_993w1_388"
|
|
34
35
|
};
|
|
35
36
|
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-header-utils.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/content-header-utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"content-header-utils.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/content-header-utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,8BAA8B,SAA8C,CAAC;AAC1F,eAAO,MAAM,sBAAsB,QAAuE,CAAC"}
|
|
@@ -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 { getGlobalFlag } from './global-flags';
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
: 'awsui-context-content-header';
|
|
4
|
+
export const shouldRemoveHighContrastHeader = !!getGlobalFlag('removeHighContrastHeader');
|
|
5
|
+
export const contentHeaderClassName = shouldRemoveHighContrastHeader ? '' : 'awsui-context-content-header';
|
|
7
6
|
//# sourceMappingURL=content-header-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-header-utils.js","sourceRoot":"lib/default/","sources":["internal/utils/content-header-utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"content-header-utils.js","sourceRoot":"lib/default/","sources":["internal/utils/content-header-utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;AAC1F,MAAM,CAAC,MAAM,sBAAsB,GAAG,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getGlobalFlag } from './global-flags';\n\nexport const shouldRemoveHighContrastHeader = !!getGlobalFlag('removeHighContrastHeader');\nexport const contentHeaderClassName = shouldRemoveHighContrastHeader ? '' : 'awsui-context-content-header';\n"]}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@cloudscape-design/components","main":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./theming":"./theming/index.js","./test-utils/dom":"./test-utils/dom/index.js","./test-utils/selectors":"./test-utils/selectors/index.js","./interfaces":"./interfaces.js","./contexts/form-field":"./contexts/form-field.js","./alert":"./alert/index.js","./anchor-navigation":"./anchor-navigation/index.js","./annotation-context":"./annotation-context/index.js","./app-layout":"./app-layout/index.js","./area-chart":"./area-chart/index.js","./attribute-editor":"./attribute-editor/index.js","./autosuggest":"./autosuggest/index.js","./badge":"./badge/index.js","./bar-chart":"./bar-chart/index.js","./box":"./box/index.js","./breadcrumb-group":"./breadcrumb-group/index.js","./button":"./button/index.js","./button-dropdown":"./button-dropdown/index.js","./calendar":"./calendar/index.js","./cards":"./cards/index.js","./checkbox":"./checkbox/index.js","./code-editor":"./code-editor/index.js","./collection-preferences":"./collection-preferences/index.js","./column-layout":"./column-layout/index.js","./container":"./container/index.js","./content-layout":"./content-layout/index.js","./date-input":"./date-input/index.js","./date-picker":"./date-picker/index.js","./date-range-picker":"./date-range-picker/index.js","./drawer":"./drawer/index.js","./expandable-section":"./expandable-section/index.js","./file-upload":"./file-upload/index.js","./flashbar":"./flashbar/index.js","./form":"./form/index.js","./form-field":"./form-field/index.js","./grid":"./grid/index.js","./header":"./header/index.js","./help-panel":"./help-panel/index.js","./hotspot":"./hotspot/index.js","./icon":"./icon/index.js","./input":"./input/index.js","./line-chart":"./line-chart/index.js","./link":"./link/index.js","./mixed-line-bar-chart":"./mixed-line-bar-chart/index.js","./modal":"./modal/index.js","./multiselect":"./multiselect/index.js","./pagination":"./pagination/index.js","./pie-chart":"./pie-chart/index.js","./popover":"./popover/index.js","./progress-bar":"./progress-bar/index.js","./property-filter":"./property-filter/index.js","./radio-group":"./radio-group/index.js","./s3-resource-selector":"./s3-resource-selector/index.js","./segmented-control":"./segmented-control/index.js","./select":"./select/index.js","./side-navigation":"./side-navigation/index.js","./space-between":"./space-between/index.js","./spinner":"./spinner/index.js","./split-panel":"./split-panel/index.js","./status-indicator":"./status-indicator/index.js","./table":"./table/index.js","./tabs":"./tabs/index.js","./tag-editor":"./tag-editor/index.js","./text-content":"./text-content/index.js","./text-filter":"./text-filter/index.js","./textarea":"./textarea/index.js","./tiles":"./tiles/index.js","./time-input":"./time-input/index.js","./toggle":"./toggle/index.js","./token-group":"./token-group/index.js","./top-navigation":"./top-navigation/index.js","./tutorial-panel":"./tutorial-panel/index.js","./wizard":"./wizard/index.js","./top-navigation/1.0-beta":"./top-navigation/1.0-beta/index.js","./i18n":"./i18n/index.js","./i18n/messages/all.all":"./i18n/messages/all.all.js","./i18n/messages/all.all.json":"./i18n/messages/all.all.json","./i18n/messages/all.de":"./i18n/messages/all.de.js","./i18n/messages/all.de.json":"./i18n/messages/all.de.json","./i18n/messages/all.en-GB":"./i18n/messages/all.en-GB.js","./i18n/messages/all.en-GB.json":"./i18n/messages/all.en-GB.json","./i18n/messages/all.en":"./i18n/messages/all.en.js","./i18n/messages/all.en.json":"./i18n/messages/all.en.json","./i18n/messages/all.es":"./i18n/messages/all.es.js","./i18n/messages/all.es.json":"./i18n/messages/all.es.json","./i18n/messages/all.fr":"./i18n/messages/all.fr.js","./i18n/messages/all.fr.json":"./i18n/messages/all.fr.json","./i18n/messages/all.id":"./i18n/messages/all.id.js","./i18n/messages/all.id.json":"./i18n/messages/all.id.json","./i18n/messages/all.it":"./i18n/messages/all.it.js","./i18n/messages/all.it.json":"./i18n/messages/all.it.json","./i18n/messages/all.ja":"./i18n/messages/all.ja.js","./i18n/messages/all.ja.json":"./i18n/messages/all.ja.json","./i18n/messages/all.ko":"./i18n/messages/all.ko.js","./i18n/messages/all.ko.json":"./i18n/messages/all.ko.json","./i18n/messages/all.pt-BR":"./i18n/messages/all.pt-BR.js","./i18n/messages/all.pt-BR.json":"./i18n/messages/all.pt-BR.json","./i18n/messages/all.th":"./i18n/messages/all.th.js","./i18n/messages/all.th.json":"./i18n/messages/all.th.json","./i18n/messages/all.tr":"./i18n/messages/all.tr.js","./i18n/messages/all.tr.json":"./i18n/messages/all.tr.json","./i18n/messages/all.zh-CN":"./i18n/messages/all.zh-CN.js","./i18n/messages/all.zh-CN.json":"./i18n/messages/all.zh-CN.json","./i18n/messages/all.zh-TW":"./i18n/messages/all.zh-TW.js","./i18n/messages/all.zh-TW.json":"./i18n/messages/all.zh-TW.json"},"sideEffects":["*.css","./internal/base-component/index.js","./internal/base-component/styles.css.js"],"version":"3.0.
|
|
1
|
+
{"name":"@cloudscape-design/components","main":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./theming":"./theming/index.js","./test-utils/dom":"./test-utils/dom/index.js","./test-utils/selectors":"./test-utils/selectors/index.js","./interfaces":"./interfaces.js","./contexts/form-field":"./contexts/form-field.js","./alert":"./alert/index.js","./anchor-navigation":"./anchor-navigation/index.js","./annotation-context":"./annotation-context/index.js","./app-layout":"./app-layout/index.js","./area-chart":"./area-chart/index.js","./attribute-editor":"./attribute-editor/index.js","./autosuggest":"./autosuggest/index.js","./badge":"./badge/index.js","./bar-chart":"./bar-chart/index.js","./box":"./box/index.js","./breadcrumb-group":"./breadcrumb-group/index.js","./button":"./button/index.js","./button-dropdown":"./button-dropdown/index.js","./calendar":"./calendar/index.js","./cards":"./cards/index.js","./checkbox":"./checkbox/index.js","./code-editor":"./code-editor/index.js","./collection-preferences":"./collection-preferences/index.js","./column-layout":"./column-layout/index.js","./container":"./container/index.js","./content-layout":"./content-layout/index.js","./date-input":"./date-input/index.js","./date-picker":"./date-picker/index.js","./date-range-picker":"./date-range-picker/index.js","./drawer":"./drawer/index.js","./expandable-section":"./expandable-section/index.js","./file-upload":"./file-upload/index.js","./flashbar":"./flashbar/index.js","./form":"./form/index.js","./form-field":"./form-field/index.js","./grid":"./grid/index.js","./header":"./header/index.js","./help-panel":"./help-panel/index.js","./hotspot":"./hotspot/index.js","./icon":"./icon/index.js","./input":"./input/index.js","./line-chart":"./line-chart/index.js","./link":"./link/index.js","./mixed-line-bar-chart":"./mixed-line-bar-chart/index.js","./modal":"./modal/index.js","./multiselect":"./multiselect/index.js","./pagination":"./pagination/index.js","./pie-chart":"./pie-chart/index.js","./popover":"./popover/index.js","./progress-bar":"./progress-bar/index.js","./property-filter":"./property-filter/index.js","./radio-group":"./radio-group/index.js","./s3-resource-selector":"./s3-resource-selector/index.js","./segmented-control":"./segmented-control/index.js","./select":"./select/index.js","./side-navigation":"./side-navigation/index.js","./space-between":"./space-between/index.js","./spinner":"./spinner/index.js","./split-panel":"./split-panel/index.js","./status-indicator":"./status-indicator/index.js","./table":"./table/index.js","./tabs":"./tabs/index.js","./tag-editor":"./tag-editor/index.js","./text-content":"./text-content/index.js","./text-filter":"./text-filter/index.js","./textarea":"./textarea/index.js","./tiles":"./tiles/index.js","./time-input":"./time-input/index.js","./toggle":"./toggle/index.js","./token-group":"./token-group/index.js","./top-navigation":"./top-navigation/index.js","./tutorial-panel":"./tutorial-panel/index.js","./wizard":"./wizard/index.js","./top-navigation/1.0-beta":"./top-navigation/1.0-beta/index.js","./i18n":"./i18n/index.js","./i18n/messages/all.all":"./i18n/messages/all.all.js","./i18n/messages/all.all.json":"./i18n/messages/all.all.json","./i18n/messages/all.de":"./i18n/messages/all.de.js","./i18n/messages/all.de.json":"./i18n/messages/all.de.json","./i18n/messages/all.en-GB":"./i18n/messages/all.en-GB.js","./i18n/messages/all.en-GB.json":"./i18n/messages/all.en-GB.json","./i18n/messages/all.en":"./i18n/messages/all.en.js","./i18n/messages/all.en.json":"./i18n/messages/all.en.json","./i18n/messages/all.es":"./i18n/messages/all.es.js","./i18n/messages/all.es.json":"./i18n/messages/all.es.json","./i18n/messages/all.fr":"./i18n/messages/all.fr.js","./i18n/messages/all.fr.json":"./i18n/messages/all.fr.json","./i18n/messages/all.id":"./i18n/messages/all.id.js","./i18n/messages/all.id.json":"./i18n/messages/all.id.json","./i18n/messages/all.it":"./i18n/messages/all.it.js","./i18n/messages/all.it.json":"./i18n/messages/all.it.json","./i18n/messages/all.ja":"./i18n/messages/all.ja.js","./i18n/messages/all.ja.json":"./i18n/messages/all.ja.json","./i18n/messages/all.ko":"./i18n/messages/all.ko.js","./i18n/messages/all.ko.json":"./i18n/messages/all.ko.json","./i18n/messages/all.pt-BR":"./i18n/messages/all.pt-BR.js","./i18n/messages/all.pt-BR.json":"./i18n/messages/all.pt-BR.json","./i18n/messages/all.th":"./i18n/messages/all.th.js","./i18n/messages/all.th.json":"./i18n/messages/all.th.json","./i18n/messages/all.tr":"./i18n/messages/all.tr.js","./i18n/messages/all.tr.json":"./i18n/messages/all.tr.json","./i18n/messages/all.zh-CN":"./i18n/messages/all.zh-CN.js","./i18n/messages/all.zh-CN.json":"./i18n/messages/all.zh-CN.json","./i18n/messages/all.zh-TW":"./i18n/messages/all.zh-TW.js","./i18n/messages/all.zh-TW.json":"./i18n/messages/all.zh-TW.json"},"sideEffects":["*.css","./internal/base-component/index.js","./internal/base-component/styles.css.js"],"version":"3.0.500","repository":{"type":"git","url":"https://github.com/cloudscape-design/components.git"},"homepage":"https://cloudscape.design","dependencies":{"@cloudscape-design/collection-hooks":"^1.0.0","@cloudscape-design/component-toolkit":"^1.0.0-beta","@cloudscape-design/test-utils-core":"^1.0.0","@cloudscape-design/theming-runtime":"^1.0.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@juggle/resize-observer":"^3.3.1","ace-builds":"^1.23.0","balanced-match":"^1.0.2","clsx":"^1.1.0","d3-shape":"^1.3.7","date-fns":"^2.25.0","intl-messageformat":"^10.3.1","mnth":"^2.0.0","react-keyed-flatten-children":"^1.3.0","react-transition-group":"^4.4.2","react-virtual":"^2.8.2","tslib":"^2.4.0","weekstart":"^1.1.0"},"peerDependencies":{"react":"^16.8 || ^17 || ^18","react-dom":"^16.8 || ^17 || ^18"},"license":"Apache-2.0"}
|
package/wizard/internal.d.ts.map
CHANGED
|
@@ -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;AAYlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAYlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,KAAK,mBAAmB,GAAG,WAAW,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,gBAAgB,EAChB,iBAAyB,EACzB,WAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAyJrB"}
|
package/wizard/internal.js
CHANGED
|
@@ -19,6 +19,7 @@ import WizardForm, { STEP_NAME_SELECTOR } from './wizard-form';
|
|
|
19
19
|
import WizardNavigation from './wizard-navigation';
|
|
20
20
|
import styles from './styles.css.js';
|
|
21
21
|
import { useFunnelChangeEvent } from './analytics';
|
|
22
|
+
import { shouldRemoveHighContrastHeader } from '../internal/utils/content-header-utils';
|
|
22
23
|
export default function InternalWizard(_a) {
|
|
23
24
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
24
25
|
var { steps, activeStepIndex: controlledActiveStepIndex, submitButtonText, isLoadingNextStep = false, allowSkipTo = false, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef } = _a, rest = __rest(_a, ["steps", "activeStepIndex", "submitButtonText", "isLoadingNextStep", "allowSkipTo", "secondaryActions", "onCancel", "onSubmit", "onNavigate", "__internalRootRef"]);
|
|
@@ -81,9 +82,9 @@ export default function InternalWizard(_a) {
|
|
|
81
82
|
warnOnce('Wizard', `You have set \`allowSkipTo\` but you have not provided \`i18nStrings.skipToButtonLabel\`. The skip-to button will not be rendered.`);
|
|
82
83
|
}
|
|
83
84
|
return (React.createElement("div", Object.assign({}, baseProps, funnelProps, { ref: ref, className: clsx(styles.root, baseProps.className) }),
|
|
84
|
-
React.createElement("div", { className: clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container']) },
|
|
85
|
+
React.createElement("div", { className: clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'], shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']) },
|
|
85
86
|
React.createElement(WizardNavigation, { activeStepIndex: actualActiveStepIndex, farthestStepIndex: farthestStepIndex.current, allowSkipTo: allowSkipTo, hidden: smallContainer, i18nStrings: i18nStrings, isVisualRefresh: isVisualRefresh, isLoadingNextStep: isLoadingNextStep, onStepClick: onStepClick, onSkipToClick: onSkipToClick, steps: steps }),
|
|
86
|
-
React.createElement("div", { className: clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container']) },
|
|
87
|
+
React.createElement("div", { className: clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'], shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']) },
|
|
87
88
|
isVisualRefresh && React.createElement("div", { className: clsx(styles.background, contentHeaderClassName) }),
|
|
88
89
|
React.createElement(WizardForm, { steps: steps, isVisualRefresh: isVisualRefresh, showCollapsedSteps: smallContainer, i18nStrings: i18nStrings, submitButtonText: submitButtonText, activeStepIndex: actualActiveStepIndex, isPrimaryLoading: isLoadingNextStep, allowSkipTo: allowSkipTo, secondaryActions: secondaryActions, onCancelClick: onCancelClick, onPreviousClick: onPreviousClick, onSkipToClick: onSkipToClick, onPrimaryClick: onPrimaryClick })))));
|
|
89
90
|
}
|
package/wizard/internal.js.map
CHANGED
|
@@ -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,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7F,OAAO,UAAU,EAAE,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAInD,OAAO,MAAM,MAAM,iBAA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,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,cAAc,EAClC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,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 '@cloudscape-design/component-toolkit/internal';\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';\nimport { contentHeaderClassName } from '../internal/utils/content-header-utils';\n\nimport { useInternalI18n } from '../i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm, { STEP_NAME_SELECTOR } from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { useFunnelChangeEvent } from './analytics';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n submitButtonText,\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, funnelNextOrSubmitAttempt } = 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 const stepName = getNameFromSelector(STEP_NAME_SELECTOR);\n\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepName,\n stepNameSelector: STEP_NAME_SELECTOR,\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 funnelNextOrSubmitAttempt();\n\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n useFunnelChangeEvent(funnelInteractionId, steps);\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 navigationAriaLabel: i18n('i18nStrings.navigationAriaLabel', rest.i18nStrings?.navigationAriaLabel),\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, contentHeaderClassName)} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n submitButtonText={submitButtonText}\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,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,aAA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,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,GACZ;YACF,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,IAAI,EACX,eAAe,IAAI,MAAM,CAAC,OAAO,EACjC,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,EAC3C,8BAA8B,IAAI,MAAM,CAAC,6BAA6B,CAAC,CACxE;gBAEA,eAAe,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,sBAAsB,CAAC,GAAI;gBACvF,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,cAAc,EAClC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,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 '@cloudscape-design/component-toolkit/internal';\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';\nimport { contentHeaderClassName } from '../internal/utils/content-header-utils';\n\nimport { useInternalI18n } from '../i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm, { STEP_NAME_SELECTOR } from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { useFunnelChangeEvent } from './analytics';\nimport { shouldRemoveHighContrastHeader } from '../internal/utils/content-header-utils';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n submitButtonText,\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, funnelNextOrSubmitAttempt } = 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 const stepName = getNameFromSelector(STEP_NAME_SELECTOR);\n\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepName,\n stepNameSelector: STEP_NAME_SELECTOR,\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 funnelNextOrSubmitAttempt();\n\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n useFunnelChangeEvent(funnelInteractionId, steps);\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 navigationAriaLabel: i18n('i18nStrings.navigationAriaLabel', rest.i18nStrings?.navigationAriaLabel),\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(\n styles.wizard,\n isVisualRefresh && styles.refresh,\n smallContainer && styles['small-container'],\n shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']\n )}\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(\n styles.form,\n isVisualRefresh && styles.refresh,\n smallContainer && styles['small-container'],\n shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']\n )}\n >\n {isVisualRefresh && <div className={clsx(styles.background, contentHeaderClassName)} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n submitButtonText={submitButtonText}\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"]}
|