@kiva/kv-components 6.52.7 → 6.52.9
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/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-629f4bdf] select{border-radius:14px 0 0 14px}.lend-again[data-v-629f4bdf] span{padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-629f4bdf] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-629f4bdf] select{cursor:pointer;border-radius:1rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-629f4bdf] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.preset-option[data-v-629f4bdf] 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-dropdown[data-v-629f4bdf] select,.selected-option[data-v-629f4bdf] span.tw-w-full:first-child{--tw-border-opacity: 1;border-color:rgba(var(--border-action),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--bg-secondary),var(--tw-bg-opacity, 1))}.button-ellipsis[data-v-629f4bdf] span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 410px){.mobile-dropdown-small[data-v-629f4bdf]{flex:0 0 40%}}
|
package/dist/vue/KvLendCta.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mdiChevronRight as
|
|
1
|
+
import T from "graphql-tag";
|
|
2
|
+
import { mdiChevronRight as N } from "@mdi/js";
|
|
3
3
|
import { throttle as C } from "../utils/throttle.js";
|
|
4
|
-
import { getLendCtaSelectedOption as
|
|
5
|
-
import
|
|
4
|
+
import { getLendCtaSelectedOption as L, getDropdownPriceArray as I } from "../utils/loanUtils.js";
|
|
5
|
+
import R from "./KvLendAmountButton.js";
|
|
6
6
|
import S from "./KvSelect.js";
|
|
7
7
|
import F from "./KvButton.js";
|
|
8
|
-
import
|
|
9
|
-
import { resolveComponent as
|
|
8
|
+
import V from "./KvMaterialIcon.js";
|
|
9
|
+
import { resolveComponent as v, openBlock as o, createElementBlock as i, createBlock as a, withCtx as r, createTextVNode as f, toDisplayString as u, createElementVNode as h, createVNode as y, withModifiers as A, normalizeClass as w, Fragment as k, renderList as p, createCommentVNode as c } from "vue";
|
|
10
10
|
import "./KvLendCta.css";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import W from "../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const _ = "Other", E = 430, g = 480, x = 380, De = T`
|
|
13
13
|
fragment KvLendCta on LoanBasic {
|
|
14
14
|
id
|
|
15
15
|
name
|
|
16
16
|
status
|
|
17
17
|
minNoteSize
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, ye = T`
|
|
20
20
|
fragment KvLendCtaUser on LoanBasic {
|
|
21
21
|
id
|
|
22
22
|
userProperties {
|
|
23
23
|
lentTo
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`, K = {
|
|
27
27
|
name: "KvLendCta",
|
|
28
28
|
components: {
|
|
29
|
-
KvLendAmountButton:
|
|
29
|
+
KvLendAmountButton: R,
|
|
30
30
|
KvUiButton: F,
|
|
31
31
|
KvUiSelect: S,
|
|
32
|
-
KvMaterialIcon:
|
|
32
|
+
KvMaterialIcon: V
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
35
35
|
loan: {
|
|
@@ -123,28 +123,47 @@ const p = "Other", E = 430, ce = b`
|
|
|
123
123
|
kvTrackCategory: {
|
|
124
124
|
type: String,
|
|
125
125
|
default: "Lending"
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* Breakpoint for narrow desktop layout (default: 480px)
|
|
129
|
+
* When component width is below this, it will use stacked layout even on desktop
|
|
130
|
+
*/
|
|
131
|
+
narrowSidebarBreakpoint: {
|
|
132
|
+
type: Number,
|
|
133
|
+
default: g
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Breakpoint for narrow desktop dropdown layout (default: 380px)
|
|
137
|
+
* When component width is below this in narrow desktop mode, dropdown moves to second row
|
|
138
|
+
*/
|
|
139
|
+
narrowSidebarDropdownBreakpoint: {
|
|
140
|
+
type: Number,
|
|
141
|
+
default: x
|
|
126
142
|
}
|
|
127
143
|
},
|
|
128
144
|
data() {
|
|
129
|
-
var
|
|
145
|
+
var n, s;
|
|
130
146
|
return {
|
|
131
|
-
mdiChevronRight:
|
|
147
|
+
mdiChevronRight: N,
|
|
132
148
|
defaultAmountOptions: [25, 50, 75],
|
|
133
|
-
selectedOption:
|
|
149
|
+
selectedOption: L(
|
|
134
150
|
this.getCookie,
|
|
135
151
|
this.setCookie,
|
|
136
152
|
this.enableFiveDollarsNotes,
|
|
137
|
-
(s = (
|
|
153
|
+
(s = (n = this.route) == null ? void 0 : n.query) == null ? void 0 : s.utm_campaign,
|
|
138
154
|
this.unreservedAmount,
|
|
139
155
|
this.userBalance,
|
|
140
156
|
this.fiveDollarsSelected
|
|
141
157
|
),
|
|
142
|
-
selectedDropdownOption:
|
|
143
|
-
OTHER_OPTION:
|
|
158
|
+
selectedDropdownOption: _,
|
|
159
|
+
OTHER_OPTION: _,
|
|
144
160
|
// SSR-safe viewport width initialization
|
|
145
161
|
viewportWidth: typeof window < "u" ? window.innerWidth : 1024,
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
componentWidth: 1024,
|
|
163
|
+
resizeObserver: null,
|
|
164
|
+
MOBILE_DROPDOWN_BREAKPOINT: E,
|
|
165
|
+
NARROW_SIDEBAR_BREAKPOINT: g,
|
|
166
|
+
NARROW_SIDEBAR_DROPDOWN_BREAKPOINT: x
|
|
148
167
|
};
|
|
149
168
|
},
|
|
150
169
|
computed: {
|
|
@@ -152,52 +171,52 @@ const p = "Other", E = 430, ce = b`
|
|
|
152
171
|
return this.customLoanDetails ? "" : `/lend/${this.loanId}`;
|
|
153
172
|
},
|
|
154
173
|
loanId() {
|
|
155
|
-
var
|
|
156
|
-
return (
|
|
174
|
+
var n;
|
|
175
|
+
return (n = this.loan) == null ? void 0 : n.id;
|
|
157
176
|
},
|
|
158
177
|
status() {
|
|
159
|
-
var
|
|
160
|
-
return ((
|
|
178
|
+
var n;
|
|
179
|
+
return ((n = this.loan) == null ? void 0 : n.status) ?? "";
|
|
161
180
|
},
|
|
162
181
|
minNoteSize() {
|
|
163
|
-
var
|
|
164
|
-
return ((
|
|
182
|
+
var n;
|
|
183
|
+
return ((n = this.loan) == null ? void 0 : n.minNoteSize) ?? "";
|
|
165
184
|
},
|
|
166
185
|
lentPreviously() {
|
|
167
|
-
var
|
|
168
|
-
return ((s = (
|
|
186
|
+
var n, s;
|
|
187
|
+
return ((s = (n = this.loan) == null ? void 0 : n.userProperties) == null ? void 0 : s.lentTo) ?? !1;
|
|
169
188
|
},
|
|
170
189
|
isInBasket() {
|
|
171
|
-
var
|
|
172
|
-
return ((
|
|
190
|
+
var n;
|
|
191
|
+
return ((n = this.basketItems) == null ? void 0 : n.some((s) => s.__typename === "LoanReservation" && s.id === this.loanId)) ?? !1;
|
|
173
192
|
},
|
|
174
193
|
prices() {
|
|
175
|
-
const
|
|
194
|
+
const n = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25), s = I(
|
|
176
195
|
this.unreservedAmount,
|
|
177
196
|
this.isCompleteLoanActive,
|
|
178
|
-
|
|
197
|
+
n,
|
|
179
198
|
this.enableFiveDollarsNotes,
|
|
180
199
|
this.isVisitor
|
|
181
200
|
);
|
|
182
|
-
return this.maxAmount ? s.filter((
|
|
201
|
+
return this.maxAmount ? s.filter((l) => parseFloat(l) <= parseFloat(this.maxAmount)) : s;
|
|
183
202
|
},
|
|
184
203
|
presetButtonsPrices() {
|
|
185
|
-
const
|
|
186
|
-
return this.prices.length === 4 &&
|
|
204
|
+
const n = this.prices.slice(0, 3);
|
|
205
|
+
return this.prices.length === 4 && n.push(this.prices[3]), n;
|
|
187
206
|
},
|
|
188
207
|
presetDropdownPrices() {
|
|
189
208
|
if (this.prices.length === 4)
|
|
190
209
|
return [];
|
|
191
|
-
const
|
|
192
|
-
return
|
|
210
|
+
const n = this.prices.slice(this.defaultAmountOptions.length);
|
|
211
|
+
return n.unshift(_), n;
|
|
193
212
|
},
|
|
194
213
|
loanName() {
|
|
195
|
-
var
|
|
196
|
-
return ((
|
|
214
|
+
var n;
|
|
215
|
+
return ((n = this.loan) == null ? void 0 : n.name) ?? "";
|
|
197
216
|
},
|
|
198
217
|
presetAmountCtaButtonText() {
|
|
199
|
-
var
|
|
200
|
-
return ((
|
|
218
|
+
var n;
|
|
219
|
+
return ((n = this.loan) == null ? void 0 : n.borrowerCount) > 1 ? "Support" : `Support ${this.loanName}`;
|
|
201
220
|
},
|
|
202
221
|
defaultCtaButtonText() {
|
|
203
222
|
return this.showPresetAmounts ? this.presetAmountCtaButtonText : this.primaryButtonText || "Lend";
|
|
@@ -243,8 +262,8 @@ const p = "Other", E = 430, ce = b`
|
|
|
243
262
|
return this.isAmountLessThan25(this.unreservedAmount) || this.isAmountBetween25And500(this.unreservedAmount);
|
|
244
263
|
},
|
|
245
264
|
isLendAmountButton() {
|
|
246
|
-
const
|
|
247
|
-
return (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(
|
|
265
|
+
const n = this.maxAmount ? this.maxAmount : this.unreservedAmount;
|
|
266
|
+
return (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(n) || this.showPresetAmounts && this.presetButtonsPrices.length === 1 && !this.isAdding;
|
|
248
267
|
},
|
|
249
268
|
isFunded() {
|
|
250
269
|
return this.state === "funded" || this.state === "fully-reserved";
|
|
@@ -259,37 +278,48 @@ const p = "Other", E = 430, ce = b`
|
|
|
259
278
|
return this.isLentTo && !this.isLessThan25;
|
|
260
279
|
},
|
|
261
280
|
selectedDropdown() {
|
|
262
|
-
return this.selectedDropdownOption !==
|
|
281
|
+
return this.selectedDropdownOption !== _;
|
|
263
282
|
},
|
|
264
283
|
showFilteredDropdown() {
|
|
265
284
|
return this.presetDropdownPrices.length > 1;
|
|
266
285
|
},
|
|
267
286
|
hideLendButton() {
|
|
268
287
|
return this.showPresetAmounts && (this.isAdding || this.presetButtonsPrices.length === 1);
|
|
288
|
+
},
|
|
289
|
+
/**
|
|
290
|
+
* Determines if component should use narrow desktop layout
|
|
291
|
+
* This is true when we're in desktop viewport but component width is narrow
|
|
292
|
+
*/
|
|
293
|
+
isNarrowDesktop() {
|
|
294
|
+
return this.viewportWidth >= 768 && this.componentWidth < this.narrowSidebarBreakpoint;
|
|
269
295
|
}
|
|
270
296
|
},
|
|
271
297
|
watch: {
|
|
272
|
-
unreservedAmount(
|
|
273
|
-
var
|
|
274
|
-
|
|
298
|
+
unreservedAmount(n, s) {
|
|
299
|
+
var l, D;
|
|
300
|
+
n !== s && s === "" && (this.selectedOption = L(
|
|
275
301
|
this.getCookie,
|
|
276
302
|
this.setCookie,
|
|
277
303
|
this.enableFiveDollarsNotes,
|
|
278
|
-
(
|
|
279
|
-
|
|
304
|
+
(D = (l = this.route) == null ? void 0 : l.query) == null ? void 0 : D.utm_campaign,
|
|
305
|
+
n,
|
|
280
306
|
this.userBalance,
|
|
281
307
|
this.fiveDollarsSelected,
|
|
282
308
|
this.showPresetAmounts
|
|
283
|
-
)), this.showPresetAmounts && (this.selectedOption =
|
|
309
|
+
)), this.showPresetAmounts && (this.selectedOption = _);
|
|
284
310
|
}
|
|
285
311
|
},
|
|
286
312
|
mounted() {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
313
|
+
const n = () => {
|
|
314
|
+
var s;
|
|
315
|
+
this.viewportWidth = window.innerWidth, this.componentWidth = ((s = this.$refs.root) == null ? void 0 : s.offsetWidth) || 1024;
|
|
316
|
+
};
|
|
317
|
+
typeof window < "u" && (this.viewportWidth = window.innerWidth, window.ResizeObserver && this.$nextTick(() => {
|
|
318
|
+
this.resizeObserver = new window.ResizeObserver(C(n, 50)), this.$refs.root && (this.resizeObserver.observe(this.$refs.root), n());
|
|
319
|
+
}));
|
|
290
320
|
},
|
|
291
321
|
beforeDestroy() {
|
|
292
|
-
this.resizeHandler && typeof window < "u" && window.removeEventListener("resize", this.resizeHandler);
|
|
322
|
+
this.resizeHandler && typeof window < "u" && window.removeEventListener("resize", this.resizeHandler), this.resizeObserver && this.$refs.root && this.resizeObserver.disconnect();
|
|
293
323
|
},
|
|
294
324
|
methods: {
|
|
295
325
|
async addToBasket() {
|
|
@@ -301,20 +331,20 @@ const p = "Other", E = 430, ce = b`
|
|
|
301
331
|
this.amountToLend
|
|
302
332
|
), this.$emit("add-to-basket", this.amountToLend);
|
|
303
333
|
},
|
|
304
|
-
isAmountLessThan25(
|
|
305
|
-
return
|
|
334
|
+
isAmountLessThan25(n) {
|
|
335
|
+
return n < 25 && n > 0;
|
|
306
336
|
},
|
|
307
|
-
isAmountBetween25And50(
|
|
308
|
-
return
|
|
337
|
+
isAmountBetween25And50(n) {
|
|
338
|
+
return n <= 50 && n > 25;
|
|
309
339
|
},
|
|
310
|
-
isAmountBetween25And500(
|
|
311
|
-
return
|
|
340
|
+
isAmountBetween25And500(n) {
|
|
341
|
+
return n < 500 && n >= 25;
|
|
312
342
|
},
|
|
313
|
-
trackLendAmountSelection(
|
|
343
|
+
trackLendAmountSelection(n) {
|
|
314
344
|
this.showPresetAmounts && (this.selectedOption = null), this.kvTrackFunction(
|
|
315
345
|
this.kvTrackCategory,
|
|
316
346
|
"Modify lend amount",
|
|
317
|
-
|
|
347
|
+
n,
|
|
318
348
|
this.loanId,
|
|
319
349
|
this.loanId
|
|
320
350
|
);
|
|
@@ -328,17 +358,17 @@ const p = "Other", E = 430, ce = b`
|
|
|
328
358
|
this.loanId
|
|
329
359
|
);
|
|
330
360
|
},
|
|
331
|
-
clickSecondaryButton(
|
|
332
|
-
this.secondaryButtonHandler ? (
|
|
361
|
+
clickSecondaryButton(n) {
|
|
362
|
+
this.secondaryButtonHandler ? (n.preventDefault(), n.stopPropagation(), this.secondaryButtonHandler()) : this.handleCheckout();
|
|
333
363
|
},
|
|
334
|
-
clickPresetButton(
|
|
364
|
+
clickPresetButton(n) {
|
|
335
365
|
this.kvTrackFunction(
|
|
336
366
|
this.kvTrackCategory,
|
|
337
367
|
"Modify lend amount",
|
|
338
|
-
|
|
368
|
+
n,
|
|
339
369
|
this.loanId,
|
|
340
370
|
this.loanId
|
|
341
|
-
), this.selectedOption =
|
|
371
|
+
), this.selectedOption = n, this.selectedDropdownOption = _;
|
|
342
372
|
},
|
|
343
373
|
handleCheckout() {
|
|
344
374
|
this.kvTrackFunction(
|
|
@@ -348,145 +378,233 @@ const p = "Other", E = 430, ce = b`
|
|
|
348
378
|
this.loanId,
|
|
349
379
|
this.loanId
|
|
350
380
|
);
|
|
381
|
+
},
|
|
382
|
+
isNarrowComponent() {
|
|
383
|
+
return this.componentWidth < 430;
|
|
351
384
|
}
|
|
352
385
|
}
|
|
353
|
-
}, M = {
|
|
386
|
+
}, M = {
|
|
387
|
+
ref: "root",
|
|
388
|
+
class: "tw-whitespace-nowrap"
|
|
389
|
+
}, U = {
|
|
354
390
|
key: 2,
|
|
355
391
|
class: "tw-w-full tw-text-center tw-rounded tw-p-2",
|
|
356
392
|
style: { background: "#f1f1f1" }
|
|
357
|
-
},
|
|
393
|
+
}, z = { class: "tw-flex" }, H = ["disabled"], j = {
|
|
358
394
|
key: 0,
|
|
359
395
|
class: "md:tw-hidden tw-w-full"
|
|
360
|
-
},
|
|
361
|
-
key:
|
|
396
|
+
}, q = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, G = { class: "tw-flex tw-gap-1 tw-w-full" }, J = ["value"], Q = { class: "tw-flex tw-gap-1" }, X = ["value"], Y = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, Z = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, $ = {
|
|
397
|
+
key: 1,
|
|
398
|
+
class: "tw-w-full"
|
|
399
|
+
}, ee = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, te = { class: "tw-flex tw-gap-1 tw-w-full" }, ne = ["value"], se = { class: "tw-flex tw-gap-1" }, oe = ["value"], le = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, de = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, ie = ["value"], re = {
|
|
400
|
+
key: 3,
|
|
362
401
|
class: "amountDropdownWrapper"
|
|
363
|
-
},
|
|
364
|
-
function
|
|
365
|
-
const
|
|
366
|
-
return
|
|
367
|
-
e.isInBasket ? (
|
|
402
|
+
}, ae = ["value"];
|
|
403
|
+
function ue(n, s, l, D, d, e) {
|
|
404
|
+
const m = v("kv-ui-button"), P = v("kv-material-icon"), B = v("kv-ui-select"), O = v("kv-lend-amount-button");
|
|
405
|
+
return o(), i("div", M, [
|
|
406
|
+
e.isInBasket ? (o(), a(m, {
|
|
368
407
|
key: 0,
|
|
369
408
|
variant: "secondary",
|
|
370
409
|
class: "tw-inline-flex tw-flex-1 tw-w-full",
|
|
371
410
|
"data-testid": "bp-lend-cta-checkout-button",
|
|
372
|
-
to:
|
|
373
|
-
href:
|
|
374
|
-
onClick: s[0] || (s[0] = (
|
|
411
|
+
to: l.externalLinks ? void 0 : "/basket",
|
|
412
|
+
href: l.externalLinks ? "/basket" : void 0,
|
|
413
|
+
onClick: s[0] || (s[0] = (t) => e.clickSecondaryButton(t))
|
|
375
414
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
|
|
415
|
+
default: r(() => [
|
|
416
|
+
f(u(e.loanInBasketButtonText), 1)
|
|
378
417
|
]),
|
|
379
418
|
_: 1
|
|
380
|
-
}, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (
|
|
419
|
+
}, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (o(), a(m, {
|
|
381
420
|
key: 1,
|
|
382
421
|
class: "tw-inline-flex tw-flex-1"
|
|
383
422
|
}, {
|
|
384
|
-
default:
|
|
385
|
-
|
|
423
|
+
default: r(() => [
|
|
424
|
+
f(u(e.ctaButtonText), 1)
|
|
386
425
|
]),
|
|
387
426
|
_: 1
|
|
388
|
-
})) : e.isFunded ? (
|
|
427
|
+
})) : e.isFunded ? (o(), i("div", U, " This loan was just funded! 🎉 ")) : l.showViewLoan ? (o(), a(m, {
|
|
389
428
|
key: 3,
|
|
390
429
|
state: `${e.allSharesReserved ? "disabled" : ""}`,
|
|
391
|
-
to:
|
|
392
|
-
href:
|
|
430
|
+
to: l.externalLinks ? void 0 : e.readMorePath,
|
|
431
|
+
href: l.externalLinks ? e.readMorePath : void 0,
|
|
393
432
|
class: "tw-mb-0",
|
|
394
|
-
onClick: s[1] || (s[1] = (
|
|
433
|
+
onClick: s[1] || (s[1] = (t) => n.$emit("show-loan-details", t))
|
|
395
434
|
}, {
|
|
396
|
-
default:
|
|
397
|
-
|
|
398
|
-
s[
|
|
399
|
-
|
|
435
|
+
default: r(() => [
|
|
436
|
+
h("span", z, [
|
|
437
|
+
s[9] || (s[9] = f(" View loan ")),
|
|
438
|
+
y(P, {
|
|
400
439
|
class: "tw-w-3 tw-h-3 tw-align-middle",
|
|
401
440
|
icon: d.mdiChevronRight
|
|
402
441
|
}, null, 8, ["icon"])
|
|
403
442
|
])
|
|
404
443
|
]),
|
|
405
444
|
_: 1
|
|
406
|
-
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (
|
|
445
|
+
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (o(), i("form", {
|
|
407
446
|
key: 4,
|
|
408
447
|
class: "tw-w-full tw-flex",
|
|
409
|
-
onSubmit: s[
|
|
448
|
+
onSubmit: s[8] || (s[8] = A((...t) => e.addToBasket && e.addToBasket(...t), ["prevent"]))
|
|
410
449
|
}, [
|
|
411
|
-
|
|
412
|
-
class:
|
|
413
|
-
"tw-flex-col md:tw-flex-row md:tw-justify-between tw-min-w-0":
|
|
414
|
-
"tw-
|
|
450
|
+
h("fieldset", {
|
|
451
|
+
class: w(["tw-w-full tw-flex", {
|
|
452
|
+
"tw-flex-col md:tw-flex-row md:tw-justify-between tw-min-w-0": l.showPresetAmounts && !e.isNarrowDesktop,
|
|
453
|
+
"tw-flex-col tw-min-w-0": l.showPresetAmounts && e.isNarrowDesktop,
|
|
454
|
+
"tw-gap-1.5": l.showPresetAmounts && !e.isLendAmountButton && !l.isAdding && !e.isNarrowDesktop
|
|
415
455
|
}]),
|
|
416
|
-
disabled:
|
|
456
|
+
disabled: l.isAdding,
|
|
417
457
|
"data-testid": "bp-lend-cta-select-and-button"
|
|
418
458
|
}, [
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
(
|
|
423
|
-
key:
|
|
459
|
+
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && !e.isNarrowDesktop ? (o(), i("div", j, [
|
|
460
|
+
h("div", q, [
|
|
461
|
+
h("div", G, [
|
|
462
|
+
(o(!0), i(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
463
|
+
key: t,
|
|
424
464
|
variant: "secondary",
|
|
425
|
-
class:
|
|
465
|
+
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
426
466
|
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
427
|
-
onClick: (
|
|
467
|
+
onClick: (b) => e.clickPresetButton(t)
|
|
428
468
|
}, {
|
|
429
|
-
default:
|
|
430
|
-
|
|
469
|
+
default: r(() => [
|
|
470
|
+
f(" $ " + u(t), 1)
|
|
431
471
|
]),
|
|
432
472
|
_: 2
|
|
433
473
|
}, 1032, ["class", "onClick"]))), 128)),
|
|
434
|
-
e.showFilteredDropdown && d.viewportWidth >= d.MOBILE_DROPDOWN_BREAKPOINT ? (
|
|
474
|
+
e.showFilteredDropdown && d.viewportWidth >= d.MOBILE_DROPDOWN_BREAKPOINT ? (o(), a(B, {
|
|
435
475
|
key: 0,
|
|
436
476
|
id: `LoanAmountDropdownMobile_${e.loanId}`,
|
|
437
477
|
modelValue: d.selectedDropdownOption,
|
|
438
478
|
"onUpdate:modelValue": [
|
|
439
|
-
s[2] || (s[2] = (
|
|
479
|
+
s[2] || (s[2] = (t) => d.selectedDropdownOption = t),
|
|
440
480
|
e.trackLendAmountSelection
|
|
441
481
|
],
|
|
442
|
-
class:
|
|
482
|
+
class: w(["filtered-dropdown mobile-dropdown tw-flex-1 tw-rounded", {
|
|
443
483
|
"unselected-dropdown": !e.selectedDropdown,
|
|
444
484
|
"selected-dropdown": e.selectedDropdown
|
|
445
485
|
}]),
|
|
446
486
|
"aria-label": "Lend amount",
|
|
447
|
-
onClick:
|
|
487
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
448
488
|
}, {
|
|
449
|
-
default:
|
|
450
|
-
(
|
|
451
|
-
key:
|
|
452
|
-
value:
|
|
453
|
-
}, u(
|
|
489
|
+
default: r(() => [
|
|
490
|
+
(o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
|
|
491
|
+
key: t,
|
|
492
|
+
value: t
|
|
493
|
+
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, J))), 128))
|
|
454
494
|
]),
|
|
455
495
|
_: 1
|
|
456
496
|
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
|
|
457
497
|
]),
|
|
458
|
-
|
|
459
|
-
e.showFilteredDropdown && d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? (
|
|
498
|
+
h("div", Q, [
|
|
499
|
+
e.showFilteredDropdown && d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? (o(), a(B, {
|
|
460
500
|
key: 0,
|
|
461
501
|
id: `LoanAmountDropdownMobile_Small_${e.loanId}`,
|
|
462
502
|
modelValue: d.selectedDropdownOption,
|
|
463
503
|
"onUpdate:modelValue": [
|
|
464
|
-
s[3] || (s[3] = (
|
|
504
|
+
s[3] || (s[3] = (t) => d.selectedDropdownOption = t),
|
|
465
505
|
e.trackLendAmountSelection
|
|
466
506
|
],
|
|
467
|
-
class:
|
|
507
|
+
class: w(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
|
|
468
508
|
"unselected-dropdown": !e.selectedDropdown,
|
|
469
509
|
"selected-dropdown": e.selectedDropdown
|
|
470
510
|
}]),
|
|
471
511
|
"aria-label": "Lend amount",
|
|
472
|
-
onClick:
|
|
512
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
473
513
|
}, {
|
|
474
|
-
default:
|
|
475
|
-
(
|
|
476
|
-
key: "small-" +
|
|
477
|
-
value:
|
|
478
|
-
}, u(
|
|
514
|
+
default: r(() => [
|
|
515
|
+
(o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
|
|
516
|
+
key: "small-" + t,
|
|
517
|
+
value: t
|
|
518
|
+
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, X))), 128))
|
|
479
519
|
]),
|
|
480
520
|
_: 1
|
|
481
521
|
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0),
|
|
482
|
-
|
|
483
|
-
class:
|
|
522
|
+
y(m, {
|
|
523
|
+
class: w(["tw-inline-flex tw-flex-1 button-ellipsis", d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
|
|
484
524
|
"data-testid": "bp-lend-cta-mobile-lend-button",
|
|
485
525
|
type: "submit"
|
|
486
526
|
}, {
|
|
487
|
-
default:
|
|
488
|
-
|
|
489
|
-
|
|
527
|
+
default: r(() => [
|
|
528
|
+
h("span", Y, [
|
|
529
|
+
h("span", Z, u(e.ctaButtonText), 1)
|
|
530
|
+
])
|
|
531
|
+
]),
|
|
532
|
+
_: 1
|
|
533
|
+
}, 8, ["class"])
|
|
534
|
+
])
|
|
535
|
+
])
|
|
536
|
+
])) : c("", !0),
|
|
537
|
+
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && e.isNarrowDesktop ? (o(), i("div", $, [
|
|
538
|
+
h("div", ee, [
|
|
539
|
+
h("div", te, [
|
|
540
|
+
(o(!0), i(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
541
|
+
key: t,
|
|
542
|
+
variant: "secondary",
|
|
543
|
+
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
544
|
+
"data-testid": "bp-lend-cta-lend-button-narrow-desktop",
|
|
545
|
+
onClick: (b) => e.clickPresetButton(t)
|
|
546
|
+
}, {
|
|
547
|
+
default: r(() => [
|
|
548
|
+
f(" $ " + u(t), 1)
|
|
549
|
+
]),
|
|
550
|
+
_: 2
|
|
551
|
+
}, 1032, ["class", "onClick"]))), 128)),
|
|
552
|
+
e.showFilteredDropdown && d.componentWidth >= d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (o(), a(B, {
|
|
553
|
+
key: 0,
|
|
554
|
+
id: `LoanAmountDropdownNarrowDesktop_${e.loanId}`,
|
|
555
|
+
modelValue: d.selectedDropdownOption,
|
|
556
|
+
"onUpdate:modelValue": [
|
|
557
|
+
s[4] || (s[4] = (t) => d.selectedDropdownOption = t),
|
|
558
|
+
e.trackLendAmountSelection
|
|
559
|
+
],
|
|
560
|
+
class: w(["filtered-dropdown mobile-dropdown tw-flex-1 tw-rounded", {
|
|
561
|
+
"unselected-dropdown": !e.selectedDropdown,
|
|
562
|
+
"selected-dropdown": e.selectedDropdown
|
|
563
|
+
}]),
|
|
564
|
+
"aria-label": "Lend amount",
|
|
565
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
566
|
+
}, {
|
|
567
|
+
default: r(() => [
|
|
568
|
+
(o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
|
|
569
|
+
key: t,
|
|
570
|
+
value: t
|
|
571
|
+
}, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, ne))), 128))
|
|
572
|
+
]),
|
|
573
|
+
_: 1
|
|
574
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
|
|
575
|
+
]),
|
|
576
|
+
h("div", se, [
|
|
577
|
+
e.showFilteredDropdown && d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (o(), a(B, {
|
|
578
|
+
key: 0,
|
|
579
|
+
id: `LoanAmountDropdownNarrowDesktop_Small_${e.loanId}`,
|
|
580
|
+
modelValue: d.selectedDropdownOption,
|
|
581
|
+
"onUpdate:modelValue": [
|
|
582
|
+
s[5] || (s[5] = (t) => d.selectedDropdownOption = t),
|
|
583
|
+
e.trackLendAmountSelection
|
|
584
|
+
],
|
|
585
|
+
class: w(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
|
|
586
|
+
"unselected-dropdown": !e.selectedDropdown,
|
|
587
|
+
"selected-dropdown": e.selectedDropdown
|
|
588
|
+
}]),
|
|
589
|
+
"aria-label": "Lend amount",
|
|
590
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
591
|
+
}, {
|
|
592
|
+
default: r(() => [
|
|
593
|
+
(o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
|
|
594
|
+
key: "narrow-small-" + t,
|
|
595
|
+
value: t
|
|
596
|
+
}, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, oe))), 128))
|
|
597
|
+
]),
|
|
598
|
+
_: 1
|
|
599
|
+
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0),
|
|
600
|
+
y(m, {
|
|
601
|
+
class: w(["tw-inline-flex tw-flex-1 button-ellipsis", d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
|
|
602
|
+
"data-testid": "bp-lend-cta-narrow-desktop-lend-button",
|
|
603
|
+
type: "submit"
|
|
604
|
+
}, {
|
|
605
|
+
default: r(() => [
|
|
606
|
+
h("span", le, [
|
|
607
|
+
h("span", de, u(e.ctaButtonText), 1)
|
|
490
608
|
])
|
|
491
609
|
]),
|
|
492
610
|
_: 1
|
|
@@ -494,126 +612,126 @@ function ee(t, s, o, L, d, e) {
|
|
|
494
612
|
])
|
|
495
613
|
])
|
|
496
614
|
])) : c("", !0),
|
|
497
|
-
|
|
498
|
-
key:
|
|
499
|
-
class:
|
|
615
|
+
l.showPresetAmounts && !l.isAdding && !e.isNarrowDesktop ? (o(), i("div", {
|
|
616
|
+
key: 2,
|
|
617
|
+
class: w({
|
|
500
618
|
"tw-flex tw-gap-0.5 md:tw-gap-1 lg:tw-gap-1 tw-flex-wrap md:tw-flex-nowrap": !0,
|
|
501
619
|
"tw-hidden md:tw-flex": !e.isLendAmountButton && e.presetButtonsPrices.length > 1
|
|
502
620
|
})
|
|
503
621
|
}, [
|
|
504
|
-
e.isLendAmountButton ? c("", !0) : (
|
|
505
|
-
key:
|
|
622
|
+
e.isLendAmountButton ? c("", !0) : (o(!0), i(k, { key: 0 }, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
623
|
+
key: t,
|
|
506
624
|
variant: "secondary",
|
|
507
|
-
class:
|
|
625
|
+
class: w(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": d.selectedOption == t }]),
|
|
508
626
|
"data-testid": "bp-lend-cta-lend-button",
|
|
509
|
-
onClick: (
|
|
627
|
+
onClick: (b) => e.clickPresetButton(t)
|
|
510
628
|
}, {
|
|
511
|
-
default:
|
|
512
|
-
|
|
629
|
+
default: r(() => [
|
|
630
|
+
f(" $" + u(t), 1)
|
|
513
631
|
]),
|
|
514
632
|
_: 2
|
|
515
633
|
}, 1032, ["class", "onClick"]))), 128)),
|
|
516
|
-
e.showFilteredDropdown ? (
|
|
634
|
+
e.showFilteredDropdown ? (o(), a(B, {
|
|
517
635
|
key: 1,
|
|
518
636
|
id: `LoanAmountDropdown_${e.loanId}`,
|
|
519
637
|
modelValue: d.selectedDropdownOption,
|
|
520
638
|
"onUpdate:modelValue": [
|
|
521
|
-
s[
|
|
639
|
+
s[6] || (s[6] = (t) => d.selectedDropdownOption = t),
|
|
522
640
|
e.trackLendAmountSelection
|
|
523
641
|
],
|
|
524
|
-
class:
|
|
642
|
+
class: w(["tw-min-w-12 tw-rounded filtered-dropdown tw-w-full", {
|
|
525
643
|
"unselected-dropdown": !e.selectedDropdown,
|
|
526
644
|
"selected-dropdown": e.selectedDropdown
|
|
527
645
|
}]),
|
|
528
646
|
"aria-label": "Lend amount",
|
|
529
|
-
onClick:
|
|
647
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
530
648
|
}, {
|
|
531
|
-
default:
|
|
532
|
-
(
|
|
533
|
-
key:
|
|
534
|
-
value:
|
|
535
|
-
}, u(
|
|
649
|
+
default: r(() => [
|
|
650
|
+
(o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
|
|
651
|
+
key: t,
|
|
652
|
+
value: t
|
|
653
|
+
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, ie))), 128))
|
|
536
654
|
]),
|
|
537
655
|
_: 1
|
|
538
656
|
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
|
|
539
|
-
], 2)) :
|
|
540
|
-
e.hideShowLendDropdown && !e.isLessThan25 ? (
|
|
657
|
+
], 2)) : l.showPresetAmounts ? c("", !0) : (o(), i("div", re, [
|
|
658
|
+
e.hideShowLendDropdown && !e.isLessThan25 ? (o(), a(B, {
|
|
541
659
|
key: 0,
|
|
542
660
|
id: `LoanAmountDropdown_${e.loanId}`,
|
|
543
661
|
modelValue: d.selectedOption,
|
|
544
662
|
"onUpdate:modelValue": [
|
|
545
|
-
s[
|
|
663
|
+
s[7] || (s[7] = (t) => d.selectedOption = t),
|
|
546
664
|
e.trackLendAmountSelection
|
|
547
665
|
],
|
|
548
666
|
class: "tw-min-w-12",
|
|
549
667
|
style: { "border-radius": "14px 0 0 14px" },
|
|
550
668
|
"aria-label": "Lend amount",
|
|
551
|
-
onClick:
|
|
669
|
+
onClick: A(e.clickDropdown, ["stop"])
|
|
552
670
|
}, {
|
|
553
|
-
default:
|
|
554
|
-
(
|
|
555
|
-
key:
|
|
556
|
-
value:
|
|
557
|
-
}, " $" + u(
|
|
671
|
+
default: r(() => [
|
|
672
|
+
(o(!0), i(k, null, p(e.prices, (t) => (o(), i("option", {
|
|
673
|
+
key: t,
|
|
674
|
+
value: t
|
|
675
|
+
}, " $" + u(t), 9, ae))), 128))
|
|
558
676
|
]),
|
|
559
677
|
_: 1
|
|
560
678
|
}, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : c("", !0)
|
|
561
679
|
])),
|
|
562
|
-
|
|
563
|
-
class:
|
|
564
|
-
"tw-min-w-0":
|
|
565
|
-
lendButtonWrapper: e.hideShowLendDropdown && !
|
|
566
|
-
"tw-hidden": e.hideLendButton || !e.isLendAmountButton && e.presetButtonsPrices.length > 1 &&
|
|
567
|
-
"md:tw-block tw-hidden": !e.isLendAmountButton && e.presetButtonsPrices.length > 1 &&
|
|
680
|
+
h("div", {
|
|
681
|
+
class: w({
|
|
682
|
+
"tw-min-w-0": l.showPresetAmounts && !e.isNarrowDesktop,
|
|
683
|
+
lendButtonWrapper: e.hideShowLendDropdown && !l.showPresetAmounts,
|
|
684
|
+
"tw-hidden": e.hideLendButton || l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && (e.isNarrowComponent() || e.isNarrowDesktop),
|
|
685
|
+
"md:tw-block tw-hidden": !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && l.showPresetAmounts && !e.isNarrowDesktop
|
|
568
686
|
})
|
|
569
687
|
}, [
|
|
570
|
-
e.lendButtonVisibility && !e.isLessThan25 ? (
|
|
688
|
+
e.lendButtonVisibility && !e.isLessThan25 ? (o(), a(m, {
|
|
571
689
|
key: "lendButton",
|
|
572
|
-
class:
|
|
690
|
+
class: w(["tw-inline-flex tw-flex-1", { "button-ellipsis tw-w-full": l.showPresetAmounts }]),
|
|
573
691
|
"data-testid": "bp-lend-cta-lend-button",
|
|
574
692
|
type: "submit"
|
|
575
693
|
}, {
|
|
576
|
-
default:
|
|
577
|
-
|
|
694
|
+
default: r(() => [
|
|
695
|
+
f(u(e.ctaButtonText), 1)
|
|
578
696
|
]),
|
|
579
697
|
_: 1
|
|
580
|
-
}, 8, ["class"])) : e.showLendAgain ? (
|
|
698
|
+
}, 8, ["class"])) : e.showLendAgain ? (o(), a(m, {
|
|
581
699
|
key: "lendAgainButton",
|
|
582
|
-
class:
|
|
700
|
+
class: w(["lend-again", { "tw-w-full": l.showPresetAmounts }]),
|
|
583
701
|
"data-testid": "bp-lend-cta-lend-again-button",
|
|
584
702
|
type: "submit"
|
|
585
703
|
}, {
|
|
586
|
-
default:
|
|
587
|
-
|
|
704
|
+
default: r(() => [
|
|
705
|
+
f(u(l.primaryButtonText || "Lend") + " again ", 1)
|
|
588
706
|
]),
|
|
589
707
|
_: 1
|
|
590
708
|
}, 8, ["class"])) : c("", !0)
|
|
591
709
|
], 2),
|
|
592
|
-
e.isLendAmountButton && !
|
|
593
|
-
key:
|
|
710
|
+
e.isLendAmountButton && !l.enableFiveDollarsNotes ? (o(), a(O, {
|
|
711
|
+
key: 4,
|
|
594
712
|
class: "tw-w-full",
|
|
595
713
|
"loan-id": e.loanId,
|
|
596
714
|
"show-now": !1,
|
|
597
715
|
"amount-left": e.amountForLendAmountButton,
|
|
598
|
-
"is-adding":
|
|
716
|
+
"is-adding": l.isAdding,
|
|
599
717
|
onAddToBasket: e.addToBasket
|
|
600
718
|
}, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : c("", !0),
|
|
601
|
-
!
|
|
602
|
-
key:
|
|
719
|
+
!l.isLoading && l.isAdding ? (o(), a(m, {
|
|
720
|
+
key: 5,
|
|
603
721
|
class: "tw-inline-flex tw-flex-1"
|
|
604
722
|
}, {
|
|
605
|
-
default:
|
|
606
|
-
|
|
723
|
+
default: r(() => s[10] || (s[10] = [
|
|
724
|
+
f(" Adding to basket ")
|
|
607
725
|
])),
|
|
608
726
|
_: 1
|
|
609
727
|
})) : c("", !0)
|
|
610
|
-
], 10,
|
|
728
|
+
], 10, H)
|
|
611
729
|
], 32)) : c("", !0)
|
|
612
|
-
]);
|
|
730
|
+
], 512);
|
|
613
731
|
}
|
|
614
|
-
const
|
|
732
|
+
const be = /* @__PURE__ */ W(K, [["render", ue], ["__scopeId", "data-v-629f4bdf"]]);
|
|
615
733
|
export {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
734
|
+
De as KV_LEND_CTA_FRAGMENT,
|
|
735
|
+
ye as KV_LEND_CTA_USER_FRAGMENT,
|
|
736
|
+
be as default
|
|
619
737
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mobile-link[data-v-
|
|
1
|
+
.mobile-link[data-v-dc4a2676]{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.mobile-link[data-v-dc4a2676]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { mdiClose as f } from "@mdi/js";
|
|
2
2
|
import b from "../KvAccordionItem.js";
|
|
3
3
|
import h from "../KvMaterialIcon.js";
|
|
4
|
-
import { resolveComponent as
|
|
4
|
+
import { resolveComponent as u, resolveDirective as g, openBlock as t, createElementBlock as o, createBlock as _, createCommentVNode as y, createVNode as p, withCtx as r, createElementVNode as a, Fragment as N, renderList as K, withDirectives as n, toDisplayString as m, createTextVNode as s } from "vue";
|
|
5
5
|
import "./KvHeaderMobileMenu.css";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import x from "../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const I = {
|
|
8
|
+
name: "KvHeaderMobileMenu",
|
|
8
9
|
components: {
|
|
9
10
|
KvAccordionItem: b,
|
|
10
11
|
KvMaterialIcon: h
|
|
@@ -55,19 +56,19 @@ const K = {
|
|
|
55
56
|
]
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
}, T = { class: "tw--mt-0.5 tw-pb-0.5 tw-gap-2 tw-flex tw-flex-col tw-items-end md:tw-hidden tw-font-medium tw-p-2.5" },
|
|
59
|
+
}, T = { class: "tw--mt-0.5 tw-pb-0.5 tw-gap-2 tw-flex tw-flex-col tw-items-end md:tw-hidden tw-font-medium tw-p-2.5" }, M = { class: "tw-flex tw-flex-col tw-gap-2 tw-pl-1" }, C = ["href"], E = { class: "tw-text-secondary tw-font-book" }, B = { class: "tw-flex tw-flex-col tw-gap-2 tw-pb-2 tw-pl-1" }, D = {
|
|
59
60
|
href: "/about",
|
|
60
61
|
class: "mobile-link"
|
|
61
62
|
}, A = {
|
|
62
63
|
href: "/about/how",
|
|
63
64
|
class: "mobile-link"
|
|
64
|
-
},
|
|
65
|
+
}, H = {
|
|
65
66
|
href: "/about/where-kiva-works",
|
|
66
67
|
class: "mobile-link"
|
|
67
|
-
},
|
|
68
|
+
}, V = {
|
|
68
69
|
href: "/impact",
|
|
69
70
|
class: "mobile-link"
|
|
70
|
-
},
|
|
71
|
+
}, $ = {
|
|
71
72
|
href: "/about/leadership",
|
|
72
73
|
class: "mobile-link"
|
|
73
74
|
}, F = {
|
|
@@ -80,33 +81,33 @@ const K = {
|
|
|
80
81
|
href: "/about/due-diligence",
|
|
81
82
|
class: "mobile-link"
|
|
82
83
|
};
|
|
83
|
-
function S(
|
|
84
|
-
const w =
|
|
84
|
+
function S(v, e, k, q, c, z) {
|
|
85
|
+
const w = u("KvMaterialIcon"), d = u("KvAccordionItem"), i = g("kv-track-event");
|
|
85
86
|
return t(), o("nav", T, [
|
|
86
|
-
|
|
87
|
+
k.isMobile ? (t(), _(w, {
|
|
87
88
|
key: 0,
|
|
88
89
|
icon: c.mdiClose,
|
|
89
90
|
class: "tw-cursor-pointer",
|
|
90
|
-
onClick: e[0] || (e[0] = (l) =>
|
|
91
|
+
onClick: e[0] || (e[0] = (l) => v.$emit("closing-menu"))
|
|
91
92
|
}, null, 8, ["icon"])) : y("", !0),
|
|
92
|
-
|
|
93
|
+
p(d, {
|
|
93
94
|
id: "accordion-take-action-menu",
|
|
94
95
|
open: "",
|
|
95
96
|
class: "tw-w-full tw-border-b-0"
|
|
96
97
|
}, {
|
|
97
|
-
header:
|
|
98
|
-
|
|
98
|
+
header: r(() => e[1] || (e[1] = [
|
|
99
|
+
a("h3", { class: "tw-pb-0.5" }, " Take action ", -1)
|
|
99
100
|
])),
|
|
100
|
-
default:
|
|
101
|
-
|
|
102
|
-
(t(!0), o(N, null,
|
|
101
|
+
default: r(() => [
|
|
102
|
+
a("div", M, [
|
|
103
|
+
(t(!0), o(N, null, K(c.menuItems, (l) => n((t(), o("div", {
|
|
103
104
|
key: l.title
|
|
104
105
|
}, [
|
|
105
|
-
|
|
106
|
+
a("a", {
|
|
106
107
|
href: l.url,
|
|
107
108
|
class: "mobile-link"
|
|
108
|
-
}, m(l.title), 9,
|
|
109
|
-
|
|
109
|
+
}, m(l.title), 9, C),
|
|
110
|
+
a("p", E, m(l.description), 1)
|
|
110
111
|
])), [
|
|
111
112
|
[i, ["TopNav", `click-menu-${l.trackEvent}`]]
|
|
112
113
|
])), 128))
|
|
@@ -114,15 +115,15 @@ function S(k, e, v, q, c, z) {
|
|
|
114
115
|
]),
|
|
115
116
|
_: 1
|
|
116
117
|
}),
|
|
117
|
-
|
|
118
|
+
p(d, {
|
|
118
119
|
id: "accordion-about-menu",
|
|
119
120
|
class: "tw-w-full tw-pb-1"
|
|
120
121
|
}, {
|
|
121
|
-
header:
|
|
122
|
-
|
|
122
|
+
header: r(() => e[2] || (e[2] = [
|
|
123
|
+
a("h3", { class: "tw-pb-0.5" }, " About ", -1)
|
|
123
124
|
])),
|
|
124
|
-
default:
|
|
125
|
-
|
|
125
|
+
default: r(() => [
|
|
126
|
+
a("div", B, [
|
|
126
127
|
n((t(), o("a", D, e[3] || (e[3] = [
|
|
127
128
|
s("About us")
|
|
128
129
|
]))), [
|
|
@@ -133,17 +134,17 @@ function S(k, e, v, q, c, z) {
|
|
|
133
134
|
]))), [
|
|
134
135
|
[i, ["TopNav", "click-menu-how-kiva-works"]]
|
|
135
136
|
]),
|
|
136
|
-
n((t(), o("a",
|
|
137
|
+
n((t(), o("a", H, e[5] || (e[5] = [
|
|
137
138
|
s("Where Kiva works")
|
|
138
139
|
]))), [
|
|
139
140
|
[i, ["TopNav", "click-menu-where-kiva-works"]]
|
|
140
141
|
]),
|
|
141
|
-
n((t(), o("a",
|
|
142
|
+
n((t(), o("a", V, e[6] || (e[6] = [
|
|
142
143
|
s("Impact")
|
|
143
144
|
]))), [
|
|
144
145
|
[i, ["TopNav", "click-menu-impact"]]
|
|
145
146
|
]),
|
|
146
|
-
n((t(), o("a",
|
|
147
|
+
n((t(), o("a", $, e[7] || (e[7] = [
|
|
147
148
|
s("Leadership")
|
|
148
149
|
]))), [
|
|
149
150
|
[i, ["TopNav", "click-menu-leadership"]]
|
|
@@ -169,7 +170,7 @@ function S(k, e, v, q, c, z) {
|
|
|
169
170
|
})
|
|
170
171
|
]);
|
|
171
172
|
}
|
|
172
|
-
const Q = /* @__PURE__ */ I
|
|
173
|
+
const Q = /* @__PURE__ */ x(I, [["render", S], ["__scopeId", "data-v-dc4a2676"]]);
|
|
173
174
|
export {
|
|
174
175
|
Q as default
|
|
175
176
|
};
|
package/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-87116c5e]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-87116c5e]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-87116c5e],.header-fade-leave-to[data-v-87116c5e]{opacity:0}.header-fade-leave[data-v-87116c5e],.header-fade-enter-to[data-v-87116c5e]{opacity:1}.bg-opacity-50[data-v-87116c5e]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ref as l, shallowRef as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { throttle as
|
|
1
|
+
import { ref as l, shallowRef as D, computed as B, onMounted as U, onBeforeUnmount as x, resolveComponent as f, resolveDirective as N, openBlock as w, createBlock as M, withCtx as g, createElementVNode as k, normalizeStyle as _, createVNode as d, Transition as I, withDirectives as h, vShow as E, createElementBlock as A, normalizeClass as G, resolveDynamicComponent as K } from "vue";
|
|
2
|
+
import S from "@kiva/kv-tokens";
|
|
3
|
+
import z from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
|
+
import R from "./KvWwwHeader/KvHeaderLogo.js";
|
|
5
|
+
import P from "./KvThemeProvider.js";
|
|
6
|
+
import V from "./KvPageContainer.js";
|
|
7
|
+
import { throttle as O } from "../utils/throttle.js";
|
|
8
8
|
import "./KvWwwHeader.css";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
9
|
+
import W from "../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const j = "3.75rem", q = {
|
|
11
11
|
components: {
|
|
12
|
-
KvHeaderLinkBar:
|
|
13
|
-
KvHeaderLogo:
|
|
14
|
-
KvThemeProvider:
|
|
15
|
-
KvPageContainer:
|
|
12
|
+
KvHeaderLinkBar: z,
|
|
13
|
+
KvHeaderLogo: R,
|
|
14
|
+
KvThemeProvider: P,
|
|
15
|
+
KvPageContainer: V
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
18
18
|
loggedIn: {
|
|
@@ -63,62 +63,66 @@ const V = "3.75rem", O = {
|
|
|
63
63
|
emits: [
|
|
64
64
|
"load-lend-menu-data"
|
|
65
65
|
],
|
|
66
|
-
setup(C, { emit:
|
|
67
|
-
const o = l(!0), e = l(null), a = l(!1),
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
|
|
66
|
+
setup(C, { emit: t }) {
|
|
67
|
+
const o = l(!0), e = l(null), a = l(!1), i = D(null), r = l(null), s = l({ left: 0, position: "relative" }), u = l(!1);
|
|
68
|
+
let v;
|
|
69
|
+
const b = B(() => {
|
|
70
|
+
var m, n;
|
|
71
|
+
return ((n = (m = r.value) == null ? void 0 : m.$options) == null ? void 0 : n.name) === "KvHeaderMobileMenu";
|
|
72
|
+
}), c = (m, n, H) => {
|
|
73
|
+
n ? (clearTimeout(v), i.value !== n && (s.value = { left: 0, position: "relative" }), i.value = n, a.value = !0, H && (s.value = {
|
|
71
74
|
...H,
|
|
72
75
|
position: "absolute"
|
|
73
|
-
})) : a.value && (
|
|
74
|
-
a.value = !1,
|
|
76
|
+
})) : a.value && (v = setTimeout(() => {
|
|
77
|
+
a.value = !1, i.value = null;
|
|
75
78
|
}, 100));
|
|
76
|
-
},
|
|
77
|
-
var
|
|
78
|
-
(
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
}),
|
|
87
|
-
window.removeEventListener("resize",
|
|
79
|
+
}, L = (m) => {
|
|
80
|
+
var n;
|
|
81
|
+
(n = r.value) == null || n.onLoad(m);
|
|
82
|
+
}, T = () => {
|
|
83
|
+
t("load-lend-menu-data");
|
|
84
|
+
}, y = () => {
|
|
85
|
+
u.value = (window == null ? void 0 : window.innerWidth) < S.breakpoints.md;
|
|
86
|
+
}, p = O(y, 100);
|
|
87
|
+
return U(() => {
|
|
88
|
+
y(), window.addEventListener("resize", p);
|
|
89
|
+
}), x(() => {
|
|
90
|
+
window.removeEventListener("resize", p);
|
|
88
91
|
}), {
|
|
89
|
-
HEADER_HEIGHT:
|
|
90
|
-
emitLendMenuEvent:
|
|
91
|
-
isMobile:
|
|
92
|
+
HEADER_HEIGHT: j,
|
|
93
|
+
emitLendMenuEvent: T,
|
|
94
|
+
isMobile: u,
|
|
92
95
|
linksVisible: o,
|
|
93
96
|
menuOpen: a,
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
isMobileMenuActive: b,
|
|
98
|
+
onHover: c,
|
|
99
|
+
loadMenuData: L,
|
|
96
100
|
activeHeaderItem: e,
|
|
97
|
-
menuComponent:
|
|
98
|
-
menuComponentInstance:
|
|
99
|
-
menuPosition:
|
|
101
|
+
menuComponent: i,
|
|
102
|
+
menuComponentInstance: r,
|
|
103
|
+
menuPosition: s
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
|
-
},
|
|
106
|
+
}, F = {
|
|
103
107
|
href: "/",
|
|
104
108
|
class: "tw-px-1 tw-py-2 tw-cursor-pointer tw-absolute tw-top-1/2 tw-left-1/2 tw--translate-y-1/2 tw--translate-x-1/2 tw-transition-all tw-duration-300"
|
|
105
109
|
};
|
|
106
|
-
function
|
|
107
|
-
const
|
|
108
|
-
return
|
|
110
|
+
function J(C, t, o, e, a, i) {
|
|
111
|
+
const r = f("kv-header-link-bar"), s = f("kv-header-logo"), u = f("kv-page-container"), v = f("kv-theme-provider"), b = N("kv-track-event");
|
|
112
|
+
return w(), M(v, {
|
|
109
113
|
tag: "div",
|
|
110
114
|
class: "tw-bg-primary"
|
|
111
115
|
}, {
|
|
112
|
-
default:
|
|
113
|
-
|
|
116
|
+
default: g(() => [
|
|
117
|
+
k("nav", {
|
|
114
118
|
class: "tw-font-medium tw-relative",
|
|
115
|
-
style:
|
|
119
|
+
style: _({ height: e.HEADER_HEIGHT })
|
|
116
120
|
}, [
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
|
|
120
|
-
default:
|
|
121
|
-
|
|
121
|
+
d(u, null, {
|
|
122
|
+
default: g(() => [
|
|
123
|
+
d(I, { name: "header-fade" }, {
|
|
124
|
+
default: g(() => [
|
|
125
|
+
h(d(r, {
|
|
122
126
|
"logged-in": o.loggedIn,
|
|
123
127
|
"basket-count": o.basketCount,
|
|
124
128
|
"login-url": o.loginUrl,
|
|
@@ -130,33 +134,36 @@ function j(C, n, o, e, a, r) {
|
|
|
130
134
|
balance: o.balance,
|
|
131
135
|
onItemHover: e.onHover
|
|
132
136
|
}, null, 8, ["logged-in", "basket-count", "login-url", "open-menu-item", "my-dashboard-url", "lender-name", "lender-image-url", "is-mobile", "balance", "onItemHover"]), [
|
|
133
|
-
[
|
|
137
|
+
[E, e.linksVisible]
|
|
134
138
|
])
|
|
135
139
|
]),
|
|
136
140
|
_: 1
|
|
137
141
|
}),
|
|
138
|
-
|
|
139
|
-
s
|
|
142
|
+
h((w(), A("a", F, [
|
|
143
|
+
d(s)
|
|
140
144
|
])), [
|
|
141
|
-
[
|
|
145
|
+
[b, ["TopNav", "click-Logo"]]
|
|
142
146
|
])
|
|
143
147
|
]),
|
|
144
148
|
_: 1
|
|
145
149
|
})
|
|
146
150
|
], 4),
|
|
147
|
-
|
|
148
|
-
default:
|
|
149
|
-
|
|
151
|
+
d(I, { name: "header-fade" }, {
|
|
152
|
+
default: g(() => [
|
|
153
|
+
h(k("div", {
|
|
150
154
|
class: "tw-absolute tw-z-modal tw-h-full tw-inset-x-0 tw-bg-eco-green-4 bg-opacity-50 tw-min-h-screen",
|
|
151
|
-
style:
|
|
155
|
+
style: _({ top: e.HEADER_HEIGHT })
|
|
152
156
|
}, [
|
|
153
|
-
|
|
154
|
-
class: "tw-bg-primary tw-overflow-y-auto",
|
|
155
|
-
style:
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
k("div", {
|
|
158
|
+
class: G(["tw-bg-primary tw-overflow-y-auto", { "tw-min-h-dvh": e.isMobileMenuActive }]),
|
|
159
|
+
style: _({
|
|
160
|
+
...e.menuPosition,
|
|
161
|
+
maxHeight: e.isMobileMenuActive ? "auto" : `calc(100dvh - ${e.HEADER_HEIGHT})`
|
|
162
|
+
}),
|
|
163
|
+
onMouseover: t[1] || (t[1] = (c) => e.onHover(e.activeHeaderItem, e.menuComponent)),
|
|
164
|
+
onMouseout: t[2] || (t[2] = (c) => e.onHover())
|
|
158
165
|
}, [
|
|
159
|
-
(
|
|
166
|
+
(w(), M(K(e.menuComponent), {
|
|
160
167
|
ref: "menuComponentInstance",
|
|
161
168
|
"logged-in": o.loggedIn,
|
|
162
169
|
"login-url": o.loginUrl,
|
|
@@ -167,11 +174,11 @@ function j(C, n, o, e, a, r) {
|
|
|
167
174
|
"show-m-g-upsell-link": o.showMGUpsellLink,
|
|
168
175
|
"is-mobile": e.isMobile,
|
|
169
176
|
onLoadLendMenuData: e.emitLendMenuEvent,
|
|
170
|
-
onClosingMenu:
|
|
177
|
+
onClosingMenu: t[0] || (t[0] = (c) => e.onHover())
|
|
171
178
|
}, null, 40, ["logged-in", "login-url", "user-id", "is-borrower", "is-trustee", "my-dashboard-url", "show-m-g-upsell-link", "is-mobile", "onLoadLendMenuData"]))
|
|
172
|
-
],
|
|
179
|
+
], 38)
|
|
173
180
|
], 4), [
|
|
174
|
-
[
|
|
181
|
+
[E, e.menuOpen]
|
|
175
182
|
])
|
|
176
183
|
]),
|
|
177
184
|
_: 1
|
|
@@ -180,7 +187,7 @@ function j(C, n, o, e, a, r) {
|
|
|
180
187
|
_: 1
|
|
181
188
|
});
|
|
182
189
|
}
|
|
183
|
-
const
|
|
190
|
+
const le = /* @__PURE__ */ W(q, [["render", J], ["__scopeId", "data-v-87116c5e"]]);
|
|
184
191
|
export {
|
|
185
|
-
|
|
192
|
+
le as default
|
|
186
193
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.52.
|
|
3
|
+
"version": "6.52.9",
|
|
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": "
|
|
117
|
+
"gitHead": "9e756dff4c6e81538864f06aa3753e13f01da956"
|
|
118
118
|
}
|