{"version":3,"file":"ZoomImage.CcYzo-9f.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/DTYMTU6zwevemG3IfLpJ/vjkdVBRarWc09jsjQUXo/ZoomImage.js"],"sourcesContent":["// Image Zoom on Hover - Fills the frame, maintains aspect ratio, smooth cover zoom on hover, responsive, image replaceable via property controls, variants for hover interaction\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType,motion}from\"framer\";/**\n * ZoomImage\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 250\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ZoomImage(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},zoom,transitionDuration,style,link}=props;const[isHover,setIsHover]=useState(false);const content=/*#__PURE__*/_jsx(motion.img,{className:\"ZoomImage_Image\",src:image.src,alt:image.alt||\"Image\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:\"center\",userSelect:\"none\",pointerEvents:\"auto\",display:\"block\"},animate:{scale:isHover?zoom:1},transition:{type:\"spring\",stiffness:320,damping:32,duration:transitionDuration/1e3},onMouseEnter:()=>startTransition(()=>setIsHover(true)),onMouseLeave:()=>startTransition(()=>setIsHover(false)),draggable:false});return /*#__PURE__*/_jsx(motion.div,{className:\"ZoomImage_Frame\",style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:props.borderRadius,cursor:link?\"pointer\":undefined},onClick:link?e=>{e.stopPropagation();if(typeof window!==\"undefined\"){window.open(link,\"_blank\",\"noopener,noreferrer\");}}:undefined,tabIndex:link?0:undefined,role:link?\"link\":undefined,\"aria-label\":link?\"Image link\":undefined,children:link?content:content});}addPropertyControls(ZoomImage,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},zoom:{type:ControlType.Number,title:\"Zoom Scale\",defaultValue:1.1,min:1,max:2,step:.01,unit:\"x\"},transitionDuration:{type:ControlType.Number,title:\"Ease (ms)\",defaultValue:240,min:80,max:2e3,unit:\"ms\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:64,unit:\"px\"},link:{type:ControlType.Link,title:\"Link (on click)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ZoomImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"250\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ZoomImage.map"],"mappings":"yOASG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,CAAC,OAAK,qBAAmB,QAAM,QAAM,EAAW,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAO,EAAqB,EAAK,EAAO,IAAI,CAAC,UAAU,kBAAkB,IAAI,EAAM,IAAI,IAAI,EAAM,KAAK,QAAQ,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,eAAe,SAAS,WAAW,OAAO,cAAc,OAAO,QAAQ,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAQ,EAAK,EAAE,CAAC,WAAW,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,GAAG,SAAS,EAAmB,IAAI,CAAC,iBAAiBC,MAAoB,EAAW,GAAK,CAAC,CAAC,iBAAiBA,MAAoB,EAAW,GAAM,CAAC,CAAC,UAAU,GAAM,CAAC,CAAC,OAAoB,EAAK,EAAO,IAAI,CAAC,UAAU,kBAAkB,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,SAAS,WAA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