@kiva/kv-components 8.19.1 → 8.19.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 +1 @@
|
|
|
1
|
-
.kv-secondary-nav-holder[data-v-
|
|
1
|
+
.kv-secondary-nav-holder[data-v-20d1590d]{height:62px}.kv-secondary-nav[data-v-20d1590d]{min-height:62px}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
import u from "./KvSecondaryNav2.js";
|
|
2
|
-
import { resolveComponent as d, openBlock as i, createBlock as l, withCtx as o, createElementVNode as r, normalizeClass as a, createVNode as s, createElementBlock as c, resolveDynamicComponent as v, createTextVNode as m, toDisplayString as f, createCommentVNode as
|
|
2
|
+
import { resolveComponent as d, openBlock as i, createBlock as l, withCtx as o, createElementVNode as r, normalizeClass as a, createVNode as s, createElementBlock as c, resolveDynamicComponent as v, createTextVNode as m, toDisplayString as f, createCommentVNode as x, Fragment as y, renderList as b } from "vue";
|
|
3
3
|
import "./KvSecondaryNav.css";
|
|
4
4
|
import C from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const L = { class: "kv-secondary-nav__links tw-flex tw-flex-col md:tw-flex-row tw-items-center tw-gap-3" };
|
|
6
|
-
function N(p, w,
|
|
7
|
-
const
|
|
8
|
-
return i(), l(
|
|
9
|
-
theme:
|
|
6
|
+
function N(p, w, n, e, E, A) {
|
|
7
|
+
const _ = d("kv-material-icon"), g = d("kv-page-container"), h = d("kv-theme-provider");
|
|
8
|
+
return i(), l(h, {
|
|
9
|
+
theme: e.themeStyle,
|
|
10
10
|
class: "kv-tailwind"
|
|
11
11
|
}, {
|
|
12
12
|
default: o(() => [
|
|
13
13
|
r("div", {
|
|
14
|
-
class: a(["tw-z-1 tw-w-full kv-secondary-nav-holder relative tw-text-primary", e.
|
|
14
|
+
class: a(["tw-z-1 tw-w-full kv-secondary-nav-holder relative tw-text-primary", e.bgClass])
|
|
15
15
|
}, [
|
|
16
16
|
r("div", {
|
|
17
|
-
class: a(["tw-w-full tw-overflow-x-auto kv-secondary-nav tw-absolute tw-top-0 tw-left-0 tw-right-0", e.
|
|
17
|
+
class: a(["tw-w-full tw-overflow-x-auto kv-secondary-nav tw-absolute tw-top-0 tw-left-0 tw-right-0", e.bgClass])
|
|
18
18
|
}, [
|
|
19
|
-
s(
|
|
19
|
+
s(g, null, {
|
|
20
20
|
default: o(() => [
|
|
21
21
|
r("div", {
|
|
22
22
|
ref: "navInner",
|
|
23
|
-
class: a(["kv-secondary-nav__inner tw-flex tw-gap-2 md:tw-gap-4 tw-items-center tw-flex-wrap tw-py-2",
|
|
23
|
+
class: a(["kv-secondary-nav__inner tw-flex tw-gap-2 md:tw-gap-4 tw-items-center tw-flex-wrap tw-py-2", e.navAlignmentClass])
|
|
24
24
|
}, [
|
|
25
|
-
|
|
25
|
+
n.heading && n.heading.length > 0 ? (i(), c("div", {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: a(["kv-secondary-nav__heading-container", { "tw-block md:tw-hidden":
|
|
27
|
+
class: a(["kv-secondary-nav__heading-container", { "tw-block md:tw-hidden": n.linkAlignment === "left" || n.linkAlignment === "center" }])
|
|
28
28
|
}, [
|
|
29
|
-
(i(), l(v(
|
|
30
|
-
to:
|
|
31
|
-
href:
|
|
29
|
+
(i(), l(v(e.hasHeadingLink ? n.headingLink.isExternal ? "a" : "router-link" : "div"), {
|
|
30
|
+
to: e.hasHeadingLink ? n.headingLink.isExternal ? void 0 : n.headingLink.href : void 0,
|
|
31
|
+
href: e.hasHeadingLink && n.headingLink.isExternal ? n.headingLink.href : void 0,
|
|
32
32
|
class: a(["kv-secondary-nav__heading tw-text-h3 tw-text-primary tw-bg-transparent tw-border-none tw-no-underline", {
|
|
33
|
-
"tw-cursor-pointer":
|
|
33
|
+
"tw-cursor-pointer": e.hasHeadingLink
|
|
34
34
|
}])
|
|
35
35
|
}, {
|
|
36
36
|
default: o(() => [
|
|
37
|
-
m(f(
|
|
37
|
+
m(f(n.heading), 1)
|
|
38
38
|
]),
|
|
39
39
|
_: 1
|
|
40
40
|
}, 8, ["to", "href", "class"]))
|
|
41
|
-
], 2)) :
|
|
41
|
+
], 2)) : x("", !0),
|
|
42
42
|
r("button", {
|
|
43
43
|
class: "kv-secondary-nav__toggle tw-flex md:tw-hidden tw-text-primary tw-bg-transparent tw-border-none tw-cursor-pointer",
|
|
44
|
-
onClick: w[0] || (w[0] = (...
|
|
44
|
+
onClick: w[0] || (w[0] = (...t) => e.toggleSubNavigation && e.toggleSubNavigation(...t))
|
|
45
45
|
}, [
|
|
46
|
-
s(
|
|
47
|
-
icon:
|
|
46
|
+
s(_, {
|
|
47
|
+
icon: e.subNavigationOpen ? e.mdiChevronUp : e.mdiChevronDown
|
|
48
48
|
}, null, 8, ["icon"])
|
|
49
49
|
]),
|
|
50
50
|
r("div", {
|
|
51
51
|
ref: "subNavigation",
|
|
52
|
-
class: a(["kv-secondary-nav__links-container tw-pt-1 md:tw-pt-0 md:tw-block tw-w-full md:tw-w-auto", { "tw-hidden": !
|
|
52
|
+
class: a(["kv-secondary-nav__links-container tw-pt-1 md:tw-pt-0 md:tw-block tw-w-full md:tw-w-auto", { "tw-hidden": !e.subNavigationOpen }])
|
|
53
53
|
}, [
|
|
54
54
|
r("ul", L, [
|
|
55
|
-
(i(!0), c(
|
|
55
|
+
(i(!0), c(y, null, b(n.links, (t, k) => (i(), c("li", {
|
|
56
56
|
key: k,
|
|
57
57
|
class: "kv-secondary-nav__link-item tw-w-full md:tw-w-auto"
|
|
58
58
|
}, [
|
|
59
|
-
(i(), l(v(
|
|
60
|
-
to:
|
|
61
|
-
href:
|
|
59
|
+
(i(), l(v(t.isExternal ? "a" : "router-link"), {
|
|
60
|
+
to: t.isExternal ? void 0 : t.href,
|
|
61
|
+
href: t.isExternal ? t.href : void 0,
|
|
62
62
|
class: a([{
|
|
63
|
-
"tw-underline":
|
|
64
|
-
"tw-no-underline": !
|
|
63
|
+
"tw-underline": t.isActive,
|
|
64
|
+
"tw-no-underline": !t.isActive
|
|
65
65
|
}, "kv-secondary-nav__link tw-py-2 md:tw-py-n tw-text-primary tw-font-medium hover:tw-underline hover:tw-text-primary tw-cursor-pointer"]),
|
|
66
|
-
onClick: (S) =>
|
|
66
|
+
onClick: (S) => e.handleLinkClick(t)
|
|
67
67
|
}, {
|
|
68
68
|
default: o(() => [
|
|
69
|
-
m(f(
|
|
69
|
+
m(f(t.text), 1)
|
|
70
70
|
]),
|
|
71
71
|
_: 2
|
|
72
72
|
}, 1032, ["to", "href", "class", "onClick"]))
|
|
@@ -83,7 +83,7 @@ function N(p, w, e, t, E, A) {
|
|
|
83
83
|
_: 1
|
|
84
84
|
}, 8, ["theme"]);
|
|
85
85
|
}
|
|
86
|
-
const z = /* @__PURE__ */ C(u, [["render", N], ["__scopeId", "data-v-
|
|
86
|
+
const z = /* @__PURE__ */ C(u, [["render", N], ["__scopeId", "data-v-20d1590d"]]);
|
|
87
87
|
export {
|
|
88
88
|
z as default
|
|
89
89
|
};
|
|
@@ -40,7 +40,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
40
40
|
mdiChevronUp: string;
|
|
41
41
|
mdiChevronDown: string;
|
|
42
42
|
subNavigation: import('vue').Ref<any, any>;
|
|
43
|
-
themeStyle: import('vue').ComputedRef<
|
|
43
|
+
themeStyle: import('vue').ComputedRef<object>;
|
|
44
|
+
bgClass: import('vue').ComputedRef<string>;
|
|
44
45
|
handleLinkClick: (link: any) => void;
|
|
45
46
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "subnavLinkClicked"[], "subnavLinkClicked", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
46
47
|
heading: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { defaultTheme as
|
|
3
|
-
import { mdiChevronUp as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { toRefs as f, ref as g, computed as n } from "vue";
|
|
2
|
+
import { defaultTheme as b, greenDarkTheme as u, greenLightTheme as p, marigoldLightTheme as v, stoneLightTheme as w } from "@kiva/kv-tokens";
|
|
3
|
+
import { mdiChevronUp as k, mdiChevronDown as C } from "@mdi/js";
|
|
4
|
+
import L from "./KvThemeProvider.js";
|
|
5
|
+
import j from "./KvMaterialIcon.js";
|
|
6
|
+
import O from "./KvPageContainer.js";
|
|
7
|
+
const _ = {
|
|
8
8
|
name: "KvSecondaryNav",
|
|
9
9
|
components: {
|
|
10
|
-
KvThemeProvider:
|
|
11
|
-
KvMaterialIcon:
|
|
12
|
-
KvPageContainer:
|
|
10
|
+
KvThemeProvider: L,
|
|
11
|
+
KvMaterialIcon: j,
|
|
12
|
+
KvPageContainer: O
|
|
13
13
|
},
|
|
14
14
|
props: {
|
|
15
15
|
heading: {
|
|
@@ -29,7 +29,7 @@ const A = {
|
|
|
29
29
|
default: () => [],
|
|
30
30
|
validator(e) {
|
|
31
31
|
return e.every(
|
|
32
|
-
(
|
|
32
|
+
(r) => Object.prototype.hasOwnProperty.call(r, "text") && Object.prototype.hasOwnProperty.call(r, "href")
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -44,39 +44,57 @@ const A = {
|
|
|
44
44
|
type: String,
|
|
45
45
|
default: "default",
|
|
46
46
|
validator(e) {
|
|
47
|
-
return [
|
|
47
|
+
return [
|
|
48
|
+
"default",
|
|
49
|
+
"dark",
|
|
50
|
+
"greenLight",
|
|
51
|
+
"greenDark",
|
|
52
|
+
"marigoldLight",
|
|
53
|
+
"stoneLight"
|
|
54
|
+
].includes(e);
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
},
|
|
51
58
|
emits: [
|
|
52
59
|
"subnavLinkClicked"
|
|
53
60
|
],
|
|
54
|
-
setup(e, { emit:
|
|
61
|
+
setup(e, { emit: r }) {
|
|
55
62
|
const {
|
|
56
|
-
heading:
|
|
57
|
-
linkAlignment:
|
|
58
|
-
theme:
|
|
59
|
-
} =
|
|
60
|
-
default:
|
|
61
|
-
dark:
|
|
62
|
-
|
|
63
|
+
heading: l,
|
|
64
|
+
linkAlignment: a,
|
|
65
|
+
theme: s
|
|
66
|
+
} = f(e), d = g(null), i = g(!1), m = n(() => e.headingLink && e.headingLink.href), h = n(() => a.value === "right" ? l.value && l.value.length > 0 ? "tw-justify-between" : "tw-justify-between md:tw-justify-end" : a.value === "left" ? "tw-justify-between md:tw-justify-start" : a.value === "center" ? "tw-justify-between md:tw-justify-center" : ""), o = {
|
|
67
|
+
default: { style: b, bgClass: "tw-bg-secondary" },
|
|
68
|
+
dark: { style: u, bgClass: "tw-bg-primary" },
|
|
69
|
+
greenLight: { style: p, bgClass: "tw-bg-secondary" },
|
|
70
|
+
greenDark: { style: u, bgClass: "tw-bg-primary" },
|
|
71
|
+
marigoldLight: { style: v, bgClass: "tw-bg-secondary" },
|
|
72
|
+
stoneLight: { style: w, bgClass: "tw-bg-secondary" }
|
|
73
|
+
}, c = n(() => {
|
|
74
|
+
var t;
|
|
75
|
+
return (t = o[s.value]) == null ? void 0 : t.style;
|
|
76
|
+
}), y = n(() => {
|
|
77
|
+
var t;
|
|
78
|
+
return ((t = o[s.value]) == null ? void 0 : t.bgClass) ?? "tw-bg-primary";
|
|
79
|
+
});
|
|
63
80
|
return {
|
|
64
|
-
hasHeadingLink:
|
|
65
|
-
navAlignmentClass:
|
|
81
|
+
hasHeadingLink: m,
|
|
82
|
+
navAlignmentClass: h,
|
|
66
83
|
toggleSubNavigation: () => {
|
|
67
|
-
|
|
84
|
+
i.value = !i.value;
|
|
68
85
|
},
|
|
69
|
-
subNavigationOpen:
|
|
70
|
-
mdiChevronUp:
|
|
71
|
-
mdiChevronDown:
|
|
72
|
-
subNavigation:
|
|
86
|
+
subNavigationOpen: i,
|
|
87
|
+
mdiChevronUp: k,
|
|
88
|
+
mdiChevronDown: C,
|
|
89
|
+
subNavigation: d,
|
|
73
90
|
themeStyle: c,
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
bgClass: y,
|
|
92
|
+
handleLinkClick: (t) => {
|
|
93
|
+
r("subnavLinkClicked", t);
|
|
76
94
|
}
|
|
77
95
|
};
|
|
78
96
|
}
|
|
79
97
|
};
|
|
80
98
|
export {
|
|
81
|
-
|
|
99
|
+
_ as default
|
|
82
100
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"fuse.js": "^7.1.0"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "ee58af92f939c12b65a9346938f51fb152fc521f"
|
|
132
132
|
}
|