{"version":3,"file":"HoverButton.Bfa8sr5V.mjs","names":["useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/wBDwoB2A6V2CSxnJlOlO/y0FDP1HSMTdPI8uWFWKD/HoverButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback,startTransition,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Interactive Hover Button\n *\n * Cool interactive button with hover styles, icon animation, and link behavior.\n *\n * @framerIntrinsicWidth 180\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function HoverButton(props){const{label,link,newTab,smoothScroll,iconType,iconSize,iconStrokeWidth,iconAnimationDuration,backgroundColor,hoverBackgroundColor,textColor,hoverTextColor,iconColor,hoverIconColor,borderRadius,font,paddingTop,paddingRight,paddingBottom,paddingLeft,contentGap,className,style}=props;const[isHovered,setIsHovered]=useState(false);const handleMouseEnter=useCallback(()=>{startTransition(()=>setIsHovered(true));},[]);const handleMouseLeave=useCallback(()=>{startTransition(()=>setIsHovered(false));},[]);const handleClick=useCallback(event=>{if(!smoothScroll)return;if(typeof window===\"undefined\"||typeof document===\"undefined\")return;if(!link||!link.startsWith(\"#\"))return;const targetId=link.slice(1);const targetElement=document.getElementById(targetId);if(!targetElement)return;event.preventDefault();try{targetElement.scrollIntoView({behavior:\"smooth\",block:\"start\"});}catch{// Fallback without smooth behavior\ntargetElement.scrollIntoView();}},[smoothScroll,link]);const currentBackground=isHovered?hoverBackgroundColor:backgroundColor;const currentTextColor=isHovered?hoverTextColor:textColor;const currentIconColor=isHovered?hoverIconColor:iconColor;const icon=useMemo(()=>{const commonProps={fill:\"none\",stroke:currentIconColor,strokeWidth:iconStrokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\"};switch(iconType){case\"chevronRight\":return /*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{...commonProps,d:\"M9 18l6-6-6-6\"})});case\"external\":return /*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{...commonProps,d:\"M14 3h7v7M10 14L21 3M5 5h5M5 19h14V9\"})});case\"plus\":return /*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{...commonProps,d:\"M12 5v14M5 12h14\"})});case\"star\":return /*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{...commonProps,d:\"M12 3.5l2.47 4.99 5.53.8-4 3.9.94 5.51L12 16.9l-4.94 2.8.94-5.51-4-3.9 5.53-.8L12 3.5z\"})});case\"arrowRight\":default:return /*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{...commonProps,d:\"M5 12h14M13 6l6 6-6 6\"})});}},[iconType,currentIconColor,iconSize,iconStrokeWidth]);const isFixedWidth=style&&style.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",display:\"inline-flex\",width:\"100%\",height:\"100%\",alignItems:\"center\",justifyContent:isFixedWidth?\"stretch\":\"flex-start\",overflow:\"visible\",...style||{}},children:/*#__PURE__*/_jsxs(\"a\",{href:link||\"#\",onClick:handleClick,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,className:className,style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:contentGap,width:\"100%\",height:\"100%\",padding:`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,borderRadius,backgroundColor:currentBackground,color:currentTextColor,textDecoration:\"none\",cursor:\"pointer\",transition:\"background-color 0.2s ease, color 0.2s ease, box-shadow 0.15s ease\",transform:\"translateY(0)\",boxShadow:isHovered?\"0 6px 16px rgba(0,0,0,0.12)\":\"0 2px 6px rgba(0,0,0,0.04)\",whiteSpace:\"nowrap\",minWidth:\"max-content\",...font},role:\"button\",\"aria-label\":label,children:[/*#__PURE__*/_jsx(\"span\",{children:label}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",height:\"1em\",transform:isHovered?\"translateX(0)\":\"translateX(-4px)\",transition:`transform ${iconAnimationDuration}s ease`},children:icon})]})});}addPropertyControls(HoverButton,{label:{type:ControlType.String,title:\"Text\",defaultValue:\"Get Started\",displayTextArea:false},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"#\"},newTab:{type:ControlType.Boolean,title:\"Open in New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},smoothScroll:{type:ControlType.Boolean,title:\"Smooth Scroll\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},iconType:{type:ControlType.Enum,title:\"Icon\",options:[\"arrowRight\",\"chevronRight\",\"external\",\"plus\",\"star\"],optionTitles:[\"Arrow\",\"Chevron\",\"External\",\"Plus\",\"Star\"],defaultValue:\"arrowRight\",displaySegmentedControl:false},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:18,min:8,max:48,step:1,unit:\"px\"},iconStrokeWidth:{type:ControlType.Number,title:\"Icon Weight\",defaultValue:2,min:1,max:4,step:.5},iconAnimationDuration:{type:ControlType.Number,title:\"Icon Anim (s)\",defaultValue:.35,min:.05,max:1,step:.05},backgroundColor:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFFFFF\"},hoverBackgroundColor:{type:ControlType.Color,title:\"BG Hover\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},hoverTextColor:{type:ControlType.Color,title:\"Text Hover\",defaultValue:\"#FFFFFF\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#000000\"},hoverIconColor:{type:ControlType.Color,title:\"Icon Hover\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,step:1},paddingTop:{type:ControlType.Number,title:\"Pad Top\",defaultValue:0,min:0,max:64,step:1,unit:\"px\"},paddingRight:{type:ControlType.Number,title:\"Pad Right\",defaultValue:18,min:0,max:64,step:1,unit:\"px\"},paddingBottom:{type:ControlType.Number,title:\"Pad Bottom\",defaultValue:0,min:0,max:64,step:1,unit:\"px\"},paddingLeft:{type:ControlType.Number,title:\"Pad Left\",defaultValue:18,min:0,max:64,step:1,unit:\"px\"},contentGap:{type:ControlType.Number,title:\"Text/Icon Gap\",defaultValue:8,min:0,max:40,step:1,unit:\"px\"},className:{type:ControlType.String,title:\"Class Name\",defaultValue:\"\",placeholder:\"button-primary\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HoverButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"180\",\"framerIntrinsicHeight\":\"48\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoverButton.map"],"mappings":"+MAUG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,SAAO,eAAa,WAAS,WAAS,kBAAgB,wBAAsB,kBAAgB,uBAAqB,YAAU,iBAAe,YAAU,iBAAe,eAAa,OAAK,aAAW,eAAa,gBAAc,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