@saas-ui/forms 2.0.0-next.9 → 2.0.0-rc.23
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +139 -0
- package/dist/ajv/index.d.ts +15 -350
- package/dist/ajv/index.js.map +1 -1
- package/dist/ajv/index.mjs.map +1 -1
- package/dist/index.d.ts +182 -144
- package/dist/index.js +202 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -148
- package/dist/index.mjs.map +1 -1
- package/dist/yup/index.d.ts +218 -274
- package/dist/yup/index.js +22 -6
- package/dist/yup/index.js.map +1 -1
- package/dist/yup/index.mjs +20 -5
- package/dist/yup/index.mjs.map +1 -1
- package/dist/zod/index.d.ts +246 -303
- package/dist/zod/index.js +16 -1
- package/dist/zod/index.js.map +1 -1
- package/dist/zod/index.mjs +17 -3
- package/dist/zod/index.mjs.map +1 -1
- package/package.json +20 -6
- package/src/array-field.tsx +6 -3
- package/src/create-form.tsx +33 -19
- package/src/create-step-form.tsx +100 -0
- package/src/form-context.tsx +1 -1
- package/src/form.tsx +12 -10
- package/src/index.ts +20 -6
- package/src/object-field.tsx +22 -5
- package/src/select/select.tsx +2 -2
- package/src/step-form.tsx +52 -70
- package/src/types.ts +8 -3
- package/src/use-step-form.tsx +54 -9
package/dist/zod/index.d.ts
CHANGED
@@ -1,38 +1,18 @@
|
|
1
|
-
import * as
|
2
|
-
import
|
3
|
-
import * as _chakra_ui_textarea_dist_textarea from '@chakra-ui/textarea/dist/textarea';
|
1
|
+
import * as React$1 from 'react';
|
2
|
+
import React$1__default from 'react';
|
4
3
|
import * as react_hook_form from 'react-hook-form';
|
5
|
-
import { FieldValues, FieldPath, RegisterOptions, UseFormReturn,
|
6
|
-
import * as react from 'react';
|
7
|
-
import react__default from 'react';
|
8
|
-
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
9
|
-
import { ButtonProps, InputProps, RadioGroupProps, MenuProps, SelectProps as SelectProps$1, UsePinInputProps, SystemProps, FormControlProps, HTMLChakraProps, NumberInputProps as NumberInputProps$1, StackDirection, MenuItemOptionProps, ResponsiveValue, TextareaProps, SwitchProps, CheckboxProps, RadioProps } from '@chakra-ui/react';
|
10
|
-
import { FocusableElement } from '@chakra-ui/utils';
|
4
|
+
import { FieldValues, FieldPath, UseFormProps, SubmitHandler, RegisterOptions, UseFormReturn, UseFieldArrayReturn, WatchObserver, SubmitErrorHandler } from 'react-hook-form';
|
11
5
|
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
6
|
+
import { UseStepperProps, UseStepperReturn } from '@saas-ui/core';
|
7
|
+
import { HTMLChakraProps, TextareaProps, SwitchProps, CheckboxProps, FormControlProps, ResponsiveValue, InputProps, RadioGroupProps, MenuProps, SelectProps as SelectProps$1, UsePinInputProps, SystemProps, NumberInputProps as NumberInputProps$1, StackDirection, MenuItemOptionProps, ButtonProps, RadioProps } from '@chakra-ui/react';
|
8
|
+
import { FocusableElement } from '@chakra-ui/utils';
|
9
|
+
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
12
10
|
import * as zod from 'zod';
|
13
11
|
import { z } from 'zod';
|
14
|
-
import
|
15
|
-
import { FieldProps as FieldProps$1, FormProps as FormProps$1, CreateFormProps } from '@saas-ui/forms';
|
12
|
+
import { FieldProps as FieldProps$1, WithFields, FormProps as FormProps$1, CreateFormProps } from '@saas-ui/forms';
|
16
13
|
import { zodResolver } from '@hookform/resolvers/zod';
|
17
14
|
export { zodResolver } from '@hookform/resolvers/zod';
|
18
15
|
|
19
|
-
interface SubmitButtonProps extends ButtonProps {
|
20
|
-
/**
|
21
|
-
* Disable the submit button if the form is untouched.
|
22
|
-
*
|
23
|
-
* Change the default behavior by updating
|
24
|
-
* `SubmitButton.defaultProps.disableIfUntouched`
|
25
|
-
*/
|
26
|
-
disableIfUntouched?: boolean;
|
27
|
-
/**
|
28
|
-
* Disable the submit button if the form is invalid.
|
29
|
-
*
|
30
|
-
* Change the default behavior by updating
|
31
|
-
* `SubmitButton.defaultProps.disableIfInvalid`
|
32
|
-
*/
|
33
|
-
disableIfInvalid?: boolean;
|
34
|
-
}
|
35
|
-
|
36
16
|
interface NumberInputOptions {
|
37
17
|
/**
|
38
18
|
* Hide the stepper.
|
@@ -41,19 +21,19 @@ interface NumberInputOptions {
|
|
41
21
|
/**
|
42
22
|
* Render a custom increment icon.
|
43
23
|
*/
|
44
|
-
incrementIcon?:
|
24
|
+
incrementIcon?: React$1.ReactNode;
|
45
25
|
/**
|
46
26
|
* Render a custom decrement icon.
|
47
27
|
*/
|
48
|
-
decrementIcon?:
|
28
|
+
decrementIcon?: React$1.ReactNode;
|
49
29
|
}
|
50
30
|
interface NumberInputProps extends NumberInputProps$1, NumberInputOptions {
|
51
31
|
}
|
52
32
|
|
53
33
|
interface PasswordOptions {
|
54
|
-
viewIcon?:
|
55
|
-
viewOffIcon?:
|
56
|
-
leftAddon?:
|
34
|
+
viewIcon?: React$1__default.ReactNode;
|
35
|
+
viewOffIcon?: React$1__default.ReactNode;
|
36
|
+
leftAddon?: React$1__default.ReactNode;
|
57
37
|
}
|
58
38
|
interface PasswordInputProps extends InputProps, PasswordOptions {
|
59
39
|
}
|
@@ -109,7 +89,7 @@ interface SelectOptions {
|
|
109
89
|
* @param value The value of the select field.
|
110
90
|
* @returns The rendered value.
|
111
91
|
*/
|
112
|
-
renderValue?: (value: string | string[]) =>
|
92
|
+
renderValue?: (value: string | string[]) => React$1__default.ReactNode;
|
113
93
|
}
|
114
94
|
|
115
95
|
interface SelectProps extends Omit<MenuProps, 'children'>, SelectOptions {
|
@@ -135,8 +115,8 @@ interface NativeSelectProps extends SelectProps$1, NativeSelectOptions {
|
|
135
115
|
|
136
116
|
interface InputFieldProps extends InputProps {
|
137
117
|
type?: string;
|
138
|
-
leftAddon?:
|
139
|
-
rightAddon?:
|
118
|
+
leftAddon?: React$1.ReactNode;
|
119
|
+
rightAddon?: React$1.ReactNode;
|
140
120
|
}
|
141
121
|
interface NumberInputFieldProps extends NumberInputProps {
|
142
122
|
type: 'number';
|
@@ -147,22 +127,39 @@ interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {
|
|
147
127
|
spacing?: SystemProps['margin'];
|
148
128
|
}
|
149
129
|
declare const defaultFieldTypes: {
|
150
|
-
text:
|
151
|
-
email:
|
152
|
-
url:
|
153
|
-
phone:
|
154
|
-
number:
|
155
|
-
password:
|
156
|
-
textarea:
|
157
|
-
switch:
|
158
|
-
select:
|
159
|
-
checkbox:
|
160
|
-
radio:
|
161
|
-
pin:
|
162
|
-
'native-select':
|
130
|
+
text: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
131
|
+
email: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
132
|
+
url: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
133
|
+
phone: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
134
|
+
number: React$1.FC<NumberInputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
135
|
+
password: React$1.FC<PasswordInputProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
136
|
+
textarea: React$1.FC<TextareaProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
137
|
+
switch: React$1.FC<SwitchProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
138
|
+
select: React$1.FC<SelectProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
139
|
+
checkbox: React$1.FC<CheckboxProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
140
|
+
radio: React$1.FC<RadioInputProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
141
|
+
pin: React$1.FC<PinFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
142
|
+
'native-select': React$1.FC<NativeSelectProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
|
163
143
|
};
|
164
144
|
type DefaultFields = typeof defaultFieldTypes;
|
165
145
|
|
146
|
+
interface SubmitButtonProps extends ButtonProps {
|
147
|
+
/**
|
148
|
+
* Disable the submit button if the form is untouched.
|
149
|
+
*
|
150
|
+
* Change the default behavior by updating
|
151
|
+
* `SubmitButton.defaultProps.disableIfUntouched`
|
152
|
+
*/
|
153
|
+
disableIfUntouched?: boolean;
|
154
|
+
/**
|
155
|
+
* Disable the submit button if the form is invalid.
|
156
|
+
*
|
157
|
+
* Change the default behavior by updating
|
158
|
+
* `SubmitButton.defaultProps.disableIfInvalid`
|
159
|
+
*/
|
160
|
+
disableIfInvalid?: boolean;
|
161
|
+
}
|
162
|
+
|
166
163
|
type FieldOption = {
|
167
164
|
label?: string;
|
168
165
|
value: string;
|
@@ -224,7 +221,7 @@ type FieldResolver = {
|
|
224
221
|
};
|
225
222
|
|
226
223
|
interface DisplayIfProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
|
227
|
-
children:
|
224
|
+
children: React$1.ReactElement;
|
228
225
|
name: TName;
|
229
226
|
defaultValue?: unknown;
|
230
227
|
isDisabled?: boolean;
|
@@ -280,25 +277,25 @@ interface ArrayField {
|
|
280
277
|
* @see Docs https://saas-ui.dev/docs/components/forms/array-field
|
281
278
|
*/
|
282
279
|
declare const ArrayField: ((props: ArrayFieldProps & {
|
283
|
-
ref?:
|
284
|
-
}) =>
|
280
|
+
ref?: React$1.ForwardedRef<UseArrayFieldReturn>;
|
281
|
+
}) => React$1.ReactElement) & {
|
285
282
|
displayName: string;
|
286
283
|
};
|
287
284
|
|
288
285
|
interface ObjectFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends BaseFieldProps {
|
289
286
|
name: TName;
|
290
|
-
children:
|
287
|
+
children: React$1.ReactNode;
|
291
288
|
columns?: ResponsiveValue<number>;
|
292
289
|
spacing?: ResponsiveValue<string | number>;
|
293
290
|
}
|
294
291
|
|
295
292
|
interface FormRenderContext<TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends UseFormReturn<TFieldValues, TContext> {
|
296
|
-
Field:
|
297
|
-
DisplayIf:
|
298
|
-
ArrayField:
|
299
|
-
ObjectField:
|
293
|
+
Field: React$1.FC<TFieldTypes & React$1.RefAttributes<FocusableElement>>;
|
294
|
+
DisplayIf: React$1.FC<DisplayIfProps<TFieldValues>>;
|
295
|
+
ArrayField: React$1.FC<ArrayFieldProps<TFieldValues> & React$1.RefAttributes<UseArrayFieldReturn>>;
|
296
|
+
ObjectField: React$1.FC<ObjectFieldProps<TFieldValues>>;
|
300
297
|
}
|
301
|
-
interface FormOptions<TFieldValues extends FieldValues = FieldValues, TContext extends object = object,
|
298
|
+
interface FormOptions<TSchema = unknown, TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> {
|
302
299
|
/**
|
303
300
|
* The form schema.
|
304
301
|
*/
|
@@ -318,7 +315,7 @@ interface FormOptions<TFieldValues extends FieldValues = FieldValues, TContext e
|
|
318
315
|
/**
|
319
316
|
* The Hook Form state ref.
|
320
317
|
*/
|
321
|
-
formRef?:
|
318
|
+
formRef?: React$1.RefObject<UseFormReturn<TFieldValues, TContext>>;
|
322
319
|
/**
|
323
320
|
* The form children, can be a render prop or a ReactNode.
|
324
321
|
*/
|
@@ -332,7 +329,62 @@ interface FormOptions<TFieldValues extends FieldValues = FieldValues, TContext e
|
|
332
329
|
*/
|
333
330
|
fields?: DefaultFieldOverrides;
|
334
331
|
}
|
335
|
-
interface FormProps<TFieldValues extends FieldValues = FieldValues, TContext extends object = object,
|
332
|
+
interface FormProps<TSchema = unknown, TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends UseFormProps<TFieldValues, TContext>, Omit<HTMLChakraProps<'form'>, 'children' | 'onChange' | 'onSubmit' | 'onError'>, FormOptions<TSchema, TFieldValues, TContext, TFieldTypes> {
|
333
|
+
}
|
334
|
+
|
335
|
+
type StepsOptions<TSchema, TName extends string = string> = {
|
336
|
+
/**
|
337
|
+
* The step name
|
338
|
+
*/
|
339
|
+
name: TName;
|
340
|
+
/**
|
341
|
+
* Schema
|
342
|
+
*/
|
343
|
+
schema?: TSchema;
|
344
|
+
}[];
|
345
|
+
interface FormStepOptions<TName extends string = string> {
|
346
|
+
/**
|
347
|
+
* The step name
|
348
|
+
*/
|
349
|
+
name: TName;
|
350
|
+
/**
|
351
|
+
* Schema
|
352
|
+
*/
|
353
|
+
schema?: any;
|
354
|
+
/**
|
355
|
+
* Hook Form Resolver
|
356
|
+
*/
|
357
|
+
resolver?: any;
|
358
|
+
}
|
359
|
+
interface FormStepProps<TName extends string = string> extends FormStepOptions<TName>, Omit<HTMLChakraProps<'div'>, 'onSubmit'> {
|
360
|
+
onSubmit?: FormStepSubmitHandler;
|
361
|
+
}
|
362
|
+
type FormStepSubmitHandler<TFieldValues extends FieldValues = FieldValues> = (data: TFieldValues, stepper: UseStepperReturn) => Promise<void>;
|
363
|
+
|
364
|
+
type StepName<T extends {
|
365
|
+
[k: number]: {
|
366
|
+
readonly name: string;
|
367
|
+
};
|
368
|
+
}> = T[number]['name'];
|
369
|
+
interface StepFormRenderContext<TSteps extends StepsOptions<any> = StepsOptions<any>, TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends UseStepFormReturn<TFieldValues> {
|
370
|
+
Field: React$1.FC<TFieldTypes & React$1.RefAttributes<FocusableElement>>;
|
371
|
+
FormStep: React$1.FC<FormStepProps<StepName<TSteps>>>;
|
372
|
+
DisplayIf: React$1.FC<DisplayIfProps<TFieldValues>>;
|
373
|
+
ArrayField: React$1.FC<ArrayFieldProps<TFieldValues> & React$1.RefAttributes<UseArrayFieldReturn>>;
|
374
|
+
ObjectField: React$1.FC<ObjectFieldProps<TFieldValues>>;
|
375
|
+
}
|
376
|
+
interface UseStepFormProps<TSteps extends StepsOptions<any> = StepsOptions<any>, TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends Omit<UseStepperProps, 'onChange'>, Omit<FormProps<any, TFieldValues, TContext, TFieldTypes>, 'children'> {
|
377
|
+
steps?: TSteps;
|
378
|
+
children: MaybeRenderProp<StepFormRenderContext<TSteps, TFieldValues, TContext, TFieldTypes>>;
|
379
|
+
}
|
380
|
+
interface UseStepFormReturn<TFieldValues extends FieldValues = FieldValues> extends UseStepperReturn {
|
381
|
+
getFormProps(): {
|
382
|
+
onSubmit: SubmitHandler<TFieldValues>;
|
383
|
+
schema?: any;
|
384
|
+
resolver?: any;
|
385
|
+
};
|
386
|
+
updateStep(step: any): void;
|
387
|
+
steps: Record<string, any>;
|
336
388
|
}
|
337
389
|
|
338
390
|
type Options = {
|
@@ -348,8 +400,8 @@ type Options = {
|
|
348
400
|
declare const getFieldsFromSchema: (schema: zod.ZodTypeAny) => FieldProps$1[];
|
349
401
|
declare const getNestedSchema: (schema: zod.ZodTypeAny, path: string) => any;
|
350
402
|
declare const zodFieldResolver: <T extends zod.ZodTypeAny>(schema: T) => {
|
351
|
-
getFields(): FieldProps$1
|
352
|
-
getNestedFields(name: string): FieldProps$1
|
403
|
+
getFields(): FieldProps$1[];
|
404
|
+
getNestedFields(name: string): FieldProps$1[];
|
353
405
|
};
|
354
406
|
interface ZodMeta {
|
355
407
|
label: string;
|
@@ -363,246 +415,137 @@ interface CreateZodFormProps<FieldDefs> extends CreateFormProps<FieldDefs> {
|
|
363
415
|
schemaOptions?: ResolverArgs[1];
|
364
416
|
resolverOptions?: ResolverArgs[2];
|
365
417
|
}
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
374
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
375
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
376
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
377
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
378
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
379
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
380
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
381
|
-
} : Omit<{
|
382
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
383
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
384
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
385
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
386
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
387
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
388
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
389
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
390
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
391
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
392
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
393
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
394
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
395
|
-
}, keyof FieldDefs> & FieldDefs) extends infer T ? { [K in keyof T]: (FieldDefs extends never ? {
|
396
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
397
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
398
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
399
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
400
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
401
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
402
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
403
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
404
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
405
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
406
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
407
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
408
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
409
|
-
} : Omit<{
|
410
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
411
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
412
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
413
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
414
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
415
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
416
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
417
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
418
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
419
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
420
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
421
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
422
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
423
|
-
}, keyof FieldDefs> & FieldDefs)[K] extends react.FC<infer Props> ? {
|
424
|
-
type?: K | undefined;
|
425
|
-
} & Omit<Props, keyof _saas_ui_forms.BaseFieldProps<TFieldValues, TName>> & _saas_ui_forms.BaseFieldProps<z.TypeOf<TSchema>, react_hook_form.Path<z.TypeOf<TSchema>>> : never; } : never)[keyof (FieldDefs extends never ? {
|
426
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
427
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
428
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
429
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
430
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
431
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
432
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
433
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
434
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
435
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
436
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
437
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
438
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
439
|
-
} : Omit<{
|
440
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
441
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
442
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
443
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
444
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
445
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
446
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
447
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
448
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
449
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
450
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
451
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
452
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
453
|
-
}, keyof FieldDefs> & FieldDefs)]>) => react.ReactNode);
|
454
|
-
fields?: ({ [K_1 in react_hook_form.Path<z.TypeOf<TSchema>> | (react_hook_form.Path<z.TypeOf<TSchema>> extends infer T_1 ? T_1 extends react_hook_form.Path<z.TypeOf<TSchema>> ? T_1 extends string ? (string extends T_1 ? (T_1 & string)[] : T_1 extends infer T_2 ? T_2 extends T_1 ? T_2 extends "" ? [] : T_2 extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_2] : never : never) extends infer T_4 ? T_4 extends (string extends T_1 ? (T_1 & string)[] : T_1 extends infer T_2 ? T_2 extends T_1 ? T_2 extends "" ? [] : T_2 extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_3}.${infer U}` ? [T_3, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_2] : never : never) ? T_4 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_5 ? T_5 extends R ? T_5 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_6 ? T_6 extends R ? T_6 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_7 ? T_7 extends R ? T_7 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_8 ? T_8 extends R ? T_8 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_9 ? T_9 extends R ? T_9 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_10 ? T_10 extends R ? T_10 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_11 ? T_11 extends R ? T_11 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_12 ? T_12 extends R ? T_12 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_13 ? T_13 extends R ? T_13 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_14 ? T_14 extends R ? T_14 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)]?: Omit<((FieldDefs extends never ? {
|
455
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
456
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
457
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
458
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
459
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
460
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
461
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
462
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
463
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
464
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
465
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
466
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
467
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
468
|
-
} : Omit<{
|
469
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
470
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
471
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
472
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
473
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
474
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
475
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
476
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
477
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
478
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
479
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
480
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
481
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
482
|
-
}, keyof FieldDefs> & FieldDefs) extends infer T_15 ? { [K_2 in keyof T_15]: (FieldDefs extends never ? {
|
483
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
484
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
485
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
486
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
487
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
488
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
489
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
490
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
491
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
492
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
493
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
494
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
495
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
496
|
-
} : Omit<{
|
497
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
498
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
499
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
500
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
501
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
502
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
503
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
504
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
505
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
506
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
507
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
508
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
509
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
510
|
-
}, keyof FieldDefs> & FieldDefs)[K_2] extends react.FC<infer Props> ? {
|
511
|
-
type?: K_2 | undefined;
|
512
|
-
} & Omit<Props, keyof _saas_ui_forms.BaseFieldProps<TFieldValues, TName>> & _saas_ui_forms.BaseFieldProps<z.TypeOf<TSchema>, react_hook_form.Path<z.TypeOf<TSchema>>> : never; } : never)[keyof (FieldDefs extends never ? {
|
513
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
514
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
515
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
516
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
517
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
518
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
519
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
520
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
521
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
522
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
523
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
524
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
525
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
526
|
-
} : Omit<{
|
527
|
-
text: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
528
|
-
email: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
529
|
-
url: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
530
|
-
phone: react.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
531
|
-
number: react.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
532
|
-
password: react.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
533
|
-
textarea: react.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
534
|
-
switch: react.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
535
|
-
select: react.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
536
|
-
checkbox: react.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
537
|
-
radio: react.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
538
|
-
pin: react.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
539
|
-
'native-select': react.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
|
540
|
-
}, keyof FieldDefs> & FieldDefs)], "name"> | undefined; } & {
|
541
|
-
submit?: _saas_ui_forms.SubmitButtonProps | undefined;
|
542
|
-
}) | undefined;
|
543
|
-
} & {
|
544
|
-
ref?: react.ForwardedRef<HTMLFormElement> | undefined;
|
545
|
-
}) => React.ReactElement;
|
418
|
+
type ZodFormType<FieldDefs, ExtraProps = object, ExtraOverrides = object, Type extends 'zod' = 'zod'> = (<TSchema extends z.AnyZodObject = z.AnyZodObject, TFieldValues extends z.infer<TSchema> = z.infer<TSchema>, TContext extends object = object>(props: WithFields<FormProps$1<TSchema, TFieldValues, TContext>, FieldDefs, ExtraOverrides> & {
|
419
|
+
ref?: React.ForwardedRef<HTMLFormElement>;
|
420
|
+
} & ExtraProps) => React.ReactElement) & {
|
421
|
+
displayName?: string;
|
422
|
+
id?: string;
|
423
|
+
};
|
424
|
+
declare const createZodForm: <FieldDefs>(options?: CreateZodFormProps<FieldDefs> | undefined) => ZodFormType<FieldDefs, object, object, "zod">;
|
546
425
|
|
547
|
-
declare const Form: <
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
}
|
605
|
-
|
606
|
-
}
|
426
|
+
declare const Form: ZodFormType<unknown, object, object, "zod">;
|
427
|
+
declare const StepForm: (<TSteps extends {
|
428
|
+
name: string;
|
429
|
+
schema?: zod.AnyZodObject | undefined;
|
430
|
+
}[] = {
|
431
|
+
name: string;
|
432
|
+
schema?: zod.AnyZodObject | undefined;
|
433
|
+
}[], TFieldValues extends TSteps extends [infer Step, ...infer Rest] ? Step extends {
|
434
|
+
schema: zod.AnyZodObject;
|
435
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
436
|
+
name: string;
|
437
|
+
schema?: zod.AnyZodObject | undefined;
|
438
|
+
}[] ? Rest extends infer T ? T extends Rest ? T extends [infer Step, ...infer Rest] ? Step extends {
|
439
|
+
schema: zod.AnyZodObject;
|
440
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
441
|
+
name: string;
|
442
|
+
schema?: zod.AnyZodObject | undefined;
|
443
|
+
}[] ? Rest extends infer T_1 ? T_1 extends Rest ? T_1 extends [infer Step, ...infer Rest] ? Step extends {
|
444
|
+
schema: zod.AnyZodObject;
|
445
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
446
|
+
name: string;
|
447
|
+
schema?: zod.AnyZodObject | undefined;
|
448
|
+
}[] ? Rest extends infer T_2 ? T_2 extends Rest ? T_2 extends [infer Step, ...infer Rest] ? Step extends {
|
449
|
+
schema: zod.AnyZodObject;
|
450
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
451
|
+
name: string;
|
452
|
+
schema?: zod.AnyZodObject | undefined;
|
453
|
+
}[] ? Rest extends infer T_3 ? T_3 extends Rest ? T_3 extends [infer Step, ...infer Rest] ? Step extends {
|
454
|
+
schema: zod.AnyZodObject;
|
455
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
456
|
+
name: string;
|
457
|
+
schema?: zod.AnyZodObject | undefined;
|
458
|
+
}[] ? Rest extends infer T_4 ? T_4 extends Rest ? T_4 extends [infer Step, ...infer Rest] ? Step extends {
|
459
|
+
schema: zod.AnyZodObject;
|
460
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
461
|
+
name: string;
|
462
|
+
schema?: zod.AnyZodObject | undefined;
|
463
|
+
}[] ? Rest extends infer T_5 ? T_5 extends Rest ? T_5 extends [infer Step, ...infer Rest] ? Step extends {
|
464
|
+
schema: zod.AnyZodObject;
|
465
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
466
|
+
name: string;
|
467
|
+
schema?: zod.AnyZodObject | undefined;
|
468
|
+
}[] ? Rest extends infer T_6 ? T_6 extends Rest ? T_6 extends [infer Step, ...infer Rest] ? Step extends {
|
469
|
+
schema: zod.AnyZodObject;
|
470
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
471
|
+
name: string;
|
472
|
+
schema?: zod.AnyZodObject | undefined;
|
473
|
+
}[] ? Rest extends infer T_7 ? T_7 extends Rest ? T_7 extends [infer Step, ...infer Rest] ? Step extends {
|
474
|
+
schema: zod.AnyZodObject;
|
475
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
476
|
+
name: string;
|
477
|
+
schema?: zod.AnyZodObject | undefined;
|
478
|
+
}[] ? Rest extends infer T_8 ? T_8 extends Rest ? T_8 extends [infer Step, ...infer Rest] ? Step extends {
|
479
|
+
schema: zod.AnyZodObject;
|
480
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
481
|
+
name: string;
|
482
|
+
schema?: zod.AnyZodObject | undefined;
|
483
|
+
}[] ? Rest extends infer T_9 ? T_9 extends Rest ? T_9 extends [infer Step, ...infer Rest] ? Step extends {
|
484
|
+
schema: zod.AnyZodObject;
|
485
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
486
|
+
name: string;
|
487
|
+
schema?: zod.AnyZodObject | undefined;
|
488
|
+
}[] ? 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 {
|
489
|
+
schema: zod.AnyZodObject;
|
490
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
491
|
+
name: string;
|
492
|
+
schema?: zod.AnyZodObject | undefined;
|
493
|
+
}[] ? Rest extends infer T_10 ? T_10 extends Rest ? T_10 extends [infer Step, ...infer Rest] ? Step extends {
|
494
|
+
schema: zod.AnyZodObject;
|
495
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
496
|
+
name: string;
|
497
|
+
schema?: zod.AnyZodObject | undefined;
|
498
|
+
}[] ? Rest extends infer T_11 ? T_11 extends Rest ? T_11 extends [infer Step, ...infer Rest] ? Step extends {
|
499
|
+
schema: zod.AnyZodObject;
|
500
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
501
|
+
name: string;
|
502
|
+
schema?: zod.AnyZodObject | undefined;
|
503
|
+
}[] ? Rest extends infer T_12 ? T_12 extends Rest ? T_12 extends [infer Step, ...infer Rest] ? Step extends {
|
504
|
+
schema: zod.AnyZodObject;
|
505
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
506
|
+
name: string;
|
507
|
+
schema?: zod.AnyZodObject | undefined;
|
508
|
+
}[] ? Rest extends infer T_13 ? T_13 extends Rest ? T_13 extends [infer Step, ...infer Rest] ? Step extends {
|
509
|
+
schema: zod.AnyZodObject;
|
510
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
511
|
+
name: string;
|
512
|
+
schema?: zod.AnyZodObject | undefined;
|
513
|
+
}[] ? Rest extends infer T_14 ? T_14 extends Rest ? T_14 extends [infer Step, ...infer Rest] ? Step extends {
|
514
|
+
schema: zod.AnyZodObject;
|
515
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
516
|
+
name: string;
|
517
|
+
schema?: zod.AnyZodObject | undefined;
|
518
|
+
}[] ? Rest extends infer T_15 ? T_15 extends Rest ? T_15 extends [infer Step, ...infer Rest] ? Step extends {
|
519
|
+
schema: zod.AnyZodObject;
|
520
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
521
|
+
name: string;
|
522
|
+
schema?: zod.AnyZodObject | undefined;
|
523
|
+
}[] ? Rest extends infer T_16 ? T_16 extends Rest ? T_16 extends [infer Step, ...infer Rest] ? Step extends {
|
524
|
+
schema: zod.AnyZodObject;
|
525
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
526
|
+
name: string;
|
527
|
+
schema?: zod.AnyZodObject | undefined;
|
528
|
+
}[] ? Rest extends infer T_17 ? T_17 extends Rest ? T_17 extends [infer Step, ...infer Rest] ? Step extends {
|
529
|
+
schema: zod.AnyZodObject;
|
530
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
531
|
+
name: string;
|
532
|
+
schema?: zod.AnyZodObject | undefined;
|
533
|
+
}[] ? Rest extends infer T_18 ? T_18 extends Rest ? T_18 extends [infer Step, ...infer Rest] ? Step extends {
|
534
|
+
schema: zod.AnyZodObject;
|
535
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
536
|
+
name: string;
|
537
|
+
schema?: zod.AnyZodObject | undefined;
|
538
|
+
}[] ? Rest extends infer T_19 ? T_19 extends Rest ? T_19 extends [infer Step, ...infer Rest] ? Step extends {
|
539
|
+
schema: zod.AnyZodObject;
|
540
|
+
} ? zod.TypeOf<Step["schema"]> & (Rest extends {
|
541
|
+
name: string;
|
542
|
+
schema?: zod.AnyZodObject | undefined;
|
543
|
+
}[] ? 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: UseStepFormProps<TSteps, TFieldValues, TContext, FieldProps<TFieldValues>> & {
|
544
|
+
steps: TSteps;
|
545
|
+
ref?: React$1.ForwardedRef<HTMLFormElement> | undefined;
|
546
|
+
}) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>) & {
|
547
|
+
displayName?: string | undefined;
|
548
|
+
id?: string | undefined;
|
549
|
+
};
|
607
550
|
|
608
|
-
export { Form, Options, ZodMeta, createZodForm, getFieldsFromSchema, getNestedSchema, zodFieldResolver, zodMeta, zodParseMeta };
|
551
|
+
export { Form, Options, StepForm, ZodFormType, ZodMeta, createZodForm, getFieldsFromSchema, getNestedSchema, zodFieldResolver, zodMeta, zodParseMeta };
|