@tamagui/input 2.0.0-rc.9 → 2.0.0

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.
Files changed (161) hide show
  1. package/dist/cjs/Input.cjs +165 -153
  2. package/dist/cjs/Input.native.js +256 -233
  3. package/dist/cjs/Input.native.js.map +1 -1
  4. package/dist/cjs/InputNativeProps.cjs +7 -5
  5. package/dist/cjs/InputNativeProps.native.js +7 -5
  6. package/dist/cjs/InputNativeProps.native.js.map +1 -1
  7. package/dist/cjs/TextArea.cjs +15 -13
  8. package/dist/cjs/TextArea.native.js +34 -32
  9. package/dist/cjs/TextArea.native.js.map +1 -1
  10. package/dist/cjs/index.cjs +13 -11
  11. package/dist/cjs/index.native.js +13 -11
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/cjs/inputTypes.test-d.cjs +125 -0
  14. package/dist/cjs/inputTypes.test-d.native.js +128 -0
  15. package/dist/cjs/inputTypes.test-d.native.js.map +1 -0
  16. package/dist/cjs/shared.cjs +119 -104
  17. package/dist/cjs/shared.native.js +125 -110
  18. package/dist/cjs/shared.native.js.map +1 -1
  19. package/dist/cjs/types.cjs +7 -5
  20. package/dist/cjs/types.native.js +7 -5
  21. package/dist/cjs/types.native.js.map +1 -1
  22. package/dist/cjs/v1/Input.cjs +177 -170
  23. package/dist/cjs/v1/Input.native.js +154 -112
  24. package/dist/cjs/v1/Input.native.js.map +1 -1
  25. package/dist/cjs/v1/TextArea.cjs +15 -13
  26. package/dist/cjs/v1/TextArea.native.js +34 -32
  27. package/dist/cjs/v1/TextArea.native.js.map +1 -1
  28. package/dist/cjs/v1/index.cjs +7 -5
  29. package/dist/cjs/v1/index.native.js +7 -5
  30. package/dist/cjs/v1/index.native.js.map +1 -1
  31. package/dist/cjs/v1/types.cjs +7 -5
  32. package/dist/cjs/v1/types.native.js +7 -5
  33. package/dist/cjs/v1/types.native.js.map +1 -1
  34. package/dist/esm/Input.mjs +134 -124
  35. package/dist/esm/Input.mjs.map +1 -1
  36. package/dist/esm/Input.native.js +225 -204
  37. package/dist/esm/Input.native.js.map +1 -1
  38. package/dist/esm/TextArea.mjs.map +1 -1
  39. package/dist/esm/TextArea.native.js.map +1 -1
  40. package/dist/esm/index.js +4 -7
  41. package/dist/esm/index.js.map +1 -6
  42. package/dist/esm/inputTypes.test-d.mjs +126 -0
  43. package/dist/esm/inputTypes.test-d.mjs.map +1 -0
  44. package/dist/esm/inputTypes.test-d.native.js +126 -0
  45. package/dist/esm/inputTypes.test-d.native.js.map +1 -0
  46. package/dist/esm/shared.mjs +102 -89
  47. package/dist/esm/shared.mjs.map +1 -1
  48. package/dist/esm/shared.native.js +107 -94
  49. package/dist/esm/shared.native.js.map +1 -1
  50. package/dist/esm/v1/Input.mjs +146 -141
  51. package/dist/esm/v1/Input.mjs.map +1 -1
  52. package/dist/esm/v1/Input.native.js +123 -83
  53. package/dist/esm/v1/Input.native.js.map +1 -1
  54. package/dist/jsx/Input.mjs +134 -124
  55. package/dist/jsx/Input.mjs.map +1 -1
  56. package/dist/jsx/Input.native.js +256 -233
  57. package/dist/jsx/Input.native.js.map +1 -1
  58. package/dist/jsx/InputNativeProps.native.js +7 -5
  59. package/dist/jsx/TextArea.mjs.map +1 -1
  60. package/dist/jsx/TextArea.native.js +34 -32
  61. package/dist/jsx/TextArea.native.js.map +1 -1
  62. package/dist/jsx/index.js +4 -7
  63. package/dist/jsx/index.js.map +1 -6
  64. package/dist/jsx/index.native.js +13 -11
  65. package/dist/jsx/inputTypes.test-d.mjs +126 -0
  66. package/dist/jsx/inputTypes.test-d.mjs.map +1 -0
  67. package/dist/jsx/inputTypes.test-d.native.js +128 -0
  68. package/dist/jsx/inputTypes.test-d.native.js.map +1 -0
  69. package/dist/jsx/shared.mjs +102 -89
  70. package/dist/jsx/shared.mjs.map +1 -1
  71. package/dist/jsx/shared.native.js +125 -110
  72. package/dist/jsx/shared.native.js.map +1 -1
  73. package/dist/jsx/types.native.js +7 -5
  74. package/dist/jsx/v1/Input.mjs +146 -141
  75. package/dist/jsx/v1/Input.mjs.map +1 -1
  76. package/dist/jsx/v1/Input.native.js +154 -112
  77. package/dist/jsx/v1/Input.native.js.map +1 -1
  78. package/dist/jsx/v1/TextArea.native.js +34 -32
  79. package/dist/jsx/v1/TextArea.native.js.map +1 -1
  80. package/dist/jsx/v1/index.native.js +7 -5
  81. package/dist/jsx/v1/types.native.js +7 -5
  82. package/package.json +20 -19
  83. package/src/Input.native.tsx +2 -2
  84. package/src/Input.tsx +7 -5
  85. package/src/TextArea.tsx +3 -3
  86. package/src/index.ts +1 -1
  87. package/src/inputTypes.test-d.ts +237 -0
  88. package/src/shared.tsx +6 -0
  89. package/src/types.ts +24 -14
  90. package/src/v1/Input.tsx +4 -4
  91. package/types/Input.d.ts +14 -12
  92. package/types/Input.d.ts.map +1 -1
  93. package/types/Input.native.d.ts +12 -12
  94. package/types/Input.native.d.ts.map +1 -1
  95. package/types/TextArea.d.ts +8 -7
  96. package/types/TextArea.d.ts.map +1 -1
  97. package/types/index.d.ts +1 -1
  98. package/types/index.d.ts.map +1 -1
  99. package/types/shared.d.ts +5 -0
  100. package/types/shared.d.ts.map +1 -1
  101. package/types/types.d.ts +14 -4
  102. package/types/types.d.ts.map +1 -1
  103. package/types/v1/Input.d.ts +12 -12
  104. package/types/v1/Input.native.d.ts +12 -12
  105. package/types/v1/TextArea.d.ts +6 -6
  106. package/dist/cjs/Input.js +0 -143
  107. package/dist/cjs/Input.js.map +0 -6
  108. package/dist/cjs/InputNativeProps.js +0 -14
  109. package/dist/cjs/InputNativeProps.js.map +0 -6
  110. package/dist/cjs/TextArea.js +0 -43
  111. package/dist/cjs/TextArea.js.map +0 -6
  112. package/dist/cjs/index.js +0 -24
  113. package/dist/cjs/index.js.map +0 -6
  114. package/dist/cjs/shared.js +0 -111
  115. package/dist/cjs/shared.js.map +0 -6
  116. package/dist/cjs/types.js +0 -14
  117. package/dist/cjs/types.js.map +0 -6
  118. package/dist/cjs/v1/Input.js +0 -171
  119. package/dist/cjs/v1/Input.js.map +0 -6
  120. package/dist/cjs/v1/TextArea.js +0 -43
  121. package/dist/cjs/v1/TextArea.js.map +0 -6
  122. package/dist/cjs/v1/index.js +0 -16
  123. package/dist/cjs/v1/index.js.map +0 -6
  124. package/dist/cjs/v1/types.js +0 -14
  125. package/dist/cjs/v1/types.js.map +0 -6
  126. package/dist/esm/Input.js +0 -124
  127. package/dist/esm/Input.js.map +0 -6
  128. package/dist/esm/InputNativeProps.js +0 -1
  129. package/dist/esm/InputNativeProps.js.map +0 -6
  130. package/dist/esm/TextArea.js +0 -29
  131. package/dist/esm/TextArea.js.map +0 -6
  132. package/dist/esm/shared.js +0 -99
  133. package/dist/esm/shared.js.map +0 -6
  134. package/dist/esm/types.js +0 -1
  135. package/dist/esm/types.js.map +0 -6
  136. package/dist/esm/v1/Input.js +0 -152
  137. package/dist/esm/v1/Input.js.map +0 -6
  138. package/dist/esm/v1/TextArea.js +0 -29
  139. package/dist/esm/v1/TextArea.js.map +0 -6
  140. package/dist/esm/v1/index.js +0 -3
  141. package/dist/esm/v1/index.js.map +0 -6
  142. package/dist/esm/v1/types.js +0 -1
  143. package/dist/esm/v1/types.js.map +0 -6
  144. package/dist/jsx/Input.js +0 -124
  145. package/dist/jsx/Input.js.map +0 -6
  146. package/dist/jsx/InputNativeProps.js +0 -1
  147. package/dist/jsx/InputNativeProps.js.map +0 -6
  148. package/dist/jsx/TextArea.js +0 -29
  149. package/dist/jsx/TextArea.js.map +0 -6
  150. package/dist/jsx/shared.js +0 -99
  151. package/dist/jsx/shared.js.map +0 -6
  152. package/dist/jsx/types.js +0 -1
  153. package/dist/jsx/types.js.map +0 -6
  154. package/dist/jsx/v1/Input.js +0 -152
  155. package/dist/jsx/v1/Input.js.map +0 -6
  156. package/dist/jsx/v1/TextArea.js +0 -29
  157. package/dist/jsx/v1/TextArea.js.map +0 -6
  158. package/dist/jsx/v1/index.js +0 -3
  159. package/dist/jsx/v1/index.js.map +0 -6
  160. package/dist/jsx/v1/types.js +0 -1
  161. package/dist/jsx/v1/types.js.map +0 -6
