{"version":3,"file":"Truncado.D4giZkCb.mjs","names":[],"sources":["https:/framerusercontent.com/modules/T3Soa4ZpY7uWgvXvCDgb/t6QUSTe6MkOwM6vIONLT/Truncado.js"],"sourcesContent":["// Importações necessárias\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// Definição do componente\nexport function CustomTextComponent(props){const{// Prioridade Alta: Fontes e Estilos Básicos\nfont,color,fontSize,// Conteúdo\ncontent,maxCharacters,sectionsText,// Layout e Estilização Avançada\nalign,letterSpacing,lineHeight,balance,maxInlineSize,paragraphSpacing}=props;// Função para truncar o texto\nconst truncateText=(text,max)=>{if(max<=0)return text;if(text.length<=max)return text;return text.substring(0,max)+\"...\";};// Aplicar limite de caracteres\nconst displayedContent=maxCharacters?truncateText(content,maxCharacters):content;// Dividir o conteúdo em parágrafos com base em dois ou mais espaços\nconst paragraphs=displayedContent.split(/ {2,}/g);// Estilos do texto\nconst textStyle={fontFamily:font.fontFamily||\"Arial\",fontWeight:font.fontWeight,fontSize:fontSize||\"16px\",color:color,letterSpacing:`${letterSpacing}px`,lineHeight:`${lineHeight}%`,textAlign:align,...balance&&{maxInlineSize:maxInlineSize||\"50ch\",textWrap:\"balance\"}};return /*#__PURE__*/_jsxs(\"div\",{children:[paragraphs.map((para,index)=>/*#__PURE__*/_jsx(\"p\",{style:{marginBottom:index!==paragraphs.length-1?paragraphSpacing:0,...textStyle},children:para},index)),/*#__PURE__*/_jsx(\"p\",{children:sectionsText})]});}// Propriedades padrão do componente\nCustomTextComponent.defaultProps={font:{fontFamily:\"Arial\",fontWeight:400},color:\"#000\",fontSize:24,content:\"Impulsione os seus projetos criando solu\\xe7\\xf5es inovadoras...\",maxCharacters:100,align:\"left\",letterSpacing:1,lineHeight:120,balance:false,maxInlineSize:\"50ch\",paragraphSpacing:16};CustomTextComponent.displayName=\"UncodeTruncate\";// Controles de propriedades para o Framer\naddPropertyControls(CustomTextComponent,{font:{title:\"Font\",type:ControlType.Font,description:\"Escolha a fam\\xedlia da fonte / Choose the font family\"},fontSize:{title:\"Font Size\",type:ControlType.Number,min:8,max:200,step:1,description:\"Defina o tamanho da fonte / Set the font size\"},color:{title:\"Color\",type:ControlType.Color,description:\"Escolha a cor da fonte / Choose the text color\"},content:{title:\"Content\",type:ControlType.String,displayTextArea:true,description:\"Texto a ser exibido / Text to display\"},maxCharacters:{title:\"Max Characters\",type:ControlType.Number,min:0,step:1,description:\"N\\xfamero m\\xe1ximo de caracteres exibidos / Maximum number of characters displayed\"},align:{title:\"Align\",type:ControlType.Enum,options:[\"left\",\"center\",\"right\",\"justify\"],optionTitles:[\"Left\",\"Center\",\"Right\",\"Justify\"],description:\"Alinhamento do texto / Text alignment\"},letterSpacing:{title:\"Letter Spacing\",type:ControlType.Number,min:0,step:.1,description:\"Espa\\xe7amento entre as letras / Letter spacing\"},lineHeight:{title:\"Line Height\",type:ControlType.Number,unit:\"%\",min:50,step:10,description:\"Altura da linha em porcentagem / Line height percentage\"},balance:{title:\"Balance Text\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Ativa o balanceamento do texto / Enables text balancing\"},maxInlineSize:{title:\"Max Inline Size\",type:ControlType.String,defaultValue:\"50ch\",hidden:props=>!props.balance,description:\"Tamanho m\\xe1ximo da linha / Maximum inline size\"},paragraphSpacing:{title:\"Spacing Between Paragraphs\",type:ControlType.Number,unit:\"px\",min:0,step:1,description:\"Espa\\xe7amento entre par\\xe1grafos / Spacing between paragraphs\"},codeBy:{type:ControlType.String,title:\" \",defaultValue:\"Code by @omatusaelhorch\",readOnly:true,description:\"Este componente foi criado por @omatusaelhorch. / This component was created by @omatusaelhorch.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"CustomTextComponent\":{\"type\":\"reactComponent\",\"name\":\"CustomTextComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Truncado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