diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9a7bbcc7d..697dfd469 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,4 +1,4 @@ { - "packages/bootstrap-vue-next": "0.29.4", - "packages/nuxt": "0.29.4" + "packages/bootstrap-vue-next": "0.30.0", + "packages/nuxt": "0.30.0" } diff --git a/packages/bootstrap-vue-next/CHANGELOG.md b/packages/bootstrap-vue-next/CHANGELOG.md index c13a8071f..f11d8e53f 100644 --- a/packages/bootstrap-vue-next/CHANGELOG.md +++ b/packages/bootstrap-vue-next/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [0.30.0](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/bootstrapvuenext-v0.29.4...bootstrapvuenext-v0.30.0) (2025-05-31) + + +### ⚠ BREAKING CHANGES + +* **BTabs:** change modelValue to have id, and add v-model:index for the old value + +### Features + +* **BAccordion:** add model index to control the index of open item/items. If free is true it is an array of open items ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BAccordion:** modelValue is array id prop free is true ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTab:** expose activate and deactivate ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTabs:** change modelValue to have id, and add v-model:index for the old value ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) + + +### Bug Fixes + +* **BAccordion:** modelValue is now undefined if no items open. ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BAccordion:** reactivity working in v-for ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BAccordion:** ssr fixes. ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTab:** click event is now preventable. ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTabs:** fix focus on keyboard navigation ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTabs:** fix initial value and some ssr errors ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTabs:** posible loop if activate-tab event is prevented. ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) +* **BTabs:** reactivity in v-for fixed ([1fa8e5e](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/1fa8e5e8e762ea7e946c1bcd8ae2e75adffa9a9e)) + ## [0.29.4](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/bootstrapvuenext-v0.29.3...bootstrapvuenext-v0.29.4) (2025-05-31) diff --git a/packages/bootstrap-vue-next/package.json b/packages/bootstrap-vue-next/package.json index 46b8d20e6..1d2d49959 100644 --- a/packages/bootstrap-vue-next/package.json +++ b/packages/bootstrap-vue-next/package.json @@ -2,7 +2,7 @@ "name": "bootstrap-vue-next", "displayName": "BootstrapVueNext", "description": "BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.", - "version": "0.29.4", + "version": "0.30.0", "license": "MIT", "main": "./dist/bootstrap-vue-next.umd.js", "module": "./dist/bootstrap-vue-next.mjs", diff --git a/packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue b/packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue index 62451772d..a23b5bc50 100644 --- a/packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue +++ b/packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue @@ -433,16 +433,23 @@ const registerTab = (tab: Ref) => { } else { tabsInternal.value[idx] = tab } - if (tabsInternal.value.length === tabElementsArray.value.length && !initialized) { + if (initialized) { sortTabs() - updateInitialIndexAndId() - initialized = true } } +nextTick(() => { + updateInitialIndexAndId() + sortTabs() + initialized = true +}) + const sortTabs = () => { tabsInternal.value.sort((a, b) => sortSlotElementsByPosition(a.value.el.value, b.value.el.value)) - if (activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value)) { + if ( + activeId.value && + activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value) + ) { activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value) } } diff --git a/packages/bootstrap-vue-next/src/components/BTabs/tabs.spec.ts b/packages/bootstrap-vue-next/src/components/BTabs/tabs.spec.ts index 9fceb7bc9..f3d060e2f 100644 --- a/packages/bootstrap-vue-next/src/components/BTabs/tabs.spec.ts +++ b/packages/bootstrap-vue-next/src/components/BTabs/tabs.spec.ts @@ -499,7 +499,7 @@ describe('tabs', () => { const ChildComp = { template: ` - + {{ content }} `, props: { @@ -511,6 +511,10 @@ describe('tabs', () => { type: String, default: '', }, + id: { + type: String, + default: '', + }, }, components: { BTab, @@ -532,7 +536,7 @@ describe('tabs', () => { c3 - add + add change change2 `, @@ -543,7 +547,7 @@ describe('tabs', () => { {id: 'i2', title: 't2', content: 'c2'}, ], index: 0, - id: undefined, + id: 'i1', } }, components: { @@ -552,6 +556,7 @@ describe('tabs', () => { BTab, }, } + it('renders in complex structure', async () => { const wrapper = await mount(ComplexComponent, {}) expect(wrapper.findComponent({name: 'b-tab'}).text()).toBe('c1') diff --git a/packages/nuxt/CHANGELOG.md b/packages/nuxt/CHANGELOG.md index 1007a52dd..bf99d53b8 100644 --- a/packages/nuxt/CHANGELOG.md +++ b/packages/nuxt/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [0.30.0](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/nuxt-v0.29.4...nuxt-v0.30.0) (2025-05-31) + + +### Miscellaneous Chores + +* **nuxt:** Synchronize main group versions + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * bootstrap-vue-next bumped to 0.30.0 + * peerDependencies + * bootstrap-vue-next bumped to 0.30.0 + ## [0.29.4](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/nuxt-v0.29.3...nuxt-v0.29.4) (2025-05-31) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 5a5aee4a1..f1ede2b55 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,7 +1,7 @@ { "name": "@bootstrap-vue-next/nuxt", "description": "Nuxt Module for BootstrapVueNext", - "version": "0.29.4", + "version": "0.30.0", "license": "MIT", "author": { "name": "Issayah",