@tamagui/input 1.135.4 → 1.135.5

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.
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/shared.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB,0BACrBA,eAAwC,0BACxC,0BAA+B,sCAC/B,wBAA6B,oCAC7B,mBAAyB,+BACd,gBAAgB;AAAA,EACvB,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,cAAc;AAAA,EACd,OAAO;AAAA,EACP,GAAG,qBAAQ;AAAA,IACP,UAAU;AAAA,EACd,IAAI;AAAA,IACA,WAAW;AAAA,EACf;AAAA,EACA,aAAa;AAAA,EACb,iBAAiB;AAAA;AAAA,EAEjB,UAAU;AAAA,EACV,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,mBAAmB;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd,cAAc;AAAA,EAClB;AACJ,GACW,mBAAmB,WAAW;AACrC,MAAI,MAAM,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI,SAAS,SAAS,UAAU,SAAS,IAAI,UAAU,CAAC,IAAI;AACnI,MAAI,OAAO,MAAM,aAAa,OAAO,MAAM,gBAAgB;AACvD,WAAO,oBAAoB,KAAK,MAAM;AAE1C,MAAI,mBAAe,wCAAe,KAAK,MAAM,GACzC,wBAAoB,2BAAS,KAAK;AAAA,IAClC,OAAO;AAAA,IACP,QAAQ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ,CAAC,GACG,gBAAY,oCAAa,KAAK,MAAM;AAExC,SAAI,CAAC,sBAAS,aACV,OAAO,UAAU,YAEd;AAAA,IACH,GAAG;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ommonJS","mod","__copyProps","__defProp","value","shared_exports","__export","INPUT_NAME","defaultStyles","inputSizeVariant","styledBody","textAreaSizeVariant","module","exports","import_core","require","import_core2","import_get_button_sized","import_get_font_sized","import_get_token","size","fontFamily","borderWidth","outlineWidth","color","isWeb","tabIndex","focusable","borderColor","backgroundColor","minWidth","hoverStyle","focusStyle","focusVisibleStyle","outlineColor","outlineStyle","val","arguments","length","extras","props","multiline","numberOfLines","buttonStyles","getButtonSized","paddingHorizontal","getSpace","shift","bounds","fontStyle","getFontSized","lineHeight","_props_rows","lines","rows","height","getVariableValue","paddingVertical","name","tag","variants","unstyled","false","disabled","true","defaultVariants","process","env","TAMAGUI_HEADLESS","isInput"],"sources":["../../src/shared.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAb,YAAqB,CAAAK,cACrB;AAKO,IAAAS,WAAM,GAAAC,OAAgB;EAAAC,YAAA,GAAAD,OAAA;EAAAE,uBAAA,GAAAF,OAAA;EAAAG,qBAAA,GAAAH,OAAA;EAAAI,gBAAA,GAAAJ,OAAA;EAAAP,aAAA;IAC3BY,IAAA,EAAM;IACNC,UAAA,EAAY;IACZC,WAAA,EAAa;IACbC,YAAA,EAAc;IACdC,KAAA,EAAO;IAEP,IAAIR,YAAA,CAAAS,KAAA,GACA;MACEC,QAAA,EAAU;IACZ,IACA;MACEC,SAAA,EAAW;IACb;IAEJC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AAA,CAAAgC,YAAA,EAAAd,GAAA,EAAAG,MAAA;MAAAa,WAAA;MAAAC,KAAA,IAAAD,WAAA,GAAAZ,KAAA,CAAAc,IAAA,cAAAF,WAAA,cAAAA,WAAA,GAAAZ,KAAA,CAAAE,aAAA;MAAAa,MAAA,UAAAF,KAAA,eAAAA,KAAA,OAAArC,YAAA,CAAAwC,gBAAA,EAAAP,SAAA,CAAAE,UAAA;MAAAM,eAAA,OAAAtC,gBAAA,CAAA2B,QAAA,EAAAV,GAAA;QACtCW,KAAA,EAAO;QACPC,MAAA,EAAQ,CACT;MACM,EACL;MAAAH,iBAAG,OAAA1B,gBAAA,CAAA2B,QAAA,EAAAV,GAAA;QACHW,KAAG;QACHC,MAAA,GACA;MAEF;IACF,OACa;MAGX,GAAAL,YAAA;MACE,GAAAM,SAAM;MACNQ,eAAK;MACLZ,iBAAU;MAAAU;IACE;EACD;EAAAhD,UACT;EAAAG,UAAA;IAEMgD,IACJ,EAAAnD,UAAW;IAAAoD,GACb;IAAAC,QAEA;MAAUC,QACF,EAAC;QACTC,KAAA,EAAAtD;MACF;MAEAY,IAAA;QACE,SAAU,EAAAX;MACZ;MACFsD,QAAA;QAEAC,IAAA;MACE;IACA;IAAQC,eACN;MACAJ,QAAA,EAAAK,OAAgB,CAAAC,GAAA,CAAAC,gBAAA;IAClB;EAAA,GAGF;IACFC,OAAA","ignoreList":[]}
@@ -1,15 +1,19 @@
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 });
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
+ });
10
12
  return to;
