@cloudscape-design/components 3.0.1042 → 3.0.1043

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.
@@ -190,10 +190,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
191
191
  SPDX-License-Identifier: Apache-2.0
192
192
  */
193
- .awsui_alert_mx3cw_1v2tf_193:not(#\9) {
194
- animation: awsui_awsui-motion-fade-in_mx3cw_1v2tf_1 var(--motion-duration-show-paced-otsjh8, 180ms) var(--motion-easing-show-paced-ym6eyn, ease-out);
193
+ .awsui_alert_mx3cw_1iibl_193:not(#\9) {
194
+ animation: awsui_awsui-motion-fade-in_mx3cw_1iibl_1 var(--motion-duration-show-paced-otsjh8, 180ms) var(--motion-easing-show-paced-ym6eyn, ease-out);
195
195
  }
196
- @keyframes awsui_awsui-motion-fade-in_mx3cw_1v2tf_1 {
196
+ @keyframes awsui_awsui-motion-fade-in_mx3cw_1iibl_1 {
197
197
  from {
198
198
  opacity: 0.2;
199
199
  }
@@ -202,17 +202,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
202
202
  }
203
203
  }
204
204
  @media (prefers-reduced-motion: reduce) {
205
- .awsui_alert_mx3cw_1v2tf_193:not(#\9) {
205
+ .awsui_alert_mx3cw_1iibl_193:not(#\9) {
206
206
  animation: none;
207
207
  transition: none;
208
208
  }
209
209
  }
210
- .awsui-motion-disabled .awsui_alert_mx3cw_1v2tf_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1v2tf_193:not(#\9) {
210
+ .awsui-motion-disabled .awsui_alert_mx3cw_1iibl_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1iibl_193:not(#\9) {
211
211
  animation: none;
212
212
  transition: none;
213
213
  }
214
214
 
215
- .awsui_root_mx3cw_1v2tf_215:not(#\9) {
215
+ .awsui_root_mx3cw_1iibl_215:not(#\9) {
216
216
  border-collapse: separate;
217
217
  border-spacing: 0;
218
218
  box-sizing: border-box;
@@ -247,11 +247,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
247
247
  overflow: hidden;
248
248
  display: block;
249
249
  }
250
- .awsui_root_mx3cw_1v2tf_215.awsui_hidden_mx3cw_1v2tf_250:not(#\9) {
250
+ .awsui_root_mx3cw_1iibl_215.awsui_hidden_mx3cw_1iibl_250:not(#\9) {
251
251
  display: none;
252
252
  }
253
253
 
254
- .awsui_alert_mx3cw_1v2tf_193:not(#\9) {
254
+ .awsui_alert_mx3cw_1iibl_193:not(#\9) {
255
255
  border-collapse: separate;
256
256
  border-spacing: 0;
257
257
  box-sizing: border-box;
@@ -293,9 +293,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
293
293
  padding-block: var(--space-alert-vertical-dlp5wr, 8px);
294
294
  padding-inline: var(--space-alert-horizontal-ul364s, 16px);
295
295
  background-color: var(--color-background-container-content-6u8rvp, #ffffff);
296
+ --awsui-style-focus-ring-box-shadow-kcc2gu: 0 0 0 var(--awsui-style-focus-ring-border-width-kcc2gu, 2px) var(--awsui-style-focus-ring-border-color-kcc2gu, var(--color-border-item-focused-uk47pl, #006ce0));
296
297
  }
297
298
 
298
- .awsui_alert-wrapper_mx3cw_1v2tf_298:not(#\9) {
299
+ .awsui_alert-wrapper_mx3cw_1iibl_299:not(#\9) {
299
300
  flex: 1;
300
301
  display: flex;
301
302
  flex-direction: row;
@@ -303,46 +304,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
303
304
  column-gap: var(--space-alert-action-left-4s8zo5, 12px);
304
305
  }
305
306
 
306
- .awsui_hidden_mx3cw_1v2tf_250:not(#\9) {
307
+ .awsui_hidden_mx3cw_1iibl_250:not(#\9) {
307
308
  display: none;
308
309
  }
309
310
 
310
- .awsui_initial-hidden_mx3cw_1v2tf_310:not(#\9) {
311
+ .awsui_initial-hidden_mx3cw_1iibl_311:not(#\9) {
311
312
  overflow: hidden;
312
313
  block-size: 0;
313
314
  }
314
315
 
315
- .awsui_header_mx3cw_1v2tf_315:not(#\9),
316
- .awsui_header-replacement_mx3cw_1v2tf_316:not(#\9) {
316
+ .awsui_header_mx3cw_1iibl_316:not(#\9),
317
+ .awsui_header-replacement_mx3cw_1iibl_317:not(#\9) {
317
318
  font-weight: 700;
318
319
  }
319
320
 
320
- .awsui_action_mx3cw_1v2tf_320:not(#\9) {
321
+ .awsui_action_mx3cw_1iibl_321:not(#\9) {
321
322
  white-space: nowrap;
322
323
  }
323
324
 
324
- .awsui_action-slot_mx3cw_1v2tf_324:not(#\9),
325
- .awsui_action-button_mx3cw_1v2tf_325:not(#\9) {
325
+ .awsui_action-slot_mx3cw_1iibl_325:not(#\9),
326
+ .awsui_action-button_mx3cw_1iibl_326:not(#\9) {
326
327
  /* used in test-utils */
327
328
  }
328
329
 
329
- .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:not(#\9) {
330
+ .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9) {
330
331
  flex: 1;
331
332
  min-inline-size: 70%;
332
333
  display: grid;
333
334
  grid-template-columns: min-content auto;
334
335
  }
335
- .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:not(#\9):focus {
336
+ .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
336
337
  outline: none;
337
338
  }
338
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:not(#\9):focus {
339
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
339
340
  position: relative;
340
341
  }
341
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:not(#\9):focus {
342
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
342
343
  outline: 2px dotted transparent;
343
344
  outline-offset: calc(var(--space-button-focus-outline-gutter-jj138g, 4px) - 1px);
344
345
  }
345
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:not(#\9):focus::before {
346
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus::before {
346
347
  content: " ";
347
348
  display: block;
348
349
  position: absolute;
@@ -350,85 +351,85 @@ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1v2tf_329:n
350
351
  inset-block-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
351
352
  inline-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
352
353
  block-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
353
- border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
354
- border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
355
- border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
356
- border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
357
- box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
354
+ border-start-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
355
+ border-start-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
356
+ border-end-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
357
+ border-end-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
358
+ box-shadow: var(--awsui-style-focus-ring-box-shadow-kcc2gu);
358
359
  }
359
360
 
360
- .awsui_text_mx3cw_1v2tf_360:not(#\9) {
361
+ .awsui_text_mx3cw_1iibl_361:not(#\9) {
361
362
  min-inline-size: 0;
362
- padding-block: var(--border-width-alert-tuifgy, 2px);
363
+ padding-block: var(--border-width-button-jm0qg7, 2px);
363
364
  padding-inline: 0;
364
365
  margin-block: var(--space-scaled-xxs-pfm1nx, 4px);
365
366
  margin-inline: var(--space-xxs-hwfkai, 4px);
366
367
  }
367
- .awsui_text_mx3cw_1v2tf_360.awsui_icon_mx3cw_1v2tf_367:not(#\9) {
368
+ .awsui_text_mx3cw_1iibl_361.awsui_icon_mx3cw_1iibl_368:not(#\9) {
368
369
  margin-inline-start: 0;
369
370
  }
370
- .awsui_text_mx3cw_1v2tf_360.awsui_message_mx3cw_1v2tf_370:not(#\9) {
371
+ .awsui_text_mx3cw_1iibl_361.awsui_message_mx3cw_1iibl_371:not(#\9) {
371
372
  margin-inline-end: var(--space-alert-message-right-mrjbnn, 4px);
372
373
  }
373
374
 
374
- .awsui_action-wrapped_mx3cw_1v2tf_374:not(#\9) {
375
+ .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
375
376
  margin-block-end: var(--space-xxs-hwfkai, 4px);
376
377
  }
377
378
 
378
- .awsui_icon-size-medium_mx3cw_1v2tf_378 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_action-wrapped_mx3cw_1v2tf_374:not(#\9) {
379
+ .awsui_icon-size-medium_mx3cw_1iibl_379 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
379
380
  margin-inline-start: calc(var(--size-icon-medium-uv8xcz, 20px) + var(--space-xs-ymlm0b, 8px));
380
381
  }
381
382
 
382
- .awsui_icon-size-big_mx3cw_1v2tf_382 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_action-wrapped_mx3cw_1v2tf_374:not(#\9) {
383
+ .awsui_icon-size-big_mx3cw_1iibl_383 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
383
384
  margin-inline-start: calc(var(--size-icon-big-7pq9l3, 32px) + var(--space-xs-ymlm0b, 8px));
384
385
  }
385
386
 
386
- .awsui_icon-size-normal_mx3cw_1v2tf_386 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_action-wrapped_mx3cw_1v2tf_374:not(#\9) {
387
+ .awsui_icon-size-normal_mx3cw_1iibl_387 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
387
388
  margin-inline-start: calc(var(--size-icon-normal-levt08, 16px) + var(--space-xs-ymlm0b, 8px));
388
389
  }
389
390
 
390
- .awsui_content_mx3cw_1v2tf_390:not(#\9),
391
- .awsui_content-replacement_mx3cw_1v2tf_391:not(#\9) {
391
+ .awsui_content_mx3cw_1iibl_391:not(#\9),
392
+ .awsui_content-replacement_mx3cw_1iibl_392:not(#\9) {
392
393
  /* used in test-utils */
393
394
  }
394
395
 
395
- .awsui_dismiss_mx3cw_1v2tf_395:not(#\9) {
396
+ .awsui_dismiss_mx3cw_1iibl_396:not(#\9) {
396
397
  margin-inline-end: calc(-1 * var(--space-xxs-hwfkai, 4px));
397
398
  margin-inline-start: var(--space-s-tvghoh, 12px);
398
399
  }
399
400
 
400
- .awsui_dismiss-button_mx3cw_1v2tf_400:not(#\9) {
401
+ .awsui_dismiss-button_mx3cw_1iibl_401:not(#\9) {
401
402
  /* used in test-utils */
402
403
  }
403
404
 
404
- .awsui_type-error_mx3cw_1v2tf_404:not(#\9) {
405
+ .awsui_type-error_mx3cw_1iibl_405:not(#\9) {
405
406
  border-color: var(--color-border-status-error-j8acpp, #db0000);
406
407
  background-color: var(--color-background-status-error-mu3lcw, #fff5f5);
407
408
  }
408
- .awsui_type-error_mx3cw_1v2tf_404 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_alert-focus-wrapper_mx3cw_1v2tf_329 > .awsui_icon_mx3cw_1v2tf_367:not(#\9) {
409
+ .awsui_type-error_mx3cw_1iibl_405 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
409
410
  color: var(--color-text-status-error-ksqavh, #db0000);
410
411
  }
411
412
 
412
- .awsui_type-warning_mx3cw_1v2tf_412:not(#\9) {
413
+ .awsui_type-warning_mx3cw_1iibl_413:not(#\9) {
413
414
  border-color: var(--color-border-status-warning-j40pg7, #855900);
414
415
  background-color: var(--color-background-status-warning-cv83up, #fffef0);
415
416
  }
416
- .awsui_type-warning_mx3cw_1v2tf_412 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_alert-focus-wrapper_mx3cw_1v2tf_329 > .awsui_icon_mx3cw_1v2tf_367:not(#\9) {
417
+ .awsui_type-warning_mx3cw_1iibl_413 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
417
418
  color: var(--color-text-status-warning-6meo06, #855900);
418
419
  }
419
420
 
420
- .awsui_type-success_mx3cw_1v2tf_420:not(#\9) {
421
+ .awsui_type-success_mx3cw_1iibl_421:not(#\9) {
421
422
  border-color: var(--color-border-status-success-8z5f8u, #00802f);
422
423
  background-color: var(--color-background-status-success-h6b8bh, #effff1);
423
424
  }
424
- .awsui_type-success_mx3cw_1v2tf_420 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_alert-focus-wrapper_mx3cw_1v2tf_329 > .awsui_icon_mx3cw_1v2tf_367:not(#\9) {
425
+ .awsui_type-success_mx3cw_1iibl_421 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
425
426
  color: var(--color-text-status-success-ybmii8, #00802f);
426
427
  }
427
428
 
428
- .awsui_type-info_mx3cw_1v2tf_428:not(#\9) {
429
+ .awsui_type-info_mx3cw_1iibl_429:not(#\9) {
429
430
  border-color: var(--color-border-status-info-qf6jok, #006ce0);
430
431
  background-color: var(--color-background-status-info-sfobba, #f0fbff);
431
432
  }
432
- .awsui_type-info_mx3cw_1v2tf_428 > .awsui_alert-wrapper_mx3cw_1v2tf_298 > .awsui_alert-focus-wrapper_mx3cw_1v2tf_329 > .awsui_icon_mx3cw_1v2tf_367:not(#\9) {
433
+ .awsui_type-info_mx3cw_1iibl_429 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
433
434
  color: var(--color-text-status-info-ue8bd2, #006ce0);
434
435
  }
@@ -2,32 +2,32 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "alert": "awsui_alert_mx3cw_1v2tf_193",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1v2tf_1",
7
- "root": "awsui_root_mx3cw_1v2tf_215",
8
- "hidden": "awsui_hidden_mx3cw_1v2tf_250",
9
- "alert-wrapper": "awsui_alert-wrapper_mx3cw_1v2tf_298",
10
- "initial-hidden": "awsui_initial-hidden_mx3cw_1v2tf_310",
11
- "header": "awsui_header_mx3cw_1v2tf_315",
12
- "header-replacement": "awsui_header-replacement_mx3cw_1v2tf_316",
13
- "action": "awsui_action_mx3cw_1v2tf_320",
14
- "action-slot": "awsui_action-slot_mx3cw_1v2tf_324",
15
- "action-button": "awsui_action-button_mx3cw_1v2tf_325",
16
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1v2tf_329",
17
- "text": "awsui_text_mx3cw_1v2tf_360",
18
- "icon": "awsui_icon_mx3cw_1v2tf_367",
19
- "message": "awsui_message_mx3cw_1v2tf_370",
20
- "action-wrapped": "awsui_action-wrapped_mx3cw_1v2tf_374",
21
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1v2tf_378",
22
- "icon-size-big": "awsui_icon-size-big_mx3cw_1v2tf_382",
23
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1v2tf_386",
24
- "content": "awsui_content_mx3cw_1v2tf_390",
25
- "content-replacement": "awsui_content-replacement_mx3cw_1v2tf_391",
26
- "dismiss": "awsui_dismiss_mx3cw_1v2tf_395",
27
- "dismiss-button": "awsui_dismiss-button_mx3cw_1v2tf_400",
28
- "type-error": "awsui_type-error_mx3cw_1v2tf_404",
29
- "type-warning": "awsui_type-warning_mx3cw_1v2tf_412",
30
- "type-success": "awsui_type-success_mx3cw_1v2tf_420",
31
- "type-info": "awsui_type-info_mx3cw_1v2tf_428"
5
+ "alert": "awsui_alert_mx3cw_1iibl_193",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1iibl_1",
7
+ "root": "awsui_root_mx3cw_1iibl_215",
8
+ "hidden": "awsui_hidden_mx3cw_1iibl_250",
9
+ "alert-wrapper": "awsui_alert-wrapper_mx3cw_1iibl_299",
10
+ "initial-hidden": "awsui_initial-hidden_mx3cw_1iibl_311",
11
+ "header": "awsui_header_mx3cw_1iibl_316",
12
+ "header-replacement": "awsui_header-replacement_mx3cw_1iibl_317",
13
+ "action": "awsui_action_mx3cw_1iibl_321",
14
+ "action-slot": "awsui_action-slot_mx3cw_1iibl_325",
15
+ "action-button": "awsui_action-button_mx3cw_1iibl_326",
16
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1iibl_330",
17
+ "text": "awsui_text_mx3cw_1iibl_361",
18
+ "icon": "awsui_icon_mx3cw_1iibl_368",
19
+ "message": "awsui_message_mx3cw_1iibl_371",
20
+ "action-wrapped": "awsui_action-wrapped_mx3cw_1iibl_375",
21
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_1iibl_379",
22
+ "icon-size-big": "awsui_icon-size-big_mx3cw_1iibl_383",
23
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_1iibl_387",
24
+ "content": "awsui_content_mx3cw_1iibl_391",
25
+ "content-replacement": "awsui_content-replacement_mx3cw_1iibl_392",
26
+ "dismiss": "awsui_dismiss_mx3cw_1iibl_396",
27
+ "dismiss-button": "awsui_dismiss-button_mx3cw_1iibl_401",
28
+ "type-error": "awsui_type-error_mx3cw_1iibl_405",
29
+ "type-warning": "awsui_type-warning_mx3cw_1iibl_413",
30
+ "type-success": "awsui_type-success_mx3cw_1iibl_421",
31
+ "type-info": "awsui_type-info_mx3cw_1iibl_429"
32
32
  };
33
33
 
@@ -9,7 +9,7 @@ import { validateProps } from '../internal/base-component';
9
9
 
10
10
 
11
11
  const Container = (props) => {
12
- validateProps('Container', props, ["disableFooterPaddings"], {});
12
+ validateProps('Container', props, ["disableFooterPaddings","style"], {});
13
13
  return React.createElement(CoreComponent, props);
14
14
  };
15
15
 
@@ -68,6 +68,24 @@ export interface ContainerProps extends BaseComponentProps {
68
68
  * @visualrefresh `stacked` variant
69
69
  */
70
70
  variant?: 'default' | 'stacked';
71
+ /**
72
+ * Specifies an object of selectors and properties that are used to apply custom styles.
73
+ *
74
+ * - `root.background` (string) - (Optional) Background of the container.
75
+ * - `root.borderColor` (string) - (Optional) Border color of the container.
76
+ * - `root.borderRadius` (string) - (Optional) Border radius of the container.
77
+ * - `root.borderWidth` (string) - (Optional) Border width of the container.
78
+ * - `root.boxShadow` (string) - (Optional) Box shadow of the container.
79
+ * - `content.paddingBlock` (string) - (Optional) Block dimension padding of the content slot.
80
+ * - `content.paddingInline` (string) - (Optional) Inline dimension padding of the content slot.
81
+ * - `header.paddingBlock` (string) - (Optional) Block dimension padding of the header slot.
82
+ * - `header.paddingInline` (string) - (Optional) Inline dimension padding of the header slot.
83
+ * - `footer.root.paddingBlock` (string) - (Optional) Block dimension padding of the footer slot.
84
+ * - `footer.root.paddingInline` (string) - (Optional) Inline dimension padding of the footer slot.
85
+ * - `footer.divider.borderColor` (string) - (Optional) Border color of the footer divider.
86
+ * - `footer.divider.borderWidth` (string) - (Optional) Border width of the footer divider.
87
+ * @awsuiSystem core
88
+ */
71
89
  }
72
90
  export declare namespace ContainerProps {
73
91
  interface AnalyticsMetadata {
@@ -99,4 +117,31 @@ export declare namespace ContainerProps {
99
117
  */
100
118
  height?: string | number;
101
119
  }
120
+ interface Style {
121
+ root?: {
122
+ background?: string;
123
+ borderColor?: string;
124
+ borderRadius?: string;
125
+ borderWidth?: string;
126
+ boxShadow?: string;
127
+ };
128
+ content?: {
129
+ paddingBlock?: string;
130
+ paddingInline?: string;
131
+ };
132
+ header?: {
133
+ paddingBlock?: string;
134
+ paddingInline?: string;
135
+ };
136
+ footer?: {
137
+ root: {
138
+ paddingBlock?: string;
139
+ paddingInline?: string;
140
+ };
141
+ divider: {
142
+ borderColor?: string;
143
+ borderWidth?: string;
144
+ };
145
+ };
146
+ }
102
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,qBAA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version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * Specifies an object of selectors and properties that are used to apply custom styles.\n *\n * - `root.background` (string) - (Optional) Background of the container.\n * - `root.borderColor` (string) - (Optional) Border color of the container.\n * - `root.borderRadius` (string) - (Optional) Border radius of the container.\n * - `root.borderWidth` (string) - (Optional) Border width of the container.\n * - `root.boxShadow` (string) - (Optional) Box shadow of the container.\n * - `content.paddingBlock` (string) - (Optional) Block dimension padding of the content slot.\n * - `content.paddingInline` (string) - (Optional) Inline dimension padding of the content slot.\n * - `header.paddingBlock` (string) - (Optional) Block dimension padding of the header slot.\n * - `header.paddingInline` (string) - (Optional) Inline dimension padding of the header slot.\n * - `footer.root.paddingBlock` (string) - (Optional) Block dimension padding of the footer slot.\n * - `footer.root.paddingInline` (string) - (Optional) Inline dimension padding of the footer slot.\n * - `footer.divider.borderColor` (string) - (Optional) Border color of the footer divider.\n * - `footer.divider.borderWidth` (string) - (Optional) Border width of the footer divider.\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
@@ -33,6 +33,7 @@ export default function InternalContainer({
33
33
  disableFooterPaddings,
34
34
  fitHeight,
35
35
  media,
36
+ style,
36
37
  __stickyOffset,
37
38
  __mobileStickyOffset,
38
39
  __stickyHeader,
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAI1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAO9C,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACzG,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAEzE,oBAAoB,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,oBAAoB,CAAC,CAAC;IACjF,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;CAClE;AAED,wBAAgB,0BAA0B,CA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AAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,oBAAoB,CAAC,CAAC;IACjF,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;CAClE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,sBAAsB,eAWvE;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,qBAA6B,EAC7B,SAAS,EACT,KAAK,EACL,KAAK,EACL,cAAc,EACd,oBAAoB,EACpB,cAAsB,EACtB,iBAAwB,EACxB,sBAA8B,EAC9B,eAAuB,EACvB,WAAW,EACX,UAAkB,EAClB,qBAA4B,EAC5B,oBAAoB,EACpB,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,sBAAsB,eA2HxB"}
@@ -11,6 +11,7 @@ import { ContainerHeaderContextProvider } from '../internal/context/container-he
11
11
  import { useModalContext } from '../internal/context/modal-context';
12
12
  import { useMobile } from '../internal/hooks/use-mobile';
13
13
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
14
+ import { getContentStyles, getFooterStyles, getHeaderStyles, getMediaStyles, getRootStyles } from './style';
14
15
  import { StickyHeaderContext, useStickyHeader } from './use-sticky-header';
15
16
  import analyticsSelectors from './analytics-metadata/styles.css.js';
16
17
  import styles from './styles.css.js';
@@ -22,7 +23,7 @@ export function InternalContainerAsSubstep(props) {
22
23
  }
23
24
  export default function InternalContainer(_a) {
24
25
  var _b;
25
- var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, disableFooterPaddings = false, fitHeight, media, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
26
+ var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, disableFooterPaddings = false, fitHeight, media, style, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "style", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
26
27
  const isMobile = useMobile();
27
28
  const isRefresh = useVisualRefresh();
28
29
  const baseProps = getBaseProps(restProps);
@@ -38,12 +39,13 @@ export default function InternalContainer(_a) {
38
39
  const shouldHaveStickyStyles = isSticky && !isMobile;
39
40
  const hasMedia = !!(media === null || media === void 0 ? void 0 : media.content);
40
41
  const mediaPosition = (_b = media === null || media === void 0 ? void 0 : media.position) !== null && _b !== void 0 ? _b : 'top';
41
- return (React.createElement("div", Object.assign({}, baseProps, __funnelSubStepProps, { className: clsx(baseProps.className, styles.root, styles[`variant-${variant}`], fitHeight && styles['fit-height'], hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']), shouldHaveStickyStyles && [styles['sticky-enabled']], shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']], isRefresh && styles.refresh), ref: mergedRef }, getAnalyticsLabelAttribute(`.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`)),
42
- hasMedia && (React.createElement("div", { className: clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media), style: mediaPosition === 'top' ? { height: (media === null || media === void 0 ? void 0 : media.height) || '' } : { width: (media === null || media === void 0 ? void 0 : media.width) || '' } }, media.content)),
42
+ return (React.createElement("div", Object.assign({}, baseProps, __funnelSubStepProps, { className: clsx(baseProps.className, styles.root, styles[`variant-${variant}`], fitHeight && styles['fit-height'], hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']), shouldHaveStickyStyles && [styles['sticky-enabled']], shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']], isRefresh && styles.refresh), ref: mergedRef }, getAnalyticsLabelAttribute(`.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`), { style: getRootStyles(style) }),
43
+ hasMedia && (React.createElement("div", { className: clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media), style: mediaPosition === 'top'
44
+ ? Object.assign(Object.assign({}, getMediaStyles(mediaPosition, style)), { height: (media === null || media === void 0 ? void 0 : media.height) || '' }) : Object.assign(Object.assign({}, getMediaStyles(mediaPosition, style)), { width: (media === null || media === void 0 ? void 0 : media.width) || '' }) }, media.content)),
43
45
  React.createElement("div", { id: contentId, ref: __subStepRef, className: clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height']) },
44
46
  header && (React.createElement(ContainerHeaderContextProvider, null,
45
47
  React.createElement(StickyHeaderContext.Provider, { value: { isStuck, isStuckAtBottom } },
46
- React.createElement("div", Object.assign({ className: clsx(isRefresh && styles.refresh, styles.header, analyticsSelectors.header, styles[`header-variant-${variant}`], {
48
+ React.createElement("div", { className: clsx(isRefresh && styles.refresh, styles.header, analyticsSelectors.header, styles[`header-variant-${variant}`], {
47
49
  [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,
48
50
  [styles['header-sticky-enabled']]: isSticky,
49
51
  [styles['header-dynamic-height']]: hasDynamicHeight,
@@ -52,17 +54,17 @@ export default function InternalContainer(_a) {
52
54
  [styles['with-hidden-content']]: !children || __hiddenContent,
53
55
  [styles['header-with-media']]: hasMedia,
54
56
  [styles['header-full-page']]: __fullPage && isRefresh,
55
- }) }, stickyStyles, { ref: headerMergedRef }),
57
+ }), ref: headerMergedRef, style: Object.assign(Object.assign({}, stickyStyles.style), getHeaderStyles(style)) },
56
58
  isStuck && !isMobile && isRefresh && __fullPage && React.createElement("div", { className: styles['header-cover'] }),
57
59
  header)))),
58
60
  React.createElement("div", { className: clsx(styles.content, fitHeight && styles['content-fit-height']) },
59
61
  React.createElement("div", { className: clsx(styles['content-inner'], testStyles['content-inner'], {
60
62
  [styles['with-paddings']]: !disableContentPaddings,
61
63
  [styles['with-header']]: !!header,
62
- }) }, children)),
64
+ }), style: getContentStyles(style) }, children)),
63
65
  footer && (React.createElement("div", { className: clsx(styles.footer, {
64
66
  [styles['with-divider']]: !__disableFooterDivider,
65
67
  [styles['with-paddings']]: !disableFooterPaddings,
66
- }) }, footer)))));
68
+ }), style: getFooterStyles(style) }, footer)))));
67
69
  }
68
70
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/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,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,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ACL,CACF;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,qBAAqB;iBAClD,CAAC,IAED,MAAM,CACH,CACP,CACG,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 { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n disableFooterPaddings?: boolean;\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n disableFooterPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/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,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAwBtD,MAAM,UAAU,0BAA0B,CAAC,KAA6B;IACtE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC9D,MAAM,YAAY,GAAG,eA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ACF,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,IAE5B,MAAM,CACH,CACP,CACG,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 { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { getContentStyles, getFooterStyles, getHeaderStyles, getMediaStyles, getRootStyles } from './style';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n disableFooterPaddings?: boolean;\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n disableFooterPaddings = false,\n fitHeight,\n media,\n style,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n style={getRootStyles(style)}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={\n mediaPosition === 'top'\n ? { ...getMediaStyles(mediaPosition, style), height: media?.height || '' }\n : { ...getMediaStyles(mediaPosition, style), width: media?.width || '' }\n }\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n ref={headerMergedRef}\n style={{\n ...stickyStyles.style,\n ...getHeaderStyles(style),\n }}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n style={getContentStyles(style)}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !disableFooterPaddings,\n })}\n style={getFooterStyles(style)}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { ContainerProps } from './interfaces';
2
+ export declare function getRootStyles(style: ContainerProps.Style | undefined): {};
3
+ export declare function getContentStyles(style: ContainerProps.Style | undefined): {};
4
+ export declare function getHeaderStyles(style: ContainerProps.Style | undefined): {};
5
+ export declare function getFooterStyles(style: ContainerProps.Style | undefined): {};
6
+ export declare function getMediaStyles(mediaPosition: string, style: ContainerProps.Style | undefined): {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/container/style.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAcpE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAWvE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAatE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAatE;AAED,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAY5F"}
@@ -0,0 +1,58 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { SYSTEM } from '../internal/environment';
4
+ export function getRootStyles(style) {
5
+ var _a, _b, _c, _d, _e;
6
+ let properties = {};
7
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.root)) {
8
+ properties = {
9
+ background: (_a = style.root) === null || _a === void 0 ? void 0 : _a.background,
10
+ borderColor: (_b = style.root) === null || _b === void 0 ? void 0 : _b.borderColor,
11
+ borderRadius: (_c = style.root) === null || _c === void 0 ? void 0 : _c.borderRadius,
12
+ borderWidth: (_d = style.root) === null || _d === void 0 ? void 0 : _d.borderWidth,
13
+ boxShadow: (_e = style.root) === null || _e === void 0 ? void 0 : _e.boxShadow,
14
+ };
15
+ }
16
+ return properties;
17
+ }
18
+ export function getContentStyles(style) {
19
+ var _a, _b;
20
+ let properties = {};
21
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.content)) {
22
+ properties = {
23
+ paddingBlock: (_a = style.content) === null || _a === void 0 ? void 0 : _a.paddingBlock,
24
+ paddingInline: (_b = style.content) === null || _b === void 0 ? void 0 : _b.paddingInline,
25
+ };
26
+ }
27
+ return properties;
28
+ }
29
+ export function getHeaderStyles(style) {
30
+ var _a, _b, _c, _d, _e, _f;
31
+ let properties = {};
32
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.header)) {
33
+ properties = Object.assign(Object.assign(Object.assign({}, (((_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.background) && { background: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.background })), (((_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.borderRadius) && { background: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.borderRadius })), { paddingBlock: (_e = style.header) === null || _e === void 0 ? void 0 : _e.paddingBlock, paddingInline: (_f = style.header) === null || _f === void 0 ? void 0 : _f.paddingInline });
34
+ }
35
+ return properties;
36
+ }
37
+ export function getFooterStyles(style) {
38
+ var _a, _b, _c, _d, _e, _f, _g, _h;
39
+ let properties = {};
40
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.footer)) {
41
+ properties = {
42
+ borderColor: (_b = (_a = style.footer) === null || _a === void 0 ? void 0 : _a.divider) === null || _b === void 0 ? void 0 : _b.borderColor,
43
+ borderWidth: (_d = (_c = style.footer) === null || _c === void 0 ? void 0 : _c.divider) === null || _d === void 0 ? void 0 : _d.borderWidth,
44
+ paddingBlock: (_f = (_e = style.footer) === null || _e === void 0 ? void 0 : _e.root) === null || _f === void 0 ? void 0 : _f.paddingBlock,
45
+ paddingInline: (_h = (_g = style.footer) === null || _g === void 0 ? void 0 : _g.root) === null || _h === void 0 ? void 0 : _h.paddingInline,
46
+ };
47
+ }
48
+ return properties;
49
+ }
50
+ export function getMediaStyles(mediaPosition, style) {
51
+ var _a, _b;
52
+ let properties = {};
53
+ if (SYSTEM === 'core' && ((_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius)) {
54
+ properties = Object.assign(Object.assign({ borderRadius: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderRadius }, (mediaPosition === 'top' && { borderEndStartRadius: '0px', borderEndEndRadius: '0px' })), (mediaPosition === 'side' && { borderStartEndRadius: '0px', borderEndEndRadius: '0px' }));
55
+ }
56
+ return properties;
57
+ }
58
+ //# sourceMappingURL=style.js.map