@react-native-ama/forms 2.0.0-beta.1 → 2.0.0-beta.2

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/Form.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Form as FormProvider, type FormActions, type FormProps } from './components/Form';
3
+ import { FormField, type FormFieldProps } from './components/FormField';
4
+ import { type FormSubmitProps, type FormSubmitRenderProps } from './components/FormSubmit';
5
+ type FormComponent = typeof FormProvider & {
6
+ Submit: (props: FormSubmitProps) => React.ReactElement;
7
+ Field: typeof FormField;
8
+ };
9
+ declare const Form: FormComponent;
10
+ export { Form, type FormProps, type FormActions, type FormFieldProps, type FormSubmitProps, type FormSubmitRenderProps, };
package/dist/Form.js ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Form = void 0;
4
+ const Form_1 = require("./components/Form");
5
+ const FormField_1 = require("./components/FormField");
6
+ const FormSubmit_1 = require("./components/FormSubmit");
7
+ const Form = Form_1.Form;
8
+ exports.Form = Form;
9
+ Form.Submit = FormSubmit_1.FormSubmit;
10
+ Form.Field = FormField_1.FormField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ama/forms",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  ".": {
@@ -47,7 +47,7 @@
47
47
  "test": "jest"
48
48
  },
49
49
  "peerDependencies": {
50
- "@react-native-ama/core": "~2.0.0-beta.1",
50
+ "@react-native-ama/core": "~2.0.0-beta.2",
51
51
  "react": "*",
52
52
  "react-native": "*"
53
53
  },
package/src/Form.ts ADDED
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import {
3
+ Form as FormProvider,
4
+ type FormActions,
5
+ type FormProps,
6
+ } from './components/Form';
7
+ import { FormField, type FormFieldProps } from './components/FormField';
8
+ import {
9
+ FormSubmit,
10
+ type FormSubmitProps,
11
+ type FormSubmitRenderProps,
12
+ } from './components/FormSubmit';
13
+
14
+ type FormComponent = typeof FormProvider & {
15
+ Submit: (props: FormSubmitProps) => React.ReactElement;
16
+ Field: typeof FormField;
17
+ };
18
+
19
+ const Form = FormProvider as unknown as FormComponent;
20
+ Form.Submit = FormSubmit;
21
+ Form.Field = FormField;
22
+
23
+ export {
24
+ Form,
25
+ type FormProps,
26
+ type FormActions,
27
+ type FormFieldProps,
28
+ type FormSubmitProps,
29
+ type FormSubmitRenderProps,
30
+ };