@caipira/tamandua 0.0.84 → 0.0.85

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.
@@ -1,5 +1,5 @@
1
1
  import './Table.css';
2
- import { defineComponent as M, useSlots as O, ref as k, reactive as F, computed as x, resolveComponent as K, openBlock as a, createElementBlock as s, createElementVNode as m, normalizeClass as p, createCommentVNode as r, createVNode as E, Fragment as b, renderList as V, toDisplayString as T, createBlock as h, renderSlot as $, createTextVNode as P } from "vue";
2
+ import { defineComponent as M, useSlots as O, ref as k, reactive as F, computed as x, resolveComponent as K, openBlock as a, createElementBlock as s, createElementVNode as m, normalizeClass as p, createCommentVNode as c, createVNode as E, Fragment as b, renderList as V, toDisplayString as T, createBlock as h, renderSlot as $, createTextVNode as P } from "vue";
3
3
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
5
5
  key: 0,
@@ -27,7 +27,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
27
27
  emits: ["selected", "row-click", "action-click"],
28
28
  setup(z, { expose: H, emit: R }) {
29
29
  const e = z, v = R, D = O(), d = k(!1), n = k({}), y = k({}), _ = k(!1), f = k(!1);
30
- let c = F({});
30
+ let r = F({});
31
31
  const U = (t) => {
32
32
  t.stopPropagation();
33
33
  }, j = x(() => e.columns.length + (e.selectable ? 1 : 0) + (e.actionable ? 1 : 0) + (D.details ? 1 : 0) + 1), w = () => {
@@ -38,22 +38,22 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
38
38
  (u) => n.value[u]
39
39
  );
40
40
  }, N = async (t, i) => {
41
- i ? c[t] = e.data.find(
41
+ i ? r[t] = e.data.find(
42
42
  (u) => u[e.rowKey] === t
43
- ) : delete c[t], v("selected", c), w();
43
+ ) : delete r[t], v("selected", r), w();
44
44
  }, I = () => {
45
45
  Object.keys(n.value).forEach((t) => {
46
- n.value[t] = !1, d.value = !1, f.value = !1, _.value = !1;
46
+ delete n.value[t];
47
47
  });
48
- for (const t in c)
49
- c[t] = void 0;
50
- v("selected", c);
48
+ for (const t in r)
49
+ delete r[t];
50
+ d.value = !1, f.value = !1, _.value = !1, v("selected", r);
51
51
  }, L = () => {
52
52
  d.value ? e.data.forEach((t) => {
53
- n.value[t[e.rowKey]] = !0, c[t[e.rowKey]] = t;
53
+ n.value[t[e.rowKey]] = !0, r[t[e.rowKey]] = t;
54
54
  }) : e.data.forEach((t) => {
55
- n.value[t[e.rowKey]] = !1, delete c[t[e.rowKey]], _.value = !1;
56
- }), w(), v("selected", c);
55
+ n.value[t[e.rowKey]] = !1, delete r[t[e.rowKey]], _.value = !1;
56
+ }), w(), v("selected", r);
57
57
  }, S = x(() => e.loading && e.data.length === 0 ? Array.from({ length: 5 }, (t, i) => ({})) : e.data), C = x(() => D.details ? S.value.some(
58
58
  (t) => !("hasDetails" in t) || t?.hasDetails
59
59
  ) : !1);
@@ -68,7 +68,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
68
68
  "sticky top-0": e.stickyHeader,
69
69
  [e.tableDataClass]: !0
70
70
  }])
71
- }, null, 2)) : r("", !0),
71
+ }, null, 2)) : c("", !0),
72
72
  e.selectable ? (a(), s("th", {
73
73
  key: 1,
74
74
  class: p(["text-center w-12 bg-caipira-primary", {
@@ -82,7 +82,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
82
82
  "is-indeterminate": f.value,
83
83
  onInput: L
84
84
  }, null, 8, ["modelValue", "is-indeterminate"])
85
- ], 2)) : r("", !0),
85
+ ], 2)) : c("", !0),
86
86
  (a(!0), s(b, null, V(e.columns, (l, A) => (a(), s("th", {
87
87
  class: p(["text-base text-left select-none px-2 py-2 bg-caipira-primary font-semibold", {
88
88
  "sticky top-0": e.stickyHeader,
@@ -96,7 +96,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
96
96
  "sticky top-0": e.stickyHeader,
97
97
  [e.tableDataClass]: !0
98
98
  }])
99
- }, null, 2)) : r("", !0)
99
+ }, null, 2)) : c("", !0)
100
100
  ])
101
101
  ]),
102
102
  m("tbody", null, [
@@ -121,8 +121,8 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
121
121
  hover: !1,
122
122
  icon: y.value[l[e.rowKey]] ? "chevron-down" : "chevron-right",
123
123
  onClick: (o) => y.value[l[e.rowKey]] = !y.value[l[e.rowKey]]
124
- }, null, 8, ["modelValue", "onUpdate:modelValue", "icon", "onClick"])) : r("", !0)
125
- ])) : r("", !0),
124
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "icon", "onClick"])) : c("", !0)
125
+ ])) : c("", !0),
126
126
  e.selectable ? (a(), s("td", {
127
127
  key: 1,
128
128
  class: p(["text-center w-12", [e.tableDataClass]])
@@ -134,7 +134,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
134
134
  onClick: U,
135
135
  onInput: (o) => N(l[e.rowKey], o)
136
136
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onInput"])
137
- ], 2)) : r("", !0),
137
+ ], 2)) : c("", !0),
138
138
  (a(!0), s(b, null, V(e.columns, (o, ee) => (a(), s("td", {
139
139
  class: p(["whitespace-nowrap", {
140
140
  [e.tableDataClass]: !0
@@ -145,7 +145,7 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
145
145
  row: l
146
146
  }, void 0, !0) : "property" in o ? (a(), s(b, { key: 2 }, [
147
147
  P(T(l[o.property]), 1)
148
- ], 64)) : r("", !0)
148
+ ], 64)) : c("", !0)
149
149
  ], 2))), 256)),
