@caipira/tamandua 0.0.51 → 0.0.54
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.
- package/dist/Avatar.js +2 -2
- package/dist/{Avatar.vue_vue_type_script_setup_true_lang-C8p8_0Uc.js → Avatar.vue_vue_type_script_setup_true_lang-DUWgm42g.js} +1 -1
- package/dist/{Button-DusGbcIs.js → Button-e3n89ixO.js} +2 -2
- package/dist/Button.js +2 -2
- package/dist/GraphyPrice.js +2 -2
- package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-BdCwug4U.js → GraphyPrice.vue_vue_type_script_setup_true_lang-BRYLNEub.js} +1 -1
- package/dist/Icon.js +2 -2
- package/dist/{Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js → Icon.vue_vue_type_script_setup_true_lang-ANNvmTpX.js} +15 -15
- package/dist/InputSelect.js +2 -2
- package/dist/{InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js → InputSelect.vue_vue_type_script_setup_true_lang-qo8I6edp.js} +1 -1
- package/dist/Link.js +2 -2
- package/dist/{Link.vue_vue_type_script_setup_true_lang-gTf77Jvd.js → Link.vue_vue_type_script_setup_true_lang-Gvmff9-3.js} +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-Bgc3FPMU.js +108 -0
- package/dist/Popconfirm.js +2 -2
- package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js → Popconfirm.vue_vue_type_script_setup_true_lang-C811ZrE7.js} +1 -1
- package/dist/Popover.js +2 -2
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js → Popover.vue_vue_type_script_setup_true_lang-D1oZrofv.js} +1 -1
- package/dist/Tag.js +2 -2
- package/dist/{Tag.vue_vue_type_script_setup_true_lang-DatNytmx.js → Tag.vue_vue_type_script_setup_true_lang-todthrF3.js} +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toast.vue_vue_type_script_setup_true_lang-Dezwl4qF.js → Toast.vue_vue_type_script_setup_true_lang-DafyPpHT.js} +1 -1
- package/dist/components.js +11 -11
- package/dist/enums.js +1 -1
- package/dist/{plugin-CxYhyNRA.js → plugin--oqIr0hS.js} +1 -1
- package/dist/{plugin-Dn96hI0e.js → plugin-B1A9IA24.js} +1 -1
- package/dist/{plugin-CdJ1wBq2.js → plugin-BlGCxPvT.js} +1 -1
- package/dist/{plugin-DH3hMjgo.js → plugin-CkyGQW3y.js} +1 -1
- package/dist/{plugin-DXjluPIV.js → plugin-D0pv_KhI.js} +1 -1
- package/dist/{plugin-Da5BWlyX.js → plugin-KCYRmKkj.js} +1 -1
- package/dist/{plugin-C77cnZuW.js → plugin-N-HVkReo.js} +1 -1
- package/dist/{plugin-Ee4Z5Rtp.js → plugin-OLiFUzUI.js} +1 -1
- package/dist/{plugin-DDoM02Fq.js → plugin-egbXwaGq.js} +1 -1
- package/dist/{plugin-Dk3KBChD.js → plugin-pmSk_PLu.js} +1 -1
- package/dist/{plugin-DHstqRmE.js → plugin-tCWn1gjD.js} +1 -1
- package/dist/{plugins-BjwvJoNS.js → plugins-Cu7QCqK7.js} +20 -20
- package/dist/plugins.js +20 -20
- package/dist/tamandua.js +1 -1
- package/dist/text-box-BVc9B9n0.js +5 -0
- package/dist/text-box-multiple-6B79Kunt.js +5 -0
- package/dist/text-box-multiple-outline-B3r1hkOs.js +5 -0
- package/dist/text-box-outline-Ckr037Wz.js +5 -0
- package/dist/types/components/Button/Button.vue.d.ts +3 -3
- package/dist/types/components/Dropdown/Dropdown.vue.d.ts +3 -3
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +3 -3
- package/dist/types/components/Pagination/Pagination.story.d.ts +3 -4
- package/dist/types/components/Pagination/Pagination.vue.d.ts +39 -36
- package/dist/types/components/Pagination/index.d.ts +1 -1
- package/dist/types/components/Pagination/types.d.ts +0 -6
- package/dist/types/components/types.d.ts +2 -2
- package/dist/types/enums/ui.d.ts +4 -0
- package/dist/{ui-BC6H9E93.js → ui-Zkd1OIva.js} +3 -3
- package/package.json +1 -1
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-BJO_aOJk.js +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, computed as s, watch as S, resolveComponent as h, openBlock as p, createElementBlock as g, toDisplayString as V, createCommentVNode as v, createElementVNode as _, createVNode as b, normalizeClass as d, Fragment as L, renderList as N, createBlock as y } from "vue";
|
|
2
|
-
const O = { class: "flex gap-2 items-center flex-wrap" }, D = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "md:block hidden"
|
|
5
|
-
}, I = { class: "h-9 flex" }, E = /* @__PURE__ */ B({
|
|
6
|
-
name: "TPagination",
|
|
7
|
-
__name: "Pagination",
|
|
8
|
-
props: {
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
pagination: { default: () => ({}) },
|
|
11
|
-
hasPageSize: { type: Boolean, default: !0 },
|
|
12
|
-
pageLengths: { default: () => [12, 18, 24, 30, 36, 42] },
|
|
13
|
-
showDescription: { type: Boolean, default: !1 }
|
|
14
|
-
},
|
|
15
|
-
emits: ["updated"],
|
|
16
|
-
setup(P, { emit: k }) {
|
|
17
|
-
const e = P, u = k, c = s(() => e.pagination.page === 1), m = s(
|
|
18
|
-
() => e.pagination.page === e.pagination.pages
|
|
19
|
-
), w = s(() => {
|
|
20
|
-
const a = e.pagination.pages || 1, n = e.pagination.page || 1, t = [], r = Math.max(2, n - 2), i = Math.min(a - 1, n + 2);
|
|
21
|
-
a > 1 && t.push(1);
|
|
22
|
-
for (let o = r; o <= i; o++)
|
|
23
|
-
o > 1 && o < a && t.push(o);
|
|
24
|
-
return a > 1 && t.push(a), t;
|
|
25
|
-
}), $ = s(() => e.pageLengths.map((a) => ({
|
|
26
|
-
label: `${a} / page`,
|
|
27
|
-
value: a
|
|
28
|
-
}))), C = s(() => {
|
|
29
|
-
if (e.pagination.items && e.pagination.skip && e.pagination.items) {
|
|
30
|
-
const a = e.pagination.skip + 1, n = e.pagination.skip + e.pagination.items, t = e.pagination.totalItems;
|
|
31
|
-
return `Showing ${a} to ${n} of ${t} entries`;
|
|
32
|
-
}
|
|
33
|
-
return `Page ${e.pagination.page} of ${e.pagination.pages}`;
|
|
34
|
-
}), f = (a = e.pagination.page) => {
|
|
35
|
-
const n = {
|
|
36
|
-
...e.pagination,
|
|
37
|
-
page: a
|
|
38
|
-
};
|
|
39
|
-
"perPage" in e.pagination && "skip" in e.pagination && "totalItems" in e.pagination && (n.skip = a > 1 ? (a - 1) * e.pagination.perPage : 0, n.items = e.pagination.perPage ? e.pagination.perPage : e.pagination.totalItems - n.skip), JSON.stringify(e.pagination) !== JSON.stringify(n) && (Object.assign(e.pagination, n), u("updated", e.pagination));
|
|
40
|
-
}, l = (a) => {
|
|
41
|
-
a === e.pagination.page || a < 1 || a > e.pagination.pages || f(a);
|
|
42
|
-
}, z = (a) => {
|
|
43
|
-
Object.assign(e.pagination, {
|
|
44
|
-
...e.pagination,
|
|
45
|
-
perPage: a,
|
|
46
|
-
page: 1
|
|
47
|
-
}), u("updated", e.pagination);
|
|
48
|
-
};
|
|
49
|
-
return S(
|
|
50
|
-
() => e.pagination,
|
|
51
|
-
() => f(),
|
|
52
|
-
{ deep: !0, immediate: !0 }
|
|
53
|
-
), (a, n) => {
|
|
54
|
-
const t = h("t-button"), r = h("t-input-select");
|
|
55
|
-
return p(), g("div", O, [
|
|
56
|
-
a.showDescription ? (p(), g("div", D, V(C.value), 1)) : v("", !0),
|
|
57
|
-
_("div", I, [
|
|
58
|
-
b(t, {
|
|
59
|
-
size: "sm",
|
|
60
|
-
variant: "primary",
|
|
61
|
-
"disable-style": !0,
|
|
62
|
-
class: d(["h-9 px-2 input-roundness rounded-r-none", { "opacity-50 cursor-not-allowed": c.value }]),
|
|
63
|
-
icon: "chevron-left",
|
|
64
|
-
disabled: c.value,
|
|
65
|
-
onClick: n[0] || (n[0] = (i) => l(a.pagination.page - 1))
|
|
66
|
-
}, null, 8, ["class", "disabled"]),
|
|
67
|
-
(p(!0), g(L, null, N(w.value, (i) => (p(), y(t, {
|
|
68
|
-
"disable-style": !0,
|
|
69
|
-
label: `${i}`,
|
|
70
|
-
disabled: i === a.pagination.page,
|
|
71
|
-
class: d([{
|
|
72
|
-
"opacity-50 cursor-not-allowed": i === a.pagination.page
|
|
73
|
-
}, "h-9 px-2 rounded-none"]),
|
|
74
|
-
size: "sm",
|
|
75
|
-
variant: "primary",
|
|
76
|
-
onClick: (o) => l(i)
|
|
77
|
-
}, null, 8, ["label", "disabled", "class", "onClick"]))), 256)),
|
|
78
|
-
b(t, {
|
|
79
|
-
size: "sm",
|
|
80
|
-
variant: "primary",
|
|
81
|
-
"disable-style": !0,
|
|
82
|
-
class: d(["h-9 px-2 input-roundness rounded-l-none", { "opacity-50 cursor-not-allowed": m.value }]),
|
|
83
|
-
icon: "chevron-right",
|
|
84
|
-
disabled: m.value,
|
|
85
|
-
onClick: n[1] || (n[1] = (i) => l(a.pagination.page + 1))
|
|
86
|
-
}, null, 8, ["class", "disabled"])
|
|
87
|
-
]),
|
|
88
|
-
e.hasPageSize ? (p(), y(r, {
|
|
89
|
-
key: 1,
|
|
90
|
-
modelValue: a.pagination.perPage,
|
|
91
|
-
"onUpdate:modelValue": [
|
|
92
|
-
n[2] || (n[2] = (i) => a.pagination.perPage = i),
|
|
93
|
-
z
|
|
94
|
-
],
|
|
95
|
-
"width-class": "",
|
|
96
|
-
class: "w-fit min-w-32",
|
|
97
|
-
"dropdown-placement": "top",
|
|
98
|
-
disabled: a.disabled,
|
|
99
|
-
options: $.value
|
|
100
|
-
}, null, 8, ["modelValue", "disabled", "options"])) : v("", !0)
|
|
101
|
-
]);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
export {
|
|
106
|
-
E as _
|
|
107
|
-
};
|