{"version":3,"file":"CompetitorCard.DDiq79xy.mjs","names":["useState","startTransition"],"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":"wLAMG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,iBAAe,UAAQ,cAAY,OAAK,kBAAgB,cAAY,aAAW,eAAa,SAAO,cAAY,UAAQ,MAAI,YAAU,YAAU,cAAY,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAY,CAAC,CAAC,GAAO,EAAM,QAAQ,OAAa,EAAa,CAAC,CAAC,GAAO,EAAM,SAAS,OAAwC,EAAU,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,UAAQ,UAAU,aAAa,aAAa,EAAO,WAAW,EAAgB,OAAO,GAAG,EAAY,WAAW,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