@caipira/tamandua 0.0.109 → 0.0.111

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 (105) hide show
  1. package/dist/Avatar.js +2 -2
  2. package/dist/{Avatar.vue_vue_type_script_setup_true_lang-DSJKDT8K.js → Avatar.vue_vue_type_script_setup_true_lang-B_PBHoij.js} +1 -1
  3. package/dist/Button.js +2 -2
  4. package/dist/{Button.vue_vue_type_script_setup_true_lang-C8hR8Mib.js → Button.vue_vue_type_script_setup_true_lang-DmwCjHBh.js} +31 -28
  5. package/dist/Dropdown.js +2 -2
  6. package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js → Dropdown.vue_vue_type_script_setup_true_lang-teNJPxqb.js} +1 -1
  7. package/dist/Form.js +2 -2
  8. package/dist/{Form.vue_vue_type_script_setup_true_lang-DDfFG5ov.js → Form.vue_vue_type_script_setup_true_lang-DUQRg-h7.js} +2 -2
  9. package/dist/FormItem.js +2 -2
  10. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-C4UxWB8-.js → FormItem.vue_vue_type_script_setup_true_lang-Ohe_j4h-.js} +1 -1
  11. package/dist/GraphyPrice.js +2 -2
  12. package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-CEoy34yZ.js → GraphyPrice.vue_vue_type_script_setup_true_lang-Dy8fiqFR.js} +1 -1
  13. package/dist/Icon.js +2 -2
  14. package/dist/Icon.vue_vue_type_script_setup_true_lang-Bspxi9eT.js +45 -0
  15. package/dist/InputDate.js +2 -2
  16. package/dist/{InputDate.vue_vue_type_script_setup_true_lang-CNmUyWG3.js → InputDate.vue_vue_type_script_setup_true_lang-D-JE4KlD.js} +2 -2
  17. package/dist/InputMultiplier.js +2 -2
  18. package/dist/{InputMultiplier.vue_vue_type_script_setup_true_lang-BqLjHOXs.js → InputMultiplier.vue_vue_type_script_setup_true_lang-DRKMZyHi.js} +1 -1
  19. package/dist/InputPassword.js +2 -2
  20. package/dist/{InputPassword.vue_vue_type_script_setup_true_lang-CFGOn6D6.js → InputPassword.vue_vue_type_script_setup_true_lang-wOj9z1W4.js} +2 -2
  21. package/dist/InputSelect.js +2 -2
  22. package/dist/{InputSelect.vue_vue_type_script_setup_true_lang-BiqElQMB.js → InputSelect.vue_vue_type_script_setup_true_lang-DLViO8Wx.js} +48 -47
  23. package/dist/InputSwitch.js +2 -2
  24. package/dist/InputSwitch.vue_vue_type_script_setup_true_lang-CvBh4CvZ.js +67 -0
  25. package/dist/InputText.js +2 -2
  26. package/dist/{InputText.vue_vue_type_script_setup_true_lang-BSJs5QvW.js → InputText.vue_vue_type_script_setup_true_lang-CIQkwoWU.js} +1 -1
  27. package/dist/Link.js +2 -2
  28. package/dist/{Link.vue_vue_type_script_setup_true_lang-1FF8-bx3.js → Link.vue_vue_type_script_setup_true_lang-Ck-x1P5r.js} +1 -1
  29. package/dist/Popconfirm.js +2 -2
  30. package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-2SWveLua.js → Popconfirm.vue_vue_type_script_setup_true_lang-DZXV9a7n.js} +1 -1
  31. package/dist/{Popover-C3muJRU2.js → Popover-C7N5Zb-I.js} +1 -1
  32. package/dist/Popover.js +2 -2
  33. package/dist/Range-DSNQDUDW.js +81 -0
  34. package/dist/Range.css +1 -0
  35. package/dist/Range.js +6 -0
  36. package/dist/Table-Dy8MSYLq.js +178 -0
  37. package/dist/Table.css +1 -1
  38. package/dist/Table.js +2 -2
  39. package/dist/Tag.js +2 -2
  40. package/dist/{Tag.vue_vue_type_script_setup_true_lang-BGfQx0Zm.js → Tag.vue_vue_type_script_setup_true_lang-DsaNnGkD.js} +1 -1
  41. package/dist/Toast.js +2 -2
  42. package/dist/{Toast.vue_vue_type_script_setup_true_lang-C3DPOGhk.js → Toast.vue_vue_type_script_setup_true_lang-BXrlThd_.js} +1 -1
  43. package/dist/apps-B1TP2L84.js +5 -0
  44. package/dist/bucket-42cRrGev.js +5 -0
  45. package/dist/bucket-outline-0GeMJDw5.js +5 -0
  46. package/dist/components.js +38 -36
  47. package/dist/database-outline-DM5lGGq7.js +5 -0
  48. package/dist/date.js +3144 -230
  49. package/dist/enums.js +1 -1
  50. package/dist/form2.js +1 -1
  51. package/dist/{format-CNTeOuM7.js → format-EV1gUJVC.js} +405 -365
  52. package/dist/git-BjHtzzmF.js +5 -0
  53. package/dist/index.css +7 -9
  54. package/dist/{plugin-DpjcK3XL.js → plugin-BI2eEjk-.js} +1 -1
  55. package/dist/{plugin-DJJL4q-n.js → plugin-BYmroONK.js} +1 -1
  56. package/dist/{plugin-BoCsGIsZ.js → plugin-BiOgDMTb.js} +1 -1
  57. package/dist/plugin-BsEcG3SH.js +10 -0
  58. package/dist/{plugin-CI_-9tD3.js → plugin-BzjSYOar.js} +1 -1
  59. package/dist/{plugin-ulOCLfK6.js → plugin-C4bMmpE-.js} +1 -1
  60. package/dist/{plugin-ecfRWrSm.js → plugin-C5VGW50b.js} +1 -1
  61. package/dist/{plugin-BKGGwpX5.js → plugin-C7LSYbsi.js} +1 -1
  62. package/dist/{plugin-DicwvIqH.js → plugin-CHzC8ple.js} +1 -1
  63. package/dist/{plugin-CLPYJfBT.js → plugin-Cbq9m56Q.js} +1 -1
  64. package/dist/{plugin-BnuHbmyz.js → plugin-Cq-hJTUF.js} +1 -1
  65. package/dist/{plugin-DdFaVjC1.js → plugin-DO0i6pCz.js} +1 -1
  66. package/dist/{plugin-hQ-aWPlo.js → plugin-DQ5S15q2.js} +1 -1
  67. package/dist/{plugin-BPCrfFKZ.js → plugin-DbNWHXFS.js} +1 -1
  68. package/dist/{plugin-DHpk9u10.js → plugin-H1u2tVf3.js} +1 -1
  69. package/dist/{plugin-Bqj74SAX.js → plugin-H3hL34ZC.js} +1 -1
  70. package/dist/{plugin-Bm19fIFW.js → plugin-XtBztJJF.js} +1 -1
  71. package/dist/{plugin-DTlQ12ia.js → plugin-bAgZNFba.js} +1 -1
  72. package/dist/{plugin-D1hnDHxy.js → plugin-fy8lsHYO.js} +1 -1
  73. package/dist/{plugin-C9PvjtX8.js → plugin-hvjIh1kG.js} +1 -1
  74. package/dist/{plugins-W2r35mIp.js → plugins-C41pn8jD.js} +43 -39
  75. package/dist/plugins.js +110 -106
  76. package/dist/source-repository-CHRA433A.js +5 -0
  77. package/dist/{subMonths-D17wKxDQ.js → subMonths-C3ZeTBVE.js} +1 -1
  78. package/dist/tamandua.js +1 -1
  79. package/dist/{transformers-CrxkoXtN.js → transformers-BORZfvK0.js} +1 -1
  80. package/dist/types/components/Button/Button.vue.d.ts +7 -4
  81. package/dist/types/components/Button/types.d.ts +2 -1
  82. package/dist/types/components/InputSwitch/InputSwitch.story.d.ts +7 -0
  83. package/dist/types/components/InputSwitch/InputSwitch.vue.d.ts +4 -0
  84. package/dist/types/components/InputSwitch/types.d.ts +3 -0
  85. package/dist/types/components/ProgressLine/ProgressLine.vue.d.ts +1 -1
  86. package/dist/types/components/Range/Range.story.d.ts +56 -0
  87. package/dist/types/components/Range/Range.vue.d.ts +49 -0
  88. package/dist/types/components/Range/index.d.ts +5 -0
  89. package/dist/types/components/Range/plugin.d.ts +4 -0
  90. package/dist/types/components/Range/types.d.ts +12 -0
  91. package/dist/types/components/Table/Table.story.d.ts +9 -0
  92. package/dist/types/components/Table/types.d.ts +2 -0
  93. package/dist/types/components/index.d.ts +2 -1
  94. package/dist/types/components/plugins.d.ts +2 -1
  95. package/dist/types/components/types.d.ts +2 -1
  96. package/dist/types/enums/ui.d.ts +17 -4
  97. package/dist/types/index.d.ts +6 -3
  98. package/dist/types/services/date.d.ts +2 -4
  99. package/dist/ui-DU0tu0oX.js +15 -0
  100. package/package.json +30 -8
  101. package/volar.d.ts +1 -0
  102. package/dist/Icon.vue_vue_type_script_setup_true_lang-Bw9oxUXE.js +0 -45
  103. package/dist/InputSwitch.vue_vue_type_script_setup_true_lang-BVGfQFZh.js +0 -62
  104. package/dist/Table-maK98cK_.js +0 -177
  105. package/dist/ui-B7g6EoyG.js +0 -14
