@greghowe79/the-lib 1.5.9 → 1.6.0

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\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
+ const styles = ".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;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 3);\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);\r\n font-weight: 400;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n@media (min-width: 481px) {\r\n .hero {\r\n padding: 6.25rem 1.25rem;\r\n }\r\n\r\n .hero h1 {\r\n font-size: calc(1rem * 4);\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\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";
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: 3.5rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: calc(1rem * 3);\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);\r\n font-weight: 400;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n@media (min-width: 481px) {\r\n .hero {\r\n padding: 6.25rem 1.25rem;\r\n }\r\n\r\n .hero h1 {\r\n font-size: calc(1rem * 4);\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,10 +26,14 @@ 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, imgUrl, 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, iconPasswordShow, iconPasswordHide, labelShowPassword = "Show password", labelHidePassword = "Hide password" }) => {
30
30
  qwik.useStylesScoped$(styles);
31
31
  const internalError = qwik.useSignal(null);
32
+ const isPasswordVisible = qwik.useSignal(false);
32
33
  const showError = error ?? internalError;
34
+ const togglePasswordVisibility = qwik.$(() => {
35
+ isPasswordVisible.value = !isPasswordVisible.value;
36
+ });
33
37
  const inputHandler = qwik.$(async (_, elem) => {
34
38
  if (type === "number") {
35
39
  if (value) value.value = elem.value;
@@ -68,6 +72,7 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
68
72
  if (!error) internalError.value = result;
69
73
  }
70
74
  });
75
+ const effectiveType = type === "password" && isPasswordVisible.value ? "text" : type;
71
76
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
72
77
  class: "input-container",
73
78
  children: [
@@ -160,6 +165,43 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
160
165
  children: label
161
166
  })
162
167
  ]
