@kiva/kv-components 6.9.3 → 6.10.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/KvUserAvatar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRefs as A, ref as
|
|
1
|
+
import { toRefs as A, ref as v, computed as d, onMounted as F, resolveComponent as U, openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as s, createBlock as p, normalizeStyle as H, createCommentVNode as y, withDirectives as b, vShow as B, toDisplayString as I } from "vue";
|
|
2
2
|
import { isLegacyPlaceholderAvatar as P, randomizedUserAvatarClass as D } from "../utils/imageUtils.js";
|
|
3
3
|
import M from "./KvLoadingPlaceholder.js";
|
|
4
4
|
import N from "../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -35,7 +35,7 @@ const V = {
|
|
|
35
35
|
lenderName: a,
|
|
36
36
|
lenderImageUrl: t,
|
|
37
37
|
isSmall: e
|
|
38
|
-
} = A(u), i =
|
|
38
|
+
} = A(u), i = v(!0), m = v(null), c = d(() => a.value === "" && t.value === "" || a.value === "Anonymous"), f = () => {
|
|
39
39
|
const l = e != null && e.value ? "tw-w-3 tw-h-3 tw-text-h4" : "tw-w-6 tw-h-6 tw-text-h2";
|
|
40
40
|
return `${D()} ${l}`;
|
|
41
41
|
}, S = d(() => {
|
|
@@ -44,35 +44,35 @@ const V = {
|
|
|
44
44
|
}), _ = d(() => {
|
|
45
45
|
var l;
|
|
46
46
|
return (l = a == null ? void 0 : a.value) == null ? void 0 : l.substring(0, 1).toUpperCase();
|
|
47
|
-
}),
|
|
47
|
+
}), g = () => {
|
|
48
48
|
i.value = !1;
|
|
49
|
-
}, C = (l,
|
|
50
|
-
const x = Date.now() +
|
|
51
|
-
l
|
|
49
|
+
}, C = (l, w = 1e4) => new Promise((L, k) => {
|
|
50
|
+
const x = Date.now() + w, h = () => {
|
|
51
|
+
!l || l.complete ? L(l) : Date.now() > x ? k(new Error(`Timeout: ${l.src}`)) : setTimeout(h, 50);
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
h();
|
|
54
54
|
});
|
|
55
55
|
return F(async () => {
|
|
56
|
-
const l =
|
|
56
|
+
const l = m.value;
|
|
57
57
|
try {
|
|
58
|
-
await C(l),
|
|
59
|
-
} catch (
|
|
60
|
-
console.log(
|
|
58
|
+
await C(l), g();
|
|
59
|
+
} catch (w) {
|
|
60
|
+
console.log(w.message);
|
|
61
61
|
}
|
|
62
62
|
}), {
|
|
63
|
-
isAnonymousUser:
|
|
63
|
+
isAnonymousUser: c,
|
|
64
64
|
avatarClass: f,
|
|
65
65
|
imageFilename: S,
|
|
66
66
|
lenderNameFirstLetter: _,
|
|
67
67
|
isLegacyPlaceholderAvatar: P,
|
|
68
68
|
isLoading: i,
|
|
69
|
-
onImgLoad:
|
|
70
|
-
imageRef:
|
|
69
|
+
onImgLoad: g,
|
|
70
|
+
imageRef: m
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
}, j = { key: 1 }, z = ["src"], E = { class: "tw-self-center" };
|
|
74
|
-
function K(u, a, t, e, i,
|
|
75
|
-
const
|
|
74
|
+
function K(u, a, t, e, i, m) {
|
|
75
|
+
const c = U("kv-loading-placeholder");
|
|
76
76
|
return n(), o("div", {
|
|
77
77
|
class: r(["data-hj-suppress tw-flex", { "tw-w-3": t.isSmall, "tw-w-6": !t.isSmall }])
|
|
78
78
|
}, [
|
|
@@ -102,7 +102,7 @@ function K(u, a, t, e, i, c) {
|
|
|
102
102
|
}, null, -1)
|
|
103
103
|
]), 2))
|
|
104
104
|
], 2)) : !e.isLegacyPlaceholderAvatar(e.imageFilename) && e.imageFilename ? (n(), o("div", j, [
|
|
105
|
-
e.isLoading ? (n(), p(
|
|
105
|
+
e.isLoading ? (n(), p(c, {
|
|
106
106
|
key: 0,
|
|
107
107
|
style: H({
|
|
108
108
|
width: t.isSmall ? "1.5rem" : "3rem",
|
|
@@ -102,7 +102,7 @@ const T = {
|
|
|
102
102
|
ref: "rootEl",
|
|
103
103
|
"aria-label": "carousel",
|
|
104
104
|
class: "kv-carousel tw-overflow-hidden tw-relative"
|
|
105
|
-
}, L = ["aria-label", "aria-current", "aria-hidden", "tab-index"], R = { class: "kv-carousel__controls tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-w-full tw-justify-
|
|
105
|
+
}, L = ["aria-label", "aria-current", "aria-hidden", "tab-index"], R = { class: "kv-carousel__controls tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-w-full tw-justify-center" }, q = ["disabled"], G = ["disabled"];
|
|
106
106
|
function J(r, e, d, t, c, w) {
|
|
107
107
|
const n = P("kv-material-icon");
|
|
108
108
|
return a(), s("div", null, [
|
|
@@ -125,7 +125,7 @@ function J(r, e, d, t, c, w) {
|
|
|
125
125
|
], 512),
|
|
126
126
|
o("div", R, [
|
|
127
127
|
o("div", {
|
|
128
|
-
class: B(["tw-flex tw-gap-2 tw-w-full md:tw-w-auto", { "tw-justify-
|
|
128
|
+
class: B(["tw-flex tw-gap-2 tw-w-full md:tw-w-auto", { "tw-justify-center": !t.hasAutoplay }])
|
|
129
129
|
}, [
|
|
130
130
|
o("button", {
|
|
131
131
|
class: "tw-text-primary tw-rounded-full tw-border-2 tw-border-primary tw-h-4 tw-w-4 tw-flex tw-items-center tw-justify-center disabled:tw-opacity-low disabled:tw-cursor-default",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"embla-carousel-fade",
|
|
108
108
|
"popper.js"
|
|
109
109
|
],
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "b3055c069c3b51d5cbfa095cc27b7104ade04a61"
|
|
111
111
|
}
|