UNPKG

@aotearoan/neon

Version:

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

109 lines (108 loc) 4.05 kB
import g from "./NeonPagination.es.js"; import { resolveComponent as p, openBlock as i, createElementBlock as s, normalizeClass as h, createBlock as a, createCommentVNode as t, createVNode as d, createElementVNode as b, Fragment as u, renderList as f, toDisplayString as k } from "vue"; import m from "../../../_virtual/_plugin-vue_export-helper.es.js"; const v = { class: "neon-pagination__page-links" }, y = { key: 0, class: "neon-pagination__link--selected" }; function C(n, e, P, $, c, N) { const l = p("neon-button"), r = p("neon-icon"); return i(), s("div", { class: h([[ { "neon-pagination--empty": n.hidePagination }, `neon-pagination--${n.color}` ], "neon-pagination"]) }, [ n.displayFirstAndLast ? (i(), a(l, { key: 0, disabled: n.disabledPrevious, href: n.disabledPrevious ? void 0 : n.url(1), "button-style": "outline", class: "neon-pagination__nav-link neon-pagination__first", color: "high-contrast", icon: "first-page", onClick: e[0] || (e[0] = (o) => n.emit("page-change", 1)) }, null, 8, ["disabled", "href"])) : t("", !0), d(l, { disabled: n.disabledPrevious, href: n.disabledPrevious ? void 0 : n.url(n.previousPage), "button-style": "outline", class: "neon-pagination__nav-link neon-pagination__previous", color: "high-contrast", icon: "chevron-left", onClick: e[1] || (e[1] = (o) => n.emit("page-change", n.previousPage)) }, null, 8, ["disabled", "href"]), b("div", v, [ n.showFirstPageWithEllipsis ? (i(), a(l, { key: 0, href: n.url(1), "button-style": "text", class: "neon-pagination__link", color: "high-contrast", label: "1", transparent: "", onClick: e[2] || (e[2] = (o) => n.emit("page-change", 1)) }, null, 8, ["href"])) : t("", !0), n.showFirstPageWithEllipsis ? (i(), a(r, { key: 1, class: "neon-pagination__less", color: "low-contrast", name: "ellipsis" })) : t("", !0), (i(!0), s(u, null, f(n.pageRange, (o) => (i(), s(u, { key: o }, [ n.page === o ? (i(), s("span", y, k(o), 1)) : (i(), a(l, { key: 1, href: n.url(o), label: `${o}`, "button-style": "text", class: "neon-pagination__link", color: "high-contrast", transparent: "", onClick: (w) => n.emit("page-change", o) }, null, 8, ["href", "label", "onClick"])) ], 64))), 128)), n.showLastPageWithEllipsis ? (i(), a(r, { key: 2, class: "neon-pagination__more", color: "low-contrast", name: "ellipsis" })) : t("", !0), n.showLastPageWithEllipsis ? (i(), a(l, { key: 3, href: n.url(n.pageCount), label: `${n.pageCount}`, "button-style": "text", class: "neon-pagination__link", color: "high-contrast", transparent: "", onClick: e[3] || (e[3] = (o) => n.emit("page-change", n.pageCount)) }, null, 8, ["href", "label"])) : t("", !0) ]), d(l, { disabled: n.disabledNext, href: n.disabledNext ? void 0 : n.url(n.nextPage), "button-style": "outline", class: "neon-pagination__nav-link neon-pagination__next", color: "high-contrast", icon: "chevron-right", onClick: e[4] || (e[4] = (o) => n.emit("page-change", n.nextPage)) }, null, 8, ["disabled", "href"]), n.displayFirstAndLast ? (i(), a(l, { key: 1, disabled: n.disabledNext, href: n.disabledNext ? void 0 : n.url(n.pageCount), "button-style": "outline", class: "neon-pagination__nav-link neon-pagination__last", color: "high-contrast", icon: "last-page", onClick: e[5] || (e[5] = (o) => n.emit("page-change", n.pageCount)) }, null, 8, ["disabled", "href"])) : t("", !0) ], 2); } const W = /* @__PURE__ */ m(g, [["render", C]]); export { W as default }; //# sourceMappingURL=NeonPagination.vue.es.js.map