{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/JwilHZma1SU7ROBEj3yZ/7LpAwNhALxvaVKkgWjmx/MixedFontText.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function MixedFontText(props){const containerStyle={height:\"100%\",fontFamily:props.fontFamily,fontSize:`${props.fontSize}px`,lineHeight:`${props.lineHeight}px`,color:props.color,display:\"-webkit-box\",overflow:\"visible\",WebkitBoxOrient:\"vertical\",textAlign:props.textAlign,textWrap:props.textBalance?\"balance\":\"initial\",fontWeight:400};const italicsStyle={fontFamily:props.highlightFontFamily,color:props.highlight,fontStyle:\"normal\"};// Function to replace asterisks with <em> tags\nconst parseText=text=>{const regex=/(\\*.*?\\*)/g;const parts=text.split(regex);return parts.map((part,index)=>{if(part.startsWith(\"*\")&&part.endsWith(\"*\")){const content=part.substring(1,part.length-1);return /*#__PURE__*/_jsx(\"em\",{style:italicsStyle,children:content},index);}return part;});};// Conditional rendering based on textElementType prop\nconst Element=props.textElementType===\"h1\"?\"h1\":\"p\";return /*#__PURE__*/_jsx(Element,{style:containerStyle,children:parseText(props.text)});}MixedFontText.defaultProps={text:\"This is my case study *summary* with *highlighted words*.\",fontFamily:\"'Haas Grot Disp R Web 55 Roman'\",highlightFontFamily:\"'Haas Grot Disp R Web 75 Bold'\",fontSize:20,lineHeight:24,color:\"black\",highlight:\"blue\",textElementType:\"p\"};addPropertyControls(MixedFontText,{text:{type:ControlType.String,title:\"Text\"},fontFamily:{type:ControlType.String,title:\"Font family\"},highlightFontFamily:{type:ControlType.String,title:\"Highlight font family\"},fontSize:{title:\"Font size\",type:ControlType.Number},lineHeight:{title:\"Line height\",type:ControlType.Number},color:{title:\"Color\",type:ControlType.Color},highlight:{title:\"Highlight color\",type:ControlType.Color},textAlign:{type:ControlType.Enum,defaultValue:\"left\",displaySegmentedControl:true,options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"]},textBalance:{type:ControlType.Boolean,defaultValue:false,title:\"Balance\",enabledTitle:\"Yes\",disabledTitle:\"No\"},textElementType:{type:ControlType.Enum,title:\"Element Type\",options:[\"h1\",\"p\"],optionTitles:[\"Heading 1 (h1)\",\"Paragraph (p)\"],defaultValue:\"p\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MixedFontText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MixedFontText.map"],
  "mappings": "gGAAAA,IAMkB,SAARC,EAA+BC,EAAM,CAAC,IAAMC,EAAe,CAAC,OAAO,OAAO,WAAWD,EAAM,WAAW,SAAS,GAAGA,EAAM,QAAQ,KAAK,WAAW,GAAGA,EAAM,UAAU,KAAK,MAAMA,EAAM,MAAM,QAAQ,cAAc,SAAS,UAAU,gBAAgB,WAAW,UAAUA,EAAM,UAAU,SAASA,EAAM,YAAY,UAAU,UAAU,WAAW,GAAG,EAAQE,EAAa,CAAC,WAAWF,EAAM,oBAAoB,MAAMA,EAAM,UAAU,UAAU,QAAQ,EAC5bG,EAAUC,GAAM,CAAC,IAAMC,EAAM,aAA2C,OAAlBD,EAAK,MAAMC,CAAK,EAAe,IAAI,CAACC,EAAKC,IAAQ,CAAC,GAAGD,EAAK,WAAW,GAAG,GAAGA,EAAK,SAAS,GAAG,EAAE,CAAC,IAAME,EAAQF,EAAK,UAAU,EAAEA,EAAK,OAAO,CAAC,EAAE,OAAoBG,EAAK,KAAK,CAAC,MAAMP,EAAa,SAASM,CAAO,EAAED,CAAK,CAAE,CAAC,OAAOD,CAAK,CAAC,CAAE,EAC9RI,EAAQV,EAAM,kBAAkB,KAAK,KAAK,IAAI,OAAoBS,EAAKC,EAAQ,CAAC,MAAMT,EAAe,SAASE,EAAUH,EAAM,IAAI,CAAC,CAAC,CAAE,CAACD,EAAc,aAAa,CAAC,KAAK,4DAA4D,WAAW,kCAAkC,oBAAoB,iCAAiC,SAAS,GAAG,WAAW,GAAG,MAAM,QAAQ,UAAU,OAAO,gBAAgB,GAAG,EAAEY,EAAoBZ,EAAc,CAAC,KAAK,CAAC,KAAKa,EAAY,OAAO,MAAM,MAAM,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,EAAE,oBAAoB,CAAC,KAAKA,EAAY,OAAO,MAAM,uBAAuB,EAAE,SAAS,CAAC,MAAM,YAAY,KAAKA,EAAY,MAAM,EAAE,WAAW,CAAC,MAAM,cAAc,KAAKA,EAAY,MAAM,EAAE,MAAM,CAAC,MAAM,QAAQ,KAAKA,EAAY,KAAK,EAAE,UAAU,CAAC,MAAM,kBAAkB,KAAKA,EAAY,KAAK,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,aAAa,OAAO,wBAAwB,GAAK,QAAQ,CAAC,OAAO,SAAS,OAAO,EAAE,aAAa,CAAC,OAAO,SAAS,OAAO,CAAC,EAAE,YAAY,CAAC,KAAKA,EAAY,QAAQ,aAAa,GAAM,MAAM,UAAU,aAAa,MAAM,cAAc,IAAI,EAAE,gBAAgB,CAAC,KAAKA,EAAY,KAAK,MAAM,eAAe,QAAQ,CAAC,KAAK,GAAG,EAAE,aAAa,CAAC,iBAAiB,eAAe,EAAE,aAAa,GAAG,CAAC,CAAC",
  "names": ["init_ssg_sandbox_shims", "MixedFontText", "props", "containerStyle", "italicsStyle", "parseText", "text", "regex", "part", "index", "content", "p", "Element", "addPropertyControls", "ControlType"]
}
