{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/BNaVikm3gS57U2dZTIB0/FaRTSnJzfb0JLknMPjYt/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 fixed\n * @framerSupportedLayoutHeight any\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\":{\"framerDisableUnlink\":\"* @framerDisableEdit\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Truncate.map"],
  "mappings": "gGAWU,SAASA,EAAaC,EAAM,CAAC,GAAK,CAAC,KAAAC,EAAK,SAAAC,EAAS,KAAAC,CAAI,EAAEH,EAAYI,EAAc,CAAC,QAAQ,cAAc,gBAAgBF,EAAS,gBAAgB,WAAW,SAAS,SAAS,aAAa,WAAW,SAAS,GAAGC,EAAK,IAAI,KAAK,WAAWA,EAAK,SAAS,WAAWA,EAAK,OAAO,MAAMA,EAAK,MAAM,MAAM,OAAO,cAAc,GAAGA,EAAK,aAAa,KAAK,WAAWA,EAAK,WAAW,UAAUA,EAAK,UAAU,YAAY,EAAE,WAAW,QAAQ,EAAE,OAAME,EAAU,IAAI,CAC3c,EAAE,CAACJ,EAAKC,EAASC,CAAI,CAAC,EAAsBG,EAAK,MAAM,CAAC,MAAMF,EAAc,SAASH,CAAI,CAAC,CAAE,CAC5FM,EAAoBR,EAAa,CAAC,KAAK,CAAC,KAAKS,EAAY,OAAO,MAAM,OAAO,aAAa,+EAA+E,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,yDAAyD,KAAKA,EAAY,OAAO,SAAS,CAAC,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,oBAAoB,EA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