+
+
+
diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts
index d5c5f178f9..9d21e02df0 100644
--- a/packages/_vue3-migration-test/src/router.ts
+++ b/packages/_vue3-migration-test/src/router.ts
@@ -5,6 +5,9 @@ import {
TestBaseColumnPickerList,
TestBaseDropdown,
TestBaseEventButton,
+ TestCollapseHeight,
+ TestCollapseWidth,
+ TestCrossFade,
TestElementsList,
TestFacets,
TestFade,
@@ -21,6 +24,21 @@ const routes = [
name: 'AnimateWidth',
component: TestAnimateWidth
},
+ {
+ path: '/collapse-height',
+ name: 'CollapseHeight',
+ component: TestCollapseHeight
+ },
+ {
+ path: '/collapse-width',
+ name: 'CollapseWidth',
+ component: TestCollapseWidth
+ },
+ {
+ path: '/cross-fade',
+ name: 'CrossFade',
+ component: TestCrossFade
+ },
{
path: '/fade',
name: 'Fade',
diff --git a/packages/x-components/CHANGELOG.md b/packages/x-components/CHANGELOG.md
index 2b39a86ca5..9a4aa9dc9a 100644
--- a/packages/x-components/CHANGELOG.md
+++ b/packages/x-components/CHANGELOG.md
@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [5.0.0-alpha.11](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.10...@empathyco/x-components@5.0.0-alpha.11) (2024-05-13)
+
+
+### Features
+
+* replace `AnimationsMixin` with `useCollapseAnimation` composable (#1468) ([e3ee9d9](https://github.com/empathyco/x/commit/e3ee9d94f9acc4abdcd1c591a754c86d9a6abbb7))
+
+
+
+## [5.0.0-alpha.10](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.9...@empathyco/x-components@5.0.0-alpha.10) (2024-05-09)
+
+
+### Features
+
+* Replace FacetsMixin by useFacets composable (#1462) ([bb7e0ce](https://github.com/empathyco/x/commit/bb7e0cede8653d82e436db696e80c1bdbcb9cc41))
+
+
+
## [5.0.0-alpha.9](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.8...@empathyco/x-components@5.0.0-alpha.9) (2024-05-09)
diff --git a/packages/x-components/package.json b/packages/x-components/package.json
index 775ede3acf..7f1c4683d9 100644
--- a/packages/x-components/package.json
+++ b/packages/x-components/package.json
@@ -1,6 +1,6 @@
{
"name": "@empathyco/x-components",
- "version": "5.0.0-alpha.9",
+ "version": "5.0.0-alpha.11",
"description": "Empathy X Components",
"author": "Empathy Systems Corporation S.L.",
"license": "Apache-2.0",
diff --git a/packages/x-components/src/components/animations/animations.mixin.ts b/packages/x-components/src/components/animations/animations.mixin.ts
deleted file mode 100644
index 0fac76726d..0000000000
--- a/packages/x-components/src/components/animations/animations.mixin.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import Vue, { ComponentOptions } from 'vue';
-
-/**
- * Type options for the property that will be animated.
- */
-type AnimatedProperty = 'height' | 'width';
-
-/**
- * Adds parametrized methods to a component to allow the collapsing of the provided property.
- *
- * @param property - The property that will be animated.
- * @returns Mixin for the module.
- * @public
- */
-export function createCollapseAnimationMixin(property: AnimatedProperty): ComponentOptions {
- const scrollProperty = property === 'width' ? 'scrollWidth' : 'scrollHeight';
-
- return {
- methods: {
- /**
- * Changes the element's animated property from 0 to the element's content size.
- *
- * @remarks `content-visibility` CSS property boosts the rendering performance waiting to be
- * needed until rendering the content. This behaviour collides with this animation method.
- * When the `scrollProperty` is evaluated, the content has not been rendered yet and the value
- * is 0 so nothing is animated. To avoid this behaviour, we change the `content-visibility` to
- * default value, force a layer repaint and then, evaluate the `scrollProperty` value which
- * now has value. Then we restore the `content-visibility` value to its previous state.
- *
- * @param element - The DOM element that is going to be animated.
- * @internal
- */
- expand(element: HTMLElement): void {
- element.style[property] = '0';
- const originalValue = (element.style as any)['content-visibility'];
- (element.style as any)['content-visibility'] = 'visible';
- element.getBoundingClientRect();
- element.style[property] = `${element[scrollProperty]}px`;
- (element.style as any)['content-visibility'] = originalValue;
- },
- /**
- * Removes the animated property from the element.
- *
- * @param element - The DOM element that is going to be animated.
- * @internal
- */
- cleanUpAnimationStyles(element: HTMLElement): void {
- element.style.removeProperty(property);
- },
- /**
- * Changes the element's animated property from the element's content size to 0.
- *
- * @param element - The DOM element that is going to be animated.
- * @internal
- */
- collapse(element: HTMLElement): void {
- element.style[property] = `${element[scrollProperty]}px`;
- // This is intended. We want to provoke a layer repaint to apply this style.
- element.getBoundingClientRect();
- element.style[property] = '0';
- }
- }
- };
-}
diff --git a/packages/x-components/src/components/animations/collapse-height.vue b/packages/x-components/src/components/animations/collapse-height.vue
index 922349f2f3..9ded2cfd63 100644
--- a/packages/x-components/src/components/animations/collapse-height.vue
+++ b/packages/x-components/src/components/animations/collapse-height.vue
@@ -14,9 +14,8 @@