@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
59 lines (58 loc) • 2.24 kB
JavaScript
import u from "./NeonMobileMenu.es.js";
import { resolveComponent as a, openBlock as o, createElementBlock as l, createElementVNode as r, normalizeClass as s, Fragment as _, renderList as m, createBlock as i, withKeys as b, withCtx as k, createCommentVNode as p, toDisplayString as f } from "vue";
import y from "../../../_virtual/_plugin-vue_export-helper.es.js";
const h = {
ref: "menuWrapper",
class: "neon-mobile-menu__wrapper"
}, $ = ["onClick"], C = { class: "neon-mobile-menu__item-label" };
function v(n, w, M, x, B, I) {
const t = a("neon-icon"), c = a("neon-link");
return o(), l("nav", h, [
r("ul", {
class: s([[`neon-mobile-menu--${n.color}`], "neon-mobile-menu no-style"]),
role: "menubar"
}, [
(o(!0), l(_, null, m(n.menu, (e) => (o(), l("li", {
key: e.key,
ref_for: !0,
ref: "menuItem",
class: s([{ "neon-mobile-menu__item--disabled": e.disabled }, "neon-mobile-menu__item"]),
role: "menuitem",
tabindex: "-1"
}, [
(o(), i(c, {
key: `${e.key}Link`,
class: s({ "router-link-active": e.href && n.routeMatches(e.href) }),
href: e.disabled ? null : e.href,
"no-style": !0,
tabindex: e.disabled ? -1 : 0,
"outline-style": "none",
onKeydown: b((d) => !e.disabled && n.onClick(e.key), ["enter"])
}, {
default: k(() => [
r("div", {
class: "neon-mobile-menu__link-container",
tabindex: "-1",
onClick: (d) => !e.disabled && n.onClick(e.key)
}, [
e.icon ? (o(), i(t, {
id: `${e.key}MobileMenuIcon`,
key: `${e.key}LinkIcon`,
disabled: e.disabled,
name: e.icon,
class: "neon-mobile-menu__item-icon"
}, null, 8, ["id", "disabled", "name"])) : p("", !0),
r("span", C, f(e.label), 1)
], 8, $)
]),
_: 2
}, 1032, ["class", "href", "tabindex", "onKeydown"]))
], 2))), 128))
], 2)
], 512);
}
const g = /* @__PURE__ */ y(u, [["render", v]]);
export {
g as default
};
//# sourceMappingURL=NeonMobileMenu.vue.es.js.map