{"version":3,"file":"InteractiveButton.Ca5andyZ.mjs","names":["useState","useCallback"],"sources":["https:/framerusercontent.com/modules/vjHF37iQ8OK3kTHW0HL4/u136CoS8CawZHSmCqIVa/InteractiveButton.js"],"sourcesContent":["// Create a responsive button component called \"Fire Button\".  \n// The button background should be deep black (#0A0A0A) with white text (default label: \"Click Me\").  \n// It has a semi-transparent border (#FFFFFF20) that becomes brighter (#FFFFFF40) on hover.  \n// On hover, add these effects:\n// - Many small glowing particles rise upwards, like fire sparks.  \n// - The sparks should be small, bright, and numerous, in orange (#FF4D00) and yellow (#FFB84D).  \n// - A strong glow effect appears around the button, like it's being ignited.  \n// - The glow should use a smooth animated box-shadow (e.g., 0 0 15px #FF4D00, 0 0 30px #FFB84D).  \n// Make sure the text stays on a single line.  \n// Allow customization of:\n// - Button text  \n// - Background color  \n// - Border color  \n// Spark colors  \n// - Glow color and intensity\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback,startTransition}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Fire Button with Animated Fire Sparks Hover Effect\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FireButton(props){const{text,subtext=\"\",height=56,backgroundColor,textColor,borderColor,fireColor,glowIntensity,borderRadius,font,padding,link}=props;const[isHovered,setIsHovered]=useState(false);const handleClick=useCallback(()=>{if(typeof window!==\"undefined\"){if(link){if(link.startsWith(\"https\")){window.open(link,\"_blank\",\"noopener,noreferrer\");}else{window.location.href=link;}}}},[link]);const handleMouseEnter=useCallback(()=>{startTransition(()=>setIsHovered(true));},[]);const handleMouseLeave=useCallback(()=>{startTransition(()=>setIsHovered(false));},[]);const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";// Convert hex colors to RGB values for CSS variables\nconst hexToRgb=hex=>{const result=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);return result?{r:parseInt(result[1],16),g:parseInt(result[2],16),b:parseInt(result[3],16)}:{r:255,g:77,b:0};};const fireRgb=hexToRgb(fireColor);return /*#__PURE__*/_jsxs(motion.button,{style:{position:\"relative\",overflow:\"hidden\",border:`1px solid ${borderColor}`,cursor:\"pointer\",backgroundColor,color:textColor,borderRadius,padding:`${padding}px ${padding*1.5}px`,minHeight:height,height:isFixedHeight?\"100%\":height,maxHeight:isFixedHeight?undefined:height,textAlign:\"center\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",...font,...isFixedWidth?{width:\"100%\"}:{minWidth:\"max-content\"},...isFixedHeight?{height:\"100%\"}:{},...props.style,// CSS variables for spark and glow colors\n\"--fire-color\":fireColor,\"--fire-rgb\":`${fireRgb.r}, ${fireRgb.g}, ${fireRgb.b}`},initial:{scale:1},animate:{scale:isHovered?1.02:1,borderColor:isHovered?\"#FFFFFF40\":borderColor,boxShadow:isHovered?`0 0 15px var(--fire-color), 0 0 30px var(--fire-color)`:`0 0 5px var(--fire-color), 0 0 10px rgba(var(--fire-rgb), 0.6)`},transition:{duration:.4,ease:\"easeOut\"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,whileTap:{scale:.98},children:[isHovered&&Array.from({length:25},(_,i)=>{return /*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:`${5+Math.random()*90}%`,bottom:\"5%\",width:`${1+Math.random()*2}px`,height:`${1+Math.random()*2}px`,backgroundColor:fireColor,borderRadius:\"50%\",boxShadow:`0 0 4px ${fireColor}, 0 0 8px ${fireColor}80, 0 0 12px ${fireColor}40`,zIndex:2},initial:{opacity:0,scale:0},animate:{opacity:[0,1,.8,.6,.4,.2,0],scale:[0,1,1.5,1.2,.8,.4,0],y:[0,-15,-30,-50,-70,-90,-110],x:[0,Math.random()*15-7.5,Math.random()*25-12.5,Math.random()*35-17.5]},transition:{duration:2+Math.random()*1,repeat:Infinity,delay:i*.08+Math.random()*.4,ease:[.25,.46,.45,.94]}},`fire-spark-${i}`);}),isHovered&&Array.from({length:15},(_,i)=>{return /*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:`${10+Math.random()*80}%`,bottom:`${5+Math.random()*20}%`,width:\"0.5px\",height:\"0.5px\",backgroundColor:fireColor,borderRadius:\"50%\",boxShadow:`0 0 3px ${fireColor}, 0 0 6px ${fireColor}60`,zIndex:2},initial:{opacity:0},animate:{opacity:[0,1,.5,.9,.3,.7,0],scale:[0,2,1,3,.5,2.5,0],y:[0,-10,-25,-40,-55,-70],x:[0,Math.random()*10-5]},transition:{duration:1.8,repeat:Infinity,delay:i*.12,ease:\"easeOut\"}},`small-spark-${i}`);}),/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",zIndex:3,color:textColor,whiteSpace:\"pre-line\",overflow:\"hidden\",textOverflow:\"ellipsis\",fontWeight:font?.variant?.toLowerCase().includes(\"bold\")?700:undefined,...font,maxHeight:isFixedHeight?\"100%\":height,lineClamp:2,display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",WebkitLineClamp:2},children:[text,subtext&&/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",marginTop:3,fontSize:font?.fontSize?typeof font.fontSize===\"number\"?font.fontSize*.82:`calc(${font.fontSize} * 0.82)`:13,color:textColor,opacity:.82,fontWeight:400,letterSpacing:font?.letterSpacing,lineHeight:font?.lineHeight},children:subtext})]})]});}addPropertyControls(FireButton,{text:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Click Me\"},subtext:{type:ControlType.String,title:\"Subtext\",defaultValue:\"\",placeholder:\"Subheading...\",displayTextArea:false},height:{type:ControlType.Number,title:\"Height\",defaultValue:56,min:36,max:120,unit:\"px\"},link:{type:ControlType.Link,title:\"Link\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#0A0A0A\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#FFFFFF20\"},fireColor:{type:ControlType.Color,title:\"Fire Color\",defaultValue:\"#FF4D00\"},glowIntensity:{type:ControlType.Number,title:\"Glow Intensity\",defaultValue:1,min:.1,max:3,step:.1},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:16,min:8,max:32,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FireButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InteractiveButton.map"],"mappings":"8PAoBG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,UAAQ,GAAG,SAAO,GAAG,kBAAgB,YAAU,cAAY,YAAU,gBAAc,eAAa,OAAK,UAAQ,QAAM,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAYC,MAAgB,CAAW,IAAS,QAAgB,IAAS,EAAK,WAAW,QAAQ,CAAE,EAAO,KAAK,EAAK,SAAS,sBAAsB,CAAO,EAAO,SAAS,KAAK,IAAU,CAAC,EAAK,CAAC,CAAO,EAAiBA,MAAgB,CAAC,MAAoB,EAAa,GAAK,CAAC,EAAG,EAAE,CAAC,CAAO,EAAiBA,MAAgB,CAAC,MAAoB,EAAa,GAAM,CAAC,EAAG,EAAE,CAAC,CAAO,EAAa,GAAO,OAAO,EAAM,MAAM,QAAQ,OAAa,EAAc,GAAO,OAAO,EAAM,MAAM,SAAS,OAC1f,GAA7L,GAAK,CAAC,IAAM,EAA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