adverich-kun-ui 0.1.23 → 0.1.25

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,13 +1,13 @@
1
- import { computed as u, createElementBlock as l, openBlock as e, normalizeClass as x, createElementVNode as o, createCommentVNode as n, renderSlot as r, createBlock as s, createVNode as g, h as f } from "vue";
2
- import d from "../../../KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
1
+ import { computed as c, createElementBlock as n, openBlock as t, normalizeClass as x, createElementVNode as u, createCommentVNode as a, renderSlot as o, createBlock as r, createVNode as g, h as f } from "vue";
2
+ import s from "../../../KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
3
3
  import m from "../../../KunIcon/src/components/KunIcon.vue.js";
4
- const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
4
+ const S = { class: "flex items-center gap-2" }, v = {
5
5
  key: 0,
6
- class: "absolute left-1/2 -translate-x-1/2"
6
+ class: "flex-1 flex justify-center"
7
7
  }, b = {
8
8
  key: 1,
9
9
  class: "flex-1 flex justify-end"
10
- }, k = { class: "flex items-center gap-2 flex-1 justify-end" }, z = { class: "flex items-center gap-2 ml-auto" }, $ = {
10
+ }, k = { class: "flex items-center gap-2" }, C = {
11
11
  __name: "KunAppbar",
12
12
  props: {
13
13
  bgColor: {
@@ -34,7 +34,7 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
34
34
  type: String,
35
35
  default: "center",
36
36
  // 'left', 'center', 'right'
37
- validator: (t) => ["left", "center", "right"].includes(t)
37
+ validator: (e) => ["left", "center", "right"].includes(e)
38
38
  },
39
39
  density: {
40
40
  type: String,
@@ -57,12 +57,11 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
57
57
  drawerIcon: {
58
58
  type: [String, Object, Function],
59
59
  default: null
60
- // Si se deja null, usa el ícono por defecto
61
60
  }
62
61
  },
63
- setup(t) {
64
- const a = t, h = u(() => {
65
- switch (a.density) {
62
+ setup(e) {
63
+ const l = e, h = c(() => {
64
+ switch (l.density) {
66
65
  case "comfortable":
67
66
  return "h-12 py-1";
68
67
  case "compact":
@@ -70,7 +69,10 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
70
69
  default:
71
70
  return "h-14 py-2";
72
71
  }
73
- }), y = u(() => a.elevation === "none" ? "" : `shadow-${a.elevation}`), w = {
72
+ }), y = c(() => {
73
+ const i = ["sm", "md", "lg", "xl", "2xl"];
74
+ return l.elevation === "none" || !i.includes(l.elevation) ? "" : `shadow-${l.elevation}`;
75
+ }), w = {
74
76
  render() {
75
77
  return f("svg", {
76
78
  xmlns: "http://www.w3.org/2000/svg",
@@ -88,67 +90,65 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
88
90
  ]);
89
91
  }
90
92
  };
91
- return (i, c) => (e(), l("header", {
93
+ return (i, d) => (t(), n("header", {
92
94
  class: x(["flex items-center px-4 w-full", [
93
95
  h.value,
94
- t.bgColor,
96
+ e.bgColor,
95
97
  y.value,
96
- t.bordered ? "border-b border-gray-200" : ""
98
+ e.bordered ? "border-b border-gray-200" : ""
97
99
  ]])
98
100
  }, [
99
- o("div", S, [
100
- r(i.$slots, "appbarButton", {}, () => [
101
- t.showDrawerButton ? (e(), l("button", {
101
+ u("div", S, [
102
+ o(i.$slots, "appbarButton", {}, () => [
103
+ e.showDrawerButton ? (t(), n("button", {
102
104
  key: 0,
103
105
  class: "p-2 rounded-md hover:bg-white/10 transition",
104
- onClick: c[0] || (c[0] = (I) => i.$emit("toggle-drawer"))
106
+ onClick: d[0] || (d[0] = (z) => i.$emit("toggle-drawer"))
105
107
  }, [
106
- t.drawerIcon ? (e(), s(m, {
108
+ e.drawerIcon ? (t(), r(m, {
107
109
  key: 1,
108
- icon: t.drawerIcon,
110
+ icon: e.drawerIcon,
109
111
  class: "text-white",
110
112
  size: "text-lg"
111
- }, null, 8, ["icon"])) : (e(), s(m, {
113
+ }, null, 8, ["icon"])) : (t(), r(m, {
112
114
  key: 0,
113
115
  icon: w,
114
116
  class: "text-white",
115
117
  size: "text-lg"
116
118
  }))
117
- ])) : n("", !0)
119
+ ])) : a("", !0)
118
120
  ]),
119
- r(i.$slots, "prepend"),
120
- t.title && t.titlePosition === "left" ? (e(), s(d, {
121
+ o(i.$slots, "prepend"),
122
+ e.title && e.titlePosition === "left" ? (t(), r(s, {
121
123
  key: 0,
122
- title: t.title,
123
- titleImage: t.titleImage,
124
- textSize: t.titleSize,
125
- fontWeight: t.titleWeight
126
- }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) : n("", !0)
124
+ title: e.title,
125
+ titleImage: e.titleImage,
126
+ textSize: e.titleSize,
127
+ fontWeight: e.titleWeight
128
+ }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) : a("", !0)
127
129
  ]),
128
- t.title && t.titlePosition === "center" ? (e(), l("div", v, [
129
- g(d, {
130
- title: t.title,
131
- titleImage: t.titleImage,
132
- textSize: t.titleSize,
133
- fontWeight: t.titleWeight
130
+ e.title && e.titlePosition === "center" ? (t(), n("div", v, [
131
+ g(s, {
132
+ title: e.title,
133
+ titleImage: e.titleImage,
134
+ textSize: e.titleSize,
135
+ fontWeight: e.titleWeight
134
136
  }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
135
- ])) : n("", !0),
136
- t.title && t.titlePosition === "right" ? (e(), l("div", b, [
137
- g(d, {
138
- title: t.title,
139
- titleImage: t.titleImage,
140
- textSize: t.titleSize,
141
- fontWeight: t.titleWeight
137
+ ])) : a("", !0),
138
+ e.title && e.titlePosition === "right" ? (t(), n("div", b, [
139
+ g(s, {
140
+ title: e.title,
141
+ titleImage: e.titleImage,
142
+ textSize: e.titleSize,
143
+ fontWeight: e.titleWeight
142
144
  }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
143
- ])) : n("", !0),
144
- o("div", k, [
145
- o("div", z, [
146
- r(i.$slots, "actions")
147
- ])
145
+ ])) : a("", !0),
146
+ u("div", k, [
147
+ o(i.$slots, "actions")
148
148
  ])
149
149
  ], 2));
150
150
  }
151
151
  };
152
152
  export {
153
- $ as default
153
+ C as default
154
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",