@tamagui/input 1.143.0 → 1.143.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/package.json +13 -13
  2. package/src/index.ts +1 -0
  3. package/src/types.ts +1 -1
  4. package/types/Input.d.ts +2 -2
  5. package/types/Input.native.d.ts +2 -2
  6. package/types/TextArea.d.ts +1 -1
  7. package/types/index.d.ts +1 -0
  8. package/types/index.d.ts.map +1 -1
  9. package/types/types.d.ts +1 -1
  10. package/types/types.d.ts.map +1 -1
  11. package/dist/cjs/v1/Input.cjs +0 -190
  12. package/dist/cjs/v1/Input.js +0 -171
  13. package/dist/cjs/v1/Input.js.map +0 -6
  14. package/dist/cjs/v1/Input.native.js +0 -138
  15. package/dist/cjs/v1/Input.native.js.map +0 -1
  16. package/dist/cjs/v1/TextArea.cjs +0 -50
  17. package/dist/cjs/v1/TextArea.js +0 -43
  18. package/dist/cjs/v1/TextArea.js.map +0 -6
  19. package/dist/cjs/v1/TextArea.native.js +0 -53
  20. package/dist/cjs/v1/TextArea.native.js.map +0 -1
  21. package/dist/cjs/v1/index.cjs +0 -19
  22. package/dist/cjs/v1/index.js +0 -16
  23. package/dist/cjs/v1/index.js.map +0 -6
  24. package/dist/cjs/v1/index.native.js +0 -22
  25. package/dist/cjs/v1/index.native.js.map +0 -1
  26. package/dist/cjs/v1/types.cjs +0 -16
  27. package/dist/cjs/v1/types.js +0 -14
  28. package/dist/cjs/v1/types.js.map +0 -6
  29. package/dist/cjs/v1/types.native.js +0 -19
  30. package/dist/cjs/v1/types.native.js.map +0 -1
  31. package/dist/esm/v1/Input.js +0 -151
  32. package/dist/esm/v1/Input.js.map +0 -6
  33. package/dist/esm/v1/Input.mjs +0 -156
  34. package/dist/esm/v1/Input.mjs.map +0 -1
  35. package/dist/esm/v1/Input.native.js +0 -101
  36. package/dist/esm/v1/Input.native.js.map +0 -1
  37. package/dist/esm/v1/TextArea.js +0 -29
  38. package/dist/esm/v1/TextArea.js.map +0 -6
  39. package/dist/esm/v1/TextArea.mjs +0 -27
  40. package/dist/esm/v1/TextArea.mjs.map +0 -1
  41. package/dist/esm/v1/TextArea.native.js +0 -27
  42. package/dist/esm/v1/TextArea.native.js.map +0 -1
  43. package/dist/esm/v1/index.js +0 -3
  44. package/dist/esm/v1/index.js.map +0 -6
  45. package/dist/esm/v1/index.mjs +0 -3
  46. package/dist/esm/v1/index.mjs.map +0 -1
  47. package/dist/esm/v1/index.native.js +0 -3
  48. package/dist/esm/v1/index.native.js.map +0 -1
  49. package/dist/esm/v1/types.js +0 -1
  50. package/dist/esm/v1/types.js.map +0 -6
  51. package/dist/esm/v1/types.mjs +0 -2
  52. package/dist/esm/v1/types.mjs.map +0 -1
  53. package/dist/esm/v1/types.native.js +0 -2
  54. package/dist/esm/v1/types.native.js.map +0 -1
  55. package/dist/jsx/v1/Input.js +0 -151
  56. package/dist/jsx/v1/Input.js.map +0 -6
  57. package/dist/jsx/v1/Input.mjs +0 -156
  58. package/dist/jsx/v1/Input.mjs.map +0 -1
  59. package/dist/jsx/v1/Input.native.js +0 -138
  60. package/dist/jsx/v1/Input.native.js.map +0 -1
  61. package/dist/jsx/v1/TextArea.js +0 -29
  62. package/dist/jsx/v1/TextArea.js.map +0 -6
  63. package/dist/jsx/v1/TextArea.mjs +0 -27
  64. package/dist/jsx/v1/TextArea.mjs.map +0 -1
  65. package/dist/jsx/v1/TextArea.native.js +0 -53
  66. package/dist/jsx/v1/TextArea.native.js.map +0 -1
  67. package/dist/jsx/v1/index.js +0 -3
  68. package/dist/jsx/v1/index.js.map +0 -6
  69. package/dist/jsx/v1/index.mjs +0 -3
  70. package/dist/jsx/v1/index.mjs.map +0 -1
  71. package/dist/jsx/v1/index.native.js +0 -22
  72. package/dist/jsx/v1/index.native.js.map +0 -1
  73. package/dist/jsx/v1/types.js +0 -1
  74. package/dist/jsx/v1/types.js.map +0 -6
  75. package/dist/jsx/v1/types.mjs +0 -2
  76. package/dist/jsx/v1/types.mjs.map +0 -1
  77. package/dist/jsx/v1/types.native.js +0 -19
  78. package/dist/jsx/v1/types.native.js.map +0 -1
  79. package/types/v1/Input.d.ts.map +0 -1
  80. package/types/v1/Input.native.d.ts.map +0 -1
  81. package/types/v1/TextArea.d.ts.map +0 -1
  82. package/types/v1/index.d.ts.map +0 -1
  83. package/types/v1/types.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/input",
