@kiva/kv-components 6.57.3 → 6.57.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-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
+ .header-link[data-v-a0bb7bc8]{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-a0bb7bc8]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-a0bb7bc8] .avatar div:first-child{display:flex}
@@ -1,4 +1,4 @@
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";
1
+ import { defineAsyncComponent as b, ref as r, computed as x, watch as _, 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 S, createBlock as f, withCtx as H, createTextVNode as M, createElementVNode as A, createCommentVNode as C, vShow as E, toDisplayString as X } from "vue";
2
2
  import { mdiAccountCircle as Y, mdiChevronDown as Z, mdiMagnify as $, mdiMenu as ee } from "@mdi/js";
3
3
  import ne from "numeral";
4
4
  import te from "../KvMaterialIcon.js";
@@ -9,7 +9,7 @@ import { throttle as re } from "../../utils/throttle.js";
9
9
  import { isLegacyPlaceholderAvatar as ie } from "../../utils/imageUtils.js";
10
10
  import "./KvHeaderLinkBar.css";
11
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 = {
12
+ const ue = b(() => import("./KvHeaderMobileMenu.js")), P = b(() => import("./KvHeaderMyKivaMenu.js")), me = b(() => import("./LendMenu/KvLendMenu.js")), se = b(() => import("./KvHeaderTakeActionMenu.js")), ve = b(() => import("./KvHeaderAboutMenu.js")), U = 120, k = "avatar-menu", B = "menuButton", V = { top: "-3.75rem", width: "100%" }, ce = {
13
13
  components: {
14
14
  KvMaterialIcon: te,
15
15
  KvIconBag: oe,
@@ -58,21 +58,21 @@ const ue = g(() => import("./KvHeaderMobileMenu.js")), E = g(() => import("./KvH
58
58
  "item-hover"
59
59
  ],
60
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
- n("item-hover", a, v, u);
63
- }, V = (a, v, u = null) => {
64
- navigator.maxTouchPoints || (t.value = a, s(
65
- a,
61
+ const a = r(null), e = r(null), L = r(null), K = r(null), g = r(null), c = r(null), T = r(null), I = r(null), d = r(null), t = r(null), s = (o, v, u = null) => {
62
+ n("item-hover", o, v, u);
63
+ }, R = (o, v, u = null) => {
64
+ navigator.maxTouchPoints || (t.value = o, s(
65
+ o,
66
66
  v,
67
- a === B && l.isMobile ? P : u
67
+ o === B && l.isMobile ? V : u
68
68
  ));
69
- }, R = (a) => {
70
- !navigator.maxTouchPoints && t.value === a && (t.value = null, s());
69
+ }, F = (o) => {
70
+ !navigator.maxTouchPoints && t.value === o && (t.value = null, s());
71
71
  }, O = () => {
72
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 - U / 2;
73
+ const o = (D = a.value) == null ? void 0 : D.getBoundingClientRect();
74
+ if (!o) return null;
75
+ const u = o.left + o.width / 2 - U / 2;
76
76
  return {
77
77
  ...u + U > window.innerWidth ? { right: 0 } : { left: l.isMobile ? 0 : `${u}px` },
78
78
  marginTop: "-2px",
@@ -81,20 +81,25 @@ const ue = g(() => import("./KvHeaderMobileMenu.js")), E = g(() => import("./KvH
81
81
  width: l.isMobile ? "100%" : `${U}px`
82
82
  };
83
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());
84
+ t.value = k, s(a.value, P, O());
85
+ }, z = (o, v, u) => {
86
+ t.value === B && (t.value = null), !t.value || t.value !== o ? (t.value = o, o === k ? h() : o === B && l.isMobile ? s(o, v, V) : s(o, v, u)) : (t.value = null, s());
87
87
  }, N = re(() => {
88
88
  t.value === k && h();
89
- }, 100), z = I(() => l.isMobile ? void 0 : "/lend-by-category"), W = I(() => {
90
- var a;
91
- return ((a = l.lenderImageUrl) == null ? void 0 : a.split("/").pop()) ?? "";
92
- }), j = I(() => Math.floor(l.balance));
93
- return q(
89
+ }, 100), W = x(() => l.isMobile ? void 0 : "/lend-by-category"), j = x(() => {
90
+ var o;
91
+ return ((o = l.lenderImageUrl) == null ? void 0 : o.split("/").pop()) ?? "";
92
+ }), q = x(() => Math.floor(l.balance));
93
+ return _(
94
94
  () => l.isMobile,
95
95
  () => {
96
96
  t.value === k && h();
97
97
  }
98
+ ), _(
99
+ () => l.openMenuItem,
100
+ (o) => {
101
+ o || (t.value = null);
102
+ }
98
103
  ), G(() => {
99
104
  import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", N);
100
105
  }), J(() => {
@@ -108,54 +113,54 @@ const ue = g(() => import("./KvHeaderMobileMenu.js")), E = g(() => import("./KvH
108
113
  mdiMagnify: $,
109
114
  mdiMenu: ee,
110
115
  onHover: s,
111
- avatar: o,
116
+ avatar: a,
112
117
  lendButton: e,
113
118
  aboutUsLink: L,
114
119
  partnerWithUsLink: K,
115
- borrowLink: b,
120
+ borrowLink: g,
116
121
  supportKivaLink: c,
117
122
  basketLink: T,
118
- signInLink: x,
123
+ signInLink: I,
119
124
  menuButton: d,
120
- lendUrl: z,
121
- avatarFilename: W,
122
- handleOnHover: V,
123
- handleTouchStart: F,
124
- handleMouseOut: R,
125
+ lendUrl: W,
126
+ avatarFilename: j,
127
+ handleOnHover: R,
128
+ handleTouchStart: z,
129
+ handleMouseOut: F,
125
130
  handleAvatarMenuPosition: h,
126
131
  KvHeaderMobileMenu: ue,
127
- KvHeaderMyKivaMenu: E,
132
+ KvHeaderMyKivaMenu: P,
128
133
  KvLendMenu: me,
129
134
  KvHeaderTakeActionMenu: se,
130
135
  KvHeaderAboutMenu: ve,
131
136
  isLegacyPlaceholderAvatar: ie,
132
137
  getAvatarMenuPosition: O,
133
- roundedBalance: j
138
+ roundedBalance: q
134
139
  };
135
140
  }
136
141
  }, 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");
142
+ function be(l, n, a, e, L, K) {
143
+ const g = p("kv-material-icon"), c = p("KvHeaderDropdownLink"), T = p("kv-icon-bag"), I = p("KvUserAvatar"), d = Q("kv-track-event");
139
144
  return i(), w("div", we, [
140
145
  m((i(), w("button", {
141
146
  ref: "menuButton",
142
147
  class: y(["header-link tw-inline-flex md:tw-hidden", {
143
- "tw-text-tertiary": o.openMenuItem && o.openMenuItem !== e.KvHeaderMobileMenu
148
+ "tw-text-tertiary": a.openMenuItem && a.openMenuItem !== e.KvHeaderMobileMenu
144
149
  }]),
145
150
  onMouseover: n[0] || (n[0] = (t) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
146
151
  onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
147
152
  onTouchstart: n[2] || (n[2] = (t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu))
148
153
  }, [
149
- _(b, { icon: e.mdiMenu }, null, 8, ["icon"])
154
+ S(g, { icon: e.mdiMenu }, null, 8, ["icon"])
150
155
  ], 34)), [
151
- [d, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
156
+ [d, a.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
152
157
  ]),
153
158
  m((i(), f(c, {
154
159
  class: "tw-py-1",
155
160
  "ref-name": "lendButton",
156
161
  href: e.lendUrl,
157
162
  "menu-component": e.KvLendMenu,
158
- "open-menu-item": o.openMenuItem,
163
+ "open-menu-item": a.openMenuItem,
159
164
  "dropdown-icon": e.mdiChevronDown,
160
165
  "base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-1",
161
166
  onOnHover: e.handleOnHover,
@@ -173,7 +178,7 @@ function ge(l, n, o, e, L, K) {
173
178
  "ref-name": "takeActionButton",
174
179
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
175
180
  "menu-component": e.KvHeaderTakeActionMenu,
176
- "open-menu-item": o.openMenuItem,
181
+ "open-menu-item": a.openMenuItem,
177
182
  "dropdown-icon": e.mdiChevronDown,
178
183
  "send-link-position": "",
179
184
  onOnHover: e.handleOnHover,
@@ -192,7 +197,7 @@ function ge(l, n, o, e, L, K) {
192
197
  "data-testid": "header-about",
193
198
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
194
199
  "menu-component": e.KvHeaderAboutMenu,
195
- "open-menu-item": o.openMenuItem,
200
+ "open-menu-item": a.openMenuItem,
196
201
  "dropdown-icon": e.mdiChevronDown,
197
202
  "send-link-position": "",
198
203
  onOnHover: e.handleOnHover,
@@ -207,30 +212,30 @@ function ge(l, n, o, e, L, K) {
207
212
  [d, ["TopNav", "click-About"]]
208
213
  ]),
209
214
  n[16] || (n[16] = A("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
210
- o.loggedIn ? m((i(), w("a", {
215
+ a.loggedIn ? m((i(), w("a", {
211
216
  key: 0,
212
217
  ref: "dashboardLink",
213
- href: o.myDashboardUrl,
214
- class: y(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
218
+ href: a.myDashboardUrl,
219
+ class: y(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!a.openMenuItem }])
215
220
  }, n[13] || (n[13] = [
216
221
  M(" My dashboard ")
217
222
  ]), 10, fe)), [
218
223
  [d, ["TopNav", "click-Dashboard"]]
219
- ]) : S("", !0),
224
+ ]) : C("", !0),
220
225
  m((i(), w("a", {
221
226
  ref: "basketLink",
222
227
  href: "/basket",
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 }]),
228
+ class: y(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!a.openMenuItem }]),
224
229
  style: { "margin-right": "2px" },
225
230
  "data-testid": "header-basket"
226
231
  }, [
227
- _(T, {
232
+ S(T, {
228
233
  class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none",
229
- count: o.basketCount
234
+ count: a.basketCount
230
235
  }, null, 8, ["count"]),
231
236
  n[14] || (n[14] = A("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
232
237
  ], 2)), [
233
- [C, o.basketCount > 0],
238
+ [E, a.basketCount > 0],
234
239
  [d, ["TopNav", "click-Basket"]]
235
240
  ]),
236
241
  m(A("div", {
@@ -240,26 +245,26 @@ function ge(l, n, o, e, L, K) {
240
245
  onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
241
246
  onTouchstart: n[9] || (n[9] = (t) => e.handleTouchStart(e.AVATAR_MENU_ID))
242
247
  }, [
243
- e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(b, {
248
+ e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(g, {
244
249
  key: 0,
245
250
  icon: e.mdiAccountCircle,
246
251
  class: "tw-w-3"
247
- }, null, 8, ["icon"])) : (i(), f(x, {
252
+ }, null, 8, ["icon"])) : (i(), f(I, {
248
253
  key: 1,
249
254
  class: "avatar",
250
- "lender-name": o.lenderName,
251
- "lender-image-url": o.lenderImageUrl,
255
+ "lender-name": a.lenderName,
256
+ "lender-image-url": a.lenderImageUrl,
252
257
  "is-small": ""
253
258
  }, null, 8, ["lender-name", "lender-image-url"])),
254
259
  A("span", Me, X(e.numeral(e.roundedBalance).format("$0")), 1)
255
260
  ], 544), [
256
- [C, o.loggedIn]
261
+ [E, a.loggedIn]
257
262
  ]),
258
- o.loggedIn ? S("", !0) : m((i(), w("a", {
263
+ a.loggedIn ? C("", !0) : m((i(), w("a", {
259
264
  key: 1,
260
265
  ref: "signInLink",
261
- href: o.loginUrl,
262
- class: y(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
266
+ href: a.loginUrl,
267
+ class: y(["header-link", { "tw-text-tertiary": !!a.openMenuItem }])
263
268
  }, n[15] || (n[15] = [
264
269
  M(" Sign in ")
265
270
  ]), 10, ke)), [
@@ -267,7 +272,7 @@ function ge(l, n, o, e, L, K) {
267
272
  ])
268
273
  ]);
269
274
  }
270
- const Ke = /* @__PURE__ */ de(ce, [["render", ge], ["__scopeId", "data-v-b071331e"]]);
275
+ const Ke = /* @__PURE__ */ de(ce, [["render", be], ["__scopeId", "data-v-a0bb7bc8"]]);
271
276
  export {
272
277
  Ke as default
273
278
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.57.3",
3
+ "version": "6.57.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": "773c99e26b05b13cba25a94d5d07639510107c8c"
117
+ "gitHead": "499920c6313443f9e9c885f962bff394457fc4ef"
118
118
  }