{"version":3,"file":"FlipText.Bbf0SWjb.mjs","names":["i"],"sources":["https:/framerusercontent.com/modules/BjU5wIEEWpsMMpIBqeFv/AD08siZBntv0XxRXkV5R/FlipText.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/docs/guides/\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/docs/guides/auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function FlipText(props){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nconst children=props.text;const characters=children.split(\"\");return /*#__PURE__*/ _jsx(\"div\",{style:containerStyle,children:characters.map((character,i)=>{return /*#__PURE__*/ _jsx(\"div\",{style:{display:\"inline-block\",overflow:\"hidden\"},children:/*#__PURE__*/ _jsx(motion.div,{animate:props.direction,variants:{up:i=>({y:0,transition:{...props.transition,delay:i*props.delay}}),down:i=>({y:\"-100%\",transition:{...props.transition,delay:i*props.delay}})},style:{display:\"inline-block\",willChange:\"transform\",fontFamily:`${props.fontFamily}, sans-serif`,fontSize:`${props.fontSize}px`,fontWeight:props.fontWeight},custom:i,children:/*#__PURE__*/ _jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",letterSpacing:`${props.letterSpacing}px`},children:[/*#__PURE__*/ _jsx(\"span\",{style:{color:props.upColor},children:character}),/*#__PURE__*/ _jsx(\"span\",{style:{position:\"absolute\",top:\"100%\",color:props.downColor},children:character})]})})},children+i);})});};FlipText.defaultProps={text:\"My Title\",direction:\"up\",upColor:\"#fff\",downColor:\"#fff\",fontFamily:\"Poppins\",fontSize:14,letterSpacing:0,fontWeight:\"400\",delay:.02};addPropertyControls(FlipText,{text:{title:\"Text\",type:ControlType.String},direction:{type:ControlType.Enum,defaultValue:\"up\",displaySegmentedControl:true,options:[\"up\",\"down\"],optionTitles:[\"Up\",\"Down\"]},transition:{type:ControlType.Transition},delay:{type:ControlType.Number,min:.01,max:1,step:.01,displayStepper:true},upColor:{type:ControlType.Color},downColor:{type:ControlType.Color},fontFamily:{type:ControlType.String},fontSize:{type:ControlType.Number},fontWeight:{type:ControlType.Enum,defaultValue:\"400\",options:[\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\",],optionTitles:[\"Thin\",\"Extra Light\",\"Light\",\"Normal\",\"Medium\",\"Semi Bold\",\"Bold\",\"Extra Bold\",\"Black\",]},letterSpacing:{type:ControlType.Number}});// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",color:\"white\",whiteSpace:\"pre\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FlipText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FlipText.map"],"mappings":"wTAQI,SAAwB,EAAS,EAAM,CAG3C,IAAM,EAAS,EAAM,KAAW,EAAW,EAAS,MAAM,IAAI,OAAqB,EAAK,MAAM,CAAC,MAAM,EAAe,SAAS,EAAW,KAAK,EAAU,IAA0B,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,eAAe,SAAS,SAAS,CAAC,SAAuB,EAAK,EAAO,IAAI,CAAC,QAAQ,EAAM,UAAU,SAAS,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,GAAG,EAAM,WAAW,MAAMA,EAAE,EAAM,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,QAAQ,WAAW,CAAC,GAAG,EAAM,WAAW,MAAMA,EAAE,EAAM,MAAM,CAAC,E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