@tamagui/input 2.7.7 → 3.0.0-beta.1091.1

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 (169) hide show
  1. package/dist/cjs/Input.cjs +72 -163
  2. package/dist/cjs/Input.native.cjs +208 -0
  3. package/dist/cjs/Input.native.js +186 -283
  4. package/dist/cjs/Input.native.js.map +1 -1
  5. package/dist/cjs/InputNativeProps.cjs +9 -11
  6. package/dist/cjs/InputNativeProps.native.cjs +18 -0
  7. package/dist/cjs/InputNativeProps.native.js +9 -10
  8. package/dist/cjs/InputNativeProps.native.js.map +1 -1
  9. package/dist/cjs/TextArea.cjs +23 -39
  10. package/dist/cjs/TextArea.native.cjs +38 -0
  11. package/dist/cjs/TextArea.native.js +23 -38
  12. package/dist/cjs/TextArea.native.js.map +1 -1
  13. package/dist/cjs/index.cjs +15 -17
  14. package/dist/cjs/index.native.cjs +32 -0
  15. package/dist/cjs/index.native.js +15 -16
  16. package/dist/cjs/index.native.js.map +1 -1
  17. package/dist/cjs/shared.cjs +74 -124
  18. package/dist/cjs/shared.native.cjs +101 -0
  19. package/dist/cjs/shared.native.js +80 -129
  20. package/dist/cjs/shared.native.js.map +1 -1
  21. package/dist/cjs/types.cjs +9 -11
  22. package/dist/cjs/types.native.cjs +18 -0
  23. package/dist/cjs/types.native.js +9 -10
  24. package/dist/cjs/types.native.js.map +1 -1
  25. package/dist/esm/Input.mjs +59 -139
  26. package/dist/esm/Input.mjs.map +1 -1
  27. package/dist/esm/Input.native.js +174 -261
  28. package/dist/esm/Input.native.js.map +1 -1
  29. package/dist/esm/InputNativeProps.mjs +0 -2
  30. package/dist/esm/InputNativeProps.native.js +0 -2
  31. package/dist/esm/TextArea.mjs +12 -22
  32. package/dist/esm/TextArea.mjs.map +1 -1
  33. package/dist/esm/TextArea.native.js +12 -22
  34. package/dist/esm/TextArea.native.js.map +1 -1
  35. package/dist/esm/index.js +6 -4
  36. package/dist/esm/index.mjs +6 -4
  37. package/dist/esm/index.native.js +6 -4
  38. package/dist/esm/shared.mjs +59 -107
  39. package/dist/esm/shared.mjs.map +1 -1
  40. package/dist/esm/shared.native.js +64 -112
  41. package/dist/esm/shared.native.js.map +1 -1
  42. package/dist/esm/types.mjs +0 -2
  43. package/dist/esm/types.native.js +0 -2
  44. package/dist/jsx/Input.mjs +59 -139
  45. package/dist/jsx/Input.mjs.map +1 -1
  46. package/dist/jsx/Input.native.cjs +208 -0
  47. package/dist/jsx/Input.native.js +186 -283
  48. package/dist/jsx/Input.native.js.map +1 -1
  49. package/dist/jsx/InputNativeProps.mjs +0 -2
  50. package/dist/jsx/InputNativeProps.native.cjs +18 -0
  51. package/dist/jsx/InputNativeProps.native.js +9 -10
  52. package/dist/jsx/InputNativeProps.native.js.map +1 -1
  53. package/dist/jsx/TextArea.mjs +12 -22
  54. package/dist/jsx/TextArea.mjs.map +1 -1
  55. package/dist/jsx/TextArea.native.cjs +38 -0
  56. package/dist/jsx/TextArea.native.js +23 -38
  57. package/dist/jsx/TextArea.native.js.map +1 -1
  58. package/dist/jsx/index.js +6 -4
  59. package/dist/jsx/index.mjs +6 -4
  60. package/dist/jsx/index.native.cjs +32 -0
  61. package/dist/jsx/index.native.js +15 -16
  62. package/dist/jsx/index.native.js.map +1 -1
  63. package/dist/jsx/shared.mjs +59 -107
  64. package/dist/jsx/shared.mjs.map +1 -1
  65. package/dist/jsx/shared.native.cjs +101 -0
  66. package/dist/jsx/shared.native.js +80 -129
  67. package/dist/jsx/shared.native.js.map +1 -1
  68. package/dist/jsx/types.mjs +0 -2
  69. package/dist/jsx/types.native.cjs +18 -0
  70. package/dist/jsx/types.native.js +9 -10
  71. package/dist/jsx/types.native.js.map +1 -1
  72. package/package.json +17 -17
  73. package/src/Input.native.tsx +267 -242
  74. package/src/Input.tsx +150 -154
  75. package/src/TextArea.tsx +9 -18
  76. package/src/shared.tsx +56 -109
  77. package/src/types.ts +2 -2
  78. package/types/Input.d.ts +32 -50
  79. package/types/Input.d.ts.map +1 -1
  80. package/types/Input.native.d.ts +32 -50
  81. package/types/Input.native.d.ts.map +1 -1
  82. package/types/TextArea.d.ts +16 -34
  83. package/types/TextArea.d.ts.map +1 -1
  84. package/types/shared.d.ts +38 -109
  85. package/types/shared.d.ts.map +1 -1
  86. package/types/types.d.ts +2 -2
  87. package/types/types.d.ts.map +1 -1
  88. package/dist/cjs/inputTypes.test-d.cjs +0 -128
  89. package/dist/cjs/inputTypes.test-d.native.js +0 -131
  90. package/dist/cjs/inputTypes.test-d.native.js.map +0 -1
  91. package/dist/cjs/v1/Input.cjs +0 -200
  92. package/dist/cjs/v1/Input.native.js +0 -183
  93. package/dist/cjs/v1/Input.native.js.map +0 -1
  94. package/dist/cjs/v1/TextArea.cjs +0 -52
  95. package/dist/cjs/v1/TextArea.native.js +0 -55
  96. package/dist/cjs/v1/TextArea.native.js.map +0 -1
  97. package/dist/cjs/v1/index.cjs +0 -21
  98. package/dist/cjs/v1/index.native.js +0 -24
  99. package/dist/cjs/v1/index.native.js.map +0 -1
  100. package/dist/cjs/v1/types.cjs +0 -18
  101. package/dist/cjs/v1/types.native.js +0 -21
  102. package/dist/cjs/v1/types.native.js.map +0 -1
  103. package/dist/esm/InputNativeProps.mjs.map +0 -1
  104. package/dist/esm/InputNativeProps.native.js.map +0 -1
  105. package/dist/esm/index.js.map +0 -1
  106. package/dist/esm/index.mjs.map +0 -1
  107. package/dist/esm/index.native.js.map +0 -1
  108. package/dist/esm/inputTypes.test-d.mjs +0 -129
  109. package/dist/esm/inputTypes.test-d.mjs.map +0 -1
  110. package/dist/esm/inputTypes.test-d.native.js +0 -129
  111. package/dist/esm/inputTypes.test-d.native.js.map +0 -1
  112. package/dist/esm/types.mjs.map +0 -1
  113. package/dist/esm/types.native.js.map +0 -1
  114. package/dist/esm/v1/Input.mjs +0 -164
  115. package/dist/esm/v1/Input.mjs.map +0 -1
  116. package/dist/esm/v1/Input.native.js +0 -144
  117. package/dist/esm/v1/Input.native.js.map +0 -1
  118. package/dist/esm/v1/TextArea.mjs +0 -27
  119. package/dist/esm/v1/TextArea.mjs.map +0 -1
  120. package/dist/esm/v1/TextArea.native.js +0 -27
  121. package/dist/esm/v1/TextArea.native.js.map +0 -1
  122. package/dist/esm/v1/index.mjs +0 -3
  123. package/dist/esm/v1/index.mjs.map +0 -1
  124. package/dist/esm/v1/index.native.js +0 -3
  125. package/dist/esm/v1/index.native.js.map +0 -1
  126. package/dist/esm/v1/types.mjs +0 -2
  127. package/dist/esm/v1/types.mjs.map +0 -1
  128. package/dist/esm/v1/types.native.js +0 -2
  129. package/dist/esm/v1/types.native.js.map +0 -1
  130. package/dist/jsx/InputNativeProps.mjs.map +0 -1
  131. package/dist/jsx/index.js.map +0 -1
  132. package/dist/jsx/index.mjs.map +0 -1
  133. package/dist/jsx/inputTypes.test-d.mjs +0 -129
  134. package/dist/jsx/inputTypes.test-d.mjs.map +0 -1
  135. package/dist/jsx/inputTypes.test-d.native.js +0 -131
  136. package/dist/jsx/inputTypes.test-d.native.js.map +0 -1
  137. package/dist/jsx/types.mjs.map +0 -1
  138. package/dist/jsx/v1/Input.mjs +0 -164
  139. package/dist/jsx/v1/Input.mjs.map +0 -1
  140. package/dist/jsx/v1/Input.native.js +0 -183
  141. package/dist/jsx/v1/Input.native.js.map +0 -1
  142. package/dist/jsx/v1/TextArea.mjs +0 -27
  143. package/dist/jsx/v1/TextArea.mjs.map +0 -1
  144. package/dist/jsx/v1/TextArea.native.js +0 -55
  145. package/dist/jsx/v1/TextArea.native.js.map +0 -1
  146. package/dist/jsx/v1/index.mjs +0 -3
  147. package/dist/jsx/v1/index.mjs.map +0 -1
  148. package/dist/jsx/v1/index.native.js +0 -24
  149. package/dist/jsx/v1/index.native.js.map +0 -1
  150. package/dist/jsx/v1/types.mjs +0 -2
  151. package/dist/jsx/v1/types.mjs.map +0 -1
  152. package/dist/jsx/v1/types.native.js +0 -21
  153. package/dist/jsx/v1/types.native.js.map +0 -1
  154. package/src/inputTypes.test-d.ts +0 -245
  155. package/src/v1/Input.native.tsx +0 -153
  156. package/src/v1/Input.tsx +0 -190
  157. package/src/v1/TextArea.tsx +0 -35
  158. package/src/v1/index.ts +0 -3
  159. package/src/v1/types.ts +0 -65
  160. package/types/v1/Input.d.ts +0 -64
  161. package/types/v1/Input.d.ts.map +0 -1
  162. package/types/v1/Input.native.d.ts +0 -63
  163. package/types/v1/Input.native.d.ts.map +0 -1
  164. package/types/v1/TextArea.d.ts +0 -41
  165. package/types/v1/TextArea.d.ts.map +0 -1
  166. package/types/v1/index.d.ts +0 -4
  167. package/types/v1/index.d.ts.map +0 -1
  168. package/types/v1/types.d.ts +0 -39
  169. package/types/v1/types.d.ts.map +0 -1
