cas-ds-web-components 1.2.52 → 1.2.53
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/build/cas-accordion-element.js +36 -30
- package/build/cas-accordion.js +36 -30
- package/build/cas-alert.js +54 -48
- package/build/cas-booking-box.js +21 -15
- package/build/cas-button.js +79 -73
- package/build/cas-checkbox.js +21 -15
- package/build/cas-date-picker-range.js +49 -43
- package/build/cas-date-picker.js +40 -34
- package/build/cas-ds-web-components.js +2409 -2191
- package/build/cas-header.js +2099 -1890
- package/build/cas-icon.js +305 -299
- package/build/cas-input-file.js +20 -14
- package/build/cas-input.js +55 -20
- package/build/cas-modal.js +19 -13
- package/build/cas-new-footer.js +37 -31
- package/build/cas-radio-button.js +214 -99
- package/build/cas-radio.js +20 -14
- package/build/cas-select.js +922 -721
- package/build/cas-share.js +40 -34
- package/build/cas-snackbar.js +38 -32
- package/build/cas-spinner.js +18 -12
- package/build/cas-text.js +22 -16
- package/build/cas-textfield.js +20 -14
- package/build/cas-theme-provider.js +15 -9
- package/build/cas-toggle.js +18 -12
- package/build/cas-tooltip.js +21 -15
- package/package.json +1 -1
package/build/cas-button.js
CHANGED
|
@@ -1,74 +1,80 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(E=typeof globalThis<"u"?globalThis:E||self,f(E["cas-button"]={}))})(this,function(E){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const f=window,
|
|
5
|
+
*/const f=window,K=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$t=Symbol(),vt=new WeakMap;class Zt{constructor(t,e,o){if(this._$cssResult$=!0,o!==$t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(K&&t===void 0){const o=e!==void 0&&e.length===1;o&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&vt.set(e,t))}return t}toString(){return this.cssText}}const Gt=r=>new Zt(typeof r=="string"?r:r+"",void 0,$t),Qt=(r,t)=>{K?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const o=document.createElement("style"),i=f.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=e.cssText,r.appendChild(o)})},gt=K?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return Gt(e)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Z;const z=window,bt=z.trustedTypes,Xt=bt?bt.emptyScript:"",ft=z.reactiveElementPolyfillSupport,G={toAttribute(r,t){switch(t){case Boolean:r=r?Xt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},yt=(r,t)=>t!==r&&(t==t||r==r),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:yt},X="finalized";class L extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,o)=>{const i=this._$Ep(o,e);i!==void 0&&(this._$Ev.set(i,o),t.push(i))}),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,o,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(i){const s=this[t];this[e]=i,this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of o)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const i of o)e.unshift(gt(i))}else t!==void 0&&e.push(gt(t));return e}static _$Ep(t,e){const o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,o;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)===null||o===void 0||o.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Qt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostConnected)===null||o===void 0?void 0:o.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostDisconnected)===null||o===void 0?void 0:o.call(e)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e,o=Q){var i;const s=this.constructor._$Ep(t,o);if(s!==void 0&&o.reflect===!0){const n=(((i=o.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?o.converter:G).toAttribute(e,o.type);this._$El=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Ev.get(t);if(s!==void 0&&this._$El!==s){const n=i.getPropertyOptions(s),d=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?n.converter:G;this._$El=s,this[s]=d.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,o){let i=!0;t!==void 0&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||yt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,o))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,s)=>this[s]=i),this._$Ei=void 0);let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var s;return(s=i.hostUpdate)===null||s===void 0?void 0:s.call(i)}),this.update(o)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostUpdated)===null||i===void 0?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,o)=>this._$EO(o,this[o],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}L[X]=!0,L.elementProperties=new Map,L.elementStyles=[],L.shadowRootOptions={mode:"open"},ft?.({ReactiveElement:L}),((Z=z.reactiveElementVersions)!==null&&Z!==void 0?Z:z.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var Y;const j=window,C=j.trustedTypes,_t=C?C.createPolicy("lit-html",{createHTML:r=>r}):void 0,tt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,mt="?"+y,Yt=`<${mt}>`,m=document,T=()=>m.createComment(""),R=r=>r===null||typeof r!="object"&&typeof r!="function",St=Array.isArray,te=r=>St(r)||typeof r?.[Symbol.iterator]=="function",et=`[
|
|
14
|
+
\f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,At=/-->/g,Et=/>/g,S=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ct=/'/g,xt=/"/g,wt=/^(?:script|style|textarea|title)$/i,ee=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),oe=ee(1),x=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Pt=new WeakMap,A=m.createTreeWalker(m,129,null,!1);function Ut(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return _t!==void 0?_t.createHTML(t):t}const ie=(r,t)=>{const e=r.length-1,o=[];let i,s=t===2?"<svg>":"",n=k;for(let d=0;d<e;d++){const l=r[d];let h,c,u=-1,$=0;for(;$<l.length&&(n.lastIndex=$,c=n.exec(l),c!==null);)$=n.lastIndex,n===k?c[1]==="!--"?n=At:c[1]!==void 0?n=Et:c[2]!==void 0?(wt.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=S):c[3]!==void 0&&(n=S):n===S?c[0]===">"?(n=i??k,u=-1):c[1]===void 0?u=-2:(u=n.lastIndex-c[2].length,h=c[1],n=c[3]===void 0?S:c[3]==='"'?xt:Ct):n===xt||n===Ct?n=S:n===At||n===Et?n=k:(n=S,i=void 0);const g=n===S&&r[d+1].startsWith("/>")?" ":"";s+=n===k?l+Yt:u>=0?(o.push(h),l.slice(0,u)+tt+l.slice(u)+y+g):l+y+(u===-2?(o.push(void 0),d):g)}return[Ut(r,s+(r[e]||"<?>")+(t===2?"</svg>":"")),o]};class N{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,n=0;const d=t.length-1,l=this.parts,[h,c]=ie(t,e);if(this.el=N.createElement(h,o),A.currentNode=this.el.content,e===2){const u=this.el.content,$=u.firstChild;$.remove(),u.append(...$.childNodes)}for(;(i=A.nextNode())!==null&&l.length<d;){if(i.nodeType===1){if(i.hasAttributes()){const u=[];for(const $ of i.getAttributeNames())if($.endsWith(tt)||$.startsWith(y)){const g=c[n++];if(u.push($),g!==void 0){const pt=i.getAttribute(g.toLowerCase()+tt).split(y),O=/([.?@])?(.*)/.exec(g);l.push({type:1,index:s,name:O[2],strings:pt,ctor:O[1]==="."?se:O[1]==="?"?le:O[1]==="@"?ae:I})}else l.push({type:6,index:s})}for(const $ of u)i.removeAttribute($)}if(wt.test(i.tagName)){const u=i.textContent.split(y),$=u.length-1;if($>0){i.textContent=C?C.emptyScript:"";for(let g=0;g<$;g++)i.append(u[g],T()),A.nextNode(),l.push({type:2,index:++s});i.append(u[$],T())}}}else if(i.nodeType===8)if(i.data===mt)l.push({type:2,index:s});else{let u=-1;for(;(u=i.data.indexOf(y,u+1))!==-1;)l.push({type:7,index:s}),u+=y.length-1}s++}}static createElement(t,e){const o=m.createElement("template");return o.innerHTML=t,o}}function w(r,t,e=r,o){var i,s,n,d;if(t===x)return t;let l=o!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[o]:e._$Cl;const h=R(t)?void 0:t._$litDirective$;return l?.constructor!==h&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),h===void 0?l=void 0:(l=new h(r),l._$AT(r,e,o)),o!==void 0?((n=(d=e)._$Co)!==null&&n!==void 0?n:d._$Co=[])[o]=l:e._$Cl=l),l!==void 0&&(t=w(r,l._$AS(r,t.values),l,o)),t}class re{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:i}=this._$AD,s=((e=t?.creationScope)!==null&&e!==void 0?e:m).importNode(o,!0);A.currentNode=s;let n=A.nextNode(),d=0,l=0,h=i[0];for(;h!==void 0;){if(d===h.index){let c;h.type===2?c=new D(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new he(n,this,t)),this._$AV.push(c),h=i[++l]}d!==h?.index&&(n=A.nextNode(),d++)}return A.currentNode=m,s}v(t){let e=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class D{constructor(t,e,o,i){var s;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=(s=i?.isConnected)===null||s===void 0||s}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),R(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==x&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):te(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==v&&R(this._$AH)?this._$AA.nextSibling.data=t:this.$(m.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=N.createElement(Ut(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===s)this._$AH.v(o);else{const n=new re(s,this),d=n.u(this.options);n.v(o),this.$(d),this._$AH=n}}_$AC(t){let e=Pt.get(t.strings);return e===void 0&&Pt.set(t.strings,e=new N(t)),e}T(t){St(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new D(this.k(T()),this.k(T()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for((o=this._$AP)===null||o===void 0||o.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class I{constructor(t,e,o,i,s){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const s=this.strings;let n=!1;if(s===void 0)t=w(this,t,e,0),n=!R(t)||t!==this._$AH&&t!==x,n&&(this._$AH=t);else{const d=t;let l,h;for(t=s[0],l=0;l<s.length-1;l++)h=w(this,d[o+l],e,l),h===x&&(h=this._$AH[l]),n||(n=!R(h)||h!==this._$AH[l]),h===v?t=v:t!==v&&(t+=(h??"")+s[l+1]),this._$AH[l]=h}n&&!i&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class se extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}}const ne=C?C.emptyScript:"";class le extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,ne):this.element.removeAttribute(this.name)}}class ae extends I{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){var o;if((t=(o=w(this,t,e,0))!==null&&o!==void 0?o:v)===x)return;const i=this._$AH,s=t===v&&i!==v||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==v&&(i===v||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;typeof this._$AH=="function"?this._$AH.call((o=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&o!==void 0?o:this.element,t):this._$AH.handleEvent(t)}}class he{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const Mt=j.litHtmlPolyfillSupport;Mt?.(N,D),((Y=j.litHtmlVersions)!==null&&Y!==void 0?Y:j.litHtmlVersions=[]).push("2.8.0");const de=(r,t,e)=>{var o,i;const s=(o=e?.renderBefore)!==null&&o!==void 0?o:t;let n=s._$litPart$;if(n===void 0){const d=(i=e?.renderBefore)!==null&&i!==void 0?i:null;s._$litPart$=n=new D(t.insertBefore(T(),d),d,void 0,e??{})}return n._$AI(r),n};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const F=window,ot=F.ShadowRoot&&(F.ShadyCSS===void 0||F.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),Ht=new WeakMap;class Ot{constructor(t,e,o){if(this._$cssResult$=!0,o!==it)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(ot&&t===void 0){const o=e!==void 0&&e.length===1;o&&(t=Ht.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Ht.set(e,t))}return t}toString(){return this.cssText}}const a=r=>new Ot(typeof r=="string"?r:r+"",void 0,it),ce=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((o,i,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new Ot(e,r,it)},ue=(r,t)=>{ot?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const o=document.createElement("style"),i=F.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=e.cssText,r.appendChild(o)})},Lt=ot?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return a(e)})(r):r;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var rt;const V=window,Tt=V.trustedTypes,pe=Tt?Tt.emptyScript:"",Rt=V.reactiveElementPolyfillSupport,st={toAttribute(r,t){switch(t){case Boolean:r=r?pe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},kt=(r,t)=>t!==r&&(t==t||r==r),nt={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:kt},lt="finalized";class P extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,o)=>{const i=this._$Ep(o,e);i!==void 0&&(this._$Ev.set(i,o),t.push(i))}),t}static createProperty(t,e=nt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,o,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(i){const s=this[t];this[e]=i,this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||nt}static finalize(){if(this.hasOwnProperty(lt))return!1;this[lt]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of o)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const i of o)e.unshift(Lt(i))}else t!==void 0&&e.push(Lt(t));return e}static _$Ep(t,e){const o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,o;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)===null||o===void 0||o.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ue(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostConnected)===null||o===void 0?void 0:o.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostDisconnected)===null||o===void 0?void 0:o.call(e)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e,o=nt){var i;const s=this.constructor._$Ep(t,o);if(s!==void 0&&o.reflect===!0){const n=(((i=o.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?o.converter:st).toAttribute(e,o.type);this._$El=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Ev.get(t);if(s!==void 0&&this._$El!==s){const n=i.getPropertyOptions(s),d=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?n.converter:st;this._$El=s,this[s]=d.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,o){let i=!0;t!==void 0&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||kt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,o))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,s)=>this[s]=i),this._$Ei=void 0);let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var s;return(s=i.hostUpdate)===null||s===void 0?void 0:s.call(i)}),this.update(o)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(o=>{var i;return(i=o.hostUpdated)===null||i===void 0?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,o)=>this._$EO(o,this[o],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}P[lt]=!0,P.elementProperties=new Map,P.elementStyles=[],P.shadowRootOptions={mode:"open"},Rt?.({ReactiveElement:P}),((rt=V.reactiveElementVersions)!==null&&rt!==void 0?rt:V.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var at,ht;class U extends P{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=de(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return x}}U.finalized=!0,U._$litElement$=!0,(at=globalThis.litElementHydrateSupport)===null||at===void 0||at.call(globalThis,{LitElement:U});const Nt=globalThis.litElementPolyfillSupport;Nt?.({LitElement:U}),((ht=globalThis.litElementVersions)!==null&&ht!==void 0?ht:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
22
28
|
* @license
|
|
23
29
|
* Copyright 2020 Google LLC
|
|
24
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
31
|
+
*/const $e=Symbol.for(""),ve=r=>{if(r?.r===$e)return r?._$litStatic$},Dt=new Map,ge=r=>(t,...e)=>{const o=e.length;let i,s;const n=[],d=[];let l,h=0,c=!1;for(;h<o;){for(l=t[h];h<o&&(s=e[h],(i=ve(s))!==void 0);)l+=i+t[++h],c=!0;h!==o&&d.push(s),n.push(l),h++}if(h===o&&n.push(t[o]),c){const u=n.join("$$lit$$");(t=Dt.get(u))===void 0&&(n.raw=n,Dt.set(u,t=n)),e=d}return r(t,...e)},dt=ge(oe),M="#01A49A",H="#01736C",Bt="#E6F6F5",be="#4DBFB8",fe="#CCEDEB",_="#5143D5",W="#EEECFB",q="#857BE2",ye="#CBC7F2",_e="#DCD9F7",zt="#364855",ct="#79858E",jt="#909AA1",me="#D2D6D9",ut="#E9EBEC",p="#FFFFFF",B="#E53935",It="#B71C1C",Ft="#FFCDD2",Se="0 2px 2px rgba(1, 164, 154, 0.25)",Ae="0 4px 10px rgba(1, 115, 108, 0.35)",Ee="0 1px 2px rgba(1, 115, 108, 0.5)",Ce="0 2px 2px rgba(121, 133, 142, 0.25)",xe="0 2px 2px rgba(229, 57, 53, 0.25)",we="0 4px 10px rgba(183, 28, 28, 0.35)",Pe="0 1px 2px rgba(183, 28, 28, 0.5)",Ue="0 2px 2px rgba(121, 133, 142, 0.25)",J="#FFFFFF",Me="#E9EBEC",Vt="#79858E",He="#364855",b=({variant:r="primary1",color:t,colorHover:e,colorActive:o,bgColor:i,bgColorHover:s,bgColorActive:n,bgColorDisabled:d,boxShadow:l="none",boxShadowHover:h="none",boxShadowPressed:c="none",boxShadowDisabled:u="none"})=>a(`
|
|
26
32
|
.${r} {
|
|
27
|
-
background-color: ${
|
|
33
|
+
background-color: ${a(i)};
|
|
28
34
|
box-sizing: border-box;
|
|
29
|
-
color: ${
|
|
30
|
-
box-shadow: ${
|
|
35
|
+
color: ${a(t)};
|
|
36
|
+
box-shadow: ${a(l)};
|
|
31
37
|
transition: all 100ms ease-in-out;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
.${r}:hover {
|
|
35
|
-
background-color: ${
|
|
36
|
-
color: ${
|
|
37
|
-
box-shadow: ${
|
|
41
|
+
background-color: ${a(s)};
|
|
42
|
+
color: ${a(e)};
|
|
43
|
+
box-shadow: ${a(h)};
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
.${r}:disabled {
|
|
41
|
-
background-color: ${d
|
|
42
|
-
color: ${
|
|
47
|
+
background-color: ${a(d)};
|
|
48
|
+
color: ${a(Vt)};
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.${r}:active, .${r}.loading, {
|
|
46
|
-
background-color: ${
|
|
47
|
-
color: ${
|
|
48
|
-
box-shadow: ${
|
|
52
|
+
background-color: ${a(n)};
|
|
53
|
+
color: ${a(o)};
|
|
54
|
+
box-shadow: ${a(c)};
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.${r}:disabled:not(.loading) {
|
|
52
|
-
background-color: ${d
|
|
53
|
-
color: ${
|
|
54
|
-
box-shadow: ${
|
|
58
|
+
background-color: ${a(d)};
|
|
59
|
+
color: ${a(Vt)};
|
|
60
|
+
box-shadow: ${a(u)};
|
|
55
61
|
cursor: default;
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
.${r}.loading > div {
|
|
59
|
-
border-color: ${
|
|
60
|
-
border-top-color: ${
|
|
61
|
-
border-bottom-color: ${
|
|
62
|
-
border-right-color: ${
|
|
65
|
+
border-color: ${a(n)};
|
|
66
|
+
border-top-color: ${a(o)};
|
|
67
|
+
border-bottom-color: ${a(o)};
|
|
68
|
+
border-right-color: ${a(o)};
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
.${r}:disabled.loading > div {
|
|
66
|
-
border-color: ${
|
|
67
|
-
border-top-color: ${
|
|
68
|
-
border-bottom-color: ${
|
|
69
|
-
border-right-color: ${
|
|
72
|
+
border-color: ${a(n)};
|
|
73
|
+
border-top-color: ${a(o)};
|
|
74
|
+
border-bottom-color: ${a(o)};
|
|
75
|
+
border-right-color: ${a(o)};
|
|
70
76
|
}
|
|
71
|
-
`);var
|
|
77
|
+
`);var Wt=ce`
|
|
72
78
|
.base {
|
|
73
79
|
display: flex;
|
|
74
80
|
justify-content: center;
|
|
@@ -134,11 +140,11 @@
|
|
|
134
140
|
margin-left: 8px;
|
|
135
141
|
}
|
|
136
142
|
|
|
137
|
-
${b({variant:"primary1",color:
|
|
138
|
-
${b({variant:"primary2",color:
|
|
139
|
-
${b({variant:"outline1",color:
|
|
143
|
+
${b({variant:"primary1",color:p,colorHover:p,colorActive:p,bgColor:M,bgColorHover:be,bgColorActive:H,bgColorDisabled:ut,boxShadow:Se,boxShadowHover:Ae,boxShadowPressed:Ee,boxShadowDisabled:Ce})}
|
|
144
|
+
${b({variant:"primary2",color:p,colorHover:It,colorActive:p,bgColor:B,bgColorHover:Ft,bgColorActive:It,bgColorDisabled:ut,boxShadow:xe,boxShadowHover:we,boxShadowPressed:Pe,boxShadowDisabled:Ue})}
|
|
145
|
+
${b({variant:"outline1",color:H,colorHover:H,colorActive:p,bgColor:"transparent",bgColorHover:Bt,bgColorActive:M,bgColorDisabled:"transparent"})}
|
|
140
146
|
.outline1 {
|
|
141
|
-
border: 1px solid ${
|
|
147
|
+
border: 1px solid ${a(M)};
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
.outline1:active,
|
|
@@ -147,16 +153,16 @@
|
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
.outline1:disabled {
|
|
150
|
-
border: 1px solid ${
|
|
156
|
+
border: 1px solid ${a(jt)};
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
.outline1:disabled.loading {
|
|
154
160
|
border: none;
|
|
155
161
|
}
|
|
156
162
|
|
|
157
|
-
${b({variant:"outline2",color:
|
|
163
|
+
${b({variant:"outline2",color:B,colorHover:B,colorActive:p,bgColor:"transparent",bgColorHover:Ft,bgColorActive:B,bgColorDisabled:"transparent"})}
|
|
158
164
|
.outline2 {
|
|
159
|
-
border: 1px solid ${
|
|
165
|
+
border: 1px solid ${a(B)};
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
.outline2:active,
|
|
@@ -165,7 +171,7 @@
|
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
.outline2:disabled {
|
|
168
|
-
border: 1px solid ${
|
|
174
|
+
border: 1px solid ${a(jt)};
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
.outline2:disabled.loading {
|
|
@@ -190,46 +196,46 @@
|
|
|
190
196
|
border: none;
|
|
191
197
|
}
|
|
192
198
|
|
|
193
|
-
${b({variant:"text1",color:
|
|
199
|
+
${b({variant:"text1",color:H,colorHover:H,colorActive:H,bgColor:"transparent",bgColorHover:Bt,bgColorActive:fe,bgColorDisabled:"transparent"})}
|
|
194
200
|
.text1.loading {
|
|
195
|
-
background-color: ${
|
|
201
|
+
background-color: ${a(M)};
|
|
196
202
|
}
|
|
197
203
|
|
|
198
204
|
.text1.loading > div {
|
|
199
|
-
border-color: ${
|
|
200
|
-
border-top-color: ${
|
|
201
|
-
border-bottom-color: ${
|
|
202
|
-
border-right-color: ${
|
|
205
|
+
border-color: ${a(M)};
|
|
206
|
+
border-top-color: ${a(p)};
|
|
207
|
+
border-bottom-color: ${a(p)};
|
|
208
|
+
border-right-color: ${a(p)};
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
.text1:disabled.loading > div {
|
|
206
|
-
border-color: ${
|
|
207
|
-
border-top-color: ${
|
|
208
|
-
border-bottom-color: ${
|
|
209
|
-
border-right-color: ${
|
|
212
|
+
border-color: ${a(M)};
|
|
213
|
+
border-top-color: ${a(p)};
|
|
214
|
+
border-bottom-color: ${a(p)};
|
|
215
|
+
border-right-color: ${a(p)};
|
|
210
216
|
}
|
|
211
217
|
|
|
212
|
-
${b({variant:"text2",color:
|
|
218
|
+
${b({variant:"text2",color:zt,colorHover:He,colorActive:zt,bgColor:p,bgColorHover:Me,bgColorActive:me,bgColorDisabled:p})}
|
|
213
219
|
.text2.loading {
|
|
214
|
-
background-color: ${
|
|
220
|
+
background-color: ${a(ct)};
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
.text2.loading > div {
|
|
218
|
-
border-color: ${
|
|
219
|
-
border-top-color: ${
|
|
220
|
-
border-bottom-color: ${
|
|
221
|
-
border-right-color: ${
|
|
224
|
+
border-color: ${a(ct)};
|
|
225
|
+
border-top-color: ${a(p)};
|
|
226
|
+
border-bottom-color: ${a(p)};
|
|
227
|
+
border-right-color: ${a(p)};
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
.text2:disabled.loading > div {
|
|
225
|
-
border-color: ${
|
|
226
|
-
border-top-color: ${
|
|
227
|
-
border-bottom-color: ${
|
|
228
|
-
border-right-color: ${
|
|
231
|
+
border-color: ${a(ct)};
|
|
232
|
+
border-top-color: ${a(p)};
|
|
233
|
+
border-bottom-color: ${a(p)};
|
|
234
|
+
border-right-color: ${a(p)};
|
|
229
235
|
}
|
|
230
236
|
|
|
231
|
-
${b({variant:"text3",color:
|
|
232
|
-
${b({variant:"icon1",color:
|
|
237
|
+
${b({variant:"text3",color:_,colorHover:_,colorActive:J,bgColor:p,bgColorHover:W,bgColorActive:q,bgColorDisabled:p})}
|
|
238
|
+
${b({variant:"icon1",color:_,colorHover:_,colorActive:J,bgColor:W,bgColorHover:ye,bgColorActive:q,bgColorDisabled:ut})}
|
|
233
239
|
.icon1 {
|
|
234
240
|
height: 32px;
|
|
235
241
|
min-width: 32px;
|
|
@@ -244,28 +250,28 @@
|
|
|
244
250
|
.icon1.icon svg {
|
|
245
251
|
margin-right: 0;
|
|
246
252
|
}
|
|
247
|
-
${b({variant:"pill",color:
|
|
253
|
+
${b({variant:"pill",color:_,colorHover:_,colorActive:J,bgColor:p,bgColorHover:W,bgColorActive:q,bgColorDisabled:p})}
|
|
248
254
|
.pill {
|
|
249
255
|
border-radius: 50px;
|
|
250
|
-
border: 1px solid ${
|
|
256
|
+
border: 1px solid ${a(_e)};
|
|
251
257
|
padding: 8px 12px;
|
|
252
258
|
}
|
|
253
259
|
:host([active='true']) .pill {
|
|
254
260
|
background: red;
|
|
255
261
|
}
|
|
256
|
-
${b({variant:"tab1",color:
|
|
262
|
+
${b({variant:"tab1",color:_,colorHover:_,colorActive:J,bgColor:p,bgColorHover:W,bgColorActive:q,bgColorDisabled:p})}
|
|
257
263
|
|
|
258
264
|
.rounded {
|
|
259
265
|
border-radius: 50px;
|
|
260
266
|
}
|
|
261
|
-
`,
|
|
267
|
+
`,qt={exports:{}};/*!
|
|
262
268
|
Copyright (c) 2018 Jed Watson.
|
|
263
269
|
Licensed under the MIT License (MIT), see
|
|
264
270
|
http://jedwatson.github.io/classnames
|
|
265
|
-
*/(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var
|
|
266
|
-
<style>${
|
|
267
|
-
<button type=${
|
|
268
|
-
${i==="true"?
|
|
269
|
-
<span>${
|
|
271
|
+
*/(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var s="",n=0;n<arguments.length;n++){var d=arguments[n];d&&(s=i(s,o(d)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return e.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var n="";for(var d in s)t.call(s,d)&&s[d]&&(n=i(n,d));return n}function i(s,n){return n?s?s+" "+n:s+n:s}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(qt);var Oe=qt.exports;function Le({variant:r,variantText:t,text:e,loading:o,size:i,fullWidth:s,iconName:n,iconPosition:d,rounded:l}){const h=o==="true",c=d==="right",u=Oe({base:!0,[r]:!0,loading:h,fullWidth:s==="true",[i]:!0,[t]:!0,icon:n,rightIcon:c,rounded:l==="true"});return{buttonIcon:h?"flat-loading":n,buttonStyle:u,buttonText:h?"":e}}class Jt extends U{static styles=Wt;static shadowRootOptions={...U.shadowRootOptions,mode:"open"};constructor(){super(),this.size="medium",this.variant="primary1",this.disabled="false",this.variantText="body2",this.fullWidth="false",this.type="button",this.loading="false",this.iconSize=12,this.iconName=null}static properties={text:{type:String},loading:{type:String},variant:{type:String},size:{type:String},component:{type:String},variantText:{type:String},onClick:{type:Function},disabled:{type:String},iconName:{type:String},iconSize:{type:String},type:{type:String},iconPosition:{type:String},fullWidth:{type:String},rounded:{type:String}};render(){const{text:t,size:e,variant:o,loading:i,onClick:s,disabled:n,fullWidth:d,variantText:l,iconName:h,iconPosition:c,iconSize:u,type:$,rounded:g}=this,{buttonText:pt,buttonStyle:O,buttonIcon:Kt}=Le({text:t,loading:i,size:e,variant:o,fullWidth:d,variantText:l,iconName:h,iconPosition:c,rounded:g});return dt`
|
|
272
|
+
<style>${Wt}</style>
|
|
273
|
+
<button type=${$} class=${O} ?disabled=${n==="true"} @click=${s}>
|
|
274
|
+
${i==="true"?dt`<cas-spinner></cas-spinner>`:Kt?dt`<cas-icon variant="flat" size=${u} parentVariant=${o} name=${Kt}/></cas-icon>`:null}
|
|
275
|
+
<span>${pt}</span>
|
|
270
276
|
</button>
|
|
271
|
-
`}createRenderRoot(){return this}}customElements.get("cas-button")||customElements.define("cas-button",
|
|
277
|
+
`}createRenderRoot(){return this}}customElements.get("cas-button")||customElements.define("cas-button",Jt),E.CasButton=Jt,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/build/cas-checkbox.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(g,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(g=typeof globalThis<"u"?globalThis:g||self,v(g["cas-checkbox"]={}))})(this,function(g){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const v=window,
|
|
5
|
+
*/const v=window,j=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),st=new WeakMap;class xt{constructor(t,e,s){if(this._$cssResult$=!0,s!==et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(j&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=st.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&st.set(e,t))}return t}toString(){return this.cssText}}const Pt=o=>new xt(typeof o=="string"?o:o+"",void 0,et),Ut=(o,t)=>{j?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=v.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)})},it=j?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Pt(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var L;const R=window,ot=R.trustedTypes,kt=ot?ot.emptyScript:"",nt=R.reactiveElementPolyfillSupport,B={toAttribute(o,t){switch(t){case Boolean:o=o?kt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},rt=(o,t)=>t!==o&&(t==t||o==o),D={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:rt},I="finalized";class w extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=D){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||D}static finalize(){if(this.hasOwnProperty(I))return!1;this[I]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(it(i))}else t!==void 0&&e.push(it(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ut(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=D){var i;const n=this.constructor._$Ep(t,s);if(n!==void 0&&s.reflect===!0){const r=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:B).toAttribute(e,s.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=i.getPropertyOptions(n),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?r.converter:B;this._$El=n,this[n]=l.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||rt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}w[I]=!0,w.elementProperties=new Map,w.elementStyles=[],w.shadowRootOptions={mode:"open"},nt?.({ReactiveElement:w}),((L=R.reactiveElementVersions)!==null&&L!==void 0?L:R.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var V;const N=window,A=N.trustedTypes,ht=A?A.createPolicy("lit-html",{createHTML:o=>o}):void 0,W="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,lt="?"+_,Ot=`<${lt}>`,f=document,x=()=>f.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",at=Array.isArray,Rt=o=>at(o)||typeof o?.[Symbol.iterator]=="function",q=`[
|
|
14
|
+
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,y=RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,pt=/"/g,$t=/^(?:script|style|textarea|title)$/i,Nt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),F=Nt(1),E=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),vt=new WeakMap,m=f.createTreeWalker(f,129,null,!1);function _t(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const Tt=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":"",r=U;for(let l=0;l<e;l++){const h=o[l];let a,c,d=-1,p=0;for(;p<h.length&&(r.lastIndex=p,c=r.exec(h),c!==null);)p=r.lastIndex,r===U?c[1]==="!--"?r=ct:c[1]!==void 0?r=dt:c[2]!==void 0?($t.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=y):c[3]!==void 0&&(r=y):r===y?c[0]===">"?(r=i??U,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?y:c[3]==='"'?pt:ut):r===pt||r===ut?r=y:r===ct||r===dt?r=U:(r=y,i=void 0);const $=r===y&&o[l+1].startsWith("/>")?" ":"";n+=r===U?h+Ot:d>=0?(s.push(a),h.slice(0,d)+W+h.slice(d)+_+$):h+_+(d===-2?(s.push(void 0),l):$)}return[_t(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),s]};class k{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const l=t.length-1,h=this.parts,[a,c]=Tt(t,e);if(this.el=k.createElement(a,s),m.currentNode=this.el.content,e===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(i=m.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes()){const d=[];for(const p of i.getAttributeNames())if(p.endsWith(W)||p.startsWith(_)){const $=c[r++];if(d.push(p),$!==void 0){const Zt=i.getAttribute($.toLowerCase()+W).split(_),z=/([.?@])?(.*)/.exec($);h.push({type:1,index:n,name:z[2],strings:Zt,ctor:z[1]==="."?Mt:z[1]==="?"?jt:z[1]==="@"?Lt:T})}else h.push({type:6,index:n})}for(const p of d)i.removeAttribute(p)}if($t.test(i.tagName)){const d=i.textContent.split(_),p=d.length-1;if(p>0){i.textContent=A?A.emptyScript:"";for(let $=0;$<p;$++)i.append(d[$],x()),m.nextNode(),h.push({type:2,index:++n});i.append(d[p],x())}}}else if(i.nodeType===8)if(i.data===lt)h.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(_,d+1))!==-1;)h.push({type:7,index:n}),d+=_.length-1}n++}}static createElement(t,e){const s=f.createElement("template");return s.innerHTML=t,s}}function S(o,t,e=o,s){var i,n,r,l;if(t===E)return t;let h=s!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[s]:e._$Cl;const a=P(t)?void 0:t._$litDirective$;return h?.constructor!==a&&((n=h?._$AO)===null||n===void 0||n.call(h,!1),a===void 0?h=void 0:(h=new a(o),h._$AT(o,e,s)),s!==void 0?((r=(l=e)._$Co)!==null&&r!==void 0?r:l._$Co=[])[s]=h:e._$Cl=h),h!==void 0&&(t=S(o,h._$AS(o,t.values),h,s)),t}class Ht{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:s},parts:i}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:f).importNode(s,!0);m.currentNode=n;let r=m.nextNode(),l=0,h=0,a=i[0];for(;a!==void 0;){if(l===a.index){let c;a.type===2?c=new O(r,r.nextSibling,this,t):a.type===1?c=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(c=new Bt(r,this,t)),this._$AV.push(c),a=i[++h]}l!==a?.index&&(r=m.nextNode(),l++)}return m.currentNode=f,n}v(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class O{constructor(t,e,s,i){var n;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cp=(n=i?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),P(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Rt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==u&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(f.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=k.createElement(_t(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(s);else{const r=new Ht(n,this),l=r.u(this.options);r.v(s),this.$(l),this._$AH=r}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new k(t)),e}T(t){at(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new O(this.k(x()),this.k(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class T{constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=S(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{const l=t;let h,a;for(t=n[0],h=0;h<n.length-1;h++)a=S(this,l[s+h],e,h),a===E&&(a=this._$AH[h]),r||(r=!P(a)||a!==this._$AH[h]),a===u?t=u:t!==u&&(t+=(a??"")+n[h+1]),this._$AH[h]=a}r&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mt extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}const zt=A?A.emptyScript:"";class jt extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==u?this.element.setAttribute(this.name,zt):this.element.removeAttribute(this.name)}}class Lt extends T{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=S(this,t,e,0))!==null&&s!==void 0?s:u)===E)return;const i=this._$AH,n=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==u&&(i===u||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Bt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const ft=N.litHtmlPolyfillSupport;ft?.(k,O),((V=N.litHtmlVersions)!==null&&V!==void 0?V:N.litHtmlVersions=[]).push("2.8.0");const Dt=(o,t,e)=>{var s,i;const n=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let r=n._$litPart$;if(r===void 0){const l=(i=e?.renderBefore)!==null&&i!==void 0?i:null;n._$litPart$=r=new O(t.insertBefore(x(),l),l,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const H=window,J=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),yt=new WeakMap;class mt{constructor(t,e,s){if(this._$cssResult$=!0,s!==K)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(J&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=yt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&yt.set(e,t))}return t}toString(){return this.cssText}}const It=o=>new mt(typeof o=="string"?o:o+"",void 0,K),Vt=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new mt(e,o,K)},Wt=(o,t)=>{J?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=H.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)})},gt=J?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return It(e)})(o):o;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var Z;const M=window,At=M.trustedTypes,qt=At?At.emptyScript:"",Et=M.reactiveElementPolyfillSupport,G={toAttribute(o,t){switch(t){case Boolean:o=o?qt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},St=(o,t)=>t!==o&&(t==t||o==o),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:St},X="finalized";class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(gt(i))}else t!==void 0&&e.push(gt(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Wt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=Q){var i;const n=this.constructor._$Ep(t,s);if(n!==void 0&&s.reflect===!0){const r=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:G).toAttribute(e,s.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=i.getPropertyOptions(n),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?r.converter:G;this._$El=n,this[n]=l.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||St)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}b[X]=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},Et?.({ReactiveElement:b}),((Z=M.reactiveElementVersions)!==null&&Z!==void 0?Z:M.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var Y,tt;class C extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return E}}C.finalized=!0,C._$litElement$=!0,(Y=globalThis.litElementHydrateSupport)===null||Y===void 0||Y.call(globalThis,{LitElement:C});const bt=globalThis.litElementPolyfillSupport;bt?.({LitElement:C}),((tt=globalThis.litElementVersions)!==null&&tt!==void 0?tt:globalThis.litElementVersions=[]).push("3.3.3");var Ft=Vt`
|
|
22
28
|
.checkbox-container {
|
|
23
29
|
cursor: pointer;
|
|
24
30
|
display: flex;
|
|
@@ -63,13 +69,13 @@
|
|
|
63
69
|
:host([disabled]) {
|
|
64
70
|
color: #79858E;
|
|
65
71
|
}
|
|
66
|
-
`,
|
|
72
|
+
`,Ct={exports:{}};/*!
|
|
67
73
|
Copyright (c) 2018 Jed Watson.
|
|
68
74
|
Licensed under the MIT License (MIT), see
|
|
69
75
|
http://jedwatson.github.io/classnames
|
|
70
|
-
*/(function(
|
|
71
|
-
<div class="${s}" @click=${
|
|
72
|
-
${this.checked?
|
|
76
|
+
*/(function(o){(function(){var t={}.hasOwnProperty;function e(){for(var n="",r=0;r<arguments.length;r++){var l=arguments[r];l&&(n=i(n,s(l)))}return n}function s(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var l in n)t.call(n,l)&&n[l]&&(r=i(r,l));return r}function i(n,r){return r?n?n+" "+r:n+r:n}o.exports?(e.default=e,o.exports=e):window.classNames=e})()})(Ct);var Jt=Ct.exports;function Kt({size:o,checked:t}){const e=Jt({"checkbox-container":!0,[`size-${o}`]:!0,checked:t}),i={20:"12",24:"16"}[o];return{checkboxStyles:e,iconSize:i}}class wt extends C{static formAssociated=!0;static styles=Ft;static shadowRootOptions={...C.shadowRootOptions,mode:"open"};static properties={name:{type:String},value:{type:String},size:{type:String},checked:{type:Boolean},text:{type:String}};constructor(){super(),this.name="",this.value="",this.size="20",this.checked=!1,this.text=""}onChange(){this.checked=!this.checked,this.value=this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0}))}render(){const{size:t,checked:e}=this,{checkboxStyles:s,iconSize:i}=Kt({size:t,checked:e}),n=this.disabled?()=>{}:this.onChange.bind(this);return F`
|
|
77
|
+
<div class="${s}" @click=${n} >
|
|
78
|
+
${this.checked?F`<cas-icon name="flat-check" size=${i} ></cas-icon>`:""}
|
|
73
79
|
</div>
|
|
74
|
-
${this.text?
|
|
75
|
-
`}}customElements.get("cas-checkbox")||customElements.define("cas-checkbox",
|
|
80
|
+
${this.text?F`<cas-text variant="body1">${this.text}</cas-text>`:""}
|
|
81
|
+
`}}customElements.get("cas-checkbox")||customElements.define("cas-checkbox",wt),g.CasCheckbox=wt,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|