@aurodesignsystem-dev/auro-alert 0.0.0-pr104.4 → 0.0.0-pr105.0
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 +56 -42
- package/demo/api.md +140 -183
- package/demo/auro-alert.min.js +18 -63
- package/demo/index.html +1 -1
- package/demo/index.md +162 -9
- package/dist/auro-alert-DOBbqg8s.js +35 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +8 -10
- package/dist/auro-alert-C5hNY0oc.js +0 -35
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { css, LitElement, html as html$1 } from 'lit';
|
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
|
|
6
|
-
class l{registerComponent(
|
|
7
|
-
`;class h extends c{constructor(){super(),this.onDark=false
|
|
6
|
+
class l{registerComponent(t,r){customElements.get(t)||customElements.define(t,class extends r{});}closestElement(t,r=this,e=(r,o=r&&r.closest(t))=>r&&r!==document&&r!==window?o||e(r.getRootNode().host):null){return e(r)}handleComponentTagRename(t,r){const e=r.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,r){const e=r.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}class c extends LitElement{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const d=new Map,u=(t,r={})=>{const e=r.responseParser||(t=>t.text());return d.has(t)||d.set(t,fetch(t).then(e)),d.get(t)};var p=css`: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;line-height:1;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}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, .25rem);line-height:1.8}
|
|
7
|
+
`;class h extends c{constructor(){super(),this.onDark=false;}static get properties(){return {...c.properties,onDark:{type:Boolean,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return p}async fetchIcon(t,r){let e="";return e="logos"===t?await u(`${this.uri}/${t}/${r}.svg`):await u(`${this.uri}/icons/${t}/${r}.svg`),(new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString('<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>',"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}css`.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]){--ds-auro-alaska-color: #FFF}
|
|
8
8
|
`;var v=css`: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)}
|
|
9
|
-
`,m=css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1])
|
|
10
|
-
`;class
|
|
9
|
+
`,m=css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
|
|
10
|
+
`;class g extends h{constructor(){super(),this.variant=void 0,this.privateDefaults();}privateDefaults(){this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new l;}static get properties(){return {...h.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [h.styles,v,p,m]}static register(t="auro-icon"){l.prototype.registerComponent(t,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 t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return html$1`
|
|
11
11
|
<div class="componentWrapper">
|
|
12
12
|
<div
|
|
13
13
|
class="${classMap({svgWrapper:true})}"
|
|
@@ -21,17 +21,17 @@ class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
|
|
|
21
21
|
</span>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
-
<div class="${classMap(
|
|
24
|
+
<div class="${classMap(t)}">
|
|
25
25
|
<slot></slot>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
`}}class
|
|
29
|
-
`,
|
|
28
|
+
`}}class f{generateElementName(t,r){let e=t;return e+="-",e+=r.replace(/[.]/g,"_"),e}generateTag(e,o,a){const s=this.generateElementName(e,o),i=literal`${unsafeStatic(s)}`;return customElements.get(s)||customElements.define(s,class extends a{}),i}}class b{registerComponent(t,r){customElements.get(t)||customElements.define(t,class extends r{});}closestElement(t,r=this,e=(r,o=r&&r.closest(t))=>r&&r!==document&&r!==window?o||e(r.getRootNode().host):null){return e(r)}handleComponentTagRename(t,r){const e=r.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,r){const e=r.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}class y extends LitElement{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}var k=css`.alert{border-color:var(--ds-auro-alert-border-color);background-color:var(--ds-auro-alert-container-color);color:var(--ds-auro-alert-text-color)}[auro-icon]{color:var(--ds-auro-alert-icon-color)}:host([type=error]){--ds-auro-alert-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-alert-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([type=warning]){--ds-auro-alert-border-color: var(--ds-basic-color-status-warning, #fac200);--ds-auro-alert-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host([type=information]){--ds-auro-alert-border-color: var(--ds-basic-color-status-info, #01426a);--ds-auro-alert-icon-color: var(--ds-basic-color-status-info, #01426a)}:host([type=success]){--ds-auro-alert-border-color: var(--ds-basic-color-status-success, #447a1f);--ds-auro-alert-icon-color: var(--ds-basic-color-status-success, #447a1f)}
|
|
29
|
+
`,x=css`.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}.alert{display:flex;padding:var(--ds-size-100, .5rem);padding-right:var(--ds-size-200, 1rem);padding-left:var(--ds-size-150, .75rem);border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, .375rem);border-left-width:var(--ds-size-100, .5rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, .5rem)}.content{width:-webkit-fill-available}
|
|
30
30
|
`,w=css`:host{--ds-auro-alert-border-color: var(--ds-basic-color-status-default, #afb9c6);--ds-auro-alert-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-alert-icon-color: transparent;--ds-auro-alert-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
|
|
31
|
-
`;class
|
|
31
|
+
`;class D extends y{constructor(){super();const t=new f;this.iconTag=t.generateTag("auro-icon","9.0.0",g),this.runtimeUtils=new b;}static get properties(){return {...y.properties,noIcon:{type:Boolean},type:{type:String,reflect:true},role:{type:String,reflect:true},iconTag:{type:String}}}static get styles(){return [x,k,w]}static register(t="auro-alert"){b.prototype.registerComponent(t,D);}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-alert");}generateIconHtml(t,r){return this.noIcon?html``:html`<${this.iconTag} customColor category="${t}" name="${r}"></${this.iconTag}>`}render(){let t=html``;switch(this.type){case void 0:break;case "error":t=this.generateIconHtml("alert","error-stroke"),this.role="alert",this.typeStr="Error.";break;case "success":t=this.generateIconHtml("interface","check-stroke"),this.role="alert",this.typeStr="Success.";break;case "warning":t=this.generateIconHtml("alert","warning-stroke"),this.role="alert",this.typeStr="Warning.";break;case "information":t=this.generateIconHtml("alert","information-stroke"),this.typeStr="Informational notice.";}return html`
|
|
32
32
|
<div part="alert" class="alert"
|
|
33
33
|
aria-hidden="${this.hideAudible(this.hiddenAudible)}">
|
|
34
|
-
${
|
|
34
|
+
${t}
|
|
35
35
|
<div part="alert-content" class="content body-lg">
|
|
36
36
|
<span class="util_displayHiddenVisually">${this.typeStr}</span>
|
|
37
37
|
<slot></slot>
|
|
@@ -39,4 +39,4 @@ class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
|
|
|
39
39
|
</div>
|
|
40
40
|
`}}
|
|
41
41
|
|
|
42
|
-
export {
|
|
42
|
+
export { D as AuroAlert };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AuroAlert}from"./auro-alert-
|
|
1
|
+
export{A as AuroAlert}from"./auro-alert-DOBbqg8s.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
|
package/dist/registered.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i}from"./auro-alert-
|
|
1
|
+
import{A as i}from"./auro-alert-DOBbqg8s.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"================================================================================"
|
|
9
9
|
],
|
|
10
10
|
"name": "@aurodesignsystem-dev/auro-alert",
|
|
11
|
-
"version": "0.0.0-
|
|
11
|
+
"version": "0.0.0-pr105.0",
|
|
12
12
|
"description": "auro-alert HTML custom element",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"lit": "^3.
|
|
25
|
+
"lit": "^3.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@aurodesignsystem/auro-cli": "^3.
|
|
28
|
+
"@aurodesignsystem/auro-cli": "^3.0.3",
|
|
29
29
|
"@aurodesignsystem/auro-config": "^1.3.1",
|
|
30
|
-
"@aurodesignsystem/auro-icon": "
|
|
31
|
-
"@aurodesignsystem/auro-library": "^5.5.
|
|
32
|
-
"@aurodesignsystem/design-tokens": "^8.
|
|
33
|
-
"@aurodesignsystem/webcorestylesheets": "
|
|
30
|
+
"@aurodesignsystem/auro-icon": "9.0.0",
|
|
31
|
+
"@aurodesignsystem/auro-library": "^5.5.3",
|
|
32
|
+
"@aurodesignsystem/design-tokens": "^8.5.0",
|
|
33
|
+
"@aurodesignsystem/webcorestylesheets": "10.1.0",
|
|
34
34
|
"husky": "^9.1.7"
|
|
35
35
|
},
|
|
36
36
|
"browserslist": [
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
},
|
|
65
65
|
"exports": {
|
|
66
66
|
"./package.json": "./package.json",
|
|
67
|
-
"./custom-elements.json": "./custom-elements.json",
|
|
68
67
|
"./readme.md": "./README.md",
|
|
69
68
|
".": "./dist/registered.js",
|
|
70
69
|
"./demo/*.md": "./demo/*.md",
|
|
@@ -82,6 +81,5 @@
|
|
|
82
81
|
"README.md",
|
|
83
82
|
"LICENSE",
|
|
84
83
|
"NOTICE"
|
|
85
|
-
]
|
|
86
|
-
"customElements": "custom-elements.json"
|
|
84
|
+
]
|
|
87
85
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{unsafeStatic as e,literal as t,html as r}from"lit/static-html.js";import{css as a,html as o,LitElement as s}from"lit";import{classMap as i}from"lit/directives/class-map.js";import{ifDefined as n}from"lit/directives/if-defined.js";class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,r=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||r(t.getRootNode().host):null){return r(t)}handleComponentTagRename(e,t){const r=t.toLowerCase();e.tagName.toLowerCase()!==r&&e.setAttribute(r,!0)}elementMatch(e,t){const r=t.toLowerCase();return e.tagName.toLowerCase()===r||e.hasAttribute(r)}}class c extends s{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 d=new Map,u=(e,t={})=>{const r=t.responseParser||(e=>e.text());return d.has(e)||d.set(e,fetch(e).then(r)),d.get(e)};var p=a`: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}
|
|
2
|
-
`;class h extends c{constructor(){super(),this.onDark=!1,this.appearance="default"}static get properties(){return{...c.properties,onDark:{type:Boolean,reflect:!0},appearance:{type:String,reflect:!0},svg:{attribute:!1,reflect:!0}}}static get styles(){return p}async fetchIcon(e,t){let r="";return r="logos"===e?await u(`${this.uri}/${e}/${t}.svg`):await u(`${this.uri}/icons/${e}/${t}.svg`),(new DOMParser).parseFromString(r,"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=(new DOMParser).parseFromString('<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>',"text/html");this.svg=e.body.firstChild}}}catch(e){this.svg=void 0}}}a`.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}
|
|
3
|
-
`;var v=a`: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)}
|
|
4
|
-
`,m=a`: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)}
|
|
5
|
-
`;class f extends h{constructor(){super(),this.variant=void 0,this.privateDefaults()}privateDefaults(){this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new l}static get properties(){return{...h.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[h.styles,v,p,m]}static register(e="auro-icon"){l.prototype.registerComponent(e,f)}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 o`
|
|
6
|
-
<div class="componentWrapper">
|
|
7
|
-
<div
|
|
8
|
-
class="${i({svgWrapper:!0})}"
|
|
9
|
-
title="${n(this.title||void 0)}">
|
|
10
|
-
<span aria-hidden="${n(this.ariaHidden||!0)}" part="svg">
|
|
11
|
-
${this.customSvg?o`
|
|
12
|
-
<slot name="svg"></slot>
|
|
13
|
-
`:o`
|
|
14
|
-
${this.svg}
|
|
15
|
-
`}
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="${i(e)}" part="label">
|
|
20
|
-
<slot></slot>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
`}}class g{generateElementName(e,t){let r=e;return r+="-",r+=t.replace(/[.]/g,"_"),r}generateTag(r,a,o){const s=this.generateElementName(r,a),i=t`${e(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),i}}class b{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,r=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||r(t.getRootNode().host):null){return r(t)}handleComponentTagRename(e,t){const r=t.toLowerCase();e.tagName.toLowerCase()!==r&&e.setAttribute(r,!0)}elementMatch(e,t){const r=t.toLowerCase();return e.tagName.toLowerCase()===r||e.hasAttribute(r)}getSlotText(e,t){const r=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(r?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class y extends s{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"}}var x=a`.alert{border-color:var(--ds-auro-alert-border-color);background-color:var(--ds-auro-alert-container-color);color:var(--ds-auro-alert-text-color)}[auro-icon]{color:var(--ds-auro-alert-icon-color)}:host([type=error]){--ds-auro-alert-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-alert-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([type=warning]){--ds-auro-alert-border-color: var(--ds-basic-color-status-warning, #fac200);--ds-auro-alert-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host([type=information]){--ds-auro-alert-border-color: var(--ds-basic-color-status-info, #01426a);--ds-auro-alert-icon-color: var(--ds-basic-color-status-info, #01426a)}:host([type=success]){--ds-auro-alert-border-color: var(--ds-basic-color-status-success, #447a1f);--ds-auro-alert-icon-color: var(--ds-basic-color-status-success, #447a1f)}
|
|
24
|
-
`,k=a`.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}.alert{display:flex;padding:var(--ds-size-100, .5rem);padding-right:var(--ds-size-200, 1rem);padding-left:var(--ds-size-150, .75rem);border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, .375rem);border-left-width:var(--ds-size-100, .5rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, .5rem)}.content{width:-webkit-fill-available}
|
|
25
|
-
`,w=a`:host{--ds-auro-alert-border-color: var(--ds-basic-color-status-default, #afb9c6);--ds-auro-alert-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-alert-icon-color: transparent;--ds-auro-alert-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
|
|
26
|
-
`;class S extends y{constructor(){super();const e=new g;this.iconTag=e.generateTag("auro-icon","9.1.1",f),this.runtimeUtils=new b}static get properties(){return{...y.properties,hidden:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},iconTag:{type:String},noIcon:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},type:{type:String,attribute:"type",reflect:!0}}}static get styles(){return[k,x,w]}static register(e="auro-alert"){b.prototype.registerComponent(e,S)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-alert")}generateIconHtml(e,t){return this.noIcon?r``:r`<${this.iconTag} customColor category="${e}" name="${t}"></${this.iconTag}>`}render(){let e=r``;switch(this.type){case void 0:break;case"error":e=this.generateIconHtml("alert","error-stroke"),this.role="alert",this.typeStr="Error.";break;case"success":e=this.generateIconHtml("interface","check-stroke"),this.role="alert",this.typeStr="Success.";break;case"warning":e=this.generateIconHtml("alert","warning-stroke"),this.role="alert",this.typeStr="Warning.";break;case"information":e=this.generateIconHtml("alert","information-stroke"),this.typeStr="Informational notice."}return r`
|
|
27
|
-
<div part="alert" class="alert"
|
|
28
|
-
aria-hidden="${this.hideAudible(this.hiddenAudible)}">
|
|
29
|
-
${e}
|
|
30
|
-
<div part="alert-content" class="content body-lg">
|
|
31
|
-
<span class="util_displayHiddenVisually">${this.typeStr}</span>
|
|
32
|
-
<slot></slot>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
`}}export{S as A};
|