@paragrav/rhf-utils 0.0.84 → 0.0.86
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/dist/esm/exports.mjs +54 -50
- package/dist/esm/form/Form.mjs +83 -0
- package/dist/esm/form/FormWithProviders.mjs +2 -2
- package/dist/esm/form/_Controller.mjs +9 -0
- package/dist/esm/form/useForm.mjs +16 -17
- package/dist/types/client/config.d.ts +2 -2
- package/dist/types/client/index.d.ts +1 -1
- package/dist/types/exports.d.ts +2 -0
- package/dist/types/form/Form.d.ts +11 -0
- package/dist/types/form/FormProviders.d.ts +12 -0
- package/dist/types/form/_Controller.d.ts +6 -0
- package/dist/types/form/useForm.d.ts +14 -27
- package/package.json +7 -259
- package/dist/esm/form/_Form.mjs +0 -81
- /package/dist/esm/form/{_FormProviders.mjs → FormProviders.mjs} +0 -0
package/dist/esm/exports.mjs
CHANGED
|
@@ -8,77 +8,81 @@ import { default as i } from "./errors/flat/FlatFieldErrorsList.mjs";
|
|
|
8
8
|
import { default as E } from "./errors/message/FormErrorMessage.mjs";
|
|
9
9
|
import { default as h } from "./errors/message/FormErrorMessageByPath.mjs";
|
|
10
10
|
import { default as S } from "./errors/nonfield/FormNonFieldErrorMarker.mjs";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
11
|
+
import { default as P } from "./errors/nonfield/FormNonFieldErrorMarkerHtmlAttribute.mjs";
|
|
12
|
+
import { default as M } from "./errors/orphan/useFormHasOnlyOrphanFieldErrorsMemo.mjs";
|
|
13
13
|
import { default as R } from "./errors/orphan/useOrphanFormErrorsMemo.mjs";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
14
|
+
import { default as v } from "./errors/orphan/useOrphanFormErrorsToConsole.mjs";
|
|
15
|
+
import { default as T } from "./errors/root/RootErrorsListFromFlatFieldErrorsContext.mjs";
|
|
16
|
+
import { default as k } from "./errors/root/useRootFormFieldErrorsMemo.mjs";
|
|
17
17
|
import { default as A } from "./errors/useFormErrorConsoleDebug.mjs";
|
|
18
18
|
import { default as D } from "./errors/useFormErrorsEffect.mjs";
|
|
19
19
|
import { default as Z } from "./errors/useFormErrorsIfAny.mjs";
|
|
20
20
|
import { default as N } from "./errors/useFormErrorsTransformMemo.mjs";
|
|
21
21
|
import { default as z } from "./errors/useFormRequestSubmit.mjs";
|
|
22
|
-
import { default as j } from "./form/
|
|
23
|
-
import { default as J } from "./form/
|
|
24
|
-
import { default as Q } from "./form/
|
|
25
|
-
import { default as X } from "./form/
|
|
26
|
-
import { default as _ } from "./form/context/
|
|
27
|
-
import { default as rr } from "./form/context/
|
|
28
|
-
import { default as er } from "./form/context/group/
|
|
29
|
-
import { default as sr } from "./form/context/group/
|
|
30
|
-
import { default as ur } from "./form/context/group/
|
|
31
|
-
import { default as mr } from "./form/context/group/
|
|
32
|
-
import { default as dr } from "./form/context/group/
|
|
33
|
-
import { default as xr } from "./form/context/group/
|
|
34
|
-
import { default as ir } from "./form/context/group/
|
|
35
|
-
import { default as Er } from "./form/
|
|
36
|
-
import {
|
|
37
|
-
import { default as Sr } from "./
|
|
38
|
-
import {
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as Rr } from "./submit/
|
|
41
|
-
import { default as
|
|
22
|
+
import { default as j } from "./form/Form.mjs";
|
|
23
|
+
import { default as J } from "./form/FormProviders.mjs";
|
|
24
|
+
import { default as Q } from "./form/FormWithProviders.mjs";
|
|
25
|
+
import { default as X } from "./form/useForm.mjs";
|
|
26
|
+
import { default as _ } from "./form/context/utils/FormUtilsContextProvider.mjs";
|
|
27
|
+
import { default as rr } from "./form/context/utils/useFormUtilsContext.mjs";
|
|
28
|
+
import { default as er } from "./form/context/group/FormGroupContextProvider.mjs";
|
|
29
|
+
import { default as sr } from "./form/context/group/useFormGroupChildIsMountedTracker.mjs";
|
|
30
|
+
import { default as ur } from "./form/context/group/useFormGroupChildIsSubmittingTracker.mjs";
|
|
31
|
+
import { default as mr } from "./form/context/group/useFormGroupChildTracker.mjs";
|
|
32
|
+
import { default as dr } from "./form/context/group/useFormGroupIsAnyBusy.mjs";
|
|
33
|
+
import { default as xr } from "./form/context/group/useFormGroupIsChildBusy.mjs";
|
|
34
|
+
import { default as ir } from "./form/context/group/useFormGroupIsParentBusy.mjs";
|
|
35
|
+
import { default as Er } from "./form/context/group/useFormGroupParentTracker.mjs";
|
|
36
|
+
import { default as hr } from "./form/context/group/useFormOrParentIsBusy.mjs";
|
|
37
|
+
import { default as Sr } from "./form/utils/getSubmitterButtonData.mjs";
|
|
38
|
+
import { FormSubmitError as Pr } from "./submit/error/FormSubmitError.mjs";
|
|
39
|
+
import { default as Mr } from "./submit/useFormOnSubmitSuccessful.mjs";
|
|
40
|
+
import { default as Rr } from "./submit/useFormOnSubmitSuccessfulAndReset.mjs";
|
|
41
|
+
import { default as vr } from "./submit/useResetFormOnSubmitError.mjs";
|
|
42
|
+
import { default as Tr } from "./submit/useResetFormOnSubmitSuccessful.mjs";
|
|
43
|
+
import { default as kr } from "./submit/useSubmitFormOnChange.mjs";
|
|
42
44
|
export {
|
|
43
45
|
d as FlatFieldErrorsContextProvider,
|
|
44
46
|
i as FlatFieldErrorsList,
|
|
47
|
+
j as Form,
|
|
45
48
|
E as FormErrorMessage,
|
|
46
49
|
h as FormErrorMessageByPath,
|
|
47
|
-
|
|
50
|
+
er as FormGroupContextProvider,
|
|
48
51
|
S as FormNonFieldErrorMarker,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
P as FormNonFieldErrorMarkerHtmlAttribute,
|
|
53
|
+
J as FormProviders,
|
|
54
|
+
Pr as FormSubmitError,
|
|
55
|
+
_ as FormUtilsContextProvider,
|
|
56
|
+
Q as FormWithProviders,
|
|
53
57
|
m as LazyDevTool,
|
|
54
58
|
e as RhfUtilsClientForZodContextProvider,
|
|
55
|
-
|
|
59
|
+
T as RootErrorsListFromFlatFieldErrorsContext,
|
|
56
60
|
u as createRhfUtilsClientForZod,
|
|
57
|
-
|
|
61
|
+
Sr as getSubmitterButtonData,
|
|
58
62
|
x as useFlatFieldErrorsContext,
|
|
59
|
-
|
|
63
|
+
X as useForm,
|
|
60
64
|
A as useFormErrorConsoleDebug,
|
|
61
65
|
D as useFormErrorsEffect,
|
|
62
66
|
Z as useFormErrorsIfAny,
|
|
63
67
|
N as useFormErrorsTransformMemo,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
sr as useFormGroupChildIsMountedTracker,
|
|
69
|
+
ur as useFormGroupChildIsSubmittingTracker,
|
|
70
|
+
mr as useFormGroupChildTracker,
|
|
71
|
+
dr as useFormGroupIsAnyBusy,
|
|
72
|
+
xr as useFormGroupIsChildBusy,
|
|
73
|
+
ir as useFormGroupIsParentBusy,
|
|
74
|
+
Er as useFormGroupParentTracker,
|
|
75
|
+
M as useFormHasOnlyOrphanFieldErrorsMemo,
|
|
76
|
+
Mr as useFormOnSubmitSuccessful,
|
|
77
|
+
Rr as useFormOnSubmitSuccessfulAndReset,
|
|
78
|
+
hr as useFormOrParentIsBusy,
|
|
75
79
|
z as useFormRequestSubmit,
|
|
76
|
-
|
|
80
|
+
rr as useFormUtilsContext,
|
|
77
81
|
R as useOrphanFormErrorsMemo,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
v as useOrphanFormErrorsToConsole,
|
|
83
|
+
Tr as useResetFormAfterSubmitSuccessful,
|
|
84
|
+
vr as useResetFormOnSubmitError,
|
|
81
85
|
s as useRhfUtilsClientForZodContext,
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
k as useRootFormFieldErrorsMemo,
|
|
87
|
+
kr as useSubmitFormOnChange
|
|
84
88
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as S, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { useFormContext as T } from "react-hook-form";
|
|
4
|
+
import v from "../devtool/LazyDevTool.mjs";
|
|
5
|
+
import { FormSubmitError as E } from "../submit/error/FormSubmitError.mjs";
|
|
6
|
+
import V from "../submit/error/setCtxErrorsByFormSubmitError.mjs";
|
|
7
|
+
import w from "./_Controller.mjs";
|
|
8
|
+
import z from "./_FormBase.mjs";
|
|
9
|
+
function I({
|
|
10
|
+
formId: B,
|
|
11
|
+
formRef: u,
|
|
12
|
+
//
|
|
13
|
+
onSubmit: s,
|
|
14
|
+
onSubmitError: h,
|
|
15
|
+
onSubmitInvalid: F,
|
|
16
|
+
Fields: x,
|
|
17
|
+
//
|
|
18
|
+
form: d,
|
|
19
|
+
options: r,
|
|
20
|
+
config: a,
|
|
21
|
+
//
|
|
22
|
+
children: _
|
|
23
|
+
}) {
|
|
24
|
+
const l = T(), j = async (t) => {
|
|
25
|
+
r != null && r.stopSubmitPropagation && t.stopPropagation();
|
|
26
|
+
try {
|
|
27
|
+
await l.handleSubmit(N, F)(t);
|
|
28
|
+
} catch (e) {
|
|
29
|
+
P(e, t);
|
|
30
|
+
}
|
|
31
|
+
}, N = (t, e) => s == null ? void 0 : s(
|
|
32
|
+
t,
|
|
33
|
+
l,
|
|
34
|
+
e
|
|
35
|
+
), P = (t, e) => {
|
|
36
|
+
var b;
|
|
37
|
+
const m = t instanceof E ? (
|
|
38
|
+
// consumer can manually throw FormSubmitError (e.g., manual validation)
|
|
39
|
+
t
|
|
40
|
+
) : (
|
|
41
|
+
// if error is not FormSubmitError, consumer can provide global handler
|
|
42
|
+
(b = a == null ? void 0 : a.onSubmitError) == null ? void 0 : b.call(a, t)
|
|
43
|
+
);
|
|
44
|
+
m && V(l, m), h == null || h(
|
|
45
|
+
t,
|
|
46
|
+
l,
|
|
47
|
+
e
|
|
48
|
+
);
|
|
49
|
+
}, c = {
|
|
50
|
+
formId: B,
|
|
51
|
+
formRef: u,
|
|
52
|
+
ctx: l,
|
|
53
|
+
options: r,
|
|
54
|
+
Controller: w
|
|
55
|
+
}, y = (t) => {
|
|
56
|
+
var m;
|
|
57
|
+
const e = (m = a == null ? void 0 : a.Children) == null ? void 0 : m[t];
|
|
58
|
+
return e && /* @__PURE__ */ C(e, { ...c });
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ S(
|
|
61
|
+
z,
|
|
62
|
+
{
|
|
63
|
+
noValidate: !0,
|
|
64
|
+
style: {
|
|
65
|
+
position: "relative"
|
|
66
|
+
},
|
|
67
|
+
...d,
|
|
68
|
+
className: [r == null ? void 0 : r.classNames, d == null ? void 0 : d.className].filter(Boolean).join(" "),
|
|
69
|
+
onSubmit: j,
|
|
70
|
+
formRef: u,
|
|
71
|
+
children: [
|
|
72
|
+
y("top"),
|
|
73
|
+
(r == null ? void 0 : r.devTool) !== "disabled" && /* @__PURE__ */ C(v, { placement: "top-right", ...r == null ? void 0 : r.devTool }),
|
|
74
|
+
x && /* @__PURE__ */ C(x, { ...c }),
|
|
75
|
+
_,
|
|
76
|
+
y("bottom")
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
I as default
|
|
83
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useForm as
|
|
3
|
-
import { FormSubmitError as
|
|
4
|
-
const
|
|
5
|
-
onSubmit:
|
|
6
|
-
onSubmitError:
|
|
1
|
+
import m from "react";
|
|
2
|
+
import { useForm as F } from "react-hook-form";
|
|
3
|
+
import { FormSubmitError as a } from "../submit/error/FormSubmitError.mjs";
|
|
4
|
+
const I = ({
|
|
5
|
+
onSubmit: t,
|
|
6
|
+
onSubmitError: e,
|
|
7
7
|
onSubmitInvalid: f,
|
|
8
|
-
defaultValues:
|
|
9
|
-
Fields:
|
|
8
|
+
defaultValues: p,
|
|
9
|
+
Fields: n,
|
|
10
10
|
config: u,
|
|
11
11
|
rhf: c,
|
|
12
12
|
form: i,
|
|
13
13
|
options: d
|
|
14
14
|
}) => {
|
|
15
|
-
const r =
|
|
15
|
+
const r = m.useId(), s = F({
|
|
16
16
|
...c,
|
|
17
|
-
defaultValues:
|
|
18
|
-
}), o =
|
|
17
|
+
defaultValues: p
|
|
18
|
+
}), o = m.useRef(null);
|
|
19
19
|
return {
|
|
20
20
|
id: r,
|
|
21
21
|
ref: o,
|
|
@@ -27,19 +27,18 @@ const E = ({
|
|
|
27
27
|
options: d
|
|
28
28
|
},
|
|
29
29
|
formProps: {
|
|
30
|
-
Fields:
|
|
31
|
-
onSubmit:
|
|
32
|
-
onSubmitError:
|
|
30
|
+
Fields: n,
|
|
31
|
+
onSubmit: t,
|
|
32
|
+
onSubmitError: e,
|
|
33
33
|
onSubmitInvalid: f,
|
|
34
34
|
formId: r,
|
|
35
35
|
formRef: o,
|
|
36
36
|
config: u,
|
|
37
37
|
form: i
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
}
|
|
39
|
+
FormSubmitError: a
|
|
41
40
|
};
|
|
42
41
|
};
|
|
43
42
|
export {
|
|
44
|
-
|
|
43
|
+
I as default
|
|
45
44
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormSubmitError } from '../submit/error/FormSubmitError';
|
|
2
2
|
import { UseFormOptions } from '../form/useFormOptions';
|
|
3
3
|
import { UseFormFieldsProps } from '../form/useForm';
|
|
4
|
-
import {
|
|
4
|
+
import { FormChildrenSlots } from '../form/Form';
|
|
5
5
|
import { UseFormProps } from 'react-hook-form';
|
|
6
6
|
|
|
7
7
|
export type ClientConfig = {
|
|
@@ -29,7 +29,7 @@ export type ClientConfig = {
|
|
|
29
29
|
* top: e.g., block navigation on dirty form.
|
|
30
30
|
* bottom: e.g., root errors list.
|
|
31
31
|
*/
|
|
32
|
-
Children?: Partial<Record<
|
|
32
|
+
Children?: Partial<Record<FormChildrenSlots, React.FC<UseFormFieldsProps>>>;
|
|
33
33
|
/**
|
|
34
34
|
* Handle non-{@link FormSubmitError} errors. Optionally, return {@link FormSubmitError} to merge into context errors.
|
|
35
35
|
*/
|
|
@@ -17,7 +17,7 @@ export type CreateRhfUtilsClient<TObjectSchema extends ObjectSchema<TObjectSchem
|
|
|
17
17
|
NonNullable<UseFormPropsForm['onSubmit']>,
|
|
18
18
|
UseFormPropsForm['onSubmitError'],
|
|
19
19
|
UseFormPropsForm['onSubmitInvalid']
|
|
20
|
-
], defaultValues: UseFormPropsForm['defaultValues'], Fields: UseFormPropsForm['Fields'], props
|
|
20
|
+
], defaultValues: UseFormPropsForm['defaultValues'], Fields: UseFormPropsForm['Fields'], props?: UseFormProps<TSchemaInput, TSchemaOutput>) => UseFormReturn<TSchemaInput, TSchemaOutput>;
|
|
21
21
|
FormWithProviders: <TSchema extends TObjectSchema, TSchemaInput extends SafeFieldValues = TSchema[TObjectSchemaInputKey], TSchemaOutput extends SafeFieldValues = TSchema[TObjectSchemaOutputKey]>(props: {
|
|
22
22
|
schema: TSchema;
|
|
23
23
|
} & FormWithProvidersProps<TSchemaInput, TSchemaOutput>) => JSX.Element;
|
package/dist/types/exports.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export { default as useFormErrorsEffect } from './errors/useFormErrorsEffect';
|
|
|
21
21
|
export { default as useFormErrorsIfAny } from './errors/useFormErrorsIfAny';
|
|
22
22
|
export { default as useFormErrorsTransformMemo } from './errors/useFormErrorsTransformMemo';
|
|
23
23
|
export { default as useFormRequestSubmit } from './errors/useFormRequestSubmit';
|
|
24
|
+
export { default as Form } from './form/Form';
|
|
25
|
+
export { default as FormProviders } from './form/FormProviders';
|
|
24
26
|
export { default as FormWithProviders } from './form/FormWithProviders';
|
|
25
27
|
export type { SafeFieldValues } from './form/SafeFieldValues';
|
|
26
28
|
export type { UseFormFieldsProps } from './form/useForm';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseFormProps } from './useForm';
|
|
2
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export type FormChildrenSlots = 'top' | 'bottom';
|
|
6
|
+
export type FormProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = React.PropsWithChildren<{
|
|
7
|
+
formId: string;
|
|
8
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
9
|
+
} & Pick<UseFormProps<TFieldValues, TTransformedValues>, 'onSubmit' | 'onSubmitError' | 'onSubmitInvalid' | 'Fields' | 'form' | 'options' | 'config'>>;
|
|
10
|
+
declare function _Form<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ formId, formRef, onSubmit, onSubmitError, onSubmitInvalid, Fields, form, options, config, children, }: FormProps<TFieldValues, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default _Form;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseFormOptions } from './useFormOptions';
|
|
2
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
export type FormProvidersProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = React.PropsWithChildren<{
|
|
6
|
+
formId: string;
|
|
7
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
8
|
+
rhfForm: UseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
9
|
+
options?: UseFormOptions;
|
|
10
|
+
}>;
|
|
11
|
+
declare function FormProviders<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ formId, formRef, rhfForm, options, children, }: FormProvidersProps<TFieldValues, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default FormProviders;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
2
|
+
import { ControllerProps, FieldPath } from 'react-hook-form';
|
|
3
|
+
|
|
4
|
+
export type _ControllerProps<TFieldValues extends SafeFieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<ControllerProps<TFieldValues, TName>, 'control'>;
|
|
5
|
+
declare function _Controller<TFieldValues extends SafeFieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: _ControllerProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default _Controller;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { UseFormOptions } from './useFormOptions';
|
|
2
2
|
import { SafeFieldValues } from './SafeFieldValues';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { FormProvidersProps } from './FormProviders';
|
|
4
|
+
import { FormProps } from './Form';
|
|
5
|
+
import { default as _Controller } from './_Controller';
|
|
6
|
+
import { FormSubmitError } from '../submit/error/FormSubmitError';
|
|
5
7
|
import { ClientConfig } from '../client/config';
|
|
6
8
|
import { SubmitErrorHandler, UseFormProps as RhfUseFormProps, UseFormReturn as RhfUseFormReturn } from 'react-hook-form';
|
|
7
9
|
import { default as React } from 'react';
|
|
@@ -11,6 +13,7 @@ export type UseFormFieldsProps<TFieldValues extends SafeFieldValues = SafeFieldV
|
|
|
11
13
|
formRef: React.RefObject<HTMLFormElement>;
|
|
12
14
|
ctx: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
13
15
|
options?: UseFormOptions;
|
|
16
|
+
Controller: typeof _Controller<TFieldValues>;
|
|
14
17
|
};
|
|
15
18
|
export type UseFormProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = {
|
|
16
19
|
onSubmit?: (values: TTransformedValues, context: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>, event: React.BaseSyntheticEvent<SubmitEvent>) => unknown | Promise<unknown>;
|
|
@@ -27,6 +30,14 @@ export type UseFormProps<TFieldValues extends SafeFieldValues, TTransformedValue
|
|
|
27
30
|
form?: React.PropsWithoutRef<JSX.IntrinsicElements['form']>;
|
|
28
31
|
options?: UseFormOptions;
|
|
29
32
|
};
|
|
33
|
+
export type UseFormReturn<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = {
|
|
34
|
+
id: string;
|
|
35
|
+
ref: React.RefObject<HTMLFormElement>;
|
|
36
|
+
context: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
37
|
+
providerProps: FormProvidersProps<TFieldValues, TTransformedValues>;
|
|
38
|
+
formProps: FormProps<TFieldValues, TTransformedValues>;
|
|
39
|
+
FormSubmitError: typeof FormSubmitError<TFieldValues>;
|
|
40
|
+
};
|
|
30
41
|
/**
|
|
31
42
|
* Core Rhf Form hook. Use `Form` in `index.ts` for most cases.
|
|
32
43
|
* Use this if you need to separate form components.
|
|
@@ -36,30 +47,6 @@ export type UseFormProps<TFieldValues extends SafeFieldValues, TTransformedValue
|
|
|
36
47
|
* see https://caniuse.com/?search=form%20attribute
|
|
37
48
|
* @returns Form provider and form.
|
|
38
49
|
*/
|
|
39
|
-
declare const useForm: <TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ onSubmit, onSubmitError, onSubmitInvalid, defaultValues, Fields, config, rhf, form, options, }: UseFormProps<TFieldValues, TTransformedValues>) =>
|
|
40
|
-
readonly id: string;
|
|
41
|
-
readonly ref: React.RefObject<HTMLFormElement>;
|
|
42
|
-
readonly context: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
43
|
-
readonly providerProps: _FormProvidersProps<TFieldValues, TTransformedValues>;
|
|
44
|
-
readonly formProps: _FormProps<TFieldValues, TTransformedValues>;
|
|
45
|
-
readonly SubmitError: {
|
|
46
|
-
new (errors: Record<`root.${string}` | import('react-hook-form').Path<TFieldValues>, {
|
|
47
|
-
type?: string | undefined;
|
|
48
|
-
message: string;
|
|
49
|
-
}>, message?: string | undefined): {
|
|
50
|
-
errors: Record<`root.${string}` | import('react-hook-form').Path<TFieldValues>, {
|
|
51
|
-
type?: string | undefined;
|
|
52
|
-
message: string;
|
|
53
|
-
}>;
|
|
54
|
-
name: string;
|
|
55
|
-
message: string;
|
|
56
|
-
stack?: string | undefined;
|
|
57
|
-
};
|
|
58
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
|
|
59
|
-
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
60
|
-
stackTraceLimit: number;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
50
|
+
declare const useForm: <TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ onSubmit, onSubmitError, onSubmitInvalid, defaultValues, Fields, config, rhf, form, options, }: UseFormProps<TFieldValues, TTransformedValues>) => UseFormReturn<TFieldValues, TTransformedValues>;
|
|
63
51
|
export default useForm;
|
|
64
52
|
export type UseForm<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = typeof useForm<TFieldValues, TTransformedValues>;
|
|
65
|
-
export type UseFormReturn<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = ReturnType<UseForm<TFieldValues, TTransformedValues>>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@paragrav/rhf-utils",
|
|
3
3
|
"author": "paragrav.dev",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.86",
|
|
6
6
|
"description": "Integration utilities for react-hook-form.",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -11,270 +11,18 @@
|
|
|
11
11
|
"dist/types/*"
|
|
12
12
|
],
|
|
13
13
|
"module": "./dist/esm/exports.mjs",
|
|
14
|
-
"imports": {
|
|
15
|
-
"#is-development": {
|
|
16
|
-
"development": "./src/env-conditions/development.ts",
|
|
17
|
-
"default": "./src/env-conditions/production.ts"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
14
|
"exports": {
|
|
21
15
|
".": {
|
|
22
16
|
"import": {
|
|
23
17
|
"default": "./dist/esm/exports.mjs",
|
|
24
18
|
"types": "./dist/types/exports.d.ts"
|
|
25
19
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
"./client/zod/*": {
|
|
34
|
-
"import": {
|
|
35
|
-
"default": "./dist/esm/client/zod/*",
|
|
36
|
-
"types": "./dist/types/client/zod/*"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"./client/zod/createRhfUtilsClientForZod": {
|
|
40
|
-
"import": {
|
|
41
|
-
"default": "./dist/esm/client/zod/createRhfUtilsClientForZod.mjs",
|
|
42
|
-
"types": "./dist/types/client/zod/createRhfUtilsClientForZod.d.ts"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"./client/zod/useRhfUtilsClientForZodContext": {
|
|
46
|
-
"import": {
|
|
47
|
-
"default": "./dist/esm/client/zod/useRhfUtilsClientForZodContext.mjs",
|
|
48
|
-
"types": "./dist/types/client/zod/useRhfUtilsClientForZodContext.d.ts"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"./client/zod/RhfUtilsClientForZodContextProvider": {
|
|
52
|
-
"import": {
|
|
53
|
-
"default": "./dist/esm/client/zod/RhfUtilsClientForZodContextProvider.mjs",
|
|
54
|
-
"types": "./dist/types/client/zod/RhfUtilsClientForZodContextProvider.d.ts"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"./devtool/LazyDevTool": {
|
|
58
|
-
"import": {
|
|
59
|
-
"default": "./dist/esm/devtool/LazyDevTool.mjs",
|
|
60
|
-
"types": "./dist/types/devtool/LazyDevTool.d.ts"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"./errors/flat/context/FlatFieldErrorsContextProvider": {
|
|
64
|
-
"import": {
|
|
65
|
-
"default": "./dist/esm/errors/flat/context/FlatFieldErrorsContextProvider.mjs",
|
|
66
|
-
"types": "./dist/types/errors/flat/context/FlatFieldErrorsContextProvider.d.ts"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"./errors/flat/context/useFlatFieldErrorsContext": {
|
|
70
|
-
"import": {
|
|
71
|
-
"default": "./dist/esm/errors/flat/context/useFlatFieldErrorsContext.mjs",
|
|
72
|
-
"types": "./dist/types/errors/flat/context/useFlatFieldErrorsContext.d.ts"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"./errors/flat/FlatFieldErrorsList": {
|
|
76
|
-
"import": {
|
|
77
|
-
"default": "./dist/esm/errors/flat/FlatFieldErrorsList.mjs",
|
|
78
|
-
"types": "./dist/types/errors/flat/FlatFieldErrorsList.d.ts"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"./errors/FormErrorMessage": {
|
|
82
|
-
"import": {
|
|
83
|
-
"default": "./dist/esm/errors/message/FormErrorMessage.mjs",
|
|
84
|
-
"types": "./dist/types/errors/message/FormErrorMessage.d.ts"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"./errors/FormErrorMessageByPath": {
|
|
88
|
-
"import": {
|
|
89
|
-
"default": "./dist/esm/errors/message/FormErrorMessageByPath.mjs",
|
|
90
|
-
"types": "./dist/types/errors/message/FormErrorMessageByPath.d.ts"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"./errors/useFormErrorConsoleDebug": {
|
|
94
|
-
"import": {
|
|
95
|
-
"default": "./dist/esm/errors/useFormErrorConsoleDebug.mjs",
|
|
96
|
-
"types": "./dist/types/errors/useFormErrorConsoleDebug.d.ts"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"./errors/useFormErrorsEffect": {
|
|
100
|
-
"import": {
|
|
101
|
-
"default": "./dist/esm/errors/useFormErrorsEffect.mjs",
|
|
102
|
-
"types": "./dist/types/errors/useFormErrorsEffect.d.ts"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"./errors/useFormErrorsIfAny": {
|
|
106
|
-
"import": {
|
|
107
|
-
"default": "./dist/esm/errors/useFormErrorsIfAny.mjs",
|
|
108
|
-
"types": "./dist/types/errors/useFormErrorsIfAny.d.ts"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"./errors/useFormErrorsTransformMemo": {
|
|
112
|
-
"import": {
|
|
113
|
-
"default": "./dist/esm/errors/useFormErrorsTransformMemo.mjs",
|
|
114
|
-
"types": "./dist/types/errors/useFormErrorsTransformMemo.d.ts"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"./errors/useFormRequestSubmit": {
|
|
118
|
-
"import": {
|
|
119
|
-
"default": "./dist/esm/errors/useFormRequestSubmit.mjs",
|
|
120
|
-
"types": "./dist/types/errors/useFormRequestSubmit.d.ts"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"./errors/FormNonFieldErrorMarker": {
|
|
124
|
-
"import": {
|
|
125
|
-
"default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.mjs",
|
|
126
|
-
"types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.d.ts"
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"./errors/FormNonFieldErrorMarkerHtmlAttribute": {
|
|
130
|
-
"import": {
|
|
131
|
-
"default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.utils.mjs",
|
|
132
|
-
"types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.utils.d.ts"
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"./errors/useFormHasOnlyOrphanFieldErrorsMemo": {
|
|
136
|
-
"import": {
|
|
137
|
-
"default": "./dist/esm/errors/orphan/useFormHasOnlyOrphanFieldErrorsMemo.mjs",
|
|
138
|
-
"types": "./dist/types/errors/orphan/useFormHasOnlyOrphanFieldErrorsMemo.d.ts"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
"./errors/useOrphanFormErrorsToConsoleError": {
|
|
142
|
-
"import": {
|
|
143
|
-
"default": "./dist/esm/errors/orphan/useOrphanFormErrorsToConsoleError.mjs",
|
|
144
|
-
"types": "./dist/types/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts"
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"./errors/useOrphanFormErrors": {
|
|
148
|
-
"import": {
|
|
149
|
-
"default": "./dist/esm/errors/orphan/useOrphanFormErrors.mjs",
|
|
150
|
-
"types": "./dist/types/errors/orphan/useOrphanFormErrors.d.ts"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"./errors/useRootFormFieldErrors": {
|
|
154
|
-
"import": {
|
|
155
|
-
"default": "./dist/esm/errors/root/useRootFormFieldErrors.mjs",
|
|
156
|
-
"types": "./dist/types/errors/root/useRootFormFieldErrors.d.ts"
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"./errors/RootErrorsListFromFlatFieldErrorsContext": {
|
|
160
|
-
"import": {
|
|
161
|
-
"default": "./dist/esm/errors/root/RootErrorsListFromFlatFieldErrorsContext.mjs",
|
|
162
|
-
"types": "./dist/types/errors/root/RootErrorsListFromFlatFieldErrorsContext.d.ts"
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"./form/useForm": {
|
|
166
|
-
"import": {
|
|
167
|
-
"default": "./dist/esm/form/useForm.mjs",
|
|
168
|
-
"types": "./dist/types/form/useForm.d.ts"
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"./form/context/group/FormGroupContextProvider": {
|
|
172
|
-
"import": {
|
|
173
|
-
"default": "./dist/esm/form/context/group/FormGroupContextProvider.mjs",
|
|
174
|
-
"types": "./dist/types/form/context/group/FormGroupContextProvider.d.ts"
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"./form/context/group/useFormGroupParentTracker": {
|
|
178
|
-
"import": {
|
|
179
|
-
"default": "./dist/esm/form/context/group/useFormGroupParentTracker.mjs",
|
|
180
|
-
"types": "./dist/types/form/context/group/useFormGroupParentTracker.d.ts"
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
"./form/context/group/useFormOrParentIsBusy": {
|
|
184
|
-
"import": {
|
|
185
|
-
"default": "./dist/esm/form/context/group/useFormOrParentIsBusy.mjs",
|
|
186
|
-
"types": "./dist/types/form/context/group/useFormOrParentIsBusy.d.ts"
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"./form/context/group/useFormGroupChildIsSubmittingTracker": {
|
|
190
|
-
"import": {
|
|
191
|
-
"default": "./dist/esm/form/context/group/useFormGroupChildIsSubmittingTracker.mjs",
|
|
192
|
-
"types": "./dist/types/form/context/group/useFormGroupChildIsSubmittingTracker.d.ts"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"./form/context/group/useFormGroupChildTracker": {
|
|
196
|
-
"import": {
|
|
197
|
-
"default": "./dist/esm/form/context/group/useFormGroupChildTracker.mjs",
|
|
198
|
-
"types": "./dist/types/form/context/group/useFormGroupChildTracker.d.ts"
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
"./form/context/group/useFormGroupChildIsMountedTracker": {
|
|
202
|
-
"import": {
|
|
203
|
-
"default": "./dist/esm/form/context/group/useFormGroupChildIsMountedTracker.mjs",
|
|
204
|
-
"types": "./dist/types/form/context/group/useFormGroupChildIsMountedTracker.d.ts"
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
"./form/context/group/useFormGroupIsAnyBusy": {
|
|
208
|
-
"import": {
|
|
209
|
-
"default": "./dist/esm/form/context/group/useFormGroupIsAnyBusy.mjs",
|
|
210
|
-
"types": "./dist/types/form/context/group/useFormGroupIsAnyBusy.d.ts"
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
"./form/context/group/useFormGroupIsChildBusy": {
|
|
214
|
-
"import": {
|
|
215
|
-
"default": "./dist/esm/form/context/group/useFormGroupIsChildBusy.mjs",
|
|
216
|
-
"types": "./dist/types/form/context/group/useFormGroupIsChildBusy.d.ts"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"./form/context/group/useFormGroupIsParentBusy": {
|
|
220
|
-
"import": {
|
|
221
|
-
"default": "./dist/esm/form/context/group/useFormGroupIsParentBusy.mjs",
|
|
222
|
-
"types": "./dist/types/form/context/group/useFormGroupIsParentBusy.d.ts"
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"./form/context/utils/FormUtilsContextProvider": {
|
|
226
|
-
"import": {
|
|
227
|
-
"default": "./dist/esm/form/context/utils/FormUtilsContextProvider.mjs",
|
|
228
|
-
"types": "./dist/types/form/context/utils/FormUtilsContextProvider.d.ts"
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"./form/context/utils/useFormUtilsContext": {
|
|
232
|
-
"import": {
|
|
233
|
-
"default": "./dist/esm/form/context/utils/useFormUtilsContext.mjs",
|
|
234
|
-
"types": "./dist/types/form/context/utils/useFormUtilsContext.d.ts"
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"./form/utils/getSubmitterButtonData": {
|
|
238
|
-
"import": {
|
|
239
|
-
"default": "./dist/esm/form/utils/getSubmitterButtonData.mjs",
|
|
240
|
-
"types": "./dist/types/form/utils/getSubmitterButtonData.d.ts"
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
"./submit/useFormOnSubmitSuccessful": {
|
|
244
|
-
"import": {
|
|
245
|
-
"default": "./dist/esm/submit/useFormOnSubmitSuccessful.mjs",
|
|
246
|
-
"types": "./dist/types/submit/useFormOnSubmitSuccessful.d.ts"
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
"./submit/error/FormSubmitError": {
|
|
250
|
-
"import": {
|
|
251
|
-
"default": "./dist/esm/submit/error/FormSubmitError.mjs",
|
|
252
|
-
"types": "./dist/types/submit/error/FormSubmitError.d.ts"
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
"./submit/useFormOnSubmitSuccessfulAndReset": {
|
|
256
|
-
"import": {
|
|
257
|
-
"default": "./dist/esm/submit/useFormOnSubmitSuccessfulAndReset.mjs",
|
|
258
|
-
"types": "./dist/types/submit/useFormOnSubmitSuccessfulAndReset.d.ts"
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
"./submit/useResetFormOnSubmitError": {
|
|
262
|
-
"import": {
|
|
263
|
-
"default": "./dist/esm/submit/useResetFormOnSubmitError.mjs",
|
|
264
|
-
"types": "./dist/types/submit/useResetFormOnSubmitError.d.ts"
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
"./submit/useResetFormAfterSubmitSuccessful": {
|
|
268
|
-
"import": {
|
|
269
|
-
"default": "./dist/esm/submit/useResetFormAfterSubmitSuccessful.mjs",
|
|
270
|
-
"types": "./dist/types/submit/useResetFormAfterSubmitSuccessful.d.ts"
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"./submit/useSubmitFormOnChange": {
|
|
274
|
-
"import": {
|
|
275
|
-
"default": "./dist/esm/submit/useSubmitFormOnChange.mjs",
|
|
276
|
-
"types": "./dist/types/submit/useSubmitFormOnChange.d.ts"
|
|
277
|
-
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"imports": {
|
|
23
|
+
"#is-development": {
|
|
24
|
+
"development": "./src/env-conditions/development.ts",
|
|
25
|
+
"default": "./src/env-conditions/production.ts"
|
|
278
26
|
}
|
|
279
27
|
},
|
|
280
28
|
"peerDependencies": {
|
package/dist/esm/form/_Form.mjs
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsxs as T, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { useFormContext as _ } from "react-hook-form";
|
|
4
|
-
import v from "../devtool/LazyDevTool.mjs";
|
|
5
|
-
import { FormSubmitError as E } from "../submit/error/FormSubmitError.mjs";
|
|
6
|
-
import V from "../submit/error/setCtxErrorsByFormSubmitError.mjs";
|
|
7
|
-
import w from "./_FormBase.mjs";
|
|
8
|
-
function H({
|
|
9
|
-
formId: B,
|
|
10
|
-
formRef: x,
|
|
11
|
-
//
|
|
12
|
-
onSubmit: s,
|
|
13
|
-
onSubmitError: h,
|
|
14
|
-
onSubmitInvalid: F,
|
|
15
|
-
Fields: C,
|
|
16
|
-
//
|
|
17
|
-
form: d,
|
|
18
|
-
options: a,
|
|
19
|
-
config: t,
|
|
20
|
-
//
|
|
21
|
-
children: j
|
|
22
|
-
}) {
|
|
23
|
-
const l = _(), N = async (r) => {
|
|
24
|
-
a != null && a.stopSubmitPropagation && r.stopPropagation();
|
|
25
|
-
try {
|
|
26
|
-
await l.handleSubmit(P, F)(r);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
S(e, r);
|
|
29
|
-
}
|
|
30
|
-
}, P = (r, e) => s == null ? void 0 : s(
|
|
31
|
-
r,
|
|
32
|
-
l,
|
|
33
|
-
e
|
|
34
|
-
), S = (r, e) => {
|
|
35
|
-
var b;
|
|
36
|
-
const m = r instanceof E ? (
|
|
37
|
-
// consumer can manually throw FormSubmitError (e.g., manual validation)
|
|
38
|
-
r
|
|
39
|
-
) : (
|
|
40
|
-
// if error is not FormSubmitError, consumer can provide global handler
|
|
41
|
-
(b = t == null ? void 0 : t.onSubmitError) == null ? void 0 : b.call(t, r)
|
|
42
|
-
);
|
|
43
|
-
m && V(l, m), h == null || h(
|
|
44
|
-
r,
|
|
45
|
-
l,
|
|
46
|
-
e
|
|
47
|
-
);
|
|
48
|
-
}, c = {
|
|
49
|
-
formId: B,
|
|
50
|
-
formRef: x,
|
|
51
|
-
ctx: l,
|
|
52
|
-
options: a
|
|
53
|
-
}, y = (r) => {
|
|
54
|
-
var m;
|
|
55
|
-
const e = (m = t == null ? void 0 : t.Children) == null ? void 0 : m[r];
|
|
56
|
-
return e && /* @__PURE__ */ u(e, { ...c });
|
|
57
|
-
};
|
|
58
|
-
return /* @__PURE__ */ T(
|
|
59
|
-
w,
|
|
60
|
-
{
|
|
61
|
-
noValidate: !0,
|
|
62
|
-
style: {
|
|
63
|
-
position: "relative"
|
|
64
|
-
},
|
|
65
|
-
...d,
|
|
66
|
-
className: [a == null ? void 0 : a.classNames, d == null ? void 0 : d.className].filter(Boolean).join(" "),
|
|
67
|
-
onSubmit: N,
|
|
68
|
-
formRef: x,
|
|
69
|
-
children: [
|
|
70
|
-
y("top"),
|
|
71
|
-
(a == null ? void 0 : a.devTool) !== "disabled" && /* @__PURE__ */ u(v, { placement: "top-right", ...a == null ? void 0 : a.devTool }),
|
|
72
|
-
C && /* @__PURE__ */ u(C, { ...c }),
|
|
73
|
-
j,
|
|
74
|
-
y("bottom")
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
export {
|
|
80
|
-
H as default
|
|
81
|
-
};
|
|
File without changes
|