@kiva/kv-components 6.15.0 → 6.16.1
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/utils/imageUtils.js +8 -7
- package/dist/utils/loanCard.js +81 -80
- package/dist/vue/KvSideSheet.js +120 -83
- package/dist/vue/KvUserAvatar.js +3 -4
- package/package.json +2 -2
package/dist/utils/imageUtils.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import a from "./Alea.js";
|
|
2
|
+
function c(o) {
|
|
2
3
|
if (!o)
|
|
3
4
|
return !1;
|
|
4
5
|
let t = o.toString();
|
|
5
6
|
return t.includes(".") && ([t] = t.split(".")), ["726677", "315726", "4d844ac2c0b77a8a522741b908ea5c32"].includes(t);
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
-
const o = [
|
|
8
|
+
function l(o = "") {
|
|
9
|
+
const t = new a(o), e = [
|
|
9
10
|
{ color: "tw-text-action", bg: "tw-bg-brand-100" },
|
|
10
11
|
{ color: "tw-text-black", bg: "tw-bg-brand-100" },
|
|
11
12
|
{ color: "tw-text-white", bg: "tw-bg-action" },
|
|
@@ -13,10 +14,10 @@ function a() {
|
|
|
13
14
|
{ color: "tw-text-primary-inverse", bg: "tw-bg-action" },
|
|
14
15
|
{ color: "tw-text-white", bg: "tw-bg-black" },
|
|
15
16
|
{ color: "tw-text-action", bg: "tw-bg-black" }
|
|
16
|
-
],
|
|
17
|
-
return `${
|
|
17
|
+
], r = e[Math.floor(t() * e.length)];
|
|
18
|
+
return `${r.color} ${r.bg}`;
|
|
18
19
|
}
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
c as isLegacyPlaceholderAvatar,
|
|
22
|
+
l as randomizedUserAvatarClass
|
|
22
23
|
};
|
package/dist/utils/loanCard.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import R from "graphql-tag";
|
|
2
|
-
import
|
|
3
|
-
import { toRefs as
|
|
4
|
-
import { mdiMapMarker as
|
|
5
|
-
|
|
2
|
+
import ae from "numeral";
|
|
3
|
+
import { toRefs as se, computed as n } from "vue";
|
|
4
|
+
import { mdiMapMarker as ye } from "@mdi/js";
|
|
5
|
+
import Ee from "./Alea.js";
|
|
6
|
+
const Ue = "N/A", oe = "ECO-FRIENDLY", ne = "SUSTAINABLE AG", le = "SINGLE PARENT", Ne = "REFUGEES/DISPLACED", P = (c, v) => (c == null ? void 0 : c.find((f) => f.name.replace("#", "").toUpperCase() === v.toUpperCase())) ?? {}, _e = R`
|
|
6
7
|
fragment LoanCallouts on LoanBasic {
|
|
7
8
|
id
|
|
8
9
|
activity {
|
|
@@ -19,7 +20,7 @@ const ye = "N/A", te = "ECO-FRIENDLY", ae = "SUSTAINABLE AG", oe = "SINGLE PAREN
|
|
|
19
20
|
themes
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
`,
|
|
23
|
+
`, Se = R`
|
|
23
24
|
fragment LoanGeocode on LoanBasic {
|
|
24
25
|
id
|
|
25
26
|
geocode {
|
|
@@ -31,7 +32,7 @@ const ye = "N/A", te = "ECO-FRIENDLY", ae = "SUSTAINABLE AG", oe = "SINGLE PAREN
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
`,
|
|
35
|
+
`, De = R`
|
|
35
36
|
fragment LoanProgress on LoanBasic {
|
|
36
37
|
id
|
|
37
38
|
loanAmount
|
|
@@ -42,124 +43,124 @@ const ye = "N/A", te = "ECO-FRIENDLY", ae = "SUSTAINABLE AG", oe = "SINGLE PAREN
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
`;
|
|
45
|
-
function
|
|
46
|
+
function Me(c, v = !1) {
|
|
46
47
|
const {
|
|
47
|
-
externalLinks:
|
|
48
|
+
externalLinks: f,
|
|
48
49
|
customLoanDetails: L,
|
|
49
|
-
loanId:
|
|
50
|
+
loanId: m,
|
|
50
51
|
loan: t,
|
|
51
|
-
categoryPageName:
|
|
52
|
+
categoryPageName: p,
|
|
52
53
|
customCallouts: y
|
|
53
|
-
} =
|
|
54
|
+
} = se(c), re = n(() => f.value ? "a" : "router-link"), ue = n(() => L.value ? "" : `/lend/${m.value}`), F = n(() => !m.value || !t.value), ie = n(() => {
|
|
54
55
|
var e;
|
|
55
56
|
return ((e = t.value) == null ? void 0 : e.name) || "";
|
|
56
|
-
}),
|
|
57
|
-
var e, a,
|
|
58
|
-
return ((
|
|
59
|
-
}),
|
|
60
|
-
var e, a,
|
|
61
|
-
return ((
|
|
57
|
+
}), g = n(() => {
|
|
58
|
+
var e, a, l;
|
|
59
|
+
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.name) || "";
|
|
60
|
+
}), ce = n(() => {
|
|
61
|
+
var e, a, l;
|
|
62
|
+
return ((l = (a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.country) == null ? void 0 : l.isoCode) || "";
|
|
62
63
|
}), E = n(() => {
|
|
63
64
|
var e, a;
|
|
64
65
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.city) || "";
|
|
65
|
-
}),
|
|
66
|
+
}), _ = n(() => {
|
|
66
67
|
var e, a;
|
|
67
68
|
return ((a = (e = t.value) == null ? void 0 : e.geocode) == null ? void 0 : a.state) || "";
|
|
68
|
-
}),
|
|
69
|
+
}), S = n(() => {
|
|
69
70
|
var e;
|
|
70
71
|
return ((e = t.value) == null ? void 0 : e.distributionModel) || "";
|
|
71
|
-
}),
|
|
72
|
+
}), de = n(() => {
|
|
72
73
|
var e, a;
|
|
73
74
|
return ((a = (e = t.value) == null ? void 0 : e.image) == null ? void 0 : a.hash) ?? "";
|
|
74
75
|
}), U = n(() => {
|
|
75
|
-
var e, a,
|
|
76
|
-
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((
|
|
77
|
-
}),
|
|
78
|
-
if (
|
|
79
|
-
const e =
|
|
80
|
-
return `${E.value}, ${
|
|
76
|
+
var e, a, l, u, d;
|
|
77
|
+
return typeof ((e = t.value) == null ? void 0 : e.loanAmount) < "u" && typeof ((l = (a = t.value) == null ? void 0 : a.loanFundraisingInfo) == null ? void 0 : l.fundedAmount) < "u" && typeof ((d = (u = t.value) == null ? void 0 : u.loanFundraisingInfo) == null ? void 0 : d.reservedAmount) < "u";
|
|
78
|
+
}), pe = n(() => !F.value && U.value), ve = n(() => {
|
|
79
|
+
if (S.value === "direct") {
|
|
80
|
+
const e = v && g.value.toLowerCase() === "united states" ? "" : `, ${g.value}`;
|
|
81
|
+
return `${E.value}, ${_.value}${e}`;
|
|
81
82
|
}
|
|
82
|
-
return
|
|
83
|
-
}),
|
|
83
|
+
return g.value === "Puerto Rico" ? `${E.value}, PR` : g.value;
|
|
84
|
+
}), fe = n(() => {
|
|
84
85
|
var e;
|
|
85
86
|
return ((e = t.value) == null ? void 0 : e.use) ?? "";
|
|
86
|
-
}),
|
|
87
|
+
}), me = n(() => {
|
|
87
88
|
var e;
|
|
88
89
|
return ((e = t.value) == null ? void 0 : e.status) ?? "";
|
|
89
90
|
}), C = n(() => {
|
|
90
91
|
var e;
|
|
91
92
|
return ((e = t.value) == null ? void 0 : e.loanAmount) ?? "0";
|
|
92
93
|
}), N = n(() => {
|
|
93
|
-
var e, a,
|
|
94
|
-
return
|
|
95
|
-
}),
|
|
94
|
+
var e, a, l, u;
|
|
95
|
+
return ae(((a = (e = t.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : a.reservedAmount) ?? "0").add(((u = (l = t.value) == null ? void 0 : l.loanFundraisingInfo) == null ? void 0 : u.fundedAmount) ?? "0");
|
|
96
|
+
}), D = n(() => N.value.clone().divide(C.value).value()), M = n(() => U.value && C.value - N.value.value() > 0), ge = n(() => M.value ? ae(C.value).subtract(N.value.value()).format("0.00") : "0"), he = n(() => {
|
|
96
97
|
var e;
|
|
97
98
|
return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
|
|
98
|
-
}),
|
|
99
|
-
var
|
|
100
|
-
const e = [], a = ((
|
|
101
|
-
ecoFriendly: !!i.filter((o) => o.toUpperCase() ===
|
|
102
|
-
refugeesIdps: !!A.filter((o) => o.toUpperCase() ===
|
|
103
|
-
singleParents: !!i.filter((o) => o.toUpperCase() ===
|
|
104
|
-
},
|
|
105
|
-
if (
|
|
106
|
-
const o = Math.floor(
|
|
107
|
-
e.push({ label:
|
|
99
|
+
}), Ce = n(() => {
|
|
100
|
+
var k, Y, w, B, $, K, x, q, H, j, z, J, Q, V, W, X, Z, ee, te;
|
|
101
|
+
const e = [], a = new Ee(m.value, D.value), l = ((Y = (k = t.value) == null ? void 0 : k.activity) == null ? void 0 : Y.name) ?? "", u = ((B = (w = t.value) == null ? void 0 : w.activity) == null ? void 0 : B.id) ?? null, d = ((K = ($ = t.value) == null ? void 0 : $.sector) == null ? void 0 : K.name) ?? "", T = ((q = (x = t.value) == null ? void 0 : x.sector) == null ? void 0 : q.id) ?? null, i = ((j = (H = t.value) == null ? void 0 : H.tags) == null ? void 0 : j.filter((o) => o.charAt(0) === "#").map((o) => o.substring(1))) ?? [], A = ((z = t.value) == null ? void 0 : z.themes) ?? [], b = {
|
|
102
|
+
ecoFriendly: !!i.filter((o) => o.toUpperCase() === oe || o.toUpperCase() === ne).length,
|
|
103
|
+
refugeesIdps: !!A.filter((o) => o.toUpperCase() === Ne).length,
|
|
104
|
+
singleParents: !!i.filter((o) => o.toUpperCase() === le).length
|
|
105
|
+
}, G = (Q = (J = t.value) == null ? void 0 : J.partnerName) == null ? void 0 : Q.toUpperCase().includes(Ue), O = ((V = t.value) == null ? void 0 : V.tagsData) ?? [], Ae = ((W = t.value) == null ? void 0 : W.themesData) ?? [];
|
|
106
|
+
if (G && i.length) {
|
|
107
|
+
const o = Math.floor(a() * i.length), s = i[o], r = P(O, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
108
|
+
e.push({ label: s, type: "tag", id: h });
|
|
108
109
|
}
|
|
109
|
-
if (
|
|
110
|
-
const o = Math.floor(
|
|
111
|
-
e.filter((I) => I.label.toUpperCase() ===
|
|
110
|
+
if (p.value || (b.ecoFriendly && !e.find((o) => o.label.toUpperCase() === oe || o.label.toUpperCase() === ne) ? e.push({ label: "Eco-friendly", type: "tag", id: 9 }) : b.refugeesIdps ? e.push({ label: "Refugees and IDPs", type: "attribute", id: 28 }) : b.singleParents && !e.find((o) => o.label.toUpperCase() === le) && e.push({ label: "Single Parent", type: "tag", id: 17 })), l && u && ((X = p.value) == null ? void 0 : X.toUpperCase()) !== l.toUpperCase() && e.push({ id: u, label: l, type: "activity" }), d && T && l.toUpperCase() !== d.toUpperCase() && d.toUpperCase() !== ((Z = p.value) == null ? void 0 : Z.toUpperCase()) && e.length < 2 && e.push({ id: T, label: d, type: "sector" }), i.length && e.length < 2) {
|
|
111
|
+
const o = Math.floor(a() * i.length), s = i[o], r = P(O, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
112
|
+
e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length || e.push({ label: s, type: "tag", id: h });
|
|
112
113
|
}
|
|
113
114
|
if (A.length && e.length < 2) {
|
|
114
|
-
const o = Math.floor(
|
|
115
|
-
!e.filter((I) => I.label.toUpperCase() ===
|
|
115
|
+
const o = Math.floor(a() * A.length), s = A[o], r = P(Ae, s), h = (r == null ? void 0 : r.id) ?? null;
|
|
116
|
+
!e.filter((I) => I.label.toUpperCase() === s.toUpperCase()).length && s.toUpperCase() !== ((ee = p.value) == null ? void 0 : ee.toUpperCase()) && e.push({ label: s, type: "attribute", id: h });
|
|
116
117
|
}
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
-
return e.push(...
|
|
118
|
+
if (G && e.length > 1) return [e.shift()];
|
|
119
|
+
const Le = ((te = y.value) == null ? void 0 : te.map((o) => ({ label: o }))) ?? [];
|
|
120
|
+
return e.push(...Le), e;
|
|
120
121
|
});
|
|
121
122
|
return {
|
|
122
|
-
tag:
|
|
123
|
-
readMorePath:
|
|
124
|
-
isLoading:
|
|
125
|
-
borrowerName:
|
|
126
|
-
countryName:
|
|
127
|
-
countryCode:
|
|
123
|
+
tag: re,
|
|
124
|
+
readMorePath: ue,
|
|
125
|
+
isLoading: F,
|
|
126
|
+
borrowerName: ie,
|
|
127
|
+
countryName: g,
|
|
128
|
+
countryCode: ce,
|
|
128
129
|
city: E,
|
|
129
|
-
state:
|
|
130
|
-
distributionModel:
|
|
131
|
-
imageHash:
|
|
130
|
+
state: _,
|
|
131
|
+
distributionModel: S,
|
|
132
|
+
imageHash: de,
|
|
132
133
|
hasProgressData: U,
|
|
133
|
-
allDataLoaded:
|
|
134
|
-
fundraisingPercent:
|
|
135
|
-
unreservedAmount:
|
|
136
|
-
sharesAvailable:
|
|
137
|
-
formattedLocation:
|
|
138
|
-
loanUse:
|
|
139
|
-
loanStatus:
|
|
134
|
+
allDataLoaded: pe,
|
|
135
|
+
fundraisingPercent: D,
|
|
136
|
+
unreservedAmount: ge,
|
|
137
|
+
sharesAvailable: M,
|
|
138
|
+
formattedLocation: ve,
|
|
139
|
+
loanUse: fe,
|
|
140
|
+
loanStatus: me,
|
|
140
141
|
loanAmount: C,
|
|
141
|
-
loanBorrowerCount:
|
|
142
|
-
mdiMapMarker:
|
|
143
|
-
loanCallouts:
|
|
142
|
+
loanBorrowerCount: he,
|
|
143
|
+
mdiMapMarker: ye,
|
|
144
|
+
loanCallouts: Ce
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function Te(c, v) {
|
|
147
148
|
const {
|
|
148
|
-
loanId:
|
|
149
|
+
loanId: f,
|
|
149
150
|
customLoanDetails: L,
|
|
150
|
-
kvTrackFunction:
|
|
151
|
-
} =
|
|
152
|
-
function t(
|
|
153
|
-
|
|
151
|
+
kvTrackFunction: m
|
|
152
|
+
} = se(c);
|
|
153
|
+
function t(p, y) {
|
|
154
|
+
m.value("Lending", "click-Read more", p, f.value), L.value && (y.preventDefault(), v("show-loan-details"));
|
|
154
155
|
}
|
|
155
156
|
return {
|
|
156
157
|
clickReadMore: t
|
|
157
158
|
};
|
|
158
159
|
}
|
|
159
160
|
export {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
_e as LOAN_CALLOUTS_FRAGMENT,
|
|
162
|
+
Se as LOAN_GEOCODE_FRAGMENT,
|
|
163
|
+
De as LOAN_PROGRESS_FRAGMENT,
|
|
164
|
+
Me as loanCardComputedProperties,
|
|
165
|
+
Te as loanCardMethods
|
|
165
166
|
};
|
package/dist/vue/KvSideSheet.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { toRefs as T, ref as
|
|
2
|
-
import { mdiClose as K,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { toRefs as T, ref as h, watch as B, resolveComponent as _, openBlock as d, createElementBlock as f, normalizeClass as r, withModifiers as j, createElementVNode as a, normalizeStyle as V, createVNode as v, toDisplayString as z, createCommentVNode as u, renderSlot as C } from "vue";
|
|
2
|
+
import { mdiClose as F, mdiArrowLeft as K, mdiExportVariant as N } from "@mdi/js";
|
|
3
|
+
import R from "./KvMaterialIcon.js";
|
|
4
|
+
import A from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const G = {
|
|
6
6
|
components: {
|
|
7
|
-
KvMaterialIcon:
|
|
7
|
+
KvMaterialIcon: R
|
|
8
8
|
},
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
|
@@ -41,6 +41,13 @@ const G = {
|
|
|
41
41
|
animationSourceElement: {
|
|
42
42
|
type: Object,
|
|
43
43
|
default: () => ({})
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* The headline of the side sheet
|
|
47
|
+
*/
|
|
48
|
+
headline: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
44
51
|
}
|
|
45
52
|
},
|
|
46
53
|
emits: [
|
|
@@ -48,116 +55,146 @@ const G = {
|
|
|
48
55
|
],
|
|
49
56
|
setup(w, { emit: o }) {
|
|
50
57
|
const {
|
|
51
|
-
visible:
|
|
58
|
+
visible: s,
|
|
52
59
|
kvTrackFunction: t,
|
|
53
|
-
trackEventCategory:
|
|
54
|
-
animationSourceElement:
|
|
55
|
-
} = T(w),
|
|
56
|
-
let
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
60
|
+
trackEventCategory: p,
|
|
61
|
+
animationSourceElement: y
|
|
62
|
+
} = T(w), l = h(!1), i = h({}), c = h({});
|
|
63
|
+
let m = null;
|
|
64
|
+
const g = () => {
|
|
65
|
+
const n = "tw-overflow-hidden";
|
|
66
|
+
l.value ? document.body.classList.add(n) : document.body.classList.remove(n);
|
|
67
|
+
}, k = () => {
|
|
68
|
+
l.value = !1, g(), t.value(p.value, "click", "side-sheet-closed"), y.value && (c.value = {
|
|
62
69
|
...i.value,
|
|
63
70
|
transition: "all 0.5s ease-in-out"
|
|
64
71
|
}), setTimeout(() => {
|
|
65
72
|
o("side-sheet-closed");
|
|
66
|
-
}, "700"), document.removeEventListener("keyup",
|
|
67
|
-
},
|
|
73
|
+
}, "700"), document.removeEventListener("keyup", m);
|
|
74
|
+
}, E = () => {
|
|
68
75
|
o("go-to-link");
|
|
69
76
|
};
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
var
|
|
74
|
-
if (
|
|
75
|
-
document.addEventListener("keyup",
|
|
76
|
-
|
|
77
|
+
return m = (n) => {
|
|
78
|
+
n && n.key === "Escape" && k();
|
|
79
|
+
}, B(s, () => {
|
|
80
|
+
var n;
|
|
81
|
+
if (s.value) {
|
|
82
|
+
document.addEventListener("keyup", m), setTimeout(() => {
|
|
83
|
+
l.value = !0, g();
|
|
77
84
|
}, 100);
|
|
78
|
-
const e = (
|
|
79
|
-
|
|
85
|
+
const e = (n = y.value) == null ? void 0 : n.getBoundingClientRect(), S = (e == null ? void 0 : e.top) ?? 0, L = (e == null ? void 0 : e.left) ?? 0, b = (e == null ? void 0 : e.width) ?? 0, x = (e == null ? void 0 : e.height) ?? 0;
|
|
86
|
+
S || L || b || x ? (i.value = {
|
|
80
87
|
position: "fixed",
|
|
81
|
-
top: `${
|
|
82
|
-
width: `${
|
|
83
|
-
height: `${
|
|
84
|
-
},
|
|
88
|
+
top: `${S}px`,
|
|
89
|
+
width: `${b}px`,
|
|
90
|
+
height: `${x}px`
|
|
91
|
+
}, c.value = {
|
|
85
92
|
...i.value,
|
|
86
93
|
transition: "none"
|
|
87
94
|
}, setTimeout(() => {
|
|
88
|
-
|
|
95
|
+
c.value = {
|
|
89
96
|
top: "0",
|
|
90
97
|
width: "100%",
|
|
91
98
|
height: "100%",
|
|
92
99
|
transition: "all 0.5s ease-in-out"
|
|
93
100
|
};
|
|
94
|
-
}, 10)) :
|
|
101
|
+
}, 10)) : c.value = {};
|
|
95
102
|
}
|
|
96
103
|
}), {
|
|
97
|
-
mdiClose:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
mdiClose: F,
|
|
105
|
+
mdiArrowLeft: K,
|
|
106
|
+
mdiExportVariant: N,
|
|
107
|
+
open: l,
|
|
108
|
+
closeSideSheet: k,
|
|
109
|
+
goToLink: E,
|
|
110
|
+
modalStyles: c
|
|
103
111
|
};
|
|
104
112
|
}
|
|
105
|
-
};
|
|
106
|
-
function
|
|
107
|
-
const
|
|
108
|
-
return
|
|
113
|
+
}, M = { class: "tw-flex tw-items-cente tw-gap-1.5" }, D = { key: 0 }, I = { class: "tw-flex tw-items-cente tw-gap-1.5" };
|
|
114
|
+
function O(w, o, s, t, p, y) {
|
|
115
|
+
const l = _("kv-material-icon");
|
|
116
|
+
return s.visible ? (d(), f("div", {
|
|
109
117
|
key: 0,
|
|
110
|
-
class:
|
|
118
|
+
class: r(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
|
|
111
119
|
"tw-bg-opacity-0 tw-delay-300": !t.open,
|
|
112
120
|
"tw-bg-opacity-low": t.open
|
|
113
121
|
}]),
|
|
114
|
-
onClick: o[
|
|
122
|
+
onClick: o[3] || (o[3] = j((...i) => t.closeSideSheet && t.closeSideSheet(...i), ["self"]))
|
|
115
123
|
}, [
|
|
116
|
-
|
|
117
|
-
class:
|
|
124
|
+
a("div", {
|
|
125
|
+
class: r(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white tw-overflow-y-auto", {
|
|
118
126
|
"tw-w-0 tw-delay-200 tw-opacity-0": !t.open,
|
|
119
|
-
"lg:tw-w-1/2 tw-w-full tw-opacity-full": t.open
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
"lg:tw-w-1/2 tw-w-full tw-opacity-full": t.open,
|
|
128
|
+
"tw-h-full": w.$slots.controls
|
|
129
|
+
}])
|
|
122
130
|
}, [
|
|
123
|
-
|
|
124
|
-
class:
|
|
125
|
-
|
|
126
|
-
"tw-opacity-full": t.open
|
|
127
|
-
}])
|
|
131
|
+
a("div", {
|
|
132
|
+
class: "tw-relative tw-h-full",
|
|
133
|
+
style: V(t.modalStyles)
|
|
128
134
|
}, [
|
|
129
|
-
|
|
130
|
-
class: "
|
|
131
|
-
|
|
135
|
+
a("div", {
|
|
136
|
+
class: r(["tw-flex tw-justify-between tw-transition-opacity tw-duration-500 tw-delay-200 tw-px-3 tw-py-2 tw-border-b tw-border-tertiary", {
|
|
137
|
+
"tw-opacity-0": !t.open,
|
|
138
|
+
"tw-opacity-full": t.open
|
|
139
|
+
}])
|
|
132
140
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
141
|
+
a("div", M, [
|
|
142
|
+
a("button", {
|
|
143
|
+
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
144
|
+
onClick: o[0] || (o[0] = (...i) => t.closeSideSheet && t.closeSideSheet(...i))
|
|
145
|
+
}, [
|
|
146
|
+
v(l, {
|
|
147
|
+
class: "tw-w-3 tw-h-3",
|
|
148
|
+
icon: t.mdiArrowLeft
|
|
149
|
+
}, null, 8, ["icon"])
|
|
150
|
+
]),
|
|
151
|
+
s.headline ? (d(), f("h2", D, z(s.headline), 1)) : u("", !0)
|
|
152
|
+
]),
|
|
153
|
+
a("div", I, [
|
|
154
|
+
s.showGoToLink ? (d(), f("button", {
|
|
155
|
+
key: 0,
|
|
156
|
+
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
157
|
+
onClick: o[1] || (o[1] = (...i) => t.goToLink && t.goToLink(...i))
|
|
158
|
+
}, [
|
|
159
|
+
v(l, {
|
|
160
|
+
class: "tw-w-3 tw-h-3",
|
|
161
|
+
icon: t.mdiExportVariant
|
|
162
|
+
}, null, 8, ["icon"])
|
|
163
|
+
])) : u("", !0),
|
|
164
|
+
a("button", {
|
|
165
|
+
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
166
|
+
onClick: o[2] || (o[2] = (...i) => t.closeSideSheet && t.closeSideSheet(...i))
|
|
167
|
+
}, [
|
|
168
|
+
v(l, {
|
|
169
|
+
class: "tw-w-3 tw-h-3",
|
|
170
|
+
icon: t.mdiClose
|
|
171
|
+
}, null, 8, ["icon"])
|
|
172
|
+
])
|
|
173
|
+
])
|
|
174
|
+
], 2),
|
|
175
|
+
a("div", {
|
|
176
|
+
class: r(["tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200 tw-overscroll-y-contain", {
|
|
177
|
+
"tw-opacity-0": !t.open,
|
|
178
|
+
"tw-opacity-full": t.open
|
|
179
|
+
}])
|
|
180
|
+
}, [
|
|
181
|
+
C(w.$slots, "default")
|
|
182
|
+
], 2),
|
|
183
|
+
w.$slots.controls ? (d(), f("div", {
|
|
139
184
|
key: 0,
|
|
140
|
-
|
|
141
|
-
|
|
185
|
+
ref: "controlsRef",
|
|
186
|
+
class: r(["tw-absolute tw-border-t tw-border-tertiary tw-w-full tw-bottom-0 tw-bg-white", {
|
|
187
|
+
"tw-opacity-0": !t.open,
|
|
188
|
+
"tw-opacity-full": t.open
|
|
189
|
+
}])
|
|
142
190
|
}, [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
], 2),
|
|
149
|
-
d("div", {
|
|
150
|
-
class: c(["tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200 tw-overscroll-y-contain", {
|
|
151
|
-
"tw-opacity-0": !t.open,
|
|
152
|
-
"tw-opacity-full": t.open
|
|
153
|
-
}])
|
|
154
|
-
}, [
|
|
155
|
-
F(w.$slots, "default")
|
|
156
|
-
], 2)
|
|
157
|
-
], 6)
|
|
158
|
-
], 2)) : C("", !0);
|
|
191
|
+
C(w.$slots, "controls")
|
|
192
|
+
], 2)) : u("", !0)
|
|
193
|
+
], 4)
|
|
194
|
+
], 2)
|
|
195
|
+
], 2)) : u("", !0);
|
|
159
196
|
}
|
|
160
|
-
const
|
|
197
|
+
const P = /* @__PURE__ */ A(G, [["render", O]]);
|
|
161
198
|
export {
|
|
162
|
-
|
|
199
|
+
P as default
|
|
163
200
|
};
|
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -37,7 +37,7 @@ const V = {
|
|
|
37
37
|
isSmall: e
|
|
38
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
|
-
return `${D()} ${l}`;
|
|
40
|
+
return `${D(a.value)} ${l}`;
|
|
41
41
|
}, S = d(() => {
|
|
42
42
|
var l;
|
|
43
43
|
return ((l = t == null ? void 0 : t.value) == null ? void 0 : l.split("/").pop()) ?? "";
|
|
@@ -46,9 +46,9 @@ const V = {
|
|
|
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, w = 1e4) => new Promise((
|
|
49
|
+
}, C = (l, w = 1e4) => new Promise((L, k) => {
|
|
50
50
|
const x = Date.now() + w, h = () => {
|
|
51
|
-
!l || l.complete ?
|
|
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
|
});
|
|
@@ -74,7 +74,6 @@ const V = {
|
|
|
74
74
|
function K(u, a, t, e, i, m) {
|
|
75
75
|
const c = U("kv-loading-placeholder");
|
|
76
76
|
return n(), o("div", {
|
|
77
|
-
id: "kv-user-avatar",
|
|
78
77
|
class: r(["data-hj-suppress tw-flex", { "tw-w-3": t.isSmall, "tw-w-6": !t.isSmall }])
|
|
79
78
|
}, [
|
|
80
79
|
e.isAnonymousUser ? (n(), o("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.16.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"embla-carousel-fade",
|
|
112
112
|
"popper.js"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "32f1282d50bf96e83e8c71163104588a5c1252f3"
|
|
115
115
|
}
|