|
|
|
@ -20,7 +20,9 @@ import android.os.Build
|
|
|
|
|
import androidx.annotation.ChecksSdkIntAtLeast
|
|
|
|
|
import androidx.annotation.VisibleForTesting
|
|
|
|
|
import androidx.compose.foundation.isSystemInDarkTheme
|
|
|
|
|
import androidx.compose.material3.ColorScheme
|
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
|
import androidx.compose.material3.Typography
|
|
|
|
|
import androidx.compose.material3.darkColorScheme
|
|
|
|
|
import androidx.compose.material3.dynamicDarkColorScheme
|
|
|
|
|
import androidx.compose.material3.dynamicLightColorScheme
|
|
|
|
@ -28,6 +30,7 @@ import androidx.compose.material3.lightColorScheme
|
|
|
|
|
import androidx.compose.material3.surfaceColorAtElevation
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.runtime.CompositionLocalProvider
|
|
|
|
|
import androidx.compose.runtime.ReadOnlyComposable
|
|
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
|
|
import androidx.compose.ui.platform.LocalContext
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
@ -246,5 +249,34 @@ fun NiaTheme(
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.S)
|
|
|
|
|
fun supportsDynamicTheming() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
|
|
|
|
|
|
|
|
|
|
object NiaTheme {
|
|
|
|
|
|
|
|
|
|
val gradientColors: GradientColors
|
|
|
|
|
@Composable
|
|
|
|
|
@ReadOnlyComposable
|
|
|
|
|
get() = LocalGradientColors.current
|
|
|
|
|
|
|
|
|
|
val backgroundTheme: BackgroundTheme
|
|
|
|
|
@Composable
|
|
|
|
|
@ReadOnlyComposable
|
|
|
|
|
get() = LocalBackgroundTheme.current
|
|
|
|
|
|
|
|
|
|
val tintTheme: TintTheme
|
|
|
|
|
@Composable
|
|
|
|
|
@ReadOnlyComposable
|
|
|
|
|
get() = LocalTintTheme.current
|
|
|
|
|
|
|
|
|
|
val colorScheme: ColorScheme
|
|
|
|
|
@Composable
|
|
|
|
|
@ReadOnlyComposable
|
|
|
|
|
get() = MaterialTheme.colorScheme
|
|
|
|
|
|
|
|
|
|
val typography: Typography
|
|
|
|
|
@Composable
|
|
|
|
|
@ReadOnlyComposable
|
|
|
|
|
get() = MaterialTheme.typography
|
|
|
|
|
}
|
|
|
|
|