{"version":3,"file":"Button.DOZ3Rned.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Hw8BqtdaEeKGltArfyW6/eQC4FPAixNtXVg9FolvD/Button.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useMotionValue,useTransform,animate}from\"framer-motion\";/**\n * Instructions: make this component resizable but keep the current padding as the minimal value\n *\n * @framerIntrinsicWidth 220\n * @framerIntrinsicHeight 52\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function AnimatedButton(props){const{text,fill,textColor,shimmerColor,borderColor,font,link,openInNewTab,radius}=props;const outerPadding=4;const innerPaddingY=10;const innerPaddingX=12;const progress=useMotionValue(0);const maskImage=useTransform(progress,v=>{const pct=v*100;return`conic-gradient(white ${pct}%, transparent ${pct}%)`;});const handleHoverStart=()=>{animate(progress,1,{duration:.6,ease:\"easeInOut\"});};const handleHoverEnd=()=>{animate(progress,0,{duration:.3,ease:\"easeIn\"});};return /*#__PURE__*/_jsxs(motion.a,{href:link,target:openInNewTab?\"_blank\":undefined,rel:openInNewTab?\"noopener noreferrer\":undefined,initial:\"rest\",whileHover:\"hover\",whileTap:\"pressed\",animate:\"rest\",onHoverStart:handleHoverStart,onHoverEnd:handleHoverEnd,style:{...props.style,width:\"100%\",height:\"100%\",padding:`${outerPadding}px`,borderRadius:`${radius}px`,position:\"relative\",cursor:\"pointer\",boxSizing:\"border-box\",display:\"block\",textDecoration:\"none\",overflow:\"hidden\",minWidth:`${outerPadding*2+innerPaddingX*2+1}px`,minHeight:`${outerPadding*2+innerPaddingY*2+1}px`},children:[/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",inset:0,borderRadius:`${radius}px`,border:`2px solid ${borderColor}`,pointerEvents:\"none\",zIndex:2,boxSizing:\"border-box\",WebkitMaskImage:maskImage,maskImage:maskImage}}),/*#__PURE__*/_jsx(motion.div,{variants:{rest:{filter:\"brightness(1)\",scale:1},hover:{filter:\"brightness(1)\",scale:1},pressed:{filter:\"brightness(0.9)\",scale:.98}},transition:{duration:.15,ease:\"easeOut\"},style:{width:\"100%\",height:\"100%\",padding:`${innerPaddingY}px ${innerPaddingX}px`,borderRadius:`${radius}px`,backgroundColor:fill,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",zIndex:1,overflow:\"hidden\",boxSizing:\"border-box\"},children:/*#__PURE__*/_jsxs(\"span\",{style:{...font,color:textColor,whiteSpace:\"nowrap\",lineHeight:1,position:\"relative\"},children:[text,/*#__PURE__*/_jsx(motion.span,{style:{position:\"absolute\",inset:0,background:`linear-gradient(\n                                120deg,\n                                transparent 0%,\n                                ${shimmerColor} 50%,\n                                transparent 100%\n                            )`,backgroundSize:\"200% 100%\",WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",pointerEvents:\"none\"},variants:{rest:{opacity:0,backgroundPosition:\"200% 0%\"},hover:{opacity:[0,1,1,0],backgroundPosition:[\"200% 0%\",\"0% 0%\",\"-200% 0%\",\"-200% 0%\"]}},transition:{duration:.9,times:[0,.15,.85,1],ease:\"easeInOut\"},children:text})]})})]});}export default AnimatedButton;addPropertyControls(AnimatedButton,{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},text:{type:ControlType.String,title:\"Text\",defaultValue:\"Get started\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"https://framer.com\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},fill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#14E0A1\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},shimmerColor:{type:ControlType.Color,title:\"Shimmer\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#FFFFFF\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"52\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"220\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button.map"],"mappings":"yOAQG,SAAS,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,YAAU,eAAa,cAAY,OAAK,OAAK,eAAa,UAAQ,EAA+E,EAAS,EAAe,CAAC,EAAQ,EAAU,EAAa,EAAS,GAAG,CAAC,IAAM,EAAI,EAAE,IAAI,MAAM,wBAAwB,EAAI,iBAAiB,EAAI,GAAI,CAAC,EAA+J,OAAoB,EAAM,EAAO,EAAE,CAAC,KAAK,EAAK,OAAO,EAAa,SAAS,IAAA,GAAU,IAAI,EAAa,sBAAsB,IAAA,GAAU,QAAQ,OAAO,WAAW,QAAQ,SAAS,UAAU,QAAQ,OAAO,iBAA5U,CAAC,EAAQ,EAAS,EAAE,CAAC,SAAS,GAAG,KAAK,WAAW,CAAC,CAAE,EAAsT,eAA3R,CAAC,EAAQ,EAAS,EAAE,CAAC,SAAS,GAAG,KAAK,QAAQ,CAAC,CAAE,EAAoQ,MAAM,CAAC,GAAG,EAAM,MAAM,MAAM,OAAO,OAAO,OAAO,QAAQ,MAAoB,aAAa,GAAG,EAAO,IAAI,SAAS,WAAW,OAAO,UAAU,UAAU,aAAa,QAAQ,QAAQ,eAAe,OAAO,SAAS,SAAS,SAAS,OAAwC,UAAU,MAAuC,EAAE,SAAS,CAAc,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,aAA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