adverich-kun-ui 0.1.227 → 0.1.229

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.
@@ -26,8 +26,8 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
26
26
  bgColor: { type: String, default: "bg-slate-100 dark:bg-slate-900" },
27
27
  height: { type: String, default: "h-fit" },
28
28
  maxHeigh: { type: String, default: "max-h-[100vh]" },
29
- width: { type: String, default: "w-full" },
30
29
  minWidth: { type: String, default: "min-w-1/3" },
30
+ width: { type: String, default: "w-full" },
31
31
  maxWidth: { type: String, default: "max-w-1/3" }
32
32
  },
33
33
  emits: ["update:modelValue"],
@@ -83,8 +83,8 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
83
83
  a($, {
84
84
  fullscreen: e.fullscreen,
85
85
  scrollable: e.scrollable,
86
- width: e.width,
87
86
  "min-width": e.minWidth,
87
+ width: e.width,
88
88
  "max-width": e.maxWidth,
89
89
  height: e.height,
90
90
  "max-height": e.maxHeigh,
@@ -96,7 +96,7 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
96
96
  E(l.$slots, "default")
97
97
  ]),
98
98
  _: 3
99
- }, 8, ["fullscreen", "scrollable", "width", "min-width", "max-width", "height", "max-height", "bg-color", "content-class"])
99
+ }, 8, ["fullscreen", "scrollable", "min-width", "width", "max-width", "height", "max-height", "bg-color", "content-class"])
100
100
  ]),
101
101
  _: 3
102
102
  })
@@ -6,8 +6,8 @@ const h = {
6
6
  scrollable: Boolean,
7
7
  contentClass: String,
8
8
  bgColor: String,
9
- width: String,
10
9
  minWidth: String,
10
+ width: String,
11
11
  maxWidth: String,
12
12
  height: String,
13
13
  maxHeight: String
@@ -17,9 +17,9 @@ const h = {
17
17
  l.value,
18
18
  e.contentClass,
19
19
  e.bgColor,
20
- e.width,
21
- e.width,
22
20
  e.minWidth,
21
+ e.width,
22
+ e.maxWidth,
23
23
  e.height,
24
24
  e.maxHeight
25
25
  ]);
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as x, useSlots as z, computed as E, createElementBlock as l, openBlock as s, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as o, toDisplayString as u, mergeProps as P, createBlock as g, renderSlot as C, Fragment as I, renderList as U } from "vue";
1
+ import { getCurrentInstance as $, useSlots as z, computed as E, createElementBlock as l, openBlock as s, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as o, toDisplayString as u, mergeProps as P, createBlock as g, renderSlot as C, Fragment as I, renderList as U } from "vue";
2
2
  import { KunNumberFieldProps as H } from "../composables/KunNumberFieldProps.js";
3
3
  import { useKunNumberField as L } from "../composables/useKunNumberFieldComposable.js";
4
4
  import V from "../../../KunIcon/src/components/KunIcon.vue.js";