@@ -3,50 +3,34 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var TextArea_exports = {};
24
- __export(TextArea_exports, {
25
- TextArea: () => TextArea
26
- });
22
+ __export(TextArea_exports, { TextArea: () => TextArea });
27
23
  module.exports = __toCommonJS(TextArea_exports);
28
24
  var import_web = require("@tamagui/web");
29
25
  var import_Input = require("./Input.cjs");
30
26
  var import_shared = require("./shared.cjs");
31
- const 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
- rows: 3
43
- }
44
- },
45
- size: {
46
- "...size": import_shared.textAreaSizeVariant
47
- }
48
- },
49
- defaultVariants: {
50
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
51
- }
52
- });
27
+ const TextAreaFrame = (0, import_web.styled)(import_Input.Input, {
28
+ displayName: "TextArea",
29
+ render: "textarea",
30
+ whiteSpace: "pre-wrap",
31
+ height: "auto",
32
+ ...import_shared.defaultStyles,
33
+ rows: 3,
34
+ variants: { size: import_shared.textAreaSizeVariant }
35
+ });
36
+ const TextArea = TextAreaFrame.resolve(import_shared.resolveTextAreaSize);
@@ -0,0 +1,38 @@
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: 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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var TextArea_exports = {};
24
+ __export(TextArea_exports, { TextArea: () => TextArea });
25
+ module.exports = __toCommonJS(TextArea_exports);
26
+ var import_web = require("@tamagui/web");
27
+ var import_Input = require("./Input.native.js");
28
+ var import_shared = require("./shared.native.js");
29
+ var TextAreaFrame = (0, import_web.styled)(import_Input.Input, {
30
+ displayName: "TextArea",
31
+ render: "textarea",
32
+ whiteSpace: "pre-wrap",
33
+ height: "auto",
34
+ ...import_shared.defaultStyles,
35
+ rows: 3,
36
+ variants: { size: import_shared.textAreaSizeVariant }
37
+ });
38
+ var TextArea = TextAreaFrame.resolve(import_shared.resolveTextAreaSize);
@@ -5,51 +5,36 @@ 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: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var TextArea_exports = {};
26
- __export(TextArea_exports, {
27
- TextArea: () => TextArea
28
- });
24
+ __export(TextArea_exports, { TextArea: () => TextArea });
29
25
  module.exports = __toCommonJS(TextArea_exports);
