@kiva/kv-components 8.27.0 → 8.29.0

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
- .segment-circle[data-v-73c9f5f9]{transition:stroke-dashoffset .5s ease-in-out}.skeleton-ring[data-v-73c9f5f9]{opacity:1;transition:opacity .5s ease-in-out}.skeleton-ring--loading[data-v-73c9f5f9]{animation:skeleton-ring-pulse-73c9f5f9 1.4s ease-in-out infinite;transform-origin:center}.legend-dot[data-v-73c9f5f9]{transition:background-color .5s ease-in-out}@keyframes skeleton-ring-pulse-73c9f5f9{0%,to{opacity:.45}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.skeleton-ring--loading[data-v-73c9f5f9]{animation:none}}
1
+ .segment-circle[data-v-9afd557d]{transition:stroke-dashoffset var(--segment-grow-duration, .5s) ease-in-out}.skeleton-ring[data-v-9afd557d]{opacity:1;transition:opacity .5s ease-in-out}.skeleton-ring--loading[data-v-9afd557d]{animation:skeleton-ring-pulse-9afd557d 1.4s ease-in-out infinite;transform-origin:center}.legend-dot[data-v-9afd557d]{transition:background-color .5s ease-in-out}@keyframes skeleton-ring-pulse-9afd557d{0%,to{opacity:.45}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.skeleton-ring--loading[data-v-9afd557d]{animation:none}}
@@ -1,29 +1,30 @@
1
1
  import y from "./KvPieChartV22.js";
2
- import { resolveComponent as x, openBlock as l, createElementBlock as o, createElementVNode as r, normalizeClass as k, createCommentVNode as n, Fragment as d, renderList as c, normalizeStyle as s, toDisplayString as w, createBlock as _, withCtx as b } from "vue";
2
+ import { resolveComponent as x, openBlock as l, createElementBlock as o, normalizeStyle as s, createElementVNode as r, normalizeClass as k, createCommentVNode as n, Fragment as d, renderList as c, toDisplayString as w, createBlock as _, withCtx as b } from "vue";
3
3
  import "./KvPieChartV2.css";
4
4
  import u from "../_virtual/_plugin-vue_export-helper.js";
5
- const v = {
6
- class: "kv-pie-chart-v2 tw-flex tw-flex-col tw-items-center tw-gap-1",
7
- "aria-label": "Pie chart"
8
- }, C = { class: "tw-px-2" }, D = {
5
+ const v = { class: "tw-px-2" }, C = {
9
6
  viewBox: "0 0 262 262",
10
7
  fill: "none",
11
8
  class: "tw-w-full",
12
9
  role: "img",
13
10
  "aria-hidden": "true"
14
- }, S = ["cx", "cy", "r", "stroke", "stroke-width"], L = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], O = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], V = {
11
+ }, D = ["cx", "cy", "r", "stroke", "stroke-width"], S = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], L = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], O = {
15
12
  key: 0,
16
13
  class: "tw-flex tw-flex-wrap tw-justify-center tw-gap-0.5 tw-w-full tw-pt-0.5"
17
- }, W = { class: "tw-flex tw-gap-0.5 tw-items-center tw-min-w-0 tw-overflow-hidden" }, B = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, p = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0" }, E = { class: "tw-grid tw-grid-cols-2 tw-grid-flow-row tw-gap-0.5" }, I = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0 tw-overflow-hidden" }, X = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, Y = {
14
+ }, V = { class: "tw-flex tw-gap-0.5 tw-items-center tw-min-w-0 tw-overflow-hidden" }, W = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, B = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0" }, E = { class: "tw-grid tw-grid-cols-2 tw-grid-flow-row tw-gap-0.5" }, I = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0 tw-overflow-hidden" }, X = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, Y = {
18
15
  class: "tw-font-light tw-text-small tw-text-primary tw-text-right tw-shrink-0 tw-tabular-nums",
19
16
  style: { "min-width": "2.8ch" }
20
17
  };
21
- function G(N, i, a, t, M, R) {
18
+ function G(N, i, a, t, p, M) {
22
19
  var h, m;
23
- const f = x("kv-lightbox");
24
- return l(), o("figure", v, [
25
- r("div", C, [
26
- (l(), o("svg", D, [
20
+ const g = x("kv-lightbox");
21
+ return l(), o("figure", {
22
+ class: "kv-pie-chart-v2 tw-flex tw-flex-col tw-items-center tw-gap-1",
23
+ style: s({ "--segment-grow-duration": `${a.growDuration}ms` }),
24
+ "aria-label": "Pie chart"
25
+ }, [
26
+ r("div", v, [
27
+ (l(), o("svg", C, [
27
28
  a.loading || !t.hasData ? (l(), o("circle", {
28
29
  key: 0,
29
30
  cx: t.CX,
@@ -33,7 +34,7 @@ function G(N, i, a, t, M, R) {
33
34
  "stroke-width": a.strokeWidth,
34
35
  fill: "none",
35
36
  class: k(["skeleton-ring", { "skeleton-ring--loading": a.loading }])
36
- }, null, 10, S)) : n("", !0),
37
+ }, null, 10, D)) : n("", !0),
37
38
  (l(!0), o(d, null, c(t.visibleSegments, (e) => (l(), o("circle", {
38
39
  key: e.label,
39
40
  cx: t.CX,
@@ -49,7 +50,7 @@ function G(N, i, a, t, M, R) {
49
50
  strokeDashoffset: e.isVisible ? 0 : e.dashLength,
50
51
  transitionDelay: `${e.delay}ms`
51
52
  })
52
- }, null, 12, L))), 128)),
53
+ }, null, 12, S))), 128)),
53
54
  t.otherSegment ? (l(), o("circle", {
54
55
  key: 1,
55
56
  cx: t.CX,
@@ -65,15 +66,15 @@ function G(N, i, a, t, M, R) {
65
66
  strokeDashoffset: t.otherSegment.isVisible ? 0 : t.otherSegment.dashLength,
66
67
  transitionDelay: `${t.otherSegment.delay}ms`
67
68
  })
68
- }, null, 12, O)) : n("", !0)
69
+ }, null, 12, L)) : n("", !0)
69
70
  ]))
