bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 44.1 kB
Source Map (JSON)
{"version":3,"file":"floatingUi-DHMrP__c.mjs","names":[],"sources":["../src/composables/useMouse.ts","../src/components/BPopover/BPopover.vue","../src/components/BPopover/BPopover.vue","../src/utils/floatingUi.ts"],"sourcesContent":["import {useMouse as _useMouse, createSharedComposable} from '@vueuse/core'\n\nexport const useMouse = createSharedComposable(_useMouse)\n","<template>\n <span :id=\"computedId + '_placeholder'\" ref=\"_placeholder\" style=\"display: none\" />\n <slot name=\"target\" v-bind=\"sharedSlots\" />\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && !hidden\"\n :id=\"computedId\"\n v-bind=\"attrs\"\n ref=\"_element\"\n :class=\"computedClasses\"\n role=\"tooltip\"\n tabindex=\"-1\"\n :style=\"floatingStyles\"\n >\n <div\n ref=\"_arrow\"\n :class=\"`${props.tooltip ? 'tooltip' : 'popover'}-arrow`\"\n :style=\"arrowStyle\"\n data-popper-arrow\n />\n <div ref=\"_content\" class=\"overflow-auto b-floating-size\" :style=\"sizeStyles\">\n <template v-if=\"props.title || slots.title\">\n <div\n class=\"position-sticky top-0\"\n :class=\"[props.tooltip ? 'tooltip-inner' : 'popover-header', props.titleClass]\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </div>\n </template>\n <template v-if=\"(props.tooltip && !slots.title && !props.title) || !props.tooltip\">\n <div :class=\"[props.tooltip ? 'tooltip-inner' : 'popover-body', props.bodyClass]\">\n <slot v-bind=\"sharedSlots\">{{ props.body }}{{ attrs.content }}</slot>\n </div>\n </template>\n </div>\n </div>\n </Transition>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n type Alignment,\n arrow as arrowMiddleware,\n autoPlacement,\n autoUpdate,\n type Boundary,\n flip,\n type Placement as FloatingPlacement,\n hide as hideMiddleware,\n inline as inlineMiddleware,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toRef,\n toValue,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useMouse} from '../../composables/useMouse'\nimport {useId} from '../../composables/useId'\nimport type {BPopoverSlots, ShowHideSlotsData, BPopoverProps, BPopoverEmits} from '../../types'\nimport {isBoundary, isRootBoundary, resolveBootstrapPlacement} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getSafeDocument, getSafeWindow} from '../../utils/dom'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BPopoverProps, 'modelValue'>>(), {\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n bodyClass: undefined,\n click: undefined,\n closeOnHide: false,\n focus: undefined,\n hover: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n body: undefined,\n delay: () => ({show: 100, hide: 300}),\n floatingMiddleware: undefined,\n hideMargin: 2,\n id: undefined,\n initialAnimation: false,\n inline: false,\n lazy: false,\n manual: false,\n noAutoClose: false,\n noFade: false,\n noFlip: false,\n noHide: false,\n noShift: false,\n noSize: false,\n noninteractive: false,\n offset: null,\n unmountLazy: false,\n placement: 'top',\n realtime: false,\n reference: null,\n strategy: 'absolute',\n target: null,\n title: undefined,\n titleClass: undefined,\n show: false,\n tooltip: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BPopover')\nconst emit = defineEmits<BPopoverEmits>()\nconst slots = defineSlots<BPopoverSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<Exclude<BPopoverProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'popover')\n\nconst hidden = ref(false)\n\nconst floatingElement = useTemplateRef('_element')\nconst content = useTemplateRef('_content')\nconst arrow = useTemplateRef('_arrow')\nconst placeholder = useTemplateRef('_placeholder')\n\nconst referenceElement = ref<HTMLElement | null>(null)\nconst triggerElement = ref<HTMLElement | null>(null)\n\nconst isAutoPlacement = computed(() => props.placement.startsWith('auto'))\nconst offsetNumber = useToNumber(() => props.offset ?? Number.NaN)\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const off = props.offset !== null ? offsetNumber.value : props.tooltip ? 6 : 8\n const arr: Middleware[] = [offsetMiddleware(off)]\n if (props.noFlip === false && !isAutoPlacement.value) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (isAutoPlacement.value) {\n arr.push(\n autoPlacement({\n alignment: (props.placement.split('-')[1] as Alignment) || undefined,\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.noShift === false) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.noHide === false) {\n arr.push(\n hideMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.inline === true) {\n arr.push(inlineMiddleware())\n }\n arr.push(arrowMiddleware({element: arrow, padding: 10}))\n if (props.noSize === false) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (content.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (content.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\n\nconst placementRef = computed(() =>\n isAutoPlacement.value ? undefined : (props.placement as FloatingPlacement)\n)\n\nconst {floatingStyles, middlewareData, placement, update} = useFloating(\n referenceElement,\n floatingElement,\n {\n placement: placementRef,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: toRef(() => props.strategy),\n }\n)\n\nconst arrowStyle = ref<CSSProperties>({position: 'absolute'})\n\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\nconst {\n showRef,\n hide,\n show,\n toggle,\n throttleHide,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n renderRef,\n localTemporaryHide,\n setLocalTemporaryHide,\n} = useShowHide(modelValue, props, emit as EmitFn, floatingElement, computedId, {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {animationFrame: props.realtime}\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n})\n\nwatch(middlewareData, (newValue) => {\n if (props.noHide === false) {\n if (newValue.hide?.referenceHidden && !hidden.value && showRef.value) {\n if (props.closeOnHide && !props.noAutoClose && !props.manual) {\n throttleHide('close-on-hide')\n } else {\n setLocalTemporaryHide(true)\n hidden.value = true\n }\n } else if (localTemporaryHide.value && !newValue.hide?.referenceHidden) {\n setLocalTemporaryHide(false)\n hidden.value = false\n }\n }\n if (newValue.arrow) {\n const {x, y} = newValue.arrow\n arrowStyle.value = {\n position: 'absolute',\n top: y ? `${y}px` : '',\n left: x ? `${x}px` : '',\n }\n }\n})\n\nconst computedClasses = computed(() => {\n const type = props.tooltip ? 'tooltip' : 'popover'\n return [\n type,\n `b-${type}`,\n {\n show: isVisible.value && !hidden.value,\n fade: !computedNoAnimation.value,\n [`bs-${type}-${resolveBootstrapPlacement(placement.value)}`]: placement.value !== undefined,\n },\n ]\n})\n\nconst {x, y} = useMouse()\n\nconst isElementAndTriggerOutside = () => {\n const triggerRect = triggerElement.value?.getBoundingClientRect()\n const elementRect = floatingElement.value?.getBoundingClientRect()\n const margin = Number.parseInt(props.hideMargin as unknown as string, 10) || 0\n const offsetX = getSafeWindow()?.scrollX || 0\n const offsetY = getSafeWindow()?.scrollY || 0\n const triggerIsOutside =\n !triggerRect ||\n x.value < triggerRect.left + offsetX - margin ||\n x.value > triggerRect.right + offsetX + margin ||\n y.value < triggerRect.top + offsetY - margin ||\n y.value > triggerRect.bottom + offsetY + margin\n\n const isOutside =\n !elementRect ||\n x.value < elementRect.left + offsetX - margin ||\n x.value > elementRect.right + offsetX + margin ||\n y.value < elementRect.top + offsetY - margin ||\n y.value > elementRect.bottom + offsetY + margin\n\n return {triggerIsOutside, isOutside}\n}\n\nlet looptimeout: ReturnType<typeof setTimeout> | undefined\nconst tryHide = (e?: Readonly<Event>) => {\n const {triggerIsOutside, isOutside} = isElementAndTriggerOutside()\n const doc = getSafeDocument()\n if (\n (!props.noninteractive &&\n isOutside &&\n triggerIsOutside &&\n doc &&\n !floatingElement.value?.contains(doc.activeElement) &&\n (!computedTriggers.value.focus || !triggerElement.value?.contains(doc.activeElement))) ||\n (props.noninteractive && triggerIsOutside)\n ) {\n hide(e?.type)\n } else {\n if (looptimeout) clearTimeout(looptimeout)\n looptimeout = setTimeout(() => {\n tryHide(e)\n }, 50)\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nconst localToggle = (e: Event) => {\n if (showRef.value) {\n hide(e.type === 'click' ? 'click' : 'toggle')\n } else {\n show()\n }\n}\n\nconst localShow = () => {\n show()\n}\n\n// Compute final trigger configuration\nconst computedTriggers = computed(() => {\n // Manual mode disables all automatic triggers\n if (props.manual) {\n return {hover: false, focus: false, click: false}\n }\n\n // If explicit boolean props are set, use them\n if (props.hover !== undefined || props.focus !== undefined || props.click !== undefined) {\n return {\n hover: props.hover ?? false,\n focus: props.focus ?? false,\n click: props.click ?? false,\n }\n }\n\n // If no explicit props, use default behavior: hover + focus\n return {hover: true, focus: true, click: false}\n})\n\nconst bind = () => {\n // TODO: is this the best way to bind the events?\n // we place a span and get the next element sibling for the listeners\n if (props.target) {\n const elem = getElement(toValue(props.target))\n if (elem) {\n triggerElement.value = elem\n } else {\n console.warn('Target element not found', props.target)\n }\n } else {\n triggerElement.value = placeholder.value?.nextElementSibling as HTMLElement\n }\n if (props.reference) {\n const elem = getElement(toValue(props.reference))\n if (elem) {\n referenceElement.value = elem\n } else {\n console.warn('Reference element not found', props.reference)\n }\n } else {\n referenceElement.value = triggerElement.value\n }\n if (!triggerElement.value || props.manual) {\n return\n }\n\n const triggers = computedTriggers.value\n\n if (triggers.click) {\n triggerElement.value.addEventListener('click', localToggle)\n }\n\n if (triggers.hover) {\n triggerElement.value.addEventListener('pointerenter', localShow)\n triggerElement.value.addEventListener('pointerleave', tryHide)\n }\n\n if (triggers.focus) {\n triggerElement.value.addEventListener('focus', localShow)\n triggerElement.value.addEventListener('blur', tryHide)\n }\n}\n\nconst unbind = () => {\n if (triggerElement.value) {\n triggerElement.value.removeEventListener('click', localToggle)\n triggerElement.value.removeEventListener('pointerenter', localShow)\n triggerElement.value.removeEventListener('pointerleave', tryHide)\n triggerElement.value.removeEventListener('focus', localShow)\n triggerElement.value.removeEventListener('blur', tryHide)\n }\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && computedTriggers.value.click && !props.noAutoClose && !props.manual)\n hide('click-outside')\n },\n {ignore: [triggerElement]}\n)\n\nwatch(\n [\n () => props.click,\n () => props.hover,\n () => props.focus,\n () => props.manual,\n () => props.target,\n () => props.reference,\n ],\n () => {\n unbind()\n bind()\n // update()\n }\n)\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: isVisible.value,\n active: isActive.value,\n}))\n\nonMounted(() => {\n bind()\n nextTick(() => {\n update()\n })\n})\n\nonBeforeUnmount(unbind)\n</script>\n","<template>\n <span :id=\"computedId + '_placeholder'\" ref=\"_placeholder\" style=\"display: none\" />\n <slot name=\"target\" v-bind=\"sharedSlots\" />\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && !hidden\"\n :id=\"computedId\"\n v-bind=\"attrs\"\n ref=\"_element\"\n :class=\"computedClasses\"\n role=\"tooltip\"\n tabindex=\"-1\"\n :style=\"floatingStyles\"\n >\n <div\n ref=\"_arrow\"\n :class=\"`${props.tooltip ? 'tooltip' : 'popover'}-arrow`\"\n :style=\"arrowStyle\"\n data-popper-arrow\n />\n <div ref=\"_content\" class=\"overflow-auto b-floating-size\" :style=\"sizeStyles\">\n <template v-if=\"props.title || slots.title\">\n <div\n class=\"position-sticky top-0\"\n :class=\"[props.tooltip ? 'tooltip-inner' : 'popover-header', props.titleClass]\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </div>\n </template>\n <template v-if=\"(props.tooltip && !slots.title && !props.title) || !props.tooltip\">\n <div :class=\"[props.tooltip ? 'tooltip-inner' : 'popover-body', props.bodyClass]\">\n <slot v-bind=\"sharedSlots\">{{ props.body }}{{ attrs.content }}</slot>\n </div>\n </template>\n </div>\n </div>\n </Transition>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n type Alignment,\n arrow as arrowMiddleware,\n autoPlacement,\n autoUpdate,\n type Boundary,\n flip,\n type Placement as FloatingPlacement,\n hide as hideMiddleware,\n inline as inlineMiddleware,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toRef,\n toValue,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useMouse} from '../../composables/useMouse'\nimport {useId} from '../../composables/useId'\nimport type {BPopoverSlots, ShowHideSlotsData, BPopoverProps, BPopoverEmits} from '../../types'\nimport {isBoundary, isRootBoundary, resolveBootstrapPlacement} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getSafeDocument, getSafeWindow} from '../../utils/dom'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BPopoverProps, 'modelValue'>>(), {\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n bodyClass: undefined,\n click: undefined,\n closeOnHide: false,\n focus: undefined,\n hover: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n body: undefined,\n delay: () => ({show: 100, hide: 300}),\n floatingMiddleware: undefined,\n hideMargin: 2,\n id: undefined,\n initialAnimation: false,\n inline: false,\n lazy: false,\n manual: false,\n noAutoClose: false,\n noFade: false,\n noFlip: false,\n noHide: false,\n noShift: false,\n noSize: false,\n noninteractive: false,\n offset: null,\n unmountLazy: false,\n placement: 'top',\n realtime: false,\n reference: null,\n strategy: 'absolute',\n target: null,\n title: undefined,\n titleClass: undefined,\n show: false,\n tooltip: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BPopover')\nconst emit = defineEmits<BPopoverEmits>()\nconst slots = defineSlots<BPopoverSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<Exclude<BPopoverProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'popover')\n\nconst hidden = ref(false)\n\nconst floatingElement = useTemplateRef('_element')\nconst content = useTemplateRef('_content')\nconst arrow = useTemplateRef('_arrow')\nconst placeholder = useTemplateRef('_placeholder')\n\nconst referenceElement = ref<HTMLElement | null>(null)\nconst triggerElement = ref<HTMLElement | null>(null)\n\nconst isAutoPlacement = computed(() => props.placement.startsWith('auto'))\nconst offsetNumber = useToNumber(() => props.offset ?? Number.NaN)\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const off = props.offset !== null ? offsetNumber.value : props.tooltip ? 6 : 8\n const arr: Middleware[] = [offsetMiddleware(off)]\n if (props.noFlip === false && !isAutoPlacement.value) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (isAutoPlacement.value) {\n arr.push(\n autoPlacement({\n alignment: (props.placement.split('-')[1] as Alignment) || undefined,\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.noShift === false) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.noHide === false) {\n arr.push(\n hideMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (props.inline === true) {\n arr.push(inlineMiddleware())\n }\n arr.push(arrowMiddleware({element: arrow, padding: 10}))\n if (props.noSize === false) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (content.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (content.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\n\nconst placementRef = computed(() =>\n isAutoPlacement.value ? undefined : (props.placement as FloatingPlacement)\n)\n\nconst {floatingStyles, middlewareData, placement, update} = useFloating(\n referenceElement,\n floatingElement,\n {\n placement: placementRef,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: toRef(() => props.strategy),\n }\n)\n\nconst arrowStyle = ref<CSSProperties>({position: 'absolute'})\n\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\nconst {\n showRef,\n hide,\n show,\n toggle,\n throttleHide,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n renderRef,\n localTemporaryHide,\n setLocalTemporaryHide,\n} = useShowHide(modelValue, props, emit as EmitFn, floatingElement, computedId, {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {animationFrame: props.realtime}\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n})\n\nwatch(middlewareData, (newValue) => {\n if (props.noHide === false) {\n if (newValue.hide?.referenceHidden && !hidden.value && showRef.value) {\n if (props.closeOnHide && !props.noAutoClose && !props.manual) {\n throttleHide('close-on-hide')\n } else {\n setLocalTemporaryHide(true)\n hidden.value = true\n }\n } else if (localTemporaryHide.value && !newValue.hide?.referenceHidden) {\n setLocalTemporaryHide(false)\n hidden.value = false\n }\n }\n if (newValue.arrow) {\n const {x, y} = newValue.arrow\n arrowStyle.value = {\n position: 'absolute',\n top: y ? `${y}px` : '',\n left: x ? `${x}px` : '',\n }\n }\n})\n\nconst computedClasses = computed(() => {\n const type = props.tooltip ? 'tooltip' : 'popover'\n return [\n type,\n `b-${type}`,\n {\n show: isVisible.value && !hidden.value,\n fade: !computedNoAnimation.value,\n [`bs-${type}-${resolveBootstrapPlacement(placement.value)}`]: placement.value !== undefined,\n },\n ]\n})\n\nconst {x, y} = useMouse()\n\nconst isElementAndTriggerOutside = () => {\n const triggerRect = triggerElement.value?.getBoundingClientRect()\n const elementRect = floatingElement.value?.getBoundingClientRect()\n const margin = Number.parseInt(props.hideMargin as unknown as string, 10) || 0\n const offsetX = getSafeWindow()?.scrollX || 0\n const offsetY = getSafeWindow()?.scrollY || 0\n const triggerIsOutside =\n !triggerRect ||\n x.value < triggerRect.left + offsetX - margin ||\n x.value > triggerRect.right + offsetX + margin ||\n y.value < triggerRect.top + offsetY - margin ||\n y.value > triggerRect.bottom + offsetY + margin\n\n const isOutside =\n !elementRect ||\n x.value < elementRect.left + offsetX - margin ||\n x.value > elementRect.right + offsetX + margin ||\n y.value < elementRect.top + offsetY - margin ||\n y.value > elementRect.bottom + offsetY + margin\n\n return {triggerIsOutside, isOutside}\n}\n\nlet looptimeout: ReturnType<typeof setTimeout> | undefined\nconst tryHide = (e?: Readonly<Event>) => {\n const {triggerIsOutside, isOutside} = isElementAndTriggerOutside()\n const doc = getSafeDocument()\n if (\n (!props.noninteractive &&\n isOutside &&\n triggerIsOutside &&\n doc &&\n !floatingElement.value?.contains(doc.activeElement) &&\n (!computedTriggers.value.focus || !triggerElement.value?.contains(doc.activeElement))) ||\n (props.noninteractive && triggerIsOutside)\n ) {\n hide(e?.type)\n } else {\n if (looptimeout) clearTimeout(looptimeout)\n looptimeout = setTimeout(() => {\n tryHide(e)\n }, 50)\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nconst localToggle = (e: Event) => {\n if (showRef.value) {\n hide(e.type === 'click' ? 'click' : 'toggle')\n } else {\n show()\n }\n}\n\nconst localShow = () => {\n show()\n}\n\n// Compute final trigger configuration\nconst computedTriggers = computed(() => {\n // Manual mode disables all automatic triggers\n if (props.manual) {\n return {hover: false, focus: false, click: false}\n }\n\n // If explicit boolean props are set, use them\n if (props.hover !== undefined || props.focus !== undefined || props.click !== undefined) {\n return {\n hover: props.hover ?? false,\n focus: props.focus ?? false,\n click: props.click ?? false,\n }\n }\n\n // If no explicit props, use default behavior: hover + focus\n return {hover: true, focus: true, click: false}\n})\n\nconst bind = () => {\n // TODO: is this the best way to bind the events?\n // we place a span and get the next element sibling for the listeners\n if (props.target) {\n const elem = getElement(toValue(props.target))\n if (elem) {\n triggerElement.value = elem\n } else {\n console.warn('Target element not found', props.target)\n }\n } else {\n triggerElement.value = placeholder.value?.nextElementSibling as HTMLElement\n }\n if (props.reference) {\n const elem = getElement(toValue(props.reference))\n if (elem) {\n referenceElement.value = elem\n } else {\n console.warn('Reference element not found', props.reference)\n }\n } else {\n referenceElement.value = triggerElement.value\n }\n if (!triggerElement.value || props.manual) {\n return\n }\n\n const triggers = computedTriggers.value\n\n if (triggers.click) {\n triggerElement.value.addEventListener('click', localToggle)\n }\n\n if (triggers.hover) {\n triggerElement.value.addEventListener('pointerenter', localShow)\n triggerElement.value.addEventListener('pointerleave', tryHide)\n }\n\n if (triggers.focus) {\n triggerElement.value.addEventListener('focus', localShow)\n triggerElement.value.addEventListener('blur', tryHide)\n }\n}\n\nconst unbind = () => {\n if (triggerElement.value) {\n triggerElement.value.removeEventListener('click', localToggle)\n triggerElement.value.removeEventListener('pointerenter', localShow)\n triggerElement.value.removeEventListener('pointerleave', tryHide)\n triggerElement.value.removeEventListener('focus', localShow)\n triggerElement.value.removeEventListener('blur', tryHide)\n }\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && computedTriggers.value.click && !props.noAutoClose && !props.manual)\n hide('click-outside')\n },\n {ignore: [triggerElement]}\n)\n\nwatch(\n [\n () => props.click,\n () => props.hover,\n () => props.focus,\n () => props.manual,\n () => props.target,\n () => props.reference,\n ],\n () => {\n unbind()\n bind()\n // update()\n }\n)\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: isVisible.value,\n active: isActive.value,\n}))\n\nonMounted(() => {\n bind()\n nextTick(() => {\n update()\n })\n})\n\nonBeforeUnmount(unbind)\n</script>\n","import type {Boundary, Placement, RootBoundary} from '@floating-ui/vue'\nexport {autoUpdate} from '@floating-ui/vue'\n\nimport {type DirectiveBinding, h, render} from 'vue'\nimport BPopover from '../components/BPopover/BPopover.vue'\nimport type {BPopoverProps} from '../types'\nimport {getSafeDocument} from './dom'\n\nexport const resolveBootstrapPlacement = (placement: Placement): string => {\n const [_placement] = placement.split('-')\n switch (_placement) {\n case 'left':\n return 'start'\n case 'right':\n return 'end'\n default:\n return _placement || 'start'\n }\n}\nexport const resolveBootstrapCaret = (placement: Placement): string => {\n const [_placement] = placement.split('-')\n switch (_placement) {\n case 'left':\n return 'start'\n case 'right':\n return 'end'\n case 'top':\n return 'up'\n case 'bottom':\n return 'down'\n default:\n return _placement || 'start'\n }\n}\n\nexport const resolveActiveStatus = (values: DirectiveBinding['value']): boolean =>\n typeof values !== 'object' || values.active !== false\n\nexport const resolveContent = (\n values: DirectiveBinding['value'],\n el: HTMLElement\n): {title?: string; body?: string} => {\n const isActive = resolveActiveStatus(values)\n if (!isActive) return {}\n\n const missingBindingValue =\n typeof values === 'undefined' ||\n (typeof values === 'object' && !values.title && !values.content && !values.body)\n\n // SSR guard: skip DOM attribute access on server\n const doc = getSafeDocument()\n if (doc !== null) {\n const titleAttr = el.getAttribute('title') || el.getAttribute('data-original-title')\n\n // Always remove title attribute to prevent native tooltip conflicts\n if (titleAttr) {\n el.removeAttribute('title')\n el.setAttribute('data-original-title', titleAttr)\n }\n\n if (missingBindingValue) {\n if (titleAttr) {\n return {\n body: titleAttr,\n }\n }\n return {}\n }\n\n // For string directive values, use title attribute as popover title\n if (typeof values === 'string') {\n return {\n title: titleAttr || undefined,\n body: values,\n }\n }\n } else {\n // SSR: if no binding value provided, return empty\n if (missingBindingValue) return {}\n }\n\n if (typeof values === 'string') {\n return {\n body: values,\n }\n }\n\n // TODO: deprication remove warning in 2025-07\n if (values?.content)\n console.warn('v-b-popover/v-b-tooltip: `content` is deprecated, use `body` instead')\n\n return {\n title: values?.title ? values?.title : undefined,\n body: values?.body ? values?.body : values?.content ? values?.content : undefined,\n }\n}\n\nexport const resolveDirectiveProps = (\n binding: Readonly<DirectiveBinding>,\n el: Readonly<HTMLElement>\n) => ({\n target: el,\n modelValue: binding.modifiers.show,\n inline: binding.modifiers.inline,\n click: binding.modifiers.click,\n hover: binding.modifiers.hover,\n focus: binding.modifiers.focus,\n manual: binding.modifiers.manual,\n realtime: binding.modifiers.realtime,\n lazy: binding.modifiers.lazy,\n placement: binding.modifiers.left\n ? 'left'\n : binding.modifiers.right\n ? 'right'\n : binding.modifiers.bottom\n ? 'bottom'\n : binding.modifiers.top\n ? 'top'\n : undefined,\n ...(typeof binding.value === 'object' ? binding.value : undefined),\n ...(binding.modifiers.interactive ? {noninteractive: false} : undefined),\n title: null,\n body: null,\n})\n\nexport interface ElementWithPopper extends HTMLElement {\n [key: string]: unknown\n $__element?: HTMLElement\n $__tooltip?: Record<\n number,\n {\n binding: string\n destroying: boolean\n }\n >\n $__popover?: Record<\n number,\n {\n binding: string\n destroying: boolean\n }\n >\n}\n\nexport const bind = (\n el: ElementWithPopper,\n binding: Readonly<DirectiveBinding>,\n props: BPopoverProps\n) => {\n const doc = getSafeDocument()\n // SSR guard: skip DOM manipulation on server\n if (doc === null) return\n\n const div = doc.createElement('span')\n if (binding.modifiers.body) doc.body.appendChild(div)\n else if (binding.modifiers.child) el.appendChild(div)\n else el.parentNode?.insertBefore(div, el.nextSibling)\n render(h(BPopover, props), div)\n el.$__element = div\n}\n\nexport const unbind = (el: ElementWithPopper) => {\n const div = el.$__element\n if (!div) return\n\n // Unmount Vue component immediately\n render(null, div)\n\n // SSR guard: skip DOM cleanup on server\n if (getSafeDocument() !== null) {\n delete el.$__element\n return\n }\n\n // Use microtask instead of setTimeout(0) for more predictable cleanup\n // and better performance\n queueMicrotask(() => {\n // Remove the element in next microtask\n // The directive's beforeUnmount will have already cleaned up UID-specific state\n div.remove()\n // Only delete the reference if it still points to the div we just unmounted\n // This prevents deleting a fresh reference if bind() was called again immediately\n if (el.$__element === div) {\n delete el.$__element\n }\n })\n}\n\nexport const isBoundary = (input: unknown): input is Boundary =>\n input === 'clippingAncestors' || input instanceof Element || Array.isArray(input)\n\nexport const isRootBoundary = (input: Boundary | RootBoundary): input is RootBoundary =>\n !isBoundary(input)\n"],"mappings":";;;;;;;;;;AAEA,IAAa,WAAW,uBAAuB,WAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECwIzD,MAAM,QAAQ,YAvCC,SAuCmB,WAAU;EAC5C,MAAM,OAAO;EACb,MAAM,QAAQ,UAAA;EACd,MAAM,QAAQ,UAAS;EAEvB,MAAM,aAAa,SAA4D,SAAA,aAE9E;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,UAAS;EAElD,MAAM,SAAS,IAAI,MAAK;EAExB,MAAM,kBAAkB,eAAe,WAAU;EACjD,MAAM,UAAU,eAAe,WAAU;EACzC,MAAM,UAAQ,eAAe,SAAQ;EACrC,MAAM,cAAc,eAA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