11
13
  };
12
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
14
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
+ value: !0
16
+ }), mod);
13
17
  var types_exports = {};
14
18
  module.exports = __toCommonJS(types_exports);
15
- //# sourceMappingURL=types.js.map
19
+ //# sourceMappingURL=types.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/types.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
@@ -1,97 +1,137 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from "react";
3
- import { styled, useComposedRefs } from "@tamagui/core";
4
- import { registerFocusable } from "@tamagui/focusable";
5
- import { TextInput } from "react-native";
6
- import { styledBody } from "./shared";
7
- var StyledInput = styled(TextInput, styledBody[0], styledBody[1]), Input = StyledInput.styleable(function(inProps, forwardedRef) {
8
- var {
9
- // some of destructed props are just to avoid passing them to ...rest because they are not in native.
10
- type,
11
- //@ts-ignore
12
- dirname,
13
- max,
14
- min,
15
- minLength,
16
- multiple,
17
- name,
18
- required,
19
- step,
20
- disabled,
21
- id,
22
- caretColor,
23
- onChange,
24
- onInput,
25
- rows,
26
- enterKeyHint,
27
- returnKeyType,
28
- onKeyDown,
29
- inputMode,
30
- tag,
31
- ...rest
32
- } = inProps, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), secureTextEntry = !1, cursorColor = caretColor, _returnKeyType = returnKeyType, _enterKeyHint = enterKeyHint;
33
- enterKeyHint === "go" && (_returnKeyType = "go", _enterKeyHint = void 0);
34
- var _inputMode = inputMode;
35
- 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";
36
- var showSoftInputOnFocus = !0;
37
- inputMode === "none" && (showSoftInputOnFocus = !1);
38
- var finalProps = {
39
- ...rest,
40
- inputMode: _inputMode,
41
- showSoftInputOnFocus,
42
- disabled,
43
- id,
44
- cursorColor,
45
- enterKeyHint: _enterKeyHint,
46
- returnKeyType: _returnKeyType,
47
- secureTextEntry,
48
- numberOfLines: rows || rest.numberOfLines
49
- };
50
- return tag === "textarea" && (finalProps.multiline = !0), onKeyDown && (finalProps.onKeyPress = function(e) {
51
- var { key } = e.nativeEvent;
52
- (key === "Backspace" || tag === "textarea" && key === "Enter" || key.length === 1) && onKeyDown({
53
- key,
54
- type: "keydown"
55
- });
56
- }, finalProps.onSubmitEditing = function(e) {
57
- onKeyDown({
58
- key: "Enter",
59
- type: "keydown"
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
60
13
  });
61
- }), (onChange || onInput) && (finalProps.onChange = function(e) {
62
- var { text } = e.nativeEvent;
63
- onChange && onChange({
64
- target: {
65
- value: text
66
- },
67
- type: "change"
68
- }), onInput != null && onInput({
69
- target: {
70
- value: text
71
- },
72
- type: "input"
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
73
19
  });
74
- }), React.useEffect(function() {
75
- if (id && !disabled)
76
- return registerFocusable(id, {
77
- focusAndSelect: function() {
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
34
+ var Input_native_exports = {};
35
+ __export(Input_native_exports, {
36
+ Input: () => Input
37
+ });
38
+ module.exports = __toCommonJS(Input_native_exports);
39
+ var import_jsx_runtime = require("react/jsx-runtime"),
40
+ import_react = __toESM(require("react"), 1),
41
+ import_core = require("@tamagui/core"),
42
+ import_focusable = require("@tamagui/focusable"),
43
+ import_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 () {
78
126
  var _ref_current;
79
127
  (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
80
128
  },
81
- focus: function() {
82
- }
129
+ focus: function () {}
83
130
  });
84
- }, [
85
- id,
86
- disabled
87
- ]), /* @__PURE__ */ _jsx(StyledInput, {
88
- onChange: function(e) {
89
- },
90
- ref: composedRefs,
91
- ...finalProps
131
+ }, [id, disabled]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
132
+ onChange: function (e) {},
133
+ ref: composedRefs,
134
+ ...finalProps
135
+ });
92
136
  });
