@kiva/kv-components 6.69.2 → 6.69.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.
@@ -1 +1 @@
1
- @media (min-width: 45.875rem){.cart-modal[data-v-5233d12c] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
1
+ @media (min-width: 45.875rem){.cart-modal[data-v-93b3820a] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
@@ -1,4 +1,4 @@
1
- import { toRefs as N, ref as B, computed as C, watch as F, onMounted as O, onUnmounted as z, resolveComponent as E, openBlock as u, createBlock as D, normalizeStyle as G, withCtx as S, createElementBlock as m, createVNode as R, createElementVNode as e, normalizeClass as T, toDisplayString as I, createCommentVNode as b } from "vue";
1
+ import { toRefs as N, ref as B, computed as C, watch as F, onMounted as O, onUnmounted as G, resolveComponent as E, openBlock as u, createBlock as z, normalizeStyle as D, withCtx as S, createElementBlock as m, createVNode as R, createElementVNode as e, normalizeClass as T, toDisplayString as I, createCommentVNode as b } from "vue";
2
2
  import { throttle as U } from "../utils/throttle.js";
3
3
  import Y from "./KvCartModal.js";
4
4
  import W from "./KvCartPill.js";
@@ -117,7 +117,7 @@ const Q = {
117
117
  ],
118
118
  setup(c, { emit: i }) {
119
119
  const {
120
- modalVisible: r,
120
+ modalVisible: n,
121
121
  addedLoan: l,
122
122
  userData: p,
123
123
  hasEverLoggedIn: A,
@@ -129,8 +129,8 @@ const Q = {
129
129
  var t;
130
130
  return ((t = l.value) == null ? void 0 : t.basketSize) ?? 0;
131
131
  }), q = C(() => {
132
- const t = window.innerWidth - k.value - 200, o = `${t > 0 ? t : 0}`, n = `${g.value}`;
133
- return { right: o, top: n };
132
+ const t = window.innerWidth - k.value - 200, o = `${t > 0 ? t : 0}`, a = `${g.value}`;
133
+ return { right: o, top: a };
134
134
  }), d = C(() => {
135
135
  var t;
136
136
  return (t = l.value) == null ? void 0 : t.name;
@@ -138,17 +138,17 @@ const Q = {
138
138
  var t;
139
139
  return !((t = p.value) != null && t.my);
140
140
  }), y = C(() => {
141
- var t, o, n;
142
- return w.value && (_.value && !A.value || !_.value && !((n = (o = (t = p.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && n.totalCount)) && Z.value === 1;
141
+ var t, o, a;
142
+ return w.value && (_.value && !A.value || !_.value && !((a = (o = (t = p.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && a.totalCount)) && Z.value === 1;
143
143
  }), x = C(() => f.value && v.value && !y.value), j = C(() => Object.values(P.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), H = C(() => {
144
- var o, n, s;
144
+ var o, a, s;
145
145
  if (c.isCompletingGoal)
146
146
  return `Supporting ${d.value} meets your annual goal!`;
147
147
  if (c.isLoanGoal)
148
148
  return "You’re closer to reaching your annual goal!";
149
149
  if (y.value) {
150
- const a = `Supporting ${d.value} helps`;
151
- return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (n = l.value) != null && n.themes.includes("Social Enterprise") ? `${a} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${a} him invest in himself.` : `${a} her invest in herself.`;
150
+ const r = `Supporting ${d.value} helps`;
151
+ return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (a = l.value) != null && a.themes.includes("Social Enterprise") ? `${r} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${r} him invest in himself.` : `${r} her invest in herself.`;
152
152
  }
153
153
  if (x.value)
154
154
  return "You’re close to your next achievement!";
@@ -161,16 +161,16 @@ const Q = {
161
161
  o && V(o), i("reset-modal");
162
162
  }, M = () => {
163
163
  const t = document.getElementsByTagName("header")[0], o = (t == null ? void 0 : t.getBoundingClientRect()) ?? null;
164
- let n = [...document.querySelectorAll('[data-testid="header-basket"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight);
165
- s || (n = [...document.querySelectorAll('[data-testid="header-about"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight));
166
- const a = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
167
- a && (a == null ? void 0 : a.right) !== k.value && (k.value = a == null ? void 0 : a.right), o && (o == null ? void 0 : o.bottom) !== g.value && (g.value = o == null ? void 0 : o.bottom);
164
+ let a = [...document.querySelectorAll('[data-testid="header-basket"]')], s = a.find((L) => L == null ? void 0 : L.clientHeight);
165
+ s || (a = [...document.querySelectorAll('[data-testid="header-about"]')], s = a.find((L) => L == null ? void 0 : L.clientHeight));
166
+ const r = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
167
+ r && (r == null ? void 0 : r.right) !== k.value && (k.value = r == null ? void 0 : r.right), o && (o == null ? void 0 : o.bottom) !== g.value && (g.value = o == null ? void 0 : o.bottom);
168
168
  }, h = U(M, 50);
169
- return F(r, () => {
170
- r.value && M();
169
+ return F(n, () => {
170
+ n.value && M();
171
171
  }, { immediate: !0 }), O(() => {
172
172
  M(), window.addEventListener("scroll", h), window.addEventListener("resize", h);
173
- }), z(() => {
173
+ }), G(() => {
174
174
  window.removeEventListener("scroll", h), window.removeEventListener("resize", h);
175
175
  }), {
176
176
  modalPosition: q,
@@ -205,27 +205,27 @@ const Q = {
205
205
  key: 2,
206
206
  class: "tw-text-h5"
207
207
  };
208
- function o1(c, i, r, l, p, A) {
208
+ function o1(c, i, n, l, p, A) {
209
209
  const w = E("KvCartPill"), f = E("KvCartModal");
210
- return r.modalVisible ? (u(), D(f, {
210
+ return n.modalVisible ? (u(), z(f, {
211
211
  key: 0,
212
- style: G({
212
+ style: D({
213
213
  "--modal-right": `${l.modalPosition.right}px`,
214
214
  "--modal-top": `${l.modalPosition.top}px`
215
215
  }),
216
216
  class: "cart-modal !tw-top-0",
217
- visible: r.modalVisible,
218
- "photo-path": r.photoPath,
217
+ visible: n.modalVisible,
218
+ "photo-path": n.photoPath,
219
219
  "basket-count": l.basketCount,
220
- "category-name": r.oneLoanAwayCategory,
220
+ "category-name": n.oneLoanAwayCategory,
221
221
  onCartModalClosed: l.closeCartModal
222
222
  }, {
223
223
  content: S(() => [
224
- r.showModalContent || l.isFirstLoan ? (u(), m("div", X, [
224
+ n.showModalContent || l.isFirstLoan ? (u(), m("div", X, [
225
225
  R(w, {
226
226
  class: "!tw-w-full tw-justify-center",
227
227
  "borrower-name": l.borrowerName,
228
- "milestones-number": r.milestonesNumber,
228
+ "milestones-number": n.milestonesNumber,
229
229
  "is-close-next-milestone": l.showOneAway,
230
230
  "custom-message": l.pillMsg
231
231
  }, {
@@ -236,7 +236,7 @@ function o1(c, i, r, l, p, A) {
236
236
  "tw-flex tw-items-center tw-justify-center tw-bg-gray-100 tw-p-0.5 tw-rounded tw-whitespace-nowrap": l.showOneAway
237
237
  })
238
238
  }, [
239
- l.isFirstLoan ? (u(), m("svg", $, i[0] || (i[0] = [
239
+ l.isFirstLoan && !n.isLoanGoal ? (u(), m("svg", $, i[0] || (i[0] = [
240
240
  e("path", {
241
241
  d: "M36.2676 17.5025C34.6519 30.5945 24.9878 35.8229 20.1847 38.0889C20.1496 38.1055 20.1099 38.1043 20.075 38.0873C8.60201 32.516 4.24979 22.9018 3.62911 17.5025C3.34064 14.6558 3.18678 8.5719 3.14406 5.7867C3.14315 5.72754 3.1847 5.67723 3.24194 5.66227C11.6312 3.46948 14.2758 3.52186 20.0937 1.86776C20.1175 1.86099 20.1437 1.86113 20.1673 1.86833C26.6496 3.83905 31.8224 4.23356 36.8613 5.66108C36.9176 5.67702 36.9559 5.72959 36.9546 5.78805C36.8227 11.47 36.4423 15.9605 36.2676 17.5025Z",
242
242
  fill: "#2AA967",
@@ -398,7 +398,7 @@ function o1(c, i, r, l, p, A) {
398
398
  fill: "#757575"
399
399
  }, null, -1)
400
400
  ]))),
401
- l.showOneAway ? (u(), m("div", t1, I(r.oneAwayText), 1)) : b("", !0)
401
+ l.showOneAway ? (u(), m("div", t1, I(n.oneAwayText), 1)) : b("", !0)
402
402
  ], 2)
403
403
  ]),
404
404
  _: 1
@@ -408,7 +408,7 @@ function o1(c, i, r, l, p, A) {
408
408
  _: 1
409
409
  }, 8, ["style", "visible", "photo-path", "basket-count", "category-name", "onCartModalClosed"])) : b("", !0);
410
410
  }
411
- const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-5233d12c"]]);
411
+ const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-93b3820a"]]);
412
412
  export {
413
413
  C1 as default
414
414
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.69.2",
3
+ "version": "6.69.3",
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": "3588a7c0b088dec5b4aea3b68f403e65c2bed2bb"
117
+ "gitHead": "f6ec5ff169304eff0c80651237eadcf8e79505d6"
118
118
  }