{"version":3,"file":"Gradient_border_follow.CScOlkYd.mjs","names":["useRef","useCallback"],"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":"2HACgF,SAAgB,EAAmB,EAAU,CAAC,OAAO,SAA+B,EAAM,CAAC,IAAM,EAAWA,EAAO,IAAI,EAAQ,EAAYA,EAAO,IAAI,EAAQ,EAAUA,EAAO,EAAK,EAAQ,EAAE,GAAG,EAAc,IAAU,EAAO,GAAG,EAAc,EAAa,IAA+3B,OAAoB,EAAM,MAAM,CAAC,IAAI,EAAW,YAAr5BC,EAAY,GAAG,CAAC,GAAG,CAAC,EAAW,SAAS,CAAC,EAAY,SAAS,CAAC,EAAU,QAAQ,OAAO,IAAM,EAAK,EAAW,QAAQ,sBAAsB,EAAQ,EAAE,EAAE,QAAQ,EAAK,KAAW,EAAE,EAAE,QAAQ,EAAK,IAAI,EAAY,QAAQ,MAAM,WAAW,mCAAmC,EAAE,KAAK,EAAE,gDAAiD,EAAE,CAAC,CAAqmB,EAAE,aAA7kBA,EAAY,GAAG,CAAC,GAAG,CAAC,EAAW,SAAS,CAAC,EAAY,QAAQ,OAAO,EAAU,QAAQ,GAAK,IAAM,EAAK,EAAW,QAAQ,sBAAsB,EAAQ,EAAE,EAAE,QAAQ,EAAK,KAAW,EAAE,EAAE,QAAQ,EAAK,IAAI,EAAY,QAAQ,MAAM,WAAW,mCAAmC,EAAE,KAAK,EAAE,iDAAiD,EAAY,QAAQ,MAAM,QAAQ,GAAI,EAAE,CAAC,CAAsP,EAAE,aAA9NA,MAAgB,CAAK,EAAY,UAAe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