@caipira/tamandua 0.0.65 → 0.0.67
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-BbcM5CB3.js → Avatar.vue_vue_type_script_setup_true_lang-D7NdR9hu.js} +1 -1
- package/dist/Button.js +2 -2
- package/dist/Button.vue_vue_type_script_setup_true_lang-DW0Q2Ut2.js +164 -0
- package/dist/Dropdown.js +2 -2
- package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-DeY4vid5.js → Dropdown.vue_vue_type_script_setup_true_lang-CUPNdEz7.js} +1 -1
- package/dist/GraphyPrice.js +2 -2
- package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-DI2x-MAS.js → GraphyPrice.vue_vue_type_script_setup_true_lang-BDYxfzF6.js} +1 -1
- package/dist/Icon.js +2 -2
- package/dist/{Icon.vue_vue_type_script_setup_true_lang-CDJweTzy.js → Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js} +1 -1
- package/dist/InputSelect.js +2 -2
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-CGlaDHiJ.js +229 -0
- package/dist/Link.js +2 -2
- package/dist/{Link.vue_vue_type_script_setup_true_lang-DIzaFPvW.js → Link.vue_vue_type_script_setup_true_lang-BE-Gh_jJ.js} +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js +110 -0
- package/dist/Popconfirm.js +2 -2
- package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-CgWeJEGu.js → Popconfirm.vue_vue_type_script_setup_true_lang-C37pLEUq.js} +1 -1
- package/dist/Popover.js +2 -2
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-MaJDdAe0.js → Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js} +6 -6
- package/dist/Tag.js +2 -2
- package/dist/{Tag.vue_vue_type_script_setup_true_lang-CkDz2_qz.js → Tag.vue_vue_type_script_setup_true_lang-CKzb-As0.js} +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toast.vue_vue_type_script_setup_true_lang-Lw1lJoH3.js → Toast.vue_vue_type_script_setup_true_lang-DcVS4Iyg.js} +1 -1
- package/dist/components.js +17 -17
- package/dist/enums.js +1 -1
- package/dist/{plugin-BU44OLnf.js → plugin-2Cr_XUjp.js} +1 -1
- package/dist/{plugin-6ziw5jJj.js → plugin-BShPzL82.js} +1 -1
- package/dist/{plugin-BOewyU0C.js → plugin-BdTrCTL4.js} +1 -1
- package/dist/{plugin-Bw-AW29_.js → plugin-CEByTREY.js} +1 -1
- package/dist/{plugin-aR9suX-A.js → plugin-CGE6W117.js} +1 -1
- package/dist/plugin-CV_fI920.js +10 -0
- package/dist/{plugin-hcORPz_I.js → plugin-ColpxTKB.js} +1 -1
- package/dist/{plugin-B5vbbM7n.js → plugin-DJlVAL-g.js} +1 -1
- package/dist/{plugin-DqD4mnko.js → plugin-DNwjBl_u.js} +1 -1
- package/dist/{plugin-CZiSoM73.js → plugin-DxUJiAk-.js} +1 -1
- package/dist/{plugin-DPcsc5tO.js → plugin-jyvJNavM.js} +1 -1
- package/dist/{plugin-DrKx8l8j.js → plugin-x-Y35fqX.js} +1 -1
- package/dist/{plugins-cn0dSxZb.js → plugins-3Yf4y3PS.js} +21 -21
- package/dist/plugins.js +21 -21
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +23 -17
- package/dist/types/components/Button/types.d.ts +15 -13
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +6 -6
- package/dist/types/components/Pagination/Pagination.vue.d.ts +9 -0
- package/dist/types/components/Pagination/types.d.ts +1 -0
- package/dist/{ui-BSiRZzeZ.js → ui-J-lhC9qd.js} +2 -2
- package/package.json +1 -1
- package/dist/Button-BThdMs5-.js +0 -162
- package/dist/Button.css +0 -1
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-W2S_TcOu.js +0 -227
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-BNeFZWgA.js +0 -108
- package/dist/plugin-BoP2-VzO.js +0 -10
package/dist/Avatar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p } from "./plugin-
|
|
1
|
+
import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-D7NdR9hu.js";
|
|
2
|
+
import { p } from "./plugin-DNwjBl_u.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Avatar,
|
|
5
5
|
p as AvatarPlugin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, computed as d, resolveComponent as m, openBlock as a, createElementBlock as o, normalizeClass as u, unref as t, createBlock as p, toDisplayString as f, createCommentVNode as h } from "vue";
|
|
2
|
-
import { a as l, b as i } from "./ui-
|
|
2
|
+
import { a as l, b as i } from "./ui-J-lhC9qd.js";
|
|
3
3
|
const _ = ["role"], y = ["src"], S = { key: 2 }, w = /* @__PURE__ */ c({
|
|
4
4
|
name: "TAvatar",
|
|
5
5
|
__name: "Avatar",
|
package/dist/Button.js
CHANGED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { defineComponent as I, ref as y, computed as s, resolveComponent as A, openBlock as c, createBlock as d, resolveDynamicComponent as U, normalizeClass as _, unref as a, withCtx as z, mergeProps as b, createCommentVNode as u, renderSlot as D, createElementBlock as h, Fragment as P, createTextVNode as k, toDisplayString as L } from "vue";
|
|
2
|
+
import { b as f, a as i, c as t, B as r } from "./ui-J-lhC9qd.js";
|
|
3
|
+
import { g } from "./index-CVD_wAsU.js";
|
|
4
|
+
import "./Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js";
|
|
5
|
+
const F = ["multiple"], V = /* @__PURE__ */ I({
|
|
6
|
+
name: "TButton",
|
|
7
|
+
__name: "Button",
|
|
8
|
+
props: {
|
|
9
|
+
animate: {},
|
|
10
|
+
bold: { type: Boolean, default: !1 },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
hover: { type: Boolean, default: !0 },
|
|
13
|
+
icon: {},
|
|
14
|
+
iconPosition: { default: "left" },
|
|
15
|
+
iconProps: { default: () => ({}) },
|
|
16
|
+
label: { default: "" },
|
|
17
|
+
multiple: { type: Boolean, default: !1 },
|
|
18
|
+
outline: { type: Boolean, default: !1 },
|
|
19
|
+
shape: { default: f.Rounded },
|
|
20
|
+
size: { default: i.Default },
|
|
21
|
+
type: { default: t.BUTTON },
|
|
22
|
+
variant: { default: r.DEFAULT }
|
|
23
|
+
},
|
|
24
|
+
emits: ["upload"],
|
|
25
|
+
setup(S, { expose: T, emit: E }) {
|
|
26
|
+
const e = S, x = E, m = y(), p = y(null), B = s(() => {
|
|
27
|
+
switch (e.type) {
|
|
28
|
+
case t.SUBMIT:
|
|
29
|
+
return "submit";
|
|
30
|
+
case t.BUTTON:
|
|
31
|
+
case t.FILE:
|
|
32
|
+
default:
|
|
33
|
+
return "button";
|
|
34
|
+
}
|
|
35
|
+
}), R = s(() => e.type === t.SUBMIT ? e.label : void 0), w = s(() => {
|
|
36
|
+
switch (e.type) {
|
|
37
|
+
case t.SUBMIT:
|
|
38
|
+
return "input";
|
|
39
|
+
case t.BUTTON:
|
|
40
|
+
case t.FILE:
|
|
41
|
+
default:
|
|
42
|
+
return "button";
|
|
43
|
+
}
|
|
44
|
+
}), N = (o) => {
|
|
45
|
+
if (e.type === t.SUBMIT && o.preventDefault(), e.type === t.FILE && m.value?.click(), e.animate) {
|
|
46
|
+
let n = null;
|
|
47
|
+
e.animate.target === "icon" && (n = p.value?.reference), n && g.to(n, {
|
|
48
|
+
duration: 0.2,
|
|
49
|
+
...e.animate.animation,
|
|
50
|
+
ease: "power3.easeInOut",
|
|
51
|
+
onComplete: () => {
|
|
52
|
+
g.set(n, e.animate?.reset);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}, C = (o) => {
|
|
57
|
+
o.stopPropagation();
|
|
58
|
+
const l = o.target.files;
|
|
59
|
+
!l || !l.length || x("upload", l);
|
|
60
|
+
}, v = s(() => {
|
|
61
|
+
switch (e.size) {
|
|
62
|
+
case i.ExtraSmall:
|
|
63
|
+
return 12;
|
|
64
|
+
case i.Small:
|
|
65
|
+
return 16;
|
|
66
|
+
case i.Default:
|
|
67
|
+
return 20;
|
|
68
|
+
case i.Large:
|
|
69
|
+
return 24;
|
|
70
|
+
case i.ExtraLarge:
|
|
71
|
+
return 28;
|
|
72
|
+
default:
|
|
73
|
+
return 20;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return T({ iconReference: p }), (o, n) => {
|
|
77
|
+
const l = A("t-icon");
|
|
78
|
+
return c(), d(U(w.value), {
|
|
79
|
+
type: B.value,
|
|
80
|
+
value: R.value,
|
|
81
|
+
disabled: e.disabled,
|
|
82
|
+
class: _([{
|
|
83
|
+
// Size
|
|
84
|
+
"text-xs px-1 h-4": e.size === a(i).ExtraSmall,
|
|
85
|
+
"text-sm px-2 h-7": e.size === a(i).Small,
|
|
86
|
+
"text-base px-3 h-9": e.size === a(i).Default,
|
|
87
|
+
"text-lg px-3.5 h-12": e.size === a(i).Large,
|
|
88
|
+
"text-xl px-4 h-14": e.size === a(i).ExtraLarge,
|
|
89
|
+
// Border
|
|
90
|
+
"border border-color": e.outline,
|
|
91
|
+
// Shape
|
|
92
|
+
"rounded-full": e.shape === a(f).Circle,
|
|
93
|
+
"input-roundness": e.shape === a(f).Rounded,
|
|
94
|
+
// Enabled/Disabled
|
|
95
|
+
"cursor-not-allowed": e.disabled,
|
|
96
|
+
"cursor-pointer": !e.disabled,
|
|
97
|
+
// Bold
|
|
98
|
+
"font-bold": e.bold,
|
|
99
|
+
// Default color
|
|
100
|
+
"border-caipira-primary-inverted fill-caipira-primary-inverted": e.variant === a(r).DEFAULT,
|
|
101
|
+
"bg-transparent color-caipira-primary-inverted hover:bg-caipira-primary-inverted hover:color-caipira-primary hover:fill-white": e.variant === a(r).DEFAULT && e.outline,
|
|
102
|
+
"bg-caipira-primary-inverted color-caipira-primary": e.variant === a(r).DEFAULT && !e.outline,
|
|
103
|
+
// Primary color
|
|
104
|
+
"fill-caipira-primary": e.variant === a(r).PRIMARY,
|
|
105
|
+
"bg-transparent border-caipira-blue color-caipira-blue hover:bg-caipira-blue hover:color-caipira-primary hover:fill-white": e.variant === a(r).PRIMARY && e.outline,
|
|
106
|
+
"bg-caipira-blue color-caipira-primary": e.variant === a(r).PRIMARY && !e.outline,
|
|
107
|
+
// Success color
|
|
108
|
+
"fill-caipira-green": e.variant === a(r).SUCCESS,
|
|
109
|
+
"bg-transparent border-caipira-green color-caipira-green hover:bg-caipira-green hover:color-caipira-primary hover:fill-white": e.variant === a(r).SUCCESS && e.outline,
|
|
110
|
+
"bg-caipira-green color-caipira-primary": e.variant === a(r).SUCCESS && !e.outline,
|
|
111
|
+
// Warning color
|
|
112
|
+
"fill-caipira-yellow": e.variant === a(r).WARNING,
|
|
113
|
+
"bg-transparent border-caipira-yellow color-caipira-yellow hover:bg-caipira-yellow hover:color-caipira-primary hover:fill-white": e.variant === a(r).WARNING && e.outline,
|
|
114
|
+
"bg-caipira-yellow color-caipira-primary": e.variant === a(r).WARNING && !e.outline,
|
|
115
|
+
// Danger color
|
|
116
|
+
"fill-caipira-red": e.variant === a(r).DANGER,
|
|
117
|
+
"bg-transparent border-caipira-red color-caipira-red hover:bg-caipira-red hover:color-caipira-primary hover:fill-white": e.variant === a(r).DANGER && e.outline,
|
|
118
|
+
"bg-caipira-red color-caipira-primary": e.variant === a(r).DANGER && !e.outline,
|
|
119
|
+
// Link
|
|
120
|
+
"color-caipira-primary-inverted underline font-bold": e.variant === a(r).LINK,
|
|
121
|
+
// Transparent
|
|
122
|
+
"bg-transparent": e.variant === a(r).TRANSPARENT,
|
|
123
|
+
"hover:bg-[var(--hover-color)]": e.variant === a(r).TRANSPARENT && e.hover
|
|
124
|
+
}, "input-outline flex gap-1 items-center select-none whitespace-nowrap"]),
|
|
125
|
+
role: "button",
|
|
126
|
+
onClick: N
|
|
127
|
+
}, {
|
|
128
|
+
default: z(() => [
|
|
129
|
+
e.icon && e.iconPosition === "left" ? (c(), d(l, b({
|
|
130
|
+
key: 0,
|
|
131
|
+
ref_key: "iconReference",
|
|
132
|
+
ref: p,
|
|
133
|
+
size: v.value,
|
|
134
|
+
icon: e.icon
|
|
135
|
+
}, e.iconProps), null, 16, ["size", "icon"])) : u("", !0),
|
|
136
|
+
D(o.$slots, "default"),
|
|
137
|
+
e.label && e.type !== a(t).SUBMIT ? (c(), h(P, { key: 1 }, [
|
|
138
|
+
k(L(e.label), 1)
|
|
139
|
+
], 64)) : u("", !0),
|
|
140
|
+
e.icon && e.iconPosition === "right" ? (c(), d(l, b({
|
|
141
|
+
key: 2,
|
|
142
|
+
ref_key: "iconReference",
|
|
143
|
+
ref: p,
|
|
144
|
+
size: v.value,
|
|
145
|
+
icon: e.icon
|
|
146
|
+
}, e.iconProps), null, 16, ["size", "icon"])) : u("", !0),
|
|
147
|
+
e.type === "file" ? (c(), h("input", {
|
|
148
|
+
key: 3,
|
|
149
|
+
multiple: e.multiple,
|
|
150
|
+
type: "file",
|
|
151
|
+
ref_key: "fileInput",
|
|
152
|
+
ref: m,
|
|
153
|
+
class: "hidden",
|
|
154
|
+
onChange: C
|
|
155
|
+
}, null, 40, F)) : u("", !0)
|
|
156
|
+
]),
|
|
157
|
+
_: 3
|
|
158
|
+
}, 8, ["type", "value", "disabled", "class"]);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
export {
|
|
163
|
+
V as _
|
|
164
|
+
};
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-CUPNdEz7.js";
|
|
2
|
+
import { p as a } from "./plugin-x-Y35fqX.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Dropdown,
|
|
5
5
|
a as DropdownPlugin
|
package/dist/GraphyPrice.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as a } from "./GraphyPrice.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as o } from "./plugin-
|
|
1
|
+
import { _ as a } from "./GraphyPrice.vue_vue_type_script_setup_true_lang-BDYxfzF6.js";
|
|
2
|
+
import { p as o } from "./plugin-CGE6W117.js";
|
|
3
3
|
export {
|
|
4
4
|
a as GraphyPrice,
|
|
5
5
|
o as GraphyPricePlugin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, reactive as p, watch as l, openBlock as s, createElementBlock as u, normalizeClass as m, unref as r, toDisplayString as v } from "vue";
|
|
2
|
-
import { G as e } from "./ui-
|
|
2
|
+
import { G as e } from "./ui-J-lhC9qd.js";
|
|
3
3
|
import { g as f } from "./index-CVD_wAsU.js";
|
|
4
4
|
import { useI18n as y } from "vue-i18n";
|
|
5
5
|
const _ = /* @__PURE__ */ c({
|
package/dist/Icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as n } from "./Icon.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as n } from "./Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js";
|
|
2
|
+
import { p as a } from "./plugin-BShPzL82.js";
|
|
3
3
|
export {
|
|
4
4
|
n as Icon,
|
|
5
5
|
a as IconPlugin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, ref as m, computed as p, watch as h, openBlock as f, createElementBlock as d, normalizeClass as b, unref as o, normalizeStyle as k } from "vue";
|
|
2
|
-
import { a as t } from "./ui-
|
|
2
|
+
import { a as t } from "./ui-J-lhC9qd.js";
|
|
3
3
|
const x = (n, i) => {
|
|
4
4
|
const s = n[i];
|
|
5
5
|
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((r, e) => {
|
package/dist/InputSelect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as r } from "./plugin-
|
|
1
|
+
import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-CGlaDHiJ.js";
|
|
2
|
+
import { p as r } from "./plugin-DxUJiAk-.js";
|
|
3
3
|
export {
|
|
4
4
|
p as InputSelect,
|
|
5
5
|
r as InputSelectPlugin
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { defineComponent as ue, mergeModels as O, useModel as se, ref as p, computed as E, onBeforeMount as ie, watch as I, resolveComponent as g, openBlock as i, createBlock as D, normalizeClass as x, withCtx as R, createElementVNode as K, withDirectives as N, createElementBlock as d, vModelText as re, createCommentVNode as z, createVNode as U, renderSlot as k, normalizeProps as _, mergeProps as M, Fragment as V, renderList as q, guardReactiveProps as G, toDisplayString as H, vShow as ce, createSlots as pe, createTextVNode as de, nextTick as fe } from "vue";
|
|
2
|
+
import { a as ve, E as me } from "./ui-J-lhC9qd.js";
|
|
3
|
+
const ye = ["placeholder", "disabled", "readonly"], he = { key: 1 }, we = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "inline-flex w-full justify-between items-center"
|
|
6
|
+
}, be = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "inline-flex items-center"
|
|
9
|
+
}, _e = /* @__PURE__ */ ue({
|
|
10
|
+
name: "TInputSelect",
|
|
11
|
+
__name: "InputSelect",
|
|
12
|
+
props: /* @__PURE__ */ O({
|
|
13
|
+
size: { default: ve.Default },
|
|
14
|
+
options: { default: () => [] },
|
|
15
|
+
mapper: { type: Function, default: (f) => ({
|
|
16
|
+
value: f.id ?? f.uuid,
|
|
17
|
+
label: f
|
|
18
|
+
}) },
|
|
19
|
+
filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
|
|
20
|
+
tooltip: { default: "" },
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
resource: {},
|
|
23
|
+
multiple: { type: Boolean, default: !1 },
|
|
24
|
+
placeholder: { default: "" },
|
|
25
|
+
initialValue: {},
|
|
26
|
+
isSearchable: { type: Boolean, default: !1 },
|
|
27
|
+
dropdownPlacement: { default: me.BOTTOM_START },
|
|
28
|
+
widthClass: { default: "w-full" },
|
|
29
|
+
borderClass: { default: "border input-border" },
|
|
30
|
+
roundnessClass: { default: "input-roundness" }
|
|
31
|
+
}, {
|
|
32
|
+
modelValue: {},
|
|
33
|
+
modelModifiers: {}
|
|
34
|
+
}),
|
|
35
|
+
emits: /* @__PURE__ */ O(["update:model-value"], ["update:modelValue"]),
|
|
36
|
+
setup(f, { emit: T }) {
|
|
37
|
+
const l = f;
|
|
38
|
+
let B = !1, S, P = "";
|
|
39
|
+
const J = T, u = se(f, "modelValue"), o = p([]), c = p(""), j = p(null), F = p(), s = p(!1), L = p(null), a = p([]), $ = p(!1), v = p(null), h = E(() => a.value.length > 0), m = E(() => l.isSearchable && s.value), w = E(() => typeof l.resource == "function"), Q = (e) => !l.multiple || !u.value || !Array.isArray(u.value) ? !1 : u.value.includes(e.value), W = (e = u.value) => !(e === void 0 || e === "" || Array.isArray(e) && e.length === 0), X = (e) => {
|
|
40
|
+
J("update:model-value", e);
|
|
41
|
+
}, y = (e = u.value) => {
|
|
42
|
+
if (W(e))
|
|
43
|
+
if (l.multiple)
|
|
44
|
+
Array.isArray(e) && (a.value = e.map(
|
|
45
|
+
(t) => A(t)
|
|
46
|
+
).filter((t) => t > -1));
|
|
47
|
+
else {
|
|
48
|
+
const t = A(e);
|
|
49
|
+
~t && (a.value = [t]);
|
|
50
|
+
}
|
|
51
|
+
}, Y = async (e) => {
|
|
52
|
+
e.stopPropagation(), s.value = !s.value, s.value && m.value && fe(() => {
|
|
53
|
+
j.value?.focus();
|
|
54
|
+
});
|
|
55
|
+
}, A = (e) => o.value.findIndex(
|
|
56
|
+
(t) => t.value === e
|
|
57
|
+
), C = async (e = !1) => {
|
|
58
|
+
if (!l.resource)
|
|
59
|
+
return;
|
|
60
|
+
$.value = !0;
|
|
61
|
+
const t = {
|
|
62
|
+
t: c.value,
|
|
63
|
+
r: "option"
|
|
64
|
+
};
|
|
65
|
+
e && v.value && v.value.pages > v.value.page ? t.page = v.value.page + 1 : e = !1, !c.value && u.value && (t.i = u.value);
|
|
66
|
+
const r = await l.resource(t);
|
|
67
|
+
e ? o.value.push(...r.items.map(l.mapper)) : o.value = r.items.map(l.mapper), v.value = r.pagination, !w.value && c.value && y(c.value), $.value = !1;
|
|
68
|
+
}, Z = () => {
|
|
69
|
+
!c.value || P === c.value || (S && (clearTimeout(S), S = null), S = setTimeout(() => {
|
|
70
|
+
P = c.value, w.value ? (s.value || (s.value = !0), C()) : l.isSearchable && (o.value = l.options.filter(
|
|
71
|
+
(e) => l.filter(c.value, e)
|
|
72
|
+
));
|
|
73
|
+
}, 500));
|
|
74
|
+
}, ee = ({
|
|
75
|
+
index: e,
|
|
76
|
+
hold: t
|
|
77
|
+
}) => {
|
|
78
|
+
if (B = !0, l.multiple) {
|
|
79
|
+
const r = a.value.findIndex(
|
|
80
|
+
(b) => b === e
|
|
81
|
+
);
|
|
82
|
+
~r ? a.value.splice(r, 1) : a.value.push(e);
|
|
83
|
+
} else
|
|
84
|
+
a.value = [e];
|
|
85
|
+
(!l.multiple || !t) && (s.value = !1);
|
|
86
|
+
}, le = () => {
|
|
87
|
+
w.value && v.value && v.value.pages > v.value.page && C(!0);
|
|
88
|
+
}, te = async (e) => {
|
|
89
|
+
switch (e.key) {
|
|
90
|
+
case "ArrowDown":
|
|
91
|
+
L.value?.move(e);
|
|
92
|
+
break;
|
|
93
|
+
case "Escape":
|
|
94
|
+
s.value = !1;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return ie(async () => {
|
|
99
|
+
w.value ? (await C(), y()) : l.options.length > 0 && (o.value = l.options), !u.value && l.initialValue ? y(l.initialValue) : y(u.value);
|
|
100
|
+
}), I(
|
|
101
|
+
() => u.value,
|
|
102
|
+
async (e) => {
|
|
103
|
+
e && (A(e) < 0 && w.value && await C(), y(e));
|
|
104
|
+
}
|
|
105
|
+
), I(
|
|
106
|
+
a,
|
|
107
|
+
(e) => {
|
|
108
|
+
const t = l.multiple ? o.value.filter(
|
|
109
|
+
(r, b) => a.value.includes(b)
|
|
110
|
+
).map((r) => r.value) : o.value[a.value[0]].value;
|
|
111
|
+
B && (B = !1, X(t));
|
|
112
|
+
},
|
|
113
|
+
{ deep: !0 }
|
|
114
|
+
), I(
|
|
115
|
+
() => l.options,
|
|
116
|
+
(e) => {
|
|
117
|
+
e.length > 0 && (o.value = e, u.value && a.value.length === 0 && y(u.value));
|
|
118
|
+
}
|
|
119
|
+
), (e, t) => {
|
|
120
|
+
const r = g("t-tag"), b = g("t-button"), ae = g("t-icon"), oe = g("t-dropdown"), ne = g("t-popover");
|
|
121
|
+
return i(), D(ne, {
|
|
122
|
+
open: s.value,
|
|
123
|
+
"onUpdate:open": t[1] || (t[1] = (n) => s.value = n),
|
|
124
|
+
placement: l.dropdownPlacement,
|
|
125
|
+
class: x([l.widthClass]),
|
|
126
|
+
ref_key: "popoverRef",
|
|
127
|
+
ref: F
|
|
128
|
+
}, {
|
|
129
|
+
default: R(() => [
|
|
130
|
+
K("div", {
|
|
131
|
+
class: x([{
|
|
132
|
+
"h-9": !l.multiple,
|
|
133
|
+
"h-full *:min-h-9": l.multiple,
|
|
134
|
+
[l.borderClass]: !0,
|
|
135
|
+
[l.roundnessClass]: !0
|
|
136
|
+
}, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
|
|
137
|
+
}, [
|
|
138
|
+
m.value ? N((i(), d("input", {
|
|
139
|
+
key: 0,
|
|
140
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => c.value = n),
|
|
141
|
+
type: "text",
|
|
142
|
+
ref_key: "inputRef",
|
|
143
|
+
ref: j,
|
|
144
|
+
placeholder: l.placeholder,
|
|
145
|
+
disabled: l.disabled,
|
|
146
|
+
readonly: !l.isSearchable,
|
|
147
|
+
class: "h-9 bg-transparent input-padding input-roundness input-outline w-full",
|
|
148
|
+
onInput: Z,
|
|
149
|
+
onKeydown: te
|
|
150
|
+
}, null, 40, ye)), [
|
|
151
|
+
[re, c.value]
|
|
152
|
+
]) : z("", !0),
|
|
153
|
+
U(b, {
|
|
154
|
+
variant: "transparent",
|
|
155
|
+
size: "",
|
|
156
|
+
class: x(["h-full", {
|
|
157
|
+
"w-full justify-end pr-2": !m.value && !h.value,
|
|
158
|
+
"w-full justify-between pr-2": !m.value && h.value,
|
|
159
|
+
"w-10 justify-center": m.value
|
|
160
|
+
}]),
|
|
161
|
+
"aria-describedby": F.value?.name,
|
|
162
|
+
icon: s.value === !0 ? "chevron-up" : "chevron-down",
|
|
163
|
+
"icon-position": m.value ? "left" : "right",
|
|
164
|
+
onClick: Y
|
|
165
|
+
}, {
|
|
166
|
+
default: R(() => [
|
|
167
|
+
N(K("div", {
|
|
168
|
+
class: x(["inline-flex items-center ml-2 max-w-[calc(100%-2.5rem)]", {
|
|
169
|
+
"overflow-hidden whitespace-nowrap": !l.multiple,
|
|
170
|
+
"flex-wrap gap-2 py-1": l.multiple
|
|
171
|
+
}])
|
|
172
|
+
}, [
|
|
173
|
+
e.$slots.selection && h.value ? k(e.$slots, "selection", _(M({ key: 0 }, o.value[a.value[0]]))) : e.$slots.default && h.value ? (i(), d(V, { key: 1 }, [
|
|
174
|
+
l.multiple ? (i(!0), d(V, { key: 0 }, q(a.value, (n) => k(e.$slots, "default", _(G(o.value[n])))), 256)) : k(e.$slots, "default", _(M({ key: 1 }, o.value[a.value[0]])))
|
|
175
|
+
], 64)) : h.value ? (i(), d(V, { key: 2 }, [
|
|
176
|
+
l.multiple ? (i(!0), d(V, { key: 0 }, q(a.value, (n) => (i(), D(r, {
|
|
177
|
+
key: n,
|
|
178
|
+
text: o.value[n]?.label,
|
|
179
|
+
color: "#6e6e6e"
|
|
180
|
+
}, null, 8, ["text"]))), 128)) : (i(), d("span", he, H(o.value[a.value[0]]?.label), 1))
|
|
181
|
+
], 64)) : z("", !0)
|
|
182
|
+
], 2), [
|
|
183
|
+
[ce, !m.value]
|
|
184
|
+
])
|
|
185
|
+
]),
|
|
186
|
+
_: 3
|
|
187
|
+
}, 8, ["aria-describedby", "class", "icon", "icon-position"])
|
|
188
|
+
], 2)
|
|
189
|
+
]),
|
|
190
|
+
content: R(() => [
|
|
191
|
+
U(oe, {
|
|
192
|
+
ref_key: "dropdownRef",
|
|
193
|
+
ref: L,
|
|
194
|
+
items: o.value,
|
|
195
|
+
"is-visible": s.value,
|
|
196
|
+
multiple: l.multiple,
|
|
197
|
+
loading: $.value,
|
|
198
|
+
onChange: ee,
|
|
199
|
+
onEndReached: le
|
|
200
|
+
}, pe({ _: 2 }, [
|
|
201
|
+
e.$slots.default || l.multiple ? {
|
|
202
|
+
name: "default",
|
|
203
|
+
fn: R((n) => [
|
|
204
|
+
l.multiple ? (i(), d("div", we, [
|
|
205
|
+
e.$slots.default ? k(e.$slots, "default", _(M({ key: 0 }, n))) : (i(), d(V, { key: 1 }, [
|
|
206
|
+
de(H(n.label), 1)
|
|
207
|
+
], 64)),
|
|
208
|
+
Q(n) ? (i(), D(ae, {
|
|
209
|
+
key: 2,
|
|
210
|
+
icon: "check",
|
|
211
|
+
size: "sm",
|
|
212
|
+
class: "float-right ml-2"
|
|
213
|
+
})) : z("", !0)
|
|
214
|
+
])) : (i(), d("div", be, [
|
|
215
|
+
k(e.$slots, "default", _(G(n)))
|
|
216
|
+
]))
|
|
217
|
+
]),
|
|
218
|
+
key: "0"
|
|
219
|
+
} : void 0
|
|
220
|
+
]), 1032, ["items", "is-visible", "multiple", "loading"])
|
|
221
|
+
]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, ["open", "placement", "class"]);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
export {
|
|
228
|
+
_e as _
|
|
229
|
+
};
|
package/dist/Link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p } from "./plugin-
|
|
1
|
+
import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-BE-Gh_jJ.js";
|
|
2
|
+
import { p } from "./plugin-CEByTREY.js";
|
|
3
3
|
export {
|
|
4
4
|
i as Link,
|
|
5
5
|
p as LinkPlugin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, computed as o, resolveComponent as u, openBlock as t, createBlock as r, resolveDynamicComponent as m, mergeProps as d, withCtx as f, renderSlot as _, createElementBlock as k, Fragment as y, createTextVNode as b, toDisplayString as g, createCommentVNode as h } from "vue";
|
|
2
|
-
import { L as a } from "./ui-
|
|
2
|
+
import { L as a } from "./ui-J-lhC9qd.js";
|
|
3
3
|
const w = /* @__PURE__ */ p({
|
|
4
4
|
name: "TLink",
|
|
5
5
|
__name: "Link",
|
package/dist/Pagination.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as i } from "./Pagination.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as r } from "./plugin-
|
|
1
|
+
import { _ as i } from "./Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js";
|
|
2
|
+
import { p as r } from "./plugin-jyvJNavM.js";
|
|
3
3
|
export {
|
|
4
4
|
i as Pagination,
|
|
5
5
|
r as PaginationPlugin
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { defineComponent as $, mergeModels as V, useModel as x, ref as B, computed as o, resolveComponent as m, openBlock as i, createElementBlock as d, normalizeClass as L, createElementVNode as v, toDisplayString as M, createCommentVNode as f, createVNode as h, Fragment as S, renderList as z, createBlock as b } from "vue";
|
|
2
|
+
const N = { key: 0 }, j = { class: "flex flex-wrap justify-end gap-6" }, D = { class: "h-9 flex" }, F = /* @__PURE__ */ $({
|
|
3
|
+
name: "TPagination",
|
|
4
|
+
__name: "Pagination",
|
|
5
|
+
props: /* @__PURE__ */ V({
|
|
6
|
+
disabled: { type: Boolean, default: !1 },
|
|
7
|
+
displayClass: { default: "flex gap-6 flex-col sm:flex-row items-end sm:items-center justify-end sm:justify-between" },
|
|
8
|
+
hasPageSize: { type: Boolean, default: !0 },
|
|
9
|
+
pageLengths: { default: () => [12, 18, 24, 30, 36, 42] },
|
|
10
|
+
showDescription: { type: Boolean, default: !1 }
|
|
11
|
+
}, {
|
|
12
|
+
modelValue: {
|
|
13
|
+
default: {
|
|
14
|
+
page: 1,
|
|
15
|
+
pages: 1,
|
|
16
|
+
perPage: 12
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
modelModifiers: {}
|
|
20
|
+
}),
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(c) {
|
|
23
|
+
const u = c, e = x(c, "modelValue"), g = B(e.value.perPage ?? 12), P = o(() => e.value.page === 1), k = o(
|
|
24
|
+
() => e.value.page === e.value.pages
|
|
25
|
+
), y = o(() => {
|
|
26
|
+
const a = e.value.pages || 1, t = e.value.page || 1, n = [], p = Math.max(2, t - 2), l = Math.min(a - 1, t + 2);
|
|
27
|
+
a > 1 && n.push(1);
|
|
28
|
+
for (let s = p; s <= l; s++)
|
|
29
|
+
s > 1 && s < a && n.push(s);
|
|
30
|
+
return a > 1 && n.push(a), n;
|
|
31
|
+
}), C = o(() => u.pageLengths.map((a) => ({
|
|
32
|
+
label: `${a} / page`,
|
|
33
|
+
value: a
|
|
34
|
+
}))), w = o(() => {
|
|
35
|
+
if ("items" in e.value && "skip" in e.value && "items" in e.value) {
|
|
36
|
+
const a = e.value.skip + 1, t = e.value.skip + e.value.items, n = e.value.totalItems;
|
|
37
|
+
return `Showing ${a} to ${t} of ${n} entries`;
|
|
38
|
+
}
|
|
39
|
+
return `Page ${e.value.page} of ${e.value.pages}`;
|
|
40
|
+
}), r = (a) => {
|
|
41
|
+
a === e.value.page || a < 1 || a > e.value.pages || (e.value = {
|
|
42
|
+
...e.value,
|
|
43
|
+
page: a
|
|
44
|
+
});
|
|
45
|
+
}, _ = (a) => {
|
|
46
|
+
a !== e.value.perPage && (e.value = {
|
|
47
|
+
...e.value,
|
|
48
|
+
perPage: a,
|
|
49
|
+
page: 1
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
return (a, t) => {
|
|
53
|
+
const n = m("t-button"), p = m("t-input-select");
|
|
54
|
+
return i(), d("div", {
|
|
55
|
+
class: L(["select-none", [u.displayClass]])
|
|
56
|
+
}, [
|
|
57
|
+
v("div", null, [
|
|
58
|
+
a.showDescription ? (i(), d("p", N, M(w.value), 1)) : f("", !0)
|
|
59
|
+
]),
|
|
60
|
+
v("div", j, [
|
|
61
|
+
v("div", D, [
|
|
62
|
+
h(n, {
|
|
63
|
+
variant: "transparent",
|
|
64
|
+
label: "Previous",
|
|
65
|
+
icon: "chevron-left",
|
|
66
|
+
hover: !0,
|
|
67
|
+
"disable-style": !0,
|
|
68
|
+
disabled: P.value,
|
|
69
|
+
onClick: t[0] || (t[0] = (l) => r(e.value.page - 1))
|
|
70
|
+
}, null, 8, ["disabled"]),
|
|
71
|
+
(i(!0), d(S, null, z(y.value, (l) => (i(), b(n, {
|
|
72
|
+
variant: "transparent",
|
|
73
|
+
hover: !0,
|
|
74
|
+
label: `${l}`,
|
|
75
|
+
outline: l === e.value.page,
|
|
76
|
+
bold: l === e.value.page,
|
|
77
|
+
disabled: l === e.value.page,
|
|
78
|
+
onClick: (s) => r(l)
|
|
79
|
+
}, null, 8, ["label", "outline", "bold", "disabled", "onClick"]))), 256)),
|
|
80
|
+
h(n, {
|
|
81
|
+
variant: "transparent",
|
|
82
|
+
label: "Next",
|
|
83
|
+
icon: "chevron-right",
|
|
84
|
+
"icon-position": "right",
|
|
85
|
+
hover: !0,
|
|
86
|
+
disabled: k.value,
|
|
87
|
+
onClick: t[1] || (t[1] = (l) => r(e.value.page + 1))
|
|
88
|
+
}, null, 8, ["disabled"])
|
|
89
|
+
]),
|
|
90
|
+
u.hasPageSize ? (i(), b(p, {
|
|
91
|
+
key: 0,
|
|
92
|
+
modelValue: g.value,
|
|
93
|
+
"onUpdate:modelValue": [
|
|
94
|
+
t[2] || (t[2] = (l) => g.value = l),
|
|
95
|
+
_
|
|
96
|
+
],
|
|
97
|
+
"width-class": "",
|
|
98
|
+
class: "w-fit min-w-32",
|
|
99
|
+
"dropdown-placement": "top",
|
|
100
|
+
disabled: a.disabled,
|
|
101
|
+
options: C.value
|
|
102
|
+
}, null, 8, ["modelValue", "disabled", "options"])) : f("", !0)
|
|
103
|
+
])
|
|
104
|
+
], 2);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
export {
|
|
109
|
+
F as _
|
|
110
|
+
};
|
package/dist/Popconfirm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as m } from "./plugin-
|
|
1
|
+
import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-C37pLEUq.js";
|
|
2
|
+
import { p as m } from "./plugin-2Cr_XUjp.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Popconfirm,
|
|
5
5
|
m as PopconfirmPlugin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, ref as x, resolveComponent as l, openBlock as b, createBlock as g, withCtx as m, renderSlot as k, normalizeProps as y, guardReactiveProps as P, createElementVNode as t, createVNode as a, toDisplayString as w } from "vue";
|
|
2
|
-
import { E as z } from "./ui-
|
|
2
|
+
import { E as z } from "./ui-J-lhC9qd.js";
|
|
3
3
|
const $ = { class: "text-sm mb-6 inline-flex items-center" }, B = { class: "color-text" }, E = { class: "flex justify-end gap-2" }, O = /* @__PURE__ */ C({
|
|
4
4
|
name: "TPopconfirm",
|
|
5
5
|
__name: "Popconfirm",
|
package/dist/Popover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as P } from "./plugin-
|
|
1
|
+
import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js";
|
|
2
|
+
import { p as P } from "./plugin-ColpxTKB.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Popover,
|
|
5
5
|
P as PopoverPlugin
|