adverich-kun-ui 0.1.488 → 0.1.490

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.
@@ -10,7 +10,7 @@ const O = {
10
10
  }, G = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
11
11
  __name: "KunAppbar",
12
12
  props: {
13
- bgColor: { type: String, default: "bg-red-700" },
13
+ bgColor: { type: String, default: "bg-transparent" },
14
14
  title: String,
15
15
  titleImage: String,
16
16
  titleSize: { type: String, default: "text-base" },
@@ -44,7 +44,7 @@ const O = {
44
44
  },
45
45
  animationClass: { type: String, default: "" }
46
46
  },
47
- setup(e, { expose: w }) {
47
+ setup(e, { expose: p }) {
48
48
  const t = e, r = d(null), y = d(!0), h = d(!1);
49
49
  function u() {
50
50
  j(() => {
@@ -67,11 +67,11 @@ const O = {
67
67
  u(), t.autoHideOnScroll && window.addEventListener("scroll", S), t.responsiveCollapse && (window.addEventListener("resize", c), c());
68
68
  }), I(u), $(() => {
69
69
  window.removeEventListener("scroll", S), window.removeEventListener("resize", c);
70
- }), w({
70
+ }), p({
71
71
  el: r,
72
72
  updateHeight: u
73
73
  });
74
- const p = f(() => {
74
+ const w = f(() => {
75
75
  if (t.height) return t.height;
76
76
  switch (t.density) {
77
77
  case "comfortable":
@@ -85,7 +85,7 @@ const O = {
85
85
  const i = ["sm", "md", "lg", "xl", "2xl"];
86
86
  return t.elevation === "none" || !i.includes(t.elevation) ? "" : `shadow-${t.elevation}`;
87
87
  }), z = f(() => [
88
- p.value,
88
+ w.value,
89
89
  t.bgColor,
90
90
  k.value,
91
91
  t.bordered ? t.borderColor : "",
@@ -1,13 +1,13 @@
1
1
  import { getCurrentInstance as z, useSlots as E, computed as P, createElementBlock as l, openBlock as r, createCommentVNode as n, createElementVNode as d, normalizeClass as y, toDisplayString as u, mergeProps as R, unref as o, createBlock as I, renderSlot as x, createVNode as V, withCtx as U, Fragment as j, renderList as H } from "vue";
2
2
  import { KunNumberFieldProps as L } from "../composables/KunNumberFieldProps.js";
3
- import { useKunNumberField as q } from "../composables/useKunNumberFieldComposable.js";
4
- import G from "../../../KunBtn/src/components/KunBtn.vue.js";
3
+ import { useKunNumberField as T } from "../composables/useKunNumberFieldComposable.js";
4
+ import q from "../../../KunBtn/src/components/KunBtn.vue.js";
5
5
  import f from "../../../KunIcon/src/components/KunIcon.vue.js";
6
- import J from "../../../../icons/IconClose.vue.js";
7
- const O = {
6
+ import G from "../../../../icons/IconClose.vue.js";
7
+ const J = {
8
8
  key: 0,
9
9
  class: "h-full"
10
- }, Q = ["disabled"], T = {
10
+ }, O = ["disabled"], Q = {
11
11
  key: 1,
12
12
  class: "mx-2"
13
13
  }, W = {
@@ -64,13 +64,15 @@ const O = {
64
64
  focus: w,
65
65
  handleFocus: g,
66
66
  handleBlur: C
67
- } = q(p, b);
67
+ } = T(p, b);
68
68
  F({
69
69
  numberInput: c,
70
70
  rootRef: v,
71
71
  focus: () => {
72
- var e;
73
- return (e = c.value) == null ? void 0 : e.focus();
72
+ nextTick(() => {
73
+ var e;
74
+ (e = c.value) == null || e.focus();
75
+ });
74
76
  }
75
77
  });
76
78
  const S = P(() => p.density === "compact" ? "p-1" : p.density === "comfortable" ? "p-2" : "p-3");
@@ -98,15 +100,15 @@ const O = {
98
100
  e.error ? "bg-red-200 dark:bg-red-900" : ""
99
101
  ]])
100
102
  }, [
101
- !e.noArrows && e.controlVariant === "split" ? (r(), l("div", O, [
103
+ !e.noArrows && e.controlVariant === "split" ? (r(), l("div", J, [
102
104
  d("button", {
103
105
  type: "button",
104
106
  class: "p-3 text-lg border-r border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
105
107
  onClick: s[0] || (s[0] = (...t) => o(a) && o(a)(...t)),
106
108
  disabled: e.disabled || e.readonly
107
- }, "−", 8, Q)
109
+ }, "−", 8, O)
108
110
  ])) : n("", !0),
109
- e.prefix ? (r(), l("div", T, u(e.prefix), 1)) : n("", !0),
111
+ e.prefix ? (r(), l("div", Q, u(e.prefix), 1)) : n("", !0),
110
112
  e.prependIcon || N ? (r(), l("div", W, [
111
113
  e.prependIcon ? (r(), I(f, {
112
114
  key: 0,
@@ -134,7 +136,7 @@ const O = {
134
136
  pattern: "[0-9]+([\\.,][0-9]+)?"
135
137
  }, null, 42, X),
136
138
  e.clearable && o(h) != null ? (r(), l("div", Y, [
137
- V(G, {
139
+ V(q, {
138
140
  onClick: o(B),
139
141
  rounded: "rounded-full",
140
142
  bgColor: "bg-red-500/75",
@@ -143,7 +145,7 @@ const O = {
143
145
  }, {
144
146
  default: U(() => [
145
147
  V(f, {
146
- icon: J,
148
+ icon: G,
147
149
  size: "text-xs"
148
150
  })
149
151
  ]),
@@ -32,34 +32,36 @@ const Y = {
32
32
  "keyDown",
33
33
  "keyUp"
34
34
  ],
35
- setup(V, { expose: D, emit: j }) {
36
- const a = V, p = j, {
35
+ setup(V, { expose: D, emit: T }) {
36
+ const a = V, p = T, {
37
37
  inputField: b,
38
38
  inputValue: f,
39
39
  rootRef: w,
40
40
  inputFocused: h,
41
- validationError: B,
41
+ validationError: j,
42
42
  hasError: y,
43
43
  handleInput: g,
44
44
  handleBlur: C,
45
45
  focusInput: I,
46
- validate: E,
47
- reset: K,
48
- resetValidation: S,
46
+ validate: B,
47
+ reset: E,
48
+ resetValidation: K,
49
49
  clearInput: $
50
50
  } = W(a, p);
51
51
  D({
52
- validate: E,
53
- reset: K,
54
- resetValidation: S,
52
+ validate: B,
53
+ reset: E,
54
+ resetValidation: K,
55
55
  inputField: b,
56
56
  rootRef: w,
57
57
  focus: () => {
58
- var e;
59
- return (e = b.value) == null ? void 0 : e.focus();
58
+ nextTick(() => {
59
+ var e;
60
+ (e = b.value) == null || e.focus();
61
+ });
60
62
  }
61
63
  });
62
- const m = `input-${U().uid}`, T = d(() => h.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);
64
+ const m = `input-${U().uid}`, S = d(() => h.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
65
  function A() {
64
66
  v.value = !v.value;
65
67
  }
@@ -77,7 +79,7 @@ const Y = {
77
79
  class: u([
78
80
  e.labelColor,
79
81
  "absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10",
80
- T.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
82
+ S.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
81
83
  ])
82
84
  }, i(e.label), 3)) : r("", !0),
83
85
  k("div", G({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
@@ -146,7 +148,7 @@ const Y = {
146
148
  key: 0,
147
149
  id: `error-${m}`,
148
150
  class: "text-red-500 text-sm text-center"
149
- }, i(t(B) || e.errorMessage), 9, se)) : e.hint && (e.persistentHint || t(h)) ? (o(), n("div", ne, i(e.hint), 1)) : r("", !0),
151
+ }, i(t(j) || e.errorMessage), 9, se)) : e.hint && (e.persistentHint || t(h)) ? (o(), n("div", ne, i(e.hint), 1)) : r("", !0),
150
152
  e.counter && e.maxlength ? (o(), n("div", oe, i(((F = t(f)) == null ? void 0 : F.length) || 0) + " / " + i(e.maxlength), 1)) : r("", !0)
151
153
  ]))
152
154
  ], 16)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.488",
3
+ "version": "0.1.490",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",