adverich-kun-ui 0.1.66 → 0.1.67

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.
@@ -87,7 +87,7 @@ const e = {
87
87
  },
88
88
  hideDetails: {
89
89
  type: Boolean,
90
- default: !0
90
+ default: !1
91
91
  },
92
92
  hasIcons: {
93
93
  type: Boolean,
@@ -9,13 +9,13 @@ const H = { class: "w-full flex flex-col relative" }, q = {
9
9
  class: "ml-2"
10
10
  }, O = {
11
11
  key: 0,
12
- class: "min-h-[1.25rem] mt-1"
12
+ class: "min-h-[1.25rem]"
13
13
  }, Q = ["id"], R = {
14
14
  key: 1,
15
- class: "text-xs mt-1 text-center"
15
+ class: "text-xs text-center"
16
16
  }, W = {
17
17
  key: 2,
18
- class: "text-xs mt-1 text-right"
18
+ class: "text-xs text-right"
19
19
  }, _ = {
20
20
  __name: "KunTextField",
21
21
  props: { ...T },
@@ -118,7 +118,7 @@ const H = { class: "w-full flex flex-col relative" }, q = {
118
118
  t(u) ? (r(), s("div", {
119
119
  key: 0,
120
120
  id: `error-${p}`,
121
- class: "text-red-500 text-sm mt-1 text-center"
121
+ class: "text-red-500 text-sm text-center"
122
122
  }, i(t(B) || e.errorMessage), 9, Q)) : e.hint && (e.persistentHint || t(y)) ? (r(), s("div", R, i(e.hint), 1)) : o("", !0),
123
123
  e.counter && e.maxlength ? (r(), s("div", W, i(((C = t(d)) == null ? void 0 : C.length) || 0) + " / " + i(e.maxlength), 1)) : o("", !0)
124
124
  ]))
@@ -8,7 +8,7 @@ const e = {
8
8
  suffix: { type: String, default: "" },
9
9
  rounded: { type: String, default: "rounded" },
10
10
  error: { type: Boolean, default: !1 },
11
- errorMessage: { type: String, default: "Hay un error" },
11
+ errorMessage: { type: String, default: "" },
12
12
  rules: { type: Array, default: () => [] },
13
13
  disabled: { type: Boolean, default: !1 },
14
14
  readonly: { type: Boolean, default: !1 },
@@ -1,7 +1,7 @@
1
- import { ref as n, inject as V, computed as x, watch as F, onUnmounted as E } from "vue";
1
+ import { ref as n, inject as V, computed as x, watch as g, onUnmounted as E } from "vue";
2
2
  import { debounce as T } from "../../../../utils/utils.js";
3
- function P(u, r) {
4
- const t = n(u.modelValue), o = n(!1), l = n(""), a = n(!1), g = n(null), s = n(!1), d = V("registerField", null), v = V("unregisterField", null), h = x(() => u.error || !!l.value && a.value), c = async () => {
3
+ function M(u, r) {
4
+ const t = n(u.modelValue), o = n(!1), l = n(""), a = n(!1), F = n(null), s = n(!1), d = V("registerField", null), v = V("unregisterField", null), h = x(() => u.error || !!l.value && a.value || u.errorMessage), c = async () => {
5
5
  for (const e of u.rules) {
6
6
  const m = await Promise.resolve(e(t.value));
7
7
  if (m !== !0) return m;
@@ -11,9 +11,9 @@ function P(u, r) {
11
11
  const e = await c();
12
12
  l.value = e === !0 ? "" : e;
13
13
  }, u.debounce ?? 300);
14
- F(() => u.modelValue, (e) => {
14
+ g(() => u.modelValue, (e) => {
15
15
  e !== t.value && (s.value = !0, t.value = e);
16
- }), F(t, () => {
16
+ }), g(t, () => {
17
17
  if (s.value) {
18
18
  s.value = !1;
19
19
  return;
@@ -43,7 +43,7 @@ function P(u, r) {
43
43
  return d && d({ validate: i }), E(() => {
44
44
  v && v({ validate: i });
45
45
  }), {
46
- inputField: g,
46
+ inputField: F,
47
47
  inputValue: t,
48
48
  inputFocused: o,
49
49
  validationError: l,
@@ -58,5 +58,5 @@ function P(u, r) {
58
58
  };
59
59
  }
60
60
  export {
61
- P as default
61
+ M as default
62
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",