adverich-kun-ui 0.1.231 → 0.1.233

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,12 +1,12 @@
1
- import { computed as k, ref as g, onMounted as C, createBlock as x, createCommentVNode as $, openBlock as d, withCtx as l, createElementVNode as c, createVNode as o, createElementBlock as N, Fragment as b, renderList as z, createTextVNode as V } from "vue";
2
- import B from "../../../KunDialog/src/components/KunDialog.vue.js";
3
- import j from "../../../KunRow/src/components/KunRow.vue.js";
4
- import w from "../../../KunCol/src/components/KunCol.vue.js";
5
- import U from "../../../KunAutocomplete/src/components/KunAutocomplete.vue.js";
6
- import f from "../../../KunBtn/src/components/KunBtn.vue.js";
7
- import A from "../../../KunIcon/src/components/KunIcon.vue.js";
8
- import D from "../../../../icons/IconClose.vue.js";
9
- const E = { class: "w-full" }, I = { class: "flex justify-end px-1" }, L = { class: "flex justify-end mt-8 p-2 gap-x-2" }, G = {
1
+ import { computed as k, ref as g, onMounted as C, createBlock as x, createCommentVNode as $, openBlock as d, withCtx as l, createElementVNode as c, createVNode as o, createElementBlock as N, Fragment as b, renderList as h, createTextVNode as V } from "vue";
2
+ import z from "../../../KunDialog/src/components/KunDialog.vue.js";
3
+ import B from "../../../KunRow/src/components/KunRow.vue.js";
4
+ import j from "../../../KunCol/src/components/KunCol.vue.js";
5
+ import w from "../../../KunAutocomplete/src/components/KunAutocomplete.vue.js";
6
+ import p from "../../../KunBtn/src/components/KunBtn.vue.js";
7
+ import T from "../../../KunIcon/src/components/KunIcon.vue.js";
8
+ import U from "../../../../icons/IconClose.vue.js";
9
+ const A = { class: "w-full" }, D = { class: "flex justify-end px-1" }, E = { class: "flex justify-end mt-8 p-2 gap-x-2" }, q = {
10
10
  __name: "KunTableFilter",
11
11
  props: {
12
12
  modelValue: Boolean,
@@ -14,28 +14,28 @@ const E = { class: "w-full" }, I = { class: "flex justify-end px-1" }, L = { cla
14
14
  activeFilters: Object
15
15
  },
16
16
  emits: ["update:modelValue", "applyFilters", "clearFilters"],
17
- setup(p, { emit: v }) {
18
- const r = p, a = v, m = k({
19
- get: () => r.modelValue,
20
- set: (i) => a("update:modelValue", i)
17
+ setup(f, { emit: v }) {
18
+ const n = f, i = v, m = k({
19
+ get: () => n.modelValue,
20
+ set: (a) => i("update:modelValue", a)
21
21
  }), s = g({});
22
22
  C(() => {
23
- s.value = { ...r.filters.reduce((i, t) => {
23
+ s.value = { ...n.filters.reduce((a, t) => {
24
24
  var _;
25
- const e = t.key, n = (_ = r.activeFilters) == null ? void 0 : _[e];
26
- return n !== void 0 && (i[e] = n), i;
25
+ const e = t.key, r = (_ = n.activeFilters) == null ? void 0 : _[e];
26
+ return r !== void 0 && (a[e] = r), a;
27
27
  }, {}) };
28
28
  });
29
29
  function F() {
30
- a("applyFilters", s.value), u();
30
+ i("applyFilters", s.value), u();
31
31
  }
32
32
  function y() {
33
- a("clearFilters"), u();
33
+ i("clearFilters"), u();
34
34
  }
35
35
  function u() {
36
- a("update:modelValue", !1);
36
+ i("update:modelValue", !1);
37
37
  }
38
- return (i, t) => m.value ? (d(), x(B, {
38
+ return (a, t) => m.value ? (d(), x(z, {
39
39
  key: 0,
40
40
  modelValue: m.value,
41
41
  "onUpdate:modelValue": t[0] || (t[0] = (e) => m.value = e),
@@ -43,56 +43,58 @@ const E = { class: "w-full" }, I = { class: "flex justify-end px-1" }, L = { cla
43
43
  maxWidth: "max-w-1/2"
44
44
  }, {
45
45
  default: l(() => [
46
- c("div", E, [
47
- c("div", I, [
48
- o(f, {
46
+ c("div", A, [
47
+ c("div", D, [
48
+ o(p, {
49
49
  onClick: u,
50
50
  rounded: "rounded-full",
51
51
  size: "xxs",
52
52
  bgColor: "bg-transparent"
53
53
  }, {
54
54
  default: l(() => [
55
- o(A, {
55
+ o(T, {
56
56
  color: "text-red-500",
57
- icon: D,
57
+ icon: U,
58
58
  size: "text-lg"
59
59
  })
60
60
  ]),
61
61
  _: 1
62
62
  })
63
63
  ]),
64
- o(j, null, {
64
+ o(B, null, {
65
65
  default: l(() => [
66
- (d(!0), N(b, null, z(p.filters, (e) => (d(), x(w, {
66
+ (d(!0), N(b, null, h(f.filters, (e) => (d(), x(j, {
67
67
  cols: "4",
68
68
  class: "px-2"
69
69
  }, {
70
70
  default: l(() => [
71
- o(U, {
71
+ o(w, {
72
72
  multiple: "",
73
73
  modelValue: s.value[e.value],
74
- "onUpdate:modelValue": (n) => s.value[e.value] = n,
74
+ "onUpdate:modelValue": (r) => s.value[e.value] = r,
75
75
  items: e.items,
76
+ "z-index": "z-250",
76
77
  "item-value": "id",
77
78
  "item-title": e.title ?? e.text,
78
- "z-index": "z-250",
79
- "text-no-items": e.textNoItem ?? `No hay ${e.name ?? "elementos"} disponibles`
80
- }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "item-title", "text-no-items"])
79
+ "item-text": "filter.text",
80
+ "text-no-items": e.textNoItem ?? `No hay ${e.name ?? "elementos"} disponibles`,
81
+ "placeholder-text": e.placeholderText ?? "Seleccionar"
82
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "item-title", "text-no-items", "placeholder-text"])
81
83
  ]),
82
84
  _: 2
83
85
  }, 1024))), 256))
84
86
  ]),
85
87
  _: 1
86
88
  }),
87
- c("div", L, [
88
- o(f, { onClick: y }, {
89
+ c("div", E, [
90
+ o(p, { onClick: y }, {
89
91
  default: l(() => t[1] || (t[1] = [
90
92
  V(" Limpiar filtros ")
91
93
  ])),
92
94
  _: 1,
93
95
  __: [1]
94
96
  }),
95
- o(f, { onClick: F }, {
97
+ o(p, { onClick: F }, {
96
98
  default: l(() => t[2] || (t[2] = [
97
99
  V(" Aplicar ")
98
100
  ])),
@@ -107,5 +109,5 @@ const E = { class: "w-full" }, I = { class: "flex justify-end px-1" }, L = { cla
107
109
  }
108
110
  };
109
111
  export {
110
- G as default
112
+ q as default
111
113
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.231",
3
+ "version": "0.1.233",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",