@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
@@ -1,111 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var shared_exports = {};
16
- __export(shared_exports, {
17
- INPUT_NAME: () => INPUT_NAME,
18
- defaultStyles: () => defaultStyles,
19
- inputSizeVariant: () => inputSizeVariant,
20
- styledBody: () => styledBody,
21
- textAreaSizeVariant: () => textAreaSizeVariant
22
- });
23
- module.exports = __toCommonJS(shared_exports);
24
- 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");
25
- const 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
35
- },
36
- borderColor: "$borderColor",
37
- backgroundColor: "$background",
38
- // this fixes a flex bug where it overflows container
39
- minWidth: 0,
40
- hoverStyle: {
41
- borderColor: "$borderColorHover"
42
- },
43
- focusStyle: {
44
- borderColor: "$borderColorFocus"
45
- },
46
- focusVisibleStyle: {
47
- outlineColor: "$outlineColor",
48
- outlineWidth: 2,
49
- outlineStyle: "solid"
50
- }
51
- }, inputSizeVariant = (val = "$true", extras) => {
52
- if (extras.props.tag === "textarea" || extras.props.rows > 1 || extras.props.multiline || extras.props.numberOfLines > 1)
53
- return textAreaSizeVariant(val, extras);
54
- const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), paddingHorizontal = (0, import_get_token.getSpace)(val, {
55
- shift: -1,
56
- bounds: [2]
57
- }), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
58
- return !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight, {
59
- ...fontStyle,
60
- ...buttonStyles,
61
- paddingHorizontal
62
- };
63
- }, textAreaSizeVariant = (val = "$true", extras) => {
64
- const { props } = extras, buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras), lines = props.rows ?? props.numberOfLines, height = typeof lines == "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto";
65
- !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight;
66
- const paddingVertical = (0, import_get_token.getSpace)(val, {
67
- shift: -2,
68
- bounds: [2]
69
- }), paddingHorizontal = (0, import_get_token.getSpace)(val, {
70
- shift: -1,
71
- bounds: [2]
72
- });
73
- return {
74
- ...buttonStyles,
75
- ...fontStyle,
76
- paddingVertical,
77
- paddingHorizontal,
78
- height
79
- };
80
- }, INPUT_NAME = "Input", styledBody = [
81
- {
82
- name: INPUT_NAME,
83
- render: "input",
84
- variants: {
85
- unstyled: {
86
- false: defaultStyles
87
- },
88
- size: {
89
- "...size": inputSizeVariant
90
- },
91
- disabled: {
92
- true: {}
93
- }
94
- },
95
- defaultVariants: {
96
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
97
- }
98
- },
99
- {
100
- isInput: !0,
101
- accept: {
102
- placeholderTextColor: "color",
103
- selectionColor: "color",
104
- cursorColor: "color",
105
- selectionHandleColor: "color",
106
- underlineColorAndroid: "color"
107
- },
108
- validStyles: import_core.Text.staticConfig.validSty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KAAK,MAAM,GACzC,gBAAY,oCAAa,KAAY,MAAM,GAC3C,QAAQ,MAAM,QAAQ,MAAM,eAC5B,SACJ,OAAO,SAAU,WAAW,YAAQ,+BAAiB,UAAU,UAAU,IAAI;AAE/E,EAAI,CAAC,sBAAS,aACZ,OAAO,UAAU;AAEnB,QAAM,sBAAkB,2BAAS,KAAK;AAAA,IACpC,OAAO;AAAA,IACP,QAAQ,CAAC,CAAC;AAAA,EACZ,CAAC,GACK,wBAAoB,2BAAS,KAAK;AAAA,IACtC,OAAO;AAAA,IACP,QAAQ,CAAC,CAAC;AAAA,EACZ,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GACa,aAAa,SAEb,aAAa;AAAA,EACxB;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,UAAU;AAAA,QACR,OAAO;AAAA,MACT;AAAA,MAEA,MAAM;AAAA,QACJ,WAAW;AAAA,MACb;AAAA,MAEA,UAAU;AAAA,QACR,MAAM,CAAC;AAAA,MACT;AAAA,IACF;AAAA,IAEA,iBAAiB;AAAA,MACf,UAAU,QAAQ,IAAI,qBAAqB;AAAA,IAC7C;AAAA,EACF;AAAA,EAEA;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,MACN,sBAAsB;AAAA,MACtB,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,sBAAsB;AAAA,MACtB,uBAAuB;AAAA,IACzB;AAAA,IAEA,aAAa,iBAAK,aAAa;AAAA,EACjC;AACF;",
5
- "names": ["import_core"]
6
- }
package/dist/cjs/types.js DELETED
@@ -1,14 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- };
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var types_exports = {};
13
- module.exports = __toCommonJS(types_exports);
14
- //# sourceMappingURL=types.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/types.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;",
5
- "names": []
6
- }
@@ -1,171 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var Input_exports = {};
24
- __export(Input_exports, {
25
- Input: () => Input
26
- });
27
- module.exports = __toCommonJS(Input_exports);
28
- var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_element = require("@tamagui/element"), import_react = __toESM(require("react"), 1), import_shared = require("../shared"), import_jsx_runtime = require("react/jsx-runtime");
29
- const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable((inProps, forwardedRef) => {
30
- const {
31
- // some of destructed props are just to avoid passing them to ...rest because they are not in web.
32
- allowFontScaling,
33
- selectTextOnFocus,
34
- showSoftInputOnFocus,
35
- textContentType,
36
- passwordRules,
37
- textBreakStrategy,
38
- underlineColorAndroid,
39
- selection,
40
- lineBreakStrategyIOS,
41
- returnKeyLabel,
42
- disabled,
43
- onSubmitEditing,
44
- caretHidden,
45
- clearButtonMode,
46
- clearTextOnFocus,
47
- contextMenuHidden,
48
- dataDetectorTypes,
49
- id,
50
- enablesReturnKeyAutomatically,
51
- importantForAutofill,
52
- inlineImageLeft,
53
- inlineImagePadding,
54
- inputAccessoryViewID,
55
- keyboardAppearance,
56
- keyboardType,
57
- cursorColor,
58
- disableFullscreenUI,
59
- editable,
60
- maxFontSizeMultiplier,
61
- multiline,
62
- numberOfLines,
63
- onChangeText,
64
- onContentSizeChange,
65
- onEndEditing,
66
- onScroll,
67
- onSelectionChange,
68
- // @ts-ignore
69
- caretColor,
70
- placeholderTextColor,
71
- blurOnSubmit,
72
- enterKeyHint,
73
- returnKeyType,
74
- rejectResponderTermination,
75
- scrollEnabled,
76
- secureTextEntry,
77
- selectionColor,
78
- inputMode,
79
- ...rest
80
- } = inProps, { ref, composedRef } = (0, import_element.useWebRef)(forwardedRef), theme = (0, import_core.useTheme)(), _onSelectionChange = (0, import_core.useEvent)(() => {
81
- const start = ref.current?.selectionStart ?? 0, end = ref.current?.selectionEnd ?? 0;
82
- onSelectionChange?.({
83
- nativeEvent: {
84
- selection: {
85
- end,
86
- start
87
- }
88
- }
89
- });
90
- });
91
- import_react.default.useEffect(() => {
92
- if (onSelectionChange)
93
- return ref.current?.addEventListener("selectionchange", _onSelectionChange), () => {
94
- ref.current?.removeEventListener("selectionchange", _onSelectionChange);
95
- };
96
- }, []), import_react.default.useEffect(() => {
97
- selection && ref.current?.setSelectionRange(selection.start || null, selection.end || null);
98
- }, [selection?.start, selection?.end]);
99
- const finalProps = {
100
- ...rest,
101
- disabled,
102
- caretColor,
103
- id,
104
- enterKeyHint,
105
- type: (() => {
106
- if (rest?.type) return rest.type;
107
- if (secureTextEntry) return "password";
108
- switch (keyboardType) {
109
- case "number-pad":
110
- case "numeric":
111
- return "number";
112
- case "email-address":
113
- return "email";
114
- case "phone-pad":
115
- return "tel";
116
- case "url":
117
- return "url";
118
- default:
119
- return "text";
120
- }
121
- })(),
122
- inputMode: (() => {
123
- switch (keyboardType) {
124
- case "number-pad":
125
- case "numeric":
126
- return "numeric";
127
- case "decimal-pad":
128
- return "decimal";
129
- case "email-address":
130
- return "email";
131
- case "phone-pad":
132
- return "tel";
133
- case "url":
134
- return "url";
135
- default:
136
- return;
137
- }
138
- })(),
139
- style: {
140
- ...rest.style,
141
- ...placeholderTextColor && {
142
- "--placeholderColor": theme[placeholderTextColor]?.variable || placeholderTextColor
143
- },
144
- ...selectionColor && {
145
- "--selectionBackground": theme[selectionColor]?.variable || selectionColor
146
- }
147
- }
148
- };
149
- return import_react.default.useEffect(() => {
150
- if (id && !disabled)
151
- return (0, import_focusable.registerFocusable)(id, {
152
- focusAndSelect: () => {
153
- ref.current?.focus();
154
- },
155
- focus: () => {
156
- }
157
- });
158
- }, [id, disabled]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `
160
- input::selection, textarea::selection {
161
- background-color: var(--selectionBackground) !important;
162
- }
163
-
164
- input::placeholder, textarea::placeholder {
165
- color: var(--placeholderColor) !important;
166
- }
167
- ` }),
168
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, { ref: composedRef, ...finalProps })
169
- ] });
170
- });
171
- //# sourceMappingURL=Input.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/Input.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiD,0BACjD,mBAAkC,+BAClC,iBAA0B,6BAC1B,eAAwE,8BACxE,gBAA2B,sBAuKvB;AApKJ,MAAM,kBAAc,oBAAO,kBAAM,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GAOhD,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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI,SAEE,EAAE,KAAK,YAAY,QAAI,0BAA4B,YAAY,GAC/D,YAAQ,sBAAS,GAEjB,yBAAqB,sBAAS,MAAM;AACxC,UAAM,QAAQ,IAAI,SAAS,kBAAkB,GACvC,MAAM,IAAI,SAAS,gBAAgB;AACzC,wBAAoB;AAAA,MAClB,aAAa;AAAA,QACX,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,MACF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EA,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,aAAc,GAAG,YAAY;AAAA,KACjD;AAEJ,CAAC;",
5
- "names": ["React"]
6
- }
@@ -1,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var TextArea_exports = {};
16
- __export(TextArea_exports, {
17
- TextArea: () => TextArea
18
- });
19
- module.exports = __toCommonJS(TextArea_exports);
20
- var import_web = require("@tamagui/web"), import_Input = require("./Input"), import_shared = require("../shared");
21
- const TextArea = (0, import_web.styled)(import_Input.Input, {
22
- name: "TextArea",
23
- render: "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
33
- }
34
- },
35
- size: {
36
- "...size": import_shared.textAreaSizeVariant
37
- }
38
- },
39
- defaultVariants: {
40
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
41
- }
42
- });
43
- //# sourceMappingURL=TextArea.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/TextArea.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAuB,yBACvB,eAAsB,oBACtB,gBAAmD;AAO5C,MAAM,eAAW,mBAAO,oBAAO;AAAA,EACpC,MAAM;AAAA,EACN,QAAQ;AAAA;AAAA;AAAA,EAIR,YAAY;AAAA,EAEZ,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC7C;AACF,CAAC;",
5
- "names": []
6
- }
@@ -1,16 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var v1_exports = {};
13
- module.exports = __toCommonJS(v1_exports);
14
- __reExport(v1_exports, require("./Input"), module.exports);
15
- __reExport(v1_exports, require("./TextArea"), module.exports);
16
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,uBAAc,oBAAd;AACA,uBAAc,uBADd;",
5
- "names": []
6
- }
@@ -1,14 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- };
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var types_exports = {};
13
- module.exports = __toCommonJS(types_exports);
14
- //# sourceMappingURL=types.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/types.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;",
5
- "names": []
6
- }
package/dist/esm/Input.js DELETED
@@ -1,124 +0,0 @@
1
- import { View, styled, useTheme } from "@tamagui/core";
2
- import { registerFocusable } from "@tamagui/focusable";
3
- import { useWebRef } from "@tamagui/element";
4
- import React from "react";
5
- import { styledBody } from "./shared";
6
- import { jsx } from "react/jsx-runtime";
7
- const StyledInput = styled(View, styledBody[0], styledBody[1]), Input = StyledInput.styleable((props, _forwardedRef) => {
8
- const {
9
- disabled,
10
- id,
11
- onChangeText,
12
- onSubmitEditing,
13
- onSelectionChange,
14
- selection,
15
- placeholderTextColor,
16
- selectionColor,
17
- rows,
18
- // Native-only props (ignored on web)
19
- keyboardAppearance,
20
- returnKeyType,
21
- submitBehavior,
22
- blurOnSubmit,
23
- caretHidden,
24
- contextMenuHidden,
25
- selectTextOnFocus,
26
- secureTextEntry,
27
- maxFontSizeMultiplier,
28
- allowFontScaling,
29
- multiline,
30
- keyboardType,
31
- autoCapitalize: autoCapitalizeProp,
32
- autoCorrect: autoCorrectProp,
33
- autoFocusNative,
34
- textContentType,
35
- onEndEditing,
36
- onContentSizeChange,
37
- onScroll,
38
- onKeyPress,
39
- // iOS-only props (ignored on web)
40
- clearButtonMode,
41
- clearTextOnFocus,
42
- enablesReturnKeyAutomatically,
43
- dataDetectorTypes,
44
- scrollEnabled,
45
- passwordRules,
46
- rejectResponderTermination,
47
- spellCheck,
48
- lineBreakStrategyIOS,
49
- lineBreakModeIOS,
50
- smartInsertDelete,
51
- inputAccessoryViewID,
52
- inputAccessoryViewButtonLabel,
53
- disableKeyboardShortcuts,
54
- // Android-only props (ignored on web)
55
- cursorColor,
56
- selectionHandleColor,
57
- underlineColorAndroid,
58
- importantForAutofill,
59
- disableFullscreenUI,
60
- inlineImageLeft,
61
- inlineImagePadding,
62
- returnKeyLabel,
63
- textBreakStrategy,
64
- textAlignVertical,
65
- verticalAlign,
66
- showSoftInputOnFocus,
67
- numberOfLines,
68
- ...rest
69
- } = props, { ref, composedRef } = useWebRef(_forwardedRef), theme = useTheme(), autoCorrect = autoCorrectProp === !0 ? "on" : autoCorrectProp === !1 ? "off" : autoCorrectProp, autoCapitalize = autoCapitalizeProp === "sentences" || autoCapitalizeProp === "words" ? "on" : autoCapitalizeProp === "none" || autoCapitalizeProp === "characters" ? "off" : autoCapitalizeProp;
70
- React.useEffect(() => {
71
- if (!onSelectionChange) return;
72
- const node = ref.current;
73
- if (!node) return;
74
- const handleSelectionChange = () => {
75
- onSelectionChange({
76
- nativeEvent: {
77
- selection: {
78
- start: node.selectionStart ?? 0,
79
- end: node.selectionEnd ?? 0
80
- }
81
- }
82
- });
83
- };
84
- return node.addEventListener("select", handleSelectionChange), () => node.removeEventListener("select", handleSelectionChange);
85
- }, [onSelectionChange]), React.useEffect(() => {
86
- selection && ref.current && ref.current.setSelectionRange(selection.start, selection.end ?? selection.start);
87
- }, [selection?.start, selection?.end]), React.useEffect(() => {
88
- if (!(!id || disabled))
89
- return registerFocusable(id, {
90
- focusAndSelect: () => ref.current?.focus(),
91
- focus: () => ref.current?.focus()
92
- });
93
- }, [id, disabled]);
94
- const handleKeyDown = (e) => {
95
- e.key === "Enter" && onSubmitEditing && onSubmitEditing({
96
- nativeEvent: { text: e.target.value }
97
- }), rest.onKeyDown?.(e);
98
- }, handleChange = (e) => {
99
- onChangeText?.(e.target.value), rest.onChange?.(e);
100
- }, finalProps = {
101
- ...rest,
102
- disabled,
103
- id,
104
- rows,
105
- autoCorrect,
106
- autoCapitalize,
107
- onKeyDown: onSubmitEditing ? handleKeyDown : rest.onKeyDown,
108
- onChange: onChangeText ? handleChange : rest.onChange,
109
- style: {
110
- ...rest.style,
111
- ...placeholderTextColor && {
112
- "--placeholderColor": theme[placeholderTextColor]?.variable || placeholderTextColor
113
- },
114
- ...selectionColor && {
115
- "--selectionColor": theme[selectionColor]?.variable || selectionColor
116
- }
117
- }
118
- };
119
- return /* @__PURE__ */ jsx(StyledInput, { ref: composedRef, ...finalProps });
120
- });
121
- export {
122
- Input
123
- };
124
- //# sourceMappingURL=Input.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Input.tsx"],
4
- "mappings": "AAAA,SAAS,MAAM,QAAQ,gBAAgB;AACvC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,OAAO,WAAW;AAClB,SAAS,kBAAkB;AAqKlB;AAlKT,MAAM,cAAc,OAAO,MAAM,WAAW,CAAC,GAAG,WAAW,CAAC,CAAC,GAMhD,QAAQ,YAAY,UAAsB,CAAC,OAAO,kBAAkB;AAC/E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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"mappings": "",
5
- "names": []
6
- }
@@ -1,29 +0,0 @@
1
- import { styled } from "@tamagui/web";
2
- import { Input } from "./Input";
3
- import { defaultStyles, textAreaSizeVariant } from "./shared";
4
- const TextArea = styled(Input, {
5
- name: "TextArea",
6
- render: "textarea",
7
- // this attribute fixes firefox newline issue
8
- // @ts-ignore
9
- whiteSpace: "pre-wrap",
10
- variants: {
11
- unstyled: {
12
- false: {
13
- height: "auto",
14
- ...defaultStyles,
15
- rows: 3
16
- }
17
- },
18
- size: {
19
- "...size": textAreaSizeVariant
20
- }
21
- },
22
- defaultVariants: {
23
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
24
- }
25
- });
26
- export {
27
- TextArea
28
- };
29
- //# sourceMappingURL=TextArea.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/TextArea.tsx"],
4
- "mappings": "AAAA,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,eAAe,2BAA2B;AAQ5C,MAAM,WAAW,OAAO,OAAO;AAAA,EACpC,MAAM;AAAA,EACN,QAAQ;AAAA;AAAA;AAAA,EAIR,YAAY;AAAA,EAEZ,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC7C;AACF,CAAC;",
5
- "names": []
6
- }