p3x-redis-ui-material
Version:
💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity
2 lines (1 loc) • 1.89 kB
JavaScript
import{a as h,b as _,f as C,j as x,v as y}from"./chunk-5LJPHUK2.js";import{Ia as s,Kb as g,T as i,bb as l,cb as a,db as d,ja as u,lb as m,oc as f,yb as c}from"./chunk-MHKTEXY5.js";var I=(()=>{class t{type="text";step;min;max;placeholder="";enterPressed=new u;value="";focused=!1;onChange=()=>{};onTouched=()=>{};onValueChange(e){this.value=e,this.onChange(e)}writeValue(e){this.value=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}onEnterPressed(e){e.preventDefault(),setTimeout(()=>this.enterPressed.emit())}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=s({type:t,selectors:[["p3xr-ng-input"]],inputs:{type:"type",step:"step",min:"min",max:"max",placeholder:"placeholder"},outputs:{enterPressed:"enterPressed"},features:[g([{provide:h,useExisting:i(()=>t),multi:!0}])],decls:1,vars:12,consts:[[1,"p3xr-input",3,"ngModelChange","focus","blur","keyup.enter","type","step","min","max","placeholder","ngModel"]],template:function(r,n){r&1&&(a(0,"input",0),m("ngModelChange",function(p){return n.onValueChange(p)})("focus",function(){return n.focused=!0})("blur",function(){return n.focused=!1,n.onTouched()})("keyup.enter",function(p){return n.onEnterPressed(p)}),d()),r&2&&(c("background","var(--p3xr-input-bg)")("color","var(--p3xr-input-color)")("border-color","var(--p3xr-input-border-color, var(--p3xr-border-color))"),l("type",n.type)("step",n.step)("min",n.min)("max",n.max)("placeholder",n.placeholder)("ngModel",n.value))},dependencies:[f,y,_,C,x],styles:["[_nghost-%COMP%]{display:inline-block;vertical-align:top}.p3xr-input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.p3xr-input[_ngcontent-%COMP%]{padding:3px;border-style:solid;border-width:2px;margin:1px}.p3xr-input[_ngcontent-%COMP%]::placeholder{opacity:.5}.p3xr-input[_ngcontent-%COMP%]:focus{margin:0;border-width:3px;outline:none}"]})}return t})();export{I as a};