@kiva/kv-components 6.47.1 → 6.48.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,7 +1,7 @@
1
- import { getCurrentInstance as i, computed as u, resolveComponent as m, openBlock as c, createElementBlock as f, normalizeClass as l, renderSlot as w, createVNode as p } from "vue";
1
+ import { getCurrentInstance as d, computed as u, resolveComponent as m, openBlock as c, createElementBlock as f, normalizeClass as l, renderSlot as w, createVNode as p } from "vue";
2
2
  import v from "../KvMaterialIcon.js";
3
- import M from "../../_virtual/_plugin-vue_export-helper.js";
4
- const h = {
3
+ import h from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const x = {
5
5
  components: { KvMaterialIcon: v },
6
6
  props: {
7
7
  refName: {
@@ -37,7 +37,7 @@ const h = {
37
37
  "on-hover"
38
38
  ],
39
39
  setup(e, { emit: o }) {
40
- const { proxy: n } = i();
40
+ const { proxy: n } = d();
41
41
  return {
42
42
  computedClass: u(() => [
43
43
  e.baseClass,
@@ -60,24 +60,23 @@ const h = {
60
60
  }
61
61
  };
62
62
  }
63
- }, x = ["href"];
64
- function C(e, o, n, r, d, s) {
63
+ }, C = ["href"];
64
+ function M(e, o, n, r, i, s) {
65
65
  const a = m("KvMaterialIcon");
66
66
  return c(), f("a", {
67
67
  ref: n.refName,
68
68
  class: l(["tw-px-1.5 tw-py-1 tw-mx-1 tw-no-underline hover:tw-no-underline tw-text-primary hover:tw-text-action tw-items-center tw-rounded tw-cursor-pointer", r.computedClass]),
69
69
  href: n.href,
70
- onMouseover: o[0] || (o[0] = (...t) => r.handleMouseOver && r.handleMouseOver(...t)),
71
- onMouseout: o[1] || (o[1] = (...t) => r.handleMouseOver && r.handleMouseOver(...t))
70
+ onMouseover: o[0] || (o[0] = (...t) => r.handleMouseOver && r.handleMouseOver(...t))
72
71
  }, [
73
72
  w(e.$slots, "default"),
74
73
  p(a, {
75
74
  class: l(["tw-inline tw-w-3 tw-ml-0.5 tw-transition-transform tw-duration-300", { "tw-rotate-180": n.openMenuItem === n.menuComponent }]),
76
75
  icon: n.dropdownIcon
77
76
  }, null, 8, ["class", "icon"])
78
- ], 42, x);
77
+ ], 42, C);
79
78
  }
80
- const _ = /* @__PURE__ */ M(h, [["render", C]]);
79
+ const O = /* @__PURE__ */ h(x, [["render", M]]);
81
80
  export {
82
- _ as default
81
+ O as default
83
82
  };
@@ -1 +1 @@
1
- .header-link[data-v-1ecf0a38]{cursor:pointer;padding:1rem .5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-1ecf0a38]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}@media (min-width: 64rem){.header-link[data-v-1ecf0a38]{padding-left:1.25rem;padding-right:1.25rem}}
1
+ .header-link[data-v-c569a6b0]{cursor:pointer;padding:1rem .5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-c569a6b0]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}@media (min-width: 64rem){.header-link[data-v-c569a6b0]{padding-left:1.25rem;padding-right:1.25rem}}
@@ -1,4 +1,4 @@
1
- import { defineAsyncComponent as f, ref as l, computed as O, onMounted as S, onUnmounted as E, resolveComponent as M, resolveDirective as P, openBlock as t, createElementBlock as m, withDirectives as d, normalizeClass as g, createVNode as U, createBlock as b, withCtx as H, createTextVNode as c, createElementVNode as B, createCommentVNode as v, toDisplayString as V } from "vue";
1
+ import { defineAsyncComponent as f, ref as a, computed as O, onMounted as S, onUnmounted as E, resolveComponent as M, resolveDirective as P, openBlock as i, createElementBlock as m, withDirectives as d, normalizeClass as g, createVNode as B, createBlock as b, withCtx as I, createTextVNode as v, createElementVNode as T, createCommentVNode as c, toDisplayString as V } from "vue";
2
2
  import { mdiAccountCircle as z, mdiChevronDown as W, mdiMagnify as j, mdiMenu as F } from "@mdi/js";
3
3
  import q from "numeral";
4
4
  import G from "../KvMaterialIcon.js";
@@ -8,7 +8,7 @@ import R from "../KvUserAvatar.js";
8
8
  import { throttle as X } from "../../utils/throttle.js";
9
9
  import "./KvHeaderLinkBar.css";
10
10
  import Y from "../../_virtual/_plugin-vue_export-helper.js";
11
- const Z = f(() => import("./KvHeaderMobileMenu.js")), T = f(() => import("./KvHeaderMyKivaMenu.js")), $ = f(() => import("./LendMenu/KvLendMenu.js")), ee = f(() => import("./KvHeaderTakeActionMenu.js")), ne = f(() => import("./KvHeaderAboutMenu.js")), C = 118, oe = {
11
+ const Z = f(() => import("./KvHeaderMobileMenu.js")), C = f(() => import("./KvHeaderMyKivaMenu.js")), $ = f(() => import("./LendMenu/KvLendMenu.js")), ee = f(() => import("./KvHeaderTakeActionMenu.js")), ne = f(() => import("./KvHeaderAboutMenu.js")), D = 118, oe = {
12
12
  components: {
13
13
  KvMaterialIcon: G,
14
14
  KvIconBag: J,
@@ -56,25 +56,25 @@ const Z = f(() => import("./KvHeaderMobileMenu.js")), T = f(() => import("./KvHe
56
56
  emits: [
57
57
  "item-hover"
58
58
  ],
59
- setup(u, { emit: o }) {
60
- const e = l(null), n = l(null), I = l(null), x = l(null), p = l(null), s = l(null), y = l(null), h = l(null), i = l(null), a = (r, w, k = null) => {
61
- o("item-hover", r, w, k);
59
+ setup(u, { emit: e }) {
60
+ const o = a(null), n = a(null), x = a(null), h = a(null), p = a(null), s = a(null), H = a(null), y = a(null), r = a(null), t = (l, w, k = null) => {
61
+ e("item-hover", l, w, k);
62
62
  }, K = () => {
63
- var L, _;
64
- const r = (_ = (L = e.value) == null ? void 0 : L.userAvatar) == null ? void 0 : _.getBoundingClientRect();
63
+ var L, N;
64
+ const l = (N = (L = o.value) == null ? void 0 : L.userAvatar) == null ? void 0 : N.getBoundingClientRect();
65
65
  let w = null, k = !1;
66
- if (r) {
67
- const N = (r == null ? void 0 : r.left) + (r == null ? void 0 : r.width) / 2 - C / 2;
68
- N + C > window.outerWidth && (k = !0), w = {
69
- ...k ? { right: 0 } : { left: u.isMobile ? 0 : `${N}px` },
66
+ if (l) {
67
+ const U = (l == null ? void 0 : l.left) + (l == null ? void 0 : l.width) / 2 - D / 2;
68
+ U + D > window.outerWidth && (k = !0), w = {
69
+ ...k ? { right: 0 } : { left: u.isMobile ? 0 : `${U}px` },
70
70
  borderRadius: "0px 0px 8px 8px",
71
71
  width: `${u.isMobile ? "100%" : "auto"}`
72
72
  };
73
73
  }
74
- a(e.value, T, w);
74
+ t(o.value, C, w);
75
75
  }, A = X(() => {
76
76
  u.openMenuItem && K();
77
- }, 50), D = O(() => u.isMobile ? void 0 : "/lend-by-category");
77
+ }, 50), _ = O(() => u.isMobile ? void 0 : "/lend-by-category");
78
78
  return S(() => {
79
79
  import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", A);
80
80
  }), E(() => {
@@ -85,20 +85,20 @@ const Z = f(() => import("./KvHeaderMobileMenu.js")), T = f(() => import("./KvHe
85
85
  mdiChevronDown: W,
86
86
  mdiMagnify: j,
87
87
  mdiMenu: F,
88
- onHover: a,
89
- avatar: e,
88
+ onHover: t,
89
+ avatar: o,
90
90
  lendButton: n,
91
- aboutUsLink: I,
92
- partnerWithUsLink: x,
91
+ aboutUsLink: x,
92
+ partnerWithUsLink: h,
93
93
  borrowLink: p,
94
94
  supportKivaLink: s,
95
- basketLink: y,
96
- signInLink: h,
97
- menuButton: i,
98
- lendUrl: D,
95
+ basketLink: H,
96
+ signInLink: y,
97
+ menuButton: r,
98
+ lendUrl: _,
99
99
  handleAvatarMenuPosition: K,
100
100
  KvHeaderMobileMenu: Z,
101
- KvHeaderMyKivaMenu: T,
101
+ KvHeaderMyKivaMenu: C,
102
102
  KvLendMenu: $,
103
103
  KvHeaderTakeActionMenu: ee,
104
104
  KvHeaderAboutMenu: ne
@@ -108,120 +108,123 @@ const Z = f(() => import("./KvHeaderMobileMenu.js")), T = f(() => import("./KvHe
108
108
  key: 0,
109
109
  class: "tw-bg-eco-green-1 tw-py-0.5 tw-px-1 tw-text-eco-green-4"
110
110
  }, le = ["href"];
111
- function ae(u, o, e, n, I, x) {
112
- const p = M("kv-material-icon"), s = M("KvHeaderDropdownLink"), y = M("kv-icon-bag"), h = M("KvUserAvatar"), i = P("kv-track-event");
113
- return t(), m("div", te, [
114
- d((t(), m("button", {
111
+ function ae(u, e, o, n, x, h) {
112
+ const p = M("kv-material-icon"), s = M("KvHeaderDropdownLink"), H = M("kv-icon-bag"), y = M("KvUserAvatar"), r = P("kv-track-event");
113
+ return i(), m("div", te, [
114
+ d((i(), m("button", {
115
115
  ref: "menuButton",
116
116
  class: g(["header-link tw-inline-flex lg:tw-hidden", {
117
- "tw-text-tertiary": e.openMenuItem && e.openMenuItem !== n.KvHeaderMobileMenu
117
+ "tw-text-tertiary": o.openMenuItem && o.openMenuItem !== n.KvHeaderMobileMenu
118
118
  }]),
119
- onMouseover: o[0] || (o[0] = (a) => n.onHover(n.menuButton, n.KvHeaderMobileMenu)),
120
- onMouseout: o[1] || (o[1] = (a) => n.onHover())
119
+ onMouseover: e[0] || (e[0] = (t) => n.onHover(n.menuButton, n.KvHeaderMobileMenu)),
120
+ onMouseout: e[1] || (e[1] = (t) => n.onHover())
121
121
  }, [
122
- U(p, { icon: n.mdiMenu }, null, 8, ["icon"])
122
+ B(p, { icon: n.mdiMenu }, null, 8, ["icon"])
123
123
  ], 34)), [
124
- [i, e.openMenuItem === n.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
124
+ [r, o.openMenuItem === n.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
125
125
  ]),
126
- d((t(), b(s, {
126
+ d((i(), b(s, {
127
127
  "ref-name": "lendButton",
128
128
  href: n.lendUrl,
129
129
  "menu-component": n.KvLendMenu,
130
- "open-menu-item": e.openMenuItem,
130
+ "open-menu-item": o.openMenuItem,
131
131
  "dropdown-icon": n.mdiChevronDown,
132
132
  "base-class": "tw-inline-flex",
133
- onOnHover: n.onHover
133
+ onOnHover: n.onHover,
134
+ onMouseout: e[2] || (e[2] = (t) => n.onHover())
134
135
  }, {
135
- default: H(() => o[4] || (o[4] = [
136
- c(" Lend ")
136
+ default: I(() => e[7] || (e[7] = [
137
+ v(" Lend ")
137
138
  ])),
138
139
  _: 1
139
140
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
140
- [i, ["TopNav", "click-Lend"]]
141
+ [r, ["TopNav", "click-Lend"]]
141
142
  ]),
142
- d((t(), b(s, {
143
+ d((i(), b(s, {
143
144
  "ref-name": "takeActionButton",
144
145
  "base-class": "tw-hidden lg:tw-inline-flex",
145
146
  "menu-component": n.KvHeaderTakeActionMenu,
146
- "open-menu-item": e.openMenuItem,
147
+ "open-menu-item": o.openMenuItem,
147
148
  "dropdown-icon": n.mdiChevronDown,
148
149
  "send-link-position": "",
149
- onOnHover: n.onHover
150
+ onOnHover: n.onHover,
151
+ onMouseout: e[3] || (e[3] = (t) => n.onHover())
150
152
  }, {
151
- default: H(() => o[5] || (o[5] = [
152
- c(" Take action ")
153
+ default: I(() => e[8] || (e[8] = [
154
+ v(" Take action ")
153
155
  ])),
154
156
  _: 1
155
157
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
156
- [i, ["TopNav", "click-TakeAction"]]
158
+ [r, ["TopNav", "click-TakeAction"]]
157
159
  ]),
158
- d((t(), b(s, {
160
+ d((i(), b(s, {
159
161
  "ref-name": "aboutUsLink",
160
162
  "base-class": "tw-hidden lg:tw-inline-flex",
161
163
  "menu-component": n.KvHeaderAboutMenu,
162
- "open-menu-item": e.openMenuItem,
164
+ "open-menu-item": o.openMenuItem,
163
165
  "dropdown-icon": n.mdiChevronDown,
164
166
  "send-link-position": "",
165
- onOnHover: n.onHover
167
+ onOnHover: n.onHover,
168
+ onMouseout: e[4] || (e[4] = (t) => n.onHover())
166
169
  }, {
167
- default: H(() => o[6] || (o[6] = [
168
- c(" About ")
170
+ default: I(() => e[9] || (e[9] = [
171
+ v(" About ")
169
172
  ])),
170
173
  _: 1
171
174
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
172
- [i, ["TopNav", "click-About"]]
175
+ [r, ["TopNav", "click-About"]]
173
176
  ]),
174
- o[9] || (o[9] = B("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
175
- e.loggedIn ? d((t(), m("a", {
177
+ e[12] || (e[12] = T("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
178
+ o.loggedIn ? d((i(), m("a", {
176
179
  key: 0,
177
180
  ref: "dashboardLink",
178
- href: e.myDashboardUrl,
179
- class: g(["header-link tw-hidden lg:tw-block", { "tw-text-tertiary": !!e.openMenuItem }])
180
- }, o[7] || (o[7] = [
181
- c(" My dashboard ")
181
+ href: o.myDashboardUrl,
182
+ class: g(["header-link tw-hidden lg:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
183
+ }, e[10] || (e[10] = [
184
+ v(" My dashboard ")
182
185
  ]), 10, ie)), [
183
- [i, ["TopNav", "click-Dashboard"]]
184
- ]) : v("", !0),
185
- e.basketCount > 0 ? d((t(), m("a", {
186
+ [r, ["TopNav", "click-Dashboard"]]
187
+ ]) : c("", !0),
188
+ o.basketCount > 0 ? d((i(), m("a", {
186
189
  key: 1,
187
190
  ref: "basketLink",
188
191
  href: "/basket",
189
- class: g(["header-link tw-relative", { "tw-text-tertiary": !!e.openMenuItem }])
192
+ class: g(["header-link tw-relative", { "tw-text-tertiary": !!o.openMenuItem }])
190
193
  }, [
191
- U(y, {
194
+ B(H, {
192
195
  class: "tw-w-3 tw-h-3 tw-pointer-events-none",
193
- count: e.basketCount
196
+ count: o.basketCount
194
197
  }, null, 8, ["count"])
195
198
  ], 2)), [
196
- [i, ["TopNav", "click-Basket"]]
197
- ]) : v("", !0),
198
- B("div", {
199
+ [r, ["TopNav", "click-Basket"]]
200
+ ]) : c("", !0),
201
+ T("div", {
199
202
  class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1",
200
- onMouseover: o[2] || (o[2] = (...a) => n.handleAvatarMenuPosition && n.handleAvatarMenuPosition(...a)),
201
- onMouseout: o[3] || (o[3] = (a) => n.onHover())
203
+ onMouseover: e[5] || (e[5] = (...t) => n.handleAvatarMenuPosition && n.handleAvatarMenuPosition(...t)),
204
+ onMouseout: e[6] || (e[6] = (t) => n.onHover())
202
205
  }, [
203
- e.loggedIn ? (t(), m("span", re, V(n.numeral(e.balance).format("$0")), 1)) : v("", !0),
204
- e.loggedIn ? (t(), b(h, {
206
+ o.loggedIn ? (i(), m("span", re, V(n.numeral(o.balance).format("$0")), 1)) : c("", !0),
207
+ o.loggedIn ? (i(), b(y, {
205
208
  key: 1,
206
209
  ref: "avatar",
207
- "lender-name": e.lenderName,
208
- "lender-image-url": e.lenderImageUrl,
210
+ "lender-name": o.lenderName,
211
+ "lender-image-url": o.lenderImageUrl,
209
212
  "is-small": ""
210
- }, null, 8, ["lender-name", "lender-image-url"])) : v("", !0)
213
+ }, null, 8, ["lender-name", "lender-image-url"])) : c("", !0)
211
214
  ], 32),
212
- e.loggedIn ? v("", !0) : d((t(), m("a", {
215
+ o.loggedIn ? c("", !0) : d((i(), m("a", {
213
216
  key: 2,
214
217
  ref: "signInLink",
215
- href: e.loginUrl,
216
- class: g(["header-link", { "tw-text-tertiary": !!e.openMenuItem }])
217
- }, o[8] || (o[8] = [
218
- c(" Sign in ")
218
+ href: o.loginUrl,
219
+ class: g(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
220
+ }, e[11] || (e[11] = [
221
+ v(" Sign in ")
219
222
  ]), 10, le)), [
220
- [i, ["TopNav", "click-Sign-in"]]
223
+ [r, ["TopNav", "click-Sign-in"]]
221
224
  ])
222
225
  ]);
223
226
  }
224
- const pe = /* @__PURE__ */ Y(oe, [["render", ae], ["__scopeId", "data-v-1ecf0a38"]]);
227
+ const pe = /* @__PURE__ */ Y(oe, [["render", ae], ["__scopeId", "data-v-c569a6b0"]]);
225
228
  export {
226
229
  pe as default
227
230
  };
@@ -1 +1 @@
1
- .lend-link[data-v-4fed1891]{display:block;width:100%;padding-top:.5rem;padding-bottom:.5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.lend-link[data-v-4fed1891]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}
1
+ .lend-link[data-v-41849311]{display:block;width:100%;padding-top:.5rem;padding-bottom:.5rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.lend-link[data-v-41849311]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:underline}