{"version":3,"file":"Section_Heading.PyIRjgNl.mjs","names":["parts","shadow","_Fragment","React.Fragment"],"sources":["https:/framerusercontent.com/modules/EBw5q6AD3r3YI356WSiP/KSOdiVvasSPBQAx0kw83/Section_Heading.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export function HighlightedHeading(props){const{text,highlightColor,textColor,font,tag,tabletSize,phoneSize,canvasBreakpoint,shadow}=props;const Tag=tag||\"h2\";const parts=text.split(/(\\{[^}]+\\})/g);const isCanvas=RenderTarget.current()===RenderTarget.canvas;let canvasFontSize={};if(isCanvas&&canvasBreakpoint===\"tablet\"){canvasFontSize={fontSize:`${tabletSize}rem`};}if(isCanvas&&canvasBreakpoint===\"phone\"){canvasFontSize={fontSize:`${phoneSize}rem`};}function boxShadowToTextShadow(value){if(!value||value===\"none\")return\"none\";return value.split(/,(?![^(]*\\))/).map(shadow=>{const parts=shadow.trim().split(/\\s+/);if(parts[0]===\"inset\"){parts.shift();}const colorStartIndex=parts.findIndex(part=>part.includes(\"rgb\")||part.includes(\"#\")||part.includes(\"hsl\"));if(colorStartIndex===-1)return shadow;const sizes=parts.slice(0,colorStartIndex);const color=parts.slice(colorStartIndex).join(\" \");const x=sizes[0]||\"0px\";const y=sizes[1]||\"0px\";const blur=sizes[2]||\"0px\";return`${x} ${y} ${blur} ${color}`;}).join(\", \");}const textShadow=boxShadowToTextShadow(shadow);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .highlighted-heading {\n                    text-wrap: balance;\n                }\n\n                @media (max-width: 809px) {\n                    .highlighted-heading {\n                        font-size: ${tabletSize}rem !important;\n                    }\n                }\n\n                @media (max-width: 390px) {\n                    .highlighted-heading {\n                        font-size: ${phoneSize}rem !important;\n                    }\n                }\n            `}),/*#__PURE__*/_jsx(Tag,{className:\"highlighted-heading\",style:{margin:0,color:textColor,width:\"100%\",whiteSpace:\"pre-line\",textShadow,...font,...canvasFontSize},children:parts.map((part,index)=>{const isHighlighted=part.startsWith(\"{\")&&part.endsWith(\"}\");const cleanText=isHighlighted?part.slice(1,-1):part;return isHighlighted?/*#__PURE__*/_jsx(\"span\",{style:{color:highlightColor},children:cleanText},index):/*#__PURE__*/_jsx(React.Fragment,{children:cleanText},index);})})]});}HighlightedHeading.defaultProps={text:\"Why companies choose a\\n{structured} rewarding program\",highlightColor:\"#98AFAE\",textColor:\"#222222\",tag:\"h2\",tabletSize:2.625,phoneSize:2,canvasBreakpoint:\"desktop\",shadow:\"\"};addPropertyControls(HighlightedHeading,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,description:\"Wrap any word or phrase in {brackets} to highlight it. Use a new line in this field to force a line break.\"},highlightColor:{type:ControlType.Color,title:\"Highlight\"},textColor:{type:ControlType.Color,title:\"Text Color\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"\"},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"h1\",\"h2\",\"h3\",\"p\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"Paragraph\"]},tabletSize:{type:ControlType.Number,title:\"Tablet REM\",min:.5,max:10,step:.025},phoneSize:{type:ControlType.Number,title:\"Phone REM\",min:.5,max:10,step:.025},canvasBreakpoint:{type:ControlType.Enum,title:\"Canvas Size\",options:[\"desktop\",\"tablet\",\"phone\"],optionTitles:[\"Desktop\",\"Tablet\",\"Phone\"],description:\"Only affects the Framer canvas. Published site uses real breakpoints.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"HighlightedHeading\":{\"type\":\"reactComponent\",\"name\":\"HighlightedHeading\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1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