{"version":3,"file":"StepAutomatico.D2TkHx-T.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/CPoLHMxmzqG8KXxTcWEC/6ec2WdrZdpkKIBVlSJwN/StepAutomatico.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @Component AutoStepperElite_V22\n * @Description Fixed text wrapping and adaptive height logic.\n */export default function AutoStepperElite(props){const{stepsList,stepDuration,loop,activeColor,inactiveColor,lineColor,activeLineColor,backgroundColor,enableCardUI,cardBgColor,layout,cardPosition,nodeLineGap,lineWidth,// Typography\ntitleFont,titleColor,subtitleFont,subtitleColor,numberFont,numColorActive,numColorInactive,// New Layout Controls\ncardWidth,// Box\ncardPadding,cardBorderRadius,cardShadow,// FX\nglowIntensity,activeScale}=props;const[activeIndex,setActiveIndex]=useState(0);const isVertical=layout===\"vertical\";const NODE_SIZE=36;useEffect(()=>{const timer=setInterval(()=>{setActiveIndex(prev=>prev<stepsList.length-1?prev+1:loop?0:prev);},stepDuration*1e3);return()=>clearInterval(timer);},[stepDuration,stepsList.length,loop]);const boxStyles=useMemo(()=>({p:`${cardPadding?.top??20}px ${cardPadding?.right??20}px ${cardPadding?.bottom??20}px ${cardPadding?.left??20}px`,r:`${cardBorderRadius?.topLeft??20}px ${cardBorderRadius?.topRight??20}px ${cardBorderRadius?.bottomRight??20}px ${cardBorderRadius?.bottomLeft??20}px`}),[cardPadding,cardBorderRadius]);return /*#__PURE__*/_jsx(\"div\",{style:{...containerStyle,background:backgroundColor},children:/*#__PURE__*/_jsx(\"div\",{style:{...innerContainerStyle,flexDirection:isVertical?\"column\":\"row\"},children:stepsList.map((step,index)=>{const isActive=index===activeIndex;const isCompleted=index<=activeIndex;const isPrevCompleted=index<activeIndex;let currentPos=cardPosition;if(cardPosition===\"alternate\")currentPos=index%2===0?\"side-a\":\"side-b\";const posStyle=getPositionStyles(currentPos,isVertical,NODE_SIZE,cardWidth);return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:isVertical?\"column\":\"row\",alignItems:\"center\",position:\"relative\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{...axisNodeWrapper,width:NODE_SIZE,height:NODE_SIZE},children:[/*#__PURE__*/_jsxs(motion.div,{animate:{borderColor:isCompleted?activeColor:inactiveColor,scale:isActive?activeScale:1,boxShadow:isActive?`0px 0px ${glowIntensity}px ${activeColor}`:`0px 0px 0px ${activeColor}00`},style:{...nodeStyle,width:NODE_SIZE,height:NODE_SIZE},children:[/*#__PURE__*/_jsx(motion.div,{animate:{scale:isCompleted?1:0},style:{...activeNodeFill,backgroundColor:activeColor}}),/*#__PURE__*/_jsxs(\"div\",{style:{zIndex:3},children:[step.symbolType===\"number\"&&/*#__PURE__*/_jsx(\"span\",{style:{...numberLabelStyle,color:isCompleted?numColorActive:numColorInactive,...numberFont},children:index+1}),step.symbolType===\"icon\"&&step.icon&&/*#__PURE__*/_jsx(\"div\",{style:{width:18,height:18,backgroundImage:`url(${step.icon})`,backgroundSize:\"contain\",filter:isCompleted?\"brightness(0) invert(1)\":\"none\"}})]})]}),/*#__PURE__*/_jsxs(motion.div,{animate:{opacity:isCompleted?1:.4},style:{...contentCardStyle,...posStyle.card,width:cardWidth,backgroundColor:enableCardUI?cardBgColor:\"transparent\",boxShadow:enableCardUI?cardShadow:\"none\",padding:boxStyles.p,borderRadius:boxStyles.r,height:\"auto\"},children:[step.showImage&&step.image&&/*#__PURE__*/_jsx(motion.div,{animate:{height:isActive?120:0,marginBottom:isActive?12:0,opacity:isActive?1:0},style:{...imageStyle,backgroundImage:`url(${step.image})`,borderRadius:8,overflow:\"hidden\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:4},children:[/*#__PURE__*/_jsx(\"div\",{style:{...titleFont,color:titleColor,width:\"100%\",whiteSpace:\"normal\",wordWrap:\"break-word\",overflowWrap:\"anywhere\"},children:step.title}),/*#__PURE__*/_jsx(\"div\",{style:{...subtitleFont,color:subtitleColor,width:\"100%\",whiteSpace:\"normal\"},children:step.subtitle})]})]})]}),index<stepsList.length-1&&/*#__PURE__*/_jsx(\"div\",{style:{...trackStyle,width:isVertical?2:lineWidth,height:isVertical?lineWidth:2,backgroundColor:lineColor,margin:isVertical?`${nodeLineGap}px 0`:`0 ${nodeLineGap}px`},children:/*#__PURE__*/_jsx(motion.div,{animate:{width:!isVertical?isPrevCompleted?\"100%\":isActive?\"100%\":\"0%\":\"100%\",height:isVertical?isPrevCompleted?\"100%\":isActive?\"100%\":\"0%\":\"100%\"},transition:{duration:isActive?stepDuration:.3,ease:\"linear\"},style:{...trackProgressStyle,backgroundColor:activeLineColor,originX:0,originY:0}})})]},index);})})});}// --- Positioning Engine (Updated to use CardWidth) ---\nconst getPositionStyles=(pos,isVertical,size,cardWidth)=>{const isSideB=pos===\"side-b\"||pos===\"above\";if(!isVertical)return{card:{left:\"50%\",transform:\"translateX(-50%)\",[isSideB?\"bottom\":\"top\"]:size+35}};return{card:{top:\"50%\",transform:\"translateY(-50%)\",[isSideB?\"right\":\"left\"]:size+35}};};// --- Property Controls ---\naddPropertyControls(AutoStepperElite,{stepDuration:{type:ControlType.Number,title:\"Time (s)\",defaultValue:3},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true},cardWidth:{type:ControlType.Number,title:\"Card Width\",min:100,max:600,defaultValue:240},layout:{type:ControlType.Enum,title:\"Layout\",options:[\"horizontal\",\"vertical\"]},cardPosition:{type:ControlType.Enum,title:\"Card Position\",options:[\"below\",\"above\",\"alternate\"]},lineWidth:{type:ControlType.Number,title:\"Line Length\",defaultValue:100},nodeLineGap:{type:ControlType.Number,title:\"Gap\",defaultValue:15},stepsList:{type:ControlType.Array,control:{type:ControlType.Object,controls:{title:{type:ControlType.String,defaultValue:\"Your Title Here\"},subtitle:{type:ControlType.String,defaultValue:\"Your Description Here\"},symbolType:{type:ControlType.Enum,options:[\"number\",\"icon\",\"none\"]},icon:{type:ControlType.Image},showImage:{type:ControlType.Boolean},image:{type:ControlType.Image}}}},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\"},titleColor:{type:ControlType.Color,defaultValue:\"#1D1D1F\"},subtitleFont:{type:ControlType.Font,title:\"Subtitle Font\",controls:\"extended\"},subtitleColor:{type:ControlType.Color,defaultValue:\"#86868B\"},numberFont:{type:ControlType.Font,controls:\"extended\"},numColorActive:{type:ControlType.Color,defaultValue:\"#FFF\"},numColorInactive:{type:ControlType.Color,defaultValue:\"#D1D1D6\"},enableCardUI:{type:ControlType.Boolean,defaultValue:true},cardBgColor:{type:ControlType.Color,defaultValue:\"#FFF\"},cardPadding:{type:ControlType.Padding},cardBorderRadius:{type:ControlType.BorderRadius},cardShadow:{type:ControlType.Shadow},activeLineColor:{type:ControlType.Color,defaultValue:\"#007AFF\"},lineColor:{type:ControlType.Color,defaultValue:\"rgba(0,0,0,0.1)\"},activeColor:{type:ControlType.Color,defaultValue:\"#007AFF\"},inactiveColor:{type:ControlType.Color,defaultValue:\"#D1D1D6\"},backgroundColor:{type:ControlType.Color,defaultValue:\"transparent\"},glowIntensity:{type:ControlType.Number,defaultValue:30},activeScale:{type:ControlType.Number,defaultValue:1.15}});const containerStyle={width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"visible\"};const innerContainerStyle={display:\"flex\",alignItems:\"center\",position:\"relative\"};const axisNodeWrapper={position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:10};const nodeStyle={borderRadius:\"50%\",border:\"2px solid\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",backgroundColor:\"white\"};const activeNodeFill={position:\"absolute\",inset:-1,borderRadius:\"50%\"};const numberLabelStyle={fontWeight:700,fontSize:14,zIndex:3};const contentCardStyle={display:\"flex\",flexDirection:\"column\",position:\"absolute\",transition:\"all 0.5s ease\"};const imageStyle={width:\"100%\",backgroundSize:\"cover\",backgroundPosition:\"center\"};const trackStyle={position:\"relative\",overflow:\"hidden\",zIndex:1,borderRadius:4};const trackProgressStyle={position:\"absolute\",left:0,top:0,bottom:0,right:0};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoStepperElite\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StepAutomatico.map"],"mappings":"gPAGG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,YAAU,eAAa,OAAK,cAAY,gBAAc,YAAU,kBAAgB,kBAAgB,eAAa,cAAY,SAAO,eAAa,cAAY,YAClN,YAAU,aAAW,eAAa,gBAAc,aAAW,iBAAe,mBAC1E,YACA,cAAY,mBAAiB,aAC7B,gBAAc,eAAa,EAAW,CAAC,EAAY,GAAgBA,EAAS,EAAE,CAAO,EAAW,IAAS,WAA8B,MAAc,CAAC,IAAM,EAAM,gBAAgB,CAAC,EAAe,GAAM,EAAK,EAAU,OAAO,EAAE,EAAK,EAAE,EAAK,EAAE,EAAK,EAAG,EAAa,IAAI,CAAC,UAAU,cAAc,EAAM,EAAG,CAAC,EAAa,EAAU,OAAO,EAAK,CAAC,CAAC,IAAM,EAAUC,OAAa,CAAC,EAAE,GAAG,GAAa,KAAK,GAAG,KAAK,GAAa,OAAO,GAAG,KAAK,GAAa,QAAQ,GAAG,KAAK,GAAa,MAAM,GAAG,IAAI,EAAE,GAAG,GAAkB,SAAS,GAAG,KAAK,GAAkB,UAAU,GAAG,KAAK,GAAkB,aAAa,GAAG,KAAK,GAAkB,YAAY,GAAG,IAAI,EAAE,CAAC,EAAY,EAAiB,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAe,WAAW,EAAgB,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAoB,cAAc,EAAW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