adverich-kun-ui 0.1.25 → 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
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const S = { class: "flex items-center gap-2" }, v = {
|
|
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
|
+
import d from "../../../KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
|
|
3
|
+
const y = { class: "flex items-center gap-2" }, S = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "flex-1 flex justify-center"
|
|
7
|
-
},
|
|
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" }, v = {
|
|
|
33
32
|
titlePosition: {
|
|
34
33
|
type: String,
|
|
35
34
|
default: "center",
|
|
36
|
-
|
|
37
|
-
validator: (e) => ["left", "center", "right"].includes(e)
|
|
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,14 +49,10 @@ const S = { class: "flex items-center gap-2" }, v = {
|
|
|
53
49
|
showDrawerButton: {
|
|
54
50
|
type: Boolean,
|
|
55
51
|
default: !0
|
|
56
|
-
},
|
|
57
|
-
drawerIcon: {
|
|
58
|
-
type: [String, Object, Function],
|
|
59
|
-
default: null
|
|
60
52
|
}
|
|
61
53
|
},
|
|
62
|
-
setup(
|
|
63
|
-
const l =
|
|
54
|
+
setup(t) {
|
|
55
|
+
const l = t, f = u(() => {
|
|
64
56
|
switch (l.density) {
|
|
65
57
|
case "comfortable":
|
|
66
58
|
return "h-12 py-1";
|
|
@@ -69,86 +61,67 @@ const S = { class: "flex items-center gap-2" }, v = {
|
|
|
69
61
|
default:
|
|
70
62
|
return "h-14 py-2";
|
|
71
63
|
}
|
|
72
|
-
}),
|
|
73
|
-
const
|
|
74
|
-
return l.elevation === "none" || !
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
79
|
-
class: "h-5 w-5",
|
|
80
|
-
fill: "none",
|
|
81
|
-
viewBox: "0 0 24 24",
|
|
82
|
-
stroke: "currentColor"
|
|
83
|
-
}, [
|
|
84
|
-
f("path", {
|
|
85
|
-
"stroke-linecap": "round",
|
|
86
|
-
"stroke-linejoin": "round",
|
|
87
|
-
"stroke-width": "2",
|
|
88
|
-
d: "M4 6h16M4 12h16M4 18h16"
|
|
89
|
-
})
|
|
90
|
-
]);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
return (i, d) => (t(), n("header", {
|
|
94
|
-
class: x(["flex items-center px-4 w-full", [
|
|
95
|
-
h.value,
|
|
96
|
-
e.bgColor,
|
|
97
|
-
y.value,
|
|
98
|
-
e.bordered ? "border-b border-gray-200" : ""
|
|
99
|
-
]])
|
|
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" : ""]])
|
|
100
70
|
}, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
71
|
+
a("div", y, [
|
|
72
|
+
s(e.$slots, "appbarButton", {}, () => [
|
|
73
|
+
t.showDrawerButton ? (i(), o("button", {
|
|
104
74
|
key: 0,
|
|
105
75
|
class: "p-2 rounded-md hover:bg-white/10 transition",
|
|
106
|
-
onClick:
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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)
|
|
120
93
|
]),
|
|
121
|
-
|
|
122
|
-
|
|
94
|
+
s(e.$slots, "prepend"),
|
|
95
|
+
t.title && t.titlePosition === "left" ? (i(), h(d, {
|
|
123
96
|
key: 0,
|
|
124
|
-
title:
|
|
125
|
-
titleImage:
|
|
126
|
-
textSize:
|
|
127
|
-
fontWeight:
|
|
128
|
-
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) :
|
|
97
|
+
title: t.title,
|
|
98
|
+
titleImage: t.titleImage,
|
|
99
|
+
textSize: t.titleSize,
|
|
100
|
+
fontWeight: t.titleWeight
|
|
101
|
+
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) : r("", !0)
|
|
129
102
|
]),
|
|
130
|
-
|
|
131
|
-
g(
|
|
132
|
-
title:
|
|
133
|
-
titleImage:
|
|
134
|
-
textSize:
|
|
135
|
-
fontWeight:
|
|
103
|
+
t.title && t.titlePosition === "center" ? (i(), o("div", S, [
|
|
104
|
+
g(d, {
|
|
105
|
+
title: t.title,
|
|
106
|
+
titleImage: t.titleImage,
|
|
107
|
+
textSize: t.titleSize,
|
|
108
|
+
fontWeight: t.titleWeight
|
|
136
109
|
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
|
|
137
|
-
])) :
|
|
138
|
-
|
|
139
|
-
g(
|
|
140
|
-
title:
|
|
141
|
-
titleImage:
|
|
142
|
-
textSize:
|
|
143
|
-
fontWeight:
|
|
110
|
+
])) : r("", !0),
|
|
111
|
+
t.title && t.titlePosition === "right" ? (i(), o("div", w, [
|
|
112
|
+
g(d, {
|
|
113
|
+
title: t.title,
|
|
114
|
+
titleImage: t.titleImage,
|
|
115
|
+
textSize: t.titleSize,
|
|
116
|
+
fontWeight: t.titleWeight
|
|
144
117
|
}, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
|
|
145
|
-
])) :
|
|
146
|
-
|
|
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
|
};
|