@kiva/kv-components 6.62.4 → 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.
@@ -0,0 +1 @@
1
+ .adjust-vertical-spacing[data-v-c9339e78]{top:-.1rem;position:relative}
@@ -1,11 +1,12 @@
1
- import { toRefs as F, ref as d, computed as u, onMounted as U, resolveComponent as p, openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as s, createBlock as H, normalizeStyle as b, createCommentVNode as y, withDirectives as B, vShow as I, toDisplayString as P } from "vue";
2
- import { isLegacyPlaceholderAvatar as D, randomizedUserAvatarClass as M } from "../utils/imageUtils.js";
3
- import N from "./KvLoadingPlaceholder.js";
4
- import V from "../_virtual/_plugin-vue_export-helper.js";
5
- const j = {
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: N
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: t,
37
- isSmall: e
38
- } = F(f), i = d(!0), m = d(null), c = d(null), v = u(() => a.value === "" && t.value === "" || a.value === "Anonymous"), S = () => {
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
- return `${M(a.value)} ${l}`;
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 = t == null ? void 0 : t.value) == null ? void 0 : l.split("/").pop()) ?? "";
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 U(async () => {
56
- const l = m.value;
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: D,
68
+ isLegacyPlaceholderAvatar: j,
68
69
  isLoading: i,
69
70
  onImgLoad: g,
70
- imageRef: m,
71
- userAvatar: c
71
+ imageRef: c,
72
+ userAvatar: m
72
73
  };
73
74
  }
74
- }, z = { key: 1 }, E = ["src"], K = { class: "tw-self-center" };
75
- function R(f, a, t, e, i, m) {
76
- const c = p("kv-loading-placeholder");
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": t.isSmall, "tw-w-6": !t.isSmall }])
80
+ class: r(["data-hj-suppress tw-flex", { "tw-w-3": e.isSmall, "tw-w-6": !e.isSmall }])
80
81
  }, [
81
- e.isAnonymousUser ? (n(), o("div", {
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": t.isSmall, "tw-w-6 tw-h-6": !t.isSmall }])
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": t.isSmall }]),
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)) : !e.isLegacyPlaceholderAvatar(e.imageFilename) && e.imageFilename ? (n(), o("div", z, [
107
- e.isLoading ? (n(), H(c, {
107
+ ], 2)) : !t.isLegacyPlaceholderAvatar(t.imageFilename) && t.imageFilename ? (n(), o("div", z, [
108
+ t.isLoading ? (n(), H(m, {
108
109
  key: 0,
109
- style: b({
110
- width: t.isSmall ? "1.5rem" : "3rem",
111
- height: t.isSmall ? "1.5rem" : "3rem"
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
- B(s("img", {
116
+ b(s("img", {
116
117
  ref: "imageRef",
117
- src: t.lenderImageUrl,
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": t.isSmall, "tw-w-6 tw-h-6": !t.isSmall }]),
120
- onLoad: a[0] || (a[0] = (v) => e.onImgLoad())
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
- [I, !e.isLoading]
123
+ [B, !t.isLoading]
123
124
  ])
124
- ])) : e.isLegacyPlaceholderAvatar(e.imageFilename) || !e.imageFilename ? (n(), o("div", {
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", e.avatarClass()])
127
+ class: r(["tw-rounded-full tw-inline-flex tw-align-center tw-justify-center", t.avatarClass()])
127
128
  }, [
128
- s("span", K, P(e.lenderNameFirstLetter), 1)
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(j, [["render", R]]);
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.62.4",
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": "049d694e771a90ecb82413c7953d1621ad2a1f19"
117
+ "gitHead": "d08a667dc9daf95910021aeac2b3f90666edd13e"
118
118
  }