@kiva/kv-components 8.19.0 → 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.
@@ -71,7 +71,7 @@ const h = "N/A", a = {
71
71
  return this.enableMultiMatching && this.multiMatchingOrgs.length > 1;
72
72
  },
73
73
  totalMatchRatio() {
74
- return this.multiMatchingOrgs.reduce((t, n) => t + n.ratio + 1, 0);
74
+ return this.multiMatchingOrgs.reduce((t, n) => t + n.ratio, 1);
75
75
  },
76
76
  variation() {
77
77
  var i, e;
@@ -1 +1 @@
1
- .kv-secondary-nav-holder[data-v-c3e621bd]{height:62px}.kv-secondary-nav[data-v-c3e621bd]{min-height:62px}
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 y, Fragment as x, renderList as b } from "vue";
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, e, t, E, A) {
7
- const g = d("kv-material-icon"), h = d("kv-page-container"), _ = d("kv-theme-provider");
8
- return i(), l(_, {
9
- theme: t.themeStyle,
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.theme === "default" ? "tw-bg-secondary" : "tw-bg-primary"])
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.theme === "default" ? "tw-bg-secondary" : "tw-bg-primary"])
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(h, null, {
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", t.navAlignmentClass])
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
- e.heading && e.heading.length > 0 ? (i(), c("div", {
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": e.linkAlignment === "left" || e.linkAlignment === "center" }])
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(t.hasHeadingLink ? e.headingLink.isExternal ? "a" : "router-link" : "div"), {
30
- to: t.hasHeadingLink ? e.headingLink.isExternal ? void 0 : e.headingLink.href : void 0,
31
- href: t.hasHeadingLink && e.headingLink.isExternal ? e.headingLink.href : void 0,
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": t.hasHeadingLink
33
+ "tw-cursor-pointer": e.hasHeadingLink
34
34
  }])
35
35
  }, {
36
36
  default: o(() => [
37
- m(f(e.heading), 1)
37
+ m(f(n.heading), 1)
38
38
  ]),
39
39
  _: 1
40
40
  }, 8, ["to", "href", "class"]))
41
- ], 2)) : y("", !0),
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] = (...n) => t.toggleSubNavigation && t.toggleSubNavigation(...n))
44
+ onClick: w[0] || (w[0] = (...t) => e.toggleSubNavigation && e.toggleSubNavigation(...t))
45
45
  }, [
46
- s(g, {
47
- icon: t.subNavigationOpen ? t.mdiChevronUp : t.mdiChevronDown
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": !t.subNavigationOpen }])
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(x, null, b(e.links, (n, k) => (i(), c("li", {
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(n.isExternal ? "a" : "router-link"), {
60
- to: n.isExternal ? void 0 : n.href,
61
- href: n.isExternal ? n.href : void 0,
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": n.isActive,
64
- "tw-no-underline": !n.isActive
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) => t.handleLinkClick(n)
66
+ onClick: (S) => e.handleLinkClick(t)
67
67
  }, {
68
68
  default: o(() => [
69
- m(f(n.text), 1)
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-c3e621bd"]]);
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<any>;
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 m, ref as l, computed as a } from "vue";
2
- import { defaultTheme as p, greenDarkTheme as h } from "@kiva/kv-tokens";
3
- import { mdiChevronUp as g, mdiChevronDown as v } from "@mdi/js";
4
- import y from "./KvThemeProvider.js";
5
- import k from "./KvMaterialIcon.js";
6
- import b from "./KvPageContainer.js";
7
- const A = {
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: y,
11
- KvMaterialIcon: k,
12
- KvPageContainer: b
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
- (t) => Object.prototype.hasOwnProperty.call(t, "text") && Object.prototype.hasOwnProperty.call(t, "href")
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 ["default", "dark"].includes(e);
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: t }) {
61
+ setup(e, { emit: r }) {
55
62
  const {
56
- heading: i,
57
- linkAlignment: n,
58
- theme: u
59
- } = m(e), s = l(null), r = l(!1), d = a(() => e.headingLink && e.headingLink.href), f = a(() => n.value === "right" ? i.value && i.value.length > 0 ? "tw-justify-between" : "tw-justify-between md:tw-justify-end" : n.value === "left" ? "tw-justify-between md:tw-justify-start" : n.value === "center" ? "tw-justify-between md:tw-justify-center" : ""), c = a(() => ({
60
- default: p,
61
- dark: h
62
- })[u.value]);
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: d,
65
- navAlignmentClass: f,
81
+ hasHeadingLink: m,
82
+ navAlignmentClass: h,
66
83
  toggleSubNavigation: () => {
67
- r.value = !r.value;
84
+ i.value = !i.value;
68
85
  },
69
- subNavigationOpen: r,
70
- mdiChevronUp: g,
71
- mdiChevronDown: v,
72
- subNavigation: s,
86
+ subNavigationOpen: i,
87
+ mdiChevronUp: k,
88
+ mdiChevronDown: C,
89
+ subNavigation: d,
73
90
  themeStyle: c,
74
- handleLinkClick: (o) => {
75
- t("subnavLinkClicked", o);
91
+ bgClass: y,
92
+ handleLinkClick: (t) => {
93
+ r("subnavLinkClicked", t);
76
94
  }
77
95
  };
78
96
  }
79
97
  };
80
98
  export {
81
- A as default
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.0",
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": "b14a197356c09ac528c18fb7aa1f7f9fdbc8517e"
131
+ "gitHead": "ee58af92f939c12b65a9346938f51fb152fc521f"
132
132
  }