@tamagui/input 3.0.7 → 3.0.9

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.
@@ -97,17 +97,17 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
97
97
  import_react.default.useEffect(function() {
98
98
  if (!id || disabled) return;
99
99
  return (0, import_focusable.registerFocusable)(id, {
100
- focusAndSelect: function() {
100
+ focusAndSelect: function focusAndSelect() {
101
101
  var _ref_current;
102
102
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
103
103
  },
104
- focus: function() {
104
+ focus: function focus() {
105
105
  var _ref_current;
106
106
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
107
107
  }
108
108
  });
109
109
  }, [id, disabled]);
110
- var handleChangeText = function(text) {
110
+ var handleChangeText = function handleChangeText2(text) {
111
111
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
112
112
  if (onChange) {
113
113
  onChange({
@@ -122,7 +122,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
122
122
  });
123
123
  }
124
124
  };
125
- var handleKeyPress = function(e) {
125
+ var handleKeyPress = function handleKeyPress2(e) {
126
126
  onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);
127
127
  if (onKeyDown) {
128
128
  var { key } = e.nativeEvent;
@@ -134,7 +134,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
134
134
  }
135
135
  }
136
136
  };
137
- var handleSubmitEditing = function(e) {
137
+ var handleSubmitEditing = function handleSubmitEditing2(e) {
138
138
  if (onKeyDown) {
139
139
  onKeyDown({
140
140
  key: "Enter",
@@ -143,7 +143,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
143
143
  }
144
144
  onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);
145
145
  };
146
- var handleSelectionChange = function(e) {
146
+ var handleSelectionChange = function handleSelectionChange2(e) {
147
147
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
148
148
  };
149
149
  var finalProps = {
@@ -97,17 +97,17 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
97
97
  import_react.default.useEffect(function() {
98
98
  if (!id || disabled) return;
99
99
  return (0, import_focusable.registerFocusable)(id, {
100
- focusAndSelect: function() {
100
+ focusAndSelect: function focusAndSelect() {
101
101
  var _ref_current;
102
102
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
103
103
  },
104
- focus: function() {
104
+ focus: function focus() {
105
105
  var _ref_current;
106
106
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
107
107
  }
108
108
  });
109
109
  }, [id, disabled]);
110
- var handleChangeText = function(text) {
110
+ var handleChangeText = function handleChangeText2(text) {
111
111
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
112
112
  if (onChange) {
113
113
  onChange({
@@ -122,7 +122,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
122
122
  });
123
123
  }
124
124
  };
125
- var handleKeyPress = function(e) {
125
+ var handleKeyPress = function handleKeyPress2(e) {
126
126
  onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);
127
127
  if (onKeyDown) {
128
128
  var { key } = e.nativeEvent;
@@ -134,7 +134,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
134
134
  }
135
135
  }
136
136
  };
137
- var handleSubmitEditing = function(e) {
137
+ var handleSubmitEditing = function handleSubmitEditing2(e) {
138
138
  if (onKeyDown) {
139
139
  onKeyDown({
140
140
  key: "Enter",
@@ -143,7 +143,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
143
143
  }
144
144
  onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);
145
145
  };
146
- var handleSelectionChange = function(e) {
146
+ var handleSelectionChange = function handleSelectionChange2(e) {
147
147
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
148
148
  };
149
149
  var finalProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.native.js","names":[],"sources":["cjs/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_native_exports = {};\n__export(Input_native_exports, {\n Input: () => Input\n});\nmodule.exports = __toCommonJS(Input_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_element = require(\"@tamagui/element\");\nvar import_shared = require(\"./shared\");\nvar NativeTextInput = import_react_native.TextInput;\nvar StyledInput = (0, import_core.styled)(NativeTextInput, import_shared.styledBody[0], import_shared.styledBody[1]).resolve(import_shared.resolveMultilineInputSize);\nvar Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = (0, import_element.useNativeInputRef)(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n import_react.default.useEffect(function() {\n if (!id || disabled) return;\n return (0, import_focusable.registerFocusable)(id, {\n focusAndSelect: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc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AAsB,KAAK;EAC3E,mBAAmB,oBAAoB,wBAAwB,KAAK;EACpE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA,aAAa,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;EACxF,gBAAgB,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CACtG;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"Input.native.js","names":[],"sources":["cjs/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_native_exports = {};\n__export(Input_native_exports, {\n Input: () => Input\n});\nmodule.exports = __toCommonJS(Input_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_element = require(\"@tamagui/element\");\nvar import_shared = require(\"./shared\");\nvar NativeTextInput = import_react_native.TextInput;\nvar StyledInput = (0, import_core.styled)(NativeTextInput, import_shared.styledBody[0], import_shared.styledBody[1]).resolve(import_shared.resolveMultilineInputSize);\nvar Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = (0, import_element.useNativeInputRef)(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n import_react.default.useEffect(function() {\n if (!id || disabled) return;\n return (0, import_focusable.registerFocusable)(id, {\n focusAndSelect: function focusAndSelect() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function focus() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function handleChangeText2(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function handleKeyPress2(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function handleSubmitEditing2(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function handleSelectionChange2(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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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IACR,KAAK;IACL,MAAM;GACR,CAAC;EACH;EACA,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB,CAAC;CACrF;CACA,IAAI,wBAAwB,SAAS,uBAAuB,GAAG;EAC7D,sBAAsB,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC;CAC3F;CACA,IAAI,aAAa;EACf,GAAG;EACH,UAAU,CAAC,YAAY,CAAC;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EAEX,cAAc;EACd,YAAY,kBAAkB,YAAY,iBAAiB,KAAK;EAChE,iBAAiB,aAAa,kBAAkB,sBAAsB,KAAK;EAC3E,mBAAmB,oBAAoB,wBAAwB,KAAK;EACpE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA,aAAa,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;EACxF,gBAAgB,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CACtG;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
@@ -35,25 +35,23 @@ var defaultStyles = {
35
35
  tabIndex: 0,
36
36
  minWidth: 0
37
37
  };
38
- var resolveTextAreaSize = function(props, env) {
38
+ var resolveTextAreaSize = function resolveTextAreaSize2(props, env) {
39
+ var _props_fontSize, _props_lineHeight, _props_rows;
39
40
  var _font_lineHeight, _font_lineHeight1;
40
41
  var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;
41
42
  var defaultKey = font && "sm" in font.size ? "sm" : "4";
42
- var _props_fontSize;
43
43
  var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;
44
- var _props_lineHeight;
45
44
  var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];
46
45
  var configuredSize = typeof fontSize === "string" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;
47
46
  var configuredLeading = typeof lineHeight === "string" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;
48
47
  var metrics = { fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize))) };
49
48
  var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;
50
49
  (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === "number" ? `${leading}px` : leading);
51
- var _props_rows;
52
50
  var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;
53
51
  var height = typeof lines === "number" && typeof metrics.lineHeight === "number" ? lines * metrics.lineHeight : void 0;
54
52
  return { height };
55
53
  };
56
- var resolveMultilineInputSize = function(props, env) {
54
+ var resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {
57
55
  if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
58
56
  return resolveTextAreaSize(props, env);
59
57
  };
@@ -35,25 +35,23 @@ var defaultStyles = {
35
35
  tabIndex: 0,
36
36
  minWidth: 0
37
37
  };
38
- var resolveTextAreaSize = function(props, env) {
38
+ var resolveTextAreaSize = function resolveTextAreaSize2(props, env) {
39
+ var _props_fontSize, _props_lineHeight, _props_rows;
39
40
  var _font_lineHeight, _font_lineHeight1;
40
41
  var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;
41
42
  var defaultKey = font && "sm" in font.size ? "sm" : "4";
42
- var _props_fontSize;
43
43
  var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;
44
- var _props_lineHeight;
45
44
  var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];
46
45
  var configuredSize = typeof fontSize === "string" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;
47
46
  var configuredLeading = typeof lineHeight === "string" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;
48
47
  var metrics = { fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize))) };
49
48
  var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;
50
49
  (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === "number" ? `${leading}px` : leading);
51
- var _props_rows;
52
50
  var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;
53
51
  var height = typeof lines === "number" && typeof metrics.lineHeight === "number" ? lines * metrics.lineHeight : void 0;
54
52
  return { height };
55
53
  };
56
- var resolveMultilineInputSize = function(props, env) {
54
+ var resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {
57
55
  if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
58
56
  return resolveTextAreaSize(props, env);
59
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shared.native.js","names":[],"sources":["cjs/shared.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 shared_exports = {};\n__export(shared_exports, {\n INPUT_NAME: () => INPUT_NAME,\n defaultStyles: () => defaultStyles,\n resolveMultilineInputSize: () => resolveMultilineInputSize,\n resolveTextAreaSize: () => resolveTextAreaSize,\n styledBody: () => styledBody\n});\nmodule.exports = __toCommonJS(shared_exports);\nvar import_core = require(\"@tamagui/core\");\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function(props, env) {\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var _props_fontSize;\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var _props_lineHeight;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var _props_rows;\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\n//# sourceMappingURL=shared.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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,KAAK,IAAI,oBAAoB;CAC/F,CAAC,GAAG,YAAY,mBAAkB,CAAE,UAAU,MAAM,cAAc,QAAQ,sBAAsB,KAAK,MAAM,OAAO,YAAY,WAAW,GAAG,QAAQ,MAAM,OAAO;CACjK,IAAI;CACJ,IAAI,SAAS,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc,MAAM;CAChG,IAAI,SAAS,OAAO,UAAU,YAAY,OAAO,QAAQ,eAAe,WAAW,QAAQ,QAAQ,aAAa,KAAK;CACrH,OAAO,EACL,OACF;AACF;AACA,IAAI,4BAA4B,SAAS,OAAO,KAAK;CACnD,IAAI,EAAE,MAAM,OAAO,KAAK,MAAM,aAAa,MAAM,gBAAgB,IAAI;CACrE,OAAO,oBAAoB,OAAO,GAAG;AACvC;AACA,IAAI,aAAa;AACjB,IAAI,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
1
+ {"version":3,"file":"shared.native.js","names":[],"sources":["cjs/shared.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 shared_exports = {};\n__export(shared_exports, {\n INPUT_NAME: () => INPUT_NAME,\n defaultStyles: () => defaultStyles,\n resolveMultilineInputSize: () => resolveMultilineInputSize,\n resolveTextAreaSize: () => resolveTextAreaSize,\n styledBody: () => styledBody\n});\nmodule.exports = __toCommonJS(shared_exports);\nvar import_core = require(\"@tamagui/core\");\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function resolveTextAreaSize2(props, env) {\n var _props_fontSize, _props_lineHeight, _props_rows;\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\n//# sourceMappingURL=shared.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,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,kBAAkB;CAClB,qBAAqB;CACrB,iCAAiC;CACjC,2BAA2B;CAC3B,kBAAkB;AACpB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB;CAClB,cAAc;CACd,UAAU;CAEV,UAAU;AACZ;AACA,IAAI,sBAAsB,SAAS,qBAAqB,OAAO,KAAK;CAClE,IAAI,iBAAiB,mBAAmB;CACxC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O,KAAK;CAC9E,IAAI,EAAE,MAAM,OAAO,KAAK,MAAM,aAAa,MAAM,gBAAgB,IAAI;CACrE,OAAO,oBAAoB,OAAO,GAAG;AACvC;AACA,IAAI,aAAa;AACjB,IAAI,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
@@ -67,17 +67,17 @@ var Input = createStyledHOC(StyledInput, function(props, forwardedRef) {
67
67
  React.useEffect(function() {
68
68
  if (!id || disabled) return;
69
69
  return registerFocusable(id, {
70
- focusAndSelect: function() {
70
+ focusAndSelect: function focusAndSelect() {
71
71
  var _ref_current;
72
72
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
73
73
  },
74
- focus: function() {
74
+ focus: function focus() {
75
75
  var _ref_current;
76
76
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
77
77
  }
78
78
  });
79
79
  }, [id, disabled]);
80
- var handleChangeText = function(text) {
80
+ var handleChangeText = function handleChangeText2(text) {
81
81
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
82
82
  if (onChange) {
83
83
  onChange({
@@ -92,7 +92,7 @@ var Input = createStyledHOC(StyledInput, function(props, forwardedRef) {
92
92
  });
93
93
  }
94
94
  };
95
- var handleKeyPress = function(e) {
95
+ var handleKeyPress = function handleKeyPress2(e) {
96
96
  onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);
97
97
  if (onKeyDown) {
98
98
  var { key } = e.nativeEvent;
@@ -104,7 +104,7 @@ var Input = createStyledHOC(StyledInput, function(props, forwardedRef) {
104
104
  }
105
105
  }
106
106
  };
107
- var handleSubmitEditing = function(e) {
107
+ var handleSubmitEditing = function handleSubmitEditing2(e) {
108
108
  if (onKeyDown) {
109
109
  onKeyDown({
110
110
  key: "Enter",
@@ -113,7 +113,7 @@ var Input = createStyledHOC(StyledInput, function(props, forwardedRef) {
113
113
  }
114
114
  onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);
115
115
  };
116
- var handleSelectionChange = function(e) {
116
+ var handleSelectionChange = function handleSelectionChange2(e) {
117
117
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
118
118
  };
119
119
  var finalProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.native.js","names":[],"sources":["esm/Input.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { TextInput } from \"react-native\";\nimport { createStyledHOC, styled } from \"@tamagui/core\";\nimport { registerFocusable } from \"@tamagui/focusable\";\nimport { useNativeInputRef } from \"@tamagui/element\";\nimport { resolveMultilineInputSize, styledBody } from \"./shared\";\nvar NativeTextInput = TextInput;\nvar StyledInput = styled(NativeTextInput, styledBody[0], styledBody[1]).resolve(resolveMultilineInputSize);\nvar Input = createStyledHOC(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = useNativeInputRef(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n React.useEffect(function() {\n if (!id || disabled) return;\n return registerFocusable(id, {\n focusAndSelect: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ _jsx(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\nexport {\n Input\n};\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,kBAAkB;AACtB,IAAI,cAAc,OAAO,iBAAiB,WAAW,IAAI,WAAW,EAAE,CAAC,CAAC,QAAQ,yBAAyB;AACzG,IAAI,QAAQ,gBAAgB,aAAa,SAAS,OAAO,cAAc;CACrE,IAAI,EAEF,MACA,UACA,UACA,IACA,MACA,cACA,cAEA,UACA,SACA,WACA,cACA,iBACA,mBACA,cACA,qBACA,UACA,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ACrF;CACA,IAAI,wBAAwB,SAAS,GAAG;EACtC,sBAAsB,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC;CAC3F;CACA,IAAI,aAAa;EACf,GAAG;EACH,UAAU,CAAC,YAAY,CAAC;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EAEX,cAAc;EACd,YAAY,kBAAkB,YAAY,iBAAiB,KAAK;EAChE,iBAAiB,aAAa,kBAAkB,sBAAsB,KAAK;EAC3E,mBAAmB,oBAAoB,wBAAwB,KAAK;EACpE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA,aAAa,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;EACxF,gBAAgB,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CACtG;CACA,OAAuB,oBAAK,aAAa;EACvC,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"Input.native.js","names":[],"sources":["esm/Input.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { TextInput } from \"react-native\";\nimport { createStyledHOC, styled } from \"@tamagui/core\";\nimport { registerFocusable } from \"@tamagui/focusable\";\nimport { useNativeInputRef } from \"@tamagui/element\";\nimport { resolveMultilineInputSize, styledBody } from \"./shared\";\nvar NativeTextInput = TextInput;\nvar StyledInput = styled(NativeTextInput, styledBody[0], styledBody[1]).resolve(resolveMultilineInputSize);\nvar Input = createStyledHOC(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = useNativeInputRef(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n React.useEffect(function() {\n if (!id || disabled) return;\n return registerFocusable(id, {\n focusAndSelect: function focusAndSelect() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function focus() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function handleChangeText2(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function handleKeyPress2(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function handleSubmitEditing2(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function handleSelectionChange2(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ _jsx(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\nexport {\n Input\n};\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,kBAAkB;AACtB,IAAI,cAAc,OAAO,iBAAiB,WAAW,IAAI,WAAW,EAAE,CAAC,CAAC,QAAQ,yBAAyB;AACzG,IAAI,QAAQ,gBAAgB,aAAa,SAAS,OAAO,cAAc;CACrE,IAAI,EAEF,MACA,UACA,UACA,IACA,MACA,cACA,cAEA,UACA,SACA,WACA,cACA,iBACA,mBACA,cACA,qBACA,UACA,YAAY,gBACZ,WAEA,oBACA,eAAe,mBACf,gBACA,cACA,aACA,mBACA,mBACA,iBAAiB,qBACjB,uBACA,kBACA,WAAW,eACX,cAAc,kBACd,WAAW,eACX,gBAAgB,oBAChB,aAAa,iBACb,iBACA,iBAEA,iBACA,kBACA,+BACA,mBACA,eACA,eACA,4BACA,YACA,sBACA,kBACA,mBACA,sBACA,+BACA,0BAEA,sBACA,qBACA,iBACA,oBACA,gBACA,mBACA,mBACA,eACA,sBACA,eAAe,mBAGf,SACA,KACA,KACA,WACA,UACA,MACA,SACA,UACA,MACA,QAKA,YACA,aAAa,iBACb,gBAAgB,oBAChB,GAAG,SACD;CACJ,IAAI,EAAE,KAAK,gBAAgB,kBAAkB,YAAY;CACzD,IAAI,kBAAkB,wBAAwB,QAAQ,wBAAwB,KAAK,IAAI,sBAAsB;CAC7G,IAAI,eAAe,qBAAqB,QAAQ,qBAAqB,KAAK,IAAI,mBAAmB;CACjG,IAAI,YAAY;CAChB,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,eAAe;EAC/D,QAAQ,MAAR;GACE,KAAK;IACH,kBAAkB;IAClB;GAC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CACA,OAAuB,oBAAK,aAAa;EACvC,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
@@ -5,25 +5,23 @@ var defaultStyles = {
5
5
  tabIndex: 0,
6
6
  minWidth: 0
7
7
  };
8
- var resolveTextAreaSize = function(props, env) {
8
+ var resolveTextAreaSize = function resolveTextAreaSize2(props, env) {
9
+ var _props_fontSize, _props_lineHeight, _props_rows;
9
10
  var _font_lineHeight, _font_lineHeight1;
10
11
  var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;
11
12
  var defaultKey = font && "sm" in font.size ? "sm" : "4";
12
- var _props_fontSize;
13
13
  var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;
14
- var _props_lineHeight;
15
14
  var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];
16
15
  var configuredSize = typeof fontSize === "string" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;
17
16
  var configuredLeading = typeof lineHeight === "string" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;
18
17
  var metrics = { fontSize: Number.parseFloat(String(getVariableValue(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize))) };
19
18
  var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;
20
19
  resolveTextMetrics(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === "number" ? `${leading}px` : leading);
21
- var _props_rows;
22
20
  var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;
23
21
  var height = typeof lines === "number" && typeof metrics.lineHeight === "number" ? lines * metrics.lineHeight : void 0;
24
22
  return { height };
25
23
  };
26
- var resolveMultilineInputSize = function(props, env) {
24
+ var resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {
27
25
  if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
28
26
  return resolveTextAreaSize(props, env);
29
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shared.native.js","names":[],"sources":["esm/shared.native.js"],"sourcesContent":["import { getVariableValue, resolveTextMetrics } from \"@tamagui/core\";\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function(props, env) {\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var _props_fontSize;\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var _props_lineHeight;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String(getVariableValue(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n resolveTextMetrics(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var _props_rows;\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\nexport {\n INPUT_NAME,\n defaultStyles,\n resolveMultilineInputSize,\n resolveTextAreaSize,\n styledBody\n};\n//# sourceMappingURL=shared.js.map\n"],"mappings":";;;AACA,IAAI,gBAAgB;CAClB,cAAc;CACd,UAAU;CAEV,UAAU;AACZ;AACA,IAAI,sBAAsB,SAAS,OAAO,KAAK;CAC7C,IAAI,kBAAkB;CACtB,IAAI,OAAO,MAAM,aAAa,IAAI,MAAM,MAAM,cAAc,IAAI;CAChE,IAAI,aAAa,QAAQ,QAAQ,KAAK,OAAO,OAAO;CACpD,IAAI;CACJ,IAAI,YAAY,kBAAkB,MAAM,cAAc,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;CAC7G,IAAI;CACJ,IAAI,cAAc,oBAAoB,MAAM,gBAAgB,QAAQ,sBAAsB,KAAK,IAAI,oBAAoB,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,mBAAmB,KAAK,gBAAgB,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB;CAC5Q,IAAI,iBAAiB,OAAO,aAAa,WAAW,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,YAAY,KAAK;CAC3H,IAAI,oBAAoB,OAAO,eAAe,WAAW,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,oBAAoB,KAAK,gBAAgB,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB,cAAc,KAAK;CACpO,IAAI,UAAU,EACZ,UAAU,OAAO,WAAW,OAAO,iBAAiB,mBAAmB,QAAQ,mBAAmB,KAAK,IAAI,iBAAiB,QAAQ,CAAC,CAAC,EACxI;CACA,IAAI,UAAU,sBAAsB,QAAQ,sBAAsB,KAAK,IAAI,oBAAoB;CAC/F,mBAAmB,UAAU,MAAM,cAAc,QAAQ,sBAAsB,KAAK,MAAM,OAAO,YAAY,WAAW,GAAG,QAAQ,MAAM,OAAO;CAChJ,IAAI;CACJ,IAAI,SAAS,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc,MAAM;CAChG,IAAI,SAAS,OAAO,UAAU,YAAY,OAAO,QAAQ,eAAe,WAAW,QAAQ,QAAQ,aAAa,KAAK;CACrH,OAAO,EACL,OACF;AACF;AACA,IAAI,4BAA4B,SAAS,OAAO,KAAK;CACnD,IAAI,EAAE,MAAM,OAAO,KAAK,MAAM,aAAa,MAAM,gBAAgB,IAAI;CACrE,OAAO,oBAAoB,OAAO,GAAG;AACvC;AACA,IAAI,aAAa;AACjB,IAAI,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
1
+ {"version":3,"file":"shared.native.js","names":[],"sources":["esm/shared.native.js"],"sourcesContent":["import { getVariableValue, resolveTextMetrics } from \"@tamagui/core\";\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function resolveTextAreaSize2(props, env) {\n var _props_fontSize, _props_lineHeight, _props_rows;\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String(getVariableValue(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n resolveTextMetrics(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\nexport {\n INPUT_NAME,\n defaultStyles,\n resolveMultilineInputSize,\n resolveTextAreaSize,\n styledBody\n};\n//# sourceMappingURL=shared.js.map\n"],"mappings":";;;AACA,IAAI,gBAAgB;CAClB,cAAc;CACd,UAAU;CAEV,UAAU;AACZ;AACA,IAAI,sBAAsB,SAAS,qBAAqB,OAAO,KAAK;CAClE,IAAI,iBAAiB,mBAAmB;CACxC,IAAI,kBAAkB;CACtB,IAAI,OAAO,MAAM,aAAa,IAAI,MAAM,MAAM,cAAc,IAAI;CAChE,IAAI,aAAa,QAAQ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I,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
@@ -97,17 +97,17 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
97
97
  import_react.default.useEffect(function() {
98
98
  if (!id || disabled) return;
99
99
  return (0, import_focusable.registerFocusable)(id, {
100
- focusAndSelect: function() {
100
+ focusAndSelect: function focusAndSelect() {
101
101
  var _ref_current;
102
102
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
103
103
  },
104
- focus: function() {
104
+ focus: function focus() {
105
105
  var _ref_current;
106
106
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
107
107
  }
108
108
  });
109
109
  }, [id, disabled]);
110
- var handleChangeText = function(text) {
110
+ var handleChangeText = function handleChangeText2(text) {
111
111
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
112
112
  if (onChange) {
113
113
  onChange({
@@ -122,7 +122,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
122
122
  });
123
123
  }
124
124
  };
125
- var handleKeyPress = function(e) {
125
+ var handleKeyPress = function handleKeyPress2(e) {
126
126
  onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);
127
127
  if (onKeyDown) {
128
128
  var { key } = e.nativeEvent;
@@ -134,7 +134,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
134
134
  }
135
135
  }
136
136
  };
137
- var handleSubmitEditing = function(e) {
137
+ var handleSubmitEditing = function handleSubmitEditing2(e) {
138
138
  if (onKeyDown) {
139
139
  onKeyDown({
140
140
  key: "Enter",
@@ -143,7 +143,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
143
143
  }
144
144
  onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);
145
145
  };
146
- var handleSelectionChange = function(e) {
146
+ var handleSelectionChange = function handleSelectionChange2(e) {
147
147
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
148
148
  };
149
149
  var finalProps = {
@@ -97,17 +97,17 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
97
97
  import_react.default.useEffect(function() {
98
98
  if (!id || disabled) return;
99
99
  return (0, import_focusable.registerFocusable)(id, {
100
- focusAndSelect: function() {
100
+ focusAndSelect: function focusAndSelect() {
101
101
  var _ref_current;
102
102
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
103
103
  },
104
- focus: function() {
104
+ focus: function focus() {
105
105
  var _ref_current;
106
106
  return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
107
107
  }
108
108
  });
109
109
  }, [id, disabled]);
110
- var handleChangeText = function(text) {
110
+ var handleChangeText = function handleChangeText2(text) {
111
111
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
112
112
  if (onChange) {
113
113
  onChange({
@@ -122,7 +122,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
122
122
  });
123
123
  }
124
124
  };
125
- var handleKeyPress = function(e) {
125
+ var handleKeyPress = function handleKeyPress2(e) {
126
126
  onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);
127
127
  if (onKeyDown) {
128
128
  var { key } = e.nativeEvent;
@@ -134,7 +134,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
134
134
  }
135
135
  }
136
136
  };
137
- var handleSubmitEditing = function(e) {
137
+ var handleSubmitEditing = function handleSubmitEditing2(e) {
138
138
  if (onKeyDown) {
139
139
  onKeyDown({
140
140
  key: "Enter",
@@ -143,7 +143,7 @@ var Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwar
143
143
  }
144
144
  onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);
145
145
  };
146
- var handleSelectionChange = function(e) {
146
+ var handleSelectionChange = function handleSelectionChange2(e) {
147
147
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);
148
148
  };
149
149
  var finalProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.native.js","names":[],"sources":["jsx/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_native_exports = {};\n__export(Input_native_exports, {\n Input: () => Input\n});\nmodule.exports = __toCommonJS(Input_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_element = require(\"@tamagui/element\");\nvar import_shared = require(\"./shared\");\nvar NativeTextInput = import_react_native.TextInput;\nvar StyledInput = (0, import_core.styled)(NativeTextInput, import_shared.styledBody[0], import_shared.styledBody[1]).resolve(import_shared.resolveMultilineInputSize);\nvar Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = (0, import_element.useNativeInputRef)(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n import_react.default.useEffect(function() {\n if (!id || disabled) return;\n return (0, import_focusable.registerFocusable)(id, {\n focusAndSelect: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,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,aAAa,kBAAkB,sBAAsB,KAAK;EAC3E,mBAAmB,oBAAoB,wBAAwB,KAAK;EACpE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA,aAAa,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;EACxF,gBAAgB,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CACtG;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"Input.native.js","names":[],"sources":["jsx/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_native_exports = {};\n__export(Input_native_exports, {\n Input: () => Input\n});\nmodule.exports = __toCommonJS(Input_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_element = require(\"@tamagui/element\");\nvar import_shared = require(\"./shared\");\nvar NativeTextInput = import_react_native.TextInput;\nvar StyledInput = (0, import_core.styled)(NativeTextInput, import_shared.styledBody[0], import_shared.styledBody[1]).resolve(import_shared.resolveMultilineInputSize);\nvar Input = (0, import_core.createStyledHOC)(StyledInput, function(props, forwardedRef) {\n var {\n // Web props we need to convert\n type,\n disabled,\n readOnly,\n id,\n rows,\n autoComplete,\n enterKeyHint,\n // Callbacks\n onChange,\n onInput,\n onKeyDown,\n onChangeText,\n onSubmitEditing,\n onSelectionChange,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n onKeyPress: onKeyPressProp,\n selection,\n // Native-only props (pass through directly)\n keyboardAppearance,\n returnKeyType: returnKeyTypeProp,\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n secureTextEntry: secureTextEntryProp,\n maxFontSizeMultiplier,\n allowFontScaling,\n multiline: multilineProp,\n keyboardType: keyboardTypeProp,\n inputMode: inputModeProp,\n autoCapitalize: autoCapitalizeProp,\n autoCorrect: autoCorrectProp,\n autoFocusNative,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n numberOfLines: numberOfLinesProp,\n // Web-only props to filter out\n // @ts-ignore\n dirname,\n min,\n max,\n minLength,\n multiple,\n name,\n pattern,\n required,\n step,\n render,\n // caretColor is web-only as a CSS prop; on native forward to\n // cursorColor (Android) + selectionColor (iOS+Android caret) unless\n // those are explicitly set.\n // @ts-ignore - caretColor is typed as web-only in core\n caretColor,\n cursorColor: cursorColorProp,\n selectionColor: selectionColorProp,\n ...rest\n } = props;\n var { ref, composedRef } = (0, import_element.useNativeInputRef)(forwardedRef);\n var secureTextEntry = secureTextEntryProp !== null && secureTextEntryProp !== void 0 ? secureTextEntryProp : false;\n var keyboardType = keyboardTypeProp !== null && keyboardTypeProp !== void 0 ? keyboardTypeProp : \"default\";\n var inputMode = inputModeProp;\n if (!secureTextEntryProp && !keyboardTypeProp && !inputModeProp) {\n switch (type) {\n case \"password\":\n secureTextEntry = true;\n break;\n case \"email\":\n keyboardType = \"email-address\";\n inputMode = \"email\";\n break;\n case \"tel\":\n keyboardType = \"phone-pad\";\n inputMode = \"tel\";\n break;\n case \"number\":\n keyboardType = \"numeric\";\n inputMode = \"numeric\";\n break;\n case \"url\":\n keyboardType = \"url\";\n inputMode = \"url\";\n break;\n case \"search\":\n inputMode = \"search\";\n break;\n }\n }\n var returnKeyType = returnKeyTypeProp;\n if (!returnKeyType && enterKeyHint) {\n switch (enterKeyHint) {\n case \"done\":\n returnKeyType = \"done\";\n break;\n case \"go\":\n returnKeyType = \"go\";\n break;\n case \"next\":\n returnKeyType = \"next\";\n break;\n case \"search\":\n returnKeyType = \"search\";\n break;\n case \"send\":\n returnKeyType = \"send\";\n break;\n }\n }\n var multiline = multilineProp !== null && multilineProp !== void 0 ? multilineProp : render === \"textarea\" || rows && rows > 1;\n var numberOfLines = numberOfLinesProp !== null && numberOfLinesProp !== void 0 ? numberOfLinesProp : rows;\n var autoCorrect = autoCorrectProp === \"on\" ? true : autoCorrectProp === \"off\" ? false : autoCorrectProp;\n var autoCapitalize = autoCapitalizeProp === \"on\" ? \"sentences\" : autoCapitalizeProp === \"off\" ? \"none\" : autoCapitalizeProp;\n import_react.default.useEffect(function() {\n if (!id || disabled) return;\n return (0, import_focusable.registerFocusable)(id, {\n focusAndSelect: function focusAndSelect() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n focus: function focus() {\n var _ref_current;\n return (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n }, [\n id,\n disabled\n ]);\n var handleChangeText = function handleChangeText2(text) {\n onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);\n if (onChange) {\n onChange({\n target: {\n value: text\n },\n type: \"change\"\n });\n }\n if (onInput) {\n onInput({\n target: {\n value: text\n },\n type: \"input\"\n });\n }\n };\n var handleKeyPress = function handleKeyPress2(e) {\n onKeyPressProp === null || onKeyPressProp === void 0 ? void 0 : onKeyPressProp(e);\n if (onKeyDown) {\n var { key } = e.nativeEvent;\n if (key === \"Backspace\" || key === \"Enter\" || key.length === 1) {\n onKeyDown({\n key,\n type: \"keydown\"\n });\n }\n }\n };\n var handleSubmitEditing = function handleSubmitEditing2(e) {\n if (onKeyDown) {\n onKeyDown({\n key: \"Enter\",\n type: \"keydown\"\n });\n }\n onSubmitEditing === null || onSubmitEditing === void 0 ? void 0 : onSubmitEditing(e);\n };\n var handleSelectionChange = function handleSelectionChange2(e) {\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(e);\n };\n var finalProps = {\n ...rest,\n editable: !disabled && !readOnly,\n secureTextEntry,\n keyboardType,\n keyboardAppearance,\n inputMode,\n returnKeyType,\n multiline,\n numberOfLines,\n selection,\n autoComplete,\n autoFocus: autoFocusNative,\n // callbacks\n onChangeText: handleChangeText,\n onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : void 0,\n onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : void 0,\n onSelectionChange: onSelectionChange ? handleSelectionChange : void 0,\n onEndEditing,\n onContentSizeChange,\n onScroll,\n // cross-platform native props\n submitBehavior,\n blurOnSubmit,\n caretHidden,\n contextMenuHidden,\n selectTextOnFocus,\n maxFontSizeMultiplier,\n allowFontScaling,\n autoCapitalize,\n autoCorrect,\n textContentType,\n // iOS-only props\n clearButtonMode,\n clearTextOnFocus,\n enablesReturnKeyAutomatically,\n dataDetectorTypes,\n scrollEnabled,\n passwordRules,\n rejectResponderTermination,\n spellCheck,\n lineBreakStrategyIOS,\n lineBreakModeIOS,\n smartInsertDelete,\n inputAccessoryViewID,\n inputAccessoryViewButtonLabel,\n disableKeyboardShortcuts,\n // Android-only props\n importantForAutofill,\n disableFullscreenUI,\n inlineImageLeft,\n inlineImagePadding,\n returnKeyLabel,\n textBreakStrategy,\n textAlignVertical,\n verticalAlign,\n showSoftInputOnFocus,\n // caretColor → cursorColor (Android) + selectionColor (iOS+Android),\n // unless the caller passed those explicitly.\n cursorColor: cursorColorProp !== null && cursorColorProp !== void 0 ? cursorColorProp : caretColor,\n selectionColor: selectionColorProp !== null && selectionColorProp !== void 0 ? selectionColorProp : caretColor\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, {\n ref: composedRef,\n ...finalProps\n });\n});\n//# sourceMappingURL=Input.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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;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,WAAW;GACb,UAAU;IACR,KAAK;IACL,MAAM;GACR,CAAC;EACH;EACA,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB,CAAC;CACrF;CACA,IAAI,wBAAwB,SAAS,uBAAuB,GAAG;EAC7D,sBAAsB,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC;CAC3F;CACA,IAAI,aAAa;EACf,GAAG;EACH,UAAU,CAAC,YAAY,CAAC;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EAEX,cAAc;EACd,YAAY,kBAAkB,YAAY,iBAAiB,KAAK;EAChE,iBAAiB,aAAa,kBAAkB,sBAAsB,KAAK;EAC3E,mBAAmB,oBAAoB,wBAAwB,KAAK;EACpE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA,aAAa,oBAAoB,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB;EACxF,gBAAgB,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB;CACtG;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D,KAAK;EACL,GAAG;CACL,CAAC;AACH,CAAC"}
@@ -35,25 +35,23 @@ var defaultStyles = {
35
35
  tabIndex: 0,
36
36
  minWidth: 0
37
37
  };
38
- var resolveTextAreaSize = function(props, env) {
38
+ var resolveTextAreaSize = function resolveTextAreaSize2(props, env) {
39
+ var _props_fontSize, _props_lineHeight, _props_rows;
39
40
  var _font_lineHeight, _font_lineHeight1;
40
41
  var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;
41
42
  var defaultKey = font && "sm" in font.size ? "sm" : "4";
42
- var _props_fontSize;
43
43
  var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;
44
- var _props_lineHeight;
45
44
  var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];
46
45
  var configuredSize = typeof fontSize === "string" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;
47
46
  var configuredLeading = typeof lineHeight === "string" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;
48
47
  var metrics = { fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize))) };
49
48
  var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;
50
49
  (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === "number" ? `${leading}px` : leading);
51
- var _props_rows;
52
50
  var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;
53
51
  var height = typeof lines === "number" && typeof metrics.lineHeight === "number" ? lines * metrics.lineHeight : void 0;
54
52
  return { height };
55
53
  };
56
- var resolveMultilineInputSize = function(props, env) {
54
+ var resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {
57
55
  if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
58
56
  return resolveTextAreaSize(props, env);
59
57
  };
@@ -35,25 +35,23 @@ var defaultStyles = {
35
35
  tabIndex: 0,
36
36
  minWidth: 0
37
37
  };
38
- var resolveTextAreaSize = function(props, env) {
38
+ var resolveTextAreaSize = function resolveTextAreaSize2(props, env) {
39
+ var _props_fontSize, _props_lineHeight, _props_rows;
39
40
  var _font_lineHeight, _font_lineHeight1;
40
41
  var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;
41
42
  var defaultKey = font && "sm" in font.size ? "sm" : "4";
42
- var _props_fontSize;
43
43
  var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;
44
- var _props_lineHeight;
45
44
  var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];
46
45
  var configuredSize = typeof fontSize === "string" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;
47
46
  var configuredLeading = typeof lineHeight === "string" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;
48
47
  var metrics = { fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize))) };
49
48
  var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;
50
49
  (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === "number" ? `${leading}px` : leading);
51
- var _props_rows;
52
50
  var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;
53
51
  var height = typeof lines === "number" && typeof metrics.lineHeight === "number" ? lines * metrics.lineHeight : void 0;
54
52
  return { height };
55
53
  };
56
- var resolveMultilineInputSize = function(props, env) {
54
+ var resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {
57
55
  if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;
58
56
  return resolveTextAreaSize(props, env);
59
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shared.native.js","names":[],"sources":["jsx/shared.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 shared_exports = {};\n__export(shared_exports, {\n INPUT_NAME: () => INPUT_NAME,\n defaultStyles: () => defaultStyles,\n resolveMultilineInputSize: () => resolveMultilineInputSize,\n resolveTextAreaSize: () => resolveTextAreaSize,\n styledBody: () => styledBody\n});\nmodule.exports = __toCommonJS(shared_exports);\nvar import_core = require(\"@tamagui/core\");\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function(props, env) {\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var _props_fontSize;\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var _props_lineHeight;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var _props_rows;\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\n//# sourceMappingURL=shared.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,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sB,QAAQ,sBAAsB,KAAK,IAAI,oBAAoB;CAC/F,CAAC,GAAG,YAAY,mBAAkB,CAAE,UAAU,MAAM,cAAc,QAAQ,sBAAsB,KAAK,MAAM,OAAO,YAAY,WAAW,GAAG,QAAQ,MAAM,OAAO;CACjK,IAAI;CACJ,IAAI,SAAS,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc,MAAM;CAChG,IAAI,SAAS,OAAO,UAAU,YAAY,OAAO,QAAQ,eAAe,WAAW,QAAQ,QAAQ,aAAa,KAAK;CACrH,OAAO,EACL,OACF;AACF;AACA,IAAI,4BAA4B,SAAS,OAAO,KAAK;CACnD,IAAI,EAAE,MAAM,OAAO,KAAK,MAAM,aAAa,MAAM,gBAAgB,IAAI;CACrE,OAAO,oBAAoB,OAAO,GAAG;AACvC;AACA,IAAI,aAAa;AACjB,IAAI,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
1
+ {"version":3,"file":"shared.native.js","names":[],"sources":["jsx/shared.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 shared_exports = {};\n__export(shared_exports, {\n INPUT_NAME: () => INPUT_NAME,\n defaultStyles: () => defaultStyles,\n resolveMultilineInputSize: () => resolveMultilineInputSize,\n resolveTextAreaSize: () => resolveTextAreaSize,\n styledBody: () => styledBody\n});\nmodule.exports = __toCommonJS(shared_exports);\nvar import_core = require(\"@tamagui/core\");\nvar defaultStyles = {\n outlineWidth: 0,\n tabIndex: 0,\n // this fixes a flex bug where it overflows container\n minWidth: 0\n};\nvar resolveTextAreaSize = function resolveTextAreaSize2(props, env) {\n var _props_fontSize, _props_lineHeight, _props_rows;\n var _font_lineHeight, _font_lineHeight1;\n var font = props.fontFamily ? env.fonts[props.fontFamily] : env.font;\n var defaultKey = font && \"sm\" in font.size ? \"sm\" : \"4\";\n var fontSize = (_props_fontSize = props.fontSize) !== null && _props_fontSize !== void 0 ? _props_fontSize : defaultKey;\n var lineHeight = (_props_lineHeight = props.lineHeight) !== null && _props_lineHeight !== void 0 ? _props_lineHeight : font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[defaultKey];\n var configuredSize = typeof fontSize === \"string\" ? font === null || font === void 0 ? void 0 : font.size[fontSize] : void 0;\n var configuredLeading = typeof lineHeight === \"string\" ? font === null || font === void 0 ? void 0 : (_font_lineHeight1 = font.lineHeight) === null || _font_lineHeight1 === void 0 ? void 0 : _font_lineHeight1[lineHeight] : void 0;\n var metrics = {\n fontSize: Number.parseFloat(String((0, import_core.getVariableValue)(configuredSize !== null && configuredSize !== void 0 ? configuredSize : fontSize)))\n };\n var leading = configuredLeading !== null && configuredLeading !== void 0 ? configuredLeading : lineHeight;\n (0, import_core.resolveTextMetrics)(metrics, (props.lineHeight == null || configuredLeading !== void 0) && typeof leading === \"number\" ? `${leading}px` : leading);\n var lines = (_props_rows = props.rows) !== null && _props_rows !== void 0 ? _props_rows : props.numberOfLines;\n var height = typeof lines === \"number\" && typeof metrics.lineHeight === \"number\" ? lines * metrics.lineHeight : void 0;\n return {\n height\n };\n};\nvar resolveMultilineInputSize = function resolveMultilineInputSize2(props, env) {\n if (!(props.rows > 1 || props.multiline || props.numberOfLines > 1)) return;\n return resolveTextAreaSize(props, env);\n};\nvar INPUT_NAME = \"Input\";\nvar styledBody = [\n {\n name: INPUT_NAME,\n render: \"input\",\n ...defaultStyles,\n variants: {\n disabled: {\n true: {}\n }\n }\n },\n {\n isInput: true\n }\n];\n//# sourceMappingURL=shared.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,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,kBAAkB;CAClB,qBAAqB;CACrB,iCAAiC;CACjC,2BAA2B;CAC3B,kBAAkB;AACpB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB;CAClB,cAAc;CACd,UAAU;CAEV,UAAU;AACZ;AACA,IAAI,sBAAsB,SAAS,qBAAqB,OAAO,KAAK;CAClE,IAAI,iBA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SAAS,2BAA2B,OAAO,KAAK;CAC9E,IAAI,EAAE,MAAM,OAAO,KAAK,MAAM,aAAa,MAAM,gBAAgB,IAAI;CACrE,OAAO,oBAAoB,OAAO,GAAG;AACvC;AACA,IAAI,aAAa;AACjB,IAAI,aAAa,CACf;CACE,MAAM;CACN,QAAQ;CACR,GAAG;CACH,UAAU,EACR,UAAU,EACR,MAAM,CAAC,EACT,EACF;AACF,GACA,EACE,SAAS,KACX,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/input",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "license": "MIT",
5
5
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
6
6
  "source": "src/index.ts",
@@ -37,20 +37,20 @@
37
37
  "test:web": "vitest --typecheck --run"
38
38
  },
39
39
  "dependencies": {
40
- "@tamagui/core": "3.0.7",
41
- "@tamagui/element": "3.0.7",
42
- "@tamagui/focusable": "3.0.7",
43
- "@tamagui/font-size": "3.0.7",
44
- "@tamagui/get-font-sized": "3.0.7",
45
- "@tamagui/helpers": "3.0.7",
46
- "@tamagui/helpers-tamagui": "3.0.7",
47
- "@tamagui/react-native-types": "3.0.7",
48
- "@tamagui/stacks": "3.0.7",
49
- "@tamagui/text": "3.0.7",
50
- "@tamagui/web": "3.0.7"
40
+ "@tamagui/core": "3.0.9",
41
+ "@tamagui/element": "3.0.9",
42
+ "@tamagui/focusable": "3.0.9",
43
+ "@tamagui/font-size": "3.0.9",
44
+ "@tamagui/get-font-sized": "3.0.9",
45
+ "@tamagui/helpers": "3.0.9",
46
+ "@tamagui/helpers-tamagui": "3.0.9",
47
+ "@tamagui/react-native-types": "3.0.9",
48
+ "@tamagui/stacks": "3.0.9",
49
+ "@tamagui/text": "3.0.9",
50
+ "@tamagui/web": "3.0.9"
51
51
  },
52
52
  "devDependencies": {
53
- "@tamagui/build": "3.0.7",
53
+ "@tamagui/build": "3.0.9",
54
54
  "react": "19.2.3",
55
55
  "react-native": "0.87.1",
56
56
  "vitest": "4.1.0"
@@ -64,5 +64,5 @@
64
64
  "url": "git+https://github.com/tamagui/tamagui.git",
65
65
  "directory": "code/ui/input"
66
66
  },
67
- "releaseSourceCommit": "96f8bc1f222af0381729a2e2202370aa4a9808ef"
67
+ "releaseSourceCommit": "1971272fa9915450004c84ea48188100fdf278ff"
68
68
  }