@caipira/tamandua 0.0.48 → 0.0.50
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/README.md +7 -0
- package/dist/InputCheckbox.js +2 -2
- package/dist/{InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js → InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js} +20 -19
- package/dist/InputPrice.js +2 -2
- package/dist/InputPrice.vue_vue_type_script_setup_true_lang-C2wDVwnm.js +80 -0
- package/dist/InputSelect.js +2 -2
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js +226 -0
- package/dist/Pagination.js +2 -2
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-CrsaPQHf.js +106 -0
- package/dist/components.js +4 -4
- package/dist/{plugin-YUomn9tF.js → plugin-43qPVkHg.js} +1 -1
- package/dist/{plugin-DPCk5fFS.js → plugin-4XhHBTQc.js} +1 -1
- package/dist/{plugin-XDIORJya.js → plugin-C77cnZuW.js} +1 -1
- package/dist/{plugin-z8Hr_T_O.js → plugin-CQ-FpZui.js} +1 -1
- package/dist/{plugins-CfuHgVBl.js → plugins-D9rFe9qY.js} +6 -6
- package/dist/plugins.js +6 -6
- package/dist/tamandua.js +1 -1
- package/dist/types/components/InputPrice/InputPrice.story.d.ts +13 -0
- package/dist/types/components/InputPrice/InputPrice.vue.d.ts +8 -2
- package/dist/types/components/InputPrice/types.d.ts +4 -1
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +127 -52
- package/dist/types/components/InputSelect/types.d.ts +0 -1
- package/dist/types/components/Pagination/Pagination.story.d.ts +8 -0
- package/dist/types/components/Pagination/Pagination.vue.d.ts +3 -0
- package/dist/types/components/Pagination/types.d.ts +1 -0
- package/dist/types/types/ui.d.ts +6 -6
- package/package.json +1 -1
- package/dist/InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js +0 -67
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js +0 -227
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-PLZQJUd0.js +0 -89
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, computed as o, watch as C, resolveComponent as d, openBlock as g, createElementBlock as c, toDisplayString as V, createCommentVNode as x, createElementVNode as z, createVNode as s, normalizeClass as u } from "vue";
|
|
2
|
-
const B = { class: "flex items-center justify-end w-full flex-wrap" }, I = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "mr-3 grow md:block hidden"
|
|
5
|
-
}, L = { class: "h-9 flex" }, $ = /* @__PURE__ */ w({
|
|
6
|
-
name: "TPagination",
|
|
7
|
-
__name: "Pagination",
|
|
8
|
-
props: {
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
pagination: { default: () => ({}) },
|
|
11
|
-
pageLengths: { default: () => [12, 18, 24, 30, 36, 42] },
|
|
12
|
-
showDescription: { type: Boolean, default: !1 }
|
|
13
|
-
},
|
|
14
|
-
emits: ["updated"],
|
|
15
|
-
setup(m, { emit: b }) {
|
|
16
|
-
const e = m, p = b, l = o(() => e.pagination.page === 1), r = o(() => e.pagination.totalItems - e.pagination?.skip <= e.pagination.perPage), f = o(() => e.pageLengths.map((n) => ({
|
|
17
|
-
label: `${n} / page`,
|
|
18
|
-
value: n
|
|
19
|
-
}))), h = o(() => {
|
|
20
|
-
const n = e.pagination.skip + 1, t = e.pagination.skip + e.pagination.items, a = e.pagination.totalItems;
|
|
21
|
-
return `Showing ${n} to ${t} of ${a} entries`;
|
|
22
|
-
}), i = (n = e.pagination.page) => {
|
|
23
|
-
const t = n > 1 ? (n - 1) * e.pagination.perPage : 0, a = e.pagination.totalItems - t;
|
|
24
|
-
Object.assign(e.pagination, {
|
|
25
|
-
...e.pagination,
|
|
26
|
-
skip: t,
|
|
27
|
-
page: n,
|
|
28
|
-
items: a > e.pagination.perPage ? e.pagination.perPage : a
|
|
29
|
-
}), p("updated", e.pagination);
|
|
30
|
-
}, v = () => {
|
|
31
|
-
i(e.pagination.page - 1);
|
|
32
|
-
}, P = () => {
|
|
33
|
-
i(e.pagination.page + 1);
|
|
34
|
-
}, _ = (n) => {
|
|
35
|
-
Object.assign(e.pagination, {
|
|
36
|
-
...e.pagination,
|
|
37
|
-
perPage: n,
|
|
38
|
-
page: 1
|
|
39
|
-
}), p("updated", e.pagination);
|
|
40
|
-
};
|
|
41
|
-
return C(
|
|
42
|
-
() => e.pagination,
|
|
43
|
-
() => {
|
|
44
|
-
e.pagination.totalItems > 0 && e.pagination.items === 0 && i();
|
|
45
|
-
},
|
|
46
|
-
{ deep: !0, immediate: !0 }
|
|
47
|
-
), (n, t) => {
|
|
48
|
-
const a = d("t-button"), y = d("t-input-select");
|
|
49
|
-
return g(), c("div", B, [
|
|
50
|
-
n.showDescription ? (g(), c("div", I, V(h.value), 1)) : x("", !0),
|
|
51
|
-
z("div", L, [
|
|
52
|
-
s(a, {
|
|
53
|
-
size: "sm",
|
|
54
|
-
variant: "primary",
|
|
55
|
-
"disable-style": !0,
|
|
56
|
-
class: u(["h-9 px-2 input-roundness rounded-r-none input-border border-r", { "opacity-50 cursor-not-allowed": l.value }]),
|
|
57
|
-
icon: "chevron-left",
|
|
58
|
-
disabled: l.value,
|
|
59
|
-
onClick: v
|
|
60
|
-
}, null, 8, ["class", "disabled"]),
|
|
61
|
-
s(a, {
|
|
62
|
-
size: "sm",
|
|
63
|
-
variant: "primary",
|
|
64
|
-
"disable-style": !0,
|
|
65
|
-
class: u(["h-9 px-2 rounded-none", { "opacity-50 cursor-not-allowed": r.value }]),
|
|
66
|
-
icon: "chevron-right",
|
|
67
|
-
disabled: r.value,
|
|
68
|
-
onClick: P
|
|
69
|
-
}, null, 8, ["class", "disabled"]),
|
|
70
|
-
s(y, {
|
|
71
|
-
modelValue: n.pagination.perPage,
|
|
72
|
-
"onUpdate:modelValue": [
|
|
73
|
-
t[0] || (t[0] = (k) => n.pagination.perPage = k),
|
|
74
|
-
_
|
|
75
|
-
],
|
|
76
|
-
disabled: n.disabled,
|
|
77
|
-
options: f.value,
|
|
78
|
-
"disable-style": !0,
|
|
79
|
-
"dropdown-placement": "top",
|
|
80
|
-
class: "h-9 border input-border border-l-0 input-roundness rounded-l-none"
|
|
81
|
-
}, null, 8, ["modelValue", "disabled", "options"])
|
|
82
|
-
])
|
|
83
|
-
]);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
export {
|
|
88
|
-
$ as _
|
|
89
|
-
};
|