150
150
  e.actionable ? (a(), s("td", W, [
151
151
  e.loading ? (a(), h(g, { key: 0 })) : !("hasActions" in l) || l.hasActions ? (a(), h(B, {
@@ -158,20 +158,20 @@ const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
158
158
  "icon-props": { size: 16 },
159
159
  hover: !1,
160
160
  onClick: (o) => v("action-click", l)
161
- }, null, 8, ["onClick"])) : r("", !0)
162
- ])) : r("", !0)
161
+ }, null, 8, ["onClick"])) : c("", !0)
162
+ ])) : c("", !0)
163
163
  ], 10, J),
164
164
  C.value && y.value[l[e.rowKey]] ? (a(), s("tr", X, [
165
165
  m("td", { colspan: j.value }, [
166
166
  $(t.$slots, "details", { row: l }, void 0, !0)
167
167
  ], 8, Y)
168
- ])) : r("", !0)
168
+ ])) : c("", !0)
169
169
  ], 64))), 128))
170
170
  ])
171
171
  ]);
172
172
  };
173
173
  }
174
- }), ae = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-52916b3d"]]);
174
+ }), ae = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-c8c99412"]]);
175
175
  export {
176
176
  ae as T
177
177
  };
package/dist/Table.css CHANGED
@@ -1 +1 @@
1
- table[data-v-52916b3d]{border-collapse:separate;border-spacing:0}table th[data-v-52916b3d],table td[data-v-52916b3d]{border-bottom:1px solid var(--border-color)}
1
+ table[data-v-c8c99412]{border-collapse:separate;border-spacing:0}table th[data-v-c8c99412],table td[data-v-c8c99412]{border-bottom:1px solid var(--border-color)}
package/dist/Table.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as o } from "./Table-CgD2uRtQ.js";
2
- import { p as l } from "./plugin-BPE8jGG3.js";
1
+ import { T as o } from "./Table-maK98cK_.js";
2
+ import { p as l } from "./plugin-C9PvjtX8.js";
3
3
  export {
4
4
  o as Table,
5
5
  l as TablePlugin
@@ -40,7 +40,7 @@ import { P as br } from "./ProgressLine-BqINh5jh.js";
40
40
  import { _ as Gr } from "./SensitiveInfo.vue_vue_type_script_setup_true_lang-D288W5VF.js";
41
41
  import { _ as gr } from "./Skeleton.vue_vue_type_script_setup_true_lang-Dsy_4Ftz.js";
42
42
  import { _ as vr } from "./Tab.vue_vue_type_script_setup_true_lang-Cqx-Km-J.js";
43
- import { T as Fr } from "./Table-CgD2uRtQ.js";
43
+ import { T as Fr } from "./Table-maK98cK_.js";
44
44
  import { _ as Mr } from "./Tag.vue_vue_type_script_setup_true_lang-BxUnrajl.js";
45
45
  import { _ as Br } from "./Toast.vue_vue_type_script_setup_true_lang-Dk2FjAxr.js";
46
46
  export {
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { T as t } from "./Table-CgD2uRtQ.js";
2
+ import { T as t } from "./Table-maK98cK_.js";
3
3
  const a = {
4
4
  install(o) {
5
5
  r(o, t);
@@ -56,8 +56,8 @@ import { p as B } from "./plugin-DMGSStZm.js";
56
56
  import { p as z } from "./plugin-BWfDY9pB.js";
57
57
  import { p as E } from "./plugin-DYHfPgzY.js";
58
58
  import { p as O } from "./plugin-CbBSU30O.js";
59
- import "./Table-CgD2uRtQ.js";
60
- import { p as q } from "./plugin-BPE8jGG3.js";
59
+ import "./Table-maK98cK_.js";
60
+ import { p as q } from "./plugin-C9PvjtX8.js";
61
61
  import "./Tag.vue_vue_type_script_setup_true_lang-BxUnrajl.js";
62
62
  import { p as H } from "./plugin-ByvqWGrA.js";
63
63
  import { p as R } from "./plugin-CU34gb_m.js";
package/dist/plugins.js CHANGED
@@ -56,8 +56,8 @@ import { p as Jr } from "./plugin-DMGSStZm.js";
56
56
  import { p as Nr } from "./plugin-BWfDY9pB.js";
57
57
  import { p as Qr } from "./plugin-DYHfPgzY.js";
58
58
  import { p as Vr } from "./plugin-CbBSU30O.js";
59
- import "./Table-CgD2uRtQ.js";
60
- import { p as Xr } from "./plugin-BPE8jGG3.js";
59
+ import "./Table-maK98cK_.js";
60
+ import { p as Xr } from "./plugin-C9PvjtX8.js";
61
61
  import "./Tag.vue_vue_type_script_setup_true_lang-BxUnrajl.js";
62
62
  import { p as Zr } from "./plugin-ByvqWGrA.js";
63
63
  import { p as $r } from "./plugin-CU34gb_m.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-Ch5M5UPr.js";
1
+ import { p as n } from "./plugins-aV5Gd3xb.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",