@tamagui/input 1.135.4-1761748186554 → 1.135.4
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/Input.cjs +1 -1
- package/dist/cjs/Input.js +1 -1
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Input.native.js +98 -115
- package/dist/cjs/Input.native.js.map +6 -1
- package/dist/cjs/TextArea.native.js +33 -39
- package/dist/cjs/TextArea.native.js.map +6 -1
- package/dist/cjs/index.native.js +14 -14
- package/dist/cjs/index.native.js.map +6 -1
- package/dist/cjs/shared.native.js +81 -93
- package/dist/cjs/shared.native.js.map +6 -1
- package/dist/cjs/types.native.js +5 -9
- package/dist/cjs/types.native.js.map +6 -1
- package/dist/jsx/Input.native.js +89 -129
- package/dist/jsx/Input.native.js.map +6 -1
- package/dist/jsx/TextArea.native.js +26 -50
- package/dist/jsx/TextArea.native.js.map +6 -1
- package/dist/jsx/index.native.js +3 -22
- package/dist/jsx/index.native.js.map +6 -1
- package/dist/jsx/shared.native.js +77 -109
- package/dist/jsx/shared.native.js.map +6 -1
- package/dist/jsx/types.native.js +1 -19
- package/dist/jsx/types.native.js.map +6 -1
- package/package.json +14 -15
package/dist/cjs/Input.cjs
CHANGED
|
@@ -36,7 +36,7 @@ __export(Input_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(Input_exports);
|
|
37
37
|
var import_core = require("@tamagui/core"),
|
|
38
38
|
import_focusable = require("@tamagui/focusable"),
|
|
39
|
-
import_react = __toESM(require("react")
|
|
39
|
+
import_react = __toESM(require("react")),
|
|
40
40
|
import_shared = require("./shared.cjs"),
|
|
41
41
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
42
42
|
const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]),
|
package/dist/cjs/Input.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(Input_exports, {
|
|
|
25
25
|
Input: () => Input
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(Input_exports);
|
|
28
|
-
var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react = __toESM(require("react")
|
|
28
|
+
var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react = __toESM(require("react")), import_shared = require("./shared"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable((inProps, forwardedRef) => {
|
|
30
30
|
const {
|
|
31
31
|
// some of destructed props are just to avoid passing them to ...rest because they are not in web.
|
package/dist/cjs/Input.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Input.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkE,0BAClE,mBAAkC,+BAClC,eAAwE,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkE,0BAClE,mBAAkC,+BAClC,eAAwE,2BACxE,gBAA2B,qBAuKvB;AApKJ,MAAM,kBAAc,oBAAO,kBAAM,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GAMhD,QAAQ,YAAY,UAAsB,CAAC,SAAS,iBAAiB;AAChF,QAAM;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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A,MACX;AAAA,IACF,GAAG;AAAA,IACH,YAAY,MAAM;AAChB,cAAQ,cAAc;AAAA,QACpB,KAAK;AAAA,QACL,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT;AACE;AAAA,MACJ;AAAA,IACF,GAAG;AAAA,IAOT,OAAO;AAAA,MACL,GAAI,KAAK;AAAA,MACT,GAAI,wBAAwB;AAAA,QAC1B,sBACE,MAAM,oBAAoB,GAAG,YAAY;AAAA,MAC7C;AAAA,MACA,GAAI,kBAAkB;AAAA,QACpB,oBAAoB,MAAM,cAAc,GAAG,YAAY;AAAA,MACzD;AAAA,IACF;AAAA,EACF;AAEA,sBAAAA,QAAM,UAAU,MAAM;AACpB,QAAK,MACD;AAEJ,iBAAO,oCAAkB,IAAI;AAAA,QAC3B,gBAAgB,MAAM;AACpB,cAAI,SAAS,MAAM;AAAA,QACrB;AAAA,QACA,OAAO,MAAM;AAAA,QAAC;AAAA,MAChB,CAAC;AAAA,EACH,GAAG,CAAC,IAAI,QAAQ,CAAC,GAGf,4EAEI;AAAA,gDAAC,WACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASH;AAAA,IAGF,4CAAC,eAAY,KAAK,cAAe,GAAG,YAAY;AAAA,KAClD;AAEJ,CAAC;",
|
|
5
5
|
"names": ["React"]
|
|
6
6
|
}
|
package/dist/cjs/Input.native.js
CHANGED
|
@@ -1,137 +1,120 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
22
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
17
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
18
|
// file that has been converted to a CommonJS file using a Babel-
|
|
25
19
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
20
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}) : target, mod)),
|
|
31
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: !0
|
|
33
|
-
}), mod);
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
34
24
|
var Input_native_exports = {};
|
|
35
25
|
__export(Input_native_exports, {
|
|
36
26
|
Input: () => Input
|
|
37
27
|
});
|
|
38
28
|
module.exports = __toCommonJS(Input_native_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
text
|
|
111
|
-
} = e.nativeEvent;
|
|
112
|
-
onChange && onChange({
|
|
113
|
-
target: {
|
|
114
|
-
value: text
|
|
115
|
-
},
|
|
116
|
-
type: "change"
|
|
117
|
-
}), onInput?.({
|
|
118
|
-
target: {
|
|
119
|
-
value: text
|
|
120
|
-
},
|
|
121
|
-
type: "input"
|
|
122
|
-
});
|
|
123
|
-
}), import_react.default.useEffect(function () {
|
|
124
|
-
if (id && !disabled) return (0, import_focusable.registerFocusable)(id, {
|
|
125
|
-
focusAndSelect: function () {
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native"), import_shared = require("./shared"), StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable(function(inProps, forwardedRef) {
|
|
30
|
+
var {
|
|
31
|
+
// some of destructed props are just to avoid passing them to ...rest because they are not in native.
|
|
32
|
+
type,
|
|
33
|
+
//@ts-ignore
|
|
34
|
+
dirname,
|
|
35
|
+
max,
|
|
36
|
+
min,
|
|
37
|
+
minLength,
|
|
38
|
+
multiple,
|
|
39
|
+
name,
|
|
40
|
+
required,
|
|
41
|
+
step,
|
|
42
|
+
disabled,
|
|
43
|
+
id,
|
|
44
|
+
caretColor,
|
|
45
|
+
onChange,
|
|
46
|
+
onInput,
|
|
47
|
+
rows,
|
|
48
|
+
enterKeyHint,
|
|
49
|
+
returnKeyType,
|
|
50
|
+
onKeyDown,
|
|
51
|
+
inputMode,
|
|
52
|
+
tag,
|
|
53
|
+
...rest
|
|
54
|
+
} = inProps, ref = import_react.default.useRef(null), composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref), secureTextEntry = !1, cursorColor = caretColor, _returnKeyType = returnKeyType, _enterKeyHint = enterKeyHint;
|
|
55
|
+
enterKeyHint === "go" && (_returnKeyType = "go", _enterKeyHint = void 0);
|
|
56
|
+
var _inputMode = inputMode;
|
|
57
|
+
type === "email" ? _inputMode = "email" : type === "tel" ? _inputMode = "tel" : type === "search" ? _inputMode = "search" : type === "url" ? _inputMode = "url" : type === "password" ? (secureTextEntry = !0, _inputMode = "text") : type === "number" ? _inputMode = "numeric" : _inputMode = "text";
|
|
58
|
+
var showSoftInputOnFocus = !0;
|
|
59
|
+
inputMode === "none" && (showSoftInputOnFocus = !1);
|
|
60
|
+
var finalProps = {
|
|
61
|
+
...rest,
|
|
62
|
+
inputMode: _inputMode,
|
|
63
|
+
showSoftInputOnFocus,
|
|
64
|
+
disabled,
|
|
65
|
+
id,
|
|
66
|
+
cursorColor,
|
|
67
|
+
enterKeyHint: _enterKeyHint,
|
|
68
|
+
returnKeyType: _returnKeyType,
|
|
69
|
+
secureTextEntry,
|
|
70
|
+
numberOfLines: rows || rest.numberOfLines
|
|
71
|
+
};
|
|
72
|
+
return tag === "textarea" && (finalProps.multiline = !0), onKeyDown && (finalProps.onKeyPress = function(e) {
|
|
73
|
+
var { key } = e.nativeEvent;
|
|
74
|
+
(key === "Backspace" || tag === "textarea" && key === "Enter" || key.length === 1) && onKeyDown({
|
|
75
|
+
key,
|
|
76
|
+
type: "keydown"
|
|
77
|
+
});
|
|
78
|
+
}, finalProps.onSubmitEditing = function(e) {
|
|
79
|
+
onKeyDown({
|
|
80
|
+
key: "Enter",
|
|
81
|
+
type: "keydown"
|
|
82
|
+
});
|
|
83
|
+
}), (onChange || onInput) && (finalProps.onChange = function(e) {
|
|
84
|
+
var { text } = e.nativeEvent;
|
|
85
|
+
onChange && onChange({
|
|
86
|
+
target: {
|
|
87
|
+
value: text
|
|
88
|
+
},
|
|
89
|
+
type: "change"
|
|
90
|
+
}), onInput != null && onInput({
|
|
91
|
+
target: {
|
|
92
|
+
value: text
|
|
93
|
+
},
|
|
94
|
+
type: "input"
|
|
95
|
+
});
|
|
96
|
+
}), import_react.default.useEffect(function() {
|
|
97
|
+
if (id && !disabled)
|
|
98
|
+
return (0, import_focusable.registerFocusable)(id, {
|
|
99
|
+
focusAndSelect: function() {
|
|
126
100
|
var _ref_current;
|
|
127
101
|
(_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
|
|
128
102
|
},
|
|
129
|
-
focus: function
|
|
103
|
+
focus: function() {
|
|
104
|
+
}
|
|
130
105
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
106
|
+
}, [
|
|
107
|
+
id,
|
|
108
|
+
disabled
|
|
109
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {
|
|
110
|
+
onChange: function(e) {
|
|
111
|
+
},
|
|
112
|
+
ref: composedRefs,
|
|
113
|
+
...finalProps
|
|
136
114
|
});
|
|
115
|
+
});
|
|
116
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
117
|
+
0 && (module.exports = {
|
|
118
|
+
Input
|
|
119
|
+
});
|
|
137
120
|
//# sourceMappingURL=Input.native.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Input.native.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B,8BAC5B,eAAkB,2BAClB,cAAwC,0BACxC,mBAAkC,+BAClC,sBAA0B,yBAC1B,gBAA2B,qBACvB,kBAAc,oBAAO,+BAAW,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GACrD,QAAQ,YAAY,UAAU,SAAS,SAAS,cAAc;AACrE,MAAI;AAAA;AAAA,IACJ;AAAA;AAAA,IACA;AAAA,IAAS;AAAA,IAAK;AAAA,IAAK;AAAA,IAAW;AAAA,IAAU;AAAA,IAAM;AAAA,IAAU;AAAA,IAAM;AAAA,IAAU;AAAA,IAAI;AAAA,IAAY;AAAA,IAAU;AAAA,IAAS;AAAA,IAAM;AAAA,IAAc;AAAA,IAAe;AAAA,IAAW;AAAA,IAAW;AAAA,IAAK,GAAG;AAAA,EAAK,IAAI,SACjL,MAAM,aAAAA,QAAM,OAAO,IAAI,GACvB,mBAAe,6BAAgB,cAAc,GAAG,GAEhD,kBAAkB,IAClB,cAAc,YACd,iBAAiB,eACjB,gBAAgB;AACpB,EAAI,iBAAiB,SACjB,iBAAiB,M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,iBAAiB,UAAkB,aAAa,MAAM;AAAA,QACnG;AAAA,QACA,OAAO,WAAW;AAAA,QAAC;AAAA,MACvB,CAAC;AAAA,EACL,GAAG;AAAA,IACC;AAAA,IACA;AAAA,EACJ,CAAC,GACoB,uCAAAC,KAAK,aAAa;AAAA,IACnC,UAAU,SAAS,GAAG;AAAA,IAAC;AAAA,IACvB,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL,CAAC;",
|
|
5
|
+
"names": ["React", "_jsx"]
|
|
6
|
+
}
|
|
@@ -1,53 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var TextArea_exports = {};
|
|
24
17
|
__export(TextArea_exports, {
|
|
25
18
|
TextArea: () => TextArea
|
|
26
19
|
});
|
|
27
20
|
module.exports = __toCommonJS(TextArea_exports);
|
|
28
|
-
var import_web = require("@tamagui/web"),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
height: "auto",
|
|
41
|
-
...import_shared.defaultStyles,
|
|
42
|
-
numberOfLines: 3
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
"...size": import_shared.textAreaSizeVariant
|
|
21
|
+
var import_web = require("@tamagui/web"), import_Input = require("./Input"), import_shared = require("./shared"), TextArea = (0, import_web.styled)(import_Input.Input, {
|
|
22
|
+
name: "TextArea",
|
|
23
|
+
tag: "textarea",
|
|
24
|
+
// this attribute fixes firefox newline issue
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
whiteSpace: "pre-wrap",
|
|
27
|
+
variants: {
|
|
28
|
+
unstyled: {
|
|
29
|
+
false: {
|
|
30
|
+
height: "auto",
|
|
31
|
+
...import_shared.defaultStyles,
|
|
32
|
+
numberOfLines: 3
|
|
47
33
|
}
|
|
48
34
|
},
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
size: {
|
|
36
|
+
"...size": import_shared.textAreaSizeVariant
|
|
51
37
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
TextArea
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TextArea.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAuB,yBACvB,eAAsB,oBACtB,gBAAmD,qBAIpC,eAAW,mBAAO,oBAAO;AAAA,EACpC,MAAM;AAAA,EACN,KAAK;AAAA;AAAA;AAAA,EAGL,YAAY;AAAA,EACZ,UAAU;AAAA,IACN,UAAU;AAAA,MACN,OAAO;AAAA,QACH,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,eAAe;AAAA,MACnB;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACF,WAAW;AAAA,IACf;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC/C;AACJ,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: !0
|
|
17
|
-
}), mod);
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
18
13
|
var index_exports = {};
|
|
19
14
|
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./Input
|
|
21
|
-
__reExport(index_exports, require("./TextArea
|
|
22
|
-
|
|
15
|
+
__reExport(index_exports, require("./Input"), module.exports);
|
|
16
|
+
__reExport(index_exports, require("./TextArea"), module.exports);
|
|
17
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
18
|
+
0 && (module.exports = {
|
|
19
|
+
...require("./Input"),
|
|
20
|
+
...require("./TextArea")
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,uBADd;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var shared_exports = {};
|
|
24
17
|
__export(shared_exports, {
|
|
25
18
|
INPUT_NAME: () => INPUT_NAME,
|
|
@@ -29,83 +22,68 @@ __export(shared_exports, {
|
|
|
29
22
|
textAreaSizeVariant: () => textAreaSizeVariant
|
|
30
23
|
});
|
|
31
24
|
module.exports = __toCommonJS(shared_exports);
|
|
32
|
-
var import_core = require("@tamagui/core"),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
color: "$color",
|
|
43
|
-
...(import_core2.isWeb ? {
|
|
44
|
-
tabIndex: 0
|
|
45
|
-
} : {
|
|
46
|
-
focusable: !0
|
|
47
|
-
}),
|
|
48
|
-
borderColor: "$borderColor",
|
|
49
|
-
backgroundColor: "$background",
|
|
50
|
-
// this fixes a flex bug where it overflows container
|
|
51
|
-
minWidth: 0,
|
|
52
|
-
hoverStyle: {
|
|
53
|
-
borderColor: "$borderColorHover"
|
|
54
|
-
},
|
|
55
|
-
focusStyle: {
|
|
56
|
-
borderColor: "$borderColorFocus"
|
|
57
|
-
},
|
|
58
|
-
focusVisibleStyle: {
|
|
59
|
-
outlineColor: "$outlineColor",
|
|
60
|
-
outlineWidth: 2,
|
|
61
|
-
outlineStyle: "solid"
|
|
62
|
-
}
|
|
25
|
+
var import_core = require("@tamagui/core"), import_core2 = 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"), defaultStyles = {
|
|
26
|
+
size: "$true",
|
|
27
|
+
fontFamily: "$body",
|
|
28
|
+
borderWidth: 1,
|
|
29
|
+
outlineWidth: 0,
|
|
30
|
+
color: "$color",
|
|
31
|
+
...import_core2.isWeb ? {
|
|
32
|
+
tabIndex: 0
|
|
33
|
+
} : {
|
|
34
|
+
focusable: !0
|
|
63
35
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
shift: -1,
|
|
71
|
-
bounds: [2]
|
|
72
|
-
}),
|
|
73
|
-
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
74
|
-
return !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
75
|
-
...fontStyle,
|
|
76
|
-
...buttonStyles,
|
|
77
|
-
paddingHorizontal
|
|
78
|
-
};
|
|
36
|
+
borderColor: "$borderColor",
|
|
37
|
+
backgroundColor: "$background",
|
|
38
|
+
// this fixes a flex bug where it overflows container
|
|
39
|
+
minWidth: 0,
|
|
40
|
+
hoverStyle: {
|
|
41
|
+
borderColor: "$borderColorHover"
|
|
79
42
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
extras = arguments.length > 1 ? arguments[1] : void 0,
|
|
83
|
-
{
|
|
84
|
-
props
|
|
85
|
-
} = extras,
|
|
86
|
-
buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
87
|
-
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras),
|
|
88
|
-
_props_rows,
|
|
89
|
-
lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines,
|
|
90
|
-
height = typeof lines == "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto",
|
|
91
|
-
paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
92
|
-
shift: -2,
|
|
93
|
-
bounds: [2]
|
|
94
|
-
}),
|
|
95
|
-
paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
96
|
-
shift: -1,
|
|
97
|
-
bounds: [2]
|
|
98
|
-
});
|
|
99
|
-
return {
|
|
100
|
-
...buttonStyles,
|
|
101
|
-
...fontStyle,
|
|
102
|
-
paddingVertical,
|
|
103
|
-
paddingHorizontal,
|
|
104
|
-
height
|
|
105
|
-
};
|
|
43
|
+
focusStyle: {
|
|
44
|
+
borderColor: "$borderColorFocus"
|
|
106
45
|
},
|
|
107
|
-
|
|
108
|
-
|
|
46
|
+
focusVisibleStyle: {
|
|
47
|
+
outlineColor: "$outlineColor",
|
|
48
|
+
outlineWidth: 2,
|
|
49
|
+
outlineStyle: "solid"
|
|
50
|
+
}
|
|
51
|
+
}, inputSizeVariant = function() {
|
|
52
|
+
var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0;
|
|
53
|
+
if (extras.props.multiline || extras.props.numberOfLines > 1)
|
|
54
|
+
return textAreaSizeVariant(val, extras);
|
|
55
|
+
var buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
56
|
+
shift: -1,
|
|
57
|
+
bounds: [
|
|
58
|
+
2
|
|
59
|
+
]
|
|
60
|
+
}), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
61
|
+
return !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
62
|
+
...fontStyle,
|
|
63
|
+
...buttonStyles,
|
|
64
|
+
paddingHorizontal
|
|
65
|
+
};
|
|
66
|
+
}, textAreaSizeVariant = function() {
|
|
67
|
+
var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0, { props } = extras, buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras), _props_rows, lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines, height = typeof lines == "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto", paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
68
|
+
shift: -2,
|
|
69
|
+
bounds: [
|
|
70
|
+
2
|
|
71
|
+
]
|
|
72
|
+
}), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
73
|
+
shift: -1,
|
|
74
|
+
bounds: [
|
|
75
|
+
2
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
...buttonStyles,
|
|
80
|
+
...fontStyle,
|
|
81
|
+
paddingVertical,
|
|
82
|
+
paddingHorizontal,
|
|
83
|
+
height
|
|
84
|
+
};
|
|
85
|
+
}, INPUT_NAME = "Input", styledBody = [
|
|
86
|
+
{
|
|
109
87
|
name: INPUT_NAME,
|
|
110
88
|
tag: "input",
|
|
111
89
|
variants: {
|
|
@@ -122,12 +100,22 @@ var import_core = require("@tamagui/core"),
|
|
|
122
100
|
defaultVariants: {
|
|
123
101
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
124
102
|
}
|
|
125
|
-
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
126
105
|
isInput: !0,
|
|
127
106
|
accept: {
|
|
128
107
|
placeholderTextColor: "color",
|
|
129
108
|
selectionColor: "color"
|
|
130
109
|
},
|
|
131
110
|
validStyles: import_core.Text.staticConfig.validStyles
|
|
132
|
-
}
|
|
133
|
-
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
+
0 && (module.exports = {
|
|
115
|
+
INPUT_NAME,
|
|
116
|
+
defaultStyles,
|
|
117
|
+
inputSizeVariant,
|
|
118
|
+
styledBody,
|
|
119
|
+
textAreaSizeVariant
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=shared.js.map
|