@kiva/kv-components 6.59.3 → 6.59.4

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-c17d7459]{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-c17d7459]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-c17d7459] .avatar div:first-child{display:flex}
1
+ .header-link[data-v-d33b2f4e]{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-d33b2f4e]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-d33b2f4e] .avatar div:first-child{display:flex}
@@ -1,20 +1,20 @@
1
- import { defineAsyncComponent as k, ref as r, computed as x, watch as C, onMounted as X, onUnmounted as Y, resolveComponent as b, resolveDirective as Z, openBlock as i, createElementBlock as w, withDirectives as v, normalizeClass as p, withModifiers as H, createVNode as L, createBlock as y, withCtx as U, createTextVNode as f, createElementVNode as T, createCommentVNode as _, vShow as P, toDisplayString as $ } from "vue";
2
- import { mdiAccountCircle as ee, mdiChevronDown as ne, mdiMagnify as te, mdiMenu as oe } from "@mdi/js";
3
- import ae from "numeral";
4
- import le from "../KvMaterialIcon.js";
5
- import re from "../KvIconBag.js";
6
- import ie from "./KvHeaderDropdownLink.js";
7
- import de from "../KvUserAvatar.js";
8
- import { throttle as ue } from "../../utils/throttle.js";
9
- import { isLegacyPlaceholderAvatar as me } from "../../utils/imageUtils.js";
1
+ import { defineAsyncComponent as k, ref as r, inject as Y, computed as x, watch as C, onMounted as Z, onUnmounted as $, resolveComponent as b, resolveDirective as ee, openBlock as i, createElementBlock as w, withDirectives as s, normalizeClass as p, withModifiers as H, createVNode as L, createBlock as y, withCtx as U, createTextVNode as f, createElementVNode as T, createCommentVNode as _, vShow as P, toDisplayString as ne } from "vue";
2
+ import { mdiAccountCircle as te, mdiChevronDown as oe, mdiMagnify as ae, mdiMenu as le } from "@mdi/js";
3
+ import re from "numeral";
4
+ import ie from "../KvMaterialIcon.js";
5
+ import de from "../KvIconBag.js";
6
+ import ue from "./KvHeaderDropdownLink.js";
7
+ import me from "../KvUserAvatar.js";
8
+ import { throttle as ve } from "../../utils/throttle.js";
9
+ import { isLegacyPlaceholderAvatar as se } from "../../utils/imageUtils.js";
10
10
  import "./KvHeaderLinkBar.css";
11
- import se from "../../_virtual/_plugin-vue_export-helper.js";
12
- const ve = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvHeaderMyKivaMenu.js")), ce = k(() => import("./LendMenu/KvLendMenu.js")), we = k(() => import("./KvHeaderTakeActionMenu.js")), fe = k(() => import("./KvHeaderAboutMenu.js")), B = 120, M = "avatar-menu", K = "menuButton", R = { top: "-3.75rem", width: "100%" }, F = "lendButton", Me = {
11
+ import ce from "../../_virtual/_plugin-vue_export-helper.js";
12
+ const we = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvHeaderMyKivaMenu.js")), fe = k(() => import("./LendMenu/KvLendMenu.js")), Me = k(() => import("./KvHeaderTakeActionMenu.js")), ke = k(() => import("./KvHeaderAboutMenu.js")), B = 120, M = "avatar-menu", K = "menuButton", R = { top: "-3.75rem", width: "100%" }, F = "lendButton", ge = {
13
13
  components: {
14
- KvMaterialIcon: le,
15
- KvIconBag: re,
16
- KvHeaderDropdownLink: ie,
17
- KvUserAvatar: de
14
+ KvMaterialIcon: ie,
15
+ KvIconBag: de,
16
+ KvHeaderDropdownLink: ue,
17
+ KvUserAvatar: me
18
18
  },
