UNPKG

bootstrap-vue-next

Version:

Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development

213 lines (212 loc) 5.47 kB
require("./chunk-CoQrYLCe.js"); const require_useDefaults = require("./useDefaults-DsLf4iRY.js"); const require_floatingUi = require("./floatingUi-Cs4rDXmO.js"); let vue = require("vue"); //#endregion //#region src/components/BTooltip/BTooltip.vue var BTooltip_default = /* @__PURE__ */ (0, vue.defineComponent)({ __name: "BTooltip", props: /* @__PURE__ */ (0, vue.mergeModels)({ interactive: { type: Boolean, default: void 0 }, body: {}, bodyClass: { default: void 0 }, boundary: {}, boundaryPadding: {}, click: { type: Boolean, default: void 0 }, closeOnHide: { type: Boolean }, focus: { type: Boolean, default: void 0 }, hover: { type: Boolean, default: void 0 }, delay: { default: 0 }, floatingMiddleware: { default: void 0 }, hideMargin: { default: 0 }, id: { default: void 0 }, inline: { type: Boolean, default: void 0 }, manual: { type: Boolean, default: void 0 }, noAutoClose: { type: Boolean, default: void 0 }, noFlip: { type: Boolean, default: void 0 }, noHide: { type: Boolean, default: void 0 }, noShift: { type: Boolean, default: void 0 }, noSize: { type: Boolean }, noninteractive: { type: Boolean, default: void 0 }, offset: { default: void 0 }, placement: { default: void 0 }, realtime: { type: Boolean, default: void 0 }, reference: { type: [ String, Object, null, Function ], default: void 0 }, strategy: { default: void 0 }, target: { type: [ String, Object, null, Function ], default: void 0 }, title: { default: void 0 }, titleClass: { default: void 0 }, teleportDisabled: { type: Boolean, default: void 0 }, teleportTo: { default: void 0 }, initialAnimation: { type: Boolean, default: false }, noAnimation: { type: Boolean }, noFade: { type: Boolean, default: void 0 }, lazy: { type: Boolean, default: void 0 }, unmountLazy: { type: Boolean, default: void 0 }, show: { type: Boolean, default: void 0 }, transProps: {}, visible: { type: Boolean, default: void 0 } }, { "modelValue": { type: Boolean, default: false }, "modelModifiers": {} }), emits: /* @__PURE__ */ (0, vue.mergeModels)([ "click", "pointerleave", "blur", "click-outside", "close-on-hide", "hide", "hide-prevented", "hidden", "show", "show-prevented", "shown", "toggle", "toggle-prevented" ], ["update:modelValue"]), setup(__props, { expose: __expose, emit: __emit }) { const props = require_useDefaults.useDefaults(__props, "BTooltip"); const emit = __emit; const slots = (0, vue.useSlots)(); const modelValue = (0, vue.useModel)(__props, "modelValue"); const computedProps = (0, vue.computed)(() => { const { interactive, noninteractive, ...rest } = props; return { noninteractive: noninteractive !== void 0 ? noninteractive : !interactive, ...rest }; }); const popover = (0, vue.useTemplateRef)("_popover"); __expose({ hide: () => { popover.value?.hide(); }, show: () => { popover.value?.show(); }, toggle: () => { popover.value?.toggle(); } }); return (_ctx, _cache) => { return (0, vue.openBlock)(), (0, vue.createBlock)(require_floatingUi.BPopover_default, (0, vue.mergeProps)({ ref: "_popover" }, computedProps.value, { modelValue: modelValue.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event), tooltip: "", onShow: _cache[1] || (_cache[1] = ($event) => emit("show", $event)), onShown: _cache[2] || (_cache[2] = ($event) => emit("shown", $event)), onHide: _cache[3] || (_cache[3] = ($event) => emit("hide", $event)), onHidden: _cache[4] || (_cache[4] = ($event) => emit("hidden", $event)), onHidePrevented: _cache[5] || (_cache[5] = ($event) => emit("hide-prevented", $event)), onShowPrevented: _cache[6] || (_cache[6] = ($event) => emit("show-prevented", $event)), onTogglePrevented: _cache[7] || (_cache[7] = ($event) => emit("toggle-prevented", $event)), onToggle: _cache[8] || (_cache[8] = ($event) => emit("toggle", $event)), onPointerleave: _cache[9] || (_cache[9] = ($event) => emit("pointerleave", $event)), onBlur: _cache[10] || (_cache[10] = ($event) => emit("blur", $event)), onClickOutside: _cache[11] || (_cache[11] = ($event) => emit("click-outside", $event)), onCloseOnHide: _cache[12] || (_cache[12] = ($event) => emit("close-on-hide", $event)) }), (0, vue.createSlots)({ _: 2 }, [ slots.default ? { name: "default", fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))]), key: "0" } : void 0, slots.target ? { name: "target", fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, "target", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))]), key: "1" } : void 0, slots.title ? { name: "title", fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, "title", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))]), key: "2" } : void 0 ]), 1040, ["modelValue"]); }; } }); //#endregion Object.defineProperty(exports, "BTooltip_default", { enumerable: true, get: function() { return BTooltip_default; } }); //# sourceMappingURL=BTooltip-CryTO-SM.js.map