{"version":3,"file":"Transaction_Animation.BlDGNf_M.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/SE9Q3Iq4L86q0zo7sm2B/JX0lHQsv5s7mQcVnGOfZ/Transaction_Animation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function TransactionList(props){const{maxWidth,borderRadius,shadowOpacity,staggerDelay,categorizeDelay,loopAnimation}=props;const[visibleRows,setVisibleRows]=useState([]);const[processedRows,setProcessedRows]=useState([]);const[animKey,setAnimKey]=useState(0);// --- LOGIQUE RESPONSIVE ---\nconst containerRef=useRef(null);const[isCompact,setIsCompact]=useState(false);useEffect(()=>{if(!containerRef.current)return;const observer=new ResizeObserver(entries=>{const width=entries[0].contentRect.width;setIsCompact(width<360);});observer.observe(containerRef.current);return()=>observer.disconnect();},[]);const transactions=[{id:1,name:\"Slack\",time:\"30min\",amount:\"- 25 €\",category:{label:\"Logiciels\",color:\"#e0f2fe\",textColor:\"#0369a1\",icon:\"💻\"}},{id:2,name:\"Airbnb\",time:\"Hier\",amount:\"- 200 €\",category:{label:\"Hotel\",color:\"#e0f2fe\",textColor:\"#0369a1\",icon:\"🏨\"}},{id:3,name:\"DGFIP\",time:\"Hier\",amount:\"- 6 913 €\",category:{label:\"Imp\\xf4ts\",color:\"#e0f2fe\",textColor:\"#0369a1\",icon:\"🏛️\"}},{id:4,name:\"Stripe\",time:\"Hier\",amount:\"15 000 €\",category:{label:\"Revenu\",color:\"#e0f2fe\",textColor:\"#0369a1\",icon:\"💰\"},isPositive:true}];useEffect(()=>{let timeouts=[];const runSequence=()=>{setVisibleRows([]);setProcessedRows([]);transactions.forEach((_,i)=>{let t=setTimeout(()=>{setVisibleRows(prev=>[...prev,i]);let t2=setTimeout(()=>{setProcessedRows(prev=>[...prev,i]);},categorizeDelay*1e3);timeouts.push(t2);},i*staggerDelay*1e3);timeouts.push(t);});if(loopAnimation){let tLoop=setTimeout(()=>{setAnimKey(prev=>prev+1);},(transactions.length*staggerDelay+categorizeDelay+3)*1e3);timeouts.push(tLoop);}};runSequence();return()=>timeouts.forEach(clearTimeout);},[animKey,staggerDelay,categorizeDelay,loopAnimation]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...containerStyle,...props.style},children:/*#__PURE__*/_jsx(motion.div,{style:{...cardStyle,maxWidth:maxWidth,borderRadius:borderRadius,boxShadow:`0 20px 50px -12px rgba(0,0,0,${shadowOpacity})`},children:transactions.map((tx,index)=>/*#__PURE__*/_jsx(TransactionRow,{tx:tx,isVisible:visibleRows.includes(index),isCategorized:processedRows.includes(index),isLast:index===transactions.length-1,isCompact:isCompact},`${tx.id}-${animKey}`))})});}function TransactionRow({tx,isVisible,isCategorized,isLast,isCompact}){const dynamicGrid=isCompact?\"1fr auto 80px\":\"70px 1fr auto 90px\";const dynamicGap=isCompact?\"8px\":\"12px\";const dynamicPadding=isCompact?\"10px 12px\":\"10px 16px\";return /*#__PURE__*/_jsxs(\"div\",{style:rowWrapperStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:{minHeight:\"52px\",display:\"flex\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(AnimatePresence,{children:isVisible&&/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},style:{...rowContentStyle,gridTemplateColumns:dynamicGrid,gap:dynamicGap,padding:dynamicPadding},transition:{duration:.4,ease:\"easeOut\"},children:[!isCompact&&/*#__PURE__*/_jsx(\"div\",{style:timeStyle,children:tx.time}),/*#__PURE__*/_jsx(\"div\",{style:nameStyle,children:tx.name}),/*#__PURE__*/_jsx(\"div\",{style:{...badgeContainerStyle,minWidth:isCompact?\"110px\":\"120px\"},children:/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",children:!isCategorized?/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.1},style:categorizingBadgeStyle,children:[/*#__PURE__*/_jsxs(motion.div,{animate:{opacity:[.4,1,.4]},transition:{repeat:Infinity,duration:1.5},style:{display:\"flex\",alignItems:\"center\",gap:6},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:13,fontWeight:500},children:\"Cat\\xe9gorisation\"}),/*#__PURE__*/_jsx(SparkleIcon,{})]}),/*#__PURE__*/_jsx(motion.div,{style:shimmerStyle,animate:{x:[\"-100%\",\"200%\"]},transition:{repeat:Infinity,duration:2,ease:\"linear\"}})]},\"categorizing\"):/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,y:5,filter:\"blur(4px)\"},animate:{opacity:1,y:0,filter:\"blur(0px)\"},style:{...finalBadgeStyle,backgroundColor:tx.category.color,color:tx.category.textColor},children:[/*#__PURE__*/_jsx(\"span\",{style:{marginRight:6,fontSize:12},children:tx.category.icon}),/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:500,fontSize:13},children:tx.category.label})]},\"final\")})}),/*#__PURE__*/_jsx(\"div\",{style:{...amountStyle,fontSize:isCompact?\"15px\":\"16px\",color:tx.isPositive?\"#10b981\":\"#0f172a\"},children:tx.amount})]})})}),!isLast&&/*#__PURE__*/_jsx(\"div\",{style:dividerStyle})]});}const SparkleIcon=()=>/*#__PURE__*/_jsxs(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"#2563eb\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"m12 3 1.912 4.912L19 10l-4.912 1.912L12 17l-1.912-4.912L5 10l4.912-1.912L12 3Z\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M5 3v4\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M3 5h4\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M21 17v4\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M19 19h4\"})]});addPropertyControls(TransactionList,{maxWidth:{type:ControlType.Number,title:\"Largeur Max\",defaultValue:600,min:300,max:1e3},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:50},shadowOpacity:{type:ControlType.Number,title:\"Ombre\",defaultValue:.08,min:0,max:.5,step:.01},staggerDelay:{type:ControlType.Number,title:\"D\\xe9lai Apparition\",defaultValue:.4,min:.1,max:2,step:.1},categorizeDelay:{type:ControlType.Number,title:\"D\\xe9lai Cat\\xe9gorie\",defaultValue:1.2,min:.5,max:5,step:.1},loopAnimation:{type:ControlType.Boolean,title:\"Boucle\",defaultValue:true}});const containerStyle={width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"transparent\",padding:\"40px 20px\"};const cardStyle={width:\"100%\",minHeight:\"211px\",backgroundColor:\"white\",border:\"1px solid rgba(15, 23, 42, 0.1)\",overflow:\"hidden\",padding:\"0\"};const rowWrapperStyle={width:\"100%\",position:\"relative\"};const rowContentStyle={display:\"grid\",alignItems:\"center\",width:\"100%\"};const dividerStyle={height:\"1px\",backgroundColor:\"#e2e8f0\",margin:\"0\"};const timeStyle={fontSize:\"14px\",color:\"#94a3b8\",fontWeight:\"500\",whiteSpace:\"nowrap\"};const nameStyle={fontSize:\"16px\",fontWeight:\"500\",color:\"#0f172a\",whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"};const badgeContainerStyle={display:\"flex\",justifyContent:\"flex-end\"};const categorizingBadgeStyle={padding:\"6px 10px\",borderRadius:\"6px\",border:\"1px solid #dbeafe\",backgroundColor:\"white\",color:\"#2563eb\",position:\"relative\",overflow:\"hidden\",display:\"flex\",alignItems:\"center\",gap:6,whiteSpace:\"nowrap\"};const finalBadgeStyle={padding:\"6px 10px\",borderRadius:\"6px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"auto\",whiteSpace:\"nowrap\"};const amountStyle={fontWeight:\"500\",textAlign:\"right\",fontVariantNumeric:\"tabular-nums\",whiteSpace:\"nowrap\"};const shimmerStyle={position:\"absolute\",top:0,left:0,width:\"50%\",height:\"100%\",background:\"linear-gradient(90deg, transparent, rgba(37,99,235,0.05), transparent)\",skewX:\"-20deg\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TransactionList\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Transaction_Animation.map"],"mappings":"yPAGG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,WAAS,eAAa,gBAAc,eAAa,kBAAgB,iBAAe,EAAW,CAAC,EAAY,GAAgBA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAc,GAAkBA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAQ,GAAYA,EAAS,EAAE,CAC/Q,EAAaC,EAAO,KAAK,CAAM,CAAC,EAAU,GAAcD,EAAS,GAAM,CAAC,MAAc,CAAC,GAAG,CAAC,EAAa,QAAQ,OAAO,IAAM,EAAS,IAAI,eAAe,GAAS,CAAC,IAAM,EAAM,EAAQ,GAAG,YAAY,MAAM,EAAa,EAAM,IAAI,EAAG,CAAwC,OAAvC,EAAS,QAAQ,EAAa,QAAQ,KAAW,EAAS,YAAY,EAAG,EAAE,CAAC,CAAC,IAAM,EAAa,CAAC,CAAC,GAAG,EAAE,KAAK,QAAQ,KAAK,QAAQ,OAAO,SAAS,SAAS,CAAC,MAAM,YAAY,MAAM,UAAU,UAAU,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,SAAS,KAAK,OAAO,OAAO,UAAU,SAAS,CAAC,MAAM,QAAQ,MAAM,UAAU,UAAU,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,GAA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