@kiva/kv-components 6.20.0 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- @media (min-width: 45.875rem){.cart-modal[data-v-c974cd2d] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
1
+ @media (min-width: 45.875rem){.cart-modal[data-v-9be640c2] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
@@ -110,11 +110,11 @@ const Y = {
110
110
  oneLoanAwayCategory: p,
111
111
  oneLoanAwayFilteredUrl: d,
112
112
  milestonesProgress: S
113
- } = N(g), w = j(0), f = j(0), b = C(() => {
113
+ } = N(g), w = j(0), v = j(0), b = C(() => {
114
114
  var t;
115
115
  return ((t = n.value) == null ? void 0 : t.basketSize) ?? 0;
116
116
  }), q = C(() => {
117
- const t = `${window.innerWidth - f.value - 200}`, o = `${w.value}`;
117
+ const t = `${window.innerWidth - v.value - 200}`, o = `${w.value}`;
118
118
  return { right: t, top: o };
119
119
  }), c = C(() => {
120
120
  var t;
@@ -122,19 +122,19 @@ const Y = {
122
122
  }), A = C(() => {
123
123
  var t;
124
124
  return !((t = l.value) != null && t.my);
125
- }), v = C(() => {
125
+ }), f = C(() => {
126
126
  var t, o, a;
127
127
  return y.value && (A.value && !M.value || !A.value && !((a = (o = (t = l.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && a.totalCount)) && b.value === 1;
128
- }), Z = C(() => p.value && d.value && !v.value), _ = C(() => Object.values(S.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), H = C(() => {
128
+ }), Z = C(() => p.value && d.value && !f.value), _ = C(() => Object.values(S.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), H = C(() => {
129
129
  var o, a, s;
130
- if (v.value) {
130
+ if (f.value) {
131
131
  const r = `Supporting ${c.value} helps`;
132
132
  return ((o = n.value) == null ? void 0 : o.borrowerCount) > 1 || (a = n.value) != null && a.themes.includes("Social Enterprise") ? `${r} them invest in themselves.` : ((s = n.value) == null ? void 0 : s.gender) === "male" ? `${r} him invest in himself.` : `${r} her invest in herself.`;
133
133
  }
134
134
  if (Z.value)
135
- return "You’re close to your next milestone!";
136
- const t = _.value > 1 ? `${_.value} of your milestones` : "your next milestone";
137
- return c.value ? `Supporting ${c.value} will hit ${t}!` : "Supporting this loan achieves a milestone!";
135
+ return "You’re close to your next achievement!";
136
+ const t = _.value > 1 ? `${_.value} achievements` : "your next achievement";
137
+ return c.value ? `Supporting ${c.value} will reach ${t}!` : "Supporting this loan reaches an achievement!";
138
138
  }), P = (t) => {
139
139
  t === "view-basket" ? i("close-redirect", { type: t, path: "/basket" }) : t === "support-another" && d.value && i("close-redirect", { type: t, path: d.value });
140
140
  }, K = (t) => {
@@ -145,7 +145,7 @@ const Y = {
145
145
  let a = [...document.querySelectorAll('[data-testid="header-basket"]')], s = a.find((L) => L == null ? void 0 : L.clientHeight);
146
146
  s || (a = [...document.querySelectorAll('[data-testid="header-about"]')], s = a.find((L) => L == null ? void 0 : L.clientHeight));
147
147
  const r = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
148
- r && (r == null ? void 0 : r.right) !== f.value && (f.value = r == null ? void 0 : r.right), o && (o == null ? void 0 : o.bottom) !== w.value && (w.value = o == null ? void 0 : o.bottom);
148
+ r && (r == null ? void 0 : r.right) !== v.value && (v.value = r == null ? void 0 : r.right), o && (o == null ? void 0 : o.bottom) !== w.value && (w.value = o == null ? void 0 : o.bottom);
149
149
  }, h = I(x, 100);
150
150
  return V(() => {
151
151
  x(), window.addEventListener("scroll", h), window.addEventListener("resize", h);
@@ -154,7 +154,7 @@ const Y = {
154
154
  }), {
155
155
  modalPosition: q,
156
156
  basketCount: b,
157
- isFirstLoan: v,
157
+ isFirstLoan: f,
158
158
  borrowerName: c,
159
159
  showOneAway: Z,
160
160
  pillMsg: H,
@@ -387,7 +387,7 @@ function e1(g, i, n, l, M, y) {
387
387
  _: 1
388
388
  }, 8, ["style", "visible", "photo-path", "basket-count", "category-name", "onCartModalClosed"])) : k("", !0);
389
389
  }
390
- const i1 = /* @__PURE__ */ W(Y, [["render", e1], ["__scopeId", "data-v-c974cd2d"]]);
390
+ const i1 = /* @__PURE__ */ W(Y, [["render", e1], ["__scopeId", "data-v-9be640c2"]]);
391
391
  export {
392
392
  i1 as default
393
393
  };
@@ -1,4 +1,4 @@
1
- import { toRefs as n, computed as a, openBlock as i, createElementBlock as u, normalizeClass as p, renderSlot as c, createElementVNode as m, toDisplayString as f } from "vue";
1
+ import { toRefs as a, computed as n, openBlock as i, createElementBlock as c, normalizeClass as u, renderSlot as p, createElementVNode as m, toDisplayString as f } from "vue";
2
2
  import d from "../_virtual/_plugin-vue_export-helper.js";
3
3
  const w = {
4
4
  props: {
@@ -28,30 +28,30 @@ const w = {
28
28
  borrowerName: o,
29
29
  milestonesNumber: t,
30
30
  isCloseNextMilestone: s
31
- } = n(e);
31
+ } = a(e);
32
32
  return {
33
- pillCopy: a(() => {
33
+ pillCopy: n(() => {
34
34
  if (e.customMessage)
35
35
  return e.customMessage;
36
36
  if (s.value)
37
- return "You’re close to your next milestone!";
38
- const l = t.value > 1 ? `${t.value} of your milestones` : "your next milestone";
39
- return o.value ? `Supporting ${o.value} will hit ${l}!` : "Supporting this loan achieves a milestone!";
37
+ return "You’re close to your next achievement!";
38
+ const l = t.value > 1 ? `${t.value} achievements` : "your next achievement";
39
+ return o.value ? `Supporting ${o.value} will reach ${l}!` : "Supporting this loan reaches an achievement!";
40
40
  })
41
41
  };
42
42
  }
43
43
  }, y = { class: "tw-text-wrap" };
44
44
  function g(e, o, t, s, r, l) {
45
- return i(), u("div", {
46
- class: p(["tw-w-max tw-flex tw-items-center tw-gap-1 tw-px-1 tw-py-0.5 tw-rounded", {
45
+ return i(), c("div", {
46
+ class: u(["tw-w-max tw-flex tw-items-center tw-gap-1 tw-px-1 tw-py-0.5 tw-rounded", {
47
47
  "tw-text-small tw-bg-secondary": t.showBg
48
48
  }])
49
49
  }, [
50
- c(e.$slots, "icon"),
50
+ p(e.$slots, "icon"),
51
51
  m("p", y, f(s.pillCopy), 1)
52
52
  ], 2);
53
53
  }
54
- const v = /* @__PURE__ */ d(w, [["render", g]]);
54
+ const x = /* @__PURE__ */ d(w, [["render", g]]);
55
55
  export {
56
- v as default
56
+ x as default
57
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.20.0",
3
+ "version": "6.21.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -111,5 +111,5 @@
111
111
  "embla-carousel-fade",
112
112
  "popper.js"
113
113
  ],
114
- "gitHead": "679a1245a2f841c23eaabfd75403bd128b375774"
114
+ "gitHead": "f15221e0afa6a6f02148a46f9f563e60c01fd0e8"
115
115
  }