{"version":3,"file":"EllipsisText.DHypAzxM.mjs","names":[],"sources":["https:/framerusercontent.com/modules/4KYyJae8T7Ir4P2jB9TP/cvEF8rFafWyNQ16kdkd0/EllipsisText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * Text Ellipsis Component\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function EllipsisText(props){const{text,maxLength,ellipsisCharacter,font,textColor,style}=props;const truncatedText=useMemo(()=>{if(text.length<=maxLength)return text;return text.slice(0,maxLength)+ellipsisCharacter;},[text,maxLength,ellipsisCharacter]);const isFixedWidth=style?.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",...isFixedWidth?{width:\"100%\"}:{width:\"max-content\"},...font,color:textColor},children:truncatedText});}addPropertyControls(EllipsisText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is a long text that will be truncated with an ellipsis\",displayTextArea:true},maxLength:{type:ControlType.Number,title:\"Max Length\",defaultValue:20,min:1,max:1e3,step:1},ellipsisCharacter:{type:ControlType.String,title:\"Ellipsis\",defaultValue:\"...\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:16,lineHeight:1.5,letterSpacing:0,textAlign:\"left\"},controls:\"extended\"},textColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EllipsisText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EllipsisText.map"],"mappings":"kQAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,YAAU,oBAAkB,OAAK,YAAU,QAAM,CAAC,EAAY,EAAc,EAAQ,IAAQ,EAAK,QAAQ,EAAiB,EAAY,EAAK,MAAM,EAAE,EAAU,CAAC,EAAoB,CAAC,EAAK,EAAU,CAAkB,EAAC,CAAO,EAAa,GAAO,QAAQ,OAAO,MAAoB,GAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,GAAG,EAAa,CAAC,MAAM,MAAO,EAAC,CAAC,MAAM,aAAc,EAAC,GAAG,EAAK,MAAM,CAAU,EAAC,SAAS,CAAc,EAAC,AAAE,cAAA,AAJ5d,GAA2C,IAAoD,IAA2B,CAIkW,EAAoB,EAAa,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,8DAA8D,iBAAgB,CAAK,EAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,KAAK,CAAE,EAAC,kBAAkB,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,KAAM,EAAC,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,aAAa,CAAC,SAAS,GAAG,WAAW,IAAI,cAAc,EAAE,UAAU,MAAO,EAAC,SAAS,UAAW,EAAC,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,SAAU,CAAC,EAAC"}