bootstrap-vue-next 0.44.7 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/{BAlert-BnT7fF6B.js → BAlert-CHbgLTZH.js} +2 -2
  2. package/dist/{BAlert-BnT7fF6B.js.map → BAlert-CHbgLTZH.js.map} +1 -1
  3. package/dist/{BAlert-Qiyqq4rE.mjs → BAlert-CRRUJXYi.mjs} +2 -2
  4. package/dist/{BAlert-Qiyqq4rE.mjs.map → BAlert-CRRUJXYi.mjs.map} +1 -1
  5. package/dist/{BAutocomplete-jAlZC6_t.js → BAutocomplete-4CFl6XQR.js} +3 -3
  6. package/dist/{BAutocomplete-jAlZC6_t.js.map → BAutocomplete-4CFl6XQR.js.map} +1 -1
  7. package/dist/{BAutocomplete-QBIaWPY1.mjs → BAutocomplete-B7yzKPIp.mjs} +3 -3
  8. package/dist/{BAutocomplete-QBIaWPY1.mjs.map → BAutocomplete-B7yzKPIp.mjs.map} +1 -1
  9. package/dist/{BAvatar-lefHkDuG.js → BAvatar-BHqTW5Ll.js} +1 -2
  10. package/dist/BAvatar-BHqTW5Ll.js.map +1 -0
  11. package/dist/{BAvatar-D7aFEXLH.mjs → BAvatar-BSLk69M0.mjs} +1 -2
  12. package/dist/BAvatar-BSLk69M0.mjs.map +1 -0
  13. package/dist/{BButton-kykTWnBy.js → BButton-BUYwco3v.js} +4 -4
  14. package/dist/BButton-BUYwco3v.js.map +1 -0
  15. package/dist/{BButton-DBRs8Pz_.js → BButton-Bw4HgpsF.js} +10 -13
  16. package/dist/BButton-Bw4HgpsF.js.map +1 -0
  17. package/dist/{BButton-BRvIFnRm.mjs → BButton-CDo9SRvU.mjs} +10 -13
  18. package/dist/BButton-CDo9SRvU.mjs.map +1 -0
  19. package/dist/{BButton-DNmtqoqR.mjs → BButton-DgequxLk.mjs} +4 -4
  20. package/dist/BButton-DgequxLk.mjs.map +1 -0
  21. package/dist/{BDropdown-C1AxRj81.js → BDropdown-BxciLgyt.js} +15 -16
  22. package/dist/BDropdown-BxciLgyt.js.map +1 -0
  23. package/dist/{BDropdown-BW_O8vPQ.mjs → BDropdown-CRIh9xqy.mjs} +2 -2
  24. package/dist/{BDropdown-BW_O8vPQ.mjs.map → BDropdown-CRIh9xqy.mjs.map} +1 -1
  25. package/dist/{BDropdown-DAHnN54Z.mjs → BDropdown-D2pBrZsG.mjs} +15 -16
  26. package/dist/BDropdown-D2pBrZsG.mjs.map +1 -0
  27. package/dist/{BDropdown-CuVOxCzu.js → BDropdown-DgbFCKfP.js} +2 -2
  28. package/dist/{BDropdown-CuVOxCzu.js.map → BDropdown-DgbFCKfP.js.map} +1 -1
  29. package/dist/{BFormCheckbox-Bdk2rgVe.js → BFormCheckbox-BPQxUDQG.js} +5 -5
  30. package/dist/BFormCheckbox-BPQxUDQG.js.map +1 -0
  31. package/dist/{BFormCheckbox-CcDK-lh1.mjs → BFormCheckbox-DPNPjRKN.mjs} +5 -5
  32. package/dist/BFormCheckbox-DPNPjRKN.mjs.map +1 -0
  33. package/dist/{BFormRadio-DuVYw-Vs.js → BFormRadio-BZ0etDxl.js} +5 -5
  34. package/dist/BFormRadio-BZ0etDxl.js.map +1 -0
  35. package/dist/{BFormRadio-CRDbgMiR.mjs → BFormRadio-CqYd0bLV.mjs} +5 -5
  36. package/dist/BFormRadio-CqYd0bLV.mjs.map +1 -0
  37. package/dist/{BFormSelect-DIKVsG--.js → BFormSelect-B_mbfTMC.js} +5 -5
  38. package/dist/BFormSelect-B_mbfTMC.js.map +1 -0
  39. package/dist/{BFormSelect-Bb8yE8vz.mjs → BFormSelect-CpkJ1haI.mjs} +5 -5
  40. package/dist/BFormSelect-CpkJ1haI.mjs.map +1 -0
  41. package/dist/{BFormTags-BFA6xbr3.js → BFormTags-DJzXJp7d.js} +3 -3
  42. package/dist/BFormTags-DJzXJp7d.js.map +1 -0
  43. package/dist/{BFormTags-CJb4H67g.mjs → BFormTags-DWAWX2av.mjs} +3 -3
  44. package/dist/BFormTags-DWAWX2av.mjs.map +1 -0
  45. package/dist/{BInputGroup-BScMw6Zr.js → BInputGroup-Bfcs5h_Q.js} +2 -2
  46. package/dist/{BInputGroup-BScMw6Zr.js.map → BInputGroup-Bfcs5h_Q.js.map} +1 -1
  47. package/dist/{BInputGroup-DpX10xwR.mjs → BInputGroup-C5sxenhE.mjs} +3 -3
  48. package/dist/BInputGroup-C5sxenhE.mjs.map +1 -0
  49. package/dist/{BInputGroup-Duk6Jk0v.js → BInputGroup-DTP5Vf1f.js} +3 -3
  50. package/dist/BInputGroup-DTP5Vf1f.js.map +1 -0
  51. package/dist/{BInputGroup-C7k0tS9j.mjs → BInputGroup-Dl9AgpAx.mjs} +2 -2
  52. package/dist/{BInputGroup-C7k0tS9j.mjs.map → BInputGroup-Dl9AgpAx.mjs.map} +1 -1
  53. package/dist/{BModal-D0LB339D.js → BModal-BnHYbFuj.js} +5 -5
  54. package/dist/BModal-BnHYbFuj.js.map +1 -0
  55. package/dist/{BModal-Br5xLT0-.mjs → BModal-CAjLrkBp.mjs} +5 -5
  56. package/dist/BModal-CAjLrkBp.mjs.map +1 -0
  57. package/dist/{BNav-BRjdHsjC.mjs → BNav-BdO2N7G0.mjs} +4 -3
  58. package/dist/{BNav-BRjdHsjC.mjs.map → BNav-BdO2N7G0.mjs.map} +1 -1
  59. package/dist/{BNav-tYBwz1wU.js → BNav-MjroX-Jl.js} +4 -3
  60. package/dist/{BNav-tYBwz1wU.js.map → BNav-MjroX-Jl.js.map} +1 -1
  61. package/dist/{BOffcanvas-D33pEfZe.js → BOffcanvas-ColOuYdV.js} +2 -2
  62. package/dist/{BOffcanvas-D33pEfZe.js.map → BOffcanvas-ColOuYdV.js.map} +1 -1
  63. package/dist/{BOffcanvas-jETHbtC3.mjs → BOffcanvas-DmkJSSFy.mjs} +2 -2
  64. package/dist/{BOffcanvas-jETHbtC3.mjs.map → BOffcanvas-DmkJSSFy.mjs.map} +1 -1
  65. package/dist/{BPlaceholder-C4AOg29f.mjs → BPlaceholder-DKDtjMjy.mjs} +9 -9
  66. package/dist/BPlaceholder-DKDtjMjy.mjs.map +1 -0
  67. package/dist/{BPlaceholder-DYYYuNgR.js → BPlaceholder-n447tOzJ.js} +9 -9
  68. package/dist/BPlaceholder-n447tOzJ.js.map +1 -0
  69. package/dist/{BToast-DCSZYXIi.js → BToast-BFcT76M1.js} +2 -2
  70. package/dist/{BToast-DCSZYXIi.js.map → BToast-BFcT76M1.js.map} +1 -1
  71. package/dist/{BToast-B2rFKhLD.mjs → BToast-D5XkJqF4.mjs} +2 -2
  72. package/dist/{BToast-B2rFKhLD.mjs.map → BToast-D5XkJqF4.mjs.map} +1 -1
  73. package/dist/{BTooltip-CryTO-SM.js → BTooltip-BwiqjqX-.js} +2 -2
  74. package/dist/{BTooltip-CryTO-SM.js.map → BTooltip-BwiqjqX-.js.map} +1 -1
  75. package/dist/{BTooltip-DtpjIEBu.mjs → BTooltip-DohT1Q3C.mjs} +2 -2
  76. package/dist/{BTooltip-DtpjIEBu.mjs.map → BTooltip-DohT1Q3C.mjs.map} +1 -1
  77. package/dist/bootstrap-vue-next.mjs +20 -20
  78. package/dist/bootstrap-vue-next.umd.js +20 -20
  79. package/dist/components/BContainer/BCol.vue.d.mts +1 -1
  80. package/dist/components/BContainer/BCol.vue.d.ts +1 -1
  81. package/dist/components/BDropdown/BDropdown.vue.d.mts +1 -0
  82. package/dist/components/BDropdown/BDropdown.vue.d.ts +1 -0
  83. package/dist/components/BNav/BNavItemDropdown.vue.d.mts +13 -2
  84. package/dist/components/BNav/BNavItemDropdown.vue.d.ts +13 -2
  85. package/dist/{floatingUi-DHMrP__c.mjs → floatingUi-BAUk171g.mjs} +10 -2
  86. package/dist/{floatingUi-DHMrP__c.mjs.map → floatingUi-BAUk171g.mjs.map} +1 -1
  87. package/dist/{floatingUi-Cs4rDXmO.js → floatingUi-DBLN9xLH.js} +15 -1
  88. package/dist/{floatingUi-Cs4rDXmO.js.map → floatingUi-DBLN9xLH.js.map} +1 -1
  89. package/dist/keys-CQKrwmvN.mjs.map +1 -1
  90. package/dist/keys-durSVUrO.js.map +1 -1
  91. package/dist/src/components/BAlert/index.mjs +1 -1
  92. package/dist/src/components/BAlert/index.umd.js +1 -1
  93. package/dist/src/components/BAutocomplete/index.mjs +1 -1
  94. package/dist/src/components/BAutocomplete/index.umd.js +1 -1
  95. package/dist/src/components/BAvatar/index.mjs +1 -1
  96. package/dist/src/components/BAvatar/index.umd.js +1 -1
  97. package/dist/src/components/BButton/index.mjs +2 -2
  98. package/dist/src/components/BButton/index.umd.js +2 -2
  99. package/dist/src/components/BDropdown/index.mjs +2 -2
  100. package/dist/src/components/BDropdown/index.umd.js +2 -2
  101. package/dist/src/components/BFormCheckbox/index.mjs +1 -1
  102. package/dist/src/components/BFormCheckbox/index.umd.js +1 -1
  103. package/dist/src/components/BFormRadio/index.mjs +1 -1
  104. package/dist/src/components/BFormRadio/index.umd.js +1 -1
  105. package/dist/src/components/BFormSelect/index.mjs +1 -1
  106. package/dist/src/components/BFormSelect/index.umd.js +1 -1
  107. package/dist/src/components/BFormTags/index.mjs +1 -1
  108. package/dist/src/components/BFormTags/index.umd.js +1 -1
  109. package/dist/src/components/BInputGroup/index.mjs +2 -2
  110. package/dist/src/components/BInputGroup/index.umd.js +2 -2
  111. package/dist/src/components/BModal/index.mjs +1 -1
  112. package/dist/src/components/BModal/index.umd.js +1 -1
  113. package/dist/src/components/BNav/index.mjs +1 -1
  114. package/dist/src/components/BNav/index.umd.js +1 -1
  115. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  116. package/dist/src/components/BOffcanvas/index.umd.js +1 -1
  117. package/dist/src/components/BPlaceholder/index.mjs +1 -1
  118. package/dist/src/components/BPlaceholder/index.umd.js +1 -1
  119. package/dist/src/components/BPopover/index.mjs +1 -1
  120. package/dist/src/components/BPopover/index.umd.js +1 -1
  121. package/dist/src/components/BToast/index.mjs +1 -1
  122. package/dist/src/components/BToast/index.umd.js +1 -1
  123. package/dist/src/components/BTooltip/index.mjs +1 -1
  124. package/dist/src/components/BTooltip/index.umd.js +1 -1
  125. package/dist/src/components/index.mjs +20 -20
  126. package/dist/src/components/index.umd.js +20 -20
  127. package/dist/src/composables/useModal/index.mjs +1 -1
  128. package/dist/src/composables/useModal/index.umd.js +1 -1
  129. package/dist/src/composables/usePopover/index.mjs +2 -2
  130. package/dist/src/composables/usePopover/index.umd.js +2 -2
  131. package/dist/src/composables/useToast/index.mjs +1 -1
  132. package/dist/src/composables/useToast/index.umd.js +1 -1
  133. package/dist/src/directives/BPopover/index.mjs +2 -2
  134. package/dist/src/directives/BPopover/index.umd.js +2 -2
  135. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  136. package/dist/src/directives/BScrollspy/index.umd.js +1 -1
  137. package/dist/src/directives/BToggle/index.mjs +1 -1
  138. package/dist/src/directives/BToggle/index.umd.js +1 -1
  139. package/dist/src/directives/BTooltip/index.mjs +2 -2
  140. package/dist/src/directives/BTooltip/index.umd.js +2 -2
  141. package/dist/types/ComponentProps.d.mts +1 -0
  142. package/dist/types/ComponentProps.d.ts +1 -0
  143. package/dist/types/ComponentSlots.d.mts +2 -1
  144. package/dist/types/ComponentSlots.d.ts +2 -1
  145. package/dist/types/Size.d.mts +0 -1
  146. package/dist/types/Size.d.ts +0 -1
  147. package/dist/{useFormCheck-CJvIDxcO.mjs → useFormCheck-CbRHduFK.mjs} +3 -3
  148. package/dist/useFormCheck-CbRHduFK.mjs.map +1 -0
  149. package/dist/{useFormCheck-UHNy_iZ0.js → useFormCheck-Cj5K6pk-.js} +3 -3
  150. package/dist/useFormCheck-Cj5K6pk-.js.map +1 -0
  151. package/dist/utils/floatingUi.d.mts +1 -0
  152. package/dist/utils/floatingUi.d.ts +1 -0
  153. package/dist/utils/keys.d.mts +2 -2
  154. package/dist/utils/keys.d.ts +2 -2
  155. package/dist/{utils-CgwCsk6U.mjs → utils-D30CwVm-.mjs} +3 -4
  156. package/dist/utils-D30CwVm-.mjs.map +1 -0
  157. package/dist/{utils-CaC78Zdk.js → utils-DtPi91ue.js} +3 -4
  158. package/dist/utils-DtPi91ue.js.map +1 -0
  159. package/package.json +1 -1
  160. package/dist/BAvatar-D7aFEXLH.mjs.map +0 -1
  161. package/dist/BAvatar-lefHkDuG.js.map +0 -1
  162. package/dist/BButton-BRvIFnRm.mjs.map +0 -1
  163. package/dist/BButton-DBRs8Pz_.js.map +0 -1
  164. package/dist/BButton-DNmtqoqR.mjs.map +0 -1
  165. package/dist/BButton-kykTWnBy.js.map +0 -1
  166. package/dist/BDropdown-C1AxRj81.js.map +0 -1
  167. package/dist/BDropdown-DAHnN54Z.mjs.map +0 -1
  168. package/dist/BFormCheckbox-Bdk2rgVe.js.map +0 -1
  169. package/dist/BFormCheckbox-CcDK-lh1.mjs.map +0 -1
  170. package/dist/BFormRadio-CRDbgMiR.mjs.map +0 -1
  171. package/dist/BFormRadio-DuVYw-Vs.js.map +0 -1
  172. package/dist/BFormSelect-Bb8yE8vz.mjs.map +0 -1
  173. package/dist/BFormSelect-DIKVsG--.js.map +0 -1
  174. package/dist/BFormTags-BFA6xbr3.js.map +0 -1
  175. package/dist/BFormTags-CJb4H67g.mjs.map +0 -1
  176. package/dist/BInputGroup-DpX10xwR.mjs.map +0 -1
  177. package/dist/BInputGroup-Duk6Jk0v.js.map +0 -1
  178. package/dist/BModal-Br5xLT0-.mjs.map +0 -1
  179. package/dist/BModal-D0LB339D.js.map +0 -1
  180. package/dist/BPlaceholder-C4AOg29f.mjs.map +0 -1
  181. package/dist/BPlaceholder-DYYYuNgR.js.map +0 -1
  182. package/dist/useFormCheck-CJvIDxcO.mjs.map +0 -1
  183. package/dist/useFormCheck-UHNy_iZ0.js.map +0 -1
  184. package/dist/utils-CaC78Zdk.js.map +0 -1
  185. package/dist/utils-CgwCsk6U.mjs.map +0 -1
