@cas-smartdesign/lit-input 7.1.3 → 7.1.5

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.
@@ -2,7 +2,7 @@ var window;(window||={})["@cas-smartdesign/lit-input"]=(()=>{var X=Object.define
2
2
  \f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,bt=/>/g,w=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
3
3
  \f\r"'\`<>=]|("|')|))|$)`,"g"),_t=/'/g,At=/"/g,Ct=/^(?:script|style|textarea|title)$/i,Lt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),y=Lt(1),he=Lt(2),C=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),xt=new WeakMap,E=S.createTreeWalker(S,129,null,!1);function Mt(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return $t!==void 0?$t.createHTML(t):t}var jt=(i,t)=>{let e=i.length-1,s=[],o,r=t===2?"<svg>":"",n=D;for(let h=0;h<e;h++){let l=i[h],a,u,p=-1,m=0;for(;m<l.length&&(n.lastIndex=m,u=n.exec(l),u!==null);)m=n.lastIndex,n===D?u[1]==="!--"?n=yt:u[1]!==void 0?n=bt:u[2]!==void 0?(Ct.test(u[2])&&(o=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=o??D,p=-1):u[1]===void 0?p=-2:(p=n.lastIndex-u[2].length,a=u[1],n=u[3]===void 0?w:u[3]==='"'?At:_t):n===At||n===_t?n=w:n===yt||n===bt?n=D:(n=w,o=void 0);let $=n===w&&i[h+1].startsWith("/>")?" ":"";r+=n===D?l+Vt:p>=0?(s.push(a),l.slice(0,p)+ot+l.slice(p)+x+$):l+x+(p===-2?(s.push(void 0),h):$)}return[Mt(i,r+(i[e]||"<?>")+(t===2?"</svg>":"")),s]},N=class i{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let r=0,n=0,h=t.length-1,l=this.parts,[a,u]=jt(t,e);if(this.el=i.createElement(a,s),E.currentNode=this.el.content,e===2){let p=this.el.content,m=p.firstChild;m.remove(),p.append(...m.childNodes)}for(;(o=E.nextNode())!==null&&l.length<h;){if(o.nodeType===1){if(o.hasAttributes()){let p=[];for(let m of o.getAttributeNames())if(m.endsWith(ot)||m.startsWith(x)){let $=u[n++];if(p.push(m),$!==void 0){let kt=o.getAttribute($.toLowerCase()+ot).split(x),B=/([.?@])?(.*)/.exec($);l.push({type:1,index:r,name:B[2],strings:kt,ctor:B[1]==="."?rt:B[1]==="?"?lt:B[1]==="@"?at:T})}else l.push({type:6,index:r})}for(let m of p)o.removeAttribute(m)}if(Ct.test(o.tagName)){let p=o.textContent.split(x),m=p.length-1;if(m>0){o.textContent=M?M.emptyScript:"";for(let $=0;$<m;$++)o.append(p[$],R()),E.nextNode(),l.push({type:2,index:++r});o.append(p[m],R())}}}else if(o.nodeType===8)if(o.data===Et)l.push({type:2,index:r});else{let p=-1;for(;(p=o.data.indexOf(x,p+1))!==-1;)l.push({type:7,index:r}),p+=x.length-1}r++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function U(i,t,e=i,s){var o,r,n,h;if(t===C)return t;let l=s!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[s]:e._$Cl,a=I(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),a===void 0?l=void 0:(l=new a(i),l._$AT(i,e,s)),s!==void 0?((n=(h=e)._$Co)!==null&&n!==void 0?n:h._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=U(i,l._$AS(i,t.values),l,s)),t}var nt=class{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;let{el:{content:s},parts:o}=this._$AD,r=((e=t?.creationScope)!==null&&e!==void 0?e:S).importNode(s,!0);E.currentNode=r;let n=E.nextNode(),h=0,l=0,a=o[0];for(;a!==void 0;){if(h===a.index){let u;a.type===2?u=new z(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new dt(n,this,t)),this._$AV.push(u),a=o[++l]}h!==a?.index&&(n=E.nextNode(),h++)}return E.currentNode=S,r}v(t){let e=0;for(let 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++}},z=class i{constructor(t,e,s,o){var r;this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cp=(r=o?.isConnected)===null||r===void 0||r}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,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=U(this,t,e),I(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Bt(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!==c&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var e;let{values:s,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=N.createElement(Mt(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(s);else{let n=new nt(r,this),h=n.u(this.options);n.v(s),this.$(h),this._$AH=n}}_$AC(t){let e=xt.get(t.strings);return e===void 0&&xt.set(t.strings,e=new N(t)),e}T(t){St(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let r of t)o===e.length?e.push(s=new i(this.k(R()),this.k(R()),this,this.options)):s=e[o],s._$AI(r),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$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;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},T=class{constructor(t,e,s,o,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,o){let r=this.strings,n=!1;if(r===void 0)t=U(this,t,e,0),n=!I(t)||t!==this._$AH&&t!==C,n&&(this._$AH=t);else{let h=t,l,a;for(t=r[0],l=0;l<r.length-1;l++)a=U(this,h[s+l],e,l),a===C&&(a=this._$AH[l]),n||(n=!I(a)||a!==this._$AH[l]),a===c?t=c:t!==c&&(t+=(a??"")+r[l+1]),this._$AH[l]=a}n&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},rt=class extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Ft=M?M.emptyScript:"",lt=class extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==c?this.element.setAttribute(this.name,Ft):this.element.removeAttribute(this.name)}},at=class extends T{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){var s;if((t=(s=U(this,t,e,0))!==null&&s!==void 0?s:c)===C)return;let o=this._$AH,r=t===c&&o!==c||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==c&&(o===c||r);r&&this.element.removeEventListener(this.name,this,o),n&&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)}},dt=class{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){U(this,t)}};var wt=K.litHtmlPolyfillSupport;wt?.(N,z),((it=K.litHtmlVersions)!==null&&it!==void 0?it:K.litHtmlVersions=[]).push("2.8.0");var Ut=(i,t,e)=>{var s,o;let r=(s=e?.renderBefore)!==null&&s!==void 0?s:t,n=r._$litPart$;if(n===void 0){let h=(o=e?.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=n=new z(t.insertBefore(R(),h),h,void 0,e??{})}return n._$AI(i),n};var ht,ct;var g=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ut(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 C}};g.finalized=!0,g._$litElement$=!0,(ht=globalThis.litElementHydrateSupport)===null||ht===void 0||ht.call(globalThis,{LitElement:g});var Tt=globalThis.litElementPolyfillSupport;Tt?.({LitElement:g});((ct=globalThis.litElementVersions)!==null&&ct!==void 0?ct:globalThis.litElementVersions=[]).push("3.3.3");var qt=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}},Wt=(i,t,e)=>{t.constructor.createProperty(e,i)};function d(i){return(t,e)=>e!==void 0?Wt(i,t,e):qt(i,t)}var A=i=>i??c;var Kt=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",Gt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",Xt="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",Jt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e",Yt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,pt=(i,t,e,s)=>{for(var o=s>1?void 0:s?Zt(t,e):t,r=i.length-1,n;r>=0;r--)(n=i[r])&&(o=(s?n(t,e,o):n(o))||o);return s&&o&&Yt(t,e,o),o},P,V=(P=class extends g{static parseLevel(i){if(i){let t=Object.keys(k).find(e=>e.toLowerCase()===i.toLowerCase());return t&&k[t]}}static get styles(){return[H`
4
4
  ${L(Kt)}
5
- `]}render(){return y`${this.iconToUse&&y`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(P.parseLevel(this.level)){case"warn":return Jt;case"suggest":return Xt;case"error":return Gt;default:return null}}},P.ID="sd-field-validation-message",P.levelConverter={fromAttribute(i){return P.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},P);pt([d({type:String,attribute:!0})],V.prototype,"message",2);pt([d({type:String,attribute:!0})],V.prototype,"icon",2);pt([d({converter:V.levelConverter,reflect:!0})],V.prototype,"level",2);var ut=V,k=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))(k||{});customElements.get(ut.ID)||customElements.define(ut.ID,ut);var Qt=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}",te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,f=(i,t,e,s)=>{for(var o=s>1?void 0:s?ee(t,e):t,r=i.length-1,n;r>=0;r--)(n=i[r])&&(o=(s?n(t,e,o):n(o))||o);return s&&o&&te(t,e,o),o},ie="sd-lit-input",Pt="delegatesFocus"in window.ShadowRoot.prototype,se=0,b,v=(b=class extends g{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";let i=se++;this._validationMessageId=b.ID+"_message_"+i,this._inputId=b.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=t=>{this.autocompleted=t.inputType==="insertReplacementText"||!("data"in t),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),Pt||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",t=>{t.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",t=>{var e,s;t.key=="Enter"&&((s=(e=this._internals)==null?void 0:e.form)==null||s.requestSubmit())}),this._initialized=!0}initAutocompleted(i){let t=e=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(e.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(e.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",t)):i.addEventListener("animationstart",t)}get activeShadyDOM(){let i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,t){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,t)})}static get styles(){return[H`
5
+ `]}render(){return y`${this.iconToUse&&y`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(P.parseLevel(this.level)){case"warn":return Jt;case"suggest":return Xt;case"error":return Gt;default:return null}}},P.ID="sd-field-validation-message",P.levelConverter={fromAttribute(i){return P.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},P);pt([d({type:String,attribute:!0})],V.prototype,"message",2);pt([d({type:String,attribute:!0})],V.prototype,"icon",2);pt([d({converter:V.levelConverter,reflect:!0})],V.prototype,"level",2);var ut=V,k=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))(k||{});customElements.get(ut.ID)||customElements.define(ut.ID,ut);var Qt=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}",te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,f=(i,t,e,s)=>{for(var o=s>1?void 0:s?ee(t,e):t,r=i.length-1,n;r>=0;r--)(n=i[r])&&(o=(s?n(t,e,o):n(o))||o);return s&&o&&te(t,e,o),o},ie="sd-lit-input",Pt="delegatesFocus"in window.ShadowRoot.prototype,se=0,b,v=(b=class extends g{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";let i=se++;this._validationMessageId=b.ID+"_message_"+i,this._inputId=b.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=t=>{this.autocompleted=t.inputType==="insertReplacementText"||!("data"in t),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),Pt||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",t=>{t.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",t=>{var e,s;t.key=="Enter"&&((s=(e=this._internals)==null?void 0:e.form)==null||s.requestSubmit())}),this._initialized=!0}initAutocompleted(i){let t=e=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(e.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(e.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",t)):i.addEventListener("animationstart",t)}get activeShadyDOM(){let i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,t){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,t)})}static get styles(){return[H`
6
6
  ${L(Qt)}
7
7
  `]}render(){let i;return this.rows===1?i=y`
8
8
  <input