@kiva/kv-shop 3.7.64 → 3.7.66

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.
@@ -2,13 +2,13 @@ import l from "./KvTabPanel2.js";
2
2
  import { createBlock as o, openBlock as a, Transition as r, withCtx as s, withDirectives as c, createElementBlock as n, renderSlot as d, vShow as p } from "vue";
3
3
  import v from "../_virtual/_plugin-vue_export-helper.js";
4
4
  const w = ["id", "aria-hidden", "aria-labelledby"];
5
- function b(i, f, t, e, u, m) {
5
+ function b(i, f, t, e, m, u) {
6
6
  return a(), o(r, {
7
7
  "enter-active-class": "tw-transition-opacity tw-duration-700",
8
8
  "leave-active-class": "",
9
- "enter-class": "tw-opacity-0 tw-absolute tw-top-0",
9
+ "enter-from-class": "tw-opacity-0 tw-absolute tw-top-0",
10
10
  "enter-to-class": "tw-opacity-full",
11
- "leave-class": "",
11
+ "leave-from-class": "",
12
12
  "leave-to-class": "tw-opacity-0 tw-absolute tw-top-0"
13
13
  }, {
14
14
  default: s(() => [
@@ -1,32 +1,32 @@
1
- import n from "./KvTabs2.js";
2
- import { createElementBlock as d, openBlock as c, normalizeClass as l, createElementVNode as a, renderSlot as s, normalizeStyle as w } from "vue";
3
- import m from "../_virtual/_plugin-vue_export-helper.js";
4
- const b = { class: "tw-relative" };
5
- function f(o, r, e, t, v, p) {
6
- return c(), d("div", {
1
+ import w from "./KvTabs2.js";
2
+ import { createElementBlock as d, openBlock as s, normalizeClass as l, createElementVNode as o, renderSlot as i, normalizeStyle as m } from "vue";
3
+ import c from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = { class: "tw-relative" };
5
+ function v(r, a, e, t, p, b) {
6
+ return s(), d("div", {
7
7
  class: l(e.vertical ? "md:tw-flex" : "")
8
8
  }, [
9
- a("div", {
9
+ o("div", {
10
10
  role: "tablist",
11
11
  class: l(["tw-flex tw-overflow-auto tw-relative tw-gap-x-2.5 md:tw-gap-x-5 lg:tw-gap-x-6 tw-mb-3 lg:tw-mb-4", { "md:tw-flex-col md:tw-mr-3": e.vertical }]),
12
- onKeydown: r[0] || (r[0] = (i) => t.handleKeyDown(i))
12
+ onKeydown: a[0] || (a[0] = (n) => t.handleKeyDown(n))
13
13
  }, [
14
- s(o.$slots, "tabNav"),
15
- a("div", {
14
+ i(r.$slots, "tabNav"),
15
+ o("div", {
16
16
  class: l(["tw-absolute tw-bottom-0 tw-h-0.5 tw-left-0 tw-bg-primary-inverse tw-rounded-full tw-origin-left tw-transition-all tw-duration-300", { "tw-hidden md:tw-block tw-top-0 md:tw-bg-action": e.vertical }]),
17
- style: w(`
18
- width: ${t.selectedTabEl && !e.vertical ? t.selectedTabEl.clientWidth : 3}px;
19
- height: ${t.selectedTabEl && e.vertical ? `${t.selectedTabEl.clientHeight}px` : "0.25rem"};
20
- transform: ${t.selectedTabEl && !e.vertical ? `translateX(${t.selectedTabEl.offsetLeft}px)` : t.selectedTabEl ? `translateY(${t.selectedTabEl.offsetTop}px)` : null};
17
+ style: m(`
18
+ width: ${t.indicatorStyle.width}px;
19
+ height: ${t.indicatorStyle.height};
20
+ transform: ${t.indicatorStyle.transform};
21
21
  `)
22
22
  }, null, 6)
23
23
  ], 34),
24
- a("div", b, [
25
- s(o.$slots, "tabPanels")
24
+ o("div", f, [
25
+ i(r.$slots, "tabPanels")
26
26
  ])
27
27
  ], 2);
28
28
  }
29
- const E = /* @__PURE__ */ m(n, [["render", f]]);
29
+ const x = /* @__PURE__ */ c(w, [["render", v]]);
30
30
  export {
31
- E as default
31
+ x as default
32
32
  };
@@ -1,60 +1,70 @@
1
- import { reactive as m, ref as b, computed as I, provide as x, onMounted as h, onBeforeUnmount as y, getCurrentInstance as k } from "vue";
2
- const g = {
1
+ import { reactive as h, ref as b, computed as I, provide as g, watch as y, nextTick as k, onMounted as $, onBeforeUnmount as D } from "vue";
2
+ const T = {
3
3
  props: {
4
4
  vertical: {
5
5
  type: Boolean,
6
6
  default: !1
7
7
  }
8
8
  },
9
- setup(D, { emit: d }) {
10
- const t = m({
9
+ setup(m, { emit: p }) {
10
+ const t = h({
11
11
  selectedIndex: 0,
12
12
  setTab: null,
13
13
  navItems: []
14
- }), c = b(null), u = I(() => {
14
+ }), i = b(null), r = I(() => {
15
15
  var e;
16
- const { navItems: o, selectedIndex: s } = t;
17
- return ((e = o[s]) == null ? void 0 : e.$el) ?? null;
18
- }), f = () => {
19
- const e = k();
20
- e && e.proxy.$forceUpdate();
21
- }, n = (e) => {
22
- t.selectedIndex = e, u.value.scrollIntoView({ behavior: "smooth", block: "nearest" }), d("tab-changed", e);
16
+ const { navItems: a, selectedIndex: c } = t;
17
+ return ((e = a[c]) == null ? void 0 : e.$el) ?? null;
18
+ }), n = h({
19
+ width: 3,
20
+ height: "0.25rem",
21
+ transform: ""
22
+ }), s = () => {
23
+ const e = r.value;
24
+ e && (m.vertical ? (n.width = 3, n.height = `${e.clientHeight}px`, n.transform = `translateY(${e.offsetTop}px)`) : (n.width = e.clientWidth, n.height = "0.25rem", n.transform = `translateX(${e.offsetLeft}px)`));
25
+ }, o = (e) => {
26
+ t.selectedIndex = e, r.value.scrollIntoView({ behavior: "smooth", block: "nearest" }), p("tab-changed", e);
23
27
  };
24
- t.setTab = n, x("$KvTabContext", t);
25
- const i = (e) => {
26
- const { navItems: o, selectedIndex: s } = t, a = () => {
28
+ t.setTab = o, g("$KvTabContext", t);
29
+ const w = (e) => {
30
+ const { navItems: a, selectedIndex: c } = t, v = () => {
27
31
  var l;
28
- const v = o.find((p) => p.isActive);
29
- v && ((l = v.$el) == null || l.focus());
30
- }, r = o.length;
32
+ const f = a.find((x) => x.isActive);
33
+ f && ((l = f.$el) == null || l.focus());
34
+ }, d = a.length;
31
35
  if (e.key === "ArrowRight") {
32
36
  e.preventDefault();
33
- const l = (s + 1) % r;
34
- n(l), a();
37
+ const l = (c + 1) % d;
38
+ o(l), v();
35
39
  }
36
40
  if (e.key === "ArrowLeft") {
37
41
  e.preventDefault();
38
- const l = (s - 1 + r) % r;
39
- n(l), a();
42
+ const l = (c - 1 + d) % d;
43
+ o(l), v();
40
44
  }
41
- e.key === "Home" && (e.preventDefault(), n(0), a()), e.key === "End" && (e.preventDefault(), n(r - 1), a());
45
+ e.key === "Home" && (e.preventDefault(), o(0), v()), e.key === "End" && (e.preventDefault(), o(d - 1), v());
46
+ }, u = () => {
47
+ var e;
48
+ (e = i.value) == null || e.disconnect(), r.value && (i.value = new ResizeObserver(() => {
49
+ s();
50
+ }), i.value.observe(r.value));
42
51
  };
43
- return h(() => {
44
- t.navItems.forEach((e, o) => {
45
- e.selected && n(o);
46
- }), c.value = new ResizeObserver(() => {
47
- f();
48
- }), c.value.observe(u.value);
49
- }), y(() => {
50
- c.value.disconnect();
52
+ return y(r, () => {
53
+ u(), k(s);
54
+ }), $(() => {
55
+ t.navItems.forEach((e, a) => {
56
+ e.selected && o(a);
57
+ }), s(), u(), window.addEventListener("resize", s);
58
+ }), D(() => {
59
+ var e;
60
+ (e = i.value) == null || e.disconnect(), window.removeEventListener("resize", s);
51
61
  }), {
52
- handleKeyDown: i,
53
- selectedTabEl: u,
62
+ handleKeyDown: w,
63
+ indicatorStyle: n,
54
64
  tabContext: t
55
65
  };
56
66
  }
57
67
  };
58
68
  export {
59
- g as default
69
+ T as default
60
70
  };
@@ -1,6 +1,6 @@
1
1
  import { mdiArrowRight as v } from "@mdi/js";
2
- import { ref as t, computed as h } from "vue";
3
- import y from "../../KvAccordionItem.js";
2
+ import { ref as t, computed as y } from "vue";
3
+ import h from "../../KvAccordionItem.js";
4
4
  import g from "../../KvLoadingPlaceholder.js";
5
5
  import L from "./KvLendMenuCountryList.js";
6
6
  import b from "./KvLendMenuSearchList.js";
@@ -11,7 +11,7 @@ import T from "../../../utils/paramCase.js";
11
11
  import M from "../../KvMaterialIcon.js";
12
12
  const j = {
13
13
  components: {
14
- KvAccordionItem: y,
14
+ KvAccordionItem: h,
15
15
  KvTab: K,
16
16
  KvTabPanel: A,
17
17
  KvTabs: C,
@@ -59,7 +59,7 @@ const j = {
59
59
  }
60
60
  },
61
61
  setup(f) {
62
- const a = t(null), n = t([]), i = t(null), c = h(() => f.searches.length > 0);
62
+ const a = t(null), n = t([]), i = t(null), c = y(() => f.searches.length > 0);
63
63
  return {
64
64
  mdiArrowRight: v,
65
65
  hasSearches: c,
@@ -67,11 +67,11 @@ const j = {
67
67
  regionAccordions: n,
68
68
  searchesLink: i,
69
69
  onClose: () => {
70
- var u, e, s, o, m, l, p;
71
- (s = (e = (u = a.value) == null ? void 0 : u.tabContext) == null ? void 0 : e.setTab) == null || s.call(e, 0), (m = (o = n.value) == null ? void 0 : o.forEach) == null || m.call(o, (r) => {
70
+ var u, e, s, o, p, l, m;
71
+ (s = (e = (u = a.value) == null ? void 0 : u.tabContext) == null ? void 0 : e.setTab) == null || s.call(e, 0), (p = (o = n.value) == null ? void 0 : o.forEach) == null || p.call(o, (r) => {
72
72
  var d;
73
73
  (d = r == null ? void 0 : r.collapse) == null || d.call(r);
74
- }), (p = (l = i.value) == null ? void 0 : l.collapse) == null || p.call(l);
74
+ }), (m = (l = i.value) == null ? void 0 : l.collapse) == null || m.call(l);
75
75
  },
76
76
  paramCase: T
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "3.7.64",
3
+ "version": "3.7.66",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@apollo/client": "^3.13.1",
36
36
  "@kiva/kv-analytics": "^1.3.1",
37
- "@kiva/kv-components": "^8.8.0",
37
+ "@kiva/kv-components": "^8.9.1",
38
38
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
39
39
  "@types/braintree-web-drop-in": "^1.39.3",
40
40
  "@types/jest": "^29.5.14",
@@ -63,5 +63,5 @@
63
63
  "numeral": "2.x",
64
64
  "vue": "3.x"
65
65
  },
66
- "gitHead": "ad3a7e8530e8f47ad2a93e41c3307173755dbcde"
66
+ "gitHead": "ff3cad55e305990584c6d393f118b979987720ba"
67
67
  }