Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ private fun ConfiguredBottomSheet(
BottomSheetContentExamples.List -> ListContent(onHideBottomSheetClicked)
}
},
applyTempStatusBarPadding = true,
dragHandle = if (isDragHandlerEnabled) {
{ DragHandle() }
} else {
null
},
// applyTempStatusBarPadding = true,
// dragHandle = if (isDragHandlerEnabled) {
// { DragHandle() }
// } else {
// null
// },
onDismissRequest = onDismissRequest,
sheetState = bottomSheetState,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.ScrollableTabRow
import androidx.compose.material3.SecondaryScrollableTabRow
import androidx.compose.material3.Tab
import androidx.compose.material3.TabPosition
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -96,15 +94,15 @@ internal fun CatalogTabs(
tabSelected: CatalogHomeScreen,
onTabSelected: (CatalogHomeScreen) -> Unit,
) {
ScrollableTabRow(
SecondaryScrollableTabRow(
selectedTabIndex = tabSelected.ordinal,
modifier = modifier,
containerColor = Color.Transparent,
contentColor = LocalContentColor.current,
indicator = { tabPositions: List<TabPosition> ->
indicator = {
Box(
Modifier
.tabIndicatorOffset(tabPositions[tabSelected.ordinal])
.tabIndicatorOffset(tabSelected.ordinal)
.fillMaxSize()
.padding(horizontal = 4.dp)
.border(BorderStroke(2.dp, LocalContentColor.current), SparkTheme.shapes.full),
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appCompat" }
androidx-appCompat-resources = { module = "androidx.appcompat:appcompat-resources", version.ref = "androidx-appCompat" }

androidx-compose-animation-graphics = { module = "androidx.compose.animation:animation-graphics" }
androidx-compose-bom = "androidx.compose:compose-bom:2025.06.00"
androidx-compose-bom = "androidx.compose:compose-bom-alpha:2025.06.00"

Check notice

Code scanning / Android Lint

Obsolete Gradle Dependency

A newer version of androidx.compose:compose-bom-alpha than 2025.06.00 is available: 2025.07.00
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" }
androidx-compose-material-iconsCore = { module = "androidx.compose.material:material-icons-core" }
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
androidx-compose-material3-windowSizeClass = { module = "androidx.compose.material3:material3-window-size-class"}
Expand Down
2 changes: 1 addition & 1 deletion spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {

api(libs.androidx.compose.animation.graphics)
api(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material.iconsExtended)
implementation(libs.androidx.compose.material.iconsCore)
api(libs.androidx.compose.material3)
api(libs.androidx.compose.material3.adaptive)
api(libs.androidx.compose.ui)
Expand Down
2 changes: 0 additions & 2 deletions spark/src/main/kotlin/com/adevinta/spark/SparkTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import androidx.compose.foundation.shape.CutCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.LocalRippleConfiguration
import androidx.compose.material3.LocalUseFallbackRippleImplementation
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
import androidx.compose.material3.RippleConfiguration
Expand Down Expand Up @@ -148,7 +147,6 @@ public fun SparkTheme(
LocalSparkFeatureFlag provides sparkFeatureFlag,
LocalSparkExceptionHandler provides exceptionHandler,
LocalWindowSizeClass provides currentWindowAdaptiveInfo().windowSizeClass,
LocalUseFallbackRippleImplementation provides false,
LocalIndication provides rippleIndication,
) {
MaterialTheme(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ internal fun SparkModalBottomSheet(
onDismissRequest = onDismissRequest,
modifier = modifier,
sheetState = sheetState,
shape = shape,
// shape = shape,
containerColor = containerColor,
contentColor = contentColor,
contentWindowInsets = contentWindowInsets,
// contentWindowInsets = contentWindowInsets,
properties = properties,
dragHandle = null,
) {
// dragHandle = null,
content = content,
) /*{
Box {
val systemBarTopInsets = WindowInsets.systemBars.asPaddingValues().calculateTopPadding()
val additionalTopPadding = if (applyTempStatusBarPadding) systemBarTopInsets else 0.dp
Expand All @@ -190,7 +191,7 @@ internal fun SparkModalBottomSheet(
}
}
}
}
}*/
}

@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal fun SparkIconButton(
}
Box(modifier = modifier) {
TooltipBox(
positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider(),
positionProvider = TooltipDefaults.rememberTooltipPositionProvider(),
tooltip = {
PlainTooltip {
Text(contentDescription.orEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internal fun SparkIconToggleButton(
TooltipBox(
state = rememberTooltipState(),
tooltip = { PlainTooltip { Text(contentDescription.orEmpty()) } },
positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider(),
positionProvider = TooltipDefaults.rememberTooltipPositionProvider(),
) {
Surface(
checked = checked,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ public fun DropdownMenu(
* outside the menu's bounds
* @param modifier the [Modifier] to be applied to this menu
* @param scrollState a [ScrollState] used by the menu's content for items vertical scrolling
* @param matchTextFieldWidth whether the menu's width should be forcefully constrained to match
* the width of the text field to which it's attached.
* @param matchAnchorWidth whether the menu's width should be forcefully constrained to match the width of the
* text field to which it's attached.
* @param content the content of the menu
*/
@SuppressLint("ComposeUnstableReceiver")
Expand All @@ -173,7 +173,7 @@ public fun ExposedDropdownMenuBoxScope.ExposedDropdownMenu(
onDismissRequest: () -> Unit,
modifier: Modifier = Modifier,
scrollState: ScrollState = rememberScrollState(),
matchTextFieldWidth: Boolean = true,
matchAnchorWidth: Boolean = true,
content: @Composable DropdownMenuItemColumnScope.() -> Unit,
) {
ExposedDropdownMenu(
Expand All @@ -185,7 +185,7 @@ public fun ExposedDropdownMenuBoxScope.ExposedDropdownMenu(
containerColor = SparkTheme.colors.surface,
tonalElevation = ElevationTokens.Level0,
shadowElevation = ElevationTokens.Level2,
matchTextFieldWidth = matchTextFieldWidth,
matchAnchorWidth = matchAnchorWidth,
border = null,
content = {
val scope = remember { DropdownMenuItemWrapper(this) }
Expand All @@ -203,8 +203,8 @@ public fun ExposedDropdownMenuBoxScope.ExposedDropdownMenu(
* outside the menu's bounds
* @param modifier the [Modifier] to be applied to this menu
* @param scrollState a [ScrollState] used by the menu's content for items vertical scrolling
* @param matchTextFieldWidth whether the menu's width should be forcefully constrained to match
* the width of the text field to which it's attached.
* @param matchAnchorWidth whether the menu's width should be forcefully constrained to match the width of the text
* field to which it's attached.
* @param content the content of the menu
*/
@SuppressLint("ComposeUnstableReceiver")
Expand All @@ -215,7 +215,7 @@ public fun ExposedDropdownMenuBoxScope.SingleChoiceExposedDropdownMenu(
onDismissRequest: () -> Unit,
modifier: Modifier = Modifier,
scrollState: ScrollState = rememberScrollState(),
matchTextFieldWidth: Boolean = true,
matchAnchorWidth: Boolean = true,
content: @Composable SingleChoiceDropdownItemColumnScope.() -> Unit,
) {
ExposedDropdownMenu(
Expand All @@ -229,7 +229,7 @@ public fun ExposedDropdownMenuBoxScope.SingleChoiceExposedDropdownMenu(
containerColor = SparkTheme.colors.surface,
tonalElevation = ElevationTokens.Level0,
shadowElevation = ElevationTokens.Level2,
matchTextFieldWidth = matchTextFieldWidth,
matchAnchorWidth = matchAnchorWidth,
border = null,
content = {
val scope = remember { SingleChoiceDropdownItemWrapper(this) }
Expand All @@ -247,8 +247,8 @@ public fun ExposedDropdownMenuBoxScope.SingleChoiceExposedDropdownMenu(
* outside the menu's bounds
* @param modifier the [Modifier] to be applied to this menu
* @param scrollState a [ScrollState] used by the menu's content for items vertical scrolling
* @param matchTextFieldWidth whether the menu's width should be forcefully constrained to match
* the width of the text field to which it's attached.
* @param matchAnchorWidth whether the menu's width should be forcefully constrained to match the width of the text
* field to which it's attached.
* @param content the content of the menu
*/
@SuppressLint("ComposeUnstableReceiver")
Expand All @@ -259,7 +259,7 @@ public fun ExposedDropdownMenuBoxScope.MultipleChoiceExposedDropdownMenu(
onDismissRequest: () -> Unit,
modifier: Modifier = Modifier,
scrollState: ScrollState = rememberScrollState(),
matchTextFieldWidth: Boolean = true,
matchAnchorWidth: Boolean = true,
content: @Composable MultiChoiceDropdownItemColumnScope.() -> Unit,
) {
ExposedDropdownMenu(
Expand All @@ -271,7 +271,7 @@ public fun ExposedDropdownMenuBoxScope.MultipleChoiceExposedDropdownMenu(
containerColor = SparkTheme.colors.surface,
tonalElevation = ElevationTokens.Level2,
shadowElevation = ElevationTokens.Level2,
matchTextFieldWidth = matchTextFieldWidth,
matchAnchorWidth = matchAnchorWidth,
border = null,
content = {
val scope = remember { MultiChoiceDropdownItemWrapper(this) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public fun Popover(

TooltipBox(
modifier = modifier,
positionProvider = TooltipDefaults.rememberRichTooltipPositionProvider(),
positionProvider = TooltipDefaults.rememberTooltipPositionProvider(),
focusable = focusable,
enableUserInput = enableUserInput,
tooltip = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public fun RatingInput(
val tooltipState = rememberTooltipState()
val starRatingValue = starRatingIndex + 1
TooltipBox(
positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider(),
positionProvider = TooltipDefaults.rememberTooltipPositionProvider(),
tooltip = {
PlainTooltip {
Text("$starRatingValue")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import androidx.compose.foundation.layout.width
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuAnchorType
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.IconButtonColors
import androidx.compose.material3.IconButtonDefaults
import androidx.compose.material3.IconToggleButtonColors
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MenuAnchorType
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -253,7 +253,7 @@ public abstract class AddonScope {
) {
ExposedDropdownMenuBox(expanded = expanded, onExpandedChange = onExpandedChange) {
Surface(
modifier = modifier.menuAnchor(MenuAnchorType.SecondaryEditable),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.SecondaryEditable),
onClick = {},
shape = SparkTheme.shapes.small,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import androidx.compose.foundation.text.input.TextFieldLineLimits
import androidx.compose.foundation.text.input.TextFieldState
import androidx.compose.foundation.text.input.rememberTextFieldState
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuAnchorType
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.MenuAnchorType
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -145,15 +145,15 @@ public fun SingleChoiceComboBox(
SparkSelectTrailingIcon(
expanded = expanded,
modifier = Modifier.menuAnchor(
MenuAnchorType.SecondaryEditable,
ExposedDropdownMenuAnchorType.SecondaryEditable,
enabled = enabled,
),
onClick = { onExpandedChange(!expanded) },
)
}
TextField(
state = state,
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryEditable, enabled = enabled),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryEditable, enabled = enabled),
enabled = enabled,
readOnly = false,
required = required,
Expand Down Expand Up @@ -268,15 +268,15 @@ public fun MultiChoiceComboBox(
SparkSelectTrailingIcon(
expanded = expanded,
modifier = Modifier.menuAnchor(
MenuAnchorType.SecondaryEditable,
ExposedDropdownMenuAnchorType.SecondaryEditable,
enabled = enabled,
),
onClick = { onExpandedChange(!expanded) },
)
}
TextField(
state = state,
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryEditable, enabled = enabled),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryEditable, enabled = enabled),
enabled = enabled,
readOnly = false,
required = required,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuAnchorType
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.MenuAnchorType
import androidx.compose.material3.TooltipDefaults
import androidx.compose.material3.TooltipState
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -181,7 +181,7 @@ public fun SelectTextField(
TextField(
value = value,
onValueChange = onValueChange,
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
enabled = enabled,
readOnly = readOnly,
required = required,
Expand Down Expand Up @@ -297,7 +297,7 @@ public fun SelectTextField(
TextField(
value = value,
onValueChange = onValueChange,
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
enabled = enabled,
readOnly = readOnly,
required = required,
Expand Down Expand Up @@ -398,7 +398,7 @@ public fun Dropdown(
TextField(
value = value,
onValueChange = { },
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
enabled = enabled,
readOnly = true,
required = required,
Expand Down Expand Up @@ -495,7 +495,7 @@ public fun SingleChoiceDropdown(
TextField(
value = value,
onValueChange = { },
modifier = modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable),
modifier = modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
enabled = enabled,
readOnly = true,
required = required,
Expand Down Expand Up @@ -595,7 +595,7 @@ public fun MultiChoiceDropdown(
TextField(
value = value,
onValueChange = { },
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable, enabled),
modifier = Modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable, enabled),
enabled = enabled,
readOnly = true,
required = required,
Expand Down Expand Up @@ -876,7 +876,7 @@ private fun SelectTextFieldTapPreview() {
val tooltipState = remember { TooltipState() }
val coroutineScope = rememberCoroutineScope()
TooltipBox(
positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider(),
positionProvider = TooltipDefaults.rememberTooltipPositionProvider(),
tooltip = {
PlainTooltip {
Text("Tapped")
Expand Down
12 changes: 12 additions & 0 deletions spark/src/main/kotlin/com/adevinta/spark/tokens/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,18 @@ public fun SparkColors.asMaterial3Colors(): ColorScheme = ColorScheme(
surfaceContainerHighest = surface,
surfaceContainerLow = surface,
surfaceContainerLowest = surface,
primaryFixed = main,
primaryFixedDim = main,
onPrimaryFixed = onMain,
onPrimaryFixedVariant = onMain,
secondaryFixed = support,
secondaryFixedDim = support,
onSecondaryFixed = onSupport,
onSecondaryFixedVariant = onSupport,
tertiaryFixed = support,
tertiaryFixedDim = support,
onTertiaryFixed = onSupport,
onTertiaryFixedVariant = onSupport,
)

/**
Expand Down
Loading