@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
|
@@ -82,46 +82,46 @@ function resetStateExample() {
|
|
|
82
82
|
* Copyright 2017 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
84
|
*/
|
|
85
|
-
const t$
|
|
85
|
+
const t$3=globalThis,i$5=t$3.trustedTypes,s$3=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$4="$lit$",h$1=`lit$${Math.random().toFixed(9).slice(2)}$`,o$4="?"+h$1,n$3=`<${o$4}>`,r$4=document,l$2=()=>r$4.createComment(""),c$3=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2=Array.isArray,u$4=t=>a$2(t)||"function"==typeof t?.[Symbol.iterator],d$1="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_=/>/g,m$1=RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y$1(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$4.createTreeWalker(r$4,129);function P(t,i){if(!a$2(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$3?s$3.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;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$1?"!--"===u[1]?c=v$1:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g:p$2):c===g||c===p$2?c=m$1:c===v$1||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$3:d>=0?(o.push(a),s.slice(0,d)+e$4+s.slice(d)+h$1+x):s+h$1+(-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$4)){const i=v[a++],s=r.getAttribute(t).split(h$1),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$1)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h$1),s=t.length-1;if(s>0){r.textContent=i$5?i$5.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$2()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$2());}}}else if(8===r.nodeType)if(r.data===o$4)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$1,t+1));)d.push({type:7,index:c}),t+=h$1.length-1;}c++;}}static createElement(t,i){const s=r$4.createElement("template");return s.innerHTML=t,s}}function S$1(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$3(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$1(t,h._$AS(t,i.values),h,e)),i}let M$1 = 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$4).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$4,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$1(this,t,i),c$3(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$4(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$3(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$4.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$1(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$2(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$2()),this.O(l$2()),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$1(this,t,i,0),o=!c$3(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$1(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c$3(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$1(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$1(this,t);}}const Z={I:R},j=t$3.litHtmlPolyfillSupport;j?.(N,R),(t$3.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$2(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright 2020 Google LLC
|
|
90
90
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
91
|
*/
|
|
92
|
-
const a$
|
|
92
|
+
const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$2=t=>({_$litStatic$:t,r:a$1}),i$4=(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$1}),l$1=new Map,n$2=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$3(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$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$2(x);
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2017 Google LLC
|
|
97
97
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
98
98
|
*/
|
|
99
|
-
const t$
|
|
99
|
+
const t$2={ATTRIBUTE:1,CHILD:2},e$3=t=>(...e)=>({_$litDirective$:t,values:e});let i$3 = 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)}};
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* @license
|
|
103
103
|
* Copyright 2020 Google LLC
|
|
104
104
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
105
|
-
*/const {I:t$
|
|
105
|
+
*/const {I:t$1}=Z,s$1=()=>document.createComment(""),r$3=(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$1(),l),c=e.insertBefore(s$1(),l);n=new t$1(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=(o,t,i=o)=>(o._$AI(t,i),o),u$2={},m=(o,t=u$2)=>o._$AH=t,p$1=o=>o._$AH,M=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;}};
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* @license
|
|
109
109
|
* Copyright 2017 Google LLC
|
|
110
110
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
111
111
|
*/
|
|
112
|
-
const u$
|
|
112
|
+
const u$1=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c$2=e$3(class extends i$3{constructor(e){if(super(e),e.type!==t$2.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$1(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v$1=[];let m$1,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$1[k]=v(d[x],p[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p[w]),r$3(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p[k]),r$3(s,d[x],d[j]),j--,k++;else if(void 0===m$1&&(m$1=u$1(a,k,w),y=u$1(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r$3(s,d[x]);v(e,p[k]),v$1[k]=e;}else v$1[k]=v(t,p[k]),r$3(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r$3(s,v$1[w+1]);v(e,p[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2018 Google LLC
|
|
117
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
118
|
-
*/const e$
|
|
118
|
+
*/const e$2=e$3(class extends i$3{constructor(t){if(super(t),t.type!==t$2.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}});
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* @license
|
|
122
122
|
* Copyright 2018 Google LLC
|
|
123
123
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
124
|
-
*/const o$
|
|
124
|
+
*/const o$2=o=>o??E;
|
|
125
125
|
|
|
126
126
|
const watchedItems = new Set();
|
|
127
127
|
|
|
@@ -249,25 +249,25 @@ function stopNotifyingOnLangChange(element) {
|
|
|
249
249
|
* Copyright 2019 Google LLC
|
|
250
250
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
251
251
|
*/
|
|
252
|
-
const t
|
|
252
|
+
const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$1=new WeakMap;let n$1 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s)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$1&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$1.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$1.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$1("string"==typeof t?t:t+"",void 0,s),i$2=(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$1(o,t,s)},S=(s,o)=>{if(e$1)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* @license
|
|
256
256
|
* Copyright 2017 Google LLC
|
|
257
257
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
258
|
-
*/const{is:i$
|
|
258
|
+
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l: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=(t,s)=>!i$1(t,s),y={attribute:true,type:String,converter:u,reflect:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.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){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(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$1(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}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...h(t),...o(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$1(s));}else void 0!==s&&i.push(c$1(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(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).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;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)(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("elementProperties")]=new Map,b[d("finalized")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push("2.0.4");
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* @license
|
|
262
262
|
* Copyright 2017 Google LLC
|
|
263
263
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
264
|
-
*/
|
|
264
|
+
*/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");
|
|
265
265
|
|
|
266
|
-
var styleCss$4 = i$
|
|
266
|
+
var styleCss$4 = i$2`*,*: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)}`;
|
|
267
267
|
|
|
268
|
-
var colorCss$4 = i$
|
|
268
|
+
var colorCss$4 = i$2`.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)}`;
|
|
269
269
|
|
|
270
|
-
var tokensCss$4 = i$
|
|
270
|
+
var tokensCss$4 = i$2`: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)}`;
|
|
271
271
|
|
|
272
272
|
/** Checks if value is string */
|
|
273
273
|
function isString(str) {
|
|
@@ -4118,7 +4118,7 @@ class AuroInputUtilities {
|
|
|
4118
4118
|
|
|
4119
4119
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4120
4120
|
|
|
4121
|
-
let AuroLibraryRuntimeUtils$
|
|
4121
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
4122
4122
|
|
|
4123
4123
|
/* eslint-disable jsdoc/require-param */
|
|
4124
4124
|
|
|
@@ -4187,7 +4187,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
4187
4187
|
|
|
4188
4188
|
class AuroFormValidation {
|
|
4189
4189
|
constructor() {
|
|
4190
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4190
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
4191
4191
|
}
|
|
4192
4192
|
|
|
4193
4193
|
/**
|
|
@@ -4514,7 +4514,7 @@ class AuroFormValidation {
|
|
|
4514
4514
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
4515
4515
|
*/
|
|
4516
4516
|
|
|
4517
|
-
class BaseInput extends r
|
|
4517
|
+
class BaseInput extends r {
|
|
4518
4518
|
|
|
4519
4519
|
constructor() {
|
|
4520
4520
|
super();
|
|
@@ -4865,9 +4865,9 @@ class BaseInput extends r$4 {
|
|
|
4865
4865
|
|
|
4866
4866
|
static get styles() {
|
|
4867
4867
|
return [
|
|
4868
|
-
i$
|
|
4869
|
-
i$
|
|
4870
|
-
i$
|
|
4868
|
+
i$2`${colorCss$4}`,
|
|
4869
|
+
i$2`${styleCss$4}`,
|
|
4870
|
+
i$2`${tokensCss$4}`
|
|
4871
4871
|
];
|
|
4872
4872
|
}
|
|
4873
4873
|
|
|
@@ -5451,7 +5451,7 @@ class BaseInput extends r$4 {
|
|
|
5451
5451
|
// See LICENSE in the project root for license information.
|
|
5452
5452
|
|
|
5453
5453
|
|
|
5454
|
-
class AuroDependencyVersioning {
|
|
5454
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
5455
5455
|
|
|
5456
5456
|
/**
|
|
5457
5457
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -5477,7 +5477,7 @@ class AuroDependencyVersioning {
|
|
|
5477
5477
|
*/
|
|
5478
5478
|
generateTag(baseName, version, tagClass) {
|
|
5479
5479
|
const elementName = this.generateElementName(baseName, version);
|
|
5480
|
-
const tag = i$
|
|
5480
|
+
const tag = i$4`${s$2(elementName)}`;
|
|
5481
5481
|
|
|
5482
5482
|
if (!customElements.get(elementName)) {
|
|
5483
5483
|
customElements.define(elementName, class extends tagClass {});
|
|
@@ -5485,7 +5485,7 @@ class AuroDependencyVersioning {
|
|
|
5485
5485
|
|
|
5486
5486
|
return tag;
|
|
5487
5487
|
}
|
|
5488
|
-
}
|
|
5488
|
+
};
|
|
5489
5489
|
|
|
5490
5490
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5491
5491
|
// See LICENSE in the project root for license information.
|
|
@@ -5497,7 +5497,7 @@ class AuroDependencyVersioning {
|
|
|
5497
5497
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5498
5498
|
*/
|
|
5499
5499
|
|
|
5500
|
-
class AuroElement extends r
|
|
5500
|
+
class AuroElement extends r {
|
|
5501
5501
|
|
|
5502
5502
|
// function to define props used within the scope of this component
|
|
5503
5503
|
static get properties() {
|
|
@@ -5553,7 +5553,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
5553
5553
|
return _fetchMap.get(uri);
|
|
5554
5554
|
};
|
|
5555
5555
|
|
|
5556
|
-
var styleCss$3 = i$
|
|
5556
|
+
var styleCss$3 = i$2`: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}`;
|
|
5557
5557
|
|
|
5558
5558
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5559
5559
|
// See LICENSE in the project root for license information.
|
|
@@ -5592,7 +5592,7 @@ class BaseIcon extends AuroElement {
|
|
|
5592
5592
|
}
|
|
5593
5593
|
|
|
5594
5594
|
static get styles() {
|
|
5595
|
-
return i$
|
|
5595
|
+
return i$2`
|
|
5596
5596
|
${styleCss$3}
|
|
5597
5597
|
`;
|
|
5598
5598
|
}
|
|
@@ -5634,47 +5634,88 @@ class BaseIcon extends AuroElement {
|
|
|
5634
5634
|
}
|
|
5635
5635
|
}
|
|
5636
5636
|
|
|
5637
|
-
var tokensCss$3 = i$
|
|
5637
|
+
var tokensCss$3 = i$2`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-default, #676767);--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5638
5638
|
|
|
5639
|
-
var colorCss$3 = i$
|
|
5639
|
+
var colorCss$3 = i$2`: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)}`;
|
|
5640
5640
|
|
|
5641
|
-
// Copyright (c)
|
|
5641
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5642
5642
|
// See LICENSE in the project root for license information.
|
|
5643
5643
|
|
|
5644
|
+
// ---------------------------------------------------------------------
|
|
5645
|
+
|
|
5646
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5647
|
+
|
|
5648
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5649
|
+
|
|
5650
|
+
/* eslint-disable jsdoc/require-param */
|
|
5651
|
+
|
|
5652
|
+
/**
|
|
5653
|
+
* This will register a new custom element with the browser.
|
|
5654
|
+
* @param {String} name - The name of the custom element.
|
|
5655
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5656
|
+
* @returns {void}
|
|
5657
|
+
*/
|
|
5658
|
+
registerComponent(name, componentClass) {
|
|
5659
|
+
if (!customElements.get(name)) {
|
|
5660
|
+
customElements.define(name, class extends componentClass {});
|
|
5661
|
+
}
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
/**
|
|
5665
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5666
|
+
* @returns {void}
|
|
5667
|
+
*/
|
|
5668
|
+
closestElement(
|
|
5669
|
+
selector, // selector like in .closest()
|
|
5670
|
+
base = this, // extra functionality to skip a parent
|
|
5671
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5672
|
+
!el || el === document || el === window
|
|
5673
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5674
|
+
: found
|
|
5675
|
+
? found // found a selector INside this element
|
|
5676
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5677
|
+
) {
|
|
5678
|
+
return __Closest(base);
|
|
5679
|
+
}
|
|
5680
|
+
/* eslint-enable jsdoc/require-param */
|
|
5681
|
+
|
|
5682
|
+
/**
|
|
5683
|
+
* 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.
|
|
5684
|
+
* @param {Object} elem - The element to check.
|
|
5685
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5686
|
+
* @returns {void}
|
|
5687
|
+
*/
|
|
5688
|
+
handleComponentTagRename(elem, tagName) {
|
|
5689
|
+
const tag = tagName.toLowerCase();
|
|
5690
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5691
|
+
|
|
5692
|
+
if (elemTag !== tag) {
|
|
5693
|
+
elem.setAttribute(tag, true);
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
|
|
5697
|
+
/**
|
|
5698
|
+
* Validates if an element is a specific Auro component.
|
|
5699
|
+
* @param {Object} elem - The element to validate.
|
|
5700
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5701
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5702
|
+
*/
|
|
5703
|
+
elementMatch(elem, tagName) {
|
|
5704
|
+
const tag = tagName.toLowerCase();
|
|
5705
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5706
|
+
|
|
5707
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5708
|
+
}
|
|
5709
|
+
};
|
|
5710
|
+
|
|
5711
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5712
|
+
// See LICENSE in the project root for license information.
|
|
5644
5713
|
|
|
5645
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5646
|
-
/**
|
|
5647
|
-
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
5648
|
-
*
|
|
5649
|
-
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5650
|
-
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
5651
|
-
* @attr {Boolean} customColor - Removes primary selector.
|
|
5652
|
-
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
5653
|
-
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
5654
|
-
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
5655
|
-
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
5656
|
-
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
5657
|
-
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
5658
|
-
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
5659
|
-
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
5660
|
-
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
5661
|
-
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
5662
|
-
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
5663
|
-
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
5664
|
-
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
5665
|
-
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5666
|
-
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
5667
|
-
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
5668
|
-
* @slot svg - Used for custom SVG content.
|
|
5669
|
-
*/
|
|
5670
5714
|
|
|
5671
|
-
// build the component class
|
|
5672
5715
|
class AuroIcon extends BaseIcon {
|
|
5673
5716
|
constructor() {
|
|
5674
5717
|
super();
|
|
5675
5718
|
|
|
5676
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5677
|
-
|
|
5678
5719
|
this.privateDefaults();
|
|
5679
5720
|
}
|
|
5680
5721
|
|
|
@@ -5698,78 +5739,144 @@ class AuroIcon extends BaseIcon {
|
|
|
5698
5739
|
this.success = false;
|
|
5699
5740
|
this.tertiary = false;
|
|
5700
5741
|
this.warning = false;
|
|
5701
|
-
this.
|
|
5742
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5743
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
5702
5744
|
}
|
|
5703
5745
|
|
|
5704
5746
|
// function to define props used within the scope of this component
|
|
5705
5747
|
static get properties() {
|
|
5706
5748
|
return {
|
|
5707
5749
|
...super.properties,
|
|
5750
|
+
|
|
5751
|
+
/**
|
|
5752
|
+
* Sets the icon to use the accent style.
|
|
5753
|
+
*/
|
|
5708
5754
|
accent: {
|
|
5709
5755
|
type: Boolean,
|
|
5710
5756
|
reflect: true
|
|
5711
5757
|
},
|
|
5758
|
+
|
|
5759
|
+
/**
|
|
5760
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5761
|
+
*/
|
|
5712
5762
|
ariaHidden: {
|
|
5713
5763
|
type: String,
|
|
5714
5764
|
reflect: true
|
|
5715
5765
|
},
|
|
5766
|
+
|
|
5767
|
+
/**
|
|
5768
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5769
|
+
*/
|
|
5716
5770
|
category: {
|
|
5717
5771
|
type: String,
|
|
5718
5772
|
reflect: true
|
|
5719
5773
|
},
|
|
5774
|
+
|
|
5775
|
+
/**
|
|
5776
|
+
* Allows custom color to be set.
|
|
5777
|
+
*/
|
|
5720
5778
|
customColor: {
|
|
5721
5779
|
type: Boolean
|
|
5722
5780
|
},
|
|
5781
|
+
|
|
5782
|
+
/**
|
|
5783
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
5784
|
+
*/
|
|
5723
5785
|
customSvg: {
|
|
5724
5786
|
type: Boolean
|
|
5725
5787
|
},
|
|
5788
|
+
|
|
5789
|
+
/**
|
|
5790
|
+
* Sets the icon to use the disabled style.
|
|
5791
|
+
*/
|
|
5726
5792
|
disabled: {
|
|
5727
5793
|
type: Boolean,
|
|
5728
5794
|
reflect: true
|
|
5729
5795
|
},
|
|
5796
|
+
|
|
5797
|
+
/**
|
|
5798
|
+
* Sets the icon to use the emphasis style.
|
|
5799
|
+
*/
|
|
5730
5800
|
emphasis: {
|
|
5731
5801
|
type: Boolean,
|
|
5732
5802
|
reflect: true
|
|
5733
5803
|
},
|
|
5804
|
+
|
|
5805
|
+
/**
|
|
5806
|
+
* Sets the icon to use the error style.
|
|
5807
|
+
*/
|
|
5734
5808
|
error: {
|
|
5735
5809
|
type: Boolean,
|
|
5736
5810
|
reflect: true
|
|
5737
5811
|
},
|
|
5812
|
+
|
|
5813
|
+
/**
|
|
5814
|
+
* Sets the icon to use the info style.
|
|
5815
|
+
*/
|
|
5738
5816
|
info: {
|
|
5739
5817
|
type: Boolean,
|
|
5740
5818
|
reflect: true
|
|
5741
5819
|
},
|
|
5820
|
+
|
|
5821
|
+
/**
|
|
5822
|
+
* Exposes content in slot as icon label.
|
|
5823
|
+
*/
|
|
5742
5824
|
label: {
|
|
5743
5825
|
type: Boolean,
|
|
5744
5826
|
reflect: true
|
|
5745
5827
|
},
|
|
5828
|
+
|
|
5829
|
+
/**
|
|
5830
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
5831
|
+
*/
|
|
5746
5832
|
name: {
|
|
5747
5833
|
type: String,
|
|
5748
5834
|
reflect: true
|
|
5749
5835
|
},
|
|
5836
|
+
|
|
5837
|
+
/**
|
|
5838
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
5839
|
+
*/
|
|
5750
5840
|
primary: {
|
|
5751
5841
|
type: Boolean,
|
|
5752
5842
|
reflect: true
|
|
5753
5843
|
},
|
|
5844
|
+
|
|
5845
|
+
/**
|
|
5846
|
+
* Sets the icon to use the secondary style.
|
|
5847
|
+
*/
|
|
5754
5848
|
secondary: {
|
|
5755
5849
|
type: Boolean,
|
|
5756
5850
|
reflect: true
|
|
5757
5851
|
},
|
|
5852
|
+
|
|
5853
|
+
/**
|
|
5854
|
+
* Sets the icon to use the subtle style.
|
|
5855
|
+
*/
|
|
5758
5856
|
subtle: {
|
|
5759
5857
|
type: Boolean,
|
|
5760
5858
|
reflect: true
|
|
5761
5859
|
},
|
|
5860
|
+
|
|
5861
|
+
/**
|
|
5862
|
+
* Sets the icon to use the success style.
|
|
5863
|
+
*/
|
|
5762
5864
|
success: {
|
|
5763
5865
|
type: Boolean,
|
|
5764
5866
|
reflect: true
|
|
5765
5867
|
},
|
|
5868
|
+
|
|
5869
|
+
/**
|
|
5870
|
+
* Sets the icon to use the tertiary style.
|
|
5871
|
+
*/
|
|
5766
5872
|
tertiary: {
|
|
5767
5873
|
type: Boolean,
|
|
5768
5874
|
reflect: true
|
|
5769
5875
|
},
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5876
|
+
|
|
5877
|
+
/**
|
|
5878
|
+
* Sets the icon to use the warning style.
|
|
5879
|
+
*/
|
|
5773
5880
|
warning: {
|
|
5774
5881
|
type: Boolean,
|
|
5775
5882
|
reflect: true
|
|
@@ -5780,9 +5887,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5780
5887
|
static get styles() {
|
|
5781
5888
|
return [
|
|
5782
5889
|
super.styles,
|
|
5783
|
-
i$
|
|
5784
|
-
i$
|
|
5785
|
-
i$
|
|
5890
|
+
i$2`${tokensCss$3}`,
|
|
5891
|
+
i$2`${styleCss$3}`,
|
|
5892
|
+
i$2`${colorCss$3}`
|
|
5786
5893
|
];
|
|
5787
5894
|
}
|
|
5788
5895
|
|
|
@@ -5795,7 +5902,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5795
5902
|
*
|
|
5796
5903
|
*/
|
|
5797
5904
|
static register(name = "auro-icon") {
|
|
5798
|
-
AuroLibraryRuntimeUtils$
|
|
5905
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
5799
5906
|
}
|
|
5800
5907
|
|
|
5801
5908
|
connectedCallback() {
|
|
@@ -5806,38 +5913,54 @@ class AuroIcon extends BaseIcon {
|
|
|
5806
5913
|
}
|
|
5807
5914
|
|
|
5808
5915
|
/**
|
|
5916
|
+
* @private
|
|
5809
5917
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
5810
5918
|
*/
|
|
5811
5919
|
exposeCssParts() {
|
|
5812
5920
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
5813
5921
|
}
|
|
5814
5922
|
|
|
5923
|
+
async firstUpdated() {
|
|
5924
|
+
await super.firstUpdated();
|
|
5925
|
+
|
|
5926
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
5927
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
5928
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
5929
|
+
|
|
5930
|
+
if (svgDesc) {
|
|
5931
|
+
svgDesc.remove();
|
|
5932
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5935
|
+
}
|
|
5936
|
+
|
|
5815
5937
|
// function that renders the HTML and CSS into the scope of the component
|
|
5816
5938
|
render() {
|
|
5817
|
-
const
|
|
5818
|
-
'
|
|
5939
|
+
const labelClasses = {
|
|
5940
|
+
'labelWrapper': true,
|
|
5819
5941
|
'util_displayHiddenVisually': !this.label
|
|
5820
5942
|
};
|
|
5821
5943
|
|
|
5822
|
-
const
|
|
5823
|
-
'
|
|
5824
|
-
'wrapper': true,
|
|
5944
|
+
const svgClasses = {
|
|
5945
|
+
'svgWrapper': true,
|
|
5825
5946
|
};
|
|
5826
5947
|
|
|
5827
|
-
return x
|
|
5828
|
-
<div
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
${this.
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5948
|
+
return x`
|
|
5949
|
+
<div class="componentWrapper">
|
|
5950
|
+
<div
|
|
5951
|
+
class="${e$2(svgClasses)}"
|
|
5952
|
+
title="${o$2(this.title || undefined)}">
|
|
5953
|
+
<span aria-hidden="${o$2(this.ariaHidden || true)}" part="svg">
|
|
5954
|
+
${this.customSvg ? x`
|
|
5955
|
+
<slot name="svg"></slot>
|
|
5956
|
+
` : x`
|
|
5957
|
+
${this.svg}
|
|
5958
|
+
`
|
|
5959
|
+
}
|
|
5960
|
+
</span>
|
|
5961
|
+
</div>
|
|
5839
5962
|
|
|
5840
|
-
<div class="${e$
|
|
5963
|
+
<div class="${e$2(labelClasses)}">
|
|
5841
5964
|
<slot></slot>
|
|
5842
5965
|
</div>
|
|
5843
5966
|
</div>
|
|
@@ -5847,17 +5970,197 @@ class AuroIcon extends BaseIcon {
|
|
|
5847
5970
|
|
|
5848
5971
|
var iconVersion = '6.1.2';
|
|
5849
5972
|
|
|
5850
|
-
|
|
5973
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5974
|
+
// See LICENSE in the project root for license information.
|
|
5975
|
+
|
|
5851
5976
|
|
|
5852
|
-
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}`;
|
|
5977
|
+
class AuroDependencyVersioning {
|
|
5978
|
+
|
|
5979
|
+
/**
|
|
5980
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5981
|
+
* @private
|
|
5982
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5983
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5984
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5985
|
+
*/
|
|
5986
|
+
generateElementName(baseName, version) {
|
|
5987
|
+
let result = baseName;
|
|
5853
5988
|
|
|
5854
|
-
|
|
5989
|
+
result += '-';
|
|
5990
|
+
result += version.replace(/[.]/g, '_');
|
|
5855
5991
|
|
|
5856
|
-
|
|
5992
|
+
return result;
|
|
5993
|
+
}
|
|
5857
5994
|
|
|
5858
|
-
|
|
5995
|
+
/**
|
|
5996
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5997
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5998
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5999
|
+
* @returns {string} - Unique string to be used for naming.
|
|
6000
|
+
*/
|
|
6001
|
+
generateTag(baseName, version, tagClass) {
|
|
6002
|
+
const elementName = this.generateElementName(baseName, version);
|
|
6003
|
+
const tag = i$4`${s$2(elementName)}`;
|
|
5859
6004
|
|
|
5860
|
-
|
|
6005
|
+
if (!customElements.get(elementName)) {
|
|
6006
|
+
customElements.define(elementName, class extends tagClass {});
|
|
6007
|
+
}
|
|
6008
|
+
|
|
6009
|
+
return tag;
|
|
6010
|
+
}
|
|
6011
|
+
}
|
|
6012
|
+
|
|
6013
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6014
|
+
// See LICENSE in the project root for license information.
|
|
6015
|
+
|
|
6016
|
+
// ---------------------------------------------------------------------
|
|
6017
|
+
|
|
6018
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6019
|
+
|
|
6020
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6021
|
+
|
|
6022
|
+
/* eslint-disable jsdoc/require-param */
|
|
6023
|
+
|
|
6024
|
+
/**
|
|
6025
|
+
* This will register a new custom element with the browser.
|
|
6026
|
+
* @param {String} name - The name of the custom element.
|
|
6027
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6028
|
+
* @returns {void}
|
|
6029
|
+
*/
|
|
6030
|
+
registerComponent(name, componentClass) {
|
|
6031
|
+
if (!customElements.get(name)) {
|
|
6032
|
+
customElements.define(name, class extends componentClass {});
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
/**
|
|
6037
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6038
|
+
* @returns {void}
|
|
6039
|
+
*/
|
|
6040
|
+
closestElement(
|
|
6041
|
+
selector, // selector like in .closest()
|
|
6042
|
+
base = this, // extra functionality to skip a parent
|
|
6043
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6044
|
+
!el || el === document || el === window
|
|
6045
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6046
|
+
: found
|
|
6047
|
+
? found // found a selector INside this element
|
|
6048
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6049
|
+
) {
|
|
6050
|
+
return __Closest(base);
|
|
6051
|
+
}
|
|
6052
|
+
/* eslint-enable jsdoc/require-param */
|
|
6053
|
+
|
|
6054
|
+
/**
|
|
6055
|
+
* 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.
|
|
6056
|
+
* @param {Object} elem - The element to check.
|
|
6057
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6058
|
+
* @returns {void}
|
|
6059
|
+
*/
|
|
6060
|
+
handleComponentTagRename(elem, tagName) {
|
|
6061
|
+
const tag = tagName.toLowerCase();
|
|
6062
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6063
|
+
|
|
6064
|
+
if (elemTag !== tag) {
|
|
6065
|
+
elem.setAttribute(tag, true);
|
|
6066
|
+
}
|
|
6067
|
+
}
|
|
6068
|
+
|
|
6069
|
+
/**
|
|
6070
|
+
* Validates if an element is a specific Auro component.
|
|
6071
|
+
* @param {Object} elem - The element to validate.
|
|
6072
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6073
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6074
|
+
*/
|
|
6075
|
+
elementMatch(elem, tagName) {
|
|
6076
|
+
const tag = tagName.toLowerCase();
|
|
6077
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6078
|
+
|
|
6079
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6080
|
+
}
|
|
6081
|
+
};
|
|
6082
|
+
|
|
6083
|
+
var styleCss$2 = i$2`: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}`;
|
|
6084
|
+
|
|
6085
|
+
var colorCss$2 = i$2`[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}`;
|
|
6086
|
+
|
|
6087
|
+
var tokensCss$2 = i$2`: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}`;
|
|
6088
|
+
|
|
6089
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6090
|
+
// See LICENSE in the project root for license information.
|
|
6091
|
+
|
|
6092
|
+
// ---------------------------------------------------------------------
|
|
6093
|
+
|
|
6094
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6095
|
+
|
|
6096
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6097
|
+
|
|
6098
|
+
/* eslint-disable jsdoc/require-param */
|
|
6099
|
+
|
|
6100
|
+
/**
|
|
6101
|
+
* This will register a new custom element with the browser.
|
|
6102
|
+
* @param {String} name - The name of the custom element.
|
|
6103
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6104
|
+
* @returns {void}
|
|
6105
|
+
*/
|
|
6106
|
+
registerComponent(name, componentClass) {
|
|
6107
|
+
if (!customElements.get(name)) {
|
|
6108
|
+
customElements.define(name, class extends componentClass {});
|
|
6109
|
+
}
|
|
6110
|
+
}
|
|
6111
|
+
|
|
6112
|
+
/**
|
|
6113
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6114
|
+
* @returns {void}
|
|
6115
|
+
*/
|
|
6116
|
+
closestElement(
|
|
6117
|
+
selector, // selector like in .closest()
|
|
6118
|
+
base = this, // extra functionality to skip a parent
|
|
6119
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6120
|
+
!el || el === document || el === window
|
|
6121
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6122
|
+
: found
|
|
6123
|
+
? found // found a selector INside this element
|
|
6124
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6125
|
+
) {
|
|
6126
|
+
return __Closest(base);
|
|
6127
|
+
}
|
|
6128
|
+
/* eslint-enable jsdoc/require-param */
|
|
6129
|
+
|
|
6130
|
+
/**
|
|
6131
|
+
* 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.
|
|
6132
|
+
* @param {Object} elem - The element to check.
|
|
6133
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6134
|
+
* @returns {void}
|
|
6135
|
+
*/
|
|
6136
|
+
handleComponentTagRename(elem, tagName) {
|
|
6137
|
+
const tag = tagName.toLowerCase();
|
|
6138
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6139
|
+
|
|
6140
|
+
if (elemTag !== tag) {
|
|
6141
|
+
elem.setAttribute(tag, true);
|
|
6142
|
+
}
|
|
6143
|
+
}
|
|
6144
|
+
|
|
6145
|
+
/**
|
|
6146
|
+
* Validates if an element is a specific Auro component.
|
|
6147
|
+
* @param {Object} elem - The element to validate.
|
|
6148
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6149
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6150
|
+
*/
|
|
6151
|
+
elementMatch(elem, tagName) {
|
|
6152
|
+
const tag = tagName.toLowerCase();
|
|
6153
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6154
|
+
|
|
6155
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6156
|
+
}
|
|
6157
|
+
};
|
|
6158
|
+
|
|
6159
|
+
var styleCss$1 = i$2`: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}}`;
|
|
6160
|
+
|
|
6161
|
+
var colorCss$1 = i$2`: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}`;
|
|
6162
|
+
|
|
6163
|
+
var tokensCss$1 = i$2`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
5861
6164
|
|
|
5862
6165
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5863
6166
|
// See LICENSE in the project root for license information.
|
|
@@ -5882,7 +6185,7 @@ var tokensCss$1 = i$6`:host{--ds-auro-loader-background-color: currentcolor;--ds
|
|
|
5882
6185
|
*/
|
|
5883
6186
|
|
|
5884
6187
|
// build the component class
|
|
5885
|
-
class AuroLoader extends r
|
|
6188
|
+
class AuroLoader extends r {
|
|
5886
6189
|
constructor() {
|
|
5887
6190
|
super();
|
|
5888
6191
|
|
|
@@ -5936,9 +6239,9 @@ class AuroLoader extends r$4 {
|
|
|
5936
6239
|
|
|
5937
6240
|
static get styles() {
|
|
5938
6241
|
return [
|
|
5939
|
-
i$
|
|
5940
|
-
i$
|
|
5941
|
-
i$
|
|
6242
|
+
i$2`${styleCss$1}`,
|
|
6243
|
+
i$2`${colorCss$1}`,
|
|
6244
|
+
i$2`${tokensCss$1}`
|
|
5942
6245
|
];
|
|
5943
6246
|
}
|
|
5944
6247
|
|
|
@@ -5984,14 +6287,14 @@ class AuroLoader extends r$4 {
|
|
|
5984
6287
|
|
|
5985
6288
|
// function that renders the HTML and CSS into the scope of the component
|
|
5986
6289
|
render() {
|
|
5987
|
-
return x
|
|
5988
|
-
${this.defineTemplate().map((idx) => x
|
|
6290
|
+
return x`
|
|
6291
|
+
${this.defineTemplate().map((idx) => x`
|
|
5989
6292
|
<span part="element" class="loader node-${idx}"></span>
|
|
5990
6293
|
`)}
|
|
5991
6294
|
|
|
5992
6295
|
<div class="no-animation">Loading...</div>
|
|
5993
6296
|
|
|
5994
|
-
${this.ringworm ? x
|
|
6297
|
+
${this.ringworm ? x`
|
|
5995
6298
|
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
5996
6299
|
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
5997
6300
|
</svg>`
|
|
@@ -6001,7 +6304,7 @@ class AuroLoader extends r$4 {
|
|
|
6001
6304
|
}
|
|
6002
6305
|
}
|
|
6003
6306
|
|
|
6004
|
-
var loaderVersion = '
|
|
6307
|
+
var loaderVersion = '4.0.0';
|
|
6005
6308
|
|
|
6006
6309
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6007
6310
|
// See LICENSE in the project root for license information.
|
|
@@ -6037,10 +6340,20 @@ var loaderVersion = '3.1.1';
|
|
|
6037
6340
|
|
|
6038
6341
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
6039
6342
|
|
|
6040
|
-
class AuroButton extends r
|
|
6343
|
+
class AuroButton extends r {
|
|
6344
|
+
|
|
6345
|
+
/**
|
|
6346
|
+
* Enables form association for this element.
|
|
6347
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6348
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6349
|
+
*/
|
|
6350
|
+
static get formAssociated() {
|
|
6351
|
+
return true;
|
|
6352
|
+
}
|
|
6041
6353
|
|
|
6042
6354
|
constructor() {
|
|
6043
6355
|
super();
|
|
6356
|
+
|
|
6044
6357
|
this.autofocus = false;
|
|
6045
6358
|
this.disabled = false;
|
|
6046
6359
|
this.iconOnly = false;
|
|
@@ -6053,6 +6366,16 @@ class AuroButton extends r$4 {
|
|
|
6053
6366
|
this.slim = false;
|
|
6054
6367
|
this.fluid = false;
|
|
6055
6368
|
|
|
6369
|
+
// Support for HTML5 forms
|
|
6370
|
+
if (typeof this.attachInternals === 'function') {
|
|
6371
|
+
this.internals = this.attachInternals();
|
|
6372
|
+
} else {
|
|
6373
|
+
this.internals = null;
|
|
6374
|
+
|
|
6375
|
+
// eslint-disable-next-line no-console
|
|
6376
|
+
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.');
|
|
6377
|
+
}
|
|
6378
|
+
|
|
6056
6379
|
/**
|
|
6057
6380
|
* Generate unique names for dependency components.
|
|
6058
6381
|
*/
|
|
@@ -6151,7 +6474,7 @@ class AuroButton extends r$4 {
|
|
|
6151
6474
|
*
|
|
6152
6475
|
*/
|
|
6153
6476
|
static register(name = "auro-button") {
|
|
6154
|
-
AuroLibraryRuntimeUtils$
|
|
6477
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6155
6478
|
}
|
|
6156
6479
|
|
|
6157
6480
|
/**
|
|
@@ -6193,6 +6516,16 @@ class AuroButton extends r$4 {
|
|
|
6193
6516
|
this.notifyReady();
|
|
6194
6517
|
}
|
|
6195
6518
|
|
|
6519
|
+
surfaceSubmitEvent() {
|
|
6520
|
+
if (this.form) {
|
|
6521
|
+
this.form.requestSubmit();
|
|
6522
|
+
}
|
|
6523
|
+
}
|
|
6524
|
+
|
|
6525
|
+
get form() {
|
|
6526
|
+
return this.internals ? this.internals.form : null;
|
|
6527
|
+
}
|
|
6528
|
+
|
|
6196
6529
|
render() {
|
|
6197
6530
|
const classes = {
|
|
6198
6531
|
'util_insetLg--squish': true,
|
|
@@ -6205,27 +6538,27 @@ class AuroButton extends r$4 {
|
|
|
6205
6538
|
'loading': this.loading
|
|
6206
6539
|
};
|
|
6207
6540
|
|
|
6208
|
-
return u$
|
|
6541
|
+
return u$3`
|
|
6209
6542
|
<button
|
|
6210
6543
|
part="button"
|
|
6211
|
-
aria-label="${o$
|
|
6212
|
-
aria-labelledby="${o$
|
|
6544
|
+
aria-label="${o$2(this.arialabel ? this.arialabel : undefined)}"
|
|
6545
|
+
aria-labelledby="${o$2(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
6213
6546
|
?autofocus="${this.autofocus}"
|
|
6214
|
-
class="${e$
|
|
6547
|
+
class="${e$2(classes)}"
|
|
6215
6548
|
?disabled="${this.disabled || this.loading}"
|
|
6216
6549
|
?onDark="${this.onDark}"
|
|
6217
|
-
title="${o$
|
|
6218
|
-
name="${o$
|
|
6219
|
-
type="${o$
|
|
6220
|
-
variant="${o$
|
|
6221
|
-
.value="${o$
|
|
6222
|
-
@click="${
|
|
6550
|
+
title="${o$2(this.title ? this.title : undefined)}"
|
|
6551
|
+
name="${o$2(this.name ? this.name : undefined)}"
|
|
6552
|
+
type="${o$2(this.type ? this.type : undefined)}"
|
|
6553
|
+
variant="${o$2(this.variant ? this.variant : undefined)}"
|
|
6554
|
+
.value="${o$2(this.value ? this.value : undefined)}"
|
|
6555
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6223
6556
|
>
|
|
6224
|
-
${o$
|
|
6557
|
+
${o$2(this.loading ? u$3`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6225
6558
|
|
|
6226
6559
|
<span class="contentWrapper">
|
|
6227
6560
|
<span class="textSlot" part="text">
|
|
6228
|
-
${this.iconOnly ? undefined : u$
|
|
6561
|
+
${this.iconOnly ? undefined : u$3`<slot></slot>`}
|
|
6229
6562
|
</span>
|
|
6230
6563
|
|
|
6231
6564
|
<span part="icon">
|
|
@@ -6239,37 +6572,11 @@ class AuroButton extends r$4 {
|
|
|
6239
6572
|
|
|
6240
6573
|
var buttonVersion = '8.2.2';
|
|
6241
6574
|
|
|
6242
|
-
|
|
6243
|
-
* @license
|
|
6244
|
-
* Copyright 2019 Google LLC
|
|
6245
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6246
|
-
*/
|
|
6247
|
-
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;
|
|
6248
|
-
|
|
6249
|
-
/**
|
|
6250
|
-
* @license
|
|
6251
|
-
* Copyright 2017 Google LLC
|
|
6252
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6253
|
-
*/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");
|
|
6575
|
+
var colorCss = i$2`:host([error]){--ds-auro-helptext-color: var(--ds-color-text-error-default, #cc1816)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6254
6576
|
|
|
6255
|
-
|
|
6256
|
-
* @license
|
|
6257
|
-
* Copyright 2017 Google LLC
|
|
6258
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6259
|
-
*/
|
|
6260
|
-
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};
|
|
6577
|
+
var styleCss = i$2`.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}`;
|
|
6261
6578
|
|
|
6262
|
-
|
|
6263
|
-
* @license
|
|
6264
|
-
* Copyright 2017 Google LLC
|
|
6265
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6266
|
-
*/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");
|
|
6267
|
-
|
|
6268
|
-
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)}`;
|
|
6269
|
-
|
|
6270
|
-
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}`;
|
|
6271
|
-
|
|
6272
|
-
var tokensCss = i$3`:host{--ds-auro-helptext-color: var(--ds-color-text-tertiary-default, #6a717c)}`;
|
|
6579
|
+
var tokensCss = i$2`:host{--ds-auro-helptext-color: var(--ds-color-text-tertiary-default, #6a717c)}`;
|
|
6273
6580
|
|
|
6274
6581
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6275
6582
|
// See LICENSE in the project root for license information.
|
|
@@ -6476,22 +6783,22 @@ class AuroInput extends BaseInput {
|
|
|
6476
6783
|
/**
|
|
6477
6784
|
* Generate unique names for dependency components.
|
|
6478
6785
|
*/
|
|
6479
|
-
const versioning = new AuroDependencyVersioning();
|
|
6786
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
6480
6787
|
|
|
6481
6788
|
/**
|
|
6482
6789
|
* @private
|
|
6483
6790
|
*/
|
|
6484
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
6791
|
+
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
|
|
6485
6792
|
|
|
6486
6793
|
/**
|
|
6487
6794
|
* @private
|
|
6488
6795
|
*/
|
|
6489
|
-
this.buttonTag = versioning.generateTag('auro-button', buttonVersion, AuroButton);
|
|
6796
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
6490
6797
|
|
|
6491
6798
|
/**
|
|
6492
6799
|
* @private
|
|
6493
6800
|
*/
|
|
6494
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
6801
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6495
6802
|
}
|
|
6496
6803
|
|
|
6497
6804
|
/**
|
|
@@ -6503,7 +6810,7 @@ class AuroInput extends BaseInput {
|
|
|
6503
6810
|
*
|
|
6504
6811
|
*/
|
|
6505
6812
|
static register(name = "auro-input") {
|
|
6506
|
-
AuroLibraryRuntimeUtils$
|
|
6813
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroInput);
|
|
6507
6814
|
}
|
|
6508
6815
|
|
|
6509
6816
|
/**
|
|
@@ -6528,7 +6835,7 @@ class AuroInput extends BaseInput {
|
|
|
6528
6835
|
'withValue': this.value && this.value.length > 0
|
|
6529
6836
|
};
|
|
6530
6837
|
|
|
6531
|
-
return u$
|
|
6838
|
+
return u$3`
|
|
6532
6839
|
<div class="wrapper" part="wrapper">
|
|
6533
6840
|
<div class="main">
|
|
6534
6841
|
<div class="typeIcon">
|
|
@@ -6537,7 +6844,7 @@ class AuroInput extends BaseInput {
|
|
|
6537
6844
|
<!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
|
|
6538
6845
|
This should be cleaned up when auro-icon issue #31 is resolved. -->
|
|
6539
6846
|
${this.inputIconName
|
|
6540
|
-
? c$
|
|
6847
|
+
? c$2([this.inputIconName], (val) => val, (name) => u$3`
|
|
6541
6848
|
<${this.iconTag}
|
|
6542
6849
|
class="accentIcon"
|
|
6543
6850
|
category="payment"
|
|
@@ -6549,7 +6856,7 @@ class AuroInput extends BaseInput {
|
|
|
6549
6856
|
}
|
|
6550
6857
|
|
|
6551
6858
|
${this.type === 'date'
|
|
6552
|
-
? u$
|
|
6859
|
+
? u$3`
|
|
6553
6860
|
<${this.iconTag}
|
|
6554
6861
|
class="accentIcon"
|
|
6555
6862
|
category="interface"
|
|
@@ -6560,7 +6867,7 @@ class AuroInput extends BaseInput {
|
|
|
6560
6867
|
: undefined
|
|
6561
6868
|
}
|
|
6562
6869
|
</div>
|
|
6563
|
-
<label for=${this.id} class="${e$
|
|
6870
|
+
<label for=${this.id} class="${e$2(labelClasses)}" part="label">
|
|
6564
6871
|
<slot name="label">
|
|
6565
6872
|
${this.label}
|
|
6566
6873
|
</slot>
|
|
@@ -6571,23 +6878,23 @@ class AuroInput extends BaseInput {
|
|
|
6571
6878
|
@focusin="${this.handleFocusin}"
|
|
6572
6879
|
@blur="${this.handleBlur}"
|
|
6573
6880
|
id="${this.id}"
|
|
6574
|
-
name="${o$
|
|
6881
|
+
name="${o$2(this.name)}"
|
|
6575
6882
|
type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
|
|
6576
|
-
pattern="${o$
|
|
6577
|
-
maxlength="${o$
|
|
6578
|
-
minlength="${o$
|
|
6579
|
-
inputMode="${o$
|
|
6883
|
+
pattern="${o$2(this.definePattern())}"
|
|
6884
|
+
maxlength="${o$2(this.maxLength ? this.maxLength : undefined)}"
|
|
6885
|
+
minlength="${o$2(this.minLength ? this.minLength : undefined)}"
|
|
6886
|
+
inputMode="${o$2(this.inputMode ? this.inputMode : undefined)}"
|
|
6580
6887
|
?required="${this.required}"
|
|
6581
6888
|
?disabled="${this.disabled}"
|
|
6582
6889
|
aria-describedby="${this.uniqueId}"
|
|
6583
6890
|
aria-invalid="${this.validity !== 'valid'}"
|
|
6584
6891
|
placeholder=${this.getPlaceholder()}
|
|
6585
|
-
lang="${o$
|
|
6892
|
+
lang="${o$2(this.lang)}"
|
|
6586
6893
|
?activeLabel="${this.activeLabel}"
|
|
6587
|
-
spellcheck="${o$
|
|
6588
|
-
autocorrect="${o$
|
|
6589
|
-
autocapitalize="${o$
|
|
6590
|
-
autocomplete="${o$
|
|
6894
|
+
spellcheck="${o$2(this.spellcheck ? this.spellcheck : undefined)}"
|
|
6895
|
+
autocorrect="${o$2(this.autocorrect ? this.autocorrect : undefined)}"
|
|
6896
|
+
autocapitalize="${o$2(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
6897
|
+
autocomplete="${o$2(this.autocomplete ? this.autocomplete : undefined)}"
|
|
6591
6898
|
part="input"
|
|
6592
6899
|
/>
|
|
6593
6900
|
</div>
|
|
@@ -6595,7 +6902,7 @@ class AuroInput extends BaseInput {
|
|
|
6595
6902
|
class="notificationIcons"
|
|
6596
6903
|
part="notificationIcons"
|
|
6597
6904
|
?hasValue="${this.hasValue}">
|
|
6598
|
-
${this.validity && this.validity !== 'valid' ? u$
|
|
6905
|
+
${this.validity && this.validity !== 'valid' ? u$3`
|
|
6599
6906
|
<div class="notification alertNotification">
|
|
6600
6907
|
<${this.iconTag}
|
|
6601
6908
|
category="alert"
|
|
@@ -6604,8 +6911,8 @@ class AuroInput extends BaseInput {
|
|
|
6604
6911
|
</${this.iconTag}>
|
|
6605
6912
|
</div>
|
|
6606
6913
|
` : undefined}
|
|
6607
|
-
${this.hasValue ? u$
|
|
6608
|
-
${this.type === 'password' ? u$
|
|
6914
|
+
${this.hasValue ? u$3`
|
|
6915
|
+
${this.type === 'password' ? u$3`
|
|
6609
6916
|
<div class="notification">
|
|
6610
6917
|
<${this.buttonTag}
|
|
6611
6918
|
variant="flat"
|
|
@@ -6628,7 +6935,7 @@ class AuroInput extends BaseInput {
|
|
|
6628
6935
|
</${this.buttonTag}>
|
|
6629
6936
|
</div>
|
|
6630
6937
|
` : undefined}
|
|
6631
|
-
${!this.disabled && !this.readonly ? u$
|
|
6938
|
+
${!this.disabled && !this.readonly ? u$3`
|
|
6632
6939
|
<div class="notification">
|
|
6633
6940
|
<${this.buttonTag}
|
|
6634
6941
|
variant="flat"
|
|
@@ -6649,14 +6956,14 @@ class AuroInput extends BaseInput {
|
|
|
6649
6956
|
</div>
|
|
6650
6957
|
<!-- Help text and error message template -->
|
|
6651
6958
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
6652
|
-
? u$
|
|
6959
|
+
? u$3`
|
|
6653
6960
|
<${this.helpTextTag}>
|
|
6654
6961
|
<p id="${this.uniqueId}" part="helpText">
|
|
6655
6962
|
<slot name="helptext">${this.getHelpText()}</slot>
|
|
6656
6963
|
</p>
|
|
6657
6964
|
</${this.helpTextTag}>
|
|
6658
6965
|
`
|
|
6659
|
-
: u$
|
|
6966
|
+
: u$3`
|
|
6660
6967
|
<${this.helpTextTag} error>
|
|
6661
6968
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
6662
6969
|
${this.errorMessage}
|