93
- });
94
- export {
95
- Input
96
- };
97
137
  //# sourceMappingURL=Input.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Input.native.tsx"],
4
- "mappings": "AAAA,SAAS,OAAO,YAAY;AAC5B,OAAO,WAAW;AAClB,SAAS,QAAQ,uBAAuB;AACxC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,IAAI,cAAc,OAAO,WAAW,WAAW,CAAC,GAAG,WAAW,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,MAAM,OAAO,IAAI,GACvB,eAAe,gBAAgB,cAAc,GAAG,GAEhD,kBAAkB,IAClB,cAAc,YACd,iBAAiB,eACjB,gBAAgB;AACpB,EAAI,iB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I,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,qBAAK,aAAa;AAAA,IACnC,UAAU,SAAS,GAAG;AAAA,IAAC;AAAA,IACvB,KAAK;AAAA,IACL,GAAG;AAAA,EACP,CAAC;AACL,CAAC;",
5
- "names": []
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,GAA0BL,OAAA;EAC1BM,aAAA,GAA2BN,OAAA;EACvBO,WAAA,OAAcJ,WAAA,CAAAK,MAAA,EAAOH,mBAAA,CAAAI,SAAA,EAAWH,aAAA,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AAA,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,29 +1,53 @@
1
- import { styled } from "@tamagui/web";
2
- import { Input } from "./Input";
3
- import { defaultStyles, textAreaSizeVariant } from "./shared";
4
- var TextArea = styled(Input, {
5
- name: "TextArea",
6
- tag: "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
- numberOfLines: 3
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: !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);
23
+ var TextArea_exports = {};
24
+ __export(TextArea_exports, {
25
+ TextArea: () => TextArea
26
+ });
27
+ module.exports = __toCommonJS(TextArea_exports);
28
+ var import_web = require("@tamagui/web"),
29
+ import_Input = require("./Input.native.js"),
30
+ import_shared = require("./shared.native.js"),
31
+ TextArea = (0, import_web.styled)(import_Input.Input, {
32
+ name: "TextArea",
33
+ 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
16
47
  }
17
48
  },
18
- size: {
19
- "...size": textAreaSizeVariant
49
+ defaultVariants: {
50
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
20
51
  }
21
- },
22
- defaultVariants: {
23
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
24
- }
25
- });
26
- export {
27
- TextArea
28
- };
29
- //# 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,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,eAAe,2BAA2B;AAIxC,IAAI,WAAW,OAAO,OAAO;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":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","TextArea_exports","TextArea","module","exports","import_web","require","import_Input","import_shared","styled","Input","tag"],"sources":["../../src/TextArea.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAa,CAAAC,cAAA;AACtB,IAAAC,gBAAS,GAAAF,MAAe,CAAAG,wBAA2B;AAM5C,IAAAC,iBAAiB,GAAOJ,MAAA,CAAOK,mBAAA;AAAA,IACpCC,YAAM,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACNC,QAAK,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IAAA,SAAAC,IAAA,IAAAD,GAAA,EAAAZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAAA;EAILC,WAAY,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IAEZ,IAAAF,IAAA,IAAU,OAAAA,IAAA,uBAAAA,IAAA,gBACR,SAAAG,GAAU,IAAAhB,iBAAA,CAAAa,IAAA,GACR,CAAAX,YAAO,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,IAAAnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;IAAA,OACLE,EAAA;EAAQ;AACL,IAAAM,YACH,GAAAC,GAAe,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IAAAE,gBACjB;AAAAhB,QACF,CAAAgB,gBAAA;EAAAC,QAEM,EAAAA,CAAA,KAAAA;AAAA;AACOC,MACb,CAAAC,OAAA,GAAAN,YAAA,CAAAG,gBAAA;AAAA,IACFI,UAAA,GAAAC,OAAA;EAAAC,YAAA,GAAAD,OAAA;EAAAE,aAAA,GAAAF,OAAA;EAAAJ,QAAA,OAAAG,UAAA,CAAAI,MAAA,EAAAF,YAAA,CAAAG,KAAA;IAEAtB,IAAA;IAAiBuB,GACf,YAAU;IACZ;IACD","ignoreList":[]}
@@ -1,3 +1,22 @@
1
- export * from "./Input";
2
- export * from "./TextArea";
3
- //# sourceMappingURL=index.js.map
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 __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
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);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
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,cAAc;AACd,cAAc;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["__defProp","Object","defineProperty"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA","ignoreList":[]}
@@ -1,70 +1,111 @@
1
- import { Text } from "@tamagui/core";
2
- import { getVariableValue, isWeb } from "@tamagui/core";
3
- import { getButtonSized } from "@tamagui/get-button-sized";
4
- import { getFontSized } from "@tamagui/get-font-sized";
5
- import { getSpace } from "@tamagui/get-token";
6
- var defaultStyles = {
7
- size: "$true",
8
- fontFamily: "$body",
9
- borderWidth: 1,
10
- outlineWidth: 0,
11
- color: "$color",
12
- ...isWeb ? {
13
- tabIndex: 0
14
- } : {
15
- focusable: !0
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: !0
11
+ });
16
12
  },
