1import{g as S,a9 as z,l as $,o as i,w as b,L as o,a2 as B,a as n,P as k,Z as V,H as j,q as y,I as g,aO as x,aT as C,k as N,aN as D,aU as E,A as F,J as I,b0 as L,d as w,M as s,c as p,E as h,e as K,f,t as m,b1 as O}from"#entry";var W=S({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return z(),(r,v)=>(i(),$(n(k),B(e,{onMousedown:v[0]||(v[0]=a=>{!a.defaultPrevented&&a.detail>1&&a.preventDefault()})}),{default:b(()=>[o(r.$slots,"default")]),_:3},16))}}),A=W;const M={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",orientation:"vertical"}},T=["id"],U=["id"],H=["id"],J=["id"],Q={__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},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(t){const e=t,r=V(),v=j(),a=y(()=>g({extend:g(M),...v.ui?.formField||{}})({size:e.size,required:e.required,orientation:e.orientation})),P=x(C,null),d=y(()=>e.error||P?.value?.find(l=>
1l.name===e.name||e.errorPattern&&l.name?.match(e.errorPattern))?.message),u=N(D()),c=u.value,q=x(E,void 0);return F(u,()=>{q&&e.name&&(q.value[e.name]={id:u.value,pattern:e.errorPattern})},{immediate:!0}),I(O,u),I(L,y(()=>({error:d.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:c}))),(l,Z)=>(i(),$(n(k),{as:t.as,"data-orientation":t.orientation,"data-slot":"root",class:s(a.value.root({class:[e.ui?.root,e.class]}))},{default:b(()=>[w("div",{"data-slot":"wrapper",class:s(a.value.wrapper({class:e.ui?.wrapper}))},[t.label||r.label?(i(),p("div",{key:0,"data-slot":"labelWrapper",class:s(a.value.labelWrapper({class:e.ui?.labelWrapper}))},[K(n(A),{for:u.value,"data-slot":"label",class:s(a.value.label({class:e.ui?.label}))},{default:b(()=>[o(l.$slots,"label",{label:t.label},()=>[f(m(t.label),1)])]),_:3},8,["for","class"]),t.hint||r.hint?(i(),p("span",{key:0,id:`${n(c)}-hint`,"data-slot":"hint",class:s(a.value.hint({class:e.ui?.hint}))},[o(l.$slots,"hint",{hint:t.hint},()=>[f(m(t.hint),1)])],10,T)):h("",!0)],2)):h("",!0),t.description||r.description?(i(),p("p",{key:1,id:`${n(c)}-description`,"data-slot":"description",class:s(a.value.description({class:e.ui?.description}))},[o(l.$slots,"description",{description:t.description},()=>[f(m(t.description),1)])],10,U)):h("",!0)],2),w("div",{class:s([(t.label||!!r.label||t.description||!!r.description)&&a.value.container({class:e.ui?.container})])},[o(l.$slots,"default",{error:d.value}),e.error!==!1&&(typeof d.value=="string"&&d.value||r.error)?(i(),p("div",{key:0,id:`${n(c)}-error`,"data-slot":"error",class:s(a.value.error({class:e.ui?.error}))},[o(l.$slots,"error",{error:d.value},()=>[f(m(d.value),1)])],10,H)):t.help||r.help?(i(),p("div",{key:1,id:`${n(c)}-help`,"data-slot":"help",class:s(a.value.help({class:e.ui?.help}))},[o(l.$slots,"help",{help:t.help},()=>[f(m(t.help),1)])],10,J)):h("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}};export{A as L,Q 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.