index.tsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * The early design of Semi Form was inspired by informed (https://github.com/joepuzzo/informed) and formik(https://github.com/formium/formik)
  3. * The informed API design is very concise, and formik has very clear naming of the form status.
  4. * However, due to the requirements of convenient scalability (we need to split into F/A architecture), in additional they have their own binding verification library,
  5. * we cannot directly reuse such libraries.
  6. * So we fully absorbed these excellent api designs. Combining the technical principles of the two to implement our own code,
  7. */
  8. // FormComponent
  9. import Form from './baseForm';
  10. import Label from './label';
  11. import ArrayField from './arrayField';
  12. // Form Hooks
  13. import { useFormApi, useFormState, useFieldState, useFieldApi } from './hooks/index';
  14. // Form Hoc
  15. import withField from './hoc/withField';
  16. import withFormState from './hoc/withFormState';
  17. import withFormApi from './hoc/withFormApi';
  18. export {
  19. Form,
  20. ArrayField,
  21. withField,
  22. useFormApi,
  23. useFormState,
  24. useFieldApi,
  25. useFieldState,
  26. withFormState,
  27. withFormApi
  28. };
  29. export * from './interface';
  30. export { ArrayFieldProps } from './arrayField';
  31. export { ReactFieldError, ErrorMessageProps } from './errorMessage';
  32. export { InputGroupProps } from './group';
  33. export { LabelProps } from './label';
  34. export { SectionProps } from './section';
  35. export { SlotProps } from './slot';