@kiva/kv-components 6.53.0 → 6.54.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.
package/dist/index.js CHANGED
@@ -5,18 +5,18 @@ import { default as d } from "./vue/KvButton.js";
5
5
  import { default as p } from "./vue/KvCardFrame.js";
6
6
  import { default as x } from "./vue/KvCarousel.js";
7
7
  import { default as n } from "./vue/KvCartModal.js";
8
- import { default as A } from "./vue/KvCartPill.js";
8
+ import { default as i } from "./vue/KvCartPill.js";
9
9
  import { default as C } from "./vue/KvCheckbox.js";
10
10
  import { default as L } from "./vue/KvCheckoutReceipt.js";
11
11
  import { default as T } from "./vue/KvChip.js";
12
12
  import { KV_CLASSIC_LOAN_CARD_FRAGMENT as E, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as R, default as M } from "./vue/KvClassicLoanCard.js";
13
- import { default as S } from "./vue/KvCommentsAdd.js";
14
- import { default as P } from "./vue/KvCommentsContainer.js";
13
+ import { default as I } from "./vue/KvCommentsAdd.js";
14
+ import { default as g } from "./vue/KvCommentsContainer.js";
15
15
  import { default as G } from "./vue/KvCommentsHeartButton.js";
16
16
  import { default as F } from "./vue/KvCommentsList.js";
17
17
  import { default as D } from "./vue/KvCommentsListItem.js";
18
18
  import { default as B } from "./vue/KvCommentsReplyButton.js";
19
- import { default as b } from "./vue/KvContentfulImg.js";
19
+ import { default as U } from "./vue/KvContentfulImg.js";
20
20
  import { default as w } from "./vue/KvCountdownTimer.js";
21
21
  import { default as H } from "./vue/KvDatePicker.js";
22
22
  import { default as z } from "./vue/KvExpandable.js";
@@ -29,17 +29,17 @@ import { default as ae } from "./vue/KvInlineActivityCard.js";
29
29
  import { default as le } from "./vue/KvInlineActivityFeed.js";
30
30
  import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as de, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as me, default as pe } from "./vue/KvIntroductionLoanCard.js";
31
31
  import { default as xe } from "./vue/KvLendAmountButton.js";
32
- import { KV_LEND_CTA_FRAGMENT as ne, KV_LEND_CTA_USER_FRAGMENT as ve, default as Ae } from "./vue/KvLendCta.js";
32
+ import { KV_LEND_CTA_FRAGMENT as ne, KV_LEND_CTA_USER_FRAGMENT as ve, default as ie } from "./vue/KvLendCta.js";
33
33
  import { default as Ce } from "./vue/KvLightbox.js";
34
34
  import { default as Le } from "./vue/KvLineGraph.js";
35
35
  import { KV_LOAN_ACTIVITIES_FRAGMENT as Te, default as ce } from "./vue/KvLoanActivities.js";
36
36
  import { KV_LOAN_BOOKMARK_FRAGMENT as Re, default as Me } from "./vue/KvLoanBookmark.js";
37
- import { default as Se } from "./vue/KvLoanCallouts.js";
38
- import { default as Pe } from "./vue/KvLoanProgressGroup.js";
37
+ import { default as Ie } from "./vue/KvLoanCallouts.js";
38
+ import { default as ge } from "./vue/KvLoanProgressGroup.js";
39
39
  import { KV_LOAN_TAG_FRAGMENT as Ge, default as he } from "./vue/KvLoanTag.js";
40
40
  import { default as Ve } from "./vue/KvLoanTeamPick.js";
41
41
  import { KV_LOAN_USE_FRAGMENT as ke, default as Be } from "./vue/KvLoanUse.js";
42
- import { default as be } from "./vue/KvLoadingPlaceholder.js";
42
+ import { default as Ue } from "./vue/KvLoadingPlaceholder.js";
43
43
  import { default as we } from "./vue/KvLoadingSpinner.js";
44
44
  import { default as He } from "./vue/KvMap.js";
45
45
  import { default as ze } from "./vue/KvMaterialIcon.js";
@@ -54,19 +54,19 @@ import { default as mo } from "./vue/KvRadio.js";
54
54
  import { default as uo } from "./vue/KvSelect.js";
55
55
  import { default as Ko } from "./vue/KvSideSheet.js";
56
56
  import { default as vo } from "./vue/KvSwitch.js";
57
- import { default as io } from "./vue/KvTab.js";
57
+ import { default as Ao } from "./vue/KvTab.js";
58
58
  import { default as _o } from "./vue/KvTabPanel.js";
59
59
  import { default as No } from "./vue/KvTabs.js";
60
60
  import { default as co } from "./vue/KvTextInput.js";
61
61
  import { default as Ro } from "./vue/KvTextLink.js";
62
62
  import { default as Oo } from "./vue/KvThemeProvider.js";
63
- import { default as Io } from "./vue/KvToast.js";
64
- import { default as go } from "./vue/KvTooltip.js";
63
+ import { default as So } from "./vue/KvToast.js";
64
+ import { default as Po } from "./vue/KvTooltip.js";
65
65
  import { default as ho } from "./vue/KvTreeMapChart.js";
66
66
  import { default as Vo } from "./vue/KvUserAvatar.js";
67
67
  import { default as ko } from "./vue/KvUtilityMenu.js";
68
68
  import { default as yo } from "./vue/KvVerticalCarousel.js";
