{"version":3,"file":"Card.ERTIsGps.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/sYmXXiqwmFr2xMKEWFtY/dLrfmU5UucyUyYlJQH6v/Card.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */Card.defaultProps={cardTitle:\"Title\",cardTxt:\"Add description\",name:\"Full name\",position:\"position\"};export default function Card({cardTitle,cardTxt,name,position,imageSrc}){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nconst[open,setOpen]=useState(false);const[mouseEnter,setMouseEnter]=useState(false);const[viewPortWidth,setViewPortWith]=useState(0);const chartLimit=120;const isToLong=cardTxt.length>chartLimit;useEffect(function(){setViewPortWith(window.innerWidth);},[setViewPortWith]);let trimmedText=cardTxt;if(isToLong){trimmedText=cardTxt.slice(0,chartLimit).trim()// Trim extra spaces\n;// Check if trimmed text ends with dot\nif(trimmedText.endsWith(\".\")){trimmedText=trimmedText.slice(0,-1).trim()// Remove extra dot if it ends with a dot\n;}trimmedText+=\"...\"// Add three dots\n;}let text=open?cardTxt:trimmedText;function handleOpen(){setOpen(open=>!open);}function handleMouseEnter(){setMouseEnter(true);}function handleMouseLeave(){setMouseEnter(false);}if(!open){return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:viewPortWidth<768?cardStyleMobile:cardStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:titleStyle,children:/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"Montserrat\",fontSize:\"20px\",fontWeight:\"450\",maxInlineSize:\"40ch\",color:\"black\"},children:cardTitle})}),/*#__PURE__*/_jsxs(\"div\",{style:{paddingBottom:\"10px\",minHeight:\"200px\"},children:[/*#__PURE__*/_jsx(\"p\",{style:viewPortWidth<768?standardTxtMobile:standardTxt,children:text}),!open&&isToLong&&/*#__PURE__*/_jsx(\"button\",{style:mouseEnter?buttonStyleHover:buttonStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleOpen,children:\"Read more\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:imageContainerStyle,children:[imageSrc&&/*#__PURE__*/_jsx(\"div\",{style:imageStyle,children:/*#__PURE__*/_jsx(\"img\",{style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"},src:imageSrc?.src||\"https://images.unsplash.com/photo-1542570106-c3d4aeb5c19c?q=80&w=3087&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",srcSet:imageSrc?.srcSet,alt:imageSrc?.alt})}),/*#__PURE__*/_jsxs(\"div\",{style:personDescription,children:[/*#__PURE__*/_jsx(\"div\",{style:{paddingBottom:\"5px\"},children:/*#__PURE__*/_jsx(\"h4\",{style:nameTxt,children:name})}),/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(\"p\",{style:positionTxt,children:position})})]})]})]})});}else{return /*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(\"div\",{style:containerPopupStyle,children:[open&&/*#__PURE__*/_jsx(Overlay,{handleOpen:handleOpen}),/*#__PURE__*/_jsxs(\"div\",{style:viewPortWidth<768?cardStyleOpenMobile:cardStyleOpen,children:[/*#__PURE__*/_jsx(\"button\",{style:closeButtonStyle,onClick:handleOpen,children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"div\",{style:viewPortWidth<768?titleStyleMobile:titleStyle,children:/*#__PURE__*/_jsx(\"h3\",{style:{fontFamily:\"Montserrat\",fontSize:\"20px\",fontWeight:\"bold\",paddingBottom:\"10px\"},children:cardTitle})}),/*#__PURE__*/_jsx(\"div\",{style:viewPortWidth<768?withScroll:withoutScroll,children:/*#__PURE__*/_jsx(\"p\",{style:viewPortWidth<768?standardTxtMobile:standardTxt,children:text})}),/*#__PURE__*/_jsxs(\"div\",{style:imageContainerStyle,children:[imageSrc&&/*#__PURE__*/_jsx(\"div\",{style:imageStyle,children:/*#__PURE__*/_jsx(\"img\",{style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"},src:imageSrc?.src||\"https://images.unsplash.com/photo-1542570106-c3d4aeb5c19c?q=80&w=3087&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",srcSet:imageSrc?.srcSet,alt:imageSrc?.alt})}),/*#__PURE__*/_jsxs(\"div\",{style:personDescription,children:[/*#__PURE__*/_jsx(\"div\",{style:{paddingBottom:\"5px\"},children:/*#__PURE__*/_jsx(\"h4\",{style:nameTxt,children:name})}),/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(\"p\",{style:positionTxt,children:position})})]})]})]})]}),document.body);}}function Overlay({handleOpen}){return /*#__PURE__*/_jsx(\"div\",{style:overlayStyle,onClick:handleOpen});}addPropertyControls(Card,{cardTitle:{type:ControlType.String},cardTxt:{type:ControlType.String},name:{type:ControlType.String},position:{type:ControlType.String},imageSrc:{type:ControlType.ResponsiveImage}});// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",zIndex:\"0\",framerFontFamiliy:\"Montserrat\",fontFamily:\"Montserrat\"};const containerPopupStyle={position:\"fixed\",top:\"0\",left:\"0\",height:\"100vh\",width:\"100vw\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:\"10\"};const overlayStyle={position:\"absolute\",left:\"0\",right:\"0\",width:\"100%\",height:\"100%\",backgroundColor:\"black\",opacity:\".7\",zIndex:\"3\"};const buttonStyle={display:\"flex\",justifyContent:\"flex-start\",padding:\"0px\",background:\"none\",cursor:\"pointer\",border:\"none\",borderBottom:\"1px solid #0F437A\",transition:\".3s\",color:\"#0F437A\",framerFontFamiliy:\"Montserrat\",fontFamily:\"Montserrat\",fontSize:\"18px\",fontWeight:\"400\",paddingTop:\"8px\"};const buttonStyleMobile={display:\"flex\",justifyContent:\"flex-start\",padding:\"0px\",background:\"none\",cursor:\"pointer\",border:\"none\",borderBottom:\"1px solid #0F437A\",transition:\".3s\",color:\"#0F437A\",fontSize:\"14px\",framerFontFamiliy:\"Montserrat\",fontFamily:\"Montserrat\",paddingTop:\"8px\"};const buttonStyleHover={display:\"flex\",justifyContent:\"flex-start\",padding:\"0px\",background:\"none\",cursor:\"pointer\",border:\"none\",borderBottom:\"1px solid #0F437A\",opacity:\".7\",color:\"#0F437A\",framerFontFamiliy:\"Montserrat\",fontFamily:\"Montserrat\",fontSize:\"18px\",fontWeight:\"400\",paddingTop:\"8px\"};const cardStyle={position:\"relative\",display:\"flex-column\",justifyContent:\"flex-start\",padding:\"24px\",width:\"350px\",height:\"370px\",border:\"1px solid black\",borderRadius:\"8px\",backgroundColor:\"white\",zIndex:\"10\",gap:\"28px\",color:\"black\"};const cardStyleMobile={position:\"relative\",display:\"flex-column\",padding:\"20px\",// paddingTop: \"10px\",\nwidth:\"300px\",height:\"380px\",border:\"1px solid black\",borderRadius:\"8px\",backgroundColor:\"white\",zIndex:\"7\",gap:\"28px\",color:\"black\"};const cardStyleOpen={position:\"relative\",display:\"flex-column\",padding:\"24px\",paddingRignt:\"40px\",paddingBottom:\"120px\",minHeight:\"400px\",maxHeight:\"90vh\",width:\"800px\",height:\"fit-content\",gap:\"60px\",border:\"1px solid black\",borderRadius:\"8px\",backgroundColor:\"white\",zIndex:\"10\"};const cardStyleOpenMobile={position:\"relative\",display:\"flex-column\",padding:\"20px\",paddingBottom:\"120px\",width:\"90%\",height:\"fit-content\",maxHeignt:\"80vh\",gap:\"60px\",border:\"1px solid black\",borderRadius:\"8px\",backgroundColor:\"white\",zIndex:\"7\"};const titleStyle={width:\"100%\",paddingBottom:\"20px\"};const titleStyleMobile={width:\"70%\"};const imageContainerStyle={position:\"absolute\",left:\"24px\",bottom:\"24px\",display:\"flex\",alignItems:\"center\",gap:\"20px\",width:\"100%\"};const imageStyle={width:\"58px\",height:\"58px\",borderRadius:\"50%\",overflow:\"hidden\"};const closeButtonStyle={position:\"absolute\",right:\"10px\",top:\"10px\",border:\"none\",backgroundColor:\"transparent\",cursor:\"pointer\",fontSize:\"24px\",color:\"black\"};const standardTxt={fontFamily:\"Montserrat\",fontSize:\"18px\",fontWeight:\"400\",lineHeight:\"22px\"};const standardTxtMobile={fontFamily:\"Montserrat\",fontSize:\"14px\",fontWeight:\"400\",lineHeight:\"1.3em\"};const nameTxt={fontFamily:\"Montserrat\",fontSize:\"15px\",fontWeight:\"600\",lineHeight:\"90%\"};const positionTxt={fontFamily:\"Montserrat\",fontSize:\"14px\",fontWeight:\"400\",opacity:\".7\",lineHeight:\"100%\"};const personDescription={display:\"flex-column\",justifyContent:\"center\",alignItems:\"center\",gap:\"0px\",padding:\"0px\"};const withScroll={paddingBottom:\"10px\",paddingRight:\"5px\",maxHeight:\"400px\",overflowY:\"scroll\"};const withoutScroll={paddingBottom:\"10px\",maxHeight:\"50%\",overflowY:\"auto\",paddingRight:\"5px\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Card\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Card.map"],"mappings":"+MAQwG,SAAwB,EAAK,CAAC,YAAU,UAAQ,OAAK,WAAS,YAAU,CAGhL,GAAK,CAAC,EAAK,GAASA,EAAS,EAAK,EAAO,CAAC,EAAW,GAAeA,EAAS,EAAK,EAAO,CAAC,EAAc,GAAiBA,EAAS,CAAC,EAA6B,EAAS,E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