{"version":3,"file":"Styled_Multiline_Text.S-NETetW.mjs","names":[],"sources":["https:/framerusercontent.com/modules/7PoO6rlHJGmsjtPKlRtI/w0q14WTCShHCiZMHiH13/mEYbpUxwu.js","https:/framerusercontent.com/modules/6bIOsKIdH8H73SW9ylNE/jtW2bggiqAd0EkIFKzQo/Styled_Multiline_Text.js"],"sourcesContent":["// Generated by Framer (98a2bb2)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOM;Safiro Bold\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Safiro Bold\",source:\"custom\",url:\"https://framerusercontent.com/assets/3CFHiBJX9zxVpoozuBAEMPaUbw.woff2\"}]}];export const css=['.framer-MMtSj .framer-styles-preset-14812n9:not(.rich-text-wrapper), .framer-MMtSj .framer-styles-preset-14812n9.rich-text-wrapper p { --framer-font-family: \"Safiro Bold\", \"Safiro Bold Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 18px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: -0.01em; --framer-line-height: 24px; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-9662fbaf-c068-4ef7-8d52-10b935ad6c13, #121817); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-MMtSj\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/** @framerSupportedLayoutWidth auto *//** @framerSupportedLayoutHeight auto */import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";function parseStyledText(text){const segments=text.split(/(\\*[^*]+\\*)/);return segments.map((segment,index)=>{if(segment.startsWith(\"*\")&&segment.endsWith(\"*\")){return /*#__PURE__*/_jsx(\"span\",{\"data-highlighted\":true,children:segment.slice(1,-1)},index);}return /*#__PURE__*/_jsx(\"span\",{children:segment},index);});}export function StyledTitle(props){const{text,tag,align,defaultFont,highlightFont,defaultColor,highlightColor,style,highlightOffset}=props;const Tag=tag;return /*#__PURE__*/_jsx(Tag,{style:{display:\"block\",fontWeight:\"normal\",textAlign:align,margin:0,...style},children:parseStyledText(text).map((node,index)=>{const isHighlight=/*#__PURE__*/React.isValidElement(node)&&node.props[\"data-highlighted\"];const font=isHighlight?highlightFont:defaultFont;const color=isHighlight?highlightColor:defaultColor;const shouldOffset=isHighlight&&highlightOffset;return /*#__PURE__*/_jsx(\"span\",{style:{...font,color,display:\"inline\",...shouldOffset?{marginLeft:-10}:{}},children:/*#__PURE__*/React.isValidElement(node)?node.props.children:node},index);})});}StyledTitle.defaultProps={text:\"This is *highlighted* text\",tag:\"h1\",align:\"left\",defaultColor:\"#000000\",highlightColor:\"#ff3366\",defaultFont:{fontSize:32,fontWeight:500,textAlign:\"left\"},highlightFont:{fontSize:32,fontWeight:700,textAlign:\"left\"}};addPropertyControls(StyledTitle,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,placeholder:\"Wrap *highlighted* parts in asterisks\"},highlightOffset:{type:ControlType.Boolean,title:\"Offset Start Highlight\",defaultValue:false},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\"]},align:{type:ControlType.Enum,title:\"Alignment\",options:[\"left\",\"center\"],optionTitles:[\"Left\",\"Center\"],defaultValue:\"left\",displaySegmentedControl:true},defaultFont:{type:ControlType.Font,title:\"Default Font\",controls:\"extended\"},highlightFont:{type:ControlType.Font,title:\"Highlight Font\",controls:\"extended\"},defaultColor:{type:ControlType.Color,title:\"Default Color\"},highlightColor:{type:ControlType.Color,title:\"Highlight Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"StyledTitle\":{\"type\":\"reactComponent\",\"name\":\"StyledTitle\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Styled_Multiline_Text.map"],"mappings":"yMAC8B,GAAU,UAAU,CAAC,qBAAqB,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,cAAc,OAAO,SAAS,IAAI,wEAAwE,CAAC,CAAC,CAAC,CAAc,EAAI,CAAC,mtBAAmtB,CAAc,EAAU,kBCDlyB,SAAS,EAAgB,EAAK,CAA0C,OAA1B,EAAK,MAAM,cAAc,CAAiB,KAAK,EAAQ,IAAY,EAAQ,WAAW,IAAI,EAAE,EAAQ,SAAS,IAAI,CAAsB,EAAK,OAAO,CAAC,mBAAmB,GAAK,SAAS,EAAQ,MAAM,EAAE,GAAG,CAAC,CAAC,EAAM,CAAsB,EAAK,OAAO,CAAC,SAAS,EAAQ,CAAC,EAAM,CAAG,CAAE,SAAgB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,MAAI,QAAM,cAAY,gBAAc,eAAa,iBAAe,QAAM,mBAAiB,EAAoB,OAAoB,EAAxB,EAAiC,CAAC,MAAM,CAAC,QAAQ,QAAQ,WAAW,SAAS,UAAU,EAAM,OAAO,EAAE,GAAG,EAAM,CAAC,SAAS,EAAgB,EAAK,CAAC,KAAK,EAAK,IAAQ,CAAC,IAAM,EAAyB,EAAqB,EAAK,EAAE,EAAK,MAAM,oBAA0B,EAAK,EAAY,EAAc,EAAkB,EAAM,EAAY,EAAe,EAAmB,EAAa,GAAa,EAAgB,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAK,QAAM,QAAQ,SAAS,GAAG,EAAa,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,CAAC,SAAsB,EAAqB,EAAK,CAA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