@aurodesignsystem-dev/auro-toast 0.0.0-pr121.2 → 0.0.0-pr121.21

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/demo/basic.min.js CHANGED
@@ -269,7 +269,7 @@ var iconVersion = '9.1.1';
269
269
  var colorCss = i$5`:host([visible]){background-color:var(--ds-auro-toast-container-color);color:var(--ds-auro-toast-text-color)}:host([visible]) .typeIcon{color:var(--ds-auro-toast-icon-color)}:host([visible]) .closeButton:hover{background-color:var(--ds-auro-toast-close-button-hover-container-color)}:host([variant=error]){--ds-auro-toast-container-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-toast-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-toast-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([variant=success]){--ds-auro-toast-container-color: var(--ds-basic-color-status-success-subtle, #d6eac7);--ds-auro-toast-icon-color: var(--ds-basic-color-status-success, #447a1f);--ds-auro-toast-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
270
270
  `;
271
271
 
272
- var styleCss$1 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host([visible]){display:inline-block;min-width:100%;border-radius:var(--ds-size-100, .5rem);box-shadow:var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, .15));pointer-events:auto}@media (576px <= width < 1024px){:host([visible]){min-width:33%;max-width:50%}}@media (width >= 1024px){:host([visible]){min-width:200px;max-width:500px}}:host([visible]) .toastContainer{display:flex;flex-direction:row;align-items:flex-start;padding:var(--ds-size-200, 1rem) var(--ds-size-150, .75rem);gap:var(--ds-size-200, 1rem)}:host([visible]) .hidden{opacity:0;transition:visibility 0s .3s,opacity .3s ease-out;visibility:hidden}:host([visible]) [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([visible]) .message{flex:1}:host([visible]) .closeButton{border-radius:50%}
272
+ var styleCss$1 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{display:inherit}:host([visible]){display:inline-block;min-width:100%;border-radius:var(--ds-size-100, .5rem);box-shadow:var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, .15));pointer-events:auto}@media (576px <= width < 1024px){:host([visible]){min-width:33%;max-width:50%}}@media (width >= 1024px){:host([visible]){min-width:200px;max-width:500px}}:host([visible]) .toastContainer{display:flex;flex-direction:row;align-items:flex-start;padding:var(--ds-size-200, 1rem) var(--ds-size-150, .75rem);gap:var(--ds-size-200, 1rem)}:host([visible]) .hidden{opacity:0;transition:visibility 0s .3s,opacity .3s ease-out;visibility:hidden}:host([visible]) [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([visible]) .message{flex:1}:host([visible]) .closeButton{border-radius:50%}
273
273
  `;
274
274
 
275
275
  var tokensCss = i$5`:host{--ds-auro-toast-close-button-hover-container-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, .1));--ds-auro-toast-container-color: var(--ds-advanced-color-shared-background-strong, #676767);--ds-auro-toast-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-toast-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}
@@ -374,6 +374,14 @@ class AuroToast extends i$2 {
374
374
  * @private
375
375
  */
376
376
  this.fadeOutTimer = undefined;
377
+
378
+ /**
379
+ * True when the toast is not inside an auro-toaster and must manage its
380
+ * own live region announcement. Set once in connectedCallback.
381
+ * Default -- assumes toast is inside toaster.
382
+ * @private
383
+ */
384
+ this._isStandalone = false;
377
385
  }
378
386
 
379
387
  // This function is to define props used within the scope of this component
@@ -407,6 +415,27 @@ class AuroToast extends i$2 {
407
415
  reflect: true,
408
416
  },
409
417
 
418
+ /**
419
+ * The id of the element that triggered the toast.
420
+ * When the toast is manually closed, focus will return to this element.
421
+ * Takes precedence over the triggerElement property if both are set.
422
+ */
423
+ trigger: {
424
+ type: String,
425
+ reflect: true,
426
+ },
427
+
428
+ /**
429
+ * A direct reference to the element that triggered the toast.
430
+ * When the toast is manually closed, focus will return to this element.
431
+ * Use the trigger attribute instead if you prefer a declarative approach.
432
+ * @type {HTMLElement}
433
+ */
434
+ triggerElement: {
435
+ type: Object,
436
+ attribute: false,
437
+ },
438
+
410
439
  /**
411
440
  * Component will render visually based on which variant value is set.
412
441
  * @type {'error' | 'success' | 'custom'}
@@ -447,11 +476,28 @@ class AuroToast extends i$2 {
447
476
  this.runtimeUtils.handleComponentTagRename(this, "auro-toast");
448
477
  }
449
478
 
479
+ /**
480
+ * Returns focus to the trigger element when the toast is manually closed.
481
+ * Not called on auto-dismiss — moving focus during auto-dismiss would
482
+ * interrupt the AT user's current position in the page.
483
+ * @private
484
+ * @returns {void}
485
+ */
486
+ _returnFocus() {
487
+ const target = (this.trigger ? document.getElementById(this.trigger) : null) ??
488
+ this.triggerElement;
489
+
490
+ if (target) {
491
+ target.focus();
492
+ }
493
+ }
494
+
450
495
  /**
451
496
  * @private
452
497
  * @returns {void}
453
498
  */
454
499
  clickToClose() {
500
+ this._returnFocus();
455
501
  this.closeToast();
456
502
  clearTimeout(this.fadeOutTimer);
457
503
  }
@@ -529,6 +575,71 @@ class AuroToast extends i$2 {
529
575
  connectedCallback() {
530
576
  super.connectedCallback();
531
577
  this.setOnClick();
578
+
579
+ // Dispatch a cancelable event so auro-toaster can signal it will handle
580
+ // announcements. If nothing cancels the event the toast is standalone and
581
+ // must register its own live region on the host element — before
582
+ // any visibility change — so the AT has already observed it as a live
583
+ // region by the time content is rendered into the shadow DOM.
584
+ const event = new CustomEvent('toast-request-announce', {
585
+ bubbles: true,
586
+ cancelable: true,
587
+ composed: true,
588
+ });
589
+
590
+ // NOTE — reverse logic:
591
+ // dispatchEvent() returns TRUE when nobody called preventDefault(), which
592
+ // means no auro-toaster was listening — the toast is standalone and must
593
+ // own its live region. It returns FALSE when a toaster cancelled the event,
594
+ // signalling that the toaster's aria-live region will handle announcements.
595
+ const eventNotPrevented = this.dispatchEvent(event);
596
+
597
+ // Secondary check: even if no toaster answered the event, the toast may
598
+ // be inside another element that already owns a live region (e.g. a plain
599
+ // div[aria-live="polite"]). Setting a role on the host in that case would
600
+ // create a nested live region. aria-live="off" is intentionally excluded
601
+ // — it disables live region behavior and is not an active announcer.
602
+ this._isStandalone = eventNotPrevented && !this._hasAncestorLiveRegion();
603
+
604
+ this._syncStandaloneRole();
605
+ }
606
+
607
+ /**
608
+ * Sets or removes the live-region role on the host depending on whether
609
+ * the toast is standalone. Extracted so connectedCallback and updated()
610
+ * stay in sync without duplicating the logic.
611
+ * @private
612
+ * @returns {void}
613
+ */
614
+ _syncStandaloneRole() {
615
+ if (this._isStandalone) {
616
+ this.setAttribute('role', this.variant === 'error' ? 'alert' : 'status');
617
+ } else {
618
+ this.removeAttribute('role');
619
+ }
620
+ }
621
+
622
+ /**
623
+ * Walks the DOM ancestors (crossing shadow boundaries) looking for any
624
+ * active live region — either an aria-live="polite/assertive" attribute or
625
+ * an implicit live region role (alert, status, log).
626
+ * aria-live="off" is not considered active and is intentionally ignored.
627
+ * @private
628
+ * @returns {boolean}
629
+ */
630
+ _hasAncestorLiveRegion() {
631
+ let node = this.parentElement;
632
+ while (node) {
633
+ if (
634
+ ['polite', 'assertive'].includes(node.getAttribute?.('aria-live')) ||
635
+ ['alert', 'status', 'log'].includes(node.getAttribute?.('role'))
636
+ ) {
637
+ return true;
638
+ }
639
+ // Traverse up, crossing shadow DOM boundaries if needed
640
+ node = node.parentElement ?? node.getRootNode()?.host ?? null;
641
+ }
642
+ return false;
532
643
  }
533
644
 
534
645
  updated(changedProperties) {
@@ -536,8 +647,10 @@ class AuroToast extends i$2 {
536
647
  this.handleSlotContent();
537
648
  }
538
649
 
650
+ // Keep the standalone role in sync if variant changes after connection.
539
651
  if (changedProperties.has("variant")) {
540
652
  clearTimeout(this.fadeOutTimer);
653
+ this._syncStandaloneRole();
541
654
  }
542
655
 
543
656
  // do not auto dismiss for error toasts or if disableAutoHide is set
@@ -574,44 +687,42 @@ class AuroToast extends i$2 {
574
687
 
575
688
  render() {
576
689
  return u$2`
577
- <div role="status">
578
- ${
579
- this.visible
580
- ? u$2`
581
- <div class="toastContainer">
582
- ${
583
- this.noIcon
584
- ? undefined
585
- : u$2`
586
- <${this.iconTag} customColor customSvg class="typeIcon body-default" part="type-icon">
587
- ${this.variant === "custom" ? undefined : u$2`${this.getVariantIcon()}`}
588
- </${this.iconTag}>
589
- `
590
- }
591
- <div class="message body-default"><slot></slot></div>
592
- <${this.buttonTag}
593
- variant="flat"
594
- shape="circle"
595
- size="xs"
596
- appearance=${this.variant !== "error" && this.variant !== "success" ? "inverse" : this.appearance}
597
- @click="${this.clickToClose}"
598
- part="close-button"
599
- class="closeButton">
600
- <${this.iconTag} customColor customSvg>
601
- ${this.closeSvg}
602
- </${this.iconTag}>
603
- <span slot="ariaLabel">Close</span>
604
- </${this.buttonTag}>
605
- </div>
606
- `
607
- : undefined
608
- }
609
- </div>
690
+ ${
691
+ this.visible
692
+ ? u$2`
693
+ <div class="toastContainer">
694
+ ${
695
+ this.noIcon
696
+ ? undefined
697
+ : u$2`
698
+ <${this.iconTag} customColor customSvg class="typeIcon body-default" part="type-icon">
699
+ ${this.variant === "custom" ? undefined : u$2`${this.getVariantIcon()}`}
700
+ </${this.iconTag}>
701
+ `
702
+ }
703
+ <div class="message body-default"><slot></slot></div>
704
+ <${this.buttonTag}
705
+ variant="flat"
706
+ shape="circle"
707
+ size="xs"
708
+ appearance=${this.variant !== "error" && this.variant !== "success" ? "inverse" : this.appearance}
709
+ @click="${this.clickToClose}"
710
+ part="close-button"
711
+ class="closeButton">
712
+ <${this.iconTag} customColor customSvg>
713
+ ${this.closeSvg}
714
+ </${this.iconTag}>
715
+ <span slot="ariaLabel">Close this notification.</span>
716
+ </${this.buttonTag}>
717
+ </div>
718
+ `
719
+ : undefined
720
+ }
610
721
  `;
611
722
  }
612
723
  }
613
724
 
614
- var styleCss = i$5`:host{position:fixed;z-index:var(--ds-depth-modal, 300);right:2%;bottom:2%;left:2%;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:var(--ds-size-200, 1rem);pointer-events:none}@media (width >= 1024px){:host{right:1%;left:unset;width:100%}}
725
+ var styleCss = i$5`.toaster-wrapper{position:fixed;z-index:var(--ds-depth-modal, 300);right:2%;bottom:2%;left:2%;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:var(--ds-size-200, 1rem);pointer-events:none}@media (width >= 1024px){.toaster-wrapper{right:1%;left:unset;width:100%}}
615
726
  `;
616
727
 
617
728
  // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
@@ -623,20 +734,165 @@ class AuroToaster extends i$2 {
623
734
  return [styleCss];
624
735
  }
625
736
 
737
+ constructor() {
738
+ super();
739
+ // Initialised in the constructor so they survive disconnect/reconnect.
740
+ // If these were in connectedCallback, a reconnected toaster would forget
741
+ // which error toasts it had already announced and could re-announce them.
742
+ this._assertiveResetTimer = undefined;
743
+ this._announcedErrorToasts = new WeakSet();
744
+
745
+ // Cancel the standalone live region request from any child toast — the
746
+ // toaster's own aria-live region handles all announcements.
747
+ // Calling preventDefault() causes dispatchEvent() on the toast to return
748
+ // false, which the toast reads as "a toaster is present — do not set a
749
+ // standalone live region role on the host element."
750
+ this._onToastRequestAnnounce = (e) => e.preventDefault();
751
+ }
752
+
626
753
  /**
627
754
  * This will register this element with the browser.
628
- * @param {string} [name="auro-toaster"] - The name of the element that you want to register.
755
+ * @param {string} [name="auro-toaster"] - The name of the element that you want to register to.
629
756
  *
630
757
  * @example
631
- * AuroToaster.register("custom-toast") // this will register this element to <custom-toast/>
758
+ * AuroToaster.register("custom-toaster") // this will register this element to <custom-toaster/>
632
759
  *
633
760
  */
634
761
  static register(name = "auro-toaster") {
635
762
  AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroToaster);
636
763
  }
637
764
 
765
+ connectedCallback() {
766
+ super.connectedCallback();
767
+ this.addEventListener('toast-request-announce', this._onToastRequestAnnounce);
768
+
769
+ /**
770
+ * @private
771
+ *
772
+ * Observes toast attribute changes to determine when we should temporarily
773
+ * switch the live region from "polite" → "assertive".
774
+ *
775
+ * Supported trigger paths:
776
+ * 1. Normal path:
777
+ * - A toast becomes visible
778
+ * - AND it is already an error toast
779
+ * 2. Defensive fallback (unsupported but possible misuse):
780
+ * - A visible toast has its variant changed to "error"
781
+ *
782
+ * Note:
783
+ * Toasts are not intended to mutate while visible. This fallback exists
784
+ * only to preserve accessibility behavior if that contract is violated.
785
+ */
786
+ this._observer = new MutationObserver((mutations) => {
787
+ for (const mutation of mutations) {
788
+ const target = mutation.target;
789
+
790
+ // Only react to auro-toast elements (including versioned tags like
791
+ // auro-toast_1_2_3). Explicitly ignore auro-toaster itself.
792
+ if (!/^auro-toast(_|$)/u.test(target.localName ?? '')) continue;
793
+
794
+ const isVisible = target.hasAttribute?.('visible');
795
+ const isError = target.getAttribute?.('variant') === 'error';
796
+
797
+ // ---------------------------------------------------------------------
798
+ // Case 1: supported behavior
799
+ // A toast becomes visible AND is already an error toast
800
+ // ---------------------------------------------------------------------
801
+ const becameVisible =
802
+ mutation.attributeName === 'visible' &&
803
+ isVisible &&
804
+ isError;
805
+
806
+ // ---------------------------------------------------------------------
807
+ // Case 2: defensive fallback
808
+ // A toast is already visible and its variant is changed to "error"
809
+ // (unsupported usage pattern, but we handle it safely for a11y)
810
+ // ---------------------------------------------------------------------
811
+ const becameErrorWhileVisible =
812
+ mutation.attributeName === 'variant' &&
813
+ mutation.oldValue !== 'error' &&
814
+ isVisible &&
815
+ isError;
816
+
817
+ if (becameVisible || becameErrorWhileVisible) {
818
+ this._setAssertiveTemporarily();
819
+ }
820
+ }
821
+ });
822
+
823
+ this._observer.observe(this, {
824
+ subtree: true,
825
+
826
+ // REQUIRED: without this, attribute changes will not trigger the observer
827
+ attributes: true,
828
+
829
+ // We only care about these two attributes for performance and clarity
830
+ attributeFilter: ['visible', 'variant'],
831
+
832
+ // REQUIRED for detecting transitions (e.g. non-error → error)
833
+ attributeOldValue: true,
834
+ });
835
+ }
836
+
837
+ disconnectedCallback() {
838
+ super.disconnectedCallback();
839
+ this._observer?.disconnect();
840
+ clearTimeout(this._assertiveResetTimer);
841
+ this.removeEventListener('toast-request-announce', this._onToastRequestAnnounce);
842
+
843
+ // Reset the live region to polite so a reconnected toaster does not
844
+ // inherit a stale assertive state left behind by a cleared timer.
845
+ const liveRegion = this.shadowRoot?.querySelector('[aria-live]');
846
+ if (liveRegion) {
847
+ liveRegion.setAttribute('aria-live', 'polite');
848
+ }
849
+ }
850
+
851
+ /**
852
+ * Temporarily sets the live region to assertive so the error toast
853
+ * interrupts the screen reader, then resets to polite after 3 seconds.
854
+ * This ensures subsequent polite toasts don't keep interrupting the user,
855
+ * even if the error toast remains visible (errors are never auto-dismissed).
856
+ * @private
857
+ */
858
+ _setAssertiveTemporarily() {
859
+ const liveRegion = this.shadowRoot?.querySelector('[aria-live]');
860
+ if (!liveRegion) return;
861
+
862
+ clearTimeout(this._assertiveResetTimer);
863
+ liveRegion.setAttribute('aria-live', 'assertive');
864
+
865
+ this._assertiveResetTimer = setTimeout(() => {
866
+ liveRegion.setAttribute('aria-live', 'polite');
867
+ }, 3000);
868
+ }
869
+
638
870
  render() {
639
- return x$2`<slot role="status"></slot>`;
871
+ return x$2`
872
+ <div class="toaster-wrapper" aria-live="polite" aria-atomic="false">
873
+ <slot @slotchange="${this._onSlotChange}"></slot>
874
+ </div>
875
+ `;
876
+ }
877
+
878
+ /**
879
+ * Handles slot changes — checks if a newly slotted error toast
880
+ * is already visible at the time it is added to the toaster.
881
+ * @private
882
+ */
883
+ _onSlotChange(e) {
884
+ const newErrorToast = e.target.assignedElements({ flatten: true })
885
+ .find(el =>
886
+ /^auro-toast(_|$)/u.test(el.localName ?? '') &&
887
+ el.getAttribute('variant') === 'error' &&
888
+ el.hasAttribute('visible') &&
889
+ !this._announcedErrorToasts.has(el)
890
+ );
891
+
892
+ if (newErrorToast) {
893
+ this._announcedErrorToasts.add(newErrorToast);
894
+ this._setAssertiveTemporarily();
895
+ }
640
896
  }
641
897
  }
642
898
 
package/demo/index.md CHANGED
@@ -47,8 +47,12 @@ showToast = (toastID) => {
47
47
  <auro-button id="basicToastBtn">
48
48
  Show default notification
49
49
  </auro-button>
50
+ <!--
51
+ NOTE: The manually added style is NOT necessary for use,
52
+ Demo purposes ONLY!
53
+ -->
50
54
  <auro-toast style="display: block; margin: 0.5rem 0;" id="basicToast">
51
- Default notification with no error type
55
+ Default notification with no error type.
52
56
  </auro-toast>
53
57
  <!-- AURO-GENERATED-CONTENT:END -->
54
58
  </div>
@@ -61,8 +65,12 @@ showToast = (toastID) => {
61
65
  <auro-button id="basicToastBtn">
62
66
  Show default notification
63
67
  </auro-button>
68
+ <!--
69
+ NOTE: The manually added style is NOT necessary for use,
70
+ Demo purposes ONLY!
71
+ -->
64
72
  <auro-toast style="display: block; margin: 0.5rem 0;" id="basicToast">
65
- Default notification with no error type
73
+ Default notification with no error type.
66
74
  </auro-toast>
67
75
  ```
68
76
  <!-- AURO-GENERATED-CONTENT:END -->