@tamagui/input 2.7.7 → 3.0.0-beta.1093.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.
- package/dist/cjs/Input.cjs +72 -163
- package/dist/cjs/Input.native.cjs +208 -0
- package/dist/cjs/Input.native.js +186 -283
- package/dist/cjs/Input.native.js.map +1 -1
- package/dist/cjs/InputNativeProps.cjs +9 -11
- package/dist/cjs/InputNativeProps.native.cjs +18 -0
- package/dist/cjs/InputNativeProps.native.js +9 -10
- package/dist/cjs/InputNativeProps.native.js.map +1 -1
- package/dist/cjs/TextArea.cjs +23 -39
- package/dist/cjs/TextArea.native.cjs +38 -0
- package/dist/cjs/TextArea.native.js +23 -38
- package/dist/cjs/TextArea.native.js.map +1 -1
- package/dist/cjs/index.cjs +15 -17
- package/dist/cjs/index.native.cjs +32 -0
- package/dist/cjs/index.native.js +15 -16
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared.cjs +74 -124
- package/dist/cjs/shared.native.cjs +101 -0
- package/dist/cjs/shared.native.js +80 -129
- package/dist/cjs/shared.native.js.map +1 -1
- package/dist/cjs/types.cjs +9 -11
- package/dist/cjs/types.native.cjs +18 -0
- package/dist/cjs/types.native.js +9 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Input.mjs +59 -139
- package/dist/esm/Input.mjs.map +1 -1
- package/dist/esm/Input.native.js +174 -261
- package/dist/esm/Input.native.js.map +1 -1
- package/dist/esm/InputNativeProps.mjs +0 -2
- package/dist/esm/InputNativeProps.native.js +0 -2
- package/dist/esm/TextArea.mjs +12 -22
- package/dist/esm/TextArea.mjs.map +1 -1
- package/dist/esm/TextArea.native.js +12 -22
- package/dist/esm/TextArea.native.js.map +1 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.native.js +6 -4
- package/dist/esm/shared.mjs +59 -107
- package/dist/esm/shared.mjs.map +1 -1
- package/dist/esm/shared.native.js +64 -112
- package/dist/esm/shared.native.js.map +1 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/jsx/Input.mjs +59 -139
- package/dist/jsx/Input.mjs.map +1 -1
- package/dist/jsx/Input.native.cjs +208 -0
- package/dist/jsx/Input.native.js +186 -283
- package/dist/jsx/Input.native.js.map +1 -1
- package/dist/jsx/InputNativeProps.mjs +0 -2
- package/dist/jsx/InputNativeProps.native.cjs +18 -0
- package/dist/jsx/InputNativeProps.native.js +9 -10
- package/dist/jsx/InputNativeProps.native.js.map +1 -1
- package/dist/jsx/TextArea.mjs +12 -22
- package/dist/jsx/TextArea.mjs.map +1 -1
- package/dist/jsx/TextArea.native.cjs +38 -0
- package/dist/jsx/TextArea.native.js +23 -38
- package/dist/jsx/TextArea.native.js.map +1 -1
- package/dist/jsx/index.js +6 -4
- package/dist/jsx/index.mjs +6 -4
- package/dist/jsx/index.native.cjs +32 -0
- package/dist/jsx/index.native.js +15 -16
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared.mjs +59 -107
- package/dist/jsx/shared.mjs.map +1 -1
- package/dist/jsx/shared.native.cjs +101 -0
- package/dist/jsx/shared.native.js +80 -129
- package/dist/jsx/shared.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +18 -0
- package/dist/jsx/types.native.js +9 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +17 -17
- package/src/Input.native.tsx +267 -242
- package/src/Input.tsx +150 -154
- package/src/TextArea.tsx +9 -18
- package/src/shared.tsx +56 -109
- package/src/types.ts +2 -2
- package/types/Input.d.ts +32 -50
- package/types/Input.d.ts.map +1 -1
- package/types/Input.native.d.ts +32 -50
- package/types/Input.native.d.ts.map +1 -1
- package/types/TextArea.d.ts +16 -34
- package/types/TextArea.d.ts.map +1 -1
- package/types/shared.d.ts +38 -109
- package/types/shared.d.ts.map +1 -1
- package/types/types.d.ts +2 -2
- package/types/types.d.ts.map +1 -1
- package/dist/cjs/inputTypes.test-d.cjs +0 -128
- package/dist/cjs/inputTypes.test-d.native.js +0 -131
- package/dist/cjs/inputTypes.test-d.native.js.map +0 -1
- package/dist/cjs/v1/Input.cjs +0 -200
- package/dist/cjs/v1/Input.native.js +0 -183
- package/dist/cjs/v1/Input.native.js.map +0 -1
- package/dist/cjs/v1/TextArea.cjs +0 -52
- package/dist/cjs/v1/TextArea.native.js +0 -55
- package/dist/cjs/v1/TextArea.native.js.map +0 -1
- package/dist/cjs/v1/index.cjs +0 -21
- package/dist/cjs/v1/index.native.js +0 -24
- package/dist/cjs/v1/index.native.js.map +0 -1
- package/dist/cjs/v1/types.cjs +0 -18
- package/dist/cjs/v1/types.native.js +0 -21
- package/dist/cjs/v1/types.native.js.map +0 -1
- package/dist/esm/InputNativeProps.mjs.map +0 -1
- package/dist/esm/InputNativeProps.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/inputTypes.test-d.mjs +0 -129
- package/dist/esm/inputTypes.test-d.mjs.map +0 -1
- package/dist/esm/inputTypes.test-d.native.js +0 -129
- package/dist/esm/inputTypes.test-d.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/v1/Input.mjs +0 -164
- package/dist/esm/v1/Input.mjs.map +0 -1
- package/dist/esm/v1/Input.native.js +0 -144
- package/dist/esm/v1/Input.native.js.map +0 -1
- package/dist/esm/v1/TextArea.mjs +0 -27
- package/dist/esm/v1/TextArea.mjs.map +0 -1
- package/dist/esm/v1/TextArea.native.js +0 -27
- package/dist/esm/v1/TextArea.native.js.map +0 -1
- package/dist/esm/v1/index.mjs +0 -3
- package/dist/esm/v1/index.mjs.map +0 -1
- package/dist/esm/v1/index.native.js +0 -3
- package/dist/esm/v1/index.native.js.map +0 -1
- package/dist/esm/v1/types.mjs +0 -2
- package/dist/esm/v1/types.mjs.map +0 -1
- package/dist/esm/v1/types.native.js +0 -2
- package/dist/esm/v1/types.native.js.map +0 -1
- package/dist/jsx/InputNativeProps.mjs.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/inputTypes.test-d.mjs +0 -129
- package/dist/jsx/inputTypes.test-d.mjs.map +0 -1
- package/dist/jsx/inputTypes.test-d.native.js +0 -131
- package/dist/jsx/inputTypes.test-d.native.js.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/v1/Input.mjs +0 -164
- package/dist/jsx/v1/Input.mjs.map +0 -1
- package/dist/jsx/v1/Input.native.js +0 -183
- package/dist/jsx/v1/Input.native.js.map +0 -1
- package/dist/jsx/v1/TextArea.mjs +0 -27
- package/dist/jsx/v1/TextArea.mjs.map +0 -1
- package/dist/jsx/v1/TextArea.native.js +0 -55
- package/dist/jsx/v1/TextArea.native.js.map +0 -1
- package/dist/jsx/v1/index.mjs +0 -3
- package/dist/jsx/v1/index.mjs.map +0 -1
- package/dist/jsx/v1/index.native.js +0 -24
- package/dist/jsx/v1/index.native.js.map +0 -1
- package/dist/jsx/v1/types.mjs +0 -2
- package/dist/jsx/v1/types.mjs.map +0 -1
- package/dist/jsx/v1/types.native.js +0 -21
- package/dist/jsx/v1/types.native.js.map +0 -1
- package/src/inputTypes.test-d.ts +0 -245
- package/src/v1/Input.native.tsx +0 -153
- package/src/v1/Input.tsx +0 -190
- package/src/v1/TextArea.tsx +0 -35
- package/src/v1/index.ts +0 -3
- package/src/v1/types.ts +0 -65
- package/types/v1/Input.d.ts +0 -64
- package/types/v1/Input.d.ts.map +0 -1
- package/types/v1/Input.native.d.ts +0 -63
- package/types/v1/Input.native.d.ts.map +0 -1
- package/types/v1/TextArea.d.ts +0 -41
- package/types/v1/TextArea.d.ts.map +0 -1
- package/types/v1/index.d.ts +0 -4
- package/types/v1/index.d.ts.map +0 -1
- package/types/v1/types.d.ts +0 -39
- package/types/v1/types.d.ts.map +0 -1
package/src/v1/Input.native.tsx
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { styled } from '@tamagui/core'
|
|
3
|
-
import { registerFocusable } from '@tamagui/focusable'
|
|
4
|
-
import { useNativeInputRef } from '@tamagui/element'
|
|
5
|
-
|
|
6
|
-
import type { NativeSyntheticEvent, TextInputChangeEventData } from 'react-native'
|
|
7
|
-
import { TextInput } from 'react-native'
|
|
8
|
-
import { styledBody } from '../shared'
|
|
9
|
-
import type { InputProps } from './types'
|
|
10
|
-
|
|
11
|
-
const StyledInput = styled(TextInput, styledBody[0], styledBody[1])
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Use the new Input from '@tamagui/input' instead
|
|
15
|
-
*/
|
|
16
|
-
export const Input = StyledInput.styleable<InputProps>((inProps, forwardedRef) => {
|
|
17
|
-
const {
|
|
18
|
-
// some of destructed props are just to avoid passing them to ...rest because they are not in native.
|
|
19
|
-
type,
|
|
20
|
-
//@ts-ignore
|
|
21
|
-
dirname,
|
|
22
|
-
max,
|
|
23
|
-
min,
|
|
24
|
-
minLength,
|
|
25
|
-
multiple,
|
|
26
|
-
name,
|
|
27
|
-
required,
|
|
28
|
-
step,
|
|
29
|
-
disabled,
|
|
30
|
-
id,
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
caretColor,
|
|
33
|
-
onChange,
|
|
34
|
-
onInput,
|
|
35
|
-
rows,
|
|
36
|
-
enterKeyHint,
|
|
37
|
-
returnKeyType,
|
|
38
|
-
onKeyDown,
|
|
39
|
-
inputMode,
|
|
40
|
-
render,
|
|
41
|
-
...rest
|
|
42
|
-
} = inProps
|
|
43
|
-
|
|
44
|
-
const { ref, composedRef } = useNativeInputRef(forwardedRef)
|
|
45
|
-
|
|
46
|
-
// TODO: later move most of the logic to the core package
|
|
47
|
-
|
|
48
|
-
let secureTextEntry = false
|
|
49
|
-
let cursorColor = caretColor
|
|
50
|
-
let _returnKeyType = returnKeyType
|
|
51
|
-
let _enterKeyHint = enterKeyHint
|
|
52
|
-
if (enterKeyHint === 'go') {
|
|
53
|
-
_returnKeyType = 'go'
|
|
54
|
-
_enterKeyHint = undefined
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
let _inputMode = inputMode
|
|
58
|
-
if (type === 'email') {
|
|
59
|
-
_inputMode = 'email'
|
|
60
|
-
} else if (type === 'tel') {
|
|
61
|
-
_inputMode = 'tel'
|
|
62
|
-
} else if (type === 'search') {
|
|
63
|
-
_inputMode = 'search'
|
|
64
|
-
} else if (type === 'url') {
|
|
65
|
-
_inputMode = 'url'
|
|
66
|
-
} else if (type === 'password') {
|
|
67
|
-
secureTextEntry = true
|
|
68
|
-
_inputMode = 'text'
|
|
69
|
-
} else if (type === 'number') {
|
|
70
|
-
_inputMode = 'numeric'
|
|
71
|
-
} else {
|
|
72
|
-
_inputMode = 'text'
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
let showSoftInputOnFocus = true
|
|
76
|
-
if (inputMode === 'none') {
|
|
77
|
-
showSoftInputOnFocus = false
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const finalProps = {
|
|
81
|
-
...rest,
|
|
82
|
-
inputMode: _inputMode,
|
|
83
|
-
showSoftInputOnFocus,
|
|
84
|
-
disabled,
|
|
85
|
-
id,
|
|
86
|
-
cursorColor,
|
|
87
|
-
enterKeyHint: _enterKeyHint,
|
|
88
|
-
returnKeyType: _returnKeyType,
|
|
89
|
-
secureTextEntry,
|
|
90
|
-
numberOfLines: rows || rest.numberOfLines,
|
|
91
|
-
} as any
|
|
92
|
-
|
|
93
|
-
if (render === 'textarea') {
|
|
94
|
-
finalProps.multiline = true
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (onKeyDown) {
|
|
98
|
-
finalProps.onKeyPress = (e) => {
|
|
99
|
-
const { key } = e.nativeEvent
|
|
100
|
-
if (
|
|
101
|
-
key === 'Backspace' ||
|
|
102
|
-
(render === 'textarea' && key === 'Enter') ||
|
|
103
|
-
key.length === 1
|
|
104
|
-
) {
|
|
105
|
-
onKeyDown({
|
|
106
|
-
key,
|
|
107
|
-
type: 'keydown',
|
|
108
|
-
} as any)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
finalProps.onSubmitEditing = (e) => {
|
|
112
|
-
onKeyDown({
|
|
113
|
-
key: 'Enter',
|
|
114
|
-
type: 'keydown',
|
|
115
|
-
} as any)
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (onChange || onInput) {
|
|
120
|
-
finalProps.onChange = (e: NativeSyntheticEvent<TextInputChangeEventData>) => {
|
|
121
|
-
const { text } = e.nativeEvent
|
|
122
|
-
if (onChange) {
|
|
123
|
-
onChange({
|
|
124
|
-
target: {
|
|
125
|
-
value: text,
|
|
126
|
-
},
|
|
127
|
-
type: 'change',
|
|
128
|
-
} as any)
|
|
129
|
-
}
|
|
130
|
-
if (onInput != null) {
|
|
131
|
-
onInput({
|
|
132
|
-
target: {
|
|
133
|
-
value: text,
|
|
134
|
-
},
|
|
135
|
-
type: 'input',
|
|
136
|
-
} as any)
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
React.useEffect(() => {
|
|
142
|
-
if (!id) return
|
|
143
|
-
if (disabled) return
|
|
144
|
-
|
|
145
|
-
return registerFocusable(id, {
|
|
146
|
-
focusAndSelect: () => {
|
|
147
|
-
ref.current?.focus()
|
|
148
|
-
},
|
|
149
|
-
focus: () => {},
|
|
150
|
-
})
|
|
151
|
-
}, [id, disabled])
|
|
152
|
-
return <StyledInput onChange={(e) => {}} ref={composedRef} {...finalProps} />
|
|
153
|
-
})
|
package/src/v1/Input.tsx
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { View, styled, useEvent, useTheme } from '@tamagui/core'
|
|
2
|
-
import { registerFocusable } from '@tamagui/focusable'
|
|
3
|
-
import { useWebRef } from '@tamagui/element'
|
|
4
|
-
import React, { type HTMLAttributes, type HTMLInputTypeAttribute } from 'react'
|
|
5
|
-
import { styledBody } from '../shared'
|
|
6
|
-
import type { InputProps } from './types'
|
|
7
|
-
|
|
8
|
-
const StyledInput = styled(View, styledBody[0], styledBody[1])
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use the new Input from '@tamagui/input' instead
|
|
12
|
-
* @summary An input is a text field that allows users to enter text.
|
|
13
|
-
* @see — Docs https://tamagui.dev/ui/inputs#input
|
|
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 web.
|
|
18
|
-
allowFontScaling,
|
|
19
|
-
selectTextOnFocus,
|
|
20
|
-
showSoftInputOnFocus,
|
|
21
|
-
textContentType,
|
|
22
|
-
passwordRules,
|
|
23
|
-
textBreakStrategy,
|
|
24
|
-
underlineColorAndroid,
|
|
25
|
-
selection,
|
|
26
|
-
lineBreakStrategyIOS,
|
|
27
|
-
returnKeyLabel,
|
|
28
|
-
disabled,
|
|
29
|
-
onSubmitEditing,
|
|
30
|
-
caretHidden,
|
|
31
|
-
clearButtonMode,
|
|
32
|
-
clearTextOnFocus,
|
|
33
|
-
contextMenuHidden,
|
|
34
|
-
dataDetectorTypes,
|
|
35
|
-
id,
|
|
36
|
-
enablesReturnKeyAutomatically,
|
|
37
|
-
importantForAutofill,
|
|
38
|
-
inlineImageLeft,
|
|
39
|
-
inlineImagePadding,
|
|
40
|
-
inputAccessoryViewID,
|
|
41
|
-
keyboardAppearance,
|
|
42
|
-
keyboardType,
|
|
43
|
-
cursorColor,
|
|
44
|
-
disableFullscreenUI,
|
|
45
|
-
editable,
|
|
46
|
-
maxFontSizeMultiplier,
|
|
47
|
-
multiline,
|
|
48
|
-
numberOfLines,
|
|
49
|
-
onChangeText,
|
|
50
|
-
onContentSizeChange,
|
|
51
|
-
onEndEditing,
|
|
52
|
-
onScroll,
|
|
53
|
-
onSelectionChange,
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
caretColor,
|
|
56
|
-
placeholderTextColor,
|
|
57
|
-
blurOnSubmit,
|
|
58
|
-
enterKeyHint,
|
|
59
|
-
returnKeyType,
|
|
60
|
-
rejectResponderTermination,
|
|
61
|
-
scrollEnabled,
|
|
62
|
-
secureTextEntry,
|
|
63
|
-
selectionColor,
|
|
64
|
-
inputMode,
|
|
65
|
-
...rest
|
|
66
|
-
} = inProps
|
|
67
|
-
|
|
68
|
-
const { ref, composedRef } = useWebRef<HTMLInputElement>(forwardedRef)
|
|
69
|
-
const theme = useTheme()
|
|
70
|
-
|
|
71
|
-
const _onSelectionChange = useEvent(() => {
|
|
72
|
-
const start = ref.current?.selectionStart ?? 0
|
|
73
|
-
const end = ref.current?.selectionEnd ?? 0
|
|
74
|
-
onSelectionChange?.({
|
|
75
|
-
nativeEvent: {
|
|
76
|
-
selection: {
|
|
77
|
-
end,
|
|
78
|
-
start,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
} as any)
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
React.useEffect(() => {
|
|
85
|
-
if (onSelectionChange) {
|
|
86
|
-
ref.current?.addEventListener('selectionchange', _onSelectionChange)
|
|
87
|
-
return () => {
|
|
88
|
-
ref.current?.removeEventListener('selectionchange', _onSelectionChange)
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}, [])
|
|
92
|
-
|
|
93
|
-
React.useEffect(() => {
|
|
94
|
-
if (selection) {
|
|
95
|
-
ref.current?.setSelectionRange(selection.start || null, selection.end || null)
|
|
96
|
-
}
|
|
97
|
-
}, [selection?.start, selection?.end])
|
|
98
|
-
|
|
99
|
-
const finalProps = {
|
|
100
|
-
...rest,
|
|
101
|
-
disabled,
|
|
102
|
-
caretColor,
|
|
103
|
-
id,
|
|
104
|
-
enterKeyHint,
|
|
105
|
-
...(process.env.TAMAGUI_TARGET === 'web'
|
|
106
|
-
? {
|
|
107
|
-
type: (() => {
|
|
108
|
-
if (rest?.type) return rest.type
|
|
109
|
-
if (secureTextEntry) return 'password'
|
|
110
|
-
switch (keyboardType) {
|
|
111
|
-
case 'number-pad':
|
|
112
|
-
case 'numeric':
|
|
113
|
-
return 'number'
|
|
114
|
-
case 'email-address':
|
|
115
|
-
return 'email'
|
|
116
|
-
case 'phone-pad':
|
|
117
|
-
return 'tel'
|
|
118
|
-
case 'url':
|
|
119
|
-
return 'url'
|
|
120
|
-
default:
|
|
121
|
-
return 'text'
|
|
122
|
-
}
|
|
123
|
-
})() satisfies HTMLInputTypeAttribute,
|
|
124
|
-
inputMode: (() => {
|
|
125
|
-
switch (keyboardType) {
|
|
126
|
-
case 'number-pad':
|
|
127
|
-
case 'numeric':
|
|
128
|
-
return 'numeric'
|
|
129
|
-
case 'decimal-pad':
|
|
130
|
-
return 'decimal'
|
|
131
|
-
case 'email-address':
|
|
132
|
-
return 'email'
|
|
133
|
-
case 'phone-pad':
|
|
134
|
-
return 'tel'
|
|
135
|
-
case 'url':
|
|
136
|
-
return 'url'
|
|
137
|
-
default:
|
|
138
|
-
return undefined
|
|
139
|
-
}
|
|
140
|
-
})() satisfies HTMLAttributes<HTMLInputElement>['inputMode'],
|
|
141
|
-
}
|
|
142
|
-
: {
|
|
143
|
-
keyboardType,
|
|
144
|
-
secureTextEntry,
|
|
145
|
-
inputMode,
|
|
146
|
-
}),
|
|
147
|
-
style: {
|
|
148
|
-
...(rest.style as any),
|
|
149
|
-
...(placeholderTextColor && {
|
|
150
|
-
'--t_placeholderColor':
|
|
151
|
-
theme[placeholderTextColor]?.variable || placeholderTextColor,
|
|
152
|
-
}),
|
|
153
|
-
...(selectionColor && {
|
|
154
|
-
'--t_selectionBackground': theme[selectionColor]?.variable || selectionColor,
|
|
155
|
-
}),
|
|
156
|
-
},
|
|
157
|
-
} as any
|
|
158
|
-
|
|
159
|
-
React.useEffect(() => {
|
|
160
|
-
if (!id) return
|
|
161
|
-
if (disabled) return
|
|
162
|
-
|
|
163
|
-
return registerFocusable(id, {
|
|
164
|
-
focusAndSelect: () => {
|
|
165
|
-
ref.current?.focus()
|
|
166
|
-
},
|
|
167
|
-
focus: () => {},
|
|
168
|
-
})
|
|
169
|
-
}, [id, disabled])
|
|
170
|
-
|
|
171
|
-
return (
|
|
172
|
-
<>
|
|
173
|
-
{process.env.TAMAGUI_TARGET === 'web' && (
|
|
174
|
-
<style>
|
|
175
|
-
{`
|
|
176
|
-
input::selection, textarea::selection {
|
|
177
|
-
background-color: var(--t_selectionBackground) !important;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
input::placeholder, textarea::placeholder {
|
|
181
|
-
color: var(--t_placeholderColor) !important;
|
|
182
|
-
}
|
|
183
|
-
`}
|
|
184
|
-
</style>
|
|
185
|
-
)}
|
|
186
|
-
|
|
187
|
-
<StyledInput ref={composedRef} {...finalProps} />
|
|
188
|
-
</>
|
|
189
|
-
)
|
|
190
|
-
})
|
package/src/v1/TextArea.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
render: '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
|
-
})
|
package/src/v1/index.ts
DELETED
package/src/v1/types.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ColorTokens,
|
|
3
|
-
ViewProps,
|
|
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 = ViewProps &
|
|
15
|
-
Omit<
|
|
16
|
-
DetailedInputProps,
|
|
17
|
-
'className' | 'children' | 'value' | 'size' | keyof ViewProps
|
|
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
|
-
render?: TamaguiComponentPropsBase['render']
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated - use `render='textarea'` instead
|
|
59
|
-
*/
|
|
60
|
-
multiline?: boolean
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated - use `rows` instead
|
|
63
|
-
*/
|
|
64
|
-
numberOfLines?: number
|
|
65
|
-
}
|
package/types/v1/Input.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use the new Input from '@tamagui/input' instead
|
|
4
|
-
* @summary An input is a text field that allows users to enter text.
|
|
5
|
-
* @see — Docs https://tamagui.dev/ui/inputs#input
|
|
6
|
-
*/
|
|
7
|
-
export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase & import("@tamagui/core").TextStylePropsBase & {
|
|
8
|
-
readonly placeholderTextColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
9
|
-
readonly selectionColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
10
|
-
readonly cursorColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
11
|
-
readonly selectionHandleColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
12
|
-
readonly underlineColorAndroid?: import("@tamagui/core").ColorTokens | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
15
|
-
disabled?: boolean | undefined;
|
|
16
|
-
unstyled?: boolean | undefined;
|
|
17
|
-
}>, "media" | "color" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | "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" | "default" | "wrap" | "hidden" | "open" | "value" | "name" | "key" | "returnKeyType" | "submitBehavior" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "selectTextOnFocus" | "secureTextEntry" | "onEndEditing" | "onContentSizeChange" | "onKeyPress" | "multiline" | "keyboardType" | "autoCapitalize" | "autoCorrect" | "keyboardAppearance" | "clearButtonMode" | "clearTextOnFocus" | "enablesReturnKeyAutomatically" | "dataDetectorTypes" | "scrollEnabled" | "passwordRules" | "rejectResponderTermination" | "spellCheck" | "lineBreakModeIOS" | "smartInsertDelete" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "disableKeyboardShortcuts" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "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" | "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" | "cursorColor" | "selectionHandleColor" | "underlineColorAndroid" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "showSoftInputOnFocus" | "dateTime" | "placeholderTextColor" | "editable" | "onChangeText" | "onSelectionChange" | "onSubmitEditing" | "selection" | "selectionState" | "textContentType" | "rows" | "ref" | keyof import("@tamagui/core").StackNonStyleProps | 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>>> | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "defer" | "encType" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "method" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "useMap" | "wmode"> & 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 | "value" | keyof import("@tamagui/core").StackNonStyleProps | 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>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "secureTextEntry" | "keyboardType" | "enterKeyHint" | "inputMode" | "placeholderTextColor" | "editable" | "onChangeText"> & {
|
|
18
|
-
secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
|
|
19
|
-
onChangeText?: import("react-native").TextInputProps["onChangeText"];
|
|
20
|
-
editable?: import("react-native").TextInputProps["editable"];
|
|
21
|
-
enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
|
|
22
|
-
keyboardType?: import("react-native").TextInputProps["keyboardType"];
|
|
23
|
-
inputMode?: import("react-native").InputModeOptions;
|
|
24
|
-
placeholderTextColor?: import("@tamagui/core").ColorTokens;
|
|
25
|
-
selectionColor?: import("@tamagui/core").ColorTokens;
|
|
26
|
-
render?: import("@tamagui/core").TamaguiComponentPropsBase["render"];
|
|
27
|
-
multiline?: boolean;
|
|
28
|
-
numberOfLines?: number;
|
|
29
|
-
}, 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 | "value" | keyof import("@tamagui/core").StackNonStyleProps | 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>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "secureTextEntry" | "keyboardType" | "enterKeyHint" | "inputMode" | "placeholderTextColor" | "editable" | "onChangeText"> & {
|
|
30
|
-
secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
|
|
31
|
-
onChangeText?: import("react-native").TextInputProps["onChangeText"];
|
|
32
|
-
editable?: import("react-native").TextInputProps["editable"];
|
|
33
|
-
enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
|
|
34
|
-
keyboardType?: import("react-native").TextInputProps["keyboardType"];
|
|
35
|
-
inputMode?: import("react-native").InputModeOptions;
|
|
36
|
-
placeholderTextColor?: import("@tamagui/core").ColorTokens;
|
|
37
|
-
selectionColor?: import("@tamagui/core").ColorTokens;
|
|
38
|
-
render?: import("@tamagui/core").TamaguiComponentPropsBase["render"];
|
|
39
|
-
multiline?: boolean;
|
|
40
|
-
numberOfLines?: number;
|
|
41
|
-
}, import("@tamagui/core").StackStyleBase & import("@tamagui/core").TextStylePropsBase & {
|
|
42
|
-
readonly placeholderTextColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
43
|
-
readonly selectionColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
44
|
-
readonly cursorColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
45
|
-
readonly selectionHandleColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
46
|
-
readonly underlineColorAndroid?: import("@tamagui/core").ColorTokens | undefined;
|
|
47
|
-
}, {
|
|
48
|
-
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
49
|
-
disabled?: boolean | undefined;
|
|
50
|
-
unstyled?: boolean | undefined;
|
|
51
|
-
}, {
|
|
52
|
-
readonly isInput: true;
|
|
53
|
-
readonly accept: {
|
|
54
|
-
readonly placeholderTextColor: "color";
|
|
55
|
-
readonly selectionColor: "color";
|
|
56
|
-
readonly cursorColor: "color";
|
|
57
|
-
readonly selectionHandleColor: "color";
|
|
58
|
-
readonly underlineColorAndroid: "color";
|
|
59
|
-
};
|
|
60
|
-
readonly validStyles: {
|
|
61
|
-
[key: string]: boolean;
|
|
62
|
-
} | undefined;
|
|
63
|
-
}>;
|
|
64
|
-
//# sourceMappingURL=Input.d.ts.map
|
package/types/v1/Input.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/v1/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2D,MAAM,OAAO,CAAA;AAM/E;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+KhB,CAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextInput } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use the new Input from '@tamagui/input' instead
|
|
5
|
-
*/
|
|
6
|
-
export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").TamaguiComponentPropsBaseBase & import("react-native").TextInputProps, import("@tamagui/core").TextStylePropsBase & {
|
|
7
|
-
readonly placeholderTextColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
8
|
-
readonly selectionColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
9
|
-
readonly cursorColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
10
|
-
readonly selectionHandleColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
11
|
-
readonly underlineColorAndroid?: import("@tamagui/core").ColorTokens | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
|
-
unstyled?: boolean | undefined;
|
|
16
|
-
}>, "media" | "color" | `$${string}` | `$${number}` | import("@tamagui/core").GroupMediaKeys | "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" | "default" | "wrap" | "hidden" | "open" | "value" | "name" | "key" | "returnKeyType" | "submitBehavior" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "selectTextOnFocus" | "secureTextEntry" | "onEndEditing" | "onContentSizeChange" | "onKeyPress" | "multiline" | "keyboardType" | "autoCapitalize" | "autoCorrect" | "keyboardAppearance" | "clearButtonMode" | "clearTextOnFocus" | "enablesReturnKeyAutomatically" | "dataDetectorTypes" | "scrollEnabled" | "passwordRules" | "rejectResponderTermination" | "spellCheck" | "lineBreakModeIOS" | "smartInsertDelete" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "disableKeyboardShortcuts" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "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" | "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" | "cursorColor" | "selectionHandleColor" | "underlineColorAndroid" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "showSoftInputOnFocus" | "dateTime" | "placeholderTextColor" | "editable" | "onChangeText" | "onSelectionChange" | "onSubmitEditing" | "selection" | "selectionState" | "textContentType" | "rows" | "ref" | keyof import("@tamagui/core").StackNonStyleProps | 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>>> | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "defer" | "encType" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "method" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "useMap" | "wmode"> & 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 | "value" | keyof import("@tamagui/core").StackNonStyleProps | 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>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "secureTextEntry" | "keyboardType" | "enterKeyHint" | "inputMode" | "placeholderTextColor" | "editable" | "onChangeText"> & {
|
|
17
|
-
secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
|
|
18
|
-
onChangeText?: import("react-native").TextInputProps["onChangeText"];
|
|
19
|
-
editable?: import("react-native").TextInputProps["editable"];
|
|
20
|
-
enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
|
|
21
|
-
keyboardType?: import("react-native").TextInputProps["keyboardType"];
|
|
22
|
-
inputMode?: import("react-native").InputModeOptions;
|
|
23
|
-
placeholderTextColor?: import("@tamagui/core").ColorTokens;
|
|
24
|
-
selectionColor?: import("@tamagui/core").ColorTokens;
|
|
25
|
-
render?: import("@tamagui/core").TamaguiComponentPropsBase["render"];
|
|
26
|
-
multiline?: boolean;
|
|
27
|
-
numberOfLines?: number;
|
|
28
|
-
}, 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 | "value" | keyof import("@tamagui/core").StackNonStyleProps | 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>>>> & Pick<import("@tamagui/core").TextProps, "color"> & Omit<React.CSSProperties | undefined, "color"> & Omit<import("react-native").TextInputProps, "numberOfLines" | "selectionColor" | "secureTextEntry" | "keyboardType" | "enterKeyHint" | "inputMode" | "placeholderTextColor" | "editable" | "onChangeText"> & {
|
|
29
|
-
secureTextEntry?: import("react-native").TextInputProps["secureTextEntry"];
|
|
30
|
-
onChangeText?: import("react-native").TextInputProps["onChangeText"];
|
|
31
|
-
editable?: import("react-native").TextInputProps["editable"];
|
|
32
|
-
enterKeyHint?: "done" | "go" | "next" | "search" | "send" | "enter" | "previous";
|
|
33
|
-
keyboardType?: import("react-native").TextInputProps["keyboardType"];
|
|
34
|
-
inputMode?: import("react-native").InputModeOptions;
|
|
35
|
-
placeholderTextColor?: import("@tamagui/core").ColorTokens;
|
|
36
|
-
selectionColor?: import("@tamagui/core").ColorTokens;
|
|
37
|
-
render?: import("@tamagui/core").TamaguiComponentPropsBase["render"];
|
|
38
|
-
multiline?: boolean;
|
|
39
|
-
numberOfLines?: number;
|
|
40
|
-
}, import("@tamagui/core").TextStylePropsBase & {
|
|
41
|
-
readonly placeholderTextColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
42
|
-
readonly selectionColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
43
|
-
readonly cursorColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
44
|
-
readonly selectionHandleColor?: import("@tamagui/core").ColorTokens | undefined;
|
|
45
|
-
readonly underlineColorAndroid?: import("@tamagui/core").ColorTokens | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
48
|
-
disabled?: boolean | undefined;
|
|
49
|
-
unstyled?: boolean | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
readonly isInput: true;
|
|
52
|
-
readonly accept: {
|
|
53
|
-
readonly placeholderTextColor: "color";
|
|
54
|
-
readonly selectionColor: "color";
|
|
55
|
-
readonly cursorColor: "color";
|
|
56
|
-
readonly selectionHandleColor: "color";
|
|
57
|
-
readonly underlineColorAndroid: "color";
|
|
58
|
-
};
|
|
59
|
-
readonly validStyles: {
|
|
60
|
-
[key: string]: boolean;
|
|
61
|
-
} | undefined;
|
|
62
|
-
}>;
|
|
63
|
-
//# sourceMappingURL=Input.native.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.native.d.ts","sourceRoot":"","sources":["../../src/v1/Input.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAMxC;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyIhB,CAAA"}
|