{"version":3,"file":"GhostButton.CmJ7VT6v.mjs","names":["useMemo","useCallback","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/41Wju6h7pVr4tzSFeZ2c/BpCStoSBR4rOK9zHjEBs/GhostButton.js"],"sourcesContent":["// GhostButton - Secondary CTA button with border-radius: 2px and border: 3px double #fcbb1c for Framer\n// Features: glassy background, elite blue hover, optional icon, polymorphic (button/link), responsive, accessible\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo,useCallback,startTransition,useState,useEffect}from\"react\";/**\n * GhostButton\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function GhostButton(props){const{label,iconSvg,iconPosition,href,onClick,disabled,fullWidthMobile,type,backgroundColor,textColor,hoverTextColor,font,style}=props;// Responsive sizing\nconst sizeStyles=useMemo(()=>{// If style.width/height is set, use those, else default to 145x40\nlet width=145,height=40;if(style&&style.width&&style.width!==\"auto\")width=style.width;if(style&&style.height&&style.height!==\"auto\")height=style.height;return{width,height,minWidth:width,minHeight:height,maxWidth:width,maxHeight:height,fontSize:16,padding:0};},[style]);// Icon size\nconst iconSize=20;// Button base style\nconst baseStyle={...style,position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:10,width:145,border:\"3px double #fcbb1c\",background:backgroundColor,color:textColor,borderRadius:2,fontWeight:600,boxShadow:\"0 2px 12px 0 rgba(10,34,67,0.08)\",backdropFilter:\"blur(8px)\",cursor:disabled?\"not-allowed\":\"pointer\",outline:\"none\",transition:\"all 0.18s cubic-bezier(.4,0,.2,1)\",...sizeStyles,...font,opacity:disabled?.5:1,overflow:\"hidden\",userSelect:\"none\"};// Shimmer overlay style\nconst shimmerStyle={position:\"absolute\",top:0,left:0,right:0,bottom:0,background:\"linear-gradient(90deg, transparent, rgba(255,255,255,0.6) 50%, transparent)\",transform:\"translateX(-100%)\",pointerEvents:\"none\",transition:\"transform 1s cubic-bezier(.4,0,.2,1)\",zIndex:1};// Icon rendering\nconst renderIcon=useCallback(()=>{if(!iconSvg)return null;return /*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",height:iconSize,width:iconSize,transition:\"transform 0.18s cubic-bezier(.4,0,.2,1)\"},className:\"ghostbutton-icon\",children:/*#__PURE__*/_jsx(\"span\",{dangerouslySetInnerHTML:{__html:iconSvg}})});},[iconSvg,iconSize]);// Keyboard accessibility\nconst handleKeyDown=e=>{if(disabled)return;if((e.key===\"Enter\"||e.key===\" \")&&onClick){e.preventDefault();startTransition(()=>onClick());}};// Hover/active style\nconst handleMouseOver=e=>{if(!disabled){e.currentTarget.style.background=\"rgba(255,255,255,0.9)\";e.currentTarget.style.color=hoverTextColor;e.currentTarget.style.textDecoration=\"none\";const shimmer=e.currentTarget.querySelector(\".ghostbutton-shimmer\");if(shimmer&&shimmer instanceof HTMLElement)shimmer.style.transform=\"translateX(100%)\";}};const handleMouseOut=e=>{if(!disabled){e.currentTarget.style.background=backgroundColor;e.currentTarget.style.color=textColor;e.currentTarget.style.textDecoration=\"none\";const shimmer=e.currentTarget.querySelector(\".ghostbutton-shimmer\");if(shimmer&&shimmer instanceof HTMLElement)shimmer.style.transform=\"translateX(-100%)\";}};// Click animation\nconst handleMouseDown=e=>{if(!disabled){e.currentTarget.style.transform=\"scale(0.96)\";}};const handleMouseUp=e=>{if(!disabled){e.currentTarget.style.transform=\"scale(1)\";}};// Entrance animation (fade in)\nconst[mounted,setMounted]=useState(false);useEffect(()=>{setMounted(true);},[]);// Content\nconst content=/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{className:\"ghostbutton-shimmer\",style:shimmerStyle,\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",zIndex:2,display:\"inline-flex\",alignItems:\"center\",gap:10},children:[iconPosition===\"left\"&&renderIcon(),/*#__PURE__*/_jsx(\"span\",{style:{whiteSpace:\"nowrap\"},children:label}),iconPosition===\"right\"&&renderIcon()]})]});// Render as link if href\nif(href){return /*#__PURE__*/_jsx(\"a\",{href:href,tabIndex:disabled?-1:0,\"aria-disabled\":disabled,style:{...baseStyle,opacity:mounted?baseStyle.opacity:0,transition:baseStyle.transition+\", opacity 0.5s cubic-bezier(.4,0,.2,1)\",textDecoration:\"none\"},onKeyDown:handleKeyDown,role:\"button\",rel:\"noopener noreferrer\",target:\"_self\",onMouseOver:handleMouseOver,onFocus:handleMouseOver,onMouseOut:handleMouseOut,onBlur:handleMouseOut,onMouseDown:handleMouseDown,onMouseUp:handleMouseUp,children:content});}// Render as button\nreturn /*#__PURE__*/_jsx(\"button\",{type:type,tabIndex:disabled?-1:0,\"aria-disabled\":disabled,disabled:disabled,style:{...baseStyle,opacity:mounted?baseStyle.opacity:0,transition:baseStyle.transition+\", opacity 0.5s cubic-bezier(.4,0,.2,1)\",textDecoration:\"none\"},onClick:e=>{if(!disabled&&onClick)startTransition(()=>onClick(e));},onKeyDown:handleKeyDown,onMouseOver:handleMouseOver,onFocus:handleMouseOver,onMouseOut:handleMouseOut,onBlur:handleMouseOut,onMouseDown:handleMouseDown,onMouseUp:handleMouseUp,children:content});}addPropertyControls(GhostButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"View Portfolio\"},iconSvg:{type:ControlType.String,title:\"Icon SVG\",defaultValue:\"\",placeholder:\"Paste SVG markup (optional)\",displayTextArea:true},iconPosition:{type:ControlType.Enum,title:\"Icon Position\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\"},href:{type:ControlType.String,title:\"Link (href)\",defaultValue:\"\",placeholder:\"/portfolio\"},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false},fullWidthMobile:{type:ControlType.Boolean,title:\"Full Width Mobile\",defaultValue:true,enabledTitle:\"Full\",disabledTitle:\"Auto\"},type:{type:ControlType.Enum,title:\"Button Type\",options:[\"button\",\"submit\",\"reset\"],optionTitles:[\"Button\",\"Submit\",\"Reset\"],defaultValue:\"button\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(255,255,255,0.20)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#fff\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#0a2243\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}}});export default GhostButton;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GhostButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GhostButton.map"],"mappings":"+SAOG,SAAS,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,eAAa,OAAK,UAAQ,WAAS,kBAAgB,OAAK,kBAAgB,YAAU,iBAAe,OAAK,SAAO,EAC1J,EAAWA,MAAY,CAC7B,IAAI,EAAM,IAAI,EAAO,GAAmI,OAA7H,GAAO,EAAM,OAAO,EAAM,QAAQ,SAAO,EAAM,EAAM,OAAS,GAAO,EAAM,QAAQ,EAAM,SAAS,SAAO,EAAO,EAAM,QAAa,CAAC,QAAM,SAAO,SAAS,EAAM,UAAU,EAAO,SAAS,EAAM,UAAU,EAAO,SAAS,GAAG,QAAQ,EAAE,EAAG,CAAC,EAAM,CAAC,CAEvQ,EAAU,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,IAAI,GAAG,MAAM,IAAI,OAAO,qBAAqB,WAAW,EAAgB,MAAM,EAAU,aAAa,EAAE,WAAW,IAAI,UAAU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