@@ -1,5 +1,5 @@
1
- import { defineComponent as ie, mergeModels as U, useModel as re, ref as d, computed as I, onBeforeMount as pe, watch as P, resolveComponent as _, openBlock as i, createBlock as E, normalizeClass as S, withCtx as R, createElementVNode as q, unref as f, withDirectives as G, createElementBlock as v, vModelText as ce, createCommentVNode as F, createVNode as H, renderSlot as z, normalizeProps as x, mergeProps as M, Fragment as V, renderList as J, guardReactiveProps as Q, toDisplayString as W, vShow as de, createSlots as fe, createTextVNode as ve, nextTick as me } from "vue";
2
- import { F as c, a as ye } from "./ui-B7g6EoyG.js";
1
+ import { defineComponent as ie, mergeModels as U, useModel as re, ref as d, computed as I, onBeforeMount as ce, watch as P, resolveComponent as _, openBlock as i, createBlock as E, normalizeClass as S, withCtx as R, createElementVNode as q, unref as f, withDirectives as G, createElementBlock as v, vModelText as pe, createCommentVNode as F, createVNode as H, renderSlot as z, normalizeProps as x, mergeProps as M, Fragment as V, renderList as J, guardReactiveProps as Q, toDisplayString as W, vShow as de, createSlots as fe, createTextVNode as ve, nextTick as me } from "vue";
2
+ import { F as p, a as ye } from "./ui-DU0tu0oX.js";
3
3
  const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
4
4
  key: 0,
5
5
  class: "inline-flex w-full justify-between items-center"
@@ -10,7 +10,7 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
10
10
  name: "TInputSelect",
11
11
  __name: "InputSelect",
