{"version":3,"file":"PulseButton.CF0ihQ0I.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ARp7WOLvQTMi07t868ID/uVqMSTAgdL8XkeNn2qK6/PulseButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * Pulse Button\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 50\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function PulseButton(props){const{text=\"Click Me\",font,textColor=\"#FFFFFF\",backgroundColor=\"#0099FF\",pulseColor=\"#0099FF\",borderRadius=\"50px\",padding=\"12px 24px 12px 24px\",onTap,glow=true,pulseIntensity=1.5,variant=\"Ripple\",style,className,link,openInNewTab=true}=props;const isRipple=variant===\"Ripple\";const isScale=variant===\"Scale\";const isShadow=variant===\"Shadow\";// --- Ripple timing (matches your previous behavior) ---\n// Previously: new ring every 600ms, each ring animates for 2s\nconst rippleDuration=2;const rippleInterval=.6;const ringCount=Math.max(1,Math.ceil(rippleDuration/rippleInterval))// usually 4\n;const ripplePeriod=ringCount*rippleInterval// e.g. 2.4s\n;const rippleRepeatDelay=Math.max(0,ripplePeriod-rippleDuration)// e.g. 0.4s\n;const scaleValue=1+(pulseIntensity-1)*.1;const animationProps=isScale?{scale:[1,scaleValue,1],transition:{duration:2,repeat:Infinity,ease:\"easeInOut\"}}:isShadow?{boxShadow:[`0 0 0px ${pulseColor}`,`0 0 ${10*pulseIntensity}px ${pulseColor}`,`0 0 0px ${pulseColor}`],transition:{duration:2,repeat:Infinity,ease:\"easeInOut\"}}:undefined;const hoverProps=isScale?{scale:scaleValue+.05,filter:\"brightness(1.1)\",boxShadow:`0 0 25px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}}:isShadow?{scale:1.02,y:-1,filter:\"brightness(1.1)\",boxShadow:`0 0 30px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}}:{scale:1.05,filter:\"brightness(1.1)\",boxShadow:`0 0 25px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}};const tapProps=isScale?{scale:.95,filter:\"brightness(0.9)\",boxShadow:`0 0 10px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}}:isShadow?{scale:.98,y:0,filter:\"brightness(0.95)\",boxShadow:`0 0 15px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}}:{scale:.95,filter:\"brightness(0.9)\",boxShadow:`0 0 10px ${pulseColor}`,transition:{type:\"spring\",stiffness:400,damping:25}};const handleTap=event=>{if(onTap)onTap(event);if(link&&typeof window!==\"undefined\"){window.open(link,openInNewTab?\"_blank\":\"_self\");}};return /*#__PURE__*/_jsxs(\"div\",{className:className,style:{...style,width:\"100%\",height:\"auto\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",position:\"relative\"},children:[isRipple&&Array.from({length:ringCount}).map((_,i)=>/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",inset:0,borderRadius:borderRadius,backgroundColor:pulseColor,zIndex:0,pointerEvents:\"none\",willChange:\"transform, opacity\",transformOrigin:\"center center\",backfaceVisibility:\"hidden\",WebkitBackfaceVisibility:\"hidden\"},transformTemplate:(latest,generated)=>`translateZ(0px) ${generated}`,initial:{scale:1,opacity:.35},animate:{scale:pulseIntensity,opacity:0},transition:{duration:rippleDuration,ease:\"easeOut\",repeat:Infinity,repeatDelay:rippleRepeatDelay,delay:i*rippleInterval}},i)),/*#__PURE__*/_jsx(motion.button,{onTap:handleTap,whileHover:hoverProps,whileTap:tapProps,animate:animationProps,transition:{type:\"spring\",stiffness:220,damping:22},style:{position:\"relative\",zIndex:1,background:backgroundColor,color:textColor,border:\"none\",borderRadius:borderRadius,padding:padding,cursor:\"pointer\",width:\"100%\",height:\"auto\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:glow&&!isShadow?`0 0 20px ${pulseColor}`:\"none\",...font},children:text})]});}addPropertyControls(PulseButton,{variant:{type:ControlType.Enum,title:\"Variant\",options:[\"Ripple\",\"Scale\",\"Shadow\"],defaultValue:\"Ripple\"},text:{type:ControlType.String,title:\"Label\",defaultValue:\"Click Me\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#0099FF\"},pulseColor:{type:ControlType.Color,title:\"Pulse Color\",defaultValue:\"#0099FF\"},pulseIntensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:1.5,min:1.1,max:3,step:.1,displayStepper:true},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"50px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"12px 24px 12px 24px\"},glow:{type:ControlType.Boolean,title:\"Glow\",defaultValue:true},onTap:{type:ControlType.EventHandler},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",description:\"Built by Matthias \\xd6lschlegel 💪\\n[Explore more components](https://tinyurl.com/yb2f5tkz)\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PulseButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"160\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"50\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PulseButton.map"],"mappings":"kOAQG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,WAAW,OAAK,YAAU,UAAU,kBAAgB,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