@@ -7,7 +7,7 @@ const q = { class: "w-full flex flex-col relative" }, G = {
7
7
  class: "h-full"
8
8
  }, J = ["disabled"], O = {
9
9
  key: 1,
10
- class: "mr-2"
10
+ class: "mx-2"
11
11
  }, Q = {
12
12
  key: 2,
13
13
  class: "flex items-center justify-center h-full pl-1"
@@ -47,19 +47,19 @@ const q = { class: "w-full flex flex-col relative" }, G = {
47
47
  "keyUp"
48
48
  ],
49
49
  setup(j, { emit: A }) {
50
- const b = j, y = A, c = `number-input-${x().uid}`, k = z(), D = !!k["prepend-icon"], F = !!k["append-icon"], {
50
+ const b = j, y = A, c = `number-input-${$().uid}`, k = z(), D = !!k["prepend-icon"], F = !!k["append-icon"], {
51
51
  inputValue: f,
52
52
  numberInput: K,
53
- inputKey: B,
54
- updateValue: M,
53
+ inputKey: x,
54
+ updateValue: B,
55
55
  onIncrement: d,
56
56
  onDecrement: a,
57
57
  onClear: m,
58
58
  focus: h,
59
59
  handleFocus: v,
60
- isActive: N,
60
+ isActive: M,
61
61
  handleBlur: w
62
- } = L(b, y), S = E(() => b.density === "compact" ? "p-1" : b.density === "comfortable" ? "p-2" : "p-3");
62
+ } = L(b, y), N = E(() => b.density === "compact" ? "p-1" : b.density === "comfortable" ? "p-2" : "p-3");
63
63
  return (e, r) => (s(), l("div", q, [
64
64
  e.label ? (s(), l("label", {
65
65
  key: 0,
@@ -67,7 +67,7 @@ const q = { class: "w-full flex flex-col relative" }, G = {
67
67
  class: p([
68
68
  e.labelColor,
69
69
  "absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10",
70
- o(N) || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
70
+ o(M) || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
71
71
  ])
72
72
  }, u(e.label), 3)) : n("", !0),
73
73
  i("div", P({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
@@ -99,7 +99,7 @@ const q = { class: "w-full flex flex-col relative" }, G = {
99
99
  id: c,
100
100
  ref_key: "numberInput",
101
101
  ref: K,
102
- key: o(B),
102
+ key: o(x),
103
103
  type: "text",
104
104
  value: o(f),
105
105
  placeholder: e.placeholder,
@@ -107,9 +107,9 @@ const q = { class: "w-full flex flex-col relative" }, G = {
107
107
  disabled: e.disabled,
108
108
  maxlength: e.maxlength,
109
109
  autocomplete: "off",
110
- class: p(["w-full h-full bg-transparent rounded focus:outline-none", [S.value, e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
110
+ class: p(["w-full h-full bg-transparent rounded focus:outline-none", [N.value, e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
111
111
  "aria-invalid": e.error ? "true" : "false",
112
- onInput: r[1] || (r[1] = (t) => o(M)(t.target.value)),
112
+ onInput: r[1] || (r[1] = (t) => o(B)(t.target.value)),
113
113
  onBlur: r[2] || (r[2] = (...t) => o(w) && o(w)(...t)),
114
114
  onFocus: r[3] || (r[3] = (...t) => o(v) && o(v)(...t)),
115
115
  onKeydown: r[4] || (r[4] = (t) => y("keyDown", t)),
@@ -179,7 +179,7 @@ const q = { class: "w-full flex flex-col relative" }, G = {
179
179
  e.hideDetails ? n("", !0) : (s(), l("div", le, [
180
180
  e.error || e.errorMessages ? (s(), l("div", ne, [
181
181
  Array.isArray(e.errorMessages) ? (s(), l("div", ie, [
182
- (s(!0), l(I, null, U(e.errorMessages, (t, $) => (s(), l("div", { key: $ }, u(t), 1))), 128))
182
+ (s(!0), l(I, null, U(e.errorMessages, (t, S) => (s(), l("div", { key: S }, u(t), 1))), 128))
183
183
  ])) : typeof e.errorMessages == "string" ? (s(), l("div", de, u(e.errorMessages), 1)) : n("", !0)
184
184
  ])) : e.hint && (e.persistentHint || o(h)) ? (s(), l("div", ae, u(e.hint), 1)) : n("", !0)
185
185
  ]))
@@ -1,4 +1,4 @@
1
- import { computed as y, ref as g, onMounted as C, createBlock as V, createCommentVNode as $, openBlock as d, withCtx as l, createElementVNode as c, createVNode as o, createElementBlock as N, Fragment as b, renderList as B, createTextVNode as x } from "vue";
1
+ import { computed as k, ref as g, onMounted as C, createBlock as V, createCommentVNode as $, openBlock as d, withCtx as l, createElementVNode as c, createVNode as o, createElementBlock as N, Fragment as b, renderList as B, createTextVNode as x } from "vue";
2
2
  import j from "../../../KunDialog/src/components/KunDialog.vue.js";
3
3
  import w from "../../../KunRow/src/components/KunRow.vue.js";
4
4
  import z from "../../../KunCol/src/components/KunCol.vue.js";
@@ -15,21 +15,21 @@ const E = { class: "w-full" }, I = { class: "flex justify-end" }, L = { class: "
15
15
  },
16
16
  emits: ["update:modelValue", "applyFilters", "clearFilters"],
17
17
  setup(p, { emit: v }) {
18
- const n = p, a = v, m = y({
19
- get: () => n.modelValue,
18
+ const r = p, a = v, m = k({
19
+ get: () => r.modelValue,
20
20
  set: (i) => a("update:modelValue", i)
21
- }), r = g({});
21
+ }), s = g({});
22
22
  C(() => {
23
- r.value = { ...n.filters.reduce((i, t) => {
23
+ s.value = { ...r.filters.reduce((i, t) => {
24
24
  var _;
25
- const e = t.key, s = (_ = n.activeFilters) == null ? void 0 : _[e];
26
- return s !== void 0 && (i[e] = s), i;
25
+ const e = t.key, n = (_ = r.activeFilters) == null ? void 0 : _[e];
26
+ return n !== void 0 && (i[e] = n), i;
27
27
  }, {}) };
28
28
  });
29
29
  function F() {
30
- a("applyFilters", r.value), u();
30
+ a("applyFilters", s.value), u();
31
31
  }
32
- function k() {
32
+ function y() {
33
33
  a("clearFilters"), u();
34
34
  }
35
35
  function u() {
@@ -66,13 +66,13 @@ const E = { class: "w-full" }, I = { class: "flex justify-end" }, L = { class: "
66
66
  default: l(() => [
67
67
  o(U, {
68
68
  multiple: "",
69
- modelValue: r.value[e.value],
70
- "onUpdate:modelValue": (s) => r.value[e.value] = s,
69
+ modelValue: s.value[e.value],
70
+ "onUpdate:modelValue": (n) => s.value[e.value] = n,
71
71
  items: e.items,
72
72
  "item-value": "id",
73
73
  "item-title": e.title,
74
74
  "z-index": "z-250",
75
- "text-no-items": e.textNoItem
75
+ "text-no-items": e.textNoItem ?? `No hay (${e.name} ?? elementos) disponibles`
76
76
  }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "item-title", "text-no-items"])
77
77
  ]),
78
78
  _: 2
@@ -81,7 +81,7 @@ const E = { class: "w-full" }, I = { class: "flex justify-end" }, L = { class: "
81
81
  _: 1
82
82
  }),
83
83
  c("div", L, [
84
- o(f, { onClick: k }, {
84
+ o(f, { onClick: y }, {
85
85
  default: l(() => t[1] || (t[1] = [
86
86
  x(" Limpiar filtros ")
87
87
  ])),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.227",
3
+ "version": "0.1.229",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",