@greghowe79/the-lib 2.6.9 → 2.7.1

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.
@@ -16,6 +16,10 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
16
16
  menuList?.classList.remove("no-transition");
17
17
  }, 50);
18
18
  }));
19
+ qwik.useVisibleTask$(({ track }) => {
20
+ track(() => location.url.pathname);
21
+ isOpen.value = false;
22
+ });
19
23
  return /* @__PURE__ */ jsxRuntime.jsx("nav", {
20
24
  class: `menu ${isOpen.value ? "open" : ""}`,
21
25
  "aria-label": ariaLabel,
@@ -28,12 +32,10 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
28
32
  logoReload ? /* @__PURE__ */ jsxRuntime.jsx("a", {
29
33
  href: `/${locale}`,
30
34
  "aria-label": "Homepage",
31
- onClick$: () => isOpen.value = false,
32
35
  children: logoComponent && logoComponent({}, null, 0)
33
36
  }) : /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
34
37
  href: `/${locale}`,
35
38
  "aria-label": "Homepage",
36
- onClick$: () => isOpen.value = false,
37
39
  children: logoComponent && logoComponent({}, null, 0)
38
40
  }),
39
41
  /* @__PURE__ */ jsxRuntime.jsxs("button", {
@@ -63,7 +65,6 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
63
65
  target: item.target,
64
66
  rel: item.rel,
65
67
  class: "menu-link",
66
- onClick$: () => isOpen.value = false,
67
68
  children: item.label
68
69
  })
69
70
  }, item.label);
@@ -73,7 +74,6 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
73
74
  children: /* @__PURE__ */ jsxRuntime.jsx("a", {
74
75
  href: item.href,
75
76
  class: location.url.pathname === item.href ? "active" : "menu-link",
76
- onClick$: () => isOpen.value = false,
77
77
  children: item.label
78
78
  })
79
79
  }, item.label);
@@ -82,7 +82,6 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
82
82
  children: /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
83
83
  href: item.href,
84
84
  class: location.url.pathname === item.href ? "active" : "menu-link",
85
- onClick$: () => isOpen.value = false,
86
85
  children: item.label
87
86
  })
88
87
  }, item.label);
@@ -94,8 +93,11 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
94
93
  return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
95
94
  id,
96
95
  label: label ?? "",
96
+ // onClick$={() => {
97
+ // isOpen.value = false;
98
+ // onClick$?.();
99
+ // }}
97
100
  onClick$: () => {
98
- isOpen.value = false;
99
101
  onClick$?.();
100
102
  },
101
103
  icon,
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
2
- import { component$, useSignal, useStyles$, useOnWindow, $ } from "@builder.io/qwik";
2
+ import { component$, useSignal, useStyles$, useOnWindow, $, useVisibleTask$ } from "@builder.io/qwik";
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";
@@ -14,6 +14,10 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
14
14
  menuList?.classList.remove("no-transition");
15
15
  }, 50);
16
16
  }));
17
+ useVisibleTask$(({ track }) => {
18
+ track(() => location.url.pathname);
19
+ isOpen.value = false;
20
+ });
17
21
  return /* @__PURE__ */ jsx("nav", {
18
22
  class: `menu ${isOpen.value ? "open" : ""}`,
19
23
  "aria-label": ariaLabel,
@@ -26,12 +30,10 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
26
30
  logoReload ? /* @__PURE__ */ jsx("a", {
27
31
  href: `/${locale}`,
28
32
  "aria-label": "Homepage",
29
- onClick$: () => isOpen.value = false,
30
33
  children: logoComponent && logoComponent({}, null, 0)
31
34
  }) : /* @__PURE__ */ jsx(Link, {
32
35
  href: `/${locale}`,
33
36
  "aria-label": "Homepage",
34
- onClick$: () => isOpen.value = false,
35
37
  children: logoComponent && logoComponent({}, null, 0)
36
38
  }),
37
39
  /* @__PURE__ */ jsxs("button", {
@@ -61,7 +63,6 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
61
63
  target: item.target,
62
64
  rel: item.rel,
63
65
  class: "menu-link",
64
- onClick$: () => isOpen.value = false,
65
66
  children: item.label
66
67
  })
67
68
  }, item.label);
@@ -71,7 +72,6 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
71
72
  children: /* @__PURE__ */ jsx("a", {
72
73
  href: item.href,
73
74
  class: location.url.pathname === item.href ? "active" : "menu-link",
74
- onClick$: () => isOpen.value = false,
75
75
  children: item.label
76
76
  })
77
77
  }, item.label);
@@ -80,7 +80,6 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
80
80
  children: /* @__PURE__ */ jsx(Link, {
81
81
  href: item.href,
82
82
  class: location.url.pathname === item.href ? "active" : "menu-link",
83
- onClick$: () => isOpen.value = false,
84
83
  children: item.label
85
84
  })
