@aurodesignsystem/auro-formkit 2.0.2 → 2.1.0-beta.1
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 +19 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +281 -135
- package/components/bibtemplate/dist/registered.js +281 -135
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +30 -56
- package/components/checkbox/demo/index.min.js +30 -56
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +28 -101
- package/components/checkbox/dist/registered.js +28 -101
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +1289 -734
- package/components/combobox/demo/index.min.js +1289 -734
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +1024 -632
- package/components/combobox/dist/registered.js +1024 -632
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +971 -435
- package/components/counter/demo/index.js +1 -0
- package/components/counter/demo/index.min.js +972 -435
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +972 -483
- package/components/counter/dist/registered.js +972 -483
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +30 -0
- package/components/datepicker/demo/api.min.js +1818 -735
- package/components/datepicker/demo/index.min.js +1818 -735
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-calendar.d.ts +5 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +7 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +1830 -817
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +1830 -817
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.min.js +231 -117
- package/components/dropdown/demo/index.min.js +231 -117
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +232 -165
- package/components/dropdown/dist/registered.js +232 -165
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/dist/index.js +4 -28
- package/components/form/dist/registered.js +4 -28
- package/components/helptext/dist/index.js +6 -30
- package/components/helptext/dist/registered.js +6 -30
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +471 -164
- package/components/input/demo/index.min.js +471 -164
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +468 -220
- package/components/input/dist/registered.js +468 -220
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +183 -60
- package/components/menu/demo/index.min.js +183 -60
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +205 -129
- package/components/menu/dist/registered.js +205 -129
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +30 -56
- package/components/radio/demo/index.min.js +30 -56
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/index.js +28 -101
- package/components/radio/dist/registered.js +28 -101
- package/components/select/README.md +1 -1
- package/components/select/demo/api.min.js +736 -436
- package/components/select/demo/index.min.js +736 -436
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/index.js +538 -402
- package/components/select/dist/registered.js +538 -402
- package/package.json +4 -2
|
@@ -1,48 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const t$5=globalThis,i$9=t$5.trustedTypes,s$5=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$7="$lit$",h$3=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$3,n$6=`<${o$7}>`,r$8=document,l$4=()=>r$8.createComment(""),c$6=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$4=Array.isArray,u$6=t=>a$4(t)||"function"==typeof t?.[Symbol.iterator],d$3="[ \t\n\f\r]",f$3=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$2=/-->/g,_$1=/>/g,m$2=RegExp(`>|${d$3}(?:([^\\s"'>=/]+)(${d$3}*=${d$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$4=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$3=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$3(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$8.createTreeWalker(r$8,129);function P$1(t,i){if(!a$4(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$5?s$5.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$3;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$3?"!--"===u[1]?c=v$2:void 0!==u[1]?c=_$1:void 0!==u[2]?($$1.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$2):void 0!==u[3]&&(c=m$2):c===m$2?">"===u[0]?(c=r??f$3,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$2:'"'===u[3]?g$1:p$4):c===g$1||c===p$4?c=m$2:c===v$2||c===_$1?c=f$3:(c=m$2,r=void 0);const x=c===m$2&&t[i+1].startsWith("/>")?" ":"";l+=c===f$3?s+n$6:d>=0?(o.push(a),s.slice(0,d)+e$7+s.slice(d)+h$3+x):s+h$3+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = 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$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$7)){const i=v[a++],s=r.getAttribute(t).split(h$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$1:"?"===e[1]?I$1:"@"===e[1]?L$1:k$1}),r.removeAttribute(t);}else t.startsWith(h$3)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$3),s=t.length-1;if(s>0){r.textContent=i$9?i$9.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$4()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$4());}}}else if(8===r.nodeType)if(r.data===o$7)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$3,t+1));)d.push({type:7,index:c}),t+=h$3.length-1;}c++;}}static createElement(t,i){const s=r$8.createElement("template");return s.innerHTML=t,s}};function S$3(t,i,s=t,e){if(i===T$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$6(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$3(t,h._$AS(t,i.values),h,e)),i}let M$2 = 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$8).importNode(i,true);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R$1(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$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$1.nextNode(),o++);}return C$1.currentNode=r$8,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++;}};let R$1 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$1,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$3(this,t,i),c$6(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$6(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$1&&c$6(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$8.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$1.createElement(P$1(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$2(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$1.get(t.strings);return void 0===i&&A$1.set(t.strings,i=new N$1(t)),i}k(t){a$4(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$4()),this.O(l$4()),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));}};let k$1 = 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$1,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$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S$3(this,t,i,0),o=!c$6(t)||t!==this._$AH&&t!==T$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$3(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$6(r)||r!==this._$AH[n],r===E$1?t=E$1:t!==E$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$1 = class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$1?void 0:t;}};let I$1 = class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$1);}};let L$1 = class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$3(this,t,i,0)??E$1)===T$1)return;const s=this._$AH,e=t===E$1&&s!==E$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$1&&(s===E$1||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);}};let z$1 = 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$3(this,t);}};const Z={I:R$1},j$1=t$5.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$5.litHtmlVersions??=[]).push("3.2.1");const B$1=(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$1(i.insertBefore(l$4(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright 2020 Google LLC
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/
|
|
13
|
-
const a$3=Symbol.for(""),o$6=t=>{if(t?.r===a$3)return t?._$litStatic$},s$4=t=>({_$litStatic$:t,r:a$3}),i$8=(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$3}),l$3=new Map,n$5=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$6(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$3.get(t))&&(n.raw=n,l$3.set(t,r=n)),e=u;}return t(r,...e)},u$5=n$5(x$1);
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @license
|
|
17
|
-
* Copyright 2017 Google LLC
|
|
18
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/
|
|
20
|
-
const t$4={ATTRIBUTE:1,CHILD:2},e$6=t=>(...e)=>({_$litDirective$:t,values:e});let i$7 = 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)}};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @license
|
|
24
|
-
* Copyright 2020 Google LLC
|
|
25
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
26
|
-
*/const {I:t$3}=Z,s$3=()=>document.createComment(""),r$7=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s$3(),l),c=e.insertBefore(s$3(),l);n=new t$3(i,c,o,o.options);}else {const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n},v$1=(o,t,i=o)=>(o._$AI(t,i),o),u$4={},m$1=(o,t=u$4)=>o._$AH=t,p$3=o=>o._$AH,M$1=o=>{o._$AP?.(false,true);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @license
|
|
30
|
-
* Copyright 2017 Google LLC
|
|
31
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/
|
|
33
|
-
const u$3=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c$5=e$6(class extends i$7{constructor(e){if(super(e),e.type!==t$4.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=p$3(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v=[];let m,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v[k]=v$1(d[x],p[k]),x++,k++;else if(h[j]===a[w])v[w]=v$1(d[j],p[w]),j--,w--;else if(h[x]===a[w])v[w]=v$1(d[x],p[w]),r$7(s,v[w+1],d[x]),x++,w--;else if(h[j]===a[k])v[k]=v$1(d[j],p[k]),r$7(s,d[x],d[j]),j--,k++;else if(void 0===m&&(m=u$3(a,k,w),y=u$3(h,x,j)),m.has(h[x]))if(m.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r$7(s,d[x]);v$1(e,p[k]),v[k]=e;}else v[k]=v$1(t,p[k]),r$7(s,d[x],t),d[e]=null;k++;}else M$1(d[j]),j--;else M$1(d[x]),x++;for(;k<=w;){const e=r$7(s,v[w+1]);v$1(e,p[k]),v[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M$1(e);}return this.ut=a,m$1(s,v),T$1}});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @license
|
|
37
|
-
* Copyright 2018 Google LLC
|
|
38
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/const e$5=e$6(class extends i$7{constructor(t){if(super(t),t.type!==t$4.ATTRIBUTE||"class"!==t.name||t.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$1}});
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @license
|
|
43
|
-
* Copyright 2018 Google LLC
|
|
44
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/const o$5=o=>o??E$1;
|
|
1
|
+
import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
|
|
2
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { css, LitElement, html } from 'lit';
|
|
46
6
|
|
|
47
7
|
const watchedItems = new Set();
|
|
48
8
|
|
|
@@ -165,30 +125,11 @@ function stopNotifyingOnLangChange(element) {
|
|
|
165
125
|
watchedItems.delete(element);
|
|
166
126
|
}
|
|
167
127
|
|
|
168
|
-
|
|
169
|
-
* @license
|
|
170
|
-
* Copyright 2019 Google LLC
|
|
171
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
172
|
-
*/
|
|
173
|
-
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$2=Symbol(),o$4=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)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$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$4.set(s,t));}return t}toString(){return this.cssText}};const r$6=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2),i$6=(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$4(o,t,s$2)},S$2=(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$4=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$6(e)})(t):t;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @license
|
|
177
|
-
* Copyright 2017 Google LLC
|
|
178
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
179
|
-
*/const{is:i$5,defineProperty:e$3,getOwnPropertyDescriptor:r$5,getOwnPropertyNames:h$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$3}=Object,a$2=globalThis,c$3=a$2.trustedTypes,l$2=c$3?c$3.emptyScript:"",p$2=a$2.reactiveElementPolyfillSupport,d$2=(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$2=(t,s)=>!i$5(t,s),y$2={attribute:true,type:String,converter:u$2,reflect:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let b$1 = class b 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=y$2){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$3(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$5(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$2}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$2("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$2("properties"))){const t=this.properties,s=[...h$2(t),...o$3(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$4(s));}else void 0!==s&&i.push(c$4(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$2(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);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),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),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$2)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){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) true!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}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._$EU();}catch(s){throw t=false,this._$EU(),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);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$2("elementProperties")]=new Map,b$1[d$2("finalized")]=new Map,p$2?.({ReactiveElement:b$1}),(a$2.reactiveElementVersions??=[]).push("2.0.4");
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @license
|
|
183
|
-
* Copyright 2017 Google LLC
|
|
184
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
185
|
-
*/let r$4 = class r extends b$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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B$1(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$1}};r$4._$litElement$=true,r$4["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r$4});const i$4=globalThis.litElementPolyfillSupport;i$4?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
186
|
-
|
|
187
|
-
var styleCss$4 = i$6`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-700, 3.5rem);max-height:var(--ds-size-700, 3.5rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
128
|
+
var styleCss$4 = css`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-700, 3.5rem);max-height:var(--ds-size-700, 3.5rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
|
|
188
129
|
|
|
189
|
-
var colorCss$4 =
|
|
130
|
+
var colorCss$4 = css`.wrapper{border-color:transparent}input{background-color:transparent;caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}input::placeholder{color:transparent}input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}input:disabled{--ds-auro-input-input-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}label{color:var(--ds-auro-input-label-text-color)}:host(:not([bordered],[borderless])) .wrapper{border-bottom-color:var(--ds-auro-input-border-color)}:host([bordered]) .wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-container-color)}:host([bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host(:not([borderless])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host(:not([borderless])) .wrapper:focus-within:before{border-bottom-color:transparent}:host([validity]:not([validity=valid])){--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-input-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}`;
|
|
190
131
|
|
|
191
|
-
var tokensCss$4 =
|
|
132
|
+
var tokensCss$4 = css`:host{--ds-auro-input-border-color: var(--ds-color-border-secondary-default, #939fad);--ds-auro-input-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-input-caret-color: var(--ds-color-text-ui-focus-default, #2c67b5);--ds-auro-input-label-text-color: var(--ds-color-text-tertiary-default, #6a717c);--ds-auro-input-placeholder-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
192
133
|
|
|
193
134
|
/** Checks if value is string */
|
|
194
135
|
function isString(str) {
|
|
@@ -4039,7 +3980,7 @@ class AuroInputUtilities {
|
|
|
4039
3980
|
|
|
4040
3981
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4041
3982
|
|
|
4042
|
-
let AuroLibraryRuntimeUtils$
|
|
3983
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
4043
3984
|
|
|
4044
3985
|
/* eslint-disable jsdoc/require-param */
|
|
4045
3986
|
|
|
@@ -4108,7 +4049,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
4108
4049
|
|
|
4109
4050
|
class AuroFormValidation {
|
|
4110
4051
|
constructor() {
|
|
4111
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4052
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
4112
4053
|
}
|
|
4113
4054
|
|
|
4114
4055
|
/**
|
|
@@ -4435,7 +4376,7 @@ class AuroFormValidation {
|
|
|
4435
4376
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4436
4377
|
*/
|
|
4437
4378
|
|
|
4438
|
-
class BaseInput extends
|
|
4379
|
+
class BaseInput extends LitElement {
|
|
4439
4380
|
|
|
4440
4381
|
constructor() {
|
|
4441
4382
|
super();
|
|
@@ -4786,9 +4727,9 @@ class BaseInput extends r$4 {
|
|
|
4786
4727
|
|
|
4787
4728
|
static get styles() {
|
|
4788
4729
|
return [
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4730
|
+
css`${colorCss$4}`,
|
|
4731
|
+
css`${styleCss$4}`,
|
|
4732
|
+
css`${tokensCss$4}`
|
|
4792
4733
|
];
|
|
4793
4734
|
}
|
|
4794
4735
|
|
|
@@ -5372,7 +5313,7 @@ class BaseInput extends r$4 {
|
|
|
5372
5313
|
// See LICENSE in the project root for license information.
|
|
5373
5314
|
|
|
5374
5315
|
|
|
5375
|
-
class AuroDependencyVersioning {
|
|
5316
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
5376
5317
|
|
|
5377
5318
|
/**
|
|
5378
5319
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -5398,7 +5339,7 @@ class AuroDependencyVersioning {
|
|
|
5398
5339
|
*/
|
|
5399
5340
|
generateTag(baseName, version, tagClass) {
|
|
5400
5341
|
const elementName = this.generateElementName(baseName, version);
|
|
5401
|
-
const tag =
|
|
5342
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5402
5343
|
|
|
5403
5344
|
if (!customElements.get(elementName)) {
|
|
5404
5345
|
customElements.define(elementName, class extends tagClass {});
|
|
@@ -5406,7 +5347,7 @@ class AuroDependencyVersioning {
|
|
|
5406
5347
|
|
|
5407
5348
|
return tag;
|
|
5408
5349
|
}
|
|
5409
|
-
}
|
|
5350
|
+
};
|
|
5410
5351
|
|
|
5411
5352
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5412
5353
|
// See LICENSE in the project root for license information.
|
|
@@ -5418,7 +5359,7 @@ class AuroDependencyVersioning {
|
|
|
5418
5359
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5419
5360
|
*/
|
|
5420
5361
|
|
|
5421
|
-
class AuroElement extends
|
|
5362
|
+
class AuroElement extends LitElement {
|
|
5422
5363
|
|
|
5423
5364
|
// function to define props used within the scope of this component
|
|
5424
5365
|
static get properties() {
|
|
@@ -5474,7 +5415,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
5474
5415
|
return _fetchMap.get(uri);
|
|
5475
5416
|
};
|
|
5476
5417
|
|
|
5477
|
-
var styleCss$3 =
|
|
5418
|
+
var styleCss$3 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}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}`;
|
|
5478
5419
|
|
|
5479
5420
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5480
5421
|
// See LICENSE in the project root for license information.
|
|
@@ -5513,7 +5454,7 @@ class BaseIcon extends AuroElement {
|
|
|
5513
5454
|
}
|
|
5514
5455
|
|
|
5515
5456
|
static get styles() {
|
|
5516
|
-
return
|
|
5457
|
+
return css`
|
|
5517
5458
|
${styleCss$3}
|
|
5518
5459
|
`;
|
|
5519
5460
|
}
|
|
@@ -5555,47 +5496,88 @@ class BaseIcon extends AuroElement {
|
|
|
5555
5496
|
}
|
|
5556
5497
|
}
|
|
5557
5498
|
|
|
5558
|
-
var tokensCss$3 =
|
|
5499
|
+
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-default, #676767);--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5559
5500
|
|
|
5560
|
-
var colorCss$3 =
|
|
5501
|
+
var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
5561
5502
|
|
|
5562
|
-
// Copyright (c)
|
|
5503
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5563
5504
|
// See LICENSE in the project root for license information.
|
|
5564
5505
|
|
|
5506
|
+
// ---------------------------------------------------------------------
|
|
5507
|
+
|
|
5508
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5509
|
+
|
|
5510
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5511
|
+
|
|
5512
|
+
/* eslint-disable jsdoc/require-param */
|
|
5513
|
+
|
|
5514
|
+
/**
|
|
5515
|
+
* This will register a new custom element with the browser.
|
|
5516
|
+
* @param {String} name - The name of the custom element.
|
|
5517
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5518
|
+
* @returns {void}
|
|
5519
|
+
*/
|
|
5520
|
+
registerComponent(name, componentClass) {
|
|
5521
|
+
if (!customElements.get(name)) {
|
|
5522
|
+
customElements.define(name, class extends componentClass {});
|
|
5523
|
+
}
|
|
5524
|
+
}
|
|
5525
|
+
|
|
5526
|
+
/**
|
|
5527
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5528
|
+
* @returns {void}
|
|
5529
|
+
*/
|
|
5530
|
+
closestElement(
|
|
5531
|
+
selector, // selector like in .closest()
|
|
5532
|
+
base = this, // extra functionality to skip a parent
|
|
5533
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5534
|
+
!el || el === document || el === window
|
|
5535
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5536
|
+
: found
|
|
5537
|
+
? found // found a selector INside this element
|
|
5538
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5539
|
+
) {
|
|
5540
|
+
return __Closest(base);
|
|
5541
|
+
}
|
|
5542
|
+
/* eslint-enable jsdoc/require-param */
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* 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.
|
|
5546
|
+
* @param {Object} elem - The element to check.
|
|
5547
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5548
|
+
* @returns {void}
|
|
5549
|
+
*/
|
|
5550
|
+
handleComponentTagRename(elem, tagName) {
|
|
5551
|
+
const tag = tagName.toLowerCase();
|
|
5552
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5553
|
+
|
|
5554
|
+
if (elemTag !== tag) {
|
|
5555
|
+
elem.setAttribute(tag, true);
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
/**
|
|
5560
|
+
* Validates if an element is a specific Auro component.
|
|
5561
|
+
* @param {Object} elem - The element to validate.
|
|
5562
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5563
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5564
|
+
*/
|
|
5565
|
+
elementMatch(elem, tagName) {
|
|
5566
|
+
const tag = tagName.toLowerCase();
|
|
5567
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5568
|
+
|
|
5569
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5570
|
+
}
|
|
5571
|
+
};
|
|
5572
|
+
|
|
5573
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5574
|
+
// See LICENSE in the project root for license information.
|
|
5565
5575
|
|
|
5566
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5567
|
-
/**
|
|
5568
|
-
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
5569
|
-
*
|
|
5570
|
-
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5571
|
-
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
5572
|
-
* @attr {Boolean} customColor - Removes primary selector.
|
|
5573
|
-
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
5574
|
-
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
5575
|
-
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
5576
|
-
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
5577
|
-
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
5578
|
-
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
5579
|
-
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
5580
|
-
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
5581
|
-
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
5582
|
-
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
5583
|
-
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
5584
|
-
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
5585
|
-
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
5586
|
-
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5587
|
-
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
5588
|
-
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
5589
|
-
* @slot svg - Used for custom SVG content.
|
|
5590
|
-
*/
|
|
5591
5576
|
|
|
5592
|
-
// build the component class
|
|
5593
5577
|
class AuroIcon extends BaseIcon {
|
|
5594
5578
|
constructor() {
|
|
5595
5579
|
super();
|
|
5596
5580
|
|
|
5597
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5598
|
-
|
|
5599
5581
|
this.privateDefaults();
|
|
5600
5582
|
}
|
|
5601
5583
|
|
|
@@ -5619,78 +5601,144 @@ class AuroIcon extends BaseIcon {
|
|
|
5619
5601
|
this.success = false;
|
|
5620
5602
|
this.tertiary = false;
|
|
5621
5603
|
this.warning = false;
|
|
5622
|
-
this.
|
|
5604
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5605
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
5623
5606
|
}
|
|
5624
5607
|
|
|
5625
5608
|
// function to define props used within the scope of this component
|
|
5626
5609
|
static get properties() {
|
|
5627
5610
|
return {
|
|
5628
5611
|
...super.properties,
|
|
5612
|
+
|
|
5613
|
+
/**
|
|
5614
|
+
* Sets the icon to use the accent style.
|
|
5615
|
+
*/
|
|
5629
5616
|
accent: {
|
|
5630
5617
|
type: Boolean,
|
|
5631
5618
|
reflect: true
|
|
5632
5619
|
},
|
|
5620
|
+
|
|
5621
|
+
/**
|
|
5622
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5623
|
+
*/
|
|
5633
5624
|
ariaHidden: {
|
|
5634
5625
|
type: String,
|
|
5635
5626
|
reflect: true
|
|
5636
5627
|
},
|
|
5628
|
+
|
|
5629
|
+
/**
|
|
5630
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5631
|
+
*/
|
|
5637
5632
|
category: {
|
|
5638
5633
|
type: String,
|
|
5639
5634
|
reflect: true
|
|
5640
5635
|
},
|
|
5636
|
+
|
|
5637
|
+
/**
|
|
5638
|
+
* Allows custom color to be set.
|
|
5639
|
+
*/
|
|
5641
5640
|
customColor: {
|
|
5642
5641
|
type: Boolean
|
|
5643
5642
|
},
|
|
5643
|
+
|
|
5644
|
+
/**
|
|
5645
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
5646
|
+
*/
|
|
5644
5647
|
customSvg: {
|
|
5645
5648
|
type: Boolean
|
|
5646
5649
|
},
|
|
5650
|
+
|
|
5651
|
+
/**
|
|
5652
|
+
* Sets the icon to use the disabled style.
|
|
5653
|
+
*/
|
|
5647
5654
|
disabled: {
|
|
5648
5655
|
type: Boolean,
|
|
5649
5656
|
reflect: true
|
|
5650
5657
|
},
|
|
5658
|
+
|
|
5659
|
+
/**
|
|
5660
|
+
* Sets the icon to use the emphasis style.
|
|
5661
|
+
*/
|
|
5651
5662
|
emphasis: {
|
|
5652
5663
|
type: Boolean,
|
|
5653
5664
|
reflect: true
|
|
5654
5665
|
},
|
|
5666
|
+
|
|
5667
|
+
/**
|
|
5668
|
+
* Sets the icon to use the error style.
|
|
5669
|
+
*/
|
|
5655
5670
|
error: {
|
|
5656
5671
|
type: Boolean,
|
|
5657
5672
|
reflect: true
|
|
5658
5673
|
},
|
|
5674
|
+
|
|
5675
|
+
/**
|
|
5676
|
+
* Sets the icon to use the info style.
|
|
5677
|
+
*/
|
|
5659
5678
|
info: {
|
|
5660
5679
|
type: Boolean,
|
|
5661
5680
|
reflect: true
|
|
5662
5681
|
},
|
|
5682
|
+
|
|
5683
|
+
/**
|
|
5684
|
+
* Exposes content in slot as icon label.
|
|
5685
|
+
*/
|
|
5663
5686
|
label: {
|
|
5664
5687
|
type: Boolean,
|
|
5665
5688
|
reflect: true
|
|
5666
5689
|
},
|
|
5690
|
+
|
|
5691
|
+
/**
|
|
5692
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
5693
|
+
*/
|
|
5667
5694
|
name: {
|
|
5668
5695
|
type: String,
|
|
5669
5696
|
reflect: true
|
|
5670
5697
|
},
|
|
5698
|
+
|
|
5699
|
+
/**
|
|
5700
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
5701
|
+
*/
|
|
5671
5702
|
primary: {
|
|
5672
5703
|
type: Boolean,
|
|
5673
5704
|
reflect: true
|
|
5674
5705
|
},
|
|
5706
|
+
|
|
5707
|
+
/**
|
|
5708
|
+
* Sets the icon to use the secondary style.
|
|
5709
|
+
*/
|
|
5675
5710
|
secondary: {
|
|
5676
5711
|
type: Boolean,
|
|
5677
5712
|
reflect: true
|
|
5678
5713
|
},
|
|
5714
|
+
|
|
5715
|
+
/**
|
|
5716
|
+
* Sets the icon to use the subtle style.
|
|
5717
|
+
*/
|
|
5679
5718
|
subtle: {
|
|
5680
5719
|
type: Boolean,
|
|
5681
5720
|
reflect: true
|
|
5682
5721
|
},
|
|
5722
|
+
|
|
5723
|
+
/**
|
|
5724
|
+
* Sets the icon to use the success style.
|
|
5725
|
+
*/
|
|
5683
5726
|
success: {
|
|
5684
5727
|
type: Boolean,
|
|
5685
5728
|
reflect: true
|
|
5686
5729
|
},
|
|
5730
|
+
|
|
5731
|
+
/**
|
|
5732
|
+
* Sets the icon to use the tertiary style.
|
|
5733
|
+
*/
|
|
5687
5734
|
tertiary: {
|
|
5688
5735
|
type: Boolean,
|
|
5689
5736
|
reflect: true
|
|
5690
5737
|
},
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* Sets the icon to use the warning style.
|
|
5741
|
+
*/
|
|
5694
5742
|
warning: {
|
|
5695
5743
|
type: Boolean,
|
|
5696
5744
|
reflect: true
|
|
@@ -5701,9 +5749,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5701
5749
|
static get styles() {
|
|
5702
5750
|
return [
|
|
5703
5751
|
super.styles,
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5752
|
+
css`${tokensCss$3}`,
|
|
5753
|
+
css`${styleCss$3}`,
|
|
5754
|
+
css`${colorCss$3}`
|
|
5707
5755
|
];
|
|
5708
5756
|
}
|
|
5709
5757
|
|
|
@@ -5716,7 +5764,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5716
5764
|
*
|
|
5717
5765
|
*/
|
|
5718
5766
|
static register(name = "auro-icon") {
|
|
5719
|
-
AuroLibraryRuntimeUtils$
|
|
5767
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
5720
5768
|
}
|
|
5721
5769
|
|
|
5722
5770
|
connectedCallback() {
|
|
@@ -5727,38 +5775,54 @@ class AuroIcon extends BaseIcon {
|
|
|
5727
5775
|
}
|
|
5728
5776
|
|
|
5729
5777
|
/**
|
|
5778
|
+
* @private
|
|
5730
5779
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
5731
5780
|
*/
|
|
5732
5781
|
exposeCssParts() {
|
|
5733
5782
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
5734
5783
|
}
|
|
5735
5784
|
|
|
5785
|
+
async firstUpdated() {
|
|
5786
|
+
await super.firstUpdated();
|
|
5787
|
+
|
|
5788
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
5789
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
5790
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
5791
|
+
|
|
5792
|
+
if (svgDesc) {
|
|
5793
|
+
svgDesc.remove();
|
|
5794
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
5795
|
+
}
|
|
5796
|
+
}
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5736
5799
|
// function that renders the HTML and CSS into the scope of the component
|
|
5737
5800
|
render() {
|
|
5738
|
-
const
|
|
5739
|
-
'
|
|
5801
|
+
const labelClasses = {
|
|
5802
|
+
'labelWrapper': true,
|
|
5740
5803
|
'util_displayHiddenVisually': !this.label
|
|
5741
5804
|
};
|
|
5742
5805
|
|
|
5743
|
-
const
|
|
5744
|
-
'
|
|
5745
|
-
'wrapper': true,
|
|
5806
|
+
const svgClasses = {
|
|
5807
|
+
'svgWrapper': true,
|
|
5746
5808
|
};
|
|
5747
5809
|
|
|
5748
|
-
return
|
|
5749
|
-
<div
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
${this.
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5810
|
+
return html`
|
|
5811
|
+
<div class="componentWrapper">
|
|
5812
|
+
<div
|
|
5813
|
+
class="${classMap(svgClasses)}"
|
|
5814
|
+
title="${ifDefined(this.title || undefined)}">
|
|
5815
|
+
<span aria-hidden="${ifDefined(this.ariaHidden || true)}" part="svg">
|
|
5816
|
+
${this.customSvg ? html`
|
|
5817
|
+
<slot name="svg"></slot>
|
|
5818
|
+
` : html`
|
|
5819
|
+
${this.svg}
|
|
5820
|
+
`
|
|
5821
|
+
}
|
|
5822
|
+
</span>
|
|
5823
|
+
</div>
|
|
5760
5824
|
|
|
5761
|
-
<div class="${
|
|
5825
|
+
<div class="${classMap(labelClasses)}">
|
|
5762
5826
|
<slot></slot>
|
|
5763
5827
|
</div>
|
|
5764
5828
|
</div>
|
|
@@ -5768,17 +5832,197 @@ class AuroIcon extends BaseIcon {
|
|
|
5768
5832
|
|
|
5769
5833
|
var iconVersion = '6.1.2';
|
|
5770
5834
|
|
|
5771
|
-
|
|
5835
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5836
|
+
// See LICENSE in the project root for license information.
|
|
5772
5837
|
|
|
5773
|
-
var colorCss$2 = i$6`[auro-loader]{color:var(--ds-auro-button-loader-color)}.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:after{border-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-active-default, #225296)}.auro-button:not([ondark])[disabled]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1)}@media(hover: hover){.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-border-color: var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-text-color: var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.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-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: var(--ds-color-border-ui-hover-default, #193d73);--ds-auro-button-text-color: var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-color-border-ui-focus-default, #2c67b5)}.auro-button:not([ondark])[variant=secondary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-border-color: var(--ds-color-border-ui-active-default, #225296);--ds-auro-button-text-color: var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.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-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-border-inset-color: var(--ds-color-border-ui-default-default, #2c67b5)}.auro-button:not([ondark])[variant=tertiary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-color-icon-ui-secondary-default-default);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-default);background-color:transparent;background-image:none;border-color:transparent}}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-color-icon-ui-secondary-disabled-default);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-button-loader-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7)}}.auro-button[ondark]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef)}.auro-button[ondark][disabled]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-disabled-inverse, #275b72)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-border-color: var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-text-color: var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=secondary]:hover{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: var(--ds-color-border-ui-hover-inverse, #a8e9f7);--ds-auro-button-text-color: var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-color-border-ui-focus-inverse, #56bbde)}.auro-button[ondark][variant=secondary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color: var(--ds-color-border-ui-active-inverse, #6ad5ef);--ds-auro-button-text-color: var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: var(--ds-color-border-ui-disabled-inverse, #7e7e7e);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-border-inset-color: var(--ds-color-border-ui-default-inverse, #56bbde)}.auro-button[ondark][variant=tertiary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=flat]{color:var(--ds-color-icon-ui-secondary-default-inverse);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-inverse);background-color:transparent;background-image:none;border-color:transparent}}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-color-icon-ui-disabled-default);background-color:transparent;background-image:none;border-color:transparent}`;
|
|
5774
5838
|
|
|
5775
|
-
|
|
5839
|
+
class AuroDependencyVersioning {
|
|
5776
5840
|
|
|
5777
|
-
|
|
5841
|
+
/**
|
|
5842
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5843
|
+
* @private
|
|
5844
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5845
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5846
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5847
|
+
*/
|
|
5848
|
+
generateElementName(baseName, version) {
|
|
5849
|
+
let result = baseName;
|
|
5778
5850
|
|
|
5779
|
-
|
|
5851
|
+
result += '-';
|
|
5852
|
+
result += version.replace(/[.]/g, '_');
|
|
5780
5853
|
|
|
5781
|
-
|
|
5854
|
+
return result;
|
|
5855
|
+
}
|
|
5856
|
+
|
|
5857
|
+
/**
|
|
5858
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5859
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5860
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5861
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5862
|
+
*/
|
|
5863
|
+
generateTag(baseName, version, tagClass) {
|
|
5864
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5865
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5866
|
+
|
|
5867
|
+
if (!customElements.get(elementName)) {
|
|
5868
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
return tag;
|
|
5872
|
+
}
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5876
|
+
// See LICENSE in the project root for license information.
|
|
5877
|
+
|
|
5878
|
+
// ---------------------------------------------------------------------
|
|
5879
|
+
|
|
5880
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5881
|
+
|
|
5882
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5883
|
+
|
|
5884
|
+
/* eslint-disable jsdoc/require-param */
|
|
5885
|
+
|
|
5886
|
+
/**
|
|
5887
|
+
* This will register a new custom element with the browser.
|
|
5888
|
+
* @param {String} name - The name of the custom element.
|
|
5889
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5890
|
+
* @returns {void}
|
|
5891
|
+
*/
|
|
5892
|
+
registerComponent(name, componentClass) {
|
|
5893
|
+
if (!customElements.get(name)) {
|
|
5894
|
+
customElements.define(name, class extends componentClass {});
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5898
|
+
/**
|
|
5899
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5900
|
+
* @returns {void}
|
|
5901
|
+
*/
|
|
5902
|
+
closestElement(
|
|
5903
|
+
selector, // selector like in .closest()
|
|
5904
|
+
base = this, // extra functionality to skip a parent
|
|
5905
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5906
|
+
!el || el === document || el === window
|
|
5907
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5908
|
+
: found
|
|
5909
|
+
? found // found a selector INside this element
|
|
5910
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5911
|
+
) {
|
|
5912
|
+
return __Closest(base);
|
|
5913
|
+
}
|
|
5914
|
+
/* eslint-enable jsdoc/require-param */
|
|
5915
|
+
|
|
5916
|
+
/**
|
|
5917
|
+
* 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.
|
|
5918
|
+
* @param {Object} elem - The element to check.
|
|
5919
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5920
|
+
* @returns {void}
|
|
5921
|
+
*/
|
|
5922
|
+
handleComponentTagRename(elem, tagName) {
|
|
5923
|
+
const tag = tagName.toLowerCase();
|
|
5924
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5925
|
+
|
|
5926
|
+
if (elemTag !== tag) {
|
|
5927
|
+
elem.setAttribute(tag, true);
|
|
5928
|
+
}
|
|
5929
|
+
}
|
|
5930
|
+
|
|
5931
|
+
/**
|
|
5932
|
+
* Validates if an element is a specific Auro component.
|
|
5933
|
+
* @param {Object} elem - The element to validate.
|
|
5934
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5935
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5936
|
+
*/
|
|
5937
|
+
elementMatch(elem, tagName) {
|
|
5938
|
+
const tag = tagName.toLowerCase();
|
|
5939
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5940
|
+
|
|
5941
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5942
|
+
}
|
|
5943
|
+
};
|
|
5944
|
+
|
|
5945
|
+
var styleCss$2 = css`: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}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-text-body-size-default, 1rem);font-weight:var(--ds-text-body-default-weight, 500);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-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}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]):after{display:block;content:"";height:calc(100% - 2px);width:calc(100% - 2px);position:absolute;top:1px;left:1px;border-radius:4px;border-style:solid;border-width:2px}.auro-button:focus-visible[variant=secondary]:after,.auro-button:focus-visible[variant=tertiary]:after{display:block;content:"";height:100%;width:100%;position:absolute;top:0;left:0;border-radius:var(--ds-border-radius, 0.375rem);border-style:solid;border-width:2px}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=flat]{height:unset;width:unset;min-height:unset;max-height:unset;min-width:unset;max-width:unset;border:0;border-radius:unset;gap:unset;padding:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{padding:var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);font-size:var(--ds-text-body-size-sm, 0.875rem);min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, $ds-size-300)}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-50, $ds-size-50))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:all 300ms ease-out}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, $ds-size-300)}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
5946
|
+
|
|
5947
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.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:after{border-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active{--ds-auro-button-container-color:var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-active-default, #225296)}.auro-button:not([ondark])[disabled]{--ds-auro-button-container-color:var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-disabled-default, #a0c9f1)}@media(hover: hover){.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-border-color:var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-text-color:var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.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-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color:var(--ds-color-border-ui-hover-default, #193d73);--ds-auro-button-text-color:var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-color-border-ui-focus-default, #2c67b5)}.auro-button:not([ondark])[variant=secondary]:active{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-border-color:var(--ds-color-border-ui-active-default, #225296);--ds-auro-button-text-color:var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-border-color:var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-button-text-color:var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.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-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-border-inset-color:var(--ds-color-border-ui-default-default, #2c67b5)}.auro-button:not([ondark])[variant=tertiary]:active{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-color-icon-ui-secondary-default-default);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-default);background-color:transparent;background-image:none;border-color:transparent}}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-color-icon-ui-secondary-disabled-default);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-container-color:var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-text-color:var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-button-loader-color:var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7)}}.auro-button[ondark]:active{--ds-auro-button-container-color:var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-active-inverse, #6ad5ef)}.auro-button[ondark][disabled]{--ds-auro-button-container-color:var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-text-color:var(--ds-color-text-ui-disabled-inverse, #7e7e7e);--ds-auro-button-border-color:var(--ds-color-container-ui-primary-disabled-inverse, #275b72)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-border-color:var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-text-color:var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=secondary]:hover{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color:var(--ds-color-border-ui-hover-inverse, #a8e9f7);--ds-auro-button-text-color:var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-color-border-ui-focus-inverse, #56bbde)}.auro-button[ondark][variant=secondary]:active{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color:var(--ds-color-border-ui-active-inverse, #6ad5ef);--ds-auro-button-text-color:var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image:var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color:var(--ds-color-border-ui-disabled-inverse, #7e7e7e);--ds-auro-button-text-color:var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-border-inset-color:var(--ds-color-border-ui-default-inverse, #56bbde)}.auro-button[ondark][variant=tertiary]:active{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-container-color:var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image:var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=flat]{color:var(--ds-color-icon-ui-secondary-default-inverse);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-inverse);background-color:transparent;background-image:none;border-color:transparent}}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-color-icon-ui-disabled-default);background-color:transparent;background-image:none;border-color:transparent}`;
|
|
5948
|
+
|
|
5949
|
+
var tokensCss$2 = css`:host{--ds-auro-button-border-color:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-border-inset-color:var(--ds-color-border-emphasis-inverse, #f2f7fb);--ds-auro-button-container-color:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-loader-color:var(--ds-color-utility-navy-default, #265688);--ds-auro-button-text-color:var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-tap-color:transparent}`;
|
|
5950
|
+
|
|
5951
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5952
|
+
// See LICENSE in the project root for license information.
|
|
5953
|
+
|
|
5954
|
+
// ---------------------------------------------------------------------
|
|
5955
|
+
|
|
5956
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5957
|
+
|
|
5958
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5959
|
+
|
|
5960
|
+
/* eslint-disable jsdoc/require-param */
|
|
5961
|
+
|
|
5962
|
+
/**
|
|
5963
|
+
* This will register a new custom element with the browser.
|
|
5964
|
+
* @param {String} name - The name of the custom element.
|
|
5965
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5966
|
+
* @returns {void}
|
|
5967
|
+
*/
|
|
5968
|
+
registerComponent(name, componentClass) {
|
|
5969
|
+
if (!customElements.get(name)) {
|
|
5970
|
+
customElements.define(name, class extends componentClass {});
|
|
5971
|
+
}
|
|
5972
|
+
}
|
|
5973
|
+
|
|
5974
|
+
/**
|
|
5975
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5976
|
+
* @returns {void}
|
|
5977
|
+
*/
|
|
5978
|
+
closestElement(
|
|
5979
|
+
selector, // selector like in .closest()
|
|
5980
|
+
base = this, // extra functionality to skip a parent
|
|
5981
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5982
|
+
!el || el === document || el === window
|
|
5983
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5984
|
+
: found
|
|
5985
|
+
? found // found a selector INside this element
|
|
5986
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5987
|
+
) {
|
|
5988
|
+
return __Closest(base);
|
|
5989
|
+
}
|
|
5990
|
+
/* eslint-enable jsdoc/require-param */
|
|
5991
|
+
|
|
5992
|
+
/**
|
|
5993
|
+
* 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.
|
|
5994
|
+
* @param {Object} elem - The element to check.
|
|
5995
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5996
|
+
* @returns {void}
|
|
5997
|
+
*/
|
|
5998
|
+
handleComponentTagRename(elem, tagName) {
|
|
5999
|
+
const tag = tagName.toLowerCase();
|
|
6000
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6001
|
+
|
|
6002
|
+
if (elemTag !== tag) {
|
|
6003
|
+
elem.setAttribute(tag, true);
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
|
|
6007
|
+
/**
|
|
6008
|
+
* Validates if an element is a specific Auro component.
|
|
6009
|
+
* @param {Object} elem - The element to validate.
|
|
6010
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6011
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6012
|
+
*/
|
|
6013
|
+
elementMatch(elem, tagName) {
|
|
6014
|
+
const tag = tagName.toLowerCase();
|
|
6015
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6016
|
+
|
|
6017
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6018
|
+
}
|
|
6019
|
+
};
|
|
6020
|
+
|
|
6021
|
+
var styleCss$1 = css`: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;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
6022
|
+
|
|
6023
|
+
var colorCss$1 = css`: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-color-utility-navy-default, #265688)}:host([ondark]){--ds-auro-loader-color:var(--ds-color-utility-cyan-inverse, #a8e9f7)}:host([white]){--ds-auro-loader-color:var(--ds-color-utility-neutral-inverse, #ccd2db)}: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}`;
|
|
6024
|
+
|
|
6025
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
5782
6026
|
|
|
5783
6027
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5784
6028
|
// See LICENSE in the project root for license information.
|
|
@@ -5803,7 +6047,7 @@ var tokensCss$1 = i$6`:host{--ds-auro-loader-background-color: currentcolor;--ds
|
|
|
5803
6047
|
*/
|
|
5804
6048
|
|
|
5805
6049
|
// build the component class
|
|
5806
|
-
class AuroLoader extends
|
|
6050
|
+
class AuroLoader extends LitElement {
|
|
5807
6051
|
constructor() {
|
|
5808
6052
|
super();
|
|
5809
6053
|
|
|
@@ -5857,9 +6101,9 @@ class AuroLoader extends r$4 {
|
|
|
5857
6101
|
|
|
5858
6102
|
static get styles() {
|
|
5859
6103
|
return [
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
6104
|
+
css`${styleCss$1}`,
|
|
6105
|
+
css`${colorCss$1}`,
|
|
6106
|
+
css`${tokensCss$1}`
|
|
5863
6107
|
];
|
|
5864
6108
|
}
|
|
5865
6109
|
|
|
@@ -5905,14 +6149,14 @@ class AuroLoader extends r$4 {
|
|
|
5905
6149
|
|
|
5906
6150
|
// function that renders the HTML and CSS into the scope of the component
|
|
5907
6151
|
render() {
|
|
5908
|
-
return
|
|
5909
|
-
${this.defineTemplate().map((idx) =>
|
|
6152
|
+
return html`
|
|
6153
|
+
${this.defineTemplate().map((idx) => html`
|
|
5910
6154
|
<span part="element" class="loader node-${idx}"></span>
|
|
5911
6155
|
`)}
|
|
5912
6156
|
|
|
5913
6157
|
<div class="no-animation">Loading...</div>
|
|
5914
6158
|
|
|
5915
|
-
${this.ringworm ?
|
|
6159
|
+
${this.ringworm ? html`
|
|
5916
6160
|
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
5917
6161
|
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
5918
6162
|
</svg>`
|
|
@@ -5922,7 +6166,7 @@ class AuroLoader extends r$4 {
|
|
|
5922
6166
|
}
|
|
5923
6167
|
}
|
|
5924
6168
|
|
|
5925
|
-
var loaderVersion = '
|
|
6169
|
+
var loaderVersion = '4.0.0';
|
|
5926
6170
|
|
|
5927
6171
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5928
6172
|
// See LICENSE in the project root for license information.
|
|
@@ -5958,10 +6202,20 @@ var loaderVersion = '3.1.1';
|
|
|
5958
6202
|
|
|
5959
6203
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
5960
6204
|
|
|
5961
|
-
class AuroButton extends
|
|
6205
|
+
class AuroButton extends LitElement {
|
|
6206
|
+
|
|
6207
|
+
/**
|
|
6208
|
+
* Enables form association for this element.
|
|
6209
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6210
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6211
|
+
*/
|
|
6212
|
+
static get formAssociated() {
|
|
6213
|
+
return true;
|
|
6214
|
+
}
|
|
5962
6215
|
|
|
5963
6216
|
constructor() {
|
|
5964
6217
|
super();
|
|
6218
|
+
|
|
5965
6219
|
this.autofocus = false;
|
|
5966
6220
|
this.disabled = false;
|
|
5967
6221
|
this.iconOnly = false;
|
|
@@ -5974,6 +6228,16 @@ class AuroButton extends r$4 {
|
|
|
5974
6228
|
this.slim = false;
|
|
5975
6229
|
this.fluid = false;
|
|
5976
6230
|
|
|
6231
|
+
// Support for HTML5 forms
|
|
6232
|
+
if (typeof this.attachInternals === 'function') {
|
|
6233
|
+
this.internals = this.attachInternals();
|
|
6234
|
+
} else {
|
|
6235
|
+
this.internals = null;
|
|
6236
|
+
|
|
6237
|
+
// eslint-disable-next-line no-console
|
|
6238
|
+
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.');
|
|
6239
|
+
}
|
|
6240
|
+
|
|
5977
6241
|
/**
|
|
5978
6242
|
* Generate unique names for dependency components.
|
|
5979
6243
|
*/
|
|
@@ -6072,7 +6336,7 @@ class AuroButton extends r$4 {
|
|
|
6072
6336
|
*
|
|
6073
6337
|
*/
|
|
6074
6338
|
static register(name = "auro-button") {
|
|
6075
|
-
AuroLibraryRuntimeUtils$
|
|
6339
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6076
6340
|
}
|
|
6077
6341
|
|
|
6078
6342
|
/**
|
|
@@ -6114,6 +6378,16 @@ class AuroButton extends r$4 {
|
|
|
6114
6378
|
this.notifyReady();
|
|
6115
6379
|
}
|
|
6116
6380
|
|
|
6381
|
+
surfaceSubmitEvent() {
|
|
6382
|
+
if (this.form) {
|
|
6383
|
+
this.form.requestSubmit();
|
|
6384
|
+
}
|
|
6385
|
+
}
|
|
6386
|
+
|
|
6387
|
+
get form() {
|
|
6388
|
+
return this.internals ? this.internals.form : null;
|
|
6389
|
+
}
|
|
6390
|
+
|
|
6117
6391
|
render() {
|
|
6118
6392
|
const classes = {
|
|
6119
6393
|
'util_insetLg--squish': true,
|
|
@@ -6126,27 +6400,27 @@ class AuroButton extends r$4 {
|
|
|
6126
6400
|
'loading': this.loading
|
|
6127
6401
|
};
|
|
6128
6402
|
|
|
6129
|
-
return
|
|
6403
|
+
return html$1`
|
|
6130
6404
|
<button
|
|
6131
6405
|
part="button"
|
|
6132
|
-
aria-label="${
|
|
6133
|
-
aria-labelledby="${
|
|
6406
|
+
aria-label="${ifDefined(this.arialabel ? this.arialabel : undefined)}"
|
|
6407
|
+
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
6134
6408
|
?autofocus="${this.autofocus}"
|
|
6135
|
-
class="${
|
|
6409
|
+
class="${classMap(classes)}"
|
|
6136
6410
|
?disabled="${this.disabled || this.loading}"
|
|
6137
6411
|
?onDark="${this.onDark}"
|
|
6138
|
-
title="${
|
|
6139
|
-
name="${
|
|
6140
|
-
type="${
|
|
6141
|
-
variant="${
|
|
6142
|
-
.value="${
|
|
6143
|
-
@click="${
|
|
6412
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
6413
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
6414
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
6415
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
6416
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
6417
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6144
6418
|
>
|
|
6145
|
-
${
|
|
6419
|
+
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6146
6420
|
|
|
6147
6421
|
<span class="contentWrapper">
|
|
6148
6422
|
<span class="textSlot" part="text">
|
|
6149
|
-
${this.iconOnly ? undefined :
|
|
6423
|
+
${this.iconOnly ? undefined : html$1`<slot></slot>`}
|
|
6150
6424
|
</span>
|
|
6151
6425
|
|
|
6152
6426
|
<span part="icon">
|
|
@@ -6160,37 +6434,11 @@ class AuroButton extends r$4 {
|
|
|
6160
6434
|
|
|
6161
6435
|
var buttonVersion = '8.2.2';
|
|
6162
6436
|
|
|
6163
|
-
|
|
6164
|
-
* @license
|
|
6165
|
-
* Copyright 2019 Google LLC
|
|
6166
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6167
|
-
*/
|
|
6168
|
-
const t$1=globalThis,e$2=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1=Symbol(),o$2=new WeakMap;let n$2 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$1)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$2&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$3=t=>new n$2("string"==typeof t?t:t+"",void 0,s$1),i$3=(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$2(o,t,s$1)},S$1=(s,o)=>{if(e$2)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$2?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
|
|
6437
|
+
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-color-text-error-default, #cc1816)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6169
6438
|
|
|
6170
|
-
|
|
6171
|
-
* @license
|
|
6172
|
-
* Copyright 2017 Google LLC
|
|
6173
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6174
|
-
*/const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:r$2,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$1,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1: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$2(t,s),y$1={attribute:true,type:String,converter:u$1,reflect:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b 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=y$1){if(s.state&&(s.attribute=false),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$1(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$2(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(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=[...h$1(t),...o$1(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);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),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),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),true===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){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) true!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}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._$EU();}catch(s){throw t=false,this._$EU(),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);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
|
|
6439
|
+
var styleCss = css`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}:host([large]) .helptext-wrapper{font-size:var(--ds-text-body-size-default, 1rem)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6175
6440
|
|
|
6176
|
-
|
|
6177
|
-
* @license
|
|
6178
|
-
* Copyright 2017 Google LLC
|
|
6179
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6180
|
-
*/
|
|
6181
|
-
const t=globalThis,i$1=t.trustedTypes,s=i$1?i$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,e="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o="?"+h,n=`<${o}>`,r$1=document,l=()=>r$1.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(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$1.createTreeWalker(r$1,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.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:d>=0?(o.push(a),s.slice(0,d)+e+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)){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$1?i$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o)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$1.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$1).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$1,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(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$1.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(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()),this.O(l()),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.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push("3.2.1");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(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
6182
|
-
|
|
6183
|
-
/**
|
|
6184
|
-
* @license
|
|
6185
|
-
* Copyright 2017 Google LLC
|
|
6186
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6187
|
-
*/class r extends b{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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}}r._$litElement$=true,r["finalized"]=true,globalThis.litElementHydrateSupport?.({LitElement:r});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
6188
|
-
|
|
6189
|
-
var colorCss = i$3`:host([error]){--ds-auro-helptext-color: var(--ds-color-text-error-default, #cc1816)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6190
|
-
|
|
6191
|
-
var styleCss = i$3`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}:host([large]) .helptext-wrapper{font-size:var(--ds-text-body-size-default, 1rem)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6192
|
-
|
|
6193
|
-
var tokensCss = i$3`:host{--ds-auro-helptext-color: var(--ds-color-text-tertiary-default, #6a717c)}`;
|
|
6441
|
+
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-color-text-tertiary-default, #6a717c)}`;
|
|
6194
6442
|
|
|
6195
6443
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6196
6444
|
// See LICENSE in the project root for license information.
|
|
@@ -6271,7 +6519,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
6271
6519
|
*
|
|
6272
6520
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6273
6521
|
*/
|
|
6274
|
-
class AuroHelpText extends
|
|
6522
|
+
class AuroHelpText extends LitElement {
|
|
6275
6523
|
|
|
6276
6524
|
constructor() {
|
|
6277
6525
|
super();
|
|
@@ -6375,7 +6623,7 @@ class AuroHelpText extends r {
|
|
|
6375
6623
|
|
|
6376
6624
|
// function that renders the HTML and CSS into the scope of the component
|
|
6377
6625
|
render() {
|
|
6378
|
-
return
|
|
6626
|
+
return html`
|
|
6379
6627
|
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
6380
6628
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6381
6629
|
</div>
|
|
@@ -6397,22 +6645,22 @@ class AuroInput extends BaseInput {
|
|
|
6397
6645
|
/**
|
|
6398
6646
|
* Generate unique names for dependency components.
|
|
6399
6647
|
*/
|
|
6400
|
-
const versioning = new AuroDependencyVersioning();
|
|
6648
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
6401
6649
|
|
|
6402
6650
|
/**
|
|
6403
6651
|
* @private
|
|
6404
6652
|
*/
|
|
6405
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
6653
|
+
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
|
|
6406
6654
|
|
|
6407
6655
|
/**
|
|
6408
6656
|
* @private
|
|
6409
6657
|
*/
|
|
6410
|
-
this.buttonTag = versioning.generateTag('auro-button', buttonVersion, AuroButton);
|
|
6658
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
6411
6659
|
|
|
6412
6660
|
/**
|
|
6413
6661
|
* @private
|
|
6414
6662
|
*/
|
|
6415
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
6663
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6416
6664
|
}
|
|
6417
6665
|
|
|
6418
6666
|
/**
|
|
@@ -6424,7 +6672,7 @@ class AuroInput extends BaseInput {
|
|
|
6424
6672
|
*
|
|
6425
6673
|
*/
|
|
6426
6674
|
static register(name = "auro-input") {
|
|
6427
|
-
AuroLibraryRuntimeUtils$
|
|
6675
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroInput);
|
|
6428
6676
|
}
|
|
6429
6677
|
|
|
6430
6678
|
/**
|
|
@@ -6449,7 +6697,7 @@ class AuroInput extends BaseInput {
|
|
|
6449
6697
|
'withValue': this.value && this.value.length > 0
|
|
6450
6698
|
};
|
|
6451
6699
|
|
|
6452
|
-
return
|
|
6700
|
+
return html$1`
|
|
6453
6701
|
<div class="wrapper" part="wrapper">
|
|
6454
6702
|
<div class="main">
|
|
6455
6703
|
<div class="typeIcon">
|
|
@@ -6458,7 +6706,7 @@ class AuroInput extends BaseInput {
|
|
|
6458
6706
|
<!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
|
|
6459
6707
|
This should be cleaned up when auro-icon issue #31 is resolved. -->
|
|
6460
6708
|
${this.inputIconName
|
|
6461
|
-
?
|
|
6709
|
+
? repeat([this.inputIconName], (val) => val, (name) => html$1`
|
|
6462
6710
|
<${this.iconTag}
|
|
6463
6711
|
class="accentIcon"
|
|
6464
6712
|
category="payment"
|
|
@@ -6470,7 +6718,7 @@ class AuroInput extends BaseInput {
|
|
|
6470
6718
|
}
|
|
6471
6719
|
|
|
6472
6720
|
${this.type === 'date'
|
|
6473
|
-
?
|
|
6721
|
+
? html$1`
|
|
6474
6722
|
<${this.iconTag}
|
|
6475
6723
|
class="accentIcon"
|
|
6476
6724
|
category="interface"
|
|
@@ -6481,7 +6729,7 @@ class AuroInput extends BaseInput {
|
|
|
6481
6729
|
: undefined
|
|
6482
6730
|
}
|
|
6483
6731
|
</div>
|
|
6484
|
-
<label for=${this.id} class="${
|
|
6732
|
+
<label for=${this.id} class="${classMap(labelClasses)}" part="label">
|
|
6485
6733
|
<slot name="label">
|
|
6486
6734
|
${this.label}
|
|
6487
6735
|
</slot>
|
|
@@ -6492,23 +6740,23 @@ class AuroInput extends BaseInput {
|
|
|
6492
6740
|
@focusin="${this.handleFocusin}"
|
|
6493
6741
|
@blur="${this.handleBlur}"
|
|
6494
6742
|
id="${this.id}"
|
|
6495
|
-
name="${
|
|
6743
|
+
name="${ifDefined(this.name)}"
|
|
6496
6744
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
6497
|
-
pattern="${
|
|
6498
|
-
maxlength="${
|
|
6499
|
-
minlength="${
|
|
6500
|
-
inputMode="${
|
|
6745
|
+
pattern="${ifDefined(this.definePattern())}"
|
|
6746
|
+
maxlength="${ifDefined(this.maxLength ? this.maxLength : undefined)}"
|
|
6747
|
+
minlength="${ifDefined(this.minLength ? this.minLength : undefined)}"
|
|
6748
|
+
inputMode="${ifDefined(this.inputMode ? this.inputMode : undefined)}"
|
|
6501
6749
|
?required="${this.required}"
|
|
6502
6750
|
?disabled="${this.disabled}"
|
|
6503
6751
|
aria-describedby="${this.uniqueId}"
|
|
6504
6752
|
aria-invalid="${this.validity !== 'valid'}"
|
|
6505
6753
|
placeholder=${this.getPlaceholder()}
|
|
6506
|
-
lang="${
|
|
6754
|
+
lang="${ifDefined(this.lang)}"
|
|
6507
6755
|
?activeLabel="${this.activeLabel}"
|
|
6508
|
-
spellcheck="${
|
|
6509
|
-
autocorrect="${
|
|
6510
|
-
autocapitalize="${
|
|
6511
|
-
autocomplete="${
|
|
6756
|
+
spellcheck="${ifDefined(this.spellcheck ? this.spellcheck : undefined)}"
|
|
6757
|
+
autocorrect="${ifDefined(this.autocorrect ? this.autocorrect : undefined)}"
|
|
6758
|
+
autocapitalize="${ifDefined(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
6759
|
+
autocomplete="${ifDefined(this.autocomplete ? this.autocomplete : undefined)}"
|
|
6512
6760
|
part="input"
|
|
6513
6761
|
/>
|
|
6514
6762
|
</div>
|
|
@@ -6516,7 +6764,7 @@ class AuroInput extends BaseInput {
|
|
|
6516
6764
|
class="notificationIcons"
|
|
6517
6765
|
part="notificationIcons"
|
|
6518
6766
|
?hasValue="${this.hasValue}">
|
|
6519
|
-
${this.validity && this.validity !== 'valid' ?
|
|
6767
|
+
${this.validity && this.validity !== 'valid' ? html$1`
|
|
6520
6768
|
<div class="notification alertNotification">
|
|
6521
6769
|
<${this.iconTag}
|
|
6522
6770
|
category="alert"
|
|
@@ -6525,8 +6773,8 @@ class AuroInput extends BaseInput {
|
|
|
6525
6773
|
</${this.iconTag}>
|
|
6526
6774
|
</div>
|
|
6527
6775
|
` : undefined}
|
|
6528
|
-
${this.hasValue ?
|
|
6529
|
-
${this.type === 'password' ?
|
|
6776
|
+
${this.hasValue ? html$1`
|
|
6777
|
+
${this.type === 'password' ? html$1`
|
|
6530
6778
|
<div class="notification">
|
|
6531
6779
|
<${this.buttonTag}
|
|
6532
6780
|
variant="flat"
|
|
@@ -6549,7 +6797,7 @@ class AuroInput extends BaseInput {
|
|
|
6549
6797
|
</${this.buttonTag}>
|
|
6550
6798
|
</div>
|
|
6551
6799
|
` : undefined}
|
|
6552
|
-
${!this.disabled && !this.readonly ?
|
|
6800
|
+
${!this.disabled && !this.readonly ? html$1`
|
|
6553
6801
|
<div class="notification">
|
|
6554
6802
|
<${this.buttonTag}
|
|
6555
6803
|
variant="flat"
|
|
@@ -6570,14 +6818,14 @@ class AuroInput extends BaseInput {
|
|
|
6570
6818
|
</div>
|
|
6571
6819
|
<!-- Help text and error message template -->
|
|
6572
6820
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
6573
|
-
?
|
|
6821
|
+
? html$1`
|
|
6574
6822
|
<${this.helpTextTag}>
|
|
6575
6823
|
<p id="${this.uniqueId}" part="helpText">
|
|
6576
6824
|
<slot name="helptext">${this.getHelpText()}</slot>
|
|
6577
6825
|
</p>
|
|
6578
6826
|
</${this.helpTextTag}>
|
|
6579
6827
|
`
|
|
6580
|
-
:
|
|
6828
|
+
: html$1`
|
|
6581
6829
|
<${this.helpTextTag} error>
|
|
6582
6830
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
6583
6831
|
${this.errorMessage}
|