UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

72 lines (71 loc) 2.65 kB
import { defineComponent as p, defineAsyncComponent as s, openBlock as t, createBlock as n, resolveDynamicComponent as i, mergeProps as m, withCtx as v, renderSlot as r, unref as d, createCommentVNode as u, createVNode as y } from "vue"; import './assets/MazLink.BBYMGbI8.css';const c = /* @__PURE__ */ p({ __name: "MazLink", props: { id: { default: void 0 }, title: { default: void 0 }, href: { default: void 0 }, to: { default: void 0 }, color: { default: "primary" }, target: { default: "_self" }, download: { default: void 0 }, rel: { default: void 0 }, ariaLabel: { default: void 0 }, underline: { type: Boolean, default: !1 }, underlineOnlyHover: { type: Boolean, default: !0 }, autoExternal: { type: Boolean, default: !0 }, leftIcon: { type: [String, Function, Object], default: void 0 }, rightIcon: { type: [String, Function, Object], default: void 0 } }, setup(l) { const a = s( () => import("./chunks/arrow-top-right-on-square.jPmYJ34F.mjs") ), o = s(() => import("./chunks/MazIcon.Cq1v4J3r.mjs")); return (e, f) => (t(), n(i(e.to ? "router-link" : "a"), m({ id: e.id, class: ["m-link m-reset-css", [ { "--underline": e.underline, "--underline-only-hover": !e.underline && e.underlineOnlyHover }, `--${e.color}` ]], to: e.to, href: e.href, title: e.title, target: e.target, rel: e.rel, download: e.download, "aria-label": e.ariaLabel }, e.$attrs), { default: v(() => [ r(e.$slots, "left-icon", {}, () => [ typeof e.leftIcon == "string" ? (t(), n(d(o), { key: 0, name: e.leftIcon }, null, 8, ["name"])) : e.leftIcon ? (t(), n(i(e.leftIcon), { key: 1 })) : u("v-if", !0) ], !0), r(e.$slots, "default", {}, void 0, !0), r(e.$slots, "right-icon", {}, () => [ typeof e.rightIcon == "string" ? (t(), n(d(o), { key: 0, name: e.rightIcon }, null, 8, ["name"])) : e.rightIcon ? (t(), n(i(e.rightIcon), { key: 1 })) : u("v-if", !0) ], !0), e.autoExternal && e.target === "_blank" ? r(e.$slots, "external-icon", { key: 0 }, () => [ y(d(a)) ], !0) : u("v-if", !0) ]), _: 3 /* FORWARDED */ }, 16, ["id", "class", "to", "href", "title", "target", "rel", "download", "aria-label"])); } }), g = (l, a) => { const o = l.__vccOpts || l; for (const [e, f] of a) o[e] = f; return o; }, k = /* @__PURE__ */ g(c, [["__scopeId", "data-v-060273fe"]]); export { k as default };