adverich-kun-ui 0.1.294 → 0.1.296

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.
@@ -75,7 +75,7 @@ const Ae = ["placeholder"], Me = { key: 0 }, Ee = { key: 5 }, Re = { class: "h-f
75
75
  return (e, t) => (l(), m("div", A({ class: ne }, e.$attrs, { style: { "user-select": "text" } }), [
76
76
  s(B) || e.filterable || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), m("div", {
77
77
  key: 0,
78
- class: j(["p-2 bg-slate-200 dark:bg-slate-800", {
78
+ class: j(["p-2 bg-slate-200 dark:bg-slate-800 print:hidden", {
79
79
  "justify-start flex": e.searchPosition === "start",
80
80
  "justify-center flex": e.searchPosition === "center",
81
81
  "justify-end flex": e.searchPosition === "end"
@@ -27,14 +27,14 @@ const j = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
27
27
  function x() {
28
28
  c("toggle-select-all");
29
29
  }
30
- function S(l) {
30
+ function p(l) {
31
31
  if (!l.sortable) return;
32
32
  let s = null;
33
33
  Array.isArray(t.sortBy) ? s = t.sortBy.find((f) => f.key === l.value) : typeof t.sortBy == "string" && (s = t.sortBy === l.value ? { key: l.value, order: "asc" } : null);
34
34
  const e = (s == null ? void 0 : s.order) === "asc" ? "desc" : "asc";
35
35
  c("sort", { key: l.value, order: e });
36
36
  }
37
- function p(l) {
37
+ function S(l) {
38
38
  var s;
39
39
  if (Array.isArray(t.sortBy))
40
40
  return (s = t.sortBy.find((e) => e.key === l.value)) == null ? void 0 : s.order;
@@ -42,7 +42,7 @@ const j = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
42
42
  return "asc";
43
43
  }
44
44
  const C = (l) => {
45
- const s = p(l);
45
+ const s = S(l);
46
46
  return s ? s === "asc" ? I : L : O;
47
47
  }, B = [F, t.theadClass], w = [H, t.trClass], i = [K, t.thClass], u = A(null), y = () => {
48
48
  u.value && (u.value.indeterminate = t.someSelected && !t.allSelected);
@@ -75,13 +75,13 @@ const j = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
75
75
  checked: n.allSelected,
76
76
  "aria-checked": n.someSelected && !n.allSelected ? "mixed" : n.allSelected ? "true" : "false",
77
77
  onChange: x,
78
- class: "h-6 w-6 text-blue-600 transition-all duration-200 ease-in-out rounded border-gray-300 dark:border-slate-600 checked:bg-blue-600 checked:border-blue-600 indeterminate:bg-blue-400 indeterminate:border-blue-400"
78
+ class: "h-6 w-6 text-blue-600 transition-all duration-200 ease-in-out rounded print:hidden border-gray-300 dark:border-slate-600 checked:bg-blue-600 checked:border-blue-600 indeterminate:bg-blue-400 indeterminate:border-blue-400"
79
79
  }, null, 40, R)
80
80
  ])) : d("", !0),
81
81
  (o(!0), r(E, null, T(n.headers, (e) => (o(), r("th", {
82
82
  key: e.key,
83
83
  class: a([i, e.headerAlign === "right" ? "text-right" : e.headerAlign === "left" ? "text-left" : "text-center"]),
84
- onClick: (f) => S(e),
84
+ onClick: (f) => p(e),
85
85
  style: $({ cursor: e.sortable ? "pointer" : "default" })
86
86
  }, [
87
87
  g(l.$slots, `header.${e.key}`, { header: e }, () => [
@@ -93,7 +93,7 @@ const j = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
93
93
  ], 14, U))), 128)),
94
94
  n.hasActions ? (o(), r("th", {
95
95
  key: 2,
96
- class: a([[i], "text-center"])
96
+ class: a([[i], "text-center print:hidden"])
97
97
  }, h(n.actionLabel), 3)) : d("", !0)
98
98
  ])
99
99
  ]));
@@ -1,4 +1,4 @@
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";
1
+ import { computed as k, createElementBlock as l, openBlock as n, normalizeClass as o, createCommentVNode as r, renderSlot as u, 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
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",
@@ -22,40 +22,40 @@ 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 l = e, m = C, b = k(() => [
25
+ const i = e, m = C, b = k(() => [
26
26
  j,
27
27
  D,
28
- l.rowClass,
29
- l.trClass,
30
- l.stripedClass,
31
- l.isSelected ? l.selectedClass : ""
28
+ i.rowClass,
29
+ i.trClass,
30
+ i.stripedClass,
31
+ i.isSelected ? i.selectedClass : ""
32
32
  ]);
33
33
  function d(a, s, t) {
34
- return typeof l.tdClass == "function" ? l.tdClass({ item: a, header: s, index: t }) : l.tdClass;
34
+ return typeof i.tdClass == "function" ? i.tdClass({ item: a, header: s, index: t }) : i.tdClass;
35
35
  }
36
- const f = k(() => ["text-center", l.actionsAlign]);
37
- return (a, s) => (n(), i("tr", {
36
+ const f = k(() => ["text-center", i.actionsAlign]);
37
+ return (a, s) => (n(), l("tr", {
38
38
  class: o(b.value),
39
39
  onClick: s[2] || (s[2] = (t) => m("row-click", { item: e.item, index: e.index, event: t }))
40
40
  }, [
41
- e.showExpand ? (n(), i("td", {
41
+ e.showExpand ? (n(), l("td", {
42
42
  key: 0,
43
- class: o(d(e.item, "expand", e.index))
43
+ class: o(["print:hidden", d(e.item, "expand", e.index)])
44
44
  }, [
45
- a.$slots.expandIcon ? r(a.$slots, "expand-icon", {
45
+ a.$slots.expandIcon ? u(a.$slots, "expand-icon", {
46
46
  key: 0,
47
47
  item: e.item,
48
48
  index: e.index
49
- }) : (n(), i("button", {
49
+ }) : (n(), l("button", {
50
50
  key: 1,
51
51
  onClick: s[0] || (s[0] = (t) => m("toggle-expand", e.item))
52
52
  }, [
53
- e.isExpanded ? (n(), i("span", T, "−")) : (n(), i("span", V, "+"))
53
+ e.isExpanded ? (n(), l("span", T, "−")) : (n(), l("span", V, "+"))
54
54
  ]))
55
- ], 2)) : u("", !0),
56
- e.showSelect ? (n(), i("td", {
55
+ ], 2)) : r("", !0),
56
+ e.showSelect ? (n(), l("td", {
57
57
  key: 1,
58
- class: o([d(e.item, "checkbox", e.index), "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 print:hidden"])
59
59
  }, [
60
60
  y("input", {
61
61
  type: "checkbox",
@@ -63,10 +63,10 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
63
63
  onChange: s[1] || (s[1] = v((t) => m("toggle-select", e.item), ["stop"])),
64
64
  class: "h-5 w-5 text-blue-600 transition-all duration-200 ease-in-out rounded"
65
65
  }, null, 40, N)
66
- ], 2)) : u("", !0),
67
- (n(!0), i(w, null, S(e.headers, (t) => {
66
+ ], 2)) : r("", !0),
67
+ (n(!0), l(w, null, S(e.headers, (t) => {
68
68
  var g;
69
- return n(), i("td", {
69
+ return n(), l("td", {
70
70
  key: t.value,
71
71
  class: o([
72
72
  F,
@@ -80,7 +80,7 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
80
80
  value: c(x)(t, e.item),
81
81
  index: e.index,
82
82
  header: t
83
- }, null, 8, ["item", "value", "index", "header"])) : r(a.$slots, `item.${t.value}`, {
83
+ }, null, 8, ["item", "value", "index", "header"])) : u(a.$slots, `item.${t.value}`, {
84
84
  key: 1,
85
85
  item: e.item,
86
86
  value: c(x)(t, e.item),
@@ -91,16 +91,16 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
91
91
  ])
92
92
  ], 2);
93
93
  }), 128)),
94
- e.hasActions ? (n(), i("td", {
94
+ e.hasActions ? (n(), l("td", {
95
95
  key: 2,
96
- class: o([d(e.item, "actions", e.index), f.value])
96
+ class: o(["print:hidden", [d(e.item, "actions", e.index), f.value]])
97
97
  }, [
98
- r(a.$slots, "item.actions", {
98
+ u(a.$slots, "item.actions", {
99
99
  item: e.item,
100
100
  index: e.index,
101
101
  loading: e.loading
102
102
  })
103
- ], 2)) : u("", !0)
103
+ ], 2)) : r("", !0)
104
104
  ], 2));
105
105
  }
106
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.294",
3
+ "version": "0.1.296",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",