@kiva/kv-components 6.59.3 → 6.60.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/vue/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-ee9d40cc] select{border-radius:14px 0 0 14px}.lend-again[data-v-ee9d40cc] span{padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-ee9d40cc] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-ee9d40cc] select{cursor:pointer;border-radius:1rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-ee9d40cc] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.preset-option[data-v-ee9d40cc] 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-ee9d40cc] select,.selected-option[data-v-ee9d40cc] 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-ee9d40cc] span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 410px){.mobile-dropdown-small[data-v-ee9d40cc]{flex:0 0 40%}}
|
package/dist/vue/KvLendCta.js
CHANGED
|
@@ -6,7 +6,7 @@ import R from "./KvLendAmountButton.js";
|
|
|
6
6
|
import S from "./KvSelect.js";
|
|
7
7
|
import F from "./KvButton.js";
|
|
8
8
|
import V from "./KvMaterialIcon.js";
|
|
9
|
-
import { resolveComponent as v, openBlock as o, createElementBlock as
|
|
9
|
+
import { resolveComponent as v, openBlock as o, createElementBlock as r, createBlock as a, withCtx as i, 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
11
|
import W from "../_virtual/_plugin-vue_export-helper.js";
|
|
12
12
|
const _ = "Other", E = 430, g = 480, x = 380, De = T`
|
|
@@ -390,19 +390,19 @@ const _ = "Other", E = 430, g = 480, x = 380, De = T`
|
|
|
390
390
|
key: 2,
|
|
391
391
|
class: "tw-w-full tw-text-center tw-rounded tw-p-2",
|
|
392
392
|
style: { background: "#f1f1f1" }
|
|
393
|
-
}, z = { class: "tw-flex" }, H = ["disabled"], j = {
|
|
393
|
+
}, z = { class: "tw-flex tw-items-center" }, H = ["disabled"], j = {
|
|
394
394
|
key: 0,
|
|
395
395
|
class: "md:tw-hidden tw-w-full"
|
|
396
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
397
|
key: 1,
|
|
398
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" },
|
|
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" }, re = ["value"], ie = {
|
|
400
400
|
key: 3,
|
|
401
401
|
class: "amountDropdownWrapper"
|
|
402
402
|
}, ae = ["value"];
|
|
403
403
|
function ue(n, s, l, D, d, e) {
|
|
404
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(),
|
|
405
|
+
return o(), r("div", M, [
|
|
406
406
|
e.isInBasket ? (o(), a(m, {
|
|
407
407
|
key: 0,
|
|
408
408
|
variant: "secondary",
|
|
@@ -412,7 +412,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
412
412
|
href: l.externalLinks ? "/basket" : void 0,
|
|
413
413
|
onClick: s[0] || (s[0] = (t) => e.clickSecondaryButton(t))
|
|
414
414
|
}, {
|
|
415
|
-
default:
|
|
415
|
+
default: i(() => [
|
|
416
416
|
f(u(e.loanInBasketButtonText), 1)
|
|
417
417
|
]),
|
|
418
418
|
_: 1
|
|
@@ -420,11 +420,11 @@ function ue(n, s, l, D, d, e) {
|
|
|
420
420
|
key: 1,
|
|
421
421
|
class: "tw-inline-flex tw-flex-1"
|
|
422
422
|
}, {
|
|
423
|
-
default:
|
|
423
|
+
default: i(() => [
|
|
424
424
|
f(u(e.ctaButtonText), 1)
|
|
425
425
|
]),
|
|
426
426
|
_: 1
|
|
427
|
-
})) : e.isFunded ? (o(),
|
|
427
|
+
})) : e.isFunded ? (o(), r("div", U, " This loan was just funded! 🎉 ")) : l.showViewLoan ? (o(), a(m, {
|
|
428
428
|
key: 3,
|
|
429
429
|
state: `${e.allSharesReserved ? "disabled" : ""}`,
|
|
430
430
|
to: l.externalLinks ? void 0 : e.readMorePath,
|
|
@@ -432,17 +432,17 @@ function ue(n, s, l, D, d, e) {
|
|
|
432
432
|
class: "tw-mb-0",
|
|
433
433
|
onClick: s[1] || (s[1] = (t) => n.$emit("show-loan-details", t))
|
|
434
434
|
}, {
|
|
435
|
-
default:
|
|
435
|
+
default: i(() => [
|
|
436
436
|
h("span", z, [
|
|
437
437
|
s[9] || (s[9] = f(" View loan ")),
|
|
438
438
|
y(P, {
|
|
439
|
-
class: "tw-w-3 tw-h-3
|
|
439
|
+
class: "tw-w-3 tw-h-3",
|
|
440
440
|
icon: d.mdiChevronRight
|
|
441
441
|
}, null, 8, ["icon"])
|
|
442
442
|
])
|
|
443
443
|
]),
|
|
444
444
|
_: 1
|
|
445
|
-
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (o(),
|
|
445
|
+
}, 8, ["state", "to", "href"])) : e.useFormSubmit ? (o(), r("form", {
|
|
446
446
|
key: 4,
|
|
447
447
|
class: "tw-w-full tw-flex",
|
|
448
448
|
onSubmit: s[8] || (s[8] = A((...t) => e.addToBasket && e.addToBasket(...t), ["prevent"]))
|
|
@@ -456,17 +456,17 @@ function ue(n, s, l, D, d, e) {
|
|
|
456
456
|
disabled: l.isAdding,
|
|
457
457
|
"data-testid": "bp-lend-cta-select-and-button"
|
|
458
458
|
}, [
|
|
459
|
-
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && !e.isNarrowDesktop ? (o(),
|
|
459
|
+
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && !e.isNarrowDesktop ? (o(), r("div", j, [
|
|
460
460
|
h("div", q, [
|
|
461
461
|
h("div", G, [
|
|
462
|
-
(o(!0),
|
|
462
|
+
(o(!0), r(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
463
463
|
key: t,
|
|
464
464
|
variant: "secondary",
|
|
465
465
|
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
466
466
|
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
467
467
|
onClick: (b) => e.clickPresetButton(t)
|
|
468
468
|
}, {
|
|
469
|
-
default:
|
|
469
|
+
default: i(() => [
|
|
470
470
|
f(" $ " + u(t), 1)
|
|
471
471
|
]),
|
|
472
472
|
_: 2
|
|
@@ -486,8 +486,8 @@ function ue(n, s, l, D, d, e) {
|
|
|
486
486
|
"aria-label": "Lend amount",
|
|
487
487
|
onClick: A(e.clickDropdown, ["stop"])
|
|
488
488
|
}, {
|
|
489
|
-
default:
|
|
490
|
-
(o(!0),
|
|
489
|
+
default: i(() => [
|
|
490
|
+
(o(!0), r(k, null, p(e.presetDropdownPrices, (t) => (o(), r("option", {
|
|
491
491
|
key: t,
|
|
492
492
|
value: t
|
|
493
493
|
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, J))), 128))
|
|
@@ -511,8 +511,8 @@ function ue(n, s, l, D, d, e) {
|
|
|
511
511
|
"aria-label": "Lend amount",
|
|
512
512
|
onClick: A(e.clickDropdown, ["stop"])
|
|
513
513
|
}, {
|
|
514
|
-
default:
|
|
515
|
-
(o(!0),
|
|
514
|
+
default: i(() => [
|
|
515
|
+
(o(!0), r(k, null, p(e.presetDropdownPrices, (t) => (o(), r("option", {
|
|
516
516
|
key: "small-" + t,
|
|
517
517
|
value: t
|
|
518
518
|
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, X))), 128))
|
|
@@ -524,7 +524,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
524
524
|
"data-testid": "bp-lend-cta-mobile-lend-button",
|
|
525
525
|
type: "submit"
|
|
526
526
|
}, {
|
|
527
|
-
default:
|
|
527
|
+
default: i(() => [
|
|
528
528
|
h("span", Y, [
|
|
529
529
|
h("span", Z, u(e.ctaButtonText), 1)
|
|
530
530
|
])
|
|
@@ -534,17 +534,17 @@ function ue(n, s, l, D, d, e) {
|
|
|
534
534
|
])
|
|
535
535
|
])
|
|
536
536
|
])) : c("", !0),
|
|
537
|
-
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && e.isNarrowDesktop ? (o(),
|
|
537
|
+
l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && e.isNarrowDesktop ? (o(), r("div", $, [
|
|
538
538
|
h("div", ee, [
|
|
539
539
|
h("div", te, [
|
|
540
|
-
(o(!0),
|
|
540
|
+
(o(!0), r(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
541
541
|
key: t,
|
|
542
542
|
variant: "secondary",
|
|
543
543
|
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
544
544
|
"data-testid": "bp-lend-cta-lend-button-narrow-desktop",
|
|
545
545
|
onClick: (b) => e.clickPresetButton(t)
|
|
546
546
|
}, {
|
|
547
|
-
default:
|
|
547
|
+
default: i(() => [
|
|
548
548
|
f(" $ " + u(t), 1)
|
|
549
549
|
]),
|
|
550
550
|
_: 2
|
|
@@ -564,8 +564,8 @@ function ue(n, s, l, D, d, e) {
|
|
|
564
564
|
"aria-label": "Lend amount",
|
|
565
565
|
onClick: A(e.clickDropdown, ["stop"])
|
|
566
566
|
}, {
|
|
567
|
-
default:
|
|
568
|
-
(o(!0),
|
|
567
|
+
default: i(() => [
|
|
568
|
+
(o(!0), r(k, null, p(e.presetDropdownPrices, (t) => (o(), r("option", {
|
|
569
569
|
key: t,
|
|
570
570
|
value: t
|
|
571
571
|
}, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, ne))), 128))
|
|
@@ -589,8 +589,8 @@ function ue(n, s, l, D, d, e) {
|
|
|
589
589
|
"aria-label": "Lend amount",
|
|
590
590
|
onClick: A(e.clickDropdown, ["stop"])
|
|
591
591
|
}, {
|
|
592
|
-
default:
|
|
593
|
-
(o(!0),
|
|
592
|
+
default: i(() => [
|
|
593
|
+
(o(!0), r(k, null, p(e.presetDropdownPrices, (t) => (o(), r("option", {
|
|
594
594
|
key: "narrow-small-" + t,
|
|
595
595
|
value: t
|
|
596
596
|
}, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, oe))), 128))
|
|
@@ -602,7 +602,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
602
602
|
"data-testid": "bp-lend-cta-narrow-desktop-lend-button",
|
|
603
603
|
type: "submit"
|
|
604
604
|
}, {
|
|
605
|
-
default:
|
|
605
|
+
default: i(() => [
|
|
606
606
|
h("span", le, [
|
|
607
607
|
h("span", de, u(e.ctaButtonText), 1)
|
|
608
608
|
])
|
|
@@ -612,21 +612,21 @@ function ue(n, s, l, D, d, e) {
|
|
|
612
612
|
])
|
|
613
613
|
])
|
|
614
614
|
])) : c("", !0),
|
|
615
|
-
l.showPresetAmounts && !l.isAdding && !e.isNarrowDesktop ? (o(),
|
|
615
|
+
l.showPresetAmounts && !l.isAdding && !e.isNarrowDesktop ? (o(), r("div", {
|
|
616
616
|
key: 2,
|
|
617
617
|
class: w({
|
|
618
618
|
"tw-flex tw-gap-0.5 md:tw-gap-1 lg:tw-gap-1 tw-flex-wrap md:tw-flex-nowrap": !0,
|
|
619
619
|
"tw-hidden md:tw-flex": !e.isLendAmountButton && e.presetButtonsPrices.length > 1
|
|
620
620
|
})
|
|
621
621
|
}, [
|
|
622
|
-
e.isLendAmountButton ? c("", !0) : (o(!0),
|
|
622
|
+
e.isLendAmountButton ? c("", !0) : (o(!0), r(k, { key: 0 }, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
623
623
|
key: t,
|
|
624
624
|
variant: "secondary",
|
|
625
625
|
class: w(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": d.selectedOption == t }]),
|
|
626
626
|
"data-testid": "bp-lend-cta-lend-button",
|
|
627
627
|
onClick: (b) => e.clickPresetButton(t)
|
|
628
628
|
}, {
|
|
629
|
-
default:
|
|
629
|
+
default: i(() => [
|
|
630
630
|
f(" $" + u(t), 1)
|
|
631
631
|
]),
|
|
632
632
|
_: 2
|
|
@@ -646,15 +646,15 @@ function ue(n, s, l, D, d, e) {
|
|
|
646
646
|
"aria-label": "Lend amount",
|
|
647
647
|
onClick: A(e.clickDropdown, ["stop"])
|
|
648
648
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
(o(!0),
|
|
649
|
+
default: i(() => [
|
|
650
|
+
(o(!0), r(k, null, p(e.presetDropdownPrices, (t) => (o(), r("option", {
|
|
651
651
|
key: t,
|
|
652
652
|
value: t
|
|
653
|
-
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9,
|
|
653
|
+
}, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, re))), 128))
|
|
654
654
|
]),
|
|
655
655
|
_: 1
|
|
656
656
|
}, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
|
|
657
|
-
], 2)) : l.showPresetAmounts ? c("", !0) : (o(),
|
|
657
|
+
], 2)) : l.showPresetAmounts ? c("", !0) : (o(), r("div", ie, [
|
|
658
658
|
e.hideShowLendDropdown && !e.isLessThan25 ? (o(), a(B, {
|
|
659
659
|
key: 0,
|
|
660
660
|
id: `LoanAmountDropdown_${e.loanId}`,
|
|
@@ -668,8 +668,8 @@ function ue(n, s, l, D, d, e) {
|
|
|
668
668
|
"aria-label": "Lend amount",
|
|
669
669
|
onClick: A(e.clickDropdown, ["stop"])
|
|
670
670
|
}, {
|
|
671
|
-
default:
|
|
672
|
-
(o(!0),
|
|
671
|
+
default: i(() => [
|
|
672
|
+
(o(!0), r(k, null, p(e.prices, (t) => (o(), r("option", {
|
|
673
673
|
key: t,
|
|
674
674
|
value: t
|
|
675
675
|
}, " $" + u(t), 9, ae))), 128))
|
|
@@ -691,7 +691,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
691
691
|
"data-testid": "bp-lend-cta-lend-button",
|
|
692
692
|
type: "submit"
|
|
693
693
|
}, {
|
|
694
|
-
default:
|
|
694
|
+
default: i(() => [
|
|
695
695
|
f(u(e.ctaButtonText), 1)
|
|
696
696
|
]),
|
|
697
697
|
_: 1
|
|
@@ -701,7 +701,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
701
701
|
"data-testid": "bp-lend-cta-lend-again-button",
|
|
702
702
|
type: "submit"
|
|
703
703
|
}, {
|
|
704
|
-
default:
|
|
704
|
+
default: i(() => [
|
|
705
705
|
f(u(l.primaryButtonText || "Lend") + " again ", 1)
|
|
706
706
|
]),
|
|
707
707
|
_: 1
|
|
@@ -720,7 +720,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
720
720
|
key: 5,
|
|
721
721
|
class: "tw-inline-flex tw-flex-1"
|
|
722
722
|
}, {
|
|
723
|
-
default:
|
|
723
|
+
default: i(() => s[10] || (s[10] = [
|
|
724
724
|
f(" Adding to basket ")
|
|
725
725
|
])),
|
|
726
726
|
_: 1
|
|
@@ -729,7 +729,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
729
729
|
], 32)) : c("", !0)
|
|
730
730
|
], 512);
|
|
731
731
|
}
|
|
732
|
-
const be = /* @__PURE__ */ W(K, [["render", ue], ["__scopeId", "data-v-
|
|
732
|
+
const be = /* @__PURE__ */ W(K, [["render", ue], ["__scopeId", "data-v-ee9d40cc"]]);
|
|
733
733
|
export {
|
|
734
734
|
De as KV_LEND_CTA_FRAGMENT,
|
|
735
735
|
ye as KV_LEND_CTA_USER_FRAGMENT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-d33b2f4e]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-d33b2f4e]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-d33b2f4e] .avatar div:first-child{display:flex}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineAsyncComponent as k, ref as r, computed as x, watch as C, onMounted as
|
|
2
|
-
import { mdiAccountCircle as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { throttle as
|
|
9
|
-
import { isLegacyPlaceholderAvatar as
|
|
1
|
+
import { defineAsyncComponent as k, ref as r, inject as Y, computed as x, watch as C, onMounted as Z, onUnmounted as $, resolveComponent as b, resolveDirective as ee, openBlock as i, createElementBlock as w, withDirectives as s, normalizeClass as p, withModifiers as H, createVNode as L, createBlock as y, withCtx as U, createTextVNode as f, createElementVNode as T, createCommentVNode as _, vShow as P, toDisplayString as ne } from "vue";
|
|
2
|
+
import { mdiAccountCircle as te, mdiChevronDown as oe, mdiMagnify as ae, mdiMenu as le } from "@mdi/js";
|
|
3
|
+
import re from "numeral";
|
|
4
|
+
import ie from "../KvMaterialIcon.js";
|
|
5
|
+
import de from "../KvIconBag.js";
|
|
6
|
+
import ue from "./KvHeaderDropdownLink.js";
|
|
7
|
+
import me from "../KvUserAvatar.js";
|
|
8
|
+
import { throttle as ve } from "../../utils/throttle.js";
|
|
9
|
+
import { isLegacyPlaceholderAvatar as se } from "../../utils/imageUtils.js";
|
|
10
10
|
import "./KvHeaderLinkBar.css";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import ce from "../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const we = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvHeaderMyKivaMenu.js")), fe = k(() => import("./LendMenu/KvLendMenu.js")), Me = k(() => import("./KvHeaderTakeActionMenu.js")), ke = k(() => import("./KvHeaderAboutMenu.js")), B = 120, M = "avatar-menu", K = "menuButton", R = { top: "-3.75rem", width: "100%" }, F = "lendButton", ge = {
|
|
13
13
|
components: {
|
|
14
|
-
KvMaterialIcon:
|
|
15
|
-
KvIconBag:
|
|
16
|
-
KvHeaderDropdownLink:
|
|
17
|
-
KvUserAvatar:
|
|
14
|
+
KvMaterialIcon: ie,
|
|
15
|
+
KvIconBag: de,
|
|
16
|
+
KvHeaderDropdownLink: ue,
|
|
17
|
+
KvUserAvatar: me
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
20
20
|
loggedIn: {
|
|
@@ -58,15 +58,15 @@ const ve = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvH
|
|
|
58
58
|
"item-hover"
|
|
59
59
|
],
|
|
60
60
|
setup(l, { emit: n }) {
|
|
61
|
-
const a = r(null), e = r(null), N = r(null), O = r(null),
|
|
62
|
-
n("item-hover", o,
|
|
63
|
-
},
|
|
61
|
+
const a = r(null), e = r(null), N = r(null), O = r(null), g = r(null), c = r(null), A = r(null), I = r(null), d = r(null), t = r(null), z = Y("$kvTrackEvent"), u = (o, v, m = null) => {
|
|
62
|
+
n("item-hover", o, v, m);
|
|
63
|
+
}, W = (o, v, m = null) => {
|
|
64
64
|
navigator.maxTouchPoints || (t.value = o, u(
|
|
65
65
|
o,
|
|
66
|
-
|
|
66
|
+
v,
|
|
67
67
|
o === K && l.isMobile ? R : m
|
|
68
68
|
));
|
|
69
|
-
},
|
|
69
|
+
}, j = (o) => {
|
|
70
70
|
!navigator.maxTouchPoints && t.value === o && (t.value = null, u());
|
|
71
71
|
}, E = () => {
|
|
72
72
|
var S;
|
|
@@ -80,79 +80,79 @@ const ve = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvH
|
|
|
80
80
|
borderRadius: l.isMobile ? "auto" : "0px 0px 8px 8px",
|
|
81
81
|
width: l.isMobile ? "100%" : `${B}px`
|
|
82
82
|
};
|
|
83
|
-
},
|
|
83
|
+
}, h = () => {
|
|
84
84
|
t.value = M, u(a.value, V, E());
|
|
85
|
-
},
|
|
86
|
-
o === F && t.value !== F &&
|
|
85
|
+
}, q = (o, v, m) => {
|
|
86
|
+
o === F && t.value !== F && z(
|
|
87
87
|
"TopNav",
|
|
88
88
|
"hover-Lend-menu",
|
|
89
89
|
"Lend"
|
|
90
|
-
), t.value === K && (t.value = null), !t.value || t.value !== o ? (t.value = o, o === M ?
|
|
91
|
-
}, D =
|
|
92
|
-
t.value === M &&
|
|
93
|
-
}, 100),
|
|
90
|
+
), t.value === K && (t.value = null), !t.value || t.value !== o ? (t.value = o, o === M ? h() : o === K && l.isMobile ? u(o, v, R) : u(o, v, m)) : (t.value = null, u());
|
|
91
|
+
}, D = ve(() => {
|
|
92
|
+
t.value === M && h();
|
|
93
|
+
}, 100), G = x(() => l.isMobile ? void 0 : "/lend-by-category"), J = x(() => {
|
|
94
94
|
var o;
|
|
95
95
|
return ((o = l.lenderImageUrl) == null ? void 0 : o.split("/").pop()) ?? "";
|
|
96
|
-
}),
|
|
96
|
+
}), Q = x(() => Math.floor(l.balance)), X = (o) => {
|
|
97
97
|
o.target === o.currentTarget && u();
|
|
98
98
|
};
|
|
99
99
|
return C(
|
|
100
100
|
() => l.isMobile,
|
|
101
101
|
() => {
|
|
102
|
-
t.value === M &&
|
|
102
|
+
t.value === M && h();
|
|
103
103
|
}
|
|
104
104
|
), C(
|
|
105
105
|
() => l.openMenuItem,
|
|
106
106
|
(o) => {
|
|
107
107
|
o || (t.value = null);
|
|
108
108
|
}
|
|
109
|
-
),
|
|
109
|
+
), Z(() => {
|
|
110
110
|
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", D);
|
|
111
|
-
}),
|
|
111
|
+
}), $(() => {
|
|
112
112
|
window.removeEventListener("resize", D);
|
|
113
113
|
}), {
|
|
114
114
|
AVATAR_MENU_ID: M,
|
|
115
115
|
openMenuId: t,
|
|
116
|
-
numeral:
|
|
117
|
-
mdiAccountCircle:
|
|
118
|
-
mdiChevronDown:
|
|
119
|
-
mdiMagnify:
|
|
120
|
-
mdiMenu:
|
|
116
|
+
numeral: re,
|
|
117
|
+
mdiAccountCircle: te,
|
|
118
|
+
mdiChevronDown: oe,
|
|
119
|
+
mdiMagnify: ae,
|
|
120
|
+
mdiMenu: le,
|
|
121
121
|
onHover: u,
|
|
122
122
|
avatar: a,
|
|
123
123
|
lendButton: e,
|
|
124
124
|
aboutUsLink: N,
|
|
125
125
|
partnerWithUsLink: O,
|
|
126
|
-
borrowLink:
|
|
126
|
+
borrowLink: g,
|
|
127
127
|
supportKivaLink: c,
|
|
128
128
|
basketLink: A,
|
|
129
129
|
signInLink: I,
|
|
130
130
|
menuButton: d,
|
|
131
|
-
lendUrl:
|
|
132
|
-
avatarFilename:
|
|
133
|
-
handleOnHover:
|
|
134
|
-
handleTouchStart:
|
|
135
|
-
handleMouseOut:
|
|
136
|
-
handleAvatarMenuPosition:
|
|
137
|
-
KvHeaderMobileMenu:
|
|
131
|
+
lendUrl: G,
|
|
132
|
+
avatarFilename: J,
|
|
133
|
+
handleOnHover: W,
|
|
134
|
+
handleTouchStart: q,
|
|
135
|
+
handleMouseOut: j,
|
|
136
|
+
handleAvatarMenuPosition: h,
|
|
137
|
+
KvHeaderMobileMenu: we,
|
|
138
138
|
KvHeaderMyKivaMenu: V,
|
|
139
|
-
KvLendMenu:
|
|
140
|
-
KvHeaderTakeActionMenu:
|
|
141
|
-
KvHeaderAboutMenu:
|
|
142
|
-
isLegacyPlaceholderAvatar:
|
|
139
|
+
KvLendMenu: fe,
|
|
140
|
+
KvHeaderTakeActionMenu: Me,
|
|
141
|
+
KvHeaderAboutMenu: ke,
|
|
142
|
+
isLegacyPlaceholderAvatar: se,
|
|
143
143
|
getAvatarMenuPosition: E,
|
|
144
|
-
handleEmptySpaceClick:
|
|
145
|
-
roundedBalance:
|
|
144
|
+
handleEmptySpaceClick: X,
|
|
145
|
+
roundedBalance: Q
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
},
|
|
149
|
-
function
|
|
150
|
-
const
|
|
148
|
+
}, he = ["href"], be = { class: "tw-text-eco-green-4" }, pe = ["href"];
|
|
149
|
+
function ye(l, n, a, e, N, O) {
|
|
150
|
+
const g = b("kv-material-icon"), c = b("KvHeaderDropdownLink"), A = b("kv-icon-bag"), I = b("KvUserAvatar"), d = ee("kv-track-event");
|
|
151
151
|
return i(), w("div", {
|
|
152
152
|
class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5",
|
|
153
153
|
onTouchstart: n[10] || (n[10] = (...t) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...t))
|
|
154
154
|
}, [
|
|
155
|
-
|
|
155
|
+
s((i(), w("button", {
|
|
156
156
|
ref: "menuButton",
|
|
157
157
|
class: p(["header-link tw-inline-flex md:tw-hidden", {
|
|
158
158
|
"tw-text-tertiary": a.openMenuItem && a.openMenuItem !== e.KvHeaderMobileMenu
|
|
@@ -161,11 +161,11 @@ function be(l, n, a, e, N, O) {
|
|
|
161
161
|
onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
|
|
162
162
|
onTouchstart: n[2] || (n[2] = H((t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
|
|
163
163
|
}, [
|
|
164
|
-
L(
|
|
164
|
+
L(g, { icon: e.mdiMenu }, null, 8, ["icon"])
|
|
165
165
|
], 34)), [
|
|
166
166
|
[d, a.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
167
167
|
]),
|
|
168
|
-
|
|
168
|
+
s((i(), y(c, {
|
|
169
169
|
class: "tw-py-1",
|
|
170
170
|
"ref-name": "lendButton",
|
|
171
171
|
href: e.lendUrl,
|
|
@@ -184,7 +184,7 @@ function be(l, n, a, e, N, O) {
|
|
|
184
184
|
}, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
|
|
185
185
|
[d, ["TopNav", "click-Lend"]]
|
|
186
186
|
]),
|
|
187
|
-
|
|
187
|
+
s((i(), y(c, {
|
|
188
188
|
"ref-name": "takeActionButton",
|
|
189
189
|
"base-class": "tw-hidden md:tw-inline-flex tw-py-1",
|
|
190
190
|
"menu-component": e.KvHeaderTakeActionMenu,
|
|
@@ -220,17 +220,17 @@ function be(l, n, a, e, N, O) {
|
|
|
220
220
|
_: 1
|
|
221
221
|
}, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
|
|
222
222
|
n[17] || (n[17] = T("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
|
|
223
|
-
a.loggedIn ?
|
|
223
|
+
a.loggedIn ? s((i(), w("a", {
|
|
224
224
|
key: 0,
|
|
225
225
|
ref: "dashboardLink",
|
|
226
226
|
href: a.myDashboardUrl,
|
|
227
227
|
class: p(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!a.openMenuItem }])
|
|
228
228
|
}, n[14] || (n[14] = [
|
|
229
229
|
f(" My dashboard ")
|
|
230
|
-
]), 10,
|
|
230
|
+
]), 10, he)), [
|
|
231
231
|
[d, ["TopNav", "click-Dashboard"]]
|
|
232
232
|
]) : _("", !0),
|
|
233
|
-
|
|
233
|
+
s((i(), w("a", {
|
|
234
234
|
ref: "basketLink",
|
|
235
235
|
href: "/basket",
|
|
236
236
|
class: p(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!a.openMenuItem }]),
|
|
@@ -246,14 +246,14 @@ function be(l, n, a, e, N, O) {
|
|
|
246
246
|
[P, a.basketCount > 0],
|
|
247
247
|
[d, ["TopNav", "click-Basket"]]
|
|
248
248
|
]),
|
|
249
|
-
|
|
249
|
+
s(T("div", {
|
|
250
250
|
ref: "avatar",
|
|
251
251
|
class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-bg-eco-green-1 tw-rounded-md tw-py-0.5 md:tw-py-1 tw-px-1 md:tw-px-2",
|
|
252
252
|
onMouseover: n[7] || (n[7] = (t) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
|
|
253
253
|
onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
|
|
254
254
|
onTouchstart: n[9] || (n[9] = H((t) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
|
|
255
255
|
}, [
|
|
256
|
-
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), y(
|
|
256
|
+
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), y(g, {
|
|
257
257
|
key: 0,
|
|
258
258
|
icon: e.mdiAccountCircle,
|
|
259
259
|
class: "tw-w-3"
|
|
@@ -264,23 +264,23 @@ function be(l, n, a, e, N, O) {
|
|
|
264
264
|
"lender-image-url": a.lenderImageUrl,
|
|
265
265
|
"is-small": ""
|
|
266
266
|
}, null, 8, ["lender-name", "lender-image-url"])),
|
|
267
|
-
T("span",
|
|
267
|
+
T("span", be, ne(e.numeral(e.roundedBalance).format("$0")), 1)
|
|
268
268
|
], 544), [
|
|
269
269
|
[P, a.loggedIn]
|
|
270
270
|
]),
|
|
271
|
-
a.loggedIn ? _("", !0) :
|
|
271
|
+
a.loggedIn ? _("", !0) : s((i(), w("a", {
|
|
272
272
|
key: 1,
|
|
273
273
|
ref: "signInLink",
|
|
274
274
|
href: a.loginUrl,
|
|
275
275
|
class: p(["header-link", { "tw-text-tertiary": !!a.openMenuItem }])
|
|
276
276
|
}, n[16] || (n[16] = [
|
|
277
277
|
f(" Sign in ")
|
|
278
|
-
]), 10,
|
|
278
|
+
]), 10, pe)), [
|
|
279
279
|
[d, ["TopNav", "click-Sign-in"]]
|
|
280
280
|
])
|
|
281
281
|
], 32);
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const De = /* @__PURE__ */ ce(ge, [["render", ye], ["__scopeId", "data-v-d33b2f4e"]]);
|
|
284
284
|
export {
|
|
285
|
-
|
|
285
|
+
De as default
|
|
286
286
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.60.0",
|
|
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": "336fb4dffcbc3937f8689665cd5400ab292c6df9"
|
|
118
118
|
}
|