{"version":3,"file":"RoundedButton.BSShc6DO.mjs","names":["fonts","css","className","useState","useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/4PvKDbcRDQ8EdnpNj76Y/jyRDlsTuFXvvivv1tEEW/HgEAOXCaV.js","https:/framerusercontent.com/modules/c4mME1hcg0M7WSA6Vg6C/MhGtUQqqtFlrBfYfy9os/K8dcKAF5u.js","https:/framerusercontent.com/modules/S8EQvDu4rEEl8qbySMxp/o98cbW1UUQaRiAc6nuz7/RoundedButton.js"],"sourcesContent":["// Generated by Framer (8ebf084)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOM;TRIAL Englisch Black\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"TRIAL Englisch Black\",source:\"custom\",url:\"https://framerusercontent.com/assets/nK14syjOWDGMYwuW1PgIEv3ueQ.woff2\"}]}];export const css=['.framer-Op8WG .framer-styles-preset-1qzr86o:not(.rich-text-wrapper), .framer-Op8WG .framer-styles-preset-1qzr86o.rich-text-wrapper h1 { --framer-font-family: \"TRIAL Englisch Black\", \"TRIAL Englisch Black Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 64px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: 0em; --framer-line-height: 77px; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: var(--token-fb456363-2677-4f6f-926d-fde37cb0205f, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-Op8WG\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (f1945a5)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOM;TRIAL Englisch Black\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"TRIAL Englisch Black\",source:\"custom\",url:\"https://framerusercontent.com/assets/nK14syjOWDGMYwuW1PgIEv3ueQ.woff2\"}]}];export const css=['.framer-asOWo .framer-styles-preset-sdgv5c:not(.rich-text-wrapper), .framer-asOWo .framer-styles-preset-sdgv5c.rich-text-wrapper h3 { --framer-font-family: \"TRIAL Englisch Black\", \"TRIAL Englisch Black Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 40px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: 0em; --framer-line-height: 48px; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-asOWo\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Button with all states and a white light following the cursor on hover, with improved responsiveness and subtle pressed state\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useState,useCallback,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Button States Demo (Improved)\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 56\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function RoundedButton(props){const{label,font,style,link,height=56}=props;const[isHovered,setHovered]=useState(false);const[isActive,setActive]=useState(false);const[focus,setFocus]=useState(false);const[light,setLight]=useState({x:0,y:0});const btnRef=useRef(null);// Instantly update light position for responsive effect (no lag)\nconst handleMouseMove=useCallback(e=>{if(!btnRef.current)return;const rect=btnRef.current.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;setLight({x,y});},[]);// Remove active state on mouse up anywhere (immediate)\nuseEffect(()=>{const up=()=>setActive(false);if(isActive)window.addEventListener(\"mouseup\",up);return()=>window.removeEventListener(\"mouseup\",up);},[isActive]);// Remove active state and hover on mouse leave\nconst handleMouseLeave=useCallback(()=>{setHovered(false);setActive(false);},[]);const content=/*#__PURE__*/_jsxs(\"button\",{ref:btnRef,style:{...style,width:\"100%\",height:height,paddingLeft:20,paddingRight:20,border:\"none\",outline:\"none\",borderRadius:\"2.5rem\",background:\"linear-gradient(271deg, #F83555 6.96%, #FFCF82 84.03%)\",boxShadow:\"-10px -4px 6px 0px rgba(249, 71, 90, 0.30) inset, 0px -12px 12px 0px rgba(248, 58, 86, 0.20) inset, -10px 8px 15px 0px rgba(250, 153, 84, 0.52) inset\",color:\"#fff\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"0 20px\",...font,fontWeight:font?.variant?undefined:600,fontSize:font?.fontSize||18,letterSpacing:font?.letterSpacing||\"-0.01em\",lineHeight:font?.lineHeight||\"1em\",userSelect:\"none\",position:\"relative\",transition:\"box-shadow 0.15s, filter 0.15s, background 0.15s, border 0.15s\",overflow:\"hidden\"},\"aria-label\":label,type:\"button\",tabIndex:0,onMouseEnter:()=>setHovered(true),onMouseLeave:handleMouseLeave,onMouseDown:()=>setActive(true),onFocus:()=>setFocus(true),onBlur:()=>setFocus(false),onMouseMove:isHovered?handleMouseMove:undefined,children:[isHovered&&/*#__PURE__*/_jsx(\"span\",{style:{pointerEvents:\"none\",position:\"absolute\",left:light.x-60,top:light.y-60,width:120,height:120,borderRadius:\"50%\",background:\"radial-gradient(circle, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.02) 80%, transparent 100%)\",filter:\"blur(2px)\",zIndex:1,transition:\"left 0s, top 0s\"}}),isActive&&/*#__PURE__*/_jsx(\"span\",{style:{pointerEvents:\"none\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",borderRadius:\"2.5rem\",boxSizing:\"border-box\",border:\"2px solid rgba(0,0,0,0.20)\",zIndex:2}}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:3},children:label})]});if(link){return /*#__PURE__*/_jsx(\"a\",{href:link,style:{display:\"inline-block\",width:\"100%\",height:\"100%\",textDecoration:\"none\"},children:content});}return content;}addPropertyControls(RoundedButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Button\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"\"},height:{type:ControlType.Number,title:\"Height\",defaultValue:56,min:32,max:120,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:18,variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RoundedButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"56\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RoundedButton.map"],"mappings":"6OAC8B,GAAU,UAAU,CAAC,8BAA8B,CAAC,CAAcA,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,uBAAuB,OAAO,SAAS,IAAI,wEAAwE,CAAC,CAAC,CAAC,CAAcC,EAAI,CAAC,iuBAAiuB,CAAcC,EAAU,qCCA9+B,GAAU,UAAU,CAAC,8BAA8B,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,uBAAuB,OAAO,SAAS,IAAI,wEAAwE,CAAC,CAAC,CAAC,CAAc,EAAI,CAAC,6qBAA6q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