@kiva/kv-components 6.3.1 → 6.4.1
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/vue/KvCartModal.css +1 -1
- package/dist/vue/KvCartModal.js +79 -77
- package/dist/vue/KvCartPill.js +30 -15
- package/dist/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +141 -95
- package/package.json +2 -2
package/dist/vue/KvCartModal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.screen[data-v-
|
|
1
|
+
.screen[data-v-b40bef0e]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1400;background-color:#0003}.modal[data-v-b40bef0e]{width:100%;border-bottom-right-radius:.875rem;border-bottom-left-radius:.875rem;--tw-bg-opacity: 1;background-color:rgba(var(--bg-primary),var(--tw-bg-opacity, 1))}@media (min-width: 45.875rem){.modal[data-v-b40bef0e]{position:absolute;right:0}}.modal[data-v-b40bef0e]{max-height:90%}.container[data-v-b40bef0e]{position:absolute;top:0;right:0;bottom:0;left:0}@media (min-width: 45.875rem){.modal[data-v-b40bef0e]{max-width:24.5rem}}
|
package/dist/vue/KvCartModal.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { mdiClose as
|
|
3
|
-
import { useFocusTrap as
|
|
4
|
-
import { hideOthers as
|
|
5
|
-
import { unlockScroll as
|
|
6
|
-
import { unlockPrintSingleEl as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { toRefs as I, ref as w, computed as b, watch as K, onMounted as F, onBeforeUnmount as P, resolveComponent as x, openBlock as k, createBlock as R, Transition as j, withCtx as h, withDirectives as D, createElementVNode as o, withModifiers as C, renderSlot as g, createVNode as y, createElementBlock as S, createCommentVNode as M, createTextVNode as L, toDisplayString as O, vShow as U, nextTick as q } from "vue";
|
|
2
|
+
import { mdiClose as z, mdiCheckCircle as G } from "@mdi/js";
|
|
3
|
+
import { useFocusTrap as H } from "@vueuse/integrations/useFocusTrap";
|
|
4
|
+
import { hideOthers as J } from "../vendor/aria-hidden/dist/es2015/index.js";
|
|
5
|
+
import { unlockScroll as Q, lockScroll as W } from "../utils/scrollLock.js";
|
|
6
|
+
import { unlockPrintSingleEl as X, lockPrintSingleEl as Y } from "../utils/printing.js";
|
|
7
|
+
import Z from "./KvButton.js";
|
|
8
|
+
import $ from "./KvMaterialIcon.js";
|
|
9
9
|
import "./KvCartModal.css";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import tt from "../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const et = {
|
|
12
12
|
components: {
|
|
13
|
-
KvMaterialIcon:
|
|
14
|
-
KvButton:
|
|
13
|
+
KvMaterialIcon: $,
|
|
14
|
+
KvButton: Z
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
/**
|
|
@@ -40,70 +40,72 @@ const $ = {
|
|
|
40
40
|
emits: [
|
|
41
41
|
"cart-modal-closed"
|
|
42
42
|
],
|
|
43
|
-
setup(
|
|
43
|
+
setup(d, { emit: t, slots: i }) {
|
|
44
44
|
const {
|
|
45
|
-
visible:
|
|
46
|
-
preventClose:
|
|
47
|
-
} =
|
|
48
|
-
|
|
45
|
+
visible: e,
|
|
46
|
+
preventClose: r
|
|
47
|
+
} = I(d), c = w(null), l = w(null), m = w(null), n = w(), _ = b(() => [
|
|
48
|
+
c.value
|
|
49
49
|
// This cart modal
|
|
50
|
-
]), {
|
|
51
|
-
activate:
|
|
52
|
-
deactivate:
|
|
53
|
-
} =
|
|
50
|
+
]), B = b(() => !!i.content), {
|
|
51
|
+
activate: T,
|
|
52
|
+
deactivate: E
|
|
53
|
+
} = H(_, {
|
|
54
54
|
allowOutsideClick: !0
|
|
55
55
|
// allow clicking outside the cart modal to close it
|
|
56
56
|
});
|
|
57
|
-
let
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
let u = null, v = null;
|
|
58
|
+
const a = (s = "") => {
|
|
59
|
+
c.value && l.value && (E(), l.value.scrollTop = 0, X(l.value)), Q(), u && (u(), u = null), document.removeEventListener("keyup", v), t("cart-modal-closed", { type: s });
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
v = (s) => {
|
|
62
|
+
s && s.key === "Escape" && !r.value && a();
|
|
63
63
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const A = () => {
|
|
65
|
+
r.value || a("background");
|
|
66
66
|
}, f = () => {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
e.value && (document.addEventListener("keyup", v), q(() => {
|
|
68
|
+
c.value && l.value && (T(), u = J(c.value), Y(l.value)), W();
|
|
69
69
|
}));
|
|
70
|
-
},
|
|
71
|
-
s
|
|
70
|
+
}, N = (s) => {
|
|
71
|
+
a(s);
|
|
72
72
|
}, p = () => {
|
|
73
|
-
|
|
73
|
+
r.value || (n.value = setTimeout(() => {
|
|
74
74
|
t("cart-modal-closed", { type: "time" });
|
|
75
75
|
}, 1e4));
|
|
76
|
-
},
|
|
77
|
-
|
|
76
|
+
}, V = () => {
|
|
77
|
+
r.value || clearTimeout(n.value);
|
|
78
78
|
};
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
}),
|
|
84
|
-
mdiClose:
|
|
85
|
-
mdiCheckCircle:
|
|
86
|
-
onKeyUp:
|
|
87
|
-
onScreenClick:
|
|
88
|
-
hide:
|
|
79
|
+
return K(e, () => {
|
|
80
|
+
e.value ? (f(), p()) : a();
|
|
81
|
+
}), F(() => {
|
|
82
|
+
e.value && (f(), p());
|
|
83
|
+
}), P(() => a()), {
|
|
84
|
+
mdiClose: z,
|
|
85
|
+
mdiCheckCircle: G,
|
|
86
|
+
onKeyUp: v,
|
|
87
|
+
onScreenClick: A,
|
|
88
|
+
hide: a,
|
|
89
89
|
show: f,
|
|
90
|
-
controlsRef:
|
|
91
|
-
handleClick:
|
|
92
|
-
clearAutomaticClose:
|
|
93
|
-
setAutomaticClose: p
|
|
90
|
+
controlsRef: m,
|
|
91
|
+
handleClick: N,
|
|
92
|
+
clearAutomaticClose: V,
|
|
93
|
+
setAutomaticClose: p,
|
|
94
|
+
showContentSlot: B
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
},
|
|
97
|
+
}, ot = { class: "container" }, lt = { class: "tw-flex tw-pt-2 tw-px-2.5" }, nt = { class: "tw-flex tw-flex-grow tw-gap-1 tw-items-center tw-pb-2" }, at = {
|
|
98
|
+
key: 0,
|
|
97
99
|
id: "kvCartModalBody",
|
|
98
100
|
ref: "kvCartModalBody",
|
|
99
|
-
class: "
|
|
100
|
-
},
|
|
101
|
+
class: "tw-flex tw-gap-2 tw-mx-2.5 tw-border-t tw-border-tertiary tw-py-2"
|
|
102
|
+
}, st = {
|
|
101
103
|
ref: "controlsRef",
|
|
102
104
|
class: "tw-flex-shrink-0 tw-flex tw-justify-end tw-gap-x-2.5 tw-px-2.5 tw-pb-2 tw-flex-col tw-gap-1"
|
|
103
105
|
};
|
|
104
|
-
function
|
|
105
|
-
const
|
|
106
|
-
return
|
|
106
|
+
function it(d, t, i, e, r, c) {
|
|
107
|
+
const l = x("kv-material-icon"), m = x("kv-button");
|
|
108
|
+
return k(), R(j, {
|
|
107
109
|
"enter-active-class": "tw-transition-opacity tw-duration-300",
|
|
108
110
|
"leave-active-class": "tw-transition-opacity tw-duration-300",
|
|
109
111
|
"enter-class": "tw-opacity-0",
|
|
@@ -111,13 +113,13 @@ function at(c, t, l, e, r, a) {
|
|
|
111
113
|
"leave-class": "tw-opacity-full",
|
|
112
114
|
"leave-to-class": "tw-opacity-0"
|
|
113
115
|
}, {
|
|
114
|
-
default:
|
|
115
|
-
|
|
116
|
+
default: h(() => [
|
|
117
|
+
D(o("div", {
|
|
116
118
|
class: "screen",
|
|
117
|
-
onClick: t[5] || (t[5] =
|
|
119
|
+
onClick: t[5] || (t[5] = C((...n) => e.onScreenClick && e.onScreenClick(...n), ["stop", "prevent"]))
|
|
118
120
|
}, [
|
|
119
121
|
o("div", null, [
|
|
120
|
-
o("div",
|
|
122
|
+
o("div", ot, [
|
|
121
123
|
o("div", {
|
|
122
124
|
ref: "kvCartModal",
|
|
123
125
|
tabindex: "-1",
|
|
@@ -125,26 +127,26 @@ function at(c, t, l, e, r, a) {
|
|
|
125
127
|
class: "modal",
|
|
126
128
|
"aria-modal": "true",
|
|
127
129
|
"aria-label": "Added to basket",
|
|
128
|
-
onClick: t[2] || (t[2] =
|
|
130
|
+
onClick: t[2] || (t[2] = C(() => {
|
|
129
131
|
}, ["stop"])),
|
|
130
132
|
onMouseenter: t[3] || (t[3] = (n) => e.clearAutomaticClose()),
|
|
131
133
|
onMouseleave: t[4] || (t[4] = (n) => e.setAutomaticClose())
|
|
132
134
|
}, [
|
|
133
|
-
o("div",
|
|
134
|
-
o("div",
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
o("div", lt, [
|
|
136
|
+
o("div", nt, [
|
|
137
|
+
g(d.$slots, "header", {}, () => [
|
|
138
|
+
y(l, {
|
|
137
139
|
class: "tw-w-3.5 tw-h-3.5 tw-text-brand",
|
|
138
140
|
icon: e.mdiCheckCircle
|
|
139
141
|
}, null, 8, ["icon"]),
|
|
140
142
|
t[6] || (t[6] = o("p", { class: "tw-flex-1 tw-font-medium tw-text-center" }, " Added to basket ", -1))
|
|
141
143
|
], !0),
|
|
142
|
-
|
|
144
|
+
i.preventClose ? M("", !0) : (k(), S("button", {
|
|
143
145
|
key: 0,
|
|
144
146
|
class: "tw-grid tw-content-center tw-justify-center tw-ml-auto tw-w-6 tw-h-6 tw--m-2 hover:tw-text-action-highlight",
|
|
145
|
-
onClick: t[0] || (t[0] =
|
|
147
|
+
onClick: t[0] || (t[0] = C((n) => e.hide("x-button"), ["stop"]))
|
|
146
148
|
}, [
|
|
147
|
-
|
|
149
|
+
y(l, {
|
|
148
150
|
class: "tw-w-3.5 tw-h-3.5",
|
|
149
151
|
icon: e.mdiClose
|
|
150
152
|
}, null, 8, ["icon"]),
|
|
@@ -152,16 +154,16 @@ function at(c, t, l, e, r, a) {
|
|
|
152
154
|
]))
|
|
153
155
|
])
|
|
154
156
|
]),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
], 512),
|
|
158
|
-
o("div",
|
|
159
|
-
|
|
157
|
+
e.showContentSlot ? (k(), S("div", at, [
|
|
158
|
+
g(d.$slots, "content", {}, void 0, !0)
|
|
159
|
+
], 512)) : M("", !0),
|
|
160
|
+
o("div", st, [
|
|
161
|
+
y(m, {
|
|
160
162
|
class: "tw-w-full",
|
|
161
163
|
onClick: t[1] || (t[1] = (n) => e.handleClick("view-basket"))
|
|
162
164
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
|
|
165
|
+
default: h(() => [
|
|
166
|
+
L(" View basket (" + O(i.basketCount) + ") ", 1)
|
|
165
167
|
]),
|
|
166
168
|
_: 1
|
|
167
169
|
})
|
|
@@ -170,13 +172,13 @@ function at(c, t, l, e, r, a) {
|
|
|
170
172
|
])
|
|
171
173
|
])
|
|
172
174
|
], 512), [
|
|
173
|
-
[
|
|
175
|
+
[U, i.visible]
|
|
174
176
|
])
|
|
175
177
|
]),
|
|
176
178
|
_: 3
|
|
177
179
|
});
|
|
178
180
|
}
|
|
179
|
-
const
|
|
181
|
+
const Ct = /* @__PURE__ */ tt(et, [["render", it], ["__scopeId", "data-v-b40bef0e"]]);
|
|
180
182
|
export {
|
|
181
|
-
|
|
183
|
+
Ct as default
|
|
182
184
|
};
|
package/dist/vue/KvCartPill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { toRefs as n, computed as a, openBlock as i, createElementBlock as p, normalizeClass as u, renderSlot as c, createElementVNode as m, toDisplayString as f } from "vue";
|
|
2
|
+
import w from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const d = {
|
|
4
4
|
props: {
|
|
5
5
|
borrowerName: {
|
|
6
6
|
type: String,
|
|
@@ -9,28 +9,43 @@ const w = {
|
|
|
9
9
|
showBg: {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: !1
|
|
12
|
+
},
|
|
13
|
+
milestonesNumber: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 1
|
|
16
|
+
},
|
|
17
|
+
isCloseNextMilestone: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
12
20
|
}
|
|
13
21
|
},
|
|
14
22
|
setup(t) {
|
|
15
23
|
const {
|
|
16
|
-
borrowerName:
|
|
17
|
-
|
|
24
|
+
borrowerName: o,
|
|
25
|
+
milestonesNumber: e,
|
|
26
|
+
isCloseNextMilestone: l
|
|
27
|
+
} = n(t);
|
|
18
28
|
return {
|
|
19
|
-
pillCopy:
|
|
29
|
+
pillCopy: a(() => {
|
|
30
|
+
if (l.value)
|
|
31
|
+
return "You’re close to your next milestone!";
|
|
32
|
+
const s = e.value > 1 ? `${e.value} of your milestones` : "your next milestone";
|
|
33
|
+
return o.value ? `Supporting ${o.value} will hit ${s}!` : "Supporting this loan achieves a milestone!";
|
|
34
|
+
})
|
|
20
35
|
};
|
|
21
36
|
}
|
|
22
|
-
},
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
class:
|
|
26
|
-
"tw-text-small tw-bg-secondary":
|
|
37
|
+
}, y = { class: "tw-text-wrap" };
|
|
38
|
+
function x(t, o, e, l, r, s) {
|
|
39
|
+
return i(), p("div", {
|
|
40
|
+
class: u(["tw-w-max tw-flex tw-items-center tw-gap-1 tw-px-1 tw-py-0.5 tw-rounded", {
|
|
41
|
+
"tw-text-small tw-bg-secondary": e.showBg
|
|
27
42
|
}])
|
|
28
43
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
c(t.$slots, "icon"),
|
|
45
|
+
m("p", y, f(l.pillCopy), 1)
|
|
31
46
|
], 2);
|
|
32
47
|
}
|
|
33
|
-
const
|
|
48
|
+
const v = /* @__PURE__ */ w(d, [["render", x]]);
|
|
34
49
|
export {
|
|
35
|
-
|
|
50
|
+
v as default
|
|
36
51
|
};
|
package/dist/vue/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-86580946] select{border-radius:14px 0 0 14px}.lend-again[data-v-86580946] span{padding-left:0;padding-right:0;padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-86580946] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-86580946] select{cursor:pointer;border-radius:.875rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-86580946] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.selected-dropdown[data-v-86580946] select{--tw-border-opacity: 1;border-color:rgb(34 56 41 / var(--tw-border-opacity, 1))}.preset-option[data-v-86580946] 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-86580946] 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,19 +1,21 @@
|
|
|
1
1
|
import { mdiChevronRight as x } from "@mdi/js";
|
|
2
|
-
import { getLendCtaSelectedOption as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { getLendCtaSelectedOption as B, getDropdownPriceArray as _ } from "../utils/loanUtils.js";
|
|
3
|
+
import D from "./KvLendAmountButton.js";
|
|
4
|
+
import P from "./KvSelect.js";
|
|
5
|
+
import S from "./KvButton.js";
|
|
6
|
+
import I from "./KvMaterialIcon.js";
|
|
7
|
+
import F from "./KvCartPill.js";
|
|
8
|
+
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 w, toDisplayString as f, createVNode as O, withModifiers as v, Fragment as p, renderList as L } from "vue";
|
|
8
9
|
import "./KvLendCta.css";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
10
|
+
import V from "../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const k = "Other", N = {
|
|
11
12
|
name: "KvLendCta",
|
|
12
13
|
components: {
|
|
13
|
-
KvLendAmountButton:
|
|
14
|
-
KvUiButton:
|
|
15
|
-
KvUiSelect:
|
|
16
|
-
KvMaterialIcon:
|
|
14
|
+
KvLendAmountButton: D,
|
|
15
|
+
KvUiButton: S,
|
|
16
|
+
KvUiSelect: P,
|
|
17
|
+
KvMaterialIcon: I,
|
|
18
|
+
KvCartPill: F
|
|
17
19
|
},
|
|
18
20
|
props: {
|
|
19
21
|
loan: {
|
|
@@ -99,6 +101,10 @@ const w = "Other", O = {
|
|
|
99
101
|
kvTrackCategory: {
|
|
100
102
|
type: String,
|
|
101
103
|
default: "Lending"
|
|
104
|
+
},
|
|
105
|
+
showPill: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: !1
|
|
102
108
|
}
|
|
103
109
|
},
|
|
104
110
|
data() {
|
|
@@ -106,7 +112,7 @@ const w = "Other", O = {
|
|
|
106
112
|
return {
|
|
107
113
|
mdiChevronRight: x,
|
|
108
114
|
defaultAmountOptions: [25, 50, 75],
|
|
109
|
-
selectedOption:
|
|
115
|
+
selectedOption: B(
|
|
110
116
|
this.getCookie,
|
|
111
117
|
this.setCookie,
|
|
112
118
|
this.enableFiveDollarsNotes,
|
|
@@ -115,8 +121,8 @@ const w = "Other", O = {
|
|
|
115
121
|
this.userBalance,
|
|
116
122
|
this.fiveDollarsSelected
|
|
117
123
|
),
|
|
118
|
-
selectedDropdownOption:
|
|
119
|
-
OTHER_OPTION:
|
|
124
|
+
selectedDropdownOption: k,
|
|
125
|
+
OTHER_OPTION: k
|
|
120
126
|
};
|
|
121
127
|
},
|
|
122
128
|
computed: {
|
|
@@ -166,7 +172,7 @@ const w = "Other", O = {
|
|
|
166
172
|
if (this.prices.length === 4)
|
|
167
173
|
return [];
|
|
168
174
|
const e = this.prices.slice(this.defaultAmountOptions.length);
|
|
169
|
-
return e.unshift(
|
|
175
|
+
return e.unshift(k), e;
|
|
170
176
|
},
|
|
171
177
|
loanName() {
|
|
172
178
|
var e;
|
|
@@ -232,7 +238,7 @@ const w = "Other", O = {
|
|
|
232
238
|
return this.isLentTo && !this.isLessThan25;
|
|
233
239
|
},
|
|
234
240
|
selectedDropdown() {
|
|
235
|
-
return this.selectedDropdownOption !==
|
|
241
|
+
return this.selectedDropdownOption !== k;
|
|
236
242
|
},
|
|
237
243
|
showFilteredDropdown() {
|
|
238
244
|
return this.presetDropdownPrices.length > 1;
|
|
@@ -243,17 +249,17 @@ const w = "Other", O = {
|
|
|
243
249
|
},
|
|
244
250
|
watch: {
|
|
245
251
|
unreservedAmount(e, s) {
|
|
246
|
-
var n,
|
|
247
|
-
e !== s && s === "" && (this.selectedOption =
|
|
252
|
+
var n, A;
|
|
253
|
+
e !== s && s === "" && (this.selectedOption = B(
|
|
248
254
|
this.getCookie,
|
|
249
255
|
this.setCookie,
|
|
250
256
|
this.enableFiveDollarsNotes,
|
|
251
|
-
(
|
|
257
|
+
(A = (n = this.route) == null ? void 0 : n.query) == null ? void 0 : A.utm_campaign,
|
|
252
258
|
e,
|
|
253
259
|
this.userBalance,
|
|
254
260
|
this.fiveDollarsSelected,
|
|
255
261
|
this.showPresetAmounts
|
|
256
|
-
)), this.showPresetAmounts && (this.selectedOption =
|
|
262
|
+
)), this.showPresetAmounts && (this.selectedOption = k);
|
|
257
263
|
}
|
|
258
264
|
},
|
|
259
265
|
methods: {
|
|
@@ -303,7 +309,7 @@ const w = "Other", O = {
|
|
|
303
309
|
e,
|
|
304
310
|
this.loanId,
|
|
305
311
|
this.loanId
|
|
306
|
-
), this.selectedOption = e, this.selectedDropdownOption =
|
|
312
|
+
), this.selectedOption = e, this.selectedDropdownOption = k;
|
|
307
313
|
},
|
|
308
314
|
handleCheckout() {
|
|
309
315
|
this.kvTrackFunction(
|
|
@@ -315,161 +321,201 @@ const w = "Other", O = {
|
|
|
315
321
|
);
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
|
-
},
|
|
319
|
-
key:
|
|
324
|
+
}, H = { class: "tw-whitespace-nowrap" }, M = {
|
|
325
|
+
key: 3,
|
|
320
326
|
class: "tw-w-full tw-text-center tw-rounded tw-p-2",
|
|
321
327
|
style: { background: "#f1f1f1" }
|
|
322
|
-
},
|
|
328
|
+
}, K = { class: "tw-flex" }, R = ["disabled"], U = ["value"], j = {
|
|
323
329
|
key: 1,
|
|
324
330
|
class: "amountDropdownWrapper"
|
|
325
|
-
},
|
|
326
|
-
function
|
|
327
|
-
const
|
|
328
|
-
return i(),
|
|
329
|
-
|
|
331
|
+
}, z = ["value"];
|
|
332
|
+
function E(e, s, n, A, c, t) {
|
|
333
|
+
const C = y("kv-cart-pill"), m = y("kv-ui-button"), b = y("kv-material-icon"), g = y("kv-ui-select"), T = y("kv-lend-amount-button");
|
|
334
|
+
return i(), l("div", H, [
|
|
335
|
+
n.showPill && n.showPresetAmounts ? (i(), a(C, {
|
|
330
336
|
key: 0,
|
|
337
|
+
"borrower-name": t.loanName,
|
|
338
|
+
class: "!tw-w-full tw-justify-center tw-pb-2"
|
|
339
|
+
}, {
|
|
340
|
+
icon: r(() => s[5] || (s[5] = [
|
|
341
|
+
u("svg", {
|
|
342
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
343
|
+
width: "25",
|
|
344
|
+
height: "24",
|
|
345
|
+
viewBox: "0 0 25 24",
|
|
346
|
+
fill: "none",
|
|
347
|
+
class: "tw-min-w-3"
|
|
348
|
+
}, [
|
|
349
|
+
u("mask", {
|
|
350
|
+
id: "mask0_5025_974",
|
|
351
|
+
style: { "mask-type": "alpha" },
|
|
352
|
+
maskUnits: "userSpaceOnUse",
|
|
353
|
+
x: "0",
|
|
354
|
+
y: "0",
|
|
355
|
+
width: "25",
|
|
356
|
+
height: "24"
|
|
357
|
+
}, [
|
|
358
|
+
u("rect", {
|
|
359
|
+
x: "0.5",
|
|
360
|
+
width: "24",
|
|
361
|
+
height: "24",
|
|
362
|
+
fill: "#D9D9D9"
|
|
363
|
+
})
|
|
364
|
+
]),
|
|
365
|
+
u("g", { mask: "url(#mask0_5025_974)" }, [
|
|
366
|
+
u("path", {
|
|
367
|
+
d: "M12.5001 21L9.1251 22.125C9.00843 22.1583 8.9001 22.1833 8.8001 22.2C8.7001 22.2167 8.6001 22.225 8.5001 22.225C7.96676 22.225 7.5001 22.0375 7.1001 21.6625C6.7001 21.2875 6.5001 20.8083 6.5001 20.225V14.775L3.9001 10.55C3.8001 10.3833 3.7251 10.2125 3.6751 10.0375C3.6251 9.8625 3.6001 9.68333 3.6001 9.5C3.6001 9.31667 3.6251 9.1375 3.6751 8.9625C3.7251 8.7875 3.8001 8.61667 3.9001 8.45L7.3001 2.95C7.48343 2.65 7.7251 2.41667 8.0251 2.25C8.3251 2.08333 8.6501 2 9.0001 2H16.0001C16.3501 2 16.6751 2.08333 16.9751 2.25C17.2751 2.41667 17.5168 2.65 17.7001 2.95L21.1001 8.45C21.2001 8.61667 21.2751 8.7875 21.3251 8.9625C21.3751 9.1375 21.4001 9.31667 21.4001 9.5C21.4001 9.68333 21.3751 9.8625 21.3251 10.0375C21.2751 10.2125 21.2001 10.3833 21.1001 10.55L18.5001 14.775V20.225C18.5001 20.8083 18.3001 21.2875 17.9001 21.6625C17.5001 22.0375 17.0334 22.225 16.5001 22.225C16.4001 22.225 16.3001 22.2167 16.2001 22.2C16.1001 22.1833 15.9918 22.1583 15.8751 22.125L12.5001 21ZM9.0001 15H16.0001L19.4001 9.5L16.0001 4H9.0001L5.6001 9.5L9.0001 15ZM11.4501 10.75L14.9751 7.2C15.1584 7 15.3876 6.90417 15.6626 6.9125C15.9376 6.92083 16.1751 7.01667 16.3751 7.2C16.5751 7.4 16.6793 7.6375 16.6876 7.9125C16.6959 8.1875 16.6001 8.425 16.4001 8.625L12.1501 12.875C11.9501 13.075 11.7168 13.175 11.4501 13.175C11.1834 13.175 10.9501 13.075 10.7501 12.875L8.6251 10.75C8.4251 10.55 8.3251 10.3125 8.3251 10.0375C8.3251 9.7625 8.4251 9.525 8.6251 9.325C8.8251 9.125 9.0626 9.025 9.3376 9.025C9.6126 9.025 9.8501 9.125 10.0501 9.325L11.4501 10.75Z",
|
|
368
|
+
fill: "#757575"
|
|
369
|
+
})
|
|
370
|
+
])
|
|
371
|
+
], -1)
|
|
372
|
+
])),
|
|
373
|
+
_: 1
|
|
374
|
+
}, 8, ["borrower-name"])) : d("", !0),
|
|
375
|
+
t.isInBasket ? (i(), a(m, {
|
|
376
|
+
key: 1,
|
|
331
377
|
variant: "secondary",
|
|
332
|
-
class:
|
|
378
|
+
class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": n.showPresetAmounts }]),
|
|
333
379
|
"data-testid": "bp-lend-cta-checkout-button",
|
|
334
380
|
to: n.externalLinks ? void 0 : "/basket",
|
|
335
381
|
href: n.externalLinks ? "/basket" : void 0,
|
|
336
382
|
onClick: s[0] || (s[0] = (o) => t.clickSecondaryButton(o))
|
|
337
383
|
}, {
|
|
338
|
-
default:
|
|
339
|
-
|
|
384
|
+
default: r(() => [
|
|
385
|
+
w(f(t.loanInBasketButtonText), 1)
|
|
340
386
|
]),
|
|
341
387
|
_: 1
|
|
342
|
-
}, 8, ["class", "to", "href"])) : t.showNonActionableLoanButton ? (i(),
|
|
343
|
-
key:
|
|
388
|
+
}, 8, ["class", "to", "href"])) : t.showNonActionableLoanButton ? (i(), a(m, {
|
|
389
|
+
key: 2,
|
|
344
390
|
class: "tw-inline-flex tw-flex-1"
|
|
345
391
|
}, {
|
|
346
|
-
default:
|
|
347
|
-
|
|
392
|
+
default: r(() => [
|
|
393
|
+
w(f(t.ctaButtonText), 1)
|
|
348
394
|
]),
|
|
349
395
|
_: 1
|
|
350
|
-
})) : t.isFunded ? (i(),
|
|
351
|
-
key:
|
|
396
|
+
})) : t.isFunded ? (i(), l("div", M, " This loan was just funded! 🎉 ")) : n.showViewLoan ? (i(), a(m, {
|
|
397
|
+
key: 4,
|
|
352
398
|
state: `${t.allSharesReserved ? "disabled" : ""}`,
|
|
353
399
|
to: n.externalLinks ? void 0 : t.readMorePath,
|
|
354
400
|
href: n.externalLinks ? t.readMorePath : void 0,
|
|
355
401
|
class: "tw-mb-0",
|
|
356
402
|
onClick: s[1] || (s[1] = (o) => e.$emit("show-loan-details", o))
|
|
357
403
|
}, {
|
|
358
|
-
default:
|
|
359
|
-
|
|
360
|
-
s[
|
|
361
|
-
|
|
404
|
+
default: r(() => [
|
|
405
|
+
u("span", K, [
|
|
406
|
+
s[6] || (s[6] = w(" View loan ")),
|
|
407
|
+
O(b, {
|
|
362
408
|
class: "tw-w-3 tw-h-3 tw-align-middle",
|
|
363
|
-
icon:
|
|
409
|
+
icon: c.mdiChevronRight
|
|
364
410
|
}, null, 8, ["icon"])
|
|
365
411
|
])
|
|
366
412
|
]),
|
|
367
413
|
_: 1
|
|
368
|
-
}, 8, ["state", "to", "href"])) : t.useFormSubmit ? (i(),
|
|
369
|
-
key:
|
|
414
|
+
}, 8, ["state", "to", "href"])) : t.useFormSubmit ? (i(), l("form", {
|
|
415
|
+
key: 5,
|
|
370
416
|
class: "tw-w-full tw-flex",
|
|
371
|
-
onSubmit: s[4] || (s[4] =
|
|
417
|
+
onSubmit: s[4] || (s[4] = v((...o) => t.addToBasket && t.addToBasket(...o), ["prevent"]))
|
|
372
418
|
}, [
|
|
373
|
-
|
|
374
|
-
class:
|
|
419
|
+
u("fieldset", {
|
|
420
|
+
class: h(["tw-w-full tw-flex", {
|
|
375
421
|
"tw-flex-col md:tw-flex-row md:tw-justify-between": n.showPresetAmounts,
|
|
376
422
|
"tw-gap-1.5": n.showPresetAmounts && !t.isLendAmountButton
|
|
377
423
|
}]),
|
|
378
424
|
disabled: n.isAdding,
|
|
379
425
|
"data-testid": "bp-lend-cta-select-and-button"
|
|
380
426
|
}, [
|
|
381
|
-
n.showPresetAmounts && !n.isAdding ? (i(),
|
|
427
|
+
n.showPresetAmounts && !n.isAdding ? (i(), l("div", {
|
|
382
428
|
key: 0,
|
|
383
|
-
class:
|
|
429
|
+
class: h(["tw-flex tw-gap-1 lg:tw-gap-2", { "tw-flex-wrap md:tw-flex-nowrap": n.enableHugeAmount }])
|
|
384
430
|
}, [
|
|
385
|
-
t.isLendAmountButton ?
|
|
431
|
+
t.isLendAmountButton ? d("", !0) : (i(!0), l(p, { key: 0 }, L(t.presetButtonsPrices, (o) => (i(), a(m, {
|
|
386
432
|
key: o,
|
|
387
433
|
variant: "secondary",
|
|
388
|
-
class:
|
|
434
|
+
class: h(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": c.selectedOption == o }]),
|
|
389
435
|
"data-testid": "bp-lend-cta-lend-button",
|
|
390
|
-
onClick: (
|
|
436
|
+
onClick: (q) => t.clickPresetButton(o)
|
|
391
437
|
}, {
|
|
392
|
-
default:
|
|
393
|
-
|
|
438
|
+
default: r(() => [
|
|
439
|
+
w(" $" + f(o), 1)
|
|
394
440
|
]),
|
|
395
441
|
_: 2
|
|
396
442
|
}, 1032, ["class", "onClick"]))), 128)),
|
|
397
|
-
t.showFilteredDropdown ? (i(),
|
|
443
|
+
t.showFilteredDropdown ? (i(), a(g, {
|
|
398
444
|
key: 1,
|
|
399
445
|
id: `LoanAmountDropdown_${t.loanId}`,
|
|
400
|
-
modelValue:
|
|
446
|
+
modelValue: c.selectedDropdownOption,
|
|
401
447
|
"onUpdate:modelValue": [
|
|
402
|
-
s[2] || (s[2] = (o) =>
|
|
448
|
+
s[2] || (s[2] = (o) => c.selectedDropdownOption = o),
|
|
403
449
|
t.trackLendAmountSelection
|
|
404
450
|
],
|
|
405
|
-
class:
|
|
451
|
+
class: h(["tw-min-w-12 tw-rounded filtered-dropdown", {
|
|
406
452
|
"unselected-dropdown": !t.selectedDropdown,
|
|
407
453
|
"selected-dropdown": t.selectedDropdown,
|
|
408
454
|
"tw-w-full": n.enableHugeAmount
|
|
409
455
|
}]),
|
|
410
456
|
"aria-label": "Lend amount",
|
|
411
|
-
onClick:
|
|
457
|
+
onClick: v(t.clickDropdown, ["stop"])
|
|
412
458
|
}, {
|
|
413
|
-
default:
|
|
414
|
-
(i(!0),
|
|
459
|
+
default: r(() => [
|
|
460
|
+
(i(!0), l(p, null, L(t.presetDropdownPrices, (o) => (i(), l("option", {
|
|
415
461
|
key: o,
|
|
416
462
|
value: o
|
|
417
|
-
}, f(o !==
|
|
463
|
+
}, f(o !== c.OTHER_OPTION ? `$${o}` : o), 9, U))), 128))
|
|
418
464
|
]),
|
|
419
465
|
_: 1
|
|
420
|
-
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) :
|
|
421
|
-
], 2)) : n.showPresetAmounts ?
|
|
422
|
-
t.hideShowLendDropdown && !t.isLessThan25 ? (i(),
|
|
466
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : d("", !0)
|
|
467
|
+
], 2)) : n.showPresetAmounts ? d("", !0) : (i(), l("div", j, [
|
|
468
|
+
t.hideShowLendDropdown && !t.isLessThan25 ? (i(), a(g, {
|
|
423
469
|
key: 0,
|
|
424
470
|
id: `LoanAmountDropdown_${t.loanId}`,
|
|
425
|
-
modelValue:
|
|
471
|
+
modelValue: c.selectedOption,
|
|
426
472
|
"onUpdate:modelValue": [
|
|
427
|
-
s[3] || (s[3] = (o) =>
|
|
473
|
+
s[3] || (s[3] = (o) => c.selectedOption = o),
|
|
428
474
|
t.trackLendAmountSelection
|
|
429
475
|
],
|
|
430
476
|
class: "tw-min-w-12",
|
|
431
477
|
style: { "border-radius": "14px 0 0 14px" },
|
|
432
478
|
"aria-label": "Lend amount",
|
|
433
|
-
onClick:
|
|
479
|
+
onClick: v(t.clickDropdown, ["stop"])
|
|
434
480
|
}, {
|
|
435
|
-
default:
|
|
436
|
-
(i(!0),
|
|
481
|
+
default: r(() => [
|
|
482
|
+
(i(!0), l(p, null, L(t.prices, (o) => (i(), l("option", {
|
|
437
483
|
key: o,
|
|
438
484
|
value: o
|
|
439
|
-
}, " $" + f(o), 9,
|
|
485
|
+
}, " $" + f(o), 9, z))), 128))
|
|
440
486
|
]),
|
|
441
487
|
_: 1
|
|
442
|
-
}, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) :
|
|
488
|
+
}, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : d("", !0)
|
|
443
489
|
])),
|
|
444
|
-
|
|
445
|
-
class:
|
|
490
|
+
u("div", {
|
|
491
|
+
class: h({
|
|
446
492
|
lendButtonWrapper: t.hideShowLendDropdown && !n.showPresetAmounts,
|
|
447
493
|
"tw-hidden": t.hideLendButton
|
|
448
494
|
})
|
|
449
495
|
}, [
|
|
450
|
-
t.lendButtonVisibility && !t.isLessThan25 ? (i(),
|
|
496
|
+
t.lendButtonVisibility && !t.isLessThan25 ? (i(), a(m, {
|
|
451
497
|
key: "lendButton",
|
|
452
|
-
class:
|
|
498
|
+
class: h(["tw-inline-flex tw-flex-1", { "tw-w-full": n.showPresetAmounts }]),
|
|
453
499
|
"data-testid": "bp-lend-cta-lend-button",
|
|
454
500
|
type: "submit"
|
|
455
501
|
}, {
|
|
456
|
-
default:
|
|
457
|
-
|
|
502
|
+
default: r(() => [
|
|
503
|
+
w(f(t.ctaButtonText), 1)
|
|
458
504
|
]),
|
|
459
505
|
_: 1
|
|
460
|
-
}, 8, ["class"])) : t.showLendAgain ? (i(),
|
|
506
|
+
}, 8, ["class"])) : t.showLendAgain ? (i(), a(m, {
|
|
461
507
|
key: "lendAgainButton",
|
|
462
|
-
class:
|
|
508
|
+
class: h(["lend-again", { "tw-w-full": n.showPresetAmounts }]),
|
|
463
509
|
"data-testid": "bp-lend-cta-lend-again-button",
|
|
464
510
|
type: "submit"
|
|
465
511
|
}, {
|
|
466
|
-
default:
|
|
467
|
-
|
|
512
|
+
default: r(() => [
|
|
513
|
+
w(f(n.primaryButtonText || "Lend") + " again ", 1)
|
|
468
514
|
]),
|
|
469
515
|
_: 1
|
|
470
|
-
}, 8, ["class"])) :
|
|
516
|
+
}, 8, ["class"])) : d("", !0)
|
|
471
517
|
], 2),
|
|
472
|
-
t.isLendAmountButton && !n.enableFiveDollarsNotes ? (i(),
|
|
518
|
+
t.isLendAmountButton && !n.enableFiveDollarsNotes ? (i(), a(T, {
|
|
473
519
|
key: 2,
|
|
474
520
|
class: "tw-w-full",
|
|
475
521
|
"loan-id": t.loanId,
|
|
@@ -477,21 +523,21 @@ function j(e, s, n, y, h, t) {
|
|
|
477
523
|
"amount-left": t.unreservedAmount,
|
|
478
524
|
"is-adding": n.isAdding,
|
|
479
525
|
onAddToBasket: t.addToBasket
|
|
480
|
-
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) :
|
|
481
|
-
!n.isLoading && n.isAdding ? (i(),
|
|
526
|
+
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : d("", !0),
|
|
527
|
+
!n.isLoading && n.isAdding ? (i(), a(m, {
|
|
482
528
|
key: 3,
|
|
483
529
|
class: "tw-inline-flex tw-flex-1"
|
|
484
530
|
}, {
|
|
485
|
-
default:
|
|
486
|
-
|
|
531
|
+
default: r(() => s[7] || (s[7] = [
|
|
532
|
+
w(" Adding to basket ")
|
|
487
533
|
])),
|
|
488
534
|
_: 1
|
|
489
|
-
})) :
|
|
490
|
-
], 10,
|
|
491
|
-
], 32)) :
|
|
535
|
+
})) : d("", !0)
|
|
536
|
+
], 10, R)
|
|
537
|
+
], 32)) : d("", !0)
|
|
492
538
|
]);
|
|
493
539
|
}
|
|
494
|
-
const
|
|
540
|
+
const ne = /* @__PURE__ */ V(N, [["render", E], ["__scopeId", "data-v-86580946"]]);
|
|
495
541
|
export {
|
|
496
|
-
|
|
542
|
+
ne as default
|
|
497
543
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"embla-carousel-fade",
|
|
108
108
|
"popper.js"
|
|
109
109
|
],
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "c48711e01a00c355cafbf20f47114c3d2716d2d0"
|
|
111
111
|
}
|