@@ -4,138 +4,180 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
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, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  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);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var Input_native_exports = {};
35
37
  __export(Input_native_exports, {
36
38
  Input: () => Input
37
39
  });
38
40
  module.exports = __toCommonJS(Input_native_exports);
39
- var import_jsx_runtime = require("react/jsx-runtime"),
40
- import_react = __toESM(require("react"), 1),
41
- import_core = require("@tamagui/core"),
42
- import_focusable = require("@tamagui/focusable"),
43
- import_element = require("@tamagui/element"),
44
- import_react_native = require("react-native"),
45
- import_shared = require("../shared.native.js"),
46
- StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]),
47
- Input = StyledInput.styleable(function (inProps, forwardedRef) {
48
- var {
49
- // some of destructed props are just to avoid passing them to ...rest because they are not in native.
50
- type,
51
- //@ts-ignore
52
- dirname,
53
- max,
54
- min,
55
- minLength,
56
- multiple,
57
- name,
58
- required,
59
- step,
60
- disabled,
61
- id,
62
- // @ts-ignore
63
- caretColor,
64
- onChange,
65
- onInput,
66
- rows,
67
- enterKeyHint,
68
- returnKeyType,
69
- onKeyDown,
70
- inputMode,
71
- render,
72
- ...rest
73
- } = inProps,
74
- {
75
- ref,
76
- composedRef
77
- } = (0, import_element.useNativeInputRef)(forwardedRef),
78
- secureTextEntry = !1,
79
- cursorColor = caretColor,
80
- _returnKeyType = returnKeyType,
81
- _enterKeyHint = enterKeyHint;
82
- enterKeyHint === "go" && (_returnKeyType = "go", _enterKeyHint = void 0);
83
- var _inputMode = inputMode;
84
- 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";
85
- var showSoftInputOnFocus = !0;
86
- inputMode === "none" && (showSoftInputOnFocus = !1);
87
- var finalProps = {
88
- ...rest,
89
- inputMode: _inputMode,
90
- showSoftInputOnFocus,
91
- disabled,
92
- id,
93
- cursorColor,
94
- enterKeyHint: _enterKeyHint,
95
- returnKeyType: _returnKeyType,
96
- secureTextEntry,
97
- numberOfLines: rows || rest.numberOfLines
98
- };
99
- return render === "textarea" && (finalProps.multiline = !0), onKeyDown && (finalProps.onKeyPress = function (e) {
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_react = __toESM(require("react"), 1);
43
+ var import_core = require("@tamagui/core");
44
+ var import_focusable = require("@tamagui/focusable");
45
+ var import_element = require("@tamagui/element");
46
+ var import_react_native = require("react-native");
47
+ var import_shared = require("../shared.native.js");
48
+ var StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]);
49
+ var Input = StyledInput.styleable(function (inProps, forwardedRef) {
50
+ var {
51
+ // some of destructed props are just to avoid passing them to ...rest because they are not in native.
52
+ type,
53
+ //@ts-ignore
54
+ dirname,
55
+ max,
56
+ min,
57
+ minLength,
58
+ multiple,
59
+ name,
60
+ required,
61
+ step,
62
+ disabled,
63
+ id,
64
+ // @ts-ignore
65
+ caretColor,
66
+ onChange,
67
+ onInput,
68
+ rows,
69
+ enterKeyHint,
70
+ returnKeyType,
71
+ onKeyDown,
72
+ inputMode,
73
+ render,
74
+ ...rest
75
+ } = inProps;
76
+ var {
77
+ ref,
78
+ composedRef
79
+ } = (0, import_element.useNativeInputRef)(forwardedRef);
80
+ var secureTextEntry = false;
81
+ var cursorColor = caretColor;
82
+ var _returnKeyType = returnKeyType;
83
+ var _enterKeyHint = enterKeyHint;
84
+ if (enterKeyHint === "go") {
85
+ _returnKeyType = "go";
86
+ _enterKeyHint = void 0;
87
+ }
88
+ var _inputMode = inputMode;
89
+ if (type === "email") {
90
+ _inputMode = "email";
91
+ } else if (type === "tel") {
92
+ _inputMode = "tel";
93
+ } else if (type === "search") {
94
+ _inputMode = "search";
95
+ } else if (type === "url") {
96
+ _inputMode = "url";
97
+ } else if (type === "password") {
98
+ secureTextEntry = true;
99
+ _inputMode = "text";
100
+ } else if (type === "number") {
101
+ _inputMode = "numeric";
102
+ } else {
103
+ _inputMode = "text";
104
+ }
105
+ var showSoftInputOnFocus = true;
106
+ if (inputMode === "none") {
107
+ showSoftInputOnFocus = false;
108
+ }
109
+ var finalProps = {
110
+ ...rest,
111
+ inputMode: _inputMode,
112
+ showSoftInputOnFocus,
113
+ disabled,
114
+ id,
115
+ cursorColor,
116
+ enterKeyHint: _enterKeyHint,
117
+ returnKeyType: _returnKeyType,
118
+ secureTextEntry,
119
+ numberOfLines: rows || rest.numberOfLines
120
+ };
121
+ if (render === "textarea") {
122
+ finalProps.multiline = true;
123
+ }
124
+ if (onKeyDown) {
125
+ finalProps.onKeyPress = function (e) {
100
126
  var {
101
127
  key
102
128
  } = e.nativeEvent;
103
- (key === "Backspace" || render === "textarea" && key === "Enter" || key.length === 1) && onKeyDown({
104
- key,
105
- type: "keydown"
106
- });
107
- }, finalProps.onSubmitEditing = function (e) {
129
+ if (key === "Backspace" || render === "textarea" && key === "Enter" || key.length === 1) {
130
+ onKeyDown({
131
+ key,
132
+ type: "keydown"
133
+ });
134
+ }
135
+ };
136
+ finalProps.onSubmitEditing = function (e) {
108
137
  onKeyDown({
109
138
  key: "Enter",
110
139
  type: "keydown"
111
140
  });
112
- }), (onChange || onInput) && (finalProps.onChange = function (e) {
141
+ };
142
+ }
143
+ if (onChange || onInput) {
144
+ finalProps.onChange = function (e) {
113
145
  var {
114
146
  text
115
147
  } = e.nativeEvent;
116
- onChange && onChange({
117
- target: {
118
- value: text
119
- },
120
- type: "change"
121
- }), onInput?.({
122
- target: {
123
- value: text
124
- },
125
- type: "input"
126
- });
127
- }), import_react.default.useEffect(function () {
128
- if (id && !disabled) return (0, import_focusable.registerFocusable)(id, {
129
- focusAndSelect: function () {
130
- var _ref_current;
131
- (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
132
- },
133
- focus: function () {}
134
- });
135
- }, [id, disabled]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
136
- onChange: function (e) {},
137
- ref: composedRef,
138
- ...finalProps
148
+ if (onChange) {
149
+ onChange({
150
+ target: {
151
+ value: text
152
+ },
153
+ type: "change"
154
+ });
155
+ }
156
+ if (onInput != null) {
157
+ onInput({
158
+ target: {
159
+ value: text
160
+ },
161
+ type: "input"
162
+ });
163
+ }
164
+ };
165
+ }
166
+ import_react.default.useEffect(function () {
167
+ if (!id) return;
168
+ if (disabled) return;
169
+ return (0, import_focusable.registerFocusable)(id, {
170
+ focusAndSelect: function () {
171
+ var _ref_current;
172
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
173
+ },
174
+ focus: function () {}
139
175
  });
176
+ }, [id, disabled]);
177
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
178
+ onChange: function (e) {},
179
+ ref: composedRef,
180
+ ...finalProps
140
181
  });
182
+ });
141
183
  //# sourceMappingURL=Input.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Input_native_exports","__export","Input","module","exports","__toCommonJS","import_jsx_runtime","require","import_react","__toESM","import_core","import_focusable","import_element","import_react_native","import_shared","StyledInput","styled","TextInput","styledBody","styleable","inProps","forwardedRef","type","dirname","max","min","minLength","multiple","name","required","step","disabled","id","caretColor","onChange","onInput","rows","enterKeyHint","returnKeyType","onKeyDown","inputMode","render","rest","ref","composedRef","useNativeInputRef","secureTextEntry","cursorColor","_returnKeyType","_enterKeyHint","_inputMode","showSoftInputOnFocus","finalProps","numberOfLines","multiline","onKeyPress","e","key","nativeEvent","length","onSubmitEditing","text","target","value","default","useEffect","registerFocusable","focusAndSelect","_ref_current","current","focus","jsx"],"sources":["../../../src/v1/Input.native.tsx"],"sourcesContent":[null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AQ;UACJC,KAAA,EAAOF;QACX;QACAvC,IAAA,EAAM;MACV,CAAC,GAGDa,OAAA,GAAQ;QACJ2B,MAAA,EAAQ;UACJC,KAAA,EAAOF;QACX;QACAvC,IAAA,EAAM;MACV,CAAC;IAET,IAEJd,YAAA,CAAAwD,OAAA,CAAMC,SAAA,CAAU,YAAW;MACvB,IAAKjC,EAAA,IACD,CAAAD,QAAA,EACJ,WAAOpB,gBAAA,CAAAuD,iBAAA,EAAkBlC,EAAA,EAAI;QACzBmC,cAAA,EAAgB,SAAAA,CAAA,EAAW;UACvB,IAAIC,YAAA;UACJ,CAACA,YAAA,GAAezB,GAAA,CAAI0B,OAAA,MAAa,QAAQD,YAAA,KAAiB,UAAkBA,YAAA,CAAaE,KAAA,CAAM;QACnG;QACAA,KAAA,EAAO,SAAAA,CAAA,EAAW,CAAC;MACvB,CAAC;IACL,GAAG,CACCtC,EAAA,EACAD,QAAA,CACH,GACoB,mBAAAzB,kBAAA,CAAAiE,GAAA,EAAKxD,WAAA,EAAa;MACnCmB,QAAA,EAAU,SAAAA,CAASsB,CAAA,EAAG,CAAC;MACvBb,GAAA,EAAKC,WAAA;MACL,GAAGQ;IACP,CAAC;EACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Input_native_exports","__export","Input","module","exports","__toCommonJS","import_jsx_runtime","require","import_react","__toESM","import_core","import_focusable","import_element","import_react_native","import_shared","StyledInput","styled","TextInput","styledBody","styleable","inProps","forwardedRef","type","dirname","max","min","minLength","multiple","name","required","step","disabled","id","caretColor","onChange","onInput","rows","enterKeyHint","returnKeyType","onKeyDown","inputMode","render","rest","ref","composedRef","useNativeInputRef","secureTextEntry","cursorColor","_returnKeyType","_enterKeyHint","_inputMode","showSoftInputOnFocus","finalProps","numberOfLines","multiline","onKeyPress","e","key","nativeEvent","length","onSubmitEditing","text","target","value","default","useEffect","registerFocusable","focusAndSelect","_ref_current","current","focus","jsx"],"sources":["../../../src/v1/Input.native.tsx"],"sourcesContent":[null],"m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;MACrCjB,SAAA,CAAU;QACNkB,GAAA,EAAK;QACLnC,IAAA,EAAM;MACV,CAAC;IACL;EACJ;EACA,IAAIY,QAAA,IAAYC,OAAA,EAAS;IACrBiB,UAAA,CAAWlB,QAAA,GAAW,UAASsB,CAAA,EAAG;MAC9B,IAAI;QAAEK;MAAK,IAAIL,CAAA,CAAEE,WAAA;MACjB,IAAIxB,QAAA,EAAU;QACVA,QAAA,CAAS;UACL4B,MAAA,EAAQ;YACJC,KAAA,EAAOF;UACX;UACAvC,IAAA,EAAM;QACV,CAAC;MACL;MACA,IAAIa,OAAA,IAAW,MAAM;QACjBA,OAAA,CAAQ;UACJ2B,MAAA,EAAQ;YACJC,KAAA,EAAOF;UACX;UACAvC,IAAA,EAAM;QACV,CAAC;MACL;IACJ;EACJ;EACAd,YAAA,CAAAwD,OAAA,CAAMC,SAAA,CAAU,YAAW;IACvB,IAAI,CAACjC,EAAA,EAAI;IACT,IAAID,QAAA,EAAU;IACd,WAAOpB,gBAAA,CAAAuD,iBAAA,EAAkBlC,EAAA,EAAI;MACzBmC,cAAA,EAAgB,SAAAA,CAAA,EAAW;QACvB,IAAIC,YAAA;QACJ,CAACA,YAAA,GAAezB,GAAA,CAAI0B,OAAA,MAAa,QAAQD,YAAA,KAAiB,SAAS,SAASA,YAAA,CAAaE,KAAA,CAAM;MACnG;MACAA,KAAA,EAAO,SAAAA,CAAA,EAAW,CAAC;IACvB,CAAC;EACL,GAAG,CACCtC,EAAA,EACAD,QAAA,CACH;EACD,OAAqB,mBAAAzB,kBAAA,CAAAiE,GAAA,EAAKxD,WAAA,EAAa;IACnCmB,QAAA,EAAU,SAAAA,CAASsB,CAAA,EAAG,CAAC;IACvBb,GAAA,EAAKC,WAAA;IACL,GAAGQ;EACP,CAAC;AACL,CAAC","ignoreList":[]}
