@kiva/kv-components 6.62.4 → 6.63.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 +1 -1
- package/dist/vue/KvLendCta.js +4 -4
- package/dist/vue/KvUserAvatar.css +1 -0
- package/dist/vue/KvUserAvatar.js +41 -38
- package/package.json +2 -2
package/dist/vue/KvLendCta.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.amountDropdownWrapper[data-v-
|
|
1
|
+
.amountDropdownWrapper[data-v-80882253] select{border-radius:14px 0 0 14px}.lend-again[data-v-80882253] span{padding-left:.5rem;padding-right:.5rem}.lendButtonWrapper[data-v-80882253] span:first-child{border-radius:0 14px 14px 0}.filtered-dropdown[data-v-80882253] select{cursor:pointer;border-radius:1rem;border-width:2px;font-weight:500}.unselected-dropdown[data-v-80882253] select{--tw-border-opacity: 1;border-color:rgb(158 158 158 / var(--tw-border-opacity, 1))}.preset-option[data-v-80882253] 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-80882253] select,.selected-option[data-v-80882253] 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-80882253] span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 410px){.mobile-dropdown-small[data-v-80882253]{flex:0 0 40%}}
|
package/dist/vue/KvLendCta.js
CHANGED
|
@@ -462,7 +462,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
462
462
|
(o(!0), r(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
463
463
|
key: t,
|
|
464
464
|
variant: "secondary",
|
|
465
|
-
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
465
|
+
class: w(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
|
|
466
466
|
"data-testid": "bp-lend-cta-lend-button-mobile",
|
|
467
467
|
onClick: (b) => e.clickPresetButton(t)
|
|
468
468
|
}, {
|
|
@@ -540,7 +540,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
540
540
|
(o(!0), r(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
|
|
541
541
|
key: t,
|
|
542
542
|
variant: "secondary",
|
|
543
|
-
class: w(["preset-option tw-flex-1 tw-min-w-0", { "selected-option": d.selectedOption == t }]),
|
|
543
|
+
class: w(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "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
|
}, {
|
|
@@ -622,7 +622,7 @@ function ue(n, s, l, D, d, e) {
|
|
|
622
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
|
-
class: w(["tw-inline-flex tw-flex-1 preset-option tw-w-8", { "selected-option": d.selectedOption == t }]),
|
|
625
|
+
class: w(["tw-inline-flex tw-flex-1 preset-option tw-w-8 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
|
|
626
626
|
"data-testid": "bp-lend-cta-lend-button",
|
|
627
627
|
onClick: (b) => e.clickPresetButton(t)
|
|
628
628
|
}, {
|
|
@@ -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-80882253"]]);
|
|
733
733
|
export {
|
|
734
734
|
De as KV_LEND_CTA_FRAGMENT,
|
|
735
735
|
ye as KV_LEND_CTA_USER_FRAGMENT,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.adjust-vertical-spacing[data-v-c9339e78]{top:-.1rem;position:relative}
|
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { toRefs as F, ref as d, computed as u, onMounted as
|
|
2
|
-
import { isLegacyPlaceholderAvatar as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { toRefs as F, ref as d, computed as u, onMounted as p, resolveComponent as U, openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as s, createBlock as H, normalizeStyle as I, createCommentVNode as y, withDirectives as b, vShow as B, toDisplayString as P } from "vue";
|
|
2
|
+
import { isLegacyPlaceholderAvatar as j, randomizedUserAvatarClass as D } from "../utils/imageUtils.js";
|
|
3
|
+
import M from "./KvLoadingPlaceholder.js";
|
|
4
|
+
import "./KvUserAvatar.css";
|
|
5
|
+
import N from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const V = {
|
|
6
7
|
name: "KvUserAvatar",
|
|
7
8
|
components: {
|
|
8
|
-
KvLoadingPlaceholder:
|
|
9
|
+
KvLoadingPlaceholder: M
|
|
9
10
|
},
|
|
10
11
|
props: {
|
|
11
12
|
/**
|
|
@@ -33,14 +34,14 @@ const j = {
|
|
|
33
34
|
setup(f) {
|
|
34
35
|
const {
|
|
35
36
|
lenderName: a,
|
|
36
|
-
lenderImageUrl:
|
|
37
|
-
isSmall:
|
|
38
|
-
} = F(f), i = d(!0),
|
|
39
|
-
const l =
|
|
40
|
-
return `${
|
|
37
|
+
lenderImageUrl: e,
|
|
38
|
+
isSmall: t
|
|
39
|
+
} = F(f), i = d(!0), c = d(null), m = d(null), v = u(() => a.value === "" && e.value === "" || a.value === "Anonymous"), S = () => {
|
|
40
|
+
const l = t != null && t.value ? "tw-w-3 tw-h-3 tw-text-h4" : "tw-w-6 tw-h-6 tw-text-h2";
|
|
41
|
+
return `${D(a.value)} ${l}`;
|
|
41
42
|
}, _ = u(() => {
|
|
42
43
|
var l;
|
|
43
|
-
return ((l =
|
|
44
|
+
return ((l = e == null ? void 0 : e.value) == null ? void 0 : l.split("/").pop()) ?? "";
|
|
44
45
|
}), C = u(() => {
|
|
45
46
|
var l;
|
|
46
47
|
return (l = a == null ? void 0 : a.value) == null ? void 0 : l.substring(0, 1).toUpperCase();
|
|
@@ -52,8 +53,8 @@ const j = {
|
|
|
52
53
|
};
|
|
53
54
|
h();
|
|
54
55
|
});
|
|
55
|
-
return
|
|
56
|
-
const l =
|
|
56
|
+
return p(async () => {
|
|
57
|
+
const l = c.value;
|
|
57
58
|
try {
|
|
58
59
|
await L(l), g();
|
|
59
60
|
} catch (w) {
|
|
@@ -64,26 +65,26 @@ const j = {
|
|
|
64
65
|
avatarClass: S,
|
|
65
66
|
imageFilename: _,
|
|
66
67
|
lenderNameFirstLetter: C,
|
|
67
|
-
isLegacyPlaceholderAvatar:
|
|
68
|
+
isLegacyPlaceholderAvatar: j,
|
|
68
69
|
isLoading: i,
|
|
69
70
|
onImgLoad: g,
|
|
70
|
-
imageRef:
|
|
71
|
-
userAvatar:
|
|
71
|
+
imageRef: c,
|
|
72
|
+
userAvatar: m
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
|
-
}, z = { key: 1 }, E = ["src"]
|
|
75
|
-
function
|
|
76
|
-
const
|
|
75
|
+
}, z = { key: 1 }, E = ["src"];
|
|
76
|
+
function K(f, a, e, t, i, c) {
|
|
77
|
+
const m = U("kv-loading-placeholder");
|
|
77
78
|
return n(), o("div", {
|
|
78
79
|
ref: "userAvatar",
|
|
79
|
-
class: r(["data-hj-suppress tw-flex", { "tw-w-3":
|
|
80
|
+
class: r(["data-hj-suppress tw-flex", { "tw-w-3": e.isSmall, "tw-w-6": !e.isSmall }])
|
|
80
81
|
}, [
|
|
81
|
-
|
|
82
|
+
t.isAnonymousUser ? (n(), o("div", {
|
|
82
83
|
key: 0,
|
|
83
|
-
class: r(["tw-rounded-full tw-bg-brand tw-inline-flex tw-align-center tw-justify-center", { "tw-w-3 tw-h-3":
|
|
84
|
+
class: r(["tw-rounded-full tw-bg-brand tw-inline-flex tw-align-center tw-justify-center", { "tw-w-3 tw-h-3": e.isSmall, "tw-w-6 tw-h-6": !e.isSmall }])
|
|
84
85
|
}, [
|
|
85
86
|
(n(), o("svg", {
|
|
86
|
-
class: r(["tw-h-full tw-text-brand", { "tw-w-3 tw-h-3":
|
|
87
|
+
class: r(["tw-h-full tw-text-brand", { "tw-w-3 tw-h-3": e.isSmall }]),
|
|
87
88
|
width: "25",
|
|
88
89
|
height: "37",
|
|
89
90
|
viewBox: "0 0 25 37",
|
|
@@ -103,33 +104,35 @@ function R(f, a, t, e, i, m) {
|
|
|
103
104
|
fill: "white"
|
|
104
105
|
}, null, -1)
|
|
105
106
|
]), 2))
|
|
106
|
-
], 2)) : !
|
|
107
|
-
|
|
107
|
+
], 2)) : !t.isLegacyPlaceholderAvatar(t.imageFilename) && t.imageFilename ? (n(), o("div", z, [
|
|
108
|
+
t.isLoading ? (n(), H(m, {
|
|
108
109
|
key: 0,
|
|
109
|
-
style:
|
|
110
|
-
width:
|
|
111
|
-
height:
|
|
110
|
+
style: I({
|
|
111
|
+
width: e.isSmall ? "1.5rem" : "3rem",
|
|
112
|
+
height: e.isSmall ? "1.5rem" : "3rem"
|
|
112
113
|
}),
|
|
113
114
|
class: "!tw-rounded-full"
|
|
114
115
|
}, null, 8, ["style"])) : y("", !0),
|
|
115
|
-
|
|
116
|
+
b(s("img", {
|
|
116
117
|
ref: "imageRef",
|
|
117
|
-
src:
|
|
118
|
+
src: e.lenderImageUrl,
|
|
118
119
|
alt: "Image of lender",
|
|
119
|
-
class: r(["tw-rounded-full tw-inline-block", { "tw-w-3 tw-h-3":
|
|
120
|
-
onLoad: a[0] || (a[0] = (v) =>
|
|
120
|
+
class: r(["tw-rounded-full tw-inline-block", { "tw-w-3 tw-h-3": e.isSmall, "tw-w-6 tw-h-6": !e.isSmall }]),
|
|
121
|
+
onLoad: a[0] || (a[0] = (v) => t.onImgLoad())
|
|
121
122
|
}, null, 42, E), [
|
|
122
|
-
[
|
|
123
|
+
[B, !t.isLoading]
|
|
123
124
|
])
|
|
124
|
-
])) :
|
|
125
|
+
])) : t.isLegacyPlaceholderAvatar(t.imageFilename) || !t.imageFilename ? (n(), o("div", {
|
|
125
126
|
key: 2,
|
|
126
|
-
class: r(["tw-rounded-full tw-inline-flex tw-align-center tw-justify-center",
|
|
127
|
+
class: r(["tw-rounded-full tw-inline-flex tw-align-center tw-justify-center", t.avatarClass()])
|
|
127
128
|
}, [
|
|
128
|
-
s("span",
|
|
129
|
+
s("span", {
|
|
130
|
+
class: r(["tw-self-center", { "adjust-vertical-spacing": !e.isSmall }])
|
|
131
|
+
}, P(t.lenderNameFirstLetter), 3)
|
|
129
132
|
], 2)) : y("", !0)
|
|
130
133
|
], 2);
|
|
131
134
|
}
|
|
132
|
-
const J = /* @__PURE__ */ V
|
|
135
|
+
const J = /* @__PURE__ */ N(V, [["render", K], ["__scopeId", "data-v-c9339e78"]]);
|
|
133
136
|
export {
|
|
134
137
|
J as default
|
|
135
138
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.63.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": "adb6652287c700dc66afd2fb57ce0e231b1906c9"
|
|
118
118
|
}
|