@caipira/tamandua 0.0.91 → 0.0.93

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 (85) hide show
  1. package/dist/Avatar.js +2 -2
  2. package/dist/{Avatar.vue_vue_type_script_setup_true_lang-CAxLKAlD.js → Avatar.vue_vue_type_script_setup_true_lang-CnvI4bGL.js} +1 -1
  3. package/dist/Button.js +2 -2
  4. package/dist/{Button.vue_vue_type_script_setup_true_lang-Cr2j9uAI.js → Button.vue_vue_type_script_setup_true_lang-CmbPvjSg.js} +36 -34
  5. package/dist/Dropdown.js +2 -2
  6. package/dist/Dropdown.vue_vue_type_script_setup_true_lang-DtTBnNsn.js +179 -0
  7. package/dist/Form.js +2 -2
  8. package/dist/{Form.vue_vue_type_script_setup_true_lang-s3wmU1NZ.js → Form.vue_vue_type_script_setup_true_lang-Bd8NlDpG.js} +33 -27
  9. package/dist/FormItem.js +2 -2
  10. package/dist/FormItem.vue_vue_type_script_setup_true_lang-3M-bOZ8R.js +74 -0
  11. package/dist/GraphyPrice.js +2 -2
  12. package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-Dxw3dcsW.js → GraphyPrice.vue_vue_type_script_setup_true_lang-Cr4zjIiS.js} +1 -1
  13. package/dist/Icon.js +2 -2
  14. package/dist/{Icon.vue_vue_type_script_setup_true_lang-DeZj2CXU.js → Icon.vue_vue_type_script_setup_true_lang-BuMQjBAy.js} +1 -1
  15. package/dist/InputCheckbox.js +2 -2
  16. package/dist/{InputCheckbox.vue_vue_type_style_index_0_lang-DqRzwkVN.js → InputCheckbox.vue_vue_type_style_index_0_lang-XU9rYa47.js} +14 -14
  17. package/dist/InputMultiplier.js +2 -2
  18. package/dist/InputMultiplier.vue_vue_type_script_setup_true_lang-C7tInheA.js +71 -0
  19. package/dist/InputPassword.js +2 -2
  20. package/dist/{InputPassword.vue_vue_type_script_setup_true_lang-CYcJ-agy.js → InputPassword.vue_vue_type_script_setup_true_lang-Qeq0BBp3.js} +18 -17
  21. package/dist/InputRadio.js +2 -2
  22. package/dist/InputRadio.vue_vue_type_style_index_0_lang-DG-7xEeZ.js +35 -0
  23. package/dist/InputSelect.js +2 -2
  24. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-uUjFwWIE.js +243 -0
  25. package/dist/InputText.js +2 -2
  26. package/dist/InputText.vue_vue_type_script_setup_true_lang-twigJ_WD.js +43 -0
  27. package/dist/Link.js +2 -2
  28. package/dist/{Link.vue_vue_type_script_setup_true_lang-CwkZkVVz.js → Link.vue_vue_type_script_setup_true_lang-0z-EeE3p.js} +1 -1
  29. package/dist/Popconfirm.js +2 -2
  30. package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-BIZGp2xy.js → Popconfirm.vue_vue_type_script_setup_true_lang-BDEqMoax.js} +1 -1
  31. package/dist/{Popover-7oD7AiXt.js → Popover-C3ovolxY.js} +1 -1
  32. package/dist/Popover.js +2 -2
  33. package/dist/Tag.js +2 -2
  34. package/dist/{Tag.vue_vue_type_script_setup_true_lang-CmhP0b0y.js → Tag.vue_vue_type_script_setup_true_lang-G3i5m3sB.js} +1 -1
  35. package/dist/Toast.js +2 -2
  36. package/dist/{Toast.vue_vue_type_script_setup_true_lang-By7Au8E3.js → Toast.vue_vue_type_script_setup_true_lang-BlfCFBHV.js} +1 -1
  37. package/dist/components.js +18 -18
  38. package/dist/enums.js +1 -1
  39. package/dist/{plugin-CLzytwhj.js → plugin-B2DiDUlP.js} +1 -1
  40. package/dist/{plugin-DXPEO1fb.js → plugin-B578b4C_.js} +1 -1
  41. package/dist/{plugin-DIj5ypE6.js → plugin-BemLz7kA.js} +1 -1
  42. package/dist/{plugin-s4eLZhyy.js → plugin-Bij2CJr7.js} +1 -1
  43. package/dist/{plugin-AGrPuw2y.js → plugin-BviXQKyF.js} +1 -1
  44. package/dist/{plugin-NrO_mAYp.js → plugin-CDu6of44.js} +1 -1
  45. package/dist/{plugin-lYDlOt8p.js → plugin-CQXEZDaa.js} +1 -1
  46. package/dist/{plugin-BUBXUbq8.js → plugin-CdZkyAp1.js} +1 -1
  47. package/dist/{plugin-D-WO1cMl.js → plugin-CnSU08rb.js} +1 -1
  48. package/dist/{plugin-b9_KKf-9.js → plugin-DArlmex8.js} +1 -1
  49. package/dist/{plugin-CzRCyET3.js → plugin-DKMiwQmN.js} +1 -1
  50. package/dist/{plugin-CBUyNiTn.js → plugin-DX5ICUyA.js} +1 -1
  51. package/dist/{plugin-B8k-Q9lw.js → plugin-DhHWk6sK.js} +1 -1
  52. package/dist/{plugin-BwA1VXdD.js → plugin-Dja0bljQ.js} +1 -1
  53. package/dist/{plugin-UbK5d4SN.js → plugin-ZJybqwxT.js} +1 -1
  54. package/dist/{plugin-Br-QOjhk.js → plugin-fh29h6vq.js} +1 -1
  55. package/dist/{plugin-CEsqY6D6.js → plugin-hAKUUhA-.js} +1 -1
  56. package/dist/{plugin-B7BtMlal.js → plugin-i0cgy8R3.js} +1 -1
  57. package/dist/{plugins-ilcR1VlL.js → plugins-Cf2JwB3G.js} +39 -36
  58. package/dist/plugins.js +103 -100
  59. package/dist/tamandua.js +1 -1
  60. package/dist/types/components/Button/Button.vue.d.ts +5 -5
  61. package/dist/types/components/Dropdown/Dropdown.vue.d.ts +4 -0
  62. package/dist/types/components/Dropdown/types.d.ts +2 -0
  63. package/dist/types/components/Form/types.d.ts +2 -0
  64. package/dist/types/components/FormItem/types.d.ts +0 -3
  65. package/dist/types/components/Icon/Icon.vue.d.ts +1 -1
  66. package/dist/types/components/Icon/types.d.ts +1 -1
  67. package/dist/types/components/InputMultiplier/InputMultiplier.vue.d.ts +4 -0
  68. package/dist/types/components/InputMultiplier/input-multiplier.story.d.ts +7 -0
  69. package/dist/types/components/InputMultiplier/types.d.ts +2 -0
  70. package/dist/types/components/InputSelect/InputSelect.story.d.ts +8 -0
  71. package/dist/types/components/InputSelect/InputSelect.vue.d.ts +6 -6
  72. package/dist/types/components/InputSelect/types.d.ts +2 -2
  73. package/dist/types/components/InputText/InputText.story.d.ts +22 -0
  74. package/dist/types/components/InputText/InputText.vue.d.ts +11 -0
  75. package/dist/types/components/InputText/types.d.ts +3 -0
  76. package/dist/types/enums/ui.d.ts +4 -0
  77. package/dist/ui-D5oXHNg_.js +14 -0
  78. package/package.json +1 -1
  79. package/dist/Dropdown.vue_vue_type_script_setup_true_lang-MuajPvzR.js +0 -156
  80. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CInvGeMR.js +0 -71
  81. package/dist/InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js +0 -65
  82. package/dist/InputRadio.vue_vue_type_style_index_0_lang-DlTO78_z.js +0 -35
  83. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BRqdwhz4.js +0 -232
  84. package/dist/InputText.vue_vue_type_script_setup_true_lang-JLAlUE_2.js +0 -38
  85. package/dist/ui-CzOLy35H.js +0 -13
