@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
3 lines (2 loc) • 2.23 kB
JavaScript
;const r=require("./NeonLink.cjs.js"),n=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),k=["href"];function a(e,o,p,d,y,C){const l=n.resolveComponent("router-link"),t=n.resolveComponent("neon-icon");return e.routerUrl?(n.openBlock(),n.createBlock(l,n.mergeProps({key:0,ref:"neonLink",class:[[{"neon-link--no-style":e.noStyle,"neon-link--active":e.activeRoute,"neon-link--exact-active":e.exactRoute},`neon-link--outline-${e.outlineStyle}`],"neon-link neon-link--router-link"],to:e.routerUrl,tabindex:"0"},e.sanitizedAttributes,{onClick:e.onClick,onKeydown:[n.withKeys(e.onClick,["enter"]),n.withKeys(n.withModifiers(e.onSpace,["prevent"]),["space"])]}),{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3},16,["class","to","onClick","onKeydown"])):e.href?(n.openBlock(),n.createElementBlock("a",n.mergeProps({key:1,ref:"neonLink",class:[[{"neon-link--no-style":e.noStyle,"neon-link--with-external-indicator":e.externalIndicator,"neon-link--active":e.activeRoute,"neon-link--exact-active":e.exactRoute},`neon-link--outline-${e.outlineStyle}`],"neon-link neon-link--external-link"],href:e.href,rel:"noopener",tabindex:"0"},e.sanitizedAttributes,{onClick:o[0]||(o[0]=(...i)=>e.onClick&&e.onClick(...i)),onKeydown:[o[1]||(o[1]=n.withKeys((...i)=>e.onClick&&e.onClick(...i),["enter"])),o[2]||(o[2]=n.withKeys(n.withModifiers((...i)=>e.onSpace&&e.onSpace(...i),["prevent"]),["space"]))]}),[n.renderSlot(e.$slots,"default"),e.externalIndicator?(n.openBlock(),n.createBlock(t,{key:0,class:"neon-link__external-indicator",color:"low-contrast",name:"share-external-link-1"})):n.createCommentVNode("",!0)],16,k)):(n.openBlock(),n.createElementBlock("a",n.mergeProps({key:2,ref:"neonLink",class:[[{"neon-link--no-style":e.noStyle},`neon-link--outline-${e.outlineStyle}`],"neon-link"],tabindex:"0"},e.sanitizedAttributes,{onClick:o[3]||(o[3]=(...i)=>e.onClick&&e.onClick(...i)),onKeydown:[o[4]||(o[4]=n.withKeys((...i)=>e.onClick&&e.onClick(...i),["enter"])),o[5]||(o[5]=n.withKeys(n.withModifiers((...i)=>e.onSpace&&e.onSpace(...i),["prevent"]),["space"]))]}),[n.renderSlot(e.$slots,"default")],16))}const u=s(r,[["render",a]]);module.exports=u;
//# sourceMappingURL=NeonLink.vue.cjs.js.map