UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

45 lines (44 loc) 1.75 kB
import c from "./NeonActionMenu.es.js"; import { resolveComponent as r, openBlock as o, createElementBlock as t, createElementVNode as l, Fragment as d, renderList as _, createVNode as u, normalizeClass as k, withKeys as m, withModifiers as p, withCtx as y, toDisplayString as s, createCommentVNode as f } from "vue"; import b from "../../../_virtual/_plugin-vue_export-helper.es.js"; const h = { class: "neon-action-menu" }, C = { class: "no-style" }, v = { class: "neon-action-menu__link-label" }, $ = { key: 0, class: "neon-action-menu__link-count" }; function w(e, N, V, g, K, B) { const a = r("neon-link"); return o(), t("nav", h, [ l("ul", C, [ (o(!0), t(d, null, _(e.model, (n) => (o(), t("li", { key: n.key, class: "neon-action-menu__item" }, [ u(a, { class: k([[ { "neon-action-menu__link--selected": n.key === e.modelValue, "neon-action-menu__link--disabled": n.disabled }, `neon-action-menu__link--${e.color}` ], "neon-action-menu__link"]), "no-style": !0, tabindex: n.disabled ? -1 : 0, "outline-style": "none", onClick: (i) => !n.disabled && e.onClick(n.key), onKeydown: m(p((i) => !n.disabled && e.onClick(n.key), ["prevent"]), ["space"]) }, { default: y(() => [ l("div", v, s(n.label), 1), n.count ? (o(), t("div", $, s(n.count.toLocaleString()), 1)) : f("", !0) ]), _: 2 }, 1032, ["class", "tabindex", "onClick", "onKeydown"]) ]))), 128)) ]) ]); } const S = /* @__PURE__ */ b(c, [["render", w]]); export { S as default }; //# sourceMappingURL=NeonActionMenu.vue.es.js.map