UNPKG

maz-ui

Version:

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

68 lines (67 loc) 2.6 kB
import { defineComponent as f, defineAsyncComponent as d, openBlock as o, createBlock as t, resolveDynamicComponent as r, mergeProps as s, withCtx as p, renderSlot as n, unref as l, createCommentVNode as a, createVNode as m } from "vue"; import { _ as v } from "./_plugin-vue_export-helper.CHgC5LLL.mjs"; import '../assets/MazLink.BBYMGbI8.css';const y = /* @__PURE__ */ f({ __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(g) { const u = d( () => import("./arrow-top-right-on-square.jPmYJ34F.mjs") ), i = d(() => import("./MazIcon.BfRXZ8qh.mjs")); return (e, c) => (o(), t(r(e.to ? "router-link" : "a"), s({ 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: p(() => [ n(e.$slots, "left-icon", {}, () => [ typeof e.leftIcon == "string" ? (o(), t(l(i), { key: 0, name: e.leftIcon }, null, 8, ["name"])) : e.leftIcon ? (o(), t(r(e.leftIcon), { key: 1 })) : a("v-if", !0) ], !0), n(e.$slots, "default", {}, void 0, !0), n(e.$slots, "right-icon", {}, () => [ typeof e.rightIcon == "string" ? (o(), t(l(i), { key: 0, name: e.rightIcon }, null, 8, ["name"])) : e.rightIcon ? (o(), t(r(e.rightIcon), { key: 1 })) : a("v-if", !0) ], !0), e.autoExternal && e.target === "_blank" ? n(e.$slots, "external-icon", { key: 0 }, () => [ m(l(u)) ], !0) : a("v-if", !0) ]), _: 3 /* FORWARDED */ }, 16, ["id", "class", "to", "href", "title", "target", "rel", "download", "aria-label"])); } }), k = /* @__PURE__ */ v(y, [["__scopeId", "data-v-060273fe"]]); export { k as default };