@greghowe79/the-lib 1.5.7 → 1.5.9

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.
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = ".hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 4);\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1.125);\r\n font-weight: 400;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n}\r\n";
2
+ const styles = "/* .hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 4);\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1.125);\r\n font-weight: 400;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n} */\r\n\r\n/* mobile-first: regole di base pensate per smartphone */\r\n.hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 3.5rem 1.25rem; /* padding più piccolo su mobile */\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 3); /* base per smartphone */\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1); /* magari leggermente più piccolo su mobile */\r\n font-weight: 400;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n/* tablet e desktop: aumenta dimensioni e padding */\r\n@media (min-width: 481px) {\r\n .hero {\r\n padding: 6.25rem 1.25rem; /* padding originale per tablet/desktop */\r\n }\r\n\r\n .hero h1 {\r\n font-size: calc(1rem * 4); /* valore per tablet e oltre */\r\n }\r\n\r\n .hero p {\r\n font-size: calc(1rem * 1.125);\r\n margin-bottom: 1.875rem;\r\n }\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = ".hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 4);\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1.125);\r\n font-weight: 400;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n}\r\n";
1
+ const styles = "/* .hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 4);\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1.125);\r\n font-weight: 400;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n} */\r\n\r\n/* mobile-first: regole di base pensate per smartphone */\r\n.hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f5f5f7;\r\n text-align: center;\r\n padding: 3.5rem 1.25rem; /* padding più piccolo su mobile */\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 3); /* base per smartphone */\r\n font-weight: 700;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: calc(1rem * 1); /* magari leggermente più piccolo su mobile */\r\n font-weight: 400;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n/* tablet e desktop: aumenta dimensioni e padding */\r\n@media (min-width: 481px) {\r\n .hero {\r\n padding: 6.25rem 1.25rem; /* padding originale per tablet/desktop */\r\n }\r\n\r\n .hero h1 {\r\n font-size: calc(1rem * 4); /* valore per tablet e oltre */\r\n }\r\n\r\n .hero p {\r\n font-size: calc(1rem * 1.125);\r\n margin-bottom: 1.875rem;\r\n }\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
@@ -26,7 +26,7 @@ const uploadImage = qwik.$(async (_event, input, currentFile, selectedFile, imag
26
26
  if (selectedFile) selectedFile.value = file.name;
27
27
  }
28
28
  });
29
- const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, color, nameAttribute, label, selectedValue, autocomplete }) => {
29
+ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, color, nameAttribute, label, selectedValue, imgUrl, autocomplete }) => {
30
30
  qwik.useStylesScoped$(styles);
31
31
  const internalError = qwik.useSignal(null);
32
32
  const showError = error ?? internalError;
@@ -91,7 +91,7 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
91
91
  id,
92
92
  name: id,
93
93
  accept: ".png, .jpg, .jpeg, .avif",
94
- onChange$: (_, el) => uploadImage(_, el, currentFile, selectedFile),
94
+ onChange$: (_, el) => uploadImage(_, el, currentFile, selectedFile, imgUrl),
95
95
  required
96
96
  })
97
97
  ]
@@ -24,7 +24,7 @@ const uploadImage = $(async (_event, input, currentFile, selectedFile, imageUrl)
24
24
  if (selectedFile) selectedFile.value = file.name;
25
25
  }
26
26
  });
27
- const Input = component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, color, nameAttribute, label, selectedValue, autocomplete }) => {
27
+ const Input = component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, color, nameAttribute, label, selectedValue, imgUrl, autocomplete }) => {
28
28
  useStylesScoped$(styles);
29
29
  const internalError = useSignal(null);
30
30
  const showError = error ?? internalError;
@@ -89,7 +89,7 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
89
89
  id,
90
90
  name: id,
91
91
  accept: ".png, .jpg, .jpeg, .avif",
92
- onChange$: (_, el) => uploadImage(_, el, currentFile, selectedFile),
92
+ onChange$: (_, el) => uploadImage(_, el, currentFile, selectedFile, imgUrl),
93
93
  required
94
94
  })
95
95
  ]
@@ -12,6 +12,7 @@ export interface InputProps {
12
12
  bgLight?: boolean;
13
13
  currentFile?: Signal<any>;
14
14
  selectedFile?: Signal<string>;
15
+ imgUrl?: Signal<string>;
15
16
  icon?: JSXOutput | Component<unknown>;
16
17
  prefix?: string;
17
18
  required?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "1.5.7",
3
+ "version": "1.5.9",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",