{"version":3,"file":"FancyButton.CyKPO881.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/Xz865Ij4R7pNgBpWQ6zY/1VAHZbFeMbjVAVu9TrzC/FancyButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useState,useMemo}from\"react\";/**\n * Rainbow Button\n * Animated gradient border weighted to the bottom, with glow.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function RainbowButton(props){const{label,link,openInNewTab,disabled,bgColor,bgColorHover,textColor,textColorHover,gradientColors,animationSpeed,borderWidth,borderRadius,glowEnabled,glowBlur,glowOpacity,glowSpread,paddingX,paddingY,fontSize,fontWeight,fontFamily,letterSpacing,shadowDefault,shadowHover}=props;const[hovered,setHovered]=useState(false);const gradientString=useMemo(()=>{const colors=gradientColors&&gradientColors.length>=2?gradientColors:[\"#15B79E\",\"#175CD3\",\"#194185\",\"#2E90FA\",\"#FF4405\"];return[...colors,...colors].join(\", \");},[gradientColors]);const dur=animationSpeed||4;return /*#__PURE__*/_jsxs(motion.a,{href:disabled?undefined:link,target:openInNewTab?\"_blank\":\"_self\",rel:openInNewTab?\"noopener noreferrer\":undefined,onMouseEnter:()=>!disabled&&setHovered(true),onMouseLeave:()=>setHovered(false),style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",textDecoration:\"none\",cursor:disabled?\"not-allowed\":\"pointer\",opacity:disabled?.5:1,width:\"100%\",height:\"100%\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:borderRadius,padding:borderWidth,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(motion.div,{animate:{backgroundPosition:[\"0% 50%\",\"-200% 50%\"]},transition:{duration:dur,ease:\"linear\",repeat:Infinity},style:{position:\"absolute\",inset:0,background:`linear-gradient(90deg, ${gradientString})`,backgroundSize:\"200% 100%\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:\"linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 65%)\",pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(motion.div,{animate:{backgroundColor:hovered?bgColorHover:bgColor,boxShadow:hovered?shadowHover:shadowDefault},transition:{duration:.3,ease:\"easeInOut\"},style:{position:\"relative\",zIndex:1,width:\"100%\",height:\"100%\",borderRadius:Math.max(0,borderRadius-borderWidth),display:\"flex\",alignItems:\"center\",justifyContent:\"center\",paddingLeft:paddingX,paddingRight:paddingX,paddingTop:paddingY,paddingBottom:paddingY,boxSizing:\"border-box\"},children:/*#__PURE__*/_jsx(motion.span,{animate:{color:hovered?textColorHover:textColor},transition:{duration:.25},style:{position:\"relative\",zIndex:2,fontSize,fontWeight,fontFamily,letterSpacing,lineHeight:1,whiteSpace:\"nowrap\",userSelect:\"none\"},children:label})})]}),glowEnabled&&/*#__PURE__*/_jsx(motion.div,{animate:{backgroundPosition:[\"0% 50%\",\"-200% 50%\"]},transition:{duration:dur,ease:\"linear\",repeat:Infinity},style:{position:\"absolute\",bottom:-(glowBlur*.3),left:`${(100-glowSpread)/2}%`,right:`${(100-glowSpread)/2}%`,height:glowBlur*.8,borderRadius:\"50%\",background:`linear-gradient(90deg, ${gradientString})`,backgroundSize:\"200% 100%\",filter:`blur(${glowBlur}px)`,opacity:glowOpacity,zIndex:-1,pointerEvents:\"none\"}})]});}RainbowButton.defaultProps={label:\"Get Unlimited Access\",link:\"#\",openInNewTab:false,disabled:false,bgColor:\"#0a0a0a\",bgColorHover:\"#141414\",textColor:\"#ffffff\",textColorHover:\"#ffffff\",gradientColors:[\"#15B79E\",\"#175CD3\",\"#194185\",\"#2E90FA\",\"#FF4405\"],animationSpeed:4,borderWidth:2,borderRadius:16,glowEnabled:true,glowBlur:24,glowOpacity:.6,glowSpread:70,paddingX:48,paddingY:20,fontSize:18,fontWeight:500,fontFamily:\"Inter, system-ui, sans-serif\",letterSpacing:-.2,shadowDefault:\"0 0 0 rgba(0,0,0,0)\",shadowHover:\"0 4px 24px rgba(0,0,0,0.3)\"};addPropertyControls(RainbowButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Get Unlimited Access\"},link:{type:ControlType.String,title:\"Link URL\",defaultValue:\"#\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false},bgColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#0a0a0a\"},bgColorHover:{type:ControlType.Color,title:\"Bg Hover\",defaultValue:\"#141414\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#ffffff\"},textColorHover:{type:ControlType.Color,title:\"Text Hover\",defaultValue:\"#ffffff\"},gradientColors:{type:ControlType.Array,title:\"Gradient Colors\",control:{type:ControlType.Color},defaultValue:[\"#15B79E\",\"#175CD3\",\"#194185\",\"#2E90FA\",\"#FF4405\"],maxCount:8},animationSpeed:{type:ControlType.Number,title:\"Speed (s)\",defaultValue:4,min:.5,max:20,step:.5},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:1,max:8,step:1},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:16,min:0,max:100,step:1},glowEnabled:{type:ControlType.Boolean,title:\"Glow\",defaultValue:true},glowBlur:{type:ControlType.Number,title:\"Glow Blur\",defaultValue:24,min:5,max:60,step:1,hidden:p=>!p.glowEnabled},glowOpacity:{type:ControlType.Number,title:\"Glow Opacity\",defaultValue:.6,min:0,max:1,step:.05,hidden:p=>!p.glowEnabled},glowSpread:{type:ControlType.Number,title:\"Glow Spread %\",defaultValue:70,min:20,max:100,step:5,hidden:p=>!p.glowEnabled},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:48,min:0,max:80,step:4},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:20,min:0,max:60,step:4},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:18,min:10,max:48,step:1},fontWeight:{type:ControlType.Enum,title:\"Font Weight\",options:[300,400,500,600,700],optionTitles:[\"Light\",\"Regular\",\"Medium\",\"Semibold\",\"Bold\"],defaultValue:500},fontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"Inter, system-ui, sans-serif\"},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing\",defaultValue:-.2,min:-2,max:8,step:.1},shadowDefault:{type:ControlType.String,title:\"Shadow\",defaultValue:\"0 0 0 rgba(0,0,0,0)\"},shadowHover:{type:ControlType.String,title:\"Shadow Hover\",defaultValue:\"0 4px 24px rgba(0,0,0,0.3)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RainbowButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FancyButton.map"],"mappings":"2OAMG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,eAAa,WAAS,UAAQ,eAAa,YAAU,iBAAe,iBAAe,iBAAe,cAAY,eAAa,cAAY,WAAS,cAAY,aAAW,WAAS,WAAS,WAAS,aAAW,aAAW,gBAAc,gBAAc,eAAa,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAQ,EAAeC,MAAY,CAAC,IAAM,EAAO,GAAgB,EAAe,QAAQ,EAAE,EAAe,CAAC,UAAU,UAAU,UAAU,UAAU,SAAS,EAAE,MAAM,CAAC,GAAG,EAAO,GAAG,CAAM,CAAC,CAAC,KAAK,IAAI,CAAE,EAAE,CAAC,CAAc,CAAC,EAAQ,EAAI,GAAgB,EAAE,OAAoB,EAAM,EAAO,EAAE,CAAC,KAAK,EAAS,IAAA,GAAU,EAAK,OAAO,EAAa,SAA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