3
- "version": "1.143.0",
3
+ "version": "1.143.1",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -39,20 +39,20 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@tamagui/core": "1.143.0",
43
- "@tamagui/focusable": "1.143.0",
44
- "@tamagui/font-size": "1.143.0",
45
- "@tamagui/get-button-sized": "1.143.0",
46
- "@tamagui/get-font-sized": "1.143.0",
47
- "@tamagui/get-token": "1.143.0",
48
- "@tamagui/helpers": "1.143.0",
49
- "@tamagui/helpers-tamagui": "1.143.0",
50
- "@tamagui/stacks": "1.143.0",
51
- "@tamagui/text": "1.143.0",
52
- "@tamagui/web": "1.143.0"
42
+ "@tamagui/core": "1.143.1",
43
+ "@tamagui/focusable": "1.143.1",
44
+ "@tamagui/font-size": "1.143.1",
45
+ "@tamagui/get-button-sized": "1.143.1",
46
+ "@tamagui/get-font-sized": "1.143.1",
47
+ "@tamagui/get-token": "1.143.1",
48
+ "@tamagui/helpers": "1.143.1",
49
+ "@tamagui/helpers-tamagui": "1.143.1",
50
+ "@tamagui/stacks": "1.143.1",
51
+ "@tamagui/text": "1.143.1",
52
+ "@tamagui/web": "1.143.1"
53
53
  },
