@saas-ui/forms 2.4.1 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,254 @@
1
+ import * as _chakra_ui_button from '@chakra-ui/button';
2
+ import * as _saas_ui_modals from '@saas-ui/modals';
3
+ import { BaseModalProps } from '@saas-ui/modals';
4
+ import * as _chakra_ui_checkbox from '@chakra-ui/checkbox';
5
+ import * as react_hook_form from 'react-hook-form';
6
+ import * as react from 'react';
7
+ import react__default from 'react';
8
+ import * as dist from 'dist';
9
+ import * as yup from 'yup';
10
+ import { ObjectSchema, AnyObjectSchema as AnyObjectSchema$1, InferType } from 'yup';
11
+ import { FieldProps, GetFieldResolver, WithFields, FormProps, GetBaseField, CreateFormProps, CreateStepFormProps, StepsOptions, WithStepFields, UseStepFormProps } from '@saas-ui/forms';
12
+ import { yupResolver } from '@hookform/resolvers/yup';
13
+ export { yupResolver } from '@hookform/resolvers/yup';
14
+
15
+ type AnyObjectSchema = ObjectSchema<any, any, any, ''> | ObjectSchema<any, any, any, 'd'> | ObjectSchema<any, any, any, 's'>;
16
+
17
+ type Options = {
18
+ min?: number;
19
+ max?: number;
20
+ };
21
+ /**
22
+ * A helper function to render forms automatically based on a Yup schema
23
+ *
24
+ * @param schema The Yup schema
25
+ * @returns {FieldProps[]}
26
+ */
27
+ declare const getFieldsFromSchema: (schema: AnyObjectSchema) => FieldProps[];
28
+ declare const getNestedSchema: (schema: AnyObjectSchema, path: string) => AnyObjectSchema;
29
+ declare const yupFieldResolver: GetFieldResolver;
30
+
31
+ type ResolverArgs$1 = Parameters<typeof yupResolver>;
32
+ interface CreateYupFormProps$1<FieldDefs, TGetBaseField extends GetBaseField = GetBaseField> extends CreateFormProps<FieldDefs, TGetBaseField> {
33
+ schemaOptions?: ResolverArgs$1[1];
34
+ resolverOptions?: ResolverArgs$1[2];
35
+ }
36
+ type YupFormType<FieldDefs, ExtraProps = object, ExtraFieldProps extends object = object, ExtraOverrides = object, Type extends 'yup' = 'yup'> = (<TSchema extends AnyObjectSchema$1 = AnyObjectSchema$1, TFieldValues extends Required<InferType<TSchema>> = Required<InferType<TSchema>>, TContext extends object = object>(props: WithFields<FormProps<TSchema, TFieldValues, TContext, ExtraFieldProps>, FieldDefs, ExtraOverrides> & {
37
+ ref?: react__default.ForwardedRef<HTMLFormElement>;
38
+ } & ExtraProps) => react__default.ReactElement) & {
39
+ displayName?: string;
40
+ id?: 'YupForm';
41
+ };
42
+ declare const createYupForm: <FieldDefs, TGetBaseField extends GetBaseField<any> = GetBaseField<any>>(options?: CreateYupFormProps$1<FieldDefs, TGetBaseField>) => YupFormType<FieldDefs, object, TGetBaseField extends GetBaseField<infer ExtraFieldProps extends object> ? ExtraFieldProps : object, object, "yup">;
43
+
44
+ type ResolverArgs = Parameters<typeof yupResolver>;
45
+ interface CreateYupFormProps<FieldDefs, TGetBaseField extends GetBaseField = GetBaseField> extends CreateStepFormProps<FieldDefs, TGetBaseField> {
46
+ schemaOptions?: ResolverArgs[1];
47
+ resolverOptions?: ResolverArgs[2];
48
+ }
49
+ type InferStepType<T extends Required<StepsOptions<AnyObjectSchema>>> = T extends [infer Step, ...infer Rest] ? Step extends {
50
+ schema: AnyObjectSchema;
51
+ } ? InferType<Step['schema']> & (Rest extends Required<StepsOptions<AnyObjectSchema>> ? InferStepType<Rest> : object) : object : object;
52
+ type YupStepFormType<FieldDefs, ExtraProps = object, ExtraFieldProps extends object = object, ExtraOverrides = object> = (<TSteps extends Required<StepsOptions<AnyObjectSchema>> = Required<StepsOptions<AnyObjectSchema>>, TFieldValues extends InferStepType<TSteps> = InferStepType<TSteps>, TContext extends object = object>(props: WithStepFields<UseStepFormProps<TSteps, TFieldValues, TContext>, FieldDefs, ExtraOverrides> & {
53
+ steps: TSteps;
54
+ ref?: react__default.ForwardedRef<HTMLFormElement>;
55
+ } & ExtraProps) => react__default.ReactElement) & {
56
+ displayName?: string;
57
+ id?: string;
58
+ };
59
+ declare const createYupStepForm: <FieldDefs, TGetBaseField extends GetBaseField = GetBaseField>(options?: CreateYupFormProps<FieldDefs, TGetBaseField>) => YupStepFormType<FieldDefs, object, TGetBaseField extends GetBaseField<infer ExtraFieldProps extends object> ? ExtraFieldProps : object, object>;
60
+
61
+ declare function createYupFormDialog<FieldDefs = any, ExtraProps = object, ExtraFieldProps extends object = object, ExtraOverrides = object>(Form: YupFormType<FieldDefs, ExtraProps, ExtraFieldProps, ExtraOverrides>): YupFormType<FieldDefs, ExtraProps & Omit<BaseModalProps, "children">, ExtraFieldProps, ExtraOverrides & dist.DefaultFieldOverrides & {
62
+ cancel?: _chakra_ui_button.ButtonProps | undefined;
63
+ }>;
64
+
65
+ declare const Form: YupFormType<unknown, object, any, object, "yup">;
66
+ declare const StepForm: (<TSteps extends {
67
+ name: string;
68
+ schema?: AnyObjectSchema | undefined;
69
+ }[] = {
70
+ name: string;
71
+ schema?: AnyObjectSchema | undefined;
72
+ }[], TFieldValues extends TSteps extends [infer Step, ...infer Rest] ? Step extends {
73
+ schema: AnyObjectSchema;
74
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
75
+ name: string;
76
+ schema?: AnyObjectSchema | undefined;
77
+ }[] ? Rest extends infer T ? T extends Rest ? T extends [infer Step, ...infer Rest] ? Step extends {
78
+ schema: AnyObjectSchema;
79
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
80
+ name: string;
81
+ schema?: AnyObjectSchema | undefined;
82
+ }[] ? Rest extends infer T_1 ? T_1 extends Rest ? T_1 extends [infer Step, ...infer Rest] ? Step extends {
83
+ schema: AnyObjectSchema;
84
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
85
+ name: string;
86
+ schema?: AnyObjectSchema | undefined;
87
+ }[] ? Rest extends infer T_2 ? T_2 extends Rest ? T_2 extends [infer Step, ...infer Rest] ? Step extends {
88
+ schema: AnyObjectSchema;
89
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
90
+ name: string;
91
+ schema?: AnyObjectSchema | undefined;
92
+ }[] ? Rest extends infer T_3 ? T_3 extends Rest ? T_3 extends [infer Step, ...infer Rest] ? Step extends {
93
+ schema: AnyObjectSchema;
94
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
95
+ name: string;
96
+ schema?: AnyObjectSchema | undefined;
97
+ }[] ? Rest extends infer T_4 ? T_4 extends Rest ? T_4 extends [infer Step, ...infer Rest] ? Step extends {
98
+ schema: AnyObjectSchema;
99
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
100
+ name: string;
101
+ schema?: AnyObjectSchema | undefined;
102
+ }[] ? Rest extends infer T_5 ? T_5 extends Rest ? T_5 extends [infer Step, ...infer Rest] ? Step extends {
103
+ schema: AnyObjectSchema;
104
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
105
+ name: string;
106
+ schema?: AnyObjectSchema | undefined;
107
+ }[] ? Rest extends infer T_6 ? T_6 extends Rest ? T_6 extends [infer Step, ...infer Rest] ? Step extends {
108
+ schema: AnyObjectSchema;
109
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
110
+ name: string;
111
+ schema?: AnyObjectSchema | undefined;
112
+ }[] ? Rest extends infer T_7 ? T_7 extends Rest ? T_7 extends [infer Step, ...infer Rest] ? Step extends {
113
+ schema: AnyObjectSchema;
114
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
115
+ name: string;
116
+ schema?: AnyObjectSchema | undefined;
117
+ }[] ? Rest extends infer T_8 ? T_8 extends Rest ? T_8 extends [infer Step, ...infer Rest] ? Step extends {
118
+ schema: AnyObjectSchema;
119
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
120
+ name: string;
121
+ schema?: AnyObjectSchema | undefined;
122
+ }[] ? Rest extends infer T_9 ? T_9 extends Rest ? T_9 extends [infer Step, ...infer Rest] ? Step extends {
123
+ schema: AnyObjectSchema;
124
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
125
+ name: string;
126
+ schema?: AnyObjectSchema | undefined;
127
+ }[] ? any : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object = TSteps extends [infer Step, ...infer Rest] ? Step extends {
128
+ schema: AnyObjectSchema;
129
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
130
+ name: string;
131
+ schema?: AnyObjectSchema | undefined;
132
+ }[] ? Rest extends infer T_10 ? T_10 extends Rest ? T_10 extends [infer Step, ...infer Rest] ? Step extends {
133
+ schema: AnyObjectSchema;
134
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
135
+ name: string;
136
+ schema?: AnyObjectSchema | undefined;
137
+ }[] ? Rest extends infer T_11 ? T_11 extends Rest ? T_11 extends [infer Step, ...infer Rest] ? Step extends {
138
+ schema: AnyObjectSchema;
139
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
140
+ name: string;
141
+ schema?: AnyObjectSchema | undefined;
142
+ }[] ? Rest extends infer T_12 ? T_12 extends Rest ? T_12 extends [infer Step, ...infer Rest] ? Step extends {
143
+ schema: AnyObjectSchema;
144
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
145
+ name: string;
146
+ schema?: AnyObjectSchema | undefined;
147
+ }[] ? Rest extends infer T_13 ? T_13 extends Rest ? T_13 extends [infer Step, ...infer Rest] ? Step extends {
148
+ schema: AnyObjectSchema;
149
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
150
+ name: string;
151
+ schema?: AnyObjectSchema | undefined;
152
+ }[] ? Rest extends infer T_14 ? T_14 extends Rest ? T_14 extends [infer Step, ...infer Rest] ? Step extends {
153
+ schema: AnyObjectSchema;
154
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
155
+ name: string;
156
+ schema?: AnyObjectSchema | undefined;
157
+ }[] ? Rest extends infer T_15 ? T_15 extends Rest ? T_15 extends [infer Step, ...infer Rest] ? Step extends {
158
+ schema: AnyObjectSchema;
159
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
160
+ name: string;
161
+ schema?: AnyObjectSchema | undefined;
162
+ }[] ? Rest extends infer T_16 ? T_16 extends Rest ? T_16 extends [infer Step, ...infer Rest] ? Step extends {
163
+ schema: AnyObjectSchema;
164
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
165
+ name: string;
166
+ schema?: AnyObjectSchema | undefined;
167
+ }[] ? Rest extends infer T_17 ? T_17 extends Rest ? T_17 extends [infer Step, ...infer Rest] ? Step extends {
168
+ schema: AnyObjectSchema;
169
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
170
+ name: string;
171
+ schema?: AnyObjectSchema | undefined;
172
+ }[] ? Rest extends infer T_18 ? T_18 extends Rest ? T_18 extends [infer Step, ...infer Rest] ? Step extends {
173
+ schema: AnyObjectSchema;
174
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
175
+ name: string;
176
+ schema?: AnyObjectSchema | undefined;
177
+ }[] ? Rest extends infer T_19 ? T_19 extends Rest ? T_19 extends [infer Step, ...infer Rest] ? Step extends {
178
+ schema: AnyObjectSchema;
179
+ } ? yup.Asserts<Step["schema"]> & (Rest extends {
180
+ name: string;
181
+ schema?: AnyObjectSchema | undefined;
182
+ }[] ? any : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object : never : never : object) : object : object, TContext extends object = object>(props: Omit<dist.UseStepFormProps<TSteps, TFieldValues, TContext>, "children" | "fields"> & {
183
+ children?: react.ReactNode | ((props: dist.StepFormRenderContext<TSteps, TFieldValues, TContext, ({
184
+ type?: "number" | undefined;
185
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.NumberInputFieldProps> & dist.NumberInputFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
186
+ type?: "select" | undefined;
187
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.SelectFieldProps> & dist.SelectFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
188
+ type?: "textarea" | undefined;
189
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.TextareaFieldProps> & dist.TextareaFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
190
+ type?: "switch" | undefined;
191
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.SwitchFieldProps> & dist.SwitchFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
192
+ type?: "text" | undefined;
193
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
194
+ type?: "checkbox" | undefined;
195
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof _chakra_ui_checkbox.CheckboxProps> & _chakra_ui_checkbox.CheckboxProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
196
+ type?: "radio" | undefined;
197
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.RadioInputProps> & dist.RadioInputProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
198
+ type?: "url" | undefined;
199
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
200
+ type?: "email" | undefined;
201
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
202
+ type?: "phone" | undefined;
203
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
204
+ type?: "password" | undefined;
205
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.PasswordInputProps> & dist.PasswordInputProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
206
+ type?: "pin" | undefined;
207
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.PinFieldProps> & dist.PinFieldProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object) | ({
208
+ type?: "native-select" | undefined;
209
+ } & Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.NativeSelectProps> & dist.NativeSelectProps, keyof dist.BaseFieldProps<TFieldValues_1, TName>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>> & object)>) => react.ReactNode);
210
+ fields?: ({ [K in react_hook_form.Path<TFieldValues> | (react_hook_form.Path<TFieldValues> extends infer T_20 ? T_20 extends react_hook_form.Path<TFieldValues> ? T_20 extends string ? (string extends T_20 ? (T_20 & string)[] : T_20 extends infer T_21 ? T_21 extends T_20 ? T_21 extends "" ? [] : T_21 extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_21] : never : never) extends infer T_23 ? T_23 extends (string extends T_20 ? (T_20 & string)[] : T_20 extends infer T_34 ? T_34 extends T_20 ? T_34 extends "" ? [] : T_34 extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? U[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_34] : never : never) ? T_23 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_24 ? T_24 extends R ? T_24 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_25 ? T_25 extends R ? T_25 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_26 ? T_26 extends R ? T_26 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_27 ? T_27 extends R ? T_27 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_28 ? T_28 extends R ? T_28 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_29 ? T_29 extends R ? T_29 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_30 ? T_30 extends R ? T_30 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_31 ? T_31 extends R ? T_31 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_32 ? T_32 extends R ? T_32 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? R extends infer T_33 ? T_33 extends R ? T_33 extends [infer U_1, ...infer R] ? U_1 extends string ? `${U_1 extends `${number}` ? "$" : U_1}${R[0] extends string ? "." : ""}${R extends string[] ? any : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : ""}` : "" : "" : never : never : never : never : never)]?: (({
211
+ type?: "number" | undefined;
212
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.NumberInputFieldProps> & dist.NumberInputFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
213
+ type?: "select" | undefined;
214
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.SelectFieldProps> & dist.SelectFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
215
+ type?: "textarea" | undefined;
216
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.TextareaFieldProps> & dist.TextareaFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
217
+ type?: "switch" | undefined;
218
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.SwitchFieldProps> & dist.SwitchFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
219
+ type?: "text" | undefined;
220
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
221
+ type?: "checkbox" | undefined;
222
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof _chakra_ui_checkbox.CheckboxProps> & _chakra_ui_checkbox.CheckboxProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
223
+ type?: "radio" | undefined;
224
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.RadioInputProps> & dist.RadioInputProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
225
+ type?: "url" | undefined;
226
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
227
+ type?: "email" | undefined;
228
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
229
+ type?: "phone" | undefined;
230
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.InputFieldProps> & dist.InputFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
231
+ type?: "password" | undefined;
232
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.PasswordInputProps> & dist.PasswordInputProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
233
+ type?: "pin" | undefined;
234
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.PinFieldProps> & dist.PinFieldProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
235
+ type?: "native-select" | undefined;
236
+ } & Omit<Omit<Omit<dist.BaseFieldProps<react_hook_form.FieldValues, string>, keyof dist.NativeSelectProps> & dist.NativeSelectProps, keyof dist.BaseFieldProps<TFieldValues_2, TName_1>> & dist.BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">)) | ({
237
+ type?: "object" | undefined;
238
+ } & Omit<dist.ObjectFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name" | "children">) | ({
239
+ type?: "array" | undefined;
240
+ } & Omit<dist.ArrayFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name" | "children">) | undefined; } & {
241
+ submit?: dist.SubmitButtonProps | undefined;
242
+ } & object) | undefined;
243
+ } & {
244
+ steps: TSteps;
245
+ ref?: react.ForwardedRef<HTMLFormElement> | undefined;
246
+ } & object) => react.ReactElement<any, string | react.JSXElementConstructor<any>>) & {
247
+ displayName?: string | undefined;
248
+ id?: string | undefined;
249
+ };
250
+ declare const FormDialog: YupFormType<unknown, object & Omit<_saas_ui_modals.BaseModalProps, "children">, any, object & dist.DefaultFieldOverrides & {
251
+ cancel?: _chakra_ui_button.ButtonProps | undefined;
252
+ }>;
253
+
254
+ export { type AnyObjectSchema, Form, FormDialog, type Options, StepForm, type YupFormType, createYupForm, createYupFormDialog, createYupStepForm, getFieldsFromSchema, getNestedSchema, yupFieldResolver };