{"version":3,"file":"FormSubmitButton.Dc3eYVN2.mjs","names":["React.useState","React.useRef","React.useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/ux3JRIHxIB7yx1JX9d1G/zScgoGALPzAnP2sC6DJH/FormSubmitButton.js"],"sourcesContent":["// FormSubmitButton: A submit button for Framer forms that shows \"Thank You\" on submit\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * FormSubmitButton\n *\n * Submit button that shows \"Thank You\" after form submission.\n * Drop this inside any Framer form to replace the submit button.\n * Does NOT manipulate form fields — lets Framer handle submission natively.\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 50\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight fixed\n */export default function FormSubmitButton(props){const{buttonText=\"Let's Connect\",thankYouText=\"Thank You\",backgroundColor=\"rgb(18, 18, 18)\",textColor=\"rgb(255, 255, 255)\",borderRadius=\"40px\",resetDelay=3e3,height=50,style}=props;const[submitted,setSubmitted]=React.useState(false);const[isHovered,setIsHovered]=React.useState(false);const[isPressed,setIsPressed]=React.useState(false);const timerRef=React.useRef(null);React.useEffect(()=>{return()=>{if(timerRef.current)clearTimeout(timerRef.current);};},[]);const handleClick=React.useCallback(e=>{// If already submitted, block re-clicks\nif(submitted){e.preventDefault();return;}// Show \"Thank You\" state\nsetSubmitted(true);// Reset after delay\ntimerRef.current=window.setTimeout(()=>{setSubmitted(false);},resetDelay);// Do NOT call e.preventDefault() — let native submit proceed\n// Do NOT touch form fields — let Framer handle everything\n},[submitted,resetDelay]);const getTransform=()=>{if(submitted)return\"scale(1)\";if(isPressed)return\"scale(0.975)\";if(isHovered)return\"scale(1.025) translateY(-1px)\";return\"scale(1) translateY(0px)\";};const getBg=()=>{if(submitted)return\"rgb(34, 120, 60)\";if(isPressed)return backgroundColor;if(isHovered)return\"rgb(40, 40, 40)\";return backgroundColor;};return /*#__PURE__*/_jsxs(\"button\",{type:\"submit\",onClick:handleClick,onMouseEnter:()=>!submitted&&setIsHovered(true),onMouseLeave:()=>{setIsHovered(false);setIsPressed(false);},onMouseDown:()=>!submitted&&setIsPressed(true),onMouseUp:()=>setIsPressed(false),\"aria-label\":submitted?thankYouText:buttonText,style:{width:\"100%\",height:`${height}px`,backgroundColor:getBg(),color:textColor,borderRadius,border:\"none\",cursor:submitted?\"default\":\"pointer\",fontFamily:\"Helvetica, Arial, sans-serif\",fontSize:\"15px\",fontWeight:400,letterSpacing:isHovered&&!submitted?\"0.06em\":\"0.02em\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"background-color 0.3s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease, letter-spacing 0.25s ease\",transform:getTransform(),boxShadow:submitted||!isHovered?\"none\":\"0 6px 20px rgba(0,0,0,0.22)\",outline:\"none\",userSelect:\"none\",WebkitUserSelect:\"none\",position:\"relative\",overflow:\"hidden\",...style},children:[/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",inset:0,borderRadius:\"inherit\",background:\"linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%)\",opacity:isHovered&&!submitted?1:0,transition:\"opacity 0.3s ease\",pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:\"8px\",pointerEvents:\"none\",position:\"relative\"},children:submitted?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{flexShrink:0},children:/*#__PURE__*/_jsx(\"path\",{d:\"M13.5 4L6 12L2.5 8.5\",stroke:\"white\",strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})}),thankYouText]}):buttonText})]});}addPropertyControls(FormSubmitButton,{buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Let's Connect\"},thankYouText:{type:ControlType.String,title:\"Thank You Text\",defaultValue:\"Thank You\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgb(18, 18, 18)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"rgb(255, 255, 255)\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"40px\"},height:{type:ControlType.Number,title:\"Height\",defaultValue:50,min:32,max:120,step:1,unit:\"px\"},resetDelay:{type:ControlType.Number,title:\"Reset Delay\",defaultValue:3e3,min:1e3,max:1e4,step:500,unit:\"ms\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FormSubmitButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"50\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormSubmitButton.map"],"mappings":"sNAaG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,aAAW,gBAAgB,eAAa,YAAY,kBAAgB,kBAAkB,YAAU,qBAAqB,eAAa,OAAO,aAAW,IAAI,SAAO,GAAG,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAe,GAAM,CAAM,CAAC,EAAU,GAAcA,EAAe,GAAM,CAAM,CAAC,EAAU,GAAcA,EAAe,GAAM,CAAO,EAASC,EAAa,KAAK,CAAC,UAA+B,CAAI,EAAS,SAAQ,aAAa,EAAS,QAAQ,EAAK,EAAE,CAAC,CAAC,IAAM,EAAYC,EAAkB,GAAG,CACxiB,GAAG,EAAU,CAAC,EAAE,gBAAgB,CAAC,OACjC,EAAa,GAAK,CAClB,EAAS,QAAQ,EAAO,eAAe,CAAC,EAAa,GAAM,EAAG,EAAW,EAEvE,CAAC,EAAU,EAAW,CAAC,CAAO,MAAq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