@tamagui/form 2.0.0-rc.4 → 2.0.0-rc.40
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.cjs +65 -64
- package/dist/cjs/Form.native.js +67 -66
- package/dist/cjs/Form.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Form.mjs +49 -50
- package/dist/esm/Form.mjs.map +1 -1
- package/dist/esm/Form.native.js +52 -53
- package/dist/esm/Form.native.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Form.mjs +49 -50
- package/dist/jsx/Form.mjs.map +1 -1
- package/dist/jsx/Form.native.js +67 -66
- package/dist/jsx/Form.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/package.json +7 -10
- package/src/Form.tsx +1 -1
- package/dist/cjs/Form.js +0 -61
- package/dist/cjs/Form.js.map +0 -6
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/esm/Form.js +0 -47
- package/dist/esm/Form.js.map +0 -6
- package/dist/jsx/Form.js +0 -47
- package/dist/jsx/Form.js.map +0 -6
package/dist/cjs/Form.cjs
CHANGED
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var Form_exports = {};
|
|
22
24
|
__export(Form_exports, {
|
|
@@ -28,59 +30,58 @@ __export(Form_exports, {
|
|
|
28
30
|
useFormContext: () => useFormContext
|
|
29
31
|
});
|
|
30
32
|
module.exports = __toCommonJS(Form_exports);
|
|
31
|
-
var import_core = require("@tamagui/core")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const FORM_NAME = "Form"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
var import_core = require("@tamagui/core");
|
|
34
|
+
var import_helpers = require("@tamagui/helpers");
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
const FORM_NAME = "Form";
|
|
37
|
+
const FormFrame = (0, import_core.styled)(import_core.View, {
|
|
38
|
+
name: FORM_NAME,
|
|
39
|
+
render: "form"
|
|
40
|
+
});
|
|
41
|
+
const FormContext = (0, import_core.createStyledContext)({
|
|
42
|
+
onSubmit: void 0
|
|
43
|
+
});
|
|
44
|
+
const {
|
|
45
|
+
useStyledContext: useFormContext,
|
|
46
|
+
Provider: FormProvider
|
|
47
|
+
} = FormContext;
|
|
48
|
+
const FormTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
49
|
+
name: "FormTrigger"
|
|
50
|
+
});
|
|
51
|
+
const FormTrigger = FormTriggerFrame.styleable((props, forwardedRef) => {
|
|
52
|
+
const {
|
|
53
|
+
scope,
|
|
54
|
+
children,
|
|
55
|
+
onPress,
|
|
56
|
+
...triggerProps
|
|
57
|
+
} = props;
|
|
58
|
+
const context = useFormContext(scope);
|
|
59
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormTriggerFrame, {
|
|
60
|
+
role: "button",
|
|
61
|
+
...triggerProps,
|
|
62
|
+
ref: forwardedRef,
|
|
63
|
+
onPress: (0, import_helpers.composeEventHandlers)(onPress, context.onSubmit),
|
|
64
|
+
children
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
const FormComponent = FormFrame.styleable(function Form({
|
|
68
|
+
scope,
|
|
69
|
+
onSubmit,
|
|
70
|
+
...props
|
|
71
|
+
}, ref) {
|
|
72
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormProvider, {
|
|
68
73
|
scope,
|
|
69
74
|
onSubmit,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}),
|
|
84
|
-
Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
85
|
-
Trigger: FormTrigger
|
|
86
|
-
});
|
|
75
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormFrame, {
|
|
76
|
+
ref,
|
|
77
|
+
...props,
|
|
78
|
+
onSubmit: e => {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
onSubmit?.();
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
86
|
+
Trigger: FormTrigger
|
|
87
|
+
});
|
package/dist/cjs/Form.native.js
CHANGED
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var Form_exports = {};
|
|
24
26
|
__export(Form_exports, {
|
|
@@ -30,61 +32,60 @@ __export(Form_exports, {
|
|
|
30
32
|
useFormContext: () => useFormContext
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(Form_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
onSubmit:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
});
|
|
86
|
-
}),
|
|
87
|
-
Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
88
|
-
Trigger: FormTrigger
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_core = require("@tamagui/core");
|
|
37
|
+
var import_helpers = require("@tamagui/helpers");
|
|
38
|
+
var FORM_NAME = "Form";
|
|
39
|
+
var FormFrame = (0, import_core.styled)(import_core.View, {
|
|
40
|
+
name: FORM_NAME,
|
|
41
|
+
render: "form"
|
|
42
|
+
});
|
|
43
|
+
var FormContext = (0, import_core.createStyledContext)({
|
|
44
|
+
onSubmit: void 0
|
|
45
|
+
});
|
|
46
|
+
var {
|
|
47
|
+
useStyledContext: useFormContext,
|
|
48
|
+
Provider: FormProvider
|
|
49
|
+
} = FormContext;
|
|
50
|
+
var FormTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
51
|
+
name: "FormTrigger"
|
|
52
|
+
});
|
|
53
|
+
var FormTrigger = FormTriggerFrame.styleable(function (props, forwardedRef) {
|
|
54
|
+
var {
|
|
55
|
+
scope,
|
|
56
|
+
children,
|
|
57
|
+
onPress,
|
|
58
|
+
...triggerProps
|
|
59
|
+
} = props;
|
|
60
|
+
var context = useFormContext(scope);
|
|
61
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormTriggerFrame, {
|
|
62
|
+
role: "button",
|
|
63
|
+
...triggerProps,
|
|
64
|
+
ref: forwardedRef,
|
|
65
|
+
onPress: (0, import_helpers.composeEventHandlers)(onPress, context.onSubmit),
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
var FormComponent = FormFrame.styleable(function Form(param, ref) {
|
|
70
|
+
var {
|
|
71
|
+
scope,
|
|
72
|
+
onSubmit,
|
|
73
|
+
...props
|
|
74
|
+
} = param;
|
|
75
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormProvider, {
|
|
76
|
+
scope,
|
|
77
|
+
onSubmit,
|
|
78
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormFrame, {
|
|
79
|
+
ref,
|
|
80
|
+
...props,
|
|
81
|
+
onSubmit: function (e) {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
84
|
+
}
|
|
85
|
+
})
|
|
89
86
|
});
|
|
87
|
+
});
|
|
88
|
+
var Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
89
|
+
Trigger: FormTrigger
|
|
90
|
+
});
|
|
90
91
|
//# sourceMappingURL=Form.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Form_exports","__export","Form","Form2","FormContext","FormFrame","FormProvider","FormTrigger","useFormContext","module","exports","import_jsx_runtime","require","import_core","import_helpers","FORM_NAME","styled","View","name","render","createStyledContext","onSubmit","useStyledContext","Provider","FormTriggerFrame","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","jsx","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Form_exports","__export","Form","Form2","FormContext","FormFrame","FormProvider","FormTrigger","useFormContext","module","exports","import_jsx_runtime","require","import_core","import_helpers","FORM_NAME","styled","View","name","render","createStyledContext","onSubmit","useStyledContext","Provider","FormTriggerFrame","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","jsx","role","ref","composeEventHandlers","FormComponent","param","e","preventDefault","withStaticProperties","Trigger"],"sources":["../../src/Form.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,IAAA,EAAAA,CAAA,KAAAC,KAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAf,YAAkD,CAAAK,YAAA;AAClD,IAAAW,kBAA2D,GAAAC,OAAA;AA+CrD,IAAAC,WAAA,GAAAD,OAAA;AA7CN,IAAAE,cAAkB,GAAAF,OAAA;AAEX,IAAAG,SAAM,SAAY;AAAa,IACpCV,SAAM,OAAAQ,WAAA,CAAAG,MAAA,EAAAH,WAAA,CAAAI,IAAA;EACNC,IAAA,EAAAH,SAAQ;EACTI,MAAA;AAUM;AAA0D,IAC/Df,WAAU,OAAAS,WAAA,CAAAO,mBAAA;EACSC,QAAA;AAEd;AAYP;EAAMC,gBAAA,EAAAd,cAAmB;EAAAe,QAAA,EAAOjB;AAAA,IAAMF,WAAA;AAAA,IACpCoB,gBAAM,OAAAX,WAAA,CAAAG,MAAA,EAAAH,WAAA,CAAAI,IAAA;EACPC,IAAA;AAMM;AAAqC,IACzCX,WAAO,GAAAiB,gBAAiB,CAAAC,SAAA,WAAAC,KAAA,EAAAC,YAAA;EACvB;IAAAC,KAAQ;IAAAC,QAAO;IAAAC,OAAU;IAAA,GAAAC;EAAY,IAAaL,KAAI;EACtD,IAAAM,OAAM,GAAAxB,cAAU,CAAAoB,KAAe;EAE/B,sBACE,IAAAjB,kBAAA,CAAAsB,GAAA,EAAAT,gBAAA;IAAAU,IAAC;IAAA,GAAAH,YAAA;IAAAI,GAAA,EACCR,YAAK;IAAAG,OACD,MAAAhB,cAAA,CAAAsB,oBAAA,EAAAN,OAAA,EAAAE,OAAA,CAAAX,QAAA;IAAAQ;EACC;AACkD;AAEtD,IAAAQ,aAAA,GAAAhC,SAAA,CAAAoB,SAAA,UAAAvB,KAAAoC,KAAA,EAAAH,GAAA;EAAA,IACH;IAAAP,KAAA;IAAAP,QAAA;IAAA,GAAAK;EAAA,IAAAY,KAAA;EAEJ,0BAAA3B,kBAAA,CAAAsB,GAAA,EAAA3B,YAAA;IACFsB,KAAA;IAMAP,QAAM;IAIJQ,QACE,qBAAAlB,kBAAA,CAACsB,GAAA,EAAA5B,SAAA,EAAa;MACX8B,GAAA;MAAA,GAAAT,KAAA;MACCL,QAAA,WAAAA,CAAAkB,CAAA;QACCA,CAAI,CAAAC,cAAA;QACLnB,QAAU,KAAC,IAAW,IAAAA,QAAA,uBAAAA,QAAA;MACpB;IACA;EAAW;AACb;AAAA,IACFlB,KACF,OAAAW,cAAA,CAAA2B,oBAAA,EAAAJ,aAAA;EAEHK,OAAA,EAAAnC;AAEM","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
|
package/dist/esm/Form.mjs
CHANGED
|
@@ -1,58 +1,57 @@
|
|
|
1
1
|
import { View, createStyledContext, styled } from "@tamagui/core";
|
|
2
2
|
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const FORM_NAME = "Form"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
4
|
+
const FORM_NAME = "Form";
|
|
5
|
+
const FormFrame = styled(View, {
|
|
6
|
+
name: FORM_NAME,
|
|
7
|
+
render: "form"
|
|
8
|
+
});
|
|
9
|
+
const FormContext = createStyledContext({
|
|
10
|
+
onSubmit: void 0
|
|
11
|
+
});
|
|
12
|
+
const {
|
|
13
|
+
useStyledContext: useFormContext,
|
|
14
|
+
Provider: FormProvider
|
|
15
|
+
} = FormContext;
|
|
16
|
+
const FormTriggerFrame = styled(View, {
|
|
17
|
+
name: "FormTrigger"
|
|
18
|
+
});
|
|
19
|
+
const FormTrigger = FormTriggerFrame.styleable((props, forwardedRef) => {
|
|
20
|
+
const {
|
|
21
|
+
scope,
|
|
22
|
+
children,
|
|
23
|
+
onPress,
|
|
24
|
+
...triggerProps
|
|
25
|
+
} = props;
|
|
26
|
+
const context = useFormContext(scope);
|
|
27
|
+
return /* @__PURE__ */jsx(FormTriggerFrame, {
|
|
28
|
+
role: "button",
|
|
29
|
+
...triggerProps,
|
|
30
|
+
ref: forwardedRef,
|
|
31
|
+
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
32
|
+
children
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const FormComponent = FormFrame.styleable(function Form({
|
|
36
|
+
scope,
|
|
37
|
+
onSubmit,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) {
|
|
40
|
+
return /* @__PURE__ */jsx(FormProvider, {
|
|
38
41
|
scope,
|
|
39
42
|
onSubmit,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onSubmit: e => {
|
|
49
|
-
e.preventDefault(), onSubmit?.();
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
}),
|
|
54
|
-
Form2 = withStaticProperties(FormComponent, {
|
|
55
|
-
Trigger: FormTrigger
|
|
43
|
+
children: /* @__PURE__ */jsx(FormFrame, {
|
|
44
|
+
ref,
|
|
45
|
+
...props,
|
|
46
|
+
onSubmit: e => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
onSubmit?.();
|
|
49
|
+
}
|
|
50
|
+
})
|
|
56
51
|
});
|
|
52
|
+
});
|
|
53
|
+
const Form2 = withStaticProperties(FormComponent, {
|
|
54
|
+
Trigger: FormTrigger
|
|
55
|
+
});
|
|
57
56
|
export { Form2 as Form, FormContext, FormFrame, FormProvider, FormTrigger, useFormContext };
|
|
58
57
|
//# sourceMappingURL=Form.mjs.map
|
package/dist/esm/Form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","createStyledContext","styled","composeEventHandlers","withStaticProperties","jsx","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","
|
|
1
|
+
{"version":3,"names":["View","createStyledContext","styled","composeEventHandlers","withStaticProperties","jsx","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","role","ref","FormComponent","Form","e","preventDefault","Form2","Trigger"],"sources":["../../src/Form.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,IAAA,EAAMC,mBAAA,EAAqBC,MAAA,QAAc;AAClD,SAASC,oBAAA,EAAsBC,oBAAA,QAA4B;AA+CrD,SAAAC,GAAA;AA7CN,MAAMC,SAAA,GAAY;AAEX,MAAMC,SAAA,GAAYL,MAAA,CAAOF,IAAA,EAAM;EACpCQ,IAAA,EAAMF,SAAA;EACNG,MAAA,EAAQ;AACV,CAAC;AAUM,MAAMC,WAAA,GAAcT,mBAAA,CAAsC;EAC/DU,QAAA,EAAU;AACZ,CAAqB;AAEd,MAAM;EAAEC,gBAAA,EAAkBC,cAAA;EAAgBC,QAAA,EAAUC;AAAa,IAAIL,WAAA;AAY5E,MAAMM,gBAAA,GAAmBd,MAAA,CAAOF,IAAA,EAAM;EACpCQ,IAAA,EAAM;AACR,CAAC;AAMM,MAAMS,WAAA,GAAcD,gBAAA,CAAiBE,SAAA,CAC1C,CAACC,KAAA,EAAOC,YAAA,KAAiB;EACvB,MAAM;IAAEC,KAAA;IAAOC,QAAA;IAAUC,OAAA;IAAS,GAAGC;EAAa,IAAIL,KAAA;EACtD,MAAMM,OAAA,GAAUZ,cAAA,CAAeQ,KAAK;EAEpC,OACE,eAAAhB,GAAA,CAACW,gBAAA;IACCU,IAAA,EAAK;IACJ,GAAGF,YAAA;IACJG,GAAA,EAAKP,YAAA;IACLG,OAAA,EAASpB,oBAAA,CAAqBoB,OAAA,EAASE,OAAA,CAAQd,QAAQ;IAEtDW;EAAA,CACH;AAEJ,CACF;AAMA,MAAMM,aAAA,GAAgBrB,SAAA,CAAUW,SAAA,CAA0B,SAASW,KACjE;EAAER,KAAA;EAAOV,QAAA;EAAU,GAAGQ;AAAM,GAC5BQ,GAAA,EACA;EACA,OACE,eAAAtB,GAAA,CAACU,YAAA;IAAaM,KAAA;IAAcV,QAAA;IAC1BW,QAAA,iBAAAjB,GAAA,CAACE,SAAA;MACCoB,GAAA;MACC,GAAIR,KAAA;MACLR,QAAA,EAAWmB,CAAA,IAAW;QACpBA,CAAA,CAAEC,cAAA,CAAe;QACjBpB,QAAA,GAAW;MACb;IAAA,CACF;EAAA,CACF;AAEJ,CAAC;AAEM,MAAMqB,KAAA,GAAO5B,oBAAA,CAAqBwB,aAAA,EAAe;EACtDK,OAAA,EAAShB;AACX,CAAC","ignoreList":[]}
|
package/dist/esm/Form.native.js
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { View, createStyledContext, styled } from "@tamagui/core";
|
|
3
3
|
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
4
|
-
var FORM_NAME = "Form"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
34
|
-
children
|
|
35
|
-
});
|
|
36
|
-
}),
|
|
37
|
-
FormComponent = FormFrame.styleable(function (param, ref) {
|
|
38
|
-
var {
|
|
39
|
-
scope,
|
|
40
|
-
onSubmit,
|
|
41
|
-
...props
|
|
42
|
-
} = param;
|
|
43
|
-
return /* @__PURE__ */_jsx(FormProvider, {
|
|
44
|
-
scope,
|
|
45
|
-
onSubmit,
|
|
46
|
-
children: /* @__PURE__ */_jsx(FormFrame, {
|
|
47
|
-
ref,
|
|
48
|
-
...props,
|
|
49
|
-
onSubmit: function (e) {
|
|
50
|
-
e.preventDefault(), onSubmit?.();
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
}),
|
|
55
|
-
Form2 = withStaticProperties(FormComponent, {
|
|
56
|
-
Trigger: FormTrigger
|
|
4
|
+
var FORM_NAME = "Form";
|
|
5
|
+
var FormFrame = styled(View, {
|
|
6
|
+
name: FORM_NAME,
|
|
7
|
+
render: "form"
|
|
8
|
+
});
|
|
9
|
+
var FormContext = createStyledContext({
|
|
10
|
+
onSubmit: void 0
|
|
11
|
+
});
|
|
12
|
+
var {
|
|
13
|
+
useStyledContext: useFormContext,
|
|
14
|
+
Provider: FormProvider
|
|
15
|
+
} = FormContext;
|
|
16
|
+
var FormTriggerFrame = styled(View, {
|
|
17
|
+
name: "FormTrigger"
|
|
18
|
+
});
|
|
19
|
+
var FormTrigger = FormTriggerFrame.styleable(function (props, forwardedRef) {
|
|
20
|
+
var {
|
|
21
|
+
scope,
|
|
22
|
+
children,
|
|
23
|
+
onPress,
|
|
24
|
+
...triggerProps
|
|
25
|
+
} = props;
|
|
26
|
+
var context = useFormContext(scope);
|
|
27
|
+
return /* @__PURE__ */_jsx(FormTriggerFrame, {
|
|
28
|
+
role: "button",
|
|
29
|
+
...triggerProps,
|
|
30
|
+
ref: forwardedRef,
|
|
31
|
+
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
32
|
+
children
|
|
57
33
|
});
|
|
34
|
+
});
|
|
35
|
+
var FormComponent = FormFrame.styleable(function Form(param, ref) {
|
|
36
|
+
var {
|
|
37
|
+
scope,
|
|
38
|
+
onSubmit,
|
|
39
|
+
...props
|
|
40
|
+
} = param;
|
|
41
|
+
return /* @__PURE__ */_jsx(FormProvider, {
|
|
42
|
+
scope,
|
|
43
|
+
onSubmit,
|
|
44
|
+
children: /* @__PURE__ */_jsx(FormFrame, {
|
|
45
|
+
ref,
|
|
46
|
+
...props,
|
|
47
|
+
onSubmit: function (e) {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var Form2 = withStaticProperties(FormComponent, {
|
|
55
|
+
Trigger: FormTrigger
|
|
56
|
+
});
|
|
58
57
|
export { Form2 as Form, FormContext, FormFrame, FormProvider, FormTrigger, useFormContext };
|
|
59
58
|
//# sourceMappingURL=Form.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["jsx","_jsx","View","createStyledContext","styled","composeEventHandlers","withStaticProperties","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","View","createStyledContext","styled","composeEventHandlers","withStaticProperties","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","role","ref","FormComponent","Form","param","e","preventDefault","Form2","Trigger"],"sources":["../../src/Form.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,GAAA,IAAMC,IAAA,2BAAqB;AACpC,SAASC,IAAA,EAAAC,mBAAsB,EAAAC,MAAA,uBAA4B;AA+CrD,SAAAC,oBAAA,EAAAC,oBAAA;AA7CN,IAAAC,SAAM,SAAY;AAEX,IAAAC,SAAM,GAAAJ,MAAY,CAAAF,IAAO;EAC9BO,IAAA,EAAMF,SAAA;EACNG,MAAA,EAAQ;AACV,CAAC;AAUM,IAAAC,WAAM,GAAAR,mBAAc;EACzBS,QAAA,EAAU;AACZ,CAAqB;AAEd;EAAMC,gBAAE,EAAAC,cAAkB;EAAAC,QAAgB,EAAAC;AAAU,IAAaL,WAAI;AAY5E,IAAAM,gBAAM,GAAAb,MAAmB,CAAAF,IAAO;EAC9BO,IAAA,EAAM;AACR,CAAC;AAMM,IAAAS,WAAM,GAAAD,gBAAc,CAAAE,SAAiB,WAAAC,KAAA,EAAAC,YAAA;EAC1C,IAAC;IAAAC,KAAO;IAAAC,QAAA;IAAAC,OAAiB;IAAA,GAAAC;EAAA,IAAAL,KAAA;EACvB,IAAAM,OAAQ,GAAAZ,cAAiB,CAAAQ,KAAA;EACzB,sBAAgBrB,IAAA,CAAAgB,gBAAoB;IAEpCU,IAAA,UACE;IAAA,GAACF,YAAA;IAAAG,GAAA,EAAAP,YAAA;IAAAG,OACC,EAAAnB,oBAAK,CAAAmB,OAAA,EAAAE,OAAA,CAAAd,QAAA;IAAAW;EACD;AACC;AACkD,IAAAM,aAEtD,GAAArB,SAAA,CAAAW,SAAA,UAAAW,KAAAC,KAAA,EAAAH,GAAA;EAAA;IAAAN,KAAA;IAAAV,QAAA;IAAA,GAAAQ;EAAA,IAAAW,KAAA;EAAA,OACH,eAAA9B,IAAA,CAAAe,YAAA;IAEJM,KAAA;IACFV,QAAA;IAMAW,QAAM,iBAAgBtB,IAAU,CAAAO,SAA0B;MAIxDoB,GACE;MACG,GAAAR,KAAA;MAAAR,QAAA,WAAAA,CAAAoB,CAAA;QACCA,CAAA,CAAAC,cAAA;QACCrB,QAAI,aAAAA,QAAA,uBAAAA,QAAA;MACL;IACE;EACA;AAAW;AACb,IAAAsB,KAAA,GAAA5B,oBAAA,CAAAuB,aAAA;EACFM,OACF,EAAAjB;AAEJ,CAAC;AAEM,SACLgB,KAAA,IAASJ,IAAA,EACVnB,WAAA,E","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Form";
|
|
1
|
+
export * from "./Form.mjs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
package/dist/jsx/Form.mjs
CHANGED
|
@@ -1,58 +1,57 @@
|
|
|
1
1
|
import { View, createStyledContext, styled } from "@tamagui/core";
|
|
2
2
|
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const FORM_NAME = "Form"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
4
|
+
const FORM_NAME = "Form";
|
|
5
|
+
const FormFrame = styled(View, {
|
|
6
|
+
name: FORM_NAME,
|
|
7
|
+
render: "form"
|
|
8
|
+
});
|
|
9
|
+
const FormContext = createStyledContext({
|
|
10
|
+
onSubmit: void 0
|
|
11
|
+
});
|
|
12
|
+
const {
|
|
13
|
+
useStyledContext: useFormContext,
|
|
14
|
+
Provider: FormProvider
|
|
15
|
+
} = FormContext;
|
|
16
|
+
const FormTriggerFrame = styled(View, {
|
|
17
|
+
name: "FormTrigger"
|
|
18
|
+
});
|
|
19
|
+
const FormTrigger = FormTriggerFrame.styleable((props, forwardedRef) => {
|
|
20
|
+
const {
|
|
21
|
+
scope,
|
|
22
|
+
children,
|
|
23
|
+
onPress,
|
|
24
|
+
...triggerProps
|
|
25
|
+
} = props;
|
|
26
|
+
const context = useFormContext(scope);
|
|
27
|
+
return /* @__PURE__ */jsx(FormTriggerFrame, {
|
|
28
|
+
role: "button",
|
|
29
|
+
...triggerProps,
|
|
30
|
+
ref: forwardedRef,
|
|
31
|
+
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
32
|
+
children
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const FormComponent = FormFrame.styleable(function Form({
|
|
36
|
+
scope,
|
|
37
|
+
onSubmit,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) {
|
|
40
|
+
return /* @__PURE__ */jsx(FormProvider, {
|
|
38
41
|
scope,
|
|
39
42
|
onSubmit,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onSubmit: e => {
|
|
49
|
-
e.preventDefault(), onSubmit?.();
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
}),
|
|
54
|
-
Form2 = withStaticProperties(FormComponent, {
|
|
55
|
-
Trigger: FormTrigger
|
|
43
|
+
children: /* @__PURE__ */jsx(FormFrame, {
|
|
44
|
+
ref,
|
|
45
|
+
...props,
|
|
46
|
+
onSubmit: e => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
onSubmit?.();
|
|
49
|
+
}
|
|
50
|
+
})
|
|
56
51
|
});
|
|
52
|
+
});
|
|
53
|
+
const Form2 = withStaticProperties(FormComponent, {
|
|
54
|
+
Trigger: FormTrigger
|
|
55
|
+
});
|
|
57
56
|
export { Form2 as Form, FormContext, FormFrame, FormProvider, FormTrigger, useFormContext };
|
|
58
57
|
//# sourceMappingURL=Form.mjs.map
|
package/dist/jsx/Form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","createStyledContext","styled","composeEventHandlers","withStaticProperties","jsx","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","
|
|
1
|
+
{"version":3,"names":["View","createStyledContext","styled","composeEventHandlers","withStaticProperties","jsx","FORM_NAME","FormFrame","name","render","FormContext","onSubmit","useStyledContext","useFormContext","Provider","FormProvider","FormTriggerFrame","FormTrigger","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","role","ref","FormComponent","Form","e","preventDefault","Form2","Trigger"],"sources":["../../src/Form.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,IAAA,EAAMC,mBAAA,EAAqBC,MAAA,QAAc;AAClD,SAASC,oBAAA,EAAsBC,oBAAA,QAA4B;AA+CrD,SAAAC,GAAA;AA7CN,MAAMC,SAAA,GAAY;AAEX,MAAMC,SAAA,GAAYL,MAAA,CAAOF,IAAA,EAAM;EACpCQ,IAAA,EAAMF,SAAA;EACNG,MAAA,EAAQ;AACV,CAAC;AAUM,MAAMC,WAAA,GAAcT,mBAAA,CAAsC;EAC/DU,QAAA,EAAU;AACZ,CAAqB;AAEd,MAAM;EAAEC,gBAAA,EAAkBC,cAAA;EAAgBC,QAAA,EAAUC;AAAa,IAAIL,WAAA;AAY5E,MAAMM,gBAAA,GAAmBd,MAAA,CAAOF,IAAA,EAAM;EACpCQ,IAAA,EAAM;AACR,CAAC;AAMM,MAAMS,WAAA,GAAcD,gBAAA,CAAiBE,SAAA,CAC1C,CAACC,KAAA,EAAOC,YAAA,KAAiB;EACvB,MAAM;IAAEC,KAAA;IAAOC,QAAA;IAAUC,OAAA;IAAS,GAAGC;EAAa,IAAIL,KAAA;EACtD,MAAMM,OAAA,GAAUZ,cAAA,CAAeQ,KAAK;EAEpC,OACE,eAAAhB,GAAA,CAACW,gBAAA;IACCU,IAAA,EAAK;IACJ,GAAGF,YAAA;IACJG,GAAA,EAAKP,YAAA;IACLG,OAAA,EAASpB,oBAAA,CAAqBoB,OAAA,EAASE,OAAA,CAAQd,QAAQ;IAEtDW;EAAA,CACH;AAEJ,CACF;AAMA,MAAMM,aAAA,GAAgBrB,SAAA,CAAUW,SAAA,CAA0B,SAASW,KACjE;EAAER,KAAA;EAAOV,QAAA;EAAU,GAAGQ;AAAM,GAC5BQ,GAAA,EACA;EACA,OACE,eAAAtB,GAAA,CAACU,YAAA;IAAaM,KAAA;IAAcV,QAAA;IAC1BW,QAAA,iBAAAjB,GAAA,CAACE,SAAA;MACCoB,GAAA;MACC,GAAIR,KAAA;MACLR,QAAA,EAAWmB,CAAA,IAAW;QACpBA,CAAA,CAAEC,cAAA,CAAe;QACjBpB,QAAA,GAAW;MACb;IAAA,CACF;EAAA,CACF;AAEJ,CAAC;AAEM,MAAMqB,KAAA,GAAO5B,oBAAA,CAAqBwB,aAAA,EAAe;EACtDK,OAAA,EAAShB;AACX,CAAC","ignoreList":[]}
|
package/dist/jsx/Form.native.js
CHANGED
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var Form_exports = {};
|
|
24
26
|
__export(Form_exports, {
|
|
@@ -30,61 +32,60 @@ __export(Form_exports, {
|
|
|
30
32
|
useFormContext: () => useFormContext
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(Form_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
onSubmit:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
});
|
|
86
|
-
}),
|
|
87
|
-
Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
88
|
-
Trigger: FormTrigger
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_core = require("@tamagui/core");
|
|
37
|
+
var import_helpers = require("@tamagui/helpers");
|
|
38
|
+
var FORM_NAME = "Form";
|
|
39
|
+
var FormFrame = (0, import_core.styled)(import_core.View, {
|
|
40
|
+
name: FORM_NAME,
|
|
41
|
+
render: "form"
|
|
42
|
+
});
|
|
43
|
+
var FormContext = (0, import_core.createStyledContext)({
|
|
44
|
+
onSubmit: void 0
|
|
45
|
+
});
|
|
46
|
+
var {
|
|
47
|
+
useStyledContext: useFormContext,
|
|
48
|
+
Provider: FormProvider
|
|
49
|
+
} = FormContext;
|
|
50
|
+
var FormTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
51
|
+
name: "FormTrigger"
|
|
52
|
+
});
|
|
53
|
+
var FormTrigger = FormTriggerFrame.styleable(function (props, forwardedRef) {
|
|
54
|
+
var {
|
|
55
|
+
scope,
|
|
56
|
+
children,
|
|
57
|
+
onPress,
|
|
58
|
+
...triggerProps
|
|
59
|
+
} = props;
|
|
60
|
+
var context = useFormContext(scope);
|
|
61
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormTriggerFrame, {
|
|
62
|
+
role: "button",
|
|
63
|
+
...triggerProps,
|
|
64
|
+
ref: forwardedRef,
|
|
65
|
+
onPress: (0, import_helpers.composeEventHandlers)(onPress, context.onSubmit),
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
var FormComponent = FormFrame.styleable(function Form(param, ref) {
|
|
70
|
+
var {
|
|
71
|
+
scope,
|
|
72
|
+
onSubmit,
|
|
73
|
+
...props
|
|
74
|
+
} = param;
|
|
75
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormProvider, {
|
|
76
|
+
scope,
|
|
77
|
+
onSubmit,
|
|
78
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(FormFrame, {
|
|
79
|
+
ref,
|
|
80
|
+
...props,
|
|
81
|
+
onSubmit: function (e) {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
84
|
+
}
|
|
85
|
+
})
|
|
89
86
|
});
|
|
87
|
+
});
|
|
88
|
+
var Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
89
|
+
Trigger: FormTrigger
|
|
90
|
+
});
|
|
90
91
|
//# sourceMappingURL=Form.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Form_exports","Form","Form2","FormContext","FormFrame","FormProvider","FormTrigger","useFormContext","module","exports","import_jsx_runtime","require","import_core","import_helpers","FORM_NAME","styled","View","render","createStyledContext","onSubmit","useStyledContext","Provider","FormTriggerFrame","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","jsx"
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Form_exports","Form","Form2","FormContext","FormFrame","FormProvider","FormTrigger","useFormContext","module","exports","import_jsx_runtime","require","import_core","import_helpers","FORM_NAME","styled","View","render","createStyledContext","onSubmit","useStyledContext","Provider","FormTriggerFrame","styleable","props","forwardedRef","scope","children","onPress","triggerProps","context","jsx"],"sources":["../../src/Form.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsB;AA+CzB,IAAAC,gBAAA,GAAAF,MAAA,CAAAG,wBAAA;AA7CN,IAAAC,iBAAkB,GAAAJ,MAAA,CAAAK,mBAAA;AAEX,IAAAC,YAAM,GAAYN,MAAO,CAAAO,SAAM,CAAAC,cAAA;AAAA,IACpCC,QAAM,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EACN,SAAQC,IAAA,IAAAD,GAAA,EACTZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAUM;AAA0D,IAC/DC,WAAU,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EACS,IAAAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IAEd,KAAQ,IAAAG,GAAA,IAAAhB,iBAAkB,CAAAa,IAAgB,GAY3C,KAAAX,YAAA,CAAAe,IAAmB,CAAAL,EAAA,EAAOI,GAAA,KAAMA,GAAA,KAAAF,MAAA,EAC9BnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EACP;EAMM,OAAME,EAAA;AAA+B;AAExC,IAAAM,YAAQ,GAAOC,GAAA,IAAAR,WAAmB,CAAAhB,SAAG,KAAa,YAAI;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AACtD,IAAAE,YAAM,IAAU;AAEhBhB,QAAA,CAAAgB,YACE;EAAAC,IAAC,EAAAA,CAAA,KAAAC,KAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,SACC,EAAAA,CAAA,KAAKA,SAAA;EAAAC,YACD,EAAAA,CAAA,KAAAA,YAAA;EAAAC,WACC,EAAAA,CAAA,KAAAA,WAAA;EAAAC,cACL,EAASA,CAAA,KAAAA;AAA8C;AAEtDC,MAAA,CAAAC,OAAA,GAAAZ,YAAA,CAAAG,YAAA;AAAA,IACHU,kBAAA,GAAAC,OAAA;AAAA,IAEJC,WAAA,GAAAD,OAAA;AACF,IAAAE,cAAA,GAAAF,OAAA;AAMA,IAAAG,SAAM,SAAgB;AAIpB,IAAAV,SACE,OAAAQ,WAAC,CAAAG,MAAA,EAAAH,WAAa,CAAcI,IAAA;EAC1B7B,IAAC,EAAA2B,SAAA;EAAAG,MAAA;AAAA;AACC,IAAAd,WACK,OAAAS,WAAA,CAAAM,mBAAA;EAAAC,QACL,OAAW;AACT;AACA;EAAAC,gBAAW,EAAAb,cAAA;EAAAc,QAAA,EAAAhB;AAAA,IAAAF,WAAA;AAAA,IAAAmB,gBACb,OAAAV,WAAA,CAAAG,MAAA,EAAAH,WAAA,CAAAI,IAAA;EAAA7B,IAAA;AAAA,EACF;AAGN,IAACmB,WAAA,GAAAgB,gBAAA,CAAAC,SAAA,WAAAC,KAAA,EAAAC,YAAA;EAEM,IAAM;IAAAC,KAAA;IAAOC,QAAA;IAAAC,OAAA;IAAA,GAAqBC;EAAe,IAAAL,KAAA;EACtD,IAAAM,OAAS,GAAAvB,cAAA,CAAAmB,KAAA;EACV,0BAAAhB,kBAAA,CAAAqB,GAAA,EAAAT,gBAAA","ignoreList":[]}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Form";
|
|
1
|
+
export * from "./Form.mjs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/index.js.map
CHANGED
package/dist/jsx/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/form",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.40",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -18,15 +18,12 @@
|
|
|
18
18
|
"./package.json": "./package.json",
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./types/index.d.ts",
|
|
21
|
-
"react-native":
|
|
22
|
-
|
|
23
|
-
"import": "./dist/esm/index.native.js",
|
|
24
|
-
"require": "./dist/cjs/index.native.js"
|
|
25
|
-
},
|
|
21
|
+
"react-native": "./dist/esm/index.native.js",
|
|
22
|
+
"browser": "./dist/esm/index.mjs",
|
|
26
23
|
"module": "./dist/esm/index.mjs",
|
|
27
24
|
"import": "./dist/esm/index.mjs",
|
|
28
25
|
"require": "./dist/cjs/index.cjs",
|
|
29
|
-
"default": "./dist/
|
|
26
|
+
"default": "./dist/esm/index.mjs"
|
|
30
27
|
}
|
|
31
28
|
},
|
|
32
29
|
"publishConfig": {
|
|
@@ -39,11 +36,11 @@
|
|
|
39
36
|
"clean:build": "tamagui-build clean:build"
|
|
40
37
|
},
|
|
41
38
|
"dependencies": {
|
|
42
|
-
"@tamagui/core": "2.0.0-rc.
|
|
43
|
-
"@tamagui/helpers": "2.0.0-rc.
|
|
39
|
+
"@tamagui/core": "2.0.0-rc.40",
|
|
40
|
+
"@tamagui/helpers": "2.0.0-rc.40"
|
|
44
41
|
},
|
|
45
42
|
"devDependencies": {
|
|
46
|
-
"@tamagui/build": "2.0.0-rc.
|
|
43
|
+
"@tamagui/build": "2.0.0-rc.40",
|
|
47
44
|
"react": ">=19"
|
|
48
45
|
},
|
|
49
46
|
"peerDependencies": {
|
package/src/Form.tsx
CHANGED
|
@@ -48,7 +48,7 @@ export const FormTrigger = FormTriggerFrame.styleable<FormTriggerProps>(
|
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
50
|
<FormTriggerFrame
|
|
51
|
-
|
|
51
|
+
role="button"
|
|
52
52
|
{...triggerProps}
|
|
53
53
|
ref={forwardedRef}
|
|
54
54
|
onPress={composeEventHandlers(onPress, context.onSubmit)}
|
package/dist/cjs/Form.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var Form_exports = {};
|
|
16
|
-
__export(Form_exports, {
|
|
17
|
-
Form: () => Form2,
|
|
18
|
-
FormContext: () => FormContext,
|
|
19
|
-
FormFrame: () => FormFrame,
|
|
20
|
-
FormProvider: () => FormProvider,
|
|
21
|
-
FormTrigger: () => FormTrigger,
|
|
22
|
-
useFormContext: () => useFormContext
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(Form_exports);
|
|
25
|
-
var import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
const FORM_NAME = "Form", FormFrame = (0, import_core.styled)(import_core.View, {
|
|
27
|
-
name: FORM_NAME,
|
|
28
|
-
render: "form"
|
|
29
|
-
}), FormContext = (0, import_core.createStyledContext)({
|
|
30
|
-
onSubmit: void 0
|
|
31
|
-
}), { useStyledContext: useFormContext, Provider: FormProvider } = FormContext, FormTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
32
|
-
name: "FormTrigger"
|
|
33
|
-
}), FormTrigger = FormTriggerFrame.styleable(
|
|
34
|
-
(props, forwardedRef) => {
|
|
35
|
-
const { scope, children, onPress, ...triggerProps } = props, context = useFormContext(scope);
|
|
36
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
FormTriggerFrame,
|
|
38
|
-
{
|
|
39
|
-
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit" }),
|
|
40
|
-
...triggerProps,
|
|
41
|
-
ref: forwardedRef,
|
|
42
|
-
onPress: (0, import_helpers.composeEventHandlers)(onPress, context.onSubmit),
|
|
43
|
-
children
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
), FormComponent = FormFrame.styleable(function({ scope, onSubmit, ...props }, ref) {
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormProvider, { scope, onSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
-
FormFrame,
|
|
50
|
-
{
|
|
51
|
-
ref,
|
|
52
|
-
...props,
|
|
53
|
-
onSubmit: (e) => {
|
|
54
|
-
e.preventDefault(), onSubmit?.();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
) });
|
|
58
|
-
}), Form2 = (0, import_helpers.withStaticProperties)(FormComponent, {
|
|
59
|
-
Trigger: FormTrigger
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=Form.js.map
|
package/dist/cjs/Form.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAkD,0BAClD,iBAA2D,6BAgD3C;AA9ChB,MAAM,YAAY,QAEL,gBAAY,oBAAO,kBAAM;AAAA,EACpC,MAAM;AAAA,EACN,QAAQ;AACV,CAAC,GAUY,kBAAc,iCAAsC;AAAA,EAC/D,UAAU;AACZ,CAAqB,GAER,EAAE,kBAAkB,gBAAgB,UAAU,aAAa,IAAI,aAYtE,uBAAmB,oBAAO,kBAAM;AAAA,EACpC,MAAM;AACR,CAAC,GAMY,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,OAAO,UAAU,SAAS,GAAG,aAAa,IAAI,OAChD,UAAU,eAAe,KAAK;AAEpC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,4CAAC,YAAO,MAAK,UAAS;AAAA,QAC7B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,aAAS,qCAAqB,SAAS,QAAQ,QAAQ;AAAA,QAEtD;AAAA;AAAA,IACH;AAAA,EAEJ;AACF,GAMM,gBAAgB,UAAU,UAA0B,SACxD,EAAE,OAAO,UAAU,GAAG,MAAM,GAC5B,KACA;AACA,SACE,4CAAC,gBAAa,OAAc,UAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAI;AAAA,MACL,UAAU,CAAC,MAAW;AACpB,UAAE,eAAe,GACjB,WAAW;AAAA,MACb;AAAA;AAAA,EACF,GACF;AAEJ,CAAC,GAEYA,YAAO,qCAAqB,eAAe;AAAA,EACtD,SAAS;AACX,CAAC;",
|
|
5
|
-
"names": ["Form"]
|
|
6
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
-
return to;
|
|
10
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
-
var index_exports = {};
|
|
13
|
-
module.exports = __toCommonJS(index_exports);
|
|
14
|
-
__reExport(index_exports, require("./Form"), module.exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
package/dist/esm/Form.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { View, createStyledContext, styled } from "@tamagui/core";
|
|
2
|
-
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const FORM_NAME = "Form", FormFrame = styled(View, {
|
|
5
|
-
name: FORM_NAME,
|
|
6
|
-
render: "form"
|
|
7
|
-
}), FormContext = createStyledContext({
|
|
8
|
-
onSubmit: void 0
|
|
9
|
-
}), { useStyledContext: useFormContext, Provider: FormProvider } = FormContext, FormTriggerFrame = styled(View, {
|
|
10
|
-
name: "FormTrigger"
|
|
11
|
-
}), FormTrigger = FormTriggerFrame.styleable(
|
|
12
|
-
(props, forwardedRef) => {
|
|
13
|
-
const { scope, children, onPress, ...triggerProps } = props, context = useFormContext(scope);
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
FormTriggerFrame,
|
|
16
|
-
{
|
|
17
|
-
render: /* @__PURE__ */ jsx("button", { type: "submit" }),
|
|
18
|
-
...triggerProps,
|
|
19
|
-
ref: forwardedRef,
|
|
20
|
-
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
21
|
-
children
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
), FormComponent = FormFrame.styleable(function({ scope, onSubmit, ...props }, ref) {
|
|
26
|
-
return /* @__PURE__ */ jsx(FormProvider, { scope, onSubmit, children: /* @__PURE__ */ jsx(
|
|
27
|
-
FormFrame,
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
...props,
|
|
31
|
-
onSubmit: (e) => {
|
|
32
|
-
e.preventDefault(), onSubmit?.();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
) });
|
|
36
|
-
}), Form2 = withStaticProperties(FormComponent, {
|
|
37
|
-
Trigger: FormTrigger
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
Form2 as Form,
|
|
41
|
-
FormContext,
|
|
42
|
-
FormFrame,
|
|
43
|
-
FormProvider,
|
|
44
|
-
FormTrigger,
|
|
45
|
-
useFormContext
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=Form.js.map
|
package/dist/esm/Form.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,MAAM,qBAAqB,cAAc;AAClD,SAAS,sBAAsB,4BAA4B;AAgD3C;AA9ChB,MAAM,YAAY,QAEL,YAAY,OAAO,MAAM;AAAA,EACpC,MAAM;AAAA,EACN,QAAQ;AACV,CAAC,GAUY,cAAc,oBAAsC;AAAA,EAC/D,UAAU;AACZ,CAAqB,GAER,EAAE,kBAAkB,gBAAgB,UAAU,aAAa,IAAI,aAYtE,mBAAmB,OAAO,MAAM;AAAA,EACpC,MAAM;AACR,CAAC,GAMY,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,OAAO,UAAU,SAAS,GAAG,aAAa,IAAI,OAChD,UAAU,eAAe,KAAK;AAEpC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,oBAAC,YAAO,MAAK,UAAS;AAAA,QAC7B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,SAAS,qBAAqB,SAAS,QAAQ,QAAQ;AAAA,QAEtD;AAAA;AAAA,IACH;AAAA,EAEJ;AACF,GAMM,gBAAgB,UAAU,UAA0B,SACxD,EAAE,OAAO,UAAU,GAAG,MAAM,GAC5B,KACA;AACA,SACE,oBAAC,gBAAa,OAAc,UAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAI;AAAA,MACL,UAAU,CAAC,MAAW;AACpB,UAAE,eAAe,GACjB,WAAW;AAAA,MACb;AAAA;AAAA,EACF,GACF;AAEJ,CAAC,GAEYA,QAAO,qBAAqB,eAAe;AAAA,EACtD,SAAS;AACX,CAAC;",
|
|
5
|
-
"names": ["Form"]
|
|
6
|
-
}
|
package/dist/jsx/Form.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { View, createStyledContext, styled } from "@tamagui/core";
|
|
2
|
-
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const FORM_NAME = "Form", FormFrame = styled(View, {
|
|
5
|
-
name: FORM_NAME,
|
|
6
|
-
render: "form"
|
|
7
|
-
}), FormContext = createStyledContext({
|
|
8
|
-
onSubmit: void 0
|
|
9
|
-
}), { useStyledContext: useFormContext, Provider: FormProvider } = FormContext, FormTriggerFrame = styled(View, {
|
|
10
|
-
name: "FormTrigger"
|
|
11
|
-
}), FormTrigger = FormTriggerFrame.styleable(
|
|
12
|
-
(props, forwardedRef) => {
|
|
13
|
-
const { scope, children, onPress, ...triggerProps } = props, context = useFormContext(scope);
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
FormTriggerFrame,
|
|
16
|
-
{
|
|
17
|
-
render: /* @__PURE__ */ jsx("button", { type: "submit" }),
|
|
18
|
-
...triggerProps,
|
|
19
|
-
ref: forwardedRef,
|
|
20
|
-
onPress: composeEventHandlers(onPress, context.onSubmit),
|
|
21
|
-
children
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
), FormComponent = FormFrame.styleable(function({ scope, onSubmit, ...props }, ref) {
|
|
26
|
-
return /* @__PURE__ */ jsx(FormProvider, { scope, onSubmit, children: /* @__PURE__ */ jsx(
|
|
27
|
-
FormFrame,
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
...props,
|
|
31
|
-
onSubmit: (e) => {
|
|
32
|
-
e.preventDefault(), onSubmit?.();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
) });
|
|
36
|
-
}), Form2 = withStaticProperties(FormComponent, {
|
|
37
|
-
Trigger: FormTrigger
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
Form2 as Form,
|
|
41
|
-
FormContext,
|
|
42
|
-
FormFrame,
|
|
43
|
-
FormProvider,
|
|
44
|
-
FormTrigger,
|
|
45
|
-
useFormContext
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=Form.js.map
|
package/dist/jsx/Form.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Form.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,MAAM,qBAAqB,cAAc;AAClD,SAAS,sBAAsB,4BAA4B;AAgD3C;AA9ChB,MAAM,YAAY,QAEL,YAAY,OAAO,MAAM;AAAA,EACpC,MAAM;AAAA,EACN,QAAQ;AACV,CAAC,GAUY,cAAc,oBAAsC;AAAA,EAC/D,UAAU;AACZ,CAAqB,GAER,EAAE,kBAAkB,gBAAgB,UAAU,aAAa,IAAI,aAYtE,mBAAmB,OAAO,MAAM;AAAA,EACpC,MAAM;AACR,CAAC,GAMY,cAAc,iBAAiB;AAAA,EAC1C,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,OAAO,UAAU,SAAS,GAAG,aAAa,IAAI,OAChD,UAAU,eAAe,KAAK;AAEpC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,oBAAC,YAAO,MAAK,UAAS;AAAA,QAC7B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,SAAS,qBAAqB,SAAS,QAAQ,QAAQ;AAAA,QAEtD;AAAA;AAAA,IACH;AAAA,EAEJ;AACF,GAMM,gBAAgB,UAAU,UAA0B,SACxD,EAAE,OAAO,UAAU,GAAG,MAAM,GAC5B,KACA;AACA,SACE,oBAAC,gBAAa,OAAc,UAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAI;AAAA,MACL,UAAU,CAAC,MAAW;AACpB,UAAE,eAAe,GACjB,WAAW;AAAA,MACb;AAAA;AAAA,EACF,GACF;AAEJ,CAAC,GAEYA,QAAO,qBAAqB,eAAe;AAAA,EACtD,SAAS;AACX,CAAC;",
|
|
5
|
-
"names": ["Form"]
|
|
6
|
-
}
|