{"version":3,"file":"KeyHighlightsGrid.CFBwVdds.mjs","names":["React.Fragment","__esmMin","init_npm_react_18_3_1","x","init_jsx_runtime","c","p","ControlType","RenderTarget","init_framer_DxfB3JJo","addPropertyControls","hasContent","value","collectHighlights","pairs","props","filled","i","RichText","KeyHighlightsGrid","isCanvas","highlights","safeColumns","columns","totalGap","gap","containerStyle","STYLES","cardStyle","minCardWidth","verticalAlign","bodySize","statStyle","statSize","titleColor","richStyle","textColor","usePlaceholders","items","cards","inner","item","useMotion","animate","finalStyle","index","STYLE_TEXT","richTextControl","init_KeyHighlightsGrid"],"sources":["https:/framerusercontent.com/modules/L7ROUUoZtL7zkXiHzNSa/1SBBroQVJqV24EpQROTq/KeyHighlightsGrid.js"],"sourcesContent":["// @ts-nocheck\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// ── Styles ────────────────────────────────────────────────────\nconst STYLES={container:{display:\"flex\",flexWrap:\"wrap\",width:\"100%\",// The whole point: each wrapped line sizes to its own tallest card,\n// then every card in that line is stretched to match it.\nalignItems:\"stretch\",// Never distribute leftover height across the lines.\nalignContent:\"flex-start\"},card:{display:\"flex\",flexDirection:\"column\",// No fixed height anywhere — the card reports its content height so\n// the line can find the tallest, then alignItems stretches it.\nheight:\"auto\",boxSizing:\"border-box\",overflow:\"hidden\"},stat:{margin:0,fontFamily:\"DM Sans, sans-serif\",fontWeight:700,letterSpacing:\"-0.04em\",lineHeight:1.05},richWrapper:{fontFamily:\"DM Sans, sans-serif\",fontWeight:400,lineHeight:1.4}};/**\n * A single constant stylesheet, deliberately not per-instance and not\n * derived from props. An instance-scoped id (React.useId) differs between\n * the server and client render, which mismatches on hydration; React then\n * abandons the subtree, no effects run, and anything relying on JS to\n * become visible is stranded forever. Everything here is prop-independent:\n * rich text inherits colour and size from the wrapper's inline style.\n *\n * The entrance is a CSS keyframe rather than a JS animation for the same\n * reason. Cards are visible by default; the animation only ever takes them\n * from hidden to shown, so if it never runs the content is still there.\n */const STYLE_TEXT=[\".khg-rich, .khg-rich * { color: inherit; }\",\".khg-rich p, .khg-rich li { margin: 0; font-size: inherit; line-height: inherit; }\",\".khg-rich p + p { margin-top: 0.5em; }\",\".khg-rich ul, .khg-rich ol { margin: 0; padding-left: 1.2em; }\",\".khg-rich a { color: inherit; text-decoration: underline; }\",\"@keyframes khg-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }\",\".khg-in { animation: khg-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }\",\"@media (prefers-reduced-motion: reduce) { .khg-in { animation: none; } }\"].join(\"\\n\");// ── Helpers ───────────────────────────────────────────────────\n/**\n * A rich text prop arrives as an HTML string when it's bound to a CMS\n * rich text field, and as a React node when it's authored in the property\n * panel. Both have to count as content, and an \"empty\" CMS field is\n * usually markup like <p></p> rather than an empty string.\n */function hasContent(value){if(value===null||value===undefined||value===false)return false;if(typeof value===\"string\"){const stripped=value.replace(/<[^>]*>/g,\"\").replace(/&nbsp;|&#160;|&#xa0;/gi,\" \")// non-breaking space and zero-width characters read as content to\n// .trim() but are visually empty\n.replace(/[\\u00a0\\u200b\\u200c\\u200d\\ufeff]/g,\" \").trim();return stripped.length>0;}return true;}function collectHighlights(props){const pairs=[{stat:props.stat1,body:props.body1},{stat:props.stat2,body:props.body2},{stat:props.stat3,body:props.body3},{stat:props.stat4,body:props.body4},{stat:props.stat5,body:props.body5},{stat:props.stat6,body:props.body6}];const filled=[];for(let i=0;i<pairs.length;i++){// The stat is the required field: no stat, no card. A body left\n// behind in an otherwise unused slot must not resurrect it, which\n// matters because CMS rich text fields are rarely truly empty.\n// A stat with no body is fine and renders as a stat-only card.\nif(hasContent(pairs[i].stat)){filled.push(pairs[i]);}}return filled;}function RichText(props){if(typeof props.value===\"string\"){return /*#__PURE__*/_jsx(\"div\",{className:\"khg-rich\",style:props.style,dangerouslySetInnerHTML:{__html:props.value}});}return /*#__PURE__*/_jsx(\"div\",{className:\"khg-rich\",style:props.style,children:props.value});}// ── Component ─────────────────────────────────────────────────\n/**\n * KeyHighlightsGrid - wrapping highlight cards where each row hugs its\n * tallest card and the rest of that row stretch to match it.\n *\n * Takes six flat stat/body pairs rather than an array, because Framer\n * cannot bind a CMS list to an array prop. Bodies are rich text. Empty\n * pairs are dropped, so a case study with three highlights renders three\n * cards.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function KeyHighlightsGrid(props){const{columns=3,gap=12,minCardWidth=365,growLastRow=true,verticalAlign=\"bottom\",backgroundColor=\"#0D7154\",titleColor=\"#FFFFFF\",textColor=\"#FFFFFF\",borderRadius=14,padding=28,statSize=34,bodySize=16,animate=true}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const highlights=collectHighlights(props);const safeColumns=columns<1?1:columns;const totalGap=gap*(safeColumns-1);const containerStyle={...STYLES.container,gap:gap,maxWidth:\"100%\"};const cardStyle={...STYLES.card,// Basis is exactly one column wide. flexGrow only has slack to act on\n// in a row that isn't full — which is what spans the orphan card.\nflexGrow:growLastRow?1:0,flexShrink:1,flexBasis:\"calc((100% - \"+totalGap+\"px) / \"+safeColumns+\")\",// min() is load-bearing: a bare min-width refuses to shrink, so on a\n// hugged parent the grid demands columns * minCardWidth and overflows\n// the frame. Capping at 100% lets it wrap to fewer columns instead.\nminWidth:\"min(100%, \"+minCardWidth+\"px)\",justifyContent:verticalAlign===\"top\"?\"flex-start\":\"flex-end\",backgroundColor:backgroundColor,borderRadius:borderRadius,padding:padding,gap:Math.round(bodySize*.4)};const statStyle={...STYLES.stat,fontSize:statSize,color:titleColor};const richStyle={...STYLES.richWrapper,fontSize:bodySize,color:textColor};// On the component's own canvas there is no CMS record in scope, so every\n// bound prop resolves to nothing. Showing placeholder cards there keeps the\n// layout designable; in preview and production an empty grid renders\n// nothing at all rather than leaking a message onto the live site.\nconst usePlaceholders=highlights.length===0&&isCanvas;const items=usePlaceholders?[{stat:\"Stat 1\",body:\"<p>Bind Stat and Body to your CMS fields to see real content.</p>\"},{stat:\"Stat 2\",body:\"<p>Empty highlight slots are dropped automatically.</p>\"},{stat:\"Stat 3\",body:\"<p>These placeholders only appear on the canvas.</p>\"}]:highlights;if(items.length===0)return null;const cards=items.map((item,index)=>{const inner=/*#__PURE__*/_jsxs(React.Fragment,{children:[hasContent(item.stat)?typeof item.stat===\"string\"?/*#__PURE__*/_jsx(\"p\",{style:statStyle,children:item.stat}):/*#__PURE__*/_jsx(\"div\",{style:statStyle,children:item.stat}):null,hasContent(item.body)?/*#__PURE__*/_jsx(RichText,{value:item.body,style:richStyle}):null]});const useMotion=animate&&!isCanvas&&!usePlaceholders;const finalStyle=usePlaceholders?{...cardStyle,opacity:isCanvas?1:.45}:useMotion?{...cardStyle,animationDelay:index*.08+\"s\"}:cardStyle;return /*#__PURE__*/_jsx(\"div\",{className:useMotion?\"khg-in\":undefined,style:finalStyle,children:inner},index);});return /*#__PURE__*/_jsxs(\"div\",{className:\"khg-grid\",style:containerStyle,children:[/*#__PURE__*/_jsx(\"style\",{children:STYLE_TEXT}),cards]});}KeyHighlightsGrid.displayName=\"Key Highlights Grid\";const richTextControl=(title,defaultValue)=>({type:ControlType.RichText,title:title,displayTextArea:true,defaultValue:defaultValue,description:\"Rich text content, including inline formatting supported by Framer's rich text control.\"});addPropertyControls(KeyHighlightsGrid,{stat1:{type:ControlType.String,title:\"Stat 1\",defaultValue:\"50–75%\"},body1:richTextControl(\"Body 1\",\"Saves 50-75% of manual takeoff time\"),stat2:{type:ControlType.String,title:\"Stat 2\",defaultValue:\"Tailored\"},body2:richTextControl(\"Body 2\",\"Tailored to the landscaping industry\"),stat3:{type:ControlType.String,title:\"Stat 3\",defaultValue:\"3+ sources\"},body3:richTextControl(\"Body 3\",\"Multiple forms of aerial imagery\"),stat4:{type:ControlType.String,title:\"Stat 4\",defaultValue:\"1 click\"},body4:richTextControl(\"Body 4\",\"Professional proposal output\"),stat5:{type:ControlType.String,title:\"Stat 5\",defaultValue:\"\"},body5:richTextControl(\"Body 5\",\"\"),stat6:{type:ControlType.String,title:\"Stat 6\",defaultValue:\"\"},body6:richTextControl(\"Body 6\",\"\"),columns:{type:ControlType.Number,title:\"Columns\",defaultValue:3,min:1,max:6,step:1,displayStepper:true,description:\"Cards per row before wrapping\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:80,step:2},minCardWidth:{type:ControlType.Number,title:\"Min Width\",defaultValue:365,min:120,max:800,step:5,description:\"Cards wrap to fewer per row below this width\"},growLastRow:{type:ControlType.Boolean,title:\"Span Row\",defaultValue:true,enabledTitle:\"Fill\",disabledTitle:\"Column\",description:\"A short last row grows to fill the width\"},verticalAlign:{type:ControlType.Enum,title:\"Text\",defaultValue:\"bottom\",options:[\"bottom\",\"top\"],optionTitles:[\"Bottom\",\"Top\"],displaySegmentedControl:true,description:\"Bottom aligns baselines; top removes space above short copy\"},backgroundColor:{type:ControlType.Color,title:\"Card\",defaultValue:\"#0D7154\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:60,step:1},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:28,min:0,max:80,step:2},statSize:{type:ControlType.Number,title:\"Stat Size\",defaultValue:34,min:12,max:96,step:1},bodySize:{type:ControlType.Number,title:\"Body Size\",defaultValue:16,min:10,max:32,step:1},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true,description:\"Staggered entrance when the grid scrolls into view\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"KeyHighlightsGrid\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"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