@tamagui/input 1.143.1 → 2.0.0-1767740890268

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 (130) hide show
  1. package/dist/cjs/Input.cjs +57 -122
  2. package/dist/cjs/Input.js +46 -115
  3. package/dist/cjs/Input.js.map +1 -1
  4. package/dist/cjs/Input.native.js +133 -71
  5. package/dist/cjs/Input.native.js.map +1 -1
  6. package/dist/cjs/TextArea.cjs +1 -1
  7. package/dist/cjs/TextArea.js +1 -1
  8. package/dist/cjs/TextArea.js.map +1 -1
  9. package/dist/cjs/TextArea.native.js +1 -1
  10. package/dist/cjs/TextArea.native.js.map +1 -1
  11. package/dist/cjs/v1/Input.cjs +190 -0
  12. package/dist/cjs/v1/Input.js +171 -0
  13. package/dist/cjs/v1/Input.js.map +6 -0
  14. package/dist/cjs/v1/Input.native.js +138 -0
  15. package/dist/cjs/v1/Input.native.js.map +1 -0
  16. package/dist/cjs/v1/TextArea.cjs +50 -0
  17. package/dist/cjs/v1/TextArea.js +43 -0
  18. package/dist/cjs/v1/TextArea.js.map +6 -0
  19. package/dist/cjs/v1/TextArea.native.js +53 -0
  20. package/dist/cjs/v1/TextArea.native.js.map +1 -0
  21. package/dist/cjs/v1/index.cjs +19 -0
  22. package/dist/cjs/v1/index.js +16 -0
  23. package/dist/cjs/v1/index.js.map +6 -0
  24. package/dist/cjs/v1/index.native.js +22 -0
  25. package/dist/cjs/v1/index.native.js.map +1 -0
  26. package/dist/cjs/v1/types.cjs +16 -0
  27. package/dist/cjs/v1/types.js +14 -0
  28. package/dist/cjs/v1/types.js.map +6 -0
  29. package/dist/cjs/v1/types.native.js +19 -0
  30. package/dist/cjs/v1/types.native.js.map +1 -0
  31. package/dist/esm/Input.js +47 -116
  32. package/dist/esm/Input.js.map +1 -1
  33. package/dist/esm/Input.mjs +58 -123
  34. package/dist/esm/Input.mjs.map +1 -1
  35. package/dist/esm/Input.native.js +134 -72
  36. package/dist/esm/Input.native.js.map +1 -1
  37. package/dist/esm/TextArea.js +1 -1
  38. package/dist/esm/TextArea.js.map +1 -1
  39. package/dist/esm/TextArea.mjs +1 -1
  40. package/dist/esm/TextArea.mjs.map +1 -1
  41. package/dist/esm/TextArea.native.js +1 -1
  42. package/dist/esm/TextArea.native.js.map +1 -1
  43. package/dist/esm/v1/Input.js +151 -0
  44. package/dist/esm/v1/Input.js.map +6 -0
  45. package/dist/esm/v1/Input.mjs +156 -0
  46. package/dist/esm/v1/Input.mjs.map +1 -0
  47. package/dist/esm/v1/Input.native.js +101 -0
  48. package/dist/esm/v1/Input.native.js.map +1 -0
  49. package/dist/esm/v1/TextArea.js +29 -0
  50. package/dist/esm/v1/TextArea.js.map +6 -0
  51. package/dist/esm/v1/TextArea.mjs +27 -0
  52. package/dist/esm/v1/TextArea.mjs.map +1 -0
  53. package/dist/esm/v1/TextArea.native.js +27 -0
  54. package/dist/esm/v1/TextArea.native.js.map +1 -0
  55. package/dist/esm/v1/index.js +3 -0
  56. package/dist/esm/v1/index.js.map +6 -0
  57. package/dist/esm/v1/index.mjs +3 -0
  58. package/dist/esm/v1/index.mjs.map +1 -0
  59. package/dist/esm/v1/index.native.js +3 -0
  60. package/dist/esm/v1/index.native.js.map +1 -0
  61. package/dist/esm/v1/types.js +1 -0
  62. package/dist/esm/v1/types.js.map +6 -0
  63. package/dist/esm/v1/types.mjs +2 -0
  64. package/dist/esm/v1/types.mjs.map +1 -0
  65. package/dist/esm/v1/types.native.js +2 -0
  66. package/dist/esm/v1/types.native.js.map +1 -0
  67. package/dist/jsx/Input.js +47 -116
  68. package/dist/jsx/Input.js.map +1 -1
  69. package/dist/jsx/Input.mjs +58 -123
  70. package/dist/jsx/Input.mjs.map +1 -1
  71. package/dist/jsx/Input.native.js +133 -71
  72. package/dist/jsx/Input.native.js.map +1 -1
  73. package/dist/jsx/TextArea.js +1 -1
  74. package/dist/jsx/TextArea.js.map +1 -1
  75. package/dist/jsx/TextArea.mjs +1 -1
  76. package/dist/jsx/TextArea.mjs.map +1 -1
  77. package/dist/jsx/TextArea.native.js +1 -1
  78. package/dist/jsx/TextArea.native.js.map +1 -1
  79. package/dist/jsx/v1/Input.js +151 -0
  80. package/dist/jsx/v1/Input.js.map +6 -0
  81. package/dist/jsx/v1/Input.mjs +156 -0
  82. package/dist/jsx/v1/Input.mjs.map +1 -0
  83. package/dist/jsx/v1/Input.native.js +138 -0
  84. package/dist/jsx/v1/Input.native.js.map +1 -0
  85. package/dist/jsx/v1/TextArea.js +29 -0
  86. package/dist/jsx/v1/TextArea.js.map +6 -0
  87. package/dist/jsx/v1/TextArea.mjs +27 -0
  88. package/dist/jsx/v1/TextArea.mjs.map +1 -0
  89. package/dist/jsx/v1/TextArea.native.js +53 -0
  90. package/dist/jsx/v1/TextArea.native.js.map +1 -0
  91. package/dist/jsx/v1/index.js +3 -0
  92. package/dist/jsx/v1/index.js.map +6 -0
  93. package/dist/jsx/v1/index.mjs +3 -0
  94. package/dist/jsx/v1/index.mjs.map +1 -0
  95. package/dist/jsx/v1/index.native.js +22 -0
  96. package/dist/jsx/v1/index.native.js.map +1 -0
  97. package/dist/jsx/v1/types.js +1 -0
  98. package/dist/jsx/v1/types.js.map +6 -0
  99. package/dist/jsx/v1/types.mjs +2 -0
  100. package/dist/jsx/v1/types.mjs.map +1 -0
  101. package/dist/jsx/v1/types.native.js +19 -0
  102. package/dist/jsx/v1/types.native.js.map +1 -0
  103. package/package.json +13 -13
  104. package/src/Input.native.tsx +145 -110
  105. package/src/Input.tsx +67 -137
  106. package/src/TextArea.tsx +4 -2
  107. package/src/types.ts +52 -41
  108. package/src/v1/Input.native.tsx +154 -0
  109. package/src/v1/Input.tsx +191 -0
  110. package/src/v1/TextArea.tsx +35 -0
  111. package/src/v1/index.ts +3 -0
  112. package/src/v1/types.ts +65 -0
  113. package/types/Input.d.ts +47 -21
  114. package/types/Input.d.ts.map +1 -1
  115. package/types/Input.native.d.ts +52 -22
  116. package/types/Input.native.d.ts.map +1 -1
  117. package/types/TextArea.d.ts +25 -11
  118. package/types/TextArea.d.ts.map +1 -1
  119. package/types/types.d.ts +47 -21
  120. package/types/types.d.ts.map +1 -1
  121. package/types/v1/Input.d.ts +115 -0
  122. package/types/v1/Input.d.ts.map +1 -0
  123. package/types/v1/Input.native.d.ts +114 -0
  124. package/types/v1/Input.native.d.ts.map +1 -0
  125. package/types/v1/TextArea.d.ts +98 -0
  126. package/types/v1/TextArea.d.ts.map +1 -0
  127. package/types/v1/index.d.ts +4 -0
  128. package/types/v1/index.d.ts.map +1 -0
  129. package/types/v1/types.d.ts +39 -0
  130. package/types/v1/types.d.ts.map +1 -0
