aloha-vue 1.2.263 → 1.2.264

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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.263",
17
+ "version": "1.2.264",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -195,12 +195,6 @@ export default {
195
195
  const showCountChildren = toRef(props, "showCountChildren");
196
196
  const breadcrumbsTruncatedOffset = toRef(props, "breadcrumbsTruncatedOffset");
197
197
 
198
- const {
199
- menuRef,
200
- removeListenerForKeydown,
201
- setListenerForKeydown,
202
- } = KeydownAPI(props);
203
-
204
198
  const {
205
199
  dataKeyById,
206
200
  dataProParent,
@@ -230,12 +224,18 @@ export default {
230
224
  });
231
225
 
232
226
  const {
227
+ closeMenu,
233
228
  isMenuOpen,
234
229
  removeBodyClasses,
235
230
  toggleMenu,
236
- } = ToggleAPI(props, {
231
+ } = ToggleAPI(props);
232
+
233
+ const {
234
+ menuRef,
237
235
  removeListenerForKeydown,
238
236
  setListenerForKeydown,
237
+ } = KeydownAPI(props, {
238
+ closeMenu,
239
239
  });
240
240
 
241
241
  const {
@@ -77,6 +77,7 @@ export default function ToggleAPI(props) {
77
77
 
78
78
  return {
79
79
  btnToggleTitle,
80
+ closeMenu,
80
81
  isMenuOpen,
81
82
  removeBodyClasses,
82
83
  toggleMenu,
@@ -10,7 +10,9 @@ import {
10
10
  focusableSelector,
11
11
  } from "../../const/AFocusableElements";
12
12
 
13
- export default function KeydownAPI(props) {
13
+ export default function KeydownAPI(props, {
14
+ closeMenu = () => {},
15
+ }) {
14
16
  const useEscapeForMobile = toRef(props, "useEscapeForMobile");
15
17
 
16
18
  const menuRef = ref(undefined);
@@ -50,7 +52,7 @@ export default function KeydownAPI(props) {
50
52
  return;
51
53
  }
52
54
 
53
- close.value();
55
+ closeMenu();
54
56
  $event.preventDefault();
55
57
  $event.stopPropagation();
56
58
  };