1import{b1 as $,b2 as k,b3 as w,bx as b,by as S,A as V,bz as j,bA as B,a0 as C,d as o,e as P,w as y,f as q,aU as s,m as t,r as u,n as F,C as n,q as c,t as f,x as m,V as N,G as h,b9 as D,p as x,bB as K,bC as O}from"./CrnVJd8S.js";import{L as W}from"./CeuJTc6l.js";const A={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"}},E=["id"],L=["id"],U=["id"],G=["id"],M={__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(g){const _=g,l=$(),e=k("formField",_),I=w(),r=h(()=>D({extend:A,...I.ui?.formField||{}})({size:e.size,required:e.required,orientation:e.orientation})),z=b(S,null),i=h(()=>e.error||z?.value?.find(a=>a.name===e.name||e.errorPattern&&a.name?.match(e.errorPattern))?.message),d=V(j()),p=d.value,v=b(B,void 0);return C(d,()=>{v&&e.name&&(v.value[e.name]={id:d.value,pattern:e.errorPattern})},{immediate:!0}),x(K,d),x(O,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,T)=>(o(),P(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}))},[F(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(f(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(f(t(e).hint),1)])],10,E)):m("",!0)],2)):m("",!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(f(t(e).description),1)])],10,L)):m("",!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(f(i.value),1)])],10,U)):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(f(t(e).help),1)])],10,G)):m("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}};export{M 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.