30
26
  var import_web = require("@tamagui/web");
31
27
  var import_Input = require("./Input.native.js");
32
28
  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
- rows: 3
45
- }
46
- },
47
- size: {
48
- "...size": import_shared.textAreaSizeVariant
49
- }
50
- },
51
- defaultVariants: {
52
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
53
- }
29
+ var TextAreaFrame = (0, import_web.styled)(import_Input.Input, {
30
+ displayName: "TextArea",
31
+ render: "textarea",
32
+ whiteSpace: "pre-wrap",
33
+ height: "auto",
34
+ ...import_shared.defaultStyles,
35
+ rows: 3,
36
+ variants: { size: import_shared.textAreaSizeVariant }
54
37
  });
38
+ var TextArea = TextAreaFrame.resolve(import_shared.resolveTextAreaSize);
39
+
55
40
  //# sourceMappingURL=TextArea.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","TextArea_exports","__export","TextArea","module","exports","import_web","require","import_Input","import_shared","styled","Input","name","render","whiteSpace","variants","unstyled","false","height","defaultStyles","rows","size","textAreaSizeVariant","defaultVariants","process","env","TAMAGUI_HEADLESS"],"sources":["../../src/TextArea.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAsCT,YAAA,CAAAK,gBAAA;AACtC,IAAAK,UAAA,GAAAC,OAAsB;AACtB,IAAAC,YAAA,GAAAD,OAAmD;AAM5C,IAAAE,aAAM,GAAAF,OAAW;AAAc,IACpCJ,QAAM,OAAAG,UAAA,CAAAI,MAAA,EAAAF,YAAA,CAAAG,KAAA;EACNC,IAAA,YAAQ;EAAAC,MAAA;EAAA;EAIR;EAEAC,UAAU;EAAAC,QACR;IAAUC,QACR,EAAO;MAAAC,KACL;QACAC,MAAG;QACH,GAAAT,aAAM,CAAAU,aAAA;QACRC,IAAA;MACF;IAEA;IAAMC,IACJ;MACF,WAAAZ,aAAA,CAAAa;IACF;EAEA;EAAiBC,eACL;IACZP,QAAA,EAAAQ,OAAA,CAAAC,GAAA,CAAAC,gBAAA;EACD","ignoreList":[]}
