@tamagui/input 1.135.4 → 1.135.6

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.
@@ -36,7 +36,7 @@ __export(Input_exports, {
36
36
  module.exports = __toCommonJS(Input_exports);
37
37
  var import_core = require("@tamagui/core"),
38
38
  import_focusable = require("@tamagui/focusable"),
39
- import_react = __toESM(require("react")),
39
+ import_react = __toESM(require("react"), 1),
40
40
  import_shared = require("./shared.cjs"),
41
41
  import_jsx_runtime = require("react/jsx-runtime");
42
42
  const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]),
package/dist/cjs/Input.js CHANGED
@@ -25,7 +25,7 @@ __export(Input_exports, {
25
25
  Input: () => Input
26
26
  });
27
27
  module.exports = __toCommonJS(Input_exports);
28
- var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react = __toESM(require("react")), import_shared = require("./shared"), import_jsx_runtime = require("react/jsx-runtime");
28
+ var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react = __toESM(require("react"), 1), import_shared = require("./shared"), import_jsx_runtime = require("react/jsx-runtime");
29
29
  const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable((inProps, forwardedRef) => {
30
30
  const {
31
31
  // some of destructed props are just to avoid passing them to ...rest because they are not in web.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Input.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkE,0BAClE,mBAAkC,+BAClC,eAAwE,2BACxE,gBAA2B,qBAuKvB;AApKJ,MAAM,kBAAc,oBAAO,kBAAM,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GAMhD,QAAQ,YAAY,UAAsB,CAAC,SAAS,iBAAiB;AAChF,QAAM;AAAA;AAAA,IAE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;AAAA,QAAC;AAAA,MAChB,CAAC;AAAA,EACH,GAAG,CAAC,IAAI,QAAQ,CAAC,GAGf,4EAEI;AAAA,gDAAC,WACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASH;AAAA,IAGF,4CAAC,eAAY,KAAK,cAAe,GAAG,YAAY;AAAA,KAClD;AAEJ,CAAC;",
5
5
  "names": ["React"]
6
6
  }
@@ -1,120 +1,137 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
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);
24
34
  var Input_native_exports = {};
25
35
  __export(Input_native_exports, {
26
36
  Input: () => Input
27
37
  });
28
38
  module.exports = __toCommonJS(Input_native_exports);
29
- var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native"), import_shared = require("./shared"), StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable(function(inProps, forwardedRef) {
30
- var {
31
- // some of destructed props are just to avoid passing them to ...rest because they are not in native.
32
- type,
33
- //@ts-ignore
34
- dirname,
35
- max,
36
- min,
37
- minLength,
38
- multiple,
39
- name,
40
- required,
41
- step,
42
- disabled,
43
- id,
44
- caretColor,
45
- onChange,
46
- onInput,
47
- rows,
48
- enterKeyHint,
49
- returnKeyType,
50
- onKeyDown,
51
- inputMode,
52
- tag,
53
- ...rest
54
- } = inProps, ref = import_react.default.useRef(null), composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref), secureTextEntry = !1, cursorColor = caretColor, _returnKeyType = returnKeyType, _enterKeyHint = enterKeyHint;
55
- enterKeyHint === "go" && (_returnKeyType = "go", _enterKeyHint = void 0);
56
- var _inputMode = inputMode;
57
- type === "email" ? _inputMode = "email" : type === "tel" ? _inputMode = "tel" : type === "search" ? _inputMode = "search" : type === "url" ? _inputMode = "url" : type === "password" ? (secureTextEntry = !0, _inputMode = "text") : type === "number" ? _inputMode = "numeric" : _inputMode = "text";
58
- var showSoftInputOnFocus = !0;
59
- inputMode === "none" && (showSoftInputOnFocus = !1);
60
- var finalProps = {
61
- ...rest,
62
- inputMode: _inputMode,
63
- showSoftInputOnFocus,
64
- disabled,
65
- id,
66
- cursorColor,
67
- enterKeyHint: _enterKeyHint,
68
- returnKeyType: _returnKeyType,
69
- secureTextEntry,
70
- numberOfLines: rows || rest.numberOfLines
71
- };
72
- return tag === "textarea" && (finalProps.multiline = !0), onKeyDown && (finalProps.onKeyPress = function(e) {
73
- var { key } = e.nativeEvent;
74
- (key === "Backspace" || tag === "textarea" && key === "Enter" || key.length === 1) && onKeyDown({
75
- key,
76
- type: "keydown"
77
- });
78
- }, finalProps.onSubmitEditing = function(e) {
79
- onKeyDown({
80
- key: "Enter",
81
- type: "keydown"
82
- });
83
- }), (onChange || onInput) && (finalProps.onChange = function(e) {
84
- var { text } = e.nativeEvent;
85
- onChange && onChange({
86
- target: {
87
- value: text
88
- },
89
- type: "change"
90
- }), onInput != null && onInput({
91
- target: {
92
- value: text
93
- },
94
- type: "input"
95
- });
96
- }), import_react.default.useEffect(function() {
97
- if (id && !disabled)
98
- return (0, import_focusable.registerFocusable)(id, {
99
- focusAndSelect: function() {
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_react_native = require("react-native"),
44
+ import_shared = require("./shared.native.js"),
45
+ StyledInput = (0, import_core.styled)(import_react_native.TextInput, import_shared.styledBody[0], import_shared.styledBody[1]),
46
+ Input = StyledInput.styleable(function (inProps, forwardedRef) {
47
+ var {
48
+ // some of destructed props are just to avoid passing them to ...rest because they are not in native.
49
+ type,
50
+ //@ts-ignore
51
+ dirname,
52
+ max,
53
+ min,
54
+ minLength,
55
+ multiple,
56
+ name,
57
+ required,
58
+ step,
59
+ disabled,
60
+ id,
61
+ caretColor,
62
+ onChange,
63
+ onInput,
64
+ rows,
65
+ enterKeyHint,
66
+ returnKeyType,
67
+ onKeyDown,
68
+ inputMode,
69
+ tag,
70
+ ...rest
71
+ } = inProps,
72
+ ref = import_react.default.useRef(null),
73
+ composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref),
74
+ secureTextEntry = !1,
75
+ cursorColor = caretColor,
76
+ _returnKeyType = returnKeyType,
77
+ _enterKeyHint = enterKeyHint;
78
+ enterKeyHint === "go" && (_returnKeyType = "go", _enterKeyHint = void 0);
79
+ var _inputMode = inputMode;
80
+ 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";
81
+ var showSoftInputOnFocus = !0;
82
+ inputMode === "none" && (showSoftInputOnFocus = !1);
83
+ var finalProps = {
84
+ ...rest,
85
+ inputMode: _inputMode,
86
+ showSoftInputOnFocus,
87
+ disabled,
88
+ id,
89
+ cursorColor,
90
+ enterKeyHint: _enterKeyHint,
91
+ returnKeyType: _returnKeyType,
92
+ secureTextEntry,
93
+ numberOfLines: rows || rest.numberOfLines
94
+ };
95
+ return tag === "textarea" && (finalProps.multiline = !0), onKeyDown && (finalProps.onKeyPress = function (e) {
96
+ var {
97
+ key
98
+ } = e.nativeEvent;
99
+ (key === "Backspace" || tag === "textarea" && key === "Enter" || key.length === 1) && onKeyDown({
100
+ key,
101
+ type: "keydown"
102
+ });
103
+ }, finalProps.onSubmitEditing = function (e) {
104
+ onKeyDown({
105
+ key: "Enter",
106
+ type: "keydown"
107
+ });
108
+ }), (onChange || onInput) && (finalProps.onChange = function (e) {
109
+ var {
110
+ text
111
+ } = e.nativeEvent;
112
+ onChange && onChange({
113
+ target: {
114
+ value: text
115
+ },
116
+ type: "change"
117
+ }), onInput?.({
118
+ target: {
119
+ value: text
120
+ },
121
+ type: "input"
122
+ });
123
+ }), import_react.default.useEffect(function () {
124
+ if (id && !disabled) return (0, import_focusable.registerFocusable)(id, {
125
+ focusAndSelect: function () {
100
126
  var _ref_current;
101
127
  (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
102
128
  },
103
- focus: function() {
104
- }
129
+ focus: function () {}
105
130
  });
106
- }, [
107
- id,
108
- disabled
109
- ]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {
110
- onChange: function(e) {
111
- },
112
- ref: composedRefs,
113
- ...finalProps
131
+ }, [id, disabled]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
132
+ onChange: function (e) {},
133
+ ref: composedRefs,
134
+ ...finalProps
135
+ });
114
136
  });
115
- });
116
- // Annotate the CommonJS export names for ESM import in node:
117
- 0 && (module.exports = {
118
- Input
119
- });
120
137
  //# sourceMappingURL=Input.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Input.native.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B,8BAC5B,eAAkB,2BAClB,cAAwC,0BACxC,mBAAkC,+BAClC,sBAA0B,yBAC1B,gBAA2B,qBACvB,kBAAc,oBAAO,+BAAW,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GACrD,QAAQ,YAAY,UAAU,SAAS,SAAS,cAAc;AACrE,MAAI;AAAA;AAAA,IACJ;AAAA;AAAA,IACA;AAAA,IAAS;AAAA,IAAK;AAAA,IAAK;AAAA,IAAW;AAAA,IAAU;AAAA,IAAM;AAAA,IAAU;AAAA,IAAM;AAAA,IAAU;AAAA,IAAI;AAAA,IAAY;AAAA,IAAU;AAAA,IAAS;AAAA,IAAM;AAAA,IAAc;AAAA,IAAe;AAAA,IAAW;AAAA,IAAW;AAAA,IAAK,GAAG;AAAA,EAAK,IAAI,SACjL,MAAM,aAAAA,QAAM,OAAO,IAAI,GACvB,mBAA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B,QAAK,MACD;AACJ,iBAAO,oCAAkB,IAAI;AAAA,QACzB,gBAAgB,WAAW;AACvB,cAAI;AACJ,WAAC,eAAe,IAAI,aAAa,QAAQ,iBAAiB,UAAkB,aAAa,MAAM;AAAA,QACnG;AAAA,QACA,OAAO,WAAW;AAAA,QAAC;AAAA,MACvB,CAAC;AAAA,EACL,GAAG;AAAA,IACC;AAAA,IACA;AAAA,EACJ,CAAC,GACoB,uCAAAC,KAAK,aAAa;AAAA,IACnC,UAAU,SAAS,GAAG;AAAA,IAAC;AAAA,IACvB,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL,CAAC;",
5
- "names": ["React", "_jsx"]
6
- }
1
+ {"version":3,"names":["Input_native_exports","__export","Input","module","exports","__toCommonJS","import_jsx_runtime","require","import_react","__toESM","import_core","import_focusable","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","tag","rest","ref","default","useRef","composedRefs","useComposedRefs","secureTextEntry","cursorColor","_returnKeyType","_enterKeyHint","_inputMode","showSoftInputOnFocus","finalProps","numberOfLines","multiline","onKeyPress","e","key","nativeEvent","length","onSubmitEditing","text","target","value","useEffect","registerFocusable","focusAndSelect","_ref_current","current","focus","jsx"],"sources":["../../src/Input.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,oBAAA;AAAA,IAAAM,kBAAA,GAA4BC,OAAA;EAC5BC,YAAA,GAAkBC,OAAA,CAAAF,OAAA;EAClBG,WAAA,GAAwCH,OAAA;EACxCI,gBAAA,GAAkCJ,OAAA;EAClCK,mBAAA,GAA0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ACzBoC,cAAA,EAAgB,SAAAA,CAAA,EAAW;UACvB,IAAIC,YAAA;UACJ,CAACA,YAAA,GAAe1B,GAAA,CAAI2B,OAAA,MAAa,QAAQD,YAAA,KAAiB,UAAkBA,YAAA,CAAaE,KAAA,CAAM;QACnG;QACAA,KAAA,EAAO,SAAAA,CAAA,EAAW,CAAC;MACvB,CAAC;IACL,GAAG,CACCvC,EAAA,EACAD,QAAA,CACH,GACoB,mBAAAxB,kBAAA,CAAAiE,GAAA,EAAKzD,WAAA,EAAa;MACnCmB,QAAA,EAAU,SAAAA,CAASwB,CAAA,EAAG,CAAC;MACvBf,GAAA,EAAKG,YAAA;MACL,GAAGQ;IACP,CAAC;EACL,CAAC","ignoreList":[]}
@@ -1,47 +1,53 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var TextArea_exports = {};
17
24
  __export(TextArea_exports, {
18
25
  TextArea: () => TextArea
19
26
  });
20
27
  module.exports = __toCommonJS(TextArea_exports);
21
- var import_web = require("@tamagui/web"), import_Input = require("./Input"), import_shared = require("./shared"), TextArea = (0, import_web.styled)(import_Input.Input, {
22
- name: "TextArea",
23
- tag: "textarea",
24
- // this attribute fixes firefox newline issue
25
- // @ts-ignore
26
- whiteSpace: "pre-wrap",
27
- variants: {
28
- unstyled: {
29
- false: {
30
- height: "auto",
31
- ...import_shared.defaultStyles,
32
- numberOfLines: 3
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
+ tag: "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
33
47
  }
34
48
  },
35
- size: {
36
- "...size": import_shared.textAreaSizeVariant
49
+ defaultVariants: {
50
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
37
51
  }
38
- },
39
- defaultVariants: {
40
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
41
- }
42
- });
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- TextArea
46
- });
47
- //# sourceMappingURL=TextArea.js.map
52
+ });
53
+ //# sourceMappingURL=TextArea.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/TextArea.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAuB,yBACvB,eAAsB,oBACtB,gBAAmD,qBAIpC,eAAW,mBAAO,oBAAO;AAAA,EACpC,MAAM;AAAA,EACN,KAAK;AAAA;AAAA;AAAA,EAGL,YAAY;AAAA,EACZ,UAAU;AAAA,IACN,UAAU;AAAA,MACN,OAAO;AAAA,QACH,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,eAAe;AAAA,MACnB;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACF,WAAW;AAAA,IACf;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC/C;AACJ,CAAC;",
5
- "names": []
6
- }
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","tag","whiteSpace","variants","unstyled","false","height","defaultStyles","numberOfLines","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,GAAuBT,YAAA,CAAAK,gBACvB;AAOO,IAAAK,UAAM,GAAAC,OAAW,gBAAO;EAAAC,YAAA,GAAAD,OAAO;EAAAE,aAAA,GAAAF,OAAA;EAAAJ,QAAA,OAAAG,UAAA,CAAAI,MAAA,EAAAF,YAAA,CAAAG,KAAA;IACpCC,IAAA,EAAM;IACNC,GAAA,EAAK;IAAA;IAAA;IAILC,UAAA,EAAY;IAEZC,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACLC,MAAA,EAAQ;UACR,GAAGT,aAAA,CAAAU,aAAA;UACHC,aAAA,EAAe;QACjB;MACF;MAEAC,IAAA,EAAM;QACJ,WAAWZ,aAAA,CAAAa;MACb;IACF;IAEAC,eAAA,EAAiB;MACfP,QAAA,EAAUQ,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;IAC7C;EACF,CAAC","ignoreList":[]}
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from == "object" || typeof from == "function")
8
- for (let key of __getOwnPropNames(from))
9
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- return to;
11
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
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
+ });
12
+ return to;
13
+ },
14
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: !0
17
+ }), mod);
13
18
  var index_exports = {};
