{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/tN5l0aqIzWiUvVuvMcpG/RdY9lsnI2r5TMVIafxNF/TextInput.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";import{motion}from\"framer\";import{createBackground,Border,parsePadding,fillProp,borderProp,shadowsProp,useInstanceId}from\"https://framerusercontent.com/modules/DwWOdDzQZGCuvkNlbUjZ/p64C0n6xNEFY9NovSiJw/FramerFormsShared.js\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 400\n * @framerDisableUnlink\n */export default function TextInput(props){const{type,textAreaHeight,shadows,border}=props;const id=useInstanceId();const Element=type==\"textArea\"?\"textarea\":\"input\";const[focused,setFocused]=useState(false);const[invalid,setInvalid]=useState(false);let attributes={};let styles={};if(type==\"textArea\"){const[pt,pr,pb,pl]=parsePadding(props.padding);const heightMode=textAreaHeight.mode;const autoHeightSupported=typeof CSS!==\"undefined\"?CSS.supports(\"field-sizing\",\"content\"):true;attributes.rows=heightMode==\"fixed\"?textAreaHeight.lines:1;styles={display:\"block\",minHeight:heightMode==\"auto\"&&!autoHeightSupported?`calc(${textAreaHeight.fallbackLines}lh + ${pt+pb}px)`:heightMode!==\"fixed\"?`calc(${textAreaHeight.minLines}lh + ${pt+pb}px)`:undefined,maxHeight:heightMode!==\"fixed\"?`calc(${textAreaHeight.maxLines}lh + ${pt+pb}px)`:undefined,fieldSizing:heightMode==\"auto\"&&autoHeightSupported?\"content\":undefined,resize:heightMode==\"resizable\"?\"vertical\":\"none\"};}const onFocus=()=>{setFocused(true);props.focusEvent?.();if(invalid){setInvalid(false);}};const onBlur=()=>{setFocused(false);props.blurEvent?.();};const onInvalid=event=>{event.preventDefault();setInvalid(true);props.invalidEvent?.();};return /*#__PURE__*/_jsxs(motion.div,{\"data-framerforms\":true,id:id,onFocus:onFocus,onBlur:onBlur,animate:{...createBackground(props.fill,null,focused,invalid),boxShadow:invalid&&shadows?.invalid||focused&&shadows?.focus||shadows?.default,borderColor:invalid&&border?.colorInvalid||focused&&border?.colorFocus||border?.color},style:{borderRadius:props.radius,overflow:type==\"textArea\"&&props.textAreaScrollbar==\"auto\"?\"hidden\":\"visible\",backdropFilter:props.bgBlur?`blur(${props.bgBlur}px)`:undefined,...props.style},initial:false,transition:props.transition,children:[/*#__PURE__*/_jsx(Element,{name:props.name,required:props.required,autoFocus:props.autoFocus,placeholder:props.placeholder,minLength:props.minLengthEnabled?props.minLength:undefined,maxLength:props.maxLengthEnabled?props.maxLength:undefined,defaultValue:props.value,onInvalid:onInvalid,style:{display:\"block\",padding:props.padding,color:props.color,background:\"none\",border:\"none\",textOverflow:\"ellipsis\",...styles,...props.font,...props.style},...attributes}),/*#__PURE__*/_jsx(Border,{...props.border,transition:props.transition}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`\n                    #${id} ${Element}::placeholder {\n                        color: ${props.placeholderColor};\n                    }\n                    #${id} ${Element}:focus {\n                        appearance: none;\n                        outline: none;\n                        border: none;\n                        display: none;\n                    }`}}),type==\"textArea\"&&props.textAreaScrollbar==\"hidden\"&&/*#__PURE__*/_jsx(\"style\",{children:`#${id} textarea::-webkit-scrollbar {\n                        display: none; /* WebKit browsers (Chrome, Safari) */\n                    }\n                    #${id} textarea {\n                        -ms-overflow-style: none; /* IE and Edge */\n                        scrollbar-width: none; /* Firefox */\n                    }`})]});}TextInput.displayName=\"Text Input\";addPropertyControls(TextInput,{name:{type:ControlType.String,defaultValue:\"Text\",preventLocalization:true},required:{type:ControlType.Boolean,defaultValue:false},autoFocus:{type:ControlType.Boolean,defaultValue:false,title:\"Auto-Focus\"},minLengthEnabled:{type:ControlType.Boolean,defaultValue:false,title:\"Min Length\"},minLength:{type:ControlType.Number,defaultValue:100,min:0,step:1,displayStepper:true,title:\" \",hidden:props=>!props.minLengthEnabled},maxLengthEnabled:{type:ControlType.Boolean,defaultValue:false,title:\"Max Length\"},maxLength:{type:ControlType.Number,defaultValue:100,min:0,step:1,displayStepper:true,title:\" \",hidden:props=>!props.maxLengthEnabled},value:{type:ControlType.String,placeholder:\"Default Value\"},type:{type:ControlType.Enum,defaultValue:\"input\",options:[\"textArea\",\"input\"],optionTitles:[\"Yes\",\"No\"],displaySegmentedControl:true,title:\"Text Area\"},textAreaHeight:{type:ControlType.Object,title:\"Height\",controls:{mode:{type:ControlType.Enum,defaultValue:\"auto\",options:[\"auto\",\"resizable\",\"fixed\"],optionTitles:[\"Auto\",\"Resizable\",\"Fixed\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},minLines:{type:ControlType.Number,defaultValue:3,min:1,step:1,displayStepper:true,hidden:props=>props.mode===\"fixed\"},maxLines:{type:ControlType.Number,defaultValue:8,min:1,step:1,displayStepper:true,hidden:props=>props.mode===\"fixed\"},lines:{type:ControlType.Number,defaultValue:5,min:1,step:1,displayStepper:true,hidden:props=>props.mode!==\"fixed\"},fallbackLines:{type:ControlType.Number,defaultValue:5,min:1,step:1,title:\"Fallback\",description:\"Auto height is [not supported on all browsers](https://caniuse.com/mdn-css_properties_field-sizing_content). Fallback is used when auto height is not supported.\",hidden:props=>props.mode!==\"auto\"}},hidden:props=>props.type!=\"textArea\"},textAreaScrollbar:{type:ControlType.Enum,defaultValue:\"hidden\",options:[\"auto\",\"hidden\"],optionTitles:[\"Auto\",\"Hidden\"],displaySegmentedControl:true,title:\"Scrollbar\",hidden:props=>props.type!=\"textArea\"},placeholder:{type:ControlType.String,defaultValue:\"Write here...\"},font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:14,lineHeight:1.2}},color:{type:ControlType.Color,defaultValue:\"#999999\"},placeholderColor:{type:ControlType.Color,defaultValue:\"#999999\",title:\"Placeholder\"},fill:fillProp(),radius:{type:ControlType.BorderRadius,defaultValue:\"10px\"},padding:{type:ControlType.Padding,defaultValue:\"12px\"},border:borderProp(),shadows:shadowsProp(),bgBlur:{type:ControlType.Number,min:0,max:100,step:1,displayStepper:true,title:\"BG Blur\"},transition:{type:ControlType.Transition,defaultValue:{type:false}},focusEvent:{type:ControlType.EventHandler,title:\"Focus\"},blurEvent:{type:ControlType.EventHandler,title:\"Blur\"},invalidEvent:{type:ControlType.EventHandler,title:\"Invalid\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextInput\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextInput.map"],
  "mappings": "iMAKkB,SAARA,EAA2BC,EAAM,CAAC,GAAK,CAAC,KAAAC,EAAK,eAAAC,EAAe,QAAAC,EAAQ,OAAAC,CAAM,EAAEJ,EAAYK,EAAGC,EAAc,EAAQC,EAAQN,GAAM,WAAW,WAAW,QAAa,CAACO,EAAQC,CAAU,EAAEC,EAAS,EAAK,EAAO,CAACC,EAAQC,CAAU,EAAEF,EAAS,EAAK,EAAMG,EAAW,CAAC,EAAMC,EAAO,CAAC,EAAE,GAAGb,GAAM,WAAW,CAAC,GAAK,CAACc,EAAGC,EAAGC,EAAGC,CAAE,EAAEC,EAAanB,EAAM,OAAO,EAAQoB,EAAWlB,EAAe,KAAWmB,EAAoB,OAAO,IAAM,IAAY,IAAI,SAAS,eAAe,SAAS,EAAE,GAAKR,EAAW,KAAKO,GAAY,QAAQlB,EAAe,MAAM,EAAEY,EAAO,CAAC,QAAQ,QAAQ,UAAUM,GAAY,QAAQ,CAACC,EAAoB,QAAQnB,EAAe,aAAa,QAAQa,EAAGE,CAAE,MAAMG,IAAa,QAAQ,QAAQlB,EAAe,QAAQ,QAAQa,EAAGE,CAAE,MAAM,OAAU,UAAUG,IAAa,QAAQ,QAAQl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EAAE,KAAKC,EAAS,EAAE,OAAO,CAAC,KAAKD,EAAY,aAAa,aAAa,MAAM,EAAE,QAAQ,CAAC,KAAKA,EAAY,QAAQ,aAAa,MAAM,EAAE,OAAOE,EAAW,EAAE,QAAQC,EAAY,EAAE,OAAO,CAAC,KAAKH,EAAY,OAAO,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,eAAe,GAAK,MAAM,SAAS,EAAE,WAAW,CAAC,KAAKA,EAAY,WAAW,aAAa,CAAC,KAAK,EAAK,CAAC,EAAE,WAAW,CAAC,KAAKA,EAAY,aAAa,MAAM,OAAO,EAAE,UAAU,CAAC,KAAKA,EAAY,aAAa,MAAM,MAAM,EAAE,aAAa,CAAC,KAAKA,EAAY,aAAa,MAAM,SAAS,CAAC,CAAC",
  "names": ["TextInput", "props", "type", "textAreaHeight", "shadows", "border", "id", "useInstanceId", "Element", "focused", "setFocused", "ye", "invalid", "setInvalid", "attributes", "styles", "pt", "pr", "pb", "pl", "parsePadding", "heightMode", "autoHeightSupported", "onFocus", "onBlur", "onInvalid", "event", "u", "motion", "createBackground", "p", "Border", "addPropertyControls", "ControlType", "fillProp", "borderProp", "shadowsProp"]
}
