{"version":3,"file":"CompetitorCard.Cfrh3IoS.mjs","names":["useState","startTransition","__esmMin","te","init_npm_react_18_3_1","init_jsx_runtime","p","c","_e","init_framer_DcxuU94H","addPropertyControls","ControlType","CompetitorCard","props","isHovered","setIsHovered","isFillWidth","style","isFillHeight","rootStyle","radius","backgroundColor","borderWidth","borderColor","innerStyle","titleStyle","titleFont","titleSize","titleColor","subStyle","subTextFont","subTextColor","subText","content","competitorName","showSubText","link","init_CompetitorCard"],"sources":["https:/framerusercontent.com/modules/MYUQV0FGHSsQlIUbOMr3/WCOse1vyRIggZd3YfARP/CompetitorCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{startTransition,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerIntrinsicWidth 420\n * @framerIntrinsicHeight 260\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CompetitorCard(props){const{competitorName,subText,showSubText,link,backgroundColor,borderColor,titleColor,subTextColor,radius,borderWidth,padding,gap,titleFont,titleSize,subTextFont,style}=props;const[isHovered,setIsHovered]=useState(false);const isFillWidth=!!style&&style.width===\"100%\";const isFillHeight=!!style&&style.height===\"100%\";const hoverTitleScale=1.03;const rootStyle={position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding,boxSizing:\"border-box\",borderRadius:radius,background:backgroundColor,border:`${borderWidth}px solid ${borderColor}`,overflow:\"hidden\",...isFillWidth?{}:{minWidth:220},...isFillHeight?{}:{minHeight:160},...style};const innerStyle={width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap,textAlign:\"center\"};const titleStyle={...titleFont,fontSize:titleSize,color:titleColor,margin:0,// Ensure descenders (e.g. \"y\", \"g\") never get clipped and reserve consistent space\nlineHeight:(titleFont?.lineHeight)??\"1.2em\",letterSpacing:(titleFont?.letterSpacing)??\"-0.02em\",textAlign:\"center\",width:\"100%\",maxWidth:\"100%\",overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",paddingBottom:\"0.06em\",transform:isHovered?`scale(${hoverTitleScale})`:\"scale(1)\",transition:\"transform 180ms ease\",willChange:\"transform\"};const subStyle={...subTextFont,color:subTextColor,margin:0,width:\"100%\",maxWidth:\"100%\",overflow:\"hidden\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",WebkitLineClamp:3,textOverflow:\"ellipsis\",opacity:subText?.trim()?1:.7};const content=/*#__PURE__*/_jsxs(\"div\",{style:innerStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:titleStyle,children:competitorName}),showSubText?/*#__PURE__*/_jsx(\"div\",{style:subStyle,children:subText}):null]});if(link){return /*#__PURE__*/_jsx(\"a\",{style:{...rootStyle,textDecoration:\"none\",color:\"inherit\"},href:link,\"aria-label\":competitorName,role:\"link\",onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:content});}return /*#__PURE__*/_jsx(\"div\",{style:rootStyle,\"aria-label\":competitorName,role:\"group\",onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:content});}addPropertyControls(CompetitorCard,{competitorName:{type:ControlType.String,title:\"Competitor\",defaultValue:\"ETON\",placeholder:\"Competitor name…\"},subText:{type:ControlType.String,title:\"Sub-text\",defaultValue:\"Short description goes here.\",placeholder:\"Optional sub-text…\",displayTextArea:true,hidden:({showSubText})=>!showSubText},showSubText:{type:ControlType.Boolean,title:\"Show Sub-text\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#1B1D1F\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#2A2D30\"},titleColor:{type:ControlType.Color,title:\"Title\",defaultValue:\"#FFFFFF\"},subTextColor:{type:ControlType.Color,title:\"Sub-text Color\",defaultValue:\"#CCCCCC\",hidden:({showSubText})=>!showSubText},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"18px\"},borderWidth:{type:ControlType.Number,title:\"Border W\",defaultValue:1,min:0,max:8,step:1,unit:\"px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"34px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:40,step:1,unit:\"px\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"34px\",variant:\"Semibold\",letterSpacing:\"-0.02em\",lineHeight:\"1em\",textAlign:\"center\"}},titleSize:{type:ControlType.Number,title:\"Title Size\",defaultValue:34,min:12,max:80,step:1,unit:\"px\"},subTextFont:{type:ControlType.Font,title:\"Sub-text Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\",textAlign:\"center\"},hidden:({showSubText})=>!showSubText}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CompetitorCard\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"260\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"420\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CompetitorCard.map"],"mappings":"A,wLAMG,SAAwBY,EAAe,EAAM,CAAC,GAAK,CAAC,iBAAe,UAAQ,cAAY,OAAK,kBAAgB,cAAY,aAAW,eAAa,SAAO,cAAY,UAAQ,MAAI,YAAU,YAAU,cAAY,SAAOC,EAAW,CAACC,EAAUC,GAAcf,EAAS,EAA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