@aurodesignsystem-dev/auro-toast 0.0.0-pr156.0 → 0.0.0-pr156.10

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/README.md CHANGED
@@ -107,7 +107,6 @@ You can do this by importing only the component class and using the `register(na
107
107
 
108
108
  <pre class="language-js"><code class="language-js">// Import the class only
109
109
  import { AuroToast } from '@aurodesignsystem/auro-toast/class';
110
- ​
111
110
  // Register with a custom name if desired
112
111
  AuroToast.register('custom-toast');</code></pre>
113
112
 
@@ -53,7 +53,7 @@
53
53
  {
54
54
  "kind": "method",
55
55
  "name": "_scheduleAutoHide",
56
- "description": "(Re-)schedules the auto-hide timer based on current visible/disableAutoHide/\nvariant/timeTilHide values. Called from updated() on property changes and\nfrom connectedCallback() to re-arm auto-hide after a reconnect (e.g. the\nnode is re-parented elsewhere in the DOM), since updated() does not run\nagain on reconnect alone.",
56
+ "description": "(Re-)schedules the auto-hide timer based on current visible/disableAutoHide/\nvariant/timeTilHide values. Called from updated() on property changes and\nfrom connectedCallback() to re-arm auto-hide after a reconnect (e.g. the\nnode is re-parented elsewhere in the DOM), since updated() does not run\nagain on reconnect alone.\n\nRestarts the full countdown on every reconnect rather than resuming\nelapsed time -- this is intentional (AB#1646998): \"visible for N ms\"\nis scoped to a single connected mount, and connectedCallback() itself\nre-arms on every reconnect, so a resume-elapsed-time model would need\nits own persisted start time with no corresponding product ask.",
57
57
  "privacy": "private",
58
58
  "return": {
59
59
  "type": {
@@ -235,7 +235,7 @@
235
235
  {
236
236
  "name": "toast-close",
237
237
  "type": {
238
- "text": "{ visible: boolean }"
238
+ "text": "{ visible: boolean, id: string }"
239
239
  },
240
240
  "description": "Notifies that the toast has been closed"
241
241
  },
package/demo/api.min.js CHANGED
@@ -538,7 +538,7 @@ const FADE_OUT_DURATION = 300;
538
538
  *
539
539
  * @csspart type-icon - Apply css to the toast type icon
540
540
  * @csspart close-button - Apply css to the toast close button
541
- * @fires onToastClose - **Deprecated**, use `toast-close` event instead.
541
+ * @event onToastClose - **Deprecated**, use `toast-close` event instead.
542
542
  * @event toast-close - Notifies that the toast has been closed
543
543
  */
544
544
 
@@ -734,6 +734,13 @@ class AuroToast extends i$2 {
734
734
  this.runtimeUtils.handleComponentTagRename(this, "auro-toast");
735
735
  }
736
736
 
737
+ /**
738
+ * Cancels any pending auto-hide/close timers when the toast leaves the DOM,
739
+ * so a stale timer from a previous connection cannot fire after the node
740
+ * has been removed or re-parented.
741
+ * @private
742
+ * @returns {void}
743
+ */
737
744
  disconnectedCallback() {
738
745
  super.disconnectedCallback();
739
746
  clearTimeout(this.fadeOutTimer);
@@ -821,13 +828,13 @@ class AuroToast extends i$2 {
821
828
  * Emits closed toast event.
822
829
  *
823
830
  * @event toast-close
824
- * @type {{ visible: boolean }}
831
+ * @type {{ visible: boolean, id: string }}
825
832
  */
826
833
  this.dispatchEvent(
827
834
  new CustomEvent("toast-close", {
828
835
  bubbles: true,
829
836
  composed: true,
830
- detail: { visible: false },
837
+ detail: { visible: false, id: this.id },
831
838
  }),
832
839
  );
833
840
  }
@@ -871,6 +878,15 @@ class AuroToast extends i$2 {
871
878
  super.connectedCallback();
872
879
  this.setOnClick();
873
880
 
881
+ // A disconnect during fade-out (see disconnectedCallback) cancels the
882
+ // pending close timer but leaves the "hidden" class on the container --
883
+ // there is no pending close left to finish it. Reconnecting must restore
884
+ // full visibility, otherwise the toast can get stuck rendered-but-hidden
885
+ // while `visible` is still true (e.g. if disableAutoHide was toggled on
886
+ // while detached, which prevents _scheduleAutoHide() below from ever
887
+ // re-arming a close).
888
+ this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden");
889
+
874
890
  // Re-arm auto-hide on reconnect (e.g. re-parenting the node elsewhere in
875
891
  // the DOM) -- updated() does not re-run just because connectedCallback()
876
892
  // fired again, since no reactive property changed as a result.
@@ -945,6 +961,17 @@ class AuroToast extends i$2 {
945
961
  updated(changedProperties) {
946
962
  if (changedProperties.has("visible")) {
947
963
  this.handleSlotContent();
964
+
965
+ // A toast element reused for a new message (e.g. a message queue
966
+ // recycling instances) can still have a closeTimer pending from an
967
+ // earlier close's fade-out -- nothing previously cleared it when
968
+ // visible flips back to true, so it could fire ~300ms later and close
969
+ // the freshly re-shown toast. Also restore visibility in case the
970
+ // earlier fade-out had already applied the "hidden" class.
971
+ if (this.visible) {
972
+ clearTimeout(this.closeTimer);
973
+ this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden");
974
+ }
948
975
  }
949
976
 
950
977
  // Keep the standalone role in sync if variant changes after connection.
@@ -969,13 +996,27 @@ class AuroToast extends i$2 {
969
996
  * from connectedCallback() to re-arm auto-hide after a reconnect (e.g. the
970
997
  * node is re-parented elsewhere in the DOM), since updated() does not run
971
998
  * again on reconnect alone.
999
+ *
1000
+ * Restarts the full countdown on every reconnect rather than resuming
1001
+ * elapsed time -- this is intentional (AB#1646998): "visible for N ms"
1002
+ * is scoped to a single connected mount, and connectedCallback() itself
1003
+ * re-arms on every reconnect, so a resume-elapsed-time model would need
1004
+ * its own persisted start time with no corresponding product ask.
972
1005
  * @private
973
1006
  * @returns {void}
974
1007
  */
975
1008
  _scheduleAutoHide() {
976
- // do not auto dismiss for error toasts or if disableAutoHide is set
977
- if (this.visible && !this.disableAutoHide && this.variant !== "error") {
978
- clearTimeout(this.fadeOutTimer);
1009
+ // Unconditional so a pending timer never survives becoming ineligible
1010
+ // (e.g. disableAutoHide toggled on mid-countdown) -- correctness should
1011
+ // not depend on fadeOutToast()'s own guard re-checking eligibility.
1012
+ clearTimeout(this.fadeOutTimer);
1013
+
1014
+ // do not auto dismiss for error toasts, if disableAutoHide is set, or
1015
+ // while disconnected -- updated() can still run after disconnect (Lit's
1016
+ // update cycle does not require an active connection), and arming a
1017
+ // timer here would let it fire off-DOM, ahead of connectedCallback's own
1018
+ // re-arm and hidden-class restoration on reconnect (AB#1646998).
1019
+ if (this.isConnected && this.visible && !this.disableAutoHide && this.variant !== "error") {
979
1020
  this.fadeOutTimer = setTimeout(() => {
980
1021
  this.fadeOutToast();
981
1022
  }, this.timeTilHide || DEFAULT_TIME_TIL_FADE_OUT);
package/demo/index.min.js CHANGED
@@ -289,7 +289,7 @@ const FADE_OUT_DURATION = 300;
289
289
  *
290
290
  * @csspart type-icon - Apply css to the toast type icon
291
291
  * @csspart close-button - Apply css to the toast close button
292
- * @fires onToastClose - **Deprecated**, use `toast-close` event instead.
292
+ * @event onToastClose - **Deprecated**, use `toast-close` event instead.
293
293
  * @event toast-close - Notifies that the toast has been closed
294
294
  */
295
295
 
@@ -485,6 +485,13 @@ class AuroToast extends i$2 {
485
485
  this.runtimeUtils.handleComponentTagRename(this, "auro-toast");
486
486
  }
487
487
 
488
+ /**
489
+ * Cancels any pending auto-hide/close timers when the toast leaves the DOM,
490
+ * so a stale timer from a previous connection cannot fire after the node
491
+ * has been removed or re-parented.
492
+ * @private
493
+ * @returns {void}
494
+ */
488
495
  disconnectedCallback() {
489
496
  super.disconnectedCallback();
490
497
  clearTimeout(this.fadeOutTimer);
@@ -572,13 +579,13 @@ class AuroToast extends i$2 {
572
579
  * Emits closed toast event.
573
580
  *
574
581
  * @event toast-close
575
- * @type {{ visible: boolean }}
582
+ * @type {{ visible: boolean, id: string }}
576
583
  */
577
584
  this.dispatchEvent(
578
585
  new CustomEvent("toast-close", {
579
586
  bubbles: true,
580
587
  composed: true,
581
- detail: { visible: false },
588
+ detail: { visible: false, id: this.id },
582
589
  }),
583
590
  );
584
591
  }
@@ -622,6 +629,15 @@ class AuroToast extends i$2 {
622
629
  super.connectedCallback();
623
630
  this.setOnClick();
624
631
 
632
+ // A disconnect during fade-out (see disconnectedCallback) cancels the
633
+ // pending close timer but leaves the "hidden" class on the container --
634
+ // there is no pending close left to finish it. Reconnecting must restore
635
+ // full visibility, otherwise the toast can get stuck rendered-but-hidden
636
+ // while `visible` is still true (e.g. if disableAutoHide was toggled on
637
+ // while detached, which prevents _scheduleAutoHide() below from ever
638
+ // re-arming a close).
639
+ this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden");
640
+
625
641
  // Re-arm auto-hide on reconnect (e.g. re-parenting the node elsewhere in
626
642
  // the DOM) -- updated() does not re-run just because connectedCallback()
627
643
  // fired again, since no reactive property changed as a result.
@@ -696,6 +712,17 @@ class AuroToast extends i$2 {
696
712
  updated(changedProperties) {
697
713
  if (changedProperties.has("visible")) {
698
714
  this.handleSlotContent();
715
+
716
+ // A toast element reused for a new message (e.g. a message queue
717
+ // recycling instances) can still have a closeTimer pending from an
718
+ // earlier close's fade-out -- nothing previously cleared it when
719
+ // visible flips back to true, so it could fire ~300ms later and close
720
+ // the freshly re-shown toast. Also restore visibility in case the
721
+ // earlier fade-out had already applied the "hidden" class.
722
+ if (this.visible) {
723
+ clearTimeout(this.closeTimer);
724
+ this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden");
725
+ }
699
726
  }
700
727
 
701
728
  // Keep the standalone role in sync if variant changes after connection.
@@ -720,13 +747,27 @@ class AuroToast extends i$2 {
720
747
  * from connectedCallback() to re-arm auto-hide after a reconnect (e.g. the
721
748
  * node is re-parented elsewhere in the DOM), since updated() does not run
722
749
  * again on reconnect alone.
750
+ *
751
+ * Restarts the full countdown on every reconnect rather than resuming
752
+ * elapsed time -- this is intentional (AB#1646998): "visible for N ms"
753
+ * is scoped to a single connected mount, and connectedCallback() itself
754
+ * re-arms on every reconnect, so a resume-elapsed-time model would need
755
+ * its own persisted start time with no corresponding product ask.
723
756
  * @private
724
757
  * @returns {void}
725
758
  */
726
759
  _scheduleAutoHide() {
727
- // do not auto dismiss for error toasts or if disableAutoHide is set
728
- if (this.visible && !this.disableAutoHide && this.variant !== "error") {
729
- clearTimeout(this.fadeOutTimer);
760
+ // Unconditional so a pending timer never survives becoming ineligible
761
+ // (e.g. disableAutoHide toggled on mid-countdown) -- correctness should
762
+ // not depend on fadeOutToast()'s own guard re-checking eligibility.
763
+ clearTimeout(this.fadeOutTimer);
764
+
765
+ // do not auto dismiss for error toasts, if disableAutoHide is set, or
766
+ // while disconnected -- updated() can still run after disconnect (Lit's
767
+ // update cycle does not require an active connection), and arming a
768
+ // timer here would let it fire off-DOM, ahead of connectedCallback's own
769
+ // re-arm and hidden-class restoration on reconnect (AB#1646998).
770
+ if (this.isConnected && this.visible && !this.disableAutoHide && this.variant !== "error") {
730
771
  this.fadeOutTimer = setTimeout(() => {
731
772
  this.fadeOutToast();
732
773
  }, this.timeTilHide || DEFAULT_TIME_TIL_FADE_OUT);
package/demo/readme.md CHANGED
@@ -107,7 +107,6 @@ You can do this by importing only the component class and using the `register(na
107
107
 
108
108
  <pre class="language-js"><code class="language-js">// Import the class only
109
109
  import { AuroToast } from '@aurodesignsystem/auro-toast/class';
110
- ​
111
110
  // Register with a custom name if desired
112
111
  AuroToast.register('custom-toast');</code></pre>
113
112
 
@@ -53,11 +53,11 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as a,lit
53
53
  </span>
54
54
  </span>
55
55
  </${this._renderTag}>
56
- `}renderLayout(){return this.renderLayoutDefault()}}class I{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,s=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||s(t.getRootNode().host):null){return s(t)}handleComponentTagRename(e,t){const s=t.toLowerCase();e.tagName.toLowerCase()!==s&&e.setAttribute(s,!0)}elementMatch(e,t){const s=t.toLowerCase();return e.tagName.toLowerCase()===s||e.hasAttribute(s)}getSlotText(e,t){const s=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(s?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class F extends t{static get properties(){return{hidden:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0}}}hideAudible(e){return e?"true":"false"}}const E=new Map,$=(e,t={})=>{const s=t.responseParser||(e=>e.text());return E.has(e)||E.set(e,fetch(e).then(s)),E.get(e)};var L=e`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
57
- `;class O extends F{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.onDark=!1,this.appearance="default"}static get properties(){return{...F.properties,onDark:{type:Boolean,reflect:!0},appearance:{type:String,reflect:!0},svg:{attribute:!1,reflect:!0}}}static get styles(){return L}async fetchIcon(e,t){let s="";return s="logos"===e?await $(`${this.uri}/${e}/${t}.svg`):await $(`${this.uri}/icons/${e}/${t}.svg`),(new DOMParser).parseFromString(s,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const e=await this.fetchIcon(this.category,this.name);if(e)this.svg=e;else if(!e){const e=this.name?.startsWith("tail-")?'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" style="min-width:100%;height:auto;fill:currentColor" viewBox="0 0 142 138" part="svg"><title id="tail-DEFAULT__title">Airplane tail default image with light gray color</title><path fill="url(#paint0_linear_9225_2069)" fill-rule="evenodd" d="M124.093 14.665a3.26 3.26 0 0 1 3.208 3.829L101.097 119.85c-.47 1.087-2.211 3.398-5.692 3.471l-.106.001-80.65.013A659230 659230 0 0 1 99.08 17.412c1.214-1.497 3.275-2.722 5.372-2.747z" clip-rule="evenodd"/><defs><linearGradient id="paint0_linear_9225_2069" x1="114.823" x2="60.061" y1="14.665" y2="123.335" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#707984"/><stop offset=".5" stop-color="#646E7B"/></linearGradient></defs></svg>':'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';this.svg=(new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}}}catch(e){this.svg=void 0}}}e`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
56
+ `}renderLayout(){return this.renderLayoutDefault()}}class I{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,s=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||s(t.getRootNode().host):null){return s(t)}handleComponentTagRename(e,t){const s=t.toLowerCase();e.tagName.toLowerCase()!==s&&e.setAttribute(s,!0)}elementMatch(e,t){const s=t.toLowerCase();return e.tagName.toLowerCase()===s||e.hasAttribute(s)}getSlotText(e,t){const s=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(s?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class F extends t{static get properties(){return{hidden:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0}}}hideAudible(e){return e?"true":"false"}}const E=new Map,L=(e,t={})=>{const s=t.responseParser||(e=>e.text());return E.has(e)||E.set(e,fetch(e).then(s)),E.get(e)};var $=e`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
57
+ `;class O extends F{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.onDark=!1,this.appearance="default"}static get properties(){return{...F.properties,onDark:{type:Boolean,reflect:!0},appearance:{type:String,reflect:!0},svg:{attribute:!1,reflect:!0}}}static get styles(){return $}async fetchIcon(e,t){let s="";return s="logos"===e?await L(`${this.uri}/${e}/${t}.svg`):await L(`${this.uri}/icons/${e}/${t}.svg`),(new DOMParser).parseFromString(s,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const e=await this.fetchIcon(this.category,this.name);if(e)this.svg=e;else if(!e){const e=this.name?.startsWith("tail-")?'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" style="min-width:100%;height:auto;fill:currentColor" viewBox="0 0 142 138" part="svg"><title id="tail-DEFAULT__title">Airplane tail default image with light gray color</title><path fill="url(#paint0_linear_9225_2069)" fill-rule="evenodd" d="M124.093 14.665a3.26 3.26 0 0 1 3.208 3.829L101.097 119.85c-.47 1.087-2.211 3.398-5.692 3.471l-.106.001-80.65.013A659230 659230 0 0 1 99.08 17.412c1.214-1.497 3.275-2.722 5.372-2.747z" clip-rule="evenodd"/><defs><linearGradient id="paint0_linear_9225_2069" x1="114.823" x2="60.061" y1="14.665" y2="123.335" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#707984"/><stop offset=".5" stop-color="#646E7B"/></linearGradient></defs></svg>':'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';this.svg=(new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}}}catch(e){this.svg=void 0}}}e`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
58
58
  `;var D=e`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
59
59
  `,W=e`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
60
- `;class G extends O{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new I}static get properties(){return{...O.properties,ariaHidden:{type:String,reflect:!0},category:{type:String,reflect:!0},customColor:{type:Boolean,reflect:!0},customSvg:{type:Boolean},label:{type:Boolean,reflect:!0},name:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}static get styles(){return[O.styles,D,L,W]}static register(e="auro-icon"){I.prototype.registerComponent(e,G)}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon")}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg")}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const e=this.svg.querySelector("desc");e&&(e.remove(),this.svg.removeAttribute("aria-labelledby"))}}render(){const e={labelWrapper:!0,util_displayHiddenVisually:!this.label};return s`
60
+ `;class G extends O{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new I}static get properties(){return{...O.properties,ariaHidden:{type:String,reflect:!0},category:{type:String,reflect:!0},customColor:{type:Boolean,reflect:!0},customSvg:{type:Boolean},label:{type:Boolean,reflect:!0},name:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}static get styles(){return[O.styles,D,$,W]}static register(e="auro-icon"){I.prototype.registerComponent(e,G)}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon")}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg")}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const e=this.svg.querySelector("desc");e&&(e.remove(),this.svg.removeAttribute("aria-labelledby"))}}render(){const e={labelWrapper:!0,util_displayHiddenVisually:!this.label};return s`
61
61
  <div class="componentWrapper">
62
62
  <div
63
63
  class="${i({svgWrapper:!0})}"
@@ -78,7 +78,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as a,lit
78
78
  `}}var X='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error-stroke__desc" class="ico_squareLarge" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error-stroke__desc">triangle with exclamation mark.</desc><path d="M12 15.34c-.41 0-.75-.34-.75-.75V9.33c0-.41.34-.75.75-.75s.75.34.75.75v5.26c0 .41-.34.75-.75.75m.87 1.62c0-.48-.39-.88-.88-.88s-.88.39-.88.88.39.88.88.88.88-.39.88-.88M11.98 4.5 3.5 18.97h16.99zm0-1.5c.5 0 1 .25 1.29.74l8.51 14.47c.59 1-.13 2.26-1.29 2.26H3.5c-1.16 0-1.88-1.26-1.29-2.26l8.48-14.47c.29-.49.79-.74 1.29-.74"/></svg>',j='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="information-stroke__desc" class="ico_squareLarge" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="information-stroke__desc">Important information indicator.</desc><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17m0 5.75a.75.75 0 0 1 .743.648l.007.102v6.25a.75.75 0 0 1-1.493.102l-.007-.102V10a.75.75 0 0 1 .75-.75M12 7a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5"/></svg>',P='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" class="ico_squareLarge" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17m-1.524 10.416 4.971-5.423a.75.75 0 0 1 1.175.927l-.07.087-5.5 6a.75.75 0 0 1-.996.098l-.086-.075-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073zl4.971-5.423z"/></svg>',V='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="x-lg__desc" class="ico_squareLarge" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="x-lg__desc">a large x</desc><path fill-rule="evenodd" d="M16.51 17.26q-.255 0-.45-.15l-.09-.08-3.96-3.96-3.98 3.98-.1.08a.76.76 0 0 1-.43.14.75.75 0 0 1-.6-1.2l.08-.09 3.96-3.96-3.98-3.98-.08-.1a.746.746 0 0 1 .61-1.18q.255 0 .45.15l.1.08L12 10.95l3.98-3.98.1-.08a.76.76 0 0 1 .43-.14.75.75 0 0 1 .6 1.2l-.08.1-3.96 3.96 3.98 3.98.08.1a.746.746 0 0 1-.61 1.18z" clip-rule="evenodd"/></svg>',J=e`: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)}
