adverich-kun-ui 0.1.160 → 0.1.161

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,9 +1,9 @@
1
- import { createElementBlock as n, openBlock as s, normalizeClass as f, createElementVNode as i, createCommentVNode as d, renderSlot as c, withModifiers as r, Fragment as b, renderList as v, toDisplayString as x, unref as m, createTextVNode as w } from "vue";
1
+ import { createElementBlock as i, openBlock as n, normalizeClass as x, createElementVNode as l, createCommentVNode as d, renderSlot as c, withModifiers as r, Fragment as v, renderList as w, toDisplayString as g, unref as m, createTextVNode as h } from "vue";
2
2
  import { getValue as u, formatValue as y } from "../../../../utils/tableFormatters.js";
3
- const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key: 0 }, S = { key: 0 }, E = { key: 1 }, $ = { key: 1 }, V = ["checked"], N = { class: "flex flex-col gap-2" }, j = { class: "font-semibold text-slate-600 dark:text-slate-300" }, A = { class: "text-right text-slate-800 dark:text-slate-100" }, T = {
3
+ const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key: 0 }, S = { key: 0 }, E = { key: 1 }, $ = { key: 1 }, V = ["checked"], j = { class: "flex flex-col gap-2" }, A = { class: "font-semibold text-slate-600 dark:text-slate-300" }, N = {
4
4
  key: 0,
5
- class: "mt-4"
6
- }, F = {
5
+ class: "flex justify-between items-start mt-4 text-sm"
6
+ }, T = { class: "text-right" }, F = {
7
7
  __name: "KunTableIterator",
8
8
  props: {
9
9
  item: Object,
@@ -18,61 +18,70 @@ const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key:
18
18
  rowClass: String
19
19
  },
20
20
  emits: ["toggle-expand", "toggle-select", "row-click"],
21
- setup(e, { emit: g }) {
22
- const k = e, l = g, h = [
21
+ setup(e, { emit: f }) {
22
+ const k = e, o = f, b = [
23
23
  "border border-slate-300 dark:border-slate-700 rounded p-4 bg-white dark:bg-slate-900 shadow-sm",
24
24
  k.rowClass
25
25
  ];
26
- return (a, o) => (s(), n("div", {
27
- class: f(h),
28
- onClick: o[2] || (o[2] = (t) => l("row-click", { item: e.item, index: e.index, event: t }))
26
+ return (a, s) => (n(), i("div", {
27
+ class: x(b),
28
+ onClick: s[2] || (s[2] = (t) => o("row-click", { item: e.item, index: e.index, event: t }))
29
29
  }, [
30
- i("div", C, [
31
- e.showExpand ? (s(), n("div", B, [
30
+ l("div", C, [
31
+ e.showExpand ? (n(), i("div", B, [
32
32
  c(a.$slots, "expand-icon", {
33
33
  item: e.item,
34
34
  index: e.index
35
35
  }, () => [
36
- i("button", {
36
+ l("button", {
37
37
  class: "text-xl font-bold focus:outline-none",
38
- onClick: o[0] || (o[0] = r((t) => l("toggle-expand", e.item), ["stop"]))
38
+ onClick: s[0] || (s[0] = r((t) => o("toggle-expand", e.item), ["stop"]))
39
39
  }, [
40
- e.isExpanded ? (s(), n("span", S, "−")) : (s(), n("span", E, "+"))
40
+ e.isExpanded ? (n(), i("span", S, "−")) : (n(), i("span", E, "+"))
41
41
  ])
42
42
  ])
43
43
  ])) : d("", !0),
44
- e.showSelect ? (s(), n("div", $, [
45
- i("input", {
44
+ e.showSelect ? (n(), i("div", $, [
45
+ l("input", {
46
46
  type: "checkbox",
47
47
  checked: e.isSelected,
48
- onChange: o[1] || (o[1] = r((t) => l("toggle-select", e.item), ["stop"])),
48
+ onChange: s[1] || (s[1] = r((t) => o("toggle-select", e.item), ["stop"])),
49
49
  class: "form-checkbox w-5 h-5"
50
50
  }, null, 40, V)
51
51
  ])) : d("", !0)
52
52
  ]),
53
- i("div", N, [
54
- (s(!0), n(b, null, v(e.headers, (t) => (s(), n("div", {
53
+ l("div", j, [
54
+ (n(!0), i(v, null, w(e.headers, (t) => (n(), i("div", {
55
55
  key: t.value,
56
56
  class: "flex justify-between text-sm"
57
57
  }, [
58
- i("div", j, x(t.text), 1),
59
- i("div", A, [
58
+ l("div", A, g(t.label ?? t.text), 1),
59
+ l("div", {
60
+ class: x(["text-right text-slate-800 dark:text-slate-100", {
61
+ "text-right": t.align === "right",
62
+ "text-center": t.align === "center",
63
+ "text-left": t.align === "left" || !t.align
64
+ }])
65
+ }, [
60
66
  c(a.$slots, `item.${t.value}`, {
61
67
  item: e.item,
62
68
  value: m(u)(t, e.item),
63
69
  index: e.index
64
70
  }, () => [
65
- w(x(m(y)(t, m(u)(t, e.item))), 1)
71
+ h(g(m(y)(t, m(u)(t, e.item))), 1)
66
72
  ])
67
- ])
73
+ ], 2)
68
74
  ]))), 128))
69
75
  ]),
70
- e.hasActions ? (s(), n("div", T, [
71
- c(a.$slots, "item.actions", {
72
- item: e.item,
73
- index: e.index,
74
- loading: e.loading
75
- })
76
+ e.hasActions ? (n(), i("div", N, [
77
+ s[3] || (s[3] = l("div", { class: "font-semibold text-slate-600 dark:text-slate-300" }, " Acciones ", -1)),
78
+ l("div", T, [
79
+ c(a.$slots, "item.actions", {
80
+ item: e.item,
81
+ index: e.index,
82
+ loading: e.loading
83
+ })
84
+ ])
76
85
  ])) : d("", !0)
77
86
  ]));
78
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.160",
3
+ "version": "0.1.161",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",