cas-ds-web-components 1.2.7 → 1.2.8
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-ds-web-components.js +150 -150
- package/build/cas-input.js +14 -14
- package/package.json +1 -1
package/build/cas-input.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(m,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(m=typeof globalThis<"u"?globalThis:m||self,$(m["cas-input"]={}))})(this,function(m){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const $=window,k=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,z=Symbol(),W=new WeakMap;class J{constructor(t,e,i){if(this._$cssResult$=!0,i!==z)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 i=e!==void 0&&e.length===1;i&&(t=W.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&W.set(e,t))}return t}toString(){return this.cssText}}const Z=n=>new J(typeof n=="string"?n:n+"",void 0,z),pt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>i+(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.")})(s)+n[o+1],n[0]);return new J(e,n,z)},ut=(n,t)=>{k?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=$.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},K=k?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Z(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var j;const R=window,F=R.trustedTypes,vt=F?F.emptyScript:"",G=R.reactiveElementPolyfillSupport,I={toAttribute(n,t){switch(t){case Boolean:n=n?vt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Q=(n,t)=>t!==n&&(t==t||n==n),
|
|
9
|
+
*/var j;const R=window,F=R.trustedTypes,vt=F?F.emptyScript:"",G=R.reactiveElementPolyfillSupport,I={toAttribute(n,t){switch(t){case Boolean:n=n?vt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Q=(n,t)=>t!==n&&(t==t||n==n),L={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:Q};class A extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}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,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=L){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||L}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(K(s))}else t!==void 0&&e.push(K(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){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,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.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 i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=L){var s;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),h=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:I;this._$El=o,this[o]=h.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Q)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(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((s,o)=>this[o]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},G?.({ReactiveElement:A}),((j=R.reactiveElementVersions)!==null&&j!==void 0?j:R.reactiveElementVersions=[]).push("1.4.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
13
|
+
*/var B;const N=window,b=N.trustedTypes,X=b?b.createPolicy("lit-html",{createHTML:n=>n}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,Y="?"+f,$t=`<${Y}>`,S=document,P=(n="")=>S.createComment(n),O=n=>n===null||typeof n!="object"&&typeof n!="function",tt=Array.isArray,ft=n=>tt(n)||typeof n?.[Symbol.iterator]=="function",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,it=/>/g,y=RegExp(`>|[
|
|
14
14
|
\f\r](?:([^\\s"'>=/]+)([
|
|
15
15
|
\f\r]*=[
|
|
16
16
|
\f\r]*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,nt=/"/g,ot=/^(?:script|style|textarea|title)$/i,gt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),_t=gt(1),
|
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,nt=/"/g,ot=/^(?:script|style|textarea|title)$/i,gt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),_t=gt(1),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),rt=new WeakMap,x=S.createTreeWalker(S,129,null,!1),yt=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=U;for(let l=0;l<e;l++){const a=n[l];let u,c,d=-1,v=0;for(;v<a.length&&(r.lastIndex=v,c=r.exec(a),c!==null);)v=r.lastIndex,r===U?c[1]==="!--"?r=et:c[1]!==void 0?r=it:c[2]!==void 0?(ot.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=y):c[3]!==void 0&&(r=y):r===y?c[0]===">"?(r=s??U,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,u=c[1],r=c[3]===void 0?y:c[3]==='"'?nt:st):r===nt||r===st?r=y:r===et||r===it?r=U:(r=y,s=void 0);const g=r===y&&n[l+1].startsWith("/>")?" ":"";o+=r===U?a+$t:d>=0?(i.push(u),a.slice(0,d)+"$lit$"+a.slice(d)+f+g):a+f+(d===-2?(i.push(void 0),l):g)}const h=o+(n[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[X!==void 0?X.createHTML(h):h,i]};class H{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const h=t.length-1,l=this.parts,[a,u]=yt(t,e);if(this.el=H.createElement(a,i),x.currentNode=this.el.content,e===2){const c=this.el.content,d=c.firstChild;d.remove(),c.append(...d.childNodes)}for(;(s=x.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const d of s.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(f)){const v=u[r++];if(c.push(d),v!==void 0){const g=s.getAttribute(v.toLowerCase()+"$lit$").split(f),_=/([.?@])?(.*)/.exec(v);l.push({type:1,index:o,name:_[2],strings:g,ctor:_[1]==="."?At:_[1]==="?"?St:_[1]==="@"?Et:M})}else l.push({type:6,index:o})}for(const d of c)s.removeAttribute(d)}if(ot.test(s.tagName)){const c=s.textContent.split(f),d=c.length-1;if(d>0){s.textContent=b?b.emptyScript:"";for(let v=0;v<d;v++)s.append(c[v],P()),x.nextNode(),l.push({type:2,index:++o});s.append(c[d],P())}}}else if(s.nodeType===8)if(s.data===Y)l.push({type:2,index:o});else{let c=-1;for(;(c=s.data.indexOf(f,c+1))!==-1;)l.push({type:7,index:o}),c+=f.length-1}o++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function w(n,t,e=n,i){var s,o,r,h;if(t===E)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const a=O(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((o=l?._$AO)===null||o===void 0||o.call(l,!1),a===void 0?l=void 0:(l=new a(n),l._$AT(n,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=w(n,l._$AS(n,t.values),l,i)),t}class mt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:s}=this._$AD,o=((e=t?.creationScope)!==null&&e!==void 0?e:S).importNode(i,!0);x.currentNode=o;let r=x.nextNode(),h=0,l=0,a=s[0];for(;a!==void 0;){if(h===a.index){let u;a.type===2?u=new T(r,r.nextSibling,this,t):a.type===1?u=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(u=new xt(r,this,t)),this.u.push(u),a=s[++l]}h!==a?.index&&(r=x.nextNode(),h++)}return o}p(t){let e=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class T{constructor(t,e,i,s){var o;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cm=(o=s?.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}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),O(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==p&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(s.h,this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.p(i);else{const r=new mt(o,this),h=r.v(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=rt.get(t.strings);return e===void 0&&rt.set(t.strings,e=new H(t)),e}k(t){tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new T(this.O(P()),this.O(P()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class M{constructor(t,e,i,s,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=w(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{const h=t;let l,a;for(t=o[0],l=0;l<o.length-1;l++)a=w(this,h[i+l],e,l),a===E&&(a=this._$AH[l]),r||(r=!O(a)||a!==this._$AH[l]),a===p?t=p:t!==p&&(t+=(a??"")+o[l+1]),this._$AH[l]=a}r&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class At extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const bt=b?b.emptyScript:"";class St extends M{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,bt):this.element.removeAttribute(this.name)}}class Et extends M{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=w(this,t,e,0))!==null&&i!==void 0?i:p)===E)return;const s=this._$AH,o=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class xt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const lt=N.litHtmlPolyfillSupport;lt?.(H,T),((B=N.litHtmlVersions)!==null&&B!==void 0?B:N.litHtmlVersions=[]).push("2.4.0");const wt=(n,t,e)=>{var i,s;const o=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=o._$litPart$;if(r===void 0){const h=(s=e?.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new T(t.insertBefore(P(),h),h,void 0,e??{})}return r._$AI(n),r};/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var D,q;class C extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wt(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
|
|
21
|
+
*/var D,q;class C extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wt(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,(D=globalThis.litElementHydrateSupport)===null||D===void 0||D.call(globalThis,{LitElement:C});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:C}),((q=globalThis.litElementVersions)!==null&&q!==void 0?q:globalThis.litElementVersions=[]).push("3.2.2");/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2020 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const Ct=Symbol.for(""),Pt=n=>{if(n?.r===Ct)return n?._$litStatic$},ht=new Map,
|
|
25
|
+
*/const Ct=Symbol.for(""),Pt=n=>{if(n?.r===Ct)return n?._$litStatic$},ht=new Map,Ot=n=>(t,...e)=>{const i=e.length;let s,o;const r=[],h=[];let l,a=0,u=!1;for(;a<i;){for(l=t[a];a<i&&(o=e[a],(s=Pt(o))!==void 0);)l+=s+t[++a],u=!0;h.push(o),r.push(l),a++}if(a===i&&r.push(t[i]),u){const c=r.join("$$lit$$");(t=ht.get(c))===void 0&&(r.raw=r,ht.set(c,t=r)),e=h}return n(t,...e)},V=Ot(_t);var Ut=pt`
|
|
26
26
|
:host([fullWidth]) {
|
|
27
27
|
width: 100%;
|
|
28
28
|
}
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
border-radius: 8px;
|
|
41
41
|
width: 100%;
|
|
42
42
|
padding: 26px 16px 10px;
|
|
43
|
-
border: 1px solid ${
|
|
44
|
-
font-family: 'Rubik';
|
|
43
|
+
border: 1px solid ${Z("#BCC2C6")};
|
|
44
|
+
font-family: 'Rubik', system-ui;
|
|
45
45
|
font-style: normal;
|
|
46
46
|
font-weight: 400;
|
|
47
47
|
font-size: 16px;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.input-content label {
|
|
66
|
-
font-family: Rubik,
|
|
66
|
+
font-family: Rubik, system-ui;
|
|
67
67
|
pointer-events: none;
|
|
68
68
|
position: absolute;
|
|
69
69
|
top: 0;
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
Copyright (c) 2018 Jed Watson.
|
|
182
182
|
Licensed under the MIT License (MIT), see
|
|
183
183
|
http://jedwatson.github.io/classnames
|
|
184
|
-
*/(function(n){(function(){var t={}.hasOwnProperty;function e(){for(var i=[],s=0;s<arguments.length;s++){var o=arguments[s];if(!!o){var r=typeof o;if(r==="string"||r==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var
|
|
185
|
-
<div class=${
|
|
184
|
+
*/(function(n){(function(){var t={}.hasOwnProperty;function e(){for(var i=[],s=0;s<arguments.length;s++){var o=arguments[s];if(!!o){var r=typeof o;if(r==="string"||r==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var h=e.apply(null,o);h&&i.push(h)}}else if(r==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){i.push(o.toString());continue}for(var l in o)t.call(o,l)&&o[l]&&i.push(l)}}}return i.join(" ")}n.exports?(e.default=e,n.exports=e):window.classNames=e})()})(ct);var Ht=ct.exports;function Tt({value:n,hasError:t,icon:e,pattern:i,showHelperText:s}){const o=s==="true"||t,r=e!=="",h=n!=="",l=Rt({value:n,pattern:i}),a=Ht({"input-container":!0,"has-content":h,"has-error":t||h&&!l,"has-icon":r});return{showHelper:o,contentStyle:a,hasValue:h,hasIcon:r,isValid:l}}function Rt({value:n,pattern:t}){return new RegExp(t).test(n)}class dt extends C{static formAssociated=!0;static styles=Ut;static shadowRootOptions={...C.shadowRootOptions,mode:"open"};static properties={type:{type:String},name:{type:String},value:{type:String},label:{type:String},pattern:{type:String},required:{type:String},disabled:{type:String},readonly:{type:String},isInputError:{type:String},helperText:{type:String},showHelperText:{type:String},icon:{type:String},iconSize:{type:String},alignment:{type:String},iconProps:{type:String},iconPosition:{type:String}};constructor(){super(),this.value="",this.name=this.getAttribute("label")?.toLowerCase().replace(" ","-")||"input",this.isInputError="false",this.icon="",this.iconSize="20",this.alignment="leading"}_onChange(t){this.value=t.composedPath()[0].value,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}updated(){this.disabled==="true"&&this.shadowRoot.querySelector("input")?.setAttribute("disabled",!0),this.readonly&&this.shadowRoot.querySelector("input")?.setAttribute("readonly",!0)}firstUpdated(){const{iconProps:t,iconPosition:e}=this;e==="right"&&this.setAttribute("alignment","trailing");const i=t?.replace(/'/g,'"');if(i){let s=JSON.parse(i);this.icon=s.name,this.iconSize=s.size}}render(){const{label:t,value:e,name:i,required:s,pattern:o,isInputError:r,helperText:h,icon:l,showHelperText:a}=this,{showHelper:u,contentStyle:c,hasIcon:d,isValid:v}=Tt({value:e,hasError:r==="true",icon:l,pattern:o,required:this.required,showHelperText:a}),g={name:i,value:e,error:!1,success:!1};let _="Campo v\xE1lido";s&&!e||!v?(s&&!e&&(_="Este campo es requerido"),v||(_=`El valor ingresado no es v\xE1lido ${h}`),g.error=!0):g.success=!0;const Nt=new CustomEvent("callback",{detail:{...g,message:_}});return this.dispatchEvent(Nt),V`
|
|
185
|
+
<div class=${c}>
|
|
186
186
|
<div class="input-content">
|
|
187
187
|
${d?V`
|
|
188
188
|
<div class="icon">
|
|
@@ -201,8 +201,8 @@
|
|
|
201
201
|
</div>
|
|
202
202
|
${u?V`
|
|
203
203
|
<div class="helper">
|
|
204
|
-
<cas-text variant="caption1">${
|
|
204
|
+
<cas-text variant="caption1">${h}</cas-text>
|
|
205
205
|
</div>
|
|
206
206
|
`:""}
|
|
207
207
|
</div>
|
|
208
|
-
`}}customElements.get("cas-input")||customElements.define("cas-input",dt),
|
|
208
|
+
`}}customElements.get("cas-input")||customElements.define("cas-input",dt),m.CasInput=dt,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|