@@ -1 +1 @@
1
- {"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,eAAe,eAAc;EAEjD,MAAM,mBAAmB,IAAwB,KAAI;EACrD,MAAM,iBAAiB,IAAwB,KAAI;EAEnD,MAAM,kBAAkB,eAAe,MAAM,UAAU,WAAW,OAAO,CAAA;EACzE,MAAM,eAAe,kBAAkB,MA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;;AAGJ,IAAa,cAAc,UACzB,UAAU,uBAAuB,iBAAiB,WAAW,MAAM,QAAQ,MAAM;AAEnF,IAAa,kBAAkB,UAC7B,CAAC,WAAW,MAAM"}
1
+ {"version":3,"file":"floatingUi-BAUk171g.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 updateBind = (\n el: ElementWithPopper,\n binding: Readonly<DirectiveBinding>,\n props: BPopoverProps\n) => {\n const div = el.$__element\n if (!div) {\n bind(el, binding, props)\n return\n }\n // Re-render in the same container so Vue can diff/patch the component props\n // without unmounting it — this keeps the tooltip visible if it was open\n render(h(BPopover, props), 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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,IAAI;UAC5C,QAAQ,UAAU,MAAO,IAAG,YAAY,IAAI;KAChD,IAAG,YAAY,aAAa,KAAK,GAAG,YAAY;AACrD,QAAO,EAAE,kBAAU,MAAM,EAAE,IAAI;AAC/B,IAAG,aAAa;;AAGlB,IAAa,cACX,IACA,SACA,UACG;CACH,MAAM,MAAM,GAAG;AACf,KAAI,CAAC,KAAK;AACR,OAAK,IAAI,SAAS,MAAM;AACxB;;AAIF,QAAO,EAAE,kBAAU,MAAM,EAAE,IAAI;;AAGjC,IAAa,UAAU,OAA0B;CAC/C,MAAM,MAAM,GAAG;AACf,KAAI,CAAC,IAAK;AAGV,QAAO,MAAM,IAAI;AAGjB,KAAI,iBAAiB,KAAK,MAAM;AAC9B,SAAO,GAAG;AACV;;AAKF,sBAAqB;AAGnB,MAAI,QAAQ;AAGZ,MAAI,GAAG,eAAe,IACpB,QAAO,GAAG;GAEZ;;AAGJ,IAAa,cAAc,UACzB,UAAU,uBAAuB,iBAAiB,WAAW,MAAM,QAAQ,MAAM;AAEnF,IAAa,kBAAkB,UAC7B,CAAC,WAAW,MAAM"}
@@ -510,6 +510,14 @@ var bind = (el, binding, props) => {
510
510
  (0, vue.render)((0, vue.h)(BPopover_default, props), div);
511
511
  el.$__element = div;
512
512
  };
