@greghowe79/the-lib 2.12.0 → 2.12.2

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.
@@ -5,7 +5,7 @@ const qwik = require("@builder.io/qwik");
5
5
  const qwikCity = require("@builder.io/qwik-city");
6
6
  const styles = require("./styles.css.qwik.cjs");
7
7
  const button = require("../button/button.qwik.cjs");
8
- const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, actions, locale, isLoading, logoReload }) => {
8
+ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, actions, locale, isLoading, logoReload, searchLink }) => {
9
9
  const location = qwikCity.useLocation();
10
10
  const isOpen = qwik.useSignal(false);
11
11
  qwik.useStyles$(styles);
@@ -20,6 +20,9 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
20
20
  track(() => location.url.pathname);
21
21
  isOpen.value = false;
22
22
  });
23
+ const renderSearchIcon = (icon) => {
24
+ return typeof icon === "function" ? icon({}, null, 0) : icon;
25
+ };
23
26
  return /* @__PURE__ */ jsxRuntime.jsx("nav", {
24
27
  class: `menu ${isOpen.value ? "open" : ""}`,
25
28
  "aria-label": ariaLabel,
@@ -29,30 +32,17 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
29
32
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
30
33
  class: "menu-left",
31
34
  children: [
32
- logoReload ? /* @__PURE__ */ jsxRuntime.jsx("a", {
33
- href: `/${locale}`,
34
- "aria-label": "Homepage",
35
- children: logoComponent && logoComponent({}, null, 0)
36
- }) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
37
- href: `/${locale}`,
38
- "aria-label": "Homepage",
39
- children: logoComponent && logoComponent({}, null, 0)
40
- }),
41
- /* @__PURE__ */ jsxRuntime.jsxs("button", {
42
- "aria-label": "Toggle menu",
43
- onClick$: () => isOpen.value = !isOpen.value,
44
- class: `menu-toggle ${isOpen.value ? "open" : ""}`,
45
- children: [
46
- /* @__PURE__ */ jsxRuntime.jsx("span", {
47
- class: "bar"
48
- }),
49
- /* @__PURE__ */ jsxRuntime.jsx("span", {
50
- class: "bar"
51
- }),
52
- /* @__PURE__ */ jsxRuntime.jsx("span", {
53
- class: "bar"
54
- })
55
- ]
35
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
36
+ class: "menu-logo",
37
+ children: logoReload ? /* @__PURE__ */ jsxRuntime.jsx("a", {
38
+ href: `/${locale}`,
39
+ "aria-label": "Homepage",
40
+ children: logoComponent && logoComponent({}, null, 0)
41
+ }) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
42
+ href: `/${locale}`,
43
+ "aria-label": "Homepage",
44
+ children: logoComponent && logoComponent({}, null, 0)
45
+ })
56
46
  }),
