shadcn-zod-formkit 1.31.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -244,15 +244,27 @@ interface Props$i<T extends Record<string, any>> {
244
244
  childrenHeader?: ReactNode;
245
245
  listBtnConfig?: BtnConfig[];
246
246
  debug?: boolean;
247
+ isWrapInWizard?: boolean;
248
+ currentStep?: number;
249
+ totalSteps?: number;
247
250
  }
248
- declare const DynamicForm: <T extends Record<string, any>>({ formTitle, formSubTitle, fields, readOnly, record, onAnyFieldChange, onSubmit, onClick, extraValidations, children, childrenHeader, showIcon, showFormHeader, withErrorsAlert, errorAlertPosition, withCard, submitBtnClass, listBtnConfig, submitBtnLabel, submitBtnLabelSubmiting, withFormWrapper, btnGroupDirection, withSubmitBtn, debug }: Props$i<T>) => react_jsx_runtime.JSX.Element;
251
+ declare const DynamicForm: <T extends Record<string, any>>({ formTitle, formSubTitle, fields, readOnly, record, onAnyFieldChange, onSubmit, onClick, extraValidations, children, childrenHeader, showIcon, showFormHeader, withErrorsAlert, errorAlertPosition, withCard, submitBtnClass, listBtnConfig, submitBtnLabel, submitBtnLabelSubmiting, withFormWrapper, btnGroupDirection, withSubmitBtn, debug, isWrapInWizard, totalSteps, currentStep, }: Props$i<T>) => react_jsx_runtime.JSX.Element;
249
252
 
253
+ interface WizardRenderProps<T> {
254
+ stepFields: FieldProps<T>[];
255
+ currentStep: number;
256
+ totalSteps: number;
257
+ setCurrentStep: Dispatch<SetStateAction<number>>;
258
+ }
250
259
  interface Props$h<T> {
251
260
  onSubmit?: (resp: FormResp<T>) => void;
252
261
  fields: FieldConfig<T>[];
253
262
  record: any;
263
+ children?: (props: WizardRenderProps<T>) => ReactNode;
264
+ isWrapInWizard?: boolean;
265
+ skipSteps?: boolean;
254
266
  }
255
- declare const WizardForm: <T extends Record<string, any>>({ fields, record, onSubmit, }: Props$h<T>) => react_jsx_runtime.JSX.Element;
267
+ declare const WizardForm: <T extends Record<string, any>>({ fields, record, onSubmit, children, isWrapInWizard, skipSteps, }: Props$h<T>) => react_jsx_runtime.JSX.Element;
256
268
 
257
269
  declare const DynamicFormExample: () => react_jsx_runtime.JSX.Element;
258
270
  declare const mockFields: Array<FieldProps | FieldProps[]>;
package/dist/index.d.ts CHANGED
@@ -244,15 +244,27 @@ interface Props$i<T extends Record<string, any>> {
244
244
  childrenHeader?: ReactNode;
245
245
  listBtnConfig?: BtnConfig[];
246
246
  debug?: boolean;
247
+ isWrapInWizard?: boolean;
248
+ currentStep?: number;
249
+ totalSteps?: number;
247
250
  }
248
- declare const DynamicForm: <T extends Record<string, any>>({ formTitle, formSubTitle, fields, readOnly, record, onAnyFieldChange, onSubmit, onClick, extraValidations, children, childrenHeader, showIcon, showFormHeader, withErrorsAlert, errorAlertPosition, withCard, submitBtnClass, listBtnConfig, submitBtnLabel, submitBtnLabelSubmiting, withFormWrapper, btnGroupDirection, withSubmitBtn, debug }: Props$i<T>) => react_jsx_runtime.JSX.Element;
251
+ declare const DynamicForm: <T extends Record<string, any>>({ formTitle, formSubTitle, fields, readOnly, record, onAnyFieldChange, onSubmit, onClick, extraValidations, children, childrenHeader, showIcon, showFormHeader, withErrorsAlert, errorAlertPosition, withCard, submitBtnClass, listBtnConfig, submitBtnLabel, submitBtnLabelSubmiting, withFormWrapper, btnGroupDirection, withSubmitBtn, debug, isWrapInWizard, totalSteps, currentStep, }: Props$i<T>) => react_jsx_runtime.JSX.Element;
249
252
 
253
+ interface WizardRenderProps<T> {
254
+ stepFields: FieldProps<T>[];
255
+ currentStep: number;
256
+ totalSteps: number;
257
+ setCurrentStep: Dispatch<SetStateAction<number>>;
258
+ }
250
259
  interface Props$h<T> {
251
260
  onSubmit?: (resp: FormResp<T>) => void;
252
261
  fields: FieldConfig<T>[];
253
262
  record: any;
263
+ children?: (props: WizardRenderProps<T>) => ReactNode;
264
+ isWrapInWizard?: boolean;
265
+ skipSteps?: boolean;
254
266
  }
255
- declare const WizardForm: <T extends Record<string, any>>({ fields, record, onSubmit, }: Props$h<T>) => react_jsx_runtime.JSX.Element;
267
+ declare const WizardForm: <T extends Record<string, any>>({ fields, record, onSubmit, children, isWrapInWizard, skipSteps, }: Props$h<T>) => react_jsx_runtime.JSX.Element;
256
268
 
257
269
  declare const DynamicFormExample: () => react_jsx_runtime.JSX.Element;
258
270
  declare const mockFields: Array<FieldProps | FieldProps[]>;