@kiva/kv-components 8.9.0 → 8.9.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.
- package/dist/vue/KvTabPanel.js +11 -11
- package/dist/vue/KvTabs.js +16 -16
- package/dist/vue/KvTabs.vue.d.ts +16 -5
- package/dist/vue/KvTabs2.js +44 -34
- package/package.json +2 -2
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +0 -1082
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +0 -319
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +0 -506
- package/dist/vue/KvWwwHeader.vue.d.ts +0 -4441
package/dist/vue/KvTabPanel.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as a, createBlock as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return a(),
|
|
1
|
+
import o from "./KvTabPanel2.js";
|
|
2
|
+
import { openBlock as a, createBlock as l, Transition as r, withCtx as c, withDirectives as n, createElementBlock as s, renderSlot as d, vShow as v } from "vue";
|
|
3
|
+
import f from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const b = ["id", "aria-hidden", "aria-labelledby"];
|
|
5
|
+
function w(i, p, t, e, m, _) {
|
|
6
|
+
return a(), l(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
|
-
default:
|
|
14
|
+
default: c(() => [
|
|
15
15
|
n((a(), s("div", {
|
|
16
16
|
id: `kv-tab-panel-${t.id}`,
|
|
17
17
|
key: `kv-tab-panel-${t.id}`,
|
|
@@ -21,14 +21,14 @@ function f(i, p, t, e, _, m) {
|
|
|
21
21
|
tabindex: "0"
|
|
22
22
|
}, [
|
|
23
23
|
d(i.$slots, "default")
|
|
24
|
-
], 8,
|
|
24
|
+
], 8, b)), [
|
|
25
25
|
[v, e.isActive]
|
|
26
26
|
])
|
|
27
27
|
]),
|
|
28
28
|
_: 3
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
const y = /* @__PURE__ */
|
|
31
|
+
const y = /* @__PURE__ */ f(o, [["render", w]]);
|
|
32
32
|
export {
|
|
33
33
|
y as default
|
|
34
34
|
};
|
package/dist/vue/KvTabs.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
1
|
+
import w from "./KvTabs2.js";
|
|
2
|
+
import { openBlock as d, createElementBlock 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
4
|
const f = { class: "tw-relative" };
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function v(a, r, e, t, b, g) {
|
|
6
|
+
return d(), s("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
12
|
onKeydown: r[0] || (r[0] = (n) => t.handleKeyDown(n))
|
|
13
13
|
}, [
|
|
14
|
-
i(
|
|
15
|
-
|
|
14
|
+
i(a.$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
|
-
i(
|
|
24
|
+
o("div", f, [
|
|
25
|
+
i(a.$slots, "tabPanels")
|
|
26
26
|
])
|
|
27
27
|
], 2);
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const p = /* @__PURE__ */ c(w, [["render", v]]);
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
p as default
|
|
32
32
|
};
|
package/dist/vue/KvTabs.vue.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
interface TabNavItem extends ComponentPublicInstance {
|
|
3
|
+
forPanel?: string;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface TabContext {
|
|
8
|
+
selectedIndex: number;
|
|
9
|
+
setTab: ((index: number) => void) | null;
|
|
10
|
+
navItems: TabNavItem[];
|
|
11
|
+
}
|
|
1
12
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
13
|
vertical: {
|
|
3
14
|
type: BooleanConstructor;
|
|
@@ -5,12 +16,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
5
16
|
};
|
|
6
17
|
}>, {
|
|
7
18
|
handleKeyDown: (event: any) => void;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
navItems: any[];
|
|
19
|
+
indicatorStyle: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: string;
|
|
22
|
+
transform: string;
|
|
13
23
|
};
|
|
24
|
+
tabContext: TabContext;
|
|
14
25
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
26
|
vertical: {
|
|
16
27
|
type: BooleanConstructor;
|
package/dist/vue/KvTabs2.js
CHANGED
|
@@ -1,60 +1,70 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as h, ref as x, computed as I, provide as T, watch as g, nextTick as y, onMounted as k, onBeforeUnmount as $ } from "vue";
|
|
2
|
+
const E = {
|
|
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(p, { emit: b }) {
|
|
10
|
+
const t = h({
|
|
11
11
|
selectedIndex: 0,
|
|
12
12
|
setTab: null,
|
|
13
13
|
navItems: []
|
|
14
|
-
}),
|
|
15
|
-
var
|
|
14
|
+
}), i = x(null), r = I(() => {
|
|
15
|
+
var l;
|
|
16
16
|
const { navItems: e, selectedIndex: o } = t;
|
|
17
|
-
return ((
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
return ((l = e[o]) == null ? void 0 : l.$el) ?? null;
|
|
18
|
+
}), n = h({
|
|
19
|
+
width: 3,
|
|
20
|
+
height: "0.25rem",
|
|
21
|
+
transform: ""
|
|
22
|
+
}), c = () => {
|
|
23
|
+
const e = r.value;
|
|
24
|
+
e && (p.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
|
+
}, s = (e) => {
|
|
26
|
+
t.selectedIndex = e, r.value.scrollIntoView({ behavior: "smooth", block: "nearest" }), b("tab-changed", e);
|
|
23
27
|
};
|
|
24
|
-
t.setTab =
|
|
25
|
-
const
|
|
26
|
-
const { navItems: o, selectedIndex:
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
},
|
|
28
|
+
t.setTab = s, T("$KvTabContext", t);
|
|
29
|
+
const m = (e) => {
|
|
30
|
+
const { navItems: o, selectedIndex: l } = t, d = () => {
|
|
31
|
+
var v;
|
|
32
|
+
const a = o.find((w) => w.isActive);
|
|
33
|
+
a && ((v = a.$el) == null || v.focus());
|
|
34
|
+
}, f = o.length;
|
|
31
35
|
if (e.key === "ArrowRight") {
|
|
32
36
|
e.preventDefault();
|
|
33
|
-
const
|
|
34
|
-
|
|
37
|
+
const a = (l + 1) % f;
|
|
38
|
+
s(a), d();
|
|
35
39
|
}
|
|
36
40
|
if (e.key === "ArrowLeft") {
|
|
37
41
|
e.preventDefault();
|
|
38
|
-
const
|
|
39
|
-
|
|
42
|
+
const a = (l - 1 + f) % f;
|
|
43
|
+
s(a), d();
|
|
40
44
|
}
|
|
41
|
-
e.key === "Home" && (e.preventDefault(),
|
|
45
|
+
e.key === "Home" && (e.preventDefault(), s(0), d()), e.key === "End" && (e.preventDefault(), s(f - 1), d());
|
|
46
|
+
}, u = () => {
|
|
47
|
+
var e;
|
|
48
|
+
(e = i.value) == null || e.disconnect(), r.value && (i.value = new ResizeObserver(() => {
|
|
49
|
+
c();
|
|
50
|
+
}), i.value.observe(r.value));
|
|
42
51
|
};
|
|
43
|
-
return
|
|
52
|
+
return g(r, () => {
|
|
53
|
+
u(), y(c);
|
|
54
|
+
}), k(() => {
|
|
44
55
|
t.navItems.forEach((e, o) => {
|
|
45
|
-
e.selected &&
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
l.value.disconnect();
|
|
56
|
+
e.selected && s(o);
|
|
57
|
+
}), c(), u(), window.addEventListener("resize", c);
|
|
58
|
+
}), $(() => {
|
|
59
|
+
var e;
|
|
60
|
+
(e = i.value) == null || e.disconnect(), window.removeEventListener("resize", c);
|
|
51
61
|
}), {
|
|
52
|
-
handleKeyDown:
|
|
53
|
-
|
|
62
|
+
handleKeyDown: m,
|
|
63
|
+
indicatorStyle: n,
|
|
54
64
|
tabContext: t
|
|
55
65
|
};
|
|
56
66
|
}
|
|
57
67
|
};
|
|
58
68
|
export {
|
|
59
|
-
|
|
69
|
+
E as default
|
|
60
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.1",
|
|
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": "
|
|
128
|
+
"gitHead": "ff3cad55e305990584c6d393f118b979987720ba"
|
|
129
129
|
}
|