diff --git a/app/components/video-galary.tsx b/app/components/video-galary.tsx index a5d152b..f094077 100644 --- a/app/components/video-galary.tsx +++ b/app/components/video-galary.tsx @@ -1,5 +1,8 @@ +"use client"; // Necessário para animações no Next.js App Router + import Image from "next/image"; import Link from "next/link"; +import { motion } from "framer-motion"; const recentes = [ { @@ -401,79 +404,76 @@ export function TvoneNegocios() { export function TvoneEscolhaEditor() { return ( -
+
+ {/* HEADER */}
-
-

- Escolha do Editor -

-

- Curadoria exclusiva das histórias mais impactantes do dia, selecionadas pela nossa redação. -

-
- - +

+ Escolha do Editor +

+ Ver tudo - +
- {/* CONTAINER DE SCROLL: - - flex e overflow-x-auto no mobile - - md:grid no desktop - - snap-x para efeito de 'imã' ao scrollar - */} -
- {editorChoice.map((item, index) => ( + {/* CONTAINER COM ANIMACÃO "WHILE IN VIEW" */} + + {editorChoice.slice(0, 6).map((item, index) => (
= 3 ? 'hidden md:flex' : 'flex'}`} > -
- -
- -
-
- - {item.category} - - - - {item.publishDate} - + +
+ {item.title}
-

- {item.title} -

+
+
+ {item.category} + + {item.publishDate} +
+ +

+ {item.title} +

+ +

{item.description}

+ +
+ + + + + {item.readTime} min de leitura + +
-

- {item.description} -

- -
- - - - - {item.readTime} min de leitura -
-
+
))} -
+
); } \ No newline at end of file diff --git a/package.json b/package.json index 29bb32d..26e21e7 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "eslint" }, "dependencies": { + "framer-motion": "^12.38.0", "next": "16.2.1", "react": "19.2.4", "react-dom": "19.2.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea5aebb..80764f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + framer-motion: + specifier: ^12.38.0 + version: 12.38.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) next: specifier: 16.2.1 version: 16.2.1(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -1130,6 +1133,20 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} + framer-motion@12.38.0: + resolution: {integrity: sha512-rFYkY/pigbcswl1XQSb7q424kSTQ8q6eAC+YUsSKooHQYuLdzdHjrt6uxUC+PRAO++q5IS7+TamgIw1AphxR+g==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -1521,6 +1538,12 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + motion-dom@12.38.0: + resolution: {integrity: sha512-pdkHLD8QYRp8VfiNLb8xIBJis1byQ9gPT3Jnh2jqfFtAsWUA3dEepDlsWe/xMpO8McV+VdpKVcp+E+TGJEtOoA==} + + motion-utils@12.36.0: + resolution: {integrity: sha512-eHWisygbiwVvf6PZ1vhaHCLamvkSbPIeAYxWUuL3a2PD/TROgE7FvfHWTIH4vMl798QLfMw15nRqIaRDXTlYRg==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -3140,6 +3163,15 @@ snapshots: dependencies: is-callable: 1.2.7 + framer-motion@12.38.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4): + dependencies: + motion-dom: 12.38.0 + motion-utils: 12.36.0 + tslib: 2.8.1 + optionalDependencies: + react: 19.2.4 + react-dom: 19.2.4(react@19.2.4) + function-bind@1.1.2: {} function.prototype.name@1.1.8: @@ -3506,6 +3538,12 @@ snapshots: minimist@1.2.8: {} + motion-dom@12.38.0: + dependencies: + motion-utils: 12.36.0 + + motion-utils@12.36.0: {} + ms@2.1.3: {} nanoid@3.3.11: {}