70
71
  ]),
71
- t.hasData && !a.loading ? (l(), o("div", V, [
72
- (l(!0), o(d, null, c(t.visibleSegments, (e, g) => (l(), o("div", {
72
+ t.hasData && !a.loading ? (l(), o("div", O, [
73
+ (l(!0), o(d, null, c(t.visibleSegments, (e, f) => (l(), o("div", {
73
74
  key: e.label,
74
75
  class: "tw-bg-gray-100 tw-flex tw-gap-0.5 tw-items-center tw-px-1 tw-py-0.5 tw-rounded-xs"
75
76
  }, [
76
- r("div", W, [
77
+ r("div", V, [
77
78
  r("span", {
78
79
  class: "tw-shrink-0 tw-w-1 tw-h-1 tw-rounded-full legend-dot",
79
80
  style: s({
@@ -81,12 +82,12 @@ function G(N, i, a, t, M, R) {
81
82
  transitionDelay: `${e.delay}ms`
82
83
  })
83
84
  }, null, 4),
84
- r("span", B, w(e.label), 1)
85
+ r("span", W, w(e.label), 1)
85
86
  ]),
86
87
  r("span", {
87
88
  class: "tw-font-light tw-text-small tw-text-primary tw-text-right tw-shrink-0 tw-tabular-nums",
88
89
  style: s({ minWidth: t.valueMinWidth })
89
- }, w(t.formatDisplayValue(g)), 5)
90
+ }, w(t.formatDisplayValue(f)), 5)
90
91
  ]))), 128)),
91
92
  t.otherItems.length > 0 ? (l(), o("button", {
92
93
  key: 0,
@@ -94,7 +95,7 @@ function G(N, i, a, t, M, R) {
94
95
  type: "button",
95
96
  onClick: i[0] || (i[0] = (e) => t.showOtherLightbox = !0)
96
97
  }, [
97
- r("div", p, [
98
+ r("div", B, [
98
99
  r("span", {
99
100
  class: "tw-shrink-0 tw-w-1 tw-h-1 tw-rounded-full legend-dot",
100
101
  style: s({
@@ -110,7 +111,7 @@ function G(N, i, a, t, M, R) {
110
111
  }, w(t.formatOtherDisplayValue()), 5)
111
112
  ])) : n("", !0)
112
113
  ])) : n("", !0),
113
- t.hasData && !a.loading ? (l(), _(f, {
114
+ t.hasData && !a.loading ? (l(), _(g, {
114
115
  key: 1,
115
116
  visible: t.showOtherLightbox,
116
117
  title: "Other",
@@ -135,9 +136,9 @@ function G(N, i, a, t, M, R) {
135
136
  ]),
136
137
  _: 1
137
138
  }, 8, ["visible"])) : n("", !0)
138
- ]);
139
+ ], 4);
139
140
  }
140
- const A = /* @__PURE__ */ u(y, [["render", G], ["__scopeId", "data-v-73c9f5f9"]]);
141
+ const T = /* @__PURE__ */ u(y, [["render", G], ["__scopeId", "data-v-9afd557d"]]);
141
142
  export {
142
- A as default
143
+ T as default
143
144
  };
@@ -45,6 +45,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
45
45
  type: NumberConstructor;
46
46
  default: number;
47
47
  };
48
+ growDuration: {
49
+ type: NumberConstructor;
50
+ default: number;
51
+ };
48
52
  animateOut: {
49
53
  type: BooleanConstructor;
50
54
  default: boolean;
@@ -108,6 +112,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
108
112
  type: NumberConstructor;
109
113
  default: number;
110
114
  };
115
+ growDuration: {
116
+ type: NumberConstructor;
117
+ default: number;
118
+ };
111
119
  animateOut: {
112
120
  type: BooleanConstructor;
113
121
  default: boolean;
@@ -120,6 +128,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
120
128
  unit: PieChartUnit;
121
129
  shownSegments: number;
122
130
  segmentGap: number;
131
+ growDuration: number;
123
132
  animateOut: boolean;
124
133
  }, {}, {
125
134
  KvLightbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -1,8 +1,8 @@
1
1
  import { toRefs as z, ref as I, computed as u, onMounted as J, watch as U, onUnmounted as Q } from "vue";
2
- import { getPieChartColor as $, OTHER_SEGMENT_BG_COLOR as Z, LOADING_BG_COLOR as ee } from "../utils/pieChartColors.js";
2
+ import { getPieChartColor as D, OTHER_SEGMENT_BG_COLOR as Z, LOADING_BG_COLOR as ee } from "../utils/pieChartColors.js";
3
3
  import { easeInOutCubic as te } from "../utils/useCountUp.js";
4
4
  import ae from "./KvLightbox.js";
5
- const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
5
+ const E = 262, le = E / 2, ne = E / 2, ce = {
6
6
  name: "KvPieChartV2",
7
7
  components: {
8
8
  KvLightbox: ae
@@ -62,6 +62,15 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
62
62
  type: Number,
63
63
  default: 1e3
64
64
  },
65
+ /**
66
+ * Duration in milliseconds of each segment's grow animation. The stagger between
67
+ * segments and the count-up pacing use this same value, so lowering it speeds up
68
+ * the whole ring — draw and numbers — in sync. Default keeps the original timing.
69
+ */
70
+ growDuration: {
71
+ type: Number,
72
+ default: 500
73
+ },
65
74
  /**
66
75
  * When changed from false to true, plays the reverse sweep-out animation.
67
76
  */
@@ -72,61 +81,62 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
72
81
  },
73
82
  setup(g) {
74
83
  const {
75
- values: A,
84
+ values: M,
76
85
  unit: m,
77
- loading: M,
86
+ loading: w,
78
87
  shownSegments: d,
79
- strokeWidth: B,
80
- segmentGap: T,
81
- initialDelay: D,
82
- animateOut: y
83
- } = z(g), k = I(!1), c = I(!1), G = u(() => Math.max((E - B.value) / 2, 1)), b = u(() => 2 * Math.PI * G.value), h = u(() => [...A.value].sort((e, t) => t.value - e.value)), o = u(() => h.value.reduce((e, t) => e + t.value, 0)), O = u(() => A.value.length > 0), S = u(() => h.value.slice(0, d.value)), C = u(() => h.value.slice(d.value).map((t, n) => ({
88
+ strokeWidth: W,
89
+ segmentGap: A,
90
+ initialDelay: T,
91
+ growDuration: y,
92
+ animateOut: b
93
+ } = z(g), k = I(!1), c = I(!1), V = u(() => Math.max((E - W.value) / 2, 1)), C = u(() => 2 * Math.PI * V.value), h = u(() => [...M.value].sort((e, t) => t.value - e.value)), o = u(() => h.value.reduce((e, t) => e + t.value, 0)), L = u(() => M.value.length > 0), S = u(() => h.value.slice(0, d.value)), O = u(() => h.value.slice(d.value).map((t, n) => ({
84
94
  ...t,
85
- color: $(d.value + n, t.color)
95
+ color: D(d.value + n, t.color)
86
96
  }))), q = u(() => h.value.map((e, t) => ({
87
97
  ...e,
88
- color: $(t, e.color)
89
- }))), w = u(() => C.value.reduce((e, t) => e + t.value, 0)), R = u(() => o.value > 0 ? w.value / o.value : 0), f = u(() => {
98
+ color: D(t, e.color)
99
+ }))), x = u(() => O.value.reduce((e, t) => e + t.value, 0)), N = u(() => o.value > 0 ? x.value / o.value : 0), f = u(() => {
90
100
  let e = 0;
91
101
  return S.value.map((t, n) => {
92
- const a = o.value > 0 ? t.value / o.value : 0, l = Math.max(a * b.value - T.value, 0), s = e * 360 - 90;
102
+ const a = o.value > 0 ? t.value / o.value : 0, l = Math.max(a * C.value - A.value, 0), s = e * 360 - 90;
93
103
  return e += a, {
94
104
  label: t.label,
95
105
  value: t.value,
96
106
  percent: a,
97
- color: $(n, t.color),
107
+ color: D(n, t.color),
98
108
  dashLength: l,
99
109
  startDeg: s,
100
- delay: D.value + n * W,
101
- isVisible: c.value && !y.value
110
+ delay: T.value + n * y.value,
111
+ isVisible: c.value && !b.value
102
112
  };
103
113
  });
104
114
  }), v = u(() => {
105
- if (C.value.length === 0) return null;
115
+ if (O.value.length === 0) return null;
106
116
  let e = 0;
107
117
  S.value.forEach((l) => {
108
118
  e += o.value > 0 ? l.value / o.value : 0;
109
119
  });
110
- const t = Math.max(R.value * b.value - T.value, 0), n = e * 360 - 90, a = S.value.length;
120
+ const t = Math.max(N.value * C.value - A.value, 0), n = e * 360 - 90, a = S.value.length;
111
121
  return {
112
122
  label: "Other",
113
- value: w.value,
114
- percent: R.value,
123
+ value: x.value,
124
+ percent: N.value,
115
125
  color: "#C4C4C4",
116
126
  dashLength: t,
117
127
  startDeg: n,
118
- delay: D.value + a * W,
119
- isVisible: c.value && !y.value
128
+ delay: T.value + a * y.value,
129
+ isVisible: c.value && !b.value
120
130
  };
121
- }), r = I([]), p = [], i = [], V = (e) => m.value === "percent" ? Math.round(e.percent * 100) : e.value, _ = (e, t, n) => {
131
+ }), r = I([]), p = [], i = [], _ = (e) => m.value === "percent" ? Math.round(e.percent * 100) : e.value, F = (e, t, n) => {
122
132
  let a = null;
123
133
  function l(s) {
124
134
  a === null && (a = s);
125
- const L = s - a, P = Math.min(L / ue, 1), Y = te(P), j = Math.round(t + (n - t) * Y);
126
- r.value[e] = j, P < 1 && (i[e] = requestAnimationFrame(l));
135
+ const $ = s - a, R = Math.min($ / y.value, 1), Y = te(R), j = Math.round(t + (n - t) * Y);
136
+ r.value[e] = j, R < 1 && (i[e] = requestAnimationFrame(l));
127
137
  }
128
138
  i[e] = requestAnimationFrame(l);
129
- }, x = (e = !1) => {
139
+ }, G = (e = !1) => {
130
140
  p.forEach(clearTimeout), p.length = 0, i.forEach(cancelAnimationFrame), i.length = 0;
131
141
  const t = [
132
142
  ...f.value,
@@ -135,12 +145,12 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
135
145
  for (; r.value.length < t.length; )
136
146
  r.value.push(0);
137
147
  t.forEach((n, a) => {
138
- const l = V(n), { delay: s } = n, L = setTimeout(() => {
139
- e ? _(a, r.value[a], 0) : _(a, 0, l);
148
+ const l = _(n), { delay: s } = n, $ = setTimeout(() => {
149
+ e ? F(a, r.value[a], 0) : F(a, 0, l);
140
150
  }, s);
141
- p.push(L);
151
+ p.push($);
142
152
  });
143
- }, N = (e) => {
153
+ }, P = (e) => {
144
154
  const t = r.value[e] ?? 0;
145
155
  switch (m.value) {
146
156
  case "percent":
@@ -164,7 +174,7 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
164
174
  }
165
175
  }, X = () => {
166
176
  const e = f.value.length;
167
- return N(e);
177
+ return P(e);
168
178
  }, H = u(() => {
169
179
  const e = [
170
180
  ...f.value,
@@ -172,7 +182,7 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
172
182
  ];
173
183
  let t = 0;
174
184
  return e.forEach((n) => {
175
- const a = V(n);
185
+ const a = _(n);
176
186
  let l;
177
187
  switch (m.value) {
178
188
  case "percent":
@@ -186,27 +196,27 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
186
196
  }
187
197
  l.length > t && (t = l.length);
188
198
  }), `${t}ch`;
189
- }), F = () => {
199
+ }), B = () => {
190
200
  requestAnimationFrame(() => {
191
201
  requestAnimationFrame(() => {
192
- c.value = !0, x(!1);
202
+ c.value = !0, G(!1);
193
203
  });
194
204
  });
195
205
  };
196
206
  return J(() => {
197
- !M.value && O.value && F();
198
- }), U(M, (e) => {
199
- !e && O.value && F();
200
- }), U(y, (e) => {
201
- e && (c.value = !1, x(!0));
207
+ !w.value && L.value && B();
208
+ }), U(w, (e) => {
209
+ !e && L.value && B();
210
+ }), U(b, (e) => {
211
+ e && (c.value = !1, G(!0));
202
212
  }), Q(() => {
203
213
  p.forEach(clearTimeout), i.forEach(cancelAnimationFrame);
204
214
  }), {
205
215
  // Constants
206
216
  CX: le,
207
217
  CY: ne,
208
- radius: G,
209
- circumference: b,
218
+ radius: V,
219
+ circumference: C,
210
220
  LOADING_BG_COLOR: ee,
211
221
  OTHER_SEGMENT_BG_COLOR: Z,
212
222
  // State
@@ -214,19 +224,19 @@ const E = 262, le = E / 2, ne = E / 2, W = 500, ue = 500, ve = {
214
224
  animatedIn: c,
215
225
  displayValues: r,
216
226
  // Computed
217
- hasData: O,
227
+ hasData: L,
218
228
  visibleSegments: f,
219
229
  otherSegment: v,
220
- otherItems: C,
230
+ otherItems: O,
221
231
  allItemsWithColors: q,
222
232
  valueMinWidth: H,
223
233
  // Methods
224
- formatDisplayValue: N,
234
+ formatDisplayValue: P,
225
235
  formatItemValue: K,
226
236
  formatOtherDisplayValue: X
227
237
  };
228
238
  }
229
239
  };
230
240
  export {
231
- ve as default
241
+ ce as default
232
242
  };
@@ -1 +1 @@
1
- .link-bar[data-v-2fd75227]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-2fd75227]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media(min-width:45.875rem){.link-bar[data-v-2fd75227]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-2fd75227]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-2fd75227]{grid-area:lend}.link-bar__search[data-v-2fd75227]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-2fd75227]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-2fd75227]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-2fd75227]{margin-bottom:0}}.header-link[data-v-2fd75227]{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-2fd75227]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
1
+ .link-bar[data-v-9ca80a31]{display:flex;align-items:center;gap:.5rem}.link-bar__logo[data-v-9ca80a31]{position:absolute;top:50%;left:50%;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media(min-width:45.875rem){.link-bar[data-v-9ca80a31]{display:grid;-moz-column-gap:1rem;column-gap:1rem;grid-template-areas:"logo lend right" "search search search";grid-template-columns:1fr auto auto;grid-template-rows:4rem auto;row-gap:.5rem}.link-bar__logo[data-v-9ca80a31]{position:static;--tw-translate-x: 0;--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));grid-area:logo;justify-self:start}.link-bar__lend[data-v-9ca80a31]{grid-area:lend}.link-bar__search[data-v-9ca80a31]{grid-area:search;margin-bottom:.5rem}.link-bar__right[data-v-9ca80a31]{grid-area:right}}@media(min-width:64rem){.link-bar[data-v-9ca80a31]{-moz-column-gap:1.25rem;column-gap:1.25rem;grid-template-areas:"logo lend search right";grid-template-columns:auto auto 1fr auto;grid-template-rows:4rem}.link-bar__search[data-v-9ca80a31]{margin-bottom:0}}.header-link[data-v-9ca80a31]{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-9ca80a31]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}
@@ -1,42 +1,43 @@
1
- import M from "./LinkBar2.js";
2
- import { resolveComponent as d, openBlock as a, createElementBlock as i, createElementVNode as r, withModifiers as g, createVNode as l, withCtx as w, createTextVNode as s, Fragment as y, renderList as p, toDisplayString as m, createCommentVNode as v, withDirectives as x, vShow as L, createBlock as B } from "vue";
1
+ import p from "./LinkBar2.js";
2
+ import { resolveComponent as d, openBlock as o, createElementBlock as i, createElementVNode as r, withModifiers as b, createVNode as l, withCtx as c, createTextVNode as w, Fragment as x, renderList as L, toDisplayString as m, createCommentVNode as s, withDirectives as B, normalizeStyle as k, vShow as O, createBlock as f } from "vue";
3
3
  import "./LinkBar.css";
4
- import O from "../../_virtual/_plugin-vue_export-helper.js";
5
- const S = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, T = ["href", "data-testid", "onClick"], D = ["href"], U = { class: "tw-hidden md:tw-flex tw-items-center" }, H = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none" }, A = { class: "tw-relative tw-flex md:tw-hidden tw-items-center tw-text-eco-green-4" }, I = {
4
+ import S from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const T = { class: "link-bar__right tw-flex tw-items-center tw-justify-end tw-ml-auto md:tw-ml-0 tw-gap-1 md:tw-gap-2 lg:tw-gap-2.5" }, D = ["href", "data-testid", "onClick"], U = ["href"], H = { class: "tw-hidden md:tw-flex tw-items-center" }, A = { class: "tw-bg-secondary tw-rounded-xs tw-py-0.5 tw-px-1 tw-mr-1 tw-leading-none" }, I = { class: "tw-relative tw-flex md:tw-hidden tw-items-center tw-text-eco-green-4" }, K = {
6
6
  key: 0,
7
7
  class: "tw-absolute tw-w-4 tw-h-4 tw-pt-0.5 tw-flex tw-items-center tw-justify-center tw-text-white tw-text-small tw-font-medium tw-pointer-events-none"
8
- }, K = { class: "tw-hidden md:tw-block" }, N = {
8
+ }, N = { class: "tw-hidden md:tw-block" }, E = {
9
9
  key: 0,
10
10
  class: "tw-w-4 tw-h-3"
11
- }, E = {
11
+ }, P = {
12
12
  key: 1,
13
13
  class: "tw-text-eco-green-4"
14
- }, P = {
15
- key: 2,
16
- class: "tw-w-3 tw-h-3 tw-rounded-full tw-overflow-hidden"
14
+ }, V = {
15
+ key: 3,
16
+ class: "tw-w-3 tw-h-3 tw-rounded-full tw-overflow-hidden",
17
+ "data-testid": "header-avatar-skeleton"
17
18
  };
18
- function V(k, n, o, e, j, X) {
19
- const c = d("kv-material-icon"), b = d("kv-header-logo"), u = d("kv-header-dropdown-link"), f = d("search-bar"), _ = d("kv-button"), h = d("kv-loading-placeholder"), C = d("kv-user-avatar");
20
- return a(), i("div", {
19
+ function j(h, t, a, e, X, z) {
20
+ const v = d("kv-material-icon"), y = d("kv-header-logo"), u = d("kv-header-dropdown-link"), _ = d("search-bar"), M = d("kv-button"), g = d("kv-loading-placeholder"), C = d("kv-user-avatar");
21
+ return o(), i("div", {
21
22
  class: "link-bar tw-min-h-[4rem] tw-font-medium tw-relative",
22
- onTouchstart: n[12] || (n[12] = (...t) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...t))
23
+ onTouchstart: t[12] || (t[12] = (...n) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...n))
23
24
  }, [
24
25
  r("button", {
25
26
  type: "button",
26
27
  "aria-label": "Open menu",
27
28
  class: "header-link link-bar__hamburger tw-inline-flex md:tw-hidden",
28
- onMouseover: n[0] || (n[0] = (t) => e.handleOnHover("menuButton", e.MobileMenu)),
29
- onTouchstart: n[1] || (n[1] = g((t) => e.handleTouchStart("menuButton", e.MobileMenu), ["stop", "prevent"]))
29
+ onMouseover: t[0] || (t[0] = (n) => e.handleOnHover("menuButton", e.MobileMenu)),
30
+ onTouchstart: t[1] || (t[1] = b((n) => e.handleTouchStart("menuButton", e.MobileMenu), ["stop", "prevent"]))
30
31
  }, [
31
- l(c, { icon: e.mdiMenu }, null, 8, ["icon"])
32
+ l(v, { icon: e.mdiMenu }, null, 8, ["icon"])
32
33
  ], 32),
33
34
  r("a", {
34
35
  href: "/",
35
36
  "aria-label": "Kiva home",
36
37
  class: "link-bar__logo tw-px-1 tw-py-2 tw-cursor-pointer",
37
- onClick: n[2] || (n[2] = (...t) => e.onLogoClick && e.onLogoClick(...t))
38
+ onClick: t[2] || (t[2] = (...n) => e.onLogoClick && e.onLogoClick(...n))
38
39
  }, [
39
- l(b)
40
+ l(y)
40
41
  ]),
41
42
  l(u, {
42
43
  class: "link-bar__lend",
@@ -47,30 +48,30 @@ function V(k, n, o, e, j, X) {
47
48
  "dropdown-icon": e.mdiChevronDown,
48
49
  "base-class": "tw-py-1",
49
50
  onOnHover: e.handleOnHover,
50
- onMouseleave: n[3] || (n[3] = (t) => e.handleMouseOut("lendButton")),
51
+ onMouseleave: t[3] || (t[3] = (n) => e.handleMouseOut("lendButton")),
51
52
  onUserTap: e.handleTouchStart
52
53
  }, {
53
- default: w(() => n[13] || (n[13] = [
54
- s(" Lend ")
54
+ default: c(() => t[13] || (t[13] = [
55
+ w(" Lend ")
55
56
  ])),
56
57
  _: 1
57
58
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
58
- l(f, {
59
+ l(_, {
59
60
  class: "link-bar__search tw-min-w-0 tw-hidden md:tw-block",
60
- "search-suggestions": o.searchSuggestions,
61
- "app-origin": o.appOrigin,
62
- "is-mobile": o.isMobile,
63
- onLoadSearchData: n[4] || (n[4] = (t) => k.$emit("load-search-data")),
64
- onSearchSubmit: n[5] || (n[5] = (t) => k.$emit("search-submit", t))
61
+ "search-suggestions": a.searchSuggestions,
62
+ "app-origin": a.appOrigin,
63
+ "is-mobile": a.isMobile,
64
+ onLoadSearchData: t[4] || (t[4] = (n) => h.$emit("load-search-data")),
65
+ onSearchSubmit: t[5] || (t[5] = (n) => h.$emit("search-submit", n))
65
66
  }, null, 8, ["search-suggestions", "app-origin", "is-mobile"]),
66
- r("div", S, [
67
- (a(!0), i(y, null, p(e.visiblePrimaryLinks, (t) => (a(), i("a", {
68
- key: t.id,
69
- href: t.href,
67
+ r("div", T, [
68
+ (o(!0), i(x, null, L(e.visiblePrimaryLinks, (n) => (o(), i("a", {
69
+ key: n.id,
70
+ href: n.href,
70
71
  class: "header-link tw-hidden md:tw-block",
71
- "data-testid": `header-link-${t.id}`,
72
- onClick: (F) => e.onPrimaryClick(t)
73
- }, m(t.label), 9, T))), 128)),
72
+ "data-testid": `header-link-${n.id}`,
73
+ onClick: (F) => e.onPrimaryClick(n)
74
+ }, m(n.label), 9, D))), 128)),
74
75
  l(u, {
75
76
  "ref-name": "aboutLink",
76
77
  class: "tw-hidden md:tw-block",
@@ -80,82 +81,95 @@ function V(k, n, o, e, j, X) {
80
81
  "base-class": "tw-py-1",
81
82
  "send-link-position": "",
82
83
  onOnHover: e.handleOnHover,
83
- onMouseleave: n[6] || (n[6] = (t) => e.handleMouseOut("aboutLink")),
84
+ onMouseleave: t[6] || (t[6] = (n) => e.handleMouseOut("aboutLink")),
84
85
  onUserTap: e.handleTouchStart
85
86
  }, {
86
- default: w(() => n[14] || (n[14] = [
87
- s(" About ")
87
+ default: c(() => t[14] || (t[14] = [
88
+ w(" About ")
88
89
  ])),
89
90
  _: 1
90
91
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
91
- o.loggedIn ? v("", !0) : (a(), i("a", {
92
+ a.loggedIn ? s("", !0) : (o(), i("a", {
92
93
  key: 0,
93
- href: o.loginUrl,
94
+ href: a.loginUrl,
94
95
  class: "header-link",
95
96
  "data-testid": "header-login",
96
- onClick: n[7] || (n[7] = (...t) => e.onLoginClick && e.onLoginClick(...t))
97
- }, "Log in", 8, D)),
98
- x(r("a", {
97
+ onClick: t[7] || (t[7] = (...n) => e.onLoginClick && e.onLoginClick(...n))
98
+ }, "Log in", 8, U)),
99
+ B(r("a", {
100
+ style: k(a.isBasketDataLoading ? { display: "var(--basket-display, flex)" } : void 0),
99
101
  href: "/basket",
100
102
  class: "header-link tw-flex tw-items-center",
101
103
  "data-testid": "header-basket",
102
- onClick: n[8] || (n[8] = (...t) => e.onBasketClick && e.onBasketClick(...t))
104
+ onClick: t[8] || (t[8] = (...n) => e.onBasketClick && e.onBasketClick(...n))
103
105
  }, [
104
- r("span", U, [
105
- r("span", H, m(o.basketCount), 1),
106
- n[15] || (n[15] = s(" Basket "))
106
+ r("span", H, [
107
+ r("span", A, m(a.basketCount), 1),
108
+ t[15] || (t[15] = w(" Basket "))
107
109
  ]),
108
- r("span", A, [
109
- o.isBasketDataLoading ? v("", !0) : (a(), i("span", I, m(o.basketCount), 1)),
110
- l(c, {
110
+ r("span", I, [
111
+ a.isBasketDataLoading ? s("", !0) : (o(), i("span", K, m(a.basketCount), 1)),
112
+ l(v, {
111
113
  icon: e.mdiBriefcase,
112
114
  class: "tw-w-4 tw-h-4 tw-pointer-events-none"
113
115
  }, null, 8, ["icon"]),
114
- n[16] || (n[16] = r("span", { class: "tw-sr-only" }, "Basket", -1))
116
+ t[16] || (t[16] = r("span", { class: "tw-sr-only" }, "Basket", -1))
115
117
  ])
116
- ], 512), [
117
- [L, o.basketCount > 0 || o.isBasketDataLoading]
118
+ ], 4), [
119
+ [O, a.basketCount > 0 || a.isBasketDataLoading]
118
120
  ]),
119
- r("div", K, [
120
- l(_, {
121
+ r("div", N, [
122
+ l(M, {
121
123
  variant: "secondary",
122
124
  href: "/donate/supportus",
123
125
  class: "tw-whitespace-nowrap",
124
126
  "data-testid": "header-support-kiva",
125
127
  onClick: e.onSupportKivaClick
126
128
  }, {
127
- default: w(() => n[17] || (n[17] = [
128
- s(" Support Kiva ")
129
+ default: c(() => t[17] || (t[17] = [
130
+ w(" Support Kiva ")
129
131
  ])),
130
132
  _: 1
131
133
  }, 8, ["onClick"])
132
134
  ]),
133
- o.loggedIn ? (a(), i("div", {
135
+ a.loggedIn ? (o(), i("div", {
134
136
  key: 1,
135
137
  ref: "avatarMenu",
136
138
  "data-testid": "header-avatar-menu",
137
139
  class: "tw-flex tw-items-center tw-gap-1 tw-cursor-pointer tw-py-1",
138
- onMouseenter: n[9] || (n[9] = (t) => e.handleOnHover("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX())),
139
- onMouseleave: n[10] || (n[10] = (t) => e.handleMouseOut("avatarMenu")),
140
- onTouchstart: n[11] || (n[11] = g((t) => e.handleTouchStart("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX()), ["stop"]))
140
+ style: k(a.isUserDataLoading ? { display: "var(--user-loading-display, flex)" } : void 0),
141
+ onMouseenter: t[9] || (t[9] = (n) => e.handleOnHover("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX())),
142
+ onMouseleave: t[10] || (t[10] = (n) => e.handleMouseOut("avatarMenu")),
143
+ onTouchstart: t[11] || (t[11] = b((n) => e.handleTouchStart("avatarMenu", e.MyKivaMenu, e.getAvatarMenuPosition(), e.getAvatarTriggerCenterX()), ["stop"]))
141
144
  }, [
142
- o.isUserDataLoading ? (a(), i("div", N, [
143
- l(h)
144
- ])) : (a(), i("span", E, m(e.formattedBalance), 1)),
145
- o.isUserDataLoading ? (a(), i("div", P, [
146
- l(h)
147
- ])) : (a(), B(C, {
148
- key: 3,
145
+ a.isUserDataLoading ? (o(), i("div", E, [
146
+ l(g)
147
+ ])) : (o(), i("span", P, m(e.formattedBalance), 1)),
148
+ e.avatarMode === "esi" ? (o(), f(v, {
149
+ key: 2,
150
+ icon: e.mdiAccountCircle,
151
+ class: "tw-w-3 tw-h-3",
152
+ "data-testid": "header-avatar-icon",
153
+ style: { display: "var(--user-avatar-legacy-display, inline-block)" }
154
+ }, null, 8, ["icon"])) : s("", !0),
155
+ e.avatarMode === "skeleton" ? (o(), i("div", V, [
156
+ l(g)
157
+ ])) : s("", !0),
158
+ e.avatarMode !== "skeleton" ? (o(), f(C, {
159
+ key: 4,
149
160
  class: "tw-w-3 tw-h-3",
150
- "lender-name": o.lenderName,
151
- "lender-image-url": o.lenderImageUrl,
161
+ "data-testid": e.avatarMode === "esi" ? "header-avatar-esi" : null,
162
+ style: k(e.avatarMode === "esi" ? { display: "var(--user-avatar-display, block)" } : void 0),
163
+ "lender-name": a.lenderName,
164
+ "lender-image-url": a.lenderImageUrl,
165
+ "show-css-placeholder": e.avatarMode === "esi",
152
166
  "is-small": ""
153
- }, null, 8, ["lender-name", "lender-image-url"]))
154
- ], 544)) : v("", !0)
167
+ }, null, 8, ["data-testid", "style", "lender-name", "lender-image-url", "show-css-placeholder"])) : s("", !0)
168
+ ], 36)) : s("", !0)
155
169
  ])
156
170
  ], 32);
157
171
  }
158
- const Q = /* @__PURE__ */ O(M, [["render", V], ["__scopeId", "data-v-2fd75227"]]);
172
+ const R = /* @__PURE__ */ S(p, [["render", j], ["__scopeId", "data-v-9ca80a31"]]);
159
173
  export {
160
- Q as default
174
+ R as default
161
175
  };
@@ -41,6 +41,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
41
41
  type: BooleanConstructor;
42
42
  default: boolean;
43
43
  };
44
+ useEsiAvatar: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
44
48
  showMGUpsellLink: {
45
49
  type: BooleanConstructor;
46
50
  default: boolean;
@@ -77,6 +81,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
77
81
  mdiMenu: string;
78
82
  mdiChevronDown: string;
79
83
  mdiBriefcase: string;
84
+ mdiAccountCircle: string;
80
85
  KvLendMenu: any;
81
86
  AboutMenu: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
82
87
  isMobile: {
@@ -250,6 +255,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
250
255
  visiblePrimaryLinks: import('vue').ComputedRef<any>;
251
256
  lendUrl: import('vue').ComputedRef<string>;
252
257
  formattedBalance: import('vue').ComputedRef<any>;
258
+ avatarMode: import('vue').ComputedRef<"loaded" | "esi" | "skeleton">;
253
259
  lendOpenItem: import('vue').ComputedRef<Function | Record<string, any>>;
254
260
  aboutOpenItem: import('vue').ComputedRef<Function | Record<string, any>>;
255
261
  handleOnHover: (item: string, menu: unknown, position?: unknown, triggerCenterX?: number | null) => void;
@@ -302,6 +308,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
302
308
  type: BooleanConstructor;
303
309
  default: boolean;
304
310
  };
311
+ useEsiAvatar: {
312
+ type: BooleanConstructor;
313
+ default: boolean;
314
+ };
305
315
  showMGUpsellLink: {
306
316
  type: BooleanConstructor;
307
317
  default: boolean;
@@ -358,6 +368,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
358
368
  appOrigin: string;
359
369
  isBasketDataLoading: boolean;
360
370
  isUserDataLoading: boolean;
371
+ useEsiAvatar: boolean;
361
372
  }, {}, {
362
373
  KvMaterialIcon: any;
363
374
  KvUserAvatar: any;
@@ -1,24 +1,24 @@
1
- import { defineAsyncComponent as r, inject as P, ref as d, computed as i } from "vue";
2
- import { mdiBriefcase as D, mdiChevronDown as x, mdiMenu as R } from "@mdi/js";
3
- import $ from "numeral";
4
- import E from "../KvMaterialIcon.js";
5
- import H from "../KvUserAvatar.js";
6
- import _ from "../KvLoadingPlaceholder.js";
7
- import j from "../KvButton.js";
8
- import F from "../KvWwwHeader/KvHeaderLogo.js";
9
- import G from "../KvWwwHeader/KvHeaderDropdownLink.js";
10
- import { PRIMARY_LINKS as W } from "../../utils/headerNavLinks.js";
11
- import X from "./SearchBar.js";
12
- const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() => import("./AboutMenu.js")), Y = r(() => import("./MyKivaMenu.js")), q = r(() => import("./MobileMenu.js")), ie = {
1
+ import { defineAsyncComponent as r, inject as D, ref as m, computed as i } from "vue";
2
+ import { mdiAccountCircle as E, mdiBriefcase as x, mdiChevronDown as R, mdiMenu as $ } from "@mdi/js";
3
+ import H from "numeral";
4
+ import _ from "../KvMaterialIcon.js";
5
+ import j from "../KvUserAvatar.js";
6
+ import F from "../KvLoadingPlaceholder.js";
7
+ import G from "../KvButton.js";
8
+ import W from "../KvWwwHeader/KvHeaderLogo.js";
9
+ import X from "../KvWwwHeader/KvHeaderDropdownLink.js";
10
+ import { PRIMARY_LINKS as Y } from "../../utils/headerNavLinks.js";
11
+ import q from "./SearchBar.js";
12
+ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() => import("./AboutMenu.js")), z = r(() => import("./MyKivaMenu.js")), J = r(() => import("./MobileMenu.js")), ue = {
13
13
  name: "LinkBar",
14
14
  components: {
15
- KvMaterialIcon: E,
16
- KvUserAvatar: H,
17
- KvLoadingPlaceholder: _,
18
- KvButton: j,
19
- KvHeaderLogo: F,
20
- KvHeaderDropdownLink: G,
21
- SearchBar: X
15
+ KvMaterialIcon: _,
16
+ KvUserAvatar: j,
17
+ KvLoadingPlaceholder: F,
18
+ KvButton: G,
19
+ KvHeaderLogo: W,
20
+ KvHeaderDropdownLink: X,
21
+ SearchBar: q
22
22
  },
23
23
  props: {
24
24
  loggedIn: { type: Boolean, default: !1 },
@@ -31,6 +31,7 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
31
31
  lenderImageUrl: { type: String, default: "" },
32
32
  isUserDataLoading: { type: Boolean, default: !1 },
33
33
  isBasketDataLoading: { type: Boolean, default: !1 },
34
+ useEsiAvatar: { type: Boolean, default: !1 },
34
35
  showMGUpsellLink: { type: Boolean, default: !1 },
35
36
  loginUrl: { type: String, default: "/ui-login" },
36
37
  myDashboardUrl: { type: String, default: "/mykiva" },
@@ -42,8 +43,8 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
42
43
  },
43
44
  emits: ["item-hover", "load-search-data", "search-submit", "login-click"],
44
45
  setup(t, { emit: l }) {
45
- const o = P("$kvTrackEvent", () => {
46
- }), a = d(null), u = d(null);
46
+ const o = D("$kvTrackEvent", () => {
47
+ }), a = m(null), u = m(null);
47
48
  function p() {
48
49
  const e = u.value, n = e == null ? void 0 : e.getBoundingClientRect();
49
50
  return n ? t.isMobile ? { right: "0" } : { right: `${window.innerWidth - n.right}px` } : null;
@@ -53,30 +54,30 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
53
54
  const e = u.value, n = e == null ? void 0 : e.getBoundingClientRect();
54
55
  return n ? n.left + n.width / 2 : null;
55
56
  }
56
- const k = i(() => W.filter((e) => e.visibility === "visitor" ? !t.loggedIn : e.visibility === "loggedIn" ? t.loggedIn : !0)), h = i(() => t.isMobile ? void 0 : "/lend-by-category"), y = i(() => $(Math.floor(t.balance)).format("$0")), M = i(() => t.openMenuItem === v ? t.openMenuItem : null), B = i(() => t.openMenuItem === g ? t.openMenuItem : null), L = {
57
+ const k = i(() => Y.filter((e) => e.visibility === "visitor" ? !t.loggedIn : e.visibility === "loggedIn" ? t.loggedIn : !0)), h = i(() => t.isMobile ? void 0 : "/lend-by-category"), y = i(() => H(Math.floor(t.balance)).format("$0")), M = i(() => t.isUserDataLoading ? t.useEsiAvatar ? "esi" : "skeleton" : "loaded"), B = i(() => t.openMenuItem === v ? t.openMenuItem : null), L = i(() => t.openMenuItem === g ? t.openMenuItem : null), I = {
57
58
  menuButton: { action: "hover-Mobile-menu", label: "Mobile" },
58
59
  lendButton: { action: "hover-Lend-menu", label: "Lend" },
59
60
  aboutLink: { action: "hover-About-menu", label: "About" },
60
61
  avatarMenu: { action: "hover-User-menu", label: "User" }
61
- }, I = {
62
+ }, T = {
62
63
  menuButton: { action: "close-Mobile-menu", label: "Mobile" }
63
64
  };
64
- function s(e) {
65
- const n = L[e];
65
+ function f(e) {
66
+ const n = I[e];
66
67
  n && o("TopNav", n.action, n.label);
67
68
  }
68
- function m(e) {
69
- const n = I[e];
69
+ function d(e) {
70
+ const n = T[e];
70
71
  n && o("TopNav", n.action, n.label);
71
72
  }
72
- function T(e, n, c = null, f = null) {
73
- navigator.maxTouchPoints || (a.value !== e && s(e), a.value = e, l("item-hover", e, n, c, f));
73
+ function C(e, n, c = null, s = null) {
74
+ navigator.maxTouchPoints || (a.value !== e && f(e), a.value = e, l("item-hover", e, n, c, s));
74
75
  }
75
- function C(e) {
76
- navigator.maxTouchPoints || a.value === e && (m(e), a.value = null, l("item-hover"));
76
+ function S(e) {
77
+ navigator.maxTouchPoints || a.value === e && (d(e), a.value = null, l("item-hover"));
77
78
  }
78
- function S(e, n, c = null, f = null) {
79
- a.value === e ? (m(e), a.value = null, l("item-hover")) : (s(e), a.value = e, l("item-hover", e, n, c, f));
79
+ function A(e, n, c = null, s = null) {
80
+ a.value === e ? (d(e), a.value = null, l("item-hover")) : (f(e), a.value = e, l("item-hover", e, n, c, s));
80
81
  }
81
82
  function N(e) {
82
83
  e.target === e.currentTarget && l("item-hover");
@@ -87,43 +88,45 @@ const v = r(() => import("../KvWwwHeader/LendMenu/KvLendMenu.js")), g = r(() =>
87
88
  function U(e) {
88
89
  o("TopNav", "click-Log-in"), l("login-click", e);
89
90
  }
90
- function A() {
91
+ function O() {
91
92
  o("TopNav", "click-Basket");
92
93
  }
93
- function O() {
94
+ function w() {
94
95
  o("TopNav", "click-Support-Kiva");
95
96
  }
96
- function w() {
97
+ function P() {
97
98
  o("TopNav", "click-Logo");
98
99
  }
99
100
  return {
100
- mdiMenu: R,
101
- mdiChevronDown: x,
102
- mdiBriefcase: D,
101
+ mdiMenu: $,
102
+ mdiChevronDown: R,
103
+ mdiBriefcase: x,
104
+ mdiAccountCircle: E,
103
105
  KvLendMenu: v,
104
106
  AboutMenu: g,
105
- MyKivaMenu: Y,
106
- MobileMenu: q,
107
+ MyKivaMenu: z,
108
+ MobileMenu: J,
107
109
  avatarMenu: u,
108
110
  getAvatarMenuPosition: p,
109
111
  getAvatarTriggerCenterX: b,
110
112
  visiblePrimaryLinks: k,
111
113
  lendUrl: h,
112
114
  formattedBalance: y,
113
- lendOpenItem: M,
114
- aboutOpenItem: B,
115
- handleOnHover: T,
116
- handleMouseOut: C,
117
- handleTouchStart: S,
115
+ avatarMode: M,
116
+ lendOpenItem: B,
117
+ aboutOpenItem: L,
118
+ handleOnHover: C,
119
+ handleMouseOut: S,
120
+ handleTouchStart: A,
118
121
  handleEmptySpaceClick: N,
119
122
  onPrimaryClick: K,
120
123
  onLoginClick: U,
121
- onBasketClick: A,
122
- onSupportKivaClick: O,
123
- onLogoClick: w
124
+ onBasketClick: O,
125
+ onSupportKivaClick: w,
126
+ onLogoClick: P
124
127
  };
125
128
  }
126
129
  };
127
130
  export {
128
- ie as default
131
+ ue as default
129
132
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "8.27.0",
3
+ "version": "8.29.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -113,5 +113,5 @@
113
113
  "dependencies": {
114
114
  "fuse.js": "^7.1.0"
115
115
  },
116
- "gitHead": "bb636116de28fdd44916765d3f498617f473ed22"
116
+ "gitHead": "8e8f125eb1e762ab829f88ddea8c34674eb9319e"
117
117
  }