From 4b36db0b03a830e9175c796f0b40fbccec0a357d Mon Sep 17 00:00:00 2001 From: omattaeus Date: Fri, 10 Jan 2025 17:52:13 -0300 Subject: [PATCH] correcao na barra de progresso form, animacao oppening --- .deco/blocks/Abertura%20Home.json | 17 ++- .../pages-My%2520New%2520Page-461078.json | 2 +- components/ui/Content/BigNumber/index.tsx | 6 - components/ui/Content/Openning/index.tsx | 95 ++++++++++++++++ components/ui/Content/Openning/script.tsx | 65 +++++++++++ components/ui/Form/FixedSectionForm/index.tsx | 64 +---------- components/ui/Form/Input/index.tsx | 12 +- components/ui/Form/InputRadio/index.tsx | 107 ++++++++---------- components/ui/Form/index.tsx | 32 +----- components/ui/Form/script.tsx | 78 +++++++++---- components/ui/Galery/GaleryContent/index.tsx | 12 +- components/ui/Galery/GaleryContent/script.tsx | 63 +++++++++++ package-lock.json | 8 +- package.json | 2 +- sections/Final/Form/InputRadio.tsx | 6 +- sections/Final/Headers/Openning.tsx | 101 +++++------------ sections/FormSection.tsx | 16 +-- sections/FormSteps.tsx | 2 +- tailwind.css | 15 +++ 19 files changed, 417 insertions(+), 286 deletions(-) create mode 100644 components/ui/Content/Openning/index.tsx create mode 100644 components/ui/Content/Openning/script.tsx create mode 100644 components/ui/Galery/GaleryContent/script.tsx diff --git a/.deco/blocks/Abertura%20Home.json b/.deco/blocks/Abertura%20Home.json index 604e8be..ad18759 100644 --- a/.deco/blocks/Abertura%20Home.json +++ b/.deco/blocks/Abertura%20Home.json @@ -2,5 +2,20 @@ "__resolveType": "site/sections/Final/Headers/Openning.tsx", "title": "Gestão inteligente para sonhar mais", "highlight": "sonhar mais", - "subtitleDescription": "A Linked entende as dores do seu negócio e pode te ajudar a economizar e lucrar" + "subtitleDescription": "A Linked entende as dores do seu negócio e pode te ajudar a economizar e lucrar", + "open": [ + { + "title": "Gestão inteligente para sonhar mais", + "highlight": "sonhar mais", + "subtitleDescription": "A Linked entende as dores do seu negócio e pode te ajudar a economizar e lucrar" + }, + { + "title": "Gestão inteligente para sonhar mais", + "highlight": "sonhar mais" + }, + { + "title": "Gestão inteligente para sonhar mais", + "highlight": "sonhar mais" + } + ] } \ No newline at end of file diff --git a/.deco/blocks/pages-My%2520New%2520Page-461078.json b/.deco/blocks/pages-My%2520New%2520Page-461078.json index 39e3bdb..a5b69b1 100644 --- a/.deco/blocks/pages-My%2520New%2520Page-461078.json +++ b/.deco/blocks/pages-My%2520New%2520Page-461078.json @@ -129,7 +129,7 @@ } ], "text": "Teste", - "name": "Teste" + "name": "radio" }, "title": "Teste", "text": "Teste", diff --git a/components/ui/Content/BigNumber/index.tsx b/components/ui/Content/BigNumber/index.tsx index 1962358..925e1fa 100644 --- a/components/ui/Content/BigNumber/index.tsx +++ b/components/ui/Content/BigNumber/index.tsx @@ -29,12 +29,6 @@ function setClass(value: string) { } } -/* Descrição do component -*asdasd -*asd -*asd -*/ - function BigNumber( { number, description, colorTheme }: JSX.IntrinsicElements["div"] & Props, ) { diff --git a/components/ui/Content/Openning/index.tsx b/components/ui/Content/Openning/index.tsx new file mode 100644 index 0000000..a68bced --- /dev/null +++ b/components/ui/Content/Openning/index.tsx @@ -0,0 +1,95 @@ +import Script, { type Props } from "./script.tsx"; + +export interface Open { + /** + * @title Título + * @description Escreva aqui o título da abertura + */ + title?: string; + /** + * @title Palavra ou Frase com Cor + * @description Escreva a palavra ou frase com cor + */ + highlight?: string; + /** + * @title Subtítulo + * @description Escreva aqui o subtítulo da abertura + */ + subtitleDescription?: string; +} + +/** + * @title {{{title}}} + */ +export interface Props { + /** + * @title Título do Bloco + * @description Escreva aqui o título do bloco + */ + title?: string; + /** + * @title Títulos de Abertura + * @description Lista de títulos de abertura com suas propriedades + */ + open?: Open[]; +} + +export default function Section({ + title = "", + open = [], +}: Props) { + const getHighlightedText = (text: string, highlight?: string) => { + if (!highlight) return text; + + const parts = text.split(new RegExp(`(${highlight})`, "gi")); + return parts.map((part, index) => + part.toLowerCase() === highlight.toLowerCase() + ? ( + + {part} + + ) + : part + ); + }; + + return ( + <> +
+
+ {open.map((item, index) => ( +
+
+ {item.title && ( +
+

+ {getHighlightedText(item.title, item.highlight)} +

+
+ )} + {item.subtitleDescription && ( +
+

+ {item.subtitleDescription} +

+
+ )} +
+
+ ))} +
+
+