adverich-kun-ui 0.1.253 → 0.1.254
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.
|
@@ -100,26 +100,26 @@ const O = {
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
setup(e, { expose: w }) {
|
|
103
|
-
const
|
|
103
|
+
const t = e, r = d(null), y = d(!0), h = d(!1);
|
|
104
104
|
function c() {
|
|
105
105
|
P(() => {
|
|
106
106
|
if (r.value) {
|
|
107
|
-
const
|
|
108
|
-
M(Math.round(
|
|
107
|
+
const i = r.value.getBoundingClientRect();
|
|
108
|
+
M(Math.round(i.height));
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function S() {
|
|
113
|
-
if (!
|
|
114
|
-
const
|
|
115
|
-
y.value =
|
|
113
|
+
if (!t.autoHideOnScroll) return;
|
|
114
|
+
const i = window.scrollY;
|
|
115
|
+
y.value = i < b.value || i < 10, b.value = i;
|
|
116
116
|
}
|
|
117
117
|
function u() {
|
|
118
|
-
|
|
118
|
+
t.responsiveCollapse && (h.value = window.innerWidth < t.collapseBreakpoint);
|
|
119
119
|
}
|
|
120
120
|
const b = d(0);
|
|
121
121
|
B(() => {
|
|
122
|
-
c(),
|
|
122
|
+
c(), t.autoHideOnScroll && window.addEventListener("scroll", S), t.responsiveCollapse && (window.addEventListener("resize", u), u());
|
|
123
123
|
}), I(c), $(() => {
|
|
124
124
|
window.removeEventListener("scroll", S), window.removeEventListener("resize", u);
|
|
125
125
|
}), w({
|
|
@@ -127,7 +127,7 @@ const O = {
|
|
|
127
127
|
updateHeight: c
|
|
128
128
|
});
|
|
129
129
|
const C = f(() => {
|
|
130
|
-
switch (
|
|
130
|
+
switch (t.density) {
|
|
131
131
|
case "comfortable":
|
|
132
132
|
return "h-[56px]";
|
|
133
133
|
case "compact":
|
|
@@ -136,18 +136,18 @@ const O = {
|
|
|
136
136
|
return "h-[64px]";
|
|
137
137
|
}
|
|
138
138
|
}), k = f(() => {
|
|
139
|
-
const
|
|
140
|
-
return
|
|
139
|
+
const i = ["sm", "md", "lg", "xl", "2xl"];
|
|
140
|
+
return t.elevation === "none" || !i.includes(t.elevation) ? "" : `shadow-${t.elevation}`;
|
|
141
141
|
}), z = f(
|
|
142
142
|
() => C.value,
|
|
143
|
-
|
|
143
|
+
t.bgColor,
|
|
144
144
|
k.value,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
t.bordered ? t.borderColor : "",
|
|
146
|
+
t.fixed ? "fixed top-0 left-0 right-0" : "",
|
|
147
|
+
t.sticky ? "sticky top-0" : "",
|
|
148
|
+
t.glass ? "backdrop-blur-md" : "",
|
|
149
149
|
h.value ? "justify-between px-2" : "",
|
|
150
|
-
animationClass
|
|
150
|
+
t.animationClass
|
|
151
151
|
), s = {
|
|
152
152
|
"fade-slide": {
|
|
153
153
|
enterActive: "transition-all duration-300 ease-out",
|
|
@@ -168,7 +168,7 @@ const O = {
|
|
|
168
168
|
leaveTo: "scale-95 opacity-0"
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
|
-
return (
|
|
171
|
+
return (i, p) => (a(), o(W, {
|
|
172
172
|
"enter-active-class": s[e.transition].enterActive,
|
|
173
173
|
"enter-from-class": s[e.transition].enterFrom,
|
|
174
174
|
"leave-active-class": s[e.transition].leaveActive,
|
|
@@ -180,18 +180,18 @@ const O = {
|
|
|
180
180
|
ref: r,
|
|
181
181
|
class: ["w-full flex transition-all duration-300", z.value],
|
|
182
182
|
style: { zIndex: e.zIndex }
|
|
183
|
-
},
|
|
183
|
+
}, i.$attrs), [
|
|
184
184
|
m("div", {
|
|
185
185
|
class: g(e.leftSectionClass)
|
|
186
186
|
}, [
|
|
187
|
-
n(
|
|
187
|
+
n(i.$slots, "appbarButton", {}, () => [
|
|
188
188
|
e.showDrawerButton ? (a(), o(j, {
|
|
189
189
|
key: 0,
|
|
190
190
|
class: g(e.buttonClass),
|
|
191
191
|
minWidth: "fit-content",
|
|
192
192
|
bgColor: "bg-transparent",
|
|
193
193
|
textColor: "text-black dark:text-white",
|
|
194
|
-
onClick: p[0] || (p[0] = (V) =>
|
|
194
|
+
onClick: p[0] || (p[0] = (V) => i.$emit("toggle-drawer"))
|
|
195
195
|
}, {
|
|
196
196
|
default: x(() => [
|
|
197
197
|
H(F, {
|
|
@@ -202,8 +202,8 @@ const O = {
|
|
|
202
202
|
_: 1
|
|
203
203
|
}, 8, ["class"])) : l("", !0)
|
|
204
204
|
]),
|
|
205
|
-
n(
|
|
206
|
-
e.titlePosition === "left" ? n(
|
|
205
|
+
n(i.$slots, "prepend"),
|
|
206
|
+
e.titlePosition === "left" ? n(i.$slots, "title", { key: 0 }, () => [
|
|
207
207
|
e.title ? (a(), o(v, {
|
|
208
208
|
key: 0,
|
|
209
209
|
title: e.title,
|
|
@@ -214,7 +214,7 @@ const O = {
|
|
|
214
214
|
]) : l("", !0)
|
|
215
215
|
], 2),
|
|
216
216
|
e.titlePosition === "center" ? (a(), T("div", O, [
|
|
217
|
-
n(
|
|
217
|
+
n(i.$slots, "title", {}, () => [
|
|
218
218
|
e.title ? (a(), o(v, {
|
|
219
219
|
key: 0,
|
|
220
220
|
title: e.title,
|
|
@@ -227,8 +227,8 @@ const O = {
|
|
|
227
227
|
m("div", {
|
|
228
228
|
class: g(e.rightSectionClass)
|
|
229
229
|
}, [
|
|
230
|
-
n(
|
|
231
|
-
e.titlePosition === "right" ? n(
|
|
230
|
+
n(i.$slots, "actions"),
|
|
231
|
+
e.titlePosition === "right" ? n(i.$slots, "title", { key: 0 }, () => [
|
|
232
232
|
e.title ? (a(), o(v, {
|
|
233
233
|
key: 0,
|
|
234
234
|
title: e.title,
|