168
+ }) : type === "password" ? /* @__PURE__ */ jsxRuntime.jsxs("label", {
169
+ class: `input-label ${bgLight ? "bg_light" : ""}`,
170
+ for: id,
171
+ children: [
172
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", {
173
+ class: "sr-only",
174
+ children: label
175
+ }),
176
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
177
+ class: "input-wrapper",
178
+ children: [
179
+ (icon || iconPasswordShow || iconPasswordHide) && /* @__PURE__ */ jsxRuntime.jsx("span", {
180
+ class: "input-icon",
181
+ "aria-hidden": "true",
182
+ children: typeof icon === "function" ? icon({}, null, 0) : icon
183
+ }),
184
+ /* @__PURE__ */ jsxRuntime.jsx("input", {
185
+ id,
186
+ type: effectiveType,
187
+ class: `input ${showError.value ? "error" : ""}`,
188
+ placeholder,
189
+ "bind:value": value,
190
+ onInput$: inputHandler,
191
+ onBlur$: inputHandler,
192
+ required,
193
+ autocomplete
194
+ }),
195
+ (iconPasswordShow || iconPasswordHide) && /* @__PURE__ */ jsxRuntime.jsx("button", {
196
+ type: "button",
197
+ class: "password-toggle-btn",
198
+ onClick$: togglePasswordVisibility,
199
+ "aria-label": isPasswordVisible.value ? labelHidePassword : labelShowPassword,
200
+ children: isPasswordVisible.value ? typeof iconPasswordShow === "function" ? iconPasswordShow({}, null, 0) : iconPasswordShow : typeof iconPasswordHide === "function" ? iconPasswordHide({}, null, 0) : iconPasswordHide
201
+ })
202
+ ]
203
+ })
204
+ ]
163
205
  }) : /* @__PURE__ */ jsxRuntime.jsxs("label", {
164
206
  class: `input-label ${bgLight ? "bg_light" : ""}`,
165
207
  for: id,
@@ -24,10 +24,14 @@ 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, imgUrl, 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, iconPasswordShow, iconPasswordHide, labelShowPassword = "Show password", labelHidePassword = "Hide password" }) => {
28
28
  useStylesScoped$(styles);
29
29
  const internalError = useSignal(null);
30
+ const isPasswordVisible = useSignal(false);
30
31
  const showError = error ?? internalError;
32
+ const togglePasswordVisibility = $(() => {
33
+ isPasswordVisible.value = !isPasswordVisible.value;
34
+ });
31
35
  const inputHandler = $(async (_, elem) => {
32
36
  if (type === "number") {
33
37
  if (value) value.value = elem.value;
@@ -66,6 +70,7 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
66
70
  if (!error) internalError.value = result;
67
71
  }
68
72
  });
73
+ const effectiveType = type === "password" && isPasswordVisible.value ? "text" : type;
69
74
  return /* @__PURE__ */ jsxs("div", {
70
75
  class: "input-container",
71
76
  children: [
@@ -158,6 +163,43 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
158
163
  children: label
159
164
  })
160
165
  ]
166
+ }) : type === "password" ? /* @__PURE__ */ jsxs("label", {
167
+ class: `input-label ${bgLight ? "bg_light" : ""}`,
168
+ for: id,
169
+ children: [
170
+ label && /* @__PURE__ */ jsx("span", {
171
+ class: "sr-only",
172
+ children: label
173
+ }),
174
+ /* @__PURE__ */ jsxs("div", {
175
+ class: "input-wrapper",
176
+ children: [
177
+ (icon || iconPasswordShow || iconPasswordHide) && /* @__PURE__ */ jsx("span", {
178
+ class: "input-icon",
179
+ "aria-hidden": "true",
180
+ children: typeof icon === "function" ? icon({}, null, 0) : icon
181
+ }),
182
+ /* @__PURE__ */ jsx("input", {
183
+ id,
184
+ type: effectiveType,
185
+ class: `input ${showError.value ? "error" : ""}`,
186
+ placeholder,
187
+ "bind:value": value,
188
+ onInput$: inputHandler,
189
+ onBlur$: inputHandler,
190
+ required,
191
+ autocomplete
192
+ }),
193
+ (iconPasswordShow || iconPasswordHide) && /* @__PURE__ */ jsx("button", {
194
+ type: "button",
195
+ class: "password-toggle-btn",
196
+ onClick$: togglePasswordVisibility,
197
+ "aria-label": isPasswordVisible.value ? labelHidePassword : labelShowPassword,
198
+ children: isPasswordVisible.value ? typeof iconPasswordShow === "function" ? iconPasswordShow({}, null, 0) : iconPasswordShow : typeof iconPasswordHide === "function" ? iconPasswordHide({}, null, 0) : iconPasswordHide
199
+ })
200
+ ]
201
+ })
202
+ ]
161
203
  }) : /* @__PURE__ */ jsxs("label", {
162
204
  class: `input-label ${bgLight ? "bg_light" : ""}`,
163
205
  for: id,
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.29412rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.75rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.75rem 0 0 0.75rem;\r\n height: 3.29412rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.29412rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.75rem 0.75rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n\r\n.sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n\r\ninput[type='number']::-webkit-outer-spin-button,\r\ninput[type='number']::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\ninput[type='number'] {\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n";
2
+ const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.29412rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.75rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.75rem 0 0 0.75rem;\r\n height: 3.29412rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.29412rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.75rem 0.75rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n\r\n.sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n\r\ninput[type='number']::-webkit-outer-spin-button,\r\ninput[type='number']::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\ninput[type='number'] {\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\n.password-toggle-btn {\r\n position: absolute;\r\n right: 12px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 4px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: inherit;\r\n opacity: 0.6;\r\n transition: opacity 0.2s;\r\n}\r\n\r\n.password-toggle-btn:focus {\r\n outline: none;\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.29412rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.75rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.75rem 0 0 0.75rem;\r\n height: 3.29412rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.29412rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.75rem 0.75rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n\r\n.sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n\r\ninput[type='number']::-webkit-outer-spin-button,\r\ninput[type='number']::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\ninput[type='number'] {\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n";
1
+ const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.29412rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.75rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.75rem 0 0 0.75rem;\r\n height: 3.29412rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.29412rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.75rem 0.75rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n\r\n.sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n\r\ninput[type='number']::-webkit-outer-spin-button,\r\ninput[type='number']::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\ninput[type='number'] {\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\n.password-toggle-btn {\r\n position: absolute;\r\n right: 12px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n padding: 4px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: inherit;\r\n opacity: 0.6;\r\n transition: opacity 0.2s;\r\n}\r\n\r\n.password-toggle-btn:focus {\r\n outline: none;\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
@@ -23,6 +23,10 @@ export interface InputProps {
23
23
  label?: string;
24
24
  selectedValue?: Signal<string>;
25
25
  autocomplete?: AutoFill;
26
+ iconPasswordShow?: JSXOutput | Component<unknown>;
27
+ iconPasswordHide?: JSXOutput | Component<unknown>;
28
+ labelShowPassword?: string;
29
+ labelHidePassword?: string;
26
30
  }
27
31
  export declare const displayLocalImage: QRL<(file: File, imageUrl?: Signal<string>) => void>;
28
32
  export declare const uploadImage: QRL<(_event: Event, input: HTMLInputElement, currentFile?: Signal<any>, selectedFile?: Signal<string>, imageUrl?: Signal<string>) => Promise<void>>;
@@ -9,3 +9,4 @@ export declare const InputWithIcon: Story;
9
9
  export declare const PhoneInput: Story;
10
10
  export declare const FileUpload: Story;
11
11
  export declare const InputNumber: Story;
12
+ export declare const PasswordWithToggle: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "1.5.9",
3
+ "version": "1.6.0",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",