@kiva/kv-components 8.5.6 → 8.6.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,4 +1,4 @@
1
- import { toRefs as h, ref as r, nextTick as k, computed as x, watch as S, onMounted as C, onBeforeUnmount as B } from "vue";
1
+ import { toRefs as h, ref as u, nextTick as k, computed as x, watch as S, onMounted as C, onBeforeUnmount as B } from "vue";
2
2
  import { mdiClose as E } from "@mdi/js";
3
3
  import { useFocusTrap as L } from "@vueuse/integrations/useFocusTrap";
4
4
  import { hideOthers as w } from "../vendor/aria-hidden/dist/es2015/index.js";
@@ -57,16 +57,16 @@ const A = {
57
57
  ],
58
58
  setup(v, { emit: g }) {
59
59
  const {
60
- visible: u,
60
+ visible: o,
61
61
  variant: d,
62
62
  preventClose: p
63
- } = h(v), o = r(null), t = r(null), m = r(null), a = r(null), i = r(null);
63
+ } = h(v), n = u(null), t = u(null), m = u(null), a = u(null), i = u(null);
64
64
  k(() => {
65
65
  const {
66
66
  activate: e,
67
67
  deactivate: l
68
68
  } = L([
69
- o.value,
69
+ n.value,
70
70
  // This lightbox
71
71
  '[role="alert"]'
72
72
  // Any open toasts/alerts on the page
@@ -77,36 +77,36 @@ const A = {
77
77
  a.value = e, i.value = l;
78
78
  });
79
79
  let c = null, s = null;
80
- const b = x(() => d.value === "alert" ? "alertdialog" : "dialog"), n = (e = "") => {
80
+ const b = x(() => d.value === "alert" ? "alertdialog" : "dialog"), r = (e = "") => {
81
81
  var l;
82
- o.value && t.value && ((l = i.value) == null || l.call(i), t.value.scrollTop = 0, I(t.value)), P(), c && (c(), c = null), document.removeEventListener("keyup", s), g("lightbox-closed", { type: e });
82
+ n.value && t.value && ((l = i.value) == null || l.call(i), t.value.scrollTop = 0, I(t.value)), P(), c && (c(), c = null), document.removeEventListener("keyup", s), o.value && g("lightbox-closed", { type: e });
83
83
  };
84
84
  s = (e) => {
85
- e && e.key === "Escape" && !p.value && n();
85
+ e && e.key === "Escape" && !p.value && r();
86
86
  };
87
87
  const y = () => {
88
- p.value || n("background-click");
88
+ p.value || r("background-click");
89
89
  }, f = () => {
90
- u.value && (document.addEventListener("keyup", s), k(() => {
90
+ o.value && (document.addEventListener("keyup", s), k(() => {
91
91
  var e;
92
- if (o.value && t.value && ((e = a.value) == null || e.call(a), c = w(o.value), K(t.value)), q(), d.value === "alert") {
92
+ if (n.value && t.value && ((e = a.value) == null || e.call(a), c = w(n.value), K(t.value)), q(), d.value === "alert") {
93
93
  const l = m.value.querySelector("button");
94
94
  l && l.focus();
95
95
  }
96
96
  }));
97
97
  };
98
- return S(u, () => {
99
- u.value ? f() : n();
98
+ return S(o, () => {
99
+ o.value ? f() : r();
100
100
  }), C(() => {
101
- u.value && f();
102
- }), B(() => n()), {
101
+ o.value && f();
102
+ }), B(() => r()), {
103
103
  mdiClose: E,
104
104
  role: b,
105
- kvLightbox: o,
105
+ kvLightbox: n,
106
106
  kvLightboxBody: t,
107
107
  onKeyUp: s,
108
108
  onScreenClick: y,
109
- hide: n,
109
+ hide: r,
110
110
  show: f,
111
111
  controlsRef: m
112
112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "8.5.6",
3
+ "version": "8.6.0",
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": "f5556880afcdae5bef45601e29353e5c9406160f"
128
+ "gitHead": "63acdc66fbaed58ad53c37f709ac8793be9398ea"
129
129
  }