{"version":3,"file":"CaseStudyStepper.efKS1afP.mjs","names":["useState","useCallback","startTransition"],"sources":["https:/framerusercontent.com/modules/foMrJaxHBia9BoHkoouJ/2mEV0vbsCF76DIASU0H7/CaseStudyStepper.js"],"sourcesContent":["// Responsive case study stepper component with scroll-based progress tracking\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useCallback,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CaseStudyStepper(props){const{steps=[{number:\"1\",label:\"Phase 1: MVP Design\",sectionId:\"phase-1\"},{number:\"2\",label:\"Phase 2: Scaling the team\",sectionId:\"phase-2\"},{number:\"3\",label:\"Phase 3: Product & Strategy\",sectionId:\"phase-3\"},{number:\"4\",label:\"Reflection\",sectionId:\"reflection\"}],activeColor,inactiveColor,lineColor,backgroundColor,numberFont,labelFont,circleSize,lineThickness,activeNumberColor,inactiveNumberColor}=props;const[activeStep,setActiveStep]=useState(0);const[isMobile,setIsMobile]=useState(false);const[isDropdownOpen,setIsDropdownOpen]=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);},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const handleScroll=()=>{const scrollPosition=window.scrollY+100;for(let i=steps.length-1;i>=0;i--){const section=document.getElementById(steps[i].sectionId);if(section&&section.offsetTop<=scrollPosition){startTransition(()=>setActiveStep(i));break;}}};window.addEventListener(\"scroll\",handleScroll);handleScroll();return()=>window.removeEventListener(\"scroll\",handleScroll);},[steps]);const handleStepClick=useCallback(index=>{const section=document.getElementById(steps[index].sectionId);if(section){const isMobileDevice=window.innerWidth<768;const headerOffset=isMobileDevice?400:isMobile?450:100;const elementPosition=section.getBoundingClientRect().top;const offsetPosition=elementPosition+window.pageYOffset-headerOffset;window.scrollTo({top:offsetPosition,behavior:\"smooth\"});}startTransition(()=>setIsDropdownOpen(false));},[steps,isMobile]);const isFixedWidth=props?.style&&props.style.width===\"100%\";if(isMobile){return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,width:\"100%\",position:\"sticky\",top:0,zIndex:1e3,display:\"flex\",flexDirection:\"column\",padding:\"16px\",backgroundColor},children:[/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",position:\"relative\",cursor:\"pointer\",border:`2px solid ${lineColor}`,borderRadius:8,padding:\"12px 16px\",backgroundColor:backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\"},onClick:()=>startTransition(()=>setIsDropdownOpen(!isDropdownOpen)),children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:circleSize*.8,height:circleSize*.8,borderRadius:\"50%\",backgroundColor:activeColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,...numberFont,fontSize:`${parseInt(numberFont.fontSize)*.8}px`,color:activeNumberColor},children:steps[activeStep].number}),/*#__PURE__*/_jsx(\"span\",{style:{...labelFont,color:activeColor},children:steps[activeStep].label})]}),/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",style:{transform:isDropdownOpen?\"rotate(180deg)\":\"rotate(0deg)\",transition:\"transform 0.3s ease\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M5 7.5L10 12.5L15 7.5\",stroke:activeColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]}),isDropdownOpen&&/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",marginTop:8,border:`2px solid ${lineColor}`,borderRadius:8,backgroundColor:backgroundColor,overflow:\"hidden\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.1)\"},children:steps.map((step,index)=>{const isActive=index===activeStep;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12,padding:\"12px 16px\",cursor:\"pointer\",backgroundColor:isActive?`${activeColor}10`:\"transparent\",borderBottom:index<steps.length-1?`1px solid ${lineColor}`:\"none\",transition:\"background-color 0.2s ease\"},onClick:()=>handleStepClick(index),onMouseEnter:e=>{if(!isActive){e.currentTarget.style.backgroundColor=`${activeColor}05`;}},onMouseLeave:e=>{if(!isActive){e.currentTarget.style.backgroundColor=\"transparent\";}},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:circleSize*.8,height:circleSize*.8,borderRadius:\"50%\",backgroundColor:isActive?activeColor:\"transparent\",border:`2px solid ${isActive?activeColor:inactiveColor}`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,...numberFont,fontSize:`${parseInt(numberFont.fontSize)*.8}px`,color:isActive?activeNumberColor:inactiveNumberColor},children:step.number}),/*#__PURE__*/_jsx(\"span\",{style:{...labelFont,color:isActive?activeColor:inactiveColor},children:step.label})]},index);})})]});}return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,width:\"100%\",position:\"sticky\",top:0,zIndex:1e3,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"16px 24px\",backgroundColor},children:steps.map((step,index)=>{const isActive=index<=activeStep;const isLast=index===steps.length-1;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",alignItems:\"center\",gap:12,cursor:\"pointer\",paddingRight:isLast?0:32},onClick:()=>handleStepClick(index),children:[/*#__PURE__*/_jsx(\"div\",{style:{width:circleSize,height:circleSize,borderRadius:\"50%\",backgroundColor:isActive?activeColor:\"transparent\",border:`2px solid ${isActive?activeColor:inactiveColor}`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"all 0.3s ease\",flexShrink:0,...numberFont,color:isActive?activeNumberColor:inactiveNumberColor},children:step.number}),/*#__PURE__*/_jsx(\"span\",{style:{transition:\"color 0.3s ease\",whiteSpace:\"nowrap\",...labelFont,color:isActive?activeColor:inactiveColor},children:step.label})]},index);})});}addPropertyControls(CaseStudyStepper,{steps:{type:ControlType.Array,title:\"Steps\",control:{type:ControlType.Object,controls:{number:{type:ControlType.String,title:\"Number\",defaultValue:\"1\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Step\"},sectionId:{type:ControlType.String,title:\"Section ID\",defaultValue:\"section-1\"}}},defaultValue:[{number:\"1\",label:\"Phase 1: MVP Design\",sectionId:\"phase-1\"},{number:\"2\",label:\"Phase 2: Scaling the team\",sectionId:\"phase-2\"},{number:\"3\",label:\"Phase 3: Product & Strategy\",sectionId:\"phase-3\"},{number:\"4\",label:\"Reflection\",sectionId:\"reflection\"}]},activeColor:{type:ControlType.Color,title:\"Active Color\",defaultValue:\"#000033\"},inactiveColor:{type:ControlType.Color,title:\"Inactive Color\",defaultValue:\"#CCCCCC\"},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#EEEEEE\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},numberFont:{type:ControlType.Font,title:\"Number Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},circleSize:{type:ControlType.Number,title:\"Circle Size\",defaultValue:40,min:24,max:64,step:2,unit:\"px\"},lineThickness:{type:ControlType.Number,title:\"Line Thickness\",defaultValue:2,min:1,max:8,step:1,unit:\"px\"},activeNumberColor:{type:ControlType.Color,title:\"Active Number Color\",defaultValue:\"#FFFFFF\"},inactiveNumberColor:{type:ControlType.Color,title:\"Inactive Number Color\",defaultValue:\"#CCCCCC\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CaseStudyStepper\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaseStudyStepper.map"],"mappings":"+MAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,CAAC,OAAO,IAAI,MAAM,sBAAsB,UAAU,UAAU,CAAC,CAAC,OAAO,IAAI,MAAM,4BAA4B,UAAU,UAAU,CAAC,CAAC,OAAO,IAAI,MAAM,8BAA8B,UAAU,UAAU,CAAC,CAAC,OAAO,IAAI,MAAM,aAAa,UAAU,aAAa,CAAC,CAAC,cAAY,gBAAc,YAAU,kBAAgB,aAAW,YAAU,aAAW,gBAAc,oBAAkB,uBAAqB,EAAW,CAAC,EAAW,GAAeA,EAAS,EAAE,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAe,GAAmBA,EAAS,GAAM,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAgB,CAAC,MAAoB,EAAY,EAAO,WAAW,KAAK,CAAC,EAA+D,OAA5D,GAAa,CAAC,EAAO,iBAAiB,SAAS,EAAY,KAAW,EAAO,oBAAoB,SAAS,EAAY,EAAG,EAAE,CAAC,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAiB,CAAC,IAAM,EAAe,EAAO,QAAQ,IAAI,IAAI,IAAI,EAAE,EAAM,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,IAAM,EAAQ,SAAS,eAAe,EAAM,GAAG,UAAU,CAAC,GAAG,GAAS,EAAQ,WAAW,EAAe,CAAC,MAAoB,EAAc,EAAE,CAAC,CAAC,SAAwE,OAA9D,EAAO,iBAAiB,SAAS,EAAa,CAAC,GAAc,KAAW,EAAO,oBAAoB,SAAS,EAAa,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