79
79
  `,K=e`.body-default{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-default-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{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-default-emphasized-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{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-lg-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{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-lg-emphasized-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{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-sm-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{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-sm-emphasized-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{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-xs-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{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-xs-emphasized-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-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-variant-ligatures:none;font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{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-emphasized-font-size, .625rem);font-variant-ligatures:none;font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;font-weight:var(--wcss-heading-xs-weight, 300);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-variant-ligatures:none;font-weight:var(--wcss-heading-2xs-weight, 300);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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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-variant-ligatures:none;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 (width >= 576px){: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%}
80
80
  `,Q=e`: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)}
81
- `;class Y extends t{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.closeDom=(new DOMParser).parseFromString(V,"text/html"),this.closeSvg=this.closeDom.body.firstChild,this.closeSvg.setAttribute("slot","svg"),this.successDom=(new DOMParser).parseFromString(P,"text/html"),this.successSvg=this.successDom.body.firstChild,this.successSvg.setAttribute("slot","svg"),this.errorDom=(new DOMParser).parseFromString(X,"text/html"),this.errorSvg=this.errorDom.body.firstChild,this.errorSvg.setAttribute("slot","svg"),this.infoDom=(new DOMParser).parseFromString(j,"text/html"),this.infoSvg=this.infoDom.body.firstChild,this.infoSvg.setAttribute("slot","svg");const e=new l;this.buttonTag=e.generateTag("auro-button","12.3.2",U),this.iconTag=e.generateTag("auro-icon","9.2.0",G),this.runtimeUtils=new c,this.fadeOutTimer=void 0,this.closeTimer=void 0,this._isStandalone=!1}static get properties(){return{...t.properties,disableAutoHide:{type:Boolean,reflect:!0,attribute:"disableautohide"},noIcon:{type:Boolean,reflect:!0,attribute:"noicon"},timeTilHide:{type:Number,reflect:!0,attribute:"timetilhide"},trigger:{type:String,reflect:!0},triggerElement:{type:Object,attribute:!1},variant:{type:String,reflect:!0},visible:{type:Boolean,reflect:!0}}}static get styles(){return[K,J,Q]}static register(e="auro-toast"){c.prototype.registerComponent(e,Y)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-toast")}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer)}_returnFocus(){const e=(this.trigger?document.getElementById(this.trigger):null)??this.triggerElement;e&&e.focus()}clickToClose(){this._returnFocus(),clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.closeToast()}fadeOutToast(){if(!this.disableAutoHide&&this.visible){const e=this.shadowRoot.querySelector(".toastContainer");e&&e.classList.add("hidden"),clearTimeout(this.closeTimer),this.closeTimer=setTimeout(()=>{this.closeToast()},300)}}closeToast(){this.visible&&(clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.visible=!1,this.dispatchEvent(new CustomEvent("onToastClose",{bubbles:!0,composed:!0,detail:this})),this.dispatchEvent(new CustomEvent("toast-close",{bubbles:!0,composed:!0,detail:{visible:!1}})))}setOnClick(){window.innerWidth<767&&(this.onclick=e=>{const t=this.shadowRoot?.querySelector('[part="close-button"]');t&&e.composedPath().includes(t)||this.fadeOutToast()})}getVariantIcon(){const e={success:this.successSvg,error:this.errorSvg,default:this.infoSvg};return e[this.variant]||e.default}connectedCallback(){super.connectedCallback(),this.setOnClick(),this._scheduleAutoHide();const e=new CustomEvent("toast-request-announce",{bubbles:!0,cancelable:!0,composed:!0}),t=this.dispatchEvent(e);this._isStandalone=t&&!this._hasAncestorLiveRegion(),this._syncStandaloneRole()}_syncStandaloneRole(){this._isStandalone?this.setAttribute("role","error"===this.variant?"alert":"status"):this.removeAttribute("role")}_hasAncestorLiveRegion(){let e=this.parentElement;for(;e;){if(["polite","assertive"].includes(e.getAttribute?.("aria-live"))||["alert","status","log"].includes(e.getAttribute?.("role")))return!0;e=e.parentElement??e.getRootNode()?.host??null}return!1}updated(e){e.has("visible")&&this.handleSlotContent(),e.has("variant")&&(clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden"),this._syncStandaloneRole()),this._scheduleAutoHide()}_scheduleAutoHide(){this.visible&&!this.disableAutoHide&&"error"!==this.variant&&(clearTimeout(this.fadeOutTimer),this.fadeOutTimer=setTimeout(()=>{this.fadeOutToast()},this.timeTilHide||5e3))}handleSlotContent(){try{const e=this.querySelector('[slot="customSvg"]');if(e){const t=e.cloneNode(!0),s=this.shadowRoot.querySelector(".typeIcon");s&&(t.setAttribute("slot","svg"),s.appendChild(t))}}catch(e){console.error("handleSlotContent",e)}}render(){return r`
81
+ `;class Y extends t{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.closeDom=(new DOMParser).parseFromString(V,"text/html"),this.closeSvg=this.closeDom.body.firstChild,this.closeSvg.setAttribute("slot","svg"),this.successDom=(new DOMParser).parseFromString(P,"text/html"),this.successSvg=this.successDom.body.firstChild,this.successSvg.setAttribute("slot","svg"),this.errorDom=(new DOMParser).parseFromString(X,"text/html"),this.errorSvg=this.errorDom.body.firstChild,this.errorSvg.setAttribute("slot","svg"),this.infoDom=(new DOMParser).parseFromString(j,"text/html"),this.infoSvg=this.infoDom.body.firstChild,this.infoSvg.setAttribute("slot","svg");const e=new l;this.buttonTag=e.generateTag("auro-button","12.3.2",U),this.iconTag=e.generateTag("auro-icon","9.2.0",G),this.runtimeUtils=new c,this.fadeOutTimer=void 0,this.closeTimer=void 0,this._isStandalone=!1}static get properties(){return{...t.properties,disableAutoHide:{type:Boolean,reflect:!0,attribute:"disableautohide"},noIcon:{type:Boolean,reflect:!0,attribute:"noicon"},timeTilHide:{type:Number,reflect:!0,attribute:"timetilhide"},trigger:{type:String,reflect:!0},triggerElement:{type:Object,attribute:!1},variant:{type:String,reflect:!0},visible:{type:Boolean,reflect:!0}}}static get styles(){return[K,J,Q]}static register(e="auro-toast"){c.prototype.registerComponent(e,Y)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-toast")}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer)}_returnFocus(){const e=(this.trigger?document.getElementById(this.trigger):null)??this.triggerElement;e&&e.focus()}clickToClose(){this._returnFocus(),clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.closeToast()}fadeOutToast(){if(!this.disableAutoHide&&this.visible){const e=this.shadowRoot.querySelector(".toastContainer");e&&e.classList.add("hidden"),clearTimeout(this.closeTimer),this.closeTimer=setTimeout(()=>{this.closeToast()},300)}}closeToast(){this.visible&&(clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.visible=!1,this.dispatchEvent(new CustomEvent("onToastClose",{bubbles:!0,composed:!0,detail:this})),this.dispatchEvent(new CustomEvent("toast-close",{bubbles:!0,composed:!0,detail:{visible:!1,id:this.id}})))}setOnClick(){window.innerWidth<767&&(this.onclick=e=>{const t=this.shadowRoot?.querySelector('[part="close-button"]');t&&e.composedPath().includes(t)||this.fadeOutToast()})}getVariantIcon(){const e={success:this.successSvg,error:this.errorSvg,default:this.infoSvg};return e[this.variant]||e.default}connectedCallback(){super.connectedCallback(),this.setOnClick(),this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden"),this._scheduleAutoHide();const e=new CustomEvent("toast-request-announce",{bubbles:!0,cancelable:!0,composed:!0}),t=this.dispatchEvent(e);this._isStandalone=t&&!this._hasAncestorLiveRegion(),this._syncStandaloneRole()}_syncStandaloneRole(){this._isStandalone?this.setAttribute("role","error"===this.variant?"alert":"status"):this.removeAttribute("role")}_hasAncestorLiveRegion(){let e=this.parentElement;for(;e;){if(["polite","assertive"].includes(e.getAttribute?.("aria-live"))||["alert","status","log"].includes(e.getAttribute?.("role")))return!0;e=e.parentElement??e.getRootNode()?.host??null}return!1}updated(e){e.has("visible")&&(this.handleSlotContent(),this.visible&&(clearTimeout(this.closeTimer),this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden"))),e.has("variant")&&(clearTimeout(this.fadeOutTimer),clearTimeout(this.closeTimer),this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden"),this._syncStandaloneRole()),this._scheduleAutoHide()}_scheduleAutoHide(){clearTimeout(this.fadeOutTimer),this.isConnected&&this.visible&&!this.disableAutoHide&&"error"!==this.variant&&(this.fadeOutTimer=setTimeout(()=>{this.fadeOutToast()},this.timeTilHide||5e3))}handleSlotContent(){try{const e=this.querySelector('[slot="customSvg"]');if(e){const t=e.cloneNode(!0),s=this.shadowRoot.querySelector(".typeIcon");s&&(t.setAttribute("slot","svg"),s.appendChild(t))}}catch(e){console.error("handleSlotContent",e)}}render(){return r`
82
82
  ${this.visible?r`
83
83
  <div class="toastContainer">
84
84
  ${this.noIcon?void 0:r`
package/dist/index.d.ts CHANGED
@@ -108,7 +108,7 @@ Use the trigger attribute instead if you prefer a declarative approach. */
108
108
  "triggerElement"?: AuroToast['triggerElement'];
109
109
 
110
110
  /** Notifies that the toast has been closed */
111
- "ontoast-close"?: (e: CustomEvent<{ visible: boolean }>) => void;
111
+ "ontoast-close"?: (e: CustomEvent<{ visible: boolean, id: string }>) => void;
112
112
  /** @deprecated Use `toast-close` event instead. - **Deprecated**, use `toast-close` event instead. */
113
113
  "ononToastClose"?: (e: CustomEvent<Object>) => void;
114
114
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{A as AuroToast,a as AuroToaster}from"./auro-toaster-BghWbuzd.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
1
+ export{A as AuroToast,a as AuroToaster}from"./auro-toaster-B1fChnda.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
@@ -1 +1 @@
1
- import{A as i,a as t}from"./auro-toaster-BghWbuzd.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register(),t.register();
1
+ import{A as i,a as t}from"./auro-toaster-B1fChnda.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register(),t.register();
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "================================================================================"
8
8
  ],
9
9
  "name": "@aurodesignsystem-dev/auro-toast",
10
- "version": "0.0.0-pr156.0",
10
+ "version": "0.0.0-pr156.10",
11
11
  "description": "auro-toast HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",
@@ -84,13 +84,11 @@
84
84
  "files": [
85
85
  "dist/**/*",
86
86
  "demo/**/*",
87
- "src/**/*",
88
87
  "custom-elements.json",
89
88
  "CHANGELOG.md",
90
89
  "README.md",
91
90
  "LICENSE",
92
91
  "NOTICE"
93
92
  ],
94
- "custom-elements": "custom-elements.json",
95
93
  "customElements": "custom-elements.json"
96
94
  }
package/src/auro-toast.js DELETED
@@ -1,538 +0,0 @@
1
- // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- /* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
7
- import { LitElement } from "lit";
8
- import { html } from "lit/static-html.js";
9
-
10
- import { AuroDependencyVersioning } from "@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs";
11
- import AuroLibraryRuntimeUtils from "@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs";
12
- import { AuroButton } from "@aurodesignsystem/auro-button/class";
13
- import { AuroIcon } from "@aurodesignsystem/auro-icon/class";
14
-
15
- // Icons
16
- import errorIcon from "@alaskaairux/icons/dist/icons/alert/error-stroke.mjs";
17
- import infoIcon from "@alaskaairux/icons/dist/icons/alert/information-stroke.mjs";
18
- import successIcon from "@alaskaairux/icons/dist/icons/interface/check-stroke.mjs";
19
- import closeIcon from "@alaskaairux/icons/dist/icons/interface/x-lg.mjs";
20
-
21
- import buttonVersion from "./buttonVersion.js";
22
- import iconVersion from "./iconVersion.js";
23
-
24
- import colorCss from "./styles/color.scss";
25
- import styleCss from "./styles/style.scss";
26
- import tokensCss from "./styles/tokens.scss";
27
-
28
- const DEFAULT_TIME_TIL_FADE_OUT = 5000;
29
- const FADE_OUT_DURATION = 300;
30
-
31
- // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
32
- /**
33
- * The `auro-toast` element provides users a way to display short, temporary messages.
34
- * @customElement auro-toast
35
- *
36
- * @csspart type-icon - Apply css to the toast type icon
37
- * @csspart close-button - Apply css to the toast close button
38
- * @fires onToastClose - **Deprecated**, use `toast-close` event instead.
39
- * @event toast-close - Notifies that the toast has been closed
40
- */
41
-
42
- // build the component class
43
- export class AuroToast extends LitElement {
44
- constructor() {
45
- super();
46
-
47
- this._initializeDefaults();
48
- }
49
-
50
- _initializeDefaults() {
51
- /**
52
- * @private
53
- */
54
- this.closeDom = new DOMParser().parseFromString(closeIcon.svg, "text/html");
55
-
56
- /**
57
- * @private
58
- */
59
- this.closeSvg = this.closeDom.body.firstChild;
60
- this.closeSvg.setAttribute("slot", "svg");
61
-
62
- /**
63
- * @private
64
- */
65
- this.successDom = new DOMParser().parseFromString(
66
- successIcon.svg,
67
- "text/html",
68
- );
69
-
70
- /**
71
- * @private
72
- */
73
- this.successSvg = this.successDom.body.firstChild;
74
-
75
- this.successSvg.setAttribute("slot", "svg");
76
-
77
- /**
78
- * @private
79
- */
80
- this.errorDom = new DOMParser().parseFromString(errorIcon.svg, "text/html");
81
-
82
- /**
83
- * @private
84
- */
85
- this.errorSvg = this.errorDom.body.firstChild;
86
- this.errorSvg.setAttribute("slot", "svg");
87
-
88
- /**
89
- * @private
90
- */
91
- this.infoDom = new DOMParser().parseFromString(infoIcon.svg, "text/html");
92
-
93
- /**
94
- * @private
95
- */
96
- this.infoSvg = this.infoDom.body.firstChild;
97
- this.infoSvg.setAttribute("slot", "svg");
98
-
99
- const versioning = new AuroDependencyVersioning();
100
-
101
- /**
102
- * @private
103
- */
104
- this.buttonTag = versioning.generateTag(
105
- "auro-button",
106
- buttonVersion,
107
- AuroButton,
108
- );
109
-
110
- /**
111
- * @private
112
- */
113
- this.iconTag = versioning.generateTag("auro-icon", iconVersion, AuroIcon);
114
-
115
- /**
116
- * @private
117
- */
118
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
119
-
120
- /**
121
- * @private
122
- */
123
- this.fadeOutTimer = undefined;
124
-
125
- /**
126
- * @private
127
- */
128
- this.closeTimer = undefined;
129
-
130
- /**
131
- * True when the toast is not inside an auro-toaster and must manage its
132
- * own live region announcement. Set once in connectedCallback.
133
- * Default -- assumes toast is inside toaster.
134
- * @private
135
- */
136
- this._isStandalone = false;
137
- }
138
-
139
- // This function is to define props used within the scope of this component
140
- // Be sure to review https://lit.dev/docs/components/properties/
141
- // to understand how to use reflected attributes with your property settings.
142
- static get properties() {
143
- return {
144
- ...LitElement.properties,
145
-
146
- /**
147
- * Prevents the toast from auto-hiding on the default time.
148
- */
149
- disableAutoHide: {
150
- type: Boolean,
151
- reflect: true,
152
- attribute: "disableautohide",
153
- },
154
-
155
- /**
156
- * Removes icon from the toast UI.
157
- */
158
- noIcon: {
159
- type: Boolean,
160
- reflect: true,
161
- attribute: "noicon",
162
- },
163
-
164
- /**
165
- * Sets the time in milliseconds until the toast hides.
166
- */
167
- timeTilHide: {
168
- type: Number,
169
- reflect: true,
170
- attribute: "timetilhide",
171
- },
172
-
173
- /**
174
- * The id of the element that triggered the toast.
175
- * When the toast is manually closed, focus will return to this element.
176
- * Takes precedence over the triggerElement property if both are set.
177
- */
178
- trigger: {
179
- type: String,
180
- reflect: true,
181
- },
182
-
183
- /**
184
- * A direct reference to the element that triggered the toast.
185
- * When the toast is manually closed, focus will return to this element.
186
- * Use the trigger attribute instead if you prefer a declarative approach.
187
- * @type {HTMLElement}
188
- */
189
- triggerElement: {
190
- type: Object,
191
- attribute: false,
192
- },
193
-
194
- /**
195
- * Component will render visually based on which variant value is set.
196
- * @type {'error' | 'success' | 'custom'}
197
- */
198
- variant: {
199
- type: String,
200
- reflect: true,
201
- },
202
-
203
- /**
204
- * Sets state of toast to visible
205
- */
206
- visible: {
207
- type: Boolean,
208
- reflect: true,
209
- }
210
- };
211
- }
212
-
213
- static get styles() {
214
- return [styleCss, colorCss, tokensCss];
215
- }
216
-
217
- /**
218
- * This will register this element with the browser.
219
- * @param {string} [name="auro-toast"] - The name of the element that you want to register.
220
- *
221
- * @example
222
- * AuroToast.register("custom-toast") // this will register this element to <custom-toast/>
223
- *
224
- */
225
- static register(name = "auro-toast") {
226
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroToast);
227
- }
228
-
229
- firstUpdated() {
230
- // Add the tag name as an attribute if it is different than the component name
231
- this.runtimeUtils.handleComponentTagRename(this, "auro-toast");
232
- }
233
-
234
- disconnectedCallback() {
235
- super.disconnectedCallback();
236
- clearTimeout(this.fadeOutTimer);
237
- clearTimeout(this.closeTimer);
238
- }
239
-
240
- /**
241
- * Returns focus to the trigger element when the toast is manually closed.
242
- * Not called on auto-dismiss — moving focus during auto-dismiss would
243
- * interrupt the AT user's current position in the page.
244
- * @private
245
- * @returns {void}
246
- */
247
- _returnFocus() {
248
- const target = (this.trigger ? document.getElementById(this.trigger) : null) ??
249
- this.triggerElement;
250
-
251
- if (target) {
252
- target.focus();
253
- }
254
- }
255
-
256
- /**
257
- * @private
258
- * @returns {void}
259
- */
260
- clickToClose() {
261
- this._returnFocus();
262
- clearTimeout(this.fadeOutTimer);
263
- clearTimeout(this.closeTimer);
264
- this.closeToast();
265
- }
266
-
267
- /**
268
- * @private
269
- * @returns {void}
270
- */
271
- fadeOutToast() {
272
- if (!this.disableAutoHide && this.visible) {
273
- const toastContainer = this.shadowRoot.querySelector(".toastContainer");
274
- if (toastContainer) {
275
- toastContainer.classList.add("hidden");
276
- }
277
-
278
- clearTimeout(this.closeTimer);
279
- this.closeTimer = setTimeout(() => {
280
- this.closeToast();
281
- }, FADE_OUT_DURATION);
282
- }
283
- }
284
-
285
- /**
286
- * @private
287
- * @returns {void}
288
- */
289
- closeToast() {
290
- // Guards against re-entry -- e.g. a close-button click on mobile widths
291
- // both closes the toast directly and bubbles to the host's own onclick
292
- // handler (see setOnClick()), which would otherwise schedule a second,
293
- // untracked close via fadeOutToast().
294
- if (!this.visible) {
295
- return;
296
- }
297
-
298
- clearTimeout(this.fadeOutTimer);
299
- clearTimeout(this.closeTimer);
300
- this.visible = false;
301
-
302
- /**
303
- * Emits closed toast event.
304
- *
305
- * @deprecated Use `toast-close` event instead.
306
- * @event onToastClose
307
- * @type {Object}
308
- */
309
- this.dispatchEvent(
310
- new CustomEvent("onToastClose", {
311
- bubbles: true,
312
- composed: true,
313
- detail: this, // unchanged for backwards compatibility; use `toast-close` for the new `{ visible }` shape
314
- }),
315
- );
316
-
317
- /**
318
- * Emits closed toast event.
319
- *
320
- * @event toast-close
321
- * @type {{ visible: boolean }}
322
- */
323
- this.dispatchEvent(
324
- new CustomEvent("toast-close", {
325
- bubbles: true,
326
- composed: true,
327
- detail: { visible: false },
328
- }),
329
- );
330
- }
331
-
332
- /**
333
- * For mobile, set the onclick function so the toast can be dismissed if it is tapped on anywhere inside the toast.
334
- * Ignores clicks on the close button -- clickToClose() already handles those, and re-running
335
- * fadeOutToast() for the same click is what caused a double close (see AB#1643472).
336
- * @private
337
- * @returns {void}
338
- */
339
- setOnClick() {
340
- const mobileBreakPoint = 767;
341
- if (window.innerWidth < mobileBreakPoint) {
342
- this.onclick = (event) => {
343
- const closeButton = this.shadowRoot?.querySelector('[part="close-button"]');
344
- if (closeButton && event.composedPath().includes(closeButton)) {
345
- return;
346
- }
347
- this.fadeOutToast();
348
- };
349
- }
350
- }
351
-
352
- /**
353
- * Determines which type icon to render based on the variant prop.
354
- * @private
355
- * @returns {HTMLElement} - The icon element to render.
356
- */
357
- getVariantIcon() {
358
- const VARIANT_ICONS = {
359
- success: this.successSvg,
360
- error: this.errorSvg,
361
- default: this.infoSvg,
362
- };
363
-
364
- return VARIANT_ICONS[this.variant] || VARIANT_ICONS.default;
365
- }
366
-
367
- connectedCallback() {
368
- super.connectedCallback();
369
- this.setOnClick();
370
-
371
- // Re-arm auto-hide on reconnect (e.g. re-parenting the node elsewhere in
372
- // the DOM) -- updated() does not re-run just because connectedCallback()
373
- // fired again, since no reactive property changed as a result.
374
- this._scheduleAutoHide();
375
-
376
- // Dispatch a cancelable event so auro-toaster can signal it will handle
377
- // announcements. If nothing cancels the event the toast is standalone and
378
- // must register its own live region on the host element — before
379
- // any visibility change — so the AT has already observed it as a live
380
- // region by the time content is rendered into the shadow DOM.
381
- const event = new CustomEvent('toast-request-announce', {
382
- bubbles: true,
383
- cancelable: true,
384
- composed: true,
385
- });
386
-
387
- // NOTE — reverse logic:
388
- // dispatchEvent() returns TRUE when nobody called preventDefault(), which
389
- // means no auro-toaster was listening — the toast is standalone and must
390
- // own its live region. It returns FALSE when a toaster cancelled the event,
391
- // signalling that the toaster's aria-live region will handle announcements.
392
- const eventNotPrevented = this.dispatchEvent(event);
393
-
394
- // Secondary check: even if no toaster answered the event, the toast may
395
- // be inside another element that already owns a live region (e.g. a plain
396
- // div[aria-live="polite"]). Setting a role on the host in that case would
397
- // create a nested live region. aria-live="off" is intentionally excluded
398
- // — it disables live region behavior and is not an active announcer.
399
- this._isStandalone = eventNotPrevented && !this._hasAncestorLiveRegion();
400
-
401
- this._syncStandaloneRole();
402
- }
403
-
404
- /**
405
- * Sets or removes the live-region role on the host depending on whether
406
- * the toast is standalone. Extracted so connectedCallback and updated()
407
- * stay in sync without duplicating the logic.
408
- * @private
409
- * @returns {void}
410
- */
411
- _syncStandaloneRole() {
412
- if (this._isStandalone) {
413
- this.setAttribute('role', this.variant === 'error' ? 'alert' : 'status');
414
- } else {
415
- this.removeAttribute('role');
416
- }
417
- }
418
-
419
- /**
420
- * Walks the DOM ancestors (crossing shadow boundaries) looking for any
421
- * active live region — either an aria-live="polite/assertive" attribute or
422
- * an implicit live region role (alert, status, log).
423
- * aria-live="off" is not considered active and is intentionally ignored.
424
- * @private
425
- * @returns {boolean}
426
- */
427
- _hasAncestorLiveRegion() {
428
- let node = this.parentElement;
429
- while (node) {
430
- if (
431
- ['polite', 'assertive'].includes(node.getAttribute?.('aria-live')) ||
432
- ['alert', 'status', 'log'].includes(node.getAttribute?.('role'))
433
- ) {
434
- return true;
435
- }
436
- // Traverse up, crossing shadow DOM boundaries if needed
437
- node = node.parentElement ?? node.getRootNode()?.host ?? null;
438
- }
439
- return false;
440
- }
441
-
442
- updated(changedProperties) {
443
- if (changedProperties.has("visible")) {
444
- this.handleSlotContent();
445
- }
446
-
447
- // Keep the standalone role in sync if variant changes after connection.
448
- if (changedProperties.has("variant")) {
449
- clearTimeout(this.fadeOutTimer);
450
- clearTimeout(this.closeTimer);
451
-
452
- // Cancelling a pending close mid-fade must also undo fadeOutToast()'s
453
- // visual state, otherwise the toast is left invisible (via the
454
- // "hidden" class) but still marked visible, with no close ever fired.
455
- this.shadowRoot?.querySelector(".toastContainer")?.classList.remove("hidden");
456
-
457
- this._syncStandaloneRole();
458
- }
459
-
460
- this._scheduleAutoHide();
461
- }
462
-
463
- /**
464
- * (Re-)schedules the auto-hide timer based on current visible/disableAutoHide/
465
- * variant/timeTilHide values. Called from updated() on property changes and
466
- * from connectedCallback() to re-arm auto-hide after a reconnect (e.g. the
467
- * node is re-parented elsewhere in the DOM), since updated() does not run
468
- * again on reconnect alone.
469
- * @private
470
- * @returns {void}
471
- */
472
- _scheduleAutoHide() {
473
- // do not auto dismiss for error toasts or if disableAutoHide is set
474
- if (this.visible && !this.disableAutoHide && this.variant !== "error") {
475
- clearTimeout(this.fadeOutTimer);
476
- this.fadeOutTimer = setTimeout(() => {
477
- this.fadeOutToast();
478
- }, this.timeTilHide || DEFAULT_TIME_TIL_FADE_OUT);
479
- }
480
- }
481
-
482
- /**
483
- * Mirrors any defined custom type svg into the correct place in the template.
484
- * @private
485
- * @returns {void}
486
- */
487
- handleSlotContent() {
488
- try {
489
- const customSvg = this.querySelector(`[slot="customSvg"]`);
490
-
491
- if (customSvg) {
492
- const iconSvg = customSvg.cloneNode(true);
493
- const typeIcon = this.shadowRoot.querySelector(".typeIcon");
494
-
495
- if (typeIcon) {
496
- iconSvg.setAttribute("slot", "svg");
497
- typeIcon.appendChild(iconSvg);
498
- }
499
- }
500
- } catch (error) {
501
- console.error("handleSlotContent", error); // eslint-disable-line no-console
502
- }
503
- }
504
-
505
- render() {
506
- return html`
507
- ${this.visible
508
- ? html`
509
- <div class="toastContainer">
510
- ${this.noIcon
511
- ? undefined
512
- : html`
513
- <${this.iconTag} customColor customSvg class="typeIcon body-default" part="type-icon">
514
- ${this.variant === "custom" ? undefined : html`${this.getVariantIcon()}`}
515
- </${this.iconTag}>
516
- `
517
- }
518
- <div class="message body-default"><slot></slot></div>
519
- <${this.buttonTag}
520
- variant="flat"
521
- shape="circle"
522
- size="xs"
523
- appearance=${this.variant !== "error" && this.variant !== "success" ? "inverse" : this.appearance}
524
- @click="${this.clickToClose}"
525
- part="close-button"
526
- class="closeButton">
527
- <${this.iconTag} customColor customSvg>
528
- ${this.closeSvg}
529
- </${this.iconTag}>
530
- <span slot="ariaLabel">Close this notification.</span>
531
- </${this.buttonTag}>
532
- </div>
533
- `
534
- : undefined
535
- }
536
- `;
537
- }
538
- }
@@ -1,175 +0,0 @@
1
- // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- import { html, LitElement } from "lit";
7
- import AuroLibraryRuntimeUtils from "@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs";
8
- import styleCss from "./styles/style-toaster.scss";
9
-
10
- export class AuroToaster extends LitElement {
11
- static get styles() {
12
- return [styleCss];
13
- }
14
-
15
- constructor() {
16
- super();
17
- // Initialised in the constructor so they survive disconnect/reconnect.
18
- // If these were in connectedCallback, a reconnected toaster would forget
19
- // which error toasts it had already announced and could re-announce them.
20
- this._assertiveResetTimer = undefined;
21
- this._announcedErrorToasts = new WeakSet();
22
-
23
- // Cancel the standalone live region request from any child toast — the
24
- // toaster's own aria-live region handles all announcements.
25
- // Calling preventDefault() causes dispatchEvent() on the toast to return
26
- // false, which the toast reads as "a toaster is present — do not set a
27
- // standalone live region role on the host element."
28
- this._onToastRequestAnnounce = (e) => e.preventDefault();
29
- }
30
-
31
- /**
32
- * This will register this element with the browser.
33
- * @param {string} [name="auro-toaster"] - The name of the element that you want to register to.
34
- *
35
- * @example
36
- * AuroToaster.register("custom-toaster") // this will register this element to <custom-toaster/>
37
- *
38
- */
39
- static register(name = "auro-toaster") {
40
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroToaster);
41
- }
42
-
43
- connectedCallback() {
44
- super.connectedCallback();
45
- this.addEventListener('toast-request-announce', this._onToastRequestAnnounce);
46
-
47
- /**
48
- * @private
49
- *
50
- * Observes toast attribute changes to determine when we should temporarily
51
- * switch the live region from "polite" → "assertive".
52
- *
53
- * Supported trigger paths:
54
- * 1. Normal path:
55
- * - A toast becomes visible
56
- * - AND it is already an error toast
57
- * 2. Defensive fallback (unsupported but possible misuse):
58
- * - A visible toast has its variant changed to "error"
59
- *
60
- * Note:
61
- * Toasts are not intended to mutate while visible. This fallback exists
62
- * only to preserve accessibility behavior if that contract is violated.
63
- */
64
- this._observer = new MutationObserver((mutations) => {
65
- for (const mutation of mutations) {
66
- const target = mutation.target;
67
-
68
- // Only react to auro-toast elements (including versioned tags like
69
- // auro-toast_1_2_3). Explicitly ignore auro-toaster itself.
70
- if (!/^auro-toast(_|$)/u.test(target.localName ?? '')) continue;
71
-
72
- const isVisible = target.hasAttribute?.('visible');
73
- const isError = target.getAttribute?.('variant') === 'error';
74
-
75
- // ---------------------------------------------------------------------
76
- // Case 1: supported behavior
77
- // A toast becomes visible AND is already an error toast
78
- // ---------------------------------------------------------------------
79
- const becameVisible =
80
- mutation.attributeName === 'visible' &&
81
- isVisible &&
82
- isError;
83
-
84
- // ---------------------------------------------------------------------
85
- // Case 2: defensive fallback
86
- // A toast is already visible and its variant is changed to "error"
87
- // (unsupported usage pattern, but we handle it safely for a11y)
88
- // ---------------------------------------------------------------------
89
- const becameErrorWhileVisible =
90
- mutation.attributeName === 'variant' &&
91
- mutation.oldValue !== 'error' &&
92
- isVisible &&
93
- isError;
94
-
95
- if (becameVisible || becameErrorWhileVisible) {
96
- this._setAssertiveTemporarily();
97
- }
98
- }
99
- });
100
-
101
- this._observer.observe(this, {
102
- subtree: true,
103
-
104
- // REQUIRED: without this, attribute changes will not trigger the observer
105
- attributes: true,
106
-
107
- // We only care about these two attributes for performance and clarity
108
- attributeFilter: ['visible', 'variant'],
109
-
110
- // REQUIRED for detecting transitions (e.g. non-error → error)
111
- attributeOldValue: true,
112
- });
113
- }
114
-
115
- disconnectedCallback() {
116
- super.disconnectedCallback();
117
- this._observer?.disconnect();
118
- clearTimeout(this._assertiveResetTimer);
119
- this.removeEventListener('toast-request-announce', this._onToastRequestAnnounce);
120
-
121
- // Reset the live region to polite so a reconnected toaster does not
122
- // inherit a stale assertive state left behind by a cleared timer.
123
- const liveRegion = this.shadowRoot?.querySelector('[aria-live]');
124
- if (liveRegion) {
125
- liveRegion.setAttribute('aria-live', 'polite');
126
- }
127
- }
128
-
129
- /**
130
- * Temporarily sets the live region to assertive so the error toast
131
- * interrupts the screen reader, then resets to polite after 3 seconds.
132
- * This ensures subsequent polite toasts don't keep interrupting the user,
133
- * even if the error toast remains visible (errors are never auto-dismissed).
134
- * @private
135
- */
136
- _setAssertiveTemporarily() {
137
- const liveRegion = this.shadowRoot?.querySelector('[aria-live]');
138
- if (!liveRegion) return;
139
-
140
- clearTimeout(this._assertiveResetTimer);
141
- liveRegion.setAttribute('aria-live', 'assertive');
142
-
143
- this._assertiveResetTimer = setTimeout(() => {
144
- liveRegion.setAttribute('aria-live', 'polite');
145
- }, 3000);
146
- }
147
-
148
- render() {
149
- return html`
150
- <div class="toaster-wrapper" aria-live="polite" aria-atomic="false">
151
- <slot @slotchange="${this._onSlotChange}"></slot>
152
- </div>
153
- `;
154
- }
155
-
156
- /**
157
- * Handles slot changes — checks if a newly slotted error toast
158
- * is already visible at the time it is added to the toaster.
159
- * @private
160
- */
161
- _onSlotChange(e) {
162
- const newErrorToast = e.target.assignedElements({ flatten: true })
163
- .find(el =>
164
- /^auro-toast(_|$)/u.test(el.localName ?? '') &&
165
- el.getAttribute('variant') === 'error' &&
166
- el.hasAttribute('visible') &&
167
- !this._announcedErrorToasts.has(el)
168
- );
169
-
170
- if (newErrorToast) {
171
- this._announcedErrorToasts.add(newErrorToast);
172
- this._setAssertiveTemporarily();
173
- }
174
- }
175
- }
@@ -1 +0,0 @@
1
- export default "12.3.2";
@@ -1 +0,0 @@
1
- export default "9.2.0";
package/src/index.js DELETED
@@ -1,4 +0,0 @@
1
- import { AuroToast } from "./auro-toast.js";
2
- import { AuroToaster } from "./auro-toaster.js";
3
-
4
- export { AuroToast, AuroToaster };
package/src/registered.js DELETED
@@ -1,5 +0,0 @@
1
- import { AuroToast } from "./auro-toast.js";
2
- import { AuroToaster } from "./auro-toaster.js";
3
-
4
- AuroToast.register();
5
- AuroToaster.register();
@@ -1,34 +0,0 @@
1
- // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- // Import Auro tokens
7
- @use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
8
-
9
- :host([visible]) {
10
- background-color: var(--ds-auro-toast-container-color);
11
- color: var(--ds-auro-toast-text-color);
12
-
13
- .typeIcon {
14
- color: var(--ds-auro-toast-icon-color);
15
- }
16
-
17
- .closeButton {
18
- &:hover {
19
- background-color: var(--ds-auro-toast-close-button-hover-container-color);
20
- }
21
- }
22
- }
23
-
24
- :host([variant='error']) {
25
- --ds-auro-toast-container-color: var(--ds-basic-color-status-error-subtle, #{v.$ds-basic-color-status-error-subtle});
26
- --ds-auro-toast-icon-color: var(--ds-basic-color-status-error, #{v.$ds-basic-color-status-error});
27
- --ds-auro-toast-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
28
- }
29
-
30
- :host([variant='success']) {
31
- --ds-auro-toast-container-color: var(--ds-basic-color-status-success-subtle, #{v.$ds-basic-color-status-success-subtle});
32
- --ds-auro-toast-icon-color: var(--ds-basic-color-status-success, #{v.$ds-basic-color-status-success});
33
- --ds-auro-toast-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
34
- }
@@ -1,27 +0,0 @@
1
- // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- // Import Auro tokens
7
- @use "@aurodesignsystem/design-tokens/dist/legacy/auro-classic/SCSSVariables" as vac;
8
-
9
- // container styles - defines the look of the outer custom component
10
- .toaster-wrapper {
11
- position: fixed;
12
- z-index: var(--ds-depth-modal, vac.$ds-depth-modal);
13
- right: 2%;
14
- bottom: 2%;
15
- left: 2%;
16
- display: flex;
17
- flex-direction: column-reverse;
18
- align-items: flex-end;
19
- gap: var(--ds-size-200, vac.$ds-size-200);
20
- pointer-events: none;
21
-
22
- @media (width >= #{vac.$ds-grid-breakpoint-lg}) {
23
- right: 1%;
24
- left: unset;
25
- width: 100%;
26
- }
27
- }
@@ -1,61 +0,0 @@
1
- // Copyright (c) 2023 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- // Import Auro tokens
7
- @use "@aurodesignsystem/design-tokens/dist/legacy/auro-classic/SCSSVariables" as vac;
8
-
9
- @use '@aurodesignsystem/webcorestylesheets/dist/bundled/type/classes.alaska.min.css';
10
-
11
- // display: inherit keeps the host in the accessibility tree when not visible.
12
- // display: none removes it entirely from the accessibility tree —
13
- //
14
- // This is used to prevent visual artifacts from toasts that remain in the DOM
15
- // after hiding.
16
- :host {
17
- display: inherit;
18
- }
19
-
20
- :host([visible]) {
21
- display: inline-block;
22
- min-width: 100%;
23
- border-radius: var(--ds-size-100, vac.$ds-size-100);
24
- box-shadow: var(--ds-elevation-200, vac.$ds-elevation-200);
25
- pointer-events: auto;
26
-
27
- // Phones (< sm) keep the full-width sizing from the base rule above.
28
- // From the sm breakpoint up, use fixed pixel bounds so the toast is sized
29
- // consistently across tablet and desktop widths instead of shrinking to a
30
- // small fraction of the available space.
31
- @media (width >= #{vac.$ds-grid-breakpoint-sm}) {
32
- min-width: 200px;
33
- max-width: 500px;
34
- }
35
-
36
- .toastContainer {
37
- display: flex;
38
- flex-direction: row;
39
- align-items: flex-start;
40
- padding: var(--ds-size-200, vac.$ds-size-200) var(--ds-size-150, vac.$ds-size-150);
41
- gap: var(--ds-size-200, vac.$ds-size-200);
42
- }
43
-
44
- .hidden {
45
- opacity: 0;
46
- transition: visibility 0s 300ms, opacity 300ms ease-out;
47
- visibility: hidden;
48
- }
49
-
50
- [auro-icon] {
51
- --ds-auro-icon-size: var(--ds-size-300, #{vac.$ds-size-300});
52
- }
53
-
54
- .message {
55
- flex: 1;
56
- }
57
-
58
- .closeButton {
59
- border-radius: 50%;
60
- }
61
- }
@@ -1,8 +0,0 @@
1
- @use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
2
-
3
- :host {
4
- --ds-auro-toast-close-button-hover-container-color: var(--ds-advanced-color-button-tertiary-background-hover, #{v.$ds-advanced-color-button-tertiary-background-hover});
5
- --ds-auro-toast-container-color: var(--ds-advanced-color-shared-background-strong, #{v.$ds-advanced-color-shared-background-strong});
6
- --ds-auro-toast-icon-color: var(--ds-basic-color-texticon-inverse, #{v.$ds-basic-color-texticon-inverse});
7
- --ds-auro-toast-text-color: var(--ds-basic-color-texticon-inverse, #{v.$ds-basic-color-texticon-inverse});
8
- }