@nr1e/qwik-ui 0.0.18 → 0.0.20
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/select-field.qwik.cjs +8 -1
- package/lib/components/select-field.qwik.mjs +8 -1
- package/lib/components/text-field.qwik.cjs +8 -2
- package/lib/components/text-field.qwik.mjs +8 -2
- package/lib-types/components/select-field.d.ts +2 -0
- package/lib-types/components/text-field.d.ts +1 -0
- package/package.json +5 -5
|
@@ -25,7 +25,14 @@ const SelectField = qwik.component$((props) => {
|
|
|
25
25
|
id: props.id
|
|
26
26
|
},
|
|
27
27
|
class: `select ${error.value ? "select-error" : ""}`,
|
|
28
|
-
onChange$: (e) =>
|
|
28
|
+
onChange$: (e) => {
|
|
29
|
+
if (props.onChange$) props.onChange$(e, e.target.value, error);
|
|
30
|
+
if (props.onEvent$) props.onEvent$("change", e, e.target.value, error);
|
|
31
|
+
},
|
|
32
|
+
onBlur$: (e) => {
|
|
33
|
+
if (props.onBlur$) props.onBlur$(e, e.target.value, error);
|
|
34
|
+
if (props.onEvent$) props.onEvent$("blur", e, e.target.value, error);
|
|
35
|
+
},
|
|
29
36
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
30
37
|
}),
|
|
31
38
|
error.value && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -23,7 +23,14 @@ const SelectField = component$((props) => {
|
|
|
23
23
|
id: props.id
|
|
24
24
|
},
|
|
25
25
|
class: `select ${error.value ? "select-error" : ""}`,
|
|
26
|
-
onChange$: (e) =>
|
|
26
|
+
onChange$: (e) => {
|
|
27
|
+
if (props.onChange$) props.onChange$(e, e.target.value, error);
|
|
28
|
+
if (props.onEvent$) props.onEvent$("change", e, e.target.value, error);
|
|
29
|
+
},
|
|
30
|
+
onBlur$: (e) => {
|
|
31
|
+
if (props.onBlur$) props.onBlur$(e, e.target.value, error);
|
|
32
|
+
if (props.onEvent$) props.onEvent$("blur", e, e.target.value, error);
|
|
33
|
+
},
|
|
27
34
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
28
35
|
}),
|
|
29
36
|
error.value && /* @__PURE__ */ jsx("div", {
|
|
@@ -36,8 +36,14 @@ const TextField = qwik.component$((props) => {
|
|
|
36
36
|
},
|
|
37
37
|
class: "placeholder:opacity-50",
|
|
38
38
|
placeholder: props.placeholder,
|
|
39
|
-
onBlur$: (e) =>
|
|
40
|
-
|
|
39
|
+
onBlur$: (e) => {
|
|
40
|
+
if (props.onBlur$) props.onBlur$(e, e.target.value, error);
|
|
41
|
+
if (props.onEvent$) props.onEvent$("blur", e, e.target.value, error);
|
|
42
|
+
},
|
|
43
|
+
onInput$: (e) => {
|
|
44
|
+
if (props.onInput$) props.onInput$(e, e.target.value, error);
|
|
45
|
+
if (props.onEvent$) props.onEvent$("input", e, e.target.value, error);
|
|
46
|
+
}
|
|
41
47
|
}),
|
|
42
48
|
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
43
49
|
name: "right"
|
|
@@ -34,8 +34,14 @@ const TextField = component$((props) => {
|
|
|
34
34
|
},
|
|
35
35
|
class: "placeholder:opacity-50",
|
|
36
36
|
placeholder: props.placeholder,
|
|
37
|
-
onBlur$: (e) =>
|
|
38
|
-
|
|
37
|
+
onBlur$: (e) => {
|
|
38
|
+
if (props.onBlur$) props.onBlur$(e, e.target.value, error);
|
|
39
|
+
if (props.onEvent$) props.onEvent$("blur", e, e.target.value, error);
|
|
40
|
+
},
|
|
41
|
+
onInput$: (e) => {
|
|
42
|
+
if (props.onInput$) props.onInput$(e, e.target.value, error);
|
|
43
|
+
if (props.onEvent$) props.onEvent$("input", e, e.target.value, error);
|
|
44
|
+
}
|
|
39
45
|
}),
|
|
40
46
|
/* @__PURE__ */ jsx(Slot, {
|
|
41
47
|
name: "right"
|
|
@@ -5,5 +5,7 @@ export interface SelectFieldProps {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
error?: string;
|
|
7
7
|
onChange$?: QRL<(event: Event, value: string, error: Signal<string | undefined>) => void>;
|
|
8
|
+
onBlur$?: QRL<(event: FocusEvent, value: string, error: Signal<string | undefined>) => void>;
|
|
9
|
+
onEvent$?: QRL<(type: 'blur' | 'change', event: Event, value: string, error: Signal<string | undefined>) => void>;
|
|
8
10
|
}
|
|
9
11
|
export declare const SelectField: import("@builder.io/qwik").Component<SelectFieldProps>;
|
|
@@ -9,5 +9,6 @@ export interface TextFieldProps {
|
|
|
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>;
|
|
12
|
+
onEvent$?: QRL<(type: 'blur' | 'input', event: FocusEvent | InputEvent, value: string, error: Signal<string | undefined>) => void>;
|
|
12
13
|
}
|
|
13
14
|
export declare const TextField: import("@builder.io/qwik").Component<TextFieldProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/qwik-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "NR1E Qwik UI Library",
|
|
5
5
|
"author": "NR1E, Inc.",
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@eslint/js": "latest",
|
|
39
39
|
"@nr1e/qwik-icons": "",
|
|
40
40
|
"@tailwindcss/vite": "^4.1.17",
|
|
41
|
-
"@types/node": "^
|
|
41
|
+
"@types/node": "^25.0.10",
|
|
42
42
|
"daisyui": "^5.5.14",
|
|
43
|
-
"eslint": "9.
|
|
43
|
+
"eslint": "9.39.2",
|
|
44
44
|
"eslint-plugin-qwik": "1.18.0",
|
|
45
|
-
"globals": "
|
|
45
|
+
"globals": "17.0.0",
|
|
46
46
|
"np": "^8.0.4",
|
|
47
|
-
"prettier": "3.
|
|
47
|
+
"prettier": "3.8.1",
|
|
48
48
|
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
49
49
|
"tailwindcss": "^4.1.17",
|
|
50
50
|
"typescript": "5.4.5",
|