@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-7bbc2157]{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-7bbc2157]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-7bbc2157] .avatar div:first-child{display:flex}
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 S, watch as G, onMounted as J, onUnmounted as Q, resolveComponent as T, resolveDirective as X, openBlock as i, createElementBlock as w, withDirectives as m, normalizeClass as y, createVNode as _, createBlock as f, withCtx as H, createTextVNode as M, createElementVNode as A, createCommentVNode as C, vShow as E, toDisplayString as Y } from "vue";
2
- import { mdiAccountCircle as Z, mdiChevronDown as $, mdiMagnify as ee, mdiMenu as ne } from "@mdi/js";
3
- import te from "numeral";
4
- import oe from "../KvMaterialIcon.js";
5
- import ae from "../KvIconBag.js";
6
- import le from "./KvHeaderDropdownLink.js";
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 re } from "../../utils/throttle.js";
9
- import { isLegacyPlaceholderAvatar as de } from "../../utils/imageUtils.js";
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 ue from "../../_virtual/_plugin-vue_export-helper.js";
12
- const me = g(() => import("./KvHeaderMobileMenu.js")), P = g(() => import("./KvHeaderMyKivaMenu.js")), se = g(() => import("./LendMenu/KvLendMenu.js")), ve = g(() => import("./KvHeaderTakeActionMenu.js")), ce = g(() => import("./KvHeaderAboutMenu.js")), L = 120, k = "avatar-menu", U = "menuButton", V = { top: "-3.75rem", width: "100%" }, we = {
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: oe,
15
- KvIconBag: ae,
16
- KvHeaderDropdownLink: le,
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), B = l(null), K = l(null), b = l(null), c = l(null), x = l(null), I = l(null), d = l(null), t = l(null), O = l(!1), h = l(), s = (a, v, u = 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 D;
73
- const a = (D = o.value) == null ? void 0 : D.getBoundingClientRect();
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
- h.value = null, O.value = !0, h.value && clearTimeout(h.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()), h.value = setTimeout(() => {
87
- O.value = !1;
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
- }, N = re(() => {
89
+ }, D = de(() => {
90
90
  t.value === k && p();
91
- }, 100), j = S(() => r.isMobile ? void 0 : "/lend-by-category"), q = S(() => {
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 G(
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
- ), J(() => {
101
- import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", N);
102
- }), Q(() => {
103
- window.removeEventListener("resize", N);
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: te,
108
- mdiAccountCircle: Z,
109
- mdiChevronDown: $,
110
- mdiMagnify: ee,
111
- mdiMenu: ne,
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: B,
116
- partnerWithUsLink: K,
117
- borrowLink: b,
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: me,
128
+ KvHeaderMobileMenu: se,
129
129
  KvHeaderMyKivaMenu: P,
130
- KvLendMenu: se,
131
- KvHeaderTakeActionMenu: ve,
132
- KvHeaderAboutMenu: ce,
133
- isLegacyPlaceholderAvatar: de
130
+ KvLendMenu: ve,
131
+ KvHeaderTakeActionMenu: ce,
132
+ KvHeaderAboutMenu: we,
133
+ isLegacyPlaceholderAvatar: ue,
134
+ roundedBalance: G
134
135
  };
135
136
  }
136
- }, fe = { class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5" }, Me = ["href"], ke = { class: "tw-text-eco-green-4" }, ge = ["href"];
137
- function be(r, n, o, e, B, K) {
138
- const b = T("kv-material-icon"), c = T("KvHeaderDropdownLink"), x = T("kv-icon-bag"), I = T("KvUserAvatar"), d = X("kv-track-event");
139
- return i(), w("div", fe, [
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
- _(b, { icon: e.mdiMenu }, null, 8, ["icon"])
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: H(() => n[10] || (n[10] = [
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: H(() => n[11] || (n[11] = [
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: H(() => n[12] || (n[12] = [
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, Me)), [
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(b, {
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", ke, Y(e.numeral(o.balance).format("$0")), 1)
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, ge)), [
266
+ ]), 10, he)), [
266
267
  [d, ["TopNav", "click-Sign-in"]]
267
268
  ])
268
269
  ]);
269
270
  }
270
- const Oe = /* @__PURE__ */ ue(we, [["render", be], ["__scopeId", "data-v-7bbc2157"]]);
271
+ const Ne = /* @__PURE__ */ me(fe, [["render", be], ["__scopeId", "data-v-f0a49c46"]]);
271
272
  export {
272
- Oe as default
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.56.3",
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.4.1",
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": "acdbc3a0f80d6560cfe5f136b5eee17a58623cb4"
117
+ "gitHead": "17d74986070657f1de39a0620eed5b23344aedcf"
118
118
  }