@kiva/kv-components 7.1.0 → 7.2.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
- .loan-card-use[data-v-b7c571a8]:hover,.loan-card-use[data-v-b7c571a8]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-b7c571a8]{text-decoration-line:underline}.loan-card-progress[data-v-b7c571a8]:hover,.loan-card-progress[data-v-b7c571a8]:focus{text-decoration-line:none}.loan-card-use-text[data-v-b7c571a8] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-b7c571a8] form,.loan-card-cta[data-v-b7c571a8] fieldset,.loan-card-cta[data-v-b7c571a8] .tw-w-full,.loan-card-cta[data-v-b7c571a8] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-b7c571a8] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}
1
+ .loan-card-use[data-v-ab7b4585]:hover,.loan-card-use[data-v-ab7b4585]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-ab7b4585]{text-decoration-line:underline}.loan-card-progress[data-v-ab7b4585]:hover,.loan-card-progress[data-v-ab7b4585]:focus{text-decoration-line:none}.loan-card-use-text[data-v-ab7b4585] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-ab7b4585] form,.loan-card-cta[data-v-ab7b4585] fieldset,.loan-card-cta[data-v-ab7b4585] .tw-w-full,.loan-card-cta[data-v-ab7b4585] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-ab7b4585] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}
@@ -178,9 +178,9 @@ const Fe = B`
178
178
  city: C,
179
179
  countryName: A,
180
180
  distributionModel: w,
181
- formattedLocation: g,
181
+ formattedLocation: h,
182
182
  fundraisingPercent: s,
183
- hasProgressData: h,
183
+ hasProgressData: g,
184
184
  imageHash: k,
185
185
  isLoading: v,
186
186
  loanAmount: _,
@@ -202,9 +202,9 @@ const Fe = B`
202
202
  city: C,
203
203
  countryName: A,
204
204
  distributionModel: w,
205
- formattedLocation: g,
205
+ formattedLocation: h,
206
206
  fundraisingPercent: s,
207
- hasProgressData: h,
207
+ hasProgressData: g,
208
208
  imageHash: k,
209
209
  isLoading: v,
210
210
  loanAmount: _,
@@ -233,15 +233,18 @@ const Fe = B`
233
233
  return E(l).format("$0,0");
234
234
  }
235
235
  }
236
- }, ie = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-full" }, se = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" }, de = { class: "tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover" }, me = { class: "tw-flex-shrink-0 tw-overflow-hidden" }, ue = { class: "tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1 tw-min-w-0" }, ce = {
236
+ }, ie = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-full" }, se = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" }, de = {
237
+ class: "tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover",
238
+ style: { height: "6.75rem", "max-height": "6.75rem" }
239
+ }, me = { class: "tw-flex-shrink-0 tw-overflow-hidden" }, ue = { class: "tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1 tw-min-w-0" }, ce = {
237
240
  key: 0,
238
241
  class: "loan-card-use-text tw-w-full tw-overflow-hidden"
239
242
  }, fe = {
240
243
  key: 1,
241
244
  class: "loan-card-use-text tw-w-full tw-overflow-hidden"
242
- }, we = { class: "tw-flex-1 tw-min-w-0" }, ge = { class: "tw-flex-1 tw-min-w-0" };
243
- function he(l, o, t, e, C, A) {
244
- const w = d("kv-borrower-image"), g = d("kv-loan-tag"), s = d("kv-loading-placeholder"), h = d("kv-loan-use"), k = d("kv-loan-callouts"), v = d("kv-loan-progress-group"), _ = d("kv-lend-cta");
245
+ }, we = { class: "tw-flex-1 tw-min-w-0" }, he = { class: "tw-flex-1 tw-min-w-0" };
246
+ function ge(l, o, t, e, C, A) {
247
+ const w = d("kv-borrower-image"), h = d("kv-loan-tag"), s = d("kv-loading-placeholder"), g = d("kv-loan-use"), k = d("kv-loan-callouts"), v = d("kv-loan-progress-group"), _ = d("kv-lend-cta");
245
248
  return n(), m("div", ie, [
246
249
  r("div", se, [
247
250
  r("div", de, [
@@ -277,7 +280,7 @@ function he(l, o, t, e, C, A) {
277
280
  onClick: o[1] || (o[1] = (a) => e.clickReadMore("Tag", a))
278
281
  }, {
279
282
  default: f(() => [
280
- t.showTags && !e.isLoading ? (n(), i(g, {
283
+ t.showTags && !e.isLoading ? (n(), i(h, {
281
284
  key: 0,
282
285
  loan: t.loan
283
286
  }, null, 8, ["loan"])) : L("", !0)
@@ -300,15 +303,17 @@ function he(l, o, t, e, C, A) {
300
303
  u(s)
301
304
  ]))), 128))
302
305
  ])) : (n(), m("div", fe, [
303
- u(h, {
306
+ u(g, {
304
307
  use: e.loanUse,
305
308
  "loan-amount": e.loanAmount,
306
309
  status: e.loanStatus,
307
310
  "borrower-count": e.loanBorrowerCount,
308
311
  name: e.borrowerName,
309
312
  "distribution-model": e.distributionModel,
313
+ "bold-name": !0,
314
+ country: e.formattedLocation,
310
315
  class: "tw-text-small tw-leading-tight"
311
- }, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
316
+ }, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model", "country"])
312
317
  ]))
313
318
  ]),
314
319
  _: 1
@@ -330,7 +335,7 @@ function he(l, o, t, e, C, A) {
330
335
  class: x(["tw-flex tw-items-end tw-w-full tw-mt-1", { "tw-gap-1": e.sharesAvailable }])
331
336
  }, [
332
337
  e.hasProgressData ? (n(), m(b, { key: 1 }, [
333
- r("div", ge, [
338
+ r("div", he, [
334
339
  e.sharesAvailable ? (n(), i(c(e.tag), {
335
340
  key: 0,
336
341
  to: e.readMorePath,
@@ -399,7 +404,7 @@ function he(l, o, t, e, C, A) {
399
404
  ], 2)
400
405
  ]);
401
406
  }
402
- const Oe = /* @__PURE__ */ le(re, [["render", he], ["__scopeId", "data-v-b7c571a8"]]);
407
+ const Oe = /* @__PURE__ */ le(re, [["render", ge], ["__scopeId", "data-v-ab7b4585"]]);
403
408
  export {
404
409
  Fe as KV_COMPACT_LOAN_CARD_FRAGMENT,
405
410
  Ee as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
@@ -1,8 +1,8 @@
1
- import n from "graphql-tag";
1
+ import s from "graphql-tag";
2
2
  import a from "numeral";
3
3
  import { openBlock as i, createElementBlock as o } from "vue";
4
4
  import r from "../_virtual/_plugin-vue_export-helper.js";
5
- const t = "direct", g = n`
5
+ const t = "direct", w = s`
6
6
  fragment KvLoanUse on LoanBasic {
7
7
  id
8
8
  anonymizationLevel
@@ -14,7 +14,7 @@ const t = "direct", g = n`
14
14
  distributionModel