19
19
  props: {
20
20
  loggedIn: {
@@ -58,15 +58,15 @@ const ve = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvH
58
58
  "item-hover"
59
59
  ],
60
60
  setup(l, { emit: n }) {
61
- const a = r(null), e = r(null), N = r(null), O = r(null), h = r(null), c = r(null), A = r(null), I = r(null), d = r(null), t = r(null), u = (o, s, m = null) => {
62
- n("item-hover", o, s, m);
63
- }, z = (o, s, m = null) => {
61
+ const a = r(null), e = r(null), N = r(null), O = r(null), g = r(null), c = r(null), A = r(null), I = r(null), d = r(null), t = r(null), z = Y("$kvTrackEvent"), u = (o, v, m = null) => {
62
+ n("item-hover", o, v, m);
63
+ }, W = (o, v, m = null) => {
64
64
  navigator.maxTouchPoints || (t.value = o, u(
65
65
  o,
66
- s,
66
+ v,
67
67
  o === K && l.isMobile ? R : m
68
68
  ));
69
- }, W = (o) => {
69
+ }, j = (o) => {
70
70
  !navigator.maxTouchPoints && t.value === o && (t.value = null, u());
71
71
  }, E = () => {
72
72
  var S;
@@ -80,79 +80,79 @@ const ve = k(() => import("./KvHeaderMobileMenu.js")), V = k(() => import("./KvH
80
80
  borderRadius: l.isMobile ? "auto" : "0px 0px 8px 8px",
81
81
  width: l.isMobile ? "100%" : `${B}px`
82
82
  };
83
- }, g = () => {
83
+ }, h = () => {
84
84
  t.value = M, u(a.value, V, E());
85
- }, j = (o, s, m) => {
86
- o === F && t.value !== F && this.$kvTrackEvent(
85
+ }, q = (o, v, m) => {
86
+ o === F && t.value !== F && z(
87
87
  "TopNav",
88
88
  "hover-Lend-menu",
89
89
  "Lend"
90
- ), t.value === K && (t.value = null), !t.value || t.value !== o ? (t.value = o, o === M ? g() : o === K && l.isMobile ? u(o, s, R) : u(o, s, m)) : (t.value = null, u());
91
- }, D = ue(() => {
92
- t.value === M && g();
93
- }, 100), q = x(() => l.isMobile ? void 0 : "/lend-by-category"), G = x(() => {
90
+ ), t.value === K && (t.value = null), !t.value || t.value !== o ? (t.value = o, o === M ? h() : o === K && l.isMobile ? u(o, v, R) : u(o, v, m)) : (t.value = null, u());
91
+ }, D = ve(() => {
92
+ t.value === M && h();
93
+ }, 100), G = x(() => l.isMobile ? void 0 : "/lend-by-category"), J = x(() => {
94
94
  var o;
95
95
  return ((o = l.lenderImageUrl) == null ? void 0 : o.split("/").pop()) ?? "";
96
- }), J = x(() => Math.floor(l.balance)), Q = (o) => {
96
+ }), Q = x(() => Math.floor(l.balance)), X = (o) => {
97
97
  o.target === o.currentTarget && u();
98
98
  };
99
99
  return C(
100
100
  () => l.isMobile,
101
101
  () => {
102
- t.value === M && g();
102
+ t.value === M && h();
103
103
  }
104
104
  ), C(
105
105
  () => l.openMenuItem,
106
106
  (o) => {
107
107
  o || (t.value = null);
108
108
  }
109
- ), X(() => {
109
+ ), Z(() => {
110
110
  import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", D);
111
- }), Y(() => {
111
+ }), $(() => {
112
112
  window.removeEventListener("resize", D);
113
113
  }), {
114
114
  AVATAR_MENU_ID: M,
115
115
  openMenuId: t,
116
- numeral: ae,
117
- mdiAccountCircle: ee,
118
- mdiChevronDown: ne,
119
- mdiMagnify: te,
120
- mdiMenu: oe,
116
+ numeral: re,
117
+ mdiAccountCircle: te,
118
+ mdiChevronDown: oe,
119
+ mdiMagnify: ae,
120
+ mdiMenu: le,
121
121
  onHover: u,
122
122
  avatar: a,
123
123
  lendButton: e,
124
124
  aboutUsLink: N,
125
125
  partnerWithUsLink: O,
126
- borrowLink: h,
126
+ borrowLink: g,
127
127
  supportKivaLink: c,
128
128
  basketLink: A,
129
129
  signInLink: I,
130
130
  menuButton: d,
131
- lendUrl: q,
132
- avatarFilename: G,
133
- handleOnHover: z,
134
- handleTouchStart: j,
135
- handleMouseOut: W,
136
- handleAvatarMenuPosition: g,
137
- KvHeaderMobileMenu: ve,
131
+ lendUrl: G,
132
+ avatarFilename: J,
133
+ handleOnHover: W,
134
+ handleTouchStart: q,
135
+ handleMouseOut: j,
136
+ handleAvatarMenuPosition: h,
137
+ KvHeaderMobileMenu: we,
138
138
  KvHeaderMyKivaMenu: V,
139
- KvLendMenu: ce,
140
- KvHeaderTakeActionMenu: we,
141
- KvHeaderAboutMenu: fe,
142
- isLegacyPlaceholderAvatar: me,
139
+ KvLendMenu: fe,
140
+ KvHeaderTakeActionMenu: Me,
141
+ KvHeaderAboutMenu: ke,
142
+ isLegacyPlaceholderAvatar: se,
143
143
  getAvatarMenuPosition: E,
144
- handleEmptySpaceClick: Q,
145
- roundedBalance: J
144
+ handleEmptySpaceClick: X,
145
+ roundedBalance: Q
146
146
  };
147
147
  }
148
- }, ke = ["href"], he = { class: "tw-text-eco-green-4" }, ge = ["href"];
149
- function be(l, n, a, e, N, O) {
150
- const h = b("kv-material-icon"), c = b("KvHeaderDropdownLink"), A = b("kv-icon-bag"), I = b("KvUserAvatar"), d = Z("kv-track-event");
148
+ }, he = ["href"], be = { class: "tw-text-eco-green-4" }, pe = ["href"];
149
+ function ye(l, n, a, e, N, O) {
150
+ const g = b("kv-material-icon"), c = b("KvHeaderDropdownLink"), A = b("kv-icon-bag"), I = b("KvUserAvatar"), d = ee("kv-track-event");
151
151
  return i(), w("div", {
152
152
  class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5",
153
153
  onTouchstart: n[10] || (n[10] = (...t) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...t))
154
154
  }, [
155
- v((i(), w("button", {
155
+ s((i(), w("button", {
156
156
  ref: "menuButton",
157
157
  class: p(["header-link tw-inline-flex md:tw-hidden", {
158
158
  "tw-text-tertiary": a.openMenuItem && a.openMenuItem !== e.KvHeaderMobileMenu
@@ -161,11 +161,11 @@ function be(l, n, a, e, N, O) {
161
161
  onMouseout: n[1] || (n[1] = (t) => e.handleMouseOut("menuButton")),
162
162
  onTouchstart: n[2] || (n[2] = H((t) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
163
163
  }, [
164
- L(h, { icon: e.mdiMenu }, null, 8, ["icon"])
164
+ L(g, { icon: e.mdiMenu }, null, 8, ["icon"])
165
165
  ], 34)), [
166
166
  [d, a.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
167
167
  ]),
168
- v((i(), y(c, {
168
+ s((i(), y(c, {
169
169
  class: "tw-py-1",
170
170
  "ref-name": "lendButton",
171
171
  href: e.lendUrl,
@@ -184,7 +184,7 @@ function be(l, n, a, e, N, O) {
184
184
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
185
185
  [d, ["TopNav", "click-Lend"]]
186
186
  ]),
187
- v((i(), y(c, {
187
+ s((i(), y(c, {
188
188
  "ref-name": "takeActionButton",
189
189
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
190
190
  "menu-component": e.KvHeaderTakeActionMenu,
@@ -220,17 +220,17 @@ function be(l, n, a, e, N, O) {
220
220
  _: 1
221
221
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
222
222
  n[17] || (n[17] = T("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
223
- a.loggedIn ? v((i(), w("a", {
223
+ a.loggedIn ? s((i(), w("a", {
224
224
  key: 0,
225
225
  ref: "dashboardLink",
226
226
  href: a.myDashboardUrl,
227
227
  class: p(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!a.openMenuItem }])
228
228
  }, n[14] || (n[14] = [
229
229
  f(" My dashboard ")
230
- ]), 10, ke)), [
230
+ ]), 10, he)), [
231
231
  [d, ["TopNav", "click-Dashboard"]]
232
232
  ]) : _("", !0),
233
- v((i(), w("a", {
233
+ s((i(), w("a", {
234
234
  ref: "basketLink",
235
235
  href: "/basket",
236
236
  class: p(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!a.openMenuItem }]),
@@ -246,14 +246,14 @@ function be(l, n, a, e, N, O) {
246
246
  [P, a.basketCount > 0],
247
247
  [d, ["TopNav", "click-Basket"]]
248
248
  ]),
249
- v(T("div", {
249
+ s(T("div", {
250
250
  ref: "avatar",
251
251
  class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-bg-eco-green-1 tw-rounded-md tw-py-0.5 md:tw-py-1 tw-px-1 md:tw-px-2",
252
252
  onMouseover: n[7] || (n[7] = (t) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
253
253
  onMouseout: n[8] || (n[8] = (t) => e.handleMouseOut(e.AVATAR_MENU_ID)),
254
254
  onTouchstart: n[9] || (n[9] = H((t) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
255
255
  }, [
256
- e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), y(h, {
256
+ e.isLegacyPlaceholderAvatar(e.avatarFilename) || !e.avatarFilename ? (i(), y(g, {
257
257
  key: 0,
258
258
  icon: e.mdiAccountCircle,
259
259
  class: "tw-w-3"
@@ -264,23 +264,23 @@ function be(l, n, a, e, N, O) {
264
264
  "lender-image-url": a.lenderImageUrl,
265
265
  "is-small": ""
266
266
  }, null, 8, ["lender-name", "lender-image-url"])),
267
- T("span", he, $(e.numeral(e.roundedBalance).format("$0")), 1)
267
+ T("span", be, ne(e.numeral(e.roundedBalance).format("$0")), 1)
268
268
  ], 544), [
269
269
  [P, a.loggedIn]
270
270
  ]),
271
- a.loggedIn ? _("", !0) : v((i(), w("a", {
271
+ a.loggedIn ? _("", !0) : s((i(), w("a", {
272
272
  key: 1,
273
273
  ref: "signInLink",
274
274
  href: a.loginUrl,
275
275
  class: p(["header-link", { "tw-text-tertiary": !!a.openMenuItem }])
276
276
  }, n[16] || (n[16] = [
277
277
  f(" Sign in ")
278
- ]), 10, ge)), [
278
+ ]), 10, pe)), [
279
279
  [d, ["TopNav", "click-Sign-in"]]
280
280
  ])
281
281
  ], 32);
282
282
  }
283
- const Oe = /* @__PURE__ */ se(Me, [["render", be], ["__scopeId", "data-v-c17d7459"]]);
283
+ const De = /* @__PURE__ */ ce(ge, [["render", ye], ["__scopeId", "data-v-d33b2f4e"]]);
284
284
  export {
285
- Oe as default
285
+ De as default
286
286
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.59.3",
3
+ "version": "6.59.4",
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": "9d5197374578ee24fec879bfe63596c1a50e9ffc"
117
+ "gitHead": "0e86d06c371a8ddc1b13ec2532b0fbf69e26377f"
118
118
  }