14
19
  module.exports = __toCommonJS(index_exports);
15
- __reExport(index_exports, require("./Input"), module.exports);
16
- __reExport(index_exports, require("./TextArea"), module.exports);
17
- // Annotate the CommonJS export names for ESM import in node:
18
- 0 && (module.exports = {
19
- ...require("./Input"),
20
- ...require("./TextArea")
21
- });
22
- //# sourceMappingURL=index.js.map
20
+ __reExport(index_exports, require("./Input.native.js"), module.exports);
21
+ __reExport(index_exports, require("./TextArea.native.js"), module.exports);
22
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,uBADd;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","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,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MADd,CAAAC,OAAA","ignoreList":[]}
@@ -1,18 +1,25 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var shared_exports = {};
17
24
  __export(shared_exports, {
18
25
  INPUT_NAME: () => INPUT_NAME,
@@ -22,68 +29,83 @@ __export(shared_exports, {
22
29
  textAreaSizeVariant: () => textAreaSizeVariant
23
30
  });
24
31
  module.exports = __toCommonJS(shared_exports);
25
- var import_core = require("@tamagui/core"), import_core2 = require("@tamagui/core"), import_get_button_sized = require("@tamagui/get-button-sized"), import_get_font_sized = require("@tamagui/get-font-sized"), import_get_token = require("@tamagui/get-token"), defaultStyles = {
26
- size: "$true",
27
- fontFamily: "$body",
28
- borderWidth: 1,
29
- outlineWidth: 0,
30
- color: "$color",
31
- ...import_core2.isWeb ? {
32
- tabIndex: 0
33
- } : {
34
- focusable: !0
32
+ var import_core = require("@tamagui/core"),
33
+ import_core2 = require("@tamagui/core"),
34
+ import_get_button_sized = require("@tamagui/get-button-sized"),
35
+ import_get_font_sized = require("@tamagui/get-font-sized"),
36
+ import_get_token = require("@tamagui/get-token"),
37
+ 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: !0
47
+ }),
48
+ borderColor: "$borderColor",
49
+ backgroundColor: "$background",
50
+ // this fixes a flex bug where it overflows container
51
+ minWidth: 0,
52
+ hoverStyle: {
53
+ borderColor: "$borderColorHover"
54
+ },
55
+ focusStyle: {
56
+ borderColor: "$borderColorFocus"
57
+ },
58
+ focusVisibleStyle: {
59
+ outlineColor: "$outlineColor",
60
+ outlineWidth: 2,
61
+ outlineStyle: "solid"
62
+ }
35
63
  },
36
- borderColor: "$borderColor",
37
- backgroundColor: "$background",
38
- // this fixes a flex bug where it overflows container
39
- minWidth: 0,
40
- hoverStyle: {
41
- borderColor: "$borderColorHover"
64
+ inputSizeVariant = function () {
65
+ var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true",
66
+ extras = arguments.length > 1 ? arguments[1] : void 0;
67
+ if (extras.props.multiline || extras.props.numberOfLines > 1) return textAreaSizeVariant(val, extras);
68
+ var buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
69
+ paddingHorizontal = (0, import_get_token.getSpace)(val, {
70
+ shift: -1,
71
+ bounds: [2]
72
+ }),
73
+ fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
74
+ return !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight, {
75
+ ...fontStyle,
76
+ ...buttonStyles,
77
+ paddingHorizontal
78
+ };
42
79
  },
43
- focusStyle: {
44
- borderColor: "$borderColorFocus"
80
+ textAreaSizeVariant = function () {
81
+ var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true",
82
+ extras = arguments.length > 1 ? arguments[1] : void 0,
83
+ {
84
+ props
85
+ } = extras,
86
+ buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras),
87
+ fontStyle = (0, import_get_font_sized.getFontSized)(val, extras),
88
+ _props_rows,
89
+ lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines,
90
+ height = typeof lines == "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto",
91
+ paddingVertical = (0, import_get_token.getSpace)(val, {
92
+ shift: -2,
93
+ bounds: [2]
94
+ }),
95
+ paddingHorizontal = (0, import_get_token.getSpace)(val, {
96
+ shift: -1,
97
+ bounds: [2]
98
+ });
99
+ return {
100
+ ...buttonStyles,
101
+ ...fontStyle,
102
+ paddingVertical,
103
+ paddingHorizontal,
104
+ height
105
+ };
45
106
  },
46
- focusVisibleStyle: {
47
- outlineColor: "$outlineColor",
48
- outlineWidth: 2,
49
- outlineStyle: "solid"
50
- }
51
- }, inputSizeVariant = function() {
52
- var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0;
53
- if (extras.props.multiline || extras.props.numberOfLines > 1)
54
- return textAreaSizeVariant(val, extras);
55
- var buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), paddingHorizontal = (0, import_get_token.getSpace)(val, {
56
- shift: -1,
57
- bounds: [
58
- 2
59
- ]
60
- }), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
61
- return !import_core2.isWeb && fontStyle && delete fontStyle.lineHeight, {
62
- ...fontStyle,
63
- ...buttonStyles,
64
- paddingHorizontal
65
- };
66
- }, textAreaSizeVariant = function() {
67
- var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0, { props } = extras, buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras), _props_rows, lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines, height = typeof lines == "number" ? lines * (0, import_core2.getVariableValue)(fontStyle.lineHeight) : "auto", paddingVertical = (0, import_get_token.getSpace)(val, {
68
- shift: -2,
69
- bounds: [
70
- 2
71
- ]
72
- }), paddingHorizontal = (0, import_get_token.getSpace)(val, {
73
- shift: -1,
74
- bounds: [
75
- 2
76
- ]
77
- });
78
- return {
79
- ...buttonStyles,
80
- ...fontStyle,
81
- paddingVertical,
82
- paddingHorizontal,
83
- height
84
- };
85
- }, INPUT_NAME = "Input", styledBody = [
86
- {
107
+ INPUT_NAME = "Input",
108
+ styledBody = [{
87
109
  name: INPUT_NAME,
88
110
  tag: "input",
89
111
  variants: {
@@ -100,22 +122,12 @@ var import_core = require("@tamagui/core"), import_core2 = require("@tamagui/cor
100
122
  defaultVariants: {
101
123
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
102
124
  }
103
- },
104
- {
125
+ }, {
105
126
  isInput: !0,
106
127
  accept: {
107
128
  placeholderTextColor: "color",
108
129
  selectionColor: "color"
109
130
  },
110
131
  validStyles: import_core.Text.staticConfig.validStyles
111
- }
112
- ];
113
- // Annotate the CommonJS export names for ESM import in node:
114
- 0 && (module.exports = {
115
- INPUT_NAME,
116
- defaultStyles,
117
- inputSizeVariant,
118
- styledBody,
119
- textAreaSizeVariant
120
- });
121
- //# sourceMappingURL=shared.js.map
132
+ }];
133
+ //# sourceMappingURL=shared.native.js.map