@caipira/tamandua 0.0.44 → 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.
Files changed (69) hide show
  1. package/dist/{Button-DxCwFAWy.js → Button-DusGbcIs.js} +10 -10
  2. package/dist/Button.css +1 -1
  3. package/dist/Button.js +2 -2
  4. package/dist/Drawer-CKfQZ6rv.js +74 -0
  5. package/dist/Drawer.css +1 -1
  6. package/dist/Drawer.js +2 -2
  7. package/dist/Form.js +2 -2
  8. 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
  9. package/dist/FormItem.js +2 -2
  10. package/dist/FormItem.vue_vue_type_script_setup_true_lang-D7a8YCgS.js +64 -0
  11. package/dist/GraphySubtitle.js +2 -2
  12. package/dist/GraphySubtitle.vue_vue_type_script_setup_true_lang-DsBHn2gS.js +18 -0
  13. package/dist/InputCheckbox.js +2 -2
  14. package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js +49 -0
  15. package/dist/InputMultiplier.js +2 -2
  16. package/dist/{InputMultiplier.vue_vue_type_script_setup_true_lang-BFDBZk2M.js → InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js} +5 -6
  17. package/dist/InputPassword.js +2 -2
  18. 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
  19. package/dist/InputRadio.js +2 -2
  20. package/dist/InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js +35 -0
  21. package/dist/InputSwitch.js +2 -2
  22. 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
  23. package/dist/InputText.js +2 -2
  24. package/dist/InputText.vue_vue_type_script_setup_true_lang-JLAlUE_2.js +38 -0
  25. package/dist/Link.js +2 -2
  26. package/dist/{Link.vue_vue_type_script_setup_true_lang-DBYJfl5l.js → Link.vue_vue_type_script_setup_true_lang-gTf77Jvd.js} +10 -10
  27. package/dist/Modal.js +2 -2
  28. 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
  29. package/dist/components.js +13 -13
  30. package/dist/{plugin-BN2jubTY.js → plugin-BT2ef1QG.js} +1 -1
  31. package/dist/{plugin-CrUFQdOK.js → plugin-BV0OSVIw.js} +1 -1
  32. package/dist/{plugin-DT7LVAli.js → plugin-BZOU6h10.js} +1 -1
  33. package/dist/{plugin-WcNmSb_y.js → plugin-Br-QOjhk.js} +1 -1
  34. package/dist/{plugin-BjXXC0b-.js → plugin-CvohbpUQ.js} +1 -1
  35. package/dist/{plugin-DQ6digu2.js → plugin-DH3hMjgo.js} +1 -1
  36. package/dist/{plugin-BDFttGl1.js → plugin-DHstqRmE.js} +1 -1
  37. package/dist/{plugin-GUvrG7aO.js → plugin-DKjcKBPg.js} +1 -1
  38. package/dist/{plugin-Dz7BPW4D.js → plugin-DPCk5fFS.js} +1 -1
  39. package/dist/{plugin-uMlQixCx.js → plugin-DcQ8tvKe.js} +1 -1
  40. package/dist/{plugin-DN54VuID.js → plugin-F3dxY_wr.js} +1 -1
  41. package/dist/{plugin-D6dx276z.js → plugin-Y4yYnlO3.js} +1 -1
  42. package/dist/{plugin-DDUNw6fL.js → plugin-lYDlOt8p.js} +1 -1
  43. package/dist/{plugins-Dwz7OLJO.js → plugins-8zKsGUYL.js} +19 -19
  44. package/dist/plugins.js +19 -19
  45. package/dist/tamandua.js +1 -1
  46. package/dist/types/components/Drawer/Drawer.story.d.ts +31 -0
  47. package/dist/types/components/Dropdown/Dropdown.vue.d.ts +97 -0
  48. package/dist/types/components/Dropdown/types.d.ts +2 -3
  49. package/dist/types/components/Form/{form.story.d.ts → Form.story.d.ts} +7 -1
  50. package/dist/types/components/Form/Form.vue.d.ts +6 -19
  51. package/dist/types/components/Form/types.d.ts +3 -5
  52. package/dist/types/components/FormItem/FormItem.vue.d.ts +2 -16
  53. package/dist/types/components/FormItem/types.d.ts +3 -1
  54. package/dist/types/components/InputAvatar/InputAvatar.vue.d.ts +1 -1
  55. package/dist/types/components/InputCheckbox/InputCheckbox.vue.d.ts +3 -0
  56. package/dist/types/components/InputCheckbox/types.d.ts +1 -0
  57. package/dist/types/components/InputMultiplier/InputMultiplier.vue.d.ts +0 -3
  58. package/dist/types/components/InputMultiplier/types.d.ts +0 -1
  59. package/dist/types/components/Popconfirm/Popconfirm.vue.d.ts +1 -1
  60. package/dist/types/components/Popover/Popover.vue.d.ts +9 -9
  61. package/package.json +1 -1
  62. package/dist/Drawer-KwhQs5WA.js +0 -74
  63. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CV7IVjE4.js +0 -84
  64. package/dist/GraphySubtitle.vue_vue_type_script_setup_true_lang-DtAmgZWp.js +0 -18
  65. package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-BONJ9l1D.js +0 -40
  66. package/dist/InputRadio.vue_vue_type_style_index_0_lang-IqPZ9Qzl.js +0 -35
  67. package/dist/InputText.vue_vue_type_script_setup_true_lang-D4nIMRiz.js +0 -39
  68. /package/dist/types/components/InputCheckbox/{input-checkbox.story.d.ts → Input-checkbox.story.d.ts} +0 -0
  69. /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 p, 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";
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 = p(() => {
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 = p(() => e.type === i.SUBMIT ? e.label : void 0), w = p(() => {
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 c = l.target.files;
59
- !c || !c.length || E("upload", c);
60
- }, N = p(() => {
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 = p(() => !!e.label || !!T.default);
75
+ }), n = c(() => !!e.label || !!T.default);
76
76
  return S({ iconReference: u }), (l, o) => {
77
- const c = A("t-icon");
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(c, F({
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-0b2ecce0"]]);
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-0b2ecce0]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
1
+ .transparent-hover[data-v-be1344fe]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
package/dist/Button.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as r } from "./Button-DxCwFAWy.js";
2
- import { p } from "./plugin-DQ6digu2.js";
1
+ import { B as r } from "./Button-DusGbcIs.js";
2
+ import { p } from "./plugin-DH3hMjgo.js";
3
3
  export {
4
4
  r as Button,
5
5
  p as ButtonPlugin
@@ -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-4b55ad69]{box-shadow:#0003 0 8px 10px -5px,#00000024 0 16px 24px 2px,#0000001f 0 6px 30px 5px}
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
@@ -1,5 +1,5 @@
1
- import { D as e } from "./Drawer-KwhQs5WA.js";
2
- import { p } from "./plugin-CrUFQdOK.js";
1
+ import { D as e } from "./Drawer-CKfQZ6rv.js";
2
+ import { p } from "./plugin-BV0OSVIw.js";
3
3
  export {
4
4
  e as Drawer,
5
5
  p as DrawerPlugin
package/dist/Form.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-CaCu47jH.js";
2
- import { p as a } from "./plugin-uMlQixCx.js";
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 A, watch as N, provide as P, resolveComponent as O, openBlock as B, createElementBlock as J, renderSlot as E, unref as R, createElementVNode as T, normalizeClass as W, withDirectives as j, createVNode as z, mergeProps as L, vShow as I } from "vue";
2
- import { B as M } from "./ui-BC6H9E93.js";
3
- import { F as s, a as f } from "./form-BkXpIJ0e.js";
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, n = ["Currency", "Value"]) => {
6
+ price: (e, t, r, s = ["Currency", "Value"]) => {
8
7
  const [c, a] = S(e);
9
- return t[`${r}${n[0]}`] = c, t[`${r}${n[1]}`] = a, t;
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
- }, Y = async (e, t, r, n) => {
11
+ }, G = async (e, t, r, s) => {
13
12
  switch (e) {
14
- case s.Address:
13
+ case n.Address:
15
14
  return i.default(
16
15
  r,
17
16
  t,
18
- n
17
+ s
19
18
  );
20
- case s.Boolean:
19
+ case n.Boolean:
21
20
  return i.default(
22
21
  r,
23
22
  t,
24
- n
23
+ s
25
24
  );
26
- case s.Country:
25
+ case n.Country:
27
26
  return i.default(
28
- w(r),
27
+ h(r),
29
28
  t,
30
- n
29
+ s
31
30
  );
32
- case s.Date:
31
+ case n.Date:
33
32
  return i.default(
34
- h(r),
33
+ V(r),
35
34
  t,
36
- n
35
+ s
37
36
  );
38
- case s.Document:
39
- case s.Documents:
37
+ case n.Document:
38
+ case n.Documents:
40
39
  throw new Error("Cannot append files to JSON!");
41
- case s.Price:
40
+ case n.Price:
42
41
  return i.price(
43
42
  r,
44
43
  t,
45
- n
44
+ s
46
45
  );
47
- case s.Password:
46
+ case n.Password:
48
47
  return await i.password(
49
48
  r,
50
49
  t,
51
- n
50
+ s
52
51
  );
53
- case s.StringArray:
52
+ case n.StringArray:
54
53
  return i.default(
55
54
  r,
56
55
  t,
57
- n
56
+ s
58
57
  );
59
58
  default:
60
59
  return i.default(
61
60
  r,
62
61
  t,
63
- n
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 n = p(e);
69
- return e && t.append(r, n), t;
67
+ const s = p(e);
68
+ return e && t.append(r, s), t;
70
69
  },
71
- price: (e, t, r, n = ["Currency", "Value"]) => {
70
+ price: (e, t, r, s = ["Currency", "Value"]) => {
72
71
  const [c, a] = S(e);
73
- return t.append(`${r}${n[0]}`, p(c)), t.append(`${r}${n[1]}`, p(a)), t;
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: w(e?.country)
78
+ country: h(e?.country)
80
79
  })
81
80
  ), t),
82
- documents: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(e).forEach((n) => t.append(r, n)), t),
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((n) => t.append(r, p(n))), t)
85
- }, q = async (e, t, r, n) => {
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 s.Country:
88
- return u.default(w(r), t, n);
89
- case s.Document:
90
- return u.document(r, t, n);
91
- case s.Documents:
92
- return u.documents(r, t, n);
93
- case s.Date:
94
- return u.default(h(r), t, n);
95
- case s.Address:
96
- return u.address(r, t, n);
97
- case s.Price:
98
- return u.price(r, t, n);
99
- case s.Password:
100
- return u.default(F(r), t, n);
101
- case s.StringArray:
102
- return u.stringArray(r, t, n);
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, n);
103
+ return u.default(r, t, s);
105
104
  }
106
- }, x = async (e, t, r) => {
105
+ }, I = async (e, t, r) => {
107
106
  switch (r) {
108
107
  case f.JSON:
109
- let n = {};
108
+ let s = {};
110
109
  for (const a in e)
111
- n = await Y(
110
+ s = await G(
112
111
  t[a],
113
- n,
112
+ s,
114
113
  e[a],
115
114
  a
116
115
  );
117
- return n;
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 q(
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 G(e) {
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 x(
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 Z = /* @__PURE__ */ C({
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 n = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: g, submit: D } = G({
174
- id: A(() => n.id),
175
- schema: n.schema,
176
- format: n.submissionFormat
177
- }), V = async () => {
178
- const l = await D();
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 N(m, (l) => {
179
+ return A(m, (l) => {
182
180
  c("change", l);
183
- }), P("formStyle", n.formStyle), t({
184
- submit: V,
185
- reset: g,
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, H) => {
191
- const y = O("t-button");
192
- return B(), J("form", {
193
- onSubmit: V,
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
- E(l.$slots, "default", { form: R(m) }),
198
- T("div", {
199
- class: W([n.buttonWrapperClasses])
195
+ B(l.$slots, "default", { form: T(m) }),
196
+ W("div", {
197
+ class: j([s.buttonWrapperClasses])
200
198
  }, [
201
- j(z(y, L(n.buttonProps, {
199
+ z(R(D, q({
202
200
  type: "submit",
203
201
  class: "mt-4",
204
- variant: n.buttonVariant,
205
- label: n.submitLabel,
206
- onClick: V
207
- }), null, 16, ["variant", "label"]), [
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
- Z as _
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-CV7IVjE4.js";
2
- import { p as t } from "./plugin-BjXXC0b-.js";
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
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./GraphySubtitle.vue_vue_type_script_setup_true_lang-DtAmgZWp.js";
2
- import { p as e } from "./plugin-DN54VuID.js";
1
+ import { _ as p } from "./GraphySubtitle.vue_vue_type_script_setup_true_lang-DsBHn2gS.js";
2
+ import { p as e } from "./plugin-F3dxY_wr.js";
3
3
  export {
4
4
  p as GraphySubtitle,
5
5
  e as GraphySubtitlePlugin
@@ -0,0 +1,18 @@
1
+ import { defineComponent as r, openBlock as n, createElementBlock as a, normalizeClass as l, toDisplayString as p } from "vue";
2
+ const i = /* @__PURE__ */ r({
3
+ name: "TGraphySubtitle",
4
+ __name: "GraphySubtitle",
5
+ props: {
6
+ text: {},
7
+ textColor: { default: "color-text" }
8
+ },
9
+ setup(t) {
10
+ const e = t;
11
+ return (o, c) => (n(), a("h2", {
12
+ class: l(["color-caipira-primary-inverted text-2xl select-none", [o.textColor]])
13
+ }, p(e.text), 3));
14
+ }
15
+ });
16
+ export {
17
+ i as _
18
+ };
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-BONJ9l1D.js";
2
- import { p as t } from "./plugin-Dz7BPW4D.js";
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
+ };
@@ -1,5 +1,5 @@
1
- import { _ as t } from "./InputMultiplier.vue_vue_type_script_setup_true_lang-BFDBZk2M.js";
2
- import { p as l } from "./plugin-WcNmSb_y.js";
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