{"version":3,"file":"LinkComponentV2.CbR9DPfU.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Beax1KLbL1ZZXX8IEx8H/n3YM4FzJQya6NSR1kFdd/LinkComponentV2.js"],"sourcesContent":["// Link component with animated bottom line on hover and customizable active state\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function LinkComponent(props){const{text,href,font,textColor,hoverTextColor,lineColor,hoverLineColor,lineThickness,lineOffset,animationDuration,animationType,easeType,springStiffness,springDamping,springMass,isActive,activeTextColor,activeLineColor}=props;const[isHovered,setIsHovered]=useState(false);const isStatic=useIsStaticRenderer();// Handle Framer's Link control format - it can be a string or an object with url property\n// Framer's ControlType.Link can return: string, { url: string }, or { url: string, target?: string }\nlet linkUrl=\"\";let linkTarget=undefined;if(typeof href===\"string\"){linkUrl=href;}else if(typeof href===\"object\"&&href!==null){// Framer Link object can have: url, target, and other properties\nconst linkObj=href;linkUrl=linkObj.url||\"\";linkTarget=linkObj.target;}// Fallback to \"#\" only if linkUrl is truly empty\nif(!linkUrl){linkUrl=\"#\";}const currentTextColor=isActive?activeTextColor:isHovered?hoverTextColor:textColor;const currentLineColor=isActive?activeLineColor:isHovered?hoverLineColor:lineColor;// In static mode (canvas), show a preview with the line at 50% to indicate the animation\nconst lineScale=isStatic?.5:isHovered||isActive?1:0;// Build transition config based on animation type\nconst transitionConfig=animationType===\"spring\"?{type:\"spring\",stiffness:springStiffness,damping:springDamping,mass:springMass}:{duration:animationDuration,ease:easeType};return /*#__PURE__*/_jsxs(\"a\",{href:linkUrl,target:linkTarget,rel:linkTarget===\"_blank\"?\"noopener noreferrer\":undefined,style:{position:\"relative\",display:\"inline-block\",textDecoration:\"none\",width:\"max-content\",color:currentTextColor,transition:`color ${animationDuration}s ease`,cursor:\"pointer\",...font},onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),children:[/*#__PURE__*/_jsx(\"span\",{children:text}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",bottom:-lineOffset,left:0,width:\"100%\",height:lineThickness,backgroundColor:currentLineColor,transformOrigin:\"left\",pointerEvents:\"none\"},initial:{scaleX:isActive?1:0},animate:{scaleX:lineScale},transition:isStatic?{duration:0}:transitionConfig})]});}addPropertyControls(LinkComponent,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hover Me\"},href:{type:ControlType.Link,title:\"Link\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#000000\"},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#000000\"},hoverLineColor:{type:ControlType.Color,title:\"Hover Line Color\",defaultValue:\"#000000\"},lineThickness:{type:ControlType.Number,title:\"Line Thickness\",defaultValue:2,min:1,max:10,step:1,unit:\"px\"},lineOffset:{type:ControlType.Number,title:\"Line Offset\",defaultValue:2,min:0,max:20,step:1,unit:\"px\"},animationType:{type:ControlType.Enum,title:\"Animation Type\",options:[\"ease\",\"spring\"],optionTitles:[\"Ease\",\"Spring\"],defaultValue:\"ease\",displaySegmentedControl:true},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.1,max:2,step:.1,unit:\"s\",hidden:({animationType})=>animationType===\"spring\"},easeType:{type:ControlType.Enum,title:\"Ease Type\",options:[\"easeInOut\",\"easeIn\",\"easeOut\",\"linear\",\"circInOut\",\"circIn\",\"circOut\",\"backInOut\",\"backIn\",\"backOut\",\"anticipate\"],optionTitles:[\"Ease In Out\",\"Ease In\",\"Ease Out\",\"Linear\",\"Circ In Out\",\"Circ In\",\"Circ Out\",\"Back In Out\",\"Back In\",\"Back Out\",\"Anticipate\"],defaultValue:\"easeInOut\",hidden:({animationType})=>animationType===\"spring\"},springStiffness:{type:ControlType.Number,title:\"Stiffness\",defaultValue:300,min:50,max:1e3,step:10,hidden:({animationType})=>animationType===\"ease\"},springDamping:{type:ControlType.Number,title:\"Damping\",defaultValue:30,min:5,max:100,step:5,hidden:({animationType})=>animationType===\"ease\"},springMass:{type:ControlType.Number,title:\"Mass\",defaultValue:1,min:.1,max:5,step:.1,hidden:({animationType})=>animationType===\"ease\"},isActive:{type:ControlType.Boolean,title:\"Active State\",defaultValue:false,enabledTitle:\"Active\",disabledTitle:\"Inactive\"},activeTextColor:{type:ControlType.Color,title:\"Active Text Color\",defaultValue:\"#0099FF\"},activeLineColor:{type:ControlType.Color,title:\"Active Line Color\",defaultValue:\"#0099FF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LinkComponent\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinkComponentV2.map"],"mappings":"2OAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,OAAK,YAAU,iBAAe,YAAU,iBAAe,gBAAc,aAAW,oBAAkB,gBAAc,WAAS,kBAAgB,gBAAc,aAAW,WAAS,kBAAgB,mBAAiB,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,GAAqB,CAEhW,EAAQ,GAAO,EAAqB,GAAG,OAAO,GAAO,SAAU,EAAQ,UAAc,OAAO,GAAO,UAAU,EAAY,CAC7H,IAAM,EAAQ,EAAK,EAAQ,EAAQ,KAAK,GAAG,EAAW,EAAQ,OAC9D,AAAa,IAAQ,IAAK,IAAM,EAAiB,EAAS,EAAgB,EAAU,EA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