54
54
  "devDependencies": {
55
- "@tamagui/build": "1.143.0",
55
+ "@tamagui/build": "1.143.1",
56
56
  "react": "*",
57
57
  "react-native": "0.81.5",
58
58
  "vitest": "^4.0.4"
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './Input'
2
2
  export * from './TextArea'
3
3
  export { inputSizeVariant, textAreaSizeVariant } from './shared'
4
+ export type { InputProps } from './types'
package/src/types.ts CHANGED
@@ -37,7 +37,7 @@ export type InputProps = StackProps &
37
37
  /**
38
38
  * @deprecated - use `onChange` instead
39
39
  */
40
- onChangeText?: TextInputProps['onChange']
40
+ onChangeText?: TextInputProps['onChangeText']
41
41
  /**
42
42
  * @deprecated - use `readOnly` instead
43
43
  */
package/types/Input.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
9
9
  unstyled?: boolean | undefined;
10
10
  }>, "focusable" | "media" | "color" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "onStartShouldSetResponder" | "onLayout" | "href" | "rel" | "download" | "dir" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "allowFontScaling" | "numberOfLines" | "maxFontSizeMultiplier" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "textAlign" | "textAlignVertical" | "summary" | "list" | "max" | "min" | "form" | "cite" | "data" | "label" | "slot" | "span" | "title" | "wrap" | "hidden" | "default" | "open" | "name" | "key" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "method" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "value" | "wmode" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor" | "blurOnSubmit" | "submitBehavior" | "caretHidden" | "contextMenuHidden" | "multiline" | "onContentSizeChange" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "returnKeyType" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "textContentType" | "scrollEnabled" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus"> & import("@tamagui/core").StackNonStyleProps & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").WithThemeShorthandsAndPseudos<import("@tamagui/core").StackStyleBase, {}>> & Omit<React.ClassAttributes<HTMLInputElement> & React.HTMLProps<HTMLInputElement>, "size" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "value" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "enterKeyHint" | "inputMode" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor"> & {
11
11
  secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
12
- onChangeText?: import("react-native").TextInputProps["onChange"];
12
+ onChangeText?: import("react-native").TextInputProps["onChangeText"];
13
13
  editable?: import("react-native").TextInputProps["editable"];
14
14
  enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
15
15
  keyboardType?: import("react-native").TextInputProps["keyboardType"];
@@ -21,7 +21,7 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
21
21
  numberOfLines?: number;
22
22
  }, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & import("@tamagui/core").StackNonStyleProps & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").WithThemeShorthandsAndPseudos<import("@tamagui/core").StackStyleBase, {}>> & Omit<React.ClassAttributes<HTMLInputElement> & React.HTMLProps<HTMLInputElement>, "size" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "value" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "enterKeyHint" | "inputMode" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor"> & {
23
23
  secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
24
- onChangeText?: import("react-native").TextInputProps["onChange"];
24
+ onChangeText?: import("react-native").TextInputProps["onChangeText"];
25
25
  editable?: import("react-native").TextInputProps["editable"];
26
26
  enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
27
27
  keyboardType?: import("react-native").TextInputProps["keyboardType"];
@@ -6,7 +6,7 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
6
6
  unstyled?: boolean | undefined;
7
7
  }>, "focusable" | "media" | "color" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "onStartShouldSetResponder" | "onLayout" | "href" | "rel" | "download" | "dir" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "allowFontScaling" | "numberOfLines" | "maxFontSizeMultiplier" | "lineBreakStrategyIOS" | "selectionColor" | "textBreakStrategy" | "textAlign" | "textAlignVertical" | "summary" | "list" | "max" | "min" | "form" | "cite" | "data" | "label" | "slot" | "span" | "title" | "wrap" | "hidden" | "default" | "open" | "name" | "key" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "method" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "value" | "wmode" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor" | "blurOnSubmit" | "submitBehavior" | "caretHidden" | "contextMenuHidden" | "multiline" | "onContentSizeChange" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "returnKeyType" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "textContentType" | "scrollEnabled" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus"> & import("@tamagui/core").StackNonStyleProps & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").WithThemeShorthandsAndPseudos<import("@tamagui/core").StackStyleBase, {}>> & Omit<React.ClassAttributes<HTMLInputElement> & React.HTMLProps<HTMLInputElement>, "size" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "value" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "enterKeyHint" | "inputMode" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor"> & {
8
8
  secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
9
- onChangeText?: import("react-native").TextInputProps["onChange"];
9
+ onChangeText?: import("react-native").TextInputProps["onChangeText"];
10
10
  editable?: import("react-native").TextInputProps["editable"];
11
11
  enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
12
12
  keyboardType?: import("react-native").TextInputProps["keyboardType"];
@@ -18,7 +18,7 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
18
18
  numberOfLines?: number;
19
19
  }, TextInput, import("@tamagui/core").TamaguiComponentPropsBaseBase & import("react-native").TextInputProps & import("@tamagui/core").StackNonStyleProps & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").WithThemeShorthandsAndPseudos<import("@tamagui/core").StackStyleBase, {}>> & Omit<React.ClassAttributes<HTMLInputElement> & React.HTMLProps<HTMLInputElement>, "size" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "value" | keyof import("@tamagui/core").StackStyleBase | keyof import("@tamagui/core").StackNonStyleProps | keyof import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "enterKeyHint" | "inputMode" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor"> & {
20
20
  secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
21
- onChangeText?: import("react-native").TextInputProps["onChange"];
21
+ onChangeText?: import("react-native").TextInputProps["onChangeText"];
22
22
  editable?: import("react-native").TextInputProps["editable"];
23
23
  enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
24
24
  keyboardType?: import("react-native").TextInputProps["keyboardType"];
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export declare const TextArea: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & import("@tamagui/web").StackNonStyleProps & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>> & import("@tamagui/web").WithMediaProps<import("@tamagui/web").WithThemeShorthandsAndPseudos<import("@tamagui/web").StackStyleBase, {}>> & Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").HTMLProps<HTMLInputElement>, "size" | `$${string}` | `$${number}` | import("@tamagui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "value" | keyof import("@tamagui/web").StackStyleBase | keyof import("@tamagui/web").StackNonStyleProps | keyof import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>>> & Pick<import("@tamagui/web").TextProps, "color"> & Omit<import("react").CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "enterKeyHint" | "inputMode" | "secureTextEntry" | "onChangeText" | "editable" | "keyboardType" | "placeholderTextColor"> & {
6
6
  secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
7
- onChangeText?: import("react-native").TextInputProps["onChange"];
7
+ onChangeText?: import("react-native").TextInputProps["onChangeText"];
8
8
  editable?: import("react-native").TextInputProps["editable"];
9
9
  enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
10
10
  keyboardType?: import("react-native").TextInputProps["keyboardType"];
package/types/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './Input';
2
2
  export * from './TextArea';
3
3
  export { inputSizeVariant, textAreaSizeVariant } from './shared';
4
+ export type { InputProps } from './types';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
package/types/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export type InputProps = StackProps & Omit<DetailedInputProps, 'className' | 'ch
9
9
  /**
10
10
  * @deprecated - use `onChange` instead
11
11
  */
12
- onChangeText?: TextInputProps['onChange'];
12
+ onChangeText?: TextInputProps['onChangeText'];
13
13
  /**
14
14
  * @deprecated - use `readOnly` instead
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO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AgB,CAAA;IAC5B,oBAAoB,CAAC,EAAE,WAAW,CAAA;IAClC,cAAc,CAAC,EAAE,WAAW,CAAA;IAC5B,GAAG,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA"}
@@ -1,190 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
32
- var Input_exports = {};
33
- __export(Input_exports, {
34
- Input: () => Input
35
- });
36
- module.exports = __toCommonJS(Input_exports);
37
- var import_core = require("@tamagui/core"),
38
- import_focusable = require("@tamagui/focusable"),
39
- import_react = __toESM(require("react"), 1),
40
- import_shared = require("../shared.cjs"),
41
- import_jsx_runtime = require("react/jsx-runtime");
42
- const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]),
43
- Input = StyledInput.styleable((inProps, forwardedRef) => {
44
- const {
45
- // some of destructed props are just to avoid passing them to ...rest because they are not in web.
46
- allowFontScaling,
47
- selectTextOnFocus,
48
- showSoftInputOnFocus,
49
- textContentType,
50
- passwordRules,
51
- textBreakStrategy,
52
- underlineColorAndroid,
53
- selection,
54
- lineBreakStrategyIOS,
55
- returnKeyLabel,
56
- disabled,
57
- onSubmitEditing,
58
- caretHidden,
59
- clearButtonMode,
60
- clearTextOnFocus,
61
- contextMenuHidden,
62
- dataDetectorTypes,
63
- id,
64
- enablesReturnKeyAutomatically,
65
- importantForAutofill,
66
- inlineImageLeft,
67
- inlineImagePadding,
68
- inputAccessoryViewID,
69
- keyboardAppearance,
70
- keyboardType,
71
- cursorColor,
72
- disableFullscreenUI,
73
- editable,
74
- maxFontSizeMultiplier,
75
- multiline,
76
- numberOfLines,
77
- onChangeText,
78
- onContentSizeChange,
79
- onEndEditing,
80
- onScroll,
81
- onSelectionChange,
82
- // @ts-ignore
83
- caretColor,
84
- placeholderTextColor,
85
- blurOnSubmit,
86
- enterKeyHint,
87
- returnKeyType,
88
- rejectResponderTermination,
89
- scrollEnabled,
90
- secureTextEntry,
91
- selectionColor,
92
- inputMode,
93
- ...rest
94
- } = inProps,
95
- ref = import_react.default.useRef(null),
96
- theme = (0, import_core.useTheme)(),
97
- composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref),
98
- _onSelectionChange = (0, import_core.useEvent)(() => {
99
- const start = ref.current?.selectionStart ?? 0,
100
- end = ref.current?.selectionEnd ?? 0;
101
- onSelectionChange?.({
102
- nativeEvent: {
103
- selection: {
104
- end,
105
- start
106
- }
107
- }
108
- });
109
- });
110
- import_react.default.useEffect(() => {
111
- if (onSelectionChange) return ref.current?.addEventListener("selectionchange", _onSelectionChange), () => {
112
- ref.current?.removeEventListener("selectionchange", _onSelectionChange);
113
- };
114
- }, []), import_react.default.useEffect(() => {
115
- selection && ref.current?.setSelectionRange(selection.start || null, selection.end || null);
116
- }, [selection?.start, selection?.end]);
117
- const finalProps = {
118
- ...rest,
119
- disabled,
120
- caretColor,
121
- id,
122
- enterKeyHint,
123
- type: (() => {
124
- if (rest?.type) return rest.type;
125
- if (secureTextEntry) return "password";
126
- switch (keyboardType) {
127
- case "number-pad":
128
- case "numeric":
129
- return "number";
130
- case "email-address":
131
- return "email";
132
- case "phone-pad":
133
- return "tel";
134
- case "url":
135
- return "url";
136
- default:
137
- return "text";
138
- }
139
- })(),
140
- inputMode: (() => {
141
- switch (keyboardType) {
142
- case "number-pad":
143
- case "numeric":
144
- return "numeric";
145
- case "decimal-pad":
146
- return "decimal";
147
- case "email-address":
148
- return "email";
149
- case "phone-pad":
150
- return "tel";
151
- case "url":
152
- return "url";
153
- default:
154
- return;
155
- }
156
- })(),
157
- style: {
158
- ...rest.style,
159
- ...(placeholderTextColor && {
160
- "--placeholderColor": theme[placeholderTextColor]?.variable || placeholderTextColor
161
- }),
162
- ...(selectionColor && {
163
- "--selectionColor": theme[selectionColor]?.variable || selectionColor
164
- })
165
- }
166
- };
167
- return import_react.default.useEffect(() => {
168
- if (id && !disabled) return (0, import_focusable.registerFocusable)(id, {
169
- focusAndSelect: () => {
170
- ref.current?.focus();
171
- },
172
- focus: () => {}
173
- });
174
- }, [id, disabled]), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
175
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)("style", {
176
- children: `
177
- input::selection, textarea::selection {
178
- background-color: var(--selectionBackground) !important;
179
- }
180
-
181
- input::placeholder, textarea::placeholder {
182
- color: var(--placeholderColor) !important;
183
- }
184
- `
185
- }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(StyledInput, {
186
- ref: composedRefs,
187
- ...finalProps
188
- })]
189
- });
190
- });
@@ -1,171 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var Input_exports = {};
24
- __export(Input_exports, {
25
- Input: () => Input
26
- });
27
- module.exports = __toCommonJS(Input_exports);
28
- var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react = __toESM(require("react"), 1), import_shared = require("../shared"), import_jsx_runtime = require("react/jsx-runtime");
29
- const StyledInput = (0, import_core.styled)(import_core.View, import_shared.styledBody[0], import_shared.styledBody[1]), Input = StyledInput.styleable((inProps, forwardedRef) => {
30
- const {
31
- // some of destructed props are just to avoid passing them to ...rest because they are not in web.
32
- allowFontScaling,
33
- selectTextOnFocus,
34
- showSoftInputOnFocus,
35
- textContentType,
36
- passwordRules,
37
- textBreakStrategy,
38
- underlineColorAndroid,
39
- selection,
40
- lineBreakStrategyIOS,
41
- returnKeyLabel,
42
- disabled,
43
- onSubmitEditing,
44
- caretHidden,
45
- clearButtonMode,
46
- clearTextOnFocus,
47
- contextMenuHidden,
48
- dataDetectorTypes,
49
- id,
50
- enablesReturnKeyAutomatically,
51
- importantForAutofill,
52
- inlineImageLeft,
53
- inlineImagePadding,
54
- inputAccessoryViewID,
55
- keyboardAppearance,
56
- keyboardType,
57
- cursorColor,
58
- disableFullscreenUI,
59
- editable,
60
- maxFontSizeMultiplier,
61
- multiline,
62
- numberOfLines,
63
- onChangeText,
64
- onContentSizeChange,
65
- onEndEditing,
66
- onScroll,
67
- onSelectionChange,
68
- // @ts-ignore
69
- caretColor,
70
- placeholderTextColor,
71
- blurOnSubmit,
72
- enterKeyHint,
73
- returnKeyType,
74
- rejectResponderTermination,
75
- scrollEnabled,
76
- secureTextEntry,
77
- selectionColor,
78
- inputMode,
79
- ...rest
80
- } = inProps, ref = import_react.default.useRef(null), theme = (0, import_core.useTheme)(), composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref), _onSelectionChange = (0, import_core.useEvent)(() => {
81
- const start = ref.current?.selectionStart ?? 0, end = ref.current?.selectionEnd ?? 0;
82
- onSelectionChange?.({
83
- nativeEvent: {
84
- selection: {
85
- end,
86
- start
87
- }
88
- }
89
- });
90
- });
91
- import_react.default.useEffect(() => {
92
- if (onSelectionChange)
93
- return ref.current?.addEventListener("selectionchange", _onSelectionChange), () => {
94
- ref.current?.removeEventListener("selectionchange", _onSelectionChange);
95
- };
96
- }, []), import_react.default.useEffect(() => {
97
- selection && ref.current?.setSelectionRange(selection.start || null, selection.end || null);
98
- }, [selection?.start, selection?.end]);
99
- const finalProps = {
100
- ...rest,
101
- disabled,
102
- caretColor,
103
- id,
104
- enterKeyHint,
105
- type: (() => {
106
- if (rest?.type) return rest.type;
107
- if (secureTextEntry) return "password";
108
- switch (keyboardType) {
109
- case "number-pad":
110
- case "numeric":
111
- return "number";
112
- case "email-address":
113
- return "email";
114
- case "phone-pad":
115
- return "tel";
116
- case "url":
117
- return "url";
118
- default:
119
- return "text";
120
- }
121
- })(),
122
- inputMode: (() => {
123
- switch (keyboardType) {
124
- case "number-pad":
125
- case "numeric":
126
- return "numeric";
127
- case "decimal-pad":
128
- return "decimal";
129
- case "email-address":
130
- return "email";
131
- case "phone-pad":
132
- return "tel";
133
- case "url":
134
- return "url";
135
- default:
136
- return;
137
- }
138
- })(),
139
- style: {
140
- ...rest.style,
141
- ...placeholderTextColor && {
142
- "--placeholderColor": theme[placeholderTextColor]?.variable || placeholderTextColor
143
- },
144
- ...selectionColor && {
145
- "--selectionColor": theme[selectionColor]?.variable || selectionColor
146
- }
147
- }
148
- };
149
- return import_react.default.useEffect(() => {
150
- if (id && !disabled)
151
- return (0, import_focusable.registerFocusable)(id, {
152
- focusAndSelect: () => {
153
- ref.current?.focus();
154
- },
155
- focus: () => {
156
- }
157
- });
158
- }, [id, disabled]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `
160
- input::selection, textarea::selection {
161
- background-color: var(--selectionBackground) !important;
162
- }
163
-
164
- input::placeholder, textarea::placeholder {
165
- color: var(--placeholderColor) !important;
166
- }
167
- ` }),
168
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledInput, { ref: composedRefs, ...finalProps })
169
- ] });
170
- });
171
- //# sourceMappingURL=Input.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/Input.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkE,0BAClE,mBAAkC,+BAClC,eAAwE,8BACxE,gBAA2B,sBAyKvB;AAtKJ,MAAM,kBAAc,oBAAO,kBAAM,yBAAW,CAAC,GAAG,yBAAW,CAAC,CAAC,GAOhD,QAAQ,YAAY,UAAsB,CAAC,SAAS,iBAAiB;AAChF,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