@@ -5,49 +5,51 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
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, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var TextArea_exports = {};
24
26
  __export(TextArea_exports, {
25
27
  TextArea: () => TextArea
26
28
  });
27
29
  module.exports = __toCommonJS(TextArea_exports);
28
- var import_web = require("@tamagui/web"),
29
- import_Input = require("./Input.native.js"),
30
- import_shared = require("../shared.native.js"),
31
- TextArea = (0, import_web.styled)(import_Input.Input, {
32
- name: "TextArea",
33
- render: "textarea",
34
- // this attribute fixes firefox newline issue
35
- // @ts-ignore
36
- whiteSpace: "pre-wrap",
37
- variants: {
38
- unstyled: {
39
- false: {
40
- height: "auto",
41
- ...import_shared.defaultStyles,
42
- numberOfLines: 3
43
- }
44
- },
45
- size: {
46
- "...size": import_shared.textAreaSizeVariant
30
+ var import_web = require("@tamagui/web");
31
+ var import_Input = require("./Input.native.js");
32
+ var import_shared = require("../shared.native.js");
33
+ var TextArea = (0, import_web.styled)(import_Input.Input, {
34
+ name: "TextArea",
35
+ render: "textarea",
36
+ // this attribute fixes firefox newline issue
37
+ // @ts-ignore
38
+ whiteSpace: "pre-wrap",
39
+ variants: {
40
+ unstyled: {
41
+ false: {
42
+ height: "auto",
43
+ ...import_shared.defaultStyles,
44
+ numberOfLines: 3
47
45
  }
48
46
  },
49
- defaultVariants: {
50
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
47
+ size: {
48
+ "...size": import_shared.textAreaSizeVariant
51
49
  }
52
- });
50
+ },
51
+ defaultVariants: {
52
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
53
+ }
54
+ });
53
55
  //# sourceMappingURL=TextArea.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","TextArea_exports","TextArea","module","exports","import_web","require","import_Input","import_shared","styled","Input","render"],"sources":["../../../src/v1/TextArea.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAa,CAAAC,cAAA;AACtB,IAAAC,gBAAS,GAAAF,MAAe,CAAAG,wBAA2B;AAO5C,IAAAC,iBAAiB,GAAOJ,MAAA,CAAOK,mBAAA;AAAA,IACpCC,YAAM,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACNC,QAAQ,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IAAA,SAAAC,IAAA,IAAAD,GAAA,EAAAZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAAA;EAIRC,WAAY,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IAEZ,IAAAF,IAAA,IAAU,OAAAA,IAAA,uBAAAA,IAAA,gBACR,SAAAG,GAAU,IAAAhB,iBAAA,CAAAa,IAAA,GACR,CAAAX,YAAO,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,IAAAnB,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;IAAA,OACLE,EAAA;EAAQ;AACL,IAAAM,YACH,GAAAC,GAAe,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IAAAE,gBACjB;AAAAhB,QACF,CAAAgB,gBAAA;EAAAC,QAEM,EAAAA,CAAA,KAAAA;AAAA;AACOC,MACb,CAAAC,OAAA,GAAAN,YAAA,CAAAG,gBAAA;AAAA,IACFI,UAAA,GAAAC,OAAA;EAAAC,YAAA,GAAAD,OAAA;EAAAE,aAAA,GAAAF,OAAA;EAAAJ,QAAA,OAAAG,UAAA,CAAAI,MAAA,EAAAF,YAAA,CAAAG,KAAA;IAEAtB,IAAA;IAAiBuB,MACf,YAAU;IACZ;IACD","ignoreList":[]}
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","TextArea_exports","TextArea","module","exports","import_web","require","import_Input"],"sources":["../../../src/v1/TextArea.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAa,CAAAC,cAAA;AACtB,IAAAC,gBAAS,GAAAF,MAAe,CAAAG,wBAA2B;AAO5C,IAAAC,iBAAiB,GAAOJ,MAAA,CAAOK,mBAAA;AAAA,IACpCC,YAAM,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACNC,QAAQ,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,SAAAC,IAAA,IAAAD,GAAA,EAAAZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AAII,IAEZC,WAAU,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACRF,IAAA,IAAU,OAAAA,IAAA,wBAAAA,IAAA;IAAA,KACR,IAAOG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,OACL,CAAAX,YAAQ,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACRnB,SAAG,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;EAAA;EACY,OACjBE,EAAA;AAAA;AACF,IAEAM,YAAM,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IAAAE,gBACO;AAAAhB,QACb,CAAAgB,gBAAA;EACFC,QAAA,EAAAA,CAAA,KAAAA;AAAA,EAEA;AAAiBC,MACf,CAAAC,OAAU,GAAAN,YAAY,CAAAG,gBAAA,CAAqB;AAAA,IAC7CI,UAAA,GAAAC,OAAA;AACF,IAACC,YAAA,GAAAD,OAAA","ignoreList":[]}
@@ -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
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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: !0
18
+ value: true
17
19
  }), mod);
