diff --git a/packages/_vue3-migration-test/CHANGELOG.md b/packages/_vue3-migration-test/CHANGELOG.md
index f09f763026..7bfa46f1bb 100644
--- a/packages/_vue3-migration-test/CHANGELOG.md
+++ b/packages/_vue3-migration-test/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.0.0-alpha.12](https://github.com/empathyco/x/compare/vue3-migration-test@1.0.0-alpha.11...vue3-migration-test@1.0.0-alpha.12) (2024-05-23)
+
+
+### Features
+
+* **search-box:** migrate search-box x-module components to Composition API (#1476) ([5c2b7bc](https://github.com/empathyco/x/commit/5c2b7bcf47281f9a3bb2ea65a1bfb73c6d850260))
+
+
+
## [1.0.0-alpha.11](https://github.com/empathyco/x/compare/vue3-migration-test@1.0.0-alpha.10...vue3-migration-test@1.0.0-alpha.11) (2024-05-21)
diff --git a/packages/_vue3-migration-test/package.json b/packages/_vue3-migration-test/package.json
index d684a1a0a3..657f9d9cdf 100644
--- a/packages/_vue3-migration-test/package.json
+++ b/packages/_vue3-migration-test/package.json
@@ -1,7 +1,7 @@
{
"name": "vue3-migration-test",
"private": "true",
- "version": "1.0.0-alpha.11",
+ "version": "1.0.0-alpha.12",
"scripts": {
"dev": "vite",
"preview": "vite preview",
diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts
index 07b1354469..7b18435b34 100644
--- a/packages/_vue3-migration-test/src/router.ts
+++ b/packages/_vue3-migration-test/src/router.ts
@@ -16,6 +16,7 @@ import {
TestSortList,
TestSortPickerList,
TestBaseScroll,
+ TestSearchBox,
TestLayoutsComposable
} from './';
@@ -95,6 +96,11 @@ const routes = [
name: 'SortPickerList',
component: TestSortPickerList
},
+ {
+ path: '/search-box',
+ name: 'SearchBox',
+ component: TestSearchBox
+ },
{
path: '/elements-list',
name: 'ElementsList',
diff --git a/packages/_vue3-migration-test/src/x-modules/index.ts b/packages/_vue3-migration-test/src/x-modules/index.ts
index 5c28632c91..821c5f1a14 100644
--- a/packages/_vue3-migration-test/src/x-modules/index.ts
+++ b/packages/_vue3-migration-test/src/x-modules/index.ts
@@ -1,5 +1,6 @@
export * from './facets';
export * from './next-queries';
export * from './search';
+export * from './search-box';
export { default as TestElementsList } from './test-elements-list.vue';
export * from './scroll';
diff --git a/packages/_vue3-migration-test/src/x-modules/search-box/components/index.ts b/packages/_vue3-migration-test/src/x-modules/search-box/components/index.ts
new file mode 100644
index 0000000000..6e6ca5ee85
--- /dev/null
+++ b/packages/_vue3-migration-test/src/x-modules/search-box/components/index.ts
@@ -0,0 +1 @@
+export { default as TestSearchBox } from './test-search-box.vue';
diff --git a/packages/_vue3-migration-test/src/x-modules/search-box/components/test-search-box.vue b/packages/_vue3-migration-test/src/x-modules/search-box/components/test-search-box.vue
new file mode 100644
index 0000000000..af6aa0caf8
--- /dev/null
+++ b/packages/_vue3-migration-test/src/x-modules/search-box/components/test-search-box.vue
@@ -0,0 +1,43 @@
+
+
+ {{ value }}
+
+ {{ hasFocus ? 'Focused' : 'Unfocused' }}
+
+
+
+
+
diff --git a/packages/_vue3-migration-test/src/x-modules/search-box/index.ts b/packages/_vue3-migration-test/src/x-modules/search-box/index.ts
new file mode 100644
index 0000000000..07635cbbc8
--- /dev/null
+++ b/packages/_vue3-migration-test/src/x-modules/search-box/index.ts
@@ -0,0 +1 @@
+export * from './components';
diff --git a/packages/x-components/CHANGELOG.md b/packages/x-components/CHANGELOG.md
index f4a1eef927..f0a0b0882f 100644
--- a/packages/x-components/CHANGELOG.md
+++ b/packages/x-components/CHANGELOG.md
@@ -3,6 +3,15 @@
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.18](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.17...@empathyco/x-components@5.0.0-alpha.18) (2024-05-23)
+
+
+### Features
+
+* **search-box:** migrate search-box x-module components to Composition API (#1476) ([5c2b7bc](https://github.com/empathyco/x/commit/5c2b7bcf47281f9a3bb2ea65a1bfb73c6d850260))
+
+
+
## [5.0.0-alpha.17](https://github.com/empathyco/x/compare/@empathyco/x-components@5.0.0-alpha.16...@empathyco/x-components@5.0.0-alpha.17) (2024-05-22)
diff --git a/packages/x-components/package.json b/packages/x-components/package.json
index 59d054ac55..7ae11d3145 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.17",
+ "version": "5.0.0-alpha.18",
"description": "Empathy X Components",
"author": "Empathy Systems Corporation S.L.",
"license": "Apache-2.0",
diff --git a/packages/x-components/src/composables/__tests__/use-state.spec.ts b/packages/x-components/src/composables/__tests__/use-state.spec.ts
index 508610f9ba..771870e030 100644
--- a/packages/x-components/src/composables/__tests__/use-state.spec.ts
+++ b/packages/x-components/src/composables/__tests__/use-state.spec.ts
@@ -1,75 +1,54 @@
-import { ComputedRef, defineComponent } from 'vue';
-import Vuex, { Store } from 'vuex';
-import { createLocalVue, mount } from '@vue/test-utils';
-import { Dictionary } from '@empathyco/x-utils';
+import { defineComponent } from 'vue';
+import { mount } from '@vue/test-utils';
import { installNewXPlugin } from '../../__tests__/utils';
-import { useState } from '../use-state';
-import { searchBoxXStoreModule } from '../../x-modules/search-box/index';
-import { AnyXStoreModule } from '../../store/index';
+import { XPlugin } from '../../plugins';
import { ExtractState } from '../../x-modules/x-modules.types';
-
-const renderUseStateTest = (modulePropertyPaths: string[]): renderUseStateTestAPI => {
- const testComponent = defineComponent({
- setup() {
- const searchBoxState = useState(
- 'searchBox',
- modulePropertyPaths as (keyof ExtractState<'searchBox'>)[]
- );
- return {
- searchBoxState
- };
- }
- });
-
- const localVue = createLocalVue();
- localVue.use(Vuex);
-
- const store = new Store({
- modules: {
- x: {
- namespaced: true,
- modules: {
- searchBox: { namespaced: true, ...searchBoxXStoreModule } as AnyXStoreModule
- }
- }
- }
+import { useRegisterXModule } from '../use-register-x-module';
+import { useState } from '../use-state';
+import { searchBoxXModule } from '../../x-modules/search-box/x-module';
+import { useStore } from '../use-store';
+
+jest.mock('../use-store');
+
+function render(modulePaths: (keyof ExtractState<'searchBox'> & string)[]) {
+ installNewXPlugin();
+ (useStore as jest.Mock).mockReturnValue(XPlugin.store);
+
+ const component = defineComponent({
+ xModule: 'searchBox',
+ setup: () => {
+ useRegisterXModule(searchBoxXModule);
+ const searchBoxUseState = useState('searchBox', modulePaths);
+ return { searchBoxUseState };
+ },
+ template: `