UNPKG

@aotearoan/neon

Version:

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

3 lines (2 loc) 2.28 kB
"use strict";const d=require("./NeonCardList.cjs.js"),e=require("vue"),p=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),k={class:"neon-card-list"},u={key:0,class:"neon-card-list__total"},m={key:0,class:"neon-card-list__results-end"};function _(o,l,h,B,C,g){const s=e.resolveComponent("neon-inline"),r=e.resolveComponent("neon-card-list-card"),a=e.resolveComponent("neon-link"),i=e.resolveComponent("neon-stack"),c=e.resolveComponent("neon-button");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(s,{breakpoint:"",class:"neon-card-list__header"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"header"),o.total?(e.openBlock(),e.createElementBlock("span",u,e.toDisplayString(o.n(o.model.length))+" "+e.toDisplayString(o.ofLabel)+" "+e.toDisplayString(o.n(o.total)),1)):e.createCommentVNode("",!0)]),_:3}),e.createVNode(i,{class:"neon-card-list__cards"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model,(n,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.href&&!n.disabled?(e.openBlock(),e.createBlock(a,{key:`${n.key||t}-link`,href:n.href,target:n.targetBlank?"_blank":null},{default:e.withCtx(()=>[e.createVNode(r,{color:o.color,disabled:n.disabled},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"card",e.normalizeProps(e.guardReactiveProps({cardModel:n,index:t})))]),_:2},1032,["color","disabled"])]),_:2},1032,["href","target"])):(e.openBlock(),e.createBlock(r,{key:`${n.key||t}-card`,clickable:o.clickable&&!n.disabled,color:o.color,disabled:n.disabled,onClick:y=>!n.disabled&&o.emit("click",t)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"card",e.normalizeProps(e.guardReactiveProps({cardModel:n,index:t})))]),_:2},1032,["clickable","color","disabled","onClick"]))],64))),256))]),_:3}),o.model.length===o.total?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(o.endOfResultsLabel),1)):(e.openBlock(),e.createBlock(c,{key:1,"button-style":o.NeonButtonStyle.Text,color:o.NeonFunctionalColor.Neutral,label:o.showMoreLabel,size:o.NeonSize.Small,class:"neon-card-list__show-more",onClick:l[0]||(l[0]=n=>o.emit("show-more",n))},null,8,["button-style","color","label","size"]))])}const b=p(d,[["render",_]]);module.exports=b; //# sourceMappingURL=NeonCardList.vue.cjs.js.map