vlite3 0.6.1 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { defineComponent as N, ref as u, watch as g, provide as P, nextTick as V, onUnmounted as j, computed as x, openBlock as s, createElementBlock as r, Fragment as K, createElementVNode as d, mergeProps as C, withModifiers as w, renderSlot as f, createCommentVNode as c, createBlock as $, Teleport as M, createVNode as B, Transition as R, withCtx as W, normalizeClass as a, toDisplayString as T, resolveDynamicComponent as A } from "vue";
2
- import F from "./Button.vue.js";
3
- import { useKeyStroke as U } from "../composables/useKeyStroke.js";
4
- import { $t as I } from "../utils/i18n.js";
5
- const q = {
1
+ import { defineComponent as M, ref as f, inject as N, watch as x, provide as P, nextTick as V, onMounted as K, onUnmounted as R, computed as C, openBlock as n, createElementBlock as d, Fragment as W, createElementVNode as c, mergeProps as w, withModifiers as T, renderSlot as m, createCommentVNode as u, createBlock as $, Teleport as A, createVNode as B, Transition as F, withCtx as U, normalizeClass as a, toDisplayString as I, resolveDynamicComponent as q } from "vue";
2
+ import G from "./Button.vue.js";
3
+ import { useKeyStroke as H } from "../composables/useKeyStroke.js";
4
+ import { $t as S } from "../utils/i18n.js";
5
+ const J = {
6
6
  key: 0,
7
7
  class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
8
- }, G = { class: "text-lg font-semibold leading-none tracking-tight" }, H = {
8
+ }, L = { class: "text-lg font-semibold leading-none tracking-tight" }, Q = {
9
9
  key: 0,
10
10
  class: "text-sm text-muted-foreground mb-6.5"
11
- }, Y = /* @__PURE__ */ N({
11
+ }, ee = /* @__PURE__ */ M({
12
12
  inheritAttrs: !1,
13
13
  __name: "Modal",
14
14
  props: {
@@ -28,51 +28,54 @@ const q = {
28
28
  bodyProps: {}
29
29
  },
30
30
  emits: ["close", "update:show", "onOpen"],
31
- setup(t, { emit: S }) {
32
- const o = t, m = S, n = u(o.show), b = u(!1), y = u(!1), p = u(null);
31
+ setup(o, { emit: O }) {
32
+ const t = o, y = O, l = f(t.show), p = f(!1), b = f(!1), v = f(null);
33
33
  let i = null;
34
- g(
35
- () => o.show,
34
+ const r = N("dropdown-context", null);
35
+ x(
36
+ () => t.show,
36
37
  (e) => {
37
- n.value = e, e && m("onOpen");
38
+ l.value = e, e && (y("onOpen"), r?.close());
38
39
  }
39
40
  );
40
- const O = () => {
41
- n.value = !0;
41
+ const j = () => {
42
+ l.value = !0, r?.close();
42
43
  }, z = (e) => {
43
- b.value = e;
44
- }, l = () => {
45
- if (b.value) {
46
- y.value = !0, i && clearTimeout(i), i = setTimeout(() => {
47
- y.value = !1;
44
+ p.value = e;
45
+ }, s = () => {
46
+ if (p.value) {
47
+ b.value = !0, i && clearTimeout(i), i = setTimeout(() => {
48
+ b.value = !1;
48
49
  }, 1e3);
49
50
  return;
50
51
  }
51
- n.value = !1, m("update:show", !1), m("close");
52
+ l.value = !1, y("update:show", !1), y("close");
52
53
  };
53
- P("modal-context", { close: l, setSubmitting: z });
54
+ P("modal-context", { close: s, setSubmitting: z });
54
55
  const D = () => {
55
- o.closeOutside && l();
56
- }, { onKeyStroke: E } = U();
57
- E("Escape", l), g(n, async (e) => {
58
- e ? (document.body.style.overflow = "hidden", await V(), p.value?.focus()) : document.body.style.overflow = "";
59
- }), j(() => {
60
- document.body.style.overflow = "", i && clearTimeout(i);
56
+ t.closeOutside && s();
57
+ }, { onKeyStroke: E } = H();
58
+ E("Escape", s), x(l, async (e) => {
59
+ r?.onChildToggle?.(e), e ? (document.body.style.overflow = "hidden", await V(), v.value?.focus()) : document.body.style.overflow = "";
60
+ }), K(() => {
61
+ l.value && r?.onChildToggle?.(!0);
62
+ }), R(() => {
63
+ l.value && r?.onChildToggle?.(!1), document.body.style.overflow = "", i && clearTimeout(i);
61
64
  });
62
- const v = x(() => o.titleI18n ? I(o.titleI18n) : o.title), h = x(
63
- () => o.descriptionI18n ? I(o.descriptionI18n) : o.description
65
+ const h = C(() => t.titleI18n ? S(t.titleI18n) : t.title), g = C(
66
+ () => t.descriptionI18n ? S(t.descriptionI18n) : t.description
64
67
  );
65
- return (e, k) => (s(), r(K, null, [
66
- d("span", C({
67
- onClick: w(O, ["stop"]),
68
- class: `${t.triggerClass}`
68
+ return (e, k) => (n(), d(W, null, [
69
+ c("span", w({
70
+ onClick: T(j, ["stop"]),
71
+ class: `${o.triggerClass}`
69
72
  }, e.$attrs), [
70
- f(e.$slots, "trigger", {}, () => [
71
- t.body ? f(e.$slots, "default", { key: 0 }, void 0, !0) : c("", !0)
73
+ m(e.$slots, "trigger", {}, () => [
74
+ o.body ? m(e.$slots, "default", { key: 0 }, void 0, !0) : u("", !0)
72
75
  ], !0)
73
76
  ], 16),
74
- (s(), $(M, { to: "body" }, [
75
- B(R, {
77
+ (n(), $(A, { to: "body" }, [
78
+ B(F, {
76
79
  "enter-active-class": "transition duration-200 ease-out",
77
80
  "enter-from-class": "opacity-0",
78
81
  "enter-to-class": "opacity-100",
@@ -80,52 +83,52 @@ const q = {
80
83
  "leave-from-class": "opacity-100",
81
84
  "leave-to-class": "opacity-0"
82
85
  }, {
83
- default: W(() => [
84
- n.value ? (s(), r("div", {
86
+ default: U(() => [
87
+ l.value ? (n(), d("div", {
85
88
  key: 0,
86
- class: a(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4", t.backdrop && "backdrop-blur-[2px]"]),
89
+ class: a(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4 v-modal-overlay", o.backdrop && "backdrop-blur-[2px]"]),
87
90
  onClick: D
88
91
  }, [
89
- d("div", {
92
+ c("div", {
90
93
  ref_key: "modalRef",
91
- ref: p,
94
+ ref: v,
92
95
  tabindex: "-1",
93
- class: a(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [t.maxWidth]]),
94
- onClick: k[0] || (k[0] = w(() => {
96
+ class: a(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [o.maxWidth]]),
97
+ onClick: k[0] || (k[0] = T(() => {
95
98
  }, ["stop"]))
96
99
  }, [
97
- v.value ? (s(), r("div", q, [
98
- d("div", {
99
- class: a(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
100
+ h.value ? (n(), d("div", J, [
101
+ c("div", {
102
+ class: a(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
100
103
  }, [
101
- d("h3", G, T(v.value), 1),
102
- B(F, {
104
+ c("h3", L, I(h.value), 1),
105
+ B(G, {
103
106
  rounded: "full",
104
107
  size: "sm",
105
108
  icon: "lucide:x",
106
109
  variant: "ghost",
107
- class: a(["hover:bg-gray-250/25! transition-all", { "blink-bg": y.value }]),
108
- onClick: l
110
+ class: a(["hover:bg-gray-250/25! transition-all", { "blink-bg": b.value }]),
111
+ onClick: s
109
112
  }, null, 8, ["class"])
110
113
  ], 2)
111
- ])) : c("", !0),
112
- d("div", {
113
- class: a(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", t.bodyClass])
114
+ ])) : u("", !0),
115
+ c("div", {
116
+ class: a(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", o.bodyClass])
114
117
  }, [
115
- h.value ? (s(), r("p", H, T(h.value), 1)) : c("", !0),
116
- t.body ? (s(), $(A(t.body), C({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: l }), null, 16)) : f(e.$slots, "default", {
118
+ g.value ? (n(), d("p", Q, I(g.value), 1)) : u("", !0),
119
+ o.body ? (n(), $(q(o.body), w({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: s }), null, 16)) : m(e.$slots, "default", {
117
120
  key: 2,
118
- close: l
121
+ close: s
119
122
  }, void 0, !0)
120
123
  ], 2),
121
- e.$slots.footer ? (s(), r("div", {
124
+ e.$slots.footer ? (n(), d("div", {
122
125
  key: 1,
123
- class: a([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
126
+ class: a([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
124
127
  }, [
125
- f(e.$slots, "footer", { close: l }, void 0, !0)
126
- ], 2)) : c("", !0)
128
+ m(e.$slots, "footer", { close: s }, void 0, !0)
129
+ ], 2)) : u("", !0)
127
130
  ], 2)
128
- ], 2)) : c("", !0)
131
+ ], 2)) : u("", !0)
129
132
  ]),
130
133
  _: 3
131
134
  })
@@ -134,5 +137,5 @@ const q = {
134
137
  }
135
138
  });
136
139
  export {
137
- Y as default
140
+ ee as default
138
141
  };
@@ -70,9 +70,9 @@ const U = {
70
70
  ghost: "bg-accent text-accent-foreground"
71
71
  }, V = {
72
72
  line: "text-muted-foreground border-b-2 border-transparent hover:text-foreground hover:border-border",
73
- pill: "text-muted-foreground hover:text-foreground hover:bg-accent/60",
74
- solid: "text-muted-foreground hover:text-foreground hover:bg-accent",
75
- ghost: "text-muted-foreground hover:text-foreground hover:bg-accent/60"
73
+ pill: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
74
+ solid: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
75
+ ghost: "text-muted-foreground hover:text-foreground hover:bg-accent/50"
76
76
  }, x = (o) => {
77
77
  const t = h.path;
78
78
  if (!o.to) return !1;
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<PaginationProps, {}, {}, {
10
10
  "onUpdate:itemsPerPage"?: (value: number) => any;
11
11
  "onChange:itemsPerPage"?: (value: number) => any;
12
12
  }>, {
13
+ rounded: import('.').PaginationRounded;
13
14
  disabled: boolean;
14
15
  itemsPerPage: number;
15
16
  currentPage: number;
@@ -19,5 +20,6 @@ declare const _default: import('vue').DefineComponent<PaginationProps, {}, {}, {
19
20
  showItemsPerPage: boolean;
20
21
  itemsPerPageOptions: number[];
21
22
  navType: "text" | "icon";
23
+ activeVariant: import('.').PaginationVariant;
22
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
25
  export default _default;
@@ -1,26 +1,26 @@
1
- import { defineComponent as A, computed as u, openBlock as i, createElementBlock as r, normalizeClass as z, createElementVNode as g, toDisplayString as l, Fragment as b, renderList as j, createVNode as x, createCommentVNode as f, createTextVNode as y, createBlock as w, withCtx as I } from "vue";
2
- import F from "../Icon.vue.js";
3
- import d from "../Button.vue.js";
4
- import { $t as h } from "../../utils/i18n.js";
5
- const q = {
1
+ import { defineComponent as q, computed as u, openBlock as r, createElementBlock as l, normalizeClass as i, createElementVNode as m, toDisplayString as o, Fragment as k, renderList as D, createVNode as C, createCommentVNode as h, createTextVNode as b, createBlock as x, withCtx as z } from "vue";
2
+ import G from "../Icon.vue.js";
3
+ import c from "../Button.vue.js";
4
+ import { $t as y } from "../../utils/i18n.js";
5
+ const H = {
6
6
  key: 0,
7
7
  class: "flex flex-wrap items-center justify-center md:justify-start gap-4 order-2 md:order-1"
8
- }, G = {
8
+ }, J = {
9
9
  key: 0,
10
10
  class: "flex items-center gap-2 text-sm text-muted-foreground"
11
- }, H = { class: "whitespace-nowrap" }, J = { class: "relative" }, K = ["value", "disabled"], Q = ["value"], U = { class: "whitespace-nowrap" }, W = {
11
+ }, K = { class: "whitespace-nowrap" }, Q = { class: "relative" }, U = ["value", "disabled"], W = ["value"], X = { class: "whitespace-nowrap" }, Y = {
12
12
  key: 1,
13
13
  class: "hidden md:block w-px h-4 bg-border"
14
- }, X = {
14
+ }, Z = {
15
15
  key: 2,
16
16
  class: "text-sm text-muted-foreground whitespace-nowrap"
17
- }, Y = { class: "font-medium text-foreground" }, Z = { class: "font-medium text-foreground" }, p = {
17
+ }, p = { class: "font-medium text-foreground" }, _ = { class: "font-medium text-foreground" }, ee = {
18
18
  class: "flex items-center justify-center gap-1 order-1 md:order-2",
19
19
  "aria-label": "Pagination"
20
- }, _ = {
20
+ }, te = {
21
21
  key: 0,
22
- class: "px-2 text-gray-400 select-none"
23
- }, se = /* @__PURE__ */ A({
22
+ class: "px-2 text-muted-foreground select-none"
23
+ }, le = /* @__PURE__ */ q({
24
24
  __name: "Pagination",
25
25
  props: {
26
26
  currentPage: { default: 1 },
@@ -33,38 +33,40 @@ const q = {
33
33
  itemsPerPage: { default: 10 },
34
34
  itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
35
35
  navType: { default: "text" },
36
- alignment: {}
36
+ alignment: {},
37
+ activeVariant: { default: "solid" },
38
+ rounded: { default: "full" }
37
39
  },
38
40
  emits: ["update:currentPage", "change", "update:itemsPerPage", "change:itemsPerPage"],
39
- setup(e, { emit: T }) {
40
- const s = e, c = T, o = (t) => {
41
- s.disabled || t < 1 || t > s.totalPages || t !== s.currentPage && (c("update:currentPage", t), c("change", t));
42
- }, D = (t) => {
43
- const n = t.target, a = parseInt(n.value);
44
- c("update:itemsPerPage", a), c("change:itemsPerPage", a), c("update:currentPage", 1), c("change", 1);
45
- }, N = u(() => {
46
- if (s.totalItems * 2 + 5 >= s.totalPages)
47
- return k(1, s.totalPages);
48
- const n = Math.max(s.currentPage - s.totalItems, 1), a = Math.min(s.currentPage + s.totalItems, s.totalPages), m = n > 2, P = a < s.totalPages - 2, C = 1, S = s.totalPages;
49
- if (!m && P) {
50
- let v = 3 + 2 * s.totalItems;
51
- return [...k(1, v), "DOTS", S];
41
+ setup(e, { emit: N }) {
42
+ const n = e, f = N, g = (t) => {
43
+ n.disabled || t < 1 || t > n.totalPages || t !== n.currentPage && (f("update:currentPage", t), f("change", t));
44
+ }, O = (t) => {
45
+ const s = t.target, a = parseInt(s.value);
46
+ f("update:itemsPerPage", a), f("change:itemsPerPage", a), f("update:currentPage", 1), f("change", 1);
47
+ }, B = u(() => {
48
+ if (n.totalItems * 2 + 5 >= n.totalPages)
49
+ return I(1, n.totalPages);
50
+ const s = Math.max(n.currentPage - n.totalItems, 1), a = Math.min(n.currentPage + n.totalItems, n.totalPages), v = s > 2, P = a < n.totalPages - 2, $ = 1, j = n.totalPages;
51
+ if (!v && P) {
52
+ const w = 3 + 2 * n.totalItems;
53
+ return [...I(1, w), "DOTS", j];
52
54
  }
53
- if (m && !P) {
54
- let v = 3 + 2 * s.totalItems, $ = k(s.totalPages - v + 1, s.totalPages);
55
- return [C, "DOTS", ...$];
55
+ if (v && !P) {
56
+ const w = 3 + 2 * n.totalItems, T = I(n.totalPages - w + 1, n.totalPages);
57
+ return [$, "DOTS", ...T];
56
58
  }
57
- if (m && P) {
58
- let v = k(n, a);
59
- return [C, "DOTS", ...v, "DOTS", S];
59
+ if (v && P) {
60
+ const w = I(s, a);
61
+ return [$, "DOTS", ...w, "DOTS", j];
60
62
  }
61
63
  return [];
62
- }), k = (t, n) => {
63
- let a = n - t + 1;
64
- return Array.from({ length: a }, (m, P) => P + t);
65
- }, O = u(() => {
66
- if (s.alignment)
67
- switch (s.alignment) {
64
+ }), I = (t, s) => {
65
+ const a = s - t + 1;
66
+ return Array.from({ length: a }, (v, P) => P + t);
67
+ }, R = u(() => {
68
+ if (n.alignment)
69
+ switch (n.alignment) {
68
70
  case "start":
69
71
  return "justify-start";
70
72
  case "end":
@@ -74,156 +76,199 @@ const q = {
74
76
  default:
75
77
  return "justify-center";
76
78
  }
77
- return s.showPageInfo || s.showItemsPerPage ? "justify-between" : "justify-center";
78
- }), B = u(() => {
79
- const t = h("vlite.pagination.show");
79
+ return n.showPageInfo || n.showItemsPerPage ? "justify-between" : "justify-center";
80
+ }), d = u(() => {
81
+ switch (n.rounded) {
82
+ case "none":
83
+ return "rounded-none";
84
+ case "sm":
85
+ return "rounded-sm";
86
+ case "lg":
87
+ return "rounded-lg";
88
+ case "full":
89
+ return "rounded-full";
90
+ default:
91
+ return "rounded-md";
92
+ }
93
+ }), S = u(() => {
94
+ switch (n.activeVariant) {
95
+ case "solid":
96
+ return {
97
+ variant: "primary",
98
+ extraClass: "pointer-events-none z-10"
99
+ };
100
+ case "ghost":
101
+ return {
102
+ variant: "ghost",
103
+ extraClass: "bg-accent text-accent-foreground pointer-events-none z-10 font-semibold"
104
+ };
105
+ default:
106
+ return {
107
+ variant: "outline",
108
+ extraClass: "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10"
109
+ };
110
+ }
111
+ }), V = u(() => {
112
+ const t = y("vlite.pagination.show");
80
113
  return t !== "vlite.pagination.show" ? t : "Show";
81
- }), R = u(() => {
82
- const t = h("vlite.pagination.perPage");
83
- return t !== "vlite.pagination.perPage" ? t : "per page";
84
114
  }), E = u(() => {
85
- const t = h("vlite.pagination.page");
115
+ const t = y("vlite.pagination.perPage");
116
+ return t !== "vlite.pagination.perPage" ? t : "per page";
117
+ }), A = u(() => {
118
+ const t = y("vlite.pagination.page");
86
119
  return t !== "vlite.pagination.page" ? t : "Page";
87
- }), V = u(() => {
88
- const t = h("vlite.pagination.of");
89
- return t !== "vlite.pagination.of" ? t : "of";
90
120
  }), L = u(() => {
91
- const t = h("vlite.pagination.previous");
92
- return t !== "vlite.pagination.previous" ? t : "Previous";
121
+ const t = y("vlite.pagination.of");
122
+ return t !== "vlite.pagination.of" ? t : "of";
93
123
  }), M = u(() => {
94
- const t = h("vlite.pagination.next");
124
+ const t = y("vlite.pagination.previous");
125
+ return t !== "vlite.pagination.previous" ? t : "Previous";
126
+ }), F = u(() => {
127
+ const t = y("vlite.pagination.next");
95
128
  return t !== "vlite.pagination.next" ? t : "Next";
96
129
  });
97
- return (t, n) => (i(), r("div", {
98
- class: z(["flex flex-col md:flex-row items-center gap-4 w-full", [O.value]])
130
+ return (t, s) => (r(), l("div", {
131
+ class: i(["flex flex-col md:flex-row items-center gap-4 w-full", [R.value]])
99
132
  }, [
100
- e.showPageInfo || e.showItemsPerPage ? (i(), r("div", q, [
101
- e.showItemsPerPage ? (i(), r("div", G, [
102
- g("span", H, l(B.value), 1),
103
- g("div", J, [
104
- g("select", {
133
+ e.showPageInfo || e.showItemsPerPage ? (r(), l("div", H, [
134
+ e.showItemsPerPage ? (r(), l("div", J, [
135
+ m("span", K, o(V.value), 1),
136
+ m("div", Q, [
137
+ m("select", {
105
138
  value: e.itemsPerPage,
106
139
  class: "appearance-none bg-background border border-border hover:border-accent text-foreground py-1 pl-2 pr-6 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary text-sm cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
107
140
  disabled: e.disabled,
108
- onChange: D
141
+ onChange: O
109
142
  }, [
110
- (i(!0), r(b, null, j(e.itemsPerPageOptions, (a) => (i(), r("option", {
143
+ (r(!0), l(k, null, D(e.itemsPerPageOptions, (a) => (r(), l("option", {
111
144
  key: a,
112
145
  value: a
113
- }, l(a), 9, Q))), 128))
114
- ], 40, K),
115
- x(F, {
146
+ }, o(a), 9, W))), 128))
147
+ ], 40, U),
148
+ C(G, {
116
149
  icon: "lucide:chevron-down",
117
150
  class: "absolute right-1.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none"
118
151
  })
119
152
  ]),
120
- g("span", U, l(R.value), 1)
121
- ])) : f("", !0),
122
- e.showItemsPerPage && e.showPageInfo ? (i(), r("div", W)) : f("", !0),
123
- e.showPageInfo ? (i(), r("span", X, [
124
- y(l(E.value) + " ", 1),
125
- g("span", Y, l(e.currentPage), 1),
126
- y(" " + l(V.value) + " ", 1),
127
- g("span", Z, l(e.totalPages), 1)
128
- ])) : f("", !0)
129
- ])) : f("", !0),
130
- g("nav", p, [
131
- e.showEdges ? (i(), w(d, {
153
+ m("span", X, o(E.value), 1)
154
+ ])) : h("", !0),
155
+ e.showItemsPerPage && e.showPageInfo ? (r(), l("div", Y)) : h("", !0),
156
+ e.showPageInfo ? (r(), l("span", Z, [
157
+ b(o(A.value) + " ", 1),
158
+ m("span", p, o(e.currentPage), 1),
159
+ b(" " + o(L.value) + " ", 1),
160
+ m("span", _, o(e.totalPages), 1)
161
+ ])) : h("", !0)
162
+ ])) : h("", !0),
163
+ m("nav", ee, [
164
+ e.showEdges ? (r(), x(c, {
132
165
  key: 0,
133
166
  variant: "ghost",
134
167
  size: "sm",
135
168
  icon: "lucide:chevrons-left",
169
+ class: i(d.value),
136
170
  disabled: e.disabled || e.currentPage === 1,
137
- onClick: n[0] || (n[0] = (a) => o(1))
138
- }, null, 8, ["disabled"])) : f("", !0),
139
- e.navType === "icon" ? (i(), w(d, {
171
+ onClick: s[0] || (s[0] = (a) => g(1))
172
+ }, null, 8, ["class", "disabled"])) : h("", !0),
173
+ e.navType === "icon" ? (r(), x(c, {
140
174
  key: 1,
141
175
  variant: "ghost",
142
176
  size: "sm",
143
177
  icon: "lucide:chevron-left",
178
+ class: i(d.value),
144
179
  disabled: e.disabled || e.currentPage === 1,
145
- onClick: n[1] || (n[1] = (a) => o(e.currentPage - 1))
146
- }, null, 8, ["disabled"])) : (i(), r(b, { key: 2 }, [
147
- x(d, {
180
+ onClick: s[1] || (s[1] = (a) => g(e.currentPage - 1))
181
+ }, null, 8, ["class", "disabled"])) : (r(), l(k, { key: 2 }, [
182
+ C(c, {
148
183
  variant: "ghost",
149
184
  size: "sm",
150
- class: "hidden sm:flex",
185
+ class: i(["hidden sm:flex", d.value]),
151
186
  disabled: e.disabled || e.currentPage === 1,
152
- onClick: n[2] || (n[2] = (a) => o(e.currentPage - 1))
187
+ onClick: s[2] || (s[2] = (a) => g(e.currentPage - 1))
153
188
  }, {
154
- default: I(() => [
155
- y(l(L.value), 1)
189
+ default: z(() => [
190
+ b(o(M.value), 1)
156
191
  ]),
157
192
  _: 1
158
- }, 8, ["disabled"]),
159
- x(d, {
193
+ }, 8, ["class", "disabled"]),
194
+ C(c, {
160
195
  variant: "ghost",
161
196
  size: "sm",
162
197
  icon: "lucide:chevron-left",
163
- class: "flex sm:hidden",
198
+ class: i(["flex sm:hidden", d.value]),
164
199
  disabled: e.disabled || e.currentPage === 1,
165
- onClick: n[3] || (n[3] = (a) => o(e.currentPage - 1))
166
- }, null, 8, ["disabled"])
200
+ onClick: s[3] || (s[3] = (a) => g(e.currentPage - 1))
201
+ }, null, 8, ["class", "disabled"])
167
202
  ], 64)),
168
- (i(!0), r(b, null, j(N.value, (a, m) => (i(), r(b, { key: m }, [
169
- a === "DOTS" ? (i(), r("div", _, "...")) : (i(), w(d, {
203
+ (r(!0), l(k, null, D(B.value, (a, v) => (r(), l(k, { key: v }, [
204
+ a === "DOTS" ? (r(), l("div", te, "...")) : a === e.currentPage ? (r(), x(c, {
170
205
  key: 1,
171
206
  size: "sm",
172
- variant: a === e.currentPage ? "outline" : "ghost",
173
- class: z({
174
- "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10": a === e.currentPage,
175
- "text-gray-600 hover:bg-gray-100": a !== e.currentPage
176
- }),
207
+ variant: S.value.variant,
208
+ class: i([S.value.extraClass, d.value]),
209
+ disabled: e.disabled
210
+ }, {
211
+ default: z(() => [
212
+ b(o(a), 1)
213
+ ]),
214
+ _: 2
215
+ }, 1032, ["variant", "class", "disabled"])) : (r(), x(c, {
216
+ key: 2,
217
+ size: "sm",
218
+ variant: "ghost",
219
+ class: i(["text-gray-600 hover:bg-gray-100", d.value]),
177
220
  disabled: e.disabled,
178
- onClick: (P) => o(a)
221
+ onClick: (P) => g(a)
179
222
  }, {
180
- default: I(() => [
181
- y(l(a), 1)
223
+ default: z(() => [
224
+ b(o(a), 1)
182
225
  ]),
183
226
  _: 2
184
- }, 1032, ["variant", "class", "disabled", "onClick"]))
227
+ }, 1032, ["class", "disabled", "onClick"]))
185
228
  ], 64))), 128)),
186
- e.navType === "icon" ? (i(), w(d, {
229
+ e.navType === "icon" ? (r(), x(c, {
187
230
  key: 3,
188
231
  variant: "ghost",
189
232
  size: "sm",
190
233
  icon: "lucide:chevron-right",
234
+ class: i(d.value),
191
235
  disabled: e.disabled || e.currentPage === e.totalPages,
192
- onClick: n[4] || (n[4] = (a) => o(e.currentPage + 1))
193
- }, null, 8, ["disabled"])) : (i(), r(b, { key: 4 }, [
194
- x(d, {
236
+ onClick: s[4] || (s[4] = (a) => g(e.currentPage + 1))
237
+ }, null, 8, ["class", "disabled"])) : (r(), l(k, { key: 4 }, [
238
+ C(c, {
195
239
  variant: "ghost",
196
240
  size: "sm",
197
- class: "hidden sm:flex",
241
+ class: i(["hidden sm:flex", d.value]),
198
242
  disabled: e.disabled || e.currentPage === e.totalPages,
199
- onClick: n[5] || (n[5] = (a) => o(e.currentPage + 1))
243
+ onClick: s[5] || (s[5] = (a) => g(e.currentPage + 1))
200
244
  }, {
201
- default: I(() => [
202
- y(l(M.value), 1)
245
+ default: z(() => [
246
+ b(o(F.value), 1)
203
247
  ]),
204
248
  _: 1
205
- }, 8, ["disabled"]),
206
- x(d, {
249
+ }, 8, ["class", "disabled"]),
250
+ C(c, {
207
251
  variant: "ghost",
208
252
  size: "sm",
209
253
  icon: "lucide:chevron-right",
210
- class: "flex sm:hidden",
254
+ class: i(["flex sm:hidden", d.value]),
211
255
  disabled: e.disabled || e.currentPage === e.totalPages,
212
- onClick: n[6] || (n[6] = (a) => o(e.currentPage + 1))
213
- }, null, 8, ["disabled"])
256
+ onClick: s[6] || (s[6] = (a) => g(e.currentPage + 1))
257
+ }, null, 8, ["class", "disabled"])
214
258
  ], 64)),
215
- e.showEdges ? (i(), w(d, {
259
+ e.showEdges ? (r(), x(c, {
216
260
  key: 5,
217
261
  variant: "ghost",
218
262
  size: "sm",
219
263
  icon: "lucide:chevrons-right",
264
+ class: i(d.value),
220
265
  disabled: e.disabled || e.currentPage === e.totalPages,
221
- onClick: n[7] || (n[7] = (a) => o(e.totalPages))
222
- }, null, 8, ["disabled"])) : f("", !0)
266
+ onClick: s[7] || (s[7] = (a) => g(e.totalPages))
267
+ }, null, 8, ["class", "disabled"])) : h("", !0)
223
268
  ])
224
269
  ], 2));
225
270
  }
226
271
  });
227
272
  export {
228
- se as default
273
+ le as default
229
274
  };
@@ -5,6 +5,8 @@ export interface PageInfo {
5
5
  totalItems?: number;
6
6
  itemsPerPage?: number;
7
7
  }
8
+ export type PaginationVariant = 'outline' | 'solid' | 'ghost';
9
+ export type PaginationRounded = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
10
  export interface PaginationProps {
9
11
  currentPage?: number;
10
12
  totalPages: number;
@@ -17,4 +19,8 @@ export interface PaginationProps {
17
19
  itemsPerPageOptions?: number[];
18
20
  navType?: 'text' | 'icon';
19
21
  alignment?: 'start' | 'center' | 'end' | 'between';
22
+ /** Visual style for the active page button. @default 'outline' */
23
+ activeVariant?: PaginationVariant;
24
+ /** Border radius for page buttons. @default 'md' */
25
+ rounded?: PaginationRounded;
20
26
  }
@@ -11,7 +11,7 @@ import "v-datepicker-lite";
11
11
  import "v-datepicker-lite/style.css";
12
12
  import "@jaames/iro";
13
13
  import "@vueuse/core";
14
- /* empty css */
14
+ /* empty css */
15
15
  import "iconify-icon-picker";
16
16
  import "iconify-icon-picker/style.css";
17
17
  /* empty css */