{"version":3,"file":"Examples.-tPU97g3.mjs","names":["useCallback","useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/o2aNgYEi53rdQlg72GV0/vb0CxGVyBEyN3QCXyREC/Examples.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Learn more: https://www.framer.com/developers/overrides/\nfunction randomColor(){const color=Math.floor(Math.random()*16777215).toString(16);return`#${color.padStart(6,\"0\")}`;}export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[background,setBackground]=useState(\"#0099FF\");return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background},onClick:()=>{startTransition(()=>setBackground(randomColor()));}});});}export function withHomeWhyOutswarmLink(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const navigateToWhyOutswarm=useCallback(()=>{if(typeof window!==\"undefined\"){window.location.href=\"/#whyoutswarm\";}},[]);const handleNavigation=useCallback(event=>{event?.preventDefault?.();props.onClick?.(event);navigateToWhyOutswarm();},[navigateToWhyOutswarm,props]);const handleTapNavigation=useCallback(event=>{event?.preventDefault?.();props.onTap?.(event);navigateToWhyOutswarm();},[navigateToWhyOutswarm,props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleNavigation,onTap:handleTapNavigation});});}export function withPremiumFormSuccess(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{headline=\"Thanks for reaching out.\",bodyLineOne=\"We’ve received your information.\",bodyLineTwo=\"Christopher personally reviews every request and you’ll typically hear back within one business day.\",bodyLineThree=\"You can also reach us by email to share more context or ask questions at hello@outswarm.com.\",primaryLabel=\"Visit our main website\",primaryHref=\"/\",accentColor=\"#FF7A1A\",surfaceColor=\"#111111\",borderColor=\"rgba(255, 255, 255, 0.18)\",textColor=\"#FFFFFF\",mutedTextColor=\"rgba(255, 255, 255, 0.78)\",cornerRadius=18,minHeight=360,onSubmit,onSubmitCapture,...rest}=props;const[showSuccess,setShowSuccess]=useState(false);const[isSubmissionLocked,setIsSubmissionLocked]=useState(false);const[measuredHeight,setMeasuredHeight]=useState(minHeight);const formRef=useRef(null);const fallbackTimerRef=useRef(null);const clearFallbackTimer=useCallback(()=>{if(typeof window!==\"undefined\"&&fallbackTimerRef.current!==null){window.clearTimeout(fallbackTimerRef.current);fallbackTimerRef.current=null;}},[]);const setCombinedRef=useCallback(node=>{formRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&\"current\"in ref){ref.current=node;}},[ref]);const lockSubmission=useCallback(()=>{if(!isSubmissionLocked){startTransition(()=>setIsSubmissionLocked(true));}},[isSubmissionLocked]);const markSuccess=useCallback(()=>{clearFallbackTimer();startTransition(()=>setShowSuccess(true));},[clearFallbackTimer]);useEffect(()=>{const formElement=formRef.current;if(!formElement||typeof formElement.addEventListener!==\"function\")return;const handleFormData=()=>{markSuccess();};formElement.addEventListener(\"formdata\",handleFormData);return()=>{formElement.removeEventListener(\"formdata\",handleFormData);};},[markSuccess]);useEffect(()=>{const formElement=formRef.current;if(!formElement||typeof formElement.querySelectorAll!==\"function\")return;const shouldDisable=isSubmissionLocked||showSuccess;const controls=formElement.querySelectorAll(\"input, textarea, select, button\");controls.forEach(control=>{control.disabled=shouldDisable;});},[isSubmissionLocked,showSuccess]);useEffect(()=>{return()=>{clearFallbackTimer();};},[clearFallbackTimer]);const handleSubmitCapture=useCallback(event=>{if(showSuccess||isSubmissionLocked){event.preventDefault();return;}onSubmitCapture?.(event);const formElement=event.currentTarget;if(!formElement.checkValidity())return;const nextHeight=Math.max(minHeight,Math.round(formElement.getBoundingClientRect().height));startTransition(()=>setMeasuredHeight(nextHeight));lockSubmission();clearFallbackTimer();if(typeof window!==\"undefined\"){fallbackTimerRef.current=window.setTimeout(()=>{startTransition(()=>setShowSuccess(true));},500);}else{startTransition(()=>setShowSuccess(true));}},[clearFallbackTimer,isSubmissionLocked,lockSubmission,minHeight,onSubmitCapture,showSuccess]);const handleSubmit=useCallback(event=>{if(showSuccess||isSubmissionLocked){event.preventDefault();return;}onSubmit?.(event);lockSubmission();},[isSubmissionLocked,lockSubmission,onSubmit,showSuccess]);const panelStyle=useMemo(()=>({width:\"100%\",minHeight:Math.max(minHeight,measuredHeight),borderRadius:cornerRadius,padding:\"28px\",border:`1px solid ${borderColor}`,background:`linear-gradient(150deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), ${surfaceColor}`,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:\"16px\",boxSizing:\"border-box\"}),[borderColor,cornerRadius,measuredHeight,minHeight,surfaceColor]);const wrapperStyle=useMemo(()=>({position:\"relative\",width:\"100%\",minHeight:showSuccess?Math.max(minHeight,measuredHeight):undefined}),[measuredHeight,minHeight,showSuccess]);const formStyle=useMemo(()=>({...props.style||{},position:showSuccess?\"absolute\":\"relative\",inset:showSuccess?0:undefined,width:showSuccess?\"100%\":props.style?.width,opacity:showSuccess?0:1,visibility:showSuccess?\"hidden\":\"visible\",pointerEvents:showSuccess||isSubmissionLocked?\"none\":\"auto\"}),[isSubmissionLocked,props.style,showSuccess]);const primaryButtonStyle=useMemo(()=>({textDecoration:\"none\",padding:\"12px 18px\",borderRadius:Math.max(12,cornerRadius-4),background:`linear-gradient(135deg, ${accentColor}, #FF9A46)`,color:\"#111111\",fontFamily:\"Inter, sans-serif\",fontWeight:600,fontSize:14,lineHeight:1,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",minHeight:44,whiteSpace:\"nowrap\"}),[accentColor,cornerRadius]);return /*#__PURE__*/_jsxs(\"div\",{style:wrapperStyle,children:[/*#__PURE__*/_jsx(Component,{ref:setCombinedRef,...rest,onSubmitCapture:handleSubmitCapture,onSubmit:handleSubmit,\"aria-busy\":isSubmissionLocked&&!showSuccess,\"aria-hidden\":showSuccess,style:formStyle}),showSuccess&&/*#__PURE__*/_jsxs(\"section\",{style:{...panelStyle,position:\"absolute\",inset:0},role:\"status\",\"aria-live\":\"polite\",children:[/*#__PURE__*/_jsx(\"div\",{style:{width:42,height:4,borderRadius:99,background:`linear-gradient(90deg, ${accentColor}, #FF9A46)`,opacity:.95}}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:textColor,fontFamily:\"Inter, sans-serif\",fontSize:28,lineHeight:1.1,fontWeight:600,letterSpacing:\"-0.02em\"},children:headline}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:mutedTextColor,fontFamily:\"Inter, sans-serif\",fontSize:15,lineHeight:1.5},children:bodyLineOne}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:mutedTextColor,fontFamily:\"Inter, sans-serif\",fontSize:15,lineHeight:1.5},children:bodyLineTwo}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:mutedTextColor,fontFamily:\"Inter, sans-serif\",fontSize:15,lineHeight:1.5},children:bodyLineThree}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:10,marginTop:8},children:/*#__PURE__*/_jsx(\"a\",{href:primaryHref,style:primaryButtonStyle,\"aria-label\":\"Visit our main website\",children:primaryLabel})})]})]});});}addPropertyControls(withPremiumFormSuccess,{headline:{type:ControlType.String,defaultValue:\"Thanks for reaching out.\"},bodyLineOne:{type:ControlType.String,defaultValue:\"We’ve received your information.\"},bodyLineTwo:{type:ControlType.String,defaultValue:\"Christopher personally reviews every request and you’ll typically hear back within one business day.\",displayTextArea:true},bodyLineThree:{type:ControlType.String,defaultValue:\"You can also reach us by email to share more context or ask questions at hello@outswarm.com.\",displayTextArea:true},primaryLabel:{type:ControlType.String,defaultValue:\"Visit our main website\"},primaryHref:{type:ControlType.Link,defaultValue:\"/\"},accentColor:{type:ControlType.Color,defaultValue:\"#FF7A1A\"},surfaceColor:{type:ControlType.Color,defaultValue:\"#111111\"},borderColor:{type:ControlType.Color,defaultValue:\"rgba(255, 255, 255, 0.18)\"},textColor:{type:ControlType.Color,defaultValue:\"#FFFFFF\"},mutedTextColor:{type:ControlType.Color,defaultValue:\"rgba(255, 255, 255, 0.78)\"},cornerRadius:{type:ControlType.Number,defaultValue:18,min:16,max:40,step:1,unit:\"px\"},minHeight:{type:ControlType.Number,defaultValue:360,min:180,max:1200,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"withPremiumFormSuccess\":{\"type\":\"reactHoc\",\"name\":\"withPremiumFormSuccess\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHomeWhyOutswarmLink\":{\"type\":\"reactHoc\",\"name\":\"withHomeWhyOutswarmLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"oOACkvB,SAAgB,EAAwB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAsBA,MAAgB,CAAW,IAAS,SAAa,EAAO,SAAS,KAAK,kBAAmB,EAAE,CAAC,CAAO,EAAiBA,EAAY,GAAO,CAAC,GAAO,kBAAkB,CAAC,EAAM,UAAU,EAAM,CAAC,GAAuB,EAAG,CAAC,EAAsB,EAAM,CAAC,CAAO,EAAoBA,EAAY,GAAO,CAAC,GAAO,kBAAkB,CAAC,EAAM,QAAQ,EAAM,CAAC,GAAuB,EAAG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