@nr1e/qwik-ui 2.0.1 → 2.0.3

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.
@@ -106,9 +106,7 @@ const TextField = qwik.component$((props) => {
106
106
  if (props.onEvent$) {
107
107
  props.onEvent$("blur", e, target.value, error);
108
108
  }
109
- if (props.value && typeof props.value !== "string") {
110
- value.value = target.value;
111
- }
109
+ value.value = target.value;
112
110
  if (props.validate$) {
113
111
  error.value = await props.validate$(target.value);
114
112
  }
@@ -121,11 +119,9 @@ const TextField = qwik.component$((props) => {
121
119
  if (props.onEvent$) {
122
120
  props.onEvent$("input", e, target.value, error);
123
121
  }
124
- if (props.value && typeof props.value !== "string") {
125
- value.value = target.value;
126
- }
122
+ value.value = target.value;
127
123
  if (props.validate$) {
128
- error.value = await props.validate$(target.value);
124
+ error.value = await props.validate$(value.value);
129
125
  }
130
126
  if (props.schema$) {
131
127
  const schema = await props.schema$();
@@ -133,6 +129,7 @@ const TextField = qwik.component$((props) => {
133
129
  if (result.success) {
134
130
  error.value = void 0;
135
131
  } else if (result.issues.length > 0) {
132
+ console.log("Eat me", value.value);
136
133
  error.value = result.issues[0].message;
137
134
  } else {
138
135
  error.value = "Invalid value";
@@ -104,9 +104,7 @@ const TextField = component$((props) => {
104
104
  if (props.onEvent$) {
105
105
  props.onEvent$("blur", e, target.value, error);
106
106
  }
107
- if (props.value && typeof props.value !== "string") {
108
- value.value = target.value;
109
- }
107
+ value.value = target.value;
110
108
  if (props.validate$) {
111
109
  error.value = await props.validate$(target.value);
112
110
  }
@@ -119,11 +117,9 @@ const TextField = component$((props) => {
119
117
  if (props.onEvent$) {
120
118
  props.onEvent$("input", e, target.value, error);
121
119
  }
122
- if (props.value && typeof props.value !== "string") {
123
- value.value = target.value;
124
- }
120
+ value.value = target.value;
125
121
  if (props.validate$) {
126
- error.value = await props.validate$(target.value);
122
+ error.value = await props.validate$(value.value);
127
123
  }
128
124
  if (props.schema$) {
129
125
  const schema = await props.schema$();
@@ -131,6 +127,7 @@ const TextField = component$((props) => {
131
127
  if (result.success) {
132
128
  error.value = void 0;
133
129
  } else if (result.issues.length > 0) {
130
+ console.log("Eat me", value.value);
134
131
  error.value = result.issues[0].message;
135
132
  } else {
136
133
  error.value = "Invalid value";
@@ -14,6 +14,6 @@ export interface TextFieldProps {
14
14
  onInput$?: QRL<(event: InputEvent, value: string, error: Signal<string | undefined>) => void>;
15
15
  onEvent$?: QRL<(type: 'blur' | 'input', event: FocusEvent | InputEvent, value: string, error: Signal<string | undefined>) => void>;
16
16
  validate$?: QRL<(value: string) => string | undefined>;
17
- schema$?: QRL<() => v.AnySchema>;
17
+ schema$?: QRL<() => v.BaseSchema<any, any, any>>;
18
18
  }
19
19
  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": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "NR1E Qwik UI Library",
5
5
  "author": "NR1E, Inc.",
6
6
  "publishConfig": {