adverich-kun-ui 0.1.179 → 0.1.180

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.
@@ -50,12 +50,12 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
50
50
  iconSize: { type: String, default: null }
51
51
  },
52
52
  setup(n) {
53
- const x = z(), t = n, u = B(), g = r(() => !!t.to || !!t.href), m = r(() => !g.value), h = r(() => t.href ? "a" : t.to ? F : "button"), d = (e) => !e || e === !1 || e === !0 && !t.icon ? null : W(D, {
53
+ const g = z(), t = n, u = B(), m = r(() => !!t.to || !!t.href), h = r(() => !m.value), b = r(() => t.href ? "a" : t.to ? F : "button"), d = (e) => !e || e === !1 || e === !0 && !t.icon ? null : W(D, {
54
54
  icon: e,
55
- size: v.value,
55
+ size: k.value,
56
56
  color: t.textColor ?? "text-font-color",
57
57
  disabled: t.disabled
58
- }), b = r(() => t.href ? {
58
+ }), y = r(() => t.href ? {
59
59
  href: t.href,
60
60
  target: t.target ?? "_self",
61
61
  rel: t.target === "_blank" ? "noopener noreferrer" : null
@@ -65,7 +65,7 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
65
65
  } : {
66
66
  type: "button",
67
67
  disabled: t.loading || t.disabled
68
- }), y = (e) => {
68
+ }), v = (e) => {
69
69
  switch (e) {
70
70
  case "xxs":
71
71
  return "px-1 py-1 text-xs";
@@ -84,7 +84,7 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
84
84
  default:
85
85
  return "px-3 py-2 text-sm";
86
86
  }
87
- }, v = r(() => {
87
+ }, k = r(() => {
88
88
  if (t.iconSize) return t.iconSize;
89
89
  switch (t.size) {
90
90
  case "xxs":
@@ -104,7 +104,7 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
104
104
  default:
105
105
  return "text-base";
106
106
  }
107
- }), k = r(() => {
107
+ }), S = r(() => {
108
108
  const e = t.bgColor, s = t.textColor;
109
109
  switch (t.variant) {
110
110
  case "default":
@@ -122,18 +122,18 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
122
122
  default:
123
123
  return `${e} ${s}`;
124
124
  }
125
- }), S = r(() => !!t.text), $ = r(() => {
125
+ }), $ = r(() => !!t.text), w = r(() => {
126
126
  const e = [
127
127
  "inline-flex items-center justify-center break-keep transition-all whitespace-nowrap",
128
- y(t.size),
128
+ x.value ? "" : v(t.size),
129
129
  t.fontWeight,
130
130
  t.rounded,
131
131
  t.textAlign,
132
- k.value,
132
+ S.value,
133
133
  "relative"
134
134
  // 🔹 Hace que los hijos `absolute` se posicionen correctamente
135
135
  ];
136
- if (u.class && e.push(u.class), w.value)
136
+ if (u.class && e.push(u.class), x.value)
137
137
  switch (e.push("aspect-square justify-center items-center"), t.size) {
138
138
  case "xxs":
139
139
  e.push("p-1");
@@ -166,12 +166,12 @@ const E = { class: "relative flex items-center justify-center w-full h-full" },
166
166
  "active:scale-[.98]",
167
167
  "transition duration-100 ease-in-out",
168
168
  "cursor-pointer"
169
- ) : (e.push("pointer-events-none"), t.disabled && e.push("opacity-50 cursor-not-allowed")), S.value && e.push(t.minWidth), e.filter(Boolean);
170
- }), w = r(() => !!t.icon && !t.text && !x.default);
171
- return (e, s) => (a(), l(o(h.value), C(b.value, {
172
- class: $.value,
169
+ ) : (e.push("pointer-events-none"), t.disabled && e.push("opacity-50 cursor-not-allowed")), $.value && e.push(t.minWidth), e.filter(Boolean);
170
+ }), x = r(() => !!t.icon && !t.text && !g.default);
171
+ return (e, s) => (a(), l(o(b.value), C(y.value, {
172
+ class: w.value,
173
173
  style: j(u).style,
174
- disabled: m.value && (n.loading || n.disabled)
174
+ disabled: h.value && (n.loading || n.disabled)
175
175
  }), {
176
176
  default: I(() => [
177
177
  p("div", E, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.179",
3
+ "version": "0.1.180",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",