bootstrap-vue-next 0.44.6 → 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.
- package/dist/{BAlert-BnT7fF6B.js → BAlert-CHbgLTZH.js} +2 -2
- package/dist/{BAlert-BnT7fF6B.js.map → BAlert-CHbgLTZH.js.map} +1 -1
- package/dist/{BAlert-Qiyqq4rE.mjs → BAlert-CRRUJXYi.mjs} +2 -2
- package/dist/{BAlert-Qiyqq4rE.mjs.map → BAlert-CRRUJXYi.mjs.map} +1 -1
- package/dist/{BAutocomplete-jAlZC6_t.js → BAutocomplete-4CFl6XQR.js} +3 -3
- package/dist/{BAutocomplete-jAlZC6_t.js.map → BAutocomplete-4CFl6XQR.js.map} +1 -1
- package/dist/{BAutocomplete-QBIaWPY1.mjs → BAutocomplete-B7yzKPIp.mjs} +3 -3
- package/dist/{BAutocomplete-QBIaWPY1.mjs.map → BAutocomplete-B7yzKPIp.mjs.map} +1 -1
- package/dist/{BAvatar-lefHkDuG.js → BAvatar-BHqTW5Ll.js} +1 -2
- package/dist/BAvatar-BHqTW5Ll.js.map +1 -0
- package/dist/{BAvatar-D7aFEXLH.mjs → BAvatar-BSLk69M0.mjs} +1 -2
- package/dist/BAvatar-BSLk69M0.mjs.map +1 -0
- package/dist/{BButton-kykTWnBy.js → BButton-BUYwco3v.js} +4 -4
- package/dist/BButton-BUYwco3v.js.map +1 -0
- package/dist/{BButton-DBRs8Pz_.js → BButton-Bw4HgpsF.js} +10 -13
- package/dist/BButton-Bw4HgpsF.js.map +1 -0
- package/dist/{BButton-BRvIFnRm.mjs → BButton-CDo9SRvU.mjs} +10 -13
- package/dist/BButton-CDo9SRvU.mjs.map +1 -0
- package/dist/{BButton-DNmtqoqR.mjs → BButton-DgequxLk.mjs} +4 -4
- package/dist/BButton-DgequxLk.mjs.map +1 -0
- package/dist/{BCarousel-Be7z13f9.js → BCarousel-BgT74ryc.js} +87 -87
- package/dist/BCarousel-BgT74ryc.js.map +1 -0
- package/dist/{BCarousel-D81alfFC.mjs → BCarousel-D9Yei1Q4.mjs} +88 -88
- package/dist/BCarousel-D9Yei1Q4.mjs.map +1 -0
- package/dist/{BDropdown-C1AxRj81.js → BDropdown-BxciLgyt.js} +15 -16
- package/dist/BDropdown-BxciLgyt.js.map +1 -0
- package/dist/{BDropdown-BW_O8vPQ.mjs → BDropdown-CRIh9xqy.mjs} +2 -2
- package/dist/{BDropdown-BW_O8vPQ.mjs.map → BDropdown-CRIh9xqy.mjs.map} +1 -1
- package/dist/{BDropdown-DAHnN54Z.mjs → BDropdown-D2pBrZsG.mjs} +15 -16
- package/dist/BDropdown-D2pBrZsG.mjs.map +1 -0
- package/dist/{BDropdown-CuVOxCzu.js → BDropdown-DgbFCKfP.js} +2 -2
- package/dist/{BDropdown-CuVOxCzu.js.map → BDropdown-DgbFCKfP.js.map} +1 -1
- package/dist/{BFormCheckbox-Bdk2rgVe.js → BFormCheckbox-BPQxUDQG.js} +5 -5
- package/dist/BFormCheckbox-BPQxUDQG.js.map +1 -0
- package/dist/{BFormCheckbox-CcDK-lh1.mjs → BFormCheckbox-DPNPjRKN.mjs} +5 -5
- package/dist/BFormCheckbox-DPNPjRKN.mjs.map +1 -0
- package/dist/{BFormRadio-DuVYw-Vs.js → BFormRadio-BZ0etDxl.js} +5 -5
- package/dist/BFormRadio-BZ0etDxl.js.map +1 -0
- package/dist/{BFormRadio-CRDbgMiR.mjs → BFormRadio-CqYd0bLV.mjs} +5 -5
- package/dist/BFormRadio-CqYd0bLV.mjs.map +1 -0
- package/dist/{BFormSelect-DIKVsG--.js → BFormSelect-B_mbfTMC.js} +5 -5
- package/dist/BFormSelect-B_mbfTMC.js.map +1 -0
- package/dist/{BFormSelect-Bb8yE8vz.mjs → BFormSelect-CpkJ1haI.mjs} +5 -5
- package/dist/BFormSelect-CpkJ1haI.mjs.map +1 -0
- package/dist/{BFormTags-BFA6xbr3.js → BFormTags-DJzXJp7d.js} +3 -3
- package/dist/BFormTags-DJzXJp7d.js.map +1 -0
- package/dist/{BFormTags-CJb4H67g.mjs → BFormTags-DWAWX2av.mjs} +3 -3
- package/dist/BFormTags-DWAWX2av.mjs.map +1 -0
- package/dist/{BInputGroup-BScMw6Zr.js → BInputGroup-Bfcs5h_Q.js} +2 -2
- package/dist/{BInputGroup-BScMw6Zr.js.map → BInputGroup-Bfcs5h_Q.js.map} +1 -1
- package/dist/{BInputGroup-DpX10xwR.mjs → BInputGroup-C5sxenhE.mjs} +3 -3
- package/dist/BInputGroup-C5sxenhE.mjs.map +1 -0
- package/dist/{BInputGroup-Duk6Jk0v.js → BInputGroup-DTP5Vf1f.js} +3 -3
- package/dist/BInputGroup-DTP5Vf1f.js.map +1 -0
- package/dist/{BInputGroup-C7k0tS9j.mjs → BInputGroup-Dl9AgpAx.mjs} +2 -2
- package/dist/{BInputGroup-C7k0tS9j.mjs.map → BInputGroup-Dl9AgpAx.mjs.map} +1 -1
- package/dist/{BModal-D0LB339D.js → BModal-BnHYbFuj.js} +5 -5
- package/dist/BModal-BnHYbFuj.js.map +1 -0
- package/dist/{BModal-Br5xLT0-.mjs → BModal-CAjLrkBp.mjs} +5 -5
- package/dist/BModal-CAjLrkBp.mjs.map +1 -0
- package/dist/{BNav-BRjdHsjC.mjs → BNav-BdO2N7G0.mjs} +4 -3
- package/dist/{BNav-BRjdHsjC.mjs.map → BNav-BdO2N7G0.mjs.map} +1 -1
- package/dist/{BNav-tYBwz1wU.js → BNav-MjroX-Jl.js} +4 -3
- package/dist/{BNav-tYBwz1wU.js.map → BNav-MjroX-Jl.js.map} +1 -1
- package/dist/{BOffcanvas-D33pEfZe.js → BOffcanvas-ColOuYdV.js} +2 -2
- package/dist/{BOffcanvas-D33pEfZe.js.map → BOffcanvas-ColOuYdV.js.map} +1 -1
- package/dist/{BOffcanvas-jETHbtC3.mjs → BOffcanvas-DmkJSSFy.mjs} +2 -2
- package/dist/{BOffcanvas-jETHbtC3.mjs.map → BOffcanvas-DmkJSSFy.mjs.map} +1 -1
- package/dist/{BPlaceholder-C4AOg29f.mjs → BPlaceholder-DKDtjMjy.mjs} +9 -9
- package/dist/BPlaceholder-DKDtjMjy.mjs.map +1 -0
- package/dist/{BPlaceholder-DYYYuNgR.js → BPlaceholder-n447tOzJ.js} +9 -9
- package/dist/BPlaceholder-n447tOzJ.js.map +1 -0
- package/dist/{BToast-DCSZYXIi.js → BToast-BFcT76M1.js} +2 -2
- package/dist/{BToast-DCSZYXIi.js.map → BToast-BFcT76M1.js.map} +1 -1
- package/dist/{BToast-B2rFKhLD.mjs → BToast-D5XkJqF4.mjs} +2 -2
- package/dist/{BToast-B2rFKhLD.mjs.map → BToast-D5XkJqF4.mjs.map} +1 -1
- package/dist/{BTooltip-CryTO-SM.js → BTooltip-BwiqjqX-.js} +2 -2
- package/dist/{BTooltip-CryTO-SM.js.map → BTooltip-BwiqjqX-.js.map} +1 -1
- package/dist/{BTooltip-DtpjIEBu.mjs → BTooltip-DohT1Q3C.mjs} +2 -2
- package/dist/{BTooltip-DtpjIEBu.mjs.map → BTooltip-DohT1Q3C.mjs.map} +1 -1
- package/dist/bootstrap-vue-next.mjs +21 -21
- package/dist/bootstrap-vue-next.umd.js +21 -21
- package/dist/components/BCarousel/BCarousel.vue.d.mts +4 -4
- package/dist/components/BCarousel/BCarousel.vue.d.ts +4 -4
- package/dist/components/BContainer/BCol.vue.d.mts +1 -1
- package/dist/components/BContainer/BCol.vue.d.ts +1 -1
- package/dist/components/BDropdown/BDropdown.vue.d.mts +1 -0
- package/dist/components/BDropdown/BDropdown.vue.d.ts +1 -0
- package/dist/components/BNav/BNavItemDropdown.vue.d.mts +13 -2
- package/dist/components/BNav/BNavItemDropdown.vue.d.ts +13 -2
- package/dist/{floatingUi-DHMrP__c.mjs → floatingUi-BAUk171g.mjs} +10 -2
- package/dist/{floatingUi-DHMrP__c.mjs.map → floatingUi-BAUk171g.mjs.map} +1 -1
- package/dist/{floatingUi-Cs4rDXmO.js → floatingUi-DBLN9xLH.js} +15 -1
- package/dist/{floatingUi-Cs4rDXmO.js.map → floatingUi-DBLN9xLH.js.map} +1 -1
- package/dist/keys-CQKrwmvN.mjs.map +1 -1
- package/dist/keys-durSVUrO.js.map +1 -1
- package/dist/src/components/BAlert/index.mjs +1 -1
- package/dist/src/components/BAlert/index.umd.js +1 -1
- package/dist/src/components/BAutocomplete/index.mjs +1 -1
- package/dist/src/components/BAutocomplete/index.umd.js +1 -1
- package/dist/src/components/BAvatar/index.mjs +1 -1
- package/dist/src/components/BAvatar/index.umd.js +1 -1
- package/dist/src/components/BButton/index.mjs +2 -2
- package/dist/src/components/BButton/index.umd.js +2 -2
- package/dist/src/components/BCarousel/index.mjs +1 -1
- package/dist/src/components/BCarousel/index.umd.js +1 -1
- package/dist/src/components/BDropdown/index.mjs +2 -2
- package/dist/src/components/BDropdown/index.umd.js +2 -2
- package/dist/src/components/BFormCheckbox/index.mjs +1 -1
- package/dist/src/components/BFormCheckbox/index.umd.js +1 -1
- package/dist/src/components/BFormRadio/index.mjs +1 -1
- package/dist/src/components/BFormRadio/index.umd.js +1 -1
- package/dist/src/components/BFormSelect/index.mjs +1 -1
- package/dist/src/components/BFormSelect/index.umd.js +1 -1
- package/dist/src/components/BFormTags/index.mjs +1 -1
- package/dist/src/components/BFormTags/index.umd.js +1 -1
- package/dist/src/components/BInputGroup/index.mjs +2 -2
- package/dist/src/components/BInputGroup/index.umd.js +2 -2
- package/dist/src/components/BModal/index.mjs +1 -1
- package/dist/src/components/BModal/index.umd.js +1 -1
- package/dist/src/components/BNav/index.mjs +1 -1
- package/dist/src/components/BNav/index.umd.js +1 -1
- package/dist/src/components/BOffcanvas/index.mjs +1 -1
- package/dist/src/components/BOffcanvas/index.umd.js +1 -1
- package/dist/src/components/BPlaceholder/index.mjs +1 -1
- package/dist/src/components/BPlaceholder/index.umd.js +1 -1
- package/dist/src/components/BPopover/index.mjs +1 -1
- package/dist/src/components/BPopover/index.umd.js +1 -1
- package/dist/src/components/BToast/index.mjs +1 -1
- package/dist/src/components/BToast/index.umd.js +1 -1
- package/dist/src/components/BTooltip/index.mjs +1 -1
- package/dist/src/components/BTooltip/index.umd.js +1 -1
- package/dist/src/components/index.mjs +21 -21
- package/dist/src/components/index.umd.js +21 -21
- package/dist/src/composables/useModal/index.mjs +1 -1
- package/dist/src/composables/useModal/index.umd.js +1 -1
- package/dist/src/composables/usePopover/index.mjs +2 -2
- package/dist/src/composables/usePopover/index.umd.js +2 -2
- package/dist/src/composables/useToast/index.mjs +1 -1
- package/dist/src/composables/useToast/index.umd.js +1 -1
- package/dist/src/directives/BPopover/index.mjs +2 -2
- package/dist/src/directives/BPopover/index.umd.js +2 -2
- package/dist/src/directives/BScrollspy/index.mjs +1 -1
- package/dist/src/directives/BScrollspy/index.umd.js +1 -1
- package/dist/src/directives/BToggle/index.mjs +1 -1
- package/dist/src/directives/BToggle/index.umd.js +1 -1
- package/dist/src/directives/BTooltip/index.mjs +2 -2
- package/dist/src/directives/BTooltip/index.umd.js +2 -2
- package/dist/types/ComponentProps.d.mts +1 -0
- package/dist/types/ComponentProps.d.ts +1 -0
- package/dist/types/ComponentSlots.d.mts +2 -1
- package/dist/types/ComponentSlots.d.ts +2 -1
- package/dist/types/Size.d.mts +0 -1
- package/dist/types/Size.d.ts +0 -1
- package/dist/{useFormCheck-CJvIDxcO.mjs → useFormCheck-CbRHduFK.mjs} +3 -3
- package/dist/useFormCheck-CbRHduFK.mjs.map +1 -0
- package/dist/{useFormCheck-UHNy_iZ0.js → useFormCheck-Cj5K6pk-.js} +3 -3
- package/dist/useFormCheck-Cj5K6pk-.js.map +1 -0
- package/dist/utils/floatingUi.d.mts +1 -0
- package/dist/utils/floatingUi.d.ts +1 -0
- package/dist/utils/keys.d.mts +2 -2
- package/dist/utils/keys.d.ts +2 -2
- package/dist/{utils-CgwCsk6U.mjs → utils-D30CwVm-.mjs} +3 -4
- package/dist/utils-D30CwVm-.mjs.map +1 -0
- package/dist/{utils-CaC78Zdk.js → utils-DtPi91ue.js} +3 -4
- package/dist/utils-DtPi91ue.js.map +1 -0
- package/package.json +1 -1
- package/dist/BAvatar-D7aFEXLH.mjs.map +0 -1
- package/dist/BAvatar-lefHkDuG.js.map +0 -1
- package/dist/BButton-BRvIFnRm.mjs.map +0 -1
- package/dist/BButton-DBRs8Pz_.js.map +0 -1
- package/dist/BButton-DNmtqoqR.mjs.map +0 -1
- package/dist/BButton-kykTWnBy.js.map +0 -1
- package/dist/BCarousel-Be7z13f9.js.map +0 -1
- package/dist/BCarousel-D81alfFC.mjs.map +0 -1
- package/dist/BDropdown-C1AxRj81.js.map +0 -1
- package/dist/BDropdown-DAHnN54Z.mjs.map +0 -1
- package/dist/BFormCheckbox-Bdk2rgVe.js.map +0 -1
- package/dist/BFormCheckbox-CcDK-lh1.mjs.map +0 -1
- package/dist/BFormRadio-CRDbgMiR.mjs.map +0 -1
- package/dist/BFormRadio-DuVYw-Vs.js.map +0 -1
- package/dist/BFormSelect-Bb8yE8vz.mjs.map +0 -1
- package/dist/BFormSelect-DIKVsG--.js.map +0 -1
- package/dist/BFormTags-BFA6xbr3.js.map +0 -1
- package/dist/BFormTags-CJb4H67g.mjs.map +0 -1
- package/dist/BInputGroup-DpX10xwR.mjs.map +0 -1
- package/dist/BInputGroup-Duk6Jk0v.js.map +0 -1
- package/dist/BModal-Br5xLT0-.mjs.map +0 -1
- package/dist/BModal-D0LB339D.js.map +0 -1
- package/dist/BPlaceholder-C4AOg29f.mjs.map +0 -1
- package/dist/BPlaceholder-DYYYuNgR.js.map +0 -1
- package/dist/useFormCheck-CJvIDxcO.mjs.map +0 -1
- package/dist/useFormCheck-UHNy_iZ0.js.map +0 -1
- package/dist/utils-CaC78Zdk.js.map +0 -1
- package/dist/utils-CgwCsk6U.mjs.map +0 -1
|
@@ -60,6 +60,7 @@ declare function __VLS_template(): {
|
|
|
60
60
|
readonly splitHref?: string | undefined;
|
|
61
61
|
readonly splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
62
62
|
readonly splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
63
|
+
readonly toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
63
64
|
readonly toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
64
65
|
readonly toggleText?: string | undefined;
|
|
65
66
|
readonly wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -600,6 +601,7 @@ declare function __VLS_template(): {
|
|
|
600
601
|
splitHref?: string | undefined;
|
|
601
602
|
splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
602
603
|
splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
604
|
+
toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
603
605
|
toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
604
606
|
toggleText?: string | undefined;
|
|
605
607
|
wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -676,6 +678,7 @@ declare function __VLS_template(): {
|
|
|
676
678
|
splitHref: string;
|
|
677
679
|
splitTo: import('vue-router').RouteLocationRaw;
|
|
678
680
|
splitVariant: import('../..').ButtonVariant | null;
|
|
681
|
+
toggleAttrs: Readonly<import('../../types/AnyValuedAttributes').AttrsValue>;
|
|
679
682
|
toggleClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
680
683
|
toggleText: string;
|
|
681
684
|
wrapperClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -746,6 +749,7 @@ declare function __VLS_template(): {
|
|
|
746
749
|
splitHref: string;
|
|
747
750
|
splitTo: import('vue-router').RouteLocationRaw;
|
|
748
751
|
splitVariant: import('../..').ButtonVariant | null;
|
|
752
|
+
toggleAttrs: Readonly<import('../../types/AnyValuedAttributes').AttrsValue>;
|
|
749
753
|
toggleClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
750
754
|
toggleText: string;
|
|
751
755
|
wrapperClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -799,6 +803,7 @@ declare function __VLS_template(): {
|
|
|
799
803
|
splitHref?: string | undefined;
|
|
800
804
|
splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
801
805
|
splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
806
|
+
toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
802
807
|
toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
803
808
|
toggleText?: string | undefined;
|
|
804
809
|
wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -813,7 +818,7 @@ declare function __VLS_template(): {
|
|
|
813
818
|
"onToggle-prevented"?: ((value: import('../..').BvTriggerableEvent) => any) | undefined;
|
|
814
819
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
815
820
|
"onSplit-click"?: ((value: MouseEvent) => any) | undefined;
|
|
816
|
-
}>, "hide" | "toggle" | ("text" | "disabled" | "id" | "size" | "icon" | "variant" | "initialAnimation" | "noFade" | "lazy" | "unmountLazy" | "show" | "transProps" | "visible" | "split" | "ariaLabel" | "role" | "isNav" | "teleportTo" | "boundary" | "boundaryPadding" | "floatingMiddleware" | "noFlip" | "noShift" | "noSize" | "offset" | "placement" | "strategy" | "teleportDisabled" | "autoClose" | "menuClass" | "noCaret" | "noWrapper" | "splitButtonType" | "splitClass" | "splitDisabled" | "splitHref" | "splitTo" | "splitVariant" | "toggleClass" | "toggleText" | "wrapperClass")> & import('vue').ShallowUnwrapRef<{
|
|
821
|
+
}>, "hide" | "toggle" | ("text" | "disabled" | "id" | "size" | "icon" | "variant" | "initialAnimation" | "noFade" | "lazy" | "unmountLazy" | "show" | "transProps" | "visible" | "split" | "ariaLabel" | "role" | "isNav" | "teleportTo" | "boundary" | "boundaryPadding" | "floatingMiddleware" | "noFlip" | "noShift" | "noSize" | "offset" | "placement" | "strategy" | "teleportDisabled" | "autoClose" | "menuClass" | "noCaret" | "noWrapper" | "splitButtonType" | "splitClass" | "splitDisabled" | "splitHref" | "splitTo" | "splitVariant" | "toggleAttrs" | "toggleClass" | "toggleText" | "wrapperClass")> & import('vue').ShallowUnwrapRef<{
|
|
817
822
|
hide: (trigger?: string, noTriggerEmit?: boolean) => Promise<string>;
|
|
818
823
|
show: (resolveOnHide?: boolean) => Promise<boolean | string>;
|
|
819
824
|
toggle: (resolveOnHide?: boolean) => Promise<boolean | string>;
|
|
@@ -892,6 +897,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
892
897
|
splitHref: string;
|
|
893
898
|
splitTo: import('vue-router').RouteLocationRaw;
|
|
894
899
|
splitVariant: import('../..').ButtonVariant | null;
|
|
900
|
+
toggleAttrs: Readonly<import('../../types/AnyValuedAttributes').AttrsValue>;
|
|
895
901
|
toggleClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
896
902
|
toggleText: string;
|
|
897
903
|
wrapperClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -948,6 +954,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
948
954
|
readonly splitHref?: string | undefined;
|
|
949
955
|
readonly splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
950
956
|
readonly splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
957
|
+
readonly toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
951
958
|
readonly toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
952
959
|
readonly toggleText?: string | undefined;
|
|
953
960
|
readonly wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -1488,6 +1495,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
1488
1495
|
splitHref?: string | undefined;
|
|
1489
1496
|
splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
1490
1497
|
splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
1498
|
+
toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
1491
1499
|
toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
1492
1500
|
toggleText?: string | undefined;
|
|
1493
1501
|
wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -1564,6 +1572,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
1564
1572
|
splitHref: string;
|
|
1565
1573
|
splitTo: import('vue-router').RouteLocationRaw;
|
|
1566
1574
|
splitVariant: import('../..').ButtonVariant | null;
|
|
1575
|
+
toggleAttrs: Readonly<import('../../types/AnyValuedAttributes').AttrsValue>;
|
|
1567
1576
|
toggleClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
1568
1577
|
toggleText: string;
|
|
1569
1578
|
wrapperClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -1634,6 +1643,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
1634
1643
|
splitHref: string;
|
|
1635
1644
|
splitTo: import('vue-router').RouteLocationRaw;
|
|
1636
1645
|
splitVariant: import('../..').ButtonVariant | null;
|
|
1646
|
+
toggleAttrs: Readonly<import('../../types/AnyValuedAttributes').AttrsValue>;
|
|
1637
1647
|
toggleClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
1638
1648
|
toggleText: string;
|
|
1639
1649
|
wrapperClass: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -1687,6 +1697,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
1687
1697
|
splitHref?: string | undefined;
|
|
1688
1698
|
splitTo?: import('vue-router').RouteLocationRaw | undefined;
|
|
1689
1699
|
splitVariant?: (import('../..').ButtonVariant | null) | undefined;
|
|
1700
|
+
toggleAttrs?: Readonly<import('../../types/AnyValuedAttributes').AttrsValue> | undefined;
|
|
1690
1701
|
toggleClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
1691
1702
|
toggleText?: string | undefined;
|
|
1692
1703
|
wrapperClass?: import('../../types/AnyValuedAttributes').ClassValue;
|
|
@@ -1701,7 +1712,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
1701
1712
|
"onToggle-prevented"?: ((value: import('../..').BvTriggerableEvent) => any) | undefined;
|
|
1702
1713
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1703
1714
|
"onSplit-click"?: ((value: MouseEvent) => any) | undefined;
|
|
1704
|
-
}>, "hide" | "toggle" | ("text" | "disabled" | "id" | "size" | "icon" | "variant" | "initialAnimation" | "noFade" | "lazy" | "unmountLazy" | "show" | "transProps" | "visible" | "split" | "ariaLabel" | "role" | "isNav" | "teleportTo" | "boundary" | "boundaryPadding" | "floatingMiddleware" | "noFlip" | "noShift" | "noSize" | "offset" | "placement" | "strategy" | "teleportDisabled" | "autoClose" | "menuClass" | "noCaret" | "noWrapper" | "splitButtonType" | "splitClass" | "splitDisabled" | "splitHref" | "splitTo" | "splitVariant" | "toggleClass" | "toggleText" | "wrapperClass")> & import('vue').ShallowUnwrapRef<{
|
|
1715
|
+
}>, "hide" | "toggle" | ("text" | "disabled" | "id" | "size" | "icon" | "variant" | "initialAnimation" | "noFade" | "lazy" | "unmountLazy" | "show" | "transProps" | "visible" | "split" | "ariaLabel" | "role" | "isNav" | "teleportTo" | "boundary" | "boundaryPadding" | "floatingMiddleware" | "noFlip" | "noShift" | "noSize" | "offset" | "placement" | "strategy" | "teleportDisabled" | "autoClose" | "menuClass" | "noCaret" | "noWrapper" | "splitButtonType" | "splitClass" | "splitDisabled" | "splitHref" | "splitTo" | "splitVariant" | "toggleAttrs" | "toggleClass" | "toggleText" | "wrapperClass")> & import('vue').ShallowUnwrapRef<{
|
|
1705
1716
|
hide: (trigger?: string, noTriggerEmit?: boolean) => Promise<string>;
|
|
1706
1717
|
show: (resolveOnHide?: boolean) => Promise<boolean | string>;
|
|
1707
1718
|
toggle: (resolveOnHide?: boolean) => Promise<boolean | string>;
|
|
@@ -509,6 +509,14 @@ var bind = (el, binding, props) => {
|
|
|
509
509
|
render(h(BPopover_default, props), div);
|
|
510
510
|
el.$__element = div;
|
|
511
511
|
};
|
|
512
|
+
var updateBind = (el, binding, props) => {
|
|
513
|
+
const div = el.$__element;
|
|
514
|
+
if (!div) {
|
|
515
|
+
bind(el, binding, props);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
render(h(BPopover_default, props), div);
|
|
519
|
+
};
|
|
512
520
|
var unbind = (el) => {
|
|
513
521
|
const div = el.$__element;
|
|
514
522
|
if (!div) return;
|
|
@@ -525,6 +533,6 @@ var unbind = (el) => {
|
|
|
525
533
|
var isBoundary = (input) => input === "clippingAncestors" || input instanceof Element || Array.isArray(input);
|
|
526
534
|
var isRootBoundary = (input) => !isBoundary(input);
|
|
527
535
|
//#endregion
|
|
528
|
-
export { resolveBootstrapCaret as a, unbind as c, resolveActiveStatus as i,
|
|
536
|
+
export { resolveBootstrapCaret as a, unbind as c, resolveActiveStatus as i, updateBind as l, isBoundary as n, resolveContent as o, isRootBoundary as r, resolveDirectiveProps as s, bind as t, BPopover_default as u };
|
|
529
537
|
|
|
530
|
-
//# sourceMappingURL=floatingUi-
|
|
538
|
+
//# sourceMappingURL=floatingUi-BAUk171g.mjs.map
|
|
@@ -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,MAAM,UAAU,IAAU;EAEjE,MAAM,WAAW,eACf,WAAW,MAAM,SAAS,GAAG,MAAM,WAAW,KAAA,EAChD;EACA,MAAM,eAAe,eACnB,eAAe,MAAM,SAAS,GAAG,MAAM,WAAW,KAAA,EACpD;EAEA,MAAM,aAAa,IAAmB,EAAE,CAAA;EACxC,MAAM,qBAAqB,eAAsC;AAC/D,OAAI,MAAM,uBAAuB,KAAA,EAC/B,QAAO,MAAM;GAGf,MAAM,MAAoB,CAAC,OADf,MAAM,WAAW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AAU;CACzB,QAAQ,QAAQ,UAAU;CAC1B,UAAU,QAAQ,UAAU;CAC5B,MAAM,QAAQ,UAAU;CACxB,WAAW,QAAQ,UAAU,OACzB,SACA,QAAQ,UAAU,QAChB,UACA,QAAQ,UAAU,SAChB,WACA,QAAQ,UAAU,MAChB,QACA,KAAA;CACV,GAAI,OAAO,QAAQ,UAAU,WAAW,QAAQ,QAAQ,KAAA;CACxD,GAAI,QAAQ,UAAU,cAAc,EAAC,gBAAgB,OAAM,GAAG,KAAA;CAC9D,OAAO;CACP,MAAM;CACP;AAqBD,IAAa,QACX,IACA,SACA,UACG;CACH,MAAM,MAAM,iBAAiB;AAE7B,KAAI,QAAQ,KAAM;CAElB,MAAM,MAAM,IAAI,cAAc,OAAO;AACrC,KAAI,QAAQ,UAAU,KAAM,KAAI,KAAK,YAAY,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,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"}
|
|
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,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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AAI;;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-
|
|
598
|
+
//# sourceMappingURL=floatingUi-DBLN9xLH.js.map
|