{"version":3,"file":"Truncate.SyZOACo7.mjs","names":[],"sources":["https:/framerusercontent.com/modules/BNaVikm3gS57U2dZTIB0/aKasuP9bA0WROXLlfEfb/Truncate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import*as React from\"react\";/**\n * Text Truncate\n * By Rizki Hidayatul Fadli\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n * @framerDisableEdit\n *\n * @framerSupportedLayoutWidth\n * @framerSupportedLayoutHeight\n */export function TextTruncate(props){const{text,maxLines,font}=props;const truncateStyle={display:\"-webkit-box\",WebkitLineClamp:maxLines,WebkitBoxOrient:\"vertical\",overflow:\"hidden\",textOverflow:\"ellipsis\",fontSize:`${font.size}px`,fontFamily:font.fontFace,fontWeight:font.weight,color:font.color,width:\"100%\",letterSpacing:`${font.letterSpacing}px`,lineHeight:font.lineHeight,textAlign:font.textAlign.toLowerCase(),whiteSpace:\"normal\"};React.useEffect(()=>{// Re-render when props change\n},[text,maxLines,font]);return /*#__PURE__*/_jsx(\"div\",{style:truncateStyle,children:text});}// Property Controls\naddPropertyControls(TextTruncate,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is a sample text that will be truncated after a certain number of lines.\"},maxLines:{type:ControlType.Number,title:\"Max Lines\",defaultValue:2,min:1,max:10,step:1},font:{description:\"Need any help? [Contact me](https://x.com/RizkiHFadli)\",type:ControlType.Object,controls:{fontFace:{type:ControlType.String,defaultValue:\"Outfit, sans-serif\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:16,min:8,max:64,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},weight:{type:ControlType.Number,title:\"Weight\",min:50,max:1e3,step:50,defaultValue:300},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing\",defaultValue:0,min:-10,max:10,step:.1},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.2,min:1,max:3,step:.1},textAlign:{type:ControlType.Enum,options:[\"Left\",\"Center\",\"Right\",\"Justify\"],title:\"Text Align\",defaultValue:\"left\"}}}});// Display Name\nTextTruncate.displayName=\"Text Truncate\";\nexport const __FramerMetadata__ = {\"exports\":{\"TextTruncate\":{\"type\":\"reactComponent\",\"name\":\"TextTruncate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutWidth\":\"* @framerSupportedLayoutHeight\",\"framerDisableUnlink\":\"* @framerDisableEdit\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Truncate.map"],"mappings":"qKAWG,SAAgB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,WAAS,QAAM,EAAY,EAAc,CAAC,QAAQ,cAAc,gBAAgB,EAAS,gBAAgB,WAAW,SAAS,SAAS,aAAa,WAAW,SAAS,GAAG,EAAK,KAAK,IAAI,WAAW,EAAK,SAAS,WAAW,EAAK,OAAO,MAAM,EAAK,MAAM,MAAM,OAAO,cAAc,GAAG,EAAK,cAAc,IAAI,WAAW,EAAK,WAAW,UAAU,EAAK,UAAU,aAAa,CAAC,WAAW,SAAS,CAC9Z,OAD+Z,MAAoB,GACzc,CAAC,EAAK,EAAS,EAAK,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,EAAc,SAAS,EAAK,CAAC,kBAZhD,IAAoD,IAA4B,CAa3H,EAAoB,EAAa,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,gFAAgF,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC,KAAK,CAAC,YAAY,yDAAyD,KAAK,EAAY,OAAO,SAAS,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,aAAa,qBAAqB,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aA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