@greghowe79/the-lib 1.0.2 → 1.0.4
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.
|
@@ -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 }) => {
|
|
29
|
+
const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, name }) => {
|
|
30
30
|
qwik.useStylesScoped$(styles);
|
|
31
31
|
const internalError = qwik.useSignal(null);
|
|
32
32
|
const showError = error ?? internalError;
|
|
@@ -113,6 +113,17 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
|
|
|
113
113
|
})
|
|
114
114
|
]
|
|
115
115
|
})
|
|
116
|
+
}) : type === "radio" ? /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
117
|
+
id,
|
|
118
|
+
type: "radio",
|
|
119
|
+
name,
|
|
120
|
+
value: placeholder,
|
|
121
|
+
checked: value ? value.value === placeholder : false,
|
|
122
|
+
required,
|
|
123
|
+
onChange$: (event) => {
|
|
124
|
+
if (value) value.value = event.target.value;
|
|
125
|
+
if (onInput$) onInput$();
|
|
126
|
+
}
|
|
116
127
|
}) : /* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
117
128
|
class: `input-label ${bgLight ? "bg_light" : ""}`,
|
|
118
129
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -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 }) => {
|
|
27
|
+
const Input = component$(({ id, type, placeholder, value, error, onValidate$, onInput$, bgLight, currentFile, selectedFile, icon, prefix, required = false, name }) => {
|
|
28
28
|
useStylesScoped$(styles);
|
|
29
29
|
const internalError = useSignal(null);
|
|
30
30
|
const showError = error ?? internalError;
|
|
@@ -111,6 +111,17 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
|
|
|
111
111
|
})
|
|
112
112
|
]
|
|
113
113
|
})
|
|
114
|
+
}) : type === "radio" ? /* @__PURE__ */ jsx("input", {
|
|
115
|
+
id,
|
|
116
|
+
type: "radio",
|
|
117
|
+
name,
|
|
118
|
+
value: placeholder,
|
|
119
|
+
checked: value ? value.value === placeholder : false,
|
|
120
|
+
required,
|
|
121
|
+
onChange$: (event) => {
|
|
122
|
+
if (value) value.value = event.target.value;
|
|
123
|
+
if (onInput$) onInput$();
|
|
124
|
+
}
|
|
114
125
|
}) : /* @__PURE__ */ jsx("label", {
|
|
115
126
|
class: `input-label ${bgLight ? "bg_light" : ""}`,
|
|
116
127
|
children: /* @__PURE__ */ jsxs("div", {
|