@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
3 lines (2 loc) • 3.34 kB
JavaScript
;const a=require("./NeonPagination.cjs.js"),n=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r={class:"neon-pagination__page-links"},p={key:0,class:"neon-pagination__link--selected"};function u(e,o,g,c,k,h){const l=n.resolveComponent("neon-button"),i=n.resolveComponent("neon-icon");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([[{"neon-pagination--empty":e.hidePagination},`neon-pagination--${e.color}`],"neon-pagination"])},[e.displayFirstAndLast?(n.openBlock(),n.createBlock(l,{key:0,disabled:e.disabledPrevious,href:e.disabledPrevious?void 0:e.url(1),"button-style":"outline",class:"neon-pagination__nav-link neon-pagination__first",color:"high-contrast",icon:"first-page",onClick:o[0]||(o[0]=t=>e.emit("page-change",1))},null,8,["disabled","href"])):n.createCommentVNode("",!0),n.createVNode(l,{disabled:e.disabledPrevious,href:e.disabledPrevious?void 0:e.url(e.previousPage),"button-style":"outline",class:"neon-pagination__nav-link neon-pagination__previous",color:"high-contrast",icon:"chevron-left",onClick:o[1]||(o[1]=t=>e.emit("page-change",e.previousPage))},null,8,["disabled","href"]),n.createElementVNode("div",r,[e.showFirstPageWithEllipsis?(n.openBlock(),n.createBlock(l,{key:0,href:e.url(1),"button-style":"text",class:"neon-pagination__link",color:"high-contrast",label:"1",transparent:"",onClick:o[2]||(o[2]=t=>e.emit("page-change",1))},null,8,["href"])):n.createCommentVNode("",!0),e.showFirstPageWithEllipsis?(n.openBlock(),n.createBlock(i,{key:1,class:"neon-pagination__less",color:"low-contrast",name:"ellipsis"})):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.pageRange,t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:t},[e.page===t?(n.openBlock(),n.createElementBlock("span",p,n.toDisplayString(t),1)):(n.openBlock(),n.createBlock(l,{key:1,href:e.url(t),label:`${t}`,"button-style":"text",class:"neon-pagination__link",color:"high-contrast",transparent:"",onClick:m=>e.emit("page-change",t)},null,8,["href","label","onClick"]))],64))),128)),e.showLastPageWithEllipsis?(n.openBlock(),n.createBlock(i,{key:2,class:"neon-pagination__more",color:"low-contrast",name:"ellipsis"})):n.createCommentVNode("",!0),e.showLastPageWithEllipsis?(n.openBlock(),n.createBlock(l,{key:3,href:e.url(e.pageCount),label:`${e.pageCount}`,"button-style":"text",class:"neon-pagination__link",color:"high-contrast",transparent:"",onClick:o[3]||(o[3]=t=>e.emit("page-change",e.pageCount))},null,8,["href","label"])):n.createCommentVNode("",!0)]),n.createVNode(l,{disabled:e.disabledNext,href:e.disabledNext?void 0:e.url(e.nextPage),"button-style":"outline",class:"neon-pagination__nav-link neon-pagination__next",color:"high-contrast",icon:"chevron-right",onClick:o[4]||(o[4]=t=>e.emit("page-change",e.nextPage))},null,8,["disabled","href"]),e.displayFirstAndLast?(n.openBlock(),n.createBlock(l,{key:1,disabled:e.disabledNext,href:e.disabledNext?void 0:e.url(e.pageCount),"button-style":"outline",class:"neon-pagination__nav-link neon-pagination__last",color:"high-contrast",icon:"last-page",onClick:o[5]||(o[5]=t=>e.emit("page-change",e.pageCount))},null,8,["disabled","href"])):n.createCommentVNode("",!0)],2)}const d=s(a,[["render",u]]);module.exports=d;
//# sourceMappingURL=NeonPagination.vue.cjs.js.map