@nr1e/qwik-ui 0.0.20 → 0.0.22
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.
- package/lib/components/checkbox-field.qwik.cjs +17 -1
- package/lib/components/checkbox-field.qwik.mjs +18 -2
- package/lib/components/select-field.qwik.cjs +17 -1
- package/lib/components/select-field.qwik.mjs +18 -2
- package/lib/components/text-field.qwik.cjs +17 -1
- package/lib/components/text-field.qwik.mjs +18 -2
- package/lib-types/components/checkbox-field.d.ts +1 -1
- package/lib-types/components/select-field.d.ts +1 -1
- package/lib-types/components/text-field.d.ts +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,23 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const CheckboxField = qwik.component$((props) => {
|
|
6
|
-
const error = qwik.useSignal(props.error);
|
|
6
|
+
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
|
+
qwik.useTask$(({ track }) => {
|
|
8
|
+
track(() => error.value);
|
|
9
|
+
if (props.error && typeof props.error !== "string") {
|
|
10
|
+
if (error.value !== props.error?.value) {
|
|
11
|
+
props.error.value = error.value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
qwik.useTask$(({ track }) => {
|
|
16
|
+
track(() => props.error.value);
|
|
17
|
+
if (props.error && typeof props.error !== "string") {
|
|
18
|
+
if (props.error && error.value !== props.error.value) {
|
|
19
|
+
error.value = props.error.value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
7
23
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8
24
|
class: "fieldset",
|
|
9
25
|
children: [
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import { component$, useSignal } from "@builder.io/qwik";
|
|
2
|
+
import { component$, useSignal, useTask$ } from "@builder.io/qwik";
|
|
3
3
|
const CheckboxField = component$((props) => {
|
|
4
|
-
const error = useSignal(props.error);
|
|
4
|
+
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
|
+
useTask$(({ track }) => {
|
|
6
|
+
track(() => error.value);
|
|
7
|
+
if (props.error && typeof props.error !== "string") {
|
|
8
|
+
if (error.value !== props.error?.value) {
|
|
9
|
+
props.error.value = error.value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
useTask$(({ track }) => {
|
|
14
|
+
track(() => props.error.value);
|
|
15
|
+
if (props.error && typeof props.error !== "string") {
|
|
16
|
+
if (props.error && error.value !== props.error.value) {
|
|
17
|
+
error.value = props.error.value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
5
21
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
22
|
class: "fieldset",
|
|
7
23
|
children: [
|
|
@@ -3,7 +3,23 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const SelectField = qwik.component$((props) => {
|
|
6
|
-
const error = qwik.useSignal(props.error);
|
|
6
|
+
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
|
+
qwik.useTask$(({ track }) => {
|
|
8
|
+
track(() => error.value);
|
|
9
|
+
if (props.error && typeof props.error !== "string") {
|
|
10
|
+
if (error.value !== props.error?.value) {
|
|
11
|
+
props.error.value = error.value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
qwik.useTask$(({ track }) => {
|
|
16
|
+
track(() => props.error.value);
|
|
17
|
+
if (props.error && typeof props.error !== "string") {
|
|
18
|
+
if (props.error && error.value !== props.error.value) {
|
|
19
|
+
error.value = props.error.value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
7
23
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8
24
|
class: "fieldset",
|
|
9
25
|
children: [
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import { component$, useSignal, Slot } from "@builder.io/qwik";
|
|
2
|
+
import { component$, useSignal, useTask$, Slot } from "@builder.io/qwik";
|
|
3
3
|
const SelectField = component$((props) => {
|
|
4
|
-
const error = useSignal(props.error);
|
|
4
|
+
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
|
+
useTask$(({ track }) => {
|
|
6
|
+
track(() => error.value);
|
|
7
|
+
if (props.error && typeof props.error !== "string") {
|
|
8
|
+
if (error.value !== props.error?.value) {
|
|
9
|
+
props.error.value = error.value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
useTask$(({ track }) => {
|
|
14
|
+
track(() => props.error.value);
|
|
15
|
+
if (props.error && typeof props.error !== "string") {
|
|
16
|
+
if (props.error && error.value !== props.error.value) {
|
|
17
|
+
error.value = props.error.value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
5
21
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
22
|
class: "fieldset",
|
|
7
23
|
children: [
|
|
@@ -3,7 +3,23 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const TextField = qwik.component$((props) => {
|
|
6
|
-
const error = qwik.useSignal(props.error);
|
|
6
|
+
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
|
+
qwik.useTask$(({ track }) => {
|
|
8
|
+
track(() => error.value);
|
|
9
|
+
if (props.error && typeof props.error !== "string") {
|
|
10
|
+
if (error.value !== props.error?.value) {
|
|
11
|
+
props.error.value = error.value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
qwik.useTask$(({ track }) => {
|
|
16
|
+
track(() => props.error.value);
|
|
17
|
+
if (props.error && typeof props.error !== "string") {
|
|
18
|
+
if (props.error && error.value !== props.error.value) {
|
|
19
|
+
error.value = props.error.value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
7
23
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8
24
|
class: "fieldset",
|
|
9
25
|
children: [
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import { component$, useSignal, Slot } from "@builder.io/qwik";
|
|
2
|
+
import { component$, useSignal, useTask$, Slot } from "@builder.io/qwik";
|
|
3
3
|
const TextField = component$((props) => {
|
|
4
|
-
const error = useSignal(props.error);
|
|
4
|
+
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
|
+
useTask$(({ track }) => {
|
|
6
|
+
track(() => error.value);
|
|
7
|
+
if (props.error && typeof props.error !== "string") {
|
|
8
|
+
if (error.value !== props.error?.value) {
|
|
9
|
+
props.error.value = error.value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
useTask$(({ track }) => {
|
|
14
|
+
track(() => props.error.value);
|
|
15
|
+
if (props.error && typeof props.error !== "string") {
|
|
16
|
+
if (props.error && error.value !== props.error.value) {
|
|
17
|
+
error.value = props.error.value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
5
21
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
22
|
class: "fieldset",
|
|
7
23
|
children: [
|
|
@@ -4,7 +4,7 @@ export interface CheckboxFieldProps {
|
|
|
4
4
|
label: string;
|
|
5
5
|
name?: string;
|
|
6
6
|
checked?: boolean;
|
|
7
|
-
error?: string
|
|
7
|
+
error?: string | Signal<string | undefined>;
|
|
8
8
|
onClick$?: QRL<(event: Event, checked: boolean, error: Signal<string | undefined>) => void>;
|
|
9
9
|
}
|
|
10
10
|
export declare const CheckboxField: import("@builder.io/qwik").Component<CheckboxFieldProps>;
|
|
@@ -3,7 +3,7 @@ export interface SelectFieldProps {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
label: string;
|
|
5
5
|
name?: string;
|
|
6
|
-
error?: string
|
|
6
|
+
error?: string | Signal<string | undefined>;
|
|
7
7
|
onChange$?: QRL<(event: Event, value: string, error: Signal<string | undefined>) => void>;
|
|
8
8
|
onBlur$?: QRL<(event: FocusEvent, value: string, error: Signal<string | undefined>) => void>;
|
|
9
9
|
onEvent$?: QRL<(type: 'blur' | 'change', event: Event, value: string, error: Signal<string | undefined>) => void>;
|
|
@@ -5,7 +5,7 @@ export interface TextFieldProps {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
value?: string | null;
|
|
7
7
|
placeholder?: string;
|
|
8
|
-
error?: string
|
|
8
|
+
error?: string | Signal<string | undefined>;
|
|
9
9
|
maxLength?: number;
|
|
10
10
|
onBlur$?: QRL<(event: FocusEvent, value: string, error: Signal<string | undefined>) => void>;
|
|
11
11
|
onInput$?: QRL<(event: InputEvent, value: string, error: Signal<string | undefined>) => void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/qwik-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "NR1E Qwik UI Library",
|
|
5
5
|
"author": "NR1E, Inc.",
|
|
6
6
|
"publishConfig": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"typescript-eslint": "8.38.0",
|
|
52
52
|
"undici": "*",
|
|
53
53
|
"vite": "7.2.6",
|
|
54
|
-
"vite-tsconfig-paths": "^
|
|
54
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
55
55
|
"vitest": "4.0.6"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|