Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@easymais-ui/text-input

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easymais-ui/text-input - npm Package Compare versions

Comparing version 1.0.0-next.2 to 1.0.0-next.3

2

package.json
{
"name": "@easymais-ui/text-input",
"version": "1.0.0-next.2",
"version": "1.0.0-next.3",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -1,2 +0,2 @@

var __decorate=this&&this.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};import{LitElement,html}from"lit";import{property}from"lit/decorators.js";import{ifDefined}from"lit/directives/if-defined.js";import IMask from"imask";const textInputTypes=["text","tel","password","date"];export class TextInputBase extends LitElement{static get formAssociated(){return true}get form(){return this._internals?.form}set value(value){this._value=value}get value(){if(this.keepMask&&this.mask){return IMask.pipe(this._value,{mask:this.mask,lazy:true})}return this._value}displayValue(){if(this.mask){return IMask.pipe(this._value,{mask:this.mask,lazy:true})}return this._value}firstUpdated(changes){if(changes.has("value")){this._internals?.setFormValue(this.value)}}updated(changes){if(changes.has("value")){this._internals?.setFormValue(this.value)}}render(){return html`
var __decorate=this&&this.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};import{LitElement,html}from"lit";import{property}from"lit/decorators.js";import{ifDefined}from"lit/directives/if-defined.js";import IMask from"imask";const textInputTypes=["text","tel","password"];export class TextInputBase extends LitElement{static get formAssociated(){return true}get form(){return this._internals?.form}set value(value){this._value=value}get value(){if(this.keepMask&&this.mask){return IMask.pipe(this._value,{mask:this.mask,lazy:true})}return this._value}displayValue(){if(this.mask){return IMask.pipe(this._value,{mask:this.mask,lazy:true})}return this._value}firstUpdated(changes){if(changes.has("value")){this._internals?.setFormValue(this.value)}}updated(changes){if(changes.has("value")){this._internals?.setFormValue(this.value)}}render(){return html`
<input

@@ -14,2 +14,2 @@ class="input"

/>
`}handleChange(){this.dispatchEvent(new Event("change",{bubbles:true,composed:true}))}handleInput(event){const inputTarget=event.target;if(this.mask){this._value=IMask.pipe(inputTarget.value,{mask:this.mask},"value","unmaskedValue");inputTarget.value=this.displayValue()}}constructor(){super();this.type="text";this._value="";this.required=false;this.readonly=false;this.invalid=false;this.disabled=false;this._internals=this.attachInternals();this._internals?.setFormValue(this.value)}}__decorate([property()],TextInputBase.prototype,"placeholder",void 0);__decorate([property({type:String})],TextInputBase.prototype,"value",null);__decorate([property()],TextInputBase.prototype,"mask",void 0);__decorate([property({type:Boolean,attribute:"keep-mask"})],TextInputBase.prototype,"keepMask",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"required",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"readonly",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"invalid",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"disabled",void 0);
`}handleChange(){this._internals?.setFormValue(this.value);this.dispatchEvent(new Event("change",{bubbles:true,composed:true}))}handleInput(event){const inputTarget=event.target;if(this.mask){this._value=IMask.pipe(inputTarget.value,{mask:this.mask},"value","unmaskedValue")}else{this._value=inputTarget.value}inputTarget.value=this.displayValue()}constructor(){super();this.type="text";this._value="";this.required=false;this.readonly=false;this.invalid=false;this.disabled=false;this._internals=this.attachInternals();this._internals?.setFormValue(this.value)}}__decorate([property()],TextInputBase.prototype,"placeholder",void 0);__decorate([property({type:String})],TextInputBase.prototype,"value",null);__decorate([property()],TextInputBase.prototype,"mask",void 0);__decorate([property({type:Boolean,attribute:"keep-mask"})],TextInputBase.prototype,"keepMask",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"required",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"readonly",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"invalid",void 0);__decorate([property({type:Boolean,reflect:true})],TextInputBase.prototype,"disabled",void 0);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc