@kiva/kv-components 6.56.3 → 6.57.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-link[data-v-
|
|
1
|
+
.header-link[data-v-f0a49c46]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-f0a49c46]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-f0a49c46] .avatar div:first-child{display:flex}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineAsyncComponent as g, ref as l, computed as
|
|
2
|
-
import { mdiAccountCircle as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineAsyncComponent as g, ref as l, computed as H, watch as J, onMounted as Q, onUnmounted as X, resolveComponent as T, resolveDirective as Y, openBlock as i, createElementBlock as w, withDirectives as m, normalizeClass as y, createVNode as _, createBlock as f, withCtx as B, createTextVNode as M, createElementVNode as A, createCommentVNode as C, vShow as E, toDisplayString as Z } from "vue";
|
|
2
|
+
import { mdiAccountCircle as $, mdiChevronDown as ee, mdiMagnify as ne, mdiMenu as te } from "@mdi/js";
|
|
3
|
+
import oe from "numeral";
|
|
4
|
+
import ae from "../KvMaterialIcon.js";
|
|
5
|
+
import le from "../KvIconBag.js";
|
|
6
|
+
import re from "./KvHeaderDropdownLink.js";
|
|
7
7
|
import ie from "../KvUserAvatar.js";
|
|
8
|
-
import { throttle as
|
|
9
|
-
import { isLegacyPlaceholderAvatar as
|
|
8
|
+
import { throttle as de } from "../../utils/throttle.js";
|
|
9
|
+
import { isLegacyPlaceholderAvatar as ue } from "../../utils/imageUtils.js";
|
|
10
10
|
import "./KvHeaderLinkBar.css";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import me from "../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const se = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvHeaderMyKivaMenu.js")), ve = g(() => import("./LendMenu/KvLendMenu.js")), ce = g(() => import("./KvHeaderTakeActionMenu.js")), we = g(() => import("./KvHeaderAboutMenu.js")), L = 120, k = "avatar-menu", U = "menuButton", V = { top: "-3.75rem", width: "100%" }, fe = {
|
|
13
13
|
components: {
|
|
14
|
-
KvMaterialIcon:
|
|
15
|
-
KvIconBag:
|
|
16
|
-
KvHeaderDropdownLink:
|
|
14
|
+
KvMaterialIcon: ae,
|
|
15
|
+
KvIconBag: le,
|
|
16
|
+
KvHeaderDropdownLink: re,
|
|
17
17
|
KvUserAvatar: ie
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
@@ -58,7 +58,7 @@ const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvH
|
|
|
58
58
|
"item-hover"
|
|
59
59
|
],
|
|
60
60
|
setup(r, { emit: n }) {
|
|
61
|
-
const o = l(null), e = l(null),
|
|
61
|
+
const o = l(null), e = l(null), K = l(null), O = l(null), h = l(null), c = l(null), x = l(null), I = l(null), d = l(null), t = l(null), N = l(!1), b = l(), s = (a, v, u = null) => {
|
|
62
62
|
n("item-hover", a, v, u);
|
|
63
63
|
}, R = (a, v, u = null) => {
|
|
64
64
|
navigator.maxTouchPoints || (t.value = a, s(
|
|
@@ -69,8 +69,8 @@ const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvH
|
|
|
69
69
|
}, F = (a) => {
|
|
70
70
|
!navigator.maxTouchPoints && t.value === a && (t.value = null, s());
|
|
71
71
|
}, z = () => {
|
|
72
|
-
var
|
|
73
|
-
const a = (
|
|
72
|
+
var S;
|
|
73
|
+
const a = (S = o.value) == null ? void 0 : S.getBoundingClientRect();
|
|
74
74
|
if (!a) return null;
|
|
75
75
|
const u = a.left + a.width / 2 - L / 2;
|
|
76
76
|
return {
|
|
@@ -83,38 +83,38 @@ const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvH
|
|
|
83
83
|
}, p = () => {
|
|
84
84
|
t.value = k, s(o.value, P, z());
|
|
85
85
|
}, W = (a, v, u) => {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
b.value = null, N.value = !0, b.value && clearTimeout(b.value), t.value === U && (t.value = null), !t.value || t.value !== a ? (t.value = a, a === k ? p() : a === U && r.isMobile ? s(a, v, V) : s(a, v, u)) : (t.value = null, s()), b.value = setTimeout(() => {
|
|
87
|
+
N.value = !1;
|
|
88
88
|
}, 500);
|
|
89
|
-
},
|
|
89
|
+
}, D = de(() => {
|
|
90
90
|
t.value === k && p();
|
|
91
|
-
}, 100), j =
|
|
91
|
+
}, 100), j = H(() => r.isMobile ? void 0 : "/lend-by-category"), q = H(() => {
|
|
92
92
|
var a;
|
|
93
93
|
return ((a = r.lenderImageUrl) == null ? void 0 : a.split("/").pop()) ?? "";
|
|
94
|
-
});
|
|
95
|
-
return
|
|
94
|
+
}), G = H(() => Math.floor(r.balance));
|
|
95
|
+
return J(
|
|
96
96
|
() => r.isMobile,
|
|
97
97
|
() => {
|
|
98
98
|
t.value === k && p();
|
|
99
99
|
}
|
|
100
|
-
),
|
|
101
|
-
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize",
|
|
102
|
-
}),
|
|
103
|
-
window.removeEventListener("resize",
|
|
100
|
+
), Q(() => {
|
|
101
|
+
import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", D);
|
|
102
|
+
}), X(() => {
|
|
103
|
+
window.removeEventListener("resize", D);
|
|
104
104
|
}), {
|
|
105
105
|
AVATAR_MENU_ID: k,
|
|
106
106
|
openMenuId: t,
|
|
107
|
-
numeral:
|
|
108
|
-
mdiAccountCircle:
|
|
109
|
-
mdiChevronDown:
|
|
110
|
-
mdiMagnify:
|
|
111
|
-
mdiMenu:
|
|
107
|
+
numeral: oe,
|
|
108
|
+
mdiAccountCircle: $,
|
|
109
|
+
mdiChevronDown: ee,
|
|
110
|
+
mdiMagnify: ne,
|
|
111
|
+
mdiMenu: te,
|
|
112
112
|
onHover: s,
|
|
113
113
|
avatar: o,
|
|
114
114
|
lendButton: e,
|
|
115
|
-
aboutUsLink:
|
|
116
|
-
partnerWithUsLink:
|
|
117
|
-
borrowLink:
|
|
115
|
+
aboutUsLink: K,
|
|
116
|
+
partnerWithUsLink: O,
|
|
117
|
+
borrowLink: h,
|
|
118
118
|
supportKivaLink: c,
|
|
119
119
|
basketLink: x,
|
|
120
120
|
signInLink: I,
|
|
@@ -125,18 +125,19 @@ const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvH
|
|
|
125
125
|
handleTouchStart: W,
|
|
126
126
|
handleMouseOut: F,
|
|
127
127
|
handleAvatarMenuPosition: p,
|
|
128
|
-
KvHeaderMobileMenu:
|
|
128
|
+
KvHeaderMobileMenu: se,
|
|
129
129
|
KvHeaderMyKivaMenu: P,
|
|
130
|
-
KvLendMenu:
|
|
131
|
-
KvHeaderTakeActionMenu:
|
|
132
|
-
KvHeaderAboutMenu:
|
|
133
|
-
isLegacyPlaceholderAvatar:
|
|
130
|
+
KvLendMenu: ve,
|
|
131
|
+
KvHeaderTakeActionMenu: ce,
|
|
132
|
+
KvHeaderAboutMenu: we,
|
|
133
|
+
isLegacyPlaceholderAvatar: ue,
|
|
134
|
+
roundedBalance: G
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
|
-
},
|
|
137
|
-
function be(r, n, o, e,
|
|
138
|
-
const
|
|
139
|
-
return i(), w("div",
|
|
137
|
+
}, Me = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5" }, ke = ["href"], ge = { class: "tw-text-eco-green-4" }, he = ["href"];
|
|
138
|
+
function be(r, n, o, e, K, O) {
|
|
139
|
+
const h = T("kv-material-icon"), c = T("KvHeaderDropdownLink"), x = T("kv-icon-bag"), I = T("KvUserAvatar"), d = Y("kv-track-event");
|
|
140
|
+
return i(), w("div", Me, [
|
|
140
141
|
m((i(), w("button", {
|
|
141
142
|
ref: "menuButton",
|
|
142
143
|
class: y(["header-link tw-inline-flex md:tw-hidden", {
|
|
@@ -146,7 +147,7 @@ function be(r, n, o, e, B, K) {
|
|
|
146
147
|
onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
|
|
147
148
|
onTouchstart: n[2] || (n[2] = (t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu))
|
|
148
149
|
}, [
|
|
149
|
-
_(
|
|
150
|
+
_(h, { icon: e.mdiMenu }, null, 8, ["icon"])
|
|
150
151
|
], 34)), [
|
|
151
152
|
[d, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
|
|
152
153
|
]),
|
|
@@ -162,7 +163,7 @@ function be(r, n, o, e, B, K) {
|
|
|
162
163
|
onMouseout: n[3] || (n[3] = (t) => e.handleMouseOut("lendButton")),
|
|
163
164
|
onTouchstart: n[4] || (n[4] = (t) => e.handleTouchStart("lendButton", e.KvLendMenu))
|
|
164
165
|
}, {
|
|
165
|
-
default:
|
|
166
|
+
default: B(() => n[10] || (n[10] = [
|
|
166
167
|
M(" Lend ")
|
|
167
168
|
])),
|
|
168
169
|
_: 1
|
|
@@ -180,7 +181,7 @@ function be(r, n, o, e, B, K) {
|
|
|
180
181
|
onMouseout: n[5] || (n[5] = (t) => e.handleMouseOut("takeActionButton")),
|
|
181
182
|
onUserTap: e.handleTouchStart
|
|
182
183
|
}, {
|
|
183
|
-
default:
|
|
184
|
+
default: B(() => n[11] || (n[11] = [
|
|
184
185
|
M(" Take action ")
|
|
185
186
|
])),
|
|
186
187
|
_: 1
|
|
@@ -199,7 +200,7 @@ function be(r, n, o, e, B, K) {
|
|
|
199
200
|
onMouseout: n[6] || (n[6] = (t) => e.handleMouseOut("aboutUsLink")),
|
|
200
201
|
onUserTap: e.handleTouchStart
|
|
201
202
|
}, {
|
|
202
|
-
default:
|
|
203
|
+
default: B(() => n[12] || (n[12] = [
|
|
203
204
|
M(" About ")
|
|
204
205
|
])),
|
|
205
206
|
_: 1
|
|
@@ -214,7 +215,7 @@ function be(r, n, o, e, B, K) {
|
|
|
214
215
|
class: y(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
215
216
|
}, n[13] || (n[13] = [
|
|
216
217
|
M(" My dashboard ")
|
|
217
|
-
]), 10,
|
|
218
|
+
]), 10, ke)), [
|
|
218
219
|
[d, ["TopNav", "click-Dashboard"]]
|
|
219
220
|
]) : C("", !0),
|
|
220
221
|
m((i(), w("a", {
|
|
@@ -240,7 +241,7 @@ function be(r, n, o, e, B, K) {
|
|
|
240
241
|
onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
|
|
241
242
|
onTouchstart: n[9] || (n[9] = (t) => e.handleTouchStart(e.AVATAR_MENU_ID))
|
|
242
243
|
}, [
|
|
243
|
-
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(
|
|
244
|
+
e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), f(h, {
|
|
244
245
|
key: 0,
|
|
245
246
|
icon: e.mdiAccountCircle,
|
|
246
247
|
class: "tw-w-3"
|
|
@@ -251,7 +252,7 @@ function be(r, n, o, e, B, K) {
|
|
|
251
252
|
"lender-image-url": o.lenderImageUrl,
|
|
252
253
|
"is-small": ""
|
|
253
254
|
}, null, 8, ["lender-name", "lender-image-url"])),
|
|
254
|
-
A("span",
|
|
255
|
+
A("span", ge, Z(e.numeral(e.roundedBalance).format("$0")), 1)
|
|
255
256
|
], 544), [
|
|
256
257
|
[E, o.loggedIn]
|
|
257
258
|
]),
|
|
@@ -262,12 +263,12 @@ function be(r, n, o, e, B, K) {
|
|
|
262
263
|
class: y(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
|
|
263
264
|
}, n[15] || (n[15] = [
|
|
264
265
|
M(" Sign in ")
|
|
265
|
-
]), 10,
|
|
266
|
+
]), 10, he)), [
|
|
266
267
|
[d, ["TopNav", "click-Sign-in"]]
|
|
267
268
|
])
|
|
268
269
|
]);
|
|
269
270
|
}
|
|
270
|
-
const
|
|
271
|
+
const Ne = /* @__PURE__ */ me(fe, [["render", be], ["__scopeId", "data-v-f0a49c46"]]);
|
|
271
272
|
export {
|
|
272
|
-
|
|
273
|
+
Ne as default
|
|
273
274
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.57.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@babel/preset-env": "^7.24.8",
|
|
22
22
|
"@babel/preset-react": "^7.24.7",
|
|
23
23
|
"@babel/preset-typescript": "^7.24.7",
|
|
24
|
-
"@kiva/kv-tokens": "^3.
|
|
24
|
+
"@kiva/kv-tokens": "^3.5.0",
|
|
25
25
|
"@kiva/vite-plugin-vue-lib-css": "^2.0.0",
|
|
26
26
|
"@laynezh/vite-plugin-lib-assets": "^0.6.1",
|
|
27
27
|
"@mdi/js": "^7.4.47",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "17d74986070657f1de39a0620eed5b23344aedcf"
|
|
118
118
|
}
|