diff --git a/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js b/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js index 944d4844e3f31a..26dfb420637695 100644 --- a/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +++ b/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js @@ -73,42 +73,90 @@ export type NativeProps = $ReadOnly<{| * Android props after this */ /** - * Determines which content to suggest on auto complete, e.g.`username`. - * To disable auto complete, use `off`. + * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content. + * To disable autocomplete, set `autoComplete` to `off`. * * *Android Only* * - * The following values work on Android only: + * Possible values for `autoComplete` are: * - * - `username` - * - `password` - * - `email` - * - `name` - * - `tel` - * - `street-address` - * - `postal-code` - * - `cc-number` + * - `birthdate-day` + * - `birthdate-full` + * - `birthdate-month` + * - `birthdate-year` * - `cc-csc` * - `cc-exp` + * - `cc-exp-day` * - `cc-exp-month` * - `cc-exp-year` + * - `cc-number` + * - `email` + * - `gender` + * - `name` + * - `name-family` + * - `name-given` + * - `name-middle` + * - `name-middle-initial` + * - `name-prefix` + * - `name-suffix` + * - `password` + * - `password-new` + * - `postal-address` + * - `postal-address-country` + * - `postal-address-extended` + * - `postal-address-extended-postal-code` + * - `postal-address-locality` + * - `postal-address-region` + * - `postal-code` + * - `street-address` + * - `sms-otp` + * - `tel` + * - `tel-country-code` + * - `tel-national` + * - `tel-device` + * - `username` + * - `username-new` * - `off` * * @platform android */ autoComplete?: WithDefault< + | 'birthdate-day' + | 'birthdate-full' + | 'birthdate-month' + | 'birthdate-year' | 'cc-csc' | 'cc-exp' + | 'cc-exp-day' | 'cc-exp-month' | 'cc-exp-year' | 'cc-number' | 'email' + | 'gender' | 'name' + | 'name-family' + | 'name-given' + | 'name-middle' + | 'name-middle-initial' + | 'name-prefix' + | 'name-suffix' | 'password' + | 'password-new' + | 'postal-address' + | 'postal-address-country' + | 'postal-address-extended' + | 'postal-address-extended-postal-code' + | 'postal-address-locality' + | 'postal-address-region' | 'postal-code' | 'street-address' + | 'sms-otp' | 'tel' + | 'tel-country-code' + | 'tel-national' + | 'tel-device' | 'username' + | 'username-new' | 'off', 'off', >, diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 6f8f96d33a0c73..53642621c58d75 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -305,25 +305,49 @@ type IOSProps = $ReadOnly<{| type AndroidProps = $ReadOnly<{| /** - * Determines which content to suggest on auto complete, e.g.`username`. - * To disable auto complete, use `off`. + * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content. + * To disable autocomplete, set `autoComplete` to `off`. * * *Android Only* * - * The following values work on Android only: + * Possible values for `autoComplete` are: * - * - `username` - * - `password` - * - `email` - * - `name` - * - `tel` - * - `street-address` - * - `postal-code` - * - `cc-number` + * - `birthdate-day` + * - `birthdate-full` + * - `birthdate-month` + * - `birthdate-year` * - `cc-csc` * - `cc-exp` + * - `cc-exp-day` * - `cc-exp-month` * - `cc-exp-year` + * - `cc-number` + * - `email` + * - `gender` + * - `name` + * - `name-family` + * - `name-given` + * - `name-middle` + * - `name-middle-initial` + * - `name-prefix` + * - `name-suffix` + * - `password` + * - `password-new` + * - `postal-address` + * - `postal-address-country` + * - `postal-address-extended` + * - `postal-address-extended-postal-code` + * - `postal-address-locality` + * - `postal-address-region` + * - `postal-code` + * - `street-address` + * - `sms-otp` + * - `tel` + * - `tel-country-code` + * - `tel-national` + * - `tel-device` + * - `username` + * - `username-new` * - `off` * * @platform android diff --git a/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js b/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js index 7eb73f751d850a..193865a2aa32ce 100644 --- a/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +++ b/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js @@ -41,56 +41,128 @@ module.exports = { 'characters', ]): React$PropType$Primitive<'none' | 'sentences' | 'words' | 'characters'>), /** - * Determines which content to suggest on auto complete, e.g.`username`. - * To disable auto complete, use `off`. + * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content. + * To disable autocomplete, set `autoComplete` to `off`. * * *Android Only* * - * The following values work on Android only: + * Possible values for `autoComplete` are: * - * - `username` - * - `password` - * - `email` - * - `name` - * - `tel` - * - `street-address` - * - `postal-code` - * - `cc-number` + * - `birthdate-day` + * - `birthdate-full` + * - `birthdate-month` + * - `birthdate-year` * - `cc-csc` * - `cc-exp` + * - `cc-exp-day` * - `cc-exp-month` * - `cc-exp-year` + * - `cc-number` + * - `email` + * - `gender` + * - `name` + * - `name-family` + * - `name-given` + * - `name-middle` + * - `name-middle-initial` + * - `name-prefix` + * - `name-suffix` + * - `password` + * - `password-new` + * - `postal-address` + * - `postal-address-country` + * - `postal-address-extended` + * - `postal-address-extended-postal-code` + * - `postal-address-locality` + * - `postal-address-region` + * - `postal-code` + * - `street-address` + * - `sms-otp` + * - `tel` + * - `tel-country-code` + * - `tel-national` + * - `tel-device` + * - `username` + * - `username-new` * - `off` * * @platform android */ autoComplete: (PropTypes.oneOf([ + 'birthdate-day', + 'birthdate-full', + 'birthdate-month', + 'birthdate-year', 'cc-csc', 'cc-exp', + 'cc-exp-day', 'cc-exp-month', 'cc-exp-year', 'cc-number', 'email', + 'gender', 'name', + 'name-family', + 'name-given', + 'name-middle', + 'name-middle-initial', + 'name-prefix', + 'name-suffix', 'password', + 'password-new', + 'postal-address', + 'postal-address-country', + 'postal-address-extended', + 'postal-address-extended-postal-code', + 'postal-address-locality', + 'postal-address-region', 'postal-code', 'street-address', + 'sms-otp', 'tel', + 'tel-country-code', + 'tel-national', + 'tel-device', 'username', + 'username-new', 'off', ]): React$PropType$Primitive< + | 'birthdate-day' + | 'birthdate-full' + | 'birthdate-month' + | 'birthdate-year' | 'cc-csc' | 'cc-exp' + | 'cc-exp-day' | 'cc-exp-month' | 'cc-exp-year' | 'cc-number' | 'email' + | 'gender' | 'name' + | 'name-family' + | 'name-given' + | 'name-middle' + | 'name-middle-initial' + | 'name-prefix' + | 'name-suffix' | 'password' + | 'password-new' + | 'postal-address' + | 'postal-address-country' + | 'postal-address-extended' + | 'postal-address-extended-postal-code' + | 'postal-address-locality' + | 'postal-address-region' | 'postal-code' | 'street-address' + | 'sms-otp' | 'tel' + | 'tel-country-code' + | 'tel-national' + | 'tel-device' | 'username' + | 'username-new' | 'off', >), /**