@kiva/kv-components 6.56.1 → 6.56.2

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,8 +1,8 @@
1
- import { getCurrentInstance as c, computed as d, resolveComponent as m, openBlock as u, createElementBlock as f, createElementVNode as w, normalizeClass as l, renderSlot as p, createVNode as v } from "vue";
2
- import h from "../KvMaterialIcon.js";
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 C = {
5
- components: { KvMaterialIcon: h },
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: o }) {
40
- const { proxy: n } = c();
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: d(() => [
43
- e.baseClass,
44
- { "tw-text-tertiary": e.openMenuItem && e.openMenuItem !== e.menuComponent }
45
- ]),
56
+ computedClass: r,
46
57
  handleMouseOver: () => {
47
- if (!navigator.maxTouchPoints) {
48
- let s = null;
49
- if (e.sendLinkPosition) {
50
- const a = n.$refs[e.refName];
51
- if (a) {
52
- const t = a.getBoundingClientRect();
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
- }, M = ["href"];
66
- function y(e, o, n, r, i, s) {
67
- const a = m("KvMaterialIcon");
68
- return u(), f("a", {
69
- ref: n.refName,
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: n.href,
72
- onMouseover: o[0] || (o[0] = (...t) => r.handleMouseOver && r.handleMouseOver(...t))
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
- w("div", {
75
- class: l(["tw-flex tw-items-center", r.computedClass])
77
+ h("div", {
78
+ class: i(["tw-flex tw-items-center", r.computedClass])
76
79
  }, [
77
80
  p(e.$slots, "default"),
78
- v(a, {
79
- class: l(["tw-inline tw-w-3 tw-ml-0.5 tw-transition-transform tw-duration-300", { "tw-rotate-180": n.openMenuItem === n.menuComponent }]),
80
- icon: n.dropdownIcon
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, M);
86
+ ], 40, y);
84
87
  }
85
- const O = /* @__PURE__ */ x(C, [["render", y]]);
88
+ const _ = /* @__PURE__ */ x(M, [["render", k]]);
86
89
  export {
87
- O as default
90
+ _ as default
88
91
  };
@@ -1 +1 @@
1
- .header-link[data-v-290d8315]{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-290d8315]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-290d8315] .avatar div:first-child{display:flex}
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 k, ref as a, computed as C, onMounted as G, onUnmounted as J, resolveComponent as h, resolveDirective as Q, openBlock as r, createElementBlock as c, withDirectives as s, normalizeClass as p, createVNode as E, createBlock as f, withCtx as H, createTextVNode as M, createElementVNode as L, createCommentVNode as B, vShow as X, toDisplayString as Y } from "vue";
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 le from "../KvIconBag.js";
6
- import ae from "./KvHeaderDropdownLink.js";
7
- import re from "../KvUserAvatar.js";
8
- import { throttle as ie } from "../../utils/throttle.js";
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 = k(() => import("./KvHeaderMobileMenu.js")), S = k(() => import("./KvHeaderMyKivaMenu.js")), se = k(() => import("./LendMenu/KvLendMenu.js")), ve = k(() => import("./KvHeaderTakeActionMenu.js")), ce = k(() => import("./KvHeaderAboutMenu.js")), P = 146, y = "avatar-menu", K = "menuButton", V = { top: "-3.75rem", width: "100%" }, we = {
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: le,
16
- KvHeaderDropdownLink: ae,
17
- KvUserAvatar: re
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(d, { emit: e }) {
61
- const t = a(null), n = a(null), O = a(null), U = a(null), g = a(null), w = a(null), A = a(null), T = a(null), i = a(null), o = a(null), I = a(!1), b = a(), u = (l, m, v = null) => {
62
- e("item-hover", l, m, v);
63
- }, R = (l, m, v = null) => {
64
- navigator.maxTouchPoints || (o.value = l, u(
65
- l,
66
- m,
67
- l === K && d.isMobile ? V : v
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 = (l) => {
70
- !I.value && o.value === l && (o.value = null, u());
69
+ }, F = (a) => {
70
+ !navigator.maxTouchPoints && t.value === a && (t.value = null, s());
71
71
  }, z = () => {
72
- var D, _;
73
- const l = (_ = (D = t.value) == null ? void 0 : D.userAvatar) == null ? void 0 : _.getBoundingClientRect();
74
- if (!l) return null;
75
- const v = l.left + l.width / 2 - P / 2;
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
- ...v + P > window.innerWidth ? { right: 0 } : { left: d.isMobile ? 0 : `${v}px` },
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: d.isMobile ? "auto" : "0px 0px 8px 8px"
80
+ borderRadius: r.isMobile ? "auto" : "0px 0px 8px 8px",
81
+ width: r.isMobile ? "100%" : `${L}px`
81
82
  };
82
- }, x = () => {
83
- o.value = y, u(t.value, S, z());
84
- }, W = (l, m) => {
85
- b.value = null, I.value = !0, b.value && clearTimeout(b.value), o.value === K && (o.value = null), !o.value || o.value !== l ? (o.value = l, l === y ? x() : l === K && d.isMobile ? u(l, m, V) : u(l, m)) : (o.value = null, u()), b.value = setTimeout(() => {
86
- I.value = !1;
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 = ie(() => {
89
- o.value === y && x();
90
- }, 100), j = C(() => d.isMobile ? void 0 : "/lend-by-category"), q = C(() => {
91
- var l;
92
- return ((l = d.lenderImageUrl) == null ? void 0 : l.split("/").pop()) ?? "";
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
- }), J(() => {
102
+ }), Q(() => {
97
103
  window.removeEventListener("resize", N);
98
104
  }), {
99
- AVATAR_MENU_ID: y,
100
- openMenuId: o,
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: u,
107
- avatar: t,
108
- lendButton: n,
109
- aboutUsLink: O,
110
- partnerWithUsLink: U,
111
- borrowLink: g,
112
- supportKivaLink: w,
113
- basketLink: A,
114
- signInLink: T,
115
- menuButton: i,
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: x,
127
+ handleAvatarMenuPosition: p,
122
128
  KvHeaderMobileMenu: me,
123
- KvHeaderMyKivaMenu: S,
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(d, e, t, n, O, U) {
132
- const g = h("kv-material-icon"), w = h("KvHeaderDropdownLink"), A = h("kv-icon-bag"), T = h("KvUserAvatar"), i = Q("kv-track-event");
133
- return r(), c("div", fe, [
134
- s((r(), c("button", {
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: p(["header-link tw-inline-flex md:tw-hidden", {
137
- "tw-text-tertiary": t.openMenuItem && t.openMenuItem !== n.KvHeaderMobileMenu
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: e[0] || (e[0] = (o) => n.handleOnHover("menuButton", n.KvHeaderMobileMenu)),
140
- onMouseout: e[1] || (e[1] = (o) => n.handleMouseOut("menuButton")),
141
- onTouchstart: e[2] || (e[2] = (o) => n.handleTouchStart("menuButton", n.KvHeaderMobileMenu))
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
- E(g, { icon: n.mdiMenu }, null, 8, ["icon"])
149
+ _(b, { icon: e.mdiMenu }, null, 8, ["icon"])
144
150
  ], 34)), [
145
- [i, t.openMenuItem === n.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
151
+ [d, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
146
152
  ]),
147
- s((r(), f(w, {
153
+ m((i(), f(c, {
148
154
  class: "tw-py-1",
149
155
  "ref-name": "lendButton",
150
- href: n.lendUrl,
151
- "menu-component": n.KvLendMenu,
152
- "open-menu-item": t.openMenuItem,
153
- "dropdown-icon": n.mdiChevronDown,
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: n.handleOnHover,
156
- onMouseout: e[3] || (e[3] = (o) => n.handleMouseOut("lendButton")),
157
- onTouchstart: e[4] || (e[4] = (o) => n.handleTouchStart("lendButton", n.KvLendMenu))
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(() => e[10] || (e[10] = [
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
- [i, ["TopNav", "click-Lend"]]
170
+ [d, ["TopNav", "click-Lend"]]
165
171
  ]),
166
- s((r(), f(w, {
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": n.KvHeaderTakeActionMenu,
170
- "open-menu-item": t.openMenuItem,
171
- "dropdown-icon": n.mdiChevronDown,
175
+ "menu-component": e.KvHeaderTakeActionMenu,
176
+ "open-menu-item": o.openMenuItem,
177
+ "dropdown-icon": e.mdiChevronDown,
172
178
  "send-link-position": "",
173
- onOnHover: n.handleOnHover,
174
- onMouseout: e[5] || (e[5] = (o) => n.handleMouseOut("takeActionButton"))
179
+ onOnHover: e.handleOnHover,
180
+ onMouseout: n[5] || (n[5] = (t) => e.handleMouseOut("takeActionButton")),
181
+ onUserTap: e.handleTouchStart
175
182
  }, {
176
- default: H(() => e[11] || (e[11] = [
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
- [i, ["TopNav", "click-TakeAction"]]
187
+ }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
188
+ [d, ["TopNav", "click-TakeAction"]]
182
189
  ]),
183
- s((r(), f(w, {
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": n.KvHeaderAboutMenu,
188
- "open-menu-item": t.openMenuItem,
189
- "dropdown-icon": n.mdiChevronDown,
194
+ "menu-component": e.KvHeaderAboutMenu,
195
+ "open-menu-item": o.openMenuItem,
196
+ "dropdown-icon": e.mdiChevronDown,
190
197
  "send-link-position": "",
191
- onOnHover: n.handleOnHover,
192
- onMouseout: e[6] || (e[6] = (o) => n.handleMouseOut("aboutUsLink"))
198
+ onOnHover: e.handleOnHover,
199
+ onMouseout: n[6] || (n[6] = (t) => e.handleMouseOut("aboutUsLink")),
200
+ onUserTap: e.handleTouchStart
193
201
  }, {
194
- default: H(() => e[12] || (e[12] = [
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
- [i, ["TopNav", "click-About"]]
206
+ }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
207
+ [d, ["TopNav", "click-About"]]
200
208
  ]),
201
- e[16] || (e[16] = L("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
202
- t.loggedIn ? s((r(), c("a", {
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: t.myDashboardUrl,
206
- class: p(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!t.openMenuItem }])
207
- }, e[13] || (e[13] = [
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
- [i, ["TopNav", "click-Dashboard"]]
211
- ]) : B("", !0),
212
- s((r(), c("a", {
218
+ [d, ["TopNav", "click-Dashboard"]]
219
+ ]) : C("", !0),
220
+ m((i(), w("a", {
213
221
  ref: "basketLink",
214
222
  href: "/basket",
215
- class: p(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!t.openMenuItem }]),
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
- E(A, {
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: t.basketCount
229
+ count: o.basketCount
222
230
  }, null, 8, ["count"]),
223
- e[14] || (e[14] = L("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
231
+ n[14] || (n[14] = A("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
224
232
  ], 2)), [
225
- [X, t.basketCount > 0],
226
- [i, ["TopNav", "click-Basket"]]
233
+ [E, o.basketCount > 0],
234
+ [d, ["TopNav", "click-Basket"]]
227
235
  ]),
228
- t.loggedIn ? (r(), c("div", {
229
- key: 1,
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: e[7] || (e[7] = (...o) => n.handleAvatarMenuPosition && n.handleAvatarMenuPosition(...o)),
232
- onMouseout: e[8] || (e[8] = (o) => n.handleMouseOut(n.AVATAR_MENU_ID)),
233
- onTouchstart: e[9] || (e[9] = (o) => n.handleTouchStart(n.AVATAR_MENU_ID))
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
- n.isLegacyPlaceholderAvatar(n.avatarFilename) || !n.avatarFilename ? (r(), f(g, {
243
+ e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(b, {
236
244
  key: 0,
237
- icon: n.mdiAccountCircle,
245
+ icon: e.mdiAccountCircle,
238
246
  class: "tw-w-3"
239
- }, null, 8, ["icon"])) : (r(), f(T, {
247
+ }, null, 8, ["icon"])) : (i(), f(I, {
240
248
  key: 1,
241
- ref: "avatar",
242
249
  class: "avatar",
243
- "lender-name": t.lenderName,
244
- "lender-image-url": t.lenderImageUrl,
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
- L("span", ke, Y(n.numeral(t.balance).format("$0")), 1)
248
- ], 32)) : B("", !0),
249
- t.loggedIn ? B("", !0) : s((r(), c("a", {
250
- key: 2,
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: t.loginUrl,
253
- class: p(["header-link", { "tw-text-tertiary": !!t.openMenuItem }])
254
- }, e[15] || (e[15] = [
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
- [i, ["TopNav", "click-Sign-in"]]
266
+ [d, ["TopNav", "click-Sign-in"]]
258
267
  ])
259
268
  ]);
260
269
  }
261
- const Ue = /* @__PURE__ */ ue(we, [["render", be], ["__scopeId", "data-v-290d8315"]]);
270
+ const Oe = /* @__PURE__ */ ue(we, [["render", be], ["__scopeId", "data-v-7bbc2157"]]);
262
271
  export {
263
- Ue as default
272
+ Oe as default
264
273
  };
@@ -1 +1 @@
1
- .header-fade-enter-active[data-v-c1223ffa]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-c1223ffa]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-c1223ffa],.header-fade-leave-to[data-v-c1223ffa]{opacity:0}.header-fade-leave[data-v-c1223ffa],.header-fade-enter-to[data-v-c1223ffa]{opacity:1}.bg-opacity-50[data-v-c1223ffa]{background-color:rgba(var(--bg-action-highlight),.5)}
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,17 +1,17 @@
1
- import { ref as l, shallowRef as D, computed as U, onMounted as B, onBeforeUnmount as N, resolveComponent as f, resolveDirective as x, openBlock as w, createBlock as M, withCtx as g, createElementVNode as k, normalizeStyle as _, createVNode as d, Transition as I, withDirectives as h, vShow as E, createElementBlock as A, normalizeClass as S, resolveDynamicComponent as G } from "vue";
2
- import K from "@kiva/kv-tokens";
3
- import z from "./KvWwwHeader/KvHeaderLinkBar.js";
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 P from "./KvThemeProvider.js";
5
+ import O from "./KvThemeProvider.js";
6
6
  import V from "./KvPageContainer.js";
7
- import { throttle as O } from "../utils/throttle.js";
7
+ import { throttle as W } from "../utils/throttle.js";
8
8
  import "./KvWwwHeader.css";
9
- import W from "../_virtual/_plugin-vue_export-helper.js";
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: z,
12
+ KvHeaderLinkBar: P,
13
13
  KvHeaderLogo: R,
14
- KvThemeProvider: P,
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 o = l(!0), e = l(null), r = l(!1), a = D(null), i = l(null), s = l({ left: 0, position: "relative" }), u = l(!1);
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 b = U(() => {
74
- var m, n;
75
- return ((n = (m = i.value) == null ? void 0 : m.$options) == null ? void 0 : n.name) === "KvHeaderMobileMenu";
76
- }), v = (m, n, p) => {
77
- n ? (clearTimeout(c), a.value !== n && (s.value = { left: 0, position: "relative" }), a.value = n, r.value = !0, p && (s.value = {
78
- ...p,
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
- })) : r.value && (c = setTimeout(() => {
81
- r.value = !1, a.value = null;
80
+ })) : a.value && (c = setTimeout(() => {
81
+ a.value = !1, i.value = null;
82
82
  }, 100));
83
- }, T = (m) => {
84
- var n;
85
- (n = i.value) == null || n.onLoad(m);
86
- }, C = () => {
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
- u.value = (window == null ? void 0 : window.innerWidth) < K.breakpoints.md;
90
- }, H = O(y, 100);
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
- }), N(() => {
93
+ }), S(() => {
94
94
  window.removeEventListener("resize", H);
95
95
  }), {
96
96
  HEADER_HEIGHT: j,
97
- emitLendMenuEvent: C,
98
- isMobile: u,
99
- linksVisible: o,
100
- menuOpen: r,
101
- isMobileMenuActive: b,
102
- onHover: v,
103
- loadMenuData: T,
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: a,
106
- menuComponentInstance: i,
107
- menuPosition: s
105
+ menuComponent: i,
106
+ menuComponentInstance: s,
107
+ menuPosition: u
108
108
  };
109
109
  }
110
- }, F = {
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 J(L, t, o, e, r, a) {
115
- const i = f("kv-header-link-bar"), s = f("kv-header-logo"), u = f("kv-page-container"), c = f("kv-theme-provider"), b = x("kv-track-event");
116
- return w(), M(c, {
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
- k("nav", {
121
+ _("nav", {
122
122
  class: "tw-font-medium tw-relative",
123
- style: _({ height: e.HEADER_HEIGHT })
123
+ style: k({ height: e.HEADER_HEIGHT })
124
124
  }, [
125
- d(u, null, {
125
+ m(d, null, {
126
126
  default: g(() => [
127
- d(I, { name: "header-fade" }, {
127
+ m(E, { name: "header-fade" }, {
128
128
  default: g(() => [
129
- h(d(i, {
130
- "logged-in": o.loggedIn,
131
- "basket-count": o.basketCount,
132
- "login-url": o.loginUrl,
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": o.myDashboardUrl,
135
- "lender-name": o.lenderName,
136
- "lender-image-url": o.lenderImageUrl,
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: o.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
- [E, e.linksVisible]
141
+ [I, e.linksVisible]
142
142
  ])
143
143
  ]),
144
144
  _: 1
145
145
  }),
146
- h((w(), A("a", F, [
147
- d(s)
146
+ h((w(), A("a", J, [
147
+ m(u)
148
148
  ])), [
149
- [b, ["TopNav", "click-Logo"]]
149
+ [c, ["TopNav", "click-Logo"]]
150
150
  ])
151
151
  ]),
152
152
  _: 1
153
153
  })
154
154
  ], 4),
155
- d(I, { name: "header-fade" }, {
155
+ m(E, { name: "header-fade" }, {
156
156
  default: g(() => [
157
- h(k("div", {
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: _({ top: e.HEADER_HEIGHT })
159
+ style: k({ top: e.HEADER_HEIGHT })
160
160
  }, [
161
- k("div", {
162
- class: S(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
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] = (v) => e.onHover(e.activeHeaderItem, e.menuComponent)),
168
- onMouseout: t[2] || (t[2] = (v) => e.onHover())
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(), M(G(e.menuComponent), {
170
+ (w(), p(G(e.menuComponent), {
171
171
  ref: "menuComponentInstance",
172
- "logged-in": o.loggedIn,
173
- "login-url": o.loginUrl,
174
- "user-id": o.userId,
175
- "is-borrower": o.isBorrower,
176
- "is-trustee": o.isTrustee,
177
- "my-dashboard-url": o.myDashboardUrl,
178
- "show-m-g-upsell-link": o.showMGUpsellLink,
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": o.countriesNotLentToUrl,
180
+ "countries-not-lent-to-url": n.countriesNotLentToUrl,
181
181
  onLoadLendMenuData: e.emitLendMenuEvent,
182
- onClosingMenu: t[0] || (t[0] = (v) => e.onHover())
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
- [E, e.menuOpen]
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 le = /* @__PURE__ */ W(q, [["render", J], ["__scopeId", "data-v-c1223ffa"]]);
195
+ const ie = /* @__PURE__ */ Y(F, [["render", Q], ["__scopeId", "data-v-bbcd9055"]]);
196
196
  export {
197
- le as default
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.1",
3
+ "version": "6.56.2",
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": "2f61b45ca5c74f7ce4ce26ee2db566ad70a7fe3e"
117
+ "gitHead": "580254ec8b85927b0f438c36ab69df3603c206e4"
118
118
  }