soda-heroui 0.8.3 → 0.8.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.
|
@@ -32,13 +32,15 @@ const ErrorMessage_cjs_namespaceObject = require("../components/ErrorMessage.cjs
|
|
|
32
32
|
function getFieldProps(field, noErrorMessage) {
|
|
33
33
|
return noErrorMessage ? {
|
|
34
34
|
onBlur: field.handleBlur,
|
|
35
|
-
isInvalid: (0, external_soda_tanstack_form_namespaceObject.isFieldInvalid)(field)
|
|
35
|
+
isInvalid: (0, external_soda_tanstack_form_namespaceObject.isFieldInvalid)(field),
|
|
36
|
+
name: field.name
|
|
36
37
|
} : {
|
|
37
38
|
onBlur: field.handleBlur,
|
|
38
39
|
errorMessage: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ErrorMessage_cjs_namespaceObject.ErrorMessage, {
|
|
39
40
|
data: field.state.meta.errors
|
|
40
41
|
}),
|
|
41
|
-
isInvalid: (0, external_soda_tanstack_form_namespaceObject.isFieldInvalid)(field)
|
|
42
|
+
isInvalid: (0, external_soda_tanstack_form_namespaceObject.isFieldInvalid)(field),
|
|
43
|
+
name: field.name
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
46
|
exports.getFieldProps = __webpack_exports__.getFieldProps;
|
|
@@ -4,13 +4,15 @@ import * as __WEBPACK_EXTERNAL_MODULE__components_ErrorMessage_js_8cec684c__ fro
|
|
|
4
4
|
function getFieldProps(field, noErrorMessage) {
|
|
5
5
|
return noErrorMessage ? {
|
|
6
6
|
onBlur: field.handleBlur,
|
|
7
|
-
isInvalid: (0, __WEBPACK_EXTERNAL_MODULE_soda_tanstack_form_406de417__.isFieldInvalid)(field)
|
|
7
|
+
isInvalid: (0, __WEBPACK_EXTERNAL_MODULE_soda_tanstack_form_406de417__.isFieldInvalid)(field),
|
|
8
|
+
name: field.name
|
|
8
9
|
} : {
|
|
9
10
|
onBlur: field.handleBlur,
|
|
10
11
|
errorMessage: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__components_ErrorMessage_js_8cec684c__.ErrorMessage, {
|
|
11
12
|
data: field.state.meta.errors
|
|
12
13
|
}),
|
|
13
|
-
isInvalid: (0, __WEBPACK_EXTERNAL_MODULE_soda_tanstack_form_406de417__.isFieldInvalid)(field)
|
|
14
|
+
isInvalid: (0, __WEBPACK_EXTERNAL_MODULE_soda_tanstack_form_406de417__.isFieldInvalid)(field),
|
|
15
|
+
name: field.name
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
export { getFieldProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soda-heroui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@internationalized/date": "^3.7.0",
|
|
39
39
|
"@tanstack/react-form": "^1.3.0",
|
|
40
40
|
"deepsea-tools": "5.38.0",
|
|
41
|
-
"soda-tanstack-form": "0.2.1",
|
|
42
41
|
"soda-hooks": "6.10.12",
|
|
43
|
-
"soda-type": "6.3.0"
|
|
42
|
+
"soda-type": "6.3.0",
|
|
43
|
+
"soda-tanstack-form": "0.2.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
@@ -5,6 +5,7 @@ import { ErrorMessage } from "@/components/ErrorMessage"
|
|
|
5
5
|
|
|
6
6
|
export interface FieldProps {
|
|
7
7
|
onBlur: () => void
|
|
8
|
+
name: string
|
|
8
9
|
errorMessage: JSX.Element
|
|
9
10
|
isInvalid: boolean
|
|
10
11
|
}
|
|
@@ -17,11 +18,13 @@ export function getFieldProps<T extends boolean = false>(field: Field<any>, noEr
|
|
|
17
18
|
? {
|
|
18
19
|
onBlur: field.handleBlur,
|
|
19
20
|
isInvalid: isFieldInvalid(field),
|
|
21
|
+
name: field.name,
|
|
20
22
|
}
|
|
21
23
|
: {
|
|
22
24
|
onBlur: field.handleBlur,
|
|
23
25
|
errorMessage: <ErrorMessage data={field.state.meta.errors} />,
|
|
24
26
|
isInvalid: isFieldInvalid(field),
|
|
27
|
+
name: field.name,
|
|
25
28
|
}
|
|
26
29
|
) as T extends true ? FieldPropsWithoutErrorMessage : FieldProps
|
|
27
30
|
}
|