1
+ {"version":3,"file":"TextArea.native.js","names":[],"sources":["cjs/TextArea.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TextArea_exports = {};\n__export(TextArea_exports, {\n TextArea: () => TextArea\n});\nmodule.exports = __toCommonJS(TextArea_exports);\nvar import_web = require(\"@tamagui/web\");\nvar import_Input = require(\"./Input\");\nvar import_shared = require(\"./shared\");\nvar TextAreaFrame = (0, import_web.styled)(import_Input.Input, {\n displayName: \"TextArea\",\n render: \"textarea\",\n // this attribute fixes firefox newline issue\n // @ts-ignore\n whiteSpace: \"pre-wrap\",\n height: \"auto\",\n ...import_shared.defaultStyles,\n rows: 3,\n variants: {\n size: import_shared.textAreaSizeVariant\n }\n});\nvar TextArea = TextAreaFrame.resolve(import_shared.resolveTextAreaSize);\n//# sourceMappingURL=TextArea.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,mBAAmB,CAAC;AACxB,SAAS,kBAAkB,EACzB,gBAAgB,SAClB,CAAC;AACD,OAAO,UAAU,aAAa,gBAAgB;AAC9C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,QAAQ,mBAAS;AACpC,IAAI,gBAAgB,QAAQ,oBAAU;AACtC,IAAI,iBAAiB,GAAG,WAAW,OAAM,CAAE,aAAa,OAAO;CAC7D,aAAa;CACb,QAAQ;CAGR,YAAY;CACZ,QAAQ;CACR,GAAG,cAAc;CACjB,MAAM;CACN,UAAU,EACR,MAAM,cAAc,oBACtB;AACF,CAAC;AACD,IAAI,WAAW,cAAc,QAAQ,cAAc,mBAAmB"}
@@ -3,30 +3,28 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
22
- value: true
23
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
22
  var index_exports = {};
25
23
  __export(index_exports, {
26
- inputSizeVariant: () => import_shared.inputSizeVariant,
27
- textAreaSizeVariant: () => import_shared.textAreaSizeVariant
24
+ inputSizeVariant: () => import_shared.inputSizeVariant,
25
+ textAreaSizeVariant: () => import_shared.textAreaSizeVariant
28
26
  });
29
27
  module.exports = __toCommonJS(index_exports);
30
28
  __reExport(index_exports, require("./Input.cjs"), module.exports);
31
29
  __reExport(index_exports, require("./TextArea.cjs"), module.exports);
32
- var import_shared = require("./shared.cjs");
30
+ var import_shared = require("./shared.cjs");
@@ -0,0 +1,32 @@
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: 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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var index_exports = {};
25
+ __export(index_exports, {
26
+ inputSizeVariant: () => import_shared.inputSizeVariant,
27
+ textAreaSizeVariant: () => import_shared.textAreaSizeVariant
28
+ });
29
+ module.exports = __toCommonJS(index_exports);
30
+ __reExport(index_exports, require("./Input.native.js"), module.exports);
31
+ __reExport(index_exports, require("./TextArea.native.js"), module.exports);
32
+ var import_shared = require("./shared.native.js");
@@ -5,31 +5,30 @@ 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: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
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, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
22
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
24
- value: true
25
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
24
  var index_exports = {};
27
25
  __export(index_exports, {
28
- inputSizeVariant: () => import_shared.inputSizeVariant,
29
- textAreaSizeVariant: () => import_shared.textAreaSizeVariant
26
+ inputSizeVariant: () => import_shared.inputSizeVariant,
27
+ textAreaSizeVariant: () => import_shared.textAreaSizeVariant
30
28
  });
31
29
  module.exports = __toCommonJS(index_exports);
32
30
  __reExport(index_exports, require("./Input.native.js"), module.exports);
33
31
  __reExport(index_exports, require("./TextArea.native.js"), module.exports);
34
32
  var import_shared = require("./shared.native.js");
33
+
35
34
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","inputSizeVariant","import_shared","textAreaSizeVariant","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAC,aAAA,CAAAD,gBAAA;EAAAE,mBAAA,EAAAA,CAAA,KAAAD,aAAA,CAAAC;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAc,CAAAK,aAAA;AACdO,UAAA,CAAAP,aAAA,EAAcQ,OAAA,uBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAP,aAAsD,EAAAQ,OAAA,0BAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n inputSizeVariant: () => import_shared.inputSizeVariant,\n textAreaSizeVariant: () => import_shared.textAreaSizeVariant\n});\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Input\"), module.exports);\n__reExport(index_exports, require(\"./TextArea\"), module.exports);\nvar import_shared = require(\"./shared\");\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe;CACtB,wBAAwB,cAAc;CACtC,2BAA2B,cAAc;AAC3C,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,mBAAS,GAAG,OAAO,OAAO;AAC5D,WAAW,eAAe,QAAQ,sBAAY,GAAG,OAAO,OAAO;AAC/D,IAAI,gBAAgB,QAAQ,oBAAU"}
@@ -3,142 +3,92 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var shared_exports = {};
24
22
  __export(shared_exports, {
25
- INPUT_NAME: () => INPUT_NAME,
26
- defaultStyles: () => defaultStyles,
27
- inputSizeVariant: () => inputSizeVariant,
28
- styledBody: () => styledBody,
29
- textAreaSizeVariant: () => textAreaSizeVariant
23
+ INPUT_NAME: () => INPUT_NAME,
24
+ defaultStyles: () => defaultStyles,
25
+ inputSizeVariant: () => inputSizeVariant,
26
+ resolveMultilineInputSize: () => resolveMultilineInputSize,
27
+ resolveTextAreaSize: () => resolveTextAreaSize,
28
+ styledBody: () => styledBody,
29
+ textAreaSizeVariant: () => textAreaSizeVariant
30
30
  });