57
47
  /* @__PURE__ */ jsxRuntime.jsxs("ul", {
58
48
  class: `menu-list ${isOpen.value ? "open" : ""}`,
@@ -60,6 +50,7 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
60
50
  listItems?.map((item) => {
61
51
  if (item.target === "_blank") {
62
52
  return /* @__PURE__ */ jsxRuntime.jsx("li", {
53
+ class: item.class,
63
54
  children: /* @__PURE__ */ jsxRuntime.jsx("a", {
64
55
  href: item.href,
65
56
  target: item.target,
@@ -71,6 +62,7 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
71
62
  }
72
63
  if (item.reload === true) {
73
64
  return /* @__PURE__ */ jsxRuntime.jsx("li", {
65
+ class: item.class,
74
66
  children: /* @__PURE__ */ jsxRuntime.jsx("a", {
75
67
  href: item.href,
76
68
  class: location.url.pathname === item.href ? "active" : "menu-link",
@@ -79,6 +71,7 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
79
71
  }, item.label);
80
72
  }
81
73
  return /* @__PURE__ */ jsxRuntime.jsx("li", {
74
+ class: item.class,
82
75
  children: /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
83
76
  href: item.href,
84
77
  class: location.url.pathname === item.href ? "active" : "menu-link",
@@ -93,10 +86,6 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
93
86
  return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
94
87
  id,
95
88
  label: label ?? "",
96
- // onClick$={() => {
97
- // isOpen.value = false;
98
- // onClick$?.();
99
- // }}
100
89
  onClick$: () => {
101
90
  onClick$?.();
102
91
  },
@@ -113,21 +102,53 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
113
102
  })
114
103
  ]
115
104
  }),
116
- /* @__PURE__ */ jsxRuntime.jsx("div", {
117
- class: "menu-right desktop-only",
118
- children: actions?.map((action) => {
119
- return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
120
- id: action.id,
121
- label: action.label ?? "",
122
- onClick$: action.onClick$,
123
- icon: action.icon,
124
- variant: action.variant,
125
- ariaLabel: action.ariaLabel,
126
- customColors: action.customColors,
127
- isLoading: isLoading && !!action.label,
128
- disabled: isLoading
129
- }, action.id);
130
- })
105
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
106
+ class: "menu-toolbar",
107
+ children: [
108
+ searchLink && (searchLink.reload ? /* @__PURE__ */ jsxRuntime.jsx("a", {
109
+ href: searchLink.href,
110
+ class: "search-link",
111
+ "aria-label": searchLink.ariaLabel ?? "Search",
112
+ children: renderSearchIcon(searchLink.icon)
113
+ }) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
114
+ href: searchLink.href,
115
+ class: "search-link",
116
+ "aria-label": searchLink.ariaLabel ?? "Search",
117
+ children: renderSearchIcon(searchLink.icon)
118
+ })),
119
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
120
+ class: "desktop-only",
121
+ children: actions?.map((action) => {
122
+ return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
123
+ id: action.id,
124
+ label: action.label ?? "",
125
+ onClick$: action.onClick$,
126
+ icon: action.icon,
127
+ variant: action.variant,
128
+ ariaLabel: action.ariaLabel,
129
+ customColors: action.customColors,
130
+ isLoading: isLoading && !!action.label,
131
+ disabled: isLoading
132
+ }, action.id);
133
+ })
134
+ }),
135
+ /* @__PURE__ */ jsxRuntime.jsxs("button", {
136
+ "aria-label": "Toggle menu",
137
+ onClick$: () => isOpen.value = !isOpen.value,
138
+ class: `menu-toggle ${isOpen.value ? "open" : ""}`,
139
+ children: [
140
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
141
+ class: "bar"
142
+ }),
143
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
144
+ class: "bar"
145
+ }),
146
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
147
+ class: "bar"
148
+ })
149
+ ]
150
+ })
151
+ ]
131
152
  })
132
153
  ]
133
154
  })
@@ -3,7 +3,7 @@ import { component$, useSignal, useStyles$, useOnWindow, $, useVisibleTask$ } fr
3
3
  import { useLocation, Link } from "@builder.io/qwik-city";
4
4
  import styles from "./styles.css.qwik.mjs";
5
5
  import { Button } from "../button/button.qwik.mjs";
6
- const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, actions, locale, isLoading, logoReload }) => {
6
+ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, actions, locale, isLoading, logoReload, searchLink }) => {
7
7
  const location = useLocation();
8
8
  const isOpen = useSignal(false);
9
9
  useStyles$(styles);
@@ -18,6 +18,9 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
18
18
  track(() => location.url.pathname);
19
19
  isOpen.value = false;
20
20
  });