17
- borderColor: "$borderColor",
18
- backgroundColor: "$background",
19
- // this fixes a flex bug where it overflows container
20
- minWidth: 0,
21
- hoverStyle: {
22
- borderColor: "$borderColorHover"
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);
23
+ var shared_exports = {};
24
+ __export(shared_exports, {
25
+ INPUT_NAME: () => INPUT_NAME,
26
+ defaultStyles: () => defaultStyles,
27
+ inputSizeVariant: () => inputSizeVariant,
28
+ styledBody: () => styledBody,
29
+ textAreaSizeVariant: () => textAreaSizeVariant
30
+ });
31
+ module.exports = __toCommonJS(shared_exports);
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
+ }
23
63
  },
24
- focusStyle: {
25
- borderColor: "$borderColorFocus"
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
+ };
26
79
  },
27
- focusVisibleStyle: {
28
- outlineColor: "$outlineColor",
29
- outlineWidth: 2,
30
- outlineStyle: "solid"
31
- }
32
- }, inputSizeVariant = function() {
33
- var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0;
34
- if (extras.props.multiline || extras.props.numberOfLines > 1)
35
- return textAreaSizeVariant(val, extras);
36
- var buttonStyles = getButtonSized(val, extras), paddingHorizontal = getSpace(val, {
37
- shift: -1,
38
- bounds: [
39
- 2
40
- ]
41
- }), fontStyle = getFontSized(val, extras);
42
- return !isWeb && fontStyle && delete fontStyle.lineHeight, {
43
- ...fontStyle,
44
- ...buttonStyles,
45
- paddingHorizontal
46
- };
47
- }, textAreaSizeVariant = function() {
48
- var val = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", extras = arguments.length > 1 ? arguments[1] : void 0, { props } = extras, buttonStyles = getButtonSized(val, extras), fontStyle = getFontSized(val, extras), _props_rows, lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines, height = typeof lines == "number" ? lines * getVariableValue(fontStyle.lineHeight) : "auto", paddingVertical = getSpace(val, {
49
- shift: -2,
50
- bounds: [
51
- 2
52
- ]
53
- }), paddingHorizontal = getSpace(val, {
54
- shift: -1,
55
- bounds: [
56
- 2
57
- ]
58
- });
59
- return {
60
- ...buttonStyles,
61
- ...fontStyle,
62
- paddingVertical,
63
- paddingHorizontal,
64
- height
65
- };
66
- }, INPUT_NAME = "Input", styledBody = [
67
- {
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
+ };
106
+ },
107
+ INPUT_NAME = "Input",
108
+ styledBody = [{
68
109
  name: INPUT_NAME,
69
110
  tag: "input",
70
111
  variants: {
@@ -81,21 +122,12 @@ var defaultStyles = {
81
122
  defaultVariants: {
82
123
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
83
124
  }
84
- },
85
- {
125
+ }, {
86
126
  isInput: !0,
87
127
  accept: {
88
128
  placeholderTextColor: "color",
89
129
  selectionColor: "color"
90
130
  },
91
- validStyles: Text.staticConfig.validStyles
92
- }
93
- ];
94
- export {
95
- INPUT_NAME,
96
- defaultStyles,
97
- inputSizeVariant,
98
- styledBody,
99
- textAreaSizeVariant
100
- };
101
- //# sourceMappingURL=shared.js.map
131
+ validStyles: import_core.Text.staticConfig.validStyles
132
+ }];
133
+ //# sourceMappingURL=shared.native.js.map