diff --git a/src/libs/ComponentUtils/index.js b/src/libs/ComponentUtils/index.js deleted file mode 100644 index 319926911c67..000000000000 --- a/src/libs/ComponentUtils/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Web password field needs `current-password` as autocomplete type which is not supported on native - */ -const PASSWORD_AUTOCOMPLETE_TYPE = 'current-password'; -const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'new-password'; -const ACCESSIBILITY_ROLE_FORM = 'form'; - -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/ComponentUtils/index.native.js b/src/libs/ComponentUtils/index.native.js deleted file mode 100644 index ed38345cbe2b..000000000000 --- a/src/libs/ComponentUtils/index.native.js +++ /dev/null @@ -1,5 +0,0 @@ -const PASSWORD_AUTOCOMPLETE_TYPE = 'password'; -const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'password-new'; -const ACCESSIBILITY_ROLE_FORM = 'none'; - -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/ComponentUtils/index.native.ts b/src/libs/ComponentUtils/index.native.ts new file mode 100644 index 000000000000..096d1449d0e1 --- /dev/null +++ b/src/libs/ComponentUtils/index.native.ts @@ -0,0 +1,7 @@ +import {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types'; + +const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'password'; +const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'password-new'; +const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'none'; + +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/ComponentUtils/index.ts b/src/libs/ComponentUtils/index.ts new file mode 100644 index 000000000000..ff8df480aa2c --- /dev/null +++ b/src/libs/ComponentUtils/index.ts @@ -0,0 +1,10 @@ +import {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types'; + +/** + * Web password field needs `current-password` as autocomplete type which is not supported on native + */ +const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'current-password'; +const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'new-password'; +const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'form'; + +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/ComponentUtils/types.ts b/src/libs/ComponentUtils/types.ts new file mode 100644 index 000000000000..6efc53c2fdf7 --- /dev/null +++ b/src/libs/ComponentUtils/types.ts @@ -0,0 +1,5 @@ +type PasswordAutocompleteType = 'current-password' | 'password'; +type NewPasswordAutocompleteType = 'new-password' | 'password-new'; +type AccessibilityRoleForm = 'form' | 'none'; + +export type {PasswordAutocompleteType, NewPasswordAutocompleteType, AccessibilityRoleForm};