@kiva/kv-components 6.57.1 → 6.57.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.
|
@@ -49,18 +49,18 @@ const A = {
|
|
|
49
49
|
"kv-utility-menu-clicked"
|
|
50
50
|
],
|
|
51
51
|
setup(n, { emit: i }) {
|
|
52
|
-
const t = a(null), e = a(!1), c = a(null),
|
|
52
|
+
const t = a(null), e = a(!1), c = a(null), l = (r) => {
|
|
53
53
|
t.value && !t.value.contains(r.target) && (e.value = !1);
|
|
54
|
-
},
|
|
54
|
+
}, o = () => {
|
|
55
55
|
e.value = !e.value, i("kv-utility-menu-clicked", { open: e.value });
|
|
56
56
|
};
|
|
57
57
|
return f(() => {
|
|
58
|
-
document.addEventListener("click",
|
|
58
|
+
document.addEventListener("click", l);
|
|
59
59
|
}), g(() => {
|
|
60
|
-
document.removeEventListener("click",
|
|
60
|
+
document.removeEventListener("click", l);
|
|
61
61
|
}), {
|
|
62
|
-
handleMenuClickOutside:
|
|
63
|
-
handleMenuAnchorClick:
|
|
62
|
+
handleMenuClickOutside: l,
|
|
63
|
+
handleMenuAnchorClick: o,
|
|
64
64
|
mdiDotsVertical: w,
|
|
65
65
|
menuAnchor: t,
|
|
66
66
|
menuOpen: e,
|
|
@@ -68,10 +68,10 @@ const A = {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
function B(n, i, t, e, c,
|
|
72
|
-
const
|
|
71
|
+
function B(n, i, t, e, c, l) {
|
|
72
|
+
const o = h("KvMaterialIcon"), r = y("kv-track-event");
|
|
73
73
|
return s(), d("div", {
|
|
74
|
-
class: u(["tw-relative
|
|
74
|
+
class: u(["tw-relative utility-menu-wrapper", [
|
|
75
75
|
t.buttonSize === "small" ? "tw-w-4 tw-h-4" : "tw-w-6 tw-h-6"
|
|
76
76
|
]])
|
|
77
77
|
}, [
|
|
@@ -84,9 +84,9 @@ function B(n, i, t, e, c, o) {
|
|
|
84
84
|
]]),
|
|
85
85
|
onClick: i[0] || (i[0] = k((...v) => e.handleMenuAnchorClick && e.handleMenuAnchorClick(...v), ["stop"]))
|
|
86
86
|
}, [
|
|
87
|
-
p(
|
|
87
|
+
p(o, { icon: t.icon }, null, 8, ["icon"])
|
|
88
88
|
], 2)), [
|
|
89
|
-
[r, [
|
|
89
|
+
[r, [t.analyticsCategory, "click", "utility-menu"]]
|
|
90
90
|
]),
|
|
91
91
|
m(b("div", {
|
|
92
92
|
ref: "optionsMenu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-b071331e]{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-b071331e]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-b071331e] .avatar div:first-child{display:flex}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineAsyncComponent as g, ref as
|
|
2
|
-
import { mdiAccountCircle as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { throttle as
|
|
9
|
-
import { isLegacyPlaceholderAvatar as
|
|
1
|
+
import { defineAsyncComponent as g, ref as r, computed as I, watch as q, onMounted as G, onUnmounted as J, resolveComponent as p, resolveDirective as Q, 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 S, vShow as C, toDisplayString as X } from "vue";
|
|
2
|
+
import { mdiAccountCircle as Y, mdiChevronDown as Z, mdiMagnify as $, mdiMenu as ee } from "@mdi/js";
|
|
3
|
+
import ne from "numeral";
|
|
4
|
+
import te from "../KvMaterialIcon.js";
|
|
5
|
+
import oe from "../KvIconBag.js";
|
|
6
|
+
import ae from "./KvHeaderDropdownLink.js";
|
|
7
|
+
import le from "../KvUserAvatar.js";
|
|
8
|
+
import { throttle as re } from "../../utils/throttle.js";
|
|
9
|
+
import { isLegacyPlaceholderAvatar as ie } from "../../utils/imageUtils.js";
|
|
10
10
|
import "./KvHeaderLinkBar.css";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import de from "../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const ue = g(() => import("./KvHeaderMobileMenu.js")), E = g(() => import("./KvHeaderMyKivaMenu.js")), me = g(() => import("./LendMenu/KvLendMenu.js")), se = g(() => import("./KvHeaderTakeActionMenu.js")), ve = g(() => import("./KvHeaderAboutMenu.js")), U = 120, k = "avatar-menu", B = "menuButton", P = { top: "-3.75rem", width: "100%" }, ce = {
|
|
13
13
|
components: {
|
|
14
|
-
KvMaterialIcon:
|
|
15
|
-
KvIconBag:
|
|
16
|
-
KvHeaderDropdownLink:
|
|
17
|
-
KvUserAvatar:
|
|
14
|
+
KvMaterialIcon: te,
|
|
15
|
+
KvIconBag: oe,
|
|
16
|
+
KvHeaderDropdownLink: ae,
|
|
17
|
+
KvUserAvatar: le
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
20
20
|
loggedIn: {
|
|
@@ -57,87 +57,86 @@ const se = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvH
|
|
|
57
57
|
emits: [
|
|
58
58
|
"item-hover"
|
|
59
59
|
],
|
|
60
|
-
setup(
|
|
61
|
-
const o =
|
|
60
|
+
setup(l, { emit: n }) {
|
|
61
|
+
const o = r(null), e = r(null), L = r(null), K = r(null), b = r(null), c = r(null), T = r(null), x = r(null), d = r(null), t = r(null), s = (a, v, u = null) => {
|
|
62
62
|
n("item-hover", a, v, u);
|
|
63
|
-
},
|
|
63
|
+
}, V = (a, v, u = null) => {
|
|
64
64
|
navigator.maxTouchPoints || (t.value = a, s(
|
|
65
65
|
a,
|
|
66
66
|
v,
|
|
67
|
-
a ===
|
|
67
|
+
a === B && l.isMobile ? P : u
|
|
68
68
|
));
|
|
69
|
-
},
|
|
69
|
+
}, R = (a) => {
|
|
70
70
|
!navigator.maxTouchPoints && t.value === a && (t.value = null, s());
|
|
71
|
-
},
|
|
72
|
-
var
|
|
73
|
-
const a = (
|
|
71
|
+
}, O = () => {
|
|
72
|
+
var D;
|
|
73
|
+
const a = (D = o.value) == null ? void 0 : D.getBoundingClientRect();
|
|
74
74
|
if (!a) return null;
|
|
75
|
-
const u = a.left + a.width / 2 -
|
|
75
|
+
const u = a.left + a.width / 2 - U / 2;
|
|
76
76
|
return {
|
|
77
|
-
...u +
|
|
77
|
+
...u + U > window.innerWidth ? { right: 0 } : { left: l.isMobile ? 0 : `${u}px` },
|
|
78
78
|
marginTop: "-2px",
|
|
79
79
|
// Avoid closing avatar menu on header edge
|
|
80
|
-
borderRadius:
|
|
81
|
-
width:
|
|
80
|
+
borderRadius: l.isMobile ? "auto" : "0px 0px 8px 8px",
|
|
81
|
+
width: l.isMobile ? "100%" : `${U}px`
|
|
82
82
|
};
|
|
83
|
-
},
|
|
84
|
-
t.value = k, s(o.value,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
t.value === k && p();
|
|
91
|
-
}, 100), j = H(() => r.isMobile ? void 0 : "/lend-by-category"), q = H(() => {
|
|
83
|
+
}, h = () => {
|
|
84
|
+
t.value = k, s(o.value, E, O());
|
|
85
|
+
}, F = (a, v, u) => {
|
|
86
|
+
t.value === B && (t.value = null), !t.value || t.value !== a ? (t.value = a, a === k ? h() : a === B && l.isMobile ? s(a, v, P) : s(a, v, u)) : (t.value = null, s());
|
|
87
|
+
}, N = re(() => {
|
|
88
|
+
t.value === k && h();
|
|
89
|
+
}, 100), z = I(() => l.isMobile ? void 0 : "/lend-by-category"), W = I(() => {
|
|
92
90
|
var a;
|
|
93
|
-
return ((a =
|
|
94
|
-
}),
|
|
95
|
-
return
|
|
96
|
-
() =>
|
|
91
|
+
return ((a = l.lenderImageUrl) == null ? void 0 : a.split("/").pop()) ?? "";
|
|
92
|
+
}), j = I(() => Math.floor(l.balance));
|
|
93
|
+
return q(
|
|
94
|
+
() => l.isMobile,
|
|
97
95
|
() => {
|
|
98
|
-
t.value === k &&
|
|
96
|
+
t.value === k && h();
|
|
99
97
|
}
|
|
100
|
-
),
|
|
101
|
-
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize",
|
|
102
|
-
}),
|
|
103
|
-
window.removeEventListener("resize",
|
|
98
|
+
), G(() => {
|
|
99
|
+
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", N);
|
|
100
|
+
}), J(() => {
|
|
101
|
+
window.removeEventListener("resize", N);
|
|
104
102
|
}), {
|
|
105
103
|
AVATAR_MENU_ID: k,
|
|
106
104
|
openMenuId: t,
|
|
107
|
-
numeral:
|
|
108
|
-
mdiAccountCircle:
|
|
109
|
-
mdiChevronDown:
|
|
110
|
-
mdiMagnify:
|
|
111
|
-
mdiMenu:
|
|
105
|
+
numeral: ne,
|
|
106
|
+
mdiAccountCircle: Y,
|
|
107
|
+
mdiChevronDown: Z,
|
|
108
|
+
mdiMagnify: $,
|
|
109
|
+
mdiMenu: ee,
|
|
112
110
|
onHover: s,
|
|
113
111
|
avatar: o,
|
|
114
112
|
lendButton: e,
|
|
115
|
-
aboutUsLink:
|
|
116
|
-
partnerWithUsLink:
|
|
117
|
-
borrowLink:
|
|
113
|
+
aboutUsLink: L,
|
|
114
|
+
partnerWithUsLink: K,
|
|
115
|
+
borrowLink: b,
|
|
118
116
|
supportKivaLink: c,
|
|
119
|
-
basketLink:
|
|
120
|
-
signInLink:
|
|
117
|
+
basketLink: T,
|
|
118
|
+
signInLink: x,
|
|
121
119
|
menuButton: d,
|
|
122
|
-
lendUrl:
|
|
123
|
-
avatarFilename:
|
|
124
|
-
handleOnHover:
|
|
125
|
-
handleTouchStart:
|
|
126
|
-
handleMouseOut:
|
|
127
|
-
handleAvatarMenuPosition:
|
|
128
|
-
KvHeaderMobileMenu:
|
|
129
|
-
KvHeaderMyKivaMenu:
|
|
130
|
-
KvLendMenu:
|
|
131
|
-
KvHeaderTakeActionMenu:
|
|
132
|
-
KvHeaderAboutMenu:
|
|
133
|
-
isLegacyPlaceholderAvatar:
|
|
134
|
-
|
|
120
|
+
lendUrl: z,
|
|
121
|
+
avatarFilename: W,
|
|
122
|
+
handleOnHover: V,
|
|
123
|
+
handleTouchStart: F,
|
|
124
|
+
handleMouseOut: R,
|
|
125
|
+
handleAvatarMenuPosition: h,
|
|
126
|
+
KvHeaderMobileMenu: ue,
|
|
127
|
+
KvHeaderMyKivaMenu: E,
|
|
128
|
+
KvLendMenu: me,
|
|
129
|
+
KvHeaderTakeActionMenu: se,
|
|
130
|
+
KvHeaderAboutMenu: ve,
|
|
131
|
+
isLegacyPlaceholderAvatar: ie,
|
|
132
|
+
getAvatarMenuPosition: O,
|
|
133
|
+
roundedBalance: j
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
},
|
|
138
|
-
function
|
|
139
|
-
const
|
|
140
|
-
return i(), w("div",
|
|
136
|
+
}, we = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5" }, fe = ["href"], Me = { class: "tw-text-eco-green-4" }, ke = ["href"];
|
|
137
|
+
function ge(l, n, o, e, L, K) {
|
|
138
|
+
const b = p("kv-material-icon"), c = p("KvHeaderDropdownLink"), T = p("kv-icon-bag"), x = p("KvUserAvatar"), d = Q("kv-track-event");
|
|
139
|
+
return i(), w("div", we, [
|
|
141
140
|
m((i(), w("button", {
|
|
142
141
|
ref: "menuButton",
|
|
143
142
|
class: y(["header-link tw-inline-flex md:tw-hidden", {
|
|
@@ -147,7 +146,7 @@ function be(r, n, o, e, K, O) {
|
|
|
147
146
|
onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
|
|
148
147
|
onTouchstart: n[2] || (n[2] = (t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu))
|
|
149
148
|
}, [
|
|
150
|
-
_(
|
|
149
|
+
_(b, { icon: e.mdiMenu }, null, 8, ["icon"])
|
|
151
150
|
], 34)), [
|
|
152
151
|
[d, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
153
152
|
]),
|
|
@@ -163,7 +162,7 @@ function be(r, n, o, e, K, O) {
|
|
|
163
162
|
onMouseout: n[3] || (n[3] = (t) => e.handleMouseOut("lendButton")),
|
|
164
163
|
onTouchstart: n[4] || (n[4] = (t) => e.handleTouchStart("lendButton", e.KvLendMenu))
|
|
165
164
|
}, {
|
|
166
|
-
default:
|
|
165
|
+
default: H(() => n[10] || (n[10] = [
|
|
167
166
|
M(" Lend ")
|
|
168
167
|
])),
|
|
169
168
|
_: 1
|
|
@@ -181,7 +180,7 @@ function be(r, n, o, e, K, O) {
|
|
|
181
180
|
onMouseout: n[5] || (n[5] = (t) => e.handleMouseOut("takeActionButton")),
|
|
182
181
|
onUserTap: e.handleTouchStart
|
|
183
182
|
}, {
|
|
184
|
-
default:
|
|
183
|
+
default: H(() => n[11] || (n[11] = [
|
|
185
184
|
M(" Take action ")
|
|
186
185
|
])),
|
|
187
186
|
_: 1
|
|
@@ -200,7 +199,7 @@ function be(r, n, o, e, K, O) {
|
|
|
200
199
|
onMouseout: n[6] || (n[6] = (t) => e.handleMouseOut("aboutUsLink")),
|
|
201
200
|
onUserTap: e.handleTouchStart
|
|
202
201
|
}, {
|
|
203
|
-
default:
|
|
202
|
+
default: H(() => n[12] || (n[12] = [
|
|
204
203
|
M(" About ")
|
|
205
204
|
])),
|
|
206
205
|
_: 1
|
|
@@ -215,9 +214,9 @@ function be(r, n, o, e, K, O) {
|
|
|
215
214
|
class: y(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
216
215
|
}, n[13] || (n[13] = [
|
|
217
216
|
M(" My dashboard ")
|
|
218
|
-
]), 10,
|
|
217
|
+
]), 10, fe)), [
|
|
219
218
|
[d, ["TopNav", "click-Dashboard"]]
|
|
220
|
-
]) :
|
|
219
|
+
]) : S("", !0),
|
|
221
220
|
m((i(), w("a", {
|
|
222
221
|
ref: "basketLink",
|
|
223
222
|
href: "/basket",
|
|
@@ -225,50 +224,50 @@ function be(r, n, o, e, K, O) {
|
|
|
225
224
|
style: { "margin-right": "2px" },
|
|
226
225
|
"data-testid": "header-basket"
|
|
227
226
|
}, [
|
|
228
|
-
_(
|
|
227
|
+
_(T, {
|
|
229
228
|
class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none",
|
|
230
229
|
count: o.basketCount
|
|
231
230
|
}, null, 8, ["count"]),
|
|
232
231
|
n[14] || (n[14] = A("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
|
|
233
232
|
], 2)), [
|
|
234
|
-
[
|
|
233
|
+
[C, o.basketCount > 0],
|
|
235
234
|
[d, ["TopNav", "click-Basket"]]
|
|
236
235
|
]),
|
|
237
236
|
m(A("div", {
|
|
238
237
|
ref: "avatar",
|
|
239
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",
|
|
240
|
-
onMouseover: n[7] || (n[7] = (
|
|
239
|
+
onMouseover: n[7] || (n[7] = (t) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
|
|
241
240
|
onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
|
|
242
241
|
onTouchstart: n[9] || (n[9] = (t) => e.handleTouchStart(e.AVATAR_MENU_ID))
|
|
243
242
|
}, [
|
|
244
|
-
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(
|
|
243
|
+
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(b, {
|
|
245
244
|
key: 0,
|
|
246
245
|
icon: e.mdiAccountCircle,
|
|
247
246
|
class: "tw-w-3"
|
|
248
|
-
}, null, 8, ["icon"])) : (i(), f(
|
|
247
|
+
}, null, 8, ["icon"])) : (i(), f(x, {
|
|
249
248
|
key: 1,
|
|
250
249
|
class: "avatar",
|
|
251
250
|
"lender-name": o.lenderName,
|
|
252
251
|
"lender-image-url": o.lenderImageUrl,
|
|
253
252
|
"is-small": ""
|
|
254
253
|
}, null, 8, ["lender-name", "lender-image-url"])),
|
|
255
|
-
A("span",
|
|
254
|
+
A("span", Me, X(e.numeral(e.roundedBalance).format("$0")), 1)
|
|
256
255
|
], 544), [
|
|
257
|
-
[
|
|
256
|
+
[C, o.loggedIn]
|
|
258
257
|
]),
|
|
259
|
-
o.loggedIn ?
|
|
258
|
+
o.loggedIn ? S("", !0) : m((i(), w("a", {
|
|
260
259
|
key: 1,
|
|
261
260
|
ref: "signInLink",
|
|
262
261
|
href: o.loginUrl,
|
|
263
262
|
class: y(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
264
263
|
}, n[15] || (n[15] = [
|
|
265
264
|
M(" Sign in ")
|
|
266
|
-
]), 10,
|
|
265
|
+
]), 10, ke)), [
|
|
267
266
|
[d, ["TopNav", "click-Sign-in"]]
|
|
268
267
|
])
|
|
269
268
|
]);
|
|
270
269
|
}
|
|
271
|
-
const
|
|
270
|
+
const Ke = /* @__PURE__ */ de(ce, [["render", ge], ["__scopeId", "data-v-b071331e"]]);
|
|
272
271
|
export {
|
|
273
|
-
|
|
272
|
+
Ke as default
|
|
274
273
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-cdd5a3af]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-cdd5a3af]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-cdd5a3af],.header-fade-leave-to[data-v-cdd5a3af]{opacity:0}.header-fade-leave[data-v-cdd5a3af],.header-fade-enter-to[data-v-cdd5a3af]{opacity:1}.bg-opacity-50[data-v-cdd5a3af]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as l, shallowRef as D, computed as N, onMounted as B, onBeforeUnmount as S, resolveComponent as
|
|
1
|
+
import { ref as l, shallowRef as D, computed as N, onMounted as B, onBeforeUnmount as S, resolveComponent as g, resolveDirective as x, openBlock as w, createBlock as p, withCtx as b, createElementVNode as k, normalizeStyle as _, createVNode as v, Transition as E, withDirectives as h, vShow as I, createElementBlock as A, normalizeClass as K, resolveDynamicComponent as G } from "vue";
|
|
2
2
|
import z from "@kiva/kv-tokens";
|
|
3
3
|
import P from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
4
|
import R from "./KvWwwHeader/KvHeaderLogo.js";
|
|
@@ -67,26 +67,26 @@ const j = "3.75rem", q = ["lendMenu", "aboutUsLink"], F = {
|
|
|
67
67
|
emits: [
|
|
68
68
|
"load-lend-menu-data"
|
|
69
69
|
],
|
|
70
|
-
setup(L, { emit:
|
|
71
|
-
const n = l(!0), e = l(null), a = l(!1),
|
|
72
|
-
let
|
|
73
|
-
const
|
|
74
|
-
var
|
|
75
|
-
return ((
|
|
76
|
-
}), T = (
|
|
77
|
-
|
|
70
|
+
setup(L, { emit: o }) {
|
|
71
|
+
const n = l(!0), e = l(null), a = l(!1), r = D(null), s = l(null), u = l({ left: 0, position: "relative" }), d = l(!1), c = l(null);
|
|
72
|
+
let f;
|
|
73
|
+
const m = N(() => {
|
|
74
|
+
var i, t;
|
|
75
|
+
return ((t = (i = s.value) == null ? void 0 : i.$options) == null ? void 0 : t.name) === "KvHeaderMobileMenu";
|
|
76
|
+
}), T = (i, t, M) => {
|
|
77
|
+
t ? (c.value = i, clearTimeout(f), r.value !== t && (u.value = { left: 0, position: "relative" }), r.value = t, a.value = !0, M && (u.value = {
|
|
78
78
|
...M,
|
|
79
79
|
position: "absolute"
|
|
80
|
-
})) : a.value && (
|
|
81
|
-
a.value = !1,
|
|
80
|
+
})) : a.value && (f = setTimeout(() => {
|
|
81
|
+
a.value = !1, r.value = null;
|
|
82
82
|
}, 100));
|
|
83
|
-
}, C = (
|
|
84
|
-
var
|
|
85
|
-
(
|
|
83
|
+
}, C = (i) => {
|
|
84
|
+
var t;
|
|
85
|
+
(t = s.value) == null || t.onLoad(i);
|
|
86
86
|
}, U = () => {
|
|
87
|
-
|
|
87
|
+
o("load-lend-menu-data");
|
|
88
88
|
}, y = () => {
|
|
89
|
-
d.value = (window == null ? void 0 : window.innerWidth) < z.breakpoints.md, d.value && q.includes(
|
|
89
|
+
d.value = (window == null ? void 0 : window.innerWidth) < z.breakpoints.md, d.value && q.includes(c.value) && (r.value = null, a.value = !1);
|
|
90
90
|
}, H = W(y, 100);
|
|
91
91
|
return B(() => {
|
|
92
92
|
y(), window.addEventListener("resize", H);
|
|
@@ -98,11 +98,11 @@ const j = "3.75rem", q = ["lendMenu", "aboutUsLink"], F = {
|
|
|
98
98
|
isMobile: d,
|
|
99
99
|
linksVisible: n,
|
|
100
100
|
menuOpen: a,
|
|
101
|
-
isMobileMenuActive:
|
|
101
|
+
isMobileMenuActive: m,
|
|
102
102
|
onHover: T,
|
|
103
103
|
loadMenuData: C,
|
|
104
104
|
activeHeaderItem: e,
|
|
105
|
-
menuComponent:
|
|
105
|
+
menuComponent: r,
|
|
106
106
|
menuComponentInstance: s,
|
|
107
107
|
menuPosition: u
|
|
108
108
|
};
|
|
@@ -111,22 +111,22 @@ const j = "3.75rem", q = ["lendMenu", "aboutUsLink"], F = {
|
|
|
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 Q(L,
|
|
115
|
-
const s =
|
|
116
|
-
return w(), p(
|
|
114
|
+
function Q(L, o, n, e, a, r) {
|
|
115
|
+
const s = g("kv-header-link-bar"), u = g("kv-header-logo"), d = g("kv-page-container"), c = g("kv-theme-provider"), f = x("kv-track-event");
|
|
116
|
+
return w(), p(c, {
|
|
117
117
|
tag: "div",
|
|
118
118
|
class: "tw-bg-primary"
|
|
119
119
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
120
|
+
default: b(() => [
|
|
121
|
+
k("nav", {
|
|
122
122
|
class: "tw-font-medium tw-relative",
|
|
123
|
-
style:
|
|
123
|
+
style: _({ height: e.HEADER_HEIGHT })
|
|
124
124
|
}, [
|
|
125
|
-
|
|
126
|
-
default:
|
|
127
|
-
|
|
128
|
-
default:
|
|
129
|
-
h(
|
|
125
|
+
v(d, null, {
|
|
126
|
+
default: b(() => [
|
|
127
|
+
v(E, { name: "header-fade" }, {
|
|
128
|
+
default: b(() => [
|
|
129
|
+
h(v(s, {
|
|
130
130
|
"logged-in": n.loggedIn,
|
|
131
131
|
"basket-count": n.basketCount,
|
|
132
132
|
"login-url": n.loginUrl,
|
|
@@ -144,28 +144,29 @@ function Q(L, t, n, e, a, i) {
|
|
|
144
144
|
_: 1
|
|
145
145
|
}),
|
|
146
146
|
h((w(), A("a", J, [
|
|
147
|
-
|
|
147
|
+
v(u)
|
|
148
148
|
])), [
|
|
149
|
-
[
|
|
149
|
+
[f, ["TopNav", "click-Logo"]]
|
|
150
150
|
])
|
|
151
151
|
]),
|
|
152
152
|
_: 1
|
|
153
153
|
})
|
|
154
154
|
], 4),
|
|
155
|
-
|
|
156
|
-
default:
|
|
157
|
-
h(
|
|
155
|
+
v(E, { name: "header-fade" }, {
|
|
156
|
+
default: b(() => [
|
|
157
|
+
h(k("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: _({ top: e.HEADER_HEIGHT }),
|
|
160
|
+
onTouchstart: o[3] || (o[3] = (m) => e.onHover())
|
|
160
161
|
}, [
|
|
161
|
-
|
|
162
|
+
k("div", {
|
|
162
163
|
class: K(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
|
|
163
|
-
style:
|
|
164
|
+
style: _({
|
|
164
165
|
...e.menuPosition,
|
|
165
166
|
maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.HEADER_HEIGHT})`
|
|
166
167
|
}),
|
|
167
|
-
onMouseover:
|
|
168
|
-
onMouseout:
|
|
168
|
+
onMouseover: o[1] || (o[1] = (m) => e.onHover(e.activeHeaderItem, e.menuComponent)),
|
|
169
|
+
onMouseout: o[2] || (o[2] = (m) => e.onHover())
|
|
169
170
|
}, [
|
|
170
171
|
(w(), p(G(e.menuComponent), {
|
|
171
172
|
ref: "menuComponentInstance",
|
|
@@ -179,10 +180,10 @@ function Q(L, t, n, e, a, i) {
|
|
|
179
180
|
"is-mobile": e.isMobile,
|
|
180
181
|
"countries-not-lent-to-url": n.countriesNotLentToUrl,
|
|
181
182
|
onLoadLendMenuData: e.emitLendMenuEvent,
|
|
182
|
-
onClosingMenu:
|
|
183
|
+
onClosingMenu: o[0] || (o[0] = (m) => e.onHover())
|
|
183
184
|
}, 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
185
|
], 38)
|
|
185
|
-
],
|
|
186
|
+
], 36), [
|
|
186
187
|
[I, e.menuOpen]
|
|
187
188
|
])
|
|
188
189
|
]),
|
|
@@ -192,7 +193,7 @@ function Q(L, t, n, e, a, i) {
|
|
|
192
193
|
_: 1
|
|
193
194
|
});
|
|
194
195
|
}
|
|
195
|
-
const
|
|
196
|
+
const re = /* @__PURE__ */ Y(F, [["render", Q], ["__scopeId", "data-v-cdd5a3af"]]);
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
+
re as default
|
|
198
199
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.57.
|
|
3
|
+
"version": "6.57.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": "773c99e26b05b13cba25a94d5d07639510107c8c"
|
|
118
118
|
}
|