86
85
  }, item.label);
@@ -92,8 +91,11 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
92
91
  return /* @__PURE__ */ jsx(Button, {
93
92
  id,
94
93
  label: label ?? "",
94
+ // onClick$={() => {
95
+ // isOpen.value = false;
96
+ // onClick$?.();
97
+ // }}
95
98
  onClick$: () => {
96
- isOpen.value = false;
97
99
  onClick$?.();
98
100
  },
99
101
  icon,
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = "/* .steps-container {\r\n display: grid;\r\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\r\n padding: 2rem;\r\n \r\n color: #333;\r\n justify-items: center;\r\n max-width: 1000px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n} */\r\n\r\n.steps-container {\r\n display: grid;\r\n grid-template-columns: 1fr; /* mobile */\r\n gap: 2rem;\r\n padding: 2rem;\r\n justify-items: center;\r\n max-width: 1400px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n/* Tablet */\r\n@media (min-width: 768px) {\r\n .steps-container {\r\n grid-template-columns: repeat(2, 1fr);\r\n }\r\n .step {\r\n max-width: 450px;\r\n }\r\n}\r\n\r\n/* Desktop largo: fino a 3 card, ma solo se c’è spazio per 400px */\r\n@media (min-width: 1400px) {\r\n .steps-container {\r\n grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));\r\n }\r\n}\r\n\r\n.step {\r\n text-align: center;\r\n /* max-width: 450px; */\r\n /* max-width: 100%; */\r\n width: 100%;\r\n margin: 20px;\r\n padding: 20px;\r\n border-radius: 8px;\r\n /* background: #333;\r\n background: linear-gradient(159deg, rgba(51, 51, 51, 1) 22%, rgba(0, 149, 174, 1) 100%, rgba(51, 51, 51, 1) 100%); */\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n transition:\r\n transform 0.2s ease,\r\n box-shadow 0.2s ease;\r\n}\r\n\r\n.step:hover {\r\n transform: translateY(-5px);\r\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.step :global(svg) {\r\n width: 150px;\r\n height: 150px;\r\n /* margin-bottom: 0.75rem; */\r\n display: inline-block;\r\n margin: 0;\r\n}\r\n\r\n.step h2 {\r\n font-size: 2rem;\r\n margin-bottom: 0.25rem;\r\n font-weight: 500;\r\n margin-top: 0;\r\n color: #333;\r\n}\r\n\r\n.step p {\r\n font-size: 1rem;\r\n line-height: 1.5;\r\n color: #333;\r\n}\r\n";
2
+ const styles = "/* .steps-container {\r\n display: grid;\r\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\r\n padding: 2rem;\r\n \r\n color: #333;\r\n justify-items: center;\r\n max-width: 1000px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n} */\r\n\r\n.steps-container {\r\n display: grid;\r\n grid-template-columns: 1fr; /* mobile */\r\n gap: 2rem;\r\n padding: 2rem;\r\n justify-items: center;\r\n max-width: 1400px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n/* Tablet */\r\n@media (min-width: 768px) {\r\n .steps-container {\r\n grid-template-columns: repeat(2, 1fr);\r\n }\r\n .step {\r\n max-width: 450px;\r\n }\r\n}\r\n\r\n/* Desktop largo: fino a 3 card, ma solo se c’è spazio per 400px */\r\n@media (min-width: 1400px) {\r\n .steps-container {\r\n grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));\r\n }\r\n}\r\n\r\n.step {\r\n text-align: center;\r\n /* max-width: 450px; */\r\n /* max-width: 100%; */\r\n width: 100%;\r\n margin: 20px;\r\n padding: 20px;\r\n border-radius: 8px;\r\n /* background: #333;\r\n background: linear-gradient(159deg, rgba(51, 51, 51, 1) 22%, rgba(0, 149, 174, 1) 100%, rgba(51, 51, 51, 1) 100%); */\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n transition:\r\n transform 0.2s ease,\r\n box-shadow 0.2s ease;\r\n}\r\n\r\n.step:hover {\r\n transform: translateY(-5px);\r\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.step :global(svg) {\r\n width: 150px;\r\n height: 150px;\r\n /* margin-bottom: 0.75rem; */\r\n display: inline-block;\r\n margin: 0;\r\n}\r\n\r\n/* .step h2 {\r\n font-size: 2rem;\r\n margin-bottom: 0.25rem;\r\n font-weight: 500;\r\n margin-top: 0;\r\n color: #333;\r\n} */\r\n\r\n.step h2 {\r\n font-size: 3.75rem;\r\n line-height: 1.2;\r\n font-weight: 700;\r\n letter-spacing: -0.5px;\r\n}\r\n\r\n.step p {\r\n font-size: 1.125rem;\r\n line-height: 1.5555555556;\r\n font-weight: 400;\r\n letter-spacing: normal;\r\n color: #333;\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = "/* .steps-container {\r\n display: grid;\r\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\r\n padding: 2rem;\r\n \r\n color: #333;\r\n justify-items: center;\r\n max-width: 1000px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n} */\r\n\r\n.steps-container {\r\n display: grid;\r\n grid-template-columns: 1fr; /* mobile */\r\n gap: 2rem;\r\n padding: 2rem;\r\n justify-items: center;\r\n max-width: 1400px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n/* Tablet */\r\n@media (min-width: 768px) {\r\n .steps-container {\r\n grid-template-columns: repeat(2, 1fr);\r\n }\r\n .step {\r\n max-width: 450px;\r\n }\r\n}\r\n\r\n/* Desktop largo: fino a 3 card, ma solo se c’è spazio per 400px */\r\n@media (min-width: 1400px) {\r\n .steps-container {\r\n grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));\r\n }\r\n}\r\n\r\n.step {\r\n text-align: center;\r\n /* max-width: 450px; */\r\n /* max-width: 100%; */\r\n width: 100%;\r\n margin: 20px;\r\n padding: 20px;\r\n border-radius: 8px;\r\n /* background: #333;\r\n background: linear-gradient(159deg, rgba(51, 51, 51, 1) 22%, rgba(0, 149, 174, 1) 100%, rgba(51, 51, 51, 1) 100%); */\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n transition:\r\n transform 0.2s ease,\r\n box-shadow 0.2s ease;\r\n}\r\n\r\n.step:hover {\r\n transform: translateY(-5px);\r\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.step :global(svg) {\r\n width: 150px;\r\n height: 150px;\r\n /* margin-bottom: 0.75rem; */\r\n display: inline-block;\r\n margin: 0;\r\n}\r\n\r\n.step h2 {\r\n font-size: 2rem;\r\n margin-bottom: 0.25rem;\r\n font-weight: 500;\r\n margin-top: 0;\r\n color: #333;\r\n}\r\n\r\n.step p {\r\n font-size: 1rem;\r\n line-height: 1.5;\r\n color: #333;\r\n}\r\n";
1
+ const styles = "/* .steps-container {\r\n display: grid;\r\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\r\n padding: 2rem;\r\n \r\n color: #333;\r\n justify-items: center;\r\n max-width: 1000px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n} */\r\n\r\n.steps-container {\r\n display: grid;\r\n grid-template-columns: 1fr; /* mobile */\r\n gap: 2rem;\r\n padding: 2rem;\r\n justify-items: center;\r\n max-width: 1400px;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n/* Tablet */\r\n@media (min-width: 768px) {\r\n .steps-container {\r\n grid-template-columns: repeat(2, 1fr);\r\n }\r\n .step {\r\n max-width: 450px;\r\n }\r\n}\r\n\r\n/* Desktop largo: fino a 3 card, ma solo se c’è spazio per 400px */\r\n@media (min-width: 1400px) {\r\n .steps-container {\r\n grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));\r\n }\r\n}\r\n\r\n.step {\r\n text-align: center;\r\n /* max-width: 450px; */\r\n /* max-width: 100%; */\r\n width: 100%;\r\n margin: 20px;\r\n padding: 20px;\r\n border-radius: 8px;\r\n /* background: #333;\r\n background: linear-gradient(159deg, rgba(51, 51, 51, 1) 22%, rgba(0, 149, 174, 1) 100%, rgba(51, 51, 51, 1) 100%); */\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n transition:\r\n transform 0.2s ease,\r\n box-shadow 0.2s ease;\r\n}\r\n\r\n.step:hover {\r\n transform: translateY(-5px);\r\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.step :global(svg) {\r\n width: 150px;\r\n height: 150px;\r\n /* margin-bottom: 0.75rem; */\r\n display: inline-block;\r\n margin: 0;\r\n}\r\n\r\n/* .step h2 {\r\n font-size: 2rem;\r\n margin-bottom: 0.25rem;\r\n font-weight: 500;\r\n margin-top: 0;\r\n color: #333;\r\n} */\r\n\r\n.step h2 {\r\n font-size: 3.75rem;\r\n line-height: 1.2;\r\n font-weight: 700;\r\n letter-spacing: -0.5px;\r\n}\r\n\r\n.step p {\r\n font-size: 1.125rem;\r\n line-height: 1.5555555556;\r\n font-weight: 400;\r\n letter-spacing: normal;\r\n color: #333;\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "2.6.9",
3
+ "version": "2.7.1",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",