@kiva/kv-components 9.0.1 → 9.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -158,15 +158,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
158
158
  type: BooleanConstructor;
159
159
  default: boolean;
160
160
  };
161
+ useIconFallback: {
162
+ type: BooleanConstructor;
163
+ default: boolean;
164
+ };
161
165
  theme: {
162
166
  type: StringConstructor;
163
167
  default: string;
164
168
  validator(value: string): boolean;
165
169
  };
166
170
  }>, {
171
+ mdiAccountCircle: string;
167
172
  isAnonymousUser: import('vue').ComputedRef<boolean>;
168
173
  avatarClass: import('vue').ComputedRef<string>;
169
174
  userHasImage: import('vue').ComputedRef<boolean>;
175
+ showIconFallback: import('vue').ComputedRef<boolean>;
170
176
  lenderNameFirstLetter: import('vue').ComputedRef<string>;
171
177
  letterViewBox: import('vue').ComputedRef<"0 0 27 27" | "0 0 27.5 27.5">;
172
178
  isLegacyPlaceholderAvatar: typeof import('..').isLegacyPlaceholderAvatar;
@@ -191,6 +197,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
191
197
  type: BooleanConstructor;
192
198
  default: boolean;
193
199
  };
200
+ useIconFallback: {
201
+ type: BooleanConstructor;
202
+ default: boolean;
203
+ };
194
204
  theme: {
195
205
  type: StringConstructor;
196
206
  default: string;
@@ -201,9 +211,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
201
211
  lenderImageUrl: string;
202
212
  isSmall: boolean;
203
213
  showCssPlaceholder: boolean;
214
+ useIconFallback: boolean;
204
215
  theme: string;
205
216
  }, {}, {
206
217
  KvLoadingPlaceholder: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
218
+ KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
219
+ icon: {
220
+ type: StringConstructor;
221
+ default: string;
222
+ };
223
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
224
+ icon: {
225
+ type: StringConstructor;
226
+ default: string;
227
+ };
228
+ }>> & Readonly<{}>, {
229
+ icon: string;
230
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
207
231
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
208
232
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
209
233
  KvLightbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -1 +1 @@
1
- .kiva-k__normal[data-v-a36f82cb]{height:60%}.kiva-k__small[data-v-a36f82cb]{height:70%}.kiva-k__white[data-v-a36f82cb]{fill:#fff}.kiva-k__green-light[data-v-a36f82cb]{fill:#78c79f}
1
+ .kiva-k__normal[data-v-ff210636]{height:60%}.kiva-k__small[data-v-ff210636]{height:70%}.kiva-k__white[data-v-ff210636]{fill:#fff}.kiva-k__green-light[data-v-ff210636]{fill:#78c79f}
@@ -1,26 +1,32 @@
1
- import m from "./KvUserAvatar2.js";
2
- import { resolveComponent as c, openBlock as t, createElementBlock as n, normalizeClass as s, createElementVNode as a, createCommentVNode as r, withDirectives as w, createVNode as v, vShow as f, normalizeStyle as i, toDisplayString as g } from "vue";
1
+ import w from "./KvUserAvatar2.js";
2
+ import { resolveComponent as s, openBlock as a, createElementBlock as t, normalizeClass as i, createBlock as h, createCommentVNode as r, createElementVNode as o, withDirectives as v, createVNode as f, vShow as _, normalizeStyle as c, toDisplayString as k } from "vue";
3
3
  import "./KvUserAvatar.css";
4
- import h from "../_virtual/_plugin-vue_export-helper.js";
5
- const _ = ["src"], u = ["viewBox"], y = {
4
+ import g from "../_virtual/_plugin-vue_export-helper.js";
5
+ const u = ["src"], y = ["viewBox"], I = {
6
6
  x: "50%",
7
7
  y: "55%",
8
8
  "dominant-baseline": "middle",
9
9
  "text-anchor": "middle"
10
10
  };
11
- function k(x, o, l, e, C, A) {
12
- const d = c("kv-loading-placeholder");
13
- return t(), n("div", {
11
+ function b(x, n, l, e, C, A) {
12
+ const m = s("kv-material-icon"), d = s("kv-loading-placeholder");
13
+ return a(), t("div", {
14
14
  ref: "userAvatar",
15
- class: s(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
16
- "tw-bg-brand": e.isAnonymousUser && l.theme === "default",
17
- "tw-bg-brand-100": e.isAnonymousUser && l.theme === "ecoGreenLight",
18
- [e.avatarClass]: !e.isAnonymousUser
15
+ class: i(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
16
+ "tw-bg-brand": e.isAnonymousUser && l.theme === "default" && !e.showIconFallback,
17
+ "tw-bg-brand-100": !e.showIconFallback && e.isAnonymousUser && l.theme === "ecoGreenLight",
18
+ [e.avatarClass]: !e.isAnonymousUser && !e.showIconFallback
19
19
  }])
20
20
  }, [
21
- e.isAnonymousUser ? (t(), n("svg", {
21
+ e.showIconFallback ? (a(), h(m, {
22
22
  key: 0,
23
- class: s({
23
+ icon: e.mdiAccountCircle,
24
+ class: "tw-w-full tw-h-full tw-text-primary",
25
+ "data-testid": "user-avatar-icon"
26
+ }, null, 8, ["icon"])) : r("", !0),
27
+ e.isAnonymousUser && !e.showIconFallback ? (a(), t("svg", {
28
+ key: 1,
29
+ class: i({
24
30
  "kiva-k__green-light": l.theme === "ecoGreenLight",
25
31
  "kiva-k__white": l.theme === "default",
26
32
  "kiva-k__small": l.isSmall,
@@ -28,41 +34,41 @@ function k(x, o, l, e, C, A) {
28
34
  }),
29
35
  viewBox: "0 0 25 37",
30
36
  xmlns: "http://www.w3.org/2000/svg"
31
- }, o[1] || (o[1] = [
32
- a("path", { d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z" }, null, -1),
33
- a("path", { d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z" }, null, -1),
34
- a("path", { d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z" }, null, -1)
37
+ }, n[1] || (n[1] = [
38
+ o("path", { d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z" }, null, -1),
39
+ o("path", { d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z" }, null, -1),
40
+ o("path", { d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z" }, null, -1)
35
41
  ]), 2)) : r("", !0),
36
- w(v(d, null, null, 512), [
37
- [f, !e.isAnonymousUser && e.userHasImage && e.isImageLoading]
42
+ v(f(d, null, null, 512), [
43
+ [_, !e.isAnonymousUser && e.userHasImage && e.isImageLoading && !l.showCssPlaceholder]
38
44
  ]),
39
- !e.isAnonymousUser && e.userHasImage ? (t(), n("div", {
40
- key: 1,
45
+ !e.isAnonymousUser && e.userHasImage ? (a(), t("div", {
46
+ key: 2,
41
47
  class: "tw-w-full tw-h-full",
42
- style: i(l.showCssPlaceholder ? { display: "var(--user-avatar-display, block)" } : {
48
+ style: c(l.showCssPlaceholder ? { display: "var(--user-avatar-display, block)" } : {
43
49
  display: e.isImageLoading ? "none" : "block"
44
50
  })
45
51
  }, [
46
- a("img", {
52
+ o("img", {
47
53
  ref: "imageRef",
48
54
  src: l.lenderImageUrl,
49
55
  alt: "Image of lender",
50
56
  class: "tw-w-full",
51
- style: i(l.showCssPlaceholder ? { content: "var(--user-avatar)" } : {}),
52
- onLoad: o[0] || (o[0] = (H) => e.onImgLoad())
53
- }, null, 44, _)
57
+ style: c(l.showCssPlaceholder ? { content: "var(--user-avatar)" } : {}),
58
+ onLoad: n[0] || (n[0] = (H) => e.onImgLoad())
59
+ }, null, 44, u)
54
60
  ], 4)) : r("", !0),
55
- !e.isAnonymousUser && !e.userHasImage ? (t(), n("svg", {
56
- key: 2,
61
+ !e.isAnonymousUser && !e.userHasImage && !e.showIconFallback ? (a(), t("svg", {
62
+ key: 3,
57
63
  class: "tw-w-full tw-h-full",
58
64
  fill: "currentColor",
59
65
  viewBox: e.letterViewBox
60
66
  }, [
61
- a("text", y, g(e.lenderNameFirstLetter), 1)
62
- ], 8, u)) : r("", !0)
67
+ o("text", I, k(e.lenderNameFirstLetter), 1)
68
+ ], 8, y)) : r("", !0)
63
69
  ], 2);
64
70
  }
65
- const B = /* @__PURE__ */ h(m, [["render", k], ["__scopeId", "data-v-a36f82cb"]]);
71
+ const V = /* @__PURE__ */ g(w, [["render", b], ["__scopeId", "data-v-ff210636"]]);
66
72
  export {
67
- B as default
73
+ V as default
68
74
  };
@@ -16,15 +16,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
16
16
  type: BooleanConstructor;
17
17
  default: boolean;
18
18
  };
19
+ useIconFallback: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
19
23
  theme: {
20
24
  type: StringConstructor;
21
25
  default: string;
22
26
  validator(value: string): boolean;
23
27
  };
24
28
  }>, {
29
+ mdiAccountCircle: string;
25
30
  isAnonymousUser: import('vue').ComputedRef<boolean>;
26
31
  avatarClass: import('vue').ComputedRef<string>;
27
32
  userHasImage: import('vue').ComputedRef<boolean>;
33
+ showIconFallback: import('vue').ComputedRef<boolean>;
28
34
  lenderNameFirstLetter: import('vue').ComputedRef<string>;
29
35
  letterViewBox: import('vue').ComputedRef<"0 0 27 27" | "0 0 27.5 27.5">;
30
36
  isLegacyPlaceholderAvatar: typeof isLegacyPlaceholderAvatar;
@@ -49,6 +55,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
49
55
  type: BooleanConstructor;
50
56
  default: boolean;
51
57
  };
58
+ useIconFallback: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
52
62
  theme: {
53
63
  type: StringConstructor;
54
64
  default: string;
@@ -59,8 +69,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
59
69
  lenderImageUrl: string;
60
70
  isSmall: boolean;
61
71
  showCssPlaceholder: boolean;
72
+ useIconFallback: boolean;
62
73
  theme: string;
63
74
  }, {}, {
64
75
  KvLoadingPlaceholder: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
76
+ KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
77
+ icon: {
78
+ type: StringConstructor;
79
+ default: string;
80
+ };
81
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
82
+ icon: {
83
+ type: StringConstructor;
84
+ default: string;
85
+ };
86
+ }>> & Readonly<{}>, {
87
+ icon: string;
88
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
65
89
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
66
90
  export default _default;
@@ -1,10 +1,13 @@
1
- import { toRefs as I, ref as l, computed as r, onMounted as U } from "vue";
2
- import { randomizedUserAvatarClass as x, isLegacyPlaceholderAvatar as d } from "../utils/imageUtils.js";
3
- import B from "./KvLoadingPlaceholder.js";
4
- const z = {
1
+ import { toRefs as b, ref as l, computed as r, onMounted as k } from "vue";
2
+ import { mdiAccountCircle as B } from "@mdi/js";
3
+ import { randomizedUserAvatarClass as U, isLegacyPlaceholderAvatar as v } from "../utils/imageUtils.js";
4
+ import x from "./KvLoadingPlaceholder.js";
5
+ import K from "./KvMaterialIcon.js";
6
+ const R = {
5
7
  name: "KvUserAvatar",
6
8
  components: {
7
- KvLoadingPlaceholder: B
9
+ KvLoadingPlaceholder: x,
10
+ KvMaterialIcon: K
8
11
  },
9
12
  props: {
10
13
  /**
@@ -35,6 +38,14 @@ const z = {
35
38
  type: Boolean,
36
39
  default: !1
37
40
  },
41
+ /**
42
+ * Whether to show the avatar icon in place of the initial letter and the Kiva K when the
43
+ * lender has no custom image. Opt-in so existing consumers keep the lettered avatar.
44
+ */
45
+ useIconFallback: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
38
49
  theme: {
39
50
  type: String,
40
51
  default: "default",
@@ -51,48 +62,51 @@ const z = {
51
62
  lenderName: t,
52
63
  lenderImageUrl: n,
53
64
  isSmall: o,
54
- showCssPlaceholder: u
55
- } = I(s), c = l(!0), i = l(null), p = l(null), v = r(() => !u.value && t.value === "" && n.value === "" || t.value === "Anonymous"), g = r(() => {
65
+ showCssPlaceholder: u,
66
+ useIconFallback: g
67
+ } = b(s), c = l(!0), i = l(null), w = l(null), f = r(() => !u.value && t.value === "" && n.value === "" || t.value === "Anonymous"), h = r(() => {
56
68
  const e = o != null && o.value ? "tw-font-sans tw-font-normal" : "tw-font-serif";
57
- return `${x(t.value)} ${e}`;
58
- }), w = r(() => o != null && o.value ? "0 0 27 27" : "0 0 27.5 27.5"), h = r(() => {
69
+ return `${U(t.value)} ${e}`;
70
+ }), y = r(() => o != null && o.value ? "0 0 27 27" : "0 0 27.5 27.5"), m = r(() => {
59
71
  var a;
60
72
  if (u.value)
61
73
  return !0;
62
74
  const e = ((a = n == null ? void 0 : n.value) == null ? void 0 : a.split("/").pop()) ?? "";
63
- return e && !d(e);
64
- }), y = r(() => {
75
+ return e && !v(e);
76
+ }), I = r(() => {
65
77
  var e;
66
78
  return (e = t == null ? void 0 : t.value) == null ? void 0 : e.substring(0, 1).toUpperCase();
67
- }), f = () => {
79
+ }), A = r(() => g.value && (f.value || !m.value)), d = () => {
68
80
  c.value = !1;
69
- }, A = (e, a = 1e4) => new Promise((C, L) => {
70
- const P = Date.now() + a, m = () => {
71
- !e || e.complete ? C(e) : Date.now() > P ? L(new Error(`Timeout: ${e.src}`)) : setTimeout(m, 50);
81
+ }, C = (e, a = 1e4) => new Promise((F, L) => {
82
+ const P = Date.now() + a, p = () => {
83
+ !e || e.complete ? F(e) : Date.now() > P ? L(new Error(`Timeout: ${e.src}`)) : setTimeout(p, 50);
72
84
  };
73
- m();
85
+ p();
74
86
  });
75
- return U(async () => {
87
+ return k(async () => {
76
88
  const e = i.value;
77
89
  try {
78
- await A(e), f();
90
+ await C(e), d();
79
91
  } catch (a) {
80
92
  console.log(a.message);
81
93
  }
82
94
  }), {
83
- isAnonymousUser: v,
84
- avatarClass: g,
85
- userHasImage: h,
86
- lenderNameFirstLetter: y,
87
- letterViewBox: w,
88
- isLegacyPlaceholderAvatar: d,
95
+ mdiAccountCircle: B,
96
+ isAnonymousUser: f,
97
+ avatarClass: h,
98
+ userHasImage: m,
99
+ showIconFallback: A,
100
+ lenderNameFirstLetter: I,
101
+ letterViewBox: y,
102
+ isLegacyPlaceholderAvatar: v,
89
103
  isImageLoading: c,
90
- onImgLoad: f,
104
+ onImgLoad: d,
91
105
  imageRef: i,
92
- userAvatar: p
106
+ userAvatar: w
93
107
  };
94
108
  }
95
109
  };
96
110
  export {
97
- z as default
111
+ R as default
98
112
  };
@@ -1 +1 @@
1
- .header-fade-enter-active[data-v-5fc51700]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-5fc51700]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-5fc51700],.header-fade-leave-to[data-v-5fc51700]{opacity:0}.header-fade-leave[data-v-5fc51700],.header-fade-enter-to[data-v-5fc51700]{opacity:1}.bg-opacity-50[data-v-5fc51700]{background-color:rgba(var(--bg-action-highlight),.5)}
1
+ .header-fade-enter-active[data-v-ec338a13]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-ec338a13]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-ec338a13],.header-fade-leave-to[data-v-ec338a13]{opacity:0}.header-fade-leave[data-v-ec338a13],.header-fade-enter-to[data-v-ec338a13]{opacity:1}.bg-opacity-50[data-v-ec338a13]{background-color:rgba(var(--bg-action-highlight),.5)}
@@ -1,48 +1,49 @@
1
1
  import k from "./KvWwwHeaderBasic2.js";
2
- import { resolveComponent as a, openBlock as m, createBlock as u, withCtx as r, createElementVNode as s, normalizeStyle as d, createVNode as l, Transition as g, withDirectives as b, vShow as v, normalizeClass as h, resolveDynamicComponent as y, withModifiers as M } from "vue";
2
+ import { resolveComponent as l, openBlock as m, createBlock as u, withCtx as a, createElementVNode as s, normalizeStyle as d, createVNode as r, Transition as g, withDirectives as v, vShow as b, normalizeClass as h, resolveDynamicComponent as y, withModifiers as M } from "vue";
3
3
  import "./KvWwwHeaderBasic.css";
4
4
  import I from "../../_virtual/_plugin-vue_export-helper.js";
5
- function L(t, o, n, e, C, D) {
6
- const w = a("link-bar"), f = a("kv-page-container"), c = a("kv-theme-provider");
7
- return m(), u(c, {
5
+ function L(t, o, e, n, C, D) {
6
+ const w = l("link-bar"), c = l("kv-page-container"), f = l("kv-theme-provider");
7
+ return m(), u(f, {
8
8
  tag: "div",
9
9
  class: "tw-bg-primary"
10
10
  }, {
11
- default: r(() => [
11
+ default: a(() => [
12
12
  s("nav", {
13
13
  ref: "navRef",
14
14
  class: "tw-font-medium tw-relative",
15
- style: d({ minHeight: e.MIN_HEADER_HEIGHT })
15
+ style: d({ minHeight: n.MIN_HEADER_HEIGHT })
16
16
  }, [
17
- l(f, null, {
18
- default: r(() => [
19
- l(g, { name: "header-fade" }, {
20
- default: r(() => [
21
- b(l(w, {
22
- "logged-in": n.loggedIn,
23
- "basket-count": n.basketCount,
24
- balance: n.balance,
25
- "user-id": n.userId,
26
- "is-borrower": n.isBorrower,
27
- "is-trustee": n.isTrustee,
28
- "lender-name": n.lenderName,
29
- "lender-image-url": n.lenderImageUrl,
30
- "is-user-data-loading": n.isUserDataLoading,
31
- "is-basket-data-loading": n.isBasketDataLoading,
32
- "show-m-g-upsell-link": n.showMGUpsellLink,
33
- "login-url": n.loginUrl,
34
- "my-dashboard-url": n.myDashboardUrl,
35
- "countries-not-lent-to-url": n.countriesNotLentToUrl,
36
- "app-origin": e.resolvedAppOrigin,
37
- "search-suggestions": e.effectiveSuggestions,
38
- "is-mobile": e.isMobile,
39
- "open-menu-item": e.menuComponent,
40
- onItemHover: e.onItemHover,
17
+ r(c, null, {
18
+ default: a(() => [
19
+ r(g, { name: "header-fade" }, {
20
+ default: a(() => [
21
+ v(r(w, {
22
+ "logged-in": e.loggedIn,
23
+ "basket-count": e.basketCount,
24
+ balance: e.balance,
25
+ "user-id": e.userId,
26
+ "is-borrower": e.isBorrower,
27
+ "is-trustee": e.isTrustee,
28
+ "lender-name": e.lenderName,
29
+ "lender-image-url": e.lenderImageUrl,
30
+ "is-user-data-loading": e.isUserDataLoading,
31
+ "is-basket-data-loading": e.isBasketDataLoading,
32
+ "use-esi-avatar": e.useEsiAvatar,
33
+ "show-m-g-upsell-link": e.showMGUpsellLink,
34
+ "login-url": e.loginUrl,
35
+ "my-dashboard-url": e.myDashboardUrl,
36
+ "countries-not-lent-to-url": e.countriesNotLentToUrl,
37
+ "app-origin": n.resolvedAppOrigin,
38
+ "search-suggestions": n.effectiveSuggestions,
39
+ "is-mobile": n.isMobile,
40
+ "open-menu-item": n.menuComponent,
41
+ onItemHover: n.onItemHover,
41
42
  onLoadSearchData: o[0] || (o[0] = (i) => t.$emit("load-search-data")),
42
43
  onSearchSubmit: o[1] || (o[1] = (i) => t.$emit("search-submit", i)),
43
44
  onLoginClick: o[2] || (o[2] = (i) => t.$emit("login-click", i))
44
- }, null, 8, ["logged-in", "basket-count", "balance", "user-id", "is-borrower", "is-trustee", "lender-name", "lender-image-url", "is-user-data-loading", "is-basket-data-loading", "show-m-g-upsell-link", "login-url", "my-dashboard-url", "countries-not-lent-to-url", "app-origin", "search-suggestions", "is-mobile", "open-menu-item", "onItemHover"]), [
45
- [v, e.linksVisible]
45
+ }, null, 8, ["logged-in", "basket-count", "balance", "user-id", "is-borrower", "is-trustee", "lender-name", "lender-image-url", "is-user-data-loading", "is-basket-data-loading", "use-esi-avatar", "show-m-g-upsell-link", "login-url", "my-dashboard-url", "countries-not-lent-to-url", "app-origin", "search-suggestions", "is-mobile", "open-menu-item", "onItemHover"]), [
46
+ [b, n.linksVisible]
46
47
  ])
47
48
  ]),
48
49
  _: 1
@@ -51,49 +52,49 @@ function L(t, o, n, e, C, D) {
51
52
  _: 1
52
53
  })
53
54
  ], 4),
54
- l(g, { name: "header-fade" }, {
55
- default: r(() => [
56
- b(s("div", {
55
+ r(g, { name: "header-fade" }, {
56
+ default: a(() => [
57
+ v(s("div", {
57
58
  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",
58
- style: d({ top: e.navHeight }),
59
- onTouchstart: o[9] || (o[9] = (...i) => e.handleOverlayClick && e.handleOverlayClick(...i))
59
+ style: d({ top: n.navHeight }),
60
+ onTouchstart: o[9] || (o[9] = (...i) => n.handleOverlayClick && n.handleOverlayClick(...i))
60
61
  }, [
61
62
  s("div", {
62
63
  ref: "menuPanelRef",
63
- class: h(["tw-bg-primary tw-overflow-y-auto", e.menuPanelClass]),
64
+ class: h(["tw-bg-primary tw-overflow-y-auto", n.menuPanelClass]),
64
65
  style: d({
65
- ...e.menuPosition,
66
- maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.navHeight})`
66
+ ...n.menuPosition,
67
+ maxHeight: n.isMobileMenuActive ? "auto" : `calc(100dvh - ${n.navHeight})`
67
68
  }),
68
- onMouseenter: o[7] || (o[7] = (i) => e.setMenu(e.menuItem, e.menuComponent)),
69
- onMouseleave: o[8] || (o[8] = (i) => e.setMenu())
69
+ onMouseenter: o[7] || (o[7] = (i) => n.setMenu(n.menuItem, n.menuComponent)),
70
+ onMouseleave: o[8] || (o[8] = (i) => n.setMenu())
70
71
  }, [
71
- (m(), u(y(e.menuComponent), {
72
+ (m(), u(y(n.menuComponent), {
72
73
  ref: "menuComponentInstance",
73
- "logged-in": n.loggedIn,
74
- "login-url": n.loginUrl,
75
- "user-id": n.userId,
76
- "is-borrower": n.isBorrower,
77
- "is-trustee": n.isTrustee,
78
- "trustee-id": n.trusteeId,
79
- "most-recent-borrowed-loan-id": n.mostRecentBorrowedLoanId,
80
- "my-dashboard-url": n.myDashboardUrl,
81
- "show-m-g-upsell-link": n.showMGUpsellLink,
82
- "is-mobile": e.isMobile,
83
- "countries-not-lent-to-url": n.countriesNotLentToUrl,
74
+ "logged-in": e.loggedIn,
75
+ "login-url": e.loginUrl,
76
+ "user-id": e.userId,
77
+ "is-borrower": e.isBorrower,
78
+ "is-trustee": e.isTrustee,
79
+ "trustee-id": e.trusteeId,
80
+ "most-recent-borrowed-loan-id": e.mostRecentBorrowedLoanId,
81
+ "my-dashboard-url": e.myDashboardUrl,
82
+ "show-m-g-upsell-link": e.showMGUpsellLink,
83
+ "is-mobile": n.isMobile,
84
+ "countries-not-lent-to-url": e.countriesNotLentToUrl,
84
85
  "use-mobile-mega-menu": !0,
85
- "app-origin": e.resolvedAppOrigin,
86
- "search-suggestions": e.effectiveSuggestions,
87
- onLoadLendMenuData: e.emitLendMenuEvent,
86
+ "app-origin": n.resolvedAppOrigin,
87
+ "search-suggestions": n.effectiveSuggestions,
88
+ onLoadLendMenuData: n.emitLendMenuEvent,
88
89
  onLoadSearchData: o[3] || (o[3] = (i) => t.$emit("load-search-data")),
89
90
  onSearchSubmit: o[4] || (o[4] = (i) => t.$emit("search-submit", i)),
90
- onClosingMenu: o[5] || (o[5] = (i) => e.setMenu()),
91
+ onClosingMenu: o[5] || (o[5] = (i) => n.setMenu()),
91
92
  onTouchstart: o[6] || (o[6] = M(() => {
92
93
  }, ["stop"]))
93
94
  }, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "trustee-id", "most-recent-borrowed-loan-id", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "countries-not-lent-to-url", "app-origin", "search-suggestions", "onLoadLendMenuData"]))
94
95
  ], 38)
95
96
  ], 36), [
96
- [v, e.menuOpen]
97
+ [b, n.menuOpen]
97
98
  ])
98
99
  ]),
99
100
  _: 1
@@ -102,7 +103,7 @@ function L(t, o, n, e, C, D) {
102
103
  _: 1
103
104
  });
104
105
  }
105
- const B = /* @__PURE__ */ I(k, [["render", L], ["__scopeId", "data-v-5fc51700"]]);
106
+ const B = /* @__PURE__ */ I(k, [["render", L], ["__scopeId", "data-v-ec338a13"]]);
106
107
  export {
107
108
  B as default
108
109
  };
@@ -33,6 +33,8 @@ const S = "4rem", Y = G`
33
33
  lenderImageUrl: { type: String, default: "" },
34
34
  isUserDataLoading: { type: Boolean, default: !1 },
35
35
  isBasketDataLoading: { type: Boolean, default: !1 },
36
+ // Only for hosts whose ESI emits --user-avatar; without it the avatar renders an empty image.
37
+ useEsiAvatar: { type: Boolean, default: !1 },
36
38
  showMGUpsellLink: { type: Boolean, default: !1 },
37
39
  loginUrl: { type: String, default: "/ui-login" },
38
40
  myDashboardUrl: { type: String, default: "/mykiva" },
@@ -68,7 +70,7 @@ const S = "4rem", Y = G`
68
70
  var t, e;
69
71
  return ((e = (t = l.value) == null ? void 0 : t.$options) == null ? void 0 : e.name) === "AboutMenu";
70
72
  }), C = s(() => g.value ? "tw-w-full tw-min-h-dvh tw-rounded-none" : h.value ? "tw-w-auto tw-rounded-b tw-border tw-border-t-0 tw-border-tertiary" : q.value ? "tw-w-full md:tw-w-auto tw-rounded-none !tw-rounded-b md:tw-border md:tw-border-t-0 md:tw-border-tertiary" : "tw-w-full md:tw-w-auto tw-rounded-none !md:tw-rounded-b");
71
- function R(t, e, n, i = null) {
73
+ function E(t, e, n, i = null) {
72
74
  c.value = i, f(t, e, n);
73
75
  }
74
76
  D(h, async (t) => {
@@ -79,7 +81,7 @@ const S = "4rem", Y = G`
79
81
  const n = e.offsetWidth, i = c.value, a = Math.max(0, window.innerWidth - (i + n / 2));
80
82
  v.value = { right: `${a}px`, position: "absolute" };
81
83
  });
82
- function E() {
84
+ function R() {
83
85
  M("load-lend-menu-data");
84
86
  }
85
87
  function T(t) {
@@ -125,9 +127,9 @@ const S = "4rem", Y = G`
125
127
  menuPanelRef: w,
126
128
  pinMenuOpen: H,
127
129
  setMenu: f,
128
- onItemHover: R,
130
+ onItemHover: E,
129
131
  handleOverlayClick: x,
130
- emitLendMenuEvent: E,
132
+ emitLendMenuEvent: R,
131
133
  loadMenuData: T,
132
134
  loadSearchSuggestions: _
133
135
  };
@@ -1 +1 @@
1
- .link-bar[data-v-2e7def04]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-2e7def04]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media(min-width:45.875rem){.link-bar[data-v-2e7def04]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-2e7def04]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-2e7def04]{grid-area:lend}.link-bar__search[data-v-2e7def04]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-2e7def04]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-2e7def04]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-2e7def04]{margin-bottom:0}}.header-link[data-v-2e7def04]{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-2e7def04]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}.link-bar__basket-count-loader[data-v-2e7def04]{width:1.5ch;height:1.375em;height:1lh}
1
+ .link-bar[data-v-2b7a1e93]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-2b7a1e93]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media(min-width:45.875rem){.link-bar[data-v-2b7a1e93]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-2b7a1e93]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-2b7a1e93]{grid-area:lend}.link-bar__search[data-v-2b7a1e93]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-2b7a1e93]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-2b7a1e93]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-2b7a1e93]{margin-bottom:0}}.header-link[data-v-2b7a1e93]{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-2b7a1e93]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}.link-bar__basket-count-loader[data-v-2b7a1e93]{width:1.5ch;height:1.375em;height:1lh}