{"version":3,"file":"Slide_text_button.XphpvkdA.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/44MVeelFO2JFDjHRcg1y/YnBeEkVhnV8qWMv0611J/Slide_text_button.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/* ---------------- Component ---------------- *//**\n * @framerDisableUnlink\n */export default function SlideTextButton(props){const{label,font,paddingX,paddingY,borderRadius,backgroundColor,textColor}=props;const[isHovered,setIsHovered]=useState(false);const characters=label.split(\"\");return /*#__PURE__*/_jsx(motion.button,{onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{width:\"100%\",...font,padding:`${paddingY}px ${paddingX}px`,borderRadius,background:backgroundColor,color:textColor,border:\"none\",cursor:\"pointer\",position:\"relative\",whiteSpace:\"nowrap\",userSelect:\"none\"},children:/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline-flex\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"flex\",overflow:\"hidden\"},children:characters.map((char,index)=>/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\"},initial:{y:\"0em\"},animate:{y:isHovered?\"1.2em\":\"0em\"},transition:{duration:.3+Math.min(index*.03,.3),ease:[.4,0,.2,1]},children:char===\" \"?\"\\xa0\":char},`top-${index}`))}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",inset:0,display:\"flex\",overflow:\"hidden\"},children:characters.map((char,index)=>/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\"},initial:{y:\"-1.2em\"},animate:{y:isHovered?\"0em\":\"-1.2em\"},transition:{duration:.3+Math.min(index*.03,.3),ease:[.4,0,.2,1]},children:char===\" \"?\"\\xa0\":char},`bottom-${index}`))})]})});}/* ---------------- Controls ---------------- */addPropertyControls(SlideTextButton,{label:{type:ControlType.String,title:\"Text\",defaultValue:\"Slide Button\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:16,fontWeight:600,lineHeight:1.4},controls:\"extended\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:20,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:10,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#0f172a\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SlideTextButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Slide_text_button.map"],"mappings":"kOAEG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,WAAS,WAAS,eAAa,kBAAgB,aAAW,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAW,EAAM,MAAM,GAAG,CAAC,OAAoB,EAAK,EAAO,OAAO,CAAC,iBAAiB,EAAa,GAAK,CAAC,iBAAiB,EAAa,GAAM,CAAC,MAAM,CAAC,MAAM,OAAO,GAAG,EAAK,QAAQ,GAAG,EAAS,KAAK,EAAS,IAAI,eAAa,WAAW,EAAgB,MAAM,EAAU,OAAO,OAAO,OAAO,UAAU,SAAS,WAAW,WAAW,SAAS,WAAW,OAAO,CAAC,SAAsB,EAAM,OAAO,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,cAAc,CAAC,SAAS,CAAc,EAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,OAAO,SAAS,SAAS,CAAC,SAAS,EAAW,KAAK,EAAK,IAAqB,EAAK,EAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,EAA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