feat(theme): add centralized typography and color definitions

- Introduced `AppTypography` for standardized text styles across the project.
- Added `AppColors` with centralized color palette for consistent theming.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-03-21 16:57:20 +01:00
parent ac3bfcad3c
commit a0b7d5aa34
2 changed files with 82 additions and 0 deletions
@@ -0,0 +1,36 @@
package at.mocode.frontend.core.designsystem.theme
import androidx.compose.ui.graphics.Color
/**
* Zentrale Farbdefinitionen (Palette) für das Projekt.
* Keine "Magic Colors" (wie Color.Red) in den UIs!
* Stattdessen immer AppColors.Primary oder MaterialTheme.colorScheme.primary nutzen.
*/
object AppColors {
// Enterprise Blue (Hauptaktion, starke Akzente)
val Primary = Color(0xFF0052CC)
val OnPrimary = Color.White
val PrimaryContainer = Color(0xFFDEEBFF)
val OnPrimaryContainer = Color(0xFF0052CC)
// Helleres Blau für sekundäre Akzente
val Secondary = Color(0xFF2684FF)
val OnSecondary = Color.White
// Neutral- & Hintergrund (Light Mode)
val BackgroundLight = Color(0xFFF4F5F7) // Helles Grau (nicht hartes Weiß)
val SurfaceLight = Color.White
val OnBackgroundLight = Color(0xFF172B4D) // Fast Schwarz (besser lesbar)
// Neutral & Hintergrund (Dark Mode)
val BackgroundDark = Color(0xFF1E1E1E) // Angenehmes, dunkles Grau
val SurfaceDark = Color(0xFF2C2C2C)
val OnBackgroundDark = Color(0xFFEBECF0)
// System Status
val Error = Color(0xFFDE350B)
val OnError = Color.White
val Success = Color(0xFF4CAF50)
val Warning = Color(0xFFE67E22)
}
@@ -0,0 +1,46 @@
package at.mocode.frontend.core.designsystem.theme
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
/**
* Zentrale Typografie (Schriftgrößen und Stile) für das gesamte Projekt.
* Die Idee: Im UI-Code schreiben wir nie "fontSize = 16.sp",
* sondern nutzen die festgelegten Stile des AppTypography Objekts oder MaterialTheme.typography.
*/
object AppTypography {
// Große Überschriften (z. B. Screen-Titel)
val TitleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 22.sp,
lineHeight = 28.sp
)
// Mittlere Überschriften (z.B. Card-Titel, Sektionen)
val TitleMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 16.sp,
lineHeight = 24.sp
)
// Standard Fließtext (z.B. Beschreibungen, Dialog-Texte)
val BodyMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 14.sp,
lineHeight = 20.sp
)
// Kleiner Text / Labels (z. B. Tabellenköpfe, dichte Informationen)
val LabelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp
)
}