21
+ const renderSearchIcon = (icon) => {
22
+ return typeof icon === "function" ? icon({}, null, 0) : icon;
23
+ };
21
24
  return /* @__PURE__ */ jsx("nav", {
22
25
  class: `menu ${isOpen.value ? "open" : ""}`,
23
26
  "aria-label": ariaLabel,
@@ -27,30 +30,17 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
27
30
  /* @__PURE__ */ jsxs("div", {
28
31
  class: "menu-left",
29
32
  children: [
30
- logoReload ? /* @__PURE__ */ jsx("a", {
31
- href: `/${locale}`,
32
- "aria-label": "Homepage",
33
- children: logoComponent && logoComponent({}, null, 0)
34
- }) : /* @__PURE__ */ jsx(Link, {
35
- href: `/${locale}`,
36
- "aria-label": "Homepage",
37
- children: logoComponent && logoComponent({}, null, 0)
38
- }),
39
- /* @__PURE__ */ jsxs("button", {
40
- "aria-label": "Toggle menu",
41
- onClick$: () => isOpen.value = !isOpen.value,
42
- class: `menu-toggle ${isOpen.value ? "open" : ""}`,
43
- children: [
44
- /* @__PURE__ */ jsx("span", {
45
- class: "bar"
46
- }),
47
- /* @__PURE__ */ jsx("span", {
48
- class: "bar"
49
- }),
50
- /* @__PURE__ */ jsx("span", {
51
- class: "bar"
52
- })
53
- ]
33
+ /* @__PURE__ */ jsx("div", {
34
+ class: "menu-logo",
35
+ children: logoReload ? /* @__PURE__ */ jsx("a", {
36
+ href: `/${locale}`,
37
+ "aria-label": "Homepage",
38
+ children: logoComponent && logoComponent({}, null, 0)
39
+ }) : /* @__PURE__ */ jsx(Link, {
40
+ href: `/${locale}`,
41
+ "aria-label": "Homepage",
42
+ children: logoComponent && logoComponent({}, null, 0)
43
+ })
54
44
  }),
55
45
  /* @__PURE__ */ jsxs("ul", {
56
46
  class: `menu-list ${isOpen.value ? "open" : ""}`,
@@ -58,6 +48,7 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
58
48
  listItems?.map((item) => {
59
49
  if (item.target === "_blank") {
60
50
  return /* @__PURE__ */ jsx("li", {
51
+ class: item.class,
61
52
  children: /* @__PURE__ */ jsx("a", {
62
53
  href: item.href,
63
54
  target: item.target,
@@ -69,6 +60,7 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
69
60
  }
70
61
  if (item.reload === true) {
71
62
  return /* @__PURE__ */ jsx("li", {
63
+ class: item.class,
72
64
  children: /* @__PURE__ */ jsx("a", {
73
65
  href: item.href,
74
66
  class: location.url.pathname === item.href ? "active" : "menu-link",
@@ -77,6 +69,7 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
77
69
  }, item.label);
78
70
  }
79
71
  return /* @__PURE__ */ jsx("li", {
72
+ class: item.class,
80
73
  children: /* @__PURE__ */ jsx(Link, {
81
74
  href: item.href,
82
75
  class: location.url.pathname === item.href ? "active" : "menu-link",
@@ -91,10 +84,6 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
91
84
  return /* @__PURE__ */ jsx(Button, {
92
85
  id,
93
86
  label: label ?? "",
94
- // onClick$={() => {
95
- // isOpen.value = false;
96
- // onClick$?.();
97
- // }}
98
87
  onClick$: () => {
99
88
  onClick$?.();
100
89
  },
@@ -111,21 +100,53 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
111
100
  })
112
101
  ]
113
102
  }),
114
- /* @__PURE__ */ jsx("div", {
115
- class: "menu-right desktop-only",
116
- children: actions?.map((action) => {
117
- return /* @__PURE__ */ jsx(Button, {
118
- id: action.id,
119
- label: action.label ?? "",
120
- onClick$: action.onClick$,
121
- icon: action.icon,
122
- variant: action.variant,
123
- ariaLabel: action.ariaLabel,
124
- customColors: action.customColors,
125
- isLoading: isLoading && !!action.label,
126
- disabled: isLoading
127
- }, action.id);
128
- })
103
+ /* @__PURE__ */ jsxs("div", {
104
+ class: "menu-toolbar",
105
+ children: [
106
+ searchLink && (searchLink.reload ? /* @__PURE__ */ jsx("a", {
107
+ href: searchLink.href,
108
+ class: "search-link",
109
+ "aria-label": searchLink.ariaLabel ?? "Search",
110
+ children: renderSearchIcon(searchLink.icon)
111
+ }) : /* @__PURE__ */ jsx(Link, {
112
+ href: searchLink.href,
113
+ class: "search-link",
114
+ "aria-label": searchLink.ariaLabel ?? "Search",
115
+ children: renderSearchIcon(searchLink.icon)
116
+ })),
117
+ /* @__PURE__ */ jsx("div", {
118
+ class: "desktop-only",
119
+ children: actions?.map((action) => {
120
+ return /* @__PURE__ */ jsx(Button, {
121
+ id: action.id,
122
+ label: action.label ?? "",
123
+ onClick$: action.onClick$,
124
+ icon: action.icon,
125
+ variant: action.variant,
126
+ ariaLabel: action.ariaLabel,
127
+ customColors: action.customColors,
128
+ isLoading: isLoading && !!action.label,
129
+ disabled: isLoading
130
+ }, action.id);
131
+ })
132
+ }),
133
+ /* @__PURE__ */ jsxs("button", {
134
+ "aria-label": "Toggle menu",
135
+ onClick$: () => isOpen.value = !isOpen.value,
136
+ class: `menu-toggle ${isOpen.value ? "open" : ""}`,
137
+ children: [
138
+ /* @__PURE__ */ jsx("span", {
139
+ class: "bar"
140
+ }),
141
+ /* @__PURE__ */ jsx("span", {
142
+ class: "bar"
143
+ }),
144
+ /* @__PURE__ */ jsx("span", {
145
+ class: "bar"
146
+ })
147
+ ]
148
+ })
149
+ ]
129
150
  })
130
151
  ]
131
152
  })
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = ".menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n.menu-right {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n/* Hamburger button */\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n.desktop-only {\r\n display: flex;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n .menu-container {\r\n height: 100%;\r\n padding: 0;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .menu-left {\r\n justify-content: space-between;\r\n width: 100%;\r\n padding: 1rem;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n}\r\n";
2
+ const styles = "/* .menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n.menu-right {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n.desktop-only {\r\n display: flex;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n .menu-container {\r\n height: 100%;\r\n padding: 0;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .menu-left {\r\n justify-content: space-between;\r\n width: 100%;\r\n padding: 1rem;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n} */\r\n\r\n.menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n/* ── Layout ── */\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 0 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n\r\n.menu-logo {\r\n display: flex;\r\n align-items: center;\r\n flex-shrink: 0;\r\n}\r\n\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-toolbar {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.75rem;\r\n flex-shrink: 0;\r\n}\r\n\r\n/* ── Links ── */\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n/* ── Search ── */\r\n.search-link {\r\n display: none;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0.5rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n transition: background-color 0.2s;\r\n}\r\n\r\n.search-link:hover {\r\n background-color: #f0f0f0;\r\n}\r\n\r\n.search-list-item {\r\n display: flex;\r\n}\r\n\r\n/* ── Hamburger button ── */\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n/* ── Visibility helpers ── */\r\n.desktop-only {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n/* ── Mobile ── */\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n\r\n .menu-container {\r\n height: 100%;\r\n padding: 0 1rem;\r\n }\r\n\r\n .menu-left {\r\n padding-left: 1rem;\r\n }\r\n\r\n .menu-toolbar {\r\n padding-right: 1rem;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .search-link {\r\n display: flex;\r\n }\r\n\r\n .search-list-item {\r\n display: none;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = ".menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n.menu-right {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n/* Hamburger button */\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n.desktop-only {\r\n display: flex;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n .menu-container {\r\n height: 100%;\r\n padding: 0;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .menu-left {\r\n justify-content: space-between;\r\n width: 100%;\r\n padding: 1rem;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n}\r\n";
1
+ const styles = "/* .menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n.menu-right {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n.desktop-only {\r\n display: flex;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n .menu-container {\r\n height: 100%;\r\n padding: 0;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .menu-left {\r\n justify-content: space-between;\r\n width: 100%;\r\n padding: 1rem;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n} */\r\n\r\n.menu {\r\n background-color: rgba(255, 255, 255, 0.8);\r\n backdrop-filter: saturate(180%) blur(20px);\r\n -webkit-backdrop-filter: saturate(180%) blur(20px);\r\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 2;\r\n height: 5.75rem;\r\n}\r\n\r\n.menu-list.no-transition {\r\n transition: none !important;\r\n}\r\n\r\n.menu.open {\r\n background-color: rgba(255, 255, 255, 1);\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n box-shadow: none;\r\n}\r\n\r\n.menu.open::before {\r\n opacity: 0;\r\n}\r\n\r\n/* ── Layout ── */\r\n.menu-container {\r\n max-width: 75rem;\r\n padding: 0 1rem;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 100%;\r\n}\r\n\r\n.menu-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2rem;\r\n height: 100%;\r\n}\r\n\r\n.menu-logo {\r\n display: flex;\r\n align-items: center;\r\n flex-shrink: 0;\r\n}\r\n\r\n.menu-list {\r\n display: flex;\r\n list-style: none;\r\n gap: 1.5rem;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.menu-toolbar {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.75rem;\r\n flex-shrink: 0;\r\n}\r\n\r\n/* ── Links ── */\r\n.menu-link {\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.active {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n display: inline-block;\r\n padding: 0.5rem 1rem;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 500;\r\n transition:\r\n background-color 0.2s,\r\n color 0.2s;\r\n}\r\n\r\n.menu-link:hover {\r\n background-color: #f0f0f0;\r\n color: #333;\r\n}\r\n\r\n/* ── Search ── */\r\n.search-link {\r\n display: none;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0.5rem;\r\n color: #333;\r\n text-decoration: none;\r\n border-radius: 4px;\r\n transition: background-color 0.2s;\r\n}\r\n\r\n.search-link:hover {\r\n background-color: #f0f0f0;\r\n}\r\n\r\n.search-list-item {\r\n display: flex;\r\n}\r\n\r\n/* ── Hamburger button ── */\r\n.menu-toggle {\r\n display: none;\r\n flex-direction: column;\r\n justify-content: center;\r\n gap: 5px;\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 0.5rem;\r\n}\r\n\r\n.menu-toggle .bar {\r\n width: 25px;\r\n height: 3px;\r\n background-color: #333;\r\n border-radius: 2px;\r\n transition: all 0.3s ease;\r\n transform-origin: center;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(1) {\r\n transform: rotate(45deg) translate(5px, 5px);\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(2) {\r\n opacity: 0;\r\n}\r\n\r\n.menu-toggle.open .bar:nth-child(3) {\r\n transform: rotate(-45deg) translate(5px, -5px);\r\n}\r\n\r\n/* ── Visibility helpers ── */\r\n.desktop-only {\r\n display: flex;\r\n gap: 0.75rem;\r\n align-items: center;\r\n}\r\n\r\n.mobile-only {\r\n display: none;\r\n}\r\n\r\n/* ── Mobile ── */\r\n@media (max-width: 949px) {\r\n .menu {\r\n height: 5.75rem;\r\n }\r\n\r\n .menu-container {\r\n height: 100%;\r\n padding: 0 1rem;\r\n }\r\n\r\n .menu-left {\r\n padding-left: 1rem;\r\n }\r\n\r\n .menu-toolbar {\r\n padding-right: 1rem;\r\n }\r\n\r\n .menu-toggle {\r\n display: flex;\r\n }\r\n\r\n .search-link {\r\n display: flex;\r\n }\r\n\r\n .search-list-item {\r\n display: none;\r\n }\r\n\r\n .menu-list {\r\n max-height: 0;\r\n opacity: 0;\r\n overflow-y: auto;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n position: fixed;\r\n top: 5.75rem;\r\n left: 0;\r\n right: 0;\r\n background-color: #fff;\r\n flex-direction: column;\r\n padding: 1rem;\r\n z-index: 999;\r\n height: calc(100vh - 5.75rem);\r\n }\r\n\r\n .menu-list.open {\r\n max-height: calc(100vh - 5.75rem);\r\n opacity: 1;\r\n transition:\r\n max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),\r\n opacity 0.4s ease-in-out;\r\n }\r\n\r\n .desktop-only {\r\n display: none;\r\n }\r\n\r\n .mobile-only {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.75rem;\r\n margin-top: 1rem;\r\n width: 100%;\r\n }\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
@@ -6,6 +6,13 @@ export interface NavItem {
6
6
  reload?: boolean;
7
7
  target?: string;
8
8
  rel?: string;
9
+ class?: string;
10
+ }
11
+ export interface SearchLink {
12
+ href: string;
13
+ icon: JSXOutput | Component<unknown>;
14
+ reload?: boolean;
15
+ ariaLabel?: string;
9
16
  }
10
17
  export interface NavigationMenuProps {
11
18
  ariaLabel?: string;
@@ -14,6 +21,7 @@ export interface NavigationMenuProps {
14
21
  locale?: string;
15
22
  isLoading?: boolean;
16
23
  logoReload?: boolean;
24
+ searchLink?: SearchLink;
17
25
  actions?: Array<{
18
26
  id: string;
19
27
  label?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",