UNPKG

@aotearoan/neon

Version:

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

53 lines (52 loc) 2.13 kB
import u from "./NeonTabs.es.js"; import { resolveComponent as c, openBlock as o, createElementBlock as t, normalizeClass as l, createElementVNode as i, Fragment as k, renderList as y, withKeys as r, createBlock as b, createCommentVNode as m, toDisplayString as p, renderSlot as _ } from "vue"; import $ from "../../../_virtual/_plugin-vue_export-helper.es.js"; const f = ["id", "aria-controls", "aria-selected", "onClick"], C = ["id", "tabindex", "onKeydown"], h = { key: 1, class: "neon-tabs__menu-label" }; function v(e, V, g, B, w, K) { const d = c("neon-icon"); return o(), t("div", { class: l([[`neon-tabs--${e.size}`, `neon-tabs--${e.color}`, `neon-tabs--${e.tabsStyle}`], "neon-tabs"]), role: "tablist" }, [ i("div", { class: l([{ "neon-tabs__menu-items--underlined": e.underline }, "neon-tabs__menu-items"]) }, [ (o(!0), t(k, null, y(e.tabs, (n, s) => (o(), t("div", { id: `${n.key}Button`, key: n.key, "aria-controls": n.key, "aria-selected": n.key === e.modelValue, class: l([{ "neon-tabs__menu-item--selected": n.key === e.modelValue }, "neon-tabs__menu-item"]), role: "tab", tabindex: "-1", onClick: (a) => n.key !== e.modelValue && e.onClick(n.key) }, [ i("div", { id: `${n.key}ButtonContainer`, tabindex: n.key === e.modelValue ? 0 : -1, class: "neon-tabs__menu-item-container", onKeydown: [ r((a) => e.onClick(e.tabs[s + 1 === e.tabs.length ? 0 : s + 1].key, !0), ["right"]), r((a) => e.onClick(e.tabs[s === 0 ? e.tabs.length - 1 : s - 1].key, !0), ["left"]) ] }, [ n.icon ? (o(), b(d, { key: 0, name: n.icon, class: "neon-tabs__menu-icon" }, null, 8, ["name"])) : m("", !0), n.label ? (o(), t("span", h, p(n.label), 1)) : m("", !0) ], 40, C) ], 10, f))), 128)) ], 2), _(e.$slots, "default") ], 2); } const E = /* @__PURE__ */ $(u, [["render", v]]); export { E as default }; //# sourceMappingURL=NeonTabs.vue.es.js.map