@tamagui/form 1.74.3 → 1.74.5
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.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Stack,
|
|
3
|
+
View,
|
|
4
|
+
composeEventHandlers,
|
|
5
|
+
styled,
|
|
6
|
+
withStaticProperties
|
|
7
|
+
} from "@tamagui/core";
|
|
8
|
+
import { createContextScope } from "@tamagui/create-context";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
const FORM_NAME = "Form", FormFrame = styled(Stack, {
|
|
11
|
+
name: FORM_NAME,
|
|
12
|
+
tag: "form"
|
|
13
|
+
}), [createFormContext] = createContextScope(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = styled(View, {
|
|
14
|
+
name: TRIGGER_NAME
|
|
15
|
+
}), FormTrigger = FormTriggerFrame.styleable(
|
|
16
|
+
(props, forwardedRef) => {
|
|
17
|
+
const { __scopeForm, children, onPress, ...triggerProps } = props, context = useFormContext(TRIGGER_NAME, __scopeForm);
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
FormTriggerFrame,
|
|
20
|
+
{
|
|
21
|
+
tag: "button",
|
|
22
|
+
...triggerProps,
|
|
23
|
+
ref: forwardedRef,
|
|
24
|
+
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
25
|
+
children
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
), FormComponent = FormFrame.extractable(function({
|
|
30
|
+
onSubmit,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(FormProvider, { scope: props.__scopeForm, onSubmit, children: /* @__PURE__ */ jsx(FormFrame, { ...props, onSubmit: (e) => e.preventDefault() }) });
|
|
34
|
+
}), Form2 = withStaticProperties(FormComponent, {
|
|
35
|
+
Trigger: FormTrigger
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
Form2 as Form,
|
|
39
|
+
FormFrame,
|
|
40
|
+
FormProvider,
|
|
41
|
+
FormTrigger,
|
|
42
|
+
useFormContext
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Form.tsx"],
|
|
4
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,0BAA0B;AA8CpC;AA3CN,MAAM,YAAY,QAEL,YAAY,OAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,KAAK;AACP,CAAC,GAOK,CAAC,iBAAiB,IAAI,mBAAmB,SAAS,GAM3C,CAAC,cAAc,cAAc,IACxC,kBAAoC,SAAS,GAUzC,eAAe,eAEf,mBAAmB,OAAO,MAAM;AAAA,EACpC,MAAM;AACR,CAAC,GAIY,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAsC,iBAAiB;AACtD,UAAM,EAAE,aAAa,UAAU,SAAS,GAAG,aAAa,IAAI,OACtD,UAAU,eAAe,cAAc,WAAW;AAExD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,SAAS,qBAAqB,SAAgB,QAAQ,QAAQ;AAAA,QAE7D;AAAA;AAAA,IACH;AAAA,EAEJ;AACF,GAMM,gBAAgB,UAAU,YAAY,SAAc;AAAA,EACxD;AAAA,EACA,GAAG;AACL,GAA2B;AACzB,SACE,oBAAC,gBAAa,OAAO,MAAM,aAAa,UACtC,8BAAC,aAAW,GAAG,OAAO,UAAW,CAAC,MAAW,EAAE,eAAe,GAAW,GAC3E;AAEJ,CAAC,GAEYA,QAAO,qBAAqB,eAAe;AAAA,EACtD,SAAS;AACX,CAAC;",
|
|
5
|
+
"names": ["Form"]
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/form",
|
|
3
|
-
"version": "1.74.
|
|
3
|
+
"version": "1.74.5",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tamagui/compose-refs": "1.74.
|
|
35
|
-
"@tamagui/core": "1.74.
|
|
36
|
-
"@tamagui/create-context": "1.74.
|
|
37
|
-
"@tamagui/focusable": "1.74.
|
|
38
|
-
"@tamagui/get-button-sized": "1.74.
|
|
39
|
-
"@tamagui/get-font-sized": "1.74.
|
|
40
|
-
"@tamagui/text": "1.74.
|
|
34
|
+
"@tamagui/compose-refs": "1.74.5",
|
|
35
|
+
"@tamagui/core": "1.74.5",
|
|
36
|
+
"@tamagui/create-context": "1.74.5",
|
|
37
|
+
"@tamagui/focusable": "1.74.5",
|
|
38
|
+
"@tamagui/get-button-sized": "1.74.5",
|
|
39
|
+
"@tamagui/get-font-sized": "1.74.5",
|
|
40
|
+
"@tamagui/text": "1.74.5"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "*"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@tamagui/build": "1.74.
|
|
46
|
+
"@tamagui/build": "1.74.5",
|
|
47
47
|
"react": "^18.2.0"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|