{"version":3,"file":"GradientText.IfUbT7Ex.mjs","names":["useMemo","Element"],"sources":["https:/framerusercontent.com/modules/gm7FlncXrqFkzDMv2t2o/oGGvqU2ZlevIKQiGC8We/GradientText.js"],"sourcesContent":["// Gradient text component with special markup syntax using {}\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function GradientText(props){const{text=\"This is {gradient text} with normal text\",gradient=\"linear-gradient(45deg, #FF6B6B, #4ECDC4)\",textColor=\"#000000\",font,element=\"div\"}=props;const processedText=useMemo(()=>{if(!text)return[];// Split by gradient markup and line breaks\nconst parts=text.split(/(\\{[^}]*\\}|\\n)/);return parts.map((part,index)=>{if(part===\"\\n\"){return /*#__PURE__*/_jsx(\"br\",{},index);}// Check for gradient markup\nconst isGradient=part.startsWith(\"{\")&&part.endsWith(\"}\");if(isGradient){const content=part.slice(1,-1);return /*#__PURE__*/_jsx(\"span\",{style:{background:gradient,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",display:\"inline\",...font},children:content},index);}// Regular text\nreturn /*#__PURE__*/_jsx(\"span\",{style:{color:textColor,...font},children:part},index);});},[text,gradient,textColor,font]);const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";const Element=element;return /*#__PURE__*/_jsx(Element,{style:{...props.style,position:\"relative\",width:isFixedWidth?\"100%\":\"max-content\",height:isFixedHeight?\"100%\":\"auto\",display:\"flex\",alignItems:isFixedHeight?\"center\":\"flex-start\",textAlign:font?.textAlign||\"left\",margin:0,padding:0},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\"},children:processedText})});}addPropertyControls(GradientText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is {gradient text} with normal text\",displayTextArea:true,placeholder:\"Use {} for gradient text\"},element:{type:ControlType.Enum,title:\"HTML Element\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"span\",\"div\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"Paragraph\",\"Span\",\"Div\"],defaultValue:\"div\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"0em\",lineHeight:\"1.2em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},gradient:{type:ControlType.String,title:\"Gradient CSS\",defaultValue:\"linear-gradient(45deg, #FF6B6B, #4ECDC4)\",placeholder:\"e.g. linear-gradient(45deg, #FF6B6B, #4ECDC4)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientText.map"],"mappings":"0KAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,2CAA2C,WAAS,2CAA2C,YAAU,UAAU,OAAK,UAAQ,OAAO,EAAY,EAAcA,MAAiB,EAChO,EAAK,MAAM,gBAA6B,CAAC,CAAC,KAAK,EAAK,IAAQ,CAAC,GAAG,IAAO;EAAM,OAAoB,EAAK,KAAK,CAAC,EAAE,CAAK,EACrE,GAAzC,EAAK,WAAW,GAAG,GAAG,EAAK,SAAS,GAAG,EAAgB,CAAC,IAAM,EAAQ,EAAK,MAAM,EAAE,EAAE,EAAE,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,WAAW,EAAS,qBAAqB,OAAO,oBAAoB,cAAc,eAAe,OAAO,QAAQ,SAAS,GAAG,CAAI,EAAE,SAAS,CAAO,EAAE,CAAK,CAAE,CAC3S,OAAoB,EAAK,OAAO,CAAC,MA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