import{c as i}from"./index-Bd8s4WQO.js";import{d as l,g as v,ba as _,u as s,b as p,ad as c,r as g,_ as k,e as u,h as m,aj as w,D as V,A as y}from"./lucide-CoF0tLOi.js";import{c as b}from"./index-B7BSYxXt.js";import{g as z}from"./vueuse-uADb4LNz.js";const A=l({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(r,{expose:a,emit:n}){const t=r,o=z(t,"modelValue",n,{passive:!0,defaultValue:t.defaultValue}),d=g(null);return a({focus:()=>{d.value?.focus()}}),(R,f)=>v((u(),p("input",{ref_key:"inputRef",ref:d,"onUpdate:modelValue":f[0]||(f[0]=x=>k(o)?o.value=x:null),"data-slot":"input",class:c(s(i)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t.class))},null,2)),[[_,s(o)]])}}),E=l({__name:"InputGroup",props:{class:{}},setup(r){const a=r;return(n,t)=>(u(),p("div",{"data-slot":"input-group",role:"group",class:c(s(i)("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",a.class))},[m(n.$slots,"default")],2))}}),G=["data-align"],T=l({__name:"InputGroupAddon",props:{align:{default:"inline-start"},class:{default:void 0}},setup(r){const a=r;function n(t){const e=t.currentTarget,o=t.target;o&&o.closest("button")||e&&e?.parentElement&&e.parentElement?.querySelector("input")?.focus()}return(t,e)=>(u(),p("div",{role:"group","data-slot":"input-group-addon","data-align":a.align,class:c(s(i)(s(I)({align:a.align}),a.class)),onClick:n},[m(t.$slots,"default")],10,G))}}),D=l({inheritAttrs:!1,__name:"InputGroupInput",props:{class:{}},setup(r,{expose:a}){const n=r,t=w(),e=g(null);return a({focus:()=>{e.value?.focus()}}),(d,h)=>(u(),V(s(A),y({ref_key:"inputRef",ref:e},s(t),{"data-slot":"input-group-control",class:s(i)("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",n.class)}),null,16,["class"]))}}),I=b("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}}),M=b("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});export{E as _,D as a,T as b,A as c,M as i};
