From 57039be484da80c0cbd0e61e36e1091e51503918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20CG?= Date: Mon, 17 Jun 2024 14:41:54 +0200 Subject: [PATCH] refactor(staggered-fade-and-slide): use Vue native staggered transition --- .../test-staggered-fade-and-slide.vue | 61 +++++++ .../src/x-modules/test-elements-list.vue | 3 +- .../animations/staggered-fade-and-slide.vue | 136 +++++++++++---- packages/x-components/src/router.ts | 5 + .../src/views/home/animations-test.vue | 157 ++++++++++++++++++ 5 files changed, 328 insertions(+), 34 deletions(-) create mode 100644 packages/x-components/src/views/home/animations-test.vue diff --git a/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue index 1d04d4334e..3bcc3bab5d 100644 --- a/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue +++ b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue @@ -1,4 +1,25 @@ diff --git a/packages/_vue3-migration-test/src/x-modules/test-elements-list.vue b/packages/_vue3-migration-test/src/x-modules/test-elements-list.vue index 6312c90e66..3eea582ac1 100644 --- a/packages/_vue3-migration-test/src/x-modules/test-elements-list.vue +++ b/packages/_vue3-migration-test/src/x-modules/test-elements-list.vue @@ -4,7 +4,7 @@ - + @@ -36,4 +36,5 @@ import BaseGrid from '../../../x-components/src/components/base-grid.vue'; import LocationProvider from '../../../x-components/src/components/location-provider.vue'; import NextQueriesList from '../../../x-components/src/x-modules/next-queries/components/next-queries-list.vue'; + import StaggeredFadeAndSlide from '../../../x-components/src/components/animations/staggered-fade-and-slide.vue'; diff --git a/packages/x-components/src/components/animations/staggered-fade-and-slide.vue b/packages/x-components/src/components/animations/staggered-fade-and-slide.vue index 19ec77f23c..2ac72150da 100644 --- a/packages/x-components/src/components/animations/staggered-fade-and-slide.vue +++ b/packages/x-components/src/components/animations/staggered-fade-and-slide.vue @@ -1,19 +1,20 @@ - diff --git a/packages/x-components/src/router.ts b/packages/x-components/src/router.ts index 3a948b9096..54141d0268 100644 --- a/packages/x-components/src/router.ts +++ b/packages/x-components/src/router.ts @@ -9,6 +9,11 @@ const routes: RouteConfig[] = [ name: 'Home', component: () => import('./views/home/Home.vue') }, + { + path: '/animations', + name: 'Animations Test', + component: () => import('./views/home/animations-test.vue') + }, { path: '/products/:id', name: 'Product page', diff --git a/packages/x-components/src/views/home/animations-test.vue b/packages/x-components/src/views/home/animations-test.vue new file mode 100644 index 0000000000..7b53a524cb --- /dev/null +++ b/packages/x-components/src/views/home/animations-test.vue @@ -0,0 +1,157 @@ + + + +