{"version":3,"file":"FitTextPro.CPtocxX5.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/kZYwtT2gqsLDVFCrqV6m/yoWGdfKDzFUQXi2cwrOR/FitTextPro.js"],"sourcesContent":["// Expanding project cards component with vertical stacking, hover expansion on desktop, and always-expanded on mobile/tablet\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function FitTextPro(props){const{cards,backgroundColor,cardColor,titleColor,descriptionColor,highlightColor,highlightBackground,titleFont,descriptionFont,highlightFont,gap,borderRadius,collapsedHeight,expandedHeight}=props;const[hoveredIndex,setHoveredIndex]=useState(null);const[isMobile,setIsMobile]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const checkMobile=()=>{startTransition(()=>{setIsMobile(window.innerWidth<=1024);});};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[]);const handleCardClick=link=>{if(typeof window!==\"undefined\"&&link){window.open(link,\"_blank\");}};// Calculate extra padding needed to prevent page resize\nconst expansionBuffer=isMobile?0:expandedHeight-collapsedHeight;return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,padding:gap,paddingBottom:gap+expansionBuffer,display:\"flex\",flexDirection:\"column\",gap,overflow:\"auto\",position:\"relative\"},children:cards.map((card,index)=>{const isExpanded=isMobile||hoveredIndex===index;const currentHeight=isExpanded?expandedHeight:collapsedHeight;const cardImage=card.image||{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Default image\"};return /*#__PURE__*/_jsx(\"a\",{href:card.link,target:\"_blank\",rel:\"noopener noreferrer\",onMouseEnter:()=>!isMobile&&startTransition(()=>setHoveredIndex(index)),onMouseLeave:()=>!isMobile&&startTransition(()=>setHoveredIndex(null)),onClick:e=>{e.preventDefault();handleCardClick(card.link);},style:{display:\"flex\",flexDirection:\"row\",backgroundColor:cardColor,borderRadius,overflow:\"hidden\",height:currentHeight,minHeight:currentHeight,transition:\"height 0.3s ease, min-height 0.3s ease\",cursor:\"pointer\",textDecoration:\"none\",position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,padding:isExpanded?24:16,display:\"flex\",flexDirection:\"column\",transition:\"padding 0.3s ease\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,marginBottom:8,color:titleColor,...titleFont,overflow:\"visible\",textOverflow:\"ellipsis\",whiteSpace:isExpanded?\"normal\":\"nowrap\"},children:card.title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,marginBottom:isExpanded?40:0,color:descriptionColor,...descriptionFont,overflow:\"hidden\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",WebkitLineClamp:isExpanded?10:2,opacity:isExpanded?1:.7,transition:\"opacity 0.3s ease, margin-bottom 0.3s ease\",position:\"relative\",zIndex:2,willChange:\"opacity\"},children:card.description}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:8,marginTop:\"auto\",opacity:isExpanded?1:0,maxHeight:isExpanded?\"200px\":\"0px\",overflow:\"hidden\",transition:\"opacity 0.15s ease, max-height 0.3s ease\",position:\"relative\",zIndex:1},children:card.highlights.length>0&&card.highlights.map((highlight,hIndex)=>/*#__PURE__*/_jsx(\"span\",{style:{padding:\"6px 12px\",backgroundColor:highlightBackground,color:highlightColor,borderRadius:borderRadius/2,...highlightFont,whiteSpace:\"nowrap\"},children:highlight},hIndex))})]})},index);})});}addPropertyControls(FitTextPro,{cards:{type:ControlType.Array,title:\"Cards\",control:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Project Title\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"A brief description of this amazing project and what makes it special.\",displayTextArea:true},highlights:{type:ControlType.Array,title:\"Highlights\",control:{type:ControlType.String},defaultValue:[\"React\",\"TypeScript\",\"Design\"]},image:{type:ControlType.ResponsiveImage,title:\"Image\"},link:{type:ControlType.Link,title:\"Link\"}}},defaultValue:[{title:\"Project Alpha\",description:\"A revolutionary approach to modern web design with cutting-edge technology.\",highlights:[\"React\",\"TypeScript\",\"Framer\"],image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Project Alpha\"},link:\"https://framer.com\"},{title:\"Project Beta\",description:\"Innovative solutions for complex problems using advanced algorithms.\",highlights:[\"AI\",\"Machine Learning\",\"Python\"],image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Project Beta\"},link:\"https://framer.com\"},{title:\"Project Gamma\",description:\"Beautiful user interfaces that prioritize accessibility and performance.\",highlights:[\"UI/UX\",\"Accessibility\",\"Performance\"],image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Project Gamma\"},link:\"https://framer.com\"},{title:\"Project Delta\",description:\"Scalable architecture for enterprise-level applications.\",highlights:[\"Cloud\",\"Microservices\",\"DevOps\"],image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Project Delta\"},link:\"https://framer.com\"},{title:\"Project Epsilon\",description:\"Mobile-first design with seamless cross-platform compatibility.\",highlights:[\"Mobile\",\"Responsive\",\"PWA\"],image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Project Epsilon\"},link:\"https://framer.com\"},{title:\"Project Zeta\",description:\"Data visualization and analytics platform for business intelligence.\",highlights:[\"Data Viz\",\"Analytics\",\"D3.js\"],image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Project Zeta\"},link:\"https://framer.com\"}]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#F5F5F5\"},cardColor:{type:ControlType.Color,title:\"Card Color\",defaultValue:\"#FFFFFF\"},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#000000\"},descriptionColor:{type:ControlType.Color,title:\"Description\",defaultValue:\"#666666\"},highlightColor:{type:ControlType.Color,title:\"Highlight Text\",defaultValue:\"#000000\"},highlightBackground:{type:ControlType.Color,title:\"Highlight BG\",defaultValue:\"#EEEEEE\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"24px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1.2em\"}},descriptionFont:{type:ControlType.Font,title:\"Description Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.5em\"}},highlightFont:{type:ControlType.Font,title:\"Highlight Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"12px\",variant:\"Medium\",letterSpacing:\"0em\",lineHeight:\"1em\"}},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:48,step:4,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:32,step:2,unit:\"px\"},collapsedHeight:{type:ControlType.Number,title:\"Collapsed Height\",defaultValue:120,min:80,max:200,step:10,unit:\"px\"},expandedHeight:{type:ControlType.Number,title:\"Expanded Height\",defaultValue:216,min:200,max:500,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FitTextPro\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FitTextPro.map"],"mappings":"6MAIG,SAAwB,E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