{"version":3,"file":"TruncatedText.C4FBaUse.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/ADXKUVFZan2suLO0qSf8/ttq34tCkMe3bj9AosulV/TruncatedText.js"],"sourcesContent":["// Text component with character limit and ellipsis, customizable font and color, supports Framer style prop\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * TruncatedText\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function TruncatedText(props){const{text,charLimit,font,color,style}=props;const displayText=useMemo(()=>{if(!text)return\"...\";if(text.length<=charLimit)return text;return text.slice(0,Math.max(0,charLimit))+\"...\";},[text,charLimit]);return /*#__PURE__*/_jsx(\"span\",{style:{...style||{},...font,color,width:style&&style.width===\"100%\"?\"100%\":\"max-content\",minWidth:0,display:\"inline-block\",whiteSpace:\"pre-line\"},children:displayText});}addPropertyControls(TruncatedText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is a sample text for the TruncatedText component.\",displayTextArea:true},charLimit:{type:ControlType.Number,title:\"Char Limit\",defaultValue:30,min:1,max:500,step:1,displayStepper:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TruncatedText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TruncatedText.map"],"mappings":"0KAMG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,YAAU,OAAK,QAAM,SAAO,EAAY,EAAYA,MAAiB,EAAoB,EAAK,QAAQ,EAAiB,EAAY,EAAK,MAAM,EAAE,KAAK,IAAI,EAAE,CAAS,CAAC,EAAE,MAAvF,MAA+F,CAAC,EAAK,CAAS,CAAC,EAAE,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,GAAO,CAAC,EAAE,GAAG,EAAK,QAAM,MAAM,GAAO,EAAM,QAAQ,OAAO,OAAO,cAAc,SAAS,EAAE,QAAQ,eAAe,WAAW,UAAU,EAAE,SAAS,CAAW,CAAC,CAAE,iBAL5Z,IAAoD,IAA2B,EAK8U,EAAoB,EAAc,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,yDAAyD,gBAAgB,EAAI,EAAE,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,eAAe,EAAI,EAAE,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,gBAAgB,aAAa,aAAa,CAAC,SAAS,OAAO,QAAQ,SAAS,cAAc,UAAU,WAAW,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,SAAS,CAAC,CAAC"}