1import{G as w,H as z,J as S,bJ as b,y as j,bo as B,k as P,o,a as V,w as y,m as q,B as s,u as t,c as u,n as C,R as n,b as c,t as m,x as f,T as N,g as h,X as g,bK as F,bL as K,bM as x,bN as O,bO as D}from"./Dj0s6vtw.js";import{L as W}from"./6iKzfkfS.js";const E={slots:{root:"",wrapper:"",labelWrapper:"flex content-center items-center justify-between gap-1",label:"block font-medium text-default",container:"relative",description:"text-muted",error:"mt-2 text-error",hint:"text-muted",help:"mt-2 text-muted"},variants:{size:{xs:{root:"text-xs"},sm:{root:"text-xs"},md:{root:"text-sm"},lg:{root:"text-sm"},xl:{root:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},orientation:{vertical:{container:"mt-1"},horizontal:{root:"flex justify-between place-items-baseline gap-2"}}},defaultVariants:{size:"md"}},L=["id"],J=["id"],T=["id"],A=["id"],R={__name:"UFormField",props:{as:{type:null,required:!1},name:{type:String,required:!1},errorPattern:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},help:{type:String,required:!1},error:{type:[Boolean,String],required:!1,default:void 0},hint:{type:String,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},eagerValidation:{type:Boolean,required:!1},validateOnInputDelay:{type:Number,required:!1},orientation:{type:null,required:!1,default:"vertical"},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(_){const I=_,l=w(),e=z("formField",I),k=S(),r=h(()=>g({extend:g(E),...k.ui?.formField||{}})({size:e.size,required:e.required,orientation:e.orientation})),$=b(F,null),i=h(()=>e.error||$?.value?.find(a=>a.name===e.name||e.errorPattern&&a.name?.match(e.errorPattern))?.message),d=j(B()),p=d.value,v=b(K,void 0);return P(d,()=>{v&&e.name&&(v.value[e.name]={id:d.value,pattern:e.errorPattern})},{immediate:!0}),x(O,d),x(D,h(()=>({error:i.value,name:e.name,size:e.size,eagerValidation:e.eagerValidation,validateOnInputDelay:e.validateOnInputDelay,errorPattern:e.errorPattern,hint:e.hint,description:e.description,help:e.help,ariaId:p}))),(a,G)=>(o(),V(t(N),{as:t(e).as,"data-orientation":t(e).orientation,"data-slot":"root",class:s(r.value.root({class:[t(e).ui?.root,t(e).class]}))},{default:y(()=>[q("div",{"data-slot":"wrapper",class:s(r.value.wrapper({class:t(e).ui?.wrapper}))},[t(e).label||l.label?(o(),u("div",{key:0,"data-slot":"labelWrapper",class:s(r.value.labelWrapper({class:t(e).ui?.labelWrapper}))},[C(t(W),{for:d.value,"data-slot":"label",class:s(r.value.label({class:t(e).ui?.label}))},{default:y(()=>[n(a.$slots,"label",{label:t(e).label},()=>[c(m(t(e).label),1)])]),_:3},8,["for","class"]),t(e).hint||l.hint?(o(),u("span",{key:0,id:`${t(p)}-hint`,"data-slot":"hint",class:s(r.value.hint({class:t(e).ui?.hint}))},[n(a.$slots,"hint",{hint:t(e).hint},()=>[c(m(t(e).hint),1)])],10,L)):f("",!0)],2)):f("",!0),t(e).description||l.description?(o(),u("p",{key:1,id:`${t(p)}-description`,"data-slot":"description",class:s(r.value.description({class:t(e).ui?.description}))},[n(a.$slots,"description",{description:t(e).description},()=>[c(m(t(e).description),1)])],10,J)):f("",!0)],2),q("div",{class:s([(t(e).label||!!l.label||t(e).description||!!l.description)&&r.value.container({class:t(e).ui?.container})])},[n(a.$slots,"default",{error:i.value}),t(e).error!==!1&&(typeof i.value=="string"&&i.value||l.error)?(o(),u("div",{key:0,id:`${t(p)}-error`,"data-slot":"error",class:s(r.value.error({class:t(e).ui?.error}))},[n(a.$slots,"error",{error:i.value},()=>[c(m(i.value),1)])],10,T)):t(e).help||l.help?(o(),u("div",{key:1,id:`${t(p)}-help`,"data-slot":"help",class:s(r.value.help({class:t(e).ui?.help}))},[n(a.$slots,"help",{help:t(e).help},()=>[c(m(t(e).help),1)])],10,A)):f("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}};export{R as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.