15
15
  whySpecial
16
16
  }
17
- `, l = {
17
+ `, u = {
18
18
  name: "KvLoanUse",
19
19
  props: {
20
20
  anonymizationLevel: {
@@ -52,6 +52,14 @@ const t = "direct", g = n`
52
52
  hideLoanAmount: {
53
53
  type: Boolean,
54
54
  default: !1
55
+ },
56
+ boldName: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ country: {
61
+ type: String,
62
+ default: ""
55
63
  }
56
64
  },
57
65
  computed: {
@@ -64,24 +72,27 @@ const t = "direct", g = n`
64
72
  whySpecialSentence() {
65
73
  return this.whySpecial ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}` : "";
66
74
  },
75
+ nameSpan() {
76
+ return this.boldName ? this.country ? `<span class="data-hj-suppress tw-font-medium">${this.name} in ${this.country}</span>` : `<span class="data-hj-suppress tw-font-medium">${this.name}</span>` : `<span class="data-hj-suppress">${this.name}</span>`;
77
+ },
67
78
  loanUse() {
68
79
  if (this.anonymizationLevel === "full" || this.use.length === 0)
69
80
  return "For the borrower's privacy, this loan has been made anonymous.";
70
81
  if (this.hideLoanAmount)
71
- return `Help <span class="data-hj-suppress">${this.name}</span> ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
82
+ return `Help ${this.nameSpan} ${this.use.charAt(0).toLowerCase() + this.use.slice(1)} ${this.whySpecialSentence}`;
72
83
  const e = this.borrowerCount > 1;
73
- return `${a(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${e ? "a member of " : ""}<span class="data-hj-suppress">${this.name}</span> ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
84
+ return `${a(this.loanAmount).format("$0,0")} ${this.isDirect ? "to" : this.helpLanguage} ${e ? "a member of " : ""}${this.nameSpan} ${this.isDirect ? `${this.helpLanguage} ` : ""}${this.use.charAt(0).toLowerCase() + this.use.slice(1)}${this.whySpecialSentence}`;
74
85
  }
75
86
  }
76
- }, u = ["innerHTML"];
77
- function h(e, p, c, m, d, s) {
87
+ }, l = ["innerHTML"];
88
+ function h(e, p, c, m, d, n) {
78
89
  return i(), o("p", {
79
90
  class: "tw-line-clamp-4",
80
- innerHTML: s.loanUse
81
- }, null, 8, u);
91
+ innerHTML: n.loanUse
92
+ }, null, 8, l);
82
93
  }
83
- const w = /* @__PURE__ */ r(l, [["render", h]]);
94
+ const g = /* @__PURE__ */ r(u, [["render", h]]);
84
95
  export {
85
- g as KV_LOAN_USE_FRAGMENT,
86
- w as default
96
+ w as KV_LOAN_USE_FRAGMENT,
97
+ g as default
87
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,7 +21,7 @@
21
21
  "@babel/preset-env": "^7.24.8",
22
22
  "@babel/preset-react": "^7.24.7",
23
23
  "@babel/preset-typescript": "^7.24.7",
24
- "@kiva/kv-tokens": "^3.5.0",
24
+ "@kiva/kv-tokens": "^3.5.1",
25
25
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
26
26
  "@laynezh/vite-plugin-lib-assets": "^0.6.1",
27
27
  "@mdi/js": "^7.4.47",
@@ -114,5 +114,5 @@
114
114
  "embla-carousel-fade",
115
115
  "popper.js"
116
116
  ],
117
- "gitHead": "e89d40ce0dda4f00cdfb43b62d7d6e3938ca621b"
117
+ "gitHead": "6f295be2f5791019ec8eb23e9f3b4ed36644bb43"
118
118
  }