1
This commit is contained in:
1 parent
cddd9a9982
commit
0a692990d5
57 files changed
+90
-57
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
import{p as B,ab as w,bG as ee,ad as D,c as u,ag as R,G as n,P as ae,Q as ne,bc as le,ac as te,b0 as me,V as be,c9 as se,ai as ie,be as L,aH as N,ca as he,ar as Ve,ae as Ce,bZ as Ie,aw as ke,af as ue,h as X,r as q,at as pe,ak as _e,bP as re,w as O,cb as Se,b as xe,cc as Pe,cd as $e,b_ as Be,a1 as Me,I as Fe,ce as Ae,cf as Le,a$ as Q,i as we,s as Z,x as De,t as Re,l as Te,o as ze,aj as J,A as Ee,bm as Oe,bn as Ne}from"./index-f96028ce.js";import{e as oe,c as Ue}from"./index-25008131.js";const je=B({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...w(),...ee({transition:{component:oe}})},"VCounter"),ia=D()({name:"VCounter",functional:!0,props:je(),setup(e,r){let{slots:s}=r;const a=u(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return R(()=>n(le,{transition:e.transition},{default:()=>[ae(n("div",{class:["v-counter",e.class],style:e.style},[s.default?s.default({counter:a.value,max:e.max,value:e.value}):a.value]),[[ne,e.active]])]})),{}}});const He=B({text:String,clickable:Boolean,...w(),...te()},"VLabel"),Ge=D()({name:"VLabel",props:He(),setup(e,r){let{slots:s}=r;return R(()=>{var a;return n("label",{class:["v-label",{"v-label--clickable":e.clickable},e.class],style:e.style},[e.text,(a=s.default)==null?void 0:a.call(s)])}),{}}}),Ke=B({floating:Boolean,...w()},"VFieldLabel"),W=D()({name:"VFieldLabel",props:Ke(),setup(e,r){let{slots:s}=r;return R(()=>n(Ge,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},s)),{}}});function de(e){const{t:r}=me();function s(a){let{name:l}=a;const t={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[l],o=e[`onClick:${l}`],c=o&&t?r(`$vuetify.input.${t}`,e.label??""):void 0;return n(be,{icon:e[`${l}Icon`],"aria-label":c,onClick:o},null)}return{InputIcon:s}}const ce=B({focused:Boolean,"onUpdate:focused":L()},"focus");function We(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se();const s=ie(e,"focused"),a=u(()=>({[`${r}--focused`]:s.value}));function l(){s.value=!0}function t(){s.value=!1}return{focusClasses:a,isFocused:s,focus:l,blur:t}}const qe=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Qe=B({appendInnerIcon:N,bgColor:String,clearable:Boolean,clearIcon:{type:N,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:N,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>qe.includes(e)},"onClick:clear":L(),"onClick:appendInner":L(),"onClick:prependInner":L(),...w(),...he(),...Ve(),...te()},"VField"),Xe=D()({name:"VField",inheritAttrs:!1,props:{id:String,...ce(),...Qe()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,r){let{attrs:s,emit:a,slots:l}=r;const{themeClasses:t}=Ce(e),{loaderClasses:o}=Ie(e),{focusClasses:c,isFocused:M,focus:I,blur:P}=We(e),{InputIcon:y}=de(e),{roundedClasses:k}=ke(e),{rtlClasses:p}=ue(),h=u(()=>e.dirty||e.active),_=u(()=>!e.singleLine&&!!(e.label||l.label)),S=X(),f=u(()=>e.id||`input-${S}`),$=u(()=>`${f.value}-messages`),v=q(),i=q(),d=q(),m=u(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:T,backgroundColorStyles:g}=pe(_e(e,"bgColor")),{textColorClasses:U,textColorStyles:z}=re(u(()=>e.error||e.disabled?void 0:h.value&&M.value?e.color:e.baseColor));O(h,x=>{if(_.value){const b=v.value.$el,V=i.value.$el;requestAnimationFrame(()=>{const F=Se(b),C=V.getBoundingClientRect(),H=C.x-F.x,G=C.y-F.y-(F.height/2-C.height/2),E=C.width/.75,K=Math.abs(E-F.width)>1?{maxWidth:xe(E)}:void 0,ve=getComputedStyle(b),Y=getComputedStyle(V),fe=parseFloat(ve.transitionDuration)*1e3||150,ge=parseFloat(Y.getPropertyValue("--v-field-label-scale")),ye=Y.getPropertyValue("color");b.style.visibility="visible",V.style.visibility="hidden",Pe(b,{transform:`translate(${H}px, ${G}px) scale(${ge})`,color:ye,...K},{duration:fe,easing:$e,direction:x?"normal":"reverse"}).finished.then(()=>{b.style.removeProperty("visibility"),V.style.removeProperty("visibility")})})}},{flush:"post"});const A=u(()=>({isActive:h,isFocused:M,controlRef:d,blur:P,focus:I}));function j(x){x.target!==document.activeElement&&x.preventDefault()}return R(()=>{var H,G,E;const x=e.variant==="outlined",b=l["prepend-inner"]||e.prependInnerIcon,V=!!(e.clearable||l.clear),F=!!(l["append-inner"]||e.appendInnerIcon||V),C=()=>l.label?l.label({...A.value,label:e.label,props:{for:f.value}}):e.label;return n("div",Fe({class:["v-field",{"v-field--active":h.value,"v-field--appended":F,"v-field--center-affix":e.centerAffix??!m.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":b,"v-field--reverse":e.reverse,"Line truncated
|
||||
Reference in new issue
Block a user