genus-ui 2.36.35 → 2.36.36
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/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -492,7 +492,7 @@ let tt = class extends U {
|
|
|
492
492
|
t.marshaltext[n - 1], this._targetInput.value[e - 1];
|
|
493
493
|
}
|
|
494
494
|
this.dispatchEvent(new CustomEvent("typed", { detail: i.target.value }));
|
|
495
|
-
}, this.renderInputControl = (i) => (this._textboxBuilder = new rr(), this._textboxBuilder.setInputType(i), i === "text" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, $a), i === "email" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, er), i === "password" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, tr), i === "number" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, ir), this.withoutIcon && this._textboxBuilder.removeIcon(), this.withoutLabel && this._textboxBuilder.removeLabel(), this.withoutLabelIcon && this._textboxBuilder.removeLabelIcon(this.placeholderText), this.inputIcon && this._textboxBuilder.setIcon(this.inputIcon), this.formatInput && this._textboxBuilder.setFormatInput(), this.dataPattern && this._textboxBuilder.setDataPattern(this.dataPattern), this.inputValue && this._textboxBuilder.setInputValue(this.inputValue), this.readOnly && this._textboxBuilder.setReadOnly(), this.placeholderText && this._textboxBuilder.setPlaceholderText(this.placeholderText), this._textboxBuilder.renderControl(this.getInputValue)), this._internals = this.attachInternals();
|
|
495
|
+
}, this.renderInputControl = (i) => (this._textboxBuilder = new rr(), this._textboxBuilder.setInputType(i), i === "text" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, $a), i === "email" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, er), i === "password" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, tr), i === "number" && this._textboxBuilder.setDefaultLabelIcon(this.labelText, ir), this.withoutIcon && this._textboxBuilder.removeIcon(), this.withoutLabel && this._textboxBuilder.removeLabel(), this.withoutLabelIcon && this._textboxBuilder.removeLabelIcon(this.placeholderText), this.inputIcon && this._textboxBuilder.setIcon(this.inputIcon), this.formatInput && this._textboxBuilder.setFormatInput(), this.dataPattern && this._textboxBuilder.setDataPattern(this.dataPattern), this.inputValue && this._textboxBuilder.setInputValue(this.inputValue), this.inputName && this._textboxBuilder.setInputName(this.inputName), this.readOnly && this._textboxBuilder.setReadOnly(), this.placeholderText && this._textboxBuilder.setPlaceholderText(this.placeholderText), this._textboxBuilder.renderControl(this.getInputValue)), this._internals = this.attachInternals();
|
|
496
496
|
}
|
|
497
497
|
updated() {
|
|
498
498
|
this.inputValue === "" && this._targetInput != null && (this._targetInput.value = ""), this.inputValue && this._targetInput != null && (this._targetInput.value = this.inputValue);
|
package/dist/index.umd.js
CHANGED
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
<div class='icon-container'>
|
|
284
284
|
<img class="component-icon" src='${this.inputControl.inputIcon}' />
|
|
285
285
|
</div>
|
|
286
|
-
</div>`,n}}[this.inputControl.inputType]()}}var Na=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,et=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ha(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Na(t,e,s),s};w.GenusTextBox=class extends g.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.formatInput=!1,this.inputName="",this.inputIcon="",this.placeholderText="",this.dataPattern="",this.disallowedCharacters="",this.withoutIcon=!1,this.withoutLabel=!1,this.withoutLabelIcon=!1,this.readOnly=!1,this._targetInput=null,this.getInputValue=t=>{if(this._targetInput===null&&(this._targetInput=t.target),this.inputValue=this._targetInput.value,this._internals.setFormValue(this._targetInput.value),this.formatInput){let e=zn({input:this._targetInput.value,template:this._targetInput.getAttribute("data-pattern"),disallowCharacters:[new RegExp(this.disallowedCharacters)]});this._targetInput.value=e.marshaltext,this.inputValue=e.marshaltext;let n=Number(this._targetInput.selectionStart);if(e.marshaltext.length>=this._targetInput.value.length)for(let s=n;s<=e.marshaltext.length;s++)e.marshaltext[s-1],this._targetInput.value[n-1]}this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this.renderInputControl=t=>(this._textboxBuilder=new Ra,this._textboxBuilder.setInputType(t),t==="text"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,ka),t==="email"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Pa),t==="password"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Qa),t==="number"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Ta),this.withoutIcon&&this._textboxBuilder.removeIcon(),this.withoutLabel&&this._textboxBuilder.removeLabel(),this.withoutLabelIcon&&this._textboxBuilder.removeLabelIcon(this.placeholderText),this.inputIcon&&this._textboxBuilder.setIcon(this.inputIcon),this.formatInput&&this._textboxBuilder.setFormatInput(),this.dataPattern&&this._textboxBuilder.setDataPattern(this.dataPattern),this.inputValue&&this._textboxBuilder.setInputValue(this.inputValue),this.readOnly&&this._textboxBuilder.setReadOnly(),this.placeholderText&&this._textboxBuilder.setPlaceholderText(this.placeholderText),this._textboxBuilder.renderControl(this.getInputValue)),this._internals=this.attachInternals()}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value=""),this.inputValue&&this._targetInput!=null&&(this._targetInput.value=this.inputValue)}render(){return this.renderInputControl(this.inputType)}},w.GenusTextBox.styles=[Ea,va,Ia,xa,Ya,ya,Ca],w.GenusTextBox.formAssociated=!0,et([m.property({attribute:"label-text"})],w.GenusTextBox.prototype,"labelText",2),et([m.property({attribute:"input-value"})],w.GenusTextBox.prototype,"inputValue",2),et([m.property({attribute:"input-type"})],w.GenusTextBox.prototype,"inputType",2),et([m.property({attribute:"format-input",type:Boolean})],w.GenusTextBox.prototype,"formatInput",2),et([m.property({attribute:"name",reflect:!0})],w.GenusTextBox.prototype,"inputName",2),et([m.property({attribute:"input-icon"})],w.GenusTextBox.prototype,"inputIcon",2),et([m.property({attribute:"placeholder-text"})],w.GenusTextBox.prototype,"placeholderText",2),et([m.property({attribute:"data-pattern"})],w.GenusTextBox.prototype,"dataPattern",2),et([m.property({attribute:"disallowed-characters"})],w.GenusTextBox.prototype,"disallowedCharacters",2),et([m.property({attribute:"without-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutIcon",2),et([m.property({attribute:"without-label",type:Boolean})],w.GenusTextBox.prototype,"withoutLabel",2),et([m.property({attribute:"without-label-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutLabelIcon",2),et([m.property({attribute:"read-only",type:Boolean})],w.GenusTextBox.prototype,"readOnly",2),et([m.state()],w.GenusTextBox.prototype,"_targetInput",2),w.GenusTextBox=et([m.customElement("genus-textbox")],w.GenusTextBox);const Va=g.css`
|
|
286
|
+
</div>`,n}}[this.inputControl.inputType]()}}var Na=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,et=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ha(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Na(t,e,s),s};w.GenusTextBox=class extends g.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.formatInput=!1,this.inputName="",this.inputIcon="",this.placeholderText="",this.dataPattern="",this.disallowedCharacters="",this.withoutIcon=!1,this.withoutLabel=!1,this.withoutLabelIcon=!1,this.readOnly=!1,this._targetInput=null,this.getInputValue=t=>{if(this._targetInput===null&&(this._targetInput=t.target),this.inputValue=this._targetInput.value,this._internals.setFormValue(this._targetInput.value),this.formatInput){let e=zn({input:this._targetInput.value,template:this._targetInput.getAttribute("data-pattern"),disallowCharacters:[new RegExp(this.disallowedCharacters)]});this._targetInput.value=e.marshaltext,this.inputValue=e.marshaltext;let n=Number(this._targetInput.selectionStart);if(e.marshaltext.length>=this._targetInput.value.length)for(let s=n;s<=e.marshaltext.length;s++)e.marshaltext[s-1],this._targetInput.value[n-1]}this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this.renderInputControl=t=>(this._textboxBuilder=new Ra,this._textboxBuilder.setInputType(t),t==="text"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,ka),t==="email"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Pa),t==="password"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Qa),t==="number"&&this._textboxBuilder.setDefaultLabelIcon(this.labelText,Ta),this.withoutIcon&&this._textboxBuilder.removeIcon(),this.withoutLabel&&this._textboxBuilder.removeLabel(),this.withoutLabelIcon&&this._textboxBuilder.removeLabelIcon(this.placeholderText),this.inputIcon&&this._textboxBuilder.setIcon(this.inputIcon),this.formatInput&&this._textboxBuilder.setFormatInput(),this.dataPattern&&this._textboxBuilder.setDataPattern(this.dataPattern),this.inputValue&&this._textboxBuilder.setInputValue(this.inputValue),this.inputName&&this._textboxBuilder.setInputName(this.inputName),this.readOnly&&this._textboxBuilder.setReadOnly(),this.placeholderText&&this._textboxBuilder.setPlaceholderText(this.placeholderText),this._textboxBuilder.renderControl(this.getInputValue)),this._internals=this.attachInternals()}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value=""),this.inputValue&&this._targetInput!=null&&(this._targetInput.value=this.inputValue)}render(){return this.renderInputControl(this.inputType)}},w.GenusTextBox.styles=[Ea,va,Ia,xa,Ya,ya,Ca],w.GenusTextBox.formAssociated=!0,et([m.property({attribute:"label-text"})],w.GenusTextBox.prototype,"labelText",2),et([m.property({attribute:"input-value"})],w.GenusTextBox.prototype,"inputValue",2),et([m.property({attribute:"input-type"})],w.GenusTextBox.prototype,"inputType",2),et([m.property({attribute:"format-input",type:Boolean})],w.GenusTextBox.prototype,"formatInput",2),et([m.property({attribute:"name",reflect:!0})],w.GenusTextBox.prototype,"inputName",2),et([m.property({attribute:"input-icon"})],w.GenusTextBox.prototype,"inputIcon",2),et([m.property({attribute:"placeholder-text"})],w.GenusTextBox.prototype,"placeholderText",2),et([m.property({attribute:"data-pattern"})],w.GenusTextBox.prototype,"dataPattern",2),et([m.property({attribute:"disallowed-characters"})],w.GenusTextBox.prototype,"disallowedCharacters",2),et([m.property({attribute:"without-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutIcon",2),et([m.property({attribute:"without-label",type:Boolean})],w.GenusTextBox.prototype,"withoutLabel",2),et([m.property({attribute:"without-label-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutLabelIcon",2),et([m.property({attribute:"read-only",type:Boolean})],w.GenusTextBox.prototype,"readOnly",2),et([m.state()],w.GenusTextBox.prototype,"_targetInput",2),w.GenusTextBox=et([m.customElement("genus-textbox")],w.GenusTextBox);const Va=g.css`
|
|
287
287
|
input[type='text']
|
|
288
288
|
{
|
|
289
289
|
border: var(--input-border, none);
|