@kiva/kv-components 6.62.3 → 6.62.5
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/KvUserAvatar.css +1 -0
- package/dist/vue/KvUserAvatar.js +41 -38
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +11 -11
- package/package.json +2 -2
|
@@ -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/dist/vue/KvWwwHeader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-fade-enter-active[data-v-
|
|
1
|
+
.header-fade-enter-active[data-v-36eec819]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.header-fade-leave-active[data-v-36eec819]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.header-fade-enter[data-v-36eec819],.header-fade-leave-to[data-v-36eec819]{opacity:0}.header-fade-leave[data-v-36eec819],.header-fade-enter-to[data-v-36eec819]{opacity:1}.bg-opacity-50[data-v-36eec819]{background-color:rgba(var(--bg-action-highlight),.5)}
|
package/dist/vue/KvWwwHeader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as a, shallowRef as N, computed as S, onMounted as x, onBeforeUnmount as A, resolveComponent as w, resolveDirective as K, openBlock as g, createBlock as E, withCtx as b, createElementVNode as k, normalizeStyle as h, createVNode as v, Transition as I, withDirectives as y, vShow as C, createElementBlock as O, normalizeClass as G, resolveDynamicComponent as z, withModifiers as P } from "vue";
|
|
2
2
|
import R from "@kiva/kv-tokens";
|
|
3
3
|
import V from "./KvWwwHeader/KvHeaderLinkBar.js";
|
|
4
4
|
import W from "./KvWwwHeader/KvHeaderLogo.js";
|
|
@@ -8,7 +8,7 @@ import { throttle as q } from "../utils/throttle.js";
|
|
|
8
8
|
import { debounce as F } from "../utils/debounce.js";
|
|
9
9
|
import "./KvWwwHeader.css";
|
|
10
10
|
import J from "../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
-
const Q = "3.7rem", X = ["lendMenu", "aboutUsLink"], Z = {
|
|
11
|
+
const Q = "3.7rem", X = ["lendMenu", "aboutUsLink", "takeActionButton"], Z = {
|
|
12
12
|
components: {
|
|
13
13
|
KvHeaderLinkBar: V,
|
|
14
14
|
KvHeaderLogo: W,
|
|
@@ -69,14 +69,14 @@ const Q = "3.7rem", X = ["lendMenu", "aboutUsLink"], Z = {
|
|
|
69
69
|
"load-lend-menu-data"
|
|
70
70
|
],
|
|
71
71
|
setup(L, { emit: o }) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = a(!0), e = a(null), r = a(!1), i = N(null), d = a(null), m = a({ left: 0, position: "relative" }), s = a(!1), c = a(null), f = a(!1), l = S(() => {
|
|
73
73
|
var u, t;
|
|
74
74
|
return ((t = (u = d.value) == null ? void 0 : u.$options) == null ? void 0 : t.name) === "KvHeaderMobileMenu";
|
|
75
75
|
}), _ = F((u, t, H) => {
|
|
76
|
-
f.value && (t ? (c.value = u, i.value !== t && (m.value = { left: 0, position: "relative" }), i.value = t,
|
|
76
|
+
f.value && (t ? (c.value = u, i.value !== t && (m.value = { left: 0, position: "relative" }), i.value = t, r.value = !0, H && (m.value = {
|
|
77
77
|
...H,
|
|
78
78
|
position: "absolute"
|
|
79
|
-
})) :
|
|
79
|
+
})) : r.value && (r.value = !1, i.value = null));
|
|
80
80
|
}, 100), T = (u) => {
|
|
81
81
|
var t;
|
|
82
82
|
(t = d.value) == null || t.onLoad(u);
|
|
@@ -84,8 +84,8 @@ const Q = "3.7rem", X = ["lendMenu", "aboutUsLink"], Z = {
|
|
|
84
84
|
if (!l.value) return _();
|
|
85
85
|
}, D = () => {
|
|
86
86
|
o("load-lend-menu-data");
|
|
87
|
-
},
|
|
88
|
-
s.value = (window == null ? void 0 : window.innerWidth) < R.breakpoints.md,
|
|
87
|
+
}, B = () => s.value && X.includes(c.value) || !s.value && l.value, M = () => {
|
|
88
|
+
s.value = (window == null ? void 0 : window.innerWidth) < R.breakpoints.md, B() && (i.value = null, r.value = !1);
|
|
89
89
|
}, p = q(M, 100);
|
|
90
90
|
return x(() => {
|
|
91
91
|
M(), window.addEventListener("resize", p), f.value = !0;
|
|
@@ -96,7 +96,7 @@ const Q = "3.7rem", X = ["lendMenu", "aboutUsLink"], Z = {
|
|
|
96
96
|
emitLendMenuEvent: D,
|
|
97
97
|
isMobile: s,
|
|
98
98
|
linksVisible: n,
|
|
99
|
-
menuOpen:
|
|
99
|
+
menuOpen: r,
|
|
100
100
|
isMobileMenuActive: l,
|
|
101
101
|
onHover: _,
|
|
102
102
|
loadMenuData: T,
|
|
@@ -111,7 +111,7 @@ const Q = "3.7rem", X = ["lendMenu", "aboutUsLink"], Z = {
|
|
|
111
111
|
href: "/",
|
|
112
112
|
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"
|
|
113
113
|
};
|
|
114
|
-
function ee(L, o, n, e,
|
|
114
|
+
function ee(L, o, n, e, r, i) {
|
|
115
115
|
const d = w("kv-header-link-bar"), m = w("kv-header-logo"), s = w("kv-page-container"), c = w("kv-theme-provider"), f = K("kv-track-event");
|
|
116
116
|
return g(), E(c, {
|
|
117
117
|
tag: "div",
|
|
@@ -155,7 +155,7 @@ function ee(L, o, n, e, a, i) {
|
|
|
155
155
|
v(I, { name: "header-fade" }, {
|
|
156
156
|
default: b(() => [
|
|
157
157
|
y(k("div", {
|
|
158
|
-
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
|
|
158
|
+
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",
|
|
159
159
|
style: h({ top: e.HEADER_HEIGHT }),
|
|
160
160
|
onTouchstart: o[4] || (o[4] = (...l) => e.handleOverlayClick && e.handleOverlayClick(...l))
|
|
161
161
|
}, [
|
|
@@ -195,7 +195,7 @@ function ee(L, o, n, e, a, i) {
|
|
|
195
195
|
_: 1
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
const me = /* @__PURE__ */ J(Z, [["render", ee], ["__scopeId", "data-v-
|
|
198
|
+
const me = /* @__PURE__ */ J(Z, [["render", ee], ["__scopeId", "data-v-36eec819"]]);
|
|
199
199
|
export {
|
|
200
200
|
me as default
|
|
201
201
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.62.
|
|
3
|
+
"version": "6.62.5",
|
|
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": "d08a667dc9daf95910021aeac2b3f90666edd13e"
|
|
118
118
|
}
|