69
- import { default as Uo } from "./vue/KvVotingCard.js";
69
+ import { default as bo } from "./vue/KvVotingCard.js";
70
70
  import { default as Wo } from "./vue/KvVotingCardV2.js";
71
71
  import { KV_WIDE_LOAN_CARD_FRAGMENT as jo, KV_WIDE_LOAN_CARD_USER_FRAGMENT as zo, default as Qo } from "./vue/KvWideLoanCard.js";
72
72
  import { default as Jo } from "./vue/KvAtbModal.js";
@@ -76,22 +76,22 @@ import { default as ot, Mash as tt } from "./utils/Alea.js";
76
76
  import { useAttrs as at } from "./utils/attrs.js";
77
77
  import { carouselUtil as lt } from "./utils/carousels.js";
78
78
  import { collapse as dt, expand as mt } from "./utils/expander.js";
79
- import { isLegacyPlaceholderAvatar as ut, randomizedUserAvatarClass as xt } from "./utils/imageUtils.js";
80
- import { LOAN_CALLOUTS_FRAGMENT as nt, LOAN_GEOCODE_FRAGMENT as vt, LOAN_PROGRESS_FRAGMENT as At, loanCardComputedProperties as it, loanCardMethods as Ct } from "./utils/loanCard.js";
81
- import { BALANCE_CAMPAIGN as Lt, BASE_CAMPAIGN as Nt, ERL_COOKIE_NAME as Tt, NO_BALANCE_CAMPAIGN as ct, TOP_UP_CAMPAIGN as Et, getDropdownPriceArray as Rt, getLendCtaSelectedOption as Mt, isBetween25And50 as Ot, isLessThan25 as St } from "./utils/loanUtils.js";
82
- import { animationCoordinator as Pt, generateMapMarkers as gt, getCoordinatesBetween as Gt, getCountryColor as ht, getLoansIntervals as Ft } from "./utils/mapUtils.js";
83
- import { lockPrintSingleEl as Dt, unlockPrintSingleEl as kt } from "./utils/printing.js";
84
- import { lockScroll as yt, lockScrollSmallOnly as bt, unlockScroll as Ut, unlockScrollSmallOnly as wt } from "./utils/scrollLock.js";
85
- import { buildTailwindClassName as Ht, headerNumberCase as jt, kebabCase as zt, removeObjectProperty as Qt } from "./utils/themeUtils.js";
86
- import { throttle as Jt } from "./utils/throttle.js";
87
- import { isTargetElement as Yt, offBodyTouchstart as Zt, onBodyTouchstart as $t } from "./utils/touchEvents.js";
88
- import { getTreemap as or } from "./utils/treemap.js";
89
- import { KvBlueskyIcon as rr } from "./assets/icons/bluesky.js";
79
+ import { getKivaImageUrl as ut, isLegacyPlaceholderAvatar as xt, randomizedUserAvatarClass as Kt } from "./utils/imageUtils.js";
80
+ import { LOAN_CALLOUTS_FRAGMENT as vt, LOAN_GEOCODE_FRAGMENT as it, LOAN_PROGRESS_FRAGMENT as At, loanCardComputedProperties as Ct, loanCardMethods as _t } from "./utils/loanCard.js";
81
+ import { BALANCE_CAMPAIGN as Nt, BASE_CAMPAIGN as Tt, ERL_COOKIE_NAME as ct, NO_BALANCE_CAMPAIGN as Et, TOP_UP_CAMPAIGN as Rt, getDropdownPriceArray as Mt, getLendCtaSelectedOption as Ot, isBetween25And50 as It, isLessThan25 as St } from "./utils/loanUtils.js";
82
+ import { animationCoordinator as Pt, generateMapMarkers as Gt, getCoordinatesBetween as ht, getCountryColor as Ft, getLoansIntervals as Vt } from "./utils/mapUtils.js";
83
+ import { lockPrintSingleEl as kt, unlockPrintSingleEl as Bt } from "./utils/printing.js";
84
+ import { lockScroll as Ut, lockScrollSmallOnly as bt, unlockScroll as wt, unlockScrollSmallOnly as Wt } from "./utils/scrollLock.js";
85
+ import { buildTailwindClassName as jt, headerNumberCase as zt, kebabCase as Qt, removeObjectProperty as qt } from "./utils/themeUtils.js";
86
+ import { throttle as Xt } from "./utils/throttle.js";
87
+ import { isTargetElement as Zt, offBodyTouchstart as $t, onBodyTouchstart as er } from "./utils/touchEvents.js";
88
+ import { getTreemap as tr } from "./utils/treemap.js";
89
+ import { KvBlueskyIcon as ar } from "./assets/icons/bluesky.js";
90
90
  export {
91
91
  ot as Alea,
92
- Lt as BALANCE_CAMPAIGN,
93
- Nt as BASE_CAMPAIGN,
94
- Tt as ERL_COOKIE_NAME,
92
+ Nt as BALANCE_CAMPAIGN,
93
+ Tt as BASE_CAMPAIGN,
94
+ ct as ERL_COOKIE_NAME,
95
95
  E as KV_CLASSIC_LOAN_CARD_FRAGMENT,
96
96
  R as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
97
97
  de as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
@@ -107,24 +107,24 @@ export {
107
107
  t as KvAccordionItem,
108
108
  a as KvActivityRow,
109
109
  Jo as KvAtbModal,
110
- rr as KvBlueskyIcon,
110
+ ar as KvBlueskyIcon,
111
111
  l as KvBorrowerImage,
112
112
  d as KvButton,
113
113
  p as KvCardFrame,
114
114
  x as KvCarousel,
115
115
  n as KvCartModal,
116
- A as KvCartPill,
116
+ i as KvCartPill,
117
117
  C as KvCheckbox,
118
118
  L as KvCheckoutReceipt,
119
119
  T as KvChip,
120
120
  M as KvClassicLoanCard,
121
- S as KvCommentsAdd,
122
- P as KvCommentsContainer,
121
+ I as KvCommentsAdd,
122
+ g as KvCommentsContainer,
123
123
  G as KvCommentsHeartButton,
124
124
  F as KvCommentsList,
125
125
  D as KvCommentsListItem,
126
126
  B as KvCommentsReplyButton,
127
- b as KvContentfulImg,
127
+ U as KvContentfulImg,
128
128
  w as KvCountdownTimer,
129
129
  H as KvDatePicker,
130
130
  z as KvExpandable,
@@ -137,15 +137,15 @@ export {
137
137
  le as KvInlineActivityFeed,
138
138
  pe as KvIntroductionLoanCard,
139
139
  xe as KvLendAmountButton,
140
- Ae as KvLendCta,
140
+ ie as KvLendCta,
141
141
  Ce as KvLightbox,
142
142
  Le as KvLineGraph,
143
- be as KvLoadingPlaceholder,
143
+ Ue as KvLoadingPlaceholder,
144
144
  we as KvLoadingSpinner,
145
145
  ce as KvLoanActivities,
146
146
  Me as KvLoanBookmark,
147
- Se as KvLoanCallouts,
148
- Pe as KvLoanProgressGroup,
147
+ Ie as KvLoanCallouts,
148
+ ge as KvLoanProgressGroup,
149
149
  he as KvLoanTag,
150
150
  Ve as KvLoanTeamPick,
151
151
  Be as KvLoanUse,
@@ -163,58 +163,59 @@ export {
163
163
  uo as KvSelect,
164
164
  Ko as KvSideSheet,
165
165
  vo as KvSwitch,
166
- io as KvTab,
166
+ Ao as KvTab,
167
167
  _o as KvTabPanel,
168
168
  No as KvTabs,
169
169
  co as KvTextInput,
170
170
  Ro as KvTextLink,
171
171
  Oo as KvThemeProvider,
172
- Io as KvToast,
173
- go as KvTooltip,
172
+ So as KvToast,
173
+ Po as KvTooltip,
174
174
  ho as KvTreeMapChart,
175
175
  Vo as KvUserAvatar,
176
176
  ko as KvUtilityMenu,
177
177
  yo as KvVerticalCarousel,
178
- Uo as KvVotingCard,
178
+ bo as KvVotingCard,
179
179
  Wo as KvVotingCardV2,
180
180
  Qo as KvWideLoanCard,
181
181
  $o as KvWwwHeader,
182
- nt as LOAN_CALLOUTS_FRAGMENT,
183
- vt as LOAN_GEOCODE_FRAGMENT,
182
+ vt as LOAN_CALLOUTS_FRAGMENT,
183
+ it as LOAN_GEOCODE_FRAGMENT,
184
184
  At as LOAN_PROGRESS_FRAGMENT,
185
185
  tt as Mash,
186
- ct as NO_BALANCE_CAMPAIGN,
187
- Et as TOP_UP_CAMPAIGN,
186
+ Et as NO_BALANCE_CAMPAIGN,
187
+ Rt as TOP_UP_CAMPAIGN,
188
188
  Pt as animationCoordinator,
189
- Ht as buildTailwindClassName,
189
+ jt as buildTailwindClassName,
190
190
  lt as carouselUtil,
191
191
  dt as collapse,
192
192
  mt as expand,
193
- gt as generateMapMarkers,
194
- Gt as getCoordinatesBetween,
195
- ht as getCountryColor,
196
- Rt as getDropdownPriceArray,
197
- Mt as getLendCtaSelectedOption,
198
- Ft as getLoansIntervals,
199
- or as getTreemap,
200
- jt as headerNumberCase,
201
- Ot as isBetween25And50,
202
- ut as isLegacyPlaceholderAvatar,
193
+ Gt as generateMapMarkers,
194
+ ht as getCoordinatesBetween,
195
+ Ft as getCountryColor,
196
+ Mt as getDropdownPriceArray,
197
+ ut as getKivaImageUrl,
198
+ Ot as getLendCtaSelectedOption,
199
+ Vt as getLoansIntervals,
200
+ tr as getTreemap,
201
+ zt as headerNumberCase,
202
+ It as isBetween25And50,
203
+ xt as isLegacyPlaceholderAvatar,
203
204
  St as isLessThan25,
204
- Yt as isTargetElement,
205
- zt as kebabCase,
206
- it as loanCardComputedProperties,
207
- Ct as loanCardMethods,
208
- Dt as lockPrintSingleEl,
209
- yt as lockScroll,
205
+ Zt as isTargetElement,
206
+ Qt as kebabCase,
207
+ Ct as loanCardComputedProperties,
208
+ _t as loanCardMethods,
209
+ kt as lockPrintSingleEl,
210
+ Ut as lockScroll,
210
211
  bt as lockScrollSmallOnly,
211
- Zt as offBodyTouchstart,
212
- $t as onBodyTouchstart,
213
- xt as randomizedUserAvatarClass,
214
- Qt as removeObjectProperty,
215
- Jt as throttle,
216
- kt as unlockPrintSingleEl,
217
- Ut as unlockScroll,
218
- wt as unlockScrollSmallOnly,
212
+ $t as offBodyTouchstart,
213
+ er as onBodyTouchstart,
214
+ Kt as randomizedUserAvatarClass,
215
+ qt as removeObjectProperty,
216
+ Xt as throttle,
217
+ Bt as unlockPrintSingleEl,
218
+ wt as unlockScroll,
219
+ Wt as unlockScrollSmallOnly,
219
220
  at as useAttrs
220
221
  };
@@ -1,12 +1,12 @@
1
- import a from "./Alea.js";
2
- function c(o) {
1
+ import s from "./Alea.js";
2
+ function w(o) {
3
3
  if (!o)
4
4
  return !1;
5
5
  let t = o.toString();
6
6
  return t.includes(".") && ([t] = t.split(".")), ["726677", "315726", "4d844ac2c0b77a8a522741b908ea5c32"].includes(t);
7
7
  }
8
- function l(o = "") {
9
- const t = new a(o), e = [
8
+ function $(o = "") {
9
+ const t = new s(o), e = [
10
10
  { color: "tw-text-action", bg: "tw-bg-brand-100" },
11
11
  { color: "tw-text-black", bg: "tw-bg-brand-100" },
12
12
  { color: "tw-text-white", bg: "tw-bg-action" },
@@ -17,7 +17,24 @@ function l(o = "") {
17
17
  ], r = e[Math.floor(t() * e.length)];
18
18
  return `${r.color} ${r.bg}`;
19
19
  }
20
+ function d({
21
+ base: o = "/img/",
22
+ width: t,
23
+ height: e,
24
+ square: r,
25
+ faceZoom: l,
26
+ hash: n,
27
+ format: b = "jpg"
28
+ }) {
29
+ if (!n || !t && !e && !r && !l)
30
+ return "";
31
+ let c = "", a = "";
32
+ t && e && t === e ? r = t : (c = t ? `w${Math.ceil(t)}` : "", a = e ? `h${Math.ceil(e)}` : "");
33
+ const i = r ? `s${Math.ceil(r)}` : "", g = l && (t || e || r) ? `fz${Math.ceil(l)}` : "";
34
+ return `${o}${c}${a}${i}${g}/${n}.${b}`;
35
+ }
20
36
  export {
21
- c as isLegacyPlaceholderAvatar,
22
- l as randomizedUserAvatarClass
37
+ d as getKivaImageUrl,
38
+ w as isLegacyPlaceholderAvatar,
39
+ $ as randomizedUserAvatarClass
23
40
  };
@@ -1,6 +1,7 @@
1
- import { openBlock as c, createElementBlock as h, normalizeStyle as m, createElementVNode as f, createCommentVNode as d } from "vue";
2
- import p from "../_virtual/_plugin-vue_export-helper.js";
3
- const $ = {
1
+ import { getKivaImageUrl as n } from "../utils/imageUtils.js";
2
+ import { openBlock as h, createElementBlock as l, normalizeStyle as o, createElementVNode as c, createCommentVNode as u } from "vue";
3
+ import m from "../_virtual/_plugin-vue_export-helper.js";
4
+ const g = {
4
5
  name: "KvBorrowerImage",
5
6
  props: {
6
7
  /**
@@ -72,39 +73,23 @@ const $ = {
72
73
  // Get the 'srcset' string for the source element
73
74
  srcset() {
74
75
  return this.hash ? this.images.map(({ width: t, faceZoom: e }) => {
75
- const r = t * this.aspectRatio, s = {
76
+ const r = t * this.aspectRatio, a = {
76
77
  width: t,
77
78
  height: r,
78
79
  faceZoom: e
79
- }, a = {
80
+ }, i = {
80
81
  width: t * 2,
81
82
  height: r * 2,
82
83
  faceZoom: e
83
84
  };
84
- return `${this.getSrcsetDef(s)}, ${this.getSrcsetDef(a)}`;
85
+ return `${this.getSrcsetDef(a)}, ${this.getSrcsetDef(i)}`;
85
86
  }).join(", ") : "";
86
87
  }
87
88
  },
88
89
  methods: {
89
- getKivaImageUrl({
90
- base: t = "/",
91
- width: e,
92
- height: r,
93
- square: s,
94
- faceZoom: a,
95
- hash: i,
96
- format: u = "jpg"
97
- } = {}) {
98
- if (!i || !e && !r && !s && !a)
99
- return "";
100
- let l = "", n = "";
101
- e === r ? s = e : (l = e ? `w${Math.ceil(e)}` : "", n = r ? `h${Math.ceil(r)}` : "");
102
- const o = s ? `s${Math.ceil(s)}` : "", g = a ? `fz${Math.ceil(a)}` : "";
103
- return `${t}${l}${n}${o}${g}/${i}.${u}`;
104
- },
105
90
  // Get the url for the loan image sized width by height
106
91
  getImgUrl(t) {
107
- return this.getKivaImageUrl({
92
+ return n({
108
93
  ...t,
109
94
  base: this.photoPath,
110
95
  hash: this.hash
@@ -115,26 +100,26 @@ const $ = {
115
100
  return `${this.getImgUrl(t)} ${t.width}w`;
116
101
  }
117
102
  }
118
- }, w = ["srcset", "sizes"], _ = ["src", "alt"];
119
- function y(t, e, r, s, a, i) {
120
- return c(), h("picture", {
103
+ }, d = ["srcset", "sizes"], f = ["src", "alt"];
104
+ function p(t, e, r, a, i, s) {
105
+ return h(), l("picture", {
121
106
  class: "tw-inline-block tw-relative tw-overflow-hidden tw-w-full tw-bg-black",
122
- style: m(`padding-bottom: ${r.aspectRatio * 100}%;`)
107
+ style: o(`padding-bottom: ${r.aspectRatio * 100}%;`)
123
108
  }, [
124
- f("source", {
125
- srcset: i.srcset,
126
- sizes: i.sizes
127
- }, null, 8, w),
128
- r.hash ? (c(), h("img", {
109
+ c("source", {
110
+ srcset: s.srcset,
111
+ sizes: s.sizes
112
+ }, null, 8, d),
113
+ r.hash ? (h(), l("img", {
129
114
  key: 0,
130
115
  class: "tw-absolute tw-w-full tw-h-full tw-object-contain",
131
- src: i.defaultUrl,
116
+ src: s.defaultUrl,
132
117
  alt: r.alt,
133
118
  loading: "lazy"
134
- }, null, 8, _)) : d("", !0)
119
+ }, null, 8, f)) : u("", !0)
135
120
  ], 4);
136
121
  }
137
- const z = /* @__PURE__ */ p($, [["render", y]]);
122
+ const b = /* @__PURE__ */ m(g, [["render", p]]);
138
123
  export {
139
- z as default
124
+ b as default
140
125
  };
@@ -1 +1 @@
1
- .header-link[data-v-6728d6d1]{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-6728d6d1]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
1
+ .header-link[data-v-69cf3729]{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-69cf3729]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
@@ -1,17 +1,18 @@
1
- import { defineAsyncComponent as k, ref as r, computed as j, onMounted as q, onUnmounted as G, resolveComponent as h, resolveDirective as J, openBlock as i, createElementBlock as m, withDirectives as s, normalizeClass as p, createVNode as D, createBlock as w, withCtx as L, createTextVNode as M, createElementVNode as C, createCommentVNode as y, vShow as Q, toDisplayString as X, Fragment as Y } from "vue";
2
- import { mdiAccountCircle as Z, mdiChevronDown as $, mdiMagnify as ee, mdiMenu as ne } from "@mdi/js";
3
- import te from "numeral";
4
- import oe from "../KvMaterialIcon.js";
5
- import le from "../KvIconBag.js";
1
+ import { defineAsyncComponent as k, ref as a, computed as D, onMounted as G, onUnmounted as J, resolveComponent as h, resolveDirective as Q, openBlock as r, createElementBlock as s, withDirectives as v, normalizeClass as p, createVNode as C, createBlock as w, withCtx as L, createTextVNode as M, createElementVNode as E, createCommentVNode as y, vShow as X, toDisplayString as Y, Fragment as Z } from "vue";
2
+ import { mdiAccountCircle as $, mdiChevronDown as ee, mdiMagnify as ne, mdiMenu as te } from "@mdi/js";
3
+ import oe from "numeral";
4
+ import le from "../KvMaterialIcon.js";
5
+ import ae from "../KvIconBag.js";
6
6
  import re from "./KvHeaderDropdownLink.js";
7
7
  import ie from "../KvUserAvatar.js";
8
- import { throttle as ae } from "../../utils/throttle.js";
8
+ import { throttle as ue } from "../../utils/throttle.js";
9
+ import { isLegacyPlaceholderAvatar as de } from "../../utils/imageUtils.js";
9
10
  import "./KvHeaderLinkBar.css";
10
- import ue from "../../_virtual/_plugin-vue_export-helper.js";
11
- const de = k(() => import("./KvHeaderMobileMenu.js")), E = k(() => import("./KvHeaderMyKivaMenu.js")), me = k(() => import("./LendMenu/KvLendMenu.js")), se = k(() => import("./KvHeaderTakeActionMenu.js")), ve = k(() => import("./KvHeaderAboutMenu.js")), S = 146, A = "avatar-menu", B = "menuButton", V = { top: "-3.75rem", width: "100%" }, ce = {
11
+ import me from "../../_virtual/_plugin-vue_export-helper.js";
12
+ const se = k(() => import("./KvHeaderMobileMenu.js")), S = k(() => import("./KvHeaderMyKivaMenu.js")), ve = k(() => import("./LendMenu/KvLendMenu.js")), ce = k(() => import("./KvHeaderTakeActionMenu.js")), fe = k(() => import("./KvHeaderAboutMenu.js")), P = 146, A = "avatar-menu", B = "menuButton", V = { top: "-3.75rem", width: "100%" }, we = {
12
13
  components: {
13
- KvMaterialIcon: oe,
14
- KvIconBag: le,
14
+ KvMaterialIcon: le,
15
+ KvIconBag: ae,
15
16
  KvHeaderDropdownLink: re,
16
17
  KvUserAvatar: ie
17
18
  },
@@ -56,205 +57,210 @@ const de = k(() => import("./KvHeaderMobileMenu.js")), E = k(() => import("./KvH
56
57
  emits: [
57
58
  "item-hover"
58
59
  ],
59
- setup(v, { emit: e }) {
60
- const t = r(null), n = r(null), K = r(null), O = r(null), g = r(null), f = r(null), I = r(null), T = r(null), a = r(null), o = r(null), H = r(!1), b = r(), u = (l, d, c = null) => {
61
- e("item-hover", l, d, c);
62
- }, P = (l, d, c = null) => {
63
- navigator.maxTouchPoints || (o.value = l, u(
60
+ setup(u, { emit: n }) {
61
+ const t = a(null), e = a(null), K = a(null), O = a(null), g = a(null), f = a(null), I = a(null), T = a(null), i = a(null), o = a(null), H = a(!1), b = a(), d = (l, m, c = null) => {
62
+ n("item-hover", l, m, c);
63
+ }, R = (l, m, c = null) => {
64
+ navigator.maxTouchPoints || (o.value = l, d(
64
65
  l,
65
- d,
66
- l === B && v.isMobile ? V : c
66
+ m,
67
+ l === B && u.isMobile ? V : c
67
68
  ));
68
- }, R = (l) => {
69
- !H.value && o.value === l && (o.value = null, u());
69
+ }, F = (l) => {
70
+ !H.value && o.value === l && (o.value = null, d());
70
71
  }, z = () => {
71
72
  var N, _;
72
73
  const l = (_ = (N = t.value) == null ? void 0 : N.userAvatar) == null ? void 0 : _.getBoundingClientRect();
73
74
  if (!l) return null;
74
- const c = l.left + l.width / 2 - S / 2;
75
+ const c = l.left + l.width / 2 - P / 2;
75
76
  return {
76
- ...c + S > window.innerWidth ? { right: 0 } : { left: v.isMobile ? 0 : `${c}px` },
77
+ ...c + P > window.innerWidth ? { right: 0 } : { left: u.isMobile ? 0 : `${c}px` },
77
78
  marginTop: "-2px",
78
79
  // Avoid closing avatar menu on header edge
79
- borderRadius: v.isMobile ? "auto" : "0px 0px 8px 8px"
80
+ borderRadius: u.isMobile ? "auto" : "0px 0px 8px 8px"
80
81
  };
81
82
  }, x = () => {
82
- o.value = A, u(t.value, E, z());
83
- }, W = (l, d) => {
84
- b.value = null, H.value = !0, b.value && clearTimeout(b.value), o.value === B && (o.value = null), !o.value || o.value !== l ? (o.value = l, l === A ? x() : l === B && v.isMobile ? u(l, d, V) : u(l, d)) : (o.value = null, u()), b.value = setTimeout(() => {
83
+ o.value = A, d(t.value, S, z());
84
+ }, W = (l, m) => {
85
+ b.value = null, H.value = !0, b.value && clearTimeout(b.value), o.value === B && (o.value = null), !o.value || o.value !== l ? (o.value = l, l === A ? x() : l === B && u.isMobile ? d(l, m, V) : d(l, m)) : (o.value = null, d()), b.value = setTimeout(() => {
85
86
  H.value = !1;
86
87
  }, 500);
87
- }, U = ae(() => {
88
+ }, U = ue(() => {
88
89
  o.value === A && x();
89
- }, 100), F = j(() => v.isMobile ? void 0 : "/lend-by-category");
90
- return q(() => {
90
+ }, 100), j = D(() => u.isMobile ? void 0 : "/lend-by-category"), q = D(() => {
91
+ var l;
92
+ return ((l = u.lenderImageUrl) == null ? void 0 : l.split("/").pop()) ?? "";
93
+ });
94
+ return G(() => {
91
95
  import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", U);
92
- }), G(() => {
96
+ }), J(() => {
93
97
  window.removeEventListener("resize", U);
94
98
  }), {
95
99
  AVATAR_MENU_ID: A,
96
100
  openMenuId: o,
97
- numeral: te,
98
- mdiAccountCircle: Z,
99
- mdiChevronDown: $,
100
- mdiMagnify: ee,
101
- mdiMenu: ne,
102
- onHover: u,
101
+ numeral: oe,
102
+ mdiAccountCircle: $,
103
+ mdiChevronDown: ee,
104
+ mdiMagnify: ne,
105
+ mdiMenu: te,
106
+ onHover: d,
103
107
  avatar: t,
104
- lendButton: n,
108
+ lendButton: e,
105
109
  aboutUsLink: K,
106
110
  partnerWithUsLink: O,
107
111
  borrowLink: g,
108
112
  supportKivaLink: f,
109
113
  basketLink: I,
110
114
  signInLink: T,
111
- menuButton: a,
112
- lendUrl: F,
113
- handleOnHover: P,
115
+ menuButton: i,
116
+ lendUrl: j,
117
+ avatarFilename: q,
118
+ handleOnHover: R,
114
119
  handleTouchStart: W,
115
- handleMouseOut: R,
120
+ handleMouseOut: F,
116
121
  handleAvatarMenuPosition: x,
117
- KvHeaderMobileMenu: de,
118
- KvHeaderMyKivaMenu: E,
119
- KvLendMenu: me,
120
- KvHeaderTakeActionMenu: se,
121
- KvHeaderAboutMenu: ve
122
+ KvHeaderMobileMenu: se,
123
+ KvHeaderMyKivaMenu: S,
124
+ KvLendMenu: ve,
125
+ KvHeaderTakeActionMenu: ce,
126
+ KvHeaderAboutMenu: fe,
127
+ isLegacyPlaceholderAvatar: de
122
128
  };
123
129
  }
124
- }, fe = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-1.5 lg:tw-gap-2.5" }, we = ["href"], Me = {
130
+ }, Me = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-1.5 lg:tw-gap-2.5" }, ke = ["href"], ge = {
125
131
  key: 0,
126
132
  class: "tw-bg-eco-green-1 tw-py-0.5 tw-px-1 tw-text-eco-green-4"
127
- }, ke = ["href"];
128
- function ge(v, e, t, n, K, O) {
129
- const g = h("kv-material-icon"), f = h("KvHeaderDropdownLink"), I = h("kv-icon-bag"), T = h("KvUserAvatar"), a = J("kv-track-event");
130
- return i(), m("div", fe, [
131
- s((i(), m("button", {
133
+ }, be = ["href"];
134
+ function he(u, n, t, e, K, O) {
135
+ const g = h("kv-material-icon"), f = h("KvHeaderDropdownLink"), I = h("kv-icon-bag"), T = h("KvUserAvatar"), i = Q("kv-track-event");
136
+ return r(), s("div", Me, [
137
+ v((r(), s("button", {
132
138
  ref: "menuButton",
133
139
  class: p(["header-link tw-inline-flex md:tw-hidden", {
134
- "tw-text-tertiary": t.openMenuItem && t.openMenuItem !== n.KvHeaderMobileMenu
140
+ "tw-text-tertiary": t.openMenuItem && t.openMenuItem !== e.KvHeaderMobileMenu
135
141
  }]),
136
- onMouseover: e[0] || (e[0] = (o) => n.handleOnHover("menuButton", n.KvHeaderMobileMenu)),
137
- onMouseout: e[1] || (e[1] = (o) => n.handleMouseOut("menuButton")),
138
- onTouchstart: e[2] || (e[2] = (o) => n.handleTouchStart("menuButton", n.KvHeaderMobileMenu))
142
+ onMouseover: n[0] || (n[0] = (o) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
143
+ onMouseout: n[1] || (n[1] = (o) => e.handleMouseOut("menuButton")),
144
+ onTouchstart: n[2] || (n[2] = (o) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu))
139
145
  }, [
140
- D(g, { icon: n.mdiMenu }, null, 8, ["icon"])
146
+ C(g, { icon: e.mdiMenu }, null, 8, ["icon"])
141
147
  ], 34)), [
142
- [a, t.openMenuItem === n.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
148
+ [i, t.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
143
149
  ]),
144
- s((i(), w(f, {
150
+ v((r(), w(f, {
145
151
  class: "tw-py-1",
146
152
  "ref-name": "lendButton",
147
- href: n.lendUrl,
148
- "menu-component": n.KvLendMenu,
153
+ href: e.lendUrl,
154
+ "menu-component": e.KvLendMenu,
149
155
  "open-menu-item": t.openMenuItem,
150
- "dropdown-icon": n.mdiChevronDown,
156
+ "dropdown-icon": e.mdiChevronDown,
151
157
  "base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-1",
152
- onOnHover: n.handleOnHover,
153
- onMouseout: e[3] || (e[3] = (o) => n.handleMouseOut("lendButton")),
154
- onTouchstart: e[4] || (e[4] = (o) => n.handleTouchStart("lendButton", n.KvLendMenu))
158
+ onOnHover: e.handleOnHover,
159
+ onMouseout: n[3] || (n[3] = (o) => e.handleMouseOut("lendButton")),
160
+ onTouchstart: n[4] || (n[4] = (o) => e.handleTouchStart("lendButton", e.KvLendMenu))
155
161
  }, {
156
- default: L(() => e[10] || (e[10] = [
162
+ default: L(() => n[10] || (n[10] = [
157
163
  M(" Lend ")
158
164
  ])),
159
165
  _: 1
160
166
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
161
- [a, ["TopNav", "click-Lend"]]
167
+ [i, ["TopNav", "click-Lend"]]
162
168
  ]),
163
- s((i(), w(f, {
169
+ v((r(), w(f, {
164
170
  "ref-name": "takeActionButton",
165
171
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
166
- "menu-component": n.KvHeaderTakeActionMenu,
172
+ "menu-component": e.KvHeaderTakeActionMenu,
167
173
  "open-menu-item": t.openMenuItem,
168
- "dropdown-icon": n.mdiChevronDown,
174
+ "dropdown-icon": e.mdiChevronDown,
169
175
  "send-link-position": "",
170
- onOnHover: n.handleOnHover,
171
- onMouseout: e[5] || (e[5] = (o) => n.handleMouseOut("takeActionButton"))
176
+ onOnHover: e.handleOnHover,
177
+ onMouseout: n[5] || (n[5] = (o) => e.handleMouseOut("takeActionButton"))
172
178
  }, {
173
- default: L(() => e[11] || (e[11] = [
179
+ default: L(() => n[11] || (n[11] = [
174
180
  M(" Take action ")
175
181
  ])),
176
182
  _: 1
177
183
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
178
- [a, ["TopNav", "click-TakeAction"]]
184
+ [i, ["TopNav", "click-TakeAction"]]
179
185
  ]),
180
- s((i(), w(f, {
186
+ v((r(), w(f, {
181
187
  "ref-name": "aboutUsLink",
182
188
  "data-testid": "header-about",
183
189
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
184
- "menu-component": n.KvHeaderAboutMenu,
190
+ "menu-component": e.KvHeaderAboutMenu,
185
191
  "open-menu-item": t.openMenuItem,
186
- "dropdown-icon": n.mdiChevronDown,
192
+ "dropdown-icon": e.mdiChevronDown,
187
193
  "send-link-position": "",
188
- onOnHover: n.handleOnHover,
189
- onMouseout: e[6] || (e[6] = (o) => n.handleMouseOut("aboutUsLink"))
194
+ onOnHover: e.handleOnHover,
195
+ onMouseout: n[6] || (n[6] = (o) => e.handleMouseOut("aboutUsLink"))
190
196
  }, {
191
- default: L(() => e[12] || (e[12] = [
197
+ default: L(() => n[12] || (n[12] = [
192
198
  M(" About ")
193
199
  ])),
194
200
  _: 1
195
201
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
196
- [a, ["TopNav", "click-About"]]
202
+ [i, ["TopNav", "click-About"]]
197
203
  ]),
198
- e[15] || (e[15] = C("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
199
- t.loggedIn ? s((i(), m("a", {
204
+ n[15] || (n[15] = E("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
205
+ t.loggedIn ? v((r(), s("a", {
200
206
  key: 0,
201
207
  ref: "dashboardLink",
202
208
  href: t.myDashboardUrl,
203
209
  class: p(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!t.openMenuItem }])
204
- }, e[13] || (e[13] = [
210
+ }, n[13] || (n[13] = [
205
211
  M(" My dashboard ")
206
- ]), 10, we)), [
207
- [a, ["TopNav", "click-Dashboard"]]
212
+ ]), 10, ke)), [
213
+ [i, ["TopNav", "click-Dashboard"]]
208
214
  ]) : y("", !0),
209
- s((i(), m("a", {
215
+ v((r(), s("a", {
210
216
  ref: "basketLink",
211
217
  href: "/basket",
212
218
  class: p(["header-link tw-relative md:!tw-mr-0", { "tw-text-tertiary": !!t.openMenuItem }]),
213
219
  style: { "margin-right": "2px" },
214
220
  "data-testid": "header-basket"
215
221
  }, [
216
- D(I, {
222
+ C(I, {
217
223
  class: "tw-w-3 tw-h-3 tw-pointer-events-none",
218
224
  count: t.basketCount
219
225
  }, null, 8, ["count"])
220
226
  ], 2)), [
221
- [Q, t.basketCount > 0],
222
- [a, ["TopNav", "click-Basket"]]
227
+ [X, t.basketCount > 0],
228
+ [i, ["TopNav", "click-Basket"]]
223
229
  ]),
224
- C("div", {
230
+ E("div", {
225
231
  class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-py-1.5",
226
- onMouseover: e[7] || (e[7] = (...o) => n.handleAvatarMenuPosition && n.handleAvatarMenuPosition(...o)),
227
- onMouseout: e[8] || (e[8] = (o) => n.handleMouseOut(n.AVATAR_MENU_ID)),
228
- onTouchstart: e[9] || (e[9] = (o) => n.handleTouchStart(n.AVATAR_MENU_ID))
232
+ onMouseover: n[7] || (n[7] = (...o) => e.handleAvatarMenuPosition && e.handleAvatarMenuPosition(...o)),
233
+ onMouseout: n[8] || (n[8] = (o) => e.handleMouseOut(e.AVATAR_MENU_ID)),
234
+ onTouchstart: n[9] || (n[9] = (o) => e.handleTouchStart(e.AVATAR_MENU_ID))
229
235
  }, [
230
- t.loggedIn ? (i(), m("span", Me, X(n.numeral(t.balance).format("$0")), 1)) : y("", !0),
231
- t.loggedIn ? (i(), m(Y, { key: 1 }, [
232
- t.lenderImageUrl ? (i(), w(T, {
236
+ t.loggedIn ? (r(), s("span", ge, Y(e.numeral(t.balance).format("$0")), 1)) : y("", !0),
237
+ t.loggedIn ? (r(), s(Z, { key: 1 }, [
238
+ e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (r(), w(g, {
233
239
  key: 0,
240
+ icon: e.mdiAccountCircle,
241
+ class: "tw-w-3"
242
+ }, null, 8, ["icon"])) : (r(), w(T, {
243
+ key: 1,
234
244
  ref: "avatar",
235
245
  "lender-name": t.lenderName,
236
246
  "lender-image-url": t.lenderImageUrl,
237
247
  "is-small": ""
238
- }, null, 8, ["lender-name", "lender-image-url"])) : (i(), w(g, {
239
- key: 1,
240
- icon: n.mdiAccountCircle,
241
- class: "tw-w-3"
242
- }, null, 8, ["icon"]))
248
+ }, null, 8, ["lender-name", "lender-image-url"]))
243
249
  ], 64)) : y("", !0)
244
250
  ], 32),
245
- t.loggedIn ? y("", !0) : s((i(), m("a", {
251
+ t.loggedIn ? y("", !0) : v((r(), s("a", {
246
252
  key: 1,
247
253
  ref: "signInLink",
248
254
  href: t.loginUrl,
249
255
  class: p(["header-link", { "tw-text-tertiary": !!t.openMenuItem }])
250
- }, e[14] || (e[14] = [
256
+ }, n[14] || (n[14] = [
251
257
  M(" Sign in ")
252
- ]), 10, ke)), [
253
- [a, ["TopNav", "click-Sign-in"]]
258
+ ]), 10, be)), [
259
+ [i, ["TopNav", "click-Sign-in"]]
254
260
  ])
255
261
  ]);
256
262
  }
257
- const Ke = /* @__PURE__ */ ue(ce, [["render", ge], ["__scopeId", "data-v-6728d6d1"]]);
263
+ const Ne = /* @__PURE__ */ me(we, [["render", he], ["__scopeId", "data-v-69cf3729"]]);
258
264
  export {
259
- Ke as default
265
+ Ne as default
260
266
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.53.0",
3
+ "version": "6.54.0",
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": "2b9e0fbf9f13fbb0a104e9176adaf18765af5c43"
117
+ "gitHead": "001bbdce60101ebc7c1891606c8011f2822f0753"
118
118
  }