31
31
  module.exports = __toCommonJS(shared_exports);
32
32
  var import_core = require("@tamagui/core");
33
- var import_core2 = require("@tamagui/core");
34
- var import_get_button_sized = require("@tamagui/get-button-sized");
35
33
  var import_get_font_sized = require("@tamagui/get-font-sized");
36
- var import_get_token = require("@tamagui/get-token");
37
34
  const defaultStyles = {
38
- size: "$true",
39
- fontFamily: "$body",
40
- borderWidth: 1,
41
- outlineWidth: 0,
42
- color: "$color",
43
- ...(import_core2.isWeb ? {
44
- tabIndex: 0
45
- } : {
46
- focusable: true
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
- }
35
+ size: true,
36
+ outlineWidth: 0,
37
+ tabIndex: 0,
38
+ minWidth: 0
63
39
  };
64
- const inputSizeVariant = (val = "$true", extras) => {
65
- if (extras.props.tag === "textarea" || extras.props.rows > 1 || extras.props.multiline || extras.props.numberOfLines > 1) {
66
- return textAreaSizeVariant(val, extras);
67
- }
68
- const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras);
69
- const paddingHorizontal = (0, import_get_token.getSpace)(val, {
70
- shift: -1,
71
- bounds: [2]
72
- });
73
- const fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
74
- if (!import_core2.isWeb && fontStyle) {
75
- delete fontStyle["lineHeight"];
76
- }
77
- return {
78
- ...fontStyle,
79
- ...buttonStyles,
80
- paddingHorizontal
81
- };
40
+ const inputSizeVariant = import_core.styled.dynamic((val = true, env) => {
41
+ const { frame } = (0, import_core.resolveSize)(val, env);
42
+ const fontStyle = (0, import_get_font_sized.getFontSized)(val, env);
43
+ return {
44
+ color: fontStyle?.color,
45
+ fontFamily: fontStyle?.fontFamily,
46
+ fontSize: fontStyle?.fontSize,
47
+ fontStyle: fontStyle?.fontStyle,
48
+ fontWeight: fontStyle?.fontWeight,
49
+ letterSpacing: fontStyle?.letterSpacing,
50
+ lineHeight: import_core.isWeb ? fontStyle?.lineHeight : void 0,
51
+ textTransform: fontStyle?.textTransform,
52
+ ...frame
53
+ };
54
+ });
55
+ const textAreaSizeVariant = import_core.styled.dynamic((val = true, env) => {
56
+ return {
57
+ ...inputSizeVariant(val, env),
58
+ height: "auto"
59
+ };
60
+ });
61
+ const resolveTextAreaSize = (props, env) => {
62
+ const sized = textAreaSizeVariant(props.size ?? true, env);
63
+ const fontStyle = (0, import_get_font_sized.getFontSized)(props.size ?? true, env);
64
+ const lines = props.rows ?? props.numberOfLines;
65
+ const height = typeof lines === "number" ? lines * (0, import_core.getVariableValue)(fontStyle?.lineHeight) : sized?.height;
66
+ return {
67
+ borderRadius: sized?.borderRadius,
68
+ color: sized?.color,
69
+ fontFamily: sized?.fontFamily,
70
+ fontSize: sized?.fontSize,
71
+ fontStyle: sized?.fontStyle,
72
+ fontWeight: sized?.fontWeight,
73
+ letterSpacing: sized?.letterSpacing,
74
+ lineHeight: sized?.lineHeight,
75
+ textTransform: sized?.textTransform,
76
+ paddingVertical: sized?.paddingVertical,
77
+ paddingHorizontal: sized?.paddingHorizontal,
78
+ height
79
+ };
82
80
  };
83
- const textAreaSizeVariant = (val = "$true", extras) => {
84
- const {
85
- props
86
- } = extras;
87
- const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras);
88
- const fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
89
- const lines = props.rows ?? props.numberOfLines;
90
- const height = typeof lines === "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto";
91
- if (!import_core2.isWeb && fontStyle) {
92
- delete fontStyle["lineHeight"];
93
- }
94
- const paddingVertical = (0, import_get_token.getSpace)(val, {
95
- shift: -2,
96
- bounds: [2]
97
- });
98
- const paddingHorizontal = (0, import_get_token.getSpace)(val, {
99
- shift: -1,
100
- bounds: [2]
101
- });
102
- return {
103
- ...buttonStyles,
104
- ...fontStyle,
105
- paddingVertical,
106
- paddingHorizontal,
107
- height
108
- };
81
+ const resolveMultilineInputSize = (props, env) => {
82
+ if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
83
+ return resolveTextAreaSize(props, env);
109
84
  };
110
85
  const INPUT_NAME = "Input";
111
86
  const styledBody = [{
112
- name: INPUT_NAME,
113
- render: "input",
114
- variants: {
115
- unstyled: {
116
- true: {
117
- // reset browser <input>/<textarea> defaults
118
- outlineWidth: 0,
119
- borderWidth: 0,
120
- backgroundColor: "transparent"
121
- },
122
- false: defaultStyles
123
- },
124
- size: {
125
- "...size": inputSizeVariant
126
- },
127
- disabled: {
128
- true: {}
129
- }
130
- },
131
- defaultVariants: {
132
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
133
- }
134
- }, {
135
- isInput: true,
136
- accept: {
137
- placeholderTextColor: "color",
138
- selectionColor: "color",
139
- cursorColor: "color",
140
- selectionHandleColor: "color",
141
- underlineColorAndroid: "color"
142
- },
143
- validStyles: import_core.Text.staticConfig.validStyles
144
- }];
87
+ name: INPUT_NAME,
88
+ render: "input",
89
+ ...defaultStyles,
90
+ variants: {
91
+ size: inputSizeVariant,
92
+ disabled: { true: {} }
93
+ }
94
+ }, { isInput: true }];