1import{r as c,Bn as x,DR as M,DS as S,DJ as K,DK as U,Bj as A,DL as J,DV as $,m as R,a5 as q}from"./main-BVeaUmEJ.js";import{u as z,a as G,c as H,b as O,f as Q}from"./useRegisterFieldControl-Cddb0p1S.js";const W=c.forwardRef(function(a,i){const{render:Y,className:Z,id:C,name:D,value:n,disabled:y=!1,onValueChange:F,defaultValue:f,autoFocus:o=!1,style:_,...I}=a,{state:E,name:V,disabled:h,setTouched:p,setDirty:w,validityData:k,setFocused:r,setFilled:l,validationMode:P,validation:t}=z(),b=h||y,T=V??D,N={...E,disabled:b},{labelId:j}=G(),m=H({id:C});x(()=>{const e=n!=null;t.inputRef.current?.value||e&&n!==""?l(!0):e&&n===""&&l(!1)},[t.inputRef,l,n]);const u=c.useRef(null);x(()=>{o&&u.current===M(S(u.current))&&r(!0)},[o,r]);const[B]=K({controlled:n,default:f,name:"FieldControl",state:"value"}),v=n!==void 0,g=v?B:void 0,L=U(()=>t.inputRef.current?.value);return O(t.inputRef,m,g,L),A("input",a,{ref:[i,u],state:N,props:[{id:m,disabled:b,name:T,ref:t.inputRef,"aria-labelledby":j,autoFocus:o,...v?{value:g}:{defaultValue:f},onChange(e){const d=e.currentTarget.value;F?.(d,J($,e.nativeEvent)),w(d!==k.initialValue),l(d!=="")},onFocus(){r(!0)},onBlur(e){p(!0),r(!1),P==="onBlur"&&t.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName==="INPUT"&&e.key==="Enter"&&(p(!0),t.commit(e.currentTarget.value))}},t.getInputValidationProps(),I],stateAttributesMapping:Q})}),X=c.forwardRef(function(a,i){return R.jsx(W,{ref:i,...a})});function ne({className:s,type:a,...i}){return R.jsx(X,{type:a,"data-slot":"input",className:q("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",s),...i})}export{ne as I};
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.