{"version":3,"file":"MorphingButton.DhHvN6V7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/nEQjB4lykjKFSWAoWBnK/RwUyvztOU1ToSEGikX42/MorphingButton.js"],"sourcesContent":["// MorphingButton: Morphing button with animated expanding right circle and arrow, Framer-compliant, all property controls\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useAnimation}from\"framer-motion\";/**\n * MorphingButton\n *\n * Morphing button with animated expanding right circle and arrow. All corners except top-left are rounded. Fully configurable via property controls.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function MorphingButton(props){const{label,backgroundColor,borderColor,textColor,arrowColor,font,minWidth,borderRadius,borderWidth,paddingY,paddingX,circleSize,style}=props;const[isHovered,setIsHovered]=useState(false);const controls=useAnimation();const isStatic=useIsStaticRenderer();const handleMouseEnter=()=>{startTransition(()=>setIsHovered(true));controls.start(\"expand\");};const handleMouseLeave=()=>{startTransition(()=>setIsHovered(false));controls.start(\"initial\");};// Static preview: show expanded state if hovered, else initial\nconst staticState=isHovered?\"expand\":\"initial\";return /*#__PURE__*/_jsxs(motion.button,{onMouseEnter:isStatic?undefined:handleMouseEnter,onMouseLeave:isStatic?undefined:handleMouseLeave,style:{...style,position:\"relative\",overflow:\"hidden\",fontWeight:font?.fontWeight,fontSize:font?.fontSize,fontFamily:font?.fontFamily,letterSpacing:font?.letterSpacing,lineHeight:font?.lineHeight,color:textColor,backgroundColor,border:`${borderWidth}px solid ${borderColor}`,padding:`${paddingY}px ${paddingX}px`,borderTopLeftRadius:0,borderTopRightRadius:borderRadius,borderBottomRightRadius:borderRadius,borderBottomLeftRadius:borderRadius,minWidth,display:\"flex\",alignItems:\"center\",gap:6,cursor:\"pointer\",transition:\"background 0.3s, color 0.3s\"},\"aria-label\":label,type:\"button\",children:[/*#__PURE__*/_jsx(\"span\",{style:{zIndex:10,opacity:isHovered?0:1,transition:\"opacity 0.3s\",width:\"max-content\",...font},children:label}),/*#__PURE__*/_jsx(motion.div,{variants:{initial:{width:circleSize,height:circleSize,borderRadius:9999,backgroundColor:\"#fff\",position:\"absolute\",right:12,top:\"50%\",translateY:\"-50%\",zIndex:0,boxShadow:\"none\"},expand:{width:\"100%\",height:\"100%\",borderRadius:0,right:0,top:0,translateY:\"0%\",zIndex:0,boxShadow:\"none\"}},initial:\"initial\",animate:isStatic?staticState:controls,transition:{duration:.5,ease:\"easeInOut\"},style:{zIndex:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:28,height:28,viewBox:\"0 0 24 24\",fill:\"none\",stroke:arrowColor,strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-label\":\"Arrow Right\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"5\",y1:\"12\",x2:\"19\",y2:\"12\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"12 5 19 12 12 19\"})]})})})]});}addPropertyControls(MorphingButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Join the Program\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#1B1B1B\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#CEF17B\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#fff\"},arrowColor:{type:ControlType.Color,title:\"Arrow\",defaultValue:\"#000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"1.5rem\",variant:\"Regular\",letterSpacing:\"0em\",lineHeight:\"1.2em\"}},minWidth:{type:ControlType.Number,title:\"Min Width\",defaultValue:340,min:100,max:600,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:20,min:0,max:40,step:1,unit:\"px\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:4,min:0,max:12,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:16,min:0,max:48,step:1,unit:\"px\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:24,min:0,max:64,step:1,unit:\"px\"},circleSize:{type:ControlType.Number,title:\"Circle Size\",defaultValue:48,min:24,max:96,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MorphingButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MorphingButton.map"],"mappings":"2YAQG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,kBAAgB,cAAY,YAAU,aAAW,OAAK,WAAS,eAAa,cAAY,WAAS,WAAS,aAAW,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,GAAc,CAAO,EAAS,GAAqB,CAAO,MAAqB,CAAC,MAAoB,EAAa,GAAK,CAAC,CAAC,EAAS,MAAM,SAAS,EAAS,MAAqB,CAAC,MAAoB,EAAa,GAAM,CAAC,CAAC,EAAS,MAAM,UAAU,EACve,EAAY,EAAU,SAAS,UAAU,OAAoB,EAAM,EAAO,OAAO,CAAC,aAAa,EAAS,IAAA,GAAU,EAAiB,aAAa,EAAS,IAAA,GAAU,EAAiB,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,SAAS,SAAS,WAAW,GAAM,WAAW,SAAS,GAAM,SAAS,WAAW,GAAM,WAAW,cAAc,GAAM,cAAc,WAAW,GAAM,WAAW,MAAM,EAAU,kBAAgB,OAAO,GAAG,EAAY,WAAW,IAAc,QAAQ,GAAG,EAAS,KAAK,EAAS,IAAI,oBAAoB,EAAE,q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