18
20
  var v1_exports = {};
19
21
  module.exports = __toCommonJS(v1_exports);
@@ -5,14 +5,16 @@ 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
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
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, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
12
14
  return to;
13
15
  };
14
16
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
17
+ value: true
16
18
  }), mod);
17
19
  var types_exports = {};
18
20
  module.exports = __toCommonJS(types_exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/input",
3
- "version": "2.0.0-rc.9",
3
+ "version": "2.0.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -20,10 +20,11 @@
20
20
  ".": {
21
21
  "types": "./types/index.d.ts",
22
22
  "react-native": "./dist/esm/index.native.js",
23
+ "browser": "./dist/esm/index.mjs",
23
24
  "module": "./dist/esm/index.mjs",
24
25
  "import": "./dist/esm/index.mjs",
25
26
  "require": "./dist/cjs/index.cjs",
26
- "default": "./dist/cjs/index.native.js"
27
+ "default": "./dist/esm/index.mjs"
27
28
  }
28
29
  },
29
30
  "publishConfig": {
@@ -33,31 +34,31 @@
33
34
  "build": "tamagui-build",
34
35
  "watch": "tamagui-build --watch",
35
36
  "clean": "tamagui-build clean",
36
- "clean:build": "tamagui-build clean:build"
37
+ "clean:build": "tamagui-build clean:build",
38
+ "test:web": "vitest --typecheck --run"
37
39
  },
