@kiva/kv-components 8.13.0 → 8.13.2

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,22 +1,22 @@
1
- import { defineComponent as Ue, useSlots as Ye, computed as l, ref as m, watch as V, onMounted as We, onBeforeUnmount as Xe, openBlock as v, createElementBlock as d, normalizeStyle as $, createElementVNode as g, Fragment as Ge, renderList as qe, unref as C, createVNode as L, createCommentVNode as T, Transition as Ke, withCtx as je, normalizeClass as Je, renderSlot as Qe, toDisplayString as le } from "vue";
2
- import { mdiPlus as et, mdiMinus as tt, mdiPlay as nt } from "@mdi/js";
1
+ import { defineComponent as Ue, useSlots as Ye, computed as a, ref as x, watch as Y, onMounted as Xe, onBeforeUnmount as Ge, openBlock as h, createElementBlock as b, normalizeStyle as $, createElementVNode as M, Fragment as qe, renderList as Ke, unref as C, createVNode as L, createCommentVNode as T, Transition as je, withCtx as Je, normalizeClass as Qe, renderSlot as et, toDisplayString as ue } from "vue";
2
+ import { mdiPlus as tt, mdiMinus as ot, mdiPlay as nt } from "@mdi/js";
3
3
  import N from "@kiva/kv-tokens";
4
- import ot from "../data/simpleMapPaths.js";
5
- import lt from "../data/simpleMapCountryPaths.js";
6
- import U from "../data/simpleMapCentroids.js";
7
- import { ALL_COUNTRIES_ISO_MAP as ae } from "../data/allCountriesISOMap.js";
8
- import { useMapTourCycle as at } from "../utils/useMapTourCycle.js";
9
- import Y from "./KvMaterialIcon.js";
10
- const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"], it = {
4
+ import lt from "../data/simpleMapPaths.js";
5
+ import at from "../data/simpleMapCountryPaths.js";
6
+ import O from "../data/simpleMapCentroids.js";
7
+ import { ALL_COUNTRIES_ISO_MAP as ie } from "../data/allCountriesISOMap.js";
8
+ import { useMapTourCycle as ut } from "../utils/useMapTourCycle.js";
9
+ import X from "./KvMaterialIcon.js";
10
+ const it = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"], st = {
11
11
  key: 0,
12
12
  class: "kv-simple-map__zoom-controls tw-absolute tw-top-2 tw-right-2 tw-flex tw-flex-col tw-gap-1"
