tamagui 2.0.0-1768427228811 → 2.0.0-1768530912818
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/helpers/inputHelpers.cjs +68 -0
- package/dist/cjs/helpers/inputHelpers.js +50 -0
- package/dist/cjs/helpers/inputHelpers.js.map +6 -0
- package/dist/cjs/helpers/inputHelpers.native.js +76 -0
- package/dist/cjs/helpers/inputHelpers.native.js.map +1 -0
- package/dist/cjs/views/Input.cjs +123 -0
- package/dist/cjs/views/Input.js +114 -0
- package/dist/cjs/views/Input.js.map +6 -0
- package/dist/cjs/views/Input.native.js +132 -0
- package/dist/cjs/views/Input.native.js.map +1 -0
- package/dist/cjs/views/Skeleton.cjs +0 -0
- package/dist/cjs/views/Skeleton.js +1 -0
- package/dist/cjs/views/Skeleton.js.map +6 -0
- package/dist/cjs/views/Skeleton.native.js +2 -0
- package/dist/cjs/views/Skeleton.native.js.map +1 -0
- package/dist/cjs/views/TextArea.cjs +76 -0
- package/dist/cjs/views/TextArea.js +58 -0
- package/dist/cjs/views/TextArea.js.map +6 -0
- package/dist/cjs/views/TextArea.native.js +79 -0
- package/dist/cjs/views/TextArea.native.js.map +1 -0
- package/dist/esm/helpers/inputHelpers.js +37 -0
- package/dist/esm/helpers/inputHelpers.js.map +6 -0
- package/dist/esm/helpers/inputHelpers.mjs +44 -0
- package/dist/esm/helpers/inputHelpers.mjs.map +1 -0
- package/dist/esm/helpers/inputHelpers.native.js +49 -0
- package/dist/esm/helpers/inputHelpers.native.js.map +1 -0
- package/dist/esm/views/Input.js +96 -0
- package/dist/esm/views/Input.js.map +6 -0
- package/dist/esm/views/Input.mjs +86 -0
- package/dist/esm/views/Input.mjs.map +1 -0
- package/dist/esm/views/Input.native.js +92 -0
- package/dist/esm/views/Input.native.js.map +1 -0
- package/dist/esm/views/Skeleton.js +1 -0
- package/dist/esm/views/Skeleton.js.map +6 -0
- package/dist/esm/views/Skeleton.mjs +2 -0
- package/dist/esm/views/Skeleton.mjs.map +1 -0
- package/dist/esm/views/Skeleton.native.js +2 -0
- package/dist/esm/views/Skeleton.native.js.map +1 -0
- package/dist/esm/views/TextArea.js +39 -0
- package/dist/esm/views/TextArea.js.map +6 -0
- package/dist/esm/views/TextArea.mjs +41 -0
- package/dist/esm/views/TextArea.mjs.map +1 -0
- package/dist/esm/views/TextArea.native.js +41 -0
- package/dist/esm/views/TextArea.native.js.map +1 -0
- package/dist/jsx/helpers/inputHelpers.js +37 -0
- package/dist/jsx/helpers/inputHelpers.js.map +6 -0
- package/dist/jsx/helpers/inputHelpers.mjs +44 -0
- package/dist/jsx/helpers/inputHelpers.mjs.map +1 -0
- package/dist/jsx/helpers/inputHelpers.native.js +76 -0
- package/dist/jsx/helpers/inputHelpers.native.js.map +1 -0
- package/dist/jsx/views/Input.js +96 -0
- package/dist/jsx/views/Input.js.map +6 -0
- package/dist/jsx/views/Input.mjs +86 -0
- package/dist/jsx/views/Input.mjs.map +1 -0
- package/dist/jsx/views/Input.native.js +132 -0
- package/dist/jsx/views/Input.native.js.map +1 -0
- package/dist/jsx/views/Skeleton.js +1 -0
- package/dist/jsx/views/Skeleton.js.map +6 -0
- package/dist/jsx/views/Skeleton.mjs +2 -0
- package/dist/jsx/views/Skeleton.mjs.map +1 -0
- package/dist/jsx/views/Skeleton.native.js +2 -0
- package/dist/jsx/views/Skeleton.native.js.map +1 -0
- package/dist/jsx/views/TextArea.js +39 -0
- package/dist/jsx/views/TextArea.js.map +6 -0
- package/dist/jsx/views/TextArea.mjs +41 -0
- package/dist/jsx/views/TextArea.mjs.map +1 -0
- package/dist/jsx/views/TextArea.native.js +79 -0
- package/dist/jsx/views/TextArea.native.js.map +1 -0
- package/dist/native.cjs +213 -181
- package/dist/test.cjs +213 -181
- package/package.json +57 -57
- package/types/helpers/inputHelpers.d.ts.map +1 -0
- package/types/views/Input.d.ts.map +1 -0
- package/types/views/Skeleton.d.ts.map +1 -0
- package/types/views/TextArea.d.ts.map +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var inputHelpers_exports = {};
|
|
22
|
+
__export(inputHelpers_exports, {
|
|
23
|
+
inputSizeVariant: () => inputSizeVariant,
|
|
24
|
+
textAreaSizeVariant: () => textAreaSizeVariant
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(inputHelpers_exports);
|
|
27
|
+
var import_core = require("@tamagui/core"),
|
|
28
|
+
import_get_button_sized = require("@tamagui/get-button-sized"),
|
|
29
|
+
import_get_font_sized = require("@tamagui/get-font-sized"),
|
|
30
|
+
import_get_token = require("@tamagui/get-token");
|
|
31
|
+
const inputSizeVariant = (val = "$true", extras) => {
|
|
32
|
+
if (extras.props.multiline || extras.props.numberOfLines > 1) return textAreaSizeVariant(val, extras);
|
|
33
|
+
const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
34
|
+
paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
35
|
+
shift: -1,
|
|
36
|
+
bounds: [2]
|
|
37
|
+
}),
|
|
38
|
+
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
39
|
+
return !import_core.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
40
|
+
...fontStyle,
|
|
41
|
+
...buttonStyles,
|
|
42
|
+
paddingHorizontal
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
textAreaSizeVariant = (val = "$true", extras) => {
|
|
46
|
+
const {
|
|
47
|
+
props
|
|
48
|
+
} = extras,
|
|
49
|
+
buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
50
|
+
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras),
|
|
51
|
+
lines = props.rows ?? props.numberOfLines,
|
|
52
|
+
height = typeof lines == "number" ? lines * (0, import_core.getVariableValue)(fontStyle.lineHeight) : "auto",
|
|
53
|
+
paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
54
|
+
shift: -2,
|
|
55
|
+
bounds: [2]
|
|
56
|
+
}),
|
|
57
|
+
paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
58
|
+
shift: -1,
|
|
59
|
+
bounds: [2]
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
...buttonStyles,
|
|
63
|
+
...fontStyle,
|
|
64
|
+
paddingVertical,
|
|
65
|
+
paddingHorizontal,
|
|
66
|
+
height
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 inputHelpers_exports = {};
|
|
16
|
+
__export(inputHelpers_exports, {
|
|
17
|
+
inputSizeVariant: () => inputSizeVariant,
|
|
18
|
+
textAreaSizeVariant: () => textAreaSizeVariant
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(inputHelpers_exports);
|
|
21
|
+
var import_core = require("@tamagui/core"), import_get_button_sized = require("@tamagui/get-button-sized"), import_get_font_sized = require("@tamagui/get-font-sized"), import_get_token = require("@tamagui/get-token");
|
|
22
|
+
const inputSizeVariant = (val = "$true", extras) => {
|
|
23
|
+
if (extras.props.multiline || extras.props.numberOfLines > 1)
|
|
24
|
+
return textAreaSizeVariant(val, extras);
|
|
25
|
+
const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
26
|
+
shift: -1,
|
|
27
|
+
bounds: [2]
|
|
28
|
+
}), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
29
|
+
return !import_core.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
30
|
+
...fontStyle,
|
|
31
|
+
...buttonStyles,
|
|
32
|
+
paddingHorizontal
|
|
33
|
+
};
|
|
34
|
+
}, textAreaSizeVariant = (val = "$true", extras) => {
|
|
35
|
+
const { props } = extras, buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras), lines = props.rows ?? props.numberOfLines, height = typeof lines == "number" ? lines * (0, import_core.getVariableValue)(fontStyle.lineHeight) : "auto", paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
36
|
+
shift: -2,
|
|
37
|
+
bounds: [2]
|
|
38
|
+
}), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
39
|
+
shift: -1,
|
|
40
|
+
bounds: [2]
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
...buttonStyles,
|
|
44
|
+
...fontStyle,
|
|
45
|
+
paddingVertical,
|
|
46
|
+
paddingHorizontal,
|
|
47
|
+
height
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=inputHelpers.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/inputHelpers.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAwC,0BACxC,0BAA+B,sCAC/B,wBAA6B,oCAC7B,mBAAyB;AAElB,MAAM,mBAAmD,CAC9D,MAAM,SACN,WACG;AACH,MAAI,OAAO,MAAM,aAAa,OAAO,MAAM,gBAAgB;AACzD,WAAO,oBAAoB,KAAK,MAAM;AAExC,QAAM,mBAAe,wCAAe,KAAK,MAAM,GACzC,wBAAoB,2BAAS,KAAK;AAAA,IACtC,OAAO;AAAA,IACP,QAAQ,CAAC,CAAC;AAAA,EACZ,CAAC,GACK,gBAAY,oCAAa,KAAY,MAAM;AAEjD,SAAI,CAAC,qBAAS,aACZ,OAAO,UAAU,YAEZ;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,EACF;AACF,GAEa,sBAAsD,CACjE,MAAM,SACN,WACG;AACH,QAAM,EAAE,MAAM,IAAI,QACZ,mBAAe,wCAAe,KAAK,MAAM,GACzC,gBAAY,oCAAa,KAAY,MAAM,GAC3C,QAAQ,MAAM,QAAQ,MAAM,eAC5B,SACJ,OAAO,SAAU,WAAW,YAAQ,8BAAiB,UAAU,UAAU,IAAI,QACzE,sBAAkB,2BAAS,KAAK;AAAA,IACpC,OAAO;AAAA,IACP,QAAQ,CAAC,CAAC;AAAA,EACZ,CAAC,GACK,wBAAoB,2BAAS,KAAK;AAAA,IACtC,OAAO;AAAA,IACP,QAAQ,CAAC,CAAC;AAAA,EACZ,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var inputHelpers_exports = {};
|
|
24
|
+
__export(inputHelpers_exports, {
|
|
25
|
+
inputSizeVariant: () => inputSizeVariant,
|
|
26
|
+
textAreaSizeVariant: () => textAreaSizeVariant
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(inputHelpers_exports);
|
|
29
|
+
var import_core = require("@tamagui/core"),
|
|
30
|
+
import_get_button_sized = require("@tamagui/get-button-sized"),
|
|
31
|
+
import_get_font_sized = require("@tamagui/get-font-sized"),
|
|
32
|
+
import_get_token = require("@tamagui/get-token"),
|
|
33
|
+
inputSizeVariant = function () {
|
|
34
|
+
var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true",
|
|
35
|
+
extras = arguments.length > 1 ? arguments[1] : void 0;
|
|
36
|
+
if (extras.props.multiline || extras.props.numberOfLines > 1) return textAreaSizeVariant(val, extras);
|
|
37
|
+
var buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
38
|
+
paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
39
|
+
shift: -1,
|
|
40
|
+
bounds: [2]
|
|
41
|
+
}),
|
|
42
|
+
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
43
|
+
return !import_core.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
44
|
+
...fontStyle,
|
|
45
|
+
...buttonStyles,
|
|
46
|
+
paddingHorizontal
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
textAreaSizeVariant = function () {
|
|
50
|
+
var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true",
|
|
51
|
+
extras = arguments.length > 1 ? arguments[1] : void 0,
|
|
52
|
+
{
|
|
53
|
+
props
|
|
54
|
+
} = extras,
|
|
55
|
+
buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
56
|
+
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras),
|
|
57
|
+
_props_rows,
|
|
58
|
+
lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines,
|
|
59
|
+
height = typeof lines == "number" ? lines * (0, import_core.getVariableValue)(fontStyle.lineHeight) : "auto",
|
|
60
|
+
paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
61
|
+
shift: -2,
|
|
62
|
+
bounds: [2]
|
|
63
|
+
}),
|
|
64
|
+
paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
65
|
+
shift: -1,
|
|
66
|
+
bounds: [2]
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
...buttonStyles,
|
|
70
|
+
...fontStyle,
|
|
71
|
+
paddingVertical,
|
|
72
|
+
paddingHorizontal,
|
|
73
|
+
height
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=inputHelpers.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","inputHelpers_exports","__export","inputSizeVariant","textAreaSizeVariant","module","exports","import_core","require","import_get_button_sized","import_get_font_sized","import_get_token","val","arguments","length","extras","props","multiline","numberOfLines","buttonStyles","getButtonSized","paddingHorizontal","getSpace","shift","bounds","fontStyle","getFontSized","isWeb","lineHeight","_props_rows","lines","rows","height","getVariableValue","paddingVertical"],"sources":["../../../src/helpers/inputHelpers.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAV,YAAwC,CAAAK,oBACxC;AAIO,IAAAM,WAAM,GAAAC,OAAmD,CAC9D,eACA;EAAAC,uBACG,GAAAD,OAAA;EAAAE,qBAAA,GAAAF,OAAA;EAAAG,gBAAA,GAAAH,OAAA;EAAAL,gBAAA,YAAAA,CAAA;IACH,IAAIS,GAAA,GAAAC,SAAa,CAAAC,MAAA,IAAa,IAAAD,SAAa,iBAAgBA,SAAA;MAAAE,MAAA,GAAAF,SAAA,CAAAC,MAAA,OAAAD,SAAA;IACzD,IAAAE,MAAO,CAA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AAA,GACA;MAEF;IACF","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var Input_exports = {};
|
|
33
|
+
__export(Input_exports, {
|
|
34
|
+
Input: () => Input,
|
|
35
|
+
InputFrame: () => InputFrame,
|
|
36
|
+
defaultStyles: () => defaultStyles,
|
|
37
|
+
useInputProps: () => useInputProps
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(Input_exports);
|
|
40
|
+
var import_react = __toESM(require("react"), 1),
|
|
41
|
+
import_constants = require("@tamagui/constants"),
|
|
42
|
+
import_core = require("@tamagui/core"),
|
|
43
|
+
import_focusable = require("@tamagui/focusable"),
|
|
44
|
+
import_react_native = require("react-native-web"),
|
|
45
|
+
import_inputHelpers = require("../helpers/inputHelpers.cjs"),
|
|
46
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
+
const defaultStyles = {
|
|
48
|
+
size: "$true",
|
|
49
|
+
fontFamily: "$body",
|
|
50
|
+
borderWidth: 1,
|
|
51
|
+
outlineWidth: 0,
|
|
52
|
+
color: "$color",
|
|
53
|
+
...(import_constants.isWeb ? {
|
|
54
|
+
tabIndex: 0
|
|
55
|
+
} : {
|
|
56
|
+
focusable: !0
|
|
57
|
+
}),
|
|
58
|
+
borderColor: "$borderColor",
|
|
59
|
+
backgroundColor: "$background",
|
|
60
|
+
// this fixes a flex bug where it overflows container
|
|
61
|
+
minWidth: 0,
|
|
62
|
+
hoverStyle: {
|
|
63
|
+
borderColor: "$borderColorHover"
|
|
64
|
+
},
|
|
65
|
+
focusStyle: {
|
|
66
|
+
borderColor: "$borderColorFocus"
|
|
67
|
+
},
|
|
68
|
+
focusVisibleStyle: {
|
|
69
|
+
outlineColor: "$outlineColor",
|
|
70
|
+
outlineWidth: 2,
|
|
71
|
+
outlineStyle: "solid"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
InputFrame = (0, import_core.styled)(import_react_native.TextInput, {
|
|
75
|
+
name: "Input",
|
|
76
|
+
variants: {
|
|
77
|
+
unstyled: {
|
|
78
|
+
false: defaultStyles
|
|
79
|
+
},
|
|
80
|
+
size: {
|
|
81
|
+
"...size": import_inputHelpers.inputSizeVariant
|
|
82
|
+
},
|
|
83
|
+
disabled: {
|
|
84
|
+
true: {}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
isInput: !0,
|
|
92
|
+
accept: {
|
|
93
|
+
placeholderTextColor: "color",
|
|
94
|
+
selectionColor: "color"
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
Input = InputFrame.styleable((propsIn, forwardedRef) => {
|
|
98
|
+
const ref = import_react.default.useRef(null),
|
|
99
|
+
composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref),
|
|
100
|
+
props = useInputProps(propsIn, composedRefs);
|
|
101
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(InputFrame, {
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
function useInputProps(props, ref) {
|
|
106
|
+
const theme = (0, import_core.useTheme)(),
|
|
107
|
+
focusableProps = (0, import_focusable.useFocusable)({
|
|
108
|
+
props,
|
|
109
|
+
ref,
|
|
110
|
+
isInput: !0
|
|
111
|
+
}),
|
|
112
|
+
placeholderTextColor = import_react.default.useMemo(() => {
|
|
113
|
+
const placeholderColorProp = props.placeholderTextColor;
|
|
114
|
+
return theme[placeholderColorProp]?.get() ?? placeholderColorProp ?? theme.placeholderColor?.get();
|
|
115
|
+
}, [props.placeholderTextColor, theme]);
|
|
116
|
+
return import_react.default.useMemo(() => ({
|
|
117
|
+
ref: focusableProps.ref,
|
|
118
|
+
readOnly: props.disabled,
|
|
119
|
+
...props,
|
|
120
|
+
placeholderTextColor,
|
|
121
|
+
onChangeText: focusableProps.onChangeText
|
|
122
|
+
}), [focusableProps.ref, focusableProps.onChangeText, props.disabled, props, placeholderTextColor]);
|
|
123
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var Input_exports = {};
|
|
24
|
+
__export(Input_exports, {
|
|
25
|
+
Input: () => Input,
|
|
26
|
+
InputFrame: () => InputFrame,
|
|
27
|
+
defaultStyles: () => defaultStyles,
|
|
28
|
+
useInputProps: () => useInputProps
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Input_exports);
|
|
31
|
+
var import_react = __toESM(require("react"), 1), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native-web"), import_inputHelpers = require("../helpers/inputHelpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
const defaultStyles = {
|
|
33
|
+
size: "$true",
|
|
34
|
+
fontFamily: "$body",
|
|
35
|
+
borderWidth: 1,
|
|
36
|
+
outlineWidth: 0,
|
|
37
|
+
color: "$color",
|
|
38
|
+
...import_constants.isWeb ? {
|
|
39
|
+
tabIndex: 0
|
|
40
|
+
} : {
|
|
41
|
+
focusable: !0
|
|
42
|
+
},
|
|
43
|
+
borderColor: "$borderColor",
|
|
44
|
+
backgroundColor: "$background",
|
|
45
|
+
// this fixes a flex bug where it overflows container
|
|
46
|
+
minWidth: 0,
|
|
47
|
+
hoverStyle: {
|
|
48
|
+
borderColor: "$borderColorHover"
|
|
49
|
+
},
|
|
50
|
+
focusStyle: {
|
|
51
|
+
borderColor: "$borderColorFocus"
|
|
52
|
+
},
|
|
53
|
+
focusVisibleStyle: {
|
|
54
|
+
outlineColor: "$outlineColor",
|
|
55
|
+
outlineWidth: 2,
|
|
56
|
+
outlineStyle: "solid"
|
|
57
|
+
}
|
|
58
|
+
}, InputFrame = (0, import_core.styled)(
|
|
59
|
+
import_react_native.TextInput,
|
|
60
|
+
{
|
|
61
|
+
name: "Input",
|
|
62
|
+
variants: {
|
|
63
|
+
unstyled: {
|
|
64
|
+
false: defaultStyles
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
"...size": import_inputHelpers.inputSizeVariant
|
|
68
|
+
},
|
|
69
|
+
disabled: {
|
|
70
|
+
true: {}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
isInput: !0,
|
|
79
|
+
accept: {
|
|
80
|
+
placeholderTextColor: "color",
|
|
81
|
+
selectionColor: "color"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
), Input = InputFrame.styleable((propsIn, forwardedRef) => {
|
|
85
|
+
const ref = import_react.default.useRef(null), composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref), props = useInputProps(propsIn, composedRefs);
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputFrame, { ...props });
|
|
87
|
+
});
|
|
88
|
+
function useInputProps(props, ref) {
|
|
89
|
+
const theme = (0, import_core.useTheme)(), focusableProps = (0, import_focusable.useFocusable)({
|
|
90
|
+
props,
|
|
91
|
+
ref,
|
|
92
|
+
isInput: !0
|
|
93
|
+
}), placeholderTextColor = import_react.default.useMemo(() => {
|
|
94
|
+
const placeholderColorProp = props.placeholderTextColor;
|
|
95
|
+
return theme[placeholderColorProp]?.get() ?? placeholderColorProp ?? theme.placeholderColor?.get();
|
|
96
|
+
}, [props.placeholderTextColor, theme]);
|
|
97
|
+
return import_react.default.useMemo(
|
|
98
|
+
() => ({
|
|
99
|
+
ref: focusableProps.ref,
|
|
100
|
+
readOnly: props.disabled,
|
|
101
|
+
...props,
|
|
102
|
+
placeholderTextColor,
|
|
103
|
+
onChangeText: focusableProps.onChangeText
|
|
104
|
+
}),
|
|
105
|
+
[
|
|
106
|
+
focusableProps.ref,
|
|
107
|
+
focusableProps.onChangeText,
|
|
108
|
+
props.disabled,
|
|
109
|
+
props,
|
|
110
|
+
placeholderTextColor
|
|
111
|
+
]
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/views/Input.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,8BAClB,mBAAsB,+BAEtB,cAAkD,0BAClD,mBAA6B,+BAC7B,sBAA0B,yBAE1B,sBAAiC,oCAwFxB;AAtFF,MAAM,gBAAgB;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aA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AI,KACxC,wBACA,MAAM,kBAAkB,IAAI;AAAA,EAEhC,GAAG,CAAC,MAAM,sBAAsB,KAAK,CAAC;AAEtC,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL,KAAK,eAAe;AAAA,MACpB,UAAU,MAAM;AAAA,MAChB,GAAG;AAAA,MACH;AAAA,MACA,cAAc,eAAe;AAAA,IAC/B;AAAA,IACA;AAAA,MACE,eAAe;AAAA,MACf,eAAe;AAAA,MACf,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
5
|
+
"names": ["React"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
34
|
+
var Input_exports = {};
|
|
35
|
+
__export(Input_exports, {
|
|
36
|
+
Input: () => Input,
|
|
37
|
+
InputFrame: () => InputFrame,
|
|
38
|
+
defaultStyles: () => defaultStyles,
|
|
39
|
+
useInputProps: () => useInputProps
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(Input_exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
43
|
+
import_react = __toESM(require("react"), 1),
|
|
44
|
+
import_constants = require("@tamagui/constants"),
|
|
45
|
+
import_core = require("@tamagui/core"),
|
|
46
|
+
import_focusable = require("@tamagui/focusable"),
|
|
47
|
+
import_react_native = require("react-native"),
|
|
48
|
+
import_inputHelpers = require("../helpers/inputHelpers.native.js"),
|
|
49
|
+
defaultStyles = {
|
|
50
|
+
size: "$true",
|
|
51
|
+
fontFamily: "$body",
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
outlineWidth: 0,
|
|
54
|
+
color: "$color",
|
|
55
|
+
...(import_constants.isWeb ? {
|
|
56
|
+
tabIndex: 0
|
|
57
|
+
} : {
|
|
58
|
+
focusable: !0
|
|
59
|
+
}),
|
|
60
|
+
borderColor: "$borderColor",
|
|
61
|
+
backgroundColor: "$background",
|
|
62
|
+
// this fixes a flex bug where it overflows container
|
|
63
|
+
minWidth: 0,
|
|
64
|
+
hoverStyle: {
|
|
65
|
+
borderColor: "$borderColorHover"
|
|
66
|
+
},
|
|
67
|
+
focusStyle: {
|
|
68
|
+
borderColor: "$borderColorFocus"
|
|
69
|
+
},
|
|
70
|
+
focusVisibleStyle: {
|
|
71
|
+
outlineColor: "$outlineColor",
|
|
72
|
+
outlineWidth: 2,
|
|
73
|
+
outlineStyle: "solid"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
InputFrame = (0, import_core.styled)(import_react_native.TextInput, {
|
|
77
|
+
name: "Input",
|
|
78
|
+
variants: {
|
|
79
|
+
unstyled: {
|
|
80
|
+
false: defaultStyles
|
|
81
|
+
},
|
|
82
|
+
size: {
|
|
83
|
+
"...size": import_inputHelpers.inputSizeVariant
|
|
84
|
+
},
|
|
85
|
+
disabled: {
|
|
86
|
+
true: {}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
isInput: !0,
|
|
94
|
+
accept: {
|
|
95
|
+
placeholderTextColor: "color",
|
|
96
|
+
selectionColor: "color"
|
|
97
|
+
}
|
|
98
|
+
}),
|
|
99
|
+
Input = InputFrame.styleable(function (propsIn, forwardedRef) {
|
|
100
|
+
var ref = import_react.default.useRef(null),
|
|
101
|
+
composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref),
|
|
102
|
+
props = useInputProps(propsIn, composedRefs);
|
|
103
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(InputFrame, {
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
function useInputProps(props, ref) {
|
|
108
|
+
var theme = (0, import_core.useTheme)(),
|
|
109
|
+
focusableProps = (0, import_focusable.useFocusable)({
|
|
110
|
+
props,
|
|
111
|
+
ref,
|
|
112
|
+
isInput: !0
|
|
113
|
+
}),
|
|
114
|
+
placeholderTextColor = import_react.default.useMemo(function () {
|
|
115
|
+
var _theme_placeholderColorProp,
|
|
116
|
+
_theme_placeholderColor,
|
|
117
|
+
placeholderColorProp = props.placeholderTextColor,
|
|
118
|
+
_theme_placeholderColorProp_get,
|
|
119
|
+
_ref;
|
|
120
|
+
return (_ref = (_theme_placeholderColorProp_get = (_theme_placeholderColorProp = theme[placeholderColorProp]) === null || _theme_placeholderColorProp === void 0 ? void 0 : _theme_placeholderColorProp.get()) !== null && _theme_placeholderColorProp_get !== void 0 ? _theme_placeholderColorProp_get : placeholderColorProp) !== null && _ref !== void 0 ? _ref : (_theme_placeholderColor = theme.placeholderColor) === null || _theme_placeholderColor === void 0 ? void 0 : _theme_placeholderColor.get();
|
|
121
|
+
}, [props.placeholderTextColor, theme]);
|
|
122
|
+
return import_react.default.useMemo(function () {
|
|
123
|
+
return {
|
|
124
|
+
ref: focusableProps.ref,
|
|
125
|
+
readOnly: props.disabled,
|
|
126
|
+
...props,
|
|
127
|
+
placeholderTextColor,
|
|
128
|
+
onChangeText: focusableProps.onChangeText
|
|
129
|
+
};
|
|
130
|
+
}, [focusableProps.ref, focusableProps.onChangeText, props.disabled, props, placeholderTextColor]);
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=Input.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Input_exports","__export","Input","InputFrame","defaultStyles","useInputProps","module","exports","import_jsx_runtime","require","import_react","__toESM","import_constants","import_core","import_focusable","import_react_native","import_inputHelpers","size","fontFamily","borderWidth","outlineWidth","color","isWeb","tabIndex","focusable","borderColor","backgroundColor","minWidth","hoverStyle","focusStyle","focusVisibleStyle","outlineColor","outlineStyle","styled","TextInput","name","variants","unstyled","false","inputSizeVariant","disabled","true","defaultVariants","process","env","TAMAGUI_HEADLESS","isInput","accept","placeholderTextColor","selectionColor","styleable","propsIn","forwardedRef","ref","default","useRef","composedRefs","useComposedRefs","props","jsx","theme","useTheme","focusableProps","useFocusable","useMemo","_theme_placeholderColorProp","_theme_placeholderColor","placeholderColorProp","_theme_placeholderColorProp_get","_ref","get","placeholderColor","readOnly","onChangeText"],"sources":["../../../src/views/Input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C,OAAA,CAAAU,OAAA;IAAA,OACA;MACLX,GAAA,EAAAS,cAAgB,CAAAT,GAAA;MAChBmB,QAAG,EAAAd,KAAA,CAAAlB,QAAA;MACH,GAAAkB,KAAA;MACAV,oBAAc;MAChByB,YAAA,EAAAX,cAAA,CAAAW;IACA;EAAA,IACiBX,cACf,CAAAT,GAAe,EAAAS,cACT,CAAAW,YAAA,EAAAf,KACN,CAAAlB,QAAA,EAAAkB,KACA,EACFV,oBAAA,CACF;AACF","ignoreList":[]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|