{"version":3,"file":"EventCard.wtmNmGIF.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/IwRSzilnalqMBY9qkoYS/F4WjHivmcpogqVH4fhsa/EventCard.js"],"sourcesContent":["// Event Card — code component for the Rebound Template (Framer)\n// Reusable card for the Events collection list: photo, date/time line, a\n// level badge, heading, and description. Matches the native layers on the\n// live Events page (event-link-block / event-card-image / event-date-wrap\n// / events-link.dark / event-level-label / event-card-paragraph-wrap),\n// with one deliberate change from the source markup: the source uses TWO\n// separate <a> links (one on the photo, one on the heading) — this\n// component wraps the ENTIRE card in a single link instead, per request,\n// so hovering/clicking anywhere (photo, date, heading, badge, description)\n// navigates the same way and drives the same hover state.\n//\n// Hover: heading color animates from Heading Color (default Dark Primary,\n// rgb(5, 36, 70)) to Heading Color (Hover) (default Primary,\n// rgb(0, 113, 235)) — matches the source's \".events-link.dark:hover\" rule\n// exactly. The photo scales up (1 -> 1.08) inside its overflow:hidden\n// wrapper — same scale-without-overflow technique as CoachCard.tsx\n// (transform applied to the inner <img>, never the wrapper, so the image\n// grows inside the fixed frame instead of bleeding past its rounded\n// corners; this scale is a deliberate enhancement, the source has no\n// hover scale on this card). Both effects share one hover state since the\n// whole card is a single link. Date/time and description keep their own\n// fixed colors — only the heading recolors on hover, matching source CSS.\n//\n// Badge (\"All Levels\"): pill matching event-level-label — Primary\n// background, white text, 100px radius, editable via property controls.\n//\n// Top Wrap Layout: on the source site this row (date/heading on one side,\n// badge on the other) is always horizontal, and just wraps awkwardly on\n// narrow widths. Framer's own per-breakpoint prop overrides only cover\n// values you set from the panel — they can't restructure JSX — so instead\n// of trying to auto-detect \"mobile\" from width, a \"Layout\" control (Row /\n// Column) lets you switch this row to a vertical stack (badge above the\n// date/heading block) by hand on whichever breakpoint variant needs it\n// (typically Tablet/Phone), the same way you'd override any other prop\n// per breakpoint in the Framer UI.\n//\n// Entrance animation: the project's standard appear animation (same as\n// PrimaryButton.tsx / CoachCard.tsx / EventItem.tsx) — opacity 0->1,\n// y 15->0, ease-in-out, duration 0.6s, delay 0.1s, plays once at 30% in\n// view, with the usual RenderTarget.canvas guard so the card stays fully\n// visible while editing. Toggle via \"Appear Animation\".\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";const DEFAULT_IMAGE={src:\"https://cdn.prod.website-files.com/69ad514c1d0ccdd25cfd2239/69c3b060c2a5496977c3d5ee_2147814318%20(1).jpg\",srcSet:\"https://cdn.prod.website-files.com/69ad514c1d0ccdd25cfd2239/69c3b060c2a5496977c3d5ee_2147814318%20(1)-p-500.jpg 500w, https://cdn.prod.website-files.com/69ad514c1d0ccdd25cfd2239/69c3b060c2a5496977c3d5ee_2147814318%20(1)-p-800.jpg 800w, https://cdn.prod.website-files.com/69ad514c1d0ccdd25cfd2239/69c3b060c2a5496977c3d5ee_2147814318%20(1)-p-1080.jpg 1080w, https://cdn.prod.website-files.com/69ad514c1d0ccdd25cfd2239/69c3b060c2a5496977c3d5ee_2147814318%20(1)-p-1600.jpg 1600w\",alt:\"Event\"};// Framer passes a value connected to a Color Style as an object\n// { value: \"#...\" } instead of a plain string. Same helper as\n// PrimaryButton.tsx / CoachCard.tsx / EventItem.tsx.\nfunction parseToken(value){if(value&&typeof value===\"object\"&&\"value\"in value){return value.value;}return value;}/**\n * Event Card\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function EventCard(props){const{link,openInNewTab=false,image=DEFAULT_IMAGE,photoHeight=300,date=\"September 2, 2026\",time=\"09:00 – 13:00\",badgeText=\"All Levels\",badgeBackground=\"rgb(0, 113, 235)\",badgeTextColor=\"rgb(255, 255, 255)\",heading=\"Junior Competition Day\",headingColor=\"rgb(5, 36, 70)\",headingHoverColor=\"rgb(0, 113, 235)\",description=\"Join us for an exciting day of competition and fun, where young players can showcase their skills in matches, enjoy engaging mini-games, and win fantastic prizes.\",topWrapLayout=\"row\",appearAnimation=true,style}=props;const isColumnLayout=topWrapLayout===\"column\";const[isHovered,setIsHovered]=useState(false);function handleHoverStart(){startTransition(()=>setIsHovered(true));}function handleHoverEnd(){startTransition(()=>setIsHovered(false));}const imageSrc=image?.src||DEFAULT_IMAGE.src;const imageSrcSet=image?.srcSet;const imageAlt=image?.alt||heading;const resolvedHeadingColor=parseToken(headingColor);const resolvedHeadingHoverColor=parseToken(headingHoverColor);const resolvedBadgeBackground=parseToken(badgeBackground);const resolvedBadgeTextColor=parseToken(badgeTextColor);const hasLink=Boolean(link);// Same canvas-safety fix as AppearAnimation.tsx / PrimaryButton.tsx /\n// EventItem.tsx: \"scrolls into view\" never triggers on the static\n// Framer canvas, so an opacity:0 initial state would just render the\n// card invisible while editing. Only animate outside the canvas editor.\nconst isCanvas=RenderTarget.current()===RenderTarget.canvas;const showAppearAnimation=!isCanvas&&appearAnimation;return /*#__PURE__*/_jsxs(motion.a,{initial:showAppearAnimation?{opacity:0,y:15,scale:1,rotate:0,skewX:0,skewY:0}:undefined,whileInView:showAppearAnimation?{opacity:1,y:0,scale:1,rotate:0,skewX:0,skewY:0}:undefined,viewport:showAppearAnimation?{once:true,amount:.3}:undefined,transition:showAppearAnimation?{duration:.6,delay:.1,ease:\"easeInOut\"}:undefined,href:hasLink?link:undefined,target:hasLink&&openInNewTab?\"_blank\":undefined,rel:hasLink&&openInNewTab?\"noopener noreferrer\":undefined,role:hasLink?undefined:\"button\",tabIndex:hasLink?undefined:0,onMouseEnter:handleHoverStart,onMouseLeave:handleHoverEnd,style:{position:\"relative\",width:\"100%\",boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",gap:30,textDecoration:\"none\",cursor:hasLink?\"pointer\":\"default\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:photoHeight,borderRadius:10,overflow:\"hidden\",flexShrink:0},children:/*#__PURE__*/_jsx(\"img\",{src:imageSrc,srcSet:imageSrcSet,alt:imageAlt,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",transform:isHovered?\"scale(1.08)\":\"scale(1)\",transition:\"transform 0.4s ease\"}})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:12},children:[(()=>{const titleBlock=/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,alignItems:\"flex-start\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"wrap\",alignItems:\"center\",gap:6},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:'\"Instrument Sans\", sans-serif',fontSize:16,fontWeight:500,lineHeight:\"1.5em\",letterSpacing:\"-0.28px\",color:\"rgb(88, 88, 88)\"},children:date}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:'\"Instrument Sans\", sans-serif',fontSize:16,fontWeight:500,lineHeight:\"1.5em\",letterSpacing:\"-0.28px\",color:\"rgb(88, 88, 88)\"},children:\"|\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:'\"Instrument Sans\", sans-serif',fontSize:16,fontWeight:500,lineHeight:\"1.5em\",letterSpacing:\"-0.28px\",color:\"rgb(88, 88, 88)\"},children:time})]}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:'\"Instrument Sans\", sans-serif',fontSize:26,fontWeight:600,lineHeight:\"1.2em\",letterSpacing:\"-0.02em\",color:isHovered?resolvedHeadingHoverColor:resolvedHeadingColor,transition:\"color 0.3s ease\"},children:heading})]});const badge=/*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,whiteSpace:\"nowrap\",padding:\"4px 12px 4px 12px\",borderRadius:100,backgroundColor:resolvedBadgeBackground,color:resolvedBadgeTextColor,fontFamily:'\"Instrument Sans\", sans-serif',fontSize:14,fontWeight:600,lineHeight:\"1.5em\"},children:badgeText});return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:isColumnLayout?\"column\":\"row\",justifyContent:isColumnLayout?\"flex-start\":\"space-between\",alignItems:\"flex-start\",gap:isColumnLayout?12:20},children:isColumnLayout?/*#__PURE__*/_jsxs(_Fragment,{children:[badge,titleBlock]}):/*#__PURE__*/_jsxs(_Fragment,{children:[titleBlock,badge]})});})(),/*#__PURE__*/_jsx(\"div\",{style:{maxWidth:600},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:'\"Instrument Sans\", sans-serif',fontSize:16,fontWeight:600,lineHeight:\"1.5em\",letterSpacing:\"-0.32px\",color:\"rgb(5, 36, 70)\"},children:description})})]})]});}addPropertyControls(EventCard,{link:{type:ControlType.Link,title:\"Link\"},openInNewTab:{type:ControlType.Boolean,title:\"Open In New Tab\",defaultValue:false,enabledTitle:\"New Tab\",disabledTitle:\"Same Tab\"},image:{type:ControlType.ResponsiveImage,title:\"Photo\"},photoHeight:{type:ControlType.Number,title:\"Photo Height\",defaultValue:300,min:100,max:600,step:10,unit:\"px\",displayStepper:true},date:{type:ControlType.String,title:\"Date\",defaultValue:\"September 2, 2026\",placeholder:\"Event date\"},time:{type:ControlType.String,title:\"Time\",defaultValue:\"09:00 – 13:00\",placeholder:\"Event time\"},badgeText:{type:ControlType.String,title:\"Badge Text\",defaultValue:\"All Levels\",placeholder:\"All Levels\"},badgeBackground:{type:ControlType.Color,title:\"Badge Background\",defaultValue:\"rgb(0, 113, 235)\"},badgeTextColor:{type:ControlType.Color,title:\"Badge Text Color\",defaultValue:\"rgb(255, 255, 255)\"},heading:{type:ControlType.String,title:\"Heading\",defaultValue:\"Junior Competition Day\",placeholder:\"Event title\"},headingColor:{type:ControlType.Color,title:\"Heading Color\",defaultValue:\"rgb(5, 36, 70)\"},headingHoverColor:{type:ControlType.Color,title:\"Heading Color (Hover)\",defaultValue:\"rgb(0, 113, 235)\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,defaultValue:\"Join us for an exciting day of competition and fun, where young players can showcase their skills in matches, enjoy engaging mini-games, and win fantastic prizes.\",placeholder:\"Event description\"},topWrapLayout:{type:ControlType.Enum,title:\"Layout\",options:[\"row\",\"column\"],optionTitles:[\"Row\",\"Column\"],defaultValue:\"row\",displaySegmentedControl:true},appearAnimation:{type:ControlType.Boolean,title:\"Appear Animation\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EventCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EventCard.map"],"mappings":"uPA4CA,SAAS,EAAW,EAAM,CAAyE,OAArE,GAAO,OAAO,GAAQ,UAAU,UAAU,EAAc,EAAM,MAAc,CAAM,CAK7G,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,OAAK,eAAa,GAAM,QAAM,EAAc,cAAY,IAAI,OAAK,oBAAoB,OAAK,gBAAgB,YAAU,aAAa,kBAAgB,mBAAmB,iBAAe,qBAAqB,UAAQ,yBAAyB,eAAa,iBAAiB,oBAAkB,mBAAmB,cAAY,qKAAqK,gBAAc,MAAM,kBAAgB,GAAK,SAAO,EAAY,EAAe,IAAgB,SAAc,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAE,SAAS,GAAkB,CAAC,MAAoB,EAAa,EAAI,CAAC,CAAE,CAAC,SAAS,GAAgB,CAAC,MAAoB,EAAa,EAAK,CAAC,CAAE,CAAC,IAAM,EAAS,GAAO,KAAK,EAAc,IAAU,EAAY,GAAO,OAAa,EAAS,GAAO,KAAK,EAAc,EAAqB,EAAW,CAAY,EAAQ,EAA0B,EAAW,CAAiB,EAAQ,EAAwB,EAAW,CAAe,EAAQ,EAAuB,EAAW,CAA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