adverich-kun-ui 0.1.24 → 0.1.26

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