@kiva/kv-components 6.62.2 → 6.62.4

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