@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), o = (r) => {
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
- }, l = () => {
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", o);
58
+ document.addEventListener("click", l);
59
59
  }), g(() => {
60
- document.removeEventListener("click", o);
60
+ document.removeEventListener("click", l);
61
61
  }), {
62
- handleMenuClickOutside: o,
63
- handleMenuAnchorClick: l,
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, o) {
72
- const l = h("KvMaterialIcon"), r = y("kv-track-event");
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 utitlity-menu-wrapper", [
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(l, { icon: t.icon }, null, 8, ["icon"])
87
+ p(o, { icon: t.icon }, null, 8, ["icon"])
88
88
  ], 2)), [
89
- [r, ["`${analyticsCategory}`", "click", "utility-menu"]]
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-f0a49c46]{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-f0a49c46]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-f0a49c46] .avatar div:first-child{display:flex}
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 l, computed as H, watch as J, onMounted as Q, onUnmounted as X, resolveComponent as T, resolveDirective as Y, openBlock as i, createElementBlock as w, withDirectives as m, normalizeClass as y, createVNode as _, createBlock as f, withCtx as B, createTextVNode as M, createElementVNode as A, createCommentVNode as C, vShow as E, toDisplayString as Z } from "vue";
2
- import { mdiAccountCircle as $, mdiChevronDown as ee, mdiMagnify as ne, mdiMenu as te } from "@mdi/js";
3
- import oe from "numeral";
4
- import ae from "../KvMaterialIcon.js";
5
- import le from "../KvIconBag.js";
6
- import re from "./KvHeaderDropdownLink.js";
7
- import ie from "../KvUserAvatar.js";
8
- import { throttle as de } from "../../utils/throttle.js";
9
- import { isLegacyPlaceholderAvatar as ue } from "../../utils/imageUtils.js";
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 me from "../../_virtual/_plugin-vue_export-helper.js";
12
- const se = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvHeaderMyKivaMenu.js")), ve = g(() => import("./LendMenu/KvLendMenu.js")), ce = g(() => import("./KvHeaderTakeActionMenu.js")), we = g(() => import("./KvHeaderAboutMenu.js")), L = 120, k = "avatar-menu", U = "menuButton", V = { top: "-3.75rem", width: "100%" }, fe = {
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: ae,
15
- KvIconBag: le,
16
- KvHeaderDropdownLink: re,
17
- KvUserAvatar: ie
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(r, { emit: n }) {
61
- const o = l(null), e = l(null), K = l(null), O = l(null), h = l(null), c = l(null), x = l(null), I = l(null), d = l(null), t = l(null), N = l(!1), b = l(), s = (a, v, u = null) => {
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
- }, R = (a, v, u = null) => {
63
+ }, V = (a, v, u = null) => {
64
64
  navigator.maxTouchPoints || (t.value = a, s(
65
65
  a,
66
66
  v,
67
- a === U && r.isMobile ? V : u
67
+ a === B && l.isMobile ? P : u
68
68
  ));
69
- }, F = (a) => {
69
+ }, R = (a) => {
70
70
  !navigator.maxTouchPoints && t.value === a && (t.value = null, s());
71
- }, z = () => {
72
- var S;
73
- const a = (S = o.value) == null ? void 0 : S.getBoundingClientRect();
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 - L / 2;
75
+ const u = a.left + a.width / 2 - U / 2;
76
76
  return {
77
- ...u + L > window.innerWidth ? { right: 0 } : { left: r.isMobile ? 0 : `${u}px` },
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: r.isMobile ? "auto" : "0px 0px 8px 8px",
81
- width: r.isMobile ? "100%" : `${L}px`
80
+ borderRadius: l.isMobile ? "auto" : "0px 0px 8px 8px",
81
+ width: l.isMobile ? "100%" : `${U}px`
82
82
  };
83
- }, p = () => {
84
- t.value = k, s(o.value, P, z());
85
- }, W = (a, v, u) => {
86
- b.value = null, N.value = !0, b.value && clearTimeout(b.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()), b.value = setTimeout(() => {
87
- N.value = !1;
88
- }, 500);
89
- }, D = de(() => {
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 = r.lenderImageUrl) == null ? void 0 : a.split("/").pop()) ?? "";
94
- }), G = H(() => Math.floor(r.balance));
95
- return J(
96
- () => r.isMobile,
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 && p();
96
+ t.value === k && h();
99
97
  }
