@kiva/kv-shop 3.7.65 → 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,
|
|
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
|
|
2
|
-
import { createElementBlock as d, openBlock as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return
|
|
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
|
-
|
|
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:
|
|
12
|
+
onKeydown: a[0] || (a[0] = (n) => t.handleKeyDown(n))
|
|
13
13
|
}, [
|
|
14
|
-
|
|
15
|
-
|
|
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:
|
|
18
|
-
width: ${t.
|
|
19
|
-
height: ${t.
|
|
20
|
-
transform: ${t.
|
|
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
|
-
|
|
25
|
-
|
|
24
|
+
o("div", f, [
|
|
25
|
+
i(r.$slots, "tabPanels")
|
|
26
26
|
])
|
|
27
27
|
], 2);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const x = /* @__PURE__ */ c(w, [["render", v]]);
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
x as default
|
|
32
32
|
};
|
|
@@ -1,60 +1,70 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
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(
|
|
10
|
-
const t =
|
|
9
|
+
setup(m, { emit: p }) {
|
|
10
|
+
const t = h({
|
|
11
11
|
selectedIndex: 0,
|
|
12
12
|
setTab: null,
|
|
13
13
|
navItems: []
|
|
14
|
-
}),
|
|
14
|
+
}), i = b(null), r = I(() => {
|
|
15
15
|
var e;
|
|
16
|
-
const { navItems:
|
|
17
|
-
return ((e =
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 =
|
|
25
|
-
const
|
|
26
|
-
const { navItems:
|
|
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
|
|
29
|
-
|
|
30
|
-
},
|
|
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 = (
|
|
34
|
-
|
|
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 = (
|
|
39
|
-
|
|
42
|
+
const l = (c - 1 + d) % d;
|
|
43
|
+
o(l), v();
|
|
40
44
|
}
|
|
41
|
-
e.key === "Home" && (e.preventDefault(),
|
|
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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}),
|
|
49
|
-
}),
|
|
50
|
-
|
|
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:
|
|
53
|
-
|
|
62
|
+
handleKeyDown: w,
|
|
63
|
+
indicatorStyle: n,
|
|
54
64
|
tabContext: t
|
|
55
65
|
};
|
|
56
66
|
}
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
|
-
|
|
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
|
|
3
|
-
import
|
|
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:
|
|
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 =
|
|
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,
|
|
71
|
-
(s = (e = (u = a.value) == null ? void 0 : u.tabContext) == null ? void 0 : e.setTab) == null || s.call(e, 0), (
|
|
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
|
-
}), (
|
|
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.
|
|
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.9.
|
|
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": "
|
|
66
|
+
"gitHead": "ff3cad55e305990584c6d393f118b979987720ba"
|
|
67
67
|
}
|