import{c as i}from"./index-CyXUjyDM.js";import{d as l,b as p,ad as d,u as r,h as c,e as u,aj as f,D as h,A as m,r as b}from"./lucide-BsOfcLnq.js";import{c as g}from"./index-5I5X8kaN.js";import{_ as x}from"./Input.vue_vue_type_script_setup_true_lang-C8A8mwt1.js";const I=l({__name:"InputGroup",props:{class:{}},setup(n){const t=n;return(e,a)=>(u(),p("div",{"data-slot":"input-group",role:"group",class:d(r(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",t.class))},[c(e.$slots,"default")],2))}}),v=["data-align"],$=l({__name:"InputGroupAddon",props:{align:{default:"inline-start"},class:{default:void 0}},setup(n){const t=n;function e(a){const s=a.currentTarget,o=a.target;o&&o.closest("button")||s&&s?.parentElement&&s.parentElement?.querySelector("input")?.focus()}return(a,s)=>(u(),p("div",{role:"group","data-slot":"input-group-addon","data-align":t.align,class:d(r(i)(r(_)({align:t.align}),t.class)),onClick:e},[c(a.$slots,"default")],10,v))}}),j=l({inheritAttrs:!1,__name:"InputGroupInput",props:{class:{}},setup(n,{expose:t}){const e=n,a=f(),s=b(null);return t({focus:()=>{s.value?.focus()}}),(k,z)=>(u(),h(r(x),m({ref_key:"inputRef",ref:s},r(a),{"data-slot":"input-group-control",class:r(i)("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e.class)}),null,16,["class"]))}}),_=g("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"}}),B=g("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{I as _,j as a,$ as b,B as i};
