import{e as r}from"./index-Cc0s9xHj.js";import{u as B,a1 as w,m as b,a2 as x,a3 as F,a4 as C}from"./reka-ui-jliV5UPF.js";import{d as n,G as d,u as e,D as u,H as m,h as i,L as N,M as P,b as c,c as v,ae as _,J as y,bx as O,b9 as $}from"./lucide-C_a_D9Y7.js";import{l as f}from"./vueuse-Blk5jQ0T.js";const k=n({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},stepSnapping:{type:Boolean},focusOnChange:{type:Boolean},formatOptions:{},locale:{},disabled:{type:Boolean},readonly:{type:Boolean},disableWheelChange:{type:Boolean},invertWheelChange:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(a,{emit:s}){const t=a,l=s,o=f(t,"class"),p=B(o,l);return(h,j)=>(c(),d(e(w),u(e(p),{class:e(r)("grid gap-1.5",t.class)}),{default:m(g=>[i(h.$slots,"default",N(P(g)))]),_:3},16,["class"]))}}),D=n({__name:"NumberFieldContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(a){const s=a;return(t,l)=>(c(),v("div",{class:_(e(r)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:has-[[data-slot=decrement]]:px-10",s.class))},[i(t.$slots,"default")],2))}}),z=n({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(a){const s=a,t=f(s,"class"),l=b(t);return(o,p)=>(c(),d(e(x),u({"data-slot":"decrement"},e(l),{class:e(r)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20 w-10 h-full flex items-center justify-center",s.class)}),{default:m(()=>[i(o.$slots,"default",{},()=>[y(e(O),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),E=n({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(a){const s=a,t=f(s,"class"),l=b(t);return(o,p)=>(c(),d(e(F),u({"data-slot":"increment"},e(l),{class:e(r)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3 w-10 h-full flex items-center justify-center",s.class)}),{default:m(()=>[i(o.$slots,"default",{},()=>[y(e($),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),M=n({__name:"NumberFieldInput",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(a){const s=a;return(t,l)=>(c(),d(e(C),{"data-slot":"input",class:_(e(r)("flex h-9 w-full rounded-md border border-input bg-transparent py-1 px-0 text-sm text-center shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s.class))},null,8,["class"]))}});export{k as _,D as a,M as b,z as c,E as d};
