This commit is contained in:
iriska-gri committed 2023-10-25 14:33:17 +03:00
1 parent e176e3edc5
commit 667f142627
22 files changed
+22 -22

No files matched your search

+1
View File
@@ -0,0 +1 @@
import{p as B,a2 as w,bk as ee,a7 as D,c as i,ad as R,F as n,N as ae,O as ne,aL as le,a6 as te,a8 as ye,V as be,bB as se,aa as ie,bs as L,a1 as O,bC as he,aj as Ve,a9 as Ce,bD as ke,ao as Ie,ag as ue,h as Y,r as G,ak as pe,al as _e,bc as re,w as E,bE as Se,b as xe,bF as $e,bG as Pe,W as Be,H as Fe,bH as Me,bx as Ae,bI as Le,b3 as X,i as we,s as Q,v as De,t as Re,l as Te,o as ze,ar as Z,z as Ee,a3 as Oe,b7 as Ne}from"./index-857c5092.js";import{h as oe,g as Ue}from"./VBtn-2752bb55.js";const He=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:He(),setup(e,u){let{slots:s}=u;const a=i(()=>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 je=B({text:String,clickable:Boolean,...w(),...te()},"VLabel"),We=D()({name:"VLabel",props:je(),setup(e,u){let{slots:s}=u;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"),q=D()({name:"VFieldLabel",props:Ke(),setup(e,u){let{slots:s}=u;return R(()=>n(We,{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:u}=ye();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?u(`$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 qe(e){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se();const s=ie(e,"focused"),a=i(()=>({[`${u}--focused`]:s.value}));function l(){s.value=!0}function t(){s.value=!1}return{focusClasses:a,isFocused:s,focus:l,blur:t}}const Ge=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Xe=B({appendInnerIcon:O,bgColor:String,clearable:Boolean,clearIcon:{type:O,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:O,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>Ge.includes(e)},"onClick:clear":L(),"onClick:appendInner":L(),"onClick:prependInner":L(),...w(),...he(),...Ve(),...te()},"VField"),Ye=D()({name:"VField",inheritAttrs:!1,props:{id:String,...ce(),...Xe()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,u){let{attrs:s,emit:a,slots:l}=u;const{themeClasses:t}=Ce(e),{loaderClasses:o}=ke(e),{focusClasses:c,isFocused:F,focus:k,blur:x}=qe(e),{InputIcon:b}=de(e),{roundedClasses:I}=Ie(e),{rtlClasses:p}=ue(),h=i(()=>e.dirty||e.active),_=i(()=>!e.singleLine&&!!(e.label||l.label)),$=Y(),f=i(()=>e.id||`input-${$}`),P=i(()=>`${f.value}-messages`),v=G(),r=G(),d=G(),m=i(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:T,backgroundColorStyles:g}=pe(_e(e,"bgColor")),{textColorClasses:N,textColorStyles:U}=re(i(()=>e.error||e.disabled?void 0:h.value&&F.value?e.color:e.baseColor));E(h,S=>{if(_.value){const y=v.value.$el,V=r.value.$el;requestAnimationFrame(()=>{const M=Se(y),C=V.getBoundingClientRect(),j=C.x-M.x,W=C.y-M.y-(M.height/2-C.height/2),z=C.width/.75,K=Math.abs(z-M.width)>1?{maxWidth:xe(z)}:void 0,ve=getComputedStyle(y),J=getComputedStyle(V),fe=parseFloat(ve.transitionDuration)*1e3||150,ge=parseFloat(J.getPropertyValue("--v-field-label-scale")),me=J.getPropertyValue("color");y.style.visibility="visible",V.style.visibility="hidden",$e(y,{transform:`translate(${j}px, ${W}px) scale(${ge})`,color:me,...K},{duration:fe,easing:Le,direction:S?"normal":"reverse"}).finished.then(()=>{y.style.removeProperty("visibility"),V.style.removeProperty("visibility")})})}},{flush:"post"});const A=i(()=>({isActive:h,isFocused:F,controlRef:d,blur:x,focus:k}));function H(S){S.target!==document.activeElement&&S.preventDefault()}return R(()=>{var j,W,z;const S=e.variant==="outlined",y=l["prepend-inner"]||e.prependInnerIcon,V=!!(e.clearable||l.clear),M=!!(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":M,"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":y,"v-field--reverse":e.reverse,"v-fielLine truncated