{"version":3,"file":"ProjectPairHover.BVpSYNEF.mjs","names":["useState","useRef","startTransition","c"],"sources":["https:/framerusercontent.com/modules/C69hV3cFJyJybpEIbBID/vSfO4a8XRSfJmiVc0DB3/ProjectPairHover.js"],"sourcesContent":["// User request: Two project containers side by side. On hover, the hovered container grows\n// and the other shrinks slightly. Clicking a container opens that project's page.\n// Grey placeholder used for the image area until real images/Spline are added.\n// imageUrl1/imageUrl2 (plain text URLs) let images be set from XML as well as the image picker.\n// The \"VIEW SERVICE →\" text link was replaced by an expand-arrow button in the top right corner of each card.\n// The button is built in (CornerArrow below) so this file has no cross-file import.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Round arrow button: white circle with an up-right arrow. When open, the pill expands to the left,\n// the arrow turns to point right and the label shows in white.\nfunction CornerArrow({label,open,pillColor}){const circle=44;const inset=3;const padL=18;const padR=14;const fontSize=13;const[textWidth,setTextWidth]=useState(0);const measureRef=useRef(null);useEffect(()=>{if(typeof window===\"undefined\"||!measureRef.current)return;const measure=()=>{if(measureRef.current)setTextWidth(measureRef.current.getBoundingClientRect().width);};measure();if(document.fonts&&document.fonts.ready)document.fonts.ready.then(measure);},[label]);const ease=\"0.5s cubic-bezier(0.22, 1, 0.36, 1)\";const iconSize=Math.round(circle*.58);return /*#__PURE__*/_jsxs(\"span\",{\"aria-hidden\":\"true\",style:{position:\"relative\",boxSizing:\"content-box\",display:\"inline-flex\",flexDirection:\"row-reverse\",alignItems:\"center\",width:circle+(open?textWidth+padL+padR:0),height:circle,padding:inset,borderRadius:999,background:open?pillColor:\"transparent\",overflow:\"hidden\",transition:`width ${ease}, background-color ${ease}`},children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:\"none\",width:circle,height:circle,borderRadius:\"50%\",background:\"#FFFFFF\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:open?\"none\":\"0 2px 10px rgba(0,0,0,0.18)\",transition:`box-shadow ${ease}`},children:/*#__PURE__*/_jsxs(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"#000000\",strokeWidth:2.6,strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{overflow:\"visible\",transform:open?\"rotate(0deg)\":\"rotate(-45deg)\",transition:`transform ${ease}`},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M2 12h20\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M13 3l9 9-9 9\"})]})}),/*#__PURE__*/_jsx(\"span\",{style:{flex:\"none\",paddingLeft:padL,paddingRight:padR,opacity:open?1:0,transform:open?\"translateX(0)\":\"translateX(12px)\",transition:`opacity ${ease}, transform ${ease}`,whiteSpace:\"nowrap\",fontFamily:\"Inter, sans-serif\",fontWeight:800,fontSize,letterSpacing:\"-0.01em\",textTransform:\"uppercase\",color:\"#FFFFFF\"},children:label}),/*#__PURE__*/_jsx(\"span\",{ref:measureRef,style:{position:\"absolute\",visibility:\"hidden\",pointerEvents:\"none\",whiteSpace:\"nowrap\",fontFamily:\"Inter, sans-serif\",fontWeight:800,fontSize,letterSpacing:\"-0.01em\",textTransform:\"uppercase\"},children:label})]});}/**\n * Project Pair Hover\n *\n * @framerIntrinsicWidth 1100\n * @framerIntrinsicHeight 460\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ProjectPairHover(props){const{gap,radius,growRatio,stackBelow,placeholderColor,cardColor,titleColor,textColor,accentColor,ctaLabel}=props;const ref=useRef(null);const[hovered,setHovered]=useState(null);const[stacked,setStacked]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||!ref.current)return;const el=ref.current;const update=()=>{const w=el.getBoundingClientRect().width;startTransition(()=>setStacked(w<stackBelow));};update();const ro=new ResizeObserver(update);ro.observe(el);return()=>ro.disconnect();},[stackBelow]);const cards=[{title:props.title1,location:props.location1,tag:props.tag1,link:props.link1,imageSrc:props.image1?.src||props.imageUrl1},{title:props.title2,location:props.location2,tag:props.tag2,link:props.link2,imageSrc:props.image2?.src||props.imageUrl2}];const flexFor=i=>{if(stacked||hovered===null)return 1;return hovered===i?growRatio:1;};const fixedHeight=props.style&&props.style.height===\"100%\";return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:stacked?\"column\":\"row\",gap,width:\"100%\",height:stacked||!fixedHeight?\"auto\":\"100%\",minHeight:stacked?undefined:360},onMouseLeave:()=>startTransition(()=>setHovered(null)),children:cards.map((c,i)=>/*#__PURE__*/_jsxs(\"a\",{href:c.link||undefined,\"aria-label\":`View project: ${c.title}`,onMouseEnter:()=>startTransition(()=>setHovered(i)),style:{flex:`${flexFor(i)} 1 0%`,minWidth:0,display:\"flex\",flexDirection:\"column\",borderRadius:radius,overflow:\"hidden\",background:cardColor,textDecoration:\"none\",cursor:\"pointer\",transition:\"flex 0.5s cubic-bezier(0.22, 1, 0.36, 1)\",height:stacked?340:\"auto\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:\"1 1 auto\",minHeight:180,background:placeholderColor,backgroundImage:c.imageSrc?`url(${c.imageSrc})`:undefined,backgroundSize:\"cover\",backgroundPosition:\"center\"},children:[c.tag?/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:16,left:16,padding:\"6px 12px\",borderRadius:100,background:\"rgba(255,255,255,0.95)\",color:titleColor,fontFamily:\"Inter, sans-serif\",fontWeight:600,fontSize:12,letterSpacing:\"0.02em\"},children:c.tag}):null,/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:16,right:16},children:/*#__PURE__*/_jsx(CornerArrow,{label:ctaLabel,open:hovered===i,pillColor:accentColor})})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"flex-end\",justifyContent:\"space-between\",gap:16,padding:28},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:4,minWidth:0},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"Inter, sans-serif\",fontWeight:600,fontSize:22,lineHeight:1.3,letterSpacing:\"-0.01em\",color:titleColor},children:c.title}),/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"Inter, sans-serif\",fontSize:15,lineHeight:1.4,color:textColor},children:c.location})]})})]},i))});}addPropertyControls(ProjectPairHover,{title1:{type:ControlType.String,title:\"Project 1\",defaultValue:\"Bajaj Tempo Ltd\"},location1:{type:ControlType.String,title:\"Location 1\",defaultValue:\"Akurdi, Pune\"},tag1:{type:ControlType.String,title:\"Tag 1\",defaultValue:\"Industrial\"},link1:{type:ControlType.Link,title:\"Link 1\"},image1:{type:ControlType.ResponsiveImage,title:\"Image 1\"},imageUrl1:{type:ControlType.String,title:\"Image 1 URL\",defaultValue:\"\"},title2:{type:ControlType.String,title:\"Project 2\",defaultValue:\"Exide Industries Ltd\"},location2:{type:ControlType.String,title:\"Location 2\",defaultValue:\"Chinchwad, Pune\"},tag2:{type:ControlType.String,title:\"Tag 2\",defaultValue:\"Industrial\"},link2:{type:ControlType.Link,title:\"Link 2\"},image2:{type:ControlType.ResponsiveImage,title:\"Image 2\"},imageUrl2:{type:ControlType.String,title:\"Image 2 URL\",defaultValue:\"\"},ctaLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"View Project\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:24,min:0,max:80,unit:\"px\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:40,unit:\"px\"},growRatio:{type:ControlType.Number,title:\"Hover Grow\",defaultValue:1.5,min:1,max:3,step:.1},stackBelow:{type:ControlType.Number,title:\"Stack Below\",defaultValue:600,min:300,max:1e3,unit:\"px\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder\",defaultValue:\"rgba(17, 24, 34, 0.1)\"},cardColor:{type:ControlType.Color,title:\"Card\",defaultValue:\"rgb(244, 246, 248)\"},titleColor:{type:ControlType.Color,title:\"Title\",defaultValue:\"rgb(17, 24, 34)\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgb(105, 114, 126)\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"rgb(237, 108, 42)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectPairHover\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1100\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"460\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectPairHover.map"],"mappings":"oNAQA,SAAS,EAAY,CAAC,QAAM,OAAK,aAAW,CAAC,GAAiF,CAAC,EAAU,GAAcA,EAAS,CAAC,EAAQ,EAAWC,EAAO,IAAI,EAAE,MAAc,CAAC,GAAU,IAAS,QAAa,CAAC,EAAW,QAAQ,OAAO,IAAM,MAAY,CAAI,EAAW,SAAQ,EAAa,EAAW,QAAQ,sBAAsB,CAAC,CAAC,KAAK,CAAE,EAAE,EAAQ,EAAK,SAAS,OAAO,SAAS,MAAM,OAAM,SAAS,MAAM,MAAM,KAAK,CAAO,CAAE,EAAE,CAAC,CAAK,CAAC,EAAE,IAAM,EAAK,sCAA4E,OAAoB,EAAM,OAAO,CAAC,cAAc,OAAO,MAAM,CAAC,SAAS,WAAW,UAAU,cAAc,QAAQ,cAAc,cAAc,cAAc,WAAW,SAAS,MAAM,IAAQ,EAAK,EAAU,GAAK,GAAK,GAAG,OAAO,GAAO,QAAQ,EAAM,aAAa,IAAI,WAAW,EAAK,EAAU,cAAc,SAAS,SAAS,WAAW,SAAS,EAAK,qBAAqB,GAAM,EAAE,SAAS,CAAc,EAAK,OAAO,CAAC,MAAM,CAAC,KAAK,OAAO,MAAM,GAAO,OAAO,GAAO,aAAa,MAAM,WAAW,UAAU,QAAQ,OAAO,WAAW,SA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