@greghowe79/the-lib 2.12.4 → 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,12 +18,19 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
|
|
|
18
18
|
}));
|
|
19
19
|
qwik.useVisibleTask$(({ track }) => {
|
|
20
20
|
track(() => location.url.pathname);
|
|
21
|
-
isOpen.value
|
|
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;
|
|
25
33
|
};
|
|
26
|
-
const searchHref = searchLink?.href ?? "";
|
|
27
34
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", {
|
|
28
35
|
class: `menu ${isOpen.value ? "open" : ""}`,
|
|
29
36
|
"aria-label": ariaLabel,
|
|
@@ -110,29 +117,11 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
|
|
|
110
117
|
href: searchLink.href,
|
|
111
118
|
class: "search-link",
|
|
112
119
|
"aria-label": searchLink.ariaLabel ?? "Search Professional",
|
|
113
|
-
onClick$: (e) => {
|
|
114
|
-
if (isOpen.value) {
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
isOpen.value = false;
|
|
117
|
-
setTimeout(() => {
|
|
118
|
-
window.location.href = searchHref;
|
|
119
|
-
}, 400);
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
120
|
children: renderSearchIcon(searchLink.icon)
|
|
123
121
|
}) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
|
|
124
122
|
href: searchLink.href,
|
|
125
123
|
class: "search-link",
|
|
126
124
|
"aria-label": searchLink.ariaLabel ?? "Search Professional",
|
|
127
|
-
onClick$: (e) => {
|
|
128
|
-
if (isOpen.value) {
|
|
129
|
-
e.preventDefault();
|
|
130
|
-
isOpen.value = false;
|
|
131
|
-
setTimeout(() => {
|
|
132
|
-
window.location.href = searchHref;
|
|
133
|
-
}, 400);
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
125
|
children: renderSearchIcon(searchLink.icon)
|
|
137
126
|
})),
|
|
138
127
|
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -16,12 +16,19 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
|
|
|
16
16
|
}));
|
|
17
17
|
useVisibleTask$(({ track }) => {
|
|
18
18
|
track(() => location.url.pathname);
|
|
19
|
-
isOpen.value
|
|
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;
|
|
23
31
|
};
|
|
24
|
-
const searchHref = searchLink?.href ?? "";
|
|
25
32
|
return /* @__PURE__ */ jsx("nav", {
|
|
26
33
|
class: `menu ${isOpen.value ? "open" : ""}`,
|
|
27
34
|
"aria-label": ariaLabel,
|
|
@@ -108,29 +115,11 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
|
|
|
108
115
|
href: searchLink.href,
|
|
109
116
|
class: "search-link",
|
|
110
117
|
"aria-label": searchLink.ariaLabel ?? "Search Professional",
|
|
111
|
-
onClick$: (e) => {
|
|
112
|
-
if (isOpen.value) {
|
|
113
|
-
e.preventDefault();
|
|
114
|
-
isOpen.value = false;
|
|
115
|
-
setTimeout(() => {
|
|
116
|
-
window.location.href = searchHref;
|
|
117
|
-
}, 400);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
118
|
children: renderSearchIcon(searchLink.icon)
|
|
121
119
|
}) : /* @__PURE__ */ jsx(Link, {
|
|
122
120
|
href: searchLink.href,
|
|
123
121
|
class: "search-link",
|
|
124
122
|
"aria-label": searchLink.ariaLabel ?? "Search Professional",
|
|
125
|
-
onClick$: (e) => {
|
|
126
|
-
if (isOpen.value) {
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
isOpen.value = false;
|
|
129
|
-
setTimeout(() => {
|
|
130
|
-
window.location.href = searchHref;
|
|
131
|
-
}, 400);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
123
|
children: renderSearchIcon(searchLink.icon)
|
|
135
124
|
})),
|
|
136
125
|
/* @__PURE__ */ jsx("div", {
|