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
|
|
2
|
-
import
|
|
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
|
|
4
|
+
const S = { class: "flex items-center gap-2" }, v = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "
|
|
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
|
|
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: (
|
|
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(
|
|
64
|
-
const
|
|
65
|
-
switch (
|
|
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 =
|
|
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,
|
|
93
|
+
return (i, d) => (t(), n("header", {
|
|
92
94
|
class: x(["flex items-center px-4 w-full", [
|
|
93
95
|
h.value,
|
|
94
|
-
|
|
96
|
+
e.bgColor,
|
|
95
97
|
y.value,
|
|
96
|
-
|
|
98
|
+
e.bordered ? "border-b border-gray-200" : ""
|
|
97
99
|
]])
|
|
98
100
|
}, [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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:
|
|
106
|
+
onClick: d[0] || (d[0] = (z) => i.$emit("toggle-drawer"))
|
|
105
107
|
}, [
|
|
106
|
-
|
|
108
|
+
e.drawerIcon ? (t(), r(m, {
|
|
107
109
|
key: 1,
|
|
108
|
-
icon:
|
|
110
|
+
icon: e.drawerIcon,
|
|
109
111
|
class: "text-white",
|
|
110
112
|
size: "text-lg"
|
|
111
|
-
}, null, 8, ["icon"])) : (
|
|
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
|
-
])) :
|
|
119
|
+
])) : a("", !0)
|
|
118
120
|
]),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
o(i.$slots, "prepend"),
|
|
122
|
+
e.title && e.titlePosition === "left" ? (t(), r(s, {
|
|
121
123
|
key: 0,
|
|
122
|
-
title:
|
|
123
|
-
titleImage:
|
|
124
|
-
textSize:
|
|
125
|
-
fontWeight:
|
|
126
|
-
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) :
|
|
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
|
-
|
|
129
|
-
g(
|
|
130
|
-
title:
|
|
131
|
-
titleImage:
|
|
132
|
-
textSize:
|
|
133
|
-
fontWeight:
|
|
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
|
-
])) :
|
|
136
|
-
|
|
137
|
-
g(
|
|
138
|
-
title:
|
|
139
|
-
titleImage:
|
|
140
|
-
textSize:
|
|
141
|
-
fontWeight:
|
|
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
|
-
])) :
|
|
144
|
-
|
|
145
|
-
o("
|
|
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
|
-
|
|
153
|
+
C as default
|
|
154
154
|
};
|