package/dist/Avatar.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-CAxLKAlD.js";
2
- import { p } from "./plugin-UbK5d4SN.js";
1
+ import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-CnvI4bGL.js";
2
+ import { p } from "./plugin-ZJybqwxT.js";
3
3
  export {
4
4
  o as Avatar,
5
5
  p as AvatarPlugin
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as f, computed as c, resolveComponent as x, openBlock as a, createElementBlock as o, normalizeClass as u, unref as t, createBlock as h, toDisplayString as z, createCommentVNode as _ } from "vue";
2
- import { E as r, b as l } from "./ui-CzOLy35H.js";
2
+ import { E as r, b as l } from "./ui-D5oXHNg_.js";
3
3
  const g = ["role"], v = ["src"], w = /* @__PURE__ */ f({
4
4
  name: "TAvatar",
5
5
  __name: "Avatar",
package/dist/Button.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as r } from "./Button.vue_vue_type_script_setup_true_lang-Cr2j9uAI.js";
2
- import { p } from "./plugin-s4eLZhyy.js";
1
+ import { _ as r } from "./Button.vue_vue_type_script_setup_true_lang-CmbPvjSg.js";
2
+ import { p } from "./plugin-Bij2CJr7.js";
3
3
  export {
4
4
  r as Button,
5
5
  p as ButtonPlugin
@@ -1,7 +1,7 @@
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, E as i, c as t, B as r } from "./ui-CzOLy35H.js";
1
+ import { defineComponent as I, ref as y, computed as s, resolveComponent as A, openBlock as c, createBlock as d, resolveDynamicComponent as z, normalizeClass as P, unref as r, withCtx as U, mergeProps as b, createCommentVNode as u, renderSlot as _, createElementBlock as h, Fragment as D, createTextVNode as k, toDisplayString as L } from "vue";
2
+ import { b as f, E as i, c as t, B as a } from "./ui-D5oXHNg_.js";
3
3
  import { g } from "./index-CVD_wAsU.js";
4
- import "./Icon.vue_vue_type_script_setup_true_lang-DeZj2CXU.js";
4
+ import "./Icon.vue_vue_type_script_setup_true_lang-BuMQjBAy.js";
5
5
  const F = ["multiple"], V = /* @__PURE__ */ I({
6
6
  name: "TButton",
7
7
  __name: "Button",
@@ -19,7 +19,7 @@ const F = ["multiple"], V = /* @__PURE__ */ I({
19
19
  shape: { default: f.Rounded },
20
20
  size: { default: i.Default },
21
21
  type: { default: t.BUTTON },
22
- variant: { default: r.DEFAULT }
22
+ variant: { default: a.DEFAULT }
23
23
  },
24
24
  emits: ["upload"],
25
25
  setup(S, { expose: E, emit: T }) {
@@ -58,6 +58,8 @@ const F = ["multiple"], V = /* @__PURE__ */ I({
58
58
  const l = o.target.files;
59
59
  !l || !l.length || x("upload", l);
60
60
  }, v = s(() => {
61
+ if (e.iconProps && e.iconProps.size)
62
+ return e.iconProps.size;
61
63
  switch (e.size) {
62
64
  case i.ExtraSmall:
63
65
  return 12;
@@ -75,57 +77,57 @@ const F = ["multiple"], V = /* @__PURE__ */ I({
75
77
  });
76
78
  return E({ iconReference: p }), (o, n) => {
77
79
  const l = A("t-icon");
78
- return c(), d(U(w.value), {
80
+ return c(), d(z(w.value), {
79
81
  type: B.value,
80
82
  value: R.value,
81
83
  disabled: e.disabled,
82
- class: _([{
84
+ class: P([{
83
85
  // 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,
86
+ "text-xs px-1 h-4": e.size === r(i).ExtraSmall,
87
+ "text-sm px-2 h-7": e.size === r(i).Small,
88
+ "text-base px-3 h-9": e.size === r(i).Default,
89
+ "text-lg px-3.5 h-12": e.size === r(i).Large,
90
+ "text-xl px-4 h-14": e.size === r(i).ExtraLarge,
89
91
  // Border
90
92
  "border border-color": e.outline,
91
93
  // Shape
92
- "rounded-full": e.shape === a(f).Circle,
93
- "input-roundness": e.shape === a(f).Rounded,
94
+ "rounded-full": e.shape === r(f).Circle,
95
+ "input-roundness": e.shape === r(f).Rounded,
94
96
  // Enabled/Disabled
95
97
  "cursor-not-allowed": e.disabled,
96
98
  "cursor-pointer": !e.disabled,
97
99
  // Bold
98
100
  "font-bold": e.bold,
99
101
  // 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,
102
+ "border-caipira-primary-inverted fill-caipira-primary-inverted": e.variant === r(a).DEFAULT,
103
+ "bg-transparent color-caipira-primary-inverted hover:bg-caipira-primary-inverted hover:color-caipira-primary hover:fill-white": e.variant === r(a).DEFAULT && e.outline,
104
+ "bg-caipira-primary-inverted color-caipira-primary": e.variant === r(a).DEFAULT && !e.outline,
103
105
  // 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,
106
+ "fill-caipira-primary": e.variant === r(a).PRIMARY,
107
+ "bg-transparent border-caipira-blue color-caipira-blue hover:bg-caipira-blue hover:color-caipira-primary hover:fill-white": e.variant === r(a).PRIMARY && e.outline,
108
+ "bg-caipira-blue color-caipira-primary": e.variant === r(a).PRIMARY && !e.outline,
107
109
  // 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,
110
+ "fill-caipira-green": e.variant === r(a).SUCCESS,
111
+ "bg-transparent border-caipira-green color-caipira-green hover:bg-caipira-green hover:color-caipira-primary hover:fill-white": e.variant === r(a).SUCCESS && e.outline,
112
+ "bg-caipira-green color-caipira-primary": e.variant === r(a).SUCCESS && !e.outline,
111
113
  // 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,
114
+ "fill-caipira-yellow": e.variant === r(a).WARNING,
115
+ "bg-transparent border-caipira-yellow color-caipira-yellow hover:bg-caipira-yellow hover:color-caipira-primary hover:fill-white": e.variant === r(a).WARNING && e.outline,
116
+ "bg-caipira-yellow color-caipira-primary": e.variant === r(a).WARNING && !e.outline,
115
117
  // 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,
118
+ "fill-caipira-red": e.variant === r(a).DANGER,
119
+ "bg-transparent border-caipira-red color-caipira-red hover:bg-caipira-red hover:color-caipira-primary hover:fill-white": e.variant === r(a).DANGER && e.outline,
120
+ "bg-caipira-red color-caipira-primary": e.variant === r(a).DANGER && !e.outline,
119
121
  // Link
120
- "color-caipira-primary-inverted underline": e.variant === a(r).LINK,
122
+ "color-caipira-primary-inverted underline": e.variant === r(a).LINK,
121
123
  // Transparent
122
- "bg-transparent": e.variant === a(r).TRANSPARENT,
123
- "hover:bg-[var(--hover-color)]": e.variant === a(r).TRANSPARENT && e.hover
124
+ "bg-transparent": e.variant === r(a).TRANSPARENT,
125
+ "hover:bg-[var(--hover-color)]": e.variant === r(a).TRANSPARENT && e.hover
124
126
  }, "input-outline flex gap-1 items-center select-none whitespace-nowrap"]),
125
127
  role: "button",
126
128
  onClick: N
127
129
  }, {
128
- default: z(() => [
130
+ default: U(() => [
129
131
  e.icon && e.iconPosition === "left" ? (c(), d(l, b({
130
132
  key: 0,
131
133
  ref_key: "iconReference",
@@ -133,8 +135,8 @@ const F = ["multiple"], V = /* @__PURE__ */ I({
133
135
  size: v.value,
134
136
  icon: e.icon
135
137
  }, 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
+ _(o.$slots, "default"),
139
+ e.label && e.type !== r(t).SUBMIT ? (c(), h(D, { key: 1 }, [
138
140
  k(L(e.label), 1)
139
141
  ], 64)) : u("", !0),
140
142
  e.icon && e.iconPosition === "right" ? (c(), d(l, b({
package/dist/Dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-MuajPvzR.js";
2
- import { p as a } from "./plugin-CzRCyET3.js";
1
+ import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-DtTBnNsn.js";
2
+ import { p as a } from "./plugin-DKMiwQmN.js";
3
3
  export {
4
4
  p as Dropdown,
5
5
  a as DropdownPlugin
@@ -0,0 +1,179 @@
1
+ import { defineComponent as A, ref as y, computed as P, resolveComponent as E, openBlock as n, createElementBlock as r, normalizeClass as c, createVNode as G, Fragment as D, renderList as F, toDisplayString as V, withKeys as $, renderSlot as I, normalizeProps as O, mergeProps as U, createBlock as j, createCommentVNode as q, createTextVNode as J, createElementVNode as Q } from "vue";
2
+ import { F as d } from "./ui-D5oXHNg_.js";
3
+ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected", "onKeydown", "onClick"], Y = {
4
+ key: 1,
5
+ class: "inline-flex items-center select-none input-text-color"
6
+ }, se = /* @__PURE__ */ A({
7
+ name: "TDropdown",
8
+ __name: "Dropdown",
9
+ props: {
10
+ size: { default: d.Default },
11
+ items: { default: () => [] },
12
+ loading: { type: Boolean, default: !1 },
13
+ multiple: { type: Boolean, default: !1 },
14
+ isVisible: { type: Boolean, default: !1 },
15
+ optionMarginClass: { default: "" },
16
+ optionPaddingClass: { default: "" },
17
+ wrapperPaddingClass: { default: "" },
18
+ optionRoundnessClass: { default: "input-roundness" },
19
+ wrapperRoundnessClass: { default: "input-roundness" }
20
+ },
21
+ emits: ["change", "end-reached", "created"],
22
+ setup(H, { expose: B, emit: L }) {
23
+ const s = H, R = L, i = y(-1), C = y(null), f = y([]), p = y("keyboard"), m = P(() => {
24
+ if (s.optionPaddingClass)
25
+ return s.optionPaddingClass;
26
+ switch (s.size) {
27
+ case d.Small:
28
+ return "py-1 px-2";
29
+ case d.Default:
30
+ default:
31
+ return "py-2 px-2";
32
+ }
33
+ }), k = P(() => {
34
+ switch (s.size) {
35
+ case d.Small:
36
+ return "text-sm";
37
+ case d.Default:
38
+ default:
39
+ return "text-base";
40
+ }
41
+ }), b = (t = i.value, o = s.items[t], l = void 0) => {
42
+ l?.stopPropagation(), R("change", {
43
+ index: t,
44
+ option: o,
45
+ hold: l?.ctrlKey ?? !1
46
+ }), o.action && o.action();
47
+ }, M = (t) => {
48
+ if (!s.isVisible)
49
+ return !1;
50
+ switch (t.preventDefault(), p.value = "keyboard", t.key) {
51
+ case "ArrowUp":
52
+ case "ArrowDown":
53
+ return S(t);
54
+ case "Enter":
55
+ return b();
56
+ }
57
+ }, N = () => {
58
+ const t = C.value;
59
+ t.scrollTop = 0;
60
+ }, S = (t) => {
61
+ const o = t.key === "ArrowDown", l = s.items.length;
62
+ let e = i.value;
63
+ const a = () => s.items[e] ? "isGroupLabel" in s.items[e] && s.items[e].isGroupLabel : !1, g = () => {
64
+ e === l - 1 ? e = 0 : e++;
65
+ }, K = () => {
66
+ e === 0 ? e = l - 1 : e--;
67
+ };
68
+ if (o)
69
+ do
70
+ g();
71
+ while (a());
72
+ else
73
+ do
74
+ K();
75
+ while (a());
76
+ e > -1 && e < l && (i.value = e);
77
+ const x = C.value, _ = f.value[i.value], v = _.offsetTop, h = _.offsetHeight, z = x.offsetHeight, u = x.scrollTop;
78
+ let w = 0;
79
+ if (_.focus(), v === 0 || u === 0)
80
+ w = v - z + h;
81
+ else if (o && v + h > z + u)
82
+ w = u + h;
83
+ else if (!o && v < u)
84
+ w = u - h;
85
+ else
86
+ return !0;
87
+ return x.scroll({ top: w }), !0;
88
+ }, T = (t) => {
89
+ const o = t.target, l = f.value[0];
90
+ !o || !l || o.scrollTop + o.clientHeight + l.offsetHeight >= o.scrollHeight && R("end-reached");
91
+ };
92
+ return B({ move: S, resetScroll: N }), (t, o) => {
93
+ const l = E("t-icon");
94
+ return n(), r("ul", {
95
+ ref_key: "listRef",
96
+ ref: C,
97
+ role: "listbox",
98
+ class: c(["text-left max-h-60 min-w-[8rem] z-10 overflow-y-auto scrollbar select-none floatable w-full", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
99
+ onScrollend: T,
100
+ onMousemove: o[0] || (o[0] = () => p.value = "mouse"),
101
+ onKeydown: M
102
+ }, [
103
+ s.loading ? (n(), r("li", {
104
+ key: 0,
105
+ role: "option",
106
+ "aria-disabled": "true",
107
+ class: c(["whitespace-nowrap inline-flex items-center", [
108
+ k.value,
109
+ m.value,
110
+ s.optionMarginClass,
111
+ s.optionRoundnessClass
112
+ ]])
113
+ }, [
114
+ G(l, {
115
+ size: "sm",
116
+ class: "w-6 h-6 animate-spin mr-3",
117
+ icon: "loading"
118
+ }),
119
+ W
120
+ ], 2)) : t.items.length === 0 ? (n(), r("li", {
121
+ key: 1,
122
+ role: "option",
123
+ "aria-disabled": "true",
124
+ class: c(["whitespace-nowrap text-gray-400", [
125
+ k.value,
126
+ m.value,
127
+ [s.optionMarginClass],
128
+ [s.optionRoundnessClass]
129
+ ]])
130
+ }, " Nothing here ", 2)) : (n(!0), r(D, { key: 2 }, F(t.items, (e, a) => (n(), r(D, {
131
+ key: e?.isGroupLabel ? a : e.value
132
+ }, [
133
+ e.isGroupLabel ? (n(), r("li", {
134
+ key: 0,
135
+ class: c(["text-xs font-bold tracking-wider text-neutral-600", [
136
+ m.value,
137
+ s.optionMarginClass,
138
+ s.optionRoundnessClass
139
+ ]]),
140
+ ref_for: !0,
141
+ ref_key: "itemRefs",
142
+ ref: f
143
+ }, V(e.label), 3)) : (n(), r("li", {
144
+ key: 1,
145
+ class: c([{
146
+ "bg-[var(--hover-color)]": a === i.value && p.value === "keyboard",
147
+ "hover:bg-[var(--hover-color)]": p.value === "mouse",
148
+ [k.value]: !0,
149
+ [m.value]: !0,
150
+ [s.optionMarginClass]: !0,
151
+ [s.optionRoundnessClass]: !0
152
+ }, "flex cursor-pointer whitespace-nowrap items-center focus-visible:outline-hidden"]),
153
+ role: "option",
154
+ ref_for: !0,
155
+ ref_key: "itemRefs",
156
+ ref: f,
157
+ tabindex: 0,
158
+ "aria-selected": a === i.value,
159
+ onKeydown: $((g) => b(a, e), ["enter"]),
160
+ onClick: (g) => b(a, e, g)
161
+ }, [
162
+ t.$slots.default ? I(t.$slots, "default", O(U({ key: 0 }, e))) : (n(), r("div", Y, [
163
+ e.icon ? (n(), j(l, {
164
+ key: 0,
165
+ icon: e.icon,
166
+ class: "mr-2",
167
+ size: "xs"
168
+ }, null, 8, ["icon"])) : q("", !0),
169
+ J(" " + V(e.label), 1)
170
+ ]))
171
+ ], 42, X))
172
+ ], 64))), 128))
173
+ ], 34);
174
+ };
175
+ }
176
+ });
177
+ export {
178
+ se as _
179
+ };
package/dist/Form.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-s3wmU1NZ.js";
2
- import { p as a } from "./plugin-NrO_mAYp.js";
1
+ import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-Bd8NlDpG.js";
2
+ import { p as a } from "./plugin-CDu6of44.js";
3
3
  export {
4
4
  m as Form,
5
5
  a as FormPlugin
@@ -1,14 +1,15 @@
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";
1
+ import { reactive as C, defineComponent as $, ref as _, computed as N, watch as z, provide as A, resolveComponent as O, openBlock as P, createElementBlock as J, renderSlot as E, unref as B, createElementVNode as T, normalizeClass as W, withDirectives as j, createVNode as R, mergeProps as q, vShow as x } from "vue";
2
+ import { F as G } from "./ui-D5oXHNg_.js";
2
3
  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-CrxkoXtN.js";
4
+ import { d as F, c as h, p as S, a as V } from "./transformers-CrxkoXtN.js";
4
5
  const i = {
5
6
  default: (e, t, r) => (t[r] = e, t),
6
7
  price: (e, t, r, s = ["Currency", "Value"]) => {
7
8
  const [c, a] = S(e);
8
9
  return t[`${r}${s[0]}`] = c, t[`${r}${s[1]}`] = a, t;
9
10
  },
10
- password: async (e, t, r) => (t[r] = F(e), t)
11
- }, G = async (e, t, r, s) => {
11
+ password: async (e, t, r) => (t[r] = V(e), t)
12
+ }, H = async (e, t, r, s) => {
12
13
  switch (e) {
13
14
  case n.Address:
14
15
  return i.default(
@@ -30,7 +31,7 @@ const i = {
30
31
  );
31
32
  case n.Date:
32
33
  return i.default(
33
- V(r),
34
+ F(r),
34
35
  t,
35
36
  s
36
37
  );
@@ -81,7 +82,7 @@ const i = {
81
82
  documents: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), Array.from(e).forEach((s) => t.append(r, s)), t),
82
83
  document: (e, t, r) => (t.append(r, e), t),
83
84
  stringArray: (e, t, r) => (r.endsWith("[]") || (r = `${r}[]`), e.forEach((s) => t.append(r, p(s))), t)
84
- }, H = async (e, t, r, s) => {
85
+ }, I = async (e, t, r, s) => {
85
86
  switch (e) {
86
87
  case n.Country:
87
88
  return u.default(h(r), t, s);
@@ -90,24 +91,24 @@ const i = {
90
91
  case n.Documents:
91
92
  return u.documents(r, t, s);
92
93
  case n.Date:
93
- return u.default(V(r), t, s);
94
+ return u.default(F(r), t, s);
94
95
  case n.Address:
95
96
  return u.address(r, t, s);
96
97
  case n.Price:
97
98
  return u.price(r, t, s);
98
99
  case n.Password:
99
- return u.default(F(r), t, s);
100
+ return u.default(V(r), t, s);
100
101
  case n.StringArray:
101
102
  return u.stringArray(r, t, s);
102
103
  default:
103
104
  return u.default(r, t, s);
104
105
  }
105
- }, I = async (e, t, r) => {
106
+ }, K = async (e, t, r) => {
106
107
  switch (r) {
107
108
  case f.JSON:
108
109
  let s = {};
109
110
  for (const a in e)
110
- s = await G(
111
+ s = await H(
111
112
  t[a],
112
113
  s,
113
114
  e[a],
@@ -118,7 +119,7 @@ const i = {
118
119
  default:
119
120
  let c = new FormData();
120
121
  for (const a in e)
121
- c = await H(
122
+ c = await I(
122
123
  t[a],
123
124
  c,
124
125
  e[a],
@@ -127,8 +128,8 @@ const i = {
127
128
  return c;
128
129
  }
129
130
  };
130
- function K(e) {
131
- const t = $(
131
+ function L(e) {
132
+ const t = C(
132
133
  {}
133
134
  );
134
135
  return { form: t, setValue: (o, d) => {
@@ -145,7 +146,7 @@ function K(e) {
145
146
  };
146
147
  return e.id && e.id.value && (o.id = e.id.value), {
147
148
  isValid: !0,
148
- form: await I(
149
+ form: await K(
149
150
  o,
150
151
  e.schema,
151
152
  e.format ?? f.JSON
@@ -153,10 +154,11 @@ function K(e) {
153
154
  };
154
155
  } };
155
156
  }
156
- const X = /* @__PURE__ */ C({
157
+ const Z = /* @__PURE__ */ $({
157
158
  name: "TForm",
158
159
  __name: "Form",
159
160
  props: {
161
+ size: { default: G.Default },
160
162
  schema: { default: () => ({}) },
161
163
  layout: { default: "horizontal" },
162
164
  formStyle: { default: () => ({}) },
@@ -168,35 +170,39 @@ const X = /* @__PURE__ */ C({
168
170
  },
169
171
  emits: ["submit", "change"],
170
172
  setup(e, { expose: t, emit: r }) {
171
- const s = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: y, submit: g } = K({
173
+ const s = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: y, submit: D } = L({
172
174
  id: N(() => s.identifier),
173
175
  schema: s.schema,
174
176
  format: s.submissionFormat
175
177
  }), w = async () => {
176
- const l = await g();
178
+ const l = await D();
177
179
  return c("submit", l), l;
178
180
  };
179
- return A(m, (l) => {
181
+ return z(m, (l) => {
180
182
  c("change", l);
181
- }), O("formStyle", { ...s.formStyle, layout: s.layout }), t({
183
+ }), A("formStyle", {
184
+ ...s.formStyle,
185
+ layout: s.layout,
186
+ size: s.size
187
+ }), t({
182
188
  submit: w,
183
189
  reset: y,
184
190
  setValues: b,
185
191
  form: m,
186
192
  setValue: d,
187
193
  getValue: o
188
- }), (l, L) => {
189
- const D = P("t-button");
190
- return J(), E("form", {
194
+ }), (l, M) => {
195
+ const g = O("t-button");
196
+ return P(), J("form", {
191
197
  onSubmit: w,
192
198
  ref_key: "formReference",
193
199
  ref: a
194
200
  }, [
195
- B(l.$slots, "default", { form: T(m) }),
196
- W("div", {
197
- class: j([s.buttonWrapperClasses])
201
+ E(l.$slots, "default", { form: B(m) }),
202
+ T("div", {
203
+ class: W([s.buttonWrapperClasses])
198
204
  }, [
199
- z(R(D, q({
205
+ j(R(g, q({
200
206
  type: "submit",
201
207
  class: "mt-4",
202
208
  variant: "primary",
@@ -210,5 +216,5 @@ const X = /* @__PURE__ */ C({
210
216
  }
211
217
  });
212
218
  export {
213
- X as _
219
+ Z as _
214
220
  };
package/dist/FormItem.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as r } from "./FormItem.vue_vue_type_script_setup_true_lang-CInvGeMR.js";
2
- import { p as t } from "./plugin-CEsqY6D6.js";
1
+ import { _ as r } from "./FormItem.vue_vue_type_script_setup_true_lang-3M-bOZ8R.js";
2
+ import { p as t } from "./plugin-hAKUUhA-.js";
3
3
  export {
4
4
  r as FormItem,
5
5
  t as FormItemPlugin
@@ -0,0 +1,74 @@
1
+ import { defineComponent as x, useSlots as b, inject as g, computed as i, resolveComponent as S, openBlock as r, createElementBlock as a, createElementVNode as u, normalizeClass as s, createBlock as k, unref as t, withCtx as C, renderSlot as d, Fragment as F, renderList as B, toDisplayString as I, createCommentVNode as w } from "vue";
2
+ import { F as c } from "./ui-D5oXHNg_.js";
3
+ const D = { class: "w-full" }, E = {
4
+ key: 0,
5
+ class: "float-right"
6
+ }, V = /* @__PURE__ */ x({
7
+ name: "TFormItem",
8
+ __name: "FormItem",
9
+ props: {
10
+ label: {},
11
+ rules: {}
12
+ },
13
+ setup(v) {
14
+ const m = v, n = b(), p = [], e = g("formStyle", {
15
+ label: "",
16
+ input: "",
17
+ layout: "horizontal",
18
+ size: c.Default
19
+ }), h = i(() => {
20
+ if (!n || !n.default)
21
+ return !1;
22
+ const o = n?.default();
23
+ return o ? o[0].type.name : !1;
24
+ }), f = i(() => h.value === "TInputMultiplier"), l = i(() => e.layout ? e.layout : "horizontal");
25
+ return (o, M) => {
26
+ const y = S("t-graphy-label");
27
+ return r(), a("div", D, [
28
+ u("div", {
29
+ class: s(["flex gap-2 my-5", {
30
+ "flex-col": l.value === "vertical",
31
+ "items-center": l.value === "horizontal" && !f.value,
32
+ "items-start": f.value
33
+ }])
34
+ }, [
35
+ m.label ? (r(), k(y, {
36
+ key: 0,
37
+ text: m.label,
38
+ class: s({
39
+ [t(e).label]: !0,
40
+ "text-sm": t(e).size === t(c).Small,
41
+ "relative top-0.5": l.value === "horizontal" && t(e).size === t(c).Small,
42
+ "text-right": l.value === "horizontal"
43
+ })
44
+ }, {
45
+ default: C(() => [
46
+ d(o.$slots, "label")
47
+ ]),
48
+ _: 3
49
+ }, 8, ["text", "class"])) : (r(), a("div", {
50
+ key: 1,
51
+ class: s({
52
+ [t(e).label]: !0,
53
+ "text-right": l.value === "horizontal"
54
+ })
55
+ }, null, 2)),
56
+ u("div", {
57
+ class: s({ [t(e).input]: !0 })
58
+ }, [
59
+ d(o.$slots, "default")
60
+ ], 2)
61
+ ], 2),
62
+ p ? (r(), a("div", E, [
63
+ (r(), a(F, null, B(p, (_, z) => u("span", {
64
+ class: "text-sm text-red-600",
65
+ key: z
66
+ }, I(_), 1)), 64))
67
+ ])) : w("", !0)
68
+ ]);
69
+ };
70
+ }
71
+ });
72
+ export {
73
+ V as _
74
+ };
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./GraphyPrice.vue_vue_type_script_setup_true_lang-Dxw3dcsW.js";
2
- import { p as o } from "./plugin-D-WO1cMl.js";
1
+ import { _ as a } from "./GraphyPrice.vue_vue_type_script_setup_true_lang-Cr4zjIiS.js";
2
+ import { p as o } from "./plugin-CnSU08rb.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-CzOLy35H.js";
2
+ import { G as e } from "./ui-D5oXHNg_.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-DeZj2CXU.js";
2
- import { p as a } from "./plugin-BwA1VXdD.js";
1
+ import { _ as n } from "./Icon.vue_vue_type_script_setup_true_lang-BuMQjBAy.js";
2
+ import { p as a } from "./plugin-Dja0bljQ.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 p, computed as m, watch as h, openBlock as f, createElementBlock as d, normalizeClass as b, unref as t, normalizeStyle as k } from "vue";
2
- import { E as o } from "./ui-CzOLy35H.js";
2
+ import { E as o } from "./ui-D5oXHNg_.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((c, e) => {
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-DqRzwkVN.js";
2
- import { p as t } from "./plugin-DIj5ypE6.js";
1
+ import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-XU9rYa47.js";
2
+ import { p as t } from "./plugin-BemLz7kA.js";
3
3
  export {
4
4
  e as InputCheckbox,
5
5
  t as InputCheckboxPlugin