bootstrap-vue-next
Advanced tools
Comparing version 0.14.9 to 0.14.10
@@ -1,2 +0,2 @@ | ||
import { type ComponentInternalInstance, type Ref } from 'vue'; | ||
import { type ComponentInternalInstance, type MaybeRefOrGetter, type Ref } from 'vue'; | ||
export declare const useSharedModalStack: () => { | ||
@@ -12,3 +12,6 @@ registry: Ref<ComponentInternalInstance[]>; | ||
}; | ||
declare const _default: (modalOpen: Ref<boolean>) => void; | ||
declare const _default: (modalOpen: Ref<boolean>, id: MaybeRefOrGetter<string>) => { | ||
activePosition: import("vue").ComputedRef<number>; | ||
activeModalCount: Readonly<Ref<number>>; | ||
}; | ||
export default _default; |
@@ -5,3 +5,3 @@ { | ||
"description": "BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.", | ||
"version": "0.14.9", | ||
"version": "0.14.10", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "main": "./dist/bootstrap-vue-next.umd.js", |
import {createSharedComposable, getSSRHandler, tryOnScopeDispose, unrefElement} from '@vueuse/core' | ||
import {type ComponentInternalInstance, getCurrentInstance, type Ref, ref, toRef, watch} from 'vue' | ||
import { | ||
type ComponentInternalInstance, | ||
computed, | ||
getCurrentInstance, | ||
type MaybeRefOrGetter, | ||
ref, | ||
type Ref, | ||
toRef, | ||
toValue, | ||
watch, | ||
} from 'vue' | ||
@@ -43,4 +53,4 @@ const MODAL_OPEN_CLASS_NAME = 'modal-open' | ||
export default (modalOpen: Ref<boolean>): void => { | ||
const {registry, push, remove} = useSharedModalStack() | ||
export default (modalOpen: Ref<boolean>, id: MaybeRefOrGetter<string>) => { | ||
const {registry, push, remove, stack} = useSharedModalStack() | ||
@@ -66,2 +76,7 @@ const currentModal = getCurrentInstance() | ||
) | ||
return { | ||
activePosition: computed(() => stack.value.findIndex((el) => el.exposed?.id === toValue(id))), | ||
activeModalCount: toRef(() => stack.value.length), | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3937038
31071