diff --git a/stripe-ui-core/res/drawable/stripe_ic_card_visa.xml b/stripe-ui-core/res/drawable/stripe_ic_card_visa.xml new file mode 100644 index 00000000000..ed16b26e855 --- /dev/null +++ b/stripe-ui-core/res/drawable/stripe_ic_card_visa.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/stripe-ui-core/src/main/java/com/stripe/android/uicore/elements/TextFieldUI.kt b/stripe-ui-core/src/main/java/com/stripe/android/uicore/elements/TextFieldUI.kt index 5741f86ca14..44cc78e0134 100644 --- a/stripe-ui-core/src/main/java/com/stripe/android/uicore/elements/TextFieldUI.kt +++ b/stripe-ui-core/src/main/java/com/stripe/android/uicore/elements/TextFieldUI.kt @@ -54,6 +54,7 @@ import androidx.compose.ui.semantics.editableText import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.unit.dp import com.stripe.android.core.Logger import com.stripe.android.uicore.BuildConfig @@ -138,7 +139,7 @@ fun TextField( val placeHolder by textFieldController.placeHolder.collectAsState(null) var hasFocus by rememberSaveable { mutableStateOf(false) } - val colors = TextFieldColors(shouldShowError) + val fieldState by textFieldController.fieldState.collectAsState( TextFieldStateConstants.Error.Blank ) @@ -171,8 +172,9 @@ fun TextField( autofillTree += autofillNode } - TextField( + TextFieldUi( value = value, + loading = loading, onValueChange = { newValue -> val acceptInput = fieldState.canAcceptInput(value, newValue) @@ -184,8 +186,8 @@ fun TextField( } } }, + onDropdownItemClicked = textFieldController::onDropdownItemClicked, modifier = modifier - .fillMaxWidth() .onPreviewKeyEvent { event -> if (event.type == KeyEventType.KeyDown && event.nativeKeyEvent.keyCode == KeyEvent.KEYCODE_DEL && @@ -219,21 +221,69 @@ fun TextField( this.editableText = AnnotatedString("") }, enabled = enabled && textFieldController.enabled, + label = label?.let { + stringResource(it) + }, + showOptionalLabel = textFieldController.showOptionalLabel, + placeholder = placeHolder, + trailingIcon = trailingIcon, + shouldShowError = shouldShowError, + visualTransformation = textFieldController.visualTransformation, + keyboardOptions = KeyboardOptions( + keyboardType = textFieldController.keyboardType, + capitalization = textFieldController.capitalization, + imeAction = imeAction + ), + keyboardActions = KeyboardActions( + onNext = { + focusManager.moveFocus(nextFocusDirection) + }, + onDone = { + focusManager.clearFocus(true) + } + ) + ) +} + +@Composable +internal fun TextFieldUi( + value: String, + enabled: Boolean, + loading: Boolean, + label: String?, + placeholder: String?, + trailingIcon: TextFieldIcon?, + showOptionalLabel: Boolean, + shouldShowError: Boolean, + modifier: Modifier = Modifier, + visualTransformation: VisualTransformation = VisualTransformation.None, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, + keyboardActions: KeyboardActions = KeyboardActions(), + onValueChange: (value: String) -> Unit = {}, + onDropdownItemClicked: (item: TextFieldIcon.Dropdown.Item) -> Unit = {} +) { + val colors = TextFieldColors(shouldShowError) + + TextField( + value = value, + onValueChange = onValueChange, + modifier = modifier.fillMaxWidth(), + enabled = enabled, label = label?.let { { FormLabel( - text = if (textFieldController.showOptionalLabel) { + text = if (showOptionalLabel) { stringResource( R.string.stripe_form_label_optional, - stringResource(it) + it ) } else { - stringResource(it) + it } ) } }, - placeholder = placeHolder?.let { + placeholder = placeholder?.let { { Placeholder(text = it) } }, trailingIcon = trailingIcon?.let { @@ -252,85 +302,20 @@ fun TextField( } } is TextFieldIcon.Dropdown -> { - var expanded by remember { - mutableStateOf(false) - } - - val show = !loading && !it.hide - - Box { - Row( - modifier = Modifier - .padding(10.dp) - .testTag(DROPDOWN_MENU_CLICKABLE_TEST_TAG) - .clickable(enabled = show) { - expanded = true - }, - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(4.dp) - ) { - TrailingIcon( - TextFieldIcon.Trailing( - it.currentItem.icon, - isTintable = false - ), - loading - ) - - if (show) { - CompositionLocalProvider( - LocalContentColor - provides - MaterialTheme.stripeColors.placeholderText - ) { - TrailingIcon( - trailingIcon = TextFieldIcon.Trailing( - R.drawable.stripe_ic_chevron_down, - isTintable = true - ), - loading = false - ) - } - } - } - - SingleChoiceDropdown( - expanded = expanded, - title = it.title, - currentChoice = it.currentItem, - choices = it.items, - headerTextColor = MaterialTheme.stripeColors.subtitle, - optionTextColor = MaterialTheme.stripeColors.onComponent, - onChoiceSelected = { item -> - textFieldController.onDropdownItemClicked(item) - - expanded = false - }, - onDismiss = { - expanded = false - } - ) - } + TrailingDropdown( + icon = it, + loading = loading, + onDropdownItemClicked = onDropdownItemClicked + ) } } } } }, isError = shouldShowError, - visualTransformation = textFieldController.visualTransformation, - keyboardOptions = KeyboardOptions( - keyboardType = textFieldController.keyboardType, - capitalization = textFieldController.capitalization, - imeAction = imeAction - ), - keyboardActions = KeyboardActions( - onNext = { - focusManager.moveFocus(nextFocusDirection) - }, - onDone = { - focusManager.clearFocus(true) - } - ), + visualTransformation = visualTransformation, + keyboardOptions = keyboardOptions, + keyboardActions = keyboardActions, singleLine = true, colors = colors ) @@ -407,6 +392,73 @@ internal fun TrailingIcon( } } +@Composable +private fun TrailingDropdown( + icon: TextFieldIcon.Dropdown, + loading: Boolean, + onDropdownItemClicked: (item: TextFieldIcon.Dropdown.Item) -> Unit +) { + var expanded by remember { + mutableStateOf(false) + } + + val show = !loading && !icon.hide + + Box { + Row( + modifier = Modifier + .padding(10.dp) + .testTag(DROPDOWN_MENU_CLICKABLE_TEST_TAG) + .clickable(enabled = show) { + expanded = true + }, + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(4.dp) + ) { + TrailingIcon( + TextFieldIcon.Trailing( + icon.currentItem.icon, + isTintable = false + ), + loading + ) + + if (show) { + CompositionLocalProvider( + LocalContentColor + provides + MaterialTheme.stripeColors.placeholderText + ) { + TrailingIcon( + trailingIcon = TextFieldIcon.Trailing( + R.drawable.stripe_ic_chevron_down, + isTintable = true + ), + loading = false + ) + } + } + } + + SingleChoiceDropdown( + expanded = expanded, + title = icon.title, + currentChoice = icon.currentItem, + choices = icon.items, + headerTextColor = MaterialTheme.stripeColors.subtitle, + optionTextColor = MaterialTheme.stripeColors.onComponent, + onChoiceSelected = { item -> + onDropdownItemClicked(item) + + expanded = false + }, + onDismiss = { + expanded = false + } + ) + } +} + private fun Modifier.conditionallyClickable(onClick: (() -> Unit)?): Modifier { return if (onClick != null) { clickable { onClick() } diff --git a/stripe-ui-core/src/test/java/com/stripe/android/uicore/elements/TextFieldUiScreenshotTest.kt b/stripe-ui-core/src/test/java/com/stripe/android/uicore/elements/TextFieldUiScreenshotTest.kt new file mode 100644 index 00000000000..edf303dff82 --- /dev/null +++ b/stripe-ui-core/src/test/java/com/stripe/android/uicore/elements/TextFieldUiScreenshotTest.kt @@ -0,0 +1,234 @@ +package com.stripe.android.uicore.elements + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.stripe.android.core.strings.resolvableString +import com.stripe.android.uicore.R +import com.stripe.android.uicore.utils.FontSize +import com.stripe.android.uicore.utils.PaparazziRule +import com.stripe.android.uicore.utils.SystemAppearance +import org.junit.Rule +import org.junit.Test + +class TextFieldUiScreenshotTest { + @get:Rule + val paparazziRule = PaparazziRule( + SystemAppearance.values(), + FontSize.values(), + boxModifier = Modifier + .padding(horizontal = 16.dp) + .padding(vertical = 16.dp) + .fillMaxWidth(), + ) + + @Test + fun testFilled() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testFilledAndDisabled() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = false, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testFilledWithError() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = true, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testFilledWithOptionalLabel() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = true, + trailingIcon = null + ) + } + } + + @Test + fun testFilledWithTrailingIcon() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = TextFieldIcon.Trailing( + idRes = R.drawable.stripe_ic_search, + isTintable = true, + ) + ) + } + } + + @Test + fun testFilledWithEnabledDropdown() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = TextFieldIcon.Dropdown( + title = resolvableString("Select an option"), + hide = false, + currentItem = TextFieldIcon.Dropdown.Item( + id = "visa", + label = resolvableString("Visa"), + icon = R.drawable.stripe_ic_card_visa + ), + items = listOf( + TextFieldIcon.Dropdown.Item( + id = "visa", + label = resolvableString("Visa"), + icon = R.drawable.stripe_ic_card_visa + ) + ) + ) + ) + } + } + + @Test + fun testFilledWithDisabledDropdown() { + paparazziRule.snapshot { + TextFieldUi( + label = "Card number", + value = "4000 0025 0000 1001", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = TextFieldIcon.Dropdown( + title = resolvableString("Select an option"), + hide = true, + currentItem = TextFieldIcon.Dropdown.Item( + id = "visa", + label = resolvableString("Visa"), + icon = R.drawable.stripe_ic_card_visa + ), + items = listOf( + TextFieldIcon.Dropdown.Item( + id = "visa", + label = resolvableString("Visa"), + icon = R.drawable.stripe_ic_card_visa + ) + ) + ) + ) + } + } + + @Test + fun testEmpty() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "", + enabled = true, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testEmptyAndDisabled() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "John Doe", + enabled = false, + loading = false, + placeholder = null, + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testEmptyWithPlaceholder() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "", + enabled = true, + loading = false, + placeholder = "Search for someone...", + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } + + @Test + fun testEmptyWithPlaceholderDisabled() { + paparazziRule.snapshot { + TextFieldUi( + label = "Search", + value = "", + enabled = false, + loading = false, + placeholder = "Search for someone...", + shouldShowError = false, + showOptionalLabel = false, + trailingIcon = null + ) + } + } +} diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..e4b43c60f17 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..a05d7e21eb1 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..3cfaa46b60d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,LargeFont].png new file mode 100644 index 00000000000..a118c8e0def Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyAndDisabled[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..ebb76f1c23d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..1adf6234759 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..a8119d14bfd Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,LargeFont].png new file mode 100644 index 00000000000..08309a3600d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholderDisabled[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..ebb76f1c23d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..1adf6234759 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..a8119d14bfd Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,LargeFont].png new file mode 100644 index 00000000000..08309a3600d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmptyWithPlaceholder[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..ebb76f1c23d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..1adf6234759 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..a8119d14bfd Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,LargeFont].png new file mode 100644 index 00000000000..08309a3600d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testEmpty[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..e4b43c60f17 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..a05d7e21eb1 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..3cfaa46b60d Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,LargeFont].png new file mode 100644 index 00000000000..a118c8e0def Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledAndDisabled[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..b824c6f9c57 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..b3bc13a2bf5 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..6dc8285421c Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,LargeFont].png new file mode 100644 index 00000000000..d267f2851b3 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithDisabledDropdown[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..be2081b9b09 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..9b9d7a6af7a Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..47a96d88109 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,LargeFont].png new file mode 100644 index 00000000000..cceb04cb971 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithEnabledDropdown[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..ab653c805b6 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..81fbf4ebb56 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..8441a501ea8 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,LargeFont].png new file mode 100644 index 00000000000..d99d1bbcc44 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithError[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..0d90ed8bbf0 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..3c7062a9ab6 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..2fb1797fdf7 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,LargeFont].png new file mode 100644 index 00000000000..c2620215572 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithOptionalLabel[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..6c05be795db Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..a5689e1c660 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..c12dec5a781 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,LargeFont].png new file mode 100644 index 00000000000..f52c1e891d3 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilledWithTrailingIcon[LightTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,DefaultFont].png new file mode 100644 index 00000000000..c13d8b5e917 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,LargeFont].png new file mode 100644 index 00000000000..56e50a98c5f Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[DarkTheme,LargeFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,DefaultFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,DefaultFont].png new file mode 100644 index 00000000000..cffcb5453b2 Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,DefaultFont].png differ diff --git a/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,LargeFont].png b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,LargeFont].png new file mode 100644 index 00000000000..300b9d7274a Binary files /dev/null and b/stripe-ui-core/src/test/snapshots/images/com.stripe.android.uicore.elements_TextFieldUiScreenshotTest_testFilled[LightTheme,LargeFont].png differ