{"version":3,"file":"HoverLightFX.ASn6FonI.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/lNFj7pPtFTT0evsAUy5H/tDZYXoRZKCUnCK9iIBEs/HoverLightFX.js"],"sourcesContent":["// Spotlight Card component with mouse-following spotlight effect\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function SpotlightCard(props){const{children,spotlightColor,backgroundColor,borderColor,borderRadius,padding,spotlightSize,spotlightOpacity,transitionDuration}=props;const divRef=useRef(null);const handleMouseMove=e=>{if(!divRef.current)return;const rect=divRef.current.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;divRef.current.style.setProperty(\"--mouse-x\",`${x}px`);divRef.current.style.setProperty(\"--mouse-y\",`${y}px`);divRef.current.style.setProperty(\"--spotlight-color\",spotlightColor);divRef.current.style.setProperty(\"--spotlight-size\",`${spotlightSize}%`);divRef.current.style.setProperty(\"--spotlight-opacity\",`${spotlightOpacity}`);divRef.current.style.setProperty(\"--transition-duration\",`${transitionDuration}s`);};return /*#__PURE__*/_jsxs(\"div\",{ref:divRef,onMouseMove:handleMouseMove,style:{...props.style,position:\"relative\",borderRadius:`${borderRadius}px`,border:`1px solid ${borderColor}`,backgroundColor,padding:`${padding}px`,overflow:\"hidden\",\"--mouse-x\":\"50%\",\"--mouse-y\":\"50%\",\"--spotlight-color\":spotlightColor,\"--spotlight-size\":`${spotlightSize}%`,\"--spotlight-opacity\":`${spotlightOpacity}`,\"--transition-duration\":`${transitionDuration}s`},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .spotlight-card::before {\n                    content: '';\n                    position: absolute;\n                    top: 0;\n                    left: 0;\n                    right: 0;\n                    bottom: 0;\n                    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent var(--spotlight-size));\n                    opacity: 0;\n                    transition: opacity var(--transition-duration) ease;\n                    pointer-events: none;\n                }\n\n                .spotlight-card:hover::before,\n                .spotlight-card:focus-within::before {\n                    opacity: var(--spotlight-opacity);\n                }\n                `}),/*#__PURE__*/_jsx(\"div\",{className:\"spotlight-card\",style:{width:\"100%\",height:\"100%\"},children:children})]});}addPropertyControls(SpotlightCard,{children:{type:ControlType.Slot,title:\"Content\"},spotlightColor:{type:ControlType.Color,title:\"Spotlight Color\",defaultValue:\"rgba(0, 229, 255, 0.2)\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#111111\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#222222\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:24,min:0,max:50,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:32,min:0,max:100,unit:\"px\"},spotlightSize:{type:ControlType.Number,title:\"Spotlight Size\",defaultValue:80,min:20,max:200,unit:\"%\"},spotlightOpacity:{type:ControlType.Number,title:\"Spotlight Opacity\",defaultValue:.6,min:0,max:1,step:.1},transitionDuration:{type:ControlType.Number,title:\"Transition Duration\",defaultValue:.5,min:0,max:2,step:.1,unit:\"s\",description:\"More Components at [DiverseKit](https://framer.link/se2heI4)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SpotlightCard\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoverLightFX.map"],"mappings":"iLAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,iBAAe,kBAAgB,cAAY,eAAa,UAAQ,gBAAc,mBAAiB,sBAAoB,EAAY,EAAOA,EAAO,KAAK,CAA6jB,OAAoB,EAAM,MAAM,CAAC,IAAI,E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