@greghowe79/the-lib 2.12.5 → 2.12.6

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.
@@ -18,7 +18,15 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
18
18
  }));
19
19
  qwik.useVisibleTask$(({ track }) => {
20
20
  track(() => location.url.pathname);
21
- isOpen.value = false;
21
+ if (isOpen.value) {
22
+ const menuList = document.querySelector(".menu-list");
23
+ menuList?.classList.remove("open");
24
+ setTimeout(() => {
25
+ isOpen.value = false;
26
+ }, 400);
27
+ } else {
28
+ isOpen.value = false;
29
+ }
22
30
  });
23
31
  const renderSearchIcon = (icon) => {
24
32
  return typeof icon === "function" ? icon({}, null, 0) : icon;
@@ -109,17 +117,11 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
109
117
  href: searchLink.href,
110
118
  class: "search-link",
111
119
  "aria-label": searchLink.ariaLabel ?? "Search Professional",
112
- onClick$: () => {
113
- isOpen.value = false;
114
- },
115
120
  children: renderSearchIcon(searchLink.icon)
116
121
  }) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
117
122
  href: searchLink.href,
118
123
  class: "search-link",
119
124
  "aria-label": searchLink.ariaLabel ?? "Search Professional",
120
- onClick$: () => {
121
- isOpen.value = false;
122
- },
123
125
  children: renderSearchIcon(searchLink.icon)
124
126
  })),
125
127
  /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -16,7 +16,15 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
16
16
  }));
17
17
  useVisibleTask$(({ track }) => {
18
18
  track(() => location.url.pathname);
19
- isOpen.value = false;
19
+ if (isOpen.value) {
20
+ const menuList = document.querySelector(".menu-list");
21
+ menuList?.classList.remove("open");
22
+ setTimeout(() => {
23
+ isOpen.value = false;
24
+ }, 400);
25
+ } else {
26
+ isOpen.value = false;
27
+ }
20
28
  });
21
29
  const renderSearchIcon = (icon) => {
22
30
  return typeof icon === "function" ? icon({}, null, 0) : icon;
@@ -107,17 +115,11 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
107
115
  href: searchLink.href,
108
116
  class: "search-link",
109
117
  "aria-label": searchLink.ariaLabel ?? "Search Professional",
110
- onClick$: () => {
111
- isOpen.value = false;
112
- },
113
118
  children: renderSearchIcon(searchLink.icon)
114
119
  }) : /* @__PURE__ */ jsx(Link, {
115
120
  href: searchLink.href,
116
121
  class: "search-link",
117
122
  "aria-label": searchLink.ariaLabel ?? "Search Professional",
118
- onClick$: () => {
119
- isOpen.value = false;
120
- },
121
123
  children: renderSearchIcon(searchLink.icon)
122
124
  })),
123
125
  /* @__PURE__ */ jsx("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "2.12.5",
3
+ "version": "2.12.6",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",