@aurodesignsystem-dev/auro-carousel 0.0.0-pr93.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/CHANGELOG.md +243 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +163 -0
- package/demo/api.html +60 -0
- package/demo/api.js +18 -0
- package/demo/api.md +527 -0
- package/demo/api.min.js +39 -0
- package/demo/auro-carousel.min.js +1947 -0
- package/demo/index.html +62 -0
- package/demo/index.js +20 -0
- package/demo/index.md +351 -0
- package/demo/index.min.js +9 -0
- package/dist/auro-carousel-Cxfzo_Ed.js +98 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +1 -0
- package/dist/registered.js +1 -0
- package/package.json +138 -0
|
@@ -0,0 +1,1947 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$3)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2017 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.0");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright 2017 Google LLC
|
|
17
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
+
*/
|
|
19
|
+
const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.0");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2017 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/const s$1=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.0");
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2020 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/
|
|
32
|
+
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2017 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/
|
|
39
|
+
const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @license
|
|
43
|
+
* Copyright 2018 Google LLC
|
|
44
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
+
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright 2018 Google LLC
|
|
50
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
+
*/const o=o=>o??E;
|
|
52
|
+
|
|
53
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
54
|
+
// See LICENSE in the project root for license information.
|
|
55
|
+
|
|
56
|
+
// ---------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
59
|
+
|
|
60
|
+
class AuroLibraryRuntimeUtils {
|
|
61
|
+
|
|
62
|
+
/* eslint-disable jsdoc/require-param */
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* This will register a new custom element with the browser.
|
|
66
|
+
* @param {String} name - The name of the custom element.
|
|
67
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
registerComponent(name, componentClass) {
|
|
71
|
+
if (!customElements.get(name)) {
|
|
72
|
+
customElements.define(name, class extends componentClass {});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
78
|
+
* @returns {void}
|
|
79
|
+
*/
|
|
80
|
+
closestElement(
|
|
81
|
+
selector, // selector like in .closest()
|
|
82
|
+
base = this, // extra functionality to skip a parent
|
|
83
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
84
|
+
!el || el === document || el === window
|
|
85
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
86
|
+
: found
|
|
87
|
+
? found // found a selector INside this element
|
|
88
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
89
|
+
) {
|
|
90
|
+
return __Closest(base);
|
|
91
|
+
}
|
|
92
|
+
/* eslint-enable jsdoc/require-param */
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
96
|
+
* @param {Object} elem - The element to check.
|
|
97
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
98
|
+
* @returns {void}
|
|
99
|
+
*/
|
|
100
|
+
handleComponentTagRename(elem, tagName) {
|
|
101
|
+
const tag = tagName.toLowerCase();
|
|
102
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
103
|
+
|
|
104
|
+
if (elemTag !== tag) {
|
|
105
|
+
elem.setAttribute(tag, true);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Validates if an element is a specific Auro component.
|
|
111
|
+
* @param {Object} elem - The element to validate.
|
|
112
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
113
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
114
|
+
*/
|
|
115
|
+
elementMatch(elem, tagName) {
|
|
116
|
+
const tag = tagName.toLowerCase();
|
|
117
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
118
|
+
|
|
119
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
124
|
+
// See LICENSE in the project root for license information.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AuroDependencyVersioning {
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Generates a unique string to be used for child auro element naming.
|
|
131
|
+
* @private
|
|
132
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
133
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
134
|
+
* @returns {string} - Unique string to be used for naming.
|
|
135
|
+
*/
|
|
136
|
+
generateElementName(baseName, version) {
|
|
137
|
+
let result = baseName;
|
|
138
|
+
|
|
139
|
+
result += '-';
|
|
140
|
+
result += version.replace(/[.]/g, '_');
|
|
141
|
+
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Generates a unique string to be used for child auro element naming.
|
|
147
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
148
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
149
|
+
* @returns {string} - Unique string to be used for naming.
|
|
150
|
+
*/
|
|
151
|
+
generateTag(baseName, version, tagClass) {
|
|
152
|
+
const elementName = this.generateElementName(baseName, version);
|
|
153
|
+
const tag = i$1`${s(elementName)}`;
|
|
154
|
+
|
|
155
|
+
if (!customElements.get(elementName)) {
|
|
156
|
+
customElements.define(elementName, class extends tagClass {});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return tag;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
165
|
+
*/
|
|
166
|
+
const _observers = new WeakMap();
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
170
|
+
* Structure: {
|
|
171
|
+
* host: {
|
|
172
|
+
* matchers: Set<Function>,
|
|
173
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
174
|
+
* }
|
|
175
|
+
* }
|
|
176
|
+
*/
|
|
177
|
+
const _transportConfig = new WeakMap();
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
181
|
+
*
|
|
182
|
+
* @param {Object} params - The parameters for the function.
|
|
183
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
184
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
185
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
186
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
187
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
188
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
189
|
+
*/
|
|
190
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
191
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
192
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
193
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
197
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
198
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Guard Clause: Ensure match is a function
|
|
202
|
+
if (typeof match !== 'function') {
|
|
203
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
207
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
208
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Register this transport and get cleanup function
|
|
212
|
+
return _registerTransport({
|
|
213
|
+
host,
|
|
214
|
+
target,
|
|
215
|
+
matcher: match,
|
|
216
|
+
removeOriginal
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
222
|
+
*
|
|
223
|
+
* @param {Object} params - The parameters object.
|
|
224
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
225
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
226
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
227
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
228
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
229
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
233
|
+
// Initialize config for this host if it doesn't exist
|
|
234
|
+
if (!_transportConfig.has(host)) {
|
|
235
|
+
_transportConfig.set(host, {
|
|
236
|
+
matchers: new Set(),
|
|
237
|
+
targets: new Map()
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const config = _transportConfig.get(host);
|
|
242
|
+
|
|
243
|
+
// Add the matcher to the set of matchers for this host
|
|
244
|
+
config.matchers.add(matcher);
|
|
245
|
+
|
|
246
|
+
// Initialize target entry if it doesn't exist
|
|
247
|
+
if (!config.targets.has(target)) {
|
|
248
|
+
config.targets.set(target, new Map());
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
252
|
+
config.targets.get(target).set(matcher, {
|
|
253
|
+
removeOriginal,
|
|
254
|
+
currentAttributes: new Map()
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// Perform initial attribute transport
|
|
258
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
259
|
+
|
|
260
|
+
// Attach observer
|
|
261
|
+
_attachObserver(host);
|
|
262
|
+
|
|
263
|
+
// Return cleanup function and utility functions
|
|
264
|
+
return {
|
|
265
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
266
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
267
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
273
|
+
*
|
|
274
|
+
* @param {HTMLElement} host - The host element
|
|
275
|
+
* @param {HTMLElement} target - The target element
|
|
276
|
+
* @param {Function} matcher - The matcher function
|
|
277
|
+
* @private
|
|
278
|
+
*/
|
|
279
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
280
|
+
const config = _transportConfig.get(host);
|
|
281
|
+
if (!config) return;
|
|
282
|
+
|
|
283
|
+
// Remove this matcher from this target
|
|
284
|
+
const targetMatchers = config.targets.get(target);
|
|
285
|
+
if (targetMatchers) {
|
|
286
|
+
targetMatchers.delete(matcher);
|
|
287
|
+
|
|
288
|
+
// If this target has no more matchers, remove it
|
|
289
|
+
if (targetMatchers.size === 0) {
|
|
290
|
+
config.targets.delete(target);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Check if this matcher is still used by any target
|
|
295
|
+
let matcherStillUsed = false;
|
|
296
|
+
for (const matcherMap of config.targets.values()) {
|
|
297
|
+
if (matcherMap.has(matcher)) {
|
|
298
|
+
matcherStillUsed = true;
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// If not used anymore, remove from matchers set
|
|
304
|
+
if (!matcherStillUsed) {
|
|
305
|
+
config.matchers.delete(matcher);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// If no more targets or matchers, detach observer
|
|
309
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
310
|
+
_detachObserver(host);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
316
|
+
*
|
|
317
|
+
* @param {Object} params - The parameters object.
|
|
318
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
319
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
320
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
321
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
322
|
+
* @returns {void}
|
|
323
|
+
* @private
|
|
324
|
+
*/
|
|
325
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
326
|
+
// Get a list of all matching attributes on the host element and their values
|
|
327
|
+
const matchingAttributes = host.getAttributeNames()
|
|
328
|
+
.filter(attr => matcher(attr))
|
|
329
|
+
.reduce((acc, attr) => {
|
|
330
|
+
acc[attr] = host.getAttribute(attr);
|
|
331
|
+
return acc;
|
|
332
|
+
}, {});
|
|
333
|
+
|
|
334
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
335
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
336
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
337
|
+
target.setAttribute(key, value);
|
|
338
|
+
if (removeOriginal) {
|
|
339
|
+
host.removeAttribute(key);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
346
|
+
*
|
|
347
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
348
|
+
* @returns {MutationObserver} The observer instance.
|
|
349
|
+
* @private
|
|
350
|
+
*/
|
|
351
|
+
const _attachObserver = (host) => {
|
|
352
|
+
// If an observer for this host already exists, return it
|
|
353
|
+
if (_observers.has(host)) {
|
|
354
|
+
return _observers.get(host);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Create a new MutationObserver
|
|
358
|
+
const observer = new MutationObserver((mutations) => {
|
|
359
|
+
const config = _transportConfig.get(host);
|
|
360
|
+
if (!config) return;
|
|
361
|
+
|
|
362
|
+
// For each mutation affecting attributes
|
|
363
|
+
mutations
|
|
364
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
365
|
+
.forEach(mutation => {
|
|
366
|
+
const attributeName = mutation.attributeName;
|
|
367
|
+
|
|
368
|
+
// Find matchers that care about this attribute
|
|
369
|
+
for (const matcher of config.matchers) {
|
|
370
|
+
if (matcher(attributeName)) {
|
|
371
|
+
// For each target that uses this matcher
|
|
372
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
373
|
+
if (matcherConfigs.has(matcher)) {
|
|
374
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
375
|
+
_transportAttributes({
|
|
376
|
+
host,
|
|
377
|
+
target,
|
|
378
|
+
matcher,
|
|
379
|
+
removeOriginal
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
// Start observing attribute changes
|
|
389
|
+
observer.observe(host, { attributes: true });
|
|
390
|
+
|
|
391
|
+
// Store the observer
|
|
392
|
+
_observers.set(host, observer);
|
|
393
|
+
|
|
394
|
+
return observer;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
399
|
+
*
|
|
400
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
401
|
+
* @private
|
|
402
|
+
*/
|
|
403
|
+
const _detachObserver = (host) => {
|
|
404
|
+
if (_observers.has(host)) {
|
|
405
|
+
const observer = _observers.get(host);
|
|
406
|
+
observer.disconnect();
|
|
407
|
+
_observers.delete(host);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Clean up the transport config as well
|
|
411
|
+
if (_transportConfig.has(host)) {
|
|
412
|
+
_transportConfig.delete(host);
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
418
|
+
* @param {HTMLElement} host - The host element
|
|
419
|
+
* @param {HTMLElement} target - The target element
|
|
420
|
+
* @param {Function} matcher - The matcher function
|
|
421
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
422
|
+
* @private
|
|
423
|
+
*/
|
|
424
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
425
|
+
const config = _transportConfig.get(host);
|
|
426
|
+
if (!config) return undefined;
|
|
427
|
+
|
|
428
|
+
const targetMatchers = config.targets.get(target);
|
|
429
|
+
if (!targetMatchers) return undefined;
|
|
430
|
+
|
|
431
|
+
return targetMatchers.get(matcher);
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Sets an observed attribute value
|
|
436
|
+
* @param {HTMLElement} host - The host element
|
|
437
|
+
* @param {HTMLElement} target - The target element
|
|
438
|
+
* @param {Function} matcher - The matcher function
|
|
439
|
+
* @param {string} key - The attribute name
|
|
440
|
+
* @param {string} value - The attribute value
|
|
441
|
+
* @private
|
|
442
|
+
*/
|
|
443
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
444
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
445
|
+
if (matcherConfig) {
|
|
446
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
451
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
452
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
453
|
+
return undefined;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
457
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
458
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
459
|
+
return [];
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
const _matchers = {
|
|
463
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
464
|
+
'role': attr => attr.match(/^role$/)
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
468
|
+
return transportAttributes({
|
|
469
|
+
host,
|
|
470
|
+
target,
|
|
471
|
+
match: attr => {
|
|
472
|
+
for (const key in _matchers) {
|
|
473
|
+
if (_matchers[key](attr)) return true;
|
|
474
|
+
}
|
|
475
|
+
return false;
|
|
476
|
+
},
|
|
477
|
+
removeOriginal
|
|
478
|
+
});
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
485
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
486
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
487
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
488
|
+
* @private
|
|
489
|
+
*/
|
|
490
|
+
attributeWatcher;
|
|
491
|
+
|
|
492
|
+
static get properties() {
|
|
493
|
+
return {
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Defines the layout of an element.
|
|
497
|
+
* @default {'default'}
|
|
498
|
+
*/
|
|
499
|
+
layout: {
|
|
500
|
+
type: String,
|
|
501
|
+
attribute: "layout",
|
|
502
|
+
reflect: true
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Defines the shape of an element.
|
|
507
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
508
|
+
* @default {'default'}
|
|
509
|
+
*/
|
|
510
|
+
shape: {
|
|
511
|
+
type: String,
|
|
512
|
+
attribute: "shape",
|
|
513
|
+
reflect: true
|
|
514
|
+
},
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Defines the size of an element.
|
|
518
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
519
|
+
* @default {'md'}
|
|
520
|
+
*/
|
|
521
|
+
size: {
|
|
522
|
+
type: String,
|
|
523
|
+
attribute: "size",
|
|
524
|
+
reflect: true
|
|
525
|
+
},
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
529
|
+
* @default {false}
|
|
530
|
+
*/
|
|
531
|
+
onDark: {
|
|
532
|
+
type: Boolean,
|
|
533
|
+
attribute: "ondark",
|
|
534
|
+
reflect: true
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
539
|
+
* This is used to apply layout and shape classes dynamically.
|
|
540
|
+
* @type {HTMLElement|null}
|
|
541
|
+
* @default {null}
|
|
542
|
+
* @private
|
|
543
|
+
*/
|
|
544
|
+
wrapper: {
|
|
545
|
+
attribute: false,
|
|
546
|
+
reflect: false
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
resetShapeClasses() {
|
|
554
|
+
if (this.shape && this.size) {
|
|
555
|
+
|
|
556
|
+
if (this.wrapper) {
|
|
557
|
+
this.wrapper.classList.forEach((className) => {
|
|
558
|
+
if (className.startsWith('shape-')) {
|
|
559
|
+
this.wrapper.classList.remove(className);
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
resetLayoutClasses() {
|
|
569
|
+
if (this.layout) {
|
|
570
|
+
if (this.wrapper) {
|
|
571
|
+
this.wrapper.classList.forEach((className) => {
|
|
572
|
+
if (className.startsWith('layout-')) {
|
|
573
|
+
this.wrapper.classList.remove(className);
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
updateComponentArchitecture() {
|
|
583
|
+
this.resetLayoutClasses();
|
|
584
|
+
this.resetShapeClasses();
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
updated(changedProperties) {
|
|
588
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
589
|
+
this.updateComponentArchitecture();
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
firstUpdated() {
|
|
594
|
+
super.firstUpdated();
|
|
595
|
+
|
|
596
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
597
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
598
|
+
|
|
599
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
600
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
disconnectedCallback() {
|
|
604
|
+
super.disconnectedCallback();
|
|
605
|
+
|
|
606
|
+
// Cleanup the ARIA observer if it exists
|
|
607
|
+
if (this.attributeWatcher) {
|
|
608
|
+
this.attributeWatcher.cleanup();
|
|
609
|
+
this.attributeWatcher = null;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
614
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
615
|
+
render() {
|
|
616
|
+
try {
|
|
617
|
+
return this.renderLayout();
|
|
618
|
+
} catch (error) {
|
|
619
|
+
// failed to get the defined layout
|
|
620
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
621
|
+
|
|
622
|
+
// fallback to the default layout
|
|
623
|
+
return this.getLayout('default');
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.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(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-150, 0.75rem)}:host([size=sm]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-200, 1rem)}:host([size=md]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-300, 1.5rem)}:host([size=lg]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-400, 2rem)}:host([size=xl]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-500, 2.5rem)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}.textSlot{display:inline-flex;align-items:center;gap:var(--ds-size-100, 0.5rem)}.contentWrapper{font-size:0}slot{pointer-events:none}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(0.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}:host([fluid]){display:block}:host([fluid]) .auro-button:not(.thin):not(.simple){width:calc(100% - 4px)}:host([fluid]) .auro-button.thin{width:calc(100% - 2px)}:host([fluid]) .auro-button.simple{width:100%}:host([static]) .auro-button{pointer-events:none;cursor:default;display:inline-flex}:host([static]) .auro-button .contentWrapper{display:inline-flex}`;
|
|
629
|
+
|
|
630
|
+
var colorCss$3 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus,.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color: transparent}.auro-button:not([ondark])[variant=tertiary]:focus,.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color: transparent}.auro-button:not([ondark])[variant=ghost]:focus,.auro-button:not([ondark])[variant=ghost]:focus-visible{border-color:transparent;--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus,.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus,.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus,.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus,.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color: transparent}.auro-button[ondark][variant=ghost]:focus,.auro-button[ondark][variant=ghost]:focus-visible{border-color:transparent;--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus,.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
631
|
+
|
|
632
|
+
var tokensCss$3 = i$5`:host(:not([onDark])){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color: transparent}:host([onDark]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color: transparent}`;
|
|
633
|
+
|
|
634
|
+
var shapeSize = i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px 0 0 24px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:0 24px 24px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}`;
|
|
635
|
+
|
|
636
|
+
var styleCss$2 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.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(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}`;
|
|
637
|
+
|
|
638
|
+
var colorCss$2 = i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
639
|
+
|
|
640
|
+
var tokensCss$2 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
641
|
+
|
|
642
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
643
|
+
// See LICENSE in the project root for license information.
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
class AuroLoader extends i$2 {
|
|
647
|
+
constructor() {
|
|
648
|
+
super();
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* @private
|
|
652
|
+
*/
|
|
653
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* @private
|
|
657
|
+
*/
|
|
658
|
+
this.mdCount = 3;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @private
|
|
662
|
+
*/
|
|
663
|
+
this.smCount = 2;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* @private
|
|
667
|
+
*/
|
|
668
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
669
|
+
|
|
670
|
+
this.orbit = false;
|
|
671
|
+
this.ringworm = false;
|
|
672
|
+
this.laser = false;
|
|
673
|
+
this.pulse = false;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// function to define props used within the scope of this component
|
|
677
|
+
static get properties() {
|
|
678
|
+
return {
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Sets loader to laser type.
|
|
682
|
+
*/
|
|
683
|
+
laser: {
|
|
684
|
+
type: Boolean,
|
|
685
|
+
reflect: true
|
|
686
|
+
},
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Sets loader to orbit type.
|
|
690
|
+
*/
|
|
691
|
+
orbit: {
|
|
692
|
+
type: Boolean,
|
|
693
|
+
reflect: true
|
|
694
|
+
},
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Sets loader to pulse type.
|
|
698
|
+
*/
|
|
699
|
+
pulse: {
|
|
700
|
+
type: Boolean,
|
|
701
|
+
reflect: true
|
|
702
|
+
},
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Sets loader to ringworm type.
|
|
706
|
+
*/
|
|
707
|
+
ringworm: {
|
|
708
|
+
type: Boolean,
|
|
709
|
+
reflect: true
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
static get styles() {
|
|
715
|
+
return [
|
|
716
|
+
i$5`${styleCss$2}`,
|
|
717
|
+
i$5`${colorCss$2}`,
|
|
718
|
+
i$5`${tokensCss$2}`
|
|
719
|
+
];
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* This will register this element with the browser.
|
|
724
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
728
|
+
*
|
|
729
|
+
*/
|
|
730
|
+
static register(name = "auro-loader") {
|
|
731
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroLoader);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
firstUpdated() {
|
|
735
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
736
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
connectedCallback() {
|
|
740
|
+
super.connectedCallback();
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @private
|
|
745
|
+
* @returns {Array} Numbered array for template map.
|
|
746
|
+
*/
|
|
747
|
+
defineTemplate() {
|
|
748
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
749
|
+
|
|
750
|
+
if (this.orbit || this.laser) {
|
|
751
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
752
|
+
} else if (this.ringworm) {
|
|
753
|
+
nodes = Array.from(Array(0).keys());
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
return nodes;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
760
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
761
|
+
|
|
762
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
763
|
+
render() {
|
|
764
|
+
return x`
|
|
765
|
+
${this.defineTemplate().map((idx) => x`
|
|
766
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
767
|
+
`)}
|
|
768
|
+
|
|
769
|
+
<div class="no-animation body-default">Loading...</div>
|
|
770
|
+
|
|
771
|
+
${this.ringworm ? x`
|
|
772
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
773
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
774
|
+
</svg>`
|
|
775
|
+
: ``
|
|
776
|
+
}
|
|
777
|
+
`;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
var loaderVersion = '5.1.2';
|
|
782
|
+
|
|
783
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
784
|
+
// See LICENSE in the project root for license information.
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* @slot - Default slot for the text of the button.
|
|
789
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
790
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
791
|
+
* @csspart text - Apply CSS to text slot.
|
|
792
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
793
|
+
*/
|
|
794
|
+
|
|
795
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
799
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
800
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
801
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
802
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
803
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
804
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
805
|
+
*/
|
|
806
|
+
class AuroButton extends AuroElement$1 {
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Enables form association for this element.
|
|
810
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
811
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
812
|
+
*/
|
|
813
|
+
static get formAssociated() {
|
|
814
|
+
return true;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
constructor() {
|
|
818
|
+
super();
|
|
819
|
+
this.autofocus = false;
|
|
820
|
+
this.disabled = false;
|
|
821
|
+
this.loading = false;
|
|
822
|
+
this.static = false;
|
|
823
|
+
this.size = "md";
|
|
824
|
+
this.shape = "rounded";
|
|
825
|
+
this.onDark = false;
|
|
826
|
+
this.fluid = false;
|
|
827
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
828
|
+
this.variant = 'primary';
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @private
|
|
832
|
+
*/
|
|
833
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
834
|
+
|
|
835
|
+
// Support for HTML5 forms
|
|
836
|
+
if (typeof this.attachInternals === 'function') {
|
|
837
|
+
this.internals = this.attachInternals();
|
|
838
|
+
} else {
|
|
839
|
+
this.internals = null;
|
|
840
|
+
|
|
841
|
+
// eslint-disable-next-line no-console
|
|
842
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Generate unique names for dependency components.
|
|
847
|
+
*/
|
|
848
|
+
const versioning = new AuroDependencyVersioning();
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* @private
|
|
852
|
+
*/
|
|
853
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @private
|
|
857
|
+
*/
|
|
858
|
+
this.buttonHref = undefined;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* @private
|
|
862
|
+
*/
|
|
863
|
+
this.buttonTarget = undefined;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* @private
|
|
867
|
+
*/
|
|
868
|
+
this.buttonRel = undefined;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
static get styles() {
|
|
872
|
+
return [
|
|
873
|
+
tokensCss$3,
|
|
874
|
+
styleCss$3,
|
|
875
|
+
colorCss$3,
|
|
876
|
+
shapeSize
|
|
877
|
+
];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
static get properties() {
|
|
881
|
+
return {
|
|
882
|
+
|
|
883
|
+
...super.properties,
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Override layout since it isn't used in this component.
|
|
887
|
+
* @private
|
|
888
|
+
*/
|
|
889
|
+
layout: {
|
|
890
|
+
type: Boolean,
|
|
891
|
+
attribute: false,
|
|
892
|
+
reflect: false
|
|
893
|
+
},
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
897
|
+
*/
|
|
898
|
+
autofocus: {
|
|
899
|
+
type: Boolean,
|
|
900
|
+
reflect: true
|
|
901
|
+
},
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
905
|
+
*/
|
|
906
|
+
disabled: {
|
|
907
|
+
type: Boolean,
|
|
908
|
+
reflect: true
|
|
909
|
+
},
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
913
|
+
*/
|
|
914
|
+
fluid: {
|
|
915
|
+
type: Boolean,
|
|
916
|
+
reflect: true
|
|
917
|
+
},
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
921
|
+
*/
|
|
922
|
+
loading: {
|
|
923
|
+
type: Boolean,
|
|
924
|
+
reflect: true
|
|
925
|
+
},
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
929
|
+
*/
|
|
930
|
+
loadingText: {
|
|
931
|
+
type: String
|
|
932
|
+
},
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
936
|
+
*/
|
|
937
|
+
tIndex: {
|
|
938
|
+
type: String,
|
|
939
|
+
reflect: true
|
|
940
|
+
},
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
944
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
945
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
946
|
+
*/
|
|
947
|
+
tabindex: {
|
|
948
|
+
type: String,
|
|
949
|
+
reflect: false
|
|
950
|
+
},
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
954
|
+
*/
|
|
955
|
+
title: {
|
|
956
|
+
type: String,
|
|
957
|
+
reflect: true
|
|
958
|
+
},
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
962
|
+
*/
|
|
963
|
+
type: {
|
|
964
|
+
type: String,
|
|
965
|
+
reflect: true
|
|
966
|
+
},
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
970
|
+
*/
|
|
971
|
+
value: {
|
|
972
|
+
type: String,
|
|
973
|
+
reflect: true
|
|
974
|
+
},
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Sets button variant option.
|
|
978
|
+
* @default primary
|
|
979
|
+
*/
|
|
980
|
+
variant: {
|
|
981
|
+
type: String,
|
|
982
|
+
reflect: true
|
|
983
|
+
},
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* @private
|
|
987
|
+
*/
|
|
988
|
+
buttonHref: {
|
|
989
|
+
type: String,
|
|
990
|
+
},
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* @private
|
|
994
|
+
*/
|
|
995
|
+
buttonTarget: {
|
|
996
|
+
type: String,
|
|
997
|
+
},
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* @private
|
|
1001
|
+
*/
|
|
1002
|
+
buttonRel: {
|
|
1003
|
+
type: String,
|
|
1004
|
+
},
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* If true, the button will be static and not respond to user interactions.
|
|
1008
|
+
*/
|
|
1009
|
+
static: {
|
|
1010
|
+
type: Boolean,
|
|
1011
|
+
reflect: true
|
|
1012
|
+
}
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* This will register this element with the browser.
|
|
1018
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
1019
|
+
*
|
|
1020
|
+
* @example
|
|
1021
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
1022
|
+
*
|
|
1023
|
+
*/
|
|
1024
|
+
static register(name = "auro-button") {
|
|
1025
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroButton);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Internal method to apply focus to the HTML5 button.
|
|
1030
|
+
* @private
|
|
1031
|
+
* @returns {void}
|
|
1032
|
+
*/
|
|
1033
|
+
focus() {
|
|
1034
|
+
this.renderRoot.querySelector('button').focus();
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Submits the form that this button is associated with.
|
|
1039
|
+
* @private
|
|
1040
|
+
* @returns {void}
|
|
1041
|
+
*/
|
|
1042
|
+
surfaceSubmitEvent() {
|
|
1043
|
+
if (this.form) {
|
|
1044
|
+
this.form.requestSubmit();
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Returns the form element that this button is associated with.
|
|
1050
|
+
* @private
|
|
1051
|
+
* @returns {HTMLFormElement | null}
|
|
1052
|
+
*/
|
|
1053
|
+
get form() {
|
|
1054
|
+
return this.internals ? this.internals.form : null;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @private
|
|
1059
|
+
* @returns {Boolean}
|
|
1060
|
+
*/
|
|
1061
|
+
get showText() {
|
|
1062
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1067
|
+
* @returns {string | undefined}
|
|
1068
|
+
* @private
|
|
1069
|
+
*/
|
|
1070
|
+
get currentAriaLabel() {
|
|
1071
|
+
if (!this.attributeWatcher) return undefined;
|
|
1072
|
+
|
|
1073
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1074
|
+
return ariaLabel || undefined;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1079
|
+
* @returns {string | undefined}
|
|
1080
|
+
* @private
|
|
1081
|
+
*/
|
|
1082
|
+
get currentAriaLabelledBy() {
|
|
1083
|
+
if (!this.attributeWatcher) return undefined;
|
|
1084
|
+
|
|
1085
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1086
|
+
return ariaLabelledBy || undefined;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Whether or not the button is set to an icon-only shape.
|
|
1091
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
1092
|
+
* @private
|
|
1093
|
+
*/
|
|
1094
|
+
get iconOnly() {
|
|
1095
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
1100
|
+
* @returns {string} - The font size class name.
|
|
1101
|
+
* @private
|
|
1102
|
+
*/
|
|
1103
|
+
getFontSize() {
|
|
1104
|
+
|
|
1105
|
+
// Size map for standard buttons
|
|
1106
|
+
const standardButtonSizeMap = {
|
|
1107
|
+
xs: 'body-xs',
|
|
1108
|
+
sm: 'body-sm',
|
|
1109
|
+
md: 'body-default',
|
|
1110
|
+
lg: 'body-lg',
|
|
1111
|
+
xl: 'body-lg'
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
// Size map for icon-only buttons
|
|
1115
|
+
const iconOnlyButtonSizeMap = {
|
|
1116
|
+
xs: 'heading-xs',
|
|
1117
|
+
sm: 'heading-sm',
|
|
1118
|
+
md: 'heading-sm',
|
|
1119
|
+
lg: 'heading-md',
|
|
1120
|
+
xl: 'heading-lg'
|
|
1121
|
+
};
|
|
1122
|
+
|
|
1123
|
+
// Determine which map to use based on the shape
|
|
1124
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
1125
|
+
|
|
1126
|
+
// Return the font size based on the button size and shape
|
|
1127
|
+
return sizeMap[this.size] || 'body-default';
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Renders the tag for the component.
|
|
1132
|
+
* @returns {TemplateResult}
|
|
1133
|
+
* @private
|
|
1134
|
+
*/
|
|
1135
|
+
get _renderTag() {
|
|
1136
|
+
if (this.static) return i$1`span`;
|
|
1137
|
+
|
|
1138
|
+
return this.buttonHref ? i$1`a` : i$1`button`;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
firstUpdated() {
|
|
1142
|
+
super.firstUpdated();
|
|
1143
|
+
|
|
1144
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-button');
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Renders the default layout for the button.
|
|
1149
|
+
* @returns {TemplateResult}
|
|
1150
|
+
* @private
|
|
1151
|
+
*/
|
|
1152
|
+
renderLayoutDefault() {
|
|
1153
|
+
|
|
1154
|
+
const fontSize = this.getFontSize();
|
|
1155
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
1156
|
+
|
|
1157
|
+
const classes = {
|
|
1158
|
+
"auro-button": true,
|
|
1159
|
+
"inset": this.showText,
|
|
1160
|
+
wrapper: true,
|
|
1161
|
+
loading: this.loading,
|
|
1162
|
+
|
|
1163
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
1164
|
+
'simple': !['secondary'].includes(this.variant),
|
|
1165
|
+
'thin': ['secondary'].includes(this.variant),
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
const contentClasses = {
|
|
1169
|
+
"contentWrapper": true,
|
|
1170
|
+
"util_displayHiddenVisually": this.loading
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1173
|
+
// Type classes should not be applied to the wrapper to avoid affecting icons
|
|
1174
|
+
const textSlotClasses = {
|
|
1175
|
+
textSlot: true,
|
|
1176
|
+
[fontSize]: this.showText
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
const tabindex = this.tIndex || this.tabindex;
|
|
1180
|
+
|
|
1181
|
+
return u`
|
|
1182
|
+
<${this._renderTag}
|
|
1183
|
+
part="${part}"
|
|
1184
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
1185
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
1186
|
+
tabindex="${o(this.static ? -1 : tabindex)}"
|
|
1187
|
+
?autofocus="${this.autofocus}"
|
|
1188
|
+
class=${e(classes)}
|
|
1189
|
+
?disabled="${this.disabled || this.loading}"
|
|
1190
|
+
?onDark="${this.onDark}"
|
|
1191
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
1192
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
1193
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
1194
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
1195
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
1196
|
+
@click="${!this.static && this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
1197
|
+
href="${o(this.buttonHref || undefined)}"
|
|
1198
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
1199
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
1200
|
+
>
|
|
1201
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
1202
|
+
|
|
1203
|
+
<span class="${e(contentClasses)}" part="contentWrapper">
|
|
1204
|
+
<span class="${e(textSlotClasses)}" part="text">
|
|
1205
|
+
<slot></slot>
|
|
1206
|
+
</span>
|
|
1207
|
+
</span>
|
|
1208
|
+
</${this._renderTag}>
|
|
1209
|
+
`;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Renders the layout of the button.
|
|
1214
|
+
* @returns {TemplateResult}
|
|
1215
|
+
* @private
|
|
1216
|
+
*/
|
|
1217
|
+
renderLayout() {
|
|
1218
|
+
return this.renderLayoutDefault();
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
var buttonVersion = '11.4.0';
|
|
1223
|
+
|
|
1224
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1225
|
+
// See LICENSE in the project root for license information.
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
1230
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
1231
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
1232
|
+
*/
|
|
1233
|
+
|
|
1234
|
+
class AuroElement extends i$2 {
|
|
1235
|
+
|
|
1236
|
+
// function to define props used within the scope of this component
|
|
1237
|
+
static get properties() {
|
|
1238
|
+
return {
|
|
1239
|
+
hidden: { type: Boolean,
|
|
1240
|
+
reflect: true },
|
|
1241
|
+
hiddenVisually: { type: Boolean,
|
|
1242
|
+
reflect: true },
|
|
1243
|
+
hiddenAudible: { type: Boolean,
|
|
1244
|
+
reflect: true },
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* @private Function that determines state of aria-hidden
|
|
1250
|
+
*/
|
|
1251
|
+
hideAudible(value) {
|
|
1252
|
+
if (value) {
|
|
1253
|
+
return 'true'
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
return 'false'
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
var error = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"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>"};
|
|
1261
|
+
|
|
1262
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
1263
|
+
|
|
1264
|
+
const _fetchMap = new Map();
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* A callback to parse Response body.
|
|
1268
|
+
*
|
|
1269
|
+
* @callback ResponseParser
|
|
1270
|
+
* @param {Fetch.Response} response
|
|
1271
|
+
* @returns {Promise}
|
|
1272
|
+
*/
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
1276
|
+
*
|
|
1277
|
+
* @param {String} uri
|
|
1278
|
+
* @param {Object} [options={}]
|
|
1279
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
1280
|
+
* @returns {Promise}
|
|
1281
|
+
*/
|
|
1282
|
+
const cacheFetch = (uri, options = {}) => {
|
|
1283
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
1284
|
+
if (!_fetchMap.has(uri)) {
|
|
1285
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
1286
|
+
}
|
|
1287
|
+
return _fetchMap.get(uri);
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
var styleCss$1 = i$5`: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, 0.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, 0.25rem);line-height:1.8}`;
|
|
1291
|
+
|
|
1292
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1293
|
+
// See LICENSE in the project root for license information.
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
1297
|
+
/**
|
|
1298
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
1299
|
+
*/
|
|
1300
|
+
|
|
1301
|
+
// build the component class
|
|
1302
|
+
class BaseIcon extends AuroElement {
|
|
1303
|
+
constructor() {
|
|
1304
|
+
super();
|
|
1305
|
+
this.onDark = false;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
// function to define props used within the scope of this component
|
|
1309
|
+
static get properties() {
|
|
1310
|
+
return {
|
|
1311
|
+
...super.properties,
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Set value for on-dark version of auro-icon.
|
|
1315
|
+
*/
|
|
1316
|
+
onDark: {
|
|
1317
|
+
type: Boolean,
|
|
1318
|
+
reflect: true
|
|
1319
|
+
},
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @private
|
|
1323
|
+
*/
|
|
1324
|
+
svg: {
|
|
1325
|
+
attribute: false,
|
|
1326
|
+
reflect: true
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
static get styles() {
|
|
1332
|
+
return i$5`
|
|
1333
|
+
${styleCss$1}
|
|
1334
|
+
`;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Async function to fetch requested icon from npm CDN.
|
|
1339
|
+
* @private
|
|
1340
|
+
* @param {string} category - Icon category.
|
|
1341
|
+
* @param {string} name - Icon name.
|
|
1342
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
1343
|
+
*/
|
|
1344
|
+
async fetchIcon(category, name) {
|
|
1345
|
+
let iconHTML = '';
|
|
1346
|
+
|
|
1347
|
+
if (category === 'logos') {
|
|
1348
|
+
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
1349
|
+
} else {
|
|
1350
|
+
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
1354
|
+
|
|
1355
|
+
return dom.body.querySelector('svg');
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
// lifecycle function
|
|
1359
|
+
async firstUpdated() {
|
|
1360
|
+
try {
|
|
1361
|
+
if (!this.customSvg) {
|
|
1362
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
1363
|
+
|
|
1364
|
+
if (svg) {
|
|
1365
|
+
this.svg = svg;
|
|
1366
|
+
} else if (!svg) {
|
|
1367
|
+
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
1368
|
+
|
|
1369
|
+
this.svg = penDOM.body.firstChild;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
// eslint-disable-next-line no-unused-vars
|
|
1373
|
+
} catch (err) {
|
|
1374
|
+
this.svg = undefined;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
var tokensCss$1 = i$5`: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)}`;
|
|
1380
|
+
|
|
1381
|
+
var colorCss$1 = i$5`: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)}`;
|
|
1382
|
+
|
|
1383
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1384
|
+
// See LICENSE in the project root for license information.
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
class AuroIcon extends BaseIcon {
|
|
1388
|
+
constructor() {
|
|
1389
|
+
super();
|
|
1390
|
+
|
|
1391
|
+
this.variant = undefined;
|
|
1392
|
+
this.privateDefaults();
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Internal Defaults.
|
|
1397
|
+
* @private
|
|
1398
|
+
* @returns {void}
|
|
1399
|
+
*/
|
|
1400
|
+
privateDefaults() {
|
|
1401
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1402
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
// function to define props used within the scope of this component
|
|
1406
|
+
static get properties() {
|
|
1407
|
+
return {
|
|
1408
|
+
...super.properties,
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1412
|
+
*/
|
|
1413
|
+
ariaHidden: {
|
|
1414
|
+
type: String,
|
|
1415
|
+
reflect: true
|
|
1416
|
+
},
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1420
|
+
*/
|
|
1421
|
+
category: {
|
|
1422
|
+
type: String,
|
|
1423
|
+
reflect: true
|
|
1424
|
+
},
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Allows custom color to be set.
|
|
1428
|
+
*/
|
|
1429
|
+
customColor: {
|
|
1430
|
+
type: Boolean,
|
|
1431
|
+
reflect: true
|
|
1432
|
+
},
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1436
|
+
*/
|
|
1437
|
+
customSvg: {
|
|
1438
|
+
type: Boolean
|
|
1439
|
+
},
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* Exposes content in slot as icon label.
|
|
1443
|
+
*/
|
|
1444
|
+
label: {
|
|
1445
|
+
type: Boolean,
|
|
1446
|
+
reflect: true
|
|
1447
|
+
},
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1451
|
+
*/
|
|
1452
|
+
name: {
|
|
1453
|
+
type: String,
|
|
1454
|
+
reflect: true
|
|
1455
|
+
},
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* The style of the icon. The accepted variants are `accent1`, `disabled`, `muted`, `statusDefault`, `statusInfo`, `statusSuccess`, `statusWarning`, `statusError`, `statusInfoSubtle`, `statusSuccessSubtle`, `statusWarningSubtle`, `statusErrorSubtle`, `fareBasicEconomy`, `fareBusiness`, `fareEconomy`, `fareFirst`, `farePremiumEconomy`, `tierOneWorldEmerald`, `tierOneWorldSapphire`, `tierOneWorldRuby`.
|
|
1459
|
+
*/
|
|
1460
|
+
variant: {
|
|
1461
|
+
type: String,
|
|
1462
|
+
reflect: true
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
static get styles() {
|
|
1468
|
+
return [
|
|
1469
|
+
super.styles,
|
|
1470
|
+
i$5`${tokensCss$1}`,
|
|
1471
|
+
i$5`${styleCss$1}`,
|
|
1472
|
+
i$5`${colorCss$1}`
|
|
1473
|
+
];
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* This will register this element with the browser.
|
|
1478
|
+
* @param {string} [name="auro-icon"] - The name of element that you want to register to.
|
|
1479
|
+
*
|
|
1480
|
+
* @example
|
|
1481
|
+
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
1482
|
+
*
|
|
1483
|
+
*/
|
|
1484
|
+
static register(name = "auro-icon") {
|
|
1485
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
connectedCallback() {
|
|
1489
|
+
super.connectedCallback();
|
|
1490
|
+
|
|
1491
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
1492
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* @private
|
|
1497
|
+
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1498
|
+
*/
|
|
1499
|
+
exposeCssParts() {
|
|
1500
|
+
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
async firstUpdated() {
|
|
1504
|
+
await super.firstUpdated();
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1508
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1509
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1510
|
+
*/
|
|
1511
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1512
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1513
|
+
|
|
1514
|
+
if (svgDesc) {
|
|
1515
|
+
svgDesc.remove();
|
|
1516
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1522
|
+
render() {
|
|
1523
|
+
const labelClasses = {
|
|
1524
|
+
'labelWrapper': true,
|
|
1525
|
+
'util_displayHiddenVisually': !this.label
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
const svgClasses = {
|
|
1529
|
+
'svgWrapper': true,
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
return x`
|
|
1533
|
+
<div class="componentWrapper">
|
|
1534
|
+
<div
|
|
1535
|
+
class="${e(svgClasses)}"
|
|
1536
|
+
title="${o(this.title || undefined)}">
|
|
1537
|
+
<span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
|
|
1538
|
+
${this.customSvg ? x`
|
|
1539
|
+
<slot name="svg"></slot>
|
|
1540
|
+
` : x`
|
|
1541
|
+
${this.svg}
|
|
1542
|
+
`
|
|
1543
|
+
}
|
|
1544
|
+
</span>
|
|
1545
|
+
</div>
|
|
1546
|
+
|
|
1547
|
+
<div class="${e(labelClasses)}">
|
|
1548
|
+
<slot></slot>
|
|
1549
|
+
</div>
|
|
1550
|
+
</div>
|
|
1551
|
+
`;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
var iconVersion = '8.1.4';
|
|
1556
|
+
|
|
1557
|
+
var colorCss = i$5`:host .gradient{background:var(--ds-auro-carousel-gradient-color-two)}:host .gradient--left{background:linear-gradient(to right,var(--ds-auro-carousel-gradient-color-one),var(--ds-auro-carousel-gradient-color-two))}:host .gradient--right{background:linear-gradient(to left,var(--ds-auro-carousel-gradient-color-one),var(--ds-auro-carousel-gradient-color-two))}
|
|
1558
|
+
`;
|
|
1559
|
+
|
|
1560
|
+
var styleCss = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{position:relative;display:block}.carousel{overflow-x:scroll;scroll-behavior:smooth;scrollbar-width:none;white-space:nowrap}.carousel::-webkit-scrollbar{width:0;height:0}.carousel.carousel--scrolledToStart:after,.carousel.carousel--scrolledToStart:before,.carousel.carousel--scrolledToEnd:after,.carousel.carousel--scrolledToEnd:before{display:none}.container{display:flex}::slotted(*){flex:0 0 auto;margin-left:var(--ds-size-200, 1rem)}::slotted(:first-child){margin-left:auto}::slotted(:last-child){margin-right:auto}.breakpointDetector:before{display:none}@media screen and (min-width: 576px){.breakpointDetector:before{content:"sm"}}.button{position:absolute;top:50%;display:none;padding:0;border-radius:50%;cursor:pointer;transform:translateY(-50%)}.button:hover,.button:active{border:none}.button--left{z-index:1;left:0}.button--right{right:0}@media screen and (min-width: 576px){.button{display:block}.carousel--scrolledToStart .button--left,.carousel--scrolledToStart .gradient--left,.carousel--scrolledToEnd .button--right,.carousel--scrolledToEnd .gradient--right{display:none}}[class^=gradient]{position:absolute;top:0;width:calc(var(--ds-size-1000, 5rem) + var(--ds-size-500, 2.5rem) + var(--ds-size-150, .75rem));height:100%;pointer-events:none}.gradient--left{left:0}.gradient--right{right:0}
|
|
1561
|
+
`;
|
|
1562
|
+
|
|
1563
|
+
var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-carousel-gradient-color-two: transparent}
|
|
1564
|
+
`;
|
|
1565
|
+
|
|
1566
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1567
|
+
// See LICENSE in the project root for license information.
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
1571
|
+
/**
|
|
1572
|
+
* The auro-carousel component displays a group of elements in a scrollable container.
|
|
1573
|
+
*
|
|
1574
|
+
* @attr {Boolean} displayArrows - Forces left and right navigation to stick in DOM regardless of content width
|
|
1575
|
+
* @attr {Number} scrollDistance - How many pixels to scroll the carousel when the shoulder buttons are triggered.
|
|
1576
|
+
* @attr {String} label - The accessible name for the carousel. Logs a console warning if not set.
|
|
1577
|
+
* @attr {String} centerSelected - Apply to outer auro-carousel element to automatically center the selected node on UI render.
|
|
1578
|
+
*
|
|
1579
|
+
* @slot - the elements in the carousel
|
|
1580
|
+
*
|
|
1581
|
+
* @csspart wrapper - The primary root HTML element of the component.
|
|
1582
|
+
*
|
|
1583
|
+
* @event scrollRight - when the guest clicks the 'right' carousel button
|
|
1584
|
+
* @event scrollLeft - when the guest clicks the 'left' carousel button
|
|
1585
|
+
*/
|
|
1586
|
+
|
|
1587
|
+
class AuroCarousel extends i$2 {
|
|
1588
|
+
constructor() {
|
|
1589
|
+
super();
|
|
1590
|
+
this.scrollDistance = 300;
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* @private
|
|
1594
|
+
*/
|
|
1595
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1596
|
+
|
|
1597
|
+
const versioning = new AuroDependencyVersioning();
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* @private
|
|
1601
|
+
*/
|
|
1602
|
+
this.buttonTag = versioning.generateTag(
|
|
1603
|
+
"auro-button",
|
|
1604
|
+
buttonVersion,
|
|
1605
|
+
AuroButton,
|
|
1606
|
+
);
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* @private
|
|
1610
|
+
*/
|
|
1611
|
+
this.iconTag = versioning.generateTag("auro-icon", iconVersion, AuroIcon);
|
|
1612
|
+
|
|
1613
|
+
/**
|
|
1614
|
+
* Whether or not the carousel is scrolled to the start.
|
|
1615
|
+
* @private
|
|
1616
|
+
*/
|
|
1617
|
+
this.scrolledToStart = false;
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Whether or not the carousel is scrolled to the end.
|
|
1621
|
+
* @private
|
|
1622
|
+
*/
|
|
1623
|
+
this.scrolledToEnd = false;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
static get properties() {
|
|
1627
|
+
return {
|
|
1628
|
+
displayArrows: { type: Boolean },
|
|
1629
|
+
scrollDistance: {
|
|
1630
|
+
type: Number,
|
|
1631
|
+
reflect: true,
|
|
1632
|
+
},
|
|
1633
|
+
label: { type: String },
|
|
1634
|
+
centerSelected: {
|
|
1635
|
+
type: String,
|
|
1636
|
+
reflect: true,
|
|
1637
|
+
},
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
static get styles() {
|
|
1642
|
+
return [styleCss, colorCss, tokensCss];
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* This will register this element with the browser.
|
|
1647
|
+
* @param {string} [name="auro-carousel"] - The name of element that you want to register to.
|
|
1648
|
+
*
|
|
1649
|
+
* @example
|
|
1650
|
+
* AuroCarousel.register("custom-carousel") // this will register this element to <custom-carousel/>
|
|
1651
|
+
*
|
|
1652
|
+
*/
|
|
1653
|
+
static register(name = "auro-carousel") {
|
|
1654
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroCarousel);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
firstUpdated() {
|
|
1658
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
1659
|
+
this.runtimeUtils.handleComponentTagRename(this, "auro-carousel");
|
|
1660
|
+
|
|
1661
|
+
this.carousel = this.renderRoot.querySelector(".carousel");
|
|
1662
|
+
|
|
1663
|
+
if (!this.label) {
|
|
1664
|
+
// eslint-disable-next-line no-console
|
|
1665
|
+
console.warn(
|
|
1666
|
+
"Label should be provided to auro-carousel for carousel to be accessible",
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
this.setScrollFlags(false);
|
|
1671
|
+
this.setUpIntersectionObserver();
|
|
1672
|
+
this.setUpResizeObserver();
|
|
1673
|
+
|
|
1674
|
+
if (this.hasAttribute("centerSelected")) {
|
|
1675
|
+
/**
|
|
1676
|
+
* This function is called here so that the tests will pass.
|
|
1677
|
+
* It's called again on DOMContentLoaded so that it will work when carousel
|
|
1678
|
+
* content doesn't load until after the carousel component.
|
|
1679
|
+
* Example is loading auro-pane after auro-carousel.
|
|
1680
|
+
*/
|
|
1681
|
+
this.actionOnChildrenReady();
|
|
1682
|
+
|
|
1683
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
1684
|
+
this.actionOnChildrenReady();
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Function handler for anything that happens when all its children is ready.
|
|
1691
|
+
* @return {void}
|
|
1692
|
+
*/
|
|
1693
|
+
actionOnChildrenReady() {
|
|
1694
|
+
const promises = [];
|
|
1695
|
+
|
|
1696
|
+
[...this.children].forEach((child) => {
|
|
1697
|
+
// Here is the check the 'updateComplete' property of its child. Only works on lit-element.
|
|
1698
|
+
// This only works if this component is imported AFTER its child component.
|
|
1699
|
+
// Otherwise child.updateComplete would be undefined.
|
|
1700
|
+
promises.push(child.updateComplete);
|
|
1701
|
+
});
|
|
1702
|
+
|
|
1703
|
+
Promise.all(promises).then(() => {
|
|
1704
|
+
// nything to do here on resolve
|
|
1705
|
+
this.scrollToSelected();
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* Scroll to the first child component that have 'selected' attribute.
|
|
1711
|
+
* @return {void}
|
|
1712
|
+
*/
|
|
1713
|
+
scrollToSelected() {
|
|
1714
|
+
const selectedChildren = [...this.children].find((child) =>
|
|
1715
|
+
child.hasAttribute("selected"),
|
|
1716
|
+
);
|
|
1717
|
+
|
|
1718
|
+
if (selectedChildren) {
|
|
1719
|
+
this.centerElement(selectedChildren);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* Internal method to determine if the screen is small.
|
|
1725
|
+
* @private
|
|
1726
|
+
* @returns {boolean} True if the screen is small.
|
|
1727
|
+
*/
|
|
1728
|
+
isSmallScreen() {
|
|
1729
|
+
const breakpointDetector = this.renderRoot.querySelector(
|
|
1730
|
+
".breakpointDetector",
|
|
1731
|
+
);
|
|
1732
|
+
// CSS sets content of pseudoelement based on media query
|
|
1733
|
+
// This prevents duplicating the breakpoints in CSS and JS
|
|
1734
|
+
const currentBreakpoint = window
|
|
1735
|
+
.getComputedStyle(breakpointDetector, ":before")
|
|
1736
|
+
.getPropertyValue("content")
|
|
1737
|
+
.replace(/"/gu, "");
|
|
1738
|
+
|
|
1739
|
+
return currentBreakpoint !== "sm";
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Scrolls the carousel by the given amount.
|
|
1744
|
+
* @param {number} num - The number of pixels to scroll the carousel by. Positive scrolls to the
|
|
1745
|
+
* right, negative scrolls to the left.
|
|
1746
|
+
* @return {void}
|
|
1747
|
+
*/
|
|
1748
|
+
scrollCarousel(num) {
|
|
1749
|
+
this.carousel.scrollLeft += num;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* Centers the given element inside the carousel.
|
|
1754
|
+
* @param {Element} el - The element to center inside the carousel. Must be a descendant of the carousel.
|
|
1755
|
+
* @return {void}
|
|
1756
|
+
*/
|
|
1757
|
+
centerElement(el) {
|
|
1758
|
+
if (!this.contains(el)) {
|
|
1759
|
+
throw new Error("Element is not a descendant of this carousel");
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
const middleX =
|
|
1763
|
+
el.getBoundingClientRect().x - this.getBoundingClientRect().left;
|
|
1764
|
+
const carouselMiddle = this.offsetWidth / 2; // eslint-disable-line no-magic-numbers
|
|
1765
|
+
const elCenter = el.offsetWidth / 2; // eslint-disable-line no-magic-numbers
|
|
1766
|
+
const scrollTotal = middleX - carouselMiddle + elCenter;
|
|
1767
|
+
|
|
1768
|
+
this.scrollCarousel(scrollTotal);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Internal method to set scrolledToStart and scrolledToEnd.
|
|
1773
|
+
* @private
|
|
1774
|
+
* @param {boolean} autofocus - True if the first or last element should be focused when scrolled to
|
|
1775
|
+
* start or end, respectively.
|
|
1776
|
+
* @return {void}
|
|
1777
|
+
*/
|
|
1778
|
+
setScrollFlags(autofocus) {
|
|
1779
|
+
const { scrollLeft, scrollWidth, clientWidth } = this.carousel;
|
|
1780
|
+
|
|
1781
|
+
this.scrolledToStart = scrollLeft <= 0;
|
|
1782
|
+
this.scrolledToEnd = scrollLeft >= scrollWidth - clientWidth;
|
|
1783
|
+
|
|
1784
|
+
// scrolling to the start or end makes the left/right buttons disappear
|
|
1785
|
+
// when this happens, focus the first or last slotted element, respectively
|
|
1786
|
+
if (autofocus && (this.scrolledToStart || this.scrolledToEnd)) {
|
|
1787
|
+
if (this.scrolledToStart) {
|
|
1788
|
+
this.firstElementChild.focus();
|
|
1789
|
+
} else {
|
|
1790
|
+
this.lastElementChild.focus();
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
this.requestUpdate();
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Internal method to set up the intersection observer. When carousel elements are out of view,
|
|
1799
|
+
* we remove it from the tab order and hide it from assistive tech. When they come into view, we
|
|
1800
|
+
* reverse our changes.
|
|
1801
|
+
* @private
|
|
1802
|
+
* @return {void}
|
|
1803
|
+
*/
|
|
1804
|
+
setUpIntersectionObserver() {
|
|
1805
|
+
const options = {
|
|
1806
|
+
root: this.carousel,
|
|
1807
|
+
threshold: 0.8,
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
// We only manage tabIndex/aria-hidden in browsers that support IntersectionObserver (excludes IE)
|
|
1811
|
+
// and medium or larger screen sizes. The left/right buttons do not show on small screens so there
|
|
1812
|
+
// is not a way for screen reader users to scroll the carousel.
|
|
1813
|
+
if ("IntersectionObserver" in window && !this.isSmallScreen()) {
|
|
1814
|
+
const callback = (entries) => {
|
|
1815
|
+
// when the slotted element becomes visible, we want it to be tabbable and visible to assistive tech
|
|
1816
|
+
// otherwise, we remove it from the tab order and set aria-hidden
|
|
1817
|
+
entries.forEach((entry) => {
|
|
1818
|
+
if (entry.isIntersecting) {
|
|
1819
|
+
entry.target.removeAttribute("tabindex");
|
|
1820
|
+
entry.target.removeAttribute("aria-hidden");
|
|
1821
|
+
} else {
|
|
1822
|
+
entry.target.setAttribute("tabindex", "-1");
|
|
1823
|
+
entry.target.setAttribute("aria-hidden", true);
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
};
|
|
1827
|
+
|
|
1828
|
+
this.intersectionObserver = new IntersectionObserver(callback, options);
|
|
1829
|
+
this.observeChildren();
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* Internal method to set up the resize observer. When an element is resized, we update
|
|
1835
|
+
* the scroll flags so the buttons are shown/hidden appropriately.
|
|
1836
|
+
* @private
|
|
1837
|
+
* @return {void}
|
|
1838
|
+
*/
|
|
1839
|
+
setUpResizeObserver() {
|
|
1840
|
+
if ("ResizeObserver" in window) {
|
|
1841
|
+
// Update scrollflags when a child's size changes (e.g., a custom element becomes
|
|
1842
|
+
// defined or an image is loaded)
|
|
1843
|
+
this.resizeObserver = new ResizeObserver(() => this.setScrollFlags());
|
|
1844
|
+
Array.from(this.children).forEach((element) => {
|
|
1845
|
+
this.resizeObserver.observe(element);
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* Internal method to observe the components children with IntersectionObserver.
|
|
1852
|
+
* @private
|
|
1853
|
+
* @return {void}
|
|
1854
|
+
*/
|
|
1855
|
+
observeChildren() {
|
|
1856
|
+
Array.from(this.children).forEach((element) => {
|
|
1857
|
+
this.intersectionObserver.observe(element);
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* Internal method to handle slot change. When the slot contents change, we need to re-observe the
|
|
1863
|
+
* slotted elements.
|
|
1864
|
+
* @private
|
|
1865
|
+
* @return {void}
|
|
1866
|
+
*/
|
|
1867
|
+
handleSlotChange() {
|
|
1868
|
+
this.setScrollFlags(false);
|
|
1869
|
+
if (this.intersectionObserver) {
|
|
1870
|
+
this.intersectionObserver.disconnect();
|
|
1871
|
+
this.observeChildren();
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* Internal method to handle clicks on the shoulder buttons.
|
|
1877
|
+
* @private
|
|
1878
|
+
* @param {boolean} scrollRight - Whether to scroll the carousel right or left.
|
|
1879
|
+
* @return {void}
|
|
1880
|
+
*/
|
|
1881
|
+
handleClick(scrollRight) {
|
|
1882
|
+
let click = null;
|
|
1883
|
+
|
|
1884
|
+
if (scrollRight) {
|
|
1885
|
+
this.scrollCarousel(this.scrollDistance);
|
|
1886
|
+
click = new CustomEvent("scrollRight", {
|
|
1887
|
+
bubbles: true,
|
|
1888
|
+
composed: true,
|
|
1889
|
+
});
|
|
1890
|
+
} else {
|
|
1891
|
+
this.scrollCarousel(-1 * this.scrollDistance); // eslint-disable-line no-magic-numbers
|
|
1892
|
+
click = new CustomEvent("scrollLeft", {
|
|
1893
|
+
bubbles: true,
|
|
1894
|
+
composed: true,
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1897
|
+
this.dispatchEvent(click);
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
render() {
|
|
1901
|
+
const carouselClassMap = {
|
|
1902
|
+
wrapper: true,
|
|
1903
|
+
carousel: true,
|
|
1904
|
+
"carousel--scrolledToStart": this.scrolledToStart && !this.displayArrows,
|
|
1905
|
+
"carousel--scrolledToEnd": this.scrolledToEnd && !this.displayArrows,
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
return u`
|
|
1909
|
+
<div class="breakpointDetector"></div>
|
|
1910
|
+
<div role="group"
|
|
1911
|
+
aria-label="${o(this.label)}"
|
|
1912
|
+
aria-roledescription="carousel"
|
|
1913
|
+
class="${e(carouselClassMap)}"
|
|
1914
|
+
part="wrapper"
|
|
1915
|
+
@scroll=${() => this.setScrollFlags(true)} >
|
|
1916
|
+
|
|
1917
|
+
<!-- Left button -->
|
|
1918
|
+
<${this.buttonTag}
|
|
1919
|
+
aria-label="Scroll Left"
|
|
1920
|
+
shape="circle"
|
|
1921
|
+
variant="secondary"
|
|
1922
|
+
@click=${() => this.handleClick(false)}
|
|
1923
|
+
class="button button--left">
|
|
1924
|
+
<${this.iconTag} customColor category="interface" name="chevron-left"></${this.iconTag}>
|
|
1925
|
+
</${this.buttonTag}>
|
|
1926
|
+
|
|
1927
|
+
<div class="container">
|
|
1928
|
+
<div class="gradient--left"></div>
|
|
1929
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1930
|
+
<div class="gradient--right"></div>
|
|
1931
|
+
</div>
|
|
1932
|
+
|
|
1933
|
+
<!-- Right button -->
|
|
1934
|
+
<${this.buttonTag}
|
|
1935
|
+
aria-label="Scroll Right"
|
|
1936
|
+
shape="circle"
|
|
1937
|
+
variant="secondary"
|
|
1938
|
+
@click=${() => this.handleClick(true)}
|
|
1939
|
+
class="button button--right">
|
|
1940
|
+
<${this.iconTag} customColor category="interface" name="chevron-right"></${this.iconTag}>
|
|
1941
|
+
</${this.buttonTag}>
|
|
1942
|
+
</div>
|
|
1943
|
+
`;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
export { AuroCarousel as A };
|