UNPKG

@aotearoan/neon

Version:

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

53 lines (52 loc) 1.97 kB
import a from "./NeonChip.es.js"; import { resolveComponent as p, openBlock as i, createBlock as r, Transition as d, withCtx as m, createElementBlock as k, mergeProps as y, withKeys as s, withModifiers as c, createCommentVNode as l, createElementVNode as f, toDisplayString as u } from "vue"; import v from "../../../_virtual/_plugin-vue_export-helper.es.js"; const $ = ["aria-disabled", "role", "tabindex"], b = { class: "neon-chip__label" }; function h(e, n, w, C, D, B) { const t = p("neon-icon"); return i(), r(d, { name: "neon-transition-chip" }, { default: m(() => [ e.open ? (i(), k("div", y({ key: 0, ref: "chip", "aria-disabled": e.disabled, class: [[ `neon-chip--${e.size}`, `neon-chip--${e.color}`, `neon-chip--${e.action}`, { "neon-chip--disabled": e.disabled, "neon-chip--active": e.active } ], "no-style neon-chip"], role: e.role, tabindex: e.disabled ? void 0 : 0 }, e.attrs, { onClick: n[0] || (n[0] = (o) => e.clicked()), onKeyup: n[1] || (n[1] = (...o) => e.keyUp && e.keyUp(...o)), onKeydown: [ n[2] || (n[2] = s(c((o) => e.keyDown(), ["prevent"]), ["space"])), n[3] || (n[3] = s((o) => e.keyDown(), ["enter"])), n[4] || (n[4] = s((o) => e.action === "remove" && e.keyDown(), ["delete"])) ] }), [ e.icon ? (i(), r(t, { key: 0, color: e.color, name: e.icon, class: "neon-chip__icon" }, null, 8, ["color", "name"])) : l("", !0), f("span", b, u(e.label), 1), e.action === "remove" ? (i(), r(t, { key: 1, class: "neon-chip__close", color: "neutral", name: "times" })) : l("", !0) ], 16, $)) : l("", !0) ]), _: 1 }); } const E = /* @__PURE__ */ v(a, [["render", h]]); export { E as default }; //# sourceMappingURL=NeonChip.vue.es.js.map