@kiva/kv-components 5.0.0 → 5.1.0

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,10 +1,10 @@
1
- import { toRefs as C, ref as r, watch as T, resolveComponent as L, openBlock as p, createElementBlock as g, normalizeClass as s, withModifiers as E, createElementVNode as c, normalizeStyle as B, createVNode as k, createCommentVNode as S, renderSlot as _ } from "vue";
2
- import { mdiClose as z, mdiLaunch as F } from "@mdi/js";
3
- import N from "./KvMaterialIcon.js";
4
- import V from "../_virtual/_plugin-vue_export-helper.js";
5
- const j = {
1
+ import { toRefs as T, ref as u, watch as L, resolveComponent as B, openBlock as p, createElementBlock as g, normalizeClass as c, withModifiers as E, createElementVNode as d, normalizeStyle as _, createVNode as k, createCommentVNode as S, renderSlot as z } from "vue";
2
+ import { mdiClose as F, mdiLaunch as N } from "@mdi/js";
3
+ import V from "./KvMaterialIcon.js";
4
+ import j from "../_virtual/_plugin-vue_export-helper.js";
5
+ const G = {
6
6
  components: {
7
- KvMaterialIcon: N
7
+ KvMaterialIcon: V
8
8
  },
9
9
  props: {
10
10
  /**
@@ -46,42 +46,43 @@ const j = {
46
46
  emits: [
47
47
  "side-sheet-closed"
48
48
  ],
49
- setup(w, { emit: o }) {
49
+ setup(w, { emit: e }) {
50
50
  const {
51
51
  visible: n,
52
52
  kvTrackFunction: t,
53
53
  trackEventCategory: f,
54
- animationSourceElement: d
55
- } = C(w), l = r(!1), i = r({}), a = r({}), b = () => {
56
- l.value = !1, t.value(f.value, "click", "side-sheet-closed"), d.value && (a.value = {
54
+ animationSourceElement: r
55
+ } = T(w), l = u(!1), i = u({}), a = u({}), v = () => {
56
+ const s = "tw-overflow-hidden";
57
+ l.value ? document.body.classList.add(s) : document.body.classList.remove(s);
58
+ }, b = () => {
59
+ l.value = !1, v(), t.value(f.value, "click", "side-sheet-closed"), r.value && (a.value = {
57
60
  ...i.value,
58
61
  transition: "all 0.5s ease-in-out"
59
62
  }), setTimeout(() => {
60
- o("side-sheet-closed");
63
+ e("side-sheet-closed");
61
64
  }, "700");
62
- }, x = () => {
63
- o("go-to-link");
65
+ }, C = () => {
66
+ e("go-to-link");
64
67
  };
65
- return T(n, () => {
66
- var u;
68
+ return L(n, () => {
69
+ var s;
67
70
  if (n.value) {
68
71
  setTimeout(() => {
69
- l.value = !0;
72
+ l.value = !0, v();
70
73
  }, 100);
71
- const e = (u = d.value) == null ? void 0 : u.getBoundingClientRect(), m = (e == null ? void 0 : e.top) ?? 0, v = (e == null ? void 0 : e.left) ?? 0, h = (e == null ? void 0 : e.width) ?? 0, y = (e == null ? void 0 : e.height) ?? 0;
72
- m || v || h || y ? (i.value = {
74
+ const o = (s = r.value) == null ? void 0 : s.getBoundingClientRect(), m = (o == null ? void 0 : o.top) ?? 0, x = (o == null ? void 0 : o.left) ?? 0, y = (o == null ? void 0 : o.width) ?? 0, h = (o == null ? void 0 : o.height) ?? 0;
75
+ m || x || y || h ? (i.value = {
73
76
  position: "fixed",
74
77
  top: `${m}px`,
75
- left: `${v}px`,
76
- width: `${h}px`,
77
- height: `${y}px`
78
+ width: `${y}px`,
79
+ height: `${h}px`
78
80
  }, a.value = {
79
81
  ...i.value,
80
82
  transition: "none"
81
83
  }, setTimeout(() => {
82
84
  a.value = {
83
85
  top: "0",
84
- left: "0",
85
86
  width: "100vw",
86
87
  height: "100%",
87
88
  transition: "all 0.5s ease-in-out"
@@ -89,41 +90,41 @@ const j = {
89
90
  }, 10)) : a.value = {};
90
91
  }
91
92
  }), {
92
- mdiClose: z,
93
- mdiLaunch: F,
93
+ mdiClose: F,
94
+ mdiLaunch: N,
94
95
  open: l,
95
96
  closeSideSheet: b,
96
- goToLink: x,
97
+ goToLink: C,
97
98
  modalStyles: a
98
99
  };
99
100
  }
100
101
  };
101
- function G(w, o, n, t, f, d) {
102
- const l = L("kv-material-icon");
102
+ function K(w, e, n, t, f, r) {
103
+ const l = B("kv-material-icon");
103
104
  return n.visible ? (p(), g("div", {
104
105
  key: 0,
105
- class: s(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
106
+ class: c(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
106
107
  "tw-bg-opacity-0 tw-delay-300": !t.open,
107
108
  "tw-bg-opacity-low": t.open
108
109
  }]),
109
- onClick: o[2] || (o[2] = E((...i) => t.closeSideSheet && t.closeSideSheet(...i), ["self"]))
110
+ onClick: e[2] || (e[2] = E((...i) => t.closeSideSheet && t.closeSideSheet(...i), ["self"]))
110
111
  }, [
111
- c("div", {
112
- class: s(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white tw-overflow-y-auto tw-p-2", {
112
+ d("div", {
113
+ class: c(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white tw-overflow-y-auto tw-p-2", {
113
114
  "tw-w-0 tw-delay-200 tw-opacity-0": !t.open,
114
115
  "lg:tw-w-1/2 tw-w-full tw-opacity-full": t.open
115
116
  }]),
116
- style: B(t.modalStyles)
117
+ style: _(t.modalStyles)
117
118
  }, [
118
- c("div", {
119
- class: s(["tw-flex tw-justify-between tw-transition-opacity tw-duration-500 tw-delay-200", {
119
+ d("div", {
120
+ class: c(["tw-flex tw-justify-between tw-transition-opacity tw-duration-500 tw-delay-200", {
120
121
  "tw-opacity-0": !t.open,
121
122
  "tw-opacity-full": t.open
122
123
  }])
123
124
  }, [
124
- c("button", {
125
+ d("button", {
125
126
  class: "hover:tw-text-action-highlight",
126
- onClick: o[0] || (o[0] = (...i) => t.closeSideSheet && t.closeSideSheet(...i))
127
+ onClick: e[0] || (e[0] = (...i) => t.closeSideSheet && t.closeSideSheet(...i))
127
128
  }, [
128
129
  k(l, {
129
130
  class: "tw-w-3 tw-h-3",
@@ -133,7 +134,7 @@ function G(w, o, n, t, f, d) {
133
134
  n.showGoToLink ? (p(), g("button", {
134
135
  key: 0,
135
136
  class: "hover:tw-text-action-highlight",
136
- onClick: o[1] || (o[1] = (...i) => t.goToLink && t.goToLink(...i))
137
+ onClick: e[1] || (e[1] = (...i) => t.goToLink && t.goToLink(...i))
137
138
  }, [
138
139
  k(l, {
139
140
  class: "tw-w-3 tw-h-3",
@@ -141,18 +142,18 @@ function G(w, o, n, t, f, d) {
141
142
  }, null, 8, ["icon"])
142
143
  ])) : S("", !0)
143
144
  ], 2),
144
- c("div", {
145
- class: s(["tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200 tw-overscroll-y-contain", {
145
+ d("div", {
146
+ class: c(["tw-p-4 tw-overflow-y-auto tw-transition-opacity tw-duration-500 tw-delay-200 tw-overscroll-y-contain", {
146
147
  "tw-opacity-0": !t.open,
147
148
  "tw-opacity-full": t.open
148
149
  }])
149
150
  }, [
150
- _(w.$slots, "default")
151
+ z(w.$slots, "default")
151
152
  ], 2)
152
153
  ], 6)
153
154
  ], 2)) : S("", !0);
154
155
  }
155
- const O = /* @__PURE__ */ V(j, [["render", G]]);
156
+ const q = /* @__PURE__ */ j(G, [["render", K]]);
156
157
  export {
157
- O as default
158
+ q as default
158
159
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -89,7 +89,7 @@
89
89
  "postbuild": "mkdir -p ../../dist/kvui && mv -v dist/kvui/* ../../dist/kvui/"
90
90
  },
91
91
  "peerDependencies": {
92
- "@kiva/kv-tokens": "2.x",
92
+ "@kiva/kv-tokens": "3.x",
93
93
  "@mdi/js": "7.x",
94
94
  "@vueuse/integrations": "9.x",
95
95
  "change-case": "4.x",
@@ -106,5 +106,5 @@
106
106
  "embla-carousel-fade",
107
107
  "popper.js"
108
108
  ],
109
- "gitHead": "a49e957d5d021aa4adec079b12f8a06b2b2c7b63"
109
+ "gitHead": "7030eb3308012c119d53219fbb732bd848bd29dd"
110
110
  }