@tamagui/form 1.15.40 → 1.16.1
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/cjs/Form.js +15 -17
- package/dist/cjs/Form.js.map +1 -1
- package/dist/esm/Form.js +16 -18
- package/dist/esm/Form.js.map +1 -1
- package/dist/esm/Form.mjs +16 -18
- package/dist/esm/Form.mjs.map +1 -1
- package/dist/jsx/Form.js +13 -15
- package/dist/jsx/Form.js.map +1 -1
- package/dist/jsx/Form.mjs +13 -15
- package/dist/jsx/Form.mjs.map +1 -1
- package/package.json +9 -9
- package/src/Form.tsx +19 -21
- package/types/Form.d.ts +14 -2
- package/types/Form.d.ts.map +1 -1
package/dist/cjs/Form.js
CHANGED
|
@@ -40,23 +40,21 @@ const TRIGGER_NAME = "FormTrigger";
|
|
|
40
40
|
const FormTriggerFrame = (0, import_core.styled)(import_core.Stack, {
|
|
41
41
|
name: TRIGGER_NAME
|
|
42
42
|
});
|
|
43
|
-
const FormTrigger = FormTriggerFrame.
|
|
44
|
-
(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
)
|
|
43
|
+
const FormTrigger = FormTriggerFrame.styleable(
|
|
44
|
+
(props, forwardedRef) => {
|
|
45
|
+
const { __scopeForm, children, ...triggerProps } = props;
|
|
46
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
FormTriggerFrame,
|
|
49
|
+
{
|
|
50
|
+
tag: "button",
|
|
51
|
+
...triggerProps,
|
|
52
|
+
children: triggerProps.asChild ? (0, import_react.cloneElement)(children, { disabled: triggerProps.disabled }) : children,
|
|
53
|
+
ref: forwardedRef,
|
|
54
|
+
onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onSubmit)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
60
58
|
);
|
|
61
59
|
function FormComponent({
|
|
62
60
|
onSubmit,
|
package/dist/cjs/Form.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDM;AAzDN,kBAQO;AACP,4BAA0C;AAC1C,mBAA4D;AAE5D,MAAM,YAAY;AAEX,MAAM,gBAAY,oBAAO,mBAAO;AAAA,EACrC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;AAWD,MAAM,CAAC,iBAAiB,QAAI,0CAAmB,SAAS;AAMjD,MAAM,CAAC,cAAc,cAAc,IACxC,kBAAoC,SAAS;AAQ/C,MAAM,eAAe;AAErB,MAAM,uBAAmB,oBAAO,mBAAO;AAAA,EACrC,MAAM;AACR,CAAC;AAIM,MAAM,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAsC,iBAAiB;AACtD,UAAM,EAAE,aAAa,UAAU,GAAG,aAAa,IAAI;AACnD,UAAM,UAAU,eAAe,cAAc,WAAW;AAExD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACH,GAAG;AAAA,QACJ,UACE,aAAa,cACT,2BAAa,UAAU,EAAE,UAAU,aAAa,SAAS,CAAC,IAC1D;AAAA,QAEN,KAAK;AAAA,QACL,aAAS,kCAAqB,MAAM,SAAgB,QAAQ,QAAQ;AAAA;AAAA,IACtE;AAAA,EAEJ;AACF;AAMA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA,GAAG;AACL,GAA8C;AAC5C,SACE,4CAAC,gBAAa,OAAO,MAAM,aAAa,UACtC,sDAAC,aAAW,GAAG,OAAO,UAAW,CAAC,MAAW,EAAE,eAAe,GAAW,GAC3E;AAEJ;AAEO,MAAM,WAAO,kCAAqB,UAAU,YAAY,aAAa,GAAG;AAAA,EAC7E,SAAS;AACX,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/Form.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
withStaticProperties
|
|
7
7
|
} from "@tamagui/core";
|
|
8
8
|
import { createContextScope } from "@tamagui/create-context";
|
|
9
|
-
import { cloneElement
|
|
9
|
+
import { cloneElement } from "react";
|
|
10
10
|
const FORM_NAME = "Form";
|
|
11
11
|
const FormFrame = styled(Stack, {
|
|
12
12
|
name: FORM_NAME,
|
|
@@ -18,23 +18,21 @@ const TRIGGER_NAME = "FormTrigger";
|
|
|
18
18
|
const FormTriggerFrame = styled(Stack, {
|
|
19
19
|
name: TRIGGER_NAME
|
|
20
20
|
});
|
|
21
|
-
const FormTrigger = FormTriggerFrame.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
)
|
|
21
|
+
const FormTrigger = FormTriggerFrame.styleable(
|
|
22
|
+
(props, forwardedRef) => {
|
|
23
|
+
const { __scopeForm, children, ...triggerProps } = props;
|
|
24
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
FormTriggerFrame,
|
|
27
|
+
{
|
|
28
|
+
tag: "button",
|
|
29
|
+
...triggerProps,
|
|
30
|
+
children: triggerProps.asChild ? cloneElement(children, { disabled: triggerProps.disabled }) : children,
|
|
31
|
+
ref: forwardedRef,
|
|
32
|
+
onPress: composeEventHandlers(props.onPress, context.onSubmit)
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
38
36
|
);
|
|
39
37
|
function FormComponent({
|
|
40
38
|
onSubmit,
|
package/dist/esm/Form.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAyDM;AAzDN;AAAA,EAEE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,0BAA0B;AAC1C,SAA4B,oBAAgC;AAE5D,MAAM,YAAY;AAEX,MAAM,YAAY,OAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;AAWD,MAAM,CAAC,iBAAiB,IAAI,mBAAmB,SAAS;AAMjD,MAAM,CAAC,cAAc,cAAc,IACxC,kBAAoC,SAAS;AAQ/C,MAAM,eAAe;AAErB,MAAM,mBAAmB,OAAO,OAAO;AAAA,EACrC,MAAM;AACR,CAAC;AAIM,MAAM,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAsC,iBAAiB;AACtD,UAAM,EAAE,aAAa,UAAU,GAAG,aAAa,IAAI;AACnD,UAAM,UAAU,eAAe,cAAc,WAAW;AAExD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACH,GAAG;AAAA,QACJ,UACE,aAAa,UACT,aAAa,UAAU,EAAE,UAAU,aAAa,SAAS,CAAC,IAC1D;AAAA,QAEN,KAAK;AAAA,QACL,SAAS,qBAAqB,MAAM,SAAgB,QAAQ,QAAQ;AAAA;AAAA,IACtE;AAAA,EAEJ;AACF;AAMA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA,GAAG;AACL,GAA8C;AAC5C,SACE,oBAAC,gBAAa,OAAO,MAAM,aAAa,UACtC,8BAAC,aAAW,GAAG,OAAO,UAAW,CAAC,MAAW,EAAE,eAAe,GAAW,GAC3E;AAEJ;AAEO,MAAM,OAAO,qBAAqB,UAAU,YAAY,aAAa,GAAG;AAAA,EAC7E,SAAS;AACX,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/Form.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
withStaticProperties
|
|
7
7
|
} from "@tamagui/core";
|
|
8
8
|
import { createContextScope } from "@tamagui/create-context";
|
|
9
|
-
import { cloneElement
|
|
9
|
+
import { cloneElement } from "react";
|
|
10
10
|
const FORM_NAME = "Form";
|
|
11
11
|
const FormFrame = styled(Stack, {
|
|
12
12
|
name: FORM_NAME,
|
|
@@ -18,23 +18,21 @@ const TRIGGER_NAME = "FormTrigger";
|
|
|
18
18
|
const FormTriggerFrame = styled(Stack, {
|
|
19
19
|
name: TRIGGER_NAME
|
|
20
20
|
});
|
|
21
|
-
const FormTrigger = FormTriggerFrame.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
)
|
|
21
|
+
const FormTrigger = FormTriggerFrame.styleable(
|
|
22
|
+
(props, forwardedRef) => {
|
|
23
|
+
const { __scopeForm, children, ...triggerProps } = props;
|
|
24
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
FormTriggerFrame,
|
|
27
|
+
{
|
|
28
|
+
tag: "button",
|
|
29
|
+
...triggerProps,
|
|
30
|
+
children: triggerProps.asChild ? cloneElement(children, { disabled: triggerProps.disabled }) : children,
|
|
31
|
+
ref: forwardedRef,
|
|
32
|
+
onPress: composeEventHandlers(props.onPress, context.onSubmit)
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
38
36
|
);
|
|
39
37
|
function FormComponent({
|
|
40
38
|
onSubmit,
|
package/dist/esm/Form.mjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAyDM;AAzDN;AAAA,EAEE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,0BAA0B;AAC1C,SAA4B,oBAAgC;AAE5D,MAAM,YAAY;AAEX,MAAM,YAAY,OAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;AAWD,MAAM,CAAC,iBAAiB,IAAI,mBAAmB,SAAS;AAMjD,MAAM,CAAC,cAAc,cAAc,IACxC,kBAAoC,SAAS;AAQ/C,MAAM,eAAe;AAErB,MAAM,mBAAmB,OAAO,OAAO;AAAA,EACrC,MAAM;AACR,CAAC;AAIM,MAAM,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAsC,iBAAiB;AACtD,UAAM,EAAE,aAAa,UAAU,GAAG,aAAa,IAAI;AACnD,UAAM,UAAU,eAAe,cAAc,WAAW;AAExD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACH,GAAG;AAAA,QACJ,UACE,aAAa,UACT,aAAa,UAAU,EAAE,UAAU,aAAa,SAAS,CAAC,IAC1D;AAAA,QAEN,KAAK;AAAA,QACL,SAAS,qBAAqB,MAAM,SAAgB,QAAQ,QAAQ;AAAA;AAAA,IACtE;AAAA,EAEJ;AACF;AAMA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA,GAAG;AACL,GAA8C;AAC5C,SACE,oBAAC,gBAAa,OAAO,MAAM,aAAa,UACtC,8BAAC,aAAW,GAAG,OAAO,UAAW,CAAC,MAAW,EAAE,eAAe,GAAW,GAC3E;AAEJ;AAEO,MAAM,OAAO,qBAAqB,UAAU,YAAY,aAAa,GAAG;AAAA,EAC7E,SAAS;AACX,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/jsx/Form.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
withStaticProperties
|
|
6
6
|
} from "@tamagui/core";
|
|
7
7
|
import { createContextScope } from "@tamagui/create-context";
|
|
8
|
-
import { cloneElement
|
|
8
|
+
import { cloneElement } from "react";
|
|
9
9
|
const FORM_NAME = "Form";
|
|
10
10
|
const FormFrame = styled(Stack, {
|
|
11
11
|
name: FORM_NAME,
|
|
@@ -17,20 +17,18 @@ const TRIGGER_NAME = "FormTrigger";
|
|
|
17
17
|
const FormTriggerFrame = styled(Stack, {
|
|
18
18
|
name: TRIGGER_NAME
|
|
19
19
|
});
|
|
20
|
-
const FormTrigger = FormTriggerFrame.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
)
|
|
20
|
+
const FormTrigger = FormTriggerFrame.styleable(
|
|
21
|
+
(props, forwardedRef) => {
|
|
22
|
+
const { __scopeForm, children, ...triggerProps } = props;
|
|
23
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
24
|
+
return <FormTriggerFrame
|
|
25
|
+
tag="button"
|
|
26
|
+
{...triggerProps}
|
|
27
|
+
children={triggerProps.asChild ? cloneElement(children, { disabled: triggerProps.disabled }) : children}
|
|
28
|
+
ref={forwardedRef}
|
|
29
|
+
onPress={composeEventHandlers(props.onPress, context.onSubmit)}
|
|
30
|
+
/>;
|
|
31
|
+
}
|
|
34
32
|
);
|
|
35
33
|
function FormComponent({
|
|
36
34
|
onSubmit,
|
package/dist/jsx/Form.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
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.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
withStaticProperties
|
|
6
6
|
} from "@tamagui/core";
|
|
7
7
|
import { createContextScope } from "@tamagui/create-context";
|
|
8
|
-
import { cloneElement
|
|
8
|
+
import { cloneElement } from "react";
|
|
9
9
|
const FORM_NAME = "Form";
|
|
10
10
|
const FormFrame = styled(Stack, {
|
|
11
11
|
name: FORM_NAME,
|
|
@@ -17,20 +17,18 @@ const TRIGGER_NAME = "FormTrigger";
|
|
|
17
17
|
const FormTriggerFrame = styled(Stack, {
|
|
18
18
|
name: TRIGGER_NAME
|
|
19
19
|
});
|
|
20
|
-
const FormTrigger = FormTriggerFrame.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
)
|
|
20
|
+
const FormTrigger = FormTriggerFrame.styleable(
|
|
21
|
+
(props, forwardedRef) => {
|
|
22
|
+
const { __scopeForm, children, ...triggerProps } = props;
|
|
23
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
24
|
+
return <FormTriggerFrame
|
|
25
|
+
tag="button"
|
|
26
|
+
{...triggerProps}
|
|
27
|
+
children={triggerProps.asChild ? cloneElement(children, { disabled: triggerProps.disabled }) : children}
|
|
28
|
+
ref={forwardedRef}
|
|
29
|
+
onPress={composeEventHandlers(props.onPress, context.onSubmit)}
|
|
30
|
+
/>;
|
|
31
|
+
}
|
|
34
32
|
);
|
|
35
33
|
function FormComponent({
|
|
36
34
|
onSubmit,
|
package/dist/jsx/Form.mjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAEE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,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1.16.1",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tamagui/compose-refs": "1.
|
|
35
|
-
"@tamagui/core": "1.
|
|
36
|
-
"@tamagui/create-context": "1.
|
|
37
|
-
"@tamagui/focusable": "1.
|
|
38
|
-
"@tamagui/get-button-sized": "1.
|
|
39
|
-
"@tamagui/get-font-sized": "1.
|
|
40
|
-
"@tamagui/text": "1.
|
|
34
|
+
"@tamagui/compose-refs": "1.16.1",
|
|
35
|
+
"@tamagui/core": "1.16.1",
|
|
36
|
+
"@tamagui/create-context": "1.16.1",
|
|
37
|
+
"@tamagui/focusable": "1.16.1",
|
|
38
|
+
"@tamagui/get-button-sized": "1.16.1",
|
|
39
|
+
"@tamagui/get-font-sized": "1.16.1",
|
|
40
|
+
"@tamagui/text": "1.16.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "*"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@tamagui/build": "1.
|
|
46
|
+
"@tamagui/build": "1.16.1",
|
|
47
47
|
"react": "^18.2.0"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
package/src/Form.tsx
CHANGED
|
@@ -49,27 +49,25 @@ const FormTriggerFrame = styled(Stack, {
|
|
|
49
49
|
|
|
50
50
|
export interface FormTriggerProps extends StackProps {}
|
|
51
51
|
|
|
52
|
-
export const FormTrigger = FormTriggerFrame.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
triggerProps.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
)
|
|
52
|
+
export const FormTrigger = FormTriggerFrame.styleable(
|
|
53
|
+
(props: ScopedProps<FormTriggerProps>, forwardedRef) => {
|
|
54
|
+
const { __scopeForm, children, ...triggerProps } = props
|
|
55
|
+
const context = useFormContext(TRIGGER_NAME, __scopeForm)
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<FormTriggerFrame
|
|
59
|
+
tag="button"
|
|
60
|
+
{...triggerProps}
|
|
61
|
+
children={
|
|
62
|
+
triggerProps.asChild
|
|
63
|
+
? cloneElement(children, { disabled: triggerProps.disabled })
|
|
64
|
+
: children
|
|
65
|
+
}
|
|
66
|
+
ref={forwardedRef}
|
|
67
|
+
onPress={composeEventHandlers(props.onPress as any, context.onSubmit)}
|
|
68
|
+
/>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
73
71
|
)
|
|
74
72
|
|
|
75
73
|
/* -------------------------------------------------------------------------------------------------
|
package/types/Form.d.ts
CHANGED
|
@@ -34,10 +34,22 @@ export declare const FormProvider: {
|
|
|
34
34
|
export type FormProps = FormFrameProps;
|
|
35
35
|
export interface FormTriggerProps extends StackProps {
|
|
36
36
|
}
|
|
37
|
-
export declare const FormTrigger: import("react").
|
|
37
|
+
export declare const FormTrigger: import("@tamagui/core").ReactComponentWithRef<Object & Omit<(Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>> & import("@tamagui/core").MediaProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps) | (Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
38
|
+
[x: string]: undefined;
|
|
39
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
40
|
+
[x: string]: undefined;
|
|
41
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
42
|
+
[x: string]: undefined;
|
|
43
|
+
}>>), keyof Object>, TamaguiElement>;
|
|
38
44
|
declare function FormComponent({ onSubmit, ...props }: PropsWithChildren<ScopedProps<FormProps>>): JSX.Element;
|
|
39
45
|
export declare const Form: typeof FormComponent & {
|
|
40
|
-
Trigger: import("react").
|
|
46
|
+
Trigger: import("@tamagui/core").ReactComponentWithRef<Object & Omit<(Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>> & import("@tamagui/core").MediaProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps) | (Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
47
|
+
[x: string]: undefined;
|
|
48
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
49
|
+
[x: string]: undefined;
|
|
50
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native/types").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native/types").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
|
|
51
|
+
[x: string]: undefined;
|
|
52
|
+
}>>), keyof Object>, TamaguiElement>;
|
|
41
53
|
};
|
|
42
54
|
export {};
|
|
43
55
|
//# sourceMappingURL=Form.d.ts.map
|
package/types/Form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../src/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,UAAU,EACV,cAAc,EAIf,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,KAAK,EAAsB,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAA;AAInE,eAAO,MAAM,SAAS;;;;;;;;;;EAGpB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,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