adverich-kun-ui 0.1.421 → 0.1.423

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,7 +1,7 @@
1
1
  import { ref as o, computed as M, watch as H, nextTick as F } from "vue";
2
2
  import { isArray as x, isObject as O, fullCopy as L } from "../../../../utils/utils.js";
3
3
  function U(n, h, i, s) {
4
- const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
4
+ const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value !== null && l.value !== void 0 ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
5
5
  function j(e, t, u) {
6
6
  var r;
7
7
  if (O(e)) {
@@ -1,4 +1,4 @@
1
- import { computed as l, createElementBlock as a, openBlock as i, normalizeClass as c, renderSlot as d } from "vue";
1
+ import { computed as t, createElementBlock as a, openBlock as i, normalizeClass as c, renderSlot as d } from "vue";
2
2
  const u = {
3
3
  __name: "KunDialogContent",
4
4
  props: {
@@ -12,19 +12,22 @@ const u = {
12
12
  height: String,
13
13
  maxHeight: String
14
14
  },
15
- setup(t) {
16
- const e = t, s = l(() => e.fullscreen ? `fixed inset-0 w-screen h-screen rounded-none shadow-none overflow-visible ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}` : `relative rounded-xl shadow-xl transition-all ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}`), n = l(() => [
17
- s.value,
18
- e.contentClass,
19
- e.bgColor,
20
- e.minWidth,
21
- e.width,
22
- e.maxWidth,
23
- e.height,
24
- e.maxHeight
25
- ]);
26
- return (o, r) => (i(), a("div", {
27
- class: c(n.value)
15
+ setup(s) {
16
+ const e = s, n = t(() => e.fullscreen ? `fixed inset-0 w-screen h-screen rounded-none shadow-none overflow-visible ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}` : `relative rounded-xl shadow-xl transition-all ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}`), r = t(() => {
17
+ var o, l;
18
+ return [
19
+ n.value,
20
+ ...((o = e.bgColor) == null ? void 0 : o.split(" ")) || [],
21
+ ...((l = e.contentClass) == null ? void 0 : l.split(" ")) || [],
22
+ e.minWidth,
23
+ e.width,
24
+ e.maxWidth,
25
+ e.height,
26
+ e.maxHeight
27
+ ];
28
+ });
29
+ return (o, l) => (i(), a("div", {
30
+ class: c(r.value)
28
31
  }, [
29
32
  d(o.$slots, "default")
30
33
  ], 2));
@@ -59,7 +59,7 @@ const Y = {
59
59
  return (e = c.value) == null ? void 0 : e.focus();
60
60
  }
61
61
  });
62
- const m = `input-${U().uid}`, T = d(() => b.value || !!f.value || a.dirty), x = H(), N = d(() => !!x["prepend-inner"]), O = d(() => !!x["append-inner"]), v = q(!1), z = d(() => v.value ? P.eyeOffOutline : P.eyeOutline);
62
+ const m = `input-${U().uid}`, T = d(() => b.value || f.value !== "" || a.dirty), x = H(), N = d(() => !!x["prepend-inner"]), O = d(() => !!x["append-inner"]), v = q(!1), z = d(() => v.value ? P.eyeOffOutline : P.eyeOutline);
63
63
  function A() {
64
64
  v.value = !v.value;
65
65
  }
@@ -1,7 +1,7 @@
1
1
  import { ref as a, inject as V, computed as E, watch as F, onUnmounted as T } from "vue";
2
2
  import { debounce as j } from "../../../../utils/utils.js";
3
3
  function R(u, r) {
4
- const l = a(u.modelValue), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
4
+ const l = a(u.modelValue ?? ""), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
5
5
  for (const e of u.rules) {
6
6
  const m = await Promise.resolve(e(l.value));
7
7
  if (m !== !0) return m;
@@ -12,7 +12,7 @@ function R(u, r) {
12
12
  t.value = e === !0 ? "" : e;
13
13
  }, u.debounce ?? 300);
14
14
  F(() => u.modelValue, (e) => {
15
- e !== l.value && (s.value = !0, l.value = e);
15
+ e !== l.value && (s.value = !0, l.value = e ?? "");
16
16
  }), F(l, () => {
17
17
  if (s.value) {
18
18
  s.value = !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.421",
3
+ "version": "0.1.423",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",