{"version":3,"file":"WorkCarousel.BAjCeLDn.mjs","names":["useState","useRef","startTransition","__esmMin","te","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","init_framer_DKtAEkcX","addPropertyControls","ControlType","WorkCarousel","DEFAULT_ITEMS","props","light","theme","list","items","n","cur","setCur","startIndex","rootRef","w","setW","el","ro","nw","entries","compact","go","i","active","textColor","CSS","o","a","tf","item","cardColor","init_WorkCarousel","d"],"sources":["https:/framerusercontent.com/modules/UY6pG5R55D8qFa9ftnvK/mTFcIDCMi8QUM02TiQeL/WorkCarousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const DEFAULT_ITEMS=[{title:\"LOUD\",type:\"Brand identity and packaging\",image:{src:\"https://framerusercontent.com/images/3Z3AymgmGEs1MDKJZ6DzjHzGqJQ.jpg\"}},{title:\"Dream Brew\",type:\"Pitch deck\",image:{src:\"https://framerusercontent.com/images/UnuJocCzbWcaW0WyCwuGMvk9ws.jpg\"}},{title:\"Loot Audio\",type:\"Social ad campaign\",image:{src:\"https://framerusercontent.com/images/yZfLvG0uIDn88B2kdVYFGGBd8.jpg\"}},{title:\"Supercharged AI\",type:\"Brand guidelines\",image:{src:\"https://framerusercontent.com/images/qcMIcG35oH9UmnF7bChdpviih4.jpg\"}},{title:\"Hububb\",type:\"Social media creative\",image:{src:\"https://framerusercontent.com/images/u5oqC5LFZG9EWeiKI92ou7XQqg.jpg\"}},{title:\"Raleigh\",type:\"Product launch campaign\",image:{src:\"https://framerusercontent.com/images/mCEe7f4IUzsLdNgNhiJPAQ8ewco.jpg\"}},{title:\"Ott\",type:\"Website design\",image:{src:\"https://framerusercontent.com/images/XMhyJNyJC0kHMbDHoYZrXz3jCeo.jpg\"}}];const CSS=`\n.wcx-card{position:absolute;left:0;top:0;width:520px;height:390px;border:0;padding:0;border-radius:28px;overflow:hidden;cursor:pointer;transition:transform .7s cubic-bezier(.2,.8,.2,1),opacity .45s ease}\n.wcx-card::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);pointer-events:none;z-index:6}\n.wcx-card img{display:block;width:100%;height:100%;object-fit:cover}\n.wcx-btn{width:52px;height:52px;border-radius:50%;border:0;padding:0;background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s}\n.wcx-btn:hover{background:rgba(255,255,255,.24)}\n.wcx-card:focus-visible,.wcx-btn:focus-visible{outline:3px solid #130E3A;outline-offset:3px}\n.wcx-dot{display:block;width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.32);transition:width .35s ease,background-color .35s}\n.wcx-dot.on{width:28px;background:#FFFFFF}\n.wcx-light .wcx-card{box-shadow:0 30px 60px -36px rgba(19,14,58,.45)}\n.wcx-light .wcx-btn{background:#F4F3F8}\n.wcx-light .wcx-btn:hover{background:#E9E2FF}\n.wcx-light .wcx-dot{background:rgba(19,14,58,.22)}\n.wcx-light .wcx-dot.on{background:#130E3A}\n`;/**\n * Work carousel: fanned card stack with title, arrows and dots.\n *\n * @framerIntrinsicWidth 1440\n * @framerIntrinsicHeight 700\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function WorkCarousel(props){const{items=DEFAULT_ITEMS,startIndex=0,cardColor=\"#26214A\",textColor=\"#FFFFFF\",theme=\"dark\"}=props;const light=theme===\"light\";const list=items&&items.length?items:DEFAULT_ITEMS;const n=list.length;const[cur,setCur]=useState(Math.min(Math.max(0,startIndex),n-1));const rootRef=useRef(null);const[w,setW]=useState(1440);useEffect(()=>{const el=rootRef.current;if(!el||typeof ResizeObserver===\"undefined\")return;const ro=new ResizeObserver(entries=>{const nw=Math.round(entries[0].contentRect.width);if(nw)startTransition(()=>setW(nw));});ro.observe(el);return()=>ro.disconnect();},[]);const compact=w<=760;const go=i=>startTransition(()=>setCur((i%n+n)%n));const active=list[Math.min(cur,n-1)];return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,className:light?\"wcx-light\":undefined,style:{...props.style,position:\"relative\",zIndex:0,isolation:\"isolate\",width:\"100%\",color:textColor,fontFamily:\"Inter, 'Inter Placeholder', system-ui, sans-serif\"},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",height:compact?330:500,marginTop:compact?40:64},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",width:0,height:0,transform:compact?\"scale(.58)\":undefined},children:list.map((item,i)=>{let o=((i-cur)%n+n)%n;if(o>n/2)o-=n;const a=Math.abs(o);const tf=`translate(-50%, -50%) translateX(${o*300}px) translateY(${a*a*9}px) rotate(${o*6}deg) scale(${(1-a*.13).toFixed(3)})`;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"wcx-card\",\"aria-label\":`Show ${item.title}, ${item.type}`,onClick:()=>go(i),style:{transform:tf,zIndex:10-a,opacity:a>2?0:1,pointerEvents:a>2?\"none\":\"auto\",background:cardColor},tabIndex:a>2?-1:0,children:item.image?.src||DEFAULT_ITEMS[i]?.image?.src?/*#__PURE__*/_jsx(\"img\",{src:item.image?.src||DEFAULT_ITEMS[i].image.src,srcSet:item.image?.srcSet,alt:item.image?.alt||`${item.title}: ${item.type}`,draggable:false}):null},i);})})}),/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\",marginTop:40,padding:compact?\"0 16px\":\"0 32px\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontSize:26,fontWeight:600,lineHeight:1.2},\"aria-live\":\"polite\",children:active?.title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"6px 0 0\",fontSize:16,lineHeight:1.4,color:light?\"#5A5675\":\"rgba(255,255,255,.72)\"},children:active?.type}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:18,marginTop:28},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"wcx-btn\",\"aria-label\":\"Previous project\",onClick:()=>go(cur-1),style:{color:textColor},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M19 12H5M11 6l-6 6 6 6\"})})}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"flex\",gap:6},\"aria-hidden\":\"true\",children:list.map((_,i)=>/*#__PURE__*/_jsx(\"span\",{className:i===cur?\"wcx-dot on\":\"wcx-dot\"},i))}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"wcx-btn\",\"aria-label\":\"Next project\",onClick:()=>go(cur+1),style:{color:textColor},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M5 12h14M13 6l6 6-6 6\"})})})]})]})]});}addPropertyControls(WorkCarousel,{items:{type:ControlType.Array,title:\"Projects\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Image\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Project\"},type:{type:ControlType.String,title:\"Type\",defaultValue:\"Brand identity\"}}},defaultValue:DEFAULT_ITEMS.map(d=>({title:d.title,type:d.type}))},startIndex:{type:ControlType.Number,title:\"Start\",defaultValue:0,min:0,max:20,step:1,displayStepper:true},cardColor:{type:ControlType.Color,title:\"Card\",defaultValue:\"#26214A\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},theme:{type:ControlType.Enum,title:\"Theme\",options:[\"dark\",\"light\"],optionTitles:[\"Dark\",\"Light\"],defaultValue:\"dark\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WorkCarousel\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"700\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"1440\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WorkCarousel.map"],"mappings":"A,sMAsBG,SAAwBe,EAAa,EAAM,CAAC,GAAK,CAAC,QAAMC,EAAc,aAAW,EAAE,YAAU,UAAU,YAAU,UAAU,QAAM,QAAQC,EAAYC,EAAMC,IAAQ,QAAcC,EAAKC,GAAOA,EAAM,OAAOA,EAAML,EAAoBM,EAAEF,EAAK,OAAY,CAACG,EAAIC,GAAQxB,EAAS,KAAK,IAAI,KAAK,IAAI,EAAEyB,CAAU,EAAEH,EAAE,CAAC,CAAC,EAAQI,EAAQzB,EAAO,IAAI,EAAO,CAAC0B,EAAEC,GAAM5B,EAAS,IAAI,EAAES,MAAc,CAAC,IAAMoB,EAAGH,EAAQ,QAAQ,GAAG,CAACG,GAAI,OAAO,eAAiB,IAAY,OAAO,IAAMC,EAAG,IAAI,eAAe,GAAS,CAAC,IAAMC,EAAG,KAAK,MAAMC,EAAQ,EAAE,CAAC,YAAY,KAAK,EAAKD,GAAG3B,MAAoBwB,EAAKG,CAAE,CAAC,CAAE,CAAC,EAAiB,OAAfD,EAAG,QAAQD,CAAE,MAAYC,EAAG,WAAW,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMG,EAAQN,GAAG,IAAUO,EAAG,GAAGhC,MAAoBsB,GAAQW,EAAEb,EAAEA,GAAGA,CAAC,CAAC,EAAQc,EAAOhB,EAAK,KAAK,IAAIG,EAAID,EAAE,CAAC,GAAG,MAAoB,gBAAM,MAAM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