@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.
@@ -1,420 +1,17 @@
1
- import * as _chakra_ui_button_dist_button from '@chakra-ui/button/dist/button';
1
+ import * as _chakra_ui_button from '@chakra-ui/button';
2
2
  import * as _saas_ui_modals from '@saas-ui/modals';
3
3
  import { BaseModalProps } from '@saas-ui/modals';
4
- import * as _chakra_ui_checkbox_dist_checkbox from '@chakra-ui/checkbox/dist/checkbox';
4
+ import * as _chakra_ui_checkbox from '@chakra-ui/checkbox';
5
5
  import * as react_hook_form from 'react-hook-form';
6
- import { FieldValues, FieldPath, RegisterOptions, SubmitHandler, UseFieldArrayReturn, UseFormReturn, UseFormProps, WatchObserver, SubmitErrorHandler } from 'react-hook-form';
7
- import * as React$1 from 'react';
8
- import React$1__default from 'react';
9
- import { InputProps, RadioGroupProps, SelectProps as SelectProps$1, TextareaProps, SwitchProps, UsePinInputProps, SystemProps, ButtonProps, ResponsiveValue, FormControlProps, HTMLChakraProps, NumberInputProps as NumberInputProps$1, StackDirection, MenuProps, ThemingProps, MenuListProps, NumberInputFieldProps as NumberInputFieldProps$1, MenuItemOptionProps, RadioProps, CheckboxProps } from '@chakra-ui/react';
10
- import { UseStepperProps, UseStepperReturn } from '@saas-ui/core';
11
- import { FocusableElement } from '@chakra-ui/utils';
12
- import { MaybeRenderProp } from '@chakra-ui/react-utils';
13
- import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
6
+ import * as react from 'react';
7
+ import react__default from 'react';
8
+ import * as dist from 'dist';
14
9
  import * as yup from 'yup';
15
- import { ObjectSchema, InferType } from 'yup';
16
- import { FieldProps as FieldProps$1, GetFieldResolver, WithFields, FormProps as FormProps$1, CreateFormProps, CreateStepFormProps, StepsOptions as StepsOptions$1, WithStepFields, UseStepFormProps as UseStepFormProps$1 } from '@saas-ui/forms';
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';
17
12
  import { yupResolver } from '@hookform/resolvers/yup';
18
13
  export { yupResolver } from '@hookform/resolvers/yup';
19
14
 
