{"version":3,"file":"ProgressUnderlineOverride.j2OfY25D.mjs","names":["useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/hmu1vzABYLOfbTkq7PfO/i47ORgRBa4T7aXbmlhFL/ProgressUnderlineOverride.js"],"sourcesContent":["/**\n * User request:\n * Create a Framer code override named `withProgressUnderline` that wraps a nav item,\n * tracks hover with useState, and renders an animated progress-style underline\n * (left-to-right grow on enter, reverse shrink on leave) using motion.div scaleX.\n * Expose underline color, thickness, and duration as tunable controls.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useMemo,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";export function withProgressUnderline(Component){const WrappedWithProgressUnderline=/*#__PURE__*/forwardRef(function WrappedWithProgressUnderline(props,ref){const{underlineColor=\"#000000\",thickness=1,duration=.3,onMouseEnter,onMouseLeave,style,...rest}=props;const[hovered,setHovered]=useState(false);const handleMouseEnter=useCallback(event=>{startTransition(()=>setHovered(true));if(onMouseEnter)onMouseEnter(event);},[onMouseEnter]);const handleMouseLeave=useCallback(event=>{startTransition(()=>setHovered(false));if(onMouseLeave)onMouseLeave(event);},[onMouseLeave]);const wrapperStyle=useMemo(()=>({position:\"relative\",display:\"inline-flex\",width:\"fit-content\"}),[]);const underlineStyle=useMemo(()=>({position:\"absolute\",left:0,bottom:0,height:thickness,width:\"100%\",background:underlineColor,transformOrigin:\"left center\",pointerEvents:\"none\"}),[thickness,underlineColor]);return /*#__PURE__*/_jsxs(\"div\",{style:wrapperStyle,children:[/*#__PURE__*/_jsx(Component,{ref:ref,...rest,style:style,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave}),/*#__PURE__*/_jsx(motion.div,{style:underlineStyle,initial:{scaleX:0},animate:{scaleX:hovered?1:0},transition:{duration,ease:[.25,.1,.25,1]}})]});});addPropertyControls(WrappedWithProgressUnderline,{underlineColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:1,min:1,max:12,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.05,max:2,step:.05,unit:\"s\"}});return WrappedWithProgressUnderline;}\nexport const __FramerMetadata__ = {\"exports\":{\"withProgressUnderline\":{\"type\":\"reactHoc\",\"name\":\"withProgressUnderline\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressUnderlineOverride.map"],"mappings":"yPAM6N,SAAgB,EAAsB,EAAU,CAAC,IAAM,EAA0C,EAAW,SAAsC,EAAM,EAAI,CAAC,GAAK,CAAC,iBAAe,UAAU,YAAU,EAAE,WAAS,GAAG,eAAa,eAAa,QAAM,GAAG,GAAM,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAQ,EAAiBC,EAAY,GAAO,CAAC,MAAoB,EAAW,EAAI,CAAC,EAAK,GAAa,EAAa,CAAK,CAAE,EAAE,CAAC,CAAY,CAAC,EAAQ,EAAiBA,EAAY,GAAO,CAAC,MAAoB,EAAW,EAAK,CAAC,EAAK,GAAa,EAAa,CAAK,CAAE,EAAE,CAAC,CAAY,CAAC,EAAQ,EAAaC,OAAa,CAAC,SAAS,WAAW,QAAQ,cAAc,MAAM,aAAa,GAAG,CAAC,CAAC,EAAQ,EAAeA,OAAa,CAAC,SAAS,WAAW,KAAK,EAAE,OAAO,EAAE,OAAO,EAAU,MAAM,OAAO,WAAW,EAAe,gBAAgB,cAAc,cAAc,MAAM,GAAG,CAAC,EAAU,CAAc,CAAC,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,EAAa,SAAS,CAAc,EAAK,EAAU,CAAK,MAAI,GAAG,EAAW,QAAM,aAAa,EAAiB,aAAa,CAAgB,CAAC,EAAe,EAAK,EAAO,IAAI,CAAC,MAAM,EAAe,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO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