{"version":3,"file":"Text_truncate.BscEJBf9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/pajS0hBm5oB6tK2CXDkM/bfbrcz4yXnopzrmCfYbG/Text_truncate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * A Framer override that truncates text to a specific number of lines.\n * Apply this override to any text element to control multi-line text overflow.\n *\n * @param Component - The component to wrap with truncation functionality\n * @returns A new component with text truncation applied\n */export function withTextTruncate(Component){function TextTruncateOverride(props){const{maxRows=3,showEllipsis=true,style,...rest}=props;// Create the truncation styles\nconst truncateStyles={display:\"-webkit-box\",WebkitLineClamp:maxRows,WebkitBoxOrient:\"vertical\",overflow:\"hidden\",textOverflow:showEllipsis?\"ellipsis\":\"clip\"};// Merge with the original style prop, ensuring original styles are preserved\nconst mergedStyles={...style,...truncateStyles};// Pass all props to the original component, with our modified style\nreturn /*#__PURE__*/_jsx(Component,{...rest,style:mergedStyles});}// Set up property controls for the override\naddPropertyControls(TextTruncateOverride,{maxRows:{type:ControlType.Number,title:\"Max Lines\",defaultValue:3,min:1,max:10,step:1,displayStepper:true},showEllipsis:{type:ControlType.Boolean,title:\"Show Ellipsis\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}});return TextTruncateOverride;}// Usage example:\n// 1. Import this file in your Framer project\n// 2. Select a text component on the canvas\n// 3. In the Properties panel, add an Override and select \"withTextTruncate\"\n// 4. Configure the number of lines and ellipsis option in the Properties panel\n\nexport const __FramerMetadata__ = {\"exports\":{\"withTextTruncate\":{\"type\":\"reactHoc\",\"name\":\"withTextTruncate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_truncate.map"],"mappings":"4JAMG,SAAgB,EAAiB,EAAU,CAAC,SAAS,EAAqB,EAAM,CAAC,GAAK,CAAC,UAAQ,EAAE,eAAa,GAAK,QAAM,GAAG,GAAM,EAC/H,EAAe,CAAC,QAAQ,cAAc,gBAAgB,EAAQ,gBAAgB,WAAW,SAAS,SAAS,aAAa,EAAa,WAAW,OAAO,CACvJ,EAAa,CAAC,GAAG,EAAM,GAAG,EAAe,CAC/C,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAK,MAAM,EAAa,CAAC,CAC6M,OAA7Q,EAAoB,EAAqB,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,eAAe,GAAK,CAAC,aAAa,CAAC,KAAK,EAAY,QAAQ,MAAM,gBAAgB,aAAa,GAAK,aAAa,MAAM,cAAc,KAAK,CAAC,CAAC,CAAQ,mBAVzO,IAAoD"}