{"version":3,"file":"ClampText.BYgmpF6a.mjs","names":[],"sources":["https:/framerusercontent.com/modules/epiL4Qjj14OInDieg3KN/9NBY1STlFWfGLmKnMiiQ/ClampText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Clamp Text\n *\n * Text that stops after a set number of lines and ends in an ellipsis, so cards\n * built from CMS copy of uneven length still line up. Clamping by line rather\n * than by character count means it adapts when the card narrows.\n *\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ClampText(props){const{text=\"\",lines=2,tag=\"p\",color=\"#120740\",font,lineHeight=1.3,tracking=0,balance=false}=props;const Tag=[\"p\",\"h2\",\"h3\",\"h4\",\"span\"].includes(tag)?tag:\"p\";return /*#__PURE__*/_jsx(Tag,{title:text,style:{...props.style,position:\"relative\",margin:0,width:\"100%\",color,...font,/* After the font spread on purpose: Framer's Font control stores\n                   these as [value, unit] pairs that are awkward to set per\n                   instance, so plain numbers win here. */lineHeight:`${lineHeight}em`,letterSpacing:`${tracking}em`,display:\"-webkit-box\",WebkitLineClamp:Math.max(1,Math.round(lines)),WebkitBoxOrient:\"vertical\",overflow:\"hidden\",/* Belt and braces: a single very long word would otherwise push\n                   the card wider instead of being clipped. */overflowWrap:\"anywhere\",...balance?{textWrap:\"balance\"}:null},children:text});}addPropertyControls(ClampText,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,defaultValue:\"Text\"},lines:{type:ControlType.Number,title:\"Max lines\",defaultValue:2,min:1,max:8,step:1},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"h2\",\"h3\",\"h4\",\"span\"],optionTitles:[\"Paragraph\",\"H2\",\"H3\",\"H4\",\"Span\"],defaultValue:\"p\"},color:{type:ControlType.Color,title:\"Colour\",defaultValue:\"#120740\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"18px\",variant:\"Semibold\",letterSpacing:\"-0.015em\",lineHeight:\"1.3em\"}},lineHeight:{type:ControlType.Number,title:\"Line height\",defaultValue:1.3,min:.9,max:2,step:.05,unit:\"em\"},tracking:{type:ControlType.Number,title:\"Tracking\",defaultValue:0,min:-.06,max:.2,step:.005,unit:\"em\"},balance:{type:ControlType.Boolean,title:\"Balance\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ClampText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"320\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"48\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ClampText.map"],"mappings":"4JAYG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,OAAK,GAAG,QAAM,EAAE,MAAI,IAAI,QAAM,UAAU,OAAK,aAAW,IAAI,WAAS,EAAE,UAAQ,IAAO,EAAkE,OAAoB,EAAtE,CAAC,IAAI,KAAK,KAAK,KAAK,MAAM,CAAC,CAAC,SAAS,CAAG,EAAE,EAAI,IAAiC,CAAC,MAAM,EAAK,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,OAAO,EAAE,MAAM,OAAO,QAAM,GAAG,EAElQ,WAAW,GAAG,EAAW,IAAI,cAAc,GAAG,EAAS,IAAI,QAAQ,cAAc,gBAAgB,KAAK,IAAI,EAAE,KAAK,MAAM,CAAK,CAAC,EAAE,gBAAgB,WAAW,SAAS,SAC/J,aAAa,WAAW,GAAG,EAAQ,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,SAAS,CAAI,CAAC,CAAE,iBAflG,IAAoD,EAe+C,EAAoB,EAAU,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,gBAAgB,GAAK,aAAa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