@kiva/kv-components 6.14.1 → 6.15.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/assets/icons/bluesky.js +6 -6
- package/dist/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +27 -19
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const C = `
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const C = `M6.90158 6.00978C8.96467 7.4766 11.1848 10.4496 11.9997 12.0446C12.8139 10.449 15.034
|
|
2
|
+
7.47597 17.0984 6.00978C18.5878 4.95232 21 4.1336 21 6.73788C21 7.25786 20.6853 11.1084 20.4998 11.7339C19.8571
|
|
3
|
+
13.907 17.5165 14.4607 15.4335 14.1251C19.0741 14.7113 20.0002 16.6537 18.0001 18.5962C14.2018 22.2854 12.541
|
|
4
|
+
17.6706 12.1156 16.4887C11.9924 16.1482 12.0109 16.1407 11.8844 16.4887C11.459 17.6712 9.79811 22.2854 5.99989
|
|
5
|
+
18.5962C3.99974 16.6537 4.92595 14.7119 8.56649 14.1251C6.48353 14.4607 4.14218 13.9064 3.5002 11.7339C3.3147
|
|
6
|
+
11.1084 3 7.25786 3 6.73788C3 4.13298 5.4129 4.95169 6.90158 6.00978Z
|
|
7
7
|
`;
|
|
8
8
|
export {
|
|
9
9
|
C as KvBlueskyIcon
|
package/dist/vue/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-e06394ac] select{border-radius:14px 0 0 14px}.lend-again[data-v-e06394ac] span{padding-left:0;padding-right:0;padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-e06394ac] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-e06394ac] select{cursor:pointer;border-radius:.875rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-e06394ac] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.selected-dropdown[data-v-e06394ac] select{--tw-border-opacity: 1;border-color:rgb(34 56 41 / var(--tw-border-opacity, 1))}.preset-option[data-v-e06394ac] span.tw-w-full:first-child{border-width:2px;--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.selected-option[data-v-e06394ac] span.tw-w-full:first-child{--tw-border-opacity: 1;border-color:rgba(var(--border-action),var(--tw-border-opacity, 1))}
|
package/dist/vue/KvLendCta.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import C from "graphql-tag";
|
|
2
|
-
import { mdiChevronRight as
|
|
2
|
+
import { mdiChevronRight as _ } from "@mdi/js";
|
|
3
3
|
import { getLendCtaSelectedOption as B, getDropdownPriceArray as D } from "../utils/loanUtils.js";
|
|
4
4
|
import P from "./KvLendAmountButton.js";
|
|
5
5
|
import S from "./KvSelect.js";
|
|
6
6
|
import F from "./KvButton.js";
|
|
7
7
|
import I from "./KvMaterialIcon.js";
|
|
8
8
|
import N from "./KvCartPill.js";
|
|
9
|
-
import { resolveComponent as y, openBlock as i, createElementBlock as l, createBlock as a, withCtx as r, createElementVNode as u, createCommentVNode as d, normalizeClass as h, createTextVNode as f, toDisplayString as w, createVNode as V, withModifiers as
|
|
9
|
+
import { resolveComponent as y, openBlock as i, createElementBlock as l, createBlock as a, withCtx as r, createElementVNode as u, createCommentVNode as d, normalizeClass as h, createTextVNode as f, toDisplayString as w, createVNode as V, withModifiers as p, Fragment as L, renderList as g } from "vue";
|
|
10
10
|
import "./KvLendCta.css";
|
|
11
11
|
import O from "../_virtual/_plugin-vue_export-helper.js";
|
|
12
12
|
const k = "Other", oe = C`
|
|
@@ -113,6 +113,14 @@ const k = "Other", oe = C`
|
|
|
113
113
|
type: Function,
|
|
114
114
|
default: void 0
|
|
115
115
|
},
|
|
116
|
+
/**
|
|
117
|
+
* Hide preset buttons under this amount when
|
|
118
|
+
* showPresetAmounts is true
|
|
119
|
+
* */
|
|
120
|
+
maxAmount: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: ""
|
|
123
|
+
},
|
|
116
124
|
showPresetAmounts: {
|
|
117
125
|
type: Boolean,
|
|
118
126
|
default: !1
|
|
@@ -129,7 +137,7 @@ const k = "Other", oe = C`
|
|
|
129
137
|
data() {
|
|
130
138
|
var e, n;
|
|
131
139
|
return {
|
|
132
|
-
mdiChevronRight:
|
|
140
|
+
mdiChevronRight: _,
|
|
133
141
|
defaultAmountOptions: [25, 50, 75],
|
|
134
142
|
selectedOption: B(
|
|
135
143
|
this.getCookie,
|
|
@@ -169,8 +177,7 @@ const k = "Other", oe = C`
|
|
|
169
177
|
return ((e = this.basketItems) == null ? void 0 : e.some((n) => n.__typename === "LoanReservation" && n.id === this.loanId)) ?? !1;
|
|
170
178
|
},
|
|
171
179
|
prices() {
|
|
172
|
-
const e = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25)
|
|
173
|
-
return D(
|
|
180
|
+
const e = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25), n = D(
|
|
174
181
|
this.unreservedAmount,
|
|
175
182
|
this.isCompleteLoanActive,
|
|
176
183
|
e,
|
|
@@ -178,6 +185,7 @@ const k = "Other", oe = C`
|
|
|
178
185
|
this.enableHugeAmount,
|
|
179
186
|
this.isVisitor
|
|
180
187
|
);
|
|
188
|
+
return this.maxAmount ? n.filter((s) => parseFloat(s) <= parseFloat(this.maxAmount)) : n;
|
|
181
189
|
},
|
|
182
190
|
presetButtonsPrices() {
|
|
183
191
|
const e = this.prices.slice(0, 3);
|
|
@@ -241,7 +249,7 @@ const k = "Other", oe = C`
|
|
|
241
249
|
return this.isAmountLessThan25(this.unreservedAmount) || this.isAmountBetween25And500(this.unreservedAmount);
|
|
242
250
|
},
|
|
243
251
|
isLendAmountButton() {
|
|
244
|
-
return (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(this.unreservedAmount) || this.showPresetAmounts && this.presetButtonsPrices.length === 1 && !this.isAdding;
|
|
252
|
+
return this.maxAmount ? !1 : (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(this.unreservedAmount) || this.showPresetAmounts && this.presetButtonsPrices.length === 1 && !this.isAdding;
|
|
245
253
|
},
|
|
246
254
|
isFunded() {
|
|
247
255
|
return this.state === "funded" || this.state === "fully-reserved";
|
|
@@ -259,17 +267,17 @@ const k = "Other", oe = C`
|
|
|
259
267
|
return this.presetDropdownPrices.length > 1;
|
|
260
268
|
},
|
|
261
269
|
hideLendButton() {
|
|
262
|
-
return this.showPresetAmounts && (this.isAdding || this.presetButtonsPrices.length === 1);
|
|
270
|
+
return this.maxAmount ? !1 : this.showPresetAmounts && (this.isAdding || this.presetButtonsPrices.length === 1);
|
|
263
271
|
}
|
|
264
272
|
},
|
|
265
273
|
watch: {
|
|
266
274
|
unreservedAmount(e, n) {
|
|
267
|
-
var s,
|
|
275
|
+
var s, A;
|
|
268
276
|
e !== n && n === "" && (this.selectedOption = B(
|
|
269
277
|
this.getCookie,
|
|
270
278
|
this.setCookie,
|
|
271
279
|
this.enableFiveDollarsNotes,
|
|
272
|
-
(
|
|
280
|
+
(A = (s = this.route) == null ? void 0 : s.query) == null ? void 0 : A.utm_campaign,
|
|
273
281
|
e,
|
|
274
282
|
this.userBalance,
|
|
275
283
|
this.fiveDollarsSelected,
|
|
@@ -344,8 +352,8 @@ const k = "Other", oe = C`
|
|
|
344
352
|
key: 1,
|
|
345
353
|
class: "amountDropdownWrapper"
|
|
346
354
|
}, z = ["value"];
|
|
347
|
-
function q(e, n, s,
|
|
348
|
-
const b = y("kv-cart-pill"), m = y("kv-ui-button"), T = y("kv-material-icon"), v = y("kv-ui-select"),
|
|
355
|
+
function q(e, n, s, A, c, t) {
|
|
356
|
+
const b = y("kv-cart-pill"), m = y("kv-ui-button"), T = y("kv-material-icon"), v = y("kv-ui-select"), x = y("kv-lend-amount-button");
|
|
349
357
|
return i(), l("div", H, [
|
|
350
358
|
s.showPill && s.showPresetAmounts ? (i(), a(b, {
|
|
351
359
|
key: 0,
|
|
@@ -429,7 +437,7 @@ function q(e, n, s, L, c, t) {
|
|
|
429
437
|
}, 8, ["state", "to", "href"])) : t.useFormSubmit ? (i(), l("form", {
|
|
430
438
|
key: 5,
|
|
431
439
|
class: "tw-w-full tw-flex",
|
|
432
|
-
onSubmit: n[4] || (n[4] =
|
|
440
|
+
onSubmit: n[4] || (n[4] = p((...o) => t.addToBasket && t.addToBasket(...o), ["prevent"]))
|
|
433
441
|
}, [
|
|
434
442
|
u("fieldset", {
|
|
435
443
|
class: h(["tw-w-full tw-flex", {
|
|
@@ -443,7 +451,7 @@ function q(e, n, s, L, c, t) {
|
|
|
443
451
|
key: 0,
|
|
444
452
|
class: h(["tw-flex tw-gap-1 lg:tw-gap-2", { "tw-flex-wrap md:tw-flex-nowrap": s.enableHugeAmount }])
|
|
445
453
|
}, [
|
|
446
|
-
t.isLendAmountButton ? d("", !0) : (i(!0), l(
|
|
454
|
+
t.isLendAmountButton ? d("", !0) : (i(!0), l(L, { key: 0 }, g(t.presetButtonsPrices, (o) => (i(), a(m, {
|
|
447
455
|
key: o,
|
|
448
456
|
variant: "secondary",
|
|
449
457
|
class: h(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": c.selectedOption == o }]),
|
|
@@ -469,10 +477,10 @@ function q(e, n, s, L, c, t) {
|
|
|
469
477
|
"tw-w-full": s.enableHugeAmount
|
|
470
478
|
}]),
|
|
471
479
|
"aria-label": "Lend amount",
|
|
472
|
-
onClick:
|
|
480
|
+
onClick: p(t.clickDropdown, ["stop"])
|
|
473
481
|
}, {
|
|
474
482
|
default: r(() => [
|
|
475
|
-
(i(!0), l(
|
|
483
|
+
(i(!0), l(L, null, g(t.presetDropdownPrices, (o) => (i(), l("option", {
|
|
476
484
|
key: o,
|
|
477
485
|
value: o
|
|
478
486
|
}, w(o !== c.OTHER_OPTION ? `$${o}` : o), 9, E))), 128))
|
|
@@ -491,10 +499,10 @@ function q(e, n, s, L, c, t) {
|
|
|
491
499
|
class: "tw-min-w-12",
|
|
492
500
|
style: { "border-radius": "14px 0 0 14px" },
|
|
493
501
|
"aria-label": "Lend amount",
|
|
494
|
-
onClick:
|
|
502
|
+
onClick: p(t.clickDropdown, ["stop"])
|
|
495
503
|
}, {
|
|
496
504
|
default: r(() => [
|
|
497
|
-
(i(!0), l(
|
|
505
|
+
(i(!0), l(L, null, g(t.prices, (o) => (i(), l("option", {
|
|
498
506
|
key: o,
|
|
499
507
|
value: o
|
|
500
508
|
}, " $" + w(o), 9, z))), 128))
|
|
@@ -530,7 +538,7 @@ function q(e, n, s, L, c, t) {
|
|
|
530
538
|
_: 1
|
|
531
539
|
}, 8, ["class"])) : d("", !0)
|
|
532
540
|
], 2),
|
|
533
|
-
t.isLendAmountButton && !s.enableFiveDollarsNotes ? (i(), a(
|
|
541
|
+
t.isLendAmountButton && !s.enableFiveDollarsNotes ? (i(), a(x, {
|
|
534
542
|
key: 2,
|
|
535
543
|
class: "tw-w-full",
|
|
536
544
|
"loan-id": t.loanId,
|
|
@@ -552,7 +560,7 @@ function q(e, n, s, L, c, t) {
|
|
|
552
560
|
], 32)) : d("", !0)
|
|
553
561
|
]);
|
|
554
562
|
}
|
|
555
|
-
const ae = /* @__PURE__ */ O(M, [["render", q], ["__scopeId", "data-v-
|
|
563
|
+
const ae = /* @__PURE__ */ O(M, [["render", q], ["__scopeId", "data-v-e06394ac"]]);
|
|
556
564
|
export {
|
|
557
565
|
oe as KV_LEND_CTA_FRAGMENT,
|
|
558
566
|
ie as KV_LEND_CTA_USER_FRAGMENT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.15.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": "
|
|
114
|
+
"gitHead": "fc3d3bc5b4c6f79106de5171f728cf404483d81b"
|
|
115
115
|
}
|