12
12
  props: /* @__PURE__ */ U({
13
- size: { default: c.Default },
13
+ size: { default: p.Default },
14
14
  options: { default: () => [] },
15
15
  mapper: { type: Function, default: (m) => ({
16
16
  value: m.id ?? m.uuid,
@@ -36,9 +36,9 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
36
36
  setup(m, { emit: T }) {
37
37
  const l = m;
38
38
  let B = !1, C, j = "";
39
- const L = T, n = re(m, "modelValue"), o = d([]), p = d(""), O = d(null), N = d(), u = d(!1), K = d(null), a = d([]), $ = d(!1), y = d(null), w = I(() => a.value.length > 0), h = I(() => l.isSearchable && u.value), g = I(() => typeof l.resource == "function"), X = (e) => !l.multiple || !n.value || !Array.isArray(n.value) ? !1 : n.value.includes(e.value), Y = (e = n.value) => !(e === void 0 || e === "" || Array.isArray(e) && e.length === 0), Z = (e) => {
39
+ const L = T, s = re(m, "modelValue"), n = d([]), c = d(""), O = d(null), N = d(), u = d(!1), K = d(null), a = d([]), $ = d(!1), y = d(null), w = I(() => a.value.length > 0), h = I(() => l.isSearchable && u.value), g = I(() => typeof l.resource == "function"), X = (e) => !l.multiple || !s.value || !Array.isArray(s.value) ? !1 : s.value.includes(e.value), Y = (e = s.value) => !(e === void 0 || e === "" || Array.isArray(e) && e.length === 0), Z = (e) => {
40
40
  L("update:model-value", e);
41
- }, b = (e = n.value) => {
41
+ }, b = (e = s.value) => {
42
42
  if (Y(e))
43
43
  if (l.multiple)
44
44
  Array.isArray(e) && (a.value = e.map(
@@ -52,7 +52,7 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
52
52
  e.target.nodeName === "svg" && e.stopPropagation(), u.value = !u.value, u.value && h.value && me(() => {
53
53
  O.value?.focus();
54
54
  });
55
- }, A = (e) => o.value.findIndex(
55
+ }, A = (e) => n.value.findIndex(
56
56
  (t) => t.value === e
57
57
  ), D = async (e = !1) => {
58
58
  if (!l.resource)
@@ -60,16 +60,16 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
60
60
  $.value = !0;
61
61
  const t = {
62
62
  ...l.defaultParams,
63
- t: p.value,
63
+ t: c.value,
64
64
  r: "option"
65
65
  };
66
- e && y.value && y.value.pages > y.value.page ? t.page = y.value.page + 1 : e = !1, !p.value && n.value && (t.i = n.value);
66
+ e && y.value && y.value.pages > y.value.page ? t.page = y.value.page + 1 : e = !1, !c.value && s.value && (t.i = s.value);
67
67
  const r = await l.resource(t);
68
- e ? o.value.push(...r.items.map(l.mapper)) : o.value = r.items.map(l.mapper), y.value = r.pagination, !g.value && p.value && b(p.value), $.value = !1;
68
+ e ? n.value.push(...r.items.map(l.mapper)) : n.value = r.items.map(l.mapper), y.value = r.pagination, !g.value && c.value && b(c.value), $.value = !1;
69
69
  }, le = () => {
70
- !p.value || j === p.value || (C && (clearTimeout(C), C = null), C = setTimeout(() => {
71
- j = p.value, g.value ? (u.value || (u.value = !0), D()) : l.isSearchable && (o.value = l.options.filter(
72
- (e) => l.filter(p.value, e)
70
+ !c.value || j === c.value || (C && (clearTimeout(C), C = null), C = setTimeout(() => {
71
+ j = c.value, g.value ? (u.value || (u.value = !0), D()) : l.isSearchable && (n.value = l.options.filter(
72
+ (e) => l.filter(c.value, e)
73
73
  ));
74
74
  }, 500));
75
75
  }, te = ({
@@ -86,7 +86,7 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
86
86
  (!l.multiple || !t) && (u.value = !1);
87
87
  }, ae = () => {
88
88
  g.value && y.value && y.value.pages > y.value.page && D(!0);
89
- }, oe = async (e) => {
89
+ }, ne = async (e) => {
90
90
  switch (e.key) {
91
91
  case "ArrowDown":
92
92
  K.value?.move(e);
@@ -96,32 +96,32 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
96
96
  break;
97
97
  }
98
98
  };
99
- return pe(async () => {
100
- g.value ? (await D(), b(), L("initial-hydration", o.value)) : l.options.length > 0 && (o.value = l.options), !n.value && l.initialValue ? b(l.initialValue) : b(n.value);
99
+ return ce(async () => {
100
+ g.value ? (await D(), b(), L("initial-hydration", n.value)) : l.options.length > 0 && (n.value = l.options), !s.value && l.initialValue ? b(l.initialValue) : b(s.value);
101
101
  }), P(
102
- () => n.value,
102
+ () => s.value,
103
103
  async (e) => {
104
104
  e && (A(e) < 0 && g.value && await D(), b(e));
105
105
  }
106
106
  ), P(
107
107
  a,
108
108
  (e) => {
109
- const t = l.multiple ? o.value.filter(
109
+ const t = l.multiple ? n.value.filter(
110
110
  (r, k) => a.value.includes(k)
111
- ).map((r) => r.value) : o.value[a.value[0]].value;
111
+ ).map((r) => r.value) : n.value[a.value[0]].value;
112
112
  B && (B = !1, Z(t));
113
113
  },
114
114
  { deep: !0 }
115
115
  ), P(
116
116
  () => l.options,
117
117
  (e) => {
118
- e.length > 0 && (o.value = e, n.value && a.value.length === 0 && b(n.value));
118
+ e.length > 0 && (n.value = e, s.value && a.value.length === 0 && b(s.value));
119
119
  }
120
120
  ), (e, t) => {
121
- const r = _("t-tag"), k = _("t-button"), se = _("t-icon"), ne = _("t-dropdown"), ue = _("t-popover");
121
+ const r = _("t-tag"), k = _("t-button"), oe = _("t-icon"), se = _("t-dropdown"), ue = _("t-popover");
122
122
  return i(), E(ue, {
123
123
  open: u.value,
124
- "onUpdate:open": t[1] || (t[1] = (s) => u.value = s),
124
+ "onUpdate:open": t[1] || (t[1] = (o) => u.value = o),
125
125
  placement: l.dropdownPlacement,
126
126
  class: S([l.widthClass]),
127
127
  ref_key: "popoverRef",
@@ -130,17 +130,17 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
130
130
  default: R(() => [
131
131
  q("div", {
132
132
  class: S([{
133
- "h-7": l.size === f(c).Small && !l.multiple,
134
- "h-9": l.size === f(c).Default && !l.multiple,
135
- "h-full *:min-h-7": l.size === f(c).Small && l.multiple,
136
- "h-full *:min-h-9": l.size === f(c).Default && l.multiple,
133
+ "h-7": l.size === f(p).Small && !l.multiple,
134
+ "h-9": l.size === f(p).Default && !l.multiple,
135
+ "h-full *:min-h-7": l.size === f(p).Small && l.multiple,
136
+ "h-full *:min-h-9": l.size === f(p).Default && l.multiple,
137
137
  [l.borderClass]: !0,
138
138
  [l.roundnessClass]: !0
139
139
  }, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
140
140
  }, [
141
141
  h.value ? G((i(), v("input", {
142
142
  key: 0,
143
- "onUpdate:modelValue": t[0] || (t[0] = (s) => p.value = s),
143
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => c.value = o),
144
144
  type: "text",
145
145
  ref_key: "inputRef",
146
146
  ref: O,
@@ -148,29 +148,30 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
148
148
  disabled: l.disabled,
149
149
  readonly: !l.isSearchable,
150
150
  class: S(["bg-transparent input-padding input-roundness input-outline w-full", {
151
- "h-7 text-sm": l.size === f(c).Small,
152
- "h-9 text-base": l.size === f(c).Default
151
+ "h-7 text-sm": l.size === f(p).Small,
152
+ "h-9 text-base": l.size === f(p).Default
153
153
  }]),
154
154
  onInput: le,
155
- onKeydown: oe
155
+ onKeydown: ne
156
156
  }, null, 42, he)), [
157
- [ce, p.value]
157
+ [pe, c.value]
158
158
  ]) : F("", !0),
159
159
  H(k, {
160
160
  variant: "transparent",
161
161
  size: "",
162
- class: S(["h-full", {
162
+ class: S(["h-full items-center", {
163
163
  "w-full justify-end pr-2": !h.value && !w.value,
164
164
  "w-full justify-between pr-2": !h.value && w.value,
165
165
  "w-10 justify-center": h.value,
166
- "text-sm": l.size === f(c).Small,
167
- "text-base": l.size === f(c).Default
166
+ "text-sm": l.size === f(p).Small,
167
+ "text-base": l.size === f(p).Default
168
168
  }]),
169
+ "inner-alignment": "",
169
170
  "aria-describedby": N.value?.name,
170
171
  icon: u.value === !0 ? "chevron-up" : "chevron-down",
171
172
  "icon-position": h.value ? "left" : "right",
172
173
  "icon-props": {
173
- size: l.size === f(c).Default ? 18 : 15,
174
+ size: l.size === f(p).Default ? 18 : 15,
174
175
  class: "text-(--border-color)"
175
176
  },
176
177
  hover: !1,
@@ -183,14 +184,14 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
183
184
  "flex-wrap gap-2 py-1": l.multiple
184
185
  }])
185
186
  }, [
186
- e.$slots.selection && w.value ? z(e.$slots, "selection", x(M({ key: 0 }, o.value[a.value[0]]))) : e.$slots.default && w.value ? (i(), v(V, { key: 1 }, [
187
- l.multiple ? (i(!0), v(V, { key: 0 }, J(a.value, (s) => z(e.$slots, "default", x(Q(o.value[s])))), 256)) : z(e.$slots, "default", x(M({ key: 1 }, o.value[a.value[0]])))
187
+ e.$slots.selection && w.value ? z(e.$slots, "selection", x(M({ key: 0 }, n.value[a.value[0]]))) : e.$slots.default && w.value ? (i(), v(V, { key: 1 }, [
188
+ l.multiple ? (i(!0), v(V, { key: 0 }, J(a.value, (o) => z(e.$slots, "default", x(Q(n.value[o])))), 256)) : z(e.$slots, "default", x(M({ key: 1 }, n.value[a.value[0]])))
188
189
  ], 64)) : w.value ? (i(), v(V, { key: 2 }, [
189
- l.multiple ? (i(!0), v(V, { key: 0 }, J(a.value, (s) => (i(), E(r, {
190
- key: s,
191
- text: o.value[s]?.label,
190
+ l.multiple ? (i(!0), v(V, { key: 0 }, J(a.value, (o) => (i(), E(r, {
191
+ key: o,
192
+ text: n.value[o]?.label,
192
193
  color: "#6e6e6e"
193
- }, null, 8, ["text"]))), 128)) : (i(), v("span", be, W(o.value[a.value[0]]?.label), 1))
194
+ }, null, 8, ["text"]))), 128)) : (i(), v("span", be, W(n.value[a.value[0]]?.label), 1))
194
195
  ], 64)) : F("", !0)
195
196
  ], 2), [
196
197
  [de, !h.value]
@@ -201,10 +202,10 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
201
202
  ], 2)
202
203
  ]),
203
204
  content: R(() => [
204
- H(ne, {
205
+ H(se, {
205
206
  ref_key: "dropdownRef",
206
207
  ref: K,
207
- items: o.value,
208
+ items: n.value,
208
209
  "is-visible": u.value,
209
210
  multiple: l.multiple,
210
211
  loading: $.value,
@@ -215,19 +216,19 @@ const he = ["placeholder", "disabled", "readonly"], be = { key: 1 }, we = {
215
216
  }, fe({ _: 2 }, [
216
217
  e.$slots.default || l.multiple ? {
217
218
  name: "default",
218
- fn: R((s) => [
219
+ fn: R((o) => [
219
220
  l.multiple ? (i(), v("div", we, [
220
- e.$slots.default ? z(e.$slots, "default", x(M({ key: 0 }, s))) : (i(), v(V, { key: 1 }, [
221
- ve(W(s.label), 1)
221
+ e.$slots.default ? z(e.$slots, "default", x(M({ key: 0 }, o))) : (i(), v(V, { key: 1 }, [
222
+ ve(W(o.label), 1)
222
223
  ], 64)),
223
- X(s) ? (i(), E(se, {
224
+ X(o) ? (i(), E(oe, {
224
225
  key: 2,
225
226
  icon: "check",
226
227
  size: "sm",
227
228
  class: "float-right ml-2"
228
229
  })) : F("", !0)
229
230
  ])) : (i(), v("div", ge, [
230
- z(e.$slots, "default", x(Q(s)))
231
+ z(e.$slots, "default", x(Q(o)))
231
232
  ]))
232
233
  ]),
233
234
  key: "0"
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./InputSwitch.vue_vue_type_script_setup_true_lang-BVGfQFZh.js";
2
- import { p as i } from "./plugin-hQ-aWPlo.js";
1
+ import { _ as o } from "./InputSwitch.vue_vue_type_script_setup_true_lang-CvBh4CvZ.js";
2
+ import { p as i } from "./plugin-DQ5S15q2.js";
3
3
  export {
4
4
  o as InputSwitch,
5
5
  i as InputSwitchPlugin
@@ -0,0 +1,67 @@
1
+ import { defineComponent as C, ref as y, computed as r, watch as S, openBlock as i, createElementBlock as d, createElementVNode as s, normalizeClass as n, withDirectives as g, vModelCheckbox as z, toDisplayString as V, createCommentVNode as _ } from "vue";
2
+ import { F as t } from "./ui-DU0tu0oX.js";
3
+ const x = ["disabled"];
4
+ let B = 0;
5
+ const E = /* @__PURE__ */ C({
6
+ name: "TInputSwitch",
7
+ __name: "InputSwitch",
8
+ props: {
9
+ label: { default: "" },
10
+ disabled: { type: Boolean, default: !1 },
11
+ modelValue: { type: Boolean },
12
+ size: { default: t.Default }
13
+ },
14
+ emits: ["update:model-value"],
15
+ setup(c, { emit: p }) {
16
+ const a = c, m = p, o = `switch_${++B}`, e = y(!1), v = r(() => a.size === t.Small ? "w-10 mr-2" : "w-12 mr-2"), b = r(() => a.size === t.Small ? "w-5 h-5" : "w-6 h-6"), f = r(() => a.size === t.Small ? "h-5" : "h-6"), h = r(() => a.size === t.Small ? "text-sm" : "text-base"), w = () => {
17
+ const l = !e.value;
18
+ m("update:model-value", l);
19
+ };
20
+ return S(
21
+ () => a.modelValue,
22
+ (l) => {
23
+ e.value = !!l;
24
+ },
25
+ { immediate: !0 }
26
+ ), (l, u) => (i(), d("div", null, [
27
+ s("div", {
28
+ class: n(["relative inline-block align-middle select-none", {
29
+ "rounded-full": !e.value,
30
+ [v.value]: !0
31
+ }])
32
+ }, [
33
+ g(s("input", {
34
+ "onUpdate:modelValue": u[0] || (u[0] = (k) => e.value = k),
35
+ type: "checkbox",
36
+ class: n(["absolute block rounded-full appearance-none cursor-pointer bg-caipira-primary input-outline border-2", {
37
+ "right-0 border-[var(--caipira-primary-inverted)]": e.value,
38
+ "input-border": !e.value,
39
+ [b.value]: !0
40
+ }]),
41
+ name: o,
42
+ id: o,
43
+ disabled: l.disabled,
44
+ onInput: w
45
+ }, null, 42, x), [
46
+ [z, e.value]
47
+ ]),
48
+ s("label", {
49
+ for: o,
50
+ class: n([{
51
+ "bg-caipira-primary-inverted": e.value,
52
+ "bg-[var(--unfocused-bg-color)]": !e.value,
53
+ [f.value]: !0
54
+ }, "block overflow-hidden rounded-full cursor-pointer"])
55
+ }, null, 2)
56
+ ], 2),
57
+ l.label ? (i(), d("label", {
58
+ key: 0,
59
+ class: n(["cursor-pointer select-none", [h.value]]),
60
+ for: o
61
+ }, V(l.label), 3)) : _("", !0)
62
+ ]));
63
+ }
64
+ });
65
+ export {
66
+ E as _
67
+ };
package/dist/InputText.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputText.vue_vue_type_script_setup_true_lang-BSJs5QvW.js";
2
- import { p as r } from "./plugin-BnuHbmyz.js";
1
+ import { _ as e } from "./InputText.vue_vue_type_script_setup_true_lang-CIQkwoWU.js";
2
+ import { p as r } from "./plugin-Cq-hJTUF.js";
3
3
  export {
4
4
  e as InputText,
5
5
  r as InputTextPlugin
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, mergeModels as i, useModel as m, inject as s, withDirectives as c, openBlock as f, createElementBlock as y, normalizeClass as b, unref as l, vModelDynamic as v } from "vue";
2
- import { F as t } from "./ui-B7g6EoyG.js";
2
+ import { F as t } from "./ui-DU0tu0oX.js";
3
3
  const x = ["type", "readonly", "placeholder", "disabled", "autocomplete"], B = /* @__PURE__ */ p({
4
4
  name: "TInputText",
5
5
  __name: "InputText",
package/dist/Link.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-1FF8-bx3.js";
2
- import { p } from "./plugin-BPCrfFKZ.js";
1
+ import { _ as i } from "./Link.vue_vue_type_script_setup_true_lang-Ck-x1P5r.js";
2
+ import { p } from "./plugin-DbNWHXFS.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-B7g6EoyG.js";
2
+ import { L as a } from "./ui-DU0tu0oX.js";
3
3
  const w = /* @__PURE__ */ p({
4
4
  name: "TLink",
5
5
  __name: "Link",
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-2SWveLua.js";
2
- import { p as m } from "./plugin-ulOCLfK6.js";
1
+ import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-DZXV9a7n.js";
2
+ import { p as m } from "./plugin-C4bMmpE-.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 { a as z } from "./ui-B7g6EoyG.js";
2
+ import { a as z } from "./ui-DU0tu0oX.js";
3
3
  const $ = { class: "text-sm mb-6 inline-flex items-center" }, B = { class: "color-text" }, T = { class: "flex justify-end gap-2" }, O = /* @__PURE__ */ C({
4
4
  name: "TPopconfirm",
5
5
  __name: "Popconfirm",
@@ -1,6 +1,6 @@
1
1
  import './Popover.css';
2
2
  import { defineComponent as x, mergeModels as B, useModel as E, ref as c, computed as u, onBeforeMount as S, onBeforeUnmount as b, openBlock as p, createElementBlock as g, renderSlot as T, normalizeProps as I, guardReactiveProps as O, createBlock as k, Teleport as A, normalizeStyle as N, unref as w, normalizeClass as M, createCommentVNode as R } from "vue";
3
- import { d as z, a } from "./ui-B7g6EoyG.js";
3
+ import { e as z, a } from "./ui-DU0tu0oX.js";
4
4
  import { o as L, s as V, a as $, u as W, b as U } from "./floating-ui.vue-B5QcGNjh.js";
5
5
  import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  let F = 0;
package/dist/Popover.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as p } from "./Popover-C3muJRU2.js";
2
- import { p as P } from "./plugin-DicwvIqH.js";
1
+ import { P as p } from "./Popover-C7N5Zb-I.js";
2
+ import { p as P } from "./plugin-CHzC8ple.js";
3
3
  export {
4
4
  p as Popover,
5
5
  P as PopoverPlugin
@@ -0,0 +1,81 @@
1
+ import './Range.css';
2
+ import { defineComponent as g, ref as _, computed as r, watch as h, openBlock as l, createElementBlock as u, normalizeClass as c, withDirectives as b, createElementVNode as M, normalizeStyle as y, vModelText as w, toDisplayString as V, createCommentVNode as B } from "vue";
3
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const F = ["min", "max", "step", "disabled"], R = {
5
+ key: 0,
6
+ class: "text-sm font-medium select-none input-text-color min-w-[3rem] text-right"
7
+ }, I = /* @__PURE__ */ g({
8
+ name: "TRange",
9
+ __name: "Range",
10
+ props: {
11
+ modelValue: { default: void 0 },
12
+ min: { default: 0 },
13
+ max: { default: 100 },
14
+ step: { default: 1 },
15
+ tickMarks: { type: Boolean, default: !1 },
16
+ showValue: { type: Boolean, default: !1 },
17
+ disabled: { type: Boolean, default: !1 }
18
+ },
19
+ emits: ["update:model-value"],
20
+ setup(d, { emit: p }) {
21
+ const e = d, m = p, o = _(e.modelValue ?? e.min), f = r(() => {
22
+ const t = String(e.step), n = t.indexOf(".");
23
+ return n === -1 ? 0 : t.length - n - 1;
24
+ }), k = r(() => e.tickMarks ? Math.floor((e.max - e.min) / e.step) : 0), v = r(() => {
25
+ if (!e.tickMarks)
26
+ return "";
27
+ const t = k.value;
28
+ if (t <= 0)
29
+ return "";
30
+ const n = 100 / t, a = [];
31
+ for (let s = 0; s <= t; s++)
32
+ a.push(`${(s * n).toFixed(2)}% 2px`);
33
+ return `repeating-linear-gradient(to right, currentColor, currentColor 2px, transparent 2px, transparent ${n.toFixed(2)}%)`;
34
+ }), i = (t) => isFinite(t) ? parseFloat(t.toFixed(f.value)) : e.min, x = () => {
35
+ let t = o.value;
36
+ if (e.tickMarks) {
37
+ const n = Math.round((t - e.min) / e.step);
38
+ t = e.min + n * e.step;
39
+ }
40
+ t = i(t), o.value = t, m("update:model-value", t);
41
+ };
42
+ return h(
43
+ () => e.modelValue,
44
+ (t) => {
45
+ const n = t ?? e.min;
46
+ n !== o.value && (o.value = n);
47
+ }
48
+ ), (t, n) => (l(), u("div", {
49
+ class: c(["inline-flex items-center gap-3 w-full", {
50
+ "opacity-50 cursor-not-allowed": e.disabled
51
+ }])
52
+ }, [
53
+ b(M("input", {
54
+ type: "range",
55
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => o.value = a),
56
+ min: e.min,
57
+ max: e.max,
58
+ step: e.tickMarks ? e.step : 1,
59
+ disabled: e.disabled,
60
+ class: c(["appearance-none w-full h-2 rounded-full cursor-pointer bg-(--unfocused-bg-color) outline-none input-outline transition-colors duration-200 ease-in-out disabled:opacity-50 disabled:cursor-not-allowed", {
61
+ tickmarks: e.tickMarks
62
+ }]),
63
+ style: y(
64
+ e.tickMarks ? { backgroundImage: v.value } : void 0
65
+ ),
66
+ onInput: x
67
+ }, null, 46, F), [
68
+ [
69
+ w,
70
+ o.value,
71
+ void 0,
72
+ { number: !0 }
73
+ ]
74
+ ]),
75
+ e.showValue ? (l(), u("span", R, V(i(o.value)), 1)) : B("", !0)
76
+ ], 2));
77
+ }
78
+ }), z = /* @__PURE__ */ C(I, [["__scopeId", "data-v-69341890"]]);
79
+ export {
80
+ z as R
81
+ };
package/dist/Range.css ADDED
@@ -0,0 +1 @@
1
+ input[type=range][data-v-69341890]::-webkit-slider-runnable-track{height:8px;border-radius:9999px}input[type=range][data-v-69341890]::-moz-range-track{height:8px;border-radius:9999px;background:var(--unfocused-bg-color)}input[type=range][data-v-69341890]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:var(--caipira-primary-inverted);border:2px solid var(--caipira-primary-inverted);cursor:pointer;margin-top:-5px;transition:transform .15s ease,box-shadow .15s ease}input[type=range][data-v-69341890]::-webkit-slider-thumb:hover{transform:scale(1.15);box-shadow:0 0 0 4px color-mix(in srgb,var(--caipira-primary-inverted) 25%,transparent)}input[type=range][data-v-69341890]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--caipira-primary-inverted);border:2px solid var(--caipira-primary-inverted);cursor:pointer}input[type=range][data-v-69341890]::-moz-range-thumb:hover{transform:scale(1.15);box-shadow:0 0 0 4px color-mix(in srgb,var(--caipira-primary-inverted) 25%,transparent)}input[type=range][data-v-69341890]:disabled::-webkit-slider-thumb{cursor:not-allowed}input[type=range][data-v-69341890]:disabled::-moz-range-thumb{cursor:not-allowed}input[type=range].tickmarks[data-v-69341890]::-webkit-slider-runnable-track{background:transparent}input[type=range].tickmarks[data-v-69341890]::-moz-range-track{background:transparent}
package/dist/Range.js ADDED
@@ -0,0 +1,6 @@
1
+ import { R as o } from "./Range-DSNQDUDW.js";
2
+ import { p as g } from "./plugin-BsEcG3SH.js";
3
+ export {
4
+ o as Range,
5
+ g as RangePlugin
6
+ };
@@ -0,0 +1,178 @@
1
+ import './Table.css';
2
+ import { defineComponent as P, useSlots as q, ref as k, reactive as G, computed as h, resolveComponent as V, openBlock as a, createElementBlock as s, createElementVNode as b, normalizeClass as v, createCommentVNode as r, createVNode as $, Fragment as _, renderList as S, toDisplayString as H, createBlock as C, renderSlot as R, createTextVNode as J } from "vue";
3
+ import { F as w } from "./ui-DU0tu0oX.js";
4
+ import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const W = { class: "w-full color-text" }, X = ["onClick"], Y = {
6
+ key: 0,
7
+ class: "text-center w-10 relative"
8
+ }, Z = {
9
+ key: 2,
10
+ class: "text-center w-10 relative"
11
+ }, ee = {
12
+ key: 0,
13
+ class: "border-b"
14
+ }, te = ["colspan"], le = /* @__PURE__ */ P({
15
+ name: "TTable",
16
+ __name: "Table",
17
+ props: {
18
+ data: { default: () => [] },
19
+ rowKey: { default: "id" },
20
+ columns: { default: () => [] },
21
+ size: { default: w.Default },
22
+ loading: { type: Boolean, default: !1 },
23
+ selectable: { type: Boolean, default: !1 },
24
+ actionable: { type: Boolean, default: !1 },
25
+ stickyHeader: { type: Boolean, default: !0 },
26
+ rowClass: { default: "hover:bg-[var(--hover-color)]" },
27
+ tableDataClass: { default: "" }
28
+ },
29
+ emits: ["selected", "row-click", "action-click"],
30
+ setup(U, { expose: j, emit: N }) {
31
+ const e = U, f = N, D = q(), d = k(!1), n = k({}), p = k({}), g = k(!1), m = k(!1);
32
+ let c = G({});
33
+ const F = (t) => {
34
+ t.stopPropagation();
35
+ }, I = h(() => e.columns.length + (e.selectable ? 1 : 0) + (e.actionable ? 1 : 0) + (D.details ? 1 : 0) + 1), z = () => {
36
+ let t = 0, i = 0;
37
+ e.data.forEach((u) => {
38
+ n.value[u[e.rowKey]] ? t++ : i++;
39
+ }), i === 0 && t > 0 ? (m.value = !1, d.value = !0) : t === 0 ? (m.value = !1, d.value = !1) : i !== t && (m.value = !0, d.value = void 0), g.value = Object.keys(n.value).some(
40
+ (u) => n.value[u]
41
+ );
42
+ }, L = async (t, i) => {
43
+ i ? c[t] = e.data.find(
44
+ (u) => u[e.rowKey] === t
45
+ ) : delete c[t], f("selected", c), z();
46
+ }, M = () => {
47
+ Object.keys(n.value).forEach((t) => {
48
+ delete n.value[t];
49
+ });
50
+ for (const t in c)
51
+ delete c[t];
52
+ d.value = !1, m.value = !1, g.value = !1, f("selected", c);
53
+ }, O = () => {
54
+ d.value ? e.data.forEach((t) => {
55
+ n.value[t[e.rowKey]] = !0, c[t[e.rowKey]] = t;
56
+ }) : e.data.forEach((t) => {
57
+ n.value[t[e.rowKey]] = !1, delete c[t[e.rowKey]], g.value = !1;
58
+ }), z(), f("selected", c);
59
+ }, B = h(() => e.loading && e.data.length === 0 ? Array.from({ length: 5 }, (t, i) => ({})) : e.data), x = h(() => D.details ? B.value.some(
60
+ (t) => !("hasDetails" in t) || t?.hasDetails
61
+ ) : !1), y = h(() => e.tableDataClass ? e.tableDataClass : e.size === w.Small ? "px-2 py-1" : "px-2 py-2"), T = h(() => e.size === w.Small ? "text-sm" : "text-base");
62
+ return j({ clearSelection: M, inSelectionMode: g }), (t, i) => {
63
+ const u = V("t-input-checkbox"), K = V("t-skeleton"), A = V("t-button");
64
+ return a(), s("table", W, [
65
+ b("thead", null, [
66
+ b("tr", null, [
67
+ x.value ? (a(), s("th", {
68
+ key: 0,
69
+ class: v(["text-left bg-caipira-primary", {
70
+ "sticky top-0": e.stickyHeader,
71
+ [y.value]: !0
72
+ }])
73
+ }, null, 2)) : r("", !0),
74
+ e.selectable ? (a(), s("th", {
75
+ key: 1,
76
+ class: v(["text-center w-12 bg-caipira-primary", {
77
+ "sticky top-0": e.stickyHeader,
78
+ [y.value]: !0
79
+ }])
80
+ }, [
81
+ $(u, {
82
+ modelValue: d.value,
83
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => d.value = l),
84
+ "is-indeterminate": m.value,
85
+ onInput: O
86
+ }, null, 8, ["modelValue", "is-indeterminate"])
87
+ ], 2)) : r("", !0),
88
+ (a(!0), s(_, null, S(e.columns, (l, E) => (a(), s("th", {
89
+ class: v(["text-left select-none bg-caipira-primary font-semibold", {
90
+ "sticky top-0": e.stickyHeader,
91
+ [y.value]: !0,
92
+ [T.value]: !0
93
+ }]),
94
+ key: E
95
+ }, H(l.title ? l.title : ""), 3))), 128)),
96
+ e.actionable ? (a(), s("th", {
97
+ key: 2,
98
+ class: v(["text-left bg-caipira-primary", {
99
+ "sticky top-0": e.stickyHeader,
100
+ [y.value]: !0
101
+ }])
102
+ }, null, 2)) : r("", !0)
103
+ ])
104
+ ]),
105
+ b("tbody", null, [
106
+ (a(!0), s(_, null, S(B.value, (l, E) => (a(), s(_, {
107
+ key: l[e.rowKey]
108
+ }, [
109
+ b("tr", {
110
+ class: v({
111
+ "bg-[var(--hover-color)]": n.value[l[e.rowKey]],
112
+ [e.rowClass]: !0
113
+ }),
114
+ onClick: (o) => f("row-click", l)
115
+ }, [
116
+ x.value ? (a(), s("td", Y, [
117
+ e.loading ? (a(), C(K, { key: 0 })) : !("hasDetails" in l) || l.hasDetails ? (a(), C(A, {
118
+ key: 1,
119
+ modelValue: p.value[l[e.rowKey]],
120
+ "onUpdate:modelValue": (o) => p.value[l[e.rowKey]] = o,
121
+ variant: "transparent",
122
+ size: "",
123
+ class: "justify-center absolute inset-0",
124
+ hover: !1,
125
+ icon: p.value[l[e.rowKey]] ? "chevron-down" : "chevron-right",
126
+ onClick: (o) => p.value[l[e.rowKey]] = !p.value[l[e.rowKey]]
127
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "icon", "onClick"])) : r("", !0)
128
+ ])) : r("", !0),
129
+ e.selectable ? (a(), s("td", {
130
+ key: 1,
131
+ class: v(["text-center w-12", [y.value]])
132
+ }, [
133
+ $(u, {
134
+ modelValue: n.value[l[e.rowKey]],
135
+ "onUpdate:modelValue": (o) => n.value[l[e.rowKey]] = o,
136
+ "initialize-value": !0,
137
+ onClick: F,
138
+ onInput: (o) => L(l[e.rowKey], o)
139
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onInput"])
140
+ ], 2)) : r("", !0),
141
+ (a(!0), s(_, null, S(e.columns, (o, ae) => (a(), s("td", {
142
+ class: v(["whitespace-nowrap", [y.value, T.value]])
143
+ }, [
144
+ e.loading ? (a(), C(K, { key: 0 })) : "slot" in o && t.$slots[o.slot] ? R(t.$slots, o.slot, {
145
+ key: 1,
146
+ row: l
147
+ }, void 0, !0) : "property" in o ? (a(), s(_, { key: 2 }, [
148
+ J(H(l[o.property]), 1)
149
+ ], 64)) : r("", !0)
150
+ ], 2))), 256)),
151
+ e.actionable ? (a(), s("td", Z, [
152
+ e.loading ? (a(), C(K, { key: 0 })) : !("hasActions" in l) || l.hasActions ? (a(), C(A, {
153
+ key: 1,
154
+ variant: "transparent",
155
+ icon: "dots-vertical",
156
+ size: "",
157
+ class: "justify-center absolute inset-0",
158
+ "aria-describedby": "tooltip",
159
+ "icon-props": { size: 16 },
160
+ hover: !1,
161
+ onClick: (o) => f("action-click", l)
162
+ }, null, 8, ["onClick"])) : r("", !0)
163
+ ])) : r("", !0)
164
+ ], 10, X),
165
+ x.value && p.value[l[e.rowKey]] ? (a(), s("tr", ee, [
166
+ b("td", { colspan: I.value }, [
167
+ R(t.$slots, "details", { row: l }, void 0, !0)
168
+ ], 8, te)
169
+ ])) : r("", !0)
170
+ ], 64))), 128))
171
+ ])
172
+ ]);
173
+ };
174
+ }
175
+ }), re = /* @__PURE__ */ Q(le, [["__scopeId", "data-v-97e7109d"]]);
176
+ export {
177
+ re as T
178
+ };