1import{q as p,l as g,o as u,f as n,a as r,t as s,n as h,g as b,p as v,v as y,F as x}from"./app-8CjosSoj.js";const w=["for"],k={class:"relative"},S=["id","value","minlength","placeholder","maxlength","disabled","rows"],V={key:0,class:"absolute right-2 z-30 bottom-4 text-xs text-foreground"},B={class:"flex justify-start"},L={class:"text-xs text-destructive tracking-wide"},z={__name:"GTextarea",props:{id:String,modelValue:{type:String,default:"0",required:!0},errorMessage:{type:String},label:String,placeholder:String,isDisabled:Boolean,isError:Boolean,minLimit:{type:Number},maxLimit:{type:Number},rows:{type:Number,default:2},autosize:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(o,{expose:c}){const t=o,e=p(null);g(()=>{e.value.hasAttribute("autofocus")&&e.value.focus(),e.value.offsetParent&&t.autosize&&l()}),c({focus:()=>e.value.focus()});const l=()=>{const a=window.getComputedStyle(e.value);e.value.style.height="auto",e.value.style.height=`calc(${a.borderTopWidth} + ${a.borderBottomWidth} + ${e.value.scrollHeight}px)`,parseFloat(e.value.style.height)>=parseFloat(e.value.style.maxHeight)?(e.value.style.overflowY="scroll",e.value.style.height=e.value.style.maxHeight):e.value.style.overflow="hidden"},m=()=>{t.autosize&&l()};return(a,i)=>{var d;return u(),n(x,null,[r("label",{for:o.id,class:"block text-sm mb-1 font-medium text-foreground"},s(o.label),9,w),r("div",k,[r("textarea",{id:o.id,class:h(["w-full border border-input focus:border-primary focus:ring-primary rounded-lg text-sm placeholder:text-endpoint focus:shadow-sm dark:border-border overflow-y-hidden bg-background dark:bg-deeper dark:focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",[t.isError?"text-destructive placeholder-destructive/50 border-destructive focus:border-destructive focus:outline-none focus:ring-destructive":"border-input focus:border-primary focus:ring-primary",t.maxLimit?"pr-14":"pr-2"]]),value:t.modelValue,oninput:m,onInput:i[0]||(i[0]=f=>a.$emit("update:modelValue",f.target.value)),ref_key:"input",ref:e,minlength:t.minLimit,placeholder:t.placeholder,maxlength:t.maxLimit,disabled:t.isDisabled,rows:t.rows},null,42,S),t.maxLimit?(u(),n("span",V,s(((d=t.modelValue)==null?void 0:d.length)===void 0?0:t.modelValue.length)+"/"+s(t.maxLimit),1)):b("",!0)]),v(r("div",B,[r("p",L,s(o.errorMessage),1)],512),[[y,o.errorMessage]])],64)}}};export{z 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.