38
40
  "dependencies": {
39
- "@tamagui/core": "2.0.0-rc.9",
40
- "@tamagui/element": "2.0.0-rc.9",
41
- "@tamagui/focusable": "2.0.0-rc.9",
42
- "@tamagui/font-size": "2.0.0-rc.9",
43
- "@tamagui/get-button-sized": "2.0.0-rc.9",
44
- "@tamagui/get-font-sized": "2.0.0-rc.9",
45
- "@tamagui/get-token": "2.0.0-rc.9",
46
- "@tamagui/helpers": "2.0.0-rc.9",
47
- "@tamagui/helpers-tamagui": "2.0.0-rc.9",
48
- "@tamagui/stacks": "2.0.0-rc.9",
49
- "@tamagui/text": "2.0.0-rc.9",
50
- "@tamagui/web": "2.0.0-rc.9"
41
+ "@tamagui/core": "2.0.0",
42
+ "@tamagui/element": "2.0.0",
43
+ "@tamagui/focusable": "2.0.0",
44
+ "@tamagui/get-button-sized": "2.0.0",
45
+ "@tamagui/get-font-sized": "2.0.0",
46
+ "@tamagui/get-token": "2.0.0",
47
+ "@tamagui/helpers": "2.0.0",
48
+ "@tamagui/helpers-tamagui": "2.0.0",
49
+ "@tamagui/stacks": "2.0.0",
50
+ "@tamagui/text": "2.0.0",
51
+ "@tamagui/font-size": "2.0.0",
52
+ "@tamagui/web": "2.0.0"
51
53
  },
