@kiva/kv-components 8.28.0 → 8.29.1

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
- .link-bar[data-v-2fd75227]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-2fd75227]{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-2fd75227]{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-2fd75227]{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-2fd75227]{grid-area:lend}.link-bar__search[data-v-2fd75227]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-2fd75227]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-2fd75227]{-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-2fd75227]{margin-bottom:0}}.header-link[data-v-2fd75227]{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-2fd75227]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
1
+ .link-bar[data-v-9ca80a31]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-9ca80a31]{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-9ca80a31]{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-9ca80a31]{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-9ca80a31]{grid-area:lend}.link-bar__search[data-v-9ca80a31]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-9ca80a31]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-9ca80a31]{-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-9ca80a31]{margin-bottom:0}}.header-link[data-v-9ca80a31]{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-9ca80a31]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
@@ -1,42 +1,43 @@
1
- import M from "./LinkBar2.js";
2
- import { resolveComponent as d, openBlock as a, createElementBlock as i, createElementVNode as r, withModifiers as g, createVNode as l, withCtx as w, createTextVNode as s, Fragment as y, renderList as p, toDisplayString as m, createCommentVNode as v, withDirectives as x, vShow as L, createBlock as B } from "vue";
1
+ import p from "./LinkBar2.js";
2
+ import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as r, withModifiers as b, createVNode as l, withCtx as c, createTextVNode as w, Fragment as x, renderList as L, toDisplayString as m, createCommentVNode as s, withDirectives as B, normalizeStyle as k, vShow as O, createBlock as f } from "vue";
3
3
  import "./LinkBar.css";
4
- import O from "../../_virtual/_plugin-vue_export-helper.js";
5
- const S = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, T = ["href", "data-testid", "onClick"], D = ["href"], U = { class: "tw-hidden md:tw-flex tw-items-center" }, H = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none" }, A = { class: "tw-relative tw-flex md:tw-hidden tw-items-center tw-text-eco-green-4" }, I = {
4
+ import S from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const T = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, D = ["href", "data-testid", "onClick"], U = ["href"], H = { class: "tw-hidden md:tw-flex tw-items-center" }, A = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none" }, I = { class: "tw-relative tw-flex md:tw-hidden tw-items-center tw-text-eco-green-4" }, K = {
6
6
  key: 0,
7
7
  class: "tw-absolute tw-w-4 tw-h-4 tw-pt-0.5 tw-flex tw-items-center tw-justify-center tw-text-white tw-text-small tw-font-medium tw-pointer-events-none"
8
- }, K = { class: "tw-hidden md:tw-block" }, N = {
8
+ }, N = { class: "tw-hidden md:tw-block" }, E = {
9
9
  key: 0,
10
10
  class: "tw-w-4 tw-h-3"
11
- }, E = {
11
+ }, P = {
12
12
  key: 1,
13
13
  class: "tw-text-eco-green-4"
14
- }, P = {
15
- key: 2,
16
- class: "tw-w-3 tw-h-3 tw-rounded-full tw-overflow-hidden"
14
+ }, V = {
15
+ key: 3,
16
+ class: "tw-w-3 tw-h-3 tw-rounded-full tw-overflow-hidden",
17
+ "data-testid": "header-avatar-skeleton"
17
18
  };
