@kiva/kv-components 6.69.2 → 7.0.0

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,21 +1,23 @@
1
- import { defineAsyncComponent as h, ref as l, inject as Z, computed as L, watch as P, onMounted as $, onUnmounted as ee, resolveComponent as p, resolveDirective as ne, openBlock as i, createElementBlock as M, withDirectives as c, normalizeClass as A, withModifiers as B, createVNode as E, createBlock as y, withCtx as N, createTextVNode as k, createElementVNode as b, createCommentVNode as V, vShow as R, 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";
1
+ import { defineAsyncComponent as h, ref as i, inject as ne, computed as T, watch as V, onMounted as te, onUnmounted as oe, resolveComponent as g, resolveDirective as ae, openBlock as d, createElementBlock as v, withDirectives as f, normalizeClass as A, withModifiers as K, createVNode as w, createBlock as R, withCtx as E, createTextVNode as b, createElementVNode as L, createCommentVNode as z, normalizeStyle as N, vShow as W, toDisplayString as le } from "vue";
2
+ import { mdiAccountCircle as ie, mdiChevronDown as re, mdiMagnify as de, mdiMenu as se } from "@mdi/js";
3
+ import ue from "numeral";
4
+ import me from "@kiva/kv-tokens";
5
+ import ce from "../KvMaterialIcon.js";
6
+ import ve from "../KvIconBag.js";
7
+ import fe from "./KvHeaderDropdownLink.js";
8
+ import we from "../KvUserAvatar.js";
9
+ import ke from "../KvLoadingPlaceholder.js";
10
+ import { throttle as Me } from "../../utils/throttle.js";
11
+ import { isLegacyPlaceholderAvatar as j } from "../../utils/imageUtils.js";
11
12
  import "./KvHeaderLinkBar.css";
12
- import fe from "../../_virtual/_plugin-vue_export-helper.js";
13
- const Me = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvHeaderMyKivaMenu.js")), ke = h(() => import("./LendMenu/KvLendMenu.js")), be = h(() => import("./KvHeaderTakeActionMenu.js")), he = h(() => import("./KvHeaderAboutMenu.js")), W = 150, w = "avatar-menu", I = "menuButton", z = { top: "-3.75rem", width: "100%" }, ge = "lendButton", Te = "takeActionButton", pe = "aboutUsLink", Ae = {
13
+ import ge from "../../_virtual/_plugin-vue_export-helper.js";
14
+ const be = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvHeaderMyKivaMenu.js")), he = h(() => import("./LendMenu/KvLendMenu.js")), ye = h(() => import("./KvHeaderTakeActionMenu.js")), pe = h(() => import("./KvHeaderAboutMenu.js")), q = 150, k = "avatar-menu", U = "menuButton", G = { top: "-3.75rem", width: "100%" }, Te = "lendButton", Ae = "takeActionButton", Le = "aboutUsLink", Ue = {
14
15
  components: {
15
- KvMaterialIcon: ue,
16
- KvIconBag: me,
17
- KvHeaderDropdownLink: se,
18
- KvUserAvatar: ve
16
+ KvMaterialIcon: ce,
17
+ KvIconBag: ve,
18
+ KvHeaderDropdownLink: fe,
19
+ KvUserAvatar: we,
20
+ KvLoadingPlaceholder: ke
19
21
  },
20
22
  props: {
21
23
  loggedIn: {
@@ -53,255 +55,287 @@ const Me = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvH
53
55
  balance: {
54
56
  type: Number,
55
57
  default: 0
58
+ },
59
+ isBasketDataLoading: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ isUserDataLoading: {
64
+ type: Boolean,
65
+ default: !1
56
66
  }
57
67
  },
58
68
  emits: [
59
69
  "item-hover"
60
70
  ],
61
- setup(d, { emit: n }) {
62
- const a = l(null), e = l(null), K = l(null), x = l(null), g = l(null), f = l(null), U = l(null), H = l(null), u = l(null), o = l(null), O = Z("$kvTrackEvent"), _ = {
63
- [ge]: { action: "hover-Lend-menu", label: "Lend" },
64
- [Te]: { action: "hover-Take-action-menu", label: "Take action" },
65
- [pe]: { action: "hover-About-menu", label: "About" },
66
- [I]: { action: "hover-Hamburger-menu", label: "Hamburger" },
67
- [w]: { action: "hover-Avatar-menu", label: "Avatar" }
68
- }, m = (t, s, v = null) => {
69
- n("item-hover", t, s, v);
70
- }, j = (t, s, v = null) => {
71
+ setup(s, { emit: n }) {
72
+ const o = i(null), e = i(null), x = i(null), _ = i(null), y = i(null), M = i(null), B = i(null), I = i(null), H = i(null), a = i(null), l = ne("$kvTrackEvent"), O = {
73
+ [Te]: { action: "hover-Lend-menu", label: "Lend" },
74
+ [Ae]: { action: "hover-Take-action-menu", label: "Take action" },
75
+ [Le]: { action: "hover-About-menu", label: "About" },
76
+ [U]: { action: "hover-Hamburger-menu", label: "Hamburger" },
77
+ [k]: { action: "hover-Avatar-menu", label: "Avatar" }
78
+ }, u = (t, m, c = null) => {
79
+ n("item-hover", t, m, c);
80
+ }, J = (t, m, c = null) => {
71
81
  if (!navigator.maxTouchPoints) {
72
- if (t && o.value !== t) {
73
- const r = _[t];
74
- r && O(
82
+ if (t && a.value !== t) {
83
+ const r = O[t];
84
+ r && l(
75
85
  "TopNav",
76
86
  r.action,
77
87
  r.label
78
88
  );
79
89
  }
80
- o.value = t, m(
90
+ a.value = t, u(
81
91
  t,
82
- s,
83
- t === I && d.isMobile ? z : v
92
+ m,
93
+ t === U && s.isMobile ? G : c
84
94
  );
85
95
  }
86
- }, q = (t) => {
87
- !navigator.maxTouchPoints && o.value === t && (o.value = null, m());
88
- }, C = () => {
89
- var S;
90
- const t = (S = a.value) == null ? void 0 : S.getBoundingClientRect();
96
+ }, Q = (t) => {
97
+ !navigator.maxTouchPoints && a.value === t && (a.value = null, u());
98
+ }, S = () => {
99
+ var P;
100
+ const t = (P = o.value) == null ? void 0 : P.getBoundingClientRect();
91
101
  if (!t) return null;
92
- const v = t.left + t.width / 2 - W / 2, r = `${window.innerWidth - v - W}px`;
102
+ const c = t.left + t.width / 2 - q / 2, r = `${window.innerWidth - c - q}px`;
93
103
  return {
94
- right: (window == null ? void 0 : window.innerWidth) < de.breakpoints.md ? 0 : r
104
+ right: (window == null ? void 0 : window.innerWidth) < me.breakpoints.md ? 0 : r
95
105
  };
96
- }, T = () => {
97
- o.value = w, m(a.value, F, C());
98
- }, G = (t, s, v) => {
99
- if (t && o.value !== t) {
100
- const r = _[t];
101
- r && O(
106
+ }, p = () => {
107
+ a.value = k, u(o.value, F, S());
108
+ }, X = (t, m, c) => {
109
+ if (t && a.value !== t) {
110
+ const r = O[t];
111
+ r && l(
102
112
  "TopNav",
103
113
  r.action,
104
114
  r.label
105
115
  );
106
116
  }
107
- o.value === I && (o.value = null), !o.value || o.value !== t ? (o.value = t, t === w ? T() : t === I && d.isMobile ? m(t, s, z) : m(t, s, v)) : (o.value = null, m());
108
- }, D = ce(() => {
109
- o.value === w && T();
110
- }, 100), J = L(() => d.isMobile ? void 0 : "/lend-by-category"), Q = L(() => {
117
+ a.value === U && (a.value = null), !a.value || a.value !== t ? (a.value = t, t === k ? p() : t === U && s.isMobile ? u(t, m, G) : u(t, m, c)) : (a.value = null, u());
118
+ }, C = Me(() => {
119
+ a.value === k && p();
120
+ }, 100), Y = T(() => s.isMobile ? void 0 : "/lend-by-category"), D = T(() => {
111
121
  var t;
112
- return ((t = d.lenderImageUrl) == null ? void 0 : t.split("/").pop()) ?? "";
113
- }), X = L(() => Math.floor(d.balance)), Y = (t) => {
114
- t.target === t.currentTarget && m();
122
+ return ((t = s.lenderImageUrl) == null ? void 0 : t.split("/").pop()) ?? "";
123
+ }), Z = T(() => Math.floor(s.balance)), $ = T(() => j(D.value) || !D.value), ee = (t) => {
124
+ t.target === t.currentTarget && u();
115
125
  };
116
- return P(
117
- () => d.isMobile,
126
+ return V(
127
+ () => s.isMobile,
118
128
  () => {
119
- o.value === w && T();
129
+ a.value === k && p();
120
130
  }
121
- ), P(
122
- () => d.openMenuItem,
131
+ ), V(
132
+ () => s.openMenuItem,
123
133
  (t) => {
124
- t || (o.value = null);
134
+ t || (a.value = null);
125
135
  }
126
- ), $(() => {
127
- import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", D);
128
- }), ee(() => {
129
- window.removeEventListener("resize", D);
136
+ ), te(() => {
137
+ import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", C);
138
+ }), oe(() => {
139
+ window.removeEventListener("resize", C);
130
140
  }), {
131
- AVATAR_MENU_ID: w,
132
- openMenuId: o,
133
- numeral: ie,
134
- mdiAccountCircle: oe,
135
- mdiChevronDown: ae,
136
- mdiMagnify: le,
137
- mdiMenu: re,
138
- onHover: m,
139
- avatar: a,
141
+ AVATAR_MENU_ID: k,
142
+ openMenuId: a,
143
+ numeral: ue,
144
+ mdiAccountCircle: ie,
145
+ mdiChevronDown: re,
146
+ mdiMagnify: de,
147
+ mdiMenu: se,
148
+ onHover: u,
149
+ avatar: o,
140
150
  lendButton: e,
141
- aboutUsLink: K,
142
- partnerWithUsLink: x,
143
- borrowLink: g,
144
- supportKivaLink: f,
145
- basketLink: U,
146
- signInLink: H,
147
- menuButton: u,
148
- lendUrl: J,
149
- avatarFilename: Q,
150
- handleOnHover: j,
151
- handleTouchStart: G,
152
- handleMouseOut: q,
153
- handleAvatarMenuPosition: T,
154
- KvHeaderMobileMenu: Me,
151
+ aboutUsLink: x,
152
+ partnerWithUsLink: _,
153
+ borrowLink: y,
154
+ supportKivaLink: M,
155
+ basketLink: B,
156
+ signInLink: I,
157
+ menuButton: H,
158
+ lendUrl: Y,
159
+ avatarFilename: D,
160
+ handleOnHover: J,
161
+ handleTouchStart: X,
162
+ handleMouseOut: Q,
163
+ handleAvatarMenuPosition: p,
164
+ KvHeaderMobileMenu: be,
155
165
  KvHeaderMyKivaMenu: F,
156
- KvLendMenu: ke,
157
- KvHeaderTakeActionMenu: be,
158
- KvHeaderAboutMenu: he,
159
- isLegacyPlaceholderAvatar: we,
160
- getAvatarMenuPosition: C,
161
- handleEmptySpaceClick: Y,
162
- roundedBalance: X
166
+ KvLendMenu: he,
167
+ KvHeaderTakeActionMenu: ye,
168
+ KvHeaderAboutMenu: pe,
169
+ isLegacyPlaceholderAvatar: j,
170
+ getAvatarMenuPosition: S,
171
+ handleEmptySpaceClick: ee,
172
+ roundedBalance: Z,
173
+ isDefaultProfilePic: $
163
174
  };
164
175
  }
165
- }, ye = ["href"], Ie = {
176
+ }, Be = ["href"], Ie = {
166
177
  ref: "avatar",
167
178
  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"
168
- }, Ue = { class: "tw-text-eco-green-4" }, He = ["href"];
169
- function Le(d, n, a, e, K, x) {
170
- const g = p("kv-material-icon"), f = p("KvHeaderDropdownLink"), U = p("kv-icon-bag"), H = p("KvUserAvatar"), u = ne("kv-track-event");
171
- return i(), M("div", {
179
+ }, He = {
180
+ key: 0,
181
+ class: "tw-w-4 tw-h-3",
182
+ style: {
183
+ display: "var(--user-balance-loading-display, inline-block)"
184
+ }
185
+ }, De = {
186
+ key: 1,
187
+ class: "tw-text-eco-green-4"
188
+ }, Ke = ["href"];
189
+ function Ee(s, n, o, e, x, _) {
190
+ const y = g("kv-material-icon"), M = g("KvHeaderDropdownLink"), B = g("kv-icon-bag"), I = g("KvUserAvatar"), H = g("KvLoadingPlaceholder"), a = ae("kv-track-event");
191
+ return d(), v("div", {
172
192
  class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5",
173
- onTouchstart: n[10] || (n[10] = (...o) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...o))
193
+ onTouchstart: n[10] || (n[10] = (...l) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...l))
174
194
  }, [
175
- c((i(), M("button", {
195
+ f((d(), v("button", {
176
196
  ref: "menuButton",
177
197
  class: A(["header-link tw-inline-flex md:tw-hidden", {
178
- "tw-text-tertiary": a.openMenuItem && a.openMenuItem !== e.KvHeaderMobileMenu
198
+ "tw-text-tertiary": o.openMenuItem && o.openMenuItem !== e.KvHeaderMobileMenu
179
199
  }]),
180
- onMouseover: n[0] || (n[0] = (o) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
181
- onMouseout: n[1] || (n[1] = (o) => e.handleMouseOut("menuButton")),
182
- onTouchstart: n[2] || (n[2] = B((o) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
200
+ onMouseover: n[0] || (n[0] = (l) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
201
+ onMouseout: n[1] || (n[1] = (l) => e.handleMouseOut("menuButton")),
202
+ onTouchstart: n[2] || (n[2] = K((l) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
183
203
  }, [
184
- E(g, { icon: e.mdiMenu }, null, 8, ["icon"])
204
+ w(y, { icon: e.mdiMenu }, null, 8, ["icon"])
185
205
  ], 34)), [
186
- [u, a.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
206
+ [a, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
187
207
  ]),
188
- c((i(), y(f, {
208
+ f((d(), R(M, {
189
209
  class: "tw-py-1",
190
210
  "ref-name": "lendButton",
191
211
  href: e.lendUrl,
192
212
  "menu-component": e.KvLendMenu,
193
- "open-menu-item": a.openMenuItem,
213
+ "open-menu-item": o.openMenuItem,
194
214
  "dropdown-icon": e.mdiChevronDown,
195
215
  "base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-0.5",
196
216
  onOnHover: e.handleOnHover,
197
- onMouseleave: n[3] || (n[3] = (o) => e.handleMouseOut("lendButton")),
198
- onTouchstart: n[4] || (n[4] = B((o) => e.handleTouchStart("lendButton", e.KvLendMenu), ["stop"]))
217
+ onMouseleave: n[3] || (n[3] = (l) => e.handleMouseOut("lendButton")),
218
+ onTouchstart: n[4] || (n[4] = K((l) => e.handleTouchStart("lendButton", e.KvLendMenu), ["stop"]))
199
219
  }, {
200
- default: N(() => n[11] || (n[11] = [
201
- k(" Lend ")
220
+ default: E(() => n[11] || (n[11] = [
221
+ b(" Lend ")
202
222
  ])),
203
223
  _: 1
204
224
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
205
- [u, ["TopNav", "click-Lend"]]
225
+ [a, ["TopNav", "click-Lend"]]
206
226
  ]),
207
- c((i(), y(f, {
227
+ f((d(), R(M, {
208
228
  "ref-name": "takeActionButton",
209
229
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
210
230
  "menu-component": e.KvHeaderTakeActionMenu,
211
- "open-menu-item": a.openMenuItem,
231
+ "open-menu-item": o.openMenuItem,
212
232
  "dropdown-icon": e.mdiChevronDown,
213
233
  "send-link-position": "",
214
234
  onOnHover: e.handleOnHover,
215
- onMouseleave: n[5] || (n[5] = (o) => e.handleMouseOut("takeActionButton")),
235
+ onMouseleave: n[5] || (n[5] = (l) => e.handleMouseOut("takeActionButton")),
216
236
  onUserTap: e.handleTouchStart
217
237
  }, {
218
- default: N(() => n[12] || (n[12] = [
219
- k(" Take action ")
238
+ default: E(() => n[12] || (n[12] = [
239
+ b(" Take action ")
220
240
  ])),
221
241
  _: 1
222
242
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
223
- [u, ["TopNav", "click-take-action"]]
243
+ [a, ["TopNav", "click-take-action"]]
224
244
  ]),
225
- E(f, {
245
+ w(M, {
226
246
  "ref-name": "aboutUsLink",
227
247
  "data-testid": "header-about",
228
248
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
229
249
  "menu-component": e.KvHeaderAboutMenu,
230
- "open-menu-item": a.openMenuItem,
250
+ "open-menu-item": o.openMenuItem,
231
251
  "dropdown-icon": e.mdiChevronDown,
232
252
  "send-link-position": "",
233
253
  onOnHover: e.handleOnHover,
234
- onMouseleave: n[6] || (n[6] = (o) => e.handleMouseOut("aboutUsLink")),
254
+ onMouseleave: n[6] || (n[6] = (l) => e.handleMouseOut("aboutUsLink")),
235
255
  onUserTap: e.handleTouchStart
236
256
  }, {
237
- default: N(() => n[13] || (n[13] = [
238
- k(" About ")
257
+ default: E(() => n[13] || (n[13] = [
258
+ b(" About ")
239
259
  ])),
240
260
  _: 1
241
261
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
242
- n[17] || (n[17] = b("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
243
- a.loggedIn ? c((i(), M("a", {
262
+ n[17] || (n[17] = L("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
263
+ o.loggedIn ? f((d(), v("a", {
244
264
  key: 0,
245
265
  ref: "dashboardLink",
246
- href: a.myDashboardUrl,
247
- class: A(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!a.openMenuItem }])
266
+ href: o.myDashboardUrl,
267
+ class: A(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
248
268
  }, n[14] || (n[14] = [
249
- k(" My dashboard ")
250
- ]), 10, ye)), [
251
- [u, ["TopNav", "click-Dashboard"]]
252
- ]) : V("", !0),
253
- c((i(), M("a", {
269
+ b(" My dashboard ")
270
+ ]), 10, Be)), [
271
+ [a, ["TopNav", "click-Dashboard"]]
272
+ ]) : z("", !0),
273
+ f((d(), v("a", {
254
274
  ref: "basketLink",
255
275
  href: "/basket",
256
- class: A(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!a.openMenuItem }]),
257
- style: { "margin-right": "2px" },
276
+ class: A(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!o.openMenuItem }]),
277
+ style: N([o.isBasketDataLoading ? {
278
+ display: "var(--basket-display, flex)"
279
+ } : void 0, { "margin-right": "2px" }]),
258
280
  "data-testid": "header-basket"
259
281
  }, [
260
- E(U, {
282
+ w(B, {
261
283
  class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none tw-text-action",
262
- count: a.basketCount
284
+ count: o.isBasketDataLoading ? 0 : o.basketCount
263
285
  }, null, 8, ["count"]),
264
- n[15] || (n[15] = b("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
265
- ], 2)), [
266
- [R, a.basketCount > 0],
267
- [u, ["TopNav", "click-Basket"]]
286
+ n[15] || (n[15] = L("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
287
+ ], 6)), [
288
+ [W, o.isBasketDataLoading ? !0 : o.basketCount > 0],
289
+ [a, ["TopNav", "click-Basket"]]
268
290
  ]),
269
- b("div", {
291
+ L("div", {
270
292
  class: "md:tw-py-1",
271
- onMouseenter: n[7] || (n[7] = (o) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
272
- onMouseleave: n[8] || (n[8] = (o) => e.handleMouseOut(e.AVATAR_MENU_ID)),
273
- onTouchstart: n[9] || (n[9] = B((o) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
293
+ onMouseenter: n[7] || (n[7] = (l) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
294
+ onMouseleave: n[8] || (n[8] = (l) => e.handleMouseOut(e.AVATAR_MENU_ID)),
295
+ onTouchstart: n[9] || (n[9] = K((l) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
274
296
  }, [
275
- c(b("div", Ie, [
276
- e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), y(g, {
277
- key: 0,
297
+ f(L("div", Ie, [
298
+ w(y, {
278
299
  icon: e.mdiAccountCircle,
279
- class: "tw-w-3"
280
- }, null, 8, ["icon"])) : (i(), y(H, {
281
- key: 1,
282
- class: "avatar",
283
- "lender-name": a.lenderName,
284
- "lender-image-url": a.lenderImageUrl,
300
+ class: "tw-w-3",
301
+ style: N(o.isUserDataLoading ? {
302
+ display: "var(--user-avatar-legacy-display, inline-block)"
303
+ } : {
304
+ display: e.isDefaultProfilePic ? "inline-block" : "none"
305
+ })
306
+ }, null, 8, ["icon", "style"]),
307
+ w(I, {
308
+ class: "tw-w-3 tw-h-3",
309
+ "lender-name": o.lenderName,
310
+ "lender-image-url": o.lenderImageUrl,
311
+ style: N(o.isUserDataLoading ? {
312
+ display: "var(--user-avatar-display, inline-block)"
313
+ } : {
314
+ display: e.isDefaultProfilePic ? "none" : "inline-block"
315
+ }),
316
+ "show-css-placeholder": o.isUserDataLoading,
285
317
  "is-small": ""
286
- }, null, 8, ["lender-name", "lender-image-url"])),
287
- b("span", Ue, te(e.numeral(e.roundedBalance).format("$0")), 1)
318
+ }, null, 8, ["lender-name", "lender-image-url", "style", "show-css-placeholder"]),
319
+ o.isUserDataLoading ? (d(), v("div", He, [
320
+ w(H)
321
+ ])) : (d(), v("span", De, le(e.numeral(e.roundedBalance).format("$0")), 1))
288
322
  ], 512), [
289
- [R, a.loggedIn]
323
+ [W, o.loggedIn]
290
324
  ])
291
325
  ], 32),
292
- a.loggedIn ? V("", !0) : c((i(), M("a", {
326
+ o.loggedIn ? z("", !0) : f((d(), v("a", {
293
327
  key: 1,
294
328
  ref: "signInLink",
295
- href: a.loginUrl,
296
- class: A(["header-link", { "tw-text-tertiary": !!a.openMenuItem }])
329
+ href: o.loginUrl,
330
+ class: A(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
297
331
  }, n[16] || (n[16] = [
298
- k(" Sign in ")
299
- ]), 10, He)), [
300
- [u, ["TopNav", "click-Sign-in"]]
332
+ b(" Sign in ")
333
+ ]), 10, Ke)), [
334
+ [a, ["TopNav", "click-Sign-in"]]
301
335
  ])
302
336
  ], 32);
303
337
  }
304
- const Fe = /* @__PURE__ */ fe(Ae, [["render", Le], ["__scopeId", "data-v-d30fd983"]]);
338
+ const Ge = /* @__PURE__ */ ge(Ue, [["render", Ee], ["__scopeId", "data-v-c31f1fca"]]);
305
339
  export {
306
- Fe as default
340
+ Ge as default
307
341
  };
@@ -1 +1 @@
1
- .header-fade-enter-active[data-v-7732c044]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-7732c044]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-7732c044],.header-fade-leave-to[data-v-7732c044]{opacity:0}.header-fade-leave[data-v-7732c044],.header-fade-enter-to[data-v-7732c044]{opacity:1}.bg-opacity-50[data-v-7732c044]{background-color:rgba(var(--bg-action-highlight),.5)}
1
+ .header-fade-enter-active[data-v-137228da]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-137228da]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-137228da],.header-fade-leave-to[data-v-137228da]{opacity:0}.header-fade-leave[data-v-137228da],.header-fade-enter-to[data-v-137228da]{opacity:1}.bg-opacity-50[data-v-137228da]{background-color:rgba(var(--bg-action-highlight),.5)}