{"version":3,"file":"StaggeredTextAnimator.CR6QA-eP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/SoMBhhGYAgeOBvDBbzXu/kVE56vcjO3PkTAUEM0dI/StaggeredTextAnimator.js"],"sourcesContent":["// Staggered Text Animator with flip effect on hover\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function StaggeredTextAnimator(props){const{text,textColor,hoverColor,backgroundColor,duration,stagger,font,fillMode}=props;const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";const fontStyles={fontSize:fillMode?\"clamp(1rem, 8vw, 10rem)\":font.fontSize,fontWeight:font.fontWeight,letterSpacing:font.letterSpacing,lineHeight:font.lineHeight,fontFamily:font.fontFamily,fontStyle:font.fontStyle};return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:fillMode?\"0\":\"24px\",minWidth:isFixedWidth?\"100%\":\"max-content\",minHeight:isFixedHeight?\"100%\":\"max-content\",width:isFixedWidth?\"100%\":\"auto\",height:isFixedHeight?\"100%\":\"auto\"},children:/*#__PURE__*/_jsxs(motion.div,{initial:\"initial\",whileHover:\"hovered\",style:{position:\"relative\",display:fillMode?\"flex\":\"inline-block\",alignItems:fillMode?\"center\":\"initial\",justifyContent:fillMode?\"center\":\"initial\",overflow:\"hidden\",whiteSpace:\"nowrap\",textTransform:\"uppercase\",cursor:\"pointer\",color:textColor,width:fillMode?\"100%\":\"auto\",height:fillMode?\"100%\":\"auto\",...fontStyles},children:[/*#__PURE__*/_jsx(\"div\",{children:text.split(\"\").map((letter,i)=>/*#__PURE__*/_jsx(motion.span,{variants:{initial:{y:0},hovered:{y:\"-100%\"}},transition:{duration:duration,ease:\"easeInOut\",delay:stagger*i},style:{display:\"inline-block\"},children:letter===\" \"?\"\\xa0\":letter},`top-${i}`))}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,color:hoverColor,display:fillMode?\"flex\":\"block\",alignItems:fillMode?\"center\":\"initial\",justifyContent:fillMode?\"center\":\"initial\"},children:text.split(\"\").map((letter,i)=>/*#__PURE__*/_jsx(motion.span,{variants:{initial:{y:\"100%\"},hovered:{y:0}},transition:{duration:duration,ease:\"easeInOut\",delay:stagger*i},style:{display:\"inline-block\"},children:letter===\" \"?\"\\xa0\":letter},`bottom-${i}`))})]})});}addPropertyControls(StaggeredTextAnimator,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"HOVER ME\"},fillMode:{type:ControlType.Boolean,title:\"Fill Mode\",defaultValue:false,enabledTitle:\"Fill\",disabledTitle:\"Pixel\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"64px\",variant:\"Black\",letterSpacing:\"-0.02em\",lineHeight:\"0.75em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#22CC66\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.25,min:.1,max:2,step:.05,unit:\"s\"},stagger:{type:ControlType.Number,title:\"Stagger\",defaultValue:.025,min:0,max:.2,step:.005,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StaggeredTextAnimator\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StaggeredTextAnimator.map"],"mappings":"wTAIG,SAAwB,EAAsB,EAAM,CA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