@caipira/tamandua 0.0.66 → 0.0.68

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 (78) hide show
  1. package/dist/Backdrop.js +2 -2
  2. package/dist/Backdrop.vue_vue_type_script_setup_true_lang-Dyo6_-EM.js +22 -0
  3. package/dist/Button.js +2 -2
  4. package/dist/{Button.vue_vue_type_script_setup_true_lang-CUPz7wT9.js → Button.vue_vue_type_script_setup_true_lang-DW0Q2Ut2.js} +29 -29
  5. package/dist/ChartLine.css +1 -1
  6. package/dist/{Drawer-Cl9_4uHA.js → Drawer-y5xBARd2.js} +1 -1
  7. package/dist/Drawer.js +2 -2
  8. package/dist/Dropdown.js +2 -2
  9. package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-DeY4vid5.js → Dropdown.vue_vue_type_script_setup_true_lang-MuajPvzR.js} +24 -24
  10. package/dist/FileDrop.js +2 -2
  11. package/dist/{FileDrop.vue_vue_type_script_setup_true_lang-BDzMbrCN.js → FileDrop.vue_vue_type_script_setup_true_lang-Bq0lAgZ7.js} +1 -1
  12. package/dist/InputCheckbox.js +2 -2
  13. package/dist/{InputCheckbox.vue_vue_type_style_index_0_lang-Dp-FyMon.js → InputCheckbox.vue_vue_type_style_index_0_lang-DqRzwkVN.js} +4 -4
  14. package/dist/InputDate.js +2 -2
  15. package/dist/{InputDate.vue_vue_type_script_setup_true_lang-BdELykj8.js → InputDate.vue_vue_type_script_setup_true_lang-BUEAELkk.js} +2 -2
  16. package/dist/InputPassword.js +2 -2
  17. package/dist/{InputPassword.vue_vue_type_script_setup_true_lang-BMChy2_E.js → InputPassword.vue_vue_type_script_setup_true_lang-ChHDOnS8.js} +35 -35
  18. package/dist/InputPrice.js +2 -2
  19. package/dist/{InputPrice.vue_vue_type_script_setup_true_lang-R3kHhxN2.js → InputPrice.vue_vue_type_script_setup_true_lang-9UZ7YqAf.js} +12 -12
  20. package/dist/InputRadio.js +2 -2
  21. package/dist/InputRadio.vue_vue_type_style_index_0_lang-DlTO78_z.js +35 -0
  22. package/dist/InputSelect.js +2 -2
  23. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-Dy5fjzHK.js +232 -0
  24. package/dist/InputSwitch.js +2 -2
  25. package/dist/{InputSwitch.vue_vue_type_script_setup_true_lang-CgE_12vY.js → InputSwitch.vue_vue_type_script_setup_true_lang-BVGfQFZh.js} +10 -9
  26. package/dist/Modal.js +2 -2
  27. package/dist/{Modal.vue_vue_type_script_setup_true_lang-DiUI27HX.js → Modal.vue_vue_type_script_setup_true_lang-BvUk8ebI.js} +1 -1
  28. package/dist/Pagination.js +2 -2
  29. package/dist/Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js +110 -0
  30. package/dist/Popover-Bq_SpOWb.js +73 -0
  31. package/dist/Popover.css +1 -0
  32. package/dist/Popover.js +2 -2
  33. package/dist/{ProgressCircle-Cpmi2CpO.js → ProgressCircle-C5CnEEoe.js} +14 -14
  34. package/dist/ProgressCircle.css +1 -1
  35. package/dist/ProgressCircle.js +2 -2
  36. package/dist/{ProgressLine-CTS0VOAI.js → ProgressLine-BqINh5jh.js} +13 -13
  37. package/dist/ProgressLine.css +1 -1
  38. package/dist/ProgressLine.js +2 -2
  39. package/dist/Skeleton.js +2 -2
  40. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-Dsy_4Ftz.js +18 -0
  41. package/dist/Tab.js +2 -2
  42. package/dist/{Tab.vue_vue_type_script_setup_true_lang-6bgS8FOw.js → Tab.vue_vue_type_script_setup_true_lang-OuqLqd04.js} +16 -16
  43. package/dist/components.js +19 -19
  44. package/dist/index.css +62 -41
  45. package/dist/{plugin-BJyDH94F.js → plugin-3Ql4s0Jh.js} +1 -1
  46. package/dist/{plugin-CJ6sqqaI.js → plugin-43q0Kzto.js} +1 -1
  47. package/dist/{plugin-C-iGigb_.js → plugin-AU2qI2I9.js} +1 -1
  48. package/dist/{plugin-MAzqwXys.js → plugin-CV6IjnsL.js} +1 -1
  49. package/dist/{plugin-Cr3oXX-8.js → plugin-CV_fI920.js} +1 -1
  50. package/dist/{plugin-RM2wZuwL.js → plugin-Co9LymNO.js} +1 -1
  51. package/dist/{plugin-DrKx8l8j.js → plugin-CzRCyET3.js} +1 -1
  52. package/dist/{plugin-wVt0wQNv.js → plugin-DBDBJ5_6.js} +1 -1
  53. package/dist/{plugin-BVJKxqmv.js → plugin-DIj5ypE6.js} +1 -1
  54. package/dist/{plugin-CZ2rAHjJ.js → plugin-DMGSStZm.js} +1 -1
  55. package/dist/{plugin-DPAnsB4s.js → plugin-DNJyBcDk.js} +1 -1
  56. package/dist/{plugin-Ch67LOIy.js → plugin-DSHWwE9A.js} +1 -1
  57. package/dist/{plugin-Do2-cqMT.js → plugin-DXPEO1fb.js} +1 -1
  58. package/dist/{plugin-C1kAmMfE.js → plugin-DYHfPgzY.js} +1 -1
  59. package/dist/{plugin-CNwzCYlr.js → plugin-JMSzJgz5.js} +1 -1
  60. package/dist/plugin-RTst32IC.js +10 -0
  61. package/dist/{plugin-B63n9_uc.js → plugin-hQ-aWPlo.js} +1 -1
  62. package/dist/{plugin-DxG6Hhao.js → plugin-jyvJNavM.js} +1 -1
  63. package/dist/{plugin-dX-bbpm5.js → plugin-n_PnyR3n.js} +1 -1
  64. package/dist/{plugins-BFVTdy-_.js → plugins-CEGTMSZE.js} +27 -27
  65. package/dist/plugins.js +27 -27
  66. package/dist/tamandua.js +1 -1
  67. package/dist/types/components/Pagination/Pagination.vue.d.ts +9 -0
  68. package/dist/types/components/Pagination/types.d.ts +1 -0
  69. package/dist/types/components/Skeleton/Skeleton.vue.d.ts +29 -7
  70. package/dist/types/components/Skeleton/types.d.ts +4 -1
  71. package/package.json +1 -1
  72. package/dist/Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js +0 -22
  73. package/dist/InputRadio.vue_vue_type_style_index_0_lang-n0nJwz8x.js +0 -35
  74. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BuO105oW.js +0 -227
  75. package/dist/Pagination.vue_vue_type_script_setup_true_lang-BB6dLKpi.js +0 -106
  76. package/dist/Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js +0 -71
  77. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-WahY1vGW.js +0 -11
  78. package/dist/plugin-ColpxTKB.js +0 -10
