{"version":3,"file":"ImageWithUrl.DHpORz1m.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Z4RxJvxwf2VGvRSywUyB/X0kHPD9k9VIo1Xec9RUH/ImageWithUrl.js"],"sourcesContent":["// Instructions: create a image component that can still use default Framer upload, but also have a URL field that they can add there.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ImageWithUrl(props){const{image={src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Gradient 5 - Green\"},url,alt,fit,background,borderRadius,style}=props;const trimmedUrl=(url??\"\").trim();const useUrl=trimmedUrl.length>0;const finalSrc=useUrl?trimmedUrl:image?.src;const finalSrcSet=useUrl?undefined:image?.srcSet;const finalAlt=(alt??\"\").trim().length>0?alt:useUrl?\"\":image?.alt??\"\";const isWidthFill=style?.width===\"100%\";const isHeightFill=style?.height===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",background,borderRadius,overflow:\"hidden\",...isWidthFill?null:{minWidth:1},...isHeightFill?null:{minHeight:1},...style},\"aria-label\":finalAlt||undefined,role:finalAlt?\"img\":undefined,children:finalSrc?/*#__PURE__*/_jsx(\"img\",{src:finalSrc,srcSet:finalSrcSet,alt:finalAlt,style:{width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\",borderRadius},loading:\"lazy\",decoding:\"async\",draggable:false}):null});}addPropertyControls(ImageWithUrl,{image:{type:ControlType.ResponsiveImage,title:\"Upload\"},url:{type:ControlType.String,title:\"URL (Overrides)\",defaultValue:\"\",placeholder:\"https://…\"},alt:{type:ControlType.String,title:\"Alt\",defaultValue:\"\",placeholder:\"Describe the image (optional)\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\",\"None\",\"Scale-down\"],defaultValue:\"cover\",displaySegmentedControl:true},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageWithUrl\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageWithUrl.map"],"mappings":"uJAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,qBAAqB,CAAC,MAAI,MAAI,MAAI,aAAW,eAAa,SAAO,EAAY,GAAY,GAAK,IAAI,MAAM,CAAO,EAAO,EAAW,OAAO,EAAQ,EAAS,EAAO,EAAW,GAAO,IAAU,EAAY,EAAO,IAAA,GAAU,GAAO,OAAa,GAAU,GAAK,IAAI,MAAM,CAAC,OAAO,EAAE,EAAI,EAAO,GAAG,GAAO,KAAK,GAAS,EAAY,GAAO,QAAQ,OAAa,EAAa,GAAO,SAAS,OAAO,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,aAAW,eAAa,SAAS,SAAS,GAAG,EAAY,KAAK,CAAC,SAAS,EAAE,CAAC,GAAG,EAAa,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,EAAM,CAAC,aAAa,GAAU,IAAA,GAAU,KAAK,EAAS,MAAM,IAAA,GAAU,SAAS,EAAsB,EAAK,MAAM,CAAC,IAAI,EAAS,OAAO,EAAY,IAAI,EAAS,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,EAAI,QAAQ,QAAQ,eAAa,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAA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