20
- interface NumberInputOptions {
21
- /**
22
- * Hide the stepper. This will be true when `rightAddon` is provided.
23
- */
24
- hideStepper?: boolean;
25
- /**
26
- * Render a custom increment icon.
27
- */
28
- incrementIcon?: React$1.ReactNode;
29
- /**
30
- * Render a custom decrement icon.
31
- */
32
- decrementIcon?: React$1.ReactNode;
33
- /**
34
- * The placeholder text when no value is selected.
35
- */
36
- placeholder?: string;
37
- /**
38
- * Props to pass to the NumberInputField component.
39
- */
40
- fieldProps?: NumberInputFieldProps$1;
41
- /**
42
- * Either `InputLeftAddon` or `InputLeftElement`
43
- */
44
- leftAddon?: React$1.ReactNode;
45
- /**
46
- * Either `InputRightAddon` or `InputRightElement`
47
- */
48
- rightAddon?: React$1.ReactNode;
49
- }
50
- interface NumberInputProps extends NumberInputProps$1, NumberInputOptions {
51
- }
52
-
53
- interface PasswordOptions {
54
- viewIcon?: React$1__default.ReactNode;
55
- viewOffIcon?: React$1__default.ReactNode;
56
- leftAddon?: React$1__default.ReactNode;
57
- }
58
- interface PasswordInputProps extends InputProps, PasswordOptions {
59
- }
60
-
61
- interface RadioOption extends Omit<RadioProps, 'value' | 'label'>, FieldOption {
62
- }
63
- type RadioOptions = FieldOptions<RadioOption>;
64
- interface RadioInputOptions {
65
- options: RadioOptions;
66
- spacing?: SystemProps['margin'];
67
- direction?: StackDirection;
68
- }
69
- interface RadioInputProps extends Omit<RadioGroupProps, 'children'>, RadioInputOptions {
70
- }
71
-
72
- interface SelectOptions {
73
- /**
74
- * The name of the input field in a native form.
75
- */
76
- name: string;
77
- /**
78
- * The value of the select field.
79
- */
80
- value?: string | string[];
81
- /**
82
- * The initial value of the select field.
83
- */
84
- defaultValue?: string | string[];
85
- /**
86
- * The callback invoked when the value of the select field changes.
87
- * @param value The value of the select field.
88
- */
89
- onChange?: (value: string | string[]) => void;
90
- /**
91
- * The placeholder text when there's no value.
92
- */
93
- placeholder?: string;
94
- /**
95
- * If `true`, the select will be disabled.
96
- */
97
- isDisabled?: boolean;
98
- /**
99
- * An array of options
100
- * If you leave this empty the children prop will be rendered.
101
- */
102
- options?: FieldOptions<SelectOption>;
103
- /**
104
- * Enable multiple select.
105
- */
106
- multiple?: boolean;
107
- /**
108
- * The function used to render the value of the select field.
109
- * @param value The value of the select field.
110
- * @returns The rendered value.
111
- */
112
- renderValue?: (value: string | string[]) => React$1__default.ReactNode;
113
- }
114
-
115
- interface SelectProps extends Omit<MenuProps, 'children' | 'variant' | 'size'>, ThemingProps<'SuiSelect'>, SelectOptions {
116
- }
117
- interface SelectButtonProps extends Omit<ButtonProps, 'size' | 'variant'> {
118
- }
119
- interface SelectListProps extends MenuListProps {
120
- }
121
- interface SelectOption extends Omit<MenuItemOptionProps, 'value'>, FieldOption {
122
- }
123
- /**
124
- * An option in a select list
125
- *
126
- * @see https://saas-ui.dev/docs/components/forms/select
127
- */
128
- declare const SelectOption: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", MenuItemOptionProps>;
129
-
130
- interface Option$1 {
131
- value: string;
132
- label?: string;
133
- }
134
- interface NativeSelectOptions {
135
- options?: Option$1[];
136
- }
137
- interface NativeSelectProps extends SelectProps$1, NativeSelectOptions {
138
- }
139
-
140
- interface InputFieldProps extends InputProps {
141
- type?: string;
142
- leftAddon?: React$1.ReactNode;
143
- rightAddon?: React$1.ReactNode;
144
- }
145
- interface NumberInputFieldProps extends NumberInputProps {
146
- type: 'number';
147
- }
148
- interface TextareaFieldProps extends TextareaProps {
149
- }
150
- interface SwitchFieldProps extends SwitchProps {
151
- }
152
- interface SelectFieldProps extends SelectProps {
153
- buttonProps?: SelectButtonProps;
154
- listProps?: SelectListProps;
155
- }
156
- interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {
157
- pinLength?: number;
158
- pinType?: 'alphanumeric' | 'number';
159
- spacing?: SystemProps['margin'];
160
- }
161
- declare const defaultFieldTypes: {
162
- text: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
163
- email: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
164
- url: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
165
- phone: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
166
- number: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps>;
167
- password: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps>;
168
- textarea: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps>;
169
- switch: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
170
- select: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps>;
171
- checkbox: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof CheckboxProps> & CheckboxProps>;
172
- radio: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps>;
173
- pin: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps>;
174
- 'native-select': React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps>;
175
- };
176
- type DefaultFields = typeof defaultFieldTypes;
177
-
178
- interface SubmitButtonProps extends ButtonProps {
179
- /**
180
- * Disable the submit button if the form is untouched.
181
- */
182
- disableIfUntouched?: boolean;
183
- /**
184
- * Disable the submit button if the form is invalid.
185
- */
186
- disableIfInvalid?: boolean;
187
- }
188
-
189
- interface ObjectFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends BaseFieldProps {
190
- name: TName;
191
- children: React$1.ReactNode;
192
- columns?: ResponsiveValue<number>;
193
- spacing?: ResponsiveValue<string | number>;
194
- }
195
-
196
- interface UseArrayFieldReturn extends UseFieldArrayReturn {
197
- /**
198
- * The array field name
199
- */
200
- name: string;
201
- /**
202
- * The default value for new items
203
- */
204
- defaultValue: Record<string, any>;
205
- /**
206
- * Min amount of items
207
- */
208
- min?: number;
209
- /**
210
- * Max amount of items
211
- */
212
- max?: number;
213
- }
214
- interface ArrayFieldOptions<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
215
- /**
216
- * The field name
217
- */
218
- name: TName;
219
- /**
220
- * Default value for new values in the array
221
- */
222
- defaultValue?: Record<string, any>;
223
- /**
224
- * Default key name for rows, change this if your data uses a different 'id' field
225
- * @default "id"
226
- */
227
- keyName?: string;
228
- min?: number;
229
- max?: number;
230
- }
231
- interface ArrayFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends ArrayFieldOptions<TFieldValues, TName>, Omit<BaseFieldProps<TFieldValues, TName>, 'name' | 'defaultValue' | 'children'> {
232
- children: MaybeRenderProp<ArrayField[]>;
233
- }
234
- interface ArrayField {
235
- id: string;
236
- [key: string]: unknown;
237
- }
238
- /**
239
- * The wrapper component that composes the default ArrayField functionality.
240
- *
241
- * @see Docs https://saas-ui.dev/docs/components/forms/array-field
242
- */
243
- declare const ArrayField: ((props: ArrayFieldProps & {
244
- ref?: React$1.ForwardedRef<UseArrayFieldReturn>;
245
- }) => React$1.ReactElement) & {
246
- displayName: string;
247
- };
248
-
249
- type FieldOption = {
250
- label?: string;
251
- value: string;
252
- };
253
- type FieldOptions<TOption extends FieldOption = FieldOption> = Array<string> | Array<TOption>;
254
- type ValueOf<T> = T[keyof T];
255
- type ShallowMerge<A, B> = Omit<A, keyof B> & B;
256
- type Split<S extends string, D extends string> = string extends S ? string[] : S extends '' ? [] : S extends `${infer T}${D}${infer U}` ? [T, ...Split<U, D>] : [S];
257
- type MapPath<T extends string[]> = T extends [infer U, ...infer R] ? U extends string ? `${U extends `${number}` ? '$' : U}${R[0] extends string ? '.' : ''}${R extends string[] ? MapPath<R> : ''}` : '' : '';
258
- type TransformPath<T extends string> = MapPath<Split<T, '.'>>;
259
- type ArrayFieldPath<Name extends string> = Name extends string ? TransformPath<Name> : never;
260
- interface BaseFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<FormControlProps, 'label' | 'type' | 'onChange'> {
261
- /**
262
- * The field name
263
- */
264
- name: TName | ArrayFieldPath<TName>;
265
- /**
266
- * The field label
267
- */
268
- label?: string;
269
- /**
270
- * Hide the field label
271
- */
272
- hideLabel?: boolean;
273
- /**
274
- * Field help text
275
- */
276
- help?: string;
277
- /**
278
- * React hook form rules
279
- */
280
- rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
281
- /**
282
- * Build-in types:
283
- * text, number, password, textarea, select, native-select, checkbox, radio, switch, pin
284
- *
285
- * Will default to a text field if there is no matching type.
286
- */
287
- type?: string;
288
- /**
289
- * The input placeholder
290
- */
291
- placeholder?: string;
292
- }
293
- type MergeFieldProps<FieldDefs, TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = ValueOf<{
294
- [K in keyof FieldDefs]: FieldDefs[K] extends React.FC<infer Props> ? {
295
- type?: K;
296
- } & ShallowMerge<Props, BaseFieldProps<TFieldValues, TName>> : never;
297
- }>;
298
- type FieldProps<TFieldValues extends FieldValues = FieldValues> = MergeFieldProps<DefaultFields, TFieldValues>;
299
- type DefaultFieldOverrides = {
300
- submit?: SubmitButtonProps;
301
- [key: string]: any;
302
- };
303
- type StepFormChildren<FieldDefs, TSteps extends StepsOptions<any> = StepsOptions<any>, TFieldValues extends FieldValues = FieldValues, TContext extends object = object> = MaybeRenderProp<StepFormRenderContext<TSteps, TFieldValues, TContext, MergeFieldProps<FieldDefs extends never ? DefaultFields : ShallowMerge<DefaultFields, FieldDefs>, TFieldValues>>>;
304
-
305
- type FieldResolver = {
306
- getFields(): BaseFieldProps[];
307
- getNestedFields(name: string): BaseFieldProps[];
308
- };
309
-
310
- interface DisplayIfProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
311
- children: React$1.ReactElement;
312
- name: TName;
313
- defaultValue?: unknown;
314
- isDisabled?: boolean;
315
- isExact?: boolean;
316
- condition?: (value: unknown, context: UseFormReturn<TFieldValues>) => boolean;
317
- onToggle?: (conditionMatched: boolean, context: UseFormReturn<TFieldValues>) => void;
318
- }
319
-
320
- interface FormRenderContext<TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends UseFormReturn<TFieldValues, TContext> {
321
- Field: React$1.FC<TFieldTypes & React$1.RefAttributes<FocusableElement>>;
322
- DisplayIf: React$1.FC<DisplayIfProps<TFieldValues>>;
323
- ArrayField: React$1.FC<ArrayFieldProps<TFieldValues> & React$1.RefAttributes<UseArrayFieldReturn>>;
324
- ObjectField: React$1.FC<ObjectFieldProps<TFieldValues>>;
325
- }
326
- interface FormOptions<TSchema = unknown, TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> {
327
- /**
328
- * The form schema.
329
- */
330
- schema?: TSchema;
331
- /**
332
- * Triggers when any of the field change.
333
- */
334
- onChange?: WatchObserver<TFieldValues>;
335
- /**
336
- * The submit handler.
337
- */
338
- onSubmit: SubmitHandler<TFieldValues>;
339
- /**
340
- * Triggers when there are validation errors.
341
- */
342
- onError?: SubmitErrorHandler<TFieldValues>;
343
- /**
344
- * The Hook Form state ref.
345
- */
346
- formRef?: React$1.RefObject<UseFormReturn<TFieldValues, TContext>>;
347
- /**
348
- * The form children, can be a render prop or a ReactNode.
349
- */
350
- children?: MaybeRenderProp<FormRenderContext<TFieldValues, TContext, TFieldTypes>>;
351
- /**
352
- * The field resolver, used to resolve the fields from schemas.
353
- */
354
- fieldResolver?: FieldResolver;
355
- /**
356
- * Field overrides
357
- */
358
- fields?: DefaultFieldOverrides;
359
- }
360
- 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> {
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> extends Omit<UseStepperProps, 'onChange'>, Omit<FormProps<any, TFieldValues, TContext>, 'children'> {
377
- steps?: TSteps;
378
- children: StepFormChildren<any, TSteps, TFieldValues, TContext>;
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>;
388
- }
389
-
390
- type StepsOptions<TSchema, TName extends string = string> = {
391
- /**
392
- * The step name
393
- */
394
- name: TName;
395
- /**
396
- * Schema
397
- */
398
- schema?: TSchema;
399
- }[];
400
- interface FormStepOptions<TName extends string = string> {
401
- /**
402
- * The step name
403
- */
404
- name: TName;
405
- /**
406
- * Schema
407
- */
408
- schema?: any;
409
- /**
410
- * Hook Form Resolver
411
- */
412
- resolver?: any;
413
- }
414
- interface FormStepProps<TName extends string = string> extends FormStepOptions<TName>, Omit<HTMLChakraProps<'div'>, 'onSubmit'> {
415
- onSubmit?: FormStepSubmitHandler;
416
- }
417
-
418
15
  type AnyObjectSchema = ObjectSchema<any, any, any, ''> | ObjectSchema<any, any, any, 'd'> | ObjectSchema<any, any, any, 's'>;
419
16
 
420
17
  type Options = {
@@ -427,46 +24,45 @@ type Options = {
427
24
  * @param schema The Yup schema
428
25
  * @returns {FieldProps[]}
429
26
  */
430
- declare const getFieldsFromSchema: (schema: AnyObjectSchema) => FieldProps$1[];
27
+ declare const getFieldsFromSchema: (schema: AnyObjectSchema) => FieldProps[];
431
28
  declare const getNestedSchema: (schema: AnyObjectSchema, path: string) => AnyObjectSchema;
432
29
  declare const yupFieldResolver: GetFieldResolver;
433
30
 
434
31
  type ResolverArgs$1 = Parameters<typeof yupResolver>;
435
- interface CreateYupFormProps$1<FieldDefs> extends CreateFormProps<FieldDefs> {
32
+ interface CreateYupFormProps$1<FieldDefs, TGetBaseField extends GetBaseField = GetBaseField> extends CreateFormProps<FieldDefs, TGetBaseField> {
436
33
  schemaOptions?: ResolverArgs$1[1];
437
34
  resolverOptions?: ResolverArgs$1[2];
438
35
  }
439
- type YupFormType<FieldDefs, ExtraProps = object, ExtraOverrides = object, Type extends 'yup' = 'yup'> = (<TSchema extends AnyObjectSchema = AnyObjectSchema, TFieldValues extends InferType<TSchema> = InferType<TSchema>, // placeholder
440
- TContext extends object = object>(props: WithFields<FormProps$1<TFieldValues, TContext, TSchema>, FieldDefs, ExtraOverrides> & {
441
- ref?: React$1__default.ForwardedRef<HTMLFormElement>;
442
- } & ExtraProps) => React$1__default.ReactElement) & {
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) & {
443
39
  displayName?: string;
444
40
  id?: 'YupForm';
445
41
  };
446
- declare const createYupForm: <FieldDefs>(options?: CreateYupFormProps$1<FieldDefs> | undefined) => YupFormType<FieldDefs, object, object, "yup">;
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">;
447
43
 
448
44
  type ResolverArgs = Parameters<typeof yupResolver>;
449
- interface CreateYupFormProps<FieldDefs> extends CreateStepFormProps<FieldDefs> {
45
+ interface CreateYupFormProps<FieldDefs, TGetBaseField extends GetBaseField = GetBaseField> extends CreateStepFormProps<FieldDefs, TGetBaseField> {
450
46
  schemaOptions?: ResolverArgs[1];
451
47
  resolverOptions?: ResolverArgs[2];
452
48
  }
453
- type InferStepType<T extends Required<StepsOptions$1<AnyObjectSchema>>> = T extends [infer Step, ...infer Rest] ? Step extends {
49
+ type InferStepType<T extends Required<StepsOptions<AnyObjectSchema>>> = T extends [infer Step, ...infer Rest] ? Step extends {
454
50
  schema: AnyObjectSchema;
455
- } ? InferType<Step['schema']> & (Rest extends Required<StepsOptions$1<AnyObjectSchema>> ? InferStepType<Rest> : object) : object : object;
456
- type YupStepFormType<FieldDefs, ExtraProps = object, ExtraOverrides = object> = (<TSteps extends Required<StepsOptions$1<AnyObjectSchema>> = Required<StepsOptions$1<AnyObjectSchema>>, TFieldValues extends InferStepType<TSteps> = InferStepType<TSteps>, TContext extends object = object>(props: WithStepFields<UseStepFormProps$1<TSteps, TFieldValues, TContext>, FieldDefs, ExtraOverrides> & {
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> & {
457
53
  steps: TSteps;
458
- ref?: React$1__default.ForwardedRef<HTMLFormElement>;
459
- } & ExtraProps) => React$1__default.ReactElement) & {
54
+ ref?: react__default.ForwardedRef<HTMLFormElement>;
55
+ } & ExtraProps) => react__default.ReactElement) & {
460
56
  displayName?: string;
461
57
  id?: string;
462
58
  };
463
- declare const createYupStepForm: <FieldDefs>(options?: CreateYupFormProps<FieldDefs> | undefined) => YupStepFormType<FieldDefs, object, object>;
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>;
464
60
 
465
- declare function createYupFormDialog<FieldDefs = any, ExtraProps = object, ExtraOverrides = object>(Form: YupFormType<FieldDefs, ExtraProps, ExtraOverrides>): YupFormType<FieldDefs, ExtraProps & Omit<BaseModalProps, "children">, ExtraOverrides & DefaultFieldOverrides & {
466
- cancel?: _chakra_ui_button_dist_button.ButtonProps | undefined;
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;
467
63
  }>;
468
64
 
469
- declare const Form: YupFormType<unknown, object, object, "yup">;
65
+ declare const Form: YupFormType<unknown, object, any, object, "yup">;
470
66
  declare const StepForm: (<TSteps extends {
471
67
  name: string;
472
68
  schema?: AnyObjectSchema | undefined;
@@ -583,76 +179,76 @@ declare const StepForm: (<TSteps extends {
583
179
  } ? yup.Asserts<Step["schema"]> & (Rest extends {
584
180
  name: string;
585
181
  schema?: AnyObjectSchema | undefined;
586
- }[] ? 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<UseStepFormProps<TSteps, TFieldValues, TContext>, "children" | "fields"> & {
587
- children?: React$1.ReactNode | ((props: StepFormRenderContext<TSteps, TFieldValues, TContext, ({
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, ({
588
184
  type?: "number" | undefined;
589
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
590
- type?: "text" | undefined;
591
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
592
- type?: "email" | undefined;
593
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
594
- type?: "url" | undefined;
595
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
596
- type?: "phone" | undefined;
597
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
598
- type?: "password" | undefined;
599
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
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) | ({
600
188
  type?: "textarea" | undefined;
601
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
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) | ({
602
190
  type?: "switch" | undefined;
603
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
604
- type?: "select" | undefined;
605
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
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) | ({
606
194
  type?: "checkbox" | undefined;
607
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof _chakra_ui_checkbox_dist_checkbox.CheckboxProps> & _chakra_ui_checkbox_dist_checkbox.CheckboxProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
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) | ({
608
196
  type?: "radio" | undefined;
609
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
610
- type?: "pin" | undefined;
611
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>) | ({
612
- type?: "native-select" | undefined;
613
- } & Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps, keyof BaseFieldProps<TFieldValues_1, TName>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>)>) => React$1.ReactNode);
614
- 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 & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : 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 & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_22}.${infer U}` ? [T_22, ...string extends U ? (U & string)[] : 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)]?: (({
615
- type?: "number" | undefined;
616
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
617
- type?: "text" | undefined;
618
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
619
- type?: "email" | undefined;
620
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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) | ({
621
198
  type?: "url" | undefined;
622
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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) | ({
623
202
  type?: "phone" | undefined;
624
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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) | ({
625
204
  type?: "password" | undefined;
626
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
627
215
  type?: "textarea" | undefined;
628
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
629
217
  type?: "switch" | undefined;
630
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
631
- type?: "select" | undefined;
632
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
633
221
  type?: "checkbox" | undefined;
634
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof _chakra_ui_checkbox_dist_checkbox.CheckboxProps> & _chakra_ui_checkbox_dist_checkbox.CheckboxProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
635
223
  type?: "radio" | undefined;
636
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
637
233
  type?: "pin" | undefined;
638
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">) | ({
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">) | ({
639
235
  type?: "native-select" | undefined;
640
- } & Omit<Omit<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps, keyof BaseFieldProps<TFieldValues_2, TName_1>> & BaseFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name">)) | ({
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">)) | ({
641
237
  type?: "object" | undefined;
642
- } & Omit<ObjectFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "children" | "name">) | ({
238
+ } & Omit<dist.ObjectFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name" | "children">) | ({
643
239
  type?: "array" | undefined;
644
- } & Omit<ArrayFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "children" | "name">) | undefined; } & {
645
- submit?: SubmitButtonProps | undefined;
240
+ } & Omit<dist.ArrayFieldProps<TFieldValues, react_hook_form.Path<TFieldValues>>, "name" | "children">) | undefined; } & {
241
+ submit?: dist.SubmitButtonProps | undefined;
646
242
  } & object) | undefined;
647
243
  } & {
648
244
  steps: TSteps;
649
- ref?: React$1.ForwardedRef<HTMLFormElement> | undefined;
650
- } & object) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>) & {
245
+ ref?: react.ForwardedRef<HTMLFormElement> | undefined;
246
+ } & object) => react.ReactElement<any, string | react.JSXElementConstructor<any>>) & {
651
247
  displayName?: string | undefined;
652
248
  id?: string | undefined;
653
249
  };
654
- declare const FormDialog: YupFormType<unknown, object & Omit<_saas_ui_modals.BaseModalProps, "children">, object & DefaultFieldOverrides & {
655
- cancel?: _chakra_ui_button_dist_button.ButtonProps | undefined;
250
+ declare const FormDialog: YupFormType<unknown, object & Omit<_saas_ui_modals.BaseModalProps, "children">, any, object & dist.DefaultFieldOverrides & {
251
+ cancel?: _chakra_ui_button.ButtonProps | undefined;
656
252
  }>;
657
253
 
658
- export { AnyObjectSchema, Form, FormDialog, Options, StepForm, YupFormType, createYupForm, createYupFormDialog, createYupStepForm, getFieldsFromSchema, getNestedSchema, yupFieldResolver };
254
+ export { type AnyObjectSchema, Form, FormDialog, type Options, StepForm, type YupFormType, createYupForm, createYupFormDialog, createYupStepForm, getFieldsFromSchema, getNestedSchema, yupFieldResolver };