13
- }, st = ["disabled"], ct = ["disabled"], pt = { class: "kv-simple-map__popup-layer tw-absolute tw-inset-0 tw-pointer-events-none" }, ft = { class: "kv-simple-map__popup-content" }, mt = { class: "kv-simple-map__default-popup" }, vt = {
13
+ }, ct = ["disabled"], pt = ["disabled"], mt = { class: "kv-simple-map__popup-layer tw-absolute tw-inset-0 tw-pointer-events-none" }, ft = { class: "kv-simple-map__popup-content" }, vt = { class: "kv-simple-map__default-popup" }, dt = {
14
14
  key: 0,
15
15
  class: "tw-text-label"
16
- }, dt = {
16
+ }, yt = {
17
17
  key: 1,
18
18
  class: "tw-text-caption"
19
- }, R = 1300.02, D = 571.784, yt = "cubic-bezier(0.76, 0, 0.24, 1)", xt = 60, St = /* @__PURE__ */ Ue({
19
+ }, R = 1300.02, D = 571.784, xt = "cubic-bezier(0.76, 0, 0.24, 1)", ht = 60, $t = /* @__PURE__ */ Ue({
20
20
  __name: "KvSimpleMap",
21
21
  props: {
22
22
  /**
@@ -187,23 +187,23 @@ const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"],
187
187
  fadeDuration: { type: Number, default: 500 }
188
188
  },
189
189
  setup(k) {
190
- const n = k, ue = Ye(), W = l(() => !!ue.popup), E = m(null), i = m(0), x = m(0);
191
- function re() {
192
- return n.height != null ? `${n.height}px` : i.value ? `${i.value / n.aspectRatio}px` : `${100 / n.aspectRatio}%`;
190
+ const n = k, re = Ye(), G = a(() => !!re.popup), E = x(null), r = x(0), w = x(0);
191
+ function se() {
192
+ return n.height != null ? `${n.height}px` : r.value ? `${r.value / n.aspectRatio}px` : `${100 / n.aspectRatio}%`;
193
193
  }
194
- const ie = l(() => ({
194
+ const ce = a(() => ({
195
195
  width: n.width != null ? `${n.width}px` : "100%",
196
- height: re(),
196
+ height: se(),
197
197
  paddingBottom: n.height != null ? void 0 : `${100 / n.aspectRatio}%`
198
198
  }));
199
- let P = null;
200
- function X() {
199
+ let S = null;
200
+ function q() {
201
201
  const e = E.value;
202
202
  if (!e) return;
203
203
  const t = e.getBoundingClientRect();
204
- i.value = t.width, x.value = t.height;
204
+ r.value = t.width, w.value = t.height;
205
205
  }
206
- const se = l(() => n.countries), ce = l(() => n.loop), A = m(!1), pe = l(() => n.autoplay && !A.value), fe = l(() => ({
206
+ const pe = a(() => n.countries), me = a(() => n.loop), A = x(!1), fe = a(() => n.autoplay && !A.value), ve = a(() => ({
207
207
  initialDelay: n.initialDelay,
208
208
  panDuration: n.panDuration,
209
209
  holdPerStep: n.holdPerStep,
@@ -211,105 +211,118 @@ const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"],
211
211
  holdAll: n.holdAll,
212
212
  fadeDuration: n.fadeDuration
213
213
  })), {
214
- panIdx: G,
215
- highlighted: me,
216
- showPopupIdx: q,
217
- isRunning: s,
218
- start: ve
219
- } = at(se, pe, ce, fe.value), c = l(() => i.value ? i.value / R : 1), K = l(() => {
220
- const e = c.value, t = D * e;
214
+ panIdx: K,
215
+ highlighted: de,
216
+ showPopupIdx: j,
217
+ isRunning: m,
218
+ start: ye
219
+ } = ut(pe, fe, me, ve.value), f = a(() => r.value ? r.value / R : 1), J = a(() => {
220
+ const e = f.value, t = D * e;
221
221
  return {
222
222
  x: 0,
223
- y: Math.max(0, (x.value - t) / 2),
223
+ y: Math.max(0, (w.value - t) / 2),
224
224
  scale: e
225
225
  };
226
226
  });
227
- function de(e) {
228
- return e.cx != null && e.cy != null ? { cx: e.cx, cy: e.cy } : U[e.id] ?? null;
227
+ function xe(e) {
228
+ return e.cx != null && e.cy != null ? { cx: e.cx, cy: e.cy } : O[e.id] ?? null;
229
229
  }
230
- const ye = l(() => {
231
- if (G.value < 0) return null;
232
- const e = n.countries[G.value];
230
+ const he = a(() => {
231
+ const l = Math.max(0, Math.min(1, (r.value - 320) / 880));
232
+ return n.zoomFactor * (1.4 - l * (1.4 - 1));
233
+ }), be = a(() => {
234
+ if (K.value < 0) return null;
235
+ const e = n.countries[K.value];
233
236
  if (!e) return null;
234
- const t = de(e);
237
+ const t = xe(e);
235
238
  if (!t) return null;
236
- const o = c.value * n.zoomFactor;
239
+ const o = f.value * he.value;
240
+ let l = o;
241
+ const u = O[e.id];
242
+ if (u) {
243
+ const d = Math.max(2 * (u.xMax - u.cx), 20), V = Math.max(2 * (u.yMax - u.cy), 20), I = 0.45;
244
+ l = Math.min(
245
+ r.value * I / d,
246
+ w.value * I / V
247
+ );
248
+ }
249
+ const s = f.value * n.maxZoom, i = Math.min(s, Math.max(o, l));
237
250
  return {
238
- x: i.value / 2 - t.cx * o,
239
- y: x.value / 2 - t.cy * o,
240
- scale: o
251
+ x: r.value / 2 - t.cx * i,
252
+ y: w.value / 2 - t.cy * i,
253
+ scale: i
241
254
  };
242
- }), u = m({ x: 0, y: 0, scale: 1 }), B = m(!1), j = m(!1), I = m(!1), xe = l(() => {
243
- if (!n.fitToCountries || !n.countries.length || !i.value || !x.value) return null;
244
- let e = 1 / 0, t = 1 / 0, o = -1 / 0, a = -1 / 0;
245
- if (n.countries.forEach((r) => {
246
- if (r.cx != null && r.cy != null) {
247
- r.cx < e && (e = r.cx), r.cx > o && (o = r.cx), r.cy < t && (t = r.cy), r.cy > a && (a = r.cy);
255
+ }), c = x({ x: 0, y: 0, scale: 1 }), B = x(!1), Q = x(!1), Z = x(!1), we = a(() => {
256
+ if (!n.fitToCountries || !n.countries.length || !r.value || !w.value) return null;
257
+ let e = 1 / 0, t = 1 / 0, o = -1 / 0, l = -1 / 0;
258
+ if (n.countries.forEach((p) => {
259
+ if (p.cx != null && p.cy != null) {
260
+ p.cx < e && (e = p.cx), p.cx > o && (o = p.cx), p.cy < t && (t = p.cy), p.cy > l && (l = p.cy);
248
261
  return;
249
262
  }
250
- const f = U[r.id];
251
- if (!f) return;
252
- const ne = 2 * f.cx - f.xMax, oe = 2 * f.cy - f.yMax;
253
- ne < e && (e = ne), oe < t && (t = oe), f.xMax > o && (o = f.xMax), f.yMax > a && (a = f.yMax);
263
+ const y = O[p.id];
264
+ if (!y) return;
265
+ const le = 2 * y.cx - y.xMax, ae = 2 * y.cy - y.yMax;
266
+ le < e && (e = le), ae < t && (t = ae), y.xMax > o && (o = y.xMax), y.yMax > l && (l = y.yMax);
254
267
  }), !Number.isFinite(e)) return null;
255
- const y = Math.max(0, n.fitPadding), w = Math.max(1, o - e) * (1 + y * 2), M = Math.max(1, a - t) * (1 + y * 2), b = Math.min(i.value / w, x.value / M), He = c.value * n.minZoom, ze = c.value * n.maxZoom, F = Math.max(He, Math.min(ze, b)), Fe = (e + o) / 2, Ve = (t + a) / 2;
268
+ const u = Math.max(0, n.fitPadding), s = Math.max(1, o - e) * (1 + u * 2), i = Math.max(1, l - t) * (1 + u * 2), d = Math.min(r.value / s, w.value / i), V = f.value * n.minZoom, I = f.value * n.maxZoom, U = Math.max(V, Math.min(I, d)), We = (e + o) / 2, Ve = (t + l) / 2;
256
269
  return {
257
- x: i.value / 2 - Fe * F,
258
- y: x.value / 2 - Ve * F,
259
- scale: F
270
+ x: r.value / 2 - We * U,
271
+ y: w.value / 2 - Ve * U,
272
+ scale: U
260
273
  };
261
- }), he = l(() => xe.value ?? K.value), O = l(() => s.value ? ye.value ?? K.value : u.value);
262
- V(he, (e) => {
263
- s.value || I.value || (u.value = e);
264
- }, { immediate: !0 }), V(() => n.countries, () => {
265
- I.value = !1;
266
- }), V(() => n.autoplay, () => {
274
+ }), ge = a(() => we.value ?? J.value), F = a(() => m.value ? be.value ?? J.value : c.value);
275
+ Y(ge, (e) => {
276
+ m.value || Z.value || (c.value = e);
277
+ }, { immediate: !0 }), Y(() => n.countries, () => {
278
+ Z.value = !1;
279
+ }), Y(() => n.autoplay, () => {
267
280
  A.value = !1;
268
281
  });
269
- const we = l(() => {
270
- const { x: e, y: t, scale: o } = O.value, a = !B.value && j.value;
282
+ const Me = a(() => {
283
+ const { x: e, y: t, scale: o } = F.value, l = !B.value && Q.value;
271
284
  return {
272
285
  width: `${R}px`,
273
286
  height: `${D}px`,
274
287
  transformOrigin: "0 0",
275
288
  transform: `translate(${e}px, ${t}px) scale(${o})`,
276
- transition: a ? `transform ${n.panDuration}ms ${yt}` : "none",
289
+ transition: l ? `transform ${n.panDuration}ms ${xt}` : "none",
277
290
  willChange: "transform"
278
291
  };
279
- }), _ = m(null), Z = l(() => {
292
+ }), _ = x(null), H = a(() => {
280
293
  const e = /* @__PURE__ */ new Map();
281
294
  return n.countries.forEach((t) => e.set(t.id, t)), e;
282
295
  });
283
- function be(e) {
284
- return Z.value.has(e) || !!ae[e];
296
+ function _e(e) {
297
+ return H.value.has(e) || !!ie[e];
285
298
  }
286
- function H(e) {
287
- return be(e);
299
+ function z(e) {
300
+ return _e(e);
288
301
  }
289
- const S = N.colors["eco-green"], ge = [S[1], S[2], S[3], S[4]], J = l(() => n.highlightColor ?? S.DEFAULT), _e = l(() => n.baseColor ?? N.colors.gray[200]), Me = N.colors.gray[300];
290
- function Ce(e) {
302
+ const P = N.colors["eco-green"], Ce = [P[1], P[2], P[3], P[4]], ee = a(() => n.highlightColor ?? P.DEFAULT), ke = a(() => n.baseColor ?? N.colors.gray[200]), Se = N.colors.gray[300];
303
+ function Pe(e) {
291
304
  if (e == null || e < n.loanCountTiers[0]) return null;
292
305
  for (let t = n.loanCountTiers.length - 1; t >= 0; t -= 1)
293
- if (e >= n.loanCountTiers[t]) return ge[t];
306
+ if (e >= n.loanCountTiers[t]) return Ce[t];
294
307
  return null;
295
308
  }
296
- function ke(e) {
309
+ function $e(e) {
297
310
  return {
298
311
  transition: `fill ${n.fadeDuration}ms ease-in-out`,
299
- cursor: H(e) && !s.value ? "pointer" : "inherit"
312
+ cursor: z(e) && !m.value ? "pointer" : "inherit"
300
313
  };
301
314
  }
302
- function Pe(e) {
303
- const t = Z.value.get(e), o = t ? Ce(t.loanCount) : null, a = _.value === e && H(e);
304
- return me.value.has(e) ? J.value : a ? o ? J.value : Me : o ?? _e.value;
315
+ function Te(e) {
316
+ const t = H.value.get(e), o = t ? Pe(t.loanCount) : null, l = _.value === e && z(e);
317
+ return de.value.has(e) ? ee.value : l ? o ? ee.value : Se : o ?? ke.value;
305
318
  }
306
- function Se(e) {
307
- s.value || H(e) && (_.value = e);
319
+ function Ne(e) {
320
+ m.value || z(e) && (_.value = e);
308
321
  }
309
- function $e(e) {
322
+ function Re(e) {
310
323
  _.value === e && (_.value = null);
311
324
  }
312
- function Te(e) {
325
+ function De(e, t = !1) {
313
326
  if (e.cx != null && e.cy != null)
314
327
  return {
315
328
  cx: e.cx,
@@ -319,125 +332,127 @@ const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"],
319
332
  yMin: e.cy,
320
333
  yMax: e.cy
321
334
  };
322
- const t = U[e.id];
323
- return t ? {
324
- cx: t.cx,
325
- cy: t.cy,
326
- xMax: t.xMax,
327
- yMax: t.yMax,
328
- xMin: 2 * t.cx - t.xMax,
329
- yMin: 2 * t.cy - t.yMax
330
- } : null;
335
+ const o = O[e.id];
336
+ if (!o) return null;
337
+ const l = t && o.popupCx != null ? o.popupCx : o.cx, u = t && o.popupCy != null ? o.popupCy : o.cy, s = t && o.popupXMax != null ? o.popupXMax : o.xMax, i = t && o.popupYMax != null ? o.popupYMax : o.yMax;
338
+ return {
339
+ cx: l,
340
+ cy: u,
341
+ xMax: s,
342
+ yMax: i,
343
+ xMin: 2 * l - s,
344
+ yMin: 2 * u - i
345
+ };
331
346
  }
332
- function Q(e) {
333
- const t = Te(e);
347
+ function te(e) {
348
+ const t = De(e, !0);
334
349
  if (!t) return null;
335
- const o = O.value, a = { "--kv-simple-map-popup-offset": `${n.popupOffset}px` };
350
+ const o = F.value, l = { "--kv-simple-map-popup-offset": `${n.popupOffset}px` };
336
351
  if (n.popupPlacement === "bottom-right")
337
352
  return {
338
353
  placement: "bottom-right",
339
354
  style: {
340
355
  left: `${t.xMax * o.scale + o.x}px`,
341
356
  top: `${t.yMax * o.scale + o.y}px`,
342
- ...a
357
+ ...l
343
358
  }
344
359
  };
345
- const y = t.cx * o.scale + o.x, w = t.yMin * o.scale + o.y, M = t.yMax * o.scale + o.y, b = w < xt ? "bottom" : "top";
360
+ const u = t.cx * o.scale + o.x, s = t.yMin * o.scale + o.y, i = t.yMax * o.scale + o.y, d = s < ht ? "bottom" : "top";
346
361
  return {
347
- placement: b,
362
+ placement: d,
348
363
  style: {
349
- left: `${y}px`,
350
- top: `${b === "top" ? w : M}px`,
351
- ...a
364
+ left: `${u}px`,
365
+ top: `${d === "top" ? s : i}px`,
366
+ ...l
352
367
  }
353
368
  };
354
369
  }
355
- function ee(e) {
370
+ function oe(e) {
356
371
  return !!e.name || e.loanCount != null;
357
372
  }
358
- const p = l(() => {
359
- if (s.value && q.value >= 0) {
360
- const e = n.countries[q.value];
361
- if (!e || !W.value && !ee(e)) return null;
362
- const t = Q(e);
373
+ const v = a(() => {
374
+ if (m.value && j.value >= 0) {
375
+ const e = n.countries[j.value];
376
+ if (!e || !G.value && !oe(e)) return null;
377
+ const t = te(e);
363
378
  return t ? { country: e, ...t } : null;
364
379
  }
365
- if (!s.value && _.value) {
366
- const e = _.value, t = Z.value.get(e) ?? { id: e, name: ae[e] };
367
- if (!W.value && !ee(t)) return null;
368
- const o = Q(t);
380
+ if (!m.value && _.value) {
381
+ const e = _.value, t = H.value.get(e) ?? { id: e, name: ie[e] };
382
+ if (!G.value && !oe(t)) return null;
383
+ const o = te(t);
369
384
  return o ? { country: t, ...o } : null;
370
385
  }
371
386
  return null;
372
387
  });
373
- function Ne(e) {
388
+ function Ee(e) {
374
389
  return e === 1 ? "1 loan" : `${e} loans`;
375
390
  }
376
- let h = null;
377
- function z(e) {
378
- h && (u.value = {
379
- ...u.value,
380
- x: h.tx + (e.clientX - h.x),
381
- y: h.ty + (e.clientY - h.y)
391
+ let g = null;
392
+ function W(e) {
393
+ g && (c.value = {
394
+ ...c.value,
395
+ x: g.tx + (e.clientX - g.x),
396
+ y: g.ty + (e.clientY - g.y)
382
397
  });
383
398
  }
384
- function Re() {
385
- B.value = !1, h = null, window.removeEventListener("pointermove", z);
399
+ function Ae() {
400
+ B.value = !1, g = null, window.removeEventListener("pointermove", W);
386
401
  }
387
- function De(e) {
388
- e.button !== 0 && e.pointerType === "mouse" || (s.value && (u.value = { ...O.value }, A.value = !0), n.allowDragging && (I.value = !0, B.value = !0, h = {
402
+ function Be(e) {
403
+ e.button !== 0 && e.pointerType === "mouse" || (m.value && (c.value = { ...F.value }, A.value = !0), n.allowDragging && (Z.value = !0, B.value = !0, g = {
389
404
  x: e.clientX,
390
405
  y: e.clientY,
391
- tx: u.value.x,
392
- ty: u.value.y
393
- }, window.addEventListener("pointermove", z), window.addEventListener("pointerup", Re, { once: !0 })));
406
+ tx: c.value.x,
407
+ ty: c.value.y
408
+ }, window.addEventListener("pointermove", W), window.addEventListener("pointerup", Ae, { once: !0 })));
394
409
  }
395
- const Ee = l(() => n.autoplay && !s.value);
396
- function Ae() {
397
- A.value = !1, ve();
410
+ const Ze = a(() => n.autoplay && !m.value);
411
+ function Ie() {
412
+ A.value = !1, ye();
398
413
  }
399
- const Be = l(() => !n.allowDragging || s.value ? "default" : B.value ? "grabbing" : "grab"), Ie = l(() => u.value.scale < c.value * n.maxZoom - 1e-3), Le = l(() => u.value.scale > c.value * n.minZoom + 1e-3);
400
- function te(e) {
401
- const t = u.value, o = c.value * n.minZoom, a = c.value * n.maxZoom, y = Math.min(a, Math.max(o, t.scale + e * c.value));
402
- if (Math.abs(y - t.scale) < 1e-6) return;
403
- I.value = !0;
404
- const w = i.value, M = x.value, b = y / t.scale;
405
- u.value = {
406
- x: w / 2 - (w / 2 - t.x) * b,
407
- y: M / 2 - (M / 2 - t.y) * b,
408
- scale: y
414
+ const Le = a(() => !n.allowDragging || m.value ? "default" : B.value ? "grabbing" : "grab"), Oe = a(() => c.value.scale < f.value * n.maxZoom - 1e-3), Fe = a(() => c.value.scale > f.value * n.minZoom + 1e-3);
415
+ function ne(e) {
416
+ const t = c.value, o = f.value * n.minZoom, l = f.value * n.maxZoom, u = Math.min(l, Math.max(o, t.scale + e * f.value));
417
+ if (Math.abs(u - t.scale) < 1e-6) return;
418
+ Z.value = !0;
419
+ const s = r.value, i = w.value, d = u / t.scale;
420
+ c.value = {
421
+ x: s / 2 - (s / 2 - t.x) * d,
422
+ y: i / 2 - (i / 2 - t.y) * d,
423
+ scale: u
409
424
  };
410
425
  }
411
- function Oe() {
412
- te(n.zoomStep);
426
+ function He() {
427
+ ne(n.zoomStep);
413
428
  }
414
- function Ze() {
415
- te(-n.zoomStep);
429
+ function ze() {
430
+ ne(-n.zoomStep);
416
431
  }
417
- return We(() => {
418
- X(), typeof ResizeObserver < "u" && E.value && (P = new ResizeObserver(X), P.observe(E.value)), requestAnimationFrame(() => {
432
+ return Xe(() => {
433
+ q(), typeof ResizeObserver < "u" && E.value && (S = new ResizeObserver(q), S.observe(E.value)), requestAnimationFrame(() => {
419
434
  requestAnimationFrame(() => {
420
- j.value = !0;
435
+ Q.value = !0;
421
436
  });
422
437
  });
423
- }), Xe(() => {
424
- P == null || P.disconnect(), window.removeEventListener("pointermove", z);
425
- }), (e, t) => (v(), d("div", {
438
+ }), Ge(() => {
439
+ S == null || S.disconnect(), window.removeEventListener("pointermove", W);
440
+ }), (e, t) => (h(), b("div", {
426
441
  ref_key: "rootRef",
427
442
  ref: E,
428
443
  class: "kv-simple-map tw-relative tw-block tw-overflow-hidden",
429
- style: $(ie.value)
444
+ style: $(ce.value)
430
445
  }, [
431
- g("div", {
446
+ M("div", {
432
447
  class: "kv-simple-map__clip tw-absolute tw-inset-0 tw-overflow-hidden",
433
- style: $({ backgroundColor: k.oceanColor, cursor: Be.value }),
434
- onPointerdown: De
448
+ style: $({ backgroundColor: k.oceanColor, cursor: Le.value }),
449
+ onPointerdown: Be
435
450
  }, [
436
- g("div", {
451
+ M("div", {
437
452
  class: "kv-simple-map__pan-layer tw-absolute tw-top-0 tw-left-0",
438
- style: $(we.value)
453
+ style: $(Me.value)
439
454
  }, [
440
- (v(), d("svg", {
455
+ (h(), b("svg", {
441
456
  width: R,
442
457
  height: D,
443
458
  viewBox: `0 0 ${R} ${D}`,
@@ -445,74 +460,74 @@ const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"],
445
460
  "aria-hidden": "true",
446
461
  class: "tw-block"
447
462
  }, [
448
- (v(!0), d(Ge, null, qe(C(lt), (o) => (v(), d("path", {
463
+ (h(!0), b(qe, null, Ke(C(at), (o) => (h(), b("path", {
449
464
  key: o.id,
450
- d: C(ot)[o.key],
451
- fill: Pe(o.id),
465
+ d: C(lt)[o.key],
466
+ fill: Te(o.id),
452
467
  "fill-rule": "evenodd",
453
468
  "clip-rule": "evenodd",
454
469
  stroke: "white",
455
470
  "stroke-linejoin": "round",
456
- style: $(ke(o.id)),
457
- onPointerenter: (a) => Se(o.id),
458
- onPointerleave: (a) => $e(o.id)
471
+ style: $($e(o.id)),
472
+ onPointerenter: (l) => Ne(o.id),
473
+ onPointerleave: (l) => Re(o.id)
459
474
  }, null, 44, rt))), 128))
460
- ], 8, ut))
475
+ ], 8, it))
461
476
  ], 4)
462
477
  ], 36),
463
- k.showZoomControls && !C(s) ? (v(), d("div", it, [
464
- g("button", {
478
+ k.showZoomControls && !C(m) ? (h(), b("div", st, [
479
+ M("button", {
465
480
  type: "button",
466
481
  class: "kv-simple-map__control-btn",
467
- disabled: !Ie.value,
482
+ disabled: !Oe.value,
468
483
  "aria-label": "Zoom in",
469
- onClick: Oe
484
+ onClick: He
470
485
  }, [
471
- L(Y, {
486
+ L(X, {
472
487
  class: "tw-w-2 tw-h-2",
473
- icon: C(et)
488
+ icon: C(tt)
474
489
  }, null, 8, ["icon"])
475
- ], 8, st),
476
- g("button", {
490
+ ], 8, ct),
491
+ M("button", {
477
492
  type: "button",
478
493
  class: "kv-simple-map__control-btn",
479
- disabled: !Le.value,
494
+ disabled: !Fe.value,
480
495
  "aria-label": "Zoom out",
481
- onClick: Ze
496
+ onClick: ze
482
497
  }, [
483
- L(Y, {
498
+ L(X, {
484
499
  class: "tw-w-2 tw-h-2",
485
- icon: C(tt)
500
+ icon: C(ot)
486
501
  }, null, 8, ["icon"])
487
- ], 8, ct)
502
+ ], 8, pt)
488
503
  ])) : T("", !0),
489
- Ee.value ? (v(), d("button", {
504
+ Ze.value ? (h(), b("button", {
490
505
  key: 1,
491
506
  type: "button",
492
507
  class: "kv-simple-map__control-btn kv-simple-map__play-btn tw-absolute tw-bottom-2 tw-right-2",
493
508
  "aria-label": "Resume tour",
494
- onClick: Ae
509
+ onClick: Ie
495
510
  }, [
496
- L(Y, {
511
+ L(X, {
497
512
  class: "tw-w-2 tw-h-2",
498
513
  icon: C(nt)
499
514
  }, null, 8, ["icon"])
500
515
  ])) : T("", !0),
501
- g("div", pt, [
502
- L(Ke, { name: "kv-simple-map-popup" }, {
503
- default: je(() => [
504
- p.value ? (v(), d("div", {
505
- key: p.value.country.id,
506
- class: Je(["kv-simple-map__popup tw-absolute", `kv-simple-map__popup--${p.value.placement}`]),
507
- style: $(p.value.style)
516
+ M("div", mt, [
517
+ L(je, { name: "kv-simple-map-popup" }, {
518
+ default: Je(() => [
519
+ v.value ? (h(), b("div", {
520
+ key: v.value.country.id,
521
+ class: Qe(["kv-simple-map__popup tw-absolute", `kv-simple-map__popup--${v.value.placement}`]),
522
+ style: $(v.value.style)
508
523
  }, [
509
- g("div", ft, [
510
- Qe(e.$slots, "popup", {
511
- country: p.value.country
524
+ M("div", ft, [
525
+ et(e.$slots, "popup", {
526
+ country: v.value.country
512
527
  }, () => [
513
- g("div", mt, [
514
- p.value.country.name ? (v(), d("div", vt, le(p.value.country.name), 1)) : T("", !0),
515
- p.value.country.loanCount != null ? (v(), d("div", dt, le(Ne(p.value.country.loanCount)), 1)) : T("", !0)
528
+ M("div", vt, [
529
+ v.value.country.name ? (h(), b("div", dt, ue(v.value.country.name), 1)) : T("", !0),
530
+ v.value.country.loanCount != null ? (h(), b("div", yt, ue(Ee(v.value.country.loanCount)), 1)) : T("", !0)
516
531
  ])
517
532
  ], !0)
518
533
  ])
@@ -525,5 +540,5 @@ const ut = ["viewBox"], rt = ["d", "fill", "onPointerenter", "onPointerleave"],
525
540
  }
526
541
  });
527
542
  export {
528
- St as default
543
+ $t as default
529
544
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "8.13.0",
3
+ "version": "8.13.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -125,5 +125,5 @@
125
125
  "embla-carousel-fade",
126
126
  "popper.js"
127
127
  ],
128
- "gitHead": "6d0e8c2b071887742cecc20e460e29d55f181360"
128
+ "gitHead": "abb7415577404fc07fc41ca9fc4d457f08303651"
129
129
  }