{"version":3,"file":"HorizontalForm_3.Celbi__F.mjs","names":["useState","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/UOhKQ1MnHXRJjBK13Gdc/Ivo9LACOT9qDgYgTQ3tl/HorizontalForm_3.js"],"sourcesContent":["// Horizontal form with animated progress bar, 3 text inputs, and submit button\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useMemo,useCallback,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Horizontal Form with Animated Progress Bar\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 120\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function HorizontalForm(props){const{placeholder1,placeholder2,placeholder3,fieldName1,fieldName2,fieldName3,buttonLabel,buttonIcon,background,inputBackground,inputTextColor,inputBorderColor,inputFont,buttonColor,buttonTextColor,buttonFont,progressColor,borderRadius,style}=props;const[values,setValues]=useState([\"\",\"\",\"\"]);const[progress,setProgress]=useState(0);const isStatic=useIsStaticRenderer();// Animate progress bar width\nconst progressWidth=useMemo(()=>`${progress*33.3333}%`,[progress]);const handleInput=useCallback((i,v)=>{startTransition(()=>{setValues(vals=>{const arr=[...vals];arr[i]=v;return arr;});});},[]);// Only animate progress when user clicks next field\nconst handleFieldBlur=useCallback(i=>{startTransition(()=>{// Count filled fields\nconst filled=values.filter(v=>v.trim().length>0).length;setProgress(Math.min(filled,3));});},[values]);// On submit, update progress to max\nconst handleSubmit=useCallback(e=>{e.preventDefault();startTransition(()=>setProgress(3));},[]);return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",minWidth:260,background,borderRadius,boxShadow:\"0 2px 12px rgba(0,0,0,0.04)\",padding:24,display:\"flex\",flexDirection:\"column\",gap:18,alignItems:\"center\",justifyContent:\"center\",position:\"relative\",maxWidth:720,margin:\"0 auto\"},children:[/*#__PURE__*/_jsx(\"div\",{className:\"horizontal-form-progress-bar\",style:{width:\"100%\",height:4,background:inputBorderColor,borderRadius:2,overflow:\"hidden\",display:\"block\"},children:/*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",width:isStatic?progressWidth:undefined,background:progress>0?progressColor:inputBorderColor,borderRadius:2,transition:isStatic?undefined:\"width 0.35s cubic-bezier(.4,0,.2,1), background 0.35s cubic-bezier(.4,0,.2,1)\",minWidth:0,// Animate width smoothly\n...isStatic?{width:progressWidth}:{width:progressWidth}}})}),/*#__PURE__*/_jsxs(\"form\",{className:\"horizontal-form-formrow\",style:{display:\"flex\",flexDirection:\"row\",gap:12,width:\"100%\",alignItems:\"flex-end\",justifyContent:\"center\"},onSubmit:handleSubmit,autoComplete:\"off\",\"aria-label\":\"Horizontal Form\",children:[[0,1,2].map(i=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",flex:1,minWidth:0},children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:`field-${i}`,style:{fontSize:13,color:inputTextColor,fontWeight:500,marginBottom:4,marginLeft:2,opacity:.85,letterSpacing:\"-0.01em\",lineHeight:1.2,userSelect:\"none\"},children:i===0?fieldName1:i===1?fieldName2:fieldName3}),/*#__PURE__*/_jsx(\"input\",{id:`field-${i}`,type:\"text\",value:values[i],onChange:e=>handleInput(i,e.target.value),placeholder:i===0?placeholder1:i===1?placeholder2:placeholder3,style:{flex:1,minWidth:0,background:inputBackground,color:inputTextColor,border:\"none\",borderRadius:borderRadius,padding:\"12px 14px\",outline:\"none\",fontSize:inputFont.fontSize,fontWeight:inputFont.variant===\"Bold\"?700:400,letterSpacing:inputFont.letterSpacing,lineHeight:inputFont.lineHeight,fontStyle:inputFont.variant?.toLowerCase().includes(\"italic\")?\"italic\":\"normal\",transition:\"outline 0.2s, border-color 0.2s, box-shadow 0.2s\",boxShadow:undefined},\"aria-label\":`Field ${i+1}`,onFocus:e=>{e.target.style.boxShadow=`0 0 0 2px ${progressColor}33`;e.target.style.border=`1.5px solid ${progressColor}`;},onBlur:e=>{e.target.style.boxShadow=\"none\";e.target.style.border=\"none\";handleFieldBlur(i);}})]},i)),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{background:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:borderRadius,padding:\"12px 22px\",cursor:\"pointer\",fontSize:buttonFont.fontSize,fontWeight:500,letterSpacing:buttonFont.letterSpacing,lineHeight:buttonFont.lineHeight,fontStyle:buttonFont.variant?.toLowerCase().includes(\"italic\")?\"italic\":\"normal\",fontFamily:\"Barlow, sans-serif\",transition:\"background 0.2s, color 0.2s, transform 0.18s cubic-bezier(.4,0,.2,1)\",boxShadow:\"0 3px 8px 0 #3D3D3D26, 0 8px 18px 0 #16332040\"},\"aria-label\":buttonLabel,onMouseEnter:e=>e.currentTarget.style.transform=\"scale(1.1)\",onMouseLeave:e=>e.currentTarget.style.transform=\"scale(1)\",children:/*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:8},children:[buttonLabel,buttonIcon&&/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",marginLeft:8,verticalAlign:\"middle\"},\"aria-hidden\":\"true\",children:buttonIcon})]})})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 600px) {\n                    .horizontal-form-formrow {\n                        flex-direction: column !important;\n                        gap: 14px !important;\n                        align-items: center !important;\n                        justify-content: center !important;\n                    }\n                    .horizontal-form-progress-bar {\n                        display: none !important;\n                    }\n                    .horizontal-form-formrow > div {\n                        align-items: flex-start !important;\n                        width: 100% !important;\n                    }\n                    .horizontal-form-formrow input {\n                        width: 100% !important;\n                        min-width: 0 !important;\n                    }\n                    .horizontal-form-formrow button {\n                        width: 100% !important;\n                        min-width: 0 !important;\n                    }\n                    div[style*=\"background: #FFFFFF\"] {\n                        max-width: 100vw !important;\n                        box-sizing: border-box !important;\n                        margin: 0 auto !important;\n                    }\n                }\n                @media (min-width: 601px) {\n                    div[style*=\"background: #FFFFFF\"] {\n                        max-width: 720px !important;\n                        min-width: 480px !important;\n                        margin: 40px auto !important;\n                    }\n                }\n            `})]});}addPropertyControls(HorizontalForm,{placeholder1:{type:ControlType.String,title:\"Placeholder 1\",defaultValue:\"First Name\"},fieldName1:{type:ControlType.String,title:\"Field Name 1\",defaultValue:\"First Name\"},placeholder2:{type:ControlType.String,title:\"Placeholder 2\",defaultValue:\"Last Name\"},fieldName2:{type:ControlType.String,title:\"Field Name 2\",defaultValue:\"Last Name\"},placeholder3:{type:ControlType.String,title:\"Placeholder 3\",defaultValue:\"Email Address\"},fieldName3:{type:ControlType.String,title:\"Field Name 3\",defaultValue:\"Email\"},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Submit\"},buttonIcon:{type:ControlType.String,title:\"Button Icon (SVG or Emoji)\",defaultValue:\"\",placeholder:\"e.g. 🚀 or <svg>...</svg>\",displayTextArea:true},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},inputBackground:{type:ControlType.Color,title:\"Input Background\",defaultValue:\"#F5F5F5\"},inputTextColor:{type:ControlType.Color,title:\"Input Text\",defaultValue:\"#222222\"},inputBorderColor:{type:ControlType.Color,title:\"Input Border\",defaultValue:\"#E0E0E0\"},inputFont:{type:ControlType.Font,title:\"Input Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#111111\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},progressColor:{type:ControlType.Color,title:\"Progress Color\",defaultValue:\"#0099FF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HorizontalForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"120\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HorizontalForm_3.map"],"mappings":"8MASG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,eAAa,eAAa,eAAa,aAAW,aAAW,aAAW,cAAY,aAAW,aAAW,kBAAgB,iBAAe,mBAAiB,YAAU,cAAY,kBAAgB,aAAW,gBAAc,eAAa,SAAO,EAAW,CAAC,EAAO,GAAWA,EAAS,CAAC,GAAG,GAAG,GAAG,CAAC,CAAM,CAAC,EAAS,GAAaA,EAAS,EAAE,CAAO,EAAS,GAAqB,CAC7Z,EAAcC,MAAY,GAAG,EAAS,QAAQ,GAAG,CAAC,EAAS,CAAC,CAAO,EAAYC,GAAa,EAAE,IAAI,CAAC,MAAoB,CAAC,EAAU,GAAM,CAAC,IAAM,EAAI,CAAC,GAAG,EAAK,CAAU,MAAT,GAAI,GAAG,EAAS,GAAM,EAAG,EAAG,EAAE,CAAC,CAC5L,EAAgBA,EAAY,GAAG,CAAC,MAAoB,CAC1D,IAAM,EAAO,EAAO,OAAO,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAY,KAAK,IAAI,EAAO,EAAE,CAAC,EAAG,EAAG,CAAC,EAAO,CAAC,CAChG,EAAaA,EAAY,GAAG,CAAC,EAAE,gBAAgB,CAAC,MAAoB,EAAY,EAAE,CAAC,EAAG,EAAE,CAAC,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,SAAS,IAAI,aAAW,eAAa,UAAU,8BAA8B,QAAQ,GAAG,QAAQ,OA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