100
- ), Q(() => {
101
- import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", D);
102
- }), X(() => {
103
- window.removeEventListener("resize", D);
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: oe,
108
- mdiAccountCircle: $,
109
- mdiChevronDown: ee,
110
- mdiMagnify: ne,
111
- mdiMenu: te,
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: K,
116
- partnerWithUsLink: O,
117
- borrowLink: h,
113
+ aboutUsLink: L,
114
+ partnerWithUsLink: K,
115
+ borrowLink: b,
118
116
  supportKivaLink: c,
119
- basketLink: x,
120
- signInLink: I,
117
+ basketLink: T,
118
+ signInLink: x,
121
119
  menuButton: d,
122
- lendUrl: j,
123
- avatarFilename: q,
124
- handleOnHover: R,
125
- handleTouchStart: W,
126
- handleMouseOut: F,
127
- handleAvatarMenuPosition: p,
128
- KvHeaderMobileMenu: se,
129
- KvHeaderMyKivaMenu: P,
130
- KvLendMenu: ve,
131
- KvHeaderTakeActionMenu: ce,
132
- KvHeaderAboutMenu: we,
133
- isLegacyPlaceholderAvatar: ue,
134
- roundedBalance: G
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
- }, Me = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5" }, ke = ["href"], ge = { class: "tw-text-eco-green-4" }, he = ["href"];
138
- function be(r, n, o, e, K, O) {
139
- const h = T("kv-material-icon"), c = T("KvHeaderDropdownLink"), x = T("kv-icon-bag"), I = T("KvUserAvatar"), d = Y("kv-track-event");
140
- return i(), w("div", Me, [
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
- _(h, { icon: e.mdiMenu }, null, 8, ["icon"])
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: B(() => n[10] || (n[10] = [
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: B(() => n[11] || (n[11] = [
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: B(() => n[12] || (n[12] = [
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, ke)), [
217
+ ]), 10, fe)), [
219
218
  [d, ["TopNav", "click-Dashboard"]]
220
- ]) : C("", !0),
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
- _(x, {
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
- [E, o.basketCount > 0],
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] = (...t) => e.handleAvatarMenuPosition && e.handleAvatarMenuPosition(...t)),
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(h, {
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(I, {
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", ge, Z(e.numeral(e.roundedBalance).format("$0")), 1)
254
+ A("span", Me, X(e.numeral(e.roundedBalance).format("$0")), 1)
256
255
  ], 544), [
257
- [E, o.loggedIn]
256
+ [C, o.loggedIn]
258
257
  ]),
259
- o.loggedIn ? C("", !0) : m((i(), w("a", {
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, he)), [
265
+ ]), 10, ke)), [
267
266
  [d, ["TopNav", "click-Sign-in"]]
268
267
  ])
269
268
  ]);
270
269
  }
271
- const Ne = /* @__PURE__ */ me(fe, [["render", be], ["__scopeId", "data-v-f0a49c46"]]);
270
+ const Ke = /* @__PURE__ */ de(ce, [["render", ge], ["__scopeId", "data-v-b071331e"]]);
272
271
  export {
273
- Ne as default
272
+ Ke as default
274
273
  };
@@ -1 +1 @@
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)}
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)}
@@ -1,4 +1,4 @@
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";
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: t }) {
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
- let c;
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 = {
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 && (c = setTimeout(() => {
81
- a.value = !1, i.value = null;
80
+ })) : a.value && (f = setTimeout(() => {
81
+ a.value = !1, r.value = null;
82
82
  }, 100));
83
- }, C = (r) => {
84
- var o;
85
- (o = s.value) == null || o.onLoad(r);
83
+ }, C = (i) => {
84
+ var t;
85
+ (t = s.value) == null || t.onLoad(i);
86
86
  }, U = () => {
87
- t("load-lend-menu-data");
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(v.value) && (i.value = null, a.value = !1);
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: f,
101
+ isMobileMenuActive: m,
102
102
  onHover: T,
103
103
  loadMenuData: C,
104
104
  activeHeaderItem: e,
105
- menuComponent: i,
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, 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, {
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: g(() => [
121
- _("nav", {
120
+ default: b(() => [
121
+ k("nav", {
122
122
  class: "tw-font-medium tw-relative",
123
- style: k({ height: e.HEADER_HEIGHT })
123
+ style: _({ height: e.HEADER_HEIGHT })
124
124
  }, [
125
- m(d, null, {
126
- default: g(() => [
127
- m(E, { name: "header-fade" }, {
128
- default: g(() => [
129
- h(m(s, {
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
- m(u)
147
+ v(u)
148
148
  ])), [
149
- [c, ["TopNav", "click-Logo"]]
149
+ [f, ["TopNav", "click-Logo"]]
150
150
  ])
151
151
  ]),
152
152
  _: 1
153
153
  })
154
154
  ], 4),
155
- m(E, { name: "header-fade" }, {
156
- default: g(() => [
157
- h(_("div", {
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: k({ top: e.HEADER_HEIGHT })
159
+ style: _({ top: e.HEADER_HEIGHT }),
160
+ onTouchstart: o[3] || (o[3] = (m) => e.onHover())
160
161
  }, [
161
- _("div", {
162
+ k("div", {
162
163
  class: K(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
163
- style: k({
164
+ style: _({
164
165
  ...e.menuPosition,
165
166
  maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.HEADER_HEIGHT})`
166
167
  }),
167
- onMouseover: t[1] || (t[1] = (f) => e.onHover(e.activeHeaderItem, e.menuComponent)),
168
- onMouseout: t[2] || (t[2] = (f) => e.onHover())
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: t[0] || (t[0] = (f) => e.onHover())
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
- ], 4), [
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 ie = /* @__PURE__ */ Y(F, [["render", Q], ["__scopeId", "data-v-bbcd9055"]]);
196
+ const re = /* @__PURE__ */ Y(F, [["render", Q], ["__scopeId", "data-v-cdd5a3af"]]);
196
197
  export {
197
- ie as default
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.1",
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": "17d74986070657f1de39a0620eed5b23344aedcf"
117
+ "gitHead": "773c99e26b05b13cba25a94d5d07639510107c8c"
118
118
  }