18
- function V(k, n, o, e, j, X) {
19
- const c = d("kv-material-icon"), b = d("kv-header-logo"), u = d("kv-header-dropdown-link"), f = d("search-bar"), _ = d("kv-button"), h = d("kv-loading-placeholder"), C = d("kv-user-avatar");
20
- return a(), i("div", {
19
+ function j(h, t, a, e, X, z) {
20
+ const v = d("kv-material-icon"), y = d("kv-header-logo"), u = d("kv-header-dropdown-link"), _ = d("search-bar"), M = d("kv-button"), g = d("kv-loading-placeholder"), C = d("kv-user-avatar");
21
+ return o(), i("div", {
21
22
  class: "link-bar tw-min-h-[4rem] tw-font-medium tw-relative",
22
- onTouchstart: n[12] || (n[12] = (...t) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...t))
23
+ onTouchstart: t[12] || (t[12] = (...n) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...n))
23
24
  }, [
24
25
  r("button", {
25
26
  type: "button",
26
27
  "aria-label": "Open menu",
27
28
  class: "header-link link-bar__hamburger tw-inline-flex md:tw-hidden",
28
- onMouseover: n[0] || (n[0] = (t) => e.handleOnHover("menuButton", e.MobileMenu)),
29
- onTouchstart: n[1] || (n[1] = g((t) => e.handleTouchStart("menuButton", e.MobileMenu), ["stop", "prevent"]))
29
+ onMouseover: t[0] || (t[0] = (n) => e.handleOnHover("menuButton", e.MobileMenu)),
30
+ onTouchstart: t[1] || (t[1] = b((n) => e.handleTouchStart("menuButton", e.MobileMenu), ["stop", "prevent"]))
30
31
  }, [
31
- l(c, { icon: e.mdiMenu }, null, 8, ["icon"])
32
+ l(v, { icon: e.mdiMenu }, null, 8, ["icon"])
32
33
  ], 32),
33
34
  r("a", {
34
35
  href: "/",
35
36
  "aria-label": "Kiva home",
36
37
  class: "link-bar__logo tw-px-1 tw-py-2 tw-cursor-pointer",
37
- onClick: n[2] || (n[2] = (...t) => e.onLogoClick && e.onLogoClick(...t))
38
+ onClick: t[2] || (t[2] = (...n) => e.onLogoClick && e.onLogoClick(...n))
38
39
  }, [
39
- l(b)
40
+ l(y)
40
41
  ]),
41
42
  l(u, {
42
43
  class: "link-bar__lend",
@@ -47,30 +48,30 @@ function V(k, n, o, e, j, X) {
47
48
  "dropdown-icon": e.mdiChevronDown,
48
49
  "base-class": "tw-py-1",
49
50
  onOnHover: e.handleOnHover,
50
- onMouseleave: n[3] || (n[3] = (t) => e.handleMouseOut("lendButton")),
51
+ onMouseleave: t[3] || (t[3] = (n) => e.handleMouseOut("lendButton")),
51
52
  onUserTap: e.handleTouchStart
52
53
  }, {
53
- default: w(() => n[13] || (n[13] = [
54
- s(" Lend ")
54
+ default: c(() => t[13] || (t[13] = [
55
+ w(" Lend ")
55
56
  ])),
56
57
  _: 1
57
58
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
58
- l(f, {
59
+ l(_, {
59
60
  class: "link-bar__search tw-min-w-0 tw-hidden md:tw-block",
60
- "search-suggestions": o.searchSuggestions,
61
- "app-origin": o.appOrigin,
62
- "is-mobile": o.isMobile,
63
- onLoadSearchData: n[4] || (n[4] = (t) => k.$emit("load-search-data")),
64
- onSearchSubmit: n[5] || (n[5] = (t) => k.$emit("search-submit", t))
61
+ "search-suggestions": a.searchSuggestions,
62
+ "app-origin": a.appOrigin,
63
+ "is-mobile": a.isMobile,
64
+ onLoadSearchData: t[4] || (t[4] = (n) => h.$emit("load-search-data")),
65
+ onSearchSubmit: t[5] || (t[5] = (n) => h.$emit("search-submit", n))
65
66
  }, null, 8, ["search-suggestions", "app-origin", "is-mobile"]),
66
- r("div", S, [
67
- (a(!0), i(y, null, p(e.visiblePrimaryLinks, (t) => (a(), i("a", {
68
- key: t.id,
69
- href: t.href,
67
+ r("div", T, [
68
+ (o(!0), i(x, null, L(e.visiblePrimaryLinks, (n) => (o(), i("a", {
69
+ key: n.id,
70
+ href: n.href,
70
71
  class: "header-link tw-hidden md:tw-block",
71
- "data-testid": `header-link-${t.id}`,
72
- onClick: (F) => e.onPrimaryClick(t)
73
- }, m(t.label), 9, T))), 128)),
72
+ "data-testid": `header-link-${n.id}`,
73
+ onClick: (F) => e.onPrimaryClick(n)
74
+ }, m(n.label), 9, D))), 128)),
74
75
  l(u, {
75
76
  "ref-name": "aboutLink",
76
77
  class: "tw-hidden md:tw-block",
@@ -80,82 +81,95 @@ function V(k, n, o, e, j, X) {
80
81
  "base-class": "tw-py-1",
81
82
  "send-link-position": "",
82
83
  onOnHover: e.handleOnHover,
83
- onMouseleave: n[6] || (n[6] = (t) => e.handleMouseOut("aboutLink")),
84
+ onMouseleave: t[6] || (t[6] = (n) => e.handleMouseOut("aboutLink")),
84
85
  onUserTap: e.handleTouchStart
85
86
  }, {
86
- default: w(() => n[14] || (n[14] = [
87
- s(" About ")
87
+ default: c(() => t[14] || (t[14] = [
88
+ w(" About ")
88
89
  ])),
89
90
  _: 1
90
91
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
91
- o.loggedIn ? v("", !0) : (a(), i("a", {
92
+ a.loggedIn ? s("", !0) : (o(), i("a", {
92
93
  key: 0,
93
- href: o.loginUrl,
94
+ href: a.loginUrl,
94
95
  class: "header-link",
95
96
  "data-testid": "header-login",
96
- onClick: n[7] || (n[7] = (...t) => e.onLoginClick && e.onLoginClick(...t))
97
- }, "Log in", 8, D)),
98
- x(r("a", {
97
+ onClick: t[7] || (t[7] = (...n) => e.onLoginClick && e.onLoginClick(...n))
98
+ }, "Log in", 8, U)),
99
+ B(r("a", {
100
+ style: k(a.isBasketDataLoading ? { display: "var(--basket-display, flex)" } : void 0),
99
101
  href: "/basket",
100
102
  class: "header-link tw-flex tw-items-center",
101
103
  "data-testid": "header-basket",
102
- onClick: n[8] || (n[8] = (...t) => e.onBasketClick && e.onBasketClick(...t))
104
+ onClick: t[8] || (t[8] = (...n) => e.onBasketClick && e.onBasketClick(...n))
103
105
  }, [
104
- r("span", U, [
105
- r("span", H, m(o.basketCount), 1),
106
- n[15] || (n[15] = s(" Basket "))
106
+ r("span", H, [
107
+ r("span", A, m(a.basketCount), 1),
108
+ t[15] || (t[15] = w(" Basket "))
107
109
  ]),
108
- r("span", A, [
109
- o.isBasketDataLoading ? v("", !0) : (a(), i("span", I, m(o.basketCount), 1)),
110
- l(c, {
110
+ r("span", I, [
111
+ a.isBasketDataLoading ? s("", !0) : (o(), i("span", K, m(a.basketCount), 1)),
112
+ l(v, {
111
113
  icon: e.mdiBriefcase,
112
114
  class: "tw-w-4 tw-h-4 tw-pointer-events-none"
113
115
  }, null, 8, ["icon"]),
114
- n[16] || (n[16] = r("span", { class: "tw-sr-only" }, "Basket", -1))
116
+ t[16] || (t[16] = r("span", { class: "tw-sr-only" }, "Basket", -1))
115
117
  ])
116
- ], 512), [
117
- [L, o.basketCount > 0 || o.isBasketDataLoading]
118
+ ], 4), [
119
+ [O, a.basketCount > 0 || a.isBasketDataLoading]
118
120
  ]),
119
- r("div", K, [
120
- l(_, {
121
+ r("div", N, [
122
+ l(M, {
121
123
  variant: "secondary",
122
124
  href: "/donate/supportus",
123
125
  class: "tw-whitespace-nowrap",
124
126
  "data-testid": "header-support-kiva",
125
127
  onClick: e.onSupportKivaClick
126
128
  }, {
127
- default: w(() => n[17] || (n[17] = [
128
- s(" Support Kiva ")
129
+ default: c(() => t[17] || (t[17] = [
130
+ w(" Support Kiva ")
129
131
  ])),
130
132
  _: 1
131
133
  }, 8, ["onClick"])
132
134
  ]),
133
- o.loggedIn ? (a(), i("div", {
135
+ a.loggedIn ? (o(), i("div", {
134
136
  key: 1,
135
137
  ref: "avatarMenu",
136
138
  "data-testid": "header-avatar-menu",
137
139
  class: "tw-flex tw-items-center tw-gap-1 tw-cursor-pointer tw-py-1",
138
- onMouseenter: n[9] || (n[9] = (t) => e.handleOnHover("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX())),
139
- onMouseleave: n[10] || (n[10] = (t) => e.handleMouseOut("avatarMenu")),
140
- onTouchstart: n[11] || (n[11] = g((t) => e.handleTouchStart("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX()), ["stop"]))
140
+ style: k(a.isUserDataLoading ? { display: "var(--user-loading-display, flex)" } : void 0),
141
+ onMouseenter: t[9] || (t[9] = (n) => e.handleOnHover("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX())),
142
+ onMouseleave: t[10] || (t[10] = (n) => e.handleMouseOut("avatarMenu")),
143
+ onTouchstart: t[11] || (t[11] = b((n) => e.handleTouchStart("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX()), ["stop"]))
141
144
  }, [
142
- o.isUserDataLoading ? (a(), i("div", N, [
143
- l(h)
144
- ])) : (a(), i("span", E, m(e.formattedBalance), 1)),
145
- o.isUserDataLoading ? (a(), i("div", P, [
146
- l(h)
147
- ])) : (a(), B(C, {
148
- key: 3,
145
+ a.isUserDataLoading ? (o(), i("div", E, [
146
+ l(g)
147
+ ])) : (o(), i("span", P, m(e.formattedBalance), 1)),
148
+ e.avatarMode === "esi" ? (o(), f(v, {
149
+ key: 2,
150
+ icon: e.mdiAccountCircle,
151
+ class: "tw-w-3 tw-h-3",
152
+ "data-testid": "header-avatar-icon",
153
+ style: { display: "var(--user-avatar-legacy-display, inline-block)" }
154
+ }, null, 8, ["icon"])) : s("", !0),
155
+ e.avatarMode === "skeleton" ? (o(), i("div", V, [
156
+ l(g)
157
+ ])) : s("", !0),
158
+ e.avatarMode !== "skeleton" ? (o(), f(C, {
159
+ key: 4,
149
160
  class: "tw-w-3 tw-h-3",
150
- "lender-name": o.lenderName,
151
- "lender-image-url": o.lenderImageUrl,
161
+ "data-testid": e.avatarMode === "esi" ? "header-avatar-esi" : null,
162
+ style: k(e.avatarMode === "esi" ? { display: "var(--user-avatar-display, block)" } : void 0),
163
+ "lender-name": a.lenderName,
164
+ "lender-image-url": a.lenderImageUrl,
165
+ "show-css-placeholder": e.avatarMode === "esi",
152
166
  "is-small": ""
153
- }, null, 8, ["lender-name", "lender-image-url"]))
154
- ], 544)) : v("", !0)
167
+ }, null, 8, ["data-testid", "style", "lender-name", "lender-image-url", "show-css-placeholder"])) : s("", !0)
168
+ ], 36)) : s("", !0)
155
169
  ])
156
170
  ], 32);
157
171
  }
158
- const Q = /* @__PURE__ */ O(M, [["render", V], ["__scopeId", "data-v-2fd75227"]]);
172
+ const R = /* @__PURE__ */ S(p, [["render", j], ["__scopeId", "data-v-9ca80a31"]]);
159
173
  export {
160
- Q as default
174
+ R as default
161
175
  };
@@ -41,6 +41,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
41
41
  type: BooleanConstructor;
42
42
  default: boolean;
43
43
  };
44
+ useEsiAvatar: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
44
48
  showMGUpsellLink: {
45
49
  type: BooleanConstructor;
46
50
  default: boolean;
@@ -77,6 +81,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
77
81
  mdiMenu: string;
78
82
  mdiChevronDown: string;
79
83
  mdiBriefcase: string;
84
+ mdiAccountCircle: string;
80
85
  KvLendMenu: any;
81
86
  AboutMenu: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
82
87
  isMobile: {
@@ -250,6 +255,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
250
255
  visiblePrimaryLinks: import('vue').ComputedRef<any>;
251
256
  lendUrl: import('vue').ComputedRef<string>;
252
257
  formattedBalance: import('vue').ComputedRef<any>;
258
+ avatarMode: import('vue').ComputedRef<"loaded" | "esi" | "skeleton">;
253
259
  lendOpenItem: import('vue').ComputedRef<Function | Record<string, any>>;
254
260
  aboutOpenItem: import('vue').ComputedRef<Function | Record<string, any>>;
255
261
  handleOnHover: (item: string, menu: unknown, position?: unknown, triggerCenterX?: number | null) => void;
@@ -302,6 +308,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
302
308
  type: BooleanConstructor;
303
309
  default: boolean;
304
310
  };
311
+ useEsiAvatar: {
312
+ type: BooleanConstructor;
313
+ default: boolean;
314
+ };
305
315
  showMGUpsellLink: {
306
316
  type: BooleanConstructor;
307
317
  default: boolean;
@@ -358,6 +368,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
358
368
  appOrigin: string;
359
369
  isBasketDataLoading: boolean;
360
370
  isUserDataLoading: boolean;
371
+ useEsiAvatar: boolean;
361
372
  }, {}, {
362
373
  KvMaterialIcon: any;
363
374
  KvUserAvatar: any;
@@ -1,24 +1,24 @@
1
- import { defineAsyncComponent as r, inject as P, ref as d, computed as i } from "vue";
2
- import { mdiBriefcase as D, mdiChevronDown as x, mdiMenu as R } from "@mdi/js";
3
- import $ from "numeral";
4
- import E from "../KvMaterialIcon.js";
5
- import H from "../KvUserAvatar.js";
6
- import _ from "../KvLoadingPlaceholder.js";
7
- import j from "../KvButton.js";
8
- import F from "../KvWwwHeader/KvHeaderLogo.js";
9
- import G from "../KvWwwHeader/KvHeaderDropdownLink.js";
10
- import { PRIMARY_LINKS as W } from "../../utils/headerNavLinks.js";
11
- import X from "./SearchBar.js";
12
- const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() => import("./AboutMenu.js")), Y = r(() => import("./MyKivaMenu.js")), q = r(() => import("./MobileMenu.js")), ie = {
1
+ import { defineAsyncComponent as r, inject as D, ref as m, computed as i } from "vue";
2
+ import { mdiAccountCircle as E, mdiBriefcase as x, mdiChevronDown as R, mdiMenu as $ } from "@mdi/js";
3
+ import H from "numeral";
4
+ import _ from "../KvMaterialIcon.js";
5
+ import j from "../KvUserAvatar.js";
6
+ import F from "../KvLoadingPlaceholder.js";
7
+ import G from "../KvButton.js";
8
+ import W from "../KvWwwHeader/KvHeaderLogo.js";
9
+ import X from "../KvWwwHeader/KvHeaderDropdownLink.js";
10
+ import { PRIMARY_LINKS as Y } from "../../utils/headerNavLinks.js";
11
+ import q from "./SearchBar.js";
12
+ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() => import("./AboutMenu.js")), z = r(() => import("./MyKivaMenu.js")), J = r(() => import("./MobileMenu.js")), ue = {
13
13
  name: "LinkBar",
14
14
  components: {
15
- KvMaterialIcon: E,
16
- KvUserAvatar: H,
17
- KvLoadingPlaceholder: _,
18
- KvButton: j,
19
- KvHeaderLogo: F,
20
- KvHeaderDropdownLink: G,
21
- SearchBar: X
15
+ KvMaterialIcon: _,
16
+ KvUserAvatar: j,
17
+ KvLoadingPlaceholder: F,
18
+ KvButton: G,
19
+ KvHeaderLogo: W,
20
+ KvHeaderDropdownLink: X,
21
+ SearchBar: q
22
22
  },
23
23
  props: {
24
24
  loggedIn: { type: Boolean, default: !1 },
@@ -31,6 +31,7 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
31
31
  lenderImageUrl: { type: String, default: "" },
32
32
  isUserDataLoading: { type: Boolean, default: !1 },
33
33
  isBasketDataLoading: { type: Boolean, default: !1 },
34
+ useEsiAvatar: { type: Boolean, default: !1 },
34
35
  showMGUpsellLink: { type: Boolean, default: !1 },
35
36
  loginUrl: { type: String, default: "/ui-login" },
36
37
  myDashboardUrl: { type: String, default: "/mykiva" },
@@ -42,8 +43,8 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
42
43
  },
43
44
  emits: ["item-hover", "load-search-data", "search-submit", "login-click"],
44
45
  setup(t, { emit: l }) {
45
- const o = P("$kvTrackEvent", () => {
46
- }), a = d(null), u = d(null);
46
+ const o = D("$kvTrackEvent", () => {
47
+ }), a = m(null), u = m(null);
47
48
  function p() {
48
49
  const e = u.value, n = e == null ? void 0 : e.getBoundingClientRect();
49
50
  return n ? t.isMobile ? { right: "0" } : { right: `${window.innerWidth - n.right}px` } : null;
@@ -53,30 +54,30 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
53
54
  const e = u.value, n = e == null ? void 0 : e.getBoundingClientRect();
54
55
  return n ? n.left + n.width / 2 : null;
55
56
  }
56
- const k = i(() => W.filter((e) => e.visibility === "visitor" ? !t.loggedIn : e.visibility === "loggedIn" ? t.loggedIn : !0)), h = i(() => t.isMobile ? void 0 : "/lend-by-category"), y = i(() => $(Math.floor(t.balance)).format("$0")), M = i(() => t.openMenuItem === v ? t.openMenuItem : null), B = i(() => t.openMenuItem === g ? t.openMenuItem : null), L = {
57
+ const k = i(() => Y.filter((e) => e.visibility === "visitor" ? !t.loggedIn : e.visibility === "loggedIn" ? t.loggedIn : !0)), h = i(() => t.isMobile ? void 0 : "/lend-by-category"), y = i(() => H(Math.floor(t.balance)).format("$0")), M = i(() => t.isUserDataLoading ? t.useEsiAvatar ? "esi" : "skeleton" : "loaded"), B = i(() => t.openMenuItem === v ? t.openMenuItem : null), L = i(() => t.openMenuItem === g ? t.openMenuItem : null), I = {
57
58
  menuButton: { action: "hover-Mobile-menu", label: "Mobile" },
58
59
  lendButton: { action: "hover-Lend-menu", label: "Lend" },
59
60
  aboutLink: { action: "hover-About-menu", label: "About" },
60
61
  avatarMenu: { action: "hover-User-menu", label: "User" }
61
- }, I = {
62
+ }, T = {
62
63
  menuButton: { action: "close-Mobile-menu", label: "Mobile" }
63
64
  };
64
- function s(e) {
65
- const n = L[e];
65
+ function f(e) {
66
+ const n = I[e];
66
67
  n && o("TopNav", n.action, n.label);
67
68
  }
68
- function m(e) {
69
- const n = I[e];
69
+ function d(e) {
70
+ const n = T[e];
70
71
  n && o("TopNav", n.action, n.label);
71
72
  }
72
- function T(e, n, c = null, f = null) {
73
- navigator.maxTouchPoints || (a.value !== e && s(e), a.value = e, l("item-hover", e, n, c, f));
73
+ function C(e, n, c = null, s = null) {
74
+ navigator.maxTouchPoints || (a.value !== e && f(e), a.value = e, l("item-hover", e, n, c, s));
74
75
  }
75
- function C(e) {
76
- navigator.maxTouchPoints || a.value === e && (m(e), a.value = null, l("item-hover"));
76
+ function S(e) {
77
+ navigator.maxTouchPoints || a.value === e && (d(e), a.value = null, l("item-hover"));
77
78
  }
78
- function S(e, n, c = null, f = null) {
79
- a.value === e ? (m(e), a.value = null, l("item-hover")) : (s(e), a.value = e, l("item-hover", e, n, c, f));
79
+ function A(e, n, c = null, s = null) {
80
+ a.value === e ? (d(e), a.value = null, l("item-hover")) : (f(e), a.value = e, l("item-hover", e, n, c, s));
80
81
  }
81
82
  function N(e) {
82
83
  e.target === e.currentTarget && l("item-hover");
@@ -87,43 +88,45 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
87
88
  function U(e) {
88
89
  o("TopNav", "click-Log-in"), l("login-click", e);
89
90
  }
90
- function A() {
91
+ function O() {
91
92
  o("TopNav", "click-Basket");
92
93
  }
93
- function O() {
94
+ function w() {
94
95
  o("TopNav", "click-Support-Kiva");
95
96
  }
96
- function w() {
97
+ function P() {
97
98
  o("TopNav", "click-Logo");
98
99
  }
99
100
  return {
100
- mdiMenu: R,
101
- mdiChevronDown: x,
102
- mdiBriefcase: D,
101
+ mdiMenu: $,
102
+ mdiChevronDown: R,
103
+ mdiBriefcase: x,
104
+ mdiAccountCircle: E,
103
105
  KvLendMenu: v,
104
106
  AboutMenu: g,
105
- MyKivaMenu: Y,
106
- MobileMenu: q,
107
+ MyKivaMenu: z,
108
+ MobileMenu: J,
107
109
  avatarMenu: u,
108
110
  getAvatarMenuPosition: p,
109
111
  getAvatarTriggerCenterX: b,
110
112
  visiblePrimaryLinks: k,
111
113
  lendUrl: h,
112
114
  formattedBalance: y,
113
- lendOpenItem: M,
114
- aboutOpenItem: B,
115
- handleOnHover: T,
116
- handleMouseOut: C,
117
- handleTouchStart: S,
115
+ avatarMode: M,
116
+ lendOpenItem: B,
117
+ aboutOpenItem: L,
118
+ handleOnHover: C,
119
+ handleMouseOut: S,
120
+ handleTouchStart: A,
118
121
  handleEmptySpaceClick: N,
119
122
  onPrimaryClick: K,
120
123
  onLoginClick: U,
121
- onBasketClick: A,
122
- onSupportKivaClick: O,
123
- onLogoClick: w
124
+ onBasketClick: O,
125
+ onSupportKivaClick: w,
126
+ onLogoClick: P
124
127
  };
125
128
  }
126
129
  };
127
130
  export {
128
- ie as default
131
+ ue as default
129
132
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "8.28.0",
3
+ "version": "8.29.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -113,5 +113,5 @@
113
113
  "dependencies": {
114
114
  "fuse.js": "^7.1.0"
115
115
  },
116
- "gitHead": "88c9f72fd0eacc5c167b9697bda2527c073d7356"
116
+ "gitHead": "4019cd735446715586ea04ca6b5f5f682ccb2841"
117
117
  }