UNPKG

@aotearoan/neon

Version:

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

67 lines (66 loc) 2.43 kB
import m from "./NeonButton.es.js"; import { resolveComponent as s, openBlock as n, createBlock as i, mergeProps as a, withKeys as y, withModifiers as f, withCtx as k, createCommentVNode as o, createElementBlock as l, toDisplayString as r } from "vue"; import c from "../../../_virtual/_plugin-vue_export-helper.es.js"; const v = { key: 1, class: "neon-button__label" }, h = ["disabled", "tabindex"], B = { key: 1, class: "neon-button__label" }; function S(e, d, w, C, N, $) { const t = s("neon-icon"), b = s("neon-link"), u = s("neon-expansion-indicator"); return e.href ? (n(), i(b, a({ key: 0, ref: "button", class: [e.classes, "neon-button"], href: e.href, tabindex: e.disabled ? -1 : 0, "outline-style": "none", role: "button" }, e.sanitizedAttributes, { onKeydown: y(f(e.clickLink, ["prevent"]), ["space"]) }), { default: k(() => [ e.icon || e.state !== "ready" ? (n(), i(t, { key: 0, color: e.buttonStyle !== "solid" ? e.color : void 0, disabled: e.disabled, inverse: e.buttonStyle === "solid" || e.inverse, name: e.iconName }, null, 8, ["color", "disabled", "inverse", "name"])) : o("", !0), e.label ? (n(), l("span", v, r(e.label), 1)) : o("", !0) ]), _: 1 }, 16, ["class", "href", "tabindex", "onKeydown"])) : (n(), l("button", a({ key: 1, ref: "button", class: [e.classes, "neon-button"], disabled: e.disabled || e.state !== "ready", tabindex: e.disabled ? -1 : 0 }, e.sanitizedAttributes, { onClick: d[0] || (d[0] = (...p) => e.clickButton && e.clickButton(...p)) }), [ e.icon || e.state !== "ready" ? (n(), i(t, { key: 0, color: e.buttonStyle !== "solid" ? e.color : void 0, disabled: e.disabled, inverse: e.buttonStyle === "solid" || e.inverse, name: e.iconName }, null, 8, ["color", "disabled", "inverse", "name"])) : o("", !0), e.label ? (n(), l("span", B, r(e.label), 1)) : o("", !0), e.indicator ? (n(), i(u, { key: 2, color: e.color, disabled: e.disabled, expanded: e.indicatorExpanded, inverse: e.buttonStyle === "solid" || e.inverse, class: "neon-button__indicator" }, null, 8, ["color", "disabled", "expanded", "inverse"])) : o("", !0) ], 16, h)); } const A = /* @__PURE__ */ c(m, [["render", S]]); export { A as default }; //# sourceMappingURL=NeonButton.vue.es.js.map