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