@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
50 lines (49 loc) • 1.71 kB
JavaScript
import p from "./NeonTooltip.es.js";
import { openBlock as l, createElementBlock as r, normalizeClass as d, withKeys as n, withModifiers as a, createElementVNode as i, createCommentVNode as $, renderSlot as s } from "vue";
import v from "../../../_virtual/_plugin-vue_export-helper.es.js";
const m = ["aria-describedby"], u = {
ref: "content",
class: "neon-tooltip__content-wrapper"
}, f = /* @__PURE__ */ i("div", { class: "neon-tooltip__arrow" }, null, -1), y = {
key: 0,
class: "neon-tooltip__arrow-overlay"
}, w = ["id"];
function T(o, e, b, g, S, k) {
return l(), r("div", {
ref: "tooltip",
"aria-describedby": o.id,
class: d([[
{ "neon-tooltip--open": o.open },
`neon-tooltip--${o.tooltipStyle}`,
`neon-tooltip--${o.tooltipPlacement}`,
`neon-tooltip--outline-${o.outlineStyle}`,
`neon-tooltip--outline-color-${o.outlineColor}`
], "neon-tooltip"]),
tabindex: "0",
onMouseenter: e[0] || (e[0] = (t) => o.openTooltip()),
onMouseleave: e[1] || (e[1] = (t) => o.closeTooltip()),
onKeydown: [
e[2] || (e[2] = n((t) => o.toggleTooltip(), ["enter"])),
e[3] || (e[3] = n((t) => o.closeTooltip(), ["esc"])),
e[4] || (e[4] = n(a((t) => o.toggleTooltip(), ["prevent"]), ["space"]))
]
}, [
i("div", u, [
f,
o.tooltipStyle === "popover" ? (l(), r("div", y)) : $("", !0),
i("div", {
id: o.id,
class: "neon-tooltip__content",
role: "tooltip"
}, [
s(o.$slots, "content")
], 8, w)
], 512),
s(o.$slots, "target")
], 42, m);
}
const B = /* @__PURE__ */ v(p, [["render", T]]);
export {
B as default
};
//# sourceMappingURL=NeonTooltip.vue.es.js.map