index.tsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 * from './interface';
  19. export {
  20. Form,
  21. ArrayField,
  22. withField,
  23. useFormApi,
  24. useFormState,
  25. useFieldApi,
  26. useFieldState,
  27. withFormState,
  28. withFormApi
  29. };
  30. export * from './interface';
  31. export { ArrayFieldProps } from './arrayField';
  32. export { ReactFieldError, ErrorMessageProps } from './errorMessage';
  33. export { InputGroupProps } from './group';
  34. export { LabelProps } from './label';
  35. export { SectionProps } from './section';
  36. export { SlotProps } from './slot';