Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
90eaa4b
placeholderText -> placeholder
vitalii-vanziak-cko Jun 19, 2025
d53f0db
TextFieldDefaults.DecorationBox with optional label
vitalii-vanziak-cko Jun 19, 2025
c1368b4
fieldHeight 52.dp
vitalii-vanziak-cko Jun 19, 2025
963a524
Extract field height as parameter
vitalii-vanziak-cko Jun 19, 2025
a78763c
POTextField2
vitalii-vanziak-cko Jun 19, 2025
18c2b90
contentPadding2
vitalii-vanziak-cko Jun 20, 2025
54bb324
OutlinedTextFieldDefaults.DecorationBox, remove default label
vitalii-vanziak-cko Jun 20, 2025
463ab4c
Updated fonts, added work_sans_semibold.ttf
vitalii-vanziak-cko Jun 20, 2025
c306c9f
Update typography
vitalii-vanziak-cko Jun 20, 2025
5412c16
Added Paragraph
vitalii-vanziak-cko Jun 20, 2025
51527d7
letterSpacing
vitalii-vanziak-cko Jun 20, 2025
18f2694
Added 'labelTextColor' to style
vitalii-vanziak-cko Jun 23, 2025
4bc56c0
Custom label and placeholder in POTextField
vitalii-vanziak-cko Jun 23, 2025
ffc929d
Updated POSpacing
vitalii-vanziak-cko Jun 23, 2025
9b83be3
Adjust field min height and paddings
vitalii-vanziak-cko Jun 23, 2025
b294433
Floating scale 0.8f
vitalii-vanziak-cko Jun 23, 2025
aad1701
Field style
vitalii-vanziak-cko Jun 23, 2025
bfce44d
FieldState: title -> label
vitalii-vanziak-cko Jun 23, 2025
7547f14
POTextField2: added error message box, applied on screen
vitalii-vanziak-cko Jun 23, 2025
f5aa8b1
POMessageBox paddings
vitalii-vanziak-cko Jun 23, 2025
7204885
po_icon_info
vitalii-vanziak-cko Jun 23, 2025
c10328f
po_icon_warning_diamond.xml
vitalii-vanziak-cko Jun 23, 2025
ec2f98c
error2 style
vitalii-vanziak-cko Jun 23, 2025
98acbe7
Update colors and error2 style
vitalii-vanziak-cko Jun 23, 2025
6d35fd0
Label error color
vitalii-vanziak-cko Jun 23, 2025
cec4cae
Update error colors
vitalii-vanziak-cko Jun 23, 2025
921cafc
Fix dropdown floating label
vitalii-vanziak-cko Jun 24, 2025
3b24bfe
PODropdownField2
vitalii-vanziak-cko Jun 24, 2025
09647a4
Dropdown arrow color
vitalii-vanziak-cko Jun 24, 2025
ad08f9c
po_chevron_down
vitalii-vanziak-cko Jun 24, 2025
6d61025
Single line label and placeholder
vitalii-vanziak-cko Jun 24, 2025
64fe01d
defaultMenu2 style
vitalii-vanziak-cko Jun 24, 2025
2563867
Secondary text color for dropdown menu items text
vitalii-vanziak-cko Jun 24, 2025
2ee8a8e
MaxVisibleMenuItems = 9
vitalii-vanziak-cko Jun 24, 2025
d43eec4
Expand dropdown menu after keyboard is closed to fix resizing issues
vitalii-vanziak-cko Jun 24, 2025
474909a
Updated POPhoneNumberField
vitalii-vanziak-cko Jun 25, 2025
0b42b52
Focus on phone number field when region changed
vitalii-vanziak-cko Jun 25, 2025
76fc00e
Phone number labels and placeholders
vitalii-vanziak-cko Jun 25, 2025
566feda
Code impr
vitalii-vanziak-cko Jun 25, 2025
c2378c9
Remove placeholders
vitalii-vanziak-cko Jun 25, 2025
59abf23
Error padding 12
vitalii-vanziak-cko Jun 26, 2025
c68e7cb
POCodeField style
vitalii-vanziak-cko Jun 26, 2025
fb39041
POCodeField2 (draft)
vitalii-vanziak-cko Jun 26, 2025
4a213f9
AGP 8.11.0
vitalii-vanziak-cko Jun 26, 2025
578b517
Add label field style
vitalii-vanziak-cko Jun 26, 2025
0f2b04c
Apply code field style 'default2'
vitalii-vanziak-cko Jun 26, 2025
96a1598
value -> key
vitalii-vanziak-cko Jun 26, 2025
f70d7d7
POCheckbox2
vitalii-vanziak-cko Jun 26, 2025
fcafc9d
code2 cell width 40
vitalii-vanziak-cko Jun 27, 2025
86f84cf
Checkbox style default2
vitalii-vanziak-cko Jun 27, 2025
63b4b8f
Updated colors and secondary button style
vitalii-vanziak-cko Jun 27, 2025
d9149a4
neutral color for dark theme
vitalii-vanziak-cko Jun 27, 2025
eacf707
Update backgroundDisabled color
vitalii-vanziak-cko Jun 30, 2025
a023dc0
radioButtonSize
vitalii-vanziak-cko Jun 30, 2025
a4bf4ff
CheckRadio colors group
vitalii-vanziak-cko Jun 30, 2025
c241cd5
Update CheckRadio colors for default2 style
vitalii-vanziak-cko Jun 30, 2025
af556ee
PORadioGroup.default2
vitalii-vanziak-cko Jun 30, 2025
4fb3f84
Fix checkbox error state
vitalii-vanziak-cko Jun 30, 2025
bc819b3
Update check/radio error colors
vitalii-vanziak-cko Jun 30, 2025
6e97565
ghostBackgroundDisabled
vitalii-vanziak-cko Jun 30, 2025
9fcfbcc
onButtonDisabled
vitalii-vanziak-cko Jun 30, 2025
94446c3
PORadioButton code impr
vitalii-vanziak-cko Jun 30, 2025
3503997
Buttons style: primary2 & secondary2
vitalii-vanziak-cko Jun 30, 2025
df8bb53
Update dialog style
vitalii-vanziak-cko Jun 30, 2025
2b08849
Fix POCodeField2 label condition
vitalii-vanziak-cko Jun 30, 2025
3c9a163
roundedCorners4
vitalii-vanziak-cko Jun 30, 2025
ec35ca2
Added 'darkout' color
vitalii-vanziak-cko Jun 30, 2025
e44111a
Added 'darkoutRipple' color
vitalii-vanziak-cko Jul 1, 2025
ac421d6
CheckRadio error color
vitalii-vanziak-cko Jul 1, 2025
a8dfea4
Update 'darkoutRipple' color
vitalii-vanziak-cko Jul 1, 2025
66f7cad
PORadioField
vitalii-vanziak-cko Jul 1, 2025
bf2527e
val rowHeight
vitalii-vanziak-cko Jul 1, 2025
da5c8a8
Better multi-line support in PORadioField
vitalii-vanziak-cko Jul 1, 2025
3f66a17
POCheckboxField
vitalii-vanziak-cko Jul 1, 2025
815433b
PORadioFieldStyle and config
vitalii-vanziak-cko Jul 1, 2025
9a4dea2
PORadioField.custom(style)
vitalii-vanziak-cko Jul 1, 2025
925bb54
Delete POLabeledCheckboxField
vitalii-vanziak-cko Jul 1, 2025
97a4c40
POCheckboxField modifier
vitalii-vanziak-cko Jul 1, 2025
febc2fd
internal modifier
vitalii-vanziak-cko Jul 2, 2025
aed5d8f
Added ripple to checkbox
vitalii-vanziak-cko Jul 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {
ext {
androidGradlePluginVersion = '8.10.1'
androidGradlePluginVersion = '8.11.0'
kotlinVersion = '2.1.20'
kspVersion = '2.1.20-1.0.32'
dokkaVersion = '1.9.20'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ sealed class PONativeAlternativePaymentElement {
/**
* Available parameter value.
*
* @param[value] Parameter value.
* @param[key] Parameter value.
* @param[label] Value display label.
* @param[preselected] Indicates whether the value should be preselected by default.
*/
@JsonClass(generateAdapter = true)
data class AvailableValue(
val value: String,
val key: String,
val label: String,
val preselected: Boolean
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ internal class NativeAlternativePaymentMethodViewModel private constructor(

private fun getInputHint(type: ParameterType) =
when (type) {
EMAIL -> app.getString(R.string.po_native_apm_email_placeholder)
PHONE -> app.getString(R.string.po_native_apm_phone_placeholder)
EMAIL -> app.getString(R.string.po_native_apm_placeholder_email)
PHONE -> app.getString(R.string.po_native_apm_placeholder_phone)
else -> null
}

Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<string name="po_native_apm_save_barcode_error_title">فشل حفظ الصورة</string>
<string name="po_native_apm_save_barcode_error_message">لم نتمكن من حفظ الصورة. يرجى التحقق من أذوناتك أو محاولة التقاط لقطة شاشة كبديل.</string>
<string name="po_native_apm_save_barcode_error_confirm">فهمت</string>
<string name="po_native_apm_country_placeholder">بلد</string>
<string name="po_native_apm_phone_placeholder">أدخل رقم الهاتف</string>
<string name="po_native_apm_email_placeholder">name@example.com</string>
<string name="po_native_apm_label_country">بلد</string>
<string name="po_native_apm_placeholder_phone">أدخل رقم الهاتف</string>
<string name="po_native_apm_placeholder_email">name@example.com</string>
<string name="po_native_apm_success_message">نجاح! تمت الموافقة على الدفع</string>
<string name="po_native_apm_error_required_parameter">البيانات مطلوبة</string>
<string name="po_native_apm_error_invalid_number">الرقم غير صحيح</string>
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<string name="po_native_apm_save_barcode_error_title">Échec de l\'enregistrement de l\'image</string>
<string name="po_native_apm_save_barcode_error_message">Nous n\'avons pas pu enregistrer l\'image. Veuillez vérifier vos permissions ou alternativement prendre une capture d\'écran.</string>
<string name="po_native_apm_save_barcode_error_confirm">Compris</string>
<string name="po_native_apm_country_placeholder">Pays</string>
<string name="po_native_apm_phone_placeholder">Entrez votre numéro de téléphone</string>
<string name="po_native_apm_email_placeholder">nom@exemple.fr</string>
<string name="po_native_apm_label_country">Pays</string>
<string name="po_native_apm_placeholder_phone">Entrez votre numéro de téléphone</string>
<string name="po_native_apm_placeholder_email">nom@exemple.fr</string>
<string name="po_native_apm_success_message">Succès !\nPaiement confirmé.</string>
<string name="po_native_apm_error_required_parameter">Paramètre requis.</string>
<string name="po_native_apm_error_invalid_number">Numéro invalide.</string>
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<string name="po_native_apm_save_barcode_error_title">Nie udało się zapisać obrazu</string>
<string name="po_native_apm_save_barcode_error_message">Sprawdź uprawnienia systemu lub zrób zrzut ekranu.</string>
<string name="po_native_apm_save_barcode_error_confirm">Rozumiem</string>
<string name="po_native_apm_country_placeholder">Kraj</string>
<string name="po_native_apm_phone_placeholder">Twój numer telefonu</string>
<string name="po_native_apm_email_placeholder">imię@przykład.pl</string>
<string name="po_native_apm_label_country">Kraj</string>
<string name="po_native_apm_placeholder_phone">Twój numer telefonu</string>
<string name="po_native_apm_placeholder_email">imię@przykład.pl</string>
<string name="po_native_apm_success_message">Sukces!\nPłatność przyjęta.</string>
<string name="po_native_apm_error_required_parameter">Parametr jest wmagany.</string>
<string name="po_native_apm_error_invalid_number">Niepoprawny numer.</string>
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<string name="po_native_apm_save_barcode_error_title">Falha na gravação da imagem</string>
<string name="po_native_apm_save_barcode_error_message">Não conseguimos gravar a imagem. Por favor, verifique as suas permissões ou tire uma captura do ecrā como alternativa.</string>
<string name="po_native_apm_save_barcode_error_confirm">Compreendi</string>
<string name="po_native_apm_country_placeholder">País</string>
<string name="po_native_apm_phone_placeholder">Insira o seu número de telemóvel</string>
<string name="po_native_apm_email_placeholder">nome@exemplo.pt</string>
<string name="po_native_apm_label_country">País</string>
<string name="po_native_apm_placeholder_phone">Insira o seu número de telemóvel</string>
<string name="po_native_apm_placeholder_email">nome@exemplo.pt</string>
<string name="po_native_apm_success_message">Successo!\nPagamento aprovado.</string>
<string name="po_native_apm_error_required_parameter">Campo obrigatório.</string>
<string name="po_native_apm_error_invalid_number">Número inválido.</string>
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<string name="po_native_apm_save_barcode_error_title">Image save failed</string>
<string name="po_native_apm_save_barcode_error_message">We couldn\'t save the image. Please check your permissions or try taking a screenshot as an alternative.</string>
<string name="po_native_apm_save_barcode_error_confirm">Got it</string>
<string name="po_native_apm_country_placeholder">Country</string>
<string name="po_native_apm_phone_placeholder">Enter phone number</string>
<string name="po_native_apm_email_placeholder">name@example.com</string>
<string name="po_native_apm_label_country">Country</string>
<string name="po_native_apm_placeholder_phone">Enter phone number</string>
<string name="po_native_apm_placeholder_email">name@example.com</string>
<string name="po_native_apm_success_message">Success!\nPayment approved.</string>
<string name="po_native_apm_error_required_parameter">Parameter is required.</string>
<string name="po_native_apm_error_invalid_number">Number is not valid.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ object POActionsContainer {
)
}

val default2: Style
@Composable get() = with(ProcessOutTheme) {
Style(
primary = POButton.primary2,
secondary = POButton.secondary2,
dividerColor = colors.border.subtle,
backgroundColor = colors.surface.default,
axis = POAxis.Vertical
)
}

@Composable
fun custom(style: POActionsContainerStyle) = with(style) {
Style(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
Expand Down Expand Up @@ -235,7 +236,7 @@ object POButton {
),
disabled = StateStyle(
text = POText.Style(
color = colors.text.disabled,
color = colors.text.onButtonDisabled,
textStyle = typography.button
),
shape = shapes.roundedCornersSmall,
Expand All @@ -252,6 +253,38 @@ object POButton {
)
}

val primary2: Style
@Composable get() = with(ProcessOutTheme) {
Style(
normal = StateStyle(
text = POText.Style(
color = colors.text.inverse,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.primaryBackgroundDefault,
elevation = 0.dp
),
disabled = StateStyle(
text = POText.Style(
color = colors.text.onButtonDisabled,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.primaryBackgroundDisabled,
elevation = 0.dp
),
highlighted = HighlightedStyle(
textColor = colors.text.inverse,
borderColor = Color.Transparent,
backgroundColor = colors.button.primaryBackgroundPressed
),
progressIndicatorColor = colors.text.inverse
)
}

val secondary: Style
@Composable get() = with(ProcessOutTheme) {
Style(
Expand All @@ -261,23 +294,55 @@ object POButton {
textStyle = typography.button
),
shape = shapes.roundedCornersSmall,
border = POBorderStroke(width = 1.dp, color = colors.button.secondaryBorderDefault),
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.secondaryBackgroundDefault,
elevation = 0.dp
),
disabled = StateStyle(
text = POText.Style(
color = colors.text.disabled,
color = colors.text.onButtonDisabled,
textStyle = typography.button
),
shape = shapes.roundedCornersSmall,
border = POBorderStroke(width = 1.dp, color = colors.button.secondaryBorderDisabled),
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.secondaryBackgroundDisabled,
elevation = 0.dp
),
highlighted = HighlightedStyle(
textColor = colors.text.primary,
borderColor = colors.button.secondaryBorderPressed,
borderColor = Color.Transparent,
backgroundColor = colors.button.secondaryBackgroundPressed
),
progressIndicatorColor = colors.text.primary
)
}

val secondary2: Style
@Composable get() = with(ProcessOutTheme) {
Style(
normal = StateStyle(
text = POText.Style(
color = colors.text.primary,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.secondaryBackgroundDefault,
elevation = 0.dp
),
disabled = StateStyle(
text = POText.Style(
color = colors.text.onButtonDisabled,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = colors.button.secondaryBackgroundDisabled,
elevation = 0.dp
),
highlighted = HighlightedStyle(
textColor = colors.text.primary,
borderColor = Color.Transparent,
backgroundColor = colors.button.secondaryBackgroundPressed
),
progressIndicatorColor = colors.text.primary
Expand All @@ -299,12 +364,12 @@ object POButton {
),
disabled = StateStyle(
text = POText.Style(
color = colors.text.disabled,
color = colors.text.onButtonDisabled,
textStyle = typography.button
),
shape = shapes.roundedCornersSmall,
border = POBorderStroke(width = 0.dp, color = Color.Transparent),
backgroundColor = Color.Transparent,
backgroundColor = colors.button.ghostBackgroundDisabled,
elevation = 0.dp
),
highlighted = HighlightedStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
Expand All @@ -30,6 +31,7 @@ import com.processout.sdk.ui.core.theme.ProcessOutTheme.colors
import com.processout.sdk.ui.core.theme.ProcessOutTheme.dimensions
import com.processout.sdk.ui.core.theme.ProcessOutTheme.shapes
import com.processout.sdk.ui.core.theme.ProcessOutTheme.spacing
import com.processout.sdk.ui.core.theme.ProcessOutTheme.typography

/** @suppress */
@ProcessOutInternalApi
Expand Down Expand Up @@ -166,8 +168,14 @@ object PODialog {

val default: Style
@Composable get() = Style(
title = POText.title,
message = POText.body2,
title = POText.Style(
color = colors.text.primary,
textStyle = typography.s20(FontWeight.SemiBold)
),
message = POText.Style(
color = colors.text.secondary,
textStyle = typography.paragraph.s16()
),
confirmButton = defaultButton,
dismissButton = defaultButton,
backgroundColor = colors.surface.default
Expand All @@ -176,8 +184,22 @@ object PODialog {
private val defaultButton: POButton.Style
@Composable get() = with(POButton.ghost) {
copy(
normal = normal.copy(paddingHorizontal = spacing.large),
disabled = disabled.copy(paddingHorizontal = spacing.large)
normal = normal.copy(
text = POText.Style(
color = colors.text.primary,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
paddingHorizontal = spacing.space16
),
disabled = disabled.copy(
text = POText.Style(
color = colors.text.onButtonDisabled,
textStyle = typography.s15(FontWeight.Medium)
),
shape = shapes.roundedCorners6,
paddingHorizontal = spacing.space16
)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import com.processout.sdk.ui.core.annotation.ProcessOutInternalApi
object POIme {

@Composable
fun isImeVisibleAsState(): State<Boolean> {
fun isImeVisibleAsState(
policy: SnapshotMutationPolicy<Boolean> = neverEqualPolicy()
): State<Boolean> {
val isImeVisible = remember {
mutableStateOf(
value = false,
policy = neverEqualPolicy()
policy = policy
)
}
val view = LocalView.current.rootView
Expand Down
Loading