@saas-ui/forms 2.0.0-next.13 → 2.0.0-next.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,339 +1,9 @@
1
- import * as _chakra_ui_checkbox_dist_checkbox from '@chakra-ui/checkbox/dist/checkbox';
2
- import * as _chakra_ui_switch_dist_switch from '@chakra-ui/switch/dist/switch';
3
- import * as _chakra_ui_textarea_dist_textarea from '@chakra-ui/textarea/dist/textarea';
4
- import * as react_hook_form from 'react-hook-form';
5
- import { FieldValues, FieldPath, RegisterOptions, UseFormReturn, UseFormProps, UseFieldArrayReturn, WatchObserver, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';
6
- import * as React$1 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';
11
- import { MaybeRenderProp } from '@chakra-ui/react-utils';
12
- import * as yup from 'yup';
1
+ import * as _saas_ui_forms_yup from '@saas-ui/forms/yup';
2
+ import { FieldProps, GetFieldResolver, FieldValues, WithFields, FormProps, CreateFormProps } from '@saas-ui/forms';
13
3
  import { ObjectSchema, InferType } from 'yup';
14
- import * as _saas_ui_forms from '@saas-ui/forms';
15
- import { FieldProps as FieldProps$1, GetFieldResolver, FormProps as FormProps$1, CreateFormProps } from '@saas-ui/forms';
16
4
  import { yupResolver } from '@hookform/resolvers/yup';
17
5
  export { yupResolver } from '@hookform/resolvers/yup';
18
-
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
- interface NumberInputOptions {
37
- /**
38
- * Hide the stepper.
39
- */
40
- hideStepper?: boolean;
41
- /**
42
- * Render a custom increment icon.
43
- */
44
- incrementIcon?: React$1.ReactNode;
45
- /**
46
- * Render a custom decrement icon.
47
- */
48
- decrementIcon?: React$1.ReactNode;
49
- }
50
- interface NumberInputProps extends NumberInputProps$1, NumberInputOptions {
51
- }
52
-
53
- interface PasswordOptions {
54
- viewIcon?: React__default.ReactNode;
55
- viewOffIcon?: React__default.ReactNode;
56
- leftAddon?: React__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__default.ReactNode;
113
- }
114
-
115
- interface SelectProps extends Omit<MenuProps, 'children'>, SelectOptions {
116
- }
117
- interface SelectOption extends Omit<MenuItemOptionProps, 'value'>, FieldOption {
118
- }
119
- /**
120
- * An option in a select list
121
- *
122
- * @see https://saas-ui.dev/docs/components/forms/select
123
- */
124
- declare const SelectOption: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", MenuItemOptionProps>;
125
-
126
- interface Option$1 {
127
- value: string;
128
- label?: string;
129
- }
130
- interface NativeSelectOptions {
131
- options?: Option$1[];
132
- }
133
- interface NativeSelectProps extends SelectProps$1, NativeSelectOptions {
134
- }
135
-
136
- interface InputFieldProps extends InputProps {
137
- type?: string;
138
- leftAddon?: React$1.ReactNode;
139
- rightAddon?: React$1.ReactNode;
140
- }
141
- interface NumberInputFieldProps extends NumberInputProps {
142
- type: 'number';
143
- }
144
- interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {
145
- pinLength?: number;
146
- pinType?: 'alphanumeric' | 'number';
147
- spacing?: SystemProps['margin'];
148
- }
149
- declare const defaultFieldTypes: {
150
- text: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
151
- email: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
152
- url: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
153
- phone: React$1.FC<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
154
- number: React$1.FC<NumberInputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
155
- password: React$1.FC<PasswordInputProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
156
- textarea: React$1.FC<TextareaProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
157
- switch: React$1.FC<SwitchProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
158
- select: React$1.FC<SelectProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
159
- checkbox: React$1.FC<CheckboxProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
160
- radio: React$1.FC<RadioInputProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
161
- pin: React$1.FC<PinFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
162
- 'native-select': React$1.FC<NativeSelectProps & BaseFieldProps<react_hook_form.FieldValues, string>>;
163
- };
164
- type DefaultFields = typeof defaultFieldTypes;
165
-
166
- type FieldOption = {
167
- label?: string;
168
- value: string;
169
- };
170
- type FieldOptions<TOption extends FieldOption = FieldOption> = Array<string> | Array<TOption>;
171
- type ValueOf<T> = T[keyof T];
172
- type ShallowMerge<A, B> = Omit<A, keyof B> & B;
173
- 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];
174
- 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> : ''}` : '' : '';
175
- type TransformPath<T extends string> = MapPath<Split<T, '.'>>;
176
- type ArrayFieldPath<Name extends string> = Name extends string ? TransformPath<Name> : never;
177
- interface BaseFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<FormControlProps, 'label' | 'type'> {
178
- /**
179
- * The field name
180
- */
181
- name: TName | ArrayFieldPath<TName>;
182
- /**
183
- * The field label
184
- */
185
- label?: string;
186
- /**
187
- * Hide the field label
188
- */
189
- hideLabel?: boolean;
190
- /**
191
- * Field help text
192
- */
193
- help?: string;
194
- /**
195
- * React hook form rules
196
- */
197
- rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
198
- /**
199
- * Build-in types:
200
- * text, number, password, textarea, select, native-select, checkbox, radio, switch, pin
201
- *
202
- * Will default to a text field if there is no matching type.
203
- */
204
- type?: string;
205
- /**
206
- * The input placeholder
207
- */
208
- placeholder?: string;
209
- }
210
- type MergeFieldProps<FieldDefs, TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = ValueOf<{
211
- [K in keyof FieldDefs]: FieldDefs[K] extends React.FC<infer Props> ? {
212
- type?: K;
213
- } & ShallowMerge<Props, BaseFieldProps<TFieldValues, TName>> : never;
214
- }>;
215
- type FieldProps<TFieldValues extends FieldValues = FieldValues> = MergeFieldProps<DefaultFields, TFieldValues>;
216
- type DefaultFieldOverrides = {
217
- submit?: SubmitButtonProps;
218
- [key: string]: any;
219
- };
220
-
221
- type FieldResolver = {
222
- getFields(): BaseFieldProps[];
223
- getNestedFields(name: string): BaseFieldProps[];
224
- };
225
-
226
- interface DisplayIfProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
227
- children: React$1.ReactElement;
228
- name: TName;
229
- defaultValue?: unknown;
230
- isDisabled?: boolean;
231
- isExact?: boolean;
232
- condition?: (value: unknown, context: UseFormReturn<TFieldValues>) => boolean;
233
- }
234
-
235
- interface UseArrayFieldReturn extends UseFieldArrayReturn {
236
- /**
237
- * The array field name
238
- */
239
- name: string;
240
- /**
241
- * The default value for new items
242
- */
243
- defaultValue: Record<string, any>;
244
- /**
245
- * Min amount of items
246
- */
247
- min?: number;
248
- /**
249
- * Max amount of items
250
- */
251
- max?: number;
252
- }
253
- interface ArrayFieldOptions<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
254
- /**
255
- * The field name
256
- */
257
- name: TName;
258
- /**
259
- * Default value for new values in the array
260
- */
261
- defaultValue?: Record<string, any>;
262
- /**
263
- * Default key name for rows, change this if your data uses a different 'id' field
264
- * @default "id"
265
- */
266
- keyName?: string;
267
- min?: number;
268
- max?: number;
269
- }
270
- interface ArrayFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends ArrayFieldOptions<TFieldValues, TName>, Omit<BaseFieldProps<TFieldValues, TName>, 'name' | 'defaultValue' | 'children'> {
271
- children: MaybeRenderProp<ArrayField[]>;
272
- }
273
- interface ArrayField {
274
- id: string;
275
- [key: string]: unknown;
276
- }
277
- /**
278
- * The wrapper component that composes the default ArrayField functionality.
279
- *
280
- * @see Docs https://saas-ui.dev/docs/components/forms/array-field
281
- */
282
- declare const ArrayField: ((props: ArrayFieldProps & {
283
- ref?: React$1.ForwardedRef<UseArrayFieldReturn>;
284
- }) => React$1.ReactElement) & {
285
- displayName: string;
286
- };
287
-
288
- interface ObjectFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends BaseFieldProps {
289
- name: TName;
290
- children: React$1.ReactNode;
291
- columns?: ResponsiveValue<number>;
292
- spacing?: ResponsiveValue<string | number>;
293
- }
294
-
295
- interface FormRenderContext<TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TFieldTypes = FieldProps<TFieldValues>> extends UseFormReturn<TFieldValues, TContext> {
296
- Field: React$1.FC<TFieldTypes & React$1.RefAttributes<FocusableElement>>;
297
- DisplayIf: React$1.FC<DisplayIfProps<TFieldValues>>;
298
- ArrayField: React$1.FC<ArrayFieldProps<TFieldValues> & React$1.RefAttributes<UseArrayFieldReturn>>;
299
- ObjectField: React$1.FC<ObjectFieldProps<TFieldValues>>;
300
- }
301
- interface FormOptions<TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TSchema = any, TFieldTypes = FieldProps<TFieldValues>> {
302
- /**
303
- * The form schema.
304
- */
305
- schema?: TSchema;
306
- /**
307
- * Triggers when any of the field change.
308
- */
309
- onChange?: WatchObserver<TFieldValues>;
310
- /**
311
- * The submit handler.
312
- */
313
- onSubmit: SubmitHandler<TFieldValues>;
314
- /**
315
- * Triggers when there are validation errors.
316
- */
317
- onError?: SubmitErrorHandler<TFieldValues>;
318
- /**
319
- * The Hook Form state ref.
320
- */
321
- formRef?: React$1.RefObject<UseFormReturn<TFieldValues, TContext>>;
322
- /**
323
- * The form children, can be a render prop or a ReactNode.
324
- */
325
- children?: MaybeRenderProp<FormRenderContext<TFieldValues, TContext, TFieldTypes>>;
326
- /**
327
- * The field resolver, used to resolve the fields from schemas.
328
- */
329
- fieldResolver?: FieldResolver;
330
- /**
331
- * Field overrides
332
- */
333
- fields?: DefaultFieldOverrides;
334
- }
335
- interface FormProps<TFieldValues extends FieldValues = FieldValues, TContext extends object = object, TSchema = any, TFieldTypes = FieldProps<TFieldValues>> extends UseFormProps<TFieldValues, TContext>, Omit<HTMLChakraProps<'form'>, 'children' | 'onChange' | 'onSubmit' | 'onError'>, FormOptions<TFieldValues, TContext, TSchema, TFieldTypes> {
336
- }
6
+ import React from 'react';
337
7
 
338
8
  type AnyObjectSchema = ObjectSchema<any, any, any, ''> | ObjectSchema<any, any, any, 'd'> | ObjectSchema<any, any, any, 's'>;
339
9
 
@@ -347,7 +17,7 @@ type Options = {
347
17
  * @param schema The Yup schema
348
18
  * @returns {FieldProps[]}
349
19
  */
350
- declare const getFieldsFromSchema: (schema: AnyObjectSchema) => FieldProps$1[];
20
+ declare const getFieldsFromSchema: (schema: AnyObjectSchema) => FieldProps[];
351
21
  declare const getNestedSchema: (schema: AnyObjectSchema, path: string) => AnyObjectSchema;
352
22
  declare const yupFieldResolver: GetFieldResolver;
353
23
 
@@ -356,246 +26,15 @@ interface CreateYupFormProps<FieldDefs> extends CreateFormProps<FieldDefs> {
356
26
  schemaOptions?: ResolverArgs[1];
357
27
  resolverOptions?: ResolverArgs[2];
358
28
  }
359
- declare const createYupForm: <FieldDefs>(options?: CreateYupFormProps<FieldDefs> | undefined) => <TSchema extends AnyObjectSchema = AnyObjectSchema, TContext extends object = object>(props: Omit<FormProps$1<InferType<TSchema>, TContext, TSchema, _saas_ui_forms.FieldProps<InferType<TSchema>>>, "children" | "fields"> & {
360
- children?: React__default.ReactNode | ((props: _saas_ui_forms.FormRenderContext<InferType<TSchema>, TContext, ((FieldDefs extends never ? {
361
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
362
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
363
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
364
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
365
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
366
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
367
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
368
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
369
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
370
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
371
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
372
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
373
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
374
- } : Omit<{
375
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
376
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
377
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
378
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
379
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
380
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
381
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
382
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
383
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
384
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
385
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
386
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
387
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
388
- }, keyof FieldDefs> & FieldDefs) extends infer T ? { [K in keyof T]: (FieldDefs extends never ? {
389
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
390
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
391
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
392
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
393
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
394
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
395
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
396
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
397
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
398
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
399
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
400
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
401
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
402
- } : Omit<{
403
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
404
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
405
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
406
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
407
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
408
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
409
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
410
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
411
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
412
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
413
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
414
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
415
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
416
- }, keyof FieldDefs> & FieldDefs)[K] extends React__default.FC<infer Props> ? {
417
- type?: K | undefined;
418
- } & Omit<Props, keyof _saas_ui_forms.BaseFieldProps<TFieldValues, TName>> & _saas_ui_forms.BaseFieldProps<InferType<TSchema>, react_hook_form.Path<InferType<TSchema>>> : never; } : never)[keyof (FieldDefs extends never ? {
419
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
420
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
421
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
422
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
423
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
424
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
425
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
426
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
427
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
428
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
429
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
430
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
431
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
432
- } : Omit<{
433
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
434
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
435
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
436
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
437
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
438
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
439
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
440
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
441
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
442
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
443
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
444
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
445
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
446
- }, keyof FieldDefs> & FieldDefs)]>) => React__default.ReactNode);
447
- fields?: ({ [K_1 in react_hook_form.Path<InferType<TSchema>> | (react_hook_form.Path<InferType<TSchema>> extends infer T_1 ? T_1 extends react_hook_form.Path<InferType<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_15 ? T_15 extends T_1 ? T_15 extends "" ? [] : T_15 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_15] : 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 ? {
448
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
449
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
450
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
451
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
452
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
453
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
454
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
455
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
456
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
457
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
458
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
459
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
460
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
461
- } : Omit<{
462
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
463
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
464
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
465
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
466
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
467
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
468
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
469
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
470
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
471
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
472
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
473
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
474
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
475
- }, keyof FieldDefs> & FieldDefs) extends infer T_16 ? { [K_2 in keyof T_16]: (FieldDefs extends never ? {
476
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
477
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
478
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
479
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
480
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
481
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
482
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
483
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
484
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
485
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
486
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
487
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
488
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
489
- } : Omit<{
490
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
491
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
492
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
493
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
494
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
495
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
496
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
497
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
498
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
499
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
500
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
501
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
502
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
503
- }, keyof FieldDefs> & FieldDefs)[K_2] extends React__default.FC<infer Props> ? {
504
- type?: K_2 | undefined;
505
- } & Omit<Props, keyof _saas_ui_forms.BaseFieldProps<TFieldValues, TName>> & _saas_ui_forms.BaseFieldProps<InferType<TSchema>, react_hook_form.Path<InferType<TSchema>>> : never; } : never)[keyof (FieldDefs extends never ? {
506
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
507
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
508
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
509
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
510
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
511
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
512
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
513
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
514
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
515
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
516
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
517
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
518
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
519
- } : Omit<{
520
- text: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
521
- email: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
522
- url: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
523
- phone: React__default.FC<_saas_ui_forms.InputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
524
- number: React__default.FC<_saas_ui_forms.NumberInputFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
525
- password: React__default.FC<_saas_ui_forms.PasswordInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
526
- textarea: React__default.FC<_chakra_ui_textarea_dist_textarea.TextareaProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
527
- switch: React__default.FC<_chakra_ui_switch_dist_switch.SwitchProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
528
- select: React__default.FC<_saas_ui_forms.SelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
529
- checkbox: React__default.FC<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
530
- radio: React__default.FC<_saas_ui_forms.RadioInputProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
531
- pin: React__default.FC<_saas_ui_forms.PinFieldProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
532
- 'native-select': React__default.FC<_saas_ui_forms.NativeSelectProps & _saas_ui_forms.BaseFieldProps<_saas_ui_forms.FieldValues, string>>;
533
- }, keyof FieldDefs> & FieldDefs)], "name"> | undefined; } & {
534
- submit?: _saas_ui_forms.SubmitButtonProps | undefined;
535
- }) | undefined;
536
- } & {
537
- ref?: React__default.ForwardedRef<HTMLFormElement> | undefined;
538
- }) => React__default.ReactElement;
29
+ type YupFormType<FieldDefs, ExtraProps = object, ExtraOverrides = object, Type extends 'yup' = 'yup'> = (<TFieldValues extends FieldValues = FieldValues, // placeholder
30
+ TContext extends object = object, TSchema extends AnyObjectSchema = AnyObjectSchema>(props: WithFields<FormProps<InferType<TSchema>, TContext, TSchema>, FieldDefs, ExtraOverrides> & {
31
+ ref?: React.ForwardedRef<HTMLFormElement>;
32
+ } & ExtraProps) => React.ReactElement) & {
33
+ displayName?: string;
34
+ id?: 'YupForm';
35
+ };
36
+ declare const createYupForm: <FieldDefs>(options?: CreateYupFormProps<FieldDefs> | undefined) => YupFormType<FieldDefs, object, object, "yup">;
539
37
 
540
- declare const Form: <TSchema extends AnyObjectSchema = AnyObjectSchema, TContext extends object = object>(props: Omit<FormProps<yup.Asserts<TSchema>, TContext, TSchema, FieldProps<yup.Asserts<TSchema>>>, "children" | "fields"> & {
541
- children?: React$1.ReactNode | ((props: FormRenderContext<yup.Asserts<TSchema>, TContext, ({
542
- type?: "number" | undefined;
543
- } & Omit<NumberInputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
544
- type?: "text" | undefined;
545
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
546
- type?: "email" | undefined;
547
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
548
- type?: "url" | undefined;
549
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
550
- type?: "phone" | undefined;
551
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
552
- type?: "password" | undefined;
553
- } & Omit<PasswordInputProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
554
- type?: "textarea" | undefined;
555
- } & Omit<_chakra_ui_textarea_dist_textarea.TextareaProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
556
- type?: "switch" | undefined;
557
- } & Omit<_chakra_ui_switch_dist_switch.SwitchProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
558
- type?: "select" | undefined;
559
- } & Omit<SelectProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
560
- type?: "checkbox" | undefined;
561
- } & Omit<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
562
- type?: "radio" | undefined;
563
- } & Omit<RadioInputProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
564
- type?: "pin" | undefined;
565
- } & Omit<PinFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
566
- type?: "native-select" | undefined;
567
- } & Omit<NativeSelectProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>)>) => React$1.ReactNode);
568
- fields?: ({ [K in react_hook_form.Path<yup.Asserts<TSchema>> | (react_hook_form.Path<yup.Asserts<TSchema>> extends infer T ? T extends react_hook_form.Path<yup.Asserts<TSchema>> ? T extends string ? (string extends T ? (T & string)[] : T extends infer T_1 ? T_1 extends T ? T_1 extends "" ? [] : T_1 extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_1] : never : never) extends infer T_3 ? T_3 extends (string extends T ? (T & string)[] : T extends infer T_14 ? T_14 extends T ? T_14 extends "" ? [] : T_14 extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...string extends U ? (U & string)[] : U extends "" ? [] : U extends `${infer T_2}.${infer U}` ? [T_2, ...any] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [U]] : [T_14] : never : never) ? T_3 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_4 ? T_4 extends R ? 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[] ? 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<({
569
- type?: "number" | undefined;
570
- } & Omit<NumberInputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
571
- type?: "text" | undefined;
572
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
573
- type?: "email" | undefined;
574
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
575
- type?: "url" | undefined;
576
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
577
- type?: "phone" | undefined;
578
- } & Omit<InputFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
579
- type?: "password" | undefined;
580
- } & Omit<PasswordInputProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
581
- type?: "textarea" | undefined;
582
- } & Omit<_chakra_ui_textarea_dist_textarea.TextareaProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
583
- type?: "switch" | undefined;
584
- } & Omit<_chakra_ui_switch_dist_switch.SwitchProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
585
- type?: "select" | undefined;
586
- } & Omit<SelectProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
587
- type?: "checkbox" | undefined;
588
- } & Omit<_chakra_ui_checkbox_dist_checkbox.CheckboxProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
589
- type?: "radio" | undefined;
590
- } & Omit<RadioInputProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
591
- type?: "pin" | undefined;
592
- } & Omit<PinFieldProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>) | ({
593
- type?: "native-select" | undefined;
594
- } & Omit<NativeSelectProps & BaseFieldProps<react_hook_form.FieldValues, string>, keyof BaseFieldProps<TFieldValues, TName>> & BaseFieldProps<yup.Asserts<TSchema>, react_hook_form.Path<yup.Asserts<TSchema>>>), "name"> | undefined; } & {
595
- submit?: SubmitButtonProps | undefined;
596
- }) | undefined;
597
- } & {
598
- ref?: React$1.ForwardedRef<HTMLFormElement> | undefined;
599
- }) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
38
+ declare const Form: _saas_ui_forms_yup.YupFormType<unknown, object, object, "yup">;
600
39
 
601
- export { Form, Options, createYupForm, getFieldsFromSchema, getNestedSchema, yupFieldResolver };
40
+ export { AnyObjectSchema, Form, Options, YupFormType, createYupForm, getFieldsFromSchema, getNestedSchema, yupFieldResolver };