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
|
|
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
|
-
|
|
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: "
|
|
7
|
-
},
|
|
5
|
+
class: "flex-1 flex justify-center"
|
|
6
|
+
}, w = {
|
|
8
7
|
key: 1,
|
|
9
8
|
class: "flex-1 flex justify-end"
|
|
10
|
-
},
|
|
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
|
|
65
|
-
switch (
|
|
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
|
-
}),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
t.showDrawerButton ? (
|
|
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:
|
|
105
|
-
}, [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
120
|
-
t.title && t.titlePosition === "left" ? (
|
|
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"])) :
|
|
101
|
+
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) : r("", !0)
|
|
127
102
|
]),
|
|
128
|
-
t.title && t.titlePosition === "center" ? (
|
|
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
|
-
])) :
|
|
136
|
-
t.title && t.titlePosition === "right" ? (
|
|
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
|
-
])) :
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
126
|
+
z as default
|
|
154
127
|
};
|