@kiva/kv-components 6.56.1 → 6.56.3
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.
- package/dist/vue/KvSideSheet.js +51 -49
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +44 -41
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +134 -125
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +76 -76
- package/package.json +2 -2
package/dist/vue/KvSideSheet.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { toRefs as P, ref as
|
|
2
|
-
import { mdiArrowLeft as ne, mdiClose as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { toRefs as P, ref as c, reactive as Q, computed as j, onMounted as X, onBeforeUnmount as Y, onUnmounted as Z, watch as g, resolveComponent as $, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as ee, createElementVNode as w, normalizeStyle as H, createVNode as z, createCommentVNode as x, toDisplayString as te, renderSlot as F, nextTick as oe } from "vue";
|
|
2
|
+
import { mdiArrowLeft as ne, mdiClose as ie, mdiOpenInNew as le } from "@mdi/js";
|
|
3
|
+
import se from "./KvMaterialIcon.js";
|
|
4
|
+
import ae from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const de = {
|
|
6
6
|
name: "KvSideSheet",
|
|
7
7
|
components: {
|
|
8
|
-
KvMaterialIcon:
|
|
8
|
+
KvMaterialIcon: se
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -65,7 +65,7 @@ const ae = {
|
|
|
65
65
|
widthDimensions: {
|
|
66
66
|
type: [String, Object],
|
|
67
67
|
default: () => ({ default: "100%", md: "50%" }),
|
|
68
|
-
validator: (
|
|
68
|
+
validator: (o) => typeof o == "string" ? /^(\d+px|[\d.]+%|auto|inherit|initial)$/.test(o) : typeof o == "object" ? Object.keys(o).every((n) => ["default", "sm", "md", "lg", "xl", "2xl"].includes(n) && /^(\d+px|[\d.]+%|auto|inherit|initial)$/.test(o[n])) : !1
|
|
69
69
|
},
|
|
70
70
|
/**
|
|
71
71
|
* Whether to hide the background of the headline section on mobile (e.g., in Borrower Profile Sidesheet)
|
|
@@ -76,14 +76,14 @@ const ae = {
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
emits: ["side-sheet-closed", "go-to-link"],
|
|
79
|
-
setup(
|
|
79
|
+
setup(o, { emit: n, slots: i }) {
|
|
80
80
|
const {
|
|
81
81
|
visible: t,
|
|
82
82
|
kvTrackFunction: I,
|
|
83
83
|
trackEventCategory: M,
|
|
84
84
|
widthDimensions: l,
|
|
85
85
|
hideHeadlineBgOnMobile: d
|
|
86
|
-
} = P(
|
|
86
|
+
} = P(o), r = c(!1), a = c({}), O = c(null), m = c(null), y = c(null), _ = c(null), N = c(null), S = c(null), B = c(null), v = Q({
|
|
87
87
|
headline: 0,
|
|
88
88
|
controls: 0
|
|
89
89
|
}), V = j(() => {
|
|
@@ -98,7 +98,7 @@ const ae = {
|
|
|
98
98
|
lg: 1024,
|
|
99
99
|
xl: 1280,
|
|
100
100
|
"2xl": 1536
|
|
101
|
-
}, s = N.value || window.innerWidth, f = Object.keys(l.value).filter((u) => u !== "default").sort((u,
|
|
101
|
+
}, s = N.value || window.innerWidth, f = Object.keys(l.value).filter((u) => u !== "default").sort((u, R) => e[R] - e[u]).find((u) => s >= e[u]);
|
|
102
102
|
return f ? l.value[f] : l.value.default || "100%";
|
|
103
103
|
}), A = (e, s) => {
|
|
104
104
|
let f;
|
|
@@ -107,7 +107,7 @@ const ae = {
|
|
|
107
107
|
};
|
|
108
108
|
}, C = () => {
|
|
109
109
|
_.value = window.innerHeight, N.value = window.innerWidth, setTimeout(() => {
|
|
110
|
-
|
|
110
|
+
oe(() => {
|
|
111
111
|
var e;
|
|
112
112
|
if (y.value) {
|
|
113
113
|
const s = y.value.getBoundingClientRect();
|
|
@@ -123,14 +123,14 @@ const ae = {
|
|
|
123
123
|
}, 300);
|
|
124
124
|
}, E = A(C, 100), T = () => {
|
|
125
125
|
const e = "tw-overflow-hidden";
|
|
126
|
-
|
|
126
|
+
r.value ? document.body.classList.add(e) : document.body.classList.remove(e);
|
|
127
127
|
}, K = () => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}, 300), document.removeEventListener("keyup",
|
|
128
|
+
r.value = !1, T(), I.value(M.value, "click", "side-sheet-closed"), setTimeout(() => {
|
|
129
|
+
n("side-sheet-closed");
|
|
130
|
+
}, 300), document.removeEventListener("keyup", L);
|
|
131
131
|
}, G = () => {
|
|
132
|
-
|
|
133
|
-
},
|
|
132
|
+
n("go-to-link");
|
|
133
|
+
}, L = (e) => {
|
|
134
134
|
(e == null ? void 0 : e.key) === "Escape" && K();
|
|
135
135
|
};
|
|
136
136
|
X(() => {
|
|
@@ -138,6 +138,8 @@ const ae = {
|
|
|
138
138
|
C();
|
|
139
139
|
}, 100), m.value && (S.value = new ResizeObserver(E), S.value.observe(m.value)), y.value && (B.value = new ResizeObserver(E), B.value.observe(y.value)), window.addEventListener("resize", E);
|
|
140
140
|
}), Y(() => {
|
|
141
|
+
r.value && document.body.classList.remove("tw-overflow-hidden");
|
|
142
|
+
}), Z(() => {
|
|
141
143
|
S.value && S.value.disconnect(), B.value && B.value.disconnect(), window.removeEventListener("resize", E);
|
|
142
144
|
const e = document.getElementById("side-sheet-styles");
|
|
143
145
|
e && e.remove();
|
|
@@ -153,11 +155,11 @@ const ae = {
|
|
|
153
155
|
width: W.value
|
|
154
156
|
}));
|
|
155
157
|
g(t, (e) => {
|
|
156
|
-
typeof window < "u" && (e ? (document.addEventListener("keyup",
|
|
157
|
-
|
|
158
|
-
}, 10)) : (
|
|
158
|
+
typeof window < "u" && (e ? (document.addEventListener("keyup", L), a.value = {}, setTimeout(() => {
|
|
159
|
+
r.value = !0, T(), C();
|
|
160
|
+
}, 10)) : (r.value = !1, T(), document.removeEventListener("keyup", L), a.value = {}));
|
|
159
161
|
}, { immediate: !0 }), g(W, (e) => {
|
|
160
|
-
|
|
162
|
+
r.value && t.value && a.value && Object.keys(a.value).length > 0 && (a.value = {
|
|
161
163
|
...a.value,
|
|
162
164
|
width: e,
|
|
163
165
|
transition: "none"
|
|
@@ -169,7 +171,7 @@ const ae = {
|
|
|
169
171
|
});
|
|
170
172
|
}, 50));
|
|
171
173
|
});
|
|
172
|
-
const
|
|
174
|
+
const U = () => {
|
|
173
175
|
if (typeof l.value == "object" && O.value) {
|
|
174
176
|
const e = "side-sheet-styles";
|
|
175
177
|
let s = document.getElementById(e);
|
|
@@ -180,23 +182,23 @@ const ae = {
|
|
|
180
182
|
lg: "1024px",
|
|
181
183
|
xl: "1280px",
|
|
182
184
|
"2xl": "1536px"
|
|
183
|
-
},
|
|
184
|
-
const
|
|
185
|
-
return
|
|
185
|
+
}, R = Object.keys(l.value).filter((h) => h !== "default").sort((h, J) => {
|
|
186
|
+
const D = ["sm", "md", "lg", "xl", "2xl"];
|
|
187
|
+
return D.indexOf(h) - D.indexOf(J);
|
|
186
188
|
}).map((h) => `
|
|
187
189
|
@media (min-width: ${f[h]}) {
|
|
188
|
-
#side-sheet-${
|
|
190
|
+
#side-sheet-${o.trackEventCategory || "default"} {
|
|
189
191
|
width: ${l.value[h]} !important;
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
`).join("");
|
|
193
|
-
s.textContent =
|
|
195
|
+
s.textContent = R, O.value.id = `side-sheet-${o.trackEventCategory || "default"}`;
|
|
194
196
|
}
|
|
195
197
|
};
|
|
196
198
|
return g(l, () => {
|
|
197
|
-
|
|
198
|
-
}, { immediate: !0 }), g(
|
|
199
|
-
e &&
|
|
199
|
+
r.value && U();
|
|
200
|
+
}, { immediate: !0 }), g(r, (e) => {
|
|
201
|
+
e && U();
|
|
200
202
|
}), {
|
|
201
203
|
closeSideSheet: K,
|
|
202
204
|
contentHeight: V,
|
|
@@ -206,29 +208,29 @@ const ae = {
|
|
|
206
208
|
sideSheetStyles: q,
|
|
207
209
|
goToLink: G,
|
|
208
210
|
mdiArrowLeft: ne,
|
|
209
|
-
mdiClose:
|
|
210
|
-
mdiOpenInNew:
|
|
211
|
+
mdiClose: ie,
|
|
212
|
+
mdiOpenInNew: le,
|
|
211
213
|
modalStyles: a,
|
|
212
|
-
open:
|
|
214
|
+
open: r
|
|
213
215
|
};
|
|
214
216
|
}
|
|
215
|
-
},
|
|
216
|
-
function
|
|
217
|
-
const l =
|
|
217
|
+
}, re = { class: "tw-flex tw-gap-1.5" }, ce = { key: 1 }, ue = { class: "tw-flex tw-gap-1.5" };
|
|
218
|
+
function we(o, n, i, t, I, M) {
|
|
219
|
+
const l = $("kv-material-icon");
|
|
218
220
|
return i.visible ? (p(), k("div", {
|
|
219
221
|
key: 0,
|
|
220
222
|
class: b(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
|
|
221
223
|
"tw-bg-opacity-0 tw-delay-300": !t.open,
|
|
222
224
|
"tw-bg-opacity-low": t.open
|
|
223
225
|
}]),
|
|
224
|
-
onClick:
|
|
226
|
+
onClick: n[3] || (n[3] = ee((...d) => t.closeSideSheet && t.closeSideSheet(...d), ["self"]))
|
|
225
227
|
}, [
|
|
226
228
|
w("div", {
|
|
227
229
|
ref: "sideSheetRef",
|
|
228
230
|
class: b(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white", {
|
|
229
231
|
"tw-translate-x-full": !t.open,
|
|
230
232
|
"tw-translate-x-0": t.open,
|
|
231
|
-
"tw-h-full":
|
|
233
|
+
"tw-h-full": o.$slots.controls
|
|
232
234
|
}]),
|
|
233
235
|
style: H(t.sideSheetStyles)
|
|
234
236
|
}, [
|
|
@@ -244,24 +246,24 @@ function ue(n, o, i, t, I, M) {
|
|
|
244
246
|
"tw-border-b": i.showHeadlineBorder
|
|
245
247
|
}])
|
|
246
248
|
}, [
|
|
247
|
-
w("div",
|
|
249
|
+
w("div", re, [
|
|
248
250
|
i.showBackButton ? (p(), k("button", {
|
|
249
251
|
key: 0,
|
|
250
252
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
251
|
-
onClick:
|
|
253
|
+
onClick: n[0] || (n[0] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
|
|
252
254
|
}, [
|
|
253
255
|
z(l, {
|
|
254
256
|
class: "tw-w-3 tw-h-3",
|
|
255
257
|
icon: t.mdiArrowLeft
|
|
256
258
|
}, null, 8, ["icon"])
|
|
257
259
|
])) : x("", !0),
|
|
258
|
-
i.headline ? (p(), k("h3",
|
|
260
|
+
i.headline ? (p(), k("h3", ce, te(i.headline), 1)) : x("", !0)
|
|
259
261
|
]),
|
|
260
|
-
w("div",
|
|
262
|
+
w("div", ue, [
|
|
261
263
|
i.showGoToLink ? (p(), k("button", {
|
|
262
264
|
key: 0,
|
|
263
265
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
264
|
-
onClick:
|
|
266
|
+
onClick: n[1] || (n[1] = (...d) => t.goToLink && t.goToLink(...d))
|
|
265
267
|
}, [
|
|
266
268
|
z(l, {
|
|
267
269
|
class: "tw-w-3 tw-h-3",
|
|
@@ -270,7 +272,7 @@ function ue(n, o, i, t, I, M) {
|
|
|
270
272
|
])) : x("", !0),
|
|
271
273
|
w("button", {
|
|
272
274
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
273
|
-
onClick:
|
|
275
|
+
onClick: n[2] || (n[2] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
|
|
274
276
|
}, [
|
|
275
277
|
z(l, {
|
|
276
278
|
class: "tw-w-3 tw-h-3",
|
|
@@ -290,10 +292,10 @@ function ue(n, o, i, t, I, M) {
|
|
|
290
292
|
"tw-opacity-full": t.open
|
|
291
293
|
}])
|
|
292
294
|
}, [
|
|
293
|
-
|
|
295
|
+
F(o.$slots, "default")
|
|
294
296
|
], 2)
|
|
295
297
|
], 4),
|
|
296
|
-
|
|
298
|
+
o.$slots.controls ? (p(), k("div", {
|
|
297
299
|
key: 0,
|
|
298
300
|
ref: "controlsRef",
|
|
299
301
|
class: b(["tw-absolute tw-bottom-0 tw-w-full tw-border-t tw-border-tertiary tw-bg-white tw-transition-opacity tw-duration-200", {
|
|
@@ -302,13 +304,13 @@ function ue(n, o, i, t, I, M) {
|
|
|
302
304
|
}]),
|
|
303
305
|
style: { "z-index": "999" }
|
|
304
306
|
}, [
|
|
305
|
-
|
|
307
|
+
F(o.$slots, "controls")
|
|
306
308
|
], 2)) : x("", !0)
|
|
307
309
|
], 4)
|
|
308
310
|
], 6)
|
|
309
311
|
], 2)) : x("", !0);
|
|
310
312
|
}
|
|
311
|
-
const
|
|
313
|
+
const ye = /* @__PURE__ */ ae(de, [["render", we]]);
|
|
312
314
|
export {
|
|
313
|
-
|
|
315
|
+
ye as default
|
|
314
316
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import
|
|
1
|
+
import { getCurrentInstance as u, computed as d, resolveComponent as m, openBlock as f, createElementBlock as w, createElementVNode as h, normalizeClass as i, renderSlot as p, createVNode as v } from "vue";
|
|
2
|
+
import C from "../KvMaterialIcon.js";
|
|
3
3
|
import x from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
5
|
-
components: { KvMaterialIcon:
|
|
4
|
+
const M = {
|
|
5
|
+
components: { KvMaterialIcon: C },
|
|
6
6
|
props: {
|
|
7
7
|
refName: {
|
|
8
8
|
type: String,
|
|
@@ -34,55 +34,58 @@ const C = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
emits: [
|
|
37
|
-
"on-hover"
|
|
37
|
+
"on-hover",
|
|
38
|
+
"user-tap"
|
|
38
39
|
],
|
|
39
|
-
setup(e, { emit:
|
|
40
|
-
const { proxy:
|
|
40
|
+
setup(e, { emit: n }) {
|
|
41
|
+
const { proxy: o } = u(), r = d(() => [
|
|
42
|
+
e.baseClass,
|
|
43
|
+
{ "tw-text-tertiary": e.openMenuItem && e.openMenuItem !== e.menuComponent }
|
|
44
|
+
]), a = () => {
|
|
45
|
+
if (!e.sendLinkPosition) return null;
|
|
46
|
+
const t = o.$refs[e.refName];
|
|
47
|
+
if (!t) return null;
|
|
48
|
+
const s = t.getBoundingClientRect();
|
|
49
|
+
return {
|
|
50
|
+
left: `${s.left + s.width / 2}px`,
|
|
51
|
+
transform: "translateX(-50%)",
|
|
52
|
+
borderRadius: "0px 0px 8px 8px"
|
|
53
|
+
};
|
|
54
|
+
};
|
|
41
55
|
return {
|
|
42
|
-
computedClass:
|
|
43
|
-
e.baseClass,
|
|
44
|
-
{ "tw-text-tertiary": e.openMenuItem && e.openMenuItem !== e.menuComponent }
|
|
45
|
-
]),
|
|
56
|
+
computedClass: r,
|
|
46
57
|
handleMouseOver: () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
s = {
|
|
54
|
-
left: `${(t == null ? void 0 : t.left) + (t == null ? void 0 : t.width) / 2}px`,
|
|
55
|
-
transform: "translateX(-50%)",
|
|
56
|
-
borderRadius: "0px 0px 8px 8px"
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
o("on-hover", e.refName, e.menuComponent, s);
|
|
61
|
-
}
|
|
58
|
+
const t = a();
|
|
59
|
+
n("on-hover", e.refName, e.menuComponent, t);
|
|
60
|
+
},
|
|
61
|
+
handleTouchStart: () => {
|
|
62
|
+
const t = a();
|
|
63
|
+
n("user-tap", e.refName, e.menuComponent, t);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
},
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return
|
|
69
|
-
ref:
|
|
67
|
+
}, y = ["href"];
|
|
68
|
+
function k(e, n, o, r, a, c) {
|
|
69
|
+
const l = m("KvMaterialIcon");
|
|
70
|
+
return f(), w("a", {
|
|
71
|
+
ref: o.refName,
|
|
70
72
|
class: "tw-py-1 tw-no-underline hover:tw-no-underline tw-text-primary hover:tw-text-action tw-items-center tw-cursor-pointer",
|
|
71
|
-
href:
|
|
72
|
-
onMouseover:
|
|
73
|
+
href: o.href,
|
|
74
|
+
onMouseover: n[0] || (n[0] = (...t) => r.handleMouseOver && r.handleMouseOver(...t)),
|
|
75
|
+
onTouchstart: n[1] || (n[1] = (...t) => r.handleTouchStart && r.handleTouchStart(...t))
|
|
73
76
|
}, [
|
|
74
|
-
|
|
75
|
-
class:
|
|
77
|
+
h("div", {
|
|
78
|
+
class: i(["tw-flex tw-items-center", r.computedClass])
|
|
76
79
|
}, [
|
|
77
80
|
p(e.$slots, "default"),
|
|
78
|
-
v(
|
|
79
|
-
class:
|
|
80
|
-
icon:
|
|
81
|
+
v(l, {
|
|
82
|
+
class: i(["tw-inline tw-w-3 tw-ml-0.5 tw-transition-transform tw-duration-300", { "tw-rotate-180": o.openMenuItem === o.menuComponent }]),
|
|
83
|
+
icon: o.dropdownIcon
|
|
81
84
|
}, null, 8, ["class", "icon"])
|
|
82
85
|
], 2)
|
|
83
|
-
], 40,
|
|
86
|
+
], 40, y);
|
|
84
87
|
}
|
|
85
|
-
const
|
|
88
|
+
const _ = /* @__PURE__ */ x(M, [["render", k]]);
|
|
86
89
|
export {
|
|
87
|
-
|
|
90
|
+
_ as default
|
|
88
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-7bbc2157]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-7bbc2157]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-7bbc2157] .avatar div:first-child{display:flex}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
1
|
+
import { defineAsyncComponent as g, ref as l, computed as S, watch as G, onMounted as J, onUnmounted as Q, resolveComponent as T, resolveDirective as X, openBlock as i, createElementBlock as w, withDirectives as m, normalizeClass as y, createVNode as _, createBlock as f, withCtx as H, createTextVNode as M, createElementVNode as A, createCommentVNode as C, vShow as E, toDisplayString as Y } from "vue";
|
|
2
2
|
import { mdiAccountCircle as Z, mdiChevronDown as $, mdiMagnify as ee, mdiMenu as ne } from "@mdi/js";
|
|
3
3
|
import te from "numeral";
|
|
4
4
|
import oe from "../KvMaterialIcon.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { throttle as
|
|
5
|
+
import ae from "../KvIconBag.js";
|
|
6
|
+
import le from "./KvHeaderDropdownLink.js";
|
|
7
|
+
import ie from "../KvUserAvatar.js";
|
|
8
|
+
import { throttle as re } from "../../utils/throttle.js";
|
|
9
9
|
import { isLegacyPlaceholderAvatar as de } from "../../utils/imageUtils.js";
|
|
10
10
|
import "./KvHeaderLinkBar.css";
|
|
11
11
|
import ue from "../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
-
const me =
|
|
12
|
+
const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvHeaderMyKivaMenu.js")), se = g(() => import("./LendMenu/KvLendMenu.js")), ve = g(() => import("./KvHeaderTakeActionMenu.js")), ce = g(() => import("./KvHeaderAboutMenu.js")), L = 120, k = "avatar-menu", U = "menuButton", V = { top: "-3.75rem", width: "100%" }, we = {
|
|
13
13
|
components: {
|
|
14
14
|
KvMaterialIcon: oe,
|
|
15
|
-
KvIconBag:
|
|
16
|
-
KvHeaderDropdownLink:
|
|
17
|
-
KvUserAvatar:
|
|
15
|
+
KvIconBag: ae,
|
|
16
|
+
KvHeaderDropdownLink: le,
|
|
17
|
+
KvUserAvatar: ie
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
20
20
|
loggedIn: {
|
|
@@ -57,70 +57,76 @@ const me = k(() => import("./KvHeaderMobileMenu.js")), S = k(() => import("./KvH
|
|
|
57
57
|
emits: [
|
|
58
58
|
"item-hover"
|
|
59
59
|
],
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}, R = (
|
|
64
|
-
navigator.maxTouchPoints || (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
setup(r, { emit: n }) {
|
|
61
|
+
const o = l(null), e = l(null), B = l(null), K = l(null), b = l(null), c = l(null), x = l(null), I = l(null), d = l(null), t = l(null), O = l(!1), h = l(), s = (a, v, u = null) => {
|
|
62
|
+
n("item-hover", a, v, u);
|
|
63
|
+
}, R = (a, v, u = null) => {
|
|
64
|
+
navigator.maxTouchPoints || (t.value = a, s(
|
|
65
|
+
a,
|
|
66
|
+
v,
|
|
67
|
+
a === U && r.isMobile ? V : u
|
|
68
68
|
));
|
|
69
|
-
}, F = (
|
|
70
|
-
!
|
|
69
|
+
}, F = (a) => {
|
|
70
|
+
!navigator.maxTouchPoints && t.value === a && (t.value = null, s());
|
|
71
71
|
}, z = () => {
|
|
72
|
-
var D
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
75
|
-
const
|
|
72
|
+
var D;
|
|
73
|
+
const a = (D = o.value) == null ? void 0 : D.getBoundingClientRect();
|
|
74
|
+
if (!a) return null;
|
|
75
|
+
const u = a.left + a.width / 2 - L / 2;
|
|
76
76
|
return {
|
|
77
|
-
...
|
|
77
|
+
...u + L > window.innerWidth ? { right: 0 } : { left: r.isMobile ? 0 : `${u}px` },
|
|
78
78
|
marginTop: "-2px",
|
|
79
79
|
// Avoid closing avatar menu on header edge
|
|
80
|
-
borderRadius:
|
|
80
|
+
borderRadius: r.isMobile ? "auto" : "0px 0px 8px 8px",
|
|
81
|
+
width: r.isMobile ? "100%" : `${L}px`
|
|
81
82
|
};
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
}, W = (
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
}, p = () => {
|
|
84
|
+
t.value = k, s(o.value, P, z());
|
|
85
|
+
}, W = (a, v, u) => {
|
|
86
|
+
h.value = null, O.value = !0, h.value && clearTimeout(h.value), t.value === U && (t.value = null), !t.value || t.value !== a ? (t.value = a, a === k ? p() : a === U && r.isMobile ? s(a, v, V) : s(a, v, u)) : (t.value = null, s()), h.value = setTimeout(() => {
|
|
87
|
+
O.value = !1;
|
|
87
88
|
}, 500);
|
|
88
|
-
}, N =
|
|
89
|
-
|
|
90
|
-
}, 100), j =
|
|
91
|
-
var
|
|
92
|
-
return ((
|
|
89
|
+
}, N = re(() => {
|
|
90
|
+
t.value === k && p();
|
|
91
|
+
}, 100), j = S(() => r.isMobile ? void 0 : "/lend-by-category"), q = S(() => {
|
|
92
|
+
var a;
|
|
93
|
+
return ((a = r.lenderImageUrl) == null ? void 0 : a.split("/").pop()) ?? "";
|
|
93
94
|
});
|
|
94
|
-
return G(
|
|
95
|
+
return G(
|
|
96
|
+
() => r.isMobile,
|
|
97
|
+
() => {
|
|
98
|
+
t.value === k && p();
|
|
99
|
+
}
|
|
100
|
+
), J(() => {
|
|
95
101
|
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", N);
|
|
96
|
-
}),
|
|
102
|
+
}), Q(() => {
|
|
97
103
|
window.removeEventListener("resize", N);
|
|
98
104
|
}), {
|
|
99
|
-
AVATAR_MENU_ID:
|
|
100
|
-
openMenuId:
|
|
105
|
+
AVATAR_MENU_ID: k,
|
|
106
|
+
openMenuId: t,
|
|
101
107
|
numeral: te,
|
|
102
108
|
mdiAccountCircle: Z,
|
|
103
109
|
mdiChevronDown: $,
|
|
104
110
|
mdiMagnify: ee,
|
|
105
111
|
mdiMenu: ne,
|
|
106
|
-
onHover:
|
|
107
|
-
avatar:
|
|
108
|
-
lendButton:
|
|
109
|
-
aboutUsLink:
|
|
110
|
-
partnerWithUsLink:
|
|
111
|
-
borrowLink:
|
|
112
|
-
supportKivaLink:
|
|
113
|
-
basketLink:
|
|
114
|
-
signInLink:
|
|
115
|
-
menuButton:
|
|
112
|
+
onHover: s,
|
|
113
|
+
avatar: o,
|
|
114
|
+
lendButton: e,
|
|
115
|
+
aboutUsLink: B,
|
|
116
|
+
partnerWithUsLink: K,
|
|
117
|
+
borrowLink: b,
|
|
118
|
+
supportKivaLink: c,
|
|
119
|
+
basketLink: x,
|
|
120
|
+
signInLink: I,
|
|
121
|
+
menuButton: d,
|
|
116
122
|
lendUrl: j,
|
|
117
123
|
avatarFilename: q,
|
|
118
124
|
handleOnHover: R,
|
|
119
125
|
handleTouchStart: W,
|
|
120
126
|
handleMouseOut: F,
|
|
121
|
-
handleAvatarMenuPosition:
|
|
127
|
+
handleAvatarMenuPosition: p,
|
|
122
128
|
KvHeaderMobileMenu: me,
|
|
123
|
-
KvHeaderMyKivaMenu:
|
|
129
|
+
KvHeaderMyKivaMenu: P,
|
|
124
130
|
KvLendMenu: se,
|
|
125
131
|
KvHeaderTakeActionMenu: ve,
|
|
126
132
|
KvHeaderAboutMenu: ce,
|
|
@@ -128,137 +134,140 @@ const me = k(() => import("./KvHeaderMobileMenu.js")), S = k(() => import("./KvH
|
|
|
128
134
|
};
|
|
129
135
|
}
|
|
130
136
|
}, fe = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5" }, Me = ["href"], ke = { class: "tw-text-eco-green-4" }, ge = ["href"];
|
|
131
|
-
function be(
|
|
132
|
-
const
|
|
133
|
-
return
|
|
134
|
-
|
|
137
|
+
function be(r, n, o, e, B, K) {
|
|
138
|
+
const b = T("kv-material-icon"), c = T("KvHeaderDropdownLink"), x = T("kv-icon-bag"), I = T("KvUserAvatar"), d = X("kv-track-event");
|
|
139
|
+
return i(), w("div", fe, [
|
|
140
|
+
m((i(), w("button", {
|
|
135
141
|
ref: "menuButton",
|
|
136
|
-
class:
|
|
137
|
-
"tw-text-tertiary":
|
|
142
|
+
class: y(["header-link tw-inline-flex md:tw-hidden", {
|
|
143
|
+
"tw-text-tertiary": o.openMenuItem && o.openMenuItem !== e.KvHeaderMobileMenu
|
|
138
144
|
}]),
|
|
139
|
-
onMouseover:
|
|
140
|
-
onMouseout:
|
|
141
|
-
onTouchstart:
|
|
145
|
+
onMouseover: n[0] || (n[0] = (t) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
|
|
146
|
+
onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
|
|
147
|
+
onTouchstart: n[2] || (n[2] = (t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu))
|
|
142
148
|
}, [
|
|
143
|
-
|
|
149
|
+
_(b, { icon: e.mdiMenu }, null, 8, ["icon"])
|
|
144
150
|
], 34)), [
|
|
145
|
-
[
|
|
151
|
+
[d, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
146
152
|
]),
|
|
147
|
-
|
|
153
|
+
m((i(), f(c, {
|
|
148
154
|
class: "tw-py-1",
|
|
149
155
|
"ref-name": "lendButton",
|
|
150
|
-
href:
|
|
151
|
-
"menu-component":
|
|
152
|
-
"open-menu-item":
|
|
153
|
-
"dropdown-icon":
|
|
156
|
+
href: e.lendUrl,
|
|
157
|
+
"menu-component": e.KvLendMenu,
|
|
158
|
+
"open-menu-item": o.openMenuItem,
|
|
159
|
+
"dropdown-icon": e.mdiChevronDown,
|
|
154
160
|
"base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-1",
|
|
155
|
-
onOnHover:
|
|
156
|
-
onMouseout:
|
|
157
|
-
onTouchstart:
|
|
161
|
+
onOnHover: e.handleOnHover,
|
|
162
|
+
onMouseout: n[3] || (n[3] = (t) => e.handleMouseOut("lendButton")),
|
|
163
|
+
onTouchstart: n[4] || (n[4] = (t) => e.handleTouchStart("lendButton", e.KvLendMenu))
|
|
158
164
|
}, {
|
|
159
|
-
default: H(() =>
|
|
165
|
+
default: H(() => n[10] || (n[10] = [
|
|
160
166
|
M(" Lend ")
|
|
161
167
|
])),
|
|
162
168
|
_: 1
|
|
163
169
|
}, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
164
|
-
[
|
|
170
|
+
[d, ["TopNav", "click-Lend"]]
|
|
165
171
|
]),
|
|
166
|
-
|
|
172
|
+
m((i(), f(c, {
|
|
167
173
|
"ref-name": "takeActionButton",
|
|
168
174
|
"base-class": "tw-hidden md:tw-inline-flex tw-py-1",
|
|
169
|
-
"menu-component":
|
|
170
|
-
"open-menu-item":
|
|
171
|
-
"dropdown-icon":
|
|
175
|
+
"menu-component": e.KvHeaderTakeActionMenu,
|
|
176
|
+
"open-menu-item": o.openMenuItem,
|
|
177
|
+
"dropdown-icon": e.mdiChevronDown,
|
|
172
178
|
"send-link-position": "",
|
|
173
|
-
onOnHover:
|
|
174
|
-
onMouseout:
|
|
179
|
+
onOnHover: e.handleOnHover,
|
|
180
|
+
onMouseout: n[5] || (n[5] = (t) => e.handleMouseOut("takeActionButton")),
|
|
181
|
+
onUserTap: e.handleTouchStart
|
|
175
182
|
}, {
|
|
176
|
-
default: H(() =>
|
|
183
|
+
default: H(() => n[11] || (n[11] = [
|
|
177
184
|
M(" Take action ")
|
|
178
185
|
])),
|
|
179
186
|
_: 1
|
|
180
|
-
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
181
|
-
[
|
|
187
|
+
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
|
|
188
|
+
[d, ["TopNav", "click-TakeAction"]]
|
|
182
189
|
]),
|
|
183
|
-
|
|
190
|
+
m((i(), f(c, {
|
|
184
191
|
"ref-name": "aboutUsLink",
|
|
185
192
|
"data-testid": "header-about",
|
|
186
193
|
"base-class": "tw-hidden md:tw-inline-flex tw-py-1",
|
|
187
|
-
"menu-component":
|
|
188
|
-
"open-menu-item":
|
|
189
|
-
"dropdown-icon":
|
|
194
|
+
"menu-component": e.KvHeaderAboutMenu,
|
|
195
|
+
"open-menu-item": o.openMenuItem,
|
|
196
|
+
"dropdown-icon": e.mdiChevronDown,
|
|
190
197
|
"send-link-position": "",
|
|
191
|
-
onOnHover:
|
|
192
|
-
onMouseout:
|
|
198
|
+
onOnHover: e.handleOnHover,
|
|
199
|
+
onMouseout: n[6] || (n[6] = (t) => e.handleMouseOut("aboutUsLink")),
|
|
200
|
+
onUserTap: e.handleTouchStart
|
|
193
201
|
}, {
|
|
194
|
-
default: H(() =>
|
|
202
|
+
default: H(() => n[12] || (n[12] = [
|
|
195
203
|
M(" About ")
|
|
196
204
|
])),
|
|
197
205
|
_: 1
|
|
198
|
-
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
199
|
-
[
|
|
206
|
+
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
|
|
207
|
+
[d, ["TopNav", "click-About"]]
|
|
200
208
|
]),
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
n[16] || (n[16] = A("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
|
|
210
|
+
o.loggedIn ? m((i(), w("a", {
|
|
203
211
|
key: 0,
|
|
204
212
|
ref: "dashboardLink",
|
|
205
|
-
href:
|
|
206
|
-
class:
|
|
207
|
-
},
|
|
213
|
+
href: o.myDashboardUrl,
|
|
214
|
+
class: y(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
215
|
+
}, n[13] || (n[13] = [
|
|
208
216
|
M(" My dashboard ")
|
|
209
217
|
]), 10, Me)), [
|
|
210
|
-
[
|
|
211
|
-
]) :
|
|
212
|
-
|
|
218
|
+
[d, ["TopNav", "click-Dashboard"]]
|
|
219
|
+
]) : C("", !0),
|
|
220
|
+
m((i(), w("a", {
|
|
213
221
|
ref: "basketLink",
|
|
214
222
|
href: "/basket",
|
|
215
|
-
class:
|
|
223
|
+
class: y(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!o.openMenuItem }]),
|
|
216
224
|
style: { "margin-right": "2px" },
|
|
217
225
|
"data-testid": "header-basket"
|
|
218
226
|
}, [
|
|
219
|
-
|
|
227
|
+
_(x, {
|
|
220
228
|
class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none",
|
|
221
|
-
count:
|
|
229
|
+
count: o.basketCount
|
|
222
230
|
}, null, 8, ["count"]),
|
|
223
|
-
|
|
231
|
+
n[14] || (n[14] = A("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
|
|
224
232
|
], 2)), [
|
|
225
|
-
[
|
|
226
|
-
[
|
|
233
|
+
[E, o.basketCount > 0],
|
|
234
|
+
[d, ["TopNav", "click-Basket"]]
|
|
227
235
|
]),
|
|
228
|
-
|
|
229
|
-
|
|
236
|
+
m(A("div", {
|
|
237
|
+
ref: "avatar",
|
|
230
238
|
class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-bg-eco-green-1 tw-rounded-md tw-py-0.5 md:tw-py-1 tw-px-1 md:tw-px-2",
|
|
231
|
-
onMouseover:
|
|
232
|
-
onMouseout:
|
|
233
|
-
onTouchstart:
|
|
239
|
+
onMouseover: n[7] || (n[7] = (...t) => e.handleAvatarMenuPosition && e.handleAvatarMenuPosition(...t)),
|
|
240
|
+
onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
|
|
241
|
+
onTouchstart: n[9] || (n[9] = (t) => e.handleTouchStart(e.AVATAR_MENU_ID))
|
|
234
242
|
}, [
|
|
235
|
-
|
|
243
|
+
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(b, {
|
|
236
244
|
key: 0,
|
|
237
|
-
icon:
|
|
245
|
+
icon: e.mdiAccountCircle,
|
|
238
246
|
class: "tw-w-3"
|
|
239
|
-
}, null, 8, ["icon"])) : (
|
|
247
|
+
}, null, 8, ["icon"])) : (i(), f(I, {
|
|
240
248
|
key: 1,
|
|
241
|
-
ref: "avatar",
|
|
242
249
|
class: "avatar",
|
|
243
|
-
"lender-name":
|
|
244
|
-
"lender-image-url":
|
|
250
|
+
"lender-name": o.lenderName,
|
|
251
|
+
"lender-image-url": o.lenderImageUrl,
|
|
245
252
|
"is-small": ""
|
|
246
253
|
}, null, 8, ["lender-name", "lender-image-url"])),
|
|
247
|
-
|
|
248
|
-
],
|
|
249
|
-
|
|
250
|
-
|
|
254
|
+
A("span", ke, Y(e.numeral(o.balance).format("$0")), 1)
|
|
255
|
+
], 544), [
|
|
256
|
+
[E, o.loggedIn]
|
|
257
|
+
]),
|
|
258
|
+
o.loggedIn ? C("", !0) : m((i(), w("a", {
|
|
259
|
+
key: 1,
|
|
251
260
|
ref: "signInLink",
|
|
252
|
-
href:
|
|
253
|
-
class:
|
|
254
|
-
},
|
|
261
|
+
href: o.loginUrl,
|
|
262
|
+
class: y(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
263
|
+
}, n[15] || (n[15] = [
|
|
255
264
|
M(" Sign in ")
|
|
256
265
|
]), 10, ge)), [
|
|
257
|
-
[
|
|
266
|
+
[d, ["TopNav", "click-Sign-in"]]
|
|
258
267
|
])
|
|
259
268
|
]);
|
|
260
269
|
}
|
|
261
|
-
const
|
|
270
|
+
const Oe = /* @__PURE__ */ ue(we, [["render", be], ["__scopeId", "data-v-7bbc2157"]]);
|
|
262
271
|
export {
|
|
263
|
-
|
|
272
|
+
Oe as default
|
|
264
273
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-bbcd9055]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-bbcd9055]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-bbcd9055],.header-fade-leave-to[data-v-bbcd9055]{opacity:0}.header-fade-leave[data-v-bbcd9055],.header-fade-enter-to[data-v-bbcd9055]{opacity:1}.bg-opacity-50[data-v-bbcd9055]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ref as l, shallowRef as D, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ref as l, shallowRef as D, computed as N, onMounted as B, onBeforeUnmount as S, resolveComponent as b, resolveDirective as x, openBlock as w, createBlock as p, withCtx as g, createElementVNode as _, normalizeStyle as k, createVNode as m, Transition as E, withDirectives as h, vShow as I, createElementBlock as A, normalizeClass as K, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import z from "@kiva/kv-tokens";
|
|
3
|
+
import P from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
4
|
import R from "./KvWwwHeader/KvHeaderLogo.js";
|
|
5
|
-
import
|
|
5
|
+
import O from "./KvThemeProvider.js";
|
|
6
6
|
import V from "./KvPageContainer.js";
|
|
7
|
-
import { throttle as
|
|
7
|
+
import { throttle as W } from "../utils/throttle.js";
|
|
8
8
|
import "./KvWwwHeader.css";
|
|
9
|
-
import
|
|
10
|
-
const j = "3.75rem", q = {
|
|
9
|
+
import Y from "../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const j = "3.75rem", q = ["lendMenu", "aboutUsLink"], F = {
|
|
11
11
|
components: {
|
|
12
|
-
KvHeaderLinkBar:
|
|
12
|
+
KvHeaderLinkBar: P,
|
|
13
13
|
KvHeaderLogo: R,
|
|
14
|
-
KvThemeProvider:
|
|
14
|
+
KvThemeProvider: O,
|
|
15
15
|
KvPageContainer: V
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
@@ -68,122 +68,122 @@ const j = "3.75rem", q = {
|
|
|
68
68
|
"load-lend-menu-data"
|
|
69
69
|
],
|
|
70
70
|
setup(L, { emit: t }) {
|
|
71
|
-
const
|
|
71
|
+
const n = l(!0), e = l(null), a = l(!1), i = D(null), s = l(null), u = l({ left: 0, position: "relative" }), d = l(!1), v = l(null);
|
|
72
72
|
let c;
|
|
73
|
-
const
|
|
74
|
-
var
|
|
75
|
-
return ((
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
...
|
|
73
|
+
const f = N(() => {
|
|
74
|
+
var r, o;
|
|
75
|
+
return ((o = (r = s.value) == null ? void 0 : r.$options) == null ? void 0 : o.name) === "KvHeaderMobileMenu";
|
|
76
|
+
}), T = (r, o, M) => {
|
|
77
|
+
o ? (v.value = r, clearTimeout(c), i.value !== o && (u.value = { left: 0, position: "relative" }), i.value = o, a.value = !0, M && (u.value = {
|
|
78
|
+
...M,
|
|
79
79
|
position: "absolute"
|
|
80
|
-
})) :
|
|
81
|
-
|
|
80
|
+
})) : a.value && (c = setTimeout(() => {
|
|
81
|
+
a.value = !1, i.value = null;
|
|
82
82
|
}, 100));
|
|
83
|
-
},
|
|
84
|
-
var
|
|
85
|
-
(
|
|
86
|
-
},
|
|
83
|
+
}, C = (r) => {
|
|
84
|
+
var o;
|
|
85
|
+
(o = s.value) == null || o.onLoad(r);
|
|
86
|
+
}, U = () => {
|
|
87
87
|
t("load-lend-menu-data");
|
|
88
88
|
}, y = () => {
|
|
89
|
-
|
|
90
|
-
}, H =
|
|
89
|
+
d.value = (window == null ? void 0 : window.innerWidth) < z.breakpoints.md, d.value && q.includes(v.value) && (i.value = null, a.value = !1);
|
|
90
|
+
}, H = W(y, 100);
|
|
91
91
|
return B(() => {
|
|
92
92
|
y(), window.addEventListener("resize", H);
|
|
93
|
-
}),
|
|
93
|
+
}), S(() => {
|
|
94
94
|
window.removeEventListener("resize", H);
|
|
95
95
|
}), {
|
|
96
96
|
HEADER_HEIGHT: j,
|
|
97
|
-
emitLendMenuEvent:
|
|
98
|
-
isMobile:
|
|
99
|
-
linksVisible:
|
|
100
|
-
menuOpen:
|
|
101
|
-
isMobileMenuActive:
|
|
102
|
-
onHover:
|
|
103
|
-
loadMenuData:
|
|
97
|
+
emitLendMenuEvent: U,
|
|
98
|
+
isMobile: d,
|
|
99
|
+
linksVisible: n,
|
|
100
|
+
menuOpen: a,
|
|
101
|
+
isMobileMenuActive: f,
|
|
102
|
+
onHover: T,
|
|
103
|
+
loadMenuData: C,
|
|
104
104
|
activeHeaderItem: e,
|
|
105
|
-
menuComponent:
|
|
106
|
-
menuComponentInstance:
|
|
107
|
-
menuPosition:
|
|
105
|
+
menuComponent: i,
|
|
106
|
+
menuComponentInstance: s,
|
|
107
|
+
menuPosition: u
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, J = {
|
|
111
111
|
href: "/",
|
|
112
112
|
class: "tw-px-1 tw-py-2 tw-cursor-pointer tw-absolute tw-top-1/2 tw-left-1/2 tw--translate-y-1/2 tw--translate-x-1/2 tw-transition-all tw-duration-300"
|
|
113
113
|
};
|
|
114
|
-
function
|
|
115
|
-
const
|
|
116
|
-
return w(),
|
|
114
|
+
function Q(L, t, n, e, a, i) {
|
|
115
|
+
const s = b("kv-header-link-bar"), u = b("kv-header-logo"), d = b("kv-page-container"), v = b("kv-theme-provider"), c = x("kv-track-event");
|
|
116
|
+
return w(), p(v, {
|
|
117
117
|
tag: "div",
|
|
118
118
|
class: "tw-bg-primary"
|
|
119
119
|
}, {
|
|
120
120
|
default: g(() => [
|
|
121
|
-
|
|
121
|
+
_("nav", {
|
|
122
122
|
class: "tw-font-medium tw-relative",
|
|
123
|
-
style:
|
|
123
|
+
style: k({ height: e.HEADER_HEIGHT })
|
|
124
124
|
}, [
|
|
125
|
-
d
|
|
125
|
+
m(d, null, {
|
|
126
126
|
default: g(() => [
|
|
127
|
-
|
|
127
|
+
m(E, { name: "header-fade" }, {
|
|
128
128
|
default: g(() => [
|
|
129
|
-
h(
|
|
130
|
-
"logged-in":
|
|
131
|
-
"basket-count":
|
|
132
|
-
"login-url":
|
|
129
|
+
h(m(s, {
|
|
130
|
+
"logged-in": n.loggedIn,
|
|
131
|
+
"basket-count": n.basketCount,
|
|
132
|
+
"login-url": n.loginUrl,
|
|
133
133
|
"open-menu-item": e.menuComponent,
|
|
134
|
-
"my-dashboard-url":
|
|
135
|
-
"lender-name":
|
|
136
|
-
"lender-image-url":
|
|
134
|
+
"my-dashboard-url": n.myDashboardUrl,
|
|
135
|
+
"lender-name": n.lenderName,
|
|
136
|
+
"lender-image-url": n.lenderImageUrl,
|
|
137
137
|
"is-mobile": e.isMobile,
|
|
138
|
-
balance:
|
|
138
|
+
balance: n.balance,
|
|
139
139
|
onItemHover: e.onHover
|
|
140
140
|
}, null, 8, ["logged-in", "basket-count", "login-url", "open-menu-item", "my-dashboard-url", "lender-name", "lender-image-url", "is-mobile", "balance", "onItemHover"]), [
|
|
141
|
-
[
|
|
141
|
+
[I, e.linksVisible]
|
|
142
142
|
])
|
|
143
143
|
]),
|
|
144
144
|
_: 1
|
|
145
145
|
}),
|
|
146
|
-
h((w(), A("a",
|
|
147
|
-
|
|
146
|
+
h((w(), A("a", J, [
|
|
147
|
+
m(u)
|
|
148
148
|
])), [
|
|
149
|
-
[
|
|
149
|
+
[c, ["TopNav", "click-Logo"]]
|
|
150
150
|
])
|
|
151
151
|
]),
|
|
152
152
|
_: 1
|
|
153
153
|
})
|
|
154
154
|
], 4),
|
|
155
|
-
|
|
155
|
+
m(E, { name: "header-fade" }, {
|
|
156
156
|
default: g(() => [
|
|
157
|
-
h(
|
|
157
|
+
h(_("div", {
|
|
158
158
|
class: "tw-absolute tw-z-modal tw-h-full tw-inset-x-0 tw-bg-eco-green-4 bg-opacity-50 tw-min-h-screen",
|
|
159
|
-
style:
|
|
159
|
+
style: k({ top: e.HEADER_HEIGHT })
|
|
160
160
|
}, [
|
|
161
|
-
|
|
162
|
-
class:
|
|
163
|
-
style:
|
|
161
|
+
_("div", {
|
|
162
|
+
class: K(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
|
|
163
|
+
style: k({
|
|
164
164
|
...e.menuPosition,
|
|
165
165
|
maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.HEADER_HEIGHT})`
|
|
166
166
|
}),
|
|
167
|
-
onMouseover: t[1] || (t[1] = (
|
|
168
|
-
onMouseout: t[2] || (t[2] = (
|
|
167
|
+
onMouseover: t[1] || (t[1] = (f) => e.onHover(e.activeHeaderItem, e.menuComponent)),
|
|
168
|
+
onMouseout: t[2] || (t[2] = (f) => e.onHover())
|
|
169
169
|
}, [
|
|
170
|
-
(w(),
|
|
170
|
+
(w(), p(G(e.menuComponent), {
|
|
171
171
|
ref: "menuComponentInstance",
|
|
172
|
-
"logged-in":
|
|
173
|
-
"login-url":
|
|
174
|
-
"user-id":
|
|
175
|
-
"is-borrower":
|
|
176
|
-
"is-trustee":
|
|
177
|
-
"my-dashboard-url":
|
|
178
|
-
"show-m-g-upsell-link":
|
|
172
|
+
"logged-in": n.loggedIn,
|
|
173
|
+
"login-url": n.loginUrl,
|
|
174
|
+
"user-id": n.userId,
|
|
175
|
+
"is-borrower": n.isBorrower,
|
|
176
|
+
"is-trustee": n.isTrustee,
|
|
177
|
+
"my-dashboard-url": n.myDashboardUrl,
|
|
178
|
+
"show-m-g-upsell-link": n.showMGUpsellLink,
|
|
179
179
|
"is-mobile": e.isMobile,
|
|
180
|
-
"countries-not-lent-to-url":
|
|
180
|
+
"countries-not-lent-to-url": n.countriesNotLentToUrl,
|
|
181
181
|
onLoadLendMenuData: e.emitLendMenuEvent,
|
|
182
|
-
onClosingMenu: t[0] || (t[0] = (
|
|
182
|
+
onClosingMenu: t[0] || (t[0] = (f) => e.onHover())
|
|
183
183
|
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "onLoadLendMenuData"]))
|
|
184
184
|
], 38)
|
|
185
185
|
], 4), [
|
|
186
|
-
[
|
|
186
|
+
[I, e.menuOpen]
|
|
187
187
|
])
|
|
188
188
|
]),
|
|
189
189
|
_: 1
|
|
@@ -192,7 +192,7 @@ function J(L, t, o, e, r, a) {
|
|
|
192
192
|
_: 1
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const ie = /* @__PURE__ */ Y(F, [["render", Q], ["__scopeId", "data-v-bbcd9055"]]);
|
|
196
196
|
export {
|
|
197
|
-
|
|
197
|
+
ie as default
|
|
198
198
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.56.
|
|
3
|
+
"version": "6.56.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "acdbc3a0f80d6560cfe5f136b5eee17a58623cb4"
|
|
118
118
|
}
|