{"version":3,"file":"StaggeredButton.UXubwmWC.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/h9ESmBK5wwnzysrRE7up/Ab0QbOrPZQLDNFarVuUn/StaggeredButton.js"],"sourcesContent":["// Button component with staggered letter animation on hover\n// Each letter slides up and is replaced by a duplicate sliding in from below\n// Staggered timing creates a wave effect across the text\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StaggeredButton(props){const{text,font,backgroundColor,textColor,paddingX,paddingY,borderRadius,borderWidth,borderColor,animationDuration,staggerDelay,easing,direction,variant,link,linkTarget,style}=props;const[isHovered,setIsHovered]=useState(false);const letters=text.split(\"\");const isFillWidth=style&&style.width===\"100%\";const isFillHeight=style&&style.height===\"100%\";const containerStyle={...style,position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"visible\",...isFillWidth?{}:{width:\"max-content\"},...isFillHeight?{}:{height:\"max-content\"}};// Static button for tablet/mobile (no animation)\nif(variant===\"tablet\"||variant===\"mobile\"){const staticButtonContent=/*#__PURE__*/_jsx(\"button\",{style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",paddingLeft:paddingX,paddingRight:paddingX,paddingTop:paddingY,paddingBottom:paddingY,borderRadius,border:`${borderWidth}px solid ${borderColor}`,cursor:\"pointer\",backgroundColor,...font,color:textColor},children:text});const wrappedStatic=link?/*#__PURE__*/_jsx(\"a\",{href:link,style:{textDecoration:\"none\",display:\"inline-block\"},target:linkTarget,rel:linkTarget===\"_blank\"?\"noopener noreferrer\":undefined,children:staticButtonContent}):staticButtonContent;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:wrappedStatic});}// Animated button for desktop\nconst buttonContent=/*#__PURE__*/_jsx(motion.button,{style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",paddingLeft:paddingX,paddingRight:paddingX,paddingTop:paddingY,paddingBottom:paddingY,borderRadius,border:`${borderWidth}px solid ${borderColor}`,cursor:\"pointer\",overflow:\"visible\",backgroundColor},onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",...font},children:letters.map((letter,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"inline-block\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{visibility:\"hidden\",display:\"inline-block\",whiteSpace:letter===\" \"?\"pre\":\"normal\",color:textColor},\"aria-hidden\":\"true\",children:letter===\" \"?\"\\xa0\":letter}),/*#__PURE__*/_jsx(motion.span,{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:textColor,position:\"absolute\",top:0,left:0,right:0,bottom:0},initial:{y:\"0%\"},animate:{y:isHovered?direction===\"up\"?\"-120%\":\"120%\":\"0%\"},transition:{duration:animationDuration,ease:easing===\"easeInOut\"?[.25,.1,.25,1]:easing,delay:index*staggerDelay},children:letter===\" \"?\"\\xa0\":letter}),/*#__PURE__*/_jsx(motion.span,{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:textColor},initial:{y:direction===\"up\"?\"120%\":\"-120%\"},animate:{y:isHovered?\"0%\":direction===\"up\"?\"120%\":\"-120%\"},transition:{duration:animationDuration,ease:easing===\"easeInOut\"?[.25,.1,.25,1]:easing,delay:index*staggerDelay},children:letter===\" \"?\"\\xa0\":letter})]},index))})});const wrappedAnimated=link?/*#__PURE__*/_jsx(\"a\",{href:link,style:{textDecoration:\"none\",display:\"inline-block\"},target:linkTarget,rel:linkTarget===\"_blank\"?\"noopener noreferrer\":undefined,children:buttonContent}):buttonContent;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:wrappedAnimated});}addPropertyControls(StaggeredButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Contact\"},variant:{type:ControlType.Enum,title:\"Variant\",defaultValue:\"desktop\",options:[\"desktop\",\"tablet\",\"mobile\"],optionTitles:[\"Desktop\",\"Tablet\",\"Mobile\"],displaySegmentedControl:true},link:{type:ControlType.Link,title:\"Link\"},linkTarget:{type:ControlType.Enum,title:\"Target\",defaultValue:\"_blank\",options:[\"_self\",\"_blank\"],optionTitles:[\"Same Tab\",\"New Tab\"],displaySegmentedControl:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"0em\",lineHeight:\"1em\"}},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0,max:10,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:24,min:0,max:100,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:12,min:0,max:100,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.1,max:2,step:.1,unit:\"s\",hidden:({variant})=>variant===\"tablet\"||variant===\"mobile\"},staggerDelay:{type:ControlType.Number,title:\"Stagger Delay\",defaultValue:.03,min:0,max:.2,step:.01,unit:\"s\",hidden:({variant})=>variant===\"tablet\"||variant===\"mobile\"},easing:{type:ControlType.Enum,title:\"Easing\",defaultValue:\"easeInOut\",options:[\"linear\",\"easeIn\",\"easeOut\",\"easeInOut\",\"circIn\",\"circOut\",\"circInOut\",\"backIn\",\"backOut\",\"backInOut\"],optionTitles:[\"Linear\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Circ In\",\"Circ Out\",\"Circ In Out\",\"Back In\",\"Back Out\",\"Back In Out\"],hidden:({variant})=>variant===\"tablet\"||variant===\"mobile\"},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"up\",options:[\"up\",\"down\"],optionTitles:[\"Up\",\"Down\"],displaySegmentedControl:true,hidden:({variant})=>variant===\"tablet\"||variant===\"mobile\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StaggeredButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StaggeredButton.map"],"mappings":"kOAMG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,kBAAgB,YAAU,WAAS,WAAS,eAAa,cAAY,cAAY,oBAAkB,eAAa,SAAO,YAAU,UAAQ,OAAK,aAAW,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAQ,EAAK,MAAM,GAAG,CAAO,EAAY,GAAO,EAAM,QAAQ,OAAa,EAAa,GAAO,EAAM,SAAS,OAAa,EAAe,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,UAAU,GAAG,EAAY,EAAE,CAAC,CAAC,MAAM,cAAc,CAAC,GAAG,EAAa,EAAE,CAAC,CAAC,OAAO,cAAc,CAAC,CACpmB,GAAG,IAAU,UAAU,IAAU,SAAS,CAAC,IAAM,EAAiC,EAAK,SAAS,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,YAAY,EAAS,aAAa,EAAS,WAAW,EAAS,cAAc,EAAS,eAAa,OAAO,GAAG,EAAY,WAAW,IAAc,OAAO,UAAU,kBAAgB,GAAG,E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