52
54
  "devDependencies": {
53
- "@tamagui/build": "2.0.0-rc.9",
55
+ "@tamagui/build": "2.0.0",
54
56
  "react": ">=19",
55
- "react-native": "0.81.5",
57
+ "react-native": "0.83.2",
56
58
  "vitest": "4.0.4"
57
59
  },
58
60
  "peerDependencies": {
59
- "react": ">=19",
60
- "react-native": "*"
61
+ "react": ">=19"
61
62
  },
62
63
  "module:jsx": "dist/jsx"
63
64
  }
@@ -4,7 +4,7 @@ import { styled } from '@tamagui/core'
4
4
  import { registerFocusable } from '@tamagui/focusable'
5
5
  import { useNativeInputRef } from '@tamagui/element'
6
6
  import { styledBody } from './shared'
7
- import type { InputProps } from './types'
7
+ import type { InputExtraProps } from './types'
8
8
 
9
9
  const StyledInput = styled(TextInput, styledBody[0], styledBody[1])
10
10
 
@@ -12,7 +12,7 @@ const StyledInput = styled(TextInput, styledBody[0], styledBody[1])
12
12
  * A web-aligned input component for React Native.
13
13
  * @see — Docs https://tamagui.dev/ui/inputs#input
14
14
  */
15
- export const Input = StyledInput.styleable<InputProps>((props, forwardedRef) => {
15
+ export const Input = StyledInput.styleable<InputExtraProps>((props, forwardedRef) => {
16
16
  const {
17
17
  // Web props we need to convert
18
18
  type,
package/src/Input.tsx CHANGED
@@ -1,9 +1,9 @@
1
- import { View, styled, useTheme } from '@tamagui/core'
1
+ import { type GetProps, View, styled, useTheme } from '@tamagui/core'
2
2
  import { registerFocusable } from '@tamagui/focusable'
3
3
  import { useWebRef } from '@tamagui/element'
4
4
  import React from 'react'
5
5
  import { styledBody } from './shared'
6
- import type { InputProps } from './types'
6
+ import type { InputExtraProps } from './types'
7
7
 
8
8
  const StyledInput = styled(View, styledBody[0], styledBody[1])
9
9
 
@@ -11,7 +11,7 @@ const StyledInput = styled(View, styledBody[0], styledBody[1])
11
11
  * A web-aligned input component.
12
12
  * @see — Docs https://tamagui.dev/ui/inputs#input
13
13
  */
14
- export const Input = StyledInput.styleable<InputProps>((props, _forwardedRef) => {
14
+ export const Input = StyledInput.styleable<InputExtraProps>((props, _forwardedRef) => {
15
15
  const {
16
16
  disabled,
17
17
  id,
@@ -158,14 +158,16 @@ export const Input = StyledInput.styleable<InputProps>((props, _forwardedRef) =>
158
158
  style: {
159
159
  ...(rest.style as any),
160
160
  ...(placeholderTextColor && {
161
- '--placeholderColor':
161
+ '--t_placeholderColor':
162
162
  theme[placeholderTextColor]?.variable || placeholderTextColor,
163
163
  }),
164
164
  ...(selectionColor && {
165
- '--selectionColor': theme[selectionColor]?.variable || selectionColor,
165
+ '--t_selectionColor': theme[selectionColor]?.variable || selectionColor,
166
166
  }),
167
167
  },
168
168
  } as any
169
169
 
170
170
  return <StyledInput ref={composedRef} {...finalProps} />
171
171
  })
172
+
173
+ export type InputProps = GetProps<typeof Input>
package/src/TextArea.tsx CHANGED
@@ -1,9 +1,7 @@
1
- import { styled } from '@tamagui/web'
1
+ import { type GetProps, styled } from '@tamagui/web'
2
2
  import { Input } from './Input'
3
3
  import { defaultStyles, textAreaSizeVariant } from './shared'
4
4
 
5
- export type { InputProps as TextAreaProps } from './types'
6
-
7
5
  /**
8
6
  * A web-aligned textarea component (multi-line input).
9
7
  * @see — Docs https://tamagui.dev/ui/inputs#textarea
@@ -34,3 +32,5 @@ export const TextArea = styled(Input, {
34
32
  unstyled: process.env.TAMAGUI_HEADLESS === '1',
35
33
  },
36
34
  })
35
+
36
+ export type TextAreaProps = GetProps<typeof TextArea>
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from './Input'
2
2
  export * from './TextArea'
3
3
  export { inputSizeVariant, textAreaSizeVariant } from './shared'
4
- export type { InputProps, InputTextContentType } from './types'
4
+ export type { InputExtraProps, InputRef, InputTextContentType } from './types'
5
5
  export type {
6
6
  InputNativeProps,
7
7
  InputIOSProps,