@@ -23,11 +23,11 @@ const _ = {
23
23
  modelModifiers: {}
24
24
  }),
25
25
  emits: /* @__PURE__ */ a(["keyup", "blur"], ["update:modelValue"]),
26
- setup(r, { emit: n }) {
27
- const e = b(r, "modelValue"), u = n, i = r, p = (o) => ({
26
+ setup(r, { emit: l }) {
27
+ const e = b(r, "modelValue"), n = l, i = r, d = (o) => ({
28
28
  label: o.symbol,
29
29
  value: o.iso
30
- }), d = (o, t) => {
30
+ }), p = (o, t) => {
31
31
  if (t === void 0) {
32
32
  e.value = { ...e.value };
33
33
  return;
@@ -39,26 +39,26 @@ const _ = {
39
39
  iso: o
40
40
  };
41
41
  }, m = (o) => {
42
- const l = o.target.value;
42
+ const u = o.target.value;
43
43
  e.value = {
44
44
  ...e.value,
45
- value: _.inputToPriceNumber(l)
45
+ value: _.inputToPriceNumber(u)
46
46
  };
47
47
  };
48
- return f(e, d, { immediate: !0 }), (o, t) => {
49
- const l = g("t-input-select");
48
+ return f(e, p, { immediate: !0 }), (o, t) => {
49
+ const u = g("t-input-select");
50
50
  return x(), y("div", h, [
51
- I(l, {
51
+ I(u, {
52
52
  modelValue: e.value.iso,
53
53
  "onUpdate:modelValue": [
54
54
  t[0] || (t[0] = (s) => e.value.iso = s),
55
55
  c
56
56
  ],
57
57
  resource: i.resource,
58
- mapper: p,
58
+ mapper: d,
59
59
  "width-class": "w-20",
60
60
  "border-class": "border-t border-r border-b input-border",
61
- "roundness-class": ""
61
+ "roundness-class": "rounded-l-[var(--input-radius)]"
62
62
  }, null, 8, ["modelValue", "resource"]),
63
63
  N(M("input", {
64
64
  "onUpdate:modelValue": t[1] || (t[1] = (s) => e.value.value = s),
@@ -66,8 +66,8 @@ const _ = {
66
66
  class: "w-full h-full input-bg-color input-text-color input-outline input-roundness input-padding",
67
67
  disabled: i.disabled,
68
68
  onInput: m,
69
- onKeyup: t[2] || (t[2] = (s) => u("keyup", s)),
70
- onBlur: t[3] || (t[3] = (s) => u("blur", s))
69
+ onKeyup: t[2] || (t[2] = (s) => n("keyup", s)),
70
+ onBlur: t[3] || (t[3] = (s) => n("blur", s))
71
71
  }, null, 40, k), [
72
72
  [P, e.value.value]
73
73
  ])
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./InputRadio.vue_vue_type_style_index_0_lang-n0nJwz8x.js";
2
- import { p as t } from "./plugin-Do2-cqMT.js";
1
+ import { _ as a } from "./InputRadio.vue_vue_type_style_index_0_lang-DlTO78_z.js";
2
+ import { p as t } from "./plugin-DXPEO1fb.js";
3
3
  export {
4
4
  a as InputRadio,
5
5
  t as InputRadioPlugin
@@ -0,0 +1,35 @@
1
+ import './InputRadio.css';
2
+ import { defineComponent as p, inject as r, openBlock as m, createElementBlock as u, createElementVNode as o, unref as a, toDisplayString as b } from "vue";
3
+ const v = { class: "h-9 inline-flex items-center" }, h = ["value", "name", "disabled", "checked"];
4
+ let f = 0;
5
+ const g = /* @__PURE__ */ p({
6
+ name: "TInputRadio",
7
+ __name: "InputRadio",
8
+ props: {
9
+ value: {},
10
+ label: {}
11
+ },
12
+ setup(t) {
13
+ const i = `radio_${++f}`, c = r("name", ""), e = t, l = r("model", ""), d = r("change", () => {
14
+ }), s = r("disabled", !1);
15
+ return (_, n) => (m(), u("div", v, [
16
+ o("input", {
17
+ value: e.value,
18
+ name: a(c),
19
+ id: i,
20
+ disabled: a(s),
21
+ checked: e.value === a(l),
22
+ type: "radio",
23
+ class: "form-radio w-5 h-5 border border-[var(--caipira-primary-inverted)] checked:hover:border-caipira-primary-inverted checked:focus:border-caipira-primary-inverted checked:border-caipira-primary-inverted input-outline focus:input-outline bg-caipira-primary color-caipira-primary",
24
+ onChange: n[0] || (n[0] = (y) => a(d)(e.value))
25
+ }, null, 40, h),
26
+ o("label", {
27
+ class: "cursor-pointer pl-2 mr-3 input-label",
28
+ for: i
29
+ }, b(e.label), 1)
30
+ ]));
31
+ }
32
+ });
33
+ export {
34
+ g as _
35
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-BuO105oW.js";
2
- import { p as r } from "./plugin-DPAnsB4s.js";
1
+ import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-Dy5fjzHK.js";
2
+ import { p as r } from "./plugin-DNJyBcDk.js";
3
3
  export {
4
4
  p as InputSelect,
5
5
  r as InputSelectPlugin
@@ -0,0 +1,232 @@
1
+ import { defineComponent as ue, mergeModels as O, useModel as se, ref as c, computed as E, onBeforeMount as ie, watch as I, resolveComponent as g, openBlock as i, createBlock as D, normalizeClass as x, withCtx as R, createElementVNode as N, withDirectives as K, createElementBlock as d, vModelText as re, createCommentVNode as z, createVNode as U, renderSlot as k, normalizeProps as _, mergeProps as M, Fragment as V, renderList as q, guardReactiveProps as G, toDisplayString as H, vShow as pe, createSlots as ce, createTextVNode as de, nextTick as fe } from "vue";
2
+ import { a as ve, E as me } from "./ui-J-lhC9qd.js";
3
+ const ye = ["placeholder", "disabled", "readonly"], he = { key: 1 }, we = {
4
+ key: 0,
5
+ class: "inline-flex w-full justify-between items-center"
6
+ }, be = {
7
+ key: 1,
8
+ class: "inline-flex items-center"
9
+ }, _e = /* @__PURE__ */ ue({
10
+ name: "TInputSelect",
11
+ __name: "InputSelect",
12
+ props: /* @__PURE__ */ O({
13
+ size: { default: ve.Default },
14
+ options: { default: () => [] },
15
+ mapper: { type: Function, default: (f) => ({
16
+ value: f.id ?? f.uuid,
17
+ label: f
18
+ }) },
19
+ filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
20
+ tooltip: { default: "" },
21
+ disabled: { type: Boolean },
22
+ resource: {},
23
+ multiple: { type: Boolean, default: !1 },
24
+ placeholder: { default: "" },
25
+ initialValue: {},
26
+ isSearchable: { type: Boolean, default: !1 },
27
+ dropdownPlacement: { default: me.BOTTOM_START },
28
+ widthClass: { default: "w-full" },
29
+ borderClass: { default: "border input-border" },
30
+ roundnessClass: { default: "input-roundness" }
31
+ }, {
32
+ modelValue: {},
33
+ modelModifiers: {}
34
+ }),
35
+ emits: /* @__PURE__ */ O(["update:model-value"], ["update:modelValue"]),
36
+ setup(f, { emit: T }) {
37
+ const l = f;
38
+ let B = !1, S, P = "";
39
+ const J = T, u = se(f, "modelValue"), o = c([]), p = c(""), j = c(null), F = c(), s = c(!1), L = c(null), a = c([]), $ = c(!1), v = c(null), h = E(() => a.value.length > 0), m = E(() => l.isSearchable && s.value), w = E(() => typeof l.resource == "function"), Q = (e) => !l.multiple || !u.value || !Array.isArray(u.value) ? !1 : u.value.includes(e.value), W = (e = u.value) => !(e === void 0 || e === "" || Array.isArray(e) && e.length === 0), X = (e) => {
40
+ J("update:model-value", e);
41
+ }, y = (e = u.value) => {
42
+ if (W(e))
43
+ if (l.multiple)
44
+ Array.isArray(e) && (a.value = e.map(
45
+ (t) => A(t)
46
+ ).filter((t) => t > -1));
47
+ else {
48
+ const t = A(e);
49
+ ~t && (a.value = [t]);
50
+ }
51
+ }, Y = async (e) => {
52
+ e.target.nodeName === "svg" && e.stopPropagation(), s.value = !s.value, s.value && m.value && fe(() => {
53
+ j.value?.focus();
54
+ });
55
+ }, A = (e) => o.value.findIndex(
56
+ (t) => t.value === e
57
+ ), C = async (e = !1) => {
58
+ if (!l.resource)
59
+ return;
60
+ $.value = !0;
61
+ const t = {
62
+ t: p.value,
63
+ r: "option"
64
+ };
65
+ e && v.value && v.value.pages > v.value.page ? t.page = v.value.page + 1 : e = !1, !p.value && u.value && (t.i = u.value);
66
+ const r = await l.resource(t);
67
+ e ? o.value.push(...r.items.map(l.mapper)) : o.value = r.items.map(l.mapper), v.value = r.pagination, !w.value && p.value && y(p.value), $.value = !1;
68
+ }, Z = () => {
69
+ !p.value || P === p.value || (S && (clearTimeout(S), S = null), S = setTimeout(() => {
70
+ P = p.value, w.value ? (s.value || (s.value = !0), C()) : l.isSearchable && (o.value = l.options.filter(
71
+ (e) => l.filter(p.value, e)
72
+ ));
73
+ }, 500));
74
+ }, ee = ({
75
+ index: e,
76
+ hold: t
77
+ }) => {
78
+ if (B = !0, l.multiple) {
79
+ const r = a.value.findIndex(
80
+ (b) => b === e
81
+ );
82
+ ~r ? a.value.splice(r, 1) : a.value.push(e);
83
+ } else
84
+ a.value = [e];
85
+ (!l.multiple || !t) && (s.value = !1);
86
+ }, le = () => {
87
+ w.value && v.value && v.value.pages > v.value.page && C(!0);
88
+ }, te = async (e) => {
89
+ switch (e.key) {
90
+ case "ArrowDown":
91
+ L.value?.move(e);
92
+ break;
93
+ case "Escape":
94
+ s.value = !1;
95
+ break;
96
+ }
97
+ };
98
+ return ie(async () => {
99
+ w.value ? (await C(), y()) : l.options.length > 0 && (o.value = l.options), !u.value && l.initialValue ? y(l.initialValue) : y(u.value);
100
+ }), I(
101
+ () => u.value,
102
+ async (e) => {
103
+ e && (A(e) < 0 && w.value && await C(), y(e));
104
+ }
105
+ ), I(
106
+ a,
107
+ (e) => {
108
+ const t = l.multiple ? o.value.filter(
109
+ (r, b) => a.value.includes(b)
110
+ ).map((r) => r.value) : o.value[a.value[0]].value;
111
+ B && (B = !1, X(t));
112
+ },
113
+ { deep: !0 }
114
+ ), I(
115
+ () => l.options,
116
+ (e) => {
117
+ e.length > 0 && (o.value = e, u.value && a.value.length === 0 && y(u.value));
118
+ }
119
+ ), (e, t) => {
120
+ const r = g("t-tag"), b = g("t-button"), ae = g("t-icon"), oe = g("t-dropdown"), ne = g("t-popover");
121
+ return i(), D(ne, {
122
+ open: s.value,
123
+ "onUpdate:open": t[1] || (t[1] = (n) => s.value = n),
124
+ placement: l.dropdownPlacement,
125
+ class: x([l.widthClass]),
126
+ ref_key: "popoverRef",
127
+ ref: F
128
+ }, {
129
+ default: R(() => [
130
+ N("div", {
131
+ class: x([{
132
+ "h-9": !l.multiple,
133
+ "h-full *:min-h-9": l.multiple,
134
+ [l.borderClass]: !0,
135
+ [l.roundnessClass]: !0
136
+ }, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
137
+ }, [
138
+ m.value ? K((i(), d("input", {
139
+ key: 0,
140
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => p.value = n),
141
+ type: "text",
142
+ ref_key: "inputRef",
143
+ ref: j,
144
+ placeholder: l.placeholder,
145
+ disabled: l.disabled,
146
+ readonly: !l.isSearchable,
147
+ class: "h-9 bg-transparent input-padding input-roundness input-outline w-full",
148
+ onInput: Z,
149
+ onKeydown: te
150
+ }, null, 40, ye)), [
151
+ [re, p.value]
152
+ ]) : z("", !0),
153
+ U(b, {
154
+ variant: "transparent",
155
+ size: "",
156
+ class: x(["h-full", {
157
+ "w-full justify-end pr-2": !m.value && !h.value,
158
+ "w-full justify-between pr-2": !m.value && h.value,
159
+ "w-10 justify-center": m.value
160
+ }]),
161
+ "aria-describedby": F.value?.name,
162
+ icon: s.value === !0 ? "chevron-up" : "chevron-down",
163
+ "icon-position": m.value ? "left" : "right",
164
+ hover: !1,
165
+ onClick: Y
166
+ }, {
167
+ default: R(() => [
168
+ K(N("div", {
169
+ class: x(["inline-flex items-center ml-2 max-w-[calc(100%-2.5rem)]", {
170
+ "overflow-hidden whitespace-nowrap": !l.multiple,
171
+ "flex-wrap gap-2 py-1": l.multiple
172
+ }])
173
+ }, [
174
+ e.$slots.selection && h.value ? k(e.$slots, "selection", _(M({ key: 0 }, o.value[a.value[0]]))) : e.$slots.default && h.value ? (i(), d(V, { key: 1 }, [
175
+ l.multiple ? (i(!0), d(V, { key: 0 }, q(a.value, (n) => k(e.$slots, "default", _(G(o.value[n])))), 256)) : k(e.$slots, "default", _(M({ key: 1 }, o.value[a.value[0]])))
176
+ ], 64)) : h.value ? (i(), d(V, { key: 2 }, [
177
+ l.multiple ? (i(!0), d(V, { key: 0 }, q(a.value, (n) => (i(), D(r, {
178
+ key: n,
179
+ text: o.value[n]?.label,
180
+ color: "#6e6e6e"
181
+ }, null, 8, ["text"]))), 128)) : (i(), d("span", he, H(o.value[a.value[0]]?.label), 1))
182
+ ], 64)) : z("", !0)
183
+ ], 2), [
184
+ [pe, !m.value]
185
+ ])
186
+ ]),
187
+ _: 3
188
+ }, 8, ["aria-describedby", "class", "icon", "icon-position"])
189
+ ], 2)
190
+ ]),
191
+ content: R(() => [
192
+ U(oe, {
193
+ ref_key: "dropdownRef",
194
+ ref: L,
195
+ items: o.value,
196
+ "is-visible": s.value,
197
+ multiple: l.multiple,
198
+ loading: $.value,
199
+ "option-margin-class": "m-1",
200
+ "option-padding-class": "py-2 px-3",
201
+ onChange: ee,
202
+ onEndReached: le
203
+ }, ce({ _: 2 }, [
204
+ e.$slots.default || l.multiple ? {
205
+ name: "default",
206
+ fn: R((n) => [
207
+ l.multiple ? (i(), d("div", we, [
208
+ e.$slots.default ? k(e.$slots, "default", _(M({ key: 0 }, n))) : (i(), d(V, { key: 1 }, [
209
+ de(H(n.label), 1)
210
+ ], 64)),
211
+ Q(n) ? (i(), D(ae, {
212
+ key: 2,
213
+ icon: "check",
214
+ size: "sm",
215
+ class: "float-right ml-2"
216
+ })) : z("", !0)
217
+ ])) : (i(), d("div", be, [
218
+ k(e.$slots, "default", _(G(n)))
219
+ ]))
220
+ ]),
221
+ key: "0"
222
+ } : void 0
223
+ ]), 1032, ["items", "is-visible", "multiple", "loading"])
224
+ ]),
225
+ _: 3
226
+ }, 8, ["open", "placement", "class"]);
227
+ };
228
+ }
229
+ });
230
+ export {
231
+ _e as _
232
+ };
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./InputSwitch.vue_vue_type_script_setup_true_lang-CgE_12vY.js";
2
- import { p as i } from "./plugin-B63n9_uc.js";
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";
3
3
  export {
4
4
  o as InputSwitch,
5
5
  i as InputSwitchPlugin
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, ref as v, watch as f, openBlock as r, createElementBlock as i, createElementVNode as t, normalizeClass as o, withDirectives as h, vModelCheckbox as k, toDisplayString as w, createCommentVNode as y } from "vue";
1
+ import { defineComponent as b, ref as v, watch as f, openBlock as r, createElementBlock as i, createElementVNode as o, normalizeClass as t, withDirectives as h, vModelCheckbox as k, toDisplayString as w, createCommentVNode as y } from "vue";
2
2
  const g = ["disabled"];
3
3
  let V = 0;
4
4
  const B = /* @__PURE__ */ b({
@@ -22,16 +22,17 @@ const B = /* @__PURE__ */ b({
22
22
  },
23
23
  { immediate: !0 }
24
24
  ), (l, n) => (r(), i("div", null, [
25
- t("div", {
26
- class: o(["relative inline-block w-12 mr-2 align-middle select-none", {
25
+ o("div", {
26
+ class: t(["relative inline-block w-12 mr-2 align-middle select-none", {
27
27
  "rounded-full": !e.value
28
28
  }])
29
29
  }, [
30
- h(t("input", {
30
+ h(o("input", {
31
31
  "onUpdate:modelValue": n[0] || (n[0] = (m) => e.value = m),
32
32
  type: "checkbox",
33
- class: o(["absolute block w-6 h-6 rounded-full appearance-none cursor-pointer bg-caipira-primary input-outline border input-border", {
34
- "right-0": e.value
33
+ class: t(["absolute block w-6 h-6 rounded-full appearance-none cursor-pointer bg-caipira-primary input-outline border-2", {
34
+ "right-0 border-[var(--caipira-primary-inverted)]": e.value,
35
+ "input-border": !e.value
35
36
  }]),
36
37
  name: a,
37
38
  id: a,
@@ -40,11 +41,11 @@ const B = /* @__PURE__ */ b({
40
41
  }, null, 42, g), [
41
42
  [k, e.value]
42
43
  ]),
43
- t("label", {
44
+ o("label", {
44
45
  for: a,
45
- class: o([{
46
+ class: t([{
46
47
  "bg-caipira-primary-inverted": e.value,
47
- "bg-caipira-tertiary": !e.value
48
+ "bg-[var(--unfocused-bg-color)]": !e.value
48
49
  }, "block overflow-hidden h-6 rounded-full cursor-pointer"])
49
50
  }, null, 2)
50
51
  ], 2),
package/dist/Modal.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as r } from "./Modal.vue_vue_type_script_setup_true_lang-DiUI27HX.js";
2
- import { p } from "./plugin-dX-bbpm5.js";
1
+ import { _ as r } from "./Modal.vue_vue_type_script_setup_true_lang-BvUk8ebI.js";
2
+ import { p } from "./plugin-n_PnyR3n.js";
3
3
  export {
4
4
  r as Modal,
5
5
  p as ModalPlugin
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, ref as y, onMounted as b, resolveComponent as h, openBlock as o, createElementBlock as l, normalizeClass as a, withKeys as _, createBlock as k, createCommentVNode as s, createElementVNode as c, createVNode as v, toDisplayString as w, renderSlot as n } from "vue";
2
- import { _ as S } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js";
2
+ import { _ as S } from "./Backdrop.vue_vue_type_script_setup_true_lang-Dyo6_-EM.js";
3
3
  const x = {
4
4
  key: 0,
5
5
  class: "p-4 border-b border-color"
@@ -1,5 +1,5 @@
1
- import { _ as i } from "./Pagination.vue_vue_type_script_setup_true_lang-BB6dLKpi.js";
2
- import { p as r } from "./plugin-DxG6Hhao.js";
1
+ import { _ as i } from "./Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js";
2
+ import { p as r } from "./plugin-jyvJNavM.js";
3
3
  export {
4
4
  i as Pagination,
5
5
  r as PaginationPlugin
@@ -0,0 +1,110 @@
1
+ import { defineComponent as $, mergeModels as V, useModel as x, ref as B, computed as o, resolveComponent as m, openBlock as i, createElementBlock as d, normalizeClass as L, createElementVNode as v, toDisplayString as M, createCommentVNode as f, createVNode as h, Fragment as S, renderList as z, createBlock as b } from "vue";
2
+ const N = { key: 0 }, j = { class: "flex flex-wrap justify-end gap-6" }, D = { class: "h-9 flex" }, F = /* @__PURE__ */ $({
3
+ name: "TPagination",
4
+ __name: "Pagination",
5
+ props: /* @__PURE__ */ V({
6
+ disabled: { type: Boolean, default: !1 },
7
+ displayClass: { default: "flex gap-6 flex-col sm:flex-row items-end sm:items-center justify-end sm:justify-between" },
8
+ hasPageSize: { type: Boolean, default: !0 },
9
+ pageLengths: { default: () => [12, 18, 24, 30, 36, 42] },
10
+ showDescription: { type: Boolean, default: !1 }
11
+ }, {
12
+ modelValue: {
13
+ default: {
14
+ page: 1,
15
+ pages: 1,
16
+ perPage: 12
17
+ }
18
+ },
19
+ modelModifiers: {}
20
+ }),
21
+ emits: ["update:modelValue"],
22
+ setup(c) {
23
+ const u = c, e = x(c, "modelValue"), g = B(e.value.perPage ?? 12), P = o(() => e.value.page === 1), k = o(
24
+ () => e.value.page === e.value.pages
25
+ ), y = o(() => {
26
+ const a = e.value.pages || 1, t = e.value.page || 1, n = [], p = Math.max(2, t - 2), l = Math.min(a - 1, t + 2);
27
+ a > 1 && n.push(1);
28
+ for (let s = p; s <= l; s++)
29
+ s > 1 && s < a && n.push(s);
30
+ return a > 1 && n.push(a), n;
31
+ }), C = o(() => u.pageLengths.map((a) => ({
32
+ label: `${a} / page`,
33
+ value: a
34
+ }))), w = o(() => {
35
+ if ("items" in e.value && "skip" in e.value && "items" in e.value) {
36
+ const a = e.value.skip + 1, t = e.value.skip + e.value.items, n = e.value.totalItems;
37
+ return `Showing ${a} to ${t} of ${n} entries`;
38
+ }
39
+ return `Page ${e.value.page} of ${e.value.pages}`;
40
+ }), r = (a) => {
41
+ a === e.value.page || a < 1 || a > e.value.pages || (e.value = {
42
+ ...e.value,
43
+ page: a
44
+ });
45
+ }, _ = (a) => {
46
+ a !== e.value.perPage && (e.value = {
47
+ ...e.value,
48
+ perPage: a,
49
+ page: 1
50
+ });
51
+ };
52
+ return (a, t) => {
53
+ const n = m("t-button"), p = m("t-input-select");
54
+ return i(), d("div", {
55
+ class: L(["select-none", [u.displayClass]])
56
+ }, [
57
+ v("div", null, [
58
+ a.showDescription ? (i(), d("p", N, M(w.value), 1)) : f("", !0)
59
+ ]),
60
+ v("div", j, [
61
+ v("div", D, [
62
+ h(n, {
63
+ variant: "transparent",
64
+ label: "Previous",
65
+ icon: "chevron-left",
66
+ hover: !0,
67
+ "disable-style": !0,
68
+ disabled: P.value,
69
+ onClick: t[0] || (t[0] = (l) => r(e.value.page - 1))
70
+ }, null, 8, ["disabled"]),
71
+ (i(!0), d(S, null, z(y.value, (l) => (i(), b(n, {
72
+ variant: "transparent",
73
+ hover: !0,
74
+ label: `${l}`,
75
+ outline: l === e.value.page,
76
+ bold: l === e.value.page,
77
+ disabled: l === e.value.page,
78
+ onClick: (s) => r(l)
79
+ }, null, 8, ["label", "outline", "bold", "disabled", "onClick"]))), 256)),
80
+ h(n, {
81
+ variant: "transparent",
82
+ label: "Next",
83
+ icon: "chevron-right",
84
+ "icon-position": "right",
85
+ hover: !0,
86
+ disabled: k.value,
87
+ onClick: t[1] || (t[1] = (l) => r(e.value.page + 1))
88
+ }, null, 8, ["disabled"])
89
+ ]),
90
+ u.hasPageSize ? (i(), b(p, {
91
+ key: 0,
92
+ modelValue: g.value,
93
+ "onUpdate:modelValue": [
94
+ t[2] || (t[2] = (l) => g.value = l),
95
+ _
96
+ ],
97
+ "width-class": "",
98
+ class: "w-fit min-w-32",
99
+ "dropdown-placement": "top",
100
+ disabled: a.disabled,
101
+ options: C.value
102
+ }, null, 8, ["modelValue", "disabled", "options"])) : f("", !0)
103
+ ])
104
+ ], 2);
105
+ };
106
+ }
107
+ });
108
+ export {
109
+ F as _
110
+ };
@@ -0,0 +1,73 @@
1
+ import './Popover.css';
2
+ import { defineComponent as w, mergeModels as B, useModel as E, ref as n, computed as u, onBeforeMount as P, onBeforeUnmount as M, openBlock as c, createElementBlock as d, renderSlot as m, normalizeProps as v, guardReactiveProps as g, normalizeStyle as x, unref as z, normalizeClass as O, createCommentVNode as R } from "vue";
3
+ import { u as T } from "./useDomHelpers-CGVrQd35.js";
4
+ import { d as S, E as $ } from "./ui-J-lhC9qd.js";
5
+ import { o as L, s as W, a as I, u as U, b as j } from "./floating-ui.vue-B5QcGNjh.js";
6
+ import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ let D = 0;
8
+ const F = /* @__PURE__ */ w({
9
+ name: "TPopover",
10
+ __name: "Popover",
11
+ props: /* @__PURE__ */ B({
12
+ trigger: { default: S.CLICK },
13
+ disabled: { type: Boolean, default: !1 },
14
+ placement: { default: $.BOTTOM },
15
+ slotWrapperClasses: { default: "input-roundness" },
16
+ width: { default: "auto" }
17
+ }, {
18
+ open: { type: Boolean, default: !1 },
19
+ openModifiers: {}
20
+ }),
21
+ emits: ["update:open"],
22
+ setup(s, { expose: C }) {
23
+ const t = E(s, "open"), r = s, a = `popover_${++D}`, l = n(), y = u(() => r.placement), o = n(), { wasClickOutsideOfContainer: _ } = T(), b = u(
24
+ () => o.value?.firstChild?.nextElementSibling
25
+ ), k = n([
26
+ L(5),
27
+ W({
28
+ apply({ elements: e }) {
29
+ if (r.width === "static")
30
+ return;
31
+ const f = e.reference.getBoundingClientRect();
32
+ Object.assign(e.floating.style, {
33
+ minWidth: `${f.width}px`
34
+ });
35
+ }
36
+ }),
37
+ I({ crossAxis: !0 })
38
+ ]), { floatingStyles: h } = U(b, l, {
39
+ open: t,
40
+ placement: y,
41
+ middleware: k,
42
+ whileElementsMounted: j
43
+ }), i = (e = !t.value) => {
44
+ t.value = e;
45
+ }, p = (e) => t.value && o.value && _(e, o.value) ? (t.value = !1, !1) : !0;
46
+ return P(() => {
47
+ document.addEventListener("click", p);
48
+ }), M(() => {
49
+ document.removeEventListener("click", p);
50
+ }), C({ name: a }), (e, f) => (c(), d("div", {
51
+ ref_key: "wrapperRef",
52
+ ref: o
53
+ }, [
54
+ m(e.$slots, "default", v(g({ onTogglePopover: i })), void 0, !0),
55
+ t.value ? (c(), d("div", {
56
+ key: 0,
57
+ ref_key: "floating",
58
+ ref: l,
59
+ role: "tooltip",
60
+ id: a,
61
+ style: x(z(h)),
62
+ class: O(["popover-floatable bg-caipira-primary z-10", {
63
+ [r.slotWrapperClasses]: !0
64
+ }])
65
+ }, [
66
+ m(e.$slots, "content", v(g({ onTogglePopover: i })), void 0, !0)
67
+ ], 6)) : R("", !0)
68
+ ], 512));
69
+ }
70
+ }), q = /* @__PURE__ */ A(F, [["__scopeId", "data-v-4fbb6f53"]]);
71
+ export {
72
+ q as P
73
+ };
@@ -0,0 +1 @@
1
+ .popover-floatable[data-v-4fbb6f53]{scrollbar-gutter:stable}
package/dist/Popover.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js";
2
- import { p as P } from "./plugin-ColpxTKB.js";
1
+ import { P as p } from "./Popover-Bq_SpOWb.js";
2
+ import { p as P } from "./plugin-RTst32IC.js";
3
3
  export {
4
4
  p as Popover,
5
5
  P as PopoverPlugin