@caipira/tamandua 0.0.45 → 0.0.46
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/{Button-DxCwFAWy.js → Button-DusGbcIs.js} +10 -10
- package/dist/Button.css +1 -1
- package/dist/Button.js +2 -2
- package/dist/Drawer-CKfQZ6rv.js +74 -0
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.js +2 -2
- package/dist/Form.js +2 -2
- package/dist/{Form.vue_vue_type_script_setup_true_lang-CaCu47jH.js → Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js} +83 -86
- package/dist/FormItem.js +2 -2
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-D7a8YCgS.js +64 -0
- package/dist/InputCheckbox.js +2 -2
- package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js +49 -0
- package/dist/InputMultiplier.js +2 -2
- package/dist/{InputMultiplier.vue_vue_type_script_setup_true_lang-BFDBZk2M.js → InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js} +5 -6
- package/dist/InputPassword.js +2 -2
- package/dist/{InputPassword.vue_vue_type_script_setup_true_lang-DtP-Tv-2.js → InputPassword.vue_vue_type_script_setup_true_lang-BghMiF8B.js} +1 -1
- package/dist/InputRadio.js +2 -2
- package/dist/InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js +35 -0
- package/dist/InputSwitch.js +2 -2
- package/dist/{InputSwitch.vue_vue_type_script_setup_true_lang-Dq_U-mFJ.js → InputSwitch.vue_vue_type_script_setup_true_lang-Q3wQlqfk.js} +1 -1
- package/dist/InputText.js +2 -2
- package/dist/InputText.vue_vue_type_script_setup_true_lang-JLAlUE_2.js +38 -0
- package/dist/Modal.js +2 -2
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-aQ-G7tuI.js → Modal.vue_vue_type_script_setup_true_lang-CEaX1svl.js} +10 -10
- package/dist/components.js +11 -11
- package/dist/{plugin-BN2jubTY.js → plugin-BT2ef1QG.js} +1 -1
- package/dist/{plugin-D0o7F2L4.js → plugin-BV0OSVIw.js} +1 -1
- package/dist/{plugin-DT7LVAli.js → plugin-BZOU6h10.js} +1 -1
- package/dist/{plugin-WcNmSb_y.js → plugin-Br-QOjhk.js} +1 -1
- package/dist/{plugin-BjXXC0b-.js → plugin-CvohbpUQ.js} +1 -1
- package/dist/{plugin-DQ6digu2.js → plugin-DH3hMjgo.js} +1 -1
- package/dist/{plugin-GUvrG7aO.js → plugin-DKjcKBPg.js} +1 -1
- package/dist/{plugin-Dz7BPW4D.js → plugin-DPCk5fFS.js} +1 -1
- package/dist/{plugin-uMlQixCx.js → plugin-DcQ8tvKe.js} +1 -1
- package/dist/{plugin-D6dx276z.js → plugin-Y4yYnlO3.js} +1 -1
- package/dist/{plugin-DDUNw6fL.js → plugin-lYDlOt8p.js} +1 -1
- package/dist/{plugins-C7Uur4I5.js → plugins-8zKsGUYL.js} +16 -16
- package/dist/plugins.js +16 -16
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Form/{form.story.d.ts → Form.story.d.ts} +7 -1
- package/dist/types/components/Form/Form.vue.d.ts +6 -19
- package/dist/types/components/Form/types.d.ts +3 -5
- package/dist/types/components/FormItem/FormItem.vue.d.ts +2 -16
- package/dist/types/components/FormItem/types.d.ts +3 -1
- package/dist/types/components/InputCheckbox/InputCheckbox.vue.d.ts +3 -0
- package/dist/types/components/InputCheckbox/types.d.ts +1 -0
- package/dist/types/components/InputMultiplier/InputMultiplier.vue.d.ts +0 -3
- package/dist/types/components/InputMultiplier/types.d.ts +0 -1
- package/package.json +1 -1
- package/dist/Drawer-BNQfu7JD.js +0 -76
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-CV7IVjE4.js +0 -84
- package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-BONJ9l1D.js +0 -40
- package/dist/InputRadio.vue_vue_type_style_index_0_lang-IqPZ9Qzl.js +0 -35
- package/dist/InputText.vue_vue_type_script_setup_true_lang-D4nIMRiz.js +0 -39
- /package/dist/types/components/InputCheckbox/{input-checkbox.story.d.ts → Input-checkbox.story.d.ts} +0 -0
- /package/dist/types/components/InputPassword/{input-password.story.d.ts → Input-password.story.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './Button.css';
|
|
2
|
-
import { defineComponent as _, useSlots as z, ref as v, computed as
|
|
2
|
+
import { defineComponent as _, useSlots as z, ref as v, computed as c, resolveComponent as A, openBlock as s, createBlock as y, resolveDynamicComponent as U, normalizeClass as D, unref as a, withCtx as L, renderSlot as k, mergeProps as F, createCommentVNode as m, createElementBlock as h, Fragment as P, createTextVNode as M, toDisplayString as G } from "vue";
|
|
3
3
|
import { c as i, a as t, b as d, B as r } from "./ui-BC6H9E93.js";
|
|
4
4
|
import { g as b } from "./index-CVD_wAsU.js";
|
|
5
5
|
import "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
|
|
@@ -23,7 +23,7 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["upload"],
|
|
25
25
|
setup(g, { expose: S, emit: x }) {
|
|
26
|
-
const e = g, E = x, T = z(), f = v(), u = v(null), B =
|
|
26
|
+
const e = g, E = x, T = z(), f = v(), u = v(null), B = c(() => {
|
|
27
27
|
switch (e.type) {
|
|
28
28
|
case i.SUBMIT:
|
|
29
29
|
return "submit";
|
|
@@ -32,7 +32,7 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
32
32
|
default:
|
|
33
33
|
return "button";
|
|
34
34
|
}
|
|
35
|
-
}), R =
|
|
35
|
+
}), R = c(() => e.type === i.SUBMIT ? e.label : void 0), w = c(() => {
|
|
36
36
|
switch (e.type) {
|
|
37
37
|
case i.SUBMIT:
|
|
38
38
|
return "input";
|
|
@@ -55,9 +55,9 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
55
55
|
}
|
|
56
56
|
}, I = (l) => {
|
|
57
57
|
l.stopPropagation();
|
|
58
|
-
const
|
|
59
|
-
!
|
|
60
|
-
}, N =
|
|
58
|
+
const p = l.target.files;
|
|
59
|
+
!p || !p.length || E("upload", p);
|
|
60
|
+
}, N = c(() => {
|
|
61
61
|
switch (e.size) {
|
|
62
62
|
case t.ExtraSmall:
|
|
63
63
|
return 12;
|
|
@@ -72,9 +72,9 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
72
72
|
default:
|
|
73
73
|
return 20;
|
|
74
74
|
}
|
|
75
|
-
}), n =
|
|
75
|
+
}), n = c(() => !!e.label || !!T.default);
|
|
76
76
|
return S({ iconReference: u }), (l, o) => {
|
|
77
|
-
const
|
|
77
|
+
const p = A("t-icon");
|
|
78
78
|
return s(), y(U(w.value), {
|
|
79
79
|
type: B.value,
|
|
80
80
|
value: R.value,
|
|
@@ -124,7 +124,7 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
124
124
|
}, {
|
|
125
125
|
default: L(() => [
|
|
126
126
|
k(l.$slots, "default", {}, void 0, !0),
|
|
127
|
-
e.icon ? (s(), y(
|
|
127
|
+
e.icon ? (s(), y(p, F({
|
|
128
128
|
key: 0,
|
|
129
129
|
ref_key: "iconReference",
|
|
130
130
|
ref: u,
|
|
@@ -155,7 +155,7 @@ const W = ["multiple"], V = /* @__PURE__ */ _({
|
|
|
155
155
|
}, 8, ["type", "value", "disabled", "class"]);
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
}), H = /* @__PURE__ */ O(V, [["__scopeId", "data-v-
|
|
158
|
+
}), H = /* @__PURE__ */ O(V, [["__scopeId", "data-v-be1344fe"]]);
|
|
159
159
|
export {
|
|
160
160
|
H as B
|
|
161
161
|
};
|
package/dist/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.transparent-hover[data-v-
|
|
1
|
+
.transparent-hover[data-v-be1344fe]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
|
package/dist/Button.js
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import './Drawer.css';
|
|
2
|
+
import { defineComponent as _, ref as b, onMounted as v, resolveComponent as y, openBlock as t, createElementBlock as r, withKeys as h, createVNode as i, createElementVNode as c, normalizeClass as d, toDisplayString as k, createCommentVNode as s, renderSlot as a } from "vue";
|
|
3
|
+
import { _ as w } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js";
|
|
4
|
+
import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const C = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "p-4 border-b border-color"
|
|
8
|
+
}, $ = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "block font-semibold uppercase"
|
|
11
|
+
}, x = { class: "flex flex-col flex-1 relative overflow-y-auto scrollbar" }, D = /* @__PURE__ */ _({
|
|
12
|
+
name: "TDrawer",
|
|
13
|
+
__name: "Drawer",
|
|
14
|
+
props: {
|
|
15
|
+
title: { default: "" },
|
|
16
|
+
style: { default: () => ({
|
|
17
|
+
footer: ""
|
|
18
|
+
}) },
|
|
19
|
+
direction: { default: "rtl" },
|
|
20
|
+
showHeader: { type: Boolean, default: !0 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["closed"],
|
|
23
|
+
setup(f, { emit: p }) {
|
|
24
|
+
const o = f, u = p, n = b(null), l = (e) => {
|
|
25
|
+
e.stopPropagation(), u("closed");
|
|
26
|
+
};
|
|
27
|
+
return v(() => {
|
|
28
|
+
n.value?.focus();
|
|
29
|
+
}), (e, z) => {
|
|
30
|
+
const m = y("t-button");
|
|
31
|
+
return t(), r("div", {
|
|
32
|
+
class: "fixed inset-0 flex items-center z-10",
|
|
33
|
+
tabindex: "0",
|
|
34
|
+
ref_key: "modal",
|
|
35
|
+
ref: n,
|
|
36
|
+
onKeyup: h(l, ["esc"])
|
|
37
|
+
}, [
|
|
38
|
+
i(w, { onClick: l }),
|
|
39
|
+
c("div", {
|
|
40
|
+
class: d(["w-[38rem] absolute inset-y-0 z-10 flex flex-col bg-caipira-primary drawer", {
|
|
41
|
+
"right-0 drop-shadow-lg": o.direction === "ltr",
|
|
42
|
+
"left-0": o.direction === "rtl"
|
|
43
|
+
}])
|
|
44
|
+
}, [
|
|
45
|
+
i(m, {
|
|
46
|
+
variant: "transparent",
|
|
47
|
+
size: "lg",
|
|
48
|
+
icon: "close",
|
|
49
|
+
class: "absolute top-0 right-0",
|
|
50
|
+
onClick: l
|
|
51
|
+
}),
|
|
52
|
+
o.showHeader ? (t(), r("div", C, [
|
|
53
|
+
o.title ? (t(), r("span", $, k(o.title), 1)) : s("", !0),
|
|
54
|
+
e.$slots.header ? a(e.$slots, "header", { key: 1 }, void 0, !0) : s("", !0)
|
|
55
|
+
])) : s("", !0),
|
|
56
|
+
c("div", x, [
|
|
57
|
+
a(e.$slots, "default", {}, void 0, !0)
|
|
58
|
+
]),
|
|
59
|
+
e.$slots.footer ? (t(), r("div", {
|
|
60
|
+
key: 1,
|
|
61
|
+
class: d(["p-4 border-t border-color", {
|
|
62
|
+
[e.style.footer]: !0
|
|
63
|
+
}])
|
|
64
|
+
}, [
|
|
65
|
+
a(e.$slots, "footer", {}, void 0, !0)
|
|
66
|
+
], 2)) : s("", !0)
|
|
67
|
+
], 2)
|
|
68
|
+
], 544);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}), E = /* @__PURE__ */ g(D, [["__scopeId", "data-v-1c88d1cf"]]);
|
|
72
|
+
export {
|
|
73
|
+
E as D
|
|
74
|
+
};
|
package/dist/Drawer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.drawer[data-v-
|
|
1
|
+
.drawer[data-v-1c88d1cf]{box-shadow:#0003 0 8px 10px -5px,#00000024 0 16px 24px 2px,#0000001f 0 6px 30px 5px}
|
package/dist/Drawer.js
CHANGED
package/dist/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
|
|
2
|
+
import { p as a } from "./plugin-DcQ8tvKe.js";
|
|
3
3
|
export {
|
|
4
4
|
m as Form,
|
|
5
5
|
a as FormPlugin
|
|
@@ -1,125 +1,124 @@
|
|
|
1
|
-
import { reactive as $, defineComponent as C, ref as _, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as h, c as w, p as S, a as F } from "./transformers-DLw_G6c6.js";
|
|
1
|
+
import { reactive as $, defineComponent as C, ref as _, computed as N, watch as A, provide as O, resolveComponent as P, openBlock as J, createElementBlock as E, renderSlot as B, unref as T, createElementVNode as W, normalizeClass as j, withDirectives as z, createVNode as R, mergeProps as q, vShow as x } from "vue";
|
|
2
|
+
import { F as n, a as f } from "./form-BkXpIJ0e.js";
|
|
3
|
+
import { d as V, c as h, p as S, a as F } from "./transformers-DLw_G6c6.js";
|
|
5
4
|
const i = {
|
|
6
5
|
default: (e, t, r) => (t[r] = e, t),
|
|
7
|
-
price: (e, t, r,
|
|
6
|
+
price: (e, t, r, s = ["Currency", "Value"]) => {
|
|
8
7
|
const [c, a] = S(e);
|
|
9
|
-
return t[`${r}${
|
|
8
|
+
return t[`${r}${s[0]}`] = c, t[`${r}${s[1]}`] = a, t;
|
|
10
9
|
},
|
|
11
10
|
password: async (e, t, r) => (t[r] = F(e), t)
|
|
12
|
-
},
|
|
11
|
+
}, G = async (e, t, r, s) => {
|
|
13
12
|
switch (e) {
|
|
14
|
-
case
|
|
13
|
+
case n.Address:
|
|
15
14
|
return i.default(
|
|
16
15
|
r,
|
|
17
16
|
t,
|
|
18
|
-
|
|
17
|
+
s
|
|
19
18
|
);
|
|
20
|
-
case
|
|
19
|
+
case n.Boolean:
|
|
21
20
|
return i.default(
|
|
22
21
|
r,
|
|
23
22
|
t,
|
|
24
|
-
|
|
23
|
+
s
|
|
25
24
|
);
|
|
26
|
-
case
|
|
25
|
+
case n.Country:
|
|
27
26
|
return i.default(
|
|
28
|
-
|
|
27
|
+
h(r),
|
|
29
28
|
t,
|
|
30
|
-
|
|
29
|
+
s
|
|
31
30
|
);
|
|
32
|
-
case
|
|
31
|
+
case n.Date:
|
|
33
32
|
return i.default(
|
|
34
|
-
|
|
33
|
+
V(r),
|
|
35
34
|
t,
|
|
36
|
-
|
|
35
|
+
s
|
|
37
36
|
);
|
|
38
|
-
case
|
|
39
|
-
case
|
|
37
|
+
case n.Document:
|
|
38
|
+
case n.Documents:
|
|
40
39
|
throw new Error("Cannot append files to JSON!");
|
|
41
|
-
case
|
|
40
|
+
case n.Price:
|
|
42
41
|
return i.price(
|
|
43
42
|
r,
|
|
44
43
|
t,
|
|
45
|
-
|
|
44
|
+
s
|
|
46
45
|
);
|
|
47
|
-
case
|
|
46
|
+
case n.Password:
|
|
48
47
|
return await i.password(
|
|
49
48
|
r,
|
|
50
49
|
t,
|
|
51
|
-
|
|
50
|
+
s
|
|
52
51
|
);
|
|
53
|
-
case
|
|
52
|
+
case n.StringArray:
|
|
54
53
|
return i.default(
|
|
55
54
|
r,
|
|
56
55
|
t,
|
|
57
|
-
|
|
56
|
+
s
|
|
58
57
|
);
|
|
59
58
|
default:
|
|
60
59
|
return i.default(
|
|
61
60
|
r,
|
|
62
61
|
t,
|
|
63
|
-
|
|
62
|
+
s
|
|
64
63
|
);
|
|
65
64
|
}
|
|
66
65
|
}, p = (e) => (e == null ? e = "" : typeof e == "object" ? e = JSON.stringify(e) : typeof e == "number" ? e = e.toString() : typeof e == "boolean" && (e = e ? "1" : "0"), e), u = {
|
|
67
66
|
default: (e, t, r) => {
|
|
68
|
-
const
|
|
69
|
-
return e && t.append(r,
|
|
67
|
+
const s = p(e);
|
|
68
|
+
return e && t.append(r, s), t;
|
|
70
69
|
},
|
|
71
|
-
price: (e, t, r,
|
|
70
|
+
price: (e, t, r, s = ["Currency", "Value"]) => {
|
|
72
71
|
const [c, a] = S(e);
|
|
73
|
-
return t.append(`${r}${
|
|
72
|
+
return t.append(`${r}${s[0]}`, p(c)), t.append(`${r}${s[1]}`, p(a)), t;
|
|
74
73
|
},
|
|
75
74
|
address: (e, t, r) => (t.append(
|
|
76
75
|
r,
|
|
77
76
|
JSON.stringify({
|
|
78
77
|
...e,
|
|
79
|
-
country:
|
|
78
|
+
country: h(e?.country)
|
|
80
79
|
})
|
|
81
80
|
), t),
|
|
82
|
-
documents: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(e).forEach((
|
|
81
|
+
documents: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(e).forEach((s) => t.append(r, s)), t),
|
|
83
82
|
document: (e, t, r) => (t.append(r, e), t),
|
|
84
|
-
stringArray: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), e.forEach((
|
|
85
|
-
},
|
|
83
|
+
stringArray: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), e.forEach((s) => t.append(r, p(s))), t)
|
|
84
|
+
}, H = async (e, t, r, s) => {
|
|
86
85
|
switch (e) {
|
|
87
|
-
case
|
|
88
|
-
return u.default(
|
|
89
|
-
case
|
|
90
|
-
return u.document(r, t,
|
|
91
|
-
case
|
|
92
|
-
return u.documents(r, t,
|
|
93
|
-
case
|
|
94
|
-
return u.default(
|
|
95
|
-
case
|
|
96
|
-
return u.address(r, t,
|
|
97
|
-
case
|
|
98
|
-
return u.price(r, t,
|
|
99
|
-
case
|
|
100
|
-
return u.default(F(r), t,
|
|
101
|
-
case
|
|
102
|
-
return u.stringArray(r, t,
|
|
86
|
+
case n.Country:
|
|
87
|
+
return u.default(h(r), t, s);
|
|
88
|
+
case n.Document:
|
|
89
|
+
return u.document(r, t, s);
|
|
90
|
+
case n.Documents:
|
|
91
|
+
return u.documents(r, t, s);
|
|
92
|
+
case n.Date:
|
|
93
|
+
return u.default(V(r), t, s);
|
|
94
|
+
case n.Address:
|
|
95
|
+
return u.address(r, t, s);
|
|
96
|
+
case n.Price:
|
|
97
|
+
return u.price(r, t, s);
|
|
98
|
+
case n.Password:
|
|
99
|
+
return u.default(F(r), t, s);
|
|
100
|
+
case n.StringArray:
|
|
101
|
+
return u.stringArray(r, t, s);
|
|
103
102
|
default:
|
|
104
|
-
return u.default(r, t,
|
|
103
|
+
return u.default(r, t, s);
|
|
105
104
|
}
|
|
106
|
-
},
|
|
105
|
+
}, I = async (e, t, r) => {
|
|
107
106
|
switch (r) {
|
|
108
107
|
case f.JSON:
|
|
109
|
-
let
|
|
108
|
+
let s = {};
|
|
110
109
|
for (const a in e)
|
|
111
|
-
|
|
110
|
+
s = await G(
|
|
112
111
|
t[a],
|
|
113
|
-
|
|
112
|
+
s,
|
|
114
113
|
e[a],
|
|
115
114
|
a
|
|
116
115
|
);
|
|
117
|
-
return
|
|
116
|
+
return s;
|
|
118
117
|
case f.FormData:
|
|
119
118
|
default:
|
|
120
119
|
let c = new FormData();
|
|
121
120
|
for (const a in e)
|
|
122
|
-
c = await
|
|
121
|
+
c = await H(
|
|
123
122
|
t[a],
|
|
124
123
|
c,
|
|
125
124
|
e[a],
|
|
@@ -128,7 +127,7 @@ const i = {
|
|
|
128
127
|
return c;
|
|
129
128
|
}
|
|
130
129
|
};
|
|
131
|
-
function
|
|
130
|
+
function K(e) {
|
|
132
131
|
const t = $(
|
|
133
132
|
{}
|
|
134
133
|
);
|
|
@@ -146,7 +145,7 @@ function G(e) {
|
|
|
146
145
|
};
|
|
147
146
|
return e.id && e.id.value && (o.id = e.id.value), {
|
|
148
147
|
isValid: !0,
|
|
149
|
-
form: await
|
|
148
|
+
form: await I(
|
|
150
149
|
o,
|
|
151
150
|
e.schema,
|
|
152
151
|
e.format ?? f.JSON
|
|
@@ -154,58 +153,56 @@ function G(e) {
|
|
|
154
153
|
};
|
|
155
154
|
} };
|
|
156
155
|
}
|
|
157
|
-
const
|
|
156
|
+
const X = /* @__PURE__ */ C({
|
|
158
157
|
name: "TForm",
|
|
159
158
|
__name: "Form",
|
|
160
159
|
props: {
|
|
161
160
|
id: { default: "" },
|
|
162
161
|
schema: { default: () => ({}) },
|
|
162
|
+
layout: { default: "horizontal" },
|
|
163
163
|
formStyle: { default: () => ({}) },
|
|
164
164
|
showSubmit: { type: Boolean, default: !1 },
|
|
165
|
-
submitLabel: { default: "Submit" },
|
|
166
165
|
buttonProps: {},
|
|
167
|
-
buttonVariant: { default: M.PRIMARY },
|
|
168
166
|
submissionFormat: { default: f.FormData },
|
|
169
167
|
buttonWrapperClasses: { default: "" }
|
|
170
168
|
},
|
|
171
169
|
emits: ["submit", "change"],
|
|
172
170
|
setup(e, { expose: t, emit: r }) {
|
|
173
|
-
const
|
|
174
|
-
id:
|
|
175
|
-
schema:
|
|
176
|
-
format:
|
|
177
|
-
}),
|
|
178
|
-
const l = await
|
|
171
|
+
const s = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: y, submit: g } = K({
|
|
172
|
+
id: N(() => s.id),
|
|
173
|
+
schema: s.schema,
|
|
174
|
+
format: s.submissionFormat
|
|
175
|
+
}), w = async () => {
|
|
176
|
+
const l = await g();
|
|
179
177
|
return c("submit", l), l;
|
|
180
178
|
};
|
|
181
|
-
return
|
|
179
|
+
return A(m, (l) => {
|
|
182
180
|
c("change", l);
|
|
183
|
-
}),
|
|
184
|
-
submit:
|
|
185
|
-
reset:
|
|
181
|
+
}), O("formStyle", { ...s.formStyle, layout: s.layout }), t({
|
|
182
|
+
submit: w,
|
|
183
|
+
reset: y,
|
|
186
184
|
setValues: b,
|
|
187
185
|
form: m,
|
|
188
186
|
setValue: d,
|
|
189
187
|
getValue: o
|
|
190
|
-
}), (l,
|
|
191
|
-
const
|
|
192
|
-
return
|
|
193
|
-
onSubmit:
|
|
188
|
+
}), (l, L) => {
|
|
189
|
+
const D = P("t-button");
|
|
190
|
+
return J(), E("form", {
|
|
191
|
+
onSubmit: w,
|
|
194
192
|
ref_key: "formReference",
|
|
195
193
|
ref: a
|
|
196
194
|
}, [
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class:
|
|
195
|
+
B(l.$slots, "default", { form: T(m) }),
|
|
196
|
+
W("div", {
|
|
197
|
+
class: j([s.buttonWrapperClasses])
|
|
200
198
|
}, [
|
|
201
|
-
|
|
199
|
+
z(R(D, q({
|
|
202
200
|
type: "submit",
|
|
203
201
|
class: "mt-4",
|
|
204
|
-
variant:
|
|
205
|
-
label:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
[I, n.showSubmit]
|
|
202
|
+
variant: "primary",
|
|
203
|
+
label: "Submit"
|
|
204
|
+
}, s.buttonProps, { onClick: w }), null, 16), [
|
|
205
|
+
[x, s.showSubmit]
|
|
209
206
|
])
|
|
210
207
|
], 2)
|
|
211
208
|
], 544);
|
|
@@ -213,5 +210,5 @@ const Z = /* @__PURE__ */ C({
|
|
|
213
210
|
}
|
|
214
211
|
});
|
|
215
212
|
export {
|
|
216
|
-
|
|
213
|
+
X as _
|
|
217
214
|
};
|
package/dist/FormItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r } from "./FormItem.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as t } from "./plugin-
|
|
1
|
+
import { _ as r } from "./FormItem.vue_vue_type_script_setup_true_lang-D7a8YCgS.js";
|
|
2
|
+
import { p as t } from "./plugin-CvohbpUQ.js";
|
|
3
3
|
export {
|
|
4
4
|
r as FormItem,
|
|
5
5
|
t as FormItemPlugin
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as x, useSlots as b, inject as g, computed as a, resolveComponent as z, openBlock as s, createElementBlock as n, createElementVNode as u, normalizeClass as i, createVNode as C, unref as p, withCtx as S, renderSlot as f, Fragment as k, renderList as F, toDisplayString as I, createCommentVNode as N } from "vue";
|
|
2
|
+
const V = { class: "w-full" }, w = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "float-right"
|
|
5
|
+
}, M = /* @__PURE__ */ x({
|
|
6
|
+
name: "TFormItem",
|
|
7
|
+
__name: "FormItem",
|
|
8
|
+
props: {
|
|
9
|
+
label: {},
|
|
10
|
+
rules: {},
|
|
11
|
+
layout: {}
|
|
12
|
+
},
|
|
13
|
+
setup(d) {
|
|
14
|
+
const l = d, o = b(), c = [], t = g("formStyle", {
|
|
15
|
+
label: "",
|
|
16
|
+
input: "",
|
|
17
|
+
layout: "horizontal"
|
|
18
|
+
}), y = a(() => {
|
|
19
|
+
if (!o || !o.default)
|
|
20
|
+
return !1;
|
|
21
|
+
const e = o?.default();
|
|
22
|
+
return e ? e[0].type.name : !1;
|
|
23
|
+
}), m = a(() => y.value === "TInputMultiplier"), r = a(() => l.layout ? l.layout : t.layout ? t.layout : "horizontal");
|
|
24
|
+
return (e, B) => {
|
|
25
|
+
const _ = z("t-graphy-label");
|
|
26
|
+
return s(), n("div", V, [
|
|
27
|
+
u("div", {
|
|
28
|
+
class: i(["flex gap-2 my-5", {
|
|
29
|
+
"flex-col": r.value === "vertical",
|
|
30
|
+
"items-center": r.value === "horizontal" && !m.value,
|
|
31
|
+
"items-start": m.value
|
|
32
|
+
}])
|
|
33
|
+
}, [
|
|
34
|
+
C(_, {
|
|
35
|
+
text: l.label,
|
|
36
|
+
class: i({
|
|
37
|
+
[p(t).label]: !0,
|
|
38
|
+
"text-right": r.value === "horizontal"
|
|
39
|
+
})
|
|
40
|
+
}, {
|
|
41
|
+
default: S(() => [
|
|
42
|
+
f(e.$slots, "label")
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
}, 8, ["text", "class"]),
|
|
46
|
+
u("div", {
|
|
47
|
+
class: i({ [p(t).input]: !0 })
|
|
48
|
+
}, [
|
|
49
|
+
f(e.$slots, "default")
|
|
50
|
+
], 2)
|
|
51
|
+
], 2),
|
|
52
|
+
c ? (s(), n("div", w, [
|
|
53
|
+
(s(), n(k, null, F(c, (h, v) => u("span", {
|
|
54
|
+
class: "text-sm text-red-600",
|
|
55
|
+
key: v
|
|
56
|
+
}, I(h), 1)), 64))
|
|
57
|
+
])) : N("", !0)
|
|
58
|
+
]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
M as _
|
|
64
|
+
};
|
package/dist/InputCheckbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { p as t } from "./plugin-
|
|
1
|
+
import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
|
|
2
|
+
import { p as t } from "./plugin-DPCk5fFS.js";
|
|
3
3
|
export {
|
|
4
4
|
e as InputCheckbox,
|
|
5
5
|
t as InputCheckboxPlugin
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import './InputCheckbox.css';
|
|
2
|
+
import { defineComponent as u, ref as c, watch as m, openBlock as f, createElementBlock as b, withDirectives as h, createElementVNode as o, mergeProps as v, vModelCheckbox as k, toDisplayString as y } from "vue";
|
|
3
|
+
const x = { class: "h-9 inline-flex items-center" }, _ = ["indeterminate", "disabled"];
|
|
4
|
+
let B = 0;
|
|
5
|
+
const V = /* @__PURE__ */ u({
|
|
6
|
+
name: "TInputCheckbox",
|
|
7
|
+
__name: "InputCheckbox",
|
|
8
|
+
props: {
|
|
9
|
+
label: { default: "" },
|
|
10
|
+
disabled: { type: Boolean, default: !1 },
|
|
11
|
+
modelValue: { type: Boolean },
|
|
12
|
+
isIndeterminate: { type: Boolean, default: !1 },
|
|
13
|
+
initializeValue: { type: Boolean, default: !1 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:model-value", "input"],
|
|
16
|
+
setup(r, { emit: d }) {
|
|
17
|
+
const t = r, i = d, l = `checkbox_${++B}`, a = c(!1), s = () => {
|
|
18
|
+
const e = !a.value;
|
|
19
|
+
i("update:model-value", e), i("input", e);
|
|
20
|
+
};
|
|
21
|
+
return m(
|
|
22
|
+
() => t.modelValue,
|
|
23
|
+
(e) => {
|
|
24
|
+
t.initializeValue && typeof e > "u" && i("update:model-value", !1), a.value = e;
|
|
25
|
+
},
|
|
26
|
+
{ immediate: !0 }
|
|
27
|
+
), (e, n) => (f(), b("div", x, [
|
|
28
|
+
h(o("input", v({
|
|
29
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.value = p)
|
|
30
|
+
}, e.$attrs, {
|
|
31
|
+
type: "checkbox",
|
|
32
|
+
class: "form-checkbox w-5 h-5 border input-border input-roundness color-caipira-primary-inverted bg-caipira-primary checked:bg-caipira-primary-inverted input-outline",
|
|
33
|
+
indeterminate: t.isIndeterminate,
|
|
34
|
+
id: l,
|
|
35
|
+
disabled: e.disabled,
|
|
36
|
+
onInput: s
|
|
37
|
+
}), null, 16, _), [
|
|
38
|
+
[k, a.value]
|
|
39
|
+
]),
|
|
40
|
+
o("label", {
|
|
41
|
+
class: "cursor-pointer pl-2 mr-3 input-label",
|
|
42
|
+
for: l
|
|
43
|
+
}, y(t.label), 1)
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
V as _
|
|
49
|
+
};
|
package/dist/InputMultiplier.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as t } from "./InputMultiplier.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as l } from "./plugin-
|
|
1
|
+
import { _ as t } from "./InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js";
|
|
2
|
+
import { p as l } from "./plugin-Br-QOjhk.js";
|
|
3
3
|
export {
|
|
4
4
|
t as InputMultiplier,
|
|
5
5
|
l as InputMultiplierPlugin
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const M = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as f, ref as V, watch as r, resolveComponent as k, openBlock as o, createElementBlock as a, createVNode as m, Fragment as C, renderList as y, createBlock as I, resolveDynamicComponent as b, mergeProps as h, toHandlers as B } from "vue";
|
|
2
|
+
const M = /* @__PURE__ */ f({
|
|
3
3
|
name: "TInputMultiplier",
|
|
4
4
|
__name: "InputMultiplier",
|
|
5
5
|
props: {
|
|
6
6
|
component: { default: "t-input-text" },
|
|
7
7
|
inputProps: { default: () => ({}) },
|
|
8
|
-
label: { default: "" },
|
|
9
8
|
listeners: { default: () => ({}) },
|
|
10
9
|
modelValue: {}
|
|
11
10
|
},
|
|
@@ -15,7 +14,7 @@ const M = /* @__PURE__ */ _({
|
|
|
15
14
|
t.value.push("");
|
|
16
15
|
}, v = (e) => {
|
|
17
16
|
t.value = e;
|
|
18
|
-
},
|
|
17
|
+
}, _ = (e) => {
|
|
19
18
|
t.value.splice(e, 1);
|
|
20
19
|
};
|
|
21
20
|
return r(
|
|
@@ -45,7 +44,7 @@ const M = /* @__PURE__ */ _({
|
|
|
45
44
|
key: n,
|
|
46
45
|
class: "flex items-center justify-start mt-2"
|
|
47
46
|
}, [
|
|
48
|
-
(o(), b(
|
|
47
|
+
(o(), I(b(l.component), h(l.inputProps, B(l.listeners), {
|
|
49
48
|
modelValue: t.value[n],
|
|
50
49
|
"onUpdate:modelValue": (s) => t.value[n] = s,
|
|
51
50
|
class: "my-1"
|
|
@@ -54,7 +53,7 @@ const M = /* @__PURE__ */ _({
|
|
|
54
53
|
variant: "transparent",
|
|
55
54
|
icon: "close",
|
|
56
55
|
class: "ml-0.5",
|
|
57
|
-
onClick: (s) =>
|
|
56
|
+
onClick: (s) => _(n)
|
|
58
57
|
}, null, 8, ["onClick"])
|
|
59
58
|
]))), 128))
|
|
60
59
|
]);
|
package/dist/InputPassword.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-BghMiF8B.js";
|
|
2
|
+
import { p as a } from "./plugin-BT2ef1QG.js";
|
|
3
3
|
export {
|
|
4
4
|
s as InputPassword,
|
|
5
5
|
a as InputPasswordPlugin
|
|
@@ -79,7 +79,7 @@ const ue = (o = 18) => {
|
|
|
79
79
|
}, p = () => {
|
|
80
80
|
c.value && c.value.$el && c.value.$el.focus();
|
|
81
81
|
}, C = async () => {
|
|
82
|
-
l.value.raw = $.generatePassword();
|
|
82
|
+
l.value.raw = $.generatePassword(), r("generate", l.value);
|
|
83
83
|
};
|
|
84
84
|
return le(() => l.value.raw, b, { immediate: !0 }), e({ focus: p }), (v, s) => {
|
|
85
85
|
const m = V("t-button"), M = V("t-input-text"), A = V("t-progress-line");
|