{"version":3,"file":"Gradient_border_follow.D3xAVNon.mjs","names":["useRef","useCallback","__esmMin","ne","p","c","init_jsx_runtime","init_npm_react_18_3_1","de","withGradientBorder","wrapperRef","gradientRef","isHovered","r","BORDER_RADIUS","handleMouseMove","rect","x","y","handleMouseEnter","handleMouseLeave","BORDER_WIDTH","STATIC_BORDER_COLOR","Component","props","init_Gradient_border_follow"],"sources":["https:/framerusercontent.com/modules/7Y8x8GN7ORzmcHlWzOVd/tp0o0M65b2qhoAgEyToh/Gradient_border_follow.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useCallback}from\"react\";// ↓ CHANGE THESE to match your card settings\nconst BORDER_RADIUS=14;const STATIC_BORDER_COLOR=\"#ffffff\";const BORDER_WIDTH=1;export function withGradientBorder(Component){return function GradientBorderWrapper(props){const wrapperRef=useRef(null);const gradientRef=useRef(null);const isHovered=useRef(false);const r=`${BORDER_RADIUS}px`;const rInner=`${BORDER_RADIUS-BORDER_WIDTH}px`;const handleMouseMove=useCallback(e=>{if(!wrapperRef.current||!gradientRef.current||!isHovered.current)return;const rect=wrapperRef.current.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;gradientRef.current.style.background=`radial-gradient(circle 240px at ${x}px ${y}px, #a29bfe, #F59E0B, #fd79a8, transparent 70%)`;},[]);const handleMouseEnter=useCallback(e=>{if(!wrapperRef.current||!gradientRef.current)return;isHovered.current=true;const rect=wrapperRef.current.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;gradientRef.current.style.background=`radial-gradient(circle 240px at ${x}px ${y}px, #a29bfe, #F59E0B, #fd79a8, transparent 70%)`;gradientRef.current.style.opacity=\"1\";},[]);const handleMouseLeave=useCallback(()=>{if(!gradientRef.current)return;isHovered.current=false;gradientRef.current.style.opacity=\"0\";},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:wrapperRef,onMouseMove:handleMouseMove,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:r,padding:`${BORDER_WIDTH}px`,background:STATIC_BORDER_COLOR},children:[/*#__PURE__*/_jsx(\"div\",{ref:gradientRef,style:{position:\"absolute\",inset:0,borderRadius:r,opacity:0,transition:\"opacity 0.25s ease\",pointerEvents:\"none\",zIndex:0}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:rInner,overflow:\"hidden\",zIndex:1,background:\"white\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withGradientBorder\":{\"type\":\"reactHoc\",\"name\":\"withGradientBorder\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient_border_follow.map"],"mappings":"A,gIACgF,SAAgBS,EAAmB,EAAU,CAAC,OAAO,SAA+B,EAAM,CAAC,IAAMC,EAAWV,EAAO,IAAI,EAAQW,EAAYX,EAAO,IAAI,EAAQY,EAAUZ,EAAO,EAAK,EAAQa,EAAE,GAAGC,EAAc,IAAyDC,EAAgBd,EAAY,GAAG,CAAC,GAAG,CAACS,EAAW,SAAS,CAACC,EAAY,SAAS,CAACC,EAAU,QAAQ,OAAO,IAAMI,EAAKN,EAAW,QAAQ,sBAAsB,EAAQO,EAAE,EAAE,QAAQD,EAAK,KAAWE,EAAE,EAAE,QAAQF,EAAK,IAAI,EAAY,QAAQ,MAAM,WAAW,mCAAmCC,EAAE,KAAKC,EAAE,gDAAiD,EAAE,CAAC,CAAC,EAAQC,EAAiBlB,EAAY,GAAG,CAAC,GAAG,CAACS,EAAW,SAAS,CAACC,EAAY,QAAQ,OAAO,EAAU,QAAQ,GAAK,IAAMK,EAAKN,EAAW,QAAQ,sBAAsB,EAAQO,EAAE,EAAE,QAAQD,EAAK,KAAWE,EAAE,EAAE,QAAQF,EAAK,IAAI,EAAY,QAAQ,MAAM,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