{"version":3,"file":"WorkCardImage.ogOhoucx.mjs","names":["useState","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/VxGyc41M6JyyFnRDqO2l/5L3LfPTvIOmAuPRl0Gp4/WorkCardImage.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{startTransition,useCallback,useMemo,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function WorkCardImage(props){const{imageSrc,href,description,overlayColor,overlayOpacity,textColor,fontSize}=props;const[hovered,setHovered]=useState(false);const resolvedImageSrc=useMemo(()=>typeof imageSrc===\"string\"?imageSrc:imageSrc?.src||\"\",[imageSrc]);const handleMouseEnter=useCallback(()=>{startTransition(()=>setHovered(true));},[]);const handleMouseLeave=useCallback(()=>{startTransition(()=>setHovered(false));},[]);return /*#__PURE__*/_jsxs(\"a\",{href:href||\"/\",onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:{display:\"block\",width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",textDecoration:\"none\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,backgroundImage:`url(${resolvedImageSrc})`,backgroundSize:\"cover\",backgroundPosition:\"center\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,backgroundColor:overlayColor,opacity:hovered?overlayOpacity:0,transition:\"opacity 0.18s ease\",pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"flex-end\",padding:24,opacity:hovered?1:0,transform:hovered?\"translateY(0)\":\"translateY(10px)\",transition:\"opacity 0.22s ease 0.04s, transform 0.22s cubic-bezier(0.16,1,0.3,1) 0.04s\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:\"'Cal Sans', sans-serif\",fontFeatureSettings:'\"ss03\"',fontWeight:600,color:textColor,fontSize,lineHeight:1.3},children:description})})]});}addPropertyControls(WorkCardImage,{imageSrc:{type:ControlType.Image,title:\"Image\"},href:{type:ControlType.String,title:\"Link URL\",defaultValue:\"/\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,defaultValue:\"Project description\"},overlayColor:{type:ControlType.Color,title:\"Overlay colour\",defaultValue:\"rgba(0,0,0,1)\"},overlayOpacity:{type:ControlType.Number,title:\"Overlay opacity\",min:0,max:1,step:.05,defaultValue:.72},textColor:{type:ControlType.Color,title:\"Text colour\",defaultValue:\"#ffffff\"},fontSize:{type:ControlType.Number,title:\"Font size px\",min:12,max:48,defaultValue:18}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WorkCardImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WorkCardImage.map"],"mappings":"sMAGG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,OAAK,cAAY,eAAa,iBAAe,YAAU,YAAU,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAQ,EAAiBC,MAAY,OAAO,GAAW,SAAS,EAAS,GAAU,KAAK,GAAG,CAAC,CAAQ,CAAC,EAAQ,EAAiBC,MAAgB,CAAC,MAAoB,EAAW,EAAI,CAAC,CAAE,EAAE,CAAC,CAAC,EAAQ,EAAiBA,MAAgB,CAAC,MAAoB,EAAW,EAAK,CAAC,CAAE,EAAE,CAAC,CAAC,EAAE,OAAoB,EAAM,IAAI,CAAC,KAAK,GAAM,IAAI,aAAa,EAAiB,aAAa,EAAiB,MAAM,CAAC,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,eAAe,OAAO,O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