513
+ var updateBind = (el, binding, props) => {
514
+ const div = el.$__element;
515
+ if (!div) {
516
+ bind(el, binding, props);
517
+ return;
518
+ }
519
+ (0, vue.render)((0, vue.h)(BPopover_default, props), div);
520
+ };
513
521
  var unbind = (el) => {
514
522
  const div = el.$__element;
515
523
  if (!div) return;
@@ -580,5 +588,11 @@ Object.defineProperty(exports, "unbind", {
580
588
  return unbind;
581
589
  }
582
590
  });
591
+ Object.defineProperty(exports, "updateBind", {
592
+ enumerable: true,
593
+ get: function() {
594
+ return updateBind;
595
+ }
596
+ });
583
597
 
584
- //# sourceMappingURL=floatingUi-Cs4rDXmO.js.map
598
+ //# sourceMappingURL=floatingUi-DBLN9xLH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"floatingUi-Cs4rDXmO.js","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,aAAA,uBAAuB,aAAA,SAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECwIzD,MAAM,QAAQ,oBAAA,YAvCC,SAuCmB,WAAU;EAC5C,MAAM,OAAO;EACb,MAAM,SAAA,GAAA,IAAA,WAAQ;EACd,MAAM,SAAA,GAAA,IAAA,WAAiB;EAEvB,MAAM,cAAA,GAAA,IAAA,UAAyE,SAAA,aAE9E;EAED,MAAM,aAAa,cAAA,YAAY,MAAM,IAAI,UAAS;EAElD,MAAM,UAAA,GAAA,IAAA,KAAa,MAAK;EAExB,MAAM,mBAAA,GAAA,IAAA,gBAAiC,WAAU;EACjD,MAAM,WAAA,GAAA,IAAA,gBAAyB,WAAU;EACzC,MAAM,WAAA,GAAA,IAAA,gBAAuB,S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AGnB,MAAI,QAAQ;AAGZ,MAAI,GAAG,eAAe,IACpB,QAAO,GAAG;GAEZ;;AAGJ,IAAa,cAAc,UACzB,UAAU,uBAAuB,iBAAiB,WAAW,MAAM,QAAQ,MAAM;AAEnF,IAAa,kBAAkB,UAC7B,CAAC,WAAW,MAAM"}
1
+ {"version":3,"file":"floatingUi-DBLN9xLH.js","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 updateBind = (\n el: ElementWithPopper,\n binding: Readonly<DirectiveBinding>,\n props: BPopoverProps\n) => {\n const div = el.$__element\n if (!div) {\n bind(el, binding, props)\n return\n }\n // Re-render in the same container so Vue can diff/patch the component props\n // without unmounting it — this keeps the tooltip visible if it was open\n render(h(BPopover, props), 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,aAAA,uBAAuB,aAAA,SAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECwIzD,MAAM,QAAQ,o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YAAY,IAAI;UAC5C,QAAQ,UAAU,MAAO,IAAG,YAAY,IAAI;KAChD,IAAG,YAAY,aAAa,KAAK,GAAG,YAAY;AACrD,EAAA,GAAA,IAAA,SAAA,GAAA,IAAA,GAAS,kBAAU,MAAM,EAAE,IAAI;AAC/B,IAAG,aAAa;;AAGlB,IAAa,cACX,IACA,SACA,UACG;CACH,MAAM,MAAM,GAAG;AACf,KAAI,CAAC,KAAK;AACR,OAAK,IAAI,SAAS,MAAM;AACxB;;AAIF,EAAA,GAAA,IAAA,SAAA,GAAA,IAAA,GAAS,kBAAU,MAAM,EAAE,IAAI;;AAGjC,IAAa,UAAU,OAA0B;CAC/C,MAAM,MAAM,GAAG;AACf,KAAI,CAAC,IAAK;AAGV,EAAA,GAAA,IAAA,QAAO,MAAM,IAAI;AAGjB,KAAI,YAAA,iBAAiB,KAAK,MAAM;AAC9B,SAAO,GAAG;AACV;;AAKF,sBAAqB;AAGnB,MAAI,QAAQ;AAGZ,MAAI,GAAG,eAAe,IACpB,QAAO,GAAG;GAEZ;;AAGJ,IAAa,cAAc,UACzB,UAAU,uBAAuB,iBAAiB,WAAW,MAAM,QAAQ,MAAM;AAEnF,IAAa,kBAAkB,UAC7B,CAAC,WAAW,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"keys-CQKrwmvN.mjs","names":[],"sources":["../src/utils/keys.ts"],"sourcesContent":["import type {ComponentInternalInstance, ComputedRef, InjectionKey, Ref, ShallowRef} from 'vue'\nimport type {TabType} from '../types/Tab'\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport type {Numberish, ValidationState} from '../types/CommonTypes'\nimport type {LiteralUnion} from '../types/LiteralUnion'\nimport type {Size} from '../types/Size'\nimport type {RadiusElement} from '../types/RadiusElement'\nimport type {\n BgColorVariant,\n ButtonVariant,\n ColorVariant,\n TextColorVariant,\n} from '../types/ColorTypes'\nimport type {CheckboxValue} from '../types/CheckboxTypes'\nimport type {RadioValue} from '../types/RadioTypes'\nimport type {BreadcrumbItemRaw} from '../types/BreadcrumbTypes'\nimport type {OrchestratorArrayValue} from '../types/ComponentOrchestratorTypes'\nimport type {BvnComponentProps} from '../types/BootstrapVueOptions'\n\nexport const genericBvnPrefix = 'BootstrapVueNext__'\n\nexport const withBvnPrefix = (value: string, suffix: string = '') => {\n const suffixWithTrail = `${suffix}___`\n return `${genericBvnPrefix}ID__${value}__${suffix ? suffixWithTrail : ''}`\n}\n\nconst createBvnInjectionKey = (name: string) => withBvnPrefix(name) as unknown as symbol // Type cast to symbol, these should be static\nconst createBvnRegistryInjectionKey = (name: string) =>\n withBvnPrefix(`${name}__registry`) as unknown as symbol\n\n// BCarousel\nexport const carouselInjectionKey: InjectionKey<{\n background: Readonly<Ref<string | undefined>>\n width: Readonly<Ref<string | undefined>>\n height: Readonly<Ref<string | undefined>>\n}> = createBvnInjectionKey('carousel')\n\n// BTabs\nexport const tabsInjectionKey: InjectionKey<{\n lazy: Readonly<Ref<boolean>>\n card: Readonly<Ref<boolean>>\n noFade: Readonly<Ref<boolean>>\n registerTab: (tab: ComputedRef<TabType>) => string\n unregisterTab: (id: string) => void\n activateTab: (id: string | undefined) => void\n activeTabClass: Readonly<Ref<ClassValue>>\n inactiveTabClass: Readonly<Ref<ClassValue>>\n tabClass: Readonly<Ref<ClassValue>>\n activeId: Readonly<Ref<string | undefined>>\n}> = createBvnInjectionKey('tabs')\n\n// BProgress\nexport const progressInjectionKey: InjectionKey<{\n animated: Readonly<Ref<boolean | undefined>>\n max: Readonly<Ref<Numberish>>\n showProgress: Readonly<Ref<boolean | undefined>>\n showValue: Readonly<Ref<boolean | undefined>>\n striped: Readonly<Ref<boolean | undefined>>\n}> = createBvnInjectionKey('progress')\n\n// BListGroup\nexport const listGroupInjectionKey: InjectionKey<{\n numbered: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('listGroup')\n\n// BAvatarGroup\nexport const avatarGroupInjectionKey: InjectionKey<{\n overlapScale: Readonly<Ref<number>>\n size: Readonly<Ref<LiteralUnion<Size, Numberish> | undefined>>\n square: Readonly<Ref<boolean>>\n rounded: Readonly<Ref<RadiusElement | boolean>>\n roundedTop: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedBottom: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedStart: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedEnd: Readonly<Ref<RadiusElement | boolean | undefined>>\n variant: Readonly<Ref<ColorVariant | null>>\n bgVariant: Readonly<Ref<BgColorVariant | null>>\n textVariant: Readonly<Ref<TextColorVariant | null>>\n}> = createBvnInjectionKey('avatarGroup')\n\n// BAccordion\nexport const accordionInjectionKey: InjectionKey<{\n openItem: Readonly<Ref<string | readonly string[] | undefined>>\n free: Readonly<Ref<boolean>>\n initialAnimation: Readonly<Ref<boolean>>\n lazy: Readonly<Ref<boolean>>\n unmountLazy: Readonly<Ref<boolean>>\n setOpenItem: (id: string) => void\n setCloseItem: (id: string) => void\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => void\n unregisterAccordionItem: (id: string) => void\n}> = createBvnInjectionKey('accordion')\n\n// BFormCheckboxGroup\nexport const checkboxGroupKey: InjectionKey<{\n modelValue: Ref<readonly CheckboxValue[]>\n switch: Readonly<Ref<boolean>>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n state: Readonly<Ref<ValidationState | undefined>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n buttons: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('checkboxGroup')\n\nexport const radioGroupKey: InjectionKey<{\n modelValue: Ref<RadioValue>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n buttons: Readonly<Ref<boolean>>\n state: Readonly<Ref<ValidationState | undefined>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('radioGroup')\n\n// Collapse\nexport const collapseInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('collapse')\n\n// Show/Hide components\nexport type RegisterShowHideFnInput = {\n id: string\n component: ComponentInternalInstance\n value: Ref<boolean>\n toggle: (resolveOnHide?: boolean) => Promise<boolean | string>\n show: (resolveOnHide?: boolean) => Promise<boolean | string>\n hide: (trigger?: string) => Promise<boolean | string>\n registerTrigger: (trigger: string, el: Element) => void\n unregisterTrigger: (trigger: string, el: Element, clean: boolean) => void\n}\n\nexport interface RegisterShowHideMapValue {\n id: string\n component: ComponentInternalInstance\n value: Readonly<Ref<boolean>>\n toggle: (resolveOnHide?: boolean) => Promise<boolean | string | null>\n show: (resolveOnHide?: boolean) => Promise<boolean | string | null>\n hide: (trigger?: string, noTraverse?: boolean) => Promise<boolean | string | null>\n registerTrigger: (trigger: string, el: Element) => void\n unregisterTrigger: (trigger: string, el: Element, clean: boolean) => void\n}\n\n/**\n * Represents an array of component instances with the same ID\n * Used to handle race conditions where multiple instances mount/unmount out of order\n */\nexport interface RegisterShowHideInstances {\n instances: RegisterShowHideMapValue[]\n getActive: () => RegisterShowHideMapValue | undefined\n}\n\nexport interface RegisterShowHideValue {\n register: (input: RegisterShowHideFnInput) => {\n unregister: () => void\n updateId: (newId: string, oldId: string) => void\n }\n values: Ref<Map<string, RegisterShowHideInstances>>\n}\nexport const showHideRegistryKey: InjectionKey<RegisterShowHideValue> =\n createBvnRegistryInjectionKey('showHide')\n\nexport const dropdownInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('dropdown')\n\nexport const navbarInjectionKey: InjectionKey<{\n tag?: Readonly<Ref<string>>\n noAutoClose?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('navbar')\n\nexport const rtlRegistryKey: InjectionKey<{\n isRtl: Ref<boolean>\n locale: Ref<string | undefined>\n}> = createBvnRegistryInjectionKey('rtl')\n\nexport const breadcrumbGlobalIndexKey = `${genericBvnPrefix}global_breadcrumb`\nexport const breadcrumbRegistryKey: InjectionKey<{\n items: Ref<Record<string, BreadcrumbItemRaw[]>>\n reset: (key?: string) => void\n}> = createBvnRegistryInjectionKey('breadcrumb')\n\nexport const modalManagerKey: InjectionKey<{\n stack: ComputedRef<readonly ComponentInternalInstance[]>\n countStack: ComputedRef<number>\n lastStack: ComputedRef<ComponentInternalInstance | undefined>\n pushStack: (modal: Readonly<ComponentInternalInstance>) => void\n removeStack: (modal: Readonly<ComponentInternalInstance>) => void\n registry: Readonly<Ref<Map<number, ComponentInternalInstance>>>\n pushRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n removeRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n}> = createBvnRegistryInjectionKey('modalManager')\n\nexport const defaultsKey: InjectionKey<Ref<Partial<BvnComponentProps>>> =\n createBvnRegistryInjectionKey('defaults')\n\nexport const inputGroupKey: InjectionKey<boolean> = createBvnInjectionKey('inputGroup')\nexport const buttonGroupKey: InjectionKey<boolean> = createBvnInjectionKey('buttonGroup')\n\nexport const orchestratorRegistryKey: InjectionKey<{\n store: Ref<OrchestratorArrayValue[]>\n _isToastAppend: Ref<boolean>\n _isOrchestratorInstalled: Ref<boolean>\n}> = createBvnRegistryInjectionKey('orchestrator')\n\nexport const formGroupKey: InjectionKey<\n (id: Ref<string>) => {\n state: Readonly<Ref<ValidationState | undefined>>\n disabled: Readonly<Ref<boolean>>\n }\n> = createBvnInjectionKey('formGroupPlugin')\n\nexport const formSelectKey: InjectionKey<{\n modelValue: Readonly<Ref<unknown>>\n}> = createBvnInjectionKey('formSelect')\n// BTable keyboard navigation\nexport const tableKeyboardNavigationKey: InjectionKey<{\n rowNavigation: Readonly<Ref<boolean>>\n headerNavigation: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('tableKeyboardNavigation')\n"],"mappings":";AAmBA,IAAa,mBAAmB;AAEhC,IAAa,iBAAiB,OAAe,SAAiB,OAAO;CACnE,MAAM,kBAAkB,GAAG,OAAO;AAClC,QAAO,GAAG,iBAAiB,MAAM,MAAM,IAAI,SAAS,kBAAkB;;AAGxE,IAAM,yBAAyB,SAAiB,cAAc,KAAK;AACnE,IAAM,iCAAiC,SACrC,cAAc,GAAG,KAAK,YAAY;AAGpC,IAAa,uBAIR,sBAAsB,WAAW;AAGtC,IAAa,mBAWR,sBAAsB,OAAO;AAGlC,IAAa,uBAMR,sBAAsB,WAAW;AAGtC,IAAa,wBAER,sBAAsB,YAAY;AAGvC,IAAa,0BAYR,sBAAsB,cAAc;AAGzC,IAAa,wBAUR,sBAAsB,YAAY;AAGvC,IAAa,mBAcR,sBAAsB,gBAAgB;AAE3C,IAAa,gBAaR,sBAAsB,aAAa;AAGxC,IAAa,uBAOR,sBAAsB,WAAW;AAyCtC,IAAa,sBACX,8BAA8B,WAAW;AAE3C,IAAa,uBAOR,sBAAsB,WAAW;AAEtC,IAAa,qBAGR,sBAAsB,SAAS;AAEpC,IAAa,iBAGR,8BAA8B,MAAM;AAEzC,IAAa,2BAA2B,GAAG,iBAAiB;AAC5D,IAAa,wBAGR,8BAA8B,aAAa;AAEhD,IAAa,kBASR,8BAA8B,eAAe;AAElD,IAAa,cACX,8BAA8B,WAAW;AAE3C,IAAa,gBAAuC,sBAAsB,aAAa;AACvF,IAAa,iBAAwC,sBAAsB,cAAc;AAEzF,IAAa,0BAIR,8BAA8B,eAAe;AAElD,IAAa,eAKT,sBAAsB,kBAAkB;AAE5C,IAAa,gBAER,sBAAsB,aAAa;AAExC,IAAa,6BAGR,sBAAsB,0BAA0B"}
1
+ {"version":3,"file":"keys-CQKrwmvN.mjs","names":[],"sources":["../src/utils/keys.ts"],"sourcesContent":["import type {ComponentInternalInstance, ComputedRef, InjectionKey, Ref, ShallowRef} from 'vue'\nimport type {TabType} from '../types/Tab'\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport type {Numberish, ValidationState} from '../types/CommonTypes'\nimport type {LiteralUnion} from '../types/LiteralUnion'\nimport type {Size} from '../types/Size'\nimport type {RadiusElement} from '../types/RadiusElement'\nimport type {\n BgColorVariant,\n ButtonVariant,\n ColorVariant,\n TextColorVariant,\n} from '../types/ColorTypes'\nimport type {CheckboxValue} from '../types/CheckboxTypes'\nimport type {RadioValue} from '../types/RadioTypes'\nimport type {BreadcrumbItemRaw} from '../types/BreadcrumbTypes'\nimport type {OrchestratorArrayValue} from '../types/ComponentOrchestratorTypes'\nimport type {BvnComponentProps} from '../types/BootstrapVueOptions'\n\nexport const genericBvnPrefix = 'BootstrapVueNext__'\n\nexport const withBvnPrefix = (value: string, suffix: string = '') => {\n const suffixWithTrail = `${suffix}___`\n return `${genericBvnPrefix}ID__${value}__${suffix ? suffixWithTrail : ''}`\n}\n\nconst createBvnInjectionKey = (name: string) => withBvnPrefix(name) as unknown as symbol // Type cast to symbol, these should be static\nconst createBvnRegistryInjectionKey = (name: string) =>\n withBvnPrefix(`${name}__registry`) as unknown as symbol\n\n// BCarousel\nexport const carouselInjectionKey: InjectionKey<{\n background: Readonly<Ref<string | undefined>>\n width: Readonly<Ref<string | undefined>>\n height: Readonly<Ref<string | undefined>>\n}> = createBvnInjectionKey('carousel')\n\n// BTabs\nexport const tabsInjectionKey: InjectionKey<{\n lazy: Readonly<Ref<boolean>>\n card: Readonly<Ref<boolean>>\n noFade: Readonly<Ref<boolean>>\n registerTab: (tab: ComputedRef<TabType>) => string\n unregisterTab: (id: string) => void\n activateTab: (id: string | undefined) => void\n activeTabClass: Readonly<Ref<ClassValue>>\n inactiveTabClass: Readonly<Ref<ClassValue>>\n tabClass: Readonly<Ref<ClassValue>>\n activeId: Readonly<Ref<string | undefined>>\n}> = createBvnInjectionKey('tabs')\n\n// BProgress\nexport const progressInjectionKey: InjectionKey<{\n animated: Readonly<Ref<boolean | undefined>>\n max: Readonly<Ref<Numberish>>\n showProgress: Readonly<Ref<boolean | undefined>>\n showValue: Readonly<Ref<boolean | undefined>>\n striped: Readonly<Ref<boolean | undefined>>\n}> = createBvnInjectionKey('progress')\n\n// BListGroup\nexport const listGroupInjectionKey: InjectionKey<{\n numbered: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('listGroup')\n\n// BAvatarGroup\nexport const avatarGroupInjectionKey: InjectionKey<{\n overlapScale: Readonly<Ref<number>>\n size: Readonly<Ref<LiteralUnion<Size, Numberish> | undefined>>\n square: Readonly<Ref<boolean>>\n rounded: Readonly<Ref<RadiusElement | boolean>>\n roundedTop: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedBottom: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedStart: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedEnd: Readonly<Ref<RadiusElement | boolean | undefined>>\n variant: Readonly<Ref<ColorVariant | null>>\n bgVariant: Readonly<Ref<BgColorVariant | null>>\n textVariant: Readonly<Ref<TextColorVariant | null>>\n}> = createBvnInjectionKey('avatarGroup')\n\n// BAccordion\nexport const accordionInjectionKey: InjectionKey<{\n openItem: Readonly<Ref<string | readonly string[] | undefined>>\n free: Readonly<Ref<boolean>>\n initialAnimation: Readonly<Ref<boolean>>\n lazy: Readonly<Ref<boolean>>\n unmountLazy: Readonly<Ref<boolean>>\n setOpenItem: (id: string) => void\n setCloseItem: (id: string) => void\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => void\n unregisterAccordionItem: (id: string) => void\n}> = createBvnInjectionKey('accordion')\n\n// BFormCheckboxGroup\nexport const checkboxGroupKey: InjectionKey<{\n modelValue: Ref<readonly CheckboxValue[]>\n switch: Readonly<Ref<boolean>>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n state: Readonly<Ref<ValidationState | undefined>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size | undefined>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n buttons: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('checkboxGroup')\n\nexport const radioGroupKey: InjectionKey<{\n modelValue: Ref<RadioValue>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n buttons: Readonly<Ref<boolean>>\n state: Readonly<Ref<ValidationState | undefined>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size | undefined>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('radioGroup')\n\n// Collapse\nexport const collapseInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('collapse')\n\n// Show/Hide components\nexport type RegisterShowHideFnInput = {\n id: string\n component: ComponentInternalInstance\n value: Ref<boolean>\n toggle: (resolveOnHide?: boolean) => Promise<boolean | string>\n show: (resolveOnHide?: boolean) => Promise<boolean | string>\n hide: (trigger?: string) => Promise<boolean | string>\n registerTrigger: (trigger: string, el: Element) => void\n unregisterTrigger: (trigger: string, el: Element, clean: boolean) => void\n}\n\nexport interface RegisterShowHideMapValue {\n id: string\n component: ComponentInternalInstance\n value: Readonly<Ref<boolean>>\n toggle: (resolveOnHide?: boolean) => Promise<boolean | string | null>\n show: (resolveOnHide?: boolean) => Promise<boolean | string | null>\n hide: (trigger?: string, noTraverse?: boolean) => Promise<boolean | string | null>\n registerTrigger: (trigger: string, el: Element) => void\n unregisterTrigger: (trigger: string, el: Element, clean: boolean) => void\n}\n\n/**\n * Represents an array of component instances with the same ID\n * Used to handle race conditions where multiple instances mount/unmount out of order\n */\nexport interface RegisterShowHideInstances {\n instances: RegisterShowHideMapValue[]\n getActive: () => RegisterShowHideMapValue | undefined\n}\n\nexport interface RegisterShowHideValue {\n register: (input: RegisterShowHideFnInput) => {\n unregister: () => void\n updateId: (newId: string, oldId: string) => void\n }\n values: Ref<Map<string, RegisterShowHideInstances>>\n}\nexport const showHideRegistryKey: InjectionKey<RegisterShowHideValue> =\n createBvnRegistryInjectionKey('showHide')\n\nexport const dropdownInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('dropdown')\n\nexport const navbarInjectionKey: InjectionKey<{\n tag?: Readonly<Ref<string>>\n noAutoClose?: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('navbar')\n\nexport const rtlRegistryKey: InjectionKey<{\n isRtl: Ref<boolean>\n locale: Ref<string | undefined>\n}> = createBvnRegistryInjectionKey('rtl')\n\nexport const breadcrumbGlobalIndexKey = `${genericBvnPrefix}global_breadcrumb`\nexport const breadcrumbRegistryKey: InjectionKey<{\n items: Ref<Record<string, BreadcrumbItemRaw[]>>\n reset: (key?: string) => void\n}> = createBvnRegistryInjectionKey('breadcrumb')\n\nexport const modalManagerKey: InjectionKey<{\n stack: ComputedRef<readonly ComponentInternalInstance[]>\n countStack: ComputedRef<number>\n lastStack: ComputedRef<ComponentInternalInstance | undefined>\n pushStack: (modal: Readonly<ComponentInternalInstance>) => void\n removeStack: (modal: Readonly<ComponentInternalInstance>) => void\n registry: Readonly<Ref<Map<number, ComponentInternalInstance>>>\n pushRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n removeRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n}> = createBvnRegistryInjectionKey('modalManager')\n\nexport const defaultsKey: InjectionKey<Ref<Partial<BvnComponentProps>>> =\n createBvnRegistryInjectionKey('defaults')\n\nexport const inputGroupKey: InjectionKey<boolean> = createBvnInjectionKey('inputGroup')\nexport const buttonGroupKey: InjectionKey<boolean> = createBvnInjectionKey('buttonGroup')\n\nexport const orchestratorRegistryKey: InjectionKey<{\n store: Ref<OrchestratorArrayValue[]>\n _isToastAppend: Ref<boolean>\n _isOrchestratorInstalled: Ref<boolean>\n}> = createBvnRegistryInjectionKey('orchestrator')\n\nexport const formGroupKey: InjectionKey<\n (id: Ref<string>) => {\n state: Readonly<Ref<ValidationState | undefined>>\n disabled: Readonly<Ref<boolean>>\n }\n> = createBvnInjectionKey('formGroupPlugin')\n\nexport const formSelectKey: InjectionKey<{\n modelValue: Readonly<Ref<unknown>>\n}> = createBvnInjectionKey('formSelect')\n// BTable keyboard navigation\nexport const tableKeyboardNavigationKey: InjectionKey<{\n rowNavigation: Readonly<Ref<boolean>>\n headerNavigation: Readonly<Ref<boolean>>\n}> = createBvnInjectionKey('tableKeyboardNavigation')\n"],"mappings":";AAmBA,IAAa,mBAAmB;AAEhC,IAAa,iBAAiB,OAAe,SAAiB,OAAO;CACnE,MAAM,kBAAkB,GAAG,OAAO;AAClC,QAAO,GAAG,iBAAiB,MAAM,MAAM,IAAI,SAAS,kBAAkB;;AAGxE,IAAM,yBAAyB,SAAiB,cAAc,KAAK;AACnE,IAAM,iCAAiC,SACrC,cAAc,GAAG,KAAK,YAAY;AAGpC,IAAa,uBAIR,sBAAsB,WAAW;AAGtC,IAAa,mBAWR,sBAAsB,OAAO;AAGlC,IAAa,uBAMR,sBAAsB,WAAW;AAGtC,IAAa,wBAER,sBAAsB,YAAY;AAGvC,IAAa,0BAYR,sBAAsB,cAAc;AAGzC,IAAa,wBAUR,sBAAsB,YAAY;AAGvC,IAAa,mBAcR,sBAAsB,gBAAgB;AAE3C,IAAa,gBAaR,sBAAsB,aAAa;AAGxC,IAAa,uBAOR,sBAAsB,WAAW;AAyCtC,IAAa,sBACX,8BAA8B,WAAW;AAE3C,IAAa,uBAOR,sBAAsB,WAAW;AAEtC,IAAa,qBAGR,sBAAsB,SAAS;AAEpC,IAAa,iBAGR,8BAA8B,MAAM;AAEzC,IAAa,2BAA2B,GAAG,iBAAiB;AAC5D,IAAa,wBAGR,8BAA8B,aAAa;AAEhD,IAAa,kBASR,8BAA8B,eAAe;AAElD,IAAa,cACX,8BAA8B,WAAW;AAE3C,IAAa,gBAAuC,sBAAsB,aAAa;AACvF,IAAa,iBAAwC,sBAAsB,cAAc;AAEzF,IAAa,0BAIR,8BAA8B,eAAe;AAElD,IAAa,eAKT,sBAAsB,kBAAkB;AAE5C,IAAa,gBAER,sBAAsB,aAAa;AAExC,IAAa,6BAGR,sBAAsB,0BAA0B"}