adverich-kun-ui 0.1.288 → 0.1.290

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
- import { computed as k, createElementBlock as s, openBlock as l, normalizeClass as c, createCommentVNode as r, unref as a, renderSlot as u, createElementVNode as y, withModifiers as v, Fragment as w, renderList as S, createBlock as h, resolveDynamicComponent as B, createTextVNode as $, toDisplayString as A } from "vue";
2
- import { getValue as d, formatValue as E } from "../../../../utils/tableFormatters.js";
1
+ import { computed as k, createElementBlock as i, openBlock as n, normalizeClass as o, createCommentVNode as u, renderSlot as r, createElementVNode as y, withModifiers as v, Fragment as w, renderList as S, createBlock as h, resolveDynamicComponent as B, unref as c, createTextVNode as $, toDisplayString as A } from "vue";
2
+ import { getValue as x, formatValue as E } from "../../../../utils/tableFormatters.js";
3
3
  const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 dark:hover:bg-slate-600 border-t border-slate-300 dark:border-slate-700", D = "bg-slate-100 dark:bg-slate-900", F = "px-3 py-2 whitespace-nowrap text-sm text-black dark:text-white", z = {
4
4
  __name: "KunTableRow",
5
5
  props: {
@@ -22,90 +22,85 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
22
22
  },
23
23
  emits: ["toggle-expand", "toggle-select", "row-click"],
24
24
  setup(e, { emit: C }) {
25
- const n = e, m = C, b = k(() => [
25
+ const l = e, m = C, b = k(() => [
26
26
  j,
27
27
  D,
28
- n.rowClass,
29
- n.trClass,
30
- n.stripedClass,
31
- n.isSelected ? n.selectedClass : ""
28
+ l.rowClass,
29
+ l.trClass,
30
+ l.stripedClass,
31
+ l.isSelected ? l.selectedClass : ""
32
32
  ]);
33
- function x(o = null, i = null) {
34
- return typeof n.tdClass == "function" ? n.tdClass({
35
- item: n.item,
36
- header: o,
37
- value: i,
38
- index: n.index
39
- }) : n.tdClass;
33
+ function d(a, s, t) {
34
+ return typeof l.tdClass == "function" ? l.tdClass({ item: a, header: s, index: t }) : l.tdClass;
40
35
  }
41
- const f = k(() => ["text-center", n.actionsAlign]);
42
- return (o, i) => (l(), s("tr", {
43
- class: c(b.value),
44
- onClick: i[2] || (i[2] = (t) => m("row-click", { item: e.item, index: e.index, event: t }))
36
+ const f = k(() => ["text-center", l.actionsAlign]);
37
+ return (a, s) => (n(), i("tr", {
38
+ class: o(b.value),
39
+ onClick: s[2] || (s[2] = (t) => m("row-click", { item: e.item, index: e.index, event: t }))
45
40
  }, [
46
- e.showExpand ? (l(), s("td", {
41
+ e.showExpand ? (n(), i("td", {
47
42
  key: 0,
48
- class: c(a(d)(e.item, "expand"))
43
+ class: o(d(e.item, "expand", e.index))
49
44
  }, [
50
- o.$slots.expandIcon ? u(o.$slots, "expand-icon", {
45
+ a.$slots.expandIcon ? r(a.$slots, "expand-icon", {
51
46
  key: 0,
52
47
  item: e.item,
53
48
  index: e.index
54
- }) : (l(), s("button", {
49
+ }) : (n(), i("button", {
55
50
  key: 1,
56
- onClick: i[0] || (i[0] = (t) => m("toggle-expand", e.item))
51
+ onClick: s[0] || (s[0] = (t) => m("toggle-expand", e.item))
57
52
  }, [
58
- e.isExpanded ? (l(), s("span", T, "−")) : (l(), s("span", V, "+"))
53
+ e.isExpanded ? (n(), i("span", T, "−")) : (n(), i("span", V, "+"))
59
54
  ]))
60
- ], 2)) : r("", !0),
61
- e.showSelect ? (l(), s("td", {
55
+ ], 2)) : u("", !0),
56
+ e.showSelect ? (n(), i("td", {
62
57
  key: 1,
63
- class: c([a(d)(e.item, "checkbox"), "h-full w-10 flex flex-col items-center justify-center"])
58
+ class: o([d(e.item, "checkbox", e.index), "h-full w-10 flex flex-col items-center justify-center"])
64
59
  }, [
65
60
  y("input", {
66
61
  type: "checkbox",
67
62
  checked: e.isSelected,
68
- onChange: i[1] || (i[1] = v((t) => m("toggle-select", e.item), ["stop"])),
63
+ onChange: s[1] || (s[1] = v((t) => m("toggle-select", e.item), ["stop"])),
69
64
  class: "h-5 w-5 text-blue-600 transition-all duration-200 ease-in-out rounded"
70
65
  }, null, 40, N)
71
- ], 2)) : r("", !0),
72
- (l(!0), s(w, null, S(e.headers, (t) => {
66
+ ], 2)) : u("", !0),
67
+ (n(!0), i(w, null, S(e.headers, (t) => {
73
68
  var g;
74
- return l(), s("td", {
69
+ return n(), i("td", {
75
70
  key: t.value,
76
- class: c([
71
+ class: o([
77
72
  F,
78
- x(t, a(d)(e.item, t)),
73
+ d(e.item, t, e.index),
79
74
  t.align === "right" ? "text-right" : t.align === "left" ? "text-left" : "text-center"
80
75
  ])
81
76
  }, [
82
- (g = e.customSlots) != null && g[`item.${t.value}`] ? (l(), h(B(e.customSlots[`item.${t.value}`]), {
77
+ (g = e.customSlots) != null && g[`item.${t.value}`] ? (n(), h(B(e.customSlots[`item.${t.value}`]), {
83
78
  key: 0,
84
79
  item: e.item,
85
- value: a(d)(t, e.item),
80
+ value: c(x)(t, e.item),
86
81
  index: e.index,
87
82
  header: t
88
- }, null, 8, ["item", "value", "index", "header"])) : u(o.$slots, `item.${t.value}`, {
83
+ }, null, 8, ["item", "value", "index", "header"])) : r(a.$slots, `item.${t.value}`, {
89
84
  key: 1,
90
85
  item: e.item,
91
- value: a(d)(t, e.item),
86
+ value: c(x)(t, e.item),
92
87
  index: e.index,
93
88
  header: t
94
89
  }, () => [
95
- $(A(a(E)(t, a(d)(t, e.item))), 1)
90
+ $(A(c(E)(t, c(x)(t, e.item))), 1)
96
91
  ])
97
92
  ], 2);
98
93
  }), 128)),
99
- e.hasActions ? (l(), s("td", {
94
+ e.hasActions ? (n(), i("td", {
100
95
  key: 2,
101
- class: c([x(o.header, a(d)(e.item, "actions")), , f.value])
96
+ class: o([d(e.item, "actions", e.index), f.value])
102
97
  }, [
103
- u(o.$slots, "item.actions", {
98
+ r(a.$slots, "item.actions", {
104
99
  item: e.item,
105
100
  index: e.index,
106
101
  loading: e.loading
107
102
  })
108
- ], 2)) : r("", !0)
103
+ ], 2)) : u("", !0)
109
104
  ], 2));
110
105
  }
111
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.288",
3
+ "version": "0.1.290",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",