@@ -0,0 +1,154 @@
1
+ import React from 'react'
2
+ import { styled, useComposedRefs } from '@tamagui/core'
3
+ import { registerFocusable } from '@tamagui/focusable'
4
+
5
+ import type { NativeSyntheticEvent, TextInputChangeEventData } from 'react-native'
6
+ import { TextInput } from 'react-native'
7
+ import { styledBody } from '../shared'
8
+ import type { InputProps } from './types'
9
+
10
+ const StyledInput = styled(TextInput, styledBody[0], styledBody[1])
11
+
12
+ /**
13
+ * @deprecated Use the new Input from '@tamagui/input' instead
14
+ */
15
+ export const Input = StyledInput.styleable<InputProps>((inProps, forwardedRef) => {
16
+ const {
17
+ // some of destructed props are just to avoid passing them to ...rest because they are not in native.
18
+ type,
19
+ //@ts-ignore
20
+ dirname,
21
+ max,
22
+ min,
23
+ minLength,
24
+ multiple,
25
+ name,
26
+ required,
27
+ step,
28
+ disabled,
29
+ id,
30
+ // @ts-ignore
31
+ caretColor,
32
+ onChange,
33
+ onInput,
34
+ rows,
35
+ enterKeyHint,
36
+ returnKeyType,
37
+ onKeyDown,
38
+ inputMode,
39
+ tag,
40
+ ...rest
41
+ } = inProps
42
+
43
+ const ref = React.useRef<HTMLInputElement>(null)
44
+
45
+ const composedRefs = useComposedRefs<any>(forwardedRef, ref)
46
+
47
+ // TODO: later move most of the logic to the core package
48
+
49
+ let secureTextEntry = false
50
+ let cursorColor = caretColor
51
+ let _returnKeyType = returnKeyType
52
+ let _enterKeyHint = enterKeyHint
53
+ if (enterKeyHint === 'go') {
54
+ _returnKeyType = 'go'
55
+ _enterKeyHint = undefined
56
+ }
57
+
58
+ let _inputMode = inputMode
59
+ if (type === 'email') {
60
+ _inputMode = 'email'
61
+ } else if (type === 'tel') {
62
+ _inputMode = 'tel'
63
+ } else if (type === 'search') {
64
+ _inputMode = 'search'
65
+ } else if (type === 'url') {
66
+ _inputMode = 'url'
67
+ } else if (type === 'password') {
68
+ secureTextEntry = true
69
+ _inputMode = 'text'
70
+ } else if (type === 'number') {
71
+ _inputMode = 'numeric'
72
+ } else {
73
+ _inputMode = 'text'
74
+ }
75
+
76
+ let showSoftInputOnFocus = true
77
+ if (inputMode === 'none') {
78
+ showSoftInputOnFocus = false
79
+ }
80
+
81
+ const finalProps = {
82
+ ...rest,
83
+ inputMode: _inputMode,
84
+ showSoftInputOnFocus,
85
+ disabled,
86
+ id,
87
+ cursorColor,
88
+ enterKeyHint: _enterKeyHint,
89
+ returnKeyType: _returnKeyType,
90
+ secureTextEntry,
91
+ numberOfLines: rows || rest.numberOfLines,
92
+ } as any
93
+
94
+ if (tag === 'textarea') {
95
+ finalProps.multiline = true
96
+ }
97
+
98
+ if (onKeyDown) {
99
+ finalProps.onKeyPress = (e) => {
100
+ const { key } = e.nativeEvent
101
+ if (
102
+ key === 'Backspace' ||
103
+ (tag === 'textarea' && key === 'Enter') ||
104
+ key.length === 1
105
+ ) {
106
+ onKeyDown({
107
+ key,
108
+ type: 'keydown',
109
+ } as any)
110
+ }
111
+ }
112
+ finalProps.onSubmitEditing = (e) => {
113
+ onKeyDown({
114
+ key: 'Enter',
115
+ type: 'keydown',
116
+ } as any)
117
+ }
118
+ }
119
+
120
+ if (onChange || onInput) {
121
+ finalProps.onChange = (e: NativeSyntheticEvent<TextInputChangeEventData>) => {
122
+ const { text } = e.nativeEvent
123
+ if (onChange) {
124
+ onChange({
125
+ target: {
126
+ value: text,
127
+ },
128
+ type: 'change',
129
+ } as any)
130
+ }
131
+ if (onInput != null) {
132
+ onInput({
133
+ target: {
134
+ value: text,
135
+ },
136
+ type: 'input',
137
+ } as any)
138
+ }
139
+ }
140
+ }
141
+
142
+ React.useEffect(() => {
143
+ if (!id) return
144
+ if (disabled) return
145
+
146
+ return registerFocusable(id, {
147
+ focusAndSelect: () => {
148
+ ref.current?.focus()
149
+ },
150
+ focus: () => {},
151
+ })
152
+ }, [id, disabled])
153
+ return <StyledInput onChange={(e) => {}} ref={composedRefs} {...finalProps} />
154
+ })
@@ -0,0 +1,191 @@
1
+ import { View, styled, useComposedRefs, useEvent, useTheme } from '@tamagui/core'
2
+ import { registerFocusable } from '@tamagui/focusable'
3
+ import React, { type HTMLAttributes, type HTMLInputTypeAttribute } from 'react'
4
+ import { styledBody } from '../shared'
5
+ import type { InputProps } from './types'
6
+
7
+ const StyledInput = styled(View, styledBody[0], styledBody[1])
8
+
9
+ /**
10
+ * @deprecated Use the new Input from '@tamagui/input' instead
11
+ * @summary An input is a text field that allows users to enter text.
12
+ * @see — Docs https://tamagui.dev/ui/inputs#input
13
+ */
14
+ export const Input = StyledInput.styleable<InputProps>((inProps, forwardedRef) => {
15
+ const {
16
+ // some of destructed props are just to avoid passing them to ...rest because they are not in web.
17
+ allowFontScaling,
18
+ selectTextOnFocus,
19
+ showSoftInputOnFocus,
20
+ textContentType,
21
+ passwordRules,
22
+ textBreakStrategy,
23
+ underlineColorAndroid,
24
+ selection,
25
+ lineBreakStrategyIOS,
26
+ returnKeyLabel,
27
+ disabled,
28
+ onSubmitEditing,
29
+ caretHidden,
30
+ clearButtonMode,
31
+ clearTextOnFocus,
32
+ contextMenuHidden,
33
+ dataDetectorTypes,
34
+ id,
35
+ enablesReturnKeyAutomatically,
36
+ importantForAutofill,
37
+ inlineImageLeft,
38
+ inlineImagePadding,
39
+ inputAccessoryViewID,
40
+ keyboardAppearance,
41
+ keyboardType,
42
+ cursorColor,
43
+ disableFullscreenUI,
44
+ editable,
45
+ maxFontSizeMultiplier,
46
+ multiline,
47
+ numberOfLines,
48
+ onChangeText,
49
+ onContentSizeChange,
50
+ onEndEditing,
51
+ onScroll,
52
+ onSelectionChange,
53
+ // @ts-ignore
54
+ caretColor,
55
+ placeholderTextColor,
56
+ blurOnSubmit,
57
+ enterKeyHint,
58
+ returnKeyType,
59
+ rejectResponderTermination,
60
+ scrollEnabled,
61
+ secureTextEntry,
62
+ selectionColor,
63
+ inputMode,
64
+ ...rest
65
+ } = inProps
66
+
67
+ const ref = React.useRef<HTMLInputElement>(null)
68
+ const theme = useTheme()
69
+
70
+ const composedRefs = useComposedRefs(forwardedRef, ref)
71
+
72
+ const _onSelectionChange = useEvent(() => {
73
+ const start = ref.current?.selectionStart ?? 0
74
+ const end = ref.current?.selectionEnd ?? 0
75
+ onSelectionChange?.({
76
+ nativeEvent: {
77
+ selection: {
78
+ end,
79
+ start,
80
+ },
81
+ },
82
+ } as any)
83
+ })
84
+
85
+ React.useEffect(() => {
86
+ if (onSelectionChange) {
87
+ ref.current?.addEventListener('selectionchange', _onSelectionChange)
88
+ return () => {
89
+ ref.current?.removeEventListener('selectionchange', _onSelectionChange)
90
+ }
91
+ }
92
+ }, [])
93
+
94
+ React.useEffect(() => {
95
+ if (selection) {
96
+ ref.current?.setSelectionRange(selection.start || null, selection.end || null)
97
+ }
98
+ }, [selection?.start, selection?.end])
99
+
100
+ const finalProps = {
101
+ ...rest,
102
+ disabled,
103
+ caretColor,
104
+ id,
105
+ enterKeyHint,
106
+ ...(process.env.TAMAGUI_TARGET === 'web'
107
+ ? {
108
+ type: (() => {
109
+ if (rest?.type) return rest.type
110
+ if (secureTextEntry) return 'password'
111
+ switch (keyboardType) {
112
+ case 'number-pad':
113
+ case 'numeric':
114
+ return 'number'
115
+ case 'email-address':
116
+ return 'email'
117
+ case 'phone-pad':
118
+ return 'tel'
119
+ case 'url':
120
+ return 'url'
121
+ default:
122
+ return 'text'
123
+ }
124
+ })() satisfies HTMLInputTypeAttribute,
125
+ inputMode: (() => {
126
+ switch (keyboardType) {
127
+ case 'number-pad':
128
+ case 'numeric':
129
+ return 'numeric'
130
+ case 'decimal-pad':
131
+ return 'decimal'
132
+ case 'email-address':
133
+ return 'email'
134
+ case 'phone-pad':
135
+ return 'tel'
136
+ case 'url':
137
+ return 'url'
138
+ default:
139
+ return undefined
140
+ }
141
+ })() satisfies HTMLAttributes<HTMLInputElement>['inputMode'],
142
+ }
143
+ : {
144
+ keyboardType,
145
+ secureTextEntry,
146
+ inputMode,
147
+ }),
148
+ style: {
149
+ ...(rest.style as any),
150
+ ...(placeholderTextColor && {
151
+ '--placeholderColor':
152
+ theme[placeholderTextColor]?.variable || placeholderTextColor,
153
+ }),
154
+ ...(selectionColor && {
155
+ '--selectionColor': theme[selectionColor]?.variable || selectionColor,
156
+ }),
157
+ },
158
+ } as any
159
+
160
+ React.useEffect(() => {
161
+ if (!id) return
162
+ if (disabled) return
163
+
164
+ return registerFocusable(id, {
165
+ focusAndSelect: () => {
166
+ ref.current?.focus()
167
+ },
168
+ focus: () => {},
169
+ })
170
+ }, [id, disabled])
171
+
172
+ return (
173
+ <>
174
+ {process.env.TAMAGUI_TARGET === 'web' && (
175
+ <style>
176
+ {`
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
+ </style>
186
+ )}
187
+
188
+ <StyledInput ref={composedRefs} {...finalProps} />
189
+ </>
190
+ )
191
+ })
@@ -0,0 +1,35 @@
1
+ import { styled } from '@tamagui/web'
2
+ import { Input } from './Input'
3
+ import { defaultStyles, textAreaSizeVariant } from '../shared'
4
+
5
+ /**
6
+ * @deprecated Use the new TextArea from '@tamagui/input' instead
7
+ * @summary A text area is a multi-line input field that allows users to enter text.
8
+ * @see — Docs https://tamagui.dev/ui/inputs#textarea
9
+ */
10
+ export const TextArea = styled(Input, {
11
+ name: 'TextArea',
12
+ tag: 'textarea',
13
+
14
+ // this attribute fixes firefox newline issue
15
+ // @ts-ignore
16
+ whiteSpace: 'pre-wrap',
17
+
18
+ variants: {
19
+ unstyled: {
20
+ false: {
21
+ height: 'auto',
22
+ ...defaultStyles,
23
+ numberOfLines: 3,
24
+ },
25
+ },
26
+
27
+ size: {
28
+ '...size': textAreaSizeVariant,
29
+ },
30
+ } as const,
31
+
32
+ defaultVariants: {
33
+ unstyled: process.env.TAMAGUI_HEADLESS === '1',
34
+ },
35
+ })
@@ -0,0 +1,3 @@
1
+ export * from './Input'
2
+ export * from './TextArea'
3
+ export type { InputProps } from './types'
@@ -0,0 +1,65 @@
1
+ import type {
2
+ ColorTokens,
3
+ StackProps,
4
+ TamaguiComponentPropsBase,
5
+ TextProps,
6
+ } from '@tamagui/web'
7
+ import type { TextInputProps, InputModeOptions } from 'react-native'
8
+
9
+ type DetailedInputProps = React.DetailedHTMLProps<
10
+ React.HTMLProps<HTMLInputElement>,
11
+ HTMLInputElement
12
+ >
13
+
14
+ export type InputProps = StackProps &
15
+ Omit<
16
+ DetailedInputProps,
17
+ 'className' | 'children' | 'value' | 'size' | keyof StackProps
18
+ > &
19
+ Pick<TextProps, 'color'> &
20
+ Omit<DetailedInputProps['style'], 'color'> &
21
+ Omit<
22
+ TextInputProps,
23
+ | 'inputMode'
24
+ | 'secureTextEntry'
25
+ | 'onChangeText'
26
+ | 'editable'
27
+ | 'enterKeyHint'
28
+ | 'keyboardType'
29
+ | 'placeholderTextColor'
30
+ | 'selectionColor'
31
+ | 'numberOfLines'
32
+ > & {
33
+ /**
34
+ * @deprecated - use `type="password"` instead
35
+ */
36
+ secureTextEntry?: TextInputProps['secureTextEntry']
37
+ /**
38
+ * @deprecated - use `onChange` instead
39
+ */
40
+ onChangeText?: TextInputProps['onChangeText']
41
+ /**
42
+ * @deprecated - use `readOnly` instead
43
+ */
44
+ editable?: TextInputProps['editable']
45
+ enterKeyHint?: 'done' | 'go' | 'next' | 'search' | 'send' | 'enter' | 'previous'
46
+ /**
47
+ * @deprecated - use `type` instead
48
+ */
49
+ keyboardType?: TextInputProps['keyboardType']
50
+ /**
51
+ * use `type` instead of inputMode for most cases, use `inputMode="none"` to disable the soft keyboard
52
+ */
53
+ inputMode?: InputModeOptions
54
+ placeholderTextColor?: ColorTokens
55
+ selectionColor?: ColorTokens
56
+ tag?: TamaguiComponentPropsBase['tag']
57
+ /**
58
+ * @deprecated - use `tag='textarea'` instead
59
+ */
60
+ multiline?: boolean
61
+ /**
62
+ * @deprecated - use `rows` instead
63
+ */
64
+ numberOfLines?: number
65
+ }
package/types/Input.d.ts CHANGED
@@ -1,36 +1,62 @@
1
1
  import React from 'react';
2
2
  /**
3
- * @summary An input is a text field that allows users to enter text.
3
+ * A web-aligned input component.
4
4
  * @see — Docs https://tamagui.dev/ui/inputs#input
5
5
  */
6
6
  export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
7
7
  size?: import("@tamagui/core").SizeTokens | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  unstyled?: boolean | undefined;
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
- secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
12
- onChangeText?: import("react-native").TextInputProps["onChangeText"];
13
- editable?: import("react-native").TextInputProps["editable"];
14
- enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
15
- keyboardType?: import("react-native").TextInputProps["keyboardType"];
16
- inputMode?: import("react-native").InputModeOptions;
10
+ }>, "color" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "rel" | "dir" | "selectionColor" | "fontFamily" | "fontSize" | "list" | "max" | "min" | "form" | "slot" | "title" | "hidden" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "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" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "placeholderTextColor" | keyof import("@tamagui/core").StackStyleBase | 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>>> | "onChangeText" | "onSelectionChange" | "onSubmitEditing" | "selection" | "keyboardAppearance" | keyof import("@tamagui/core").StackNonStyleProps | "rows"> & 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.InputHTMLAttributes<HTMLInputElement>, "color" | "size" | "children" | "style" | "className"> & Pick<import("@tamagui/core").TextProps, "color"> & {
11
+ fontSize?: import("@tamagui/core").FontSizeTokens | number;
12
+ fontFamily?: import("@tamagui/core").FontTokens;
13
+ rows?: number;
17
14
  placeholderTextColor?: import("@tamagui/core").ColorTokens;
18
15
  selectionColor?: import("@tamagui/core").ColorTokens;
19
- tag?: import("@tamagui/core").TamaguiComponentPropsBase["tag"];
20
- multiline?: boolean;
21
- numberOfLines?: number;
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
- secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
24
- onChangeText?: import("react-native").TextInputProps["onChangeText"];
25
- editable?: import("react-native").TextInputProps["editable"];
26
- enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
27
- keyboardType?: import("react-native").TextInputProps["keyboardType"];
28
- inputMode?: import("react-native").InputModeOptions;
16
+ onChangeText?: (text: string) => void;
17
+ onSubmitEditing?: (e: {
18
+ nativeEvent: {
19
+ text: string;
20
+ };
21
+ }) => void;
22
+ selection?: {
23
+ start: number;
24
+ end?: number;
25
+ };
26
+ onSelectionChange?: (e: {
27
+ nativeEvent: {
28
+ selection: {
29
+ start: number;
30
+ end: number;
31
+ };
32
+ };
33
+ }) => void;
34
+ keyboardAppearance?: "default" | "light" | "dark";
35
+ }, 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.InputHTMLAttributes<HTMLInputElement>, "color" | "size" | "children" | "style" | "className"> & Pick<import("@tamagui/core").TextProps, "color"> & {
36
+ fontSize?: import("@tamagui/core").FontSizeTokens | number;
37
+ fontFamily?: import("@tamagui/core").FontTokens;
38
+ rows?: number;
29
39
  placeholderTextColor?: import("@tamagui/core").ColorTokens;
30
40
  selectionColor?: import("@tamagui/core").ColorTokens;
31
- tag?: import("@tamagui/core").TamaguiComponentPropsBase["tag"];
32
- multiline?: boolean;
33
- numberOfLines?: number;
41
+ onChangeText?: (text: string) => void;
42
+ onSubmitEditing?: (e: {
43
+ nativeEvent: {
44
+ text: string;
45
+ };
46
+ }) => void;
47
+ selection?: {
48
+ start: number;
49
+ end?: number;
50
+ };
51
+ onSelectionChange?: (e: {
52
+ nativeEvent: {
53
+ selection: {
54
+ start: number;
55
+ end: number;
56
+ };
57
+ };
58
+ }) => void;
59
+ keyboardAppearance?: "default" | "light" | "dark";
34
60
  }, import("@tamagui/core").StackStyleBase, {
35
61
  size?: import("@tamagui/core").SizeTokens | undefined;
36
62
  disabled?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2D,MAAM,OAAO,CAAA;AAM/E;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgLhB,CAAA"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;WAgDD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;WAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DhB,CAAA"}